betterstart-cli 0.0.97 → 0.0.98

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 (270) hide show
  1. package/dist/assets/adapters/next/integrations/mailchimp/integration.ts +1 -1
  2. package/dist/assets/adapters/next/integrations/r2/actions/r2.ts +1 -1
  3. package/dist/assets/adapters/next/integrations/r2/integration.ts +1 -1
  4. package/dist/assets/adapters/next/integrations/railway-bucket/actions/railway-bucket.ts +1 -1
  5. package/dist/assets/adapters/next/integrations/railway-bucket/integration.ts +1 -1
  6. package/dist/assets/adapters/next/integrations/resend/integration.ts +1 -1
  7. package/dist/assets/adapters/next/integrations/vercel-blob/actions/vercel-blob.ts +1 -1
  8. package/dist/assets/adapters/next/integrations/vercel-blob/integration.ts +1 -1
  9. package/dist/assets/adapters/next/presets/blog/preset.ts +1 -1
  10. package/dist/assets/adapters/next/presets/portfolio/preset.ts +1 -1
  11. package/dist/assets/adapters/next/templates/init/api/storage-read-route.ts +2 -1
  12. package/dist/assets/adapters/next/templates/init/api/upload-route.ts +3 -2
  13. package/dist/assets/adapters/next/templates/init/components/layouts/admin-providers.tsx +1 -1
  14. package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar-nav-link-skeleton.tsx +1 -1
  15. package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar.tsx +1 -1
  16. package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-grid.tsx +1 -1
  17. package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-table-pagination.tsx +2 -2
  18. package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-table.tsx +2 -5
  19. package/dist/assets/adapters/next/templates/init/components/shared/delete-dialog.tsx +1 -1
  20. package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/copyable-code-block.tsx +2 -2
  21. package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/dev-mode-code-mirror.tsx +2 -2
  22. package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/lifecycle-hooks-tab.tsx +7 -17
  23. package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/snippets-tab.tsx +3 -13
  24. package/dist/assets/adapters/next/templates/init/components/shared/dev-mode-integrate.tsx +4 -4
  25. package/dist/assets/adapters/next/templates/init/components/shared/entity-filters-bar.tsx +1 -1
  26. package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-version-restore-dialog.tsx +1 -1
  27. package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-versions-button.tsx +1 -1
  28. package/dist/assets/adapters/next/templates/init/components/shared/media/edit-media-dialog-content.tsx +2 -2
  29. package/dist/assets/adapters/next/templates/init/components/shared/media/edit-media-dialog.tsx +2 -2
  30. package/dist/assets/adapters/next/templates/init/components/shared/media/media-delete-dialog.tsx +2 -2
  31. package/dist/assets/adapters/next/templates/init/components/shared/media/media-delete-drawer.tsx +2 -2
  32. package/dist/assets/adapters/next/templates/init/components/shared/media/media-filters-bar.tsx +2 -2
  33. package/dist/assets/adapters/next/templates/init/components/shared/media/media-gallery-dialog.tsx +2 -2
  34. package/dist/assets/adapters/next/templates/init/components/shared/media/media-grid-item.tsx +2 -2
  35. package/dist/assets/adapters/next/templates/init/components/shared/media/media-grid-pagination.tsx +1 -1
  36. package/dist/assets/adapters/next/templates/init/components/shared/media/media-grid.tsx +1 -1
  37. package/dist/assets/adapters/next/templates/init/components/shared/media/media-preview.tsx +1 -1
  38. package/dist/assets/adapters/next/templates/init/components/shared/media/media-url-importer.tsx +2 -2
  39. package/dist/assets/adapters/next/templates/init/components/shared/search-input.tsx +1 -1
  40. package/dist/assets/adapters/next/templates/init/components/shared/sort-order-dialog.tsx +3 -4
  41. package/dist/assets/adapters/next/templates/init/components/shared/sort-order-item.tsx +1 -1
  42. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-blockquote.ts +1 -70
  43. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-code-block.ts +1 -77
  44. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-color-highlight.ts +3 -51
  45. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-media-insertion.ts +2 -2
  46. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-slash-menu.ts +6 -8
  47. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-source-mode.tsx +10 -8
  48. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-table-add-controls.ts +4 -4
  49. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor.ts +7 -4
  50. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-heading-dropdown-menu.ts +3 -66
  51. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-heading.ts +1 -41
  52. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-is-breakpoint.ts +0 -8
  53. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-link-popover.ts +1 -83
  54. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-list-dropdown-menu.ts +3 -61
  55. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-list.ts +1 -43
  56. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-mark.ts +1 -72
  57. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-menu-navigation.ts +0 -35
  58. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-table-button.ts +2 -2
  59. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-tiptap-editor.ts +0 -11
  60. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-undo-redo.ts +1 -65
  61. package/dist/assets/adapters/next/templates/init/hooks/use-admin-theme.tsx +2 -4
  62. package/dist/assets/adapters/next/templates/init/hooks/use-dev-mode-integration.ts +1 -1
  63. package/dist/assets/adapters/next/templates/init/hooks/use-entity-versions.ts +1 -1
  64. package/dist/assets/adapters/next/templates/init/hooks/use-local-storage.ts +2 -7
  65. package/dist/assets/adapters/next/templates/init/hooks/use-media-filters-bar.ts +1 -1
  66. package/dist/assets/adapters/next/templates/init/hooks/use-media.ts +2 -2
  67. package/dist/assets/adapters/next/templates/init/hooks/use-page-boundary-blur-visibility.ts +1 -1
  68. package/dist/assets/adapters/next/templates/init/hooks/use-page-scroll-threshold.ts +1 -1
  69. package/dist/assets/adapters/next/templates/init/hooks/use-table-utils.ts +2 -2
  70. package/dist/assets/adapters/next/templates/init/hooks/use-upload.ts +6 -12
  71. package/dist/assets/adapters/next/templates/init/hooks/use-users.ts +1 -1
  72. package/dist/assets/adapters/next/templates/init/hooks/use-webhooks.ts +3 -2
  73. package/dist/assets/adapters/next/templates/init/lib/actions/audit/cleanup-audit-logs.ts +1 -1
  74. package/dist/assets/adapters/next/templates/init/lib/actions/audit/get-audit-logs.ts +1 -1
  75. package/dist/assets/adapters/next/templates/init/lib/actions/audit/record-audit-event.ts +1 -1
  76. package/dist/assets/adapters/next/templates/init/lib/actions/auth/auth.ts +4 -4
  77. package/dist/assets/adapters/next/templates/init/lib/actions/auth/middleware.ts +2 -10
  78. package/dist/assets/adapters/next/templates/init/lib/actions/email/form-delivery.ts +2 -2
  79. package/dist/assets/adapters/next/templates/init/lib/actions/email/provider.ts +1 -1
  80. package/dist/assets/adapters/next/templates/init/lib/actions/entity-versions/get-entity-versions.ts +1 -1
  81. package/dist/assets/adapters/next/templates/init/lib/actions/entity-versions/internal-create-entity-version.ts +1 -1
  82. package/dist/assets/adapters/next/templates/init/lib/actions/forms/get-all-form-settings.ts +1 -1
  83. package/dist/assets/adapters/next/templates/init/lib/actions/forms/get-form-settings.ts +1 -1
  84. package/dist/assets/adapters/next/templates/init/lib/actions/forms/upsert-form-settings.ts +1 -1
  85. package/dist/assets/adapters/next/templates/init/lib/actions/media/create-media.ts +2 -1
  86. package/dist/assets/adapters/next/templates/init/lib/actions/media/delete-media-bulk.ts +1 -1
  87. package/dist/assets/adapters/next/templates/init/lib/actions/media/delete-media.ts +1 -1
  88. package/dist/assets/adapters/next/templates/init/lib/actions/media/get-media-by-id.ts +1 -1
  89. package/dist/assets/adapters/next/templates/init/lib/actions/media/get-media-by-ids.ts +1 -1
  90. package/dist/assets/adapters/next/templates/init/lib/actions/media/get-media.ts +1 -1
  91. package/dist/assets/adapters/next/templates/init/lib/actions/media/update-media.ts +1 -1
  92. package/dist/assets/adapters/next/templates/init/lib/actions/profile/change-own-password.ts +1 -1
  93. package/dist/assets/adapters/next/templates/init/lib/actions/profile/update-email.ts +1 -1
  94. package/dist/assets/adapters/next/templates/init/lib/actions/storage/provider.ts +1 -1
  95. package/dist/assets/adapters/next/templates/init/lib/actions/upload/upload-files.ts +2 -2
  96. package/dist/assets/adapters/next/templates/init/lib/actions/upload/upload-media-from-url.ts +1 -1
  97. package/dist/assets/adapters/next/templates/init/lib/actions/users/change-user-password.ts +1 -1
  98. package/dist/assets/adapters/next/templates/init/lib/actions/users/create-user.ts +1 -1
  99. package/dist/assets/adapters/next/templates/init/lib/actions/users/delete-user.ts +1 -1
  100. package/dist/assets/adapters/next/templates/init/lib/actions/users/get-users.ts +1 -1
  101. package/dist/assets/adapters/next/templates/init/lib/actions/users/update-user-role.ts +1 -1
  102. package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/create-webhook.ts +1 -1
  103. package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/delete-webhook.ts +1 -1
  104. package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/dispatch.ts +1 -2
  105. package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhook-deliveries.ts +1 -1
  106. package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhook-secret.ts +1 -1
  107. package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhook-subscriptions.ts +1 -1
  108. package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhooks.ts +1 -1
  109. package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/regenerate-webhook-secret.ts +1 -1
  110. package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/register.ts +2 -2
  111. package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/send-test-webhook.ts +1 -1
  112. package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/update-webhook.ts +1 -1
  113. package/dist/assets/adapters/next/templates/init/lib/db/client.ts +1 -1
  114. package/dist/assets/adapters/next/templates/init/lib/db/core/schema.ts +0 -24
  115. package/dist/assets/adapters/next/templates/init/lib/lifecycle-hooks/register.ts +0 -7
  116. package/dist/assets/adapters/next/templates/init/lib/lifecycle-hooks/runner.ts +1 -1
  117. package/dist/assets/adapters/next/templates/init/pages/forgot-password-form.tsx +1 -1
  118. package/dist/assets/adapters/next/templates/init/pages/login-form.tsx +1 -1
  119. package/dist/assets/adapters/next/templates/init/pages/media/media-page-content.tsx +4 -4
  120. package/dist/assets/adapters/next/templates/init/pages/profile/profile-form.tsx +1 -1
  121. package/dist/assets/adapters/next/templates/init/pages/reset-password-form.tsx +1 -1
  122. package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-columns.tsx +1 -1
  123. package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page-content.tsx +1 -1
  124. package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page.tsx +1 -1
  125. package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-table.tsx +3 -2
  126. package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page-content.tsx +3 -2
  127. package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page.tsx +1 -1
  128. package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-table.tsx +4 -3
  129. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhook-endpoint-dialog.tsx +1 -1
  130. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-columns.tsx +1 -1
  131. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-columns.tsx +1 -1
  132. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page-content.tsx +1 -1
  133. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page.tsx +1 -1
  134. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-table.tsx +2 -1
  135. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-page-content.tsx +1 -1
  136. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-page.tsx +1 -1
  137. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-table.tsx +2 -1
  138. package/dist/assets/adapters/next/templates/init/pages/users/change-password-dialog.tsx +1 -1
  139. package/dist/assets/adapters/next/templates/init/pages/users/columns.tsx +3 -2
  140. package/dist/assets/adapters/next/templates/init/pages/users/create-user-dialog.tsx +1 -1
  141. package/dist/assets/adapters/next/templates/init/pages/users/delete-user-dialog.tsx +1 -1
  142. package/dist/assets/adapters/next/templates/init/pages/users/edit-role-dialog.tsx +1 -1
  143. package/dist/assets/adapters/next/templates/init/pages/users/users-page-content.tsx +2 -1
  144. package/dist/assets/adapters/next/templates/init/pages/users/users-table.tsx +4 -3
  145. package/dist/assets/adapters/next/templates/init/types/index.ts +0 -5
  146. package/dist/assets/adapters/next/templates/init/utils/date/date.ts +1 -6
  147. package/dist/assets/adapters/next/templates/init/utils/editor/content-editor-rich-extensions.ts +2 -2
  148. package/dist/assets/adapters/next/templates/init/utils/editor/markdown.ts +5 -5
  149. package/dist/assets/adapters/next/templates/init/utils/editor/slash-commands.ts +2 -2
  150. package/dist/assets/adapters/next/templates/init/utils/editor/table-add-controls.ts +1 -1
  151. package/dist/assets/adapters/next/templates/init/utils/editor/tiptap.ts +8 -127
  152. package/dist/assets/adapters/next/templates/init/utils/media/query.ts +1 -1
  153. package/dist/assets/adapters/next/templates/init/utils/seo/seo.ts +0 -10
  154. package/dist/assets/adapters/next/templates/init/utils/shared/cn.ts +2 -1
  155. package/dist/assets/adapters/next/templates/init/utils/validation/validation.ts +0 -12
  156. package/dist/assets/shared-assets/react-admin/custom/content-editor/editor-toolbar.tsx +1 -1
  157. package/dist/assets/shared-assets/react-admin/custom/content-editor/horizontal-rule-button.tsx +1 -1
  158. package/dist/assets/shared-assets/react-admin/custom/content-editor/index.tsx +1 -1
  159. package/dist/assets/shared-assets/react-admin/custom/content-editor/main-toolbar-content.tsx +1 -1
  160. package/dist/assets/shared-assets/react-admin/custom/content-editor/math-bubble-menu.tsx +2 -2
  161. package/dist/assets/shared-assets/react-admin/custom/content-editor/math-button.tsx +1 -1
  162. package/dist/assets/shared-assets/react-admin/custom/content-editor/math-editor-controls.tsx +1 -1
  163. package/dist/assets/shared-assets/react-admin/custom/content-editor/math-popover-button.tsx +4 -3
  164. package/dist/assets/shared-assets/react-admin/custom/content-editor/remove-table-part-icon.tsx +1 -1
  165. package/dist/assets/shared-assets/react-admin/custom/content-editor/selection-bubble-menu.tsx +2 -2
  166. package/dist/assets/shared-assets/react-admin/custom/content-editor/slash-command-menu.tsx +3 -3
  167. package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode-dropdown-button.tsx +1 -1
  168. package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode.tsx +5 -11
  169. package/dist/assets/shared-assets/react-admin/custom/content-editor/table-add-controls.tsx +1 -1
  170. package/dist/assets/shared-assets/react-admin/custom/content-editor/table-bubble-menu.tsx +3 -3
  171. package/dist/assets/shared-assets/react-admin/custom/content-editor/table-button.tsx +1 -1
  172. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-extension/node-background-extension.ts +2 -25
  173. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-node/media-gallery-placeholder-node/media-gallery-placeholder-node-extension.ts +0 -20
  174. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-node/media-gallery-placeholder-node/media-gallery-placeholder-node.tsx +2 -2
  175. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-node/removable-image-node/removable-image-node.tsx +3 -3
  176. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/blockquote-button/blockquote-button.tsx +3 -18
  177. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/code-block-button/code-block-button.tsx +3 -18
  178. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-button/color-highlight-button.tsx +2 -37
  179. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover-button.tsx +3 -5
  180. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover-content.tsx +3 -9
  181. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx +6 -12
  182. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/highlight-color-button.tsx +2 -2
  183. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/highlight-colors.ts +2 -4
  184. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/source-color-highlight-popover.tsx +4 -9
  185. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu-item.tsx +3 -2
  186. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.tsx +4 -19
  187. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-button.tsx +3 -5
  188. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-content.tsx +1 -1
  189. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-control-popover.tsx +5 -3
  190. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-main.tsx +1 -13
  191. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-popover.tsx +5 -16
  192. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/list-dropdown-menu/list-dropdown-menu-item.tsx +3 -2
  193. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/list-dropdown-menu/list-dropdown-menu.tsx +4 -19
  194. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/mark-button/mark-button.tsx +3 -19
  195. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/undo-redo-button/undo-redo-button.tsx +3 -19
  196. package/dist/assets/shared-assets/react-admin/custom/date-picker.tsx +1 -3
  197. package/dist/assets/shared-assets/react-admin/custom/date-range-picker.tsx +2 -2
  198. package/dist/assets/shared-assets/react-admin/custom/gallery-field.tsx +5 -10
  199. package/dist/assets/shared-assets/react-admin/custom/icon-picker.tsx +7 -4
  200. package/dist/assets/shared-assets/react-admin/custom/media-field-empty-state.tsx +1 -1
  201. package/dist/assets/shared-assets/react-admin/custom/media-field.tsx +2 -2
  202. package/dist/assets/shared-assets/react-admin/custom/nested-object-list-field.tsx +1 -1
  203. package/dist/assets/shared-assets/react-admin/custom/placeholder-card.tsx +1 -1
  204. package/dist/assets/shared-assets/react-admin/custom/placeholder.tsx +1 -1
  205. package/dist/assets/shared-assets/react-admin/custom/progressive-blur.tsx +1 -1
  206. package/dist/assets/shared-assets/react-admin/custom/sortable-gallery-item.tsx +1 -1
  207. package/dist/assets/shared-assets/react-admin/custom/upload-dropzone.tsx +2 -2
  208. package/dist/assets/shared-assets/react-admin/ui/accordion.tsx +1 -1
  209. package/dist/assets/shared-assets/react-admin/ui/alert-dialog.tsx +1 -1
  210. package/dist/assets/shared-assets/react-admin/ui/alert.tsx +3 -2
  211. package/dist/assets/shared-assets/react-admin/ui/avatar.tsx +1 -1
  212. package/dist/assets/shared-assets/react-admin/ui/badge.tsx +3 -2
  213. package/dist/assets/shared-assets/react-admin/ui/breadcrumb.tsx +1 -1
  214. package/dist/assets/shared-assets/react-admin/ui/button-group.tsx +2 -1
  215. package/dist/assets/shared-assets/react-admin/ui/button.tsx +3 -2
  216. package/dist/assets/shared-assets/react-admin/ui/calendar.tsx +3 -2
  217. package/dist/assets/shared-assets/react-admin/ui/card.tsx +1 -1
  218. package/dist/assets/shared-assets/react-admin/ui/carousel.tsx +3 -2
  219. package/dist/assets/shared-assets/react-admin/ui/chart.tsx +1 -2
  220. package/dist/assets/shared-assets/react-admin/ui/checkbox.tsx +1 -1
  221. package/dist/assets/shared-assets/react-admin/ui/combobox.tsx +1 -1
  222. package/dist/assets/shared-assets/react-admin/ui/command.tsx +1 -1
  223. package/dist/assets/shared-assets/react-admin/ui/context-menu.tsx +1 -1
  224. package/dist/assets/shared-assets/react-admin/ui/dialog.tsx +1 -1
  225. package/dist/assets/shared-assets/react-admin/ui/direction.tsx +1 -1
  226. package/dist/assets/shared-assets/react-admin/ui/drawer.tsx +1 -1
  227. package/dist/assets/shared-assets/react-admin/ui/dropdown-menu.tsx +1 -1
  228. package/dist/assets/shared-assets/react-admin/ui/empty.tsx +2 -1
  229. package/dist/assets/shared-assets/react-admin/ui/field.tsx +2 -1
  230. package/dist/assets/shared-assets/react-admin/ui/form.tsx +4 -10
  231. package/dist/assets/shared-assets/react-admin/ui/hover-card.tsx +1 -1
  232. package/dist/assets/shared-assets/react-admin/ui/input-group.tsx +3 -2
  233. package/dist/assets/shared-assets/react-admin/ui/input-otp.tsx +1 -1
  234. package/dist/assets/shared-assets/react-admin/ui/input.tsx +1 -1
  235. package/dist/assets/shared-assets/react-admin/ui/item.tsx +3 -2
  236. package/dist/assets/shared-assets/react-admin/ui/label.tsx +1 -1
  237. package/dist/assets/shared-assets/react-admin/ui/menubar.tsx +1 -1
  238. package/dist/assets/shared-assets/react-admin/ui/native-select.tsx +1 -1
  239. package/dist/assets/shared-assets/react-admin/ui/navigation-menu.tsx +1 -1
  240. package/dist/assets/shared-assets/react-admin/ui/pagination.tsx +1 -1
  241. package/dist/assets/shared-assets/react-admin/ui/popover.tsx +1 -1
  242. package/dist/assets/shared-assets/react-admin/ui/progress.tsx +1 -1
  243. package/dist/assets/shared-assets/react-admin/ui/radio-group.tsx +1 -1
  244. package/dist/assets/shared-assets/react-admin/ui/resizable.tsx +1 -1
  245. package/dist/assets/shared-assets/react-admin/ui/scroll-area.tsx +1 -1
  246. package/dist/assets/shared-assets/react-admin/ui/select.tsx +1 -1
  247. package/dist/assets/shared-assets/react-admin/ui/separator.tsx +1 -1
  248. package/dist/assets/shared-assets/react-admin/ui/sheet.tsx +1 -1
  249. package/dist/assets/shared-assets/react-admin/ui/sidebar.tsx +3 -10
  250. package/dist/assets/shared-assets/react-admin/ui/slider.tsx +1 -1
  251. package/dist/assets/shared-assets/react-admin/ui/sonner.tsx +2 -1
  252. package/dist/assets/shared-assets/react-admin/ui/switch.tsx +1 -1
  253. package/dist/assets/shared-assets/react-admin/ui/table.tsx +1 -1
  254. package/dist/assets/shared-assets/react-admin/ui/tabs.tsx +3 -2
  255. package/dist/assets/shared-assets/react-admin/ui/textarea.tsx +1 -1
  256. package/dist/assets/shared-assets/react-admin/ui/toggle-group.tsx +2 -2
  257. package/dist/assets/shared-assets/react-admin/ui/toggle.tsx +3 -2
  258. package/dist/assets/shared-assets/react-admin/ui/tooltip.tsx +1 -1
  259. package/dist/{chunk-MJWUGEMK.js → chunk-AIQWGMU7.js} +136 -5
  260. package/dist/chunk-AIQWGMU7.js.map +1 -0
  261. package/dist/cli.js +1097 -1194
  262. package/dist/cli.js.map +1 -1
  263. package/dist/index.d.ts +1 -1
  264. package/dist/index.js +1 -1
  265. package/dist/index.js.map +1 -1
  266. package/dist/{template-reader-R2JIWUNK.js → template-reader-F2VFSDKV.js} +2 -2
  267. package/package.json +3 -3
  268. package/dist/assets/shared-assets/react-admin/dependencies.ts +0 -74
  269. package/dist/chunk-MJWUGEMK.js.map +0 -1
  270. /package/dist/{template-reader-R2JIWUNK.js.map → template-reader-F2VFSDKV.js.map} +0 -0
@@ -1,7 +1,7 @@
1
- import { getSelectedNodesOfType, updateNodesAttr } from '@admin/utils/editor/tiptap'
2
1
  import type { NodeWithPos } from '@tiptap/core'
3
- import { Extension } from '@tiptap/core'
4
2
  import type { EditorState, Transaction } from '@tiptap/pm/state'
3
+ import { getSelectedNodesOfType, updateNodesAttr } from '@admin/utils/editor/tiptap'
4
+ import { Extension } from '@tiptap/core'
5
5
 
6
6
  declare module '@tiptap/core' {
7
7
  interface Commands<ReturnType> {
@@ -14,21 +14,10 @@ declare module '@tiptap/core' {
14
14
  }
15
15
 
16
16
  export interface NodeBackgroundOptions {
17
- /**
18
- * Node types that should support background colors
19
- * @default ["paragraph", "heading", "blockquote", "taskList", "bulletList", "orderedList", "tableCell", "tableHeader"]
20
- */
21
17
  types: string[]
22
- /**
23
- * Use inline style instead of data attribute
24
- * @default true
25
- */
26
18
  useStyle?: boolean
27
19
  }
28
20
 
29
- /**
30
- * Determines the target color for toggle operations
31
- */
32
21
  function getToggleColor(targets: NodeWithPos[], inputColor: string): string | null {
33
22
  if (targets.length === 0) return null
34
23
 
@@ -98,9 +87,6 @@ export const NodeBackground = Extension.create<NodeBackgroundOptions>({
98
87
  },
99
88
 
100
89
  addCommands() {
101
- /**
102
- * Generic command executor for background color operations
103
- */
104
90
  const executeBackgroundCommand = (
105
91
  getTargetColor: (targets: NodeWithPos[], inputColor?: string) => string | null
106
92
  ) => {
@@ -117,19 +103,10 @@ export const NodeBackground = Extension.create<NodeBackgroundOptions>({
117
103
  }
118
104
 
119
105
  return {
120
- /**
121
- * Set background color to specific value
122
- */
123
106
  setNodeBackgroundColor: executeBackgroundCommand((_, inputColor) => inputColor || null),
124
107
 
125
- /**
126
- * Remove background color
127
- */
128
108
  unsetNodeBackgroundColor: executeBackgroundCommand(() => null),
129
109
 
130
- /**
131
- * Toggle background color (set if different/missing, unset if all have it)
132
- */
133
110
  toggleNodeBackgroundColor: executeBackgroundCommand((targets, inputColor) =>
134
111
  getToggleColor(targets, inputColor || '')
135
112
  )
@@ -3,21 +3,8 @@ import { mergeAttributes, Node, ReactNodeViewRenderer } from '@tiptap/react'
3
3
  import { MediaGalleryPlaceholderNode as MediaGalleryPlaceholderNodeComponent } from './media-gallery-placeholder-node'
4
4
 
5
5
  export interface MediaGalleryPlaceholderNodeOptions {
6
- /**
7
- * The type of the node.
8
- * @default 'image'
9
- */
10
6
  type?: string | NodeType | undefined
11
- /**
12
- * Acceptable media types for the gallery dialog.
13
- * @default 'image/*'
14
- */
15
7
  accept?: string
16
- /**
17
- * HTML attributes to add to the image element.
18
- * @default {}
19
- * @example { class: 'foo' }
20
- */
21
8
  HTMLAttributes: Record<string, unknown>
22
9
  }
23
10
 
@@ -29,10 +16,6 @@ declare module '@tiptap/react' {
29
16
  }
30
17
  }
31
18
 
32
- /**
33
- * A Tiptap node extension that creates a media gallery placeholder.
34
- * @see registry/tiptap-node/media-gallery-placeholder-node/media-gallery-placeholder-node
35
- */
36
19
  export const MediaGalleryPlaceholderNode = Node.create<MediaGalleryPlaceholderNodeOptions>({
37
20
  name: 'mediaGalleryPlaceholder',
38
21
 
@@ -85,9 +68,6 @@ export const MediaGalleryPlaceholderNode = Node.create<MediaGalleryPlaceholderNo
85
68
  }
86
69
  },
87
70
 
88
- /**
89
- * Adds Enter key handler to reopen the media gallery when the placeholder is selected.
90
- */
91
71
  addKeyboardShortcuts() {
92
72
  return {
93
73
  Enter: ({ editor }) => {
@@ -1,11 +1,11 @@
1
1
  'use client'
2
2
 
3
+ import * as React from 'react'
4
+ import type { NodeViewProps } from '@tiptap/react'
3
5
  import { ContentEditorMediaGalleryBlock } from '@admin/components/custom/content-editor/media-gallery-block'
4
6
  import { getMediaLabel } from '@admin/utils/editor/source-media'
5
7
  import { focusNextNode, isValidPosition } from '@admin/utils/editor/tiptap'
6
- import type { NodeViewProps } from '@tiptap/react'
7
8
  import { NodeViewWrapper } from '@tiptap/react'
8
- import * as React from 'react'
9
9
 
10
10
  export const MediaGalleryPlaceholderNode: React.FC<NodeViewProps> = (props) => {
11
11
  const { accept } = props.node.attrs
@@ -1,16 +1,16 @@
1
1
  'use client'
2
2
 
3
+ import * as React from 'react'
4
+ import type { AdminMedia } from '@admin/types'
5
+ import type { NodeViewProps } from '@tiptap/react'
3
6
  import { MediaGalleryDialog } from '@admin/components/shared/media/media-gallery-dialog'
4
7
  import { Button } from '@admin/components/ui/button'
5
- import type { AdminMedia } from '@admin/types'
6
8
  import { getNumberAttr, getStringAttr } from '@admin/utils/editor/node-attrs'
7
9
  import { getMediaLabel } from '@admin/utils/editor/source-media'
8
10
  import { focusNextNode, isValidPosition } from '@admin/utils/editor/tiptap'
9
11
  import { cn } from '@admin/utils/shared/cn'
10
- import type { NodeViewProps } from '@tiptap/react'
11
12
  import { NodeViewWrapper } from '@tiptap/react'
12
13
  import NextImage from 'next/image'
13
- import * as React from 'react'
14
14
 
15
15
  export const RemovableImageNode: React.FC<NodeViewProps> = (props) => {
16
16
  const { editor, node } = props
@@ -1,21 +1,14 @@
1
1
  'use client'
2
2
 
3
+ import type { ControlAvailability, ControlShortcut, ControlTooltip } from '../control-options'
4
+ import type { UseBlockquoteConfig } from '@admin/hooks/content-editor/use-blockquote'
3
5
  import { Badge } from '@admin/components/ui/badge'
4
6
  import { Button } from '@admin/components/ui/button'
5
- // --- Hooks ---
6
- import {
7
- BLOCKQUOTE_SHORTCUT_KEY,
8
- type UseBlockquoteConfig,
9
- useBlockquote
10
- } from '@admin/hooks/content-editor/use-blockquote'
7
+ import { BLOCKQUOTE_SHORTCUT_KEY, useBlockquote } from '@admin/hooks/content-editor/use-blockquote'
11
8
  import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
12
- // --- Lib ---
13
9
  import { parseShortcutKeys } from '@admin/utils/editor/tiptap'
14
10
  import { useCallback } from 'react'
15
11
  import {
16
- type ControlAvailability,
17
- type ControlShortcut,
18
- type ControlTooltip,
19
12
  getControlTooltipTitle,
20
13
  shouldHideUnavailableControl,
21
14
  shouldShowControlShortcut
@@ -28,9 +21,6 @@ type EditorButtonProps = React.ComponentProps<typeof Button> & {
28
21
  export interface BlockquoteButtonProps
29
22
  extends Omit<EditorButtonProps, 'type'>, Omit<UseBlockquoteConfig, 'hideWhenUnavailable'> {
30
23
  availability?: ControlAvailability
31
- /**
32
- * Optional text to display alongside the icon.
33
- */
34
24
  text?: string
35
25
  shortcut?: ControlShortcut
36
26
  }
@@ -43,11 +33,6 @@ export function BlockquoteShortcutBadge({
43
33
  return <Badge>{parseShortcutKeys({ shortcutKeys })}</Badge>
44
34
  }
45
35
 
46
- /**
47
- * Button component for toggling blockquote in a Tiptap editor.
48
- *
49
- * For custom button implementations, use the `useBlockquote` hook instead.
50
- */
51
36
  export function BlockquoteButton({
52
37
  editor: providedEditor,
53
38
  availability,
@@ -1,21 +1,14 @@
1
1
  'use client'
2
2
 
3
+ import type { ControlAvailability, ControlShortcut, ControlTooltip } from '../control-options'
4
+ import type { UseCodeBlockConfig } from '@admin/hooks/content-editor/use-code-block'
3
5
  import { Badge } from '@admin/components/ui/badge'
4
6
  import { Button } from '@admin/components/ui/button'
5
- // --- Hooks ---
6
- import {
7
- CODE_BLOCK_SHORTCUT_KEY,
8
- type UseCodeBlockConfig,
9
- useCodeBlock
10
- } from '@admin/hooks/content-editor/use-code-block'
7
+ import { CODE_BLOCK_SHORTCUT_KEY, useCodeBlock } from '@admin/hooks/content-editor/use-code-block'
11
8
  import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
12
- // --- Lib ---
13
9
  import { parseShortcutKeys } from '@admin/utils/editor/tiptap'
14
10
  import { useCallback } from 'react'
15
11
  import {
16
- type ControlAvailability,
17
- type ControlShortcut,
18
- type ControlTooltip,
19
12
  getControlTooltipTitle,
20
13
  shouldHideUnavailableControl,
21
14
  shouldShowControlShortcut
@@ -28,9 +21,6 @@ type EditorButtonProps = React.ComponentProps<typeof Button> & {
28
21
  export interface CodeBlockButtonProps
29
22
  extends Omit<EditorButtonProps, 'type'>, Omit<UseCodeBlockConfig, 'hideWhenUnavailable'> {
30
23
  availability?: ControlAvailability
31
- /**
32
- * Optional text to display alongside the icon.
33
- */
34
24
  text?: string
35
25
  shortcut?: ControlShortcut
36
26
  }
@@ -43,11 +33,6 @@ export function CodeBlockShortcutBadge({
43
33
  return <Badge>{parseShortcutKeys({ shortcutKeys })}</Badge>
44
34
  }
45
35
 
46
- /**
47
- * Button component for toggling code block in a Tiptap editor.
48
- *
49
- * For custom button implementations, use the `useCodeBlock` hook instead.
50
- */
51
36
  export function CodeBlockButton({
52
37
  editor: providedEditor,
53
38
  availability,
@@ -1,22 +1,18 @@
1
1
  'use client'
2
2
 
3
+ import type { ControlAvailability, ControlShortcut, ControlTooltip } from '../control-options'
4
+ import type { UseColorHighlightConfig } from '@admin/hooks/content-editor/use-color-highlight'
3
5
  import { Badge } from '@admin/components/ui/badge'
4
6
  import { Button } from '@admin/components/ui/button'
5
- // --- Hooks ---
6
7
  import {
7
8
  COLOR_HIGHLIGHT_SHORTCUT_KEY,
8
- type UseColorHighlightConfig,
9
9
  useColorHighlight
10
10
  } from '@admin/hooks/content-editor/use-color-highlight'
11
11
  import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
12
- // --- Lib ---
13
12
  import { parseShortcutKeys } from '@admin/utils/editor/tiptap'
14
13
  import { cn } from '@admin/utils/shared/cn'
15
14
  import { useCallback, useMemo } from 'react'
16
15
  import {
17
- type ControlAvailability,
18
- type ControlShortcut,
19
- type ControlTooltip,
20
16
  getControlTooltipTitle,
21
17
  shouldHideUnavailableControl,
22
18
  shouldShowControlShortcut
@@ -29,9 +25,6 @@ type EditorButtonProps = React.ComponentProps<typeof Button> & {
29
25
  export interface ColorHighlightButtonProps
30
26
  extends Omit<EditorButtonProps, 'type'>, Omit<UseColorHighlightConfig, 'hideWhenUnavailable'> {
31
27
  availability?: ControlAvailability
32
- /**
33
- * Optional text to display alongside the icon.
34
- */
35
28
  text?: string
36
29
  shortcut?: ControlShortcut
37
30
  }
@@ -72,34 +65,6 @@ export function HighlightSwatch({ highlightColor }: { highlightColor: string })
72
65
  )
73
66
  }
74
67
 
75
- /**
76
- * Button component for applying color highlights in a Tiptap editor.
77
- *
78
- * Supports two highlighting modes:
79
- * - "mark": Uses the highlight mark extension (default)
80
- * - "node": Uses the node background extension
81
- *
82
- * For custom button implementations, use the `useColorHighlight` hook instead.
83
- *
84
- * @example
85
- * ```tsx
86
- * // Mark-based highlighting (default)
87
- * <ColorHighlightButton highlightColor="yellow" />
88
- *
89
- * // Node-based background coloring
90
- * <ColorHighlightButton
91
- * highlightColor="var(--tt-color-highlight-blue)"
92
- * mode="node"
93
- * />
94
- *
95
- * // With custom callback
96
- * <ColorHighlightButton
97
- * highlightColor="red"
98
- * mode="mark"
99
- * onApplied={({ color, mode }) => console.log(`Applied ${color} in ${mode} mode`)}
100
- * />
101
- * ```
102
- */
103
68
  export function ColorHighlightButton({
104
69
  editor: providedEditor,
105
70
  availability,
@@ -1,12 +1,10 @@
1
1
  'use client'
2
2
 
3
- import {
4
- type ControlTooltip,
5
- getControlTooltipTitle
6
- } from '@admin/components/custom/content-editor/tiptap-ui/control-options'
3
+ import type * as React from 'react'
4
+ import type { ControlTooltip } from '@admin/components/custom/content-editor/tiptap-ui/control-options'
5
+ import { getControlTooltipTitle } from '@admin/components/custom/content-editor/tiptap-ui/control-options'
7
6
  import { Button } from '@admin/components/ui/button'
8
7
  import { HighlighterIcon } from 'lucide-react'
9
- import type * as React from 'react'
10
8
 
11
9
  export type ColorHighlightPopoverButtonProps = React.ComponentProps<typeof Button> & {
12
10
  tooltip?: ControlTooltip
@@ -1,23 +1,17 @@
1
1
  'use client'
2
2
 
3
+ import type { HighlightColor } from './highlight-colors'
4
+ import type { Editor } from '@tiptap/react'
3
5
  import { Button } from '@admin/components/ui/button'
4
6
  import { useColorHighlight } from '@admin/hooks/content-editor/use-color-highlight'
5
7
  import { useMenuNavigation } from '@admin/hooks/content-editor/use-menu-navigation'
6
- import type { Editor } from '@tiptap/react'
7
8
  import { BanIcon } from 'lucide-react'
8
9
  import { useMemo, useRef } from 'react'
9
10
  import { HighlightColorButton } from './highlight-color-button'
10
- import { DEFAULT_HIGHLIGHT_COLORS, type HighlightColor } from './highlight-colors'
11
+ import { DEFAULT_HIGHLIGHT_COLORS } from './highlight-colors'
11
12
 
12
13
  interface ColorHighlightPopoverContentBaseProps {
13
- /**
14
- * The Tiptap editor instance.
15
- */
16
14
  editor?: Editor | null
17
- /**
18
- * Optional colors to use in the highlight popover.
19
- * If not provided, defaults to a predefined set of colors.
20
- */
21
15
  colors?: HighlightColor[]
22
16
  useColorValue?: boolean
23
17
  disabled?: boolean
@@ -1,22 +1,20 @@
1
1
  'use client'
2
2
 
3
+ import * as React from 'react'
4
+ import type { ColorHighlightPopoverButtonProps } from './color-highlight-popover-button'
5
+ import type { HighlightColor } from './highlight-colors'
3
6
  import type {
4
7
  ControlAvailability,
5
8
  ControlTooltip
6
9
  } from '@admin/components/custom/content-editor/tiptap-ui/control-options'
7
- import { Popover, PopoverContent, PopoverTrigger } from '@admin/components/ui/popover'
8
- // --- Hooks ---
9
10
  import type { UseColorHighlightConfig } from '@admin/hooks/content-editor/use-color-highlight'
11
+ import { Popover, PopoverContent, PopoverTrigger } from '@admin/components/ui/popover'
10
12
  import { useColorHighlight } from '@admin/hooks/content-editor/use-color-highlight'
11
13
  import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
12
- import * as React from 'react'
13
14
  import { shouldHideUnavailableControl } from '../control-options'
14
- import {
15
- ColorHighlightPopoverButton,
16
- type ColorHighlightPopoverButtonProps
17
- } from './color-highlight-popover-button'
15
+ import { ColorHighlightPopoverButton } from './color-highlight-popover-button'
18
16
  import { ColorHighlightPopoverContent } from './color-highlight-popover-content'
19
- import { DEFAULT_HIGHLIGHT_COLORS, type HighlightColor } from './highlight-colors'
17
+ import { DEFAULT_HIGHLIGHT_COLORS } from './highlight-colors'
20
18
 
21
19
  export { ColorHighlightPopoverButton } from './color-highlight-popover-button'
22
20
  export type { ColorHighlightPopoverContentProps } from './color-highlight-popover-content'
@@ -29,10 +27,6 @@ export interface ColorHighlightPopoverProps
29
27
  Omit<ColorHighlightPopoverButtonProps, 'type'>,
30
28
  Pick<UseColorHighlightConfig, 'editor' | 'onApplied'> {
31
29
  availability?: ControlAvailability
32
- /**
33
- * Optional colors to use in the highlight popover.
34
- * If not provided, defaults to a predefined set of colors.
35
- */
36
30
  colors?: HighlightColor[]
37
31
  onOpenChange?: (isOpen: boolean) => void
38
32
  tooltip?: ControlTooltip
@@ -1,10 +1,10 @@
1
1
  'use client'
2
2
 
3
+ import type { HighlightButtonStyle, HighlightColor } from './highlight-colors'
4
+ import type { Editor } from '@tiptap/react'
3
5
  import { Button } from '@admin/components/ui/button'
4
6
  import { cn } from '@admin/utils/shared/cn'
5
- import type { Editor } from '@tiptap/react'
6
7
  import { ColorHighlightButton, HighlightSwatch } from '../color-highlight-button'
7
- import type { HighlightButtonStyle, HighlightColor } from './highlight-colors'
8
8
 
9
9
  export function HighlightColorButton({
10
10
  color,
@@ -1,8 +1,6 @@
1
- import {
2
- type HighlightColor,
3
- pickHighlightColorsByValue
4
- } from '@admin/hooks/content-editor/use-color-highlight'
5
1
  import type * as React from 'react'
2
+ import type { HighlightColor } from '@admin/hooks/content-editor/use-color-highlight'
3
+ import { pickHighlightColorsByValue } from '@admin/hooks/content-editor/use-color-highlight'
6
4
 
7
5
  export type HighlightButtonStyle = React.CSSProperties & {
8
6
  '--highlight-color': string
@@ -1,23 +1,18 @@
1
1
  'use client'
2
2
 
3
+ import type { ColorHighlightPopoverButtonProps } from './color-highlight-popover-button'
4
+ import type { HighlightColor } from './highlight-colors'
3
5
  import { Popover, PopoverContent, PopoverTrigger } from '@admin/components/ui/popover'
4
6
  import { HighlighterIcon } from 'lucide-react'
5
7
  import { useState } from 'react'
6
- import {
7
- ColorHighlightPopoverButton,
8
- type ColorHighlightPopoverButtonProps
9
- } from './color-highlight-popover-button'
8
+ import { ColorHighlightPopoverButton } from './color-highlight-popover-button'
10
9
  import { ColorHighlightPopoverContent } from './color-highlight-popover-content'
11
- import { DEFAULT_HIGHLIGHT_COLORS, type HighlightColor } from './highlight-colors'
10
+ import { DEFAULT_HIGHLIGHT_COLORS } from './highlight-colors'
12
11
 
13
12
  export interface SourceColorHighlightPopoverProps extends Omit<
14
13
  ColorHighlightPopoverButtonProps,
15
14
  'type'
16
15
  > {
17
- /**
18
- * Optional colors to use in the highlight popover.
19
- * If not provided, defaults to a predefined set of colors.
20
- */
21
16
  colors?: HighlightColor[]
22
17
  disabled?: boolean
23
18
  onHighlightColorSelect: (color: HighlightColor) => void
@@ -1,8 +1,9 @@
1
1
  'use client'
2
2
 
3
- import { DropdownMenuItem } from '@admin/components/ui/dropdown-menu'
4
- import { type Level, useHeading } from '@admin/hooks/content-editor/use-heading'
3
+ import type { Level } from '@admin/hooks/content-editor/use-heading'
5
4
  import type { Editor } from '@tiptap/react'
5
+ import { DropdownMenuItem } from '@admin/components/ui/dropdown-menu'
6
+ import { useHeading } from '@admin/hooks/content-editor/use-heading'
6
7
 
7
8
  export function HeadingDropdownMenuItem({
8
9
  editor,
@@ -1,5 +1,7 @@
1
1
  'use client'
2
2
 
3
+ import type { ControlAvailability, ControlTooltip } from '../control-options'
4
+ import type { UseHeadingDropdownMenuConfig } from '@admin/hooks/content-editor/use-heading-dropdown-menu'
3
5
  import { Button } from '@admin/components/ui/button'
4
6
  import {
5
7
  DropdownMenu,
@@ -7,20 +9,11 @@ import {
7
9
  DropdownMenuGroup,
8
10
  DropdownMenuTrigger
9
11
  } from '@admin/components/ui/dropdown-menu'
10
- import {
11
- type UseHeadingDropdownMenuConfig,
12
- useHeadingDropdownMenu
13
- } from '@admin/hooks/content-editor/use-heading-dropdown-menu'
12
+ import { useHeadingDropdownMenu } from '@admin/hooks/content-editor/use-heading-dropdown-menu'
14
13
  import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
15
- // --- Icons ---
16
14
  import { ChevronDownIcon } from 'lucide-react'
17
15
  import { useCallback, useState } from 'react'
18
- import {
19
- type ControlAvailability,
20
- type ControlTooltip,
21
- getControlTooltipTitle,
22
- shouldHideUnavailableControl
23
- } from '../control-options'
16
+ import { getControlTooltipTitle, shouldHideUnavailableControl } from '../control-options'
24
17
  import { HeadingDropdownMenuItem } from './heading-dropdown-menu-item'
25
18
 
26
19
  type EditorButtonProps = React.ComponentProps<typeof Button> & {
@@ -32,17 +25,9 @@ export interface HeadingDropdownMenuProps
32
25
  Omit<EditorButtonProps, 'type'>,
33
26
  Omit<UseHeadingDropdownMenuConfig, 'hideWhenUnavailable'> {
34
27
  availability?: ControlAvailability
35
- /**
36
- * Callback for when the dropdown opens or closes
37
- */
38
28
  onOpenChange?: (isOpen: boolean) => void
39
29
  }
40
30
 
41
- /**
42
- * Dropdown menu component for selecting heading levels in a Tiptap editor.
43
- *
44
- * For custom dropdown implementations, use the `useHeadingDropdownMenu` hook instead.
45
- */
46
31
  export function HeadingDropdownMenu({
47
32
  editor: providedEditor,
48
33
  availability,
@@ -1,12 +1,10 @@
1
1
  'use client'
2
2
 
3
- import {
4
- type ControlTooltip,
5
- getControlTooltipTitle
6
- } from '@admin/components/custom/content-editor/tiptap-ui/control-options'
3
+ import type * as React from 'react'
4
+ import type { ControlTooltip } from '@admin/components/custom/content-editor/tiptap-ui/control-options'
5
+ import { getControlTooltipTitle } from '@admin/components/custom/content-editor/tiptap-ui/control-options'
7
6
  import { Button } from '@admin/components/ui/button'
8
7
  import { LinkIcon } from 'lucide-react'
9
- import type * as React from 'react'
10
8
 
11
9
  export type LinkButtonProps = React.ComponentProps<typeof Button> & {
12
10
  tooltip?: ControlTooltip
@@ -1,7 +1,7 @@
1
1
  'use client'
2
2
 
3
- import { useLinkPopover } from '@admin/hooks/content-editor/use-link-popover'
4
3
  import type { Editor } from '@tiptap/react'
4
+ import { useLinkPopover } from '@admin/hooks/content-editor/use-link-popover'
5
5
  import { LinkMain } from './link-main'
6
6
 
7
7
  export function LinkContent({ editor }: { editor?: Editor | null }) {
@@ -1,11 +1,13 @@
1
1
  'use client'
2
2
 
3
+ import type * as React from 'react'
4
+ import type { LinkButtonProps } from './link-button'
5
+ import type { LinkMainProps } from './link-main'
3
6
  import { Popover, PopoverContent, PopoverTrigger } from '@admin/components/ui/popover'
4
7
  import { LinkIcon } from 'lucide-react'
5
- import type * as React from 'react'
6
8
  import { useCallback, useState } from 'react'
7
- import { LinkButton, type LinkButtonProps } from './link-button'
8
- import { LinkMain, type LinkMainProps } from './link-main'
9
+ import { LinkButton } from './link-button'
10
+ import { LinkMain } from './link-main'
9
11
 
10
12
  export interface LinkControlPopoverProps extends Omit<LinkButtonProps, 'type'>, LinkMainProps {
11
13
  canSet?: boolean
@@ -1,26 +1,14 @@
1
1
  'use client'
2
2
 
3
+ import type * as React from 'react'
3
4
  import { Button } from '@admin/components/ui/button'
4
5
  import { InputGroup, InputGroupInput } from '@admin/components/ui/input-group'
5
6
  import { TrashIcon } from 'lucide-react'
6
- import type * as React from 'react'
7
7
 
8
8
  export interface LinkMainProps {
9
- /**
10
- * The URL to set for the link.
11
- */
12
9
  url: string
13
- /**
14
- * Function to update the URL state.
15
- */
16
10
  setUrl: React.Dispatch<React.SetStateAction<string | null>>
17
- /**
18
- * Function to set the link in the editor.
19
- */
20
11
  setLink: () => void
21
- /**
22
- * Function to remove the link from the editor.
23
- */
24
12
  removeLink: () => void
25
13
  }
26
14
 
@@ -1,19 +1,16 @@
1
1
  'use client'
2
2
 
3
- // --- Hooks ---
4
- import {
5
- type UseLinkPopoverConfig,
6
- useLinkPopover
7
- } from '@admin/hooks/content-editor/use-link-popover'
8
- import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
9
3
  import * as React from 'react'
10
4
  import type { LinkPopoverOpenMode } from '../control-options'
5
+ import type { ControlAvailability } from '../control-options'
6
+ import type { LinkButtonProps } from './link-button'
7
+ import type { UseLinkPopoverConfig } from '@admin/hooks/content-editor/use-link-popover'
8
+ import { useLinkPopover } from '@admin/hooks/content-editor/use-link-popover'
9
+ import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
11
10
  import {
12
- type ControlAvailability,
13
11
  shouldHideUnavailableControl,
14
12
  shouldOpenLinkPopoverFromActiveLink
15
13
  } from '../control-options'
16
- import type { LinkButtonProps } from './link-button'
17
14
  import { LinkControlPopover } from './link-control-popover'
18
15
 
19
16
  export { LinkButton } from './link-button'
@@ -25,9 +22,6 @@ export type { LinkMainProps } from './link-main'
25
22
  export interface LinkPopoverProps
26
23
  extends Omit<LinkButtonProps, 'type'>, Omit<UseLinkPopoverConfig, 'hideWhenUnavailable'> {
27
24
  availability?: ControlAvailability
28
- /**
29
- * Callback for when the popover opens or closes.
30
- */
31
25
  onOpenChange?: (isOpen: boolean) => void
32
26
  openMode?: LinkPopoverOpenMode
33
27
  }
@@ -38,11 +32,6 @@ type LinkPopoverOpenState = {
38
32
  open: boolean | null
39
33
  }
40
34
 
41
- /**
42
- * Link popover component for Tiptap editors.
43
- *
44
- * For custom popover implementations, use the `useLinkPopover` hook instead.
45
- */
46
35
  export function LinkPopover({
47
36
  editor: providedEditor,
48
37
  availability,
@@ -1,8 +1,9 @@
1
1
  'use client'
2
2
 
3
- import { DropdownMenuItem } from '@admin/components/ui/dropdown-menu'
4
- import { type ListType, useList } from '@admin/hooks/content-editor/use-list'
3
+ import type { ListType } from '@admin/hooks/content-editor/use-list'
5
4
  import type { Editor } from '@tiptap/react'
5
+ import { DropdownMenuItem } from '@admin/components/ui/dropdown-menu'
6
+ import { useList } from '@admin/hooks/content-editor/use-list'
6
7
 
7
8
  export function ListDropdownMenuItem({
8
9
  editor,