@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,61 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import '../styles/color-highlight-button.less';
|
|
3
|
+
export declare const ColorHighlightButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
editor: {
|
|
5
|
+
type: PropType<any>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
highlightColor: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
label: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
hideWhenUnavailable: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
className: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
onApplied: {
|
|
25
|
+
type: PropType<(params: {
|
|
26
|
+
color: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}) => void>;
|
|
29
|
+
};
|
|
30
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
editor: {
|
|
32
|
+
type: PropType<any>;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
highlightColor: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
label: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
hideWhenUnavailable: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
className: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
onApplied: {
|
|
52
|
+
type: PropType<(params: {
|
|
53
|
+
color: string;
|
|
54
|
+
label: string;
|
|
55
|
+
}) => void>;
|
|
56
|
+
};
|
|
57
|
+
}>> & Readonly<{}>, {
|
|
58
|
+
label: string;
|
|
59
|
+
className: string;
|
|
60
|
+
hideWhenUnavailable: boolean;
|
|
61
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
|
21
|
+
import "./_atomic.css";
|
|
22
|
+
import { defineComponent } from "vue";
|
|
23
|
+
import { useColorHighlight } from "../hooks/use-color-highlight";
|
|
24
|
+
import { Button } from "../primitives/button";
|
|
25
|
+
import { cn } from "../utils/tiptap-utils";
|
|
26
|
+
import "../styles/color-highlight-button.css";
|
|
27
|
+
const ColorHighlightButton = defineComponent({
|
|
28
|
+
name: "ColorHighlightButton",
|
|
29
|
+
props: {
|
|
30
|
+
editor: {
|
|
31
|
+
type: Object,
|
|
32
|
+
required: true
|
|
33
|
+
},
|
|
34
|
+
highlightColor: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: true
|
|
37
|
+
},
|
|
38
|
+
label: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: ""
|
|
41
|
+
},
|
|
42
|
+
hideWhenUnavailable: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
className: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
onApplied: {
|
|
51
|
+
type: Function
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
setup(props, {
|
|
55
|
+
attrs
|
|
56
|
+
}) {
|
|
57
|
+
const {
|
|
58
|
+
isVisible,
|
|
59
|
+
handleColorHighlight,
|
|
60
|
+
label,
|
|
61
|
+
canHighlight,
|
|
62
|
+
isActive,
|
|
63
|
+
Icon
|
|
64
|
+
} = useColorHighlight({
|
|
65
|
+
editor: props.editor,
|
|
66
|
+
highlightColor: props.highlightColor,
|
|
67
|
+
label: props.label || `Highlight ${props.highlightColor}`,
|
|
68
|
+
hideWhenUnavailable: props.hideWhenUnavailable,
|
|
69
|
+
onApplied: props.onApplied
|
|
70
|
+
});
|
|
71
|
+
return () => {
|
|
72
|
+
if (!isVisible.value)
|
|
73
|
+
return null;
|
|
74
|
+
return _createVNode(Button, _mergeProps({
|
|
75
|
+
"type": "button",
|
|
76
|
+
"disabled": !canHighlight.value,
|
|
77
|
+
"data-style": "ghost",
|
|
78
|
+
"data-active-state": isActive.value ? "on" : "off",
|
|
79
|
+
"role": "button",
|
|
80
|
+
"tabindex": -1,
|
|
81
|
+
"aria-label": label,
|
|
82
|
+
"aria-pressed": isActive.value,
|
|
83
|
+
"tooltip": label,
|
|
84
|
+
"onClick": handleColorHighlight,
|
|
85
|
+
"class": cn("tiptap-color-highlight-button", props.className),
|
|
86
|
+
"style": __spreadProps(__spreadValues({}, attrs.style || {}), {
|
|
87
|
+
"--highlight-color": props.highlightColor
|
|
88
|
+
})
|
|
89
|
+
}, attrs), {
|
|
90
|
+
default: () => [_createVNode("div", {
|
|
91
|
+
"class": "tiptap-button-highlight",
|
|
92
|
+
"style": {
|
|
93
|
+
"--highlight-color": props.highlightColor
|
|
94
|
+
}
|
|
95
|
+
}, null)]
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
export {
|
|
101
|
+
ColorHighlightButton
|
|
102
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import '../styles/color-highlight-popover.less';
|
|
3
|
+
export declare const ColorHighlightPopover: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
editor: {
|
|
5
|
+
type: PropType<any>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
hideWhenUnavailable: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
className: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
editor: {
|
|
18
|
+
type: PropType<any>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
hideWhenUnavailable: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
className: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{}>, {
|
|
30
|
+
className: string;
|
|
31
|
+
hideWhenUnavailable: boolean;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
|
2
|
+
import "./_atomic.css";
|
|
3
|
+
import { defineComponent, ref } from "vue";
|
|
4
|
+
import { useColorHighlight, HIGHLIGHT_COLORS } from "../hooks/use-color-highlight";
|
|
5
|
+
import { ColorHighlightButton } from "./color-highlight-button";
|
|
6
|
+
import { Button } from "../primitives/button";
|
|
7
|
+
import { cn } from "../utils/tiptap-utils";
|
|
8
|
+
import { ElPopover } from "element-plus";
|
|
9
|
+
import { HighlighterIcon, BanIcon } from "../icons";
|
|
10
|
+
import "../styles/color-highlight-popover.css";
|
|
11
|
+
const ColorHighlightPopover = defineComponent({
|
|
12
|
+
name: "ColorHighlightPopover",
|
|
13
|
+
props: {
|
|
14
|
+
editor: {
|
|
15
|
+
type: Object,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
hideWhenUnavailable: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
className: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(props, {
|
|
28
|
+
attrs
|
|
29
|
+
}) {
|
|
30
|
+
const {
|
|
31
|
+
isVisible,
|
|
32
|
+
canHighlight,
|
|
33
|
+
isActive,
|
|
34
|
+
label,
|
|
35
|
+
handleRemoveHighlight
|
|
36
|
+
} = useColorHighlight({
|
|
37
|
+
editor: props.editor,
|
|
38
|
+
hideWhenUnavailable: props.hideWhenUnavailable
|
|
39
|
+
});
|
|
40
|
+
const isOpen = ref(false);
|
|
41
|
+
return () => {
|
|
42
|
+
if (!isVisible.value)
|
|
43
|
+
return null;
|
|
44
|
+
const trigger = _createVNode(Button, _mergeProps({
|
|
45
|
+
"type": "button",
|
|
46
|
+
"disabled": !canHighlight.value,
|
|
47
|
+
"data-style": "ghost",
|
|
48
|
+
"data-active-state": isActive.value ? "on" : "off",
|
|
49
|
+
"role": "button",
|
|
50
|
+
"tooltip": label,
|
|
51
|
+
"class": cn(props.className)
|
|
52
|
+
}, attrs), {
|
|
53
|
+
default: () => [_createVNode(HighlighterIcon, {
|
|
54
|
+
"class": "tiptap-button-icon"
|
|
55
|
+
}, null)]
|
|
56
|
+
});
|
|
57
|
+
return _createVNode(ElPopover, {
|
|
58
|
+
"trigger": "click",
|
|
59
|
+
"width": "auto",
|
|
60
|
+
"popper-class": "tiptap-color-highlight-popover",
|
|
61
|
+
"visible": isOpen.value,
|
|
62
|
+
"onUpdate:visible": ($event) => isOpen.value = $event
|
|
63
|
+
}, {
|
|
64
|
+
reference: () => trigger,
|
|
65
|
+
default: () => _createVNode("div", {
|
|
66
|
+
"class": "tiptap-color-highlight-popover-content"
|
|
67
|
+
}, [_createVNode("div", {
|
|
68
|
+
"class": "tiptap-color-highlight-grid"
|
|
69
|
+
}, [["Green", "Blue", "Red", "Purple", "Yellow"].map((name) => HIGHLIGHT_COLORS.find((c) => c.label.includes(name))).filter(Boolean).map((color) => _createVNode(ColorHighlightButton, {
|
|
70
|
+
"key": color.value,
|
|
71
|
+
"editor": props.editor,
|
|
72
|
+
"highlightColor": color.value,
|
|
73
|
+
"label": color.label,
|
|
74
|
+
"onApplied": () => {
|
|
75
|
+
isOpen.value = false;
|
|
76
|
+
}
|
|
77
|
+
}, null))]), _createVNode("div", {
|
|
78
|
+
"class": "tiptap-color-highlight-vertical-separator"
|
|
79
|
+
}, null), _createVNode(Button, {
|
|
80
|
+
"type": "button",
|
|
81
|
+
"data-style": "ghost",
|
|
82
|
+
"onClick": () => {
|
|
83
|
+
handleRemoveHighlight();
|
|
84
|
+
isOpen.value = false;
|
|
85
|
+
},
|
|
86
|
+
"tooltip": "Remove highlight",
|
|
87
|
+
"class": "tiptap-color-highlight-remove-button"
|
|
88
|
+
}, {
|
|
89
|
+
default: () => [_createVNode(BanIcon, {
|
|
90
|
+
"class": "tiptap-button-icon"
|
|
91
|
+
}, null)]
|
|
92
|
+
})])
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
export {
|
|
98
|
+
ColorHighlightPopover
|
|
99
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import 'element-plus/es/components/dropdown/style/css';
|
|
3
|
+
import 'element-plus/es/components/dropdown-menu/style/css';
|
|
4
|
+
import 'element-plus/es/components/dropdown-item/style/css';
|
|
5
|
+
export declare const HeadingDropdownMenu: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
editor: {
|
|
7
|
+
type: PropType<any>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
levels: {
|
|
11
|
+
type: PropType<number[]>;
|
|
12
|
+
default: () => number[];
|
|
13
|
+
};
|
|
14
|
+
hideWhenUnavailable: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
className: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
editor: {
|
|
24
|
+
type: PropType<any>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
levels: {
|
|
28
|
+
type: PropType<number[]>;
|
|
29
|
+
default: () => number[];
|
|
30
|
+
};
|
|
31
|
+
hideWhenUnavailable: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
className: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
}>> & Readonly<{}>, {
|
|
40
|
+
className: string;
|
|
41
|
+
hideWhenUnavailable: boolean;
|
|
42
|
+
levels: number[];
|
|
43
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { createVNode as _createVNode, mergeProps as _mergeProps, createTextVNode as _createTextVNode } from "vue";
|
|
2
|
+
import "./_atomic.css";
|
|
3
|
+
import { defineComponent } from "vue";
|
|
4
|
+
import { useHeadingDropdownMenu } from "../hooks/use-heading-dropdown-menu";
|
|
5
|
+
import { toggleHeading } from "../hooks/use-heading";
|
|
6
|
+
import { Button } from "../primitives/button";
|
|
7
|
+
import { cn } from "../utils/tiptap-utils";
|
|
8
|
+
import { ElDropdown, ElDropdownMenu, ElDropdownItem } from "element-plus";
|
|
9
|
+
import "element-plus/es/components/dropdown/style/css";
|
|
10
|
+
import "element-plus/es/components/dropdown-menu/style/css";
|
|
11
|
+
import "element-plus/es/components/dropdown-item/style/css";
|
|
12
|
+
import { ChevronDownIcon } from "../icons";
|
|
13
|
+
import { headingIcons } from "../hooks/use-heading";
|
|
14
|
+
import * as Icons from "../icons";
|
|
15
|
+
const HeadingDropdownMenu = defineComponent({
|
|
16
|
+
name: "HeadingDropdownMenu",
|
|
17
|
+
props: {
|
|
18
|
+
editor: {
|
|
19
|
+
type: Object,
|
|
20
|
+
required: true
|
|
21
|
+
},
|
|
22
|
+
levels: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => [1, 2, 3, 4]
|
|
25
|
+
},
|
|
26
|
+
hideWhenUnavailable: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
className: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ""
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
setup(props, {
|
|
36
|
+
attrs
|
|
37
|
+
}) {
|
|
38
|
+
const {
|
|
39
|
+
isVisible,
|
|
40
|
+
activeLevel,
|
|
41
|
+
isActive,
|
|
42
|
+
canToggle,
|
|
43
|
+
levels,
|
|
44
|
+
label,
|
|
45
|
+
Icon
|
|
46
|
+
} = useHeadingDropdownMenu({
|
|
47
|
+
editor: props.editor,
|
|
48
|
+
levels: props.levels,
|
|
49
|
+
hideWhenUnavailable: props.hideWhenUnavailable
|
|
50
|
+
});
|
|
51
|
+
const handleLevelSelect = (level) => {
|
|
52
|
+
const editor = props.editor && "value" in props.editor ? props.editor.value : props.editor;
|
|
53
|
+
toggleHeading(editor, level);
|
|
54
|
+
};
|
|
55
|
+
return () => {
|
|
56
|
+
if (!isVisible.value)
|
|
57
|
+
return null;
|
|
58
|
+
const trigger = _createVNode(Button, _mergeProps({
|
|
59
|
+
"type": "button",
|
|
60
|
+
"disabled": !canToggle.value,
|
|
61
|
+
"data-style": "ghost",
|
|
62
|
+
"data-active-state": isActive.value ? "on" : "off",
|
|
63
|
+
"data-disabled": !canToggle.value,
|
|
64
|
+
"role": "button",
|
|
65
|
+
"tooltip": label,
|
|
66
|
+
"class": cn(props.className, "tiptap-heading-trigger")
|
|
67
|
+
}, attrs), {
|
|
68
|
+
default: () => [_createVNode(Icon.value, {
|
|
69
|
+
"class": "tiptap-button-icon"
|
|
70
|
+
}, null), _createVNode(ChevronDownIcon, {
|
|
71
|
+
"class": "tiptap-button-icon-chevron"
|
|
72
|
+
}, null)]
|
|
73
|
+
});
|
|
74
|
+
return _createVNode(ElDropdown, {
|
|
75
|
+
"trigger": "click",
|
|
76
|
+
"onCommand": handleLevelSelect,
|
|
77
|
+
"popper-class": "tiptap-dropdown-menu"
|
|
78
|
+
}, {
|
|
79
|
+
default: () => trigger,
|
|
80
|
+
dropdown: () => _createVNode(ElDropdownMenu, null, {
|
|
81
|
+
default: () => [levels.map((level) => {
|
|
82
|
+
const HeadingOptionIcon = headingIcons[level] || Icons.HeadingIcon;
|
|
83
|
+
return _createVNode(ElDropdownItem, {
|
|
84
|
+
"key": level,
|
|
85
|
+
"command": level,
|
|
86
|
+
"class": cn(activeLevel.value === level && "is-active")
|
|
87
|
+
}, {
|
|
88
|
+
default: () => [_createVNode("div", {
|
|
89
|
+
"class": "tiptap-dropdown-menu-item-content"
|
|
90
|
+
}, [_createVNode("span", {
|
|
91
|
+
"class": "tiptap-dropdown-menu-item-label"
|
|
92
|
+
}, [_createTextVNode("H"), level]), _createVNode("span", null, [_createTextVNode("Heading "), level])])]
|
|
93
|
+
});
|
|
94
|
+
})]
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
export {
|
|
101
|
+
HeadingDropdownMenu
|
|
102
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
export declare const HorizontalRuleButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
editor: {
|
|
4
|
+
type: PropType<any>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
className: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
editor: {
|
|
13
|
+
type: PropType<any>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
className: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
}>> & Readonly<{}>, {
|
|
21
|
+
className: string;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
|
2
|
+
import "./_atomic.css";
|
|
3
|
+
import { defineComponent } from "vue";
|
|
4
|
+
import { Button } from "../primitives/button";
|
|
5
|
+
import { DivideIcon } from "../icons";
|
|
6
|
+
import { cn } from "../utils/tiptap-utils";
|
|
7
|
+
const HorizontalRuleButton = defineComponent({
|
|
8
|
+
name: "HorizontalRuleButton",
|
|
9
|
+
props: {
|
|
10
|
+
editor: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
className: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(props, {
|
|
20
|
+
attrs
|
|
21
|
+
}) {
|
|
22
|
+
const handleHorizontalRule = () => {
|
|
23
|
+
const editor = props.editor && "value" in props.editor ? props.editor.value : props.editor;
|
|
24
|
+
editor.chain().focus().setHorizontalRule().run();
|
|
25
|
+
};
|
|
26
|
+
return () => _createVNode(Button, _mergeProps({
|
|
27
|
+
"type": "button",
|
|
28
|
+
"data-style": "ghost",
|
|
29
|
+
"role": "button",
|
|
30
|
+
"tooltip": "Horizontal Rule",
|
|
31
|
+
"onClick": handleHorizontalRule,
|
|
32
|
+
"class": cn(props.className)
|
|
33
|
+
}, attrs), {
|
|
34
|
+
default: () => [_createVNode(DivideIcon, {
|
|
35
|
+
"class": "tiptap-button-icon"
|
|
36
|
+
}, null)]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
HorizontalRuleButton
|
|
42
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
export declare const ImageUploadButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
editor: {
|
|
4
|
+
type: PropType<any>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
text: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
hideWhenUnavailable: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
className: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
editor: {
|
|
21
|
+
type: PropType<any>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
text: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
hideWhenUnavailable: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
className: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
}>> & Readonly<{}>, {
|
|
37
|
+
text: string;
|
|
38
|
+
className: string;
|
|
39
|
+
hideWhenUnavailable: boolean;
|
|
40
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Fragment as _Fragment, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
|
2
|
+
import "./_atomic.css";
|
|
3
|
+
import { defineComponent } from "vue";
|
|
4
|
+
import { useImageUpload } from "../hooks/use-image-upload";
|
|
5
|
+
import { Button } from "../primitives/button";
|
|
6
|
+
import { cn } from "../utils/tiptap-utils";
|
|
7
|
+
const ImageUploadButton = defineComponent({
|
|
8
|
+
name: "ImageUploadButton",
|
|
9
|
+
props: {
|
|
10
|
+
editor: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
text: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
hideWhenUnavailable: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
className: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(props, {
|
|
28
|
+
slots,
|
|
29
|
+
attrs
|
|
30
|
+
}) {
|
|
31
|
+
const {
|
|
32
|
+
isVisible,
|
|
33
|
+
handleImage,
|
|
34
|
+
label,
|
|
35
|
+
canInsert,
|
|
36
|
+
isActive,
|
|
37
|
+
Icon,
|
|
38
|
+
shortcutKeys
|
|
39
|
+
} = useImageUpload({
|
|
40
|
+
editor: props.editor,
|
|
41
|
+
hideWhenUnavailable: props.hideWhenUnavailable
|
|
42
|
+
});
|
|
43
|
+
return () => {
|
|
44
|
+
if (!isVisible.value)
|
|
45
|
+
return null;
|
|
46
|
+
return _createVNode(Button, _mergeProps({
|
|
47
|
+
"type": "button",
|
|
48
|
+
"disabled": !canInsert.value,
|
|
49
|
+
"data-style": "ghost",
|
|
50
|
+
"data-active-state": isActive.value ? "on" : "off",
|
|
51
|
+
"data-disabled": !canInsert.value,
|
|
52
|
+
"role": "button",
|
|
53
|
+
"tabindex": -1,
|
|
54
|
+
"aria-label": label,
|
|
55
|
+
"aria-pressed": isActive.value,
|
|
56
|
+
"tooltip": label,
|
|
57
|
+
"onClick": handleImage,
|
|
58
|
+
"class": cn(props.className)
|
|
59
|
+
}, attrs), {
|
|
60
|
+
default: () => [slots.default ? slots.default() : _createVNode(_Fragment, null, [_createVNode(Icon, {
|
|
61
|
+
"class": "tiptap-button-icon"
|
|
62
|
+
}, null), props.text && _createVNode("span", {
|
|
63
|
+
"class": "tiptap-button-text"
|
|
64
|
+
}, [props.text])])]
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
export {
|
|
70
|
+
ImageUploadButton
|
|
71
|
+
};
|