@rebasepro/admin 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/README.md +7 -3
  2. package/dist/CollectionEditorDialog-HNXGxXdO.js +3549 -0
  3. package/dist/CollectionEditorDialog-HNXGxXdO.js.map +1 -0
  4. package/dist/CollectionsStudioView-B1mN33GB.js +170 -0
  5. package/dist/CollectionsStudioView-B1mN33GB.js.map +1 -0
  6. package/dist/PropertyEditView-C2wp8kQ9.js +3660 -0
  7. package/dist/PropertyEditView-C2wp8kQ9.js.map +1 -0
  8. package/dist/collection_editor/ConfigControllerProvider.d.ts +2 -2
  9. package/dist/collection_editor/ui/AddKanbanColumnAction.d.ts +2 -1
  10. package/dist/collection_editor/ui/CollectionViewHeaderAction.d.ts +2 -1
  11. package/dist/collection_editor/ui/EditorCollectionAction.d.ts +1 -1
  12. package/dist/collection_editor/ui/EditorCollectionActionStart.d.ts +1 -1
  13. package/dist/collection_editor/ui/EditorEntityAction.d.ts +1 -1
  14. package/dist/collection_editor/ui/HomePageEditorCollectionAction.d.ts +1 -1
  15. package/dist/collection_editor/ui/KanbanSetupAction.d.ts +2 -1
  16. package/dist/collection_editor/ui/MissingReferenceWidget.d.ts +1 -1
  17. package/dist/collection_editor/ui/NewCollectionButton.d.ts +1 -1
  18. package/dist/collection_editor/ui/NewCollectionCard.d.ts +1 -1
  19. package/dist/collection_editor/ui/PropertyAddColumnComponent.d.ts +1 -1
  20. package/dist/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.d.ts +1 -1
  21. package/dist/collection_editor/ui/collection_editor/AIModifiedPathsContext.d.ts +1 -1
  22. package/dist/collection_editor/ui/collection_editor/CollectionDetailsForm.d.ts +2 -1
  23. package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +2 -2
  24. package/dist/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.d.ts +2 -2
  25. package/dist/collection_editor/ui/collection_editor/CollectionJsonImportDialog.d.ts +2 -1
  26. package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +1 -1
  27. package/dist/collection_editor/ui/collection_editor/CollectionRLSTab.d.ts +2 -1
  28. package/dist/collection_editor/ui/collection_editor/CollectionRelationsTab.d.ts +2 -1
  29. package/dist/collection_editor/ui/collection_editor/CollectionStudioView.d.ts +2 -1
  30. package/dist/collection_editor/ui/collection_editor/CollectionYupValidation.d.ts +1 -9
  31. package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.d.ts +2 -1
  32. package/dist/collection_editor/ui/collection_editor/DisplaySettingsForm.d.ts +2 -1
  33. package/dist/collection_editor/ui/collection_editor/EntityActionsEditTab.d.ts +2 -1
  34. package/dist/collection_editor/ui/collection_editor/EntityActionsSelectDialog.d.ts +2 -1
  35. package/dist/collection_editor/ui/collection_editor/EntityCustomViewsSelectDialog.d.ts +2 -1
  36. package/dist/collection_editor/ui/collection_editor/EnumForm.d.ts +2 -1
  37. package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.d.ts +2 -1
  38. package/dist/collection_editor/ui/collection_editor/GetCodeDialog.d.ts +2 -1
  39. package/dist/collection_editor/ui/collection_editor/KanbanConfigSection.d.ts +2 -1
  40. package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.d.ts +1 -1
  41. package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +4 -4
  42. package/dist/collection_editor/ui/collection_editor/PropertyFieldPreview.d.ts +2 -2
  43. package/dist/collection_editor/ui/collection_editor/PropertyTree.d.ts +2 -2
  44. package/dist/collection_editor/ui/collection_editor/SubcollectionsEditTab.d.ts +2 -1
  45. package/dist/collection_editor/ui/collection_editor/SwitchControl.d.ts +2 -1
  46. package/dist/collection_editor/ui/collection_editor/ViewModeSwitch.d.ts +1 -1
  47. package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.d.ts +1 -1
  48. package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.d.ts +3 -2
  49. package/dist/collection_editor/ui/collection_editor/properties/BlockPropertyField.d.ts +2 -1
  50. package/dist/collection_editor/ui/collection_editor/properties/BooleanPropertyField.d.ts +2 -1
  51. package/dist/collection_editor/ui/collection_editor/properties/DateTimePropertyField.d.ts +2 -1
  52. package/dist/collection_editor/ui/collection_editor/properties/EnumPropertyField.d.ts +2 -1
  53. package/dist/collection_editor/ui/collection_editor/properties/KeyValuePropertyField.d.ts +2 -1
  54. package/dist/collection_editor/ui/collection_editor/properties/MapPropertyField.d.ts +2 -1
  55. package/dist/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.d.ts +2 -1
  56. package/dist/collection_editor/ui/collection_editor/properties/NumberPropertyField.d.ts +2 -1
  57. package/dist/collection_editor/ui/collection_editor/properties/ReferencePropertyField.d.ts +3 -2
  58. package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.d.ts +2 -1
  59. package/dist/collection_editor/ui/collection_editor/properties/RepeatPropertyField.d.ts +2 -1
  60. package/dist/collection_editor/ui/collection_editor/properties/StoragePropertyField.d.ts +2 -1
  61. package/dist/collection_editor/ui/collection_editor/properties/StringPropertyField.d.ts +2 -1
  62. package/dist/collection_editor/ui/collection_editor/properties/UrlPropertyField.d.ts +2 -1
  63. package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.d.ts +2 -1
  64. package/dist/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.d.ts +2 -1
  65. package/dist/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.d.ts +2 -1
  66. package/dist/collection_editor/ui/collection_editor/properties/conditions/ConditionsPanel.d.ts +1 -1
  67. package/dist/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.d.ts +2 -1
  68. package/dist/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.d.ts +2 -1
  69. package/dist/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.d.ts +2 -1
  70. package/dist/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.d.ts +2 -1
  71. package/dist/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.d.ts +2 -1
  72. package/dist/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.d.ts +1 -1
  73. package/dist/collection_editor_ui.js +4 -11
  74. package/dist/components/ArrayContainer.d.ts +3 -3
  75. package/dist/components/ClearFilterSortButton.d.ts +1 -1
  76. package/dist/components/CollectionEditorDialogs.d.ts +2 -1
  77. package/dist/components/CollectionPanel.d.ts +2 -27
  78. package/dist/components/DefaultAppBar.d.ts +1 -1
  79. package/dist/components/DefaultDrawer.d.ts +4 -4
  80. package/dist/components/DeleteEntityDialog.d.ts +2 -1
  81. package/dist/components/DrawerNavigationGroup.d.ts +1 -1
  82. package/dist/components/DrawerNavigationItem.d.ts +1 -1
  83. package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +1 -1
  84. package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +2 -1
  85. package/dist/components/EntityCollectionTable/fields/TableMultipleRelationField.d.ts +3 -3
  86. package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +3 -3
  87. package/dist/components/EntityCollectionTable/fields/TableRelationField.d.ts +3 -3
  88. package/dist/components/EntityCollectionTable/fields/TableRelationSelectorField.d.ts +2 -1
  89. package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
  90. package/dist/components/EntityCollectionTable/fields/VirtualTableDateField.d.ts +1 -1
  91. package/dist/components/EntityCollectionTable/fields/VirtualTableInput.d.ts +2 -1
  92. package/dist/components/EntityCollectionTable/fields/VirtualTableNumberInput.d.ts +2 -1
  93. package/dist/components/EntityCollectionTable/fields/VirtualTableSelect.d.ts +1 -1
  94. package/dist/components/EntityCollectionTable/fields/VirtualTableSwitch.d.ts +2 -1
  95. package/dist/components/EntityCollectionTable/fields/VirtualTableUserSelect.d.ts +1 -1
  96. package/dist/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +1 -1
  97. package/dist/components/EntityCollectionTable/internal/EntityTableCellActions.d.ts +1 -1
  98. package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +4 -3
  99. package/dist/components/EntityCollectionView/Board.d.ts +2 -1
  100. package/dist/components/EntityCollectionView/BoardColumnTitle.d.ts +1 -1
  101. package/dist/components/EntityCollectionView/BoardSortableList.d.ts +1 -1
  102. package/dist/components/EntityCollectionView/EntityBoardCard.d.ts +1 -1
  103. package/dist/components/EntityCollectionView/EntityCard.d.ts +2 -1
  104. package/dist/components/EntityCollectionView/EntityCollectionBoardView.d.ts +1 -1
  105. package/dist/components/EntityCollectionView/EntityCollectionCardView.d.ts +1 -1
  106. package/dist/components/EntityCollectionView/EntityCollectionListView.d.ts +1 -1
  107. package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +0 -24
  108. package/dist/components/EntityCollectionView/EntityCollectionViewActions.d.ts +1 -1
  109. package/dist/components/EntityCollectionView/EntityCollectionViewStartActions.d.ts +2 -1
  110. package/dist/components/EntityCollectionView/FilterPresetsButton.d.ts +2 -1
  111. package/dist/components/EntityCollectionView/FiltersDialog.d.ts +2 -1
  112. package/dist/components/EntityCollectionView/SplitListView.d.ts +1 -1
  113. package/dist/components/EntityCollectionView/ViewModeToggle.d.ts +2 -1
  114. package/dist/components/EntityDetailView.d.ts +1 -1
  115. package/dist/components/EntityEditView.d.ts +2 -2
  116. package/dist/components/EntityEditViewFormActions.d.ts +2 -1
  117. package/dist/components/EntityJsonPreview.d.ts +2 -1
  118. package/dist/components/EntityPreview.d.ts +3 -3
  119. package/dist/components/EntitySidePanel.d.ts +2 -1
  120. package/dist/components/EntityView.d.ts +2 -1
  121. package/dist/components/FieldCaption.d.ts +1 -1
  122. package/dist/components/HomePage/ContentHomePage.d.ts +1 -1
  123. package/dist/components/HomePage/FavouritesView.d.ts +1 -1
  124. package/dist/components/HomePage/HomePageDnD.d.ts +4 -4
  125. package/dist/components/HomePage/NavigationCard.d.ts +1 -1
  126. package/dist/components/HomePage/NavigationCardBinding.d.ts +2 -1
  127. package/dist/components/HomePage/NavigationGroup.d.ts +2 -2
  128. package/dist/components/HomePage/RenameGroupDialog.d.ts +2 -1
  129. package/dist/components/HomePage/SmallNavigationCard.d.ts +1 -1
  130. package/dist/components/PropertyCollectionView.d.ts +2 -1
  131. package/dist/components/PropertyIdCopyTooltip.d.ts +2 -2
  132. package/dist/components/RebaseAuthGate.d.ts +1 -1
  133. package/dist/components/RebaseLayout.d.ts +1 -1
  134. package/dist/components/RebaseNavigation.d.ts +1 -1
  135. package/dist/components/RebaseRouteDefs.d.ts +1 -1
  136. package/dist/components/RebaseShell.d.ts +1 -1
  137. package/dist/components/ReferenceTable/EntitySelectionTable.d.ts +1 -1
  138. package/dist/components/ReferenceWidget.d.ts +2 -1
  139. package/dist/components/SearchIconsView.d.ts +2 -1
  140. package/dist/components/SelectableTable/SelectableTable.d.ts +2 -2
  141. package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -1
  142. package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -1
  143. package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -1
  144. package/dist/components/SelectableTable/filters/RelationFilterField.d.ts +2 -1
  145. package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -1
  146. package/dist/components/SideDialogs.d.ts +1 -1
  147. package/dist/components/SideEntityProvider.d.ts +1 -1
  148. package/dist/components/admin/CreationResultDialog.d.ts +2 -1
  149. package/dist/components/app/AppBar.d.ts +1 -1
  150. package/dist/components/app/Drawer.d.ts +1 -1
  151. package/dist/components/common/default_entity_actions.d.ts +2 -1
  152. package/dist/components/history/EntityHistoryEntry.d.ts +1 -1
  153. package/dist/components/history/EntityHistoryView.d.ts +1 -1
  154. package/dist/components/history/LastEditedByFormAction.d.ts +2 -1
  155. package/dist/components/history/LastEditedByIndicator.d.ts +2 -1
  156. package/dist/components/history/UserChip.d.ts +1 -1
  157. package/dist/data_export/export/BasicExportAction.d.ts +2 -1
  158. package/dist/data_export/export/ExportCollectionAction.d.ts +1 -1
  159. package/dist/data_import/components/DataNewPropertiesMapping.d.ts +1 -1
  160. package/dist/data_import/components/ImportFileUpload.d.ts +1 -1
  161. package/dist/data_import/components/ImportNewPropertyFieldPreview.d.ts +2 -1
  162. package/dist/data_import/components/ImportSaveInProgress.d.ts +1 -1
  163. package/dist/data_import/import/ImportCollectionAction.d.ts +4 -3
  164. package/dist/editor/components/SlashCommandMenu.d.ts +2 -1
  165. package/dist/editor/editor.d.ts +10 -4
  166. package/dist/editor/selectors/color-selector.d.ts +1 -1
  167. package/dist/editor/selectors/link-selector.d.ts +1 -1
  168. package/dist/editor/selectors/node-selector.d.ts +1 -1
  169. package/dist/editor/selectors/text-buttons.d.ts +1 -1
  170. package/dist/editor.js +2623 -3574
  171. package/dist/editor.js.map +1 -1
  172. package/dist/form/EntityForm.d.ts +2 -1
  173. package/dist/form/EntityFormActions.d.ts +2 -1
  174. package/dist/form/components/FieldHelperText.d.ts +1 -1
  175. package/dist/form/components/FormEntry.d.ts +1 -1
  176. package/dist/form/components/FormLayout.d.ts +1 -1
  177. package/dist/form/components/LabelWithIconAndTooltip.d.ts +1 -1
  178. package/dist/form/components/LocalChangesMenu.d.ts +2 -1
  179. package/dist/form/components/StorageItemPreview.d.ts +2 -1
  180. package/dist/form/components/StorageUploadProgress.d.ts +2 -1
  181. package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +2 -1
  182. package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +2 -1
  183. package/dist/form/field_bindings/BlockFieldBinding.d.ts +2 -1
  184. package/dist/form/field_bindings/DateTimeFieldBinding.d.ts +2 -1
  185. package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +2 -1
  186. package/dist/form/field_bindings/MapFieldBinding.d.ts +2 -1
  187. package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +4 -3
  188. package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +2 -1
  189. package/dist/form/field_bindings/MultipleRelationFieldBinding.d.ts +2 -1
  190. package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +2 -1
  191. package/dist/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +2 -1
  192. package/dist/form/field_bindings/ReferenceFieldBinding.d.ts +2 -1
  193. package/dist/form/field_bindings/RelationFieldBinding.d.ts +2 -1
  194. package/dist/form/field_bindings/RepeatFieldBinding.d.ts +2 -1
  195. package/dist/form/field_bindings/SelectFieldBinding.d.ts +2 -1
  196. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +3 -2
  197. package/dist/form/field_bindings/SwitchFieldBinding.d.ts +2 -1
  198. package/dist/form/field_bindings/TextFieldBinding.d.ts +2 -1
  199. package/dist/form/field_bindings/UserSelectFieldBinding.d.ts +2 -1
  200. package/dist/form/field_bindings/VectorFieldBinding.d.ts +2 -1
  201. package/dist/history-BO6VT85a.js +311 -0
  202. package/dist/history-BO6VT85a.js.map +1 -0
  203. package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +0 -2
  204. package/dist/hooks/navigation/useNavigationResolution.d.ts +5 -6
  205. package/dist/hooks/navigation/useResolvedCollections.d.ts +0 -2
  206. package/dist/hooks/useBreadcrumbsController.d.ts +2 -32
  207. package/dist/index.d.ts +1 -1
  208. package/dist/index.js +2 -3393
  209. package/dist/markdown-CklalUUk.js +526 -0
  210. package/dist/markdown-CklalUUk.js.map +1 -0
  211. package/dist/preview/components/ArrayEnumPreview.d.ts +2 -1
  212. package/dist/preview/components/EmptyValue.d.ts +2 -1
  213. package/dist/preview/components/EnumValuesChip.d.ts +1 -1
  214. package/dist/preview/components/ImagePreview.d.ts +2 -1
  215. package/dist/preview/components/ReferencePreview.d.ts +2 -1
  216. package/dist/preview/components/RelationPreview.d.ts +2 -1
  217. package/dist/preview/components/StorageThumbnail.d.ts +1 -1
  218. package/dist/preview/components/UserPreview.d.ts +6 -3
  219. package/dist/preview/property_previews/ArrayOfMapsPreview.d.ts +2 -1
  220. package/dist/preview/property_previews/ArrayOfReferencesPreview.d.ts +1 -1
  221. package/dist/preview/property_previews/ArrayOfRelationsPreview.d.ts +1 -1
  222. package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +2 -1
  223. package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +2 -1
  224. package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +2 -1
  225. package/dist/preview/property_previews/ArrayPropertyEnumPreview.d.ts +1 -1
  226. package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +2 -1
  227. package/dist/preview/property_previews/MapPropertyPreview.d.ts +3 -2
  228. package/dist/preview/property_previews/SkeletonPropertyComponent.d.ts +5 -4
  229. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  230. package/dist/routes/RebaseRoute.d.ts +1 -1
  231. package/dist/src-BYniefVu.js +24011 -0
  232. package/dist/src-BYniefVu.js.map +1 -0
  233. package/dist/types/components/PropertyPreviewProps.d.ts +4 -0
  234. package/dist/types/components/formex.d.ts +1 -40
  235. package/dist/types/fields.d.ts +9 -1
  236. package/dist/util/navigation_utils.d.ts +2 -1
  237. package/dist/util/previews.d.ts +5 -0
  238. package/dist/util/property_utils.d.ts +1 -1
  239. package/package.json +29 -26
  240. package/src/collection_editor/ConfigControllerProvider.tsx +10 -7
  241. package/src/collection_editor/ui/AddKanbanColumnAction.tsx +2 -0
  242. package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +2 -1
  243. package/src/collection_editor/ui/EditorCollectionAction.tsx +2 -1
  244. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +2 -1
  245. package/src/collection_editor/ui/EditorEntityAction.tsx +2 -1
  246. package/src/collection_editor/ui/KanbanSetupAction.tsx +2 -1
  247. package/src/collection_editor/ui/MissingReferenceWidget.tsx +2 -1
  248. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +2 -1
  249. package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +2 -3
  250. package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +0 -1
  251. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +8 -4
  252. package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +2 -1
  253. package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +1 -1
  254. package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +5 -2
  255. package/src/collection_editor/useLocalCollectionsConfigController.tsx +7 -2
  256. package/src/collection_editor/validateCollectionJson.ts +2 -2
  257. package/src/components/ArrayContainer.tsx +5 -5
  258. package/src/components/CollectionPanel.tsx +51 -25
  259. package/src/components/DefaultAppBar.tsx +1 -2
  260. package/src/components/DefaultDrawer.tsx +3 -2
  261. package/src/components/DrawerNavigationGroup.tsx +3 -2
  262. package/src/components/DrawerNavigationItem.tsx +4 -4
  263. package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +30 -9
  264. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +1 -1
  265. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -0
  266. package/src/components/EntityCollectionView/Board.tsx +10 -8
  267. package/src/components/EntityCollectionView/BoardSortableList.tsx +2 -2
  268. package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +6 -2
  269. package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +14 -4
  270. package/src/components/EntityCollectionView/EntityCollectionListView.tsx +48 -26
  271. package/src/components/EntityCollectionView/EntityCollectionView.tsx +146 -73
  272. package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +2 -1
  273. package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +3 -2
  274. package/src/components/EntityCollectionView/FilterPresetsButton.tsx +4 -2
  275. package/src/components/EntityCollectionView/ViewModeToggle.tsx +0 -1
  276. package/src/components/EntityCollectionView/useBoardDataController.tsx +17 -15
  277. package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +29 -19
  278. package/src/components/EntityDetailView.tsx +66 -30
  279. package/src/components/EntityEditView.tsx +70 -32
  280. package/src/components/EntitySidePanel.tsx +6 -3
  281. package/src/components/HomePage/ContentHomePage.tsx +3 -3
  282. package/src/components/HomePage/NavigationCard.tsx +9 -15
  283. package/src/components/HomePage/NavigationCardBinding.tsx +1 -1
  284. package/src/components/HomePage/NavigationGroup.tsx +1 -1
  285. package/src/components/HomePage/SmallNavigationCard.tsx +1 -5
  286. package/src/components/RebaseLayout.tsx +5 -2
  287. package/src/components/RebaseNavigation.tsx +1 -4
  288. package/src/components/RebaseRouteDefs.tsx +5 -3
  289. package/src/components/SearchIconsView.tsx +1 -1
  290. package/src/components/SelectableTable/SelectableTable.tsx +2 -3
  291. package/src/components/SelectableTable/SelectionStore.ts +9 -3
  292. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +28 -21
  293. package/src/components/UserSelector.tsx +92 -2
  294. package/src/components/common/default_entity_actions.tsx +33 -8
  295. package/src/components/field_configs.tsx +6 -3
  296. package/src/editor/editor.tsx +15 -9
  297. package/src/editor/extensions/Image/index.ts +2 -2
  298. package/src/editor/extensions/Image.ts +2 -2
  299. package/src/editor/extensions/clipboard.ts +2 -2
  300. package/src/editor/markdown-it-plugins.d.ts +24 -0
  301. package/src/editor/markdown.ts +2 -3
  302. package/src/form/EntityForm.tsx +21 -15
  303. package/src/form/field_bindings/MapFieldBinding.tsx +3 -3
  304. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +4 -4
  305. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +1 -1
  306. package/src/form/field_bindings/VectorFieldBinding.tsx +3 -3
  307. package/src/form/validation.ts +17 -15
  308. package/src/hooks/navigation/useBuildNavigationStateController.tsx +3 -6
  309. package/src/hooks/navigation/useNavigationResolution.ts +143 -19
  310. package/src/hooks/navigation/useResolvedCollections.ts +4 -6
  311. package/src/hooks/useBreadcrumbsController.tsx +2 -34
  312. package/src/hooks/useBuildSideEntityController.tsx +25 -3
  313. package/src/index.ts +2 -2
  314. package/src/preview/PropertyPreview.tsx +6 -2
  315. package/src/preview/components/ReferencePreview.tsx +64 -13
  316. package/src/preview/components/RelationPreview.tsx +101 -13
  317. package/src/preview/components/UserPreview.tsx +5 -14
  318. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +1 -1
  319. package/src/routes/RebaseRoute.tsx +5 -4
  320. package/src/types/components/PropertyPreviewProps.tsx +5 -0
  321. package/src/types/components/formex.tsx +1 -45
  322. package/src/types/fields.tsx +10 -1
  323. package/src/util/navigation_utils.ts +14 -4
  324. package/src/util/previews.ts +101 -4
  325. package/dist/CollectionEditorDialog-C8E440oK.js +0 -4574
  326. package/dist/CollectionEditorDialog-C8E440oK.js.map +0 -1
  327. package/dist/CollectionsStudioView-Brr_b06v.js +0 -217
  328. package/dist/CollectionsStudioView-Brr_b06v.js.map +0 -1
  329. package/dist/ExportCollectionAction-D3TTYXrq.js +0 -446
  330. package/dist/ExportCollectionAction-D3TTYXrq.js.map +0 -1
  331. package/dist/ImportCollectionAction-Dn7lya6E.js +0 -685
  332. package/dist/ImportCollectionAction-Dn7lya6E.js.map +0 -1
  333. package/dist/PropertyEditView-ChBleIbN.js +0 -8197
  334. package/dist/PropertyEditView-ChBleIbN.js.map +0 -1
  335. package/dist/collection_editor_ui.js.map +0 -1
  336. package/dist/index-D3S9x_RP.js +0 -462
  337. package/dist/index-D3S9x_RP.js.map +0 -1
  338. package/dist/index-D9RNzm01.js +0 -12
  339. package/dist/index-D9RNzm01.js.map +0 -1
  340. package/dist/index-DrrT332R.js +0 -8
  341. package/dist/index-DrrT332R.js.map +0 -1
  342. package/dist/index.js.map +0 -1
  343. package/dist/markdown-DD2JDU1X.js +0 -618
  344. package/dist/markdown-DD2JDU1X.js.map +0 -1
  345. package/dist/useEntityHistory-UVsSclfZ.js +0 -123
  346. package/dist/useEntityHistory-UVsSclfZ.js.map +0 -1
  347. package/dist/util-COYYD8zr.js +0 -30474
  348. package/dist/util-COYYD8zr.js.map +0 -1
@@ -2,6 +2,7 @@ import React from "react";
2
2
  import { Outlet } from "react-router-dom";
3
3
  import {
4
4
  useAdminModeController,
5
+ useComponentOverride,
5
6
  useRebaseRegistry
6
7
  } from "@rebasepro/core";
7
8
 
@@ -52,14 +53,16 @@ export function RebaseLayout(props: RebaseLayoutProps) {
52
53
  } = props;
53
54
 
54
55
  const adminModeController = useAdminModeController();
56
+ const ResolvedAppBar = useComponentOverride("Shell.AppBar", AppBar);
57
+ const ResolvedDrawer = useComponentOverride("Shell.Drawer", Drawer);
55
58
 
56
- const ActiveAppBar = appBar ?? <AppBar
59
+ const ActiveAppBar = appBar ?? <ResolvedAppBar
57
60
  includeLanguageToggle={false}
58
61
  includeModeToggle={false}
59
62
  includeUserMenu={false}
60
63
  />;
61
64
  const ActiveDrawer = drawer ?? (
62
- <Drawer
65
+ <ResolvedDrawer
63
66
  title={title}
64
67
  logoDestination={adminModeController.mode === "studio" ? "/s" : "/"}
65
68
  />
@@ -6,7 +6,6 @@ import {
6
6
  useCustomizationController,
7
7
  useAdminModeController,
8
8
  useBuildLocalConfigurationPersistence,
9
- useInternalUserManagementController,
10
9
  useRebaseClient,
11
10
  StudioBridgeRegistryProvider,
12
11
  useBridgeRegistration,
@@ -67,7 +66,6 @@ export function RebaseNavigation({ children }: RebaseNavigationProps) {
67
66
  const registry = useRebaseRegistry();
68
67
  const context = useRebaseContext();
69
68
  const adminModeController = useAdminModeController();
70
- const userManagement = useInternalUserManagementController();
71
69
  const userConfigPersistence = useBuildLocalConfigurationPersistence();
72
70
 
73
71
  // ── Collection Editor resolution ──────────────────────────────────
@@ -147,8 +145,7 @@ export function RebaseNavigation({ children }: RebaseNavigationProps) {
147
145
  data: context.data,
148
146
  collectionRegistryController,
149
147
  urlController,
150
- adminMode: adminModeController?.mode,
151
- userManagement
148
+ adminMode: adminModeController?.mode
152
149
  });
153
150
 
154
151
  // ── Merge CMS-registered entityViews/entityActions into the customization controller ──
@@ -5,11 +5,12 @@ import {
5
5
  RebaseRoutes,
6
6
  UserSettingsView,
7
7
  UIReferenceView,
8
- NotFoundPage
8
+ NotFoundPage,
9
+ useComponentOverride
9
10
  } from "@rebasepro/core";
10
11
  import { CircularProgressCenter } from "@rebasepro/ui";
11
12
 
12
- import { ContentHomePage } from "./HomePage/ContentHomePage";
13
+ import { ContentHomePage as DefaultHomePage } from "./HomePage/ContentHomePage";
13
14
 
14
15
  import { RebaseRoute } from "../routes/RebaseRoute";
15
16
  import { CustomViewRoute } from "../routes/CustomViewRoute";
@@ -65,7 +66,8 @@ export function RebaseRouteDefs({ children, layout }: RebaseRouteDefsProps) {
65
66
  const registry = useRebaseRegistry();
66
67
  const navigationStateController = useNavigationStateController();
67
68
 
68
- const cmsHomePage = registry.cmsConfig?.homePage ?? <Suspense fallback={<CircularProgressCenter/>}><ContentHomePage/></Suspense>;
69
+ const ResolvedHomePage = useComponentOverride("HomePage", DefaultHomePage);
70
+ const cmsHomePage = registry.cmsConfig?.homePage ?? <Suspense fallback={<CircularProgressCenter/>}><ResolvedHomePage/></Suspense>;
69
71
  const studioHomePage = registry.studioConfig?.homePage;
70
72
 
71
73
  const combinedViews = useMemo(() => [
@@ -17,7 +17,7 @@ const UPDATE_SEARCH_INDEX_WAIT_MS = 220;
17
17
 
18
18
 
19
19
  function toPascalCase(str: string): string {
20
- return str.split(/[-_]/).map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
20
+ return str.split(/[-_]/).map(word => word.charAt(0).toUpperCase() + word.slice(1)).join("");
21
21
  }
22
22
 
23
23
  function resolveIcon(iconKey: string): React.ComponentType<{ size: number }> | null {
@@ -24,7 +24,7 @@ export type SelectableTableProps<M extends Record<string, unknown>> = {
24
24
 
25
25
  columns: VirtualTableColumn[];
26
26
 
27
- cellRenderer: React.ComponentType<CellRendererParams<Entity<M>>>;
27
+ cellRenderer: (props: CellRendererParams<Entity<M>>) => React.ReactNode;
28
28
 
29
29
  /**
30
30
  * Builder for creating the buttons in each row
@@ -247,8 +247,7 @@ export const SelectableTable = function SelectableTable<M extends Record<string,
247
247
  <VirtualTable
248
248
  data={data as unknown as Record<string, unknown>[]}
249
249
  columns={columns}
250
- // @ts-ignore
251
- cellRenderer={cellRenderer}
250
+ cellRenderer={(props) => cellRenderer(props as unknown as CellRendererParams<Entity<M>>)}
252
251
  onRowClick={inlineEditing ? undefined : (onEntityClick ? onRowClick : undefined)}
253
252
  onEndReached={loadNextPage}
254
253
  onResetPagination={resetPagination}
@@ -32,7 +32,9 @@ export function createSelectionStore() {
32
32
  listeners.forEach(l => l());
33
33
  }
34
34
 
35
- return { getSnapshot, subscribe, select };
35
+ return { getSnapshot,
36
+ subscribe,
37
+ select };
36
38
  }
37
39
 
38
40
  export type SelectionStore = ReturnType<typeof createSelectionStore>;
@@ -51,8 +53,12 @@ export function useCellSelected(
51
53
  // Memoize a selector that derives a boolean from the store snapshot.
52
54
  // useSyncExternalStore calls this on every store notification, but
53
55
  // React only re-renders when the returned value !== the previous one.
54
- const selectorRef = useRef({ propertyKey, entityPath, entityId });
55
- selectorRef.current = { propertyKey, entityPath, entityId };
56
+ const selectorRef = useRef({ propertyKey,
57
+ entityPath,
58
+ entityId });
59
+ selectorRef.current = { propertyKey,
60
+ entityPath,
61
+ entityId };
56
62
 
57
63
  const getSnapshot = useCallback(() => {
58
64
  const cell = store.getSnapshot();
@@ -1,8 +1,15 @@
1
-
2
1
  import React, { useState } from "react";
3
2
  import { EnumValuesChip } from "../../../preview";
4
- import { VirtualTableWhereFilterOp } from "@rebasepro/ui";
5
- import { IconButton, MultiSelect, MultiSelectItem, Select, SelectItem, TextField, XIcon } from "@rebasepro/ui";
3
+ import {
4
+ IconButton,
5
+ MultiSelect,
6
+ MultiSelectItem,
7
+ Select,
8
+ SelectItem,
9
+ TextField,
10
+ VirtualTableWhereFilterOp,
11
+ XIcon
12
+ } from "@rebasepro/ui";
6
13
  import { EnumValueConfig } from "@rebasepro/types";
7
14
  import { useTranslation } from "@rebasepro/core";
8
15
 
@@ -33,14 +40,14 @@ const operationLabels = {
33
40
  const multipleSelectOperations = ["array-contains-any", "in", "not-in"];
34
41
 
35
42
  export function StringNumberFilterField({
36
- name,
37
- value,
38
- setValue,
39
- type,
40
- isArray,
41
- enumValues,
42
- title
43
- }: StringNumberFilterFieldProps) {
43
+ name,
44
+ value,
45
+ setValue,
46
+ type,
47
+ isArray,
48
+ enumValues,
49
+ title
50
+ }: StringNumberFilterFieldProps) {
44
51
  const { t } = useTranslation();
45
52
 
46
53
  const possibleOperations: (keyof typeof operationLabels)[] = isArray
@@ -110,13 +117,13 @@ export function StringNumberFilterField({
110
117
  <div className="flex w-full">
111
118
  <div className={"w-[100px]"}>
112
119
  <Select value={operation}
113
- size={"medium"}
114
- fullWidth={true}
115
- position={"item-aligned"}
116
- onValueChange={(value) => {
117
- updateFilter(value as VirtualTableWhereFilterOp | "is-null", internalValue);
118
- }}
119
- renderValue={(op) => operationLabels[op as keyof typeof operationLabels]}>
120
+ size={"medium"}
121
+ fullWidth={true}
122
+ position={"item-aligned"}
123
+ onValueChange={(value) => {
124
+ updateFilter(value as VirtualTableWhereFilterOp | "is-null", internalValue);
125
+ }}
126
+ renderValue={(op) => operationLabels[op as keyof typeof operationLabels]}>
120
127
  {possibleOperations.map((op) => (
121
128
  <SelectItem key={op} value={op}>
122
129
  {operationLabels[op]}
@@ -174,7 +181,7 @@ export function StringNumberFilterField({
174
181
  }}>
175
182
  {enumValues.map((enumConfig) => (
176
183
  <SelectItem key={`select_item_${name}_${enumConfig.id}`}
177
- value={String(enumConfig.id)}>
184
+ value={String(enumConfig.id)}>
178
185
  <EnumValuesChip
179
186
  enumKey={String(enumConfig.id)}
180
187
  enumValues={enumValues}
@@ -191,7 +198,7 @@ export function StringNumberFilterField({
191
198
  value={Array.isArray(internalValue) ? internalValue.map(e => String(e)) : []}
192
199
  disabled={isNullOperation}
193
200
  onValueChange={(value) => {
194
- updateFilter(operation, type === "number" ? value.map(v => parseInt(v)) : value)
201
+ updateFilter(operation, type === "number" ? (value ?? []).map(v => parseInt(v)) : value)
195
202
  }}
196
203
  multiple={multiple}
197
204
  endAdornment={internalValue && <IconButton
@@ -202,7 +209,7 @@ export function StringNumberFilterField({
202
209
  >
203
210
  {enumValues.map((enumConfig) => (
204
211
  <MultiSelectItem key={`select_value_${name}_${enumConfig.id}`}
205
- value={String(enumConfig.id)}>
212
+ value={String(enumConfig.id)}>
206
213
  <EnumValuesChip
207
214
  enumKey={String(enumConfig.id)}
208
215
  enumValues={enumValues}
@@ -21,10 +21,100 @@ import * as React from "react";
21
21
  import { useCallback, useEffect, useRef, useState } from "react";
22
22
  import { Command as CommandPrimitive } from "cmdk";
23
23
  import { User } from "@rebasepro/types";
24
- import { useUserSelector, UserSelectorItem } from "@rebasepro/core";
25
- import { UserDisplay } from "@rebasepro/core";
24
+ import { useRebaseClient, useAuthController, UserDisplay } from "@rebasepro/core";
26
25
  import { EmptyValue } from "../preview";
27
26
 
27
+ interface UserSelectorItem {
28
+ uid: string;
29
+ label: string;
30
+ description?: string;
31
+ user: User;
32
+ }
33
+
34
+ const DEFAULT_PAGE_SIZE = 10;
35
+
36
+ /**
37
+ * Local hook to fetch users from the collection REST API with search and pagination.
38
+ */
39
+ function useUserSelector({ pageSize = DEFAULT_PAGE_SIZE }: { pageSize?: number } = {}) {
40
+ const client = useRebaseClient<{ baseUrl?: string }>();
41
+ const { getAuthToken } = useAuthController();
42
+
43
+ const [items, setItems] = useState<UserSelectorItem[]>([]);
44
+ const [isLoading, setIsLoading] = useState(false);
45
+ const [hasMore, setHasMore] = useState(true);
46
+ const [currentSearch, setCurrentSearch] = useState("");
47
+ const offsetRef = useRef(0);
48
+ const userCacheRef = useRef<Map<string, User>>(new Map());
49
+
50
+ const fetchUsers = useCallback(async (searchStr: string, offset: number, append: boolean) => {
51
+ if (!client?.baseUrl) return;
52
+ setIsLoading(true);
53
+ try {
54
+ const token = await getAuthToken?.();
55
+ const params = new URLSearchParams({
56
+ limit: String(pageSize),
57
+ offset: String(offset)
58
+ });
59
+ if (searchStr) params.set("search", searchStr);
60
+ const response = await fetch(`${client.baseUrl}/api/users?${params}`, {
61
+ headers: token ? { Authorization: `Bearer ${token}` } : {}
62
+ });
63
+ if (!response.ok) throw new Error("Failed to fetch users");
64
+ const data = await response.json();
65
+ const rows: Record<string, unknown>[] = data.data ?? data.users ?? [];
66
+ const newItems: UserSelectorItem[] = rows.map((r: Record<string, unknown>) => {
67
+ const user: User = {
68
+ uid: (r.id as string) ?? "",
69
+ email: (r.email as string) ?? "",
70
+ displayName: (r.displayName as string) ?? (r.display_name as string) ?? null,
71
+ photoURL: (r.photoURL as string) ?? (r.photo_url as string) ?? null,
72
+ providerId: "custom",
73
+ isAnonymous: false,
74
+ roles: (r.roles as string[]) ?? []
75
+ };
76
+ userCacheRef.current.set(user.uid, user);
77
+ return { uid: user.uid,
78
+ label: user.displayName ?? user.email ?? user.uid,
79
+ user };
80
+ });
81
+ setItems(prev => append ? [...prev, ...newItems] : newItems);
82
+ setHasMore(newItems.length >= pageSize);
83
+ offsetRef.current = offset + newItems.length;
84
+ } catch {
85
+ setHasMore(false);
86
+ } finally {
87
+ setIsLoading(false);
88
+ }
89
+ }, [client?.baseUrl, getAuthToken, pageSize]);
90
+
91
+ useEffect(() => {
92
+ offsetRef.current = 0;
93
+ fetchUsers("", 0, false);
94
+ }, [fetchUsers]);
95
+
96
+ const search = useCallback((searchStr: string) => {
97
+ setCurrentSearch(searchStr);
98
+ offsetRef.current = 0;
99
+ fetchUsers(searchStr, 0, false);
100
+ }, [fetchUsers]);
101
+
102
+ const loadMore = useCallback(() => {
103
+ fetchUsers(currentSearch, offsetRef.current, true);
104
+ }, [fetchUsers, currentSearch]);
105
+
106
+ const getUser = useCallback((uid: string): User | null => {
107
+ return userCacheRef.current.get(uid) ?? null;
108
+ }, []);
109
+
110
+ return { items,
111
+ isLoading,
112
+ hasMore,
113
+ search,
114
+ loadMore,
115
+ getUser };
116
+ }
117
+
28
118
  export interface UserSelectorProps {
29
119
  className?: string;
30
120
  name?: string;
@@ -1,6 +1,6 @@
1
1
  import { CopyIcon, iconSize, KeyRoundIcon, PencilIcon, Trash2Icon } from "@rebasepro/ui";
2
2
  import type { EntityAction, User, UserCreationResult } from "@rebasepro/types";
3
- import { ConfirmationDialog, useInternalUserManagementController, useSnackbarController, useTranslation } from "@rebasepro/core";
3
+ import { ConfirmationDialog, useSnackbarController, useTranslation, useRebaseClient, useAuthController } from "@rebasepro/core";
4
4
  import { DeleteEntityDialog } from "../DeleteEntityDialog";
5
5
  import { addRecentId } from "../EntityCollectionView/utils";
6
6
  import { navigateToEntity } from "../../util/navigation_utils";
@@ -125,7 +125,8 @@ export const deleteEntityAction: EntityAction = {
125
125
  context,
126
126
  selectionController,
127
127
  onCollectionChange,
128
- navigateBack
128
+ navigateBack,
129
+ openEntityMode
129
130
  }): Promise<void> {
130
131
  if (!entity) {
131
132
  throw new Error("INTERNAL: deleteEntityAction: Entity is undefined");
@@ -150,7 +151,14 @@ export const deleteEntityAction: EntityAction = {
150
151
  });
151
152
  selectionController?.setSelectedEntities(selectionController.selectedEntities.filter(e => e.id !== entity.id));
152
153
  onCollectionChange?.();
153
- navigateBack?.();
154
+ // In full-screen mode, navigateBack would go to the deleted entity's
155
+ // detail URL, which no longer exists. Navigate to the parent collection instead.
156
+ if (openEntityMode === "full_screen" && context.urlController) {
157
+ const collectionUrl = context.urlController.buildUrlCollectionPath(path);
158
+ context.urlController.navigate(collectionUrl, { replace: true });
159
+ } else {
160
+ navigateBack?.();
161
+ }
154
162
  }}
155
163
  onClose={closeDialog}/>;
156
164
  }
@@ -168,18 +176,35 @@ export function ResetPasswordActionDialog({
168
176
  open: boolean;
169
177
  onClose: () => void;
170
178
  }) {
171
- const userManagement = useInternalUserManagementController();
179
+ const client = useRebaseClient<{ baseUrl?: string }>();
180
+ const { getAuthToken } = useAuthController();
172
181
  const snackbarController = useSnackbarController();
173
182
  const { t } = useTranslation();
174
183
  const [loading, setLoading] = useState(false);
175
184
  const [creationResult, setCreationResult] = useState<UserCreationResult | null>(null);
176
185
 
177
186
  const handleConfirm = async () => {
178
- if (!userManagement?.resetPassword) return;
179
187
  setLoading(true);
180
188
  try {
181
- const result = await userManagement.resetPassword(user);
182
- setCreationResult(result);
189
+ const baseUrl = client?.baseUrl || "";
190
+ const token = await getAuthToken?.();
191
+ const response = await fetch(`${baseUrl}/api/admin/users/${user.uid}/reset-password`, {
192
+ method: "POST",
193
+ headers: {
194
+ "Content-Type": "application/json",
195
+ ...(token ? { "Authorization": `Bearer ${token}` } : {})
196
+ }
197
+ });
198
+ if (!response.ok) {
199
+ const error = await response.json().catch(() => ({}));
200
+ throw new Error(error.message || "Failed to reset password");
201
+ }
202
+ const data = await response.json();
203
+ setCreationResult({
204
+ user,
205
+ invitationSent: data.invitationSent ?? false,
206
+ temporaryPassword: data.temporaryPassword
207
+ });
183
208
  snackbarController.open({
184
209
  type: "success",
185
210
  message: t("reset_password_success") || "Password reset successfully"
@@ -228,7 +253,7 @@ export const resetPasswordAction: EntityAction = {
228
253
  isEnabled: ({ entity }) => Boolean(entity),
229
254
  onClick({
230
255
  entity,
231
- context,
256
+ context
232
257
  }): Promise<void> {
233
258
  if (!entity) {
234
259
  throw new Error("INTERNAL: resetPasswordAction: Entity is undefined");
@@ -63,7 +63,8 @@ export const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig> =
63
63
  color: "#2d7ff9",
64
64
  property: {
65
65
  type: "string",
66
- ui: { multiline: true, Field: TextFieldBinding }
66
+ ui: { multiline: true,
67
+ Field: TextFieldBinding }
67
68
  }
68
69
  },
69
70
  markdown: {
@@ -74,7 +75,8 @@ export const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig> =
74
75
  color: "#2d7ff9",
75
76
  property: {
76
77
  type: "string",
77
- ui: { markdown: true, Field: MarkdownEditorFieldBinding }
78
+ ui: { markdown: true,
79
+ Field: MarkdownEditorFieldBinding }
78
80
  }
79
81
  },
80
82
  url: {
@@ -85,7 +87,8 @@ export const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig> =
85
87
  color: "#154fb3",
86
88
  property: {
87
89
  type: "string",
88
- ui: { url: true, Field: TextFieldBinding }
90
+ ui: { url: true,
91
+ Field: TextFieldBinding }
89
92
  }
90
93
  },
91
94
  email: {
@@ -25,22 +25,26 @@ export interface MarkdownEditorConfig {
25
25
  transformPastedText?: boolean;
26
26
  }
27
27
 
28
- export type RebaseEditorTextSize = "sm" | "base" | "lg";
28
+ export type RichTextEditorTextSize = "sm" | "base" | "lg";
29
+ /** @deprecated Use `RichTextEditorTextSize` instead. */
30
+ export type RebaseEditorTextSize = RichTextEditorTextSize;
29
31
 
30
- export type RebaseEditorProps = {
32
+ export type RichTextEditorProps = {
31
33
  content?: JSONContent | string,
32
34
  onMarkdownContentChange?: (content: string) => void,
33
35
  onJsonContentChange?: (content: JSONContent | null) => void,
34
36
  onHtmlContentChange?: (content: string) => void,
35
37
  handleImageUpload: (file: File) => Promise<string>,
36
38
  version?: number,
37
- textSize?: RebaseEditorTextSize,
39
+ textSize?: RichTextEditorTextSize,
38
40
  highlight?: { from: number, to: number },
39
41
  aiController?: EditorAIController,
40
42
  customComponents?: CustomEditorComponent[];
41
43
  disabled?: boolean;
42
44
  markdownConfig?: MarkdownEditorConfig;
43
45
  };
46
+ /** @deprecated Use `RichTextEditorProps` instead. */
47
+ export type RebaseEditorProps = RichTextEditorProps;
44
48
 
45
49
  const proseClasses = {
46
50
  "sm": "prose-sm",
@@ -48,7 +52,7 @@ const proseClasses = {
48
52
  "lg": "prose-lg"
49
53
  }
50
54
 
51
- export const RebaseEditor = ({
55
+ export const RichTextEditor = ({
52
56
  content,
53
57
  onJsonContentChange,
54
58
  onHtmlContentChange,
@@ -60,7 +64,8 @@ export const RebaseEditor = ({
60
64
  aiController,
61
65
  disabled,
62
66
  markdownConfig
63
- }: RebaseEditorProps) => {
67
+ }: RichTextEditorProps) => {
68
+
64
69
  const { t } = useTranslation();
65
70
 
66
71
  const [openNode, setOpenNode] = useState(false);
@@ -134,7 +139,7 @@ onJsonContentChange };
134
139
  const markdown = serializer.serialize(currentState.doc);
135
140
  onMarkdownContentChange(markdown);
136
141
  } catch (e) {
137
- console.warn("[RebaseEditor] Could not serialize editor state to markdown:", e);
142
+ console.warn("[RichTextEditor] Could not serialize editor state to markdown:", e);
138
143
  }
139
144
  }
140
145
  if (onJsonContentChange) {
@@ -154,7 +159,7 @@ onJsonContentChange };
154
159
  // the reverted value.
155
160
  const versionRef = useRef(version);
156
161
  useEffect(() => {
157
- if (versionRef.current === version) return; // skip initial render
162
+ if (versionRef.current === version) return; // skip initial render
158
163
  versionRef.current = version;
159
164
  if (!view) return;
160
165
  try {
@@ -168,7 +173,7 @@ onJsonContentChange };
168
173
  view.dispatch(tr);
169
174
  }
170
175
  } catch (e) {
171
- console.warn("[RebaseEditor] Could not reset editor content:", e);
176
+ console.warn("[RichTextEditor] Could not reset editor content:", e);
172
177
  }
173
178
  // Also reset raw-markdown textarea if the user is in source mode
174
179
  if (isMarkdownMode) {
@@ -319,7 +324,8 @@ view }), [state, view])}>
319
324
  </div>
320
325
  );
321
326
  };
322
-
327
+ /** @deprecated Use `RichTextEditor` instead. */
328
+ export const RebaseEditor = RichTextEditor;
323
329
 
324
330
  const cssStyles = `
325
331
  .ProseMirror {
@@ -5,8 +5,8 @@ import { schema } from "../../schema";
5
5
  export type UploadFn = (image: File) => Promise<string>;
6
6
 
7
7
  export async function onFileRead(view: EditorView, readerEvent: ProgressEvent<FileReader>, pos: number, upload: UploadFn, image: File) {
8
- // @ts-ignore
9
- const plugin = view.state.plugins.find((p: Plugin) => p.key === ImagePluginKey.key);
8
+ const state = view.state as typeof view.state & { plugins: Plugin[] };
9
+ const plugin = state.plugins.find((p: Plugin) => p.spec.key === ImagePluginKey);
10
10
  if (!plugin) {
11
11
  console.error("Image plugin not found");
12
12
  return;
@@ -8,8 +8,8 @@ export async function onFileRead(view: EditorView, readerEvent: ProgressEvent<Fi
8
8
 
9
9
  const { schema } = view.state;
10
10
 
11
- // @ts-ignore
12
- const plugin = view.state.plugins.find((p: Plugin) => p.key === ImagePluginKey.key);
11
+ const state = view.state as typeof view.state & { plugins: Plugin[] };
12
+ const plugin = state.plugins.find((p: Plugin) => p.spec.key === ImagePluginKey);
13
13
  if (!plugin) {
14
14
  console.error("Image plugin not found");
15
15
  return;
@@ -16,8 +16,8 @@ export function serializeForClipboard(view: EditorView, slice: Slice) {
16
16
  openStart--
17
17
  openEnd--
18
18
  const node = content.firstChild!
19
- // @ts-ignore
20
- context.push(node.type.name, node.attrs != node.type.defaultAttrs ? node.attrs : null)
19
+ const nodeType = node.type as typeof node.type & { defaultAttrs?: unknown };
20
+ context.push(node.type.name, node.attrs != nodeType.defaultAttrs ? node.attrs : null)
21
21
  content = node.content
22
22
  }
23
23
 
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Ambient module declarations for markdown-it plugins that do not ship
3
+ * their own type declarations and have no DefinitelyTyped packages.
4
+ *
5
+ * Each plugin exports a default function that is a standard markdown-it
6
+ * plugin: it receives a MarkdownIt instance and optional options.
7
+ */
8
+ declare module "markdown-it-task-lists" {
9
+ import type MarkdownIt from "markdown-it";
10
+ const markdownItTaskLists: MarkdownIt.PluginSimple;
11
+ export default markdownItTaskLists;
12
+ }
13
+
14
+ declare module "markdown-it-mark" {
15
+ import type MarkdownIt from "markdown-it";
16
+ const markdownItMark: MarkdownIt.PluginSimple;
17
+ export default markdownItMark;
18
+ }
19
+
20
+ declare module "markdown-it-ins" {
21
+ import type MarkdownIt from "markdown-it";
22
+ const markdownItIns: MarkdownIt.PluginSimple;
23
+ export default markdownItIns;
24
+ }
@@ -1,3 +1,5 @@
1
+ /* eslint-disable @typescript-eslint/triple-slash-reference */
2
+ /// <reference path="./markdown-it-plugins.d.ts" />
1
3
  import {
2
4
  MarkdownParser,
3
5
  MarkdownSerializer,
@@ -5,11 +7,8 @@ import {
5
7
  defaultMarkdownSerializer
6
8
  } from "prosemirror-markdown";
7
9
  import markdownIt from "markdown-it";
8
- // @ts-expect-error -- markdown-it-task-lists does not ship type declarations
9
10
  import markdownItTaskLists from "markdown-it-task-lists";
10
- // @ts-expect-error -- markdown-it-mark does not ship type declarations
11
11
  import markdownItMark from "markdown-it-mark";
12
- // @ts-expect-error -- markdown-it-ins does not ship type declarations
13
12
  import markdownItIns from "markdown-it-ins";
14
13
 
15
14
  import { schema } from "./schema";