@phis/ui 0.7.8 → 0.8.1

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 (462) hide show
  1. package/components/cms/phi-cms-layout-renderer.js +15 -7
  2. package/components/cms/phi-cms-render-diagnostic-client.d.ts +3 -1
  3. package/components/cms/phi-cms-render-diagnostic-client.js +4 -3
  4. package/components/cms/phi-cms-render-diagnostic.d.ts +8 -2
  5. package/components/cms/phi-cms-render-diagnostic.js +12 -2
  6. package/components/cms/phi-cms-render-error-boundary.d.ts +2 -0
  7. package/components/cms/phi-cms-render-error-boundary.js +1 -1
  8. package/components/cms/phi-cms-root-layout.js +3 -1
  9. package/components/controls/phi-address-control.d.ts +23 -0
  10. package/components/controls/phi-address-control.js +43 -0
  11. package/components/controls/phi-color-control.d.ts +3 -1
  12. package/components/controls/phi-color-control.js +2 -2
  13. package/components/controls/phi-country-select-control.d.ts +22 -0
  14. package/components/controls/phi-country-select-control.js +16 -0
  15. package/components/controls/phi-dialog-control.d.ts +1 -1
  16. package/components/controls/phi-drawer-control-adapter.d.ts +1 -1
  17. package/components/controls/phi-drawer-control-adapter.js +5 -3
  18. package/components/controls/phi-drawer-control.d.ts +7 -5
  19. package/components/controls/phi-float-button-control.d.ts +8 -1
  20. package/components/controls/phi-float-button-control.js +19 -3
  21. package/components/controls/phi-form-control.js +52 -8
  22. package/components/controls/phi-media-picker-control.d.ts +9 -0
  23. package/components/controls/phi-media-picker-control.js +1 -1
  24. package/components/controls/phi-modal-control-adapter.d.ts +1 -1
  25. package/components/controls/phi-modal-control-adapter.js +14 -37
  26. package/components/controls/phi-modal-control.d.ts +5 -5
  27. package/components/controls/phi-options-provider.d.ts +1 -0
  28. package/components/controls/phi-options-provider.js +1 -0
  29. package/components/controls/phi-overlay-control-contract.d.ts +52 -17
  30. package/components/controls/phi-overlay-control-contract.js +55 -30
  31. package/components/controls/phi-popover-control.js +4 -1
  32. package/components/controls/phi-reveal-once-dialog-control.d.ts +21 -0
  33. package/components/controls/phi-reveal-once-dialog-control.js +52 -0
  34. package/components/controls/phi-reveal-once-dialog-labels.d.ts +10 -0
  35. package/components/controls/phi-reveal-once-dialog-labels.js +5 -0
  36. package/components/controls/phi-table-control.d.ts +7 -1
  37. package/components/controls/phi-table-control.js +23 -8
  38. package/components/forms/flags-field.d.ts +22 -0
  39. package/components/forms/flags-field.js +58 -0
  40. package/components/forms/form-descriptor-field-check.d.ts +18 -0
  41. package/components/forms/form-descriptor-field-check.js +41 -0
  42. package/components/forms/form-descriptor-runtime-client.js +11 -10
  43. package/components/forms/form-option-flags.d.ts +20 -0
  44. package/components/forms/form-option-flags.js +38 -0
  45. package/components/forms/form-provider-contract.d.ts +23 -0
  46. package/components/forms/form-provider-contract.js +36 -0
  47. package/components/forms/form-provider-registry.d.ts +5 -1
  48. package/components/forms/form-record-source.d.ts +38 -0
  49. package/components/forms/form-record-source.js +48 -0
  50. package/components/forms/shared-form-descriptors.d.ts +0 -34
  51. package/components/forms/shared-form-descriptors.js +0 -6
  52. package/components/forms/shared-form-ids.d.ts +1 -1
  53. package/components/forms/shared-form-ids.js +1 -1
  54. package/components/forms/shared-form-provider-registry.js +13 -0
  55. package/components/forms/structured-field-labels.d.ts +24 -0
  56. package/components/forms/structured-field-labels.js +43 -0
  57. package/components/forms/structured-form-field-controls.d.ts +12 -0
  58. package/components/forms/structured-form-field-controls.js +65 -0
  59. package/components/media/media-settings-labels.d.ts +1 -0
  60. package/components/media/media-settings-labels.js +2 -0
  61. package/components/media/phi-media-picker-binding.d.ts +41 -33
  62. package/components/media/phi-media-picker-binding.js +2 -1
  63. package/components/media/use-media-library-add-picker.d.ts +33 -32
  64. package/components/overlays/phi-overlay-container-client.js +13 -11
  65. package/components/regions/phi-cms-region-shell.js +2 -2
  66. package/components/regions/presets/content-entry-editor-page-tree.js +12 -3
  67. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +13 -2
  68. package/components/regions/presets/phi-settings-page-shell-tree.js +4 -4
  69. package/components/root/phi-root-theme-resolver.js +3 -0
  70. package/components/shell/phi-antd-icon.d.ts +1 -8
  71. package/components/shell/phi-antd-icon.js +1 -227
  72. package/components/shell/phi-icon-names.d.ts +22 -0
  73. package/components/shell/phi-icon-names.js +267 -0
  74. package/components/shell/phi-icon.d.ts +4 -15
  75. package/components/shell/phi-icon.js +9 -50
  76. package/components/tables/client/phi-table-binding-params.d.ts +24 -0
  77. package/components/tables/client/phi-table-binding-params.js +39 -0
  78. package/components/tables/client/phi-table-binding.d.ts +1 -3
  79. package/components/tables/client/phi-table-binding.js +5 -9
  80. package/components/widgets/client/shared/phi-button-icons.d.ts +6 -4
  81. package/components/widgets/client/shared/phi-button-icons.js +8 -12
  82. package/components/widgets/client/shared/phi-collection-binding-params.d.ts +8 -0
  83. package/components/widgets/client/shared/phi-collection-binding-params.js +13 -0
  84. package/components/widgets/client/shared/phi-collection-provider.d.ts +11 -1
  85. package/components/widgets/client/shared/phi-collection-provider.js +5 -0
  86. package/components/widgets/client/shared/phi-collection-view-binding.d.ts +1 -0
  87. package/components/widgets/client/shared/phi-command-buttons.d.ts +29 -2
  88. package/components/widgets/client/shared/phi-command-buttons.js +19 -5
  89. package/components/widgets/client/shared/phi-rendered-value.js +27 -3
  90. package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
  91. package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
  92. package/components/widgets/config/background.d.ts +3 -2
  93. package/components/widgets/config/choice-shared.d.ts +10 -1
  94. package/components/widgets/config/choice-shared.js +8 -2
  95. package/components/widgets/label-sets/admin-locales.js +1 -1
  96. package/components/widgets/label-sets/admin-users.d.ts +3 -5
  97. package/components/widgets/label-sets/admin-users.js +6 -10
  98. package/components/widgets/label-sets/builder-modules.js +4 -0
  99. package/components/widgets/label-sets/effects.js +2 -4
  100. package/components/widgets/label-sets/profile.d.ts +13 -16
  101. package/components/widgets/label-sets/profile.js +24 -33
  102. package/components/widgets/label-sets/registration.d.ts +0 -1
  103. package/components/widgets/label-sets/registration.js +0 -2
  104. package/components/widgets/label-sets/revisions.js +2 -0
  105. package/components/widgets/label-sets/search-results.js +2 -4
  106. package/components/widgets/label-sets/signals.js +2 -0
  107. package/components/widgets/label-sets/table.js +9 -0
  108. package/components/widgets/label-types/builder-modules.d.ts +4 -0
  109. package/components/widgets/label-types/builder-modules.js +2 -0
  110. package/components/widgets/label-types/effects.d.ts +3 -2
  111. package/components/widgets/label-types/effects.js +1 -2
  112. package/components/widgets/label-types/revisions.d.ts +2 -0
  113. package/components/widgets/label-types/revisions.js +2 -1
  114. package/components/widgets/label-types/search-results.d.ts +2 -2
  115. package/components/widgets/label-types/search-results.js +1 -2
  116. package/components/widgets/label-types/signals.d.ts +2 -0
  117. package/components/widgets/label-types/signals.js +1 -0
  118. package/components/widgets/label-types/table.d.ts +3 -0
  119. package/components/widgets/label-types/table.js +2 -0
  120. package/components/widgets/server/builder-chrome.d.ts +4 -1
  121. package/components/widgets/server/builder-chrome.js +2 -2
  122. package/components/widgets/shared/markdown-body-client.d.ts +26 -0
  123. package/components/widgets/shared/markdown-body-client.js +31 -1
  124. package/components/widgets/shared/markdown-render.d.ts +10 -2
  125. package/components/widgets/shared/markdown-render.js +35 -13
  126. package/components/widgets/shared/widget-failure-audience.d.ts +7 -0
  127. package/components/widgets/shared/widget-failure-audience.js +21 -0
  128. package/components/widgets/shared/widget-failure-client.js +5 -2
  129. package/components/widgets/shared/widget-failure-notice-client.d.ts +6 -0
  130. package/components/widgets/shared/widget-failure-notice-client.js +10 -0
  131. package/components/widgets/shared/widget-failure-notice.d.ts +6 -0
  132. package/components/widgets/shared/widget-failure-notice.js +17 -0
  133. package/components/widgets/shared/widget-failure-staff.d.ts +3 -0
  134. package/components/widgets/shared/widget-failure-staff.js +18 -0
  135. package/components/widgets/shared/widget-failure.d.ts +9 -6
  136. package/components/widgets/shared/widget-failure.js +0 -9
  137. package/components/widgets/shared/widget-failure.server.d.ts +4 -2
  138. package/components/widgets/shared/widget-failure.server.js +8 -3
  139. package/constants/countries.d.ts +9 -0
  140. package/constants/countries.js +28 -0
  141. package/constants/customer-file.d.ts +34 -0
  142. package/constants/customer-file.js +35 -0
  143. package/constants/record-field-kinds.d.ts +15 -0
  144. package/constants/record-field-kinds.js +13 -0
  145. package/constants/runtime-module-ownership.js +15 -2
  146. package/constants/runtime-render-client-types.d.ts +5 -0
  147. package/constants/runtime-render-client-types.js +5 -0
  148. package/constants/site-address.d.ts +9 -0
  149. package/constants/site-address.js +10 -0
  150. package/constants/table-loading.d.ts +14 -0
  151. package/constants/table-loading.js +14 -0
  152. package/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
  153. package/constants.d.ts +2 -0
  154. package/constants.js +4 -0
  155. package/gateway/form-handler-request.d.ts +22 -0
  156. package/gateway/form-handler-request.js +40 -0
  157. package/gateway/label-set.d.ts +15 -2
  158. package/gateway/label-set.js +60 -22
  159. package/gateway/site-cms-write-validation.js +19 -3
  160. package/gateway/site-form-route.js +11 -2
  161. package/helpers/address-field.d.ts +43 -0
  162. package/helpers/address-field.js +68 -0
  163. package/helpers/announced-action.d.ts +17 -0
  164. package/helpers/announced-action.js +29 -0
  165. package/helpers/cms-dialog.d.ts +5 -20
  166. package/helpers/cms-dialog.js +8 -13
  167. package/helpers/cms-page-catalog.d.ts +10 -0
  168. package/helpers/cms-page-catalog.js +19 -0
  169. package/helpers/cms-preset-nodes.d.ts +4 -4
  170. package/helpers/cms-preset-nodes.js +1 -1
  171. package/helpers/cms-region-keys.d.ts +1 -1
  172. package/helpers/country-names.d.ts +12 -0
  173. package/helpers/country-names.js +14 -0
  174. package/helpers/phi-metadata.d.ts +25 -1
  175. package/helpers/phi-metadata.js +53 -1
  176. package/helpers/phi-site-description.d.ts +11 -0
  177. package/helpers/phi-site-description.js +13 -0
  178. package/helpers/preset-form-check.d.ts +14 -0
  179. package/helpers/preset-form-check.js +12 -0
  180. package/helpers/preset-table-check.d.ts +38 -0
  181. package/helpers/preset-table-check.js +118 -0
  182. package/helpers/preset-text-source-check.d.ts +4 -1
  183. package/helpers/preset-text-source-check.js +6 -1
  184. package/helpers/preset-tree-contract-check.d.ts +3 -2
  185. package/helpers/preset-tree-contract-check.js +30 -5
  186. package/helpers/public-route-claims.d.ts +9 -1
  187. package/helpers/public-route-claims.js +23 -3
  188. package/helpers/record-fields.d.ts +1 -5
  189. package/helpers/record-fields.js +15 -6
  190. package/helpers/record-widget-binding.d.ts +10 -0
  191. package/helpers/record-widget-binding.js +35 -0
  192. package/helpers/record-widget.d.ts +1 -10
  193. package/helpers/record-widget.js +4 -33
  194. package/helpers/route-address-check.d.ts +22 -2
  195. package/helpers/route-address-check.js +29 -8
  196. package/helpers/site-address-row.d.ts +23 -0
  197. package/helpers/site-address-row.js +36 -0
  198. package/helpers/surface-style.d.ts +8 -1
  199. package/helpers/surface-style.js +12 -2
  200. package/helpers/table-widget-binding.d.ts +12 -0
  201. package/helpers/table-widget-binding.js +296 -0
  202. package/helpers/thread-inbox-row.d.ts +20 -0
  203. package/helpers/thread-inbox-row.js +26 -0
  204. package/helpers/translation-format.d.ts +26 -0
  205. package/helpers/translation-format.js +31 -0
  206. package/helpers/tree-widget-binding.d.ts +19 -0
  207. package/helpers/tree-widget-binding.js +72 -0
  208. package/helpers/typed-confirmation.d.ts +9 -0
  209. package/helpers/typed-confirmation.js +13 -0
  210. package/helpers/widget-binding-check.d.ts +22 -0
  211. package/helpers/widget-binding-check.js +91 -0
  212. package/module-labels.d.ts +1 -1
  213. package/module-labels.js +1 -1
  214. package/module-page-check.d.ts +3 -0
  215. package/module-page-check.js +3 -0
  216. package/module-records.d.ts +2 -2
  217. package/module-records.js +1 -0
  218. package/next/area-route.js +34 -1
  219. package/next/root-route.js +4 -4
  220. package/package.json +2 -2
  221. package/plugins/runtime-modules/accounting/customer-file-access.d.ts +11 -0
  222. package/plugins/runtime-modules/accounting/customer-file-access.js +12 -0
  223. package/plugins/runtime-modules/accounting/data-providers.js +1 -1
  224. package/plugins/runtime-modules/accounting/ids.d.ts +14 -0
  225. package/plugins/runtime-modules/accounting/ids.js +34 -0
  226. package/plugins/runtime-modules/accounting/presets.js +32 -5
  227. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +78 -0
  228. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +136 -0
  229. package/plugins/runtime-modules/accounting/trees/accounting-products-label-set.js +2 -2
  230. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +29 -0
  231. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +450 -0
  232. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-products-page-tree.js +4 -0
  233. package/plugins/runtime-modules/app/client-data-providers.d.ts +7 -0
  234. package/plugins/runtime-modules/app/client-data-providers.js +9 -0
  235. package/plugins/runtime-modules/app/data-providers.d.ts +43 -0
  236. package/plugins/runtime-modules/app/data-providers.js +45 -0
  237. package/plugins/runtime-modules/app/definition.d.ts +60 -1
  238. package/plugins/runtime-modules/app/definition.js +2 -0
  239. package/plugins/runtime-modules/app/forms.d.ts +33 -3
  240. package/plugins/runtime-modules/app/forms.js +166 -31
  241. package/plugins/runtime-modules/app/ids.d.ts +8 -0
  242. package/plugins/runtime-modules/app/ids.js +9 -0
  243. package/plugins/runtime-modules/app/module.d.ts +60 -1
  244. package/plugins/runtime-modules/app/services/addresses-collection.d.ts +59 -0
  245. package/plugins/runtime-modules/app/services/addresses-collection.js +105 -0
  246. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +21 -0
  247. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +143 -0
  248. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +57 -0
  249. package/plugins/runtime-modules/app/trees/addresses-label-set.js +104 -0
  250. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.d.ts +1 -2
  251. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +28 -19
  252. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -2
  253. package/plugins/runtime-modules/app/trees/profile-label-set.js +5 -14
  254. package/plugins/runtime-modules/asset/presets.d.ts +4 -0
  255. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +5 -0
  256. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +4 -2
  257. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +4 -2
  258. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +2 -2
  259. package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +1 -1
  260. package/plugins/runtime-modules/auth/widgets/logout/client.js +2 -2
  261. package/plugins/runtime-modules/auth/widgets/security/client.d.ts +5 -1
  262. package/plugins/runtime-modules/auth/widgets/security/client.js +12 -10
  263. package/plugins/runtime-modules/avatar/overlay-tree.server.js +1 -1
  264. package/plugins/runtime-modules/blog/presets.d.ts +4 -0
  265. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +16 -6
  266. package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +2 -1
  267. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +6 -3
  268. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +3 -1
  269. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.d.ts +23 -0
  270. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.js +38 -0
  271. package/plugins/runtime-modules/builder/clients/mode-switch.d.ts +4 -1
  272. package/plugins/runtime-modules/builder/clients/mode-switch.js +2 -15
  273. package/plugins/runtime-modules/builder/clients/pages-workspace.js +2 -0
  274. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +2 -1
  275. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +28 -1
  276. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +5 -1
  277. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
  278. package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
  279. package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
  280. package/plugins/runtime-modules/builder/persistence.js +4 -0
  281. package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
  282. package/plugins/runtime-modules/builder/signal-wiring-options.js +9 -2
  283. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +8 -1
  284. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +47 -7
  285. package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +6 -4
  286. package/plugins/runtime-modules/builder/widgets/chrome/config.js +11 -1
  287. package/plugins/runtime-modules/builder/widgets/inspector-header/authoring.d.ts +2 -2
  288. package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.d.ts +2 -2
  289. package/plugins/runtime-modules/builder/widgets/mode-switch/plugin.js +1 -1
  290. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +2 -2
  291. package/plugins/runtime-modules/client-manifests/app.js +3 -0
  292. package/plugins/runtime-modules/client-manifests/builder.js +10 -0
  293. package/plugins/runtime-modules/client-manifests/common.js +6 -0
  294. package/plugins/runtime-modules/content-entry-routes.d.ts +4 -0
  295. package/plugins/runtime-modules/contracts.js +31 -1
  296. package/plugins/runtime-modules/core/definition.d.ts +23 -0
  297. package/plugins/runtime-modules/core/form-providers.d.ts +23 -0
  298. package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
  299. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
  300. package/plugins/runtime-modules/core/widgets/card/config.d.ts +1 -2
  301. package/plugins/runtime-modules/core/widgets/card/config.js +0 -1
  302. package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
  303. package/plugins/runtime-modules/core/widgets/collection-view/client.js +5 -2
  304. package/plugins/runtime-modules/core/widgets/collection-view/config.js +8 -0
  305. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.d.ts +55 -0
  306. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.js +173 -0
  307. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.d.ts +48 -0
  308. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.js +67 -0
  309. package/plugins/runtime-modules/core/widgets/command-toolbar/client.js +3 -0
  310. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +316 -1
  311. package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +4 -4
  312. package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -1
  313. package/plugins/runtime-modules/core/widgets/dimension/config.d.ts +1 -1
  314. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -1
  315. package/plugins/runtime-modules/core/widgets/float-button/client.js +4 -1
  316. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +326 -3
  317. package/plugins/runtime-modules/core/widgets/float-button/config.js +5 -2
  318. package/plugins/runtime-modules/core/widgets/form/config.d.ts +1 -1
  319. package/plugins/runtime-modules/core/widgets/form/config.js +14 -1
  320. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -1
  321. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +1 -1
  322. package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
  323. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +1 -1
  324. package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
  325. package/plugins/runtime-modules/core/widgets/markdown/server.d.ts +6 -2
  326. package/plugins/runtime-modules/core/widgets/markdown/server.js +2 -2
  327. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.d.ts +12 -0
  328. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.js +68 -0
  329. package/plugins/runtime-modules/core/widgets/number-input/config.d.ts +1 -1
  330. package/plugins/runtime-modules/core/widgets/record/client.js +2 -6
  331. package/plugins/runtime-modules/core/widgets/result/config.d.ts +1 -1
  332. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -1
  333. package/plugins/runtime-modules/core/widgets/simple-text/config.js +1 -1
  334. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
  335. package/plugins/runtime-modules/core/widgets/table/client.js +48 -51
  336. package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -3
  337. package/plugins/runtime-modules/core/widgets/table/config.js +9 -0
  338. package/plugins/runtime-modules/core/widgets/table/reader-query.d.ts +17 -0
  339. package/plugins/runtime-modules/core/widgets/table/reader-query.js +33 -0
  340. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +2 -2
  341. package/plugins/runtime-modules/core/widgets/thread-conversation/config.d.ts +6 -2
  342. package/plugins/runtime-modules/core/widgets/thread-conversation/config.js +6 -1
  343. package/plugins/runtime-modules/core/widgets/thread-widget-config.d.ts +10 -0
  344. package/plugins/runtime-modules/core/widgets/thread-widget-config.js +6 -0
  345. package/plugins/runtime-modules/core/widgets/tree/client.js +6 -6
  346. package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.js +3 -1
  347. package/plugins/runtime-modules/descriptor-compiler.d.ts +19 -3
  348. package/plugins/runtime-modules/descriptor-compiler.js +44 -16
  349. package/plugins/runtime-modules/editor/presets.d.ts +4 -0
  350. package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +3 -1
  351. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +5 -1
  352. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +5 -1
  353. package/plugins/runtime-modules/localization/presets.d.ts +4 -0
  354. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.d.ts +2 -0
  355. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.js +2 -0
  356. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -1
  357. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +9 -2
  358. package/plugins/runtime-modules/news/presets.d.ts +4 -0
  359. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +6 -2
  360. package/plugins/runtime-modules/resolver.js +17 -0
  361. package/plugins/runtime-modules/revisions/controller/binding.d.ts +37 -0
  362. package/plugins/runtime-modules/revisions/controller/binding.js +75 -0
  363. package/plugins/runtime-modules/revisions/controller/client.d.ts +5 -0
  364. package/plugins/runtime-modules/revisions/controller/client.js +86 -60
  365. package/plugins/runtime-modules/revisions/controller/definition.d.ts +5 -0
  366. package/plugins/runtime-modules/revisions/controller/definition.js +10 -0
  367. package/plugins/runtime-modules/revisions/controller/draft-context-target.d.ts +25 -0
  368. package/plugins/runtime-modules/revisions/controller/draft-context-target.js +33 -0
  369. package/plugins/runtime-modules/revisions/forms.js +1 -1
  370. package/plugins/runtime-modules/revisions/page-ids.d.ts +1 -1
  371. package/plugins/runtime-modules/revisions/page-ids.js +4 -1
  372. package/plugins/runtime-modules/revisions/presets.d.ts +4 -0
  373. package/plugins/runtime-modules/revisions/services/options.js +14 -4
  374. package/plugins/runtime-modules/revisions/services/table.js +54 -25
  375. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +79 -4
  376. package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
  377. package/plugins/runtime-modules/theme/controller/runtime.js +14 -2
  378. package/plugins/runtime-modules/theme/presets.d.ts +4 -0
  379. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +105 -7
  380. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +3 -2
  381. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +2 -2
  382. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +19 -7
  383. package/plugins/runtime-modules/threads/client-data-providers.js +10 -0
  384. package/plugins/runtime-modules/threads/controller/client.js +62 -2
  385. package/plugins/runtime-modules/threads/controller/definition.js +49 -1
  386. package/plugins/runtime-modules/threads/data-providers.d.ts +100 -2
  387. package/plugins/runtime-modules/threads/data-providers.js +96 -0
  388. package/plugins/runtime-modules/threads/definition.d.ts +100 -2
  389. package/plugins/runtime-modules/threads/definition.js +1 -1
  390. package/plugins/runtime-modules/threads/ids.d.ts +4 -0
  391. package/plugins/runtime-modules/threads/ids.js +5 -0
  392. package/plugins/runtime-modules/threads/services/customer-file-addresses.d.ts +30 -0
  393. package/plugins/runtime-modules/threads/services/customer-file-addresses.js +59 -0
  394. package/plugins/runtime-modules/threads/services/customer-file-read.d.ts +22 -0
  395. package/plugins/runtime-modules/threads/services/customer-file-read.js +101 -0
  396. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +126 -0
  397. package/plugins/runtime-modules/threads/services/customer-file-table.js +79 -0
  398. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +5 -3
  399. package/plugins/runtime-modules/user-management/client-data-providers.js +5 -0
  400. package/plugins/runtime-modules/user-management/data-providers.d.ts +159 -0
  401. package/plugins/runtime-modules/user-management/data-providers.js +101 -3
  402. package/plugins/runtime-modules/user-management/definition.d.ts +159 -0
  403. package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
  404. package/plugins/runtime-modules/user-management/ids.js +9 -0
  405. package/plugins/runtime-modules/user-management/presets.js +17 -1
  406. package/plugins/runtime-modules/user-management/services/users-access-table.d.ts +378 -0
  407. package/plugins/runtime-modules/user-management/services/users-access-table.js +132 -0
  408. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +90 -0
  409. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +122 -0
  410. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts +20 -0
  411. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +181 -0
  412. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +24 -18
  413. package/server-helpers/cms-page-record.d.ts +9 -1
  414. package/server-helpers/cms-page-record.js +11 -1
  415. package/server-helpers/cms-request.js +8 -5
  416. package/server-helpers/link-preview-image.d.ts +30 -0
  417. package/server-helpers/link-preview-image.js +57 -0
  418. package/server-helpers/runtime.js +0 -1
  419. package/server-helpers/search-text.js +3 -0
  420. package/server-helpers.d.ts +1 -1
  421. package/server-helpers.js +1 -1
  422. package/styles/controls.css +4 -2
  423. package/styles/layout.css +7 -0
  424. package/styles/shell.css +30 -6
  425. package/theme/phi-antd-token-resolver.d.ts +8 -0
  426. package/theme/phi-antd-token-resolver.js +10 -0
  427. package/theme/phi-theme-color.d.ts +19 -0
  428. package/theme/phi-theme-color.js +42 -0
  429. package/theme/phi-theme-composition.js +9 -0
  430. package/theme/phi-theme-gradients.js +4 -22
  431. package/theme/phi-theme-inverse-ground.d.ts +39 -0
  432. package/theme/phi-theme-inverse-ground.js +103 -0
  433. package/theme/phi-theme-palette-defaults.d.ts +16 -0
  434. package/theme/phi-theme-palette-defaults.js +103 -0
  435. package/theme/phi-theme-tokens.d.ts +2 -1
  436. package/theme/phi-theme-tokens.js +2 -0
  437. package/types/cms-module-descriptors.d.ts +14 -0
  438. package/types/cms-overlay.d.ts +13 -6
  439. package/types/cms-overlay.js +6 -22
  440. package/types/cms-plugins.d.ts +20 -3
  441. package/types/cms.d.ts +10 -0
  442. package/types/collection-provider.d.ts +27 -0
  443. package/types/collection-signal-values.d.ts +2 -0
  444. package/types/collection-signal-values.js +23 -0
  445. package/types/collection-view-widget.d.ts +9 -0
  446. package/types/core-widget-placements.d.ts +9 -3
  447. package/types/link-preview.d.ts +19 -0
  448. package/types/link-preview.js +19 -0
  449. package/types/record-provider.d.ts +22 -1
  450. package/types/signals.d.ts +2 -0
  451. package/types/signals.js +2 -0
  452. package/types/site-theme.d.ts +27 -0
  453. package/types/table-embed.d.ts +48 -0
  454. package/types/table-embed.js +1 -0
  455. package/types/table-widget.d.ts +29 -1
  456. package/types/table-widget.js +0 -282
  457. package/types/tree-widget.d.ts +0 -1
  458. package/types/tree-widget.js +0 -60
  459. package/types/widget-runtime.d.ts +3 -1
  460. package/types.d.ts +2 -1
  461. package/types.js +1 -1
  462. /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
@@ -4,7 +4,7 @@ import { PhiCmsFlags, PhiCmsRegionType, PhiCmsStatus } from "../../../../constan
4
4
  import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
5
5
  import { resolvePhiShellHeaderHeight } from "../../../../helpers/shell-region-style";
6
6
  import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
7
- import { PHI_SIGNAL_VALUE_SCHEMAS, createPhiSignalAddress, } from "../../../../types";
7
+ import { PHI_SIGNAL_VALUE_SCHEMAS, createPhiSignalAddress, createPhiSignalSubcontrolAddress, } from "../../../../types";
8
8
  import { PHI_SPACE } from "../../../../theme/antd-css-var-contract";
9
9
  import { getPhiBuilderChromeWidgetLabels } from "../../../../components/widgets/label-sets/builder-chrome";
10
10
  import { getPhiBuilderRevisionsWidgetLabels } from "../../../../components/widgets/label-sets/revisions";
@@ -40,6 +40,8 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
40
40
  getPhiBuilderRevisionsWidgetLabels(credentials),
41
41
  ]);
42
42
  const deleteAreaOverlay = createPhiSignalAddress("cms", PHI_REVISIONS_DELETE_AREA_OVERLAY_IDS.overlayDeleteArea);
43
+ // The dialog's confirm button, which stays greyed out until the Area key is typed.
44
+ const deleteAreaConfirm = createPhiSignalSubcontrolAddress("cms", PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaCommands, "confirm");
43
45
  return {
44
46
  page: nodes.page(),
45
47
  pageMeta: {
@@ -77,6 +79,24 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
77
79
  valueType: "string",
78
80
  receiver: createPhiSignalAddress("cms", PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaWarning),
79
81
  },
82
+ {
83
+ routeKey: "builder-revisions-controller-delete-area-key",
84
+ capabilityId: "deleteAreaKey",
85
+ scope: "area",
86
+ channel: "text",
87
+ action: "change",
88
+ valueType: "string",
89
+ receiver: createPhiSignalAddress("cms", PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaKey),
90
+ },
91
+ {
92
+ routeKey: "builder-revisions-controller-delete-area-confirm-enabled",
93
+ capabilityId: "deleteAreaConfirmEnabled",
94
+ scope: "page",
95
+ channel: "enabled",
96
+ action: "change",
97
+ valueType: "boolean",
98
+ receiver: deleteAreaConfirm,
99
+ },
80
100
  { routeKey: "builder-revisions-controller-delete-area-open", capabilityId: "deleteAreaOpen", scope: "area", channel: "dialog", action: "activate", valueType: "none", receiver: deleteAreaOverlay },
81
101
  { routeKey: "builder-revisions-controller-delete-area-close", capabilityId: "deleteAreaClose", scope: "area", channel: "dialog", action: "close", valueType: "none", receiver: deleteAreaOverlay },
82
102
  { routeKey: "builder-revisions-controller-history-reload", capabilityId: "historyReload", scope: "page", channel: "reload", action: "activate", valueType: "none", receiver: createPhiSignalAddress("cms", PHI_REVISIONS_TABLE_WIDGET_ID) },
@@ -95,7 +115,7 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
95
115
  label: "Builder delete area",
96
116
  config: {
97
117
  title: revisionsLabels.deleteArea.title,
98
- width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
118
+ size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
99
119
  /*
100
120
  * `remount` rather than `lazy-keep`: the field is the confirmation, and a dialog that kept a
101
121
  * half-typed Area key from the last time it was opened would carry an answer across to a
@@ -294,12 +314,41 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
294
314
  tone: "secondary",
295
315
  },
296
316
  }),
317
+ /*
318
+ * The exact word to type, shown rather than described: asked for "the Area key", nobody knew its
319
+ * spelling or its case. The key stands on a line of its own in code type, where it is read at a
320
+ * glance and selected with one double click; the Controller writes it in as the dialog opens, as
321
+ * it does the warning, and the comparison takes it in any case (`matchesPhiTypedConfirmation`).
322
+ */
297
323
  nodes.widget({
298
- typeKey: "form",
299
- id: PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaForm,
324
+ typeKey: "simple-text",
325
+ /* Label set text, translated already; a second pass would hand the translator a non-source text. */
326
+ flags: PhiCmsFlags.NoTranslate,
327
+ id: PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaTypeToConfirm,
300
328
  parentLayoutNodeId: PHI_REVISIONS_DELETE_AREA_LAYOUT_IDS.deleteAreaBody,
301
329
  slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[2].slotIndex,
302
330
  sortOrder: 2,
331
+ label: "Builder delete area type to confirm",
332
+ config: { text: revisionsLabels.deleteArea.typeToConfirm },
333
+ }),
334
+ nodes.widget({
335
+ typeKey: "simple-text",
336
+ // A key, never words to translate.
337
+ flags: PhiCmsFlags.NoTranslate,
338
+ id: PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaKey,
339
+ parentLayoutNodeId: PHI_REVISIONS_DELETE_AREA_LAYOUT_IDS.deleteAreaBody,
340
+ slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[3].slotIndex,
341
+ sortOrder: 3,
342
+ label: "Builder delete area key",
343
+ // Never empty, for the same reason as the warning; the Controller's key replaces it.
344
+ config: { text: "area", marks: ["bold", "code"], fontSize: "lg" },
345
+ }),
346
+ nodes.widget({
347
+ typeKey: "form",
348
+ id: PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaForm,
349
+ parentLayoutNodeId: PHI_REVISIONS_DELETE_AREA_LAYOUT_IDS.deleteAreaBody,
350
+ slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[4].slotIndex,
351
+ sortOrder: 4,
303
352
  label: "Builder delete area form",
304
353
  config: {
305
354
  formId: PHI_REVISIONS_FORM_IDS.deleteArea,
@@ -321,6 +370,17 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
321
370
  valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.formValues,
322
371
  receiver: createPhiRevisionsControllerAddress(),
323
372
  },
373
+ // The key while it is typed, so the confirm button wakes the moment it matches.
374
+ {
375
+ routeKey: "builder-delete-area-typed",
376
+ capabilityId: "valuesChange",
377
+ scope: "area",
378
+ channel: "deleteAreaTyped",
379
+ action: "change",
380
+ valueType: "json",
381
+ valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.formValues,
382
+ receiver: createPhiRevisionsControllerAddress(),
383
+ },
324
384
  ],
325
385
  /*
326
386
  * The footer's confirm button sends `submit` here. A route on the sender alone delivers
@@ -365,6 +425,8 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
365
425
  emits: [{ capabilityId: "submit", value: null }],
366
426
  label: revisionsLabels.deleteArea.confirm,
367
427
  danger: true,
428
+ // Until the Area key is typed; the Controller switches it on (`deleteAreaConfirmEnabled`).
429
+ disabled: true,
368
430
  },
369
431
  ],
370
432
  signalRoutes: {
@@ -388,6 +450,17 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
388
450
  receiver: createPhiSignalAddress("cms", PHI_REVISIONS_DELETE_AREA_WIDGET_IDS.deleteAreaForm),
389
451
  },
390
452
  ],
453
+ listens: [
454
+ {
455
+ routeKey: "builder-delete-area-confirm-enabled",
456
+ capabilityId: "enabled",
457
+ scope: "page",
458
+ channel: "enabled",
459
+ action: "change",
460
+ valueType: "boolean",
461
+ receiver: deleteAreaConfirm,
462
+ },
463
+ ],
391
464
  },
392
465
  },
393
466
  }),
@@ -396,6 +469,8 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
396
469
  id: PHI_REVISIONS_TABLE_WIDGET_ID,
397
470
  parentLayoutNodeId: PHI_REVISIONS_PAGE_LAYOUT_IDS.layoutContent,
398
471
  slotIndex: 0,
472
+ // The Module's Label Set, translated already.
473
+ flags: PhiCmsFlags.NoTranslate,
399
474
  label: "dev revisions table",
400
475
  config: {
401
476
  source: {
@@ -3,7 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { PhiEmptyControl } from "../../../../../components/controls/phi-empty-control";
4
4
  import { PhiTypographyControl } from "../../../../../components/controls/phi-typography-control";
5
5
  import { PhiLink } from "../../../../../components/navigation/phi-link";
6
- import { formatPhiTranslation } from "../../../../../helpers/translation-format";
6
+ import { usePhiIntlLocale } from "../../../../../components/root/phi-intl-locale";
7
+ import { formatPhiCountLabel, formatPhiTranslation } from "../../../../../helpers/translation-format";
7
8
  import { PHI_SPACE } from "../../../../../theme/antd-css-var-contract";
8
9
  function PhiSearchSnippet({ segments }) {
9
10
  if (segments.length === 0)
@@ -18,6 +19,7 @@ function PhiSearchSnippet({ segments }) {
18
19
  * answered, so a reader who arrived by a pasted link knows what they are looking at.
19
20
  */
20
21
  export function PhiSearchResultsWidgetClient({ labels, config }) {
22
+ const locale = usePhiIntlLocale();
21
23
  if (!config)
22
24
  return null;
23
25
  if (config.state === "idle") {
@@ -27,6 +29,6 @@ export function PhiSearchResultsWidgetClient({ labels, config }) {
27
29
  return (_jsx(PhiTypographyControl, { type: "secondary", children: formatPhiTranslation(labels.short, [String(config.minLength)]) }));
28
30
  }
29
31
  const heading = config.title ?? formatPhiTranslation(labels.heading, [config.query]);
30
- const count = config.total === 1 ? labels.countOne : formatPhiTranslation(labels.count, [String(config.total)]);
32
+ const count = formatPhiCountLabel(labels.count, config.total, locale);
31
33
  return (_jsxs("section", { "aria-label": labels.region, style: { display: "flex", flexDirection: "column", gap: PHI_SPACE.sm }, children: [_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: PHI_SPACE.xxs }, children: [_jsx(PhiTypographyControl, { presentation: "title", level: 2, style: { marginTop: 0, marginBottom: 0 }, children: heading }), config.hits.length > 0 ? _jsx(PhiTypographyControl, { type: "secondary", children: count }) : null] }), config.hits.length === 0 ? (_jsx(PhiEmptyControl, { description: formatPhiTranslation(labels.empty, [config.query]) })) : (_jsx("ol", { style: { listStyle: "none", margin: 0, padding: 0, display: "flex", flexDirection: "column", gap: PHI_SPACE.base }, children: config.hits.map((hit) => (_jsxs("li", { style: { display: "flex", flexDirection: "column", gap: PHI_SPACE.xxs }, children: [_jsx(PhiTypographyControl, { presentation: "title", level: 3, style: { marginTop: 0, marginBottom: 0 }, children: _jsx(PhiLink, { href: hit.href, children: hit.title }) }), _jsx(PhiTypographyControl, { type: "secondary", style: { fontSize: "0.85em" }, children: hit.href }), hit.description ? (_jsx(PhiTypographyControl, { presentation: "paragraph", style: { marginBottom: 0 }, children: hit.description })) : null, _jsx(PhiSearchSnippet, { segments: hit.snippet })] }, hit.href))) }))] }));
32
34
  }
@@ -13,7 +13,19 @@ import { materializePhiThemeBrandLogo, materializePhiThemeBrandSignet, materiali
13
13
  import { buildPhiSiteThemeSelectOptions, createPhiSiteThemeSelectionValue, createPhiThemeDerivation, ensurePhiThemeDerivation, readPhiSiteThemeSelectionState, resolvePhiThemeSelectionValue, } from "../../../../theme/phi-theme-selection";
14
14
  import { dispatchPhiSignalCapability } from "../../../../components/runtime/runtime-signal-identity";
15
15
  import { formatPhiHistoryMoveMessage, formatPhiHistoryTooltip, } from "../../../../components/widgets/label-types/history";
16
- import { phiThemeHistory, resolvePhiThemeHistoryAction, DEFAULT_THEME_KEY, resolveThemeKey, normalizeTheme, resolveInitialTheme, resolveThemePayloadPreset, applyThemePreset, resetThemeToPreset, buildThemeReviewHref, createInitialBrandThemeState, isSameThemePayload, mergeThemeSetChoice, } from "../brand-theme-model";
16
+ import { phiThemeHistory, resolvePhiThemeHistoryAction, DEFAULT_THEME_KEY, resolveThemeKey, normalizeTheme, resolveInitialTheme, resolveThemePayloadPreset, applyThemePreset, resetThemeToPreset, buildThemeReviewHref, createInitialBrandThemeState, isSameThemePayload, mergeThemeSetChoice, omitThemeFields, } from "../brand-theme-model";
17
+ import { omitPhiThemePaletteDefaults } from "../../../../theme/phi-theme-palette-defaults";
18
+ /*
19
+ * The colours a draft states as the Theme gives them anyway are not stored: they are no decision, and
20
+ * kept they would read as one wherever the record is read. Dropped ahead of the save's takeover of
21
+ * Module blocks, which copies a Module's palette in whole again; a core palette is then simply followed.
22
+ */
23
+ function omitThemePaletteDefaults(theme, presets) {
24
+ if (!theme.palette)
25
+ return theme;
26
+ const palette = omitPhiThemePaletteDefaults(resolveThemePayloadPreset(theme, presets), theme.palette, theme.style?.token ?? {});
27
+ return Object.keys(palette).length > 0 ? { ...theme, palette } : omitThemeFields(theme, "palette");
28
+ }
17
29
  /*
18
30
  * `correlationId` is the exchange this state belongs to: the command that saved, published or reset,
19
31
  * or the draft another Widget asked the Controller to take. It is absent only where the Controller
@@ -323,7 +335,7 @@ export function PhiThemeControllerRuntime({ runtime, config, setOptions, history
323
335
  themeKey,
324
336
  ]);
325
337
  async function saveTheme(draftTheme = stateRef.current.draft, options) {
326
- let nextTheme = ensurePhiThemeDerivation(draftTheme);
338
+ let nextTheme = omitThemePaletteDefaults(ensurePhiThemeDerivation(draftTheme), themePresets);
327
339
  setSaving(true);
328
340
  try {
329
341
  const current = stateRef.current;
@@ -75,6 +75,10 @@ export declare const PHI_THEME_RUNTIME_MODULE_ROUTES: {
75
75
  path: string;
76
76
  landingPage?: true;
77
77
  title: string;
78
+ description?: string;
79
+ shareImage?: {
80
+ asset: string;
81
+ };
78
82
  defaultPageFlags?: number;
79
83
  loadTree: (context: import("../../../types").PhiCmsDescriptorBuildContext & {
80
84
  activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
@@ -22,6 +22,7 @@ import { usePhiSiteFontAssets } from "../../../../../components/media/phi-site-f
22
22
  import { buildPhiFontFaceCss, buildPhiFontFamilyStack } from "../../../../../theme/phi-font-face";
23
23
  import { PHI_THEME_HEADING_FONT_VARIABLE, readPhiThemeHeadingFont, resolvePhiThemeHeadingFontFamily, } from "../../../../../theme/phi-theme-typography";
24
24
  import { resolvePhiThemeRuntimePayload } from "../../../../../theme/phi-theme-runtime";
25
+ import { buildPhiThemeInverseGroundTokens } from "../../../../../theme/phi-theme-inverse-ground";
25
26
  import { resolvePhiAntdAliasTokens } from "../../../../../theme/phi-antd-token-resolver";
26
27
  import { buildPhiThemeStructuralTokens } from "../../../../../theme/phi-theme";
27
28
  import { PHI_CONTROL_HEIGHTS, PHI_LAYOUT, PHI_PADDING, PHI_RADII, } from "../../../../../theme/phi-tokens";
@@ -41,7 +42,13 @@ import { normalizePhiBackgroundWidgetConfig } from "../../../../../components/wi
41
42
  import { PhiMediaPickerBinding } from "../../../../../components/media/phi-media-picker-binding";
42
43
  import { usePhiMediaPickerLabels } from "../../../../../components/media/phi-media-picker-labels";
43
44
  import { PHI_SEARCH_WIDGET_DEFAULT_LABELS } from "../../../../../components/widgets/label-types/search";
44
- import { buildPhiMediaAssetContentDeliveryUrl, PhiMediaAssetFlags, PhiMediaKind, } from "../../../../../constants/media";
45
+ import { buildPhiMediaAssetContentDeliveryUrl, isPhiMediaAssetPublic, PhiImageAssetVariantKey, PhiMediaAssetFlags, PhiMediaKind, } from "../../../../../constants/media";
46
+ import { resolvePhiImagePresentation } from "../../../../../components/media/image-presentation";
47
+ import { usePhiAuthoringAssetDetails } from "../../../../../components/media/use-authoring-asset-details";
48
+ import { PhiImageControl } from "../../../../../components/controls/phi-image-control";
49
+ import { resolvePhiSiteDescription } from "../../../../../helpers/phi-site-description";
50
+ import { omitPhiThemePaletteDefaults } from "../../../../../theme/phi-theme-palette-defaults";
51
+ import { readPhiXAccount } from "../../../../../types/link-preview";
45
52
  import { PhiPresetSizeControl } from "../../../../../components/controls/phi-preset-size-control";
46
53
  import { PhiButtonControl } from "../../../../../components/controls/phi-button-control";
47
54
  import { PhiCheckboxControl } from "../../../../../components/controls/phi-checkbox-control";
@@ -79,9 +86,9 @@ const PHI_THEME_CHROME_SHADOW_EDGES = [
79
86
  const BRAND_THEME_COLOR_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.colorCollapse.activeKey";
80
87
  const BRAND_THEME_STYLE_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.styleCollapse.activeKey";
81
88
  const BRAND_THEME_BACKGROUND_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.backgroundCollapse.activeKey";
82
- const BRAND_THEME_BACKGROUND_SECTION_KEYS = ["root", "chrome", "shadow"];
89
+ const BRAND_THEME_BACKGROUND_SECTION_KEYS = ["root", "chrome", "inverse", "shadow"];
83
90
  const BRAND_THEME_IDENTITY_COLLAPSE_STORAGE_KEY = "phi.builder.brand.theme.identityCollapse.activeKey";
84
- const BRAND_THEME_IDENTITY_SECTION_KEYS = ["logo", "wordmark", "lines"];
91
+ const BRAND_THEME_IDENTITY_SECTION_KEYS = ["logo", "wordmark", "lines", "share"];
85
92
  const BRAND_THEME_STYLE_SECTION_KEYS = [
86
93
  "shapes",
87
94
  "buttonShadow",
@@ -487,6 +494,7 @@ function resolveBrandDraftAliasTokens(resolvedTheme, preset, mode, fonts = {}) {
487
494
  }),
488
495
  ...buildPhiThemeLinkTokens(resolvedTheme.links),
489
496
  ...buildPhiSurfaceShadowTokens(resolvedTheme.shadows, mode),
497
+ ...buildPhiThemeInverseGroundTokens(resolvedTheme.root?.inverse, mode, aliasTokens),
490
498
  };
491
499
  }
492
500
  function readEffectiveTokenNumber(token, key, fallback) {
@@ -543,6 +551,22 @@ function mergeThemeRootSurface(theme, surface, mode, value) {
543
551
  },
544
552
  };
545
553
  }
554
+ /**
555
+ * One mode's Inverse Ground set, the other mode's kept. Opaque by construction: the picker offers no
556
+ * alpha, and the Theme's reader refuses a colour with any.
557
+ */
558
+ function mergeThemeInverseGround(theme, mode, value) {
559
+ return {
560
+ ...theme,
561
+ root: {
562
+ ...(theme.root ?? {}),
563
+ inverse: {
564
+ ...(theme.root?.inverse ?? {}),
565
+ [mode]: value,
566
+ },
567
+ },
568
+ };
569
+ }
546
570
  function mergeThemeChromeShadow(theme, family, value) {
547
571
  return {
548
572
  ...theme,
@@ -1023,11 +1047,17 @@ export function PhiBuilderBrandThemeControlsWidgetClient({ runtime, config, colo
1023
1047
  const selectedPreset = resolveThemePayloadPreset(state.draft, themePresets);
1024
1048
  /*
1025
1049
  * What the tab shows is what the Site renders: the palette block with the draft's palette on top,
1026
- * resolved for the mode being edited. The seeds the author owns are the ones present in the draft's
1027
- * palette, shared or under this mode; the derived overrides live under this mode alone.
1050
+ * resolved for the mode being edited. The seeds the author owns are the ones the draft's palette
1051
+ * states, shared or under this mode, other than the Theme gives them; the derived overrides live
1052
+ * under this mode alone.
1028
1053
  */
1029
1054
  const colorToken = resolvePhiThemeColorTokens(selectedPreset, state.draft.palette, previewMode);
1030
- const ownPalette = state.draft.palette ?? {};
1055
+ /*
1056
+ * What the author owns is what changes something: a colour the draft states exactly as the Theme
1057
+ * gives it -- a Module palette taken over on save, a picker put back on the Theme's value -- is no
1058
+ * decision of theirs, offers no reset, and is not stored on the next save.
1059
+ */
1060
+ const ownPalette = omitPhiThemePaletteDefaults(selectedPreset, state.draft.palette, buildPhiEffectiveNonColorThemeTokens(state.draft));
1031
1061
  const ownOverrides = ownPalette.modes?.[previewMode]?.overrides ?? {};
1032
1062
  /*
1033
1063
  * The same colour without the author's derived overrides: what a derived control falls back to, and
@@ -1475,6 +1505,9 @@ function clearThemeRootSurface(theme, surface, mode) {
1475
1505
  if (surface === "background") {
1476
1506
  return { ...theme, root: { ...root, background: without(root.background, mode) } };
1477
1507
  }
1508
+ if (surface === "inverse") {
1509
+ return { ...theme, root: { ...root, inverse: without(root.inverse, mode) } };
1510
+ }
1478
1511
  return {
1479
1512
  ...theme,
1480
1513
  root: { ...root, chrome: without(root.chrome, surface === "shadow" ? "shadow" : mode) },
@@ -1583,6 +1616,21 @@ export function PhiBuilderBrandIdentityControlsWidgetClient({ runtime, config, }
1583
1616
  });
1584
1617
  const [activeIdentitySection, changeActiveIdentitySection] = usePhiBrandAccordionSection(BRAND_THEME_IDENTITY_COLLAPSE_STORAGE_KEY, BRAND_THEME_IDENTITY_SECTION_KEYS);
1585
1618
  const brand = state.draft.brand ?? {};
1619
+ /*
1620
+ * The link preview's picture as a shared link shows it: the Asset's share variant (1200 x 630, cut
1621
+ * around its focus), drawn the way every picture of the house is drawn. The Asset's facts give the
1622
+ * variant's version and the alt text the head falls back to.
1623
+ */
1624
+ const shareImageId = brand.shareImage?.assetId ?? null;
1625
+ const shareAsset = usePhiAuthoringAssetDetails(shareImageId);
1626
+ const shareImagePresentation = shareImageId == null ? null : resolvePhiImagePresentation({
1627
+ sourceKind: "asset",
1628
+ assetId: shareImageId,
1629
+ variantKey: PhiImageAssetVariantKey.Share,
1630
+ variantVersion: shareAsset?.variantVersion ?? null,
1631
+ deliveryRevision: shareAsset?.deliveryRevision ?? null,
1632
+ originalUrl: shareAsset?.deliveryUrl?.trim() || buildPhiMediaAssetContentDeliveryUrl(shareImageId),
1633
+ });
1586
1634
  /*
1587
1635
  * The Logo shows what the Site draws, which is the Set's wherever the record says nothing about the
1588
1636
  * mode. Picking one takes the mode over; the reset hands it back to the Set.
@@ -1741,6 +1789,31 @@ export function PhiBuilderBrandIdentityControlsWidgetClient({ runtime, config, }
1741
1789
  "--phi-labeled-control-width": "100%",
1742
1790
  }, children: [_jsx(PhiBrandLineFields, { label: "Slogan", placeholder: "What the Site says about itself", fallbackIcon: "antd:star", line: brand.slogan, onChange: (next) => publishDraft(mergeThemeBrand(state.draft, { slogan: next })) }), _jsx(PhiBrandLineFields, { label: "Location", placeholder: "Where the Site says it is", fallbackIcon: "antd:location", line: brand.location, onChange: (next) => publishDraft(mergeThemeBrand(state.draft, { location: next })) })] })),
1743
1791
  },
1792
+ {
1793
+ /*
1794
+ * What a link to the Site shows in a messenger or a feed where the Page says nothing of its
1795
+ * own (NEXT_INTEGRATION.md, "Link previews"). Only a picture every visitor is served can be
1796
+ * shown there, so the picker offers the Site Space and greys out the rest.
1797
+ */
1798
+ key: "share",
1799
+ label: _jsx(PhiTypographyControl, { strong: true, children: "Link preview" }),
1800
+ children: (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, style: {
1801
+ "--phi-labeled-control-label-width": "33.333333%",
1802
+ "--phi-labeled-control-width": "100%",
1803
+ }, children: [_jsx(PhiTypographyControl, { type: "secondary", children: "The picture a shared link shows where its Page states none, cut to 1200 x 630 around its focus. Only a publicly delivered picture can be chosen." }), shareImagePresentation?.url ? (_jsx(PhiCardControl, { size: "small", padding: clientToken.paddingXS, cover: (_jsx(PhiImageControl, { presentation: shareImagePresentation, source: "asset", alt: brand.shareImage?.alt || shareAsset?.altText || "Link preview picture", width: 1200, height: 630, blurDataUrl: shareAsset?.blurDataUrl ?? null, sizes: "400px" })), children: _jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXXS, style: { minWidth: 0 }, children: [runtime.site.hostname ? (_jsx(PhiTypographyControl, { type: "secondary", style: { fontSize: clientToken.fontSizeSM }, children: runtime.site.hostname })) : null, _jsx(PhiTypographyControl, { strong: true, children: runtime.site.name || "Page title" }), _jsx(PhiTypographyControl, { type: "secondary", style: { fontSize: clientToken.fontSizeSM }, children: resolvePhiSiteDescription(brand.slogan?.label) })] }) })) : null, _jsxs(PhiFlexControl, { align: "center", gap: clientToken.paddingXS, style: { minWidth: 0 }, children: [_jsx("div", { style: { flex: "1 1 auto", minWidth: 0 }, children: _jsx(PhiMediaPickerBinding, { config: {
1804
+ mediaType: PhiMediaKind.Image,
1805
+ pageSize: 12,
1806
+ showPagination: true,
1807
+ showGroupFilter: true,
1808
+ showSearchBar: true,
1809
+ }, labels: mediaPickerLabels, searchLabels: PHI_SEARCH_WIDGET_DEFAULT_LABELS, siteSpaceOnly: true, isAssetSelectable: (asset) => isPhiMediaAssetPublic(asset.deliveryPolicy, asset.lifecycleStatus), value: brand.shareImage?.assetId ?? null, onAssetSelect: (asset) => publishDraft(mergeThemeBrand(state.draft, {
1810
+ shareImage: { assetId: asset.id, ...(brand.shareImage?.alt ? { alt: brand.shareImage.alt } : {}) },
1811
+ })), onAssetClear: () => publishDraft(mergeThemeBrand(state.draft, { shareImage: null })) }) }), brand.shareImage ? (_jsx(PhiButtonControl, { size: "small", type: "link", style: { flexShrink: 0, paddingInline: 0 }, onClick: () => publishDraft(mergeThemeBrand(state.draft, { shareImage: null })), label: "Remove" })) : null] }), _jsx(PhiLabeledControl, { label: "Alt", fill: true, children: _jsx(PhiTextControl, { value: brand.shareImage?.alt ?? "", placeholder: shareAsset?.altText || "Alt text", ariaLabel: "Link preview alt text", allowClear: false, disabled: !brand.shareImage, onChange: (next) => brand.shareImage && publishDraft(mergeThemeBrand(state.draft, {
1812
+ shareImage: next?.trim()
1813
+ ? { assetId: brand.shareImage.assetId, alt: next }
1814
+ : { assetId: brand.shareImage.assetId },
1815
+ })) }) }), _jsx(PhiLabeledControl, { label: "X account", fill: true, children: _jsx(PhiTextControl, { value: brand.xAccount ?? "", placeholder: "@account", ariaLabel: "X account", allowClear: false, onChange: (next) => publishDraft(mergeThemeBrand(state.draft, { xAccount: next?.trim() ?? "" })) }) }), brand.xAccount && !readPhiXAccount(brand.xAccount) ? (_jsx(PhiTypographyControl, { type: "danger", children: "An X account is @ and up to 15 letters, digits or underscores. This one is not stated." })) : null] })),
1816
+ },
1744
1817
  ] }) }) }));
1745
1818
  }
1746
1819
  /**
@@ -1751,12 +1824,29 @@ function isSamePhiBackgroundConfig(left, right) {
1751
1824
  return JSON.stringify(left) === JSON.stringify(right);
1752
1825
  }
1753
1826
  export function PhiBuilderBrandBackgroundControlsWidgetClient({ runtime, config, }) {
1754
- const { token: clientToken } = usePhiConfig();
1827
+ const { presets: themePresets, token: clientToken } = usePhiConfig();
1755
1828
  const themeBlocks = usePhiThemeBlockCatalog();
1756
1829
  const themeKey = resolveThemeKey(config);
1757
1830
  const { state, publishDraft, editTransaction } = usePhiBrandThemeDraft(runtime, themeKey);
1758
1831
  const mode = usePhiBrandPreviewMode(resolveThemePayloadMode(state.draft), config?.signalRoutes);
1759
1832
  const composition = resolvePhiThemeComposition(state.draft, themeBlocks);
1833
+ /*
1834
+ * The Inverse Ground the mode being authored paints, as the live render resolves it: the stated colour,
1835
+ * else the mode's own container ground. The control shows that, so an author sees what an inverse box
1836
+ * stands on before anybody stated one.
1837
+ */
1838
+ const inverseGround = useMemo(() => {
1839
+ const resolvedDraft = resolvePhiThemeRuntimePayload(state.draft, themeBlocks).theme;
1840
+ return String(resolveBrandDraftAliasTokens(resolvedDraft, resolveThemePayloadPreset(resolvedDraft, themePresets), mode).inverseGround);
1841
+ }, [mode, state.draft, themeBlocks, themePresets]);
1842
+ const inverseGroundCustomColors = useMemo(() => {
1843
+ const palette = resolveThemeCustomPalette(state.draft, resolveThemePayloadPreset(state.draft, themePresets), mode);
1844
+ return PHI_THEME_CUSTOM_COLOR_KEYS.map((key, index) => ({ key, label: `Custom ${index + 1}`, value: palette[key] }));
1845
+ }, [mode, state.draft, themePresets]);
1846
+ const inverseGroundPresets = usePhiColorControlPresets({
1847
+ customColors: inverseGroundCustomColors,
1848
+ presets: PHI_COLOR_PICKER_PRESETS,
1849
+ });
1760
1850
  const [activeBackgroundSection, changeActiveBackgroundSection] = usePhiBrandAccordionSection(BRAND_THEME_BACKGROUND_COLLAPSE_STORAGE_KEY, BRAND_THEME_BACKGROUND_SECTION_KEYS);
1761
1851
  const modeLabel = mode === "dark" ? "Dark mode" : "Light mode";
1762
1852
  const otherMode = mode === "dark" ? "light" : "dark";
@@ -1785,6 +1875,14 @@ export function PhiBuilderBrandBackgroundControlsWidgetClient({ runtime, config,
1785
1875
  label: _jsx(PhiTypographyControl, { strong: true, children: "Chrome Overlay" }),
1786
1876
  children: (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, children: [_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: clientToken.paddingXS, children: [_jsxs(PhiTypographyControl, { type: "secondary", children: [modeLabel, ". Shared by the Header, Sider and Footer Regions. Content and Hero never take it, and a Region that authors its own Background or Effect paints over it."] }), _jsxs(PhiFlexControl, { vertical: true, align: "stretch", gap: clientToken.paddingXXS, style: { flexShrink: 0 }, children: [_jsx(PhiBrandBlockResetButton, { disabled: state.draft.root?.chrome?.[mode] == null, blockTitle: composition.ground.title, onReset: () => publishDraft(clearThemeRootSurface(state.draft, "chrome", mode)) }), _jsx(PhiBrandCopyModeButton, { mode: mode, disabled: isSamePhiBackgroundConfig(chromeOverlay, otherChromeOverlay), onCopy: () => publishDraft(mergeThemeRootSurface(state.draft, "chrome", otherMode, chromeOverlay)) })] })] }), _jsx(PhiBackgroundControl, { value: chromeOverlay, motionModes: PHI_SHELL_CHROME_OVERLAY_MOTION_MODES, filters: PHI_SHELL_CHROME_OVERLAY_FILTERS, baseKinds: PHI_SHELL_CHROME_OVERLAY_BASE_KINDS, imageSourceKinds: PHI_SHELL_CHROME_OVERLAY_IMAGE_SOURCE_KINDS, renderMediaPicker: renderPhiThemeRootBackgroundMediaPicker, editTransaction: editTransaction, onChange: (value) => publishDraft(mergeThemeRootSurface(state.draft, "chrome", mode, value)) }, `chrome-${mode}`)] })),
1787
1877
  },
1878
+ {
1879
+ key: "inverse",
1880
+ label: _jsx(PhiTypographyControl, { strong: true, children: "Inverse Ground" }),
1881
+ children: (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, children: [_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: clientToken.paddingXS, children: [_jsxs(PhiTypographyControl, { type: "secondary", children: [modeLabel, ". What a Surface toned Inverse stands on when it is drawn in this mode, on a page in the other one. Always opaque; unset, it is this mode's container colour."] }), _jsx(PhiBrandBlockResetButton, { disabled: state.draft.root?.inverse?.[mode] == null, blockTitle: composition.ground.title, onReset: () => publishDraft(clearThemeRootSurface(state.draft, "inverse", mode)) })] }), _jsx(PhiColorControl, { mode: "single", disabledAlpha: true, value: inverseGround, presets: inverseGroundPresets, onChange: (next) => {
1882
+ if (next)
1883
+ publishDraft(mergeThemeInverseGround(state.draft, mode, next));
1884
+ } }, `inverse-${mode}`)] })),
1885
+ },
1788
1886
  {
1789
1887
  key: "shadow",
1790
1888
  label: _jsx(PhiTypographyControl, { strong: true, children: "Chrome Shadow" }),
@@ -1,6 +1,7 @@
1
1
  import type { PhiCmsWidgetPlugin } from "../../../../../types";
2
- import { type PhiControlSignalConfig } from "../../../../../components/widgets/config/control-signal-config";
3
- export type PhiBuilderBrandWidgetConfig = Pick<PhiControlSignalConfig, "key" | "signalRoutes"> & {
2
+ import type { PhiControlSignalConfig } from "../../../../../components/widgets/config/control-signal-config";
3
+ /** Routes only: a panel listens and never emits, so it has no signal identity of its own. */
4
+ export type PhiBuilderBrandWidgetConfig = Pick<PhiControlSignalConfig, "signalRoutes"> & {
4
5
  themeKey?: string;
5
6
  };
6
7
  type PhiBuilderBrandWidgetDefinition = Pick<PhiCmsWidgetPlugin<PhiBuilderBrandWidgetConfig>, "kind" | "pluginKey" | "typeKey" | "title" | "description" | "category" | "iconFamily" | "runtimeSignals" | "requiredDataProviders" | "slotSizePolicy" | "fields" | "parseConfig">;
@@ -2,7 +2,7 @@ import { PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS } from "../../../../../constants/m
2
2
  import { PHI_THEME_SIGNAL_CHANNELS } from "../../../../../plugins/runtime-modules/theme/controller/signals";
3
3
  import { createPhiCmsWidgetDefinition } from "../../../../../components/widgets/config/helpers";
4
4
  import { readString } from "../../../../../components/widgets/config/parser-primitives";
5
- import { parsePhiControlSignalConfig, } from "../../../../../components/widgets/config/control-signal-config";
5
+ import { readPhiSignalRouteSet } from "../../../../../types/signals";
6
6
  function parseBuilderBrandWidgetConfig(config) {
7
7
  return {
8
8
  /*
@@ -10,7 +10,7 @@ function parseBuilderBrandWidgetConfig(config) {
10
10
  * wrote, so a route an author adds in the Builder works as well. The parser dropped them once and
11
11
  * the panels listened to a hard-coded broadcast, which left the declared input decoration.
12
12
  */
13
- ...parsePhiControlSignalConfig(config, { key: "brandPreviewThemeMode" }),
13
+ signalRoutes: readPhiSignalRouteSet(config.signalRoutes),
14
14
  themeKey: readString(config.themeKey),
15
15
  };
16
16
  }
@@ -1,30 +1,42 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { buildPhiWidgetLabelTranslatorOptions } from "../../../../../components/widgets/label-sets/runtime-options";
3
- import { PhiBuilderBrandBackgroundControlsWidgetClient, PhiBuilderBrandIdentityControlsWidgetClient, PhiBuilderBrandStyleControlsWidgetClient, PhiBuilderBrandThemeControlsWidgetClient, PhiBuilderBrandThemePreviewWidgetClient, } from "./client";
4
3
  import { PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_DEFINITION, } from "./config";
5
4
  import { getPhiColorPickerLabels } from "../../../../../components/widgets/label-sets/color-picker";
6
5
  import { getPhiMediaWidgetLabels } from "../../../../../components/media/label-sets/media";
7
6
  import { PhiMediaPickerLabelsProvider } from "../../../../../components/media/phi-media-picker-labels";
7
+ import { PhiRuntimeModuleRenderClientHost } from "../../../../../components/runtime/runtime-module-render-client-manifest";
8
+ import { PhiRuntimeRenderClientType } from "../../../../../constants/runtime-render-client-types";
9
+ /*
10
+ * The five panels of the Theme workspace are Render Clients the Builder's Client manifest loads when one is
11
+ * drawn (`client-manifests/builder.tsx`), not Client components this server half imports: an import here
12
+ * put the whole workspace (`./client`, some 180 kB of source with what it reaches) into every Builder
13
+ * route's client graph, the dashboard's included, because a server-side `import()` defers nothing for the
14
+ * browser (TODOS.md, "The Builder got heavier").
15
+ */
8
16
  export const PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_PLUGIN = {
9
17
  ...PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_DEFINITION,
10
- render: async ({ runtime, config }) => (_jsx(PhiBuilderBrandThemeControlsWidgetClient, { runtime: runtime, config: config, colorPickerLabels: await getPhiColorPickerLabels(buildPhiWidgetLabelTranslatorOptions(runtime)) })),
18
+ render: async ({ runtime, config }) => (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandThemeControls, componentProps: {
19
+ runtime,
20
+ config,
21
+ colorPickerLabels: await getPhiColorPickerLabels(buildPhiWidgetLabelTranslatorOptions(runtime)),
22
+ } })),
11
23
  };
12
24
  export const PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_PLUGIN = {
13
25
  ...PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_DEFINITION,
14
- render: ({ runtime, config }) => _jsx(PhiBuilderBrandThemePreviewWidgetClient, { runtime: runtime, config: config }),
15
- renderPreview: ({ runtime }) => _jsx(PhiBuilderBrandThemePreviewWidgetClient, { runtime: runtime }),
26
+ render: ({ runtime, config }) => (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandThemePreview, componentProps: { runtime, config } })),
27
+ renderPreview: ({ runtime }) => (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandThemePreview, componentProps: { runtime } })),
16
28
  };
17
29
  export const PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_PLUGIN = {
18
30
  ...PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_DEFINITION,
19
- render: ({ runtime, config }) => _jsx(PhiBuilderBrandStyleControlsWidgetClient, { runtime: runtime, config: config }),
31
+ render: ({ runtime, config }) => (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandStyleControls, componentProps: { runtime, config } })),
20
32
  };
21
33
  export const PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_PLUGIN = {
22
34
  ...PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_DEFINITION,
23
35
  // The picker the Background Control opens says its words in the reader's language.
24
- render: async ({ runtime, config }) => (_jsx(PhiMediaPickerLabelsProvider, { labels: await getPhiMediaWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime)), children: _jsx(PhiBuilderBrandBackgroundControlsWidgetClient, { runtime: runtime, config: config }) })),
36
+ render: async ({ runtime, config }) => (_jsx(PhiMediaPickerLabelsProvider, { labels: await getPhiMediaWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime)), children: _jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandBackgroundControls, componentProps: { runtime, config } }) })),
25
37
  };
26
38
  export const PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_PLUGIN = {
27
39
  ...PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_DEFINITION,
28
40
  // The picker the Logo field opens says its words in the reader's language.
29
- render: async ({ runtime, config }) => (_jsx(PhiMediaPickerLabelsProvider, { labels: await getPhiMediaWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime)), children: _jsx(PhiBuilderBrandIdentityControlsWidgetClient, { runtime: runtime, config: config }) })),
41
+ render: async ({ runtime, config }) => (_jsx(PhiMediaPickerLabelsProvider, { labels: await getPhiMediaWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime)), children: _jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.BuilderBrandIdentityControls, componentProps: { runtime, config } }) })),
30
42
  };
@@ -6,4 +6,14 @@ export const PHI_THREADS_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS = [
6
6
  ownerModuleId: PHI_THREADS_RUNTIME_MODULE_ID,
7
7
  loadLive: async () => (await import("./services/options")).PhiThreadCandidatesOptionsProviderClient,
8
8
  },
9
+ {
10
+ key: PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS.customerFile,
11
+ ownerModuleId: PHI_THREADS_RUNTIME_MODULE_ID,
12
+ loadLive: async () => (await import("./services/customer-file-table")).PhiThreadsCustomerFileTableProviderClient,
13
+ },
14
+ {
15
+ key: PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS.customerFileAddresses,
16
+ ownerModuleId: PHI_THREADS_RUNTIME_MODULE_ID,
17
+ loadLive: async () => (await import("./services/customer-file-addresses")).PhiThreadsCustomerFileAddressesProviderClient,
18
+ },
9
19
  ];