@import-ai/omnibox-editor 0.0.1

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.
Files changed (359) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +526 -0
  3. package/dist/components/tiptap-extension/ai-generation-widget-extension.d.ts +41 -0
  4. package/dist/components/tiptap-extension/indent-extension.d.ts +90 -0
  5. package/dist/components/tiptap-extension/list-normalization-extension.d.ts +30 -0
  6. package/dist/components/tiptap-extension/node-alignment-extension.d.ts +38 -0
  7. package/dist/components/tiptap-extension/node-background-extension.d.ts +23 -0
  8. package/dist/components/tiptap-extension/triple-click-block-selection-extension.d.ts +13 -0
  9. package/dist/components/tiptap-extension/ui-state-extension.d.ts +22 -0
  10. package/dist/components/tiptap-icons/add-col-left-icon.d.ts +3 -0
  11. package/dist/components/tiptap-icons/add-col-right-icon.d.ts +3 -0
  12. package/dist/components/tiptap-icons/add-row-bottom-icon.d.ts +3 -0
  13. package/dist/components/tiptap-icons/add-row-top-icon.d.ts +3 -0
  14. package/dist/components/tiptap-icons/ai-sparkles-icon.d.ts +3 -0
  15. package/dist/components/tiptap-icons/align-bottom-icon.d.ts +3 -0
  16. package/dist/components/tiptap-icons/align-center-icon.d.ts +3 -0
  17. package/dist/components/tiptap-icons/align-center-vertical-icon.d.ts +3 -0
  18. package/dist/components/tiptap-icons/align-end-vertical-icon.d.ts +3 -0
  19. package/dist/components/tiptap-icons/align-justify-icon.d.ts +3 -0
  20. package/dist/components/tiptap-icons/align-left-icon.d.ts +3 -0
  21. package/dist/components/tiptap-icons/align-middle-icon.d.ts +3 -0
  22. package/dist/components/tiptap-icons/align-right-icon.d.ts +3 -0
  23. package/dist/components/tiptap-icons/align-start-vertical-icon.d.ts +3 -0
  24. package/dist/components/tiptap-icons/align-top-icon.d.ts +3 -0
  25. package/dist/components/tiptap-icons/alignment-icon.d.ts +3 -0
  26. package/dist/components/tiptap-icons/arrow-down-a-z-icon.d.ts +3 -0
  27. package/dist/components/tiptap-icons/arrow-down-icon.d.ts +3 -0
  28. package/dist/components/tiptap-icons/arrow-down-to-line-icon.d.ts +3 -0
  29. package/dist/components/tiptap-icons/arrow-down-z-a-icon.d.ts +3 -0
  30. package/dist/components/tiptap-icons/arrow-left-icon.d.ts +3 -0
  31. package/dist/components/tiptap-icons/arrow-right-icon.d.ts +3 -0
  32. package/dist/components/tiptap-icons/arrow-up-icon.d.ts +3 -0
  33. package/dist/components/tiptap-icons/at-sign-icon.d.ts +3 -0
  34. package/dist/components/tiptap-icons/ban-icon.d.ts +3 -0
  35. package/dist/components/tiptap-icons/blockquote-icon.d.ts +3 -0
  36. package/dist/components/tiptap-icons/bold-icon.d.ts +3 -0
  37. package/dist/components/tiptap-icons/check-ai-icon.d.ts +3 -0
  38. package/dist/components/tiptap-icons/check-icon.d.ts +3 -0
  39. package/dist/components/tiptap-icons/chevron-down-icon.d.ts +3 -0
  40. package/dist/components/tiptap-icons/chevron-right-icon.d.ts +3 -0
  41. package/dist/components/tiptap-icons/clipboard-icon.d.ts +3 -0
  42. package/dist/components/tiptap-icons/close-icon.d.ts +3 -0
  43. package/dist/components/tiptap-icons/code-block-icon.d.ts +3 -0
  44. package/dist/components/tiptap-icons/code2-icon.d.ts +3 -0
  45. package/dist/components/tiptap-icons/copy-icon.d.ts +3 -0
  46. package/dist/components/tiptap-icons/corner-down-left-icon.d.ts +3 -0
  47. package/dist/components/tiptap-icons/external-link-icon.d.ts +3 -0
  48. package/dist/components/tiptap-icons/grip-4-icon.d.ts +3 -0
  49. package/dist/components/tiptap-icons/grip-vertical-icon.d.ts +3 -0
  50. package/dist/components/tiptap-icons/heading-five-icon.d.ts +3 -0
  51. package/dist/components/tiptap-icons/heading-four-icon.d.ts +3 -0
  52. package/dist/components/tiptap-icons/heading-one-icon.d.ts +3 -0
  53. package/dist/components/tiptap-icons/heading-six-icon.d.ts +3 -0
  54. package/dist/components/tiptap-icons/heading-three-icon.d.ts +3 -0
  55. package/dist/components/tiptap-icons/heading-two-icon.d.ts +3 -0
  56. package/dist/components/tiptap-icons/highlighter-icon.d.ts +3 -0
  57. package/dist/components/tiptap-icons/image-caption-icon.d.ts +3 -0
  58. package/dist/components/tiptap-icons/image-icon.d.ts +3 -0
  59. package/dist/components/tiptap-icons/image-plus-icon.d.ts +3 -0
  60. package/dist/components/tiptap-icons/indent-decrease-icon.d.ts +3 -0
  61. package/dist/components/tiptap-icons/indent-increase-icon.d.ts +3 -0
  62. package/dist/components/tiptap-icons/italic-icon.d.ts +3 -0
  63. package/dist/components/tiptap-icons/link-icon.d.ts +3 -0
  64. package/dist/components/tiptap-icons/list-icon.d.ts +3 -0
  65. package/dist/components/tiptap-icons/list-indented-icon.d.ts +3 -0
  66. package/dist/components/tiptap-icons/list-ordered-icon.d.ts +3 -0
  67. package/dist/components/tiptap-icons/list-todo-icon.d.ts +3 -0
  68. package/dist/components/tiptap-icons/mic-ai-icon.d.ts +3 -0
  69. package/dist/components/tiptap-icons/minus-icon.d.ts +3 -0
  70. package/dist/components/tiptap-icons/moon-star-icon.d.ts +3 -0
  71. package/dist/components/tiptap-icons/more-vertical-icon.d.ts +3 -0
  72. package/dist/components/tiptap-icons/move-horizontal-icon.d.ts +3 -0
  73. package/dist/components/tiptap-icons/paint-bucket-icon.d.ts +3 -0
  74. package/dist/components/tiptap-icons/plus-icon.d.ts +3 -0
  75. package/dist/components/tiptap-icons/plus-small-icon.d.ts +3 -0
  76. package/dist/components/tiptap-icons/redo2-icon.d.ts +3 -0
  77. package/dist/components/tiptap-icons/refresh-ai-icon.d.ts +3 -0
  78. package/dist/components/tiptap-icons/refresh-ccw-icon.d.ts +3 -0
  79. package/dist/components/tiptap-icons/repeat-2-icon.d.ts +3 -0
  80. package/dist/components/tiptap-icons/rotate-ccw-icon.d.ts +3 -0
  81. package/dist/components/tiptap-icons/smile-plus-icon.d.ts +3 -0
  82. package/dist/components/tiptap-icons/square-x-icon.d.ts +3 -0
  83. package/dist/components/tiptap-icons/stop-circle-2-icon.d.ts +3 -0
  84. package/dist/components/tiptap-icons/strike-icon.d.ts +3 -0
  85. package/dist/components/tiptap-icons/subscript-icon.d.ts +3 -0
  86. package/dist/components/tiptap-icons/sun-icon.d.ts +3 -0
  87. package/dist/components/tiptap-icons/superscript-icon.d.ts +3 -0
  88. package/dist/components/tiptap-icons/table-cell-merge-icon.d.ts +3 -0
  89. package/dist/components/tiptap-icons/table-cell-split-icon.d.ts +3 -0
  90. package/dist/components/tiptap-icons/table-header-column-icon.d.ts +3 -0
  91. package/dist/components/tiptap-icons/table-header-row-icon.d.ts +3 -0
  92. package/dist/components/tiptap-icons/table-icon.d.ts +3 -0
  93. package/dist/components/tiptap-icons/text-color-small-icon.d.ts +3 -0
  94. package/dist/components/tiptap-icons/trash-icon.d.ts +3 -0
  95. package/dist/components/tiptap-icons/type-icon.d.ts +3 -0
  96. package/dist/components/tiptap-icons/underline-icon.d.ts +3 -0
  97. package/dist/components/tiptap-icons/undo2-icon.d.ts +3 -0
  98. package/dist/components/tiptap-icons/x-icon.d.ts +3 -0
  99. package/dist/components/tiptap-node/code-block-node/code-block-node-extension.d.ts +6 -0
  100. package/dist/components/tiptap-node/code-block-node/code-block-node-view.d.ts +2 -0
  101. package/dist/components/tiptap-node/code-block-node/diagram-render.d.ts +7 -0
  102. package/dist/components/tiptap-node/horizontal-rule-node/horizontal-rule-node-extension.d.ts +2 -0
  103. package/dist/components/tiptap-node/image-node/image-load-state.d.ts +9 -0
  104. package/dist/components/tiptap-node/image-node/image-node-extension.d.ts +7 -0
  105. package/dist/components/tiptap-node/image-node/image-node-floating.d.ts +4 -0
  106. package/dist/components/tiptap-node/image-node/image-node-view.d.ts +26 -0
  107. package/dist/components/tiptap-node/image-upload-node/image-upload-node-extension.d.ts +57 -0
  108. package/dist/components/tiptap-node/image-upload-node/image-upload-node.d.ts +69 -0
  109. package/dist/components/tiptap-node/table-node/extensions/table-handle/helpers/create-image.d.ts +9 -0
  110. package/dist/components/tiptap-node/table-node/extensions/table-handle/index.d.ts +2 -0
  111. package/dist/components/tiptap-node/table-node/extensions/table-handle/table-handle-plugin.d.ts +43 -0
  112. package/dist/components/tiptap-node/table-node/extensions/table-handle/table-handle.d.ts +14 -0
  113. package/dist/components/tiptap-node/table-node/extensions/table-node-extension.d.ts +32 -0
  114. package/dist/components/tiptap-node/table-node/hooks/use-table-handle-state.d.ts +22 -0
  115. package/dist/components/tiptap-node/table-node/lib/tiptap-table-utils.d.ts +395 -0
  116. package/dist/components/tiptap-node/table-node/ui/table-add-row-column-button/index.d.ts +2 -0
  117. package/dist/components/tiptap-node/table-node/ui/table-add-row-column-button/table-add-row-column-button.d.ts +14 -0
  118. package/dist/components/tiptap-node/table-node/ui/table-add-row-column-button/use-table-add-row-column.d.ts +53 -0
  119. package/dist/components/tiptap-node/table-node/ui/table-align-cell-button/index.d.ts +2 -0
  120. package/dist/components/tiptap-node/table-node/ui/table-align-cell-button/table-align-cell-button.d.ts +41 -0
  121. package/dist/components/tiptap-node/table-node/ui/table-align-cell-button/use-table-align-cell.d.ts +145 -0
  122. package/dist/components/tiptap-node/table-node/ui/table-alignment-menu/index.d.ts +1 -0
  123. package/dist/components/tiptap-node/table-node/ui/table-alignment-menu/table-alignment-menu.d.ts +16 -0
  124. package/dist/components/tiptap-node/table-node/ui/table-cell-handle-menu/index.d.ts +1 -0
  125. package/dist/components/tiptap-node/table-node/ui/table-cell-handle-menu/table-cell-handle-menu.d.ts +18 -0
  126. package/dist/components/tiptap-node/table-node/ui/table-clear-row-column-content-button/index.d.ts +2 -0
  127. package/dist/components/tiptap-node/table-node/ui/table-clear-row-column-content-button/table-clear-row-column-content-button.d.ts +14 -0
  128. package/dist/components/tiptap-node/table-node/ui/table-clear-row-column-content-button/use-table-clear-row-column-content.d.ts +96 -0
  129. package/dist/components/tiptap-node/table-node/ui/table-context-menu/index.d.ts +1 -0
  130. package/dist/components/tiptap-node/table-node/ui/table-context-menu/table-context-menu-utils.d.ts +20 -0
  131. package/dist/components/tiptap-node/table-node/ui/table-context-menu/table-context-menu.d.ts +7 -0
  132. package/dist/components/tiptap-node/table-node/ui/table-delete-row-column-button/index.d.ts +2 -0
  133. package/dist/components/tiptap-node/table-node/ui/table-delete-row-column-button/table-delete-row-column-button.d.ts +14 -0
  134. package/dist/components/tiptap-node/table-node/ui/table-delete-row-column-button/use-table-delete-row-column.d.ts +80 -0
  135. package/dist/components/tiptap-node/table-node/ui/table-duplicate-row-column-button/index.d.ts +2 -0
  136. package/dist/components/tiptap-node/table-node/ui/table-duplicate-row-column-button/table-duplicate-row-column-button.d.ts +6 -0
  137. package/dist/components/tiptap-node/table-node/ui/table-duplicate-row-column-button/use-table-duplicate-row-column.d.ts +42 -0
  138. package/dist/components/tiptap-node/table-node/ui/table-extend-row-column-button/index.d.ts +2 -0
  139. package/dist/components/tiptap-node/table-node/ui/table-extend-row-column-button/table-extend-row-column-button.d.ts +23 -0
  140. package/dist/components/tiptap-node/table-node/ui/table-extend-row-column-button/use-table-extend-row-column.d.ts +14 -0
  141. package/dist/components/tiptap-node/table-node/ui/table-fit-to-width-button/index.d.ts +2 -0
  142. package/dist/components/tiptap-node/table-node/ui/table-fit-to-width-button/table-fit-to-width-button.d.ts +21 -0
  143. package/dist/components/tiptap-node/table-node/ui/table-fit-to-width-button/use-table-fit-to-width.d.ts +67 -0
  144. package/dist/components/tiptap-node/table-node/ui/table-handle/table-handle.d.ts +50 -0
  145. package/dist/components/tiptap-node/table-node/ui/table-handle/use-table-handle-positioning.d.ts +41 -0
  146. package/dist/components/tiptap-node/table-node/ui/table-handle-menu/index.d.ts +1 -0
  147. package/dist/components/tiptap-node/table-node/ui/table-handle-menu/table-handle-menu.d.ts +25 -0
  148. package/dist/components/tiptap-node/table-node/ui/table-header-row-column-button/index.d.ts +2 -0
  149. package/dist/components/tiptap-node/table-node/ui/table-header-row-column-button/table-header-row-column-button.d.ts +15 -0
  150. package/dist/components/tiptap-node/table-node/ui/table-header-row-column-button/use-table-header-row-column.d.ts +51 -0
  151. package/dist/components/tiptap-node/table-node/ui/table-merge-split-cell-button/index.d.ts +2 -0
  152. package/dist/components/tiptap-node/table-node/ui/table-merge-split-cell-button/table-merge-split-cell-button.d.ts +43 -0
  153. package/dist/components/tiptap-node/table-node/ui/table-merge-split-cell-button/use-table-merge-split-cell.d.ts +119 -0
  154. package/dist/components/tiptap-node/table-node/ui/table-move-row-column-button/index.d.ts +2 -0
  155. package/dist/components/tiptap-node/table-node/ui/table-move-row-column-button/table-move-row-column-button.d.ts +37 -0
  156. package/dist/components/tiptap-node/table-node/ui/table-move-row-column-button/use-table-move-row-column.d.ts +94 -0
  157. package/dist/components/tiptap-node/table-node/ui/table-selection-overlay/index.d.ts +1 -0
  158. package/dist/components/tiptap-node/table-node/ui/table-selection-overlay/table-selection-overlay.d.ts +15 -0
  159. package/dist/components/tiptap-node/table-node/ui/table-selection-overlay/use-resize-overlay.d.ts +2 -0
  160. package/dist/components/tiptap-node/table-node/ui/table-sort-row-column-button/index.d.ts +2 -0
  161. package/dist/components/tiptap-node/table-node/ui/table-sort-row-column-button/table-sort-row-column-button.d.ts +14 -0
  162. package/dist/components/tiptap-node/table-node/ui/table-sort-row-column-button/use-table-sort-row-column.d.ts +111 -0
  163. package/dist/components/tiptap-node/toc-node/context/toc-context.d.ts +44 -0
  164. package/dist/components/tiptap-node/toc-node/extensions/toc-node-extension.d.ts +45 -0
  165. package/dist/components/tiptap-node/toc-node/index.d.ts +3 -0
  166. package/dist/components/tiptap-node/toc-node/toc-node.d.ts +4 -0
  167. package/dist/components/tiptap-node/toc-node/ui/toc-show-title-button/index.d.ts +2 -0
  168. package/dist/components/tiptap-node/toc-node/ui/toc-show-title-button/toc-show-title-button.d.ts +16 -0
  169. package/dist/components/tiptap-node/toc-node/ui/toc-show-title-button/toc-show-title.d.ts +83 -0
  170. package/dist/components/tiptap-node/toc-node/ui/toc-sidebar/index.d.ts +1 -0
  171. package/dist/components/tiptap-node/toc-node/ui/toc-sidebar/toc-sidebar.d.ts +14 -0
  172. package/dist/components/tiptap-templates/omnibox/omnibox-editor-header.d.ts +1 -0
  173. package/dist/components/tiptap-templates/omnibox/omnibox-editor-mobile-toolbar.d.ts +14 -0
  174. package/dist/components/tiptap-templates/omnibox/omnibox-editor-theme-toggle.d.ts +1 -0
  175. package/dist/components/tiptap-templates/omnibox/omnibox-editor-toolbar-floating.d.ts +15 -0
  176. package/dist/components/tiptap-templates/omnibox/omnibox-editor.d.ts +32 -0
  177. package/dist/components/tiptap-ui/ai-composer/ai-composer.d.ts +21 -0
  178. package/dist/components/tiptap-ui/ai-composer/ai-generation-state.d.ts +6 -0
  179. package/dist/components/tiptap-ui/ai-composer/ai-markdown-preview.d.ts +4 -0
  180. package/dist/components/tiptap-ui/ai-composer/ai-review-controls.d.ts +13 -0
  181. package/dist/components/tiptap-ui/ai-composer/ai-writing-indicator.d.ts +10 -0
  182. package/dist/components/tiptap-ui/ai-composer/index.d.ts +3 -0
  183. package/dist/components/tiptap-ui/blockquote-button/blockquote-button.d.ts +22 -0
  184. package/dist/components/tiptap-ui/blockquote-button/index.d.ts +2 -0
  185. package/dist/components/tiptap-ui/blockquote-button/use-blockquote.d.ts +80 -0
  186. package/dist/components/tiptap-ui/code-block-button/code-block-button.d.ts +22 -0
  187. package/dist/components/tiptap-ui/code-block-button/index.d.ts +2 -0
  188. package/dist/components/tiptap-ui/code-block-button/use-code-block.d.ts +87 -0
  189. package/dist/components/tiptap-ui/color-highlight-button/color-highlight-button.d.ts +46 -0
  190. package/dist/components/tiptap-ui/color-highlight-button/index.d.ts +2 -0
  191. package/dist/components/tiptap-ui/color-highlight-button/use-color-highlight.d.ts +93 -0
  192. package/dist/components/tiptap-ui/color-highlight-popover/color-highlight-popover.d.ts +35 -0
  193. package/dist/components/tiptap-ui/color-highlight-popover/index.d.ts +1 -0
  194. package/dist/components/tiptap-ui/color-menu/color-menu-utils.d.ts +8 -0
  195. package/dist/components/tiptap-ui/color-menu/color-menu.d.ts +43 -0
  196. package/dist/components/tiptap-ui/color-menu/index.d.ts +1 -0
  197. package/dist/components/tiptap-ui/color-text-button/color-text-button.d.ts +23 -0
  198. package/dist/components/tiptap-ui/color-text-button/index.d.ts +2 -0
  199. package/dist/components/tiptap-ui/color-text-button/use-color-text.d.ts +109 -0
  200. package/dist/components/tiptap-ui/color-text-popover/color-text-popover.d.ts +46 -0
  201. package/dist/components/tiptap-ui/color-text-popover/index.d.ts +2 -0
  202. package/dist/components/tiptap-ui/color-text-popover/use-color-text-popover.d.ts +132 -0
  203. package/dist/components/tiptap-ui/copy-anchor-link-button/copy-anchor-link-button.d.ts +22 -0
  204. package/dist/components/tiptap-ui/copy-anchor-link-button/index.d.ts +3 -0
  205. package/dist/components/tiptap-ui/copy-anchor-link-button/use-copy-anchor-link.d.ts +93 -0
  206. package/dist/components/tiptap-ui/copy-anchor-link-button/use-scroll-to-hash.d.ts +27 -0
  207. package/dist/components/tiptap-ui/copy-to-clipboard-button/copy-to-clipboard-button.d.ts +22 -0
  208. package/dist/components/tiptap-ui/copy-to-clipboard-button/index.d.ts +2 -0
  209. package/dist/components/tiptap-ui/copy-to-clipboard-button/use-copy-to-clipboard.d.ts +103 -0
  210. package/dist/components/tiptap-ui/delete-node-button/delete-node-button.d.ts +22 -0
  211. package/dist/components/tiptap-ui/delete-node-button/index.d.ts +2 -0
  212. package/dist/components/tiptap-ui/delete-node-button/use-delete-node.d.ts +82 -0
  213. package/dist/components/tiptap-ui/drag-context-menu/drag-context-menu-types.d.ts +30 -0
  214. package/dist/components/tiptap-ui/drag-context-menu/drag-context-menu.d.ts +3 -0
  215. package/dist/components/tiptap-ui/drag-context-menu/index.d.ts +2 -0
  216. package/dist/components/tiptap-ui/duplicate-button/duplicate-button.d.ts +22 -0
  217. package/dist/components/tiptap-ui/duplicate-button/index.d.ts +2 -0
  218. package/dist/components/tiptap-ui/duplicate-button/use-duplicate.d.ts +78 -0
  219. package/dist/components/tiptap-ui/emoji-dropdown-menu/emoji-dropdown-menu.d.ts +3 -0
  220. package/dist/components/tiptap-ui/emoji-dropdown-menu/index.d.ts +1 -0
  221. package/dist/components/tiptap-ui/emoji-menu/emoji-menu-utils.d.ts +6 -0
  222. package/dist/components/tiptap-ui/emoji-menu/emoji-menu.d.ts +18 -0
  223. package/dist/components/tiptap-ui/emoji-menu/index.d.ts +2 -0
  224. package/dist/components/tiptap-ui/emoji-trigger-button/emoji-trigger-button.d.ts +22 -0
  225. package/dist/components/tiptap-ui/emoji-trigger-button/index.d.ts +2 -0
  226. package/dist/components/tiptap-ui/emoji-trigger-button/use-emoji-trigger.d.ts +94 -0
  227. package/dist/components/tiptap-ui/heading-button/heading-button.d.ts +23 -0
  228. package/dist/components/tiptap-ui/heading-button/index.d.ts +2 -0
  229. package/dist/components/tiptap-ui/heading-button/use-heading.d.ts +108 -0
  230. package/dist/components/tiptap-ui/image-align-button/image-align-button.d.ts +23 -0
  231. package/dist/components/tiptap-ui/image-align-button/index.d.ts +2 -0
  232. package/dist/components/tiptap-ui/image-align-button/use-image-align.d.ts +110 -0
  233. package/dist/components/tiptap-ui/image-caption-button/image-caption-button.d.ts +16 -0
  234. package/dist/components/tiptap-ui/image-caption-button/index.d.ts +2 -0
  235. package/dist/components/tiptap-ui/image-caption-button/use-image-caption.d.ts +82 -0
  236. package/dist/components/tiptap-ui/image-download-button/image-download-button.d.ts +23 -0
  237. package/dist/components/tiptap-ui/image-download-button/index.d.ts +2 -0
  238. package/dist/components/tiptap-ui/image-download-button/use-image-download.d.ts +64 -0
  239. package/dist/components/tiptap-ui/image-upload-button/image-upload-button.d.ts +29 -0
  240. package/dist/components/tiptap-ui/image-upload-button/index.d.ts +2 -0
  241. package/dist/components/tiptap-ui/image-upload-button/use-image-upload.d.ts +84 -0
  242. package/dist/components/tiptap-ui/indent-button/indent-button.d.ts +30 -0
  243. package/dist/components/tiptap-ui/indent-button/index.d.ts +2 -0
  244. package/dist/components/tiptap-ui/indent-button/use-indent.d.ts +92 -0
  245. package/dist/components/tiptap-ui/link-popover/index.d.ts +2 -0
  246. package/dist/components/tiptap-ui/link-popover/link-popover.d.ts +58 -0
  247. package/dist/components/tiptap-ui/link-popover/use-link-popover.d.ts +117 -0
  248. package/dist/components/tiptap-ui/list-button/index.d.ts +2 -0
  249. package/dist/components/tiptap-ui/list-button/list-button.d.ts +23 -0
  250. package/dist/components/tiptap-ui/list-button/use-list.d.ts +97 -0
  251. package/dist/components/tiptap-ui/mark-button/index.d.ts +2 -0
  252. package/dist/components/tiptap-ui/mark-button/mark-button.d.ts +23 -0
  253. package/dist/components/tiptap-ui/mark-button/use-mark.d.ts +102 -0
  254. package/dist/components/tiptap-ui/math-editor/index.d.ts +1 -0
  255. package/dist/components/tiptap-ui/math-editor/math-editor.d.ts +10 -0
  256. package/dist/components/tiptap-ui/mention-dropdown-menu/index.d.ts +1 -0
  257. package/dist/components/tiptap-ui/mention-dropdown-menu/mention-dropdown-menu.d.ts +7 -0
  258. package/dist/components/tiptap-ui/mention-trigger-button/index.d.ts +2 -0
  259. package/dist/components/tiptap-ui/mention-trigger-button/mention-trigger-button.d.ts +22 -0
  260. package/dist/components/tiptap-ui/mention-trigger-button/use-mention-trigger.d.ts +96 -0
  261. package/dist/components/tiptap-ui/move-node-button/index.d.ts +2 -0
  262. package/dist/components/tiptap-ui/move-node-button/move-node-button.d.ts +20 -0
  263. package/dist/components/tiptap-ui/move-node-button/use-move-node.d.ts +52 -0
  264. package/dist/components/tiptap-ui/reset-all-formatting-button/index.d.ts +2 -0
  265. package/dist/components/tiptap-ui/reset-all-formatting-button/reset-all-formatting-button.d.ts +24 -0
  266. package/dist/components/tiptap-ui/reset-all-formatting-button/use-reset-all-formatting.d.ts +106 -0
  267. package/dist/components/tiptap-ui/slash-command-trigger-button/index.d.ts +2 -0
  268. package/dist/components/tiptap-ui/slash-command-trigger-button/slash-command-trigger-button.d.ts +22 -0
  269. package/dist/components/tiptap-ui/slash-command-trigger-button/use-slash-command-trigger.d.ts +96 -0
  270. package/dist/components/tiptap-ui/slash-dropdown-menu/index.d.ts +2 -0
  271. package/dist/components/tiptap-ui/slash-dropdown-menu/slash-dropdown-menu.d.ts +8 -0
  272. package/dist/components/tiptap-ui/slash-dropdown-menu/use-slash-dropdown-menu.d.ts +146 -0
  273. package/dist/components/tiptap-ui/text-align-button/index.d.ts +2 -0
  274. package/dist/components/tiptap-ui/text-align-button/text-align-button.d.ts +30 -0
  275. package/dist/components/tiptap-ui/text-align-button/use-text-align.d.ts +103 -0
  276. package/dist/components/tiptap-ui/text-button/index.d.ts +2 -0
  277. package/dist/components/tiptap-ui/text-button/text-button.d.ts +22 -0
  278. package/dist/components/tiptap-ui/text-button/use-text.d.ts +86 -0
  279. package/dist/components/tiptap-ui/turn-into-dropdown/index.d.ts +2 -0
  280. package/dist/components/tiptap-ui/turn-into-dropdown/turn-into-dropdown.d.ts +16 -0
  281. package/dist/components/tiptap-ui/turn-into-dropdown/use-turn-into-dropdown.d.ts +153 -0
  282. package/dist/components/tiptap-ui/undo-redo-button/index.d.ts +2 -0
  283. package/dist/components/tiptap-ui/undo-redo-button/undo-redo-button.d.ts +23 -0
  284. package/dist/components/tiptap-ui/undo-redo-button/use-undo-redo.d.ts +90 -0
  285. package/dist/components/tiptap-ui-primitive/avatar/avatar.d.ts +23 -0
  286. package/dist/components/tiptap-ui-primitive/avatar/index.d.ts +1 -0
  287. package/dist/components/tiptap-ui-primitive/badge/badge.d.ts +11 -0
  288. package/dist/components/tiptap-ui-primitive/badge/index.d.ts +1 -0
  289. package/dist/components/tiptap-ui-primitive/button/button.d.ts +16 -0
  290. package/dist/components/tiptap-ui-primitive/button/index.d.ts +1 -0
  291. package/dist/components/tiptap-ui-primitive/button-group/button-group.d.ts +10 -0
  292. package/dist/components/tiptap-ui-primitive/button-group/index.d.ts +1 -0
  293. package/dist/components/tiptap-ui-primitive/card/card.d.ts +10 -0
  294. package/dist/components/tiptap-ui-primitive/card/index.d.ts +1 -0
  295. package/dist/components/tiptap-ui-primitive/combobox/combobox.d.ts +21 -0
  296. package/dist/components/tiptap-ui-primitive/combobox/index.d.ts +1 -0
  297. package/dist/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.d.ts +29 -0
  298. package/dist/components/tiptap-ui-primitive/dropdown-menu/index.d.ts +1 -0
  299. package/dist/components/tiptap-ui-primitive/input/index.d.ts +1 -0
  300. package/dist/components/tiptap-ui-primitive/input/input.d.ts +3 -0
  301. package/dist/components/tiptap-ui-primitive/input-group/index.d.ts +1 -0
  302. package/dist/components/tiptap-ui-primitive/input-group/input-group.d.ts +19 -0
  303. package/dist/components/tiptap-ui-primitive/menu/index.d.ts +5 -0
  304. package/dist/components/tiptap-ui-primitive/menu/menu-context.d.ts +5 -0
  305. package/dist/components/tiptap-ui-primitive/menu/menu-hooks.d.ts +10 -0
  306. package/dist/components/tiptap-ui-primitive/menu/menu-types.d.ts +44 -0
  307. package/dist/components/tiptap-ui-primitive/menu/menu-utils.d.ts +15 -0
  308. package/dist/components/tiptap-ui-primitive/menu/menu.d.ts +20 -0
  309. package/dist/components/tiptap-ui-primitive/popover/index.d.ts +1 -0
  310. package/dist/components/tiptap-ui-primitive/popover/popover.d.ts +6 -0
  311. package/dist/components/tiptap-ui-primitive/separator/index.d.ts +1 -0
  312. package/dist/components/tiptap-ui-primitive/separator/separator.d.ts +5 -0
  313. package/dist/components/tiptap-ui-primitive/spacer/index.d.ts +1 -0
  314. package/dist/components/tiptap-ui-primitive/spacer/spacer.d.ts +5 -0
  315. package/dist/components/tiptap-ui-primitive/textarea/index.d.ts +1 -0
  316. package/dist/components/tiptap-ui-primitive/textarea/textarea.d.ts +3 -0
  317. package/dist/components/tiptap-ui-primitive/toolbar/index.d.ts +1 -0
  318. package/dist/components/tiptap-ui-primitive/toolbar/toolbar.d.ts +9 -0
  319. package/dist/components/tiptap-ui-primitive/tooltip/index.d.ts +1 -0
  320. package/dist/components/tiptap-ui-primitive/tooltip/tooltip.d.ts +29 -0
  321. package/dist/components/tiptap-ui-utils/floating-element/floating-element-utils.d.ts +3 -0
  322. package/dist/components/tiptap-ui-utils/floating-element/floating-element.d.ts +53 -0
  323. package/dist/components/tiptap-ui-utils/floating-element/index.d.ts +2 -0
  324. package/dist/components/tiptap-ui-utils/suggestion-menu/index.d.ts +3 -0
  325. package/dist/components/tiptap-ui-utils/suggestion-menu/suggestion-menu-types.d.ts +86 -0
  326. package/dist/components/tiptap-ui-utils/suggestion-menu/suggestion-menu-utils.d.ts +19 -0
  327. package/dist/components/tiptap-ui-utils/suggestion-menu/suggestion-menu.d.ts +6 -0
  328. package/dist/contexts/user-context.d.ts +16 -0
  329. package/dist/hooks/use-composed-ref.d.ts +3 -0
  330. package/dist/hooks/use-cursor-visibility.d.ts +20 -0
  331. package/dist/hooks/use-element-rect.d.ts +35 -0
  332. package/dist/hooks/use-floating-element.d.ts +36 -0
  333. package/dist/hooks/use-floating-toolbar-visibility.d.ts +29 -0
  334. package/dist/hooks/use-is-breakpoint.d.ts +9 -0
  335. package/dist/hooks/use-isomorphic-layout-effect.d.ts +7 -0
  336. package/dist/hooks/use-menu-navigation.d.ts +52 -0
  337. package/dist/hooks/use-on-click-outside.d.ts +18 -0
  338. package/dist/hooks/use-throttled-callback.d.ts +18 -0
  339. package/dist/hooks/use-tiptap-editor.d.ts +6 -0
  340. package/dist/hooks/use-ui-editor-state.d.ts +4 -0
  341. package/dist/hooks/use-unmount.d.ts +7 -0
  342. package/dist/hooks/use-window-size.d.ts +35 -0
  343. package/dist/index.d.ts +7 -0
  344. package/dist/lib/clipboard.d.ts +6 -0
  345. package/dist/lib/editor-collaboration.d.ts +6 -0
  346. package/dist/lib/editor-content.d.ts +5 -0
  347. package/dist/lib/editor-users.d.ts +27 -0
  348. package/dist/lib/html-table.d.ts +5 -0
  349. package/dist/lib/i18n.d.ts +170 -0
  350. package/dist/lib/markdown.d.ts +12 -0
  351. package/dist/lib/math-editor.d.ts +19 -0
  352. package/dist/lib/tiptap-advanced-utils.d.ts +120 -0
  353. package/dist/lib/tiptap-collab-utils.d.ts +47 -0
  354. package/dist/lib/tiptap-utils.d.ts +174 -0
  355. package/dist/omnibox-editor.css +1 -0
  356. package/dist/omnibox-editor.js +19816 -0
  357. package/dist/omnibox-editor.umd.cjs +15 -0
  358. package/dist/types.d.ts +77 -0
  359. package/package.json +114 -0
@@ -0,0 +1,97 @@
1
+ import { type Editor } from "@tiptap/react";
2
+ export type ListType = "bulletList" | "orderedList" | "taskList";
3
+ /**
4
+ * Configuration for the list functionality
5
+ */
6
+ export interface UseListConfig {
7
+ /**
8
+ * The Tiptap editor instance.
9
+ */
10
+ editor?: Editor | null;
11
+ /**
12
+ * The type of list to toggle.
13
+ */
14
+ type: ListType;
15
+ /**
16
+ * Whether the button should hide when list is not available.
17
+ * @default false
18
+ */
19
+ hideWhenUnavailable?: boolean;
20
+ /**
21
+ * Callback function called after a successful toggle.
22
+ */
23
+ onToggled?: () => void;
24
+ }
25
+ export declare const listIcons: {
26
+ bulletList: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
27
+ orderedList: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
28
+ taskList: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
29
+ };
30
+ export declare const listLabels: Record<ListType, string>;
31
+ export declare const LIST_SHORTCUT_KEYS: Record<ListType, string>;
32
+ /**
33
+ * Checks if a list can be toggled in the current editor state
34
+ */
35
+ export declare function canToggleList(editor: Editor | null, type: ListType, turnInto?: boolean): boolean;
36
+ /**
37
+ * Checks if list is currently active
38
+ */
39
+ export declare function isListActive(editor: Editor | null, type: ListType): boolean;
40
+ /**
41
+ * Toggles list in the editor
42
+ */
43
+ export declare function toggleList(editor: Editor | null, type: ListType): boolean;
44
+ /**
45
+ * Determines if the list button should be shown
46
+ */
47
+ export declare function shouldShowButton(props: {
48
+ editor: Editor | null;
49
+ type: ListType;
50
+ hideWhenUnavailable: boolean;
51
+ }): boolean;
52
+ /**
53
+ * Custom hook that provides list functionality for Tiptap editor
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * // Simple usage
58
+ * function MySimpleListButton() {
59
+ * const { isVisible, handleToggle, isActive } = useList({ type: "bulletList" })
60
+ *
61
+ * if (!isVisible) return null
62
+ *
63
+ * return <button onClick={handleToggle}>Bullet List</button>
64
+ * }
65
+ *
66
+ * // Advanced usage with configuration
67
+ * function MyAdvancedListButton() {
68
+ * const { isVisible, handleToggle, label, isActive } = useList({
69
+ * type: "orderedList",
70
+ * editor: myEditor,
71
+ * hideWhenUnavailable: true,
72
+ * onToggled: () => console.log('List toggled!')
73
+ * })
74
+ *
75
+ * if (!isVisible) return null
76
+ *
77
+ * return (
78
+ * <MyButton
79
+ * onClick={handleToggle}
80
+ * aria-label={label}
81
+ * aria-pressed={isActive}
82
+ * >
83
+ * Toggle List
84
+ * </MyButton>
85
+ * )
86
+ * }
87
+ * ```
88
+ */
89
+ export declare function useList(config: UseListConfig): {
90
+ isVisible: boolean;
91
+ isActive: boolean;
92
+ handleToggle: () => boolean;
93
+ canToggle: boolean;
94
+ label: string;
95
+ shortcutKeys: string;
96
+ Icon: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element> | import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element> | import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
97
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./mark-button";
2
+ export * from "./use-mark";
@@ -0,0 +1,23 @@
1
+ import type { Mark, UseMarkConfig } from "@/components/tiptap-ui/mark-button";
2
+ import type { ButtonProps } from "@/components/tiptap-ui-primitive/button";
3
+ export interface MarkButtonProps extends Omit<ButtonProps, "type">, UseMarkConfig {
4
+ /**
5
+ * Optional text to display alongside the icon.
6
+ */
7
+ text?: string;
8
+ /**
9
+ * Optional show shortcut keys in the button.
10
+ * @default false
11
+ */
12
+ showShortcut?: boolean;
13
+ }
14
+ export declare function MarkShortcutBadge({ type, shortcutKeys, }: {
15
+ type: Mark;
16
+ shortcutKeys?: string;
17
+ }): import("react").JSX.Element;
18
+ /**
19
+ * Button component for toggling marks in a Tiptap editor.
20
+ *
21
+ * For custom button implementations, use the `useMark` hook instead.
22
+ */
23
+ export declare const MarkButton: import("react").ForwardRefExoticComponent<MarkButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,102 @@
1
+ import type { Editor } from "@tiptap/react";
2
+ import { type OmniboxEditorI18n } from "@/lib/i18n";
3
+ export type Mark = "bold" | "italic" | "strike" | "code" | "underline" | "superscript" | "subscript";
4
+ /**
5
+ * Configuration for the mark functionality
6
+ */
7
+ export interface UseMarkConfig {
8
+ /**
9
+ * The Tiptap editor instance.
10
+ */
11
+ editor?: Editor | null;
12
+ /**
13
+ * The type of mark to toggle
14
+ */
15
+ type: Mark;
16
+ /**
17
+ * Whether the button should hide when mark is not available.
18
+ * @default false
19
+ */
20
+ hideWhenUnavailable?: boolean;
21
+ /**
22
+ * Callback function called after a successful mark toggle.
23
+ */
24
+ onToggled?: () => void;
25
+ }
26
+ export declare const markIcons: {
27
+ bold: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
28
+ italic: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
29
+ underline: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
30
+ strike: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
31
+ code: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
32
+ superscript: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
33
+ subscript: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
34
+ };
35
+ export declare const MARK_SHORTCUT_KEYS: Record<Mark, string>;
36
+ /**
37
+ * Checks if a mark can be toggled in the current editor state
38
+ */
39
+ export declare function canToggleMark(editor: Editor | null, type: Mark): boolean;
40
+ /**
41
+ * Checks if a mark is currently active
42
+ */
43
+ export declare function isMarkActive(editor: Editor | null, type: Mark): boolean;
44
+ /**
45
+ * Toggles a mark in the editor
46
+ */
47
+ export declare function toggleMark(editor: Editor | null, type: Mark): boolean;
48
+ /**
49
+ * Determines if the mark button should be shown
50
+ */
51
+ export declare function shouldShowButton(props: {
52
+ editor: Editor | null;
53
+ type: Mark;
54
+ hideWhenUnavailable: boolean;
55
+ }): boolean;
56
+ export declare function getMarkLabel(type: Mark, i18n: OmniboxEditorI18n): string;
57
+ /**
58
+ * Custom hook that provides mark functionality for Tiptap editor
59
+ *
60
+ * @example
61
+ * ```tsx
62
+ * // Simple usage
63
+ * function MySimpleBoldButton() {
64
+ * const { isVisible, handleMark } = useMark({ type: "bold" })
65
+ *
66
+ * if (!isVisible) return null
67
+ *
68
+ * return <button onClick={handleMark}>Bold</button>
69
+ * }
70
+ *
71
+ * // Advanced usage with configuration
72
+ * function MyAdvancedItalicButton() {
73
+ * const { isVisible, handleMark, label, isActive } = useMark({
74
+ * editor: myEditor,
75
+ * type: "italic",
76
+ * hideWhenUnavailable: true,
77
+ * onToggled: () => console.log('Mark toggled!')
78
+ * })
79
+ *
80
+ * if (!isVisible) return null
81
+ *
82
+ * return (
83
+ * <MyButton
84
+ * onClick={handleMark}
85
+ * aria-pressed={isActive}
86
+ * aria-label={label}
87
+ * >
88
+ * Italic
89
+ * </MyButton>
90
+ * )
91
+ * }
92
+ * ```
93
+ */
94
+ export declare function useMark(config: UseMarkConfig): {
95
+ isVisible: boolean;
96
+ isActive: boolean;
97
+ handleMark: () => boolean;
98
+ canToggle: boolean;
99
+ label: string;
100
+ shortcutKeys: string;
101
+ Icon: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element> | import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element> | import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element> | import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element> | import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element> | import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element> | import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
102
+ };
@@ -0,0 +1 @@
1
+ export * from "./math-editor";
@@ -0,0 +1,10 @@
1
+ import type { Editor } from "@tiptap/react";
2
+ import { type MathNodeEditTarget } from "@/lib/math-editor";
3
+ import "@/components/tiptap-ui/math-editor/math-editor.css";
4
+ type MathEditorProps = {
5
+ editor: Editor;
6
+ target: MathNodeEditTarget | null;
7
+ onOpenChange: (open: boolean) => void;
8
+ };
9
+ export declare function MathEditor({ editor, target, onOpenChange }: MathEditorProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./mention-dropdown-menu";
@@ -0,0 +1,7 @@
1
+ import type { User } from "@/contexts/user-context";
2
+ import type { SuggestionMenuProps } from "@/components/tiptap-ui-utils/suggestion-menu";
3
+ type MentionDropdownMenuProps = Omit<SuggestionMenuProps, "items" | "children"> & {
4
+ users?: User[];
5
+ };
6
+ export declare const MentionDropdownMenu: ({ users, ...props }: MentionDropdownMenuProps) => import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./mention-trigger-button";
2
+ export * from "./use-mention-trigger";
@@ -0,0 +1,22 @@
1
+ import type { UseMentionTriggerConfig } from "@/components/tiptap-ui/mention-trigger-button";
2
+ import type { ButtonProps } from "@/components/tiptap-ui-primitive/button";
3
+ export interface MentionTriggerButtonProps extends Omit<ButtonProps, "type">, UseMentionTriggerConfig {
4
+ /**
5
+ * Optional text to display alongside the icon.
6
+ */
7
+ text?: string;
8
+ /**
9
+ * Optional show shortcut keys in the button.
10
+ * @default false
11
+ */
12
+ showShortcut?: boolean;
13
+ }
14
+ export declare function MentionShortcutBadge({ shortcutKeys, }: {
15
+ shortcutKeys?: string;
16
+ }): import("react").JSX.Element;
17
+ /**
18
+ * Button component for inserting mention triggers in a Tiptap editor.
19
+ *
20
+ * For custom button implementations, use the `useMention` hook instead.
21
+ */
22
+ export declare const MentionTriggerButton: import("react").ForwardRefExoticComponent<MentionTriggerButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,96 @@
1
+ import { type Editor } from "@tiptap/react";
2
+ import type { Node } from "@tiptap/pm/model";
3
+ export declare const MENTION_TRIGGER_SHORTCUT_KEY = "mod+shift+2";
4
+ /**
5
+ * Configuration for the mention functionality
6
+ */
7
+ export interface UseMentionTriggerConfig {
8
+ /**
9
+ * The Tiptap editor instance.
10
+ */
11
+ editor?: Editor | null;
12
+ /**
13
+ * The node to apply trigger to
14
+ */
15
+ node?: Node | null;
16
+ /**
17
+ * The position of the node in the document
18
+ */
19
+ nodePos?: number | null;
20
+ /**
21
+ * The trigger text to insert
22
+ * @default "@"
23
+ */
24
+ trigger?: string;
25
+ /**
26
+ * Whether the button should hide when insertion is not available.
27
+ * @default false
28
+ */
29
+ hideWhenUnavailable?: boolean;
30
+ /**
31
+ * Callback function called after a successful trigger insertion.
32
+ */
33
+ onTriggered?: (trigger: string) => void;
34
+ }
35
+ /**
36
+ * Checks if a mention can be inserted in the current editor state
37
+ */
38
+ export declare function canInsertMention(editor: Editor | null, node?: Node | null, nodePos?: number | null): boolean;
39
+ /**
40
+ * Adds a mention trigger at the current selection or specified node position
41
+ */
42
+ export declare function addMentionTrigger(editor: Editor | null, trigger?: string, node?: Node | null, nodePos?: number | null): boolean;
43
+ /**
44
+ * Determines if the mention button should be shown
45
+ */
46
+ export declare function shouldShowButton(props: {
47
+ editor: Editor | null;
48
+ hideWhenUnavailable: boolean;
49
+ node?: Node | null;
50
+ nodePos?: number | null;
51
+ }): boolean;
52
+ /**
53
+ * Custom hook that provides mention functionality for Tiptap editor
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * // Simple usage - no params needed
58
+ * function MySimpleMentionButton() {
59
+ * const { isVisible, handleMention } = useMentionTrigger()
60
+ *
61
+ * if (!isVisible) return null
62
+ *
63
+ * return <button onClick={handleMention}>Add Mention</button>
64
+ * }
65
+ *
66
+ * // Advanced usage with configuration
67
+ * function MyAdvancedMentionButton() {
68
+ * const { isVisible, handleMention, label } = useMentionTrigger({
69
+ * editor: myEditor,
70
+ * trigger: "@",
71
+ * hideWhenUnavailable: true,
72
+ * onTriggered: (trigger) => console.log('Inserted:', trigger)
73
+ * })
74
+ *
75
+ * if (!isVisible) return null
76
+ *
77
+ * return (
78
+ * <MyButton
79
+ * onClick={handleMention}
80
+ * aria-label={label}
81
+ * >
82
+ * Add Mention
83
+ * </MyButton>
84
+ * )
85
+ * }
86
+ * ```
87
+ */
88
+ export declare function useMentionTrigger(config?: UseMentionTriggerConfig): {
89
+ isVisible: boolean;
90
+ handleMention: () => boolean;
91
+ canInsert: boolean;
92
+ label: string;
93
+ shortcutKeys: string;
94
+ trigger: string;
95
+ Icon: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
96
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./move-node-button";
2
+ export * from "./use-move-node";
@@ -0,0 +1,20 @@
1
+ import type { UseMoveNodeConfig } from "@/components/tiptap-ui/move-node-button";
2
+ import type { ButtonProps } from "@/components/tiptap-ui-primitive/button";
3
+ export interface MoveNodeButtonProps extends Omit<ButtonProps, "type">, UseMoveNodeConfig {
4
+ /**
5
+ * Optional text to display alongside the icon.
6
+ */
7
+ text?: string;
8
+ /**
9
+ * Optional show shortcut keys in the button.
10
+ * @default false
11
+ */
12
+ showShortcut?: boolean;
13
+ }
14
+ export declare function MoveNodeShortcutBadge({ shortcutKeys, }: {
15
+ shortcutKeys: string;
16
+ }): import("react").JSX.Element;
17
+ /**
18
+ * Button component for moving a node up or down in a Tiptap editor.
19
+ */
20
+ export declare const MoveNodeButton: import("react").ForwardRefExoticComponent<MoveNodeButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,52 @@
1
+ import { type Editor } from "@tiptap/react";
2
+ export declare const MOVE_UP_SHORTCUT_KEY = "mod+shift+ArrowUp";
3
+ export declare const MOVE_DOWN_SHORTCUT_KEY = "mod+shift+ArrowDown";
4
+ /**
5
+ * Configuration for the move node functionality
6
+ */
7
+ export interface UseMoveNodeConfig {
8
+ /**
9
+ * The Tiptap editor instance.
10
+ */
11
+ editor?: Editor | null;
12
+ /**
13
+ * Whether the button should hide when moving is not available.
14
+ * @default false
15
+ */
16
+ hideWhenUnavailable?: boolean;
17
+ /**
18
+ * The direction to move the node.
19
+ */
20
+ direction: "up" | "down";
21
+ /**
22
+ * Callback function called after a successful move.
23
+ */
24
+ onMoved?: (direction: "up" | "down") => void;
25
+ }
26
+ /**
27
+ * Checks if a node can be moved in the specified direction
28
+ */
29
+ export declare function canMoveNode(editor: Editor | null, direction: "up" | "down"): boolean;
30
+ /**
31
+ * Moves a node in the editor
32
+ */
33
+ export declare function moveNode(editor: Editor | null, direction: "up" | "down"): boolean;
34
+ /**
35
+ * Determines if the move button should be shown
36
+ */
37
+ export declare function shouldShowButton(props: {
38
+ editor: Editor | null;
39
+ direction: "up" | "down";
40
+ hideWhenUnavailable: boolean;
41
+ }): boolean;
42
+ /**
43
+ * Custom hook that provides move node functionality for Tiptap editor
44
+ */
45
+ export declare function useMoveNode(config: UseMoveNodeConfig): {
46
+ isVisible: boolean;
47
+ handleMoveNode: () => boolean;
48
+ canMoveNode: boolean;
49
+ label: string;
50
+ shortcutKeys: string;
51
+ Icon: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
52
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./reset-all-formatting-button";
2
+ export * from "./use-reset-all-formatting";
@@ -0,0 +1,24 @@
1
+ import type { UseResetAllFormattingConfig } from "@/components/tiptap-ui/reset-all-formatting-button";
2
+ import type { ButtonProps } from "@/components/tiptap-ui-primitive/button";
3
+ export interface ResetAllFormattingButtonProps extends Omit<ButtonProps, "type">, UseResetAllFormattingConfig {
4
+ /**
5
+ * Optional text to display alongside the icon.
6
+ */
7
+ text?: string;
8
+ /**
9
+ * Optional show shortcut keys in the button.
10
+ * @default false
11
+ */
12
+ showShortcut?: boolean;
13
+ }
14
+ export declare function ResetAllFormattingShortcutBadge({ shortcutKeys, }: {
15
+ shortcutKeys?: string;
16
+ }): import("react").JSX.Element;
17
+ /**
18
+ * Button component for resetting formatting in a Tiptap editor.
19
+ * Removes all marks from the current selection (optionally preserving some
20
+ * via `preserveMarks`).
21
+ *
22
+ * For custom button implementations, use the `useResetAllFormatting` hook instead.
23
+ */
24
+ export declare const ResetAllFormattingButton: import("react").ForwardRefExoticComponent<ResetAllFormattingButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,106 @@
1
+ import { type Editor } from "@tiptap/react";
2
+ import type { Transaction } from "@tiptap/pm/state";
3
+ export declare const RESET_ALL_FORMATTING_SHORTCUT_KEY = "mod+r";
4
+ /**
5
+ * Marks preserved by default so a formatting reset never destroys comment
6
+ * thread anchors (`inlineThread`). Defined at module scope so the hook's
7
+ * default keeps a stable identity and doesn't re-fire its `selectionUpdate`
8
+ * effect every render.
9
+ */
10
+ export declare const DEFAULT_RESET_PRESERVE_MARKS: string[];
11
+ /**
12
+ * Configuration for the reset formatting functionality
13
+ */
14
+ export interface UseResetAllFormattingConfig {
15
+ /**
16
+ * The Tiptap editor instance.
17
+ */
18
+ editor?: Editor | null;
19
+ /**
20
+ * Whether the button should hide when resetting is not available.
21
+ * @default false
22
+ */
23
+ hideWhenUnavailable?: boolean;
24
+ /**
25
+ * Marks to preserve when resetting formatting.
26
+ * @default ["inlineThread"]
27
+ */
28
+ preserveMarks?: string[];
29
+ /**
30
+ * Callback function called after formatting is successfully reset.
31
+ */
32
+ onResetAllFormatting?: () => void;
33
+ }
34
+ /**
35
+ * Removes all marks from the transaction except those specified in the skip array
36
+ * @param tr The Tiptap transaction to modify
37
+ * @param skip Array of mark names to skip when removing marks
38
+ * @returns The modified transaction with specified marks removed
39
+ */
40
+ export declare function removeAllMarksExcept(tr: Transaction, skip?: string[]): Transaction;
41
+ /**
42
+ * Checks whether the current selection has marks that can be reset (removed)
43
+ * @param tr The Tiptap transaction to check
44
+ * @param skip Array of mark names to skip when checking for removable marks
45
+ * @returns True if there are marks that can be removed, false otherwise
46
+ */
47
+ export declare function canResetMarks(tr: Transaction, skip?: string[]): boolean;
48
+ /**
49
+ * Checks if formatting can be reset for a node
50
+ */
51
+ export declare function canResetFormatting(editor: Editor | null, preserveMarks?: string[]): boolean;
52
+ /**
53
+ * Resets formatting for a node or selection
54
+ */
55
+ export declare function resetFormatting(editor: Editor | null, preserveMarks?: string[]): boolean;
56
+ /**
57
+ * Determines if the reset formatting button should be shown
58
+ */
59
+ export declare function shouldShowButton(props: {
60
+ editor: Editor | null;
61
+ hideWhenUnavailable: boolean;
62
+ preserveMarks?: string[];
63
+ }): boolean;
64
+ /**
65
+ * Custom hook that provides reset formatting functionality for Tiptap editor
66
+ *
67
+ * @example
68
+ * ```tsx
69
+ * // Simple usage - no params needed
70
+ * function MySimpleResetButton() {
71
+ * const { isVisible, handleResetFormatting } = useResetAllFormatting()
72
+ *
73
+ * if (!isVisible) return null
74
+ *
75
+ * return <button onClick={handleResetFormatting}>Reset</button>
76
+ * }
77
+ *
78
+ * // Advanced usage with configuration
79
+ * function MyAdvancedResetButton() {
80
+ * const { isVisible, handleResetFormatting, label } = useResetAllFormatting({
81
+ * editor: myEditor,
82
+ * hideWhenUnavailable: true,
83
+ * onResetAllFormatting: () => console.log('Formatting reset!')
84
+ * })
85
+ *
86
+ * if (!isVisible) return null
87
+ *
88
+ * return (
89
+ * <MyButton
90
+ * onClick={handleResetFormatting}
91
+ * aria-label={label}
92
+ * >
93
+ * Reset Formatting
94
+ * </MyButton>
95
+ * )
96
+ * }
97
+ * ```
98
+ */
99
+ export declare function useResetAllFormatting(config?: UseResetAllFormattingConfig): {
100
+ isVisible: boolean;
101
+ handleResetFormatting: () => boolean;
102
+ canReset: boolean;
103
+ label: string;
104
+ shortcutKeys: string;
105
+ Icon: import("react").MemoExoticComponent<({ className, ...props }: Omit<import("react").SVGProps<SVGSVGElement>, "ref">) => import("react").JSX.Element>;
106
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./slash-command-trigger-button";
2
+ export * from "./use-slash-command-trigger";
@@ -0,0 +1,22 @@
1
+ import type { UseSlashCommandTriggerConfig } from "@/components/tiptap-ui/slash-command-trigger-button";
2
+ import type { ButtonProps } from "@/components/tiptap-ui-primitive/button";
3
+ export interface SlashCommandTriggerButtonProps extends Omit<ButtonProps, "type">, UseSlashCommandTriggerConfig {
4
+ /**
5
+ * Optional text to display alongside the icon.
6
+ */
7
+ text?: string;
8
+ /**
9
+ * Optional show shortcut keys in the button.
10
+ * @default false
11
+ */
12
+ showShortcut?: boolean;
13
+ }
14
+ export declare function SlashCommandShortcutBadge({ shortcutKeys, }: {
15
+ shortcutKeys?: string;
16
+ }): import("react").JSX.Element;
17
+ /**
18
+ * Button component for inserting slash commands in a Tiptap editor.
19
+ *
20
+ * For custom button implementations, use the `useSlashCommand` hook instead.
21
+ */
22
+ export declare const SlashCommandTriggerButton: import("react").ForwardRefExoticComponent<SlashCommandTriggerButtonProps & import("react").RefAttributes<HTMLButtonElement>>;