@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,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inlineImageNodeStyles = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
exports.inlineImageNodeStyles = (0, material_1.css) `
|
|
6
|
+
.InlineImageNode__contentEditable {
|
|
7
|
+
min-height: 20px;
|
|
8
|
+
border: 0;
|
|
9
|
+
resize: none;
|
|
10
|
+
cursor: text;
|
|
11
|
+
caret-color: rgb(5, 5, 5);
|
|
12
|
+
display: block;
|
|
13
|
+
position: relative;
|
|
14
|
+
tab-size: 1;
|
|
15
|
+
outline: 0;
|
|
16
|
+
padding: 10px;
|
|
17
|
+
user-select: text;
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
line-height: 1.4em;
|
|
20
|
+
width: calc(100% - 20px);
|
|
21
|
+
white-space: pre-wrap;
|
|
22
|
+
word-break: break-word;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.InlineImageNode__placeholder {
|
|
26
|
+
font-size: 12px;
|
|
27
|
+
color: #888;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
position: absolute;
|
|
30
|
+
text-overflow: ellipsis;
|
|
31
|
+
bottom: 10px;
|
|
32
|
+
left: 10px;
|
|
33
|
+
user-select: none;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
display: inline-block;
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.InlineImageNode_Checkbox:checked,
|
|
40
|
+
.InlineImageNode_Checkbox:not(:checked) {
|
|
41
|
+
position: absolute;
|
|
42
|
+
left: -9999px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.InlineImageNode_Checkbox:checked + label,
|
|
46
|
+
.InlineImageNode_Checkbox:not(:checked) + label {
|
|
47
|
+
position: absolute;
|
|
48
|
+
padding-right: 55px;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
line-height: 20px;
|
|
51
|
+
display: inline-block;
|
|
52
|
+
color: #666;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.InlineImageNode_Checkbox:checked + label:before,
|
|
56
|
+
.InlineImageNode_Checkbox:not(:checked) + label:before {
|
|
57
|
+
content: "";
|
|
58
|
+
position: absolute;
|
|
59
|
+
right: 0;
|
|
60
|
+
top: 0;
|
|
61
|
+
width: 18px;
|
|
62
|
+
height: 18px;
|
|
63
|
+
border: 1px solid #666;
|
|
64
|
+
background: #fff;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.InlineImageNode_Checkbox:checked + label:after,
|
|
68
|
+
.InlineImageNode_Checkbox:not(:checked) + label:after {
|
|
69
|
+
content: "";
|
|
70
|
+
width: 8px;
|
|
71
|
+
height: 8px;
|
|
72
|
+
background: #222222;
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 6px;
|
|
75
|
+
right: 6px;
|
|
76
|
+
-webkit-transition: all 0.2s ease;
|
|
77
|
+
transition: all 0.2s ease;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.InlineImageNode_Checkbox:not(:checked) + label:after {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
transform: scale(0);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.InlineImageNode_Checkbox:checked + label:after {
|
|
86
|
+
opacity: 1;
|
|
87
|
+
transform: scale(1);
|
|
88
|
+
}
|
|
89
|
+
`;
|
|
90
|
+
//# sourceMappingURL=inlineImageNodeStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inlineImageNodeStyles.js","sourceRoot":"","sources":["../../../../src/editor/nodes/InlineImage/inlineImageNodeStyles.ts"],"names":[],"mappings":";;;AAAA,4CAAoC;AAEvB,QAAA,qBAAqB,GAAG,IAAA,cAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFvC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlaygroundNodes = void 0;
|
|
4
|
+
const code_1 = require("@lexical/code");
|
|
5
|
+
const link_1 = require("@lexical/link");
|
|
6
|
+
const list_1 = require("@lexical/list");
|
|
7
|
+
const overflow_1 = require("@lexical/overflow");
|
|
8
|
+
const LexicalHorizontalRuleNode_1 = require("@lexical/react/LexicalHorizontalRuleNode");
|
|
9
|
+
const rich_text_1 = require("@lexical/rich-text");
|
|
10
|
+
const table_1 = require("@lexical/table");
|
|
11
|
+
const Image_1 = require("./Image");
|
|
12
|
+
const InlineImage_1 = require("./InlineImage");
|
|
13
|
+
const Video_1 = require("./Video");
|
|
14
|
+
exports.PlaygroundNodes = [
|
|
15
|
+
rich_text_1.HeadingNode,
|
|
16
|
+
list_1.ListNode,
|
|
17
|
+
list_1.ListItemNode,
|
|
18
|
+
rich_text_1.QuoteNode,
|
|
19
|
+
code_1.CodeNode,
|
|
20
|
+
table_1.TableNode,
|
|
21
|
+
table_1.TableCellNode,
|
|
22
|
+
table_1.TableRowNode,
|
|
23
|
+
code_1.CodeHighlightNode,
|
|
24
|
+
link_1.AutoLinkNode,
|
|
25
|
+
link_1.LinkNode,
|
|
26
|
+
overflow_1.OverflowNode,
|
|
27
|
+
Image_1.ImageNode,
|
|
28
|
+
InlineImage_1.InlineImageNode,
|
|
29
|
+
LexicalHorizontalRuleNode_1.HorizontalRuleNode,
|
|
30
|
+
Video_1.VideoNode,
|
|
31
|
+
];
|
|
32
|
+
//# sourceMappingURL=PlaygroundNodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaygroundNodes.js","sourceRoot":"","sources":["../../../src/editor/nodes/PlaygroundNodes.ts"],"names":[],"mappings":";;;AACA,wCAA4D;AAC5D,wCAAuD;AACvD,wCAAuD;AACvD,gDAAiD;AACjD,wFAA8E;AAC9E,kDAA4D;AAC5D,0CAAwE;AAExE,mCAAoC;AACpC,+CAAgD;AAChD,mCAAoC;AAEvB,QAAA,eAAe,GAA8B;IACxD,uBAAW;IACX,eAAQ;IACR,mBAAY;IACZ,qBAAS;IACT,eAAQ;IACR,iBAAS;IACT,qBAAa;IACb,oBAAY;IACZ,wBAAiB;IACjB,mBAAY;IACZ,eAAQ;IACR,uBAAY;IACZ,iBAAS;IACT,6BAAe;IACf,8CAAkB;IAClB,iBAAS;CACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VideoProvider } from "../../utils/parseVideoUrl";
|
|
2
|
+
export interface IVideoNodeProps {
|
|
3
|
+
provider: VideoProvider;
|
|
4
|
+
videoId: string;
|
|
5
|
+
embedUrl: string;
|
|
6
|
+
startAt?: number | null;
|
|
7
|
+
originalUrl: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const VideoComponent: (props: IVideoNodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VideoComponent = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const VideoComponent = (props) => {
|
|
6
|
+
const { provider } = props;
|
|
7
|
+
const title = provider === "youtube"
|
|
8
|
+
? "YouTube video"
|
|
9
|
+
: provider === "vimeo"
|
|
10
|
+
? "Vimeo video"
|
|
11
|
+
: "Video";
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "lexical-video", contentEditable: false, draggable: false, children: (0, jsx_runtime_1.jsx)("div", { className: "lexical-video__inner", children: (0, jsx_runtime_1.jsx)("iframe", { className: "lexical-video__iframe", src: props.embedUrl, title: title, loading: "lazy", allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share", allowFullScreen: true }) }) }));
|
|
13
|
+
};
|
|
14
|
+
exports.VideoComponent = VideoComponent;
|
|
15
|
+
//# sourceMappingURL=VideoComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoComponent.js","sourceRoot":"","sources":["../../../../src/editor/nodes/Video/VideoComponent.tsx"],"names":[],"mappings":";;;;AAUO,MAAM,cAAc,GAAG,CAAC,KAAsB,EAAE,EAAE;IACvD,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,MAAM,KAAK,GACT,QAAQ,KAAK,SAAS;QACpB,CAAC,CAAC,eAAe;QACjB,CAAC,CAAC,QAAQ,KAAK,OAAO;YACpB,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,OAAO,CAAC;IAEhB,OAAO,CACL,gCAAK,SAAS,EAAC,eAAe,EAAC,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,YACrE,gCAAK,SAAS,EAAC,sBAAsB,YACnC,mCACE,SAAS,EAAC,uBAAuB,EACjC,GAAG,EAAE,KAAK,CAAC,QAAQ,EACnB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAC,MAAM,EACd,KAAK,EAAC,qGAAqG,EAC3G,eAAe,SACf,GACE,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,cAAc,kBAuBzB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DecoratorNode, DOMConversionMap, type EditorConfig, type LexicalEditor, type NodeKey, type SerializedLexicalNode, type Spread } from "lexical";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ParsedVideo, VideoProvider } from "../../utils/parseVideoUrl";
|
|
4
|
+
import { IVideoNodeProps } from "./VideoComponent";
|
|
5
|
+
export type SerializedVideoNode = Spread<{
|
|
6
|
+
type: "video";
|
|
7
|
+
version: 1;
|
|
8
|
+
provider: VideoProvider;
|
|
9
|
+
videoId: string;
|
|
10
|
+
embedUrl: string;
|
|
11
|
+
startAt?: number | null;
|
|
12
|
+
originalUrl: string;
|
|
13
|
+
}, SerializedLexicalNode>;
|
|
14
|
+
export declare class VideoNode extends DecoratorNode<React.JSX.Element> {
|
|
15
|
+
__provider: VideoProvider;
|
|
16
|
+
__videoId: string;
|
|
17
|
+
__embedUrl: string;
|
|
18
|
+
__startAt?: number | null;
|
|
19
|
+
__originalUrl: string;
|
|
20
|
+
static getType(): string;
|
|
21
|
+
static clone(node: VideoNode): VideoNode;
|
|
22
|
+
constructor(props: IVideoNodeProps, key?: NodeKey);
|
|
23
|
+
static importJSON(serializedNode: SerializedVideoNode): VideoNode;
|
|
24
|
+
exportJSON(): SerializedVideoNode;
|
|
25
|
+
static importDOM(): DOMConversionMap;
|
|
26
|
+
exportDOM(): {
|
|
27
|
+
element: HTMLElement;
|
|
28
|
+
};
|
|
29
|
+
createDOM(_config: EditorConfig, _editor: LexicalEditor): HTMLElement;
|
|
30
|
+
updateDOM(): false;
|
|
31
|
+
decorate(): React.JSX.Element;
|
|
32
|
+
}
|
|
33
|
+
export declare function $createVideoNode(parsed: ParsedVideo): VideoNode;
|
|
34
|
+
export declare function $isVideoNode(node: unknown): node is VideoNode;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VideoNode = void 0;
|
|
4
|
+
exports.$createVideoNode = $createVideoNode;
|
|
5
|
+
exports.$isVideoNode = $isVideoNode;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const lexical_1 = require("lexical");
|
|
8
|
+
const parseVideoUrl_1 = require("../../utils/parseVideoUrl");
|
|
9
|
+
const VideoComponent_1 = require("./VideoComponent");
|
|
10
|
+
class VideoNode extends lexical_1.DecoratorNode {
|
|
11
|
+
static getType() {
|
|
12
|
+
return "video";
|
|
13
|
+
}
|
|
14
|
+
static clone(node) {
|
|
15
|
+
var _a;
|
|
16
|
+
return new VideoNode({
|
|
17
|
+
provider: node.__provider,
|
|
18
|
+
videoId: node.__videoId,
|
|
19
|
+
embedUrl: node.__embedUrl,
|
|
20
|
+
startAt: (_a = node.__startAt) !== null && _a !== void 0 ? _a : null,
|
|
21
|
+
originalUrl: node.__originalUrl,
|
|
22
|
+
}, node.__key);
|
|
23
|
+
}
|
|
24
|
+
constructor(props, key) {
|
|
25
|
+
var _a;
|
|
26
|
+
super(key);
|
|
27
|
+
this.__provider = props.provider;
|
|
28
|
+
this.__videoId = props.videoId;
|
|
29
|
+
this.__embedUrl = props.embedUrl;
|
|
30
|
+
this.__startAt = (_a = props.startAt) !== null && _a !== void 0 ? _a : null;
|
|
31
|
+
this.__originalUrl = props.originalUrl;
|
|
32
|
+
}
|
|
33
|
+
static importJSON(serializedNode) {
|
|
34
|
+
const { provider, videoId, embedUrl, startAt, originalUrl } = serializedNode;
|
|
35
|
+
return new VideoNode({ provider, videoId, embedUrl, startAt, originalUrl });
|
|
36
|
+
}
|
|
37
|
+
exportJSON() {
|
|
38
|
+
var _a;
|
|
39
|
+
return {
|
|
40
|
+
type: "video",
|
|
41
|
+
version: 1,
|
|
42
|
+
provider: this.__provider,
|
|
43
|
+
videoId: this.__videoId,
|
|
44
|
+
embedUrl: this.__embedUrl,
|
|
45
|
+
startAt: (_a = this.__startAt) !== null && _a !== void 0 ? _a : null,
|
|
46
|
+
originalUrl: this.__originalUrl,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
static importDOM() {
|
|
50
|
+
return {
|
|
51
|
+
iframe: (domNode) => {
|
|
52
|
+
const el = domNode;
|
|
53
|
+
if (!(el instanceof HTMLIFrameElement))
|
|
54
|
+
return null;
|
|
55
|
+
const src = el.getAttribute("src") || "";
|
|
56
|
+
const parsed = (0, parseVideoUrl_1.parseVideoUrl)(src);
|
|
57
|
+
if (!parsed)
|
|
58
|
+
return null;
|
|
59
|
+
return {
|
|
60
|
+
priority: 2,
|
|
61
|
+
conversion: () => {
|
|
62
|
+
return { node: $createVideoNode(parsed) };
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
div: (domNode) => {
|
|
67
|
+
const el = domNode;
|
|
68
|
+
if (!(el instanceof HTMLDivElement))
|
|
69
|
+
return null;
|
|
70
|
+
if (!el.classList.contains("lexical-video"))
|
|
71
|
+
return null;
|
|
72
|
+
const iframe = el.querySelector("iframe");
|
|
73
|
+
if (!(iframe instanceof HTMLIFrameElement))
|
|
74
|
+
return null;
|
|
75
|
+
const src = iframe.getAttribute("src") || "";
|
|
76
|
+
const parsed = (0, parseVideoUrl_1.parseVideoUrl)(src);
|
|
77
|
+
if (!parsed)
|
|
78
|
+
return null;
|
|
79
|
+
return {
|
|
80
|
+
priority: 2,
|
|
81
|
+
conversion: () => {
|
|
82
|
+
return { node: $createVideoNode(parsed) };
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
exportDOM() {
|
|
89
|
+
const wrapper = document.createElement("div");
|
|
90
|
+
wrapper.className = "lexical-video";
|
|
91
|
+
const inner = document.createElement("div");
|
|
92
|
+
inner.className = "lexical-video__inner";
|
|
93
|
+
const iframe = document.createElement("iframe");
|
|
94
|
+
iframe.className = "lexical-video__iframe";
|
|
95
|
+
iframe.setAttribute("src", this.__embedUrl);
|
|
96
|
+
iframe.setAttribute("loading", "lazy");
|
|
97
|
+
iframe.setAttribute("allow", "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share");
|
|
98
|
+
iframe.setAttribute("allowfullscreen", "true");
|
|
99
|
+
inner.appendChild(iframe);
|
|
100
|
+
wrapper.appendChild(inner);
|
|
101
|
+
return { element: wrapper };
|
|
102
|
+
}
|
|
103
|
+
createDOM(_config, _editor) {
|
|
104
|
+
const div = document.createElement("div");
|
|
105
|
+
div.className = "lexical-video";
|
|
106
|
+
return div;
|
|
107
|
+
}
|
|
108
|
+
updateDOM() {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
decorate() {
|
|
112
|
+
var _a;
|
|
113
|
+
return ((0, jsx_runtime_1.jsx)(VideoComponent_1.VideoComponent, { provider: this.__provider, videoId: this.__videoId, embedUrl: this.__embedUrl, startAt: (_a = this.__startAt) !== null && _a !== void 0 ? _a : undefined, originalUrl: this.__originalUrl }));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
exports.VideoNode = VideoNode;
|
|
117
|
+
function $createVideoNode(parsed) {
|
|
118
|
+
return new VideoNode({
|
|
119
|
+
provider: parsed.provider,
|
|
120
|
+
videoId: parsed.id,
|
|
121
|
+
embedUrl: parsed.embedUrl,
|
|
122
|
+
startAt: parsed.startAt,
|
|
123
|
+
originalUrl: parsed.originalUrl,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function $isVideoNode(node) {
|
|
127
|
+
return node instanceof VideoNode;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=VideoNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoNode.js","sourceRoot":"","sources":["../../../../src/editor/nodes/Video/VideoNode.tsx"],"names":[],"mappings":";;;AAsKA,4CAQC;AAED,oCAEC;;AAlLD,qCASiB;AAGjB,6DAImC;AACnC,qDAAmE;AAenE,MAAa,SAAU,SAAQ,uBAAgC;IAO7D,MAAM,CAAC,OAAO;QACZ,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,IAAe;;QAC1B,OAAO,IAAI,SAAS,CAClB;YACE,QAAQ,EAAE,IAAI,CAAC,UAAU;YACzB,OAAO,EAAE,IAAI,CAAC,SAAS;YAC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GAC/B,CACH,CAAC;IACJ,CAAC;CACF;AApID,8BAoIC;AAED,SAAgB,gBAAgB,CAAC,MAAmB;IAClD,OAAO,IAAI,SAAS,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,OAAO,EAAE,MAAM,CAAC,EAAE;QAClB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,WAAW,EAAE,MAAM,CAAC,WAAW;KAChC,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,YAAY,CAAC,IAAa;IACxC,OAAO,IAAI,YAAY,SAAS,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.videoNodeStyles = exports.VideoNode = exports.VideoComponent = void 0;
|
|
4
|
+
var VideoComponent_1 = require("./VideoComponent");
|
|
5
|
+
Object.defineProperty(exports, "VideoComponent", { enumerable: true, get: function () { return VideoComponent_1.VideoComponent; } });
|
|
6
|
+
var VideoNode_1 = require("./VideoNode");
|
|
7
|
+
Object.defineProperty(exports, "VideoNode", { enumerable: true, get: function () { return VideoNode_1.VideoNode; } });
|
|
8
|
+
var videoNodeStyles_1 = require("./videoNodeStyles");
|
|
9
|
+
Object.defineProperty(exports, "videoNodeStyles", { enumerable: true, get: function () { return videoNodeStyles_1.videoNodeStyles; } });
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/nodes/Video/index.ts"],"names":[],"mappings":";;;AAAA,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const videoNodeStyles: import("@emotion/utils").SerializedStyles;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.videoNodeStyles = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
exports.videoNodeStyles = (0, material_1.css) `
|
|
6
|
+
.lexical-video {
|
|
7
|
+
position: relative;
|
|
8
|
+
width: 100%;
|
|
9
|
+
margin: 8px 0;
|
|
10
|
+
user-select: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.lexical-video__inner {
|
|
14
|
+
position: relative;
|
|
15
|
+
width: 100%;
|
|
16
|
+
padding-top: 56.25%; /* 16:9 */
|
|
17
|
+
background: #000000;
|
|
18
|
+
border-radius: 8px;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.lexical-video__iframe {
|
|
23
|
+
position: absolute;
|
|
24
|
+
inset: 0;
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
border: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.lexical-video__caption {
|
|
31
|
+
font:
|
|
32
|
+
13px/1.4 system-ui,
|
|
33
|
+
-apple-system,
|
|
34
|
+
Segoe UI,
|
|
35
|
+
Roboto,
|
|
36
|
+
Helvetica,
|
|
37
|
+
Arial,
|
|
38
|
+
sans-serif;
|
|
39
|
+
color: #6b7280;
|
|
40
|
+
margin-top: 4px;
|
|
41
|
+
text-align: center;
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
//# sourceMappingURL=videoNodeStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoNodeStyles.js","sourceRoot":"","sources":["../../../../src/editor/nodes/Video/videoNodeStyles.ts"],"names":[],"mappings":";;;AAAA,4CAAoC;AAEvB,QAAA,eAAe,GAAG,IAAA,cAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCjC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Video"), exports);
|
|
18
|
+
__exportStar(require("./InlineImage"), exports);
|
|
19
|
+
__exportStar(require("./Image"), exports);
|
|
20
|
+
__exportStar(require("./PlaygroundNodes"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/editor/nodes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,gDAA8B;AAC9B,0CAAwB;AACxB,oDAAkC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codeActionMenuPluginStyles: import("@emotion/utils").SerializedStyles;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.codeActionMenuPluginStyles = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
exports.codeActionMenuPluginStyles = (0, material_1.css) `
|
|
6
|
+
.code-action-menu-container {
|
|
7
|
+
height: 35.8px;
|
|
8
|
+
font-size: 10px;
|
|
9
|
+
color: rgba(0, 0, 0, 0.5);
|
|
10
|
+
position: absolute;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
user-select: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.code-action-menu-container .code-highlight-language {
|
|
18
|
+
margin-right: 4px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.code-action-menu-container button.menu-item {
|
|
22
|
+
border: 1px solid transparent;
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
padding: 4px;
|
|
25
|
+
background: none;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
color: rgba(0, 0, 0, 0.5);
|
|
31
|
+
text-transform: uppercase;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.code-action-menu-container button.menu-item i.format {
|
|
35
|
+
height: 16px;
|
|
36
|
+
width: 16px;
|
|
37
|
+
opacity: 0.6;
|
|
38
|
+
display: flex;
|
|
39
|
+
color: rgba(0, 0, 0, 0.5);
|
|
40
|
+
background-size: contain;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.code-action-menu-container button.menu-item:hover {
|
|
44
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
45
|
+
opacity: 0.9;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.code-action-menu-container button.menu-item:active {
|
|
49
|
+
background-color: rgba(223, 232, 250);
|
|
50
|
+
border: 1px solid rgba(0, 0, 0, 0.45);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.code-action-menu-container .prettier-wrapper {
|
|
54
|
+
position: relative;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.code-action-menu-container .prettier-wrapper .code-error-tips {
|
|
58
|
+
padding: 5px;
|
|
59
|
+
border-radius: 4px;
|
|
60
|
+
color: #fff;
|
|
61
|
+
background: #222;
|
|
62
|
+
margin-top: 4px;
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 26px;
|
|
65
|
+
right: 0;
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
//# sourceMappingURL=codeActionMenuPluginStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeActionMenuPluginStyles.js","sourceRoot":"","sources":["../../../../src/editor/plugins/CodeActionMenuPlugin/codeActionMenuPluginStyles.ts"],"names":[],"mappings":";;;AAAA,4CAAoC;AAEvB,QAAA,0BAA0B,GAAG,IAAA,cAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D5C,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LexicalEditor } from "lexical";
|
|
2
|
+
interface ICopyButtonProps {
|
|
3
|
+
editor: LexicalEditor;
|
|
4
|
+
getCodeDOMNode: () => HTMLElement | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const CopyButton: ({ editor, getCodeDOMNode }: ICopyButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CopyButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
/**
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
const code_1 = require("@lexical/code");
|
|
13
|
+
const lexical_1 = require("lexical");
|
|
14
|
+
const react_1 = require("react");
|
|
15
|
+
const material_1 = require("@mui/material");
|
|
16
|
+
const utils_1 = require("../../utils");
|
|
17
|
+
const CopyButton = ({ editor, getCodeDOMNode }) => {
|
|
18
|
+
const [isCopyCompleted, setCopyCompleted] = (0, react_1.useState)(false);
|
|
19
|
+
const removeSuccessIcon = (0, utils_1.useDebounce)(() => {
|
|
20
|
+
setCopyCompleted(false);
|
|
21
|
+
}, 1000);
|
|
22
|
+
async function handleClick() {
|
|
23
|
+
const codeDOMNode = getCodeDOMNode();
|
|
24
|
+
if (!codeDOMNode) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
let content = "";
|
|
28
|
+
editor.update(() => {
|
|
29
|
+
const codeNode = (0, lexical_1.$getNearestNodeFromDOMNode)(codeDOMNode);
|
|
30
|
+
if ((0, code_1.$isCodeNode)(codeNode)) {
|
|
31
|
+
content = codeNode.getTextContent();
|
|
32
|
+
}
|
|
33
|
+
const selection = (0, lexical_1.$getSelection)();
|
|
34
|
+
(0, lexical_1.$setSelection)(selection);
|
|
35
|
+
});
|
|
36
|
+
try {
|
|
37
|
+
await navigator.clipboard.writeText(content);
|
|
38
|
+
setCopyCompleted(true);
|
|
39
|
+
removeSuccessIcon();
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
console.error("Failed to copy: ", err);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Button, { className: "menu-item", onClick: handleClick, "aria-label": "copy", children: isCopyCompleted ? (0, jsx_runtime_1.jsx)("i", { className: "format success" }) : (0, jsx_runtime_1.jsx)("i", { className: "format copy" }) }));
|
|
46
|
+
};
|
|
47
|
+
exports.CopyButton = CopyButton;
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.t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EAAC,WAAW,EAAC,OAAO,EAAE,WAAW,gBAAa,MAAM,YAClE,eAAe,CAAC,CAAC,CAAC,8BAAG,SAAS,EAAC,gBAAgB,GAAG,CAAC,CAAC,CAAC,8BAAG,SAAS,EAAC,aAAa,GAAG,GAC5E,CACV,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,UAAU,cAyCrB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LexicalEditor } from "lexical";
|
|
2
|
+
interface IPrettierButtonProps {
|
|
3
|
+
lang: string;
|
|
4
|
+
editor: LexicalEditor;
|
|
5
|
+
getCodeDOMNode: () => HTMLElement | null;
|
|
6
|
+
}
|
|
7
|
+
export declare function canBePrettier(lang: string): boolean;
|
|
8
|
+
export declare const PrettierButton: ({ lang, editor, getCodeDOMNode }: IPrettierButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|