@cgboiler/biz-basic 1.0.52 → 1.0.54
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 +88 -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 -391
- 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 +88 -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 -392
- 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,94 @@
|
|
|
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
|
+
CodeBlockButton: () => CodeBlockButton
|
|
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_code_block = require("../hooks/use-code-block");
|
|
27
|
+
var import_button = require("../primitives/button");
|
|
28
|
+
var import_tiptap_utils = require("../utils/tiptap-utils");
|
|
29
|
+
const CodeBlockButton = (0, import_vue2.defineComponent)({
|
|
30
|
+
name: "CodeBlockButton",
|
|
31
|
+
props: {
|
|
32
|
+
editor: {
|
|
33
|
+
type: Object,
|
|
34
|
+
required: true
|
|
35
|
+
},
|
|
36
|
+
text: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: ""
|
|
39
|
+
},
|
|
40
|
+
hideWhenUnavailable: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
showShortcut: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
className: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ""
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
setup(props, {
|
|
54
|
+
slots,
|
|
55
|
+
attrs
|
|
56
|
+
}) {
|
|
57
|
+
const {
|
|
58
|
+
isVisible,
|
|
59
|
+
handleToggle,
|
|
60
|
+
label,
|
|
61
|
+
canToggle,
|
|
62
|
+
isActive,
|
|
63
|
+
Icon,
|
|
64
|
+
shortcutKeys
|
|
65
|
+
} = (0, import_use_code_block.useCodeBlock)({
|
|
66
|
+
editor: props.editor,
|
|
67
|
+
hideWhenUnavailable: props.hideWhenUnavailable
|
|
68
|
+
});
|
|
69
|
+
return () => {
|
|
70
|
+
if (!isVisible.value)
|
|
71
|
+
return null;
|
|
72
|
+
return (0, import_vue.createVNode)(import_button.Button, (0, import_vue.mergeProps)({
|
|
73
|
+
"type": "button",
|
|
74
|
+
"disabled": !canToggle.value,
|
|
75
|
+
"data-style": "ghost",
|
|
76
|
+
"data-active-state": isActive.value ? "on" : "off",
|
|
77
|
+
"data-disabled": !canToggle.value,
|
|
78
|
+
"role": "button",
|
|
79
|
+
"tabindex": -1,
|
|
80
|
+
"aria-label": label,
|
|
81
|
+
"aria-pressed": isActive.value,
|
|
82
|
+
"tooltip": label,
|
|
83
|
+
"onClick": handleToggle,
|
|
84
|
+
"class": (0, import_tiptap_utils.cn)(props.className)
|
|
85
|
+
}, attrs), {
|
|
86
|
+
default: () => [slots.default ? slots.default() : (0, import_vue.createVNode)(import_vue.Fragment, null, [(0, import_vue.createVNode)(Icon, {
|
|
87
|
+
"class": "tiptap-button-icon"
|
|
88
|
+
}, null), props.text && (0, import_vue.createVNode)("span", {
|
|
89
|
+
"class": "tiptap-button-text"
|
|
90
|
+
}, [props.text])])]
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
});
|
|
@@ -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,119 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
var __export = (target, all) => {
|
|
23
|
+
for (var name in all)
|
|
24
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
25
|
+
};
|
|
26
|
+
var __copyProps = (to, from, except, desc) => {
|
|
27
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
28
|
+
for (let key of __getOwnPropNames(from))
|
|
29
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
30
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
31
|
+
}
|
|
32
|
+
return to;
|
|
33
|
+
};
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
|
+
var stdin_exports = {};
|
|
36
|
+
__export(stdin_exports, {
|
|
37
|
+
ColorHighlightButton: () => ColorHighlightButton
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
40
|
+
var import_vue = require("vue");
|
|
41
|
+
var import_atomic = require("./_atomic.css");
|
|
42
|
+
var import_vue2 = require("vue");
|
|
43
|
+
var import_use_color_highlight = require("../hooks/use-color-highlight");
|
|
44
|
+
var import_button = require("../primitives/button");
|
|
45
|
+
var import_tiptap_utils = require("../utils/tiptap-utils");
|
|
46
|
+
var import_color_highlight_button = require("../styles/color-highlight-button.css");
|
|
47
|
+
const ColorHighlightButton = (0, import_vue2.defineComponent)({
|
|
48
|
+
name: "ColorHighlightButton",
|
|
49
|
+
props: {
|
|
50
|
+
editor: {
|
|
51
|
+
type: Object,
|
|
52
|
+
required: true
|
|
53
|
+
},
|
|
54
|
+
highlightColor: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: true
|
|
57
|
+
},
|
|
58
|
+
label: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: ""
|
|
61
|
+
},
|
|
62
|
+
hideWhenUnavailable: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false
|
|
65
|
+
},
|
|
66
|
+
className: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: ""
|
|
69
|
+
},
|
|
70
|
+
onApplied: {
|
|
71
|
+
type: Function
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
setup(props, {
|
|
75
|
+
attrs
|
|
76
|
+
}) {
|
|
77
|
+
const {
|
|
78
|
+
isVisible,
|
|
79
|
+
handleColorHighlight,
|
|
80
|
+
label,
|
|
81
|
+
canHighlight,
|
|
82
|
+
isActive,
|
|
83
|
+
Icon
|
|
84
|
+
} = (0, import_use_color_highlight.useColorHighlight)({
|
|
85
|
+
editor: props.editor,
|
|
86
|
+
highlightColor: props.highlightColor,
|
|
87
|
+
label: props.label || `Highlight ${props.highlightColor}`,
|
|
88
|
+
hideWhenUnavailable: props.hideWhenUnavailable,
|
|
89
|
+
onApplied: props.onApplied
|
|
90
|
+
});
|
|
91
|
+
return () => {
|
|
92
|
+
if (!isVisible.value)
|
|
93
|
+
return null;
|
|
94
|
+
return (0, import_vue.createVNode)(import_button.Button, (0, import_vue.mergeProps)({
|
|
95
|
+
"type": "button",
|
|
96
|
+
"disabled": !canHighlight.value,
|
|
97
|
+
"data-style": "ghost",
|
|
98
|
+
"data-active-state": isActive.value ? "on" : "off",
|
|
99
|
+
"role": "button",
|
|
100
|
+
"tabindex": -1,
|
|
101
|
+
"aria-label": label,
|
|
102
|
+
"aria-pressed": isActive.value,
|
|
103
|
+
"tooltip": label,
|
|
104
|
+
"onClick": handleColorHighlight,
|
|
105
|
+
"class": (0, import_tiptap_utils.cn)("tiptap-color-highlight-button", props.className),
|
|
106
|
+
"style": __spreadProps(__spreadValues({}, attrs.style || {}), {
|
|
107
|
+
"--highlight-color": props.highlightColor
|
|
108
|
+
})
|
|
109
|
+
}, attrs), {
|
|
110
|
+
default: () => [(0, import_vue.createVNode)("div", {
|
|
111
|
+
"class": "tiptap-button-highlight",
|
|
112
|
+
"style": {
|
|
113
|
+
"--highlight-color": props.highlightColor
|
|
114
|
+
}
|
|
115
|
+
}, null)]
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
});
|
|
@@ -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,118 @@
|
|
|
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
|
+
ColorHighlightPopover: () => ColorHighlightPopover
|
|
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_color_highlight = require("../hooks/use-color-highlight");
|
|
27
|
+
var import_color_highlight_button = require("./color-highlight-button");
|
|
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
|
+
var import_color_highlight_popover = require("../styles/color-highlight-popover.css");
|
|
33
|
+
const ColorHighlightPopover = (0, import_vue2.defineComponent)({
|
|
34
|
+
name: "ColorHighlightPopover",
|
|
35
|
+
props: {
|
|
36
|
+
editor: {
|
|
37
|
+
type: Object,
|
|
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
|
+
canHighlight,
|
|
55
|
+
isActive,
|
|
56
|
+
label,
|
|
57
|
+
handleRemoveHighlight
|
|
58
|
+
} = (0, import_use_color_highlight.useColorHighlight)({
|
|
59
|
+
editor: props.editor,
|
|
60
|
+
hideWhenUnavailable: props.hideWhenUnavailable
|
|
61
|
+
});
|
|
62
|
+
const isOpen = (0, import_vue2.ref)(false);
|
|
63
|
+
return () => {
|
|
64
|
+
if (!isVisible.value)
|
|
65
|
+
return null;
|
|
66
|
+
const trigger = (0, import_vue.createVNode)(import_button.Button, (0, import_vue.mergeProps)({
|
|
67
|
+
"type": "button",
|
|
68
|
+
"disabled": !canHighlight.value,
|
|
69
|
+
"data-style": "ghost",
|
|
70
|
+
"data-active-state": isActive.value ? "on" : "off",
|
|
71
|
+
"role": "button",
|
|
72
|
+
"tooltip": label,
|
|
73
|
+
"class": (0, import_tiptap_utils.cn)(props.className)
|
|
74
|
+
}, attrs), {
|
|
75
|
+
default: () => [(0, import_vue.createVNode)(import_icons.HighlighterIcon, {
|
|
76
|
+
"class": "tiptap-button-icon"
|
|
77
|
+
}, null)]
|
|
78
|
+
});
|
|
79
|
+
return (0, import_vue.createVNode)(import_element_plus.ElPopover, {
|
|
80
|
+
"trigger": "click",
|
|
81
|
+
"width": "auto",
|
|
82
|
+
"popper-class": "tiptap-color-highlight-popover",
|
|
83
|
+
"visible": isOpen.value,
|
|
84
|
+
"onUpdate:visible": ($event) => isOpen.value = $event
|
|
85
|
+
}, {
|
|
86
|
+
reference: () => trigger,
|
|
87
|
+
default: () => (0, import_vue.createVNode)("div", {
|
|
88
|
+
"class": "tiptap-color-highlight-popover-content"
|
|
89
|
+
}, [(0, import_vue.createVNode)("div", {
|
|
90
|
+
"class": "tiptap-color-highlight-grid"
|
|
91
|
+
}, [["Green", "Blue", "Red", "Purple", "Yellow"].map((name) => import_use_color_highlight.HIGHLIGHT_COLORS.find((c) => c.label.includes(name))).filter(Boolean).map((color) => (0, import_vue.createVNode)(import_color_highlight_button.ColorHighlightButton, {
|
|
92
|
+
"key": color.value,
|
|
93
|
+
"editor": props.editor,
|
|
94
|
+
"highlightColor": color.value,
|
|
95
|
+
"label": color.label,
|
|
96
|
+
"onApplied": () => {
|
|
97
|
+
isOpen.value = false;
|
|
98
|
+
}
|
|
99
|
+
}, null))]), (0, import_vue.createVNode)("div", {
|
|
100
|
+
"class": "tiptap-color-highlight-vertical-separator"
|
|
101
|
+
}, null), (0, import_vue.createVNode)(import_button.Button, {
|
|
102
|
+
"type": "button",
|
|
103
|
+
"data-style": "ghost",
|
|
104
|
+
"onClick": () => {
|
|
105
|
+
handleRemoveHighlight();
|
|
106
|
+
isOpen.value = false;
|
|
107
|
+
},
|
|
108
|
+
"tooltip": "Remove highlight",
|
|
109
|
+
"class": "tiptap-color-highlight-remove-button"
|
|
110
|
+
}, {
|
|
111
|
+
default: () => [(0, import_vue.createVNode)(import_icons.BanIcon, {
|
|
112
|
+
"class": "tiptap-button-icon"
|
|
113
|
+
}, null)]
|
|
114
|
+
})])
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
});
|
|
@@ -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,131 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var stdin_exports = {};
|
|
29
|
+
__export(stdin_exports, {
|
|
30
|
+
HeadingDropdownMenu: () => HeadingDropdownMenu
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
33
|
+
var import_vue = require("vue");
|
|
34
|
+
var import_atomic = require("./_atomic.css");
|
|
35
|
+
var import_vue2 = require("vue");
|
|
36
|
+
var import_use_heading_dropdown_menu = require("../hooks/use-heading-dropdown-menu");
|
|
37
|
+
var import_use_heading = require("../hooks/use-heading");
|
|
38
|
+
var import_button = require("../primitives/button");
|
|
39
|
+
var import_tiptap_utils = require("../utils/tiptap-utils");
|
|
40
|
+
var import_element_plus = require("element-plus");
|
|
41
|
+
var import_css = require("element-plus/es/components/dropdown/style/css");
|
|
42
|
+
var import_css2 = require("element-plus/es/components/dropdown-menu/style/css");
|
|
43
|
+
var import_css3 = require("element-plus/es/components/dropdown-item/style/css");
|
|
44
|
+
var import_icons = require("../icons");
|
|
45
|
+
var import_use_heading2 = require("../hooks/use-heading");
|
|
46
|
+
var Icons = __toESM(require("../icons"));
|
|
47
|
+
const HeadingDropdownMenu = (0, import_vue2.defineComponent)({
|
|
48
|
+
name: "HeadingDropdownMenu",
|
|
49
|
+
props: {
|
|
50
|
+
editor: {
|
|
51
|
+
type: Object,
|
|
52
|
+
required: true
|
|
53
|
+
},
|
|
54
|
+
levels: {
|
|
55
|
+
type: Array,
|
|
56
|
+
default: () => [1, 2, 3, 4]
|
|
57
|
+
},
|
|
58
|
+
hideWhenUnavailable: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
62
|
+
className: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ""
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
setup(props, {
|
|
68
|
+
attrs
|
|
69
|
+
}) {
|
|
70
|
+
const {
|
|
71
|
+
isVisible,
|
|
72
|
+
activeLevel,
|
|
73
|
+
isActive,
|
|
74
|
+
canToggle,
|
|
75
|
+
levels,
|
|
76
|
+
label,
|
|
77
|
+
Icon
|
|
78
|
+
} = (0, import_use_heading_dropdown_menu.useHeadingDropdownMenu)({
|
|
79
|
+
editor: props.editor,
|
|
80
|
+
levels: props.levels,
|
|
81
|
+
hideWhenUnavailable: props.hideWhenUnavailable
|
|
82
|
+
});
|
|
83
|
+
const handleLevelSelect = (level) => {
|
|
84
|
+
const editor = props.editor && "value" in props.editor ? props.editor.value : props.editor;
|
|
85
|
+
(0, import_use_heading.toggleHeading)(editor, level);
|
|
86
|
+
};
|
|
87
|
+
return () => {
|
|
88
|
+
if (!isVisible.value)
|
|
89
|
+
return null;
|
|
90
|
+
const trigger = (0, import_vue.createVNode)(import_button.Button, (0, import_vue.mergeProps)({
|
|
91
|
+
"type": "button",
|
|
92
|
+
"disabled": !canToggle.value,
|
|
93
|
+
"data-style": "ghost",
|
|
94
|
+
"data-active-state": isActive.value ? "on" : "off",
|
|
95
|
+
"data-disabled": !canToggle.value,
|
|
96
|
+
"role": "button",
|
|
97
|
+
"tooltip": label,
|
|
98
|
+
"class": (0, import_tiptap_utils.cn)(props.className, "tiptap-heading-trigger")
|
|
99
|
+
}, attrs), {
|
|
100
|
+
default: () => [(0, import_vue.createVNode)(Icon.value, {
|
|
101
|
+
"class": "tiptap-button-icon"
|
|
102
|
+
}, null), (0, import_vue.createVNode)(import_icons.ChevronDownIcon, {
|
|
103
|
+
"class": "tiptap-button-icon-chevron"
|
|
104
|
+
}, null)]
|
|
105
|
+
});
|
|
106
|
+
return (0, import_vue.createVNode)(import_element_plus.ElDropdown, {
|
|
107
|
+
"trigger": "click",
|
|
108
|
+
"onCommand": handleLevelSelect,
|
|
109
|
+
"popper-class": "tiptap-dropdown-menu"
|
|
110
|
+
}, {
|
|
111
|
+
default: () => trigger,
|
|
112
|
+
dropdown: () => (0, import_vue.createVNode)(import_element_plus.ElDropdownMenu, null, {
|
|
113
|
+
default: () => [levels.map((level) => {
|
|
114
|
+
const HeadingOptionIcon = import_use_heading2.headingIcons[level] || Icons.HeadingIcon;
|
|
115
|
+
return (0, import_vue.createVNode)(import_element_plus.ElDropdownItem, {
|
|
116
|
+
"key": level,
|
|
117
|
+
"command": level,
|
|
118
|
+
"class": (0, import_tiptap_utils.cn)(activeLevel.value === level && "is-active")
|
|
119
|
+
}, {
|
|
120
|
+
default: () => [(0, import_vue.createVNode)("div", {
|
|
121
|
+
"class": "tiptap-dropdown-menu-item-content"
|
|
122
|
+
}, [(0, import_vue.createVNode)("span", {
|
|
123
|
+
"class": "tiptap-dropdown-menu-item-label"
|
|
124
|
+
}, [(0, import_vue.createTextVNode)("H"), level]), (0, import_vue.createVNode)("span", null, [(0, import_vue.createTextVNode)("Heading "), level])])]
|
|
125
|
+
});
|
|
126
|
+
})]
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
});
|
|
@@ -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,61 @@
|
|
|
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
|
+
HorizontalRuleButton: () => HorizontalRuleButton
|
|
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_button = require("../primitives/button");
|
|
27
|
+
var import_icons = require("../icons");
|
|
28
|
+
var import_tiptap_utils = require("../utils/tiptap-utils");
|
|
29
|
+
const HorizontalRuleButton = (0, import_vue2.defineComponent)({
|
|
30
|
+
name: "HorizontalRuleButton",
|
|
31
|
+
props: {
|
|
32
|
+
editor: {
|
|
33
|
+
type: Object,
|
|
34
|
+
required: true
|
|
35
|
+
},
|
|
36
|
+
className: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: ""
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
setup(props, {
|
|
42
|
+
attrs
|
|
43
|
+
}) {
|
|
44
|
+
const handleHorizontalRule = () => {
|
|
45
|
+
const editor = props.editor && "value" in props.editor ? props.editor.value : props.editor;
|
|
46
|
+
editor.chain().focus().setHorizontalRule().run();
|
|
47
|
+
};
|
|
48
|
+
return () => (0, import_vue.createVNode)(import_button.Button, (0, import_vue.mergeProps)({
|
|
49
|
+
"type": "button",
|
|
50
|
+
"data-style": "ghost",
|
|
51
|
+
"role": "button",
|
|
52
|
+
"tooltip": "Horizontal Rule",
|
|
53
|
+
"onClick": handleHorizontalRule,
|
|
54
|
+
"class": (0, import_tiptap_utils.cn)(props.className)
|
|
55
|
+
}, attrs), {
|
|
56
|
+
default: () => [(0, import_vue.createVNode)(import_icons.DivideIcon, {
|
|
57
|
+
"class": "tiptap-button-icon"
|
|
58
|
+
}, null)]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
});
|