@kopexa/tiptap 17.6.18 → 17.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +691 -24
- package/dist/index.d.ts +691 -24
- package/dist/index.js +1478 -786
- package/dist/index.mjs +7987 -112
- package/package.json +57 -52
- package/dist/chunk-2SI7MRAE.mjs +0 -64
- package/dist/chunk-2U5CQUZH.mjs +0 -91
- package/dist/chunk-2UDCL55K.mjs +0 -55
- package/dist/chunk-2V6VOAPI.mjs +0 -139
- package/dist/chunk-2Z2QVW67.mjs +0 -1
- package/dist/chunk-32SUXCAQ.mjs +0 -115
- package/dist/chunk-33QD5PYJ.mjs +0 -63
- package/dist/chunk-3VRQUYYW.mjs +0 -169
- package/dist/chunk-42HKGCOO.mjs +0 -129
- package/dist/chunk-4ALV4UA5.mjs +0 -1
- package/dist/chunk-4CDZ547I.mjs +0 -185
- package/dist/chunk-4HO7BWDC.mjs +0 -89
- package/dist/chunk-4JRYQZ4A.mjs +0 -174
- package/dist/chunk-552JLRNB.mjs +0 -35
- package/dist/chunk-5SMDMQDF.mjs +0 -34
- package/dist/chunk-6552DQWB.mjs +0 -416
- package/dist/chunk-7FDDRVUE.mjs +0 -143
- package/dist/chunk-7VGROP26.mjs +0 -262
- package/dist/chunk-7VW67NVL.mjs +0 -80
- package/dist/chunk-AAV7ZNBP.mjs +0 -83
- package/dist/chunk-ATRHILCH.mjs +0 -1
- package/dist/chunk-B7WJOQ3X.mjs +0 -103
- package/dist/chunk-BEV5U2DK.mjs +0 -131
- package/dist/chunk-BXHPO3T7.mjs +0 -152
- package/dist/chunk-BXJYNSWQ.mjs +0 -30
- package/dist/chunk-C5RQWJKE.mjs +0 -155
- package/dist/chunk-CNVACBGT.mjs +0 -51
- package/dist/chunk-DQK6PA4U.mjs +0 -276
- package/dist/chunk-DSBJFMHK.mjs +0 -38
- package/dist/chunk-DT7ML2P4.mjs +0 -42
- package/dist/chunk-DZLGLP7R.mjs +0 -99
- package/dist/chunk-EAAQE5ZV.mjs +0 -283
- package/dist/chunk-EHY2NAW7.mjs +0 -120
- package/dist/chunk-EIIWU5FR.mjs +0 -61
- package/dist/chunk-ERPGWXFK.mjs +0 -163
- package/dist/chunk-F73FCUD5.mjs +0 -1
- package/dist/chunk-FRJX2F4T.mjs +0 -55
- package/dist/chunk-GYIYX2JH.mjs +0 -73
- package/dist/chunk-H6LC4LDQ.mjs +0 -63
- package/dist/chunk-H7MS2UMO.mjs +0 -168
- package/dist/chunk-HLLA2HRV.mjs +0 -1
- package/dist/chunk-HTJ2RXOG.mjs +0 -32
- package/dist/chunk-IFXRPGIJ.mjs +0 -98
- package/dist/chunk-IOB3REX6.mjs +0 -173
- package/dist/chunk-IQERE7KP.mjs +0 -115
- package/dist/chunk-JCV5SEKN.mjs +0 -65
- package/dist/chunk-JVSH5T4B.mjs +0 -72
- package/dist/chunk-KK4K43WM.mjs +0 -59
- package/dist/chunk-KR42JAVB.mjs +0 -60
- package/dist/chunk-KYLBKQ2E.mjs +0 -203
- package/dist/chunk-L5RDMV3H.mjs +0 -216
- package/dist/chunk-LNVWG34E.mjs +0 -165
- package/dist/chunk-LVNUU67N.mjs +0 -1
- package/dist/chunk-MNTOOEHA.mjs +0 -1
- package/dist/chunk-N3JE67CS.mjs +0 -81
- package/dist/chunk-N4CT5RNC.mjs +0 -123
- package/dist/chunk-OEVR5N7X.mjs +0 -65
- package/dist/chunk-P55PLOHR.mjs +0 -34
- package/dist/chunk-Q5FK7SFY.mjs +0 -75
- package/dist/chunk-Q7DFJ5NI.mjs +0 -153
- package/dist/chunk-QIELBKP3.mjs +0 -104
- package/dist/chunk-R2GM4A3T.mjs +0 -71
- package/dist/chunk-REJEJXOZ.mjs +0 -10
- package/dist/chunk-RFWNKE7D.mjs +0 -238
- package/dist/chunk-TAM3VMJT.mjs +0 -80
- package/dist/chunk-TDFS3DCZ.mjs +0 -79
- package/dist/chunk-TLM5ALHZ.mjs +0 -1
- package/dist/chunk-TZQQ6C2Q.mjs +0 -101
- package/dist/chunk-U5XAL46P.mjs +0 -39
- package/dist/chunk-UJ4BNZ63.mjs +0 -178
- package/dist/chunk-UVHVCION.mjs +0 -168
- package/dist/chunk-V6TAZMQN.mjs +0 -105
- package/dist/chunk-VF3G2URZ.mjs +0 -83
- package/dist/chunk-VRQ6OSAZ.mjs +0 -76
- package/dist/chunk-VTKJPVNM.mjs +0 -148
- package/dist/chunk-VX3HSJ76.mjs +0 -73
- package/dist/chunk-W2FLOOJ6.mjs +0 -75
- package/dist/chunk-XGAABDMW.mjs +0 -159
- package/dist/chunk-Y2KSWMG5.mjs +0 -1
- package/dist/chunk-YJAHZXLG.mjs +0 -92
- package/dist/chunk-Z365KVQY.mjs +0 -34
- package/dist/chunk-ZVTJ6XD7.mjs +0 -88
- package/dist/chunk-ZZ4OU46C.mjs +0 -131
- package/dist/context/editor-context.d.mts +0 -10
- package/dist/context/editor-context.d.ts +0 -10
- package/dist/context/editor-context.js +0 -34
- package/dist/context/editor-context.mjs +0 -9
- package/dist/context/editor-file-context.d.mts +0 -70
- package/dist/context/editor-file-context.d.ts +0 -70
- package/dist/context/editor-file-context.js +0 -96
- package/dist/context/editor-file-context.mjs +0 -12
- package/dist/extensions/callout/callout-settings.d.mts +0 -13
- package/dist/extensions/callout/callout-settings.d.ts +0 -13
- package/dist/extensions/callout/callout-settings.js +0 -206
- package/dist/extensions/callout/callout-settings.mjs +0 -9
- package/dist/extensions/callout/callout-view.d.mts +0 -12
- package/dist/extensions/callout/callout-view.d.ts +0 -12
- package/dist/extensions/callout/callout-view.js +0 -273
- package/dist/extensions/callout/callout-view.mjs +0 -12
- package/dist/extensions/callout/index.d.mts +0 -44
- package/dist/extensions/callout/index.d.ts +0 -44
- package/dist/extensions/callout/index.js +0 -380
- package/dist/extensions/callout/index.mjs +0 -13
- package/dist/extensions/callout/messages.d.mts +0 -59
- package/dist/extensions/callout/messages.d.ts +0 -59
- package/dist/extensions/callout/messages.js +0 -88
- package/dist/extensions/callout/messages.mjs +0 -7
- package/dist/extensions/image/image-view.d.mts +0 -15
- package/dist/extensions/image/image-view.d.ts +0 -15
- package/dist/extensions/image/image-view.js +0 -255
- package/dist/extensions/image/image-view.mjs +0 -12
- package/dist/extensions/image/index.d.mts +0 -29
- package/dist/extensions/image/index.d.ts +0 -29
- package/dist/extensions/image/index.js +0 -282
- package/dist/extensions/image/index.mjs +0 -16
- package/dist/extensions/image/messages.d.mts +0 -28
- package/dist/extensions/image/messages.d.ts +0 -28
- package/dist/extensions/image/messages.js +0 -57
- package/dist/extensions/image/messages.mjs +0 -7
- package/dist/extensions/image-upload/image-upload-view.d.mts +0 -12
- package/dist/extensions/image-upload/image-upload-view.d.ts +0 -12
- package/dist/extensions/image-upload/image-upload-view.js +0 -338
- package/dist/extensions/image-upload/image-upload-view.mjs +0 -12
- package/dist/extensions/image-upload/index.d.mts +0 -46
- package/dist/extensions/image-upload/index.d.ts +0 -46
- package/dist/extensions/image-upload/index.js +0 -414
- package/dist/extensions/image-upload/index.mjs +0 -16
- package/dist/extensions/image-upload/messages.d.mts +0 -32
- package/dist/extensions/image-upload/messages.d.ts +0 -32
- package/dist/extensions/image-upload/messages.js +0 -61
- package/dist/extensions/image-upload/messages.mjs +0 -7
- package/dist/extensions/link/index.d.mts +0 -6
- package/dist/extensions/link/index.d.ts +0 -6
- package/dist/extensions/link/index.js +0 -94
- package/dist/extensions/link/index.mjs +0 -7
- package/dist/extensions/math/index.d.mts +0 -38
- package/dist/extensions/math/index.d.ts +0 -38
- package/dist/extensions/math/index.js +0 -544
- package/dist/extensions/math/index.mjs +0 -17
- package/dist/extensions/math/inline-math-view.d.mts +0 -12
- package/dist/extensions/math/inline-math-view.d.ts +0 -12
- package/dist/extensions/math/inline-math-view.js +0 -232
- package/dist/extensions/math/inline-math-view.mjs +0 -11
- package/dist/extensions/math/inline-math.d.mts +0 -32
- package/dist/extensions/math/inline-math.d.ts +0 -32
- package/dist/extensions/math/inline-math.js +0 -304
- package/dist/extensions/math/inline-math.mjs +0 -12
- package/dist/extensions/math/math-block-view.d.mts +0 -11
- package/dist/extensions/math/math-block-view.d.ts +0 -11
- package/dist/extensions/math/math-block-view.js +0 -248
- package/dist/extensions/math/math-block-view.mjs +0 -11
- package/dist/extensions/math/messages.d.mts +0 -49
- package/dist/extensions/math/messages.d.ts +0 -49
- package/dist/extensions/math/messages.js +0 -78
- package/dist/extensions/math/messages.mjs +0 -7
- package/dist/extensions/selection/index.d.mts +0 -5
- package/dist/extensions/selection/index.d.ts +0 -5
- package/dist/extensions/selection/index.js +0 -62
- package/dist/extensions/selection/index.mjs +0 -7
- package/dist/extensions/toc/index.d.mts +0 -53
- package/dist/extensions/toc/index.d.ts +0 -53
- package/dist/extensions/toc/index.js +0 -501
- package/dist/extensions/toc/index.mjs +0 -13
- package/dist/extensions/toc/messages.d.mts +0 -74
- package/dist/extensions/toc/messages.d.ts +0 -74
- package/dist/extensions/toc/messages.js +0 -103
- package/dist/extensions/toc/messages.mjs +0 -7
- package/dist/extensions/toc/toc-settings.d.mts +0 -13
- package/dist/extensions/toc/toc-settings.d.ts +0 -13
- package/dist/extensions/toc/toc-settings.js +0 -283
- package/dist/extensions/toc/toc-settings.mjs +0 -9
- package/dist/extensions/toc/toc-view.d.mts +0 -12
- package/dist/extensions/toc/toc-view.d.ts +0 -12
- package/dist/extensions/toc/toc-view.js +0 -411
- package/dist/extensions/toc/toc-view.mjs +0 -12
- package/dist/extensions/trailing-node/index.d.mts +0 -9
- package/dist/extensions/trailing-node/index.d.ts +0 -9
- package/dist/extensions/trailing-node/index.js +0 -86
- package/dist/extensions/trailing-node/index.mjs +0 -7
- package/dist/extensions/ui-state/index.d.mts +0 -34
- package/dist/extensions/ui-state/index.d.ts +0 -34
- package/dist/extensions/ui-state/index.js +0 -84
- package/dist/extensions/ui-state/index.mjs +0 -9
- package/dist/extensions/variable/extract-variables.d.mts +0 -16
- package/dist/extensions/variable/extract-variables.d.ts +0 -16
- package/dist/extensions/variable/extract-variables.js +0 -58
- package/dist/extensions/variable/extract-variables.mjs +0 -7
- package/dist/extensions/variable/index.d.mts +0 -38
- package/dist/extensions/variable/index.d.ts +0 -38
- package/dist/extensions/variable/index.js +0 -190
- package/dist/extensions/variable/index.mjs +0 -11
- package/dist/extensions/variable/messages.d.mts +0 -69
- package/dist/extensions/variable/messages.d.ts +0 -69
- package/dist/extensions/variable/messages.js +0 -98
- package/dist/extensions/variable/messages.mjs +0 -7
- package/dist/extensions/variable/variable-context.d.mts +0 -56
- package/dist/extensions/variable/variable-context.d.ts +0 -56
- package/dist/extensions/variable/variable-context.js +0 -70
- package/dist/extensions/variable/variable-context.mjs +0 -12
- package/dist/extensions/variable/variable-filler-dialog.d.mts +0 -43
- package/dist/extensions/variable/variable-filler-dialog.d.ts +0 -43
- package/dist/extensions/variable/variable-filler-dialog.js +0 -207
- package/dist/extensions/variable/variable-filler-dialog.mjs +0 -9
- package/dist/extensions/variable/variable-suggestion.d.mts +0 -31
- package/dist/extensions/variable/variable-suggestion.d.ts +0 -31
- package/dist/extensions/variable/variable-suggestion.js +0 -615
- package/dist/extensions/variable/variable-suggestion.mjs +0 -14
- package/dist/extensions/variable/variable-view.d.mts +0 -13
- package/dist/extensions/variable/variable-view.d.ts +0 -13
- package/dist/extensions/variable/variable-view.js +0 -110
- package/dist/extensions/variable/variable-view.mjs +0 -11
- package/dist/hooks/use-create-editor.d.mts +0 -46
- package/dist/hooks/use-create-editor.d.ts +0 -46
- package/dist/hooks/use-create-editor.js +0 -2726
- package/dist/hooks/use-create-editor.mjs +0 -37
- package/dist/hooks/use-cursor-visibility.d.mts +0 -37
- package/dist/hooks/use-cursor-visibility.d.ts +0 -37
- package/dist/hooks/use-cursor-visibility.js +0 -140
- package/dist/hooks/use-cursor-visibility.mjs +0 -8
- package/dist/hooks/use-floating-element.d.mts +0 -43
- package/dist/hooks/use-floating-element.d.ts +0 -43
- package/dist/hooks/use-floating-element.js +0 -88
- package/dist/hooks/use-floating-element.mjs +0 -8
- package/dist/hooks/use-floating-toolbar-visibility.d.mts +0 -32
- package/dist/hooks/use-floating-toolbar-visibility.d.ts +0 -32
- package/dist/hooks/use-floating-toolbar-visibility.js +0 -115
- package/dist/hooks/use-floating-toolbar-visibility.mjs +0 -13
- package/dist/hooks/use-menu-navigation.d.mts +0 -55
- package/dist/hooks/use-menu-navigation.d.ts +0 -55
- package/dist/hooks/use-menu-navigation.js +0 -163
- package/dist/hooks/use-menu-navigation.mjs +0 -8
- package/dist/hooks/use-tiptap-editor.d.mts +0 -20
- package/dist/hooks/use-tiptap-editor.d.ts +0 -20
- package/dist/hooks/use-tiptap-editor.js +0 -58
- package/dist/hooks/use-tiptap-editor.mjs +0 -8
- package/dist/hooks/use-ui-editor-state.d.mts +0 -7
- package/dist/hooks/use-ui-editor-state.d.ts +0 -7
- package/dist/hooks/use-ui-editor-state.js +0 -107
- package/dist/hooks/use-ui-editor-state.mjs +0 -11
- package/dist/hooks/use-window-size.d.mts +0 -12
- package/dist/hooks/use-window-size.d.ts +0 -12
- package/dist/hooks/use-window-size.js +0 -75
- package/dist/hooks/use-window-size.mjs +0 -7
- package/dist/presets/basic/editor-header.d.mts +0 -23
- package/dist/presets/basic/editor-header.d.ts +0 -23
- package/dist/presets/basic/editor-header.js +0 -2750
- package/dist/presets/basic/editor-header.mjs +0 -43
- package/dist/presets/basic/index.d.mts +0 -38
- package/dist/presets/basic/index.d.ts +0 -38
- package/dist/presets/basic/index.js +0 -6891
- package/dist/presets/basic/index.mjs +0 -85
- package/dist/ui/blockquote-button/blockquote-button.d.mts +0 -20
- package/dist/ui/blockquote-button/blockquote-button.d.ts +0 -20
- package/dist/ui/blockquote-button/blockquote-button.js +0 -247
- package/dist/ui/blockquote-button/blockquote-button.mjs +0 -9
- package/dist/ui/blockquote-button/index.d.mts +0 -6
- package/dist/ui/blockquote-button/index.d.ts +0 -6
- package/dist/ui/blockquote-button/index.js +0 -259
- package/dist/ui/blockquote-button/index.mjs +0 -21
- package/dist/ui/blockquote-button/use-blockquote.d.mts +0 -85
- package/dist/ui/blockquote-button/use-blockquote.d.ts +0 -85
- package/dist/ui/blockquote-button/use-blockquote.js +0 -192
- package/dist/ui/blockquote-button/use-blockquote.mjs +0 -17
- package/dist/ui/bubble-menu/index.d.mts +0 -13
- package/dist/ui/bubble-menu/index.d.ts +0 -13
- package/dist/ui/bubble-menu/index.js +0 -673
- package/dist/ui/bubble-menu/index.mjs +0 -16
- package/dist/ui/codeblock-button/code-block-button.d.mts +0 -20
- package/dist/ui/codeblock-button/code-block-button.d.ts +0 -20
- package/dist/ui/codeblock-button/code-block-button.js +0 -237
- package/dist/ui/codeblock-button/code-block-button.mjs +0 -9
- package/dist/ui/codeblock-button/index.d.mts +0 -6
- package/dist/ui/codeblock-button/index.d.ts +0 -6
- package/dist/ui/codeblock-button/index.js +0 -249
- package/dist/ui/codeblock-button/index.mjs +0 -21
- package/dist/ui/codeblock-button/use-code-block.d.mts +0 -92
- package/dist/ui/codeblock-button/use-code-block.d.ts +0 -92
- package/dist/ui/codeblock-button/use-code-block.js +0 -192
- package/dist/ui/codeblock-button/use-code-block.mjs +0 -17
- package/dist/ui/color-highlight-button/color-highlight-button.d.mts +0 -25
- package/dist/ui/color-highlight-button/color-highlight-button.d.ts +0 -25
- package/dist/ui/color-highlight-button/color-highlight-button.js +0 -266
- package/dist/ui/color-highlight-button/color-highlight-button.mjs +0 -9
- package/dist/ui/color-highlight-button/index.d.mts +0 -6
- package/dist/ui/color-highlight-button/index.d.ts +0 -6
- package/dist/ui/color-highlight-button/index.js +0 -342
- package/dist/ui/color-highlight-button/index.mjs +0 -27
- package/dist/ui/color-highlight-button/use-color-highlight.d.mts +0 -64
- package/dist/ui/color-highlight-button/use-color-highlight.d.ts +0 -64
- package/dist/ui/color-highlight-button/use-color-highlight.js +0 -247
- package/dist/ui/color-highlight-button/use-color-highlight.mjs +0 -23
- package/dist/ui/color-highlight-popover/color-highlight-popover.d.mts +0 -29
- package/dist/ui/color-highlight-popover/color-highlight-popover.d.ts +0 -29
- package/dist/ui/color-highlight-popover/color-highlight-popover.js +0 -590
- package/dist/ui/color-highlight-popover/color-highlight-popover.mjs +0 -17
- package/dist/ui/color-highlight-popover/index.d.mts +0 -6
- package/dist/ui/color-highlight-popover/index.d.ts +0 -6
- package/dist/ui/color-highlight-popover/index.js +0 -591
- package/dist/ui/color-highlight-popover/index.mjs +0 -17
- package/dist/ui/copy-anchor-link-button/use-scroll-to-hash.d.mts +0 -30
- package/dist/ui/copy-anchor-link-button/use-scroll-to-hash.d.ts +0 -30
- package/dist/ui/copy-anchor-link-button/use-scroll-to-hash.js +0 -171
- package/dist/ui/copy-anchor-link-button/use-scroll-to-hash.mjs +0 -10
- package/dist/ui/heading-button/index.d.mts +0 -45
- package/dist/ui/heading-button/index.d.ts +0 -45
- package/dist/ui/heading-button/index.js +0 -222
- package/dist/ui/heading-button/index.mjs +0 -16
- package/dist/ui/heading-button/utils.d.mts +0 -17
- package/dist/ui/heading-button/utils.d.ts +0 -17
- package/dist/ui/heading-button/utils.js +0 -92
- package/dist/ui/heading-button/utils.mjs +0 -19
- package/dist/ui/heading-dropdown-menu/index.d.mts +0 -14
- package/dist/ui/heading-dropdown-menu/index.d.ts +0 -14
- package/dist/ui/heading-dropdown-menu/index.js +0 -308
- package/dist/ui/heading-dropdown-menu/index.mjs +0 -10
- package/dist/ui/link-bubble/index.d.mts +0 -13
- package/dist/ui/link-bubble/index.d.ts +0 -13
- package/dist/ui/link-bubble/index.js +0 -183
- package/dist/ui/link-bubble/index.mjs +0 -10
- package/dist/ui/link-popover/index.d.mts +0 -7
- package/dist/ui/link-popover/index.d.ts +0 -7
- package/dist/ui/link-popover/index.js +0 -512
- package/dist/ui/link-popover/index.mjs +0 -30
- package/dist/ui/link-popover/link-popover.d.mts +0 -85
- package/dist/ui/link-popover/link-popover.d.ts +0 -85
- package/dist/ui/link-popover/link-popover.js +0 -498
- package/dist/ui/link-popover/link-popover.mjs +0 -16
- package/dist/ui/link-popover/use-link-popover.d.mts +0 -123
- package/dist/ui/link-popover/use-link-popover.d.ts +0 -123
- package/dist/ui/link-popover/use-link-popover.js +0 -259
- package/dist/ui/link-popover/use-link-popover.mjs +0 -20
- package/dist/ui/list-button/index.d.mts +0 -50
- package/dist/ui/list-button/index.d.ts +0 -50
- package/dist/ui/list-button/index.js +0 -232
- package/dist/ui/list-button/index.mjs +0 -24
- package/dist/ui/list-dropdown-menu/index.d.mts +0 -45
- package/dist/ui/list-dropdown-menu/index.d.ts +0 -45
- package/dist/ui/list-dropdown-menu/index.js +0 -361
- package/dist/ui/list-dropdown-menu/index.mjs +0 -21
- package/dist/ui/mark-button/index.d.mts +0 -59
- package/dist/ui/mark-button/index.d.ts +0 -59
- package/dist/ui/mark-button/index.js +0 -217
- package/dist/ui/mark-button/index.mjs +0 -26
- package/dist/ui/reset-all-formatting-button/index.d.mts +0 -7
- package/dist/ui/reset-all-formatting-button/index.d.ts +0 -7
- package/dist/ui/reset-all-formatting-button/index.js +0 -286
- package/dist/ui/reset-all-formatting-button/index.mjs +0 -26
- package/dist/ui/reset-all-formatting-button/reset-all-formatting-button.d.mts +0 -30
- package/dist/ui/reset-all-formatting-button/reset-all-formatting-button.d.ts +0 -30
- package/dist/ui/reset-all-formatting-button/reset-all-formatting-button.js +0 -271
- package/dist/ui/reset-all-formatting-button/reset-all-formatting-button.mjs +0 -12
- package/dist/ui/reset-all-formatting-button/use-reset-all-formatting.d.mts +0 -103
- package/dist/ui/reset-all-formatting-button/use-reset-all-formatting.d.ts +0 -103
- package/dist/ui/reset-all-formatting-button/use-reset-all-formatting.js +0 -211
- package/dist/ui/reset-all-formatting-button/use-reset-all-formatting.mjs +0 -21
- package/dist/ui/slash-dropdown-menu/index.d.mts +0 -10
- package/dist/ui/slash-dropdown-menu/index.d.ts +0 -10
- package/dist/ui/slash-dropdown-menu/index.js +0 -1056
- package/dist/ui/slash-dropdown-menu/index.mjs +0 -19
- package/dist/ui/slash-dropdown-menu/slash-dropdown-menu.d.mts +0 -16
- package/dist/ui/slash-dropdown-menu/slash-dropdown-menu.d.ts +0 -16
- package/dist/ui/slash-dropdown-menu/slash-dropdown-menu.js +0 -1053
- package/dist/ui/slash-dropdown-menu/slash-dropdown-menu.mjs +0 -16
- package/dist/ui/slash-dropdown-menu/use-slash-dropdown-menu.d.mts +0 -162
- package/dist/ui/slash-dropdown-menu/use-slash-dropdown-menu.d.ts +0 -162
- package/dist/ui/slash-dropdown-menu/use-slash-dropdown-menu.js +0 -457
- package/dist/ui/slash-dropdown-menu/use-slash-dropdown-menu.mjs +0 -10
- package/dist/ui/suggestion-menu/index.d.mts +0 -10
- package/dist/ui/suggestion-menu/index.d.ts +0 -10
- package/dist/ui/suggestion-menu/index.js +0 -489
- package/dist/ui/suggestion-menu/index.mjs +0 -17
- package/dist/ui/suggestion-menu/suggestion-menu-types.d.mts +0 -89
- package/dist/ui/suggestion-menu/suggestion-menu-types.d.ts +0 -89
- package/dist/ui/suggestion-menu/suggestion-menu-types.js +0 -19
- package/dist/ui/suggestion-menu/suggestion-menu-types.mjs +0 -1
- package/dist/ui/suggestion-menu/suggestion-menu-utils.d.mts +0 -27
- package/dist/ui/suggestion-menu/suggestion-menu-utils.d.ts +0 -27
- package/dist/ui/suggestion-menu/suggestion-menu-utils.js +0 -75
- package/dist/ui/suggestion-menu/suggestion-menu-utils.mjs +0 -9
- package/dist/ui/suggestion-menu/suggestion-menu.d.mts +0 -15
- package/dist/ui/suggestion-menu/suggestion-menu.d.ts +0 -15
- package/dist/ui/suggestion-menu/suggestion-menu.js +0 -453
- package/dist/ui/suggestion-menu/suggestion-menu.mjs +0 -12
- package/dist/ui/table-button/index.d.mts +0 -15
- package/dist/ui/table-button/index.d.ts +0 -15
- package/dist/ui/table-button/index.js +0 -202
- package/dist/ui/table-button/index.mjs +0 -9
- package/dist/ui/table-button/use-table.d.mts +0 -51
- package/dist/ui/table-button/use-table.d.ts +0 -51
- package/dist/ui/table-button/use-table.js +0 -146
- package/dist/ui/table-button/use-table.mjs +0 -14
- package/dist/ui/text-align-button/index.d.mts +0 -6
- package/dist/ui/text-align-button/index.d.ts +0 -6
- package/dist/ui/text-align-button/index.js +0 -235
- package/dist/ui/text-align-button/index.mjs +0 -29
- package/dist/ui/text-align-button/text-align-button.d.mts +0 -20
- package/dist/ui/text-align-button/text-align-button.d.ts +0 -20
- package/dist/ui/text-align-button/text-align-button.js +0 -215
- package/dist/ui/text-align-button/text-align-button.mjs +0 -9
- package/dist/ui/text-align-button/use-text-align.d.mts +0 -106
- package/dist/ui/text-align-button/use-text-align.d.ts +0 -106
- package/dist/ui/text-align-button/use-text-align.js +0 -169
- package/dist/ui/text-align-button/use-text-align.mjs +0 -24
- package/dist/ui/undo-redo-button/index.d.mts +0 -6
- package/dist/ui/undo-redo-button/index.d.ts +0 -6
- package/dist/ui/undo-redo-button/index.js +0 -202
- package/dist/ui/undo-redo-button/index.mjs +0 -25
- package/dist/ui/undo-redo-button/undo-redo-button.d.mts +0 -23
- package/dist/ui/undo-redo-button/undo-redo-button.d.ts +0 -23
- package/dist/ui/undo-redo-button/undo-redo-button.js +0 -187
- package/dist/ui/undo-redo-button/undo-redo-button.mjs +0 -10
- package/dist/ui/undo-redo-button/use-undo-redo.d.mts +0 -95
- package/dist/ui/undo-redo-button/use-undo-redo.d.ts +0 -95
- package/dist/ui/undo-redo-button/use-undo-redo.js +0 -146
- package/dist/ui/undo-redo-button/use-undo-redo.mjs +0 -21
- package/dist/utils/index.d.mts +0 -38
- package/dist/utils/index.d.ts +0 -38
- package/dist/utils/index.js +0 -128
- package/dist/utils/index.mjs +0 -15
- package/dist/utils/safe-parse.d.mts +0 -14
- package/dist/utils/safe-parse.d.ts +0 -14
- package/dist/utils/safe-parse.js +0 -203
- package/dist/utils/safe-parse.mjs +0 -8
package/dist/chunk-V6TAZMQN.mjs
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
HeadingButton,
|
|
4
|
-
headingIcons
|
|
5
|
-
} from "./chunk-EHY2NAW7.mjs";
|
|
6
|
-
import {
|
|
7
|
-
getFormattedHeadingName
|
|
8
|
-
} from "./chunk-33QD5PYJ.mjs";
|
|
9
|
-
import {
|
|
10
|
-
useTiptapEditor
|
|
11
|
-
} from "./chunk-P55PLOHR.mjs";
|
|
12
|
-
|
|
13
|
-
// src/ui/heading-dropdown-menu/index.tsx
|
|
14
|
-
import { Button } from "@kopexa/button";
|
|
15
|
-
import { DropdownMenu } from "@kopexa/dropdown-menu";
|
|
16
|
-
import { isNodeInSchema } from "@kopexa/editor-utils";
|
|
17
|
-
import { ChevronDownIcon, HeadingIcon } from "@kopexa/icons";
|
|
18
|
-
import { isNodeSelection } from "@tiptap/react";
|
|
19
|
-
import * as React from "react";
|
|
20
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
-
function HeadingDropdownMenu({
|
|
22
|
-
editor: providedEditor,
|
|
23
|
-
levels = [1, 2, 3, 4, 5, 6],
|
|
24
|
-
hideWhenUnavailable = false,
|
|
25
|
-
onOpenChange,
|
|
26
|
-
...props
|
|
27
|
-
}) {
|
|
28
|
-
var _a;
|
|
29
|
-
const [isOpen, setIsOpen] = React.useState(false);
|
|
30
|
-
const { editor } = useTiptapEditor(providedEditor);
|
|
31
|
-
const headingInSchema = isNodeInSchema("heading", editor);
|
|
32
|
-
const handleOnOpenChange = React.useCallback(
|
|
33
|
-
(open) => {
|
|
34
|
-
setIsOpen(open);
|
|
35
|
-
onOpenChange == null ? void 0 : onOpenChange(open);
|
|
36
|
-
},
|
|
37
|
-
[onOpenChange]
|
|
38
|
-
);
|
|
39
|
-
const getActiveIcon = React.useCallback(() => {
|
|
40
|
-
if (!editor) return /* @__PURE__ */ jsx(HeadingIcon, {});
|
|
41
|
-
const activeLevel = levels.find(
|
|
42
|
-
(level) => editor.isActive("heading", { level })
|
|
43
|
-
);
|
|
44
|
-
if (!activeLevel) return /* @__PURE__ */ jsx(HeadingIcon, {});
|
|
45
|
-
const ActiveIcon = headingIcons[activeLevel];
|
|
46
|
-
return /* @__PURE__ */ jsx(ActiveIcon, {});
|
|
47
|
-
}, [editor, levels]);
|
|
48
|
-
const canToggleAnyHeading = React.useCallback(() => {
|
|
49
|
-
if (!editor) return false;
|
|
50
|
-
return levels.some(
|
|
51
|
-
(level) => editor.can().toggleNode("heading", "paragraph", { level })
|
|
52
|
-
);
|
|
53
|
-
}, [editor, levels]);
|
|
54
|
-
const isDisabled = !canToggleAnyHeading();
|
|
55
|
-
const isAnyHeadingActive = (_a = editor == null ? void 0 : editor.isActive("heading")) != null ? _a : false;
|
|
56
|
-
const show = React.useMemo(() => {
|
|
57
|
-
if (!headingInSchema || !editor) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
if (hideWhenUnavailable) {
|
|
61
|
-
if (isNodeSelection(editor.state.selection) || !canToggleAnyHeading()) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return true;
|
|
66
|
-
}, [headingInSchema, editor, hideWhenUnavailable, canToggleAnyHeading]);
|
|
67
|
-
if (!show || !editor || !editor.isEditable) {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
return /* @__PURE__ */ jsxs(DropdownMenu.Root, { open: isOpen, onOpenChange: handleOnOpenChange, children: [
|
|
71
|
-
/* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
72
|
-
Button,
|
|
73
|
-
{
|
|
74
|
-
type: "button",
|
|
75
|
-
disabled: isDisabled,
|
|
76
|
-
variant: "ghost",
|
|
77
|
-
color: "default",
|
|
78
|
-
"data-active-state": isAnyHeadingActive ? "on" : "off",
|
|
79
|
-
"data-disabled": isDisabled,
|
|
80
|
-
tabIndex: -1,
|
|
81
|
-
"aria-label": "Format text as heading",
|
|
82
|
-
"aria-pressed": isAnyHeadingActive,
|
|
83
|
-
tooltip: "Heading",
|
|
84
|
-
endContent: /* @__PURE__ */ jsx(ChevronDownIcon, {}),
|
|
85
|
-
...props,
|
|
86
|
-
children: getActiveIcon()
|
|
87
|
-
}
|
|
88
|
-
) }),
|
|
89
|
-
/* @__PURE__ */ jsx(DropdownMenu.Content, { children: /* @__PURE__ */ jsx(DropdownMenu.Group, { children: levels.map((level) => /* @__PURE__ */ jsx(DropdownMenu.Item, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
90
|
-
HeadingButton,
|
|
91
|
-
{
|
|
92
|
-
editor,
|
|
93
|
-
level,
|
|
94
|
-
text: getFormattedHeadingName(level),
|
|
95
|
-
tooltip: "",
|
|
96
|
-
fullWidth: true,
|
|
97
|
-
spacing: "start"
|
|
98
|
-
}
|
|
99
|
-
) }, `heading-${level}`)) }) })
|
|
100
|
-
] });
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export {
|
|
104
|
-
HeadingDropdownMenu
|
|
105
|
-
};
|
package/dist/chunk-VF3G2URZ.mjs
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
CalloutSettings
|
|
4
|
-
} from "./chunk-N4CT5RNC.mjs";
|
|
5
|
-
|
|
6
|
-
// src/extensions/callout/callout-view.tsx
|
|
7
|
-
import {
|
|
8
|
-
AlertCircleIcon,
|
|
9
|
-
AlertIcon,
|
|
10
|
-
CheckCirleIcon,
|
|
11
|
-
InfoIcon,
|
|
12
|
-
ShellIcon
|
|
13
|
-
} from "@kopexa/icons";
|
|
14
|
-
import { callout } from "@kopexa/theme";
|
|
15
|
-
import {
|
|
16
|
-
NodeViewContent,
|
|
17
|
-
NodeViewWrapper,
|
|
18
|
-
useEditorState
|
|
19
|
-
} from "@tiptap/react";
|
|
20
|
-
import { useMemo } from "react";
|
|
21
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
-
function getVariantIcon(variant, iconClass) {
|
|
23
|
-
switch (variant) {
|
|
24
|
-
case "info":
|
|
25
|
-
return /* @__PURE__ */ jsx(InfoIcon, { className: iconClass });
|
|
26
|
-
case "success":
|
|
27
|
-
return /* @__PURE__ */ jsx(CheckCirleIcon, { className: iconClass });
|
|
28
|
-
case "warning":
|
|
29
|
-
return /* @__PURE__ */ jsx(AlertIcon, { className: iconClass });
|
|
30
|
-
case "destructive":
|
|
31
|
-
return /* @__PURE__ */ jsx(AlertCircleIcon, { className: iconClass });
|
|
32
|
-
default:
|
|
33
|
-
return /* @__PURE__ */ jsx(ShellIcon, { className: iconClass });
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function CalloutNodeView({ editor, node, getPos }) {
|
|
37
|
-
const attrs = node.attrs;
|
|
38
|
-
const { variant = "info", title } = attrs;
|
|
39
|
-
const isEditable = useEditorState({
|
|
40
|
-
editor,
|
|
41
|
-
selector: ({ editor: e }) => {
|
|
42
|
-
var _a;
|
|
43
|
-
return (_a = e == null ? void 0 : e.isEditable) != null ? _a : false;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
const styles = useMemo(
|
|
47
|
-
() => callout({
|
|
48
|
-
variant,
|
|
49
|
-
radius: "md",
|
|
50
|
-
size: "md"
|
|
51
|
-
}),
|
|
52
|
-
[variant]
|
|
53
|
-
);
|
|
54
|
-
return /* @__PURE__ */ jsxs(
|
|
55
|
-
NodeViewWrapper,
|
|
56
|
-
{
|
|
57
|
-
className: styles.root(),
|
|
58
|
-
"data-type": "callout",
|
|
59
|
-
"data-variant": variant,
|
|
60
|
-
children: [
|
|
61
|
-
/* @__PURE__ */ jsx("div", { className: styles.iconContainer(), children: getVariantIcon(variant, styles.icon()) }),
|
|
62
|
-
/* @__PURE__ */ jsxs("div", { className: styles.content(), children: [
|
|
63
|
-
title && /* @__PURE__ */ jsx("div", { className: styles.title(), children: title }),
|
|
64
|
-
/* @__PURE__ */ jsx(NodeViewContent, { className: "callout-content" })
|
|
65
|
-
] }),
|
|
66
|
-
isEditable && /* @__PURE__ */ jsx("div", { className: "absolute top-2 right-2", children: /* @__PURE__ */ jsx(
|
|
67
|
-
CalloutSettings,
|
|
68
|
-
{
|
|
69
|
-
editor,
|
|
70
|
-
attrs,
|
|
71
|
-
getPos
|
|
72
|
-
}
|
|
73
|
-
) })
|
|
74
|
-
]
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
var callout_view_default = CalloutNodeView;
|
|
79
|
-
|
|
80
|
-
export {
|
|
81
|
-
CalloutNodeView,
|
|
82
|
-
callout_view_default
|
|
83
|
-
};
|
package/dist/chunk-VRQ6OSAZ.mjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
// src/context/editor-file-context.tsx
|
|
4
|
-
import {
|
|
5
|
-
createContext,
|
|
6
|
-
useCallback,
|
|
7
|
-
useContext,
|
|
8
|
-
useMemo,
|
|
9
|
-
useRef
|
|
10
|
-
} from "react";
|
|
11
|
-
import { jsx } from "react/jsx-runtime";
|
|
12
|
-
var EditorFileContext = createContext(null);
|
|
13
|
-
var DEFAULT_CACHE_BUFFER = 2 * 60 * 1e3;
|
|
14
|
-
var DEFAULT_CACHE_TTL = 10 * 60 * 1e3;
|
|
15
|
-
var defaultIsReference = (src) => {
|
|
16
|
-
if (!src) return false;
|
|
17
|
-
if (src.startsWith("http://") || src.startsWith("https://")) return false;
|
|
18
|
-
if (src.startsWith("data:")) return false;
|
|
19
|
-
if (src.startsWith("blob:")) return false;
|
|
20
|
-
return true;
|
|
21
|
-
};
|
|
22
|
-
function EditorFileProvider({
|
|
23
|
-
children,
|
|
24
|
-
onUpload,
|
|
25
|
-
onResolve,
|
|
26
|
-
isReference = defaultIsReference,
|
|
27
|
-
cacheBuffer = DEFAULT_CACHE_BUFFER,
|
|
28
|
-
defaultCacheTtl = DEFAULT_CACHE_TTL
|
|
29
|
-
}) {
|
|
30
|
-
const cacheRef = useRef(/* @__PURE__ */ new Map());
|
|
31
|
-
const resolve = useCallback(
|
|
32
|
-
async (ref) => {
|
|
33
|
-
const cache = cacheRef.current;
|
|
34
|
-
const now = Date.now();
|
|
35
|
-
const cached = cache.get(ref);
|
|
36
|
-
if (cached && cached.expiresAt > now + cacheBuffer) {
|
|
37
|
-
return cached.url;
|
|
38
|
-
}
|
|
39
|
-
const url = await onResolve(ref);
|
|
40
|
-
cache.set(ref, {
|
|
41
|
-
url,
|
|
42
|
-
expiresAt: now + defaultCacheTtl
|
|
43
|
-
});
|
|
44
|
-
return url;
|
|
45
|
-
},
|
|
46
|
-
[onResolve, cacheBuffer, defaultCacheTtl]
|
|
47
|
-
);
|
|
48
|
-
const value = useMemo(
|
|
49
|
-
() => ({
|
|
50
|
-
isAvailable: true,
|
|
51
|
-
upload: onUpload,
|
|
52
|
-
resolve,
|
|
53
|
-
isReference
|
|
54
|
-
}),
|
|
55
|
-
[onUpload, resolve, isReference]
|
|
56
|
-
);
|
|
57
|
-
return /* @__PURE__ */ jsx(EditorFileContext.Provider, { value, children });
|
|
58
|
-
}
|
|
59
|
-
function useEditorFile() {
|
|
60
|
-
return useContext(EditorFileContext);
|
|
61
|
-
}
|
|
62
|
-
function useEditorFileRequired() {
|
|
63
|
-
const context = useContext(EditorFileContext);
|
|
64
|
-
if (!context) {
|
|
65
|
-
throw new Error(
|
|
66
|
-
"useEditorFileRequired must be used within an EditorFileProvider"
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
return context;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export {
|
|
73
|
-
EditorFileProvider,
|
|
74
|
-
useEditorFile,
|
|
75
|
-
useEditorFileRequired
|
|
76
|
-
};
|
package/dist/chunk-VTKJPVNM.mjs
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
useTiptapEditor
|
|
4
|
-
} from "./chunk-P55PLOHR.mjs";
|
|
5
|
-
import {
|
|
6
|
-
sanitizeUrl
|
|
7
|
-
} from "./chunk-TZQQ6C2Q.mjs";
|
|
8
|
-
|
|
9
|
-
// src/ui/link-popover/use-link-popover.ts
|
|
10
|
-
import { isMarkInSchema } from "@kopexa/editor-utils";
|
|
11
|
-
import { LinkIcon } from "@kopexa/icons";
|
|
12
|
-
import * as React from "react";
|
|
13
|
-
function canSetLink(editor) {
|
|
14
|
-
if (!editor || !editor.isEditable) return false;
|
|
15
|
-
return editor.can().setMark("link");
|
|
16
|
-
}
|
|
17
|
-
function isLinkActive(editor) {
|
|
18
|
-
if (!editor || !editor.isEditable) return false;
|
|
19
|
-
return editor.isActive("link");
|
|
20
|
-
}
|
|
21
|
-
function shouldShowLinkButton(props) {
|
|
22
|
-
const { editor, hideWhenUnavailable } = props;
|
|
23
|
-
const linkInSchema = isMarkInSchema("link", editor);
|
|
24
|
-
if (!linkInSchema || !editor) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
if (hideWhenUnavailable && !editor.isActive("code")) {
|
|
28
|
-
return canSetLink(editor);
|
|
29
|
-
}
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
function useLinkHandler(props) {
|
|
33
|
-
const { editor, onSetLink } = props;
|
|
34
|
-
const [url, setUrl] = React.useState(null);
|
|
35
|
-
React.useEffect(() => {
|
|
36
|
-
if (!editor) return;
|
|
37
|
-
const { href } = editor.getAttributes("link");
|
|
38
|
-
if (isLinkActive(editor) && url === null) {
|
|
39
|
-
setUrl(href || "");
|
|
40
|
-
}
|
|
41
|
-
}, [editor, url]);
|
|
42
|
-
React.useEffect(() => {
|
|
43
|
-
if (!editor) return;
|
|
44
|
-
const updateLinkState = () => {
|
|
45
|
-
const { href } = editor.getAttributes("link");
|
|
46
|
-
setUrl(href || "");
|
|
47
|
-
};
|
|
48
|
-
editor.on("selectionUpdate", updateLinkState);
|
|
49
|
-
return () => {
|
|
50
|
-
editor.off("selectionUpdate", updateLinkState);
|
|
51
|
-
};
|
|
52
|
-
}, [editor]);
|
|
53
|
-
const setLink = React.useCallback(() => {
|
|
54
|
-
if (!url || !editor) return;
|
|
55
|
-
const { selection } = editor.state;
|
|
56
|
-
const isEmpty = selection.empty;
|
|
57
|
-
let chain = editor.chain().focus();
|
|
58
|
-
chain = chain.extendMarkRange("link").setLink({ href: url });
|
|
59
|
-
if (isEmpty) {
|
|
60
|
-
chain = chain.insertContent({ type: "text", text: url });
|
|
61
|
-
}
|
|
62
|
-
chain.run();
|
|
63
|
-
setUrl(null);
|
|
64
|
-
onSetLink == null ? void 0 : onSetLink();
|
|
65
|
-
}, [editor, onSetLink, url]);
|
|
66
|
-
const removeLink = React.useCallback(() => {
|
|
67
|
-
if (!editor) return;
|
|
68
|
-
editor.chain().focus().extendMarkRange("link").unsetLink().setMeta("preventAutolink", true).run();
|
|
69
|
-
setUrl("");
|
|
70
|
-
}, [editor]);
|
|
71
|
-
const openLink = React.useCallback(
|
|
72
|
-
(target = "_blank", features = "noopener,noreferrer") => {
|
|
73
|
-
if (!url) return;
|
|
74
|
-
const safeUrl = sanitizeUrl(url, window.location.href);
|
|
75
|
-
if (safeUrl !== "#") {
|
|
76
|
-
window.open(safeUrl, target, features);
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
[url]
|
|
80
|
-
);
|
|
81
|
-
return {
|
|
82
|
-
url: url || "",
|
|
83
|
-
setUrl,
|
|
84
|
-
setLink,
|
|
85
|
-
removeLink,
|
|
86
|
-
openLink
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function useLinkState(props) {
|
|
90
|
-
const { editor, hideWhenUnavailable = false } = props;
|
|
91
|
-
const canSet = canSetLink(editor);
|
|
92
|
-
const isActive = isLinkActive(editor);
|
|
93
|
-
const [isVisible, setIsVisible] = React.useState(false);
|
|
94
|
-
React.useEffect(() => {
|
|
95
|
-
if (!editor) return;
|
|
96
|
-
const handleSelectionUpdate = () => {
|
|
97
|
-
setIsVisible(
|
|
98
|
-
shouldShowLinkButton({
|
|
99
|
-
editor,
|
|
100
|
-
hideWhenUnavailable
|
|
101
|
-
})
|
|
102
|
-
);
|
|
103
|
-
};
|
|
104
|
-
handleSelectionUpdate();
|
|
105
|
-
editor.on("selectionUpdate", handleSelectionUpdate);
|
|
106
|
-
return () => {
|
|
107
|
-
editor.off("selectionUpdate", handleSelectionUpdate);
|
|
108
|
-
};
|
|
109
|
-
}, [editor, hideWhenUnavailable]);
|
|
110
|
-
return {
|
|
111
|
-
isVisible,
|
|
112
|
-
canSet,
|
|
113
|
-
isActive
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function useLinkPopover(config) {
|
|
117
|
-
const {
|
|
118
|
-
editor: providedEditor,
|
|
119
|
-
hideWhenUnavailable = false,
|
|
120
|
-
onSetLink
|
|
121
|
-
} = config || {};
|
|
122
|
-
const { editor } = useTiptapEditor(providedEditor);
|
|
123
|
-
const { isVisible, canSet, isActive } = useLinkState({
|
|
124
|
-
editor,
|
|
125
|
-
hideWhenUnavailable
|
|
126
|
-
});
|
|
127
|
-
const linkHandler = useLinkHandler({
|
|
128
|
-
editor,
|
|
129
|
-
onSetLink
|
|
130
|
-
});
|
|
131
|
-
return {
|
|
132
|
-
isVisible,
|
|
133
|
-
canSet,
|
|
134
|
-
isActive,
|
|
135
|
-
label: "Link",
|
|
136
|
-
Icon: LinkIcon,
|
|
137
|
-
...linkHandler
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export {
|
|
142
|
-
canSetLink,
|
|
143
|
-
isLinkActive,
|
|
144
|
-
shouldShowLinkButton,
|
|
145
|
-
useLinkHandler,
|
|
146
|
-
useLinkState,
|
|
147
|
-
useLinkPopover
|
|
148
|
-
};
|
package/dist/chunk-VX3HSJ76.mjs
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
useTableBlock
|
|
4
|
-
} from "./chunk-YJAHZXLG.mjs";
|
|
5
|
-
import {
|
|
6
|
-
useTiptapEditor
|
|
7
|
-
} from "./chunk-P55PLOHR.mjs";
|
|
8
|
-
|
|
9
|
-
// src/ui/table-button/index.tsx
|
|
10
|
-
import { ToolbarButton } from "@kopexa/toolbar";
|
|
11
|
-
import { useCallback } from "react";
|
|
12
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
var TableButton = ({
|
|
14
|
-
editor: providedEditor,
|
|
15
|
-
text,
|
|
16
|
-
hideWhenUnavailable = false,
|
|
17
|
-
onToggled,
|
|
18
|
-
onClick,
|
|
19
|
-
children,
|
|
20
|
-
...buttonProps
|
|
21
|
-
}) => {
|
|
22
|
-
const { editor } = useTiptapEditor(providedEditor);
|
|
23
|
-
const {
|
|
24
|
-
isVisible,
|
|
25
|
-
canToggle,
|
|
26
|
-
isActive,
|
|
27
|
-
handleToggle,
|
|
28
|
-
label,
|
|
29
|
-
// shortcutKeys,
|
|
30
|
-
Icon
|
|
31
|
-
} = useTableBlock({
|
|
32
|
-
editor,
|
|
33
|
-
hideWhenUnavailable,
|
|
34
|
-
onToggled
|
|
35
|
-
});
|
|
36
|
-
const handleClick = useCallback(
|
|
37
|
-
(event) => {
|
|
38
|
-
onClick == null ? void 0 : onClick(event);
|
|
39
|
-
if (event.defaultPrevented) return;
|
|
40
|
-
handleToggle();
|
|
41
|
-
},
|
|
42
|
-
[handleToggle, onClick]
|
|
43
|
-
);
|
|
44
|
-
if (!isVisible) {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
return /* @__PURE__ */ jsx(
|
|
48
|
-
ToolbarButton,
|
|
49
|
-
{
|
|
50
|
-
type: "button",
|
|
51
|
-
variant: "ghost",
|
|
52
|
-
color: "default",
|
|
53
|
-
"data-active-state": isActive ? "on" : "off",
|
|
54
|
-
disabled: !canToggle,
|
|
55
|
-
"data-disabled": !canToggle,
|
|
56
|
-
tabIndex: -1,
|
|
57
|
-
"aria-label": label,
|
|
58
|
-
"aria-pressed": isActive,
|
|
59
|
-
title: label,
|
|
60
|
-
onClick: handleClick,
|
|
61
|
-
isIconOnly: !text && !children,
|
|
62
|
-
...buttonProps,
|
|
63
|
-
children: children || /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
64
|
-
/* @__PURE__ */ jsx(Icon, {}),
|
|
65
|
-
text && /* @__PURE__ */ jsx("span", { children: text })
|
|
66
|
-
] })
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export {
|
|
72
|
-
TableButton
|
|
73
|
-
};
|
package/dist/chunk-W2FLOOJ6.mjs
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
useBlockquote
|
|
4
|
-
} from "./chunk-ZZ4OU46C.mjs";
|
|
5
|
-
import {
|
|
6
|
-
useTiptapEditor
|
|
7
|
-
} from "./chunk-P55PLOHR.mjs";
|
|
8
|
-
|
|
9
|
-
// src/ui/blockquote-button/blockquote-button.tsx
|
|
10
|
-
import { ToolbarButton } from "@kopexa/toolbar";
|
|
11
|
-
import * as React from "react";
|
|
12
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
var BlockquoteButton = ({
|
|
14
|
-
editor: providedEditor,
|
|
15
|
-
text,
|
|
16
|
-
hideWhenUnavailable = false,
|
|
17
|
-
onToggled,
|
|
18
|
-
showShortcut = false,
|
|
19
|
-
onClick,
|
|
20
|
-
children,
|
|
21
|
-
...buttonProps
|
|
22
|
-
}) => {
|
|
23
|
-
const { editor } = useTiptapEditor(providedEditor);
|
|
24
|
-
const {
|
|
25
|
-
isVisible,
|
|
26
|
-
canToggle,
|
|
27
|
-
isActive,
|
|
28
|
-
handleToggle,
|
|
29
|
-
label,
|
|
30
|
-
shortcutKeys,
|
|
31
|
-
Icon
|
|
32
|
-
} = useBlockquote({
|
|
33
|
-
editor,
|
|
34
|
-
hideWhenUnavailable,
|
|
35
|
-
onToggled
|
|
36
|
-
});
|
|
37
|
-
const handleClick = React.useCallback(
|
|
38
|
-
(event) => {
|
|
39
|
-
onClick == null ? void 0 : onClick(event);
|
|
40
|
-
if (event.defaultPrevented) return;
|
|
41
|
-
handleToggle();
|
|
42
|
-
},
|
|
43
|
-
[handleToggle, onClick]
|
|
44
|
-
);
|
|
45
|
-
if (!isVisible) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
return /* @__PURE__ */ jsx(
|
|
49
|
-
ToolbarButton,
|
|
50
|
-
{
|
|
51
|
-
type: "button",
|
|
52
|
-
variant: "ghost",
|
|
53
|
-
color: "default",
|
|
54
|
-
disabled: !canToggle,
|
|
55
|
-
"data-disabled": !canToggle,
|
|
56
|
-
"data-active-state": isActive ? "on" : "off",
|
|
57
|
-
tabIndex: -1,
|
|
58
|
-
"aria-label": "blockquote",
|
|
59
|
-
"aria-pressed": isActive,
|
|
60
|
-
title: label,
|
|
61
|
-
shortcutKeys,
|
|
62
|
-
onClick: handleClick,
|
|
63
|
-
isIconOnly: !text && !children,
|
|
64
|
-
...buttonProps,
|
|
65
|
-
children: children != null ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
66
|
-
/* @__PURE__ */ jsx(Icon, {}),
|
|
67
|
-
text && /* @__PURE__ */ jsx("span", { children: text })
|
|
68
|
-
] })
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export {
|
|
74
|
-
BlockquoteButton
|
|
75
|
-
};
|