@phis/ui 0.4.8 → 0.4.12

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 (221) hide show
  1. package/components/cms/phi-cms-area-access-guard.js +9 -1
  2. package/components/cms/phi-cms-area-render-scope.d.ts +8 -4
  3. package/components/cms/phi-cms-area-render-scope.js +26 -11
  4. package/components/cms/phi-cms-root-layout.js +4 -2
  5. package/components/cms/phi-cms-runtime-registry.d.ts +2 -1
  6. package/components/cms/phi-cms-runtime-registry.js +1 -1
  7. package/components/controls/phi-color-control.js +2 -1
  8. package/components/controls/phi-drawer-control-adapter.js +2 -3
  9. package/components/controls/phi-drawer-control.js +3 -3
  10. package/components/controls/phi-dropdown-control.js +2 -1
  11. package/components/controls/phi-float-button-control.js +3 -3
  12. package/components/controls/phi-modal-control-adapter.js +2 -2
  13. package/components/controls/phi-modal-control.js +3 -3
  14. package/components/controls/phi-ribbon-wrap-control.js +2 -1
  15. package/components/controls/phi-zoom-image-overlay.js +11 -5
  16. package/components/forms/auth-admin-settings-labels.d.ts +35 -0
  17. package/components/forms/auth-admin-settings-labels.js +27 -0
  18. package/components/forms/content-entry-forms.js +1 -5
  19. package/components/forms/form-descriptor-runtime-client.js +2 -1
  20. package/components/forms/form-descriptor-text.d.ts +17 -0
  21. package/components/forms/form-descriptor-text.js +14 -0
  22. package/components/forms/runtime-form-controller-plugin.d.ts +0 -115
  23. package/components/forms/runtime-form-controller-plugin.js +1 -1
  24. package/components/forms/upload-form-control.d.ts +0 -7
  25. package/components/forms/upload-form-control.js +1 -1
  26. package/components/layouts/clients/phi-collapsible-layout-client.js +2 -1
  27. package/components/layouts/clients/phi-flex-layout-client.js +7 -1
  28. package/components/layouts/clients/phi-sequence-slot-editor.js +2 -1
  29. package/components/layouts/clients/phi-split-card-half.js +2 -1
  30. package/components/layouts/phi-base-layout.js +2 -1
  31. package/components/layouts/phi-layout-surface-box.js +2 -1
  32. package/components/media/phi-media-picker-server.js +3 -11
  33. package/components/navigation/use-phi-protected-mail.js +1 -9
  34. package/components/regions/presets/clients/sider-context.js +4 -2
  35. package/components/root/phi-config-provider.js +2 -1
  36. package/components/root/phi-dayjs-locale.d.ts +4 -1
  37. package/components/root/phi-dayjs-locale.js +2 -2
  38. package/components/root/phi-intl-locale.d.ts +7 -1
  39. package/components/root/phi-intl-locale.js +20 -15
  40. package/components/root/phi-root-layout.js +2 -1
  41. package/components/runtime/core-runtime-controller-plugin.d.ts +0 -84
  42. package/components/runtime/core-runtime-controller-plugin.js +1 -1
  43. package/components/runtime/runtime-controller-server-host.js +20 -9
  44. package/components/runtime/runtime-signal-bus.js +39 -4
  45. package/components/shell/phi-antd-icon.d.ts +3 -0
  46. package/components/shell/phi-antd-icon.js +9 -0
  47. package/components/state/use-phi-hydrated.d.ts +6 -0
  48. package/components/state/use-phi-hydrated.js +11 -0
  49. package/components/tables/phi-plain-table.d.ts +4 -0
  50. package/components/tables/phi-plain-table.js +1 -1
  51. package/components/widgets/client/shared/phi-rendered-value.js +4 -3
  52. package/components/widgets/config/parser-primitives.d.ts +5 -0
  53. package/components/widgets/config/parser-primitives.js +11 -0
  54. package/components/widgets/label-sets/runtime-options.d.ts +1 -1
  55. package/components/widgets/server/builder-chrome.js +2 -6
  56. package/components/widgets/server/search.js +2 -6
  57. package/components/widgets/shared/markdown-body-client.d.ts +7 -0
  58. package/components/widgets/shared/markdown-body-client.js +2 -0
  59. package/components/widgets/shared/markdown-render.js +48 -1
  60. package/controls.d.ts +2 -0
  61. package/controls.js +3 -0
  62. package/gateway/dashboard-cards-route.js +5 -7
  63. package/gateway/navigation-target-route.js +7 -9
  64. package/gateway/page-references-route.js +6 -8
  65. package/gateway/site-config.js +3 -0
  66. package/gateway/site-proxy.js +13 -2
  67. package/helpers/class-names.d.ts +7 -0
  68. package/helpers/class-names.js +10 -0
  69. package/helpers/cms-navigation-catalog.js +4 -2
  70. package/helpers/cms-page-catalog.js +35 -6
  71. package/helpers/cms-region-keys.d.ts +0 -1
  72. package/helpers/cms-region-keys.js +1 -1
  73. package/helpers/format-date-time.d.ts +14 -3
  74. package/helpers/format-date-time.js +27 -11
  75. package/helpers/region-page-scope.d.ts +1 -3
  76. package/helpers/region-page-scope.js +0 -4
  77. package/helpers/translation-format.d.ts +6 -0
  78. package/helpers/translation-format.js +15 -8
  79. package/package.json +2 -2
  80. package/plugins/runtime/phi-slot-child-frame-view.js +2 -1
  81. package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +1 -1
  82. package/plugins/runtime-modules/admin/forms.js +1 -1
  83. package/plugins/runtime-modules/admin/trees/phi-default-admin-settings-page-tree.js +2 -5
  84. package/plugins/runtime-modules/app/forms.js +1 -1
  85. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +2 -6
  86. package/plugins/runtime-modules/asset/metadata-form.js +2 -6
  87. package/plugins/runtime-modules/asset/settings-forms.js +1 -1
  88. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +2 -5
  89. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +2 -6
  90. package/plugins/runtime-modules/asset/widgets/area-upload/server.js +2 -6
  91. package/plugins/runtime-modules/asset/widgets/image-inspector/authoring.js +1 -3
  92. package/plugins/runtime-modules/asset/widgets/image-inspector/server.js +2 -6
  93. package/plugins/runtime-modules/asset/widgets.js +5 -7
  94. package/plugins/runtime-modules/auth/admin-settings-forms.js +1 -1
  95. package/plugins/runtime-modules/auth/data-providers.d.ts +5 -0
  96. package/plugins/runtime-modules/auth/data-providers.js +3 -0
  97. package/plugins/runtime-modules/auth/definition.d.ts +5 -0
  98. package/plugins/runtime-modules/auth/ids.d.ts +7 -7
  99. package/plugins/runtime-modules/auth/ids.js +7 -7
  100. package/plugins/runtime-modules/auth/services/installations-table.js +3 -1
  101. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +2 -6
  102. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +26 -14
  103. package/plugins/runtime-modules/auth/widgets/security/client.js +5 -1
  104. package/plugins/runtime-modules/auth/widgets.d.ts +1 -2
  105. package/plugins/runtime-modules/auth/widgets.js +5 -7
  106. package/plugins/runtime-modules/avatar/overlay-tree.server.js +2 -6
  107. package/plugins/runtime-modules/avatar/widgets/account-avatar/server.js +2 -6
  108. package/plugins/runtime-modules/avatar/widgets/account-avatar-picker/server.js +2 -6
  109. package/plugins/runtime-modules/avatar/widgets.js +3 -5
  110. package/plugins/runtime-modules/builder/clients/pages-workspace.d.ts +2 -3
  111. package/plugins/runtime-modules/builder/clients/pages-workspace.js +5 -18
  112. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +1 -0
  113. package/plugins/runtime-modules/builder/controller/page-controller.js +1 -1
  114. package/plugins/runtime-modules/builder/controller/server-definition.js +3 -11
  115. package/plugins/runtime-modules/builder/controller/workspace-controller.js +2 -6
  116. package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +2 -8
  117. package/plugins/runtime-modules/builder/developer-workspace-store.js +24 -44
  118. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +0 -5
  119. package/plugins/runtime-modules/builder/edit-scaffold-drawer.js +2 -1
  120. package/plugins/runtime-modules/builder/inspector-section-widget.js +6 -31
  121. package/plugins/runtime-modules/builder/navigation-persistence.js +12 -3
  122. package/plugins/runtime-modules/builder/page-meta-form.js +4 -12
  123. package/plugins/runtime-modules/builder/page-presets.server.d.ts +0 -1
  124. package/plugins/runtime-modules/builder/page-presets.server.js +0 -24
  125. package/plugins/runtime-modules/builder/pages-workspace.js +6 -16
  126. package/plugins/runtime-modules/builder/persistence.d.ts +6 -4
  127. package/plugins/runtime-modules/builder/persistence.js +6 -7
  128. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +0 -1
  129. package/plugins/runtime-modules/builder/shells-workspace.js +3 -11
  130. package/plugins/runtime-modules/builder/signal-wiring-form.js +3 -7
  131. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +2 -6
  132. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +6 -26
  133. package/plugins/runtime-modules/builder/trees/phi-default-builder-settings-page-tree.js +2 -6
  134. package/plugins/runtime-modules/builder/widgets/developer-builder-pages-header/plugin.js +2 -6
  135. package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.js +2 -6
  136. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +3 -2
  137. package/plugins/runtime-modules/builder/widgets/structure-region/plugin.js +1 -6
  138. package/plugins/runtime-modules/builder/widgets.js +10 -12
  139. package/plugins/runtime-modules/client-authoring-module.js +18 -1
  140. package/plugins/runtime-modules/contracts.d.ts +15 -1
  141. package/plugins/runtime-modules/contracts.js +10 -0
  142. package/plugins/runtime-modules/core/messaging/forms.js +1 -1
  143. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
  144. package/plugins/runtime-modules/core/widgets/description/server.js +12 -9
  145. package/plugins/runtime-modules/core/widgets/dimension/plugin.js +2 -6
  146. package/plugins/runtime-modules/core/widgets/draft-status/plugin.js +2 -6
  147. package/plugins/runtime-modules/core/widgets/entry-list/config.js +2 -9
  148. package/plugins/runtime-modules/core/widgets/entry-list/view.server.js +1 -1
  149. package/plugins/runtime-modules/core/widgets/form-preview/client.js +2 -15
  150. package/plugins/runtime-modules/core/widgets/gallery/server.js +2 -6
  151. package/plugins/runtime-modules/core/widgets/image/server.js +2 -6
  152. package/plugins/runtime-modules/core/widgets/length/plugin.js +2 -6
  153. package/plugins/runtime-modules/core/widgets/markdown-toc/plugin.js +2 -6
  154. package/plugins/runtime-modules/core/widgets/page-title/server.js +2 -6
  155. package/plugins/runtime-modules/core/widgets/pagination/config.js +4 -8
  156. package/plugins/runtime-modules/core/widgets/result/config.d.ts +3 -0
  157. package/plugins/runtime-modules/core/widgets/result/config.js +15 -10
  158. package/plugins/runtime-modules/core/widgets/result/server.js +1 -1
  159. package/plugins/runtime-modules/core/widgets/search-results/config.js +2 -8
  160. package/plugins/runtime-modules/core/widgets/sidebar-navigation/server.d.ts +2 -2
  161. package/plugins/runtime-modules/core/widgets/sidebar-navigation/server.js +8 -13
  162. package/plugins/runtime-modules/core/widgets/table/client.js +1 -1
  163. package/plugins/runtime-modules/core/widgets/theme-mode-switch/server.js +2 -6
  164. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +16 -31
  165. package/plugins/runtime-modules/core/widgets/timeline/client.js +9 -4
  166. package/plugins/runtime-modules/core/widgets/tour-button/server.js +2 -6
  167. package/plugins/runtime-modules/core/widgets/tree/client.js +1 -1
  168. package/plugins/runtime-modules/core/widgets.js +59 -61
  169. package/plugins/runtime-modules/dashboard/clients/dashboard-card-view.js +7 -5
  170. package/plugins/runtime-modules/dashboard/trees/phi-default-admin-dashboard-page-tree.js +2 -6
  171. package/plugins/runtime-modules/dashboard/trees/phi-default-area-dashboard-page-tree.js +2 -6
  172. package/plugins/runtime-modules/dashboard/trees/phi-default-builder-dashboard-page-tree.js +2 -6
  173. package/plugins/runtime-modules/descriptor-compiler.js +6 -6
  174. package/plugins/runtime-modules/groups/controller/client.d.ts +0 -56
  175. package/plugins/runtime-modules/groups/controller/client.js +1 -1
  176. package/plugins/runtime-modules/groups/forms.js +1 -5
  177. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +2 -6
  178. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +2 -6
  179. package/plugins/runtime-modules/localization/forms.js +2 -6
  180. package/plugins/runtime-modules/localization/services/options.js +19 -9
  181. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -11
  182. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +3 -11
  183. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +3 -11
  184. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +4 -109
  185. package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +2 -2
  186. package/plugins/runtime-modules/preset-contracts/pub-area.js +0 -4
  187. package/plugins/runtime-modules/pub-area-preset.js +0 -20
  188. package/plugins/runtime-modules/public/trees/phi-default-pub-error-page-tree.js +5 -5
  189. package/plugins/runtime-modules/revisions/forms.js +1 -1
  190. package/plugins/runtime-modules/revisions/services/table.js +6 -2
  191. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +2 -2
  192. package/plugins/runtime-modules/theme/controller/server-definition.js +2 -6
  193. package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +2 -6
  194. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +17 -21
  195. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +0 -2
  196. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +0 -8
  197. package/plugins/runtime-modules/theme/widgets.js +6 -8
  198. package/plugins/runtime-modules/threads/controller/client.d.ts +0 -78
  199. package/plugins/runtime-modules/threads/controller/client.js +1 -1
  200. package/plugins/runtime-modules/threads/forms.js +1 -1
  201. package/plugins/runtime-modules/threads/ids.d.ts +0 -1
  202. package/plugins/runtime-modules/threads/ids.js +0 -2
  203. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +8 -6
  204. package/plugins/runtime-modules/user-management/controller/client.d.ts +0 -73
  205. package/plugins/runtime-modules/user-management/controller/client.js +1 -1
  206. package/plugins/runtime-modules/user-management/forms.js +1 -5
  207. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +3 -7
  208. package/plugins/runtime-modules/video/widgets.js +2 -4
  209. package/server-helpers/cms-request.d.ts +19 -0
  210. package/server-helpers/cms-request.js +26 -8
  211. package/server-helpers/cms-root.js +27 -21
  212. package/server-helpers/public-login-route.js +6 -8
  213. package/server-helpers/runtime.js +1 -1
  214. package/server-helpers/search-index.js +34 -14
  215. package/styles/controls.css +11 -0
  216. package/styles/shell.css +11 -1
  217. package/types/length.js +8 -3
  218. package/types/site-config.d.ts +6 -4
  219. package/types/widget-runtime.d.ts +2 -3
  220. package/types.d.ts +5 -3
  221. package/types.js +3 -0
@@ -2,7 +2,6 @@ import { PHI_CMS_DEFAULT_SLOT_INDEX, PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS, PHI_CMS_TH
2
2
  import { PhiCmsFlags, PhiCmsRegionType, PhiCmsStatus } from "../../../../constants/phi-cms";
3
3
  import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
4
4
  import { resolvePhiShellHeaderHeight } from "../../../../helpers/shell-region-style";
5
- import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
6
5
  import { PHI_SIGNAL_VALUE_SCHEMAS, createPhiSignalAddress, createPhiSignalSubcontrolAddress, } from "../../../../types";
7
6
  import { PHI_SPACE } from "../../../../theme/antd-css-var-contract";
8
7
  import { buildPhiSiteThemeSelectOptions, resolvePhiThemeSelectionValue, } from "../../../../theme/phi-theme-selection";
@@ -13,6 +12,7 @@ import { PHI_THEME_SIGNAL_CHANNELS } from "../controller/signals";
13
12
  import { PHI_THEME_RUNTIME_MODULE_ID } from "../ids";
14
13
  import { buildPhiThemeSetSelectOptions } from "../set-options";
15
14
  import { PHI_THEME_PAGE_LAYOUT_IDS, PHI_THEME_PAGE_WIDGET_IDS } from "../page-ids";
15
+ import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
16
16
  /**
17
17
  * A Theme panel's way to hear the preview mode switch: the switch broadcasts on the Page, and every panel
18
18
  * that draws in that mode takes it through this route, as any Widget takes an input.
@@ -146,11 +146,7 @@ function buildThemeControllerSettings(toolbarId) {
146
146
  */
147
147
  export async function buildPhiDefaultBuilderThemePageTree({ page, runtime, registry, }) {
148
148
  const nodes = createPhiCmsPresetNodes(page);
149
- const labels = await getPhiBuilderChromeWidgetLabels({
150
- apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
151
- internalToken: readPhiServerApiCredentials().internalToken,
152
- locale: runtime.locale.current,
153
- });
149
+ const labels = await getPhiBuilderChromeWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime));
154
150
  const themeToolbarId = createPhiCommandToolbarId(PHI_THEME_RUNTIME_MODULE_ID, PHI_THEME_PAGE_PRESET_KEY);
155
151
  return {
156
152
  page: nodes.page(),
@@ -1057,8 +1057,6 @@ export function PhiBuilderBrandThemeControlsWidgetClient({ runtime, config, colo
1057
1057
  const themeKey = resolveThemeKey(config);
1058
1058
  const { state, draftRef, publishDraft, pickerTransaction } = usePhiBrandThemeDraft(runtime, themeKey);
1059
1059
  const previewMode = usePhiBrandPreviewMode(resolveThemePayloadMode(state.draft), config?.signalRoutes);
1060
- const loading = false;
1061
- const saving = false;
1062
1060
  const [activeColorSection, changeActiveColorSection] = usePhiBrandAccordionSection(BRAND_THEME_COLOR_COLLAPSE_STORAGE_KEY, BRAND_THEME_COLOR_SECTION_KEYS);
1063
1061
  /*
1064
1062
  * Everything the panel derives from the draft, derived once per draft and mode. The panel renders
@@ -1119,7 +1117,7 @@ export function PhiBuilderBrandThemeControlsWidgetClient({ runtime, config, colo
1119
1117
  ownGradients,
1120
1118
  };
1121
1119
  }, [customLabel, previewMode, state.draft, themeBlocks, themePresets]);
1122
- return (_jsx(PhiFlexControl, { vertical: true, gap: clientToken.padding, style: { width: "100%", minWidth: 0, opacity: loading ? 0.65 : 1 }, children: _jsx(PhiCardControl, { size: "small", children: _jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingSM, children: [_jsx(PhiBrandBlockPicker, { label: "Palette", value: themeComposition.palette.key, unavailable: themeComposition.unavailable.palette, options: themeBlocks.palettes, onChange: (key) => {
1120
+ return (_jsx(PhiFlexControl, { vertical: true, gap: clientToken.padding, style: { width: "100%", minWidth: 0 }, children: _jsx(PhiCardControl, { size: "small", children: _jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingSM, children: [_jsx(PhiBrandBlockPicker, { label: "Palette", value: themeComposition.palette.key, unavailable: themeComposition.unavailable.palette, options: themeBlocks.palettes, onChange: (key) => {
1123
1121
  const palette = themeBlocks.palettes.find((candidate) => candidate.key === key);
1124
1122
  if (!palette)
1125
1123
  return;
@@ -1131,7 +1129,7 @@ export function PhiBuilderBrandThemeControlsWidgetClient({ runtime, config, colo
1131
1129
  flex: `0 1 min(100%, ${colorControlWidth}px)`,
1132
1130
  minWidth: 0,
1133
1131
  maxWidth: "100%",
1134
- }, children: _jsx(PhiColorFieldControl, { ...pickerTransaction, tokenKey: "custom6", value: customPalette.custom6, defaultValue: resolvePhiThemePaletteCustomColors(selectedPreset.palette, previewMode).custom6, disabled: saving, customColors: customColorOptions, presets: PHI_COLOR_PICKER_PRESETS, labels: colorPickerLabels, onChange: (value) => {
1132
+ }, children: _jsx(PhiColorFieldControl, { ...pickerTransaction, tokenKey: "custom6", value: customPalette.custom6, defaultValue: resolvePhiThemePaletteCustomColors(selectedPreset.palette, previewMode).custom6, customColors: customColorOptions, presets: PHI_COLOR_PICKER_PRESETS, labels: colorPickerLabels, onChange: (value) => {
1135
1133
  publishDraft(mergeThemeCustomColors(state.draft, buildPhiThemeCustomColorPalette(value), previewMode));
1136
1134
  } }) })] })),
1137
1135
  children: (_jsx(PhiFlexControl, { wrap: "wrap", style: { minWidth: 0, columnGap: clientToken.paddingXXS, rowGap: clientToken.paddingSM }, children: customColorOptions
@@ -1140,7 +1138,7 @@ export function PhiBuilderBrandThemeControlsWidgetClient({ runtime, config, colo
1140
1138
  flex: `1 1 calc((100% - ${clientToken.paddingXXS}) / 2)`,
1141
1139
  minWidth: 0,
1142
1140
  maxWidth: "100%",
1143
- }, children: _jsx(PhiColorFieldControl, { ...pickerTransaction, label: item.label, tokenKey: item.key, value: item.value, defaultValue: resolvePhiThemePaletteCustomColors(selectedPreset.palette, previewMode)[item.key], disabled: saving, customColors: customColorOptions, presets: PHI_COLOR_PICKER_PRESETS, labels: colorPickerLabels, onChange: (value, tokenKey) => {
1141
+ }, children: _jsx(PhiColorFieldControl, { ...pickerTransaction, label: item.label, tokenKey: item.key, value: item.value, defaultValue: resolvePhiThemePaletteCustomColors(selectedPreset.palette, previewMode)[item.key], customColors: customColorOptions, presets: PHI_COLOR_PICKER_PRESETS, labels: colorPickerLabels, onChange: (value, tokenKey) => {
1144
1142
  if (!tokenKey || !PHI_THEME_CUSTOM_COLOR_KEYS.includes(tokenKey)) {
1145
1143
  return;
1146
1144
  }
@@ -1176,7 +1174,7 @@ export function PhiBuilderBrandThemeControlsWidgetClient({ runtime, config, colo
1176
1174
  const contrastLevel = own || (ownTone && !neitherReads) ? "error" : "info";
1177
1175
  const paint = `linear-gradient(${gradient.direction}, ${gradient.stops
1178
1176
  .map((stop) => `${stop.color} ${stop.percent}%`).join(", ")})`;
1179
- return (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, children: [_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: clientToken.paddingXS, children: [_jsx(PhiTypographyControl, { strong: true, children: `Gradient ${index + 1}` }), own || ownTone ? (_jsx(PhiButtonControl, { size: "small", type: "link", disabled: saving, style: { paddingInline: 0, height: clientToken.controlHeightSM }, onClick: () => publishDraft(mergeThemeGradient(draftRef.current, key, null, previewMode)), label: "Reset to palette" })) : null] }), _jsxs(PhiFlexControl, { align: "center", gap: clientToken.paddingSM, wrap: "wrap", "aria-hidden": true, children: [[false, true].map((hover) => (_jsx("span", { style: {
1177
+ return (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, children: [_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: clientToken.paddingXS, children: [_jsx(PhiTypographyControl, { strong: true, children: `Gradient ${index + 1}` }), own || ownTone ? (_jsx(PhiButtonControl, { size: "small", type: "link", style: { paddingInline: 0, height: clientToken.controlHeightSM }, onClick: () => publishDraft(mergeThemeGradient(draftRef.current, key, null, previewMode)), label: "Reset to palette" })) : null] }), _jsxs(PhiFlexControl, { align: "center", gap: clientToken.paddingSM, wrap: "wrap", "aria-hidden": true, children: [[false, true].map((hover) => (_jsx("span", { style: {
1180
1178
  display: "inline-flex",
1181
1179
  alignItems: "center",
1182
1180
  height: clientToken.controlHeight,
@@ -1200,12 +1198,12 @@ export function PhiBuilderBrandThemeControlsWidgetClient({ runtime, config, colo
1200
1198
  lineHeight: 2,
1201
1199
  }, children: "Badge" })] }), _jsx(PhiBackgroundControl, { value: normalizePhiBackgroundWidgetConfig({
1202
1200
  base: { kind: "gradient", direction: gradient.direction, stops: gradient.stops },
1203
- }), baseKinds: ["gradient"], overlay: false, filters: [], motionModes: [], imageSourceKinds: [], disabled: saving, onChange: (value) => {
1201
+ }), baseKinds: ["gradient"], overlay: false, filters: [], motionModes: [], imageSourceKinds: [], onChange: (value) => {
1204
1202
  const base = normalizePhiBackgroundWidgetConfig(value).base;
1205
1203
  if (base.kind !== "gradient")
1206
1204
  return;
1207
1205
  publishDraft(mergeThemeGradient(draftRef.current, key, { direction: base.direction, stops: base.stops, ...(ownTone ? { text: ownTone } : {}) }, previewMode));
1208
- } }, `${key}-${previewMode}`), _jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXXS, children: [_jsx(PhiTypographyControl, { type: "secondary", children: "Label colour" }), _jsx(PhiSegmentedControl, { block: true, disabled: saving, value: ownTone ?? "auto", options: [
1206
+ } }, `${key}-${previewMode}`), _jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXXS, children: [_jsx(PhiTypographyControl, { type: "secondary", children: "Label colour" }), _jsx(PhiSegmentedControl, { block: true, value: ownTone ?? "auto", options: [
1209
1207
  { value: "auto", label: "Automatic" },
1210
1208
  { value: "light", label: "Light text" },
1211
1209
  { value: "dark", label: "Dark text" },
@@ -1240,7 +1238,7 @@ export function PhiBuilderBrandThemeControlsWidgetClient({ runtime, config, colo
1240
1238
  flex: `0 1 min(100%, ${colorControlWidth}px)`,
1241
1239
  minWidth: 0,
1242
1240
  maxWidth: "100%",
1243
- }, children: _jsx(PhiColorFieldControl, { ...pickerTransaction, tokenKey: section.key, value: seedValue, defaultValue: seedDefaultValue, disabled: saving, customColors: customColorOptions, labels: colorPickerLabels, presets: section.presets, onChange: (value) => {
1241
+ }, children: _jsx(PhiColorFieldControl, { ...pickerTransaction, tokenKey: section.key, value: seedValue, defaultValue: seedDefaultValue, customColors: customColorOptions, labels: colorPickerLabels, presets: section.presets, onChange: (value) => {
1244
1242
  publishDraft(mergeThemeSeedToken(draftRef.current, section, value, previewMode));
1245
1243
  } }) })] })),
1246
1244
  children: (_jsx(PhiFlexControl, { wrap: "wrap", style: { minWidth: 0, columnGap: clientToken.paddingXXS, rowGap: clientToken.paddingSM }, children: section.derived.map((item) => {
@@ -1250,12 +1248,12 @@ export function PhiBuilderBrandThemeControlsWidgetClient({ runtime, config, colo
1250
1248
  flex: `1 1 calc((100% - ${clientToken.paddingXXS}) / 2)`,
1251
1249
  minWidth: 0,
1252
1250
  maxWidth: "100%",
1253
- }, children: _jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXXS, children: [_jsx(PhiColorFieldControl, { ...pickerTransaction, label: item.label, tokenKey: item.key, value: overridden ? readEffectiveTokenString(colorToken, item.key, fallback) : fallback, defaultValue: fallback, disabled: saving, customColors: customColorOptions, labels: colorPickerLabels, onChange: (value, tokenKey) => {
1251
+ }, children: _jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXXS, children: [_jsx(PhiColorFieldControl, { ...pickerTransaction, label: item.label, tokenKey: item.key, value: overridden ? readEffectiveTokenString(colorToken, item.key, fallback) : fallback, defaultValue: fallback, customColors: customColorOptions, labels: colorPickerLabels, onChange: (value, tokenKey) => {
1254
1252
  if (!tokenKey) {
1255
1253
  return;
1256
1254
  }
1257
1255
  publishDraft(mergeThemeColorOverride(state.draft, tokenKey, value, previewMode));
1258
- } }), overridden ? (_jsx(PhiButtonControl, { size: "small", type: "link", disabled: saving, style: { alignSelf: "flex-start", paddingInline: 0, height: clientToken.controlHeightSM }, onClick: () => publishDraft(omitThemeColorOverride(state.draft, item.key, previewMode)), label: "Reset override" })) : null] }) }, item.key));
1256
+ } }), overridden ? (_jsx(PhiButtonControl, { size: "small", type: "link", style: { alignSelf: "flex-start", paddingInline: 0, height: clientToken.controlHeightSM }, onClick: () => publishDraft(omitThemeColorOverride(state.draft, item.key, previewMode)), label: "Reset override" })) : null] }) }, item.key));
1259
1257
  }) })),
1260
1258
  };
1261
1259
  }),
@@ -1267,8 +1265,6 @@ export function PhiBuilderBrandStyleControlsWidgetClient({ runtime, config, }) {
1267
1265
  const fieldLabelWidth = clientToken.controlHeight * 4;
1268
1266
  const themeKey = resolveThemeKey(config);
1269
1267
  const { state, publishDraft } = usePhiBrandThemeDraft(runtime, themeKey);
1270
- const loading = false;
1271
- const saving = false;
1272
1268
  const [activeStyleSection, changeActiveStyleSection] = usePhiBrandAccordionSection(BRAND_THEME_STYLE_COLLAPSE_STORAGE_KEY, BRAND_THEME_STYLE_SECTION_KEYS);
1273
1269
  const token = stripEmptyTokenValues(state.draft.style?.token ?? {});
1274
1270
  const styleTokenInput = {
@@ -1286,7 +1282,7 @@ export function PhiBuilderBrandStyleControlsWidgetClient({ runtime, config, }) {
1286
1282
  controlHeightLG: readEffectiveTokenNumber(styleTokenInput, "controlHeightLG", PHI_CONTROL_HEIGHTS.lg),
1287
1283
  };
1288
1284
  /** One row per size step: a label and the preset picker; Border Radius and Control Height share it. */
1289
- const renderPresetSizeRows = (items, options) => (_jsx(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, children: items.map((item) => (_jsxs(PhiFlexControl, { align: "center", gap: clientToken.paddingSM, wrap: "nowrap", children: [_jsx(PhiTypographyControl, { style: { flex: `0 0 ${fieldLabelWidth}px` }, children: item.label }), _jsx(PhiPresetSizeControl, { disabled: saving, value: item.value, fallbackKey: item.fallbackPreset, options: options, onChange: (value) => updateToken({ [item.key]: value }) })] }, item.key))) }));
1285
+ const renderPresetSizeRows = (items, options) => (_jsx(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, children: items.map((item) => (_jsxs(PhiFlexControl, { align: "center", gap: clientToken.paddingSM, wrap: "nowrap", children: [_jsx(PhiTypographyControl, { style: { flex: `0 0 ${fieldLabelWidth}px` }, children: item.label }), _jsx(PhiPresetSizeControl, { value: item.value, fallbackKey: item.fallbackPreset, options: options, onChange: (value) => updateToken({ [item.key]: value }) })] }, item.key))) }));
1290
1286
  const wireframe = readEffectiveTokenBoolean(styleTokenInput, "wireframe", true);
1291
1287
  const baseFontSize = readEffectiveTokenNumber(styleTokenInput, "fontSize", 12);
1292
1288
  function updateToken(tokenPatch) {
@@ -1339,7 +1335,7 @@ export function PhiBuilderBrandStyleControlsWidgetClient({ runtime, config, }) {
1339
1335
  },
1340
1336
  })),
1341
1337
  ], [fontFamilies, resolvedCatalogueFamilies, siteFontAssets.options]);
1342
- return (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.padding, style: { width: "100%", minWidth: 0, opacity: loading ? 0.65 : 1 }, children: [siteFontFaceCss ? (_jsx("style", { href: "phi-theme-font-picker-faces", precedence: "default", dangerouslySetInnerHTML: { __html: siteFontFaceCss } })) : null, siteFontAssets.error ? (_jsx(PhiAlertControl, { level: "error", title: "The Site's own typefaces could not be read.", description: siteFontAssets.error })) : null, _jsx(PhiCardControl, { size: "small", children: _jsx(PhiAccordionControl, { openSection: activeStyleSection, onOpenSectionChange: changeActiveStyleSection, sections: [
1338
+ return (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.padding, style: { width: "100%", minWidth: 0 }, children: [siteFontFaceCss ? (_jsx("style", { href: "phi-theme-font-picker-faces", precedence: "default", dangerouslySetInnerHTML: { __html: siteFontFaceCss } })) : null, siteFontAssets.error ? (_jsx(PhiAlertControl, { level: "error", title: "The Site's own typefaces could not be read.", description: siteFontAssets.error })) : null, _jsx(PhiCardControl, { size: "small", children: _jsx(PhiAccordionControl, { openSection: activeStyleSection, onOpenSectionChange: changeActiveStyleSection, sections: [
1343
1339
  {
1344
1340
  key: "shapes",
1345
1341
  label: _jsx(PhiTypographyControl, { strong: true, children: "Shapes" }),
@@ -1350,17 +1346,17 @@ export function PhiBuilderBrandStyleControlsWidgetClient({ runtime, config, }) {
1350
1346
  description: `${themeComposition.style.title}: ${formatShapeLabel(resolvePhiUniformControlShape(themeComposition.style.shape.controls))}`,
1351
1347
  },
1352
1348
  ...PHI_CONTROL_SHAPES.map((value) => ({ value, label: formatShapeLabel(value) })),
1353
- ], block: true, disabled: saving, onChange: (value) => publishDraft(value === "theme"
1349
+ ], block: true, onChange: (value) => publishDraft(value === "theme"
1354
1350
  ? clearThemeShapeScale(state.draft)
1355
1351
  : mergeThemeControlShape(state.draft, createPhiControlShapeCorners(value))) }) })),
1356
1352
  },
1357
1353
  {
1358
1354
  key: "buttonShadow",
1359
1355
  label: _jsx(PhiTypographyControl, { strong: true, children: "Button Shadow" }),
1360
- children: (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingSM, children: [_jsx(PhiTypographyControl, { type: "secondary", children: "Under each kind of Button. Theme keeps the tinted line; applies to both modes." }), PHI_THEME_BUTTON_SHADOW_KINDS.map((item) => (_jsx(PhiSegmentedControl, { label: item.label, value: readThemeButtonShadowChoice(state.draft, item.key), options: PHI_THEME_BUTTON_SHADOW_OPTIONS, block: true, disabled: saving, onChange: (choice) => publishDraft(mergeThemeButtonShadow(state.draft, item.key, choice)) }, item.key))), _jsx(PhiDividerControl, { style: { marginBlock: 0 } }), _jsx(PhiTypographyControl, { type: "secondary", children: "Fills every primary Button with one of the Theme's gradients (Color tab). A Button can still choose its own with the Gradient variant." }), _jsx(PhiSelectControl, { label: "Primary fill", value: readPhiThemeGradientKey(state.draft.buttons?.primaryGradient) ?? "none", options: [
1356
+ children: (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingSM, children: [_jsx(PhiTypographyControl, { type: "secondary", children: "Under each kind of Button. Theme keeps the tinted line; applies to both modes." }), PHI_THEME_BUTTON_SHADOW_KINDS.map((item) => (_jsx(PhiSegmentedControl, { label: item.label, value: readThemeButtonShadowChoice(state.draft, item.key), options: PHI_THEME_BUTTON_SHADOW_OPTIONS, block: true, onChange: (choice) => publishDraft(mergeThemeButtonShadow(state.draft, item.key, choice)) }, item.key))), _jsx(PhiDividerControl, { style: { marginBlock: 0 } }), _jsx(PhiTypographyControl, { type: "secondary", children: "Fills every primary Button with one of the Theme's gradients (Color tab). A Button can still choose its own with the Gradient variant." }), _jsx(PhiSelectControl, { label: "Primary fill", value: readPhiThemeGradientKey(state.draft.buttons?.primaryGradient) ?? "none", options: [
1361
1357
  { value: "none", label: "Colour" },
1362
1358
  ...PHI_THEME_GRADIENT_KEYS.map((key, index) => ({ value: key, label: `Gradient ${index + 1}` })),
1363
- ], disabled: saving, onChange: (choice) => publishDraft(mergeThemePrimaryButtonGradient(state.draft, choice === "none" ? null : choice)) })] })),
1359
+ ], onChange: (choice) => publishDraft(mergeThemePrimaryButtonGradient(state.draft, choice === "none" ? null : choice)) })] })),
1364
1360
  },
1365
1361
  {
1366
1362
  key: "radius",
@@ -1383,9 +1379,9 @@ export function PhiBuilderBrandStyleControlsWidgetClient({ runtime, config, }) {
1383
1379
  {
1384
1380
  key: "fontFamily",
1385
1381
  label: _jsx(PhiTypographyControl, { strong: true, children: "Font Family" }),
1386
- children: (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, children: [fontSlots.map((item) => (_jsxs(PhiFlexControl, { align: "center", gap: clientToken.paddingSM, wrap: "nowrap", children: [_jsx(PhiTypographyControl, { style: { flex: `0 0 ${fieldLabelWidth}px` }, children: item.label }), _jsx(PhiSelectControl, { ariaLabel: `${item.label} font`, value: item.authored ?? undefined, placeholder: item.inherited || "Not installed", options: fontOptions, allowClear: true, disabled: saving, size: "medium", style: { minWidth: 0, flex: "1 1 auto" }, onChange: (value) => publishDraft(
1382
+ children: (_jsxs(PhiFlexControl, { vertical: true, gap: clientToken.paddingXS, children: [fontSlots.map((item) => (_jsxs(PhiFlexControl, { align: "center", gap: clientToken.paddingSM, wrap: "nowrap", children: [_jsx(PhiTypographyControl, { style: { flex: `0 0 ${fieldLabelWidth}px` }, children: item.label }), _jsx(PhiSelectControl, { ariaLabel: `${item.label} font`, value: item.authored ?? undefined, placeholder: item.inherited || "Not installed", options: fontOptions, allowClear: true, size: "medium", style: { minWidth: 0, flex: "1 1 auto" }, onChange: (value) => publishDraft(
1387
1383
  // A cleared select reports nothing, which hands the slot back to the Set.
1388
- mergeThemeFontSlot(state.draft, item.key, value ?? null)) })] }, item.key))), _jsx(PhiDividerControl, { style: { marginBlock: clientToken.paddingXXS } }), _jsxs(PhiFlexControl, { align: "center", gap: clientToken.paddingSM, wrap: "nowrap", children: [_jsx(PhiTypographyControl, { style: { flex: `0 0 ${fieldLabelWidth}px` }, children: "Headings" }), _jsx(PhiSegmentedControl, { value: readPhiThemeHeadingFont(state.draft.typography), options: PHI_THEME_HEADING_FONT_OPTIONS, disabled: saving, size: "small", onChange: (heading) => publishDraft(mergeThemeHeadingFont(state.draft, heading)) })] })] })),
1384
+ mergeThemeFontSlot(state.draft, item.key, value ?? null)) })] }, item.key))), _jsx(PhiDividerControl, { style: { marginBlock: clientToken.paddingXXS } }), _jsxs(PhiFlexControl, { align: "center", gap: clientToken.paddingSM, wrap: "nowrap", children: [_jsx(PhiTypographyControl, { style: { flex: `0 0 ${fieldLabelWidth}px` }, children: "Headings" }), _jsx(PhiSegmentedControl, { value: readPhiThemeHeadingFont(state.draft.typography), options: PHI_THEME_HEADING_FONT_OPTIONS, size: "small", onChange: (heading) => publishDraft(mergeThemeHeadingFont(state.draft, heading)) })] })] })),
1389
1385
  },
1390
1386
  {
1391
1387
  key: "fontSize",
@@ -1395,7 +1391,7 @@ export function PhiBuilderBrandStyleControlsWidgetClient({ runtime, config, }) {
1395
1391
  {
1396
1392
  key: "wireframe",
1397
1393
  label: _jsx(PhiTypographyControl, { strong: true, children: "Wireframe" }),
1398
- children: (_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: clientToken.paddingSM, wrap: "wrap", children: [_jsx(PhiTypographyControl, { type: "secondary", children: "Dividing lines in dialogs and popovers, outlined steps and radios" }), _jsx(PhiSwitchControl, { checked: wireframe, disabled: saving, checkedLabel: "On", uncheckedLabel: "Off", onChange: (checked) => updateToken({ wireframe: checked }) })] })),
1394
+ children: (_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: clientToken.paddingSM, wrap: "wrap", children: [_jsx(PhiTypographyControl, { type: "secondary", children: "Dividing lines in dialogs and popovers, outlined steps and radios" }), _jsx(PhiSwitchControl, { checked: wireframe, checkedLabel: "On", uncheckedLabel: "Off", onChange: (checked) => updateToken({ wireframe: checked }) })] })),
1399
1395
  },
1400
1396
  ] }) })] }));
1401
1397
  }
@@ -1,9 +1,7 @@
1
1
  import type { PhiCmsWidgetPlugin } from "../../../../../types";
2
- import { type PhiCmsAreaKey } from "../../../../../constants/cms-areas";
3
2
  import { type PhiControlSignalConfig } from "../../../../../components/widgets/config/control-signal-config";
4
3
  export type PhiBuilderBrandWidgetConfig = Pick<PhiControlSignalConfig, "key" | "signalRoutes"> & {
5
4
  themeKey?: string;
6
- reviewArea?: PhiCmsAreaKey;
7
5
  };
8
6
  type PhiBuilderBrandWidgetDefinition = Pick<PhiCmsWidgetPlugin<PhiBuilderBrandWidgetConfig>, "kind" | "pluginKey" | "typeKey" | "title" | "description" | "category" | "iconFamily" | "runtimeSignals" | "requiredDataProviders" | "slotSizePolicy" | "fields" | "parseConfig">;
9
7
  export declare const PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_DEFINITION: PhiBuilderBrandWidgetDefinition;
@@ -1,11 +1,9 @@
1
- import { isPhiCmsAreaKey, } from "../../../../../constants/cms-areas";
2
1
  import { PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS } from "../../../../../constants/media-library-provider-keys";
3
2
  import { PHI_THEME_SIGNAL_CHANNELS } from "../../../../../plugins/runtime-modules/theme/controller/signals";
4
3
  import { createPhiCmsWidgetDefinition } from "../../../../../components/widgets/config/helpers";
5
4
  import { readString } from "../../../../../components/widgets/config/parser-primitives";
6
5
  import { parsePhiControlSignalConfig, } from "../../../../../components/widgets/config/control-signal-config";
7
6
  function parseBuilderBrandWidgetConfig(config) {
8
- const reviewArea = readString(config.reviewArea);
9
7
  return {
10
8
  /*
11
9
  * The routes are read like any Widget's: the preview mode reaches a panel through the route its tree
@@ -14,7 +12,6 @@ function parseBuilderBrandWidgetConfig(config) {
14
12
  */
15
13
  ...parsePhiControlSignalConfig(config, { key: "brandPreviewThemeMode" }),
16
14
  themeKey: readString(config.themeKey),
17
- reviewArea: isPhiCmsAreaKey(reviewArea) ? reviewArea : undefined,
18
15
  };
19
16
  }
20
17
  /** Every panel that draws in the preview's mode follows the mode switch. */
@@ -39,7 +36,6 @@ export const PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_DEFINITION = createPhiCmsWi
39
36
  runtimeSignals: PHI_BUILDER_BRAND_PREVIEW_MODE_SIGNALS,
40
37
  fields: [
41
38
  { key: "themeKey", type: "string", label: "Theme Key" },
42
- { key: "reviewArea", type: "string", label: "Review Area" },
43
39
  ],
44
40
  parseConfig: parseBuilderBrandWidgetConfig,
45
41
  });
@@ -60,7 +56,6 @@ export const PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_DEFINITION = createPhiCm
60
56
  runtimeSignals: PHI_BUILDER_BRAND_PREVIEW_MODE_SIGNALS,
61
57
  fields: [
62
58
  { key: "themeKey", type: "string", label: "Theme Key" },
63
- { key: "reviewArea", type: "string", label: "Review Area" },
64
59
  ],
65
60
  parseConfig: parseBuilderBrandWidgetConfig,
66
61
  });
@@ -73,7 +68,6 @@ export const PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_DEFINITION = createPhiCmsWi
73
68
  slotSizePolicy: "fill-inline",
74
69
  fields: [
75
70
  { key: "themeKey", type: "string", label: "Theme Key" },
76
- { key: "reviewArea", type: "string", label: "Review Area" },
77
71
  ],
78
72
  parseConfig: parseBuilderBrandWidgetConfig,
79
73
  });
@@ -96,7 +90,6 @@ export const PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_DEFINITION = createPhi
96
90
  runtimeSignals: PHI_BUILDER_BRAND_PREVIEW_MODE_SIGNALS,
97
91
  fields: [
98
92
  { key: "themeKey", type: "string", label: "Theme Key" },
99
- { key: "reviewArea", type: "string", label: "Review Area" },
100
93
  ],
101
94
  parseConfig: parseBuilderBrandWidgetConfig,
102
95
  });
@@ -110,7 +103,6 @@ export const PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_DEFINITION = createPhiCmsWid
110
103
  runtimeSignals: PHI_BUILDER_BRAND_PREVIEW_MODE_SIGNALS,
111
104
  fields: [
112
105
  { key: "themeKey", type: "string", label: "Theme Key" },
113
- { key: "reviewArea", type: "string", label: "Review Area" },
114
106
  ],
115
107
  parseConfig: parseBuilderBrandWidgetConfig,
116
108
  });
@@ -1,38 +1,36 @@
1
1
  import { PHI_THEME_RUNTIME_MODULE_ID } from "./ids";
2
2
  import { PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_DEFINITION, PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_DEFINITION, } from "./widgets/brand-controls/config";
3
- function defineFirstPartyWidget(options) {
4
- return options;
5
- }
3
+ import { definePhiFirstPartyWidget } from "../contracts";
6
4
  export const PHI_RUNTIME_MODULE_WIDGETS = [
7
- defineFirstPartyWidget({
5
+ definePhiFirstPartyWidget({
8
6
  definition: PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_DEFINITION,
9
7
  ownerModuleId: PHI_THEME_RUNTIME_MODULE_ID,
10
8
  renderPolicies: { "runtime": "custom", "preview": "custom", "authoring": "custom" },
11
9
  loadRuntime: () => import("./widgets/brand-controls/plugin").then((module) => module.PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_PLUGIN),
12
10
  loadPreview: () => import("./widgets/brand-controls/plugin").then((module) => module.PHI_BUILDER_BRAND_STYLE_CONTROLS_WIDGET_PLUGIN),
13
11
  }),
14
- defineFirstPartyWidget({
12
+ definePhiFirstPartyWidget({
15
13
  definition: PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_DEFINITION,
16
14
  ownerModuleId: PHI_THEME_RUNTIME_MODULE_ID,
17
15
  renderPolicies: { "runtime": "custom", "preview": "custom", "authoring": "custom" },
18
16
  loadRuntime: () => import("./widgets/brand-controls/plugin").then((module) => module.PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_PLUGIN),
19
17
  loadPreview: () => import("./widgets/brand-controls/plugin").then((module) => module.PHI_BUILDER_BRAND_THEME_CONTROLS_WIDGET_PLUGIN),
20
18
  }),
21
- defineFirstPartyWidget({
19
+ definePhiFirstPartyWidget({
22
20
  definition: PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_DEFINITION,
23
21
  ownerModuleId: PHI_THEME_RUNTIME_MODULE_ID,
24
22
  renderPolicies: { "runtime": "custom", "preview": "custom", "authoring": "custom" },
25
23
  loadRuntime: () => import("./widgets/brand-controls/plugin").then((module) => module.PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_PLUGIN),
26
24
  loadPreview: () => import("./widgets/brand-controls/plugin").then((module) => module.PHI_BUILDER_BRAND_BACKGROUND_CONTROLS_WIDGET_PLUGIN),
27
25
  }),
28
- defineFirstPartyWidget({
26
+ definePhiFirstPartyWidget({
29
27
  definition: PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_DEFINITION,
30
28
  ownerModuleId: PHI_THEME_RUNTIME_MODULE_ID,
31
29
  renderPolicies: { "runtime": "custom", "preview": "custom", "authoring": "custom" },
32
30
  loadRuntime: () => import("./widgets/brand-controls/plugin").then((module) => module.PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_PLUGIN),
33
31
  loadPreview: () => import("./widgets/brand-controls/plugin").then((module) => module.PHI_BUILDER_BRAND_IDENTITY_CONTROLS_WIDGET_PLUGIN),
34
32
  }),
35
- defineFirstPartyWidget({
33
+ definePhiFirstPartyWidget({
36
34
  definition: PHI_BUILDER_BRAND_THEME_PREVIEW_WIDGET_DEFINITION,
37
35
  ownerModuleId: PHI_THEME_RUNTIME_MODULE_ID,
38
36
  renderPolicies: { "runtime": "custom", "preview": "custom", "authoring": "custom" },
@@ -1,79 +1 @@
1
- import { type PhiThreadsControllerConfig } from "./definition";
2
- export declare const PHI_THREADS_RUNTIME_CONTROLLER_PLUGIN: {
3
- renderController: ({ key, address, config }: import("../../../../types").PhiRuntimeControllerRenderArgs<PhiThreadsControllerConfig, unknown>) => import("react").JSX.Element;
4
- kind: "controller";
5
- pluginKey: string;
6
- key: string;
7
- title: string;
8
- description: string;
9
- iconFamily: string;
10
- allowedMountScopes: "page"[];
11
- runtimeSignals: {
12
- emits: ({
13
- id: string;
14
- action: "change";
15
- valueType: "json";
16
- valueSchema: `${string}/signals/${string}`;
17
- } | {
18
- id: string;
19
- action: "activate";
20
- valueType: "none";
21
- valueSchema?: undefined;
22
- } | {
23
- id: string;
24
- action: "reload";
25
- valueType: "json";
26
- valueSchema: `${string}/signals/${string}`;
27
- } | {
28
- id: string;
29
- action: "close";
30
- valueType: "none";
31
- valueSchema?: undefined;
32
- } | {
33
- id: string;
34
- action: "change";
35
- valueType: "boolean";
36
- valueSchema?: undefined;
37
- })[];
38
- listens: ({
39
- id: string;
40
- channel: string;
41
- action: "change";
42
- valueType: "json";
43
- valueSchema: `${string}/signals/${string}`;
44
- } | {
45
- id: string;
46
- channel: string;
47
- action: "activate";
48
- valueType: "json";
49
- valueSchema: `${string}/signals/${string}`;
50
- } | {
51
- id: string;
52
- channel: string;
53
- action: "activate";
54
- valueType: "string";
55
- valueSchema?: undefined;
56
- } | {
57
- id: string;
58
- channel: string;
59
- action: "change";
60
- valueType: "boolean";
61
- valueSchema?: undefined;
62
- } | {
63
- id: string;
64
- channel: string;
65
- action: "close";
66
- valueType: "json";
67
- valueSchema: `${string}/signals/${string}`;
68
- } | {
69
- id: string;
70
- channel: string;
71
- action: "reload";
72
- valueType: "none";
73
- valueSchema?: undefined;
74
- })[];
75
- };
76
- defaultConfig: {};
77
- parseConfig: (raw: Record<string, unknown>) => PhiThreadsControllerConfig;
78
- };
79
1
  export declare const PhiThreadsRuntimeControllerClient: (props: import("../../contracts").PhiRuntimeModuleControllerClientProps) => import("react").JSX.Element;
@@ -195,7 +195,7 @@ function PhiThreadsControllerView({ address, config, }) {
195
195
  });
196
196
  return null;
197
197
  }
198
- export const PHI_THREADS_RUNTIME_CONTROLLER_PLUGIN = {
198
+ const PHI_THREADS_RUNTIME_CONTROLLER_PLUGIN = {
199
199
  ...PHI_THREADS_RUNTIME_CONTROLLER_DEFINITION,
200
200
  renderController: ({ key, address, config }) => _jsx(PhiThreadsControllerView, { address: address, config: config }, key),
201
201
  };
@@ -6,6 +6,7 @@ import { definePhiRuntimeModuleForm } from "../../../components/forms/form-regis
6
6
  import { PHI_CMS_AREA_KEYS } from "../../../constants/cms-areas";
7
7
  import { PhisThreadKind } from "../../../constants/threads";
8
8
  import { PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS, PHI_THREADS_RUNTIME_MODULE_ID } from "./ids";
9
+ import { phiFormLabel as label } from "../../../components/forms/form-descriptor-text";
9
10
  export const PHI_THREADS_FORM_IDS = {
10
11
  newConversation: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "threads/new-conversation"),
11
12
  };
@@ -13,7 +14,6 @@ const PHI_THREADS_FORM_HANDLER_KEYS = {
13
14
  newConversation: "site.threads.create",
14
15
  };
15
16
  const LABEL_SET_KEY = "@phis/ui/modules/threads/labels/forms";
16
- const label = (key, fallback) => ({ kind: "label", key, fallback });
17
17
  /**
18
18
  * Opening a conversation, as a declared Form rather than as a panel.
19
19
  *
@@ -14,6 +14,5 @@ export declare const PHI_THREADS_RUNTIME_MODULE_IDENTITY: {
14
14
  * itself.
15
15
  */
16
16
  export declare const PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS: {
17
- readonly inbox: `${string}/${string}`;
18
17
  readonly candidates: `${string}/${string}`;
19
18
  };
@@ -1,5 +1,4 @@
1
1
  import { PHI_SHARED_PACKAGE_NAME } from "../../../types/signals";
2
- import { PHI_THREAD_LIBRARY_DATA_PROVIDER_KEYS } from "../../../constants/thread-library-provider-keys";
3
2
  import { createPhiSharedRuntimeDataProviderKey } from "../../../constants/runtime-data-provider-key";
4
3
  export const PHI_THREADS_RUNTIME_MODULE_ID = `${PHI_SHARED_PACKAGE_NAME}/modules/threads`;
5
4
  /**
@@ -17,7 +16,6 @@ export const PHI_THREADS_RUNTIME_MODULE_IDENTITY = {
17
16
  * itself.
18
17
  */
19
18
  export const PHI_THREADS_RUNTIME_DATA_PROVIDER_KEYS = {
20
- inbox: PHI_THREAD_LIBRARY_DATA_PROVIDER_KEYS.table,
21
19
  // Not a Foundation name: who this viewer may write to is what this Module's own form asks, and a
22
20
  // Module offering its own inbox asks the Core route the same way rather than borrowing this key.
23
21
  candidates: createPhiSharedRuntimeDataProviderKey("options", "thread-candidates"),
@@ -427,7 +427,7 @@ export async function buildPhiDefaultThreadsPageTree({ page, runtime, area, }) {
427
427
  sorting: { mode: "none" },
428
428
  search: { enabled: false },
429
429
  // An inbox goes stale by itself: the messages that change it are written by other people.
430
- tools: { mode: "self-contained", reload: true },
430
+ tools: { mode: "self-contained", reset: false, reload: true },
431
431
  /*
432
432
  * Two of the three filters the resource declares. `kind` is left out deliberately: this
433
433
  * Page is every conversation a person is in, and a Site that wants one kind pins it in the
@@ -474,14 +474,15 @@ export async function buildPhiDefaultThreadsPageTree({ page, runtime, area, }) {
474
474
  * second opinion about it.
475
475
  */
476
476
  /*
477
- * Named rather than drawn. Only one of the two is ever on a row, so there is no column of
478
- * repeated buttons to compress -- and the icon vocabulary has no mark for archiving that
479
- * does not already mean deleting or retiring, which is the one thing this must not say.
477
+ * Drawn, with the name in the tooltip, like every other row action. Archiving is the inbox
478
+ * tray -- put away, not deleted -- and reopening the step back out of it. Only one of the two
479
+ * is ever on a row, so both are icons or the column changes width from row to row.
480
480
  */
481
481
  row: [{
482
482
  key: "archive",
483
483
  label: labels.actions.archive,
484
- display: "label",
484
+ icon: "antd:inbox",
485
+ display: "icon",
485
486
  execution: "provider",
486
487
  confirm: {
487
488
  title: labels.actions.archiveConfirmTitle,
@@ -492,7 +493,8 @@ export async function buildPhiDefaultThreadsPageTree({ page, runtime, area, }) {
492
493
  }, {
493
494
  key: "reopen",
494
495
  label: labels.actions.reopen,
495
- display: "label",
496
+ icon: "antd:rollback",
497
+ display: "icon",
496
498
  execution: "provider",
497
499
  }],
498
500
  },
@@ -1,74 +1 @@
1
- import { type PhiUserManagementControllerConfig } from "../controller/definition";
2
- export declare const PHI_USER_MANAGEMENT_RUNTIME_CONTROLLER_PLUGIN: {
3
- renderController: ({ key, address, runtime, config }: import("../../../../types").PhiRuntimeControllerRenderArgs<PhiUserManagementControllerConfig, unknown>) => import("react").JSX.Element;
4
- kind: "controller";
5
- pluginKey: string;
6
- key: string;
7
- title: string;
8
- description: string;
9
- iconFamily: string;
10
- allowedMountScopes: "page"[];
11
- runtimeSignals: {
12
- emits: ({
13
- id: string;
14
- action: "close";
15
- valueType: "none";
16
- valueSchema?: undefined;
17
- } | {
18
- id: string;
19
- action: "activate";
20
- valueType: "none";
21
- valueSchema?: undefined;
22
- } | {
23
- id: string;
24
- action: "change";
25
- valueType: "boolean";
26
- valueSchema?: undefined;
27
- } | {
28
- id: string;
29
- action: "change";
30
- valueType: "json";
31
- valueSchema: `${string}/signals/${string}`;
32
- } | {
33
- id: string;
34
- action: "activate";
35
- valueType: "json";
36
- valueSchema: `${string}/signals/${string}`;
37
- })[];
38
- listens: ({
39
- id: string;
40
- channel: string;
41
- action: "activate";
42
- valueType: "json";
43
- valueSchema: `${string}/signals/${string}`;
44
- } | {
45
- id: string;
46
- channel: string;
47
- action: "activate";
48
- valueType: "string";
49
- valueSchema?: undefined;
50
- } | {
51
- id: string;
52
- channel: string;
53
- action: "change";
54
- valueType: "boolean";
55
- valueSchema?: undefined;
56
- } | {
57
- id: string;
58
- channel: string;
59
- action: "close";
60
- valueType: "json";
61
- valueSchema: `${string}/signals/${string}`;
62
- } | {
63
- id: string;
64
- channel: string;
65
- action: "reload";
66
- valueType: "none";
67
- })[];
68
- };
69
- defaultConfig: {
70
- signalRoutes: null;
71
- };
72
- parseConfig: (raw: Record<string, unknown>) => PhiUserManagementControllerConfig;
73
- };
74
1
  export declare const PhiUserManagementRuntimeControllerClient: (props: import("../../contracts").PhiRuntimeModuleControllerClientProps) => import("react").JSX.Element;
@@ -178,7 +178,7 @@ function PhiUserManagementControllerView({ address, runtime, config, }) {
178
178
  }, [emitCapability, workflowState]);
179
179
  return null;
180
180
  }
181
- export const PHI_USER_MANAGEMENT_RUNTIME_CONTROLLER_PLUGIN = {
181
+ const PHI_USER_MANAGEMENT_RUNTIME_CONTROLLER_PLUGIN = {
182
182
  ...PHI_USER_MANAGEMENT_RUNTIME_CONTROLLER_DEFINITION,
183
183
  renderController: ({ key, address, runtime, config }) => (_jsx(PhiUserManagementControllerView, { address: address, runtime: runtime, config: config }, key)),
184
184
  };
@@ -6,6 +6,7 @@ import { PHI_SHARED_PACKAGE_NAME } from "../../../types/signals";
6
6
  import { PHI_FORM_FIELD_PROVIDER_KEYS, PHI_FORM_VALIDATION_PROVIDER_KEYS, createPhiSharedFormProviderKey, } from "../../../components/forms/form-provider-contract";
7
7
  import { definePhiRuntimeModuleForm } from "../../../components/forms/form-registry";
8
8
  import { createPhiUserManagementControllerAddress } from "./controller/address";
9
+ import { phiFormLabel as label, phiFormRequired as required } from "../../../components/forms/form-descriptor-text";
9
10
  export const PHI_USER_MANAGEMENT_FORM_IDS = {
10
11
  create: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "user-management/create"),
11
12
  edit: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "user-management/edit"),
@@ -15,7 +16,6 @@ const PHI_USER_MANAGEMENT_FORM_HANDLER_KEYS = {
15
16
  edit: "site.user-management.edit",
16
17
  };
17
18
  const LABEL_SET_KEY = "@phis/ui/modules/user-management/labels/forms";
18
- const label = (key, fallback) => ({ kind: "label", key, fallback });
19
19
  const controllerAddress = createPhiUserManagementControllerAddress();
20
20
  const readOnlyCondition = {
21
21
  source: "controller",
@@ -38,10 +38,6 @@ const selfEnabledCondition = {
38
38
  operator: "truthy",
39
39
  reason: "Your own account cannot be enabled or disabled here.",
40
40
  };
41
- const required = (key, fallback) => [{
42
- providerKey: PHI_FORM_VALIDATION_PROVIDER_KEYS.required,
43
- message: label(key, fallback),
44
- }];
45
41
  const roleOptions = PHI_BASE_ROLE_OPTIONS.map((option) => ({
46
42
  value: option.value,
47
43
  label: label(`role_${option.value}`, option.label),