@rebasepro/admin 0.6.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/dist/{CollectionEditorDialog-HNXGxXdO.js → CollectionEditorDialog-BO_aQ-Z4.js} +236 -155
  2. package/dist/CollectionEditorDialog-BO_aQ-Z4.js.map +1 -0
  3. package/dist/{PropertyEditView-C2wp8kQ9.js → PropertyEditView-DKzOpMjR.js} +190 -50
  4. package/dist/PropertyEditView-DKzOpMjR.js.map +1 -0
  5. package/dist/{CollectionsStudioView-B1mN33GB.js → RouterCollectionsStudioView-BQTIExjA.js} +61 -39
  6. package/dist/RouterCollectionsStudioView-BQTIExjA.js.map +1 -0
  7. package/dist/collection_editor/_cms_internals.d.ts +1 -1
  8. package/dist/collection_editor/api/generateCollectionApi.d.ts +3 -2
  9. package/dist/collection_editor/extensibility_types.d.ts +135 -0
  10. package/dist/collection_editor/index.d.ts +6 -0
  11. package/dist/collection_editor/serializable_types.d.ts +370 -0
  12. package/dist/collection_editor/serializable_utils.d.ts +50 -0
  13. package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +3 -3
  14. package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +12 -1
  15. package/dist/collection_editor/ui/collection_editor/CollectionStudioView.d.ts +13 -1
  16. package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.d.ts +24 -2
  17. package/dist/collection_editor/ui/collection_editor/DisplaySettingsForm.d.ts +2 -1
  18. package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.d.ts +4 -1
  19. package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +12 -1
  20. package/dist/collection_editor/ui/collection_editor/RouterCollectionStudioView.d.ts +15 -0
  21. package/dist/collection_editor/ui/collection_editor/RouterCollectionsStudioView.d.ts +14 -0
  22. package/dist/collection_editor/useJsonCollectionsConfigController.d.ts +37 -0
  23. package/dist/collection_editor/useSafeSnackbarController.d.ts +2 -0
  24. package/dist/collection_editor_ui.d.ts +4 -0
  25. package/dist/collection_editor_ui.js +33 -4
  26. package/dist/collection_editor_ui.js.map +1 -0
  27. package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +1 -1
  28. package/dist/components/EntityCollectionTable/index.d.ts +1 -1
  29. package/dist/components/EntityCollectionView/EntityBoardCard.d.ts +3 -3
  30. package/dist/components/EntityCollectionView/hooks/useKanbanDragAndDrop.d.ts +3 -3
  31. package/dist/components/EntityEditView.d.ts +3 -2
  32. package/dist/components/RebaseCMS.d.ts +1 -1
  33. package/dist/components/SelectableTable/SelectionStore.d.ts +12 -21
  34. package/dist/components/field_configs.d.ts +1 -1
  35. package/dist/editor/editor.d.ts +0 -6
  36. package/dist/editor.js +1 -3
  37. package/dist/editor.js.map +1 -1
  38. package/dist/form/EntityForm.d.ts +10 -9
  39. package/dist/form/EntityFormBinding.d.ts +27 -0
  40. package/dist/form/components/StorageUploadProgress.d.ts +6 -1
  41. package/dist/form/form_utils.d.ts +8 -0
  42. package/dist/form/index.d.ts +5 -2
  43. package/dist/{history-BO6VT85a.js → history-B3cqBzEV.js} +2 -2
  44. package/dist/{history-BO6VT85a.js.map → history-B3cqBzEV.js.map} +1 -1
  45. package/dist/hooks/navigation/contexts/CollectionRegistryContext.d.ts +1 -1
  46. package/dist/hooks/navigation/useAsyncResolver.d.ts +26 -0
  47. package/dist/hooks/navigation/useBuildCollectionRegistryController.d.ts +2 -0
  48. package/dist/hooks/navigation/useTopLevelNavigation.d.ts +1 -1
  49. package/dist/hooks/navigation/utils.d.ts +1 -1
  50. package/dist/index.d.ts +3 -1
  51. package/dist/index.js +2 -2
  52. package/dist/preview/components/StorageThumbnail.d.ts +3 -1
  53. package/dist/routes/CustomViewRoute.d.ts +2 -1
  54. package/dist/{src-BYniefVu.js → src-cxV1ODRG.js} +1731 -1710
  55. package/dist/src-cxV1ODRG.js.map +1 -0
  56. package/dist/types/components/EntityFormActionsProps.d.ts +1 -1
  57. package/dist/types/components/EntityFormProps.d.ts +59 -0
  58. package/dist/types/components/PropertyPreviewProps.d.ts +2 -1
  59. package/dist/types/fields.d.ts +10 -7
  60. package/dist/util/dataControllerAdapter.d.ts +30 -0
  61. package/dist/util/navigation_utils.d.ts +1 -1
  62. package/dist/util/propertyConfigMapper.d.ts +17 -0
  63. package/package.json +8 -8
  64. package/src/collection_editor/_cms_internals.ts +1 -1
  65. package/src/collection_editor/api/generateCollectionApi.ts +3 -2
  66. package/src/collection_editor/extensibility_types.ts +168 -0
  67. package/src/collection_editor/index.ts +46 -0
  68. package/src/collection_editor/pgColumnToProperty.ts +2 -2
  69. package/src/collection_editor/serializable_types.ts +474 -0
  70. package/src/collection_editor/serializable_utils.ts +576 -0
  71. package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +6 -6
  72. package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +170 -89
  73. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +95 -78
  74. package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +23 -20
  75. package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +79 -27
  76. package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +9 -7
  77. package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +22 -5
  78. package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +3 -3
  79. package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +154 -18
  80. package/src/collection_editor/ui/collection_editor/PropertyFieldPreview.tsx +6 -6
  81. package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +1 -0
  82. package/src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx +44 -0
  83. package/src/collection_editor/ui/collection_editor/RouterCollectionsStudioView.tsx +41 -0
  84. package/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.tsx +4 -3
  85. package/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.tsx +35 -1
  86. package/src/collection_editor/ui/collection_editor/templates/blog_template.ts +1 -1
  87. package/src/collection_editor/ui/collection_editor/utils/supported_fields.tsx +0 -1
  88. package/src/collection_editor/ui/collection_editor/utils/update_property_for_widget.ts +7 -29
  89. package/src/collection_editor/useJsonCollectionsConfigController.tsx +286 -0
  90. package/src/collection_editor/useSafeSnackbarController.ts +9 -0
  91. package/src/collection_editor_ui.ts +6 -0
  92. package/src/components/DefaultDrawer.tsx +14 -4
  93. package/src/components/DrawerNavigationGroup.tsx +2 -2
  94. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +11 -9
  95. package/src/components/EntityCollectionTable/fields/TableMultipleRelationField.tsx +2 -1
  96. package/src/components/EntityCollectionTable/fields/TableRelationField.tsx +2 -1
  97. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +23 -20
  98. package/src/components/EntityCollectionTable/index.tsx +1 -1
  99. package/src/components/EntityCollectionTable/table_bindings.tsx +24 -44
  100. package/src/components/EntityCollectionView/EntityBoardCard.tsx +6 -6
  101. package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +13 -12
  102. package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +40 -190
  103. package/src/components/EntityCollectionView/EntityCollectionListView.tsx +66 -184
  104. package/src/components/EntityCollectionView/EntityCollectionView.tsx +8 -25
  105. package/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.ts +1 -1
  106. package/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.ts +6 -6
  107. package/src/components/EntityCollectionView/useBoardDataController.tsx +12 -40
  108. package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +3 -3
  109. package/src/components/EntityDetailView.tsx +2 -2
  110. package/src/components/EntityEditView.tsx +7 -6
  111. package/src/components/EntityEditViewFormActions.tsx +35 -29
  112. package/src/components/HomePage/ContentHomePage.tsx +14 -5
  113. package/src/components/RebaseCMS.tsx +3 -3
  114. package/src/components/RebaseNavigation.tsx +74 -9
  115. package/src/components/RelationSelector.tsx +2 -2
  116. package/src/components/SelectableTable/SelectableTable.tsx +13 -5
  117. package/src/components/SelectableTable/SelectionStore.ts +18 -48
  118. package/src/components/SideDialogs.tsx +0 -7
  119. package/src/components/common/default_entity_actions.tsx +22 -11
  120. package/src/components/field_configs.tsx +0 -14
  121. package/src/contexts/BreacrumbsContext.tsx +15 -6
  122. package/src/editor/editor.tsx +4 -7
  123. package/src/editor/selectors/ai-selector.tsx +0 -1
  124. package/src/form/EntityForm.tsx +191 -428
  125. package/src/form/EntityFormActions.tsx +35 -49
  126. package/src/form/EntityFormBinding.tsx +323 -0
  127. package/src/form/components/FormLayout.tsx +1 -1
  128. package/src/form/components/StorageUploadProgress.tsx +9 -2
  129. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +12 -1
  130. package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +4 -4
  131. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +7 -2
  132. package/src/form/field_bindings/RelationFieldBinding.tsx +5 -7
  133. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +19 -15
  134. package/src/form/form_utils.ts +163 -0
  135. package/src/form/index.tsx +14 -6
  136. package/src/hooks/navigation/contexts/CollectionRegistryContext.tsx +2 -2
  137. package/src/hooks/navigation/contexts/NavigationStateContext.tsx +2 -2
  138. package/src/hooks/navigation/contexts/UrlContext.tsx +1 -2
  139. package/src/hooks/navigation/useAsyncResolver.ts +100 -0
  140. package/src/hooks/navigation/useBuildCollectionRegistryController.tsx +15 -8
  141. package/src/hooks/navigation/useBuildNavigationStateController.tsx +12 -8
  142. package/src/hooks/navigation/useNavigationResolution.ts +33 -0
  143. package/src/hooks/navigation/useResolvedCollections.ts +29 -71
  144. package/src/hooks/navigation/useResolvedViews.tsx +40 -70
  145. package/src/hooks/navigation/useTopLevelNavigation.ts +20 -16
  146. package/src/hooks/navigation/utils.ts +7 -4
  147. package/src/index.ts +6 -1
  148. package/src/preview/PropertyPreview.tsx +1 -16
  149. package/src/preview/components/StorageThumbnail.tsx +24 -7
  150. package/src/routes/CustomViewRoute.tsx +14 -6
  151. package/src/types/components/EntityFormActionsProps.tsx +1 -1
  152. package/src/types/components/EntityFormProps.tsx +68 -0
  153. package/src/types/components/PropertyPreviewProps.tsx +1 -1
  154. package/src/types/fields.tsx +9 -8
  155. package/src/util/dataControllerAdapter.ts +93 -0
  156. package/src/util/navigation_utils.ts +1 -1
  157. package/src/util/previews.ts +20 -0
  158. package/src/util/propertyConfigMapper.ts +134 -0
  159. package/src/util/property_utils.tsx +1 -2
  160. package/dist/CollectionEditorDialog-HNXGxXdO.js.map +0 -1
  161. package/dist/CollectionsStudioView-B1mN33GB.js.map +0 -1
  162. package/dist/PropertyEditView-C2wp8kQ9.js.map +0 -1
  163. package/dist/components/EntityCollectionTable/fields/VirtualTableDateField.d.ts +0 -12
  164. package/dist/components/EntityCollectionTable/fields/VirtualTableInput.d.ts +0 -10
  165. package/dist/components/EntityCollectionTable/fields/VirtualTableNumberInput.d.ts +0 -9
  166. package/dist/components/EntityCollectionTable/fields/VirtualTableSwitch.d.ts +0 -8
  167. package/dist/components/EntityCollectionView/Board.d.ts +0 -3
  168. package/dist/components/EntityCollectionView/BoardColumn.d.ts +0 -42
  169. package/dist/components/EntityCollectionView/BoardColumnTitle.d.ts +0 -9
  170. package/dist/components/EntityCollectionView/BoardSortableList.d.ts +0 -14
  171. package/dist/components/EntityCollectionView/board_types.d.ts +0 -105
  172. package/dist/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +0 -11
  173. package/dist/hooks/navigation/useNavigationRegistry.d.ts +0 -12
  174. package/dist/hooks/navigation/useNavigationURLs.d.ts +0 -11
  175. package/dist/src-BYniefVu.js.map +0 -1
  176. package/src/components/EntityCollectionTable/fields/VirtualTableDateField.tsx +0 -39
  177. package/src/components/EntityCollectionTable/fields/VirtualTableInput.tsx +0 -90
  178. package/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.tsx +0 -83
  179. package/src/components/EntityCollectionTable/fields/VirtualTableSwitch.tsx +0 -32
  180. package/src/components/EntityCollectionView/Board.tsx +0 -475
  181. package/src/components/EntityCollectionView/BoardColumn.tsx +0 -165
  182. package/src/components/EntityCollectionView/BoardColumnTitle.tsx +0 -46
  183. package/src/components/EntityCollectionView/BoardSortableList.tsx +0 -177
  184. package/src/components/EntityCollectionView/board_types.ts +0 -113
  185. package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +0 -141
  186. package/src/hooks/navigation/useNavigationRegistry.ts +0 -164
  187. package/src/hooks/navigation/useNavigationURLs.ts +0 -56
@@ -1,4 +1,33 @@
1
- import { n as CollectionEditorDialog } from "./CollectionEditorDialog-HNXGxXdO.js";
2
- import { n as PropertyForm, r as PropertyFormDialog } from "./PropertyEditView-C2wp8kQ9.js";
3
- import { r as CollectionStudioView, t as CollectionsStudioView } from "./CollectionsStudioView-B1mN33GB.js";
4
- export { CollectionEditorDialog, CollectionStudioView, CollectionsStudioView, PropertyForm, PropertyFormDialog };
1
+ import { Bn as useUrlController } from "./src-cxV1ODRG.js";
2
+ import { n as PropertyForm, r as PropertyFormDialog } from "./PropertyEditView-DKzOpMjR.js";
3
+ import { n as CollectionEditorDialog } from "./CollectionEditorDialog-BO_aQ-Z4.js";
4
+ import { i as CollectionStudioView, r as CollectionsStudioView, t as RouterCollectionsStudioView } from "./RouterCollectionsStudioView-BQTIExjA.js";
5
+ import "react";
6
+ import { useSnackbarController } from "@rebasepro/core";
7
+ import { jsx } from "react/jsx-runtime";
8
+ import { useNavigate } from "react-router-dom";
9
+ //#region src/collection_editor/ui/collection_editor/RouterCollectionStudioView.tsx
10
+ function RouterCollectionStudioView(props) {
11
+ const navigate = useNavigate();
12
+ const urlController = useUrlController();
13
+ const snackbarController = useSnackbarController();
14
+ return /* @__PURE__ */ jsx(CollectionStudioView, {
15
+ ...props,
16
+ onCancel: () => {
17
+ navigate(urlController.buildAppUrlPath("/"));
18
+ },
19
+ onSave: (savedCollection) => {
20
+ if (savedCollection) {
21
+ snackbarController.open({
22
+ type: "success",
23
+ message: `Collection ${savedCollection.name || savedCollection.slug} saved`
24
+ });
25
+ if (props.collectionId === "new") navigate(urlController.buildAppUrlPath(`s/schema/${savedCollection.slug}`));
26
+ }
27
+ }
28
+ });
29
+ }
30
+ //#endregion
31
+ export { CollectionEditorDialog, CollectionStudioView, CollectionsStudioView, PropertyForm, PropertyFormDialog, RouterCollectionStudioView, RouterCollectionsStudioView };
32
+
33
+ //# sourceMappingURL=collection_editor_ui.js.map
@@ -0,0 +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"}
@@ -25,4 +25,4 @@ import { EntityCollectionTableProps } from "./EntityCollectionTableProps";
25
25
  * @see VirtualTable
26
26
  * @group Components
27
27
  */
28
- export declare const EntityCollectionTable: <M extends Record<string, unknown> = any, USER extends User = any>({ className, style, fixedFilter, actionsStart, actions, viewModeToggle, title, tableRowActionsBuilder, uniqueFieldValidator, getPropertyFor, onValueChange, selectionController, highlightedEntities, onEntityClick, onColumnResize, initialScroll, onScroll, onSizeChanged, hoverRow, inlineEditing, additionalFields, displayedColumnIds, defaultSize, properties, tableController, filterable, sortable, endAdornment, AddColumnComponent, AdditionalHeaderWidget, additionalIDHeaderWidget, emptyComponent, getIdColumnWidth, enablePopupIcon, openEntityMode, onColumnsOrderChange, hideToolbar }: EntityCollectionTableProps<M>) => React.JSX.Element;
28
+ export declare const EntityCollectionTable: <M extends Record<string, unknown> = Record<string, unknown>, USER extends User = User>({ className, style, fixedFilter, actionsStart, actions, viewModeToggle, title, tableRowActionsBuilder, uniqueFieldValidator, getPropertyFor, onValueChange, selectionController, highlightedEntities, onEntityClick, onColumnResize, initialScroll, onScroll, onSizeChanged, hoverRow, inlineEditing, additionalFields, displayedColumnIds, defaultSize, properties, tableController, filterable, sortable, endAdornment, AddColumnComponent, AdditionalHeaderWidget, additionalIDHeaderWidget, emptyComponent, getIdColumnWidth, enablePopupIcon, openEntityMode, onColumnsOrderChange, hideToolbar }: EntityCollectionTableProps<M>) => React.JSX.Element;
@@ -3,4 +3,4 @@ export type { EntityCollectionTableProps } from "./EntityCollectionTableProps";
3
3
  export * from "./PropertyTableCell";
4
4
  export * from "./EntityCollectionRowActions";
5
5
  export * from "./column_utils";
6
- export { VirtualTableInput } from "./fields/VirtualTableInput";
6
+ export { VirtualTableInput } from "@rebasepro/ui";
@@ -1,8 +1,8 @@
1
1
  import type { EntityCollection } from "@rebasepro/types";
2
2
  import React from "react";
3
3
  import { Entity } from "@rebasepro/types";
4
- import { BoardItemViewProps } from "./board_types";
5
- export type EntityBoardCardProps<M extends Record<string, unknown> = Record<string, unknown>> = BoardItemViewProps<M> & {
4
+ import { BoardItemViewProps } from "@rebasepro/ui";
5
+ export type EntityBoardCardProps<M extends Record<string, unknown> = Record<string, unknown>> = BoardItemViewProps<Entity<M>> & {
6
6
  collection: EntityCollection<M>;
7
7
  onClick?: (entity: Entity<M>) => void;
8
8
  selected?: boolean;
@@ -27,5 +27,5 @@ export declare function createEntityBoardCardComponent<M extends Record<string,
27
27
  isEntitySelected?: (entity: Entity<M>) => boolean;
28
28
  onSelectionChange?: (entity: Entity<M>, selected: boolean) => void;
29
29
  selectionEnabled?: boolean;
30
- }): React.ComponentType<BoardItemViewProps<M>>;
30
+ }): React.ComponentType<BoardItemViewProps<Entity<M>>>;
31
31
  export {};
@@ -1,5 +1,5 @@
1
- import { EntityCollection, RebaseData, RebaseContext, AnalyticsController } from "@rebasepro/types";
2
- import { BoardItem } from "../board_types";
1
+ import { EntityCollection, RebaseData, RebaseContext, AnalyticsController, Entity } from "@rebasepro/types";
2
+ import { BoardItem } from "@rebasepro/ui";
3
3
  import { BoardDataController } from "../useBoardDataController";
4
4
  export interface UseKanbanDragAndDropParams<M extends Record<string, unknown>> {
5
5
  collection: EntityCollection<M>;
@@ -12,7 +12,7 @@ export interface UseKanbanDragAndDropParams<M extends Record<string, unknown>> {
12
12
  analyticsController: AnalyticsController;
13
13
  }
14
14
  export declare function useKanbanDragAndDrop<M extends Record<string, unknown>>({ collection, fullPath, columnProperty, orderProperty, dataClient, context, boardDataController, analyticsController }: UseKanbanDragAndDropParams<M>): {
15
- handleItemsReorder: (items: BoardItem<M>[], moveInfo?: {
15
+ handleItemsReorder: (items: BoardItem<Entity<M>>[], moveInfo?: {
16
16
  itemId: string;
17
17
  sourceColumn: string;
18
18
  targetColumn: string;
@@ -1,7 +1,8 @@
1
1
  import type { EntityCollection } from "@rebasepro/types";
2
2
  import React from "react";
3
3
  import { Entity, EntityStatus } from "@rebasepro/types";
4
- import type { EntityFormProps, OnUpdateParams } from "../types/components/EntityFormProps";
4
+ import type { EntityFormBindingProps } from "../form";
5
+ import type { OnUpdateParams } from "../types/components/EntityFormProps";
5
6
  import { MAIN_TAB_VALUE, JSON_TAB_VALUE, HISTORY_TAB_VALUE } from "../util/entity_view_constants";
6
7
  export { MAIN_TAB_VALUE, JSON_TAB_VALUE, HISTORY_TAB_VALUE };
7
8
  export type BarActionsParams = {
@@ -34,7 +35,7 @@ export interface EntityEditViewProps<M extends Record<string, unknown> = Record<
34
35
  navigateBack?: () => void;
35
36
  layout?: "side_panel" | "full_screen" | "split" | "dialog";
36
37
  barActions?: (params: BarActionsParams) => React.ReactNode;
37
- formProps?: Partial<EntityFormProps<M>>;
38
+ formProps?: Partial<EntityFormBindingProps<M>>;
38
39
  /**
39
40
  * Pre-populate the form with these values when creating a new entity.
40
41
  * Only applied when the form is in "new" mode (no entityId).
@@ -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, homePage, entityViews, entityActions, plugins, collectionEditor, navigationGroupMappings }: RebaseCMSConfig): null;
10
+ export declare function RebaseCMS({ collections, views, homePage, entityViews, entityActions, collectionEditor, navigationGroupMappings }: RebaseCMSConfig): null;
@@ -1,28 +1,19 @@
1
1
  import { SelectedCellProps } from "@rebasepro/types";
2
- /**
3
- * A ref-based selection store that avoids React context re-renders.
4
- *
5
- * The problem with putting `selectedCell` in a React context value is that
6
- * ANY cell selection change triggers a context value change, which forces
7
- * ALL consumers (every PropertyTableCell in the table) to re-render.
8
- * This causes the DOM to be replaced between mousedown and click events,
9
- * breaking `alwaysInteractive` cells (like relation selectors) where the
10
- * user needs to click a button on the very first interaction.
11
- *
12
- * This store uses `useSyncExternalStore` so only cells whose `selected`
13
- * derivation actually changed will re-render.
14
- */
2
+ import { VirtualTableSelectionStore, SelectedCell } from "@rebasepro/ui";
3
+ export interface AdminSelectedCell extends SelectedCell {
4
+ entityPath: string;
5
+ entityId: string | number;
6
+ propertyKey: string;
7
+ cellRect: DOMRect;
8
+ width: number;
9
+ height: number;
10
+ }
15
11
  export declare function createSelectionStore(): {
16
- getSnapshot: () => SelectedCellProps | undefined;
12
+ getSnapshot: () => AdminSelectedCell | undefined;
17
13
  subscribe: (listener: () => void) => () => void;
18
- select: (cell: SelectedCellProps | undefined) => void;
14
+ select: (cell: AdminSelectedCell | undefined) => void;
19
15
  };
20
- export type SelectionStore = ReturnType<typeof createSelectionStore>;
21
- /**
22
- * Hook that subscribes a cell to the selection store and returns
23
- * whether THIS cell is selected. Only re-renders when the cell's
24
- * `selected` boolean actually changes (not on every store update).
25
- */
16
+ export type SelectionStore = VirtualTableSelectionStore<AdminSelectedCell>;
26
17
  export declare function useCellSelected(store: {
27
18
  getSnapshot: () => SelectedCellProps | undefined;
28
19
  subscribe: (listener: () => void) => () => void;
@@ -3,5 +3,5 @@ import type { Property, PropertyConfig } from "@rebasepro/types";
3
3
  export declare const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig>;
4
4
  export declare function getDefaultFieldConfig(property: Property): PropertyConfig | undefined;
5
5
  export declare function getFieldConfig(property: Property, propertyConfigs: Record<string, PropertyConfig>): PropertyConfig | undefined;
6
- export declare function getDefaultFieldId(property: Property): "text_field" | "multiline" | "markdown" | "url" | "email" | "switch" | "select" | "multi_select" | "user_select" | "number_input" | "number_select" | "multi_number_select" | "file_upload" | "multi_file_upload" | "reference_as_string" | "reference" | "multi_references" | "relation" | "date_time" | "group" | "key_value" | "repeat" | "custom_array" | "block" | "vector_input" | undefined;
6
+ export declare function getDefaultFieldId(property: Property): "text_field" | "multiline" | "markdown" | "url" | "email" | "switch" | "select" | "multi_select" | "user_select" | "number_input" | "number_select" | "multi_number_select" | "file_upload" | "multi_file_upload" | "reference" | "multi_references" | "relation" | "date_time" | "group" | "key_value" | "repeat" | "custom_array" | "block" | "vector_input" | undefined;
7
7
  export declare function getFieldId(property: Property): string | undefined;
@@ -10,8 +10,6 @@ export interface MarkdownEditorConfig {
10
10
  transformPastedText?: boolean;
11
11
  }
12
12
  export type RichTextEditorTextSize = "sm" | "base" | "lg";
13
- /** @deprecated Use `RichTextEditorTextSize` instead. */
14
- export type RebaseEditorTextSize = RichTextEditorTextSize;
15
13
  export type RichTextEditorProps = {
16
14
  content?: JSONContent | string;
17
15
  onMarkdownContentChange?: (content: string) => void;
@@ -29,8 +27,4 @@ export type RichTextEditorProps = {
29
27
  disabled?: boolean;
30
28
  markdownConfig?: MarkdownEditorConfig;
31
29
  };
32
- /** @deprecated Use `RichTextEditorProps` instead. */
33
- export type RebaseEditorProps = RichTextEditorProps;
34
30
  export declare const RichTextEditor: ({ content, onJsonContentChange, onHtmlContentChange, onMarkdownContentChange, version, textSize, highlight, handleImageUpload, aiController, disabled, markdownConfig }: RichTextEditorProps) => React.JSX.Element;
35
- /** @deprecated Use `RichTextEditor` instead. */
36
- export declare const RebaseEditor: ({ content, onJsonContentChange, onHtmlContentChange, onMarkdownContentChange, version, textSize, highlight, handleImageUpload, aiController, disabled, markdownConfig }: RichTextEditorProps) => React.JSX.Element;
package/dist/editor.js CHANGED
@@ -2681,8 +2681,6 @@ var RichTextEditor = ({ content, onJsonContentChange, onHtmlContentChange, onMar
2681
2681
  })]
2682
2682
  });
2683
2683
  };
2684
- /** @deprecated Use `RichTextEditor` instead. */
2685
- var RebaseEditor = RichTextEditor;
2686
2684
  var cssStyles = `
2687
2685
  .ProseMirror {
2688
2686
  box-shadow: none !important;
@@ -2887,6 +2885,6 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
2887
2885
  }
2888
2886
  `;
2889
2887
  //#endregion
2890
- export { RebaseEditor, RichTextEditor };
2888
+ export { RichTextEditor };
2891
2889
 
2892
2890
  //# sourceMappingURL=editor.js.map