@kopexa/tiptap 17.6.17 → 17.7.0
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 +1081 -668
- package/dist/index.mjs +7686 -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
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getExtensions,
|
|
4
|
-
useCreateEditor
|
|
5
|
-
} from "../chunk-DQK6PA4U.mjs";
|
|
6
|
-
import "../chunk-H6LC4LDQ.mjs";
|
|
7
|
-
import "../chunk-4HO7BWDC.mjs";
|
|
8
|
-
import "../chunk-JVSH5T4B.mjs";
|
|
9
|
-
import "../chunk-5SMDMQDF.mjs";
|
|
10
|
-
import "../chunk-2U5CQUZH.mjs";
|
|
11
|
-
import "../chunk-7VW67NVL.mjs";
|
|
12
|
-
import "../chunk-BXHPO3T7.mjs";
|
|
13
|
-
import "../chunk-UVHVCION.mjs";
|
|
14
|
-
import "../chunk-FRJX2F4T.mjs";
|
|
15
|
-
import "../chunk-U5XAL46P.mjs";
|
|
16
|
-
import "../chunk-IFXRPGIJ.mjs";
|
|
17
|
-
import "../chunk-2V6VOAPI.mjs";
|
|
18
|
-
import "../chunk-4CDZ547I.mjs";
|
|
19
|
-
import "../chunk-TAM3VMJT.mjs";
|
|
20
|
-
import "../chunk-HTJ2RXOG.mjs";
|
|
21
|
-
import "../chunk-KYLBKQ2E.mjs";
|
|
22
|
-
import "../chunk-Z365KVQY.mjs";
|
|
23
|
-
import "../chunk-N3JE67CS.mjs";
|
|
24
|
-
import "../chunk-EAAQE5ZV.mjs";
|
|
25
|
-
import "../chunk-DSBJFMHK.mjs";
|
|
26
|
-
import "../chunk-EIIWU5FR.mjs";
|
|
27
|
-
import "../chunk-KR42JAVB.mjs";
|
|
28
|
-
import "../chunk-3VRQUYYW.mjs";
|
|
29
|
-
import "../chunk-32SUXCAQ.mjs";
|
|
30
|
-
import "../chunk-VF3G2URZ.mjs";
|
|
31
|
-
import "../chunk-N4CT5RNC.mjs";
|
|
32
|
-
import "../chunk-JCV5SEKN.mjs";
|
|
33
|
-
import "../chunk-VRQ6OSAZ.mjs";
|
|
34
|
-
export {
|
|
35
|
-
getExtensions,
|
|
36
|
-
useCreateEditor
|
|
37
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Interface defining required parameters for the cursor visibility hook
|
|
6
|
-
*/
|
|
7
|
-
interface CursorVisibilityOptions {
|
|
8
|
-
/**
|
|
9
|
-
* The TipTap editor instance
|
|
10
|
-
*/
|
|
11
|
-
editor: Editor | null;
|
|
12
|
-
/**
|
|
13
|
-
* Reference to the toolbar element that may obscure the cursor
|
|
14
|
-
*/
|
|
15
|
-
overlayHeight?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Reference to the element to track for cursor visibility
|
|
18
|
-
*/
|
|
19
|
-
elementRef?: React.RefObject<HTMLElement> | null;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Simplified DOMRect type containing only the essential positioning properties
|
|
23
|
-
*/
|
|
24
|
-
type RectState = Pick<DOMRect, "x" | "y" | "width" | "height">;
|
|
25
|
-
/**
|
|
26
|
-
* Custom hook that ensures the cursor remains visible when typing in a TipTap editor.
|
|
27
|
-
* Automatically scrolls the window when the cursor would be hidden by the toolbar.
|
|
28
|
-
*
|
|
29
|
-
* This is particularly useful for long-form content editing where the cursor
|
|
30
|
-
* might move out of the visible area as the user types.
|
|
31
|
-
*
|
|
32
|
-
* @param options Configuration options for cursor visibility behavior
|
|
33
|
-
* @returns void
|
|
34
|
-
*/
|
|
35
|
-
declare function useCursorVisibility({ editor, overlayHeight, elementRef, }: CursorVisibilityOptions): RectState;
|
|
36
|
-
|
|
37
|
-
export { type CursorVisibilityOptions, type RectState, useCursorVisibility };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Interface defining required parameters for the cursor visibility hook
|
|
6
|
-
*/
|
|
7
|
-
interface CursorVisibilityOptions {
|
|
8
|
-
/**
|
|
9
|
-
* The TipTap editor instance
|
|
10
|
-
*/
|
|
11
|
-
editor: Editor | null;
|
|
12
|
-
/**
|
|
13
|
-
* Reference to the toolbar element that may obscure the cursor
|
|
14
|
-
*/
|
|
15
|
-
overlayHeight?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Reference to the element to track for cursor visibility
|
|
18
|
-
*/
|
|
19
|
-
elementRef?: React.RefObject<HTMLElement> | null;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Simplified DOMRect type containing only the essential positioning properties
|
|
23
|
-
*/
|
|
24
|
-
type RectState = Pick<DOMRect, "x" | "y" | "width" | "height">;
|
|
25
|
-
/**
|
|
26
|
-
* Custom hook that ensures the cursor remains visible when typing in a TipTap editor.
|
|
27
|
-
* Automatically scrolls the window when the cursor would be hidden by the toolbar.
|
|
28
|
-
*
|
|
29
|
-
* This is particularly useful for long-form content editing where the cursor
|
|
30
|
-
* might move out of the visible area as the user types.
|
|
31
|
-
*
|
|
32
|
-
* @param options Configuration options for cursor visibility behavior
|
|
33
|
-
* @returns void
|
|
34
|
-
*/
|
|
35
|
-
declare function useCursorVisibility({ editor, overlayHeight, elementRef, }: CursorVisibilityOptions): RectState;
|
|
36
|
-
|
|
37
|
-
export { type CursorVisibilityOptions, type RectState, useCursorVisibility };
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/hooks/use-cursor-visibility.ts
|
|
32
|
-
var use_cursor_visibility_exports = {};
|
|
33
|
-
__export(use_cursor_visibility_exports, {
|
|
34
|
-
useCursorVisibility: () => useCursorVisibility
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(use_cursor_visibility_exports);
|
|
37
|
-
var React2 = __toESM(require("react"));
|
|
38
|
-
|
|
39
|
-
// src/hooks/use-window-size.ts
|
|
40
|
-
var React = __toESM(require("react"));
|
|
41
|
-
function useWindowSize() {
|
|
42
|
-
const [windowSize, setWindowSize] = React.useState({
|
|
43
|
-
width: 0,
|
|
44
|
-
height: 0,
|
|
45
|
-
offsetTop: 0
|
|
46
|
-
});
|
|
47
|
-
React.useEffect(() => {
|
|
48
|
-
handleResize();
|
|
49
|
-
function handleResize() {
|
|
50
|
-
if (typeof window === "undefined") return;
|
|
51
|
-
const vp = window.visualViewport;
|
|
52
|
-
if (!vp) return;
|
|
53
|
-
const { width = 0, height = 0, offsetTop = 0 } = vp;
|
|
54
|
-
setWindowSize((state) => {
|
|
55
|
-
if (width === state.width && height === state.height && offsetTop === state.offsetTop) {
|
|
56
|
-
return state;
|
|
57
|
-
}
|
|
58
|
-
return { width, height, offsetTop };
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
const visualViewport = window.visualViewport;
|
|
62
|
-
if (visualViewport) {
|
|
63
|
-
visualViewport.addEventListener("resize", handleResize);
|
|
64
|
-
visualViewport.addEventListener("scroll", handleResize);
|
|
65
|
-
}
|
|
66
|
-
return () => {
|
|
67
|
-
if (visualViewport) {
|
|
68
|
-
visualViewport.removeEventListener("resize", handleResize);
|
|
69
|
-
visualViewport.removeEventListener("scroll", handleResize);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}, []);
|
|
73
|
-
return windowSize;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// src/hooks/use-cursor-visibility.ts
|
|
77
|
-
function useCursorVisibility({
|
|
78
|
-
editor,
|
|
79
|
-
overlayHeight = 0,
|
|
80
|
-
elementRef = null
|
|
81
|
-
}) {
|
|
82
|
-
const { height: windowHeight } = useWindowSize();
|
|
83
|
-
const [rect, setRect] = React2.useState({
|
|
84
|
-
x: 0,
|
|
85
|
-
y: 0,
|
|
86
|
-
width: 0,
|
|
87
|
-
height: 0
|
|
88
|
-
});
|
|
89
|
-
const updateRect = React2.useCallback(() => {
|
|
90
|
-
var _a;
|
|
91
|
-
const element = (_a = elementRef == null ? void 0 : elementRef.current) != null ? _a : document.body;
|
|
92
|
-
const { x, y, width, height } = element.getBoundingClientRect();
|
|
93
|
-
setRect({ x, y, width, height });
|
|
94
|
-
}, [elementRef]);
|
|
95
|
-
React2.useEffect(() => {
|
|
96
|
-
var _a;
|
|
97
|
-
const element = (_a = elementRef == null ? void 0 : elementRef.current) != null ? _a : document.body;
|
|
98
|
-
updateRect();
|
|
99
|
-
const resizeObserver = new ResizeObserver(() => {
|
|
100
|
-
window.requestAnimationFrame(updateRect);
|
|
101
|
-
});
|
|
102
|
-
resizeObserver.observe(element);
|
|
103
|
-
window.addEventListener("scroll", updateRect, { passive: true });
|
|
104
|
-
return () => {
|
|
105
|
-
resizeObserver.disconnect();
|
|
106
|
-
window.removeEventListener("scroll", updateRect);
|
|
107
|
-
};
|
|
108
|
-
}, [elementRef, updateRect]);
|
|
109
|
-
React2.useEffect(() => {
|
|
110
|
-
const ensureCursorVisibility = () => {
|
|
111
|
-
if (!editor) return;
|
|
112
|
-
const { state, view } = editor;
|
|
113
|
-
if (!view.hasFocus()) return;
|
|
114
|
-
const { from } = state.selection;
|
|
115
|
-
const cursorCoords = view.coordsAtPos(from);
|
|
116
|
-
if (windowHeight < rect.height) {
|
|
117
|
-
if (cursorCoords) {
|
|
118
|
-
const availableSpace = windowHeight - cursorCoords.top - overlayHeight > 0;
|
|
119
|
-
if (!availableSpace) {
|
|
120
|
-
const targetScrollY = (
|
|
121
|
-
// TODO: Needed?
|
|
122
|
-
// window.scrollY + (cursorCoords.top - windowHeight / 2)
|
|
123
|
-
cursorCoords.top - windowHeight / 2
|
|
124
|
-
);
|
|
125
|
-
window.scrollTo({
|
|
126
|
-
top: targetScrollY,
|
|
127
|
-
behavior: "smooth"
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
ensureCursorVisibility();
|
|
134
|
-
}, [editor, overlayHeight, windowHeight, rect.height]);
|
|
135
|
-
return rect;
|
|
136
|
-
}
|
|
137
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
138
|
-
0 && (module.exports = {
|
|
139
|
-
useCursorVisibility
|
|
140
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { UseFloatingOptions, UseDismissProps } from '@floating-ui/react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
interface FloatingElementReturn {
|
|
5
|
-
/**
|
|
6
|
-
* Whether the floating element is currently mounted in the DOM.
|
|
7
|
-
*/
|
|
8
|
-
isMounted: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Ref function to attach to the floating element DOM node.
|
|
11
|
-
*/
|
|
12
|
-
ref: (node: HTMLElement | null) => void;
|
|
13
|
-
/**
|
|
14
|
-
* Combined styles for positioning, transitions, and z-index.
|
|
15
|
-
*/
|
|
16
|
-
style: React.CSSProperties;
|
|
17
|
-
/**
|
|
18
|
-
* Function to manually trigger position updates of the floating element.
|
|
19
|
-
*/
|
|
20
|
-
update: () => void;
|
|
21
|
-
/**
|
|
22
|
-
* Returns props that should be spread onto the floating element.
|
|
23
|
-
*/
|
|
24
|
-
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
25
|
-
/**
|
|
26
|
-
* Returns props that should be spread onto the reference element.
|
|
27
|
-
*/
|
|
28
|
-
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Custom hook for creating and managing floating elements relative to a reference position
|
|
32
|
-
*
|
|
33
|
-
* @param show - Boolean controlling visibility of the floating element
|
|
34
|
-
* @param referencePos - DOMRect representing the position to anchor the floating element to
|
|
35
|
-
* @param zIndex - Z-index value for the floating element
|
|
36
|
-
* @param options - Additional options to pass to the underlying useFloating hook
|
|
37
|
-
* @returns Object containing properties and methods to control the floating element
|
|
38
|
-
*/
|
|
39
|
-
declare function useFloatingElement(show: boolean, referencePos: DOMRect | null, zIndex: number, options?: Partial<UseFloatingOptions & {
|
|
40
|
-
dismissOptions?: UseDismissProps;
|
|
41
|
-
}>): FloatingElementReturn;
|
|
42
|
-
|
|
43
|
-
export { useFloatingElement };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { UseFloatingOptions, UseDismissProps } from '@floating-ui/react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
interface FloatingElementReturn {
|
|
5
|
-
/**
|
|
6
|
-
* Whether the floating element is currently mounted in the DOM.
|
|
7
|
-
*/
|
|
8
|
-
isMounted: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Ref function to attach to the floating element DOM node.
|
|
11
|
-
*/
|
|
12
|
-
ref: (node: HTMLElement | null) => void;
|
|
13
|
-
/**
|
|
14
|
-
* Combined styles for positioning, transitions, and z-index.
|
|
15
|
-
*/
|
|
16
|
-
style: React.CSSProperties;
|
|
17
|
-
/**
|
|
18
|
-
* Function to manually trigger position updates of the floating element.
|
|
19
|
-
*/
|
|
20
|
-
update: () => void;
|
|
21
|
-
/**
|
|
22
|
-
* Returns props that should be spread onto the floating element.
|
|
23
|
-
*/
|
|
24
|
-
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
25
|
-
/**
|
|
26
|
-
* Returns props that should be spread onto the reference element.
|
|
27
|
-
*/
|
|
28
|
-
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Custom hook for creating and managing floating elements relative to a reference position
|
|
32
|
-
*
|
|
33
|
-
* @param show - Boolean controlling visibility of the floating element
|
|
34
|
-
* @param referencePos - DOMRect representing the position to anchor the floating element to
|
|
35
|
-
* @param zIndex - Z-index value for the floating element
|
|
36
|
-
* @param options - Additional options to pass to the underlying useFloating hook
|
|
37
|
-
* @returns Object containing properties and methods to control the floating element
|
|
38
|
-
*/
|
|
39
|
-
declare function useFloatingElement(show: boolean, referencePos: DOMRect | null, zIndex: number, options?: Partial<UseFloatingOptions & {
|
|
40
|
-
dismissOptions?: UseDismissProps;
|
|
41
|
-
}>): FloatingElementReturn;
|
|
42
|
-
|
|
43
|
-
export { useFloatingElement };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
"use client";
|
|
4
|
-
var __create = Object.create;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __export = (target, all) => {
|
|
11
|
-
for (var name in all)
|
|
12
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
-
};
|
|
14
|
-
var __copyProps = (to, from, except, desc) => {
|
|
15
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
-
mod
|
|
29
|
-
));
|
|
30
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
-
|
|
32
|
-
// src/hooks/use-floating-element.ts
|
|
33
|
-
var use_floating_element_exports = {};
|
|
34
|
-
__export(use_floating_element_exports, {
|
|
35
|
-
useFloatingElement: () => useFloatingElement
|
|
36
|
-
});
|
|
37
|
-
module.exports = __toCommonJS(use_floating_element_exports);
|
|
38
|
-
var import_react = require("@floating-ui/react");
|
|
39
|
-
var React = __toESM(require("react"));
|
|
40
|
-
function useFloatingElement(show, referencePos, zIndex, options) {
|
|
41
|
-
const { dismissOptions, ...floatingOptions } = options || {};
|
|
42
|
-
const { refs, update, context, floatingStyles } = (0, import_react.useFloating)({
|
|
43
|
-
open: show,
|
|
44
|
-
...floatingOptions
|
|
45
|
-
});
|
|
46
|
-
const { isMounted, styles } = (0, import_react.useTransitionStyles)(context);
|
|
47
|
-
const dismiss = (0, import_react.useDismiss)(context, dismissOptions);
|
|
48
|
-
const { getReferenceProps, getFloatingProps } = (0, import_react.useInteractions)([dismiss]);
|
|
49
|
-
React.useEffect(() => {
|
|
50
|
-
update();
|
|
51
|
-
}, [referencePos, update]);
|
|
52
|
-
React.useEffect(() => {
|
|
53
|
-
if (referencePos === null) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
refs.setReference({
|
|
57
|
-
getBoundingClientRect: () => referencePos
|
|
58
|
-
});
|
|
59
|
-
}, [referencePos, refs]);
|
|
60
|
-
return React.useMemo(
|
|
61
|
-
() => ({
|
|
62
|
-
isMounted,
|
|
63
|
-
ref: refs.setFloating,
|
|
64
|
-
style: {
|
|
65
|
-
...styles,
|
|
66
|
-
...floatingStyles,
|
|
67
|
-
zIndex
|
|
68
|
-
},
|
|
69
|
-
update,
|
|
70
|
-
getFloatingProps,
|
|
71
|
-
getReferenceProps
|
|
72
|
-
}),
|
|
73
|
-
[
|
|
74
|
-
floatingStyles,
|
|
75
|
-
isMounted,
|
|
76
|
-
refs.setFloating,
|
|
77
|
-
styles,
|
|
78
|
-
update,
|
|
79
|
-
zIndex,
|
|
80
|
-
getFloatingProps,
|
|
81
|
-
getReferenceProps
|
|
82
|
-
]
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
86
|
-
0 && (module.exports = {
|
|
87
|
-
useFloatingElement
|
|
88
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
|
2
|
-
|
|
3
|
-
declare const HIDE_FLOATING_META = "hideFloatingToolbar";
|
|
4
|
-
/**
|
|
5
|
-
* Centralizes all logic about when the floating toolbar should be hidden/shown.
|
|
6
|
-
*
|
|
7
|
-
* - Listens for transactions that carry HIDE_FLOATING_META
|
|
8
|
-
* - Clears the hide flag on common “user intent” events
|
|
9
|
-
* - Handles the “re-click on the same selected node” case
|
|
10
|
-
* - Exposes `shouldShow` so UI can just render based on it
|
|
11
|
-
* - Exposes helpers to set selections with the meta flag
|
|
12
|
-
*/
|
|
13
|
-
declare function useFloatingToolbarVisibility(params: {
|
|
14
|
-
editor: Editor | null;
|
|
15
|
-
isSelectionValid: (editor: Editor, selection: Editor["state"]["selection"]) => boolean;
|
|
16
|
-
extraHideWhen?: boolean;
|
|
17
|
-
}): {
|
|
18
|
-
shouldShow: boolean;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Programmatically select a node and hide floating for that selection
|
|
22
|
-
* @param editor
|
|
23
|
-
* @param pos
|
|
24
|
-
*/
|
|
25
|
-
declare const selectNodeAndHideFloating: (editor: Editor, pos: number) => void;
|
|
26
|
-
/**
|
|
27
|
-
* Mark “hide floating” on the next relevant transaction (no selection change needed)
|
|
28
|
-
* @param editor
|
|
29
|
-
*/
|
|
30
|
-
declare const markHideFloatingOnNext: (editor: Editor) => void;
|
|
31
|
-
|
|
32
|
-
export { HIDE_FLOATING_META, markHideFloatingOnNext, selectNodeAndHideFloating, useFloatingToolbarVisibility };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
|
2
|
-
|
|
3
|
-
declare const HIDE_FLOATING_META = "hideFloatingToolbar";
|
|
4
|
-
/**
|
|
5
|
-
* Centralizes all logic about when the floating toolbar should be hidden/shown.
|
|
6
|
-
*
|
|
7
|
-
* - Listens for transactions that carry HIDE_FLOATING_META
|
|
8
|
-
* - Clears the hide flag on common “user intent” events
|
|
9
|
-
* - Handles the “re-click on the same selected node” case
|
|
10
|
-
* - Exposes `shouldShow` so UI can just render based on it
|
|
11
|
-
* - Exposes helpers to set selections with the meta flag
|
|
12
|
-
*/
|
|
13
|
-
declare function useFloatingToolbarVisibility(params: {
|
|
14
|
-
editor: Editor | null;
|
|
15
|
-
isSelectionValid: (editor: Editor, selection: Editor["state"]["selection"]) => boolean;
|
|
16
|
-
extraHideWhen?: boolean;
|
|
17
|
-
}): {
|
|
18
|
-
shouldShow: boolean;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Programmatically select a node and hide floating for that selection
|
|
22
|
-
* @param editor
|
|
23
|
-
* @param pos
|
|
24
|
-
*/
|
|
25
|
-
declare const selectNodeAndHideFloating: (editor: Editor, pos: number) => void;
|
|
26
|
-
/**
|
|
27
|
-
* Mark “hide floating” on the next relevant transaction (no selection change needed)
|
|
28
|
-
* @param editor
|
|
29
|
-
*/
|
|
30
|
-
declare const markHideFloatingOnNext: (editor: Editor) => void;
|
|
31
|
-
|
|
32
|
-
export { HIDE_FLOATING_META, markHideFloatingOnNext, selectNodeAndHideFloating, useFloatingToolbarVisibility };
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/hooks/use-floating-toolbar-visibility.ts
|
|
32
|
-
var use_floating_toolbar_visibility_exports = {};
|
|
33
|
-
__export(use_floating_toolbar_visibility_exports, {
|
|
34
|
-
HIDE_FLOATING_META: () => HIDE_FLOATING_META,
|
|
35
|
-
markHideFloatingOnNext: () => markHideFloatingOnNext,
|
|
36
|
-
selectNodeAndHideFloating: () => selectNodeAndHideFloating,
|
|
37
|
-
useFloatingToolbarVisibility: () => useFloatingToolbarVisibility
|
|
38
|
-
});
|
|
39
|
-
module.exports = __toCommonJS(use_floating_toolbar_visibility_exports);
|
|
40
|
-
var import_state = require("@tiptap/pm/state");
|
|
41
|
-
var import_react = require("@tiptap/react");
|
|
42
|
-
var React = __toESM(require("react"));
|
|
43
|
-
var HIDE_FLOATING_META = "hideFloatingToolbar";
|
|
44
|
-
function useFloatingToolbarVisibility(params) {
|
|
45
|
-
const { editor, isSelectionValid, extraHideWhen = false } = params;
|
|
46
|
-
const [shouldShow, setShouldShow] = React.useState(false);
|
|
47
|
-
const hideRef = React.useRef(false);
|
|
48
|
-
React.useEffect(() => {
|
|
49
|
-
if (!editor) return;
|
|
50
|
-
const onTx = ({ transaction }) => {
|
|
51
|
-
if (transaction.getMeta(HIDE_FLOATING_META)) {
|
|
52
|
-
hideRef.current = true;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
editor.on("transaction", onTx);
|
|
56
|
-
return () => {
|
|
57
|
-
editor.off("transaction", onTx);
|
|
58
|
-
};
|
|
59
|
-
}, [editor]);
|
|
60
|
-
React.useEffect(() => {
|
|
61
|
-
if (!editor) return;
|
|
62
|
-
const dom = editor.view.dom;
|
|
63
|
-
const onPointerDown = (e) => {
|
|
64
|
-
const sel = editor.state.selection;
|
|
65
|
-
if (!(sel instanceof import_state.NodeSelection)) return;
|
|
66
|
-
const nodeDom = editor.view.nodeDOM(sel.from);
|
|
67
|
-
if (!nodeDom) return;
|
|
68
|
-
if (nodeDom.contains(e.target)) {
|
|
69
|
-
hideRef.current = false;
|
|
70
|
-
const valid = isSelectionValid(editor, sel);
|
|
71
|
-
setShouldShow(valid && !extraHideWhen);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
dom.addEventListener("pointerdown", onPointerDown, { capture: true });
|
|
75
|
-
return () => dom.removeEventListener("pointerdown", onPointerDown, {
|
|
76
|
-
capture: true
|
|
77
|
-
});
|
|
78
|
-
}, [editor, extraHideWhen, isSelectionValid]);
|
|
79
|
-
React.useEffect(() => {
|
|
80
|
-
if (!editor) return;
|
|
81
|
-
const handleSelectionUpdate = () => {
|
|
82
|
-
const { selection } = editor.state;
|
|
83
|
-
const valid = isSelectionValid(editor, selection);
|
|
84
|
-
if (extraHideWhen || (0, import_react.isNodeSelection)(selection) && hideRef.current) {
|
|
85
|
-
setShouldShow(false);
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
setShouldShow(valid);
|
|
89
|
-
};
|
|
90
|
-
handleSelectionUpdate();
|
|
91
|
-
editor.on("selectionUpdate", handleSelectionUpdate);
|
|
92
|
-
return () => {
|
|
93
|
-
editor.off("selectionUpdate", handleSelectionUpdate);
|
|
94
|
-
};
|
|
95
|
-
}, [editor, extraHideWhen, isSelectionValid]);
|
|
96
|
-
return { shouldShow };
|
|
97
|
-
}
|
|
98
|
-
var selectNodeAndHideFloating = (editor, pos) => {
|
|
99
|
-
if (!editor) return;
|
|
100
|
-
const { state, view } = editor;
|
|
101
|
-
view.dispatch(
|
|
102
|
-
state.tr.setSelection(import_state.NodeSelection.create(state.doc, pos)).setMeta(HIDE_FLOATING_META, true)
|
|
103
|
-
);
|
|
104
|
-
};
|
|
105
|
-
var markHideFloatingOnNext = (editor) => {
|
|
106
|
-
if (!editor) return;
|
|
107
|
-
editor.view.dispatch(editor.state.tr.setMeta(HIDE_FLOATING_META, true));
|
|
108
|
-
};
|
|
109
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
110
|
-
0 && (module.exports = {
|
|
111
|
-
HIDE_FLOATING_META,
|
|
112
|
-
markHideFloatingOnNext,
|
|
113
|
-
selectNodeAndHideFloating,
|
|
114
|
-
useFloatingToolbarVisibility
|
|
115
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
HIDE_FLOATING_META,
|
|
4
|
-
markHideFloatingOnNext,
|
|
5
|
-
selectNodeAndHideFloating,
|
|
6
|
-
useFloatingToolbarVisibility
|
|
7
|
-
} from "../chunk-TDFS3DCZ.mjs";
|
|
8
|
-
export {
|
|
9
|
-
HIDE_FLOATING_META,
|
|
10
|
-
markHideFloatingOnNext,
|
|
11
|
-
selectNodeAndHideFloating,
|
|
12
|
-
useFloatingToolbarVisibility
|
|
13
|
-
};
|