@maketribe/ms-app 3.2.33 → 3.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/basic/doc-editor/core/LexicalComposer.vue.js +74 -0
- package/dist/cjs/components/basic/doc-editor/core/LexicalComposer.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/LexicalComposer.vue2.js +4 -0
- package/dist/cjs/components/basic/doc-editor/core/LexicalComposer.vue2.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/inject.js +5 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/inject.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/listenerManager.js +18 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/listenerManager.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useCanShowPlaceholder.js +31 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useCanShowPlaceholder.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useDecorators.js +31 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useDecorators.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useHistory.js +15 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useHistory.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useLexicalComposer.js +17 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useLexicalComposer.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useLexicalTextEntity.js +16 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useLexicalTextEntity.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useList.js +48 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useList.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useMounted.js +14 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useMounted.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useRichTextSetup.js +16 -0
- package/dist/cjs/components/basic/doc-editor/core/composables/useRichTextSetup.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/element-block.js +12 -3
- package/dist/cjs/components/basic/doc-editor/core/element-block.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/core/index.js +14 -0
- package/dist/cjs/components/basic/doc-editor/core/index.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/{plugins/RichTextPlugin/nodes/RichTextNode.js → core/nodes/RichElementNode.js} +81 -35
- package/dist/cjs/components/basic/doc-editor/core/nodes/RichElementNode.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalAutoFocusPlugin.vue.js +42 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalAutoFocusPlugin.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalAutoFocusPlugin.vue2.js +4 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalAutoFocusPlugin.vue2.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/index.vue.js +4 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/index.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/index.vue2.js +37 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/index.vue2.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/shared.js +176 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/shared.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalCheckListPlugin.vue.js +215 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalCheckListPlugin.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalCheckListPlugin.vue2.js +4 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalCheckListPlugin.vue2.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalHashtagPlugin.vue.js +75 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalHashtagPlugin.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalHashtagPlugin.vue2.js +4 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalHashtagPlugin.vue2.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalHistoryPlugin.vue.js +29 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalHistoryPlugin.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalHistoryPlugin.vue2.js +4 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalHistoryPlugin.vue2.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalLinkPlugin.vue.js +4 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalLinkPlugin.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalLinkPlugin.vue2.js +77 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalLinkPlugin.vue2.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalListPlugin.vue.js +25 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalListPlugin.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalListPlugin.vue2.js +4 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalListPlugin.vue2.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/ContentEditable.vue.js +14 -3
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalRichTextPlugin/ContentEditable.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalRichTextPlugin/DecoratedTeleports.js +24 -0
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalRichTextPlugin/DecoratedTeleports.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/index.vue.js +20 -9
- package/dist/cjs/components/basic/doc-editor/core/plugins/LexicalRichTextPlugin/index.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/editor.vue.js +19 -12
- package/dist/cjs/components/basic/doc-editor/editor.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/{plugins/nodes.js → nodes.js} +13 -11
- package/dist/cjs/components/basic/doc-editor/nodes.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/plugins/AutoLinkPlugin/index.vue.js +5 -3
- package/dist/cjs/components/basic/doc-editor/plugins/AutoLinkPlugin/index.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ElementBlockSelectionPlugin/index.vue.js +13 -4
- package/dist/cjs/components/basic/doc-editor/plugins/ElementBlockSelectionPlugin/index.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/GridPlugin/index.vue.js +10 -2
- package/dist/cjs/components/basic/doc-editor/plugins/GridPlugin/index.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/index.vue.js +23 -15
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/index.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ModulePlugin/composables.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ModulePlugin/index.vue.js +10 -2
- package/dist/cjs/components/basic/doc-editor/plugins/ModulePlugin/index.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/TemplatePlugin/composables.js +12 -3
- package/dist/cjs/components/basic/doc-editor/plugins/TemplatePlugin/composables.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/TemplatePlugin/index.vue.js +13 -3
- package/dist/cjs/components/basic/doc-editor/plugins/TemplatePlugin/index.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/ContentStyleTool.vue.js +8 -2
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/ContentStyleTool.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/FontStyleTool.vue.js +10 -2
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/FontStyleTool.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/PreviewToolbar.vue.js +16 -4
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/PreviewToolbar.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/index.vue.js +10 -2
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/index.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/themes/doc-editor-edit.css.js +1 -1
- package/dist/cjs/components/basic/doc-editor/themes/doc-editor-edit.css.js.map +1 -1
- package/dist/cjs/modules/cms/pages/cms-contents/components/article-list.vue.js +7 -5
- package/dist/cjs/modules/cms/pages/cms-contents/components/article-list.vue.js.map +1 -1
- package/dist/cjs/modules/cms/pages/cms-contents/components/part-banner-edit.vue.js +2 -2
- package/dist/cjs/modules/cms/pages/cms-contents/components/part-banner-edit.vue.js.map +1 -1
- package/dist/cjs/modules/cms/pages/cms-contents/components/part-info.vue.js +0 -3
- package/dist/cjs/modules/cms/pages/cms-contents/components/part-info.vue.js.map +1 -1
- package/dist/cjs/modules/cms/pages/cms-contents/index.vue2.js +9 -5
- package/dist/cjs/modules/cms/pages/cms-contents/index.vue2.js.map +1 -1
- package/dist/cjs/modules/ms/components/rich-text-editor/index.js.map +1 -1
- package/dist/cjs/modules/ms/components/rich-text-editor/rich-text-editor-options.js +2 -4
- package/dist/cjs/modules/ms/components/rich-text-editor/rich-text-editor-options.js.map +1 -1
- package/dist/cjs/modules/ms/components/rich-text-editor/rich-text-editor.js +5 -4
- package/dist/cjs/modules/ms/components/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/core/LexicalComposer.vue.js +75 -0
- package/dist/esm/components/basic/doc-editor/core/LexicalComposer.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/LexicalComposer.vue2.js +5 -0
- package/dist/esm/components/basic/doc-editor/core/LexicalComposer.vue2.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/composables/inject.js +5 -0
- package/dist/esm/components/basic/doc-editor/core/composables/inject.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/composables/listenerManager.js +18 -0
- package/dist/esm/components/basic/doc-editor/core/composables/listenerManager.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useCanShowPlaceholder.js +31 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useCanShowPlaceholder.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useDecorators.js +31 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useDecorators.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useHistory.js +15 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useHistory.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useLexicalComposer.js +17 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useLexicalComposer.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useLexicalTextEntity.js +16 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useLexicalTextEntity.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useList.js +48 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useList.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useMounted.js +14 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useMounted.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useRichTextSetup.js +16 -0
- package/dist/esm/components/basic/doc-editor/core/composables/useRichTextSetup.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/element-block.js +10 -1
- package/dist/esm/components/basic/doc-editor/core/element-block.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/core/index.js +14 -0
- package/dist/esm/components/basic/doc-editor/core/index.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/{plugins/RichTextPlugin/nodes/RichTextNode.js → core/nodes/RichElementNode.js} +82 -36
- package/dist/esm/components/basic/doc-editor/core/nodes/RichElementNode.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalAutoFocusPlugin.vue.js +43 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalAutoFocusPlugin.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalAutoFocusPlugin.vue2.js +5 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalAutoFocusPlugin.vue2.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/index.vue.js +5 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/index.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/index.vue2.js +38 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/index.vue2.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/shared.js +176 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/shared.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalCheckListPlugin.vue.js +216 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalCheckListPlugin.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalCheckListPlugin.vue2.js +5 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalCheckListPlugin.vue2.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalHashtagPlugin.vue.js +76 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalHashtagPlugin.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalHashtagPlugin.vue2.js +5 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalHashtagPlugin.vue2.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalHistoryPlugin.vue.js +30 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalHistoryPlugin.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalHistoryPlugin.vue2.js +5 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalHistoryPlugin.vue2.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalLinkPlugin.vue.js +5 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalLinkPlugin.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalLinkPlugin.vue2.js +78 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalLinkPlugin.vue2.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalListPlugin.vue.js +26 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalListPlugin.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalListPlugin.vue2.js +5 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalListPlugin.vue2.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/ContentEditable.vue.js +12 -1
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalRichTextPlugin/ContentEditable.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalRichTextPlugin/DecoratedTeleports.js +25 -0
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalRichTextPlugin/DecoratedTeleports.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/index.vue.js +19 -8
- package/dist/esm/components/basic/doc-editor/core/plugins/LexicalRichTextPlugin/index.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/editor.vue.js +31 -24
- package/dist/esm/components/basic/doc-editor/editor.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/{plugins/nodes.js → nodes.js} +13 -11
- package/dist/esm/components/basic/doc-editor/nodes.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/plugins/AutoLinkPlugin/index.vue.js +5 -3
- package/dist/esm/components/basic/doc-editor/plugins/AutoLinkPlugin/index.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ElementBlockSelectionPlugin/index.vue.js +12 -3
- package/dist/esm/components/basic/doc-editor/plugins/ElementBlockSelectionPlugin/index.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/GridPlugin/index.vue.js +9 -1
- package/dist/esm/components/basic/doc-editor/plugins/GridPlugin/index.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/index.vue.js +14 -6
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/index.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ModulePlugin/composables.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ModulePlugin/index.vue.js +9 -1
- package/dist/esm/components/basic/doc-editor/plugins/ModulePlugin/index.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/TemplatePlugin/composables.js +10 -1
- package/dist/esm/components/basic/doc-editor/plugins/TemplatePlugin/composables.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/TemplatePlugin/index.vue.js +12 -2
- package/dist/esm/components/basic/doc-editor/plugins/TemplatePlugin/index.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/ContentStyleTool.vue.js +7 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/ContentStyleTool.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/FontStyleTool.vue.js +9 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/FontStyleTool.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/PreviewToolbar.vue.js +13 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/PreviewToolbar.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/index.vue.js +9 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/index.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/themes/doc-editor-edit.css.js +1 -1
- package/dist/esm/components/basic/doc-editor/themes/doc-editor-edit.css.js.map +1 -1
- package/dist/esm/modules/cms/pages/cms-contents/components/article-list.vue.js +7 -5
- package/dist/esm/modules/cms/pages/cms-contents/components/article-list.vue.js.map +1 -1
- package/dist/esm/modules/cms/pages/cms-contents/components/part-banner-edit.vue.js +2 -2
- package/dist/esm/modules/cms/pages/cms-contents/components/part-banner-edit.vue.js.map +1 -1
- package/dist/esm/modules/cms/pages/cms-contents/components/part-info.vue.js +0 -3
- package/dist/esm/modules/cms/pages/cms-contents/components/part-info.vue.js.map +1 -1
- package/dist/esm/modules/cms/pages/cms-contents/index.vue2.js +9 -5
- package/dist/esm/modules/cms/pages/cms-contents/index.vue2.js.map +1 -1
- package/dist/esm/modules/ms/components/rich-text-editor/index.js.map +1 -1
- package/dist/esm/modules/ms/components/rich-text-editor/rich-text-editor-options.js +2 -4
- package/dist/esm/modules/ms/components/rich-text-editor/rich-text-editor-options.js.map +1 -1
- package/dist/esm/modules/ms/components/rich-text-editor/rich-text-editor.js +5 -4
- package/dist/esm/modules/ms/components/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/style/components/basic/doc-editor/index.css +1 -1
- package/dist/style/components/index.css +1 -1
- package/dist/style/index.css +2 -2
- package/dist/style/modules/cms/index.css +1 -1
- package/dist/style/modules/cms/pages/cms-contents/components/article-list.css +1 -1
- package/dist/style/modules/cms/pages/cms-contents/index.css +1 -1
- package/dist/style/modules/ms/components/rich-text-editor/index.css +1 -1
- package/dist/style/modules/ms/index.css +1 -1
- package/dist/style/src/components/basic/doc-editor/index.scss +3 -2
- package/dist/style/src/modules/cms/pages/cms-contents/components/article-list.scss +1 -0
- package/dist/style/src/modules/ms/components/rich-text-editor/index.scss +1 -1
- package/dist/types/components/basic/doc-editor/core/LexicalComposer.vue.d.ts +29 -0
- package/dist/types/components/basic/doc-editor/core/composables/index.d.ts +15 -0
- package/dist/types/components/basic/doc-editor/core/composables/inject.d.ts +1 -0
- package/dist/types/components/basic/doc-editor/core/composables/listenerManager.d.ts +1 -0
- package/dist/types/components/basic/doc-editor/core/composables/useCanShowPlaceholder.d.ts +2 -0
- package/dist/types/components/basic/doc-editor/core/composables/useCharacterLimit.d.ts +9 -0
- package/dist/types/components/basic/doc-editor/core/composables/useDecorators.d.ts +4 -0
- package/dist/types/components/basic/doc-editor/core/composables/useEffect.d.ts +5 -0
- package/dist/types/components/basic/doc-editor/core/composables/useHistory.d.ts +4 -0
- package/dist/types/components/basic/doc-editor/core/composables/useLexicalCommandsLog.d.ts +5 -0
- package/dist/types/components/basic/doc-editor/core/composables/useLexicalComposer.d.ts +6 -0
- package/dist/types/components/basic/doc-editor/core/composables/useLexicalIsTextContentEmpty.d.ts +2 -0
- package/dist/types/components/basic/doc-editor/core/composables/useLexicalNodeSelection.d.ts +7 -0
- package/dist/types/components/basic/doc-editor/core/composables/useLexicalTextEntity.d.ts +3 -0
- package/dist/types/components/basic/doc-editor/core/composables/useList.d.ts +2 -0
- package/dist/types/components/basic/doc-editor/core/composables/useMounted.d.ts +4 -0
- package/dist/types/components/basic/doc-editor/core/composables/usePlainTextSetup.d.ts +2 -0
- package/dist/types/components/basic/doc-editor/core/composables/useReactiveEditor.d.ts +2 -0
- package/dist/types/components/basic/doc-editor/core/composables/useRichTextSetup.d.ts +2 -0
- package/dist/types/components/basic/doc-editor/core/composables/useTableOfContents.d.ts +8 -0
- package/dist/types/components/basic/doc-editor/core/index.d.ts +8 -0
- package/dist/types/components/basic/doc-editor/core/nodes/RichElementNode.d.ts +46 -0
- package/dist/types/components/basic/doc-editor/core/nodes/index.d.ts +1 -0
- package/dist/types/components/basic/doc-editor/core/plugins/LexicalAutoFocusPlugin.vue.d.ts +15 -0
- package/dist/types/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/index.vue.d.ts +26 -0
- package/dist/types/components/basic/doc-editor/core/plugins/LexicalAutoLinkPlugin/shared.d.ts +14 -0
- package/dist/types/components/basic/doc-editor/core/plugins/LexicalCheckListPlugin.vue.d.ts +2 -0
- package/dist/types/components/basic/doc-editor/core/plugins/LexicalHashtagPlugin.vue.d.ts +2 -0
- package/dist/types/components/basic/doc-editor/core/plugins/LexicalHistoryPlugin.vue.d.ts +16 -0
- package/dist/types/components/basic/doc-editor/core/plugins/LexicalLinkPlugin.vue.d.ts +15 -0
- package/dist/types/components/basic/doc-editor/core/plugins/LexicalListPlugin.vue.d.ts +2 -0
- package/dist/types/components/basic/doc-editor/core/types.d.ts +2 -0
- package/dist/types/components/basic/doc-editor/plugins/ModulePlugin/composables.d.ts +1 -1
- package/dist/types/components/basic/doc-editor/plugins/TemplatePlugin/composables.d.ts +1 -0
- package/dist/types/components/basic/doc-editor/plugins/index.d.ts +1 -3
- package/dist/types/components/data-model/data-table/views/table/index.d.ts +1 -1
- package/dist/types/components/data-model/data-table/views/table/table.d.ts +1 -1
- package/dist/types/components/data-model/data-table/views/tree/index.d.ts +1 -1
- package/dist/types/components/data-model/data-table/views/tree/tree.d.ts +1 -1
- package/dist/types/modules/ms/components/material-list/material-item.vue.d.ts +1 -1
- package/dist/types/modules/ms/components/rich-text-editor/index.d.ts +2 -2
- package/dist/types/modules/ms/components/rich-text-editor/rich-text-editor-options.d.ts +1 -1
- package/dist/types/modules/ms/components/rich-text-editor/rich-text-editor.d.ts +2 -2
- package/package.json +21 -22
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/ContentEditable.vue.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/DecoratedTeleports.js +0 -13
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/DecoratedTeleports.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/index.vue.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/nodes/RichTextNode.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/plugins/nodes.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/ContentEditable.vue.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/DecoratedTeleports.js +0 -14
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/DecoratedTeleports.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/index.vue.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/nodes/RichTextNode.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/plugins/nodes.js.map +0 -1
- package/dist/types/components/basic/doc-editor/plugins/RichTextPlugin/nodes/RichTextNode.d.ts +0 -13
- package/dist/types/components/basic/doc-editor/plugins/VideoPlugin/VideoNode.d.ts +0 -23
- /package/dist/cjs/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/ContentEditable.vue2.js +0 -0
- /package/dist/cjs/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/ContentEditable.vue2.js.map +0 -0
- /package/dist/cjs/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/index.vue2.js +0 -0
- /package/dist/cjs/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/index.vue2.js.map +0 -0
- /package/dist/esm/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/ContentEditable.vue2.js +0 -0
- /package/dist/esm/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/ContentEditable.vue2.js.map +0 -0
- /package/dist/esm/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/index.vue2.js +0 -0
- /package/dist/esm/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/index.vue2.js.map +0 -0
- /package/dist/types/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/ContentEditable.vue.d.ts +0 -0
- /package/dist/types/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/DecoratedTeleports.d.ts +0 -0
- /package/dist/types/components/basic/doc-editor/{plugins/RichTextPlugin → core/plugins/LexicalRichTextPlugin}/index.vue.d.ts +0 -0
- /package/dist/types/components/basic/doc-editor/{plugins/nodes.d.ts → nodes.d.ts} +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const lexical = require("lexical");
|
|
4
|
+
const inject = require("./composables/inject.js");
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
6
|
+
__name: "LexicalComposer",
|
|
7
|
+
props: {
|
|
8
|
+
initialConfig: {}
|
|
9
|
+
},
|
|
10
|
+
emits: ["error"],
|
|
11
|
+
setup(__props, { emit: __emit }) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const emit = __emit;
|
|
14
|
+
const HISTORY_MERGE_OPTIONS = { tag: "history-merge" };
|
|
15
|
+
const editor = lexical.createEditor({
|
|
16
|
+
editable: props.initialConfig.editable,
|
|
17
|
+
html: props.initialConfig.html,
|
|
18
|
+
namespace: props.initialConfig.namespace,
|
|
19
|
+
nodes: props.initialConfig.nodes,
|
|
20
|
+
theme: props.initialConfig.theme,
|
|
21
|
+
onError(error) {
|
|
22
|
+
emit("error", error, editor);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
initializeEditor(editor, props.initialConfig.editorState);
|
|
26
|
+
function initializeEditor(editor2, initialEditorState) {
|
|
27
|
+
if (initialEditorState === null)
|
|
28
|
+
return;
|
|
29
|
+
if (initialEditorState === void 0) {
|
|
30
|
+
editor2.update(() => {
|
|
31
|
+
const root = lexical.$getRoot();
|
|
32
|
+
if (root.isEmpty()) {
|
|
33
|
+
const paragraph = lexical.$createParagraphNode();
|
|
34
|
+
root.append(paragraph);
|
|
35
|
+
const activeElement = document.activeElement;
|
|
36
|
+
if (lexical.$getSelection() !== null || activeElement !== null && activeElement === editor2.getRootElement()) {
|
|
37
|
+
paragraph.select();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, HISTORY_MERGE_OPTIONS);
|
|
41
|
+
} else if (initialEditorState !== null) {
|
|
42
|
+
switch (typeof initialEditorState) {
|
|
43
|
+
case "string": {
|
|
44
|
+
const parsedEditorState = editor2.parseEditorState(initialEditorState);
|
|
45
|
+
editor2.setEditorState(parsedEditorState, HISTORY_MERGE_OPTIONS);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case "object": {
|
|
49
|
+
editor2.setEditorState(initialEditorState, HISTORY_MERGE_OPTIONS);
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
case "function": {
|
|
53
|
+
editor2.update(() => {
|
|
54
|
+
const root = lexical.$getRoot();
|
|
55
|
+
if (root.isEmpty())
|
|
56
|
+
initialEditorState(editor2);
|
|
57
|
+
}, HISTORY_MERGE_OPTIONS);
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
vue.provide(inject.LexicalEditorProviderKey, editor);
|
|
64
|
+
vue.onMounted(() => {
|
|
65
|
+
const isEditable = props.initialConfig.editable;
|
|
66
|
+
editor.setEditable(isEditable !== void 0 ? isEditable : true);
|
|
67
|
+
});
|
|
68
|
+
return (_ctx, _cache) => {
|
|
69
|
+
return vue.renderSlot(_ctx.$slots, "default");
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
module.exports = _sfc_main;
|
|
74
|
+
//# sourceMappingURL=LexicalComposer.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LexicalComposer.vue.js","sources":["../../../../../../src/components/basic/doc-editor/core/LexicalComposer.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { onMounted, provide } from 'vue'\r\nimport type { CreateEditorArgs, LexicalEditor } from 'lexical'\r\nimport { $createParagraphNode, $getRoot, $getSelection, createEditor } from 'lexical'\r\nimport { LexicalEditorProviderKey } from './composables/inject'\r\nimport type { InitialEditorStateType } from './types'\r\n\r\nconst props = defineProps<{\r\n initialConfig: CreateEditorArgs\r\n}>()\r\n\r\nconst emit = defineEmits<{\r\n (e: 'error', error: Error, editor: LexicalEditor): void\r\n}>()\r\n\r\nconst HISTORY_MERGE_OPTIONS = { tag: 'history-merge' }\r\n\r\nconst editor = createEditor({\r\n editable: props.initialConfig.editable,\r\n html: props.initialConfig.html,\r\n namespace: props.initialConfig.namespace,\r\n nodes: props.initialConfig.nodes,\r\n theme: props.initialConfig.theme,\r\n onError(error) {\r\n emit('error', error, editor)\r\n },\r\n})\r\n\r\ninitializeEditor(editor, props.initialConfig.editorState)\r\n\r\nfunction initializeEditor(\r\n editor: LexicalEditor,\r\n initialEditorState?: InitialEditorStateType,\r\n): void {\r\n if (initialEditorState === null)\r\n return\r\n\r\n if (initialEditorState === undefined) {\r\n editor.update(() => {\r\n const root = $getRoot()\r\n if (root.isEmpty()) {\r\n const paragraph = $createParagraphNode()\r\n root.append(paragraph)\r\n const activeElement = document.activeElement\r\n if (\r\n $getSelection() !== null\r\n || (activeElement !== null && activeElement === editor.getRootElement())\r\n ) {\r\n paragraph.select()\r\n }\r\n }\r\n }, HISTORY_MERGE_OPTIONS)\r\n }\r\n else if (initialEditorState !== null) {\r\n switch (typeof initialEditorState) {\r\n case 'string': {\r\n const parsedEditorState = editor.parseEditorState(initialEditorState)\r\n editor.setEditorState(parsedEditorState, HISTORY_MERGE_OPTIONS)\r\n break\r\n }\r\n case 'object': {\r\n editor.setEditorState(initialEditorState, HISTORY_MERGE_OPTIONS)\r\n break\r\n }\r\n case 'function': {\r\n editor.update(() => {\r\n const root = $getRoot()\r\n if (root.isEmpty())\r\n initialEditorState(editor)\r\n }, HISTORY_MERGE_OPTIONS)\r\n break\r\n }\r\n }\r\n }\r\n}\r\n\r\nprovide<LexicalEditor>(LexicalEditorProviderKey, editor)\r\n\r\nonMounted(() => {\r\n const isEditable = props.initialConfig.editable\r\n\r\n editor.setEditable(isEditable !== undefined ? isEditable : true)\r\n})\r\n</script>\r\n\r\n<template>\r\n <slot />\r\n</template>\r\n"],"names":["createEditor","editor","$getRoot","$createParagraphNode","$getSelection","provide","LexicalEditorProviderKey","onMounted"],"mappings":";;;;;;;;;;;AAOA,UAAM,QAAQ;AAId,UAAM,OAAO;AAIP,UAAA,wBAAwB,EAAE,KAAK;AAErC,UAAM,SAASA,QAAAA,aAAa;AAAA,MAC1B,UAAU,MAAM,cAAc;AAAA,MAC9B,MAAM,MAAM,cAAc;AAAA,MAC1B,WAAW,MAAM,cAAc;AAAA,MAC/B,OAAO,MAAM,cAAc;AAAA,MAC3B,OAAO,MAAM,cAAc;AAAA,MAC3B,QAAQ,OAAO;AACR,aAAA,SAAS,OAAO,MAAM;AAAA,MAC7B;AAAA,IAAA,CACD;AAEgB,qBAAA,QAAQ,MAAM,cAAc,WAAW;AAE/C,aAAA,iBACPC,SACA,oBACM;AACN,UAAI,uBAAuB;AACzB;AAEF,UAAI,uBAAuB,QAAW;AACpCA,gBAAO,OAAO,MAAM;AAClB,gBAAM,OAAOC,QAAAA;AACT,cAAA,KAAK,WAAW;AAClB,kBAAM,YAAYC,QAAAA;AAClB,iBAAK,OAAO,SAAS;AACrB,kBAAM,gBAAgB,SAAS;AAE7B,gBAAAC,QAAA,cAAA,MAAoB,QAChB,kBAAkB,QAAQ,kBAAkBH,QAAO,kBACvD;AACA,wBAAU,OAAO;AAAA,YACnB;AAAA,UACF;AAAA,WACC,qBAAqB;AAAA,MAAA,WAEjB,uBAAuB,MAAM;AACpC,gBAAQ,OAAO,oBAAoB;AAAA,UACjC,KAAK,UAAU;AACP,kBAAA,oBAAoBA,QAAO,iBAAiB,kBAAkB;AACpEA,oBAAO,eAAe,mBAAmB,qBAAqB;AAC9D;AAAA,UACF;AAAA,UACA,KAAK,UAAU;AACbA,oBAAO,eAAe,oBAAoB,qBAAqB;AAC/D;AAAA,UACF;AAAA,UACA,KAAK,YAAY;AACfA,oBAAO,OAAO,MAAM;AAClB,oBAAM,OAAOC,QAAAA;AACb,kBAAI,KAAK,QAAQ;AACf,mCAAmBD,OAAM;AAAA,eAC1B,qBAAqB;AACxB;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEAI,gBAAuBC,OAAAA,0BAA0B,MAAM;AAEvDC,QAAAA,UAAU,MAAM;AACR,YAAA,aAAa,MAAM,cAAc;AAEvC,aAAO,YAAY,eAAe,SAAY,aAAa,IAAI;AAAA,IAAA,CAChE;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LexicalComposer.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject.js","sources":["../../../../../../../src/components/basic/doc-editor/core/composables/inject.ts"],"sourcesContent":["export const LexicalEditorProviderKey = 'LexicalEditorProviderKey'\r\n"],"names":[],"mappings":";;AAAO,MAAM,2BAA2B;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
let handleClickAndPointerDownListenersCount = 0;
|
|
4
|
+
let handleClickAndPointerDownListenersUnregister;
|
|
5
|
+
function registerClickAndPointerListeners(register, unregister) {
|
|
6
|
+
if (handleClickAndPointerDownListenersCount++ === 0) {
|
|
7
|
+
register();
|
|
8
|
+
handleClickAndPointerDownListenersUnregister = unregister;
|
|
9
|
+
}
|
|
10
|
+
return () => {
|
|
11
|
+
if (--handleClickAndPointerDownListenersCount === 0) {
|
|
12
|
+
handleClickAndPointerDownListenersUnregister == null ? void 0 : handleClickAndPointerDownListenersUnregister();
|
|
13
|
+
handleClickAndPointerDownListenersUnregister = void 0;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.registerClickAndPointerListeners = registerClickAndPointerListeners;
|
|
18
|
+
//# sourceMappingURL=listenerManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listenerManager.js","sources":["../../../../../../../src/components/basic/doc-editor/core/composables/listenerManager.ts"],"sourcesContent":["let handleClickAndPointerDownListenersCount = 0\r\nlet handleClickAndPointerDownListenersUnregister: (() => void) | undefined\r\n\r\nexport function registerClickAndPointerListeners(register: () => void, unregister: () => void) {\r\n if (handleClickAndPointerDownListenersCount++ === 0) {\r\n register()\r\n handleClickAndPointerDownListenersUnregister = unregister\r\n }\r\n\r\n return () => {\r\n if (--handleClickAndPointerDownListenersCount === 0) {\r\n handleClickAndPointerDownListenersUnregister?.()\r\n handleClickAndPointerDownListenersUnregister = undefined\r\n }\r\n }\r\n}\r\n"],"names":[],"mappings":";;AAAA,IAAI,0CAA0C;AAC9C,IAAI;AAEY,SAAA,iCAAiC,UAAsB,YAAwB;AAC7F,MAAI,8CAA8C,GAAG;AAC1C;AACsC,mDAAA;AAAA,EACjD;AAEA,SAAO,MAAM;AACP,QAAA,EAAE,4CAA4C,GAAG;AACJ;AACA,qDAAA;AAAA,IACjD;AAAA,EAAA;AAEJ;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const text = require("@lexical/text");
|
|
5
|
+
const utils = require("@lexical/utils");
|
|
6
|
+
const useMounted = require("./useMounted.js");
|
|
7
|
+
function canShowPlaceholderFromCurrentEditorState(editor) {
|
|
8
|
+
const currentCanShowPlaceholder = editor.getEditorState().read(text.$canShowPlaceholderCurry(editor.isComposing()));
|
|
9
|
+
return currentCanShowPlaceholder;
|
|
10
|
+
}
|
|
11
|
+
function useCanShowPlaceholder(editor) {
|
|
12
|
+
const initialState = editor.getEditorState().read(text.$canShowPlaceholderCurry(editor.isComposing()));
|
|
13
|
+
const canShowPlaceholder = vue.ref(initialState);
|
|
14
|
+
function resetCanShowPlaceholder() {
|
|
15
|
+
const currentCanShowPlaceholder = canShowPlaceholderFromCurrentEditorState(editor);
|
|
16
|
+
canShowPlaceholder.value = currentCanShowPlaceholder;
|
|
17
|
+
}
|
|
18
|
+
useMounted.useMounted(() => {
|
|
19
|
+
return utils.mergeRegister(
|
|
20
|
+
editor.registerUpdateListener(() => {
|
|
21
|
+
resetCanShowPlaceholder();
|
|
22
|
+
}),
|
|
23
|
+
editor.registerEditableListener(() => {
|
|
24
|
+
resetCanShowPlaceholder();
|
|
25
|
+
})
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
return vue.readonly(canShowPlaceholder);
|
|
29
|
+
}
|
|
30
|
+
exports.useCanShowPlaceholder = useCanShowPlaceholder;
|
|
31
|
+
//# sourceMappingURL=useCanShowPlaceholder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCanShowPlaceholder.js","sources":["../../../../../../../src/components/basic/doc-editor/core/composables/useCanShowPlaceholder.ts"],"sourcesContent":["import { readonly, ref } from 'vue'\r\nimport { $canShowPlaceholderCurry } from '@lexical/text'\r\nimport type { LexicalEditor } from 'lexical'\r\nimport { mergeRegister } from '@lexical/utils'\r\nimport { useMounted } from './useMounted'\r\n\r\nfunction canShowPlaceholderFromCurrentEditorState(\r\n editor: LexicalEditor,\r\n): boolean {\r\n const currentCanShowPlaceholder = editor\r\n .getEditorState()\r\n .read($canShowPlaceholderCurry(editor.isComposing()))\r\n\r\n return currentCanShowPlaceholder\r\n}\r\n\r\nexport function useCanShowPlaceholder(editor: LexicalEditor) {\r\n const initialState = editor\r\n .getEditorState()\r\n .read($canShowPlaceholderCurry(editor.isComposing()))\r\n\r\n const canShowPlaceholder = ref(initialState)\r\n\r\n function resetCanShowPlaceholder() {\r\n const currentCanShowPlaceholder\r\n = canShowPlaceholderFromCurrentEditorState(editor)\r\n canShowPlaceholder.value = currentCanShowPlaceholder\r\n }\r\n\r\n useMounted(() => {\r\n return mergeRegister(\r\n editor.registerUpdateListener(() => {\r\n resetCanShowPlaceholder()\r\n }),\r\n editor.registerEditableListener(() => {\r\n resetCanShowPlaceholder()\r\n }),\r\n )\r\n })\r\n\r\n return readonly(canShowPlaceholder)\r\n}\r\n"],"names":["$canShowPlaceholderCurry","ref","useMounted","mergeRegister","readonly"],"mappings":";;;;;;AAMA,SAAS,yCACP,QACS;AACH,QAAA,4BAA4B,OAC/B,iBACA,KAAKA,KAAAA,yBAAyB,OAAO,YAAa,CAAA,CAAC;AAE/C,SAAA;AACT;AAEO,SAAS,sBAAsB,QAAuB;AACrD,QAAA,eAAe,OAClB,iBACA,KAAKA,KAAAA,yBAAyB,OAAO,YAAa,CAAA,CAAC;AAEhD,QAAA,qBAAqBC,QAAI,YAAY;AAE3C,WAAS,0BAA0B;AAC3B,UAAA,4BACJ,yCAAyC,MAAM;AACjD,uBAAmB,QAAQ;AAAA,EAC7B;AAEAC,aAAAA,WAAW,MAAM;AACR,WAAAC,MAAA;AAAA,MACL,OAAO,uBAAuB,MAAM;AACV;MAAA,CACzB;AAAA,MACD,OAAO,yBAAyB,MAAM;AACZ;MAAA,CACzB;AAAA,IAAA;AAAA,EACH,CACD;AAED,SAAOC,IAAAA,SAAS,kBAAkB;AACpC;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const useMounted = require("./useMounted.js");
|
|
5
|
+
function useDecorators(editor) {
|
|
6
|
+
const decorators = vue.shallowRef(editor.getDecorators());
|
|
7
|
+
useMounted.useMounted(() => {
|
|
8
|
+
return editor.registerDecoratorListener((nextDecorators) => {
|
|
9
|
+
decorators.value = nextDecorators;
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
return vue.computed(() => {
|
|
13
|
+
const decoratedTeleports = [];
|
|
14
|
+
const decoratorKeys = Object.keys(vue.unref(decorators));
|
|
15
|
+
for (let i = 0; i < decoratorKeys.length; i++) {
|
|
16
|
+
const nodeKey = decoratorKeys[i];
|
|
17
|
+
const vueDecorator = decorators.value[nodeKey];
|
|
18
|
+
const element = editor.getElementByKey(nodeKey);
|
|
19
|
+
if (element !== null) {
|
|
20
|
+
decoratedTeleports.push(
|
|
21
|
+
vue.h(vue.Teleport, {
|
|
22
|
+
to: element
|
|
23
|
+
}, vueDecorator)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return decoratedTeleports;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
exports.useDecorators = useDecorators;
|
|
31
|
+
//# sourceMappingURL=useDecorators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDecorators.js","sources":["../../../../../../../src/components/basic/doc-editor/core/composables/useDecorators.ts"],"sourcesContent":["import type { LexicalEditor } from 'lexical'\r\nimport type { DefineComponent } from 'vue'\r\nimport { Teleport, computed, h, shallowRef, unref } from 'vue'\r\nimport { useMounted } from './useMounted'\r\n\r\nexport function useDecorators(editor: LexicalEditor) {\r\n const decorators = shallowRef<Record<string, DefineComponent>>(editor.getDecorators())\r\n\r\n useMounted(() => {\r\n return editor.registerDecoratorListener((nextDecorators) => {\r\n decorators.value = nextDecorators as Record<string, DefineComponent>\r\n })\r\n })\r\n\r\n // Return decorators defined as Vue Teleports\r\n return computed(() => {\r\n const decoratedTeleports = []\r\n const decoratorKeys = Object.keys(unref(decorators))\r\n for (let i = 0; i < decoratorKeys.length; i++) {\r\n const nodeKey = decoratorKeys[i]\r\n const vueDecorator = decorators.value[nodeKey]\r\n const element = editor.getElementByKey(nodeKey)\r\n if (element !== null) {\r\n decoratedTeleports.push(\r\n h(Teleport, {\r\n to: element,\r\n }, vueDecorator),\r\n )\r\n }\r\n }\r\n\r\n return decoratedTeleports\r\n })\r\n}\r\n"],"names":["shallowRef","useMounted","computed","unref","h","Teleport"],"mappings":";;;;AAKO,SAAS,cAAc,QAAuB;AACnD,QAAM,aAAaA,IAAA,WAA4C,OAAO,cAAe,CAAA;AAErFC,aAAAA,WAAW,MAAM;AACR,WAAA,OAAO,0BAA0B,CAAC,mBAAmB;AAC1D,iBAAW,QAAQ;AAAA,IAAA,CACpB;AAAA,EAAA,CACF;AAGD,SAAOC,aAAS,MAAM;AACpB,UAAM,qBAAqB,CAAA;AAC3B,UAAM,gBAAgB,OAAO,KAAKC,IAAAA,MAAM,UAAU,CAAC;AACnD,aAAS,IAAI,GAAG,IAAI,cAAc,QAAQ,KAAK;AACvC,YAAA,UAAU,cAAc,CAAC;AACzB,YAAA,eAAe,WAAW,MAAM,OAAO;AACvC,YAAA,UAAU,OAAO,gBAAgB,OAAO;AAC9C,UAAI,YAAY,MAAM;AACD,2BAAA;AAAA,UACjBC,IAAAA,EAAEC,IAAAA,UAAU;AAAA,YACV,IAAI;AAAA,aACH,YAAY;AAAA,QAAA;AAAA,MAEnB;AAAA,IACF;AAEO,WAAA;AAAA,EAAA,CACR;AACH;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const history = require("@lexical/history");
|
|
5
|
+
function useHistory(editor, externalHistoryState, delay) {
|
|
6
|
+
const historyState = vue.computed(
|
|
7
|
+
() => vue.unref(externalHistoryState) || history.createEmptyHistoryState()
|
|
8
|
+
);
|
|
9
|
+
vue.watchEffect((onInvalidate) => {
|
|
10
|
+
const unregisterListener = history.registerHistory(vue.unref(editor), historyState.value, vue.unref(delay) || 1e3);
|
|
11
|
+
onInvalidate(unregisterListener);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.useHistory = useHistory;
|
|
15
|
+
//# sourceMappingURL=useHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHistory.js","sources":["../../../../../../../src/components/basic/doc-editor/core/composables/useHistory.ts"],"sourcesContent":["import type { HistoryState } from '@lexical/history'\r\nimport type { LexicalEditor } from 'lexical'\r\nimport { type MaybeRef, computed, unref, watchEffect } from 'vue'\r\n\r\nimport { createEmptyHistoryState, registerHistory } from '@lexical/history'\r\n\r\nexport function useHistory(\r\n editor: MaybeRef<LexicalEditor>,\r\n externalHistoryState?: MaybeRef<HistoryState>,\r\n delay?: MaybeRef<number>,\r\n) {\r\n const historyState = computed<HistoryState>(\r\n () => unref(externalHistoryState) || createEmptyHistoryState(),\r\n )\r\n\r\n watchEffect((onInvalidate) => {\r\n const unregisterListener = registerHistory(unref(editor), historyState.value, unref(delay) || 1000)\r\n\r\n onInvalidate(unregisterListener)\r\n })\r\n}\r\n"],"names":["computed","unref","createEmptyHistoryState","watchEffect","registerHistory"],"mappings":";;;;AAMgB,SAAA,WACd,QACA,sBACA,OACA;AACA,QAAM,eAAeA,IAAA;AAAA,IACnB,MAAMC,IAAA,MAAM,oBAAoB,KAAKC,gCAAwB;AAAA,EAAA;AAG/DC,MAAA,YAAY,CAAC,iBAAiB;AACtB,UAAA,qBAAqBC,QAAAA,gBAAgBH,IAAA,MAAM,MAAM,GAAG,aAAa,OAAOA,IAAA,MAAM,KAAK,KAAK,GAAI;AAElG,iBAAa,kBAAkB;AAAA,EAAA,CAChC;AACH;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const invariant = require("tiny-invariant");
|
|
5
|
+
const inject = require("./inject.js");
|
|
6
|
+
function useLexicalComposer() {
|
|
7
|
+
const editor = vue.inject(inject.LexicalEditorProviderKey);
|
|
8
|
+
if (!editor) {
|
|
9
|
+
invariant(
|
|
10
|
+
false,
|
|
11
|
+
"useLexicalComposer: cannot find a LexicalComposer"
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
return editor;
|
|
15
|
+
}
|
|
16
|
+
exports.useLexicalComposer = useLexicalComposer;
|
|
17
|
+
//# sourceMappingURL=useLexicalComposer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalComposer.js","sources":["../../../../../../../src/components/basic/doc-editor/core/composables/useLexicalComposer.ts"],"sourcesContent":["import { inject } from 'vue'\r\nimport invariant from 'tiny-invariant'\r\nimport type { LexicalEditor } from 'lexical'\r\nimport { LexicalEditorProviderKey } from './inject'\r\n\r\nexport function useLexicalComposer() {\r\n const editor = inject<LexicalEditor>(LexicalEditorProviderKey)\r\n\r\n if (!editor) {\r\n invariant(\r\n false,\r\n 'useLexicalComposer: cannot find a LexicalComposer',\r\n )\r\n }\r\n\r\n return editor\r\n}\r\n\r\n/**\r\n * @deprecated use `useLexicalComposer` instead\r\n */\r\nexport const useEditor = useLexicalComposer\r\n"],"names":["inject","LexicalEditorProviderKey"],"mappings":";;;;;AAKO,SAAS,qBAAqB;AAC7B,QAAA,SAASA,WAAsBC,OAAAA,wBAAwB;AAE7D,MAAI,CAAC,QAAQ;AACX;AAAA,MACE;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAEO,SAAA;AACT;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const text = require("@lexical/text");
|
|
4
|
+
const utils = require("@lexical/utils");
|
|
5
|
+
const useLexicalComposer = require("./useLexicalComposer.js");
|
|
6
|
+
const useMounted = require("./useMounted.js");
|
|
7
|
+
function useLexicalTextEntity(getMatch, targetNode, createNode) {
|
|
8
|
+
const editor = useLexicalComposer.useLexicalComposer();
|
|
9
|
+
useMounted.useMounted(() => {
|
|
10
|
+
return utils.mergeRegister(
|
|
11
|
+
...text.registerLexicalTextEntity(editor, getMatch, targetNode, createNode)
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
exports.useLexicalTextEntity = useLexicalTextEntity;
|
|
16
|
+
//# sourceMappingURL=useLexicalTextEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLexicalTextEntity.js","sources":["../../../../../../../src/components/basic/doc-editor/core/composables/useLexicalTextEntity.ts"],"sourcesContent":["import type { EntityMatch } from '@lexical/text'\r\nimport type { Klass, TextNode } from 'lexical'\r\n\r\nimport { registerLexicalTextEntity } from '@lexical/text'\r\nimport { mergeRegister } from '@lexical/utils'\r\nimport { useLexicalComposer } from './useLexicalComposer'\r\nimport { useMounted } from './useMounted'\r\n\r\nexport function useLexicalTextEntity<T extends TextNode>(\r\n getMatch: (text: string) => null | EntityMatch,\r\n targetNode: Klass<T>,\r\n createNode: (textNode: TextNode) => T,\r\n): void {\r\n const editor = useLexicalComposer()\r\n\r\n useMounted(() => {\r\n return mergeRegister(\r\n ...registerLexicalTextEntity(editor, getMatch, targetNode, createNode),\r\n )\r\n })\r\n}\r\n"],"names":["useLexicalComposer","useMounted","mergeRegister","registerLexicalTextEntity"],"mappings":";;;;;;AAQgB,SAAA,qBACd,UACA,YACA,YACM;AACN,QAAM,SAASA,mBAAAA;AAEfC,aAAAA,WAAW,MAAM;AACR,WAAAC,MAAA;AAAA,MACL,GAAGC,KAAA,0BAA0B,QAAQ,UAAU,YAAY,UAAU;AAAA,IAAA;AAAA,EACvE,CACD;AACH;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const list = require("@lexical/list");
|
|
4
|
+
const utils = require("@lexical/utils");
|
|
5
|
+
const lexical = require("lexical");
|
|
6
|
+
const useMounted = require("./useMounted.js");
|
|
7
|
+
function useList(editor) {
|
|
8
|
+
useMounted.useMounted(() => {
|
|
9
|
+
return utils.mergeRegister(
|
|
10
|
+
editor.registerCommand(
|
|
11
|
+
list.INSERT_ORDERED_LIST_COMMAND,
|
|
12
|
+
() => {
|
|
13
|
+
list.insertList(editor, "number");
|
|
14
|
+
return true;
|
|
15
|
+
},
|
|
16
|
+
lexical.COMMAND_PRIORITY_LOW
|
|
17
|
+
),
|
|
18
|
+
editor.registerCommand(
|
|
19
|
+
list.INSERT_UNORDERED_LIST_COMMAND,
|
|
20
|
+
() => {
|
|
21
|
+
list.insertList(editor, "bullet");
|
|
22
|
+
return true;
|
|
23
|
+
},
|
|
24
|
+
lexical.COMMAND_PRIORITY_LOW
|
|
25
|
+
),
|
|
26
|
+
editor.registerCommand(
|
|
27
|
+
list.REMOVE_LIST_COMMAND,
|
|
28
|
+
() => {
|
|
29
|
+
list.removeList(editor);
|
|
30
|
+
return true;
|
|
31
|
+
},
|
|
32
|
+
lexical.COMMAND_PRIORITY_LOW
|
|
33
|
+
),
|
|
34
|
+
editor.registerCommand(
|
|
35
|
+
lexical.INSERT_PARAGRAPH_COMMAND,
|
|
36
|
+
() => {
|
|
37
|
+
const hasHandledInsertParagraph = list.$handleListInsertParagraph();
|
|
38
|
+
if (hasHandledInsertParagraph)
|
|
39
|
+
return true;
|
|
40
|
+
return false;
|
|
41
|
+
},
|
|
42
|
+
lexical.COMMAND_PRIORITY_LOW
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
exports.useList = useList;
|
|
48
|
+
//# sourceMappingURL=useList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useList.js","sources":["../../../../../../../src/components/basic/doc-editor/core/composables/useList.ts"],"sourcesContent":["import type { LexicalEditor } from 'lexical'\r\n\r\nimport {\r\n $handleListInsertParagraph,\r\n INSERT_ORDERED_LIST_COMMAND,\r\n INSERT_UNORDERED_LIST_COMMAND,\r\n REMOVE_LIST_COMMAND,\r\n insertList,\r\n removeList,\r\n} from '@lexical/list'\r\nimport { mergeRegister } from '@lexical/utils'\r\nimport {\r\n COMMAND_PRIORITY_LOW,\r\n INSERT_PARAGRAPH_COMMAND,\r\n} from 'lexical'\r\nimport { useMounted } from './useMounted'\r\n\r\nexport function useList(editor: LexicalEditor) {\r\n useMounted(() => {\r\n return mergeRegister(\r\n editor.registerCommand(\r\n INSERT_ORDERED_LIST_COMMAND,\r\n () => {\r\n insertList(editor, 'number')\r\n return true\r\n },\r\n COMMAND_PRIORITY_LOW,\r\n ),\r\n editor.registerCommand(\r\n INSERT_UNORDERED_LIST_COMMAND,\r\n () => {\r\n insertList(editor, 'bullet')\r\n return true\r\n },\r\n COMMAND_PRIORITY_LOW,\r\n ),\r\n editor.registerCommand(\r\n REMOVE_LIST_COMMAND,\r\n () => {\r\n removeList(editor)\r\n return true\r\n },\r\n COMMAND_PRIORITY_LOW,\r\n ),\r\n editor.registerCommand(\r\n INSERT_PARAGRAPH_COMMAND,\r\n () => {\r\n const hasHandledInsertParagraph = $handleListInsertParagraph()\r\n\r\n if (hasHandledInsertParagraph)\r\n return true\r\n\r\n return false\r\n },\r\n COMMAND_PRIORITY_LOW,\r\n ),\r\n )\r\n })\r\n}\r\n"],"names":["useMounted","mergeRegister","INSERT_ORDERED_LIST_COMMAND","insertList","COMMAND_PRIORITY_LOW","INSERT_UNORDERED_LIST_COMMAND","REMOVE_LIST_COMMAND","removeList","INSERT_PARAGRAPH_COMMAND","$handleListInsertParagraph"],"mappings":";;;;;;AAiBO,SAAS,QAAQ,QAAuB;AAC7CA,aAAAA,WAAW,MAAM;AACR,WAAAC,MAAA;AAAA,MACL,OAAO;AAAA,QACLC,KAAA;AAAA,QACA,MAAM;AACJC,0BAAW,QAAQ,QAAQ;AACpB,iBAAA;AAAA,QACT;AAAA,QACAC,QAAA;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACLC,KAAA;AAAA,QACA,MAAM;AACJF,0BAAW,QAAQ,QAAQ;AACpB,iBAAA;AAAA,QACT;AAAA,QACAC,QAAA;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACLE,KAAA;AAAA,QACA,MAAM;AACJC,eAAA,WAAW,MAAM;AACV,iBAAA;AAAA,QACT;AAAA,QACAH,QAAA;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACLI,QAAA;AAAA,QACA,MAAM;AACJ,gBAAM,4BAA4BC,KAAAA;AAE9B,cAAA;AACK,mBAAA;AAEF,iBAAA;AAAA,QACT;AAAA,QACAL,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF,CACD;AACH;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
function useMounted(cb) {
|
|
5
|
+
let unregister;
|
|
6
|
+
vue.onMounted(() => {
|
|
7
|
+
unregister = cb();
|
|
8
|
+
});
|
|
9
|
+
vue.onUnmounted(() => {
|
|
10
|
+
unregister == null ? void 0 : unregister();
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
exports.useMounted = useMounted;
|
|
14
|
+
//# sourceMappingURL=useMounted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMounted.js","sources":["../../../../../../../src/components/basic/doc-editor/core/composables/useMounted.ts"],"sourcesContent":["import { onMounted, onUnmounted } from 'vue'\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function useMounted(cb: () => undefined | (() => any)) {\r\n let unregister: (() => void) | undefined\r\n\r\n onMounted(() => {\r\n unregister = cb()\r\n })\r\n\r\n onUnmounted(() => {\r\n unregister?.()\r\n })\r\n}\r\n"],"names":["onMounted","onUnmounted"],"mappings":";;;AAKO,SAAS,WAAW,IAAmC;AACxD,MAAA;AAEJA,MAAAA,UAAU,MAAM;AACd,iBAAa,GAAG;AAAA,EAAA,CACjB;AAEDC,MAAAA,YAAY,MAAM;AACH;AAAA,EAAA,CACd;AACH;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const dragon = require("@lexical/dragon");
|
|
4
|
+
const richText = require("@lexical/rich-text");
|
|
5
|
+
const utils = require("@lexical/utils");
|
|
6
|
+
const useMounted = require("./useMounted.js");
|
|
7
|
+
function useRichTextSetup(editor) {
|
|
8
|
+
useMounted.useMounted(() => {
|
|
9
|
+
return utils.mergeRegister(
|
|
10
|
+
richText.registerRichText(editor),
|
|
11
|
+
dragon.registerDragonSupport(editor)
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
exports.useRichTextSetup = useRichTextSetup;
|
|
16
|
+
//# sourceMappingURL=useRichTextSetup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRichTextSetup.js","sources":["../../../../../../../src/components/basic/doc-editor/core/composables/useRichTextSetup.ts"],"sourcesContent":["import { registerDragonSupport } from '@lexical/dragon'\r\nimport { registerRichText } from '@lexical/rich-text'\r\nimport { mergeRegister } from '@lexical/utils'\r\nimport type { LexicalEditor } from 'lexical'\r\nimport { useMounted } from './useMounted'\r\n\r\nexport function useRichTextSetup(editor: LexicalEditor) {\r\n useMounted(() => {\r\n return mergeRegister(\r\n registerRichText(editor),\r\n registerDragonSupport(editor),\r\n )\r\n })\r\n}\r\n"],"names":["useMounted","mergeRegister","registerRichText","registerDragonSupport"],"mappings":";;;;;;AAMO,SAAS,iBAAiB,QAAuB;AACtDA,aAAAA,WAAW,MAAM;AACR,WAAAC,MAAA;AAAA,MACLC,SAAAA,iBAAiB,MAAM;AAAA,MACvBC,OAAAA,sBAAsB,MAAM;AAAA,IAAA;AAAA,EAC9B,CACD;AACH;;"}
|
|
@@ -2,8 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils = require("@lexical/utils");
|
|
4
4
|
const lexical = require("lexical");
|
|
5
|
-
const lexicalVue = require("lexical-vue");
|
|
6
5
|
const vue = require("vue");
|
|
6
|
+
require("@lexical/text");
|
|
7
|
+
const useMounted = require("./composables/useMounted.js");
|
|
8
|
+
require("@lexical/overflow");
|
|
9
|
+
require("tiny-invariant");
|
|
10
|
+
require("@lexical/history");
|
|
11
|
+
const useLexicalComposer = require("./composables/useLexicalComposer.js");
|
|
12
|
+
require("@lexical/list");
|
|
13
|
+
require("@lexical/dragon");
|
|
14
|
+
require("@lexical/plain-text");
|
|
15
|
+
require("@lexical/rich-text");
|
|
7
16
|
const SELECTED_ELEMENTBLOCK_COMMAND = lexical.createCommand("SELECTED_ELEMENTBLOCK_COMMAND");
|
|
8
17
|
const REMOVE_ELEMENTBLOCK_COMMAND = lexical.createCommand("REMOVE_ELEMENTBLOCK_COMMAND");
|
|
9
18
|
const UPDATE_ELEMENTBLOCK_TOOLBAR_POS_COMMAND = lexical.createCommand("UPDATE_ELEMENTBLOCK_TOOLBAR_POS_COMMAND");
|
|
@@ -38,8 +47,8 @@ const setElementBlockSelection = async (editor, nodeKey) => {
|
|
|
38
47
|
await setSelected(editor, true, nodeKey);
|
|
39
48
|
};
|
|
40
49
|
const useElementBlockSelection = (func, toolsbars) => {
|
|
41
|
-
const editor =
|
|
42
|
-
|
|
50
|
+
const editor = useLexicalComposer.useLexicalComposer();
|
|
51
|
+
useMounted.useMounted(() => {
|
|
43
52
|
return utils.mergeRegister(
|
|
44
53
|
// 点击选中
|
|
45
54
|
editor.registerCommand(lexical.CLICK_COMMAND, (event) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element-block.js","sources":["../../../../../../src/components/basic/doc-editor/core/element-block.ts"],"sourcesContent":["\r\n\r\nimport { mergeRegister } from '@lexical/utils'\r\n\r\nimport {\r\n $createNodeSelection,\r\n $getNodeByKey,\r\n $getSelection,\r\n $isNodeSelection,\r\n $setSelection,\r\n COMMAND_PRIORITY_LOW,CLICK_COMMAND, LexicalCommand, createCommand, NodeKey, LexicalEditor,\r\n SELECTION_CHANGE_COMMAND\r\n} from 'lexical'\r\nimport { useLexicalComposer,useMounted } from '
|
|
1
|
+
{"version":3,"file":"element-block.js","sources":["../../../../../../src/components/basic/doc-editor/core/element-block.ts"],"sourcesContent":["\r\n\r\nimport { mergeRegister } from '@lexical/utils'\r\n\r\nimport {\r\n $createNodeSelection,\r\n $getNodeByKey,\r\n $getSelection,\r\n $isNodeSelection,\r\n $setSelection,\r\n COMMAND_PRIORITY_LOW,CLICK_COMMAND, LexicalCommand, createCommand, NodeKey, LexicalEditor,\r\n SELECTION_CHANGE_COMMAND\r\n} from 'lexical'\r\nimport { useLexicalComposer,useMounted } from './composables'\r\nimport { ref,watch,unref } from 'vue'\r\n\r\n/**\r\n * toolsbar的函数\r\n */\r\nexport type SelectElementBlockToolsbarFunction = (nodeKey?:NodeKey | string)=>Array<any>|null;\r\n\r\n/**\r\n * 元素抗选中类型\r\n */\r\nexport type SelectElementBlocktEventType = {\r\n nodeKey:NodeKey|string,\r\n toolsbars:Array<any>|SelectElementBlockToolsbarFunction\r\n}\r\n\r\n/**\r\n * 选中元素快\r\n */\r\nexport const SELECTED_ELEMENTBLOCK_COMMAND: LexicalCommand<SelectElementBlocktEventType|null> = createCommand('SELECTED_ELEMENTBLOCK_COMMAND')\r\n\r\n/**\r\n * 移除元素快\r\n */\r\nexport const REMOVE_ELEMENTBLOCK_COMMAND: LexicalCommand<undefined|null> = createCommand('REMOVE_ELEMENTBLOCK_COMMAND')\r\n\r\n/**\r\n * 更新模块工具条位置信息\r\n */\r\nexport const UPDATE_ELEMENTBLOCK_TOOLBAR_POS_COMMAND: LexicalCommand<undefined|null> = createCommand('UPDATE_ELEMENTBLOCK_TOOLBAR_POS_COMMAND')\r\n\r\n/**\r\n * 判断选中的方法\r\n */\r\nexport type SelectExistFunc = (el:HTMLElement)=>HTMLElement|null\r\n\r\n/**\r\n * 判断选中的方法\r\n */\r\nexport type ElementSelectionHandle = (el:HTMLElement)=>undefined\r\n\r\n\r\n\r\n// isNodeSelected \r\nconst isNodeSelected = function (editor: LexicalEditor, key: NodeKey): boolean {\r\n return editor.getEditorState().read(() => {\r\n const node = $getNodeByKey(key)\r\n if (node === null)\r\n return false\r\n return node.isSelected()\r\n })\r\n}\r\n\r\n// 取消选中\r\nconst clearSelection = (editor: LexicalEditor):Promise<undefined> => {\r\n return new Promise(resolove=>{\r\n editor.update(() => {\r\n const selection = $getSelection()\r\n if ($isNodeSelection(selection) && selection){\r\n selection.clear();\r\n }\r\n resolove(undefined)\r\n })\r\n })\r\n}\r\n\r\n// 设置选中\r\nconst setSelected = (editor: LexicalEditor,selected: boolean,key:string):Promise<undefined> => {\r\n\r\n return new Promise(resolove=>{\r\n editor.update(() => {\r\n let selection = $getSelection()\r\n \r\n if (!$isNodeSelection(selection)) {\r\n selection = $createNodeSelection()\r\n $setSelection(selection)\r\n }\r\n if ($isNodeSelection(selection)) {\r\n if (selected)\r\n selection.add(unref(key))\r\n else\r\n selection.delete(unref(key))\r\n }\r\n resolove(undefined)\r\n })\r\n })\r\n \r\n}\r\n\r\n// 设置选中\r\nexport const setElementBlockSelection = async (editor:LexicalEditor,nodeKey:string)=>{\r\n await clearSelection(editor);\r\n await setSelected(editor,true,nodeKey);\r\n}\r\n\r\n/**\r\n * 使用元素块选中\r\n */\r\nexport const useElementBlockSelection = (func:SelectExistFunc,toolsbars:Array<any>|SelectElementBlockToolsbarFunction)=>{\r\n\r\n const editor = useLexicalComposer()\r\n \r\n // 编辑器挂载\r\n useMounted(()=>{\r\n // 注册事件\r\n return mergeRegister(\r\n // 点击选中\r\n editor.registerCommand<MouseEvent>(CLICK_COMMAND,(event) => {\r\n \r\n const el = func(event.target as HTMLElement);\r\n const nodeKey = el?.getAttribute(\"node-key\");\r\n\r\n // 不为null的话则视为点击选中\r\n if(nodeKey != null){\r\n \r\n event.preventDefault();\r\n\r\n // 暂时不支持使用 shift 建 多选\r\n // if (!event.shiftKey) { \r\n // // 先取消\r\n // clearSelection(editor)\r\n // }\r\n setElementBlockSelection(editor,nodeKey);\r\n return true;\r\n }\r\n \r\n return false;\r\n }, COMMAND_PRIORITY_LOW),\r\n // 选中的话\r\n editor.registerCommand(SELECTION_CHANGE_COMMAND, () => {\r\n const selection = $getSelection();\r\n const node = $isNodeSelection(selection) ? selection?.getNodes()[0] : null;\r\n const nodeKey = node?.__key;\r\n const el = nodeKey ? editor.getElementByKey(nodeKey) : null;\r\n\r\n if(nodeKey && el && func(el)){\r\n editor.dispatchCommand(SELECTED_ELEMENTBLOCK_COMMAND,{ \r\n nodeKey:nodeKey, toolsbars:toolsbars\r\n });\r\n return true;\r\n }\r\n editor.dispatchCommand(SELECTED_ELEMENTBLOCK_COMMAND,null);\r\n return false;\r\n },COMMAND_PRIORITY_LOW)\r\n )\r\n })\r\n\r\n}\r\n"],"names":["createCommand","$getSelection","$isNodeSelection","$createNodeSelection","$setSelection","unref","useLexicalComposer","useMounted","mergeRegister","CLICK_COMMAND","COMMAND_PRIORITY_LOW","SELECTION_CHANGE_COMMAND"],"mappings":";;;;;;;;;;;;;;;AAgCa,MAAA,gCAAmFA,sBAAc,+BAA+B;AAKhI,MAAA,8BAA8DA,sBAAc,6BAA6B;AAKzG,MAAA,0CAA0EA,sBAAc,yCAAyC;AAyB9I,MAAM,iBAAiB,CAAC,WAA6C;AAC5D,SAAA,IAAI,QAAQ,CAAU,aAAA;AAC3B,WAAO,OAAO,MAAM;AAClB,YAAM,YAAYC,QAAAA;AACd,UAAAC,QAAA,iBAAiB,SAAS,KAAK,WAAU;AAC3C,kBAAU,MAAM;AAAA,MAClB;AACA,eAAS,MAAS;AAAA,IAAA,CACnB;AAAA,EAAA,CACF;AACH;AAGA,MAAM,cAAc,CAAC,QAAsB,UAAkB,QAAkC;AAEtF,SAAA,IAAI,QAAQ,CAAU,aAAA;AAC3B,WAAO,OAAO,MAAM;AAClB,UAAI,YAAYD,QAAAA;AAEZ,UAAA,CAACC,QAAAA,iBAAiB,SAAS,GAAG;AAChC,oBAAYC,QAAqB,qBAAA;AACjCC,gBAAA,cAAc,SAAS;AAAA,MACzB;AACI,UAAAF,QAAAA,iBAAiB,SAAS,GAAG;AAEnB,kBAAA,IAAIG,UAAM,GAAG,CAAC;AAAA,MAG5B;AACA,eAAS,MAAS;AAAA,IAAA,CACnB;AAAA,EAAA,CACF;AAEH;AAGa,MAAA,2BAA2B,OAAO,QAAqB,YAAiB;AACnF,QAAM,eAAe,MAAM;AACrB,QAAA,YAAY,QAAO,MAAK,OAAO;AACvC;AAKa,MAAA,2BAA2B,CAAC,MAAqB,cAA0D;AAEtH,QAAM,SAASC,mBAAAA;AAGfC,aAAAA,WAAW,MAAI;AAEN,WAAAC,MAAA;AAAA;AAAA,MAEL,OAAO,gBAA4BC,uBAAc,CAAC,UAAU;AAEpD,cAAA,KAAK,KAAK,MAAM,MAAqB;AACrC,cAAA,UAAU,yBAAI,aAAa;AAGjC,YAAG,WAAW,MAAK;AAEjB,gBAAM,eAAe;AAOrB,mCAAyB,QAAO,OAAO;AAChC,iBAAA;AAAA,QACT;AAEO,eAAA;AAAA,SACNC,4BAAoB;AAAA;AAAA,MAEvB,OAAO,gBAAgBC,QAAAA,0BAA0B,MAAM;AACrD,cAAM,YAAYV,QAAAA;AACZ,cAAA,OAAOC,yBAAiB,SAAS,IAAI,uCAAW,WAAW,KAAK;AACtE,cAAM,UAAU,6BAAM;AACtB,cAAM,KAAK,UAAU,OAAO,gBAAgB,OAAO,IAAI;AAEvD,YAAG,WAAW,MAAM,KAAK,EAAE,GAAE;AAC3B,iBAAO,gBAAgB,+BAA8B;AAAA,YACnD;AAAA,YAAiB;AAAA,UAAA,CAClB;AACM,iBAAA;AAAA,QACT;AACO,eAAA,gBAAgB,+BAA8B,IAAI;AAClD,eAAA;AAAA,SACPQ,4BAAoB;AAAA,IAAA;AAAA,EACxB,CACD;AAEH;;;;;;"}
|
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const elementBlock = require("./element-block.js");
|
|
5
|
+
require("@lexical/text");
|
|
6
|
+
require("@lexical/utils");
|
|
7
|
+
require("@lexical/overflow");
|
|
8
|
+
require("lexical");
|
|
9
|
+
require("tiny-invariant");
|
|
10
|
+
require("@lexical/history");
|
|
11
|
+
require("@lexical/list");
|
|
12
|
+
require("@lexical/dragon");
|
|
13
|
+
require("@lexical/plain-text");
|
|
14
|
+
require("@lexical/rich-text");
|
|
15
|
+
require("@lexical/hashtag");
|
|
16
|
+
require("@lexical/link");
|
|
17
|
+
require("@lexical/html");
|
|
18
|
+
require("./plugins/LexicalRichTextPlugin/DecoratedTeleports.js");
|
|
5
19
|
const DEVICE_VIEW_MODE = vue.ref("pc");
|
|
6
20
|
const ToolbarExtendPlugins = vue.reactive([]);
|
|
7
21
|
const registerDocEditorToolbarExtend = function(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/components/basic/doc-editor/core/index.ts"],"sourcesContent":["\r\nimport { ref,reactive } from \"vue\"\r\nexport * from \"./element-block\"\r\n\r\n/**\r\n * 设备显示模式\r\n */\r\nexport const DEVICE_VIEW_MODE = ref<'pc' | 'mobile'>(\"pc\")\r\n\r\n/**\r\n * 工具条扩展\r\n */\r\nexport type ToolbarExtendPlugin = {\r\n icon: string;\r\n text:string,\r\n action:Function,\r\n sort:number\r\n};\r\n\r\n/**\r\n * 插入的插件列表\r\n */\r\nexport const ToolbarExtendPlugins = reactive<ToolbarExtendPlugin[]>([]);\r\n\r\n/**\r\n * 注册工具条的扩展\r\n * @param options \r\n */\r\nexport const registerDocEditorToolbarExtend = function(options:ToolbarExtendPlugin){\r\n ToolbarExtendPlugins.push(options);\r\n ToolbarExtendPlugins.sort((a,b)=>a.sort<b.sort ? 1:-1);\r\n}\r\n\r\n\r\n"],"names":["ref","reactive"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/components/basic/doc-editor/core/index.ts"],"sourcesContent":["\r\nimport { ref,reactive } from \"vue\"\r\n\r\nexport * from \"./element-block\"\r\n\r\nexport {\r\n default as LexicalAutoFocusPlugin,\r\n} from './plugins/LexicalAutoFocusPlugin.vue'\r\nexport {\r\n default as LexicalCheckListPlugin,\r\n} from './plugins/LexicalCheckListPlugin.vue'\r\nexport {\r\n default as LexicalHashtagPlugin,\r\n} from './plugins/LexicalHashtagPlugin.vue'\r\nexport {\r\n default as LexicalHistoryPlugin,\r\n} from './plugins/LexicalHistoryPlugin.vue'\r\nexport {\r\n default as LexicalLinkPlugin,\r\n} from './plugins/LexicalLinkPlugin.vue'\r\nexport {\r\n default as LexicalAutoLinkPlugin,\r\n} from './plugins/LexicalAutoLinkPlugin/index.vue'\r\nexport {\r\n default as LexicalListPlugin,\r\n} from './plugins/LexicalListPlugin.vue'\r\n\r\nexport {\r\n default as LexicalRichTextPlugin,\r\n} from './plugins/LexicalRichTextPlugin/index.vue'\r\n/**\r\n * 设备显示模式\r\n */\r\nexport const DEVICE_VIEW_MODE = ref<'pc' | 'mobile'>(\"pc\")\r\n\r\n/**\r\n * 工具条扩展\r\n */\r\nexport type ToolbarExtendPlugin = {\r\n icon: string;\r\n text:string,\r\n action:Function,\r\n sort:number\r\n};\r\n\r\n/**\r\n * 插入的插件列表\r\n */\r\nexport const ToolbarExtendPlugins = reactive<ToolbarExtendPlugin[]>([]);\r\n\r\n/**\r\n * 注册工具条的扩展\r\n * @param options \r\n */\r\nexport const registerDocEditorToolbarExtend = function(options:ToolbarExtendPlugin){\r\n ToolbarExtendPlugins.push(options);\r\n ToolbarExtendPlugins.sort((a,b)=>a.sort<b.sort ? 1:-1);\r\n}\r\n\r\n\r\n"],"names":["ref","reactive"],"mappings":";;;;;;;;;;;;;;;;;;AAiCa,MAAA,mBAAmBA,QAAqB,IAAI;AAe5C,MAAA,uBAAuBC,IAAgC,SAAA,EAAE;AAMzD,MAAA,iCAAiC,SAAS,SAA4B;AACjF,uBAAqB,KAAK,OAAO;AACZ,uBAAA,KAAK,CAAC,GAAE,MAAI,EAAE,OAAK,EAAE,OAAO,IAAE,EAAE;AACvD;;;;;;;;;"}
|