@rebasepro/app 0.16.1-canary.ge71347e → 0.17.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 (122) hide show
  1. package/README.md +2 -2
  2. package/dist/auth/types.d.ts +1 -1
  3. package/dist/collections/collection_view_config.d.ts +1 -1
  4. package/dist/collections/entity-display-cache.d.ts +1 -1
  5. package/dist/collections/entity-display.d.ts +1 -1
  6. package/dist/collections/form-layout.d.ts +1 -1
  7. package/dist/collections/navigation_from_path.d.ts +1 -1
  8. package/dist/collections/navigation_utils.d.ts +1 -1
  9. package/dist/collections/parent_references_from_path.d.ts +1 -1
  10. package/dist/collections/title-property.d.ts +1 -1
  11. package/dist/components/LoginView/LoginView.d.ts +1 -1
  12. package/dist/components/RebaseAuth.d.ts +1 -1
  13. package/dist/components/common/types.d.ts +1 -1
  14. package/dist/components/common/useColumnsIds.d.ts +1 -1
  15. package/dist/components/common/useDataTableController.d.ts +1 -1
  16. package/dist/contexts/AnalyticsContext.d.ts +1 -1
  17. package/dist/contexts/AuthControllerContext.d.ts +1 -1
  18. package/dist/contexts/CollectionResolverContext.d.ts +1 -1
  19. package/dist/contexts/CollectionScopeContext.d.ts +1 -1
  20. package/dist/contexts/ComponentOverrideContext.d.ts +1 -1
  21. package/dist/contexts/CustomizationControllerContext.d.ts +1 -1
  22. package/dist/contexts/DialogsProvider.d.ts +1 -1
  23. package/dist/contexts/UserConfigurationPersistenceContext.d.ts +1 -1
  24. package/dist/core/PluginLifecycleManager.d.ts +1 -1
  25. package/dist/core/PluginProviderStack.d.ts +1 -1
  26. package/dist/core/RebaseProps.d.ts +2 -2
  27. package/dist/hooks/data/delete.d.ts +1 -1
  28. package/dist/hooks/data/save.d.ts +1 -1
  29. package/dist/hooks/data/useCollection.d.ts +1 -1
  30. package/dist/hooks/data/useFetch.d.ts +1 -1
  31. package/dist/hooks/data/useRelationSelector.d.ts +1 -1
  32. package/dist/hooks/useAdminModeController.d.ts +2 -2
  33. package/dist/hooks/useAnalyticsController.d.ts +1 -1
  34. package/dist/hooks/useAuthController.d.ts +1 -1
  35. package/dist/hooks/useAuthSubscription.d.ts +1 -1
  36. package/dist/hooks/useBuildLocalConfigurationPersistence.d.ts +1 -1
  37. package/dist/hooks/useComponentOverride.d.ts +1 -1
  38. package/dist/hooks/useCustomizationController.d.ts +1 -1
  39. package/dist/hooks/useDialogsController.d.ts +1 -1
  40. package/dist/hooks/usePermissions.d.ts +1 -1
  41. package/dist/hooks/useRebaseContext.d.ts +1 -1
  42. package/dist/hooks/useRebaseRegistry.d.ts +4 -4
  43. package/dist/hooks/useSlot.d.ts +1 -1
  44. package/dist/hooks/useSnackbarController.d.ts +1 -1
  45. package/dist/hooks/useStudioBridge.d.ts +1 -1
  46. package/dist/hooks/useUserConfigurationPersistence.d.ts +1 -1
  47. package/dist/i18n/RebaseI18nProvider.d.ts +1 -1
  48. package/dist/index.es.js +9 -8
  49. package/dist/index.es.js.map +1 -1
  50. package/dist/internal/common.d.ts +1 -1
  51. package/dist/internal/useRestoreScroll.d.ts +1 -1
  52. package/dist/locales/de.d.ts +1 -1
  53. package/dist/locales/en.d.ts +1 -1
  54. package/dist/locales/es.d.ts +1 -1
  55. package/dist/locales/fr.d.ts +1 -1
  56. package/dist/locales/hi.d.ts +1 -1
  57. package/dist/locales/it.d.ts +1 -1
  58. package/dist/locales/pt.d.ts +1 -1
  59. package/dist/util/previews.d.ts +2 -2
  60. package/package.json +8 -8
  61. package/src/auth/types.ts +1 -1
  62. package/src/collections/collection_view_config.ts +1 -1
  63. package/src/collections/entity-display-cache.ts +1 -1
  64. package/src/collections/entity-display.ts +1 -1
  65. package/src/collections/entity_image_preview.ts +1 -1
  66. package/src/collections/form-layout.ts +2 -2
  67. package/src/collections/navigation_from_path.ts +1 -1
  68. package/src/collections/navigation_utils.ts +1 -1
  69. package/src/collections/parent_references_from_path.ts +1 -1
  70. package/src/collections/property_presentation.ts +1 -1
  71. package/src/collections/title-property.ts +1 -1
  72. package/src/components/LoginView/LoginView.tsx +1 -1
  73. package/src/components/RebaseAuth.tsx +1 -1
  74. package/src/components/common/types.tsx +1 -1
  75. package/src/components/common/useColumnsIds.tsx +1 -1
  76. package/src/components/common/useDataTableController.tsx +1 -1
  77. package/src/contexts/AdminModeController.tsx +2 -2
  78. package/src/contexts/AnalyticsContext.tsx +1 -1
  79. package/src/contexts/AuthControllerContext.tsx +1 -1
  80. package/src/contexts/CollectionResolverContext.tsx +1 -1
  81. package/src/contexts/CollectionScopeContext.tsx +1 -1
  82. package/src/contexts/ComponentOverrideContext.tsx +1 -1
  83. package/src/contexts/CustomizationControllerContext.tsx +1 -1
  84. package/src/contexts/DialogsProvider.tsx +1 -1
  85. package/src/contexts/UserConfigurationPersistenceContext.tsx +1 -1
  86. package/src/core/PluginLifecycleManager.tsx +1 -1
  87. package/src/core/PluginProviderStack.tsx +1 -1
  88. package/src/core/Rebase.tsx +4 -4
  89. package/src/core/RebaseProps.tsx +2 -2
  90. package/src/hooks/data/delete.ts +1 -1
  91. package/src/hooks/data/save.ts +1 -1
  92. package/src/hooks/data/useCollection.tsx +1 -1
  93. package/src/hooks/data/useFetch.tsx +1 -1
  94. package/src/hooks/data/useRelationSelector.tsx +1 -1
  95. package/src/hooks/useAdminModeController.tsx +2 -2
  96. package/src/hooks/useAnalyticsController.tsx +1 -1
  97. package/src/hooks/useAuthController.tsx +1 -1
  98. package/src/hooks/useAuthSubscription.ts +1 -1
  99. package/src/hooks/useBuildAdminModeController.tsx +9 -3
  100. package/src/hooks/useBuildLocalConfigurationPersistence.tsx +1 -1
  101. package/src/hooks/useComponentOverride.tsx +1 -1
  102. package/src/hooks/useCustomizationController.tsx +1 -1
  103. package/src/hooks/useDialogsController.tsx +1 -1
  104. package/src/hooks/usePermissions.ts +1 -1
  105. package/src/hooks/useRebaseContext.tsx +1 -1
  106. package/src/hooks/useRebaseRegistry.tsx +7 -7
  107. package/src/hooks/useSlot.tsx +1 -1
  108. package/src/hooks/useSnackbarController.tsx +1 -1
  109. package/src/hooks/useStudioBridge.tsx +1 -1
  110. package/src/hooks/useUserConfigurationPersistence.tsx +1 -1
  111. package/src/i18n/RebaseI18nProvider.tsx +1 -1
  112. package/src/index.ts +1 -1
  113. package/src/internal/common.tsx +1 -1
  114. package/src/internal/useRestoreScroll.tsx +1 -1
  115. package/src/locales/de.ts +1 -1
  116. package/src/locales/en.ts +1 -1
  117. package/src/locales/es.ts +1 -1
  118. package/src/locales/fr.ts +1 -1
  119. package/src/locales/hi.ts +1 -1
  120. package/src/locales/it.ts +1 -1
  121. package/src/locales/pt.ts +1 -1
  122. package/src/util/previews.ts +2 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @rebasepro/app
2
2
 
3
- Framework-agnostic runtime for data-driven admin panels — React hooks, providers, contexts, and shared components used by `@rebasepro/admin` and `@rebasepro/studio`.
3
+ Framework-agnostic runtime for data-driven admin panels — React hooks, providers, contexts, and shared components used by `@rebasepro/cms` and `@rebasepro/studio`.
4
4
 
5
5
  ## Installation
6
6
 
@@ -166,7 +166,7 @@ function ProductList() {
166
166
 
167
167
  ## Related Packages
168
168
 
169
- - [`@rebasepro/admin`](../admin) — CMS views, forms, and routing (built on top of core)
169
+ - [`@rebasepro/cms`](../admin) — CMS views, forms, and routing (built on top of core)
170
170
  - [`@rebasepro/ui`](../ui) — Design system components
171
171
  - [`@rebasepro/common`](../common) — Shared utilities and collection registry
172
172
  - [`@rebasepro/types`](../types) — TypeScript type definitions
@@ -1,5 +1,5 @@
1
1
  import { User, AuthTokens, DeviceSession, RebaseSession, AuthChangeEvent } from "@rebasepro/types";
2
- import { AuthController } from "@rebasepro/admin-types";
2
+ import { AuthController } from "@rebasepro/cms-types";
3
3
  import type { AuthConfigResponse } from "./api.js";
4
4
  export type { User, AuthTokens, DeviceSession };
5
5
  /**
@@ -10,7 +10,7 @@
10
10
  * imported.
11
11
  */
12
12
  import type { ChildViewSource, CollectionConfig } from "@rebasepro/types";
13
- import { type AdminCollection, type DefaultSelectedViewBuilder, type DefaultSelectedViewParams } from "@rebasepro/admin-types";
13
+ import { type AdminCollection, type DefaultSelectedViewBuilder, type DefaultSelectedViewParams } from "@rebasepro/cms-types";
14
14
  export declare function resolveDefaultSelectedView(defaultSelectedView: string | DefaultSelectedViewBuilder | undefined, params: DefaultSelectedViewParams): string | undefined;
15
15
  export declare function getLocalChangesBackup(collection: AdminCollection): "manual_apply" | "auto_apply";
16
16
  /**
@@ -12,7 +12,7 @@
12
12
  * thing: the same store answers an imperative caller (an export, a breadcrumb
13
13
  * built outside the tree), and it is testable without a renderer.
14
14
  */
15
- import type { EntityDisplayRole } from "@rebasepro/admin-types";
15
+ import type { EntityDisplayRole } from "@rebasepro/cms-types";
16
16
  export type EntityDisplayKey = string;
17
17
  /** The identity of one role of one record, as a cache key. */
18
18
  export declare function entityDisplayKey(path: string, entityId: string | number | undefined, role: EntityDisplayRole): EntityDisplayKey;
@@ -7,7 +7,7 @@
7
7
  * await — a sort comparator, an export column, a server render — uses the key
8
8
  * and is documented to ignore resolvers.
9
9
  */
10
- import type { AdminCollection, EntityDisplayResolver, EntityDisplayRole } from "@rebasepro/admin-types";
10
+ import type { AdminCollection, EntityDisplayResolver, EntityDisplayRole } from "@rebasepro/cms-types";
11
11
  /**
12
12
  * The property path a role is declared to read, when it is declared as a path.
13
13
  *
@@ -12,7 +12,7 @@
12
12
  * hand-tunes. Deriving it here means it is testable in isolation, which matters
13
13
  * because "what span does a date get" is exactly the kind of rule that rots.
14
14
  */
15
- import type { AdminCollection, PropertySpan } from "@rebasepro/admin-types";
15
+ import type { AdminCollection, PropertySpan } from "@rebasepro/cms-types";
16
16
  import type { Property } from "@rebasepro/types";
17
17
  /** A field placed on the grid. */
18
18
  export interface ResolvedFormField {
@@ -2,7 +2,7 @@ type EntityCustomView<M extends Record<string, unknown> = Record<string, unknown
2
2
  key: string;
3
3
  [key: string]: unknown;
4
4
  };
5
- import type { AdminCollection } from "@rebasepro/admin-types";
5
+ import type { AdminCollection } from "@rebasepro/cms-types";
6
6
  export type NavigationViewInternal<M extends Record<string, unknown> = Record<string, unknown>> = NavigationViewEntityInternal<M> | NavigationViewCollectionInternal<M> | NavigationViewEntityCustomInternal<M>;
7
7
  export interface NavigationViewEntityInternal<M extends Record<string, unknown>> {
8
8
  type: "entity";
@@ -1,4 +1,4 @@
1
- import type { AdminCollection } from "@rebasepro/admin-types";
1
+ import type { AdminCollection } from "@rebasepro/cms-types";
2
2
  export declare function removeInitialAndTrailingSlashes(s: string): string;
3
3
  export declare function removeInitialSlash(s: string): string;
4
4
  export declare function removeTrailingSlash(s: string): string;
@@ -1,5 +1,5 @@
1
1
  import { EntityReference } from "@rebasepro/types";
2
- import type { AdminCollection } from "@rebasepro/admin-types";
2
+ import type { AdminCollection } from "@rebasepro/cms-types";
3
3
  export declare function getParentReferencesFromPath(props: {
4
4
  path: string;
5
5
  collections: AdminCollection[] | undefined;
@@ -1,4 +1,4 @@
1
- import type { AdminCollection } from "@rebasepro/admin-types";
1
+ import type { AdminCollection } from "@rebasepro/cms-types";
2
2
  /**
3
3
  * All properties that could serve as the entity title, best first.
4
4
  *
@@ -21,7 +21,7 @@ declare global {
21
21
  };
22
22
  }
23
23
  }
24
- import { AuthControllerExtended } from "@rebasepro/admin-types";
24
+ import { AuthControllerExtended } from "@rebasepro/cms-types";
25
25
  /**
26
26
  * Props for the generic LoginView.
27
27
  * Consumes {@link AuthControllerExtended} — works with any backend
@@ -1,4 +1,4 @@
1
- import type { RebaseAuthViewConfig } from "@rebasepro/admin-types";
1
+ import type { RebaseAuthViewConfig } from "@rebasepro/cms-types";
2
2
  /**
3
3
  * Declarative component to configure authentication in Rebase.
4
4
  * Renders nothing — purely registers config into the RebaseRegistry.
@@ -1,5 +1,5 @@
1
1
  import type { Property, Entity } from "@rebasepro/types";
2
- import { CollectionSize, SelectedCellProps } from "@rebasepro/admin-types";
2
+ import { CollectionSize, SelectedCellProps } from "@rebasepro/cms-types";
3
3
  export type DataCollectionTableController<M extends Record<string, unknown>> = {
4
4
  /**
5
5
  * This cell is displayed as selected
@@ -1,5 +1,5 @@
1
1
  import type { Property } from "@rebasepro/types";
2
- import type { AdminCollection } from "@rebasepro/admin-types";
2
+ import type { AdminCollection } from "@rebasepro/cms-types";
3
3
  export type PropertyColumnConfig = {
4
4
  key: string;
5
5
  disabled: boolean;
@@ -1,5 +1,5 @@
1
1
  import { Entity, FilterValues, User } from "@rebasepro/types";
2
- import { EntityTableController, AdminCollection } from "@rebasepro/admin-types";
2
+ import { EntityTableController, AdminCollection } from "@rebasepro/cms-types";
3
3
  import { ScrollRestorationController } from "./useScrollRestoration.js";
4
4
  export declare const DEFAULT_PAGE_SIZE = 50;
5
5
  export type DataTableControllerProps<M extends Record<string, any> = any> = {
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
- import { AnalyticsController } from "@rebasepro/admin-types";
2
+ import { AnalyticsController } from "@rebasepro/cms-types";
3
3
  export declare const AnalyticsContext: React.Context<AnalyticsController>;
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
- import { AuthController } from "@rebasepro/admin-types";
2
+ import { AuthController } from "@rebasepro/cms-types";
3
3
  export declare const AuthControllerContext: React.Context<AuthController<any, any>>;
@@ -10,7 +10,7 @@ export type CollectionResolver = (slug: string) => {
10
10
  * layer, which needs a collection's primary keys to give its rows an address.
11
11
  *
12
12
  * The inversion is forced by the composition: `<Rebase client>` builds the data
13
- * layer, and `<RebaseAdmin collections>` sits inside it — so the collections are
13
+ * layer, and `<RebaseCMS collections>` sits inside it — so the collections are
14
14
  * not in scope where the data is created, and `Rebase` cannot take them as a
15
15
  * prop without giving every headless BaaS app a collections argument it has no
16
16
  * use for.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { AdminCollection } from "@rebasepro/admin-types";
2
+ import type { AdminCollection } from "@rebasepro/cms-types";
3
3
  /**
4
4
  * Carries the collection a UI subtree is currently bound to.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { ComponentOverrideMap } from "@rebasepro/admin-types";
2
+ import type { ComponentOverrideMap } from "@rebasepro/cms-types";
3
3
  /**
4
4
  * Internal state for the component override resolution chain.
5
5
  * Holds both global overrides (set on `<Rebase>`) and collection-scoped
@@ -1,3 +1,3 @@
1
- import type { CustomizationController } from "@rebasepro/admin-types";
1
+ import type { CustomizationController } from "@rebasepro/cms-types";
2
2
  import React from "react";
3
3
  export declare const CustomizationControllerContext: React.Context<CustomizationController>;
@@ -1,4 +1,4 @@
1
- import type { DialogsController } from "@rebasepro/admin-types";
1
+ import type { DialogsController } from "@rebasepro/cms-types";
2
2
  import React, { PropsWithChildren } from "react";
3
3
  export declare const DialogsControllerContext: React.Context<DialogsController>;
4
4
  export declare const DialogsProvider: React.FC<PropsWithChildren>;
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
- import { UserConfigurationPersistence } from "@rebasepro/admin-types";
2
+ import { UserConfigurationPersistence } from "@rebasepro/cms-types";
3
3
  export declare const UserConfigurationPersistenceContext: React.Context<UserConfigurationPersistence | undefined>;
@@ -1,4 +1,4 @@
1
- import type { RebasePlugin, RebaseContext } from "@rebasepro/admin-types";
1
+ import type { RebasePlugin, RebaseContext } from "@rebasepro/cms-types";
2
2
  /**
3
3
  * Render-less component that manages plugin lifecycle hooks.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { RebasePlugin } from "@rebasepro/admin-types";
1
+ import type { RebasePlugin } from "@rebasepro/cms-types";
2
2
  import React from "react";
3
3
  /**
4
4
  * Wraps children with all provider components from plugins that match the given scope.
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { User, DataDriver, DataSourceDefinition, StorageSource, StorageSourceDefinition, DatabaseAdmin, RebaseClient } from "@rebasepro/types";
3
- import { Locale, AuthController, AnalyticsEvent, UserConfigurationPersistence, RebaseContext, EntityLinkBuilder, RebasePlugin, SlotContribution, PropertyConfig, EntityCustomView, CollectionCustomView, EntityAction, RebaseTranslations, ComponentOverrideMap } from "@rebasepro/admin-types";
3
+ import { Locale, AuthController, AnalyticsEvent, UserConfigurationPersistence, RebaseContext, EntityLinkBuilder, RebasePlugin, SlotContribution, PropertyConfig, EntityCustomView, CollectionCustomView, EntityAction, RebaseTranslations, ComponentOverrideMap } from "@rebasepro/cms-types";
4
4
  /**
5
5
  * A data source registered on `<Rebase>`. Extends the shared
6
6
  * {@link DataSourceDefinition} with the frontend {@link DataDriver} used for
@@ -101,7 +101,7 @@ import type { EffectiveRoleController } from "@rebasepro/types";
101
101
  */
102
102
  export type RebaseProps<USER extends User, DB = unknown> = {
103
103
  /**
104
- * The root components of your application. Use RebaseAdmin, RebaseStudio, and RebaseShell.
104
+ * The root components of your application. Use RebaseCMS, RebaseStudio, and RebaseShell.
105
105
  * Alternatively, pass a render function that receives { context, loading }.
106
106
  */
107
107
  children: React.ReactNode | ((props: {
@@ -1,5 +1,5 @@
1
1
  import { Entity, CollectionCallbacks, User } from "@rebasepro/types";
2
- import { RebaseContext, AdminCollection } from "@rebasepro/admin-types";
2
+ import { RebaseContext, AdminCollection } from "@rebasepro/cms-types";
3
3
  import { RebaseData } from "@rebasepro/types";
4
4
  /**
5
5
  * @group Hooks and utilities
@@ -1,5 +1,5 @@
1
1
  import { Entity, EntityStatus, EntityValues } from "@rebasepro/types";
2
- import { RebaseContext, AdminCollection } from "@rebasepro/admin-types";
2
+ import { RebaseContext, AdminCollection } from "@rebasepro/cms-types";
3
3
  import { RebaseData } from "@rebasepro/types";
4
4
  /**
5
5
  * @group Hooks and utilities
@@ -1,5 +1,5 @@
1
1
  import { Entity, FilterValues, User } from "@rebasepro/types";
2
- import type { AdminCollection } from "@rebasepro/admin-types";
2
+ import type { AdminCollection } from "@rebasepro/cms-types";
3
3
  /**
4
4
  * @group Hooks and utilities
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { Entity, User } from "@rebasepro/types";
2
- import { AdminCollection } from "@rebasepro/admin-types";
2
+ import { AdminCollection } from "@rebasepro/cms-types";
3
3
  /**
4
4
  * @group Hooks and utilities
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { Entity, EntityRelation, FilterValues } from "@rebasepro/types";
2
- import type { AdminCollection } from "@rebasepro/admin-types";
2
+ import type { AdminCollection } from "@rebasepro/cms-types";
3
3
  export interface RelationItem {
4
4
  id: string | number;
5
5
  label: string;
@@ -3,8 +3,8 @@
3
3
  * @group Hooks and utilities
4
4
  */
5
5
  export interface AdminModeController {
6
- mode: "content" | "studio" | "settings";
7
- setMode: (mode: "content" | "studio" | "settings") => void;
6
+ mode: "cms" | "studio" | "settings";
7
+ setMode: (mode: "cms" | "studio" | "settings") => void;
8
8
  }
9
9
  /**
10
10
  * Hook to retrieve the current admin mode ("developer" | "editor"), and `setMode`
@@ -1,4 +1,4 @@
1
- import { AnalyticsController } from "@rebasepro/admin-types";
1
+ import { AnalyticsController } from "@rebasepro/cms-types";
2
2
  /**
3
3
  * @group Hooks and utilities
4
4
  */
@@ -1,5 +1,5 @@
1
1
  import { User } from "@rebasepro/types";
2
- import { AuthController } from "@rebasepro/admin-types";
2
+ import { AuthController } from "@rebasepro/cms-types";
3
3
  /**
4
4
  * Hook to retrieve the AuthContext.
5
5
  *
@@ -1,3 +1,3 @@
1
1
  import { AuthClient } from "@rebasepro/types";
2
- import { AuthController } from "@rebasepro/admin-types";
2
+ import { AuthController } from "@rebasepro/cms-types";
3
3
  export declare function useAuthSubscription(authClient?: AuthClient): AuthController;
@@ -1,2 +1,2 @@
1
- import { UserConfigurationPersistence } from "@rebasepro/admin-types";
1
+ import { UserConfigurationPersistence } from "@rebasepro/cms-types";
2
2
  export declare function useBuildLocalConfigurationPersistence(): UserConfigurationPersistence;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { OverridableComponentName } from "@rebasepro/admin-types";
2
+ import type { OverridableComponentName } from "@rebasepro/cms-types";
3
3
  /**
4
4
  * Resolves a potentially overridden component.
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { CustomizationController } from "@rebasepro/admin-types";
1
+ import type { CustomizationController } from "@rebasepro/cms-types";
2
2
  /**
3
3
  * Use this hook to retrieve the customization controller.
4
4
  * This hook includes all the customization options that can be used
@@ -1,4 +1,4 @@
1
- import type { DialogsController } from "@rebasepro/admin-types";
1
+ import type { DialogsController } from "@rebasepro/cms-types";
2
2
  /**
3
3
  * Use this hook to open a dialog imperatively.
4
4
  * Alternatively, you can use dialogs declaratively using the `Dialog` component.
@@ -1,5 +1,5 @@
1
1
  import { Entity } from "@rebasepro/types";
2
- import type { AdminCollection } from "@rebasepro/admin-types";
2
+ import type { AdminCollection } from "@rebasepro/cms-types";
3
3
  /**
4
4
  * Hook to evaluate roles and permissions for the current user.
5
5
  * It abstracts away the need to pass `authController` to permission evaluation functions.
@@ -1,5 +1,5 @@
1
1
  import { User } from "@rebasepro/types";
2
- import { AuthController, RebaseContext } from "@rebasepro/admin-types";
2
+ import { AuthController, RebaseContext } from "@rebasepro/cms-types";
3
3
  /**
4
4
  * Hook to retrieve the {@link RebaseContext}.
5
5
  *
@@ -1,16 +1,16 @@
1
1
  import React from "react";
2
- import type { RebaseRegistryController, RebaseAdminConfig, RebaseStudioConfig, RebaseAuthViewConfig } from "@rebasepro/admin-types";
2
+ import type { RebaseRegistryController, RebaseCMSConfig, RebaseStudioConfig, RebaseAuthViewConfig } from "@rebasepro/cms-types";
3
3
  /**
4
4
  * Split into two contexts to prevent infinite re-render loops:
5
5
  * - DispatchContext: stable register/unregister functions (never changes identity)
6
6
  * - StateContext: the current config values (changes when modules register)
7
7
  *
8
- * Feature components (RebaseAuth, RebaseAdmin, RebaseStudio) only consume
8
+ * Feature components (RebaseAuth, RebaseCMS, RebaseStudio) only consume
9
9
  * the dispatch context, so registering does NOT cause them to re-render.
10
10
  * RebaseShell consumes state context to read the collected configs.
11
11
  */
12
12
  interface RegistryDispatch {
13
- registerAdmin: (config: RebaseAdminConfig) => void;
13
+ registerAdmin: (config: RebaseCMSConfig) => void;
14
14
  unregisterAdmin: () => void;
15
15
  registerStudio: (config: RebaseStudioConfig) => void;
16
16
  unregisterStudio: () => void;
@@ -27,7 +27,7 @@ export declare function RebaseRegistryProvider({ children }: {
27
27
  export declare function useRebaseRegistry(): RebaseRegistryController;
28
28
  /**
29
29
  * Returns only the stable dispatch functions.
30
- * Use this in feature components (RebaseAuth, RebaseAdmin, RebaseStudio)
30
+ * Use this in feature components (RebaseAuth, RebaseCMS, RebaseStudio)
31
31
  * to avoid re-render loops.
32
32
  */
33
33
  export declare function useRebaseRegistryDispatch(): RegistryDispatch;
@@ -1,4 +1,4 @@
1
- import type { SlotName, SlotRegistry } from "@rebasepro/admin-types";
1
+ import type { SlotName, SlotRegistry } from "@rebasepro/cms-types";
2
2
  import React from "react";
3
3
  /**
4
4
  * Hook that retrieves and renders all slot contributions for a given slot name.
@@ -1,4 +1,4 @@
1
- import type { SnackbarAction, SnackbarMessageType } from "@rebasepro/admin-types";
1
+ import type { SnackbarAction, SnackbarMessageType } from "@rebasepro/cms-types";
2
2
  import React from "react";
3
3
  /**
4
4
  * Hook to retrieve the SnackbarContext.
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import type { CollectionRegistryController } from "@rebasepro/types";
3
- import type { SidePanelController, UrlController, NavigationStateController, BreadcrumbEntry, BreadcrumbsController } from "@rebasepro/admin-types";
3
+ import type { SidePanelController, UrlController, NavigationStateController, BreadcrumbEntry, BreadcrumbsController } from "@rebasepro/cms-types";
4
4
  export type { BreadcrumbEntry, BreadcrumbsController };
5
5
  /**
6
6
  * StudioBridge provides optional admin capabilities to Studio components.
@@ -1,4 +1,4 @@
1
- import { UserConfigurationPersistence } from "@rebasepro/admin-types";
1
+ import { UserConfigurationPersistence } from "@rebasepro/cms-types";
2
2
  /**
3
3
  * Use this controller to access the configuration that is stored externally,
4
4
  * and not defined in code
@@ -1,5 +1,5 @@
1
1
  import React, { PropsWithChildren } from "react";
2
- import { RebaseTranslations } from "@rebasepro/admin-types";
2
+ import { RebaseTranslations } from "@rebasepro/cms-types";
3
3
  export declare const REBASE_LOCALE_STORAGE_KEY = "rebase_locale";
4
4
  /** DeepPartial helper — allows partial overrides at any nesting level */
5
5
  type DeepPartial<T> = T extends object ? {
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { createContext, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
2
2
  import { Alert, AlertCircleIcon, AlertTriangleIcon, AppWindow, ArrowDownIcon, ArrowLeftIcon, ArrowRightLeftIcon, ArrowUpDownIcon, ArrowUpIcon, Avatar, BooleanSwitch, Button, CalendarIcon, Card, CenteredView, CheckCircle2Icon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsLeftIcon, ChevronsRightIcon, Chip, CircleDotIcon, CircleUserIcon, CircularProgress, ColumnsIcon, Container, Dialog, DialogActions, DialogContent, DialogTitle, DollarSignIcon, ErrorBoundary, FileIcon, FileTextIcon, FilterChip, FilterIcon, FolderIcon, FolderKanbanIcon, IconButton, KanbanIcon, KanbanView, LanguagesIcon, LayoutGridIcon, ListIcon, ListPlusIcon, ListTodoIcon, LoadingButton, LogOutIcon, LucideIconByName, MailIcon, Menu, MenuItem, MessageCircleIcon, MoonIcon, MultiSelect, MultiSelectItem, PanelLeftIcon, Paper, PenLineIcon, PencilIcon, PhoneIcon, PinIcon, PlusIcon, Popover, RefreshCwIcon, SearchBar, Select, SelectItem, Separator, SettingsIcon, Skeleton, StickyNoteIcon, SunIcon, SunMoonIcon, Tab, Table, TableBody, TableCell, TableHeader, TableRow, Tabs, TagIcon, TextField, ToggleButtonGroup, Tooltip, Trash2Icon, TrendingUpIcon, TypeIcon, Typography, UserIcon, UserPlus, UsersIcon, VideoIcon, Wand2Icon, WrenchIcon, XIcon, cls, colorClassesMapping, coolIconKeys, defaultBorderMixin, getColorSchemeForKey, getColorSchemeForSeed, iconKeys, iconSize, lazyChunk } from "@rebasepro/ui";
3
3
  import { ALL_WHERE_FILTER_OPS, DEFAULT_DATA_SOURCE_KEY, DEFAULT_FILTERABLE_RELATION_KINDS, DEFAULT_STORAGE_SOURCE_KEY, EntityReference, EntityRelation, GeoPoint, RebaseApiError, Vector, getDataSourceCapabilities, isLazyComponentRef, isRelationalCollectionConfig } from "@rebasepro/types";
4
- import { UNRENDERED_SLOTS, resolveAdminCollection } from "@rebasepro/admin-types";
4
+ import { UNRENDERED_SLOTS, resolveAdminCollection } from "@rebasepro/cms-types";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { SnackbarProvider as SnackbarProvider$1, useSnackbar } from "notistack";
7
7
  import { buildRebaseData, canCreateEntity, canDeleteEntity, canEditEntity, canReadCollection, evaluateCondition, getChildViewDeclaringProperties, getChildViewRelationPropertyKeys, getEntityChildViews, getLabelOrConfigFrom, getPrimaryKeys, getSubcollections, isPropertyBuilder, normalizeOrderBy, resolveStorageFilenameString, resolveStoragePathString, resolveStorageSource, serializeOrderBy, stripCollectionPath, wrapAsEntityData, wrapAsSdkData } from "@rebasepro/common";
@@ -102,7 +102,7 @@ var ModeControllerContext = React.createContext({
102
102
  });
103
103
  var ModeControllerProvider = ModeControllerContext.Provider;
104
104
  var AdminModeControllerContext = React.createContext({
105
- mode: "content",
105
+ mode: "cms",
106
106
  setMode: (mode) => {}
107
107
  });
108
108
  var AdminModeControllerProvider = AdminModeControllerContext.Provider;
@@ -307,7 +307,7 @@ function CollectionScopeProvider({ collection, children }) {
307
307
  * layer, which needs a collection's primary keys to give its rows an address.
308
308
  *
309
309
  * The inversion is forced by the composition: `<Rebase client>` builds the data
310
- * layer, and `<RebaseAdmin collections>` sits inside it — so the collections are
310
+ * layer, and `<RebaseCMS collections>` sits inside it — so the collections are
311
311
  * not in scope where the data is created, and `Rebase` cannot take them as a
312
312
  * prop without giving every headless BaaS app a collections argument it has no
313
313
  * use for.
@@ -1556,7 +1556,8 @@ function removeStoredString(key) {
1556
1556
  * whether the UI shows Developer or Editor tools.
1557
1557
  */
1558
1558
  function useBuildAdminModeController() {
1559
- const [mode, setMode] = useState(readStoredString("rebase-admin-mode") ?? "content");
1559
+ const stored = readStoredString("rebase-admin-mode");
1560
+ const [mode, setMode] = useState((stored === "content" ? "cms" : stored) ?? "cms");
1560
1561
  const setModeInternal = useCallback((newMode) => {
1561
1562
  writeStoredString("rebase-admin-mode", newMode);
1562
1563
  setMode(newMode);
@@ -2018,7 +2019,7 @@ function useRebaseRegistry() {
2018
2019
  }
2019
2020
  /**
2020
2021
  * Returns only the stable dispatch functions.
2021
- * Use this in feature components (RebaseAuth, RebaseAdmin, RebaseStudio)
2022
+ * Use this in feature components (RebaseAuth, RebaseCMS, RebaseStudio)
2022
2023
  * to avoid re-render loops.
2023
2024
  */
2024
2025
  function useRebaseRegistryDispatch() {
@@ -18103,7 +18104,7 @@ var STUDIO_NAVIGATION_GROUPS = [
18103
18104
  * dialog sizing logic.
18104
18105
  *
18105
18106
  * @internal Not part of the stable public API — exported only because
18106
- * `@rebasepro/admin` and `@rebasepro/studio` need them to compute the same
18107
+ * `@rebasepro/cms` and `@rebasepro/studio` need them to compute the same
18107
18108
  * dialog widths as the framework. Do not depend on these for app code; they
18108
18109
  * may change shape or be removed without a major version bump.
18109
18110
  */
@@ -18132,7 +18133,7 @@ var scrollsMap = {};
18132
18133
  * router location. Used by the framework's own home page implementations.
18133
18134
  *
18134
18135
  * @internal Not part of the stable public API — exported only because
18135
- * `@rebasepro/admin` and `@rebasepro/studio` reuse it in their home page
18136
+ * `@rebasepro/cms` and `@rebasepro/studio` reuse it in their home page
18136
18137
  * components. Its behavior (module-level scroll cache, router coupling) is
18137
18138
  * an implementation detail and may change without a major version bump.
18138
18139
  */
@@ -18767,7 +18768,7 @@ function resolveFilterOperators({ property, isArray, engine }) {
18767
18768
  * Columns in the form grid.
18768
18769
  *
18769
18770
  * A local literal rather than an import of `FORM_GRID_COLUMNS`: everything else
18770
- * this module takes from `@rebasepro/admin-types` is a *type*, erased at build
18771
+ * this module takes from `@rebasepro/cms-types` is a *type*, erased at build
18771
18772
  * time, and a runtime value would make this pure function depend on that
18772
18773
  * package's built output — which is exactly what broke the dev server, since
18773
18774
  * `@rebasepro/app` resolves that package to its dist. `satisfies PropertySpan`