@vuu-ui/vuu-shell 3.4.1 → 3.5.0-beta.1

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 (64) hide show
  1. package/package.json +13 -13
  2. package/types/module-registry/getRegisteredModules.d.ts +0 -5
  3. package/types/persistence-manager/LocalWorkspacePersistenceService.d.ts +0 -18
  4. package/types/persistence-manager/RemoteWorkspacePersistenceService.d.ts +0 -25
  5. package/types/persistence-manager/WorkspacePersistenceService.d.ts +0 -27
  6. package/types/shell-layout-templates/context-panel/ApplicationSettingsContextPanel.d.ts +0 -1
  7. package/types/src/ShellContextProvider.d.ts +0 -7
  8. package/types/src/app-header/AppHeader.d.ts +0 -6
  9. package/types/src/app-header/index.d.ts +0 -1
  10. package/types/src/application-provider/ApplicationContext.d.ts +0 -11
  11. package/types/src/application-provider/ApplicationProvider.d.ts +0 -17
  12. package/types/src/application-provider/index.d.ts +0 -1
  13. package/types/src/feature/Feature.d.ts +0 -10
  14. package/types/src/feature/FeatureErrorBoundary.d.ts +0 -13
  15. package/types/src/feature/Loader.d.ts +0 -1
  16. package/types/src/feature/index.d.ts +0 -1
  17. package/types/src/feature-and-layout-provider/FeatureAndLayoutProvider.d.ts +0 -19
  18. package/types/src/feature-and-layout-provider/index.d.ts +0 -1
  19. package/types/src/feature-list/FeatureList.d.ts +0 -7
  20. package/types/src/feature-list/index.d.ts +0 -1
  21. package/types/src/get-layout-history.d.ts +0 -8
  22. package/types/src/index.d.ts +0 -14
  23. package/types/src/left-nav/LeftNav.d.ts +0 -14
  24. package/types/src/left-nav/index.d.ts +0 -1
  25. package/types/src/login/LoginPanel.d.ts +0 -6
  26. package/types/src/login/VuuLogo.d.ts +0 -1
  27. package/types/src/persistence-manager/LocalPersistenceManager.d.ts +0 -20
  28. package/types/src/persistence-manager/PersistenceManager.d.ts +0 -71
  29. package/types/src/persistence-manager/PersistenceProvider.d.ts +0 -11
  30. package/types/src/persistence-manager/RemotePersistenceManager.d.ts +0 -25
  31. package/types/src/persistence-manager/StaticPersistenceManager.d.ts +0 -25
  32. package/types/src/persistence-manager/index.d.ts +0 -5
  33. package/types/src/shell-layout-templates/context-panel/ContextPanel.d.ts +0 -13
  34. package/types/src/shell-layout-templates/context-panel/index.d.ts +0 -1
  35. package/types/src/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.d.ts +0 -2
  36. package/types/src/shell-layout-templates/index.d.ts +0 -3
  37. package/types/src/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.d.ts +0 -2
  38. package/types/src/shell-layout-templates/left-main-tabs/useLeftMainTabs.d.ts +0 -2
  39. package/types/src/shell-layout-templates/side-panel/SidePanel.d.ts +0 -8
  40. package/types/src/shell-layout-templates/side-panel/index.d.ts +0 -1
  41. package/types/src/shell-layout-templates/simple-content-pane/useSimpleContentPane.d.ts +0 -2
  42. package/types/src/shell-layout-templates/useShellLayout.d.ts +0 -51
  43. package/types/src/shell.d.ts +0 -17
  44. package/types/src/theme-switch/ThemeSwitch.d.ts +0 -8
  45. package/types/src/theme-switch/index.d.ts +0 -1
  46. package/types/src/user-settings/SettingsForm.d.ts +0 -46
  47. package/types/src/user-settings/UserSettingsPanel.d.ts +0 -3
  48. package/types/src/user-settings/index.d.ts +0 -2
  49. package/types/src/workspace-management/LayoutList.d.ts +0 -2
  50. package/types/src/workspace-management/LayoutTile.d.ts +0 -7
  51. package/types/src/workspace-management/SaveLayoutPanel.d.ts +0 -9
  52. package/types/src/workspace-management/WorkspaceProvider.d.ts +0 -52
  53. package/types/src/workspace-management/defaultWorkspaceJSON.d.ts +0 -10
  54. package/types/src/workspace-management/index.d.ts +0 -5
  55. package/types/src/workspace-management/screenshot-utils.d.ts +0 -6
  56. package/types/src/workspace-management/useWorkspaceContextMenuItems.d.ts +0 -5
  57. package/types/workspace-management/WorkspaceController.d.ts +0 -32
  58. package/types/workspace-management/WorkspaceHost.d.ts +0 -1
  59. package/types/workspace-management/WorkspacePersistentState.d.ts +0 -19
  60. package/types/workspace-management/WorkspaceRepository.d.ts +0 -13
  61. package/types/workspace-management/WorkspaceStartPanel.d.ts +0 -1
  62. package/types/workspace-management/shell-workspace-components.d.ts +0 -2
  63. package/types/workspace-management/workspace-component-registry.d.ts +0 -12
  64. package/types/workspace-management/workspace-schemas.d.ts +0 -69
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.4.1",
2
+ "version": "3.5.0-beta.1",
3
3
  "description": "VUU UI Shell",
4
4
  "main": "./src/index.js",
5
5
  "author": "heswell",
@@ -10,23 +10,23 @@
10
10
  "type-defs": "node ../../scripts/build-type-defs.mjs"
11
11
  },
12
12
  "devDependencies": {
13
- "@vuu-ui/vuu-data-types": "3.4.1",
14
- "@vuu-ui/vuu-protocol-types": "3.4.1",
15
- "@vuu-ui/vuu-table-types": "3.4.1"
13
+ "@vuu-ui/vuu-data-types": "3.5.0-beta.1",
14
+ "@vuu-ui/vuu-protocol-types": "3.5.0-beta.1",
15
+ "@vuu-ui/vuu-table-types": "3.5.0-beta.1"
16
16
  },
17
17
  "dependencies": {
18
18
  "@salt-ds/core": "1.54.1",
19
19
  "@salt-ds/styles": "0.2.1",
20
20
  "@salt-ds/window": "0.1.1",
21
- "@vuu-ui/vuu-context-menu": "3.4.1",
22
- "@vuu-ui/vuu-data-react": "3.4.1",
23
- "@vuu-ui/vuu-data-remote": "3.4.1",
24
- "@vuu-ui/vuu-icons": "3.4.1",
25
- "@vuu-ui/vuu-layout": "3.4.1",
26
- "@vuu-ui/vuu-notifications": "3.4.1",
27
- "@vuu-ui/vuu-table": "3.4.1",
28
- "@vuu-ui/vuu-ui-controls": "3.4.1",
29
- "@vuu-ui/vuu-utils": "3.4.1",
21
+ "@vuu-ui/vuu-context-menu": "3.5.0-beta.1",
22
+ "@vuu-ui/vuu-data-react": "3.5.0-beta.1",
23
+ "@vuu-ui/vuu-data-remote": "3.5.0-beta.1",
24
+ "@vuu-ui/vuu-icons": "3.5.0-beta.1",
25
+ "@vuu-ui/vuu-layout": "3.5.0-beta.1",
26
+ "@vuu-ui/vuu-notifications": "3.5.0-beta.1",
27
+ "@vuu-ui/vuu-table": "3.5.0-beta.1",
28
+ "@vuu-ui/vuu-ui-controls": "3.5.0-beta.1",
29
+ "@vuu-ui/vuu-utils": "3.5.0-beta.1",
30
30
  "html-to-image": "^1.11.11"
31
31
  },
32
32
  "peerDependencies": {
@@ -1,5 +0,0 @@
1
- import type { DynamicFeatureDescriptor } from "@vuu-ui/vuu-utils";
2
- export type RemoteModules = {
3
- modules: DynamicFeatureDescriptor[];
4
- };
5
- export declare const getRegisteredModules: (registryUrl: string, bearerToken: string) => Promise<RemoteModules>;
@@ -1,18 +0,0 @@
1
- import { type ApplicationSessionV1, type NamedWorkspaceDefinitionV1, type NamedWorkspaceMetadataV1, type WorkspaceSnapshotRecordV1 } from "../workspace-management/workspace-schemas";
2
- import type { UserPersistenceScope, WorkspacePersistenceService } from "./WorkspacePersistenceService";
3
- export declare class LocalWorkspacePersistenceService implements WorkspacePersistenceService {
4
- #private;
5
- readonly scope: UserPersistenceScope;
6
- constructor(scope: UserPersistenceScope, storage?: Storage);
7
- loadApplicationSession(): Promise<ApplicationSessionV1 | undefined>;
8
- saveApplicationSession(session: ApplicationSessionV1): Promise<void>;
9
- deleteApplicationSession(): Promise<void>;
10
- listWorkspaceSnapshots(): Promise<readonly WorkspaceSnapshotRecordV1[]>;
11
- loadWorkspaceSnapshot(workspaceInstanceId: string): Promise<WorkspaceSnapshotRecordV1 | undefined>;
12
- saveWorkspaceSnapshot(snapshot: WorkspaceSnapshotRecordV1): Promise<void>;
13
- deleteWorkspaceSnapshot(workspaceInstanceId: string): Promise<void>;
14
- listNamedWorkspaceMetadata(): Promise<readonly NamedWorkspaceMetadataV1[]>;
15
- loadNamedWorkspaceDefinition(id: string): Promise<NamedWorkspaceDefinitionV1 | undefined>;
16
- saveNamedWorkspaceDefinition(definition: NamedWorkspaceDefinitionV1): Promise<void>;
17
- deleteNamedWorkspaceDefinition(id: string): Promise<void>;
18
- }
@@ -1,25 +0,0 @@
1
- import { type ApplicationSessionV1, type NamedWorkspaceDefinitionV1, type NamedWorkspaceMetadataV1, type WorkspaceSnapshotRecordV1 } from "../workspace-management/workspace-schemas";
2
- import type { UserPersistenceScope, WorkspacePersistenceService } from "./WorkspacePersistenceService";
3
- export type WorkspaceRequestInitProvider = () => RequestInit | Promise<RequestInit>;
4
- export interface RemoteWorkspacePersistenceOptions {
5
- readonly baseUrl: string;
6
- readonly requestInit?: RequestInit;
7
- readonly requestInitProvider?: WorkspaceRequestInitProvider;
8
- readonly fetch?: typeof fetch;
9
- }
10
- export declare class RemoteWorkspacePersistenceService implements WorkspacePersistenceService {
11
- #private;
12
- readonly scope: UserPersistenceScope;
13
- constructor(scope: UserPersistenceScope, { baseUrl, requestInit, requestInitProvider, fetch: fetchImplementation, }: RemoteWorkspacePersistenceOptions);
14
- loadApplicationSession(): Promise<ApplicationSessionV1 | undefined>;
15
- saveApplicationSession(session: ApplicationSessionV1): Promise<void>;
16
- deleteApplicationSession(): Promise<void>;
17
- listWorkspaceSnapshots(): Promise<readonly WorkspaceSnapshotRecordV1[]>;
18
- loadWorkspaceSnapshot(workspaceInstanceId: string): Promise<WorkspaceSnapshotRecordV1 | undefined>;
19
- saveWorkspaceSnapshot(snapshot: WorkspaceSnapshotRecordV1): Promise<void>;
20
- deleteWorkspaceSnapshot(workspaceInstanceId: string): Promise<void>;
21
- listNamedWorkspaceMetadata(): Promise<readonly NamedWorkspaceMetadataV1[]>;
22
- loadNamedWorkspaceDefinition(id: string): Promise<NamedWorkspaceDefinitionV1 | undefined>;
23
- saveNamedWorkspaceDefinition(definition: NamedWorkspaceDefinitionV1): Promise<void>;
24
- deleteNamedWorkspaceDefinition(id: string): Promise<void>;
25
- }
@@ -1,27 +0,0 @@
1
- import type { ApplicationSessionV1, NamedWorkspaceDefinitionV1, NamedWorkspaceMetadataV1, WorkspaceSnapshotRecordV1 } from "../workspace-management/workspace-schemas";
2
- export interface PersistenceScope {
3
- readonly applicationNamespace: string;
4
- readonly applicationId: string;
5
- }
6
- export interface UserPersistenceScope extends PersistenceScope {
7
- readonly userId: string;
8
- }
9
- export interface WorkspacePersistenceService {
10
- readonly scope: UserPersistenceScope;
11
- loadApplicationSession(): Promise<ApplicationSessionV1 | undefined>;
12
- saveApplicationSession(session: ApplicationSessionV1): Promise<void>;
13
- deleteApplicationSession(): Promise<void>;
14
- listWorkspaceSnapshots(): Promise<readonly WorkspaceSnapshotRecordV1[]>;
15
- loadWorkspaceSnapshot(workspaceInstanceId: string): Promise<WorkspaceSnapshotRecordV1 | undefined>;
16
- saveWorkspaceSnapshot(snapshot: WorkspaceSnapshotRecordV1): Promise<void>;
17
- deleteWorkspaceSnapshot(workspaceInstanceId: string): Promise<void>;
18
- listNamedWorkspaceMetadata(): Promise<readonly NamedWorkspaceMetadataV1[]>;
19
- loadNamedWorkspaceDefinition(id: string): Promise<NamedWorkspaceDefinitionV1 | undefined>;
20
- saveNamedWorkspaceDefinition(definition: NamedWorkspaceDefinitionV1): Promise<void>;
21
- deleteNamedWorkspaceDefinition(id: string): Promise<void>;
22
- }
23
- export declare class WorkspacePersistenceError extends Error {
24
- readonly operation: string;
25
- readonly status?: number | undefined;
26
- constructor(message: string, operation: string, status?: number | undefined);
27
- }
@@ -1 +0,0 @@
1
- export declare const ApplicationSettingsContextPanel: () => import("react").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { ShellContextProps } from "@vuu-ui/vuu-utils";
2
- import { ReactElement, ReactNode } from "react";
3
- export interface ShellProviderProps {
4
- children: ReactNode;
5
- value?: ShellContextProps;
6
- }
7
- export declare const ShellContextProvider: ({ children, value, }: ShellProviderProps) => ReactElement;
@@ -1,6 +0,0 @@
1
- import type { ThemeMode } from "@vuu-ui/vuu-utils";
2
- import { HTMLAttributes } from "react";
3
- export interface AppHeaderProps extends HTMLAttributes<HTMLDivElement> {
4
- themeMode?: ThemeMode;
5
- }
6
- export declare const AppHeader: ({ className: classNameProp, themeMode: _, ...htmlAttributes }: AppHeaderProps) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './AppHeader';
@@ -1,11 +0,0 @@
1
- import type { Settings, VuuUser } from "@vuu-ui/vuu-utils";
2
- import { VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
3
- import { SettingsSchema } from "../user-settings";
4
- export interface ApplicationContextProps {
5
- onUserSettingChanged: (propertyName: string, value: VuuRowDataItemType) => void;
6
- logout?: () => void;
7
- userSettings?: Settings;
8
- userSettingsSchema?: SettingsSchema;
9
- user: VuuUser;
10
- }
11
- export declare const ApplicationContext: import("react").Context<ApplicationContextProps>;
@@ -1,17 +0,0 @@
1
- import { VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
2
- import { Density, ThemeContextProps } from "@salt-ds/core";
3
- import { ReactElement, ReactNode } from "react";
4
- import { ApplicationContextProps } from "./ApplicationContext";
5
- export interface ApplicationProviderProps extends Partial<Pick<ThemeContextProps, "theme" | "mode">>, Partial<Omit<ApplicationContextProps, "userSettings">> {
6
- children: ReactNode;
7
- density?: Density;
8
- }
9
- export declare const ApplicationProvider: ({ children, density: densityProp, logout, mode, theme, userSettingsSchema: userSettingsSchema, user, }: ApplicationProviderProps) => ReactElement | null;
10
- export declare const useApplicationUser: () => import("@vuu-ui/vuu-utils").VuuUser;
11
- export declare const useApplicationSettings: () => {
12
- onUserSettingChanged: (propertyName: string, value: VuuRowDataItemType) => void;
13
- userSettings: import("@vuu-ui/vuu-utils").Settings | undefined;
14
- userSettingsSchema: import("..").SettingsSchema | undefined;
15
- };
16
- export declare const useUserSetting: () => import("@vuu-ui/vuu-utils").Settings | undefined;
17
- export declare const useLogout: () => (() => void) | undefined;
@@ -1 +0,0 @@
1
- export * from "./ApplicationProvider";
@@ -1,10 +0,0 @@
1
- import { DynamicFeatureProps } from "@vuu-ui/vuu-utils";
2
- import React from "react";
3
- declare function RawFeature<Params extends object | undefined>({ url, css, ComponentProps: params, ...props }: DynamicFeatureProps<Params>): React.JSX.Element;
4
- /**
5
- Feature is a wrapper around React Lazy Loading. It will load a component
6
- from the given url. That url must resolve to a javascript bundle with a
7
- single default export. That export must be a React component.
8
- */
9
- export declare const Feature: React.MemoExoticComponent<typeof RawFeature>;
10
- export {};
@@ -1,13 +0,0 @@
1
- import { DynamicFeatureProps } from "@vuu-ui/vuu-utils";
2
- import React, { ErrorInfo, ReactNode } from "react";
3
- export interface FeatureErrorBoundaryProps extends DynamicFeatureProps {
4
- children: ReactNode;
5
- }
6
- export declare class FeatureErrorBoundary extends React.Component<FeatureErrorBoundaryProps, any> {
7
- constructor(props: FeatureErrorBoundaryProps);
8
- static getDerivedStateFromError(error: Error): {
9
- errorMessage: string;
10
- };
11
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
12
- render(): string | number | bigint | boolean | React.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined> | null | undefined;
13
- }
@@ -1 +0,0 @@
1
- export declare const Loader: () => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './Feature';
@@ -1,19 +0,0 @@
1
- import { DynamicFeatureDescriptor, DynamicFeatureProps, FilterTableFeatureProps, StaticFeatureDescriptor, SystemLayoutMetadata } from "@vuu-ui/vuu-utils";
2
- import { ReactElement, ReactNode } from "react";
3
- export interface FeatureContextProps {
4
- dynamicFeatures?: DynamicFeatureProps[];
5
- tableFeatures?: DynamicFeatureProps<FilterTableFeatureProps>[];
6
- staticFeatures?: StaticFeatureDescriptor[];
7
- }
8
- export interface LayoutContextProps {
9
- systemLayouts?: SystemLayoutMetadata[];
10
- }
11
- export interface FeatureAndLayoutProviderProps extends Partial<FeatureContextProps> {
12
- children: ReactNode;
13
- dynamicFeatures?: DynamicFeatureDescriptor[];
14
- staticFeatures?: StaticFeatureDescriptor[];
15
- systemLayouts?: SystemLayoutMetadata[];
16
- }
17
- export declare const FeatureAndLayoutProvider: ({ children, dynamicFeatures: dynamicFeaturesProp, staticFeatures, systemLayouts, }: FeatureAndLayoutProviderProps) => ReactElement;
18
- export declare const useFeatures: () => FeatureContextProps;
19
- export declare const useLayouts: () => LayoutContextProps;
@@ -1 +0,0 @@
1
- export * from "./FeatureAndLayoutProvider";
@@ -1,7 +0,0 @@
1
- import { DynamicFeatureProps, StaticFeatureDescriptor } from "@vuu-ui/vuu-utils";
2
- import { HTMLAttributes } from "react";
3
- export type GroupedFeatureProps<P extends object | undefined = object> = Record<string, DynamicFeatureProps<P>[]>;
4
- export interface FeatureListProps extends HTMLAttributes<HTMLDivElement> {
5
- features: DynamicFeatureProps[] | GroupedFeatureProps | StaticFeatureDescriptor[];
6
- }
7
- export declare const FeatureList: ({ features, title, ...htmlAttributes }: FeatureListProps) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- export * from "./FeatureList";
@@ -1,8 +0,0 @@
1
- import type { VuuUser } from "@vuu-ui/vuu-utils";
2
- export interface LayoutHistoryItem {
3
- user: string;
4
- id: string;
5
- uniqueId: string;
6
- lastUpdate: number;
7
- }
8
- export declare const getLayoutHistory: (user: VuuUser) => Promise<LayoutHistoryItem[]>;
@@ -1,14 +0,0 @@
1
- export * from "./application-provider";
2
- export * from "./app-header";
3
- export * from "./feature";
4
- export * from "./feature-and-layout-provider";
5
- export * from "./left-nav";
6
- export { LoginPanel, type LoginPanelProps } from "./login/LoginPanel";
7
- export * from "./persistence-manager";
8
- export * from "./shell";
9
- export * from "./shell-layout-templates";
10
- export * from "./ShellContextProvider";
11
- export * from "./feature-list";
12
- export * from "./theme-switch";
13
- export * from "./user-settings";
14
- export * from "./workspace-management";
@@ -1,14 +0,0 @@
1
- import { type HTMLAttributes } from "react";
2
- export type NavDisplayStatus = "menu-full" | "menu-icons" | "menu-full-content" | "menu-icons-content";
3
- export type NavDisplayStatusHandler = (navDisplayStatus: NavDisplayStatus) => void;
4
- export interface LeftNavProps extends HTMLAttributes<HTMLDivElement> {
5
- "data-path"?: string;
6
- defaultActiveTabIndex?: number;
7
- defaultExpanded?: boolean;
8
- onActiveChange?: (activeTabIndex: number) => void;
9
- onTogglePrimaryMenu?: (expanded: boolean) => void;
10
- sizeCollapsed?: number;
11
- sizeContent?: number;
12
- sizeExpanded?: number;
13
- }
14
- export declare const LeftNav: (props: LeftNavProps) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- export * from "./LeftNav";
@@ -1,6 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- export interface LoginPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSubmit"> {
3
- appName?: string;
4
- onSubmit: (username: string, password: string) => void;
5
- }
6
- export declare const LoginPanel: ({ appName, className, onSubmit, ...htmlAttributes }: LoginPanelProps) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const VuuLogo: () => import("react").JSX.Element;
@@ -1,20 +0,0 @@
1
- import { ApplicationJSON, LayoutJSON, Settings, Layout, LayoutMetadata, LayoutMetadataDto } from "@vuu-ui/vuu-utils";
2
- import { IPersistenceManager } from "./PersistenceManager";
3
- export declare class LocalPersistenceManager implements IPersistenceManager {
4
- #private;
5
- constructor(userName: string, urlKey?: string);
6
- clearUserSettings(): void;
7
- createLayout(metadata: LayoutMetadataDto, layout: LayoutJSON): Promise<LayoutMetadata>;
8
- updateLayout(id: string, newMetadata: LayoutMetadataDto, newLayout: LayoutJSON): Promise<void>;
9
- deleteLayout(id: string): Promise<void>;
10
- loadLayout(id: string): Promise<LayoutJSON>;
11
- loadMetadata(): Promise<LayoutMetadata[]>;
12
- loadApplicationJSON(): Promise<ApplicationJSON | undefined>;
13
- saveApplicationJSON(applicationJSON: ApplicationJSON): Promise<void>;
14
- loadLayouts: () => Promise<Layout[]>;
15
- saveLayoutsWithMetadata: (layouts: Layout[], metadata: LayoutMetadata[]) => void;
16
- validateIds: (id: string) => Promise<void>;
17
- validateId: (id: string, dataType: "metadata" | "layout") => Promise<void>;
18
- getUserSettings(): Promise<Settings>;
19
- saveUserSettings(userSettings: Settings): void;
20
- }
@@ -1,71 +0,0 @@
1
- import type { ApplicationJSON, LayoutJSON, LayoutMetadata, LayoutMetadataDto, Settings } from "@vuu-ui/vuu-utils";
2
- export interface IPersistenceManager {
3
- /**
4
- * Clear saved user settings/preferences. Right now, this clears ALL saved
5
- * settimgs for user. We will introduce a more fine grained scheme here.
6
- */
7
- clearUserSettings: () => void;
8
- /**
9
- * Saves a new layout and its corresponding metadata
10
- *
11
- * @param metadata - Metadata about the layout to be saved
12
- * @param layout - Full JSON representation of the layout to be saved
13
- *
14
- * @returns Unique identifier assigned to the saved layout
15
- */
16
- createLayout: (metadata: LayoutMetadataDto, layout: LayoutJSON) => Promise<LayoutMetadata>;
17
- /**
18
- * Overwrites an existing layout and its corresponding metadata with the provided information
19
- *
20
- * @param id - Unique identifier of the existing layout to be updated
21
- * @param metadata - Metadata describing the new layout to overwrite with
22
- * @param layout - Full JSON representation of the new layout to overwrite with
23
- */
24
- updateLayout: (id: string, metadata: LayoutMetadataDto, layout: LayoutJSON) => Promise<void>;
25
- /**
26
- * Deletes an existing layout and its corresponding metadata
27
- *
28
- * @param id - Unique identifier of the existing layout to be deleted
29
- */
30
- deleteLayout: (id: string) => Promise<void>;
31
- /**
32
- * Retrieves an existing layout
33
- *
34
- * @param id - Unique identifier of the existing layout to be retrieved
35
- *
36
- * @returns Full JSON representation of the layout corresponding to the provided ID
37
- */
38
- loadLayout: (id: string) => Promise<LayoutJSON>;
39
- /**
40
- * Retrieves metadata for all existing layouts
41
- *
42
- * @returns an array of all persisted layout metadata
43
- */
44
- loadMetadata: () => Promise<LayoutMetadata[]>;
45
- /**
46
- * Retrieves the application JSON. This includes the application layout,
47
- * which describes all layouts on screen
48
- *
49
- * @returns Full JSON representation of the application json
50
- */
51
- loadApplicationJSON: () => Promise<ApplicationJSON | undefined>;
52
- /**
53
- * Saves the application JSON. This includes the application layout,
54
- * which describes all layouts on screen
55
- *
56
- * @param layout - Full JSON representation of the application layout to be saved
57
- */
58
- saveApplicationJSON: (layout: ApplicationJSON) => Promise<void>;
59
- /**
60
- * Save user settings. These get saved within the Application JSON.
61
- *
62
- * @param userSettings
63
- */
64
- saveUserSettings: (userSettings: Settings) => void;
65
- /**
66
- * Get the user settings. These are stored within Application JSON.
67
- *
68
- * @returns userSettings
69
- */
70
- getUserSettings: () => Promise<Settings>;
71
- }
@@ -1,11 +0,0 @@
1
- import { ReactElement, ReactNode } from "react";
2
- import { IPersistenceManager } from ".";
3
- export interface PersistenceContextProps {
4
- persistenceManager?: IPersistenceManager;
5
- }
6
- export declare const PersistenceContext: import("react").Context<PersistenceContextProps>;
7
- export interface PersistenceProviderProps extends PersistenceContextProps {
8
- children: ReactNode;
9
- }
10
- export declare const PersistenceProvider: ({ children, persistenceManager, }: PersistenceProviderProps) => ReactElement;
11
- export declare const usePersistenceManager: () => IPersistenceManager | undefined;
@@ -1,25 +0,0 @@
1
- import { ApplicationJSON, LayoutJSON, LayoutMetadata, LayoutMetadataDto, Settings } from "@vuu-ui/vuu-utils";
2
- import { IPersistenceManager } from "./PersistenceManager";
3
- export type CreateLayoutResponseDto = {
4
- metadata: LayoutMetadata;
5
- };
6
- export type GetLayoutResponseDto = {
7
- definition: LayoutJSON;
8
- };
9
- export type GetApplicationResponseDto = {
10
- definition: ApplicationJSON;
11
- };
12
- export declare class RemotePersistenceManager implements IPersistenceManager {
13
- private userName;
14
- constructor(userName: string);
15
- createLayout(metadata: LayoutMetadataDto, layout: LayoutJSON): Promise<LayoutMetadata>;
16
- clearUserSettings(): void;
17
- updateLayout(id: string, metadata: LayoutMetadataDto, newLayoutJson: LayoutJSON): Promise<void>;
18
- deleteLayout(id: string): Promise<void>;
19
- loadLayout(id: string): Promise<LayoutJSON>;
20
- loadMetadata(): Promise<LayoutMetadata[]>;
21
- saveApplicationJSON(applicationJSON: ApplicationJSON): Promise<void>;
22
- loadApplicationJSON(): Promise<ApplicationJSON>;
23
- getUserSettings(): Promise<{}>;
24
- saveUserSettings(userSettings: Settings): void;
25
- }
@@ -1,25 +0,0 @@
1
- import { ApplicationJSON, LayoutJSON, LayoutMetadata, Settings } from "@vuu-ui/vuu-utils";
2
- import { IPersistenceManager } from "./PersistenceManager";
3
- /**
4
- * Use in Showcase examples only
5
- */
6
- export declare class StaticPersistenceManager implements IPersistenceManager {
7
- #private;
8
- constructor({ applicationJSON, applicationLoadDelay, layoutMetadata, }: {
9
- applicationJSON?: ApplicationJSON;
10
- applicationLoadDelay?: number;
11
- layoutMetadata?: LayoutMetadata[];
12
- });
13
- createLayout(): Promise<LayoutMetadata>;
14
- clearUserSettings(): void;
15
- updateLayout(): Promise<void>;
16
- deleteLayout(): Promise<void>;
17
- loadLayout(id: string): Promise<LayoutJSON<{
18
- [key: string]: any;
19
- }>>;
20
- loadMetadata(): Promise<LayoutMetadata[]>;
21
- loadApplicationJSON(): Promise<ApplicationJSON | undefined>;
22
- saveApplicationJSON(applicationJson: ApplicationJSON): Promise<void>;
23
- getUserSettings(): Promise<Settings>;
24
- saveUserSettings(userSettings: Settings): void;
25
- }
@@ -1,5 +0,0 @@
1
- export * from "./PersistenceManager";
2
- export * from "./PersistenceProvider";
3
- export * from "./LocalPersistenceManager";
4
- export * from "./RemotePersistenceManager";
5
- export * from "./StaticPersistenceManager";
@@ -1,13 +0,0 @@
1
- import { LayoutJSON } from "@vuu-ui/vuu-utils";
2
- import React, { ReactElement, ReactNode } from "react";
3
- export interface ContextPanelProps {
4
- [key: string]: unknown;
5
- className?: string;
6
- content?: ReactElement | LayoutJSON;
7
- expanded?: boolean;
8
- id?: string;
9
- onClose?: () => void;
10
- overlay?: boolean;
11
- title?: ReactNode;
12
- }
13
- export declare const ContextPanel: ({ className: classNameProp, expanded, content: contentProp, id, onClose, overlay, title, }: ContextPanelProps) => React.JSX.Element;
@@ -1 +0,0 @@
1
- export * from "./ContextPanel";
@@ -1,2 +0,0 @@
1
- import { ShellLayoutTemplateHook } from "../useShellLayout";
2
- export declare const useFullHeightLeftPanel: ShellLayoutTemplateHook;
@@ -1,3 +0,0 @@
1
- export * from "./context-panel";
2
- export * from "./useShellLayout";
3
- export * from "./side-panel";
@@ -1,2 +0,0 @@
1
- import { ShellLayoutTemplateHook } from "../useShellLayout";
2
- export declare const useInlayLeftPanel: ShellLayoutTemplateHook;
@@ -1,2 +0,0 @@
1
- import { ShellLayoutTemplateHook } from "../useShellLayout";
2
- export declare const useLeftMainTabs: ShellLayoutTemplateHook;
@@ -1,8 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- export interface SidePanelProps extends HTMLAttributes<HTMLDivElement> {
3
- open?: boolean;
4
- path?: string;
5
- sizeOpen?: number;
6
- sizeClosed?: number;
7
- }
8
- export declare const SidePanel: ({ children, open, sizeClosed, sizeOpen, style: styleProp, ...htmlAttributes }: SidePanelProps) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- export * from "./SidePanel";
@@ -1,2 +0,0 @@
1
- import { ShellLayoutTemplateHook } from "../useShellLayout";
2
- export declare const useSimpleContentPane: ShellLayoutTemplateHook;
@@ -1,51 +0,0 @@
1
- import { HTMLAttributes, ReactElement, ReactNode } from "react";
2
- import { SidePanelProps as ShellSidePanelProps } from "./side-panel";
3
- declare const LayoutHook: {
4
- "full-height": ShellLayoutTemplateHook;
5
- inlay: ShellLayoutTemplateHook;
6
- "left-main-tabs": ShellLayoutTemplateHook;
7
- "simple-content-pane": ShellLayoutTemplateHook;
8
- };
9
- export type LayoutTemplateId = keyof typeof LayoutHook;
10
- export type ShellLayoutTemplateProps = Omit<ShellLayoutProps, "layoutTemplateId">;
11
- export type ShellToolbarProps = {
12
- children: ReactNode;
13
- position?: "left";
14
- width?: number;
15
- };
16
- export type ShellLayoutTemplateHook = (props: ShellLayoutTemplateProps) => ReactElement;
17
- /**
18
- * The Shell Layout is the outermost 'chrome' of the appliciation,
19
- * enclosing the main content area. It will be rendered by one of
20
- * two available templates, determined by the layoutTemplateId,
21
- */
22
- export interface ShellLayoutProps {
23
- /**
24
- * App Header will be rendered in position determined by layout-template
25
- */
26
- appHeader?: ReactNode;
27
- /**
28
- * HTML attributes that will be applied to root div.
29
- */
30
- htmlAttributes?: HTMLAttributes<HTMLDivElement>;
31
- /**
32
- * identifier for shell layout template to be used. Default template
33
- * will be "inlay"
34
- */
35
- layoutTemplateId?: LayoutTemplateId;
36
- /**
37
- * If template renders SidePanel, these props will be provided
38
- */
39
- SidePanelProps?: ShellSidePanelProps;
40
- /**
41
- * If template renders Toolbar, these props will be provided
42
- */
43
- ToolbarProps?: ShellToolbarProps;
44
- }
45
- /**
46
- * This hook acts as a stub for the actual shell layout
47
- * template hooks. It will delegate to the appropriate shell
48
- * layout hook, based on the value of layoutTemplateId.
49
- */
50
- export declare const useShellLayout: ({ layoutTemplateId, ...props }: ShellLayoutProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
51
- export {};
@@ -1,17 +0,0 @@
1
- import { VuuUser } from "@vuu-ui/vuu-utils";
2
- import { type HTMLAttributes, type ReactNode } from "react";
3
- import { ShellLayoutProps } from "./shell-layout-templates";
4
- import { SettingsSchema } from "./user-settings";
5
- import { WorkspaceProps } from "./workspace-management";
6
- export type LayoutTemplateName = "full-height" | "inlay";
7
- export interface ShellProps extends HTMLAttributes<HTMLDivElement> {
8
- shellLayoutProps?: ShellLayoutProps;
9
- userSettingsSchema?: SettingsSchema;
10
- workspaceProps?: WorkspaceProps;
11
- children?: ReactNode;
12
- logout?: () => void;
13
- saveUrl?: string;
14
- serverUrl?: string;
15
- user: VuuUser;
16
- }
17
- export declare const Shell: ({ logout, user, userSettingsSchema, workspaceProps, ...props }: ShellProps) => import("react").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- import { ThemeMode } from "@vuu-ui/vuu-utils";
3
- export interface ThemeSwitchProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
4
- defaultMode?: ThemeMode;
5
- mode?: ThemeMode;
6
- onChange: (mode: ThemeMode) => void;
7
- }
8
- export declare const ThemeSwitch: ({ className: classNameProp, defaultMode: defaultModeProp, mode: modeProp, onChange, ...htmlAttributes }: ThemeSwitchProps) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- export * from "./ThemeSwitch";
@@ -1,46 +0,0 @@
1
- import type { VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
2
- import { type Settings } from "@vuu-ui/vuu-utils";
3
- import { type DropdownProps } from "@salt-ds/core";
4
- import { type FormEventHandler, type HTMLAttributes } from "react";
5
- export interface SettingsSchema {
6
- properties: SettingsProperty[];
7
- }
8
- export type OptionType<T> = {
9
- label: string;
10
- value: T;
11
- };
12
- export declare const isOption: (value: OptionType<number | string> | number | string) => value is OptionType<number | string>;
13
- export interface BaseProperty {
14
- name: string;
15
- label: string;
16
- }
17
- export interface StringProperty extends BaseProperty {
18
- values?: string[] | OptionType<string>[];
19
- defaultValue?: string;
20
- type: "string";
21
- }
22
- export interface NumericProperty extends BaseProperty {
23
- values?: number[] | OptionType<number>[];
24
- defaultValue?: number;
25
- type: "number";
26
- }
27
- export interface BooleanProperty extends BaseProperty {
28
- defaultValue?: boolean;
29
- type: "boolean";
30
- }
31
- export type SettingsProperty = StringProperty | NumericProperty | BooleanProperty;
32
- export declare const isBooleanProperty: (property: SettingsProperty) => property is BooleanProperty;
33
- export declare const isStringOrNumber: (value: unknown) => value is string | number;
34
- export declare function FormControl({ property, changeHandler, selectHandler, inputHandler, currentValue, }: {
35
- property: SettingsProperty;
36
- changeHandler: FormEventHandler;
37
- selectHandler: DropdownProps["onSelectionChange"];
38
- inputHandler: FormEventHandler;
39
- currentValue: VuuRowDataItemType;
40
- }): import("react").JSX.Element | null;
41
- export interface SettingsFormProps extends HTMLAttributes<HTMLDivElement> {
42
- settingsSchema: SettingsSchema;
43
- settings: Settings;
44
- onSettingChanged: (propertyName: string, value: string | number | boolean) => void;
45
- }
46
- export declare const SettingsForm: ({ className, settingsSchema, settings, onSettingChanged, ...htmlAttributes }: SettingsFormProps) => import("react").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- export type UserSettingsPanelProps = HTMLAttributes<HTMLDivElement>;
3
- export declare const UserSettingsPanel: ({ ...htmlAttributes }: UserSettingsPanelProps) => import("react").JSX.Element | null;
@@ -1,2 +0,0 @@
1
- export * from "./UserSettingsPanel";
2
- export * from "./SettingsForm";
@@ -1,2 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- export declare const LayoutList: ({ className, title, ...htmlAttributes }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { LayoutJSON, LayoutMetadata, SystemLayoutMetadata } from "@vuu-ui/vuu-utils";
2
- import { HTMLAttributes } from "react";
3
- export interface LayoutTileProps extends HTMLAttributes<HTMLDivElement> {
4
- metadata: LayoutMetadata | SystemLayoutMetadata;
5
- onLoadLayout: (layoutId?: string, layoutJSON?: LayoutJSON) => void;
6
- }
7
- export declare const LayoutTile: ({ metadata, onLoadLayout, ...htmlAttributes }: LayoutTileProps) => import("react").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { LayoutMetadataDto } from "@vuu-ui/vuu-utils";
2
- type SaveLayoutPanelProps = {
3
- componentId?: string;
4
- defaultTitle?: string;
5
- onCancel: () => void;
6
- onSave: (layoutMetadata: LayoutMetadataDto) => void;
7
- };
8
- export declare const SaveLayoutPanel: (props: SaveLayoutPanelProps) => import("react").JSX.Element;
9
- export {};
@@ -1,52 +0,0 @@
1
- import { LayoutMetadata, LayoutMetadataDto, type ApplicationSetting, type ApplicationSettings, type LayoutJSON } from "@vuu-ui/vuu-utils";
2
- import { ReactElement } from "react";
3
- import { type WorkspaceStackProps } from "./defaultWorkspaceJSON";
4
- export type WorkspaceProps = WorkspaceStackProps & {
5
- layoutPlaceholderJSON?: LayoutJSON;
6
- /**
7
- * layoutJSON defines the default layout to render on first load and until such time as
8
- * layout state has been persisted. After that, the persisted state will be rendered.
9
- */
10
- layoutJSON?: LayoutJSON | LayoutJSON[];
11
- activeLayoutIndex?: number;
12
- /**
13
- * The Vuu workspace is the container into which layouts are loaded. By default, it will be
14
- * a Tabbed Panel (Stack + Tabstrip), showing a tab per Layout.
15
- */
16
- workspaceJSON?: LayoutJSON | LayoutJSON[];
17
- };
18
- export interface WorkspaceProviderProps extends WorkspaceProps {
19
- children: ReactElement | ReactElement[];
20
- /**
21
- * layoutPlaceholderJSON defines the layout to render when a new workspace layout is created.
22
- */
23
- layoutPlaceholderJSON?: LayoutJSON;
24
- }
25
- /**
26
- * LayoutManagementProvider supplies an API for loading and saving layout documents.
27
- * Initial layout is automatically loaded on startup. Because this hook is responsible
28
- * only for loading and saving layouts, it only triggers a render when content is loaded.
29
- *
30
- * Initial layout displays a loading state
31
- * User may supply a default layout. This will not be displayed until call has been made to
32
- * persistenceManager to retrieve stored layout state. If no stored state is returned, the
33
- * default layout provided by user will be set as current state (and hence rendered). If no
34
- * default layout has been provided by user, the sysem default will be used (simple PlaceHolder)
35
- * If saved layout state has been returned, that will be set as current state (and rendered)
36
- *
37
- */
38
- export declare const WorkspaceProvider: ({ TabstripProps, children, layoutJSON, activeLayoutIndex, layoutPlaceholderJSON, showTabs, workspaceJSON: customWorkspaceJSON, }: WorkspaceProviderProps) => import("react").JSX.Element;
39
- export declare const useWorkspace: () => {
40
- layoutMetadata: LayoutMetadata[];
41
- layoutPlaceholderJSON?: LayoutJSON;
42
- getApplicationSettings: (key?: keyof ApplicationSettings) => ApplicationSettings | ApplicationSetting | undefined;
43
- loadLayoutById: (id: string) => void;
44
- saveApplicationSettings: (settings: ApplicationSettings | ApplicationSetting, key?: keyof ApplicationSettings) => void;
45
- saveLayout: (n: LayoutMetadataDto) => void;
46
- saveApplicationLayout: (layout: LayoutJSON) => void;
47
- workspaceJSON: LayoutJSON<{
48
- [key: string]: any;
49
- }>[] | LayoutJSON<{
50
- [key: string]: any;
51
- }>;
52
- };
@@ -1,10 +0,0 @@
1
- import { StackProps } from "@vuu-ui/vuu-layout";
2
- import { LayoutJSON } from "@vuu-ui/vuu-utils";
3
- export type WorkspaceStackProps = Pick<StackProps, "showTabs" | "TabstripProps">;
4
- export declare const warningLayout: LayoutJSON;
5
- export declare const loadingJSON: Readonly<LayoutJSON>;
6
- export declare const defaultWorkspaceJSON: LayoutJSON<StackProps & {
7
- preserve: boolean;
8
- }>;
9
- export declare const getStackWorkspaceJSON: (activeLayoutIndex?: number) => LayoutJSON;
10
- export declare const getWorkspaceWithLayoutJSON: (customWorkspaceJSON?: LayoutJSON | LayoutJSON[], layoutJSON?: LayoutJSON | LayoutJSON[], activeLayoutIndex?: number, stackProps?: WorkspaceStackProps) => LayoutJSON | LayoutJSON[];
@@ -1,5 +0,0 @@
1
- export * from "./SaveLayoutPanel";
2
- export * from "./LayoutList";
3
- export * from "./WorkspaceProvider";
4
- export * from "./defaultWorkspaceJSON";
5
- export * from "./useWorkspaceContextMenuItems";
@@ -1,6 +0,0 @@
1
- /**
2
- * Takes a screenshot of the given node and returns the base64 encoded image url
3
- * @param node HTMLElement to take screenshot of
4
- * @returns Base64 encoded image url
5
- */
6
- export declare const takeScreenshot: (node: HTMLElement) => Promise<string>;
@@ -1,5 +0,0 @@
1
- import { MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-context-menu";
2
- export declare const useWorkspaceContextMenuItems: () => {
3
- buildMenuOptions: MenuBuilder;
4
- handleMenuAction: MenuActionHandler;
5
- };
@@ -1,32 +0,0 @@
1
- import { GridLayoutDocumentController, type GridComponentRendererRegistry, type GridComponentSettingsRegistry, type GridLayoutDocument, type GridLayoutDocumentChange } from "@vuu-ui/grid-layout";
2
- import type { WorkspacePersistenceService } from "../persistence-manager";
3
- import { WorkspacePersistentStateStore } from "./WorkspacePersistentState";
4
- import { WorkspaceRepository } from "./WorkspaceRepository";
5
- import { type WorkspaceSnapshotV1 } from "./workspace-schemas";
6
- export interface WorkspaceControllerOptions {
7
- readonly definitionId?: string;
8
- readonly instanceId: string;
9
- name: string;
10
- readonly onError: (error: Error) => void;
11
- readonly renderers: GridComponentRendererRegistry;
12
- readonly service: WorkspacePersistenceService;
13
- readonly settingsCodecs: GridComponentSettingsRegistry;
14
- readonly snapshot: WorkspaceSnapshotV1;
15
- readonly revision?: number;
16
- }
17
- export declare class WorkspaceController {
18
- #private;
19
- readonly definitionId?: string;
20
- readonly documentController: GridLayoutDocumentController;
21
- readonly instanceId: string;
22
- name: string;
23
- readonly persistentState: WorkspacePersistentStateStore;
24
- readonly renderers: GridComponentRendererRegistry;
25
- readonly repository: WorkspaceRepository;
26
- readonly settingsCodecs: GridComponentSettingsRegistry;
27
- constructor(options: WorkspaceControllerOptions);
28
- get snapshot(): WorkspaceSnapshotV1;
29
- handleDocumentChange: (document: GridLayoutDocument, change: GridLayoutDocumentChange) => void;
30
- rename(name: string): void;
31
- dispose(): Promise<void>;
32
- }
@@ -1 +0,0 @@
1
- export declare const WorkspaceHost: () => import("react").JSX.Element;
@@ -1,19 +0,0 @@
1
- import { type ReactElement, type ReactNode } from "react";
2
- import { type ComponentPersistentStateV1 } from "./workspace-schemas";
3
- export type ComponentStateUpdate = ComponentPersistentStateV1 | ((current: ComponentPersistentStateV1 | undefined) => ComponentPersistentStateV1);
4
- export declare class WorkspacePersistentStateStore {
5
- #private;
6
- constructor(initialState?: Readonly<Record<string, ComponentPersistentStateV1>>);
7
- getSnapshot: () => Readonly<Record<string, ComponentPersistentStateV1>>;
8
- subscribe: (listener: () => void) => (() => void);
9
- get(componentInstanceId: string): ComponentPersistentStateV1 | undefined;
10
- update(componentInstanceId: string, update: ComponentStateUpdate): void;
11
- purge(componentInstanceId?: string): void;
12
- }
13
- export interface WorkspacePersistentStateProviderProps {
14
- readonly children: ReactNode;
15
- readonly store: WorkspacePersistentStateStore;
16
- }
17
- export declare const WorkspacePersistentStateProvider: ({ children, store, }: WorkspacePersistentStateProviderProps) => ReactElement;
18
- export declare const useWorkspacePersistentStateStore: () => WorkspacePersistentStateStore;
19
- export declare const useComponentPersistentState: (componentInstanceId: string) => readonly [ComponentPersistentStateV1 | undefined, (update: ComponentStateUpdate) => void, () => void];
@@ -1,13 +0,0 @@
1
- import type { WorkspacePersistenceService } from "../persistence-manager";
2
- import { type WorkspaceSnapshotRecordV1, type WorkspaceSnapshotV1 } from "./workspace-schemas";
3
- export declare class WorkspaceRepositoryDisposedError extends Error {
4
- constructor();
5
- }
6
- export declare class WorkspaceRepository {
7
- #private;
8
- constructor(service: WorkspacePersistenceService, workspaceInstanceId: string, initial?: WorkspaceSnapshotRecordV1);
9
- get current(): WorkspaceSnapshotRecordV1 | undefined;
10
- load(): Promise<WorkspaceSnapshotRecordV1 | undefined>;
11
- save(snapshot: WorkspaceSnapshotV1): Promise<WorkspaceSnapshotRecordV1>;
12
- dispose(): Promise<void>;
13
- }
@@ -1 +0,0 @@
1
- export declare const WorkspaceStartPanel: () => import("react").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { WorkspaceComponentRegistration } from "./workspace-component-registry";
2
- export declare const shellWorkspaceComponentRegistrations: readonly WorkspaceComponentRegistration<unknown>[];
@@ -1,12 +0,0 @@
1
- import { GridComponentRendererRegistry, GridComponentSettingsRegistry, type GridComponentRenderer, type GridComponentSettingsCodec, type JsonValue } from "@vuu-ui/grid-layout";
2
- export interface WorkspaceComponentRegistration<T> {
3
- readonly codec: GridComponentSettingsCodec<T>;
4
- readonly render: GridComponentRenderer<T>;
5
- readonly type: string;
6
- }
7
- export interface WorkspaceComponentRegistries {
8
- readonly renderers: GridComponentRendererRegistry;
9
- readonly settingsCodecs: GridComponentSettingsRegistry;
10
- }
11
- export declare const createWorkspaceComponentRegistries: <T>(registrations: readonly WorkspaceComponentRegistration<T>[]) => WorkspaceComponentRegistries;
12
- export declare const jsonValueWorkspaceComponentCodec: GridComponentSettingsCodec<JsonValue>;
@@ -1,69 +0,0 @@
1
- import { type GridLayoutDocument, type JsonValue } from "@vuu-ui/grid-layout";
2
- export declare const WORKSPACE_SNAPSHOT_VERSION = 1;
3
- export declare const APPLICATION_SESSION_VERSION = 1;
4
- export declare const NAMED_WORKSPACE_DEFINITION_VERSION = 1;
5
- export declare const WORKSPACE_SNAPSHOT_RECORD_VERSION = 1;
6
- export interface ComponentPersistentStateV1 {
7
- readonly componentType: string;
8
- readonly schemaVersion: number;
9
- readonly value: JsonValue;
10
- }
11
- export interface WorkspaceSnapshotV1 {
12
- readonly version: typeof WORKSPACE_SNAPSHOT_VERSION;
13
- readonly layout: GridLayoutDocument;
14
- readonly componentState: Readonly<Record<string, ComponentPersistentStateV1>>;
15
- }
16
- export interface OpenWorkspaceInstanceV1 {
17
- readonly instanceId: string;
18
- readonly definitionId?: string;
19
- readonly title?: string;
20
- readonly snapshotId: string;
21
- }
22
- export interface ApplicationSessionV1 {
23
- readonly version: typeof APPLICATION_SESSION_VERSION;
24
- readonly openWorkspaces: readonly OpenWorkspaceInstanceV1[];
25
- readonly workspaceOrder: readonly string[];
26
- readonly activeWorkspaceInstanceId: string | null;
27
- readonly settings: Readonly<Record<string, JsonValue>>;
28
- }
29
- export interface NamedWorkspaceDefinitionV1 {
30
- readonly version: typeof NAMED_WORKSPACE_DEFINITION_VERSION;
31
- readonly id: string;
32
- readonly name: string;
33
- readonly description?: string;
34
- readonly createdAt: string;
35
- readonly updatedAt: string;
36
- readonly snapshot: WorkspaceSnapshotV1;
37
- }
38
- export interface NamedWorkspaceMetadataV1 {
39
- readonly version: typeof NAMED_WORKSPACE_DEFINITION_VERSION;
40
- readonly id: string;
41
- readonly name: string;
42
- readonly description?: string;
43
- readonly createdAt: string;
44
- readonly updatedAt: string;
45
- }
46
- export interface WorkspaceSnapshotRecordV1 {
47
- readonly version: typeof WORKSPACE_SNAPSHOT_RECORD_VERSION;
48
- readonly workspaceInstanceId: string;
49
- readonly revision: number;
50
- readonly snapshot: WorkspaceSnapshotV1;
51
- }
52
- export type WorkspaceSchemaName = "WorkspaceSnapshotV1" | "ApplicationSessionV1" | "NamedWorkspaceDefinitionV1" | "NamedWorkspaceMetadataV1" | "WorkspaceSnapshotRecordV1";
53
- export interface WorkspaceValidationIssue {
54
- readonly code: "INVALID_JSON_VALUE" | "INVALID_VALUE" | "UNEXPECTED_FIELD" | "UNSUPPORTED_VERSION";
55
- readonly message: string;
56
- readonly path: string;
57
- }
58
- export declare class WorkspaceValidationError extends Error {
59
- readonly schema: WorkspaceSchemaName;
60
- readonly issues: readonly WorkspaceValidationIssue[];
61
- constructor(schema: WorkspaceSchemaName, issues: readonly WorkspaceValidationIssue[]);
62
- }
63
- export declare const validateWorkspaceSnapshotV1: (value: unknown) => WorkspaceSnapshotV1;
64
- export declare const validateApplicationSessionV1: (value: unknown) => ApplicationSessionV1;
65
- export declare const validateNamedWorkspaceDefinitionV1: (value: unknown) => NamedWorkspaceDefinitionV1;
66
- export declare const validateNamedWorkspaceMetadataV1: (value: unknown) => NamedWorkspaceMetadataV1;
67
- export declare const validateWorkspaceSnapshotRecordV1: (value: unknown) => WorkspaceSnapshotRecordV1;
68
- export declare const workspaceMetadata: (definition: NamedWorkspaceDefinitionV1) => NamedWorkspaceMetadataV1;
69
- export declare const cloneWorkspaceValue: <T>(value: T) => T;