@phis/ui 0.2.1 → 0.3.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 (1762) hide show
  1. package/README.md +5 -5
  2. package/cms/plugins.d.ts +1 -1
  3. package/cms.d.ts +1 -1
  4. package/components/calendar/gregory-calendar-adapter-client.js +1 -0
  5. package/components/cms/clients/phi-background-motion-layer-client.js +5 -2
  6. package/components/cms/phi-cms-area-render-scope.d.ts +1 -3
  7. package/components/cms/phi-cms-deferred-error-page.d.ts +19 -0
  8. package/components/cms/phi-cms-deferred-error-page.js +31 -0
  9. package/components/cms/phi-cms-error-fallback.d.ts +11 -0
  10. package/components/cms/phi-cms-error-fallback.js +35 -0
  11. package/components/cms/phi-cms-error-page.js +13 -32
  12. package/components/cms/phi-cms-layout-renderer.d.ts +12 -2
  13. package/components/cms/phi-cms-layout-renderer.js +140 -58
  14. package/components/cms/phi-cms-page-redirect.js +3 -5
  15. package/components/cms/phi-cms-page-render-scope.d.ts +52 -0
  16. package/components/cms/phi-cms-page-render-scope.js +94 -0
  17. package/components/cms/phi-cms-render-diagnostic-client.js +11 -3
  18. package/components/cms/phi-cms-root-layout.d.ts +2 -1
  19. package/components/cms/phi-cms-root-layout.js +67 -19
  20. package/components/cms/phi-cms-root-page.js +4 -32
  21. package/components/cms/phi-cms-root-slot-page.js +6 -38
  22. package/components/controls/phi-anchor-nav-control.d.ts +20 -0
  23. package/components/controls/phi-anchor-nav-control.js +12 -0
  24. package/components/controls/phi-avatar-control.js +2 -2
  25. package/components/controls/phi-background-control.d.ts +8 -8
  26. package/components/controls/phi-background-control.js +28 -51
  27. package/components/controls/phi-breadcrumb-control.d.ts +12 -0
  28. package/components/controls/phi-breadcrumb-control.js +7 -0
  29. package/components/controls/phi-bullet-list-control.d.ts +32 -0
  30. package/components/controls/phi-bullet-list-control.js +73 -0
  31. package/components/controls/phi-button-control.d.ts +8 -1
  32. package/components/controls/phi-button-control.js +9 -5
  33. package/components/controls/phi-button-types.d.ts +0 -1
  34. package/components/controls/phi-button-types.js +1 -9
  35. package/components/controls/phi-cascader-control.d.ts +22 -0
  36. package/components/controls/phi-cascader-control.js +62 -5
  37. package/components/controls/phi-collapse-control.d.ts +43 -0
  38. package/components/controls/phi-collapse-control.js +35 -0
  39. package/components/controls/phi-collection-header-control.js +3 -2
  40. package/components/controls/phi-color-control.js +9 -67
  41. package/components/controls/phi-color-field-control.d.ts +6 -1
  42. package/components/controls/phi-color-field-control.js +4 -2
  43. package/components/controls/phi-confirm-dialog.d.ts +2 -1
  44. package/components/controls/phi-control-option-content.d.ts +7 -3
  45. package/components/controls/phi-control-option-content.js +9 -4
  46. package/components/controls/phi-date-picker-control.js +3 -2
  47. package/components/controls/phi-description-tooltip-icon.js +2 -2
  48. package/components/controls/phi-dialog-control.d.ts +3 -3
  49. package/components/controls/phi-dialog-control.js +9 -2
  50. package/components/controls/phi-drag-handle-control.js +2 -2
  51. package/components/controls/phi-drawer-control-adapter.js +1 -1
  52. package/components/controls/phi-drawer-control.d.ts +3 -3
  53. package/components/controls/phi-expand-indicator.js +4 -3
  54. package/components/controls/phi-float-button-control.d.ts +39 -0
  55. package/components/controls/phi-float-button-control.js +73 -0
  56. package/components/controls/phi-form-control-contract.d.ts +9 -0
  57. package/components/controls/phi-form-control.js +68 -3
  58. package/components/controls/phi-icon-picker-control.js +17 -12
  59. package/components/controls/phi-image-control.d.ts +52 -0
  60. package/components/controls/phi-image-control.js +69 -0
  61. package/components/controls/phi-inline-text-editor.d.ts +6 -1
  62. package/components/controls/phi-inline-text-editor.js +15 -3
  63. package/components/controls/phi-labeled-control.d.ts +17 -2
  64. package/components/controls/phi-labeled-control.js +20 -2
  65. package/components/controls/phi-lightbox-image-control.d.ts +16 -0
  66. package/components/controls/phi-lightbox-image-control.js +12 -0
  67. package/components/controls/phi-mask-picker-control.js +5 -13
  68. package/components/controls/phi-media-asset-tile-control.js +3 -23
  69. package/components/controls/phi-media-picker-control.js +3 -3
  70. package/components/controls/phi-menu-control.d.ts +4 -9
  71. package/components/controls/phi-menu-control.js +45 -46
  72. package/components/controls/phi-modal-control-adapter.js +63 -1
  73. package/components/controls/phi-multi-select-control.js +11 -4
  74. package/components/controls/phi-number-control.js +4 -3
  75. package/components/controls/phi-options-provider.js +3 -6
  76. package/components/controls/phi-otp-control.js +4 -3
  77. package/components/controls/phi-overlay-control-contract.d.ts +3 -3
  78. package/components/controls/phi-padding-control.d.ts +0 -2
  79. package/components/controls/phi-padding-control.js +11 -13
  80. package/components/controls/phi-rate-control.js +3 -2
  81. package/components/controls/phi-result-control.d.ts +15 -0
  82. package/components/controls/phi-result-control.js +11 -0
  83. package/components/controls/phi-segmented-control.js +11 -4
  84. package/components/controls/phi-select-control.js +41 -9
  85. package/components/controls/phi-shadow-control.js +5 -1
  86. package/components/controls/phi-slider-control.d.ts +17 -4
  87. package/components/controls/phi-slider-control.js +33 -8
  88. package/components/controls/phi-steps-control.d.ts +40 -0
  89. package/components/controls/phi-steps-control.js +24 -0
  90. package/components/controls/phi-surface-control.d.ts +56 -0
  91. package/components/controls/phi-surface-control.js +109 -0
  92. package/components/controls/phi-switch-control.js +3 -2
  93. package/components/controls/phi-table-control.d.ts +2 -0
  94. package/components/controls/phi-table-control.js +69 -19
  95. package/components/controls/phi-text-control.d.ts +3 -5
  96. package/components/controls/phi-text-control.js +7 -5
  97. package/components/controls/phi-text-types.d.ts +8 -0
  98. package/components/controls/phi-theme-scope-control.d.ts +23 -0
  99. package/components/controls/phi-theme-scope-control.js +29 -0
  100. package/components/controls/phi-timeline-control.d.ts +32 -0
  101. package/components/controls/phi-timeline-control.js +33 -0
  102. package/components/controls/phi-toolbar-control.d.ts +1 -0
  103. package/components/controls/phi-toolbar-control.js +9 -1
  104. package/components/controls/phi-tour-control.d.ts +41 -0
  105. package/components/controls/phi-tour-control.js +29 -0
  106. package/components/controls/phi-tree-control.js +4 -3
  107. package/components/controls/phi-tree-select-control.js +11 -4
  108. package/components/controls/phi-video-embed-control.js +2 -2
  109. package/components/forms/auth-admin-settings-labels.d.ts +2 -0
  110. package/components/forms/auth-admin-settings-labels.js +4 -0
  111. package/components/forms/choice-form-field-controls.js +2 -2
  112. package/components/forms/compound-form-controls.js +29 -28
  113. package/components/forms/content-entry-curation-config.d.ts +12 -0
  114. package/components/forms/content-entry-curation-config.js +12 -0
  115. package/components/forms/content-entry-forms.d.ts +52 -0
  116. package/components/forms/content-entry-forms.js +328 -0
  117. package/components/forms/extended-form-field-controls.js +18 -1
  118. package/components/forms/form-descriptor-contract.d.ts +0 -9
  119. package/components/forms/form-descriptor-contract.js +1 -1
  120. package/components/forms/form-descriptor-runtime-client.js +86 -10
  121. package/components/forms/form-guard-client.d.ts +14 -1
  122. package/components/forms/form-guard-client.js +13 -2
  123. package/components/forms/form-labels.js +2 -1
  124. package/components/forms/form-provider-contract.d.ts +38 -0
  125. package/components/forms/form-provider-contract.js +41 -0
  126. package/components/forms/form-provider-registry.d.ts +9 -2
  127. package/components/forms/form-resolution.js +3 -5
  128. package/components/forms/form-widget-config.d.ts +5 -4
  129. package/components/forms/form-widget-config.js +3 -2
  130. package/components/forms/link-target-form-control.d.ts +10 -0
  131. package/components/forms/link-target-form-control.js +82 -0
  132. package/components/forms/phi-form-widget.js +2 -4
  133. package/components/forms/runtime-form-client.d.ts +0 -22
  134. package/components/forms/runtime-form-client.js +1 -1
  135. package/components/forms/runtime-form-controller-mount.js +6 -4
  136. package/components/forms/runtime-form-controller-requirement.d.ts +1 -11
  137. package/components/forms/runtime-form-controller-requirement.js +3 -3
  138. package/components/forms/shared-form-ids.d.ts +5 -0
  139. package/components/forms/shared-form-ids.js +5 -0
  140. package/components/forms/shared-form-loaders.d.ts +11 -2
  141. package/components/forms/shared-form-loaders.js +13 -3
  142. package/components/forms/shared-form-provider-registry.js +4 -0
  143. package/components/forms/storage-size.d.ts +0 -9
  144. package/components/forms/storage-size.js +1 -1
  145. package/components/forms/upload-form-control.d.ts +5 -0
  146. package/components/forms/upload-form-control.js +27 -7
  147. package/components/layouts/clients/phi-carousel-layout-client.d.ts +5 -17
  148. package/components/layouts/clients/phi-carousel-layout-client.js +36 -61
  149. package/components/layouts/clients/phi-collapsible-layout-client.d.ts +3 -1
  150. package/components/layouts/clients/phi-collapsible-layout-client.js +84 -81
  151. package/components/layouts/clients/phi-content-layout-client.d.ts +4 -33
  152. package/components/layouts/clients/phi-content-layout-client.js +7 -11
  153. package/components/layouts/clients/phi-flex-layout-client.d.ts +7 -0
  154. package/components/layouts/clients/phi-flex-layout-client.js +77 -51
  155. package/components/layouts/clients/phi-grid-layout-client.js +37 -38
  156. package/components/layouts/clients/phi-layout-anchored-overlay.d.ts +0 -1
  157. package/components/layouts/clients/phi-layout-anchored-overlay.js +3 -3
  158. package/components/layouts/clients/phi-sequence-slot-editor.d.ts +2 -3
  159. package/components/layouts/clients/phi-sequence-slot-editor.js +41 -38
  160. package/components/layouts/clients/phi-split-card-half.d.ts +28 -0
  161. package/components/layouts/clients/phi-split-card-half.js +33 -0
  162. package/components/layouts/clients/phi-split-card-layout-client.d.ts +12 -21
  163. package/components/layouts/clients/phi-split-card-layout-client.js +29 -51
  164. package/components/layouts/clients/phi-stack-layout-client.d.ts +2 -17
  165. package/components/layouts/clients/phi-stack-layout-client.js +67 -90
  166. package/components/layouts/clients/phi-three-column-layout-client.d.ts +3 -30
  167. package/components/layouts/clients/phi-three-column-layout-client.js +6 -10
  168. package/components/layouts/clients/use-phi-sequence-layout.d.ts +44 -0
  169. package/components/layouts/clients/use-phi-sequence-layout.js +69 -0
  170. package/components/layouts/layout-definitions.d.ts +64 -68
  171. package/components/layouts/layout-definitions.js +20 -34
  172. package/components/layouts/layout-slot-meta.d.ts +19 -0
  173. package/components/layouts/layout-slot-meta.js +34 -0
  174. package/components/layouts/phi-base-layout.d.ts +1 -1
  175. package/components/layouts/phi-base-layout.js +5 -8
  176. package/components/layouts/phi-flex-vertical-layout.d.ts +3 -2
  177. package/components/layouts/phi-flex-vertical-layout.js +2 -2
  178. package/components/layouts/phi-grid-contract.d.ts +30 -22
  179. package/components/layouts/phi-grid-contract.js +39 -38
  180. package/components/layouts/phi-layout-contract.d.ts +9 -14
  181. package/components/layouts/phi-layout-contract.js +5 -57
  182. package/components/layouts/phi-layout-signal-surface.d.ts +26 -0
  183. package/components/layouts/phi-layout-signal-surface.js +15 -0
  184. package/components/layouts/phi-layout-surface-box.d.ts +32 -0
  185. package/components/layouts/phi-layout-surface-box.js +41 -0
  186. package/components/layouts/phi-layout-view-model.d.ts +6 -2
  187. package/components/layouts/phi-layout-view-model.js +16 -26
  188. package/components/layouts/phi-masonry-columns.d.ts +18 -0
  189. package/components/layouts/phi-masonry-columns.js +77 -0
  190. package/components/layouts/phi-masonry-contract.d.ts +45 -0
  191. package/components/layouts/phi-masonry-contract.js +62 -0
  192. package/components/layouts/phi-masonry-layout.d.ts +9 -2
  193. package/components/layouts/phi-masonry-layout.js +27 -21
  194. package/components/layouts/phi-structure-region-layout.js +2 -2
  195. package/components/layouts/plugins/carousel-layout-plugin.js +2 -31
  196. package/components/layouts/plugins/collapsible-layout-plugin.js +16 -3
  197. package/components/layouts/plugins/content-layout-plugin.js +1 -1
  198. package/components/layouts/plugins/flex-layout-plugin.js +1 -1
  199. package/components/layouts/plugins/flex-vertical-layout-plugin.js +1 -1
  200. package/components/layouts/plugins/grid-layout-plugin.js +1 -1
  201. package/components/layouts/plugins/masonry-layout-plugin.js +1 -1
  202. package/components/layouts/plugins/split-card-layout-plugin.js +1 -1
  203. package/components/layouts/plugins/stack-layout-plugin.js +2 -25
  204. package/components/layouts/plugins/three-column-layout-plugin.js +1 -1
  205. package/components/layouts/split-card-geometry.d.ts +14 -0
  206. package/components/layouts/split-card-geometry.js +32 -0
  207. package/components/layouts/stack-signals.d.ts +5 -0
  208. package/components/layouts/stack-signals.js +12 -4
  209. package/components/layouts/use-phi-slot-sequence.d.ts +0 -9
  210. package/components/layouts/use-phi-slot-sequence.js +2 -2
  211. package/components/media/asset-type-label.d.ts +6 -0
  212. package/components/media/asset-type-label.js +27 -0
  213. package/components/media/background-asset-projection.d.ts +3 -17
  214. package/components/media/background-asset-projection.js +15 -6
  215. package/components/media/focal-rect.d.ts +20 -1
  216. package/components/media/focal-rect.js +37 -2
  217. package/components/media/image-presentation.d.ts +12 -2
  218. package/components/media/image-presentation.js +33 -6
  219. package/components/media/media-folder-options.d.ts +2 -0
  220. package/components/media/media-folder-options.js +5 -0
  221. package/components/media/media-space-selection.d.ts +0 -27
  222. package/components/media/media-space-selection.js +2 -2
  223. package/components/media/media-upload-flow.d.ts +17 -14
  224. package/components/media/media-upload-flow.js +135 -26
  225. package/components/media/phi-area-upload-widget.js +30 -27
  226. package/components/media/phi-asset-focal-rect-widget.js +0 -1
  227. package/components/media/phi-asset-inspector-section.js +6 -9
  228. package/components/media/phi-image-preview-data.d.ts +0 -10
  229. package/components/media/phi-image-preview-data.js +1 -1
  230. package/components/media/phi-media-kind-icon.js +10 -10
  231. package/components/media/phi-media-picker-binding.js +2 -2
  232. package/components/media/phi-media-restricted-icon.js +2 -2
  233. package/components/media/phi-media-upload.d.ts +13 -1
  234. package/components/media/phi-media-upload.js +51 -7
  235. package/components/media/phi-site-font-assets.d.ts +8 -1
  236. package/components/media/phi-site-font-assets.js +20 -6
  237. package/components/motion/phi-sequence-viewport.js +17 -4
  238. package/components/motion/use-phi-sequence-autoplay.d.ts +26 -0
  239. package/components/motion/use-phi-sequence-autoplay.js +52 -0
  240. package/components/motion/use-phi-sequence-gestures.d.ts +24 -0
  241. package/components/motion/use-phi-sequence-gestures.js +59 -0
  242. package/components/overlays/phi-dialog-body-context.d.ts +5 -0
  243. package/components/overlays/phi-dialog-body-context.js +17 -0
  244. package/components/overlays/phi-overlay-container-client.js +37 -15
  245. package/components/regions/clients/cms-region-container-client.d.ts +6 -1
  246. package/components/regions/clients/cms-region-container-client.js +66 -28
  247. package/components/regions/clients/use-phi-region-reveal.d.ts +28 -0
  248. package/components/regions/clients/use-phi-region-reveal.js +104 -0
  249. package/components/regions/phi-cms-region-container.d.ts +4 -1
  250. package/components/regions/phi-cms-region-container.js +13 -3
  251. package/components/regions/phi-cms-region-shell.d.ts +13 -1
  252. package/components/regions/phi-cms-region-shell.js +98 -51
  253. package/components/regions/phi-cms-region-static.js +5 -2
  254. package/components/regions/presets/content-entry-editor-page-tree.d.ts +48 -0
  255. package/components/regions/presets/content-entry-editor-page-tree.js +749 -0
  256. package/components/regions/presets/content-entry-editor-tour.d.ts +19 -0
  257. package/components/regions/presets/content-entry-editor-tour.js +71 -0
  258. package/components/regions/presets/content-entry-public-page-trees.d.ts +52 -0
  259. package/components/regions/presets/content-entry-public-page-trees.js +146 -0
  260. package/components/regions/presets/phi-area-root-redirect-tree.js +7 -1
  261. package/components/regions/presets/phi-area-shell-preset-nodes.d.ts +49 -0
  262. package/components/regions/presets/phi-area-shell-preset-nodes.js +160 -0
  263. package/components/regions/presets/phi-base-page-column.d.ts +26 -0
  264. package/components/regions/presets/phi-base-page-column.js +42 -0
  265. package/components/regions/presets/phi-base-page-layout.d.ts +3 -3
  266. package/components/regions/presets/phi-base-page-layout.js +4 -3
  267. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +15 -5
  268. package/components/regions/presets/phi-settings-page-shell-tree.js +34 -28
  269. package/components/root/phi-config-provider.d.ts +20 -2
  270. package/components/root/phi-config-provider.js +26 -4
  271. package/components/root/phi-dayjs-locale.d.ts +0 -7
  272. package/components/root/phi-dayjs-locale.js +4 -6
  273. package/components/root/phi-root-background.d.ts +9 -0
  274. package/components/root/phi-root-background.js +14 -3
  275. package/components/root/phi-root-layout.d.ts +1 -0
  276. package/components/root/phi-root-layout.js +32 -27
  277. package/components/root/phi-root-live-theme-provider.d.ts +1 -2
  278. package/components/root/phi-root-live-theme-provider.js +9 -3
  279. package/components/root/phi-root-theme-resolver.d.ts +4 -0
  280. package/components/root/phi-root-theme-resolver.js +65 -3
  281. package/components/root/phi-shell-chrome-overlay.d.ts +47 -22
  282. package/components/root/phi-shell-chrome-overlay.js +61 -20
  283. package/components/root/phi-theme-tone-source.d.ts +19 -0
  284. package/components/root/phi-theme-tone-source.js +7 -0
  285. package/components/runtime/core-runtime-controller-address.d.ts +0 -1
  286. package/components/runtime/core-runtime-controller-address.js +1 -1
  287. package/components/runtime/mounted-runtime-controller.js +5 -2
  288. package/components/runtime/phi-restored-request-runtime.d.ts +12 -0
  289. package/components/runtime/phi-restored-request-runtime.js +12 -0
  290. package/components/runtime/renderable-block-runtime.d.ts +10 -4
  291. package/components/runtime/renderable-block-runtime.js +53 -121
  292. package/components/runtime/runtime-controller-config-overlays.d.ts +19 -0
  293. package/components/runtime/runtime-controller-config-overlays.js +76 -0
  294. package/components/runtime/runtime-controller-materialization.d.ts +37 -1
  295. package/components/runtime/runtime-controller-materialization.js +87 -13
  296. package/components/runtime/runtime-controller-server-host.d.ts +4 -2
  297. package/components/runtime/runtime-controller-server-host.js +4 -2
  298. package/components/runtime/runtime-module-authoring-host.js +2 -1
  299. package/components/runtime/runtime-module-context.d.ts +2 -1
  300. package/components/runtime/runtime-page-condition-state.js +3 -2
  301. package/components/runtime/runtime-signal-identity.d.ts +11 -1
  302. package/components/runtime/runtime-signal-identity.js +28 -1
  303. package/components/runtime/runtime-signal-partition.d.ts +9 -0
  304. package/components/runtime/runtime-signal-partition.js +4 -0
  305. package/components/runtime/runtime-signal-registry.d.ts +1 -1
  306. package/components/runtime/runtime-signal-registry.js +2 -5
  307. package/components/runtime/runtime-visual-anchors.d.ts +48 -0
  308. package/components/runtime/runtime-visual-anchors.js +128 -0
  309. package/components/runtime/use-phi-pathname.d.ts +6 -0
  310. package/components/runtime/use-phi-pathname.js +11 -0
  311. package/components/runtime/user-state-client.js +2 -1
  312. package/components/shell/phi-antd-icon.d.ts +117 -60
  313. package/components/shell/phi-antd-icon.js +234 -61
  314. package/components/shell/phi-cms-shell.d.ts +7 -1
  315. package/components/shell/phi-cms-shell.js +4 -3
  316. package/components/shell/phi-icon.d.ts +7 -2
  317. package/components/shell/phi-icon.js +5 -5
  318. package/components/shell/phi-locale-switch.js +3 -2
  319. package/components/shell/phi-widget-icon.js +28 -28
  320. package/components/state/history-store.d.ts +28 -16
  321. package/components/state/history-store.js +10 -4
  322. package/components/surface/phi-surface-ground.d.ts +16 -0
  323. package/components/surface/phi-surface-ground.js +54 -0
  324. package/components/surface/phi-surface-tone-scope.d.ts +14 -0
  325. package/components/surface/phi-surface-tone-scope.js +11 -0
  326. package/components/surface/phi-surface-tone.d.ts +18 -0
  327. package/components/surface/phi-surface-tone.js +36 -0
  328. package/components/tables/client/phi-table-binding.d.ts +4 -2
  329. package/components/tables/client/phi-table-binding.js +15 -11
  330. package/components/trees/client/phi-tree-binding.js +85 -7
  331. package/components/widgets/builder/phi-static-options-picker.d.ts +1 -0
  332. package/components/widgets/builder/phi-static-options-picker.js +63 -195
  333. package/components/widgets/builder/phi-static-rows-editor.d.ts +65 -0
  334. package/components/widgets/builder/phi-static-rows-editor.js +190 -0
  335. package/components/widgets/builder/phi-static-timeline-picker.d.ts +7 -0
  336. package/components/widgets/builder/phi-static-timeline-picker.js +91 -0
  337. package/components/widgets/client/description-editor-sections.d.ts +1 -1
  338. package/components/widgets/client/external-document-editor.js +24 -9
  339. package/components/widgets/client/html-editor-image-node.d.ts +0 -8
  340. package/components/widgets/client/html-editor-image-node.js +2 -2
  341. package/components/widgets/client/html-editor.js +13 -2
  342. package/components/widgets/client/shared/core-options-providers.js +4 -7
  343. package/components/widgets/client/shared/description-items.d.ts +5 -4
  344. package/components/widgets/client/shared/description-items.js +9 -4
  345. package/components/widgets/client/shared/phi-choice-controller.d.ts +1 -1
  346. package/components/widgets/client/shared/phi-choice-controller.js +11 -4
  347. package/components/widgets/client/shared/phi-command-buttons-authoring-tools.d.ts +11 -0
  348. package/components/widgets/client/shared/phi-command-buttons-authoring-tools.js +40 -0
  349. package/components/widgets/client/shared/phi-command-buttons.d.ts +20 -0
  350. package/components/widgets/client/shared/phi-command-buttons.js +286 -0
  351. package/components/widgets/client/shared/phi-link-target-control.d.ts +44 -0
  352. package/components/widgets/client/shared/phi-link-target-control.js +93 -0
  353. package/components/widgets/client/shared/phi-mask-picker.js +65 -34
  354. package/components/widgets/client/shared/phi-page-reference-picker.js +2 -2
  355. package/components/widgets/client/shared/phi-rendered-value.d.ts +0 -14
  356. package/components/widgets/client/shared/phi-rendered-value.js +1 -1
  357. package/components/widgets/client/shared/phi-static-table-provider.d.ts +1 -12
  358. package/components/widgets/client/shared/phi-static-table-provider.js +16 -17
  359. package/components/widgets/client/shared/phi-table-provider-request.d.ts +11 -0
  360. package/components/widgets/client/shared/phi-table-provider-request.js +43 -0
  361. package/components/widgets/client/shared/phi-timeline-provider.d.ts +36 -0
  362. package/components/widgets/client/shared/phi-timeline-provider.js +115 -0
  363. package/components/widgets/client/shared/phi-widget-image-tool-button.d.ts +0 -1
  364. package/components/widgets/client/shared/phi-widget-image-tool-button.js +2 -4
  365. package/components/widgets/client/shared/phi-widget-tool-buttons.d.ts +17 -2
  366. package/components/widgets/client/shared/phi-widget-tool-buttons.js +53 -45
  367. package/components/widgets/config/background-pattern-live.js +4 -14
  368. package/components/widgets/config/background.d.ts +33 -11
  369. package/components/widgets/config/background.js +86 -149
  370. package/components/widgets/config/choice-shared.d.ts +2 -3
  371. package/components/widgets/config/choice-shared.js +1 -1
  372. package/components/widgets/config/command-buttons.d.ts +48 -0
  373. package/components/widgets/config/command-buttons.js +207 -0
  374. package/components/widgets/config/common-action-field.d.ts +52 -0
  375. package/components/widgets/config/common-action-field.js +57 -0
  376. package/components/widgets/config/control-signal-config.d.ts +26 -0
  377. package/components/widgets/config/control-signal-config.js +21 -13
  378. package/components/widgets/config/geometry.js +7 -5
  379. package/components/widgets/config/image-source-parser.d.ts +0 -2
  380. package/components/widgets/config/image-source-parser.js +2 -5
  381. package/components/widgets/config/image-variant-options.d.ts +5 -0
  382. package/components/widgets/config/image-variant-options.js +14 -0
  383. package/components/widgets/config/mask.d.ts +2 -1
  384. package/components/widgets/config/mask.js +11 -2
  385. package/components/widgets/config/parser-primitives.d.ts +1 -10
  386. package/components/widgets/config/parser-primitives.js +2 -42
  387. package/components/widgets/config/search-shared.d.ts +1 -6
  388. package/components/widgets/config/search-shared.js +1 -51
  389. package/components/widgets/config/spacing-options.d.ts +4 -4
  390. package/components/widgets/config/spacing-options.js +10 -11
  391. package/components/widgets/config/stack-tabs.d.ts +0 -1
  392. package/components/widgets/config/stack-tabs.js +1 -1
  393. package/components/widgets/helpers/font-size.js +6 -1
  394. package/components/widgets/helpers/html-content.js +2 -1
  395. package/components/widgets/helpers/internal-reference-resolver.server.js +8 -7
  396. package/components/widgets/label-sets/admin-locales.d.ts +4 -0
  397. package/components/widgets/label-sets/admin-locales.js +8 -0
  398. package/components/widgets/label-sets/admin-settings.d.ts +4 -0
  399. package/components/widgets/label-sets/admin-settings.js +8 -0
  400. package/components/widgets/label-sets/admin-users.d.ts +7 -0
  401. package/components/widgets/label-sets/admin-users.js +14 -0
  402. package/components/widgets/label-sets/authoring-tools.d.ts +0 -2
  403. package/components/widgets/label-sets/authoring-tools.js +78 -6
  404. package/components/widgets/label-sets/background.js +11 -13
  405. package/components/widgets/label-sets/builder-modules.js +6 -0
  406. package/components/widgets/label-sets/card.d.ts +5 -0
  407. package/components/widgets/label-sets/card.js +17 -0
  408. package/components/widgets/label-sets/color-picker.d.ts +0 -2
  409. package/components/widgets/label-sets/color-picker.js +0 -4
  410. package/components/widgets/label-sets/common-controls.d.ts +0 -2
  411. package/components/widgets/label-sets/common-controls.js +1 -1
  412. package/components/widgets/label-sets/content-entries.d.ts +128 -0
  413. package/components/widgets/label-sets/content-entries.js +197 -0
  414. package/components/widgets/label-sets/gallery.d.ts +4 -0
  415. package/components/widgets/label-sets/gallery.js +31 -0
  416. package/components/widgets/label-sets/history.d.ts +5 -0
  417. package/components/widgets/label-sets/history.js +106 -0
  418. package/components/widgets/label-sets/icon-picker.d.ts +0 -2
  419. package/components/widgets/label-sets/icon-picker.js +0 -4
  420. package/components/widgets/label-sets/inspector.js +124 -1
  421. package/components/widgets/label-sets/logout.d.ts +4 -0
  422. package/components/widgets/label-sets/logout.js +21 -0
  423. package/components/widgets/label-sets/profile.d.ts +1 -0
  424. package/components/widgets/label-sets/profile.js +2 -0
  425. package/components/widgets/label-sets/revisions.js +20 -0
  426. package/components/widgets/label-sets/theme-mode-switch.d.ts +4 -0
  427. package/components/widgets/label-sets/theme-mode-switch.js +19 -0
  428. package/components/widgets/label-sets/tour.d.ts +4 -0
  429. package/components/widgets/label-sets/tour.js +29 -0
  430. package/components/widgets/label-types/authoring-tools.d.ts +44 -1
  431. package/components/widgets/label-types/authoring-tools.js +42 -1
  432. package/components/widgets/label-types/background.d.ts +2 -3
  433. package/components/widgets/label-types/background.js +3 -4
  434. package/components/widgets/label-types/builder-modules.d.ts +5 -0
  435. package/components/widgets/label-types/builder-modules.js +4 -0
  436. package/components/widgets/label-types/card.d.ts +5 -0
  437. package/components/widgets/label-types/card.js +3 -0
  438. package/components/widgets/label-types/gallery.d.ts +13 -0
  439. package/components/widgets/label-types/gallery.js +10 -0
  440. package/components/widgets/label-types/history.d.ts +48 -0
  441. package/components/widgets/label-types/history.js +66 -0
  442. package/components/widgets/label-types/inspector.d.ts +84 -0
  443. package/components/widgets/label-types/inspector.js +66 -0
  444. package/components/widgets/label-types/logout.d.ts +5 -0
  445. package/components/widgets/label-types/logout.js +1 -0
  446. package/components/widgets/label-types/revisions.d.ts +15 -0
  447. package/components/widgets/label-types/revisions.js +14 -4
  448. package/components/widgets/label-types/theme-mode-switch.d.ts +5 -0
  449. package/components/widgets/label-types/theme-mode-switch.js +4 -0
  450. package/components/widgets/label-types/tour.d.ts +9 -0
  451. package/components/widgets/label-types/tour.js +7 -0
  452. package/components/widgets/login-redirect.d.ts +1 -1
  453. package/components/widgets/login-redirect.js +4 -6
  454. package/components/widgets/navigation-descriptor-resolver.server.js +64 -30
  455. package/components/widgets/server/navigation-request.d.ts +0 -1
  456. package/components/widgets/server/navigation-request.js +1 -1
  457. package/components/widgets/server/search.d.ts +0 -2
  458. package/components/widgets/server/search.js +1 -1
  459. package/components/widgets/shared/bullet-list-vocabulary.d.ts +80 -0
  460. package/components/widgets/shared/bullet-list-vocabulary.js +159 -0
  461. package/components/widgets/shared/card-body-client.d.ts +64 -56
  462. package/components/widgets/shared/card-body-client.js +243 -90
  463. package/components/widgets/shared/card-vocabulary.d.ts +53 -0
  464. package/components/widgets/shared/card-vocabulary.js +39 -0
  465. package/components/widgets/shared/markdown-body-client.d.ts +9 -5
  466. package/components/widgets/shared/markdown-body-client.js +24 -36
  467. package/components/widgets/shared/markdown-render.d.ts +11 -0
  468. package/components/widgets/shared/markdown-render.js +24 -6
  469. package/components/widgets/shared/result-body-client.js +2 -2
  470. package/components/widgets/signals/command-toolbar-address.d.ts +0 -2
  471. package/components/widgets/signals/command-toolbar-address.js +0 -4
  472. package/components/widgets/signals/control-signal-capabilities.d.ts +23 -13
  473. package/components/widgets/signals/control-signal-capabilities.js +33 -3
  474. package/components/widgets/signals/renderable-block-signal-capabilities.d.ts +5 -0
  475. package/components/widgets/signals/renderable-block-signal-capabilities.js +5 -0
  476. package/components/widgets/signals/signal-endpoints.d.ts +4 -1
  477. package/components/widgets/signals/signal-endpoints.js +9 -4
  478. package/components/workspace/catalog-state.d.ts +13 -0
  479. package/components/workspace/catalog-store.js +1 -0
  480. package/constants/cms-layout-types.d.ts +6 -2
  481. package/constants/cms-layout-types.js +8 -4
  482. package/constants/cms-widget-types.d.ts +8 -19
  483. package/constants/cms-widget-types.js +22 -13
  484. package/constants/content-entry-kinds.d.ts +21 -0
  485. package/constants/content-entry-kinds.js +25 -0
  486. package/constants/content-entry-parts.d.ts +55 -0
  487. package/constants/content-entry-parts.js +48 -0
  488. package/constants/core-data-provider-keys.d.ts +12 -0
  489. package/constants/core-data-provider-keys.js +12 -0
  490. package/constants/grid-columns.d.ts +4 -0
  491. package/constants/grid-columns.js +5 -0
  492. package/constants/html-link-schemes.d.ts +6 -0
  493. package/constants/html-link-schemes.js +6 -0
  494. package/constants/media-library-provider-keys.d.ts +5 -0
  495. package/constants/media-library-provider-keys.js +5 -0
  496. package/constants/public-login-route.d.ts +11 -0
  497. package/constants/public-login-route.js +12 -0
  498. package/constants/runtime-data-provider-key.d.ts +1 -1
  499. package/constants/runtime-module-ownership.js +32 -5
  500. package/constants/runtime-render-client-types.d.ts +0 -1
  501. package/constants/runtime-render-client-types.js +0 -1
  502. package/constants/site-cookies.d.ts +9 -0
  503. package/constants/site-cookies.js +13 -0
  504. package/constants/support.d.ts +1 -1
  505. package/constants/support.js +1 -1
  506. package/constants/thread-library-provider-keys.d.ts +4 -3
  507. package/constants/thread-library-provider-keys.js +4 -3
  508. package/constants.d.ts +2 -1
  509. package/constants.js +3 -1
  510. package/controls.d.ts +16 -0
  511. package/controls.js +8 -0
  512. package/forms.d.ts +3 -2
  513. package/forms.js +1 -1
  514. package/gateway/auth-public-manifest.js +21 -14
  515. package/gateway/content-entries.d.ts +57 -0
  516. package/gateway/content-entries.js +141 -0
  517. package/gateway/dashboard-cards-route.js +121 -77
  518. package/gateway/errors.d.ts +0 -1
  519. package/gateway/errors.js +1 -1
  520. package/gateway/form-registry.d.ts +1 -6
  521. package/gateway/form-registry.js +12 -28
  522. package/gateway/form-submit.d.ts +6 -21
  523. package/gateway/form-submit.js +8 -13
  524. package/gateway/internal-references.d.ts +7 -4
  525. package/gateway/internal-references.js +157 -15
  526. package/gateway/media-folder-images.d.ts +19 -0
  527. package/gateway/media-folder-images.js +37 -0
  528. package/gateway/module-diagnostics-route.js +4 -9
  529. package/gateway/navigation-target-route.js +15 -84
  530. package/gateway/page-references-route.d.ts +18 -0
  531. package/gateway/page-references-route.js +86 -0
  532. package/gateway/route-handler-helpers.d.ts +9 -0
  533. package/gateway/route-handler-helpers.js +41 -0
  534. package/gateway/server-capabilities.d.ts +1 -1
  535. package/gateway/server-capabilities.js +24 -16
  536. package/gateway/site-api-request.d.ts +32 -0
  537. package/gateway/site-api-request.js +48 -0
  538. package/gateway/site-area.d.ts +26 -2
  539. package/gateway/site-area.js +80 -95
  540. package/gateway/site-auth-settings.d.ts +4 -3
  541. package/gateway/site-auth-settings.js +11 -27
  542. package/gateway/site-config.js +15 -16
  543. package/gateway/site-content.d.ts +30 -0
  544. package/gateway/site-content.js +32 -0
  545. package/gateway/site-form-route.js +14 -5
  546. package/gateway/site-media-settings.d.ts +6 -5
  547. package/gateway/site-media-settings.js +11 -27
  548. package/gateway/site-nav.js +34 -61
  549. package/gateway/site-page.d.ts +11 -5
  550. package/gateway/site-page.js +56 -96
  551. package/gateway/site-proxy.js +13 -3
  552. package/gateway/site-settings.d.ts +4 -3
  553. package/gateway/site-settings.js +11 -27
  554. package/gateway/site-stats.d.ts +4 -3
  555. package/gateway/site-stats.js +11 -27
  556. package/gateway/site-theme.d.ts +3 -3
  557. package/gateway/site-theme.js +14 -31
  558. package/gateway/thread-inbox-stats.d.ts +4 -3
  559. package/gateway/thread-inbox-stats.js +13 -25
  560. package/gateway/tr.d.ts +8 -0
  561. package/gateway/tr.js +18 -3
  562. package/gateway/user-state.d.ts +2 -2
  563. package/gateway/user-state.js +14 -26
  564. package/helpers/access.d.ts +0 -5
  565. package/helpers/access.js +0 -19
  566. package/helpers/antd-locale.d.ts +0 -3
  567. package/helpers/antd-locale.js +4 -6
  568. package/helpers/cms-area-config.d.ts +15 -11
  569. package/helpers/cms-area-config.js +13 -10
  570. package/helpers/cms-area-root-route.d.ts +4 -5
  571. package/helpers/cms-area-root-route.js +2 -6
  572. package/helpers/cms-config-field-validation.d.ts +7 -3
  573. package/helpers/cms-config-field-validation.js +47 -6
  574. package/helpers/cms-container-chrome.d.ts +10 -2
  575. package/helpers/cms-container-chrome.js +22 -31
  576. package/helpers/cms-content-binding.d.ts +13 -0
  577. package/helpers/cms-content-binding.js +32 -0
  578. package/helpers/cms-dialog.d.ts +51 -0
  579. package/helpers/cms-dialog.js +50 -0
  580. package/helpers/cms-layout-defaults.d.ts +19 -9
  581. package/helpers/cms-layout-defaults.js +64 -74
  582. package/helpers/cms-navigation-catalog.d.ts +0 -1
  583. package/helpers/cms-navigation-catalog.js +1 -1
  584. package/helpers/cms-node-factories.d.ts +1 -3
  585. package/helpers/cms-node-factories.js +2 -5
  586. package/helpers/cms-node-visibility.d.ts +8 -0
  587. package/helpers/cms-node-visibility.js +21 -1
  588. package/helpers/cms-page-catalog.d.ts +1 -3
  589. package/helpers/cms-page-catalog.js +11 -11
  590. package/helpers/cms-preset-nodes.d.ts +51 -1
  591. package/helpers/cms-preset-nodes.js +68 -2
  592. package/helpers/cms-preset-page-tree.d.ts +28 -0
  593. package/helpers/cms-preset-page-tree.js +83 -0
  594. package/helpers/cms-region-keys.d.ts +0 -1
  595. package/helpers/cms-region-keys.js +1 -1
  596. package/helpers/cms-routing.d.ts +0 -1
  597. package/helpers/cms-scope-search-params.d.ts +5 -1
  598. package/helpers/cms-scope-search-params.js +6 -1
  599. package/helpers/cms-tree-controller-settings.d.ts +11 -0
  600. package/helpers/cms-tree-controller-settings.js +37 -0
  601. package/helpers/content-entry-record-binding.d.ts +21 -0
  602. package/helpers/content-entry-record-binding.js +31 -0
  603. package/helpers/css-linear-gradient.d.ts +28 -0
  604. package/helpers/css-linear-gradient.js +122 -0
  605. package/helpers/flags.d.ts +10 -0
  606. package/helpers/flags.js +20 -0
  607. package/helpers/form-id.d.ts +8 -0
  608. package/helpers/form-id.js +10 -0
  609. package/helpers/format-date-time.d.ts +5 -0
  610. package/helpers/format-date-time.js +31 -0
  611. package/helpers/internal-path.d.ts +12 -0
  612. package/helpers/internal-path.js +28 -0
  613. package/helpers/is-record.js +2 -1
  614. package/helpers/layout-authoring-markers.d.ts +0 -2
  615. package/helpers/layout-authoring-markers.js +1 -1
  616. package/helpers/layout-style.d.ts +2 -16
  617. package/helpers/layout-style.js +15 -32
  618. package/helpers/link-target.d.ts +6 -1
  619. package/helpers/link-target.js +12 -4
  620. package/helpers/locale.d.ts +2 -0
  621. package/helpers/locale.js +4 -0
  622. package/helpers/logout.d.ts +0 -16
  623. package/helpers/logout.js +1 -1
  624. package/helpers/motion.d.ts +0 -1
  625. package/helpers/motion.js +1 -1
  626. package/helpers/overlay-events.d.ts +9 -0
  627. package/helpers/overlay-events.js +9 -0
  628. package/helpers/page-reference-tree.d.ts +42 -0
  629. package/helpers/page-reference-tree.js +92 -0
  630. package/helpers/phi-seo.d.ts +0 -3
  631. package/helpers/phi-seo.js +2 -2
  632. package/helpers/public-route-claims.d.ts +0 -1
  633. package/helpers/public-route-claims.js +1 -1
  634. package/helpers/region-page-scope.d.ts +26 -0
  635. package/helpers/region-page-scope.js +121 -0
  636. package/helpers/renderable-block-defaults.d.ts +0 -3
  637. package/helpers/renderable-block-defaults.js +1 -1
  638. package/helpers/renderable-block-normalizers.d.ts +26 -0
  639. package/helpers/renderable-block-normalizers.js +166 -0
  640. package/helpers/renderable-block-serialization.d.ts +1 -5
  641. package/helpers/renderable-block-serialization.js +13 -166
  642. package/helpers/runtime-module-route-path.d.ts +0 -1
  643. package/helpers/runtime-module-route-path.js +1 -1
  644. package/helpers/shell-region-style.d.ts +3 -3
  645. package/helpers/shell-region-style.js +3 -3
  646. package/helpers/signal-listen-routes.d.ts +14 -0
  647. package/helpers/signal-listen-routes.js +33 -0
  648. package/helpers/signal-route-lifecycle.d.ts +1 -3
  649. package/helpers/signal-route-lifecycle.js +2 -2
  650. package/helpers/signal-route-set-join.d.ts +4 -0
  651. package/helpers/signal-route-set-join.js +29 -0
  652. package/helpers/site-api.d.ts +0 -3
  653. package/helpers/site-api.js +1 -3
  654. package/helpers/site-locale-config.d.ts +16 -6
  655. package/helpers/site-locale-config.js +14 -0
  656. package/helpers/static-render-path.d.ts +12 -0
  657. package/helpers/static-render-path.js +18 -0
  658. package/helpers/structure-widget-swap.js +4 -4
  659. package/helpers/surface-presets.d.ts +81 -0
  660. package/helpers/surface-presets.js +65 -0
  661. package/helpers/surface-style.d.ts +63 -0
  662. package/helpers/surface-style.js +74 -0
  663. package/helpers/table-binding.d.ts +6 -2
  664. package/helpers/table-binding.js +12 -1
  665. package/helpers/text-placeholders.d.ts +11 -21
  666. package/helpers/text-placeholders.js +24 -8
  667. package/helpers/translation-cache.js +3 -1
  668. package/helpers.d.ts +3 -0
  669. package/helpers.js +8 -0
  670. package/module-dashboard-cards.d.ts +15 -0
  671. package/module-dashboard-cards.js +15 -0
  672. package/module-records.d.ts +14 -0
  673. package/module-records.js +13 -0
  674. package/net/log.d.ts +1 -2
  675. package/net/log.js +1 -1
  676. package/next/area-route.d.ts +17 -3
  677. package/next/area-route.js +30 -22
  678. package/next/config.d.mts +25 -0
  679. package/next/config.mjs +277 -0
  680. package/next/overlay-zones.js +3 -7
  681. package/next/root-error-page.d.ts +15 -0
  682. package/next/root-error-page.js +30 -0
  683. package/next/root-route.d.ts +0 -4
  684. package/next/root-route.js +6 -7
  685. package/next/seo-routes.js +8 -36
  686. package/next/site-proxy.d.ts +2 -2
  687. package/next/site-proxy.js +17 -6
  688. package/package.json +23 -2
  689. package/plugins/factories/widget-builder-plugin.js +2 -3
  690. package/plugins/registries/runtime-controllers.js +4 -1
  691. package/plugins/runtime/phi-slot-child-frame-client.js +17 -8
  692. package/plugins/runtime/phi-slot-child-frame-view.d.ts +10 -2
  693. package/plugins/runtime/phi-slot-child-frame-view.js +12 -28
  694. package/plugins/runtime/phi-slot-child-frame.d.ts +2 -0
  695. package/plugins/runtime/phi-slot-child-frame.js +1 -1
  696. package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +12 -5
  697. package/plugins/runtime/slot-size-policy.d.ts +1 -2
  698. package/plugins/runtime/slot-size-policy.js +17 -6
  699. package/plugins/runtime-modules/accounting/module.d.ts +1 -1
  700. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-page-tree.js +2 -0
  701. package/plugins/runtime-modules/admin/definition.d.ts +2 -5
  702. package/plugins/runtime-modules/admin/definition.js +2 -8
  703. package/plugins/runtime-modules/admin/forms.d.ts +0 -3
  704. package/plugins/runtime-modules/admin/forms.js +15 -24
  705. package/plugins/runtime-modules/admin/ids.d.ts +9 -0
  706. package/plugins/runtime-modules/admin/ids.js +9 -0
  707. package/plugins/runtime-modules/admin/module.d.ts +32 -1
  708. package/plugins/runtime-modules/admin/module.js +8 -3
  709. package/plugins/runtime-modules/admin/presets.d.ts +1 -4
  710. package/plugins/runtime-modules/admin/presets.js +0 -1
  711. package/plugins/runtime-modules/admin/trees/admin-settings-label-set.js +3 -2
  712. package/plugins/runtime-modules/admin/trees/phi-default-admin-area-preset-tree.js +15 -147
  713. package/plugins/runtime-modules/admin/trees/phi-default-admin-settings-page-tree.js +7 -4
  714. package/plugins/runtime-modules/app/definition.d.ts +2 -2
  715. package/plugins/runtime-modules/app/definition.js +2 -2
  716. package/plugins/runtime-modules/app/forms.d.ts +0 -6
  717. package/plugins/runtime-modules/app/forms.js +34 -56
  718. package/plugins/runtime-modules/app/ids.d.ts +9 -0
  719. package/plugins/runtime-modules/app/ids.js +9 -0
  720. package/plugins/runtime-modules/app/module.d.ts +1 -1
  721. package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.js +8 -64
  722. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +1 -0
  723. package/plugins/runtime-modules/app/trees/profile-label-set.js +3 -2
  724. package/plugins/runtime-modules/area-base-presets.d.ts +1 -1
  725. package/plugins/runtime-modules/area-base-presets.js +0 -1
  726. package/plugins/runtime-modules/area-contributions/accounting.d.ts +1 -1
  727. package/plugins/runtime-modules/area-contributions/admin.d.ts +1 -1
  728. package/plugins/runtime-modules/area-contributions/app.d.ts +1 -1
  729. package/plugins/runtime-modules/area-contributions/app.js +0 -2
  730. package/plugins/runtime-modules/area-contributions/builder.d.ts +1 -1
  731. package/plugins/runtime-modules/area-contributions/common.d.ts +7 -2
  732. package/plugins/runtime-modules/area-contributions/common.js +10 -1
  733. package/plugins/runtime-modules/area-contributions/editor.d.ts +1 -1
  734. package/plugins/runtime-modules/area-contributions/editor.js +2 -0
  735. package/plugins/runtime-modules/area-contributions/public.d.ts +1 -1
  736. package/plugins/runtime-modules/area-contributions/public.js +2 -0
  737. package/plugins/runtime-modules/area-contributions.d.ts +0 -1
  738. package/plugins/runtime-modules/area-contributions.js +14 -4
  739. package/plugins/runtime-modules/area-definitions.d.ts +0 -97
  740. package/plugins/runtime-modules/area-definitions.js +9 -31
  741. package/plugins/runtime-modules/area-module-defaults.js +13 -5
  742. package/plugins/runtime-modules/asset/client-data-providers.js +6 -0
  743. package/plugins/runtime-modules/asset/controller/client.d.ts +14 -5
  744. package/plugins/runtime-modules/asset/controller/client.js +1 -1
  745. package/plugins/runtime-modules/asset/controller/definition.d.ts +21 -5
  746. package/plugins/runtime-modules/asset/controller/definition.js +22 -10
  747. package/plugins/runtime-modules/asset/controller/mount.d.ts +5 -2
  748. package/plugins/runtime-modules/asset/controller/mount.js +2 -2
  749. package/plugins/runtime-modules/asset/controller/runtime.d.ts +8 -1
  750. package/plugins/runtime-modules/asset/controller/runtime.js +69 -115
  751. package/plugins/runtime-modules/asset/data-providers.d.ts +59 -0
  752. package/plugins/runtime-modules/asset/data-providers.js +50 -0
  753. package/plugins/runtime-modules/asset/definition.d.ts +54 -0
  754. package/plugins/runtime-modules/asset/ids.d.ts +6 -0
  755. package/plugins/runtime-modules/asset/ids.js +7 -0
  756. package/plugins/runtime-modules/asset/metadata-form.d.ts +0 -2
  757. package/plugins/runtime-modules/asset/metadata-form.js +2 -2
  758. package/plugins/runtime-modules/asset/server.js +5 -0
  759. package/plugins/runtime-modules/asset/services/folder-images.server.d.ts +11 -0
  760. package/plugins/runtime-modules/asset/services/folder-images.server.js +41 -0
  761. package/plugins/runtime-modules/asset/services/options.d.ts +3 -0
  762. package/plugins/runtime-modules/asset/services/options.js +37 -28
  763. package/plugins/runtime-modules/asset/settings-forms.d.ts +0 -3
  764. package/plugins/runtime-modules/asset/settings-forms.js +1 -1
  765. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +28 -8
  766. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +106 -58
  767. package/plugins/runtime-modules/asset/widgets/area-upload/config.d.ts +2 -2
  768. package/plugins/runtime-modules/asset/widgets/area-upload/config.js +4 -3
  769. package/plugins/runtime-modules/asset/widgets/asset-focal-rect/config.d.ts +2 -1
  770. package/plugins/runtime-modules/asset/widgets/asset-focal-rect/config.js +1 -1
  771. package/plugins/runtime-modules/asset/widgets/image-inspector/config.d.ts +2 -2
  772. package/plugins/runtime-modules/asset/widgets/image-inspector/config.js +4 -3
  773. package/plugins/runtime-modules/asset/widgets/media-picker/config.d.ts +2 -2
  774. package/plugins/runtime-modules/asset/widgets/media-picker/config.js +4 -3
  775. package/plugins/runtime-modules/auth/admin-settings-forms.d.ts +0 -7
  776. package/plugins/runtime-modules/auth/admin-settings-forms.js +3 -3
  777. package/plugins/runtime-modules/auth/controller/definition.d.ts +13 -4
  778. package/plugins/runtime-modules/auth/controller/definition.js +3 -3
  779. package/plugins/runtime-modules/auth/controller/server-definition.d.ts +5 -5
  780. package/plugins/runtime-modules/auth/controller-plugin.js +23 -47
  781. package/plugins/runtime-modules/auth/definition.d.ts +1 -1
  782. package/plugins/runtime-modules/auth/definition.js +2 -2
  783. package/plugins/runtime-modules/auth/form-provider-registry.js +10 -6
  784. package/plugins/runtime-modules/auth/ids.d.ts +16 -0
  785. package/plugins/runtime-modules/auth/ids.js +17 -0
  786. package/plugins/runtime-modules/auth/machine.d.ts +0 -13
  787. package/plugins/runtime-modules/auth/machine.js +1 -1
  788. package/plugins/runtime-modules/auth/overlay-ids.d.ts +0 -1
  789. package/plugins/runtime-modules/auth/overlay-ids.js +0 -3
  790. package/plugins/runtime-modules/auth/services/installations-table.js +4 -3
  791. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +35 -7
  792. package/plugins/runtime-modules/auth/trees/phi-auth-runtime-page-tree.js +1 -1
  793. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +1 -0
  794. package/plugins/runtime-modules/auth/trees/phi-default-pub-confirm-page-tree.js +25 -21
  795. package/plugins/runtime-modules/auth/trees/phi-default-pub-login-page-tree.js +25 -21
  796. package/plugins/runtime-modules/auth/trees/phi-default-pub-registration-page-tree.js +25 -21
  797. package/plugins/runtime-modules/auth/trees/phi-default-pub-reset-password-page-tree.js +25 -21
  798. package/plugins/runtime-modules/auth/trees/security-label-set.js +3 -2
  799. package/plugins/runtime-modules/auth/widgets/auth-methods/config.d.ts +2 -1
  800. package/plugins/runtime-modules/auth/widgets/auth-methods/config.js +1 -1
  801. package/plugins/runtime-modules/auth/widgets/auth-workflow/client.js +3 -2
  802. package/plugins/runtime-modules/auth/widgets/auth-workflow/config.d.ts +2 -1
  803. package/plugins/runtime-modules/auth/widgets/auth-workflow/config.js +1 -1
  804. package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +3 -1
  805. package/plugins/runtime-modules/auth/widgets/logout/client.js +12 -7
  806. package/plugins/runtime-modules/auth/widgets/logout/server.d.ts +1 -1
  807. package/plugins/runtime-modules/auth/widgets/logout/server.js +10 -2
  808. package/plugins/runtime-modules/auth/widgets/security/client.d.ts +4 -1
  809. package/plugins/runtime-modules/auth/widgets/security/client.js +11 -5
  810. package/plugins/runtime-modules/avatar/definition.d.ts +1 -1
  811. package/plugins/runtime-modules/avatar/definition.js +2 -2
  812. package/plugins/runtime-modules/avatar/ids.d.ts +9 -0
  813. package/plugins/runtime-modules/avatar/ids.js +9 -0
  814. package/plugins/runtime-modules/avatar/labels.js +3 -2
  815. package/plugins/runtime-modules/avatar/module.d.ts +1 -1
  816. package/plugins/runtime-modules/avatar/overlay-tree.server.js +2 -6
  817. package/plugins/runtime-modules/avatar/widgets/account-avatar/client.js +6 -3
  818. package/plugins/runtime-modules/blog/authoring-widgets.d.ts +2 -0
  819. package/plugins/runtime-modules/blog/authoring-widgets.js +4 -0
  820. package/plugins/runtime-modules/blog/authoring.d.ts +1 -0
  821. package/plugins/runtime-modules/blog/authoring.js +8 -0
  822. package/plugins/runtime-modules/blog/definition.d.ts +35 -0
  823. package/plugins/runtime-modules/blog/definition.js +22 -0
  824. package/plugins/runtime-modules/blog/forms.d.ts +16 -0
  825. package/plugins/runtime-modules/blog/forms.js +11 -0
  826. package/plugins/runtime-modules/blog/ids.d.ts +25 -0
  827. package/plugins/runtime-modules/blog/ids.js +27 -0
  828. package/plugins/runtime-modules/blog/labels.d.ts +4 -0
  829. package/plugins/runtime-modules/blog/labels.js +27 -0
  830. package/plugins/runtime-modules/blog/module.d.ts +35 -0
  831. package/plugins/runtime-modules/blog/module.js +12 -0
  832. package/plugins/runtime-modules/blog/presets.d.ts +53 -0
  833. package/plugins/runtime-modules/blog/presets.js +24 -0
  834. package/plugins/runtime-modules/blog/server.d.ts +1 -0
  835. package/plugins/runtime-modules/blog/server.js +17 -0
  836. package/plugins/runtime-modules/builder/addresses.d.ts +1 -1
  837. package/plugins/runtime-modules/builder/area-settings-answer.d.ts +31 -0
  838. package/plugins/runtime-modules/builder/area-settings-answer.js +81 -0
  839. package/plugins/runtime-modules/builder/area-shell-presets.server.d.ts +21 -5
  840. package/plugins/runtime-modules/builder/area-shell-presets.server.js +102 -100
  841. package/plugins/runtime-modules/builder/authoring-provider-keys.d.ts +1 -20
  842. package/plugins/runtime-modules/builder/authoring-provider-keys.js +1 -1
  843. package/plugins/runtime-modules/builder/authoring-widgets.js +0 -2
  844. package/plugins/runtime-modules/builder/cards.d.ts +3 -0
  845. package/plugins/runtime-modules/builder/cards.js +79 -0
  846. package/plugins/runtime-modules/builder/clients/builder-region-overrides.js +4 -2
  847. package/plugins/runtime-modules/builder/clients/canvas-widget.js +19 -6
  848. package/plugins/runtime-modules/builder/clients/grid-placement-settings.d.ts +24 -0
  849. package/plugins/runtime-modules/builder/clients/grid-placement-settings.js +93 -0
  850. package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +46 -5
  851. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +325 -104
  852. package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +17 -0
  853. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +59 -0
  854. package/plugins/runtime-modules/builder/clients/inspector-link-target-field.d.ts +9 -23
  855. package/plugins/runtime-modules/builder/clients/inspector-link-target-field.js +13 -60
  856. package/plugins/runtime-modules/builder/clients/inspector-section-widget.d.ts +9 -3
  857. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +51 -110
  858. package/plugins/runtime-modules/builder/clients/inspector-surface-labels.d.ts +8 -0
  859. package/plugins/runtime-modules/builder/clients/inspector-surface-labels.js +24 -0
  860. package/plugins/runtime-modules/builder/clients/inspector-title.js +7 -8
  861. package/plugins/runtime-modules/builder/clients/layout-inspector.d.ts +18 -9
  862. package/plugins/runtime-modules/builder/clients/layout-inspector.js +71 -158
  863. package/plugins/runtime-modules/builder/clients/layout-scaffold-buttons.js +4 -4
  864. package/plugins/runtime-modules/builder/clients/layout-scaffold-overlays.js +2 -2
  865. package/plugins/runtime-modules/builder/clients/mode-switch.js +3 -5
  866. package/plugins/runtime-modules/builder/clients/pages-header.js +11 -63
  867. package/plugins/runtime-modules/builder/clients/pages-workspace.js +10 -1
  868. package/plugins/runtime-modules/builder/clients/region-inspector.d.ts +6 -2
  869. package/plugins/runtime-modules/builder/clients/region-inspector.js +12 -26
  870. package/plugins/runtime-modules/builder/clients/region-visibility-fields.d.ts +15 -0
  871. package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +135 -0
  872. package/plugins/runtime-modules/builder/clients/shells-workspace.js +3 -1
  873. package/plugins/runtime-modules/builder/clients/structure-canvas.d.ts +1 -3
  874. package/plugins/runtime-modules/builder/clients/structure-canvas.js +50 -41
  875. package/plugins/runtime-modules/builder/clients/widget-effects-editor.js +2 -2
  876. package/plugins/runtime-modules/builder/clients/widget-inspector.d.ts +15 -1
  877. package/plugins/runtime-modules/builder/clients/widget-inspector.js +69 -26
  878. package/plugins/runtime-modules/builder/cms-instance-allocator.d.ts +0 -1
  879. package/plugins/runtime-modules/builder/cms-instance-allocator.js +1 -1
  880. package/plugins/runtime-modules/builder/controller/client.d.ts +31 -14
  881. package/plugins/runtime-modules/builder/controller/client.js +9 -2
  882. package/plugins/runtime-modules/builder/controller/definition.d.ts +53 -14
  883. package/plugins/runtime-modules/builder/controller/definition.js +148 -37
  884. package/plugins/runtime-modules/builder/{draft-command-controller.d.ts → controller/draft-command-controller.d.ts} +12 -5
  885. package/plugins/runtime-modules/builder/{draft-command-controller.js → controller/draft-command-controller.js} +186 -232
  886. package/plugins/runtime-modules/builder/{draft-status-controller.d.ts → controller/draft-status-controller.d.ts} +9 -2
  887. package/plugins/runtime-modules/builder/{draft-status-controller.js → controller/draft-status-controller.js} +30 -12
  888. package/plugins/runtime-modules/builder/controller/inspector-controller.d.ts +3 -0
  889. package/plugins/runtime-modules/builder/controller/inspector-controller.js +207 -0
  890. package/plugins/runtime-modules/builder/controller/mount.d.ts +1 -1
  891. package/plugins/runtime-modules/builder/controller/mount.js +1 -1
  892. package/plugins/runtime-modules/builder/{page-controller-helpers.d.ts → controller/page-controller-helpers.d.ts} +2 -4
  893. package/plugins/runtime-modules/builder/{page-controller-helpers.js → controller/page-controller-helpers.js} +4 -4
  894. package/plugins/runtime-modules/builder/{page-controller.d.ts → controller/page-controller.d.ts} +6 -3
  895. package/plugins/runtime-modules/builder/{page-controller.js → controller/page-controller.js} +45 -134
  896. package/plugins/runtime-modules/builder/controller/preview-controller.d.ts +5 -0
  897. package/plugins/runtime-modules/builder/controller/preview-controller.js +68 -0
  898. package/plugins/runtime-modules/builder/{region-controller.d.ts → controller/region-controller.d.ts} +1 -2
  899. package/plugins/runtime-modules/builder/{region-controller.js → controller/region-controller.js} +18 -38
  900. package/plugins/runtime-modules/builder/controller/server-definition.d.ts +34 -14
  901. package/plugins/runtime-modules/builder/controller/server-definition.js +29 -3
  902. package/plugins/runtime-modules/builder/{signal-wiring-controller.d.ts → controller/signal-wiring-controller.d.ts} +2 -8
  903. package/plugins/runtime-modules/builder/{signal-wiring-controller.js → controller/signal-wiring-controller.js} +4 -12
  904. package/plugins/runtime-modules/builder/{workspace-controller.d.ts → controller/workspace-controller.d.ts} +15 -7
  905. package/plugins/runtime-modules/builder/{workspace-controller.js → controller/workspace-controller.js} +270 -725
  906. package/plugins/runtime-modules/builder/data-providers.d.ts +1 -1
  907. package/plugins/runtime-modules/builder/definition.d.ts +3 -3
  908. package/plugins/runtime-modules/builder/definition.js +2 -2
  909. package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +27 -26
  910. package/plugins/runtime-modules/builder/developer-workspace-store.js +59 -224
  911. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +30 -34
  912. package/plugins/runtime-modules/builder/edit-scaffold-drawer.js +6 -5
  913. package/plugins/runtime-modules/builder/effects-form-values.js +3 -2
  914. package/plugins/runtime-modules/builder/history.d.ts +59 -5
  915. package/plugins/runtime-modules/builder/ids.d.ts +9 -0
  916. package/plugins/runtime-modules/builder/ids.js +9 -0
  917. package/plugins/runtime-modules/builder/inspector-actions.d.ts +18 -13
  918. package/plugins/runtime-modules/builder/inspector-actions.js +9 -16
  919. package/plugins/runtime-modules/builder/inspector-overlay-addresses.d.ts +2 -3
  920. package/plugins/runtime-modules/builder/inspector-overlay-addresses.js +3 -8
  921. package/plugins/runtime-modules/builder/inspector-section-widget.js +15 -6
  922. package/plugins/runtime-modules/builder/module-authoring-catalog.d.ts +2 -0
  923. package/plugins/runtime-modules/builder/module-authoring-catalog.server.js +3 -0
  924. package/plugins/runtime-modules/builder/module-usage-client.js +5 -1
  925. package/plugins/runtime-modules/builder/navigation-catalog.server.js +4 -1
  926. package/plugins/runtime-modules/builder/navigation-folder-address.d.ts +0 -1
  927. package/plugins/runtime-modules/builder/navigation-folder-address.js +1 -1
  928. package/plugins/runtime-modules/builder/navigation-path-context.js +3 -5
  929. package/plugins/runtime-modules/builder/navigation-store.d.ts +2 -2
  930. package/plugins/runtime-modules/builder/navigation-store.js +3 -3
  931. package/plugins/runtime-modules/builder/node-config-write.d.ts +38 -0
  932. package/plugins/runtime-modules/builder/node-config-write.js +134 -0
  933. package/plugins/runtime-modules/builder/node-finders.d.ts +0 -1
  934. package/plugins/runtime-modules/builder/node-finders.js +1 -1
  935. package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +0 -13
  936. package/plugins/runtime-modules/builder/offered-page-catalog.js +2 -2
  937. package/plugins/runtime-modules/builder/options-providers.js +16 -9
  938. package/plugins/runtime-modules/builder/page-preset-catalog.server.js +2 -63
  939. package/plugins/runtime-modules/builder/page-presets.server.d.ts +8 -1
  940. package/plugins/runtime-modules/builder/page-presets.server.js +63 -76
  941. package/plugins/runtime-modules/builder/page-references-provider.js +1 -1
  942. package/plugins/runtime-modules/builder/page-tree-walk.d.ts +3 -0
  943. package/plugins/runtime-modules/builder/page-tree-walk.js +4 -0
  944. package/plugins/runtime-modules/builder/persistence.d.ts +26 -11
  945. package/plugins/runtime-modules/builder/persistence.js +38 -78
  946. package/plugins/runtime-modules/builder/plugin-meta-labels.js +2 -0
  947. package/plugins/runtime-modules/builder/plugin-meta-labels.server.d.ts +15 -0
  948. package/plugins/runtime-modules/builder/plugin-meta-labels.server.js +58 -30
  949. package/plugins/runtime-modules/builder/plugin-metas.d.ts +7 -0
  950. package/plugins/runtime-modules/builder/plugin-metas.js +27 -9
  951. package/plugins/runtime-modules/builder/presets.d.ts +0 -132
  952. package/plugins/runtime-modules/builder/presets.js +0 -1
  953. package/plugins/runtime-modules/builder/preview-transport.d.ts +9 -26
  954. package/plugins/runtime-modules/builder/preview-transport.js +2 -2
  955. package/plugins/runtime-modules/builder/public-route-collisions.d.ts +0 -33
  956. package/plugins/runtime-modules/builder/public-route-collisions.js +4 -4
  957. package/plugins/runtime-modules/builder/region-defaults.js +18 -46
  958. package/plugins/runtime-modules/builder/region-hydration.d.ts +5 -9
  959. package/plugins/runtime-modules/builder/region-hydration.js +37 -106
  960. package/plugins/runtime-modules/builder/region-keys.d.ts +0 -1
  961. package/plugins/runtime-modules/builder/region-keys.js +1 -4
  962. package/plugins/runtime-modules/builder/region-root-node.d.ts +22 -0
  963. package/plugins/runtime-modules/builder/region-root-node.js +25 -0
  964. package/plugins/runtime-modules/builder/render-root-node-preview.server.d.ts +2 -20
  965. package/plugins/runtime-modules/builder/render-root-node-preview.server.js +10 -27
  966. package/plugins/runtime-modules/builder/render-root-node-scaffold.d.ts +13 -4
  967. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +27 -130
  968. package/plugins/runtime-modules/builder/root-node-normalization.d.ts +31 -23
  969. package/plugins/runtime-modules/builder/root-node-normalization.js +72 -69
  970. package/plugins/runtime-modules/builder/root-node-renderable-tree.d.ts +1 -3
  971. package/plugins/runtime-modules/builder/root-node-renderable-tree.js +11 -53
  972. package/plugins/runtime-modules/builder/runtime-module-selection.d.ts +3 -12
  973. package/plugins/runtime-modules/builder/runtime-module-selection.js +25 -4
  974. package/plugins/runtime-modules/builder/selected-collection-source.d.ts +0 -8
  975. package/plugins/runtime-modules/builder/selected-collection-source.js +5 -6
  976. package/plugins/runtime-modules/builder/sequential-slot-helpers.d.ts +0 -3
  977. package/plugins/runtime-modules/builder/sequential-slot-helpers.js +1 -1
  978. package/plugins/runtime-modules/builder/server.js +5 -0
  979. package/plugins/runtime-modules/builder/services/navigation-table.js +31 -13
  980. package/plugins/runtime-modules/builder/services/page-source-tree.js +20 -7
  981. package/plugins/runtime-modules/builder/services/runtime-modules-table.d.ts +19 -0
  982. package/plugins/runtime-modules/builder/services/runtime-modules-table.js +84 -12
  983. package/plugins/runtime-modules/builder/signal-endpoints.js +11 -31
  984. package/plugins/runtime-modules/builder/signal-route-selection.js +4 -7
  985. package/plugins/runtime-modules/builder/signal-wiring-options.js +5 -4
  986. package/plugins/runtime-modules/builder/structure-region-pick-items.js +3 -2
  987. package/plugins/runtime-modules/builder/trees/builder-navigation-label-set.js +3 -2
  988. package/plugins/runtime-modules/builder/trees/builder-settings-label-set.js +3 -2
  989. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +86 -35
  990. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.d.ts +11 -5
  991. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +196 -107
  992. package/plugins/runtime-modules/builder/trees/phi-default-builder-settings-page-tree.js +7 -4
  993. package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +32 -52
  994. package/plugins/runtime-modules/builder/widgets/chrome/config.js +4 -6
  995. package/plugins/runtime-modules/builder/widgets/hello-world/config.d.ts +2 -1
  996. package/plugins/runtime-modules/builder/widgets/hello-world/config.js +4 -3
  997. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +279 -638
  998. package/plugins/runtime-modules/builder/widgets/structure-region/config.js +3 -10
  999. package/plugins/runtime-modules/builder/widgets/structure-region/plugin.js +4 -3
  1000. package/plugins/runtime-modules/builder/widgets/structure-region/tree-operations.d.ts +43 -0
  1001. package/plugins/runtime-modules/builder/widgets/structure-region/tree-operations.js +114 -0
  1002. package/plugins/runtime-modules/builder/widgets/test-block/config.d.ts +2 -1
  1003. package/plugins/runtime-modules/builder/widgets/test-block/config.js +4 -3
  1004. package/plugins/runtime-modules/builder/widgets/workspaces/config.d.ts +1 -1
  1005. package/plugins/runtime-modules/builder/widgets.js +0 -8
  1006. package/plugins/runtime-modules/client-area-contributions/accounting.d.ts +1 -1
  1007. package/plugins/runtime-modules/client-area-contributions/accounting.js +0 -2
  1008. package/plugins/runtime-modules/client-area-contributions/admin.js +0 -8
  1009. package/plugins/runtime-modules/client-area-contributions/app.d.ts +1 -1
  1010. package/plugins/runtime-modules/client-area-contributions/app.js +0 -8
  1011. package/plugins/runtime-modules/client-area-contributions/builder.d.ts +1 -1
  1012. package/plugins/runtime-modules/client-area-contributions/builder.js +0 -2
  1013. package/plugins/runtime-modules/client-area-contributions/common.d.ts +1 -1
  1014. package/plugins/runtime-modules/client-area-contributions/common.js +12 -0
  1015. package/plugins/runtime-modules/client-area-contributions/editor.js +0 -8
  1016. package/plugins/runtime-modules/client-area-contributions/public.d.ts +1 -1
  1017. package/plugins/runtime-modules/client-authoring-module.js +6 -0
  1018. package/plugins/runtime-modules/client-authoring-providers/accounting.d.ts +1 -1
  1019. package/plugins/runtime-modules/client-authoring-providers/admin.d.ts +1 -1
  1020. package/plugins/runtime-modules/client-authoring-providers/app.d.ts +1 -1
  1021. package/plugins/runtime-modules/client-authoring-providers/app.js +0 -6
  1022. package/plugins/runtime-modules/client-authoring-providers/builder.d.ts +1 -1
  1023. package/plugins/runtime-modules/client-authoring-providers/common.d.ts +1 -1
  1024. package/plugins/runtime-modules/client-authoring-providers/common.js +12 -0
  1025. package/plugins/runtime-modules/client-authoring-providers/editor.d.ts +1 -1
  1026. package/plugins/runtime-modules/client-authoring-providers/editor.js +9 -3
  1027. package/plugins/runtime-modules/client-authoring-providers/public.d.ts +1 -1
  1028. package/plugins/runtime-modules/client-authoring-providers/public.js +10 -4
  1029. package/plugins/runtime-modules/client-authoring-widget-module.js +6 -0
  1030. package/plugins/runtime-modules/client-manifests/app.js +0 -5
  1031. package/plugins/runtime-modules/client-manifests/builder.js +0 -4
  1032. package/plugins/runtime-modules/client-manifests/common-data-providers.js +3 -0
  1033. package/plugins/runtime-modules/client-manifests/common.d.ts +1 -0
  1034. package/plugins/runtime-modules/client-manifests/common.js +35 -3
  1035. package/plugins/runtime-modules/client-manifests/editor.js +2 -2
  1036. package/plugins/runtime-modules/client-manifests/public.js +0 -2
  1037. package/plugins/runtime-modules/content-entry-routes.d.ts +105 -0
  1038. package/plugins/runtime-modules/content-entry-routes.js +112 -0
  1039. package/plugins/runtime-modules/contracts.d.ts +2 -4
  1040. package/plugins/runtime-modules/contracts.js +39 -2
  1041. package/plugins/runtime-modules/core/authoring-widgets.js +19 -3
  1042. package/plugins/runtime-modules/core/cards.js +3 -9
  1043. package/plugins/runtime-modules/core/client-data-providers.d.ts +14 -2
  1044. package/plugins/runtime-modules/core/client-data-providers.js +31 -0
  1045. package/plugins/runtime-modules/core/content-entries/categories-table.d.ts +10 -0
  1046. package/plugins/runtime-modules/core/content-entries/categories-table.js +77 -0
  1047. package/plugins/runtime-modules/core/content-entries/curation-options.d.ts +8 -0
  1048. package/plugins/runtime-modules/core/content-entries/curation-options.js +71 -0
  1049. package/plugins/runtime-modules/core/content-entries/record-source.server.d.ts +22 -0
  1050. package/plugins/runtime-modules/core/content-entries/record-source.server.js +19 -0
  1051. package/plugins/runtime-modules/core/content-entries/record.server.d.ts +10 -0
  1052. package/plugins/runtime-modules/core/content-entries/record.server.js +18 -0
  1053. package/plugins/runtime-modules/{news/services → core/content-entries}/table.d.ts +3 -2
  1054. package/plugins/runtime-modules/core/content-entries/table.js +164 -0
  1055. package/plugins/runtime-modules/core/content-entries/tags.d.ts +14 -0
  1056. package/plugins/runtime-modules/core/content-entries/tags.js +40 -0
  1057. package/plugins/runtime-modules/core/data-providers.d.ts +289 -0
  1058. package/plugins/runtime-modules/core/data-providers.js +199 -0
  1059. package/plugins/runtime-modules/core/definition.d.ts +328 -1
  1060. package/plugins/runtime-modules/core/definition.js +2 -2
  1061. package/plugins/runtime-modules/core/form-providers.d.ts +38 -0
  1062. package/plugins/runtime-modules/core/form-providers.js +3 -0
  1063. package/plugins/runtime-modules/core/ids.d.ts +9 -0
  1064. package/plugins/runtime-modules/core/ids.js +9 -0
  1065. package/plugins/runtime-modules/core/messaging/data-providers.d.ts +106 -0
  1066. package/plugins/runtime-modules/core/messaging/data-providers.js +119 -0
  1067. package/plugins/runtime-modules/core/messaging/forms.d.ts +16 -0
  1068. package/plugins/runtime-modules/core/messaging/forms.js +145 -0
  1069. package/plugins/runtime-modules/core/messaging/labels.d.ts +49 -0
  1070. package/plugins/runtime-modules/core/messaging/labels.js +149 -0
  1071. package/plugins/runtime-modules/{threads/services/table.js → core/messaging/thread-inbox-table.js} +22 -22
  1072. package/plugins/runtime-modules/core/server.js +12 -0
  1073. package/plugins/runtime-modules/core/widgets/account/client.js +6 -4
  1074. package/plugins/runtime-modules/core/widgets/account/config.d.ts +3 -1
  1075. package/plugins/runtime-modules/core/widgets/account/config.js +2 -1
  1076. package/plugins/runtime-modules/core/widgets/brand/client.d.ts +3 -1
  1077. package/plugins/runtime-modules/core/widgets/brand/client.js +9 -2
  1078. package/plugins/runtime-modules/core/widgets/brand/config.d.ts +2 -1
  1079. package/plugins/runtime-modules/core/widgets/brand/config.js +1 -1
  1080. package/plugins/runtime-modules/core/widgets/brand/plugin.js +2 -2
  1081. package/plugins/runtime-modules/core/widgets/brand/server.d.ts +2 -2
  1082. package/plugins/runtime-modules/core/widgets/brand/server.js +2 -1
  1083. package/plugins/runtime-modules/core/widgets/breadcrumb/client.js +4 -4
  1084. package/plugins/runtime-modules/core/widgets/breadcrumb/config.d.ts +3 -1
  1085. package/plugins/runtime-modules/core/widgets/breadcrumb/config.js +2 -1
  1086. package/plugins/runtime-modules/core/widgets/button/client.js +7 -5
  1087. package/plugins/runtime-modules/core/widgets/button/config.d.ts +73 -36
  1088. package/plugins/runtime-modules/core/widgets/button/config.js +40 -29
  1089. package/plugins/runtime-modules/core/widgets/card/authoring.js +3 -3
  1090. package/plugins/runtime-modules/core/widgets/card/collection-view-binding.js +58 -15
  1091. package/plugins/runtime-modules/core/widgets/card/config.d.ts +336 -32
  1092. package/plugins/runtime-modules/core/widgets/card/config.js +176 -45
  1093. package/plugins/runtime-modules/core/widgets/card/editor.d.ts +6 -2
  1094. package/plugins/runtime-modules/core/widgets/card/editor.js +133 -25
  1095. package/plugins/runtime-modules/core/widgets/card/plugin.js +13 -6
  1096. package/plugins/runtime-modules/core/widgets/card/server.d.ts +10 -3
  1097. package/plugins/runtime-modules/core/widgets/card/server.js +71 -32
  1098. package/plugins/runtime-modules/core/widgets/cascader/authoring.d.ts +9 -4
  1099. package/plugins/runtime-modules/core/widgets/cascader/config.d.ts +3 -2
  1100. package/plugins/runtime-modules/core/widgets/cascader/config.js +1 -1
  1101. package/plugins/runtime-modules/core/widgets/checkbox-group/config.d.ts +3 -2
  1102. package/plugins/runtime-modules/core/widgets/checkbox-group/config.js +1 -1
  1103. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +20 -2
  1104. package/plugins/runtime-modules/core/widgets/collection-view/config.d.ts +2 -4
  1105. package/plugins/runtime-modules/core/widgets/collection-view/config.js +8 -14
  1106. package/plugins/runtime-modules/core/widgets/color/client.js +1 -1
  1107. package/plugins/runtime-modules/core/widgets/color/config.d.ts +8 -2
  1108. package/plugins/runtime-modules/core/widgets/color/config.js +18 -2
  1109. package/plugins/runtime-modules/core/widgets/color/plugin.js +4 -3
  1110. package/plugins/runtime-modules/core/widgets/command-toolbar/authoring.js +5 -4
  1111. package/plugins/runtime-modules/core/widgets/command-toolbar/client.js +11 -237
  1112. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +17 -26
  1113. package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +32 -116
  1114. package/plugins/runtime-modules/core/widgets/command-toolbar/plugin.js +4 -3
  1115. package/plugins/runtime-modules/core/widgets/date-input/authoring.d.ts +3 -0
  1116. package/plugins/runtime-modules/core/widgets/date-input/authoring.js +8 -0
  1117. package/plugins/runtime-modules/core/widgets/date-input/client.d.ts +6 -0
  1118. package/plugins/runtime-modules/core/widgets/{date-picker → date-input}/client.js +5 -10
  1119. package/plugins/runtime-modules/core/widgets/{date-picker → date-input}/config.d.ts +6 -4
  1120. package/plugins/runtime-modules/core/widgets/{date-picker → date-input}/config.js +11 -16
  1121. package/plugins/runtime-modules/core/widgets/date-input/plugin.d.ts +3 -0
  1122. package/plugins/runtime-modules/core/widgets/date-input/plugin.js +9 -0
  1123. package/plugins/runtime-modules/core/widgets/date-input/selection.d.ts +8 -0
  1124. package/plugins/runtime-modules/core/widgets/date-input/selection.js +13 -0
  1125. package/plugins/runtime-modules/core/widgets/description/client.d.ts +3 -1
  1126. package/plugins/runtime-modules/core/widgets/description/client.js +5 -21
  1127. package/plugins/runtime-modules/core/widgets/description/config.d.ts +323 -12
  1128. package/plugins/runtime-modules/core/widgets/description/config.js +12 -6
  1129. package/plugins/runtime-modules/core/widgets/description/editor.js +44 -29
  1130. package/plugins/runtime-modules/core/widgets/description/plugin.js +1 -1
  1131. package/plugins/runtime-modules/core/widgets/description/server.d.ts +2 -1
  1132. package/plugins/runtime-modules/core/widgets/description/server.js +14 -31
  1133. package/plugins/runtime-modules/core/widgets/dimension/config.d.ts +1 -1
  1134. package/plugins/runtime-modules/core/widgets/draft-status/client.js +1 -1
  1135. package/plugins/runtime-modules/core/widgets/draft-status/config.d.ts +2 -1
  1136. package/plugins/runtime-modules/core/widgets/draft-status/config.js +1 -1
  1137. package/plugins/runtime-modules/core/widgets/entry-detail/authoring.d.ts +6 -0
  1138. package/plugins/runtime-modules/core/widgets/entry-detail/authoring.js +14 -0
  1139. package/plugins/runtime-modules/core/widgets/entry-detail/client.d.ts +9 -0
  1140. package/plugins/runtime-modules/core/widgets/entry-detail/client.js +7 -0
  1141. package/plugins/runtime-modules/core/widgets/entry-detail/config.d.ts +62 -0
  1142. package/plugins/runtime-modules/core/widgets/entry-detail/config.js +35 -0
  1143. package/plugins/runtime-modules/core/widgets/entry-detail/plugin.d.ts +3 -0
  1144. package/plugins/runtime-modules/core/widgets/entry-detail/plugin.js +8 -0
  1145. package/plugins/runtime-modules/core/widgets/entry-detail/server.d.ts +18 -0
  1146. package/plugins/runtime-modules/core/widgets/entry-detail/server.js +42 -0
  1147. package/plugins/runtime-modules/core/widgets/entry-header/authoring.d.ts +6 -0
  1148. package/plugins/runtime-modules/core/widgets/entry-header/authoring.js +14 -0
  1149. package/plugins/runtime-modules/core/widgets/entry-header/client.d.ts +12 -0
  1150. package/plugins/runtime-modules/core/widgets/entry-header/client.js +10 -0
  1151. package/plugins/runtime-modules/core/widgets/entry-header/config.d.ts +77 -0
  1152. package/plugins/runtime-modules/core/widgets/entry-header/config.js +52 -0
  1153. package/plugins/runtime-modules/core/widgets/entry-header/plugin.d.ts +3 -0
  1154. package/plugins/runtime-modules/core/widgets/entry-header/plugin.js +8 -0
  1155. package/plugins/runtime-modules/core/widgets/entry-header/server.d.ts +15 -0
  1156. package/plugins/runtime-modules/core/widgets/entry-header/server.js +40 -0
  1157. package/plugins/runtime-modules/core/widgets/entry-list/authoring.d.ts +2 -0
  1158. package/plugins/runtime-modules/{news/widgets/news-list → core/widgets/entry-list}/authoring.js +5 -5
  1159. package/plugins/runtime-modules/core/widgets/entry-list/client.d.ts +95 -0
  1160. package/plugins/runtime-modules/core/widgets/entry-list/client.js +130 -0
  1161. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +201 -0
  1162. package/plugins/runtime-modules/core/widgets/entry-list/config.js +153 -0
  1163. package/plugins/runtime-modules/core/widgets/entry-list/plugin.d.ts +3 -0
  1164. package/plugins/runtime-modules/core/widgets/entry-list/plugin.js +11 -0
  1165. package/plugins/runtime-modules/core/widgets/entry-list/server.d.ts +27 -0
  1166. package/plugins/runtime-modules/core/widgets/entry-list/server.js +85 -0
  1167. package/plugins/runtime-modules/core/widgets/entry-list/view.server.d.ts +33 -0
  1168. package/plugins/runtime-modules/core/widgets/entry-list/view.server.js +104 -0
  1169. package/plugins/runtime-modules/core/widgets/float-button/authoring.d.ts +3 -0
  1170. package/plugins/runtime-modules/core/widgets/float-button/authoring.js +16 -0
  1171. package/plugins/runtime-modules/core/widgets/float-button/client.d.ts +12 -0
  1172. package/plugins/runtime-modules/core/widgets/float-button/client.js +24 -0
  1173. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +97 -0
  1174. package/plugins/runtime-modules/core/widgets/float-button/config.js +129 -0
  1175. package/plugins/runtime-modules/core/widgets/float-button/plugin.d.ts +3 -0
  1176. package/plugins/runtime-modules/core/widgets/float-button/plugin.js +29 -0
  1177. package/plugins/runtime-modules/core/widgets/form/config.d.ts +1 -1
  1178. package/plugins/runtime-modules/core/widgets/form/config.js +18 -1
  1179. package/plugins/runtime-modules/core/widgets/form-preview/client.js +2 -1
  1180. package/plugins/runtime-modules/core/widgets/form-preview/config.d.ts +2 -1
  1181. package/plugins/runtime-modules/core/widgets/form-preview/config.js +1 -1
  1182. package/plugins/runtime-modules/core/widgets/gallery/authoring.js +16 -3
  1183. package/plugins/runtime-modules/core/widgets/gallery/client.d.ts +5 -14
  1184. package/plugins/runtime-modules/core/widgets/gallery/client.js +77 -57
  1185. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +89 -12
  1186. package/plugins/runtime-modules/core/widgets/gallery/config.js +28 -20
  1187. package/plugins/runtime-modules/core/widgets/gallery/plugin.js +2 -3
  1188. package/plugins/runtime-modules/core/widgets/gallery/server.d.ts +17 -0
  1189. package/plugins/runtime-modules/core/widgets/gallery/server.js +42 -0
  1190. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +3 -3
  1191. package/plugins/runtime-modules/core/widgets/header-navigation/config.d.ts +2 -1
  1192. package/plugins/runtime-modules/core/widgets/header-navigation/config.js +1 -1
  1193. package/plugins/runtime-modules/core/widgets/html/config.d.ts +3 -1
  1194. package/plugins/runtime-modules/core/widgets/html/config.js +2 -1
  1195. package/plugins/runtime-modules/core/widgets/icon/config.d.ts +2 -1
  1196. package/plugins/runtime-modules/core/widgets/icon/config.js +1 -1
  1197. package/plugins/runtime-modules/core/widgets/image/client.js +8 -40
  1198. package/plugins/runtime-modules/core/widgets/image/config.d.ts +3 -1
  1199. package/plugins/runtime-modules/core/widgets/image/config.js +7 -18
  1200. package/plugins/runtime-modules/core/widgets/image/editor.js +9 -27
  1201. package/plugins/runtime-modules/core/widgets/input/client.js +24 -7
  1202. package/plugins/runtime-modules/core/widgets/input/config.d.ts +2 -1
  1203. package/plugins/runtime-modules/core/widgets/input/config.js +1 -1
  1204. package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
  1205. package/plugins/runtime-modules/core/widgets/locale/config.d.ts +1 -0
  1206. package/plugins/runtime-modules/core/widgets/locale/config.js +1 -0
  1207. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +13 -48
  1208. package/plugins/runtime-modules/core/widgets/markdown/config.js +25 -12
  1209. package/plugins/runtime-modules/core/widgets/markdown-toc/client.js +2 -2
  1210. package/plugins/runtime-modules/core/widgets/markdown-toc/config.d.ts +2 -1
  1211. package/plugins/runtime-modules/core/widgets/markdown-toc/config.js +1 -1
  1212. package/plugins/runtime-modules/core/widgets/multi-select/config.d.ts +3 -3
  1213. package/plugins/runtime-modules/core/widgets/multi-select/config.js +1 -3
  1214. package/plugins/runtime-modules/core/widgets/number-input/config.d.ts +1 -1
  1215. package/plugins/runtime-modules/core/widgets/otp/config.d.ts +2 -1
  1216. package/plugins/runtime-modules/core/widgets/otp/config.js +1 -1
  1217. package/plugins/runtime-modules/core/widgets/page-title/server.d.ts +0 -1
  1218. package/plugins/runtime-modules/core/widgets/page-title/server.js +1 -1
  1219. package/plugins/runtime-modules/core/widgets/pagination/client.js +2 -1
  1220. package/plugins/runtime-modules/core/widgets/pagination/config.d.ts +2 -1
  1221. package/plugins/runtime-modules/core/widgets/pagination/config.js +1 -1
  1222. package/plugins/runtime-modules/core/widgets/quick-links/client.js +9 -6
  1223. package/plugins/runtime-modules/core/widgets/quick-links/config.d.ts +2 -1
  1224. package/plugins/runtime-modules/core/widgets/quick-links/config.js +1 -1
  1225. package/plugins/runtime-modules/core/widgets/rate/config.d.ts +3 -1
  1226. package/plugins/runtime-modules/core/widgets/rate/config.js +2 -1
  1227. package/plugins/runtime-modules/core/widgets/record/authoring.d.ts +1 -2
  1228. package/plugins/runtime-modules/core/widgets/record/authoring.js +17 -5
  1229. package/plugins/runtime-modules/core/widgets/record/client.js +9 -8
  1230. package/plugins/runtime-modules/core/widgets/record/config.d.ts +2 -1
  1231. package/plugins/runtime-modules/core/widgets/record/config.js +3 -2
  1232. package/plugins/runtime-modules/core/widgets/result/config.d.ts +92 -21
  1233. package/plugins/runtime-modules/core/widgets/result/config.js +1 -1
  1234. package/plugins/runtime-modules/core/widgets/segmented/authoring.d.ts +3 -1
  1235. package/plugins/runtime-modules/core/widgets/segmented/authoring.js +24 -2
  1236. package/plugins/runtime-modules/core/widgets/segmented/client.d.ts +4 -1
  1237. package/plugins/runtime-modules/core/widgets/segmented/client.js +5 -1
  1238. package/plugins/runtime-modules/core/widgets/segmented/config.d.ts +3 -2
  1239. package/plugins/runtime-modules/core/widgets/segmented/config.js +3 -3
  1240. package/plugins/runtime-modules/core/widgets/select-box/config.d.ts +3 -2
  1241. package/plugins/runtime-modules/core/widgets/select-box/config.js +1 -1
  1242. package/plugins/runtime-modules/core/widgets/sidebar-navigation/client.js +5 -5
  1243. package/plugins/runtime-modules/core/widgets/sidebar-navigation/config.d.ts +2 -1
  1244. package/plugins/runtime-modules/core/widgets/sidebar-navigation/config.js +1 -1
  1245. package/plugins/runtime-modules/core/widgets/simple-text/client.js +2 -1
  1246. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +92 -21
  1247. package/plugins/runtime-modules/core/widgets/simple-text/config.js +1 -1
  1248. package/plugins/runtime-modules/core/widgets/simple-text/editor.js +1 -2
  1249. package/plugins/runtime-modules/core/widgets/slider/config.d.ts +2 -1
  1250. package/plugins/runtime-modules/core/widgets/slider/config.js +1 -1
  1251. package/plugins/runtime-modules/core/widgets/slot-upload/client.js +46 -20
  1252. package/plugins/runtime-modules/core/widgets/slot-upload/config.d.ts +2 -14
  1253. package/plugins/runtime-modules/core/widgets/slot-upload/config.js +3 -3
  1254. package/plugins/runtime-modules/core/widgets/steps/authoring.d.ts +3 -0
  1255. package/plugins/runtime-modules/core/widgets/steps/authoring.js +28 -0
  1256. package/plugins/runtime-modules/core/widgets/steps/client.d.ts +9 -0
  1257. package/plugins/runtime-modules/core/widgets/steps/client.js +32 -0
  1258. package/plugins/runtime-modules/core/widgets/steps/config.d.ts +156 -0
  1259. package/plugins/runtime-modules/core/widgets/steps/config.js +69 -0
  1260. package/plugins/runtime-modules/core/widgets/steps/plugin.d.ts +3 -0
  1261. package/plugins/runtime-modules/core/widgets/steps/plugin.js +38 -0
  1262. package/plugins/runtime-modules/core/widgets/switch/config.d.ts +1 -1
  1263. package/plugins/runtime-modules/core/widgets/switch/config.js +1 -1
  1264. package/plugins/runtime-modules/core/widgets/table/client.js +153 -80
  1265. package/plugins/runtime-modules/core/widgets/table/config.d.ts +248 -22
  1266. package/plugins/runtime-modules/core/widgets/table/config.js +54 -6
  1267. package/plugins/runtime-modules/core/widgets/theme-mode-switch/authoring.js +3 -2
  1268. package/plugins/runtime-modules/core/widgets/theme-mode-switch/client.d.ts +9 -5
  1269. package/plugins/runtime-modules/core/widgets/theme-mode-switch/client.js +15 -10
  1270. package/plugins/runtime-modules/core/widgets/theme-mode-switch/config.d.ts +6 -10
  1271. package/plugins/runtime-modules/core/widgets/theme-mode-switch/config.js +3 -5
  1272. package/plugins/runtime-modules/core/widgets/theme-mode-switch/plugin.js +3 -13
  1273. package/plugins/runtime-modules/core/widgets/theme-mode-switch/server.d.ts +9 -0
  1274. package/plugins/runtime-modules/core/widgets/theme-mode-switch/server.js +23 -0
  1275. package/plugins/runtime-modules/{threads → core}/widgets/thread-conversation/client.d.ts +1 -1
  1276. package/plugins/runtime-modules/{threads → core}/widgets/thread-conversation/client.js +104 -16
  1277. package/plugins/runtime-modules/{threads → core}/widgets/thread-conversation/config.d.ts +13 -4
  1278. package/plugins/runtime-modules/{threads → core}/widgets/thread-conversation/config.js +8 -2
  1279. package/plugins/runtime-modules/{threads → core}/widgets/thread-conversation/server.js +1 -1
  1280. package/plugins/runtime-modules/{threads → core}/widgets/thread-widget-config.d.ts +7 -0
  1281. package/plugins/runtime-modules/{threads → core}/widgets/thread-widget-config.js +4 -4
  1282. package/plugins/runtime-modules/core/widgets/timeline/authoring.d.ts +3 -0
  1283. package/plugins/runtime-modules/core/widgets/timeline/authoring.js +11 -0
  1284. package/plugins/runtime-modules/core/widgets/timeline/client.d.ts +10 -0
  1285. package/plugins/runtime-modules/core/widgets/timeline/client.js +75 -0
  1286. package/plugins/runtime-modules/core/widgets/timeline/config.d.ts +116 -0
  1287. package/plugins/runtime-modules/core/widgets/timeline/config.js +102 -0
  1288. package/plugins/runtime-modules/core/widgets/timeline/plugin.d.ts +3 -0
  1289. package/plugins/runtime-modules/core/widgets/timeline/plugin.js +45 -0
  1290. package/plugins/runtime-modules/core/widgets/tour-button/authoring.d.ts +3 -0
  1291. package/plugins/runtime-modules/core/widgets/tour-button/authoring.js +10 -0
  1292. package/plugins/runtime-modules/core/widgets/tour-button/client.d.ts +13 -0
  1293. package/plugins/runtime-modules/core/widgets/tour-button/client.js +36 -0
  1294. package/plugins/runtime-modules/core/widgets/tour-button/config.d.ts +39 -0
  1295. package/plugins/runtime-modules/core/widgets/tour-button/config.js +28 -0
  1296. package/plugins/runtime-modules/core/widgets/tour-button/plugin.d.ts +3 -0
  1297. package/plugins/runtime-modules/core/widgets/tour-button/plugin.js +8 -0
  1298. package/plugins/runtime-modules/core/widgets/tour-button/server.d.ts +8 -0
  1299. package/plugins/runtime-modules/core/widgets/tour-button/server.js +14 -0
  1300. package/plugins/runtime-modules/core/widgets/tree/client.js +41 -45
  1301. package/plugins/runtime-modules/core/widgets/tree/config.js +1 -1
  1302. package/plugins/runtime-modules/core/widgets.js +72 -6
  1303. package/plugins/runtime-modules/dashboard/authoring-client.d.ts +0 -1
  1304. package/plugins/runtime-modules/dashboard/authoring-client.js +1 -1
  1305. package/plugins/runtime-modules/dashboard/clients/dashboard-card-view.js +55 -17
  1306. package/plugins/runtime-modules/dashboard/definition.d.ts +1 -4
  1307. package/plugins/runtime-modules/dashboard/definition.js +2 -8
  1308. package/plugins/runtime-modules/dashboard/ids.d.ts +9 -0
  1309. package/plugins/runtime-modules/dashboard/ids.js +9 -0
  1310. package/plugins/runtime-modules/dashboard/module.d.ts +39 -1
  1311. package/plugins/runtime-modules/dashboard/module.js +8 -3
  1312. package/plugins/runtime-modules/dashboard/services/collection.js +2 -2
  1313. package/plugins/runtime-modules/dashboard/trees/admin-dashboard-label-set.js +3 -2
  1314. package/plugins/runtime-modules/dashboard/trees/area-dashboard-label-set.d.ts +2 -0
  1315. package/plugins/runtime-modules/dashboard/trees/area-dashboard-label-set.js +7 -2
  1316. package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.d.ts +37 -0
  1317. package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.js +69 -0
  1318. package/plugins/runtime-modules/dashboard/trees/phi-default-admin-dashboard-page-tree.js +6 -52
  1319. package/plugins/runtime-modules/dashboard/trees/phi-default-area-dashboard-page-tree.js +7 -46
  1320. package/plugins/runtime-modules/dashboard/trees/phi-default-builder-dashboard-page-tree.js +21 -17
  1321. package/plugins/runtime-modules/descriptor-compiler.d.ts +3 -13
  1322. package/plugins/runtime-modules/descriptor-compiler.js +162 -71
  1323. package/plugins/runtime-modules/editor/client-data-providers.d.ts +5 -0
  1324. package/plugins/runtime-modules/editor/client-data-providers.js +9 -0
  1325. package/plugins/runtime-modules/editor/data-providers.d.ts +83 -0
  1326. package/plugins/runtime-modules/editor/data-providers.js +75 -0
  1327. package/plugins/runtime-modules/editor/definition.d.ts +76 -5
  1328. package/plugins/runtime-modules/editor/definition.js +4 -8
  1329. package/plugins/runtime-modules/editor/ids.d.ts +19 -0
  1330. package/plugins/runtime-modules/editor/ids.js +26 -0
  1331. package/plugins/runtime-modules/editor/module.d.ts +89 -1
  1332. package/plugins/runtime-modules/editor/module.js +8 -3
  1333. package/plugins/runtime-modules/editor/presets.d.ts +39 -1
  1334. package/plugins/runtime-modules/editor/presets.js +26 -3
  1335. package/plugins/runtime-modules/editor/services/releases-table.d.ts +10 -0
  1336. package/plugins/runtime-modules/editor/services/releases-table.js +182 -0
  1337. package/plugins/runtime-modules/editor/tour.d.ts +29 -0
  1338. package/plugins/runtime-modules/editor/tour.js +34 -0
  1339. package/plugins/runtime-modules/editor/trees/editor-releases-label-set.d.ts +35 -0
  1340. package/plugins/runtime-modules/editor/trees/editor-releases-label-set.js +54 -0
  1341. package/plugins/runtime-modules/editor/trees/phi-default-editor-area-preset-tree.js +12 -180
  1342. package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.d.ts +13 -0
  1343. package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +134 -0
  1344. package/plugins/runtime-modules/form-builder/client.js +1 -1
  1345. package/{components/forms/form-builder-controller-plugin.d.ts → plugins/runtime-modules/form-builder/controller/client.d.ts} +2 -2
  1346. package/{components/forms/form-builder-controller-plugin.js → plugins/runtime-modules/form-builder/controller/client.js} +2 -2
  1347. package/plugins/runtime-modules/groups/addresses.d.ts +3 -0
  1348. package/plugins/runtime-modules/groups/addresses.js +11 -0
  1349. package/plugins/runtime-modules/groups/controller/client.d.ts +5 -0
  1350. package/plugins/runtime-modules/groups/controller/client.js +43 -30
  1351. package/plugins/runtime-modules/groups/controller/definition.d.ts +5 -0
  1352. package/plugins/runtime-modules/groups/controller/definition.js +10 -0
  1353. package/plugins/runtime-modules/groups/data-providers.d.ts +2 -2
  1354. package/plugins/runtime-modules/groups/data-providers.js +3 -3
  1355. package/plugins/runtime-modules/groups/definition.d.ts +3 -3
  1356. package/plugins/runtime-modules/groups/definition.js +2 -2
  1357. package/plugins/runtime-modules/groups/forms.d.ts +1 -6
  1358. package/plugins/runtime-modules/groups/forms.js +65 -30
  1359. package/plugins/runtime-modules/groups/ids.d.ts +9 -0
  1360. package/plugins/runtime-modules/groups/ids.js +9 -0
  1361. package/plugins/runtime-modules/groups/labels.d.ts +5 -0
  1362. package/plugins/runtime-modules/groups/labels.js +15 -3
  1363. package/plugins/runtime-modules/groups/presets.js +2 -2
  1364. package/plugins/runtime-modules/groups/services/options.js +4 -3
  1365. package/plugins/runtime-modules/groups/services/table.js +32 -36
  1366. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.d.ts +5 -1
  1367. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +259 -146
  1368. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +3 -4
  1369. package/plugins/runtime-modules/localization/cards.js +11 -7
  1370. package/plugins/runtime-modules/localization/controller/client.d.ts +12 -4
  1371. package/plugins/runtime-modules/localization/controller/client.js +31 -131
  1372. package/plugins/runtime-modules/localization/controller/definition.d.ts +19 -4
  1373. package/plugins/runtime-modules/localization/controller/definition.js +7 -4
  1374. package/plugins/runtime-modules/localization/data-providers.js +1 -1
  1375. package/plugins/runtime-modules/localization/definition.d.ts +2 -2
  1376. package/plugins/runtime-modules/localization/definition.js +3 -3
  1377. package/plugins/runtime-modules/localization/forms.d.ts +0 -4
  1378. package/plugins/runtime-modules/localization/forms.js +35 -44
  1379. package/plugins/runtime-modules/localization/ids.d.ts +9 -0
  1380. package/plugins/runtime-modules/localization/ids.js +9 -0
  1381. package/plugins/runtime-modules/localization/presets.d.ts +45 -1
  1382. package/plugins/runtime-modules/localization/presets.js +16 -12
  1383. package/plugins/runtime-modules/localization/server.js +1 -0
  1384. package/plugins/runtime-modules/localization/services/options.js +16 -8
  1385. package/plugins/runtime-modules/localization/services/table.js +24 -44
  1386. package/plugins/runtime-modules/localization/tour.d.ts +35 -0
  1387. package/plugins/runtime-modules/localization/tour.js +42 -0
  1388. package/plugins/runtime-modules/localization/trees/admin-locales-label-set.js +3 -2
  1389. package/plugins/runtime-modules/localization/trees/editor-translations-label-set.js +3 -2
  1390. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.d.ts +2 -0
  1391. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.js +7 -2
  1392. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -9
  1393. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +40 -24
  1394. package/plugins/runtime-modules/module-labels.server.js +21 -27
  1395. package/plugins/runtime-modules/news/authoring-widgets.js +3 -6
  1396. package/plugins/runtime-modules/news/definition.d.ts +9 -139
  1397. package/plugins/runtime-modules/news/definition.js +8 -18
  1398. package/plugins/runtime-modules/news/forms.d.ts +3 -26
  1399. package/plugins/runtime-modules/news/forms.js +10 -203
  1400. package/plugins/runtime-modules/news/ids.d.ts +19 -36
  1401. package/plugins/runtime-modules/news/ids.js +20 -118
  1402. package/plugins/runtime-modules/news/labels.d.ts +4 -0
  1403. package/plugins/runtime-modules/news/labels.js +27 -0
  1404. package/plugins/runtime-modules/news/module.d.ts +4 -126
  1405. package/plugins/runtime-modules/news/presets.d.ts +51 -15
  1406. package/plugins/runtime-modules/news/presets.js +20 -62
  1407. package/plugins/runtime-modules/news/server.js +1 -2
  1408. package/plugins/runtime-modules/observability/definition.d.ts +1 -1
  1409. package/plugins/runtime-modules/observability/definition.js +2 -2
  1410. package/plugins/runtime-modules/observability/ids.d.ts +9 -0
  1411. package/plugins/runtime-modules/observability/ids.js +9 -0
  1412. package/plugins/runtime-modules/observability/module.d.ts +1 -1
  1413. package/plugins/runtime-modules/observability/services/table.js +11 -24
  1414. package/plugins/runtime-modules/observability/trees/admin-logs-label-set.js +3 -2
  1415. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +2 -7
  1416. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +38 -37
  1417. package/plugins/runtime-modules/pub-area-preset.js +7 -2
  1418. package/plugins/runtime-modules/public/module.d.ts +1 -1
  1419. package/plugins/runtime-modules/public/trees/phi-default-pub-contact-page-tree.js +25 -20
  1420. package/plugins/runtime-modules/public/trees/phi-default-pub-error-page-tree.js +15 -10
  1421. package/plugins/runtime-modules/public/trees/phi-default-pub-home-page-tree.js +11 -20
  1422. package/plugins/runtime-modules/public/trees/phi-default-pub-terms-page-tree.js +11 -20
  1423. package/plugins/runtime-modules/public/trees/phi-default-pub-unsubscribe-page-tree.js +11 -20
  1424. package/plugins/runtime-modules/public/trees/phi-default-pub-welcome-page-tree.js +0 -1
  1425. package/plugins/runtime-modules/resolver.d.ts +0 -4
  1426. package/plugins/runtime-modules/resolver.js +17 -2
  1427. package/plugins/runtime-modules/revisions/authoring-client.d.ts +0 -1
  1428. package/plugins/runtime-modules/revisions/authoring-client.js +1 -1
  1429. package/plugins/runtime-modules/revisions/controller/client.d.ts +23 -5
  1430. package/plugins/runtime-modules/revisions/controller/client.js +33 -70
  1431. package/plugins/runtime-modules/revisions/controller/definition.d.ts +30 -5
  1432. package/plugins/runtime-modules/revisions/controller/definition.js +10 -3
  1433. package/plugins/runtime-modules/revisions/data-providers.d.ts +7 -0
  1434. package/plugins/runtime-modules/revisions/data-providers.js +2 -0
  1435. package/plugins/runtime-modules/revisions/definition.d.ts +7 -0
  1436. package/plugins/runtime-modules/revisions/forms.js +7 -16
  1437. package/plugins/runtime-modules/revisions/services/table.js +63 -11
  1438. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +129 -22
  1439. package/plugins/runtime-modules/revisions/types.d.ts +3 -0
  1440. package/plugins/runtime-modules/settings.d.ts +9 -1
  1441. package/plugins/runtime-modules/settings.js +19 -10
  1442. package/plugins/runtime-modules/shell-tree-composition.d.ts +4 -4
  1443. package/plugins/runtime-modules/shell-tree-composition.js +2 -0
  1444. package/plugins/runtime-modules/sidebar-route.d.ts +2 -2
  1445. package/plugins/runtime-modules/sidebar-route.js +2 -3
  1446. package/plugins/runtime-modules/site-module-client-manifests.d.ts +1 -2
  1447. package/plugins/runtime-modules/site-module-client-manifests.js +1 -1
  1448. package/plugins/runtime-modules/theme/brand-theme-model.d.ts +170 -0
  1449. package/plugins/runtime-modules/theme/brand-theme-model.js +164 -0
  1450. package/plugins/runtime-modules/theme/controller/client.d.ts +4 -9
  1451. package/plugins/runtime-modules/theme/controller/client.js +7 -5
  1452. package/plugins/runtime-modules/theme/controller/definition.d.ts +14 -8
  1453. package/plugins/runtime-modules/theme/controller/definition.js +8 -14
  1454. package/plugins/runtime-modules/theme/controller/runtime.d.ts +11 -0
  1455. package/plugins/runtime-modules/theme/controller/runtime.js +627 -0
  1456. package/plugins/runtime-modules/theme/controller/server-definition.d.ts +4 -9
  1457. package/plugins/runtime-modules/theme/controller/server-definition.js +8 -1
  1458. package/plugins/runtime-modules/theme/materialize-images.js +9 -1
  1459. package/plugins/runtime-modules/theme/presets.d.ts +44 -2
  1460. package/plugins/runtime-modules/theme/presets.js +16 -12
  1461. package/plugins/runtime-modules/theme/tour.d.ts +36 -0
  1462. package/plugins/runtime-modules/theme/tour.js +43 -0
  1463. package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +60 -42
  1464. package/plugins/runtime-modules/theme/widgets/brand-controls/authoring.d.ts +10 -10
  1465. package/plugins/runtime-modules/theme/widgets/brand-controls/client.d.ts +0 -6
  1466. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +177 -934
  1467. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +3 -2
  1468. package/plugins/runtime-modules/theme-descriptors.d.ts +0 -58
  1469. package/plugins/runtime-modules/theme-descriptors.js +1 -1
  1470. package/plugins/runtime-modules/threads/addresses.d.ts +15 -8
  1471. package/plugins/runtime-modules/threads/addresses.js +30 -23
  1472. package/plugins/runtime-modules/threads/authoring-widgets.js +3 -5
  1473. package/plugins/runtime-modules/threads/cards.js +4 -6
  1474. package/plugins/runtime-modules/threads/client-data-providers.js +0 -5
  1475. package/plugins/runtime-modules/threads/controller/client.d.ts +0 -6
  1476. package/plugins/runtime-modules/threads/controller/client.js +20 -49
  1477. package/plugins/runtime-modules/threads/controller/definition.d.ts +0 -6
  1478. package/plugins/runtime-modules/threads/controller/definition.js +14 -29
  1479. package/plugins/runtime-modules/threads/data-providers.d.ts +3 -98
  1480. package/plugins/runtime-modules/threads/data-providers.js +1 -104
  1481. package/plugins/runtime-modules/threads/definition.d.ts +6 -99
  1482. package/plugins/runtime-modules/threads/definition.js +5 -3
  1483. package/plugins/runtime-modules/threads/forms.d.ts +3 -22
  1484. package/plugins/runtime-modules/threads/forms.js +18 -145
  1485. package/plugins/runtime-modules/threads/ids.d.ts +9 -0
  1486. package/plugins/runtime-modules/threads/ids.js +9 -0
  1487. package/{components/widgets/label-sets/threads.d.ts → plugins/runtime-modules/threads/labels.d.ts} +2 -40
  1488. package/plugins/runtime-modules/threads/labels.js +156 -0
  1489. package/plugins/runtime-modules/threads/presets.js +33 -15
  1490. package/plugins/runtime-modules/threads/server.js +1 -0
  1491. package/plugins/runtime-modules/threads/services/options.js +4 -8
  1492. package/plugins/runtime-modules/threads/trees/{phi-default-app-threads-page-tree.d.ts → phi-default-threads-page-tree.d.ts} +3 -1
  1493. package/plugins/runtime-modules/threads/trees/{phi-default-app-threads-page-tree.js → phi-default-threads-page-tree.js} +185 -187
  1494. package/plugins/runtime-modules/threads/widgets.js +5 -14
  1495. package/plugins/runtime-modules/tour/authoring-widgets.d.ts +2 -0
  1496. package/plugins/runtime-modules/tour/authoring-widgets.js +4 -0
  1497. package/plugins/runtime-modules/tour/authoring.d.ts +1 -0
  1498. package/plugins/runtime-modules/tour/authoring.js +8 -0
  1499. package/plugins/runtime-modules/tour/client.d.ts +1 -0
  1500. package/plugins/runtime-modules/{admin → tour}/client.js +1 -1
  1501. package/plugins/runtime-modules/tour/controller/address.d.ts +1 -0
  1502. package/plugins/runtime-modules/tour/controller/address.js +3 -0
  1503. package/plugins/runtime-modules/tour/controller/client.d.ts +39 -0
  1504. package/plugins/runtime-modules/tour/controller/client.js +162 -0
  1505. package/plugins/runtime-modules/tour/controller/definition.d.ts +48 -0
  1506. package/plugins/runtime-modules/tour/controller/definition.js +41 -0
  1507. package/plugins/runtime-modules/tour/controller/progress.d.ts +19 -0
  1508. package/plugins/runtime-modules/tour/controller/progress.js +24 -0
  1509. package/plugins/runtime-modules/tour/definition.d.ts +27 -0
  1510. package/plugins/runtime-modules/tour/definition.js +32 -0
  1511. package/plugins/runtime-modules/tour/ids.d.ts +7 -0
  1512. package/plugins/runtime-modules/tour/ids.js +8 -0
  1513. package/plugins/runtime-modules/tour/module.d.ts +1 -0
  1514. package/plugins/runtime-modules/tour/module.js +4 -0
  1515. package/plugins/runtime-modules/tour/server.d.ts +1 -0
  1516. package/plugins/runtime-modules/tour/server.js +14 -0
  1517. package/plugins/runtime-modules/user-management/cards.js +3 -5
  1518. package/plugins/runtime-modules/user-management/controller/client.d.ts +14 -8
  1519. package/plugins/runtime-modules/user-management/controller/client.js +50 -181
  1520. package/plugins/runtime-modules/user-management/controller/definition.d.ts +21 -8
  1521. package/plugins/runtime-modules/user-management/controller/definition.js +54 -26
  1522. package/plugins/runtime-modules/user-management/definition.d.ts +1 -1
  1523. package/plugins/runtime-modules/user-management/definition.js +2 -2
  1524. package/plugins/runtime-modules/user-management/forms.d.ts +0 -4
  1525. package/plugins/runtime-modules/user-management/forms.js +34 -34
  1526. package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
  1527. package/plugins/runtime-modules/user-management/ids.js +9 -0
  1528. package/plugins/runtime-modules/user-management/server.js +1 -0
  1529. package/plugins/runtime-modules/user-management/services/table.js +15 -48
  1530. package/plugins/runtime-modules/user-management/trees/admin-users-label-set.js +3 -2
  1531. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +82 -19
  1532. package/plugins/runtime-modules/video/widgets/embed/config.d.ts +2 -10
  1533. package/plugins/runtime-modules/video/widgets/embed/config.js +5 -4
  1534. package/runtime-data-provider-client.d.ts +2 -0
  1535. package/runtime-data-provider-client.js +1 -0
  1536. package/server-helpers/area-root-door-warmup.js +11 -4
  1537. package/server-helpers/area-root-route.d.ts +5 -7
  1538. package/server-helpers/area-root-route.js +5 -11
  1539. package/server-helpers/cms-area.js +3 -1
  1540. package/server-helpers/cms-bound-content.d.ts +38 -0
  1541. package/server-helpers/cms-bound-content.js +97 -0
  1542. package/server-helpers/cms-link-targets.d.ts +8 -1
  1543. package/server-helpers/cms-link-targets.js +13 -1
  1544. package/server-helpers/cms-lookup.d.ts +22 -0
  1545. package/server-helpers/cms-lookup.js +56 -0
  1546. package/server-helpers/cms-node-features.d.ts +17 -3
  1547. package/server-helpers/cms-node-features.js +22 -16
  1548. package/server-helpers/cms-request.js +50 -25
  1549. package/server-helpers/cms-review.d.ts +14 -1
  1550. package/server-helpers/cms-review.js +20 -6
  1551. package/server-helpers/cms-root.d.ts +3 -1
  1552. package/server-helpers/cms-root.js +42 -44
  1553. package/server-helpers/cms-route.d.ts +2 -1
  1554. package/server-helpers/cms-route.js +8 -1
  1555. package/server-helpers/content-entry-page.d.ts +16 -0
  1556. package/server-helpers/content-entry-page.js +24 -0
  1557. package/server-helpers/page-tour.d.ts +11 -0
  1558. package/server-helpers/page-tour.js +26 -0
  1559. package/server-helpers/public-login-route.d.ts +10 -5
  1560. package/server-helpers/public-login-route.js +49 -28
  1561. package/server-helpers/record-source.d.ts +31 -0
  1562. package/server-helpers/record-source.js +44 -0
  1563. package/server-helpers/request-locale.js +23 -9
  1564. package/server-helpers/request-memo.d.ts +14 -0
  1565. package/server-helpers/request-memo.js +72 -0
  1566. package/server-helpers/request-runtime.d.ts +9 -2
  1567. package/server-helpers/request-runtime.js +2 -2
  1568. package/server-helpers/request-search-params.d.ts +12 -0
  1569. package/server-helpers/request-search-params.js +21 -0
  1570. package/server-helpers/root-layout.js +2 -13
  1571. package/server-helpers/runtime.d.ts +1 -41
  1572. package/server-helpers/runtime.js +51 -46
  1573. package/server-helpers/translate.d.ts +3 -1
  1574. package/server-helpers/translate.js +13 -7
  1575. package/styles/builder-scaffold.css +0 -112
  1576. package/styles/control-shape.css +14 -0
  1577. package/styles/controls.css +51 -0
  1578. package/styles/layout-authoring-scaffold.css +0 -31
  1579. package/styles/layout.css +233 -10
  1580. package/styles/shell.css +54 -0
  1581. package/theme/antd-css-var-contract.d.ts +5 -10
  1582. package/theme/antd-css-var-contract.js +5 -10
  1583. package/theme/phi-button-shadow.d.ts +0 -2
  1584. package/theme/phi-button-shadow.js +1 -1
  1585. package/theme/phi-control-shape.js +2 -1
  1586. package/theme/phi-css-vars.d.ts +13 -3
  1587. package/theme/phi-css-vars.js +25 -16
  1588. package/theme/phi-font-catalogue.d.ts +0 -2
  1589. package/theme/phi-font-catalogue.js +1 -1
  1590. package/theme/phi-font-face.d.ts +0 -3
  1591. package/theme/phi-font-face.js +2 -2
  1592. package/theme/phi-published-root-style.d.ts +1 -2
  1593. package/theme/phi-published-root-style.js +2 -4
  1594. package/theme/phi-theme-adoption.d.ts +0 -3
  1595. package/theme/phi-theme-adoption.js +3 -3
  1596. package/theme/phi-theme-blocks.js +4 -4
  1597. package/theme/phi-theme-palette.d.ts +0 -1
  1598. package/theme/phi-theme-palette.js +0 -3
  1599. package/theme/phi-theme-selection.d.ts +0 -9
  1600. package/theme/phi-theme-selection.js +4 -3
  1601. package/theme/phi-theme-tokens.d.ts +1 -16
  1602. package/theme/phi-theme-tokens.js +5 -2
  1603. package/theme/phi-theme.d.ts +0 -2
  1604. package/theme/phi-theme.js +38 -15
  1605. package/theme/phi-tokens.d.ts +36 -10
  1606. package/theme/phi-tokens.js +44 -2
  1607. package/types/builder.d.ts +8 -0
  1608. package/types/calendar.d.ts +5 -0
  1609. package/types/calendar.js +7 -6
  1610. package/types/cms-border-config.js +2 -1
  1611. package/types/cms-config.d.ts +20 -47
  1612. package/types/cms-config.js +36 -117
  1613. package/types/cms-container.d.ts +8 -8
  1614. package/types/cms-module-descriptors.d.ts +17 -25
  1615. package/types/cms-mount-policy.d.ts +0 -1
  1616. package/types/cms-mount-policy.js +1 -1
  1617. package/types/cms-overlay.d.ts +34 -7
  1618. package/types/cms-overlay.js +33 -43
  1619. package/types/cms-plugins.d.ts +205 -9
  1620. package/types/cms-presets.d.ts +62 -15
  1621. package/types/cms-presets.js +23 -1
  1622. package/types/cms.d.ts +41 -21
  1623. package/types/content-entries.d.ts +76 -0
  1624. package/types/content-entries.js +16 -0
  1625. package/types/core-runtime-controller.js +4 -3
  1626. package/types/core-widget-placements.d.ts +59 -21
  1627. package/types/dashboard-cards.d.ts +28 -7
  1628. package/types/dashboard-cards.js +5 -0
  1629. package/types/dimension.js +2 -1
  1630. package/types/draft-status.js +2 -1
  1631. package/types/form-descriptor.d.ts +1 -1
  1632. package/types/form-submit-route.d.ts +26 -0
  1633. package/types/form-submit-route.js +1 -0
  1634. package/types/layout-style.d.ts +12 -4
  1635. package/types/layout-style.js +15 -6
  1636. package/types/media.d.ts +0 -1
  1637. package/types/record-provider.d.ts +23 -0
  1638. package/types/record-provider.js +1 -0
  1639. package/types/references.d.ts +1 -1
  1640. package/types/references.js +1 -1
  1641. package/types/renderable-block-geometry.d.ts +0 -4
  1642. package/types/renderable-block-geometry.js +2 -2
  1643. package/types/renderable-block.d.ts +9 -6
  1644. package/types/runtime-data-provider.d.ts +11 -1
  1645. package/types/runtime-data-provider.js +25 -2
  1646. package/types/signals.d.ts +3 -1
  1647. package/types/signals.js +3 -1
  1648. package/types/site-config.d.ts +15 -3
  1649. package/types/site-request-context.d.ts +2 -159
  1650. package/types/site-theme.d.ts +1 -4
  1651. package/types/surface.d.ts +59 -0
  1652. package/types/surface.js +62 -0
  1653. package/types/table-signal-values.js +25 -4
  1654. package/types/table-widget.d.ts +50 -0
  1655. package/types/table-widget.js +3 -4
  1656. package/types/thread-widget.js +2 -1
  1657. package/types/tours.d.ts +84 -0
  1658. package/types/tours.js +75 -0
  1659. package/types/widget-runtime.d.ts +35 -41
  1660. package/types.d.ts +2 -1
  1661. package/types.js +2 -0
  1662. package/widget-config.d.ts +2 -1
  1663. package/widget-config.js +3 -1
  1664. package/components/layouts/clients/phi-flex-vertical-layout-client.d.ts +0 -10
  1665. package/components/layouts/clients/phi-flex-vertical-layout-client.js +0 -133
  1666. package/components/root/phi-root-rem-provider.d.ts +0 -7
  1667. package/components/root/phi-root-rem-provider.js +0 -14
  1668. package/components/widgets/label-sets/news.d.ts +0 -9
  1669. package/components/widgets/label-sets/news.js +0 -29
  1670. package/components/widgets/label-sets/threads.js +0 -269
  1671. package/gateway/news.d.ts +0 -22
  1672. package/gateway/news.js +0 -76
  1673. package/helpers/visibility.d.ts +0 -1
  1674. package/helpers/visibility.js +0 -4
  1675. package/plugins/runtime-modules/admin/client.d.ts +0 -1
  1676. package/plugins/runtime-modules/admin/controller/address.d.ts +0 -3
  1677. package/plugins/runtime-modules/admin/controller/address.js +0 -4
  1678. package/plugins/runtime-modules/admin/controller/client.d.ts +0 -18
  1679. package/plugins/runtime-modules/admin/controller/client.js +0 -8
  1680. package/plugins/runtime-modules/admin/controller/definition.d.ts +0 -16
  1681. package/plugins/runtime-modules/admin/controller/definition.js +0 -13
  1682. package/plugins/runtime-modules/avatar/client.d.ts +0 -0
  1683. package/plugins/runtime-modules/avatar/client.js +0 -2
  1684. package/plugins/runtime-modules/builder/inspector-controller.d.ts +0 -3
  1685. package/plugins/runtime-modules/builder/inspector-controller.js +0 -290
  1686. package/plugins/runtime-modules/builder/page-reference-tree.d.ts +0 -18
  1687. package/plugins/runtime-modules/builder/page-reference-tree.js +0 -31
  1688. package/plugins/runtime-modules/builder/preview-controller.d.ts +0 -7
  1689. package/plugins/runtime-modules/builder/preview-controller.js +0 -82
  1690. package/plugins/runtime-modules/builder/tree-options.d.ts +0 -7
  1691. package/plugins/runtime-modules/builder/tree-options.js +0 -14
  1692. package/plugins/runtime-modules/builder/widgets/chrome-controls/authoring.d.ts +0 -3
  1693. package/plugins/runtime-modules/builder/widgets/chrome-controls/authoring.js +0 -7
  1694. package/plugins/runtime-modules/builder/widgets/chrome-controls/client.d.ts +0 -9
  1695. package/plugins/runtime-modules/builder/widgets/chrome-controls/client.js +0 -34
  1696. package/plugins/runtime-modules/builder/widgets/chrome-controls/config.d.ts +0 -19
  1697. package/plugins/runtime-modules/builder/widgets/chrome-controls/config.js +0 -30
  1698. package/plugins/runtime-modules/builder/widgets/chrome-controls/plugin.d.ts +0 -3
  1699. package/plugins/runtime-modules/builder/widgets/chrome-controls/plugin.js +0 -9
  1700. package/plugins/runtime-modules/builder/widgets/chrome-controls/server.d.ts +0 -8
  1701. package/plugins/runtime-modules/builder/widgets/chrome-controls/server.js +0 -6
  1702. package/plugins/runtime-modules/client-manifests/news-render-clients.d.ts +0 -2
  1703. package/plugins/runtime-modules/client-manifests/news-render-clients.js +0 -10
  1704. package/plugins/runtime-modules/core/widgets/command-toolbar/authoring-tools.d.ts +0 -5
  1705. package/plugins/runtime-modules/core/widgets/command-toolbar/authoring-tools.js +0 -45
  1706. package/plugins/runtime-modules/core/widgets/date-picker/authoring.d.ts +0 -3
  1707. package/plugins/runtime-modules/core/widgets/date-picker/authoring.js +0 -8
  1708. package/plugins/runtime-modules/core/widgets/date-picker/client.d.ts +0 -6
  1709. package/plugins/runtime-modules/core/widgets/date-picker/plugin.d.ts +0 -3
  1710. package/plugins/runtime-modules/core/widgets/date-picker/plugin.js +0 -9
  1711. package/plugins/runtime-modules/dashboard/client.d.ts +0 -2
  1712. package/plugins/runtime-modules/dashboard/client.js +0 -13
  1713. package/plugins/runtime-modules/dashboard/controller/address.d.ts +0 -3
  1714. package/plugins/runtime-modules/dashboard/controller/address.js +0 -4
  1715. package/plugins/runtime-modules/dashboard/controller/client.d.ts +0 -18
  1716. package/plugins/runtime-modules/dashboard/controller/client.js +0 -8
  1717. package/plugins/runtime-modules/dashboard/controller/definition.d.ts +0 -16
  1718. package/plugins/runtime-modules/dashboard/controller/definition.js +0 -13
  1719. package/plugins/runtime-modules/editor/client.d.ts +0 -1
  1720. package/plugins/runtime-modules/editor/client.js +0 -7
  1721. package/plugins/runtime-modules/editor/controller/address.d.ts +0 -3
  1722. package/plugins/runtime-modules/editor/controller/address.js +0 -4
  1723. package/plugins/runtime-modules/editor/controller/client.d.ts +0 -18
  1724. package/plugins/runtime-modules/editor/controller/client.js +0 -8
  1725. package/plugins/runtime-modules/editor/controller/definition.d.ts +0 -16
  1726. package/plugins/runtime-modules/editor/controller/definition.js +0 -13
  1727. package/plugins/runtime-modules/editor/trees/editor-label-set.d.ts +0 -8
  1728. package/plugins/runtime-modules/editor/trees/editor-label-set.js +0 -22
  1729. package/plugins/runtime-modules/news/client-data-providers.d.ts +0 -11
  1730. package/plugins/runtime-modules/news/client-data-providers.js +0 -14
  1731. package/plugins/runtime-modules/news/data-providers.d.ts +0 -133
  1732. package/plugins/runtime-modules/news/data-providers.js +0 -112
  1733. package/plugins/runtime-modules/news/services/options.d.ts +0 -3
  1734. package/plugins/runtime-modules/news/services/options.js +0 -35
  1735. package/plugins/runtime-modules/news/services/table.js +0 -144
  1736. package/plugins/runtime-modules/news/trees/editor-news-label-set.d.ts +0 -8
  1737. package/plugins/runtime-modules/news/trees/editor-news-label-set.js +0 -29
  1738. package/plugins/runtime-modules/news/trees/editor-news-widget-label-set.d.ts +0 -65
  1739. package/plugins/runtime-modules/news/trees/editor-news-widget-label-set.js +0 -106
  1740. package/plugins/runtime-modules/news/trees/phi-default-editor-news-page-tree.d.ts +0 -17
  1741. package/plugins/runtime-modules/news/trees/phi-default-editor-news-page-tree.js +0 -462
  1742. package/plugins/runtime-modules/news/trees/phi-default-pub-news-page-tree.d.ts +0 -11
  1743. package/plugins/runtime-modules/news/trees/phi-default-pub-news-page-tree.js +0 -86
  1744. package/plugins/runtime-modules/news/widgets/news-list/authoring.d.ts +0 -2
  1745. package/plugins/runtime-modules/news/widgets/news-list/client.d.ts +0 -34
  1746. package/plugins/runtime-modules/news/widgets/news-list/client.js +0 -26
  1747. package/plugins/runtime-modules/news/widgets/news-list/config.d.ts +0 -43
  1748. package/plugins/runtime-modules/news/widgets/news-list/config.js +0 -52
  1749. package/plugins/runtime-modules/news/widgets/news-list/plugin.d.ts +0 -3
  1750. package/plugins/runtime-modules/news/widgets/news-list/plugin.js +0 -8
  1751. package/plugins/runtime-modules/news/widgets/news-list/server.d.ts +0 -14
  1752. package/plugins/runtime-modules/news/widgets/news-list/server.js +0 -82
  1753. package/plugins/runtime-modules/news/widgets.d.ts +0 -2
  1754. package/plugins/runtime-modules/news/widgets.js +0 -16
  1755. package/types/news.d.ts +0 -33
  1756. /package/{types/news.js → components/controls/phi-form-control-contract.js} +0 -0
  1757. /package/plugins/runtime-modules/{threads/services/table.d.ts → core/messaging/thread-inbox-table.d.ts} +0 -0
  1758. /package/plugins/runtime-modules/{threads → core}/widgets/thread-conversation/authoring.d.ts +0 -0
  1759. /package/plugins/runtime-modules/{threads → core}/widgets/thread-conversation/authoring.js +0 -0
  1760. /package/plugins/runtime-modules/{threads → core}/widgets/thread-conversation/plugin.d.ts +0 -0
  1761. /package/plugins/runtime-modules/{threads → core}/widgets/thread-conversation/plugin.js +0 -0
  1762. /package/plugins/runtime-modules/{threads → core}/widgets/thread-conversation/server.d.ts +0 -0
@@ -1,143 +1,84 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useMemo, useState } from "react";
4
- import { theme as antdTheme } from "antd";
5
- import { PlusOutlined } from "@ant-design/icons";
4
+ import { usePhiConfig } from "../../../../../components/root/phi-config-provider";
5
+ import { hasPhiConfigFlag } from "../../../../../helpers/flags";
6
+ import { PhiCmsFlags } from "../../../../../constants/phi-cms";
6
7
  import { buildPhiCmsLayoutNamespacedTypeKey, splitPhiCmsLayoutNamespacedTypeKey, } from "../../../../../constants/cms-layout-types";
7
8
  import { buildPhiCmsLayoutNode, buildPhiCmsWidgetNode } from "../../../../../helpers/cms-node-factories";
8
9
  import { PHI_CMS_MAX_LAYOUT_SUBLAYOUT_DEPTH, resolvePhiCmsRenderLayoutNodeDepth, } from "../../../../../helpers/cms-layout-depth";
9
10
  import { resolvePhiBorderWidgetStyle } from "../../../../../helpers/border-widget-style";
10
11
  import { phiBackgroundWidgetConfigPaintsGround, resolvePhiBackgroundWidgetStyle, } from "../../../../../components/widgets/config/background";
11
12
  import { combinePhiBoxShadows, resolvePhiShadow } from "../../../../../helpers/layout-style";
12
- import { normalizePhiGeometryWidgetConfig } from "../../../../../components/widgets/config/geometry";
13
13
  import { readPhiCmsInstanceId } from "../../../../../types/cms-instance-id";
14
14
  import { normalizePhiPaddingWidgetConfig } from "../../../../../types/cms-config";
15
- import { readPhiShadow } from "../../../../../types/layout-style";
16
15
  import { readPhiRenderableBlockLength, resolvePhiRenderableBlockGeometry, } from "../../../../../types/renderable-block-geometry";
17
16
  import { extractPhiStructureNode as extractStructureNode, swapPhiStructureWidgetsAcrossTrees, swapPhiStructureWidgetsInTree, } from "../../../../../helpers/structure-widget-swap";
18
17
  import { createPhiSignalAddress, } from "../../../../../types/signals";
19
18
  import { resolvePhiShellRegionTypography, resolvePhiShellRegionZIndex } from "../../../../../helpers/shell-region-style";
20
19
  import { phiCmsRegionAcceptsWidget, resolvePhiCmsRegionType } from "../../../../../helpers/cms-region-keys";
21
20
  import { usePhiRuntimeModuleState } from "../../../../../components/runtime/runtime-module-context";
22
- import { renderPhiRootNodeScaffold } from "../../../../../plugins/runtime-modules/builder/render-root-node-scaffold";
21
+ import { renderPhiRootNodeScaffold, resolveLayoutNodeRootProps, } from "../../../../../plugins/runtime-modules/builder/render-root-node-scaffold";
23
22
  import { PhiBuilderInsertPickerControl } from "../../../../../components/controls/phi-builder-insert-picker-control";
24
- import { buildPhiBuilderRootNodeRenderConfig, normalizePhiBuilderRootNodeDraft, readPhiBuilderRootNodeDraftFields, resolvePhiBuilderRootNodeDefaults, } from "../../../../../plugins/runtime-modules/builder/root-node-normalization";
23
+ import { readPhiBuilderRegionRootChildLayouts, readPhiBuilderRegionRootChildWidgets, withPhiBuilderRegionRootChildren, } from "../../../../../plugins/runtime-modules/builder/region-root-node";
25
24
  import { compactPhiCmsSequentialChildren, compactsPhiCmsSequentialSlots } from "../../../../../plugins/runtime-modules/builder/sequential-slot-helpers";
26
25
  import { findPhiBuilderLayoutNodeById } from "../../../../../plugins/runtime-modules/builder/node-finders";
27
26
  import { getDefaultRegionDraft, } from "../../../../../plugins/runtime-modules/builder/developer-region-drafts";
28
27
  import { patchPhiDeveloperBuilderState, selectPhiDeveloperBuilderNode, getPhiDeveloperRegionDraftsSnapshot, setPhiDeveloperRegionDraft, setPhiDeveloperRegionDraftAndPruneSignalRoutes, setPhiDeveloperRegionDraftsWithHistory, usePhiDeveloperBuilderStateValue, usePhiDeveloperRegionDraft, } from "../../../../../plugins/runtime-modules/builder/developer-workspace-store";
29
28
  import { allocatePhiBuilderCmsInstanceId } from "../../../../../plugins/runtime-modules/builder/cms-instance-allocator";
30
29
  import { getPhiBuilderRegionDraftKey, isPhiBuilderPageScopedRegion, } from "../../../../../plugins/runtime-modules/builder/region-keys";
31
- import { isPhiAnchorWidgetPlacement } from "../../../../../components/controls/phi-anchor-control-contract";
32
- import { resolvePhiWidgetSignalSubcontrolAddresses } from "../../../../../components/widgets/signals/signal-endpoints";
33
30
  import { createPhiBuilderRegionHistoryContext } from "../../../../../plugins/runtime-modules/builder/history";
31
+ import { findPhiBuilderTreeNode, resolvePhiBuilderNodeHistorySubject, writePhiBuilderNode, } from "../../node-config-write";
32
+ import { compactPhiStructureSequentialLayouts, insertPhiStructureNode, removePhiStructureNode, } from "./tree-operations";
34
33
  import { usePhiStructureDroppable, } from "../../../../../plugins/runtime-modules/builder/structure-dnd";
35
34
  import { usePhiBuilderModuleMetas } from "../../../../../plugins/runtime-modules/builder/plugin-meta-store";
36
35
  import { resolvePhiPaddingStyle } from "../../../../../components/layouts/phi-layout-contract";
37
36
  import { usePhiBuilderAuthoringCanvas } from "../../authoring-canvas";
38
37
  import { PhiFlexControl } from "../../../../../components/controls/phi-flex-control";
39
38
  import { PhiTypographyControl } from "../../../../../components/controls/phi-typography-control";
39
+ import { PhiIcon } from "../../../../../components/shell/phi-icon";
40
+ import { PhiSurfaceTone } from "../../../../../components/surface/phi-surface-tone";
41
+ import { resolvePhiSurfaceToneClassName } from "../../../../../types/surface";
42
+ /** The Region's root Layout placed into another tree, at the slot it is moved to. */
40
43
  function buildStructureRootLayoutNode(draft, parentLayoutNodeId, slotIndex) {
41
- if (draft.rootNodeId == null ||
42
- !draft.rootNodeTypeKey ||
43
- draft.rootNodeKind !== "layout") {
44
+ if (!draft.rootNode) {
44
45
  return null;
45
46
  }
46
- const normalized = normalizePhiBuilderRootNodeDraft({
47
- id: draft.rootNodeId,
48
- typeKey: draft.rootNodeTypeKey,
49
- kind: draft.rootNodeKind,
50
- packageName: draft.rootNodePackageName ?? null,
51
- ...readPhiBuilderRootNodeDraftFields(draft),
52
- });
53
- const config = buildPhiBuilderRootNodeRenderConfig(normalized, "editor");
54
- delete config.renderMode;
55
47
  return {
56
- id: draft.rootNodeId,
57
- siteId: -1,
48
+ ...draft.rootNode,
58
49
  parentLayoutNodeId,
59
- widgetType: draft.rootNodeTypeKey,
60
50
  slotIndex,
61
51
  sortOrder: 0,
62
- status: 0,
63
- flags: 0,
64
- visibilityMask: 0,
65
- label: draft.rootNodeTitle ?? "Root",
66
- config: {
67
- ...config,
68
- builderKind: draft.rootNodeKind,
69
- },
70
- childLayouts: draft.rootNodeChildLayouts ?? [],
71
- childWidgets: draft.rootNodeChildWidgets ?? [],
52
+ label: draft.rootNode.label ?? "Root",
53
+ childLayouts: draft.rootNode.childLayouts ?? [],
54
+ childWidgets: draft.rootNode.childWidgets ?? [],
72
55
  };
73
56
  }
74
57
  function clearStructureRootNode(draft) {
75
- return {
76
- ...draft,
77
- rootNodeId: null,
78
- rootNodeTypeKey: null,
79
- rootNodeKind: null,
80
- rootNodeTitle: null,
81
- rootNodePackageName: null,
82
- rootNodeConfig: null,
83
- rootNodeGeometry: null,
84
- rootNodeAnchor: null,
85
- rootNodePadding: null,
86
- rootNodeBackground: null,
87
- rootNodeBorder: null,
88
- rootNodeShadow: null,
89
- rootNodeChildLayouts: [],
90
- rootNodeChildWidgets: [],
91
- };
58
+ return { ...draft, rootNode: null };
92
59
  }
93
60
  function copyStructureRootNode(targetDraft, sourceDraft) {
94
- return {
95
- ...targetDraft,
96
- rootNodeId: sourceDraft.rootNodeId ?? null,
97
- rootNodeTypeKey: sourceDraft.rootNodeTypeKey ?? null,
98
- rootNodeKind: sourceDraft.rootNodeKind ?? null,
99
- rootNodeTitle: sourceDraft.rootNodeTitle ?? null,
100
- rootNodePackageName: sourceDraft.rootNodePackageName ?? null,
101
- rootNodeConfig: sourceDraft.rootNodeConfig ?? null,
102
- rootNodeGeometry: sourceDraft.rootNodeGeometry ?? null,
103
- rootNodeAnchor: sourceDraft.rootNodeAnchor ?? null,
104
- rootNodePadding: sourceDraft.rootNodePadding ?? null,
105
- rootNodeBackground: sourceDraft.rootNodeBackground ?? null,
106
- rootNodeBorder: sourceDraft.rootNodeBorder ?? null,
107
- rootNodeShadow: sourceDraft.rootNodeShadow ?? null,
108
- rootNodeChildLayouts: sourceDraft.rootNodeChildLayouts ?? [],
109
- rootNodeChildWidgets: sourceDraft.rootNodeChildWidgets ?? [],
110
- };
61
+ return { ...targetDraft, rootNode: sourceDraft.rootNode ?? null };
111
62
  }
63
+ /** A Layout made the Region's root: the same node, now standing at the top of the Region. */
112
64
  function promoteStructureLayoutToRoot(targetDraft, node) {
113
- const rootNodeKind = "layout";
114
- const rootNodeDefaults = resolvePhiBuilderRootNodeDefaults(node.config);
115
- const { pluginKey } = splitPhiCmsLayoutNamespacedTypeKey(node.widgetType);
116
65
  return {
117
66
  ...targetDraft,
118
- rootNodeId: node.id,
119
- rootNodeTypeKey: node.widgetType,
120
- rootNodeKind,
121
- rootNodeTitle: node.label ?? null,
122
- rootNodePackageName: pluginKey,
123
- rootNodeConfig: node.config,
124
- rootNodeGeometry: normalizePhiGeometryWidgetConfig(node.config),
125
- rootNodeAnchor: isPhiAnchorWidgetPlacement(node.config.anchor)
126
- ? node.config.anchor
127
- : null,
128
- rootNodePadding: rootNodeDefaults.rootNodePadding,
129
- rootNodeBackground: rootNodeDefaults.rootNodeBackground,
130
- rootNodeBorder: rootNodeDefaults.rootNodeBorder,
131
- rootNodeShadow: readPhiShadow(node.config.rootNodeShadow) ?? null,
132
- rootNodeChildLayouts: node.childLayouts ?? [],
133
- rootNodeChildWidgets: node.childWidgets ?? [],
67
+ rootNode: {
68
+ ...node,
69
+ parentLayoutNodeId: null,
70
+ slotIndex: 0,
71
+ sortOrder: 0,
72
+ childLayouts: node.childLayouts ?? [],
73
+ childWidgets: node.childWidgets ?? [],
74
+ },
134
75
  };
135
76
  }
136
77
  function resolveStructureLayoutSubtreeDepth(node) {
137
78
  return (node.childLayouts ?? []).reduce((maxDepth, child) => Math.max(maxDepth, 1 + resolveStructureLayoutSubtreeDepth(child)), 0);
138
79
  }
139
80
  function canMoveStructureLayoutToTarget(node, targetParentLayoutNodeId, targetRootNodeId, targetChildLayouts) {
140
- if ("contentId" in node) {
81
+ if ("contentVersionId" in node) {
141
82
  return true;
142
83
  }
143
84
  const targetDepth = targetParentLayoutNodeId === targetRootNodeId
@@ -155,38 +96,6 @@ function buildPhiBuilderContainerMetaMap(pluginMetas) {
155
96
  meta,
156
97
  ]));
157
98
  }
158
- function compactStructureSequentialLayouts(nodes, layoutMetasByType) {
159
- return nodes.map((node) => {
160
- const nestedLayouts = compactStructureSequentialLayouts(node.childLayouts ?? [], layoutMetasByType);
161
- const definition = layoutMetasByType.get(node.widgetType);
162
- if (!compactsPhiCmsSequentialSlots(definition)) {
163
- return {
164
- ...node,
165
- childLayouts: nestedLayouts,
166
- };
167
- }
168
- const compacted = compactPhiCmsSequentialChildren({
169
- childLayouts: nestedLayouts,
170
- childWidgets: node.childWidgets ?? [],
171
- });
172
- return {
173
- ...node,
174
- childLayouts: compacted.childLayouts,
175
- childWidgets: compacted.childWidgets,
176
- };
177
- });
178
- }
179
- function resolvePickItemPackageName(item) {
180
- const raw = item.packageName ?? item.origin ?? "";
181
- if (!raw) {
182
- return null;
183
- }
184
- const parts = raw.split("/");
185
- if (raw.startsWith("@") && parts.length >= 2) {
186
- return `${parts[0]}/${parts[1]}`;
187
- }
188
- return parts[0] ?? raw;
189
- }
190
99
  function resolveSlotBodyMinHeight(geometry, fallbackMinHeight, fillAvailableHeight = false) {
191
100
  return (geometry.block.min?.css ??
192
101
  geometry.block.size?.css ??
@@ -234,7 +143,6 @@ function buildInsertedWidgetNode(item, id, parentLayoutNodeId, slotIndex, sortOr
234
143
  visibilityMask: 0,
235
144
  label: item.title,
236
145
  config: resolvedDefaultConfig,
237
- contentId: null,
238
146
  });
239
147
  }
240
148
  function resolveInsertedItemDefaultConfig(item) {
@@ -282,6 +190,38 @@ function appendWidgetChildById(nodes, targetNodeId, nextChild, compactSequential
282
190
  };
283
191
  });
284
192
  }
193
+ /**
194
+ * A moved node put into its target: under the root or under a Layout, as a Widget or a Layout, with the
195
+ * sequential compaction the target asks for. The two drop paths -- within a Region and across Regions --
196
+ * carried this four-way block twice.
197
+ */
198
+ function insertStructureNodeIntoTarget({ childLayouts, childWidgets, movedNode, parentLayoutNodeId, targetsRoot, compact, }) {
199
+ let nextLayouts = childLayouts;
200
+ let nextWidgets = childWidgets;
201
+ if (targetsRoot) {
202
+ if (compact) {
203
+ const inserted = insertPhiCmsSequentialChild(nextLayouts, nextWidgets, movedNode);
204
+ nextLayouts = inserted.childLayouts;
205
+ nextWidgets = inserted.childWidgets;
206
+ }
207
+ else if ("contentVersionId" in movedNode) {
208
+ nextWidgets = [...nextWidgets, movedNode];
209
+ }
210
+ else {
211
+ nextLayouts = [...nextLayouts, movedNode];
212
+ }
213
+ }
214
+ else if ("contentVersionId" in movedNode) {
215
+ nextLayouts = appendWidgetChildById(nextLayouts, parentLayoutNodeId, movedNode, compact);
216
+ }
217
+ else {
218
+ nextLayouts = appendLayoutChildById(nextLayouts, parentLayoutNodeId, movedNode, compact);
219
+ }
220
+ if (targetsRoot && compact) {
221
+ return compactPhiCmsSequentialChildren({ childLayouts: nextLayouts, childWidgets: nextWidgets });
222
+ }
223
+ return { childLayouts: nextLayouts, childWidgets: nextWidgets };
224
+ }
285
225
  function insertPhiCmsSequentialChild(childLayouts, childWidgets, child) {
286
226
  const compacted = compactPhiCmsSequentialChildren({
287
227
  childLayouts,
@@ -302,7 +242,7 @@ function insertPhiCmsSequentialChild(childLayouts, childWidgets, child) {
302
242
  slotIndex: insertionIndex,
303
243
  sortOrder: Math.max(0, child.sortOrder),
304
244
  };
305
- return "contentId" in insertedChild
245
+ return "contentVersionId" in insertedChild
306
246
  ? {
307
247
  childLayouts: shiftedLayouts,
308
248
  childWidgets: [...shiftedWidgets, insertedChild],
@@ -312,24 +252,6 @@ function insertPhiCmsSequentialChild(childLayouts, childWidgets, child) {
312
252
  childWidgets: shiftedWidgets,
313
253
  };
314
254
  }
315
- function removeLayoutChildById(nodes, targetNodeId) {
316
- return nodes
317
- .filter((node) => node.id !== targetNodeId)
318
- .map((node) => ({
319
- ...node,
320
- childLayouts: (node.childLayouts ?? []).length > 0 ? removeLayoutChildById(node.childLayouts, targetNodeId) : [],
321
- }));
322
- }
323
- function removeWidgetChildById(nodes, targetNodeId) {
324
- return nodes.map((node) => ({
325
- ...node,
326
- childLayouts: (node.childLayouts ?? []).length > 0 ? removeWidgetChildById(node.childLayouts, targetNodeId) : [],
327
- childWidgets: (node.childWidgets ?? []).filter((child) => child.id !== targetNodeId),
328
- }));
329
- }
330
- function removeContentWidgetById(nodes, targetNodeId) {
331
- return nodes.filter((child) => child.id !== targetNodeId);
332
- }
333
255
  function resolveLayoutNodeSignalAddress(node) {
334
256
  return createPhiSignalAddress("cms", node.id);
335
257
  }
@@ -342,18 +264,6 @@ function collectLayoutNodeSignalAddresses(node, addresses) {
342
264
  collectLayoutNodeSignalAddresses(childLayout, addresses);
343
265
  }
344
266
  }
345
- function findLayoutNodeById(nodes, targetNodeId) {
346
- for (const node of nodes) {
347
- if (node.id === targetNodeId) {
348
- return node;
349
- }
350
- const child = findLayoutNodeById(node.childLayouts ?? [], targetNodeId);
351
- if (child) {
352
- return child;
353
- }
354
- }
355
- return null;
356
- }
357
267
  function collectDeletedNodeSignalAddresses({ targetNodeId, targetNodeKind, rootNodeId, rootNodeKind, childLayouts, childWidgets, }) {
358
268
  const addresses = [];
359
269
  if (targetNodeId === rootNodeId) {
@@ -371,7 +281,7 @@ function collectDeletedNodeSignalAddresses({ targetNodeId, targetNodeKind, rootN
371
281
  if (targetNodeKind === "widget") {
372
282
  return [createPhiSignalAddress("cms", targetNodeId)];
373
283
  }
374
- const targetLayout = findLayoutNodeById(childLayouts, targetNodeId);
284
+ const targetLayout = findPhiBuilderLayoutNodeById(childLayouts, targetNodeId);
375
285
  if (targetLayout) {
376
286
  collectLayoutNodeSignalAddresses(targetLayout, addresses);
377
287
  }
@@ -380,41 +290,8 @@ function collectDeletedNodeSignalAddresses({ targetNodeId, targetNodeKind, rootN
380
290
  }
381
291
  return addresses;
382
292
  }
383
- function updateLayoutChildConfigById(nodes, targetNodeId, configPatch) {
384
- return nodes.map((node) => {
385
- if (node.id === targetNodeId) {
386
- return {
387
- ...node,
388
- config: {
389
- ...(node.config ?? {}),
390
- ...configPatch,
391
- },
392
- };
393
- }
394
- if ((node.childLayouts?.length ?? 0) === 0) {
395
- return node;
396
- }
397
- return {
398
- ...node,
399
- childLayouts: updateLayoutChildConfigById(node.childLayouts, targetNodeId, configPatch),
400
- };
401
- });
402
- }
403
- function updateWidgetChildConfigById(nodes, targetNodeId, nextConfig) {
404
- return nodes.map((node) => {
405
- const childWidgets = (node.childWidgets ?? []).map((widget) => widget.id === targetNodeId
406
- ? { ...widget, config: nextConfig }
407
- : widget);
408
- const childLayouts = (node.childLayouts?.length ?? 0) > 0
409
- ? updateWidgetChildConfigById(node.childLayouts, targetNodeId, nextConfig)
410
- : node.childLayouts ?? [];
411
- const changed = childWidgets.some((widget, index) => widget !== node.childWidgets?.[index]) ||
412
- childLayouts.some((layout, index) => layout !== node.childLayouts?.[index]);
413
- return changed ? { ...node, childWidgets, childLayouts } : node;
414
- });
415
- }
416
293
  export function PhiStructureRegionScaffold({ config, serverPreview, structureDraftsByArea, pageDraftsByScope, effectsLabels, authoringToolsLabels, pickerLabels, containerStyle, containerClassName, }) {
417
- const { token } = antdTheme.useToken();
294
+ const { token } = usePhiConfig();
418
295
  const activeModules = usePhiRuntimeModuleState();
419
296
  const authoringCanvas = usePhiBuilderAuthoringCanvas();
420
297
  const builderState = {
@@ -425,7 +302,6 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
425
302
  pickerWidgetCategoryFilters: usePhiDeveloperBuilderStateValue("public", (state) => state.pickerWidgetCategoryFilters),
426
303
  selectedLayoutAnchor: usePhiDeveloperBuilderStateValue("public", (state) => state.selectedRootRegionKey === config.regionKey ? state.selectedLayoutAnchor : null),
427
304
  regionSelected: usePhiDeveloperBuilderStateValue("public", (state) => state.nodeKind === "region" && state.selectedRegionKey === config.regionKey),
428
- regionDrafts: usePhiDeveloperBuilderStateValue("public", (state) => state.regionDrafts),
429
305
  };
430
306
  const builderModuleMetas = usePhiBuilderModuleMetas(builderState.area);
431
307
  const layoutMetasByType = useMemo(() => buildPhiBuilderContainerMetaMap(builderModuleMetas.plugins), [builderModuleMetas.plugins]);
@@ -464,22 +340,20 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
464
340
  fallbackPageDraft ??
465
341
  getDefaultRegionDraft(config.regionKey);
466
342
  const draftGeometry = resolvePhiRenderableBlockGeometry(effectiveDraft);
467
- const rootNodeDefinition = effectiveDraft?.rootNodeKind == null || !effectiveDraft.rootNodeTypeKey
468
- ? null
469
- : layoutMetasByType.get(effectiveDraft.rootNodeTypeKey) ?? null;
343
+ const rootNodeDefinition = effectiveDraft?.rootNode
344
+ ? layoutMetasByType.get(effectiveDraft.rootNode.widgetType) ?? null
345
+ : null;
470
346
  const offsetTop = effectiveDraft?.offsetTop ?? 0;
471
347
  const shouldFillAvailableHeight = isFullHeightRegion &&
472
- effectiveDraft?.regionConfig?.fullHeight !== false &&
348
+ hasPhiConfigFlag(effectiveDraft?.regionConfig, PhiCmsFlags.FullHeight) &&
473
349
  draftGeometry.block.size == null &&
474
350
  draftGeometry.block.min == null &&
475
351
  draftGeometry.block.max == null;
476
352
  const shouldStretchAvailableHeight = shouldFillAvailableHeight || shouldStretchContentRegion;
477
353
  const hasExplicitSidebarWidth = isFullHeightRegion && draftGeometry.explicitInline;
478
- const slotBackgroundStyle = effectiveDraft?.background
479
- ? resolvePhiBackgroundWidgetStyle({
480
- ...effectiveDraft.background,
481
- effect: effectiveDraft.effect ?? null,
482
- })
354
+ const regionToneClassName = resolvePhiSurfaceToneClassName(effectiveDraft?.surface?.tone);
355
+ const slotBackgroundStyle = effectiveDraft?.surface?.background
356
+ ? resolvePhiBackgroundWidgetStyle(effectiveDraft.surface.background)
483
357
  : {};
484
358
  /*
485
359
  * Whether the author gave this Region a ground. The Builder writes a Background config onto every
@@ -487,8 +361,8 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
487
361
  * transparent in the live Shell, and the Canvas keeps that legible: its slot paints a half-transparent
488
362
  * container tint, so the Theme Root Background stays visible through it.
489
363
  */
490
- const hasAuthoredGround = phiBackgroundWidgetConfigPaintsGround(effectiveDraft?.background);
491
- const slotBorderStyle = effectiveDraft?.border ? resolvePhiBorderWidgetStyle(effectiveDraft.border) : {};
364
+ const hasAuthoredGround = phiBackgroundWidgetConfigPaintsGround(effectiveDraft?.surface?.background ?? null);
365
+ const slotBorderStyle = effectiveDraft?.surface?.border ? resolvePhiBorderWidgetStyle(effectiveDraft.surface.border) : {};
492
366
  const regionConfig = (effectiveDraft?.regionConfig ?? null);
493
367
  const regionPaddingStyle = resolvePhiPaddingStyle(normalizePhiPaddingWidgetConfig(effectiveDraft?.regionConfig) ?? {});
494
368
  const resolvedRegionZIndex = effectiveDraft?.zIndex ??
@@ -527,26 +401,24 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
527
401
  : draftGeometry.block.max?.css ?? draftHeight;
528
402
  const slotBodyMinHeight = resolveSlotBodyMinHeight(draftGeometry, shouldFillAvailableHeight ? 0 : resolvedFallbackMinHeight, slotKind === "structure");
529
403
  const slotBodyFallbackHeight = slotBodyMinHeight ?? `${resolvedFallbackMinHeight}px`;
530
- const hasRootNode = effectiveDraft?.rootNodeTypeKey != null;
404
+ const hasRootNode = effectiveDraft?.rootNode != null;
531
405
  const shouldUseFallbackBodyHeightForRoot = shouldFillAvailableHeight;
532
406
  const resolvedRootBodyHeight = hasRootNode
533
407
  ? (slotHeight ??
534
408
  (shouldUseFallbackBodyHeightForRoot ? slotBodyFallbackHeight : undefined) ??
535
409
  (shouldStretchAvailableHeight ? "100%" : undefined))
536
410
  : undefined;
537
- const rootNodeId = effectiveDraft?.rootNodeId ?? null;
538
- const rootNodeKind = effectiveDraft?.rootNodeKind ?? null;
539
- const rootNodeTypeKey = effectiveDraft?.rootNodeTypeKey ?? "";
540
- const rootNodeChildLayouts = effectiveDraft?.rootNodeChildLayouts ?? [];
541
- const rootNodeChildWidgets = effectiveDraft?.rootNodeChildWidgets ?? [];
542
- const resolvedRootNodeAnchor = effectiveDraft?.rootNodeAnchor ?? builderState.selectedLayoutAnchor;
543
- const resolveNextSlotSortOrder = (slotIndex) => {
544
- const slotChildren = [
545
- ...rootNodeChildLayouts.filter((layout) => layout.slotIndex === slotIndex),
546
- ...rootNodeChildWidgets.filter((widget) => widget.slotIndex === slotIndex),
547
- ];
548
- return slotChildren.reduce((maxSortOrder, child) => Math.max(maxSortOrder, child.sortOrder), -1) + 1;
549
- };
411
+ const rootNode = effectiveDraft?.rootNode ?? null;
412
+ const rootNodeId = rootNode?.id ?? null;
413
+ const rootNodeKind = rootNode ? "layout" : null;
414
+ const rootNodeTypeKey = rootNode?.widgetType ?? "";
415
+ const rootNodeChildLayouts = readPhiBuilderRegionRootChildLayouts(effectiveDraft);
416
+ const rootNodeChildWidgets = readPhiBuilderRegionRootChildWidgets(effectiveDraft);
417
+ // The root Layout's anchor is read off its config, as every Layout's is.
418
+ const rootNodeProps = rootNode ? resolveLayoutNodeRootProps(rootNode) : null;
419
+ const resolvedRootNodeAnchor = rootNodeProps?.editSlotAnchor ?? builderState.selectedLayoutAnchor;
420
+ /** The draft patch that gives the root Layout these children; a side left out stays as it is. */
421
+ const rootChildren = (children) => rootNode ? { rootNode: withPhiBuilderRegionRootChildren({ rootNode }, children).rootNode } : {};
550
422
  const openRootInspector = (options) => {
551
423
  if (!hasRootNode || isPreviewMode || !rootNodeKind) {
552
424
  return;
@@ -580,101 +452,44 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
580
452
  childLayouts: rootNodeChildLayouts,
581
453
  childWidgets: rootNodeChildWidgets,
582
454
  });
583
- if (targetNodeId === rootNodeId) {
584
- updateDraftAndPruneSignalRoutes({
585
- rootNodeId: null,
586
- rootNodeTypeKey: null,
587
- rootNodeKind: null,
588
- rootNodeTitle: null,
589
- rootNodePackageName: null,
590
- rootNodeGeometry: null,
591
- rootNodePadding: null,
592
- rootNodeAnchor: null,
593
- rootNodeBackground: null,
594
- rootNodeBorder: null,
595
- rootNodeShadow: null,
596
- shadow: null,
597
- rootNodeChildLayouts: [],
598
- rootNodeChildWidgets: [],
599
- }, deletedAddresses);
600
- return;
601
- }
602
- const nextChildLayouts = targetNodeKind === "widget"
603
- ? removeWidgetChildById(rootNodeChildLayouts, targetNodeId)
604
- : removeLayoutChildById(rootNodeChildLayouts, targetNodeId);
605
- const nextChildWidgets = targetNodeKind === "widget"
606
- ? removeContentWidgetById(rootNodeChildWidgets, targetNodeId)
607
- : rootNodeChildWidgets;
608
- const compactedChildren = compactsPhiCmsSequentialSlots(rootNodeDefinition)
609
- ? compactPhiCmsSequentialChildren({
610
- childLayouts: nextChildLayouts,
611
- childWidgets: nextChildWidgets,
612
- })
613
- : {
614
- childLayouts: nextChildLayouts,
615
- childWidgets: nextChildWidgets,
616
- };
617
- updateDraftAndPruneSignalRoutes({
618
- rootNodeChildLayouts: compactedChildren.childLayouts,
619
- rootNodeChildWidgets: compactedChildren.childWidgets,
620
- }, deletedAddresses);
621
- };
622
- const updateWidgetNodeConfig = (node, configPatch) => {
623
- if (isPreviewMode || !hasRootNode) {
624
- return;
625
- }
626
- const currentConfig = node.config ?? {};
627
- const nextConfig = {
628
- ...currentConfig,
629
- ...configPatch,
455
+ const deletedNode = rootNode ? findPhiBuilderTreeNode(rootNode, targetNodeId) : null;
456
+ const action = {
457
+ key: "deleteNode",
458
+ subject: deletedNode ? resolvePhiBuilderNodeHistorySubject(builderState.area, deletedNode) : null,
630
459
  };
631
- const signalSubcontrols = activeModules.widgetDefinitionsByType.get(node.widgetType)?.signalSubcontrols;
632
- const nextSubcontrolAddresses = new Set(resolvePhiWidgetSignalSubcontrolAddresses({
633
- blockId: node.id,
634
- config: nextConfig,
635
- signalSubcontrols,
636
- }));
637
- const removedSubcontrolAddresses = resolvePhiWidgetSignalSubcontrolAddresses({
638
- blockId: node.id,
639
- config: currentConfig,
640
- signalSubcontrols,
641
- }).filter((address) => !nextSubcontrolAddresses.has(address));
642
- const nextChildWidgets = rootNodeChildWidgets.map((widget) => widget.id === node.id
643
- ? {
644
- ...widget,
645
- config: nextConfig,
646
- }
647
- : widget);
648
- const nextChildLayouts = updateWidgetChildConfigById(rootNodeChildLayouts, node.id, nextConfig);
649
- if (removedSubcontrolAddresses.length > 0) {
650
- updateDraftAndPruneSignalRoutes({
651
- rootNodeChildLayouts: nextChildLayouts,
652
- rootNodeChildWidgets: nextChildWidgets,
653
- }, removedSubcontrolAddresses);
460
+ if (targetNodeId === rootNodeId) {
461
+ updateDraftAndPruneSignalRoutes({ rootNode: null }, deletedAddresses, action);
654
462
  return;
655
463
  }
656
- updateDraft({
657
- rootNodeChildLayouts: nextChildLayouts,
658
- rootNodeChildWidgets: nextChildWidgets,
464
+ const remaining = removePhiStructureNode({
465
+ children: { childLayouts: rootNodeChildLayouts, childWidgets: rootNodeChildWidgets },
466
+ nodeId: targetNodeId,
467
+ nodeKind: targetNodeKind === "widget" ? "widget" : "layout",
468
+ rootDefinition: rootNodeDefinition,
469
+ layoutMetasByType,
659
470
  });
471
+ updateDraftAndPruneSignalRoutes(rootChildren(remaining), deletedAddresses, action);
660
472
  };
661
- const updateLayoutNodeConfig = (node, configPatch) => {
473
+ /*
474
+ * A config edit made on the Canvas itself -- an inline text, the effects button, a slot title -- goes
475
+ * the one way every in-place node edit goes (`writePhiBuilderNode`), the same as the Inspector's.
476
+ */
477
+ const writeNodeConfig = (nodeId, configPatch) => {
662
478
  if (isPreviewMode || !hasRootNode) {
663
479
  return;
664
480
  }
665
- if (node.id === rootNodeId) {
666
- updateDraft({
667
- rootNodeConfig: {
668
- ...(effectiveDraft?.rootNodeConfig ?? {}),
669
- ...configPatch,
670
- },
671
- });
672
- return;
673
- }
674
- updateDraft({
675
- rootNodeChildLayouts: updateLayoutChildConfigById(rootNodeChildLayouts, node.id, configPatch),
481
+ writePhiBuilderNode({
482
+ area: builderState.area,
483
+ pageKey: builderState.pageKey,
484
+ regionKey: config.regionKey,
485
+ draftKey,
486
+ baseDraft: readCurrentDraft(),
487
+ nodeId,
488
+ patchConfig: (current) => ({ ...current, ...configPatch }),
676
489
  });
677
490
  };
491
+ const updateWidgetNodeConfig = (node, configPatch) => writeNodeConfig(node.id, configPatch);
492
+ const updateLayoutNodeConfig = (node, configPatch) => writeNodeConfig(node.id, configPatch);
678
493
  const resolveStructureDragData = (node, title) => ({
679
494
  area: builderState.area,
680
495
  pageKey: builderState.pageKey,
@@ -708,13 +523,13 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
708
523
  return false;
709
524
  }
710
525
  const sourceDraft = getPhiDeveloperRegionDraftsSnapshot()[getPhiBuilderRegionDraftKey(payload.area, payload.regionKey, payload.pageKey)] ?? null;
711
- if (!sourceDraft?.rootNodeId || !sourceDraft.rootNodeTypeKey) {
526
+ if (!sourceDraft?.rootNode) {
712
527
  return false;
713
528
  }
714
529
  draggedNode =
715
- payload.nodeId === sourceDraft.rootNodeId
530
+ payload.nodeId === sourceDraft.rootNode?.id
716
531
  ? buildStructureRootLayoutNode(sourceDraft, target.parentLayoutNodeId, target.slotIndex)
717
- : extractStructureNode(sourceDraft.rootNodeChildLayouts ?? [], sourceDraft.rootNodeChildWidgets ?? [], payload.nodeId, payload.nodeKind).node;
532
+ : extractStructureNode(readPhiBuilderRegionRootChildLayouts(sourceDraft), readPhiBuilderRegionRootChildWidgets(sourceDraft), payload.nodeId, payload.nodeKind).node;
718
533
  targetTreeLayouts = rootNodeChildLayouts;
719
534
  targetTreeWidgets = rootNodeChildWidgets;
720
535
  }
@@ -783,17 +598,17 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
783
598
  return false;
784
599
  }
785
600
  const { sourceDraft } = resolveWidgetSwapSourceDraft(payload);
786
- if (!sourceDraft?.rootNodeId || !sourceDraft.rootNodeTypeKey) {
601
+ if (!sourceDraft?.rootNode) {
787
602
  return false;
788
603
  }
789
- return extractStructureNode(sourceDraft.rootNodeChildLayouts ?? [], sourceDraft.rootNodeChildWidgets ?? [], payload.nodeId, "widget").node != null;
604
+ return extractStructureNode(readPhiBuilderRegionRootChildLayouts(sourceDraft), readPhiBuilderRegionRootChildWidgets(sourceDraft), payload.nodeId, "widget").node != null;
790
605
  };
791
606
  const swapStructureWidgets = (targetWidget, payload) => {
792
607
  if (!canSwapStructureWidgets(targetWidget, payload) || !rootNodeId) {
793
608
  return;
794
609
  }
795
610
  const { sourceDraftKey, sourceDraft } = resolveWidgetSwapSourceDraft(payload);
796
- if (!sourceDraft?.rootNodeId) {
611
+ if (!sourceDraft?.rootNode?.id) {
797
612
  return;
798
613
  }
799
614
  if (payload.regionKey === config.regionKey) {
@@ -807,21 +622,16 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
807
622
  if (!swapped) {
808
623
  return;
809
624
  }
810
- setPhiDeveloperRegionDraft(draftKey, {
811
- ...effectiveDraft,
812
- rootNodeChildLayouts: swapped.childLayouts,
813
- rootNodeChildWidgets: swapped.childWidgets,
814
- }, {
815
- historyContext,
816
- historyLabel: "Swap widgets",
625
+ setPhiDeveloperRegionDraft(draftKey, withPhiBuilderRegionRootChildren(effectiveDraft, { childLayouts: swapped.childLayouts, childWidgets: swapped.childWidgets }), {
626
+ history: { context: historyContext, action: { key: "swapWidgets", subject: payload.title } },
817
627
  });
818
628
  return;
819
629
  }
820
630
  const swapped = swapPhiStructureWidgetsAcrossTrees({
821
631
  source: {
822
- childLayouts: sourceDraft.rootNodeChildLayouts ?? [],
823
- childWidgets: sourceDraft.rootNodeChildWidgets ?? [],
824
- rootNodeId: sourceDraft.rootNodeId,
632
+ childLayouts: readPhiBuilderRegionRootChildLayouts(sourceDraft),
633
+ childWidgets: readPhiBuilderRegionRootChildWidgets(sourceDraft),
634
+ rootNodeId: sourceDraft.rootNode?.id,
825
635
  widgetId: payload.nodeId,
826
636
  },
827
637
  target: {
@@ -835,19 +645,10 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
835
645
  return;
836
646
  }
837
647
  setPhiDeveloperRegionDraftsWithHistory({
838
- [sourceDraftKey]: {
839
- ...sourceDraft,
840
- rootNodeChildLayouts: swapped.source.childLayouts,
841
- rootNodeChildWidgets: swapped.source.childWidgets,
842
- },
843
- [draftKey]: {
844
- ...effectiveDraft,
845
- rootNodeChildLayouts: swapped.target.childLayouts,
846
- rootNodeChildWidgets: swapped.target.childWidgets,
847
- },
648
+ [sourceDraftKey]: withPhiBuilderRegionRootChildren(sourceDraft, { childLayouts: swapped.source.childLayouts, childWidgets: swapped.source.childWidgets }),
649
+ [draftKey]: withPhiBuilderRegionRootChildren(effectiveDraft, { childLayouts: swapped.target.childLayouts, childWidgets: swapped.target.childWidgets }),
848
650
  }, {
849
- historyContext,
850
- historyLabel: "Swap widgets",
651
+ history: { context: historyContext, action: { key: "swapWidgets", subject: payload.title } },
851
652
  });
852
653
  };
853
654
  const resolveWidgetSwapDropTarget = (targetWidget) => ({
@@ -883,10 +684,10 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
883
684
  }
884
685
  const sourceDraftKey = getPhiBuilderRegionDraftKey(payload.area, payload.regionKey, payload.pageKey);
885
686
  const sourceDraft = getPhiDeveloperRegionDraftsSnapshot()[sourceDraftKey] ?? null;
886
- if (!sourceDraft?.rootNodeId || !sourceDraft.rootNodeTypeKey) {
687
+ if (!sourceDraft?.rootNode) {
887
688
  return;
888
689
  }
889
- const movingSourceRoot = payload.nodeId === sourceDraft.rootNodeId &&
690
+ const movingSourceRoot = payload.nodeId === sourceDraft.rootNode?.id &&
890
691
  (payload.nodeKind === "layout");
891
692
  const sourceRootNode = movingSourceRoot
892
693
  ? buildStructureRootLayoutNode(sourceDraft, target.parentLayoutNodeId, target.slotIndex)
@@ -897,7 +698,7 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
897
698
  childWidgets: [],
898
699
  node: sourceRootNode,
899
700
  }
900
- : extractStructureNode(sourceDraft.rootNodeChildLayouts ?? [], sourceDraft.rootNodeChildWidgets ?? [], payload.nodeId, payload.nodeKind);
701
+ : extractStructureNode(readPhiBuilderRegionRootChildLayouts(sourceDraft), readPhiBuilderRegionRootChildWidgets(sourceDraft), payload.nodeId, payload.nodeKind);
901
702
  if (!extractedSource.node) {
902
703
  return;
903
704
  }
@@ -932,47 +733,17 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
932
733
  slotIndex: target.slotIndex,
933
734
  sortOrder: Math.max(0, extractedSource.node.sortOrder),
934
735
  };
935
- let nextTargetLayouts = rootNodeChildLayouts;
936
- let nextTargetWidgets = rootNodeChildWidgets;
937
736
  const targetsRoot = target.parentLayoutNodeId === rootNodeId;
938
- if ("contentId" in movedNode) {
939
- if (targetsRoot) {
940
- if (compactTarget) {
941
- const inserted = insertPhiCmsSequentialChild(nextTargetLayouts, nextTargetWidgets, movedNode);
942
- nextTargetLayouts = inserted.childLayouts;
943
- nextTargetWidgets = inserted.childWidgets;
944
- }
945
- else {
946
- nextTargetWidgets = [...nextTargetWidgets, movedNode];
947
- }
948
- }
949
- else {
950
- nextTargetLayouts = appendWidgetChildById(nextTargetLayouts, target.parentLayoutNodeId, movedNode, compactTarget);
951
- }
952
- }
953
- else if (targetsRoot) {
954
- if (compactTarget) {
955
- const inserted = insertPhiCmsSequentialChild(nextTargetLayouts, nextTargetWidgets, movedNode);
956
- nextTargetLayouts = inserted.childLayouts;
957
- nextTargetWidgets = inserted.childWidgets;
958
- }
959
- else {
960
- nextTargetLayouts = [...nextTargetLayouts, movedNode];
961
- }
962
- }
963
- else {
964
- nextTargetLayouts = appendLayoutChildById(nextTargetLayouts, target.parentLayoutNodeId, movedNode, compactTarget);
965
- }
966
- if (targetsRoot && compactTarget) {
967
- const compactedTarget = compactPhiCmsSequentialChildren({
968
- childLayouts: nextTargetLayouts,
969
- childWidgets: nextTargetWidgets,
970
- });
971
- nextTargetLayouts = compactedTarget.childLayouts;
972
- nextTargetWidgets = compactedTarget.childWidgets;
973
- }
974
- const sourceRootDefinition = layoutMetasByType.get(sourceDraft.rootNodeTypeKey) ?? null;
975
- let nextSourceLayouts = compactStructureSequentialLayouts(extractedSource.childLayouts, layoutMetasByType);
737
+ const { childLayouts: nextTargetLayouts, childWidgets: nextTargetWidgets } = insertStructureNodeIntoTarget({
738
+ childLayouts: rootNodeChildLayouts,
739
+ childWidgets: rootNodeChildWidgets,
740
+ movedNode,
741
+ parentLayoutNodeId: target.parentLayoutNodeId,
742
+ targetsRoot,
743
+ compact: compactTarget,
744
+ });
745
+ const sourceRootDefinition = layoutMetasByType.get(sourceDraft.rootNode.widgetType) ?? null;
746
+ let nextSourceLayouts = compactPhiStructureSequentialLayouts(extractedSource.childLayouts, layoutMetasByType);
976
747
  let nextSourceWidgets = extractedSource.childWidgets;
977
748
  if (compactsPhiCmsSequentialSlots(sourceRootDefinition)) {
978
749
  const compactedSource = compactPhiCmsSequentialChildren({
@@ -985,19 +756,10 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
985
756
  setPhiDeveloperRegionDraftsWithHistory({
986
757
  [sourceDraftKey]: movingSourceRoot
987
758
  ? clearStructureRootNode(sourceDraft)
988
- : {
989
- ...sourceDraft,
990
- rootNodeChildLayouts: nextSourceLayouts,
991
- rootNodeChildWidgets: nextSourceWidgets,
992
- },
993
- [draftKey]: {
994
- ...(effectiveDraft ?? getDefaultRegionDraft(config.regionKey)),
995
- rootNodeChildLayouts: compactStructureSequentialLayouts(nextTargetLayouts, layoutMetasByType),
996
- rootNodeChildWidgets: nextTargetWidgets,
997
- },
759
+ : withPhiBuilderRegionRootChildren(sourceDraft, { childLayouts: nextSourceLayouts, childWidgets: nextSourceWidgets }),
760
+ [draftKey]: withPhiBuilderRegionRootChildren((effectiveDraft ?? getDefaultRegionDraft(config.regionKey)), { childLayouts: compactPhiStructureSequentialLayouts(nextTargetLayouts, layoutMetasByType), childWidgets: nextTargetWidgets }),
998
761
  }, {
999
- historyContext,
1000
- historyLabel: "Move structure node",
762
+ history: { context: historyContext, action: { key: "moveNode", subject: payload.title } },
1001
763
  });
1002
764
  return;
1003
765
  }
@@ -1041,51 +803,16 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1041
803
  slotIndex: insertionSlotIndex,
1042
804
  sortOrder: Math.max(0, extracted.node.sortOrder),
1043
805
  };
1044
- let nextChildLayouts = extracted.childLayouts;
1045
- let nextChildWidgets = extracted.childWidgets;
1046
- if ("contentId" in movedNode) {
1047
- if (targetsRoot) {
1048
- if (compactSequential) {
1049
- const inserted = insertPhiCmsSequentialChild(nextChildLayouts, nextChildWidgets, movedNode);
1050
- nextChildLayouts = inserted.childLayouts;
1051
- nextChildWidgets = inserted.childWidgets;
1052
- }
1053
- else {
1054
- nextChildWidgets = [...nextChildWidgets, movedNode];
1055
- }
1056
- }
1057
- else {
1058
- nextChildLayouts = appendWidgetChildById(nextChildLayouts, target.parentLayoutNodeId, movedNode, compactSequential);
1059
- }
1060
- }
1061
- else if (targetsRoot) {
1062
- if (compactSequential) {
1063
- const inserted = insertPhiCmsSequentialChild(nextChildLayouts, nextChildWidgets, movedNode);
1064
- nextChildLayouts = inserted.childLayouts;
1065
- nextChildWidgets = inserted.childWidgets;
1066
- }
1067
- else {
1068
- nextChildLayouts = [...nextChildLayouts, movedNode];
1069
- }
1070
- }
1071
- else {
1072
- nextChildLayouts = appendLayoutChildById(nextChildLayouts, target.parentLayoutNodeId, movedNode, compactSequential);
1073
- }
1074
- if (targetsRoot && compactSequential) {
1075
- const compacted = compactPhiCmsSequentialChildren({
1076
- childLayouts: nextChildLayouts,
1077
- childWidgets: nextChildWidgets,
1078
- });
1079
- nextChildLayouts = compacted.childLayouts;
1080
- nextChildWidgets = compacted.childWidgets;
1081
- }
1082
- setPhiDeveloperRegionDraft(draftKey, {
1083
- ...(effectiveDraft ?? getDefaultRegionDraft(config.regionKey)),
1084
- rootNodeChildLayouts: compactStructureSequentialLayouts(nextChildLayouts, layoutMetasByType),
1085
- rootNodeChildWidgets: nextChildWidgets,
1086
- }, {
1087
- historyContext,
1088
- historyLabel: "Move structure node",
806
+ const { childLayouts: nextChildLayouts, childWidgets: nextChildWidgets } = insertStructureNodeIntoTarget({
807
+ childLayouts: extracted.childLayouts,
808
+ childWidgets: extracted.childWidgets,
809
+ movedNode,
810
+ parentLayoutNodeId: target.parentLayoutNodeId,
811
+ targetsRoot,
812
+ compact: compactSequential,
813
+ });
814
+ setPhiDeveloperRegionDraft(draftKey, withPhiBuilderRegionRootChildren((effectiveDraft ?? getDefaultRegionDraft(config.regionKey)), { childLayouts: compactPhiStructureSequentialLayouts(nextChildLayouts, layoutMetasByType), childWidgets: nextChildWidgets }), {
815
+ history: { context: historyContext, action: { key: "moveNode", subject: payload.title } },
1089
816
  });
1090
817
  };
1091
818
  const canDropStructureNodeAsRoot = (payload) => {
@@ -1101,21 +828,15 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1101
828
  return false;
1102
829
  }
1103
830
  const sourceDraft = getPhiDeveloperRegionDraftsSnapshot()[getPhiBuilderRegionDraftKey(payload.area, payload.regionKey, payload.pageKey)] ?? null;
1104
- if (!sourceDraft?.rootNodeId ||
1105
- !sourceDraft.rootNodeTypeKey ||
1106
- !sourceDraft.rootNodeKind) {
1107
- return false;
1108
- }
1109
- const movingSourceRoot = payload.nodeId === sourceDraft.rootNodeId;
1110
- if (movingSourceRoot &&
1111
- sourceDraft.rootNodeKind !== "layout") {
831
+ if (!sourceDraft?.rootNode) {
1112
832
  return false;
1113
833
  }
834
+ const movingSourceRoot = payload.nodeId === sourceDraft.rootNode.id;
1114
835
  const extractedSource = movingSourceRoot
1115
836
  ? null
1116
- : extractStructureNode(sourceDraft.rootNodeChildLayouts ?? [], sourceDraft.rootNodeChildWidgets ?? [], payload.nodeId, payload.nodeKind);
837
+ : extractStructureNode(readPhiBuilderRegionRootChildLayouts(sourceDraft), readPhiBuilderRegionRootChildWidgets(sourceDraft), payload.nodeId, payload.nodeKind);
1117
838
  if (!movingSourceRoot &&
1118
- (!extractedSource?.node || "contentId" in extractedSource.node)) {
839
+ (!extractedSource?.node || "contentVersionId" in extractedSource.node)) {
1119
840
  return false;
1120
841
  }
1121
842
  return true;
@@ -1126,10 +847,10 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1126
847
  }
1127
848
  const sourceDraftKey = getPhiBuilderRegionDraftKey(payload.area, payload.regionKey, payload.pageKey);
1128
849
  const sourceDraft = getPhiDeveloperRegionDraftsSnapshot()[sourceDraftKey];
1129
- const movingSourceRoot = payload.nodeId === sourceDraft.rootNodeId;
850
+ const movingSourceRoot = payload.nodeId === sourceDraft.rootNode?.id;
1130
851
  const extractedSource = movingSourceRoot
1131
852
  ? null
1132
- : extractStructureNode(sourceDraft.rootNodeChildLayouts ?? [], sourceDraft.rootNodeChildWidgets ?? [], payload.nodeId, payload.nodeKind);
853
+ : extractStructureNode(readPhiBuilderRegionRootChildLayouts(sourceDraft), readPhiBuilderRegionRootChildWidgets(sourceDraft), payload.nodeId, payload.nodeKind);
1133
854
  let nextSourceDraft;
1134
855
  let nextTargetDraft;
1135
856
  const targetBase = effectiveDraft ?? getDefaultRegionDraft(config.regionKey);
@@ -1138,8 +859,8 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1138
859
  nextTargetDraft = copyStructureRootNode(targetBase, sourceDraft);
1139
860
  }
1140
861
  else {
1141
- const sourceRootDefinition = layoutMetasByType.get(sourceDraft.rootNodeTypeKey) ?? null;
1142
- let nextSourceLayouts = compactStructureSequentialLayouts(extractedSource.childLayouts, layoutMetasByType);
862
+ const sourceRootDefinition = layoutMetasByType.get(sourceDraft.rootNode.widgetType) ?? null;
863
+ let nextSourceLayouts = compactPhiStructureSequentialLayouts(extractedSource.childLayouts, layoutMetasByType);
1143
864
  let nextSourceWidgets = extractedSource.childWidgets;
1144
865
  if (compactsPhiCmsSequentialSlots(sourceRootDefinition)) {
1145
866
  const compactedSource = compactPhiCmsSequentialChildren({
@@ -1149,19 +870,14 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1149
870
  nextSourceLayouts = compactedSource.childLayouts;
1150
871
  nextSourceWidgets = compactedSource.childWidgets;
1151
872
  }
1152
- nextSourceDraft = {
1153
- ...sourceDraft,
1154
- rootNodeChildLayouts: nextSourceLayouts,
1155
- rootNodeChildWidgets: nextSourceWidgets,
1156
- };
873
+ nextSourceDraft = withPhiBuilderRegionRootChildren(sourceDraft, { childLayouts: nextSourceLayouts, childWidgets: nextSourceWidgets });
1157
874
  nextTargetDraft = promoteStructureLayoutToRoot(targetBase, extractedSource.node);
1158
875
  }
1159
876
  setPhiDeveloperRegionDraftsWithHistory({
1160
877
  [sourceDraftKey]: nextSourceDraft,
1161
878
  [draftKey]: nextTargetDraft,
1162
879
  }, {
1163
- historyContext,
1164
- historyLabel: "Move layout to region root",
880
+ history: { context: historyContext, action: { key: "moveLayoutToRoot", subject: payload.title } },
1165
881
  });
1166
882
  };
1167
883
  const rootDropTarget = !isPreviewMode && !hasRootNode
@@ -1199,23 +915,12 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1199
915
  return activeModules.layoutTypes.has(`${pluginKey}/${typeKey}`);
1200
916
  });
1201
917
  const pickerPlacement = config.regionKey === "sider_left" ? "right" : "top";
1202
- const rootNodeScaffold = hasRootNode
918
+ const rootNodeScaffold = rootNodeProps
1203
919
  ? renderPhiRootNodeScaffold({
920
+ // The root Layout is scaffolded from its node, as every Layout below it is.
921
+ ...rootNodeProps,
1204
922
  regionKey: config.regionKey,
1205
- id: rootNodeId,
1206
- typeKey: rootNodeTypeKey,
1207
- kind: rootNodeKind,
1208
- title: effectiveDraft?.rootNodeTitle ?? null,
1209
- packageName: effectiveDraft?.rootNodePackageName ?? null,
1210
923
  editSlotAnchor: resolvedRootNodeAnchor,
1211
- rootNodeConfig: effectiveDraft?.rootNodeConfig ?? null,
1212
- rootNodeGeometry: effectiveDraft?.rootNodeGeometry ?? null,
1213
- rootNodePadding: effectiveDraft?.rootNodePadding ?? null,
1214
- rootNodeBackground: effectiveDraft?.rootNodeBackground ?? null,
1215
- rootNodeBorder: effectiveDraft?.rootNodeBorder ?? null,
1216
- rootNodeShadow: effectiveDraft?.rootNodeShadow ?? null,
1217
- childLayouts: rootNodeChildLayouts,
1218
- childWidgets: rootNodeChildWidgets,
1219
924
  }, openSlot, openRootInspector, deleteRootNode, updateWidgetNodeConfig, updateLayoutNodeConfig, {
1220
925
  effectsLabels,
1221
926
  authoringToolsLabels,
@@ -1242,122 +947,55 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1242
947
  regionKey: config.regionKey,
1243
948
  builderPlugins: builderModuleMetas.plugins,
1244
949
  });
1245
- const targetLayoutNodeId = currentSlotPickerContext?.targetNodeId ?? rootNodeId;
1246
- const targetsRootLayout = targetLayoutNodeId === rootNodeId;
1247
- const parentLayoutNodeId = targetLayoutNodeId;
1248
- const insertionSlotIndex = currentSlotPickerContext?.slotIndex ?? null;
1249
- const parentLayoutNode = targetsRootLayout || targetLayoutNodeId == null
1250
- ? null
1251
- : findPhiBuilderLayoutNodeById(rootNodeChildLayouts, targetLayoutNodeId);
1252
- const parentLayoutDefinition = parentLayoutNode == null
1253
- ? rootNodeDefinition
1254
- : layoutMetasByType.get(parentLayoutNode.widgetType) ?? null;
1255
- const compactSequential = compactsPhiCmsSequentialSlots(parentLayoutDefinition);
1256
- const isSlotInsertion = hasRootNode &&
1257
- insertionSlotIndex != null &&
1258
- parentLayoutNodeId != null;
1259
- if (isSlotInsertion
1260
- && item.kind === "widget"
1261
- && currentSlotPickerContext?.allowWidgetSection
1262
- && insertionSlotIndex != null
1263
- && parentLayoutNodeId != null) {
1264
- const nextWidget = buildInsertedWidgetNode(item, instanceId, parentLayoutNodeId, insertionSlotIndex, resolveNextSlotSortOrder(insertionSlotIndex));
1265
- updateDraft(!targetsRootLayout
1266
- ? {
1267
- rootNodeChildLayouts: appendWidgetChildById(rootNodeChildLayouts, parentLayoutNodeId, nextWidget, compactSequential),
1268
- }
1269
- : compactSequential
1270
- ? (() => {
1271
- const nextChildren = compactPhiCmsSequentialChildren({
1272
- childLayouts: rootNodeChildLayouts,
1273
- childWidgets: [...rootNodeChildWidgets, nextWidget],
1274
- });
1275
- return {
1276
- rootNodeChildLayouts: nextChildren.childLayouts,
1277
- rootNodeChildWidgets: nextChildren.childWidgets,
1278
- };
1279
- })()
1280
- : { rootNodeChildWidgets: [...rootNodeChildWidgets, nextWidget] });
1281
- }
1282
- else if (isSlotInsertion
1283
- && item.kind !== "widget"
1284
- && currentSlotPickerContext?.allowLayoutSection
1285
- && insertionSlotIndex != null
1286
- && parentLayoutNodeId != null) {
1287
- const nextLayout = buildInsertedLayoutNode(item, instanceId, parentLayoutNodeId, insertionSlotIndex, resolveNextSlotSortOrder(insertionSlotIndex));
1288
- /*
1289
- * An append that cannot find its parent returns the tree it was given, unchanged and without
1290
- * complaint -- the picker closes, the draft is written, and the slot is as empty as before. That
1291
- * is indistinguishable from a refusal, so say which of the two happened.
1292
- */
1293
- if (!targetsRootLayout) {
1294
- const countNodes = (nodes) => nodes.reduce((total, node) => total + 1 + countNodes(node.childLayouts ?? []), 0);
1295
- const appended = appendLayoutChildById(rootNodeChildLayouts, parentLayoutNodeId, nextLayout, compactSequential);
1296
- if (countNodes(appended) === countNodes(rootNodeChildLayouts)) {
1297
- console.error("Phi Builder: the Layout was built but its parent slot was not found, so nothing was added.", {
1298
- parentLayoutNodeId,
1299
- insertionSlotIndex,
1300
- compactSequential,
1301
- parentSlotPositions: parentLayoutDefinition?.slotPositions ?? null,
1302
- knownRootChildIds: rootNodeChildLayouts.map((node) => node.id),
1303
- });
1304
- }
1305
- }
1306
- updateDraft(!targetsRootLayout
1307
- ? {
1308
- rootNodeChildLayouts: appendLayoutChildById(rootNodeChildLayouts, parentLayoutNodeId, nextLayout, compactSequential),
1309
- }
1310
- : compactSequential
1311
- ? (() => {
1312
- const nextChildren = compactPhiCmsSequentialChildren({
1313
- childLayouts: [...rootNodeChildLayouts, nextLayout],
1314
- childWidgets: rootNodeChildWidgets,
1315
- });
1316
- return {
1317
- rootNodeChildLayouts: nextChildren.childLayouts,
1318
- rootNodeChildWidgets: nextChildren.childWidgets,
1319
- };
1320
- })()
1321
- : { rootNodeChildLayouts: [...rootNodeChildLayouts, nextLayout] });
1322
- }
1323
- else if (!hasRootNode) {
1324
- const resolvedDefaultConfig = resolveInsertedItemDefaultConfig(item);
1325
- const rootNodeDefaults = resolvePhiBuilderRootNodeDefaults(resolvedDefaultConfig);
1326
- updateDraft({
1327
- rootNodeId: instanceId,
1328
- rootNodeTypeKey: item.key,
1329
- rootNodeKind: item.kind,
1330
- rootNodeTitle: item.title,
1331
- rootNodePackageName: resolvePickItemPackageName(item),
1332
- rootNodeConfig: resolvedDefaultConfig,
1333
- rootNodeGeometry: null,
1334
- rootNodeAnchor: item.defaultAnchor ?? null,
1335
- rootNodePadding: rootNodeDefaults.rootNodePadding,
1336
- rootNodeBackground: rootNodeDefaults.rootNodeBackground,
1337
- rootNodeBorder: rootNodeDefaults.rootNodeBorder,
1338
- rootNodeShadow: readPhiShadow(resolvedDefaultConfig?.shadow) ?? null,
1339
- rootNodeChildLayouts: [],
1340
- rootNodeChildWidgets: [],
1341
- });
950
+ /*
951
+ * The tree as it stands now, not as it stood when the picker opened: allocating the id waits for
952
+ * the server, and an edit made meanwhile -- in this Region or by the Inspector -- would otherwise
953
+ * be written over by the tree read at render.
954
+ */
955
+ const currentDraft = readCurrentDraft();
956
+ const currentRootNode = currentDraft.rootNode ?? null;
957
+ const action = { key: "insertNode", subject: item.title };
958
+ if (!currentRootNode) {
959
+ // The root Layout is created like every Layout below it.
960
+ updateDraft({ rootNode: buildInsertedLayoutNode(item, instanceId, null, 0, 0) }, action);
961
+ return;
1342
962
  }
1343
- else {
963
+ const targetLayoutNodeId = currentSlotPickerContext?.targetNodeId ?? currentRootNode.id;
964
+ const insertionSlotIndex = currentSlotPickerContext?.slotIndex ?? null;
965
+ const sectionAllowed = item.kind === "widget"
966
+ ? currentSlotPickerContext?.allowWidgetSection === true
967
+ : currentSlotPickerContext?.allowLayoutSection === true;
968
+ const inserted = insertionSlotIndex != null && sectionAllowed
969
+ ? insertPhiStructureNode({
970
+ children: {
971
+ childLayouts: readPhiBuilderRegionRootChildLayouts(currentDraft),
972
+ childWidgets: readPhiBuilderRegionRootChildWidgets(currentDraft),
973
+ },
974
+ rootNodeId: currentRootNode.id,
975
+ rootDefinition: layoutMetasByType.get(currentRootNode.widgetType) ?? null,
976
+ layoutMetasByType,
977
+ parentLayoutNodeId: targetLayoutNodeId,
978
+ slotIndex: insertionSlotIndex,
979
+ buildNode: (sortOrder) => item.kind === "widget"
980
+ ? buildInsertedWidgetNode(item, instanceId, targetLayoutNodeId, insertionSlotIndex, sortOrder)
981
+ : buildInsertedLayoutNode(item, instanceId, targetLayoutNodeId, insertionSlotIndex, sortOrder),
982
+ })
983
+ : null;
984
+ if (!inserted) {
1344
985
  /*
1345
- * Nothing matched, and a pick that does nothing must at least say so.
986
+ * Nothing was inserted, and a pick that does nothing must at least say so.
1346
987
  *
1347
988
  * The picker closes on every pick, so a refused insertion and a successful one look the same:
1348
- * the panel goes away and the slot is unchanged. Four conditions can refuse it -- no root node,
1349
- * no slot index, a section the context does not allow, or a target that could not be read -- and
1350
- * from outside they are one symptom. The Builder is authoring, so this goes to the console with
1351
- * the state that decided it rather than to the author as a message they cannot act on.
989
+ * the panel goes away and the slot is unchanged. No slot index, a section the context does not
990
+ * allow, or a target Layout that is gone by the time the id arrived are one symptom from
991
+ * outside. The Builder is authoring, so this goes to the console with the state that decided
992
+ * it rather than to the author as a message they cannot act on.
1352
993
  */
1353
994
  console.error("Phi Builder: the picked item was not inserted.", {
1354
995
  item: { key: item.key, kind: item.kind, title: item.title },
1355
- isSlotInsertion,
1356
- hasRootNode,
1357
996
  insertionSlotIndex,
1358
997
  targetLayoutNodeId,
1359
- targetsRootLayout,
1360
- parentSlotPositions: parentLayoutDefinition?.slotPositions ?? null,
998
+ sectionAllowed,
1361
999
  slotPickerContext: currentSlotPickerContext
1362
1000
  ? {
1363
1001
  allowWidgetSection: currentSlotPickerContext.allowWidgetSection,
@@ -1368,14 +1006,11 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1368
1006
  targetNodeId: currentSlotPickerContext.targetNodeId,
1369
1007
  }
1370
1008
  : null,
1371
- // The condition each branch wanted, so the failing one names itself.
1372
- wantedByWidgetBranch: isSlotInsertion && item.kind === "widget"
1373
- && currentSlotPickerContext?.allowWidgetSection === true,
1374
- wantedByLayoutBranch: isSlotInsertion && item.kind !== "widget"
1375
- && currentSlotPickerContext?.allowLayoutSection === true,
1009
+ knownRootChildIds: readPhiBuilderRegionRootChildLayouts(currentDraft).map((node) => node.id),
1376
1010
  });
1377
1011
  return;
1378
1012
  }
1013
+ updateDraft({ rootNode: withPhiBuilderRegionRootChildren({ rootNode: currentRootNode }, inserted).rootNode }, action);
1379
1014
  }
1380
1015
  const pickerActionIconFrameSize = token.controlHeight;
1381
1016
  const pickerActionIconSize = token.fontSizeHeading4;
@@ -1402,7 +1037,7 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1402
1037
  return;
1403
1038
  }
1404
1039
  // Seed the structure workspace exactly once per draft key.
1405
- // An empty draft with `rootNodeTypeKey: null` is still a valid loaded state,
1040
+ // An empty draft with `rootNode: null` is still a valid loaded state,
1406
1041
  // for example after deleting the region root layout or after loading a
1407
1042
  // persisted empty shell region from the server.
1408
1043
  if (regionDraft != null) {
@@ -1414,11 +1049,11 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1414
1049
  if (slotKind === "structure") {
1415
1050
  return;
1416
1051
  }
1417
- if (!fallbackPageDraft || fallbackPageDraft.rootNodeTypeKey == null) {
1052
+ if (!fallbackPageDraft || fallbackPageDraft.rootNode == null) {
1418
1053
  return;
1419
1054
  }
1420
1055
  // Seed the page workspace exactly once per draft key.
1421
- // An empty draft with `rootNodeTypeKey: null` is still a valid loaded state,
1056
+ // An empty draft with `rootNode: null` is still a valid loaded state,
1422
1057
  // for example after deleting the page root layout or after loading a
1423
1058
  // persisted empty page region from the server.
1424
1059
  if (regionDraft != null) {
@@ -1491,53 +1126,58 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1491
1126
  setSlotPickerContext(null);
1492
1127
  }
1493
1128
  function renderInsertPicker({ trigger, slotIndex, targetNodeId, }) {
1494
- const isActiveTarget = isPicking
1495
- && slotPickerContext?.slotIndex === slotIndex
1496
- && slotPickerContext.targetNodeId === targetNodeId;
1497
- return (_jsx(PhiBuilderInsertPickerControl, { open: isActiveTarget, trigger: trigger, items: availablePickItems, section: pickSection, packageFilters: pickPackageFilters, widgetCategoryFilters: widgetCategoryFilters, allowLayoutSection: slotPickerContext?.allowLayoutSection ?? true, allowWidgetSection: slotPickerContext?.allowWidgetSection ?? false, placement: pickerPlacement, labels: pickerLabels, onOpenChange: (nextOpen) => {
1498
- if (!nextOpen && isActiveTarget)
1499
- closePicker();
1500
- }, onSectionChange: setPickSection, onPackageFiltersChange: setPickPackageFilters, onWidgetCategoryFiltersChange: (filters) => {
1501
- patchPhiDeveloperBuilderState("public", { pickerWidgetCategoryFilters: filters });
1502
- }, onChange: (item) => void insertPickedItem(item) }, `insert-picker:${targetNodeId}:${slotIndex}`));
1129
+ return renderPickerControl({
1130
+ key: `insert-picker:${targetNodeId}:${slotIndex}`,
1131
+ isActiveTarget: isPicking
1132
+ && slotPickerContext?.slotIndex === slotIndex
1133
+ && slotPickerContext.targetNodeId === targetNodeId,
1134
+ trigger,
1135
+ });
1503
1136
  }
1504
1137
  function renderRegionPicker(trigger) {
1505
1138
  if (hasRootNode)
1506
1139
  return trigger;
1507
- const isActiveTarget = isPicking
1508
- && slotPickerContext?.slotIndex == null
1509
- && slotPickerContext?.targetNodeId == null;
1140
+ return renderPickerControl({
1141
+ key: `insert-picker:region:${config.regionKey}`,
1142
+ isActiveTarget: isPicking && slotPickerContext?.slotIndex == null && slotPickerContext?.targetNodeId == null,
1143
+ trigger,
1144
+ });
1145
+ }
1146
+ /** The one picker, opened for a slot or for an empty Region; only the key and what makes it active differ. */
1147
+ function renderPickerControl({ key, isActiveTarget, trigger }) {
1510
1148
  return (_jsx(PhiBuilderInsertPickerControl, { open: isActiveTarget, trigger: trigger, items: availablePickItems, section: pickSection, packageFilters: pickPackageFilters, widgetCategoryFilters: widgetCategoryFilters, allowLayoutSection: slotPickerContext?.allowLayoutSection ?? true, allowWidgetSection: slotPickerContext?.allowWidgetSection ?? false, placement: pickerPlacement, labels: pickerLabels, onOpenChange: (nextOpen) => {
1511
1149
  if (!nextOpen && isActiveTarget)
1512
1150
  closePicker();
1513
1151
  }, onSectionChange: setPickSection, onPackageFiltersChange: setPickPackageFilters, onWidgetCategoryFiltersChange: (filters) => {
1514
1152
  patchPhiDeveloperBuilderState("public", { pickerWidgetCategoryFilters: filters });
1515
- }, onChange: (item) => void insertPickedItem(item) }, `insert-picker:region:${config.regionKey}`));
1153
+ }, onChange: (item) => void insertPickedItem(item) }, key));
1516
1154
  }
1517
- function updateDraft(nextDraft) {
1518
- const baseDraft = effectiveDraft ?? getDefaultRegionDraft(config.regionKey);
1155
+ /*
1156
+ * The draft the Region's edits are made against: the one in the store when there is one. An edit
1157
+ * that waits -- an insertion waits for its node's id -- reads it after waiting, so what another edit
1158
+ * wrote meanwhile is kept rather than overwritten by the tree read at render.
1159
+ */
1160
+ function readCurrentDraft() {
1161
+ return getPhiDeveloperRegionDraftsSnapshot()[draftKey] ?? effectiveDraft ?? getDefaultRegionDraft(config.regionKey);
1162
+ }
1163
+ function updateDraft(nextDraft, action) {
1519
1164
  setPhiDeveloperRegionDraft(draftKey, {
1520
- ...baseDraft,
1165
+ ...readCurrentDraft(),
1521
1166
  ...nextDraft,
1522
- }, {
1523
- historyContext,
1524
- historyLabel: "Update structure",
1525
- });
1167
+ }, { history: { context: historyContext, action } });
1526
1168
  }
1527
- function updateDraftAndPruneSignalRoutes(nextDraft, addresses) {
1528
- const baseDraft = effectiveDraft ?? getDefaultRegionDraft(config.regionKey);
1169
+ function updateDraftAndPruneSignalRoutes(nextDraft, addresses, action) {
1529
1170
  const routeScope = isPhiBuilderPageScopedRegion(config.regionKey) ? "page" : "area";
1530
1171
  setPhiDeveloperRegionDraftAndPruneSignalRoutes({
1531
1172
  draftKey,
1532
1173
  draft: {
1533
- ...baseDraft,
1174
+ ...readCurrentDraft(),
1534
1175
  ...nextDraft,
1535
1176
  },
1536
1177
  area: builderState.area,
1537
1178
  pageKey: builderState.pageKey,
1538
1179
  targets: addresses.map((address) => ({ address, scope: routeScope })),
1539
- historyContext,
1540
- historyLabel: "Update structure",
1180
+ history: { context: historyContext, action },
1541
1181
  });
1542
1182
  }
1543
1183
  if (isPreviewMode) {
@@ -1553,7 +1193,7 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1553
1193
  : shouldStretchAvailableHeight
1554
1194
  ? "100%"
1555
1195
  : undefined;
1556
- return (_jsx("div", { "data-phi-region-slot": config.regionKey, className: "phi-builder-structure-region__slot", "data-phi-builder-region-mode": "preview", "data-phi-builder-region-has-root-node": hasRootNode ? "true" : "false", "data-phi-builder-region-selected": "false", "data-phi-builder-region-picking": "false", style: {
1196
+ return (_jsx("div", { "data-phi-region-slot": config.regionKey, className: ["phi-builder-structure-region__slot", regionToneClassName].filter(Boolean).join(" "), "data-phi-builder-region-mode": "preview", "data-phi-builder-region-has-root-node": hasRootNode ? "true" : "false", "data-phi-builder-region-selected": "false", "data-phi-builder-region-picking": "false", style: {
1557
1197
  width: slotWidth,
1558
1198
  minWidth: slotMinWidth,
1559
1199
  maxWidth: slotMaxWidth,
@@ -1564,22 +1204,22 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1564
1204
  ...slotCentreStyle,
1565
1205
  ...slotBackgroundStyle,
1566
1206
  ...slotBorderStyle,
1567
- boxShadow: combinePhiBoxShadows(slotBackgroundStyle.boxShadow, resolvePhiShadow(effectiveDraft?.shadow)),
1207
+ boxShadow: combinePhiBoxShadows(slotBackgroundStyle.boxShadow, resolvePhiShadow(effectiveDraft?.surface?.shadow)),
1568
1208
  zIndex: resolvedRegionZIndex,
1569
1209
  position: resolvedRegionZIndex != null ? "relative" : undefined,
1570
1210
  flex: shouldStretchAvailableHeight ? "1 1 auto" : undefined,
1571
1211
  ...(resolvedRegionTypography.fontSize ? { fontSize: resolvedRegionTypography.fontSize } : {}),
1572
1212
  ...(resolvedRegionTypography.lineHeight ? { lineHeight: resolvedRegionTypography.lineHeight } : {}),
1573
- }, children: _jsx("div", { "data-phi-debug-scaffold": resolvedDebugScaffold, style: {
1574
- flex: "1 1 auto",
1575
- height: previewRootBodyHeight,
1576
- minHeight: shouldStretchAvailableHeight ? 0 : slotBodyMinHeight,
1577
- display: "flex",
1578
- flexDirection: "column",
1579
- justifyContent: "stretch",
1580
- alignItems: "stretch",
1581
- minWidth: 0,
1582
- }, children: previewRoot }) }));
1213
+ }, children: _jsx(PhiSurfaceTone, { tone: effectiveDraft?.surface?.tone, children: _jsx("div", { "data-phi-debug-scaffold": resolvedDebugScaffold, style: {
1214
+ flex: "1 1 auto",
1215
+ height: previewRootBodyHeight,
1216
+ minHeight: shouldStretchAvailableHeight ? 0 : slotBodyMinHeight,
1217
+ display: "flex",
1218
+ flexDirection: "column",
1219
+ justifyContent: "stretch",
1220
+ alignItems: "stretch",
1221
+ minWidth: 0,
1222
+ }, children: previewRoot }) }) }));
1583
1223
  }
1584
1224
  return (_jsxs("div", { className: [
1585
1225
  "phi-builder-structure-region",
@@ -1609,14 +1249,15 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1609
1249
  : {}),
1610
1250
  ...containerStyle,
1611
1251
  }, onClick: isPreviewMode ? undefined : selectRegion, onKeyDown: (event) => {
1612
- if (!config.allowSelect || isPreviewMode) {
1252
+ // Only the region's own focus: Enter on a button inside it is that button's.
1253
+ if (!config.allowSelect || isPreviewMode || event.target !== event.currentTarget) {
1613
1254
  return;
1614
1255
  }
1615
1256
  if (event.key === "Enter" || event.key === " ") {
1616
1257
  event.preventDefault();
1617
1258
  selectRegion();
1618
1259
  }
1619
- }, children: [isPreviewMode ? null : (_jsxs(PhiFlexControl, { vertical: true, gap: 0, style: { minWidth: 0, width: "100%" }, children: [_jsxs(PhiFlexControl, { align: "center", gap: 6, wrap: false, style: { minWidth: 0, width: "100%", whiteSpace: "nowrap" }, children: [_jsx(PhiTypographyControl, { strong: true, style: { minWidth: 0, whiteSpace: "nowrap" }, children: config.title }), _jsxs(PhiTypographyControl, { type: "secondary", style: { minWidth: 0, whiteSpace: "nowrap" }, children: ["\u00B7 ", config.regionKey] })] }), config.subtitle ? (_jsx(PhiTypographyControl, { type: "secondary", style: { display: "block", whiteSpace: "normal", overflowWrap: "anywhere" }, children: config.subtitle })) : null] })), renderRegionPicker(_jsx("div", { ref: setRootDropNodeRef, "data-phi-region-slot": config.regionKey, className: "phi-builder-structure-region__slot", "data-phi-builder-region-mode": "editor", "data-phi-structure-drop-state": rootDropAccepted
1260
+ }, children: [isPreviewMode ? null : (_jsxs(PhiFlexControl, { vertical: true, gap: 0, style: { minWidth: 0, width: "100%" }, children: [_jsxs(PhiFlexControl, { align: "center", gap: 6, wrap: false, style: { minWidth: 0, width: "100%", whiteSpace: "nowrap" }, children: [_jsx(PhiTypographyControl, { strong: true, style: { minWidth: 0, whiteSpace: "nowrap" }, children: config.title }), _jsxs(PhiTypographyControl, { type: "secondary", style: { minWidth: 0, whiteSpace: "nowrap" }, children: ["\u00B7 ", config.regionKey] })] }), config.subtitle ? (_jsx(PhiTypographyControl, { type: "secondary", style: { display: "block", whiteSpace: "normal", overflowWrap: "anywhere" }, children: config.subtitle })) : null] })), renderRegionPicker(_jsx("div", { ref: setRootDropNodeRef, "data-phi-region-slot": config.regionKey, className: ["phi-builder-structure-region__slot", regionToneClassName].filter(Boolean).join(" "), "data-phi-builder-region-mode": "editor", "data-phi-structure-drop-state": rootDropAccepted
1620
1261
  ? "accepted"
1621
1262
  : rootDropIsOver
1622
1263
  ? "rejected"
@@ -1631,7 +1272,7 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1631
1272
  ? token.colorFillQuaternary
1632
1273
  : `color-mix(in srgb, ${token.colorBgContainer} 50%, transparent)`,
1633
1274
  }),
1634
- boxShadow: combinePhiBoxShadows(slotBackgroundStyle.boxShadow, resolvePhiShadow(effectiveDraft?.shadow) ??
1275
+ boxShadow: combinePhiBoxShadows(slotBackgroundStyle.boxShadow, resolvePhiShadow(effectiveDraft?.surface?.shadow) ??
1635
1276
  `inset 0 0 0 1px ${isPicking || isSelected ? token.colorPrimary : token.colorBorderSecondary}`),
1636
1277
  width: slotWidth,
1637
1278
  minWidth: slotMinWidth,
@@ -1661,35 +1302,35 @@ export function PhiStructureRegionScaffold({ config, serverPreview, structureDra
1661
1302
  }
1662
1303
  openSlot();
1663
1304
  }, onKeyDown: (event) => {
1664
- if (!config.allowInsert || hasRootNode) {
1305
+ if (!config.allowInsert || hasRootNode || event.target !== event.currentTarget) {
1665
1306
  return;
1666
1307
  }
1667
1308
  if (event.key === "Enter" || event.key === " ") {
1668
1309
  event.preventDefault();
1669
1310
  openSlot();
1670
1311
  }
1671
- }, children: _jsx("div", { "data-phi-debug-scaffold": resolvedDebugScaffold, style: {
1672
- flex: "1 1 auto",
1673
- minHeight: shouldStretchAvailableHeight ? 0 : slotBodyMinHeight,
1674
- height: resolvedRootBodyHeight,
1675
- boxSizing: "border-box",
1676
- display: "flex",
1677
- flexDirection: "column",
1678
- justifyContent: hasRootNode ? "stretch" : "center",
1679
- alignItems: hasRootNode ? "stretch" : "center",
1680
- ...regionPaddingStyle,
1681
- gap: 0,
1682
- minWidth: 0,
1683
- }, children: hasRootNode ? (rootNodeScaffold ? (rootNodeScaffold) : null) : (_jsx("span", { "aria-hidden": true, style: {
1684
- width: pickerActionIconFrameSize,
1685
- height: pickerActionIconFrameSize,
1686
- lineHeight: 1,
1687
- display: "inline-flex",
1688
- alignItems: "center",
1689
- justifyContent: "center",
1690
- fontSize: pickerActionIconSize,
1691
- color: isPicking ? token.colorPrimary : token.colorTextSecondary,
1692
- }, children: _jsx(PlusOutlined, {}) })) }) }))] }));
1312
+ }, children: _jsx(PhiSurfaceTone, { tone: effectiveDraft?.surface?.tone, children: _jsx("div", { "data-phi-debug-scaffold": resolvedDebugScaffold, style: {
1313
+ flex: "1 1 auto",
1314
+ minHeight: shouldStretchAvailableHeight ? 0 : slotBodyMinHeight,
1315
+ height: resolvedRootBodyHeight,
1316
+ boxSizing: "border-box",
1317
+ display: "flex",
1318
+ flexDirection: "column",
1319
+ justifyContent: hasRootNode ? "stretch" : "center",
1320
+ alignItems: hasRootNode ? "stretch" : "center",
1321
+ ...regionPaddingStyle,
1322
+ gap: 0,
1323
+ minWidth: 0,
1324
+ }, children: hasRootNode ? (rootNodeScaffold ? (rootNodeScaffold) : null) : (_jsx("span", { "aria-hidden": true, style: {
1325
+ width: pickerActionIconFrameSize,
1326
+ height: pickerActionIconFrameSize,
1327
+ lineHeight: 1,
1328
+ display: "inline-flex",
1329
+ alignItems: "center",
1330
+ justifyContent: "center",
1331
+ fontSize: pickerActionIconSize,
1332
+ color: isPicking ? token.colorPrimary : token.colorTextSecondary,
1333
+ }, children: _jsx(PhiIcon, { name: "plus", size: "inherit" }) })) }) }) }))] }));
1693
1334
  }
1694
1335
  export function PhiStructureRegionWidget(props) {
1695
1336
  return _jsx(PhiStructureRegionScaffold, { ...props });