excalidraw/src/element
Aakansha Doshi e8def8da8d
feat: Support mermaid flowchart and sequence diagrams to excalidraw diagrams 🥳 (#6920)
* feat: integrate mermaidToExcalidraw

* create mermaid to excal dialog

* allow mermaid syntax and export in preview

* fix

* fix webpack config

* fix markdown error by using named export

* center preview

* set elements as selected when inserted onto canvas

* persist mermaid data to storage

* store canvas data in refs

* load mermaid lazily

* tweak design

* compute width, height correctly for arrows

* fix undefined vertex issue

* add mermaid icon in dropdown

* add a note in dialog

* reset preview when error

* show error in preview when error

* show mermaid error messgae react way

* design tweaks

* add example and docs link

* fix

* tweak design to remove scroll bar

* show a spinner unless mermaid loaded

* regenerate ids when needed via programmatic api, this makes sure for mermaid diagrams ids are regenerated

* tweak

* add option to transform viewport to scene coords in transform api

* make opts optional and use 100% zoom when inserting to canvas

* fix arrow bindings in safari and firefox

* fix elements insert position and viewport centering

* fix: Update start/end points by 0.5 so bindings don't overlap with start/end bound element coordinates.

* defer rendering the preview

* tweak text

* fix tests

* remove only

* make design responsive

* fix: show extra tools dropdown in mobile

* fix mobile css

* width auto

* upgrade mermaid-to-excalidraw

* don't pass appState in deps as its not used

* upgrade mermaid-to-excalidraw to fix firefox issue

* use types from mermaid-to-excalidraw

* upgrade mermaid-to-excalidraw

* use stable version of mermaid-to-excalidraw

* upgrade mermaid-to-excalidraw

* fix width of shapes toolbar for smaller screen size and also fix regression of mobile menu

* use i18n

* better api

* enable test coverage in ui

* Add tests

* use common utils to update and get text editor

* updgrade mermaid-to-excalidraw to support sequence diagrams

* fix test

* don't update arrow container height anytime in when redrawing text bounding box

* increase size limit

* increase size limit of vendor to 900kb

* use openDialog for mermaid

* upgrade mermaid-to-excalidraw

* update frame id post generation

* upgrade mermaid-to-excalidraw to add entity codes support

* update size limit

* upgrade mermaid-to-excalidraw package with frame api changes

* upgrade mermaid-to-excalidraw to remove directive and use config

* don't highlight mermaid tool and remove unused api setSelection

* stop using loading state to update text area

* move some styling to scss

* review fixes

* use modifiedTableIcon props and remove stale snap

* css

* dialog css

* fix snap

* use dialog border

* change mermaidToExcalidrawLib to state

* better styling of errors

* make modal bigger

* fix mobile

* update snaps

* fix icon color

* fix dark mode insert button color

* horizontally center spinner

* render canvas conditionally on loaded state

* rd tweaks

* tweak class names

* remove max height

* typo in example

* upgrade mermaid-to-excalidraw

* simplify error state

* fix height & overflow on vertical breakpoint

* fix lint

* show errors in overlay

* set textarea font family

* reduce opacity

* update snap

* upgrade to mermaid  0.1.2

---------

Co-authored-by: dwelle <luzar.david@gmail.com>
2023-11-03 17:41:34 +05:30
..
binding.ts revert: remove bound-arrows from frames (#7190) 2023-10-25 10:39:19 +02:00
bounds.test.ts feat: better default radius sizes for rectangles (#5553) 2022-12-08 16:48:49 +01:00
bounds.ts feat: add approximate elements in bbox detection (#6727) 2023-10-26 23:33:00 +02:00
collision.ts fix: freedraw non-solid bg hitbox not working (#7193) 2023-10-25 17:21:01 +02:00
dragElements.ts fix: don't update label position when dragging labelled arrows (#6891) 2023-10-27 12:06:11 +05:30
embeddable.ts feat: support giphy.com embed domain (#7192) 2023-10-26 00:00:50 +02:00
Hyperlink.scss feat: introducing Web-Embeds (alias iframe element) (#6691) 2023-07-24 16:51:53 +02:00
Hyperlink.tsx feat: add approximate elements in bbox detection (#6727) 2023-10-26 23:33:00 +02:00
image.ts fix: ensure svg image dimensions are always set (#5044) 2022-04-15 12:05:10 +02:00
index.ts feat: introduce frames (#6123) 2023-06-14 18:42:01 +02:00
linearElementEditor.ts feat: add approximate elements in bbox detection (#6727) 2023-10-26 23:33:00 +02:00
mutateElement.ts fix: wysiwyg left in undefined state on reload (#7123) 2023-10-13 14:29:54 +02:00
newElement.test.ts refactor: move excalidraw-app outside src (#6987) 2023-09-21 09:28:48 +05:30
newElement.ts feat: support frames via programmatic API (#7205) 2023-11-01 17:14:04 +05:30
resizeElements.ts feat: element alignments - snapping (#6256) 2023-09-28 16:28:08 +02:00
resizeTest.ts feat: add approximate elements in bbox detection (#6727) 2023-10-26 23:33:00 +02:00
showSelectedShapeActions.ts feat: initial Laser Pointer MVP (#6739) 2023-10-05 17:05:16 +02:00
sizeHelpers.test.ts build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
sizeHelpers.ts feat: partition main canvas vertically (#6759) 2023-08-12 22:56:59 +02:00
sortElements.test.ts fix: sort bound text elements to fix text duplication z-index error (#5130) 2023-02-02 16:23:39 +08:00
sortElements.ts fix: sort bound text elements to fix text duplication z-index error (#5130) 2023-02-02 16:23:39 +08:00
textElement.test.ts fix: cleanup getMaxContainerHeight and getMaxContainerWidth (#6519) 2023-04-25 18:06:23 +05:30
textElement.ts feat: Support mermaid flowchart and sequence diagrams to excalidraw diagrams 🥳 (#6920) 2023-11-03 17:41:34 +05:30
textWysiwyg.test.tsx feat: Support mermaid flowchart and sequence diagrams to excalidraw diagrams 🥳 (#6920) 2023-11-03 17:41:34 +05:30
textWysiwyg.tsx fix: wysiwyg left in undefined state on reload (#7123) 2023-10-13 14:29:54 +02:00
transformHandles.ts feat: add approximate elements in bbox detection (#6727) 2023-10-26 23:33:00 +02:00
typeChecks.test.ts fix: don't allow binding text to images (#6693) 2023-06-19 13:47:28 +05:30
typeChecks.ts fix: isBindableElement to affirm frames (#6900) 2023-09-15 16:15:06 -05:00
types.ts fix: remove embeddable from generic elements (#6853) 2023-08-04 15:16:55 +02:00