@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":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/MarkdownShortcutPlugin/index.tsx"],"names":[],"mappings":";;;;AASA,gGAAsF;AAEtF,kEAAkE;AAE3D,MAAM,cAAc,GAAG,GAAgB,EAAE;IAC9C,OAAO,uBAAC,sDAAsB,IAAC,YAAY,EAAE,8CAAuB,GAAI,CAAC;AAC3E,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ElementTransformer, TextMatchTransformer, Transformer } from "@lexical/markdown";
|
|
2
|
+
export declare const HR: ElementTransformer;
|
|
3
|
+
export declare const IMAGE: TextMatchTransformer;
|
|
4
|
+
export declare const TABLE: ElementTransformer;
|
|
5
|
+
export declare const PLAYGROUND_TRANSFORMERS: Array<Transformer>;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PLAYGROUND_TRANSFORMERS = exports.TABLE = exports.IMAGE = exports.HR = void 0;
|
|
4
|
+
const markdown_1 = require("@lexical/markdown");
|
|
5
|
+
const LexicalHorizontalRuleNode_1 = require("@lexical/react/LexicalHorizontalRuleNode");
|
|
6
|
+
const table_1 = require("@lexical/table");
|
|
7
|
+
const lexical_1 = require("lexical");
|
|
8
|
+
const ImageNode_1 = require("../../nodes/Image/ImageNode");
|
|
9
|
+
exports.HR = {
|
|
10
|
+
dependencies: [LexicalHorizontalRuleNode_1.HorizontalRuleNode],
|
|
11
|
+
export: (node) => {
|
|
12
|
+
return (0, LexicalHorizontalRuleNode_1.$isHorizontalRuleNode)(node) ? "***" : null;
|
|
13
|
+
},
|
|
14
|
+
regExp: /^(---|\*\*\*|___)\s?$/,
|
|
15
|
+
replace: (parentNode, _1, _2, isImport) => {
|
|
16
|
+
const line = (0, LexicalHorizontalRuleNode_1.$createHorizontalRuleNode)();
|
|
17
|
+
// TODO: Get rid of isImport flag
|
|
18
|
+
if (isImport || parentNode.getNextSibling() != null) {
|
|
19
|
+
parentNode.replace(line);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
parentNode.insertBefore(line);
|
|
23
|
+
}
|
|
24
|
+
line.selectNext();
|
|
25
|
+
},
|
|
26
|
+
type: "element",
|
|
27
|
+
};
|
|
28
|
+
exports.IMAGE = {
|
|
29
|
+
dependencies: [ImageNode_1.ImageNode],
|
|
30
|
+
export: node => {
|
|
31
|
+
if (!(0, ImageNode_1.$isImageNode)(node)) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return `})`;
|
|
35
|
+
},
|
|
36
|
+
importRegExp: /!(?:\[([^[]*)\])(?:\(([^(]+)\))/,
|
|
37
|
+
regExp: /!(?:\[([^[]*)\])(?:\(([^(]+)\))$/,
|
|
38
|
+
replace: (textNode, match) => {
|
|
39
|
+
const [, altText, src] = match;
|
|
40
|
+
const imageNode = (0, ImageNode_1.$createImageNode)({
|
|
41
|
+
altText,
|
|
42
|
+
maxWidth: 800,
|
|
43
|
+
src,
|
|
44
|
+
});
|
|
45
|
+
textNode.replace(imageNode);
|
|
46
|
+
},
|
|
47
|
+
trigger: ")",
|
|
48
|
+
type: "text-match",
|
|
49
|
+
};
|
|
50
|
+
// Very primitive table setup
|
|
51
|
+
const TABLE_ROW_REG_EXP = /^(?:\|)(.+)(?:\|)\s?$/;
|
|
52
|
+
const TABLE_ROW_DIVIDER_REG_EXP = /^(\| ?:?-*:? ?)+\|\s?$/;
|
|
53
|
+
exports.TABLE = {
|
|
54
|
+
dependencies: [table_1.TableNode, table_1.TableRowNode, table_1.TableCellNode],
|
|
55
|
+
export: (node) => {
|
|
56
|
+
if (!(0, table_1.$isTableNode)(node)) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
const output = [];
|
|
60
|
+
for (const row of node.getChildren()) {
|
|
61
|
+
const rowOutput = [];
|
|
62
|
+
if (!(0, table_1.$isTableRowNode)(row)) {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
let isHeaderRow = false;
|
|
66
|
+
for (const cell of row.getChildren()) {
|
|
67
|
+
// It's TableCellNode so it's just to make flow happy
|
|
68
|
+
if ((0, table_1.$isTableCellNode)(cell)) {
|
|
69
|
+
rowOutput.push((0, markdown_1.$convertToMarkdownString)(exports.PLAYGROUND_TRANSFORMERS, cell).replace(/\n/g, "\\n").trim());
|
|
70
|
+
if (cell.__headerState === table_1.TableCellHeaderStates.ROW) {
|
|
71
|
+
isHeaderRow = true;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
output.push(`| ${rowOutput.join(" | ")} |`);
|
|
76
|
+
if (isHeaderRow) {
|
|
77
|
+
output.push(`| ${rowOutput.map(_ => "---").join(" | ")} |`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return output.join("\n");
|
|
81
|
+
},
|
|
82
|
+
regExp: TABLE_ROW_REG_EXP,
|
|
83
|
+
replace: (parentNode, _1, match) => {
|
|
84
|
+
// Header row
|
|
85
|
+
if (TABLE_ROW_DIVIDER_REG_EXP.test(match[0])) {
|
|
86
|
+
const table = parentNode.getPreviousSibling();
|
|
87
|
+
if (!table || !(0, table_1.$isTableNode)(table)) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const rows = table.getChildren();
|
|
91
|
+
const lastRow = rows[rows.length - 1];
|
|
92
|
+
if (!lastRow || !(0, table_1.$isTableRowNode)(lastRow)) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
// Add header state to row cells
|
|
96
|
+
lastRow.getChildren().forEach(cell => {
|
|
97
|
+
if (!(0, table_1.$isTableCellNode)(cell)) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
cell.setHeaderStyles(table_1.TableCellHeaderStates.ROW, table_1.TableCellHeaderStates.ROW);
|
|
101
|
+
});
|
|
102
|
+
// Remove line
|
|
103
|
+
parentNode.remove();
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const matchCells = mapToTableCells(match[0]);
|
|
107
|
+
if (matchCells == null) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const rows = [matchCells];
|
|
111
|
+
let sibling = parentNode.getPreviousSibling();
|
|
112
|
+
let maxCells = matchCells.length;
|
|
113
|
+
while (sibling) {
|
|
114
|
+
if (!(0, lexical_1.$isParagraphNode)(sibling)) {
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
if (sibling.getChildrenSize() !== 1) {
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
const firstChild = sibling.getFirstChild();
|
|
121
|
+
if (!(0, lexical_1.$isTextNode)(firstChild)) {
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
const cells = mapToTableCells(firstChild.getTextContent());
|
|
125
|
+
if (cells == null) {
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
maxCells = Math.max(maxCells, cells.length);
|
|
129
|
+
rows.unshift(cells);
|
|
130
|
+
const previousSibling = sibling.getPreviousSibling();
|
|
131
|
+
sibling.remove();
|
|
132
|
+
sibling = previousSibling;
|
|
133
|
+
}
|
|
134
|
+
const table = (0, table_1.$createTableNode)();
|
|
135
|
+
for (const cells of rows) {
|
|
136
|
+
const tableRow = (0, table_1.$createTableRowNode)();
|
|
137
|
+
table.append(tableRow);
|
|
138
|
+
for (let i = 0; i < maxCells; i++) {
|
|
139
|
+
tableRow.append(i < cells.length ? cells[i] : $createTableCell(""));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const previousSibling = parentNode.getPreviousSibling();
|
|
143
|
+
if ((0, table_1.$isTableNode)(previousSibling) && getTableColumnsSize(previousSibling) === maxCells) {
|
|
144
|
+
previousSibling.append(...table.getChildren());
|
|
145
|
+
parentNode.remove();
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
parentNode.replace(table);
|
|
149
|
+
}
|
|
150
|
+
table.selectEnd();
|
|
151
|
+
},
|
|
152
|
+
type: "element",
|
|
153
|
+
};
|
|
154
|
+
function getTableColumnsSize(table) {
|
|
155
|
+
const row = table.getFirstChild();
|
|
156
|
+
return (0, table_1.$isTableRowNode)(row) ? row.getChildrenSize() : 0;
|
|
157
|
+
}
|
|
158
|
+
const $createTableCell = (textContent) => {
|
|
159
|
+
textContent = textContent.replace(/\\n/g, "\n");
|
|
160
|
+
const cell = (0, table_1.$createTableCellNode)(table_1.TableCellHeaderStates.NO_STATUS);
|
|
161
|
+
(0, markdown_1.$convertFromMarkdownString)(textContent, exports.PLAYGROUND_TRANSFORMERS, cell);
|
|
162
|
+
return cell;
|
|
163
|
+
};
|
|
164
|
+
const mapToTableCells = (textContent) => {
|
|
165
|
+
const match = TABLE_ROW_REG_EXP.exec(textContent);
|
|
166
|
+
if (!(match === null || match === void 0 ? void 0 : match[1])) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
return match[1].split("|").map(text => $createTableCell(text));
|
|
170
|
+
};
|
|
171
|
+
exports.PLAYGROUND_TRANSFORMERS = [
|
|
172
|
+
exports.TABLE,
|
|
173
|
+
exports.HR,
|
|
174
|
+
exports.IMAGE,
|
|
175
|
+
markdown_1.CHECK_LIST,
|
|
176
|
+
...markdown_1.ELEMENT_TRANSFORMERS,
|
|
177
|
+
...markdown_1.MULTILINE_ELEMENT_TRANSFORMERS,
|
|
178
|
+
...markdown_1.TEXT_FORMAT_TRANSFORMERS,
|
|
179
|
+
...markdown_1.TEXT_MATCH_TRANSFORMERS,
|
|
180
|
+
];
|
|
181
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/MarkdownTransformers/index.ts"],"names":[],"mappings":";;;AAAA,gDAW2B;AAC3B,wFAIkD;AAClD,0CAWwB;AACxB,qCAAqE;AAErE,2DAAwF;AAE3E,QAAA,EAAE,GAAuB;IACpC,YAAY,EAAE,CAAC,8CAAkB,CAAC;IAClC,MAAM,EAAE,CAAC,IAAiB,EAAE,EAAE;QAC5B,OAAO,IAAA,iDAAqB,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IACpD,CAAC;IACD,MAAM,EAAE,uBAAuB;IAC/B,OAAO,EAAE,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE;QACxC,MAAM,IAAI,GAAG,IAAA,qDAAyB,GAAE,CAAC;QAEzC,iCAAiC;QACjC,IAAI,QAAQ,IAAI,UAAU,CAAC,cAAc,EAAE,IAAI,IAAI,EAAE,CAAC;YACpD,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;QAED,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IACD,IAAI,EAAE,SAAS;CAChB,CAAC;AAEW,QAAA,KAAK,GAAyB;IACzC,YAAY,EAAE,CAAC,qBAAS,CAAC;IACzB,MAAM,EAAE,IAAI,CAAC,EAAE;QACb,IAAI,CAAC,IAAA,wBAAY,EAAC,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,KAAK,IAAI,CAAC,UAAU,EAAE,KAAK,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;IACrD,CAAC;IACD,YAAY,EAAE,iC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W,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChD,MAAM,IAAI,GAAG,IAAA,4BAAoB,EAAC,6BAAqB,CAAC,SAAS,CAAC,CAAC;IACnE,IAAA,qCAA0B,EAAC,WAAW,EAAE,+BAAuB,EAAE,IAAI,CAAC,CAAC;IACvE,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,WAAmB,EAA+B,EAAE;IAC3E,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,CAAC,CAAC,CAAA,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;AACjE,CAAC,CAAC;AAEW,QAAA,uBAAuB,GAAuB;IACzD,aAAK;IACL,UAAE;IACF,aAAK;IACL,qBAAU;IACV,GAAG,+BAAoB;IACvB,GAAG,yCAA8B;IACjC,GAAG,mCAAwB;IAC3B,GAAG,kCAAuB;CAC3B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export declare const MaxLengthPlugin: ({ maxLength }: {
|
|
9
|
+
maxLength: number;
|
|
10
|
+
}) => null;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.MaxLengthPlugin = void 0;
|
|
11
|
+
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
12
|
+
const selection_1 = require("@lexical/selection");
|
|
13
|
+
const utils_1 = require("@lexical/utils");
|
|
14
|
+
const lexical_1 = require("lexical");
|
|
15
|
+
const react_1 = require("react");
|
|
16
|
+
const MaxLengthPlugin = ({ maxLength }) => {
|
|
17
|
+
const [editor] = (0, LexicalComposerContext_1.useLexicalComposerContext)();
|
|
18
|
+
(0, react_1.useEffect)(() => {
|
|
19
|
+
let lastRestoredEditorState = null;
|
|
20
|
+
return editor.registerNodeTransform(lexical_1.RootNode, (rootNode) => {
|
|
21
|
+
const selection = (0, lexical_1.$getSelection)();
|
|
22
|
+
if (!(0, lexical_1.$isRangeSelection)(selection) || !selection.isCollapsed()) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const prevEditorState = editor.getEditorState();
|
|
26
|
+
const prevTextContentSize = prevEditorState.read(() => rootNode.getTextContentSize());
|
|
27
|
+
const textContentSize = rootNode.getTextContentSize();
|
|
28
|
+
if (prevTextContentSize !== textContentSize) {
|
|
29
|
+
const delCount = textContentSize - maxLength;
|
|
30
|
+
const anchor = selection.anchor;
|
|
31
|
+
if (delCount > 0) {
|
|
32
|
+
// Restore the old editor state instead if the last
|
|
33
|
+
// text content was already at the limit.
|
|
34
|
+
if (prevTextContentSize === maxLength && lastRestoredEditorState !== prevEditorState) {
|
|
35
|
+
lastRestoredEditorState = prevEditorState;
|
|
36
|
+
(0, utils_1.$restoreEditorState)(editor, prevEditorState);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
(0, selection_1.$trimTextContentFromAnchor)(editor, anchor, delCount);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}, [editor, maxLength]);
|
|
45
|
+
return null;
|
|
46
|
+
};
|
|
47
|
+
exports.MaxLengthPlugin = MaxLengthPlugin;
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/MaxLengthPlugin/index.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,kFAAkF;AAClF,kDAAgE;AAChE,0CAAqD;AACrD,qCAAkF;AAClF,iCAAkC;AAE3B,MAAM,eAAe,GAAG,CAAC,EAAE,SAAS,EAAyB,EAAQ,EAAE;IAC5E,MAAM,CAAC,MAAM,CAAC,GAAG,IAAA,kDAAyB,GAAE,CAAC;IAE7C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,uBAAuB,GAAuB,IAAI,CAAC;QAEvD,OAAO,MAAM,CAAC,qBAAqB,CAAC,kBAAQ,EAAE,CAAC,QAAkB,EAAE,EAAE;YACnE,MAAM,SAAS,GAAG,IAAA,uBAAa,GAAE,CAAC;YAClC,IAAI,CAAC,IAAA,2BAAiB,EAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;gBAC9D,OAAO;YACT,CAAC;YACD,MAAM,eAAe,GAAG,MAAM,CAAC,cAAc,EAAE,CAAC;YAChD,MAAM,mBAAmB,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC;YACtF,MAAM,eAAe,GAAG,QAAQ,CAAC,kBAAkB,EAAE,CAAC;YACtD,IAAI,mBAAmB,KAAK,eAAe,EAAE,CAAC;gBAC5C,MAAM,QAAQ,GAAG,eAAe,GAAG,SAAS,CAAC;gBAC7C,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;gBAEhC,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;oBACjB,mDAAmD;oBACnD,yCAAyC;oBACzC,IAAI,mBAAmB,KAAK,SAAS,IAAI,uBAAuB,KAAK,eAAe,EAAE,CAAC;wBACrF,uBAAuB,GAAG,eAAe,CAAC;wBAC1C,IAAA,2BAAmB,EAAC,MAAM,EAAE,eAAe,CAAC,CAAC;oBAC/C,CAAC;yBAAM,CAAC;wBACN,IAAA,sCAA0B,EAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;oBACvD,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IAExB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAjCW,QAAA,eAAe,mBAiC1B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import { LexicalEditor } from "lexical";
|
|
9
|
+
import { Dispatch } from "react";
|
|
10
|
+
export declare const ShortcutsPlugin: ({ editor, setIsLinkEditMode, }: {
|
|
11
|
+
editor: LexicalEditor;
|
|
12
|
+
setIsLinkEditMode: Dispatch<boolean>;
|
|
13
|
+
}) => null;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ShortcutsPlugin = void 0;
|
|
11
|
+
const link_1 = require("@lexical/link");
|
|
12
|
+
const lexical_1 = require("lexical");
|
|
13
|
+
const react_1 = require("react");
|
|
14
|
+
const context_1 = require("../../context");
|
|
15
|
+
const url_1 = require("../../utils/url");
|
|
16
|
+
const utils_1 = require("../ToolbarPlugin/utils");
|
|
17
|
+
const shortcuts_1 = require("./shortcuts");
|
|
18
|
+
const ShortcutsPlugin = ({ editor, setIsLinkEditMode, }) => {
|
|
19
|
+
const { toolbarState } = (0, context_1.useToolbarState)();
|
|
20
|
+
(0, react_1.useEffect)(() => {
|
|
21
|
+
const keyboardShortcutsHandler = (payload) => {
|
|
22
|
+
const event = payload;
|
|
23
|
+
if ((0, shortcuts_1.isFormatParagraph)(event)) {
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
(0, utils_1.formatParagraph)(editor);
|
|
26
|
+
}
|
|
27
|
+
else if ((0, shortcuts_1.isFormatHeading)(event)) {
|
|
28
|
+
event.preventDefault();
|
|
29
|
+
const { code } = event;
|
|
30
|
+
const headingSize = `h${code[code.length - 1]}`;
|
|
31
|
+
(0, utils_1.formatHeading)(editor, toolbarState.blockType, headingSize);
|
|
32
|
+
}
|
|
33
|
+
else if ((0, shortcuts_1.isFormatBulletList)(event)) {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
(0, utils_1.formatBulletList)(editor, toolbarState.blockType);
|
|
36
|
+
}
|
|
37
|
+
else if ((0, shortcuts_1.isFormatNumberedList)(event)) {
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
(0, utils_1.formatNumberedList)(editor, toolbarState.blockType);
|
|
40
|
+
}
|
|
41
|
+
else if ((0, shortcuts_1.isFormatCheckList)(event)) {
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
(0, utils_1.formatCheckList)(editor, toolbarState.blockType);
|
|
44
|
+
}
|
|
45
|
+
else if ((0, shortcuts_1.isFormatCode)(event)) {
|
|
46
|
+
event.preventDefault();
|
|
47
|
+
(0, utils_1.formatCode)(editor, toolbarState.blockType);
|
|
48
|
+
}
|
|
49
|
+
else if ((0, shortcuts_1.isFormatQuote)(event)) {
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
(0, utils_1.formatQuote)(editor, toolbarState.blockType);
|
|
52
|
+
}
|
|
53
|
+
else if ((0, shortcuts_1.isStrikeThrough)(event)) {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
editor.dispatchCommand(lexical_1.FORMAT_TEXT_COMMAND, "strikethrough");
|
|
56
|
+
}
|
|
57
|
+
else if ((0, shortcuts_1.isIndent)(event)) {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
editor.dispatchCommand(lexical_1.INDENT_CONTENT_COMMAND, undefined);
|
|
60
|
+
}
|
|
61
|
+
else if ((0, shortcuts_1.isOutdent)(event)) {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
editor.dispatchCommand(lexical_1.OUTDENT_CONTENT_COMMAND, undefined);
|
|
64
|
+
}
|
|
65
|
+
else if ((0, shortcuts_1.isCenterAlign)(event)) {
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
editor.dispatchCommand(lexical_1.FORMAT_ELEMENT_COMMAND, "center");
|
|
68
|
+
}
|
|
69
|
+
else if ((0, shortcuts_1.isLeftAlign)(event)) {
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
editor.dispatchCommand(lexical_1.FORMAT_ELEMENT_COMMAND, "left");
|
|
72
|
+
}
|
|
73
|
+
else if ((0, shortcuts_1.isRightAlign)(event)) {
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
editor.dispatchCommand(lexical_1.FORMAT_ELEMENT_COMMAND, "right");
|
|
76
|
+
}
|
|
77
|
+
else if ((0, shortcuts_1.isJustifyAlign)(event)) {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
editor.dispatchCommand(lexical_1.FORMAT_ELEMENT_COMMAND, "justify");
|
|
80
|
+
}
|
|
81
|
+
else if ((0, shortcuts_1.isInsertCodeBlock)(event)) {
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
editor.dispatchCommand(lexical_1.FORMAT_TEXT_COMMAND, "code");
|
|
84
|
+
}
|
|
85
|
+
else if ((0, shortcuts_1.isClearFormatting)(event)) {
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
(0, utils_1.clearFormatting)(editor);
|
|
88
|
+
}
|
|
89
|
+
else if ((0, shortcuts_1.isInsertLink)(event)) {
|
|
90
|
+
event.preventDefault();
|
|
91
|
+
const url = toolbarState.isLink ? null : (0, url_1.sanitizeUrl)("https://");
|
|
92
|
+
setIsLinkEditMode(!toolbarState.isLink);
|
|
93
|
+
editor.dispatchCommand(link_1.TOGGLE_LINK_COMMAND, url);
|
|
94
|
+
}
|
|
95
|
+
return false;
|
|
96
|
+
};
|
|
97
|
+
return editor.registerCommand(lexical_1.KEY_MODIFIER_COMMAND, keyboardShortcutsHandler, lexical_1.COMMAND_PRIORITY_NORMAL);
|
|
98
|
+
}, [editor, toolbarState.isLink, toolbarState.blockType, setIsLinkEditMode]);
|
|
99
|
+
return null;
|
|
100
|
+
};
|
|
101
|
+
exports.ShortcutsPlugin = ShortcutsPlugin;
|
|
102
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editor/plugins/ShortcutsPlugin/index.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,wCAAoD;AAEpD,qCAQiB;AACjB,iCAA4C;AAE5C,2CAAgD;AAChD,yCAA8C;AAC9C,kDASgC;AAChC,2CAkBqB;AAEd,MAAM,eAAe,GAAG,CAAC,EAC9B,MAAM,EACN,iBAAiB,GAIlB,EAAQ,EAAE;IACT,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,yBAAe,GAAE,CAAC;IAE3C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,wBAAwB,GAAG,CAAC,OAAsB,EAAE,EAAE;YAC1D,MAAM,KAAK,GAAkB,OAAO,CAAC;YAErC,IAAI,IAAA,6BAAiB,EAAC,KAAK,CAAC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Opt+2" | "Ctrl+Alt+2";
|
|
5
|
+
HEADING3: "⌘+Opt+3" | "Ctrl+Alt+3";
|
|
6
|
+
HEADING4: "⌘+Opt+4" | "Ctrl+Alt+4";
|
|
7
|
+
HEADING5: "⌘+Opt+5" | "Ctrl+Alt+5";
|
|
8
|
+
HEADING6: "⌘+Opt+6" | "Ctrl+Alt+6";
|
|
9
|
+
BULLET_LIST: "⌘+Opt+4" | "Ctrl+Alt+4";
|
|
10
|
+
NUMBERED_LIST: "⌘+Opt+5" | "Ctrl+Alt+5";
|
|
11
|
+
CHECK_LIST: "⌘+Opt+6" | "Ctrl+Alt+6";
|
|
12
|
+
CODE_BLOCK: "⌘+Opt+C" | "Ctrl+Alt+C";
|
|
13
|
+
QUOTE: "⌘+Opt+Q" | "Ctrl+Alt+Q";
|
|
14
|
+
INCREASE_FONT_SIZE: "⌘+Shift+." | "Ctrl+Shift+.";
|
|
15
|
+
DECREASE_FONT_SIZE: "⌘+Shift+," | "Ctrl+Shift+,";
|
|
16
|
+
INSERT_CODE_BLOCK: "⌘+Shift+C" | "Ctrl+Shift+C";
|
|
17
|
+
STRIKETHROUGH: "⌘+Shift+S" | "Ctrl+Shift+S";
|
|
18
|
+
LOWERCASE: "⌘+Shift+1" | "Ctrl+Shift+1";
|
|
19
|
+
UPPERCASE: "⌘+Shift+2" | "Ctrl+Shift+2";
|
|
20
|
+
CAPITALIZE: "⌘+Shift+3" | "Ctrl+Shift+3";
|
|
21
|
+
CENTER_ALIGN: "⌘+Shift+E" | "Ctrl+Shift+E";
|
|
22
|
+
JUSTIFY_ALIGN: "⌘+Shift+J" | "Ctrl+Shift+J";
|
|
23
|
+
LEFT_ALIGN: "⌘+Shift+L" | "Ctrl+Shift+L";
|
|
24
|
+
RIGHT_ALIGN: "⌘+Shift+R" | "Ctrl+Shift+R";
|
|
25
|
+
SUBSCRIPT: "⌘+," | "Ctrl+,";
|
|
26
|
+
SUPERSCRIPT: "⌘+." | "Ctrl+.";
|
|
27
|
+
INDENT: "⌘+]" | "Ctrl+]";
|
|
28
|
+
OUTDENT: "⌘+[" | "Ctrl+[";
|
|
29
|
+
CLEAR_FORMATTING: "⌘+\\" | "Ctrl+\\";
|
|
30
|
+
REDO: "⌘+Shift+Z" | "Ctrl+Y";
|
|
31
|
+
UNDO: "⌘+Z" | "Ctrl+Z";
|
|
32
|
+
BOLD: "⌘+B" | "Ctrl+B";
|
|
33
|
+
ITALIC: "⌘+I" | "Ctrl+I";
|
|
34
|
+
UNDERLINE: "⌘+U" | "Ctrl+U";
|
|
35
|
+
INSERT_LINK: "⌘+K" | "Ctrl+K";
|
|
36
|
+
}>;
|
|
37
|
+
export declare function controlOrMeta(metaKey: boolean, ctrlKey: boolean): boolean;
|
|
38
|
+
export declare function isFormatParagraph(event: KeyboardEvent): boolean;
|
|
39
|
+
export declare function isFormatHeading(event: KeyboardEvent): boolean;
|
|
40
|
+
export declare function isFormatBulletList(event: KeyboardEvent): boolean;
|
|
41
|
+
export declare function isFormatNumberedList(event: KeyboardEvent): boolean;
|
|
42
|
+
export declare function isFormatCheckList(event: KeyboardEvent): boolean;
|
|
43
|
+
export declare function isFormatCode(event: KeyboardEvent): boolean;
|
|
44
|
+
export declare function isFormatQuote(event: KeyboardEvent): boolean;
|
|
45
|
+
export declare function isStrikeThrough(event: KeyboardEvent): boolean;
|
|
46
|
+
export declare function isIndent(event: KeyboardEvent): boolean;
|
|
47
|
+
export declare function isOutdent(event: KeyboardEvent): boolean;
|
|
48
|
+
export declare function isCenterAlign(event: KeyboardEvent): boolean;
|
|
49
|
+
export declare function isLeftAlign(event: KeyboardEvent): boolean;
|
|
50
|
+
export declare function isRightAlign(event: KeyboardEvent): boolean;
|
|
51
|
+
export declare function isJustifyAlign(event: KeyboardEvent): boolean;
|
|
52
|
+
export declare function isInsertCodeBlock(event: KeyboardEvent): boolean;
|
|
53
|
+
export declare function isIncreaseFontSize(event: KeyboardEvent): boolean;
|
|
54
|
+
export declare function isDecreaseFontSize(event: KeyboardEvent): boolean;
|
|
55
|
+
export declare function isClearFormatting(event: KeyboardEvent): boolean;
|
|
56
|
+
export declare function isInsertLink(event: KeyboardEvent): boolean;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SHORTCUTS = void 0;
|
|
4
|
+
exports.controlOrMeta = controlOrMeta;
|
|
5
|
+
exports.isFormatParagraph = isFormatParagraph;
|
|
6
|
+
exports.isFormatHeading = isFormatHeading;
|
|
7
|
+
exports.isFormatBulletList = isFormatBulletList;
|
|
8
|
+
exports.isFormatNumberedList = isFormatNumberedList;
|
|
9
|
+
exports.isFormatCheckList = isFormatCheckList;
|
|
10
|
+
exports.isFormatCode = isFormatCode;
|
|
11
|
+
exports.isFormatQuote = isFormatQuote;
|
|
12
|
+
exports.isStrikeThrough = isStrikeThrough;
|
|
13
|
+
exports.isIndent = isIndent;
|
|
14
|
+
exports.isOutdent = isOutdent;
|
|
15
|
+
exports.isCenterAlign = isCenterAlign;
|
|
16
|
+
exports.isLeftAlign = isLeftAlign;
|
|
17
|
+
exports.isRightAlign = isRightAlign;
|
|
18
|
+
exports.isJustifyAlign = isJustifyAlign;
|
|
19
|
+
exports.isInsertCodeBlock = isInsertCodeBlock;
|
|
20
|
+
exports.isIncreaseFontSize = isIncreaseFontSize;
|
|
21
|
+
exports.isDecreaseFontSize = isDecreaseFontSize;
|
|
22
|
+
exports.isClearFormatting = isClearFormatting;
|
|
23
|
+
exports.isInsertLink = isInsertLink;
|
|
24
|
+
const utils_1 = require("@lexical/utils");
|
|
25
|
+
//disable eslint sorting rule for quick reference to shortcuts
|
|
26
|
+
exports.SHORTCUTS = Object.freeze({
|
|
27
|
+
// (Ctrl|⌘) + (Alt|Option) + <key> shortcuts
|
|
28
|
+
NORMAL: utils_1.IS_APPLE ? "⌘+Opt+0" : "Ctrl+Alt+0",
|
|
29
|
+
HEADING1: utils_1.IS_APPLE ? "⌘+Opt+1" : "Ctrl+Alt+1",
|
|
30
|
+
HEADING2: utils_1.IS_APPLE ? "⌘+Opt+2" : "Ctrl+Alt+2",
|
|
31
|
+
HEADING3: utils_1.IS_APPLE ? "⌘+Opt+3" : "Ctrl+Alt+3",
|
|
32
|
+
HEADING4: utils_1.IS_APPLE ? "⌘+Opt+4" : "Ctrl+Alt+4",
|
|
33
|
+
HEADING5: utils_1.IS_APPLE ? "⌘+Opt+5" : "Ctrl+Alt+5",
|
|
34
|
+
HEADING6: utils_1.IS_APPLE ? "⌘+Opt+6" : "Ctrl+Alt+6",
|
|
35
|
+
BULLET_LIST: utils_1.IS_APPLE ? "⌘+Opt+4" : "Ctrl+Alt+4",
|
|
36
|
+
NUMBERED_LIST: utils_1.IS_APPLE ? "⌘+Opt+5" : "Ctrl+Alt+5",
|
|
37
|
+
CHECK_LIST: utils_1.IS_APPLE ? "⌘+Opt+6" : "Ctrl+Alt+6",
|
|
38
|
+
CODE_BLOCK: utils_1.IS_APPLE ? "⌘+Opt+C" : "Ctrl+Alt+C",
|
|
39
|
+
QUOTE: utils_1.IS_APPLE ? "⌘+Opt+Q" : "Ctrl+Alt+Q",
|
|
40
|
+
// (Ctrl|⌘) + Shift + <key> shortcuts
|
|
41
|
+
INCREASE_FONT_SIZE: utils_1.IS_APPLE ? "⌘+Shift+." : "Ctrl+Shift+.",
|
|
42
|
+
DECREASE_FONT_SIZE: utils_1.IS_APPLE ? "⌘+Shift+," : "Ctrl+Shift+,",
|
|
43
|
+
INSERT_CODE_BLOCK: utils_1.IS_APPLE ? "⌘+Shift+C" : "Ctrl+Shift+C",
|
|
44
|
+
STRIKETHROUGH: utils_1.IS_APPLE ? "⌘+Shift+S" : "Ctrl+Shift+S",
|
|
45
|
+
LOWERCASE: utils_1.IS_APPLE ? "⌘+Shift+1" : "Ctrl+Shift+1",
|
|
46
|
+
UPPERCASE: utils_1.IS_APPLE ? "⌘+Shift+2" : "Ctrl+Shift+2",
|
|
47
|
+
CAPITALIZE: utils_1.IS_APPLE ? "⌘+Shift+3" : "Ctrl+Shift+3",
|
|
48
|
+
CENTER_ALIGN: utils_1.IS_APPLE ? "⌘+Shift+E" : "Ctrl+Shift+E",
|
|
49
|
+
JUSTIFY_ALIGN: utils_1.IS_APPLE ? "⌘+Shift+J" : "Ctrl+Shift+J",
|
|
50
|
+
LEFT_ALIGN: utils_1.IS_APPLE ? "⌘+Shift+L" : "Ctrl+Shift+L",
|
|
51
|
+
RIGHT_ALIGN: utils_1.IS_APPLE ? "⌘+Shift+R" : "Ctrl+Shift+R",
|
|
52
|
+
// (Ctrl|⌘) + <key> shortcuts
|
|
53
|
+
SUBSCRIPT: utils_1.IS_APPLE ? "⌘+," : "Ctrl+,",
|
|
54
|
+
SUPERSCRIPT: utils_1.IS_APPLE ? "⌘+." : "Ctrl+.",
|
|
55
|
+
INDENT: utils_1.IS_APPLE ? "⌘+]" : "Ctrl+]",
|
|
56
|
+
OUTDENT: utils_1.IS_APPLE ? "⌘+[" : "Ctrl+[",
|
|
57
|
+
CLEAR_FORMATTING: utils_1.IS_APPLE ? "⌘+\\" : "Ctrl+\\",
|
|
58
|
+
REDO: utils_1.IS_APPLE ? "⌘+Shift+Z" : "Ctrl+Y",
|
|
59
|
+
UNDO: utils_1.IS_APPLE ? "⌘+Z" : "Ctrl+Z",
|
|
60
|
+
BOLD: utils_1.IS_APPLE ? "⌘+B" : "Ctrl+B",
|
|
61
|
+
ITALIC: utils_1.IS_APPLE ? "⌘+I" : "Ctrl+I",
|
|
62
|
+
UNDERLINE: utils_1.IS_APPLE ? "⌘+U" : "Ctrl+U",
|
|
63
|
+
INSERT_LINK: utils_1.IS_APPLE ? "⌘+K" : "Ctrl+K",
|
|
64
|
+
});
|
|
65
|
+
function controlOrMeta(metaKey, ctrlKey) {
|
|
66
|
+
return utils_1.IS_APPLE ? metaKey : ctrlKey;
|
|
67
|
+
}
|
|
68
|
+
function isFormatParagraph(event) {
|
|
69
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
70
|
+
return (code === "Numpad0" || code === "Digit0") && !shiftKey && altKey && controlOrMeta(metaKey, ctrlKey);
|
|
71
|
+
}
|
|
72
|
+
function isFormatHeading(event) {
|
|
73
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
74
|
+
const keyNumber = code[code.length - 1];
|
|
75
|
+
return ["1", "2", "3"].includes(keyNumber) && !shiftKey && altKey && controlOrMeta(metaKey, ctrlKey);
|
|
76
|
+
}
|
|
77
|
+
function isFormatBulletList(event) {
|
|
78
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
79
|
+
return (code === "Numpad4" || code === "Digit4") && !shiftKey && altKey && controlOrMeta(metaKey, ctrlKey);
|
|
80
|
+
}
|
|
81
|
+
function isFormatNumberedList(event) {
|
|
82
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
83
|
+
return (code === "Numpad5" || code === "Digit5") && !shiftKey && altKey && controlOrMeta(metaKey, ctrlKey);
|
|
84
|
+
}
|
|
85
|
+
function isFormatCheckList(event) {
|
|
86
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
87
|
+
return (code === "Numpad6" || code === "Digit6") && !shiftKey && altKey && controlOrMeta(metaKey, ctrlKey);
|
|
88
|
+
}
|
|
89
|
+
function isFormatCode(event) {
|
|
90
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
91
|
+
return code === "KeyC" && !shiftKey && altKey && controlOrMeta(metaKey, ctrlKey);
|
|
92
|
+
}
|
|
93
|
+
function isFormatQuote(event) {
|
|
94
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
95
|
+
return code === "KeyQ" && !shiftKey && altKey && controlOrMeta(metaKey, ctrlKey);
|
|
96
|
+
}
|
|
97
|
+
function isStrikeThrough(event) {
|
|
98
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
99
|
+
return code === "KeyS" && shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
100
|
+
}
|
|
101
|
+
function isIndent(event) {
|
|
102
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
103
|
+
return code === "BracketRight" && !shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
104
|
+
}
|
|
105
|
+
function isOutdent(event) {
|
|
106
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
107
|
+
return code === "BracketLeft" && !shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
108
|
+
}
|
|
109
|
+
function isCenterAlign(event) {
|
|
110
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
111
|
+
return code === "KeyE" && shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
112
|
+
}
|
|
113
|
+
function isLeftAlign(event) {
|
|
114
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
115
|
+
return code === "KeyL" && shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
116
|
+
}
|
|
117
|
+
function isRightAlign(event) {
|
|
118
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
119
|
+
return code === "KeyR" && shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
120
|
+
}
|
|
121
|
+
function isJustifyAlign(event) {
|
|
122
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
123
|
+
return code === "KeyJ" && shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
124
|
+
}
|
|
125
|
+
function isInsertCodeBlock(event) {
|
|
126
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
127
|
+
return code === "KeyC" && shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
128
|
+
}
|
|
129
|
+
function isIncreaseFontSize(event) {
|
|
130
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
131
|
+
return code === "Period" && shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
132
|
+
}
|
|
133
|
+
function isDecreaseFontSize(event) {
|
|
134
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
135
|
+
return code === "Comma" && shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
136
|
+
}
|
|
137
|
+
function isClearFormatting(event) {
|
|
138
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
139
|
+
return code === "Backslash" && !shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
140
|
+
}
|
|
141
|
+
function isInsertLink(event) {
|
|
142
|
+
const { code, shiftKey, altKey, metaKey, ctrlKey } = event;
|
|
143
|
+
return code === "KeyK" && !shiftKey && !altKey && controlOrMeta(metaKey, ctrlKey);
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=shortcuts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortcuts.js","sourceRoot":"","sources":["../../../../src/editor/plugins/ShortcutsPlugin/shortcuts.ts"],"names":[],"mappings":";;;AA6CA,sCAEC;AAED,8CAIC;AAED,0CAKC;AAED,gDAGC;AAED,oDAGC;AAED,8CAGC;AAED,oCAGC;AAED,sCAGC;AAED,0CAGC;AAED,4BAGC;AAED,8BAGC;AAED,sCAGC;AAED,kCAGC;AAED,oCAGC;AAED,wCAGC;AAED,8CAGC;AAED,gDAGC;AAED,gDAGC;AAED,8CAGC;AAED,oCAGC;AAjJD,0CAA0C;AAE1C,8DAA8D;AACjD,QAAA,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;IACrC,4CAA4C;IAC5C,MAAM,EAAE,gBAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY;IAC3C,QAAQ,EAAE,gBAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY;IAC7C,QAAQ,EAAE,gBAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY;IAC7C,QAAQ,EA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