@cgboiler/biz-basic 1.0.53 → 1.0.55
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/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/rich-text-editor/RichTextEditor.d.ts +14 -5
- package/es/rich-text-editor/RichTextEditor.js +76 -196
- package/es/rich-text-editor/_atomic.css +2 -1
- package/es/rich-text-editor/extensions/ConsumedTrigger.d.ts +8 -0
- package/es/rich-text-editor/extensions/ConsumedTrigger.js +22 -0
- package/es/rich-text-editor/extensions/CustomContent.d.ts +5 -0
- package/es/rich-text-editor/extensions/CustomContent.js +103 -0
- package/es/rich-text-editor/extensions/HashTag.d.ts +15 -0
- package/es/rich-text-editor/extensions/HashTag.js +133 -0
- package/es/rich-text-editor/extensions/HorizontalRule.d.ts +2 -0
- package/es/rich-text-editor/extensions/HorizontalRule.js +16 -0
- package/es/rich-text-editor/extensions/IMEComposition.d.ts +16 -0
- package/es/rich-text-editor/extensions/IMEComposition.js +30 -0
- package/es/rich-text-editor/extensions/ImageUpload.d.ts +56 -0
- package/es/rich-text-editor/extensions/ImageUpload.js +80 -0
- package/es/rich-text-editor/extensions/MarkdownExtensions.d.ts +15 -0
- package/es/rich-text-editor/extensions/MarkdownExtensions.js +35 -0
- package/es/rich-text-editor/extensions/MediaInputRules.d.ts +17 -0
- package/es/rich-text-editor/extensions/MediaInputRules.js +47 -0
- package/es/rich-text-editor/extensions/MentionExtension.d.ts +15 -0
- package/es/rich-text-editor/extensions/MentionExtension.js +60 -0
- package/es/rich-text-editor/extensions/index.d.ts +16 -0
- package/es/rich-text-editor/extensions/index.js +20 -0
- package/es/rich-text-editor/hooks/index.d.ts +6 -0
- package/es/rich-text-editor/hooks/index.js +4 -0
- package/es/rich-text-editor/hooks/useEditorHistory.d.ts +17 -0
- package/es/rich-text-editor/hooks/useEditorHistory.js +87 -0
- package/es/rich-text-editor/index copy 2.css +1 -0
- package/es/rich-text-editor/index copy 2.less +598 -0
- package/es/rich-text-editor/index copy.css +1 -0
- package/es/rich-text-editor/index copy.less +356 -0
- package/es/rich-text-editor/index.css +1 -1
- package/es/rich-text-editor/index.less +444 -254
- package/es/rich-text-editor/lib/utils.d.ts +123 -0
- package/es/rich-text-editor/lib/utils.js +244 -0
- package/es/rich-text-editor/menu-system/components/_atomic.css +44 -0
- package/es/rich-text-editor/menu-system/components/blockquote-button.d.ts +49 -0
- package/es/rich-text-editor/menu-system/components/blockquote-button.js +75 -0
- package/es/rich-text-editor/menu-system/components/code-block-button.d.ts +49 -0
- package/es/rich-text-editor/menu-system/components/code-block-button.js +75 -0
- package/es/rich-text-editor/menu-system/components/color-highlight-button.d.ts +61 -0
- package/es/rich-text-editor/menu-system/components/color-highlight-button.js +102 -0
- package/es/rich-text-editor/menu-system/components/color-highlight-popover.d.ts +32 -0
- package/es/rich-text-editor/menu-system/components/color-highlight-popover.js +99 -0
- package/es/rich-text-editor/menu-system/components/heading-dropdown-menu.d.ts +43 -0
- package/es/rich-text-editor/menu-system/components/heading-dropdown-menu.js +102 -0
- package/es/rich-text-editor/menu-system/components/horizontal-rule-button.d.ts +22 -0
- package/es/rich-text-editor/menu-system/components/horizontal-rule-button.js +42 -0
- package/es/rich-text-editor/menu-system/components/image-upload-button.d.ts +40 -0
- package/es/rich-text-editor/menu-system/components/image-upload-button.js +71 -0
- package/es/rich-text-editor/menu-system/components/image-upload-node.d.ts +93 -0
- package/es/rich-text-editor/menu-system/components/image-upload-node.js +299 -0
- package/es/rich-text-editor/menu-system/components/link-popover.d.ts +32 -0
- package/es/rich-text-editor/menu-system/components/link-popover.js +127 -0
- package/es/rich-text-editor/menu-system/components/list-button.d.ts +40 -0
- package/es/rich-text-editor/menu-system/components/list-button.js +69 -0
- package/es/rich-text-editor/menu-system/components/list-dropdown-menu.d.ts +41 -0
- package/es/rich-text-editor/menu-system/components/list-dropdown-menu.js +97 -0
- package/es/rich-text-editor/menu-system/components/mark-button.d.ts +58 -0
- package/es/rich-text-editor/menu-system/components/mark-button.js +80 -0
- package/es/rich-text-editor/menu-system/components/text-align-button.d.ts +58 -0
- package/es/rich-text-editor/menu-system/components/text-align-button.js +80 -0
- package/es/rich-text-editor/menu-system/components/undo-redo-button.d.ts +58 -0
- package/es/rich-text-editor/menu-system/components/undo-redo-button.js +77 -0
- package/es/rich-text-editor/menu-system/hooks/use-blockquote.d.ts +34 -0
- package/es/rich-text-editor/menu-system/hooks/use-blockquote.js +140 -0
- package/es/rich-text-editor/menu-system/hooks/use-code-block.d.ts +34 -0
- package/es/rich-text-editor/menu-system/hooks/use-code-block.js +140 -0
- package/es/rich-text-editor/menu-system/hooks/use-color-highlight.d.ts +46 -0
- package/es/rich-text-editor/menu-system/hooks/use-color-highlight.js +166 -0
- package/es/rich-text-editor/menu-system/hooks/use-cursor-visibility.d.ts +7 -0
- package/es/rich-text-editor/menu-system/hooks/use-cursor-visibility.js +46 -0
- package/es/rich-text-editor/menu-system/hooks/use-element-rect.d.ts +10 -0
- package/es/rich-text-editor/menu-system/hooks/use-element-rect.js +132 -0
- package/es/rich-text-editor/menu-system/hooks/use-file-upload.d.ts +94 -0
- package/es/rich-text-editor/menu-system/hooks/use-file-upload.js +135 -0
- package/es/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.d.ts +41 -0
- package/es/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.js +70 -0
- package/es/rich-text-editor/menu-system/hooks/use-heading.d.ts +26 -0
- package/es/rich-text-editor/menu-system/hooks/use-heading.js +166 -0
- package/es/rich-text-editor/menu-system/hooks/use-image-upload.d.ts +35 -0
- package/es/rich-text-editor/menu-system/hooks/use-image-upload.js +103 -0
- package/es/rich-text-editor/menu-system/hooks/use-link-popover.d.ts +10 -0
- package/es/rich-text-editor/menu-system/hooks/use-link-popover.js +62 -0
- package/es/rich-text-editor/menu-system/hooks/use-list-dropdown-menu.d.ts +34 -0
- package/es/rich-text-editor/menu-system/hooks/use-list-dropdown-menu.js +121 -0
- package/es/rich-text-editor/menu-system/hooks/use-list.d.ts +28 -0
- package/es/rich-text-editor/menu-system/hooks/use-list.js +191 -0
- package/es/rich-text-editor/menu-system/hooks/use-mark.d.ts +22 -0
- package/es/rich-text-editor/menu-system/hooks/use-mark.js +109 -0
- package/es/rich-text-editor/menu-system/hooks/use-menu-navigation.d.ts +16 -0
- package/es/rich-text-editor/menu-system/hooks/use-menu-navigation.js +134 -0
- package/es/rich-text-editor/menu-system/hooks/use-mobile.d.ts +1 -0
- package/es/rich-text-editor/menu-system/hooks/use-mobile.js +20 -0
- package/es/rich-text-editor/menu-system/hooks/use-text-align.d.ts +28 -0
- package/es/rich-text-editor/menu-system/hooks/use-text-align.js +113 -0
- package/es/rich-text-editor/menu-system/hooks/use-throttled-callback.d.ts +8 -0
- package/es/rich-text-editor/menu-system/hooks/use-throttled-callback.js +45 -0
- package/es/rich-text-editor/menu-system/hooks/use-undo-redo.d.ts +60 -0
- package/es/rich-text-editor/menu-system/hooks/use-undo-redo.js +96 -0
- package/es/rich-text-editor/menu-system/hooks/use-window-size.d.ts +21 -0
- package/es/rich-text-editor/menu-system/hooks/use-window-size.js +74 -0
- package/es/rich-text-editor/menu-system/icons/_atomic.css +32 -0
- package/es/rich-text-editor/menu-system/icons/index.d.ts +546 -0
- package/es/rich-text-editor/menu-system/icons/index.js +487 -0
- package/es/rich-text-editor/menu-system/primitives/_atomic.css +38 -0
- package/es/rich-text-editor/menu-system/primitives/button.d.ts +110 -0
- package/es/rich-text-editor/menu-system/primitives/button.js +107 -0
- package/es/rich-text-editor/menu-system/primitives/card.d.ts +75 -0
- package/es/rich-text-editor/menu-system/primitives/card.js +116 -0
- package/es/rich-text-editor/menu-system/primitives/input.d.ts +37 -0
- package/es/rich-text-editor/menu-system/primitives/input.js +55 -0
- package/es/rich-text-editor/menu-system/primitives/separator.d.ts +34 -0
- package/es/rich-text-editor/menu-system/primitives/separator.js +42 -0
- package/es/rich-text-editor/menu-system/primitives/toolbar.d.ts +39 -0
- package/es/rich-text-editor/menu-system/primitives/toolbar.js +149 -0
- package/es/rich-text-editor/menu-system/styles/animations.css +1 -0
- package/es/rich-text-editor/menu-system/styles/animations.less +91 -0
- package/es/rich-text-editor/menu-system/styles/button-colors.css +1 -0
- package/es/rich-text-editor/menu-system/styles/button-colors.less +142 -0
- package/es/rich-text-editor/menu-system/styles/button-group.css +1 -0
- package/es/rich-text-editor/menu-system/styles/button-group.less +23 -0
- package/es/rich-text-editor/menu-system/styles/button.css +1 -0
- package/es/rich-text-editor/menu-system/styles/button.less +322 -0
- package/es/rich-text-editor/menu-system/styles/card.css +1 -0
- package/es/rich-text-editor/menu-system/styles/card.less +78 -0
- package/es/rich-text-editor/menu-system/styles/color-highlight-button.css +1 -0
- package/es/rich-text-editor/menu-system/styles/color-highlight-button.less +57 -0
- package/es/rich-text-editor/menu-system/styles/color-highlight-popover.css +1 -0
- package/es/rich-text-editor/menu-system/styles/color-highlight-popover.less +51 -0
- package/es/rich-text-editor/menu-system/styles/dropdown-menu.css +1 -0
- package/es/rich-text-editor/menu-system/styles/dropdown-menu.less +40 -0
- package/es/rich-text-editor/menu-system/styles/image-upload-node.css +1 -0
- package/es/rich-text-editor/menu-system/styles/image-upload-node.less +240 -0
- package/es/rich-text-editor/menu-system/styles/input.css +1 -0
- package/es/rich-text-editor/menu-system/styles/input.less +53 -0
- package/es/rich-text-editor/menu-system/styles/link-popover.css +1 -0
- package/es/rich-text-editor/menu-system/styles/link-popover.less +32 -0
- package/es/rich-text-editor/menu-system/styles/separator.css +1 -0
- package/es/rich-text-editor/menu-system/styles/separator.less +26 -0
- package/es/rich-text-editor/menu-system/styles/simple-editor.css +1 -0
- package/es/rich-text-editor/menu-system/styles/simple-editor.less +39 -0
- package/es/rich-text-editor/menu-system/styles/toolbar.css +1 -0
- package/es/rich-text-editor/menu-system/styles/toolbar.less +87 -0
- package/es/rich-text-editor/menu-system/styles/variables.css +1 -0
- package/es/rich-text-editor/menu-system/styles/variables.less +296 -0
- package/es/rich-text-editor/menu-system/utils/tiptap-utils.d.ts +122 -0
- package/es/rich-text-editor/menu-system/utils/tiptap-utils.js +243 -0
- package/es/rich-text-editor/types.d.ts +4 -0
- package/es/rich-text-editor/types.js +4 -0
- package/es/rich-text-editor/useExtensions.d.ts +3 -3
- package/es/rich-text-editor/useExtensions.js +63 -428
- package/es/rich-text-editor/utils/eventHandlers.d.ts +37 -0
- package/es/rich-text-editor/utils/eventHandlers.js +103 -0
- package/es/rich-text-editor/utils/index.d.ts +6 -0
- package/es/rich-text-editor/utils/index.js +19 -0
- package/es/rich-text-editor/utils/triggerHelpers.d.ts +31 -0
- package/es/rich-text-editor/utils/triggerHelpers.js +46 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/rich-text-editor/RichTextEditor.d.ts +14 -5
- package/lib/rich-text-editor/RichTextEditor.js +76 -206
- package/lib/rich-text-editor/_atomic.css +2 -1
- package/lib/rich-text-editor/extensions/ConsumedTrigger.d.ts +8 -0
- package/lib/rich-text-editor/extensions/ConsumedTrigger.js +41 -0
- package/lib/rich-text-editor/extensions/CustomContent.d.ts +5 -0
- package/lib/rich-text-editor/extensions/CustomContent.js +132 -0
- package/lib/rich-text-editor/extensions/HashTag.d.ts +15 -0
- package/lib/rich-text-editor/extensions/HashTag.js +157 -0
- package/lib/rich-text-editor/extensions/HorizontalRule.d.ts +2 -0
- package/lib/rich-text-editor/extensions/HorizontalRule.js +45 -0
- package/lib/rich-text-editor/extensions/IMEComposition.d.ts +16 -0
- package/lib/rich-text-editor/extensions/IMEComposition.js +49 -0
- package/lib/rich-text-editor/extensions/ImageUpload.d.ts +56 -0
- package/lib/rich-text-editor/extensions/ImageUpload.js +99 -0
- package/lib/rich-text-editor/extensions/MarkdownExtensions.d.ts +15 -0
- package/lib/rich-text-editor/extensions/MarkdownExtensions.js +54 -0
- package/lib/rich-text-editor/extensions/MediaInputRules.d.ts +17 -0
- package/lib/rich-text-editor/extensions/MediaInputRules.js +66 -0
- package/lib/rich-text-editor/extensions/MentionExtension.d.ts +15 -0
- package/lib/rich-text-editor/extensions/MentionExtension.js +89 -0
- package/lib/rich-text-editor/extensions/index.d.ts +16 -0
- package/lib/rich-text-editor/extensions/index.js +49 -0
- package/lib/rich-text-editor/hooks/index.d.ts +6 -0
- package/lib/rich-text-editor/hooks/index.js +23 -0
- package/lib/rich-text-editor/hooks/useEditorHistory.d.ts +17 -0
- package/lib/rich-text-editor/hooks/useEditorHistory.js +116 -0
- package/lib/rich-text-editor/index copy 2.css +1 -0
- package/lib/rich-text-editor/index copy 2.less +598 -0
- package/lib/rich-text-editor/index copy.css +1 -0
- package/lib/rich-text-editor/index copy.less +356 -0
- package/lib/rich-text-editor/index.css +1 -1
- package/lib/rich-text-editor/index.less +444 -254
- package/lib/rich-text-editor/lib/utils.d.ts +123 -0
- package/lib/rich-text-editor/lib/utils.js +263 -0
- package/lib/rich-text-editor/menu-system/components/_atomic.css +44 -0
- package/lib/rich-text-editor/menu-system/components/blockquote-button.d.ts +49 -0
- package/lib/rich-text-editor/menu-system/components/blockquote-button.js +94 -0
- package/lib/rich-text-editor/menu-system/components/code-block-button.d.ts +49 -0
- package/lib/rich-text-editor/menu-system/components/code-block-button.js +94 -0
- package/lib/rich-text-editor/menu-system/components/color-highlight-button.d.ts +61 -0
- package/lib/rich-text-editor/menu-system/components/color-highlight-button.js +119 -0
- package/lib/rich-text-editor/menu-system/components/color-highlight-popover.d.ts +32 -0
- package/lib/rich-text-editor/menu-system/components/color-highlight-popover.js +118 -0
- package/lib/rich-text-editor/menu-system/components/heading-dropdown-menu.d.ts +43 -0
- package/lib/rich-text-editor/menu-system/components/heading-dropdown-menu.js +131 -0
- package/lib/rich-text-editor/menu-system/components/horizontal-rule-button.d.ts +22 -0
- package/lib/rich-text-editor/menu-system/components/horizontal-rule-button.js +61 -0
- package/lib/rich-text-editor/menu-system/components/image-upload-button.d.ts +40 -0
- package/lib/rich-text-editor/menu-system/components/image-upload-button.js +90 -0
- package/lib/rich-text-editor/menu-system/components/image-upload-node.d.ts +93 -0
- package/lib/rich-text-editor/menu-system/components/image-upload-node.js +316 -0
- package/lib/rich-text-editor/menu-system/components/link-popover.d.ts +32 -0
- package/lib/rich-text-editor/menu-system/components/link-popover.js +146 -0
- package/lib/rich-text-editor/menu-system/components/list-button.d.ts +40 -0
- package/lib/rich-text-editor/menu-system/components/list-button.js +88 -0
- package/lib/rich-text-editor/menu-system/components/list-dropdown-menu.d.ts +41 -0
- package/lib/rich-text-editor/menu-system/components/list-dropdown-menu.js +116 -0
- package/lib/rich-text-editor/menu-system/components/mark-button.d.ts +58 -0
- package/lib/rich-text-editor/menu-system/components/mark-button.js +99 -0
- package/lib/rich-text-editor/menu-system/components/text-align-button.d.ts +58 -0
- package/lib/rich-text-editor/menu-system/components/text-align-button.js +99 -0
- package/lib/rich-text-editor/menu-system/components/undo-redo-button.d.ts +58 -0
- package/lib/rich-text-editor/menu-system/components/undo-redo-button.js +96 -0
- package/lib/rich-text-editor/menu-system/hooks/use-blockquote.d.ts +34 -0
- package/lib/rich-text-editor/menu-system/hooks/use-blockquote.js +154 -0
- package/lib/rich-text-editor/menu-system/hooks/use-code-block.d.ts +34 -0
- package/lib/rich-text-editor/menu-system/hooks/use-code-block.js +154 -0
- package/lib/rich-text-editor/menu-system/hooks/use-color-highlight.d.ts +46 -0
- package/lib/rich-text-editor/menu-system/hooks/use-color-highlight.js +185 -0
- package/lib/rich-text-editor/menu-system/hooks/use-cursor-visibility.d.ts +7 -0
- package/lib/rich-text-editor/menu-system/hooks/use-cursor-visibility.js +65 -0
- package/lib/rich-text-editor/menu-system/hooks/use-element-rect.d.ts +10 -0
- package/lib/rich-text-editor/menu-system/hooks/use-element-rect.js +149 -0
- package/lib/rich-text-editor/menu-system/hooks/use-file-upload.d.ts +94 -0
- package/lib/rich-text-editor/menu-system/hooks/use-file-upload.js +154 -0
- package/lib/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.d.ts +41 -0
- package/lib/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.js +84 -0
- package/lib/rich-text-editor/menu-system/hooks/use-heading.d.ts +26 -0
- package/lib/rich-text-editor/menu-system/hooks/use-heading.js +190 -0
- package/lib/rich-text-editor/menu-system/hooks/use-image-upload.d.ts +35 -0
- package/lib/rich-text-editor/menu-system/hooks/use-image-upload.js +122 -0
- package/lib/rich-text-editor/menu-system/hooks/use-link-popover.d.ts +10 -0
- package/lib/rich-text-editor/menu-system/hooks/use-link-popover.js +81 -0
- package/lib/rich-text-editor/menu-system/hooks/use-list-dropdown-menu.d.ts +34 -0
- package/lib/rich-text-editor/menu-system/hooks/use-list-dropdown-menu.js +140 -0
- package/lib/rich-text-editor/menu-system/hooks/use-list.d.ts +28 -0
- package/lib/rich-text-editor/menu-system/hooks/use-list.js +205 -0
- package/lib/rich-text-editor/menu-system/hooks/use-mark.d.ts +22 -0
- package/lib/rich-text-editor/menu-system/hooks/use-mark.js +138 -0
- package/lib/rich-text-editor/menu-system/hooks/use-menu-navigation.d.ts +16 -0
- package/lib/rich-text-editor/menu-system/hooks/use-menu-navigation.js +153 -0
- package/lib/rich-text-editor/menu-system/hooks/use-mobile.d.ts +1 -0
- package/lib/rich-text-editor/menu-system/hooks/use-mobile.js +39 -0
- package/lib/rich-text-editor/menu-system/hooks/use-text-align.d.ts +28 -0
- package/lib/rich-text-editor/menu-system/hooks/use-text-align.js +132 -0
- package/lib/rich-text-editor/menu-system/hooks/use-throttled-callback.d.ts +8 -0
- package/lib/rich-text-editor/menu-system/hooks/use-throttled-callback.js +64 -0
- package/lib/rich-text-editor/menu-system/hooks/use-undo-redo.d.ts +60 -0
- package/lib/rich-text-editor/menu-system/hooks/use-undo-redo.js +115 -0
- package/lib/rich-text-editor/menu-system/hooks/use-window-size.d.ts +21 -0
- package/lib/rich-text-editor/menu-system/hooks/use-window-size.js +93 -0
- package/lib/rich-text-editor/menu-system/icons/_atomic.css +32 -0
- package/lib/rich-text-editor/menu-system/icons/index.d.ts +546 -0
- package/lib/rich-text-editor/menu-system/icons/index.js +506 -0
- package/lib/rich-text-editor/menu-system/primitives/_atomic.css +38 -0
- package/lib/rich-text-editor/menu-system/primitives/button.d.ts +110 -0
- package/lib/rich-text-editor/menu-system/primitives/button.js +126 -0
- package/lib/rich-text-editor/menu-system/primitives/card.d.ts +75 -0
- package/lib/rich-text-editor/menu-system/primitives/card.js +135 -0
- package/lib/rich-text-editor/menu-system/primitives/input.d.ts +37 -0
- package/lib/rich-text-editor/menu-system/primitives/input.js +74 -0
- package/lib/rich-text-editor/menu-system/primitives/separator.d.ts +34 -0
- package/lib/rich-text-editor/menu-system/primitives/separator.js +61 -0
- package/lib/rich-text-editor/menu-system/primitives/toolbar.d.ts +39 -0
- package/lib/rich-text-editor/menu-system/primitives/toolbar.js +168 -0
- package/lib/rich-text-editor/menu-system/styles/animations.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/animations.less +91 -0
- package/lib/rich-text-editor/menu-system/styles/button-colors.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/button-colors.less +142 -0
- package/lib/rich-text-editor/menu-system/styles/button-group.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/button-group.less +23 -0
- package/lib/rich-text-editor/menu-system/styles/button.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/button.less +322 -0
- package/lib/rich-text-editor/menu-system/styles/card.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/card.less +78 -0
- package/lib/rich-text-editor/menu-system/styles/color-highlight-button.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/color-highlight-button.less +57 -0
- package/lib/rich-text-editor/menu-system/styles/color-highlight-popover.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/color-highlight-popover.less +51 -0
- package/lib/rich-text-editor/menu-system/styles/dropdown-menu.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/dropdown-menu.less +40 -0
- package/lib/rich-text-editor/menu-system/styles/image-upload-node.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/image-upload-node.less +240 -0
- package/lib/rich-text-editor/menu-system/styles/input.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/input.less +53 -0
- package/lib/rich-text-editor/menu-system/styles/link-popover.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/link-popover.less +32 -0
- package/lib/rich-text-editor/menu-system/styles/separator.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/separator.less +26 -0
- package/lib/rich-text-editor/menu-system/styles/simple-editor.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/simple-editor.less +39 -0
- package/lib/rich-text-editor/menu-system/styles/toolbar.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/toolbar.less +87 -0
- package/lib/rich-text-editor/menu-system/styles/variables.css +1 -0
- package/lib/rich-text-editor/menu-system/styles/variables.less +296 -0
- package/lib/rich-text-editor/menu-system/utils/tiptap-utils.d.ts +122 -0
- package/lib/rich-text-editor/menu-system/utils/tiptap-utils.js +262 -0
- package/lib/rich-text-editor/types.d.ts +4 -0
- package/lib/rich-text-editor/types.js +4 -0
- package/lib/rich-text-editor/useExtensions.d.ts +3 -3
- package/lib/rich-text-editor/useExtensions.js +64 -429
- package/lib/rich-text-editor/utils/eventHandlers.d.ts +37 -0
- package/lib/rich-text-editor/utils/eventHandlers.js +132 -0
- package/lib/rich-text-editor/utils/index.d.ts +6 -0
- package/lib/rich-text-editor/utils/index.js +32 -0
- package/lib/rich-text-editor/utils/triggerHelpers.d.ts +31 -0
- package/lib/rich-text-editor/utils/triggerHelpers.js +65 -0
- package/package.json +13 -3
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
LinkPopover: () => LinkPopover
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
var import_vue = require("vue");
|
|
24
|
+
var import_atomic = require("./_atomic.css");
|
|
25
|
+
var import_vue2 = require("vue");
|
|
26
|
+
var import_use_link_popover = require("../hooks/use-link-popover");
|
|
27
|
+
var import_button = require("../primitives/button");
|
|
28
|
+
var import_tiptap_utils = require("../utils/tiptap-utils");
|
|
29
|
+
var import_element_plus = require("element-plus");
|
|
30
|
+
var import_icons = require("../icons");
|
|
31
|
+
var import_link_popover = require("../styles/link-popover.css");
|
|
32
|
+
const LinkPopover = (0, import_vue2.defineComponent)({
|
|
33
|
+
name: "LinkPopover",
|
|
34
|
+
props: {
|
|
35
|
+
editor: {
|
|
36
|
+
type: Object,
|
|
37
|
+
required: true
|
|
38
|
+
},
|
|
39
|
+
hideWhenUnavailable: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
className: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: ""
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
setup(props, {
|
|
49
|
+
attrs
|
|
50
|
+
}) {
|
|
51
|
+
const {
|
|
52
|
+
isVisible,
|
|
53
|
+
linkUrl,
|
|
54
|
+
inNewTab,
|
|
55
|
+
handleSetLink
|
|
56
|
+
} = (0, import_use_link_popover.useLinkPopover)({
|
|
57
|
+
editor: props.editor
|
|
58
|
+
});
|
|
59
|
+
const tempUrl = (0, import_vue2.ref)("");
|
|
60
|
+
const tempNewTab = (0, import_vue2.ref)(false);
|
|
61
|
+
(0, import_vue2.watch)(isVisible, (val) => {
|
|
62
|
+
if (val) {
|
|
63
|
+
tempUrl.value = linkUrl.value;
|
|
64
|
+
tempNewTab.value = inNewTab.value;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const onApply = () => {
|
|
68
|
+
handleSetLink(tempUrl.value, tempNewTab.value);
|
|
69
|
+
};
|
|
70
|
+
const onRemove = () => {
|
|
71
|
+
handleSetLink("", false);
|
|
72
|
+
};
|
|
73
|
+
const onOpenLink = () => {
|
|
74
|
+
if (linkUrl.value) {
|
|
75
|
+
window.open(linkUrl.value, "_blank");
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
return () => {
|
|
79
|
+
if (!isVisible.value)
|
|
80
|
+
return null;
|
|
81
|
+
const trigger = (0, import_vue.createVNode)(import_button.Button, (0, import_vue.mergeProps)({
|
|
82
|
+
"type": "button",
|
|
83
|
+
"data-style": "ghost",
|
|
84
|
+
"data-active-state": linkUrl.value ? "on" : "off",
|
|
85
|
+
"role": "button",
|
|
86
|
+
"tooltip": "Link",
|
|
87
|
+
"class": (0, import_tiptap_utils.cn)(props.className)
|
|
88
|
+
}, attrs), {
|
|
89
|
+
default: () => [(0, import_vue.createVNode)(import_icons.LinkIcon, {
|
|
90
|
+
"class": "tiptap-button-icon"
|
|
91
|
+
}, null)]
|
|
92
|
+
});
|
|
93
|
+
return (0, import_vue.createVNode)(import_element_plus.ElPopover, {
|
|
94
|
+
"trigger": "click",
|
|
95
|
+
"width": "auto",
|
|
96
|
+
"popper-class": "tiptap-link-popover"
|
|
97
|
+
}, {
|
|
98
|
+
reference: () => trigger,
|
|
99
|
+
default: () => (0, import_vue.createVNode)("div", {
|
|
100
|
+
"class": "tiptap-link-popover-content"
|
|
101
|
+
}, [(0, import_vue.createVNode)("div", {
|
|
102
|
+
"class": "tiptap-link-popover-row"
|
|
103
|
+
}, [(0, import_vue.createVNode)(import_element_plus.ElInput, {
|
|
104
|
+
"modelValue": tempUrl.value,
|
|
105
|
+
"onUpdate:modelValue": ($event) => tempUrl.value = $event,
|
|
106
|
+
"placeholder": "Paste a link...",
|
|
107
|
+
"size": "small",
|
|
108
|
+
"style": "width: 180px;",
|
|
109
|
+
"onKeydown": (e) => e.key === "Enter" && onApply()
|
|
110
|
+
}, null), (0, import_vue.createVNode)(import_button.Button, {
|
|
111
|
+
"type": "button",
|
|
112
|
+
"data-style": "ghost",
|
|
113
|
+
"onClick": onApply,
|
|
114
|
+
"tooltip": "Apply",
|
|
115
|
+
"data-size": "small"
|
|
116
|
+
}, {
|
|
117
|
+
default: () => [(0, import_vue.createVNode)(import_icons.CornerDownLeftIcon, {
|
|
118
|
+
"class": "tiptap-button-icon"
|
|
119
|
+
}, null)]
|
|
120
|
+
}), linkUrl.value && (0, import_vue.createVNode)(import_vue.Fragment, null, [(0, import_vue.createVNode)("div", {
|
|
121
|
+
"class": "tiptap-link-popover-vertical-separator"
|
|
122
|
+
}, null), (0, import_vue.createVNode)(import_button.Button, {
|
|
123
|
+
"type": "button",
|
|
124
|
+
"data-style": "ghost",
|
|
125
|
+
"onClick": onOpenLink,
|
|
126
|
+
"tooltip": "Open in new window",
|
|
127
|
+
"data-size": "small"
|
|
128
|
+
}, {
|
|
129
|
+
default: () => [(0, import_vue.createVNode)(import_icons.ExternalLinkIcon, {
|
|
130
|
+
"class": "tiptap-button-icon"
|
|
131
|
+
}, null)]
|
|
132
|
+
}), (0, import_vue.createVNode)(import_button.Button, {
|
|
133
|
+
"type": "button",
|
|
134
|
+
"data-style": "ghost",
|
|
135
|
+
"onClick": onRemove,
|
|
136
|
+
"tooltip": "Remove",
|
|
137
|
+
"data-size": "small"
|
|
138
|
+
}, {
|
|
139
|
+
default: () => [(0, import_vue.createVNode)(import_icons.TrashIcon, {
|
|
140
|
+
"class": "tiptap-button-icon"
|
|
141
|
+
}, null)]
|
|
142
|
+
})])])])
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type ListType } from '../hooks/use-list';
|
|
3
|
+
export declare const ListButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
editor: {
|
|
5
|
+
type: PropType<any>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
type: {
|
|
9
|
+
type: PropType<ListType>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
hideWhenUnavailable: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
className: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
editor: {
|
|
22
|
+
type: PropType<any>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
type: {
|
|
26
|
+
type: PropType<ListType>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
hideWhenUnavailable: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
className: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
}>> & Readonly<{}>, {
|
|
38
|
+
className: string;
|
|
39
|
+
hideWhenUnavailable: boolean;
|
|
40
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
ListButton: () => ListButton
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
var import_vue = require("vue");
|
|
24
|
+
var import_atomic = require("./_atomic.css");
|
|
25
|
+
var import_vue2 = require("vue");
|
|
26
|
+
var import_use_list = require("../hooks/use-list");
|
|
27
|
+
var import_button = require("../primitives/button");
|
|
28
|
+
var import_tiptap_utils = require("../utils/tiptap-utils");
|
|
29
|
+
const ListButton = (0, import_vue2.defineComponent)({
|
|
30
|
+
name: "ListButton",
|
|
31
|
+
props: {
|
|
32
|
+
editor: {
|
|
33
|
+
type: Object,
|
|
34
|
+
required: true
|
|
35
|
+
},
|
|
36
|
+
type: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
|
+
hideWhenUnavailable: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
className: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: ""
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
setup(props, {
|
|
50
|
+
attrs
|
|
51
|
+
}) {
|
|
52
|
+
const {
|
|
53
|
+
isVisible,
|
|
54
|
+
isActive,
|
|
55
|
+
handleToggle,
|
|
56
|
+
canToggle,
|
|
57
|
+
label,
|
|
58
|
+
shortcutKeys,
|
|
59
|
+
Icon
|
|
60
|
+
} = (0, import_use_list.useList)({
|
|
61
|
+
editor: props.editor,
|
|
62
|
+
type: props.type,
|
|
63
|
+
hideWhenUnavailable: props.hideWhenUnavailable
|
|
64
|
+
});
|
|
65
|
+
return () => {
|
|
66
|
+
if (!isVisible.value)
|
|
67
|
+
return null;
|
|
68
|
+
return (0, import_vue.createVNode)(import_button.Button, (0, import_vue.mergeProps)({
|
|
69
|
+
"type": "button",
|
|
70
|
+
"disabled": !canToggle.value,
|
|
71
|
+
"data-style": "ghost",
|
|
72
|
+
"data-active-state": isActive.value ? "on" : "off",
|
|
73
|
+
"role": "button",
|
|
74
|
+
"tabindex": -1,
|
|
75
|
+
"aria-label": label,
|
|
76
|
+
"aria-pressed": isActive.value,
|
|
77
|
+
"tooltip": label,
|
|
78
|
+
"shortcutKeys": shortcutKeys,
|
|
79
|
+
"onClick": handleToggle,
|
|
80
|
+
"class": (0, import_tiptap_utils.cn)(props.className)
|
|
81
|
+
}, attrs), {
|
|
82
|
+
default: () => [(0, import_vue.createVNode)(Icon, {
|
|
83
|
+
"class": "tiptap-button-icon"
|
|
84
|
+
}, null)]
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type ListType } from '../hooks/use-list';
|
|
3
|
+
export declare const ListDropdownMenu: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
editor: {
|
|
5
|
+
type: PropType<any>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
types: {
|
|
9
|
+
type: PropType<ListType[]>;
|
|
10
|
+
default: () => string[];
|
|
11
|
+
};
|
|
12
|
+
hideWhenUnavailable: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
className: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
editor: {
|
|
22
|
+
type: PropType<any>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
types: {
|
|
26
|
+
type: PropType<ListType[]>;
|
|
27
|
+
default: () => string[];
|
|
28
|
+
};
|
|
29
|
+
hideWhenUnavailable: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
className: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
}>> & Readonly<{}>, {
|
|
38
|
+
className: string;
|
|
39
|
+
types: ListType[];
|
|
40
|
+
hideWhenUnavailable: boolean;
|
|
41
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
ListDropdownMenu: () => ListDropdownMenu
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
var import_vue = require("vue");
|
|
24
|
+
var import_atomic = require("./_atomic.css");
|
|
25
|
+
var import_vue2 = require("vue");
|
|
26
|
+
var import_use_list_dropdown_menu = require("../hooks/use-list-dropdown-menu");
|
|
27
|
+
var import_use_list = require("../hooks/use-list");
|
|
28
|
+
var import_button = require("../primitives/button");
|
|
29
|
+
var import_tiptap_utils = require("../utils/tiptap-utils");
|
|
30
|
+
var import_element_plus = require("element-plus");
|
|
31
|
+
var import_icons = require("../icons");
|
|
32
|
+
const ListDropdownMenu = (0, import_vue2.defineComponent)({
|
|
33
|
+
name: "ListDropdownMenu",
|
|
34
|
+
props: {
|
|
35
|
+
editor: {
|
|
36
|
+
type: Object,
|
|
37
|
+
required: true
|
|
38
|
+
},
|
|
39
|
+
types: {
|
|
40
|
+
type: Array,
|
|
41
|
+
default: () => ["bulletList", "orderedList", "taskList"]
|
|
42
|
+
},
|
|
43
|
+
hideWhenUnavailable: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
className: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: ""
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
setup(props, {
|
|
53
|
+
attrs
|
|
54
|
+
}) {
|
|
55
|
+
const {
|
|
56
|
+
isVisible,
|
|
57
|
+
activeType,
|
|
58
|
+
isActive,
|
|
59
|
+
canToggle,
|
|
60
|
+
filteredLists,
|
|
61
|
+
label,
|
|
62
|
+
Icon
|
|
63
|
+
} = (0, import_use_list_dropdown_menu.useListDropdownMenu)({
|
|
64
|
+
editor: props.editor,
|
|
65
|
+
types: props.types,
|
|
66
|
+
hideWhenUnavailable: props.hideWhenUnavailable
|
|
67
|
+
});
|
|
68
|
+
const handleListSelect = (type) => {
|
|
69
|
+
const editor = props.editor && "value" in props.editor ? props.editor.value : props.editor;
|
|
70
|
+
(0, import_use_list.toggleList)(editor, type);
|
|
71
|
+
};
|
|
72
|
+
return () => {
|
|
73
|
+
if (!isVisible.value)
|
|
74
|
+
return null;
|
|
75
|
+
const trigger = (0, import_vue.createVNode)(import_button.Button, (0, import_vue.mergeProps)({
|
|
76
|
+
"type": "button",
|
|
77
|
+
"disabled": !canToggle.value,
|
|
78
|
+
"data-style": "ghost",
|
|
79
|
+
"data-active-state": isActive.value ? "on" : "off",
|
|
80
|
+
"data-disabled": !canToggle.value,
|
|
81
|
+
"role": "button",
|
|
82
|
+
"tooltip": label,
|
|
83
|
+
"class": (0, import_tiptap_utils.cn)(props.className, "tiptap-list-dropdown-trigger")
|
|
84
|
+
}, attrs), {
|
|
85
|
+
default: () => [(0, import_vue.createVNode)(Icon.value, {
|
|
86
|
+
"class": "tiptap-button-icon"
|
|
87
|
+
}, null), (0, import_vue.createVNode)(import_icons.ChevronDownIcon, {
|
|
88
|
+
"class": "tiptap-button-icon-chevron"
|
|
89
|
+
}, null)]
|
|
90
|
+
});
|
|
91
|
+
return (0, import_vue.createVNode)(import_element_plus.ElDropdown, {
|
|
92
|
+
"trigger": "click",
|
|
93
|
+
"onCommand": handleListSelect,
|
|
94
|
+
"popper-class": "tiptap-dropdown-menu"
|
|
95
|
+
}, {
|
|
96
|
+
default: () => trigger,
|
|
97
|
+
dropdown: () => (0, import_vue.createVNode)(import_element_plus.ElDropdownMenu, null, {
|
|
98
|
+
default: () => [filteredLists.map((option) => {
|
|
99
|
+
const ListOptionIcon = option.icon;
|
|
100
|
+
return (0, import_vue.createVNode)(import_element_plus.ElDropdownItem, {
|
|
101
|
+
"key": option.type,
|
|
102
|
+
"command": option.type,
|
|
103
|
+
"class": (0, import_tiptap_utils.cn)(activeType.value === option.type && "is-active")
|
|
104
|
+
}, {
|
|
105
|
+
default: () => [(0, import_vue.createVNode)("div", {
|
|
106
|
+
"class": "tiptap-dropdown-menu-item-content"
|
|
107
|
+
}, [(0, import_vue.createVNode)(ListOptionIcon, {
|
|
108
|
+
"class": "tiptap-dropdown-menu-item-icon"
|
|
109
|
+
}, null), (0, import_vue.createVNode)("span", null, [option.label])])]
|
|
110
|
+
});
|
|
111
|
+
})]
|
|
112
|
+
})
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type Mark } from '../hooks/use-mark';
|
|
3
|
+
export declare const MarkButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
editor: {
|
|
5
|
+
type: PropType<any>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
type: {
|
|
9
|
+
type: PropType<Mark>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
text: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
hideWhenUnavailable: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
showShortcut: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
className: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
editor: {
|
|
30
|
+
type: PropType<any>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
type: {
|
|
34
|
+
type: PropType<Mark>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
text: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
hideWhenUnavailable: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
showShortcut: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
className: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{}>, {
|
|
54
|
+
text: string;
|
|
55
|
+
className: string;
|
|
56
|
+
hideWhenUnavailable: boolean;
|
|
57
|
+
showShortcut: boolean;
|
|
58
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
MarkButton: () => MarkButton
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
var import_vue = require("vue");
|
|
24
|
+
var import_atomic = require("./_atomic.css");
|
|
25
|
+
var import_vue2 = require("vue");
|
|
26
|
+
var import_use_mark = require("../hooks/use-mark");
|
|
27
|
+
var import_button = require("../primitives/button");
|
|
28
|
+
var import_tiptap_utils = require("../utils/tiptap-utils");
|
|
29
|
+
const MarkButton = (0, import_vue2.defineComponent)({
|
|
30
|
+
name: "MarkButton",
|
|
31
|
+
props: {
|
|
32
|
+
editor: {
|
|
33
|
+
type: Object,
|
|
34
|
+
required: true
|
|
35
|
+
},
|
|
36
|
+
type: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
|
+
text: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: ""
|
|
43
|
+
},
|
|
44
|
+
hideWhenUnavailable: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
showShortcut: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false
|
|
51
|
+
},
|
|
52
|
+
className: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: ""
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
setup(props, {
|
|
58
|
+
slots,
|
|
59
|
+
attrs
|
|
60
|
+
}) {
|
|
61
|
+
const {
|
|
62
|
+
isVisible,
|
|
63
|
+
handleMark,
|
|
64
|
+
label,
|
|
65
|
+
canToggle,
|
|
66
|
+
isActive,
|
|
67
|
+
Icon,
|
|
68
|
+
shortcutKeys
|
|
69
|
+
} = (0, import_use_mark.useMark)({
|
|
70
|
+
editor: props.editor,
|
|
71
|
+
type: props.type,
|
|
72
|
+
hideWhenUnavailable: props.hideWhenUnavailable
|
|
73
|
+
});
|
|
74
|
+
return () => {
|
|
75
|
+
if (!isVisible.value)
|
|
76
|
+
return null;
|
|
77
|
+
return (0, import_vue.createVNode)(import_button.Button, (0, import_vue.mergeProps)({
|
|
78
|
+
"type": "button",
|
|
79
|
+
"disabled": !canToggle.value,
|
|
80
|
+
"data-style": "ghost",
|
|
81
|
+
"data-active-state": isActive.value ? "on" : "off",
|
|
82
|
+
"data-disabled": !canToggle.value,
|
|
83
|
+
"role": "button",
|
|
84
|
+
"tabindex": -1,
|
|
85
|
+
"aria-label": label,
|
|
86
|
+
"aria-pressed": isActive.value,
|
|
87
|
+
"tooltip": label,
|
|
88
|
+
"onClick": handleMark,
|
|
89
|
+
"class": (0, import_tiptap_utils.cn)(props.className)
|
|
90
|
+
}, attrs), {
|
|
91
|
+
default: () => [slots.default ? slots.default() : (0, import_vue.createVNode)(import_vue.Fragment, null, [(0, import_vue.createVNode)(Icon, {
|
|
92
|
+
"class": "tiptap-button-icon"
|
|
93
|
+
}, null), props.text && (0, import_vue.createVNode)("span", {
|
|
94
|
+
"class": "tiptap-button-text"
|
|
95
|
+
}, [props.text])])]
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type TextAlign } from '../hooks/use-text-align';
|
|
3
|
+
export declare const TextAlignButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
editor: {
|
|
5
|
+
type: PropType<any>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
align: {
|
|
9
|
+
type: PropType<TextAlign>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
text: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
hideWhenUnavailable: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
showShortcut: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
className: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
editor: {
|
|
30
|
+
type: PropType<any>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
align: {
|
|
34
|
+
type: PropType<TextAlign>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
text: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
hideWhenUnavailable: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
showShortcut: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
className: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{}>, {
|
|
54
|
+
text: string;
|
|
55
|
+
className: string;
|
|
56
|
+
hideWhenUnavailable: boolean;
|
|
57
|
+
showShortcut: boolean;
|
|
58
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|