@rebasepro/app 0.16.1-canary.gef08a6e → 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.
- package/README.md +2 -2
- package/dist/auth/types.d.ts +1 -1
- package/dist/collections/collection_view_config.d.ts +1 -1
- package/dist/collections/entity-display-cache.d.ts +1 -1
- package/dist/collections/entity-display.d.ts +1 -1
- package/dist/collections/form-layout.d.ts +1 -1
- package/dist/collections/navigation_from_path.d.ts +1 -1
- package/dist/collections/navigation_utils.d.ts +1 -1
- package/dist/collections/parent_references_from_path.d.ts +1 -1
- package/dist/collections/title-property.d.ts +1 -1
- package/dist/components/LoginView/LoginView.d.ts +1 -1
- package/dist/components/RebaseAuth.d.ts +1 -1
- package/dist/components/common/types.d.ts +1 -1
- package/dist/components/common/useColumnsIds.d.ts +1 -1
- package/dist/components/common/useDataTableController.d.ts +1 -1
- package/dist/contexts/AnalyticsContext.d.ts +1 -1
- package/dist/contexts/AuthControllerContext.d.ts +1 -1
- package/dist/contexts/CollectionResolverContext.d.ts +1 -1
- package/dist/contexts/CollectionScopeContext.d.ts +1 -1
- package/dist/contexts/ComponentOverrideContext.d.ts +1 -1
- package/dist/contexts/CustomizationControllerContext.d.ts +1 -1
- package/dist/contexts/DialogsProvider.d.ts +1 -1
- package/dist/contexts/UserConfigurationPersistenceContext.d.ts +1 -1
- package/dist/core/PluginLifecycleManager.d.ts +1 -1
- package/dist/core/PluginProviderStack.d.ts +1 -1
- package/dist/core/RebaseProps.d.ts +2 -2
- package/dist/hooks/data/delete.d.ts +1 -1
- package/dist/hooks/data/save.d.ts +1 -1
- package/dist/hooks/data/useCollection.d.ts +1 -1
- package/dist/hooks/data/useFetch.d.ts +1 -1
- package/dist/hooks/data/useRelationSelector.d.ts +1 -1
- package/dist/hooks/useAdminModeController.d.ts +2 -2
- package/dist/hooks/useAnalyticsController.d.ts +1 -1
- package/dist/hooks/useAuthController.d.ts +1 -1
- package/dist/hooks/useAuthSubscription.d.ts +1 -1
- package/dist/hooks/useBuildLocalConfigurationPersistence.d.ts +1 -1
- package/dist/hooks/useComponentOverride.d.ts +1 -1
- package/dist/hooks/useCustomizationController.d.ts +1 -1
- package/dist/hooks/useDialogsController.d.ts +1 -1
- package/dist/hooks/usePermissions.d.ts +1 -1
- package/dist/hooks/useRebaseContext.d.ts +1 -1
- package/dist/hooks/useRebaseRegistry.d.ts +4 -4
- package/dist/hooks/useSlot.d.ts +1 -1
- package/dist/hooks/useSnackbarController.d.ts +1 -1
- package/dist/hooks/useStudioBridge.d.ts +1 -1
- package/dist/hooks/useUserConfigurationPersistence.d.ts +1 -1
- package/dist/i18n/RebaseI18nProvider.d.ts +1 -1
- package/dist/index.es.js +9 -8
- package/dist/index.es.js.map +1 -1
- package/dist/internal/common.d.ts +1 -1
- package/dist/internal/useRestoreScroll.d.ts +1 -1
- package/dist/locales/de.d.ts +1 -1
- package/dist/locales/en.d.ts +1 -1
- package/dist/locales/es.d.ts +1 -1
- package/dist/locales/fr.d.ts +1 -1
- package/dist/locales/hi.d.ts +1 -1
- package/dist/locales/it.d.ts +1 -1
- package/dist/locales/pt.d.ts +1 -1
- package/dist/util/previews.d.ts +2 -2
- package/package.json +8 -8
- package/src/auth/types.ts +1 -1
- package/src/collections/collection_view_config.ts +1 -1
- package/src/collections/entity-display-cache.ts +1 -1
- package/src/collections/entity-display.ts +1 -1
- package/src/collections/entity_image_preview.ts +1 -1
- package/src/collections/form-layout.ts +2 -2
- package/src/collections/navigation_from_path.ts +1 -1
- package/src/collections/navigation_utils.ts +1 -1
- package/src/collections/parent_references_from_path.ts +1 -1
- package/src/collections/property_presentation.ts +1 -1
- package/src/collections/title-property.ts +1 -1
- package/src/components/LoginView/LoginView.tsx +1 -1
- package/src/components/RebaseAuth.tsx +1 -1
- package/src/components/common/types.tsx +1 -1
- package/src/components/common/useColumnsIds.tsx +1 -1
- package/src/components/common/useDataTableController.tsx +1 -1
- package/src/contexts/AdminModeController.tsx +2 -2
- package/src/contexts/AnalyticsContext.tsx +1 -1
- package/src/contexts/AuthControllerContext.tsx +1 -1
- package/src/contexts/CollectionResolverContext.tsx +1 -1
- package/src/contexts/CollectionScopeContext.tsx +1 -1
- package/src/contexts/ComponentOverrideContext.tsx +1 -1
- package/src/contexts/CustomizationControllerContext.tsx +1 -1
- package/src/contexts/DialogsProvider.tsx +1 -1
- package/src/contexts/UserConfigurationPersistenceContext.tsx +1 -1
- package/src/core/PluginLifecycleManager.tsx +1 -1
- package/src/core/PluginProviderStack.tsx +1 -1
- package/src/core/Rebase.tsx +4 -4
- package/src/core/RebaseProps.tsx +2 -2
- package/src/hooks/data/delete.ts +1 -1
- package/src/hooks/data/save.ts +1 -1
- package/src/hooks/data/useCollection.tsx +1 -1
- package/src/hooks/data/useFetch.tsx +1 -1
- package/src/hooks/data/useRelationSelector.tsx +1 -1
- package/src/hooks/useAdminModeController.tsx +2 -2
- package/src/hooks/useAnalyticsController.tsx +1 -1
- package/src/hooks/useAuthController.tsx +1 -1
- package/src/hooks/useAuthSubscription.ts +1 -1
- package/src/hooks/useBuildAdminModeController.tsx +9 -3
- package/src/hooks/useBuildLocalConfigurationPersistence.tsx +1 -1
- package/src/hooks/useComponentOverride.tsx +1 -1
- package/src/hooks/useCustomizationController.tsx +1 -1
- package/src/hooks/useDialogsController.tsx +1 -1
- package/src/hooks/usePermissions.ts +1 -1
- package/src/hooks/useRebaseContext.tsx +1 -1
- package/src/hooks/useRebaseRegistry.tsx +7 -7
- package/src/hooks/useSlot.tsx +1 -1
- package/src/hooks/useSnackbarController.tsx +1 -1
- package/src/hooks/useStudioBridge.tsx +1 -1
- package/src/hooks/useUserConfigurationPersistence.tsx +1 -1
- package/src/i18n/RebaseI18nProvider.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/internal/common.tsx +1 -1
- package/src/internal/useRestoreScroll.tsx +1 -1
- package/src/locales/de.ts +1 -1
- package/src/locales/en.ts +1 -1
- package/src/locales/es.ts +1 -1
- package/src/locales/fr.ts +1 -1
- package/src/locales/hi.ts +1 -1
- package/src/locales/it.ts +1 -1
- package/src/locales/pt.ts +1 -1
- package/src/util/previews.ts +2 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import React, { createContext, useContext, useState, useCallback, useMemo, useRef } from "react";
|
|
2
|
-
import type { RebaseRegistryController,
|
|
2
|
+
import type { RebaseRegistryController, RebaseCMSConfig, RebaseStudioConfig, RebaseAuthViewConfig } from "@rebasepro/cms-types";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Split into two contexts to prevent infinite re-render loops:
|
|
6
6
|
* - DispatchContext: stable register/unregister functions (never changes identity)
|
|
7
7
|
* - StateContext: the current config values (changes when modules register)
|
|
8
8
|
*
|
|
9
|
-
* Feature components (RebaseAuth,
|
|
9
|
+
* Feature components (RebaseAuth, RebaseCMS, RebaseStudio) only consume
|
|
10
10
|
* the dispatch context, so registering does NOT cause them to re-render.
|
|
11
11
|
* RebaseShell consumes state context to read the collected configs.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
interface RegistryDispatch {
|
|
15
|
-
registerAdmin: (config:
|
|
15
|
+
registerAdmin: (config: RebaseCMSConfig) => void;
|
|
16
16
|
unregisterAdmin: () => void;
|
|
17
17
|
registerStudio: (config: RebaseStudioConfig) => void;
|
|
18
18
|
unregisterStudio: () => void;
|
|
@@ -21,7 +21,7 @@ interface RegistryDispatch {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
interface RegistryState {
|
|
24
|
-
cmsConfig:
|
|
24
|
+
cmsConfig: RebaseCMSConfig | null;
|
|
25
25
|
studioConfig: RebaseStudioConfig | null;
|
|
26
26
|
authConfig: RebaseAuthViewConfig | null;
|
|
27
27
|
}
|
|
@@ -34,13 +34,13 @@ const RegistryStateContext = createContext<RegistryState>({
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
export function RebaseRegistryProvider({ children }: { children: React.ReactNode }) {
|
|
37
|
-
const [cmsConfig, setCmsConfig] = useState<
|
|
37
|
+
const [cmsConfig, setCmsConfig] = useState<RebaseCMSConfig | null>(null);
|
|
38
38
|
const [studioConfig, setStudioConfig] = useState<RebaseStudioConfig | null>(null);
|
|
39
39
|
const [authConfig, setAuthConfig] = useState<RebaseAuthViewConfig | null>(null);
|
|
40
40
|
|
|
41
41
|
// Dispatch functions are stable — never change identity
|
|
42
42
|
const dispatch = useMemo<RegistryDispatch>(() => ({
|
|
43
|
-
registerAdmin: (config:
|
|
43
|
+
registerAdmin: (config: RebaseCMSConfig) => setCmsConfig(config),
|
|
44
44
|
unregisterAdmin: () => setCmsConfig(null),
|
|
45
45
|
registerStudio: (config: RebaseStudioConfig) => setStudioConfig(config),
|
|
46
46
|
unregisterStudio: () => setStudioConfig(null),
|
|
@@ -79,7 +79,7 @@ export function useRebaseRegistry(): RebaseRegistryController {
|
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* Returns only the stable dispatch functions.
|
|
82
|
-
* Use this in feature components (RebaseAuth,
|
|
82
|
+
* Use this in feature components (RebaseAuth, RebaseCMS, RebaseStudio)
|
|
83
83
|
* to avoid re-render loops.
|
|
84
84
|
*/
|
|
85
85
|
export function useRebaseRegistryDispatch(): RegistryDispatch {
|
package/src/hooks/useSlot.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SnackbarAction, SnackbarMessageType } from "@rebasepro/
|
|
1
|
+
import type { SnackbarAction, SnackbarMessageType } from "@rebasepro/cms-types";
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { useSnackbar } from "notistack";
|
|
4
4
|
import { Button } from "@rebasepro/ui";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UserConfigurationPersistence } from "@rebasepro/
|
|
1
|
+
import { UserConfigurationPersistence } from "@rebasepro/cms-types";
|
|
2
2
|
import { useContext } from "react";
|
|
3
3
|
import { UserConfigurationPersistenceContext } from "../contexts/UserConfigurationPersistenceContext";
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ import { fr } from "../locales/fr";
|
|
|
8
8
|
import { it } from "../locales/it";
|
|
9
9
|
import { hi } from "../locales/hi";
|
|
10
10
|
import { pt } from "../locales/pt";
|
|
11
|
-
import { RebaseTranslations } from "@rebasepro/
|
|
11
|
+
import { RebaseTranslations } from "@rebasepro/cms-types";
|
|
12
12
|
import { readStoredString, writeStoredString } from "../util/local_storage";
|
|
13
13
|
|
|
14
14
|
const REBASE_NS = "rebase_core";
|
package/src/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ export * from "./util";
|
|
|
6
6
|
export * from "./contexts";
|
|
7
7
|
|
|
8
8
|
// @internal — framework implementation details, exported only because
|
|
9
|
-
// @rebasepro/
|
|
9
|
+
// @rebasepro/cms and @rebasepro/studio consume them. Named explicitly
|
|
10
10
|
// (not `export *`) so this file is the single place that grows or shrinks
|
|
11
11
|
// the internal surface — see the JSDoc on each symbol for details.
|
|
12
12
|
export { CONTAINER_FULL_WIDTH, FORM_CONTAINER_WIDTH, SIDE_PANEL_DEFAULT_WIDTH } from "./internal/common";
|
package/src/internal/common.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* dialog sizing logic.
|
|
4
4
|
*
|
|
5
5
|
* @internal Not part of the stable public API — exported only because
|
|
6
|
-
* `@rebasepro/
|
|
6
|
+
* `@rebasepro/cms` and `@rebasepro/studio` need them to compute the same
|
|
7
7
|
* dialog widths as the framework. Do not depend on these for app code; they
|
|
8
8
|
* may change shape or be removed without a major version bump.
|
|
9
9
|
*/
|
|
@@ -8,7 +8,7 @@ const scrollsMap: Record<string, number> = {};
|
|
|
8
8
|
* router location. Used by the framework's own home page implementations.
|
|
9
9
|
*
|
|
10
10
|
* @internal Not part of the stable public API — exported only because
|
|
11
|
-
* `@rebasepro/
|
|
11
|
+
* `@rebasepro/cms` and `@rebasepro/studio` reuse it in their home page
|
|
12
12
|
* components. Its behavior (module-level scroll cache, router coupling) is
|
|
13
13
|
* an implementation detail and may change without a major version bump.
|
|
14
14
|
*/
|
package/src/locales/de.ts
CHANGED
package/src/locales/en.ts
CHANGED
package/src/locales/es.ts
CHANGED
package/src/locales/fr.ts
CHANGED
package/src/locales/hi.ts
CHANGED
package/src/locales/it.ts
CHANGED
package/src/locales/pt.ts
CHANGED
package/src/util/previews.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Property } from "@rebasepro/types";
|
|
2
|
-
import type { PropertyConfig, AdminCollection } from "@rebasepro/
|
|
3
|
-
import { AuthController } from "@rebasepro/
|
|
2
|
+
import type { PropertyConfig, AdminCollection } from "@rebasepro/cms-types";
|
|
3
|
+
import { AuthController } from "@rebasepro/cms-types";
|
|
4
4
|
import { isPropertyBuilder } from "@rebasepro/common";
|
|
5
5
|
import { getTitlePropertyKey } from "@rebasepro/app";
|
|
6
6
|
import { SUMMARY_RANK, isStorageProperty, rankSummaryProperty } from "../collections/summary-property";
|