@rebasepro/app 0.16.0 → 0.16.1-canary.g0d7af95

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 (50) hide show
  1. package/dist/auth/api.d.ts +8 -21
  2. package/dist/auth/index.d.ts +4 -4
  3. package/dist/auth/types.d.ts +1 -1
  4. package/dist/auth/useRebaseAuthController.d.ts +1 -1
  5. package/dist/collections/index.d.ts +13 -13
  6. package/dist/collections/title-property.d.ts +1 -1
  7. package/dist/components/Debug/collection-views/index.d.ts +3 -3
  8. package/dist/components/LoginView/LoginView.d.ts +2 -2
  9. package/dist/components/LoginView/index.d.ts +2 -2
  10. package/dist/components/common/index.d.ts +6 -6
  11. package/dist/components/common/useDataTableController.d.ts +1 -1
  12. package/dist/components/index.d.ts +18 -18
  13. package/dist/contexts/AdminModeController.d.ts +1 -1
  14. package/dist/contexts/ModeController.d.ts +1 -1
  15. package/dist/contexts/index.d.ts +18 -18
  16. package/dist/core/Rebase.d.ts +1 -1
  17. package/dist/core/index.d.ts +4 -4
  18. package/dist/hooks/index.d.ts +36 -36
  19. package/dist/hooks/useBridgeRegistration.d.ts +1 -1
  20. package/dist/hooks/useBuildAdminModeController.d.ts +1 -1
  21. package/dist/hooks/useBuildModeController.d.ts +1 -1
  22. package/dist/hooks/useUnsavedChangesDialog.d.ts +1 -1
  23. package/dist/index.d.ts +19 -19
  24. package/dist/index.es.js +129 -79
  25. package/dist/index.es.js.map +1 -1
  26. package/dist/util/index.d.ts +9 -8
  27. package/dist/util/local_storage.d.ts +31 -0
  28. package/package.json +9 -9
  29. package/src/auth/api.ts +8 -21
  30. package/src/auth/useRebaseAuthController.ts +6 -3
  31. package/src/collections/entity-display.ts +6 -34
  32. package/src/collections/form-layout.ts +2 -1
  33. package/src/collections/title-property.ts +1 -1
  34. package/src/components/Debug/UIReferenceView.tsx +53 -16
  35. package/src/components/LoginView/LoginView.tsx +3 -3
  36. package/src/components/common/useDataTableController.tsx +20 -1
  37. package/src/core/Rebase.tsx +3 -24
  38. package/src/hooks/useBuildAdminModeController.tsx +3 -4
  39. package/src/hooks/useBuildEffectiveRoleController.tsx +6 -7
  40. package/src/hooks/useBuildModeController.tsx +8 -6
  41. package/src/i18n/RebaseI18nProvider.tsx +5 -6
  42. package/src/locales/de.ts +0 -1
  43. package/src/locales/en.ts +0 -1
  44. package/src/locales/es.ts +0 -1
  45. package/src/locales/fr.ts +0 -1
  46. package/src/locales/hi.ts +0 -1
  47. package/src/locales/it.ts +0 -1
  48. package/src/locales/pt.ts +0 -1
  49. package/src/util/index.ts +1 -0
  50. package/src/util/local_storage.ts +66 -0
@@ -8,29 +8,16 @@
8
8
  * here is the unauthenticated `/api/auth/config` probe used to detect
9
9
  * bootstrap mode and enabled providers before a session exists.
10
10
  */
11
+ import type { AuthAdapterCapabilities } from "@rebasepro/types";
11
12
  /**
12
- * Auth config response from the backend
13
+ * What `GET /api/auth/config` answers.
14
+ *
15
+ * The wire contract is declared once, in `@rebasepro/types`, and re-exported
16
+ * here under the name this module uses. Three near-copies of it used to exist —
17
+ * this one listed an `emailServiceEnabled` flag no backend sends, and marked as
18
+ * optional fields every backend always returns.
13
19
  */
14
- export interface AuthConfigResponse {
15
- /** True when there are no users in the system and first user setup is needed */
16
- needsSetup: boolean;
17
- /** Whether new user registration is enabled */
18
- registrationEnabled: boolean;
19
- /** Whether email service is configured */
20
- emailServiceEnabled?: boolean;
21
- /** Whether the self-service password reset flow (email link) is supported */
22
- passwordReset?: boolean;
23
- /**
24
- * Whether an admin can reset another user's password, i.e. the adapter
25
- * mounts `POST /admin/users/:userId/reset-password`. Absent on backends
26
- * predating this field, which the frontend treats as supported.
27
- */
28
- adminPasswordReset?: boolean;
29
- /** Whether email verification is supported */
30
- emailVerification?: boolean;
31
- /** Complete list of enabled OAuth provider IDs (e.g. ["google", "github", "discord"]) */
32
- enabledProviders: string[];
33
- }
20
+ export type AuthConfigResponse = AuthAdapterCapabilities;
34
21
  /**
35
22
  * Cache container for `fetchAuthConfig` — holds both the inflight promise
36
23
  * (to deduplicate concurrent calls) and the cached result.
@@ -8,7 +8,7 @@
8
8
  * controller are in `../components`. Both are re-exported from the package
9
9
  * root, which is where applications should import them from.
10
10
  */
11
- export type { RebaseAuthController, RebaseAuthControllerProps, User, AuthTokens, DeviceSession, AuthResponse, RefreshResponse } from "./types";
12
- export { useRebaseAuthController } from "./useRebaseAuthController";
13
- export { fetchAuthConfig, clearAuthConfigCache, createAuthConfigCache } from "./api";
14
- export type { AuthConfigResponse, AuthConfigCache } from "./api";
11
+ export type { RebaseAuthController, RebaseAuthControllerProps, User, AuthTokens, DeviceSession, AuthResponse, RefreshResponse } from "./types.js";
12
+ export { useRebaseAuthController } from "./useRebaseAuthController.js";
13
+ export { fetchAuthConfig, clearAuthConfigCache, createAuthConfigCache } from "./api.js";
14
+ export type { AuthConfigResponse, AuthConfigCache } from "./api.js";
@@ -1,6 +1,6 @@
1
1
  import { User, AuthTokens, DeviceSession, RebaseSession, AuthChangeEvent } from "@rebasepro/types";
2
2
  import { AuthController } from "@rebasepro/admin-types";
3
- import type { AuthConfigResponse } from "./api";
3
+ import type { AuthConfigResponse } from "./api.js";
4
4
  export type { User, AuthTokens, DeviceSession };
5
5
  /**
6
6
  * Auth controller that extends the base AuthController
@@ -1,4 +1,4 @@
1
- import { RebaseAuthController, RebaseAuthControllerProps } from "./types";
1
+ import { RebaseAuthController, RebaseAuthControllerProps } from "./types.js";
2
2
  /**
3
3
  * Auth controller hook for JWT-based authentication.
4
4
  *
@@ -1,13 +1,13 @@
1
- export * from "./collection_view_config";
2
- export * from "./entity_image_preview";
3
- export * from "./entity-display";
4
- export * from "./entity-display-cache";
5
- export * from "./filter-operator-resolution";
6
- export * from "./form-layout";
7
- export * from "./navigation_from_path";
8
- export * from "./navigation_utils";
9
- export * from "./parent_references_from_path";
10
- export * from "./property-path";
11
- export * from "./property_presentation";
12
- export * from "./summary-property";
13
- export * from "./title-property";
1
+ export * from "./collection_view_config.js";
2
+ export * from "./entity_image_preview.js";
3
+ export * from "./entity-display.js";
4
+ export * from "./entity-display-cache.js";
5
+ export * from "./filter-operator-resolution.js";
6
+ export * from "./form-layout.js";
7
+ export * from "./navigation_from_path.js";
8
+ export * from "./navigation_utils.js";
9
+ export * from "./parent_references_from_path.js";
10
+ export * from "./property-path.js";
11
+ export * from "./property_presentation.js";
12
+ export * from "./summary-property.js";
13
+ export * from "./title-property.js";
@@ -31,7 +31,7 @@ export declare function getTitlePropertyCandidates<M extends Record<string, unkn
31
31
  *
32
32
  * Returns `undefined` when that first property is anything but a
33
33
  * single-cardinality relation, or when the collection states its own
34
- * `titleProperty`.
34
+ * `display.title`.
35
35
  *
36
36
  * @group Collections
37
37
  */
@@ -1,3 +1,3 @@
1
- export { CollectionTableDemo } from "./CollectionTableDemo";
2
- export { CardViewDemo } from "./CardViewDemo";
3
- export { KanbanBoardDemo } from "./KanbanBoardDemo";
1
+ export { CollectionTableDemo } from "./CollectionTableDemo.js";
2
+ export { CardViewDemo } from "./CardViewDemo.js";
3
+ export { KanbanBoardDemo } from "./KanbanBoardDemo.js";
@@ -46,7 +46,7 @@ export interface LoginViewProps {
46
46
  disabled?: boolean;
47
47
  /**
48
48
  * Prevent users from creating new accounts.
49
- * If not set, checks `authController.capabilities.registration`.
49
+ * If not set, checks `authController.capabilities.registrationEnabled`.
50
50
  */
51
51
  disableSignupScreen?: boolean;
52
52
  /**
@@ -93,7 +93,7 @@ export interface LoginViewProps {
93
93
  needsSetup?: boolean;
94
94
  /**
95
95
  * Whether registration is enabled.
96
- * If not set, derived from `authController.capabilities.registration`.
96
+ * If not set, derived from `authController.capabilities.registrationEnabled`.
97
97
  */
98
98
  registrationEnabled?: boolean;
99
99
  /**
@@ -1,2 +1,2 @@
1
- export { LoginView } from "./LoginView";
2
- export type { LoginViewProps } from "./LoginView";
1
+ export { LoginView } from "./LoginView.js";
2
+ export type { LoginViewProps } from "./LoginView.js";
@@ -1,6 +1,6 @@
1
- export * from "./types";
2
- export * from "./useDebouncedData";
3
- export * from "./useColumnsIds";
4
- export * from "./useDataTableController";
5
- export * from "./useScrollRestoration";
6
- export * from "./table_height";
1
+ export * from "./types.js";
2
+ export * from "./useDebouncedData.js";
3
+ export * from "./useColumnsIds.js";
4
+ export * from "./useDataTableController.js";
5
+ export * from "./useScrollRestoration.js";
6
+ export * from "./table_height.js";
@@ -1,6 +1,6 @@
1
1
  import { Entity, FilterValues, User } from "@rebasepro/types";
2
2
  import { EntityTableController, AdminCollection } from "@rebasepro/admin-types";
3
- import { ScrollRestorationController } from "./useScrollRestoration";
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> = {
6
6
  /**
@@ -1,18 +1,18 @@
1
- export type { ErrorViewProps } from "./ErrorView";
2
- export { ErrorView } from "./ErrorView";
3
- export * from "./common";
4
- export * from "./NotFoundPage";
5
- export * from "./ConfirmationDialog";
6
- export * from "./ErrorTooltip";
7
- export * from "./RebaseLogo";
8
- export * from "./AIIcon";
9
- export * from "./Debug/UIStyleGuide";
10
- export * from "./Debug/UIReferenceView";
11
- export { CrmDashboardDemo } from "./Debug/crm-dashboard/CrmDashboardDemo";
12
- export * from "./UserSettingsView";
13
- export * from "./LanguageToggle";
14
- export * from "./UserSelectPopover";
15
- export * from "./UserDisplay";
16
- export * from "./LoginView";
17
- export * from "./RebaseAuth";
18
- export * from "./SchemaDriftBanner";
1
+ export type { ErrorViewProps } from "./ErrorView.js";
2
+ export { ErrorView } from "./ErrorView.js";
3
+ export * from "./common/index.js";
4
+ export * from "./NotFoundPage.js";
5
+ export * from "./ConfirmationDialog.js";
6
+ export * from "./ErrorTooltip.js";
7
+ export * from "./RebaseLogo.js";
8
+ export * from "./AIIcon.js";
9
+ export * from "./Debug/UIStyleGuide.js";
10
+ export * from "./Debug/UIReferenceView.js";
11
+ export { CrmDashboardDemo } from "./Debug/crm-dashboard/CrmDashboardDemo.js";
12
+ export * from "./UserSettingsView.js";
13
+ export * from "./LanguageToggle.js";
14
+ export * from "./UserSelectPopover.js";
15
+ export * from "./UserDisplay.js";
16
+ export * from "./LoginView/index.js";
17
+ export * from "./RebaseAuth.js";
18
+ export * from "./SchemaDriftBanner.js";
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import type { AdminModeController } from "../hooks/useAdminModeController";
2
+ import type { AdminModeController } from "../hooks/useAdminModeController.js";
3
3
  export declare const AdminModeControllerContext: React.Context<AdminModeController>;
4
4
  export declare const AdminModeControllerProvider: React.Provider<AdminModeController>;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import type { ModeController } from "../hooks/useModeController";
2
+ import type { ModeController } from "../hooks/useModeController.js";
3
3
  export declare const ModeControllerContext: React.Context<ModeController>;
4
4
  export declare const ModeControllerProvider: React.Provider<ModeController>;
@@ -1,18 +1,18 @@
1
- export * from "./SnackbarProvider";
2
- export * from "./ModeController";
3
- export * from "./AdminModeController";
4
- export * from "./EffectiveRoleController";
5
- export * from "./AuthControllerContext";
6
- export * from "./DataDriverContext";
7
- export * from "./DataSourcesContext";
8
- export * from "./RebaseDataContext";
9
- export * from "./AnalyticsContext";
10
- export * from "./StorageSourceContext";
11
- export * from "./StorageSourcesContext";
12
- export * from "./UserConfigurationPersistenceContext";
13
- export * from "./DialogsProvider";
14
- export * from "./RebaseClientInstanceContext";
15
- export * from "./CustomizationControllerContext";
16
- export * from "./ComponentOverrideContext";
17
- export * from "./CollectionScopeContext";
18
- export * from "./CollectionResolverContext";
1
+ export * from "./SnackbarProvider.js";
2
+ export * from "./ModeController.js";
3
+ export * from "./AdminModeController.js";
4
+ export * from "./EffectiveRoleController.js";
5
+ export * from "./AuthControllerContext.js";
6
+ export * from "./DataDriverContext.js";
7
+ export * from "./DataSourcesContext.js";
8
+ export * from "./RebaseDataContext.js";
9
+ export * from "./AnalyticsContext.js";
10
+ export * from "./StorageSourceContext.js";
11
+ export * from "./StorageSourcesContext.js";
12
+ export * from "./UserConfigurationPersistenceContext.js";
13
+ export * from "./DialogsProvider.js";
14
+ export * from "./RebaseClientInstanceContext.js";
15
+ export * from "./CustomizationControllerContext.js";
16
+ export * from "./ComponentOverrideContext.js";
17
+ export * from "./CollectionScopeContext.js";
18
+ export * from "./CollectionResolverContext.js";
@@ -1,4 +1,4 @@
1
- import type { RebaseProps } from "./RebaseProps";
1
+ import type { RebaseProps } from "./RebaseProps.js";
2
2
  import React from "react";
3
3
  import { User } from "@rebasepro/types";
4
4
  /**
@@ -1,4 +1,4 @@
1
- export * from "./Rebase";
2
- export * from "./PluginProviderStack";
3
- export * from "./RebaseRouter";
4
- export * from "./RebaseRoutes";
1
+ export * from "./Rebase.js";
2
+ export * from "./PluginProviderStack.js";
3
+ export * from "./RebaseRouter.js";
4
+ export * from "./RebaseRoutes.js";
@@ -1,36 +1,36 @@
1
- export * from "./data/useData";
2
- export * from "./data/useCollection";
3
- export * from "./data/useFetch";
4
- export * from "./data/useRelationSelector";
5
- export * from "./data/save";
6
- export * from "./data/delete";
7
- export * from "./useUnsavedChangesDialog";
8
- export * from "./useStorageSource";
9
- export * from "./useAuthController";
10
- export * from "./useAuthSubscription";
11
- export * from "./useDialogsController";
12
- export * from "./useAdminModeController";
13
- export * from "./useBuildAdminModeController";
14
- export * from "./useEffectiveRoleController";
15
- export * from "./useBuildEffectiveRoleController";
16
- export * from "./useRebaseContext";
17
- export * from "./useSnackbarController";
18
- export * from "./useModeController";
19
- export * from "./useClipboard";
20
- export * from "./useLargeLayout";
21
- export * from "./useCollapsedGroups";
22
- export * from "./useBrowserTitleAndIcon";
23
- export * from "./useSlot";
24
- export * from "./useCustomizationController";
25
- export * from "./useBuildLocalConfigurationPersistence";
26
- export * from "./useBuildModeController";
27
- export * from "./useRebaseRegistry";
28
- export * from "./useBackendStorageSource";
29
- export * from "./usePermissions";
30
- export * from "./ApiConfigContext";
31
- export * from "./useTranslation";
32
- export * from "./useRebaseClient";
33
- export * from "./useAnalyticsController";
34
- export * from "./useUserConfigurationPersistence";
35
- export * from "./useResolvedComponent";
36
- export * from "./useComponentOverride";
1
+ export * from "./data/useData.js";
2
+ export * from "./data/useCollection.js";
3
+ export * from "./data/useFetch.js";
4
+ export * from "./data/useRelationSelector.js";
5
+ export * from "./data/save.js";
6
+ export * from "./data/delete.js";
7
+ export * from "./useUnsavedChangesDialog.js";
8
+ export * from "./useStorageSource.js";
9
+ export * from "./useAuthController.js";
10
+ export * from "./useAuthSubscription.js";
11
+ export * from "./useDialogsController.js";
12
+ export * from "./useAdminModeController.js";
13
+ export * from "./useBuildAdminModeController.js";
14
+ export * from "./useEffectiveRoleController.js";
15
+ export * from "./useBuildEffectiveRoleController.js";
16
+ export * from "./useRebaseContext.js";
17
+ export * from "./useSnackbarController.js";
18
+ export * from "./useModeController.js";
19
+ export * from "./useClipboard.js";
20
+ export * from "./useLargeLayout.js";
21
+ export * from "./useCollapsedGroups.js";
22
+ export * from "./useBrowserTitleAndIcon.js";
23
+ export * from "./useSlot.js";
24
+ export * from "./useCustomizationController.js";
25
+ export * from "./useBuildLocalConfigurationPersistence.js";
26
+ export * from "./useBuildModeController.js";
27
+ export * from "./useRebaseRegistry.js";
28
+ export * from "./useBackendStorageSource.js";
29
+ export * from "./usePermissions.js";
30
+ export * from "./ApiConfigContext.js";
31
+ export * from "./useTranslation.js";
32
+ export * from "./useRebaseClient.js";
33
+ export * from "./useAnalyticsController.js";
34
+ export * from "./useUserConfigurationPersistence.js";
35
+ export * from "./useResolvedComponent.js";
36
+ export * from "./useComponentOverride.js";
@@ -1,4 +1,4 @@
1
- import type { StudioBridge } from "./useStudioBridge";
1
+ import type { StudioBridge } from "./useStudioBridge.js";
2
2
  /**
3
3
  * Registers a value into the self-assembling Studio bridge.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { AdminModeController } from "./useAdminModeController";
1
+ import type { AdminModeController } from "./useAdminModeController.js";
2
2
  /**
3
3
  * Use this hook to build an admin mode controller that determines
4
4
  * whether the UI shows Developer or Editor tools.
@@ -1,4 +1,4 @@
1
- import type { ModeController } from "./useModeController";
1
+ import type { ModeController } from "./useModeController.js";
2
2
  /**
3
3
  * Use this hook to build a color mode controller that determines
4
4
  * the theme of the admin
@@ -1,4 +1,4 @@
1
- import { UnsavedChangesDialogProps } from "../components/UnsavedChangesDialog";
1
+ import { UnsavedChangesDialogProps } from "../components/UnsavedChangesDialog.js";
2
2
  /**
3
3
  * A single, unified hook to prevent navigation when there are unsaved changes.
4
4
  *
package/dist/index.d.ts CHANGED
@@ -1,19 +1,19 @@
1
- export * from "./core";
2
- export * from "./hooks";
3
- export * from "./auth";
4
- export * from "./components";
5
- export * from "./util";
6
- export * from "./contexts";
7
- export { CONTAINER_FULL_WIDTH, FORM_CONTAINER_WIDTH, SIDE_PANEL_DEFAULT_WIDTH } from "./internal/common";
8
- export { useRestoreScroll } from "./internal/useRestoreScroll";
9
- export { useUnsavedChangesDialog } from "./hooks/useUnsavedChangesDialog";
10
- export { NavigationBlockerProvider, useNavigationBlocker } from "./hooks/useNavigationBlocker";
11
- export type { UnsavedChangesDialogProps } from "./components/UnsavedChangesDialog";
12
- export type { RebaseStorageSource } from "./core/RebaseProps";
13
- export { UnsavedChangesDialog } from "./components/UnsavedChangesDialog";
14
- export * from "./i18n/RebaseI18nProvider";
15
- export * from "./locales/en";
16
- export * from "./locales/es";
17
- export * from "./hooks/useStudioBridge";
18
- export { useBridgeRegistration } from "./hooks/useBridgeRegistration";
19
- export * from "./collections";
1
+ export * from "./core/index.js";
2
+ export * from "./hooks/index.js";
3
+ export * from "./auth/index.js";
4
+ export * from "./components/index.js";
5
+ export * from "./util/index.js";
6
+ export * from "./contexts/index.js";
7
+ export { CONTAINER_FULL_WIDTH, FORM_CONTAINER_WIDTH, SIDE_PANEL_DEFAULT_WIDTH } from "./internal/common.js";
8
+ export { useRestoreScroll } from "./internal/useRestoreScroll.js";
9
+ export { useUnsavedChangesDialog } from "./hooks/useUnsavedChangesDialog.js";
10
+ export { NavigationBlockerProvider, useNavigationBlocker } from "./hooks/useNavigationBlocker.js";
11
+ export type { UnsavedChangesDialogProps } from "./components/UnsavedChangesDialog.js";
12
+ export type { RebaseStorageSource } from "./core/RebaseProps.js";
13
+ export { UnsavedChangesDialog } from "./components/UnsavedChangesDialog.js";
14
+ export * from "./i18n/RebaseI18nProvider.js";
15
+ export * from "./locales/en.js";
16
+ export * from "./locales/es.js";
17
+ export * from "./hooks/useStudioBridge.js";
18
+ export { useBridgeRegistration } from "./hooks/useBridgeRegistration.js";
19
+ export * from "./collections/index.js";