@ethberry/mui-lexical 1.0.7
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/LICENSE +16 -0
- package/README.md +1 -0
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/index.js +18 -0
- package/dist/common/hooks/index.js.map +1 -0
- package/dist/common/hooks/useModal.d.ts +2 -0
- package/dist/common/hooks/useModal.js +28 -0
- package/dist/common/hooks/useModal.js.map +1 -0
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.js +19 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/types/index.d.ts +5 -0
- package/dist/common/types/index.js +3 -0
- package/dist/common/types/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +18 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/ui/Modal/index.d.ts +6 -0
- package/dist/components/ui/Modal/index.js +18 -0
- package/dist/components/ui/Modal/index.js.map +1 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +18 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/config/lexicalEditorConfig.d.ts +78 -0
- package/dist/config/lexicalEditorConfig.js +33 -0
- package/dist/config/lexicalEditorConfig.js.map +1 -0
- package/dist/config/lexicalEditorTheme.d.ts +68 -0
- package/dist/config/lexicalEditorTheme.js +71 -0
- package/dist/config/lexicalEditorTheme.js.map +1 -0
- package/dist/display/index.d.ts +6 -0
- package/dist/display/index.js +47 -0
- package/dist/display/index.js.map +1 -0
- package/dist/display/styled.d.ts +1 -0
- package/dist/display/styled.js +67 -0
- package/dist/display/styled.js.map +1 -0
- package/dist/editor/Editor.d.ts +16 -0
- package/dist/editor/Editor.js +95 -0
- package/dist/editor/Editor.js.map +1 -0
- package/dist/editor/Editor.stories.d.ts +13 -0
- package/dist/editor/Editor.stories.js +135 -0
- package/dist/editor/Editor.stories.js.map +1 -0
- package/dist/editor/commands/index.d.ts +4 -0
- package/dist/editor/commands/index.js +6 -0
- package/dist/editor/commands/index.js.map +1 -0
- package/dist/editor/constants/index.d.ts +2 -0
- package/dist/editor/constants/index.js +40 -0
- package/dist/editor/constants/index.js.map +1 -0
- package/dist/editor/context/SharedHistoryContext.d.ts +11 -0
- package/dist/editor/context/SharedHistoryContext.js +17 -0
- package/dist/editor/context/SharedHistoryContext.js.map +1 -0
- package/dist/editor/context/ToolbarContext.d.ts +56 -0
- package/dist/editor/context/ToolbarContext.js +67 -0
- package/dist/editor/context/ToolbarContext.js.map +1 -0
- package/dist/editor/context/index.d.ts +2 -0
- package/dist/editor/context/index.js +19 -0
- package/dist/editor/context/index.js.map +1 -0
- package/dist/editor/editorStyles.d.ts +1 -0
- package/dist/editor/editorStyles.js +1273 -0
- package/dist/editor/editorStyles.js.map +1 -0
- package/dist/editor/hooks/index.d.ts +1 -0
- package/dist/editor/hooks/index.js +18 -0
- package/dist/editor/hooks/index.js.map +1 -0
- package/dist/editor/hooks/useModal.d.ts +2 -0
- package/dist/editor/hooks/useModal.js +29 -0
- package/dist/editor/hooks/useModal.js.map +1 -0
- package/dist/editor/images/icons/3-columns.d.ts +1 -0
- package/dist/editor/images/icons/3-columns.js +9 -0
- package/dist/editor/images/icons/3-columns.js.map +1 -0
- package/dist/editor/images/icons/add-sign.d.ts +1 -0
- package/dist/editor/images/icons/add-sign.js +9 -0
- package/dist/editor/images/icons/add-sign.js.map +1 -0
- package/dist/editor/images/icons/arrow-clockwise.d.ts +1 -0
- package/dist/editor/images/icons/arrow-clockwise.js +9 -0
- package/dist/editor/images/icons/arrow-clockwise.js.map +1 -0
- package/dist/editor/images/icons/arrow-counterclockwise.d.ts +1 -0
- package/dist/editor/images/icons/arrow-counterclockwise.js +9 -0
- package/dist/editor/images/icons/arrow-counterclockwise.js.map +1 -0
- package/dist/editor/images/icons/bg-color.d.ts +1 -0
- package/dist/editor/images/icons/bg-color.js +9 -0
- package/dist/editor/images/icons/bg-color.js.map +1 -0
- package/dist/editor/images/icons/camera.d.ts +1 -0
- package/dist/editor/images/icons/camera.js +9 -0
- package/dist/editor/images/icons/camera.js.map +1 -0
- package/dist/editor/images/icons/card-checklist.d.ts +1 -0
- package/dist/editor/images/icons/card-checklist.js +9 -0
- package/dist/editor/images/icons/card-checklist.js.map +1 -0
- package/dist/editor/images/icons/caret-right-fill.d.ts +1 -0
- package/dist/editor/images/icons/caret-right-fill.js +9 -0
- package/dist/editor/images/icons/caret-right-fill.js.map +1 -0
- package/dist/editor/images/icons/chat-left-text.d.ts +1 -0
- package/dist/editor/images/icons/chat-left-text.js +9 -0
- package/dist/editor/images/icons/chat-left-text.js.map +1 -0
- package/dist/editor/images/icons/chat-right-dots.d.ts +1 -0
- package/dist/editor/images/icons/chat-right-dots.js +9 -0
- package/dist/editor/images/icons/chat-right-dots.js.map +1 -0
- package/dist/editor/images/icons/chat-right-text.d.ts +1 -0
- package/dist/editor/images/icons/chat-right-text.js +9 -0
- package/dist/editor/images/icons/chat-right-text.js.map +1 -0
- package/dist/editor/images/icons/chat-right.d.ts +1 -0
- package/dist/editor/images/icons/chat-right.js +9 -0
- package/dist/editor/images/icons/chat-right.js.map +1 -0
- package/dist/editor/images/icons/chat-square-quote.d.ts +1 -0
- package/dist/editor/images/icons/chat-square-quote.js +9 -0
- package/dist/editor/images/icons/chat-square-quote.js.map +1 -0
- package/dist/editor/images/icons/chevron-down.d.ts +1 -0
- package/dist/editor/images/icons/chevron-down.js +9 -0
- package/dist/editor/images/icons/chevron-down.js.map +1 -0
- package/dist/editor/images/icons/clipboard.d.ts +1 -0
- package/dist/editor/images/icons/clipboard.js +9 -0
- package/dist/editor/images/icons/clipboard.js.map +1 -0
- package/dist/editor/images/icons/close.d.ts +1 -0
- package/dist/editor/images/icons/close.js +9 -0
- package/dist/editor/images/icons/close.js.map +1 -0
- package/dist/editor/images/icons/code.d.ts +1 -0
- package/dist/editor/images/icons/code.js +9 -0
- package/dist/editor/images/icons/code.js.map +1 -0
- package/dist/editor/images/icons/comments.d.ts +1 -0
- package/dist/editor/images/icons/comments.js +9 -0
- package/dist/editor/images/icons/comments.js.map +1 -0
- package/dist/editor/images/icons/copy.d.ts +1 -0
- package/dist/editor/images/icons/copy.js +9 -0
- package/dist/editor/images/icons/copy.js.map +1 -0
- package/dist/editor/images/icons/diagram-2.d.ts +1 -0
- package/dist/editor/images/icons/diagram-2.js +9 -0
- package/dist/editor/images/icons/diagram-2.js.map +1 -0
- package/dist/editor/images/icons/download.d.ts +1 -0
- package/dist/editor/images/icons/download.js +9 -0
- package/dist/editor/images/icons/download.js.map +1 -0
- package/dist/editor/images/icons/draggable-block-menu.d.ts +1 -0
- package/dist/editor/images/icons/draggable-block-menu.js +9 -0
- package/dist/editor/images/icons/draggable-block-menu.js.map +1 -0
- package/dist/editor/images/icons/dropdown-more.d.ts +1 -0
- package/dist/editor/images/icons/dropdown-more.js +9 -0
- package/dist/editor/images/icons/dropdown-more.js.map +1 -0
- package/dist/editor/images/icons/figma.d.ts +1 -0
- package/dist/editor/images/icons/figma.js +9 -0
- package/dist/editor/images/icons/figma.js.map +1 -0
- package/dist/editor/images/icons/file-earmark-text.d.ts +1 -0
- package/dist/editor/images/icons/file-earmark-text.js +9 -0
- package/dist/editor/images/icons/file-earmark-text.js.map +1 -0
- package/dist/editor/images/icons/file-image.d.ts +1 -0
- package/dist/editor/images/icons/file-image.js +9 -0
- package/dist/editor/images/icons/file-image.js.map +1 -0
- package/dist/editor/images/icons/filetype-gif.d.ts +1 -0
- package/dist/editor/images/icons/filetype-gif.js +9 -0
- package/dist/editor/images/icons/filetype-gif.js.map +1 -0
- package/dist/editor/images/icons/font-color.d.ts +1 -0
- package/dist/editor/images/icons/font-color.js +9 -0
- package/dist/editor/images/icons/font-color.js.map +1 -0
- package/dist/editor/images/icons/font-family.d.ts +1 -0
- package/dist/editor/images/icons/font-family.js +9 -0
- package/dist/editor/images/icons/font-family.js.map +1 -0
- package/dist/editor/images/icons/format-clear.d.ts +1 -0
- package/dist/editor/images/icons/format-clear.js +9 -0
- package/dist/editor/images/icons/format-clear.js.map +1 -0
- package/dist/editor/images/icons/highlighter.d.ts +1 -0
- package/dist/editor/images/icons/highlighter.js +9 -0
- package/dist/editor/images/icons/highlighter.js.map +1 -0
- package/dist/editor/images/icons/horizontal-rule.d.ts +1 -0
- package/dist/editor/images/icons/horizontal-rule.js +9 -0
- package/dist/editor/images/icons/horizontal-rule.js.map +1 -0
- package/dist/editor/images/icons/indent.d.ts +1 -0
- package/dist/editor/images/icons/indent.js +9 -0
- package/dist/editor/images/icons/indent.js.map +1 -0
- package/dist/editor/images/icons/index.d.ts +88 -0
- package/dist/editor/images/icons/index.js +105 -0
- package/dist/editor/images/icons/index.js.map +1 -0
- package/dist/editor/images/icons/journal-text.d.ts +1 -0
- package/dist/editor/images/icons/journal-text.js +9 -0
- package/dist/editor/images/icons/journal-text.js.map +1 -0
- package/dist/editor/images/icons/justify.d.ts +1 -0
- package/dist/editor/images/icons/justify.js +9 -0
- package/dist/editor/images/icons/justify.js.map +1 -0
- package/dist/editor/images/icons/link.d.ts +1 -0
- package/dist/editor/images/icons/link.js +9 -0
- package/dist/editor/images/icons/link.js.map +1 -0
- package/dist/editor/images/icons/list-ol.d.ts +1 -0
- package/dist/editor/images/icons/list-ol.js +9 -0
- package/dist/editor/images/icons/list-ol.js.map +1 -0
- package/dist/editor/images/icons/list-ul.d.ts +1 -0
- package/dist/editor/images/icons/list-ul.js +9 -0
- package/dist/editor/images/icons/list-ul.js.map +1 -0
- package/dist/editor/images/icons/lock-fill.d.ts +1 -0
- package/dist/editor/images/icons/lock-fill.js +9 -0
- package/dist/editor/images/icons/lock-fill.js.map +1 -0
- package/dist/editor/images/icons/lock.d.ts +1 -0
- package/dist/editor/images/icons/lock.js +9 -0
- package/dist/editor/images/icons/lock.js.map +1 -0
- package/dist/editor/images/icons/markdown.d.ts +1 -0
- package/dist/editor/images/icons/markdown.js +9 -0
- package/dist/editor/images/icons/markdown.js.map +1 -0
- package/dist/editor/images/icons/mic.d.ts +1 -0
- package/dist/editor/images/icons/mic.js +9 -0
- package/dist/editor/images/icons/mic.js.map +1 -0
- package/dist/editor/images/icons/minus-sign.d.ts +1 -0
- package/dist/editor/images/icons/minus-sign.js +9 -0
- package/dist/editor/images/icons/minus-sign.js.map +1 -0
- package/dist/editor/images/icons/outdent.d.ts +1 -0
- package/dist/editor/images/icons/outdent.js +9 -0
- package/dist/editor/images/icons/outdent.js.map +1 -0
- package/dist/editor/images/icons/paint-bucket.d.ts +1 -0
- package/dist/editor/images/icons/paint-bucket.js +9 -0
- package/dist/editor/images/icons/paint-bucket.js.map +1 -0
- package/dist/editor/images/icons/palette.d.ts +1 -0
- package/dist/editor/images/icons/palette.js +9 -0
- package/dist/editor/images/icons/palette.js.map +1 -0
- package/dist/editor/images/icons/pencil-fill.d.ts +1 -0
- package/dist/editor/images/icons/pencil-fill.js +9 -0
- package/dist/editor/images/icons/pencil-fill.js.map +1 -0
- package/dist/editor/images/icons/plug-fill.d.ts +1 -0
- package/dist/editor/images/icons/plug-fill.js +9 -0
- package/dist/editor/images/icons/plug-fill.js.map +1 -0
- package/dist/editor/images/icons/plug.d.ts +1 -0
- package/dist/editor/images/icons/plug.js +9 -0
- package/dist/editor/images/icons/plug.js.map +1 -0
- package/dist/editor/images/icons/plus-slash-minus.d.ts +1 -0
- package/dist/editor/images/icons/plus-slash-minus.js +9 -0
- package/dist/editor/images/icons/plus-slash-minus.js.map +1 -0
- package/dist/editor/images/icons/plus.d.ts +1 -0
- package/dist/editor/images/icons/plus.js +9 -0
- package/dist/editor/images/icons/plus.js.map +1 -0
- package/dist/editor/images/icons/prettier-error.d.ts +1 -0
- package/dist/editor/images/icons/prettier-error.js +9 -0
- package/dist/editor/images/icons/prettier-error.js.map +1 -0
- package/dist/editor/images/icons/prettier.d.ts +1 -0
- package/dist/editor/images/icons/prettier.js +9 -0
- package/dist/editor/images/icons/prettier.js.map +1 -0
- package/dist/editor/images/icons/scissors.d.ts +1 -0
- package/dist/editor/images/icons/scissors.js +9 -0
- package/dist/editor/images/icons/scissors.js.map +1 -0
- package/dist/editor/images/icons/send.d.ts +1 -0
- package/dist/editor/images/icons/send.js +9 -0
- package/dist/editor/images/icons/send.js.map +1 -0
- package/dist/editor/images/icons/square-check.d.ts +1 -0
- package/dist/editor/images/icons/square-check.js +9 -0
- package/dist/editor/images/icons/square-check.js.map +1 -0
- package/dist/editor/images/icons/sticky.d.ts +1 -0
- package/dist/editor/images/icons/sticky.js +9 -0
- package/dist/editor/images/icons/sticky.js.map +1 -0
- package/dist/editor/images/icons/success-alt.d.ts +1 -0
- package/dist/editor/images/icons/success-alt.js +9 -0
- package/dist/editor/images/icons/success-alt.js.map +1 -0
- package/dist/editor/images/icons/success.d.ts +1 -0
- package/dist/editor/images/icons/success.js +9 -0
- package/dist/editor/images/icons/success.js.map +1 -0
- package/dist/editor/images/icons/table.d.ts +1 -0
- package/dist/editor/images/icons/table.js +9 -0
- package/dist/editor/images/icons/table.js.map +1 -0
- package/dist/editor/images/icons/text-center.d.ts +1 -0
- package/dist/editor/images/icons/text-center.js +9 -0
- package/dist/editor/images/icons/text-center.js.map +1 -0
- package/dist/editor/images/icons/text-left.d.ts +1 -0
- package/dist/editor/images/icons/text-left.js +9 -0
- package/dist/editor/images/icons/text-left.js.map +1 -0
- package/dist/editor/images/icons/text-paragraph.d.ts +1 -0
- package/dist/editor/images/icons/text-paragraph.js +9 -0
- package/dist/editor/images/icons/text-paragraph.js.map +1 -0
- package/dist/editor/images/icons/text-right.d.ts +1 -0
- package/dist/editor/images/icons/text-right.js +9 -0
- package/dist/editor/images/icons/text-right.js.map +1 -0
- package/dist/editor/images/icons/trash.d.ts +1 -0
- package/dist/editor/images/icons/trash.js +9 -0
- package/dist/editor/images/icons/trash.js.map +1 -0
- package/dist/editor/images/icons/trash3.d.ts +1 -0
- package/dist/editor/images/icons/trash3.js +9 -0
- package/dist/editor/images/icons/trash3.js.map +1 -0
- package/dist/editor/images/icons/type-bold.d.ts +1 -0
- package/dist/editor/images/icons/type-bold.js +9 -0
- package/dist/editor/images/icons/type-bold.js.map +1 -0
- package/dist/editor/images/icons/type-capitalize.d.ts +1 -0
- package/dist/editor/images/icons/type-capitalize.js +9 -0
- package/dist/editor/images/icons/type-capitalize.js.map +1 -0
- package/dist/editor/images/icons/type-h1.d.ts +1 -0
- package/dist/editor/images/icons/type-h1.js +9 -0
- package/dist/editor/images/icons/type-h1.js.map +1 -0
- package/dist/editor/images/icons/type-h2.d.ts +1 -0
- package/dist/editor/images/icons/type-h2.js +9 -0
- package/dist/editor/images/icons/type-h2.js.map +1 -0
- package/dist/editor/images/icons/type-h3.d.ts +1 -0
- package/dist/editor/images/icons/type-h3.js +9 -0
- package/dist/editor/images/icons/type-h3.js.map +1 -0
- package/dist/editor/images/icons/type-h4.d.ts +1 -0
- package/dist/editor/images/icons/type-h4.js +9 -0
- package/dist/editor/images/icons/type-h4.js.map +1 -0
- package/dist/editor/images/icons/type-h5.d.ts +1 -0
- package/dist/editor/images/icons/type-h5.js +9 -0
- package/dist/editor/images/icons/type-h5.js.map +1 -0
- package/dist/editor/images/icons/type-h6.d.ts +1 -0
- package/dist/editor/images/icons/type-h6.js +9 -0
- package/dist/editor/images/icons/type-h6.js.map +1 -0
- package/dist/editor/images/icons/type-italic.d.ts +1 -0
- package/dist/editor/images/icons/type-italic.js +9 -0
- package/dist/editor/images/icons/type-italic.js.map +1 -0
- package/dist/editor/images/icons/type-lowercase.d.ts +1 -0
- package/dist/editor/images/icons/type-lowercase.js +9 -0
- package/dist/editor/images/icons/type-lowercase.js.map +1 -0
- package/dist/editor/images/icons/type-strikethrough.d.ts +1 -0
- package/dist/editor/images/icons/type-strikethrough.js +9 -0
- package/dist/editor/images/icons/type-strikethrough.js.map +1 -0
- package/dist/editor/images/icons/type-subscript.d.ts +1 -0
- package/dist/editor/images/icons/type-subscript.js +9 -0
- package/dist/editor/images/icons/type-subscript.js.map +1 -0
- package/dist/editor/images/icons/type-superscript.d.ts +1 -0
- package/dist/editor/images/icons/type-superscript.js +9 -0
- package/dist/editor/images/icons/type-superscript.js.map +1 -0
- package/dist/editor/images/icons/type-underline.d.ts +1 -0
- package/dist/editor/images/icons/type-underline.js +9 -0
- package/dist/editor/images/icons/type-underline.js.map +1 -0
- package/dist/editor/images/icons/type-uppercase.d.ts +1 -0
- package/dist/editor/images/icons/type-uppercase.js +9 -0
- package/dist/editor/images/icons/type-uppercase.js.map +1 -0
- package/dist/editor/images/icons/upload.d.ts +1 -0
- package/dist/editor/images/icons/upload.js +9 -0
- package/dist/editor/images/icons/upload.js.map +1 -0
- package/dist/editor/images/icons/user.d.ts +1 -0
- package/dist/editor/images/icons/user.js +9 -0
- package/dist/editor/images/icons/user.js.map +1 -0
- package/dist/editor/images/icons/vertical-bottom.d.ts +1 -0
- package/dist/editor/images/icons/vertical-bottom.js +9 -0
- package/dist/editor/images/icons/vertical-bottom.js.map +1 -0
- package/dist/editor/images/icons/vertical-middle.d.ts +1 -0
- package/dist/editor/images/icons/vertical-middle.js +9 -0
- package/dist/editor/images/icons/vertical-middle.js.map +1 -0
- package/dist/editor/images/icons/vertical-top.d.ts +1 -0
- package/dist/editor/images/icons/vertical-top.js +9 -0
- package/dist/editor/images/icons/vertical-top.js.map +1 -0
- package/dist/editor/images/icons/x.d.ts +1 -0
- package/dist/editor/images/icons/x.js +9 -0
- package/dist/editor/images/icons/x.js.map +1 -0
- package/dist/editor/images/icons/youtube.d.ts +1 -0
- package/dist/editor/images/icons/youtube.js +9 -0
- package/dist/editor/images/icons/youtube.js.map +1 -0
- package/dist/editor/index.d.ts +1 -0
- package/dist/editor/index.js +6 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/nodes/Image/ImageComponent.d.ts +15 -0
- package/dist/editor/nodes/Image/ImageComponent.js +248 -0
- package/dist/editor/nodes/Image/ImageComponent.js.map +1 -0
- package/dist/editor/nodes/Image/ImageNode.d.ts +50 -0
- package/dist/editor/nodes/Image/ImageNode.js +128 -0
- package/dist/editor/nodes/Image/ImageNode.js.map +1 -0
- package/dist/editor/nodes/Image/imageNodeStyles.d.ts +1 -0
- package/dist/editor/nodes/Image/imageNodeStyles.js +41 -0
- package/dist/editor/nodes/Image/imageNodeStyles.js.map +1 -0
- package/dist/editor/nodes/Image/index.d.ts +3 -0
- package/dist/editor/nodes/Image/index.js +10 -0
- package/dist/editor/nodes/Image/index.js.map +1 -0
- package/dist/editor/nodes/InlineImage/InlineImageComponent.d.ts +18 -0
- package/dist/editor/nodes/InlineImage/InlineImageComponent.js +160 -0
- package/dist/editor/nodes/InlineImage/InlineImageComponent.js.map +1 -0
- package/dist/editor/nodes/InlineImage/InlineImageNode.d.ts +59 -0
- package/dist/editor/nodes/InlineImage/InlineImageNode.js +149 -0
- package/dist/editor/nodes/InlineImage/InlineImageNode.js.map +1 -0
- package/dist/editor/nodes/InlineImage/index.d.ts +3 -0
- package/dist/editor/nodes/InlineImage/index.js +10 -0
- package/dist/editor/nodes/InlineImage/index.js.map +1 -0
- package/dist/editor/nodes/InlineImage/inlineImageNodeStyles.d.ts +1 -0
- package/dist/editor/nodes/InlineImage/inlineImageNodeStyles.js +90 -0
- package/dist/editor/nodes/InlineImage/inlineImageNodeStyles.js.map +1 -0
- package/dist/editor/nodes/PlaygroundNodes.d.ts +2 -0
- package/dist/editor/nodes/PlaygroundNodes.js +32 -0
- package/dist/editor/nodes/PlaygroundNodes.js.map +1 -0
- package/dist/editor/nodes/Video/VideoComponent.d.ts +9 -0
- package/dist/editor/nodes/Video/VideoComponent.js +15 -0
- package/dist/editor/nodes/Video/VideoComponent.js.map +1 -0
- package/dist/editor/nodes/Video/VideoNode.d.ts +34 -0
- package/dist/editor/nodes/Video/VideoNode.js +129 -0
- package/dist/editor/nodes/Video/VideoNode.js.map +1 -0
- package/dist/editor/nodes/Video/index.d.ts +3 -0
- package/dist/editor/nodes/Video/index.js +10 -0
- package/dist/editor/nodes/Video/index.js.map +1 -0
- package/dist/editor/nodes/Video/videoNodeStyles.d.ts +1 -0
- package/dist/editor/nodes/Video/videoNodeStyles.js +44 -0
- package/dist/editor/nodes/Video/videoNodeStyles.js.map +1 -0
- package/dist/editor/nodes/index.d.ts +4 -0
- package/dist/editor/nodes/index.js +21 -0
- package/dist/editor/nodes/index.js.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/codeActionMenuPluginStyles.d.ts +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/codeActionMenuPluginStyles.js +68 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/codeActionMenuPluginStyles.js.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +7 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +48 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.js.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +9 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js +136 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/index.d.ts +2 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/index.js +19 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/components/index.js.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/index.d.ts +12 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/index.js +118 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/index.js.map +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/utils.d.ts +1 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/utils.js +15 -0
- package/dist/editor/plugins/CodeActionMenuPlugin/utils.js.map +1 -0
- package/dist/editor/plugins/CodeHighlightPlugin/index.d.ts +2 -0
- package/dist/editor/plugins/CodeHighlightPlugin/index.js +15 -0
- package/dist/editor/plugins/CodeHighlightPlugin/index.js.map +1 -0
- package/dist/editor/plugins/ComponentPickerPlugin/index.d.ts +9 -0
- package/dist/editor/plugins/ComponentPickerPlugin/index.js +217 -0
- package/dist/editor/plugins/ComponentPickerPlugin/index.js.map +1 -0
- package/dist/editor/plugins/ContextMenuPlugin/index.d.ts +18 -0
- package/dist/editor/plugins/ContextMenuPlugin/index.js +190 -0
- package/dist/editor/plugins/ContextMenuPlugin/index.js.map +1 -0
- package/dist/editor/plugins/FloatingLinkEditorPlugin/floatLinkEditorPluginStyles.d.ts +1 -0
- package/dist/editor/plugins/FloatingLinkEditorPlugin/floatLinkEditorPluginStyles.js +48 -0
- package/dist/editor/plugins/FloatingLinkEditorPlugin/floatLinkEditorPluginStyles.js.map +1 -0
- package/dist/editor/plugins/FloatingLinkEditorPlugin/index.d.ts +14 -0
- package/dist/editor/plugins/FloatingLinkEditorPlugin/index.js +275 -0
- package/dist/editor/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/floatTextFormatToolbarPluginStyles.d.ts +1 -0
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/floatTextFormatToolbarPluginStyles.js +141 -0
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/floatTextFormatToolbarPluginStyles.js.map +1 -0
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +15 -0
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/index.js +214 -0
- package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -0
- package/dist/editor/plugins/ImagesPlugin/index.d.ts +28 -0
- package/dist/editor/plugins/ImagesPlugin/index.js +175 -0
- package/dist/editor/plugins/ImagesPlugin/index.js.map +1 -0
- package/dist/editor/plugins/LinkPlugin/index.d.ts +9 -0
- package/dist/editor/plugins/LinkPlugin/index.js +14 -0
- package/dist/editor/plugins/LinkPlugin/index.js.map +1 -0
- package/dist/editor/plugins/MarkdownShortcutPlugin/index.d.ts +9 -0
- package/dist/editor/plugins/MarkdownShortcutPlugin/index.js +11 -0
- package/dist/editor/plugins/MarkdownShortcutPlugin/index.js.map +1 -0
- package/dist/editor/plugins/MarkdownTransformers/index.d.ts +5 -0
- package/dist/editor/plugins/MarkdownTransformers/index.js +181 -0
- package/dist/editor/plugins/MarkdownTransformers/index.js.map +1 -0
- package/dist/editor/plugins/MaxLengthPlugin/index.d.ts +10 -0
- package/dist/editor/plugins/MaxLengthPlugin/index.js +48 -0
- package/dist/editor/plugins/MaxLengthPlugin/index.js.map +1 -0
- package/dist/editor/plugins/ShortcutsPlugin/index.d.ts +13 -0
- package/dist/editor/plugins/ShortcutsPlugin/index.js +102 -0
- package/dist/editor/plugins/ShortcutsPlugin/index.js.map +1 -0
- package/dist/editor/plugins/ShortcutsPlugin/shortcuts.d.ts +56 -0
- package/dist/editor/plugins/ShortcutsPlugin/shortcuts.js +145 -0
- package/dist/editor/plugins/ShortcutsPlugin/shortcuts.js.map +1 -0
- package/dist/editor/plugins/TabFocusPlugin/index.d.ts +8 -0
- package/dist/editor/plugins/TabFocusPlugin/index.js +46 -0
- package/dist/editor/plugins/TabFocusPlugin/index.js.map +1 -0
- package/dist/editor/plugins/TableActionMenuPlugin/index.d.ts +12 -0
- package/dist/editor/plugins/TableActionMenuPlugin/index.js +371 -0
- package/dist/editor/plugins/TableActionMenuPlugin/index.js.map +1 -0
- package/dist/editor/plugins/TableCellResizer/index.d.ts +3 -0
- package/dist/editor/plugins/TableCellResizer/index.js +301 -0
- package/dist/editor/plugins/TableCellResizer/index.js.map +1 -0
- package/dist/editor/plugins/TableCellResizer/tableCellResizerPluginStyles.d.ts +1 -0
- package/dist/editor/plugins/TableCellResizer/tableCellResizerPluginStyles.js +18 -0
- package/dist/editor/plugins/TableCellResizer/tableCellResizerPluginStyles.js.map +1 -0
- package/dist/editor/plugins/TableHoverActionsPlugin/index.d.ts +11 -0
- package/dist/editor/plugins/TableHoverActionsPlugin/index.js +193 -0
- package/dist/editor/plugins/TableHoverActionsPlugin/index.js.map +1 -0
- package/dist/editor/plugins/TablePlugin.d.ts +38 -0
- package/dist/editor/plugins/TablePlugin.js +77 -0
- package/dist/editor/plugins/TablePlugin.js.map +1 -0
- package/dist/editor/plugins/ToolbarPlugin/index.d.ts +19 -0
- package/dist/editor/plugins/ToolbarPlugin/index.js +199 -0
- package/dist/editor/plugins/ToolbarPlugin/index.js.map +1 -0
- package/dist/editor/plugins/ToolbarPlugin/utils.d.ts +22 -0
- package/dist/editor/plugins/ToolbarPlugin/utils.js +224 -0
- package/dist/editor/plugins/ToolbarPlugin/utils.js.map +1 -0
- package/dist/editor/plugins/VideoPlugin/index.d.ts +7 -0
- package/dist/editor/plugins/VideoPlugin/index.js +61 -0
- package/dist/editor/plugins/VideoPlugin/index.js.map +1 -0
- package/dist/editor/plugins/index.d.ts +19 -0
- package/dist/editor/plugins/index.js +36 -0
- package/dist/editor/plugins/index.js.map +1 -0
- package/dist/editor/themes/index.d.ts +1 -0
- package/dist/editor/themes/index.js +6 -0
- package/dist/editor/themes/index.js.map +1 -0
- package/dist/editor/themes/playgroundEditorTheme.d.ts +2 -0
- package/dist/editor/themes/playgroundEditorTheme.js +116 -0
- package/dist/editor/themes/playgroundEditorTheme.js.map +1 -0
- package/dist/editor/themes/playgroundEditorThemeStyles.d.ts +1 -0
- package/dist/editor/themes/playgroundEditorThemeStyles.js +702 -0
- package/dist/editor/themes/playgroundEditorThemeStyles.js.map +1 -0
- package/dist/editor/types/index.d.ts +19 -0
- package/dist/editor/types/index.js +3 -0
- package/dist/editor/types/index.js.map +1 -0
- package/dist/editor/ui/BlockFormatDropdown/index.d.ts +18 -0
- package/dist/editor/ui/BlockFormatDropdown/index.js +73 -0
- package/dist/editor/ui/BlockFormatDropdown/index.js.map +1 -0
- package/dist/editor/ui/BoldButton/index.d.ts +7 -0
- package/dist/editor/ui/BoldButton/index.js +14 -0
- package/dist/editor/ui/BoldButton/index.js.map +1 -0
- package/dist/editor/ui/Button.d.ts +12 -0
- package/dist/editor/ui/Button.js +38 -0
- package/dist/editor/ui/Button.js.map +1 -0
- package/dist/editor/ui/CenterAlignButton/index.d.ts +7 -0
- package/dist/editor/ui/CenterAlignButton/index.js +14 -0
- package/dist/editor/ui/CenterAlignButton/index.js.map +1 -0
- package/dist/editor/ui/ClearEditorButton/index.d.ts +7 -0
- package/dist/editor/ui/ClearEditorButton/index.js +10 -0
- package/dist/editor/ui/ClearEditorButton/index.js.map +1 -0
- package/dist/editor/ui/ClearFormattingButton/index.d.ts +7 -0
- package/dist/editor/ui/ClearFormattingButton/index.js +10 -0
- package/dist/editor/ui/ClearFormattingButton/index.js.map +1 -0
- package/dist/editor/ui/CodeButton/index.d.ts +7 -0
- package/dist/editor/ui/CodeButton/index.js +14 -0
- package/dist/editor/ui/CodeButton/index.js.map +1 -0
- package/dist/editor/ui/CodeLanguageDropdown/index.d.ts +10 -0
- package/dist/editor/ui/CodeLanguageDropdown/index.js +26 -0
- package/dist/editor/ui/CodeLanguageDropdown/index.js.map +1 -0
- package/dist/editor/ui/ContentEditable.d.ts +9 -0
- package/dist/editor/ui/ContentEditable.js +63 -0
- package/dist/editor/ui/ContentEditable.js.map +1 -0
- package/dist/editor/ui/Dialog.d.ts +10 -0
- package/dist/editor/ui/Dialog.js +33 -0
- package/dist/editor/ui/Dialog.js.map +1 -0
- package/dist/editor/ui/Divider/index.d.ts +2 -0
- package/dist/editor/ui/Divider/index.js +9 -0
- package/dist/editor/ui/Divider/index.js.map +1 -0
- package/dist/editor/ui/DropDown.d.ts +16 -0
- package/dist/editor/ui/DropDown.js +141 -0
- package/dist/editor/ui/DropDown.js.map +1 -0
- package/dist/editor/ui/FlashMessage.d.ts +6 -0
- package/dist/editor/ui/FlashMessage.js +32 -0
- package/dist/editor/ui/FlashMessage.js.map +1 -0
- package/dist/editor/ui/HorizontalRuleButton/index.d.ts +3 -0
- package/dist/editor/ui/HorizontalRuleButton/index.js +13 -0
- package/dist/editor/ui/HorizontalRuleButton/index.js.map +1 -0
- package/dist/editor/ui/ImageButton/index.d.ts +8 -0
- package/dist/editor/ui/ImageButton/index.js +13 -0
- package/dist/editor/ui/ImageButton/index.js.map +1 -0
- package/dist/editor/ui/ImageResizer.d.ts +17 -0
- package/dist/editor/ui/ImageResizer.js +174 -0
- package/dist/editor/ui/ImageResizer.js.map +1 -0
- package/dist/editor/ui/ItalicButton/index.d.ts +7 -0
- package/dist/editor/ui/ItalicButton/index.js +14 -0
- package/dist/editor/ui/ItalicButton/index.js.map +1 -0
- package/dist/editor/ui/LeftAlignButton/index.d.ts +7 -0
- package/dist/editor/ui/LeftAlignButton/index.js +14 -0
- package/dist/editor/ui/LeftAlignButton/index.js.map +1 -0
- package/dist/editor/ui/LinkButton/index.d.ts +8 -0
- package/dist/editor/ui/LinkButton/index.js +11 -0
- package/dist/editor/ui/LinkButton/index.js.map +1 -0
- package/dist/editor/ui/Modal.d.ts +9 -0
- package/dist/editor/ui/Modal.js +110 -0
- package/dist/editor/ui/Modal.js.map +1 -0
- package/dist/editor/ui/RedoButton/index.d.ts +3 -0
- package/dist/editor/ui/RedoButton/index.js +14 -0
- package/dist/editor/ui/RedoButton/index.js.map +1 -0
- package/dist/editor/ui/RightAlignButton/index.d.ts +7 -0
- package/dist/editor/ui/RightAlignButton/index.js +14 -0
- package/dist/editor/ui/RightAlignButton/index.js.map +1 -0
- package/dist/editor/ui/Select.d.ts +8 -0
- package/dist/editor/ui/Select.js +52 -0
- package/dist/editor/ui/Select.js.map +1 -0
- package/dist/editor/ui/StrikethroughButton/index.d.ts +7 -0
- package/dist/editor/ui/StrikethroughButton/index.js +14 -0
- package/dist/editor/ui/StrikethroughButton/index.js.map +1 -0
- package/dist/editor/ui/TableButton/index.d.ts +8 -0
- package/dist/editor/ui/TableButton/index.js +13 -0
- package/dist/editor/ui/TableButton/index.js.map +1 -0
- package/dist/editor/ui/TextInput.d.ts +13 -0
- package/dist/editor/ui/TextInput.js +36 -0
- package/dist/editor/ui/TextInput.js.map +1 -0
- package/dist/editor/ui/UnderlineButton/index.d.ts +7 -0
- package/dist/editor/ui/UnderlineButton/index.js +14 -0
- package/dist/editor/ui/UnderlineButton/index.js.map +1 -0
- package/dist/editor/ui/UndoButton/index.d.ts +3 -0
- package/dist/editor/ui/UndoButton/index.js +14 -0
- package/dist/editor/ui/UndoButton/index.js.map +1 -0
- package/dist/editor/ui/VideoButton/index.d.ts +8 -0
- package/dist/editor/ui/VideoButton/index.js +13 -0
- package/dist/editor/ui/VideoButton/index.js.map +1 -0
- package/dist/editor/ui/index.d.ts +30 -0
- package/dist/editor/ui/index.js +74 -0
- package/dist/editor/ui/index.js.map +1 -0
- package/dist/editor/utils/dropDownActiveClass.d.ts +1 -0
- package/dist/editor/utils/dropDownActiveClass.js +12 -0
- package/dist/editor/utils/dropDownActiveClass.js.map +1 -0
- package/dist/editor/utils/getDOMRangeRect.d.ts +1 -0
- package/dist/editor/utils/getDOMRangeRect.js +19 -0
- package/dist/editor/utils/getDOMRangeRect.js.map +1 -0
- package/dist/editor/utils/getSelectedNode.d.ts +2 -0
- package/dist/editor/utils/getSelectedNode.js +21 -0
- package/dist/editor/utils/getSelectedNode.js.map +1 -0
- package/dist/editor/utils/getThemeSelector.d.ts +2 -0
- package/dist/editor/utils/getThemeSelector.js +15 -0
- package/dist/editor/utils/getThemeSelector.js.map +1 -0
- package/dist/editor/utils/index.d.ts +9 -0
- package/dist/editor/utils/index.js +26 -0
- package/dist/editor/utils/index.js.map +1 -0
- package/dist/editor/utils/joinClasses.d.ts +1 -0
- package/dist/editor/utils/joinClasses.js +8 -0
- package/dist/editor/utils/joinClasses.js.map +1 -0
- package/dist/editor/utils/parseVideoUrl.d.ts +15 -0
- package/dist/editor/utils/parseVideoUrl.js +115 -0
- package/dist/editor/utils/parseVideoUrl.js.map +1 -0
- package/dist/editor/utils/setFloatingElemPosition.d.ts +1 -0
- package/dist/editor/utils/setFloatingElemPosition.js +47 -0
- package/dist/editor/utils/setFloatingElemPosition.js.map +1 -0
- package/dist/editor/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
- package/dist/editor/utils/setFloatingElemPositionForLinkEditor.js +29 -0
- package/dist/editor/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
- package/dist/editor/utils/url.d.ts +2 -0
- package/dist/editor/utils/url.js +25 -0
- package/dist/editor/utils/url.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/eslint.config.mjs +27 -0
- package/package.json +110 -0
- package/tsconfig.eslint.json +10 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-strikethrough.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/type-strikethrough.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,OAAO,CACL,gCAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,cAAc,EAAC,SAAS,EAAC,0BAA0B,YACrH,iCAAM,CAAC,EAAC,uaAAua,GAAG,GAC9a,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,qBAAqB,yBAMhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TypeSubscriptIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeSubscriptIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const TypeSubscriptIcon = () => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: "16", height: "16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M11.354 14.5v-.665l1.553-1.438c.132-.128.243-.243.332-.345.091-.102.16-.203.207-.3.047-.1.07-.207.07-.322a.574.574 0 0 0-.326-.546.748.748 0 0 0-.343-.077.721.721 0 0 0-.35.082.557.557 0 0 0-.23.232.753.753 0 0 0-.08.36h-.876c0-.286.065-.534.194-.744.13-.21.31-.373.543-.488.233-.115.502-.172.806-.172.312 0 .584.055.816.166.233.11.414.261.543.456.13.194.194.418.194.669 0 .165-.033.327-.098.488-.064.16-.178.339-.343.535a7.918 7.918 0 0 1-.697.7l-.637.625v.03h1.832v.754h-3.11ZM5.04 4.273 6.96 7.469h.068l1.93-3.196h1.803L8.073 8.636 10.805 13H8.972L7.03 9.825h-.068L5.018 13H3.194l2.757-4.364-2.723-4.363H5.04Z", fill: "currentColor" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.TypeSubscriptIcon = TypeSubscriptIcon;
|
|
9
|
+
//# sourceMappingURL=type-subscript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-subscript.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/type-subscript.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,OAAO,CACL,gCAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,YACxE,iCAAM,CAAC,EAAC,smBAAsmB,EAAC,IAAI,EAAC,cAAc,GAAG,GACjoB,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,iBAAiB,qBAM5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TypeSuperscriptIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeSuperscriptIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const TypeSuperscriptIcon = () => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: "16", height: "16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M11.354 6v-.665l1.553-1.438c.132-.128.243-.243.332-.345a1.31 1.31 0 0 0 .207-.3c.047-.1.07-.207.07-.322a.574.574 0 0 0-.326-.545.748.748 0 0 0-.343-.077.721.721 0 0 0-.35.08.557.557 0 0 0-.23.233.753.753 0 0 0-.08.36h-.876c0-.286.065-.534.194-.744.13-.21.31-.373.543-.488.233-.115.502-.172.806-.172.312 0 .584.055.816.166.233.11.414.261.543.456.13.194.194.417.194.669 0 .165-.033.327-.098.488-.064.16-.178.339-.343.535a7.92 7.92 0 0 1-.697.7l-.637.625v.03h1.832V6h-3.11ZM5.04 4.273 6.96 7.469h.068l1.93-3.196h1.803L8.073 8.636 10.805 13H8.972L7.03 9.825h-.068L5.018 13H3.194l2.757-4.364-2.723-4.363H5.04Z", fill: "currentColor" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.TypeSuperscriptIcon = TypeSuperscriptIcon;
|
|
9
|
+
//# sourceMappingURL=type-superscript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-superscript.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/type-superscript.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,OAAO,CACL,gCAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,YACxE,iCAAM,CAAC,EAAC,8lBAA8lB,EAAC,IAAI,EAAC,cAAc,GAAG,GACznB,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,mBAAmB,uBAM9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TypeUnderlineIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeUnderlineIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const TypeUnderlineIcon = () => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "currentColor", className: "bi bi-type-underline", children: (0, jsx_runtime_1.jsx)("path", { d: "M5.313 3.136h-1.23V9.54c0 2.105 1.47 3.623 3.917 3.623s3.917-1.518 3.917-3.623V3.136h-1.23v6.323c0 1.49-.978 2.57-2.687 2.57-1.709 0-2.687-1.08-2.687-2.57V3.136zM12.5 15h-9v-1h9v1z" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.TypeUnderlineIcon = TypeUnderlineIcon;
|
|
9
|
+
//# sourceMappingURL=type-underline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-underline.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/type-underline.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,OAAO,CACL,gCAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,cAAc,EAAC,SAAS,EAAC,sBAAsB,YACjH,iCAAM,CAAC,EAAC,sLAAsL,GAAG,GAC7L,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,iBAAiB,qBAM5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TypeUppercaseIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeUppercaseIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const TypeUppercaseIcon = () => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "currentColor", className: "bi bi-alphabet-uppercase", viewBox: "0 0 16 16", children: (0, jsx_runtime_1.jsx)("path", { d: "M1.226 10.88H0l2.056-6.26h1.42l2.047 6.26h-1.29l-.48-1.61H1.707l-.48 1.61ZM2.76 5.818h-.054l-.75 2.532H3.51zm3.217 5.062V4.62h2.56c1.09 0 1.808.582 1.808 1.54 0 .762-.444 1.22-1.05 1.372v.055c.736.074 1.365.587 1.365 1.528 0 1.119-.89 1.766-2.133 1.766zM7.18 5.55v1.675h.8c.812 0 1.171-.308 1.171-.853 0-.51-.328-.822-.898-.822zm0 2.537V9.95h.903c.951 0 1.342-.312 1.342-.909 0-.591-.382-.954-1.095-.954zm5.089-.711v.775c0 1.156.49 1.803 1.347 1.803.705 0 1.163-.454 1.212-1.096H16v.12C15.942 10.173 14.95 11 13.607 11c-1.648 0-2.573-1.073-2.573-2.849v-.78c0-1.775.934-2.871 2.573-2.871 1.347 0 2.34.849 2.393 2.087v.115h-1.172c-.05-.665-.516-1.156-1.212-1.156-.849 0-1.347.67-1.347 1.83" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.TypeUppercaseIcon = TypeUppercaseIcon;
|
|
9
|
+
//# sourceMappingURL=type-uppercase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-uppercase.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/type-uppercase.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,OAAO,CACL,gCAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,cAAc,EAAC,SAAS,EAAC,0BAA0B,EAAC,OAAO,EAAC,WAAW,YACzI,iCAAM,CAAC,EAAC,irBAAirB,GAAG,GACxrB,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,iBAAiB,qBAM5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UploadIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UploadIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const UploadIcon = () => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "currentColor", className: "bi bi-upload", children: [(0, jsx_runtime_1.jsx)("path", { d: "M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z" }), (0, jsx_runtime_1.jsx)("path", { d: "M7.646 1.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 2.707V11.5a.5.5 0 0 1-1 0V2.707L5.354 4.854a.5.5 0 1 1-.708-.708l3-3z" })] }));
|
|
7
|
+
};
|
|
8
|
+
exports.UploadIcon = UploadIcon;
|
|
9
|
+
//# sourceMappingURL=upload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/upload.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,OAAO,CACL,iCAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,cAAc,EAAC,SAAS,EAAC,cAAc,aACzG,iCAAM,CAAC,EAAC,yIAAyI,GAAG,EACpJ,iCAAM,CAAC,EAAC,kIAAkI,GAAG,IACzI,CACP,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,UAAU,cAOrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UserIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const UserIcon = () => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: (0, jsx_runtime_1.jsx)("path", { d: "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256 256-114.6 256-256S397.4 0 256 0zm0 128c39.77 0 72 32.24 72 72s-32.2 72-72 72c-39.76 0-72-32.24-72-72s32.2-72 72-72zm0 320c-52.93 0-100.9-21.53-135.7-56.29C136.5 349.9 176.5 320 224 320h64c47.54 0 87.54 29.88 103.7 71.71C356.9 426.5 308.9 448 256 448z" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.UserIcon = UserIcon;
|
|
9
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/user.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,OAAO,CACL,gCAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,YAC3D,iCAAM,CAAC,EAAC,2SAA2S,GAAG,GAClT,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,QAAQ,YAMnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VerticalBottomIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerticalBottomIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const VerticalBottomIcon = () => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { className: "icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "64", height: "64", children: (0, jsx_runtime_1.jsx)("path", { d: "M859.9 780H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM505.7 669c3.2 4.1 9.4 4.1 12.6 0l112-141.7c4.1-5.2 0.4-12.9-6.3-12.9h-74.1V176c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8z" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.VerticalBottomIcon = VerticalBottomIcon;
|
|
9
|
+
//# sourceMappingURL=vertical-bottom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vertical-bottom.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/vertical-bottom.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO,CACL,gCAAK,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,eAAe,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,YACnH,iCAAM,CAAC,EAAC,+QAA+Q,GAAG,GACtR,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,kBAAkB,sBAM7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VerticalMiddleIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerticalMiddleIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const VerticalMiddleIcon = () => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { className: "icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "64", height: "64", children: (0, jsx_runtime_1.jsx)("path", { d: "M859.9 474H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM506.3 399.3c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7 0.4-11.7-5.7-11.7H550V104c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v156h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.6zM517.7 624.7c-2.9-3.7-8.5-3.7-11.3 0L405.6 752.3c-3.7 4.7-0.4 11.7 5.7 11.7H474v156c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V764h62.8c6 0 9.4-7 5.7-11.7L517.7 624.7z" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.VerticalMiddleIcon = VerticalMiddleIcon;
|
|
9
|
+
//# sourceMappingURL=vertical-middle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vertical-middle.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/vertical-middle.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO,CACL,gCAAK,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,eAAe,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,YACnH,iCAAM,CAAC,EAAC,6aAA6a,GAAG,GACpb,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,kBAAkB,sBAM7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VerticalTopIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerticalTopIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const VerticalTopIcon = () => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { className: "icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "64", height: "64", children: (0, jsx_runtime_1.jsx)("path", { d: "M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355c-3.2-4.1-9.4-4.1-12.6 0l-112 141.7c-4.1 5.2-0.4 12.9 6.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.VerticalTopIcon = VerticalTopIcon;
|
|
9
|
+
//# sourceMappingURL=vertical-top.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vertical-top.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/vertical-top.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,OAAO,CACL,gCAAK,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,eAAe,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,YACnH,iCAAM,CAAC,EAAC,8QAA8Q,GAAG,GACrR,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,eAAe,mBAM1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const XIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.XIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const XIcon = () => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", children: (0, jsx_runtime_1.jsx)("path", { d: "M 9.398438 6.878906 L 14.859375 0.667969 L 13.5625 0.667969 L 8.820312 6.058594 L 5.035156 0.667969 L 0.667969 0.667969 L 6.394531 8.820312 L 0.667969 15.332031 L 1.960938 15.332031 L 6.964844 9.636719 L 10.964844 15.332031 L 15.332031 15.332031 Z M 7.625 8.890625 L 7.042969 8.078125 L 2.425781 1.621094 L 4.414062 1.621094 L 8.140625 6.835938 L 8.71875 7.648438 L 13.5625 14.425781 L 11.574219 14.425781 Z M 7.625 8.890625" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.XIcon = XIcon;
|
|
9
|
+
//# sourceMappingURL=x.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/x.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,KAAK,GAAG,GAAG,EAAE;IACxB,OAAO,CACL,gCAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,YAChF,iCAAM,CAAC,EAAC,0aAA0a,GAAG,GACjb,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,KAAK,SAMhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const YoutubeIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.YoutubeIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const YoutubeIcon = () => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "currentColor", className: "bi bi-youtube", children: (0, jsx_runtime_1.jsx)("path", { d: "M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 0 1 1.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 0 1-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 0 1-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 0 1 0 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 0 1 1.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 0 1 7.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.YoutubeIcon = YoutubeIcon;
|
|
9
|
+
//# sourceMappingURL=youtube.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"youtube.js","sourceRoot":"","sources":["../../../../src/editor/images/icons/youtube.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,OAAO,CACL,gCAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,cAAc,EAAC,SAAS,EAAC,eAAe,YAC1G,iCAAM,CAAC,EAAC,2wBAA2wB,GAAG,GAClxB,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,WAAW,eAMtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Editor, type IEditorProps } from "./Editor";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Editor = void 0;
|
|
4
|
+
var Editor_1 = require("./Editor");
|
|
5
|
+
Object.defineProperty(exports, "Editor", { enumerable: true, get: function () { return Editor_1.Editor; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editor/index.ts"],"names":[],"mappings":";;;AAAA,mCAAqD;AAA5C,gGAAA,MAAM,OAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LexicalCommand, LexicalEditor, NodeKey } from "lexical";
|
|
2
|
+
import { type JSX } from "react";
|
|
3
|
+
export declare const RIGHT_CLICK_IMAGE_COMMAND: LexicalCommand<MouseEvent>;
|
|
4
|
+
export declare const ImageComponent: ({ src, altText, nodeKey, width, height, maxWidth, resizable, showCaption, caption, captionsEnabled, }: {
|
|
5
|
+
altText: string;
|
|
6
|
+
caption: LexicalEditor;
|
|
7
|
+
height: "inherit" | number;
|
|
8
|
+
maxWidth: number;
|
|
9
|
+
nodeKey: NodeKey;
|
|
10
|
+
resizable: boolean;
|
|
11
|
+
showCaption: boolean;
|
|
12
|
+
src: string;
|
|
13
|
+
width: "inherit" | number;
|
|
14
|
+
captionsEnabled: boolean;
|
|
15
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ImageComponent = exports.RIGHT_CLICK_IMAGE_COMMAND = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const lexical_1 = require("lexical");
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const LexicalAutoFocusPlugin_1 = require("@lexical/react/LexicalAutoFocusPlugin");
|
|
11
|
+
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
12
|
+
const LexicalErrorBoundary_1 = require("@lexical/react/LexicalErrorBoundary");
|
|
13
|
+
const LexicalHistoryPlugin_1 = require("@lexical/react/LexicalHistoryPlugin");
|
|
14
|
+
const LexicalNestedComposer_1 = require("@lexical/react/LexicalNestedComposer");
|
|
15
|
+
const LexicalRichTextPlugin_1 = require("@lexical/react/LexicalRichTextPlugin");
|
|
16
|
+
const useLexicalEditable_1 = require("@lexical/react/useLexicalEditable");
|
|
17
|
+
const useLexicalNodeSelection_1 = require("@lexical/react/useLexicalNodeSelection");
|
|
18
|
+
const utils_1 = require("@lexical/utils");
|
|
19
|
+
const context_1 = require("../../context");
|
|
20
|
+
const image_broken_svg_1 = __importDefault(require("../../images/image-broken.svg"));
|
|
21
|
+
const plugins_1 = require("../../plugins");
|
|
22
|
+
const ui_1 = require("../../ui");
|
|
23
|
+
const ImageNode_1 = require("./ImageNode");
|
|
24
|
+
const imageCache = new Set();
|
|
25
|
+
exports.RIGHT_CLICK_IMAGE_COMMAND = (0, lexical_1.createCommand)("RIGHT_CLICK_IMAGE_COMMAND");
|
|
26
|
+
const useSuspenseImage = (src) => {
|
|
27
|
+
if (!imageCache.has(src)) {
|
|
28
|
+
throw new Promise(resolve => {
|
|
29
|
+
const img = new Image();
|
|
30
|
+
img.src = src;
|
|
31
|
+
img.onload = () => {
|
|
32
|
+
imageCache.add(src);
|
|
33
|
+
resolve(null);
|
|
34
|
+
};
|
|
35
|
+
img.onerror = () => {
|
|
36
|
+
imageCache.add(src);
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const isSVG = (src) => {
|
|
42
|
+
return src.toLowerCase().endsWith(".svg");
|
|
43
|
+
};
|
|
44
|
+
const LazyImage = ({ altText, className, imageRef, src, width, height, maxWidth, onError, }) => {
|
|
45
|
+
useSuspenseImage(src);
|
|
46
|
+
const [dimensions, setDimensions] = (0, react_1.useState)(null);
|
|
47
|
+
const isSVGImage = isSVG(src);
|
|
48
|
+
// Set initial dimensions for SVG images
|
|
49
|
+
(0, react_1.useEffect)(() => {
|
|
50
|
+
if (imageRef.current && isSVGImage) {
|
|
51
|
+
const { naturalWidth, naturalHeight } = imageRef.current;
|
|
52
|
+
setDimensions({
|
|
53
|
+
height: naturalHeight,
|
|
54
|
+
width: naturalWidth,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}, [imageRef, isSVGImage]);
|
|
58
|
+
// Calculate final dimensions with proper scaling
|
|
59
|
+
const calculateDimensions = () => {
|
|
60
|
+
if (!isSVGImage) {
|
|
61
|
+
return {
|
|
62
|
+
height,
|
|
63
|
+
maxWidth,
|
|
64
|
+
width,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
// Use natural dimensions if available, otherwise fallback to defaults
|
|
68
|
+
const naturalWidth = (dimensions === null || dimensions === void 0 ? void 0 : dimensions.width) || 200;
|
|
69
|
+
const naturalHeight = (dimensions === null || dimensions === void 0 ? void 0 : dimensions.height) || 200;
|
|
70
|
+
let finalWidth = naturalWidth;
|
|
71
|
+
let finalHeight = naturalHeight;
|
|
72
|
+
// Scale down if width exceeds maxWidth while maintaining aspect ratio
|
|
73
|
+
if (finalWidth > maxWidth) {
|
|
74
|
+
const scale = maxWidth / finalWidth;
|
|
75
|
+
finalWidth = maxWidth;
|
|
76
|
+
finalHeight = Math.round(finalHeight * scale);
|
|
77
|
+
}
|
|
78
|
+
// Scale down if height exceeds maxHeight while maintaining aspect ratio
|
|
79
|
+
const maxHeight = 500;
|
|
80
|
+
if (finalHeight > maxHeight) {
|
|
81
|
+
const scale = maxHeight / finalHeight;
|
|
82
|
+
finalHeight = maxHeight;
|
|
83
|
+
finalWidth = Math.round(finalWidth * scale);
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
height: finalHeight,
|
|
87
|
+
maxWidth,
|
|
88
|
+
width: finalWidth,
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
const imageStyle = calculateDimensions();
|
|
92
|
+
return ((0, jsx_runtime_1.jsx)("img", { className: className || undefined, src: src, alt: altText, ref: imageRef, style: imageStyle, onError: onError, draggable: "false", onLoad: e => {
|
|
93
|
+
if (isSVGImage) {
|
|
94
|
+
const img = e.currentTarget;
|
|
95
|
+
setDimensions({
|
|
96
|
+
height: img.naturalHeight,
|
|
97
|
+
width: img.naturalWidth,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
} }));
|
|
101
|
+
};
|
|
102
|
+
const BrokenImage = () => {
|
|
103
|
+
return ((0, jsx_runtime_1.jsx)("img", { src: image_broken_svg_1.default, style: {
|
|
104
|
+
height: 200,
|
|
105
|
+
opacity: 0.2,
|
|
106
|
+
width: 200,
|
|
107
|
+
}, draggable: "false", alt: "#" }));
|
|
108
|
+
};
|
|
109
|
+
const ImageComponent = ({ src, altText, nodeKey, width, height, maxWidth, resizable, showCaption, caption, captionsEnabled, }) => {
|
|
110
|
+
const imageRef = (0, react_1.useRef)(null);
|
|
111
|
+
const buttonRef = (0, react_1.useRef)(null);
|
|
112
|
+
const [isSelected, setSelected, clearSelection] = (0, useLexicalNodeSelection_1.useLexicalNodeSelection)(nodeKey);
|
|
113
|
+
const [isResizing, setIsResizing] = (0, react_1.useState)(false);
|
|
114
|
+
const [editor] = (0, LexicalComposerContext_1.useLexicalComposerContext)();
|
|
115
|
+
const [selection, setSelection] = (0, react_1.useState)(null);
|
|
116
|
+
const activeEditorRef = (0, react_1.useRef)(null);
|
|
117
|
+
const [isLoadError, setIsLoadError] = (0, react_1.useState)(false);
|
|
118
|
+
const isEditable = (0, useLexicalEditable_1.useLexicalEditable)();
|
|
119
|
+
const $onEnter = (0, react_1.useCallback)((event) => {
|
|
120
|
+
const latestSelection = (0, lexical_1.$getSelection)();
|
|
121
|
+
const buttonElem = buttonRef.current;
|
|
122
|
+
if (isSelected && (0, lexical_1.$isNodeSelection)(latestSelection) && latestSelection.getNodes().length === 1) {
|
|
123
|
+
if (showCaption) {
|
|
124
|
+
// Move focus into nested editor
|
|
125
|
+
(0, lexical_1.$setSelection)(null);
|
|
126
|
+
event.preventDefault();
|
|
127
|
+
caption.focus();
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
else if (buttonElem !== null && buttonElem !== document.activeElement) {
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
buttonElem.focus();
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return false;
|
|
137
|
+
}, [caption, isSelected, showCaption]);
|
|
138
|
+
const $onEscape = (0, react_1.useCallback)((event) => {
|
|
139
|
+
if (activeEditorRef.current === caption || buttonRef.current === event.target) {
|
|
140
|
+
(0, lexical_1.$setSelection)(null);
|
|
141
|
+
editor.update(() => {
|
|
142
|
+
setSelected(true);
|
|
143
|
+
const parentRootElement = editor.getRootElement();
|
|
144
|
+
if (parentRootElement !== null) {
|
|
145
|
+
parentRootElement.focus();
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
return false;
|
|
151
|
+
}, [caption, editor, setSelected]);
|
|
152
|
+
const onClick = (0, react_1.useCallback)((payload) => {
|
|
153
|
+
const event = payload;
|
|
154
|
+
if (isResizing) {
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
if (event.target === imageRef.current) {
|
|
158
|
+
if (event.shiftKey) {
|
|
159
|
+
setSelected(!isSelected);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
clearSelection();
|
|
163
|
+
setSelected(true);
|
|
164
|
+
}
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
return false;
|
|
168
|
+
}, [isResizing, isSelected, setSelected, clearSelection]);
|
|
169
|
+
const onRightClick = (0, react_1.useCallback)((event) => {
|
|
170
|
+
editor.getEditorState().read(() => {
|
|
171
|
+
const latestSelection = (0, lexical_1.$getSelection)();
|
|
172
|
+
const domElement = event.target;
|
|
173
|
+
if (domElement.tagName === "IMG" &&
|
|
174
|
+
(0, lexical_1.$isRangeSelection)(latestSelection) &&
|
|
175
|
+
latestSelection.getNodes().length === 1) {
|
|
176
|
+
editor.dispatchCommand(exports.RIGHT_CLICK_IMAGE_COMMAND, event);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}, [editor]);
|
|
180
|
+
(0, react_1.useEffect)(() => {
|
|
181
|
+
const rootElement = editor.getRootElement();
|
|
182
|
+
const unregister = (0, utils_1.mergeRegister)(editor.registerUpdateListener(({ editorState }) => {
|
|
183
|
+
const updatedSelection = editorState.read(() => (0, lexical_1.$getSelection)());
|
|
184
|
+
if ((0, lexical_1.$isNodeSelection)(updatedSelection)) {
|
|
185
|
+
setSelection(updatedSelection);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
setSelection(null);
|
|
189
|
+
}
|
|
190
|
+
}), editor.registerCommand(lexical_1.SELECTION_CHANGE_COMMAND, (_, activeEditor) => {
|
|
191
|
+
activeEditorRef.current = activeEditor;
|
|
192
|
+
return false;
|
|
193
|
+
}, lexical_1.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical_1.CLICK_COMMAND, onClick, lexical_1.COMMAND_PRIORITY_LOW), editor.registerCommand(exports.RIGHT_CLICK_IMAGE_COMMAND, onClick, lexical_1.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical_1.DRAGSTART_COMMAND, event => {
|
|
194
|
+
if (event.target === imageRef.current) {
|
|
195
|
+
// TODO This is just a temporary workaround for FF to behave like other browsers.
|
|
196
|
+
// Ideally, this handles drag & drop too (and all browsers).
|
|
197
|
+
event.preventDefault();
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
return false;
|
|
201
|
+
}, lexical_1.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical_1.KEY_ENTER_COMMAND, $onEnter, lexical_1.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical_1.KEY_ESCAPE_COMMAND, $onEscape, lexical_1.COMMAND_PRIORITY_LOW));
|
|
202
|
+
rootElement === null || rootElement === void 0 ? void 0 : rootElement.addEventListener("contextmenu", onRightClick);
|
|
203
|
+
return () => {
|
|
204
|
+
unregister();
|
|
205
|
+
rootElement === null || rootElement === void 0 ? void 0 : rootElement.removeEventListener("contextmenu", onRightClick);
|
|
206
|
+
};
|
|
207
|
+
}, [
|
|
208
|
+
clearSelection,
|
|
209
|
+
editor,
|
|
210
|
+
isResizing,
|
|
211
|
+
isSelected,
|
|
212
|
+
nodeKey,
|
|
213
|
+
$onEnter,
|
|
214
|
+
$onEscape,
|
|
215
|
+
onClick,
|
|
216
|
+
onRightClick,
|
|
217
|
+
setSelected,
|
|
218
|
+
]);
|
|
219
|
+
const setShowCaption = () => {
|
|
220
|
+
editor.update(() => {
|
|
221
|
+
const node = (0, lexical_1.$getNodeByKey)(nodeKey);
|
|
222
|
+
if ((0, ImageNode_1.$isImageNode)(node)) {
|
|
223
|
+
node.setShowCaption(true);
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
};
|
|
227
|
+
const onResizeEnd = (nextWidth, nextHeight) => {
|
|
228
|
+
// Delay hiding the resize bars for click case
|
|
229
|
+
setTimeout(() => {
|
|
230
|
+
setIsResizing(false);
|
|
231
|
+
}, 200);
|
|
232
|
+
editor.update(() => {
|
|
233
|
+
const node = (0, lexical_1.$getNodeByKey)(nodeKey);
|
|
234
|
+
if ((0, ImageNode_1.$isImageNode)(node)) {
|
|
235
|
+
node.setWidthAndHeight(nextWidth, nextHeight);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
const onResizeStart = () => {
|
|
240
|
+
setIsResizing(true);
|
|
241
|
+
};
|
|
242
|
+
const { historyState } = (0, context_1.useSharedHistoryContext)();
|
|
243
|
+
const draggable = isSelected && (0, lexical_1.$isNodeSelection)(selection) && !isResizing;
|
|
244
|
+
const isFocused = (isSelected || isResizing) && isEditable;
|
|
245
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { draggable: draggable, children: isLoadError ? ((0, jsx_runtime_1.jsx)(BrokenImage, {})) : ((0, jsx_runtime_1.jsx)(LazyImage, { className: isFocused ? `focused ${(0, lexical_1.$isNodeSelection)(selection) ? "draggable" : ""}` : null, src: src, altText: altText, imageRef: imageRef, width: width, height: height, maxWidth: maxWidth, onError: () => setIsLoadError(true) })) }), showCaption && ((0, jsx_runtime_1.jsx)("div", { className: "image-caption-container", children: (0, jsx_runtime_1.jsxs)(LexicalNestedComposer_1.LexicalNestedComposer, { initialEditor: caption, children: [(0, jsx_runtime_1.jsx)(LexicalAutoFocusPlugin_1.AutoFocusPlugin, {}), (0, jsx_runtime_1.jsx)(plugins_1.LinkPlugin, {}), (0, jsx_runtime_1.jsx)(LexicalHistoryPlugin_1.HistoryPlugin, { externalHistoryState: historyState }), (0, jsx_runtime_1.jsx)(LexicalRichTextPlugin_1.RichTextPlugin, { contentEditable: (0, jsx_runtime_1.jsx)(ui_1.LexicalContentEditable, { placeholder: "Enter a caption...", placeholderClassName: "ImageNode__placeholder", className: "ImageNode__contentEditable" }), ErrorBoundary: LexicalErrorBoundary_1.LexicalErrorBoundary })] }) })), resizable && (0, lexical_1.$isNodeSelection)(selection) && isFocused && ((0, jsx_runtime_1.jsx)(ui_1.ImageResizer, { showCaption: showCaption, setShowCaption: setShowCaption, editor: editor, buttonRef: buttonRef, imageRef: imageRef, maxWidth: maxWidth, onResizeStart: onResizeStart, onResizeEnd: onResizeEnd, captionsEnabled: !isLoadError && captionsEnabled }))] }) }));
|
|
246
|
+
};
|
|
247
|
+
exports.ImageComponent = ImageComponent;
|
|
248
|
+
//# sourceMappingURL=ImageComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageComponent.js","sourceRoot":"","sources":["../../../../src/editor/nodes/Image/ImageComponent.tsx"],"names":[],"mappings":";;;;;;;AACA,qCAaiB;AACjB,iCAAqF;AACrF,kFAAwE;AACxE,kFAAkF;AAClF,8EAA2E;AAC3E,8EAAoE;AACpE,gFAA6E;AAC7E,gFAAsE;AACtE,0EAAuE;AACvE,oFAAiF;AACjF,0CAA+C;AAE/C,2CAAwD;AACxD,qFAAwD;AACxD,2CAA2C;AAC3C,iCAAmF;AACnF,2CAA2C;AAE3C,MAAM,UAAU,GAAG,IAAI,GAAG,EAAE,CAAC;AAEhB,QAAA,yBAAyB,GAA+B,IAAA,uBAAa,EAAC,2BAA2B,CAAC,CAAC;AAEhH,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAE;IACvC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YAC1B,MAAM,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;YACxB,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC;YACd,GAAG,CAAC,MAAM,GAAG,GAAG,EAAE;gBAChB,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACpB,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC;YACF,GAAG,CAAC,OAAO,GAAG,GAAG,EAAE;gBACjB,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACtB,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,GAAW,EAAW,EAAE;IACrC,OAAO,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,CAAC;AACJ,CAAC,CAAC;AA/PW,QAAA,cAAc,kBA+PzB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, LexicalUpdateJSON, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from "lexical";
|
|
2
|
+
import { DecoratorNode } from "lexical";
|
|
3
|
+
import type { JSX } from "react";
|
|
4
|
+
export interface IImagePayload {
|
|
5
|
+
altText: string;
|
|
6
|
+
caption?: LexicalEditor;
|
|
7
|
+
height?: number;
|
|
8
|
+
key?: NodeKey;
|
|
9
|
+
maxWidth?: number;
|
|
10
|
+
showCaption?: boolean;
|
|
11
|
+
src: string;
|
|
12
|
+
width?: number;
|
|
13
|
+
captionsEnabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export type SerializedImageNode = Spread<{
|
|
16
|
+
altText: string;
|
|
17
|
+
caption: SerializedEditor;
|
|
18
|
+
height?: number;
|
|
19
|
+
maxWidth: number;
|
|
20
|
+
showCaption: boolean;
|
|
21
|
+
src: string;
|
|
22
|
+
width?: number;
|
|
23
|
+
}, SerializedLexicalNode>;
|
|
24
|
+
export declare class ImageNode extends DecoratorNode<JSX.Element> {
|
|
25
|
+
__src: string;
|
|
26
|
+
__altText: string;
|
|
27
|
+
__width: "inherit" | number;
|
|
28
|
+
__height: "inherit" | number;
|
|
29
|
+
__maxWidth: number;
|
|
30
|
+
__showCaption: boolean;
|
|
31
|
+
__caption: LexicalEditor;
|
|
32
|
+
__captionsEnabled: boolean;
|
|
33
|
+
constructor(src: string, altText: string, maxWidth: number, width?: "inherit" | number, height?: "inherit" | number, showCaption?: boolean, caption?: LexicalEditor, captionsEnabled?: boolean, key?: NodeKey);
|
|
34
|
+
static getType(): string;
|
|
35
|
+
static clone(node: ImageNode): ImageNode;
|
|
36
|
+
static importJSON(serializedNode: SerializedImageNode): ImageNode;
|
|
37
|
+
static importDOM(): DOMConversionMap | null;
|
|
38
|
+
updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedImageNode>): this;
|
|
39
|
+
exportDOM(): DOMExportOutput;
|
|
40
|
+
exportJSON(): SerializedImageNode;
|
|
41
|
+
setWidthAndHeight(width: "inherit" | number, height: "inherit" | number): void;
|
|
42
|
+
setShowCaption(showCaption: boolean): void;
|
|
43
|
+
createDOM(config: EditorConfig): HTMLElement;
|
|
44
|
+
updateDOM(): false;
|
|
45
|
+
getSrc(): string;
|
|
46
|
+
getAltText(): string;
|
|
47
|
+
decorate(): JSX.Element;
|
|
48
|
+
}
|
|
49
|
+
export declare function $createImageNode({ altText, height, maxWidth, captionsEnabled, src, width, showCaption, caption, key, }: IImagePayload): ImageNode;
|
|
50
|
+
export declare function $isImageNode(node: LexicalNode | null | undefined): node is ImageNode;
|