@rebasepro/admin 0.9.0 → 0.9.1-canary.0fce67c

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 (234) hide show
  1. package/README.md +7 -7
  2. package/dist/{CollectionEditorDialog-B-7uW3iJ.js → CollectionEditorDialog-DbPpDDwb.js} +33 -11
  3. package/dist/CollectionEditorDialog-DbPpDDwb.js.map +1 -0
  4. package/dist/{PropertyEditView-7KMTcrqi.js → PropertyEditView-DfJbZ67t.js} +5 -5
  5. package/dist/PropertyEditView-DfJbZ67t.js.map +1 -0
  6. package/dist/{RouterCollectionsStudioView-epqIbZrJ.js → RouterCollectionsStudioView-C6XQ7Il5.js} +5 -5
  7. package/dist/RouterCollectionsStudioView-C6XQ7Il5.js.map +1 -0
  8. package/dist/collection_editor/api/generateCollectionApi.d.ts +4 -4
  9. package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +1 -1
  10. package/dist/collection_editor/ui/collection_editor/SwitchControl.d.ts +1 -1
  11. package/dist/collection_editor/useSafeSnackbarController.d.ts +1 -1
  12. package/dist/collection_editor_ui.js +5 -5
  13. package/dist/collection_editor_ui.js.map +1 -1
  14. package/dist/components/CollectionTableBinding/CollectionTableBindingProps.d.ts +1 -1
  15. package/dist/components/CollectionTableBinding/internal/EntityTableCell.d.ts +1 -1
  16. package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.d.ts +1 -1
  17. package/dist/components/CollectionTableBinding/table_bindings.d.ts +1 -1
  18. package/dist/components/CollectionViewBinding/hooks/useCollectionInlineEditor.d.ts +1 -1
  19. package/dist/components/{RebaseCMS.d.ts → RebaseAdmin.d.ts} +2 -2
  20. package/dist/components/RebaseLayout.d.ts +5 -4
  21. package/dist/components/RebaseShell.d.ts +1 -0
  22. package/dist/components/SelectableTable/SelectableTable.d.ts +1 -1
  23. package/dist/components/SelectableTable/SelectableTableContext.d.ts +1 -1
  24. package/dist/components/SidePanelProvider.d.ts +1 -1
  25. package/dist/components/index.d.ts +1 -1
  26. package/dist/editor.js +1 -1
  27. package/dist/editor.js.map +1 -1
  28. package/dist/form/components/LocalChangesMenu.d.ts +1 -1
  29. package/dist/form/components/StorageUploadProgress.d.ts +1 -1
  30. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +1 -1
  31. package/dist/{history-7X5bON_n.js → history-GSa4BgDt.js} +5 -5
  32. package/dist/history-GSa4BgDt.js.map +1 -0
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.js +2 -2
  35. package/dist/{src-sUZfe29F.js → src-B8WuGSPZ.js} +160 -56
  36. package/dist/src-B8WuGSPZ.js.map +1 -0
  37. package/dist/types/components/formex.d.ts +1 -1
  38. package/package.json +12 -17
  39. package/src/collection_editor/ConfigControllerProvider.tsx +1 -1
  40. package/src/collection_editor/api/generateCollectionApi.ts +4 -4
  41. package/src/collection_editor/ui/AddKanbanColumnAction.tsx +1 -1
  42. package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +1 -1
  43. package/src/collection_editor/ui/EditorCollectionAction.tsx +1 -1
  44. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +1 -1
  45. package/src/collection_editor/ui/EditorEntityAction.tsx +1 -1
  46. package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +1 -1
  47. package/src/collection_editor/ui/KanbanSetupAction.tsx +1 -1
  48. package/src/collection_editor/ui/MissingReferenceWidget.tsx +1 -1
  49. package/src/collection_editor/ui/NewCollectionButton.tsx +1 -1
  50. package/src/collection_editor/ui/NewCollectionCard.tsx +1 -1
  51. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +1 -1
  52. package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +1 -1
  53. package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +3 -3
  54. package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +3 -3
  55. package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +2 -2
  56. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +2 -2
  57. package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +37 -6
  58. package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +1 -1
  59. package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +1 -1
  60. package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +1 -1
  61. package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +2 -2
  62. package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +2 -2
  63. package/src/collection_editor/ui/collection_editor/EntityActionsSelectDialog.tsx +1 -1
  64. package/src/collection_editor/ui/collection_editor/EntityCustomViewsSelectDialog.tsx +1 -1
  65. package/src/collection_editor/ui/collection_editor/EnumForm.tsx +2 -2
  66. package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +2 -2
  67. package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +2 -2
  68. package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +2 -2
  69. package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +2 -2
  70. package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +1 -1
  71. package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +1 -1
  72. package/src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx +1 -1
  73. package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +2 -2
  74. package/src/collection_editor/ui/collection_editor/SwitchControl.tsx +1 -1
  75. package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +1 -1
  76. package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.tsx +2 -2
  77. package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +1 -1
  78. package/src/collection_editor/ui/collection_editor/properties/BooleanPropertyField.tsx +1 -1
  79. package/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.tsx +2 -2
  80. package/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.tsx +2 -2
  81. package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +2 -2
  82. package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +2 -2
  83. package/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.tsx +2 -2
  84. package/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.tsx +2 -2
  85. package/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.tsx +2 -2
  86. package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +1 -1
  87. package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +1 -1
  88. package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +2 -2
  89. package/src/collection_editor/ui/collection_editor/properties/StringPropertyField.tsx +2 -2
  90. package/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.tsx +1 -1
  91. package/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.tsx +1 -1
  92. package/src/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +1 -1
  93. package/src/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +1 -1
  94. package/src/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.tsx +1 -1
  95. package/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +2 -2
  96. package/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +2 -2
  97. package/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +2 -2
  98. package/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +2 -2
  99. package/src/collection_editor/useSafeSnackbarController.ts +1 -1
  100. package/src/components/AdminModeSyncer.tsx +1 -1
  101. package/src/components/ArrayContainer.tsx +1 -1
  102. package/src/components/ClearFilterSortButton.tsx +1 -1
  103. package/src/components/CollectionPanel.tsx +1 -1
  104. package/src/components/CollectionTableBinding/CollectionRowActions.tsx +2 -2
  105. package/src/components/CollectionTableBinding/CollectionTableBinding.tsx +3 -3
  106. package/src/components/CollectionTableBinding/CollectionTableBindingProps.tsx +1 -1
  107. package/src/components/CollectionTableBinding/PropertyTableCell.tsx +1 -1
  108. package/src/components/CollectionTableBinding/column_utils.tsx +1 -1
  109. package/src/components/CollectionTableBinding/fields/TableMultipleRelationField.tsx +2 -2
  110. package/src/components/CollectionTableBinding/fields/TableReferenceField.tsx +1 -1
  111. package/src/components/CollectionTableBinding/fields/TableRelationField.tsx +2 -2
  112. package/src/components/CollectionTableBinding/fields/TableStorageUpload.tsx +1 -1
  113. package/src/components/CollectionTableBinding/internal/CollectionTableToolbar.tsx +1 -1
  114. package/src/components/CollectionTableBinding/internal/EntityTableCell.tsx +2 -2
  115. package/src/components/CollectionTableBinding/internal/EntityTableCellActions.tsx +1 -1
  116. package/src/components/CollectionTableBinding/internal/popup_field/PopupFormField.tsx +4 -4
  117. package/src/components/CollectionTableBinding/table_bindings.tsx +1 -1
  118. package/src/components/CollectionViewBinding/BoardCardBinding.tsx +2 -2
  119. package/src/components/CollectionViewBinding/CollectionBoardViewBinding.tsx +3 -3
  120. package/src/components/CollectionViewBinding/CollectionCardViewBinding.tsx +1 -1
  121. package/src/components/CollectionViewBinding/CollectionListViewBinding.tsx +3 -3
  122. package/src/components/CollectionViewBinding/CollectionViewActions.tsx +2 -2
  123. package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +1 -1
  124. package/src/components/CollectionViewBinding/CollectionViewStartActions.tsx +1 -1
  125. package/src/components/CollectionViewBinding/EntityCardBinding.tsx +3 -3
  126. package/src/components/CollectionViewBinding/FiltersDialog.tsx +19 -1
  127. package/src/components/CollectionViewBinding/SplitListView.tsx +1 -1
  128. package/src/components/CollectionViewBinding/ViewModeToggle.tsx +1 -1
  129. package/src/components/CollectionViewBinding/hooks/useCollectionInlineEditor.ts +2 -2
  130. package/src/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.ts +2 -2
  131. package/src/components/CollectionViewBinding/useBoardDataController.tsx +9 -3
  132. package/src/components/CollectionViewBinding/usePreviewSlots.ts +1 -1
  133. package/src/components/DefaultAppBar.tsx +3 -3
  134. package/src/components/DefaultDrawer.tsx +3 -3
  135. package/src/components/DeleteEntityDialog.tsx +1 -1
  136. package/src/components/DetailViewBinding.tsx +3 -3
  137. package/src/components/DrawerNavigationGroup.tsx +2 -2
  138. package/src/components/EditFormActions.tsx +4 -4
  139. package/src/components/EditViewBinding.tsx +6 -6
  140. package/src/components/EntityPreviewBinding.tsx +3 -3
  141. package/src/components/EntityViewBinding.tsx +2 -2
  142. package/src/components/HomePage/ContentHomePage.tsx +4 -4
  143. package/src/components/HomePage/FavouritesView.tsx +1 -1
  144. package/src/components/HomePage/NavigationCardBinding.tsx +3 -3
  145. package/src/components/HomePage/NavigationGroup.tsx +1 -1
  146. package/src/components/HomePage/RenameGroupDialog.tsx +1 -1
  147. package/src/components/JsonPreviewBinding.tsx +1 -1
  148. package/src/components/{RebaseCMS.tsx → RebaseAdmin.tsx} +3 -3
  149. package/src/components/RebaseAuthGate.tsx +2 -2
  150. package/src/components/RebaseLayout.tsx +7 -13
  151. package/src/components/RebaseNavigation.tsx +18 -3
  152. package/src/components/RebaseRouteDefs.tsx +2 -2
  153. package/src/components/RebaseShell.tsx +2 -1
  154. package/src/components/ReferenceTable/SelectionTableBinding.tsx +5 -5
  155. package/src/components/RelationSelector.tsx +1 -1
  156. package/src/components/SearchIconsView.tsx +2 -2
  157. package/src/components/SelectableTable/SelectableTable.tsx +2 -2
  158. package/src/components/SelectableTable/SelectableTableContext.tsx +1 -1
  159. package/src/components/SelectableTable/filters/BooleanFilterField.tsx +1 -1
  160. package/src/components/SelectableTable/filters/DateTimeFilterField.tsx +1 -1
  161. package/src/components/SelectableTable/filters/FilterFieldBinding.tsx +1 -1
  162. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +1 -1
  163. package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +1 -1
  164. package/src/components/SideDialogs.tsx +1 -1
  165. package/src/components/SidePanelBinding.tsx +1 -1
  166. package/src/components/SidePanelProvider.tsx +2 -2
  167. package/src/components/UserSelector.tsx +1 -1
  168. package/src/components/admin/CreationResultDialog.tsx +6 -3
  169. package/src/components/app/Scaffold.tsx +6 -2
  170. package/src/components/common/default_entity_actions.tsx +123 -25
  171. package/src/components/field_configs.tsx +1 -1
  172. package/src/components/history/EntityHistoryEntry.tsx +1 -1
  173. package/src/components/history/EntityHistoryView.tsx +4 -4
  174. package/src/components/history/LastEditedByIndicator.tsx +2 -2
  175. package/src/components/index.ts +1 -1
  176. package/src/data_export/export/BasicExportAction.tsx +1 -1
  177. package/src/data_export/export/ExportCollectionAction.tsx +1 -1
  178. package/src/data_import/components/DataNewPropertiesMapping.tsx +1 -1
  179. package/src/data_import/components/ImportFileUpload.tsx +1 -1
  180. package/src/data_import/components/ImportNewPropertyFieldPreview.tsx +1 -1
  181. package/src/data_import/components/ImportSaveInProgress.tsx +1 -1
  182. package/src/data_import/import/ImportCollectionAction.tsx +2 -2
  183. package/src/data_import/utils/data.ts +2 -2
  184. package/src/data_import/utils/get_properties_mapping.ts +1 -1
  185. package/src/editor/components/image-bubble.tsx +1 -1
  186. package/src/editor/components/table-bubble.tsx +1 -1
  187. package/src/editor/editor.tsx +1 -1
  188. package/src/editor/selectors/link-selector.tsx +1 -1
  189. package/src/editor/selectors/node-selector.tsx +1 -1
  190. package/src/form/EntityForm.tsx +4 -4
  191. package/src/form/EntityFormActions.tsx +1 -1
  192. package/src/form/EntityFormBinding.tsx +4 -4
  193. package/src/form/PropertyFieldBinding.tsx +3 -3
  194. package/src/form/components/ErrorFocus.tsx +1 -1
  195. package/src/form/components/LocalChangesMenu.tsx +3 -3
  196. package/src/form/components/StorageItemPreview.tsx +1 -1
  197. package/src/form/components/StorageUploadProgress.tsx +3 -3
  198. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +1 -1
  199. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -1
  200. package/src/form/field_bindings/BlockFieldBinding.tsx +2 -2
  201. package/src/form/field_bindings/DateTimeFieldBinding.tsx +1 -1
  202. package/src/form/field_bindings/KeyValueFieldBinding.tsx +2 -2
  203. package/src/form/field_bindings/MapFieldBinding.tsx +1 -1
  204. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +2 -2
  205. package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +1 -1
  206. package/src/form/field_bindings/ReferenceFieldBinding.tsx +2 -2
  207. package/src/form/field_bindings/RelationFieldBinding.tsx +1 -1
  208. package/src/form/field_bindings/RepeatFieldBinding.tsx +1 -1
  209. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +3 -3
  210. package/src/form/form_utils.ts +1 -1
  211. package/src/hooks/navigation/useNavigationResolution.ts +19 -4
  212. package/src/hooks/useBuildSidePanel.tsx +2 -2
  213. package/src/hooks/useCMSContext.tsx +1 -1
  214. package/src/hooks/useHistory.ts +1 -1
  215. package/src/hooks/useResolvedNavigationFrom.tsx +4 -2
  216. package/src/index.ts +3 -3
  217. package/src/preview/PropertyPreview.tsx +2 -2
  218. package/src/preview/components/DatePreview.tsx +1 -1
  219. package/src/preview/components/EnumValuesChip.tsx +1 -1
  220. package/src/preview/components/ImagePreview.tsx +1 -1
  221. package/src/preview/components/ReferencePreview.tsx +2 -2
  222. package/src/preview/components/RelationPreview.tsx +1 -1
  223. package/src/preview/components/StorageThumbnail.tsx +1 -1
  224. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +1 -1
  225. package/src/preview/property_previews/ArrayOneOfPreview.tsx +1 -1
  226. package/src/preview/property_previews/ArrayPropertyPreview.tsx +1 -1
  227. package/src/routes/RebaseRoute.tsx +2 -2
  228. package/src/types/components/formex.tsx +1 -1
  229. package/src/util/previews.ts +4 -2
  230. package/dist/CollectionEditorDialog-B-7uW3iJ.js.map +0 -1
  231. package/dist/PropertyEditView-7KMTcrqi.js.map +0 -1
  232. package/dist/RouterCollectionsStudioView-epqIbZrJ.js.map +0 -1
  233. package/dist/history-7X5bON_n.js.map +0 -1
  234. package/dist/src-sUZfe29F.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { Bn as useUrlController } from "./src-sUZfe29F.js";
3
- import { s as AIModifiedPathsProvider } from "./PropertyEditView-7KMTcrqi.js";
4
- import { t as CollectionEditor } from "./CollectionEditorDialog-B-7uW3iJ.js";
2
+ import { Bn as useUrlController } from "./src-B8WuGSPZ.js";
3
+ import { s as AIModifiedPathsProvider } from "./PropertyEditView-DfJbZ67t.js";
4
+ import { t as CollectionEditor } from "./CollectionEditorDialog-DbPpDDwb.js";
5
5
  import { useEffect, useState } from "react";
6
6
  import { Button, IconButton, PlusIcon, ResizablePanels, Tooltip, Typography, cls, defaultBorderMixin, iconSize } from "@rebasepro/ui";
7
- import { IconForView, UnsavedChangesDialog, useUnsavedChangesDialog } from "@rebasepro/core";
7
+ import { IconForView, UnsavedChangesDialog, useUnsavedChangesDialog } from "@rebasepro/app";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { useLocation, useNavigate } from "react-router-dom";
10
10
  //#region src/collection_editor/ui/collection_editor/CollectionStudioView.tsx
@@ -189,4 +189,4 @@ function RouterCollectionsStudioView(props) {
189
189
  //#endregion
190
190
  export { CollectionStudioView as i, RouterCollectionsStudioView_exports as n, CollectionsStudioView as r, RouterCollectionsStudioView as t };
191
191
 
192
- //# sourceMappingURL=RouterCollectionsStudioView-epqIbZrJ.js.map
192
+ //# sourceMappingURL=RouterCollectionsStudioView-C6XQ7Il5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RouterCollectionsStudioView-C6XQ7Il5.js","names":[],"sources":["../src/collection_editor/ui/collection_editor/CollectionStudioView.tsx","../src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx","../src/collection_editor/ui/collection_editor/RouterCollectionsStudioView.tsx"],"sourcesContent":["\nimport { useUnsavedChangesDialog, UnsavedChangesDialog } from \"@rebasepro/app\";\nimport * as React from \"react\";\nimport { useState } from \"react\";\nimport { Button, PlusIcon, Typography } from \"@rebasepro/ui\";\nimport { CollectionEditorDialogProps } from \"./CollectionEditorDialog\";\nimport { AIModifiedPathsProvider } from \"./AIModifiedPathsContext\";\nimport { CollectionEditor } from \"./CollectionEditorDialog\";\nimport type { CollectionConfig } from \"@rebasepro/types\";\n\nexport type CollectionStudioViewProps = Omit<CollectionEditorDialogProps, \"open\" | \"isNewCollection\" | \"editedCollectionId\" | \"handleClose\" | \"handleCancel\"> & {\n collectionId?: string | \"new\";\n\n /**\n * Called after a successful save.\n * Receives the saved collection (or undefined if dismissed without saving).\n * When not provided, save completes silently.\n */\n onSave?: (collection?: CollectionConfig) => void;\n\n /**\n * Called when the user cancels editing.\n * When not provided, cancel is a no-op.\n */\n onCancel?: () => void;\n};\n\nexport function CollectionStudioView({ collectionId, onSave, onCancel, ...props }: CollectionStudioViewProps) {\n\n // Form state from the editor\n const [formDirty, setFormDirty] = useState<boolean>(false);\n const [cancelRequested, setCancelRequested] = useState<boolean>(false);\n\n const { dialogProps, triggerDialog } = useUnsavedChangesDialog(\n formDirty,\n () => setFormDirty(false)\n );\n\n const activeCollectionId = collectionId;\n\n const handleCancelClick = () => {\n if (!formDirty) {\n onCancel?.();\n } else {\n setCancelRequested(true);\n triggerDialog();\n }\n };\n\n return (\n <div className=\"flex-grow flex flex-col h-full w-full bg-surface-50 dark:bg-surface-800\">\n <AIModifiedPathsProvider>\n {activeCollectionId ? (\n <CollectionEditor\n key={activeCollectionId}\n {...props}\n fullScreen={true}\n open={true}\n isNewCollection={activeCollectionId === \"new\"}\n editedCollectionId={activeCollectionId !== \"new\" ? activeCollectionId : undefined}\n handleCancel={handleCancelClick}\n handleClose={(savedCollection) => {\n setFormDirty(false);\n if (savedCollection) {\n setTimeout(() => {\n onSave?.(savedCollection);\n }, 0);\n }\n }}\n setFormDirty={setFormDirty}\n />\n ) : (\n <div className=\"flex-grow flex flex-col items-center justify-center h-full gap-4\">\n <Typography variant=\"label\">\n Select a collection or create a new one\n </Typography>\n <Button\n disabled={props.configController?.readOnly}\n onClick={() => onSave?.()}\n >\n <PlusIcon/>\n Add new collection\n </Button>\n </div>\n )}\n\n <UnsavedChangesDialog\n {...dialogProps}\n handleOk={() => {\n dialogProps.handleOk();\n if (cancelRequested) {\n onCancel?.();\n setCancelRequested(false);\n }\n }}\n handleCancel={() => {\n dialogProps.handleCancel();\n setCancelRequested(false);\n }}\n />\n </AIModifiedPathsProvider>\n </div>\n );\n}\n","\nimport { IconForView } from \"@rebasepro/app\";\nimport React, { useState, useEffect } from \"react\";\nimport {\n Button,\n cls,\n defaultBorderMixin,\n IconButton,\n iconSize,\n PlusIcon,\n ResizablePanels,\n Tooltip,\n Typography\n} from \"@rebasepro/ui\";\nimport type { CollectionConfig } from \"@rebasepro/types\";\nimport { CollectionsConfigController } from \"../../types/config_controller\";\nimport { CollectionStudioView } from \"./CollectionStudioView\";\nimport type { CollectionEditorExtensionProps } from \"../../extensibility_types\";\n\nexport interface CollectionsStudioViewProps extends CollectionEditorExtensionProps {\n configController: CollectionsConfigController;\n\n /**\n * Collections to show in the sidebar.\n * When provided, overrides the collections from `configController`.\n * Use this to control exactly which collections the editor displays.\n */\n collections?: CollectionConfig[];\n\n /**\n * Controlled active collection ID.\n * When provided together with `onActiveCollectionChange`,\n * navigation is fully external — no internal state is used.\n */\n activeCollectionId?: string;\n\n /**\n * Called when the user clicks a collection, \"new\", or navigates.\n * When provided, the component is fully controlled (no internal state).\n * When not provided, the component manages selection via internal state.\n *\n * Pass `\"new\"` to create a new collection. Pass `undefined` to deselect.\n */\n onActiveCollectionChange?: (collectionId: string | undefined) => void;\n}\n\nexport function CollectionsStudioView({\n configController,\n collections: collectionsProp,\n activeCollectionId: controlledActiveId,\n onActiveCollectionChange,\n propertyTypePresets,\n hiddenPropertyTypes,\n renderExtraPropertyFields,\n renderExtraCollectionFields,\n visibleTabs,\n standalone,\n}: CollectionsStudioViewProps) {\n\n // ── Navigation state ────────────────────────────────────────────────\n // If onActiveCollectionChange is provided, the component is controlled.\n // Otherwise, use internal state.\n const [internalActiveId, setInternalActiveId] = useState<string | undefined>(undefined);\n const isControlled = onActiveCollectionChange !== undefined;\n const activeCollectionId = isControlled ? controlledActiveId : internalActiveId;\n\n const setActiveCollectionId = (id: string | undefined) => {\n if (isControlled) {\n onActiveCollectionChange?.(id);\n } else {\n setInternalActiveId(id);\n }\n };\n\n // ── Collections list ────────────────────────────────────────────────\n const collections = collectionsProp ?? configController.collections ?? [];\n\n // ── Sidebar sizing ──────────────────────────────────────────────────\n const [sidebarSize, setSidebarSize] = useState(() => {\n try {\n const saved = localStorage.getItem(\"rebase_collections_editor_sidebar_size\");\n return saved !== null ? parseFloat(saved) : 25;\n } catch (e) {\n return 25;\n }\n });\n\n useEffect(() => {\n try {\n localStorage.setItem(\"rebase_collections_editor_sidebar_size\", sidebarSize.toString());\n } catch (e) {\n // ignore local storage error\n }\n }, [sidebarSize]);\n\n return (\n <div className=\"flex h-full w-full bg-surface-50 dark:bg-surface-800 overflow-hidden text-text-primary dark:text-text-primary-dark\">\n <ResizablePanels\n orientation=\"horizontal\"\n panelSizePercent={sidebarSize}\n onPanelSizeChange={setSidebarSize}\n minPanelSizePx={220}\n firstPanel={\n <div className={cls(\"flex flex-col h-full w-full bg-surface-50 dark:bg-surface-800 border-r\", defaultBorderMixin)}>\n <div className={cls(\"flex items-center justify-between px-3 py-2 border-b bg-surface-50 dark:bg-surface-900 min-h-[48px]\", defaultBorderMixin)}>\n <Typography variant=\"caption\" className=\"font-semibold text-[11px] uppercase tracking-wider text-surface-400 dark:text-surface-400\">\n Collections\n </Typography>\n <Tooltip title={configController.readOnly ? configController.readOnlyReason || \"Read only\" : \"Add collection\"}>\n <div>\n <IconButton\n size=\"small\"\n disabled={configController.readOnly}\n onClick={() => setActiveCollectionId(\"new\")}\n className={activeCollectionId === \"new\" ? \"text-primary dark:text-primary-dark\" : \"text-text-secondary dark:text-text-secondary-dark\"}\n >\n <PlusIcon size={iconSize.smallest}/>\n </IconButton>\n </div>\n </Tooltip>\n </div>\n\n <div className=\"flex-grow overflow-y-auto w-full no-scrollbar p-2 space-y-0.5\">\n {collections.length === 0 && (\n <div className=\"p-4 text-center\">\n <Typography variant=\"caption\" className=\"text-text-disabled dark:text-text-disabled-dark italic\">\n No collections yet.\n </Typography>\n </div>\n )}\n {collections.map((collection) => {\n const collectionKey = collection.slug;\n const isSelected = activeCollectionId === collectionKey;\n return (\n <div\n key={collectionKey}\n onClick={() => setActiveCollectionId(collectionKey)}\n className={cls(\n \"flex items-center gap-2.5 px-3 h-[30px] cursor-pointer rounded-lg text-[13px] font-medium transition-colors\",\n isSelected\n ? \"bg-primary/8 text-primary dark:bg-primary/10 dark:text-primary-light font-semibold\"\n : \"hover:bg-primary/5 dark:hover:bg-primary/5 text-surface-700 dark:text-surface-300 hover:text-surface-900 dark:hover:text-white\"\n )}\n >\n <IconForView collectionOrView={collection} size={\"smallest\"} className={cls(\n isSelected\n ? \"text-primary dark:text-primary-light\"\n : \"text-surface-500 dark:text-text-secondary-dark\"\n )}/>\n <span className=\"truncate flex-1\">\n {collection.name || collection.slug}\n </span>\n </div>\n );\n })}\n </div>\n </div>\n }\n secondPanel={\n <div className=\"flex-grow flex flex-col min-w-0 h-full w-full\">\n {/* We use key to force unmount when switching collections, preventing stale state */}\n {activeCollectionId ? (\n <CollectionStudioView\n key={activeCollectionId}\n configController={configController}\n collectionId={activeCollectionId}\n onSave={(savedCollection) => {\n // After creating a new collection, switch to it\n if (activeCollectionId === \"new\" && savedCollection?.slug) {\n setActiveCollectionId(savedCollection.slug);\n }\n }}\n onCancel={() => setActiveCollectionId(undefined)}\n propertyTypePresets={propertyTypePresets}\n hiddenPropertyTypes={hiddenPropertyTypes}\n renderExtraPropertyFields={renderExtraPropertyFields}\n renderExtraCollectionFields={renderExtraCollectionFields}\n visibleTabs={visibleTabs}\n standalone={standalone}\n />\n ) : (\n <div className=\"flex flex-col items-center justify-center h-full gap-4\">\n <Typography variant=\"label\">\n Select a collection or create a new one to start editing\n </Typography>\n <Button\n disabled={configController.readOnly}\n onClick={() => setActiveCollectionId(\"new\")}\n >\n <PlusIcon/>\n Add new collection\n </Button>\n </div>\n )}\n </div>\n }\n />\n </div>\n );\n}\n","/**\n * Router-aware wrapper around CollectionsStudioView.\n *\n * This component provides the react-router-based navigation behavior\n * that Rebase Studio expects: the active collection is derived from the\n * URL, and clicking a collection navigates via react-router.\n *\n * External consumers should use `CollectionsStudioView` directly\n * (which has no react-router dependency).\n */\nimport React from \"react\";\nimport { useLocation, useNavigate } from \"react-router-dom\";\nimport { useUrlController } from \"../../_cms_internals\";\nimport { CollectionsStudioView, CollectionsStudioViewProps } from \"./CollectionsStudioView\";\n\nexport type RouterCollectionsStudioViewProps = Omit<CollectionsStudioViewProps, \"activeCollectionId\" | \"onActiveCollectionChange\">;\n\nexport function RouterCollectionsStudioView(props: RouterCollectionsStudioViewProps) {\n const navigate = useNavigate();\n const urlController = useUrlController();\n const location = useLocation();\n\n // Determine the active collection from the URL segment after \"schema/\"\n const basePath = urlController.buildAppUrlPath(\"schema\");\n const relativePath = location.pathname.replace(basePath, \"\").replace(/^\\//, \"\");\n const activeCollectionId = relativePath.split(\"/\")[0] || undefined;\n\n return (\n <CollectionsStudioView\n {...props}\n activeCollectionId={activeCollectionId}\n onActiveCollectionChange={(id) => {\n if (id) {\n navigate(urlController.buildAppUrlPath(`schema/${id}`));\n } else {\n navigate(urlController.buildAppUrlPath(\"schema\"));\n }\n }}\n />\n );\n}\n"],"mappings":";;;;;;;;;;AA2BA,SAAgB,qBAAqB,EAAE,cAAc,QAAQ,UAAU,GAAG,SAAoC;CAG1G,MAAM,CAAC,WAAW,gBAAgB,SAAkB,KAAK;CACzD,MAAM,CAAC,iBAAiB,sBAAsB,SAAkB,KAAK;CAErE,MAAM,EAAE,aAAa,kBAAkB,wBACnC,iBACM,aAAa,KAAK,CAC5B;CAEA,MAAM,qBA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enerationCallbackProps {
40
40
  /**
41
41
  * Function to get the auth token.
42
42
  * This is typically `authController.getAuthToken` from `@rebasepro/client`
43
- * (or `@rebasepro/client-firebase` if using Firebase).
43
+ * (or `@rebasepro/firebase` if using Firebase).
44
44
  */
45
45
  getAuthToken: () => Promise<string>;
46
46
  /**
@@ -56,15 +56,15 @@ export interface BuildCollectionGenerationCallbackProps {
56
56
  *
57
57
  * @example
58
58
  * ```tsx
59
- * import { RebaseCMS } from "@rebasepro/admin";
59
+ * import { RebaseAdmin } from "@rebasepro/admin";
60
60
  * import { buildCollectionGenerationCallback } from "@rebasepro/admin/collection_editor";
61
- * import { useFirebaseAuthController } from "@rebasepro/client-firebase";
61
+ * import { useFirebaseAuthController } from "@rebasepro/firebase";
62
62
  *
63
63
  * const authController = useFirebaseAuthController({ firebaseApp });
64
64
  *
65
65
  * export function App() {
66
66
  * return (
67
- * <RebaseCMS
67
+ * <RebaseAdmin
68
68
  * collectionEditor={{
69
69
  * generateCollection: buildCollectionGenerationCallback({
70
70
  * getAuthToken: authController.getAuthToken
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { FormexController } from "@rebasepro/formex";
2
+ import { FormexController } from "@rebasepro/forms";
3
3
  import { CollectionConfig, Property, PropertyConfig } from "@rebasepro/types";
4
4
  import type { PropertyTypePreset, PropertyType } from "../../extensibility_types";
5
5
  import type { SerializableProperty, SerializableCollectionConfig } from "../../serializable_types";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { FormexFieldProps } from "@rebasepro/formex";
2
+ import { FormexFieldProps } from "@rebasepro/forms";
3
3
  export declare function SwitchControl({ field, form, label, tooltip, disabled, size, allowIndeterminate }: FormexFieldProps & {
4
4
  label: string;
5
5
  tooltip?: string;
@@ -1,2 +1,2 @@
1
- import { useSnackbarController } from "@rebasepro/core";
1
+ import { useSnackbarController } from "@rebasepro/app";
2
2
  export declare function useSafeSnackbarController(): ReturnType<typeof useSnackbarController> | undefined;
@@ -1,9 +1,9 @@
1
- import { Bn as useUrlController } from "./src-sUZfe29F.js";
2
- import { n as PropertyForm, r as PropertyFormDialog } from "./PropertyEditView-7KMTcrqi.js";
3
- import { n as CollectionEditorDialog } from "./CollectionEditorDialog-B-7uW3iJ.js";
4
- import { i as CollectionStudioView, r as CollectionsStudioView, t as RouterCollectionsStudioView } from "./RouterCollectionsStudioView-epqIbZrJ.js";
1
+ import { Bn as useUrlController } from "./src-B8WuGSPZ.js";
2
+ import { n as PropertyForm, r as PropertyFormDialog } from "./PropertyEditView-DfJbZ67t.js";
3
+ import { n as CollectionEditorDialog } from "./CollectionEditorDialog-DbPpDDwb.js";
4
+ import { i as CollectionStudioView, r as CollectionsStudioView, t as RouterCollectionsStudioView } from "./RouterCollectionsStudioView-C6XQ7Il5.js";
5
5
  import "react";
6
- import { useSnackbarController } from "@rebasepro/core";
6
+ import { useSnackbarController } from "@rebasepro/app";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  import { useNavigate } from "react-router-dom";
9
9
  //#region src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"collection_editor_ui.js","names":[],"sources":["../src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx"],"sourcesContent":["/**\n * Router-aware wrapper around CollectionStudioView.\n *\n * This component provides the react-router-based navigation behavior\n * that Rebase Studio expects: cancel navigates to the root path,\n * save navigates to the saved collection's slug, and a snackbar\n * toast is shown on success.\n *\n * External consumers should use `CollectionStudioView` directly\n * (which has no react-router dependency).\n */\nimport React from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useUrlController } from \"../../_cms_internals\";\nimport { useSnackbarController } from \"@rebasepro/core\";\nimport { CollectionStudioView, CollectionStudioViewProps } from \"./CollectionStudioView\";\n\nexport type RouterCollectionStudioViewProps = Omit<CollectionStudioViewProps, \"onSave\" | \"onCancel\">;\n\nexport function RouterCollectionStudioView(props: RouterCollectionStudioViewProps) {\n const navigate = useNavigate();\n const urlController = useUrlController();\n const snackbarController = useSnackbarController();\n\n return (\n <CollectionStudioView\n {...props}\n onCancel={() => {\n navigate(urlController.buildAppUrlPath(\"/\"));\n }}\n onSave={(savedCollection) => {\n if (savedCollection) {\n snackbarController.open({\n type: \"success\",\n message: `Collection ${savedCollection.name || savedCollection.slug} saved`\n });\n if (props.collectionId === \"new\") {\n navigate(urlController.buildAppUrlPath(`s/schema/${savedCollection.slug}`));\n }\n }\n }}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAmBA,SAAgB,2BAA2B,OAAwC;CAC/E,MAAM,WAAW,YAAY;CAC7B,MAAM,gBAAgB,iBAAiB;CACvC,MAAM,qBAAqB,sBAAsB;CAEjD,OACI,oBAAC,sBAAD;EACI,GAAI;EACJ,gBAAgB;GACZ,SAAS,cAAc,gBAAgB,GAAG,CAAC;EAC/C;EACA,SAAS,oBAAoB;GACzB,IAAI,iBAAiB;IACjB,mBAAmB,KAAK;KACpB,MAAM;KACN,SAAS,cAAc,gBAAgB,QAAQ,gBAAgB,KAAK;IACxE,CAAC;IACD,IAAI,MAAM,iBAAiB,OACvB,SAAS,cAAc,gBAAgB,YAAY,gBAAgB,MAAM,CAAC;GAElF;EACJ;CACH,CAAA;AAET"}
1
+ {"version":3,"file":"collection_editor_ui.js","names":[],"sources":["../src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx"],"sourcesContent":["/**\n * Router-aware wrapper around CollectionStudioView.\n *\n * This component provides the react-router-based navigation behavior\n * that Rebase Studio expects: cancel navigates to the root path,\n * save navigates to the saved collection's slug, and a snackbar\n * toast is shown on success.\n *\n * External consumers should use `CollectionStudioView` directly\n * (which has no react-router dependency).\n */\nimport React from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useUrlController } from \"../../_cms_internals\";\nimport { useSnackbarController } from \"@rebasepro/app\";\nimport { CollectionStudioView, CollectionStudioViewProps } from \"./CollectionStudioView\";\n\nexport type RouterCollectionStudioViewProps = Omit<CollectionStudioViewProps, \"onSave\" | \"onCancel\">;\n\nexport function RouterCollectionStudioView(props: RouterCollectionStudioViewProps) {\n const navigate = useNavigate();\n const urlController = useUrlController();\n const snackbarController = useSnackbarController();\n\n return (\n <CollectionStudioView\n {...props}\n onCancel={() => {\n navigate(urlController.buildAppUrlPath(\"/\"));\n }}\n onSave={(savedCollection) => {\n if (savedCollection) {\n snackbarController.open({\n type: \"success\",\n message: `Collection ${savedCollection.name || savedCollection.slug} saved`\n });\n if (props.collectionId === \"new\") {\n navigate(urlController.buildAppUrlPath(`s/schema/${savedCollection.slug}`));\n }\n }\n }}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAmBA,SAAgB,2BAA2B,OAAwC;CAC/E,MAAM,WAAW,YAAY;CAC7B,MAAM,gBAAgB,iBAAiB;CACvC,MAAM,qBAAqB,sBAAsB;CAEjD,OACI,oBAAC,sBAAD;EACI,GAAI;EACJ,gBAAgB;GACZ,SAAS,cAAc,gBAAgB,GAAG,CAAC;EAC/C;EACA,SAAS,oBAAoB;GACzB,IAAI,iBAAiB;IACjB,mBAAmB,KAAK;KACpB,MAAM;KACN,SAAS,cAAc,gBAAgB,QAAQ,gBAAgB,KAAK;IACxE,CAAC;IACD,IAAI,MAAM,iBAAiB,OACvB,SAAS,cAAc,gBAAgB,YAAY,gBAAgB,MAAM,CAAC;GAElF;EACJ;CACH,CAAA;AAET"}
@@ -3,7 +3,7 @@ import type { AdditionalFieldDelegate } from "@rebasepro/types";
3
3
  import type { Property } from "@rebasepro/types";
4
4
  import React from "react";
5
5
  import { CollectionSize, Entity, EntityTableController, FilterValues, SelectionController, User } from "@rebasepro/types";
6
- import { OnCellValueChange, OnColumnResizeParams, UniqueFieldValidator } from "@rebasepro/core";
6
+ import { OnCellValueChange, OnColumnResizeParams, UniqueFieldValidator } from "@rebasepro/app";
7
7
  import { VirtualTableColumn } from "@rebasepro/ui";
8
8
  /**
9
9
  * @group Collection components
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { TableSize } from "@rebasepro/core";
2
+ import { TableSize } from "@rebasepro/app";
3
3
  interface EntityTableCellProps {
4
4
  children: React.ReactNode;
5
5
  actions?: React.ReactNode;
@@ -2,7 +2,7 @@ import type { CollectionConfig } from "@rebasepro/types";
2
2
  import React from "react";
3
3
  import { Entity } from "@rebasepro/types";
4
4
  import { CustomFieldValidator } from "../../../../form/validation";
5
- import type { OnCellValueChangeParams } from "@rebasepro/core";
5
+ import type { OnCellValueChangeParams } from "@rebasepro/app";
6
6
  interface PopupFormFieldProps<M extends Record<string, unknown>> {
7
7
  customFieldValidator?: CustomFieldValidator;
8
8
  path: string;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { Entity, Property } from "@rebasepro/types";
3
- import { TableSize } from "@rebasepro/core";
3
+ import { TableSize } from "@rebasepro/app";
4
4
  export interface TableFieldBindingProps<T = unknown> {
5
5
  propertyKey: string;
6
6
  property: Property;
@@ -1,5 +1,5 @@
1
1
  import { CollectionConfig, RebaseData, RebaseContext } from "@rebasepro/types";
2
- import { OnCellValueChange, UniqueFieldValidator } from "@rebasepro/core";
2
+ import { OnCellValueChange, UniqueFieldValidator } from "@rebasepro/app";
3
3
  export interface UseCollectionInlineEditorParams<M extends Record<string, unknown>> {
4
4
  path: string;
5
5
  collection: CollectionConfig<M>;
@@ -1,4 +1,4 @@
1
- import type { RebaseCMSConfig } from "@rebasepro/types";
1
+ import type { RebaseAdminConfig } from "@rebasepro/types";
2
2
  /**
3
3
  * Declarative component to configure the CMS in Rebase.
4
4
  * Renders nothing — purely registers config into the RebaseRegistry.
@@ -7,4 +7,4 @@ import type { RebaseCMSConfig } from "@rebasepro/types";
7
7
  * is auto-wired as a native feature (slots, provider, Studio view) without
8
8
  * needing any external plugin.
9
9
  */
10
- export declare function RebaseCMS({ collections, views, homePage, entityViews, entityActions, collectionEditor, navigationGroupMappings, basePath }: RebaseCMSConfig): null;
10
+ export declare function RebaseAdmin({ collections, views, homePage, entityViews, entityActions, collectionEditor, navigationGroupMappings, basePath }: RebaseAdminConfig): null;
@@ -3,7 +3,7 @@ import type { AppView } from "@rebasepro/types";
3
3
  export interface RebaseLayoutProps {
4
4
  /** Title shown in the drawer. */
5
5
  title?: string;
6
- /** Custom AppBar to override the default. */
6
+ /** Top bar. Only rendered if provided — pass `<AppBar/>` for the default one. */
7
7
  appBar?: React.ReactNode;
8
8
  /** Custom Drawer to override the default. */
9
9
  drawer?: React.ReactNode;
@@ -13,17 +13,18 @@ export interface RebaseLayoutProps {
13
13
  devViews?: AppView[];
14
14
  }
15
15
  /**
16
- * Layout layer — provides the Scaffold, AppBar, Drawer, and SideDialogs.
16
+ * Layout layer — provides the Scaffold, Drawer, and SideDialogs.
17
17
  *
18
18
  * Wraps the route outlet with the standard Rebase admin layout.
19
- * Override individual pieces (appBar, drawer) via props.
19
+ * Override the drawer via props; pass `appBar` to add a top bar (there is
20
+ * none by default — the drawer owns navigation and user actions).
20
21
  *
21
22
  * **Independently usable**: Use this when you want the Rebase layout
22
23
  * without its default route definitions.
23
24
  *
24
25
  * @example
25
26
  * ```tsx
26
- * <RebaseLayout title="My Admin">
27
+ * <RebaseLayout title="My Admin" appBar={<AppBar/>}>
27
28
  * <Route path="/" element={<MyHomePage />} />
28
29
  * <Route path="/custom" element={<CustomView />} />
29
30
  * </RebaseLayout>
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  export interface RebaseShellProps {
3
3
  title?: string;
4
+ /** Top bar. Only rendered if provided — pass `<AppBar/>` for the default one. */
4
5
  appBar?: React.ReactNode;
5
6
  drawer?: React.ReactNode;
6
7
  autoOpenDrawer?: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { CollectionSize, Entity, EntityTableController, FilterValues } from "@rebasepro/types";
3
3
  import { CellRendererParams, VirtualTableColumn } from "@rebasepro/ui";
4
- import { OnCellValueChange, OnColumnResizeParams } from "@rebasepro/core";
4
+ import { OnCellValueChange, OnColumnResizeParams } from "@rebasepro/app";
5
5
  export type SelectableTableProps<M extends Record<string, unknown>> = {
6
6
  /**
7
7
  * Callback when a cell value changes.
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import { DataCollectionTableController } from "@rebasepro/core";
2
+ import { DataCollectionTableController } from "@rebasepro/app";
3
3
  export declare const SelectableTableContext: React.Context<DataCollectionTableController<Record<string, unknown>>>;
4
4
  export declare const useSelectableTableController: <M extends Record<string, unknown> = Record<string, unknown>>() => DataCollectionTableController<M>;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  /**
3
3
  * Provider that builds the SidePanelController and makes it available
4
- * via the SidePanelControllerContext from @rebasepro/core.
4
+ * via the SidePanelControllerContext from @rebasepro/app.
5
5
  *
6
6
  * After the CMS extraction refactor, `useBuildSidePanel` lives
7
7
  * in the CMS package while the context it feeds into lives in core.
@@ -32,7 +32,7 @@ export * from "./DrawerNavigationItem";
32
32
  export * from "./DrawerNavigationGroup";
33
33
  export * from "./SideDialogs";
34
34
  export * from "./app/useApp";
35
- export * from "./RebaseCMS";
35
+ export * from "./RebaseAdmin";
36
36
  export * from "./RebaseShell";
37
37
  export * from "./RebaseAuthGate";
38
38
  export * from "./RebaseNavigation";
package/dist/editor.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { i as schema, n as parser, r as serializer } from "./markdown-CklalUUk.js";
2
2
  import React, { createContext, forwardRef, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
3
3
  import { BoldIcon, Button, CheckIcon, CheckSquareIcon, Checkbox, ChevronDownIcon, CodeIcon, Heading1Icon, Heading2Icon, Heading3Icon, IconButton, ImageIcon, ItalicIcon, Label, ListIcon, ListOrderedIcon, Popover, QuoteIcon, Separator, Slot, StrikethroughIcon, TableIcon, TextField, TextareaAutosize, Tooltip, Trash2Icon, TypeIcon, UnderlineIcon, Wand2Icon, cls, defaultBorderMixin, focusedDisabled, iconSize, useInjectStyles } from "@rebasepro/ui";
4
- import { useTranslation } from "@rebasepro/core";
4
+ import { useTranslation } from "@rebasepro/app";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { EditorState, NodeSelection, Plugin, PluginKey, Selection, TextSelection } from "prosemirror-state";
7
7
  import { autoUpdate, computePosition, flip, offset, shift } from "@floating-ui/dom";