@phis/ui 0.4.1 → 0.4.3

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 (246) hide show
  1. package/components/cms/phi-cms-layout-renderer.js +4 -3
  2. package/components/cms/phi-cms-page-render-scope.d.ts +4 -5
  3. package/components/cms/phi-cms-page-render-scope.js +43 -22
  4. package/components/cms/phi-cms-render-diagnostic-client.js +7 -3
  5. package/components/cms/phi-cms-render-error-boundary.js +2 -1
  6. package/components/controls/phi-bullet-list-control.js +31 -2
  7. package/components/controls/phi-ribbon-control.d.ts +29 -0
  8. package/components/controls/phi-ribbon-control.js +53 -0
  9. package/components/controls/phi-table-control.d.ts +3 -0
  10. package/components/controls/phi-table-control.js +13 -1
  11. package/components/controls/phi-tree-control.js +3 -3
  12. package/components/forms/shared-form-provider-registry.js +1 -4
  13. package/components/media/asset-collection-runtime.js +6 -16
  14. package/components/media/media-font-metrics.d.ts +3 -0
  15. package/components/media/media-font-metrics.js +43 -0
  16. package/components/media/phi-area-upload-widget.js +53 -97
  17. package/components/media/phi-image-preview-data.d.ts +13 -0
  18. package/components/media/phi-image-preview-data.js +184 -9
  19. package/components/media/phi-media-picker-binding.js +16 -13
  20. package/components/media/phi-media-upload.d.ts +15 -8
  21. package/components/media/phi-media-upload.js +18 -9
  22. package/components/media/phi-site-font-assets.js +7 -8
  23. package/components/overlays/phi-overlay-container-client.js +16 -1
  24. package/components/regions/presets/phi-settings-page-shell-tree.js +48 -1
  25. package/components/runtime/runtime-controller-materialization.js +12 -1
  26. package/components/state/scoped-state-store.js +20 -3
  27. package/components/tables/client/phi-table-binding.d.ts +2 -1
  28. package/components/tables/client/phi-table-binding.js +45 -21
  29. package/components/trees/client/phi-tree-binding.js +19 -11
  30. package/components/widgets/client/bullet-list-entries-editor.d.ts +26 -0
  31. package/components/widgets/client/bullet-list-entries-editor.js +103 -0
  32. package/components/widgets/config/choice-shared.js +12 -13
  33. package/components/widgets/config/command-buttons.d.ts +5 -1
  34. package/components/widgets/config/command-buttons.js +38 -81
  35. package/components/widgets/config/control-signal-config.d.ts +3 -1
  36. package/components/widgets/config/control-signal-config.js +19 -17
  37. package/components/widgets/config/image-source-parser.d.ts +1 -0
  38. package/components/widgets/config/image-source-parser.js +7 -8
  39. package/components/widgets/config/mask.d.ts +6 -1
  40. package/components/widgets/config/mask.js +24 -1
  41. package/components/widgets/config/parser-primitives.js +72 -0
  42. package/components/widgets/config/stack-tabs.d.ts +1 -1
  43. package/components/widgets/config/stack-tabs.js +2 -3
  44. package/components/widgets/config/strict-config-reader.d.ts +40 -0
  45. package/components/widgets/config/strict-config-reader.js +174 -0
  46. package/components/widgets/label-sets/effects.js +2 -0
  47. package/components/widgets/label-types/effects.d.ts +1 -0
  48. package/components/widgets/label-types/effects.js +1 -0
  49. package/components/widgets/navigation-descriptor-resolver.server.js +20 -8
  50. package/components/widgets/shared/bullet-list-vocabulary.d.ts +17 -1
  51. package/components/widgets/shared/bullet-list-vocabulary.js +19 -2
  52. package/components/widgets/shared/card-body-client.d.ts +16 -4
  53. package/components/widgets/shared/card-body-client.js +81 -24
  54. package/components/widgets/shared/card-vocabulary.d.ts +21 -4
  55. package/components/widgets/shared/card-vocabulary.js +28 -2
  56. package/components/widgets/shared/markdown-body-client.d.ts +2 -1
  57. package/components/widgets/shared/markdown-body-client.js +3 -1
  58. package/components/widgets/shared/markdown-render.js +8 -1
  59. package/components/widgets/signals/control-signal-capabilities.d.ts +0 -18
  60. package/components/widgets/signals/control-signal-capabilities.js +10 -22
  61. package/components/workspace/catalog-store.d.ts +4 -3
  62. package/components/workspace/catalog-store.js +6 -5
  63. package/gateway/dashboard-cards-route.js +1 -0
  64. package/gateway/internal-references.d.ts +6 -1
  65. package/gateway/internal-references.js +48 -23
  66. package/gateway/site-cms-write-validation.d.ts +9 -0
  67. package/gateway/site-cms-write-validation.js +78 -0
  68. package/gateway/site-proxy.js +19 -3
  69. package/helpers/renderable-block-serialization.js +1 -1
  70. package/next/config.d.mts +3 -0
  71. package/next/config.mjs +28 -1
  72. package/package.json +2 -2
  73. package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +5 -1
  74. package/plugins/runtime-modules/accounting/presets.d.ts +9 -0
  75. package/plugins/runtime-modules/accounting/presets.js +37 -0
  76. package/plugins/runtime-modules/accounting/server.d.ts +1 -4
  77. package/plugins/runtime-modules/accounting/server.js +4 -7
  78. package/plugins/runtime-modules/app/presets.d.ts +18 -0
  79. package/plugins/runtime-modules/app/presets.js +67 -0
  80. package/plugins/runtime-modules/app/server.d.ts +1 -4
  81. package/plugins/runtime-modules/app/server.js +4 -7
  82. package/plugins/runtime-modules/asset/controller/runtime.js +2 -2
  83. package/plugins/runtime-modules/asset/services/collection.js +9 -1
  84. package/plugins/runtime-modules/asset/services/options.js +2 -2
  85. package/plugins/runtime-modules/builder/area-settings-answer.js +2 -1
  86. package/plugins/runtime-modules/builder/authoring-canvas.js +6 -6
  87. package/plugins/runtime-modules/builder/cards.js +3 -5
  88. package/plugins/runtime-modules/builder/clients/builder-region-overrides.js +3 -3
  89. package/plugins/runtime-modules/builder/clients/canvas-widget.js +15 -54
  90. package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +4 -1
  91. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +5 -34
  92. package/plugins/runtime-modules/builder/clients/inspector-link-target-field.js +1 -1
  93. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +8 -8
  94. package/plugins/runtime-modules/builder/clients/inspector-title.js +6 -6
  95. package/plugins/runtime-modules/builder/clients/layout-inspector.d.ts +1 -1
  96. package/plugins/runtime-modules/builder/clients/layout-inspector.js +11 -25
  97. package/plugins/runtime-modules/builder/clients/mode-switch.js +1 -1
  98. package/plugins/runtime-modules/builder/clients/pages-header.js +11 -11
  99. package/plugins/runtime-modules/builder/clients/pages-workspace.js +1 -1
  100. package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
  101. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +1 -1
  102. package/plugins/runtime-modules/builder/clients/shells-workspace.js +15 -31
  103. package/plugins/runtime-modules/builder/clients/structure-canvas.js +1 -1
  104. package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.d.ts +26 -0
  105. package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.js +36 -0
  106. package/plugins/runtime-modules/builder/clients/widget-effects-editor.js +1 -1
  107. package/plugins/runtime-modules/builder/clients/widget-inspector.js +1 -0
  108. package/plugins/runtime-modules/builder/clients/workspace-scope-boundary.js +2 -2
  109. package/plugins/runtime-modules/builder/cms-instance-allocator.js +8 -28
  110. package/plugins/runtime-modules/builder/controller/client.d.ts +0 -15
  111. package/plugins/runtime-modules/builder/controller/definition.d.ts +0 -15
  112. package/plugins/runtime-modules/builder/controller/definition.js +0 -8
  113. package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +1 -2
  114. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +11 -30
  115. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +15 -2
  116. package/plugins/runtime-modules/builder/controller/inspector-controller.d.ts +1 -2
  117. package/plugins/runtime-modules/builder/controller/inspector-controller.js +4 -7
  118. package/plugins/runtime-modules/builder/controller/page-controller.d.ts +1 -2
  119. package/plugins/runtime-modules/builder/controller/page-controller.js +16 -68
  120. package/plugins/runtime-modules/builder/controller/server-definition.d.ts +0 -15
  121. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.d.ts +2 -5
  122. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +6 -50
  123. package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +2 -3
  124. package/plugins/runtime-modules/builder/controller/workspace-controller.js +89 -153
  125. package/plugins/runtime-modules/builder/data-providers.d.ts +1 -0
  126. package/plugins/runtime-modules/builder/data-providers.js +1 -0
  127. package/plugins/runtime-modules/builder/definition.d.ts +1 -0
  128. package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +64 -30
  129. package/plugins/runtime-modules/builder/developer-workspace-store.js +255 -61
  130. package/plugins/runtime-modules/builder/edit-scaffold-drawer.js +1 -1
  131. package/plugins/runtime-modules/builder/history.d.ts +3 -1
  132. package/plugins/runtime-modules/builder/options-providers.js +3 -2
  133. package/plugins/runtime-modules/builder/page-catalog-client.js +19 -7
  134. package/plugins/runtime-modules/builder/page-meta-form.js +1 -0
  135. package/plugins/runtime-modules/builder/page-references-provider.js +1 -1
  136. package/plugins/runtime-modules/builder/persistence.js +33 -69
  137. package/plugins/runtime-modules/builder/public-route-collisions.d.ts +2 -2
  138. package/plugins/runtime-modules/builder/public-route-collisions.js +6 -19
  139. package/plugins/runtime-modules/builder/render-root-node-preview.server.js +20 -3
  140. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +3 -3
  141. package/plugins/runtime-modules/builder/runtime-module-selection.d.ts +2 -12
  142. package/plugins/runtime-modules/builder/runtime-module-selection.js +16 -42
  143. package/plugins/runtime-modules/builder/services/navigation-table.js +9 -15
  144. package/plugins/runtime-modules/builder/services/page-source-tree.js +8 -8
  145. package/plugins/runtime-modules/builder/services/runtime-modules-table.js +10 -10
  146. package/plugins/runtime-modules/builder/services/signal-routes-table.js +3 -3
  147. package/plugins/runtime-modules/builder/signal-route-selection.d.ts +1 -2
  148. package/plugins/runtime-modules/builder/signal-route-selection.js +2 -2
  149. package/plugins/runtime-modules/builder/signal-wiring-options.js +3 -2
  150. package/plugins/runtime-modules/builder/structure-dnd.js +8 -61
  151. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +13 -10
  152. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +12 -18
  153. package/plugins/runtime-modules/builder/workspace-catalog-actions.d.ts +55 -0
  154. package/plugins/runtime-modules/builder/workspace-catalog-actions.js +142 -0
  155. package/plugins/runtime-modules/client-manifests/common.js +1 -1
  156. package/plugins/runtime-modules/{runtime-calendar-adapters.js → core/calendar-adapters.js} +2 -2
  157. package/plugins/runtime-modules/{client-calendar-adapters/core.js → core/client-calendar-adapters.js} +1 -1
  158. package/plugins/runtime-modules/core/content-entries/table.js +1 -1
  159. package/plugins/runtime-modules/core/data-providers.d.ts +3 -0
  160. package/plugins/runtime-modules/core/data-providers.js +2 -1
  161. package/plugins/runtime-modules/core/definition.d.ts +3 -0
  162. package/plugins/runtime-modules/core/definition.js +1 -1
  163. package/plugins/runtime-modules/core/messaging/data-providers.d.ts +1 -0
  164. package/plugins/runtime-modules/core/messaging/data-providers.js +1 -0
  165. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +1 -1
  166. package/plugins/runtime-modules/core/server.js +1 -1
  167. package/plugins/runtime-modules/core/themes.d.ts +44 -0
  168. package/plugins/runtime-modules/core/themes.js +12 -0
  169. package/plugins/runtime-modules/core/widgets/card/collection-view-binding.js +25 -9
  170. package/plugins/runtime-modules/core/widgets/card/config.d.ts +296 -254
  171. package/plugins/runtime-modules/core/widgets/card/config.js +52 -3
  172. package/plugins/runtime-modules/core/widgets/card/editor.js +30 -3
  173. package/plugins/runtime-modules/core/widgets/card/server.d.ts +3 -0
  174. package/plugins/runtime-modules/core/widgets/card/server.js +31 -3
  175. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +7 -6
  176. package/plugins/runtime-modules/core/widgets/collection-view/config.js +9 -2
  177. package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -25
  178. package/plugins/runtime-modules/core/widgets/description/editor.js +4 -61
  179. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -25
  180. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -25
  181. package/plugins/runtime-modules/core/widgets/image/config.js +2 -2
  182. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +3 -1
  183. package/plugins/runtime-modules/core/widgets/markdown/config.js +14 -0
  184. package/plugins/runtime-modules/core/widgets/markdown/editor.js +2 -3
  185. package/plugins/runtime-modules/core/widgets/result/config.d.ts +4 -25
  186. package/plugins/runtime-modules/core/widgets/result/config.js +2 -0
  187. package/plugins/runtime-modules/core/widgets/result/server.js +25 -19
  188. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -25
  189. package/plugins/runtime-modules/core/widgets/slot-upload/client.js +11 -2
  190. package/plugins/runtime-modules/core/widgets/table/client.js +8 -4
  191. package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -83
  192. package/plugins/runtime-modules/core/widgets/table/config.js +302 -452
  193. package/plugins/runtime-modules/core/widgets/tree/config.js +5 -2
  194. package/plugins/runtime-modules/dashboard/card-rows.d.ts +5 -0
  195. package/plugins/runtime-modules/dashboard/card-rows.js +59 -0
  196. package/plugins/runtime-modules/dashboard/clients/dashboard-card-view.js +4 -6
  197. package/plugins/runtime-modules/dashboard/services/collection.js +17 -7
  198. package/plugins/runtime-modules/groups/data-providers.d.ts +2 -0
  199. package/plugins/runtime-modules/groups/data-providers.js +3 -3
  200. package/plugins/runtime-modules/groups/definition.d.ts +2 -0
  201. package/plugins/runtime-modules/localization/data-providers.d.ts +3 -0
  202. package/plugins/runtime-modules/localization/data-providers.js +2 -0
  203. package/plugins/runtime-modules/localization/definition.d.ts +3 -0
  204. package/plugins/runtime-modules/localization/services/table.js +3 -7
  205. package/plugins/runtime-modules/observability/data-providers.d.ts +1 -0
  206. package/plugins/runtime-modules/observability/data-providers.js +1 -0
  207. package/plugins/runtime-modules/observability/definition.d.ts +1 -0
  208. package/plugins/runtime-modules/observability/module.d.ts +1 -0
  209. package/plugins/runtime-modules/observability/services/table.js +1 -1
  210. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +2 -105
  211. package/plugins/runtime-modules/public/presets.d.ts +115 -0
  212. package/plugins/runtime-modules/{area-base-presets.js → public/presets.js} +19 -119
  213. package/plugins/runtime-modules/public/server.d.ts +1 -4
  214. package/plugins/runtime-modules/public/server.js +4 -7
  215. package/plugins/runtime-modules/public/trees/phi-default-pub-error-page-tree.js +7 -8
  216. package/plugins/runtime-modules/public-base-page-references.d.ts +1 -1
  217. package/plugins/runtime-modules/public-base-page-references.js +1 -1
  218. package/plugins/runtime-modules/revisions/controller/client.js +11 -11
  219. package/plugins/runtime-modules/revisions/services/table.js +3 -3
  220. package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +22 -0
  221. package/plugins/runtime-modules/theme/widgets/brand-controls/client.d.ts +2 -1
  222. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +93 -58
  223. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +2 -1
  224. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +23 -22
  225. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +1 -1
  226. package/plugins/runtime-modules/theme-descriptors.js +1 -1
  227. package/plugins/runtime-modules/user-management/data-providers.d.ts +2 -0
  228. package/plugins/runtime-modules/user-management/data-providers.js +1 -0
  229. package/plugins/runtime-modules/user-management/definition.d.ts +2 -0
  230. package/styles/control-shape.css +11 -11
  231. package/styles/controls.css +29 -3
  232. package/styles/layout.css +16 -7
  233. package/types/cms-config.js +142 -185
  234. package/types/cms-plugins.d.ts +4 -11
  235. package/types/core-widget-placements.d.ts +17 -3
  236. package/types/dashboard-cards.d.ts +9 -0
  237. package/types/media.d.ts +0 -3
  238. package/types/renderable-block.d.ts +6 -1
  239. package/types/table-widget.d.ts +9 -0
  240. package/types/table-widget.js +20 -0
  241. package/types.d.ts +1 -1
  242. package/widget-config.d.ts +2 -0
  243. package/widget-config.js +6 -0
  244. package/plugins/runtime-modules/area-base-presets.d.ts +0 -139
  245. /package/plugins/runtime-modules/{runtime-calendar-adapters.d.ts → core/calendar-adapters.d.ts} +0 -0
  246. /package/plugins/runtime-modules/{client-calendar-adapters/core.d.ts → core/client-calendar-adapters.d.ts} +0 -0
@@ -1,22 +1,21 @@
1
- import { PHI_DEFAULT_PUB_AREA_COMPOSITION_NODE_KEYS, PHI_DEFAULT_PUB_AREA_PRESET_KEY, } from "./preset-contracts/pub-area";
2
- import { PhiCmsFlags } from "../../constants/phi-cms";
3
- import { PHI_CMS_ERROR_CODES, resolvePhiCmsErrorPagePath, } from "../../constants/cms-error-pages";
4
- import { PHI_CORE_RUNTIME_MODULE_ID } from "./core/ids";
5
- import { PHI_ACCOUNTING_RUNTIME_MODULE_ID } from "./accounting/ids";
6
- import { PHI_APP_RUNTIME_MODULE_ID } from "./app/ids";
7
- import { PHI_PUBLIC_RUNTIME_MODULE_ID } from "./public/ids";
8
- import { PHI_CORE_THEME_PRESET_PLUGINS } from "../../theme/phi-theme-presets";
9
- import { buildPhiAreaRootRoutePresetDescriptor } from "./area-root-route";
10
- import { PHI_BASE_PAGE_LAYOUT_VERSION } from "../../components/regions/presets/phi-base-page-layout";
11
- import { PHI_PUBLIC_BASE_PAGE_PRESET_KEYS } from "./public-base-page-references";
12
- export const PHI_AREA_BASE_RUNTIME_MODULE_AREA_SHELLS = [
1
+ import { PhiCmsFlags } from "../../../constants/phi-cms";
2
+ import { PHI_CMS_ERROR_CODES, resolvePhiCmsErrorPagePath } from "../../../constants/cms-error-pages";
3
+ import { PHI_DEFAULT_PUB_AREA_COMPOSITION_NODE_KEYS, PHI_DEFAULT_PUB_AREA_PRESET_KEY, } from "../preset-contracts/pub-area";
4
+ import { PHI_PUBLIC_BASE_PAGE_PRESET_KEYS } from "../public-base-page-references";
5
+ import { PHI_PUBLIC_RUNTIME_MODULE_ID } from "./ids";
6
+ /*
7
+ * What the Public base Module brings: the Site shell and the Pages no Site can do without. They live in
8
+ * the Module that owns them, so the Module reaches no other Module to state them (MODULES.md, "The
9
+ * dependency rule").
10
+ */
11
+ export const PHI_PUBLIC_RUNTIME_MODULE_AREA_SHELLS = [
13
12
  {
14
13
  ownerModuleId: PHI_PUBLIC_RUNTIME_MODULE_ID,
15
14
  presetKey: PHI_DEFAULT_PUB_AREA_PRESET_KEY,
16
15
  shellPresetVersion: 1,
17
16
  area: "public",
18
17
  exportedNodeKeys: PHI_DEFAULT_PUB_AREA_COMPOSITION_NODE_KEYS,
19
- loadTree: ({ page, runtime }) => import("./phi-default-site-area-preset-tree")
18
+ loadTree: ({ page, runtime }) => import("../phi-default-site-area-preset-tree")
20
19
  .then((module) => module.buildPhiDefaultSiteAreaPresetTree({
21
20
  page,
22
21
  runtime,
@@ -25,56 +24,8 @@ export const PHI_AREA_BASE_RUNTIME_MODULE_AREA_SHELLS = [
25
24
  runtimeModuleArea: "public",
26
25
  })),
27
26
  },
28
- {
29
- ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
30
- presetKey: "app-area-preset",
31
- shellPresetVersion: 1,
32
- area: "app",
33
- /*
34
- * The Site shell with a left sider added, rather than a shell of its own.
35
- *
36
- * App's header and footer are Public's -- one Brand, one account trigger, one description of both.
37
- * What App has that Public does not is somewhere for the Modules a signed-in person works with,
38
- * and that is the whole of the overlay. Nothing is omitted from the base, so the two trees cannot
39
- * disagree about a Region: composition refuses a Region type stated twice.
40
- */
41
- loadTree: async ({ page, runtime }) => {
42
- const [{ buildPhiDefaultSiteAreaPresetTree }, { buildPhiDefaultAppAreaPresetTree }, { mergePhiCmsShellTrees },] = await Promise.all([
43
- import("./phi-default-site-area-preset-tree"),
44
- import("./app/trees/phi-default-app-area-preset-tree"),
45
- import("./shell-tree-composition"),
46
- ]);
47
- const [base, overlay] = await Promise.all([
48
- buildPhiDefaultSiteAreaPresetTree({
49
- page,
50
- runtime,
51
- presetKey: "app-area-preset",
52
- ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
53
- runtimeModuleArea: "app",
54
- }),
55
- buildPhiDefaultAppAreaPresetTree({ page, runtime }),
56
- ]);
57
- return mergePhiCmsShellTrees(base, overlay);
58
- },
59
- },
60
- ...[
61
- ["accounting", PHI_ACCOUNTING_RUNTIME_MODULE_ID],
62
- ].map(([area, ownerModuleId]) => ({
63
- ownerModuleId,
64
- presetKey: `${area}-area-preset`,
65
- shellPresetVersion: 1,
66
- area,
67
- loadTree: ({ page, runtime }) => import("./phi-default-site-area-preset-tree")
68
- .then((module) => module.buildPhiDefaultSiteAreaPresetTree({
69
- page,
70
- runtime,
71
- presetKey: `${area}-area-preset`,
72
- ownerModuleId,
73
- runtimeModuleArea: area,
74
- })),
75
- })),
76
27
  ];
77
- export const PHI_AREA_BASE_RUNTIME_MODULE_ROUTES = [
28
+ export const PHI_PUBLIC_RUNTIME_MODULE_ROUTES = [
78
29
  {
79
30
  ownerModuleId: PHI_PUBLIC_RUNTIME_MODULE_ID,
80
31
  presetKey: PHI_PUBLIC_BASE_PAGE_PRESET_KEYS.welcome,
@@ -90,7 +41,7 @@ export const PHI_AREA_BASE_RUNTIME_MODULE_ROUTES = [
90
41
  * the table for every Site, so a Site package offering a landing would arrive as the second and
91
42
  * would no longer cover this one on activation.
92
43
  */
93
- loadTree: ({ page, runtime }) => import("./public/trees/phi-default-pub-welcome-page-tree")
44
+ loadTree: ({ page, runtime }) => import("./trees/phi-default-pub-welcome-page-tree")
94
45
  .then((module) => module.buildPhiDefaultPubWelcomePageTree({ page, runtime })),
95
46
  },
96
47
  {
@@ -121,36 +72,9 @@ export const PHI_AREA_BASE_RUNTIME_MODULE_ROUTES = [
121
72
  },
122
73
  },
123
74
  ],
124
- loadTree: ({ page }) => import("./public/trees/phi-default-pub-home-page-tree")
75
+ loadTree: ({ page }) => import("./trees/phi-default-pub-home-page-tree")
125
76
  .then((module) => module.buildPhiDefaultPubHomePageTree({ page })),
126
77
  },
127
- buildPhiAreaRootRoutePresetDescriptor({
128
- ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
129
- area: "app",
130
- title: "App",
131
- }),
132
- /*
133
- * What a person has settled about their own account: their name, the language they read in.
134
- *
135
- * It sat with the Auth Module, which owned the route while Core owned every Widget on it. Nothing
136
- * about a name or a language depends on how somebody signs in -- a Site that switches to a
137
- * directory, or switches Auth off while sessions keep working, would have lost the Page that says
138
- * what they are called. AUTHENTICATION.md section 5 already said so: profile administration does
139
- * not become Auth's merely by appearing in its menu.
140
- *
141
- * The Area's own Settings child, so it is declared here rather than injected -- SETTINGS.md section
142
- * 5, the same standing Admin and Builder give their General page.
143
- */
144
- {
145
- ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
146
- presetKey: "app-profile-page",
147
- presetVersion: 1 + PHI_BASE_PAGE_LAYOUT_VERSION,
148
- area: "app",
149
- title: "Profile",
150
- path: "/settings/profile",
151
- loadTree: ({ page, runtime }) => import("./app/trees/phi-default-app-profile-page-tree")
152
- .then((module) => module.buildPhiDefaultAppProfilePageTree({ page, runtime })),
153
- },
154
78
  ...PHI_CMS_ERROR_CODES.map((code) => ({
155
79
  ownerModuleId: PHI_PUBLIC_RUNTIME_MODULE_ID,
156
80
  presetKey: `public-error-${code}-page`,
@@ -164,7 +88,7 @@ export const PHI_AREA_BASE_RUNTIME_MODULE_ROUTES = [
164
88
  * Pages, and the Site can still decide otherwise.
165
89
  */
166
90
  defaultPageFlags: PhiCmsFlags.NoIndex,
167
- loadTree: ({ page }) => import("./public/trees/phi-default-pub-error-page-tree")
91
+ loadTree: ({ page }) => import("./trees/phi-default-pub-error-page-tree")
168
92
  .then((module) => module.buildPhiDefaultPubErrorPageTree({ code, page })),
169
93
  })),
170
94
  {
@@ -174,34 +98,10 @@ export const PHI_AREA_BASE_RUNTIME_MODULE_ROUTES = [
174
98
  area: "public",
175
99
  title: "Terms and Conditions",
176
100
  path: "/terms-and-conditions",
177
- loadTree: ({ page }) => import("./public/trees/phi-default-pub-terms-page-tree")
101
+ loadTree: ({ page }) => import("./trees/phi-default-pub-terms-page-tree")
178
102
  .then((module) => module.buildPhiDefaultPubTermsPageTree({ page })),
179
103
  },
180
- buildPhiAreaRootRoutePresetDescriptor({
181
- ownerModuleId: PHI_ACCOUNTING_RUNTIME_MODULE_ID,
182
- area: "accounting",
183
- title: "Accounting",
184
- }),
185
- {
186
- ownerModuleId: PHI_ACCOUNTING_RUNTIME_MODULE_ID,
187
- presetKey: "accounting-overview-page",
188
- presetVersion: 1 + PHI_BASE_PAGE_LAYOUT_VERSION,
189
- area: "accounting",
190
- title: "Overview",
191
- path: "/overview",
192
- loadTree: ({ page, runtime }) => import("./accounting/trees/phi-default-accounting-page-tree")
193
- .then((module) => module.buildPhiDefaultAccountingPageTree({ page, runtime })),
194
- },
195
104
  ];
196
- export const PHI_CORE_RUNTIME_MODULE_THEMES = PHI_CORE_THEME_PRESET_PLUGINS.map((preset) => ({
197
- ownerModuleId: PHI_CORE_RUNTIME_MODULE_ID,
198
- presetKey: `${preset.key}-theme-preset`,
199
- presetVersion: 1,
200
- themeKey: preset.key,
201
- title: preset.title,
202
- ...(preset.description ? { description: preset.description } : {}),
203
- loadPreset: () => preset,
204
- }));
205
105
  /**
206
106
  * The Public form pages, in their own list because they appear only where Forms are allowed. The
207
107
  * contact page is Core's like the terms: every Site starts with a way to be reached, and neither is
@@ -238,7 +138,7 @@ export const PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES = [
238
138
  },
239
139
  },
240
140
  ],
241
- loadTree: ({ page }) => import("./public/trees/phi-default-pub-contact-page-tree")
141
+ loadTree: ({ page }) => import("./trees/phi-default-pub-contact-page-tree")
242
142
  .then((module) => module.buildPhiDefaultPubContactPageTree({ page })),
243
143
  },
244
144
  /*
@@ -257,7 +157,7 @@ export const PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES = [
257
157
  title: "Unsubscribe",
258
158
  path: "/unsubscribe",
259
159
  navigation: [],
260
- loadTree: ({ page }) => import("./public/trees/phi-default-pub-unsubscribe-page-tree")
160
+ loadTree: ({ page }) => import("./trees/phi-default-pub-unsubscribe-page-tree")
261
161
  .then((module) => module.buildPhiDefaultPubUnsubscribePageTree({
262
162
  page,
263
163
  presetKey: PHI_PUBLIC_BASE_PAGE_PRESET_KEYS.unsubscribe,
@@ -1,5 +1,2 @@
1
- /**
2
- * The unselectable base module of its Area. Shells and routes come from the shared Area-base preset
3
- * list and are filtered by owner, so each base module states its own half of it.
4
- */
1
+ /** The unselectable base module of its Area. Its shell and Pages are its own (`./presets`). */
5
2
  export declare const PHI_PUBLIC_RUNTIME_MODULE_SERVER_AREA_CONTRIBUTION: import("../area-contributions").PhiRuntimeModuleServerAreaContribution;
@@ -1,11 +1,8 @@
1
- import { PHI_AREA_BASE_RUNTIME_MODULE_AREA_SHELLS, PHI_AREA_BASE_RUNTIME_MODULE_ROUTES, PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES, } from "../area-base-presets";
1
+ import { PHI_PUBLIC_RUNTIME_MODULE_AREA_SHELLS, PHI_PUBLIC_RUNTIME_MODULE_ROUTES, PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES, } from "./presets";
2
2
  import { definePhiRuntimeModuleServerAreaContribution } from "../area-contributions";
3
3
  import { PHI_PUBLIC_RUNTIME_MODULE_DEFINITION } from "../public/definition";
4
4
  import { PHI_PUBLIC_RUNTIME_MODULE_FORMS } from "./forms";
5
- /**
6
- * The unselectable base module of its Area. Shells and routes come from the shared Area-base preset
7
- * list and are filtered by owner, so each base module states its own half of it.
8
- */
5
+ /** The unselectable base module of its Area. Its shell and Pages are its own (`./presets`). */
9
6
  export const PHI_PUBLIC_RUNTIME_MODULE_SERVER_AREA_CONTRIBUTION = definePhiRuntimeModuleServerAreaContribution({
10
7
  moduleId: PHI_PUBLIC_RUNTIME_MODULE_DEFINITION.moduleId,
11
8
  catalogEntry: {
@@ -13,13 +10,13 @@ export const PHI_PUBLIC_RUNTIME_MODULE_SERVER_AREA_CONTRIBUTION = definePhiRunti
13
10
  widgets: [],
14
11
  layouts: [],
15
12
  forms: PHI_PUBLIC_RUNTIME_MODULE_FORMS,
16
- areaShells: PHI_AREA_BASE_RUNTIME_MODULE_AREA_SHELLS.filter((descriptor) => descriptor.ownerModuleId === PHI_PUBLIC_RUNTIME_MODULE_DEFINITION.moduleId),
13
+ areaShells: PHI_PUBLIC_RUNTIME_MODULE_AREA_SHELLS,
17
14
  /*
18
15
  * The landing, the error Pages, the terms, and the contact page: what no Site can do without. Each
19
16
  * is a floor a package Module may cover (MODULES.md, "Who owns an address") -- the landing through
20
17
  * the root slot, the others through their path.
21
18
  */
22
- routes: PHI_AREA_BASE_RUNTIME_MODULE_ROUTES.filter((descriptor) => descriptor.ownerModuleId === PHI_PUBLIC_RUNTIME_MODULE_DEFINITION.moduleId).concat(PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES),
19
+ routes: [...PHI_PUBLIC_RUNTIME_MODULE_ROUTES, ...PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES],
23
20
  load: () => import("./module").then((module) => module.PHI_PUBLIC_RUNTIME_MODULE),
24
21
  },
25
22
  });
@@ -1,4 +1,5 @@
1
1
  import { createPhiPresetCmsInstanceId } from "../../../../types/cms-instance-id";
2
+ import { PHI_TEXT_SOURCE_PRESET } from "../../../../helpers/text-source";
2
3
  import { PHI_PUBLIC_RUNTIME_MODULE_ID } from "../ids";
3
4
  import { PHI_CMS_DEFAULT_SLOT_INDEX } from "../../../../constants/cms-layout-types";
4
5
  import { PhiCmsPageType } from "../../../../constants/phi-cms";
@@ -12,14 +13,11 @@ const ERROR_STATUS = {
12
13
  /**
13
14
  * The source text, and the source text only.
14
15
  *
15
- * It goes into the widget config untranslated, because the `result` widget translates through the Site
16
- * translator -- which is the point: a Site defines its own error strings, and it can only do that if
17
- * what reaches the translator is the source rather than an already translated string. Pre-translating
18
- * here would register the German text as a Site source, ask for a de->de translation, and show the
19
- * translation in the builder inspector where every other widget shows the original.
20
- *
21
- * The admin presets are the deliberate other case: their labels are system copy shared across Sites, so
22
- * they are translated globally in the preset and set the node's `NoTranslate` flag.
16
+ * It goes into the widget config untranslated and marked `textSource: "preset"`: these are the
17
+ * platform's words, the same on every Site, so the `result` widget translates them through the global
18
+ * store (`helpers/text-source.ts`). Pre-translating here would freeze one locale into every Site that
19
+ * adopts the page. An author who rewrites a text in the Builder drops the marker, and from then on the
20
+ * words are the Site's and its own store translates them.
23
21
  */
24
22
  const ERROR_SOURCE_COPY = {
25
23
  401: {
@@ -92,6 +90,7 @@ export async function buildPhiDefaultPubErrorPageTree({ code, page, }) {
92
90
  sortOrder: 0,
93
91
  label: `pub error ${code} result widget`,
94
92
  config: {
93
+ textSource: PHI_TEXT_SOURCE_PRESET,
95
94
  status: ERROR_STATUS[code],
96
95
  code: String(code),
97
96
  title: copy.title,
@@ -4,7 +4,7 @@ import { createPhiPageReference } from "../../types/references";
4
4
  *
5
5
  * A Module that points at one of them has to say which, and a string typed at the call site is the same
6
6
  * fragility as a path: nothing checks it, and a preset key that is renamed leaves a reference resolving
7
- * to nothing. The base descriptors in `area-base-presets.ts` read their keys from here, so the two
7
+ * to nothing. The base descriptors in `public/presets.ts` read their keys from here, so the two
8
8
  * cannot drift.
9
9
  *
10
10
  * Kept apart from those descriptors on purpose. They import every base Page tree, and
@@ -6,7 +6,7 @@ import { createPhiRuntimeModuleId } from "../../constants/module-identity";
6
6
  *
7
7
  * A Module that points at one of them has to say which, and a string typed at the call site is the same
8
8
  * fragility as a path: nothing checks it, and a preset key that is renamed leaves a reference resolving
9
- * to nothing. The base descriptors in `area-base-presets.ts` read their keys from here, so the two
9
+ * to nothing. The base descriptors in `public/presets.ts` read their keys from here, so the two
10
10
  * cannot drift.
11
11
  *
12
12
  * Kept apart from those descriptors on purpose. They import every base Page tree, and
@@ -8,7 +8,7 @@ import { createPhiRuntimeControllerClient } from "../../../../components/runtime
8
8
  import { usePhiSignalDispatcher, usePhiSignalListener } from "../../../../components/runtime/runtime-signal-bus";
9
9
  import { dispatchPhiSignalCapability } from "../../../../components/runtime/runtime-signal-identity";
10
10
  import { usePhiApplicationFeedback } from "../../../../components/runtime/use-phi-application-feedback";
11
- import { getPhiWorkspaceCatalogSnapshot, usePhiWorkspaceCatalogValue, PHI_WORKSPACE_CATALOG_SCOPE, } from "../../../../components/workspace/catalog-store";
11
+ import { getPhiWorkspaceCatalogSnapshot, usePhiWorkspaceCatalogValue, } from "../../../../components/workspace/catalog-store";
12
12
  import { PHI_BUILDER_NAVIGATION_KEY_SEARCH_PARAM, PHI_BUILDER_PAGE_SEARCH_PARAM, PHI_BUILDER_REVISIONS_KIND_SEARCH_PARAM, PHI_BUILDER_REVISIONS_SCOPE_SEARCH_PARAM, PHI_BUILDER_THEME_KEY_SEARCH_PARAM, normalizePhiBuilderAreaSearchParam, normalizePhiBuilderPageSearchParam, normalizePhiBuilderRevisionsKindSearchParam, } from "../../../../helpers/cms-scope-search-params";
13
13
  import { resolvePhiBuilderRevisionPagePath, } from "../types";
14
14
  import { resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, resolvePhiBuilderPageKeyFromCatalogPath, } from "../../../../helpers/cms-page-catalog";
@@ -31,13 +31,13 @@ function PhiRevisionsControllerMount({ address, config, }) {
31
31
  const { showMessage } = usePhiApplicationFeedback();
32
32
  const pathname = usePhiPathname();
33
33
  const router = useRouter();
34
- const builderArea = usePhiWorkspaceCatalogValue(PHI_WORKSPACE_CATALOG_SCOPE, (state) => state.area);
35
- const builderPageKey = usePhiWorkspaceCatalogValue(PHI_WORKSPACE_CATALOG_SCOPE, (state) => state.pageKey);
36
- const modulePresetPagesByArea = usePhiWorkspaceCatalogValue(PHI_WORKSPACE_CATALOG_SCOPE, (state) => state.modulePresetPagesByArea);
37
- const customPages = usePhiWorkspaceCatalogValue(PHI_WORKSPACE_CATALOG_SCOPE, (state) => state.customPages);
38
- const persistedPageCatalogByArea = usePhiWorkspaceCatalogValue(PHI_WORKSPACE_CATALOG_SCOPE, (state) => state.persistedPageCatalogByArea);
34
+ const builderArea = usePhiWorkspaceCatalogValue((state) => state.area);
35
+ const builderPageKey = usePhiWorkspaceCatalogValue((state) => state.pageKey);
36
+ const modulePresetPagesByArea = usePhiWorkspaceCatalogValue((state) => state.modulePresetPagesByArea);
37
+ const customPages = usePhiWorkspaceCatalogValue((state) => state.customPages);
38
+ const persistedPageCatalogByArea = usePhiWorkspaceCatalogValue((state) => state.persistedPageCatalogByArea);
39
39
  useEffect(() => {
40
- const state = getPhiWorkspaceCatalogSnapshot(PHI_WORKSPACE_CATALOG_SCOPE);
40
+ const state = getPhiWorkspaceCatalogSnapshot();
41
41
  const pages = resolvePhiBuilderActivePageCatalog(state.area, state.modulePresetPagesByArea, state.customPages, state.persistedPageCatalogByArea);
42
42
  const search = new URLSearchParams(window.location.search);
43
43
  const pageKey = resolvePhiBuilderActivePageKey(normalizePhiBuilderPageSearchParam(search.get(PHI_BUILDER_PAGE_SEARCH_PARAM)) ?? state.pageKey, pages);
@@ -72,7 +72,7 @@ function PhiRevisionsControllerMount({ address, config, }) {
72
72
  * not the root route, not the SEO answers. Every one of them is now a value only the server knows.
73
73
  */
74
74
  const deleteAreaShell = useCallback(async (area, correlationId) => {
75
- const source = getPhiWorkspaceCatalogSnapshot(PHI_WORKSPACE_CATALOG_SCOPE)
75
+ const source = getPhiWorkspaceCatalogSnapshot()
76
76
  .areaPresetSourcesByArea?.[area] ?? null;
77
77
  try {
78
78
  await deleteCmsDraft("/api/site/cms/area/override", {
@@ -114,7 +114,7 @@ function PhiRevisionsControllerMount({ address, config, }) {
114
114
  * from the signal -- the button names a command, and what it acts on is whatever the Builder is
115
115
  * pointed at when it is pressed.
116
116
  */
117
- const area = getPhiWorkspaceCatalogSnapshot(PHI_WORKSPACE_CATALOG_SCOPE).area;
117
+ const area = getPhiWorkspaceCatalogSnapshot().area;
118
118
  emitCapability("deleteAreaWarning", `Everything this Site stored for ${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.`, signal.correlationId);
119
119
  emitCapability("deleteAreaOpen", null, signal.correlationId);
120
120
  return;
@@ -123,7 +123,7 @@ function PhiRevisionsControllerMount({ address, config, }) {
123
123
  const payload = isPhiRecord(signal.value) ? signal.value : null;
124
124
  const values = isPhiRecord(payload?.values) ? payload.values : null;
125
125
  const typed = typeof values?.areaKey === "string" ? values.areaKey.trim() : "";
126
- const area = getPhiWorkspaceCatalogSnapshot(PHI_WORKSPACE_CATALOG_SCOPE).area;
126
+ const area = getPhiWorkspaceCatalogSnapshot().area;
127
127
  if (typed !== area) {
128
128
  // The Overlay stays open: what is wrong is the answer, not the question.
129
129
  showMessage({ level: "error", content: "That is not the Area key." }, { correlationId: signal.correlationId });
@@ -169,7 +169,7 @@ function PhiRevisionsControllerMount({ address, config, }) {
169
169
  const key = typeof action?.key === "string" ? action.key : "";
170
170
  if (key === "restore") {
171
171
  showMessage({ level: "success", content: `Restored revision #${String(action?.revisionId ?? "")}.` }, { correlationId: signal.correlationId });
172
- const state = getPhiWorkspaceCatalogSnapshot(PHI_WORKSPACE_CATALOG_SCOPE);
172
+ const state = getPhiWorkspaceCatalogSnapshot();
173
173
  const search = new URLSearchParams(window.location.search);
174
174
  const kind = normalizePhiBuilderRevisionsKindSearchParam(search.get(PHI_BUILDER_REVISIONS_KIND_SEARCH_PARAM)) ?? "area";
175
175
  const revisionScope = search.get(PHI_BUILDER_REVISIONS_SCOPE_SEARCH_PARAM)?.trim() ?? "";
@@ -7,7 +7,7 @@ import { hasPhiCmsPresetUpdate } from "../../../../plugins/runtime-modules/prese
7
7
  import { PhiTableProviderError, } from "../../../../types/table-widget";
8
8
  import { createPhiTableProviderClient } from "../../../../components/widgets/client/shared/phi-table-provider";
9
9
  import { PHI_REVISIONS_RUNTIME_DATA_PROVIDER_DESCRIPTORS } from "../../../../plugins/runtime-modules/revisions/data-providers";
10
- import { getPhiWorkspaceCatalogSnapshot, PHI_WORKSPACE_CATALOG_SCOPE, } from "../../../../components/workspace/catalog-store";
10
+ import { getPhiWorkspaceCatalogSnapshot, } from "../../../../components/workspace/catalog-store";
11
11
  import { resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, resolvePhiBuilderPageKeyFromCatalogPath, } from "../../../../helpers/cms-page-catalog";
12
12
  import { PHI_BUILDER_NAVIGATION_KEY_SEARCH_PARAM, PHI_BUILDER_REVISIONS_SCOPE_SEARCH_PARAM, PHI_BUILDER_REVISIONS_KIND_SEARCH_PARAM, PHI_BUILDER_THEME_KEY_SEARCH_PARAM, normalizePhiBuilderRevisionsKindSearchParam, } from "../../../../helpers/cms-scope-search-params";
13
13
  import { resolvePhiBuilderRevisionPagePath, resolvePhiBuilderRevisionScope, } from "../types";
@@ -46,7 +46,7 @@ function readParams(value) {
46
46
  }
47
47
  const locale = value.locale;
48
48
  if (!isPhiRecord(value.scope) && typeof window !== "undefined") {
49
- const state = getPhiWorkspaceCatalogSnapshot(PHI_WORKSPACE_CATALOG_SCOPE);
49
+ const state = getPhiWorkspaceCatalogSnapshot();
50
50
  const search = new URLSearchParams(window.location.search);
51
51
  const kind = normalizePhiBuilderRevisionsKindSearchParam(value.kind) ??
52
52
  normalizePhiBuilderRevisionsKindSearchParam(search.get(PHI_BUILDER_REVISIONS_KIND_SEARCH_PARAM)) ??
@@ -251,7 +251,7 @@ function readModuleIds(value) {
251
251
  * title to show, so it is written by its id -- it is still what the revision changed.
252
252
  */
253
253
  function formatModuleChangeList(labels, modules) {
254
- const titles = new Map(getPhiWorkspaceCatalogSnapshot(PHI_WORKSPACE_CATALOG_SCOPE).runtimeModuleDefinitions
254
+ const titles = new Map(getPhiWorkspaceCatalogSnapshot().runtimeModuleDefinitions
255
255
  .map((definition) => [definition.moduleId, definition.title]));
256
256
  const name = (moduleId) => titles.get(moduleId) ?? moduleId;
257
257
  return [
@@ -13,6 +13,21 @@ import { PHI_THEME_SIGNAL_CHANNELS } from "../controller/signals";
13
13
  import { PHI_THEME_RUNTIME_MODULE_ID } from "../ids";
14
14
  import { buildPhiThemeSetSelectOptions } from "../set-options";
15
15
  import { PHI_THEME_PAGE_LAYOUT_IDS, PHI_THEME_PAGE_WIDGET_IDS } from "../page-ids";
16
+ /**
17
+ * A Theme panel's way to hear the preview mode switch: the switch broadcasts on the Page, and every panel
18
+ * that draws in that mode takes it through this route, as any Widget takes an input.
19
+ */
20
+ function brandPreviewModeListenRoute(widgetId) {
21
+ return {
22
+ routeKey: "brand-preview-mode",
23
+ capabilityId: "previewThemeMode",
24
+ scope: "page",
25
+ channel: PHI_THEME_SIGNAL_CHANNELS.previewThemeMode,
26
+ action: "change",
27
+ valueType: "boolean",
28
+ receiver: createPhiSignalAddress("cms", widgetId),
29
+ };
30
+ }
16
31
  const PHI_THEME_PAGE_PRESET_KEY = "builder-theme-page";
17
32
  const PHI_THEME_PAGE_REGION_IDS = {
18
33
  regionHeaderBottom: -511,
@@ -527,6 +542,7 @@ export async function buildPhiDefaultBuilderThemePageTree({ page, runtime, regis
527
542
  label: "dev brand theme controls",
528
543
  config: {
529
544
  themeKey: "default",
545
+ signalRoutes: { listens: [brandPreviewModeListenRoute(PHI_THEME_PAGE_WIDGET_IDS.widgetBrandThemeControls)] },
530
546
  minSize: { width: 300 },
531
547
  maxSize: { width: 400 },
532
548
  },
@@ -540,6 +556,7 @@ export async function buildPhiDefaultBuilderThemePageTree({ page, runtime, regis
540
556
  label: "dev brand theme preview",
541
557
  config: {
542
558
  themeKey: "default",
559
+ signalRoutes: { listens: [brandPreviewModeListenRoute(PHI_THEME_PAGE_WIDGET_IDS.widgetBrandThemePreview)] },
543
560
  minSize: { width: 360 },
544
561
  },
545
562
  }),
@@ -565,6 +582,7 @@ export async function buildPhiDefaultBuilderThemePageTree({ page, runtime, regis
565
582
  label: "dev brand background controls",
566
583
  config: {
567
584
  themeKey: "default",
585
+ signalRoutes: { listens: [brandPreviewModeListenRoute(PHI_THEME_PAGE_WIDGET_IDS.widgetBrandBackgroundControls)] },
568
586
  // The three Theme panels share one slot, so they share one width. A wider Background
569
587
  // panel widened the slot itself and the column jumped whenever it was selected.
570
588
  minSize: { width: 300 },
@@ -580,6 +598,7 @@ export async function buildPhiDefaultBuilderThemePageTree({ page, runtime, regis
580
598
  label: "dev brand background preview",
581
599
  config: {
582
600
  themeKey: "default",
601
+ signalRoutes: { listens: [brandPreviewModeListenRoute(PHI_THEME_PAGE_WIDGET_IDS.widgetBrandBackgroundPreview)] },
583
602
  minSize: { width: 360 },
584
603
  },
585
604
  }),
@@ -592,6 +611,7 @@ export async function buildPhiDefaultBuilderThemePageTree({ page, runtime, regis
592
611
  label: "dev brand style preview",
593
612
  config: {
594
613
  themeKey: "default",
614
+ signalRoutes: { listens: [brandPreviewModeListenRoute(PHI_THEME_PAGE_WIDGET_IDS.widgetBrandStylePreview)] },
595
615
  minSize: { width: 360 },
596
616
  },
597
617
  }),
@@ -604,6 +624,7 @@ export async function buildPhiDefaultBuilderThemePageTree({ page, runtime, regis
604
624
  label: "dev brand identity controls",
605
625
  config: {
606
626
  themeKey: "default",
627
+ signalRoutes: { listens: [brandPreviewModeListenRoute(PHI_THEME_PAGE_WIDGET_IDS.widgetBrandIdentityControls)] },
607
628
  minSize: { width: 300 },
608
629
  maxSize: { width: 400 },
609
630
  },
@@ -624,6 +645,7 @@ export async function buildPhiDefaultBuilderThemePageTree({ page, runtime, regis
624
645
  label: "dev brand identity preview",
625
646
  config: {
626
647
  themeKey: "default",
648
+ signalRoutes: { listens: [brandPreviewModeListenRoute(PHI_THEME_PAGE_WIDGET_IDS.widgetBrandIdentityPreview)] },
627
649
  minSize: { width: 360 },
628
650
  },
629
651
  }),
@@ -29,6 +29,7 @@ export declare function PhiBuilderBrandBackgroundControlsWidgetClient({ runtime,
29
29
  runtime: PhiBlockRuntime;
30
30
  config?: PhiBuilderBrandWidgetConfig | null;
31
31
  }): import("react").JSX.Element;
32
- export declare function PhiBuilderBrandThemePreviewWidgetClient({ runtime, }: {
32
+ export declare function PhiBuilderBrandThemePreviewWidgetClient({ runtime, config, }: {
33
33
  runtime: PhiBlockRuntime;
34
+ config?: PhiBuilderBrandWidgetConfig | null;
34
35
  }): import("react").JSX.Element;