@phis/ui 0.8.0 → 0.8.2

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 (304) hide show
  1. package/README.md +9 -2
  2. package/components/cms/phi-cms-layout-renderer.js +15 -7
  3. package/components/cms/phi-cms-render-diagnostic-client.d.ts +3 -1
  4. package/components/cms/phi-cms-render-diagnostic-client.js +4 -3
  5. package/components/cms/phi-cms-render-diagnostic.d.ts +8 -2
  6. package/components/cms/phi-cms-render-diagnostic.js +12 -2
  7. package/components/cms/phi-cms-render-error-boundary.d.ts +2 -0
  8. package/components/cms/phi-cms-render-error-boundary.js +1 -1
  9. package/components/cms/phi-cms-root-layout.js +3 -1
  10. package/components/controls/phi-media-picker-control.d.ts +9 -0
  11. package/components/controls/phi-media-picker-control.js +1 -1
  12. package/components/controls/phi-popover-control.js +4 -1
  13. package/components/controls/phi-table-control.d.ts +7 -1
  14. package/components/controls/phi-table-control.js +26 -11
  15. package/components/forms/form-descriptor-field-check.d.ts +18 -0
  16. package/components/forms/form-descriptor-field-check.js +41 -0
  17. package/components/forms/form-descriptor-runtime-client.js +11 -10
  18. package/components/forms/form-record-source.d.ts +38 -0
  19. package/components/forms/form-record-source.js +48 -0
  20. package/components/forms/shared-form-descriptors.d.ts +0 -34
  21. package/components/forms/shared-form-descriptors.js +0 -6
  22. package/components/forms/shared-form-ids.d.ts +1 -1
  23. package/components/forms/shared-form-ids.js +1 -1
  24. package/components/media/media-settings-labels.d.ts +1 -0
  25. package/components/media/media-settings-labels.js +2 -0
  26. package/components/media/media-upload-flow.d.ts +62 -5
  27. package/components/media/media-upload-flow.js +62 -24
  28. package/components/media/phi-area-upload-widget.d.ts +44 -1
  29. package/components/media/phi-area-upload-widget.js +32 -7
  30. package/components/media/phi-media-picker-binding.d.ts +41 -33
  31. package/components/media/phi-media-picker-binding.js +2 -1
  32. package/components/media/phi-media-upload.d.ts +10 -3
  33. package/components/media/phi-media-upload.js +11 -8
  34. package/components/media/use-media-library-add-picker.d.ts +33 -32
  35. package/components/overlays/phi-overlay-container-client.js +11 -9
  36. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +7 -0
  37. package/components/regions/presets/phi-settings-page-shell-tree.js +3 -3
  38. package/components/shell/phi-icon-names.d.ts +3 -0
  39. package/components/shell/phi-icon-names.js +3 -0
  40. package/components/shell/phi-icon.d.ts +5 -7
  41. package/components/shell/phi-icon.js +8 -21
  42. package/components/shell/phi-widget-icon.js +1 -0
  43. package/components/tables/client/phi-table-binding-params.d.ts +24 -0
  44. package/components/tables/client/phi-table-binding-params.js +39 -0
  45. package/components/tables/client/phi-table-binding.d.ts +1 -3
  46. package/components/tables/client/phi-table-binding.js +5 -9
  47. package/components/widgets/client/html-editor-link-node.d.ts +12 -0
  48. package/components/widgets/client/html-editor-link-node.js +60 -0
  49. package/components/widgets/client/html-editor.js +10 -6
  50. package/components/widgets/client/shared/phi-button-icons.d.ts +6 -4
  51. package/components/widgets/client/shared/phi-button-icons.js +8 -12
  52. package/components/widgets/client/shared/phi-collection-binding-params.d.ts +8 -0
  53. package/components/widgets/client/shared/phi-collection-binding-params.js +13 -0
  54. package/components/widgets/client/shared/phi-collection-provider.d.ts +11 -1
  55. package/components/widgets/client/shared/phi-collection-provider.js +5 -0
  56. package/components/widgets/client/shared/phi-collection-view-binding.d.ts +1 -0
  57. package/components/widgets/client/shared/phi-collection-view-binding.js +33 -26
  58. package/components/widgets/client/shared/phi-command-buttons.d.ts +16 -0
  59. package/components/widgets/client/shared/phi-command-buttons.js +9 -1
  60. package/components/widgets/label-sets/admin-users.d.ts +1 -0
  61. package/components/widgets/label-sets/admin-users.js +2 -0
  62. package/components/widgets/label-sets/builder-modules.js +4 -0
  63. package/components/widgets/label-sets/profile.d.ts +0 -16
  64. package/components/widgets/label-sets/profile.js +0 -37
  65. package/components/widgets/label-sets/registration.d.ts +0 -1
  66. package/components/widgets/label-sets/registration.js +0 -2
  67. package/components/widgets/label-sets/revisions.js +2 -0
  68. package/components/widgets/label-sets/signals.js +2 -0
  69. package/components/widgets/label-types/builder-modules.d.ts +4 -0
  70. package/components/widgets/label-types/builder-modules.js +2 -0
  71. package/components/widgets/label-types/revisions.d.ts +2 -0
  72. package/components/widgets/label-types/revisions.js +2 -1
  73. package/components/widgets/label-types/signals.d.ts +2 -0
  74. package/components/widgets/label-types/signals.js +1 -0
  75. package/components/widgets/shared/widget-failure-audience.d.ts +7 -0
  76. package/components/widgets/shared/widget-failure-audience.js +21 -0
  77. package/components/widgets/shared/widget-failure-client.js +5 -2
  78. package/components/widgets/shared/widget-failure-notice-client.d.ts +6 -0
  79. package/components/widgets/shared/widget-failure-notice-client.js +10 -0
  80. package/components/widgets/shared/widget-failure-notice.d.ts +6 -0
  81. package/components/widgets/shared/widget-failure-notice.js +17 -0
  82. package/components/widgets/shared/widget-failure-staff.d.ts +3 -0
  83. package/components/widgets/shared/widget-failure-staff.js +18 -0
  84. package/components/widgets/shared/widget-failure.d.ts +9 -6
  85. package/components/widgets/shared/widget-failure.js +0 -9
  86. package/components/widgets/shared/widget-failure.server.d.ts +4 -2
  87. package/components/widgets/shared/widget-failure.server.js +8 -3
  88. package/constants/cms-widget-types.d.ts +1 -0
  89. package/constants/cms-widget-types.js +3 -0
  90. package/constants/customer-file.d.ts +12 -3
  91. package/constants/customer-file.js +12 -3
  92. package/constants/runtime-module-ownership.js +5 -3
  93. package/constants/site-address.d.ts +9 -0
  94. package/constants/site-address.js +10 -0
  95. package/constants/table-loading.d.ts +14 -0
  96. package/constants/table-loading.js +14 -0
  97. package/constants.d.ts +2 -1
  98. package/constants.js +3 -1
  99. package/gateway/site-cms-write-validation.js +19 -3
  100. package/gateway/site-proxy.d.ts +12 -0
  101. package/gateway/site-proxy.js +20 -0
  102. package/helpers/announced-action.d.ts +17 -0
  103. package/helpers/announced-action.js +29 -0
  104. package/helpers/phi-metadata.d.ts +0 -8
  105. package/helpers/phi-metadata.js +1 -10
  106. package/helpers/phi-site-description.d.ts +11 -0
  107. package/helpers/phi-site-description.js +13 -0
  108. package/helpers/preset-form-check.d.ts +14 -0
  109. package/helpers/preset-form-check.js +12 -0
  110. package/helpers/preset-table-check.d.ts +19 -15
  111. package/helpers/preset-table-check.js +33 -39
  112. package/helpers/record-widget-binding.d.ts +10 -0
  113. package/helpers/record-widget-binding.js +35 -0
  114. package/helpers/record-widget.d.ts +1 -10
  115. package/helpers/record-widget.js +4 -33
  116. package/helpers/table-widget-binding.d.ts +12 -0
  117. package/helpers/table-widget-binding.js +296 -0
  118. package/helpers/tree-widget-binding.d.ts +19 -0
  119. package/helpers/tree-widget-binding.js +72 -0
  120. package/helpers/typed-confirmation.d.ts +9 -0
  121. package/helpers/typed-confirmation.js +13 -0
  122. package/helpers/widget-binding-check.d.ts +22 -0
  123. package/helpers/widget-binding-check.js +91 -0
  124. package/module-page-check.d.ts +2 -0
  125. package/module-page-check.js +2 -0
  126. package/net/phi-next-proxy.d.ts +7 -0
  127. package/net/phi-next-proxy.js +1 -1
  128. package/next/root-route.js +2 -1
  129. package/package.json +27 -14
  130. package/plugins/runtime-modules/accounting/ids.d.ts +7 -4
  131. package/plugins/runtime-modules/accounting/ids.js +14 -3
  132. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +21 -9
  133. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +29 -15
  134. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +11 -8
  135. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +206 -137
  136. package/plugins/runtime-modules/app/client-data-providers.js +1 -1
  137. package/plugins/runtime-modules/app/data-providers.d.ts +14 -69
  138. package/plugins/runtime-modules/app/data-providers.js +19 -54
  139. package/plugins/runtime-modules/app/definition.d.ts +8 -80
  140. package/plugins/runtime-modules/app/forms.d.ts +1 -16
  141. package/plugins/runtime-modules/app/forms.js +0 -59
  142. package/plugins/runtime-modules/app/ids.d.ts +2 -1
  143. package/plugins/runtime-modules/app/ids.js +3 -2
  144. package/plugins/runtime-modules/app/module.d.ts +8 -80
  145. package/plugins/runtime-modules/app/services/addresses-collection.d.ts +59 -0
  146. package/plugins/runtime-modules/app/services/{addresses-table.js → addresses-collection.js} +23 -19
  147. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +10 -6
  148. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +37 -73
  149. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +0 -5
  150. package/plugins/runtime-modules/app/trees/addresses-label-set.js +2 -6
  151. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.d.ts +1 -2
  152. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +1 -17
  153. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +0 -2
  154. package/plugins/runtime-modules/app/trees/profile-label-set.js +2 -14
  155. package/plugins/runtime-modules/area-contributions/admin.d.ts +1 -1
  156. package/plugins/runtime-modules/area-contributions/admin.js +2 -0
  157. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +5 -0
  158. package/plugins/runtime-modules/avatar/addresses.d.ts +1 -1
  159. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +16 -6
  160. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +3 -1
  161. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +3 -1
  162. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +5 -1
  163. package/plugins/runtime-modules/builder/signal-wiring-options.js +9 -2
  164. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +5 -0
  165. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +14 -1
  166. package/plugins/runtime-modules/cdn/authoring-widgets.d.ts +3 -0
  167. package/plugins/runtime-modules/cdn/authoring-widgets.js +7 -0
  168. package/plugins/runtime-modules/cdn/authoring.d.ts +1 -0
  169. package/plugins/runtime-modules/cdn/authoring.js +8 -0
  170. package/plugins/runtime-modules/cdn/bytes.d.ts +5 -0
  171. package/plugins/runtime-modules/cdn/bytes.js +17 -0
  172. package/plugins/runtime-modules/cdn/client-data-providers.d.ts +7 -0
  173. package/plugins/runtime-modules/cdn/client-data-providers.js +9 -0
  174. package/plugins/runtime-modules/cdn/data-providers.d.ts +134 -0
  175. package/plugins/runtime-modules/cdn/data-providers.js +117 -0
  176. package/plugins/runtime-modules/cdn/definition.d.ts +140 -0
  177. package/plugins/runtime-modules/cdn/definition.js +23 -0
  178. package/plugins/runtime-modules/cdn/ids.d.ts +18 -0
  179. package/plugins/runtime-modules/cdn/ids.js +20 -0
  180. package/plugins/runtime-modules/cdn/module.d.ts +131 -0
  181. package/plugins/runtime-modules/cdn/module.js +4 -0
  182. package/plugins/runtime-modules/cdn/platform.d.ts +25 -0
  183. package/plugins/runtime-modules/cdn/platform.js +73 -0
  184. package/plugins/runtime-modules/cdn/presets.d.ts +2 -0
  185. package/plugins/runtime-modules/cdn/presets.js +20 -0
  186. package/plugins/runtime-modules/cdn/server.d.ts +1 -0
  187. package/plugins/runtime-modules/cdn/server.js +14 -0
  188. package/plugins/runtime-modules/cdn/services/table.d.ts +11 -0
  189. package/plugins/runtime-modules/cdn/services/table.js +296 -0
  190. package/plugins/runtime-modules/cdn/services/upload.d.ts +20 -0
  191. package/plugins/runtime-modules/cdn/services/upload.js +146 -0
  192. package/plugins/runtime-modules/cdn/table-params.d.ts +10 -0
  193. package/plugins/runtime-modules/cdn/table-params.js +10 -0
  194. package/plugins/runtime-modules/cdn/trees/admin-cdn-label-set.d.ts +95 -0
  195. package/plugins/runtime-modules/cdn/trees/admin-cdn-label-set.js +156 -0
  196. package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.d.ts +18 -0
  197. package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.js +479 -0
  198. package/plugins/runtime-modules/cdn/widgets/upload/client.d.ts +12 -0
  199. package/plugins/runtime-modules/cdn/widgets/upload/client.js +138 -0
  200. package/plugins/runtime-modules/cdn/widgets/upload/config.d.ts +29 -0
  201. package/plugins/runtime-modules/cdn/widgets/upload/config.js +43 -0
  202. package/plugins/runtime-modules/cdn/widgets/upload/label-types.d.ts +24 -0
  203. package/plugins/runtime-modules/cdn/widgets/upload/label-types.js +1 -0
  204. package/plugins/runtime-modules/cdn/widgets/upload/labels.d.ts +4 -0
  205. package/plugins/runtime-modules/cdn/widgets/upload/labels.js +72 -0
  206. package/plugins/runtime-modules/cdn/widgets/upload/plugin.d.ts +3 -0
  207. package/plugins/runtime-modules/cdn/widgets/upload/plugin.js +7 -0
  208. package/plugins/runtime-modules/cdn/widgets/upload/server.d.ts +8 -0
  209. package/plugins/runtime-modules/cdn/widgets/upload/server.js +17 -0
  210. package/plugins/runtime-modules/cdn/widgets.d.ts +2 -0
  211. package/plugins/runtime-modules/cdn/widgets.js +13 -0
  212. package/plugins/runtime-modules/client-authoring-providers/admin.d.ts +1 -1
  213. package/plugins/runtime-modules/client-authoring-providers/admin.js +6 -0
  214. package/plugins/runtime-modules/client-manifests/admin.js +11 -1
  215. package/plugins/runtime-modules/client-manifests/common.js +6 -0
  216. package/plugins/runtime-modules/core/widgets/card/config.d.ts +1 -1
  217. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
  218. package/plugins/runtime-modules/core/widgets/collection-view/client.js +5 -2
  219. package/plugins/runtime-modules/core/widgets/collection-view/config.js +8 -0
  220. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.d.ts +55 -0
  221. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.js +175 -0
  222. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.d.ts +48 -0
  223. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.js +67 -0
  224. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +1 -1
  225. package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -1
  226. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -1
  227. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +1 -1
  228. package/plugins/runtime-modules/core/widgets/form/config.d.ts +1 -1
  229. package/plugins/runtime-modules/core/widgets/form/config.js +14 -1
  230. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -1
  231. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +1 -1
  232. package/plugins/runtime-modules/core/widgets/record/client.js +2 -6
  233. package/plugins/runtime-modules/core/widgets/result/config.d.ts +1 -1
  234. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -1
  235. package/plugins/runtime-modules/core/widgets/table/client.js +36 -52
  236. package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -3
  237. package/plugins/runtime-modules/core/widgets/table/config.js +3 -0
  238. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +2 -2
  239. package/plugins/runtime-modules/core/widgets/thread-conversation/config.d.ts +6 -2
  240. package/plugins/runtime-modules/core/widgets/thread-conversation/config.js +6 -1
  241. package/plugins/runtime-modules/core/widgets/thread-widget-config.d.ts +10 -0
  242. package/plugins/runtime-modules/core/widgets/thread-widget-config.js +6 -0
  243. package/plugins/runtime-modules/core/widgets/tree/client.js +6 -6
  244. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.d.ts +2 -0
  245. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.js +2 -0
  246. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +5 -0
  247. package/plugins/runtime-modules/revisions/controller/binding.d.ts +37 -0
  248. package/plugins/runtime-modules/revisions/controller/binding.js +75 -0
  249. package/plugins/runtime-modules/revisions/controller/client.d.ts +5 -0
  250. package/plugins/runtime-modules/revisions/controller/client.js +74 -50
  251. package/plugins/runtime-modules/revisions/controller/definition.d.ts +5 -0
  252. package/plugins/runtime-modules/revisions/controller/definition.js +10 -0
  253. package/plugins/runtime-modules/revisions/forms.js +1 -1
  254. package/plugins/runtime-modules/revisions/page-ids.d.ts +1 -1
  255. package/plugins/runtime-modules/revisions/page-ids.js +4 -1
  256. package/plugins/runtime-modules/revisions/services/options.js +14 -4
  257. package/plugins/runtime-modules/revisions/services/table.js +41 -21
  258. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +76 -3
  259. package/plugins/runtime-modules/theme/controller/runtime.js +14 -2
  260. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +39 -13
  261. package/plugins/runtime-modules/threads/client-data-providers.js +5 -0
  262. package/plugins/runtime-modules/threads/controller/client.js +62 -2
  263. package/plugins/runtime-modules/threads/controller/definition.js +48 -0
  264. package/plugins/runtime-modules/threads/data-providers.d.ts +22 -37
  265. package/plugins/runtime-modules/threads/data-providers.js +35 -24
  266. package/plugins/runtime-modules/threads/definition.d.ts +22 -37
  267. package/plugins/runtime-modules/threads/ids.d.ts +2 -0
  268. package/plugins/runtime-modules/threads/ids.js +2 -0
  269. package/plugins/runtime-modules/threads/services/customer-file-addresses.d.ts +30 -0
  270. package/plugins/runtime-modules/threads/services/customer-file-addresses.js +59 -0
  271. package/plugins/runtime-modules/threads/services/customer-file-read.d.ts +22 -0
  272. package/plugins/runtime-modules/threads/services/customer-file-read.js +101 -0
  273. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +14 -80
  274. package/plugins/runtime-modules/threads/services/customer-file-table.js +27 -112
  275. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +4 -0
  276. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +4 -0
  277. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +15 -0
  278. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +5 -0
  279. package/server-helpers/runtime.js +0 -1
  280. package/styles/controls.css +4 -2
  281. package/styles/layout.css +7 -0
  282. package/theme/phi-antd-token-resolver.d.ts +8 -0
  283. package/theme/phi-antd-token-resolver.js +10 -0
  284. package/theme/phi-theme-color.d.ts +19 -0
  285. package/theme/phi-theme-color.js +42 -0
  286. package/theme/phi-theme-gradients.js +4 -22
  287. package/theme/phi-theme-palette-defaults.d.ts +16 -0
  288. package/theme/phi-theme-palette-defaults.js +103 -0
  289. package/types/cms-plugins.d.ts +6 -1
  290. package/types/collection-provider.d.ts +27 -0
  291. package/types/collection-signal-values.d.ts +2 -0
  292. package/types/collection-signal-values.js +23 -0
  293. package/types/collection-view-widget.d.ts +9 -0
  294. package/types/core-widget-placements.d.ts +6 -0
  295. package/types/signals.d.ts +2 -0
  296. package/types/signals.js +2 -0
  297. package/types/table-widget.d.ts +17 -3
  298. package/types/table-widget.js +0 -282
  299. package/types/tree-widget.d.ts +0 -1
  300. package/types/tree-widget.js +0 -60
  301. package/types/widget-runtime.d.ts +0 -1
  302. package/types.d.ts +1 -1
  303. package/types.js +1 -1
  304. package/plugins/runtime-modules/app/services/addresses-table.d.ts +0 -135
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { usePhiWidgetFailureStaff } from "./widget-failure-audience";
3
+ import { renderPhiWidgetFailureNotice } from "./widget-failure-notice";
4
+ /**
5
+ * The card for a failure the server decided and has already written down (`PhiWidgetFailureServer`):
6
+ * drawn here because only the browser's side of the page knows whether the viewer is Staff.
7
+ */
8
+ export function PhiWidgetFailureNotice(props) {
9
+ return renderPhiWidgetFailureNotice(props, usePhiWidgetFailureStaff());
10
+ }
@@ -0,0 +1,6 @@
1
+ import type { PhiWidgetFailureProps } from "./widget-failure";
2
+ /**
3
+ * The card itself, or nothing on a live page for anyone but Staff (`staff`, read from
4
+ * `usePhiWidgetFailureStaff`). Both variants draw through this, so they cannot drift.
5
+ */
6
+ export declare function renderPhiWidgetFailureNotice({ renderMode, widgetType, widgetId, title, description }: PhiWidgetFailureProps, staff: boolean): import("react").JSX.Element | null;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { PhiAlertControl } from "../../controls/phi-alert-control";
3
+ /*
4
+ * Apart from `widget-failure.tsx`, which writes the warning: the card is drawn in the browser for a
5
+ * failure the server decided too (`PhiWidgetFailureNotice`), and that Client needs the card and not the
6
+ * log writer.
7
+ */
8
+ /**
9
+ * The card itself, or nothing on a live page for anyone but Staff (`staff`, read from
10
+ * `usePhiWidgetFailureStaff`). Both variants draw through this, so they cannot drift.
11
+ */
12
+ export function renderPhiWidgetFailureNotice({ renderMode, widgetType, widgetId, title, description }, staff) {
13
+ if (renderMode === "live" && !staff) {
14
+ return null;
15
+ }
16
+ return (_jsx("div", { "data-phi-widget-failure": widgetType, "data-phi-widget-failure-id": widgetId == null ? undefined : String(widgetId), children: _jsx(PhiAlertControl, { level: "error", showIcon: true, title: title, description: description ?? undefined }) }));
17
+ }
@@ -0,0 +1,3 @@
1
+ import { type PhiAccessViewer } from "../../../types/access";
2
+ /** That `viewer` is Staff and reads a failed Widget's card on a live page (`PhiWidgetFailureAudienceProvider`). */
3
+ export declare function canPhiViewerReadWidgetFailures(viewer: PhiAccessViewer): boolean;
@@ -0,0 +1,18 @@
1
+ import { PhiBaseRole } from "@phis/contracts/access";
2
+ import { canPhiViewerAccess, PHI_CORE_ROLE_PROVIDER_ID } from "../../../types/access";
3
+ /*
4
+ * Who reads a Widget's failure on a live page: Staff, who is whoever holds any Core role
5
+ * (`PhiBaseRole.Staff` in @phis/contracts/access). They can have it fixed -- an author, a maintainer,
6
+ * a colleague who tells one -- and a Widget that is simply absent for them was a failure nobody saw
7
+ * (@phis/support's Linked work Table until f5bbd545). A visitor is shown nothing, as before. Admin is
8
+ * Staff by the Site-superuser rule of `canPhiViewerAccess`.
9
+ */
10
+ const PHI_WIDGET_FAILURE_READERS = {
11
+ access: "roles",
12
+ providerId: PHI_CORE_ROLE_PROVIDER_ID,
13
+ allowedRoleFlags: Object.values(PhiBaseRole).reduce((mask, flag) => mask | flag, 0),
14
+ };
15
+ /** That `viewer` is Staff and reads a failed Widget's card on a live page (`PhiWidgetFailureAudienceProvider`). */
16
+ export function canPhiViewerReadWidgetFailures(viewer) {
17
+ return canPhiViewerAccess(viewer, PHI_WIDGET_FAILURE_READERS);
18
+ }
@@ -7,10 +7,15 @@ import type { PhiRenderableBlockRenderMode } from "../../../types/renderable-blo
7
7
  *
8
8
  * Said to the person who can do something about it, as the renderer says an unrenderable block
9
9
  * (`renderCmsDiagnostic`). In the Builder that is the author, and the card stands in the Widget's own
10
- * place with the cause. On a live page -- a revision preview is one -- it is nobody: a visitor cannot
11
- * rebind a Provider, and a heading over an error, or over an empty frame, reads as a broken Site or as
12
- * one that published nothing. So the Widget is absent and the rest of the page stands. The warning is
13
- * written either way, which is where an operator finds it.
10
+ * place with the cause. On a live page -- a revision preview is one -- it is Staff (whoever holds a
11
+ * Core role, `canPhiViewerReadWidgetFailures`), who see the same card in the same place: a config is
12
+ * checked where it is made and the browser trusts it (owner, 2026-11-24), so what still fails here is
13
+ * runtime state or a config stored before the checks, and a Widget that is simply absent for the people
14
+ * who could have it fixed is a failure nobody sees. A visitor sees nothing: they cannot rebind a
15
+ * Provider, and a heading over an error, or over an empty frame, reads as a broken Site or as one that
16
+ * published nothing. So for them the Widget is absent and the rest of the page stands. The warning is
17
+ * written either way, which is where an operator finds it -- on the server for a failure the server
18
+ * decided, in the browser console for one found in the browser, which has no way to the Site's log.
14
19
  *
15
20
  * What a visitor is meant to read -- a form's own answer, an empty state, a refusal addressed to them --
16
21
  * is content, not a failure, and does not come here.
@@ -27,5 +32,3 @@ export type PhiWidgetFailureProps = {
27
32
  };
28
33
  export declare const PHI_WIDGET_FAILURE_LOG_EVENT = "cms.widget.unavailable";
29
34
  export declare function logPhiWidgetFailure({ renderMode, widgetType, widgetId, title, description, error, }: PhiWidgetFailureProps): void;
30
- /** The card itself, or nothing on a live page. Both variants draw through this, so they cannot drift. */
31
- export declare function renderPhiWidgetFailureNotice({ renderMode, widgetType, widgetId, title, description, }: PhiWidgetFailureProps): import("react").JSX.Element | null;
@@ -1,6 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { logRuntimeEvent } from "../../../net/log";
3
- import { PhiAlertControl } from "../../controls/phi-alert-control";
4
2
  export const PHI_WIDGET_FAILURE_LOG_EVENT = "cms.widget.unavailable";
5
3
  export function logPhiWidgetFailure({ renderMode, widgetType, widgetId, title, description, error, }) {
6
4
  logRuntimeEvent("warn", PHI_WIDGET_FAILURE_LOG_EVENT, {
@@ -11,10 +9,3 @@ export function logPhiWidgetFailure({ renderMode, widgetType, widgetId, title, d
11
9
  meta: { widgetType, title, description: description ?? null, renderMode },
12
10
  });
13
11
  }
14
- /** The card itself, or nothing on a live page. Both variants draw through this, so they cannot drift. */
15
- export function renderPhiWidgetFailureNotice({ renderMode, widgetType, widgetId, title, description, }) {
16
- if (renderMode === "live") {
17
- return null;
18
- }
19
- return (_jsx("div", { "data-phi-widget-failure": widgetType, "data-phi-widget-failure-id": widgetId == null ? undefined : String(widgetId), children: _jsx(PhiAlertControl, { level: "error", showIcon: true, title: title, description: description ?? undefined }) }));
20
- }
@@ -4,6 +4,8 @@ import { type PhiWidgetFailureProps } from "./widget-failure";
4
4
  * A Widget's data or configuration failure, decided while the page is drawn on the server.
5
5
  *
6
6
  * The warning is written here, during the render, because this render happens once per request and on
7
- * the machine whose log an operator reads. See `PhiWidgetFailureProps` for what counts and who sees it.
7
+ * the machine whose log an operator reads. The card is the browser's to draw or leave out, which knows
8
+ * whether the viewer is Staff (`PhiWidgetFailureNotice`). See `PhiWidgetFailureProps` for what counts and
9
+ * who sees it.
8
10
  */
9
- export declare function PhiWidgetFailureServer(props: PhiWidgetFailureProps): import("react").JSX.Element | null;
11
+ export declare function PhiWidgetFailureServer(props: PhiWidgetFailureProps): import("react").JSX.Element;
@@ -1,12 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import "server-only";
2
- import { logPhiWidgetFailure, renderPhiWidgetFailureNotice } from "./widget-failure";
3
+ import { logPhiWidgetFailure } from "./widget-failure";
4
+ import { PhiWidgetFailureNotice } from "./widget-failure-notice-client";
3
5
  /**
4
6
  * A Widget's data or configuration failure, decided while the page is drawn on the server.
5
7
  *
6
8
  * The warning is written here, during the render, because this render happens once per request and on
7
- * the machine whose log an operator reads. See `PhiWidgetFailureProps` for what counts and who sees it.
9
+ * the machine whose log an operator reads. The card is the browser's to draw or leave out, which knows
10
+ * whether the viewer is Staff (`PhiWidgetFailureNotice`). See `PhiWidgetFailureProps` for what counts and
11
+ * who sees it.
8
12
  */
9
13
  export function PhiWidgetFailureServer(props) {
10
14
  logPhiWidgetFailure(props);
11
- return renderPhiWidgetFailureNotice(props);
15
+ const { error: _logged, ...notice } = props;
16
+ return _jsx(PhiWidgetFailureNotice, { ...notice });
12
17
  }
@@ -35,6 +35,7 @@ export declare const PhiCmsWidgetType: {
35
35
  readonly Tree: string;
36
36
  readonly AreaUpload: string;
37
37
  readonly SlotUpload: string;
38
+ readonly CdnUpload: string;
38
39
  readonly ImageInspector: string;
39
40
  readonly AssetFocalRect: string;
40
41
  readonly MediaPicker: string;
@@ -15,6 +15,7 @@ const PHI_CMS_WIDGET_PLUGIN_KEYS = {
15
15
  "auth": `${PHI_CMS_WIDGET_PLUGIN_KEY_BASE}/auth/widgets`,
16
16
  "avatar": `${PHI_CMS_WIDGET_PLUGIN_KEY_BASE}/avatar/widgets`,
17
17
  "builder": `${PHI_CMS_WIDGET_PLUGIN_KEY_BASE}/builder/widgets`,
18
+ "cdn": `${PHI_CMS_WIDGET_PLUGIN_KEY_BASE}/cdn/widgets`,
18
19
  "core": `${PHI_CMS_WIDGET_PLUGIN_KEY_BASE}/core/widgets`,
19
20
  "news": `${PHI_CMS_WIDGET_PLUGIN_KEY_BASE}/news/widgets`,
20
21
  "observability": `${PHI_CMS_WIDGET_PLUGIN_KEY_BASE}/observability/widgets`,
@@ -63,6 +64,7 @@ const PHI_CMS_WIDGET_MODULE_BY_TYPE_KEY = {
63
64
  "builder-widget-viewport-inspector": "builder",
64
65
  "button": "core",
65
66
  "card": "core",
67
+ "cdn-upload": "cdn",
66
68
  "cascader": "core",
67
69
  "checkbox": "core",
68
70
  "checkbox-group": "core",
@@ -166,6 +168,7 @@ export const PhiCmsWidgetType = {
166
168
  Tree: defineWidgetType(resolvePhiCmsWidgetPluginKey("tree"), "tree"),
167
169
  AreaUpload: defineWidgetType(resolvePhiCmsWidgetPluginKey("area-upload"), "area-upload"),
168
170
  SlotUpload: defineWidgetType(resolvePhiCmsWidgetPluginKey("slot-upload"), "slot-upload"),
171
+ CdnUpload: defineWidgetType(resolvePhiCmsWidgetPluginKey("cdn-upload"), "cdn-upload"),
169
172
  ImageInspector: defineWidgetType(resolvePhiCmsWidgetPluginKey("image-inspector"), "image-inspector"),
170
173
  AssetFocalRect: defineWidgetType(resolvePhiCmsWidgetPluginKey("asset-focal-rect"), "asset-focal-rect"),
171
174
  MediaPicker: defineWidgetType(resolvePhiCmsWidgetPluginKey("media-picker"), "media-picker"),
@@ -9,15 +9,24 @@
9
9
  */
10
10
  export declare const PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS: {
11
11
  readonly table: `${string}/${string}`;
12
+ /**
13
+ * The member's addresses as tiles (a Collection drawn by `PHI_SITE_ADDRESS_ITEM_RENDERER_KEY`), read-only,
14
+ * from the same read: the member arrives as the binding param `userId` (`PHI_CUSTOMER_FILE_MEMBER_PARAM`),
15
+ * which the Conversations Controller forwards from the person Table's choice.
16
+ */
17
+ readonly addresses: `${string}/${string}`;
12
18
  };
13
- /** The Provider's three resources, each one answer of the same route read for one member. */
19
+ /**
20
+ * The resources, each one answer of the same route read for one member: the Table Provider's person and
21
+ * threads, and the addresses Collection's addresses.
22
+ */
14
23
  export declare const PHI_CUSTOMER_FILE_RESOURCE_KEYS: {
15
24
  readonly person: "person";
16
25
  readonly addresses: "addresses";
17
26
  readonly threads: "threads";
18
27
  };
19
- /** The binding param a customer file Page writes the file's own subject into, already in the reader's language. */
20
- export declare const PHI_CUSTOMER_FILE_SUBJECT_PARAM = "fileSubject";
28
+ /** The binding param the addresses Collection reads its member from: `{ params: { userId } }`. */
29
+ export declare const PHI_CUSTOMER_FILE_MEMBER_PARAM = "userId";
21
30
  /**
22
31
  * The binding param a customer file Page writes its sentence for the reader's own file into, already in the
23
32
  * reader's language: Core refuses that file (`403`), and each Table says this where its rows would be.
@@ -10,15 +10,24 @@ import { createPhiSharedRuntimeDataProviderKey } from "./runtime-data-provider-k
10
10
  */
11
11
  export const PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS = {
12
12
  table: createPhiSharedRuntimeDataProviderKey("tables", "threads-customer-file"),
13
+ /**
14
+ * The member's addresses as tiles (a Collection drawn by `PHI_SITE_ADDRESS_ITEM_RENDERER_KEY`), read-only,
15
+ * from the same read: the member arrives as the binding param `userId` (`PHI_CUSTOMER_FILE_MEMBER_PARAM`),
16
+ * which the Conversations Controller forwards from the person Table's choice.
17
+ */
18
+ addresses: createPhiSharedRuntimeDataProviderKey("collections", "threads-customer-file-addresses"),
13
19
  };
14
- /** The Provider's three resources, each one answer of the same route read for one member. */
20
+ /**
21
+ * The resources, each one answer of the same route read for one member: the Table Provider's person and
22
+ * threads, and the addresses Collection's addresses.
23
+ */
15
24
  export const PHI_CUSTOMER_FILE_RESOURCE_KEYS = {
16
25
  person: "person",
17
26
  addresses: "addresses",
18
27
  threads: "threads",
19
28
  };
20
- /** The binding param a customer file Page writes the file's own subject into, already in the reader's language. */
21
- export const PHI_CUSTOMER_FILE_SUBJECT_PARAM = "fileSubject";
29
+ /** The binding param the addresses Collection reads its member from: `{ params: { userId } }`. */
30
+ export const PHI_CUSTOMER_FILE_MEMBER_PARAM = "userId";
22
31
  /**
23
32
  * The binding param a customer file Page writes its sentence for the reader's own file into, already in the
24
33
  * reader's language: Core refuses that file (`403`), and each Table says this where its rows would be.
@@ -14,10 +14,13 @@ const PHI_RUNTIME_MODULE_OWNERSHIP = {
14
14
  "background-patterns/grid": ["core", "grid"],
15
15
  "background-patterns/stripes": ["core", "stripes"],
16
16
  "calendars/gregory": ["core", "gregory"],
17
+ "collections/app-addresses": ["app", "addresses"],
17
18
  "collections/dashboard-cards": ["dashboard", "cards"],
18
19
  "collections/media": ["asset", "media"],
20
+ "collections/threads-customer-file-addresses": ["threads", "customer-file-addresses"],
19
21
  "renderers/dashboard-card": ["dashboard", "card"],
20
22
  "renderers/media-asset": ["asset", "media-asset"],
23
+ "renderers/site-address": ["core", "site-address"],
21
24
  "controller/accounting-base": ["accounting", "base"],
22
25
  "controller/admin": ["admin", "default"],
23
26
  "controller/app-base": ["app", "base"],
@@ -75,7 +78,6 @@ const PHI_RUNTIME_MODULE_OWNERSHIP = {
75
78
  "form-handler/app-address-create": ["app", "address-create"],
76
79
  "form-handler/app-address-edit": ["app", "address-edit"],
77
80
  "form-handler/app-profile-locale": ["app", "profile-locale"],
78
- "form-handler/app-profile-newsletter": ["app", "profile-newsletter"],
79
81
  "form-handler/app-profile-theme": ["app", "profile-theme"],
80
82
  "form-handler/asset-folder-create": ["asset", "folder-create"],
81
83
  "form-handler/asset-media-settings": ["asset", "media-settings"],
@@ -132,7 +134,6 @@ const PHI_RUNTIME_MODULE_OWNERSHIP = {
132
134
  "forms/app/address-create": ["app", "address-create"],
133
135
  "forms/app/address-edit": ["app", "address-edit"],
134
136
  "forms/app/profile-locale": ["app", "profile-locale"],
135
- "forms/app/profile-newsletter": ["app", "profile-newsletter"],
136
137
  "forms/app/profile-theme": ["app", "profile-theme"],
137
138
  "forms/asset/folder-create": ["asset", "folder-create"],
138
139
  "forms/asset/media-settings": ["asset", "media-settings"],
@@ -213,7 +214,6 @@ const PHI_RUNTIME_MODULE_OWNERSHIP = {
213
214
  "options/translation-contexts": ["localization", "translation-contexts"],
214
215
  "tables/auth-installations": ["auth", "installations"],
215
216
  "tables/threads-customer-file": ["threads", "customer-file"],
216
- "tables/app-addresses": ["app", "addresses"],
217
217
  "signals/auth-workflow-state": ["auth", "workflow-state"],
218
218
  "signals/background-config": ["core", "background-config"],
219
219
  "signals/border-config": ["core", "border-config"],
@@ -224,6 +224,7 @@ const PHI_RUNTIME_MODULE_OWNERSHIP = {
224
224
  "signals/builder-navigation": ["builder", "navigation"],
225
225
  "signals/builder-node-selection": ["builder", "node-selection"],
226
226
  "signals/collection-action": ["core", "collection-action"],
227
+ "signals/site-address-selection": ["core", "site-address-selection"],
227
228
  "signals/control-options": ["core", "control-options"],
228
229
  "signals/drag-drop": ["core", "drag-drop"],
229
230
  "signals/form-error": ["core", "form-error"],
@@ -274,6 +275,7 @@ const PHI_RUNTIME_MODULE_OWNERSHIP = {
274
275
  "tables/builder-navigation": ["builder", "navigation"],
275
276
  "tables/runtime-modules": ["builder", "runtime-modules"],
276
277
  "tables/builder-signal-routes": ["builder", "signal-routes"],
278
+ "tables/cdn": ["cdn", "cdn"],
277
279
  "tables/content": ["core", "content"],
278
280
  "tables/content-entries": ["core", "content-entries"],
279
281
  "tables/content-entry-categories": ["core", "content-entry-categories"],
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The address tiles: a Collection's items as the addresses of a Site's book (`PhisSiteAddress`), drawn by
3
+ * Core's renderer (COLLECTIONS.md, "The address renderer"). A resource whose items are addresses in the
4
+ * shape `toPhiSiteAddressRow` gives them (`helpers/site-address-row.ts`) names this key as its
5
+ * `itemRendererKey`, and draws no tiles of its own: the account's own addresses on the App profile and
6
+ * staff's customer file both do. The Foundation names it, so a Module cites it without importing Core's
7
+ * Widget.
8
+ */
9
+ export declare const PHI_SITE_ADDRESS_ITEM_RENDERER_KEY: `${string}/${string}`;
@@ -0,0 +1,10 @@
1
+ import { createPhiSharedRuntimeItemRendererKey } from "./runtime-data-provider-key";
2
+ /**
3
+ * The address tiles: a Collection's items as the addresses of a Site's book (`PhisSiteAddress`), drawn by
4
+ * Core's renderer (COLLECTIONS.md, "The address renderer"). A resource whose items are addresses in the
5
+ * shape `toPhiSiteAddressRow` gives them (`helpers/site-address-row.ts`) names this key as its
6
+ * `itemRendererKey`, and draws no tiles of its own: the account's own addresses on the App profile and
7
+ * staff's customer file both do. The Foundation names it, so a Module cites it without importing Core's
8
+ * Widget.
9
+ */
10
+ export const PHI_SITE_ADDRESS_ITEM_RENDERER_KEY = createPhiSharedRuntimeItemRendererKey("site-address");
@@ -0,0 +1,14 @@
1
+ /**
2
+ * How many skeleton rows a loading Table draws (TABLES.md, "Loading").
3
+ *
4
+ * Few on purpose: most Tables hold a handful of rows, and a Table that loads as a page of ten and then
5
+ * shows two shrinks under the reader's eyes and takes the Page below it up with it. Three rows grow into
6
+ * what arrives. A Table that is known to be long -- a paged listing that fills its page -- may state its
7
+ * own count in `presentation.loadingRows`, up to the most a Table may ask for.
8
+ *
9
+ * Imports nothing, so the Table Control and the Widget's config reader share it without the weight of
10
+ * either.
11
+ */
12
+ export declare const PHI_TABLE_LOADING_ROWS = 3;
13
+ /** The most skeleton rows a Table may ask for: a page of 25, the usual page. */
14
+ export declare const PHI_TABLE_LOADING_ROWS_MAX = 25;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * How many skeleton rows a loading Table draws (TABLES.md, "Loading").
3
+ *
4
+ * Few on purpose: most Tables hold a handful of rows, and a Table that loads as a page of ten and then
5
+ * shows two shrinks under the reader's eyes and takes the Page below it up with it. Three rows grow into
6
+ * what arrives. A Table that is known to be long -- a paged listing that fills its page -- may state its
7
+ * own count in `presentation.loadingRows`, up to the most a Table may ask for.
8
+ *
9
+ * Imports nothing, so the Table Control and the Widget's config reader share it without the weight of
10
+ * either.
11
+ */
12
+ export const PHI_TABLE_LOADING_ROWS = 3;
13
+ /** The most skeleton rows a Table may ask for: a page of 25, the usual page. */
14
+ export const PHI_TABLE_LOADING_ROWS_MAX = 25;
package/constants.d.ts CHANGED
@@ -5,12 +5,13 @@ export { buildPhiCmsWidgetNamespacedTypeKey, splitPhiCmsWidgetNamespacedTypeKey,
5
5
  export * from "./constants/cms-plugin-categories";
6
6
  export * from "./constants/runtime-module-categories";
7
7
  export { PHI_THREAD_LIBRARY_DATA_PROVIDER_KEYS } from "./constants/thread-library-provider-keys";
8
- export { PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS, PHI_CUSTOMER_FILE_RESOURCE_KEYS, PHI_CUSTOMER_FILE_SUBJECT_PARAM, } from "./constants/customer-file";
8
+ export { PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS, PHI_CUSTOMER_FILE_RESOURCE_KEYS, } from "./constants/customer-file";
9
9
  export { PHIS_AREA_HEADER, PHIS_FORM_RELAY_HEADER, PHIS_REQUEST_PATH_HEADER, PHIS_REQUEST_SEARCH_HEADER, PHIS_SITE_KEY_HEADER, PHIS_TOKEN_HEADER, } from "./constants/http-headers";
10
10
  export { buildPhiFontSubsetDeliveryUrl, buildPhiImageAssetVariantDeliveryUrl, buildPhiMediaAssetContentDeliveryUrl, isPhiMediaAssetOriginalOptimizable, isPhiMediaAssetPublic, isPhiMediaSvgContentType, normalizePhiImageAssetVariantKey, normalizePhiMediaKind, PhiImageAssetVariantKey, PhiImageAssetVariantKeyName, type PhiImageAssetVariantSpec, type PhiMediaAssetFlag, PhiMediaAssetFlags, PhiMediaDeliveryPolicy, PhiMediaFolderFlags, PhiMediaKind, PhiMediaLifecycleStatus, resolvePhiImageAssetVariantKeyName, resolvePhiImageAssetVariantSpec, resolvePhiMediaKindFromContentType, } from "./constants/media";
11
11
  export * from "./constants/support";
12
12
  export * from "./constants/threads";
13
13
  export * from "./constants/user-state";
14
14
  export * from "./constants/media-library-provider-keys";
15
+ export * from "./constants/site-address";
15
16
  export * from "./constants/module-identity";
16
17
  export { PHI_CORE_RUNTIME_DATA_PROVIDER_KEYS } from "./constants/core-data-provider-keys";
package/constants.js CHANGED
@@ -7,12 +7,14 @@ export * from "./constants/runtime-module-categories";
7
7
  // The conversations a viewer is in, for every Module that lists its own kind of them (`fixedFilters`).
8
8
  export { PHI_THREAD_LIBRARY_DATA_PROVIDER_KEYS } from "./constants/thread-library-provider-keys";
9
9
  // Staff's customer file on one member, for a Module's own file Page over the same Core route (THREADS.md, 10).
10
- export { PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS, PHI_CUSTOMER_FILE_RESOURCE_KEYS, PHI_CUSTOMER_FILE_SUBJECT_PARAM, } from "./constants/customer-file";
10
+ export { PHI_CUSTOMER_FILE_DATA_PROVIDER_KEYS, PHI_CUSTOMER_FILE_RESOURCE_KEYS, } from "./constants/customer-file";
11
11
  export { PHIS_AREA_HEADER, PHIS_FORM_RELAY_HEADER, PHIS_REQUEST_PATH_HEADER, PHIS_REQUEST_SEARCH_HEADER, PHIS_SITE_KEY_HEADER, PHIS_TOKEN_HEADER, } from "./constants/http-headers";
12
12
  export { buildPhiFontSubsetDeliveryUrl, buildPhiImageAssetVariantDeliveryUrl, buildPhiMediaAssetContentDeliveryUrl, isPhiMediaAssetOriginalOptimizable, isPhiMediaAssetPublic, isPhiMediaSvgContentType, normalizePhiImageAssetVariantKey, normalizePhiMediaKind, PhiImageAssetVariantKey, PhiImageAssetVariantKeyName, PhiMediaAssetFlags, PhiMediaDeliveryPolicy, PhiMediaFolderFlags, PhiMediaKind, PhiMediaLifecycleStatus, resolvePhiImageAssetVariantKeyName, resolvePhiImageAssetVariantSpec, resolvePhiMediaKindFromContentType, } from "./constants/media";
13
13
  export * from "./constants/support";
14
14
  export * from "./constants/threads";
15
15
  export * from "./constants/user-state";
16
16
  export * from "./constants/media-library-provider-keys";
17
+ // The address tiles, for any Module whose Collection's items are addresses of a Site's book (COLLECTIONS.md).
18
+ export * from "./constants/site-address";
17
19
  export * from "./constants/module-identity";
18
20
  export { PHI_CORE_RUNTIME_DATA_PROVIDER_KEYS } from "./constants/core-data-provider-keys";
@@ -3,7 +3,16 @@ import { isPhiCmsAreaKey } from "../constants/cms-areas";
3
3
  import { isPhiRecord } from "../helpers/is-record";
4
4
  import { buildPhiRuntimeModuleWidgetType } from "../plugins/runtime-modules/contracts";
5
5
  import { isPhiConfigError } from "../components/widgets/config/strict-config-reader";
6
+ import { checkPhiWidgetBinding, checkPhiWidgetConfigIcons, } from "../helpers/widget-binding-check";
6
7
  import { jsonResponse } from "./route-handler-helpers";
8
+ function buildDataProvidersByKey(catalog) {
9
+ const providers = new Map();
10
+ for (const entry of catalog.values()) {
11
+ for (const provider of entry.definition.dataProviders ?? [])
12
+ providers.set(provider.key, provider);
13
+ }
14
+ return providers;
15
+ }
7
16
  function buildWidgetDefinitionsByType(catalog) {
8
17
  const definitions = new Map();
9
18
  for (const entry of catalog.values()) {
@@ -13,7 +22,7 @@ function buildWidgetDefinitionsByType(catalog) {
13
22
  }
14
23
  return definitions;
15
24
  }
16
- function findConfigIssue(body, definitions) {
25
+ function findConfigIssue(body, definitions, providers) {
17
26
  const pending = [body];
18
27
  while (pending.length > 0) {
19
28
  const value = pending.pop();
@@ -28,8 +37,9 @@ function findConfigIssue(body, definitions) {
28
37
  if (typeof widgetType === "string" && isPhiRecord(config)) {
29
38
  const definition = definitions.get(widgetType);
30
39
  if (definition) {
40
+ let parsed;
31
41
  try {
32
- definition.parseConfig(config);
42
+ parsed = definition.parseConfig(config);
33
43
  }
34
44
  catch (error) {
35
45
  /*
@@ -44,6 +54,12 @@ function findConfigIssue(body, definitions) {
44
54
  message: error instanceof Error ? error.message : String(error),
45
55
  };
46
56
  }
57
+ const [icon] = checkPhiWidgetConfigIcons(definition.fields, config);
58
+ const [binding] = checkPhiWidgetBinding(widgetType, isPhiRecord(parsed) ? parsed : config, providers);
59
+ const message = binding ?? icon;
60
+ if (message) {
61
+ return { widgetType, nodeId: value.id ?? null, path: null, message };
62
+ }
47
63
  }
48
64
  }
49
65
  pending.push(...Object.values(value));
@@ -65,7 +81,7 @@ export async function validatePhiCmsStructureWrite(request, loadAreaBridge) {
65
81
  const bridge = await loadAreaBridge(area);
66
82
  if (!bridge)
67
83
  return null;
68
- const issue = findConfigIssue(body, buildWidgetDefinitionsByType(bridge.runtimeModuleCatalog));
84
+ const issue = findConfigIssue(body, buildWidgetDefinitionsByType(bridge.runtimeModuleCatalog), buildDataProvidersByKey(bridge.runtimeModuleCatalog));
69
85
  if (!issue)
70
86
  return null;
71
87
  return jsonResponse({
@@ -15,4 +15,16 @@ export type BuildPhiSiteProxyHandlersOptions = {
15
15
  */
16
16
  loadAreaBridge: PhiSiteAreaBridgeLoader;
17
17
  };
18
+ /**
19
+ * A body on its way to storage through this door, bounded by the browser that sends it and not by the
20
+ * proxy's clock -- on a slow link it takes longer than any timeout that suits a read:
21
+ *
22
+ * - one part of a CDN upload, `PUT /api/site/admin/cdn/uploads/<token>/parts/<n>`, up to 16 MiB that Core
23
+ * streams on to the bucket;
24
+ * - a Media body sent whole (`proxy-stream`, a Space on a Local Storage Profile),
25
+ * `PUT /api/site/media/uploads/<token>`, up to the Site's largest object.
26
+ *
27
+ * Exactly these shapes and this verb: init, report and finalize keep the timeout.
28
+ */
29
+ export declare function isPhiUnboundedSiteRequest(request: Pick<Request, "method">, path: readonly string[] | undefined): boolean;
18
30
  export declare function buildPhiSiteProxyHandlers(options: BuildPhiSiteProxyHandlersOptions): PhiNextProxyHandlers;
@@ -110,6 +110,25 @@ function validatingCmsStructureWrite(handler, loadAreaBridge) {
110
110
  return handler(request, context);
111
111
  };
112
112
  }
113
+ /**
114
+ * A body on its way to storage through this door, bounded by the browser that sends it and not by the
115
+ * proxy's clock -- on a slow link it takes longer than any timeout that suits a read:
116
+ *
117
+ * - one part of a CDN upload, `PUT /api/site/admin/cdn/uploads/<token>/parts/<n>`, up to 16 MiB that Core
118
+ * streams on to the bucket;
119
+ * - a Media body sent whole (`proxy-stream`, a Space on a Local Storage Profile),
120
+ * `PUT /api/site/media/uploads/<token>`, up to the Site's largest object.
121
+ *
122
+ * Exactly these shapes and this verb: init, report and finalize keep the timeout.
123
+ */
124
+ export function isPhiUnboundedSiteRequest(request, path) {
125
+ if (request.method !== "PUT" || !path)
126
+ return false;
127
+ const cdnPart = path.length === 6 &&
128
+ path[0] === "admin" && path[1] === "cdn" && path[2] === "uploads" && path[4] === "parts";
129
+ const mediaBody = path.length === 3 && path[0] === "media" && path[1] === "uploads" && path[2] !== "init";
130
+ return cdnPart || mediaBody;
131
+ }
113
132
  export function buildPhiSiteProxyHandlers(options) {
114
133
  const { upstreamBaseUrl, timeoutMs, buildHeaders, logLabel = "[phis-ui][/api/site proxy]", missingBaseUrlMessage = "Missing apiBaseUrl for /api/site proxy.", } = options;
115
134
  const handlers = PhiNextProxy({
@@ -120,6 +139,7 @@ export function buildPhiSiteProxyHandlers(options) {
120
139
  missingBaseUrlMessage,
121
140
  buildHeaders,
122
141
  buildFetchInit: () => ({ cache: "no-store" }),
142
+ unboundedRequest: isPhiUnboundedSiteRequest,
123
143
  });
124
144
  // Built once per path and kept, so a Site that answers Forms all day pays the import a single time.
125
145
  const built = new Map();
@@ -0,0 +1,17 @@
1
+ import { type PhiSignalValueSchema } from "../types/signals";
2
+ /**
3
+ * An action announced on the action channel, by whichever of the two announcers said it: a Table's
4
+ * `table-action` (`{ actionKey, rowIdentity }`) or a Collection View's `collection-action`
5
+ * (`{ actionKey, itemKey }`). Both name the action in the message, so every listener decides by its own
6
+ * `openActionKey` whether it was meant, and the record either names is `recordKey` -- a row's identity, an
7
+ * item's key, `null` for a toolbar action.
8
+ *
9
+ * `undefined` for a route of any other schema: not an announcement at all, and the caller treats it as it
10
+ * always did. `null` for an announcement that cannot be read.
11
+ */
12
+ export declare function readPhiAnnouncedAction(valueSchema: PhiSignalValueSchema | null | undefined, value: unknown): {
13
+ actionKey: string;
14
+ recordKey: string | number | null;
15
+ } | null | undefined;
16
+ /** Whether a route carries an announced action, a Table's or a Collection View's. */
17
+ export declare function isPhiAnnouncedActionSchema(valueSchema: PhiSignalValueSchema | null | undefined): boolean;
@@ -0,0 +1,29 @@
1
+ import { PHI_SIGNAL_VALUE_SCHEMAS } from "../types/signals";
2
+ import { readPhiTableActionSignalValue } from "../types/table-signal-values";
3
+ import { readPhiCollectionActionSignalValue } from "../types/collection-signal-values";
4
+ /**
5
+ * An action announced on the action channel, by whichever of the two announcers said it: a Table's
6
+ * `table-action` (`{ actionKey, rowIdentity }`) or a Collection View's `collection-action`
7
+ * (`{ actionKey, itemKey }`). Both name the action in the message, so every listener decides by its own
8
+ * `openActionKey` whether it was meant, and the record either names is `recordKey` -- a row's identity, an
9
+ * item's key, `null` for a toolbar action.
10
+ *
11
+ * `undefined` for a route of any other schema: not an announcement at all, and the caller treats it as it
12
+ * always did. `null` for an announcement that cannot be read.
13
+ */
14
+ export function readPhiAnnouncedAction(valueSchema, value) {
15
+ if (valueSchema === PHI_SIGNAL_VALUE_SCHEMAS.tableAction) {
16
+ const action = readPhiTableActionSignalValue(value);
17
+ return action ? { actionKey: action.actionKey, recordKey: action.rowIdentity ?? null } : null;
18
+ }
19
+ if (valueSchema === PHI_SIGNAL_VALUE_SCHEMAS.collectionAction) {
20
+ const action = readPhiCollectionActionSignalValue(value);
21
+ return action ? { actionKey: action.actionKey, recordKey: action.itemKey ?? null } : null;
22
+ }
23
+ return undefined;
24
+ }
25
+ /** Whether a route carries an announced action, a Table's or a Collection View's. */
26
+ export function isPhiAnnouncedActionSchema(valueSchema) {
27
+ return valueSchema === PHI_SIGNAL_VALUE_SCHEMAS.tableAction ||
28
+ valueSchema === PHI_SIGNAL_VALUE_SCHEMAS.collectionAction;
29
+ }
@@ -3,14 +3,6 @@ import type { PhiCmsAreaKey } from "../constants/cms-areas";
3
3
  import { type PhiAreaMeta } from "./cms-area-config";
4
4
  import type { PhiSignetHead } from "./phi-signet-head";
5
5
  import { type PhiPublicPageAddress } from "./phi-seo";
6
- /**
7
- * What the head says of a Site that has said nothing: neither the Page's description nor the Theme's
8
- * slogan. Worded as the placeholder it is, so a link shared before anybody replaced it tells the operator
9
- * where to.
10
- */
11
- export declare const PHI_DEFAULT_SITE_DESCRIPTION = "Default description of the phis starter. Set your own in the Page meta or as the Theme's slogan.";
12
- /** The Site's description: the Theme's slogan, else the starter's placeholder. */
13
- export declare function resolvePhiSiteDescription(slogan: string | null | undefined): string;
14
6
  /** The picture of a link preview, resolved: its absolute address, its exact size and what it shows. */
15
7
  export type PhiLinkPreviewImage = {
16
8
  url: string;
@@ -1,16 +1,7 @@
1
1
  import { PHI_AREA_META_PUBLIC_DEFAULTS, PHI_AREA_TITLE_TEMPLATE_PLACEHOLDER, } from "./cms-area-config";
2
2
  import { buildPhiPublicPageAlternates } from "./phi-seo";
3
3
  import { readPhiXAccount } from "../types/link-preview";
4
- /**
5
- * What the head says of a Site that has said nothing: neither the Page's description nor the Theme's
6
- * slogan. Worded as the placeholder it is, so a link shared before anybody replaced it tells the operator
7
- * where to.
8
- */
9
- export const PHI_DEFAULT_SITE_DESCRIPTION = "Default description of the phis starter. Set your own in the Page meta or as the Theme's slogan.";
10
- /** The Site's description: the Theme's slogan, else the starter's placeholder. */
11
- export function resolvePhiSiteDescription(slogan) {
12
- return slogan?.trim() || PHI_DEFAULT_SITE_DESCRIPTION;
13
- }
4
+ import { resolvePhiSiteDescription } from "./phi-site-description";
14
5
  /** A Site locale as Open Graph spells it: `pt-BR` is `pt_BR`. */
15
6
  function toPhiOpenGraphLocale(locale) {
16
7
  return locale.replaceAll("-", "_");
@@ -0,0 +1,11 @@
1
+ /**
2
+ * What the head says of a Site that has said nothing: neither the Page's description nor the Theme's
3
+ * slogan. Worded as the placeholder it is, so a link shared before anybody replaced it tells the operator
4
+ * where to.
5
+ *
6
+ * A file of its own, apart from `phi-metadata.ts`, because the Theme workspace's link card shows the same
7
+ * words in the browser and the head builder would bring the whole route metadata along with them.
8
+ */
9
+ export declare const PHI_DEFAULT_SITE_DESCRIPTION = "Default description of the phis starter. Set your own in the Page meta or as the Theme's slogan.";
10
+ /** The Site's description: the Theme's slogan, else the starter's placeholder. */
11
+ export declare function resolvePhiSiteDescription(slogan: string | null | undefined): string;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * What the head says of a Site that has said nothing: neither the Page's description nor the Theme's
3
+ * slogan. Worded as the placeholder it is, so a link shared before anybody replaced it tells the operator
4
+ * where to.
5
+ *
6
+ * A file of its own, apart from `phi-metadata.ts`, because the Theme workspace's link card shows the same
7
+ * words in the browser and the head builder would bring the whole route metadata along with them.
8
+ */
9
+ export const PHI_DEFAULT_SITE_DESCRIPTION = "Default description of the phis starter. Set your own in the Page meta or as the Theme's slogan.";
10
+ /** The Site's description: the Theme's slogan, else the starter's placeholder. */
11
+ export function resolvePhiSiteDescription(slogan) {
12
+ return slogan?.trim() || PHI_DEFAULT_SITE_DESCRIPTION;
13
+ }
@@ -0,0 +1,14 @@
1
+ import type { PhiFormDescriptor } from "@phis/contracts/forms";
2
+ import type { PhiPresetTreeContractFinding } from "./preset-tree-contract-check";
3
+ /**
4
+ * Every Form a package ships, held to the rules its fields' Controls read them by
5
+ * (`checkPhiFormDescriptorFields`: a money field's currency and `currencyField`, a flags field's bits),
6
+ * as findings whose `node` is the Form id (THIRD_PARTY_MODULES.md, "Checking a Page preset").
7
+ *
8
+ * Verify-time only, from `@phis/ui/module/page-check`: a package runs it in its own tests over its Form
9
+ * definitions (`definePhiRuntimeModuleForm`), as phis-ui runs it over its own, and a Site never loads it.
10
+ */
11
+ export declare function checkPhiPresetForms(forms: Iterable<{
12
+ formId: string;
13
+ descriptor: Pick<PhiFormDescriptor, "fields">;
14
+ }>): PhiPresetTreeContractFinding[];