@phis/ui 0.5.5 → 0.5.7

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 (64) hide show
  1. package/components/controls/phi-anchor-nav-control.js +18 -1
  2. package/components/controls/phi-background-control.d.ts +9 -1
  3. package/components/controls/phi-background-control.js +66 -20
  4. package/components/widgets/config/background-pattern-live.d.ts +25 -0
  5. package/components/widgets/config/background-pattern-live.js +50 -0
  6. package/components/widgets/shared/card-body-client.d.ts +6 -2
  7. package/components/widgets/shared/card-body-client.js +27 -20
  8. package/components/widgets/shared/card-vocabulary.d.ts +7 -0
  9. package/components/widgets/shared/card-vocabulary.js +6 -0
  10. package/components/widgets/shared/markdown-body-client.d.ts +4 -1
  11. package/components/widgets/shared/markdown-body-client.js +10 -5
  12. package/components/widgets/shared/markdown-image-vocabulary.d.ts +19 -6
  13. package/components/widgets/shared/markdown-image-vocabulary.js +34 -9
  14. package/components/widgets/shared/markdown-render.d.ts +2 -1
  15. package/components/widgets/shared/markdown-render.js +4 -1
  16. package/constants/module-identity.d.ts +8 -0
  17. package/constants/module-identity.js +13 -0
  18. package/gateway/server-module-media.d.ts +12 -0
  19. package/gateway/server-module-media.js +83 -0
  20. package/helpers/cms-navigation-catalog.js +4 -1
  21. package/helpers/cms-page-catalog.d.ts +7 -0
  22. package/helpers/cms-preset-page-tree.js +16 -1
  23. package/helpers/module-media-check.d.ts +23 -0
  24. package/helpers/module-media-check.js +32 -0
  25. package/helpers/module-media.d.ts +7 -0
  26. package/helpers/module-media.js +15 -0
  27. package/helpers/route-address-check.d.ts +35 -0
  28. package/helpers/route-address-check.js +28 -0
  29. package/module-page-check.d.ts +2 -0
  30. package/module-page-check.js +2 -0
  31. package/package.json +1 -1
  32. package/plugins/runtime-modules/builder/area-shell-presets.server.js +2 -0
  33. package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +1 -1
  34. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +8 -0
  35. package/plugins/runtime-modules/builder/navigation-folder-drop.js +2 -1
  36. package/plugins/runtime-modules/builder/options-providers.js +7 -1
  37. package/plugins/runtime-modules/builder/page-presets.server.js +2 -0
  38. package/plugins/runtime-modules/core/widgets/breadcrumb/server.js +9 -2
  39. package/plugins/runtime-modules/core/widgets/card/config.d.ts +17 -1
  40. package/plugins/runtime-modules/core/widgets/card/config.js +20 -2
  41. package/plugins/runtime-modules/core/widgets/card/editor.js +2 -0
  42. package/plugins/runtime-modules/core/widgets/card/server.js +2 -0
  43. package/plugins/runtime-modules/core/widgets/description/config.d.ts +10 -0
  44. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +10 -0
  45. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +10 -0
  46. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +16 -1
  47. package/plugins/runtime-modules/core/widgets/markdown/config.js +18 -1
  48. package/plugins/runtime-modules/core/widgets/result/config.d.ts +10 -0
  49. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +10 -0
  50. package/plugins/runtime-modules/core/widgets/table/config.d.ts +34 -0
  51. package/plugins/runtime-modules/descriptor-compiler.d.ts +23 -3
  52. package/plugins/runtime-modules/descriptor-compiler.js +107 -12
  53. package/server-helpers/cms-area.js +9 -1
  54. package/server-helpers/cms-request.js +15 -2
  55. package/server-helpers/cms-root.js +2 -0
  56. package/server-helpers/module-folder-targets.d.ts +7 -0
  57. package/server-helpers/module-folder-targets.js +15 -0
  58. package/styles/controls.css +30 -5
  59. package/types/cms-module-descriptors.d.ts +24 -0
  60. package/types/cms-plugins.d.ts +8 -0
  61. package/types/core-widget-placements.d.ts +2 -1
  62. package/types/module-media.d.ts +31 -0
  63. package/types/module-media.js +11 -0
  64. package/types.d.ts +1 -0
@@ -15,6 +15,7 @@ import { resolvePhiBuilderAreaAsCmsArea } from "../../../constants/cms-areas";
15
15
  import { createPhiPresetCmsPageId, isPhiCmsInstanceId } from "../../../types/cms-instance-id";
16
16
  import { buildPhiBuilderAreaLandingSelection, buildPhiBuilderRuntimeModulesConfigForArea, } from "./area-shell-presets.server";
17
17
  import { readPhiServerApiCredentials } from "../../../helpers/phis-server-credentials";
18
+ import { createPhiModuleMediaLoader } from "../../../gateway/server-module-media";
18
19
  /**
19
20
  * The Area's routes as the Builder's server half must see them: the table the reader compiles.
20
21
  *
@@ -95,6 +96,7 @@ async function buildPhiRegistryPresetPageTree({ runtime, runtimeModuleCatalog, b
95
96
  siteId: runtime.site.id,
96
97
  path,
97
98
  runtime,
99
+ loadModuleMedia: createPhiModuleMediaLoader(runtime.site.key),
98
100
  }), {
99
101
  runtimeModuleCatalog,
100
102
  siteKey: runtime.site.key,
@@ -4,6 +4,7 @@ import { PhiRuntimeModuleRenderClientHost } from "../../../../../components/runt
4
4
  import { fetchSiteNavigationFolderTarget } from "../../../../../gateway/site-nav";
5
5
  import { readPhiServerApiCredentials } from "../../../../../helpers/phis-server-credentials";
6
6
  import { resolvePhiWidgetRecordField } from "../../../../../server-helpers/record-fields";
7
+ import { resolvePhiRequestModuleFolderTargets } from "../../../../../server-helpers/module-folder-targets";
7
8
  /** The folders a Page path lies in, outermost first: `/docs/guides/a` gives `/docs` and `/docs/guides`. */
8
9
  export function listPhiBreadcrumbFolderPaths(pagePath) {
9
10
  const segments = pagePath.split("/").filter(Boolean);
@@ -13,7 +14,8 @@ export function listPhiBreadcrumbFolderPaths(pagePath) {
13
14
  * Which folders of the Page's path lead somewhere, so the client links exactly those.
14
15
  *
15
16
  * A folder segment is a link when its folder address resolves to a Page (REFERENCES.md, "Folder
16
- * addresses"); one that resolves to nothing would be a link into a 404. Asked once per folder of the
17
+ * addresses") or a Module container's `folderTarget` leads it to one; one that resolves to nothing
18
+ * would be a link into a 404. Asked once per folder of the
17
19
  * path, which is the depth of the path and not the size of the Site, and only when the trail shows the
18
20
  * path at all. A failed lookup leaves that segment unlinked rather than failing the trail.
19
21
  */
@@ -34,7 +36,12 @@ async function resolveLinkedFolderPaths(props) {
34
36
  area: String(runtime.area),
35
37
  path,
36
38
  }).catch(() => null)));
37
- return folders.filter((_path, index) => answers[index] != null);
39
+ // Where the Site chose no target, a Module container's own (`folderTarget`) answers, as on a request.
40
+ const unanswered = folders.filter((_path, index) => answers[index] == null);
41
+ const moduleTargets = unanswered.length > 0
42
+ ? resolvePhiRequestModuleFolderTargets(runtime.area, unanswered)
43
+ : new Map();
44
+ return folders.filter((path, index) => answers[index] != null || moduleTargets.has(path));
38
45
  }
39
46
  /**
40
47
  * The title of the record the Page is about, for the trail's last item; `null` leaves the path segment.
@@ -5,7 +5,7 @@ import type { PhiImageAssetVariantKeyValue } from "../../../../../types/media";
5
5
  import { type PhiLinkTarget } from "../../../../../types/references";
6
6
  import { type PhiBackgroundOverlay } from "../../../../../components/widgets/config/background";
7
7
  import { type PhiBulletListEntry, type PhiBulletListStyle } from "../../../../../components/widgets/shared/bullet-list-vocabulary";
8
- import { type PhiCardBillingPeriod, type PhiCardHeadingLevel, type PhiCardHoverEffect, type PhiCardIconPlacement, type PhiCardTextAlign, type PhiCardBadgeStyle, type PhiCardMediaAspectRatio, type PhiCardVariant, type PhiCardWidgetBody } from "../../../../../components/widgets/shared/card-vocabulary";
8
+ import { type PhiCardBillingPeriod, type PhiCardHeadingLevel, type PhiCardHoverEffect, type PhiCardIconPlacement, type PhiCardIconSize, type PhiCardTextAlign, type PhiCardBadgeStyle, type PhiCardMediaAspectRatio, type PhiCardVariant, type PhiCardWidgetBody } from "../../../../../components/widgets/shared/card-vocabulary";
9
9
  import { type PhiSignalRouteSet } from "../../../../../types/signals";
10
10
  import { type PhiCmsWidgetConfigBase } from "../../../../../components/widgets/config/parser-primitives";
11
11
  type PhiCardImageSource = {
@@ -54,6 +54,10 @@ export type PhiCmsCardWidgetConfig = PhiCmsWidgetConfigBase & PhiCardImageSource
54
54
  /** The icon's colour and the ground it stands on; absent, the Theme's. */
55
55
  iconColor?: string;
56
56
  iconBackground?: string;
57
+ /** How large the icon is drawn, in fixed steps. Absent is `default`. */
58
+ iconSize?: PhiCardIconSize;
59
+ /** `false` draws the icon without its ground; absent is framed. */
60
+ iconFramed?: boolean;
57
61
  /** The picture's words for a reader who cannot see it; an Asset brings its own. */
58
62
  alt?: string;
59
63
  /**
@@ -145,6 +149,7 @@ export declare const PHI_CARD_WIDGET_DEFINITION: {
145
149
  headingLevel: "h3";
146
150
  textAlign: "start";
147
151
  badgeStyle: "none";
152
+ iconFramed: true;
148
153
  };
149
154
  creationConfig: {
150
155
  surface: {
@@ -171,6 +176,7 @@ export declare const PHI_CARD_WIDGET_DEFINITION: {
171
176
  headingLevel: "h3";
172
177
  textAlign: "start";
173
178
  badgeStyle: "none";
179
+ iconFramed: true;
174
180
  };
175
181
  fields: (({
176
182
  key: string;
@@ -480,6 +486,16 @@ export declare const PHI_CARD_WIDGET_DEFINITION: {
480
486
  editorPlacement?: "inspector" | "geometry" | "toolbar";
481
487
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
482
488
  heading?: string;
489
+ } & {
490
+ type: "background-overlay";
491
+ }) | ({
492
+ key: string;
493
+ label: string;
494
+ description?: string;
495
+ required?: boolean;
496
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
497
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
498
+ heading?: string;
483
499
  } & {
484
500
  type: "grid-placement" | "column-count";
485
501
  section?: string;
@@ -8,7 +8,7 @@ import { readPhiMediaImageSourceConfig } from "../../../../../components/widgets
8
8
  import { PHI_SURFACE_CARD } from "../../../../../helpers/surface-presets";
9
9
  import { normalizePhiBackgroundWidgetConfig } from "../../../../../components/widgets/config/background";
10
10
  import { buildPhiBulletListFields, readPhiBulletListEntries, readPhiBulletListStyle, } from "../../../../../components/widgets/shared/bullet-list-vocabulary";
11
- import { PHI_CARD_HEADING_LEVELS, PHI_CARD_HOVER_EFFECTS, PHI_CARD_ICON_PLACEMENTS, PHI_CARD_TEXT_ALIGNS, PHI_CARD_BADGE_STYLES, PHI_CARD_MEDIA_ASPECT_RATIOS, PHI_CARD_VARIANTS, readPhiCardBillingPeriod, } from "../../../../../components/widgets/shared/card-vocabulary";
11
+ import { PHI_CARD_HEADING_LEVELS, PHI_CARD_HOVER_EFFECTS, PHI_CARD_ICON_PLACEMENTS, PHI_CARD_ICON_SIZES, PHI_CARD_TEXT_ALIGNS, PHI_CARD_BADGE_STYLES, PHI_CARD_MEDIA_ASPECT_RATIOS, PHI_CARD_VARIANTS, readPhiCardBillingPeriod, } from "../../../../../components/widgets/shared/card-vocabulary";
12
12
  import { readPhiControlLabel } from "../../../../../components/widgets/config/common-action-field";
13
13
  import { PHI_CARD_SIGNALS } from "../../../../../components/widgets/signals/control-signal-capabilities";
14
14
  import { readPhiSignalRouteSet } from "../../../../../types/signals";
@@ -51,6 +51,8 @@ function parsePhiCmsCardWidgetConfig(config) {
51
51
  iconPlacement: readChoice(readString(config.iconPlacement), PHI_CARD_ICON_PLACEMENTS),
52
52
  iconColor: readString(config.iconColor),
53
53
  iconBackground: readString(config.iconBackground),
54
+ iconSize: readChoice(readString(config.iconSize), PHI_CARD_ICON_SIZES),
55
+ iconFramed: readBoolean(config.iconFramed),
54
56
  alt: readString(config.alt),
55
57
  mediaAspectRatio: readChoice(readString(config.mediaAspectRatio), PHI_CARD_MEDIA_ASPECT_RATIOS),
56
58
  imageOpacity: readPhiCardImageOpacity(config.imageOpacity),
@@ -84,6 +86,8 @@ const PHI_CARD_DEFAULT_CONFIG = {
84
86
  headingLevel: "h3",
85
87
  textAlign: "start",
86
88
  badgeStyle: "none",
89
+ // Shown on in the Inspector; the reader treats an absent value as framed all the same.
90
+ iconFramed: true,
87
91
  };
88
92
  export const PHI_CARD_WIDGET_DEFINITION = {
89
93
  kind: "widget",
@@ -223,6 +227,7 @@ export const PHI_CARD_WIDGET_DEFINITION = {
223
227
  step: 5,
224
228
  suffix: "%",
225
229
  },
230
+ { key: "imageOverlay", type: "background-overlay", label: "Overlay" },
226
231
  /* The icon and where it stands, under one divider: what else an icon will need goes here as well. */
227
232
  { key: "icon", type: "icon", heading: "Icon", label: "Icon" },
228
233
  {
@@ -239,6 +244,18 @@ export const PHI_CARD_WIDGET_DEFINITION = {
239
244
  // Shown with an icon, and not under the Center variant, which puts it over the picture itself.
240
245
  visibleWhen: [{ field: "icon", notEquals: null }, { field: "variant", notEquals: "center" }],
241
246
  },
247
+ {
248
+ key: "iconSize",
249
+ type: "choice",
250
+ label: "Icon size",
251
+ options: [
252
+ { value: "default", label: "Default" },
253
+ { value: "large", label: "Large" },
254
+ { value: "xlarge", label: "Extra large" },
255
+ ],
256
+ visibleWhen: { field: "icon", notEquals: null },
257
+ },
258
+ { key: "iconFramed", type: "boolean", label: "Icon ground", visibleWhen: { field: "icon", notEquals: null } },
242
259
  /* Left empty, the Theme's: the secondary text colour on its quietest fill. */
243
260
  {
244
261
  key: "iconColor",
@@ -254,7 +271,8 @@ export const PHI_CARD_WIDGET_DEFINITION = {
254
271
  label: "Background",
255
272
  mode: "single",
256
273
  defaultToken: "colorFillQuaternary",
257
- visibleWhen: { field: "icon", notEquals: null },
274
+ // Without a ground there is nothing to colour.
275
+ visibleWhen: [{ field: "icon", notEquals: null }, { field: "iconFramed", notEquals: false }],
258
276
  },
259
277
  /*
260
278
  * Where the whole card leads, and how it answers the pointer: only a card that leads somewhere has
@@ -170,6 +170,8 @@ export function PhiCardWidgetEditor({ config, onChange }) {
170
170
  iconPlacement: config.iconPlacement,
171
171
  iconColor: config.iconColor,
172
172
  iconBackground: config.iconBackground,
173
+ iconSize: config.iconSize,
174
+ iconFramed: config.iconFramed,
173
175
  textAlign: config.textAlign,
174
176
  headingLevel: config.headingLevel,
175
177
  /*
@@ -93,6 +93,8 @@ export async function PhiCardWidget({ labels, config, runtime, links, preview =
93
93
  iconPlacement: config?.iconPlacement,
94
94
  iconColor: config?.iconColor,
95
95
  iconBackground: config?.iconBackground,
96
+ iconSize: config?.iconSize,
97
+ iconFramed: config?.iconFramed,
96
98
  textAlign: config?.textAlign,
97
99
  headingLevel: config?.headingLevel,
98
100
  href: link?.href,
@@ -336,6 +336,16 @@ export declare const PHI_DESCRIPTION_WIDGET_DEFINITION: {
336
336
  editorPlacement?: "inspector" | "geometry" | "toolbar";
337
337
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
338
338
  heading?: string;
339
+ } & {
340
+ type: "background-overlay";
341
+ }) | ({
342
+ key: string;
343
+ label: string;
344
+ description?: string;
345
+ required?: boolean;
346
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
347
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
348
+ heading?: string;
339
349
  } & {
340
350
  type: "grid-placement" | "column-count";
341
351
  section?: string;
@@ -379,6 +379,16 @@ export declare const PHI_ENTRY_LIST_WIDGET_DEFINITION: {
379
379
  editorPlacement?: "inspector" | "geometry" | "toolbar";
380
380
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
381
381
  heading?: string;
382
+ } & {
383
+ type: "background-overlay";
384
+ }) | ({
385
+ key: string;
386
+ label: string;
387
+ description?: string;
388
+ required?: boolean;
389
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
390
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
391
+ heading?: string;
382
392
  } & {
383
393
  type: "grid-placement" | "column-count";
384
394
  section?: string;
@@ -349,6 +349,16 @@ export declare const PHI_GALLERY_WIDGET_DEFINITION: {
349
349
  editorPlacement?: "inspector" | "geometry" | "toolbar";
350
350
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
351
351
  heading?: string;
352
+ } & {
353
+ type: "background-overlay";
354
+ }) | ({
355
+ key: string;
356
+ label: string;
357
+ description?: string;
358
+ required?: boolean;
359
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
360
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
361
+ heading?: string;
352
362
  } & {
353
363
  type: "grid-placement" | "column-count";
354
364
  section?: string;
@@ -1,6 +1,6 @@
1
1
  import type { PhiMarkdownImageFloat, PhiMarkdownTextAlign } from "../../../../../types/core-widget-placements";
2
2
  import { type PhiMarkdownFoldSections } from "../../../../../components/widgets/shared/markdown-sections";
3
- import { type PhiMarkdownImageAspectRatio } from "../../../../../components/widgets/shared/markdown-image-vocabulary";
3
+ import { type PhiMarkdownImageAspectRatio, type PhiMarkdownImageFloatWidth } from "../../../../../components/widgets/shared/markdown-image-vocabulary";
4
4
  import { type PhiSpacingScaleKey } from "../../../../../components/widgets/config/spacing-options";
5
5
  import type { PhiCmsResolvedContent } from "../../../../../types/cms";
6
6
  import { type PhiBulletListStyle } from "../../../../../components/widgets/shared/bullet-list-vocabulary";
@@ -25,6 +25,11 @@ export type PhiCmsMarkdownWidgetConfig = PhiCmsWidgetConfigBase & {
25
25
  textAlign?: PhiMarkdownTextAlign;
26
26
  /** Pictures stand at this edge and the text flows past them; absent, a picture is a line of its own. */
27
27
  imageFloat?: PhiMarkdownImageFloat;
28
+ /**
29
+ * The step of the line every floated picture takes (`markdown-image-vocabulary.ts`); absent is `large`,
30
+ * text and picture in the golden ratio. A picture's own address may say otherwise (`width=small`).
31
+ */
32
+ imageFloatWidth?: PhiMarkdownImageFloatWidth;
28
33
  /**
29
34
  * How tall every Media picture standing on its own in the text is (`markdown-image-vocabulary.ts`);
30
35
  * absent is `auto`, the picture's own proportion. A picture's own address may say otherwise.
@@ -396,6 +401,16 @@ export declare const PHI_MARKDOWN_WIDGET_DEFINITION: {
396
401
  editorPlacement?: "inspector" | "geometry" | "toolbar";
397
402
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
398
403
  heading?: string;
404
+ } & {
405
+ type: "background-overlay";
406
+ }) | ({
407
+ key: string;
408
+ label: string;
409
+ description?: string;
410
+ required?: boolean;
411
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
412
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
413
+ heading?: string;
399
414
  } & {
400
415
  type: "grid-placement" | "column-count";
401
416
  section?: string;
@@ -1,6 +1,6 @@
1
1
  import { resolvePhiCmsWidgetPluginKey } from "../../../../../constants/cms-widget-types";
2
2
  import { readPhiMarkdownFoldSections, } from "../../../../../components/widgets/shared/markdown-sections";
3
- import { readPhiMarkdownImageAspectRatio, } from "../../../../../components/widgets/shared/markdown-image-vocabulary";
3
+ import { readPhiMarkdownImageAspectRatio, readPhiMarkdownImageFloatWidth, } from "../../../../../components/widgets/shared/markdown-image-vocabulary";
4
4
  import { PHI_SPACING_SCALE_KEYS } from "../../../../../components/widgets/config/spacing-options";
5
5
  import { PhiCmsWidgetType } from "../../../../../constants/cms-widget-types";
6
6
  import { buildPhiBulletListFields, PHI_BULLET_LIST_DEFAULT_STYLE, readPhiBulletListStyle, } from "../../../../../components/widgets/shared/bullet-list-vocabulary";
@@ -53,6 +53,7 @@ export function parsePhiCmsMarkdownWidgetConfig(config) {
53
53
  revalidateSeconds: readNumber(config.revalidateSeconds),
54
54
  textAlign: readMarkdownTextAlign(config.textAlign),
55
55
  imageFloat: readMarkdownImageFloat(config.imageFloat),
56
+ imageFloatWidth: readPhiMarkdownImageFloatWidth(config.imageFloatWidth),
56
57
  imageAspectRatio: readPhiMarkdownImageAspectRatio(config.imageAspectRatio),
57
58
  foldSections: readPhiMarkdownFoldSections(config.foldSections),
58
59
  faqStructuredData: readBoolean(config.faqStructuredData),
@@ -171,6 +172,22 @@ export const PHI_MARKDOWN_WIDGET_DEFINITION = {
171
172
  emptyOption: { value: "none", label: "None" },
172
173
  options: PHI_MARKDOWN_IMAGE_FLOAT_OPTIONS,
173
174
  },
175
+ /*
176
+ * Fixed steps of the line, never a measure: a floated picture takes this share and the text the rest.
177
+ * `large` is the default and stores nothing. A single picture says its own in its address (`width=small`).
178
+ * Shown without a float as well: a picture may float by its own address and takes this step then.
179
+ */
180
+ {
181
+ key: "imageFloatWidth",
182
+ type: "choice",
183
+ label: "Image Width",
184
+ emptyOption: { value: "large", label: "Large (golden)" },
185
+ options: [
186
+ { value: "small", label: "Small" },
187
+ { value: "medium", label: "Medium" },
188
+ { value: "xlarge", label: "Extra large" },
189
+ ],
190
+ },
174
191
  /*
175
192
  * Every picture standing on its own takes this box; one that needs another says so in its own address
176
193
  * (`phis:asset/12?ratio=16:9`, and `float=start|end|none` beside it). Automatic is the picture's own.
@@ -344,6 +344,16 @@ export declare const PHI_RESULT_WIDGET_DEFINITION: {
344
344
  editorPlacement?: "inspector" | "geometry" | "toolbar";
345
345
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
346
346
  heading?: string;
347
+ } & {
348
+ type: "background-overlay";
349
+ }) | ({
350
+ key: string;
351
+ label: string;
352
+ description?: string;
353
+ required?: boolean;
354
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
355
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
356
+ heading?: string;
347
357
  } & {
348
358
  type: "grid-placement" | "column-count";
349
359
  section?: string;
@@ -354,6 +354,16 @@ export declare const PHI_SIMPLE_TEXT_WIDGET_DEFINITION: {
354
354
  editorPlacement?: "inspector" | "geometry" | "toolbar";
355
355
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
356
356
  heading?: string;
357
+ } & {
358
+ type: "background-overlay";
359
+ }) | ({
360
+ key: string;
361
+ label: string;
362
+ description?: string;
363
+ required?: boolean;
364
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
365
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
366
+ heading?: string;
357
367
  } & {
358
368
  type: "grid-placement" | "column-count";
359
369
  section?: string;
@@ -370,6 +370,16 @@ export declare const PHI_TABLE_WIDGET_DEFINITION: {
370
370
  editorPlacement?: "inspector" | "geometry" | "toolbar";
371
371
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
372
372
  heading?: string;
373
+ } & {
374
+ type: "background-overlay";
375
+ }) | ({
376
+ key: string;
377
+ label: string;
378
+ description?: string;
379
+ required?: boolean;
380
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
381
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
382
+ heading?: string;
373
383
  } & {
374
384
  type: "grid-placement" | "column-count";
375
385
  section?: string;
@@ -717,6 +727,18 @@ export declare const PHI_TABLE_WIDGET_DEFINITION: {
717
727
  heading?: string;
718
728
  type: "surface";
719
729
  tone?: false;
730
+ } | {
731
+ visibleWhen: {
732
+ field: string;
733
+ notEquals: string;
734
+ };
735
+ key: string;
736
+ label: string;
737
+ description?: string;
738
+ required?: boolean;
739
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
740
+ heading?: string;
741
+ type: "background-overlay";
720
742
  } | {
721
743
  visibleWhen: {
722
744
  field: string;
@@ -1097,6 +1119,18 @@ export declare const PHI_TABLE_WIDGET_DEFINITION: {
1097
1119
  heading?: string;
1098
1120
  type: "surface";
1099
1121
  tone?: false;
1122
+ } | {
1123
+ visibleWhen: {
1124
+ field: string;
1125
+ equals: boolean;
1126
+ };
1127
+ key: string;
1128
+ label: string;
1129
+ description?: string;
1130
+ required?: boolean;
1131
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
1132
+ heading?: string;
1133
+ type: "background-overlay";
1100
1134
  } | {
1101
1135
  visibleWhen: {
1102
1136
  field: string;
@@ -8,6 +8,7 @@ import type { PhiRuntimeModuleCatalog } from "../../types/cms-plugins";
8
8
  import type { PhiBlockRuntime } from "../../types/widget-runtime";
9
9
  import { type PhiAccessViewer } from "../../types/access";
10
10
  import { type PhiAreaLandingSelection, type PhiPublicRoutePathAssignment } from "../../helpers/cms-area-config";
11
+ import type { PhiModuleMediaLoader } from "../../types/module-media";
11
12
  export declare function buildPhiCmsPresetIdentityKey(ownerModuleId: PhiRuntimeModuleId, presetKey: string): string;
12
13
  export declare function normalizePhiCmsRoutePath(value: string): `/${string}`;
13
14
  export declare function compilePhiCmsRoutePattern(descriptor: PhiCmsRoutePresetDescriptor): PhiCmsCompiledRoutePattern;
@@ -58,6 +59,22 @@ export declare function resolvePhiCmsActiveNavigationSurfaces({ catalog, area, a
58
59
  routeTable: PhiCmsActiveRouteTable;
59
60
  viewer?: PhiAccessViewer;
60
61
  }): readonly PhiCmsResolvedNavigationSurface[];
62
+ /**
63
+ * The Pages Module containers' folder addresses lead to by their descriptors (`folderTarget`), keyed by
64
+ * address; an address no Module container answers is not in the map.
65
+ *
66
+ * Asked where the Site's published Navigations name no target for an address -- a request no Page
67
+ * answers (`server-helpers/cms-request.ts`), a breadcrumb's folders -- so a Site's choice replaces the
68
+ * Module's, not the reverse. Every surface of the Area is searched once, because a folder address is the
69
+ * Area's, not one menu's.
70
+ */
71
+ export declare function resolvePhiCmsModuleNavigationFolderTargets(input: {
72
+ catalog: PhiCmsCompiledDescriptorCatalog;
73
+ area: PhiCmsAreaKey;
74
+ activeModuleIds: ReadonlySet<PhiRuntimeModuleId>;
75
+ routeTable: PhiCmsActiveRouteTable;
76
+ addresses: readonly string[];
77
+ }): Map<string, string>;
61
78
  export declare function resolvePhiCmsNavigationOverlay(surface: PhiCmsResolvedNavigationSurface, overlay: PhiCmsNavigationOverlay | null): PhiCmsNavigationOverlayResolution;
62
79
  export declare function resolvePhiCmsRoutePreset(table: PhiCmsActiveRouteTable, requestedPath: string): PhiCmsRoutePresetBinding | null;
63
80
  export declare function resolvePhiCmsRoutePresetByPageId(table: PhiCmsActiveRouteTable, pageId: PhiCmsInstanceId): PhiCmsRoutePresetBinding | null;
@@ -88,7 +105,7 @@ type PhiCmsPresetTreeForm = {
88
105
  * cannot see (one stored on the Site, one of a Module outside the catalog) is not judged.
89
106
  */
90
107
  export declare function assertPhiCmsPresetTreeContract(tree: PhiResolvedCmsPageTree, expectedPage?: PhiCmsPageNode, forms?: ReadonlyMap<string, PhiCmsPresetTreeForm>): void;
91
- export declare function composePhiCmsActiveAreaOverlayPresets({ tree, catalog, activeModuleIds, siteId, area, path, runtime, }: {
108
+ export declare function composePhiCmsActiveAreaOverlayPresets({ tree, catalog, activeModuleIds, siteId, area, path, runtime, loadModuleMedia, }: {
92
109
  tree: PhiResolvedCmsAreaPresetTree;
93
110
  catalog: PhiCmsCompiledDescriptorCatalog;
94
111
  activeModuleIds: ReadonlySet<PhiRuntimeModuleId>;
@@ -96,21 +113,24 @@ export declare function composePhiCmsActiveAreaOverlayPresets({ tree, catalog, a
96
113
  area: PhiCmsAreaKey;
97
114
  path: string;
98
115
  runtime: PhiBlockRuntime;
116
+ loadModuleMedia: PhiModuleMediaLoader;
99
117
  }): Promise<PhiResolvedCmsAreaPresetTree>;
100
- export declare function instantiatePhiCmsAreaShellPreset({ binding, catalog, siteId, path, runtime, }: {
118
+ export declare function instantiatePhiCmsAreaShellPreset({ binding, catalog, siteId, path, runtime, loadModuleMedia, }: {
101
119
  binding: PhiCmsAreaShellPresetBinding;
102
120
  catalog: PhiCmsCompiledDescriptorCatalog;
103
121
  siteId: number;
104
122
  path: string;
105
123
  runtime: PhiBlockRuntime;
124
+ loadModuleMedia: PhiModuleMediaLoader;
106
125
  }): Promise<PhiResolvedCmsPageTree>;
107
- export declare function instantiatePhiCmsRoutePreset({ binding, catalog, activeModuleIds, siteId, path, runtime, resolveMissingPageTitle, }: {
126
+ export declare function instantiatePhiCmsRoutePreset({ binding, catalog, activeModuleIds, siteId, path, runtime, loadModuleMedia, resolveMissingPageTitle, }: {
108
127
  binding: PhiCmsRoutePresetBinding;
109
128
  catalog: PhiCmsCompiledDescriptorCatalog;
110
129
  activeModuleIds: ReadonlySet<PhiRuntimeModuleId>;
111
130
  siteId: number;
112
131
  path: string;
113
132
  runtime: PhiBlockRuntime;
133
+ loadModuleMedia: PhiModuleMediaLoader;
114
134
  resolveMissingPageTitle?: (sourceTitle: string) => string | Promise<string>;
115
135
  }): Promise<PhiResolvedCmsPageTree>;
116
136
  export {};