@phis/ui 0.7.7 → 0.8.0

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 (344) hide show
  1. package/components/controls/phi-address-control.d.ts +23 -0
  2. package/components/controls/phi-address-control.js +43 -0
  3. package/components/controls/phi-color-control.d.ts +3 -1
  4. package/components/controls/phi-color-control.js +2 -2
  5. package/components/controls/phi-country-select-control.d.ts +22 -0
  6. package/components/controls/phi-country-select-control.js +16 -0
  7. package/components/controls/phi-dialog-control.d.ts +1 -1
  8. package/components/controls/phi-drawer-control-adapter.d.ts +1 -1
  9. package/components/controls/phi-drawer-control-adapter.js +5 -3
  10. package/components/controls/phi-drawer-control.d.ts +7 -5
  11. package/components/controls/phi-float-button-control.d.ts +8 -1
  12. package/components/controls/phi-float-button-control.js +19 -3
  13. package/components/controls/phi-form-control.js +64 -9
  14. package/components/controls/phi-modal-control-adapter.d.ts +1 -1
  15. package/components/controls/phi-modal-control-adapter.js +14 -37
  16. package/components/controls/phi-modal-control.d.ts +5 -5
  17. package/components/controls/phi-options-provider.d.ts +1 -0
  18. package/components/controls/phi-options-provider.js +1 -0
  19. package/components/controls/phi-overlay-control-contract.d.ts +52 -17
  20. package/components/controls/phi-overlay-control-contract.js +55 -30
  21. package/components/controls/phi-reveal-once-dialog-control.d.ts +21 -0
  22. package/components/controls/phi-reveal-once-dialog-control.js +52 -0
  23. package/components/controls/phi-reveal-once-dialog-labels.d.ts +10 -0
  24. package/components/controls/phi-reveal-once-dialog-labels.js +5 -0
  25. package/components/forms/extended-form-field-controls.d.ts +1 -1
  26. package/components/forms/extended-form-field-controls.js +23 -7
  27. package/components/forms/flags-field.d.ts +22 -0
  28. package/components/forms/flags-field.js +58 -0
  29. package/components/forms/form-option-flags.d.ts +20 -0
  30. package/components/forms/form-option-flags.js +38 -0
  31. package/components/forms/form-provider-contract.d.ts +28 -0
  32. package/components/forms/form-provider-contract.js +45 -2
  33. package/components/forms/form-provider-registry.d.ts +11 -1
  34. package/components/forms/money-field-currency-key.d.ts +6 -0
  35. package/components/forms/money-field-currency-key.js +14 -0
  36. package/components/forms/money-field.d.ts +26 -3
  37. package/components/forms/money-field.js +54 -4
  38. package/components/forms/shared-form-provider-registry.js +13 -0
  39. package/components/forms/structured-field-labels.d.ts +24 -0
  40. package/components/forms/structured-field-labels.js +43 -0
  41. package/components/forms/structured-form-field-controls.d.ts +12 -0
  42. package/components/forms/structured-form-field-controls.js +65 -0
  43. package/components/overlays/phi-overlay-container-client.js +2 -2
  44. package/components/regions/phi-cms-region-shell.js +2 -2
  45. package/components/regions/presets/content-entry-editor-page-tree.js +12 -3
  46. package/components/regions/presets/navigation-redirect.d.ts +4 -1
  47. package/components/regions/presets/navigation-redirect.js +6 -3
  48. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +6 -2
  49. package/components/regions/presets/phi-settings-page-shell-tree.js +1 -1
  50. package/components/root/phi-root-theme-resolver.js +3 -0
  51. package/components/shell/phi-antd-icon.d.ts +1 -8
  52. package/components/shell/phi-antd-icon.js +1 -227
  53. package/components/shell/phi-icon-names.d.ts +19 -0
  54. package/components/shell/phi-icon-names.js +264 -0
  55. package/components/shell/phi-icon.d.ts +2 -11
  56. package/components/shell/phi-icon.js +4 -32
  57. package/components/widgets/client/shared/phi-command-buttons.d.ts +13 -2
  58. package/components/widgets/client/shared/phi-command-buttons.js +10 -4
  59. package/components/widgets/client/shared/phi-rendered-value.js +32 -6
  60. package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
  61. package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
  62. package/components/widgets/config/background.d.ts +3 -2
  63. package/components/widgets/config/choice-shared.d.ts +10 -1
  64. package/components/widgets/config/choice-shared.js +8 -2
  65. package/components/widgets/label-sets/admin-locales.js +1 -1
  66. package/components/widgets/label-sets/admin-users.d.ts +2 -5
  67. package/components/widgets/label-sets/admin-users.js +4 -10
  68. package/components/widgets/label-sets/effects.js +2 -4
  69. package/components/widgets/label-sets/profile.d.ts +13 -0
  70. package/components/widgets/label-sets/profile.js +28 -0
  71. package/components/widgets/label-sets/search-results.js +2 -4
  72. package/components/widgets/label-sets/table.js +9 -0
  73. package/components/widgets/label-types/effects.d.ts +3 -2
  74. package/components/widgets/label-types/effects.js +1 -2
  75. package/components/widgets/label-types/search-results.d.ts +2 -2
  76. package/components/widgets/label-types/search-results.js +1 -2
  77. package/components/widgets/label-types/table.d.ts +3 -0
  78. package/components/widgets/label-types/table.js +2 -0
  79. package/components/widgets/server/builder-chrome.d.ts +4 -1
  80. package/components/widgets/server/builder-chrome.js +2 -2
  81. package/components/widgets/shared/markdown-body-client.d.ts +26 -0
  82. package/components/widgets/shared/markdown-body-client.js +31 -1
  83. package/components/widgets/shared/markdown-render.d.ts +10 -2
  84. package/components/widgets/shared/markdown-render.js +35 -13
  85. package/constants/countries.d.ts +9 -0
  86. package/constants/countries.js +28 -0
  87. package/constants/customer-file.d.ts +25 -0
  88. package/constants/customer-file.js +26 -0
  89. package/constants/record-field-kinds.d.ts +15 -0
  90. package/constants/record-field-kinds.js +13 -0
  91. package/constants/runtime-module-ownership.js +12 -0
  92. package/constants/runtime-render-client-types.d.ts +5 -0
  93. package/constants/runtime-render-client-types.js +5 -0
  94. package/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
  95. package/constants.d.ts +1 -0
  96. package/constants.js +2 -0
  97. package/gateway/form-handler-request.d.ts +22 -0
  98. package/gateway/form-handler-request.js +40 -0
  99. package/gateway/label-set.d.ts +15 -2
  100. package/gateway/label-set.js +60 -22
  101. package/gateway/site-form-route.js +11 -2
  102. package/helpers/address-field.d.ts +43 -0
  103. package/helpers/address-field.js +68 -0
  104. package/helpers/cms-dialog.d.ts +5 -20
  105. package/helpers/cms-dialog.js +8 -13
  106. package/helpers/cms-page-catalog.d.ts +10 -0
  107. package/helpers/cms-page-catalog.js +19 -0
  108. package/helpers/cms-preset-nodes.d.ts +4 -4
  109. package/helpers/cms-preset-nodes.js +1 -1
  110. package/helpers/cms-region-keys.d.ts +1 -1
  111. package/helpers/country-names.d.ts +12 -0
  112. package/helpers/country-names.js +14 -0
  113. package/helpers/money-amount.d.ts +7 -0
  114. package/helpers/money-amount.js +15 -0
  115. package/helpers/phi-metadata.d.ts +33 -1
  116. package/helpers/phi-metadata.js +62 -1
  117. package/helpers/preset-table-check.d.ts +34 -0
  118. package/helpers/preset-table-check.js +124 -0
  119. package/helpers/preset-text-source-check.d.ts +4 -1
  120. package/helpers/preset-text-source-check.js +6 -1
  121. package/helpers/preset-tree-contract-check.d.ts +3 -2
  122. package/helpers/preset-tree-contract-check.js +30 -5
  123. package/helpers/public-route-claims.d.ts +9 -1
  124. package/helpers/public-route-claims.js +23 -3
  125. package/helpers/record-fields.d.ts +1 -5
  126. package/helpers/record-fields.js +15 -6
  127. package/helpers/route-address-check.d.ts +22 -2
  128. package/helpers/route-address-check.js +29 -8
  129. package/helpers/site-address-row.d.ts +23 -0
  130. package/helpers/site-address-row.js +36 -0
  131. package/helpers/surface-style.d.ts +8 -1
  132. package/helpers/surface-style.js +12 -2
  133. package/helpers/thread-inbox-row.d.ts +20 -0
  134. package/helpers/thread-inbox-row.js +26 -0
  135. package/helpers/translation-format.d.ts +26 -0
  136. package/helpers/translation-format.js +31 -0
  137. package/module-labels.d.ts +1 -1
  138. package/module-labels.js +1 -1
  139. package/module-page-check.d.ts +1 -0
  140. package/module-page-check.js +1 -0
  141. package/module-records.d.ts +2 -2
  142. package/module-records.js +1 -0
  143. package/next/area-route.js +34 -1
  144. package/next/root-route.js +4 -5
  145. package/package.json +2 -2
  146. package/plugins/runtime-modules/accounting/customer-file-access.d.ts +11 -0
  147. package/plugins/runtime-modules/accounting/customer-file-access.js +12 -0
  148. package/plugins/runtime-modules/accounting/data-providers.js +1 -1
  149. package/plugins/runtime-modules/accounting/ids.d.ts +11 -0
  150. package/plugins/runtime-modules/accounting/ids.js +23 -0
  151. package/plugins/runtime-modules/accounting/presets.js +32 -5
  152. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +66 -0
  153. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +122 -0
  154. package/plugins/runtime-modules/accounting/trees/accounting-products-label-set.js +2 -2
  155. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +26 -0
  156. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +381 -0
  157. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-products-page-tree.js +4 -0
  158. package/plugins/runtime-modules/app/client-data-providers.d.ts +7 -0
  159. package/plugins/runtime-modules/app/client-data-providers.js +9 -0
  160. package/plugins/runtime-modules/app/data-providers.d.ts +98 -0
  161. package/plugins/runtime-modules/app/data-providers.js +80 -0
  162. package/plugins/runtime-modules/app/definition.d.ts +131 -0
  163. package/plugins/runtime-modules/app/definition.js +2 -0
  164. package/plugins/runtime-modules/app/forms.d.ts +46 -1
  165. package/plugins/runtime-modules/app/forms.js +195 -1
  166. package/plugins/runtime-modules/app/ids.d.ts +7 -0
  167. package/plugins/runtime-modules/app/ids.js +8 -0
  168. package/plugins/runtime-modules/app/module.d.ts +131 -0
  169. package/plugins/runtime-modules/app/presets.js +3 -6
  170. package/plugins/runtime-modules/app/services/addresses-table.d.ts +135 -0
  171. package/plugins/runtime-modules/app/services/addresses-table.js +101 -0
  172. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +17 -0
  173. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +179 -0
  174. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +62 -0
  175. package/plugins/runtime-modules/app/trees/addresses-label-set.js +108 -0
  176. package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.d.ts +3 -6
  177. package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.js +4 -7
  178. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +27 -2
  179. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -0
  180. package/plugins/runtime-modules/app/trees/profile-label-set.js +3 -0
  181. package/plugins/runtime-modules/asset/presets.d.ts +4 -0
  182. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +4 -2
  183. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +4 -2
  184. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +2 -2
  185. package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +1 -1
  186. package/plugins/runtime-modules/auth/widgets/logout/client.js +2 -2
  187. package/plugins/runtime-modules/auth/widgets/security/client.d.ts +5 -1
  188. package/plugins/runtime-modules/auth/widgets/security/client.js +12 -10
  189. package/plugins/runtime-modules/avatar/overlay-tree.server.js +1 -1
  190. package/plugins/runtime-modules/blog/presets.d.ts +4 -0
  191. package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +2 -1
  192. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +3 -2
  193. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.d.ts +23 -0
  194. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.js +38 -0
  195. package/plugins/runtime-modules/builder/clients/mode-switch.d.ts +4 -1
  196. package/plugins/runtime-modules/builder/clients/mode-switch.js +2 -15
  197. package/plugins/runtime-modules/builder/clients/pages-workspace.js +2 -0
  198. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +2 -1
  199. package/plugins/runtime-modules/builder/controller/client.d.ts +5 -5
  200. package/plugins/runtime-modules/builder/controller/client.js +2 -1
  201. package/plugins/runtime-modules/builder/controller/definition.d.ts +4 -4
  202. package/plugins/runtime-modules/builder/controller/definition.js +7 -0
  203. package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +3 -1
  204. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +2 -1
  205. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +72 -18
  206. package/plugins/runtime-modules/builder/controller/server-definition.d.ts +4 -4
  207. package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +3 -1
  208. package/plugins/runtime-modules/builder/controller/workspace-controller.js +8 -10
  209. package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +10 -0
  210. package/plugins/runtime-modules/builder/developer-workspace-store.js +35 -1
  211. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
  212. package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +6 -0
  213. package/plugins/runtime-modules/builder/offered-page-catalog.js +35 -6
  214. package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
  215. package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
  216. package/plugins/runtime-modules/builder/persistence.d.ts +4 -1
  217. package/plugins/runtime-modules/builder/persistence.js +14 -3
  218. package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
  219. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +3 -1
  220. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +33 -6
  221. package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +6 -4
  222. package/plugins/runtime-modules/builder/widgets/chrome/config.js +11 -1
  223. package/plugins/runtime-modules/builder/widgets/inspector-header/authoring.d.ts +2 -2
  224. package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.d.ts +2 -2
  225. package/plugins/runtime-modules/builder/widgets/mode-switch/plugin.js +1 -1
  226. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +2 -2
  227. package/plugins/runtime-modules/client-manifests/app.js +3 -0
  228. package/plugins/runtime-modules/client-manifests/builder.js +10 -0
  229. package/plugins/runtime-modules/content-entry-routes.d.ts +4 -0
  230. package/plugins/runtime-modules/contracts.js +31 -1
  231. package/plugins/runtime-modules/core/definition.d.ts +28 -0
  232. package/plugins/runtime-modules/core/form-providers.d.ts +28 -0
  233. package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
  234. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
  235. package/plugins/runtime-modules/core/widgets/card/config.d.ts +0 -1
  236. package/plugins/runtime-modules/core/widgets/card/config.js +0 -1
  237. package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
  238. package/plugins/runtime-modules/core/widgets/command-toolbar/client.js +3 -0
  239. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +316 -1
  240. package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +4 -4
  241. package/plugins/runtime-modules/core/widgets/dimension/config.d.ts +1 -1
  242. package/plugins/runtime-modules/core/widgets/float-button/client.js +4 -1
  243. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +326 -3
  244. package/plugins/runtime-modules/core/widgets/float-button/config.js +5 -2
  245. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +1 -1
  246. package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
  247. package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
  248. package/plugins/runtime-modules/core/widgets/markdown/server.d.ts +6 -2
  249. package/plugins/runtime-modules/core/widgets/markdown/server.js +2 -2
  250. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.d.ts +12 -0
  251. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.js +68 -0
  252. package/plugins/runtime-modules/core/widgets/number-input/config.d.ts +1 -1
  253. package/plugins/runtime-modules/core/widgets/simple-text/config.js +1 -1
  254. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
  255. package/plugins/runtime-modules/core/widgets/spacer/client.js +3 -3
  256. package/plugins/runtime-modules/core/widgets/table/client.js +20 -5
  257. package/plugins/runtime-modules/core/widgets/table/config.js +6 -0
  258. package/plugins/runtime-modules/core/widgets/table/reader-query.d.ts +17 -0
  259. package/plugins/runtime-modules/core/widgets/table/reader-query.js +33 -0
  260. package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.js +3 -1
  261. package/plugins/runtime-modules/descriptor-compiler.d.ts +19 -3
  262. package/plugins/runtime-modules/descriptor-compiler.js +44 -16
  263. package/plugins/runtime-modules/editor/presets.d.ts +4 -0
  264. package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +3 -1
  265. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +5 -1
  266. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +5 -1
  267. package/plugins/runtime-modules/localization/presets.d.ts +4 -0
  268. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -1
  269. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +4 -2
  270. package/plugins/runtime-modules/news/presets.d.ts +4 -0
  271. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +6 -2
  272. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +46 -39
  273. package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +1 -1
  274. package/plugins/runtime-modules/preset-contracts/pub-area.js +1 -0
  275. package/plugins/runtime-modules/resolver.js +17 -0
  276. package/plugins/runtime-modules/revisions/controller/client.js +50 -46
  277. package/plugins/runtime-modules/revisions/controller/draft-context-target.d.ts +25 -0
  278. package/plugins/runtime-modules/revisions/controller/draft-context-target.js +33 -0
  279. package/plugins/runtime-modules/revisions/presets.d.ts +4 -0
  280. package/plugins/runtime-modules/revisions/services/table.js +16 -5
  281. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +3 -1
  282. package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
  283. package/plugins/runtime-modules/theme/presets.d.ts +4 -0
  284. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +76 -4
  285. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +3 -2
  286. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +2 -2
  287. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +19 -7
  288. package/plugins/runtime-modules/threads/client-data-providers.js +5 -0
  289. package/plugins/runtime-modules/threads/controller/definition.js +1 -1
  290. package/plugins/runtime-modules/threads/data-providers.d.ts +115 -2
  291. package/plugins/runtime-modules/threads/data-providers.js +85 -0
  292. package/plugins/runtime-modules/threads/definition.d.ts +115 -2
  293. package/plugins/runtime-modules/threads/definition.js +1 -1
  294. package/plugins/runtime-modules/threads/ids.d.ts +2 -0
  295. package/plugins/runtime-modules/threads/ids.js +3 -0
  296. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +192 -0
  297. package/plugins/runtime-modules/threads/services/customer-file-table.js +164 -0
  298. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +5 -3
  299. package/plugins/runtime-modules/user-management/client-data-providers.js +5 -0
  300. package/plugins/runtime-modules/user-management/data-providers.d.ts +159 -0
  301. package/plugins/runtime-modules/user-management/data-providers.js +101 -3
  302. package/plugins/runtime-modules/user-management/definition.d.ts +159 -0
  303. package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
  304. package/plugins/runtime-modules/user-management/ids.js +9 -0
  305. package/plugins/runtime-modules/user-management/presets.js +17 -1
  306. package/plugins/runtime-modules/user-management/services/users-access-table.d.ts +378 -0
  307. package/plugins/runtime-modules/user-management/services/users-access-table.js +132 -0
  308. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +86 -0
  309. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +118 -0
  310. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts +20 -0
  311. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +166 -0
  312. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +19 -18
  313. package/server-helpers/cms-page-record.d.ts +9 -1
  314. package/server-helpers/cms-page-record.js +11 -1
  315. package/server-helpers/cms-request.js +8 -5
  316. package/server-helpers/link-preview-image.d.ts +30 -0
  317. package/server-helpers/link-preview-image.js +57 -0
  318. package/server-helpers/search-text.js +3 -0
  319. package/server-helpers.d.ts +1 -1
  320. package/server-helpers.js +1 -1
  321. package/styles/builder-scaffold.css +7 -1
  322. package/styles/layout-authoring-scaffold.css +27 -0
  323. package/styles/shell.css +30 -6
  324. package/theme/phi-theme-composition.js +9 -0
  325. package/theme/phi-theme-inverse-ground.d.ts +39 -0
  326. package/theme/phi-theme-inverse-ground.js +103 -0
  327. package/theme/phi-theme-tokens.d.ts +2 -1
  328. package/theme/phi-theme-tokens.js +2 -0
  329. package/types/cms-module-descriptors.d.ts +14 -0
  330. package/types/cms-overlay.d.ts +13 -6
  331. package/types/cms-overlay.js +6 -22
  332. package/types/cms-plugins.d.ts +14 -2
  333. package/types/cms.d.ts +10 -0
  334. package/types/core-widget-placements.d.ts +3 -3
  335. package/types/link-preview.d.ts +19 -0
  336. package/types/link-preview.js +19 -0
  337. package/types/record-provider.d.ts +22 -1
  338. package/types/site-theme.d.ts +27 -0
  339. package/types/table-embed.d.ts +48 -0
  340. package/types/table-embed.js +1 -0
  341. package/types/table-widget.d.ts +14 -0
  342. package/types/widget-runtime.d.ts +3 -0
  343. package/types.d.ts +1 -0
  344. /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
@@ -19,6 +19,7 @@ const SYNTHETIC_REGION_IDS = {
19
19
  regionFooterBottom: -33,
20
20
  };
21
21
  export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetKey, ownerModuleId, runtimeModuleArea, }) {
22
+ const isApp = runtimeModuleArea === "app";
22
23
  const PHI_DEFAULT_PUB_AREA_LAYOUT_IDS = createPhiPresetCmsInstanceIdMap({
23
24
  domain: "area",
24
25
  ownerModuleId,
@@ -161,7 +162,7 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
161
162
  label: "pub header main three column",
162
163
  config: {
163
164
  ...resolvePhiLayoutCreationPreset("threecol", "panel"),
164
- balancedSides: false,
165
+ balancedSides: isApp,
165
166
  justify: "space-between",
166
167
  contentAlign: "center",
167
168
  },
@@ -288,30 +289,36 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
288
289
  config: {},
289
290
  contentVersionId: null,
290
291
  },
291
- {
292
- id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetNav,
293
- siteId: page.siteId,
294
- parentLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderMain,
295
- widgetType: buildPhiCmsWidgetNamespacedTypeKey(resolvePhiCmsWidgetPluginKey("header-navigation"), "header-navigation"),
296
- slotIndex: PHI_CMS_THREE_COLUMN_LAYOUT_SLOT_INDEX.Middle,
297
- sortOrder: 10,
298
- status: 1,
299
- flags: 0,
300
- visibilityMask: page.visibilityMask,
301
- label: "pub header main navigation",
302
- /* The current entry on a rounded ground rather than a bar under it, in either mode. */
303
- config: {
304
- navKey: `${runtimeModuleArea}:header`,
305
- selectionStyle: "pill",
292
+ isApp
293
+ ? nodes.widget({
294
+ typeKey: "page-title",
295
+ id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetPageTitle,
296
+ parentLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderMain,
297
+ slotIndex: PHI_CMS_THREE_COLUMN_LAYOUT_SLOT_INDEX.Middle,
298
+ sortOrder: 10,
299
+ label: "Page title",
300
+ config: { display: "label" },
301
+ })
302
+ : {
303
+ id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetNav,
304
+ siteId: page.siteId,
305
+ parentLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderMain,
306
+ widgetType: buildPhiCmsWidgetNamespacedTypeKey(resolvePhiCmsWidgetPluginKey("header-navigation"), "header-navigation"),
307
+ slotIndex: PHI_CMS_THREE_COLUMN_LAYOUT_SLOT_INDEX.Middle,
308
+ sortOrder: 10,
309
+ status: 1,
310
+ flags: 0,
311
+ visibilityMask: page.visibilityMask,
312
+ label: "pub header main navigation",
313
+ /* The current entry on a rounded ground rather than a bar under it, in either mode. */
314
+ config: {
315
+ navKey: `${runtimeModuleArea}:header`,
316
+ selectionStyle: "pill",
317
+ },
318
+ contentVersionId: null,
306
319
  },
307
- contentVersionId: null,
308
- },
309
- /*
310
- * The magnifier, in Public only: the Area every visitor reads, and the one whose results Page it
311
- * opens. The App carries its box in its Sider where its preset puts one; the operator's Areas are
312
- * not searched. Before the locale switch, in the slot nothing else of this preset takes.
313
- */
314
- ...(runtimeModuleArea === "public"
320
+ // The magnifier leads to this Area's results Page wherever the Search Module is active.
321
+ ...(runtimeModuleArea === "public" || isApp
315
322
  ? [{
316
323
  id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetSearch,
317
324
  siteId: page.siteId,
@@ -327,20 +334,20 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
327
334
  contentVersionId: null,
328
335
  }]
329
336
  : []),
330
- {
331
- id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetLocale,
332
- siteId: page.siteId,
333
- parentLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderActions,
334
- widgetType: buildPhiCmsWidgetNamespacedTypeKey(resolvePhiCmsWidgetPluginKey("locale"), "locale"),
335
- slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[1].slotIndex,
336
- sortOrder: 10,
337
- status: 1,
338
- flags: 0,
339
- visibilityMask: page.visibilityMask,
340
- label: "pub header main locale",
341
- config: {},
342
- contentVersionId: null,
343
- },
337
+ ...(!isApp ? [{
338
+ id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetLocale,
339
+ siteId: page.siteId,
340
+ parentLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderActions,
341
+ widgetType: buildPhiCmsWidgetNamespacedTypeKey(resolvePhiCmsWidgetPluginKey("locale"), "locale"),
342
+ slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[1].slotIndex,
343
+ sortOrder: 10,
344
+ status: 1,
345
+ flags: 0,
346
+ visibilityMask: page.visibilityMask,
347
+ label: "pub header main locale",
348
+ config: {},
349
+ contentVersionId: null,
350
+ }] : []),
344
351
  /*
345
352
  * The account trigger, in every Area that shares this preset.
346
353
  *
@@ -354,7 +361,7 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
354
361
  siteId: page.siteId,
355
362
  parentLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderActions,
356
363
  widgetType: buildPhiCmsWidgetNamespacedTypeKey(resolvePhiCmsWidgetPluginKey("account"), "account"),
357
- slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[2].slotIndex,
364
+ slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[isApp ? 1 : 2].slotIndex,
358
365
  sortOrder: 20,
359
366
  status: 1,
360
367
  flags: 0,
@@ -1,4 +1,4 @@
1
1
  export declare const PHI_DEFAULT_PUB_AREA_PRESET_KEY = "public-area-preset";
2
2
  export declare const PHI_DEFAULT_PUB_AREA_LAYOUT_NODE_KEYS: readonly ["layoutHeaderMain", "layoutHeaderActions", "layoutHeaderBottom", "layoutSiderRight", "layoutFooterTop", "layoutFooterMain", "layoutFooterBottom"];
3
- export declare const PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS: readonly ["widgetBrand", "widgetNav", "widgetSearch", "widgetLocale", "widgetAccount", "widgetSiderRightNav", "widgetFooterLeft", "widgetFooterMiddle", "widgetFooterBottomText"];
3
+ export declare const PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS: readonly ["widgetBrand", "widgetNav", "widgetPageTitle", "widgetSearch", "widgetLocale", "widgetAccount", "widgetSiderRightNav", "widgetFooterLeft", "widgetFooterMiddle", "widgetFooterBottomText"];
4
4
  export declare const PHI_DEFAULT_PUB_AREA_COMPOSITION_NODE_KEYS: readonly ["widgetBrand", "widgetNav", "widgetLocale"];
@@ -11,6 +11,7 @@ export const PHI_DEFAULT_PUB_AREA_LAYOUT_NODE_KEYS = [
11
11
  export const PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS = [
12
12
  "widgetBrand",
13
13
  "widgetNav",
14
+ "widgetPageTitle",
14
15
  "widgetSearch",
15
16
  "widgetLocale",
16
17
  "widgetAccount",
@@ -405,6 +405,23 @@ export function collectPhiRuntimeDataProviderKeys({ moduleSet, trees, }) {
405
405
  readPhiCollectionViewItemRendererKey(widgetConfig, moduleSet) === PHI_MEDIA_LIBRARY_ITEM_RENDERER_KEY) {
406
406
  collected.add(PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.collection);
407
407
  }
408
+ /*
409
+ * A Markdown text's Table embeds read the Provider their active Module names (TABLES.md), found in its
410
+ * source -- its own or its Content record's. One a code sample quotes mounts a Provider, never a Table.
411
+ */
412
+ if (widget.widgetType === PhiCmsWidgetType.Markdown) {
413
+ const sources = [widgetConfig.markdown, widget.resolvedContent?.textFields.markdown?.source];
414
+ const keys = sources.flatMap((source) => typeof source === "string"
415
+ ? [...source.matchAll(/!\[[^\]\n]*\]\(\s*<?phis:table\/([^\s?#)>]+)/gu)].map((match) => match[1])
416
+ : []);
417
+ for (const key of keys) {
418
+ for (const definition of moduleSet.moduleDefinitionsById.values()) {
419
+ const providerKey = definition.embeddableTables?.find((embed) => embed.key === key)?.source.providerKey;
420
+ if (providerKey && knownProviderKeys.has(providerKey))
421
+ collected.add(providerKey);
422
+ }
423
+ }
424
+ }
408
425
  if (widget.widgetType === PhiCmsWidgetType.Form) {
409
426
  const formId = parsePhiFormWidgetConfig(widgetConfig).formId;
410
427
  const form = formId ? moduleSet.formDefinitionsById.get(formId) : null;
@@ -11,8 +11,9 @@ import { usePhiApplicationFeedback } from "../../../../components/runtime/use-ph
11
11
  import { getPhiWorkspaceCatalogSnapshot, usePhiWorkspaceCatalogValue, } from "../../../../components/workspace/catalog-store";
12
12
  import { PHI_BUILDER_NAVIGATION_KEY_SEARCH_PARAM, PHI_BUILDER_PAGE_SEARCH_PARAM, PHI_BUILDER_REVISIONS_KIND_SEARCH_PARAM, PHI_BUILDER_REVISIONS_SCOPE_SEARCH_PARAM, PHI_BUILDER_THEME_KEY_SEARCH_PARAM, normalizePhiBuilderAreaSearchParam, normalizePhiBuilderPageSearchParam, normalizePhiBuilderRevisionsKindSearchParam, } from "../../../../helpers/cms-scope-search-params";
13
13
  import { resolvePhiBuilderRevisionPagePath, } from "../types";
14
- import { resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, resolvePhiBuilderPageKeyFromCatalogPath, } from "../../../../helpers/cms-page-catalog";
14
+ import { resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, } from "../../../../helpers/cms-page-catalog";
15
15
  import { PHI_REVISIONS_RUNTIME_CONTROLLER_DEFINITION, } from "../controller/definition";
16
+ import { resolvePhiRevisionsDraftContextTarget } from "./draft-context-target";
16
17
  import { resolvePhiBuilderRevisionNavScopeKey } from "../../../../helpers/cms-navigation-scope-key";
17
18
  import { deleteCmsDraft } from "../../../../helpers/cms-draft-delete";
18
19
  import { isPhiRecord } from "../../../../helpers/is-record";
@@ -28,6 +29,20 @@ function PhiRevisionsControllerMount({ address, config, }) {
28
29
  */
29
30
  const emitRoutes = useMemo(() => config.signalRoutes?.emits ?? [], [config.signalRoutes?.emits]);
30
31
  const emitCapability = useCallback((capabilityId, value, correlationId) => dispatchPhiSignalCapability(dispatchSignal, address, emitRoutes, capabilityId, value, correlationId), [address, dispatchSignal, emitRoutes]);
32
+ const reportDraftStatus = useCallback((value, correlationId) => {
33
+ dispatchSignal({
34
+ scope: "area",
35
+ channel: "draftStatus",
36
+ action: "change",
37
+ value,
38
+ valueType: "json",
39
+ valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.revisionsDraftStatus,
40
+ sender: address,
41
+ receiver: "broadcast",
42
+ correlationId,
43
+ timestamp: Date.now(),
44
+ });
45
+ }, [address, dispatchSignal]);
31
46
  const { showMessage } = usePhiApplicationFeedback();
32
47
  const pathname = usePhiPathname();
33
48
  const router = useRouter();
@@ -86,6 +101,7 @@ function PhiRevisionsControllerMount({ address, config, }) {
86
101
  ownerModuleId: source?.ownerModuleId,
87
102
  presetKey: source?.presetKey,
88
103
  });
104
+ reportDraftStatus({ status: "published", revisionId: null, area }, correlationId);
89
105
  emitCapability("deleteAreaClose", null, correlationId);
90
106
  emitCapability("historyReload", null, correlationId);
91
107
  showMessage({ level: "success", content: `Cleared the ${area} structure back to its preset. Its Modules are kept.` });
@@ -97,7 +113,7 @@ function PhiRevisionsControllerMount({ address, config, }) {
97
113
  content: error instanceof Error ? error.message : "Clearing the Area failed.",
98
114
  });
99
115
  }
100
- }, [emitCapability, router, showMessage]);
116
+ }, [emitCapability, reportDraftStatus, router, showMessage]);
101
117
  usePhiSignalListener(useCallback((signal) => {
102
118
  if (signal.channel === "areaSelection" &&
103
119
  signal.action === "change" &&
@@ -166,6 +182,15 @@ function PhiRevisionsControllerMount({ address, config, }) {
166
182
  else if (kind === "theme" && scopeKey) {
167
183
  search.set(PHI_BUILDER_REVISIONS_SCOPE_SEARCH_PARAM, scopeKey);
168
184
  }
185
+ /*
186
+ * Only a changed address is a navigation. The Table hands every scope it is given back to this
187
+ * Controller, and replacing the address with itself still fetches the Page from the server, whose
188
+ * answer refreshes the workspace catalog, which makes this Controller hand the scope to the Table
189
+ * again: a page scope asked for its history and the Page about once a second for as long as it
190
+ * stood open.
191
+ */
192
+ if (search.toString() === window.location.search.replace(/^\?/, ""))
193
+ return;
169
194
  router.replace(`${pathname}?${search.toString()}`, { scroll: false });
170
195
  return;
171
196
  }
@@ -173,56 +198,35 @@ function PhiRevisionsControllerMount({ address, config, }) {
173
198
  const payload = signal.value;
174
199
  const action = isPhiRecord(payload.value) ? payload.value : null;
175
200
  const key = typeof action?.key === "string" ? action.key : "";
176
- if (key === "restore") {
177
- showMessage({ level: "success", content: `Restored revision #${String(action?.revisionId ?? "")}.` }, { correlationId: signal.correlationId });
178
- const state = getPhiWorkspaceCatalogSnapshot();
179
- const search = new URLSearchParams(window.location.search);
180
- const kind = normalizePhiBuilderRevisionsKindSearchParam(search.get(PHI_BUILDER_REVISIONS_KIND_SEARCH_PARAM)) ?? "area";
181
- const revisionScope = search.get(PHI_BUILDER_REVISIONS_SCOPE_SEARCH_PARAM)?.trim() ?? "";
182
- const pages = resolvePhiBuilderActivePageCatalog(state.area, state.modulePresetPagesByArea, state.customPages, state.persistedPageCatalogByArea);
183
- dispatchSignal({
184
- scope: "area",
185
- channel: "draftStatus",
186
- action: "change",
187
- value: {
188
- status: "draft",
189
- revisionId: typeof action?.restoredRevisionId === "number" ? action.restoredRevisionId : null,
190
- ...(kind === "navigation"
191
- ? { navKey: resolvePhiBuilderRevisionNavScopeKey(state.area, revisionScope.includes(":")
192
- ? revisionScope
193
- : search.get(PHI_BUILDER_NAVIGATION_KEY_SEARCH_PARAM)) }
194
- : kind === "theme"
195
- ? { themeKey: revisionScope || search.get(PHI_BUILDER_THEME_KEY_SEARCH_PARAM) || "default" }
196
- : kind === "page"
197
- ? {
198
- area: state.area,
199
- pageKey: revisionScope.startsWith("/")
200
- ? resolvePhiBuilderPageKeyFromCatalogPath(state.area, revisionScope, pages)
201
- : normalizePhiBuilderPageSearchParam(search.get(PHI_BUILDER_PAGE_SEARCH_PARAM)) ?? state.pageKey,
202
- }
203
- : {
204
- area: normalizePhiBuilderAreaSearchParam(revisionScope) ?? state.area,
205
- }),
206
- },
207
- valueType: "json",
208
- valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.revisionsDraftStatus,
209
- sender: address,
210
- receiver: "broadcast",
211
- correlationId: signal.correlationId,
212
- timestamp: Date.now(),
213
- });
214
- }
215
- else if (key === "resetPage") {
216
- showMessage({ level: "success", content: "The Page is back to its Module's preset." }, { correlationId: signal.correlationId });
217
- // What stands now is the preset, which only the server knows how to build.
218
- router.refresh();
201
+ const scope = isPhiRecord(action?.scope) ? action.scope : null;
202
+ const kind = normalizePhiBuilderRevisionsKindSearchParam(scope?.kind);
203
+ const area = scope?.area;
204
+ if (key === "restore" || key === "resetPage") {
205
+ const structural = (kind === "area" || kind === "page") && isPhiBuilderAreaKey(area);
206
+ const target = resolvePhiRevisionsDraftContextTarget(scope, action?.areaModules === true, getPhiWorkspaceCatalogSnapshot());
207
+ reportDraftStatus({
208
+ status: key === "restore" ? "draft" : "published",
209
+ revisionId: typeof action?.restoredRevisionId === "number" ? action.restoredRevisionId : null,
210
+ ...(kind === "navigation" ? { navKey: scope?.navKey } : {}),
211
+ ...(kind === "theme" ? { themeKey: scope?.themeKey } : {}),
212
+ ...(target ?? {}),
213
+ }, signal.correlationId);
214
+ if (structural) {
215
+ router.refresh();
216
+ }
217
+ showMessage({
218
+ level: "success",
219
+ content: key === "restore"
220
+ ? `Restored revision #${String(action?.revisionId ?? "")}.`
221
+ : "The Page is back to its Module's preset.",
222
+ }, { correlationId: signal.correlationId });
219
223
  }
220
224
  else if (key === "delete")
221
225
  showMessage({ level: "success", content: `Deleted revision #${String(action?.revisionId ?? "")}.` }, { correlationId: signal.correlationId });
222
226
  else if (key === "deleteSelected")
223
227
  showMessage({ level: "success", content: `Deleted ${String(action?.deletedCount ?? 0)} revisions.` }, { correlationId: signal.correlationId });
224
228
  }
225
- }, [address, deleteAreaShell, dispatchSignal, emitCapability, pathname, router, showMessage]), {
229
+ }, [address, deleteAreaShell, emitCapability, pathname, reportDraftStatus, router, showMessage]), {
226
230
  scopes: ["area", "page"],
227
231
  channels: ["areaSelection", "bindingParams", "command", "formValues", "mutation"],
228
232
  },
@@ -0,0 +1,25 @@
1
+ import { type PhiBuilderAreaKey } from "../../../../constants/cms-areas";
2
+ import type { PhiWorkspaceCatalogState } from "../../../../components/workspace/catalog-state";
3
+ /**
4
+ * The Builder context a revision action superseded, as the `draftStatus` broadcast names it: the Area's
5
+ * Module selection (`areaModules`), one Page (`pageKey`), or -- with the Area alone -- its Shell.
6
+ */
7
+ export type PhiRevisionsDraftContextTarget = {
8
+ area: PhiBuilderAreaKey;
9
+ areaModules: true;
10
+ } | {
11
+ area: PhiBuilderAreaKey;
12
+ pageKey: string;
13
+ } | {
14
+ area: PhiBuilderAreaKey;
15
+ };
16
+ /**
17
+ * Which cached Builder context a restore or a Page reset replaced, read off the scope the Revisions
18
+ * Table acted on.
19
+ *
20
+ * A Page scope names its Page by storage path when it is the Site's own, and by preset identity when it
21
+ * is a Module's -- then its `path` is null. A Page scope that names no Page of the catalog has no target:
22
+ * the Area alone means its Shell, and discarding the Shell's edits for a Page's revision lost them while
23
+ * the Page kept showing what was replaced.
24
+ */
25
+ export declare function resolvePhiRevisionsDraftContextTarget(scope: Readonly<Record<string, unknown>> | null, areaModules: boolean, catalog: Pick<PhiWorkspaceCatalogState, "modulePresetPagesByArea" | "customPages" | "persistedPageCatalogByArea">): PhiRevisionsDraftContextTarget | null;
@@ -0,0 +1,33 @@
1
+ import { isPhiBuilderAreaKey } from "../../../../constants/cms-areas";
2
+ import { findPhiBuilderPageKeyFromPresetSource, findPhiBuilderPageKeyFromStoragePath, resolvePhiBuilderActivePageCatalog, resolvePhiBuilderPageKeyFromCatalogPath, } from "../../../../helpers/cms-page-catalog";
3
+ import { isPhiRecord } from "../../../../helpers/is-record";
4
+ /**
5
+ * Which cached Builder context a restore or a Page reset replaced, read off the scope the Revisions
6
+ * Table acted on.
7
+ *
8
+ * A Page scope names its Page by storage path when it is the Site's own, and by preset identity when it
9
+ * is a Module's -- then its `path` is null. A Page scope that names no Page of the catalog has no target:
10
+ * the Area alone means its Shell, and discarding the Shell's edits for a Page's revision lost them while
11
+ * the Page kept showing what was replaced.
12
+ */
13
+ export function resolvePhiRevisionsDraftContextTarget(scope, areaModules, catalog) {
14
+ const area = scope?.area;
15
+ if (!isPhiBuilderAreaKey(area)) {
16
+ return null;
17
+ }
18
+ if (scope?.kind === "area") {
19
+ return areaModules ? { area, areaModules: true } : { area };
20
+ }
21
+ if (scope?.kind !== "page") {
22
+ return null;
23
+ }
24
+ const pages = resolvePhiBuilderActivePageCatalog(area, catalog.modulePresetPagesByArea, catalog.customPages, catalog.persistedPageCatalogByArea);
25
+ const source = isPhiRecord(scope.sourcePreset) ? scope.sourcePreset : null;
26
+ const pageKey = typeof scope.path === "string"
27
+ ? findPhiBuilderPageKeyFromStoragePath(area, scope.path, pages)
28
+ ?? resolvePhiBuilderPageKeyFromCatalogPath(area, scope.path, pages)
29
+ : typeof source?.ownerModuleId === "string" && typeof source.presetKey === "string"
30
+ ? findPhiBuilderPageKeyFromPresetSource({ ownerModuleId: source.ownerModuleId, presetKey: source.presetKey }, pages)
31
+ : null;
32
+ return pageKey === null ? null : { area, pageKey };
33
+ }
@@ -44,6 +44,10 @@ export declare const PHI_REVISIONS_RUNTIME_MODULE_ROUTES: {
44
44
  path: string;
45
45
  landingPage?: true;
46
46
  title: string;
47
+ description?: string;
48
+ shareImage?: {
49
+ asset: string;
50
+ };
47
51
  defaultPageFlags?: number;
48
52
  loadTree: (context: import("../../../types").PhiCmsDescriptorBuildContext & {
49
53
  activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
@@ -8,7 +8,7 @@ import { PhiTableProviderError, } from "../../../../types/table-widget";
8
8
  import { createPhiTableProviderClient } from "../../../../components/widgets/client/shared/phi-table-provider";
9
9
  import { PHI_REVISIONS_RUNTIME_DATA_PROVIDER_DESCRIPTORS } from "../../../../plugins/runtime-modules/revisions/data-providers";
10
10
  import { getPhiWorkspaceCatalogSnapshot, } from "../../../../components/workspace/catalog-store";
11
- import { resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, resolvePhiBuilderPageKeyFromCatalogPath, } from "../../../../helpers/cms-page-catalog";
11
+ import { resolvePhiBuilderActivePageCatalog, findPhiBuilderPageKeyFromStoragePath, resolvePhiBuilderActivePageKey, resolvePhiBuilderPageKeyFromCatalogPath, } from "../../../../helpers/cms-page-catalog";
12
12
  import { PHI_BUILDER_NAVIGATION_KEY_SEARCH_PARAM, PHI_BUILDER_REVISIONS_SCOPE_SEARCH_PARAM, PHI_BUILDER_REVISIONS_KIND_SEARCH_PARAM, PHI_BUILDER_THEME_KEY_SEARCH_PARAM, normalizePhiBuilderRevisionsKindSearchParam, } from "../../../../helpers/cms-scope-search-params";
13
13
  import { resolvePhiBuilderRevisionPagePath, resolvePhiBuilderRevisionScope, } from "../types";
14
14
  import { resolvePhiBuilderRevisionNavScopeKey } from "../../../../helpers/cms-navigation-scope-key";
@@ -73,8 +73,16 @@ function readParams(value) {
73
73
  * moment rather than a fault. A page scope without a page asks for nothing and shows nothing, and
74
74
  * fills in as soon as there is one.
75
75
  */
76
+ /*
77
+ * The Page a page scope names, by the address it answers on: the Page Select, the Controller and the
78
+ * `revisionScope` search parameter all hand the storage path, package namespace included. Matched
79
+ * against the path the Builder shows instead, a Module Page (`/phis/ui/dashboard`, shown as
80
+ * `/dashboard`) was found nowhere, read as a Site Page of that path and asked for by a path its row
81
+ * does not have -- so its history was empty and "Reset to preset" had no preset to name.
82
+ */
76
83
  const pageKey = kind === "page" && configuredScopeKey.startsWith("/")
77
- ? resolvePhiBuilderPageKeyFromCatalogPath(scopeArea, configuredScopeKey, pages)
84
+ ? findPhiBuilderPageKeyFromStoragePath(scopeArea, configuredScopeKey, pages)
85
+ ?? resolvePhiBuilderPageKeyFromCatalogPath(scopeArea, configuredScopeKey, pages)
78
86
  : activePageKey ?? "";
79
87
  const navScopeKey = kind === "navigation" && configuredScopeKey
80
88
  ? resolvePhiBuilderRevisionNavScopeKey(scopeArea, configuredScopeKey)
@@ -148,12 +156,13 @@ async function loadRevisionHistory(scope, signal) {
148
156
  * Nothing is being asked about yet.
149
157
  *
150
158
  * Both cases are the same moment: a panel opened before the workspace catalog arrived. A page scope
151
- * has no page and an Area scope has no preset source -- and the Area scope is refused by the server
159
+ * has no page -- neither a Site Page's path nor a Module Page's preset -- and an Area scope has no
160
+ * preset source -- and the Area scope is refused by the server
152
161
  * rather than the client, because a revision belongs to a preset and an Area without one names
153
162
  * nothing. Asking anyway answers a surface that is waiting with an error; the scope key carries the
154
163
  * preset, so the question is asked again by itself once there is one.
155
164
  */
156
- if ((scope.kind === "page" && !scope.path) ||
165
+ if ((scope.kind === "page" && !scope.path && !scope.sourcePreset) ||
157
166
  (scope.kind === "area" && !scope.sourcePreset)) {
158
167
  return {
159
168
  kind: scope.kind,
@@ -428,7 +437,7 @@ async function mutateRevision(request) {
428
437
  return {
429
438
  status: "accepted",
430
439
  invalidation: "view",
431
- value: { key: request.actionKey },
440
+ value: { key: request.actionKey, scope: params.scope },
432
441
  };
433
442
  }
434
443
  const current = await loadRevisionHistory(params.scope, request.signal);
@@ -443,6 +452,8 @@ async function mutateRevision(request) {
443
452
  key: request.actionKey,
444
453
  revisionId,
445
454
  restoredRevisionId: result.revisionId,
455
+ scope: params.scope,
456
+ areaModules: params.scope.kind === "area" && current.rows.some((row) => row.revisionId === revisionId && !row.sourcePreset),
446
457
  };
447
458
  }
448
459
  else if (request.actionKey === "delete") {
@@ -95,7 +95,7 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
95
95
  label: "Builder delete area",
96
96
  config: {
97
97
  title: revisionsLabels.deleteArea.title,
98
- width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
98
+ size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
99
99
  /*
100
100
  * `remount` rather than `lazy-keep`: the field is the confirmation, and a dialog that kept a
101
101
  * half-typed Area key from the last time it was opened would carry an answer across to a
@@ -396,6 +396,8 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
396
396
  id: PHI_REVISIONS_TABLE_WIDGET_ID,
397
397
  parentLayoutNodeId: PHI_REVISIONS_PAGE_LAYOUT_IDS.layoutContent,
398
398
  slotIndex: 0,
399
+ // The Module's Label Set, translated already.
400
+ flags: PhiCmsFlags.NoTranslate,
399
401
  label: "dev revisions table",
400
402
  config: {
401
403
  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
  }
@@ -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>;