@ethberry/mui-lexical 1.0.28 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/index.d.ts.map +1 -0
- package/dist/common/hooks/index.js +1 -17
- package/dist/common/hooks/index.js.map +1 -1
- package/dist/common/hooks/useModal.d.ts +2 -1
- package/dist/common/hooks/useModal.d.ts.map +1 -0
- package/dist/common/hooks/useModal.js +9 -13
- package/dist/common/hooks/useModal.js.map +1 -1
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +2 -18
- package/dist/common/index.js.map +1 -1
- package/dist/common/types/index.d.ts +1 -0
- package/dist/common/types/index.d.ts.map +1 -0
- package/dist/common/types/index.js +1 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +1 -17
- package/dist/components/index.js.map +1 -1
- package/dist/components/ui/Modal/index.d.ts +2 -1
- package/dist/components/ui/Modal/index.d.ts.map +1 -0
- package/dist/components/ui/Modal/index.js +5 -9
- package/dist/components/ui/Modal/index.js.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/index.js +1 -17
- package/dist/components/ui/index.js.map +1 -1
- package/dist/config/lexicalEditorConfig.d.ts +1 -0
- package/dist/config/lexicalEditorConfig.d.ts.map +1 -0
- package/dist/config/lexicalEditorConfig.js +15 -21
- package/dist/config/lexicalEditorConfig.js.map +1 -1
- package/dist/config/lexicalEditorTheme.d.ts +1 -0
- package/dist/config/lexicalEditorTheme.d.ts.map +1 -0
- package/dist/config/lexicalEditorTheme.js +1 -3
- package/dist/config/lexicalEditorTheme.js.map +1 -1
- package/dist/display/index.d.ts +3 -1
- package/dist/display/index.d.ts.map +1 -0
- package/dist/display/index.js +17 -21
- package/dist/display/index.js.map +1 -1
- package/dist/display/styled.d.ts +1 -0
- package/dist/display/styled.d.ts.map +1 -0
- package/dist/display/styled.js +2 -5
- package/dist/display/styled.js.map +1 -1
- package/dist/editor/Editor.d.ts +2 -1
- package/dist/editor/Editor.d.ts.map +1 -0
- package/dist/editor/Editor.js +37 -41
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/commands/index.d.ts +1 -0
- package/dist/editor/commands/index.d.ts.map +1 -0
- package/dist/editor/commands/index.js +2 -5
- package/dist/editor/commands/index.js.map +1 -1
- package/dist/editor/constants/index.d.ts +1 -0
- package/dist/editor/constants/index.d.ts.map +1 -0
- package/dist/editor/constants/index.js +1 -4
- package/dist/editor/constants/index.js.map +1 -1
- package/dist/editor/context/SharedHistoryContext.d.ts +1 -0
- package/dist/editor/context/SharedHistoryContext.d.ts.map +1 -0
- package/dist/editor/context/SharedHistoryContext.js +9 -14
- package/dist/editor/context/SharedHistoryContext.js.map +1 -1
- package/dist/editor/context/ToolbarContext.d.ts +1 -0
- package/dist/editor/context/ToolbarContext.d.ts.map +1 -0
- package/dist/editor/context/ToolbarContext.js +13 -18
- package/dist/editor/context/ToolbarContext.js.map +1 -1
- package/dist/editor/context/index.d.ts +1 -0
- package/dist/editor/context/index.d.ts.map +1 -0
- package/dist/editor/context/index.js +2 -18
- package/dist/editor/context/index.js.map +1 -1
- package/dist/editor/editorStyles.d.ts +1 -0
- package/dist/editor/editorStyles.d.ts.map +1 -0
- package/dist/editor/editorStyles.js +2 -5
- package/dist/editor/editorStyles.js.map +1 -1
- package/dist/editor/hooks/index.d.ts +1 -0
- package/dist/editor/hooks/index.d.ts.map +1 -0
- package/dist/editor/hooks/index.js +1 -17
- package/dist/editor/hooks/index.js.map +1 -1
- package/dist/editor/hooks/useModal.d.ts +1 -0
- package/dist/editor/hooks/useModal.d.ts.map +1 -0
- package/dist/editor/hooks/useModal.js +9 -13
- package/dist/editor/hooks/useModal.js.map +1 -1
- package/dist/editor/images/icons/3-columns.d.ts +3 -1
- package/dist/editor/images/icons/3-columns.d.ts.map +1 -0
- package/dist/editor/images/icons/3-columns.js +3 -7
- package/dist/editor/images/icons/3-columns.js.map +1 -1
- package/dist/editor/images/icons/add-sign.d.ts +3 -1
- package/dist/editor/images/icons/add-sign.d.ts.map +1 -0
- package/dist/editor/images/icons/add-sign.js +3 -7
- package/dist/editor/images/icons/add-sign.js.map +1 -1
- package/dist/editor/images/icons/arrow-clockwise.d.ts +3 -1
- package/dist/editor/images/icons/arrow-clockwise.d.ts.map +1 -0
- package/dist/editor/images/icons/arrow-clockwise.js +3 -7
- package/dist/editor/images/icons/arrow-clockwise.js.map +1 -1
- package/dist/editor/images/icons/arrow-counterclockwise.d.ts +3 -1
- package/dist/editor/images/icons/arrow-counterclockwise.d.ts.map +1 -0
- package/dist/editor/images/icons/arrow-counterclockwise.js +3 -7
- package/dist/editor/images/icons/arrow-counterclockwise.js.map +1 -1
- package/dist/editor/images/icons/bg-color.d.ts +3 -1
- package/dist/editor/images/icons/bg-color.d.ts.map +1 -0
- package/dist/editor/images/icons/bg-color.js +3 -7
- package/dist/editor/images/icons/bg-color.js.map +1 -1
- package/dist/editor/images/icons/camera.d.ts +3 -1
- package/dist/editor/images/icons/camera.d.ts.map +1 -0
- package/dist/editor/images/icons/camera.js +3 -7
- package/dist/editor/images/icons/camera.js.map +1 -1
- package/dist/editor/images/icons/card-checklist.d.ts +3 -1
- package/dist/editor/images/icons/card-checklist.d.ts.map +1 -0
- package/dist/editor/images/icons/card-checklist.js +3 -7
- package/dist/editor/images/icons/card-checklist.js.map +1 -1
- package/dist/editor/images/icons/caret-right-fill.d.ts +3 -1
- package/dist/editor/images/icons/caret-right-fill.d.ts.map +1 -0
- package/dist/editor/images/icons/caret-right-fill.js +3 -7
- package/dist/editor/images/icons/caret-right-fill.js.map +1 -1
- package/dist/editor/images/icons/chat-left-text.d.ts +3 -1
- package/dist/editor/images/icons/chat-left-text.d.ts.map +1 -0
- package/dist/editor/images/icons/chat-left-text.js +3 -7
- package/dist/editor/images/icons/chat-left-text.js.map +1 -1
- package/dist/editor/images/icons/chat-right-dots.d.ts +3 -1
- package/dist/editor/images/icons/chat-right-dots.d.ts.map +1 -0
- package/dist/editor/images/icons/chat-right-dots.js +3 -7
- package/dist/editor/images/icons/chat-right-dots.js.map +1 -1
- package/dist/editor/images/icons/chat-right-text.d.ts +3 -1
- package/dist/editor/images/icons/chat-right-text.d.ts.map +1 -0
- package/dist/editor/images/icons/chat-right-text.js +3 -7
- package/dist/editor/images/icons/chat-right-text.js.map +1 -1
- package/dist/editor/images/icons/chat-right.d.ts +3 -1
- package/dist/editor/images/icons/chat-right.d.ts.map +1 -0
- package/dist/editor/images/icons/chat-right.js +3 -7
- package/dist/editor/images/icons/chat-right.js.map +1 -1
- package/dist/editor/images/icons/chat-square-quote.d.ts +3 -1
- package/dist/editor/images/icons/chat-square-quote.d.ts.map +1 -0
- package/dist/editor/images/icons/chat-square-quote.js +3 -7
- package/dist/editor/images/icons/chat-square-quote.js.map +1 -1
- package/dist/editor/images/icons/chevron-down.d.ts +3 -1
- package/dist/editor/images/icons/chevron-down.d.ts.map +1 -0
- package/dist/editor/images/icons/chevron-down.js +3 -7
- package/dist/editor/images/icons/chevron-down.js.map +1 -1
- package/dist/editor/images/icons/clipboard.d.ts +3 -1
- package/dist/editor/images/icons/clipboard.d.ts.map +1 -0
- package/dist/editor/images/icons/clipboard.js +3 -7
- package/dist/editor/images/icons/clipboard.js.map +1 -1
- package/dist/editor/images/icons/close.d.ts +3 -1
- package/dist/editor/images/icons/close.d.ts.map +1 -0
- package/dist/editor/images/icons/close.js +3 -7
- package/dist/editor/images/icons/close.js.map +1 -1
- package/dist/editor/images/icons/code.d.ts +3 -1
- package/dist/editor/images/icons/code.d.ts.map +1 -0
- package/dist/editor/images/icons/code.js +3 -7
- package/dist/editor/images/icons/code.js.map +1 -1
- package/dist/editor/images/icons/comments.d.ts +3 -1
- package/dist/editor/images/icons/comments.d.ts.map +1 -0
- package/dist/editor/images/icons/comments.js +3 -7
- package/dist/editor/images/icons/comments.js.map +1 -1
- package/dist/editor/images/icons/copy.d.ts +3 -1
- package/dist/editor/images/icons/copy.d.ts.map +1 -0
- package/dist/editor/images/icons/copy.js +3 -7
- package/dist/editor/images/icons/copy.js.map +1 -1
- package/dist/editor/images/icons/diagram-2.d.ts +3 -1
- package/dist/editor/images/icons/diagram-2.d.ts.map +1 -0
- package/dist/editor/images/icons/diagram-2.js +3 -7
- package/dist/editor/images/icons/diagram-2.js.map +1 -1
- package/dist/editor/images/icons/download.d.ts +3 -1
- package/dist/editor/images/icons/download.d.ts.map +1 -0
- package/dist/editor/images/icons/download.js +3 -7
- package/dist/editor/images/icons/download.js.map +1 -1
- package/dist/editor/images/icons/draggable-block-menu.d.ts +3 -1
- package/dist/editor/images/icons/draggable-block-menu.d.ts.map +1 -0
- package/dist/editor/images/icons/draggable-block-menu.js +3 -7
- package/dist/editor/images/icons/draggable-block-menu.js.map +1 -1
- package/dist/editor/images/icons/dropdown-more.d.ts +3 -1
- package/dist/editor/images/icons/dropdown-more.d.ts.map +1 -0
- package/dist/editor/images/icons/dropdown-more.js +3 -7
- package/dist/editor/images/icons/dropdown-more.js.map +1 -1
- package/dist/editor/images/icons/figma.d.ts +3 -1
- package/dist/editor/images/icons/figma.d.ts.map +1 -0
- package/dist/editor/images/icons/figma.js +3 -7
- package/dist/editor/images/icons/figma.js.map +1 -1
- package/dist/editor/images/icons/file-earmark-text.d.ts +3 -1
- package/dist/editor/images/icons/file-earmark-text.d.ts.map +1 -0
- package/dist/editor/images/icons/file-earmark-text.js +3 -7
- package/dist/editor/images/icons/file-earmark-text.js.map +1 -1
- package/dist/editor/images/icons/file-image.d.ts +3 -1
- package/dist/editor/images/icons/file-image.d.ts.map +1 -0
- package/dist/editor/images/icons/file-image.js +3 -7
- package/dist/editor/images/icons/file-image.js.map +1 -1
- package/dist/editor/images/icons/filetype-gif.d.ts +3 -1
- package/dist/editor/images/icons/filetype-gif.d.ts.map +1 -0
- package/dist/editor/images/icons/filetype-gif.js +3 -7
- package/dist/editor/images/icons/filetype-gif.js.map +1 -1
- package/dist/editor/images/icons/font-color.d.ts +3 -1
- package/dist/editor/images/icons/font-color.d.ts.map +1 -0
- package/dist/editor/images/icons/font-color.js +3 -7
- package/dist/editor/images/icons/font-color.js.map +1 -1
- package/dist/editor/images/icons/font-family.d.ts +3 -1
- package/dist/editor/images/icons/font-family.d.ts.map +1 -0
- package/dist/editor/images/icons/font-family.js +3 -7
- package/dist/editor/images/icons/font-family.js.map +1 -1
- package/dist/editor/images/icons/format-clear.d.ts +3 -1
- package/dist/editor/images/icons/format-clear.d.ts.map +1 -0
- package/dist/editor/images/icons/format-clear.js +3 -7
- package/dist/editor/images/icons/format-clear.js.map +1 -1
- package/dist/editor/images/icons/highlighter.d.ts +3 -1
- package/dist/editor/images/icons/highlighter.d.ts.map +1 -0
- package/dist/editor/images/icons/highlighter.js +3 -7
- package/dist/editor/images/icons/highlighter.js.map +1 -1
- package/dist/editor/images/icons/horizontal-rule.d.ts +3 -1
- package/dist/editor/images/icons/horizontal-rule.d.ts.map +1 -0
- package/dist/editor/images/icons/horizontal-rule.js +3 -7
- package/dist/editor/images/icons/horizontal-rule.js.map +1 -1
- package/dist/editor/images/icons/indent.d.ts +3 -1
- package/dist/editor/images/icons/indent.d.ts.map +1 -0
- package/dist/editor/images/icons/indent.js +3 -7
- package/dist/editor/images/icons/indent.js.map +1 -1
- package/dist/editor/images/icons/index.d.ts +1 -0
- package/dist/editor/images/icons/index.d.ts.map +1 -0
- package/dist/editor/images/icons/index.js +88 -104
- package/dist/editor/images/icons/index.js.map +1 -1
- package/dist/editor/images/icons/journal-text.d.ts +3 -1
- package/dist/editor/images/icons/journal-text.d.ts.map +1 -0
- package/dist/editor/images/icons/journal-text.js +3 -7
- package/dist/editor/images/icons/journal-text.js.map +1 -1
- package/dist/editor/images/icons/justify.d.ts +3 -1
- package/dist/editor/images/icons/justify.d.ts.map +1 -0
- package/dist/editor/images/icons/justify.js +3 -7
- package/dist/editor/images/icons/justify.js.map +1 -1
- package/dist/editor/images/icons/link.d.ts +3 -1
- package/dist/editor/images/icons/link.d.ts.map +1 -0
- package/dist/editor/images/icons/link.js +3 -7
- package/dist/editor/images/icons/link.js.map +1 -1
- package/dist/editor/images/icons/list-ol.d.ts +3 -1
- package/dist/editor/images/icons/list-ol.d.ts.map +1 -0
- package/dist/editor/images/icons/list-ol.js +3 -7
- package/dist/editor/images/icons/list-ol.js.map +1 -1
- package/dist/editor/images/icons/list-ul.d.ts +3 -1
- package/dist/editor/images/icons/list-ul.d.ts.map +1 -0
- package/dist/editor/images/icons/list-ul.js +3 -7
- package/dist/editor/images/icons/list-ul.js.map +1 -1
- package/dist/editor/images/icons/lock-fill.d.ts +3 -1
- package/dist/editor/images/icons/lock-fill.d.ts.map +1 -0
- package/dist/editor/images/icons/lock-fill.js +3 -7
- package/dist/editor/images/icons/lock-fill.js.map +1 -1
- package/dist/editor/images/icons/lock.d.ts +3 -1
- package/dist/editor/images/icons/lock.d.ts.map +1 -0
- package/dist/editor/images/icons/lock.js +3 -7
- package/dist/editor/images/icons/lock.js.map +1 -1
- package/dist/editor/images/icons/markdown.d.ts +3 -1
- package/dist/editor/images/icons/markdown.d.ts.map +1 -0
- package/dist/editor/images/icons/markdown.js +3 -7
- package/dist/editor/images/icons/markdown.js.map +1 -1
- package/dist/editor/images/icons/mic.d.ts +3 -1
- package/dist/editor/images/icons/mic.d.ts.map +1 -0
- package/dist/editor/images/icons/mic.js +3 -7
- package/dist/editor/images/icons/mic.js.map +1 -1
- package/dist/editor/images/icons/minus-sign.d.ts +3 -1
- package/dist/editor/images/icons/minus-sign.d.ts.map +1 -0
- package/dist/editor/images/icons/minus-sign.js +3 -7
- package/dist/editor/images/icons/minus-sign.js.map +1 -1
- package/dist/editor/images/icons/outdent.d.ts +3 -1
- package/dist/editor/images/icons/outdent.d.ts.map +1 -0
- package/dist/editor/images/icons/outdent.js +3 -7
- package/dist/editor/images/icons/outdent.js.map +1 -1
- package/dist/editor/images/icons/paint-bucket.d.ts +3 -1
- package/dist/editor/images/icons/paint-bucket.d.ts.map +1 -0
- package/dist/editor/images/icons/paint-bucket.js +3 -7
- package/dist/editor/images/icons/paint-bucket.js.map +1 -1
- package/dist/editor/images/icons/palette.d.ts +3 -1
- package/dist/editor/images/icons/palette.d.ts.map +1 -0
- package/dist/editor/images/icons/palette.js +3 -7
- package/dist/editor/images/icons/palette.js.map +1 -1
- package/dist/editor/images/icons/pencil-fill.d.ts +3 -1
- package/dist/editor/images/icons/pencil-fill.d.ts.map +1 -0
- package/dist/editor/images/icons/pencil-fill.js +3 -7
- package/dist/editor/images/icons/pencil-fill.js.map +1 -1
- package/dist/editor/images/icons/plug-fill.d.ts +3 -1
- package/dist/editor/images/icons/plug-fill.d.ts.map +1 -0
- package/dist/editor/images/icons/plug-fill.js +3 -7
- package/dist/editor/images/icons/plug-fill.js.map +1 -1
- package/dist/editor/images/icons/plug.d.ts +3 -1
- package/dist/editor/images/icons/plug.d.ts.map +1 -0
- package/dist/editor/images/icons/plug.js +3 -7
- package/dist/editor/images/icons/plug.js.map +1 -1
- package/dist/editor/images/icons/plus-slash-minus.d.ts +3 -1
- package/dist/editor/images/icons/plus-slash-minus.d.ts.map +1 -0
- package/dist/editor/images/icons/plus-slash-minus.js +3 -7
- package/dist/editor/images/icons/plus-slash-minus.js.map +1 -1
- package/dist/editor/images/icons/plus.d.ts +3 -1
- package/dist/editor/images/icons/plus.d.ts.map +1 -0
- package/dist/editor/images/icons/plus.js +3 -7
- package/dist/editor/images/icons/plus.js.map +1 -1
- package/dist/editor/images/icons/prettier-error.d.ts +3 -1
- package/dist/editor/images/icons/prettier-error.d.ts.map +1 -0
- package/dist/editor/images/icons/prettier-error.js +3 -7
- package/dist/editor/images/icons/prettier-error.js.map +1 -1
- package/dist/editor/images/icons/prettier.d.ts +3 -1
- package/dist/editor/images/icons/prettier.d.ts.map +1 -0
- package/dist/editor/images/icons/prettier.js +3 -7
- package/dist/editor/images/icons/prettier.js.map +1 -1
- package/dist/editor/images/icons/scissors.d.ts +3 -1
- package/dist/editor/images/icons/scissors.d.ts.map +1 -0
- package/dist/editor/images/icons/scissors.js +3 -7
- package/dist/editor/images/icons/scissors.js.map +1 -1
- package/dist/editor/images/icons/send.d.ts +3 -1
- package/dist/editor/images/icons/send.d.ts.map +1 -0
- package/dist/editor/images/icons/send.js +3 -7
- package/dist/editor/images/icons/send.js.map +1 -1
- package/dist/editor/images/icons/square-check.d.ts +3 -1
- package/dist/editor/images/icons/square-check.d.ts.map +1 -0
- package/dist/editor/images/icons/square-check.js +3 -7
- package/dist/editor/images/icons/square-check.js.map +1 -1
- package/dist/editor/images/icons/sticky.d.ts +3 -1
- package/dist/editor/images/icons/sticky.d.ts.map +1 -0
- package/dist/editor/images/icons/sticky.js +3 -7
- package/dist/editor/images/icons/sticky.js.map +1 -1
- package/dist/editor/images/icons/success-alt.d.ts +3 -1
- package/dist/editor/images/icons/success-alt.d.ts.map +1 -0
- package/dist/editor/images/icons/success-alt.js +3 -7
- package/dist/editor/images/icons/success-alt.js.map +1 -1
- package/dist/editor/images/icons/success.d.ts +3 -1
- package/dist/editor/images/icons/success.d.ts.map +1 -0
- package/dist/editor/images/icons/success.js +3 -7
- package/dist/editor/images/icons/success.js.map +1 -1
- package/dist/editor/images/icons/table.d.ts +3 -1
- package/dist/editor/images/icons/table.d.ts.map +1 -0
- package/dist/editor/images/icons/table.js +3 -7
- package/dist/editor/images/icons/table.js.map +1 -1
- package/dist/editor/images/icons/text-center.d.ts +3 -1
- package/dist/editor/images/icons/text-center.d.ts.map +1 -0
- package/dist/editor/images/icons/text-center.js +3 -7
- package/dist/editor/images/icons/text-center.js.map +1 -1
- package/dist/editor/images/icons/text-left.d.ts +3 -1
- package/dist/editor/images/icons/text-left.d.ts.map +1 -0
- package/dist/editor/images/icons/text-left.js +3 -7
- package/dist/editor/images/icons/text-left.js.map +1 -1
- package/dist/editor/images/icons/text-paragraph.d.ts +3 -1
- package/dist/editor/images/icons/text-paragraph.d.ts.map +1 -0
- package/dist/editor/images/icons/text-paragraph.js +3 -7
- package/dist/editor/images/icons/text-paragraph.js.map +1 -1
- package/dist/editor/images/icons/text-right.d.ts +3 -1
- package/dist/editor/images/icons/text-right.d.ts.map +1 -0
- package/dist/editor/images/icons/text-right.js +3 -7
- package/dist/editor/images/icons/text-right.js.map +1 -1
- package/dist/editor/images/icons/trash.d.ts +3 -1
- package/dist/editor/images/icons/trash.d.ts.map +1 -0
- package/dist/editor/images/icons/trash.js +3 -7
- package/dist/editor/images/icons/trash.js.map +1 -1
- package/dist/editor/images/icons/trash3.d.ts +3 -1
- package/dist/editor/images/icons/trash3.d.ts.map +1 -0
- package/dist/editor/images/icons/trash3.js +3 -7
- package/dist/editor/images/icons/trash3.js.map +1 -1
- package/dist/editor/images/icons/type-bold.d.ts +3 -1
- package/dist/editor/images/icons/type-bold.d.ts.map +1 -0
- package/dist/editor/images/icons/type-bold.js +3 -7
- package/dist/editor/images/icons/type-bold.js.map +1 -1
- package/dist/editor/images/icons/type-capitalize.d.ts +3 -1
- package/dist/editor/images/icons/type-capitalize.d.ts.map +1 -0
- package/dist/editor/images/icons/type-capitalize.js +3 -7
- package/dist/editor/images/icons/type-capitalize.js.map +1 -1
- package/dist/editor/images/icons/type-h1.d.ts +3 -1
- package/dist/editor/images/icons/type-h1.d.ts.map +1 -0
- package/dist/editor/images/icons/type-h1.js +3 -7
- package/dist/editor/images/icons/type-h1.js.map +1 -1
- package/dist/editor/images/icons/type-h2.d.ts +3 -1
- package/dist/editor/images/icons/type-h2.d.ts.map +1 -0
- package/dist/editor/images/icons/type-h2.js +3 -7
- package/dist/editor/images/icons/type-h2.js.map +1 -1
- package/dist/editor/images/icons/type-h3.d.ts +3 -1
- package/dist/editor/images/icons/type-h3.d.ts.map +1 -0
- package/dist/editor/images/icons/type-h3.js +3 -7
- package/dist/editor/images/icons/type-h3.js.map +1 -1
- package/dist/editor/images/icons/type-h4.d.ts +3 -1
- package/dist/editor/images/icons/type-h4.d.ts.map +1 -0
- package/dist/editor/images/icons/type-h4.js +3 -7
- package/dist/editor/images/icons/type-h4.js.map +1 -1
- package/dist/editor/images/icons/type-h5.d.ts +3 -1
- package/dist/editor/images/icons/type-h5.d.ts.map +1 -0
- package/dist/editor/images/icons/type-h5.js +3 -7
- package/dist/editor/images/icons/type-h5.js.map +1 -1
- package/dist/editor/images/icons/type-h6.d.ts +3 -1
- package/dist/editor/images/icons/type-h6.d.ts.map +1 -0
- package/dist/editor/images/icons/type-h6.js +3 -7
- package/dist/editor/images/icons/type-h6.js.map +1 -1
- package/dist/editor/images/icons/type-italic.d.ts +3 -1
- package/dist/editor/images/icons/type-italic.d.ts.map +1 -0
- package/dist/editor/images/icons/type-italic.js +3 -7
- package/dist/editor/images/icons/type-italic.js.map +1 -1
- package/dist/editor/images/icons/type-lowercase.d.ts +3 -1
- package/dist/editor/images/icons/type-lowercase.d.ts.map +1 -0
- package/dist/editor/images/icons/type-lowercase.js +3 -7
- package/dist/editor/images/icons/type-lowercase.js.map +1 -1
- package/dist/editor/images/icons/type-strikethrough.d.ts +3 -1
- package/dist/editor/images/icons/type-strikethrough.d.ts.map +1 -0
- package/dist/editor/images/icons/type-strikethrough.js +3 -7
- package/dist/editor/images/icons/type-strikethrough.js.map +1 -1
- package/dist/editor/images/icons/type-subscript.d.ts +3 -1
- package/dist/editor/images/icons/type-subscript.d.ts.map +1 -0
- package/dist/editor/images/icons/type-subscript.js +3 -7
- package/dist/editor/images/icons/type-subscript.js.map +1 -1
- package/dist/editor/images/icons/type-superscript.d.ts +3 -1
- package/dist/editor/images/icons/type-superscript.d.ts.map +1 -0
- package/dist/editor/images/icons/type-superscript.js +3 -7
- package/dist/editor/images/icons/type-superscript.js.map +1 -1
- package/dist/editor/images/icons/type-underline.d.ts +3 -1
- package/dist/editor/images/icons/type-underline.d.ts.map +1 -0
- package/dist/editor/images/icons/type-underline.js +3 -7
- package/dist/editor/images/icons/type-underline.js.map +1 -1
- package/dist/editor/images/icons/type-uppercase.d.ts +3 -1
- package/dist/editor/images/icons/type-uppercase.d.ts.map +1 -0
- package/dist/editor/images/icons/type-uppercase.js +3 -7
- package/dist/editor/images/icons/type-uppercase.js.map +1 -1
- package/dist/editor/images/icons/upload.d.ts +3 -1
- package/dist/editor/images/icons/upload.d.ts.map +1 -0
- package/dist/editor/images/icons/upload.js +3 -7
- package/dist/editor/images/icons/upload.js.map +1 -1
- package/dist/editor/images/icons/user.d.ts +3 -1
- package/dist/editor/images/icons/user.d.ts.map +1 -0
- package/dist/editor/images/icons/user.js +3 -7
- package/dist/editor/images/icons/user.js.map +1 -1
- package/dist/editor/images/icons/vertical-bottom.d.ts +3 -1
- package/dist/editor/images/icons/vertical-bottom.d.ts.map +1 -0
- package/dist/editor/images/icons/vertical-bottom.js +3 -7
- package/dist/editor/images/icons/vertical-bottom.js.map +1 -1
- package/dist/editor/images/icons/vertical-middle.d.ts +3 -1
- package/dist/editor/images/icons/vertical-middle.d.ts.map +1 -0
- package/dist/editor/images/icons/vertical-middle.js +3 -7
- package/dist/editor/images/icons/vertical-middle.js.map +1 -1
- package/dist/editor/images/icons/vertical-top.d.ts +3 -1
- package/dist/editor/images/icons/vertical-top.d.ts.map +1 -0
- package/dist/editor/images/icons/vertical-top.js +3 -7
- package/dist/editor/images/icons/vertical-top.js.map +1 -1
- package/dist/editor/images/icons/x.d.ts +3 -1
- package/dist/editor/images/icons/x.d.ts.map +1 -0
- package/dist/editor/images/icons/x.js +3 -7
- package/dist/editor/images/icons/x.js.map +1 -1
- package/dist/editor/images/icons/youtube.d.ts +3 -1
- package/dist/editor/images/icons/youtube.d.ts.map +1 -0
- package/dist/editor/images/icons/youtube.js +3 -7
- package/dist/editor/images/icons/youtube.js.map +1 -1
- package/dist/editor/images/image-broken.d.ts +3 -1
- package/dist/editor/images/image-broken.d.ts.map +1 -0
- package/dist/editor/images/image-broken.js +3 -7
- package/dist/editor/images/image-broken.js.map +1 -1
- package/dist/editor/index.d.ts +1 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +2 -10
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/nodes/Image/ImageComponent.d.ts +1 -0
- package/dist/editor/nodes/Image/ImageComponent.d.ts.map +1 -0
- package/dist/editor/nodes/Image/ImageComponent.js +57 -61
- package/dist/editor/nodes/Image/ImageComponent.js.map +1 -1
- package/dist/editor/nodes/Image/ImageNode.d.ts +1 -0
- package/dist/editor/nodes/Image/ImageNode.d.ts.map +1 -0
- package/dist/editor/nodes/Image/ImageNode.js +12 -18
- package/dist/editor/nodes/Image/ImageNode.js.map +1 -1
- package/dist/editor/nodes/Image/imageNodeStyles.d.ts +1 -0
- package/dist/editor/nodes/Image/imageNodeStyles.d.ts.map +1 -0
- package/dist/editor/nodes/Image/imageNodeStyles.js +2 -5
- package/dist/editor/nodes/Image/imageNodeStyles.js.map +1 -1
- package/dist/editor/nodes/Image/index.d.ts +1 -0
- package/dist/editor/nodes/Image/index.d.ts.map +1 -0
- package/dist/editor/nodes/Image/index.js +3 -9
- package/dist/editor/nodes/Image/index.js.map +1 -1
- package/dist/editor/nodes/InlineImage/InlineImageComponent.d.ts +1 -0
- package/dist/editor/nodes/InlineImage/InlineImageComponent.d.ts.map +1 -0
- package/dist/editor/nodes/InlineImage/InlineImageComponent.js +51 -56
- package/dist/editor/nodes/InlineImage/InlineImageComponent.js.map +1 -1
- package/dist/editor/nodes/InlineImage/InlineImageNode.d.ts +1 -0
- package/dist/editor/nodes/InlineImage/InlineImageNode.d.ts.map +1 -0
- package/dist/editor/nodes/InlineImage/InlineImageNode.js +14 -20
- package/dist/editor/nodes/InlineImage/InlineImageNode.js.map +1 -1
- package/dist/editor/nodes/InlineImage/index.d.ts +1 -0
- package/dist/editor/nodes/InlineImage/index.d.ts.map +1 -0
- package/dist/editor/nodes/InlineImage/index.js +3 -9
- package/dist/editor/nodes/InlineImage/index.js.map +1 -1
- package/dist/editor/nodes/InlineImage/inlineImageNodeStyles.d.ts +1 -0
- package/dist/editor/nodes/InlineImage/inlineImageNodeStyles.d.ts.map +1 -0
- package/dist/editor/nodes/InlineImage/inlineImageNodeStyles.js +2 -5
- package/dist/editor/nodes/InlineImage/inlineImageNodeStyles.js.map +1 -1
- package/dist/editor/nodes/MuiLexicalNodes.d.ts +1 -0
- package/dist/editor/nodes/MuiLexicalNodes.d.ts.map +1 -0
- package/dist/editor/nodes/MuiLexicalNodes.js +27 -30
- package/dist/editor/nodes/MuiLexicalNodes.js.map +1 -1
- package/dist/editor/nodes/Video/VideoComponent.d.ts +2 -1
- package/dist/editor/nodes/Video/VideoComponent.d.ts.map +1 -0
- package/dist/editor/nodes/Video/VideoComponent.js +3 -7
- package/dist/editor/nodes/Video/VideoComponent.js.map +1 -1
- package/dist/editor/nodes/Video/VideoNode.d.ts +1 -0
- package/dist/editor/nodes/Video/VideoNode.d.ts.map +1 -0
- package/dist/editor/nodes/Video/VideoNode.js +10 -16
- package/dist/editor/nodes/Video/VideoNode.js.map +1 -1
- package/dist/editor/nodes/Video/index.d.ts +1 -0
- package/dist/editor/nodes/Video/index.d.ts.map +1 -0
- package/dist/editor/nodes/Video/index.js +3 -9
- package/dist/editor/nodes/Video/index.js.map +1 -1
- package/dist/editor/nodes/Video/videoNodeStyles.d.ts +1 -0
- package/dist/editor/nodes/Video/videoNodeStyles.d.ts.map +1 -0
- package/dist/editor/nodes/Video/videoNodeStyles.js +2 -5
- package/dist/editor/nodes/Video/videoNodeStyles.js.map +1 -1
- package/dist/editor/nodes/index.d.ts +1 -0
- package/dist/editor/nodes/index.d.ts.map +1 -0
- package/dist/editor/nodes/index.js +4 -20
- package/dist/editor/nodes/index.js.map +1 -1
- package/dist/editor/plugins/CodeActionMenuPlugin/codeActionMenuPluginStyles.d.ts +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/codeActionMenuPluginStyles.d.ts.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/codeActionMenuPluginStyles.js +2 -5
- package/dist/editor/plugins/CodeActionMenuPlugin/codeActionMenuPluginStyles.js.map +1 -1
- package/dist/editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +2 -1
- package/dist/editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +15 -19
- package/dist/editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.js.map +1 -1
- package/dist/editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +2 -1
- package/dist/editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js +14 -19
- package/dist/editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js.map +1 -1
- package/dist/editor/plugins/CodeActionMenuPlugin/components/index.d.ts +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/index.d.ts.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/index.js +2 -18
- package/dist/editor/plugins/CodeActionMenuPlugin/components/index.js.map +1 -1
- package/dist/editor/plugins/CodeActionMenuPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/index.js +28 -33
- package/dist/editor/plugins/CodeActionMenuPlugin/index.js.map +1 -1
- package/dist/editor/plugins/CodeActionMenuPlugin/utils.d.ts +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/utils.d.ts.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/utils.js +5 -8
- package/dist/editor/plugins/CodeActionMenuPlugin/utils.js.map +1 -1
- package/dist/editor/plugins/CodeHighlightPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/CodeHighlightPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/CodeHighlightPlugin/index.js +7 -11
- package/dist/editor/plugins/CodeHighlightPlugin/index.js.map +1 -1
- package/dist/editor/plugins/ComponentPickerPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/ComponentPickerPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/ComponentPickerPlugin/index.js +60 -97
- package/dist/editor/plugins/ComponentPickerPlugin/index.js.map +1 -1
- package/dist/editor/plugins/ContextMenuPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/ContextMenuPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/ContextMenuPlugin/index.js +27 -33
- package/dist/editor/plugins/ContextMenuPlugin/index.js.map +1 -1
- package/dist/editor/plugins/FloatingLinkEditorPlugin/floatLinkEditorPluginStyles.d.ts +1 -0
- package/dist/editor/plugins/FloatingLinkEditorPlugin/floatLinkEditorPluginStyles.d.ts.map +1 -0
- package/dist/editor/plugins/FloatingLinkEditorPlugin/floatLinkEditorPluginStyles.js +2 -5
- package/dist/editor/plugins/FloatingLinkEditorPlugin/floatLinkEditorPluginStyles.js.map +1 -1
- package/dist/editor/plugins/FloatingLinkEditorPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/FloatingLinkEditorPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/FloatingLinkEditorPlugin/index.js +75 -80
- package/dist/editor/plugins/FloatingLinkEditorPlugin/index.js.map +1 -1
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/floatTextFormatToolbarPluginStyles.d.ts +1 -0
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/floatTextFormatToolbarPluginStyles.d.ts.map +1 -0
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/floatTextFormatToolbarPluginStyles.js +2 -5
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/floatTextFormatToolbarPluginStyles.js.map +1 -1
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/index.js +63 -68
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -1
- package/dist/editor/plugins/ImagesPlugin/index.d.ts +2 -1
- package/dist/editor/plugins/ImagesPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/ImagesPlugin/index.js +41 -47
- package/dist/editor/plugins/ImagesPlugin/index.js.map +1 -1
- package/dist/editor/plugins/LinkPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/LinkPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/LinkPlugin/index.js +5 -9
- package/dist/editor/plugins/LinkPlugin/index.js.map +1 -1
- package/dist/editor/plugins/MarkdownShortcutPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/MarkdownShortcutPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/MarkdownShortcutPlugin/index.js +5 -9
- package/dist/editor/plugins/MarkdownShortcutPlugin/index.js.map +1 -1
- package/dist/editor/plugins/MarkdownTransformers/index.d.ts +1 -0
- package/dist/editor/plugins/MarkdownTransformers/index.d.ts.map +1 -0
- package/dist/editor/plugins/MarkdownTransformers/index.js +41 -44
- package/dist/editor/plugins/MarkdownTransformers/index.js.map +1 -1
- package/dist/editor/plugins/MaxLengthPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/MaxLengthPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/MaxLengthPlugin/index.js +13 -17
- package/dist/editor/plugins/MaxLengthPlugin/index.js.map +1 -1
- package/dist/editor/plugins/ShortcutsPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/ShortcutsPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/ShortcutsPlugin/index.js +46 -50
- package/dist/editor/plugins/ShortcutsPlugin/index.js.map +1 -1
- package/dist/editor/plugins/ShortcutsPlugin/shortcuts.d.ts +1 -0
- package/dist/editor/plugins/ShortcutsPlugin/shortcuts.d.ts.map +1 -0
- package/dist/editor/plugins/ShortcutsPlugin/shortcuts.js +57 -80
- package/dist/editor/plugins/ShortcutsPlugin/shortcuts.js.map +1 -1
- package/dist/editor/plugins/TabFocusPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/TabFocusPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/TabFocusPlugin/index.js +10 -14
- package/dist/editor/plugins/TabFocusPlugin/index.js.map +1 -1
- package/dist/editor/plugins/TableActionMenuPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/TableActionMenuPlugin/index.js +90 -94
- package/dist/editor/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/editor/plugins/TableCellResizer/index.d.ts +1 -0
- package/dist/editor/plugins/TableCellResizer/index.d.ts.map +1 -0
- package/dist/editor/plugins/TableCellResizer/index.js +48 -53
- package/dist/editor/plugins/TableCellResizer/index.js.map +1 -1
- package/dist/editor/plugins/TableCellResizer/tableCellResizerPluginStyles.d.ts +1 -0
- package/dist/editor/plugins/TableCellResizer/tableCellResizerPluginStyles.d.ts.map +1 -0
- package/dist/editor/plugins/TableCellResizer/tableCellResizerPluginStyles.js +2 -5
- package/dist/editor/plugins/TableCellResizer/tableCellResizerPluginStyles.js.map +1 -1
- package/dist/editor/plugins/TableHoverActionsPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/TableHoverActionsPlugin/index.js +43 -47
- package/dist/editor/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/editor/plugins/TablePlugin.d.ts +2 -1
- package/dist/editor/plugins/TablePlugin.d.ts.map +1 -0
- package/dist/editor/plugins/TablePlugin.js +24 -30
- package/dist/editor/plugins/TablePlugin.js.map +1 -1
- package/dist/editor/plugins/ToolbarPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/ToolbarPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/ToolbarPlugin/index.js +82 -86
- package/dist/editor/plugins/ToolbarPlugin/index.js.map +1 -1
- package/dist/editor/plugins/ToolbarPlugin/utils.d.ts +1 -0
- package/dist/editor/plugins/ToolbarPlugin/utils.d.ts.map +1 -0
- package/dist/editor/plugins/ToolbarPlugin/utils.js +55 -68
- package/dist/editor/plugins/ToolbarPlugin/utils.js.map +1 -1
- package/dist/editor/plugins/VideoPlugin/index.d.ts +1 -0
- package/dist/editor/plugins/VideoPlugin/index.d.ts.map +1 -0
- package/dist/editor/plugins/VideoPlugin/index.js +28 -33
- package/dist/editor/plugins/VideoPlugin/index.js.map +1 -1
- package/dist/editor/plugins/index.d.ts +1 -0
- package/dist/editor/plugins/index.d.ts.map +1 -0
- package/dist/editor/plugins/index.js +19 -35
- package/dist/editor/plugins/index.js.map +1 -1
- package/dist/editor/themes/index.d.ts +1 -0
- package/dist/editor/themes/index.d.ts.map +1 -0
- package/dist/editor/themes/index.js +1 -5
- package/dist/editor/themes/index.js.map +1 -1
- package/dist/editor/themes/playgroundEditorTheme.d.ts +1 -0
- package/dist/editor/themes/playgroundEditorTheme.d.ts.map +1 -0
- package/dist/editor/themes/playgroundEditorTheme.js +1 -4
- package/dist/editor/themes/playgroundEditorTheme.js.map +1 -1
- package/dist/editor/themes/playgroundEditorThemeStyles.d.ts +1 -0
- package/dist/editor/themes/playgroundEditorThemeStyles.d.ts.map +1 -0
- package/dist/editor/themes/playgroundEditorThemeStyles.js +2 -5
- package/dist/editor/themes/playgroundEditorThemeStyles.js.map +1 -1
- package/dist/editor/types/index.d.ts +1 -0
- package/dist/editor/types/index.d.ts.map +1 -0
- package/dist/editor/types/index.js +1 -2
- package/dist/editor/ui/BlockFormatDropdown/index.d.ts +1 -0
- package/dist/editor/ui/BlockFormatDropdown/index.d.ts.map +1 -0
- package/dist/editor/ui/BlockFormatDropdown/index.js +48 -52
- package/dist/editor/ui/BlockFormatDropdown/index.js.map +1 -1
- package/dist/editor/ui/BoldButton/index.d.ts +1 -0
- package/dist/editor/ui/BoldButton/index.d.ts.map +1 -0
- package/dist/editor/ui/BoldButton/index.js +8 -12
- package/dist/editor/ui/BoldButton/index.js.map +1 -1
- package/dist/editor/ui/Button.d.ts +1 -0
- package/dist/editor/ui/Button.d.ts.map +1 -0
- package/dist/editor/ui/Button.js +6 -10
- package/dist/editor/ui/Button.js.map +1 -1
- package/dist/editor/ui/CenterAlignButton/index.d.ts +1 -0
- package/dist/editor/ui/CenterAlignButton/index.d.ts.map +1 -0
- package/dist/editor/ui/CenterAlignButton/index.js +8 -12
- package/dist/editor/ui/CenterAlignButton/index.js.map +1 -1
- package/dist/editor/ui/ClearEditorButton/index.d.ts +1 -0
- package/dist/editor/ui/ClearEditorButton/index.d.ts.map +1 -0
- package/dist/editor/ui/ClearEditorButton/index.js +4 -8
- package/dist/editor/ui/ClearEditorButton/index.js.map +1 -1
- package/dist/editor/ui/ClearFormattingButton/index.d.ts +1 -0
- package/dist/editor/ui/ClearFormattingButton/index.d.ts.map +1 -0
- package/dist/editor/ui/ClearFormattingButton/index.js +4 -8
- package/dist/editor/ui/ClearFormattingButton/index.js.map +1 -1
- package/dist/editor/ui/CodeButton/index.d.ts +1 -0
- package/dist/editor/ui/CodeButton/index.d.ts.map +1 -0
- package/dist/editor/ui/CodeButton/index.js +8 -12
- package/dist/editor/ui/CodeButton/index.js.map +1 -1
- package/dist/editor/ui/CodeLanguageDropdown/index.d.ts +3 -1
- package/dist/editor/ui/CodeLanguageDropdown/index.d.ts.map +1 -0
- package/dist/editor/ui/CodeLanguageDropdown/index.js +8 -12
- package/dist/editor/ui/CodeLanguageDropdown/index.js.map +1 -1
- package/dist/editor/ui/ContentEditable.d.ts +1 -0
- package/dist/editor/ui/ContentEditable.d.ts.map +1 -0
- package/dist/editor/ui/ContentEditable.js +6 -10
- package/dist/editor/ui/ContentEditable.js.map +1 -1
- package/dist/editor/ui/Dialog.d.ts +1 -0
- package/dist/editor/ui/Dialog.d.ts.map +1 -0
- package/dist/editor/ui/Dialog.js +7 -12
- package/dist/editor/ui/Dialog.js.map +1 -1
- package/dist/editor/ui/Divider/index.d.ts +1 -0
- package/dist/editor/ui/Divider/index.d.ts.map +1 -0
- package/dist/editor/ui/Divider/index.js +3 -7
- package/dist/editor/ui/Divider/index.js.map +1 -1
- package/dist/editor/ui/DropDown.d.ts +2 -1
- package/dist/editor/ui/DropDown.d.ts.map +1 -0
- package/dist/editor/ui/DropDown.js +26 -31
- package/dist/editor/ui/DropDown.js.map +1 -1
- package/dist/editor/ui/FlashMessage.d.ts +1 -0
- package/dist/editor/ui/FlashMessage.d.ts.map +1 -0
- package/dist/editor/ui/FlashMessage.js +6 -10
- package/dist/editor/ui/FlashMessage.js.map +1 -1
- package/dist/editor/ui/HorizontalRuleButton/index.d.ts +1 -0
- package/dist/editor/ui/HorizontalRuleButton/index.d.ts.map +1 -0
- package/dist/editor/ui/HorizontalRuleButton/index.js +7 -11
- package/dist/editor/ui/HorizontalRuleButton/index.js.map +1 -1
- package/dist/editor/ui/ImageButton/index.d.ts +1 -0
- package/dist/editor/ui/ImageButton/index.d.ts.map +1 -0
- package/dist/editor/ui/ImageButton/index.js +7 -11
- package/dist/editor/ui/ImageButton/index.js.map +1 -1
- package/dist/editor/ui/ImageResizer.d.ts +1 -0
- package/dist/editor/ui/ImageResizer.d.ts.map +1 -0
- package/dist/editor/ui/ImageResizer.js +18 -22
- package/dist/editor/ui/ImageResizer.js.map +1 -1
- package/dist/editor/ui/ItalicButton/index.d.ts +1 -0
- package/dist/editor/ui/ItalicButton/index.d.ts.map +1 -0
- package/dist/editor/ui/ItalicButton/index.js +8 -12
- package/dist/editor/ui/ItalicButton/index.js.map +1 -1
- package/dist/editor/ui/LeftAlignButton/index.d.ts +1 -0
- package/dist/editor/ui/LeftAlignButton/index.d.ts.map +1 -0
- package/dist/editor/ui/LeftAlignButton/index.js +8 -12
- package/dist/editor/ui/LeftAlignButton/index.js.map +1 -1
- package/dist/editor/ui/LinkButton/index.d.ts +1 -0
- package/dist/editor/ui/LinkButton/index.d.ts.map +1 -0
- package/dist/editor/ui/LinkButton/index.js +5 -9
- package/dist/editor/ui/LinkButton/index.js.map +1 -1
- package/dist/editor/ui/Modal.d.ts +1 -0
- package/dist/editor/ui/Modal.d.ts.map +1 -0
- package/dist/editor/ui/Modal.js +13 -17
- package/dist/editor/ui/Modal.js.map +1 -1
- package/dist/editor/ui/RedoButton/index.d.ts +1 -0
- package/dist/editor/ui/RedoButton/index.d.ts.map +1 -0
- package/dist/editor/ui/RedoButton/index.js +8 -12
- package/dist/editor/ui/RedoButton/index.js.map +1 -1
- package/dist/editor/ui/RightAlignButton/index.d.ts +1 -0
- package/dist/editor/ui/RightAlignButton/index.d.ts.map +1 -0
- package/dist/editor/ui/RightAlignButton/index.js +8 -12
- package/dist/editor/ui/RightAlignButton/index.js.map +1 -1
- package/dist/editor/ui/Select.d.ts +1 -0
- package/dist/editor/ui/Select.d.ts.map +1 -0
- package/dist/editor/ui/Select.js +5 -9
- package/dist/editor/ui/Select.js.map +1 -1
- package/dist/editor/ui/StrikethroughButton/index.d.ts +1 -0
- package/dist/editor/ui/StrikethroughButton/index.d.ts.map +1 -0
- package/dist/editor/ui/StrikethroughButton/index.js +8 -12
- package/dist/editor/ui/StrikethroughButton/index.js.map +1 -1
- package/dist/editor/ui/TableButton/index.d.ts +1 -0
- package/dist/editor/ui/TableButton/index.d.ts.map +1 -0
- package/dist/editor/ui/TableButton/index.js +7 -11
- package/dist/editor/ui/TableButton/index.js.map +1 -1
- package/dist/editor/ui/TextInput.d.ts +1 -0
- package/dist/editor/ui/TextInput.d.ts.map +1 -0
- package/dist/editor/ui/TextInput.js +5 -9
- package/dist/editor/ui/TextInput.js.map +1 -1
- package/dist/editor/ui/UnderlineButton/index.d.ts +1 -0
- package/dist/editor/ui/UnderlineButton/index.d.ts.map +1 -0
- package/dist/editor/ui/UnderlineButton/index.js +8 -12
- package/dist/editor/ui/UnderlineButton/index.js.map +1 -1
- package/dist/editor/ui/UndoButton/index.d.ts +1 -0
- package/dist/editor/ui/UndoButton/index.d.ts.map +1 -0
- package/dist/editor/ui/UndoButton/index.js +8 -12
- package/dist/editor/ui/UndoButton/index.js.map +1 -1
- package/dist/editor/ui/VideoButton/index.d.ts +1 -0
- package/dist/editor/ui/VideoButton/index.d.ts.map +1 -0
- package/dist/editor/ui/VideoButton/index.js +7 -11
- package/dist/editor/ui/VideoButton/index.js.map +1 -1
- package/dist/editor/ui/index.d.ts +1 -0
- package/dist/editor/ui/index.d.ts.map +1 -0
- package/dist/editor/ui/index.js +44 -72
- package/dist/editor/ui/index.js.map +1 -1
- package/dist/editor/utils/dropDownActiveClass.d.ts +1 -0
- package/dist/editor/utils/dropDownActiveClass.d.ts.map +1 -0
- package/dist/editor/utils/dropDownActiveClass.js +1 -4
- package/dist/editor/utils/dropDownActiveClass.js.map +1 -1
- package/dist/editor/utils/getDOMRangeRect.d.ts +1 -0
- package/dist/editor/utils/getDOMRangeRect.d.ts.map +1 -0
- package/dist/editor/utils/getDOMRangeRect.js +1 -4
- package/dist/editor/utils/getDOMRangeRect.js.map +1 -1
- package/dist/editor/utils/getSelectedNode.d.ts +1 -0
- package/dist/editor/utils/getSelectedNode.d.ts.map +1 -0
- package/dist/editor/utils/getSelectedNode.js +4 -7
- package/dist/editor/utils/getSelectedNode.js.map +1 -1
- package/dist/editor/utils/getThemeSelector.d.ts +1 -0
- package/dist/editor/utils/getThemeSelector.d.ts.map +1 -0
- package/dist/editor/utils/getThemeSelector.js +1 -4
- package/dist/editor/utils/getThemeSelector.js.map +1 -1
- package/dist/editor/utils/index.d.ts +1 -0
- package/dist/editor/utils/index.d.ts.map +1 -0
- package/dist/editor/utils/index.js +9 -25
- package/dist/editor/utils/index.js.map +1 -1
- package/dist/editor/utils/joinClasses.d.ts +1 -0
- package/dist/editor/utils/joinClasses.d.ts.map +1 -0
- package/dist/editor/utils/joinClasses.js +1 -5
- package/dist/editor/utils/joinClasses.js.map +1 -1
- package/dist/editor/utils/parseVideoUrl.d.ts +1 -0
- package/dist/editor/utils/parseVideoUrl.d.ts.map +1 -0
- package/dist/editor/utils/parseVideoUrl.js +1 -4
- package/dist/editor/utils/parseVideoUrl.js.map +1 -1
- package/dist/editor/utils/setFloatingElemPosition.d.ts +1 -0
- package/dist/editor/utils/setFloatingElemPosition.d.ts.map +1 -0
- package/dist/editor/utils/setFloatingElemPosition.js +1 -4
- package/dist/editor/utils/setFloatingElemPosition.js.map +1 -1
- package/dist/editor/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
- package/dist/editor/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -0
- package/dist/editor/utils/setFloatingElemPositionForLinkEditor.js +1 -4
- package/dist/editor/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
- package/dist/editor/utils/url.d.ts +1 -0
- package/dist/editor/utils/url.d.ts.map +1 -0
- package/dist/editor/utils/url.js +2 -6
- package/dist/editor/utils/url.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -35
- package/dist/index.js.map +1 -1
- package/jest.config.json +28 -10
- package/package.json +40 -32
- package/tsconfig.jest.json +2 -3
- package/dist/editor/Editor.stories.d.ts +0 -13
- package/dist/editor/Editor.stories.js +0 -135
- package/dist/editor/Editor.stories.js.map +0 -1
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.floatTextFormatToolbarPluginStyles = exports.FloatingTextFormatToolbarPlugin = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
2
|
/**
|
|
6
3
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
4
|
*
|
|
@@ -9,26 +6,26 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
9
6
|
* LICENSE file in the root directory of this source tree.
|
|
10
7
|
*
|
|
11
8
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function TextFormatFloatingToolbar({ editor, anchorElem, isLink, isBold, isItalic, isUnderline, isCode, isStrikethrough, isLeftAlign, isCenterAlign, isRightAlign, setIsLinkEditMode, controls =
|
|
23
|
-
const popupCharStylesEditorRef =
|
|
24
|
-
const insertLink =
|
|
9
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
10
|
+
import { $isCodeHighlightNode } from "@lexical/code";
|
|
11
|
+
import { $isLinkNode, TOGGLE_LINK_COMMAND } from "@lexical/link";
|
|
12
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
13
|
+
import { mergeRegister } from "@lexical/utils";
|
|
14
|
+
import { $getSelection, $isParagraphNode, $isRangeSelection, $isTextNode, COMMAND_PRIORITY_LOW, getDOMSelection, SELECTION_CHANGE_COMMAND, } from "lexical";
|
|
15
|
+
import { createPortal } from "react-dom";
|
|
16
|
+
import { getDOMRangeRect, getSelectedNode, setFloatingElemPosition } from "../../utils";
|
|
17
|
+
import { BoldButton, CenterAlignButton, CodeButton, ItalicButton, LeftAlignButton, LinkButton, RightAlignButton, StrikethroughButton, UnderlineButton, } from "../../ui";
|
|
18
|
+
import { toolbarDefaultControls } from "../../constants";
|
|
19
|
+
function TextFormatFloatingToolbar({ editor, anchorElem, isLink, isBold, isItalic, isUnderline, isCode, isStrikethrough, isLeftAlign, isCenterAlign, isRightAlign, setIsLinkEditMode, controls = toolbarDefaultControls.textFormat, }) {
|
|
20
|
+
const popupCharStylesEditorRef = useRef(null);
|
|
21
|
+
const insertLink = useCallback(() => {
|
|
25
22
|
if (!isLink) {
|
|
26
23
|
setIsLinkEditMode(true);
|
|
27
|
-
editor.dispatchCommand(
|
|
24
|
+
editor.dispatchCommand(TOGGLE_LINK_COMMAND, "https://");
|
|
28
25
|
}
|
|
29
26
|
else {
|
|
30
27
|
setIsLinkEditMode(false);
|
|
31
|
-
editor.dispatchCommand(
|
|
28
|
+
editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);
|
|
32
29
|
}
|
|
33
30
|
}, [editor, isLink, setIsLinkEditMode]);
|
|
34
31
|
function mouseMoveListener(e) {
|
|
@@ -51,7 +48,7 @@ function TextFormatFloatingToolbar({ editor, anchorElem, isLink, isBold, isItali
|
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
50
|
}
|
|
54
|
-
|
|
51
|
+
useEffect(() => {
|
|
55
52
|
if (popupCharStylesEditorRef?.current) {
|
|
56
53
|
document.addEventListener("mousemove", mouseMoveListener);
|
|
57
54
|
document.addEventListener("mouseup", mouseUpListener);
|
|
@@ -62,10 +59,10 @@ function TextFormatFloatingToolbar({ editor, anchorElem, isLink, isBold, isItali
|
|
|
62
59
|
}
|
|
63
60
|
return;
|
|
64
61
|
}, [popupCharStylesEditorRef]);
|
|
65
|
-
const $updateTextFormatFloatingToolbar =
|
|
66
|
-
const selection =
|
|
62
|
+
const $updateTextFormatFloatingToolbar = useCallback(() => {
|
|
63
|
+
const selection = $getSelection();
|
|
67
64
|
const popupCharStylesEditorElem = popupCharStylesEditorRef.current;
|
|
68
|
-
const nativeSelection =
|
|
65
|
+
const nativeSelection = getDOMSelection(editor._window);
|
|
69
66
|
if (popupCharStylesEditorElem === null) {
|
|
70
67
|
return;
|
|
71
68
|
}
|
|
@@ -75,11 +72,11 @@ function TextFormatFloatingToolbar({ editor, anchorElem, isLink, isBold, isItali
|
|
|
75
72
|
!nativeSelection.isCollapsed &&
|
|
76
73
|
!!rootElement &&
|
|
77
74
|
rootElement.contains(nativeSelection.anchorNode)) {
|
|
78
|
-
const rangeRect =
|
|
79
|
-
|
|
75
|
+
const rangeRect = getDOMRangeRect(nativeSelection, rootElement);
|
|
76
|
+
setFloatingElemPosition(rangeRect, popupCharStylesEditorElem, anchorElem, isLink);
|
|
80
77
|
}
|
|
81
78
|
}, [editor, anchorElem, isLink]);
|
|
82
|
-
|
|
79
|
+
useEffect(() => {
|
|
83
80
|
const scrollerElem = anchorElem.parentElement;
|
|
84
81
|
const update = () => {
|
|
85
82
|
editor.getEditorState().read(() => {
|
|
@@ -97,61 +94,61 @@ function TextFormatFloatingToolbar({ editor, anchorElem, isLink, isBold, isItali
|
|
|
97
94
|
}
|
|
98
95
|
};
|
|
99
96
|
}, [editor, $updateTextFormatFloatingToolbar, anchorElem]);
|
|
100
|
-
|
|
97
|
+
useEffect(() => {
|
|
101
98
|
editor.getEditorState().read(() => {
|
|
102
99
|
$updateTextFormatFloatingToolbar();
|
|
103
100
|
});
|
|
104
|
-
return
|
|
101
|
+
return mergeRegister(editor.registerUpdateListener(({ editorState }) => {
|
|
105
102
|
editorState.read(() => {
|
|
106
103
|
$updateTextFormatFloatingToolbar();
|
|
107
104
|
});
|
|
108
|
-
}), editor.registerCommand(
|
|
105
|
+
}), editor.registerCommand(SELECTION_CHANGE_COMMAND, () => {
|
|
109
106
|
$updateTextFormatFloatingToolbar();
|
|
110
107
|
return false;
|
|
111
|
-
},
|
|
108
|
+
}, COMMAND_PRIORITY_LOW));
|
|
112
109
|
}, [editor, $updateTextFormatFloatingToolbar]);
|
|
113
110
|
const controlsMap = {
|
|
114
|
-
bold: (
|
|
115
|
-
italic: (
|
|
116
|
-
underline: (
|
|
117
|
-
strikethrough: (
|
|
118
|
-
code: (
|
|
119
|
-
link: (
|
|
120
|
-
leftAlign: (
|
|
121
|
-
centerAlign: (
|
|
122
|
-
rightAlign: (
|
|
111
|
+
bold: _jsx(BoldButton, { activeEditor: editor, isBold: isBold }),
|
|
112
|
+
italic: _jsx(ItalicButton, { activeEditor: editor, isItalic: isItalic }),
|
|
113
|
+
underline: _jsx(UnderlineButton, { activeEditor: editor, isUnderline: isUnderline }),
|
|
114
|
+
strikethrough: _jsx(StrikethroughButton, { activeEditor: editor, isStrikethrough: isStrikethrough }),
|
|
115
|
+
code: _jsx(CodeButton, { activeEditor: editor, isCode: isCode }),
|
|
116
|
+
link: _jsx(LinkButton, { insertLink: insertLink, isLink: isLink }),
|
|
117
|
+
leftAlign: _jsx(LeftAlignButton, { activeEditor: editor, isLeftAlign: isLeftAlign }),
|
|
118
|
+
centerAlign: _jsx(CenterAlignButton, { activeEditor: editor, isCenterAlign: isCenterAlign }),
|
|
119
|
+
rightAlign: _jsx(RightAlignButton, { activeEditor: editor, isRightAlign: isRightAlign }),
|
|
123
120
|
};
|
|
124
|
-
return ((
|
|
121
|
+
return (_jsx("div", { ref: popupCharStylesEditorRef, className: "floating-text-format-popup", children: editor.isEditable() && !!controls?.length && _jsx(_Fragment, { children: controls.map(c => controlsMap[c]) }) }));
|
|
125
122
|
}
|
|
126
123
|
function useFloatingTextFormatToolbar(editor, anchorElem, setIsLinkEditMode, controls) {
|
|
127
|
-
const [isText, setIsText] =
|
|
128
|
-
const [isLink, setIsLink] =
|
|
129
|
-
const [isBold, setIsBold] =
|
|
130
|
-
const [isItalic, setIsItalic] =
|
|
131
|
-
const [isUnderline, setIsUnderline] =
|
|
132
|
-
const [isStrikethrough, setIsStrikethrough] =
|
|
133
|
-
const [isCode, setIsCode] =
|
|
134
|
-
const [isLeftAlign, setIsLeftAlign] =
|
|
135
|
-
const [isCenterAlign, setIsCenterAlign] =
|
|
136
|
-
const [isRightAlign, setIsRightAlign] =
|
|
137
|
-
const updatePopup =
|
|
124
|
+
const [isText, setIsText] = useState(false);
|
|
125
|
+
const [isLink, setIsLink] = useState(false);
|
|
126
|
+
const [isBold, setIsBold] = useState(false);
|
|
127
|
+
const [isItalic, setIsItalic] = useState(false);
|
|
128
|
+
const [isUnderline, setIsUnderline] = useState(false);
|
|
129
|
+
const [isStrikethrough, setIsStrikethrough] = useState(false);
|
|
130
|
+
const [isCode, setIsCode] = useState(false);
|
|
131
|
+
const [isLeftAlign, setIsLeftAlign] = useState(false);
|
|
132
|
+
const [isCenterAlign, setIsCenterAlign] = useState(false);
|
|
133
|
+
const [isRightAlign, setIsRightAlign] = useState(false);
|
|
134
|
+
const updatePopup = useCallback(() => {
|
|
138
135
|
editor.getEditorState().read(() => {
|
|
139
136
|
// Should not to pop up the floating toolbar when using IME input
|
|
140
137
|
if (editor.isComposing()) {
|
|
141
138
|
return;
|
|
142
139
|
}
|
|
143
|
-
const selection =
|
|
144
|
-
const nativeSelection =
|
|
140
|
+
const selection = $getSelection();
|
|
141
|
+
const nativeSelection = getDOMSelection(editor._window);
|
|
145
142
|
const rootElement = editor.getRootElement();
|
|
146
143
|
if (nativeSelection !== null &&
|
|
147
|
-
(
|
|
144
|
+
(!$isRangeSelection(selection) || !rootElement?.contains(nativeSelection.anchorNode))) {
|
|
148
145
|
setIsText(false);
|
|
149
146
|
return;
|
|
150
147
|
}
|
|
151
|
-
if (
|
|
148
|
+
if (!$isRangeSelection(selection)) {
|
|
152
149
|
return;
|
|
153
150
|
}
|
|
154
|
-
const node =
|
|
151
|
+
const node = getSelectedNode(selection);
|
|
155
152
|
const element = node.getTopLevelElementOrThrow();
|
|
156
153
|
const align = element.getFormatType();
|
|
157
154
|
// Update text format
|
|
@@ -165,14 +162,14 @@ function useFloatingTextFormatToolbar(editor, anchorElem, setIsLinkEditMode, con
|
|
|
165
162
|
setIsRightAlign(align === "right");
|
|
166
163
|
// Update links
|
|
167
164
|
const parent = node.getParent();
|
|
168
|
-
if (
|
|
165
|
+
if ($isLinkNode(parent) || $isLinkNode(node)) {
|
|
169
166
|
setIsLink(true);
|
|
170
167
|
}
|
|
171
168
|
else {
|
|
172
169
|
setIsLink(false);
|
|
173
170
|
}
|
|
174
|
-
if (
|
|
175
|
-
setIsText(
|
|
171
|
+
if (!$isCodeHighlightNode(selection.anchor.getNode()) && selection.getTextContent() !== "") {
|
|
172
|
+
setIsText($isTextNode(node) || $isParagraphNode(node));
|
|
176
173
|
}
|
|
177
174
|
else {
|
|
178
175
|
setIsText(false);
|
|
@@ -184,14 +181,14 @@ function useFloatingTextFormatToolbar(editor, anchorElem, setIsLinkEditMode, con
|
|
|
184
181
|
}
|
|
185
182
|
});
|
|
186
183
|
}, [editor]);
|
|
187
|
-
|
|
184
|
+
useEffect(() => {
|
|
188
185
|
document.addEventListener("selectionchange", updatePopup);
|
|
189
186
|
return () => {
|
|
190
187
|
document.removeEventListener("selectionchange", updatePopup);
|
|
191
188
|
};
|
|
192
189
|
}, [updatePopup]);
|
|
193
|
-
|
|
194
|
-
return
|
|
190
|
+
useEffect(() => {
|
|
191
|
+
return mergeRegister(editor.registerUpdateListener(() => {
|
|
195
192
|
updatePopup();
|
|
196
193
|
}), editor.registerRootListener(() => {
|
|
197
194
|
if (editor.getRootElement() === null) {
|
|
@@ -202,13 +199,11 @@ function useFloatingTextFormatToolbar(editor, anchorElem, setIsLinkEditMode, con
|
|
|
202
199
|
if (!isText) {
|
|
203
200
|
return null;
|
|
204
201
|
}
|
|
205
|
-
return
|
|
202
|
+
return createPortal(_jsx(TextFormatFloatingToolbar, { editor: editor, anchorElem: anchorElem, isLink: isLink, isBold: isBold, isItalic: isItalic, isStrikethrough: isStrikethrough, isUnderline: isUnderline, isCode: isCode, isLeftAlign: isLeftAlign, isCenterAlign: isCenterAlign, isRightAlign: isRightAlign, setIsLinkEditMode: setIsLinkEditMode, controls: controls }), anchorElem);
|
|
206
203
|
}
|
|
207
|
-
const FloatingTextFormatToolbarPlugin = ({ anchorElem = document.body, setIsLinkEditMode, controls, }) => {
|
|
208
|
-
const [editor] =
|
|
204
|
+
export const FloatingTextFormatToolbarPlugin = ({ anchorElem = document.body, setIsLinkEditMode, controls, }) => {
|
|
205
|
+
const [editor] = useLexicalComposerContext();
|
|
209
206
|
return useFloatingTextFormatToolbar(editor, anchorElem, setIsLinkEditMode, controls);
|
|
210
207
|
};
|
|
211
|
-
|
|
212
|
-
var floatTextFormatToolbarPluginStyles_1 = require("./floatTextFormatToolbarPluginStyles");
|
|
213
|
-
Object.defineProperty(exports, "floatTextFormatToolbarPluginStyles", { enumerable: true, get: function () { return floatTextFormatToolbarPluginStyles_1.floatTextFormatToolbarPluginStyles; } });
|
|
208
|
+
export { floatTextFormatToolbarPluginStyles } from "./floatTextFormatToolbarPluginStyles";
|
|
214
209
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAA2B,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,oBAAoB,EACpB,eAAe,EAEf,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,GAChB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAS,yBAAyB,CAAC,EACjC,MAAM,EACN,UAAU,EACV,MAAM,EACN,MAAM,EACN,QAAQ,EACR,WAAW,EACX,MAAM,EACN,eAAe,EACf,WAAW,EACX,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,QAAQ,GAAG,sBAAsB,CAAC,UAAU,GAe7C;IACC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Y,CACjB,KAAC,yBAAyB,IACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,iBAAiB,EACpC,QAAQ,EAAE,QAAQ,GAClB,EACF,UAAU,CACX,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAC9C,UAAU,GAAG,QAAQ,CAAC,IAAI,EAC1B,iBAAiB,EACjB,QAAQ,GAKT,EAAsB,EAAE;IACvB,MAAM,CAAC,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAC;IAC7C,OAAO,4BAA4B,CAAC,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC;AACvF,CAAC,CAAC;AAEF,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -12,7 +12,7 @@ export type InsertImagePayload = Readonly<IImagePayload>;
|
|
|
12
12
|
export declare const INSERT_IMAGE_COMMAND: LexicalCommand<InsertImagePayload>;
|
|
13
13
|
export declare function InsertImageUriDialogBody({ onClick }: {
|
|
14
14
|
onClick: (payload: InsertImagePayload) => void;
|
|
15
|
-
}):
|
|
15
|
+
}): JSX.Element;
|
|
16
16
|
export declare function InsertImageDialog({ activeEditor, onClose, }: {
|
|
17
17
|
activeEditor: LexicalEditor;
|
|
18
18
|
onClose: () => void;
|
|
@@ -26,3 +26,4 @@ declare global {
|
|
|
26
26
|
rangeParent?: Node;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editor/plugins/ImagesPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA+B,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAG9D,OAAO,EAiBL,cAAc,EACd,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,OAAO,EAA6C,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAKvG,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;AAEzD,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,kBAAkB,CAAyC,CAAC;AAE9G,wBAAgB,wBAAwB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAA;CAAE,eA6BvG;AAED,wBAAgB,iBAAiB,CAAC,EAChC,YAAY,EACZ,OAAO,GACR,EAAE;IACD,YAAY,EAAE,aAAa,CAAC;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,GAAG,GAAG,CAAC,OAAO,CAoBd;AAED,eAAO,MAAM,YAAY,GAAI,qBAAqB;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,KAAG,GAAG,CAAC,OAAO,GAAG,IA+C/F,CAAC;AA0GF,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,SAAS;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,IAAI,CAAC;KACpB;CACF"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ImagesPlugin = exports.INSERT_IMAGE_COMMAND = void 0;
|
|
4
|
-
exports.InsertImageUriDialogBody = InsertImageUriDialogBody;
|
|
5
|
-
exports.InsertImageDialog = InsertImageDialog;
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
2
|
/**
|
|
8
3
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
4
|
*
|
|
@@ -11,24 +6,24 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
11
6
|
* LICENSE file in the root directory of this source tree.
|
|
12
7
|
*
|
|
13
8
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function InsertImageUriDialogBody({ onClick }) {
|
|
24
|
-
const [src, setSrc] =
|
|
25
|
-
const [altText, setAltText] =
|
|
9
|
+
import { useEffect, useRef, useState } from "react";
|
|
10
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
11
|
+
import { $wrapNodeInElement, mergeRegister } from "@lexical/utils";
|
|
12
|
+
import { $createParagraphNode, $createRangeSelection, $getSelection, $insertNodes, $isNodeSelection, $isRootOrShadowRoot, $setSelection, COMMAND_PRIORITY_EDITOR, COMMAND_PRIORITY_HIGH, COMMAND_PRIORITY_LOW, createCommand, DRAGOVER_COMMAND, DRAGSTART_COMMAND, DROP_COMMAND, getDOMSelectionFromTarget, isHTMLElement, } from "lexical";
|
|
13
|
+
import { $createImageNode, $isImageNode, ImageNode } from "../../nodes/Image/ImageNode";
|
|
14
|
+
import { Button } from "../../ui/Button";
|
|
15
|
+
import { DialogActions } from "../../ui/Dialog";
|
|
16
|
+
import { TextInput } from "../../ui/TextInput";
|
|
17
|
+
export const INSERT_IMAGE_COMMAND = createCommand("INSERT_IMAGE_COMMAND");
|
|
18
|
+
export function InsertImageUriDialogBody({ onClick }) {
|
|
19
|
+
const [src, setSrc] = useState("");
|
|
20
|
+
const [altText, setAltText] = useState("");
|
|
26
21
|
const isDisabled = src === "";
|
|
27
|
-
return ((
|
|
22
|
+
return (_jsxs(_Fragment, { children: [_jsx(TextInput, { label: "Image URL", placeholder: "i.e. https://source.unsplash.com/random", onChange: setSrc, value: src, "data-test-id": "image-modal-url-input" }), _jsx(TextInput, { label: "Alt Text", placeholder: "Random unsplash image", onChange: setAltText, value: altText, "data-test-id": "image-modal-alt-text-input" }), _jsx(DialogActions, { children: _jsx(Button, { "data-test-id": "image-modal-confirm-btn", disabled: isDisabled, onClick: () => onClick({ altText, src }), children: "Confirm" }) })] }));
|
|
28
23
|
}
|
|
29
|
-
function InsertImageDialog({ activeEditor, onClose, }) {
|
|
30
|
-
const hasModifier =
|
|
31
|
-
|
|
24
|
+
export function InsertImageDialog({ activeEditor, onClose, }) {
|
|
25
|
+
const hasModifier = useRef(false);
|
|
26
|
+
useEffect(() => {
|
|
32
27
|
hasModifier.current = false;
|
|
33
28
|
const handler = (e) => {
|
|
34
29
|
hasModifier.current = e.altKey;
|
|
@@ -39,35 +34,34 @@ function InsertImageDialog({ activeEditor, onClose, }) {
|
|
|
39
34
|
};
|
|
40
35
|
}, [activeEditor]);
|
|
41
36
|
const onClick = (payload) => {
|
|
42
|
-
activeEditor.dispatchCommand(
|
|
37
|
+
activeEditor.dispatchCommand(INSERT_IMAGE_COMMAND, payload);
|
|
43
38
|
onClose();
|
|
44
39
|
};
|
|
45
|
-
return (
|
|
40
|
+
return _jsx(InsertImageUriDialogBody, { onClick: onClick });
|
|
46
41
|
}
|
|
47
|
-
const ImagesPlugin = ({ captionsEnabled }) => {
|
|
48
|
-
const [editor] =
|
|
49
|
-
|
|
50
|
-
if (!editor.hasNodes([
|
|
42
|
+
export const ImagesPlugin = ({ captionsEnabled }) => {
|
|
43
|
+
const [editor] = useLexicalComposerContext();
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (!editor.hasNodes([ImageNode])) {
|
|
51
46
|
throw new Error("ImagesPlugin: ImageNode not registered on editor");
|
|
52
47
|
}
|
|
53
|
-
return
|
|
54
|
-
const imageNode =
|
|
55
|
-
|
|
56
|
-
if (
|
|
57
|
-
|
|
48
|
+
return mergeRegister(editor.registerCommand(INSERT_IMAGE_COMMAND, payload => {
|
|
49
|
+
const imageNode = $createImageNode(payload);
|
|
50
|
+
$insertNodes([imageNode]);
|
|
51
|
+
if ($isRootOrShadowRoot(imageNode.getParentOrThrow())) {
|
|
52
|
+
$wrapNodeInElement(imageNode, $createParagraphNode).selectEnd();
|
|
58
53
|
}
|
|
59
54
|
return true;
|
|
60
|
-
},
|
|
55
|
+
}, COMMAND_PRIORITY_EDITOR), editor.registerCommand(DRAGSTART_COMMAND, event => {
|
|
61
56
|
return $onDragStart(event);
|
|
62
|
-
},
|
|
57
|
+
}, COMMAND_PRIORITY_HIGH), editor.registerCommand(DRAGOVER_COMMAND, event => {
|
|
63
58
|
return $onDragover(event);
|
|
64
|
-
},
|
|
59
|
+
}, COMMAND_PRIORITY_LOW), editor.registerCommand(DROP_COMMAND, event => {
|
|
65
60
|
return $onDrop(event, editor);
|
|
66
|
-
},
|
|
61
|
+
}, COMMAND_PRIORITY_HIGH));
|
|
67
62
|
}, [captionsEnabled, editor]);
|
|
68
63
|
return null;
|
|
69
64
|
};
|
|
70
|
-
exports.ImagesPlugin = ImagesPlugin;
|
|
71
65
|
const TRANSPARENT_IMAGE = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
|
|
72
66
|
const img = document.createElement("img");
|
|
73
67
|
img.src = TRANSPARENT_IMAGE;
|
|
@@ -120,23 +114,23 @@ function $onDrop(event, editor) {
|
|
|
120
114
|
if (canDropImage(event)) {
|
|
121
115
|
const range = getDragSelection(event);
|
|
122
116
|
node.remove();
|
|
123
|
-
const rangeSelection =
|
|
117
|
+
const rangeSelection = $createRangeSelection();
|
|
124
118
|
if (range !== null && range !== undefined) {
|
|
125
119
|
rangeSelection.applyDOMRange(range);
|
|
126
120
|
}
|
|
127
|
-
|
|
128
|
-
editor.dispatchCommand(
|
|
121
|
+
$setSelection(rangeSelection);
|
|
122
|
+
editor.dispatchCommand(INSERT_IMAGE_COMMAND, data);
|
|
129
123
|
}
|
|
130
124
|
return true;
|
|
131
125
|
}
|
|
132
126
|
function $getImageNodeInSelection() {
|
|
133
|
-
const selection =
|
|
134
|
-
if (
|
|
127
|
+
const selection = $getSelection();
|
|
128
|
+
if (!$isNodeSelection(selection)) {
|
|
135
129
|
return null;
|
|
136
130
|
}
|
|
137
131
|
const nodes = selection.getNodes();
|
|
138
132
|
const node = nodes[0];
|
|
139
|
-
return
|
|
133
|
+
return $isImageNode(node) ? node : null;
|
|
140
134
|
}
|
|
141
135
|
function getDragImageData(event) {
|
|
142
136
|
const dragData = event.dataTransfer?.getData("application/x-lexical-drag");
|
|
@@ -165,14 +159,14 @@ function getDragImageData(event) {
|
|
|
165
159
|
}
|
|
166
160
|
function canDropImage(event) {
|
|
167
161
|
const target = event.target;
|
|
168
|
-
return !!(
|
|
162
|
+
return !!(isHTMLElement(target) &&
|
|
169
163
|
!target.closest("code, span.editor-image") &&
|
|
170
|
-
|
|
164
|
+
isHTMLElement(target.parentElement) &&
|
|
171
165
|
target.parentElement.closest("div.ContentEditable__root"));
|
|
172
166
|
}
|
|
173
167
|
function getDragSelection(event) {
|
|
174
168
|
let range;
|
|
175
|
-
const domSelection =
|
|
169
|
+
const domSelection = getDOMSelectionFromTarget(event.target);
|
|
176
170
|
if (document.caretRangeFromPoint) {
|
|
177
171
|
range = document.caretRangeFromPoint(event.clientX, event.clientY);
|
|
178
172
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/ImagesPlugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/ImagesPlugin/index.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAY,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,M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AAK,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,CAAC,wCAAwC,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editor/plugins/LinkPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKjC,eAAO,MAAM,UAAU,QAAO,GAAG,CAAC,OAUjC,CAAC"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
const url_1 = require("../../utils/url");
|
|
7
|
-
const LinkPlugin = () => {
|
|
8
|
-
return ((0, jsx_runtime_1.jsx)(LexicalLinkPlugin_1.LinkPlugin, { validateUrl: url_1.validateUrl, attributes: {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { LinkPlugin as LexicalLinkPlugin } from "@lexical/react/LexicalLinkPlugin";
|
|
3
|
+
import { validateUrl } from "../../utils/url";
|
|
4
|
+
export const LinkPlugin = () => {
|
|
5
|
+
return (_jsx(LexicalLinkPlugin, { validateUrl: validateUrl, attributes: {
|
|
9
6
|
rel: "noopener noreferrer",
|
|
10
7
|
target: "_blank",
|
|
11
8
|
} }));
|
|
12
9
|
};
|
|
13
|
-
exports.LinkPlugin = LinkPlugin;
|
|
14
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/LinkPlugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/LinkPlugin/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,CAAC,MAAM,UAAU,GAAG,GAAgB,EAAE;IAC1C,OAAO,CACL,KAAC,iBAAiB,IAChB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE;YACV,GAAG,EAAE,qBAAqB;YAC1B,MAAM,EAAE,QAAQ;SACjB,GACD,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editor/plugins/MarkdownShortcutPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKjC,eAAO,MAAM,cAAc,QAAO,GAAG,CAAC,OAErC,CAAC"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
const MarkdownTransformers_1 = require("../MarkdownTransformers");
|
|
7
|
-
const MarkdownPlugin = () => {
|
|
8
|
-
return (0, jsx_runtime_1.jsx)(LexicalMarkdownShortcutPlugin_1.MarkdownShortcutPlugin, { transformers: MarkdownTransformers_1.PLAYGROUND_TRANSFORMERS });
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { MarkdownShortcutPlugin } from "@lexical/react/LexicalMarkdownShortcutPlugin";
|
|
3
|
+
import { PLAYGROUND_TRANSFORMERS } from "../MarkdownTransformers";
|
|
4
|
+
export const MarkdownPlugin = () => {
|
|
5
|
+
return _jsx(MarkdownShortcutPlugin, { transformers: PLAYGROUND_TRANSFORMERS });
|
|
9
6
|
};
|
|
10
|
-
exports.MarkdownPlugin = MarkdownPlugin;
|
|
11
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/MarkdownShortcutPlugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/MarkdownShortcutPlugin/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAEtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,MAAM,CAAC,MAAM,cAAc,GAAG,GAAgB,EAAE;IAC9C,OAAO,KAAC,sBAAsB,IAAC,YAAY,EAAE,uBAAuB,GAAI,CAAC;AAC3E,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editor/plugins/MarkdownTransformers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,kBAAkB,EAIlB,oBAAoB,EACpB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAsB3B,eAAO,MAAM,EAAE,EAAE,kBAmBhB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,oBAsBnB,CAAC;AAMF,eAAO,MAAM,KAAK,EAAE,kBA0HnB,CAAC;AAsBF,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,WAAW,CAStD,CAAC"}
|