@phis/ui 0.4.2 → 0.4.4

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 (335) 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-anchor-nav-control.js +4 -1
  7. package/components/controls/phi-background-control.js +21 -6
  8. package/components/controls/phi-bullet-list-control.d.ts +7 -2
  9. package/components/controls/phi-bullet-list-control.js +35 -5
  10. package/components/controls/phi-color-control.js +4 -2
  11. package/components/controls/phi-drawer-control-adapter.js +3 -2
  12. package/components/controls/phi-inline-text-editor.js +7 -1
  13. package/components/controls/phi-length-control.js +1 -1
  14. package/components/controls/phi-ribbon-control.d.ts +38 -0
  15. package/components/controls/phi-ribbon-control.js +57 -0
  16. package/components/controls/phi-ribbon-wrap-control.d.ts +26 -0
  17. package/components/controls/phi-ribbon-wrap-control.js +25 -0
  18. package/components/controls/phi-select-control.js +5 -2
  19. package/components/controls/phi-series-chart-control.d.ts +48 -0
  20. package/components/controls/phi-series-chart-control.js +82 -0
  21. package/components/controls/phi-table-control.d.ts +3 -0
  22. package/components/controls/phi-table-control.js +13 -1
  23. package/components/controls/phi-text-control.js +57 -3
  24. package/components/controls/phi-tree-control.js +4 -4
  25. package/components/controls/phi-truncated-hover-text.d.ts +15 -0
  26. package/components/controls/phi-truncated-hover-text.js +25 -0
  27. package/components/forms/link-target-form-control.d.ts +1 -1
  28. package/components/forms/link-target-form-control.js +2 -45
  29. package/components/forms/phi-form-widget-frame.js +4 -2
  30. package/components/forms/shared-form-provider-registry.js +1 -4
  31. package/components/layouts/clients/phi-three-column-layout-client.js +10 -1
  32. package/components/media/asset-collection-runtime.js +6 -16
  33. package/components/media/media-font-metrics.d.ts +3 -0
  34. package/components/media/media-font-metrics.js +43 -0
  35. package/components/media/phi-area-upload-widget.js +53 -97
  36. package/components/media/phi-image-preview-data.d.ts +13 -0
  37. package/components/media/phi-image-preview-data.js +184 -9
  38. package/components/media/phi-media-picker-binding.js +16 -13
  39. package/components/media/phi-media-upload.d.ts +15 -8
  40. package/components/media/phi-media-upload.js +18 -9
  41. package/components/media/phi-site-font-assets.js +7 -8
  42. package/components/navigation/phi-link.js +6 -1
  43. package/components/overlays/phi-overlay-container-client.js +16 -1
  44. package/components/regions/clients/cms-region-container-client.js +6 -1
  45. package/components/regions/phi-cms-region-container.js +3 -0
  46. package/components/regions/phi-cms-region-shell.d.ts +12 -1
  47. package/components/regions/phi-cms-region-shell.js +81 -19
  48. package/components/regions/presets/phi-settings-page-shell-tree.js +48 -1
  49. package/components/root/phi-config-provider.d.ts +13 -0
  50. package/components/root/phi-config-provider.js +12 -1
  51. package/components/root/phi-root-background.d.ts +7 -0
  52. package/components/root/phi-root-background.js +20 -1
  53. package/components/root/phi-root-theme-resolver.js +3 -0
  54. package/components/root/phi-shell-chrome-overlay.d.ts +12 -1
  55. package/components/root/phi-shell-chrome-overlay.js +19 -3
  56. package/components/runtime/runtime-controller-materialization.js +12 -1
  57. package/components/shell/phi-antd-icon.d.ts +1 -0
  58. package/components/shell/phi-antd-icon.js +3 -0
  59. package/components/shell/use-phi-shell-sticky-top.js +61 -16
  60. package/components/state/scoped-state-store.js +20 -3
  61. package/components/surface/phi-surface-tone.d.ts +13 -0
  62. package/components/surface/phi-surface-tone.js +21 -0
  63. package/components/tables/client/phi-table-binding.d.ts +2 -1
  64. package/components/tables/client/phi-table-binding.js +45 -21
  65. package/components/trees/client/phi-tree-binding.js +19 -11
  66. package/components/widgets/client/bullet-list-entries-editor.d.ts +26 -0
  67. package/components/widgets/client/bullet-list-entries-editor.js +109 -0
  68. package/components/widgets/client/html-editor.js +1 -1
  69. package/components/widgets/client/shared/use-page-reference-options.d.ts +17 -0
  70. package/components/widgets/client/shared/use-page-reference-options.js +57 -0
  71. package/components/widgets/config/background.d.ts +32 -1
  72. package/components/widgets/config/background.js +41 -2
  73. package/components/widgets/config/choice-shared.js +12 -13
  74. package/components/widgets/config/command-buttons.d.ts +5 -1
  75. package/components/widgets/config/command-buttons.js +38 -81
  76. package/components/widgets/config/control-signal-config.d.ts +3 -1
  77. package/components/widgets/config/control-signal-config.js +19 -17
  78. package/components/widgets/config/image-source-parser.d.ts +1 -0
  79. package/components/widgets/config/image-source-parser.js +7 -8
  80. package/components/widgets/config/mask.d.ts +6 -1
  81. package/components/widgets/config/mask.js +24 -1
  82. package/components/widgets/config/parser-primitives.js +72 -0
  83. package/components/widgets/config/stack-tabs.d.ts +1 -1
  84. package/components/widgets/config/stack-tabs.js +2 -3
  85. package/components/widgets/config/strict-config-reader.d.ts +40 -0
  86. package/components/widgets/config/strict-config-reader.js +174 -0
  87. package/components/widgets/label-sets/background.js +2 -0
  88. package/components/widgets/label-sets/effects.js +2 -0
  89. package/components/widgets/label-types/background.d.ts +1 -0
  90. package/components/widgets/label-types/background.js +1 -0
  91. package/components/widgets/label-types/effects.d.ts +1 -0
  92. package/components/widgets/label-types/effects.js +1 -0
  93. package/components/widgets/navigation-descriptor-resolver.server.js +20 -8
  94. package/components/widgets/shared/bullet-list-vocabulary.d.ts +27 -1
  95. package/components/widgets/shared/bullet-list-vocabulary.js +24 -4
  96. package/components/widgets/shared/card-body-client.d.ts +18 -4
  97. package/components/widgets/shared/card-body-client.js +126 -26
  98. package/components/widgets/shared/card-vocabulary.d.ts +31 -4
  99. package/components/widgets/shared/card-vocabulary.js +35 -2
  100. package/components/widgets/shared/markdown-body-client.js +39 -10
  101. package/components/widgets/signals/control-signal-capabilities.d.ts +0 -18
  102. package/components/widgets/signals/control-signal-capabilities.js +10 -22
  103. package/components/workspace/catalog-store.d.ts +4 -3
  104. package/components/workspace/catalog-store.js +6 -5
  105. package/gateway/dashboard-cards-route.js +1 -0
  106. package/gateway/internal-references.d.ts +6 -1
  107. package/gateway/internal-references.js +48 -23
  108. package/gateway/site-cms-write-validation.d.ts +9 -0
  109. package/gateway/site-cms-write-validation.js +78 -0
  110. package/gateway/site-proxy.js +19 -3
  111. package/helpers/cms-container-chrome.js +6 -1
  112. package/helpers/locale.d.ts +8 -0
  113. package/helpers/locale.js +18 -0
  114. package/helpers/renderable-block-serialization.js +1 -1
  115. package/helpers/shell-region-style.js +2 -1
  116. package/helpers/surface-style.d.ts +12 -1
  117. package/helpers/surface-style.js +28 -2
  118. package/module-dashboard-cards.d.ts +1 -1
  119. package/module-dashboard-cards.js +1 -1
  120. package/next/config.d.mts +3 -0
  121. package/next/config.mjs +28 -1
  122. package/package.json +2 -2
  123. package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +5 -1
  124. package/plugins/runtime-modules/accounting/presets.d.ts +9 -0
  125. package/plugins/runtime-modules/accounting/presets.js +37 -0
  126. package/plugins/runtime-modules/accounting/server.d.ts +1 -4
  127. package/plugins/runtime-modules/accounting/server.js +4 -7
  128. package/plugins/runtime-modules/app/presets.d.ts +18 -0
  129. package/plugins/runtime-modules/app/presets.js +67 -0
  130. package/plugins/runtime-modules/app/server.d.ts +1 -4
  131. package/plugins/runtime-modules/app/server.js +4 -7
  132. package/plugins/runtime-modules/area-definitions.d.ts +0 -42
  133. package/plugins/runtime-modules/area-definitions.js +3 -8
  134. package/plugins/runtime-modules/asset/controller/runtime.js +2 -2
  135. package/plugins/runtime-modules/asset/services/collection.js +9 -1
  136. package/plugins/runtime-modules/asset/services/options.js +2 -2
  137. package/plugins/runtime-modules/builder/area-settings-answer.js +2 -1
  138. package/plugins/runtime-modules/builder/authoring-canvas.js +6 -6
  139. package/plugins/runtime-modules/builder/cards.js +3 -5
  140. package/plugins/runtime-modules/builder/clients/builder-region-overrides.js +3 -3
  141. package/plugins/runtime-modules/builder/clients/canvas-widget.js +15 -54
  142. package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +4 -1
  143. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +25 -35
  144. package/plugins/runtime-modules/builder/clients/inspector-link-target-field.js +1 -1
  145. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +8 -8
  146. package/plugins/runtime-modules/builder/clients/inspector-title.js +6 -6
  147. package/plugins/runtime-modules/builder/clients/layout-inspector.d.ts +1 -1
  148. package/plugins/runtime-modules/builder/clients/layout-inspector.js +11 -25
  149. package/plugins/runtime-modules/builder/clients/layout-scaffold-overlays.js +10 -5
  150. package/plugins/runtime-modules/builder/clients/mode-switch.js +1 -1
  151. package/plugins/runtime-modules/builder/clients/pages-header.js +11 -11
  152. package/plugins/runtime-modules/builder/clients/pages-workspace.js +1 -1
  153. package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
  154. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +1 -1
  155. package/plugins/runtime-modules/builder/clients/shells-workspace.js +15 -31
  156. package/plugins/runtime-modules/builder/clients/structure-canvas.js +1 -1
  157. package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.d.ts +26 -0
  158. package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.js +36 -0
  159. package/plugins/runtime-modules/builder/clients/widget-effects-editor.js +1 -1
  160. package/plugins/runtime-modules/builder/clients/widget-inspector.js +1 -0
  161. package/plugins/runtime-modules/builder/clients/workspace-scope-boundary.js +2 -2
  162. package/plugins/runtime-modules/builder/cms-instance-allocator.js +8 -28
  163. package/plugins/runtime-modules/builder/controller/client.d.ts +0 -15
  164. package/plugins/runtime-modules/builder/controller/definition.d.ts +0 -15
  165. package/plugins/runtime-modules/builder/controller/definition.js +0 -8
  166. package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +1 -2
  167. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +11 -30
  168. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +15 -2
  169. package/plugins/runtime-modules/builder/controller/inspector-controller.d.ts +1 -2
  170. package/plugins/runtime-modules/builder/controller/inspector-controller.js +4 -7
  171. package/plugins/runtime-modules/builder/controller/page-controller.d.ts +1 -2
  172. package/plugins/runtime-modules/builder/controller/page-controller.js +16 -68
  173. package/plugins/runtime-modules/builder/controller/server-definition.d.ts +0 -15
  174. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.d.ts +2 -5
  175. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +6 -50
  176. package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +2 -3
  177. package/plugins/runtime-modules/builder/controller/workspace-controller.js +89 -153
  178. package/plugins/runtime-modules/builder/data-providers.d.ts +1 -0
  179. package/plugins/runtime-modules/builder/data-providers.js +1 -0
  180. package/plugins/runtime-modules/builder/definition.d.ts +1 -0
  181. package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +64 -30
  182. package/plugins/runtime-modules/builder/developer-workspace-store.js +255 -61
  183. package/plugins/runtime-modules/builder/edit-scaffold-drawer.js +4 -3
  184. package/plugins/runtime-modules/builder/history.d.ts +3 -1
  185. package/plugins/runtime-modules/builder/options-providers.js +3 -2
  186. package/plugins/runtime-modules/builder/page-catalog-client.js +19 -7
  187. package/plugins/runtime-modules/builder/page-meta-form.js +1 -0
  188. package/plugins/runtime-modules/builder/page-references-provider.js +1 -1
  189. package/plugins/runtime-modules/builder/persistence.js +33 -69
  190. package/plugins/runtime-modules/builder/public-route-collisions.d.ts +2 -2
  191. package/plugins/runtime-modules/builder/public-route-collisions.js +6 -19
  192. package/plugins/runtime-modules/builder/render-root-node-preview.server.js +20 -3
  193. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +28 -18
  194. package/plugins/runtime-modules/builder/runtime-module-selection.d.ts +2 -12
  195. package/plugins/runtime-modules/builder/runtime-module-selection.js +16 -42
  196. package/plugins/runtime-modules/builder/services/navigation-table.js +9 -15
  197. package/plugins/runtime-modules/builder/services/page-source-tree.js +8 -8
  198. package/plugins/runtime-modules/builder/services/runtime-modules-table.js +10 -10
  199. package/plugins/runtime-modules/builder/services/signal-routes-table.js +3 -3
  200. package/plugins/runtime-modules/builder/signal-route-selection.d.ts +1 -2
  201. package/plugins/runtime-modules/builder/signal-route-selection.js +2 -2
  202. package/plugins/runtime-modules/builder/signal-wiring-options.js +3 -2
  203. package/plugins/runtime-modules/builder/structure-dnd.js +8 -61
  204. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +17 -10
  205. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +27 -22
  206. package/plugins/runtime-modules/builder/workspace-catalog-actions.d.ts +55 -0
  207. package/plugins/runtime-modules/builder/workspace-catalog-actions.js +142 -0
  208. package/plugins/runtime-modules/client-authoring-module.d.ts +8 -1
  209. package/plugins/runtime-modules/client-authoring-module.js +13 -3
  210. package/plugins/runtime-modules/client-manifests/common.js +1 -1
  211. package/plugins/runtime-modules/{runtime-calendar-adapters.js → core/calendar-adapters.js} +2 -2
  212. package/plugins/runtime-modules/{client-calendar-adapters/core.js → core/client-calendar-adapters.js} +1 -1
  213. package/plugins/runtime-modules/core/content-entries/table.js +1 -1
  214. package/plugins/runtime-modules/core/data-providers.d.ts +3 -0
  215. package/plugins/runtime-modules/core/data-providers.js +2 -1
  216. package/plugins/runtime-modules/core/definition.d.ts +3 -0
  217. package/plugins/runtime-modules/core/definition.js +1 -1
  218. package/plugins/runtime-modules/core/messaging/data-providers.d.ts +1 -0
  219. package/plugins/runtime-modules/core/messaging/data-providers.js +1 -0
  220. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +1 -1
  221. package/plugins/runtime-modules/core/server.js +1 -1
  222. package/plugins/runtime-modules/core/themes.d.ts +44 -0
  223. package/plugins/runtime-modules/core/themes.js +12 -0
  224. package/plugins/runtime-modules/core/widgets/brand/client.d.ts +12 -3
  225. package/plugins/runtime-modules/core/widgets/brand/client.js +3 -11
  226. package/plugins/runtime-modules/core/widgets/brand/home.d.ts +15 -0
  227. package/plugins/runtime-modules/core/widgets/brand/home.js +18 -0
  228. package/plugins/runtime-modules/core/widgets/brand/plugin.js +3 -2
  229. package/plugins/runtime-modules/core/widgets/brand/server.d.ts +2 -2
  230. package/plugins/runtime-modules/core/widgets/brand/server.js +2 -2
  231. package/plugins/runtime-modules/core/widgets/card/collection-view-binding.js +25 -9
  232. package/plugins/runtime-modules/core/widgets/card/config.d.ts +301 -254
  233. package/plugins/runtime-modules/core/widgets/card/config.js +68 -3
  234. package/plugins/runtime-modules/core/widgets/card/editor.js +41 -4
  235. package/plugins/runtime-modules/core/widgets/card/server.d.ts +3 -0
  236. package/plugins/runtime-modules/core/widgets/card/server.js +32 -3
  237. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +7 -6
  238. package/plugins/runtime-modules/core/widgets/collection-view/config.js +9 -2
  239. package/plugins/runtime-modules/core/widgets/description/client.js +3 -3
  240. package/plugins/runtime-modules/core/widgets/description/config.d.ts +2 -25
  241. package/plugins/runtime-modules/core/widgets/description/editor.js +7 -63
  242. package/plugins/runtime-modules/core/widgets/description/server.js +3 -2
  243. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +2 -25
  244. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +2 -25
  245. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +2 -2
  246. package/plugins/runtime-modules/core/widgets/html/client.js +1 -1
  247. package/plugins/runtime-modules/core/widgets/image/config.js +2 -2
  248. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +320 -2
  249. package/plugins/runtime-modules/core/widgets/markdown/config.js +18 -4
  250. package/plugins/runtime-modules/core/widgets/markdown/editor.js +11 -4
  251. package/plugins/runtime-modules/core/widgets/markdown-toc/client.js +6 -1
  252. package/plugins/runtime-modules/core/widgets/markdown-toc/config.d.ts +14 -0
  253. package/plugins/runtime-modules/core/widgets/markdown-toc/config.js +14 -2
  254. package/plugins/runtime-modules/core/widgets/quick-links/authoring.js +7 -2
  255. package/plugins/runtime-modules/core/widgets/quick-links/client.js +2 -2
  256. package/plugins/runtime-modules/core/widgets/quick-links/items.d.ts +0 -2
  257. package/plugins/runtime-modules/core/widgets/quick-links/items.js +0 -15
  258. package/plugins/runtime-modules/core/widgets/result/config.d.ts +5 -25
  259. package/plugins/runtime-modules/core/widgets/result/config.js +2 -0
  260. package/plugins/runtime-modules/core/widgets/result/server.js +25 -19
  261. package/plugins/runtime-modules/core/widgets/sidebar-navigation/authoring.js +1 -1
  262. package/plugins/runtime-modules/core/widgets/sidebar-navigation/client.js +1 -1
  263. package/plugins/runtime-modules/core/widgets/simple-text/client.js +8 -3
  264. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +2 -25
  265. package/plugins/runtime-modules/core/widgets/simple-text/editor.js +2 -2
  266. package/plugins/runtime-modules/core/widgets/slot-upload/client.js +11 -2
  267. package/plugins/runtime-modules/core/widgets/table/client.js +8 -4
  268. package/plugins/runtime-modules/core/widgets/table/config.d.ts +6 -83
  269. package/plugins/runtime-modules/core/widgets/table/config.js +302 -452
  270. package/plugins/runtime-modules/core/widgets/tree/config.js +5 -2
  271. package/plugins/runtime-modules/dashboard/card-rows.d.ts +7 -0
  272. package/plugins/runtime-modules/dashboard/card-rows.js +87 -0
  273. package/plugins/runtime-modules/dashboard/clients/dashboard-card-view.js +32 -12
  274. package/plugins/runtime-modules/dashboard/services/collection.js +17 -7
  275. package/plugins/runtime-modules/dashboard/trees/phi-default-builder-dashboard-page-tree.js +5 -40
  276. package/plugins/runtime-modules/groups/data-providers.d.ts +2 -0
  277. package/plugins/runtime-modules/groups/data-providers.js +3 -3
  278. package/plugins/runtime-modules/groups/definition.d.ts +2 -0
  279. package/plugins/runtime-modules/localization/data-providers.d.ts +3 -0
  280. package/plugins/runtime-modules/localization/data-providers.js +2 -0
  281. package/plugins/runtime-modules/localization/definition.d.ts +3 -0
  282. package/plugins/runtime-modules/localization/services/table.js +3 -7
  283. package/plugins/runtime-modules/observability/data-providers.d.ts +1 -0
  284. package/plugins/runtime-modules/observability/data-providers.js +1 -0
  285. package/plugins/runtime-modules/observability/definition.d.ts +1 -0
  286. package/plugins/runtime-modules/observability/module.d.ts +1 -0
  287. package/plugins/runtime-modules/observability/services/table.js +1 -1
  288. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +2 -105
  289. package/plugins/runtime-modules/public/presets.d.ts +115 -0
  290. package/plugins/runtime-modules/{area-base-presets.js → public/presets.js} +19 -119
  291. package/plugins/runtime-modules/public/server.d.ts +1 -4
  292. package/plugins/runtime-modules/public/server.js +4 -7
  293. package/plugins/runtime-modules/public/trees/phi-default-pub-error-page-tree.js +7 -8
  294. package/plugins/runtime-modules/public-base-page-references.d.ts +1 -1
  295. package/plugins/runtime-modules/public-base-page-references.js +1 -1
  296. package/plugins/runtime-modules/revisions/controller/client.js +11 -11
  297. package/plugins/runtime-modules/revisions/services/table.js +3 -3
  298. package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +22 -0
  299. package/plugins/runtime-modules/theme/widgets/brand-controls/client.d.ts +2 -1
  300. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +111 -72
  301. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +2 -1
  302. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +28 -31
  303. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +1 -1
  304. package/plugins/runtime-modules/theme-descriptors.js +1 -1
  305. package/plugins/runtime-modules/user-management/data-providers.d.ts +2 -0
  306. package/plugins/runtime-modules/user-management/data-providers.js +1 -0
  307. package/plugins/runtime-modules/user-management/definition.d.ts +2 -0
  308. package/server-helpers/cms-link-targets.js +6 -0
  309. package/styles/control-shape.css +11 -11
  310. package/styles/controls.css +67 -5
  311. package/styles/layout.css +61 -9
  312. package/styles/shell.css +73 -0
  313. package/theme/phi-antd-token-resolver.js +20 -1
  314. package/theme/phi-theme-tokens.d.ts +1 -1
  315. package/theme/phi-theme-tokens.js +1 -0
  316. package/theme/phi-theme.d.ts +5 -0
  317. package/theme/phi-theme.js +21 -0
  318. package/theme/phi-tokens.d.ts +16 -15
  319. package/theme/phi-tokens.js +16 -15
  320. package/types/cms-config.js +142 -185
  321. package/types/cms-plugins.d.ts +6 -11
  322. package/types/core-widget-placements.d.ts +14 -3
  323. package/types/dashboard-cards.d.ts +48 -4
  324. package/types/dashboard-cards.js +6 -0
  325. package/types/media.d.ts +0 -3
  326. package/types/renderable-block.d.ts +6 -1
  327. package/types/site-theme.d.ts +10 -2
  328. package/types/table-widget.d.ts +9 -0
  329. package/types/table-widget.js +20 -0
  330. package/types.d.ts +1 -1
  331. package/widget-config.d.ts +2 -0
  332. package/widget-config.js +6 -0
  333. package/plugins/runtime-modules/area-base-presets.d.ts +0 -139
  334. /package/plugins/runtime-modules/{runtime-calendar-adapters.d.ts → core/calendar-adapters.d.ts} +0 -0
  335. /package/plugins/runtime-modules/{client-calendar-adapters/core.d.ts → core/client-calendar-adapters.d.ts} +0 -0
@@ -17,8 +17,6 @@ import { PHI_DEFAULT_PUB_AREA_LAYOUT_NODE_KEYS, PHI_DEFAULT_PUB_AREA_WIDGET_NODE
17
17
  const SYNTHETIC_REGION_IDS = {
18
18
  regionHeaderTop: -1,
19
19
  regionHeaderMain: -2,
20
- regionHeaderBottom: -3,
21
- regionSiderRight: -24,
22
20
  regionFooterTop: -27,
23
21
  regionFooterMain: -28,
24
22
  regionFooterBottom: -33,
@@ -34,11 +32,8 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
34
32
  ownerModuleId,
35
33
  presetKey,
36
34
  }, PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS);
37
- const navigationArea = runtimeModuleArea === "public" ? "public" : runtimeModuleArea;
38
35
  const headerMainRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "header_main");
39
36
  const headerTopRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "header_top");
40
- const headerBottomRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "header_bottom");
41
- const siderRightRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "sider_right");
42
37
  const footerMainRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_main");
43
38
  const footerTopRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_top");
44
39
  const footerBottomRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_bottom");
@@ -68,19 +63,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
68
63
  family: "header",
69
64
  region: "main",
70
65
  });
71
- const shellHeaderBottomHeight = resolvePhiShellHeaderHeight(runtime.site.theme?.shell, "bottom");
72
- const shellHeaderBottomOffsetTop = resolvePhiShellMetric(runtime.site.theme?.shell, "offsetTop", {
73
- family: "header",
74
- region: "bottom",
75
- });
76
- const shellSiderRightWidth = resolvePhiShellMetric(runtime.site.theme?.shell, "width", {
77
- family: "sider",
78
- region: "right",
79
- });
80
- const shellSiderRightOffsetTop = resolvePhiShellMetric(runtime.site.theme?.shell, "offsetTop", {
81
- family: "sider",
82
- region: "right",
83
- });
84
66
  const shellFooterMainHeight = resolvePhiShellMetric(runtime.site.theme?.shell, "height", {
85
67
  family: "footer",
86
68
  region: "main",
@@ -135,44 +117,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
135
117
  }),
136
118
  ]
137
119
  : []),
138
- ...(headerBottomRegion
139
- ? [
140
- nodes.region({
141
- id: SYNTHETIC_REGION_IDS.regionHeaderBottom,
142
- regionType: PhiCmsRegionType.HeaderBottom,
143
- rootLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderBottom,
144
- status: headerBottomRegion.status,
145
- flags: headerBottomRegion.flags,
146
- visibilityMask: headerBottomRegion.visibilityMask,
147
- sortOrder: headerBottomRegion.sortOrder,
148
- config: {
149
- ...headerBottomRegion.config,
150
- size: { ...(headerBottomRegion.config.size ?? {}), height: `${shellHeaderBottomHeight}px` },
151
- ...(typeof shellHeaderBottomOffsetTop === "number" ? { offsetTop: shellHeaderBottomOffsetTop } : {}),
152
- },
153
- }),
154
- ]
155
- : []),
156
- ...(siderRightRegion
157
- ? [
158
- nodes.region({
159
- id: SYNTHETIC_REGION_IDS.regionSiderRight,
160
- regionType: PhiCmsRegionType.SiderRight,
161
- rootLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutSiderRight,
162
- status: siderRightRegion.status,
163
- flags: siderRightRegion.flags,
164
- visibilityMask: siderRightRegion.visibilityMask,
165
- sortOrder: siderRightRegion.sortOrder,
166
- config: {
167
- ...siderRightRegion.config,
168
- ...(typeof shellSiderRightWidth === "number"
169
- ? { size: { ...(siderRightRegion.config.size ?? {}), width: `${shellSiderRightWidth}px` } }
170
- : {}),
171
- ...(typeof shellSiderRightOffsetTop === "number" ? { offsetTop: shellSiderRightOffsetTop } : {}),
172
- },
173
- }),
174
- ]
175
- : []),
176
120
  ...(footerTopRegion
177
121
  ? [
178
122
  nodes.region({
@@ -295,53 +239,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
295
239
  paddingRight: 0,
296
240
  },
297
241
  },
298
- ...(headerBottomRegion
299
- ? [
300
- {
301
- id: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderBottom,
302
- siteId: page.siteId,
303
- parentLayoutNodeId: null,
304
- widgetType: buildPhiCmsLayoutNamespacedTypeKey(resolvePhiCmsLayoutPluginKey("flex"), "flex"),
305
- slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
306
- sortOrder: 10,
307
- status: 1,
308
- flags: 0,
309
- visibilityMask: page.visibilityMask,
310
- label: "pub header bottom flex",
311
- config: {
312
- anchor: {
313
- horizontal: "left",
314
- vertical: "middle",
315
- },
316
- gap: 0,
317
- wrap: false,
318
- },
319
- },
320
- ]
321
- : []),
322
- ...(siderRightRegion
323
- ? [
324
- {
325
- id: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutSiderRight,
326
- siteId: page.siteId,
327
- parentLayoutNodeId: null,
328
- widgetType: buildPhiCmsLayoutNamespacedTypeKey(resolvePhiCmsLayoutPluginKey("flex-vertical"), "flex-vertical"),
329
- slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
330
- sortOrder: 16,
331
- status: 1,
332
- flags: 0,
333
- visibilityMask: page.visibilityMask,
334
- label: "pub sider right vertical",
335
- config: {
336
- anchor: {
337
- horizontal: "center",
338
- vertical: "top",
339
- },
340
- gap: 0,
341
- },
342
- },
343
- ]
344
- : []),
345
242
  ...(footerTopRegion
346
243
  ? [
347
244
  {
@@ -516,7 +413,7 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
516
413
  visibilityMask: page.visibilityMask,
517
414
  label: "pub header main navigation",
518
415
  config: {
519
- navKey: `${navigationArea}:header`,
416
+ navKey: `${runtimeModuleArea}:header`,
520
417
  },
521
418
  contentVersionId: null,
522
419
  },
@@ -588,7 +485,7 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
588
485
  config: {
589
486
  title: "Quick Links",
590
487
  textSource: PHI_TEXT_SOURCE_PRESET,
591
- navKey: `${navigationArea}:footer`,
488
+ navKey: `${runtimeModuleArea}:footer`,
592
489
  columns: 2,
593
490
  separator: true,
594
491
  },
@@ -0,0 +1,115 @@
1
+ import type { PhiCmsDescriptorBuildContext } from "../../../types/cms-module-descriptors";
2
+ export declare const PHI_PUBLIC_RUNTIME_MODULE_AREA_SHELLS: {
3
+ ownerModuleId: "@phis/ui/modules/public";
4
+ presetKey: string;
5
+ shellPresetVersion: number;
6
+ area: "public";
7
+ exportedNodeKeys: readonly ["widgetBrand", "widgetNav", "widgetLocale"];
8
+ loadTree: ({ page, runtime }: PhiCmsDescriptorBuildContext) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
9
+ }[];
10
+ export declare const PHI_PUBLIC_RUNTIME_MODULE_ROUTES: ({
11
+ ownerModuleId: "@phis/ui/modules/public";
12
+ presetKey: string;
13
+ presetVersion: number;
14
+ area: "public";
15
+ title: string;
16
+ path: string;
17
+ defaultPageFlags: number;
18
+ loadTree: ({ page }: PhiCmsDescriptorBuildContext) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
19
+ } | {
20
+ ownerModuleId: "@phis/ui/modules/public";
21
+ presetKey: "public-welcome-page";
22
+ presetVersion: number;
23
+ area: "public";
24
+ title: string;
25
+ path: string;
26
+ loadTree: ({ page, runtime }: PhiCmsDescriptorBuildContext) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
27
+ navigation?: undefined;
28
+ } | {
29
+ ownerModuleId: "@phis/ui/modules/public";
30
+ presetKey: "public-home-page";
31
+ presetVersion: number;
32
+ area: "public";
33
+ title: string;
34
+ path: string;
35
+ navigation: {
36
+ navKey: "public:header";
37
+ parentItemKey: null;
38
+ before: string;
39
+ item: {
40
+ itemKey: string;
41
+ label: {
42
+ defaultMessage: string;
43
+ };
44
+ icon: string;
45
+ routePresetKey: string;
46
+ };
47
+ }[];
48
+ loadTree: ({ page }: PhiCmsDescriptorBuildContext) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
49
+ } | {
50
+ ownerModuleId: "@phis/ui/modules/public";
51
+ presetKey: "public-terms-page";
52
+ presetVersion: number;
53
+ area: "public";
54
+ title: string;
55
+ path: string;
56
+ loadTree: ({ page }: PhiCmsDescriptorBuildContext & {
57
+ activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
58
+ params: Readonly<Record<string, string>>;
59
+ }) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
60
+ navigation?: undefined;
61
+ })[];
62
+ /**
63
+ * The Public form pages, in their own list because they appear only where Forms are allowed. The
64
+ * contact page is Core's like the terms: every Site starts with a way to be reached, and neither is
65
+ * a landing -- the front door is the Site package's business.
66
+ */
67
+ export declare const PHI_PUBLIC_FORM_RUNTIME_MODULE_ROUTES: ({
68
+ ownerModuleId: "@phis/ui/modules/public";
69
+ presetKey: "public-contact-page";
70
+ presetVersion: number;
71
+ area: "public";
72
+ title: string;
73
+ path: string;
74
+ navigation: ({
75
+ navKey: "public:header";
76
+ parentItemKey: null;
77
+ after: string;
78
+ item: {
79
+ itemKey: string;
80
+ label: {
81
+ defaultMessage: string;
82
+ };
83
+ icon: string;
84
+ routePresetKey: string;
85
+ };
86
+ } | {
87
+ navKey: "public:footer";
88
+ parentItemKey: null;
89
+ after: string;
90
+ item: {
91
+ itemKey: string;
92
+ label: {
93
+ defaultMessage: string;
94
+ };
95
+ routePresetKey: string;
96
+ icon?: undefined;
97
+ };
98
+ })[];
99
+ loadTree: ({ page }: PhiCmsDescriptorBuildContext & {
100
+ activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
101
+ params: Readonly<Record<string, string>>;
102
+ }) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
103
+ } | {
104
+ ownerModuleId: "@phis/ui/modules/public";
105
+ presetKey: "public-unsubscribe-page";
106
+ presetVersion: number;
107
+ area: "public";
108
+ title: string;
109
+ path: string;
110
+ navigation: never[];
111
+ loadTree: ({ page }: PhiCmsDescriptorBuildContext & {
112
+ activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
113
+ params: Readonly<Record<string, string>>;
114
+ }) => Promise<import("../../../types").PhiResolvedCmsPageTree>;
115
+ })[];
@@ -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() ?? "";