@instincthub/react-ui 0.1.63 → 0.2.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.
Files changed (194) hide show
  1. package/README.md +43 -3
  2. package/dist/_virtual/_rollupPluginBabelHelpers.js +2 -2
  3. package/dist/node_modules/.pnpm/@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js +1 -1
  4. package/dist/node_modules/.pnpm/@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js.map +1 -1
  5. package/dist/node_modules/.pnpm/@tiptap_react@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1_react-dom_3687a02a33de69fe477ccd0d970063c0/node_modules/@tiptap/react/dist/index.js +3 -3
  6. package/dist/node_modules/.pnpm/@tiptap_react@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1_react-dom_3687a02a33de69fe477ccd0d970063c0/node_modules/@tiptap/react/dist/index.js.map +1 -1
  7. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-center.js +1 -1
  8. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-center.js.map +1 -1
  9. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-left.js +1 -1
  10. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-left.js.map +1 -1
  11. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-right.js +1 -1
  12. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-right.js.map +1 -1
  13. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-down.js +1 -1
  14. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-down.js.map +1 -1
  15. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-left.js +1 -1
  16. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-left.js.map +1 -1
  17. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-right.js +1 -1
  18. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-right.js.map +1 -1
  19. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-up.js +1 -1
  20. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-up.js.map +1 -1
  21. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/ban.js +1 -1
  22. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/ban.js.map +1 -1
  23. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/baseline.js +1 -1
  24. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/baseline.js.map +1 -1
  25. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/download.js +1 -1
  26. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/download.js.map +1 -1
  27. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/file-text.js +1 -1
  28. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/file-text.js.map +1 -1
  29. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/film.js +1 -1
  30. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/film.js.map +1 -1
  31. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/grip-horizontal.js +1 -1
  32. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/grip-horizontal.js.map +1 -1
  33. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading-1.js +1 -1
  34. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading-1.js.map +1 -1
  35. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading.js +1 -1
  36. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading.js.map +1 -1
  37. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/highlighter.js +1 -1
  38. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/highlighter.js.map +1 -1
  39. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/lightbulb.js +1 -1
  40. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/lightbulb.js.map +1 -1
  41. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/link-2.js +1 -1
  42. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/link-2.js.map +1 -1
  43. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/monitor-play.js +1 -1
  44. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/monitor-play.js.map +1 -1
  45. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/mouse-pointer-click.js +1 -1
  46. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/mouse-pointer-click.js.map +1 -1
  47. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/music.js +1 -1
  48. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/music.js.map +1 -1
  49. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/paint-bucket.js +1 -1
  50. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/paint-bucket.js.map +1 -1
  51. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/palette.js +1 -1
  52. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/palette.js.map +1 -1
  53. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/panel-left.js +1 -1
  54. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/panel-left.js.map +1 -1
  55. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/panel-top.js +1 -1
  56. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/panel-top.js.map +1 -1
  57. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/paperclip.js +1 -1
  58. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/paperclip.js.map +1 -1
  59. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/refresh-cw.js +1 -1
  60. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/refresh-cw.js.map +1 -1
  61. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/remove-formatting.js +1 -1
  62. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/remove-formatting.js.map +1 -1
  63. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/settings-2.js +1 -1
  64. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/settings-2.js.map +1 -1
  65. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/square-chevron-right.js +1 -1
  66. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/square-chevron-right.js.map +1 -1
  67. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/type.js +1 -1
  68. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/type.js.map +1 -1
  69. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/upload.js +1 -1
  70. package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/upload.js.map +1 -1
  71. package/dist/src/assets/css/ui/ihub-text-editor-blocks.css +951 -0
  72. package/dist/src/assets/css/ui/ui-index.css +1 -0
  73. package/dist/src/components/ui/ComponentLists.js +1 -1
  74. package/dist/src/components/ui/editor/ihub-editor/IHubTextEditor.js +1 -1
  75. package/dist/src/components/ui/editor/ihub-editor/blocks/BlockHandle.js +2 -0
  76. package/dist/src/components/ui/editor/ihub-editor/blocks/BlockHandle.js.map +1 -0
  77. package/dist/src/components/ui/editor/ihub-editor/blocks/BlockKeymap.js +2 -0
  78. package/dist/src/components/ui/editor/ihub-editor/blocks/BlockKeymap.js.map +1 -0
  79. package/dist/src/components/ui/editor/ihub-editor/blocks/blockLayout.js +2 -0
  80. package/dist/src/components/ui/editor/ihub-editor/blocks/blockLayout.js.map +1 -0
  81. package/dist/src/components/ui/editor/ihub-editor/blocks/blockOps.js +2 -0
  82. package/dist/src/components/ui/editor/ihub-editor/blocks/blockOps.js.map +1 -0
  83. package/dist/src/components/ui/editor/ihub-editor/blocks/useBlockDrag.js +2 -0
  84. package/dist/src/components/ui/editor/ihub-editor/blocks/useBlockDrag.js.map +1 -0
  85. package/dist/src/components/ui/editor/ihub-editor/components/BubbleToolbar.js +1 -1
  86. package/dist/src/components/ui/editor/ihub-editor/components/ColorPalette.js +2 -0
  87. package/dist/src/components/ui/editor/ihub-editor/components/ColorPalette.js.map +1 -0
  88. package/dist/src/components/ui/editor/ihub-editor/components/FloatingAddButton.js +1 -1
  89. package/dist/src/components/ui/editor/ihub-editor/components/SlashCommandMenu.js +1 -1
  90. package/dist/src/components/ui/editor/ihub-editor/components/TableToolbar.js +1 -1
  91. package/dist/src/components/ui/editor/ihub-editor/components/blocks/ButtonBlockView.js +2 -0
  92. package/dist/src/components/ui/editor/ihub-editor/components/blocks/ButtonBlockView.js.map +1 -0
  93. package/dist/src/components/ui/editor/ihub-editor/components/blocks/CalloutView.js +2 -0
  94. package/dist/src/components/ui/editor/ihub-editor/components/blocks/CalloutView.js.map +1 -0
  95. package/dist/src/components/ui/editor/ihub-editor/components/blocks/SectionBannerView.js +2 -0
  96. package/dist/src/components/ui/editor/ihub-editor/components/blocks/SectionBannerView.js.map +1 -0
  97. package/dist/src/components/ui/editor/ihub-editor/components/blocks/useDismiss.js +2 -0
  98. package/dist/src/components/ui/editor/ihub-editor/components/blocks/useDismiss.js.map +1 -0
  99. package/dist/src/components/ui/editor/ihub-editor/components/commandIcons.js +2 -0
  100. package/dist/src/components/ui/editor/ihub-editor/components/commandIcons.js.map +1 -0
  101. package/dist/src/components/ui/editor/ihub-editor/components/media/MediaBlockView.js +2 -0
  102. package/dist/src/components/ui/editor/ihub-editor/components/media/MediaBlockView.js.map +1 -0
  103. package/dist/src/components/ui/editor/ihub-editor/components/media/MediaPlaceholder.js +2 -0
  104. package/dist/src/components/ui/editor/ihub-editor/components/media/MediaPlaceholder.js.map +1 -0
  105. package/dist/src/components/ui/editor/ihub-editor/components/media/MediaPreview.js +2 -0
  106. package/dist/src/components/ui/editor/ihub-editor/components/media/MediaPreview.js.map +1 -0
  107. package/dist/src/components/ui/editor/ihub-editor/constants.js +1 -1
  108. package/dist/src/components/ui/editor/ihub-editor/constants.js.map +1 -1
  109. package/dist/src/components/ui/editor/ihub-editor/extensions/ButtonBlock.js +2 -0
  110. package/dist/src/components/ui/editor/ihub-editor/extensions/ButtonBlock.js.map +1 -0
  111. package/dist/src/components/ui/editor/ihub-editor/extensions/Callout.js +2 -0
  112. package/dist/src/components/ui/editor/ihub-editor/extensions/Callout.js.map +1 -0
  113. package/dist/src/components/ui/editor/ihub-editor/extensions/MediaBlock.js +2 -0
  114. package/dist/src/components/ui/editor/ihub-editor/extensions/MediaBlock.js.map +1 -0
  115. package/dist/src/components/ui/editor/ihub-editor/extensions/PreserveStyles.js +2 -0
  116. package/dist/src/components/ui/editor/ihub-editor/extensions/PreserveStyles.js.map +1 -0
  117. package/dist/src/components/ui/editor/ihub-editor/extensions/SectionBanner.js +2 -0
  118. package/dist/src/components/ui/editor/ihub-editor/extensions/SectionBanner.js.map +1 -0
  119. package/dist/src/components/ui/editor/ihub-editor/extensions/TableExtensions.js +2 -0
  120. package/dist/src/components/ui/editor/ihub-editor/extensions/TableExtensions.js.map +1 -0
  121. package/dist/src/components/ui/editor/ihub-editor/extensions/ToggleBlock.js +2 -0
  122. package/dist/src/components/ui/editor/ihub-editor/extensions/ToggleBlock.js.map +1 -0
  123. package/dist/src/components/ui/editor/ihub-editor/extensions/colorUtils.js +2 -0
  124. package/dist/src/components/ui/editor/ihub-editor/extensions/colorUtils.js.map +1 -0
  125. package/dist/src/components/ui/editor/ihub-editor/hooks/useIHubEditor.js +1 -1
  126. package/dist/src/components/ui/editor/ihub-editor/hooks/useMediaEmbed.js +1 -1
  127. package/dist/src/components/ui/editor/ihub-editor/hooks/useSurfaceClick.js +2 -0
  128. package/dist/src/components/ui/editor/ihub-editor/hooks/useSurfaceClick.js.map +1 -0
  129. package/dist/src/components/ui/editor/ihub-editor/table/TableControls.js +2 -0
  130. package/dist/src/components/ui/editor/ihub-editor/table/TableControls.js.map +1 -0
  131. package/dist/src/components/ui/editor/ihub-editor/table/TableLineMenu.js +2 -0
  132. package/dist/src/components/ui/editor/ihub-editor/table/TableLineMenu.js.map +1 -0
  133. package/dist/src/components/ui/editor/ihub-editor/table/tableOps.js +2 -0
  134. package/dist/src/components/ui/editor/ihub-editor/table/tableOps.js.map +1 -0
  135. package/dist/src/components/ui/editor/ihub-editor/table/useTableHover.js +2 -0
  136. package/dist/src/components/ui/editor/ihub-editor/table/useTableHover.js.map +1 -0
  137. package/dist/src/components/ui/editor/ihub-editor/types.js +1 -1
  138. package/dist/src/components/ui/editor/ihub-editor/types.js.map +1 -1
  139. package/dist/src/components/ui/editor/ihub-editor/upload/mediaKinds.js +2 -0
  140. package/dist/src/components/ui/editor/ihub-editor/upload/mediaKinds.js.map +1 -0
  141. package/dist/src/components/ui/editor/ihub-editor/upload/s3Direct.js +2 -0
  142. package/dist/src/components/ui/editor/ihub-editor/upload/s3Direct.js.map +1 -0
  143. package/dist/src/components/ui/editor/ihub-editor/upload/uploadFile.js +2 -0
  144. package/dist/src/components/ui/editor/ihub-editor/upload/uploadFile.js.map +1 -0
  145. package/dist/src/components/ui/editor/ihub-editor/upload/uploadRegistry.js +2 -0
  146. package/dist/src/components/ui/editor/ihub-editor/upload/uploadRegistry.js.map +1 -0
  147. package/dist/src/types/components/ui/editor/ihub-editor/IHubTextEditor.d.ts +1 -1
  148. package/dist/src/types/components/ui/editor/ihub-editor/blocks/BlockHandle.d.ts +16 -0
  149. package/dist/src/types/components/ui/editor/ihub-editor/blocks/BlockKeymap.d.ts +11 -0
  150. package/dist/src/types/components/ui/editor/ihub-editor/blocks/blockLayout.d.ts +37 -0
  151. package/dist/src/types/components/ui/editor/ihub-editor/blocks/blockOps.d.ts +45 -0
  152. package/dist/src/types/components/ui/editor/ihub-editor/blocks/useBlockDrag.d.ts +30 -0
  153. package/dist/src/types/components/ui/editor/ihub-editor/components/ColorPalette.d.ts +14 -0
  154. package/dist/src/types/components/ui/editor/ihub-editor/components/FloatingAddButton.d.ts +3 -2
  155. package/dist/src/types/components/ui/editor/ihub-editor/components/blocks/ButtonBlockView.d.ts +2 -0
  156. package/dist/src/types/components/ui/editor/ihub-editor/components/blocks/CalloutView.d.ts +2 -0
  157. package/dist/src/types/components/ui/editor/ihub-editor/components/blocks/SectionBannerView.d.ts +2 -0
  158. package/dist/src/types/components/ui/editor/ihub-editor/components/blocks/useDismiss.d.ts +3 -0
  159. package/dist/src/types/components/ui/editor/ihub-editor/components/commandIcons.d.ts +3 -0
  160. package/dist/src/types/components/ui/editor/ihub-editor/components/media/MediaBlockView.d.ts +6 -0
  161. package/dist/src/types/components/ui/editor/ihub-editor/components/media/MediaPlaceholder.d.ts +10 -0
  162. package/dist/src/types/components/ui/editor/ihub-editor/components/media/MediaPreview.d.ts +10 -0
  163. package/dist/src/types/components/ui/editor/ihub-editor/constants.d.ts +5 -1
  164. package/dist/src/types/components/ui/editor/ihub-editor/extensions/ButtonBlock.d.ts +21 -0
  165. package/dist/src/types/components/ui/editor/ihub-editor/extensions/Callout.d.ts +20 -0
  166. package/dist/src/types/components/ui/editor/ihub-editor/extensions/MediaBlock.d.ts +39 -0
  167. package/dist/src/types/components/ui/editor/ihub-editor/extensions/PreserveStyles.d.ts +6 -0
  168. package/dist/src/types/components/ui/editor/ihub-editor/extensions/SectionBanner.d.ts +15 -0
  169. package/dist/src/types/components/ui/editor/ihub-editor/extensions/TableExtensions.d.ts +14 -0
  170. package/dist/src/types/components/ui/editor/ihub-editor/extensions/ToggleBlock.d.ts +13 -0
  171. package/dist/src/types/components/ui/editor/ihub-editor/extensions/colorUtils.d.ts +14 -0
  172. package/dist/src/types/components/ui/editor/ihub-editor/hooks/useIHubEditor.d.ts +8 -2
  173. package/dist/src/types/components/ui/editor/ihub-editor/hooks/useMediaEmbed.d.ts +2 -1
  174. package/dist/src/types/components/ui/editor/ihub-editor/hooks/useSurfaceClick.d.ts +28 -0
  175. package/dist/src/types/components/ui/editor/ihub-editor/index.d.ts +1 -1
  176. package/dist/src/types/components/ui/editor/ihub-editor/table/TableControls.d.ts +9 -0
  177. package/dist/src/types/components/ui/editor/ihub-editor/table/TableLineMenu.d.ts +25 -0
  178. package/dist/src/types/components/ui/editor/ihub-editor/table/tableOps.d.ts +25 -0
  179. package/dist/src/types/components/ui/editor/ihub-editor/table/useTableHover.d.ts +25 -0
  180. package/dist/src/types/components/ui/editor/ihub-editor/types.d.ts +83 -2
  181. package/dist/src/types/components/ui/editor/ihub-editor/upload/mediaKinds.d.ts +32 -0
  182. package/dist/src/types/components/ui/editor/ihub-editor/upload/s3Direct.d.ts +5 -0
  183. package/dist/src/types/components/ui/editor/ihub-editor/upload/uploadFile.d.ts +19 -0
  184. package/dist/src/types/components/ui/editor/ihub-editor/upload/uploadRegistry.d.ts +15 -0
  185. package/dist/src/types/index.d.ts +1 -1
  186. package/dist/tsconfig.build.tsbuildinfo +1 -1
  187. package/package.json +8 -4
  188. package/dist/src/components/ui/editor/ihub-editor/extensions/ImageWithCaption.js +0 -2
  189. package/dist/src/components/ui/editor/ihub-editor/extensions/ImageWithCaption.js.map +0 -1
  190. package/dist/src/components/ui/editor/ihub-editor/hooks/useImageUpload.js +0 -2
  191. package/dist/src/components/ui/editor/ihub-editor/hooks/useImageUpload.js.map +0 -1
  192. package/dist/src/types/components/ui/editor/ihub-editor/components/ImageBlock.d.ts +0 -12
  193. package/dist/src/types/components/ui/editor/ihub-editor/extensions/ImageWithCaption.d.ts +0 -14
  194. package/dist/src/types/components/ui/editor/ihub-editor/hooks/useImageUpload.d.ts +0 -11
@@ -0,0 +1,14 @@
1
+ import { TableView } from "@tiptap/extension-table";
2
+ import type { Node as PMNode } from "@tiptap/pm/model";
3
+ /** Applies preserved attributes to the live <table> the resizable view renders. */
4
+ export declare class TableViewWithAttrs extends TableView {
5
+ /** Style properties this view set, so they can be cleared when the style changes. */
6
+ private appliedProps;
7
+ constructor(node: PMNode, cellMinWidth: number);
8
+ update(node: PMNode): boolean;
9
+ private applyAttrs;
10
+ }
11
+ export declare const IHubTable: import("@tiptap/core").Node<import("@tiptap/extension-table").TableOptions, any>;
12
+ export declare const IHubTableRow: import("@tiptap/core").Node<import("@tiptap/extension-table-row").TableRowOptions, any>;
13
+ export declare const IHubTableCell: import("@tiptap/core").Node<import("@tiptap/extension-table-cell").TableCellOptions, any>;
14
+ export declare const IHubTableHeader: import("@tiptap/core").Node<import("@tiptap/extension-table-header").TableHeaderOptions, any>;
@@ -0,0 +1,13 @@
1
+ import { Node } from "@tiptap/core";
2
+ declare module "@tiptap/core" {
3
+ interface Commands<ReturnType> {
4
+ toggleBlock: {
5
+ setToggleBlock: () => ReturnType;
6
+ };
7
+ }
8
+ }
9
+ /** Title line of a collapsible toggle. */
10
+ export declare const ToggleSummary: Node<any, any>;
11
+ /** Notion-style collapsible block, exported as native <details>. */
12
+ declare const ToggleBlock: Node<any, any>;
13
+ export default ToggleBlock;
@@ -0,0 +1,14 @@
1
+ /** Accept only plain colour values so attributes can't inject extra CSS. */
2
+ export declare function safeColor(value: unknown, fallback: string): string;
3
+ /** Split a style string on ";" outside parentheses and quotes (data: URLs contain ";base64"). */
4
+ export declare function splitDeclarations(style: string): string[];
5
+ /**
6
+ * Drop declarations that can run code, pull remote resources (tracking pixels)
7
+ * or pin content over the page (full-screen overlays).
8
+ */
9
+ export declare function sanitizeStyle(style: string | null | undefined): string | null;
10
+ /**
11
+ * Read a declaration from the raw style attribute. Unlike el.style.x this keeps
12
+ * the author's value (hex stays hex) and ignores !important.
13
+ */
14
+ export declare function readStyleValue(el: HTMLElement, property: string): string | null;
@@ -1,5 +1,6 @@
1
- import { type Extensions } from "@tiptap/core";
1
+ import { type AnyExtension, type Extensions } from "@tiptap/core";
2
2
  import { IHubEditorFeatures } from "../types";
3
+ import type { EditorUploader } from "../upload/uploadFile";
3
4
  interface UseIHubEditorOptions {
4
5
  content?: string;
5
6
  placeholder?: string;
@@ -11,6 +12,11 @@ interface UseIHubEditorOptions {
11
12
  additionalExtensions?: Extensions;
12
13
  onSlashCommandStart?: (props: any) => void;
13
14
  onSlashCommandExit?: () => void;
15
+ uploaderRef?: {
16
+ current: EditorUploader | null;
17
+ };
14
18
  }
15
- export default function useIHubEditor({ content, placeholder, charLimit, features: featuresProp, readOnly, onChange, onBlur, additionalExtensions, onSlashCommandStart, onSlashCommandExit, }: UseIHubEditorOptions): import("@tiptap/react").Editor | null;
19
+ /** Build the extension list for the enabled features. Exported for headless tests. */
20
+ export declare function buildExtensions({ placeholder, charLimit, features: featuresProp, additionalExtensions, onSlashCommandStart, onSlashCommandExit, uploaderRef, }: Omit<UseIHubEditorOptions, "content" | "readOnly" | "onChange" | "onBlur">): AnyExtension[];
21
+ export default function useIHubEditor({ content, readOnly, onChange, onBlur, ...rest }: UseIHubEditorOptions): import("@tiptap/react").Editor | null;
16
22
  export {};
@@ -3,5 +3,6 @@ interface UseMediaEmbedOptions {
3
3
  editor: Editor | null;
4
4
  enabled?: boolean;
5
5
  }
6
- export default function useMediaEmbed({ editor, enabled, }: UseMediaEmbedOptions): void;
6
+ /** Turn a pasted YouTube / Vimeo / Loom / Figma / Drive link into an embed block. */
7
+ export default function useMediaEmbed({ editor, enabled }: UseMediaEmbedOptions): void;
7
8
  export {};
@@ -0,0 +1,28 @@
1
+ import type { Editor } from "@tiptap/react";
2
+ export declare function isDragGesture(down: {
3
+ x: number;
4
+ y: number;
5
+ } | null, up: {
6
+ x: number;
7
+ y: number;
8
+ }): boolean;
9
+ /**
10
+ * Should a click on the editor area move the caret to the end?
11
+ * Only a plain click (not a drag-select) on the blank writing surface below
12
+ * the last block qualifies. Clicks on menus, toolbars, node views or text
13
+ * are left alone. The old handler treated those as "outside content" and
14
+ * called focus("end"), which made the caret jump.
15
+ */
16
+ export declare function shouldFocusEnd(options: {
17
+ target: HTMLElement;
18
+ surface: HTMLElement;
19
+ contentDom: HTMLElement;
20
+ clientY: number;
21
+ dragged: boolean;
22
+ selectionCollapsed: boolean;
23
+ }): boolean;
24
+ /** Click-below-content to continue writing, without breaking selections. */
25
+ export default function useSurfaceClick(editor: Editor | null, readOnly: boolean): {
26
+ onMouseDown: (e: React.MouseEvent) => void;
27
+ onClick: (e: React.MouseEvent<HTMLDivElement>) => void;
28
+ };
@@ -1,2 +1,2 @@
1
1
  export { default } from "./IHubTextEditor";
2
- export type { IHubTextEditorProps, IHubEditorFeatures } from "./types";
2
+ export type { IHubTextEditorProps, IHubEditorFeatures, IHubEditorUploadConfig, FileUploadHandler, FileUploadContext, UploadedFileResult, EditorPresignResult, MediaKind, } from "./types";
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import type { Editor } from "@tiptap/react";
3
+ interface TableControlsProps {
4
+ editor: Editor;
5
+ containerRef: React.RefObject<HTMLDivElement | null>;
6
+ }
7
+ /** Notion-style row/column handles and "+" bars for the table under the pointer. */
8
+ export default function TableControls({ editor, containerRef }: TableControlsProps): import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { Axis } from "./tableOps";
2
+ export interface LineMenuAction {
3
+ insertBefore: () => void;
4
+ insertAfter: () => void;
5
+ moveBefore: () => void;
6
+ moveAfter: () => void;
7
+ duplicate: () => void;
8
+ toggleHeader: () => void;
9
+ setBackground: (color: string | null) => void;
10
+ remove: () => void;
11
+ }
12
+ interface TableLineMenuProps {
13
+ axis: Axis;
14
+ index: number;
15
+ count: number;
16
+ canMove: boolean;
17
+ position: {
18
+ top: number;
19
+ left: number;
20
+ };
21
+ actions: LineMenuAction;
22
+ onClose: () => void;
23
+ }
24
+ export default function TableLineMenu({ axis, index, count, canMove, position, actions, onClose }: TableLineMenuProps): import("react/jsx-runtime").JSX.Element;
25
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { Node as PMNode } from "@tiptap/pm/model";
2
+ import type { EditorState, Transaction } from "@tiptap/pm/state";
3
+ export type Axis = "row" | "column";
4
+ export interface TableRef {
5
+ node: PMNode;
6
+ /** Position directly before the table node. */
7
+ pos: number;
8
+ }
9
+ /** Find the table node at (or wrapping) `pos`. */
10
+ export declare function findTableAt(doc: PMNode, pos: number): TableRef | null;
11
+ export declare function hasMergedCells(table: PMNode): boolean;
12
+ export declare function tableSize(table: PMNode): {
13
+ rows: number;
14
+ cols: number;
15
+ };
16
+ /** Absolute position of the cell at (row, col). */
17
+ export declare function cellPos(ref: TableRef, row: number, col: number): number;
18
+ /** Move a row or column to a new index. Returns null when not possible (merged cells / out of range). */
19
+ export declare function moveTableLine(state: EditorState, ref: TableRef, axis: Axis, from: number, to: number): Transaction | null;
20
+ /** Insert a copy of a row / column right after it. */
21
+ export declare function duplicateTableLine(state: EditorState, ref: TableRef, axis: Axis, index: number): Transaction | null;
22
+ /** Set an attribute (e.g. backgroundColor) on every cell in a row or column. */
23
+ export declare function setLineCellAttr(state: EditorState, ref: TableRef, axis: Axis, index: number, attr: string, value: unknown): Transaction;
24
+ /** Select an entire row or column so prosemirror-tables commands act on it. */
25
+ export declare function selectTableLine(state: EditorState, ref: TableRef, axis: Axis, index: number): Transaction;
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ import type { Editor } from "@tiptap/react";
3
+ export interface Box {
4
+ top: number;
5
+ left: number;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export interface TableTarget {
10
+ tablePos: number;
11
+ row: number;
12
+ col: number;
13
+ rows: number;
14
+ cols: number;
15
+ table: Box;
16
+ cell: Box;
17
+ }
18
+ /** Resolve the table / row / column under a DOM cell. */
19
+ export declare function targetFromCell(editor: Editor, cellEl: HTMLElement, container: HTMLElement): TableTarget | null;
20
+ /** Track which table cell the pointer (or caret) is on. `freeze` pins the target while a menu is open. */
21
+ export default function useTableHover(editor: Editor, containerRef: React.RefObject<HTMLDivElement | null>, freeze: boolean): {
22
+ target: TableTarget | null;
23
+ setTarget: import("react").Dispatch<import("react").SetStateAction<TableTarget | null>>;
24
+ cancelHide: () => void;
25
+ };
@@ -1,4 +1,65 @@
1
1
  import { Extension } from "@tiptap/react";
2
+ import type { AnyExtension } from "@tiptap/core";
3
+ /** Kinds of uploadable / embeddable media blocks. */
4
+ export type MediaKind = "image" | "video" | "audio" | "pdf" | "file" | "embed";
5
+ /** What an upload handler resolves with. A bare string is treated as the URL. */
6
+ export interface UploadedFileResult {
7
+ url: string;
8
+ name?: string;
9
+ size?: number;
10
+ mime?: string;
11
+ }
12
+ export interface FileUploadContext {
13
+ kind: MediaKind;
14
+ /** Report upload progress (0–100). Optional for handlers that can't track it. */
15
+ onProgress: (percent: number) => void;
16
+ }
17
+ export type FileUploadHandler = (file: File, context: FileUploadContext) => Promise<string | UploadedFileResult>;
18
+ /** Response expected from a presign endpoint (same shape as S3MultiUploader). */
19
+ export interface EditorPresignResult {
20
+ /** Short-lived presigned PUT URL. */
21
+ url: string;
22
+ /** Public / CDN URL the file will be served from. */
23
+ cdnUrl: string;
24
+ key?: string;
25
+ /** Server-validated content type for the PUT. */
26
+ contentType?: string;
27
+ /** Extra headers covered by the signature (e.g. x-amz-acl). */
28
+ headers?: Record<string, string>;
29
+ }
30
+ /**
31
+ * Upload configuration. Resolution order when a file is added:
32
+ * 1. `onFileUpload` prop (or `onImageUpload` for images)
33
+ * 2. `getPresignedUrl` / `presignEndpoint` / NEXT_PUBLIC_IHUB_EDITOR_PRESIGN_URL
34
+ * 3. `endpoint` / NEXT_PUBLIC_IHUB_EDITOR_UPLOAD_URL (multipart POST, Leadboard style)
35
+ * 4. Direct S3 using the NEXT_PUBLIC_AWS_* variables FileUploader already uses —
36
+ * opt-in only (`directS3: true` or NEXT_PUBLIC_IHUB_EDITOR_DIRECT_S3=true),
37
+ * because the secret key ships to the browser.
38
+ */
39
+ export interface IHubEditorUploadConfig {
40
+ /** Bearer token sent with presign / endpoint requests via reqOptions. */
41
+ token?: string | null;
42
+ /** Channel id header, forwarded to reqOptions. */
43
+ channel?: string | null;
44
+ getPresignedUrl?: (file: File, kind: MediaKind) => Promise<EditorPresignResult>;
45
+ /** POST {filename, content_type, size, kind} → EditorPresignResult. */
46
+ presignEndpoint?: string;
47
+ /** POST multipart form; JSON response must contain a URL field. */
48
+ endpoint?: string;
49
+ /** Multipart field name for the file (default "file"). */
50
+ fieldName?: string;
51
+ /** Extra multipart fields sent with the file. */
52
+ extraFields?: Record<string, string>;
53
+ /**
54
+ * Opt in to direct browser → S3 uploads with the NEXT_PUBLIC_AWS_* keys.
55
+ * Defaults to NEXT_PUBLIC_IHUB_EDITOR_DIRECT_S3 === "true". Prefer a presign endpoint.
56
+ */
57
+ directS3?: boolean;
58
+ /** Folder/prefix for direct S3 uploads (default NEXT_PUBLIC_IHUB_EDITOR_S3_FOLDER or "editor"). */
59
+ s3Folder?: string;
60
+ /** Max upload size per kind in MB. */
61
+ maxSizeMB?: Partial<Record<MediaKind, number>>;
62
+ }
2
63
  export interface IHubTextEditorProps {
3
64
  name?: string;
4
65
  label?: string;
@@ -9,26 +70,42 @@ export interface IHubTextEditorProps {
9
70
  required?: boolean;
10
71
  charLimit?: number;
11
72
  features?: IHubEditorFeatures;
73
+ /** Legacy image-only upload handler. Prefer `onFileUpload`. */
12
74
  onImageUpload?: (file: File) => Promise<string>;
75
+ /** Upload handler used for image, video, audio, PDF and file blocks. */
76
+ onFileUpload?: FileUploadHandler;
77
+ /** Built-in upload strategies (presign, endpoint, env-driven S3). */
78
+ upload?: IHubEditorUploadConfig;
13
79
  className?: string;
14
80
  minHeight?: string;
15
81
  maxHeight?: string;
16
82
  lastUpdated?: string;
17
83
  readOnly?: boolean;
18
- extensions?: Extension[];
84
+ extensions?: Array<Extension | AnyExtension>;
19
85
  }
20
86
  export interface IHubEditorFeatures {
21
87
  bubbleMenu?: boolean;
22
88
  slashCommands?: boolean;
23
89
  floatingAddButton?: boolean;
90
+ /** Hover handle on every block: drag to reorder, "+" to add a line, click for options. */
24
91
  dragHandle?: boolean;
25
92
  focusMode?: boolean;
26
93
  imageUpload?: boolean;
94
+ /** Video, audio, PDF and file blocks. */
95
+ fileUploads?: boolean;
27
96
  mediaEmbeds?: boolean;
28
97
  tables?: boolean;
29
98
  codeBlocks?: boolean;
30
99
  taskLists?: boolean;
31
100
  pullQuotes?: boolean;
101
+ /** Section banners with configurable background/text colour. */
102
+ banners?: boolean;
103
+ callouts?: boolean;
104
+ toggles?: boolean;
105
+ /** Call-to-action button blocks. */
106
+ buttons?: boolean;
107
+ /** Keep inline styles and email-table attributes from pasted / loaded HTML. */
108
+ preserveStyles?: boolean;
32
109
  characterCount?: boolean;
33
110
  typography?: boolean;
34
111
  }
@@ -36,9 +113,13 @@ export interface SlashCommandItem {
36
113
  title: string;
37
114
  description: string;
38
115
  icon: string;
116
+ /** Extra search terms. */
117
+ keywords?: string[];
118
+ /** Feature flag that must be on for the command to show. */
119
+ feature?: keyof IHubEditorFeatures;
39
120
  command: (props: {
40
121
  editor: any;
41
- range: any;
122
+ range?: any;
42
123
  }) => void;
43
124
  }
44
125
  export interface LinkPopoverState {
@@ -0,0 +1,32 @@
1
+ import type { MediaKind } from "../types";
2
+ export declare const ACCEPT_BY_KIND: Record<MediaKind, string>;
3
+ export declare const DEFAULT_MAX_SIZE_MB: Record<MediaKind, number>;
4
+ export declare const KIND_LABEL: Record<MediaKind, string>;
5
+ /** Pick the block kind that best displays a file. */
6
+ export declare function kindFromMime(mime: string, fileName?: string): MediaKind;
7
+ /** Guess a kind from a pasted URL's extension (used for "Embed link"). */
8
+ export declare function kindFromUrl(url: string, fallback: MediaKind): MediaKind;
9
+ export declare function formatBytes(bytes?: number | null): string;
10
+ export declare function fileExtension(name?: string | null): string;
11
+ export declare function fileNameFromUrl(url: string): string;
12
+ /** Convert a known provider URL into its embeddable iframe URL, or null. */
13
+ export declare function toEmbedUrl(url: string): string | null;
14
+ /** Embeds are limited to known providers so pasted HTML can't frame arbitrary sites. */
15
+ export declare function isAllowedEmbed(url: string): boolean;
16
+ /** Accept only plain widths (e.g. "60%", "480px") so the attribute can't inject CSS. */
17
+ export declare function safeWidth(value: unknown): string | null;
18
+ /** Only allow http(s) and site-relative URLs into src/href attributes. */
19
+ export declare function isSafeUrl(url?: string | null): boolean;
20
+ /** Provider players need scripts + same-origin; forms and top navigation stay blocked. */
21
+ export declare const EMBED_SANDBOX = "allow-scripts allow-same-origin allow-presentation allow-popups";
22
+ /** The src to render for a media block, or "" when it isn't allowed for that kind. */
23
+ export declare function renderableSrc(attrs: {
24
+ kind: MediaKind;
25
+ src?: string | null;
26
+ }): string;
27
+ /**
28
+ * PDFs get an inline viewer only when the URL is really a .pdf (or a local blob).
29
+ * Chrome won't render PDFs in a sandboxed iframe, so this check is what stops a
30
+ * "PDF" block from framing an arbitrary page; other URLs render as a download card.
31
+ */
32
+ export declare function isInlinePdf(src: string): boolean;
@@ -0,0 +1,5 @@
1
+ import type { UploadedFileResult } from "../types";
2
+ export declare function isDirectS3Configured(): boolean;
3
+ export declare function publicUrlForKey(key: string): string;
4
+ export declare function buildObjectKey(fileName: string, folder?: string): string;
5
+ export declare function directS3Upload(file: File, folder?: string, onProgress?: (percent: number) => void): Promise<UploadedFileResult>;
@@ -0,0 +1,19 @@
1
+ import type { FileUploadHandler, IHubEditorUploadConfig, MediaKind, UploadedFileResult } from "../types";
2
+ export type EditorUploader = (file: File, kind: MediaKind, onProgress?: (percent: number) => void) => Promise<UploadedFileResult>;
3
+ export interface UploaderSources {
4
+ onFileUpload?: FileUploadHandler;
5
+ onImageUpload?: (file: File) => Promise<string>;
6
+ upload?: IHubEditorUploadConfig;
7
+ }
8
+ export declare class UploadNotConfiguredError extends Error {
9
+ constructor();
10
+ }
11
+ /** Find the uploaded file's URL in an arbitrary API response. */
12
+ export declare function extractUrl(payload: unknown): string | null;
13
+ export declare function validateFileSize(file: File, kind: MediaKind, config?: IHubEditorUploadConfig): void;
14
+ /** XHR wrapper so uploads can report real progress. */
15
+ export declare function sendWithProgress(method: string, url: string, body: Document | XMLHttpRequestBodyInit, headers: Record<string, string>, onProgress?: (percent: number) => void): Promise<string>;
16
+ /** Build the uploader used by every media block, following the documented resolution order. */
17
+ export declare function createUploader(sources: UploaderSources): EditorUploader;
18
+ /** True when at least one upload strategy is available. */
19
+ export declare function canUpload(sources: UploaderSources, kind: MediaKind): boolean;
@@ -0,0 +1,15 @@
1
+ import type { Editor } from "@tiptap/core";
2
+ import type { MediaKind } from "../types";
3
+ import type { EditorUploader } from "./uploadFile";
4
+ export interface UploadStatus {
5
+ progress: number;
6
+ name: string;
7
+ preview: string | null;
8
+ error?: string;
9
+ }
10
+ export declare function newUploadId(): string;
11
+ export declare function getUpload(id?: string | null): UploadStatus | undefined;
12
+ export declare function subscribeUpload(id: string, listener: (status: UploadStatus) => void): () => void;
13
+ /** Merge attrs into the media node carrying this pendingId, wherever it now is. */
14
+ export declare function patchMediaNode(editor: Editor, id: string, attrs: Record<string, unknown>): boolean;
15
+ export declare function beginUpload(editor: Editor, id: string, file: File, kind: MediaKind, uploader: EditorUploader): void;
@@ -73,7 +73,7 @@ export { default as S3MultiUploader } from "./components/forms/uploads/S3MultiUp
73
73
  export type { S3UploadResponseType, S3MultiUploaderProps, PresignedUploadResult } from "./types";
74
74
  export { default as CustomTextEditor } from "./components/ui/editor/CustomTextEditor";
75
75
  export { default as IHubTextEditor } from "./components/ui/editor/ihub-editor";
76
- export type { IHubTextEditorProps, IHubEditorFeatures } from "./components/ui/editor/ihub-editor";
76
+ export type { IHubTextEditorProps, IHubEditorFeatures, IHubEditorUploadConfig, FileUploadHandler, FileUploadContext, UploadedFileResult, EditorPresignResult, MediaKind, } from "./components/ui/editor/ihub-editor";
77
77
  export { default as ContentViewer } from "./components/ui/viewer/ContentViewer";
78
78
  export { default as ContentViewOrEdit } from "./components/ui/viewer/ContentViewOrEdit";
79
79
  export { default as CodeDisplay } from "./components/ui/viewer/CodeDisplay";