@phis/ui 0.4.23 → 0.5.1

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 (125) hide show
  1. package/components/controls/phi-background-control.js +1 -1
  2. package/components/controls/phi-breadcrumb-control.d.ts +2 -0
  3. package/components/controls/phi-button-control.d.ts +7 -1
  4. package/components/media/media-asset-typed-fields.d.ts +10 -0
  5. package/components/media/media-asset-typed-fields.js +19 -0
  6. package/components/media/media-settings-labels.d.ts +33 -0
  7. package/components/media/media-settings-labels.js +62 -0
  8. package/components/media/media-upload-flow.d.ts +19 -0
  9. package/components/media/media-upload-flow.js +38 -0
  10. package/components/media/phi-asset-focal-rect-widget.js +2 -2
  11. package/components/media/phi-asset-folder-control.js +1 -1
  12. package/components/media/phi-image-inspector-widget.js +1 -1
  13. package/components/media/phi-image-preview-data.js +5 -4
  14. package/components/media/phi-site-font-assets.js +2 -5
  15. package/components/media/use-authoring-asset-details.js +0 -1
  16. package/components/regions/presets/content-entry-editor-page-tree.js +1 -1
  17. package/components/regions/presets/navigation-redirect.d.ts +2 -2
  18. package/components/regions/presets/navigation-redirect.js +3 -3
  19. package/components/regions/presets/phi-area-shell-preset-nodes.js +2 -1
  20. package/components/regions/presets/phi-settings-page-shell-tree.js +1 -1
  21. package/components/shell/phi-antd-icon.d.ts +4 -0
  22. package/components/shell/phi-antd-icon.js +8 -0
  23. package/components/shell/phi-icon.d.ts +18 -0
  24. package/components/shell/phi-icon.js +50 -3
  25. package/components/widgets/client/shared/phi-button-icons.d.ts +7 -0
  26. package/components/widgets/client/shared/phi-button-icons.js +15 -67
  27. package/components/widgets/helpers/internal-reference-resolver.server.d.ts +1 -1
  28. package/components/widgets/helpers/internal-reference-resolver.server.js +4 -0
  29. package/components/widgets/label-sets/builder-modules.js +6 -0
  30. package/components/widgets/label-types/builder-modules.d.ts +4 -0
  31. package/components/widgets/label-types/builder-modules.js +3 -0
  32. package/components/widgets/label-types/common-controls.js +12 -12
  33. package/constants/runtime-module-ownership.js +4 -0
  34. package/gateway/internal-references.d.ts +5 -0
  35. package/gateway/internal-references.js +12 -12
  36. package/gateway/site-media-settings.d.ts +2 -0
  37. package/gateway/site-media-settings.js +6 -1
  38. package/gateway/site-media-storage-reader.d.ts +19 -0
  39. package/gateway/site-media-storage-reader.js +24 -0
  40. package/helpers/cms-navigation-catalog.d.ts +2 -0
  41. package/helpers/cms-navigation-catalog.js +1 -0
  42. package/helpers/cms-page-catalog.d.ts +12 -0
  43. package/helpers/cms-page-catalog.js +5 -0
  44. package/helpers/phi-seo.d.ts +16 -2
  45. package/helpers/phi-seo.js +54 -11
  46. package/helpers/public-route-claims.d.ts +4 -0
  47. package/helpers/public-route-claims.js +1 -1
  48. package/next/seo-routes.d.ts +1 -1
  49. package/next/seo-routes.js +23 -5
  50. package/package.json +1 -1
  51. package/plugins/runtime-modules/accounting/presets.d.ts +10 -1
  52. package/plugins/runtime-modules/accounting/presets.js +25 -8
  53. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-area-preset-tree.d.ts +6 -0
  54. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-area-preset-tree.js +53 -0
  55. package/plugins/runtime-modules/area-definitions.d.ts +123 -12
  56. package/plugins/runtime-modules/area-definitions.js +28 -0
  57. package/plugins/runtime-modules/asset/client-data-providers.js +12 -0
  58. package/plugins/runtime-modules/asset/controller/runtime.js +1 -1
  59. package/plugins/runtime-modules/asset/data-providers.d.ts +27 -2
  60. package/plugins/runtime-modules/asset/data-providers.js +56 -0
  61. package/plugins/runtime-modules/asset/definition.d.ts +38 -2
  62. package/plugins/runtime-modules/asset/definition.js +2 -1
  63. package/plugins/runtime-modules/asset/ids.d.ts +4 -0
  64. package/plugins/runtime-modules/asset/ids.js +4 -0
  65. package/plugins/runtime-modules/asset/server.js +2 -1
  66. package/plugins/runtime-modules/asset/services/options.d.ts +7 -0
  67. package/plugins/runtime-modules/asset/services/options.js +38 -0
  68. package/plugins/runtime-modules/asset/services/storage-spaces-table.d.ts +3 -0
  69. package/plugins/runtime-modules/asset/services/storage-spaces-table.js +89 -0
  70. package/plugins/runtime-modules/asset/settings-forms.d.ts +17 -0
  71. package/plugins/runtime-modules/asset/settings-forms.js +117 -1
  72. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +94 -1
  73. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +1 -1
  74. package/plugins/runtime-modules/builder/area-shell-presets.server.d.ts +8 -0
  75. package/plugins/runtime-modules/builder/area-shell-presets.server.js +13 -0
  76. package/plugins/runtime-modules/builder/controller/page-controller-helpers.js +1 -1
  77. package/plugins/runtime-modules/builder/controller/page-controller.d.ts +1 -1
  78. package/plugins/runtime-modules/builder/controller/page-controller.js +30 -3
  79. package/plugins/runtime-modules/builder/controller/server-definition.d.ts +7 -1
  80. package/plugins/runtime-modules/builder/controller/server-definition.js +8 -3
  81. package/plugins/runtime-modules/builder/data-providers.js +1 -0
  82. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +2 -0
  83. package/plugins/runtime-modules/builder/navigation-path-context.js +7 -3
  84. package/plugins/runtime-modules/builder/options-providers.js +2 -2
  85. package/plugins/runtime-modules/builder/page-address-rule.d.ts +39 -0
  86. package/plugins/runtime-modules/builder/page-address-rule.js +62 -0
  87. package/plugins/runtime-modules/builder/page-meta-form.js +10 -0
  88. package/plugins/runtime-modules/builder/public-route-collisions.js +7 -2
  89. package/plugins/runtime-modules/builder/services/page-source-tree.js +2 -1
  90. package/plugins/runtime-modules/builder/services/runtime-modules-table.js +49 -1
  91. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +2 -2
  92. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +16 -4
  93. package/plugins/runtime-modules/core/widgets/breadcrumb/client.d.ts +14 -2
  94. package/plugins/runtime-modules/core/widgets/breadcrumb/client.js +35 -4
  95. package/plugins/runtime-modules/core/widgets/breadcrumb/server.d.ts +3 -1
  96. package/plugins/runtime-modules/core/widgets/breadcrumb/server.js +37 -2
  97. package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
  98. package/plugins/runtime-modules/core/widgets/image/client.js +1 -1
  99. package/plugins/runtime-modules/core/widgets/image/editor.js +1 -1
  100. package/plugins/runtime-modules/core/widgets/page-title/authoring.js +3 -1
  101. package/plugins/runtime-modules/core/widgets/page-title/client.d.ts +3 -1
  102. package/plugins/runtime-modules/core/widgets/page-title/client.js +5 -1
  103. package/plugins/runtime-modules/core/widgets/page-title/config.d.ts +25 -3
  104. package/plugins/runtime-modules/core/widgets/page-title/config.js +24 -3
  105. package/plugins/runtime-modules/core/widgets/page-title/plugin.js +1 -1
  106. package/plugins/runtime-modules/core/widgets/page-title/server.d.ts +3 -1
  107. package/plugins/runtime-modules/core/widgets/page-title/server.js +4 -3
  108. package/plugins/runtime-modules/core/widgets/table/client.js +1 -1
  109. package/plugins/runtime-modules/core/widgets/table/config.js +9 -0
  110. package/plugins/runtime-modules/descriptor-compiler.js +33 -8
  111. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +1 -1
  112. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +1 -1
  113. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +1 -1
  114. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +1 -1
  115. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +2 -2
  116. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +1 -1
  117. package/server-helpers/cms-review-params.d.ts +25 -0
  118. package/server-helpers/cms-review-params.js +54 -0
  119. package/server-helpers/cms-review.d.ts +1 -25
  120. package/server-helpers/cms-review.js +2 -54
  121. package/styles/controls.css +11 -0
  122. package/types/cms-module-descriptors.d.ts +33 -3
  123. package/types/media.d.ts +6 -2
  124. package/types/table-widget.d.ts +11 -0
  125. package/types.d.ts +1 -1
@@ -1,6 +1,41 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { PhiCmsWidgetType } from "../../../../../constants/cms-widget-types";
3
3
  import { PhiRuntimeModuleRenderClientHost } from "../../../../../components/runtime/runtime-module-render-client-manifest";
4
- export function PhiBreadcrumbWidget(props) {
5
- return (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiCmsWidgetType.Breadcrumb, componentProps: { ...props } }));
4
+ import { fetchSiteNavigationFolderTarget } from "../../../../../gateway/site-nav";
5
+ import { readPhiServerApiCredentials } from "../../../../../helpers/phis-server-credentials";
6
+ /** The folders a Page path lies in, outermost first: `/docs/guides/a` gives `/docs` and `/docs/guides`. */
7
+ export function listPhiBreadcrumbFolderPaths(pagePath) {
8
+ const segments = pagePath.split("/").filter(Boolean);
9
+ return segments.slice(0, -1).map((_segment, index) => `/${segments.slice(0, index + 1).join("/")}`);
10
+ }
11
+ /**
12
+ * Which folders of the Page's path lead somewhere, so the client links exactly those.
13
+ *
14
+ * A folder segment is a link when its folder address resolves to a Page (REFERENCES.md, "Folder
15
+ * addresses"); one that resolves to nothing would be a link into a 404. Asked once per folder of the
16
+ * path, which is the depth of the path and not the size of the Site, and only when the trail shows the
17
+ * path at all. A failed lookup leaves that segment unlinked rather than failing the trail.
18
+ */
19
+ async function resolveLinkedFolderPaths(props) {
20
+ const { config, runtime } = props;
21
+ const pagePath = runtime?.page?.path;
22
+ if (!pagePath || !runtime?.site?.key || config?.showPath === false || config?.pathLabel?.trim()) {
23
+ return [];
24
+ }
25
+ const folders = listPhiBreadcrumbFolderPaths(pagePath);
26
+ if (folders.length === 0)
27
+ return [];
28
+ const { apiBaseUrl, internalToken } = readPhiServerApiCredentials();
29
+ const answers = await Promise.all(folders.map((path) => fetchSiteNavigationFolderTarget({
30
+ apiBaseUrl,
31
+ internalToken,
32
+ siteKey: runtime.site.key,
33
+ area: String(runtime.area),
34
+ path,
35
+ }).catch(() => null)));
36
+ return folders.filter((_path, index) => answers[index] != null);
37
+ }
38
+ export async function PhiBreadcrumbWidget(props) {
39
+ const linkedFolderPaths = await resolveLinkedFolderPaths(props);
40
+ return (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiCmsWidgetType.Breadcrumb, componentProps: { ...props, pagePath: props.runtime?.page?.path ?? null, linkedFolderPaths } }));
6
41
  }
@@ -124,7 +124,7 @@ export function PhiCardWidgetEditor({ config, onChange }) {
124
124
  deliveryRevision: asset?.deliveryRevision,
125
125
  originalUrl: assetId == null ? null : buildPhiMediaAssetContentDeliveryUrl(assetId),
126
126
  sourceUrl: config.sourceKind === "url" ? config.sourceUrl : undefined,
127
- focalRect: asset?.meta?.focalRect,
127
+ focalRect: asset?.focalRect,
128
128
  sourceWidth: asset?.width,
129
129
  sourceHeight: asset?.height,
130
130
  });
@@ -41,7 +41,7 @@ export function PhiImageWidget({ labels, config, resolvedAsset, focalRect, autho
41
41
  deliveryRevision: resolvedAsset?.deliveryRevision,
42
42
  originalUrl: resolvedAsset?.deliveryUrl,
43
43
  sourceUrl: configSourceUrl,
44
- focalRect: focalRect ?? resolvedAsset?.meta?.focalRect,
44
+ focalRect: focalRect ?? resolvedAsset?.focalRect,
45
45
  fit: config?.fit,
46
46
  objectPosition: config?.objectPosition,
47
47
  sourceWidth: resolvedAsset?.width,
@@ -55,7 +55,7 @@ export function PhiImageWidgetEditor({ config, onChange }) {
55
55
  onChange,
56
56
  ]);
57
57
  const overlaySize = formatImageEditorOverlaySize(config, resolvedAssetDetails, config?.imageSize?.width ?? resolvedAssetDetails?.width, config?.imageSize?.height ?? resolvedAssetDetails?.height);
58
- return (_jsxs("div", { style: { position: "relative", display: "inline-block", maxWidth: "100%" }, children: [_jsx(PhiImageWidget, { labels: PHI_IMAGE_WIDGET_DEFAULT_LABELS, config: config ?? undefined, resolvedAsset: resolvedAssetDetails, focalRect: resolvedAssetDetails?.meta?.focalRect ?? null }), assetId != null ? (_jsxs(PhiTypographyControl, { style: {
58
+ return (_jsxs("div", { style: { position: "relative", display: "inline-block", maxWidth: "100%" }, children: [_jsx(PhiImageWidget, { labels: PHI_IMAGE_WIDGET_DEFAULT_LABELS, config: config ?? undefined, resolvedAsset: resolvedAssetDetails, focalRect: resolvedAssetDetails?.focalRect ?? null }), assetId != null ? (_jsxs(PhiTypographyControl, { style: {
59
59
  position: "absolute",
60
60
  top: "0.375rem",
61
61
  right: "0.375rem",
@@ -5,5 +5,7 @@ import { PHI_PAGE_TITLE_WIDGET_DEFAULT_LABELS } from "../../../../../components/
5
5
  import { PhiTypographyControl } from "../../../../../components/controls/phi-typography-control";
6
6
  export const PHI_PAGE_TITLE_WIDGET_BUILDER_PLUGIN = {
7
7
  ...PHI_PAGE_TITLE_WIDGET_DEFINITION,
8
- renderEditor: () => (_jsx(PhiTypographyControl, { presentation: "title", level: 5, style: { margin: 0, whiteSpace: "nowrap" }, children: PHI_PAGE_TITLE_WIDGET_DEFAULT_LABELS.editorPlaceholder })),
8
+ renderEditor: ({ config }) => (config.display === "heading"
9
+ ? (_jsx(PhiTypographyControl, { presentation: "title", level: 1, style: { margin: 0, textAlign: "center" }, children: PHI_PAGE_TITLE_WIDGET_DEFAULT_LABELS.editorPlaceholder }))
10
+ : (_jsx(PhiTypographyControl, { presentation: "title", level: 5, style: { margin: 0, whiteSpace: "nowrap" }, children: PHI_PAGE_TITLE_WIDGET_DEFAULT_LABELS.editorPlaceholder }))),
9
11
  };
@@ -1,5 +1,7 @@
1
+ import type { PhiPageTitleWidgetDisplay } from "./config";
1
2
  export type PhiPageTitleWidgetClientProps = {
2
3
  initialTitle: string;
3
4
  area?: string | null;
5
+ display: PhiPageTitleWidgetDisplay;
4
6
  };
5
- export declare function PhiPageTitleWidgetClient({ initialTitle, area, }: PhiPageTitleWidgetClientProps): import("react").JSX.Element;
7
+ export declare function PhiPageTitleWidgetClient({ initialTitle, area, display, }: PhiPageTitleWidgetClientProps): import("react").JSX.Element;
@@ -4,7 +4,8 @@ import { useState } from "react";
4
4
  import { usePhiSignalListener } from "../../../../../components/runtime/runtime-signal-bus";
5
5
  import { resolvePhiPageTitleSignalValue } from "../../../../../components/widgets/signals/page-title-signals";
6
6
  import { createPhiCoreRuntimeControllerAddress } from "../../../../../components/runtime/core-runtime-controller-address";
7
- export function PhiPageTitleWidgetClient({ initialTitle, area, }) {
7
+ import { PhiTypographyControl } from "../../../../../components/controls/phi-typography-control";
8
+ export function PhiPageTitleWidgetClient({ initialTitle, area, display, }) {
8
9
  const [state, setState] = useState(() => ({
9
10
  source: initialTitle,
10
11
  value: initialTitle,
@@ -39,6 +40,9 @@ export function PhiPageTitleWidgetClient({ initialTitle, area, }) {
39
40
  channels: ["pageMeta", "pageTitle"],
40
41
  receiver: "broadcast",
41
42
  });
43
+ if (display === "heading") {
44
+ return (_jsx(PhiTypographyControl, { presentation: "title", level: 1, style: { margin: 0, textAlign: "center" }, children: title }));
45
+ }
42
46
  return (_jsx("div", { style: {
43
47
  fontSize: "1.25rem",
44
48
  fontWeight: 600,
@@ -1,5 +1,16 @@
1
- export type PhiPageTitleWidgetConfig = Record<string, never>;
2
- declare function parsePhiPageTitleWidgetConfig(): PhiPageTitleWidgetConfig;
1
+ /**
2
+ * How the title stands.
3
+ *
4
+ * `heading` is the Page's own heading: its one `h1`, on the type scale, wrapping, centred. `label` is the
5
+ * title as a caption in a bar -- the Shell's header -- where a heading would give the page a second `h1`
6
+ * and the bar a line break.
7
+ */
8
+ export declare const PHI_PAGE_TITLE_WIDGET_DISPLAYS: readonly ["heading", "label"];
9
+ export type PhiPageTitleWidgetDisplay = (typeof PHI_PAGE_TITLE_WIDGET_DISPLAYS)[number];
10
+ export type PhiPageTitleWidgetConfig = {
11
+ display: PhiPageTitleWidgetDisplay;
12
+ };
13
+ declare function parsePhiPageTitleWidgetConfig(config: Record<string, unknown>): PhiPageTitleWidgetConfig;
3
14
  export declare const PHI_PAGE_TITLE_WIDGET_DEFINITION: {
4
15
  kind: "widget";
5
16
  pluginKey: string;
@@ -9,7 +20,18 @@ export declare const PHI_PAGE_TITLE_WIDGET_DEFINITION: {
9
20
  category: "content";
10
21
  description: string;
11
22
  iconFamily: string;
12
- fields: never[];
23
+ fields: {
24
+ key: string;
25
+ type: "choice";
26
+ label: string;
27
+ options: {
28
+ value: string;
29
+ label: string;
30
+ }[];
31
+ }[];
32
+ defaultConfig: {
33
+ display: "heading";
34
+ };
13
35
  parseConfig: typeof parsePhiPageTitleWidgetConfig;
14
36
  };
15
37
  export {};
@@ -1,6 +1,16 @@
1
1
  import { resolvePhiCmsWidgetPluginKey } from "../../../../../constants/cms-widget-types";
2
- function parsePhiPageTitleWidgetConfig() {
3
- return {};
2
+ import { createPhiConfigReader } from "../../../../../components/widgets/config/strict-config-reader";
3
+ /**
4
+ * How the title stands.
5
+ *
6
+ * `heading` is the Page's own heading: its one `h1`, on the type scale, wrapping, centred. `label` is the
7
+ * title as a caption in a bar -- the Shell's header -- where a heading would give the page a second `h1`
8
+ * and the bar a line break.
9
+ */
10
+ export const PHI_PAGE_TITLE_WIDGET_DISPLAYS = ["heading", "label"];
11
+ function parsePhiPageTitleWidgetConfig(config) {
12
+ const reader = createPhiConfigReader(config);
13
+ return { display: reader.oneOf("display", PHI_PAGE_TITLE_WIDGET_DISPLAYS) ?? "heading" };
4
14
  }
5
15
  export const PHI_PAGE_TITLE_WIDGET_DEFINITION = {
6
16
  kind: "widget",
@@ -11,6 +21,17 @@ export const PHI_PAGE_TITLE_WIDGET_DEFINITION = {
11
21
  category: "content",
12
22
  description: "Displays the current localized CMS page title from runtime metadata.",
13
23
  iconFamily: "basic",
14
- fields: [],
24
+ fields: [
25
+ {
26
+ key: "display",
27
+ type: "choice",
28
+ label: "Shows as",
29
+ options: [
30
+ { value: "heading", label: "Page heading" },
31
+ { value: "label", label: "Caption" },
32
+ ],
33
+ },
34
+ ],
35
+ defaultConfig: { display: "heading" },
15
36
  parseConfig: parsePhiPageTitleWidgetConfig,
16
37
  };
@@ -4,5 +4,5 @@ import { PHI_PAGE_TITLE_WIDGET_DEFINITION } from "./config";
4
4
  import { PhiPageTitleWidgetServer } from "./server";
5
5
  export const PHI_PAGE_TITLE_WIDGET_PLUGIN = {
6
6
  ...PHI_PAGE_TITLE_WIDGET_DEFINITION,
7
- ...definePhiPassiveWidgetRenderers(({ runtime }) => _jsx(PhiPageTitleWidgetServer, { runtime: runtime })),
7
+ ...definePhiPassiveWidgetRenderers(({ runtime, config }) => _jsx(PhiPageTitleWidgetServer, { runtime: runtime, config: config })),
8
8
  };
@@ -1,4 +1,6 @@
1
1
  import type { PhiServerBlockBaseProps } from "../../../../../types";
2
2
  import type { PhiPageTitleWidgetConfig } from "./config";
3
3
  import type { PhiPageTitleWidgetLabels } from "../../../../../components/widgets/label-types/page-title";
4
- export declare function PhiPageTitleWidgetServer({ runtime, }: Pick<PhiServerBlockBaseProps<PhiPageTitleWidgetLabels, PhiPageTitleWidgetConfig>, "runtime">): Promise<import("react").JSX.Element>;
4
+ export declare function PhiPageTitleWidgetServer({ runtime, config, }: Pick<PhiServerBlockBaseProps<PhiPageTitleWidgetLabels, PhiPageTitleWidgetConfig>, "runtime"> & {
5
+ config: PhiPageTitleWidgetConfig;
6
+ }): Promise<import("react").JSX.Element>;
@@ -3,14 +3,15 @@ import { PhiCmsWidgetType } from "../../../../../constants/cms-widget-types";
3
3
  import { PhiRuntimeModuleRenderClientHost } from "../../../../../components/runtime/runtime-module-render-client-manifest";
4
4
  import { getPhiPageTitleWidgetLabels } from "../../../../../components/widgets/label-sets/page-title";
5
5
  import { buildPhiWidgetLabelTranslatorOptions } from "../../../../../components/widgets/label-sets/runtime-options";
6
- function PhiPageTitleWidget({ labels, runtime, }) {
6
+ function PhiPageTitleWidget({ labels, runtime, config, }) {
7
7
  const title = runtime.page?.title?.trim() || labels.emptyTitle;
8
8
  return (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiCmsWidgetType.PageTitle, componentProps: {
9
9
  initialTitle: title,
10
10
  area: runtime.area ?? null,
11
+ display: config.display,
11
12
  } }));
12
13
  }
13
- export async function PhiPageTitleWidgetServer({ runtime, }) {
14
+ export async function PhiPageTitleWidgetServer({ runtime, config, }) {
14
15
  const labels = await getPhiPageTitleWidgetLabels(buildPhiWidgetLabelTranslatorOptions(runtime));
15
- return _jsx(PhiPageTitleWidget, { labels: labels, runtime: runtime, config: {} });
16
+ return _jsx(PhiPageTitleWidget, { labels: labels, runtime: runtime, config: config });
16
17
  }
@@ -601,7 +601,7 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
601
601
  required: field.required,
602
602
  disabled: loading,
603
603
  constraints: field.constraints,
604
- options: field.options,
604
+ options: column.editor?.options ?? field.options,
605
605
  prefix: column.editor?.prefix,
606
606
  }
607
607
  : undefined;
@@ -242,6 +242,15 @@ function readColumn(reader) {
242
242
  control: editorReader.oneOf("control", PHI_TABLE_COLUMN_EDITOR_CONTROLS),
243
243
  disabledWhen: readCondition(editorReader, "disabledWhen"),
244
244
  ...(editorReader.string("prefix") ? { prefix: editorReader.string("prefix") } : {}),
245
+ // The Site's own choices for a select cell, set by the placement (`editor.options`).
246
+ ...(editorReader.has("options")
247
+ ? {
248
+ options: editorReader.list("options", (option) => ({
249
+ value: requireString(option, "value"),
250
+ label: requireString(option, "label"),
251
+ })) ?? [],
252
+ }
253
+ : {}),
245
254
  });
246
255
  return {
247
256
  key: requireString(reader, "key"),
@@ -424,14 +424,18 @@ export function compilePhiCmsDescriptorCatalog({ catalog, areaDefinitions, }) {
424
424
  if (item.routePresetKey && item.overlayPresetKey) {
425
425
  throw new Error(`${label}/${item.itemKey}: an item goes to a route or opens an Overlay, never both.`);
426
426
  }
427
- // Only a Module's injected entry may lead out; an Area's own items carry no `target`.
428
- const externalTarget = "target" in item ? item.target : undefined;
429
- if (externalTarget !== undefined) {
427
+ // An external address is a Module's injected entry only; another Area's root either may name.
428
+ const target = item.target;
429
+ if (target !== undefined) {
430
430
  if (item.routePresetKey || item.overlayPresetKey || item.overlayNodeKey) {
431
- throw new Error(`${label}/${item.itemKey}: an item leads to an external address, a route or an Overlay, ` +
432
- "never more than one.");
431
+ throw new Error(`${label}/${item.itemKey}: an item leads to a target, a route or an Overlay, never more than one.`);
432
+ }
433
+ if (target.kind === "area") {
434
+ assertNavigationAreaTarget(target, area, `${label}/${item.itemKey}`);
435
+ }
436
+ else {
437
+ assertNavigationExternalTarget(target, `${label}/${item.itemKey}`);
433
438
  }
434
- assertNavigationExternalTarget(externalTarget, `${label}/${item.itemKey}`);
435
439
  }
436
440
  if (item.overlayPresetKey && !item.overlayNodeKey) {
437
441
  throw new Error(`${label}/${item.itemKey}: an Overlay reference needs both a preset key and a node key.`);
@@ -786,6 +790,18 @@ function assertNavigationExternalTarget(target, label) {
786
790
  throw new Error(`${label}: an external navigation target's newTab must be a boolean.`);
787
791
  }
788
792
  }
793
+ /**
794
+ * Another Area's root: an Area this Site has, and not the surface's own -- a link to one's own root is
795
+ * a route of the Area's base Module, and is named as one.
796
+ */
797
+ function assertNavigationAreaTarget(target, ownArea, label) {
798
+ if (!isPhiCmsAreaKey(target.area)) {
799
+ throw new Error(`${label}: an Area navigation target names an unknown Area "${String(target.area)}".`);
800
+ }
801
+ if (target.area === ownArea) {
802
+ throw new Error(`${label}: an Area navigation target must lead to another Area than "${ownArea}".`);
803
+ }
804
+ }
789
805
  /**
790
806
  * What an item points at, if anything currently answers there.
791
807
  *
@@ -801,6 +817,10 @@ function assertNavigationExternalTarget(target, label) {
801
817
  * turned down in the sidebar, linking `/`.
802
818
  */
803
819
  function resolveNavigationTarget(routeTable, ownerModuleId, routePresetKey, overlay, external) {
820
+ if (external?.kind === "area") {
821
+ // The Area segment, which every renderer reads as that Area's root; the root forwards from there.
822
+ return { kind: "area", area: external.area, path: `/${external.area}` };
823
+ }
804
824
  if (external) {
805
825
  // The shape a Site's stored external link resolves to, so every surface renders both alike. The
806
826
  // entry stays the Module's: `ownerModuleId` on the item, not the target, says whose it is.
@@ -838,7 +858,12 @@ function resolveNavigationTarget(routeTable, ownerModuleId, routePresetKey, over
838
858
  function buildResolvedNavigationNode(catalog, routeTable, navKey, ownerModuleId, descriptor, injection) {
839
859
  const target = resolveNavigationTarget(routeTable, ownerModuleId, descriptor.routePresetKey, descriptor.overlayPresetKey && descriptor.overlayNodeKey
840
860
  ? { presetKey: descriptor.overlayPresetKey, nodeKey: descriptor.overlayNodeKey }
841
- : null, "target" in descriptor ? descriptor.target : undefined);
861
+ : null, descriptor.target);
862
+ /*
863
+ * An Area entry that states no policy of its own is shown to whoever the target Area lets in: an entry
864
+ * leading to a door that turns the viewer away is a link nobody should have been offered.
865
+ */
866
+ const accessPolicy = descriptor.accessPolicy ?? (descriptor.target?.kind === "area" ? catalog.areaDefinitions.get(descriptor.target.area)?.accessPolicy : undefined);
842
867
  const intrinsicChildren = (descriptor.children ?? []).map((child) => buildResolvedNavigationNode(catalog, routeTable, navKey, ownerModuleId, child, null));
843
868
  const sourceLocale = catalog.sourceLocaleByModuleId.get(ownerModuleId);
844
869
  if (!sourceLocale) {
@@ -858,7 +883,7 @@ function buildResolvedNavigationNode(catalog, routeTable, navKey, ownerModuleId,
858
883
  kind: target || descriptor.signalRoutes?.emits?.length ? "link" : "container",
859
884
  label: { ...descriptor.label, sourceLocale },
860
885
  ...(descriptor.icon ? { icon: descriptor.icon } : {}),
861
- ...(descriptor.accessPolicy ? { accessPolicy: descriptor.accessPolicy } : {}),
886
+ ...(accessPolicy ? { accessPolicy } : {}),
862
887
  ...(descriptor.signalRoutes?.emits?.length
863
888
  ? { emits: descriptor.signalRoutes.emits }
864
889
  : {}),
@@ -84,7 +84,7 @@ export async function buildPhiDefaultAdminGroupsPageTree({ page, runtime, }) {
84
84
  config: {
85
85
  key: `admin-groups-${workflow}-commands`,
86
86
  buttons: [
87
- { key: "cancel", emits: [{ capabilityId: "close", value: null }], label: labels.actions.cancel, icon: "cancel" },
87
+ { key: "cancel", emits: [{ capabilityId: "close", value: null }], label: labels.actions.cancel, icon: "close" },
88
88
  { key: "save", emits: [{ capabilityId: "submit", value: null }], label: text.submit, variant: "primary", icon: "save" },
89
89
  ],
90
90
  signalRoutes: {
@@ -303,7 +303,7 @@ export async function buildPhiDefaultEditorTranslationsPageTree({ page, runtime,
303
303
  key: "editor-translation-commands",
304
304
  ...PHI_DIALOG_COMMANDS_CONFIG,
305
305
  buttons: [
306
- { key: "cancel", emits: [{ capabilityId: "command", value: "cancel" }], label: widgetLabels.actions.cancel, icon: "cancel" },
306
+ { key: "cancel", emits: [{ capabilityId: "command", value: "cancel" }], label: widgetLabels.actions.cancel, icon: "close" },
307
307
  { key: "save", emits: [{ capabilityId: "command", value: "save" }], label: widgetLabels.actions.save, variant: "primary", icon: "save" },
308
308
  ],
309
309
  signalRoutes: {
@@ -356,7 +356,7 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
356
356
  key: "cancel",
357
357
  emits: [{ capabilityId: "close", value: null }],
358
358
  label: revisionsLabels.deleteArea.cancel,
359
- icon: "cancel",
359
+ icon: "close",
360
360
  },
361
361
  {
362
362
  key: "confirm",
@@ -1397,7 +1397,7 @@ export function PhiBuilderBrandStyleControlsWidgetClient({ runtime, config, }) {
1397
1397
  label: _jsx(PhiTypographyControl, { strong: true, children: "Font Family" }),
1398
1398
  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(
1399
1399
  // A cleared select reports nothing, which hands the slot back to the Set.
1400
- 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)) })] })] })),
1400
+ mergeThemeFontSlot(state.draft, item.key, value ?? null)) })] }, item.key))), siteFontAssets.options.length > 0 ? (_jsx(PhiTypographyControl, { type: "secondary", style: { fontSize: clientToken.fontSizeSM }, children: "Typefaces from the media library are delivered as subsets, which modifies the font file. Check that the font's licence permits subsetting before using it." })) : null, _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)) })] })] })),
1401
1401
  },
1402
1402
  {
1403
1403
  key: "fontSize",
@@ -104,7 +104,7 @@ export async function buildPhiDefaultThreadsPageTree({ page, runtime, area, }) {
104
104
  config: {
105
105
  key: "app-threads-reply-commands",
106
106
  buttons: [
107
- { key: "cancel", emits: [{ capabilityId: "close", value: null }], action: "cancel", icon: "cancel" },
107
+ { key: "cancel", emits: [{ capabilityId: "close", value: null }], action: "cancel", icon: "close" },
108
108
  {
109
109
  key: "submit",
110
110
  emits: [{ capabilityId: "submit", value: null }],
@@ -643,7 +643,7 @@ export async function buildPhiDefaultThreadsPageTree({ page, runtime, area, }) {
643
643
  key: "app-threads-new-commands",
644
644
  ...PHI_DIALOG_COMMANDS_CONFIG,
645
645
  buttons: [
646
- { key: "cancel", emits: [{ capabilityId: "command", value: "cancel" }], label: labels.cancelLabel, icon: "cancel" },
646
+ { key: "cancel", emits: [{ capabilityId: "command", value: "cancel" }], label: labels.cancelLabel, icon: "close" },
647
647
  { key: "save", emits: [{ capabilityId: "command", value: "save" }], label: labels.openConversationLabel, variant: "primary", icon: "save" },
648
648
  ],
649
649
  signalRoutes: {
@@ -545,7 +545,7 @@ export async function buildPhiDefaultAdminUsersPageTree({ page, runtime, }) {
545
545
  key: `admin-users-${mode}-commands`,
546
546
  ...PHI_DIALOG_COMMANDS_CONFIG,
547
547
  buttons: [
548
- { key: "cancel", emits: [{ capabilityId: "command", value: "cancel" }], label: widgetLabels.confirm.cancel, icon: "cancel" },
548
+ { key: "cancel", emits: [{ capabilityId: "command", value: "cancel" }], label: widgetLabels.confirm.cancel, icon: "close" },
549
549
  { key: "save", emits: [{ capabilityId: "command", value: "save" }], label: saveLabel, variant: "primary", icon: "save" },
550
550
  ],
551
551
  signalRoutes: {
@@ -0,0 +1,25 @@
1
+ import { type PhiCmsReviewKind } from "../helpers/cms-scope-search-params";
2
+ export type { PhiCmsReviewKind };
3
+ export type PhiCmsReviewParams = {
4
+ kind: PhiCmsReviewKind;
5
+ revisionId: number;
6
+ area?: string | null;
7
+ page?: string | null;
8
+ navKey?: string | null;
9
+ themeKey?: string | null;
10
+ };
11
+ export declare function resolvePhiCmsReviewParams(searchParams?: Record<string, string | undefined>): PhiCmsReviewParams | null;
12
+ export declare function getPhiCmsReviewRevision(review: PhiCmsReviewParams | null | undefined, kind: PhiCmsReviewKind): number | null;
13
+ /**
14
+ * Whether this request reads the Area or the Page as a revision Core had to authorize.
15
+ *
16
+ * `revision` and a review of kind `area` or `page` are passed on to Core's Area and Page reads, and
17
+ * Core answers them only to a viewer it allows to preview (`requireSiteCmsPreviewApiContext`); a
18
+ * refusal comes back as 401/403 before anything renders. That is what lets the Area access guard step
19
+ * aside for such a request: somebody else has already decided. A review of kind `navigation` or
20
+ * `theme` changes neither read -- the Area and the Page come back live, unauthorized -- so it is no
21
+ * reason to step aside. Deciding on "any valid review" did exactly that, and
22
+ * `?reviewKind=navigation&reviewRevision=1` showed an anonymous visitor a staff Area's shell.
23
+ */
24
+ export declare function hasPhiCmsAuthorizedPreviewRead(searchParams?: Record<string, string | undefined>): boolean;
25
+ export declare function resolvePhiCmsRevisionFromSearchParams(searchParams?: Record<string, string | undefined>): number | null;
@@ -0,0 +1,54 @@
1
+ import { isPhiCmsReviewKind } from "../helpers/cms-scope-search-params";
2
+ function normalizeReviewKind(value) {
3
+ const normalized = value?.trim().toLowerCase();
4
+ return isPhiCmsReviewKind(normalized) ? normalized : null;
5
+ }
6
+ function normalizeOptionalString(value) {
7
+ const normalized = value?.trim();
8
+ return normalized ? normalized : null;
9
+ }
10
+ export function resolvePhiCmsReviewParams(searchParams) {
11
+ const kind = normalizeReviewKind(searchParams?.reviewKind);
12
+ const rawRevision = searchParams?.reviewRevision?.trim();
13
+ const revisionId = rawRevision ? Number(rawRevision) : null;
14
+ if (!kind || !Number.isInteger(revisionId) || revisionId <= 0) {
15
+ return null;
16
+ }
17
+ return {
18
+ kind,
19
+ revisionId: revisionId,
20
+ area: normalizeOptionalString(searchParams?.reviewArea),
21
+ page: normalizeOptionalString(searchParams?.reviewPage),
22
+ navKey: normalizeOptionalString(searchParams?.reviewNavKey),
23
+ themeKey: normalizeOptionalString(searchParams?.reviewThemeKey),
24
+ };
25
+ }
26
+ export function getPhiCmsReviewRevision(review, kind) {
27
+ return review?.kind === kind ? review.revisionId : null;
28
+ }
29
+ /**
30
+ * Whether this request reads the Area or the Page as a revision Core had to authorize.
31
+ *
32
+ * `revision` and a review of kind `area` or `page` are passed on to Core's Area and Page reads, and
33
+ * Core answers them only to a viewer it allows to preview (`requireSiteCmsPreviewApiContext`); a
34
+ * refusal comes back as 401/403 before anything renders. That is what lets the Area access guard step
35
+ * aside for such a request: somebody else has already decided. A review of kind `navigation` or
36
+ * `theme` changes neither read -- the Area and the Page come back live, unauthorized -- so it is no
37
+ * reason to step aside. Deciding on "any valid review" did exactly that, and
38
+ * `?reviewKind=navigation&reviewRevision=1` showed an anonymous visitor a staff Area's shell.
39
+ */
40
+ export function hasPhiCmsAuthorizedPreviewRead(searchParams) {
41
+ if (resolvePhiCmsRevisionFromSearchParams(searchParams) != null) {
42
+ return true;
43
+ }
44
+ const review = resolvePhiCmsReviewParams(searchParams);
45
+ return review?.kind === "area" || review?.kind === "page";
46
+ }
47
+ export function resolvePhiCmsRevisionFromSearchParams(searchParams) {
48
+ const rawValue = searchParams?.revision;
49
+ if (!rawValue?.trim()) {
50
+ return null;
51
+ }
52
+ const parsed = Number(rawValue);
53
+ return Number.isInteger(parsed) && parsed > 0 ? parsed : null;
54
+ }
@@ -1,30 +1,6 @@
1
1
  import "server-only";
2
2
  import type { PhiSiteRequestContext } from "../types/site-request-context";
3
- import { type PhiCmsReviewKind } from "../helpers/cms-scope-search-params";
4
- export type { PhiCmsReviewKind };
5
- export type PhiCmsReviewParams = {
6
- kind: PhiCmsReviewKind;
7
- revisionId: number;
8
- area?: string | null;
9
- page?: string | null;
10
- navKey?: string | null;
11
- themeKey?: string | null;
12
- };
13
- export declare function resolvePhiCmsReviewParams(searchParams?: Record<string, string | undefined>): PhiCmsReviewParams | null;
14
- export declare function getPhiCmsReviewRevision(review: PhiCmsReviewParams | null | undefined, kind: PhiCmsReviewKind): number | null;
15
- /**
16
- * Whether this request reads the Area or the Page as a revision Core had to authorize.
17
- *
18
- * `revision` and a review of kind `area` or `page` are passed on to Core's Area and Page reads, and
19
- * Core answers them only to a viewer it allows to preview (`requireSiteCmsPreviewApiContext`); a
20
- * refusal comes back as 401/403 before anything renders. That is what lets the Area access guard step
21
- * aside for such a request: somebody else has already decided. A review of kind `navigation` or
22
- * `theme` changes neither read -- the Area and the Page come back live, unauthorized -- so it is no
23
- * reason to step aside. Deciding on "any valid review" did exactly that, and
24
- * `?reviewKind=navigation&reviewRevision=1` showed an anonymous visitor a staff Area's shell.
25
- */
26
- export declare function hasPhiCmsAuthorizedPreviewRead(searchParams?: Record<string, string | undefined>): boolean;
27
- export declare function resolvePhiCmsRevisionFromSearchParams(searchParams?: Record<string, string | undefined>): number | null;
3
+ export { getPhiCmsReviewRevision, hasPhiCmsAuthorizedPreviewRead, resolvePhiCmsReviewParams, resolvePhiCmsRevisionFromSearchParams, type PhiCmsReviewKind, type PhiCmsReviewParams, } from "./cms-review-params";
28
4
  export declare function resolvePhiCmsThemeReviewRequestContext({ requestContext, searchParams, cookieHeader, }: {
29
5
  requestContext: PhiSiteRequestContext;
30
6
  searchParams?: Record<string, string | undefined>;
@@ -1,60 +1,8 @@
1
1
  import "server-only";
2
2
  import { getSiteThemeRevision } from "../gateway/site-theme";
3
3
  import { readPhiServerApiCredentials } from "../helpers/phis-server-credentials";
4
- import { isPhiCmsReviewKind } from "../helpers/cms-scope-search-params";
5
- function normalizeReviewKind(value) {
6
- const normalized = value?.trim().toLowerCase();
7
- return isPhiCmsReviewKind(normalized) ? normalized : null;
8
- }
9
- function normalizeOptionalString(value) {
10
- const normalized = value?.trim();
11
- return normalized ? normalized : null;
12
- }
13
- export function resolvePhiCmsReviewParams(searchParams) {
14
- const kind = normalizeReviewKind(searchParams?.reviewKind);
15
- const rawRevision = searchParams?.reviewRevision?.trim();
16
- const revisionId = rawRevision ? Number(rawRevision) : null;
17
- if (!kind || !Number.isInteger(revisionId) || revisionId <= 0) {
18
- return null;
19
- }
20
- return {
21
- kind,
22
- revisionId: revisionId,
23
- area: normalizeOptionalString(searchParams?.reviewArea),
24
- page: normalizeOptionalString(searchParams?.reviewPage),
25
- navKey: normalizeOptionalString(searchParams?.reviewNavKey),
26
- themeKey: normalizeOptionalString(searchParams?.reviewThemeKey),
27
- };
28
- }
29
- export function getPhiCmsReviewRevision(review, kind) {
30
- return review?.kind === kind ? review.revisionId : null;
31
- }
32
- /**
33
- * Whether this request reads the Area or the Page as a revision Core had to authorize.
34
- *
35
- * `revision` and a review of kind `area` or `page` are passed on to Core's Area and Page reads, and
36
- * Core answers them only to a viewer it allows to preview (`requireSiteCmsPreviewApiContext`); a
37
- * refusal comes back as 401/403 before anything renders. That is what lets the Area access guard step
38
- * aside for such a request: somebody else has already decided. A review of kind `navigation` or
39
- * `theme` changes neither read -- the Area and the Page come back live, unauthorized -- so it is no
40
- * reason to step aside. Deciding on "any valid review" did exactly that, and
41
- * `?reviewKind=navigation&reviewRevision=1` showed an anonymous visitor a staff Area's shell.
42
- */
43
- export function hasPhiCmsAuthorizedPreviewRead(searchParams) {
44
- if (resolvePhiCmsRevisionFromSearchParams(searchParams) != null) {
45
- return true;
46
- }
47
- const review = resolvePhiCmsReviewParams(searchParams);
48
- return review?.kind === "area" || review?.kind === "page";
49
- }
50
- export function resolvePhiCmsRevisionFromSearchParams(searchParams) {
51
- const rawValue = searchParams?.revision;
52
- if (!rawValue?.trim()) {
53
- return null;
54
- }
55
- const parsed = Number(rawValue);
56
- return Number.isInteger(parsed) && parsed > 0 ? parsed : null;
57
- }
4
+ import { getPhiCmsReviewRevision, resolvePhiCmsReviewParams } from "./cms-review-params";
5
+ export { getPhiCmsReviewRevision, hasPhiCmsAuthorizedPreviewRead, resolvePhiCmsReviewParams, resolvePhiCmsRevisionFromSearchParams, } from "./cms-review-params";
58
6
  export async function resolvePhiCmsThemeReviewRequestContext({ requestContext, searchParams, cookieHeader, }) {
59
7
  const review = resolvePhiCmsReviewParams(searchParams);
60
8
  const themeRevision = getPhiCmsReviewRevision(review, "theme");
@@ -369,6 +369,8 @@ h5.phi-typography, .phi-typography h5 {
369
369
  --phi-card-control-radius: var(--phi-surface-radius);
370
370
  --phi-card-control-line: var(--ant-line-width) var(--ant-line-type) var(--ant-color-border-secondary);
371
371
  position: relative;
372
+ display: flex;
373
+ flex-direction: column;
372
374
  box-sizing: border-box;
373
375
  min-width: 0;
374
376
  border: var(--phi-card-control-line);
@@ -428,7 +430,16 @@ h5.phi-typography, .phi-typography h5 {
428
430
  border-radius: var(--phi-card-control-radius) var(--phi-card-control-radius) 0 0;
429
431
  }
430
432
 
433
+ /*
434
+ * The body takes whatever height the box is given beyond its head and cover. A Card stretched to its row
435
+ * in a grid of Cards is taller than its own content, and the body is where that height belongs: a caller
436
+ * whose content is a column of its own (`height: 100%`) can then push its last part -- a price and a
437
+ * button -- to the bottom edge, so a row of Cards lines up there. A box that is only as tall as its
438
+ * content gains nothing and loses nothing. The basis is 0 rather than `auto` so the height is definite
439
+ * where the box's is, which is what lets that `100%` resolve at all.
440
+ */
431
441
  .phi-card-control__body {
442
+ flex: 1 0 0;
432
443
  border-radius: 0 0 var(--phi-card-control-radius) var(--phi-card-control-radius);
433
444
  }
434
445