@taprootio/site-authoring 0.41.1 → 0.55.0

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 (78) hide show
  1. package/README.md +50 -0
  2. package/examples/riverbend-wellness/settings/site-publishing-preferences.json +3 -0
  3. package/examples/riverbend-wellness/settings/taproot-styles.json +11 -0
  4. package/package.json +4 -3
  5. package/src/api.js +170 -11
  6. package/src/appearance-contract.js +278 -8
  7. package/src/authored-tag-names.js +88 -0
  8. package/src/block-flow.js +103 -1
  9. package/src/brand-color.js +39 -4
  10. package/src/breadcrumb-artwork.js +234 -0
  11. package/src/breadcrumb-separators.js +11 -0
  12. package/src/changelog.json +154 -0
  13. package/src/chrome-features.js +152 -0
  14. package/src/chrome-input.js +147 -0
  15. package/src/chrome-output.js +92 -0
  16. package/src/chrome-paint-catalog-taproot.json +52 -0
  17. package/src/chrome-report.js +173 -0
  18. package/src/cli.js +48 -17
  19. package/src/content/components.js +27 -4
  20. package/src/content/external-link.js +2 -1
  21. package/src/content/markdown.js +271 -101
  22. package/src/content/tiptap-prosemirror.ts +125 -43
  23. package/src/content/validate-document.js +4 -1
  24. package/src/content-inset.js +48 -0
  25. package/src/errors.js +1 -0
  26. package/src/espalier-shared.js +26 -0
  27. package/src/field-suggestions.js +40 -0
  28. package/src/fixture-init.js +22 -5
  29. package/src/font-catalog.js +11 -1
  30. package/src/footer-brand-inputs.js +25 -2
  31. package/src/footer-content.js +38 -0
  32. package/src/footer-contract.js +11 -0
  33. package/src/footer-cta-styles.js +6 -0
  34. package/src/footer-draft-hash.js +4 -2
  35. package/src/footer-fit.js +62 -15
  36. package/src/footer-workspace.js +60 -16
  37. package/src/header-presentation.js +16 -0
  38. package/src/latest-posts-tags.js +57 -0
  39. package/src/page-structure-checks.js +5 -0
  40. package/src/page-tag-badge-modes.js +6 -0
  41. package/src/page-tag-writes.js +158 -0
  42. package/src/page-type-tags.js +16 -0
  43. package/src/presentation-reference.js +312 -86
  44. package/src/recipe-page-options.js +22 -0
  45. package/src/recipe-step-contract.js +164 -0
  46. package/src/recipe-step-contract.json +65 -0
  47. package/src/reference-help.js +164 -78
  48. package/src/session.js +39 -24
  49. package/src/setting-reference.js +239 -48
  50. package/src/settings-catalog.js +63 -0
  51. package/src/site-check-findings.js +25 -5
  52. package/src/site-check-rules.json +3 -1
  53. package/src/site-health-findings.js +13 -13
  54. package/src/site-navigation-groups.js +70 -0
  55. package/src/styling-fixed-values.js +71 -0
  56. package/src/tag-destination-warnings.js +35 -0
  57. package/src/template-token-reach.json +242 -0
  58. package/src/theme-proposals.js +18 -27
  59. package/src/theme-resolve.js +305 -51
  60. package/src/theme-validation.js +126 -6
  61. package/src/token-reach.js +222 -0
  62. package/src/typed-page-reference.js +72 -15
  63. package/src/typed-pages.js +171 -71
  64. package/src/verbs/deploy.js +6 -0
  65. package/src/verbs/footer-push.js +30 -5
  66. package/src/verbs/forms-push.js +11 -3
  67. package/src/verbs/pages-delete.js +19 -10
  68. package/src/verbs/pages-push.js +125 -36
  69. package/src/verbs/plan.js +10 -4
  70. package/src/verbs/pull.js +277 -67
  71. package/src/verbs/staging-review.js +27 -1
  72. package/src/verbs/status.js +22 -0
  73. package/src/verbs/theme-push.js +249 -120
  74. package/src/verbs/theme-resolve.js +310 -47
  75. package/src/verbs/validate.js +71 -17
  76. package/src/workspace-check.js +37 -4
  77. package/src/workspace.js +37 -1
  78. package/test/fixtures/default-site-theme.json +516 -0
@@ -1,5 +1,8 @@
1
1
  import { readFileSync } from "node:fs";
2
2
 
3
+ import { FOOTER_DRAFT_VERSION } from "./footer-content.js";
4
+ import { FOOTER_CTA_STYLES } from "./footer-cta-styles.js";
5
+
3
6
  import { computeThemeProperties } from "@taprootio/espalier/shared/theme-properties";
4
7
 
5
8
  import {
@@ -27,8 +30,14 @@ import {
27
30
  APPEARANCE_READ_ONLY_FIELDS,
28
31
  APPEARANCE_SCALAR_FIELDS,
29
32
  } from "./appearance-contract.js";
33
+ import {
34
+ CHROME_NAVIGATION_UNAVAILABLE_MESSAGE,
35
+ CHROME_OFFLINE_PAGE_LIMITATION,
36
+ CHROME_REPORT_NAME_RULE,
37
+ } from "./chrome-input.js";
30
38
  import { CLI_BINARY_NAME } from "./constants.js";
31
- import { LOGO_VARIANTS } from "./header-presentation.js";
39
+ import { getSettableComponentProperties } from "./espalier-shared.js";
40
+ import { APPEARANCE_FIXED_VALUES, FOOTER_FIXED_VALUES, FOOTER_LINK_DEFAULTS, formatFixedValues } from "./styling-fixed-values.js";
32
41
  import { FOOTER_LOGO_BOX, FOOTER_LOGO_SCALE_LIMITS } from "./footer-branding.js";
33
42
  import { FOOTER_ALIGNMENT_LAYOUTS, FOOTER_POSITION_VALUES, FOOTER_TEXT_ALIGN_VALUES } from "./footer-alignment.js";
34
43
  import {
@@ -38,22 +47,25 @@ import {
38
47
  FOOTER_FIELD_INVENTORY,
39
48
  FOOTER_LIMITS,
40
49
  FOOTER_READ_ONLY_FIELDS,
50
+ projectFooterSettingsForWorkspace,
41
51
  SOCIAL_LINK_URL_REQUIREMENT,
42
52
  SOCIAL_PLATFORM_KEYS,
43
53
  validateFooterDocument,
44
54
  } from "./footer-contract.js";
45
55
  import {
46
56
  describeSettingField,
57
+ formatDefaultRendering,
58
+ formatReferenceDefault,
59
+ formatSettingSizes,
47
60
  formatSettingsReference,
48
61
  PAGE_BACKGROUND_IMAGE_RENDERING,
49
62
  PAGE_BACKGROUND_VERSUS_CANVAS,
50
63
  } from "./setting-reference.js";
51
- import { SETTINGS_TYPE_SITE_PUBLISHING_PREFERENCES, SETTINGS_TYPE_TAPROOT_STYLES } from "./settings-catalog.js";
64
+ import { SETTINGS_TYPE_BRAND, SETTINGS_TYPE_SITE_PUBLISHING_PREFERENCES, SETTINGS_TYPE_TAPROOT_STYLES } from "./settings-catalog.js";
52
65
  import {
53
66
  APPEARANCE_COLOR_CONSTRAINT,
54
67
  MAXIMUM_THEME_OPEN_MAP_ENTRIES,
55
68
  MAXIMUM_THEME_OPEN_MAP_KEY_SCALARS,
56
- REQUIRED_THEME_PROPERTIES,
57
69
  validateAndLintThemePair,
58
70
  } from "./theme-validation.js";
59
71
 
@@ -61,26 +73,15 @@ let espalierVersion;
61
73
 
62
74
  function getEspalierVersion() {
63
75
  espalierVersion ??= JSON.parse(
64
- readFileSync(new URL("../package.json", import.meta.url), "utf8"),
65
- ).dependencies["@taprootio/espalier"];
76
+ readFileSync(new URL("package.json", import.meta.resolve("@taprootio/espalier/espalier.token-manifest.json")), "utf8"),
77
+ ).version;
66
78
  return espalierVersion;
67
79
  }
68
80
 
69
- const OPTIONAL_THEME_FIELDS = Object.freeze([
70
- "explicitMappingTokens",
71
- "boxBackgroundImage",
72
- "boxBackgroundImageOpacity",
73
- "vellumOpacity",
74
- "vellumBackgroundImage",
75
- "vellumBackgroundImageOpacity",
76
- ]);
77
-
78
- export const THEME_FIELD_NAMES = Object.freeze([
79
- ...REQUIRED_THEME_PROPERTIES,
80
- ...OPTIONAL_THEME_FIELDS,
81
- ]);
81
+ export { OPTIONAL_THEME_FIELDS, THEME_FIELD_NAMES } from "./theme-validation.js";
82
82
 
83
83
  const THEME_FIELD_TYPES = Object.freeze({
84
+ componentProperties: "object",
84
85
  explicitMappingTokens: "semantic-token[]",
85
86
  stylesheets: "string[]",
86
87
  pageBackgroundImage: "string",
@@ -182,7 +183,8 @@ const THEME_GROUPS = Object.freeze([
182
183
  maximumNameScalars: MAXIMUM_THEME_OPEN_MAP_KEY_SCALARS,
183
184
  }),
184
185
  themeField("roles", "Closed map of designer-facing functional color roles.", { keys: ROLE_NAMES }),
185
- themeField("contexts", "Open map of named zone-level role, lightness, tone, and mapping rebindings.", {
186
+ themeField("contexts", "Open map of named zones with role, lightness, tone, mapping, and component property overrides. "
187
+ + "See taproot-site help tokens for the header and footer hairlines under border.", {
186
188
  additionalProperties: true,
187
189
  maximumEntries: MAXIMUM_THEME_OPEN_MAP_ENTRIES,
188
190
  }),
@@ -290,7 +292,8 @@ const THEME_GROUPS = Object.freeze([
290
292
  "pageBackgroundImage",
291
293
  "CSS background-image (the app's Page style > Background image). " + PAGE_BACKGROUND_IMAGE_RENDERING
292
294
  + " Today it is a CSS url(...) of a delivered image, the src that .taproot-site-media.json records; it tiles "
293
- + "at the image's natural pixel size from the top-left. The complete Taproot workspace includes an empty value.",
295
+ + "at the image's natural pixel size from the top-left. See canvas image in help appearance for the "
296
+ + "separate side margins. The complete Taproot workspace includes an empty value.",
294
297
  ),
295
298
  themeField(
296
299
  "pageBackgroundImageOpacity",
@@ -304,6 +307,13 @@ const THEME_GROUPS = Object.freeze([
304
307
  themeField("vellumBackgroundImageOpacity", "Optional vellum image opacity.", { minimum: 0, maximum: 1 }),
305
308
  ]),
306
309
  }),
310
+ Object.freeze({
311
+ name: "component-properties",
312
+ summary: "Set supported component styles in a scheme or a named context.",
313
+ fields: Object.freeze([
314
+ themeField("componentProperties", "Optional map of Espalier's settable CSS property names to authored values."),
315
+ ]),
316
+ }),
307
317
  ]);
308
318
 
309
319
  /**
@@ -356,8 +366,9 @@ export const ROLE_RESOLUTION = Object.freeze({
356
366
  "Otherwise the token is compiled from the roles, and an APCA contrast check may nudge an action or ink stop so "
357
367
  + "the pair stays readable.",
358
368
  "Otherwise the Espalier default mapping applies.",
359
- "A context rebinds roles, lightness, tones and pins for one zone with the same precedence inside that zone; its "
360
- + "pins need no explicitMappingTokens.",
369
+ "A context rebinds roles, lightness, tones and pins for one zone with the same precedence inside that zone. A root "
370
+ + "pin applies inside every context unless that context pins the token itself. theme resolve shows the inherited "
371
+ + "pin as inherited_pin.",
361
372
  ]),
362
373
  });
363
374
 
@@ -400,6 +411,14 @@ function assertExampleContrast(theme, scheme) {
400
411
  }
401
412
  }
402
413
 
414
+ const HEADING_AND_QUOTE_COLORS = Object.freeze([
415
+ "Per-level colors apply to native h1–h4 under esp-root, including prose, folder, archive, not-found, docs, and profile headings. The published page title uses the h1 color and the recipe card title uses the h2 color. Ingredients and group headings use their own rendered levels.",
416
+ "Light-DOM component headings can inherit those colors, such as a slotted product-grid title. Component shadow headings and locally styled chrome headings keep the semantic headings color.",
417
+ "The editor and app draft preview color an authored h3 as h3. If publishing normalizes it to h2, the published page uses the h2 color.",
418
+ "Set --esp-blockquote-bar-color for the quote bar and --esp-blockquote-glyph-color for the glyph. The glyph follows the bar when unset. The quote fill stays at layer1.",
419
+ "Espalier measures heading overrides against the scheme or context background at APCA Lc 60. The recipe card paints on layer1, where the same heading may have lower contrast.",
420
+ ]);
421
+
403
422
  export function getThemeReference() {
404
423
  const version = getEspalierVersion();
405
424
  return {
@@ -411,6 +430,8 @@ export function getThemeReference() {
411
430
  completeBaselineRequired: true,
412
431
  nestedMergeGroups: NESTED_THEME_KEYS,
413
432
  groups: THEME_GROUPS,
433
+ componentProperties: structuredClone(getSettableComponentProperties()),
434
+ headingAndQuoteColors: HEADING_AND_QUOTE_COLORS,
414
435
  vocabulary: {
415
436
  roles: ROLE_NAMES,
416
437
  colorSources: COLOR_SOURCES,
@@ -426,7 +447,7 @@ export function getThemeReference() {
426
447
  "Check the filled action before anything else looks finished. Its ramp stop is chosen by the engine near a mid-band target rather than named by the theme, so seating the ramp — the remedy for every other anchored token — cannot move it, and declaring an action role does not either. The only lever is pinning semanticMappings.actionBackground.",
427
448
  "A brand colour between roughly L 0.55 and L 0.83 cannot be a button surface at its own lightness: across that band no ink, not even pure black, reaches the Lc 75 APCA asks of a button label. Espalier then walks the label to the far end of the ramp and the button renders inverted — a dark surface carrying a pale label where the swatch wanted the opposite. Pin the stop just past the band instead. A gold at L 0.81 pinned to a tone at L 0.85 carries a dark label at Lc 76; the same gold left to the engine compiles to a brown one.",
428
449
  "Name a tone as a lowercase slug — gold-band, not goldBand. theme push refuses any other name, and refuses a mapping that names a tone its theme or context never declares.",
429
- "Run taproot-site theme resolve (offline; add --scheme, --context, or --json) after every edit to see what the theme compiles to: for the root page and each context in both schemes, every semantic color as oklch and hex, whether it is compiled from the roles or pinned (origin compiled, pinned, inherited_pin), and the WCAG contrast of each ink-on-surface pair Espalier defines against AA (4.5:1 text, 3:1 large text and UI). A pair under AA is listed in flags as theme.contrast_text_below_aa with the field to edit; it never fails the run, so decide whether it is a deliberate choice. theme resolve --site shows the site's stored theme for comparison.",
450
+ "Run taproot-site theme resolve (offline; add --scheme, --context, or --json) after every edit to see what the theme compiles to: for the root page and each context in both schemes, every semantic color as oklch and hex, whether it is compiled from the roles or pinned (origin compiled, pinned, inherited_pin), and the WCAG ratios for semantic and site-chrome pairs against AA (4.5:1 text, 3:1 large text and UI). Paired component properties show Espalier's APCA measurements and adjustment. A pair under AA is listed in flags as theme.contrast_text_below_aa with the field to edit; it never fails the run, so decide whether it is a deliberate choice. theme resolve --site shows the site's stored theme for comparison.",
430
451
  "theme push runs Espalier's fit report over the root and every context in both schemes and lists each finding as a warning reading 'fit lint <id>'; theme push --dry-run does the same and writes nothing, and validate does it for an offline fixture. Read the lints before calling a theme done: action-anchor-inversion names a filled action that rendered the opposite way round from the swatches it declares, apca-target-unmet names a pair enforcement could not rescue, and action-canvas-separation and link-hover-ordering cover an action lost in its canvas and a hover weaker than its link. A lint is a warning, not a refusal, so a push still goes through with one — the lints are what tell an agent the design did not survive the compile. Contrast and status-color warnings end with 'Nearest passing value: …' when the CLI finds one: it applied that value to a copy of the theme and checked that the warning clears without raising another, so start there and check again. validate and theme push refuse a font weight a catalog family has no face for (theme.font_weight_unavailable), because the publish would fail, and name the nearest weight it has.",
431
452
  "Add named contexts for whole zones, including inverted zones, and rebind lightness when the zone changes brightness. A context that declares its own action needs its own actionBackground pin: without one it compiles at the engine's mid-band stop, and where the root is pinned it carries the root's pin instead, whatever action colour the context declares.",
432
453
  "Tune typography, type/space ratios, radii, and viewport interpolation as one layout system.",
@@ -449,24 +470,34 @@ function appearanceColorReference(definition) {
449
470
  : {};
450
471
  }
451
472
 
473
+ const TAG_LISTING_WORKFLOW = Object.freeze([
474
+ "Set tags: [Soups] on your recipes (see help recipe), then run pages push.",
475
+ 'Create pages/soups.md with an introduction and a component:latest-posts fence containing {"tags":["Soups"],"count":"all"}.',
476
+ "Run pages push and pull, then find the /soups page's resourceId in .taproot-site-manifest.json.",
477
+ 'In settings/site-publishing-preferences.json set settings.tagDestinations to {"Soups":"<resourceId>"} '
478
+ + 'and pageTagBadges to "page-and-cards". Teammates need Design permission (site.theme.manage) for these settings.',
479
+ "Run validate, preview with theme push --dry-run, then run theme push. Approve the pages and deploy to staging.",
480
+ "The Soups badge on each published recipe and card opens /soups. Taproot does not generate tag pages.",
481
+ ]);
482
+
452
483
  export function getAppearanceReference() {
453
484
  const scalarFields = APPEARANCE_SCALAR_FIELDS.map((field) => ({
454
485
  file: APPEARANCE_FILES[field.settingsType],
455
486
  path: "settings." + field.name,
456
487
  ...describeSettingField(field.settingsType, field.name),
457
488
  type: field.type,
458
- ...(field.values ? { values: field.values } : {}),
489
+ ...(field.values ? { values: [...field.values] } : {}),
459
490
  ...(field.minimum !== undefined ? { minimum: field.minimum, maximum: field.maximum } : {}),
460
491
  ...(field.maximumLength !== undefined ? { maximumLength: field.maximumLength } : {}),
461
492
  ...(field.step !== undefined ? { step: field.step } : {}),
462
493
  ...(field.optional ? { optional: true } : {}),
463
494
  ...appearanceColorReference(field),
464
- default: field.default,
465
495
  }));
466
496
  return {
467
497
  title: "Site appearance workspace and theme-push contract",
468
498
  referenceKind: "appearance",
469
499
  usage: CLI_BINARY_NAME + " theme push",
500
+ fixedValues: structuredClone(APPEARANCE_FIXED_VALUES),
470
501
  fields: [
471
502
  {
472
503
  file: APPEARANCE_FILES[SETTINGS_TYPE_TAPROOT_STYLES],
@@ -484,19 +515,19 @@ export function getAppearanceReference() {
484
515
  ...APPEARANCE_FOOTER_FIELDS.map(field => ({
485
516
  file: field.file,
486
517
  path: field.path,
487
- appLabel: field.name === "context" ? "Footer > Colors" : "Footer > Logo",
488
- description: field.name === "context"
489
- ? "The footer's theme context, declared in both schemes; empty follows the page. Theme push owns it."
490
- : "The footer's artwork choice: empty matches the scheme; light or dark forces that effective footer artwork after per-scheme overrides. Theme push owns it.",
491
- renders: "Everything in the enabled footer, including its background, text, links and controls.",
492
- type: field.type,
493
- ...(field.values ? { values: field.values } : {}),
518
+ ...describeFooterField("FooterSettings", field.name),
494
519
  optional: field.optional,
495
- default: field.default,
496
520
  })),
497
521
  ],
498
- readOnlyProjections: APPEARANCE_READ_ONLY_FIELDS,
522
+ readOnlyProjections: APPEARANCE_READ_ONLY_FIELDS.map((field) => ({
523
+ ...field,
524
+ ...describeSettingField(
525
+ field.file === APPEARANCE_FILES[SETTINGS_TYPE_BRAND] ? SETTINGS_TYPE_BRAND : SETTINGS_TYPE_TAPROOT_STYLES,
526
+ field.path.slice("settings.".length),
527
+ ),
528
+ })),
499
529
  pageBackgroundVersusCanvas: PAGE_BACKGROUND_VERSUS_CANVAS,
530
+ tagListingWorkflow: TAG_LISTING_WORKFLOW,
500
531
  fieldMap: CLI_BINARY_NAME
501
532
  + " help settings maps every pulled field, including the read-only ones, to its app control.",
502
533
  imageReferences:
@@ -522,6 +553,15 @@ export function getAppearanceReference() {
522
553
  + "header at desktop and compact/mobile widths. Transparent pixels provide no contrast: inspect the visible mark, "
523
554
  + "not its canvas bounds. When one asset does not remain distinct in both schemes, supply scheme-specific logo "
524
555
  + "assets rather than relying on a shadow, outline, or header color that has not been previewed.",
556
+ chromeContrastContract:
557
+ "Theme resolve, validate and theme push check registered header and footer text, icons and focus indicators against the "
558
+ + "base colors they use in both schemes. Text needs 4.5:1. Icons and focus indicators need 3:1. Inspect "
559
+ + "background artwork and states outside the audited interactions on staging. "
560
+ + `Offline reports leave ${CHROME_OFFLINE_PAGE_LIMITATION} unchecked. `
561
+ + "A staged edit to a live page or a truncated inventory can leave its production path unknown. "
562
+ + "Settings-only Docs validation lacks the navigation and page inventory for navigation and footer page links. "
563
+ + CHROME_NAVIGATION_UNAVAILABLE_MESSAGE + " When report-name display eligibility is unknown, only validate "
564
+ + `lists ${CHROME_REPORT_NAME_RULE} in siteChecks.skipped.`,
525
565
  headerWidthContract: "headerWidth 'contained' keeps the brand and the header buttons at the page content edges; "
526
566
  + "'wide' moves them to the viewport edges. Pages with root-band components (image-banner) span the viewport, "
527
567
  + "so full-bleed designs usually pair headerWidth 'wide' with headerLayout 'centered-menu', which keeps the "
@@ -534,7 +574,35 @@ export function getAppearanceReference() {
534
574
  + "A heading's top margin scales the same way. The last text block in a padded section gets the gap as extra "
535
575
  + "room before the section ends, and an image banner stays flush with its neighbors. A spacer block adds its "
536
576
  + "own height to the gap, so review spacers placed by hand. A site shows the change after its next whole-site "
537
- + "render.",
577
+ + "render. Heading spacing fields take canonical strings from 0 to 6 rem in 0.25 steps, with no units, "
578
+ + 'leading zeroes or trailing decimal zeroes. For example, "2.5" sets two and a half rem, "0" sets an '
579
+ + "exact zero gap, and an empty string follows Block spacing. Each value sets the distance between an "
580
+ + "authored heading and an eligible immediate sibling. Together, the heading’s before value takes precedence "
581
+ + "over the previous heading’s after value, including zero. Page preview styles its authored levels. Published "
582
+ + "pages and staged server preview use the normalized published outline. Content edges and boundaries beside "
583
+ + "banners, spacers, layout-empty blocks or unclassified elements follow Block spacing. A flow with a float "
584
+ + "or an inheriting image whose effective placement is unknown also keeps the preset. An authored body with "
585
+ + "adopted content or an integration placement keeps the preset throughout its sections and columns. "
586
+ + "Headings outside authored flows, such as generated introductions and managed static output, keep their original geometry. "
587
+ + "For article, album, recipe and place review titles, headingH1SpaceAfter also customizes the gap to the first metadata row. "
588
+ + "By default, the gaps from the title to metadata and from the byline to tags follow Block spacing. "
589
+ + "The header has its own gap before the body.",
590
+ breadcrumbContract:
591
+ "On Standard sites, published breadcrumb trails show folder ancestors only. breadcrumbSeparator chooses the mark between crumbs, "
592
+ + "so it needs at least two folder ancestors to be visible. breadcrumbTrailEnd chooses the mark after the last "
593
+ + "ancestor, with 'same' using the separator and 'none' hiding the end. The marks are site-wide. Set "
594
+ + "--esp-breadcrumb-separator-color and --esp-breadcrumb-separator-size in each scheme's theme component properties. "
595
+ + "Set --esp-breadcrumb-separator-stroke-width to a number string from 0.5 to 6 (default 2) for built-in chevron, line-arrow and slash. "
596
+ + 'For custom artwork, set breadcrumbSeparatorArtwork or breadcrumbTrailEndArtwork under settings in taproot-styles.json '
597
+ + 'to { "file": "sprig.svg", "color": "theme" }. The file path is relative to the workspace. Theme color follows each scheme. '
598
+ + 'Use "original" to keep solid artwork colors. Pull returns the normalized geometry, which can be kept or replaced with a new file. '
599
+ + 'Set an artwork field to "" to restore its preset. Custom between-crumb marks mirror in right-to-left trails. '
600
+ + "A separate end mark keeps its orientation. The 'same' end reuses the between-crumb mark. "
601
+ + "Use an ASCII SVG up to 8 KiB with one positive viewBox and 1 to 16 direct paths, up to 1024 characters each. "
602
+ + "Use solid #RGB, #RRGGBB, currentColor or none paints and optional numeric stroke width from 0 to 64. "
603
+ + "Separate viewBox numbers and arc flags with spaces. Coordinates must fit ±32768. "
604
+ + "Groups, transforms, styles, links, XML declarations, DOCTYPE and scripts are refused. "
605
+ + "An invalid file reports theme.breadcrumb_artwork_invalid and names the file.",
538
606
  menuContract:
539
607
  "navDrawerStyle 'full-screen' (the published default) opens the mobile menu over the whole viewport with the "
540
608
  + "brand centered above large centered items and navDrawerTransition choosing how it appears (fade, slide-down, "
@@ -544,7 +612,8 @@ export function getAppearanceReference() {
544
612
  + "fontMenu falls back to the body font, never to headings.",
545
613
  changeSet: [
546
614
  "the footer context and logo variant, saved alongside the theme and header presentation",
547
- "default scheme, assets, favicon, and header scalars",
615
+ "default scheme, assets, favicon, breadcrumb marks, heading spacing and header scalars",
616
+ "recipeJumpControl, recipeTagsIcon, recipeTagsContent, tag bar colors, pageTagBadges and optional destination maps in settings/site-publishing-preferences.json",
548
617
  "the complete light theme and the complete dark theme",
549
618
  ],
550
619
  atomic: true,
@@ -553,9 +622,12 @@ export function getAppearanceReference() {
553
622
  + "the fields theme push writes — from one snapshot, so the recorded baseline is the revision of the "
554
623
  + "documents the workspace holds; theme push sends it back as the baseline. The whole change set commits in "
555
624
  + "one transaction or none of it does; a change to any of those fields since the pull refuses the push "
556
- + "(theme.concurrent_modification) and nothing is written. Footer prose, links and imagery, and the "
557
- + "publishing scalars are outside the revision, so an unrelated concurrent edit is preserved rather than "
558
- + "refused. Footer content saves retain the stored context and cannot adopt an unrelated newer presentation baseline.",
625
+ + "(theme.concurrent_modification) and nothing is written. The revision includes recipeJumpControl, recipeTagsIcon and pageTagBadges "
626
+ + "when they differ from their defaults. The same holds for breadcrumbSeparator and breadcrumbTrailEnd. "
627
+ + "The revision includes each nonempty heading spacing override, including zero, the tag bar overrides and both destination maps. "
628
+ + "Footer prose, links and imagery and the other publishing scalars are "
629
+ + "outside the revision, so concurrent edits to those values are preserved. Footer content saves retain the "
630
+ + "stored context and cannot adopt an unrelated newer presentation baseline.",
559
631
  dryRun: CLI_BINARY_NAME + " theme push --dry-run reads the site, lists the JSON paths at which each settings file "
560
632
  + "differs from it, and says whether the recorded baseline is still current or a pending save of the same "
561
633
  + "change set would be replayed; it writes nothing.",
@@ -573,7 +645,8 @@ export function getAppearanceReference() {
573
645
  "Set site-header.context and footerSettings.context to a name declared by both themes, or empty to follow the page. Deleting either key clears it on theme push. Invalid names fail settings.context_unknown; dropping a context a surface still uses fails theme.context_in_use. Repoint the surface and drop the old context in one atomic push.",
574
646
  footerColorMigration:
575
647
  "Before upgrading a site with custom footer colors, pull and record its five values per scheme. In each theme declare a context: the background is layer2, text is ink.color, headings are ink.heading, links are accent.text and hover is accent.hover. Add named color anchors for literal values and bind those roles to the anchors. For a semantic background such as --esp-color-layer-1, copy that token's source/lightness mapping into the context's semanticMappings.layer2. Set footerSettings.context to the shared name, remove backgroundColor/textColor/headingColor/linkColor/linkHoverColor from both footer schemes, then theme push. Retired keys fail appearance.retired_footer_color; images, fade and padding remain footer content.",
576
- footerContentGuard: "theme push refuses while settings.footerSettings carries unpushed content edits: "
648
+ footerContentGuard: "theme push --dry-run includes unpushed local footer content in its checks and reports the "
649
+ + "footerContent differences separately. A live theme push refuses while settings.footerSettings carries unpushed content edits: "
577
650
  + "theme.unpushed_footer_content names " + CLI_BINARY_NAME + " footer push to save them "
578
651
  + "(" + CLI_BINARY_NAME + " pull discards them). A workspace pulled before this baseline "
579
652
  + "fails theme.pull_required; footer push records it non-destructively, while pull "
@@ -581,44 +654,85 @@ export function getAppearanceReference() {
581
654
  };
582
655
  }
583
656
 
657
+ const FOOTER_DEFAULTS = projectFooterSettingsForWorkspace({});
658
+ const FOOTER_SCHEME_DEFAULTS = FOOTER_DEFAULTS.light;
659
+ const FOOTER_LOGO_RENDERS = "The brand logo in the enabled footer, in this color scheme.";
660
+ const FOOTER_BACKGROUND_RENDERS = "The background behind the enabled footer content, in this color scheme.";
584
661
  const FOOTER_FIELD_DETAILS = Object.freeze({
585
- "FooterSettings.logoVariant": { type: "enum", values: LOGO_VARIANTS, default: "", description: "Theme-owned artwork choice: empty matches the scheme, light or dark forces that effective footer artwork. Footer push strips it and retains the local choice; auto is refused." },
662
+ "FooterSettings.logoVariant": {
663
+ appLabel: "Footer > Logo",
664
+ description: "Theme-owned artwork choice: empty matches the scheme. Light or dark forces that scheme's effective artwork after its footer override. Footer push strips it and retains the local choice. Only empty, light and dark are accepted.",
665
+ renders: "The brand logo in the enabled footer.",
666
+ },
586
667
  "FooterSettings.context": {
587
- type: "theme-context",
588
- default: "",
668
+ appLabel: "Footer > Colors",
589
669
  description:
590
- "Theme-owned Colors choice; declare the name in both schemes and save it with theme push. Footer push preserves local presentation edits and never sends this field.",
670
+ "Theme-owned color context. Empty follows the page. Declare the name in both schemes and save it with theme push. Footer push preserves local presentation edits.",
671
+ renders: "The enabled footer's background, text, links and controls.",
672
+ },
673
+ "FooterSettings.enabled": {
674
+ type: "boolean",
675
+ renders: "Controls whether every published page has the configured footer.",
676
+ },
677
+ "FooterSettings.showBrand": {
678
+ type: "boolean",
679
+ renders: "Controls whether the enabled footer includes the brand region.",
680
+ },
681
+ "FooterSettings.showBrandText": {
682
+ type: "boolean",
683
+ renders: "Shows the name in the enabled footer's brand region when the brand is on.",
684
+ },
685
+ "FooterSettings.brandSpan": {
686
+ type: "integer",
687
+ minimum: 1,
688
+ maximum: FOOTER_LIMITS.brandSpanMax,
689
+ renders: "The number of grid columns the brand region spans in the footer's wide layout.",
690
+ },
691
+ "FooterSettings.asideSpan": {
692
+ type: "integer",
693
+ minimum: 1,
694
+ maximum: FOOTER_LIMITS.asideSpanMax,
695
+ renders: "The number of grid columns the aside region spans in the footer's wide and wrapped layouts.",
696
+ },
697
+ "FooterSettings.asideCtaStyle": {
698
+ type: "enum",
699
+ values: FOOTER_CTA_STYLES,
700
+ description: "Choose a regular link, bold link or a compact button. An empty value selects link.",
701
+ renders: "The call to action in the enabled footer's aside region.",
591
702
  },
592
- "FooterSettings.enabled": { type: "boolean", default: false },
593
- "FooterSettings.showBrand": { type: "boolean", default: true },
594
- "FooterSettings.showBrandText": { type: "boolean", default: true },
595
- "FooterSettings.brandSpan": { type: "integer", default: 1, minimum: 1, maximum: FOOTER_LIMITS.brandSpanMax },
596
- "FooterSettings.asideSpan": { type: "integer", default: 1, minimum: 1, maximum: FOOTER_LIMITS.asideSpanMax },
597
703
  "FooterSettings.brandSize": {
598
704
  type: "enum",
599
- default: "standard",
600
705
  values: ["standard", "large"],
601
706
  description: "Brand text size; logoScale independently sets the logo size.",
707
+ renders: "The name in the enabled footer's brand region.",
602
708
  },
603
709
  "FooterSettings.logoScale": {
604
710
  type: "decimal-string",
605
- default: "1.0",
606
711
  ...FOOTER_LOGO_SCALE_LIMITS,
607
712
  description:
608
713
  "Logo size from 1.0 through 5.0 in 0.1 steps. Empty and 1 normalize to 1.0. An old absent or null value migrates to 1.5 for large brand text, otherwise 1.0; pull and footer push materialize it. Whitespace, exponents, numeric JSON values and extra decimal places are refused.",
714
+ renders: "The brand logo at every width in the enabled footer.",
609
715
  },
610
716
  "FooterSettings.logoBox": {
611
717
  type: "enum",
612
- default: "fixed",
613
718
  values: ["fixed", "natural"],
614
719
  description:
615
720
  "Fixed keeps scaled logo height, including unused image-box space. Natural fits the constrained artwork dimensions without cropping alpha padding. Omitted, null or empty is fixed.",
721
+ renders: "The image box in the enabled footer's brand region.",
616
722
  },
617
- ...Object.fromEntries(["alignment", "brandAlignment", "asideAlignment"].map(name => [
618
- `FooterSettings.${name}`,
619
- { type: "FooterResponsiveAlignment|null", inheritedWhenOmitted: true },
723
+ ...Object.fromEntries(Object.entries({
724
+ alignment: "The default alignment across the enabled footer's content regions in each layout.",
725
+ brandAlignment: "The brand region in each footer layout.",
726
+ asideAlignment: "The aside region in each footer layout.",
727
+ }).map(([name, renders]) => [
728
+ `FooterSettings.${name}`, { type: "FooterResponsiveAlignment|null", default: null, inheritedWhenOmitted: true, renders },
620
729
  ])),
621
- "FooterSettings.bottomAlignment": { type: "FooterResponsiveInlineAlignment|null", inheritedWhenOmitted: true },
730
+ "FooterSettings.bottomAlignment": {
731
+ type: "FooterResponsiveInlineAlignment|null",
732
+ default: null,
733
+ inheritedWhenOmitted: true,
734
+ renders: "The bottom row's horizontal and text alignment in each footer layout.",
735
+ },
622
736
  ...Object.fromEntries(
623
737
  ["FooterResponsiveAlignment", "FooterResponsiveInlineAlignment"].flatMap(type =>
624
738
  FOOTER_ALIGNMENT_LAYOUTS.map(layout => [
@@ -635,35 +749,57 @@ const FOOTER_FIELD_DETAILS = Object.freeze({
635
749
  [`${type}.textAlign`, { type: "enum", values: ["", ...FOOTER_TEXT_ALIGN_VALUES], inheritedWhenOmitted: true }],
636
750
  ])),
637
751
  "FooterAlignment.vertical": { type: "enum", values: ["", ...FOOTER_POSITION_VALUES], inheritedWhenOmitted: true },
638
- "FooterSettings.linkColumns": { type: "FooterLinkColumn[]", default: [], maximumItems: FOOTER_LIMITS.linkColumns },
752
+ "FooterSettings.linkColumns": {
753
+ type: "FooterLinkColumn[]",
754
+ maximumItems: FOOTER_LIMITS.linkColumns,
755
+ renders: "Grouped navigation between the brand and aside in the enabled footer.",
756
+ },
639
757
  "FooterSettings.asideHeadingContent": {
640
758
  type: "FooterRichText",
641
- default: { paragraphs: [] },
642
759
  maximumCharacters: FOOTER_LIMITS.asideHeadingLength,
643
760
  maximumParagraphs: 1,
761
+ renders: "The heading above the footer aside's body and call to action.",
644
762
  },
645
763
  "FooterSettings.asideBodyContent": {
646
764
  type: "FooterRichText",
647
- default: { paragraphs: [] },
648
765
  maximumCharacters: FOOTER_LIMITS.asideBodyLength,
649
766
  maximumParagraphs: FOOTER_LIMITS.richTextParagraphs,
767
+ renders: "The body copy in the enabled footer's aside.",
768
+ },
769
+ "FooterSettings.asideCta": {
770
+ type: "FooterLink|null",
771
+ default: null,
772
+ renders: "The call-to-action link in the enabled footer's aside.",
650
773
  },
651
- "FooterSettings.asideCta": { type: "FooterLink|null", default: null },
652
774
  "FooterSettings.bottomContent": {
653
775
  type: "FooterRichText",
654
- default: { paragraphs: [] },
655
776
  maximumCharacters: FOOTER_LIMITS.bottomTextLength,
656
777
  maximumParagraphs: FOOTER_LIMITS.richTextParagraphs,
778
+ renders: "The copy in the bottom row of the enabled footer.",
779
+ },
780
+ "FooterSettings.bottomLinks": {
781
+ type: "FooterLink[]",
782
+ maximumItems: FOOTER_LIMITS.bottomLinks,
783
+ renders: "The utility navigation links in the enabled footer's bottom row.",
657
784
  },
658
- "FooterSettings.bottomLinks": { type: "FooterLink[]", default: [], maximumItems: FOOTER_LIMITS.bottomLinks },
659
785
  "FooterSettings.socialLinks": {
660
786
  type: "FooterSocialLink[]",
661
- default: [],
662
787
  maximumItems: FOOTER_LIMITS.socialLinks,
788
+ renders: "The social icons in the enabled footer's bottom row.",
789
+ },
790
+ "FooterSettings.light": {
791
+ type: "FooterSchemeSettings",
792
+ renders: "The logo override, background artwork and top padding of the enabled footer in the light scheme.",
793
+ },
794
+ "FooterSettings.dark": {
795
+ type: "FooterSchemeSettings",
796
+ renders: "The logo override, background artwork and top padding of the enabled footer in the dark scheme.",
797
+ },
798
+ "FooterSettings.featureImage": {
799
+ type: "FooterFeatureImageSettings|null",
800
+ default: null,
801
+ renders: "The full-width feature image in the enabled footer's media area.",
663
802
  },
664
- "FooterSettings.light": { type: "FooterSchemeSettings", default: "scheme defaults" },
665
- "FooterSettings.dark": { type: "FooterSchemeSettings", default: "scheme defaults" },
666
- "FooterSettings.featureImage": { type: "FooterFeatureImageSettings|null", default: null },
667
803
  "FooterLinkColumn.id": { type: "canonical-lowercase-uuid", required: true },
668
804
  "FooterLinkColumn.span": { type: "integer", default: 1, minimum: 1, maximum: FOOTER_LIMITS.columnSpanMax },
669
805
  "FooterLinkColumn.alignment": { type: "FooterResponsiveAlignment|null", inheritedWhenOmitted: true },
@@ -706,32 +842,54 @@ const FOOTER_FIELD_DETAILS = Object.freeze({
706
842
  },
707
843
  "FooterSchemeSettings.logoId": {
708
844
  type: "site-owned-png-or-webp-image-uuid",
709
- default: "",
710
845
  description:
711
846
  "An optional footer logo override for this scheme. Empty inherits that scheme's site logo; clearing an override leaves the site logo and media unchanged.",
847
+ renders: FOOTER_LOGO_RENDERS,
848
+ },
849
+ "FooterSchemeSettings.logoUrl": {
850
+ type: "url",
851
+ readOnly: true,
852
+ noDefault: true,
853
+ renders: `${FOOTER_LOGO_RENDERS} The server fills this read-only URL from the ready logo override.`,
854
+ },
855
+ "FooterSchemeSettings.backgroundImageId": {
856
+ type: "site-owned-image-uuid",
857
+ renders: FOOTER_BACKGROUND_RENDERS,
858
+ },
859
+ "FooterSchemeSettings.backgroundImageUrl": {
860
+ type: "url",
861
+ readOnly: true,
862
+ noDefault: true,
863
+ renders: `${FOOTER_BACKGROUND_RENDERS} The server fills this read-only URL from the ready background image.`,
864
+ },
865
+ "FooterSchemeSettings.backgroundImageOpacity": {
866
+ type: "number",
867
+ minimum: 0,
868
+ maximum: 1,
869
+ renders: "The opacity of the footer background image in this color scheme.",
712
870
  },
713
- "FooterSchemeSettings.logoUrl": { type: "url", readOnly: true },
714
- "FooterSchemeSettings.backgroundImageId": { type: "site-owned-image-uuid", default: "" },
715
- "FooterSchemeSettings.backgroundImageUrl": { type: "url", readOnly: true },
716
- "FooterSchemeSettings.backgroundImageOpacity": { type: "number", default: 1, minimum: 0, maximum: 1 },
717
871
  "FooterSchemeSettings.backgroundPresentation": {
718
872
  type: "enum",
719
- default: FOOTER_BACKGROUND_PRESENTATIONS[0],
720
873
  values: FOOTER_BACKGROUND_PRESENTATIONS,
874
+ renders: "How the footer background image tiles, repeats horizontally, or covers the footer in this color scheme.",
875
+ },
876
+ "FooterSchemeSettings.backgroundFade": {
877
+ type: "enum",
878
+ values: FOOTER_FADE_MODES,
879
+ renders: "The fade at the bottom of the footer background image in this color scheme.",
721
880
  },
722
- "FooterSchemeSettings.backgroundFade": { type: "enum", default: FOOTER_FADE_MODES[0], values: FOOTER_FADE_MODES },
723
881
  "FooterSchemeSettings.backgroundRepeatHeightPx": {
724
882
  type: "integer",
725
- default: FOOTER_LIMITS.backgroundRepeatHeightDefault,
726
883
  minimum: FOOTER_LIMITS.backgroundRepeatHeightMinimum,
727
884
  maximum: FOOTER_LIMITS.backgroundRepeatHeightMaximum,
728
885
  step: FOOTER_LIMITS.backgroundRepeatHeightStep,
886
+ renders: "The background image height when it repeats horizontally, in this color scheme.",
729
887
  },
730
888
  "FooterSchemeSettings.additionalTopPaddingRem": {
731
889
  type: "number",
732
- default: 0,
733
890
  minimum: 0,
734
891
  maximum: FOOTER_LIMITS.additionalTopPaddingRemMaximum,
892
+ renders: "Space at the top of the footer content in this color scheme.",
735
893
  },
736
894
  "FooterFeatureImageSettings.imageId": { type: "site-owned-image-uuid", requiredWith: "alt" },
737
895
  "FooterFeatureImageSettings.imageUrl": { type: "url", readOnly: true },
@@ -745,11 +903,28 @@ const FOOTER_FIELD_DETAILS = Object.freeze({
745
903
  "FooterFeatureResponsiveImageUrl.url": { type: "url", readOnly: true },
746
904
  });
747
905
 
906
+ function describeFooterField(message, name) {
907
+ const details = FOOTER_FIELD_DETAILS[`${message}.${name}`];
908
+ if (message === "FooterSettings") {
909
+ const presentation = APPEARANCE_FOOTER_FIELDS.find((field) => field.name === name);
910
+ if (presentation) {
911
+ const { type, values, default: defaultValue } = presentation;
912
+ return { ...details, type, ...(values ? { values } : {}), default: defaultValue };
913
+ }
914
+ if (Object.hasOwn(details, "default")) return details;
915
+ return { ...details, default: structuredClone(FOOTER_DEFAULTS[name]) };
916
+ }
917
+ if (message === "FooterSchemeSettings" && !details.noDefault) {
918
+ return { ...details, default: FOOTER_SCHEME_DEFAULTS[name] };
919
+ }
920
+ return details;
921
+ }
922
+
748
923
  function footerMessages() {
749
924
  return Object.entries(FOOTER_FIELD_INVENTORY).map(([name, fields]) => ({
750
925
  name,
751
926
  additionalProperties: false,
752
- fields: fields.map((field) => ({ name: field, ...FOOTER_FIELD_DETAILS[name + "." + field] })),
927
+ fields: fields.map((field) => ({ name: field, ...describeFooterField(name, field) })),
753
928
  }));
754
929
  }
755
930
 
@@ -757,7 +932,21 @@ export function getFooterReference() {
757
932
  return {
758
933
  title: "Complete footer workspace and save contract",
759
934
  referenceKind: "footer",
760
- usage: CLI_BINARY_NAME + " footer push",
935
+ usage: CLI_BINARY_NAME + " footer push [--dry-run]",
936
+ fixedValues: structuredClone(FOOTER_FIXED_VALUES),
937
+ componentProperties: structuredClone(getSettableComponentProperties().filter(({ name }) => [
938
+ "--esp-footer-link-decoration",
939
+ "--esp-footer-link-underline-offset",
940
+ "--esp-footer-link-underline-thickness",
941
+ "--esp-footer-heading-size",
942
+ ].includes(name))),
943
+ linkDefaults: structuredClone(FOOTER_LINK_DEFAULTS),
944
+ footerStyleRule:
945
+ "Both footer headings default to the normal text size. The link properties cover column, bottom and brand links, "
946
+ + "links in the aside and bottom rich text, and the link and bold-link aside actions. Set resting decoration, "
947
+ + "offset and thickness in the scheme or footer context. Offset is in em. Divide the target pixels by the "
948
+ + "rendered link font size in pixels, for example 4 px at 16 px is 0.25em. Covered links underline on hover. Social icons keep "
949
+ + "their own decoration and the button uses the footer action colors.",
761
950
  workspaceFile: APPEARANCE_FILES[SETTINGS_TYPE_SITE_PUBLISHING_PREFERENCES],
762
951
  workspacePath: "settings.footerSettings",
763
952
  messages: footerMessages(),
@@ -793,24 +982,26 @@ export function getFooterReference() {
793
982
  fitCheck:
794
983
  "validate reports footer.word_breaks at five widths: desktop, small desktop, tablet, phone and Small phone (320px); footer push "
795
984
  + "prints the same warnings before saving. At most 12 are shown, with the true count and any remainder. "
796
- + "Estimates use generated default-font advances, the default type scale and gaps; custom fonts or scale may differ. "
985
+ + "Estimates use default fonts, spacing and the normal footer heading size. Authored fonts, spacing or heading size can change the result. "
986
+ + "A button stays on one line, including its padding and borders. The report calls out button overflow and suggests shortening the label or choosing a link style. "
797
987
  + "Supported whitespace, hyphen and zero-width break opportunities are estimated; contextual shaping is bounded, "
798
988
  + "and Han, Kana or Thai fragments are skipped. When local upload dimensions are unavailable the CLI assumes a maximum "
799
989
  + "4:1 logo ratio, so it can over-report brand words beside a narrow logo. Known dimensions follow the footer's own forced artwork. Warnings never refuse a save. "
800
990
  + "The deployment check covers standard and profile sites; managed Docs sites use validate and the Footer tab.",
801
991
  readOnlyProjections: FOOTER_READ_ONLY_FIELDS,
802
992
  concurrency:
803
- "pull records the footer-draft-v8 expectedDraftHash, including effective logoScale, logoBox, all sparse profiles "
804
- + "and both logo ids, but no context, logoVariant, retired colors, response URLs or effective inherited choices. Old v7 baselines are refused; upgrade and pull again. A conflict returns "
993
+ `pull records the ${FOOTER_DRAFT_VERSION} expectedDraftHash, including asideCtaStyle, effective logoScale, logoBox, all sparse profiles `
994
+ + "and both logo ids, but no context, logoVariant, retired colors, response URLs or effective inherited choices. Earlier draft hash versions are refused. Upgrade and pull again. A conflict returns "
805
995
  + "footer.concurrent_modification; pull, reconcile, and retry.",
806
996
  themeInteraction:
807
997
  "theme push saves the footer context and logoVariant atomically with the themes and rewrites the file from the saved result. "
808
- + "It refuses while unpushed footer-content edits exist (theme.unpushed_footer_content); run " + CLI_BINARY_NAME
998
+ + "A live theme push refuses while unpushed footer-content edits exist (theme.unpushed_footer_content); run " + CLI_BINARY_NAME
809
999
  + " footer push first, or pull to discard the edit. Footer push strips the context and logoVariant from its request and restores "
810
1000
  + "the local choice after projecting the response, so presentation edits not yet sent by theme push are preserved.",
811
1001
  workflow: [
812
1002
  CLI_BINARY_NAME + " pull",
813
1003
  "edit settings/site-publishing-preferences.json at settings.footerSettings",
1004
+ CLI_BINARY_NAME + " footer push --dry-run to compare with the current draft and check the baseline",
814
1005
  CLI_BINARY_NAME + " footer push",
815
1006
  CLI_BINARY_NAME + " pull to verify the semantic round trip",
816
1007
  ],
@@ -837,7 +1028,8 @@ function fieldConstraint(field) {
837
1028
  if (field.requiredWhen) details.push(`required when ${field.requiredWhen}`);
838
1029
  if (field.requiredWith) details.push(`required with ${field.requiredWith}`);
839
1030
  if (field.exclusiveWith) details.push(`exclusive with ${field.exclusiveWith}`);
840
- if (Object.hasOwn(field, "default")) details.push(`default ${JSON.stringify(field.default)}`);
1031
+ const defaultDetail = formatReferenceDefault(field);
1032
+ if (defaultDetail) details.push(defaultDetail);
841
1033
  if (field.inheritedWhenOmitted) details.push("inherits when omitted");
842
1034
  if (field.additionalProperties === true) details.push("open named map");
843
1035
  if (field.additionalProperties === false) details.push("unlisted keys rejected");
@@ -875,6 +1067,25 @@ function fieldConstraint(field) {
875
1067
  return (field.type ?? "object") + (details.length > 0 ? `; ${details.join("; ")}` : "");
876
1068
  }
877
1069
 
1070
+ function formatComponentProperties(entries) {
1071
+ const guidance = [
1072
+ "Set componentProperties at a scheme root or within one of its contexts. Context values override root values for that context.",
1073
+ 'For colors, use a semantic token name such as "--esp-color-border" or a mapping such as {"source":"analogous-left","lightness":"border"}.',
1074
+ 'For lengths, use the listed unit and inclusive range, or the string "0". Set the same lengths and keywords in both schemes to keep layout and decoration consistent.',
1075
+ "Theme push compares each context value with the other scheme. An omitted value uses the scheme root and then the listed default. Some footer link roles have their own native CSS fallback.",
1076
+ "CSS defaults describe what Espalier renders when a property is omitted. Use the listed authored forms when setting it.",
1077
+ ];
1078
+ const rows = entries.map((entry) => {
1079
+ const constraints = [`Authored syntax ${entry.syntax}.`];
1080
+ if (entry.unit !== undefined) constraints.push(`Range ${entry.min}${entry.unit} to ${entry.max}${entry.unit}.`);
1081
+ if (entry.allowedValues !== undefined) constraints.push(`Allowed values ${entry.allowedValues.join(", ")}.`);
1082
+ if (entry.pairsWith !== undefined) constraints.push(`Pairs with ${entry.pairsWith} at APCA Lc ${entry.targetLc}.`);
1083
+ return ` ${entry.name} (${entry.component ?? "shared hook"})\n ${entry.description}\n`
1084
+ + ` CSS default ${entry.default}. ${constraints.join(" ")}`;
1085
+ });
1086
+ return ["Component properties", ...guidance, "", ...rows].join("\n");
1087
+ }
1088
+
878
1089
  export function formatPresentationReference(reference) {
879
1090
  if (reference.referenceKind === "theme") {
880
1091
  const groups = reference.groups.map((group) =>
@@ -894,7 +1105,9 @@ export function formatPresentationReference(reference) {
894
1105
  + reference.roleResolution.bindingForms.map((line) => " - " + line).join("\n")
895
1106
  + "\n\nPrecedence:\n"
896
1107
  + reference.roleResolution.precedence.map((line, index) => " " + (index + 1) + ". " + line).join("\n")
897
- + "\n\nTheme groups:\n" + groups + "\n\nValid complete pair (both schemes resolved and contrast-checked):\n"
1108
+ + "\n\nTheme groups:\n" + groups + "\n\n" + formatComponentProperties(reference.componentProperties)
1109
+ + "\n\nHeading and quote colors\n" + reference.headingAndQuoteColors.map((line) => " " + line).join("\n")
1110
+ + "\n\nValid complete pair (both schemes resolved and contrast-checked):\n"
898
1111
  + JSON.stringify(reference.example, null, 2) + "\n";
899
1112
  }
900
1113
  if (reference.referenceKind === "appearance") {
@@ -903,18 +1116,26 @@ export function formatPresentationReference(reference) {
903
1116
  " " + field.file + " :: " + field.path + " — " + fieldConstraint(field)
904
1117
  + "\n app: " + field.appLabel + ". " + field.description
905
1118
  + (field.renders === undefined ? "" : "\n renders: " + field.renders)
1119
+ + (field.defaultRendering === undefined ? "" : "\n " + formatDefaultRendering(field))
1120
+ + formatSettingSizes(field)
906
1121
  ).join("\n")
907
1122
  + "\n\nRead-only server projections:\n"
908
- + reference.readOnlyProjections.map((field) => " " + field.file + " :: " + field.path).join("\n")
1123
+ + reference.readOnlyProjections.map((field) =>
1124
+ " " + field.file + " :: " + field.path + " — " + formatReferenceDefault(field)
1125
+ + "\n renders: " + field.renders
1126
+ ).join("\n")
909
1127
  + "\n\nPage background image versus canvas image:\n - " + reference.pageBackgroundVersusCanvas.pageBackground
910
1128
  + "\n - " + reference.pageBackgroundVersusCanvas.canvas
911
1129
  + "\n - " + reference.pageBackgroundVersusCanvas.shared
1130
+ + "\n\nBuild a tag listing\n" + reference.tagListingWorkflow.map(step => " - " + step).join("\n")
912
1131
  + "\n\nField map: " + reference.fieldMap
913
1132
  + "\n\nImages: " + reference.imageReferences + "\nLogos: " + reference.logoContract
914
1133
  + "\nLogo contrast: " + reference.logoContrastContract
1134
+ + "\nHeader and footer contrast\n " + reference.chromeContrastContract
915
1135
  + "\nFavicon: " + reference.faviconContract
916
1136
  + "\nHeader width: " + reference.headerWidthContract
917
1137
  + "\nBlock spacing: " + reference.blockSpacingContract
1138
+ + "\nBreadcrumbs: " + reference.breadcrumbContract
918
1139
  + "\nMobile menu and menu font: " + reference.menuContract
919
1140
  + "\nSurface contexts: " + reference.surfaceContexts
920
1141
  + "\nRetired footer color recipe: " + reference.footerColorMigration
@@ -924,7 +1145,7 @@ export function formatPresentationReference(reference) {
924
1145
  + "\nRevision: " + reference.revision
925
1146
  + "\nDry run: " + reference.dryRun
926
1147
  + "\nRetry: " + reference.retry
927
- + "\nRecovery: " + reference.recovery + "\n";
1148
+ + "\nRecovery: " + reference.recovery + formatFixedValues(reference.fixedValues);
928
1149
  }
929
1150
  if (reference.referenceKind === "settings") return formatSettingsReference(reference);
930
1151
  if (reference.referenceKind === "footer") {
@@ -933,6 +1154,7 @@ export function formatPresentationReference(reference) {
933
1154
  + message.fields.map((field) =>
934
1155
  " " + field.name.padEnd(30) + fieldConstraint(field)
935
1156
  + (field.description ? "; " + field.description : "")
1157
+ + (field.renders ? "\n renders: " + field.renders : "")
936
1158
  ).join("\n")
937
1159
  ).join("\n\n");
938
1160
  return reference.title + "\nUsage: " + reference.usage + "\nWorkspace: "
@@ -941,12 +1163,16 @@ export function formatPresentationReference(reference) {
941
1163
  + "\nImages: " + reference.imageRule
942
1164
  + "\nLayout: " + reference.layoutRule + "\nAlignment: " + reference.alignmentRule
943
1165
  + "\nLogo space: " + reference.logoSpaceRule + "\nFit check: " + reference.fitCheck
1166
+ + "\n\nFooter styling: " + reference.footerStyleRule + "\n"
1167
+ + formatComponentProperties(reference.componentProperties)
1168
+ + "\nDefault link appearance by role:\n"
1169
+ + Object.entries(reference.linkDefaults).map(([role, values]) => ` ${role}: ${JSON.stringify(values)}`).join("\n")
944
1170
  + "\nConcurrency: " + reference.concurrency
945
1171
  + "\nTheme interaction: " + reference.themeInteraction + "\nRead-only projections: "
946
1172
  + reference.readOnlyProjections.join(", ") + "\n\nWorkflow:\n"
947
1173
  + reference.workflow.map((step, index) => " " + (index + 1) + ". " + step).join("\n")
948
1174
  + "\n\nValid marketing-site example:\n"
949
- + JSON.stringify(reference.example, null, 2) + "\n";
1175
+ + JSON.stringify(reference.example, null, 2) + formatFixedValues(reference.fixedValues);
950
1176
  }
951
1177
  throw new TypeError("Unknown presentation reference kind '" + reference.referenceKind + "'.");
952
1178
  }