@phis/ui 0.5.2 → 0.5.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 (284) hide show
  1. package/README.md +1 -1
  2. package/components/controls/phi-border-control.js +1 -1
  3. package/components/controls/phi-bound-radius-control.js +9 -9
  4. package/components/controls/phi-brand-control.js +1 -1
  5. package/components/controls/phi-cascader-control.d.ts +9 -1
  6. package/components/controls/phi-cascader-control.js +25 -3
  7. package/components/controls/phi-drawer-control-adapter.js +4 -4
  8. package/components/controls/phi-dropdown-control.js +2 -2
  9. package/components/controls/phi-form-control.js +1 -1
  10. package/components/controls/phi-image-control.js +1 -1
  11. package/components/controls/phi-mask-picker-control.js +6 -6
  12. package/components/controls/phi-money-control.d.ts +39 -0
  13. package/components/controls/phi-money-control.js +34 -0
  14. package/components/controls/phi-number-control.d.ts +6 -1
  15. package/components/controls/phi-number-control.js +3 -3
  16. package/components/controls/phi-options-provider.d.ts +7 -0
  17. package/components/controls/phi-options-provider.js +11 -0
  18. package/components/controls/phi-select-control.js +1 -1
  19. package/components/controls/phi-theme-scope-control.js +1 -1
  20. package/components/controls/use-phi-color-control-presets.js +2 -2
  21. package/components/forms/compound-form-controls.js +2 -2
  22. package/components/forms/extended-form-field-controls.d.ts +1 -0
  23. package/components/forms/extended-form-field-controls.js +24 -2
  24. package/components/forms/form-descriptor-runtime-client.js +13 -0
  25. package/components/forms/form-provider-contract.d.ts +43 -0
  26. package/components/forms/form-provider-contract.js +40 -0
  27. package/components/forms/money-field.d.ts +27 -0
  28. package/components/forms/money-field.js +78 -0
  29. package/components/forms/shared-form-provider-registry.js +6 -2
  30. package/components/layouts/clients/phi-flex-layout-client.js +4 -4
  31. package/components/layouts/clients/phi-grid-layout-client.js +3 -3
  32. package/components/layouts/clients/phi-sequence-slot-editor.js +1 -1
  33. package/components/layouts/layout-definitions.d.ts +4 -4
  34. package/components/layouts/phi-page-region-layout.js +1 -1
  35. package/components/layouts/phi-structure-region-layout.js +3 -3
  36. package/components/media/phi-asset-focal-rect-widget.js +4 -4
  37. package/components/media/phi-asset-inspector-section.js +1 -1
  38. package/components/media/phi-media-kind-icon.js +2 -2
  39. package/components/media/phi-media-picker-binding.js +6 -1
  40. package/components/media/phi-media-restricted-icon.js +1 -1
  41. package/components/media/phi-site-font-assets.js +6 -1
  42. package/components/motion/phi-sequence-run.d.ts +14 -1
  43. package/components/motion/phi-sequence-run.js +22 -3
  44. package/components/motion/phi-sequence-viewport.js +3 -1
  45. package/components/overlays/phi-overlay-container-client.js +1 -1
  46. package/components/regions/presets/content-entry-editor-page-tree.js +3 -1
  47. package/components/regions/presets/phi-base-page-column.js +6 -2
  48. package/components/root/phi-config-provider.js +1 -1
  49. package/components/root/phi-root-background.js +1 -1
  50. package/components/root/phi-root-theme-resolver.js +1 -1
  51. package/components/shell/phi-module-icons.js +1 -1
  52. package/components/tables/client/phi-table-binding.js +16 -3
  53. package/components/trees/client/phi-tree-binding.js +6 -2
  54. package/components/widgets/built-in/builder-workspace-preview.js +8 -8
  55. package/components/widgets/client/bullet-list-entries-editor.js +2 -2
  56. package/components/widgets/client/external-document-editor.js +1 -1
  57. package/components/widgets/client/html-editor.js +3 -3
  58. package/components/widgets/client/shared/phi-collection-view-binding.js +10 -2
  59. package/components/widgets/client/shared/phi-rendered-value.d.ts +9 -1
  60. package/components/widgets/client/shared/phi-rendered-value.js +20 -1
  61. package/components/widgets/config/background.d.ts +1 -1
  62. package/components/widgets/config/background.js +1 -1
  63. package/components/widgets/config/choice-shared.d.ts +2 -2
  64. package/components/widgets/inspector-field-row.js +1 -1
  65. package/components/widgets/label-sets/gallery.js +6 -0
  66. package/components/widgets/label-sets/inspector.js +2 -0
  67. package/components/widgets/label-sets/interval.d.ts +4 -0
  68. package/components/widgets/label-sets/interval.js +31 -0
  69. package/components/widgets/label-sets/record.js +6 -1
  70. package/components/widgets/label-sets/slot-upload.d.ts +4 -0
  71. package/components/widgets/label-sets/slot-upload.js +36 -0
  72. package/components/widgets/label-sets/table.js +6 -1
  73. package/components/widgets/label-types/gallery.d.ts +7 -0
  74. package/components/widgets/label-types/gallery.js +6 -0
  75. package/components/widgets/label-types/inspector.d.ts +1 -0
  76. package/components/widgets/label-types/inspector.js +1 -0
  77. package/components/widgets/label-types/interval.d.ts +16 -0
  78. package/components/widgets/label-types/interval.js +21 -0
  79. package/components/widgets/label-types/record.d.ts +3 -0
  80. package/components/widgets/label-types/record.js +2 -0
  81. package/components/widgets/label-types/slot-upload.d.ts +24 -0
  82. package/components/widgets/label-types/slot-upload.js +16 -0
  83. package/components/widgets/label-types/table.d.ts +3 -0
  84. package/components/widgets/label-types/table.js +2 -0
  85. package/components/widgets/shared/card-body-client.js +1 -1
  86. package/components/widgets/shared/result-body-client.js +1 -1
  87. package/constants/media-library-provider-keys.d.ts +8 -1
  88. package/constants/media-library-provider-keys.js +8 -1
  89. package/constants/record-field-kinds.d.ts +6 -0
  90. package/constants/record-field-kinds.js +7 -0
  91. package/constants/runtime-module-ownership.js +2 -1
  92. package/controls.d.ts +7 -0
  93. package/controls.js +4 -0
  94. package/helpers/border-widget-style.d.ts +2 -2
  95. package/helpers/border-widget-style.js +2 -2
  96. package/helpers/cms-dialog.d.ts +43 -7
  97. package/helpers/cms-dialog.js +46 -4
  98. package/helpers/cms-layout-defaults.d.ts +2 -2
  99. package/helpers/cms-page-catalog.d.ts +13 -0
  100. package/helpers/cms-page-catalog.js +18 -2
  101. package/helpers/cms-preset-nodes.d.ts +13 -3
  102. package/helpers/cms-preset-nodes.js +3 -2
  103. package/helpers/cms-preset-page-tree.d.ts +4 -0
  104. package/helpers/cms-preset-page-tree.js +2 -0
  105. package/helpers/layout-style.d.ts +2 -2
  106. package/helpers/money-amount.d.ts +48 -0
  107. package/helpers/money-amount.js +131 -0
  108. package/helpers/page-layout-check.d.ts +4 -1
  109. package/helpers/page-layout-check.js +41 -2
  110. package/helpers/record-fields.d.ts +22 -0
  111. package/helpers/record-fields.js +109 -0
  112. package/helpers/surface-presets.d.ts +6 -6
  113. package/helpers/surface-style.d.ts +1 -1
  114. package/helpers.d.ts +0 -1
  115. package/helpers.js +0 -2
  116. package/module-page-check.d.ts +12 -0
  117. package/module-page-check.js +12 -0
  118. package/module-records.d.ts +7 -2
  119. package/module-records.js +5 -1
  120. package/next/antd-form-context-loader.mjs +31 -0
  121. package/next/config.d.mts +2 -0
  122. package/next/config.mjs +36 -3
  123. package/package.json +11 -2
  124. package/plugins/runtime-modules/accounting/module.d.ts +1 -1
  125. package/plugins/runtime-modules/app/module.d.ts +1 -1
  126. package/plugins/runtime-modules/asset/data-providers.d.ts +0 -65
  127. package/plugins/runtime-modules/asset/data-providers.js +0 -40
  128. package/plugins/runtime-modules/asset/definition.d.ts +0 -60
  129. package/plugins/runtime-modules/asset/ids.d.ts +0 -1
  130. package/plugins/runtime-modules/asset/ids.js +1 -2
  131. package/plugins/runtime-modules/asset/presets.d.ts +1 -0
  132. package/plugins/runtime-modules/asset/server.js +0 -5
  133. package/plugins/runtime-modules/asset/services/collection.js +1 -0
  134. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +2 -2
  135. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +3 -0
  136. package/plugins/runtime-modules/blog/presets.d.ts +1 -0
  137. package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +4 -1
  138. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +13 -4
  139. package/plugins/runtime-modules/builder/clients/inspector-link-target-field.js +1 -1
  140. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +14 -1
  141. package/plugins/runtime-modules/builder/clients/inspector-signal-section.js +2 -2
  142. package/plugins/runtime-modules/builder/clients/layout-inspector.js +1 -1
  143. package/plugins/runtime-modules/builder/clients/layout-scaffold-buttons.js +4 -4
  144. package/plugins/runtime-modules/builder/clients/layout-scaffold-overlays.js +1 -1
  145. package/plugins/runtime-modules/builder/clients/region-inspector.js +1 -1
  146. package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
  147. package/plugins/runtime-modules/builder/clients/shells-workspace.js +1 -1
  148. package/plugins/runtime-modules/builder/clients/structure-canvas.js +2 -2
  149. package/plugins/runtime-modules/builder/clients/widget-effects-editor.js +1 -1
  150. package/plugins/runtime-modules/builder/clients/widget-inspector.d.ts +4 -1
  151. package/plugins/runtime-modules/builder/clients/widget-inspector.js +3 -2
  152. package/plugins/runtime-modules/builder/offered-page-catalog.js +3 -3
  153. package/plugins/runtime-modules/builder/options-providers.js +7 -0
  154. package/plugins/runtime-modules/builder/page-presets.server.d.ts +6 -0
  155. package/plugins/runtime-modules/builder/page-presets.server.js +8 -0
  156. package/plugins/runtime-modules/builder/pages-workspace.js +12 -1
  157. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +5 -5
  158. package/plugins/runtime-modules/builder/structure-dnd.js +2 -2
  159. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +6 -3
  160. package/plugins/runtime-modules/builder/widgets/test-block/client.js +1 -1
  161. package/plugins/runtime-modules/content-entry-routes.d.ts +1 -0
  162. package/plugins/runtime-modules/contracts.js +41 -1
  163. package/plugins/runtime-modules/core/data-providers.d.ts +60 -0
  164. package/plugins/runtime-modules/core/data-providers.js +41 -0
  165. package/plugins/runtime-modules/core/definition.d.ts +98 -0
  166. package/plugins/runtime-modules/core/form-providers.d.ts +43 -0
  167. package/plugins/runtime-modules/core/server.js +5 -0
  168. package/plugins/runtime-modules/core/widgets/breadcrumb/client.d.ts +6 -3
  169. package/plugins/runtime-modules/core/widgets/breadcrumb/client.js +6 -5
  170. package/plugins/runtime-modules/core/widgets/breadcrumb/plugin.js +1 -1
  171. package/plugins/runtime-modules/core/widgets/breadcrumb/server.d.ts +9 -1
  172. package/plugins/runtime-modules/core/widgets/breadcrumb/server.js +29 -3
  173. package/plugins/runtime-modules/core/widgets/button/config.d.ts +34 -0
  174. package/plugins/runtime-modules/core/widgets/button/config.js +16 -0
  175. package/plugins/runtime-modules/core/widgets/button/plugin.js +37 -6
  176. package/plugins/runtime-modules/core/widgets/card/config.d.ts +13 -2
  177. package/plugins/runtime-modules/core/widgets/cascader/authoring.d.ts +3 -3
  178. package/plugins/runtime-modules/core/widgets/cascader/client.js +1 -1
  179. package/plugins/runtime-modules/core/widgets/cascader/config.d.ts +8 -2
  180. package/plugins/runtime-modules/core/widgets/cascader/config.js +22 -0
  181. package/plugins/runtime-modules/core/widgets/checkbox-group/config.d.ts +1 -1
  182. package/plugins/runtime-modules/core/widgets/description/config.d.ts +13 -2
  183. package/plugins/runtime-modules/core/widgets/description/editor.js +13 -13
  184. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +11 -0
  185. package/plugins/runtime-modules/core/widgets/gallery/authoring.js +12 -3
  186. package/plugins/runtime-modules/core/widgets/gallery/client.d.ts +4 -1
  187. package/plugins/runtime-modules/core/widgets/gallery/client.js +38 -21
  188. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +18 -0
  189. package/plugins/runtime-modules/core/widgets/gallery/config.js +24 -0
  190. package/plugins/runtime-modules/core/widgets/gallery/server.d.ts +1 -1
  191. package/plugins/runtime-modules/core/widgets/gallery/server.js +11 -0
  192. package/plugins/runtime-modules/core/widgets/image/config.d.ts +35 -0
  193. package/plugins/runtime-modules/core/widgets/image/config.js +8 -0
  194. package/plugins/runtime-modules/core/widgets/image/plugin.js +19 -1
  195. package/plugins/runtime-modules/core/widgets/image/server.d.ts +3 -1
  196. package/plugins/runtime-modules/core/widgets/image/server.js +2 -2
  197. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +13 -0
  198. package/plugins/runtime-modules/core/widgets/markdown/config.js +8 -0
  199. package/plugins/runtime-modules/core/widgets/markdown/editor.js +7 -7
  200. package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
  201. package/plugins/runtime-modules/core/widgets/multi-select/config.d.ts +1 -1
  202. package/plugins/runtime-modules/core/widgets/record/authoring.js +1 -1
  203. package/plugins/runtime-modules/core/widgets/record/client.js +8 -2
  204. package/plugins/runtime-modules/core/widgets/record/config.js +4 -0
  205. package/plugins/runtime-modules/core/widgets/result/config.d.ts +11 -0
  206. package/plugins/runtime-modules/core/widgets/segmented/config.d.ts +1 -1
  207. package/plugins/runtime-modules/core/widgets/select-box/config.d.ts +1 -1
  208. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +13 -0
  209. package/plugins/runtime-modules/core/widgets/simple-text/config.js +9 -0
  210. package/plugins/runtime-modules/core/widgets/simple-text/editor.js +1 -1
  211. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +14 -1
  212. package/plugins/runtime-modules/core/widgets/slot-upload/authoring.js +2 -1
  213. package/plugins/runtime-modules/core/widgets/slot-upload/client.d.ts +3 -1
  214. package/plugins/runtime-modules/core/widgets/slot-upload/client.js +45 -24
  215. package/plugins/runtime-modules/core/widgets/slot-upload/config.d.ts +12 -4
  216. package/plugins/runtime-modules/core/widgets/slot-upload/config.js +18 -1
  217. package/plugins/runtime-modules/core/widgets/slot-upload/plugin.js +4 -2
  218. package/plugins/runtime-modules/core/widgets/slot-upload/server.d.ts +9 -3
  219. package/plugins/runtime-modules/core/widgets/slot-upload/server.js +17 -3
  220. package/plugins/runtime-modules/core/widgets/spacer/client.js +1 -1
  221. package/plugins/runtime-modules/core/widgets/steps/config.d.ts +1 -1
  222. package/plugins/runtime-modules/core/widgets/table/client.js +4 -4
  223. package/plugins/runtime-modules/core/widgets/table/config.d.ts +37 -0
  224. package/plugins/runtime-modules/core/widgets/table/config.js +3 -0
  225. package/plugins/runtime-modules/descriptor-compiler.d.ts +11 -1
  226. package/plugins/runtime-modules/descriptor-compiler.js +57 -8
  227. package/plugins/runtime-modules/editor/presets.d.ts +1 -0
  228. package/plugins/runtime-modules/groups/definition.d.ts +1 -1
  229. package/plugins/runtime-modules/groups/forms.d.ts +18 -0
  230. package/plugins/runtime-modules/groups/forms.js +2 -2
  231. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +6 -4
  232. package/plugins/runtime-modules/localization/presets.d.ts +1 -0
  233. package/plugins/runtime-modules/news/presets.d.ts +1 -0
  234. package/plugins/runtime-modules/public/module.d.ts +1 -1
  235. package/plugins/runtime-modules/resolver.js +7 -0
  236. package/plugins/runtime-modules/revisions/presets.d.ts +1 -0
  237. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +2 -2
  238. package/plugins/runtime-modules/theme/presets.d.ts +1 -0
  239. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +25 -2
  240. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +4 -2
  241. package/plugins/runtime-modules/user-management/controller/client.js +6 -1
  242. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +3 -3
  243. package/runtime-render-client.d.ts +1 -1
  244. package/runtime-render-client.js +2 -1
  245. package/server-helpers/cms-page-record.d.ts +26 -0
  246. package/server-helpers/cms-page-record.js +52 -0
  247. package/server-helpers/cms-request.js +48 -4
  248. package/server-helpers/record-fields.d.ts +62 -0
  249. package/server-helpers/record-fields.js +86 -0
  250. package/server-helpers/record-samples.d.ts +21 -0
  251. package/server-helpers/record-samples.js +49 -0
  252. package/styles/builder-scaffold.css +19 -19
  253. package/styles/controls.css +109 -109
  254. package/styles/gradients.css +23 -23
  255. package/styles/layout-affordances.css +15 -15
  256. package/styles/layout-authoring-scaffold.css +20 -20
  257. package/styles/layout.css +9 -9
  258. package/styles/root.css +4 -4
  259. package/styles/shell.css +48 -17
  260. package/theme/antd-css-var-contract.d.ts +86 -80
  261. package/theme/antd-css-var-contract.js +92 -81
  262. package/theme/phi-control-shape.d.ts +1 -1
  263. package/theme/phi-theme-gradients.d.ts +2 -2
  264. package/theme/phi-theme-gradients.js +14 -14
  265. package/theme/phi-theme-palette.d.ts +1 -1
  266. package/theme/phi-theme-palette.js +2 -2
  267. package/theme/phi-theme-tokens.d.ts +8 -5
  268. package/theme/phi-theme-tokens.js +59 -28
  269. package/theme/phi-theme.d.ts +14 -2
  270. package/theme/phi-theme.js +14 -1
  271. package/theme/phi-tokens.d.ts +5 -0
  272. package/theme/phi-tokens.js +9 -0
  273. package/types/cms-module-descriptors.d.ts +9 -0
  274. package/types/cms-plugins.d.ts +27 -1
  275. package/types/collection-provider.d.ts +7 -0
  276. package/types/core-widget-placements.d.ts +42 -0
  277. package/types/record-provider.d.ts +109 -1
  278. package/types/table-widget.d.ts +33 -1
  279. package/types/table-widget.js +1 -0
  280. package/types/tree-widget.d.ts +7 -0
  281. package/types/widget-runtime.d.ts +5 -0
  282. package/types.d.ts +1 -0
  283. /package/plugins/runtime-modules/{asset/services/folder-images.server.d.ts → core/services/media-folder-images.server.d.ts} +0 -0
  284. /package/plugins/runtime-modules/{asset/services/folder-images.server.js → core/services/media-folder-images.server.js} +0 -0
@@ -9,7 +9,7 @@ import { createPhiSignalAddress, createPhiSignalSubcontrolAddress, PHI_SIGNAL_VA
9
9
  import { createPhiUserManagementControllerAddress, PHI_USER_MANAGEMENT_CONTROLLER_INSTANCE_KEY, PHI_USER_MANAGEMENT_CONTROLLER_TYPE, } from "../controller/address";
10
10
  import { PHI_USER_MANAGEMENT_FORM_IDS } from "../forms";
11
11
  import { PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS, PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS, PHI_USER_MANAGEMENT_PAGE_WIDGET_IDS, } from "../addresses";
12
- import { PHI_DIALOG_BODY_CONFIG, PHI_DIALOG_COMMANDS_CONFIG } from "../../../../helpers/cms-dialog";
12
+ import { PHI_DIALOG_BODY_CONFIG, PHI_DIALOG_COMMANDS_CONFIG, PHI_DIALOG_WIDTH_SINGLE_COLUMN, } from "../../../../helpers/cms-dialog";
13
13
  import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
14
14
  const SYNTHETIC_ADMIN_USERS_REGION_IDS = {
15
15
  regionContent: -431,
@@ -200,8 +200,8 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
200
200
  },
201
201
  }],
202
202
  overlays: [
203
- overlay(PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS.overlayCreate, PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS.layoutCreate, widgetLabels.editor.addTitle, { compact: "calc(100vw - 32px)", medium: 600, wide: 640 }, "admin-users-create-modal", "create"),
204
- overlay(PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS.overlayEdit, PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS.layoutEdit, widgetLabels.editor.editTitle, { compact: "calc(100vw - 32px)", medium: 600, wide: 640 }, "admin-users-edit-modal", "edit"),
203
+ overlay(PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS.overlayCreate, PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS.layoutCreate, widgetLabels.editor.addTitle, PHI_DIALOG_WIDTH_SINGLE_COLUMN, "admin-users-create-modal", "create"),
204
+ overlay(PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS.overlayEdit, PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS.layoutEdit, widgetLabels.editor.editTitle, PHI_DIALOG_WIDTH_SINGLE_COLUMN, "admin-users-edit-modal", "edit"),
205
205
  overlay(PHI_USER_MANAGEMENT_PAGE_OVERLAY_IDS.overlayHistory, PHI_USER_MANAGEMENT_PAGE_LAYOUT_IDS.layoutHistory, widgetLabels.history.title, { compact: "calc(100vw - 32px)", medium: "90vw", wide: 980 }, "admin-users-history-modal"),
206
206
  ],
207
207
  regions: [scaffold.region],
@@ -1,3 +1,3 @@
1
1
  export { PhiRuntimeModuleRenderClientHost, PhiRuntimeModuleRenderClientManifestProvider, createPhiRuntimeModuleRenderClientManifest, definePhiRuntimeModuleRenderClient, extendPhiRuntimeModuleRenderClientManifest, } from "./components/runtime/runtime-module-render-client-manifest";
2
2
  export type { PhiRuntimeModuleRenderClient, PhiRuntimeModuleRenderClientManifest, PhiRuntimeModuleRenderClientProps, } from "./components/runtime/runtime-module-render-client-manifest";
3
- export { usePhiIntlLocale } from "./components/root/phi-intl-locale";
3
+ export { usePhiIntlLocale, usePhiIntlTimeZone } from "./components/root/phi-intl-locale";
@@ -1,2 +1,3 @@
1
1
  export { PhiRuntimeModuleRenderClientHost, PhiRuntimeModuleRenderClientManifestProvider, createPhiRuntimeModuleRenderClientManifest, definePhiRuntimeModuleRenderClient, extendPhiRuntimeModuleRenderClientManifest, } from "./components/runtime/runtime-module-render-client-manifest";
2
- export { usePhiIntlLocale } from "./components/root/phi-intl-locale";
2
+ // The page's language and the Site's time zone, which a Module's own binding sends with a Provider request.
3
+ export { usePhiIntlLocale, usePhiIntlTimeZone } from "./components/root/phi-intl-locale";
@@ -0,0 +1,26 @@
1
+ import "server-only";
2
+ import type { PhiBlockRuntime } from "../types";
3
+ import type { PhiCmsRoutePresetBinding } from "../types/cms-module-descriptors";
4
+ import type { PhiRuntimeModuleCatalog, PhiRuntimeModuleId } from "../types/cms-plugins";
5
+ import type { PhiPageRecordBinding } from "../types/record-provider";
6
+ /**
7
+ * The record a route's Page is about, read before anything is drawn (MODULES.md, "The fields of a record,
8
+ * and the record a Page is about").
9
+ *
10
+ * `missing` is an address that names no record: the caller answers 404. An unavailable Provider is not
11
+ * that -- the Page is drawn, its Widgets say what they could not read, and the title stays the route's.
12
+ */
13
+ export type PhiCmsPageRecord = {
14
+ status: "missing";
15
+ } | {
16
+ status: "ok";
17
+ binding: PhiPageRecordBinding;
18
+ title: string | null;
19
+ description: string | null;
20
+ };
21
+ export declare function resolvePhiCmsPageRecord({ binding, runtime, runtimeModuleCatalog, activeModuleIds }: {
22
+ binding: PhiCmsRoutePresetBinding;
23
+ runtime: PhiBlockRuntime;
24
+ runtimeModuleCatalog: PhiRuntimeModuleCatalog;
25
+ activeModuleIds: ReadonlySet<PhiRuntimeModuleId>;
26
+ }): Promise<PhiCmsPageRecord | null>;
@@ -0,0 +1,52 @@
1
+ import "server-only";
2
+ import { buildPhiRecordDeclarationsByKey } from "../helpers/record-fields";
3
+ import { readPhiPageRecordField, resolvePhiRecordFields } from "./record-fields";
4
+ import { resolvePhiRecordSource } from "./record-source";
5
+ /** What the record Providers of the active Modules offer, as a render's registry holds it. */
6
+ function buildRecordRegistry(runtimeModuleCatalog, activeModuleIds) {
7
+ const entries = [...activeModuleIds].flatMap((moduleId) => {
8
+ const entry = runtimeModuleCatalog.get(moduleId);
9
+ return entry ? [entry] : [];
10
+ });
11
+ return {
12
+ recordProviderLoadersByKey: new Map(entries.flatMap((entry) => (entry.recordProviders ?? []).map((provider) => [provider.key, provider.load]))),
13
+ recordFieldsLoadersByKey: new Map(entries.flatMap((entry) => (entry.recordProviders ?? []).flatMap((provider) => provider.loadFields ? [[provider.key, provider.loadFields]] : []))),
14
+ recordDeclarationsByKey: buildPhiRecordDeclarationsByKey(entries),
15
+ };
16
+ }
17
+ export async function resolvePhiCmsPageRecord({ binding, runtime, runtimeModuleCatalog, activeModuleIds }) {
18
+ const declaration = binding.descriptor.pageRecord;
19
+ if (!declaration) {
20
+ return null;
21
+ }
22
+ const route = `${binding.descriptor.ownerModuleId}/${binding.descriptor.presetKey}`;
23
+ const registry = buildRecordRegistry(runtimeModuleCatalog, activeModuleIds);
24
+ const declared = registry.recordDeclarationsByKey.get(declaration.providerKey);
25
+ if (!declared) {
26
+ throw new Error(`${route}: its page record names "${declaration.providerKey}", which is no active record Provider with declared fields.`);
27
+ }
28
+ // A Public page is rendered once for everybody, so it cannot be about what only one account may read.
29
+ if (declared.audience === "viewer" && binding.descriptor.area === "public") {
30
+ throw new Error(`${route}: a Public route cannot be about a record of audience "viewer".`);
31
+ }
32
+ const record = {
33
+ providerKey: declaration.providerKey,
34
+ params: Object.fromEntries(Object.entries(declaration.params).map(([name, routeParam]) => [name, binding.params[routeParam] ?? ""])),
35
+ };
36
+ const source = await resolvePhiRecordSource({ registry, runtime, binding: record });
37
+ if (source.status === "missing") {
38
+ return { status: "missing" };
39
+ }
40
+ const fields = await resolvePhiRecordFields({ registry, runtime, binding: record });
41
+ const text = (key) => readPhiPageRecordField(fields, key, ["text"])?.value.trim() || null;
42
+ /*
43
+ * The Page's binding is the read's own, plus the two names the route gave. They are added after the
44
+ * reads and the reads were keyed by `record`, so the names are no part of what is asked or memoised.
45
+ */
46
+ const pageBinding = {
47
+ ...record,
48
+ ...(declaration.titleField ? { titleField: declaration.titleField } : {}),
49
+ ...(declaration.descriptionField ? { descriptionField: declaration.descriptionField } : {}),
50
+ };
51
+ return { status: "ok", binding: pageBinding, title: text(declaration.titleField), description: text(declaration.descriptionField) };
52
+ }
@@ -1,5 +1,6 @@
1
1
  import "server-only";
2
2
  import { cache } from "react";
3
+ import { notFound } from "next/navigation";
3
4
  import { resolvePhiCmsAreaKey, resolvePhiCmsAreaMask, } from "../constants/cms-areas";
4
5
  import { canPhiViewerAccess } from "../types/access";
5
6
  import { compilePhiCmsActiveRouteTable, instantiatePhiCmsRoutePreset, normalizePhiCmsRoutePath, resolvePhiCmsAreaShellPresetBinding, resolvePhiCmsDescriptorCatalog, resolvePhiCmsRoutePreset, } from "../plugins/runtime-modules/descriptor-compiler";
@@ -14,6 +15,7 @@ import { logRuntimeEvent } from "../net/log";
14
15
  import { getPhiCmsPage, getPhiExactSiteArea } from "./cms";
15
16
  import { buildPhiLocalCmsAreaPayload } from "./cms-area";
16
17
  import { applyPhiPresetTreePublishedContent } from "./cms-bound-content";
18
+ import { resolvePhiCmsPageRecord } from "./cms-page-record";
17
19
  import { resolvePhiAreaPageReferencePath, resolvePhiAreaRootRouteDecision } from "./area-root-route";
18
20
  import { fetchSiteNavigationFolderTarget } from "../gateway/site-nav";
19
21
  import { applyPhiAreaRootRouteDecision, buildPhiFolderAddressRedirectPage } from "../helpers/cms-area-root-route";
@@ -134,7 +136,25 @@ function mapResolvedPageToRequestedContext(pagePayload, areaMask, path) {
134
136
  },
135
137
  };
136
138
  }
137
- function buildPhiRuntimePage(pagePayload) {
139
+ /** The record's own title and description on the Page; `msgId: 0`, because they are no Site message. */
140
+ function applyPhiPageRecordMeta(pagePayload, record) {
141
+ if (!record.title && !record.description) {
142
+ return pagePayload;
143
+ }
144
+ const field = (value) => ({ msgId: 0, source: value, value });
145
+ const pageMeta = pagePayload.page.pageMeta;
146
+ return {
147
+ ...pagePayload,
148
+ page: {
149
+ ...pagePayload.page,
150
+ pageMeta: {
151
+ title: record.title ? field(record.title) : pageMeta?.title ?? null,
152
+ description: record.description ? field(record.description) : pageMeta?.description ?? null,
153
+ },
154
+ },
155
+ };
156
+ }
157
+ function buildPhiRuntimePage(pagePayload, record) {
138
158
  const pageMeta = pagePayload.page.pageMeta;
139
159
  return {
140
160
  path: pagePayload.page.page.path,
@@ -144,6 +164,7 @@ function buildPhiRuntimePage(pagePayload) {
144
164
  title: pageMeta?.title?.value ?? null,
145
165
  description: pageMeta?.description?.value ?? null,
146
166
  noindex: hasPhiFlag(pagePayload.page.page.flags, PhiCmsFlags.NoIndex),
167
+ ...(record ? { record } : {}),
147
168
  };
148
169
  }
149
170
  export async function resolvePhiCmsRequest({ siteKey, locale, area, path, cookieHeader, apiBaseUrl, internalToken, requestContext, searchParams, loadResolvedCmsPage, loadExactCmsArea, runtimeModuleCatalog, purpose = "render", }) {
@@ -232,6 +253,29 @@ export async function resolvePhiCmsRequest({ siteKey, locale, area, path, cookie
232
253
  activeModuleKeys,
233
254
  }),
234
255
  });
256
+ /*
257
+ * The record the Page is about, where its route names one: read once, here, for the Module's own tree
258
+ * and for a stored override of it alike -- the override holds no address, only Widgets bound to the
259
+ * record's fields. A Page stored at this exact address is its own and about no record. An address that
260
+ * names no record is no Page: a 404 while rendering, nothing for a lookup.
261
+ */
262
+ const routeIsParametrised = routeBinding ? Object.keys(routeBinding.params).length > 0 : false;
263
+ const routePresetAnswered = loadedPage?.sourcePreset?.presetKey === routeBinding?.descriptor.presetKey
264
+ && loadedPage?.sourcePreset?.ownerModuleId === routeBinding?.descriptor.ownerModuleId;
265
+ const pageRecord = loadedPage && routeBinding && routeIsParametrised && routePresetAnswered
266
+ ? await resolvePhiCmsPageRecord({
267
+ binding: routeBinding,
268
+ runtime: runtimeWithAuthProvider,
269
+ runtimeModuleCatalog,
270
+ activeModuleIds: activeModuleKeys,
271
+ })
272
+ : null;
273
+ if (pageRecord?.status === "missing") {
274
+ if (purpose === "lookup") {
275
+ return null;
276
+ }
277
+ notFound();
278
+ }
235
279
  /*
236
280
  * The Area root, as the Builder configured it.
237
281
  *
@@ -294,13 +338,13 @@ export async function resolvePhiCmsRequest({ siteKey, locale, area, path, cookie
294
338
  const effectivePage = resolvedPage
295
339
  ? mapResolvedPageToRequestedContext(resolvedPage, areaMask, path)
296
340
  : null;
297
- const resolvedContent = effectivePage;
298
- if (!resolvedContent) {
341
+ if (!effectivePage) {
299
342
  return null;
300
343
  }
344
+ const resolvedContent = pageRecord ? applyPhiPageRecordMeta(effectivePage, pageRecord) : effectivePage;
301
345
  const resolvedRuntime = {
302
346
  ...runtimeWithAuthProvider,
303
- page: buildPhiRuntimePage(resolvedContent),
347
+ page: buildPhiRuntimePage(resolvedContent, pageRecord?.binding),
304
348
  };
305
349
  if (purpose === "lookup") {
306
350
  return {
@@ -0,0 +1,62 @@
1
+ import "server-only";
2
+ import type { PhiBlockRuntime } from "../types";
3
+ import type { PhiCmsRuntimeRenderRegistry } from "../types/cms-plugins";
4
+ import type { PhiRecordField, PhiRecordFieldKind } from "../types/record-provider";
5
+ import type { PhiRuntimeDataProviderBinding } from "../types/runtime-data-provider";
6
+ type PhiRecordFieldsRegistry = Pick<PhiCmsRuntimeRenderRegistry, "recordProviderLoadersByKey" | "recordFieldsLoadersByKey" | "recordDeclarationsByKey">;
7
+ /**
8
+ * The declared fields of one record (MODULES.md, "The fields of a record, and the record a Page is about").
9
+ *
10
+ * `none` is a Page that is about no record, or a binding to a Provider that declares no fields: a Widget
11
+ * bound to a field there has nothing to show and is not at fault. `missing` and `unavailable` are the
12
+ * record's own two failures, as `resolvePhiRecordSource` tells them apart.
13
+ */
14
+ export type PhiPageRecordFieldsResult = {
15
+ status: "ok";
16
+ fields: ReadonlyMap<string, PhiRecordField>;
17
+ } | {
18
+ status: "none";
19
+ } | {
20
+ status: "missing";
21
+ } | {
22
+ status: "unavailable";
23
+ reason: string;
24
+ };
25
+ /** The declared fields of the record a binding names, read once per request for the same record. */
26
+ export declare function resolvePhiRecordFields({ registry, runtime, binding }: {
27
+ registry: PhiRecordFieldsRegistry;
28
+ runtime: PhiBlockRuntime;
29
+ binding: PhiRuntimeDataProviderBinding | null | undefined;
30
+ }): Promise<PhiPageRecordFieldsResult>;
31
+ /** The declared fields of the record this Page is about (`runtime.page.record`). */
32
+ export declare function resolvePhiPageRecordFields({ registry, runtime }: {
33
+ registry: PhiRecordFieldsRegistry;
34
+ runtime: PhiBlockRuntime;
35
+ }): Promise<PhiPageRecordFieldsResult>;
36
+ /** One field of a result, if the record has it and it is of one of the kinds asked for. */
37
+ export declare function readPhiPageRecordField<K extends PhiRecordFieldKind>(result: PhiPageRecordFieldsResult, key: string | null | undefined, kinds: readonly K[]): Extract<PhiRecordField, {
38
+ kind: K;
39
+ }> | null;
40
+ /**
41
+ * What a Widget that names a field of the page record is to draw.
42
+ *
43
+ * `bound: false` is a Widget that names none, or a Page that is about no record -- a template open in the
44
+ * Builder, a Widget copied to an ordinary Page: it draws its own content, which stands in for the field.
45
+ * `bound: true` with no field is a record that does not have it, and the Widget draws nothing of its own
46
+ * in its place.
47
+ */
48
+ export type PhiWidgetRecordField<K extends PhiRecordFieldKind> = {
49
+ bound: false;
50
+ } | {
51
+ bound: true;
52
+ field: Extract<PhiRecordField, {
53
+ kind: K;
54
+ }> | null;
55
+ };
56
+ export declare function resolvePhiWidgetRecordField<K extends PhiRecordFieldKind>({ registry, runtime, key, kinds }: {
57
+ registry: PhiRecordFieldsRegistry | undefined;
58
+ runtime: PhiBlockRuntime;
59
+ key: string | null | undefined;
60
+ kinds: readonly K[];
61
+ }): Promise<PhiWidgetRecordField<K>>;
62
+ export {};
@@ -0,0 +1,86 @@
1
+ import "server-only";
2
+ import { logRuntimeEvent } from "../net/log";
3
+ import { readPhiRecordFieldValue } from "../helpers/record-fields";
4
+ import { phiRuntime } from "./phi-runtime";
5
+ import { resolvePhiRecordSource } from "./record-source";
6
+ import { definePhiRequestMemoWith } from "./request-memo";
7
+ const resolveFields = definePhiRequestMemoWith(async (key, using) => {
8
+ const providerKey = key.providerKey;
9
+ const declared = using.registry.recordDeclarationsByKey.get(providerKey)?.fields;
10
+ const loadFields = using.registry.recordFieldsLoadersByKey.get(providerKey);
11
+ if (!declared || !loadFields) {
12
+ return { status: "none" };
13
+ }
14
+ const source = await resolvePhiRecordSource({
15
+ registry: using.registry,
16
+ runtime: using.runtime,
17
+ binding: { providerKey, params: key.params },
18
+ });
19
+ if (source.status !== "ok") {
20
+ return source;
21
+ }
22
+ try {
23
+ const read = await loadFields();
24
+ const values = await read(source.record, {
25
+ apiBaseUrl: using.apiBaseUrl,
26
+ internalToken: using.internalToken,
27
+ siteKey: key.siteKey,
28
+ locale: key.locale,
29
+ runtime: using.runtime,
30
+ });
31
+ const fields = new Map();
32
+ for (const field of declared) {
33
+ const raw = values[field.key];
34
+ if (raw === undefined || raw === null)
35
+ continue;
36
+ const value = readPhiRecordFieldValue(field.kind, raw);
37
+ if (value === undefined) {
38
+ logRuntimeEvent("warn", "cms.record.field_invalid", {
39
+ message: `Record provider "${key.providerKey}" answered field "${field.key}" with a value that is no ${field.kind}.`,
40
+ siteKey: key.siteKey,
41
+ area: using.runtime.area,
42
+ meta: { providerKey: key.providerKey, field: field.key, kind: field.kind },
43
+ });
44
+ continue;
45
+ }
46
+ fields.set(field.key, { kind: field.kind, value });
47
+ }
48
+ return { status: "ok", fields };
49
+ }
50
+ catch (error) {
51
+ logRuntimeEvent("error", "cms.record.fields_failed", {
52
+ message: `Failed to read the fields of record provider "${key.providerKey}" for this render.`,
53
+ siteKey: key.siteKey,
54
+ area: using.runtime.area,
55
+ error,
56
+ meta: { providerKey: key.providerKey },
57
+ });
58
+ return { status: "unavailable", reason: error instanceof Error ? error.message : String(error) };
59
+ }
60
+ });
61
+ /** The declared fields of the record a binding names, read once per request for the same record. */
62
+ export function resolvePhiRecordFields({ registry, runtime, binding }) {
63
+ if (!binding) {
64
+ return Promise.resolve({ status: "none" });
65
+ }
66
+ const rt = phiRuntime(runtime);
67
+ return resolveFields({ providerKey: binding.providerKey, params: binding.params ?? {}, siteKey: rt.siteKey, locale: runtime.locale.current }, { registry, runtime, apiBaseUrl: rt.apiBaseUrl, internalToken: rt.internalToken });
68
+ }
69
+ /** The declared fields of the record this Page is about (`runtime.page.record`). */
70
+ export function resolvePhiPageRecordFields({ registry, runtime }) {
71
+ return resolvePhiRecordFields({ registry, runtime, binding: runtime.page?.record });
72
+ }
73
+ /** One field of a result, if the record has it and it is of one of the kinds asked for. */
74
+ export function readPhiPageRecordField(result, key, kinds) {
75
+ if (result.status !== "ok" || !key)
76
+ return null;
77
+ const field = result.fields.get(key);
78
+ return field && kinds.includes(field.kind) ? field : null;
79
+ }
80
+ export async function resolvePhiWidgetRecordField({ registry, runtime, key, kinds }) {
81
+ if (!key || !registry) {
82
+ return { bound: false };
83
+ }
84
+ const result = await resolvePhiPageRecordFields({ registry, runtime });
85
+ return result.status === "none" ? { bound: false } : { bound: true, field: readPhiPageRecordField(result, key, kinds) };
86
+ }
@@ -0,0 +1,21 @@
1
+ import "server-only";
2
+ import type { PhiBlockRuntime } from "../types";
3
+ import type { PhiCmsRuntimeRenderRegistry } from "../types/cms-plugins";
4
+ import type { PhiCmsPageRecordDescriptor, PhiPageRecordBinding } from "../types/record-provider";
5
+ type PhiRecordSamplesRegistry = Pick<PhiCmsRuntimeRenderRegistry, "recordSamplesLoadersByKey">;
6
+ /**
7
+ * The record the Builder's Preview shows a template with (MODULES.md, "The fields of a record, and the
8
+ * record a Page is about"): the first sample the route's record Provider offers, as the binding a Page
9
+ * about a record carries -- with the route's `titleField` and `descriptionField`, so the Preview takes the
10
+ * same fields the live Page does.
11
+ *
12
+ * A sample's `params` are the Provider's own parameters (`{ slug: "chair" }`), not the route's, so they
13
+ * become the binding as they are. `null` is a Provider that offers no samples or none now, or one whose
14
+ * reader fails: the template then previews with its Widgets' own content, as it does in the Editor.
15
+ */
16
+ export declare function resolvePhiPageRecordSampleBinding({ registry, runtime, pageRecord }: {
17
+ registry: PhiRecordSamplesRegistry;
18
+ runtime: PhiBlockRuntime;
19
+ pageRecord: PhiCmsPageRecordDescriptor;
20
+ }): Promise<PhiPageRecordBinding | null>;
21
+ export {};
@@ -0,0 +1,49 @@
1
+ import "server-only";
2
+ import { logRuntimeEvent } from "../net/log";
3
+ import { phiRuntime } from "./phi-runtime";
4
+ /**
5
+ * The record the Builder's Preview shows a template with (MODULES.md, "The fields of a record, and the
6
+ * record a Page is about"): the first sample the route's record Provider offers, as the binding a Page
7
+ * about a record carries -- with the route's `titleField` and `descriptionField`, so the Preview takes the
8
+ * same fields the live Page does.
9
+ *
10
+ * A sample's `params` are the Provider's own parameters (`{ slug: "chair" }`), not the route's, so they
11
+ * become the binding as they are. `null` is a Provider that offers no samples or none now, or one whose
12
+ * reader fails: the template then previews with its Widgets' own content, as it does in the Editor.
13
+ */
14
+ export async function resolvePhiPageRecordSampleBinding({ registry, runtime, pageRecord }) {
15
+ const loadSamples = registry.recordSamplesLoadersByKey.get(pageRecord.providerKey);
16
+ if (!loadSamples) {
17
+ return null;
18
+ }
19
+ const rt = phiRuntime(runtime);
20
+ try {
21
+ const read = await loadSamples();
22
+ const samples = await read({
23
+ apiBaseUrl: rt.apiBaseUrl,
24
+ internalToken: rt.internalToken,
25
+ siteKey: rt.siteKey,
26
+ locale: runtime.locale.current,
27
+ runtime,
28
+ });
29
+ const sample = samples[0];
30
+ return sample
31
+ ? {
32
+ providerKey: pageRecord.providerKey,
33
+ params: sample.params,
34
+ ...(pageRecord.titleField ? { titleField: pageRecord.titleField } : {}),
35
+ ...(pageRecord.descriptionField ? { descriptionField: pageRecord.descriptionField } : {}),
36
+ }
37
+ : null;
38
+ }
39
+ catch (error) {
40
+ logRuntimeEvent("warn", "cms.record.samples_failed", {
41
+ message: `Failed to read the samples of record provider "${pageRecord.providerKey}" for the Preview.`,
42
+ siteKey: rt.siteKey,
43
+ area: runtime.area,
44
+ error,
45
+ meta: { providerKey: pageRecord.providerKey },
46
+ });
47
+ return null;
48
+ }
49
+ }
@@ -82,46 +82,46 @@
82
82
  }
83
83
 
84
84
  :where(.phi-builder-structure-region__slot[data-phi-builder-region-mode="editor"][data-phi-region-slot]) {
85
- border: 1px dashed var(--ant-color-border-secondary);
85
+ border: 1px dashed var(--phi-color-border-secondary);
86
86
  /* Half-transparent: an unauthored Region has no ground, and the Theme Root Background stays visible. */
87
- background: color-mix(in srgb, var(--ant-color-bg-container) 50%, transparent);
88
- box-shadow: inset 0 0 0 1px var(--ant-color-border-secondary);
87
+ background: color-mix(in srgb, var(--phi-color-bg-container) 50%, transparent);
88
+ box-shadow: inset 0 0 0 1px var(--phi-color-border-secondary);
89
89
  padding: 0;
90
90
  gap: 0;
91
91
  cursor: pointer;
92
92
  }
93
93
 
94
94
  :where(.phi-builder-structure-region__slot[data-phi-builder-region-mode="editor"]:not([data-phi-region-slot])) {
95
- padding: var(--ant-padding-xs);
96
- gap: var(--ant-padding-xs);
95
+ padding: var(--phi-padding-xs);
96
+ gap: var(--phi-padding-xs);
97
97
  cursor: pointer;
98
98
  }
99
99
 
100
100
  :where(.phi-builder-structure-region__slot[data-phi-builder-region-mode="editor"][data-phi-region-slot][data-phi-builder-region-selected="true"]) {
101
- border-color: var(--ant-color-primary);
102
- box-shadow: inset 0 0 0 1px var(--ant-color-primary);
101
+ border-color: var(--phi-color-primary);
102
+ box-shadow: inset 0 0 0 1px var(--phi-color-primary);
103
103
  }
104
104
 
105
105
  :where(.phi-builder-structure-region__slot[data-phi-builder-region-mode="editor"][data-phi-region-slot][data-phi-builder-region-picking="true"]) {
106
- border-color: var(--ant-color-primary);
107
- background: var(--ant-color-fill-quaternary);
108
- box-shadow: inset 0 0 0 1px var(--ant-color-primary);
106
+ border-color: var(--phi-color-primary);
107
+ background: var(--phi-color-fill-quaternary);
108
+ box-shadow: inset 0 0 0 1px var(--phi-color-primary);
109
109
  }
110
110
 
111
111
  :where(.phi-builder-structure-region__slot[data-phi-builder-region-mode="editor"][data-phi-region-slot][data-phi-structure-drop-state="accepted"]) {
112
- border-color: var(--ant-color-success) !important;
113
- background: var(--ant-color-success-bg) !important;
114
- box-shadow: inset 0 0 0 2px var(--ant-color-success) !important;
112
+ border-color: var(--phi-color-success) !important;
113
+ background: var(--phi-color-success-bg) !important;
114
+ box-shadow: inset 0 0 0 2px var(--phi-color-success) !important;
115
115
  }
116
116
 
117
117
  :where(.phi-builder-structure-region__slot[data-phi-builder-region-mode="editor"][data-phi-region-slot][data-phi-structure-drop-state="rejected"]) {
118
- border-color: var(--ant-color-error) !important;
119
- background: var(--ant-color-error-bg) !important;
120
- box-shadow: inset 0 0 0 2px var(--ant-color-error) !important;
118
+ border-color: var(--phi-color-error) !important;
119
+ background: var(--phi-color-error-bg) !important;
120
+ box-shadow: inset 0 0 0 2px var(--phi-color-error) !important;
121
121
  }
122
122
 
123
123
  :where(.phi-builder-structure-region__slot[data-phi-builder-region-mode="preview"][data-phi-region-slot]) {
124
- border: 1px dashed var(--ant-color-border-secondary);
124
+ border: 1px dashed var(--phi-color-border-secondary);
125
125
  /* Preview mirrors the live Shell, where an unauthored Region is transparent. */
126
126
  background: transparent;
127
127
  box-shadow: none;
@@ -140,7 +140,7 @@
140
140
  }
141
141
 
142
142
  :where(.phi-builder-workspace-region-scaffold) {
143
- --phi-builder-region-padding: var(--ant-padding-xs);
143
+ --phi-builder-region-padding: var(--phi-padding-xs);
144
144
  }
145
145
 
146
146
  :where(.phi-builder-structure-region--full-height) {
@@ -280,7 +280,7 @@
280
280
  gap: 8px;
281
281
  min-width: 0;
282
282
  min-height: 0;
283
- padding: var(--ant-padding-sm);
283
+ padding: var(--phi-padding-sm);
284
284
  box-sizing: border-box;
285
285
  pointer-events: none;
286
286
  }