@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
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { createContext, lazy, useContext, useMemo, } from "react";
3
+ import { createContext, lazy, useCallback, useContext, useMemo, } from "react";
4
4
  const PhiRuntimeModuleAuthoringContext = createContext(new Map());
5
5
  function createPhiLazyAuthoringLayout(load) {
6
6
  return lazy(async () => {
@@ -54,8 +54,7 @@ export function usePhiRuntimeModuleAuthoringRegistration(moduleId) {
54
54
  const modules = useContext(PhiRuntimeModuleAuthoringContext);
55
55
  return moduleId ? modules.get(moduleId) ?? null : null;
56
56
  }
57
- export function usePhiAuthoringLayoutDefinition(type) {
58
- const modules = useContext(PhiRuntimeModuleAuthoringContext);
57
+ function findPhiAuthoringLayoutDefinition(modules, type) {
59
58
  for (const registration of modules.values()) {
60
59
  const definition = registration.layoutsByType.get(type);
61
60
  if (definition) {
@@ -64,3 +63,14 @@ export function usePhiAuthoringLayoutDefinition(type) {
64
63
  }
65
64
  return null;
66
65
  }
66
+ /**
67
+ * The authoring Layout definitions, as a lookup by type rather than one type's answer.
68
+ *
69
+ * A Layout names its nested Layouts only while it renders its children, and a parent Layout sizes each
70
+ * slot by the props of the element standing in it, before that element renders: a nested Layout's
71
+ * element has to carry its policy already, and a hook inside it would be too late.
72
+ */
73
+ export function usePhiAuthoringLayoutDefinitionResolver() {
74
+ const modules = useContext(PhiRuntimeModuleAuthoringContext);
75
+ return useCallback((type) => findPhiAuthoringLayoutDefinition(modules, type), [modules]);
76
+ }
@@ -11,7 +11,7 @@ import { PHI_ASSET_RUNTIME_MODULE_ID } from "../asset/ids";
11
11
  import { PHI_MEDIA_LIBRARY_ITEM_RENDERER_KEY } from "../../../constants/media-library-provider-keys";
12
12
  import { PHI_DASHBOARD_CARD_ITEM_RENDERER_KEY } from "../../../constants/dashboard-card-provider-keys";
13
13
  import { createPhiRuntimeModuleCalendarAdapterClientManifest } from "../../../components/runtime/runtime-module-calendar-adapter-client-manifest";
14
- import { PHI_CORE_CALENDAR_ADAPTER_CLIENT_DEFINITIONS } from "../client-calendar-adapters/core";
14
+ import { PHI_CORE_CALENDAR_ADAPTER_CLIENT_DEFINITIONS } from "../core/client-calendar-adapters";
15
15
  import { PhiLazyAssetRuntimeControllerClient } from "../asset/client";
16
16
  import { createPhiRuntimeModuleUiProviderClientManifest, } from "../../../components/runtime/runtime-module-ui-provider-client-manifest";
17
17
  import { PHI_AUTH_RUNTIME_MODULE_ID } from "../auth/ids";
@@ -1,5 +1,5 @@
1
- import { PHI_GREGORY_CALENDAR_ADAPTER_KEY } from "../../types/calendar-keys";
2
- import { PHI_CORE_RUNTIME_MODULE_ID } from "./core/ids";
1
+ import { PHI_GREGORY_CALENDAR_ADAPTER_KEY } from "../../../types/calendar-keys";
2
+ import { PHI_CORE_RUNTIME_MODULE_ID } from "./ids";
3
3
  export const PHI_CORE_CALENDAR_ADAPTER_DESCRIPTORS = [{
4
4
  key: PHI_GREGORY_CALENDAR_ADAPTER_KEY,
5
5
  ownerModuleId: PHI_CORE_RUNTIME_MODULE_ID,
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { PHI_GREGORY_CALENDAR_ADAPTER_KEY } from "../../../types/calendar-keys";
3
- import { PHI_CORE_RUNTIME_MODULE_ID } from "../core/ids";
3
+ import { PHI_CORE_RUNTIME_MODULE_ID } from "./ids";
4
4
  export const PHI_CORE_CALENDAR_ADAPTER_CLIENT_DEFINITIONS = [{
5
5
  key: PHI_GREGORY_CALENDAR_ADAPTER_KEY,
6
6
  ownerModuleId: PHI_CORE_RUNTIME_MODULE_ID,
@@ -53,7 +53,7 @@ async function loadEntries(kind, { query, signal }) {
53
53
  }));
54
54
  return {
55
55
  rows,
56
- total: readNumber(result?.total) ?? rows.length,
56
+ total: readNumber(result?.total),
57
57
  page: readNumber(result?.page) ?? 1,
58
58
  pageSize: readNumber(result?.pageSize) ?? (rows.length || 25),
59
59
  /*
@@ -56,6 +56,7 @@ export declare const PHI_CORE_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
56
56
  search: false;
57
57
  sorting: "none";
58
58
  pagination: "offset";
59
+ total: true;
59
60
  filterFields: string[];
60
61
  };
61
62
  actions: ({
@@ -115,6 +116,7 @@ export declare const PHI_CORE_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
115
116
  search: true;
116
117
  sorting: "multiple";
117
118
  pagination: "offset";
119
+ total: true;
118
120
  };
119
121
  }[];
120
122
  settingsFields?: undefined;
@@ -205,6 +207,7 @@ export declare const PHI_CORE_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
205
207
  filterFields: string[];
206
208
  sorting: "none";
207
209
  pagination: "offset";
210
+ total: true;
208
211
  facets: string[];
209
212
  };
210
213
  recordRead: true;
@@ -35,7 +35,7 @@ export const PHI_CORE_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
35
35
  description: "Neutral package-owned baseline for a provider-bound table.",
36
36
  rowIdentityPath: "id",
37
37
  fields: [{ key: "id", title: "ID", type: "string", required: true }],
38
- query: { search: true, sorting: "multiple", pagination: "offset" },
38
+ query: { search: true, sorting: "multiple", pagination: "offset", total: true },
39
39
  }],
40
40
  },
41
41
  ...PHI_CORE_MESSAGING_DATA_PROVIDER_DESCRIPTORS,
@@ -121,6 +121,7 @@ export const PHI_CORE_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
121
121
  filterFields: ["status"],
122
122
  sorting: "none",
123
123
  pagination: "offset",
124
+ total: true,
124
125
  facets: ["tags"],
125
126
  },
126
127
  recordRead: true,
@@ -67,6 +67,7 @@ export declare const PHI_CORE_RUNTIME_MODULE_DEFINITION: {
67
67
  search: false;
68
68
  sorting: "none";
69
69
  pagination: "offset";
70
+ total: true;
70
71
  filterFields: string[];
71
72
  };
72
73
  actions: ({
@@ -126,6 +127,7 @@ export declare const PHI_CORE_RUNTIME_MODULE_DEFINITION: {
126
127
  search: true;
127
128
  sorting: "multiple";
128
129
  pagination: "offset";
130
+ total: true;
129
131
  };
130
132
  }[];
131
133
  settingsFields?: undefined;
@@ -216,6 +218,7 @@ export declare const PHI_CORE_RUNTIME_MODULE_DEFINITION: {
216
218
  filterFields: string[];
217
219
  sorting: "none";
218
220
  pagination: "offset";
221
+ total: true;
219
222
  facets: string[];
220
223
  };
221
224
  recordRead: true;
@@ -6,7 +6,7 @@ import { PHI_CORE_RUNTIME_DATA_PROVIDER_DESCRIPTORS } from "./data-providers";
6
6
  import { PHI_CMS_AREA_KEYS } from "../../../constants/cms-areas";
7
7
  import { PHI_CORE_FORM_PROVIDER_DESCRIPTORS } from "./form-providers";
8
8
  import { PHI_CORE_SERVER_BINDING } from "../../../types/server-capabilities";
9
- import { PHI_CORE_CALENDAR_ADAPTER_DESCRIPTORS } from "../runtime-calendar-adapters";
9
+ import { PHI_CORE_CALENDAR_ADAPTER_DESCRIPTORS } from "./calendar-adapters";
10
10
  export const PHI_CORE_RUNTIME_MODULE_DEFINITION = {
11
11
  ...PHI_CORE_RUNTIME_MODULE_IDENTITY,
12
12
  kind: "platform",
@@ -77,6 +77,7 @@ export declare const PHI_CORE_MESSAGING_DATA_PROVIDER_DESCRIPTORS: {
77
77
  search: false;
78
78
  sorting: "none";
79
79
  pagination: "offset";
80
+ total: true;
80
81
  filterFields: string[];
81
82
  };
82
83
  actions: ({
@@ -81,6 +81,7 @@ export const PHI_CORE_MESSAGING_DATA_PROVIDER_DESCRIPTORS = [
81
81
  search: false,
82
82
  sorting: "none",
83
83
  pagination: "offset",
84
+ total: true,
84
85
  /*
85
86
  * The three the Core route takes, and no fourth.
86
87
  *
@@ -61,7 +61,7 @@ async function queryThreadTable({ resourceKey, query, signal, }) {
61
61
  const rows = readPhiTableRows(payload?.rows).map(readThreadRow);
62
62
  return {
63
63
  rows,
64
- total: typeof payload?.total === "number" ? payload.total : rows.length,
64
+ total: typeof payload?.total === "number" ? payload.total : undefined,
65
65
  page: typeof payload?.page === "number" ? payload.page : undefined,
66
66
  pageSize: typeof payload?.pageSize === "number" ? payload.pageSize : undefined,
67
67
  // Unread among everything the listing matches, for a footer beside the total.
@@ -1,5 +1,5 @@
1
1
  import { PHI_CORE_RUNTIME_DATA_PROVIDER_KEYS } from "../../../constants/core-data-provider-keys";
2
- import { PHI_CORE_RUNTIME_MODULE_THEMES } from "../area-base-presets";
2
+ import { PHI_CORE_RUNTIME_MODULE_THEMES } from "./themes";
3
3
  import { definePhiRuntimeModuleServerAreaContribution } from "../area-contributions";
4
4
  import { PHI_CORE_RUNTIME_MODULE_DEFINITION } from "./definition";
5
5
  import { PHI_RUNTIME_MODULE_LAYOUTS as PHI_CORE_LAYOUTS } from "./layouts";
@@ -0,0 +1,44 @@
1
+ export declare const PHI_CORE_RUNTIME_MODULE_THEMES: {
2
+ loadPreset: () => {
3
+ readonly key: "phis";
4
+ readonly version: 1;
5
+ readonly title: "Phis";
6
+ readonly description: "Warm orange brand color with a deep blue text base.";
7
+ readonly palette: {
8
+ readonly seed: {
9
+ readonly colorPrimary: "#E05A2A";
10
+ readonly colorInfo: "#7088BA";
11
+ readonly colorSuccess: "#4D8F6B";
12
+ readonly colorWarning: "#D99A2B";
13
+ readonly colorError: "#C94A3A";
14
+ readonly colorLink: "#7088BA";
15
+ };
16
+ readonly modes: {
17
+ readonly light: {
18
+ readonly seed: {
19
+ readonly colorTextBase: "#223A61";
20
+ readonly colorBgBase: "#ffffff";
21
+ };
22
+ readonly overrides: {
23
+ readonly colorFillQuaternary: "rgba(34, 58, 97, 0.03)";
24
+ };
25
+ };
26
+ readonly dark: {
27
+ readonly seed: {
28
+ readonly colorTextBase: "#DCE7F8";
29
+ readonly colorBgBase: "#050914";
30
+ };
31
+ readonly overrides: {
32
+ readonly colorFillQuaternary: "rgba(220, 231, 248, 0.06)";
33
+ };
34
+ };
35
+ };
36
+ };
37
+ };
38
+ description?: "Warm orange brand color with a deep blue text base." | undefined;
39
+ ownerModuleId: "@phis/ui/modules/core";
40
+ presetKey: string;
41
+ presetVersion: number;
42
+ themeKey: "phis";
43
+ title: "Phis";
44
+ }[];
@@ -0,0 +1,12 @@
1
+ import { PHI_CORE_THEME_PRESET_PLUGINS } from "../../../theme/phi-theme-presets";
2
+ import { PHI_CORE_RUNTIME_MODULE_ID } from "./ids";
3
+ /* The Theme presets Core ships, one descriptor each. */
4
+ export const PHI_CORE_RUNTIME_MODULE_THEMES = PHI_CORE_THEME_PRESET_PLUGINS.map((preset) => ({
5
+ ownerModuleId: PHI_CORE_RUNTIME_MODULE_ID,
6
+ presetKey: `${preset.key}-theme-preset`,
7
+ presetVersion: 1,
8
+ themeKey: preset.key,
9
+ title: preset.title,
10
+ ...(preset.description ? { description: preset.description } : {}),
11
+ loadPreset: () => preset,
12
+ }));
@@ -11,10 +11,19 @@ export type PhiBrandWidgetConfig = {
11
11
  export declare const PHI_BRAND_LINE_FALLBACK_ICONS: Record<PhiBrandWidgetLineMode, string>;
12
12
  export type PhiBrandWidgetClientProps = PhiClientBlockBaseProps<PhiNoLabels, PhiBrandWidgetConfig> & {
13
13
  fallbackTitle?: ReactNode;
14
- /** The language being read, which the way home keeps. */
15
- locale?: string;
14
+ /**
15
+ * Where the Brand leads, resolved on the Server: the Theme's `homeLinkTarget`, or the Site root in the
16
+ * language being read. A Page reference means nothing in a browser, so the address travels instead.
17
+ */
18
+ home?: PhiBrandWidgetHome;
16
19
  interactive?: boolean;
17
20
  };
21
+ /** A ready address, and whether it leaves the Site -- the shape `resolvePhiLinkHref` answers. */
22
+ export type PhiBrandWidgetHome = {
23
+ href: string;
24
+ newTab: boolean;
25
+ external: boolean;
26
+ };
18
27
  /**
19
28
  * The Brand in the Site frame: what `PhiBrandControl` shows, and where clicking it leads.
20
29
  *
@@ -22,4 +31,4 @@ export type PhiBrandWidgetClientProps = PhiClientBlockBaseProps<PhiNoLabels, Phi
22
31
  * because the Theme workspace preview shows the same Brand without being in a frame and without
23
32
  * leading anywhere.
24
33
  */
25
- export declare function PhiBrandWidgetClient({ config, locale, fallbackTitle, interactive, }: PhiBrandWidgetClientProps): import("react").JSX.Element | null;
34
+ export declare function PhiBrandWidgetClient({ config, home, fallbackTitle, interactive, }: PhiBrandWidgetClientProps): import("react").JSX.Element | null;
@@ -1,13 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import Link from "next/link";
4
3
  import { PhiBrandControl, PhiBrandLineControl, phiBrandControlIsEmpty, } from "../../../../../components/controls/phi-brand-control";
5
4
  import { isPhiBrandWidgetLineMode, } from "./mode";
6
5
  import { usePhiConfig } from "../../../../../components/root/phi-config-provider";
7
6
  import { usePhiSiteBrand } from "../../../../../components/root/phi-root-live-theme-provider";
8
7
  import { resolvePhiWidgetFontFamily } from "../../../../../components/widgets/helpers/font-family";
9
8
  import { resolvePhiWidgetFontSize } from "../../../../../components/widgets/helpers/font-size";
10
- import { localizePath } from "../../../../../helpers/locale";
9
+ import { PhiLink } from "../../../../../components/navigation/phi-link";
11
10
  /** What a line shows in front of itself where the Brand names no icon for it. */
12
11
  export const PHI_BRAND_LINE_FALLBACK_ICONS = {
13
12
  slogan: "antd:star",
@@ -20,7 +19,7 @@ export const PHI_BRAND_LINE_FALLBACK_ICONS = {
20
19
  * because the Theme workspace preview shows the same Brand without being in a frame and without
21
20
  * leading anywhere.
22
21
  */
23
- export function PhiBrandWidgetClient({ config, locale, fallbackTitle, interactive = true, }) {
22
+ export function PhiBrandWidgetClient({ config, home, fallbackTitle, interactive = true, }) {
24
23
  const brand = usePhiSiteBrand();
25
24
  // The Theme's mode, not the Widget's: one picks the Logo's picture, the other what is drawn at all.
26
25
  const { fonts, token, mode: themeMode } = usePhiConfig();
@@ -54,13 +53,6 @@ export function PhiBrandWidgetClient({ config, locale, fallbackTitle, interactiv
54
53
  if (phiBrandControlIsEmpty(presentation)) {
55
54
  return null;
56
55
  }
57
- /*
58
- * The front page in the language being read. `/` alone is answered with a redirect to the visitor's
59
- * preferred language, so a reader of `/de` could be led to `/en`; and Next's prefetch of it, which loses
60
- * its `_rsc` on that redirect, came back with the static tree's own address and a 404
61
- * (AUDIT-2026-10-13, PM15).
62
- */
63
- const homeHref = brand?.homeHref?.trim() || (locale ? localizePath(locale, "/") : "/");
64
56
  const linkStyle = {
65
57
  color: "inherit",
66
58
  textDecoration: "none",
@@ -73,5 +65,5 @@ export function PhiBrandWidgetClient({ config, locale, fallbackTitle, interactiv
73
65
  if (!interactive) {
74
66
  return (_jsx("span", { "aria-disabled": "true", style: linkStyle, children: _jsx(PhiBrandControl, { ...presentation }) }));
75
67
  }
76
- return (_jsx(Link, { href: homeHref, style: linkStyle, children: _jsx(PhiBrandControl, { ...presentation }) }));
68
+ return (_jsx(PhiLink, { href: home?.href ?? "/", external: home?.external, newTab: home?.newTab, style: linkStyle, children: _jsx(PhiBrandControl, { ...presentation }) }));
77
69
  }
@@ -0,0 +1,15 @@
1
+ import type { PhiBlockRuntime } from "../../../../../types";
2
+ import { type PhiResolvedLinkTargets } from "../../../../../types/references";
3
+ import type { PhiBrandWidgetHome } from "./client";
4
+ /**
5
+ * Where the Brand leads, as an address: the Theme's target, resolved in this render's batch of link
6
+ * targets (`resolvePhiCmsTreeLinkTargets` collects the Brand's beside the tree's), or the Site root.
7
+ *
8
+ * The root is the root in the language being read. `/` alone is answered with a redirect to the
9
+ * visitor's preferred language, so a reader of `/de` could be led to `/en`; and Next's prefetch of it,
10
+ * which loses its `_rsc` on that redirect, came back with the static tree's own address and a 404
11
+ * (AUDIT-2026-10-13, PM15). A target that does not resolve -- a Page deleted, unpublished, or brought by
12
+ * a Module that is switched off -- leads there too: the Brand is the way home and always leads somewhere.
13
+ * A resolved Page path is already locale- and Area-correct (`REFERENCES.md`).
14
+ */
15
+ export declare function resolvePhiBrandWidgetHome(runtime: Pick<PhiBlockRuntime, "site" | "locale">, links: PhiResolvedLinkTargets | null | undefined): PhiBrandWidgetHome;
@@ -0,0 +1,18 @@
1
+ import { resolvePhiLinkHref } from "../../../../../helpers/link-target";
2
+ import { localizePath } from "../../../../../helpers/locale";
3
+ import { readPhiLinkTarget } from "../../../../../types/references";
4
+ /**
5
+ * Where the Brand leads, as an address: the Theme's target, resolved in this render's batch of link
6
+ * targets (`resolvePhiCmsTreeLinkTargets` collects the Brand's beside the tree's), or the Site root.
7
+ *
8
+ * The root is the root in the language being read. `/` alone is answered with a redirect to the
9
+ * visitor's preferred language, so a reader of `/de` could be led to `/en`; and Next's prefetch of it,
10
+ * which loses its `_rsc` on that redirect, came back with the static tree's own address and a 404
11
+ * (AUDIT-2026-10-13, PM15). A target that does not resolve -- a Page deleted, unpublished, or brought by
12
+ * a Module that is switched off -- leads there too: the Brand is the way home and always leads somewhere.
13
+ * A resolved Page path is already locale- and Area-correct (`REFERENCES.md`).
14
+ */
15
+ export function resolvePhiBrandWidgetHome(runtime, links) {
16
+ return resolvePhiLinkHref(readPhiLinkTarget(runtime.site.theme?.brand?.homeLinkTarget), links)
17
+ ?? { href: localizePath(runtime.locale.current, "/"), newTab: false, external: false };
18
+ }
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { resolvePhiBrandWordmarkText } from "../../../../../helpers/brand-wordmark";
3
+ import { resolvePhiBrandWidgetHome } from "./home";
3
4
  import { PhiBrandWidget } from "./server";
4
5
  import { PHI_BRAND_WIDGET_DEFINITION, PHI_BRAND_WIDGET_PLUGIN_TYPE, } from "./config";
5
6
  /*
@@ -13,7 +14,7 @@ import { PHI_BRAND_WIDGET_DEFINITION, PHI_BRAND_WIDGET_PLUGIN_TYPE, } from "./co
13
14
  */
14
15
  export const PHI_BRAND_WIDGET_PLUGIN = {
15
16
  ...PHI_BRAND_WIDGET_DEFINITION,
16
- render: ({ widget, config, runtime }) => (_jsx(PhiBrandWidget, { fallbackTitle: resolvePhiBrandWordmarkText(runtime), locale: runtime.locale.current, mode: config.mode, fontFamily: config.fontFamily, fontSize: config.fontSize }, `widget-${widget.id}`)),
17
- renderPreview: ({ widget, config, runtime }) => (_jsx(PhiBrandWidget, { fallbackTitle: resolvePhiBrandWordmarkText(runtime), locale: runtime.locale.current, mode: config.mode, fontFamily: config.fontFamily, fontSize: config.fontSize, interactive: false }, `widget-${widget.id}`)),
17
+ render: ({ widget, config, runtime, links }) => (_jsx(PhiBrandWidget, { fallbackTitle: resolvePhiBrandWordmarkText(runtime), home: resolvePhiBrandWidgetHome(runtime, links), mode: config.mode, fontFamily: config.fontFamily, fontSize: config.fontSize }, `widget-${widget.id}`)),
18
+ renderPreview: ({ widget, config, runtime, links }) => (_jsx(PhiBrandWidget, { fallbackTitle: resolvePhiBrandWordmarkText(runtime), home: resolvePhiBrandWidgetHome(runtime, links), mode: config.mode, fontFamily: config.fontFamily, fontSize: config.fontSize, interactive: false }, `widget-${widget.id}`)),
18
19
  };
19
20
  export { PHI_BRAND_WIDGET_PLUGIN_TYPE };
@@ -1,3 +1,3 @@
1
1
  import type { PhiBrandWidgetClientProps, PhiBrandWidgetConfig } from "./client";
2
- export type PhiBrandWidgetProps = Pick<PhiBrandWidgetClientProps, "fallbackTitle" | "interactive" | "locale"> & PhiBrandWidgetConfig;
3
- export declare function PhiBrandWidget({ fallbackTitle, interactive, locale, mode, fontFamily, fontSize, }: PhiBrandWidgetProps): import("react").JSX.Element;
2
+ export type PhiBrandWidgetProps = Pick<PhiBrandWidgetClientProps, "fallbackTitle" | "interactive" | "home"> & PhiBrandWidgetConfig;
3
+ export declare function PhiBrandWidget({ fallbackTitle, interactive, home, mode, fontFamily, fontSize, }: PhiBrandWidgetProps): import("react").JSX.Element;
@@ -5,12 +5,12 @@ import { PhiRuntimeModuleRenderClientHost } from "../../../../../components/runt
5
5
  * The Brand itself is not read here. It comes from the root on the Client (`usePhiSiteBrand`), which
6
6
  * holds it with the Theme Set's Logo folded in and follows a live Theme draft.
7
7
  */
8
- export function PhiBrandWidget({ fallbackTitle, interactive, locale, mode, fontFamily, fontSize, }) {
8
+ export function PhiBrandWidget({ fallbackTitle, interactive, home, mode, fontFamily, fontSize, }) {
9
9
  const config = { mode, fontFamily, fontSize };
10
10
  return (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiCmsWidgetType.Brand, componentProps: {
11
11
  config,
12
12
  fallbackTitle,
13
- locale,
13
+ home,
14
14
  interactive,
15
15
  } }));
16
16
  }
@@ -10,6 +10,8 @@ import { PHI_SURFACE_CARD } from "../../../../../helpers/surface-presets";
10
10
  import { resolvePhiImagePresentation } from "../../../../../components/media/image-presentation";
11
11
  import { normalizePhiCssSize } from "../../../../../components/layouts/phi-layout-contract";
12
12
  import { usePhiSearchDraft } from "../../../../../components/widgets/client/shared/phi-search-draft";
13
+ import { PhiBulletListControl } from "../../../../../components/controls/phi-bullet-list-control";
14
+ import { buildPhiBulletListTree, readPhiBulletListEntries, } from "../../../../../components/widgets/shared/bullet-list-vocabulary";
13
15
  /**
14
16
  * A Collection drawn as Cards.
15
17
  *
@@ -34,15 +36,18 @@ import { usePhiSearchDraft } from "../../../../../components/widgets/client/shar
34
36
  * squeezed pair.
35
37
  */
36
38
  const CARD_MIN_COLUMN_WIDTH = 260;
39
+ /* A dot path, because a provider's rows are documents and the interesting field is often one level in. */
40
+ function readValue(item, path) {
41
+ return path.split(".").reduce((current, key) => (current && typeof current === "object"
42
+ ? current[key]
43
+ : undefined), item);
44
+ }
37
45
  function readPath(item, path) {
38
46
  if (!path) {
39
47
  return undefined;
40
48
  }
41
- // A dot path, because a provider's rows are documents and the interesting field is often one level
42
- // in. Anything that is not a string or a number is not a label and is left alone.
43
- const value = path.split(".").reduce((current, key) => (current && typeof current === "object"
44
- ? current[key]
45
- : undefined), item);
49
+ // Anything that is not a string or a number is not a label and is left alone.
50
+ const value = readValue(item, path);
46
51
  return typeof value === "string" || typeof value === "number" ? String(value) : undefined;
47
52
  }
48
53
  /**
@@ -59,7 +64,7 @@ function readIconName(value) {
59
64
  function readTruth(item, path) {
60
65
  if (!path)
61
66
  return false;
62
- const value = path.split(".").reduce((current, key) => (current && typeof current === "object" ? current[key] : undefined), item);
67
+ const value = readValue(item, path);
63
68
  return value === true || value === "true" || value === 1;
64
69
  }
65
70
  /*
@@ -85,6 +90,11 @@ function buildCard(item, card) {
85
90
  meta: readPath(item, card?.meta),
86
91
  actionLabel: readPath(item, card?.actionLabel),
87
92
  value: readPath(item, card?.value),
93
+ badge: readPath(item, card?.badge),
94
+ price: readPath(item, card?.price),
95
+ pricePeriod: readPath(item, card?.pricePeriod),
96
+ priceYearly: readPath(item, card?.priceYearly),
97
+ pricePeriodYearly: readPath(item, card?.pricePeriodYearly),
88
98
  };
89
99
  /*
90
100
  * Two pictures with two jobs, and the fallbacks say which is which. A cover opens the card and takes
@@ -110,8 +120,14 @@ function buildCard(item, card) {
110
120
  ...(card?.variant ? { variant: card.variant } : {}),
111
121
  ...(card?.body ? { body: card.body } : {}),
112
122
  highlight: readTruth(item, card?.highlight),
123
+ ...(card?.billingPeriod ? { billingPeriod: card.billingPeriod } : {}),
113
124
  };
114
- return { labels, config };
125
+ /* A plan's features are a list in the row, drawn as a plan card's list is drawn on a page. */
126
+ const features = card?.body === "plan" && card.features
127
+ ? readPhiBulletListEntries(readValue(item, card.features)).filter((entry) => Boolean(entry.text))
128
+ : [];
129
+ const listContent = features.length > 0 ? (_jsx(PhiBulletListControl, { items: buildPhiBulletListTree(features, (entry) => entry.text) })) : null;
130
+ return { labels, config, listContent };
115
131
  }
116
132
  export function PhiCardCollectionViewBinding({ config, binding, widgetId, }) {
117
133
  void widgetId;
@@ -126,7 +142,7 @@ export function PhiCardCollectionViewBinding({ config, binding, widgetId, }) {
126
142
  });
127
143
  const cards = items.map((item, index) => {
128
144
  const card = buildCard(item, presentation.card);
129
- return (_jsx(PhiCardWidgetClient, { labels: card.labels, config: card.config }, readPath(item, "id") ?? readPath(item, "slug") ?? String(index)));
145
+ return (_jsx(PhiCardWidgetClient, { labels: card.labels, config: card.config, listContent: card.listContent }, readPath(item, "id") ?? readPath(item, "slug") ?? String(index)));
130
146
  });
131
147
  return (_jsx(PhiCollectionViewControl, { title: presentation.title, description: presentation.description, mode: presentation.mode, ...(presentation.gap ? { gap: presentation.gap } : {}), minColumnWidth: presentation.minColumnWidth ?? CARD_MIN_COLUMN_WIDTH, filters: features.search?.enabled ? (_jsx(PhiTextControl, { inputType: "search", value: searchDraft, placeholder: features.search.placeholder, ariaLabel: features.search.placeholder ?? "Search", onChange: (value) => setSearchDraft(value ?? ""), style: {
132
148
  flex: "1 1 12rem",
@@ -134,7 +150,7 @@ export function PhiCardCollectionViewBinding({ config, binding, widgetId, }) {
134
150
  }, size: presentation.controlSize })) : null, diagnostics: binding.error ? (_jsx(PhiAlertControl, { level: "error", title: binding.error })) : null, body: items.length === 0 && !binding.loading ? (_jsx(PhiEmptyControl, { description: presentation.emptyDescription ?? "Nothing here yet." })) : undefined, items: cards, pagination: features.pagination?.enabled === false ? null : {
135
151
  page: binding.query.page ?? 1,
136
152
  pageSize: binding.query.pageSize ?? features.pagination?.pageSize ?? 20,
137
- total: binding.data?.total ?? items.length,
153
+ total: binding.data?.total ?? 0,
138
154
  ...(features.pagination?.compact === undefined
139
155
  ? {}
140
156
  : { simple: features.pagination.compact }),