diff --git a/src/workspaces/state/src/index.ts b/src/workspaces/state/src/index.ts index 84669995..83966207 100644 --- a/src/workspaces/state/src/index.ts +++ b/src/workspaces/state/src/index.ts @@ -2,6 +2,15 @@ export { useSettings, DEFAULT_SETTINGS } from './useSettings'; export type { UseSettingsType, UserSettings, UserState } from './useSettings'; export { useUserState } from './useUserState'; export { useDashboardState } from './useDashboardState'; +/* + Exported for a workspace nested INSIDE a panel — see plugins/fofos-admin/web/WorkPanel.tsx. + + `useDashboardState` persists the whole tree, which is right for a dashboard somebody arranged and + wrong for a layout its author ships: the structure would be frozen at whatever it was the first time + a screen was opened. `useAuthoredLayout` keeps the structure in source and persists only sizes and + zoom, which is what a nested authored layout wants for the same reason `PluginScreen` does. +*/ +export { useAuthoredLayout } from './useAuthoredLayout'; export { useModels, useVisibleModels, useUserVisibleModels, useEnabledModels, modelKey } from './useModels'; export type { ModelOption } from './useModels'; export { useAccessPolicy } from './useAccessPolicy';