@phis/ui 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/components/cms/phi-cms-layout-renderer.js +4 -3
  2. package/components/cms/phi-cms-page-render-scope.d.ts +4 -5
  3. package/components/cms/phi-cms-page-render-scope.js +43 -22
  4. package/components/cms/phi-cms-render-diagnostic-client.js +7 -3
  5. package/components/cms/phi-cms-render-error-boundary.js +2 -1
  6. package/components/controls/phi-anchor-nav-control.js +4 -1
  7. package/components/controls/phi-background-control.js +21 -6
  8. package/components/controls/phi-bullet-list-control.d.ts +7 -2
  9. package/components/controls/phi-bullet-list-control.js +35 -5
  10. package/components/controls/phi-color-control.js +4 -2
  11. package/components/controls/phi-drawer-control-adapter.js +3 -2
  12. package/components/controls/phi-inline-text-editor.js +7 -1
  13. package/components/controls/phi-length-control.js +1 -1
  14. package/components/controls/phi-ribbon-control.d.ts +38 -0
  15. package/components/controls/phi-ribbon-control.js +57 -0
  16. package/components/controls/phi-ribbon-wrap-control.d.ts +26 -0
  17. package/components/controls/phi-ribbon-wrap-control.js +25 -0
  18. package/components/controls/phi-select-control.js +5 -2
  19. package/components/controls/phi-series-chart-control.d.ts +48 -0
  20. package/components/controls/phi-series-chart-control.js +82 -0
  21. package/components/controls/phi-table-control.d.ts +3 -0
  22. package/components/controls/phi-table-control.js +13 -1
  23. package/components/controls/phi-text-control.js +57 -3
  24. package/components/controls/phi-tree-control.js +4 -4
  25. package/components/controls/phi-truncated-hover-text.d.ts +15 -0
  26. package/components/controls/phi-truncated-hover-text.js +25 -0
  27. package/components/forms/link-target-form-control.d.ts +1 -1
  28. package/components/forms/link-target-form-control.js +2 -45
  29. package/components/forms/phi-form-widget-frame.js +4 -2
  30. package/components/forms/shared-form-provider-registry.js +1 -4
  31. package/components/layouts/clients/phi-three-column-layout-client.js +10 -1
  32. package/components/media/asset-collection-runtime.js +6 -16
  33. package/components/media/media-font-metrics.d.ts +3 -0
  34. package/components/media/media-font-metrics.js +43 -0
  35. package/components/media/phi-area-upload-widget.js +53 -97
  36. package/components/media/phi-image-preview-data.d.ts +13 -0
  37. package/components/media/phi-image-preview-data.js +184 -9
  38. package/components/media/phi-media-picker-binding.js +16 -13
  39. package/components/media/phi-media-upload.d.ts +15 -8
  40. package/components/media/phi-media-upload.js +18 -9
  41. package/components/media/phi-site-font-assets.js +7 -8
  42. package/components/navigation/phi-link.js +6 -1
  43. package/components/overlays/phi-overlay-container-client.js +16 -1
  44. package/components/regions/clients/cms-region-container-client.js +6 -1
  45. package/components/regions/phi-cms-region-container.js +3 -0
  46. package/components/regions/phi-cms-region-shell.d.ts +12 -1
  47. package/components/regions/phi-cms-region-shell.js +81 -19
  48. package/components/regions/presets/phi-settings-page-shell-tree.js +48 -1
  49. package/components/root/phi-config-provider.d.ts +13 -0
  50. package/components/root/phi-config-provider.js +12 -1
  51. package/components/root/phi-root-background.d.ts +7 -0
  52. package/components/root/phi-root-background.js +20 -1
  53. package/components/root/phi-root-theme-resolver.js +3 -0
  54. package/components/root/phi-shell-chrome-overlay.d.ts +12 -1
  55. package/components/root/phi-shell-chrome-overlay.js +19 -3
  56. package/components/runtime/runtime-controller-materialization.js +12 -1
  57. package/components/shell/phi-antd-icon.d.ts +1 -0
  58. package/components/shell/phi-antd-icon.js +3 -0
  59. package/components/shell/use-phi-shell-sticky-top.js +61 -16
  60. package/components/state/scoped-state-store.js +20 -3
  61. package/components/surface/phi-surface-tone.d.ts +13 -0
  62. package/components/surface/phi-surface-tone.js +21 -0
  63. package/components/tables/client/phi-table-binding.d.ts +2 -1
  64. package/components/tables/client/phi-table-binding.js +45 -21
  65. package/components/trees/client/phi-tree-binding.js +19 -11
  66. package/components/widgets/client/bullet-list-entries-editor.d.ts +26 -0
  67. package/components/widgets/client/bullet-list-entries-editor.js +109 -0
  68. package/components/widgets/client/html-editor.js +1 -1
  69. package/components/widgets/client/shared/use-page-reference-options.d.ts +17 -0
  70. package/components/widgets/client/shared/use-page-reference-options.js +57 -0
  71. package/components/widgets/config/background.d.ts +32 -1
  72. package/components/widgets/config/background.js +41 -2
  73. package/components/widgets/config/choice-shared.js +12 -13
  74. package/components/widgets/config/command-buttons.d.ts +5 -1
  75. package/components/widgets/config/command-buttons.js +38 -81
  76. package/components/widgets/config/control-signal-config.d.ts +3 -1
  77. package/components/widgets/config/control-signal-config.js +19 -17
  78. package/components/widgets/config/image-source-parser.d.ts +1 -0
  79. package/components/widgets/config/image-source-parser.js +7 -8
  80. package/components/widgets/config/mask.d.ts +6 -1
  81. package/components/widgets/config/mask.js +24 -1
  82. package/components/widgets/config/parser-primitives.js +72 -0
  83. package/components/widgets/config/stack-tabs.d.ts +1 -1
  84. package/components/widgets/config/stack-tabs.js +2 -3
  85. package/components/widgets/config/strict-config-reader.d.ts +40 -0
  86. package/components/widgets/config/strict-config-reader.js +174 -0
  87. package/components/widgets/label-sets/background.js +2 -0
  88. package/components/widgets/label-sets/effects.js +2 -0
  89. package/components/widgets/label-types/background.d.ts +1 -0
  90. package/components/widgets/label-types/background.js +1 -0
  91. package/components/widgets/label-types/effects.d.ts +1 -0
  92. package/components/widgets/label-types/effects.js +1 -0
  93. package/components/widgets/navigation-descriptor-resolver.server.js +20 -8
  94. package/components/widgets/shared/bullet-list-vocabulary.d.ts +27 -1
  95. package/components/widgets/shared/bullet-list-vocabulary.js +24 -4
  96. package/components/widgets/shared/card-body-client.d.ts +18 -4
  97. package/components/widgets/shared/card-body-client.js +126 -26
  98. package/components/widgets/shared/card-vocabulary.d.ts +31 -4
  99. package/components/widgets/shared/card-vocabulary.js +35 -2
  100. package/components/widgets/shared/markdown-body-client.js +39 -10
  101. package/components/widgets/signals/control-signal-capabilities.d.ts +0 -18
  102. package/components/widgets/signals/control-signal-capabilities.js +10 -22
  103. package/components/workspace/catalog-store.d.ts +4 -3
  104. package/components/workspace/catalog-store.js +6 -5
  105. package/gateway/dashboard-cards-route.js +1 -0
  106. package/gateway/internal-references.d.ts +6 -1
  107. package/gateway/internal-references.js +48 -23
  108. package/gateway/site-cms-write-validation.d.ts +9 -0
  109. package/gateway/site-cms-write-validation.js +78 -0
  110. package/gateway/site-proxy.js +19 -3
  111. package/helpers/cms-container-chrome.js +6 -1
  112. package/helpers/locale.d.ts +8 -0
  113. package/helpers/locale.js +18 -0
  114. package/helpers/renderable-block-serialization.js +1 -1
  115. package/helpers/shell-region-style.js +2 -1
  116. package/helpers/surface-style.d.ts +12 -1
  117. package/helpers/surface-style.js +28 -2
  118. package/module-dashboard-cards.d.ts +1 -1
  119. package/module-dashboard-cards.js +1 -1
  120. package/next/config.d.mts +3 -0
  121. package/next/config.mjs +28 -1
  122. package/package.json +2 -2
  123. package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +5 -1
  124. package/plugins/runtime-modules/accounting/presets.d.ts +9 -0
  125. package/plugins/runtime-modules/accounting/presets.js +37 -0
  126. package/plugins/runtime-modules/accounting/server.d.ts +1 -4
  127. package/plugins/runtime-modules/accounting/server.js +4 -7
  128. package/plugins/runtime-modules/app/presets.d.ts +18 -0
  129. package/plugins/runtime-modules/app/presets.js +67 -0
  130. package/plugins/runtime-modules/app/server.d.ts +1 -4
  131. package/plugins/runtime-modules/app/server.js +4 -7
  132. package/plugins/runtime-modules/area-definitions.d.ts +0 -42
  133. package/plugins/runtime-modules/area-definitions.js +3 -8
  134. package/plugins/runtime-modules/asset/controller/runtime.js +2 -2
  135. package/plugins/runtime-modules/asset/services/collection.js +9 -1
  136. package/plugins/runtime-modules/asset/services/options.js +2 -2
  137. package/plugins/runtime-modules/builder/area-settings-answer.js +2 -1
  138. package/plugins/runtime-modules/builder/authoring-canvas.js +6 -6
  139. package/plugins/runtime-modules/builder/cards.js +3 -5
  140. package/plugins/runtime-modules/builder/clients/builder-region-overrides.js +3 -3
  141. package/plugins/runtime-modules/builder/clients/canvas-widget.js +15 -54
  142. package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +4 -1
  143. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +25 -35
  144. package/plugins/runtime-modules/builder/clients/inspector-link-target-field.js +1 -1
  145. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +8 -8
  146. package/plugins/runtime-modules/builder/clients/inspector-title.js +6 -6
  147. package/plugins/runtime-modules/builder/clients/layout-inspector.d.ts +1 -1
  148. package/plugins/runtime-modules/builder/clients/layout-inspector.js +11 -25
  149. package/plugins/runtime-modules/builder/clients/layout-scaffold-overlays.js +10 -5
  150. package/plugins/runtime-modules/builder/clients/mode-switch.js +1 -1
  151. package/plugins/runtime-modules/builder/clients/pages-header.js +11 -11
  152. package/plugins/runtime-modules/builder/clients/pages-workspace.js +1 -1
  153. package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
  154. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +1 -1
  155. package/plugins/runtime-modules/builder/clients/shells-workspace.js +15 -31
  156. package/plugins/runtime-modules/builder/clients/structure-canvas.js +1 -1
  157. package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.d.ts +26 -0
  158. package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.js +36 -0
  159. package/plugins/runtime-modules/builder/clients/widget-effects-editor.js +1 -1
  160. package/plugins/runtime-modules/builder/clients/widget-inspector.js +1 -0
  161. package/plugins/runtime-modules/builder/clients/workspace-scope-boundary.js +2 -2
  162. package/plugins/runtime-modules/builder/cms-instance-allocator.js +8 -28
  163. package/plugins/runtime-modules/builder/controller/client.d.ts +0 -15
  164. package/plugins/runtime-modules/builder/controller/definition.d.ts +0 -15
  165. package/plugins/runtime-modules/builder/controller/definition.js +0 -8
  166. package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +1 -2
  167. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +11 -30
  168. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +15 -2
  169. package/plugins/runtime-modules/builder/controller/inspector-controller.d.ts +1 -2
  170. package/plugins/runtime-modules/builder/controller/inspector-controller.js +4 -7
  171. package/plugins/runtime-modules/builder/controller/page-controller.d.ts +1 -2
  172. package/plugins/runtime-modules/builder/controller/page-controller.js +16 -68
  173. package/plugins/runtime-modules/builder/controller/server-definition.d.ts +0 -15
  174. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.d.ts +2 -5
  175. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +6 -50
  176. package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +2 -3
  177. package/plugins/runtime-modules/builder/controller/workspace-controller.js +89 -153
  178. package/plugins/runtime-modules/builder/data-providers.d.ts +1 -0
  179. package/plugins/runtime-modules/builder/data-providers.js +1 -0
  180. package/plugins/runtime-modules/builder/definition.d.ts +1 -0
  181. package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +64 -30
  182. package/plugins/runtime-modules/builder/developer-workspace-store.js +255 -61
  183. package/plugins/runtime-modules/builder/edit-scaffold-drawer.js +4 -3
  184. package/plugins/runtime-modules/builder/history.d.ts +3 -1
  185. package/plugins/runtime-modules/builder/options-providers.js +3 -2
  186. package/plugins/runtime-modules/builder/page-catalog-client.js +19 -7
  187. package/plugins/runtime-modules/builder/page-meta-form.js +1 -0
  188. package/plugins/runtime-modules/builder/page-references-provider.js +1 -1
  189. package/plugins/runtime-modules/builder/persistence.js +33 -69
  190. package/plugins/runtime-modules/builder/public-route-collisions.d.ts +2 -2
  191. package/plugins/runtime-modules/builder/public-route-collisions.js +6 -19
  192. package/plugins/runtime-modules/builder/render-root-node-preview.server.js +20 -3
  193. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +28 -18
  194. package/plugins/runtime-modules/builder/runtime-module-selection.d.ts +2 -12
  195. package/plugins/runtime-modules/builder/runtime-module-selection.js +16 -42
  196. package/plugins/runtime-modules/builder/services/navigation-table.js +9 -15
  197. package/plugins/runtime-modules/builder/services/page-source-tree.js +8 -8
  198. package/plugins/runtime-modules/builder/services/runtime-modules-table.js +10 -10
  199. package/plugins/runtime-modules/builder/services/signal-routes-table.js +3 -3
  200. package/plugins/runtime-modules/builder/signal-route-selection.d.ts +1 -2
  201. package/plugins/runtime-modules/builder/signal-route-selection.js +2 -2
  202. package/plugins/runtime-modules/builder/signal-wiring-options.js +3 -2
  203. package/plugins/runtime-modules/builder/structure-dnd.js +8 -61
  204. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +17 -10
  205. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +27 -22
  206. package/plugins/runtime-modules/builder/workspace-catalog-actions.d.ts +55 -0
  207. package/plugins/runtime-modules/builder/workspace-catalog-actions.js +142 -0
  208. package/plugins/runtime-modules/client-authoring-module.d.ts +8 -1
  209. package/plugins/runtime-modules/client-authoring-module.js +13 -3
  210. package/plugins/runtime-modules/client-manifests/common.js +1 -1
  211. package/plugins/runtime-modules/{runtime-calendar-adapters.js → core/calendar-adapters.js} +2 -2
  212. package/plugins/runtime-modules/{client-calendar-adapters/core.js → core/client-calendar-adapters.js} +1 -1
  213. package/plugins/runtime-modules/core/content-entries/table.js +1 -1
  214. package/plugins/runtime-modules/core/data-providers.d.ts +3 -0
  215. package/plugins/runtime-modules/core/data-providers.js +2 -1
  216. package/plugins/runtime-modules/core/definition.d.ts +3 -0
  217. package/plugins/runtime-modules/core/definition.js +1 -1
  218. package/plugins/runtime-modules/core/messaging/data-providers.d.ts +1 -0
  219. package/plugins/runtime-modules/core/messaging/data-providers.js +1 -0
  220. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +1 -1
  221. package/plugins/runtime-modules/core/server.js +1 -1
  222. package/plugins/runtime-modules/core/themes.d.ts +44 -0
  223. package/plugins/runtime-modules/core/themes.js +12 -0
  224. package/plugins/runtime-modules/core/widgets/brand/client.d.ts +12 -3
  225. package/plugins/runtime-modules/core/widgets/brand/client.js +3 -11
  226. package/plugins/runtime-modules/core/widgets/brand/home.d.ts +15 -0
  227. package/plugins/runtime-modules/core/widgets/brand/home.js +18 -0
  228. package/plugins/runtime-modules/core/widgets/brand/plugin.js +3 -2
  229. package/plugins/runtime-modules/core/widgets/brand/server.d.ts +2 -2
  230. package/plugins/runtime-modules/core/widgets/brand/server.js +2 -2
  231. package/plugins/runtime-modules/core/widgets/card/collection-view-binding.js +25 -9
  232. package/plugins/runtime-modules/core/widgets/card/config.d.ts +301 -254
  233. package/plugins/runtime-modules/core/widgets/card/config.js +68 -3
  234. package/plugins/runtime-modules/core/widgets/card/editor.js +41 -4
  235. package/plugins/runtime-modules/core/widgets/card/server.d.ts +3 -0
  236. package/plugins/runtime-modules/core/widgets/card/server.js +32 -3
  237. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +7 -6
  238. package/plugins/runtime-modules/core/widgets/collection-view/config.js +9 -2
  239. package/plugins/runtime-modules/core/widgets/description/client.js +3 -3
  240. package/plugins/runtime-modules/core/widgets/description/config.d.ts +2 -25
  241. package/plugins/runtime-modules/core/widgets/description/editor.js +7 -63
  242. package/plugins/runtime-modules/core/widgets/description/server.js +3 -2
  243. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +2 -25
  244. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +2 -25
  245. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +2 -2
  246. package/plugins/runtime-modules/core/widgets/html/client.js +1 -1
  247. package/plugins/runtime-modules/core/widgets/image/config.js +2 -2
  248. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +320 -2
  249. package/plugins/runtime-modules/core/widgets/markdown/config.js +18 -4
  250. package/plugins/runtime-modules/core/widgets/markdown/editor.js +11 -4
  251. package/plugins/runtime-modules/core/widgets/markdown-toc/client.js +6 -1
  252. package/plugins/runtime-modules/core/widgets/markdown-toc/config.d.ts +14 -0
  253. package/plugins/runtime-modules/core/widgets/markdown-toc/config.js +14 -2
  254. package/plugins/runtime-modules/core/widgets/quick-links/authoring.js +7 -2
  255. package/plugins/runtime-modules/core/widgets/quick-links/client.js +2 -2
  256. package/plugins/runtime-modules/core/widgets/quick-links/items.d.ts +0 -2
  257. package/plugins/runtime-modules/core/widgets/quick-links/items.js +0 -15
  258. package/plugins/runtime-modules/core/widgets/result/config.d.ts +5 -25
  259. package/plugins/runtime-modules/core/widgets/result/config.js +2 -0
  260. package/plugins/runtime-modules/core/widgets/result/server.js +25 -19
  261. package/plugins/runtime-modules/core/widgets/sidebar-navigation/authoring.js +1 -1
  262. package/plugins/runtime-modules/core/widgets/sidebar-navigation/client.js +1 -1
  263. package/plugins/runtime-modules/core/widgets/simple-text/client.js +8 -3
  264. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +2 -25
  265. package/plugins/runtime-modules/core/widgets/simple-text/editor.js +2 -2
  266. package/plugins/runtime-modules/core/widgets/slot-upload/client.js +11 -2
  267. package/plugins/runtime-modules/core/widgets/table/client.js +8 -4
  268. package/plugins/runtime-modules/core/widgets/table/config.d.ts +6 -83
  269. package/plugins/runtime-modules/core/widgets/table/config.js +302 -452
  270. package/plugins/runtime-modules/core/widgets/tree/config.js +5 -2
  271. package/plugins/runtime-modules/dashboard/card-rows.d.ts +7 -0
  272. package/plugins/runtime-modules/dashboard/card-rows.js +87 -0
  273. package/plugins/runtime-modules/dashboard/clients/dashboard-card-view.js +32 -12
  274. package/plugins/runtime-modules/dashboard/services/collection.js +17 -7
  275. package/plugins/runtime-modules/dashboard/trees/phi-default-builder-dashboard-page-tree.js +5 -40
  276. package/plugins/runtime-modules/groups/data-providers.d.ts +2 -0
  277. package/plugins/runtime-modules/groups/data-providers.js +3 -3
  278. package/plugins/runtime-modules/groups/definition.d.ts +2 -0
  279. package/plugins/runtime-modules/localization/data-providers.d.ts +3 -0
  280. package/plugins/runtime-modules/localization/data-providers.js +2 -0
  281. package/plugins/runtime-modules/localization/definition.d.ts +3 -0
  282. package/plugins/runtime-modules/localization/services/table.js +3 -7
  283. package/plugins/runtime-modules/observability/data-providers.d.ts +1 -0
  284. package/plugins/runtime-modules/observability/data-providers.js +1 -0
  285. package/plugins/runtime-modules/observability/definition.d.ts +1 -0
  286. package/plugins/runtime-modules/observability/module.d.ts +1 -0
  287. package/plugins/runtime-modules/observability/services/table.js +1 -1
  288. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +2 -105
  289. package/plugins/runtime-modules/public/presets.d.ts +115 -0
  290. package/plugins/runtime-modules/{area-base-presets.js → public/presets.js} +19 -119
  291. package/plugins/runtime-modules/public/server.d.ts +1 -4
  292. package/plugins/runtime-modules/public/server.js +4 -7
  293. package/plugins/runtime-modules/public/trees/phi-default-pub-error-page-tree.js +7 -8
  294. package/plugins/runtime-modules/public-base-page-references.d.ts +1 -1
  295. package/plugins/runtime-modules/public-base-page-references.js +1 -1
  296. package/plugins/runtime-modules/revisions/controller/client.js +11 -11
  297. package/plugins/runtime-modules/revisions/services/table.js +3 -3
  298. package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +22 -0
  299. package/plugins/runtime-modules/theme/widgets/brand-controls/client.d.ts +2 -1
  300. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +111 -72
  301. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +2 -1
  302. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +28 -31
  303. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +1 -1
  304. package/plugins/runtime-modules/theme-descriptors.js +1 -1
  305. package/plugins/runtime-modules/user-management/data-providers.d.ts +2 -0
  306. package/plugins/runtime-modules/user-management/data-providers.js +1 -0
  307. package/plugins/runtime-modules/user-management/definition.d.ts +2 -0
  308. package/server-helpers/cms-link-targets.js +6 -0
  309. package/styles/control-shape.css +11 -11
  310. package/styles/controls.css +67 -5
  311. package/styles/layout.css +61 -9
  312. package/styles/shell.css +73 -0
  313. package/theme/phi-antd-token-resolver.js +20 -1
  314. package/theme/phi-theme-tokens.d.ts +1 -1
  315. package/theme/phi-theme-tokens.js +1 -0
  316. package/theme/phi-theme.d.ts +5 -0
  317. package/theme/phi-theme.js +21 -0
  318. package/theme/phi-tokens.d.ts +16 -15
  319. package/theme/phi-tokens.js +16 -15
  320. package/types/cms-config.js +142 -185
  321. package/types/cms-plugins.d.ts +6 -11
  322. package/types/core-widget-placements.d.ts +14 -3
  323. package/types/dashboard-cards.d.ts +48 -4
  324. package/types/dashboard-cards.js +6 -0
  325. package/types/media.d.ts +0 -3
  326. package/types/renderable-block.d.ts +6 -1
  327. package/types/site-theme.d.ts +10 -2
  328. package/types/table-widget.d.ts +9 -0
  329. package/types/table-widget.js +20 -0
  330. package/types.d.ts +1 -1
  331. package/widget-config.d.ts +2 -0
  332. package/widget-config.js +6 -0
  333. package/plugins/runtime-modules/area-base-presets.d.ts +0 -139
  334. /package/plugins/runtime-modules/{runtime-calendar-adapters.d.ts → core/calendar-adapters.d.ts} +0 -0
  335. /package/plugins/runtime-modules/{client-calendar-adapters/core.d.ts → core/client-calendar-adapters.d.ts} +0 -0
@@ -1,16 +1,34 @@
1
1
  import { isPhiCmsAreaKey, } from "../../../../../constants/cms-areas";
2
2
  import { PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS } from "../../../../../constants/media-library-provider-keys";
3
- import { PHI_AUTHORING_OPTION_PROVIDER_KEYS } from "../../../../../constants/authoring-option-provider-keys";
4
3
  import { PHI_THEME_SIGNAL_CHANNELS } from "../../../../../plugins/runtime-modules/theme/controller/signals";
5
4
  import { createPhiCmsWidgetDefinition } from "../../../../../components/widgets/config/helpers";
6
5
  import { readString } from "../../../../../components/widgets/config/parser-primitives";
6
+ import { parsePhiControlSignalConfig, } from "../../../../../components/widgets/config/control-signal-config";
7
7
  function parseBuilderBrandWidgetConfig(config) {
8
8
  const reviewArea = readString(config.reviewArea);
9
9
  return {
10
+ /*
11
+ * The routes are read like any Widget's: the preview mode reaches a panel through the route its tree
12
+ * wrote, so a route an author adds in the Builder works as well. The parser dropped them once and
13
+ * the panels listened to a hard-coded broadcast, which left the declared input decoration.
14
+ */
15
+ ...parsePhiControlSignalConfig(config, { key: "brandPreviewThemeMode" }),
10
16
  themeKey: readString(config.themeKey),
11
17
  reviewArea: isPhiCmsAreaKey(reviewArea) ? reviewArea : undefined,
12
18
  };
13
19
  }
20
+ /** Every panel that draws in the preview's mode follows the mode switch. */
21
+ const PHI_BUILDER_BRAND_PREVIEW_MODE_SIGNALS = {
22
+ emits: [],
23
+ listens: [
24
+ {
25
+ id: "previewThemeMode",
26
+ channel: PHI_THEME_SIGNAL_CHANNELS.previewThemeMode,
27
+ action: "change",
28
+ valueType: "boolean",
29
+ },
30
+ ],
31
+ };
14
32
  export const PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_DEFINITION = createPhiCmsWidgetDefinition({
15
33
  typeKey: "builder-brand-theme-controls",
16
34
  title: "Builder Brand Theme Controls",
@@ -18,6 +36,7 @@ export const PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_DEFINITION = createPhiCmsWi
18
36
  category: "configuration",
19
37
  iconFamily: "theme",
20
38
  slotSizePolicy: "fill-inline",
39
+ runtimeSignals: PHI_BUILDER_BRAND_PREVIEW_MODE_SIGNALS,
21
40
  fields: [
22
41
  { key: "themeKey", type: "string", label: "Theme Key" },
23
42
  { key: "reviewArea", type: "string", label: "Review Area" },
@@ -32,15 +51,13 @@ export const PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_DEFINITION = createPhiCm
32
51
  iconFamily: "theme",
33
52
  slotSizePolicy: "fill-inline",
34
53
  /*
35
- * The Logo is picked from the Media library and the Brand's link from the Page catalogue, and a Page
36
- * mounts only the Data Providers its tree asks for. The scan reads this declaration; a Provider a
37
- * Widget reaches for from inside its client code is invisible to it. Same reason the Background
38
- * panel declares its own.
54
+ * The Logo is picked from the Media library, and a Page mounts only the Data Providers its tree asks
55
+ * for. The scan reads this declaration; a Provider a Widget reaches for from inside its client code is
56
+ * invisible to it. Same reason the Background panel declares its own. The Brand's link needs none: its
57
+ * Pages come from `/api/site/page-references`, as every link picker's outside the Builder catalog do.
39
58
  */
40
- requiredDataProviders: [
41
- PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.collection,
42
- PHI_AUTHORING_OPTION_PROVIDER_KEYS.pages,
43
- ],
59
+ requiredDataProviders: [PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.collection],
60
+ runtimeSignals: PHI_BUILDER_BRAND_PREVIEW_MODE_SIGNALS,
44
61
  fields: [
45
62
  { key: "themeKey", type: "string", label: "Theme Key" },
46
63
  { key: "reviewArea", type: "string", label: "Review Area" },
@@ -76,17 +93,7 @@ export const PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_DEFINITION = createPhi
76
93
  * library, on a Page where the Assets Module was active the whole time.
77
94
  */
78
95
  requiredDataProviders: [PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.collection],
79
- runtimeSignals: {
80
- emits: [],
81
- listens: [
82
- {
83
- id: "previewThemeMode",
84
- channel: PHI_THEME_SIGNAL_CHANNELS.previewThemeMode,
85
- action: "change",
86
- valueType: "boolean",
87
- },
88
- ],
89
- },
96
+ runtimeSignals: PHI_BUILDER_BRAND_PREVIEW_MODE_SIGNALS,
90
97
  fields: [
91
98
  { key: "themeKey", type: "string", label: "Theme Key" },
92
99
  { key: "reviewArea", type: "string", label: "Review Area" },
@@ -100,17 +107,7 @@ export const PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_DEFINITION = createPhiCmsWid
100
107
  category: "configuration",
101
108
  iconFamily: "theme",
102
109
  slotSizePolicy: "fill-inline",
103
- runtimeSignals: {
104
- emits: [],
105
- listens: [
106
- {
107
- id: "previewThemeMode",
108
- channel: PHI_THEME_SIGNAL_CHANNELS.previewThemeMode,
109
- action: "change",
110
- valueType: "boolean",
111
- },
112
- ],
113
- },
110
+ runtimeSignals: PHI_BUILDER_BRAND_PREVIEW_MODE_SIGNALS,
114
111
  fields: [
115
112
  { key: "themeKey", type: "string", label: "Theme Key" },
116
113
  { key: "reviewArea", type: "string", label: "Review Area" },
@@ -11,7 +11,7 @@ export const PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_PLUGIN = {
11
11
  };
12
12
  export const PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_PLUGIN = {
13
13
  ...PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_DEFINITION,
14
- render: ({ runtime }) => _jsx(PhiBuilderBrandThemePreviewWidgetClient, { runtime: runtime }),
14
+ render: ({ runtime, config }) => _jsx(PhiBuilderBrandThemePreviewWidgetClient, { runtime: runtime, config: config }),
15
15
  renderPreview: ({ runtime }) => _jsx(PhiBuilderBrandThemePreviewWidgetClient, { runtime: runtime }),
16
16
  };
17
17
  export const PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_PLUGIN = {
@@ -1,4 +1,4 @@
1
- import { PHI_CORE_RUNTIME_MODULE_THEMES } from "./area-base-presets";
1
+ import { PHI_CORE_RUNTIME_MODULE_THEMES } from "./core/themes";
2
2
  import { PHI_CORE_RUNTIME_MODULE_ID } from "./core/ids";
3
3
  import { readAllPhiSiteModuleServerAreaContributions } from "./site-module-contributions";
4
4
  import { PHI_THEME_RUNTIME_MODULE_BLOCKS } from "./theme/block-descriptors";
@@ -77,6 +77,7 @@ export declare const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS: {
77
77
  filterFields: string[];
78
78
  sorting: "single";
79
79
  pagination: "offset";
80
+ total: true;
80
81
  };
81
82
  actions: ({
82
83
  key: string;
@@ -149,6 +150,7 @@ export declare const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS: {
149
150
  sorting: "none";
150
151
  pagination: "none";
151
152
  search?: undefined;
153
+ total?: undefined;
152
154
  };
153
155
  recordRead?: undefined;
154
156
  summaryFields?: undefined;
@@ -47,6 +47,7 @@ export const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
47
47
  filterFields: ["accountType", "enabled"],
48
48
  sorting: "single",
49
49
  pagination: "offset",
50
+ total: true,
50
51
  },
51
52
  actions: [
52
53
  {
@@ -105,6 +105,7 @@ export declare const PHI_USER_MANAGEMENT_RUNTIME_MODULE_DEFINITION: {
105
105
  filterFields: string[];
106
106
  sorting: "single";
107
107
  pagination: "offset";
108
+ total: true;
108
109
  };
109
110
  actions: ({
110
111
  key: string;
@@ -177,6 +178,7 @@ export declare const PHI_USER_MANAGEMENT_RUNTIME_MODULE_DEFINITION: {
177
178
  sorting: "none";
178
179
  pagination: "none";
179
180
  search?: undefined;
181
+ total?: undefined;
180
182
  };
181
183
  recordRead?: undefined;
182
184
  summaryFields?: undefined;
@@ -21,6 +21,12 @@ export async function resolvePhiCmsTreeLinkTargets(tree, runtime) {
21
21
  for (const node of [...tree.regions, ...tree.overlays, ...tree.layoutNodes, ...tree.contentWidgets]) {
22
22
  collectPhiLinkTargetReferences(node.config, references);
23
23
  }
24
+ /*
25
+ * And the Brand's, which is the Site's and not any node's (THEME.md "Brand"): the Brand Widget leads
26
+ * where the Theme says, and that target resolves with the rest of the page rather than in a round
27
+ * trip of its own per Brand drawn -- a header and a footer would be two.
28
+ */
29
+ collectPhiLinkTargetReferences(runtime.site.theme?.brand, references);
24
30
  return resolvePhiLinkTargetReferences(references, runtime);
25
31
  }
26
32
  /**
@@ -34,7 +34,7 @@
34
34
  .ant-picker-small.ant-picker-small:not(:where(.ant-picker-underlined)),
35
35
  .ant-segmented.ant-segmented-sm.ant-segmented-sm,
36
36
  .ant-color-picker-trigger.ant-color-picker-sm.ant-color-picker-sm {
37
- border-radius: var(--phi-control-radius-sm, var(--ant-border-radius-sm));
37
+ border-radius: var(--phi-control-radius-sm);
38
38
  }
39
39
 
40
40
  .ant-btn-lg.ant-btn-lg,
@@ -45,7 +45,7 @@
45
45
  .ant-picker-large.ant-picker-large:not(:where(.ant-picker-underlined)),
46
46
  .ant-segmented.ant-segmented-lg.ant-segmented-lg,
47
47
  .ant-color-picker-trigger.ant-color-picker-lg.ant-color-picker-lg {
48
- border-radius: var(--phi-control-radius-lg, var(--ant-border-radius-lg));
48
+ border-radius: var(--phi-control-radius-lg);
49
49
  }
50
50
 
51
51
  /*
@@ -56,17 +56,17 @@
56
56
  */
57
57
  .ant-segmented.ant-segmented .ant-segmented-item.ant-segmented-item,
58
58
  .ant-segmented.ant-segmented .ant-segmented-thumb.ant-segmented-thumb {
59
- border-radius: var(--phi-control-radius-inner-md, var(--ant-border-radius-sm));
59
+ border-radius: var(--phi-control-radius-inner-md);
60
60
  }
61
61
 
62
62
  .ant-segmented.ant-segmented-sm .ant-segmented-item.ant-segmented-item,
63
63
  .ant-segmented.ant-segmented-sm .ant-segmented-thumb.ant-segmented-thumb {
64
- border-radius: var(--phi-control-radius-inner-sm, var(--ant-border-radius-xs));
64
+ border-radius: var(--phi-control-radius-inner-sm);
65
65
  }
66
66
 
67
67
  .ant-segmented.ant-segmented-lg .ant-segmented-item.ant-segmented-item,
68
68
  .ant-segmented.ant-segmented-lg .ant-segmented-thumb.ant-segmented-thumb {
69
- border-radius: var(--phi-control-radius-inner-lg, var(--ant-border-radius));
69
+ border-radius: var(--phi-control-radius-inner-lg);
70
70
  }
71
71
 
72
72
  /*
@@ -90,15 +90,15 @@
90
90
  */
91
91
  .ant-color-picker-trigger.ant-color-picker-trigger .ant-color-picker-color-block.ant-color-picker-color-block {
92
92
  margin-inline-start: 2px;
93
- border-radius: var(--phi-control-radius-inner-md, var(--ant-border-radius-sm));
93
+ border-radius: var(--phi-control-radius-inner-md);
94
94
  }
95
95
 
96
96
  .ant-color-picker-trigger.ant-color-picker-sm .ant-color-picker-color-block.ant-color-picker-color-block {
97
- border-radius: var(--phi-control-radius-inner-sm, var(--ant-border-radius-xs));
97
+ border-radius: var(--phi-control-radius-inner-sm);
98
98
  }
99
99
 
100
100
  .ant-color-picker-trigger.ant-color-picker-lg .ant-color-picker-color-block.ant-color-picker-color-block {
101
- border-radius: var(--phi-control-radius-inner-lg, var(--ant-border-radius));
101
+ border-radius: var(--phi-control-radius-inner-lg);
102
102
  }
103
103
 
104
104
  /*
@@ -127,21 +127,21 @@ textarea.ant-input.ant-input:not(:where(.ant-input-sm, .ant-input-lg, .ant-input
127
127
  .ant-input-textarea-affix-wrapper.ant-input-textarea-affix-wrapper:not(:where(.ant-input-affix-wrapper-sm, .ant-input-affix-wrapper-lg, .ant-input-underlined)),
128
128
  .ant-select-multiple.ant-select-multiple:not(:where(.ant-select-sm, .ant-select-lg, .ant-select-underlined)),
129
129
  .ant-mentions.ant-mentions:not(:where(.ant-mentions-sm, .ant-mentions-lg, .ant-mentions-underlined)) {
130
- border-radius: var(--phi-control-radius-grown-md, var(--ant-border-radius));
130
+ border-radius: var(--phi-control-radius-grown-md);
131
131
  }
132
132
 
133
133
  textarea.ant-input-sm.ant-input-sm:not(:where(.ant-input-underlined, .ant-input-affix-wrapper > textarea)),
134
134
  .ant-input-textarea-affix-wrapper.ant-input-affix-wrapper-sm.ant-input-affix-wrapper-sm:not(:where(.ant-input-underlined)),
135
135
  .ant-select-multiple.ant-select-sm.ant-select-sm:not(:where(.ant-select-underlined)),
136
136
  .ant-mentions-sm.ant-mentions-sm:not(:where(.ant-mentions-underlined)) {
137
- border-radius: var(--phi-control-radius-grown-sm, var(--ant-border-radius-sm));
137
+ border-radius: var(--phi-control-radius-grown-sm);
138
138
  }
139
139
 
140
140
  textarea.ant-input-lg.ant-input-lg:not(:where(.ant-input-underlined, .ant-input-affix-wrapper > textarea)),
141
141
  .ant-input-textarea-affix-wrapper.ant-input-affix-wrapper-lg.ant-input-affix-wrapper-lg:not(:where(.ant-input-underlined)),
142
142
  .ant-select-multiple.ant-select-lg.ant-select-lg:not(:where(.ant-select-underlined)),
143
143
  .ant-mentions-lg.ant-mentions-lg:not(:where(.ant-mentions-underlined)) {
144
- border-radius: var(--phi-control-radius-grown-lg, var(--ant-border-radius-lg));
144
+ border-radius: var(--phi-control-radius-grown-lg);
145
145
  }
146
146
 
147
147
  /*
@@ -313,7 +313,7 @@ h5.phi-typography, .phi-typography h5 {
313
313
  * is the Theme's surface step; everything else is the token variable the primitive read.
314
314
  */
315
315
  .phi-card-control {
316
- --phi-card-control-radius: var(--phi-surface-radius, var(--ant-border-radius-lg));
316
+ --phi-card-control-radius: var(--phi-surface-radius);
317
317
  --phi-card-control-line: var(--ant-line-width) var(--ant-line-type) var(--ant-color-border-secondary);
318
318
  position: relative;
319
319
  box-sizing: border-box;
@@ -501,13 +501,25 @@ h5.phi-typography, .phi-typography h5 {
501
501
  top: var(--phi-table-sticky-top, var(--phi-shell-sticky-top, 0px)) !important;
502
502
  }
503
503
 
504
+ /*
505
+ * A sticky header row is a table of its own, and its columns are the body's: Ant Design measures the
506
+ * body's columns and writes their widths into the header's `<colgroup>`. In `auto` layout those widths
507
+ * are only a floor, and a `content` column's header cell carries `width: 1%` -- so each header cell shrank
508
+ * to its title and a `fill` column took the rest, out of line with the rows under it. Fixed layout makes
509
+ * the `<colgroup>` the header's widths. The body keeps the configured `layout.mode`; Ant Design writes
510
+ * that inline on both tables, so the header's is stated over it.
511
+ */
512
+ .phi-table-control.phi-table-control--sticky-header [class~="ant-table-sticky-holder"] > table {
513
+ table-layout: fixed !important;
514
+ }
515
+
504
516
  :is([data-phi-modal-body-content], [data-phi-drawer-body-content]) {
505
517
  --phi-table-sticky-top: 0px;
506
518
  }
507
519
 
508
520
  .phi-table-control.phi-table-control--closing-block [class~="ant-table"] {
509
- border-end-start-radius: var(--phi-surface-radius, var(--ant-border-radius-lg));
510
- border-end-end-radius: var(--phi-surface-radius, var(--ant-border-radius-lg));
521
+ border-end-start-radius: var(--phi-surface-radius);
522
+ border-end-end-radius: var(--phi-surface-radius);
511
523
  /* `clip`, not `hidden`, so the corners are cut without making this the sticky header's scroller. */
512
524
  overflow: clip;
513
525
  }
@@ -562,6 +574,55 @@ h5.phi-typography, .phi-typography h5 {
562
574
  align-self: center;
563
575
  }
564
576
 
577
+ /*
578
+ * Its arrow on the switcher's own centre. antd sets the switcher's line height to the row height and lets
579
+ * the arrow stand on that line's baseline, which leaves a small icon above the middle of the box. The box
580
+ * keeps a compact control's height, so its hover ground is the square it was.
581
+ */
582
+ .phi-tree-control.phi-tree-control [class~="ant-tree-switcher"] {
583
+ display: inline-flex;
584
+ align-items: center;
585
+ justify-content: center;
586
+ min-block-size: var(--ant-control-height-sm);
587
+ }
588
+
589
+ /* --- Compact Select ------------------------------------------------------------------------------ */
590
+
591
+ /*
592
+ * A compact control writes small: Input, InputNumber, DatePicker and Button take the scale's `sm` through
593
+ * their component tokens (theme/phi-theme.ts). Select has no such token -- it sizes its words by variables
594
+ * of its own and gives `-sm` the body's -- so its compact form is told here. Both variables move together:
595
+ * Select reckons its padding as (height - font height) / 2, so a smaller font size with the body's font
596
+ * height would leave the box short of `controlHeightSM` by the difference.
597
+ */
598
+ [class~="ant-select"][class~="ant-select-sm"] {
599
+ --ant-select-font-size: var(--ant-font-size-sm);
600
+ --ant-select-font-height: calc(var(--ant-font-size-sm) * var(--ant-select-line-height));
601
+ }
602
+
603
+ /* The list a compact Select opens writes as the field does; Ant Design gives every Select's list the body size. */
604
+ .phi-select-popup--sm [class~="ant-select-item"] {
605
+ font-size: var(--ant-font-size-sm);
606
+ }
607
+
608
+ /* --- Running text --------------------------------------------------------------------------------- */
609
+
610
+ /*
611
+ * Markdown and HTML text breaks long words at their syllables, by the rules of the page's language
612
+ * (`<html lang>`), rather than leaving a ragged edge or running a word past its column. Code keeps its
613
+ * characters as written.
614
+ */
615
+ .phi-markdown-text,
616
+ .phi-html-widget__content {
617
+ hyphens: auto;
618
+ overflow-wrap: break-word;
619
+ }
620
+
621
+ .phi-markdown-text :is(pre, code),
622
+ .phi-html-widget__content :is(pre, code) {
623
+ hyphens: manual;
624
+ }
625
+
565
626
  /* --- Plain table --------------------------------------------------------------------------------- */
566
627
 
567
628
  /* Wide tables scroll inside their own box instead of widening the Page. */
@@ -570,11 +631,12 @@ h5.phi-typography, .phi-typography h5 {
570
631
  overflow-x: auto;
571
632
  }
572
633
 
634
+ /* A table is read across, not down: its cells take the small size, as the Table Control's do. */
573
635
  .phi-plain-table {
574
636
  width: 100%;
575
637
  border-collapse: collapse;
576
- font-size: var(--ant-font-size);
577
- line-height: var(--ant-line-height);
638
+ font-size: var(--ant-font-size-sm);
639
+ line-height: var(--ant-line-height-sm);
578
640
  color: var(--ant-color-text);
579
641
  }
580
642
 
package/styles/layout.css CHANGED
@@ -493,8 +493,13 @@
493
493
  * COLOUR the page already computed from them, not the variable -- so the box states its text colour again
494
494
  * and its content reads it from the variables in force there. When the content is already in that mode,
495
495
  * the class has no variables of its own and this resolves to what the page has anyway.
496
+ *
497
+ * The box only, not an Ant Design component inside it: the tone scope keys its variables to the same
498
+ * class, and Ant Design puts that key on every component it draws there. Stated on those too, the colour
499
+ * stopped inheritance at each of them -- a Quick Link's words kept the text colour while the link turned
500
+ * to its hover colour around them.
496
501
  */
497
- :where(.phi-tone-light, .phi-tone-dark, .phi-tone-inverse) {
502
+ :where(.phi-tone-light, .phi-tone-dark, .phi-tone-inverse):where(:not([class^="ant-"], [class*=" ant-"])) {
498
503
  color: var(--ant-color-text);
499
504
  }
500
505
 
@@ -561,6 +566,11 @@
561
566
  /*
562
567
  * Hover effects: a card answers the pointer, and only a pointer that hovers.
563
568
  * Keyboard focus gets the same answer, so the effect never says something a keyboard reader misses.
569
+ *
570
+ * Lift raises the card and gives it the Theme's next shadow up. The resting shadow is the Surface's,
571
+ * written on the card itself, so the raised one has to be `!important` to stand over it; a card whose
572
+ * Surface has no shadow gets one when it lifts, which is what lifting means. Two pixels and the same
573
+ * shadow read as nothing at all; zoom at 4 % did not read either.
564
574
  */
565
575
  :where(.phi-card--hover-lift, .phi-card--hover-zoom) {
566
576
  transition: translate 200ms ease, box-shadow 200ms ease;
@@ -571,27 +581,68 @@
571
581
  transition: scale 300ms ease;
572
582
  }
573
583
 
584
+ /*
585
+ * A card with a ribbon stands in the ribbon's wrapper (`PhiRibbonWrapControl`): a column that takes the
586
+ * slot's size and hands it to the card. A card that lifts carries its ribbon with it -- the ribbon is the
587
+ * card's sibling, so the wrapper moves it when the card moves.
588
+ */
589
+ :where(.phi-card-ribbon) {
590
+ display: flex;
591
+ flex-direction: column;
592
+ min-width: 0;
593
+ }
594
+
595
+ :where(.phi-card-ribbon) > :where(.phi-card) {
596
+ flex: 1 1 auto;
597
+ }
598
+
599
+ /*
600
+ * A little lower than Ant Design sets it, so the ribbon stands centred on the eyebrow's line. Outside
601
+ * `:where`: Ant Design's own `.ant-ribbon` states `top`, and this has to outrank it.
602
+ */
603
+ .phi-card-ribbon > .ant-ribbon {
604
+ top: calc(var(--ant-margin-xs) + 3px);
605
+ }
606
+
607
+ :where(.phi-card-ribbon--lift) > :where(.ant-ribbon) {
608
+ transition: translate 200ms ease;
609
+ }
610
+
611
+ @media (hover: hover) {
612
+ :where(.phi-card-ribbon--lift):has(> .phi-card:hover) > :where(.ant-ribbon) {
613
+ translate: 0 -4px;
614
+ }
615
+ }
616
+
617
+ :where(.phi-card-ribbon--lift):has(> .phi-card:focus-within) > :where(.ant-ribbon) {
618
+ translate: 0 -4px;
619
+ }
620
+
574
621
  @media (hover: hover) {
575
622
  :where(.phi-card--hover-lift):hover {
576
- translate: 0 -2px;
623
+ translate: 0 -4px;
624
+ box-shadow: var(--ant-box-shadow-secondary) !important;
577
625
  }
578
626
 
579
627
  :where(.phi-card--hover-zoom):hover :where(.phi-card__ground, .phi-card__media img) {
580
- scale: 1.04;
628
+ scale: 1.08;
581
629
  }
582
630
  }
583
631
 
584
632
  :where(.phi-card--hover-lift):focus-within {
585
- translate: 0 -2px;
633
+ translate: 0 -4px;
634
+ box-shadow: var(--ant-box-shadow-secondary) !important;
586
635
  }
587
636
 
588
637
  :where(.phi-card--hover-zoom):focus-within :where(.phi-card__ground, .phi-card__media img) {
589
- scale: 1.04;
638
+ scale: 1.08;
590
639
  }
591
640
 
592
641
  /*
593
642
  * The icon paints the colours the card hands it as custom properties, so that the `icon` effect can turn
594
- * them round: the colour becomes the ground and the ground the colour. A change of colour, not a
643
+ * them round: the colour becomes the ground, and the mark takes `--phi-card-icon-hover-color` -- the
644
+ * stated ground where one was stated, the container's otherwise. Not simply the ground: the Theme's
645
+ * ground for a mark is a fill a few percent opaque, and a mark painted in it vanished. A change of colour, not a
595
646
  * movement, so it is not taken back for a reader who asked for less motion -- only its easing is.
596
647
  */
597
648
  :where(.phi-card__icon) {
@@ -605,13 +656,13 @@
605
656
 
606
657
  @media (hover: hover) {
607
658
  :where(.phi-card--hover-icon):hover :where(.phi-card__icon) {
608
- color: var(--phi-card-icon-background);
659
+ color: var(--phi-card-icon-hover-color);
609
660
  background: var(--phi-card-icon-color);
610
661
  }
611
662
  }
612
663
 
613
664
  :where(.phi-card--hover-icon):focus-within :where(.phi-card__icon) {
614
- color: var(--phi-card-icon-background);
665
+ color: var(--phi-card-icon-hover-color);
615
666
  background: var(--phi-card-icon-color);
616
667
  }
617
668
 
@@ -620,7 +671,8 @@
620
671
  transition: none;
621
672
  }
622
673
 
623
- .phi-card--hover-lift:is(:hover, :focus-within) {
674
+ .phi-card--hover-lift:is(:hover, :focus-within),
675
+ .phi-card-ribbon--lift > .ant-ribbon {
624
676
  translate: none;
625
677
  }
626
678
 
package/styles/shell.css CHANGED
@@ -294,6 +294,33 @@
294
294
  --phi-shell-chrome-filter: var(--phi-shell-chrome-filter-dark, none);
295
295
  }
296
296
 
297
+ /* The Overlay in a tone's mode (LAYOUTING.md "Surface tone"), for a box whose Background is the Theme's
298
+ (`PHI_BACKGROUND_THEME_STYLE`). The tone's class publishes the Overlay of the mode it asks for, so the
299
+ box -- and an untoned box inside it -- reads that mode's variables; `inverse` is read against the page's
300
+ mode, as the tone scope reads it, and turns with the mode switch. Inside the Root Layout only: a Modal
301
+ or Drawer portalled to `<body>` has no Overlay published, and its box falls back to the container
302
+ ground of the tone's mode. The Root Layout's own values above stay what the Chrome Regions and panes
303
+ read; those are computed on the Root Layout and inherited, so a tone below cannot touch them. */
304
+ :where([data-phi-root-layout="true"]) :where(.phi-tone-light),
305
+ :where([data-phi-root-layout="true"][data-phi-theme-mode="dark"]) :where(.phi-tone-inverse) {
306
+ --phi-shell-chrome-image: var(--phi-shell-chrome-image-light, none);
307
+ --phi-shell-chrome-size: var(--phi-shell-chrome-size-light, auto);
308
+ --phi-shell-chrome-position: var(--phi-shell-chrome-position-light, 0 0);
309
+ --phi-shell-chrome-repeat: var(--phi-shell-chrome-repeat-light, repeat);
310
+ --phi-shell-chrome-color: var(--phi-shell-chrome-color-light, transparent);
311
+ --phi-shell-chrome-filter: var(--phi-shell-chrome-filter-light, none);
312
+ }
313
+
314
+ :where([data-phi-root-layout="true"]) :where(.phi-tone-dark),
315
+ :where([data-phi-root-layout="true"]:not([data-phi-theme-mode="dark"])) :where(.phi-tone-inverse) {
316
+ --phi-shell-chrome-image: var(--phi-shell-chrome-image-dark, none);
317
+ --phi-shell-chrome-size: var(--phi-shell-chrome-size-dark, auto);
318
+ --phi-shell-chrome-position: var(--phi-shell-chrome-position-dark, 0 0);
319
+ --phi-shell-chrome-repeat: var(--phi-shell-chrome-repeat-dark, repeat);
320
+ --phi-shell-chrome-color: var(--phi-shell-chrome-color-dark, transparent);
321
+ --phi-shell-chrome-filter: var(--phi-shell-chrome-filter-dark, none);
322
+ }
323
+
297
324
  /* A Chrome Region carries the marker only while it authored no ground of its own, so there is nothing
298
325
  left to fall back through here: the shared colour is the ground. It needs no light and dark pair
299
326
  either, because the pair above has already resolved the mode. This rule follows the two that set the
@@ -332,6 +359,17 @@
332
359
  z-index: 50;
333
360
  }
334
361
 
362
+ /*
363
+ * The Header's panes stand above every Sider's. Both are grid items at the same level, and a Sider's
364
+ * pane comes later in the DOM, so at an equal `z-index` it painted over the Header's where the two meet:
365
+ * the Sider's ground hid the Header's and cut its Shadow at the Sider's edge. Still below every Chrome
366
+ * Region (100 and up).
367
+ */
368
+ .phi-shell-chrome-pane--header,
369
+ .phi-shell-chrome-pane--header-bottom {
370
+ z-index: 51;
371
+ }
372
+
335
373
  /*
336
374
  * What the pane paints is set inline by the Shell, not here.
337
375
  *
@@ -430,6 +468,41 @@
430
468
  --phi-region-chrome-attachment: scroll;
431
469
  }
432
470
 
471
+ /*
472
+ * A toned band takes no paint from its family's pane (LAYOUTING.md "Surface tone").
473
+ *
474
+ * A toned Chrome Region paints its own ground -- the tone's container ground, a stated Background, or
475
+ * the Overlay of its tone's mode -- and never carries the marker. The pane behind it keeps the page's
476
+ * mode, so where that ground lets anything through, the page-mode glass showed under the tone's. The
477
+ * pane cannot be cut around one band without knowing its height, so it stops painting for the whole
478
+ * family and the family's marker bands paint the Overlay themselves, as they do without panes. Its
479
+ * geometry and Shadow stay: the frame's edge is where it was, and the Header still stands over the
480
+ * Sider. The pane's paint is inline and reads these properties on the pane itself, so they are set
481
+ * there. Untoned families match nothing here.
482
+ */
483
+ .shell-sider-full:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"], [data-phi-region-key="header_bottom"]):is(.phi-tone-light, .phi-tone-dark, .phi-tone-inverse)) > .phi-shell-chrome-pane--header,
484
+ .shell-sider-embedded:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"]):is(.phi-tone-light, .phi-tone-dark, .phi-tone-inverse)) > .phi-shell-chrome-pane--header,
485
+ .shell-sider-embedded:has(> [data-phi-region-key="header_bottom"]:is(.phi-tone-light, .phi-tone-dark, .phi-tone-inverse)) > .phi-shell-chrome-pane--header-bottom,
486
+ [data-phi-shell-chrome-panes="true"]:has(> [data-phi-region-key="sider_left"]:is(.phi-tone-light, .phi-tone-dark, .phi-tone-inverse)) > .phi-shell-chrome-pane--sider,
487
+ [data-phi-shell-chrome-panes="true"]:has(> [data-phi-region-key="sider_right"]:is(.phi-tone-light, .phi-tone-dark, .phi-tone-inverse)) > .phi-shell-chrome-pane--sider-right,
488
+ [data-phi-shell-chrome-panes="true"]:has(> :is([data-phi-region-key="footer_top"], [data-phi-region-key="footer_main"], [data-phi-region-key="footer_bottom"]):is(.phi-tone-light, .phi-tone-dark, .phi-tone-inverse)) > .phi-shell-chrome-pane--footer {
489
+ --phi-shell-chrome-image: none;
490
+ --phi-shell-chrome-color: transparent;
491
+ --phi-shell-chrome-filter: none;
492
+ }
493
+
494
+ .shell-sider-full:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"], [data-phi-region-key="header_bottom"]):is(.phi-tone-light, .phi-tone-dark, .phi-tone-inverse))
495
+ > .phi-cms-region-shell[data-phi-shell-chrome="true"]:is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"], [data-phi-region-key="header_bottom"]),
496
+ .shell-sider-embedded:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"]):is(.phi-tone-light, .phi-tone-dark, .phi-tone-inverse))
497
+ > .phi-cms-region-shell[data-phi-shell-chrome="true"]:is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"]),
498
+ [data-phi-shell-chrome-panes="true"]:has(> :is([data-phi-region-key="footer_top"], [data-phi-region-key="footer_main"], [data-phi-region-key="footer_bottom"]):is(.phi-tone-light, .phi-tone-dark, .phi-tone-inverse))
499
+ > .phi-cms-region-shell[data-phi-shell-chrome="true"]:is([data-phi-region-key="footer_top"], [data-phi-region-key="footer_main"], [data-phi-region-key="footer_bottom"]) {
500
+ --phi-region-chrome-image: var(--phi-shell-chrome-image, none);
501
+ --phi-region-chrome-color: var(--phi-shell-chrome-color, transparent);
502
+ --phi-region-chrome-filter: var(--phi-shell-chrome-filter, none);
503
+ --phi-region-chrome-attachment: fixed;
504
+ }
505
+
433
506
  /* ---------------------------------------------------------------------------------------------
434
507
  Revealing `header_top` (SHELL.md "Region visibility per Page")
435
508
 
@@ -1,4 +1,5 @@
1
1
  import darkAlgorithm from "antd/es/theme/themes/dark";
2
+ import { generateColorPalettes as generateDarkColorPalettes } from "antd/es/theme/themes/dark/colors";
2
3
  import defaultAlgorithm from "antd/es/theme/themes/default";
3
4
  import seedToken from "antd/es/theme/themes/seed";
4
5
  import formatToken from "antd/es/theme/util/alias";
@@ -34,13 +35,31 @@ export function createPhiAntdThemeCssVarKey(scope, identity) {
34
35
  .replace(/^-+|-+$/g, "") || "theme";
35
36
  return `phi-${normalizedScope}-${hashPhiAntdThemeIdentity(identity)}`;
36
37
  }
38
+ /*
39
+ * A link and an info colour pointed at turn lighter in the dark mode, as a primary button does.
40
+ *
41
+ * Ant Design takes both hovers from step 4 of the colour's palette in either mode. In the light palette
42
+ * that step is a lighter tint; the dark algorithm reorders its palette so the low steps fade into the dark
43
+ * ground for borders and fills, and step 4 there is the border's -- darker than the colour itself, so a
44
+ * link went dim on a dark ground when pointed at (#3867b5 to #274069 on #08153a). The primary hover takes
45
+ * step 5, which in the dark palette is the lighter one; these take it too. A hover a Theme states itself
46
+ * still wins: `formatToken` lays the stated tokens over this.
47
+ */
48
+ function withPhiDarkHoverSteps(seed, derived) {
49
+ const linkBase = seed.colorLink || seed.colorInfo;
50
+ return {
51
+ ...derived,
52
+ ...(linkBase ? { colorLinkHover: generateDarkColorPalettes(linkBase)[5] } : {}),
53
+ ...(seed.colorInfo ? { colorInfoHover: generateDarkColorPalettes(seed.colorInfo)[5] } : {}),
54
+ };
55
+ }
37
56
  export function resolvePhiAntdAliasTokens(mode, token) {
38
57
  const mergedSeedToken = {
39
58
  ...seedToken,
40
59
  ...token,
41
60
  };
42
61
  const derivativeToken = mode === "dark"
43
- ? darkAlgorithm(mergedSeedToken)
62
+ ? withPhiDarkHoverSteps(mergedSeedToken, darkAlgorithm(mergedSeedToken))
44
63
  : defaultAlgorithm(mergedSeedToken);
45
64
  return formatToken({
46
65
  ...derivativeToken,
@@ -22,7 +22,7 @@ import type { PhiThemePalette } from "./phi-theme-presets";
22
22
  * Who may still speak Ant Design directly is a separate question, and `scripts/validate-control-boundaries.mjs`
23
23
  * answers it: the alias resolver, the root adapter, the two font helpers and this file.
24
24
  */
25
- export declare const PHI_THEME_TOKEN_KEYS: readonly ["colorBgContainer", "colorBgElevated", "colorBgMask", "colorBgSpotlight", "colorBorder", "colorBorderSecondary", "colorSplit", "colorFillAlter", "colorFill", "colorBgLayout", "colorFillQuaternary", "colorFillSecondary", "colorFillTertiary", "colorText", "colorTextBase", "colorTextHeading", "colorTextSecondary", "colorTextTertiary", "colorTextQuaternary", "colorTextDescription", "colorTextDisabled", "colorTextLabel", "colorTextPlaceholder", "colorTextLightSolid", "colorPrimary", "colorPrimaryBg", "colorPrimaryBgHover", "colorPrimaryBorder", "colorPrimaryBorderHover", "colorPrimaryHover", "colorPrimaryActive", "colorPrimaryText", "colorPrimaryTextHover", "colorPrimaryTextActive", "colorInfo", "colorInfoBg", "colorInfoBgHover", "colorInfoBorder", "colorInfoBorderHover", "colorInfoText", "colorInfoTextHover", "colorSuccess", "colorSuccessBg", "colorSuccessBgHover", "colorSuccessBorder", "colorSuccessBorderHover", "colorSuccessText", "colorWarning", "colorWarningBg", "colorWarningBgHover", "colorWarningBorder", "colorWarningBorderHover", "colorWarningText", "colorError", "colorErrorBg", "colorErrorText", "colorErrorTextHover", "colorErrorTextActive", "colorLink", "colorLinkHover", "colorLinkActive", "padding", "paddingXXS", "paddingXS", "paddingSM", "paddingMD", "paddingLG", "paddingXL", "margin", "marginXXS", "marginXS", "marginSM", "marginMD", "marginLG", "marginXL", "marginXXL", "sizeXS", "sizeSM", "sizeMD", "sizeLG", "borderRadius", "borderRadiusXS", "borderRadiusSM", "borderRadiusLG", "borderRadiusOuter", "lineWidth", "lineType", "boxShadow", "boxShadowSecondary", "boxShadowTertiary", "controlHeight", "controlHeightXS", "controlHeightSM", "controlHeightLG", "fontFamily", "fontFamilyCode", "fontSize", "fontSizeSM", "fontSizeLG", "fontSizeXL", "fontSizeHeading1", "fontSizeHeading2", "fontSizeHeading3", "fontSizeHeading4", "fontSizeHeading5", "fontWeightStrong", "lineHeight", "lineHeightLG", "lineHeightHeading1", "lineHeightHeading2", "lineHeightHeading3", "lineHeightHeading4", "lineHeightHeading5", "motionDurationMid", "motionDurationSlow", "motionEaseInOut", "motionEaseOut"];
25
+ export declare const PHI_THEME_TOKEN_KEYS: readonly ["colorBgContainer", "colorBgElevated", "colorBgMask", "colorBgSpotlight", "colorBorder", "colorBorderSecondary", "colorSplit", "colorFillAlter", "colorFill", "colorBgLayout", "colorFillQuaternary", "colorFillSecondary", "colorFillTertiary", "colorText", "colorTextBase", "colorTextHeading", "colorTextSecondary", "colorTextTertiary", "colorTextQuaternary", "colorTextDescription", "colorTextDisabled", "colorTextLabel", "colorTextPlaceholder", "colorTextLightSolid", "colorPrimary", "colorPrimaryBg", "colorPrimaryBgHover", "colorPrimaryBorder", "colorPrimaryBorderHover", "colorPrimaryHover", "colorPrimaryActive", "colorPrimaryText", "colorPrimaryTextHover", "colorPrimaryTextActive", "colorInfo", "colorInfoBg", "colorInfoBgHover", "colorInfoBorder", "colorInfoBorderHover", "colorInfoText", "colorInfoTextHover", "colorSuccess", "colorSuccessBg", "colorSuccessBgHover", "colorSuccessBorder", "colorSuccessBorderHover", "colorSuccessText", "colorWarning", "colorWarningBg", "colorWarningBgHover", "colorWarningBorder", "colorWarningBorderHover", "colorWarningText", "colorError", "colorErrorBg", "colorErrorText", "colorErrorTextHover", "colorErrorTextActive", "colorLink", "colorLinkHover", "colorLinkActive", "padding", "paddingXXS", "paddingXS", "paddingSM", "paddingMD", "paddingLG", "paddingXL", "margin", "marginXXS", "marginXS", "marginSM", "marginMD", "marginLG", "marginXL", "marginXXL", "sizeXS", "sizeSM", "sizeMD", "sizeLG", "borderRadius", "borderRadiusXS", "borderRadiusSM", "borderRadiusLG", "borderRadiusOuter", "lineWidth", "lineType", "boxShadow", "boxShadowSecondary", "boxShadowTertiary", "controlHeight", "controlHeightXS", "controlHeightSM", "controlHeightLG", "fontFamily", "fontFamilyCode", "fontSize", "fontSizeSM", "fontSizeLG", "fontSizeXL", "fontSizeHeading1", "fontSizeHeading2", "fontSizeHeading3", "fontSizeHeading4", "fontSizeHeading5", "fontWeightStrong", "lineHeight", "lineHeightSM", "lineHeightLG", "lineHeightHeading1", "lineHeightHeading2", "lineHeightHeading3", "lineHeightHeading4", "lineHeightHeading5", "motionDurationMid", "motionDurationSlow", "motionEaseInOut", "motionEaseOut"];
26
26
  /**
27
27
  * The names this house adds to Ant Design's set.
28
28
  *