@phis/ui 0.6.10 → 0.7.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 (115) hide show
  1. package/components/cms/phi-cms-area-render-scope.d.ts +2 -0
  2. package/components/cms/phi-cms-area-render-scope.js +1 -1
  3. package/components/cms/phi-cms-error-page.js +1 -1
  4. package/components/cms/phi-cms-page-render-scope.d.ts +0 -1
  5. package/components/cms/phi-cms-page-render-scope.js +1 -1
  6. package/components/cms/phi-cms-root-layout.js +1 -0
  7. package/components/cms/phi-cms-runtime-registry.d.ts +4 -4
  8. package/components/cms/phi-cms-runtime-registry.js +4 -4
  9. package/components/controls/phi-padding-control.js +18 -5
  10. package/components/layouts/layout-definitions.d.ts +8 -0
  11. package/components/regions/presets/phi-base-page-column.js +1 -2
  12. package/components/regions/presets/phi-header-top-actions-layout.d.ts +2 -2
  13. package/components/regions/presets/phi-header-top-actions-layout.js +2 -4
  14. package/components/regions/presets/phi-settings-page-shell-tree.js +0 -2
  15. package/components/widgets/label-sets/padding.js +2 -0
  16. package/components/widgets/label-sets/region.js +2 -0
  17. package/components/widgets/label-types/padding.d.ts +2 -0
  18. package/components/widgets/label-types/padding.js +1 -0
  19. package/components/widgets/label-types/region.d.ts +2 -0
  20. package/components/widgets/label-types/region.js +1 -0
  21. package/components/widgets/label-types/revisions.js +2 -2
  22. package/components/workspace/catalog-state.d.ts +17 -1
  23. package/components/workspace/catalog-store.js +1 -0
  24. package/gateway/dashboard-cards-route.js +4 -9
  25. package/gateway/form-handler-resolution.js +10 -34
  26. package/gateway/navigation-target-route.js +4 -10
  27. package/gateway/page-references-route.js +3 -8
  28. package/gateway/site-area.d.ts +43 -6
  29. package/gateway/site-area.js +70 -17
  30. package/helpers/cms-area-config.d.ts +36 -14
  31. package/helpers/cms-area-config.js +72 -26
  32. package/helpers/cms-dialog.d.ts +0 -1
  33. package/helpers/cms-dialog.js +0 -1
  34. package/helpers/cms-layout-defaults.d.ts +4 -0
  35. package/helpers/cms-layout-defaults.js +14 -17
  36. package/helpers/cms-region-keys.d.ts +1 -1
  37. package/helpers/page-layout-check.js +4 -1
  38. package/next/seo-routes.js +24 -28
  39. package/package.json +2 -2
  40. package/plugins/runtime-modules/accounting/presets.d.ts +0 -1
  41. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-area-preset-tree.js +0 -2
  42. package/plugins/runtime-modules/admin/presets.d.ts +0 -1
  43. package/plugins/runtime-modules/admin/trees/phi-default-admin-area-preset-tree.js +0 -2
  44. package/plugins/runtime-modules/app/presets.d.ts +0 -1
  45. package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.js +0 -2
  46. package/plugins/runtime-modules/area-definitions.d.ts +17 -0
  47. package/plugins/runtime-modules/area-definitions.js +6 -0
  48. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +0 -2
  49. package/plugins/runtime-modules/builder/area-shell-presets.server.d.ts +21 -5
  50. package/plugins/runtime-modules/builder/area-shell-presets.server.js +171 -63
  51. package/plugins/runtime-modules/builder/clients/shells-workspace.js +12 -1
  52. package/plugins/runtime-modules/builder/controller/client.js +2 -0
  53. package/plugins/runtime-modules/builder/controller/definition.d.ts +1 -0
  54. package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +2 -3
  55. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +56 -25
  56. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +13 -7
  57. package/plugins/runtime-modules/builder/controller/server-definition.d.ts +1 -0
  58. package/plugins/runtime-modules/builder/controller/server-definition.js +7 -4
  59. package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +2 -1
  60. package/plugins/runtime-modules/builder/controller/workspace-controller.js +9 -3
  61. package/plugins/runtime-modules/builder/data-providers.d.ts +1 -1
  62. package/plugins/runtime-modules/builder/definition.d.ts +1 -1
  63. package/plugins/runtime-modules/builder/developer-workspace-store.js +1 -0
  64. package/plugins/runtime-modules/builder/page-preset-catalog.server.d.ts +0 -2
  65. package/plugins/runtime-modules/builder/page-preset-catalog.server.js +0 -16
  66. package/plugins/runtime-modules/builder/persistence.d.ts +20 -25
  67. package/plugins/runtime-modules/builder/persistence.js +67 -75
  68. package/plugins/runtime-modules/builder/services/runtime-modules-table.d.ts +17 -0
  69. package/plugins/runtime-modules/builder/services/runtime-modules-table.js +79 -2
  70. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +0 -1
  71. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.d.ts +0 -1
  72. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +1 -10
  73. package/plugins/runtime-modules/builder/workspace-catalog-actions.d.ts +2 -1
  74. package/plugins/runtime-modules/builder/workspace-catalog-actions.js +3 -1
  75. package/plugins/runtime-modules/core/widgets/cascader/authoring.d.ts +1 -1
  76. package/plugins/runtime-modules/descriptor-compiler.d.ts +16 -2
  77. package/plugins/runtime-modules/descriptor-compiler.js +69 -13
  78. package/plugins/runtime-modules/editor/services/releases-table.js +26 -14
  79. package/plugins/runtime-modules/editor/trees/phi-default-editor-area-preset-tree.js +0 -2
  80. package/plugins/runtime-modules/groups/definition.d.ts +1 -1
  81. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +0 -2
  82. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +0 -4
  83. package/plugins/runtime-modules/revisions/controller/client.js +13 -7
  84. package/plugins/runtime-modules/revisions/services/table.js +10 -3
  85. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +0 -1
  86. package/plugins/runtime-modules/shell-tree-composition.d.ts +0 -2
  87. package/plugins/runtime-modules/shell-tree-composition.js +0 -3
  88. package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +0 -6
  89. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +17 -1
  90. package/server-helpers/area-root-door-warmup.d.ts +5 -2
  91. package/server-helpers/area-root-door-warmup.js +2 -10
  92. package/server-helpers/cms-area.d.ts +9 -1
  93. package/server-helpers/cms-area.js +16 -11
  94. package/server-helpers/cms-lookup.js +1 -1
  95. package/server-helpers/cms-request.d.ts +58 -13
  96. package/server-helpers/cms-request.js +103 -33
  97. package/server-helpers/cms-root.d.ts +4 -0
  98. package/server-helpers/cms-root.js +48 -35
  99. package/server-helpers/cms.d.ts +5 -5
  100. package/server-helpers/public-login-route.js +4 -9
  101. package/server-helpers/search-index.js +9 -14
  102. package/styles/shell.css +12 -0
  103. package/theme/antd-css-var-contract.d.ts +6 -0
  104. package/theme/antd-css-var-contract.js +6 -0
  105. package/theme/phi-theme-tokens.d.ts +3 -2
  106. package/theme/phi-theme-tokens.js +11 -1
  107. package/theme/phi-theme.d.ts +2 -0
  108. package/theme/phi-theme.js +2 -0
  109. package/theme/phi-tokens.d.ts +1 -0
  110. package/theme/phi-tokens.js +7 -0
  111. package/theme.d.ts +1 -1
  112. package/theme.js +1 -1
  113. package/types/cms-module-descriptors.d.ts +26 -1
  114. package/types/cms-plugins.d.ts +3 -0
  115. package/types/cms.d.ts +10 -3
@@ -36,6 +36,8 @@ export declare function loadPhiCmsAreaRenderScope({ root, path, cmsBridge }: Phi
36
36
  };
37
37
  requestContext: import("../../types/site-request-context").PhiSiteRequestContext;
38
38
  resolvedAreaPreset: import("../../types").PhiResolvedCmsAreaPresetTree | null;
39
+ areaModules: import("../../types/cms").PhiCmsAreaModulesSelection | null;
40
+ routeTable: import("../../types/cms-module-descriptors").PhiCmsActiveRouteTable;
39
41
  resolvedRequest: import("../../types").PhiResolvedCmsRequest | null;
40
42
  };
41
43
  runtime: {
@@ -30,7 +30,7 @@ const loadPhiCmsAreaRenderScopeCached = cache(async function loadPhiCmsAreaRende
30
30
  const runtimeModuleScope = await resolvePhiCmsAreaRuntimeModuleScope({
31
31
  cmsBridge,
32
32
  area: runtime.area,
33
- areaPreset: layoutTree,
33
+ areaModules: rootScope.areaModules,
34
34
  serverCapabilities: rootScope.requestContext.serverCapabilities,
35
35
  });
36
36
  const filteredLayoutTree = layoutTree
@@ -57,7 +57,7 @@ export async function PhiCmsErrorPage({ code, cmsBridge, area, locale: staticLoc
57
57
  const runtimeModuleScope = await resolvePhiCmsAreaRuntimeModuleScope({
58
58
  cmsBridge,
59
59
  area: resolvedRequest.runtime.area,
60
- areaPreset: resolvedRequest.areaPreset,
60
+ areaModules: resolvedRequest.areaModules,
61
61
  serverCapabilities: resolvedRequest.serverCapabilities,
62
62
  });
63
63
  const runtimeRegistry = await resolvePhiCmsTreeRuntimeRegistry({
@@ -26,7 +26,6 @@ export declare function resolvePhiCmsPageRenderScope({ cmsBridge, resolvedReques
26
26
  visualAnchorTargets: import("../../types").PhiVisualAnchorAddress[];
27
27
  page: import("../../types").PhiCmsPageNode;
28
28
  pageMeta?: import("../../types").PhiCmsResolvedPageMeta | null;
29
- runtimeModuleIds?: import("../../types").PhiRuntimeModuleId[] | null;
30
29
  regions: import("../../types").PhiCmsRegionNode[];
31
30
  overlays: import("../../types").PhiCmsOverlayNode[];
32
31
  layoutNodes: import("../../types").PhiCmsLayoutNode[];
@@ -24,7 +24,7 @@ const resolvePhiCmsPageRenderBase = cache(async (cmsBridge, resolvedRequest) =>
24
24
  const runtimeModuleScope = await resolvePhiCmsAreaRuntimeModuleScope({
25
25
  cmsBridge,
26
26
  area: resolvedRequest.runtime.area,
27
- areaPreset: resolvedRequest.areaPreset,
27
+ areaModules: resolvedRequest.areaModules,
28
28
  serverCapabilities: resolvedRequest.serverCapabilities,
29
29
  });
30
30
  /*
@@ -156,6 +156,7 @@ export async function PhiCmsAreaBoundary({ root, cmsBridge, children, path, page
156
156
  await warmPhiAreaRootDoor({
157
157
  area: resolvedRoute.area,
158
158
  config: rootScope.resolvedAreaPreset?.preset.config,
159
+ routeTable: rootScope.routeTable,
159
160
  runtime,
160
161
  catalog: resolvePhiCmsDescriptorCatalog(cmsBridge.runtimeModuleCatalog),
161
162
  activeModuleIds: runtimeModuleScope.moduleSet.activeModuleIds,
@@ -3,7 +3,7 @@ import type { PhiResolvedCmsRenderableTree } from "../../types/cms";
3
3
  import type { PhiCmsSiteBridge, PhiRuntimeModuleCatalog, PhiRuntimeModuleId } from "../../types/cms-plugins";
4
4
  import type { PhiCmsAreaKey } from "../../constants/cms-areas";
5
5
  import type { PhiCapabilitySnapshot } from "../../types/server-capabilities";
6
- import { readPhiAreaPresetRuntimeModuleIds } from "../../helpers/cms-area-config";
6
+ import { readPhiAreaSelectionRuntimeModuleIds } from "../../helpers/cms-area-config";
7
7
  declare function resolvePhiCmsRuntimeModuleScope({ cmsBridge, moduleIds, area, serverCapabilities, }: {
8
8
  cmsBridge: PhiCmsSiteBridge;
9
9
  moduleIds?: readonly PhiRuntimeModuleId[] | null;
@@ -16,15 +16,15 @@ declare function resolvePhiCmsRuntimeModuleScope({ cmsBridge, moduleIds, area, s
16
16
  widgetDefinitionsByType: Map<string, import("../../types").PhiCmsWidgetPluginDefinition<unknown>>;
17
17
  }>;
18
18
  /**
19
- * The Module scope of an Area, from the selection its preset states.
19
+ * The Module scope of an Area, from its Module selection (stored apart from its structure).
20
20
  *
21
21
  * Which Modules this Area runs, and not which ones this person may see. A Module is area-bound and
22
22
  * never switched off for a reader (ACCESS.md); what its Widgets show may still differ per person.
23
23
  */
24
- export declare function resolvePhiCmsAreaRuntimeModuleScope({ cmsBridge, area, areaPreset, serverCapabilities, }: {
24
+ export declare function resolvePhiCmsAreaRuntimeModuleScope({ cmsBridge, area, areaModules, serverCapabilities, }: {
25
25
  cmsBridge: PhiCmsSiteBridge;
26
26
  area: PhiCmsAreaKey;
27
- areaPreset: Parameters<typeof readPhiAreaPresetRuntimeModuleIds>[0];
27
+ areaModules: Parameters<typeof readPhiAreaSelectionRuntimeModuleIds>[0];
28
28
  serverCapabilities: PhiCapabilitySnapshot | null;
29
29
  }): Promise<{
30
30
  catalog: PhiRuntimeModuleCatalog;
@@ -2,7 +2,7 @@ import "server-only";
2
2
  import { cache } from "react";
3
3
  import { resolvePhiRuntimeModuleSet, resolvePhiRuntimeRenderRegistry, } from "../../plugins/runtime-modules/resolver";
4
4
  import { resolvePhiRuntimeModuleIdsForArea } from "../../plugins/runtime-modules/settings";
5
- import { readPhiAreaPresetRuntimeModuleIds } from "../../helpers/cms-area-config";
5
+ import { readPhiAreaSelectionRuntimeModuleIds } from "../../helpers/cms-area-config";
6
6
  const resolvePhiCmsRuntimeModuleScopeForRequest = cache(async (catalog, area, moduleIdsKey, serverCapabilitiesKey) => {
7
7
  const moduleIds = JSON.parse(moduleIdsKey);
8
8
  const serverCapabilities = JSON.parse(serverCapabilitiesKey);
@@ -24,13 +24,13 @@ function resolvePhiCmsRuntimeModuleScope({ cmsBridge, moduleIds, area, serverCap
24
24
  return resolvePhiCmsRuntimeModuleScopeForRequest(cmsBridge.runtimeModuleCatalog, area, JSON.stringify(moduleIds ?? []), JSON.stringify(serverCapabilities));
25
25
  }
26
26
  /**
27
- * The Module scope of an Area, from the selection its preset states.
27
+ * The Module scope of an Area, from its Module selection (stored apart from its structure).
28
28
  *
29
29
  * Which Modules this Area runs, and not which ones this person may see. A Module is area-bound and
30
30
  * never switched off for a reader (ACCESS.md); what its Widgets show may still differ per person.
31
31
  */
32
- export function resolvePhiCmsAreaRuntimeModuleScope({ cmsBridge, area, areaPreset, serverCapabilities, }) {
33
- const moduleIds = resolvePhiRuntimeModuleIdsForArea(area, readPhiAreaPresetRuntimeModuleIds(areaPreset, area), [...cmsBridge.runtimeModuleCatalog.values()].map((entry) => entry.definition));
32
+ export function resolvePhiCmsAreaRuntimeModuleScope({ cmsBridge, area, areaModules, serverCapabilities, }) {
33
+ const moduleIds = resolvePhiRuntimeModuleIdsForArea(area, readPhiAreaSelectionRuntimeModuleIds(areaModules, area), [...cmsBridge.runtimeModuleCatalog.values()].map((entry) => entry.definition));
34
34
  return resolvePhiCmsRuntimeModuleScope({ cmsBridge, moduleIds, area, serverCapabilities });
35
35
  }
36
36
  export function resolvePhiCmsTreeRuntimeRegistry({ moduleScope, trees, }) {
@@ -5,14 +5,20 @@ import { useMemo, useState } from "react";
5
5
  import { normalizePhiPaddingWidgetConfig } from "../../types/cms-config";
6
6
  import { PHI_PADDING_WIDGET_DEFAULT_LABELS, } from "../widgets/label-types/padding";
7
7
  import { usePhiConfig } from "../root/phi-config-provider";
8
+ import { PHI_LAYOUT_GAP } from "../../theme/antd-css-var-contract";
8
9
  import { PhiLabeledControl } from "./phi-labeled-control";
9
10
  import { PHI_SPACING_SCALE_KEYS, resolvePhiSpacingScaleKey, resolvePhiSpacingScaleValue, } from "../widgets/config/spacing-options";
10
11
  function normalizePaddingScaleKey(value) {
11
12
  return resolvePhiSpacingScaleKey(value);
12
13
  }
14
+ /*
15
+ * The gap select's word for "none stated": the Layout takes the Theme's Layout gap (`PHI_LAYOUT_GAP`).
16
+ * Choosing it clears the gap rather than writing the reference, so the node states nothing again.
17
+ */
18
+ const THEME_GAP = "theme";
13
19
  function resolveNextPadding(currentValue, key, value) {
14
20
  // A padding and a gap are steps of the same scale (theme/phi-tokens.ts).
15
- const nextValue = resolvePhiSpacingScaleValue(value);
21
+ const nextValue = value === THEME_GAP ? undefined : resolvePhiSpacingScaleValue(value);
16
22
  const nextPadding = {
17
23
  ...(currentValue ?? {}),
18
24
  [key]: nextValue ?? undefined,
@@ -45,8 +51,8 @@ function renderPaddingGridCell(content, style) {
45
51
  ...style,
46
52
  }, children: content }));
47
53
  }
48
- function renderPaddingInput(label, value, disabled, options, onChange) {
49
- return (_jsx(PhiLabeledControl, { description: label, fill: true, children: _jsx(Select, { "aria-label": label, disabled: disabled, value: normalizePaddingScaleKey(value) ?? "none", onChange: onChange, options: [...options], style: { width: "100%", minWidth: 0 } }) }));
54
+ function renderPaddingInput(label, value, disabled, options, onChange, unset = "none") {
55
+ return (_jsx(PhiLabeledControl, { description: label, fill: true, children: _jsx(Select, { "aria-label": label, disabled: disabled, value: normalizePaddingScaleKey(value) ?? unset, onChange: onChange, options: [...options], style: { width: "100%", minWidth: 0 } }) }));
50
56
  }
51
57
  export function PhiPaddingControl({ value, config, disabled = false, mode = "control", labels = PHI_PADDING_WIDGET_DEFAULT_LABELS, showGap = true, onChange, }) {
52
58
  const { token } = usePhiConfig();
@@ -60,6 +66,13 @@ export function PhiPaddingControl({ value, config, disabled = false, mode = "con
60
66
  const displayValue = displayState.source === currentValue ? displayState.value : currentValue;
61
67
  const resolvedDisplayValue = displayValue ?? currentValue;
62
68
  const resolvedGapValue = resolvedDisplayValue?.gap ?? null;
69
+ /*
70
+ * A Layout whose default gap is the Theme's -- the defaults handed in as `config` say so -- shows an
71
+ * unstated gap as "Theme" and offers it back; anything else keeps "none" for nothing stated.
72
+ */
73
+ const gapFollowsTheme = normalizePhiPaddingWidgetConfig(config ?? null)?.gap === PHI_LAYOUT_GAP;
74
+ const gapOptions = useMemo(() => (gapFollowsTheme ? [{ value: THEME_GAP, label: labels.gapTheme }, ...scaleOptions] : scaleOptions), [gapFollowsTheme, labels, scaleOptions]);
75
+ const displayGapValue = gapFollowsTheme && resolvedGapValue === PHI_LAYOUT_GAP ? null : resolvedGapValue;
63
76
  const grid = (_jsxs("div", { style: {
64
77
  display: "grid",
65
78
  gridTemplateColumns: "minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)",
@@ -75,11 +88,11 @@ export function PhiPaddingControl({ value, config, disabled = false, mode = "con
75
88
  setDisplayState({ source: currentValue, value: nextPadding });
76
89
  emit(nextPadding);
77
90
  }), showGap
78
- ? renderPaddingInput(labels.fields.gap, resolvedGapValue, isDisabled, scaleOptions, (next) => {
91
+ ? renderPaddingInput(labels.fields.gap, displayGapValue, isDisabled, gapOptions, (next) => {
79
92
  const nextPadding = resolveNextPadding(resolvedDisplayValue, "gap", next);
80
93
  setDisplayState({ source: currentValue, value: nextPadding });
81
94
  emit(nextPadding);
82
- })
95
+ }, gapFollowsTheme ? THEME_GAP : "none")
83
96
  : renderPaddingGridCell(null), renderPaddingInput(labels.fields.right, resolvedDisplayValue?.paddingRight ?? resolvedDisplayValue?.padding, isDisabled, scaleOptions, (next) => {
84
97
  const nextPadding = resolveNextPadding(resolvedDisplayValue, "paddingRight", next);
85
98
  setDisplayState({ source: currentValue, value: nextPadding });
@@ -552,6 +552,10 @@ export declare const PHI_SPLIT_CARD_LAYOUT_DEFINITION: {
552
552
  [x: string]: unknown;
553
553
  };
554
554
  creationConfig: {
555
+ anchor: {
556
+ readonly horizontal: "center";
557
+ readonly vertical: "middle";
558
+ };
555
559
  surface: {
556
560
  readonly background: {
557
561
  readonly base: {
@@ -1291,6 +1295,10 @@ export declare const PHI_CORE_LAYOUT_DEFINITIONS: readonly [{
1291
1295
  [x: string]: unknown;
1292
1296
  };
1293
1297
  creationConfig: {
1298
+ anchor: {
1299
+ readonly horizontal: "center";
1300
+ readonly vertical: "middle";
1301
+ };
1294
1302
  surface: {
1295
1303
  readonly background: {
1296
1304
  readonly base: {
@@ -37,8 +37,7 @@ export function buildPhiBasePageColumnFrame({ page, regionId, columnId, label, m
37
37
  * Region's (`buildPhiBasePageContentScaffold`), not the column's.
38
38
  */
39
39
  padding: PHI_SPACE.base,
40
- // The house step between a preset's children; the Widgets keep their own air inside.
41
- gap: PHI_SPACE.sm,
40
+ // No gap of its own: its children stand the Theme's Layout gap apart (`PHI_LAYOUT_GAP`).
42
41
  },
43
42
  }),
44
43
  ],
@@ -6,8 +6,8 @@ import type { PhiCmsInstanceId } from "../../../types/cms-instance-id";
6
6
  *
7
7
  * The three Areas carried the same node three times, and only its identity differs between them.
8
8
  *
9
- * The gap is the `sm` step of the spacing scale, so it follows a Theme that changes the scale. It was a
10
- * literal 12 in all three copies, a value the scale does not have.
9
+ * It states no gap: its actions stand the Theme's Layout gap apart (`PHI_LAYOUT_GAP`). It was a literal
10
+ * 12 in all three copies once, a value the scale does not have.
11
11
  */
12
12
  export declare function buildPhiHeaderTopActionsLayoutNode(nodes: PhiCmsPresetNodes, { id, parentLayoutNodeId, label, }: {
13
13
  id: PhiCmsInstanceId;
@@ -1,12 +1,11 @@
1
1
  import { PHI_CMS_THREE_COLUMN_LAYOUT_SLOT_INDEX } from "../../../constants/cms-layout-types";
2
- import { PHI_SPACE } from "../../../theme/antd-css-var-contract";
3
2
  /**
4
3
  * The row of account actions at the right of a workspace Area's top Header (Admin, Editor, Builder).
5
4
  *
6
5
  * The three Areas carried the same node three times, and only its identity differs between them.
7
6
  *
8
- * The gap is the `sm` step of the spacing scale, so it follows a Theme that changes the scale. It was a
9
- * literal 12 in all three copies, a value the scale does not have.
7
+ * It states no gap: its actions stand the Theme's Layout gap apart (`PHI_LAYOUT_GAP`). It was a literal
8
+ * 12 in all three copies once, a value the scale does not have.
10
9
  */
11
10
  export function buildPhiHeaderTopActionsLayoutNode(nodes, { id, parentLayoutNodeId, label, }) {
12
11
  return nodes.layout({
@@ -18,7 +17,6 @@ export function buildPhiHeaderTopActionsLayoutNode(nodes, { id, parentLayoutNode
18
17
  label,
19
18
  config: {
20
19
  anchor: { horizontal: "right", vertical: "middle" },
21
- gap: PHI_SPACE.sm,
22
20
  verticalSeparators: false,
23
21
  separatorBeforeFirst: true,
24
22
  separatorSpan: "50%",
@@ -1,7 +1,6 @@
1
1
  import { PHI_CMS_COLLAPSIBLE_LAYOUT_MAX_SLOTS, PHI_CMS_DEFAULT_SLOT_INDEX, } from "../../../constants/cms-layout-types";
2
2
  import { PhiCmsFlags, PhiCmsPageType } from "../../../constants/phi-cms";
3
3
  import { createPhiCmsPresetNodes } from "../../../helpers/cms-preset-nodes";
4
- import { PHI_SPACE } from "../../../theme/antd-css-var-contract";
5
4
  import { PHI_LAYOUT } from "../../../theme/phi-tokens";
6
5
  import { createPhiPresetCmsInstanceIdMap } from "../../../types/cms-instance-id";
7
6
  import { PHI_SIGNAL_VALUE_SCHEMAS, createPhiSignalAddress, createPhiSignalSubcontrolAddress, } from "../../../types/signals";
@@ -82,7 +81,6 @@ export function buildPhiSettingsPageShellTree({ page, ownerModuleId, presetKey,
82
81
  slotIndex: panelIndex,
83
82
  label: panel.title,
84
83
  config: {
85
- gap: PHI_SPACE.sm,
86
84
  padding: 0,
87
85
  /*
88
86
  * A panel reads from its left edge, as its title does. A vertical flex centres by default, and
@@ -14,6 +14,7 @@ const PHI_PADDING_WIDGET_LABEL_SET = definePhiLabelSet({
14
14
  field_right: PHI_PADDING_WIDGET_DEFAULT_LABELS.fields.right,
15
15
  field_bottom: PHI_PADDING_WIDGET_DEFAULT_LABELS.fields.bottom,
16
16
  placeholder_value: PHI_PADDING_WIDGET_DEFAULT_LABELS.placeholders.value,
17
+ gap_theme: PHI_PADDING_WIDGET_DEFAULT_LABELS.gapTheme,
17
18
  scale_size_none: PHI_PADDING_WIDGET_DEFAULT_LABELS.scaleSizes.none,
18
19
  scale_size_xxs: PHI_PADDING_WIDGET_DEFAULT_LABELS.scaleSizes.xxs,
19
20
  scale_size_xs: PHI_PADDING_WIDGET_DEFAULT_LABELS.scaleSizes.xs,
@@ -40,6 +41,7 @@ export async function getPhiPaddingWidgetLabels(options) {
40
41
  placeholders: {
41
42
  value: labels.placeholder_value,
42
43
  },
44
+ gapTheme: labels.gap_theme,
43
45
  scaleSizes: {
44
46
  none: labels.scale_size_none,
45
47
  xxs: labels.scale_size_xxs,
@@ -10,6 +10,7 @@ const PHI_REGION_WIDGET_LABEL_SET = definePhiLabelSet({
10
10
  structure_surface_sider_full_height: PHI_REGION_WIDGET_DEFAULT_LABELS.structure.surface.siderFullHeight,
11
11
  structure_surface_sider_spans_shell: PHI_REGION_WIDGET_DEFAULT_LABELS.structure.surface.siderSpansShell,
12
12
  structure_surface_sider_beside_content: PHI_REGION_WIDGET_DEFAULT_LABELS.structure.surface.siderBesideContent,
13
+ structure_surface_shell_owner: PHI_REGION_WIDGET_DEFAULT_LABELS.structure.surface.shellOwner,
13
14
  structure_surface_selected_page_header_band: PHI_REGION_WIDGET_DEFAULT_LABELS.structure.surface.selectedPageHeaderBand,
14
15
  structure_surface_page_sidebar: PHI_REGION_WIDGET_DEFAULT_LABELS.structure.surface.pageSidebar,
15
16
  structure_surface_content_title: PHI_REGION_WIDGET_DEFAULT_LABELS.structure.surface.contentTitle,
@@ -45,6 +46,7 @@ export async function getPhiRegionWidgetLabels(options) {
45
46
  siderFullHeight: labels.structure_surface_sider_full_height,
46
47
  siderSpansShell: labels.structure_surface_sider_spans_shell,
47
48
  siderBesideContent: labels.structure_surface_sider_beside_content,
49
+ shellOwner: labels.structure_surface_shell_owner,
48
50
  selectedPageHeaderBand: labels.structure_surface_selected_page_header_band,
49
51
  pageSidebar: labels.structure_surface_page_sidebar,
50
52
  contentTitle: labels.structure_surface_content_title,
@@ -12,6 +12,8 @@ export type PhiPaddingWidgetLabels = {
12
12
  placeholders: {
13
13
  value: string;
14
14
  };
15
+ /** The gap select's choice for a Layout that takes the Theme's Layout gap. */
16
+ gapTheme: string;
15
17
  /** The steps of the spacing scale, as the select box in each cell of the grid names them. */
16
18
  scaleSizes: PhiSpacingScaleLabels;
17
19
  };
@@ -12,5 +12,6 @@ export const PHI_PADDING_WIDGET_DEFAULT_LABELS = {
12
12
  placeholders: {
13
13
  value: "none",
14
14
  },
15
+ gapTheme: "Theme",
15
16
  scaleSizes: { ...PHI_SPACING_SCALE_DEFAULT_LABELS },
16
17
  };
@@ -11,6 +11,8 @@ export type PhiRegionWidgetLabels = {
11
11
  /** What the left Sider is doing right now, one of the two, under its title on the canvas. */
12
12
  siderSpansShell: string;
13
13
  siderBesideContent: string;
14
+ /** Which Module's shell the Area takes, under the top Region on the canvas; `%1` is its title. */
15
+ shellOwner: string;
14
16
  selectedPageHeaderBand: string;
15
17
  pageSidebar: string;
16
18
  contentTitle: string;
@@ -5,6 +5,7 @@ export const PHI_REGION_WIDGET_DEFAULT_LABELS = {
5
5
  siderFullHeight: "Sider full height",
6
6
  siderSpansShell: "Spans header to footer",
7
7
  siderBesideContent: "Beside the content only",
8
+ shellOwner: "The shell of %1",
8
9
  selectedPageHeaderBand: "Selected page header band",
9
10
  pageSidebar: "Page sidebar beside hero and content",
10
11
  contentTitle: "Page body viewport",
@@ -58,8 +58,8 @@ export const PHI_BUILDER_REVISIONS_WIDGET_DEFAULT_LABELS = {
58
58
  },
59
59
  deleteArea: {
60
60
  title: "Clear this Area back to its preset?",
61
- warning: "Everything this Site stored for the Area is cleared -- its Shell and its Module selection, drafts and published alike. What is live changes at once, the Module preset takes the Area back, and no revision is left to restore it from. It cannot be undone.",
62
- survives: "The Area keeps its Pages, its Navigation and its Theme. Its Shell and its Module selection go back to the preset.",
61
+ warning: "The structure this Site stored for the Area is cleared -- its Shell, drafts and published alike. What is live changes at once, the shell's preset takes the Area back, and no revision is left to restore it from. It cannot be undone. The Module selection is kept.",
62
+ survives: "The Area keeps its Module selection, its Pages, its Navigation and its Theme. Only its Shell goes back to the preset.",
63
63
  field: "Type the Area key to confirm",
64
64
  fieldRequired: "Write the Area key out to confirm.",
65
65
  confirm: "Clear Area",
@@ -1,6 +1,6 @@
1
1
  import type { PhiBuilderAreaKey } from "../../constants/cms-areas";
2
2
  import type { PhiBuilderModulePresetPagesByArea, PhiBuilderPersistedPageCatalogEntry, PhiPresetPageNode } from "../../helpers/cms-page-catalog";
3
- import type { PhiCmsPresetSource, PhiCmsResolvedNavigationSurface } from "../../types/cms-module-descriptors";
3
+ import type { PhiCmsPresetIdentity, PhiCmsPresetSource, PhiCmsResolvedNavigationSurface } from "../../types/cms-module-descriptors";
4
4
  import type { PhiPublicRoutePathAssignment } from "../../helpers/cms-area-config";
5
5
  import type { PhiPublicRouteClaim } from "../../helpers/public-route-claims";
6
6
  import type { PhiRuntimeModuleDefinition, PhiRuntimeModuleId } from "../../types";
@@ -19,6 +19,16 @@ export type PhiWorkspaceServerUnavailableModule = {
19
19
  diagnosticCode: string;
20
20
  missingCapabilities: readonly string[];
21
21
  };
22
+ /** What the Builder knows about an Area's shell beyond the one it takes (`areaPresetSourcesByArea`). */
23
+ export type PhiWorkspaceAreaShellState = {
24
+ /** The installed Modules that bring a shell for the Area, selected or not. At most one may be selected. */
25
+ providerModuleIds: PhiRuntimeModuleId[];
26
+ /**
27
+ * The identity the Area's one stored structure stands on, whatever shell the Area takes now; null when
28
+ * it stores none. A structure of another shell is kept and comes back when that shell applies again.
29
+ */
30
+ storedSource: PhiCmsPresetIdentity | null;
31
+ };
22
32
  export type PhiWorkspaceCatalogState = {
23
33
  /** The Area being worked on. */
24
34
  area: PhiWorkspaceCatalogArea;
@@ -31,7 +41,13 @@ export type PhiWorkspaceCatalogState = {
31
41
  customPages: Partial<Record<PhiWorkspaceCatalogArea, PhiPresetPageNode[]>>;
32
42
  persistedPageCatalogByArea: Partial<Record<PhiWorkspaceCatalogArea, PhiBuilderPersistedPageCatalogEntry[]>>;
33
43
  navigationSurfacesByArea: Partial<Record<PhiWorkspaceCatalogArea, readonly PhiCmsResolvedNavigationSurface[]>>;
44
+ /**
45
+ * The shell each Area takes: the shell of the one selected Module that brings one, else the base
46
+ * Module's. What a structure save, a draft read and a Revisions scope name.
47
+ */
34
48
  areaPresetSourcesByArea: Partial<Record<PhiWorkspaceCatalogArea, PhiCmsPresetSource>>;
49
+ /** Per Area, the Modules that bring a shell for it and the shell its stored structure stands on. */
50
+ areaShellsByArea: Partial<Record<PhiWorkspaceCatalogArea, PhiWorkspaceAreaShellState>>;
35
51
  runtimeModuleDefinitions: PhiRuntimeModuleDefinition[];
36
52
  runtimeModuleIdsByArea: Partial<Record<PhiWorkspaceCatalogArea, PhiRuntimeModuleId[]>>;
37
53
  /**
@@ -17,6 +17,7 @@ function createDefaultWorkspaceCatalogState(scopeKey) {
17
17
  persistedPageCatalogByArea: {},
18
18
  navigationSurfacesByArea: {},
19
19
  areaPresetSourcesByArea: {},
20
+ areaShellsByArea: {},
20
21
  runtimeModuleDefinitions: [],
21
22
  runtimeModuleIdsByArea: {},
22
23
  unresolvedModuleIdsByArea: {},
@@ -3,7 +3,7 @@ import "server-only";
3
3
  import { isPhiCmsAreaKey, resolvePhiCmsAreaMask, } from "../constants/cms-areas";
4
4
  import { canPhiViewerAccess } from "../types/access";
5
5
  import { localizeAreaPath } from "../helpers/locale";
6
- import { compilePhiCmsActiveRouteTable, resolvePhiCmsAreaShellPresetBinding, resolvePhiCmsDescriptorCatalog, } from "../plugins/runtime-modules/descriptor-compiler";
6
+ import { compilePhiCmsActiveRouteTable, resolvePhiCmsAreaBaseShellPresetBinding, resolvePhiCmsDescriptorCatalog, } from "../plugins/runtime-modules/descriptor-compiler";
7
7
  import { resolvePhiAreaRouteScope } from "../server-helpers/cms-request";
8
8
  import { getPhiExactSiteArea } from "../server-helpers/cms";
9
9
  import { resolveCmsRootRoute } from "../server-helpers/cms-route";
@@ -44,29 +44,24 @@ async function resolveDashboardCardScope({ bridge, area, locale, path, cookieHea
44
44
  const requestContext = await loadPhiSiteRequestContext(siteKey, locale, cookieHeader, apiBaseUrl, internalToken);
45
45
  const catalog = resolvePhiCmsDescriptorCatalog(bridge.runtimeModuleCatalog);
46
46
  const areaDefinition = catalog.areaDefinitions.get(area);
47
- const shellBinding = resolvePhiCmsAreaShellPresetBinding(catalog, area);
48
47
  if (!areaDefinition ||
49
- !shellBinding ||
48
+ !resolvePhiCmsAreaBaseShellPresetBinding(catalog, area) ||
50
49
  !canPhiViewerAccess(requestContext.viewer, areaDefinition.accessPolicy)) {
51
50
  return null;
52
51
  }
53
- const areaPreset = await getPhiExactSiteArea({
52
+ const storedArea = await getPhiExactSiteArea({
54
53
  path,
55
54
  apiBaseUrl,
56
55
  internalToken,
57
56
  siteKey,
58
57
  locale,
59
58
  cookieHeader,
60
- sourcePreset: {
61
- ownerModuleId: shellBinding.descriptor.ownerModuleId,
62
- presetKey: shellBinding.descriptor.presetKey,
63
- },
64
59
  });
65
60
  const { activeModuleIds, routeTable } = resolvePhiAreaRouteScope({
66
61
  runtimeModuleCatalog: bridge.runtimeModuleCatalog,
67
62
  catalog,
68
63
  area,
69
- preset: areaPreset?.preset ?? null,
64
+ read: storedArea,
70
65
  serverCapabilities: requestContext.serverCapabilities,
71
66
  });
72
67
  const cardContext = {
@@ -1,5 +1,5 @@
1
1
  import "server-only";
2
- import { isPhiCmsAreaKey, resolvePhiCmsAreaMask } from "../constants/cms-areas";
2
+ import { isPhiCmsAreaKey } from "../constants/cms-areas";
3
3
  import { canPhiViewerAccess } from "../types/access";
4
4
  import { getResolvedFormDefinition } from "./form-registry";
5
5
  import { getExactSiteArea } from "./site-area";
@@ -7,10 +7,8 @@ import { getPhiCapabilitySnapshot } from "./server-capabilities";
7
7
  import { resolvePhiCmsDescriptorCatalog } from "../plugins/runtime-modules/descriptor-compiler";
8
8
  import { resolvePhiRuntimeModuleSet } from "../plugins/runtime-modules/resolver";
9
9
  import { resolvePhiRuntimeModuleIdsForArea } from "../plugins/runtime-modules/settings";
10
- import { buildPhiLocalCmsAreaPayload } from "../server-helpers/cms-area";
11
- import { buildPhiBlockRuntime, loadPhiSiteRequestContext } from "../server-helpers/runtime";
12
- import { runWithPhiRequestRuntime } from "../server-helpers/request-runtime";
13
- import { readPhiAreaPresetRuntimeModuleIds } from "../helpers/cms-area-config";
10
+ import { loadPhiSiteRequestContext } from "../server-helpers/runtime";
11
+ import { readPhiAreaSelectionRuntimeModuleIds } from "../helpers/cms-area-config";
14
12
  import { fetchResolvedSiteLocale } from "../server-helpers/site-locale";
15
13
  /**
16
14
  * Who the relay knows it is talking to before asking anybody: nobody in particular. An Area this viewer
@@ -50,7 +48,7 @@ export async function resolvePhiServerFormHandler(options) {
50
48
  return null;
51
49
  const locale = await resolveRequestLocale(options.request, options);
52
50
  const cookieHeader = options.request.headers.get("cookie") ?? "";
53
- // Read at most once, and only when something needs the viewer: an admitting Area or a preset fallback.
51
+ // Read at most once, and only when something needs the viewer or the server: an admitting Area, the capabilities.
54
52
  const siteRequest = {
55
53
  context: null,
56
54
  };
@@ -60,7 +58,11 @@ export async function resolvePhiServerFormHandler(options) {
60
58
  !canPhiViewerAccess((await loadSiteRequestContext()).viewer, areaDefinition.accessPolicy)) {
61
59
  return null;
62
60
  }
63
- const areaPayload = await getExactSiteArea({
61
+ /*
62
+ * The Area's Module selection, stored apart from its structure: which Modules may answer is all this
63
+ * needs, and an Area that never stored one runs its default list -- no shell is built to find out.
64
+ */
65
+ const storedArea = await getExactSiteArea({
64
66
  apiBaseUrl: options.upstreamBaseUrl,
65
67
  internalToken: options.internalToken,
66
68
  siteKey: options.siteKey,
@@ -68,34 +70,8 @@ export async function resolvePhiServerFormHandler(options) {
68
70
  path: resolveAreaPath(area),
69
71
  locale,
70
72
  cookieHeader,
71
- sourcePreset: {
72
- ownerModuleId: areaDefinition.baseModuleId,
73
- presetKey: areaDefinition.shellPresetKey,
74
- },
75
73
  });
76
- let tree = areaPayload?.preset ?? null;
77
- if (!tree) {
78
- const requestContext = await loadSiteRequestContext();
79
- const areaMask = resolvePhiCmsAreaMask(area);
80
- const runtime = buildPhiBlockRuntime({
81
- requestContext,
82
- areaMask,
83
- });
84
- // The code-owned preset trees resolve their labels through the request runtime store. The page
85
- // render path populates it in the root layout; this route handler runs outside the React render,
86
- // so the store must be scoped explicitly around the instantiation — otherwise the first label
87
- // lookup after a cold start fails the whole dispatch once the label cache no longer masks it.
88
- tree = (await runWithPhiRequestRuntime(runtime, () => buildPhiLocalCmsAreaPayload({
89
- areaMask,
90
- siteId: requestContext.site.id,
91
- path: resolveAreaPath(area),
92
- runtime,
93
- runtimeModuleCatalog: catalog,
94
- })))?.preset ?? null;
95
- }
96
- if (!tree)
97
- return null;
98
- const optionalModuleIds = resolvePhiRuntimeModuleIdsForArea(area, readPhiAreaPresetRuntimeModuleIds(tree, area), [...catalog.values()].map((entry) => entry.definition));
74
+ const optionalModuleIds = resolvePhiRuntimeModuleIdsForArea(area, readPhiAreaSelectionRuntimeModuleIds(storedArea?.modules, area), [...catalog.values()].map((entry) => entry.definition));
99
75
  const serverCapabilities = siteRequest.context?.serverCapabilities ??
100
76
  await getPhiCapabilitySnapshot({
101
77
  apiBaseUrl: options.upstreamBaseUrl,
@@ -2,7 +2,7 @@ import { jsonResponse, readPhiInternalRequestPath, splitPhiRequestPath } from ".
2
2
  import "server-only";
3
3
  import { isPhiCmsAreaKey, } from "../constants/cms-areas";
4
4
  import { canPhiViewerAccess } from "../types/access";
5
- import { normalizePhiCmsRoutePath, resolvePhiCmsAreaShellPresetBinding, resolvePhiCmsDescriptorCatalog, resolvePhiCmsRoutePreset, } from "../plugins/runtime-modules/descriptor-compiler";
5
+ import { normalizePhiCmsRoutePath, resolvePhiCmsAreaBaseShellPresetBinding, resolvePhiCmsDescriptorCatalog, resolvePhiCmsRoutePreset, } from "../plugins/runtime-modules/descriptor-compiler";
6
6
  import { resolvePhiAreaRouteScope } from "../server-helpers/cms-request";
7
7
  import { resolvePhiCmsLookup } from "../server-helpers/cms-lookup";
8
8
  import { getPhiCmsPage, getPhiExactSiteArea } from "../server-helpers/cms";
@@ -73,30 +73,24 @@ export function buildPhiNavigationTargetRouteHandler({ loadAreaBridge, }) {
73
73
  const requestContext = await loadPhiSiteRequestContext(bridge.runtime.siteKey, resolvedRoute.locale, cookieHeader, bridge.runtime.apiBaseUrl, bridge.runtime.internalToken);
74
74
  const catalog = resolvePhiCmsDescriptorCatalog(bridge.runtimeModuleCatalog);
75
75
  const areaDefinition = catalog.areaDefinitions.get(area);
76
- const shellBinding = resolvePhiCmsAreaShellPresetBinding(catalog, area);
77
76
  if (!areaDefinition ||
78
- !shellBinding ||
77
+ !resolvePhiCmsAreaBaseShellPresetBinding(catalog, area) ||
79
78
  !canPhiViewerAccess(requestContext.viewer, areaDefinition.accessPolicy)) {
80
79
  return jsonResponse({ available: false });
81
80
  }
82
- const sourcePreset = {
83
- ownerModuleId: shellBinding.descriptor.ownerModuleId,
84
- presetKey: shellBinding.descriptor.presetKey,
85
- };
86
- const areaPreset = await getPhiExactSiteArea({
81
+ const storedArea = await getPhiExactSiteArea({
87
82
  path: resolvedRoute.cmsPath,
88
83
  apiBaseUrl: bridge.runtime.apiBaseUrl,
89
84
  internalToken: bridge.runtime.internalToken,
90
85
  siteKey: bridge.runtime.siteKey,
91
86
  locale: resolvedRoute.locale,
92
87
  cookieHeader,
93
- sourcePreset,
94
88
  });
95
89
  const { routeTable } = resolvePhiAreaRouteScope({
96
90
  runtimeModuleCatalog: bridge.runtimeModuleCatalog,
97
91
  catalog,
98
92
  area,
99
- preset: areaPreset?.preset ?? null,
93
+ read: storedArea,
100
94
  serverCapabilities: requestContext.serverCapabilities,
101
95
  });
102
96
  const storagePath = resolveAreaStoragePath(resolvedRoute.cmsPath, area);
@@ -3,7 +3,7 @@ import "server-only";
3
3
  import { isPhiBuilderAreaKey, isPhiCmsAreaKey } from "../constants/cms-areas";
4
4
  import { canPhiViewerAccess, PHI_VIEWER_ACCESS_CONTENT_EDITING, PHI_VIEWER_ACCESS_STRUCTURE_AUTHORING } from "../types/access";
5
5
  import { resolvePhiBuilderActivePageCatalog } from "../helpers/cms-page-catalog";
6
- import { resolvePhiCmsAreaShellPresetBinding, resolvePhiCmsDescriptorCatalog, } from "../plugins/runtime-modules/descriptor-compiler";
6
+ import { resolvePhiCmsAreaBaseShellPresetBinding, resolvePhiCmsDescriptorCatalog, } from "../plugins/runtime-modules/descriptor-compiler";
7
7
  import { buildPhiAreaActivePresetPages } from "../helpers/cms-preset-page-tree";
8
8
  import { buildPhiBuilderPageReferenceTree } from "../helpers/page-reference-tree";
9
9
  import { resolvePhiAreaRouteScope } from "../server-helpers/cms-request";
@@ -43,8 +43,7 @@ export function buildPhiPageReferencesRouteHandler({ loadAreaBridge, }) {
43
43
  }
44
44
  try {
45
45
  const catalog = resolvePhiCmsDescriptorCatalog(bridge.runtimeModuleCatalog);
46
- const shellBinding = resolvePhiCmsAreaShellPresetBinding(catalog, area);
47
- const areaPreset = shellBinding
46
+ const storedArea = resolvePhiCmsAreaBaseShellPresetBinding(catalog, area)
48
47
  ? await getPhiExactSiteArea({
49
48
  path: area === "public" ? "/" : `/${area}`,
50
49
  apiBaseUrl: runtime.apiBaseUrl,
@@ -52,17 +51,13 @@ export function buildPhiPageReferencesRouteHandler({ loadAreaBridge, }) {
52
51
  siteKey: runtime.siteKey,
53
52
  locale,
54
53
  cookieHeader,
55
- sourcePreset: {
56
- ownerModuleId: shellBinding.descriptor.ownerModuleId,
57
- presetKey: shellBinding.descriptor.presetKey,
58
- },
59
54
  })
60
55
  : null;
61
56
  const { routeTable } = resolvePhiAreaRouteScope({
62
57
  runtimeModuleCatalog: bridge.runtimeModuleCatalog,
63
58
  catalog,
64
59
  area,
65
- preset: areaPreset?.preset ?? null,
60
+ read: storedArea,
66
61
  serverCapabilities: requestContext.serverCapabilities,
67
62
  });
68
63
  const persistedPages = await getSiteCmsPageCatalog({