@phis/ui 0.5.2 → 0.5.3

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 (182) 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-drawer-control-adapter.js +4 -4
  6. package/components/controls/phi-dropdown-control.js +2 -2
  7. package/components/controls/phi-form-control.js +1 -1
  8. package/components/controls/phi-image-control.js +1 -1
  9. package/components/controls/phi-mask-picker-control.js +6 -6
  10. package/components/controls/phi-select-control.js +1 -1
  11. package/components/controls/phi-theme-scope-control.js +1 -1
  12. package/components/controls/use-phi-color-control-presets.js +2 -2
  13. package/components/forms/compound-form-controls.js +2 -2
  14. package/components/forms/extended-form-field-controls.js +1 -1
  15. package/components/forms/shared-form-provider-registry.js +2 -2
  16. package/components/layouts/clients/phi-flex-layout-client.js +4 -4
  17. package/components/layouts/clients/phi-grid-layout-client.js +3 -3
  18. package/components/layouts/clients/phi-sequence-slot-editor.js +1 -1
  19. package/components/layouts/layout-definitions.d.ts +4 -4
  20. package/components/layouts/phi-page-region-layout.js +1 -1
  21. package/components/layouts/phi-structure-region-layout.js +3 -3
  22. package/components/media/phi-asset-focal-rect-widget.js +4 -4
  23. package/components/media/phi-asset-inspector-section.js +1 -1
  24. package/components/media/phi-media-kind-icon.js +2 -2
  25. package/components/media/phi-media-restricted-icon.js +1 -1
  26. package/components/overlays/phi-overlay-container-client.js +1 -1
  27. package/components/regions/presets/phi-base-page-column.js +6 -2
  28. package/components/root/phi-config-provider.js +1 -1
  29. package/components/root/phi-root-background.js +1 -1
  30. package/components/root/phi-root-theme-resolver.js +1 -1
  31. package/components/shell/phi-module-icons.js +1 -1
  32. package/components/widgets/built-in/builder-workspace-preview.js +8 -8
  33. package/components/widgets/client/bullet-list-entries-editor.js +2 -2
  34. package/components/widgets/client/external-document-editor.js +1 -1
  35. package/components/widgets/client/html-editor.js +3 -3
  36. package/components/widgets/config/background.d.ts +1 -1
  37. package/components/widgets/config/background.js +1 -1
  38. package/components/widgets/inspector-field-row.js +1 -1
  39. package/components/widgets/label-sets/inspector.js +2 -0
  40. package/components/widgets/label-types/inspector.d.ts +1 -0
  41. package/components/widgets/label-types/inspector.js +1 -0
  42. package/components/widgets/shared/card-body-client.js +1 -1
  43. package/components/widgets/shared/result-body-client.js +1 -1
  44. package/constants/media-library-provider-keys.d.ts +8 -1
  45. package/constants/media-library-provider-keys.js +8 -1
  46. package/constants/record-field-kinds.d.ts +6 -0
  47. package/constants/record-field-kinds.js +7 -0
  48. package/constants/runtime-module-ownership.js +1 -1
  49. package/helpers/border-widget-style.d.ts +2 -2
  50. package/helpers/border-widget-style.js +2 -2
  51. package/helpers/cms-dialog.d.ts +4 -4
  52. package/helpers/cms-layout-defaults.d.ts +2 -2
  53. package/helpers/cms-page-catalog.d.ts +5 -0
  54. package/helpers/cms-preset-page-tree.d.ts +4 -0
  55. package/helpers/cms-preset-page-tree.js +2 -0
  56. package/helpers/layout-style.d.ts +2 -2
  57. package/helpers/page-layout-check.d.ts +4 -1
  58. package/helpers/page-layout-check.js +26 -0
  59. package/helpers/record-fields.d.ts +9 -0
  60. package/helpers/record-fields.js +84 -0
  61. package/helpers/surface-presets.d.ts +6 -6
  62. package/helpers/surface-style.d.ts +1 -1
  63. package/helpers.d.ts +0 -1
  64. package/helpers.js +0 -2
  65. package/module-page-check.d.ts +12 -0
  66. package/module-page-check.js +12 -0
  67. package/module-records.d.ts +4 -2
  68. package/module-records.js +3 -1
  69. package/next/antd-form-context-loader.mjs +31 -0
  70. package/next/config.d.mts +2 -0
  71. package/next/config.mjs +36 -3
  72. package/package.json +10 -1
  73. package/plugins/runtime-modules/asset/data-providers.d.ts +0 -65
  74. package/plugins/runtime-modules/asset/data-providers.js +0 -40
  75. package/plugins/runtime-modules/asset/definition.d.ts +0 -60
  76. package/plugins/runtime-modules/asset/ids.d.ts +0 -1
  77. package/plugins/runtime-modules/asset/ids.js +1 -2
  78. package/plugins/runtime-modules/asset/presets.d.ts +1 -0
  79. package/plugins/runtime-modules/asset/server.js +0 -5
  80. package/plugins/runtime-modules/blog/presets.d.ts +1 -0
  81. package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +4 -1
  82. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +13 -4
  83. package/plugins/runtime-modules/builder/clients/inspector-link-target-field.js +1 -1
  84. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +14 -1
  85. package/plugins/runtime-modules/builder/clients/inspector-signal-section.js +2 -2
  86. package/plugins/runtime-modules/builder/clients/layout-inspector.js +1 -1
  87. package/plugins/runtime-modules/builder/clients/layout-scaffold-buttons.js +4 -4
  88. package/plugins/runtime-modules/builder/clients/layout-scaffold-overlays.js +1 -1
  89. package/plugins/runtime-modules/builder/clients/region-inspector.js +1 -1
  90. package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
  91. package/plugins/runtime-modules/builder/clients/shells-workspace.js +1 -1
  92. package/plugins/runtime-modules/builder/clients/structure-canvas.js +2 -2
  93. package/plugins/runtime-modules/builder/clients/widget-effects-editor.js +1 -1
  94. package/plugins/runtime-modules/builder/clients/widget-inspector.d.ts +4 -1
  95. package/plugins/runtime-modules/builder/clients/widget-inspector.js +3 -2
  96. package/plugins/runtime-modules/builder/page-presets.server.d.ts +6 -0
  97. package/plugins/runtime-modules/builder/page-presets.server.js +8 -0
  98. package/plugins/runtime-modules/builder/pages-workspace.js +12 -1
  99. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +5 -5
  100. package/plugins/runtime-modules/builder/structure-dnd.js +2 -2
  101. package/plugins/runtime-modules/builder/widgets/test-block/client.js +1 -1
  102. package/plugins/runtime-modules/content-entry-routes.d.ts +1 -0
  103. package/plugins/runtime-modules/contracts.d.ts +1 -1
  104. package/plugins/runtime-modules/contracts.js +41 -1
  105. package/plugins/runtime-modules/core/data-providers.d.ts +60 -0
  106. package/plugins/runtime-modules/core/data-providers.js +41 -0
  107. package/plugins/runtime-modules/core/definition.d.ts +55 -0
  108. package/plugins/runtime-modules/core/server.js +5 -0
  109. package/plugins/runtime-modules/core/widgets/button/config.d.ts +34 -0
  110. package/plugins/runtime-modules/core/widgets/button/config.js +16 -0
  111. package/plugins/runtime-modules/core/widgets/button/plugin.js +37 -6
  112. package/plugins/runtime-modules/core/widgets/card/config.d.ts +13 -2
  113. package/plugins/runtime-modules/core/widgets/description/config.d.ts +13 -2
  114. package/plugins/runtime-modules/core/widgets/description/editor.js +13 -13
  115. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +11 -0
  116. package/plugins/runtime-modules/core/widgets/gallery/client.d.ts +4 -1
  117. package/plugins/runtime-modules/core/widgets/gallery/client.js +29 -21
  118. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +16 -0
  119. package/plugins/runtime-modules/core/widgets/gallery/config.js +16 -0
  120. package/plugins/runtime-modules/core/widgets/gallery/server.d.ts +1 -1
  121. package/plugins/runtime-modules/core/widgets/gallery/server.js +11 -0
  122. package/plugins/runtime-modules/core/widgets/image/config.d.ts +35 -0
  123. package/plugins/runtime-modules/core/widgets/image/config.js +8 -0
  124. package/plugins/runtime-modules/core/widgets/image/plugin.js +19 -1
  125. package/plugins/runtime-modules/core/widgets/image/server.d.ts +3 -1
  126. package/plugins/runtime-modules/core/widgets/image/server.js +2 -2
  127. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +13 -0
  128. package/plugins/runtime-modules/core/widgets/markdown/config.js +8 -0
  129. package/plugins/runtime-modules/core/widgets/markdown/editor.js +7 -7
  130. package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
  131. package/plugins/runtime-modules/core/widgets/record/authoring.js +1 -1
  132. package/plugins/runtime-modules/core/widgets/result/config.d.ts +11 -0
  133. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +13 -0
  134. package/plugins/runtime-modules/core/widgets/simple-text/config.js +9 -0
  135. package/plugins/runtime-modules/core/widgets/simple-text/editor.js +1 -1
  136. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +14 -1
  137. package/plugins/runtime-modules/core/widgets/spacer/client.js +1 -1
  138. package/plugins/runtime-modules/core/widgets/table/config.d.ts +37 -0
  139. package/plugins/runtime-modules/descriptor-compiler.js +8 -0
  140. package/plugins/runtime-modules/editor/presets.d.ts +1 -0
  141. package/plugins/runtime-modules/groups/definition.d.ts +1 -1
  142. package/plugins/runtime-modules/localization/presets.d.ts +1 -0
  143. package/plugins/runtime-modules/news/presets.d.ts +1 -0
  144. package/plugins/runtime-modules/resolver.js +2 -0
  145. package/plugins/runtime-modules/revisions/presets.d.ts +1 -0
  146. package/plugins/runtime-modules/theme/presets.d.ts +1 -0
  147. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +25 -2
  148. package/server-helpers/cms-page-record.d.ts +26 -0
  149. package/server-helpers/cms-page-record.js +42 -0
  150. package/server-helpers/cms-request.js +48 -4
  151. package/server-helpers/record-fields.d.ts +62 -0
  152. package/server-helpers/record-fields.js +87 -0
  153. package/server-helpers/record-samples.d.ts +21 -0
  154. package/server-helpers/record-samples.js +41 -0
  155. package/styles/builder-scaffold.css +19 -19
  156. package/styles/controls.css +109 -109
  157. package/styles/gradients.css +23 -23
  158. package/styles/layout-affordances.css +15 -15
  159. package/styles/layout-authoring-scaffold.css +20 -20
  160. package/styles/layout.css +9 -9
  161. package/styles/root.css +4 -4
  162. package/styles/shell.css +48 -17
  163. package/theme/antd-css-var-contract.d.ts +86 -80
  164. package/theme/antd-css-var-contract.js +92 -81
  165. package/theme/phi-control-shape.d.ts +1 -1
  166. package/theme/phi-theme-gradients.d.ts +2 -2
  167. package/theme/phi-theme-gradients.js +14 -14
  168. package/theme/phi-theme-palette.d.ts +1 -1
  169. package/theme/phi-theme-palette.js +2 -2
  170. package/theme/phi-theme-tokens.d.ts +8 -5
  171. package/theme/phi-theme-tokens.js +59 -28
  172. package/theme/phi-theme.d.ts +14 -2
  173. package/theme/phi-theme.js +14 -1
  174. package/theme/phi-tokens.d.ts +5 -0
  175. package/theme/phi-tokens.js +9 -0
  176. package/types/cms-module-descriptors.d.ts +6 -0
  177. package/types/cms-plugins.d.ts +19 -1
  178. package/types/core-widget-placements.d.ts +10 -0
  179. package/types/record-provider.d.ts +92 -0
  180. package/types/widget-runtime.d.ts +5 -0
  181. /package/plugins/runtime-modules/{asset/services/folder-images.server.d.ts → core/services/media-folder-images.server.d.ts} +0 -0
  182. /package/plugins/runtime-modules/{asset/services/folder-images.server.js → core/services/media-folder-images.server.js} +0 -0
@@ -0,0 +1,31 @@
1
+ /**
2
+ * A build-time patch for one line of Ant Design 6.7 (`antd/es/form/context.js`), applied by the Turbopack
3
+ * rule `withPhiNextConfig` sets (next/config.mjs). Remove it, the rule and the export once Ant Design
4
+ * imports the Form provider directly (TODOS.md, "At the next release").
5
+ *
6
+ * Since 6.7.0 every Button reads the Form's variant (`form/hooks/useVariants` -> `form/context`), and that
7
+ * file takes `FormProvider` from `@rc-component/form`'s entry, which declares no `sideEffects` and assigns
8
+ * statics on import -- so each page with a Button loaded the whole Form engine and `async-validator`
9
+ * (about 42 kB). `FormContext` is where the provider lives and imports React alone.
10
+ *
11
+ * Exact text only: a file that reads differently is left as it is, with a warning, so a changed Ant Design
12
+ * is never patched by guesswork.
13
+ */
14
+ export const PHI_ANTD_FORM_CONTEXT_IMPORT = "import { FormProvider as RcFormProvider } from '@rc-component/form';";
15
+ export const PHI_ANTD_FORM_CONTEXT_PATCHED_IMPORT =
16
+ "import { FormProvider as RcFormProvider } from '@rc-component/form/es/FormContext';";
17
+
18
+ export function patchPhiAntdFormContext(source) {
19
+ const occurrences = source.split(PHI_ANTD_FORM_CONTEXT_IMPORT).length - 1;
20
+ return occurrences === 1 ? source.replace(PHI_ANTD_FORM_CONTEXT_IMPORT, PHI_ANTD_FORM_CONTEXT_PATCHED_IMPORT) : null;
21
+ }
22
+
23
+ export default function phiAntdFormContextLoader(source) {
24
+ const patched = patchPhiAntdFormContext(source);
25
+ if (patched !== null) return patched;
26
+ this.emitWarning?.(new Error(
27
+ "@phis/ui: antd/es/form/context.js no longer reads as Ant Design 6.7.0 wrote it; the Form provider patch "
28
+ + "was not applied. Check whether Ant Design imports the provider directly now and remove the patch.",
29
+ ));
30
+ return source;
31
+ }
package/next/config.d.mts CHANGED
@@ -17,6 +17,8 @@ export declare function ensurePhiAntdStaticCss(projectDir?: string): string;
17
17
 
18
18
  /** The host in `config/site-runtime.json`'s `site.publicUrl` under `dir`, or `null` where there is none. */
19
19
  export declare function readPhiSitePublicHost(dir?: string): string | null;
20
+ /** The Turbopack rule patching Ant Design 6.7's Form context import, or `null` for any other Ant Design. */
21
+ export declare function readPhiAntdFormContextPatchRule(dir?: string): Record<string, unknown> | null;
20
22
 
21
23
  /**
22
24
  * A Site's `next.config`, with `@phis/ui/antd-static.css` resolved to the structure generated for its
package/next/config.mjs CHANGED
@@ -2,9 +2,9 @@
2
2
  * What a Site's `next.config` takes from this package: the structural CSS of every Ant Design component,
3
3
  * generated from the Ant Design the Site has installed.
4
4
  *
5
- * Ant Design emits two kinds of CSS. The structure -- `.ant-btn{padding:...;color:var(--ant-color-text)}`
5
+ * Ant Design emits two kinds of CSS. The structure -- `.ant-btn{padding:...;color:var(--phi-color-text)}`
6
6
  * -- reads every Theme value through a custom property, so it is the same for every Site, Theme and mode.
7
- * The custom properties themselves -- `.phi-root-...{--ant-color-primary:...}` -- are what a Theme
7
+ * The custom properties themselves -- `.phi-root-...{--phi-color-primary:...}` -- are what a Theme
8
8
  * decides. The root runs Ant Design with `zeroRuntime`, which drops the structure from rendering and
9
9
  * keeps the properties; this file is where the structure comes from instead. Generating it at runtime
10
10
  * cost about 10 ms of CPU per page view and 40-140 KB of inline CSS per page (measured 04.10.2026).
@@ -189,7 +189,7 @@ export function generatePhiAntdStaticCss(projectDir = process.cwd()) {
189
189
  const h = react.createElement;
190
190
  const { createCache, extractStyle, px2remTransformer, StyleProvider } = site.cssinjs;
191
191
  const cache = createCache();
192
- const theme = { hashed: false, cssVar: { prefix: "ant", key: "phi-static" } };
192
+ const theme = { hashed: false, cssVar: { prefix: "phi", key: "phi-static" } };
193
193
  withoutDeprecationNotices(() => site.renderToString(
194
194
  h(StyleProvider, {
195
195
  cache,
@@ -277,6 +277,35 @@ export function readPhiSitePublicHost(dir = process.cwd()) {
277
277
  return new URL(publicUrl).hostname;
278
278
  }
279
279
 
280
+ /**
281
+ * The Turbopack rule that patches Ant Design 6.7's Form context import (next/antd-form-context-loader.mjs),
282
+ * or none for any other Ant Design: the patch is for 6.7 only, and a newer release is to be checked and the
283
+ * patch removed rather than carried along by default.
284
+ */
285
+ export function readPhiAntdFormContextPatchRule(dir = process.cwd()) {
286
+ let version;
287
+ try {
288
+ version = JSON.parse(readFileSync(createRequire(path.join(dir, "package.json")).resolve("antd/package.json"), "utf8")).version;
289
+ } catch {
290
+ return null;
291
+ }
292
+ if (!/^6\.7\./u.test(version)) {
293
+ if (/^6\.(?:[89]|\d{2,})\./u.test(version) || /^(?:[7-9]|\d{2,})\./u.test(version)) {
294
+ console.warn(
295
+ `@phis/ui: Ant Design ${version} is past 6.7; check whether antd/es/form/context.js still imports `
296
+ + "@rc-component/form whole, and remove the Form provider patch if it does not (TODOS.md).",
297
+ );
298
+ }
299
+ return null;
300
+ }
301
+ return {
302
+ "context.js": {
303
+ condition: { path: /[\\/]antd[\\/]es[\\/]form[\\/]context\.js$/u },
304
+ loaders: ["@phis/ui/next/antd-form-context-loader"],
305
+ },
306
+ };
307
+ }
308
+
280
309
  /**
281
310
  * A Site's `next.config`, with `@phis/ui/antd-static.css` resolved to the structure generated for its
282
311
  * Ant Design, and the Site's own public host allowed to reach the dev server. `dir` is the Site's root,
@@ -295,6 +324,10 @@ export function withPhiNextConfig(nextConfig, { dir = process.cwd() } = {}) {
295
324
  ...(allowedDevOrigins.length > 0 ? { allowedDevOrigins } : {}),
296
325
  turbopack: {
297
326
  ...nextConfig.turbopack,
327
+ rules: {
328
+ ...nextConfig.turbopack?.rules,
329
+ ...readPhiAntdFormContextPatchRule(dir),
330
+ },
298
331
  resolveAlias: {
299
332
  ...nextConfig.turbopack?.resolveAlias,
300
333
  [PHI_ANTD_STATIC_CSS]: file,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phis/ui",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -117,6 +117,10 @@
117
117
  "import": "./next/config.mjs",
118
118
  "default": "./next/config.mjs"
119
119
  },
120
+ "./next/antd-form-context-loader": {
121
+ "import": "./next/antd-form-context-loader.mjs",
122
+ "default": "./next/antd-form-context-loader.mjs"
123
+ },
120
124
  "./next/overlay-zones-client": {
121
125
  "types": "./components/overlays/phi-overlay-zones-loader.d.ts",
122
126
  "import": "./components/overlays/phi-overlay-zones-loader.js",
@@ -282,6 +286,11 @@
282
286
  "import": "./module-records.js",
283
287
  "default": "./module-records.js"
284
288
  },
289
+ "./module/page-check": {
290
+ "types": "./module-page-check.d.ts",
291
+ "import": "./module-page-check.js",
292
+ "default": "./module-page-check.js"
293
+ },
285
294
  "./module/references": {
286
295
  "types": "./module-references.d.ts",
287
296
  "import": "./module-references.js",
@@ -1,9 +1,4 @@
1
1
  import type { PhiTableProviderResourceDescriptor } from "../../../types/table-widget";
2
- /** How the Folder's pictures are ordered; the words a record binding's `sort` takes. */
3
- export declare const PHI_MEDIA_FOLDER_IMAGES_SORTS: readonly ["name_asc", "created_at_desc"];
4
- export declare const PHI_MEDIA_FOLDER_IMAGES_DEFAULT_LIMIT = 50;
5
- /** What the server hands out at most (`/api/v1/site/media/folder-images`). */
6
- export declare const PHI_MEDIA_FOLDER_IMAGES_MAX_LIMIT = 200;
7
2
  /** The existing User and Group Spaces, one resource per kind, for the Admin storage table. */
8
3
  export declare const PHI_ASSET_STORAGE_SPACES_RESOURCES: readonly PhiTableProviderResourceDescriptor[];
9
4
  export declare const PHI_ASSET_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
@@ -16,7 +11,6 @@ export declare const PHI_ASSET_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
16
11
  description: string;
17
12
  resources: readonly PhiTableProviderResourceDescriptor[];
18
13
  availableToAuthoringChrome?: undefined;
19
- settingsFields?: undefined;
20
14
  } | {
21
15
  key: `${string}/${string}`;
22
16
  ownerModuleId: "@phis/ui/modules/asset";
@@ -27,7 +21,6 @@ export declare const PHI_ASSET_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
27
21
  description: string;
28
22
  resources?: undefined;
29
23
  availableToAuthoringChrome?: undefined;
30
- settingsFields?: undefined;
31
24
  } | {
32
25
  key: `${string}/${string}`;
33
26
  ownerModuleId: "@phis/ui/modules/asset";
@@ -38,63 +31,6 @@ export declare const PHI_ASSET_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
38
31
  description: string;
39
32
  availableToAuthoringChrome: true;
40
33
  resources?: undefined;
41
- settingsFields?: undefined;
42
- } | {
43
- key: `${string}/${string}`;
44
- ownerModuleId: "@phis/ui/modules/asset";
45
- kind: "record";
46
- executionMode: "live";
47
- authoringMode: "none";
48
- title: string;
49
- description: string;
50
- settingsFields: ({
51
- key: string;
52
- type: "choice";
53
- heading: string;
54
- label: string;
55
- optionsProvider: {
56
- providerKey: `${string}/${string}`;
57
- };
58
- description?: undefined;
59
- options?: undefined;
60
- min?: undefined;
61
- max?: undefined;
62
- } | {
63
- key: string;
64
- type: "boolean";
65
- label: string;
66
- description: string;
67
- heading?: undefined;
68
- optionsProvider?: undefined;
69
- options?: undefined;
70
- min?: undefined;
71
- max?: undefined;
72
- } | {
73
- key: string;
74
- type: "choice";
75
- label: string;
76
- options: {
77
- value: string;
78
- label: string;
79
- }[];
80
- heading?: undefined;
81
- optionsProvider?: undefined;
82
- description?: undefined;
83
- min?: undefined;
84
- max?: undefined;
85
- } | {
86
- key: string;
87
- type: "number";
88
- label: string;
89
- min: number;
90
- max: number;
91
- heading?: undefined;
92
- optionsProvider?: undefined;
93
- description?: undefined;
94
- options?: undefined;
95
- })[];
96
- resources?: undefined;
97
- availableToAuthoringChrome?: undefined;
98
34
  } | {
99
35
  key: `${string}/${string}`;
100
36
  ownerModuleId: "@phis/ui/modules/asset";
@@ -145,5 +81,4 @@ export declare const PHI_ASSET_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
145
81
  title: string;
146
82
  }[];
147
83
  }[];
148
- settingsFields?: undefined;
149
84
  })[];
@@ -1,11 +1,6 @@
1
1
  import { PHI_SIGNAL_VALUE_SCHEMAS } from "../../../types/signals";
2
2
  import { PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS, PHI_ASSET_RUNTIME_ITEM_RENDERER_KEY } from "./ids";
3
3
  import { PHI_ASSET_RUNTIME_MODULE_ID } from "./ids";
4
- /** How the Folder's pictures are ordered; the words a record binding's `sort` takes. */
5
- export const PHI_MEDIA_FOLDER_IMAGES_SORTS = ["name_asc", "created_at_desc"];
6
- export const PHI_MEDIA_FOLDER_IMAGES_DEFAULT_LIMIT = 50;
7
- /** What the server hands out at most (`/api/v1/site/media/folder-images`). */
8
- export const PHI_MEDIA_FOLDER_IMAGES_MAX_LIMIT = 200;
9
4
  /** The existing User and Group Spaces, one resource per kind, for the Admin storage table. */
10
5
  export const PHI_ASSET_STORAGE_SPACES_RESOURCES = [
11
6
  {
@@ -74,41 +69,6 @@ export const PHI_ASSET_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
74
69
  // Named in a record binding's parameters, which the Builder edits on any page.
75
70
  availableToAuthoringChrome: true,
76
71
  },
77
- /*
78
- * The pictures of a Folder, read on the server while the page is drawn (`types/record-provider.ts`).
79
- * A Folder is a thing somebody keeps filling, so the page reads it rather than naming each picture:
80
- * what is public in the branch at render time is what the Gallery shows.
81
- */
82
- {
83
- key: PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS.mediaFolderImages,
84
- ownerModuleId: PHI_ASSET_RUNTIME_MODULE_ID,
85
- kind: "record",
86
- executionMode: "live",
87
- // The Builder draws a placeholder for a Gallery and reads nothing.
88
- authoringMode: "none",
89
- title: "Media folder pictures",
90
- description: "The public pictures of one media folder, with its subfolders unless told otherwise.",
91
- settingsFields: [
92
- {
93
- key: "folderId",
94
- type: "choice",
95
- heading: "Folder",
96
- label: "Folder",
97
- optionsProvider: { providerKey: PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS.mediaFolderChoices },
98
- },
99
- { key: "topLevelOnly", type: "boolean", label: "This folder only", description: "Leave the pictures in its subfolders out." },
100
- {
101
- key: "sort",
102
- type: "choice",
103
- label: "Order",
104
- options: [
105
- { value: "name_asc", label: "By file name" },
106
- { value: "created_at_desc", label: "Newest first" },
107
- ],
108
- },
109
- { key: "limit", type: "number", label: "At most", min: 1, max: PHI_MEDIA_FOLDER_IMAGES_MAX_LIMIT },
110
- ],
111
- },
112
72
  {
113
73
  key: PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS.mediaFolders,
114
74
  ownerModuleId: PHI_ASSET_RUNTIME_MODULE_ID,
@@ -20,7 +20,6 @@ export declare const PHI_ASSET_RUNTIME_MODULE_DEFINITION: {
20
20
  description: string;
21
21
  resources: readonly import("../../../types").PhiTableProviderResourceDescriptor[];
22
22
  availableToAuthoringChrome?: undefined;
23
- settingsFields?: undefined;
24
23
  } | {
25
24
  key: `${string}/${string}`;
26
25
  ownerModuleId: "@phis/ui/modules/asset";
@@ -31,7 +30,6 @@ export declare const PHI_ASSET_RUNTIME_MODULE_DEFINITION: {
31
30
  description: string;
32
31
  resources?: undefined;
33
32
  availableToAuthoringChrome?: undefined;
34
- settingsFields?: undefined;
35
33
  } | {
36
34
  key: `${string}/${string}`;
37
35
  ownerModuleId: "@phis/ui/modules/asset";
@@ -42,63 +40,6 @@ export declare const PHI_ASSET_RUNTIME_MODULE_DEFINITION: {
42
40
  description: string;
43
41
  availableToAuthoringChrome: true;
44
42
  resources?: undefined;
45
- settingsFields?: undefined;
46
- } | {
47
- key: `${string}/${string}`;
48
- ownerModuleId: "@phis/ui/modules/asset";
49
- kind: "record";
50
- executionMode: "live";
51
- authoringMode: "none";
52
- title: string;
53
- description: string;
54
- settingsFields: ({
55
- key: string;
56
- type: "choice";
57
- heading: string;
58
- label: string;
59
- optionsProvider: {
60
- providerKey: `${string}/${string}`;
61
- };
62
- description?: undefined;
63
- options?: undefined;
64
- min?: undefined;
65
- max?: undefined;
66
- } | {
67
- key: string;
68
- type: "boolean";
69
- label: string;
70
- description: string;
71
- heading?: undefined;
72
- optionsProvider?: undefined;
73
- options?: undefined;
74
- min?: undefined;
75
- max?: undefined;
76
- } | {
77
- key: string;
78
- type: "choice";
79
- label: string;
80
- options: {
81
- value: string;
82
- label: string;
83
- }[];
84
- heading?: undefined;
85
- optionsProvider?: undefined;
86
- description?: undefined;
87
- min?: undefined;
88
- max?: undefined;
89
- } | {
90
- key: string;
91
- type: "number";
92
- label: string;
93
- min: number;
94
- max: number;
95
- heading?: undefined;
96
- optionsProvider?: undefined;
97
- description?: undefined;
98
- options?: undefined;
99
- })[];
100
- resources?: undefined;
101
- availableToAuthoringChrome?: undefined;
102
43
  } | {
103
44
  key: `${string}/${string}`;
104
45
  ownerModuleId: "@phis/ui/modules/asset";
@@ -149,7 +90,6 @@ export declare const PHI_ASSET_RUNTIME_MODULE_DEFINITION: {
149
90
  title: string;
150
91
  }[];
151
92
  }[];
152
- settingsFields?: undefined;
153
93
  })[];
154
94
  collectionItemRenderers: {
155
95
  key: `${string}/${string}`;
@@ -7,7 +7,6 @@ export declare const PHI_ASSET_RUNTIME_MODULE_ID: "@phis/ui/modules/asset";
7
7
  export declare const PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS: {
8
8
  readonly mediaFolders: `${string}/${string}`;
9
9
  readonly mediaCollection: `${string}/${string}`;
10
- readonly mediaFolderImages: `${string}/${string}`;
11
10
  /**
12
11
  * Every Folder of the Site Space as a choice, loaded by the choice itself. `mediaFolders` reads the
13
12
  * Media page's store, which is not there when a Gallery is configured on some other page.
@@ -10,12 +10,11 @@ export const PHI_ASSET_RUNTIME_MODULE_ID = `${PHI_SHARED_PACKAGE_NAME}/modules/a
10
10
  export const PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS = {
11
11
  mediaFolders: PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.folders,
12
12
  mediaCollection: PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.collection,
13
- mediaFolderImages: PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.folderImages,
14
13
  /**
15
14
  * Every Folder of the Site Space as a choice, loaded by the choice itself. `mediaFolders` reads the
16
15
  * Media page's store, which is not there when a Gallery is configured on some other page.
17
16
  */
18
- mediaFolderChoices: createPhiSharedRuntimeDataProviderKey("options", "media-folder-choices"),
17
+ mediaFolderChoices: PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.folderChoices,
19
18
  /** The Site's Storage Profiles, for the Admin storage settings that point Spaces at one. */
20
19
  mediaStorageProfiles: createPhiSharedRuntimeDataProviderKey("options", "media-storage-profiles"),
21
20
  /** The existing User and Group Spaces with their Profile and quota, for the Admin storage table. */
@@ -50,5 +50,6 @@ export declare const PHI_ASSET_RUNTIME_MODULE_ROUTES: (PhiCmsRoutePresetDescript
50
50
  activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
51
51
  params: Readonly<Record<string, string>>;
52
52
  }) => import("../../../types").PhiResolvedCmsPageTree | Promise<import("../../../types").PhiResolvedCmsPageTree>;
53
+ pageRecord?: import("../../../types/record-provider").PhiCmsPageRecordDescriptor;
53
54
  navigation?: readonly import("../../../types").PhiCmsNavigationInjectionDescriptor[];
54
55
  })[];
@@ -2,7 +2,6 @@ import { PHI_ASSET_FOLDER_RUNTIME_MODULE_FORM, PHI_ASSET_METADATA_RUNTIME_MODULE
2
2
  import { PHI_MEDIA_SETTINGS_RUNTIME_MODULE_FORM, PHI_MEDIA_STORAGE_SETTINGS_RUNTIME_MODULE_FORM } from "./settings-forms";
3
3
  import { definePhiRuntimeModuleServerAreaContribution } from "../area-contributions";
4
4
  import { PHI_ASSET_RUNTIME_MODULE_DEFINITION } from "./definition";
5
- import { PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS } from "./ids";
6
5
  import { PHI_ASSET_RUNTIME_MODULE_ROUTES } from "./presets";
7
6
  import { PHI_RUNTIME_MODULE_WIDGETS as PHI_ASSET_WIDGETS } from "./widgets";
8
7
  /**
@@ -24,10 +23,6 @@ export function createPhiAssetRuntimeModuleServerAreaContribution() {
24
23
  ],
25
24
  routes: PHI_ASSET_RUNTIME_MODULE_ROUTES,
26
25
  uiProvider: true,
27
- recordProviders: [{
28
- key: PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS.mediaFolderImages,
29
- load: () => import("./services/folder-images.server").then((module) => module.resolvePhiMediaFolderImagesRecord),
30
- }],
31
26
  load: () => import("./module").then((module) => module.PHI_ASSET_RUNTIME_MODULE),
32
27
  },
33
28
  });
@@ -49,5 +49,6 @@ export declare const PHI_BLOG_RUNTIME_MODULE_ROUTES: ({
49
49
  activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
50
50
  params: Readonly<Record<string, string>>;
51
51
  }) => import("../../../types").PhiResolvedCmsPageTree | Promise<import("../../../types").PhiResolvedCmsPageTree>;
52
+ pageRecord?: import("../../../types/record-provider").PhiCmsPageRecordDescriptor;
52
53
  navigation?: readonly import("../../../types").PhiCmsNavigationInjectionDescriptor[];
53
54
  })[];
@@ -3,6 +3,7 @@ import type { PhiBackgroundControlProps } from "../../../../components/controls/
3
3
  import type { PhiCmsConfigField, PhiRuntimeModuleDataProviderDescriptor } from "../../../../types/cms-plugins";
4
4
  import type { PhiCalendarAdapterDescriptor } from "../../../../types/calendar";
5
5
  import type { PhiVideoProviderDescriptor } from "../../../../types/video";
6
+ import type { PhiRecordFieldDescriptor } from "../../../../types/record-provider";
6
7
  import { type PhiRenderableBlockSize } from "../../../../types";
7
8
  import { type PhiCmsPaddingWidgetConfig } from "../../../../types/cms-config";
8
9
  import type { PhiColorPickerLabels } from "../../../../components/widgets/label-types/color-picker";
@@ -70,7 +71,7 @@ export declare function renderPhiInspectorPaddingConfigControl({ field, config,
70
71
  onChange?: (nextPadding: PhiCmsPaddingWidgetConfig | null, patch: Record<string, unknown>) => void;
71
72
  }): import("react").JSX.Element;
72
73
  export declare function renderPhiInspectorConfigField(args: Parameters<typeof renderPhiInspectorConfigFieldBody>[0]): import("react").JSX.Element | null;
73
- declare function renderPhiInspectorConfigFieldBody({ field, value, defaultValue, config, defaultConfig, disabled, onChange, widgetReferenceOptions, paddingLabels, backgroundLabels, borderLabels, renderMediaPicker, colorPickerLabels, iconPickerLabels, fieldLabels, dataProviderDescriptors, calendarAdapterDescriptors, videoProviderDescriptors, blockId, }: {
74
+ declare function renderPhiInspectorConfigFieldBody({ field, value, defaultValue, config, defaultConfig, disabled, onChange, widgetReferenceOptions, paddingLabels, backgroundLabels, borderLabels, renderMediaPicker, colorPickerLabels, iconPickerLabels, fieldLabels, dataProviderDescriptors, calendarAdapterDescriptors, videoProviderDescriptors, pageRecordFields, blockId, }: {
74
75
  field: PhiCmsConfigField;
75
76
  value: unknown;
76
77
  defaultValue: unknown;
@@ -92,6 +93,8 @@ declare function renderPhiInspectorConfigFieldBody({ field, value, defaultValue,
92
93
  dataProviderDescriptors?: readonly PhiRuntimeModuleDataProviderDescriptor[];
93
94
  calendarAdapterDescriptors?: readonly PhiCalendarAdapterDescriptor[];
94
95
  videoProviderDescriptors?: readonly PhiVideoProviderDescriptor[];
96
+ /** The declared fields of the record the edited Page is about; empty on a Page that is about none. */
97
+ pageRecordFields?: readonly PhiRecordFieldDescriptor[];
95
98
  onChange?: (next: Record<string, unknown>) => void;
96
99
  }): import("react").JSX.Element | null;
97
100
  export {};
@@ -58,14 +58,14 @@ export function renderPhiInspectorSettingsRow(label, control, key) {
58
58
  */
59
59
  function PhiInspectorSliderField({ value, min, max, step, suffix, disabled, onCommit, }) {
60
60
  const [dragged, setDragged] = useState(null);
61
- return (_jsx(PhiFlexControl, { align: "center", style: { minHeight: "var(--ant-control-height)", width: "100%" }, children: _jsx(PhiSliderControl, { value: dragged ?? value, min: min, max: max, step: step, ...(suffix ? { tooltipSuffix: suffix } : {}), disabled: disabled, style: { width: "100%", marginInline: 6 }, onChange: setDragged, onChangeComplete: (next) => {
61
+ return (_jsx(PhiFlexControl, { align: "center", style: { minHeight: "var(--phi-control-height)", width: "100%" }, children: _jsx(PhiSliderControl, { value: dragged ?? value, min: min, max: max, step: step, ...(suffix ? { tooltipSuffix: suffix } : {}), disabled: disabled, style: { width: "100%", marginInline: 6 }, onChange: setDragged, onChangeComplete: (next) => {
62
62
  setDragged(null);
63
63
  if (next !== value)
64
64
  onCommit(next);
65
65
  } }) }));
66
66
  }
67
67
  export function renderPhiInspectorSwitchRow({ key, label, checked, disabled, onChange, }) {
68
- return renderPhiInspectorSettingsRow(label, _jsx(PhiFlexControl, { align: "center", style: { minHeight: "var(--ant-control-height)" }, children: _jsx(PhiSwitchControl, { checked: checked, disabled: disabled || !onChange, ...(onChange ? { onChange } : {}) }) }), key);
68
+ return renderPhiInspectorSettingsRow(label, _jsx(PhiFlexControl, { align: "center", style: { minHeight: "var(--phi-control-height)" }, children: _jsx(PhiSwitchControl, { checked: checked, disabled: disabled || !onChange, ...(onChange ? { onChange } : {}) }) }), key);
69
69
  }
70
70
  function renderPhiInspectorSettingsBlock(label, control, key) {
71
71
  return (_jsxs(PhiFlexControl, { vertical: true, gap: 8, style: { width: "100%", minWidth: 0 }, children: [_jsx(PhiTypographyControl, { children: label }), control] }, key));
@@ -453,7 +453,7 @@ function PhiInspectorCollectionFieldControl({ field, config, labels, value, defa
453
453
  return (_jsxs(PhiFlexControl, { vertical: true, gap: 8, style: {
454
454
  width: "100%",
455
455
  minWidth: 0,
456
- padding: "var(--ant-padding-xs)",
456
+ padding: "var(--phi-padding-xs)",
457
457
  border: `1px solid ${token.colorBorderSecondary}`,
458
458
  borderRadius: token.borderRadius,
459
459
  background: token.colorBgContainer,
@@ -512,7 +512,7 @@ export function renderPhiInspectorConfigField(args) {
512
512
  return body;
513
513
  return (_jsxs(Fragment, { children: [_jsx(PhiDividerControl, { titlePlacement: "start", style: { marginBlock: 0 }, children: args.field.heading }), body] }, args.field.key));
514
514
  }
515
- function renderPhiInspectorConfigFieldBody({ field, value, defaultValue, config, defaultConfig, disabled, onChange, widgetReferenceOptions, paddingLabels, backgroundLabels, borderLabels, renderMediaPicker, colorPickerLabels, iconPickerLabels, fieldLabels = PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields, dataProviderDescriptors = [], calendarAdapterDescriptors = [], videoProviderDescriptors = [], blockId, }) {
515
+ function renderPhiInspectorConfigFieldBody({ field, value, defaultValue, config, defaultConfig, disabled, onChange, widgetReferenceOptions, paddingLabels, backgroundLabels, borderLabels, renderMediaPicker, colorPickerLabels, iconPickerLabels, fieldLabels = PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields, dataProviderDescriptors = [], calendarAdapterDescriptors = [], videoProviderDescriptors = [], pageRecordFields = [], blockId, }) {
516
516
  if (field.type === "readonly") {
517
517
  const displayValue = value ?? defaultValue;
518
518
  return renderPhiInspectorConfigFieldControl(field, _jsx(PhiTextControl, { value: displayValue == null ? "" : String(displayValue), readOnly: true, allowClear: false, style: { width: "100%" } }));
@@ -611,6 +611,15 @@ function renderPhiInspectorConfigFieldBody({ field, value, defaultValue, config,
611
611
  description: descriptor.description,
612
612
  })), placeholder: fieldLabels.selectCalendar, value: typeof value === "string" ? value : typeof defaultValue === "string" ? defaultValue : undefined, disabled: disabled || !onChange, style: { width: "100%" }, onChange: (calendarAdapterKey) => onChange?.({ [field.key]: calendarAdapterKey }) }));
613
613
  }
614
+ if (field.type === "record-field") {
615
+ // A Page that is about no record has no field to name; the row is for the Pages that are.
616
+ if (pageRecordFields.length === 0 && typeof value !== "string") {
617
+ return null;
618
+ }
619
+ return renderPhiInspectorConfigFieldControl(field, _jsx(PhiSelectControl, { allowClear: true, options: pageRecordFields
620
+ .filter((recordField) => field.kinds.includes(recordField.kind))
621
+ .map((recordField) => ({ value: recordField.key, label: recordField.label, description: recordField.description })), placeholder: fieldLabels.selectRecordField, value: typeof value === "string" ? value : undefined, disabled: disabled || !onChange, style: { width: "100%" }, onChange: (recordFieldKey) => onChange?.({ [field.key]: typeof recordFieldKey === "string" ? recordFieldKey : undefined }) }));
622
+ }
614
623
  if (field.type === "video-provider") {
615
624
  return renderPhiInspectorConfigFieldControl(field, _jsx(PhiSelectControl
616
625
  /*
@@ -18,5 +18,5 @@ export function PhiInspectorLinkTargetFieldControl({ value, disabled, labels = P
18
18
  const options = useMemo(() => buildPhiBuilderPageReferenceTree(state.area, pages, pages, { landing: labels.landingPage }), [labels.landingPage, pages, state.area]);
19
19
  return (_jsx(PhiLinkTargetControl, { value: value, options: options, labels: labels, disabled: disabled, onChange: onChange,
20
20
  // A row like every switch in the Inspector: its words on the left, the switch in the control column.
21
- newTabRow: (control) => (_jsx(PhiInspectorFieldRow, { label: labels.newTab, children: _jsx(PhiFlexControl, { align: "center", style: { minHeight: "var(--ant-control-height)" }, children: control }) })) }));
21
+ newTabRow: (control) => (_jsx(PhiInspectorFieldRow, { label: labels.newTab, children: _jsx(PhiFlexControl, { align: "center", style: { minHeight: "var(--phi-control-height)" }, children: control }) })) }));
22
22
  }
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { useCallback, useMemo } from "react";
4
+ import { findPhiPageNodePath } from "../../../../helpers/cms-page-catalog";
4
5
  import { PhiMediaPickerBinding } from "../../../../components/media/phi-media-picker-binding";
5
6
  import { PHI_MEDIA_WIDGET_DEFAULT_LABELS } from "../../../../components/media/media-widget-labels";
6
7
  import { PHI_SEARCH_WIDGET_DEFAULT_LABELS } from "../../../../components/widgets/label-types/search";
@@ -90,6 +91,17 @@ function usePhiBuilderInspectorSectionState(signalRoutes) {
90
91
  const activeDataProviderDescriptors = activeModuleMetas.dataProviders;
91
92
  const activeCalendarAdapterDescriptors = activeModuleMetas.calendarAdapters;
92
93
  const activeVideoProviderDescriptors = activeModuleMetas.videoProviders;
94
+ /*
95
+ * The record the edited Page is about, where its route names one: the catalog carries the Provider's
96
+ * key, the Provider's descriptor the fields a Widget may bind to.
97
+ */
98
+ const pageRecordProviderKey = usePhiDeveloperBuilderStateValue((state) => findPhiPageNodePath(state.modulePresetPagesByArea[state.area] ?? [], state.pageKey)?.at(-1)?.pageRecord?.providerKey ?? null);
99
+ const pageRecordFields = useMemo(() => {
100
+ const descriptor = pageRecordProviderKey
101
+ ? activeDataProviderDescriptors.find((candidate) => candidate.key === pageRecordProviderKey)
102
+ : null;
103
+ return descriptor?.kind === "record" ? descriptor.record?.fields ?? [] : [];
104
+ }, [activeDataProviderDescriptors, pageRecordProviderKey]);
93
105
  const activeModuleIcons = activeModuleMetas.icons;
94
106
  /*
95
107
  * Every Inspector section runs this hook, so what it works out per render is worked out fifteen
@@ -161,6 +173,7 @@ function usePhiBuilderInspectorSectionState(signalRoutes) {
161
173
  activeCalendarAdapterDescriptors,
162
174
  activeVideoProviderDescriptors,
163
175
  activeDataProviderDescriptors,
176
+ pageRecordFields,
164
177
  builderMode,
165
178
  currentRegionDraft,
166
179
  emitInspectorControllerAction,
@@ -197,5 +210,5 @@ export function PhiBuilderLayoutInspectorSectionWidgetClient({ section, signalRo
197
210
  }
198
211
  export function PhiBuilderWidgetInspectorSectionWidgetClient({ section, signalRoutes, geometryLabels, surfaceLabels, backgroundLabels, borderLabels, signalsLabels, fieldLabels, colorPickerLabels, iconPickerLabels, }) {
199
212
  const state = usePhiBuilderInspectorSectionState(signalRoutes);
200
- return _jsx(PhiBuilderInspectorModuleIcons, { sets: state.activeModuleIcons, children: _jsx(PhiDeveloperBuilderWidgetInspectorWidgetClient, { surfaceLabels: surfaceLabels, fieldLabels: fieldLabels, backgroundLabels: backgroundLabels, borderLabels: borderLabels, renderMediaPicker: state.renderBackgroundMediaPicker, onSurfaceChange: (surface) => state.emitInspectorControllerAction({ kind: "patchSelectedWidgetSurface", surface }), section: section, builderMode: state.builderMode, selectedStructureNodeKey: state.nodeKey, selectedStructureNodeKind: state.nodeKind, selectedStructureNodeTitle: state.selectedStructureNodeTitle, selectedStructureWidgetMeta: state.selectedStructurePlugin?.kind === "widget" ? state.selectedStructurePlugin : null, currentDraft: state.selectedWidgetNode, widgetReferenceOptions: state.widgetReferenceOptions, signalRouteScope: state.selectedSignalRouteScope, onConfigChange: (nextConfig) => state.emitInspectorControllerAction({ kind: "patchSelectedWidgetConfig", patch: nextConfig }), geometryLabels: geometryLabels, signalsLabels: signalsLabels, colorPickerLabels: colorPickerLabels, iconPickerLabels: iconPickerLabels, dataProviderDescriptors: state.activeDataProviderDescriptors, calendarAdapterDescriptors: state.activeCalendarAdapterDescriptors, videoProviderDescriptors: state.activeVideoProviderDescriptors, onGeometryChange: (geometry) => state.emitInspectorControllerAction({ kind: "patchSelectedWidgetGeometry", geometry }), onTranslateChange: (translate) => state.emitInspectorControllerAction({ kind: "setSelectedWidgetTranslate", translate }) }) });
213
+ return _jsx(PhiBuilderInspectorModuleIcons, { sets: state.activeModuleIcons, children: _jsx(PhiDeveloperBuilderWidgetInspectorWidgetClient, { surfaceLabels: surfaceLabels, fieldLabels: fieldLabels, backgroundLabels: backgroundLabels, borderLabels: borderLabels, renderMediaPicker: state.renderBackgroundMediaPicker, onSurfaceChange: (surface) => state.emitInspectorControllerAction({ kind: "patchSelectedWidgetSurface", surface }), section: section, builderMode: state.builderMode, selectedStructureNodeKey: state.nodeKey, selectedStructureNodeKind: state.nodeKind, selectedStructureNodeTitle: state.selectedStructureNodeTitle, selectedStructureWidgetMeta: state.selectedStructurePlugin?.kind === "widget" ? state.selectedStructurePlugin : null, currentDraft: state.selectedWidgetNode, widgetReferenceOptions: state.widgetReferenceOptions, signalRouteScope: state.selectedSignalRouteScope, onConfigChange: (nextConfig) => state.emitInspectorControllerAction({ kind: "patchSelectedWidgetConfig", patch: nextConfig }), geometryLabels: geometryLabels, signalsLabels: signalsLabels, colorPickerLabels: colorPickerLabels, iconPickerLabels: iconPickerLabels, dataProviderDescriptors: state.activeDataProviderDescriptors, calendarAdapterDescriptors: state.activeCalendarAdapterDescriptors, videoProviderDescriptors: state.activeVideoProviderDescriptors, pageRecordFields: state.pageRecordFields, onGeometryChange: (geometry) => state.emitInspectorControllerAction({ kind: "patchSelectedWidgetGeometry", geometry }), onTranslateChange: (translate) => state.emitInspectorControllerAction({ kind: "setSelectedWidgetTranslate", translate }) }) });
201
214
  }
@@ -7,7 +7,7 @@ import { PHI_RENDERABLE_BLOCK_RECEIVE_CHANNELS } from "../../../../components/wi
7
7
  import { PhiFlexControl } from "../../../../components/controls/phi-flex-control";
8
8
  import { PhiTypographyControl } from "../../../../components/controls/phi-typography-control";
9
9
  function renderSignalBlock(label, content, key, action) {
10
- return (_jsxs(PhiFlexControl, { vertical: true, gap: 4, style: { width: "100%" }, children: [action ? (_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: 8, style: { width: "100%" }, children: [_jsx(PhiTypographyControl, { style: { lineHeight: "var(--ant-control-height)" }, children: label }), action] })) : (_jsx(PhiTypographyControl, { style: { lineHeight: "var(--ant-control-height)" }, children: label })), content] }, key));
10
+ return (_jsxs(PhiFlexControl, { vertical: true, gap: 4, style: { width: "100%" }, children: [action ? (_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: 8, style: { width: "100%" }, children: [_jsx(PhiTypographyControl, { style: { lineHeight: "var(--phi-control-height)" }, children: label }), action] })) : (_jsx(PhiTypographyControl, { style: { lineHeight: "var(--phi-control-height)" }, children: label })), content] }, key));
11
11
  }
12
12
  function renderSignalCapabilities(capabilities, emptyLabel, options) {
13
13
  return _jsx(PhiSignalCapabilityList, { capabilities: capabilities, emptyLabel: emptyLabel, ...options });
@@ -19,7 +19,7 @@ export function PhiInspectorSignalSection({ labels, emits, listens, }) {
19
19
  : listens.filter((capability) => !PHI_RENDERABLE_BLOCK_RECEIVE_CHANNELS.has(capability.channel));
20
20
  return (_jsxs("div", { style: {
21
21
  display: "grid",
22
- gap: "var(--ant-padding-sm)",
22
+ gap: "var(--phi-padding-sm)",
23
23
  width: "100%",
24
24
  }, children: [_jsx("div", { children: renderSignalBlock(labels?.blocks.emits ?? "Emits", renderSignalCapabilities(emits, labels?.blocks.none ?? "none", {
25
25
  showCapability: true,
@@ -15,7 +15,7 @@ import { hasPhiFlag } from "../../../../helpers/flags";
15
15
  import { PhiCmsFlags } from "../../../../constants/phi-cms";
16
16
  import { PhiInspectorSignalSection, } from "./inspector-signal-section";
17
17
  import { PhiTypographyControl } from "../../../../components/controls/phi-typography-control";
18
- const PHI_GAP_SM = "var(--ant-padding-sm)";
18
+ const PHI_GAP_SM = "var(--phi-padding-sm)";
19
19
  function isPhiCmsChromeConfigField(field) {
20
20
  return (field.type === "padding"
21
21
  || field.type === "grid-placement"
@@ -32,7 +32,7 @@ export function PhiPlusButtonWidget({ slotIndex, label, onInsert, ariaLabel, dro
32
32
  ? " phi-layout-affordance--drop-rejected"
33
33
  : "";
34
34
  return (_jsx("span", { style: PHI_SCAFFOLD_BUTTON_BOUNDARY_STYLE, onClick: stopAtScaffold, children: _jsx(PhiButtonControl, { ref: setNodeRef, className: `phi-layout-affordance phi-layout-affordance--insert${dropStateClassName}`, type: "dashed", size: "small", icon: _jsx(PhiIcon, { name: "plus", size: "inherit" }), ariaLabel: ariaLabel ?? (labelText ? `Insert child after ${labelText}` : "Insert child"), onClick: () => onInsert(slotIndex), style: {
35
- "--phi-layout-affordance-size": "var(--ant-control-height)",
35
+ "--phi-layout-affordance-size": "var(--phi-control-height)",
36
36
  } }) }, `insert-${slotIndex}`));
37
37
  }
38
38
  export function PhiLayoutDragButtonWidget({ dragData, ariaLabel = "Move node", }) {
@@ -51,16 +51,16 @@ export function PhiLayoutDragButtonWidget({ dragData, ariaLabel = "Move node", }
51
51
  buttonRef.current = node;
52
52
  setNodeRef(node);
53
53
  }, listeners: listeners, attributes: attributes, dragging: isDragging, className: "phi-layout-affordance phi-layout-affordance--drag", style: {
54
- "--phi-layout-affordance-size": "var(--ant-control-height-sm)",
54
+ "--phi-layout-affordance-size": "var(--phi-control-height-sm)",
55
55
  } }));
56
56
  }
57
57
  export function PhiLayoutDeleteButtonWidget({ onDelete, ariaLabel = "Delete layout" }) {
58
58
  return (_jsx("span", { style: PHI_SCAFFOLD_BUTTON_BOUNDARY_STYLE, onMouseDown: holdFocusAtScaffold, onClick: stopAtScaffold, children: _jsx(PhiButtonControl, { className: "phi-layout-affordance phi-layout-affordance--delete", ariaLabel: ariaLabel, icon: _jsx(PhiIcon, { name: "delete", size: "inherit" }), danger: true, type: "text", size: "small", onClick: onDelete, style: {
59
- "--phi-layout-affordance-size": "var(--ant-control-height-sm)",
59
+ "--phi-layout-affordance-size": "var(--phi-control-height-sm)",
60
60
  } }) }));
61
61
  }
62
62
  export function PhiLayoutConfigButtonWidget({ onOpenInspector, ariaLabel = "Open inspector", }) {
63
63
  return (_jsx("span", { style: PHI_SCAFFOLD_BUTTON_BOUNDARY_STYLE, onMouseDown: holdFocusAtScaffold, onClick: stopAtScaffold, children: _jsx(PhiButtonControl, { className: "phi-layout-affordance phi-layout-affordance--config", ariaLabel: ariaLabel, icon: _jsx(PhiIcon, { name: "setting", size: "inherit" }), type: "text", size: "small", onClick: onOpenInspector, style: {
64
- "--phi-layout-affordance-size": "var(--ant-control-height-sm)",
64
+ "--phi-layout-affordance-size": "var(--phi-control-height-sm)",
65
65
  } }) }));
66
66
  }