@phis/ui 0.4.10 → 0.4.13

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 (69) 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/controls/phi-background-control.js +2 -1
  6. package/components/controls/phi-border-control.d.ts +1 -1
  7. package/components/controls/phi-border-control.js +5 -2
  8. package/components/controls/phi-color-control.d.ts +5 -0
  9. package/components/controls/phi-color-control.js +28 -4
  10. package/components/controls/phi-color-field-control.d.ts +3 -1
  11. package/components/controls/phi-color-field-control.js +2 -2
  12. package/components/controls/use-phi-color-control-presets.d.ts +11 -1
  13. package/components/controls/use-phi-color-control-presets.js +20 -1
  14. package/components/forms/auth-admin-settings-labels.d.ts +35 -0
  15. package/components/forms/auth-admin-settings-labels.js +27 -0
  16. package/components/layouts/clients/phi-flex-layout-client.js +7 -1
  17. package/components/root/phi-root-theme-resolver.js +5 -1
  18. package/components/runtime/runtime-controller-server-host.js +20 -9
  19. package/components/shell/phi-antd-icon.d.ts +3 -0
  20. package/components/shell/phi-antd-icon.js +9 -0
  21. package/components/tables/phi-plain-table.d.ts +4 -0
  22. package/components/tables/phi-plain-table.js +1 -1
  23. package/components/widgets/client/shared/phi-widget-tool-buttons.js +1 -1
  24. package/components/widgets/shared/markdown-body-client.d.ts +7 -0
  25. package/components/widgets/shared/markdown-body-client.js +2 -0
  26. package/components/widgets/shared/markdown-render.js +48 -1
  27. package/controls.d.ts +2 -0
  28. package/controls.js +3 -0
  29. package/helpers/cms-region-keys.d.ts +1 -1
  30. package/helpers/page-layout-check.d.ts +17 -0
  31. package/helpers/page-layout-check.js +121 -0
  32. package/helpers.d.ts +1 -0
  33. package/helpers.js +2 -0
  34. package/package.json +2 -2
  35. package/plugins/runtime-modules/auth/data-providers.d.ts +5 -0
  36. package/plugins/runtime-modules/auth/data-providers.js +3 -0
  37. package/plugins/runtime-modules/auth/definition.d.ts +5 -0
  38. package/plugins/runtime-modules/auth/services/installations-table.js +3 -1
  39. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +24 -9
  40. package/plugins/runtime-modules/auth/widgets/security/client.js +5 -1
  41. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +1 -1
  42. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +0 -1
  43. package/plugins/runtime-modules/client-authoring-module.js +18 -1
  44. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
  45. package/plugins/runtime-modules/core/widgets/result/config.d.ts +3 -0
  46. package/plugins/runtime-modules/core/widgets/result/config.js +15 -10
  47. package/plugins/runtime-modules/core/widgets/result/server.js +1 -1
  48. package/plugins/runtime-modules/core/widgets/table/client.js +1 -1
  49. package/plugins/runtime-modules/core/widgets/tree/client.js +1 -1
  50. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +4 -109
  51. package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +2 -2
  52. package/plugins/runtime-modules/preset-contracts/pub-area.js +0 -4
  53. package/plugins/runtime-modules/pub-area-preset.js +0 -20
  54. package/plugins/runtime-modules/public/trees/phi-default-pub-error-page-tree.js +5 -5
  55. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +5 -3
  56. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +8 -6
  57. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +1 -1
  58. package/server-helpers/cms-root.js +21 -13
  59. package/server-helpers/runtime.js +0 -1
  60. package/styles/controls.css +11 -0
  61. package/styles/shell.css +11 -1
  62. package/theme/antd-css-var-contract.d.ts +24 -1
  63. package/theme/antd-css-var-contract.js +33 -1
  64. package/theme/phi-theme-palette.d.ts +6 -0
  65. package/theme/phi-theme-palette.js +13 -0
  66. package/theme/phi-theme-tokens.d.ts +3 -2
  67. package/theme/phi-theme-tokens.js +12 -1
  68. package/types/site-config.d.ts +0 -4
  69. package/types/widget-runtime.d.ts +0 -3
@@ -4,6 +4,7 @@ import { canPhiViewerAccess } from "../../types/access";
4
4
  import { resolvePhiCmsDescriptorCatalog } from "../../plugins/runtime-modules/descriptor-compiler";
5
5
  import { resolvePhiPublicLoginHref } from "../../server-helpers/public-login-route";
6
6
  import { localizeAreaPath } from "../../helpers/locale";
7
+ import { PHI_ALL_RUNTIME_AREA_DEFINITIONS } from "../../plugins/runtime-modules/area-definitions";
7
8
  /**
8
9
  * Refuses an Area root the viewer may not enter, and returns only when they may.
9
10
  *
@@ -37,7 +38,14 @@ export async function guardPhiCmsAreaAccess({ cmsBridge, resolvedRoute, viewer,
37
38
  * until they disagree: a claim this side cannot read, an Area switched off. Then the home Area is
38
39
  * as closed as this one, and forwarding there is a loop rather than a way out.
39
40
  */
40
- const homeDefinition = areaDefinitions.get(viewer.resolvedArea);
41
+ /*
42
+ * The catalog in hand is this Area's own and declares no other Area, so the home Area's policy is
43
+ * read from the Core's list of Areas. Looked up in the catalog alone, every home but this Area was
44
+ * missing, and every viewer without the roles for it was refused rather than sent home -- a member
45
+ * signing in from an Admin address landed on 403 instead of the App.
46
+ */
47
+ const homeDefinition = areaDefinitions.get(viewer.resolvedArea)
48
+ ?? PHI_ALL_RUNTIME_AREA_DEFINITIONS.find((definition) => definition.area === viewer.resolvedArea);
41
49
  if (viewer.resolvedArea === resolvedRoute.area ||
42
50
  !homeDefinition ||
43
51
  !canPhiViewerAccess(viewer, homeDefinition.accessPolicy)) {
@@ -1,10 +1,15 @@
1
1
  import "server-only";
2
2
  import type { PhiCmsSiteBridge } from "../../types/cms-plugins";
3
- export declare function loadPhiCmsAreaRenderScope({ root, path, cmsBridge, }: {
3
+ type PhiCmsAreaRenderScopeInput = {
4
4
  root: string;
5
5
  path?: string[];
6
6
  cmsBridge: PhiCmsSiteBridge;
7
- }): Promise<{
7
+ };
8
+ export declare function loadPhiCmsAreaRenderControllers({ root, path, cmsBridge }: PhiCmsAreaRenderScopeInput): Promise<{
9
+ registeredControllerSettings: import("../../types").PhiRuntimeControllerSetting[] | null;
10
+ controllerDefinitionsByType: Map<any, any>;
11
+ }>;
12
+ export declare function loadPhiCmsAreaRenderScope({ root, path, cmsBridge }: PhiCmsAreaRenderScopeInput): Promise<{
8
13
  rootScope: {
9
14
  resolvedRoute: import("../../server-helpers/cms-route").PhiResolvedRootRoute;
10
15
  request: {
@@ -58,6 +63,5 @@ export declare function loadPhiCmsAreaRenderScope({ root, path, cmsBridge, }: {
58
63
  };
59
64
  filteredLayoutTree: import("../../types").PhiResolvedCmsAreaPresetTree | null;
60
65
  runtimeRegistry: import("../../types/cms-plugins").PhiCmsRuntimeRenderRegistry;
61
- registeredControllerSettings: import("../../types").PhiRuntimeControllerSetting[] | null;
62
- controllerDefinitionsByType: Map<any, any>;
63
66
  }>;
67
+ export {};
@@ -44,6 +44,23 @@ const loadPhiCmsAreaRenderScopeCached = cache(async function loadPhiCmsAreaRende
44
44
  moduleScope: runtimeModuleScope,
45
45
  trees: filteredLayoutTree ? [filteredLayoutTree] : [],
46
46
  });
47
+ return {
48
+ rootScope,
49
+ runtime,
50
+ runtimeModuleScope,
51
+ filteredLayoutTree,
52
+ runtimeRegistry,
53
+ };
54
+ });
55
+ /**
56
+ * The Controllers the Area's own render mounts, and the code that runs them.
57
+ *
58
+ * Kept apart from the scope above because only the Layout that draws the Area needs them. An Overlay
59
+ * opened later asks for the same scope from a request of its own and mounts its own Controllers; it
60
+ * would otherwise load every Area Controller's module to throw the result away.
61
+ */
62
+ const loadPhiCmsAreaRenderControllersCached = cache(async function loadPhiCmsAreaRenderControllersCached(root, pathKey, cmsBridge) {
63
+ const { filteredLayoutTree, runtimeModuleScope } = await loadPhiCmsAreaRenderScopeCached(root, pathKey, cmsBridge);
47
64
  const registeredControllerSettings = filteredLayoutTree
48
65
  ? materializePhiRuntimeControllerSettings({
49
66
  tree: filteredLayoutTree,
@@ -64,16 +81,14 @@ const loadPhiCmsAreaRenderScopeCached = cache(async function loadPhiCmsAreaRende
64
81
  settings: registeredControllerSettings,
65
82
  })
66
83
  : new Map();
67
- return {
68
- rootScope,
69
- runtime,
70
- runtimeModuleScope,
71
- filteredLayoutTree,
72
- runtimeRegistry,
73
- registeredControllerSettings,
74
- controllerDefinitionsByType,
75
- };
84
+ return { registeredControllerSettings, controllerDefinitionsByType };
76
85
  });
77
- export async function loadPhiCmsAreaRenderScope({ root, path, cmsBridge, }) {
78
- return loadPhiCmsAreaRenderScopeCached(root, path?.length ? path.join(PATH_KEY_SEPARATOR) : "", cmsBridge);
86
+ function areaRenderScopePathKey(path) {
87
+ return path?.length ? path.join(PATH_KEY_SEPARATOR) : "";
88
+ }
89
+ export async function loadPhiCmsAreaRenderControllers({ root, path, cmsBridge }) {
90
+ return loadPhiCmsAreaRenderControllersCached(root, areaRenderScopePathKey(path), cmsBridge);
91
+ }
92
+ export async function loadPhiCmsAreaRenderScope({ root, path, cmsBridge }) {
93
+ return loadPhiCmsAreaRenderScopeCached(root, areaRenderScopePathKey(path), cmsBridge);
79
94
  }
@@ -8,7 +8,7 @@ import { PHI_SHELL_HEADER_TOP_EXTENT_PROPERTY, PHI_SHELL_HEADER_TOP_STACK_PROPER
8
8
  import { PhiCmsLayoutRenderer, PhiCmsOverlayRenderer } from "./phi-cms-layout-renderer";
9
9
  import { phiCmsRegionPageScopeIncludes, readPhiCmsRegionPageScope, readPhiCmsRegionReveal, resolvePhiCmsRegionPageScope, } from "../../helpers/region-page-scope";
10
10
  import { hasRenderableRegionRoot } from "./phi-cms-region-helpers";
11
- import { loadPhiCmsAreaRenderScope } from "./phi-cms-area-render-scope";
11
+ import { loadPhiCmsAreaRenderControllers, loadPhiCmsAreaRenderScope } from "./phi-cms-area-render-scope";
12
12
  import { hasPhiCmsRevisionPreview } from "../../server-helpers/cms-root";
13
13
  import { performPhiCmsPageRedirect, resolvePhiCmsPageRedirect } from "./phi-cms-page-redirect";
14
14
  import { rememberPhiAreaRootDoor } from "../../gateway/area-root-door";
@@ -159,13 +159,15 @@ export async function PhiCmsAreaBoundary({ root, cmsBridge, children, path, page
159
159
  activeModuleIds: runtimeModuleScope.moduleSet.activeModuleIds,
160
160
  });
161
161
  }
162
+ // After the guards and the forward: a request that is refused or sent elsewhere loads no Controller.
163
+ const areaControllers = await loadPhiCmsAreaRenderControllers({ root, path: path ?? pagePath, cmsBridge });
162
164
  return (_jsx(PhiSignalRuntimePartitionProvider, { id: `area:${runtime.site.key}:${runtime.area}`, kind: "area", context: { siteKey: runtime.site.key, area: runtime.area }, children: _jsx(PhiRuntimeModuleProvider, { moduleIds: [...runtimeModuleScope.moduleSet.activeModuleIds], widgetTypes: [...runtimeModuleScope.moduleSet.widgetDefinitionsByType.keys()], layoutTypes: [...runtimeModuleScope.moduleSet.layoutDefinitionsByType.keys()], dataProviderDescriptors: runtime.area === "builder"
163
165
  ? [...runtimeModuleScope.moduleSet.dataProviderDescriptorsByKey.values()]
164
166
  : [], calendarAdapterDescriptors: [
165
167
  ...runtimeModuleScope.moduleSet.calendarAdapterDescriptorsByKey.values(),
166
168
  ], videoProviderDescriptors: [
167
169
  ...runtimeModuleScope.moduleSet.videoProviderDescriptorsByKey.values(),
168
- ], children: _jsxs(PhiRuntimeModuleDataProviderHost, { providerKeys: [...scope.runtimeRegistry.dataProviderDescriptorsByKey.keys()], children: [scope.registeredControllerSettings && scope.registeredControllerSettings.length > 0 ? (_jsx(PhiRuntimeControllerServerHost, { controllers: scope.registeredControllerSettings, runtime: runtime, registry: scope.controllerDefinitionsByType, controllerModuleIdsByType: runtimeModuleScope.moduleSet.ownerModuleIdByControllerType, runtimeModuleCatalog: scope.runtimeRegistry.runtimeModuleCatalog, serverCapabilities: scope.runtimeRegistry.serverCapabilities })) : null, children, filteredLayoutTree ? (_jsx(PhiCmsOverlayRenderer, { tree: filteredLayoutTree, runtime: runtime, registry: scope.runtimeRegistry, signalScope: "area", deferredOrigin: { area: runtime.area, root, path: path ?? pagePath ?? null } })) : null] }) }) }));
170
+ ], children: _jsxs(PhiRuntimeModuleDataProviderHost, { providerKeys: [...scope.runtimeRegistry.dataProviderDescriptorsByKey.keys()], children: [areaControllers.registeredControllerSettings && areaControllers.registeredControllerSettings.length > 0 ? (_jsx(PhiRuntimeControllerServerHost, { controllers: areaControllers.registeredControllerSettings, runtime: runtime, registry: areaControllers.controllerDefinitionsByType, controllerModuleIdsByType: runtimeModuleScope.moduleSet.ownerModuleIdByControllerType, runtimeModuleCatalog: scope.runtimeRegistry.runtimeModuleCatalog, serverCapabilities: scope.runtimeRegistry.serverCapabilities })) : null, children, filteredLayoutTree ? (_jsx(PhiCmsOverlayRenderer, { tree: filteredLayoutTree, runtime: runtime, registry: scope.runtimeRegistry, signalScope: "area", deferredOrigin: { area: runtime.area, root, path: path ?? pagePath ?? null } })) : null] }) }) }));
169
171
  }
170
172
  /**
171
173
  * The Area-owned Regions around a Page, or nothing but the grid they share.
@@ -63,7 +63,8 @@ function resolveStoredSolidColor(color) {
63
63
  }
64
64
  export function PhiBackgroundControl({ value, config, disabled = false, mode = "control", labels = PHI_BACKGROUND_WIDGET_DEFAULT_LABELS, colorPickerLabels = PHI_COLOR_PICKER_DEFAULT_LABELS, colorPickerPlacement, motionModes = PHI_BACKGROUND_MOTION_MODES, filters = PHI_BACKGROUND_FILTERS, imageSourceKinds = PHI_BACKGROUND_IMAGE_SOURCE_KINDS, baseKinds = PHI_BACKGROUND_BASE_KINDS, overlay: overlayOffered = true, renderMediaPicker, editTransaction, onChange, }) {
65
65
  const { token } = theme.useToken();
66
- const colorPickerPresets = usePhiColorControlPresets({ labels: colorPickerLabels });
66
+ // A Theme swatch stores its role, so a ground picked from the Theme follows it and the mode.
67
+ const colorPickerPresets = usePhiColorControlPresets({ labels: colorPickerLabels, storeThemeRoles: true });
67
68
  const currentValue = useMemo(() => normalizePhiBackgroundWidgetConfig(value ?? config ?? null), [value, config]);
68
69
  const isDisabled = disabled || !onChange;
69
70
  const colorPickerTransaction = {
@@ -13,4 +13,4 @@ export type PhiBorderControlProps = {
13
13
  colorPickerPlacement?: PhiPickerPlacement;
14
14
  onChange?: (value: PhiCmsBorderWidgetConfig) => void;
15
15
  };
16
- export declare function PhiBorderControl({ value, config, disabled, mode, labels, colorPickerPlacement, onChange, }: PhiBorderControlProps): import("react").JSX.Element;
16
+ export declare function PhiBorderControl({ value, config, disabled, mode, labels, colorPickerLabels, colorPickerPlacement, onChange, }: PhiBorderControlProps): import("react").JSX.Element;
@@ -7,6 +7,7 @@ import { PHI_BORDER_WIDGET_DEFAULT_LABELS, } from "../widgets/label-types/border
7
7
  import { ConfigPreviewShell } from "./config-preview-shell";
8
8
  import { PhiBoundRadiusControl } from "./phi-bound-radius-control";
9
9
  import { PhiColorControl } from "./phi-color-control";
10
+ import { usePhiColorControlPresets } from "./use-phi-color-control-presets";
10
11
  import { PhiCompactGroupControl } from "./phi-compact-group-control";
11
12
  const BORDER_STYLE_OPTIONS = [
12
13
  { value: "solid", label: "Solid" },
@@ -32,8 +33,10 @@ function resolveDisplayBorderColor(color, primaryColor) {
32
33
  }
33
34
  return color;
34
35
  }
35
- export function PhiBorderControl({ value, config, disabled = false, mode = "control", labels = PHI_BORDER_WIDGET_DEFAULT_LABELS, colorPickerPlacement, onChange, }) {
36
+ export function PhiBorderControl({ value, config, disabled = false, mode = "control", labels = PHI_BORDER_WIDGET_DEFAULT_LABELS, colorPickerLabels, colorPickerPlacement, onChange, }) {
36
37
  const { token } = theme.useToken();
38
+ // The Theme's swatches, each storing its role, so a line picked from the Theme follows it and the mode.
39
+ const colorPickerPresets = usePhiColorControlPresets({ labels: colorPickerLabels, storeThemeRoles: true });
37
40
  const currentValue = mergePhiBorderWidgetConfig(config, value);
38
41
  const isDisabled = disabled || !onChange || mode === "preview";
39
42
  const resolvedValue = resolveCurrentValue(currentValue, token.colorPrimary);
@@ -69,7 +72,7 @@ export function PhiBorderControl({ value, config, disabled = false, mode = "cont
69
72
  emit({
70
73
  borderStyle,
71
74
  });
72
- }, style: { width: "58%" } })] }), _jsx(Typography.Text, { children: labels.fields.color }), _jsx(PhiColorControl, { value: displayBorderColor, disabled: isDisabled, mode: "single", placement: colorPickerPlacement, onChange: (resolvedCss) => {
75
+ }, style: { width: "58%" } })] }), _jsx(Typography.Text, { children: labels.fields.color }), _jsx(PhiColorControl, { value: displayBorderColor, disabled: isDisabled, mode: "single", placement: colorPickerPlacement, presets: colorPickerPresets, onChange: (resolvedCss) => {
73
76
  if (resolvedCss == null)
74
77
  return;
75
78
  emit({
@@ -7,6 +7,11 @@ export type PhiColorPickerPreset = {
7
7
  label: string;
8
8
  colors: readonly string[];
9
9
  colorLabels?: readonly string[];
10
+ /**
11
+ * What a swatch stores, where that is not its colour: the Theme role it shows (`PHI_COLOR.primaryBg`,
12
+ * `PHI_COLOR.custom3`). A role follows the Theme and the mode; the colour it showed would stay as it was.
13
+ */
14
+ colorReferences?: readonly string[];
10
15
  defaultOpen?: boolean;
11
16
  };
12
17
  export type PhiColorPickerPresets = readonly PhiColorPickerPreset[];
@@ -7,6 +7,27 @@ import { PhiSelectControl } from "./phi-select-control";
7
7
  import { usePhiImmediatePicker } from "./use-phi-immediate-picker";
8
8
  import { readPhiCssLinearGradient } from "../../helpers/css-linear-gradient";
9
9
  import { joinPhiClassNames } from "../../helpers/class-names";
10
+ /** Every role a set of presets names, with the colour it shows now. */
11
+ function collectPhiColorReferences(presets) {
12
+ const references = new Map();
13
+ for (const preset of presets) {
14
+ preset.colorReferences?.forEach((reference, index) => {
15
+ const color = preset.colors[index];
16
+ if (reference && color)
17
+ references.set(reference, color);
18
+ });
19
+ }
20
+ return references;
21
+ }
22
+ /**
23
+ * A value as the picker can show it: every role in it replaced by the colour it shows now. The value
24
+ * itself keeps the role; only the swatch and the panel need a colour they can parse.
25
+ */
26
+ function resolvePhiColorReferences(value, references) {
27
+ if (!value || references.size === 0 || !value.includes("var("))
28
+ return value;
29
+ return value.replace(/var\(--[a-z0-9-]+\)/giu, (reference) => references.get(reference) ?? reference);
30
+ }
10
31
  const PHI_COLOR_PICKER_CONTENT_WIDTH = 234;
11
32
  /*
12
33
  * A gradient the picker may edit is one a Background can hold: read by the Background's own reader, so
@@ -54,7 +75,9 @@ export function PhiColorControl({ value = null, defaultValue = "#f0f0f0", disabl
54
75
  const selectedPalette = presets.find((preset) => preset.key === paletteKey) ?? presets[0];
55
76
  const selectedPaletteKey = selectedPalette?.key;
56
77
  const selectedPaletteLabel = selectedPalette?.label ?? selectedPaletteKey;
57
- const selectedCssValue = picker.value ?? defaultValue;
78
+ const references = useMemo(() => collectPhiColorReferences(presets), [presets]);
79
+ const storedValue = picker.value ?? defaultValue;
80
+ const selectedCssValue = resolvePhiColorReferences(storedValue, references) ?? defaultValue;
58
81
  /*
59
82
  * A single colour names itself, a gradient cannot.
60
83
  *
@@ -70,7 +93,7 @@ export function PhiColorControl({ value = null, defaultValue = "#f0f0f0", disabl
70
93
  colors: [...preset.colors],
71
94
  defaultOpen: preset.defaultOpen,
72
95
  }));
73
- return (_jsx(ColorPicker, { mode: resolveAntdMode(mode), value: resolveAntdColorValue(picker.value, defaultValue), open: picker.open, disabled: disabled, allowClear: allowClear, trigger: trigger, placement: placement === "auto" ? undefined : placement, size: size, showText: resolvedShowText, presets: antdPresets, getPopupContainer: getPopupContainer, classNames: { popup: { root: joinPhiClassNames("phi-color-widget-popup", popupClassName) } }, styles: {
96
+ return (_jsx(ColorPicker, { mode: resolveAntdMode(mode), value: resolveAntdColorValue(resolvePhiColorReferences(picker.value, references), defaultValue), open: picker.open, disabled: disabled, allowClear: allowClear, trigger: trigger, placement: placement === "auto" ? undefined : placement, size: size, showText: resolvedShowText, presets: antdPresets, getPopupContainer: getPopupContainer, classNames: { popup: { root: joinPhiClassNames("phi-color-widget-popup", popupClassName) } }, styles: {
74
97
  root: {
75
98
  display: "inline-flex",
76
99
  alignItems: "center",
@@ -96,10 +119,11 @@ export function PhiColorControl({ value = null, defaultValue = "#f0f0f0", disabl
96
119
  justifyContent: "space-between",
97
120
  rowGap: token.paddingXXS,
98
121
  }, children: selectedPalette.colors.map((presetColor, index) => {
99
- const selected = presetColor === selectedCssValue;
122
+ const reference = selectedPalette.colorReferences?.[index];
123
+ const selected = reference ? reference === storedValue : presetColor === selectedCssValue;
100
124
  const swatchLabel = selectedPalette.colorLabels?.[index]
101
125
  ?? `${selectedPaletteLabel} ${index + 1}`;
102
- return (_jsx(PhiLabeledControl, { description: `${swatchLabel}: ${presetColor}`, children: _jsx("button", { type: "button", "aria-label": `${swatchLabel}: ${presetColor}`, "aria-pressed": selected, disabled: disabled, onClick: () => picker.changeValue(presetColor), style: {
126
+ return (_jsx(PhiLabeledControl, { description: `${swatchLabel}: ${presetColor}`, children: _jsx("button", { type: "button", "aria-label": `${swatchLabel}: ${presetColor}`, "aria-pressed": selected, disabled: disabled, onClick: () => picker.changeValue(reference ?? presetColor), style: {
103
127
  width: 22,
104
128
  height: 22,
105
129
  padding: 0,
@@ -29,6 +29,8 @@ export type PhiColorFieldControlProps = {
29
29
  onDiscard?: (originalValue: string | null) => void;
30
30
  onClear?: () => void;
31
31
  customColors?: ReadonlyArray<PhiColorControlCustomColor>;
32
+ /** A Theme swatch stores its role instead of its colour (`usePhiColorControlPresets`). */
33
+ storeThemeRoles?: boolean;
32
34
  labels?: PhiColorPickerLabels;
33
35
  onChange?: (value: string, tokenKey?: string) => void;
34
36
  onValueChange?: (value: string | null, tokenKey?: string) => void;
@@ -40,4 +42,4 @@ export type PhiColorFieldControlProps = {
40
42
  * authoring tool buttons. The Color Widget is the Core Module's placement of it, which adds its config
41
43
  * and its signals.
42
44
  */
43
- export declare function PhiColorFieldControl({ label, value, defaultValue: fixedDefaultValue, defaultToken, tokenKey, disabled, mode, showText, placement, allowClear, children, presets, getPopupContainer, popupClassName, renderPanel, onOpenChange, onCommit, onDiscard, onClear, customColors, labels, onChange, onValueChange, }: PhiColorFieldControlProps): import("react").JSX.Element;
45
+ export declare function PhiColorFieldControl({ label, value, defaultValue: fixedDefaultValue, defaultToken, tokenKey, disabled, mode, showText, placement, allowClear, children, presets, getPopupContainer, popupClassName, renderPanel, onOpenChange, onCommit, onDiscard, onClear, customColors, storeThemeRoles, labels, onChange, onValueChange, }: PhiColorFieldControlProps): import("react").JSX.Element;
@@ -15,12 +15,12 @@ import { PhiTypographyControl } from "./phi-typography-control";
15
15
  * authoring tool buttons. The Color Widget is the Core Module's placement of it, which adds its config
16
16
  * and its signals.
17
17
  */
18
- export function PhiColorFieldControl({ label, value, defaultValue: fixedDefaultValue = "#1677ff", defaultToken, tokenKey, disabled = false, mode = "single", showText, placement, allowClear, children, presets, getPopupContainer, popupClassName, renderPanel, onOpenChange, onCommit, onDiscard, onClear, customColors, labels = PHI_COLOR_PICKER_DEFAULT_LABELS, onChange, onValueChange, }) {
18
+ export function PhiColorFieldControl({ label, value, defaultValue: fixedDefaultValue = "#1677ff", defaultToken, tokenKey, disabled = false, mode = "single", showText, placement, allowClear, children, presets, getPopupContainer, popupClassName, renderPanel, onOpenChange, onCommit, onDiscard, onClear, customColors, storeThemeRoles = false, labels = PHI_COLOR_PICKER_DEFAULT_LABELS, onChange, onValueChange, }) {
19
19
  const { token } = usePhiConfig();
20
20
  const tokenValue = defaultToken ? token[defaultToken] : undefined;
21
21
  const defaultValue = typeof tokenValue === "string" ? tokenValue : fixedDefaultValue;
22
22
  const resolvedValue = value?.trim() || defaultValue;
23
- const pickerPresets = usePhiColorControlPresets({ labels, customColors, presets });
23
+ const pickerPresets = usePhiColorControlPresets({ labels, customColors, presets, storeThemeRoles });
24
24
  function publish(nextValue) {
25
25
  if (nextValue == null) {
26
26
  onValueChange?.(null, tokenKey);
@@ -5,8 +5,18 @@ export type PhiColorControlCustomColor = {
5
5
  label: string;
6
6
  value: string;
7
7
  };
8
- export declare function usePhiColorControlPresets({ labels, customColors, presets, }?: {
8
+ /**
9
+ * The colour picker's swatches: the Theme's custom colours, its primary and text ladders, then the fixed
10
+ * palettes.
11
+ *
12
+ * With `storeThemeRoles`, a Theme swatch stores the role it shows (`PHI_COLOR.custom3`,
13
+ * `PHI_COLOR.primaryBg`) rather than its colour, so what an author picks follows the Theme and the mode.
14
+ * Every field that styles content wants that. The Theme workspace does not: it is where those colours are
15
+ * set, and a palette that named its own roles would point at itself.
16
+ */
17
+ export declare function usePhiColorControlPresets({ labels, customColors, presets, storeThemeRoles, }?: {
9
18
  labels?: PhiColorPickerLabels;
10
19
  customColors?: readonly PhiColorControlCustomColor[];
11
20
  presets?: PhiColorPickerPresets;
21
+ storeThemeRoles?: boolean;
12
22
  }): PhiColorPickerPresets;
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { PHI_COLOR } from "../../theme/antd-css-var-contract";
2
3
  import { PHI_THEME_CUSTOM_COLOR_KEYS } from "../../theme/phi-theme-presets";
3
4
  import { createPhiColorPickerPresets } from "../widgets/config/color-picker-presets";
4
5
  import { PHI_COLOR_PICKER_DEFAULT_LABELS, } from "../widgets/label-types/color-picker";
@@ -27,7 +28,20 @@ const PHI_TEXT_COLOR_TOKEN_KEYS = [
27
28
  "colorTextPlaceholder",
28
29
  "colorTextDisabled",
29
30
  ];
30
- export function usePhiColorControlPresets({ labels = PHI_COLOR_PICKER_DEFAULT_LABELS, customColors, presets, } = {}) {
31
+ /** A Theme colour token's role, the custom property Ant Design writes for it: `colorPrimaryBg` → `var(--ant-color-primary-bg)`. */
32
+ function resolvePhiColorTokenReference(tokenKey) {
33
+ return `var(--ant-${tokenKey.replace(/[A-Z]/gu, (letter) => `-${letter.toLowerCase()}`)})`;
34
+ }
35
+ /**
36
+ * The colour picker's swatches: the Theme's custom colours, its primary and text ladders, then the fixed
37
+ * palettes.
38
+ *
39
+ * With `storeThemeRoles`, a Theme swatch stores the role it shows (`PHI_COLOR.custom3`,
40
+ * `PHI_COLOR.primaryBg`) rather than its colour, so what an author picks follows the Theme and the mode.
41
+ * Every field that styles content wants that. The Theme workspace does not: it is where those colours are
42
+ * set, and a palette that named its own roles would point at itself.
43
+ */
44
+ export function usePhiColorControlPresets({ labels = PHI_COLOR_PICKER_DEFAULT_LABELS, customColors, presets, storeThemeRoles = false, } = {}) {
31
45
  const { customColors: publishedThemePalette, token } = usePhiConfig();
32
46
  const resolvedCustomColors = customColors ?? PHI_THEME_CUSTOM_COLOR_KEYS.map((key, index) => ({
33
47
  key,
@@ -43,6 +57,9 @@ export function usePhiColorControlPresets({ labels = PHI_COLOR_PICKER_DEFAULT_LA
43
57
  label: labels.custom,
44
58
  colors: resolvedCustomColors.map((color) => color.value),
45
59
  colorLabels: resolvedCustomColors.map((color) => color.label),
60
+ ...(storeThemeRoles && !customColors
61
+ ? { colorReferences: PHI_THEME_CUSTOM_COLOR_KEYS.map((key) => PHI_COLOR[key]) }
62
+ : {}),
46
63
  defaultOpen: true,
47
64
  }]
48
65
  : []),
@@ -51,12 +68,14 @@ export function usePhiColorControlPresets({ labels = PHI_COLOR_PICKER_DEFAULT_LA
51
68
  label: labels.colors.primary,
52
69
  colors: PHI_PRIMARY_COLOR_TOKEN_KEYS.map((key) => token[key]),
53
70
  colorLabels: [...PHI_PRIMARY_COLOR_TOKEN_KEYS],
71
+ ...(storeThemeRoles ? { colorReferences: PHI_PRIMARY_COLOR_TOKEN_KEYS.map(resolvePhiColorTokenReference) } : {}),
54
72
  },
55
73
  {
56
74
  key: "phi-text",
57
75
  label: labels.colors.text,
58
76
  colors: PHI_TEXT_COLOR_TOKEN_KEYS.map((key) => token[key]),
59
77
  colorLabels: [...PHI_TEXT_COLOR_TOKEN_KEYS],
78
+ ...(storeThemeRoles ? { colorReferences: PHI_TEXT_COLOR_TOKEN_KEYS.map(resolvePhiColorTokenReference) } : {}),
60
79
  },
61
80
  ...resolvedPresets.map((preset) => ({
62
81
  ...preset,
@@ -59,6 +59,41 @@ export declare function getPhiAuthAdminSettingsLabels(options: PhiGlobalTranslat
59
59
  installations: {
60
60
  tableLabel: string;
61
61
  empty: string;
62
+ footer: string;
63
+ columns: {
64
+ key: {
65
+ title: string;
66
+ hint: string;
67
+ };
68
+ enabled: {
69
+ title: string;
70
+ hint: string;
71
+ };
72
+ login: {
73
+ title: string;
74
+ hint: string;
75
+ };
76
+ order: {
77
+ title: string;
78
+ hint: string;
79
+ };
80
+ secret: {
81
+ title: string;
82
+ hint: string;
83
+ };
84
+ validation: {
85
+ title: string;
86
+ hint: string;
87
+ };
88
+ linked: {
89
+ title: string;
90
+ hint: string;
91
+ };
92
+ callback: {
93
+ title: string;
94
+ hint: string;
95
+ };
96
+ };
62
97
  installationKey: string;
63
98
  installationKeyHint: string;
64
99
  installationKeyInvalid: string;
@@ -67,6 +67,22 @@ const PHI_AUTH_ADMIN_SETTINGS_LABEL_SET = definePhiLabelSet({
67
67
  provider_success_title: definePhiMessageLabel("Authentication settings saved."),
68
68
  installations_table_label: "Provider installations",
69
69
  installations_empty: definePhiMessageLabel("No provider installations yet."),
70
+ installations_footer: "%1 installations, %2 offered on login",
71
+ installation_column_key: "Key",
72
+ installation_column_key_hint: definePhiMessageLabel("The installation key: a slug that stays the same, unique on this site."),
73
+ installation_column_enabled: "Active",
74
+ installation_column_enabled_hint: definePhiMessageLabel("Whether the installation may be used at all. Off keeps it configured but refuses every login through it."),
75
+ installation_column_login: "Login",
76
+ installation_column_login_hint: definePhiMessageLabel("Whether the sign-in page offers this provider as a button."),
77
+ installation_column_order: "Order",
78
+ installation_column_order_hint: definePhiMessageLabel("The position of the button among the sign-in methods, lowest first."),
79
+ installation_column_secret_hint: definePhiMessageLabel("Whether a client secret is stored. It is never shown again."),
80
+ installation_column_validation: "Check",
81
+ installation_column_validation_hint: definePhiMessageLabel("The result of the last Test. GitHub offers nothing to test against."),
82
+ installation_column_linked: "Linked",
83
+ installation_column_linked_hint: definePhiMessageLabel("Site members who have signed in through this provider."),
84
+ installation_column_callback: "Callback",
85
+ installation_column_callback_hint: definePhiMessageLabel("The address to register with the provider as its callback URL."),
70
86
  installation_key_label: "Installation key",
71
87
  installation_key_hint: definePhiMessageLabel("Stable lowercase slug, unique per site (for example google-workspace)."),
72
88
  installation_key_invalid: definePhiMessageLabel("Use a lowercase slug of letters, digits, and dashes."),
@@ -142,6 +158,17 @@ export async function getPhiAuthAdminSettingsLabels(options) {
142
158
  installations: {
143
159
  tableLabel: labels.installations_table_label,
144
160
  empty: labels.installations_empty,
161
+ footer: labels.installations_footer,
162
+ columns: {
163
+ key: { title: labels.installation_column_key, hint: labels.installation_column_key_hint },
164
+ enabled: { title: labels.installation_column_enabled, hint: labels.installation_column_enabled_hint },
165
+ login: { title: labels.installation_column_login, hint: labels.installation_column_login_hint },
166
+ order: { title: labels.installation_column_order, hint: labels.installation_column_order_hint },
167
+ secret: { title: labels.installation_secret_label, hint: labels.installation_column_secret_hint },
168
+ validation: { title: labels.installation_column_validation, hint: labels.installation_column_validation_hint },
169
+ linked: { title: labels.installation_column_linked, hint: labels.installation_column_linked_hint },
170
+ callback: { title: labels.installation_column_callback, hint: labels.installation_column_callback_hint },
171
+ },
145
172
  installationKey: labels.installation_key_label,
146
173
  installationKeyHint: labels.installation_key_hint,
147
174
  installationKeyInvalid: labels.installation_key_invalid,
@@ -129,7 +129,13 @@ export function PhiFlexLayout({ slots, ...layoutProps }) {
129
129
  flexBasis: "auto",
130
130
  ...collapsedStyle,
131
131
  width: shouldFillCrossAxis ? "100%" : undefined,
132
- height: shouldFillMainAxis ? "100%" : undefined,
132
+ /*
133
+ * No `height: 100%` on the main axis: filling it is `flex-grow`'s job. A percentage here is
134
+ * the flex basis, and once the column's height is known -- the sum of its slots' content,
135
+ * from the intrinsic pass -- every filling slot would start at the whole column and be
136
+ * shrunk back in equal shares, cutting each below its content so it ran into the next.
137
+ * From content, a slot only grows into room that is left over.
138
+ */
133
139
  minWidth: 0,
134
140
  minHeight: 0,
135
141
  alignSelf: shouldFillCrossAxis ? "stretch" : undefined,
@@ -6,6 +6,7 @@ import { mergePhiThemePalettes, PHI_THEME_PALETTE_MODE_SEED_KEYS, resolvePhiThem
6
6
  import { assertPhiThemeVocabulary } from "../../theme/phi-theme-tokens";
7
7
  import { applyPhiButtonShadowComponentTokens } from "../../theme/phi-button-shadow";
8
8
  import { buildPhiThemeGradientTokens, readPhiThemeGradientKey } from "../../theme/phi-theme-gradients";
9
+ import { buildPhiThemeCustomColorTokens } from "../../theme/phi-theme-palette";
9
10
  import { applyPhiControlShapeComponentTokens, applyPhiSurfaceShapeComponentTokens, resolvePhiControlShape, } from "../../theme/phi-control-shape";
10
11
  const PHI_DEFAULT_DARK_NAV_BACKGROUND = "#001529";
11
12
  function mergeComponentThemes(defaults, overrides) {
@@ -85,10 +86,13 @@ export function resolvePhiRootTheme({ siteTheme, mode, fonts, presets, }) {
85
86
  * this mode's class like every other token (theme/phi-theme-gradients.ts). Derived from the resolved
86
87
  * colours, so a slot the palette leaves out follows the brand.
87
88
  */
89
+ const mergedPalette = mergePhiThemePalettes(themePreset.palette, siteTheme?.palette);
88
90
  const token = {
89
91
  ...effectiveThemeTokens,
92
+ // The custom colours ride the same way, so a config names one by its role (`PHI_COLOR.custom1`).
93
+ ...buildPhiThemeCustomColorTokens(mergedPalette, mode),
90
94
  ...buildPhiThemeGradientTokens({
91
- gradients: mergePhiThemePalettes(themePreset.palette, siteTheme?.palette).modes?.[mode]?.gradients,
95
+ gradients: mergedPalette.modes?.[mode]?.gradients,
92
96
  token: effectiveThemeTokens,
93
97
  primaryButtonGradient: readPhiThemeGradientKey(siteTheme?.buttons?.primaryGradient),
94
98
  }),
@@ -7,6 +7,8 @@ export async function resolvePhiRuntimeControllerPreloads({ controllers, runtime
7
7
  const activeControllers = [];
8
8
  const preloadDataByAddress = {};
9
9
  const seenAddresses = new Set();
10
+ // Started only once every mount has been checked, so a refused mount leaves no preload running.
11
+ const preloads = [];
10
12
  for (const setting of controllers ?? []) {
11
13
  const definition = registry.get(setting.type);
12
14
  if (!definition) {
@@ -29,18 +31,27 @@ export async function resolvePhiRuntimeControllerPreloads({ controllers, runtime
29
31
  continue;
30
32
  }
31
33
  const parsedConfig = parsePhiRuntimeControllerConfig(definition, setting.config);
32
- preloadDataByAddress[address] = await definition.serverPreload({
33
- key: definition.key,
34
- instanceKey,
34
+ const serverPreload = definition.serverPreload;
35
+ preloads.push({
35
36
  address,
36
- mountScope: setting.mountScope,
37
- runtime,
38
- runtimeModuleCatalog,
39
- serverCapabilities,
40
- setting: resolvedSetting,
41
- config: parsedConfig,
37
+ load: () => serverPreload({
38
+ key: definition.key,
39
+ instanceKey,
40
+ address,
41
+ mountScope: setting.mountScope,
42
+ runtime,
43
+ runtimeModuleCatalog,
44
+ serverCapabilities,
45
+ setting: resolvedSetting,
46
+ config: parsedConfig,
47
+ }),
42
48
  });
43
49
  }
50
+ // Controllers do not read each other's preload, so the reads run together; the map keeps mount order.
51
+ const loaded = await Promise.all(preloads.map((entry) => entry.load()));
52
+ preloads.forEach((entry, index) => {
53
+ preloadDataByAddress[entry.address] = loaded[index];
54
+ });
44
55
  return {
45
56
  controllers: activeControllers,
46
57
  preloadDataByAddress,
@@ -16,6 +16,7 @@ declare const PHI_ANTD_ICON_LOADERS: {
16
16
  readonly BranchesOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/BranchesOutlined")>;
17
17
  readonly CalendarOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/CalendarOutlined")>;
18
18
  readonly CheckOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/CheckOutlined")>;
19
+ readonly ClearOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/ClearOutlined")>;
19
20
  readonly CloseOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/CloseOutlined")>;
20
21
  readonly CloudDownloadOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/CloudDownloadOutlined")>;
21
22
  readonly CloudUploadOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/CloudUploadOutlined")>;
@@ -54,6 +55,7 @@ declare const PHI_ANTD_ICON_LOADERS: {
54
55
  readonly HolderOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/HolderOutlined")>;
55
56
  readonly HomeOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/HomeOutlined")>;
56
57
  readonly IdcardOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/IdcardOutlined")>;
58
+ readonly InboxOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/InboxOutlined")>;
57
59
  readonly InfoCircleOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/InfoCircleOutlined")>;
58
60
  readonly LayoutOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/LayoutOutlined")>;
59
61
  readonly LeftOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/LeftOutlined")>;
@@ -80,6 +82,7 @@ declare const PHI_ANTD_ICON_LOADERS: {
80
82
  readonly RedoOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/RedoOutlined")>;
81
83
  readonly ReloadOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/ReloadOutlined")>;
82
84
  readonly RightOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/RightOutlined")>;
85
+ readonly RollbackOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/RollbackOutlined")>;
83
86
  readonly SafetyCertificateOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/SafetyCertificateOutlined")>;
84
87
  readonly SaveOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/SaveOutlined")>;
85
88
  readonly SearchOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/SearchOutlined")>;
@@ -37,6 +37,7 @@ const PHI_ANTD_ICON_LOADERS = {
37
37
  BranchesOutlined: () => import("@ant-design/icons-svg/es/asn/BranchesOutlined"),
38
38
  CalendarOutlined: () => import("@ant-design/icons-svg/es/asn/CalendarOutlined"),
39
39
  CheckOutlined: () => import("@ant-design/icons-svg/es/asn/CheckOutlined"),
40
+ ClearOutlined: () => import("@ant-design/icons-svg/es/asn/ClearOutlined"),
40
41
  CloseOutlined: () => import("@ant-design/icons-svg/es/asn/CloseOutlined"),
41
42
  CloudDownloadOutlined: () => import("@ant-design/icons-svg/es/asn/CloudDownloadOutlined"),
42
43
  CloudUploadOutlined: () => import("@ant-design/icons-svg/es/asn/CloudUploadOutlined"),
@@ -75,6 +76,7 @@ const PHI_ANTD_ICON_LOADERS = {
75
76
  HolderOutlined: () => import("@ant-design/icons-svg/es/asn/HolderOutlined"),
76
77
  HomeOutlined: () => import("@ant-design/icons-svg/es/asn/HomeOutlined"),
77
78
  IdcardOutlined: () => import("@ant-design/icons-svg/es/asn/IdcardOutlined"),
79
+ InboxOutlined: () => import("@ant-design/icons-svg/es/asn/InboxOutlined"),
78
80
  InfoCircleOutlined: () => import("@ant-design/icons-svg/es/asn/InfoCircleOutlined"),
79
81
  LayoutOutlined: () => import("@ant-design/icons-svg/es/asn/LayoutOutlined"),
80
82
  LeftOutlined: () => import("@ant-design/icons-svg/es/asn/LeftOutlined"),
@@ -101,6 +103,7 @@ const PHI_ANTD_ICON_LOADERS = {
101
103
  RedoOutlined: () => import("@ant-design/icons-svg/es/asn/RedoOutlined"),
102
104
  ReloadOutlined: () => import("@ant-design/icons-svg/es/asn/ReloadOutlined"),
103
105
  RightOutlined: () => import("@ant-design/icons-svg/es/asn/RightOutlined"),
106
+ RollbackOutlined: () => import("@ant-design/icons-svg/es/asn/RollbackOutlined"),
104
107
  SafetyCertificateOutlined: () => import("@ant-design/icons-svg/es/asn/SafetyCertificateOutlined"),
105
108
  SaveOutlined: () => import("@ant-design/icons-svg/es/asn/SaveOutlined"),
106
109
  SearchOutlined: () => import("@ant-design/icons-svg/es/asn/SearchOutlined"),
@@ -200,6 +203,8 @@ export const PHI_ANTD_ICON_NAMES = {
200
203
  "branches-outlined": "BranchesOutlined",
201
204
  check: "CheckOutlined",
202
205
  "check-outlined": "CheckOutlined",
206
+ // Only the long name: a bare `clear` already means the close mark on a Button (phi-button-icons.tsx).
207
+ "clear-outlined": "ClearOutlined",
203
208
  close: "CloseOutlined",
204
209
  "close-outlined": "CloseOutlined",
205
210
  code: "CodeOutlined",
@@ -342,10 +347,14 @@ export const PHI_ANTD_ICON_NAMES = {
342
347
  "link-outlined": "LinkOutlined",
343
348
  minus: "MinusOutlined",
344
349
  "minus-outlined": "MinusOutlined",
350
+ inbox: "InboxOutlined",
351
+ "inbox-outlined": "InboxOutlined",
345
352
  redo: "RedoOutlined",
346
353
  "redo-outlined": "RedoOutlined",
347
354
  reload: "ReloadOutlined",
348
355
  "reload-outlined": "ReloadOutlined",
356
+ rollback: "RollbackOutlined",
357
+ "rollback-outlined": "RollbackOutlined",
349
358
  save: "SaveOutlined",
350
359
  "save-outlined": "SaveOutlined",
351
360
  search: "SearchOutlined",
@@ -4,6 +4,10 @@ export type PhiPlainTableColumn = {
4
4
  key: string;
5
5
  title: ReactNode;
6
6
  align?: PhiPlainTableAlign;
7
+ /** The column's width, a CSS length such as `30%`; absent, the browser shares the row out by content. */
8
+ width?: string;
9
+ /** Keep the column's cells on one line; the column then takes the width of its longest entry. */
10
+ nowrap?: boolean;
7
11
  };
8
12
  export type PhiPlainTableRow = {
9
13
  key: string;