@phis/ui 0.6.11 → 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 (84) 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/widgets/label-sets/region.js +2 -0
  10. package/components/widgets/label-types/region.d.ts +2 -0
  11. package/components/widgets/label-types/region.js +1 -0
  12. package/components/widgets/label-types/revisions.js +2 -2
  13. package/components/workspace/catalog-state.d.ts +17 -1
  14. package/components/workspace/catalog-store.js +1 -0
  15. package/gateway/dashboard-cards-route.js +4 -9
  16. package/gateway/form-handler-resolution.js +10 -34
  17. package/gateway/navigation-target-route.js +4 -10
  18. package/gateway/page-references-route.js +3 -8
  19. package/gateway/site-area.d.ts +43 -6
  20. package/gateway/site-area.js +70 -17
  21. package/helpers/cms-area-config.d.ts +36 -14
  22. package/helpers/cms-area-config.js +72 -26
  23. package/next/seo-routes.js +24 -28
  24. package/package.json +2 -2
  25. package/plugins/runtime-modules/accounting/presets.d.ts +0 -1
  26. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-area-preset-tree.js +0 -2
  27. package/plugins/runtime-modules/admin/presets.d.ts +0 -1
  28. package/plugins/runtime-modules/admin/trees/phi-default-admin-area-preset-tree.js +0 -2
  29. package/plugins/runtime-modules/app/presets.d.ts +0 -1
  30. package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.js +0 -2
  31. package/plugins/runtime-modules/area-definitions.d.ts +17 -0
  32. package/plugins/runtime-modules/area-definitions.js +6 -0
  33. package/plugins/runtime-modules/builder/area-shell-presets.server.d.ts +21 -5
  34. package/plugins/runtime-modules/builder/area-shell-presets.server.js +171 -63
  35. package/plugins/runtime-modules/builder/clients/shells-workspace.js +12 -1
  36. package/plugins/runtime-modules/builder/controller/client.js +2 -0
  37. package/plugins/runtime-modules/builder/controller/definition.d.ts +1 -0
  38. package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +2 -3
  39. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +56 -25
  40. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +13 -7
  41. package/plugins/runtime-modules/builder/controller/server-definition.d.ts +1 -0
  42. package/plugins/runtime-modules/builder/controller/server-definition.js +7 -4
  43. package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +2 -1
  44. package/plugins/runtime-modules/builder/controller/workspace-controller.js +9 -3
  45. package/plugins/runtime-modules/builder/data-providers.d.ts +1 -1
  46. package/plugins/runtime-modules/builder/definition.d.ts +1 -1
  47. package/plugins/runtime-modules/builder/developer-workspace-store.js +1 -0
  48. package/plugins/runtime-modules/builder/page-preset-catalog.server.d.ts +0 -2
  49. package/plugins/runtime-modules/builder/page-preset-catalog.server.js +0 -16
  50. package/plugins/runtime-modules/builder/persistence.d.ts +20 -25
  51. package/plugins/runtime-modules/builder/persistence.js +67 -75
  52. package/plugins/runtime-modules/builder/services/runtime-modules-table.d.ts +17 -0
  53. package/plugins/runtime-modules/builder/services/runtime-modules-table.js +79 -2
  54. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.d.ts +0 -1
  55. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +0 -2
  56. package/plugins/runtime-modules/builder/workspace-catalog-actions.d.ts +2 -1
  57. package/plugins/runtime-modules/builder/workspace-catalog-actions.js +3 -1
  58. package/plugins/runtime-modules/core/widgets/cascader/authoring.d.ts +1 -1
  59. package/plugins/runtime-modules/descriptor-compiler.d.ts +16 -2
  60. package/plugins/runtime-modules/descriptor-compiler.js +69 -13
  61. package/plugins/runtime-modules/editor/services/releases-table.js +26 -14
  62. package/plugins/runtime-modules/editor/trees/phi-default-editor-area-preset-tree.js +0 -2
  63. package/plugins/runtime-modules/groups/definition.d.ts +1 -1
  64. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +0 -2
  65. package/plugins/runtime-modules/revisions/controller/client.js +13 -7
  66. package/plugins/runtime-modules/revisions/services/table.js +10 -3
  67. package/plugins/runtime-modules/shell-tree-composition.d.ts +0 -2
  68. package/plugins/runtime-modules/shell-tree-composition.js +0 -3
  69. package/server-helpers/area-root-door-warmup.d.ts +5 -2
  70. package/server-helpers/area-root-door-warmup.js +2 -10
  71. package/server-helpers/cms-area.d.ts +9 -1
  72. package/server-helpers/cms-area.js +16 -11
  73. package/server-helpers/cms-lookup.js +1 -1
  74. package/server-helpers/cms-request.d.ts +58 -13
  75. package/server-helpers/cms-request.js +103 -33
  76. package/server-helpers/cms-root.d.ts +4 -0
  77. package/server-helpers/cms-root.js +48 -35
  78. package/server-helpers/cms.d.ts +5 -5
  79. package/server-helpers/public-login-route.js +4 -9
  80. package/server-helpers/search-index.js +9 -14
  81. package/styles/shell.css +12 -0
  82. package/types/cms-module-descriptors.d.ts +26 -1
  83. package/types/cms-plugins.d.ts +3 -0
  84. package/types/cms.d.ts +10 -3
@@ -1,8 +1,8 @@
1
1
  import { type PhiHistoryLabels } from "../../../../components/widgets/label-types/history";
2
2
  import type { PhiBuilderSavedHistoryHead } from "./draft-status-controller";
3
- import type { PhiDeveloperBuilderArea, PhiDeveloperBuilderRegionDraft, PhiDeveloperBuilderWorkspaceState } from "../developer-workspace-types";
3
+ import type { PhiDeveloperBuilderArea, PhiDeveloperBuilderWorkspaceState } from "../developer-workspace-types";
4
4
  export type PhiDeveloperBuilderToolbarCommand = "save" | "preview" | "publish" | "undo" | "redo" | "reset";
5
- export declare function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNavKey, effectivePageKey, pathname, captureHistoryHead, reportSaved, hasUnsavedChanges, shellPresetDraftsByArea, state, historyLabels, }: {
5
+ export declare function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNavKey, effectivePageKey, pathname, captureHistoryHead, reportSaved, hasUnsavedChanges, state, historyLabels, }: {
6
6
  effectiveArea: PhiDeveloperBuilderArea;
7
7
  effectiveNavKey: string;
8
8
  effectivePageKey: string;
@@ -13,7 +13,6 @@ export declare function usePhiBuilderDraftCommandController({ effectiveArea, eff
13
13
  reportSaved: (status: "draft" | "published", revisionId: number | null, savedAt: PhiBuilderSavedHistoryHead) => void;
14
14
  /** Whether the workspace on screen holds edits no stored revision has. */
15
15
  hasUnsavedChanges: boolean;
16
- shellPresetDraftsByArea: Record<string, Record<string, PhiDeveloperBuilderRegionDraft>>;
17
16
  state: PhiDeveloperBuilderWorkspaceState;
18
17
  /** What an undo or redo says it moved, in the author's language. */
19
18
  historyLabels: PhiHistoryLabels;
@@ -9,7 +9,7 @@ import { getPhiBuilderPageDraftKey } from "../region-keys";
9
9
  import { resolvePhiBuilderCmsStoragePath } from "../../../../helpers/cms-paths";
10
10
  import { resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, resolvePhiBuilderPagePresetSource, } from "../../../../helpers/cms-page-catalog";
11
11
  import { deleteCmsDraft } from "../../../../helpers/cms-draft-delete";
12
- import { buildPhiBuilderLiveHref, clearPhiDeveloperBuilderDraftAllocation, createPhiDeveloperBuilderInitialPageDrafts, getPhiDeveloperBuilderModulesDraftAllocation, savePhiDeveloperBuilderModulesDraft, publishPhiDeveloperBuilderModulesDraft, previewPhiDeveloperBuilderDraft, publishPhiDeveloperBuilderDraft, savePhiDeveloperBuilderDraft, } from "../persistence";
12
+ import { buildPhiBuilderLiveHref, clearPhiDeveloperBuilderDraftAllocation, createPhiDeveloperBuilderInitialPageDrafts, getPhiDeveloperBuilderModulesDraftAllocation, savePhiDeveloperBuilderModulesDraft, publishPhiDeveloperBuilderModulesDraft, previewPhiDeveloperBuilderDraft, publishPhiDeveloperBuilderDraft, savePhiDeveloperBuilderDraft, PhiBuilderAreaStructureTakenError, } from "../persistence";
13
13
  import { clearPhiBuilderNavigationDraft, getPhiBuilderNavigationDraftSnapshot, updatePhiBuilderNavigationDraft, restorePhiBuilderNavigationDraft, setPhiBuilderNavigationDraft, } from "../navigation-store";
14
14
  import { deletePhiBuilderNavigationDraft, loadPhiBuilderNavigationDraft, loadPhiBuilderNavigationScope, publishPhiBuilderNavigationDraft, savePhiBuilderNavigationDraft, } from "../navigation-persistence";
15
15
  import { clearPhiBuilderModuleAreasDirty, getPhiDeveloperRegionDraftsSnapshot, markPhiBuilderPageDeleted, restorePhiBuilderWorkspaceState, mergePhiDeveloperRegionDrafts, restorePhiDeveloperBuilderAreaMeta, restorePhiDeveloperRegionDrafts, setPhiDeveloperBuilderAreaRootRoute, } from "../developer-workspace-store";
@@ -19,7 +19,7 @@ import { usePhiBuilderModuleMetas } from "../plugin-meta-store";
19
19
  import { setPhiWorkspaceModuleSelection } from "../workspace-catalog-actions";
20
20
  import { applyPhiBuilderNavigationFolderTargets, refreshPhiBuilderNavigationFolderAddresses, } from "../navigation-folder-address";
21
21
  import { createPhiBuilderNavigationPathContext } from "../navigation-path-context";
22
- export function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNavKey, effectivePageKey, pathname, captureHistoryHead, reportSaved, hasUnsavedChanges, shellPresetDraftsByArea, state, historyLabels, }) {
22
+ export function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNavKey, effectivePageKey, pathname, captureHistoryHead, reportSaved, hasUnsavedChanges, state, historyLabels, }) {
23
23
  /*
24
24
  * Every one of these is a command from a toolbar somewhere else, so there is nothing on screen to
25
25
  * hang a Popconfirm on. Drawn as a Dialog by this Controller rather than asked of Ant Design's
@@ -126,12 +126,9 @@ export function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNa
126
126
  * Asked side by side, and a failed read is the command's failure: taking it for "no draft" told the
127
127
  * author there was nothing to publish while a draft stood.
128
128
  */
129
- const asked = await Promise.all(Object.entries(state.areaPresetSourcesByArea).flatMap(([area, source]) => source
130
- ? [getPhiDeveloperBuilderModulesDraftAllocation({
131
- area: area,
132
- areaPresetSource: source,
133
- }).then((allocation) => allocation ? area : null)]
134
- : []));
129
+ const asked = await Promise.all(Object.keys(state.areaPresetSourcesByArea).map((area) => getPhiDeveloperBuilderModulesDraftAllocation({
130
+ area: area,
131
+ }).then((allocation) => allocation ? area : null)));
135
132
  return asked.filter((area) => area !== null);
136
133
  }
137
134
  async function runSaveCommand(workspaceKind) {
@@ -144,18 +141,7 @@ export function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNa
144
141
  const savedAt = captureHistoryHead();
145
142
  let lastRevisionId = null;
146
143
  for (const area of areas) {
147
- const modulesResult = await savePhiDeveloperBuilderModulesDraft(state, getPhiDeveloperRegionDraftsSnapshot(), {
148
- builderPlugins: builderModuleMetas.plugins,
149
- scope: { area },
150
- /*
151
- * The Area's code-owned Shell, which this controller holds on every Builder page -- the same
152
- * drafts "reset shell" restores from. A Module selection for an Area nobody has saved yet
153
- * needs a Shell baseline, and the Modules workspace hydrates no region drafts of its own: it
154
- * edits a selection rather than a structure. Without this the save asked the operator to go
155
- * and create a Shell that already exists in code.
156
- */
157
- shellPresetDrafts: shellPresetDraftsByArea[area] ?? null,
158
- });
144
+ const modulesResult = await savePhiDeveloperBuilderModulesDraft(state, { scope: { area } });
159
145
  lastRevisionId = modulesResult.revisionId;
160
146
  }
161
147
  reportSaved("draft", lastRevisionId, savedAt);
@@ -206,11 +192,7 @@ export function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNa
206
192
  }
207
193
  const savedAt = captureHistoryHead();
208
194
  for (const area of areas) {
209
- await publishPhiDeveloperBuilderModulesDraft(state, getPhiDeveloperRegionDraftsSnapshot(), {
210
- builderPlugins: builderModuleMetas.plugins,
211
- scope: { area },
212
- shellPresetDrafts: shellPresetDraftsByArea[area] ?? null,
213
- });
195
+ await publishPhiDeveloperBuilderModulesDraft(state, { scope: { area } });
214
196
  }
215
197
  clearPhiBuilderModuleAreasDirty();
216
198
  reportSaved("published", null, savedAt);
@@ -465,6 +447,51 @@ export function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNa
465
447
  },
466
448
  });
467
449
  }
450
+ /**
451
+ * A structure save Core refused because the Area stores its one structure under another shell -- the
452
+ * base shell's, saved before a Module that brings its own was switched on. The stored structure is
453
+ * cleared only when asked, and the Module selection stays; then the command runs again.
454
+ */
455
+ function confirmClearStoredStructure(error, command, workspaceKind) {
456
+ confirm({
457
+ title: "Clear the stored structure?",
458
+ content: `${error.message} Clearing removes the structure saved for that shell, with its drafts and ` +
459
+ "revisions, and changes nothing live while that shell is not the one the Area takes. Then this " +
460
+ "structure is saved.",
461
+ confirmLabel: "Clear and save",
462
+ danger: true,
463
+ cancelLabel: "Cancel",
464
+ onConfirm: async () => {
465
+ if (activeDraftActionRef.current != null) {
466
+ return;
467
+ }
468
+ setActiveDraftAction(command);
469
+ try {
470
+ await deleteCmsDraft("/api/site/cms/area/override", {
471
+ area: error.area,
472
+ ownerModuleId: error.storedSource.ownerModuleId,
473
+ presetKey: error.storedSource.presetKey,
474
+ });
475
+ clearPhiDeveloperBuilderDraftAllocation({
476
+ area: error.area,
477
+ pageKey: effectivePageKey,
478
+ workspaceKind: "structure",
479
+ });
480
+ await (command === "save" ? runSaveCommand(workspaceKind) : runPublishCommand(workspaceKind));
481
+ }
482
+ catch (retryError) {
483
+ showMessage({
484
+ level: "error",
485
+ content: retryError instanceof Error ? retryError.message : "Clearing the stored structure failed.",
486
+ });
487
+ throw retryError;
488
+ }
489
+ finally {
490
+ setActiveDraftAction(null);
491
+ }
492
+ },
493
+ });
494
+ }
468
495
  function runResetCommand(workspaceKind) {
469
496
  if (workspaceKind === "structure" || workspaceKind === "pages") {
470
497
  confirmDiscardDraft(workspaceKind);
@@ -555,6 +582,10 @@ export function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNa
555
582
  : runPreviewCommand(workspaceKind);
556
583
  action
557
584
  .catch((error) => {
585
+ if (error instanceof PhiBuilderAreaStructureTakenError && (command === "save" || command === "publish")) {
586
+ confirmClearStoredStructure(error, command, workspaceKind);
587
+ return;
588
+ }
558
589
  const fallback = command === "save"
559
590
  ? "CMS draft save failed."
560
591
  : command === "publish"
@@ -39,6 +39,18 @@ function resolveTarget(workspace, area, pageKey, navKey, state) {
39
39
  if (!state.catalogHydrated) {
40
40
  return null;
41
41
  }
42
+ /*
43
+ * The Module selection has its own Draft, stored apart from the structure and naming no shell, so it
44
+ * reports its own status: asking the structure endpoint here would show the shell's Draft on a page
45
+ * that cannot save one. The structure's Draft is asked under the shell the Area takes.
46
+ */
47
+ if (workspace === "modules") {
48
+ return {
49
+ url: `/api/site/cms/area/modules/draft?${new URLSearchParams({ area }).toString()}`,
50
+ subject: area === "public" ? "/" : `${area}/`,
51
+ historyContext: createPhiBuilderHistoryContext({ workspace }),
52
+ };
53
+ }
42
54
  const sourcePreset = state.areaPresetSourcesByArea[area] ?? null;
43
55
  if (!sourcePreset) {
44
56
  throw new Error(`Builder target Area "${area}" has no source preset identity.`);
@@ -48,14 +60,8 @@ function resolveTarget(workspace, area, pageKey, navKey, state) {
48
60
  ownerModuleId: sourcePreset.ownerModuleId,
49
61
  presetKey: sourcePreset.presetKey,
50
62
  }).toString();
51
- /*
52
- * The Module selection has its own Draft on the same Area revision, so it reports its own status:
53
- * asking the structure endpoint here would show the shell's Draft on a page that cannot save one.
54
- */
55
63
  return {
56
- url: workspace === "modules"
57
- ? `/api/site/cms/area/modules/draft?${query}`
58
- : `/api/site/cms/area/draft?${query}`,
64
+ url: `/api/site/cms/area/draft?${query}`,
59
65
  subject: area === "public" ? "/" : `${area}/`,
60
66
  historyContext: createPhiBuilderHistoryContext({ workspace, area }),
61
67
  };
@@ -20,6 +20,7 @@ export declare const PHI_BUILDER_RUNTIME_CONTROLLER_SERVER_DEFINITION: {
20
20
  areaControllerSettingsByArea: Record<string, import("../../../../types/cms").PhiCmsTreeControllerSettings>;
21
21
  modulePresetPagesByArea: import("../../../../helpers/cms-page-catalog").PhiBuilderModulePresetPagesByArea;
22
22
  areaPresetSourcesByArea: Partial<Record<"public" | "app" | "admin" | "builder" | "editor" | "accounting", import("../../../../types").PhiCmsPresetSource>>;
23
+ areaShellsByArea: Partial<Record<"public" | "app" | "admin" | "builder" | "editor" | "accounting", import("../../../../components/workspace/catalog-state").PhiWorkspaceAreaShellState>>;
23
24
  navigationSurfacesByArea: Partial<Record<"public" | "app" | "admin" | "builder" | "editor" | "accounting", readonly import("../../../../types/cms-module-descriptors").PhiCmsResolvedNavigationSurface[]>>;
24
25
  pageMetaLabels: {
25
26
  createTitle: string;
@@ -1,7 +1,7 @@
1
1
  import "server-only";
2
2
  import { PHI_BUILDER_RUNTIME_CONTROLLER_DEFINITION, } from "./definition";
3
- import { buildPhiBuilderAreaRootRoutesByArea, buildPhiBuilderAreaMetaByArea, buildPhiBuilderAreaControllerSettingsByArea, buildPhiBuilderPublicRoutePaths, buildPhiBuilderPublishedRuntimeModuleIdsForArea, buildPhiBuilderStructureRuntimeModuleIdsByArea, buildPhiBuilderUnresolvedRuntimeModuleIdsByArea, buildPhiBuilderStructureShellPresetDraftsByArea, } from "../area-shell-presets.server";
4
- import { buildPhiBuilderAreaPresetSourcesByArea, buildPhiBuilderModulePresetPagesByArea, buildPhiBuilderPublicRouteClaims, } from "../page-preset-catalog.server";
3
+ import { buildPhiBuilderAreaPresetSourcesByArea, buildPhiBuilderAreaRootRoutesByArea, buildPhiBuilderAreaMetaByArea, buildPhiBuilderAreaShellsByArea, buildPhiBuilderAreaControllerSettingsByArea, buildPhiBuilderPublicRoutePaths, buildPhiBuilderPublishedRuntimeModuleIdsForArea, buildPhiBuilderStructureRuntimeModuleIdsByArea, buildPhiBuilderUnresolvedRuntimeModuleIdsByArea, buildPhiBuilderStructureShellPresetDraftsByArea, } from "../area-shell-presets.server";
4
+ import { buildPhiBuilderModulePresetPagesByArea, buildPhiBuilderPublicRouteClaims, } from "../page-preset-catalog.server";
5
5
  import { buildPhiBuilderNavigationSurfacesByArea } from "../navigation-catalog.server";
6
6
  import { PHI_BUILDER_AREA_SEARCH_PARAM, PHI_BUILDER_RUNTIME_MODULES_SEARCH_PARAM, normalizePhiBuilderAreaSearchParam, normalizePhiBuilderRuntimeModuleIdsSearchParam, } from "../../../../helpers/cms-scope-search-params";
7
7
  import { resolvePhiRuntimeModuleIdsForArea } from "../../../../plugins/runtime-modules/settings";
@@ -13,7 +13,7 @@ import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/wid
13
13
  export const PHI_BUILDER_RUNTIME_CONTROLLER_SERVER_DEFINITION = {
14
14
  ...PHI_BUILDER_RUNTIME_CONTROLLER_DEFINITION,
15
15
  serverPreload: async ({ runtime, runtimeModuleCatalog, serverCapabilities }) => {
16
- const [shellPresetDraftsByArea, runtimeModuleIdsByArea, unresolvedModuleIdsByArea, publicRoutePaths, areaRootRoutesByArea, areaMetaByArea, areaControllerSettingsByArea, builderLabels, historyLabels, livePublicModuleIds,] = await Promise.all([
16
+ const [shellPresetDraftsByArea, runtimeModuleIdsByArea, unresolvedModuleIdsByArea, publicRoutePaths, areaRootRoutesByArea, areaMetaByArea, areaControllerSettingsByArea, builderLabels, historyLabels, livePublicModuleIds, areaPresetSourcesByArea, areaShellsByArea,] = await Promise.all([
17
17
  buildPhiBuilderStructureShellPresetDraftsByArea(runtime, runtimeModuleCatalog),
18
18
  buildPhiBuilderStructureRuntimeModuleIdsByArea(runtime, runtimeModuleCatalog),
19
19
  buildPhiBuilderUnresolvedRuntimeModuleIdsByArea(runtime, runtimeModuleCatalog),
@@ -24,6 +24,8 @@ export const PHI_BUILDER_RUNTIME_CONTROLLER_SERVER_DEFINITION = {
24
24
  getPhiBuilderChromeWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime)),
25
25
  getPhiHistoryLabels(buildPhiWidgetLabelTranslatorOptions(runtime)),
26
26
  buildPhiBuilderPublishedRuntimeModuleIdsForArea(runtime, "public", runtimeModuleCatalog),
27
+ buildPhiBuilderAreaPresetSourcesByArea(runtime, runtimeModuleCatalog),
28
+ buildPhiBuilderAreaShellsByArea(runtime, runtimeModuleCatalog),
27
29
  ]);
28
30
  const requestedArea = normalizePhiBuilderAreaSearchParam(runtime.request?.searchParams?.[PHI_BUILDER_AREA_SEARCH_PARAM]);
29
31
  const requestedModuleIds = normalizePhiBuilderRuntimeModuleIdsSearchParam(runtime.request?.searchParams?.[PHI_BUILDER_RUNTIME_MODULES_SEARCH_PARAM]);
@@ -66,7 +68,8 @@ export const PHI_BUILDER_RUNTIME_CONTROLLER_SERVER_DEFINITION = {
66
68
  areaMetaByArea,
67
69
  areaControllerSettingsByArea,
68
70
  modulePresetPagesByArea: buildPhiBuilderModulePresetPagesByArea(runtimeModuleCatalog),
69
- areaPresetSourcesByArea: buildPhiBuilderAreaPresetSourcesByArea(runtimeModuleCatalog),
71
+ areaPresetSourcesByArea,
72
+ areaShellsByArea,
70
73
  navigationSurfacesByArea: await buildPhiBuilderNavigationSurfacesByArea(runtime, runtimeModuleCatalog, effectiveRuntimeModuleIdsByArea),
71
74
  pageMetaLabels: {
72
75
  createTitle: builderLabels.pages.newPage,
@@ -13,6 +13,7 @@ export type PhiDeveloperBuilderWorkspaceControllerProps = {
13
13
  runtimeModuleIdsByArea?: Record<string, PhiRuntimeModuleId[]>;
14
14
  modulePresetPagesByArea?: PhiWorkspaceCatalogState["modulePresetPagesByArea"];
15
15
  areaPresetSourcesByArea?: PhiWorkspaceCatalogState["areaPresetSourcesByArea"];
16
+ areaShellsByArea?: PhiWorkspaceCatalogState["areaShellsByArea"];
16
17
  navigationSurfacesByArea?: PhiWorkspaceCatalogState["navigationSurfacesByArea"];
17
18
  unresolvedModuleIdsByArea?: PhiWorkspaceCatalogState["unresolvedModuleIdsByArea"];
18
19
  serverUnavailableModules?: PhiWorkspaceCatalogState["serverUnavailableModules"];
@@ -26,4 +27,4 @@ export type PhiDeveloperBuilderWorkspaceControllerProps = {
26
27
  historyLabels: PhiHistoryLabels;
27
28
  signalRoutes?: PhiSignalRouteSet | null;
28
29
  };
29
- export declare function PhiDeveloperBuilderWorkspaceController({ shellPresetDraftsByArea, runtimeModuleDefinitions, runtimeModuleIdsByArea, modulePresetPagesByArea, areaPresetSourcesByArea, navigationSurfacesByArea, unresolvedModuleIdsByArea, serverUnavailableModules, publicRouteClaims, publicRoutePaths, areaRootRoutesByArea, areaMetaByArea, areaControllerSettingsByArea, pageMetaLabels, historyLabels, signalRoutes, }: PhiDeveloperBuilderWorkspaceControllerProps): import("react").JSX.Element;
30
+ export declare function PhiDeveloperBuilderWorkspaceController({ shellPresetDraftsByArea, runtimeModuleDefinitions, runtimeModuleIdsByArea, modulePresetPagesByArea, areaPresetSourcesByArea, areaShellsByArea, navigationSurfacesByArea, unresolvedModuleIdsByArea, serverUnavailableModules, publicRouteClaims, publicRoutePaths, areaRootRoutesByArea, areaMetaByArea, areaControllerSettingsByArea, pageMetaLabels, historyLabels, signalRoutes, }: PhiDeveloperBuilderWorkspaceControllerProps): import("react").JSX.Element;
@@ -48,6 +48,7 @@ import { PHI_BUILDER_PAGE_META_DEFAULT_PRESENTATION_LABELS, resolvePhiBuilderEff
48
48
  import { formatPhiHistoryTooltip, } from "../../../../components/widgets/label-types/history";
49
49
  const EMPTY_RUNTIME_MODULE_IDS_BY_AREA = {};
50
50
  const EMPTY_SERVER_UNAVAILABLE_MODULES = {};
51
+ const EMPTY_AREA_SHELLS = {};
51
52
  const EMPTY_MODULE_PRESET_PAGES_BY_AREA = createEmptyPhiBuilderModulePresetPagesByArea();
52
53
  const EMPTY_PUBLIC_ROUTE_CLAIMS = [];
53
54
  const EMPTY_PUBLIC_ROUTE_PATHS = [];
@@ -129,7 +130,7 @@ function usePhiDeveloperBuilderWorkspaceController(options) {
129
130
  const effectsWorkflowCorrelationRef = useRef(null);
130
131
  const initializedEffectsCorrelationRef = useRef(null);
131
132
  const effectsFormSubmissionRef = useRef(null);
132
- const { shellPresetDraftsByArea = {}, runtimeModuleDefinitions = [], runtimeModuleIdsByArea = {}, modulePresetPagesByArea = EMPTY_MODULE_PRESET_PAGES_BY_AREA, areaPresetSourcesByArea = {}, navigationSurfacesByArea = {}, unresolvedModuleIdsByArea = EMPTY_RUNTIME_MODULE_IDS_BY_AREA, serverUnavailableModules = EMPTY_SERVER_UNAVAILABLE_MODULES, publicRouteClaims = EMPTY_PUBLIC_ROUTE_CLAIMS, publicRoutePaths = EMPTY_PUBLIC_ROUTE_PATHS, areaRootRoutesByArea = EMPTY_AREA_ROOT_ROUTES, areaMetaByArea = EMPTY_AREA_META, areaControllerSettingsByArea = EMPTY_AREA_CONTROLLER_SETTINGS, pageMetaLabels = PHI_BUILDER_PAGE_META_DEFAULT_PRESENTATION_LABELS, historyLabels, signalRoutes = null, } = options;
133
+ const { shellPresetDraftsByArea = {}, runtimeModuleDefinitions = [], runtimeModuleIdsByArea = {}, modulePresetPagesByArea = EMPTY_MODULE_PRESET_PAGES_BY_AREA, areaPresetSourcesByArea = {}, areaShellsByArea = EMPTY_AREA_SHELLS, navigationSurfacesByArea = {}, unresolvedModuleIdsByArea = EMPTY_RUNTIME_MODULE_IDS_BY_AREA, serverUnavailableModules = EMPTY_SERVER_UNAVAILABLE_MODULES, publicRouteClaims = EMPTY_PUBLIC_ROUTE_CLAIMS, publicRoutePaths = EMPTY_PUBLIC_ROUTE_PATHS, areaRootRoutesByArea = EMPTY_AREA_ROOT_ROUTES, areaMetaByArea = EMPTY_AREA_META, areaControllerSettingsByArea = EMPTY_AREA_CONTROLLER_SETTINGS, pageMetaLabels = PHI_BUILDER_PAGE_META_DEFAULT_PRESENTATION_LABELS, historyLabels, signalRoutes = null, } = options;
133
134
  /*
134
135
  * One declared output, delivered through every route written for it.
135
136
  *
@@ -185,7 +186,6 @@ function usePhiDeveloperBuilderWorkspaceController(options) {
185
186
  captureHistoryHead,
186
187
  hasUnsavedChanges,
187
188
  reportSaved,
188
- shellPresetDraftsByArea,
189
189
  state,
190
190
  historyLabels,
191
191
  });
@@ -205,6 +205,7 @@ function usePhiDeveloperBuilderWorkspaceController(options) {
205
205
  const runtimeModuleDefinitionsPreloadKey = useMemo(() => serializeRuntimeModuleDefinitions(runtimeModuleDefinitions), [runtimeModuleDefinitions]);
206
206
  const modulePresetPagesPreloadKey = useMemo(() => JSON.stringify(activePreloadCatalogs.modulePresetPagesByArea), [activePreloadCatalogs.modulePresetPagesByArea]);
207
207
  const areaPresetSourcesPreloadKey = useMemo(() => JSON.stringify(areaPresetSourcesByArea), [areaPresetSourcesByArea]);
208
+ const areaShellsPreloadKey = useMemo(() => JSON.stringify(areaShellsByArea), [areaShellsByArea]);
208
209
  const navigationSurfacesPreloadKey = useMemo(() => JSON.stringify(activePreloadCatalogs.navigationSurfacesByArea), [activePreloadCatalogs.navigationSurfacesByArea]);
209
210
  const unresolvedModuleIdsPreloadKey = useMemo(() => JSON.stringify(unresolvedModuleIdsByArea), [unresolvedModuleIdsByArea]);
210
211
  const publicRouteClaimsPreloadKey = useMemo(() => JSON.stringify(publicRouteClaims), [publicRouteClaims]);
@@ -434,6 +435,7 @@ function usePhiDeveloperBuilderWorkspaceController(options) {
434
435
  runtimeModuleDefinitions,
435
436
  runtimeModuleIdsByArea,
436
437
  areaPresetSourcesByArea,
438
+ areaShellsByArea,
437
439
  unresolvedModuleIdsByArea,
438
440
  serverUnavailableModules,
439
441
  publicRouteClaims,
@@ -443,6 +445,7 @@ function usePhiDeveloperBuilderWorkspaceController(options) {
443
445
  runtimeModuleDefinitions: runtimeModuleDefinitionsPreloadKey,
444
446
  modulePresetPagesByArea: modulePresetPagesPreloadKey,
445
447
  areaPresetSourcesByArea: areaPresetSourcesPreloadKey,
448
+ areaShellsByArea: areaShellsPreloadKey,
446
449
  navigationSurfacesByArea: navigationSurfacesPreloadKey,
447
450
  unresolvedModuleIdsByArea: unresolvedModuleIdsPreloadKey,
448
451
  publicRouteClaims: publicRouteClaimsPreloadKey,
@@ -472,6 +475,8 @@ function usePhiDeveloperBuilderWorkspaceController(options) {
472
475
  publicRoutePathsPreloadKey,
473
476
  areaPresetSourcesByArea,
474
477
  areaPresetSourcesPreloadKey,
478
+ areaShellsByArea,
479
+ areaShellsPreloadKey,
475
480
  activePreloadCatalogs,
476
481
  navigationSurfacesByArea,
477
482
  navigationSurfacesPreloadKey,
@@ -1439,13 +1444,14 @@ function usePhiDeveloperBuilderWorkspaceController(options) {
1439
1444
  */
1440
1445
  return _jsxs(_Fragment, { children: [pageMetaDialog, confirmDialog] });
1441
1446
  }
1442
- export function PhiDeveloperBuilderWorkspaceController({ shellPresetDraftsByArea = {}, runtimeModuleDefinitions = [], runtimeModuleIdsByArea = {}, modulePresetPagesByArea = EMPTY_MODULE_PRESET_PAGES_BY_AREA, areaPresetSourcesByArea = {}, navigationSurfacesByArea = {}, unresolvedModuleIdsByArea = EMPTY_RUNTIME_MODULE_IDS_BY_AREA, serverUnavailableModules = EMPTY_SERVER_UNAVAILABLE_MODULES, publicRouteClaims = EMPTY_PUBLIC_ROUTE_CLAIMS, publicRoutePaths = EMPTY_PUBLIC_ROUTE_PATHS, areaRootRoutesByArea = EMPTY_AREA_ROOT_ROUTES, areaMetaByArea = EMPTY_AREA_META, areaControllerSettingsByArea = EMPTY_AREA_CONTROLLER_SETTINGS, pageMetaLabels = PHI_BUILDER_PAGE_META_DEFAULT_PRESENTATION_LABELS, historyLabels, signalRoutes = null, }) {
1447
+ export function PhiDeveloperBuilderWorkspaceController({ shellPresetDraftsByArea = {}, runtimeModuleDefinitions = [], runtimeModuleIdsByArea = {}, modulePresetPagesByArea = EMPTY_MODULE_PRESET_PAGES_BY_AREA, areaPresetSourcesByArea = {}, areaShellsByArea = EMPTY_AREA_SHELLS, navigationSurfacesByArea = {}, unresolvedModuleIdsByArea = EMPTY_RUNTIME_MODULE_IDS_BY_AREA, serverUnavailableModules = EMPTY_SERVER_UNAVAILABLE_MODULES, publicRouteClaims = EMPTY_PUBLIC_ROUTE_CLAIMS, publicRoutePaths = EMPTY_PUBLIC_ROUTE_PATHS, areaRootRoutesByArea = EMPTY_AREA_ROOT_ROUTES, areaMetaByArea = EMPTY_AREA_META, areaControllerSettingsByArea = EMPTY_AREA_CONTROLLER_SETTINGS, pageMetaLabels = PHI_BUILDER_PAGE_META_DEFAULT_PRESENTATION_LABELS, historyLabels, signalRoutes = null, }) {
1443
1448
  const controller = usePhiDeveloperBuilderWorkspaceController({
1444
1449
  shellPresetDraftsByArea,
1445
1450
  runtimeModuleDefinitions,
1446
1451
  runtimeModuleIdsByArea,
1447
1452
  modulePresetPagesByArea,
1448
1453
  areaPresetSourcesByArea,
1454
+ areaShellsByArea,
1449
1455
  navigationSurfacesByArea,
1450
1456
  unresolvedModuleIdsByArea,
1451
1457
  serverUnavailableModules,
@@ -451,7 +451,7 @@ export declare const PHI_BUILDER_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
451
451
  };
452
452
  dropTargets: {
453
453
  payloadType: "@phis/builder-navigation-page";
454
- modes: ("after" | "before" | "child" | "append")[];
454
+ modes: ("before" | "after" | "child" | "append")[];
455
455
  }[];
456
456
  }[];
457
457
  } | {
@@ -454,7 +454,7 @@ export declare const PHI_BUILDER_RUNTIME_MODULE_DEFINITION: Omit<{
454
454
  };
455
455
  dropTargets: {
456
456
  payloadType: "@phis/builder-navigation-page";
457
- modes: ("after" | "before" | "child" | "append")[];
457
+ modes: ("before" | "after" | "child" | "append")[];
458
458
  }[];
459
459
  }[];
460
460
  } | {
@@ -220,6 +220,7 @@ const PHI_WORKSPACE_CATALOG_KEYS = [
220
220
  "persistedPageCatalogByArea",
221
221
  "navigationSurfacesByArea",
222
222
  "areaPresetSourcesByArea",
223
+ "areaShellsByArea",
223
224
  "runtimeModuleDefinitions",
224
225
  "runtimeModuleIdsByArea",
225
226
  "unresolvedModuleIdsByArea",
@@ -1,7 +1,6 @@
1
1
  import "server-only";
2
2
  import type { PhiRuntimeModuleCatalog } from "../../../types";
3
3
  import type { PhiBuilderModulePresetPagesByArea } from "../../../helpers/cms-page-catalog";
4
- import type { PhiCmsPresetSource } from "../../../types/cms-module-descriptors";
5
4
  import type { PhiPublicRouteClaim } from "../../../helpers/public-route-claims";
6
5
  export declare function buildPhiBuilderModulePresetPagesByArea(runtimeModuleCatalog: PhiRuntimeModuleCatalog): PhiBuilderModulePresetPagesByArea;
7
6
  /**
@@ -12,4 +11,3 @@ export declare function buildPhiBuilderModulePresetPagesByArea(runtimeModuleCata
12
11
  * its switch. Which of them currently answer is decided elsewhere, from the active set.
13
12
  */
14
13
  export declare function buildPhiBuilderPublicRouteClaims(runtimeModuleCatalog: PhiRuntimeModuleCatalog): PhiPublicRouteClaim[];
15
- export declare function buildPhiBuilderAreaPresetSourcesByArea(runtimeModuleCatalog: PhiRuntimeModuleCatalog): Partial<Record<"public" | "app" | "admin" | "builder" | "editor" | "accounting", PhiCmsPresetSource>>;
@@ -48,19 +48,3 @@ export function buildPhiBuilderPublicRouteClaims(runtimeModuleCatalog) {
48
48
  }
49
49
  return claims;
50
50
  }
51
- export function buildPhiBuilderAreaPresetSourcesByArea(runtimeModuleCatalog) {
52
- const sources = {};
53
- const catalog = resolvePhiCmsDescriptorCatalog(runtimeModuleCatalog);
54
- for (const { descriptor } of catalog.areaShellByArea.values()) {
55
- const area = resolveBuilderArea(descriptor.area);
56
- if (!area) {
57
- continue;
58
- }
59
- sources[area] = {
60
- ownerModuleId: descriptor.ownerModuleId,
61
- presetKey: descriptor.presetKey,
62
- sourcePresetVersion: descriptor.shellPresetVersion,
63
- };
64
- }
65
- return sources;
66
- }
@@ -3,7 +3,7 @@ import { type PhiCmsInstanceId } from "../../../types/cms-instance-id";
3
3
  import type { PhiDeveloperBuilderArea, PhiDeveloperBuilderRegionDraft, PhiDeveloperBuilderWorkspaceState } from "./developer-workspace-types";
4
4
  import type { PhiCmsWidgetContentBinding } from "../../../types/cms-plugins";
5
5
  import { type PhiPresetPageNode } from "../../../helpers/cms-page-catalog";
6
- import type { PhiCmsPresetSource } from "../../../types/cms-module-descriptors";
6
+ import type { PhiCmsPresetIdentity, PhiCmsPresetSource } from "../../../types/cms-module-descriptors";
7
7
  import type { PhiBuilderPluginMeta, PhiBuilderWidgetMeta } from "../../../types/builder";
8
8
  export type SerializedRoot = {
9
9
  rootLayoutNodeId: PhiCmsInstanceId;
@@ -13,6 +13,17 @@ export type SerializedRoot = {
13
13
  }>;
14
14
  };
15
15
  export type PhiDeveloperBuilderWorkspaceKind = "structure" | "pages";
16
+ /**
17
+ * A structure save under the Area's effective shell while the Area stores its one structure under
18
+ * another shell's identity -- the base shell's, typically, saved before a Module that brings its own was
19
+ * switched on. Core keeps one structure per Area and refuses the save (409); the stored one has to be
20
+ * cleared first ("Clear Area" in Revisions), and the Module selection survives that.
21
+ */
22
+ export declare class PhiBuilderAreaStructureTakenError extends Error {
23
+ readonly area: PhiDeveloperBuilderArea;
24
+ readonly storedSource: PhiCmsPresetIdentity;
25
+ constructor(area: PhiDeveloperBuilderArea, storedSource: PhiCmsPresetIdentity);
26
+ }
16
27
  /**
17
28
  * Creating a Page at a path a Page already holds. The server wrote nothing; the Builder opens the Page
18
29
  * that is there instead of the blank one it meant to create.
@@ -55,7 +66,6 @@ export declare function getPhiDeveloperBuilderDraftAllocation(input: {
55
66
  /** The Area's open Module draft, if the Builder does not already have it cached. */
56
67
  export declare function getPhiDeveloperBuilderModulesDraftAllocation(input: {
57
68
  area: PhiDeveloperBuilderArea;
58
- areaPresetSource: PhiCmsPresetSource | null;
59
69
  }): Promise<{
60
70
  revisionId: number;
61
71
  version: number;
@@ -65,46 +75,31 @@ export declare function getPhiDeveloperBuilderModulesDraftAllocation(input: {
65
75
  /**
66
76
  * Saves an Area's Module selection, apart from its structure.
67
77
  *
68
- * It patches rather than writes: the server clones the source revision -- the open Module draft, or
69
- * otherwise the published one -- and replaces only `preset.config.modules`. There is one case that source can be
70
- * missing: an Area that has never been saved at all, still running on its code-owned Shell preset. The
71
- * server asks for that preset as `baseline` when it hits exactly that case, and only then; the Builder
72
- * already has it loaded (every `/builder/*` page does, regardless of which one is open), so this is the
73
- * one path along which a Module save reaches into Shell region drafts at all.
74
- *
75
- * Which is why the Shell preset is a second source here. The region drafts hold what a workspace has
76
- * *hydrated*, and the Modules workspace hydrates none: it edits a selection, not a structure. Building
77
- * the baseline from those alone therefore worked on the Shells page and nowhere else, and an operator
78
- * activating a Module for a fresh Area was told to go and create a Shell first -- for a Shell that
79
- * already exists in code and that they were not going to change. The preset fills whatever the drafts
80
- * do not hold, and an open draft still wins where there is one.
78
+ * The selection has revisions of its own (a Modules revision of the Area), so this writes only
79
+ * `config.modules` and never touches the structure: an Area that never stored a structure keeps running
80
+ * on its code-owned shell, and the next shell preset still reaches it. Which shell that is follows from
81
+ * the selection -- a Module that brings its own shell applies once it is active here.
81
82
  */
82
- export declare function savePhiDeveloperBuilderModulesDraft(state: Pick<PhiDeveloperBuilderWorkspaceState, "draftAllocations" | "runtimeModuleDefinitions" | "runtimeModuleIdsByArea" | "areaPresetSourcesByArea" | "publicRoutePaths" | "publicRouteClaims" | "areaControllerSettings">, regionDrafts: Record<string, PhiDeveloperBuilderRegionDraft>, options: {
83
- builderPlugins: readonly PhiBuilderPluginMeta[];
83
+ export declare function savePhiDeveloperBuilderModulesDraft(state: Pick<PhiDeveloperBuilderWorkspaceState, "draftAllocations" | "runtimeModuleDefinitions" | "runtimeModuleIdsByArea" | "publicRoutePaths" | "publicRouteClaims">, options: {
84
84
  scope: {
85
85
  area: PhiDeveloperBuilderArea;
86
86
  };
87
- /** The Area's code-owned Shell, for the one case where nothing is stored and nothing is loaded. */
88
- shellPresetDrafts?: Record<string, PhiDeveloperBuilderRegionDraft> | null;
89
87
  }): Promise<{
90
88
  revisionId: number;
91
89
  version: number;
92
90
  nextNodeSequence: number;
93
91
  }>;
94
92
  /** Publishes the Area's Module selection. Its structure draft, if one is open, is left exactly as it is. */
95
- export declare function publishPhiDeveloperBuilderModulesDraft(state: Pick<PhiDeveloperBuilderWorkspaceState, "draftAllocations" | "runtimeModuleDefinitions" | "runtimeModuleIdsByArea" | "areaPresetSourcesByArea" | "publicRoutePaths" | "publicRouteClaims" | "areaControllerSettings">, regionDrafts: Record<string, PhiDeveloperBuilderRegionDraft>, options: {
96
- builderPlugins: readonly PhiBuilderPluginMeta[];
93
+ export declare function publishPhiDeveloperBuilderModulesDraft(state: Pick<PhiDeveloperBuilderWorkspaceState, "draftAllocations" | "runtimeModuleDefinitions" | "runtimeModuleIdsByArea" | "publicRoutePaths" | "publicRouteClaims">, options: {
97
94
  scope: {
98
95
  area: PhiDeveloperBuilderArea;
99
96
  };
100
- /** As on save: without it an Area with no stored revision met the 409 fallback with nothing to write. */
101
- shellPresetDrafts?: Record<string, PhiDeveloperBuilderRegionDraft> | null;
102
97
  }): Promise<{
103
98
  revisionId: number;
104
99
  version: number;
105
100
  nextNodeSequence: number;
106
101
  }>;
107
- export declare function savePhiDeveloperBuilderDraft(state: Pick<PhiDeveloperBuilderWorkspaceState, "area" | "pageKey" | "pageMetaDrafts" | "deletedPageDrafts" | "draftAllocations" | "modulePresetPagesByArea" | "customPages" | "persistedPageCatalogByArea" | "areaPresetSourcesByArea" | "areaRootRouteDrafts" | "areaRootRoutes" | "areaMetaDrafts" | "areaMeta" | "areaControllerSettings" | "pageControllerSettings">, regionDrafts: Record<string, PhiDeveloperBuilderRegionDraft>, workspaceKind: PhiDeveloperBuilderWorkspaceKind, options: {
102
+ export declare function savePhiDeveloperBuilderDraft(state: Pick<PhiDeveloperBuilderWorkspaceState, "area" | "pageKey" | "pageMetaDrafts" | "deletedPageDrafts" | "draftAllocations" | "modulePresetPagesByArea" | "customPages" | "persistedPageCatalogByArea" | "areaPresetSourcesByArea" | "areaRootRouteDrafts" | "areaRootRoutes" | "areaMetaDrafts" | "areaMeta" | "areaControllerSettings" | "pageControllerSettings" | "areaShellsByArea">, regionDrafts: Record<string, PhiDeveloperBuilderRegionDraft>, workspaceKind: PhiDeveloperBuilderWorkspaceKind, options: {
108
103
  builderPlugins: readonly PhiBuilderPluginMeta[];
109
104
  pathname?: string | null;
110
105
  scope?: {
@@ -150,7 +145,7 @@ export declare function previewPhiDeveloperBuilderDraft(state: Pick<PhiDeveloper
150
145
  revisionId: number;
151
146
  previewHref: string;
152
147
  }>;
153
- export declare function publishPhiDeveloperBuilderDraft(state: Pick<PhiDeveloperBuilderWorkspaceState, "area" | "pageKey" | "pageMetaDrafts" | "deletedPageDrafts" | "draftAllocations" | "runtimeModuleDefinitions" | "runtimeModuleIdsByArea" | "modulePresetPagesByArea" | "customPages" | "persistedPageCatalogByArea" | "areaPresetSourcesByArea" | "areaRootRouteDrafts" | "areaRootRoutes" | "areaMetaDrafts" | "areaMeta" | "areaControllerSettings" | "pageControllerSettings">, regionDrafts: Record<string, PhiDeveloperBuilderRegionDraft>, workspaceKind: PhiDeveloperBuilderWorkspaceKind, options: {
148
+ export declare function publishPhiDeveloperBuilderDraft(state: Pick<PhiDeveloperBuilderWorkspaceState, "area" | "pageKey" | "pageMetaDrafts" | "deletedPageDrafts" | "draftAllocations" | "runtimeModuleDefinitions" | "runtimeModuleIdsByArea" | "modulePresetPagesByArea" | "customPages" | "persistedPageCatalogByArea" | "areaPresetSourcesByArea" | "areaRootRouteDrafts" | "areaRootRoutes" | "areaMetaDrafts" | "areaMeta" | "areaControllerSettings" | "pageControllerSettings" | "areaShellsByArea">, regionDrafts: Record<string, PhiDeveloperBuilderRegionDraft>, workspaceKind: PhiDeveloperBuilderWorkspaceKind, options: {
154
149
  builderPlugins: readonly PhiBuilderPluginMeta[];
155
150
  pathname?: string | null;
156
151
  scope?: {