@taprootio/site-authoring 0.42.0 → 0.56.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.
- package/README.md +110 -12
- package/examples/riverbend-wellness/settings/site-publishing-preferences.json +3 -0
- package/examples/riverbend-wellness/settings/taproot-styles.json +11 -0
- package/package.json +4 -3
- package/src/api.js +242 -23
- package/src/appearance-contract.js +264 -3
- package/src/authored-tag-names.js +88 -0
- package/src/authors-contract.js +71 -3
- package/src/block-flow.js +103 -1
- package/src/brand-color.js +22 -0
- package/src/breadcrumb-artwork.js +234 -0
- package/src/breadcrumb-separators.js +11 -0
- package/src/changelog.json +160 -0
- package/src/chrome-features.js +6 -2
- package/src/chrome-input.js +1 -0
- package/src/chrome-paint-catalog-taproot.json +3 -3
- package/src/chrome-report.js +91 -12
- package/src/cli.js +136 -38
- package/src/constants.js +1 -0
- package/src/content/components.js +27 -4
- package/src/content/external-link.js +2 -1
- package/src/content/markdown.js +271 -101
- package/src/content/tiptap-prosemirror.ts +125 -43
- package/src/content/validate-document.js +4 -1
- package/src/content-inset.js +48 -0
- package/src/errors.js +1 -0
- package/src/espalier-shared.js +26 -0
- package/src/field-suggestions.js +40 -0
- package/src/fixture-init.js +22 -5
- package/src/font-catalog.js +11 -1
- package/src/footer-brand-inputs.js +22 -3
- package/src/footer-content.js +1 -0
- package/src/footer-contract.js +11 -0
- package/src/footer-cta-styles.js +6 -0
- package/src/footer-draft-hash.js +4 -2
- package/src/footer-fit.js +62 -15
- package/src/footer-workspace.js +44 -7
- package/src/latest-posts-tags.js +57 -0
- package/src/page-metadata.js +15 -13
- package/src/page-structure-checks.js +5 -0
- package/src/page-tag-badge-modes.js +6 -0
- package/src/page-tag-writes.js +158 -0
- package/src/page-type-tags.js +16 -0
- package/src/presentation-reference.js +297 -86
- package/src/recipe-page-options.js +22 -0
- package/src/recipe-step-contract.js +164 -0
- package/src/recipe-step-contract.json +65 -0
- package/src/reference-help.js +182 -79
- package/src/session.js +39 -24
- package/src/setting-reference.js +239 -48
- package/src/settings-catalog.js +63 -0
- package/src/site-check-findings.js +23 -5
- package/src/site-check-rules.json +1 -0
- package/src/site-health-findings.js +13 -13
- package/src/styling-fixed-values.js +71 -0
- package/src/tag-destination-warnings.js +35 -0
- package/src/template-token-reach.json +242 -0
- package/src/theme-proposals.js +18 -27
- package/src/theme-resolve.js +265 -23
- package/src/theme-validation.js +118 -7
- package/src/token-reach.js +222 -0
- package/src/typed-page-reference.js +94 -16
- package/src/typed-pages.js +233 -74
- package/src/verbs/authors.js +198 -33
- package/src/verbs/deploy.js +6 -0
- package/src/verbs/footer-push.js +30 -5
- package/src/verbs/forms-push.js +11 -3
- package/src/verbs/index.js +4 -2
- package/src/verbs/pages-delete.js +19 -10
- package/src/verbs/pages-push.js +225 -71
- package/src/verbs/plan.js +10 -4
- package/src/verbs/pull.js +324 -69
- package/src/verbs/staging-review.js +27 -1
- package/src/verbs/status.js +22 -0
- package/src/verbs/theme-push.js +93 -25
- package/src/verbs/theme-resolve.js +189 -55
- package/src/verbs/validate.js +6 -5
- package/src/workspace-check.js +35 -3
- package/src/workspace.js +73 -2
- 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 {
|
|
@@ -33,7 +36,8 @@ import {
|
|
|
33
36
|
CHROME_REPORT_NAME_RULE,
|
|
34
37
|
} from "./chrome-input.js";
|
|
35
38
|
import { CLI_BINARY_NAME } from "./constants.js";
|
|
36
|
-
import {
|
|
39
|
+
import { getSettableComponentProperties } from "./espalier-shared.js";
|
|
40
|
+
import { APPEARANCE_FIXED_VALUES, FOOTER_FIXED_VALUES, FOOTER_LINK_DEFAULTS, formatFixedValues } from "./styling-fixed-values.js";
|
|
37
41
|
import { FOOTER_LOGO_BOX, FOOTER_LOGO_SCALE_LIMITS } from "./footer-branding.js";
|
|
38
42
|
import { FOOTER_ALIGNMENT_LAYOUTS, FOOTER_POSITION_VALUES, FOOTER_TEXT_ALIGN_VALUES } from "./footer-alignment.js";
|
|
39
43
|
import {
|
|
@@ -43,22 +47,25 @@ import {
|
|
|
43
47
|
FOOTER_FIELD_INVENTORY,
|
|
44
48
|
FOOTER_LIMITS,
|
|
45
49
|
FOOTER_READ_ONLY_FIELDS,
|
|
50
|
+
projectFooterSettingsForWorkspace,
|
|
46
51
|
SOCIAL_LINK_URL_REQUIREMENT,
|
|
47
52
|
SOCIAL_PLATFORM_KEYS,
|
|
48
53
|
validateFooterDocument,
|
|
49
54
|
} from "./footer-contract.js";
|
|
50
55
|
import {
|
|
51
56
|
describeSettingField,
|
|
57
|
+
formatDefaultRendering,
|
|
58
|
+
formatReferenceDefault,
|
|
59
|
+
formatSettingSizes,
|
|
52
60
|
formatSettingsReference,
|
|
53
61
|
PAGE_BACKGROUND_IMAGE_RENDERING,
|
|
54
62
|
PAGE_BACKGROUND_VERSUS_CANVAS,
|
|
55
63
|
} from "./setting-reference.js";
|
|
56
|
-
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";
|
|
57
65
|
import {
|
|
58
66
|
APPEARANCE_COLOR_CONSTRAINT,
|
|
59
67
|
MAXIMUM_THEME_OPEN_MAP_ENTRIES,
|
|
60
68
|
MAXIMUM_THEME_OPEN_MAP_KEY_SCALARS,
|
|
61
|
-
REQUIRED_THEME_PROPERTIES,
|
|
62
69
|
validateAndLintThemePair,
|
|
63
70
|
} from "./theme-validation.js";
|
|
64
71
|
|
|
@@ -66,26 +73,15 @@ let espalierVersion;
|
|
|
66
73
|
|
|
67
74
|
function getEspalierVersion() {
|
|
68
75
|
espalierVersion ??= JSON.parse(
|
|
69
|
-
readFileSync(new URL("
|
|
70
|
-
).
|
|
76
|
+
readFileSync(new URL("package.json", import.meta.resolve("@taprootio/espalier/espalier.token-manifest.json")), "utf8"),
|
|
77
|
+
).version;
|
|
71
78
|
return espalierVersion;
|
|
72
79
|
}
|
|
73
80
|
|
|
74
|
-
|
|
75
|
-
"explicitMappingTokens",
|
|
76
|
-
"boxBackgroundImage",
|
|
77
|
-
"boxBackgroundImageOpacity",
|
|
78
|
-
"vellumOpacity",
|
|
79
|
-
"vellumBackgroundImage",
|
|
80
|
-
"vellumBackgroundImageOpacity",
|
|
81
|
-
]);
|
|
82
|
-
|
|
83
|
-
export const THEME_FIELD_NAMES = Object.freeze([
|
|
84
|
-
...REQUIRED_THEME_PROPERTIES,
|
|
85
|
-
...OPTIONAL_THEME_FIELDS,
|
|
86
|
-
]);
|
|
81
|
+
export { OPTIONAL_THEME_FIELDS, THEME_FIELD_NAMES } from "./theme-validation.js";
|
|
87
82
|
|
|
88
83
|
const THEME_FIELD_TYPES = Object.freeze({
|
|
84
|
+
componentProperties: "object",
|
|
89
85
|
explicitMappingTokens: "semantic-token[]",
|
|
90
86
|
stylesheets: "string[]",
|
|
91
87
|
pageBackgroundImage: "string",
|
|
@@ -187,7 +183,8 @@ const THEME_GROUPS = Object.freeze([
|
|
|
187
183
|
maximumNameScalars: MAXIMUM_THEME_OPEN_MAP_KEY_SCALARS,
|
|
188
184
|
}),
|
|
189
185
|
themeField("roles", "Closed map of designer-facing functional color roles.", { keys: ROLE_NAMES }),
|
|
190
|
-
themeField("contexts", "Open map of named
|
|
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.", {
|
|
191
188
|
additionalProperties: true,
|
|
192
189
|
maximumEntries: MAXIMUM_THEME_OPEN_MAP_ENTRIES,
|
|
193
190
|
}),
|
|
@@ -295,7 +292,8 @@ const THEME_GROUPS = Object.freeze([
|
|
|
295
292
|
"pageBackgroundImage",
|
|
296
293
|
"CSS background-image (the app's Page style > Background image). " + PAGE_BACKGROUND_IMAGE_RENDERING
|
|
297
294
|
+ " Today it is a CSS url(...) of a delivered image, the src that .taproot-site-media.json records; it tiles "
|
|
298
|
-
+ "at the image's natural pixel size from the top-left.
|
|
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.",
|
|
299
297
|
),
|
|
300
298
|
themeField(
|
|
301
299
|
"pageBackgroundImageOpacity",
|
|
@@ -309,6 +307,13 @@ const THEME_GROUPS = Object.freeze([
|
|
|
309
307
|
themeField("vellumBackgroundImageOpacity", "Optional vellum image opacity.", { minimum: 0, maximum: 1 }),
|
|
310
308
|
]),
|
|
311
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
|
+
}),
|
|
312
317
|
]);
|
|
313
318
|
|
|
314
319
|
/**
|
|
@@ -361,8 +366,9 @@ export const ROLE_RESOLUTION = Object.freeze({
|
|
|
361
366
|
"Otherwise the token is compiled from the roles, and an APCA contrast check may nudge an action or ink stop so "
|
|
362
367
|
+ "the pair stays readable.",
|
|
363
368
|
"Otherwise the Espalier default mapping applies.",
|
|
364
|
-
"A context rebinds roles, lightness, tones and pins for one zone with the same precedence inside that zone
|
|
365
|
-
+ "pins
|
|
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.",
|
|
366
372
|
]),
|
|
367
373
|
});
|
|
368
374
|
|
|
@@ -405,6 +411,14 @@ function assertExampleContrast(theme, scheme) {
|
|
|
405
411
|
}
|
|
406
412
|
}
|
|
407
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
|
+
|
|
408
422
|
export function getThemeReference() {
|
|
409
423
|
const version = getEspalierVersion();
|
|
410
424
|
return {
|
|
@@ -416,6 +430,8 @@ export function getThemeReference() {
|
|
|
416
430
|
completeBaselineRequired: true,
|
|
417
431
|
nestedMergeGroups: NESTED_THEME_KEYS,
|
|
418
432
|
groups: THEME_GROUPS,
|
|
433
|
+
componentProperties: structuredClone(getSettableComponentProperties()),
|
|
434
|
+
headingAndQuoteColors: HEADING_AND_QUOTE_COLORS,
|
|
419
435
|
vocabulary: {
|
|
420
436
|
roles: ROLE_NAMES,
|
|
421
437
|
colorSources: COLOR_SOURCES,
|
|
@@ -431,7 +447,7 @@ export function getThemeReference() {
|
|
|
431
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.",
|
|
432
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.",
|
|
433
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.",
|
|
434
|
-
"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
|
|
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.",
|
|
435
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.",
|
|
436
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.",
|
|
437
453
|
"Tune typography, type/space ratios, radii, and viewport interpolation as one layout system.",
|
|
@@ -454,24 +470,34 @@ function appearanceColorReference(definition) {
|
|
|
454
470
|
: {};
|
|
455
471
|
}
|
|
456
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
|
+
|
|
457
483
|
export function getAppearanceReference() {
|
|
458
484
|
const scalarFields = APPEARANCE_SCALAR_FIELDS.map((field) => ({
|
|
459
485
|
file: APPEARANCE_FILES[field.settingsType],
|
|
460
486
|
path: "settings." + field.name,
|
|
461
487
|
...describeSettingField(field.settingsType, field.name),
|
|
462
488
|
type: field.type,
|
|
463
|
-
...(field.values ? { values: field.values } : {}),
|
|
489
|
+
...(field.values ? { values: [...field.values] } : {}),
|
|
464
490
|
...(field.minimum !== undefined ? { minimum: field.minimum, maximum: field.maximum } : {}),
|
|
465
491
|
...(field.maximumLength !== undefined ? { maximumLength: field.maximumLength } : {}),
|
|
466
492
|
...(field.step !== undefined ? { step: field.step } : {}),
|
|
467
493
|
...(field.optional ? { optional: true } : {}),
|
|
468
494
|
...appearanceColorReference(field),
|
|
469
|
-
default: field.default,
|
|
470
495
|
}));
|
|
471
496
|
return {
|
|
472
497
|
title: "Site appearance workspace and theme-push contract",
|
|
473
498
|
referenceKind: "appearance",
|
|
474
499
|
usage: CLI_BINARY_NAME + " theme push",
|
|
500
|
+
fixedValues: structuredClone(APPEARANCE_FIXED_VALUES),
|
|
475
501
|
fields: [
|
|
476
502
|
{
|
|
477
503
|
file: APPEARANCE_FILES[SETTINGS_TYPE_TAPROOT_STYLES],
|
|
@@ -489,19 +515,19 @@ export function getAppearanceReference() {
|
|
|
489
515
|
...APPEARANCE_FOOTER_FIELDS.map(field => ({
|
|
490
516
|
file: field.file,
|
|
491
517
|
path: field.path,
|
|
492
|
-
|
|
493
|
-
description: field.name === "context"
|
|
494
|
-
? "The footer's theme context, declared in both schemes; empty follows the page. Theme push owns it."
|
|
495
|
-
: "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.",
|
|
496
|
-
renders: "Everything in the enabled footer, including its background, text, links and controls.",
|
|
497
|
-
type: field.type,
|
|
498
|
-
...(field.values ? { values: field.values } : {}),
|
|
518
|
+
...describeFooterField("FooterSettings", field.name),
|
|
499
519
|
optional: field.optional,
|
|
500
|
-
default: field.default,
|
|
501
520
|
})),
|
|
502
521
|
],
|
|
503
|
-
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
|
+
})),
|
|
504
529
|
pageBackgroundVersusCanvas: PAGE_BACKGROUND_VERSUS_CANVAS,
|
|
530
|
+
tagListingWorkflow: TAG_LISTING_WORKFLOW,
|
|
505
531
|
fieldMap: CLI_BINARY_NAME
|
|
506
532
|
+ " help settings maps every pulled field, including the read-only ones, to its app control.",
|
|
507
533
|
imageReferences:
|
|
@@ -548,7 +574,35 @@ export function getAppearanceReference() {
|
|
|
548
574
|
+ "A heading's top margin scales the same way. The last text block in a padded section gets the gap as extra "
|
|
549
575
|
+ "room before the section ends, and an image banner stays flush with its neighbors. A spacer block adds its "
|
|
550
576
|
+ "own height to the gap, so review spacers placed by hand. A site shows the change after its next whole-site "
|
|
551
|
-
+ "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.",
|
|
552
606
|
menuContract:
|
|
553
607
|
"navDrawerStyle 'full-screen' (the published default) opens the mobile menu over the whole viewport with the "
|
|
554
608
|
+ "brand centered above large centered items and navDrawerTransition choosing how it appears (fade, slide-down, "
|
|
@@ -558,7 +612,8 @@ export function getAppearanceReference() {
|
|
|
558
612
|
+ "fontMenu falls back to the body font, never to headings.",
|
|
559
613
|
changeSet: [
|
|
560
614
|
"the footer context and logo variant, saved alongside the theme and header presentation",
|
|
561
|
-
"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",
|
|
562
617
|
"the complete light theme and the complete dark theme",
|
|
563
618
|
],
|
|
564
619
|
atomic: true,
|
|
@@ -567,9 +622,12 @@ export function getAppearanceReference() {
|
|
|
567
622
|
+ "the fields theme push writes — from one snapshot, so the recorded baseline is the revision of the "
|
|
568
623
|
+ "documents the workspace holds; theme push sends it back as the baseline. The whole change set commits in "
|
|
569
624
|
+ "one transaction or none of it does; a change to any of those fields since the pull refuses the push "
|
|
570
|
-
+ "(theme.concurrent_modification) and nothing is written.
|
|
571
|
-
+ "
|
|
572
|
-
+ "
|
|
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.",
|
|
573
631
|
dryRun: CLI_BINARY_NAME + " theme push --dry-run reads the site, lists the JSON paths at which each settings file "
|
|
574
632
|
+ "differs from it, and says whether the recorded baseline is still current or a pending save of the same "
|
|
575
633
|
+ "change set would be replayed; it writes nothing.",
|
|
@@ -587,7 +645,8 @@ export function getAppearanceReference() {
|
|
|
587
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.",
|
|
588
646
|
footerColorMigration:
|
|
589
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.",
|
|
590
|
-
footerContentGuard: "theme push
|
|
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: "
|
|
591
650
|
+ "theme.unpushed_footer_content names " + CLI_BINARY_NAME + " footer push to save them "
|
|
592
651
|
+ "(" + CLI_BINARY_NAME + " pull discards them). A workspace pulled before this baseline "
|
|
593
652
|
+ "fails theme.pull_required; footer push records it non-destructively, while pull "
|
|
@@ -595,44 +654,85 @@ export function getAppearanceReference() {
|
|
|
595
654
|
};
|
|
596
655
|
}
|
|
597
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.";
|
|
598
661
|
const FOOTER_FIELD_DETAILS = Object.freeze({
|
|
599
|
-
"FooterSettings.logoVariant": {
|
|
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
|
+
},
|
|
600
667
|
"FooterSettings.context": {
|
|
601
|
-
|
|
602
|
-
default: "",
|
|
668
|
+
appLabel: "Footer > Colors",
|
|
603
669
|
description:
|
|
604
|
-
"Theme-owned
|
|
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.",
|
|
605
702
|
},
|
|
606
|
-
"FooterSettings.enabled": { type: "boolean", default: false },
|
|
607
|
-
"FooterSettings.showBrand": { type: "boolean", default: true },
|
|
608
|
-
"FooterSettings.showBrandText": { type: "boolean", default: true },
|
|
609
|
-
"FooterSettings.brandSpan": { type: "integer", default: 1, minimum: 1, maximum: FOOTER_LIMITS.brandSpanMax },
|
|
610
|
-
"FooterSettings.asideSpan": { type: "integer", default: 1, minimum: 1, maximum: FOOTER_LIMITS.asideSpanMax },
|
|
611
703
|
"FooterSettings.brandSize": {
|
|
612
704
|
type: "enum",
|
|
613
|
-
default: "standard",
|
|
614
705
|
values: ["standard", "large"],
|
|
615
706
|
description: "Brand text size; logoScale independently sets the logo size.",
|
|
707
|
+
renders: "The name in the enabled footer's brand region.",
|
|
616
708
|
},
|
|
617
709
|
"FooterSettings.logoScale": {
|
|
618
710
|
type: "decimal-string",
|
|
619
|
-
default: "1.0",
|
|
620
711
|
...FOOTER_LOGO_SCALE_LIMITS,
|
|
621
712
|
description:
|
|
622
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.",
|
|
623
715
|
},
|
|
624
716
|
"FooterSettings.logoBox": {
|
|
625
717
|
type: "enum",
|
|
626
|
-
default: "fixed",
|
|
627
718
|
values: ["fixed", "natural"],
|
|
628
719
|
description:
|
|
629
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.",
|
|
630
722
|
},
|
|
631
|
-
...Object.fromEntries(
|
|
632
|
-
|
|
633
|
-
|
|
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 },
|
|
634
729
|
])),
|
|
635
|
-
"FooterSettings.bottomAlignment": {
|
|
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
|
+
},
|
|
636
736
|
...Object.fromEntries(
|
|
637
737
|
["FooterResponsiveAlignment", "FooterResponsiveInlineAlignment"].flatMap(type =>
|
|
638
738
|
FOOTER_ALIGNMENT_LAYOUTS.map(layout => [
|
|
@@ -649,35 +749,57 @@ const FOOTER_FIELD_DETAILS = Object.freeze({
|
|
|
649
749
|
[`${type}.textAlign`, { type: "enum", values: ["", ...FOOTER_TEXT_ALIGN_VALUES], inheritedWhenOmitted: true }],
|
|
650
750
|
])),
|
|
651
751
|
"FooterAlignment.vertical": { type: "enum", values: ["", ...FOOTER_POSITION_VALUES], inheritedWhenOmitted: true },
|
|
652
|
-
"FooterSettings.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
|
+
},
|
|
653
757
|
"FooterSettings.asideHeadingContent": {
|
|
654
758
|
type: "FooterRichText",
|
|
655
|
-
default: { paragraphs: [] },
|
|
656
759
|
maximumCharacters: FOOTER_LIMITS.asideHeadingLength,
|
|
657
760
|
maximumParagraphs: 1,
|
|
761
|
+
renders: "The heading above the footer aside's body and call to action.",
|
|
658
762
|
},
|
|
659
763
|
"FooterSettings.asideBodyContent": {
|
|
660
764
|
type: "FooterRichText",
|
|
661
|
-
default: { paragraphs: [] },
|
|
662
765
|
maximumCharacters: FOOTER_LIMITS.asideBodyLength,
|
|
663
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.",
|
|
664
773
|
},
|
|
665
|
-
"FooterSettings.asideCta": { type: "FooterLink|null", default: null },
|
|
666
774
|
"FooterSettings.bottomContent": {
|
|
667
775
|
type: "FooterRichText",
|
|
668
|
-
default: { paragraphs: [] },
|
|
669
776
|
maximumCharacters: FOOTER_LIMITS.bottomTextLength,
|
|
670
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.",
|
|
671
784
|
},
|
|
672
|
-
"FooterSettings.bottomLinks": { type: "FooterLink[]", default: [], maximumItems: FOOTER_LIMITS.bottomLinks },
|
|
673
785
|
"FooterSettings.socialLinks": {
|
|
674
786
|
type: "FooterSocialLink[]",
|
|
675
|
-
default: [],
|
|
676
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.",
|
|
677
802
|
},
|
|
678
|
-
"FooterSettings.light": { type: "FooterSchemeSettings", default: "scheme defaults" },
|
|
679
|
-
"FooterSettings.dark": { type: "FooterSchemeSettings", default: "scheme defaults" },
|
|
680
|
-
"FooterSettings.featureImage": { type: "FooterFeatureImageSettings|null", default: null },
|
|
681
803
|
"FooterLinkColumn.id": { type: "canonical-lowercase-uuid", required: true },
|
|
682
804
|
"FooterLinkColumn.span": { type: "integer", default: 1, minimum: 1, maximum: FOOTER_LIMITS.columnSpanMax },
|
|
683
805
|
"FooterLinkColumn.alignment": { type: "FooterResponsiveAlignment|null", inheritedWhenOmitted: true },
|
|
@@ -720,32 +842,54 @@ const FOOTER_FIELD_DETAILS = Object.freeze({
|
|
|
720
842
|
},
|
|
721
843
|
"FooterSchemeSettings.logoId": {
|
|
722
844
|
type: "site-owned-png-or-webp-image-uuid",
|
|
723
|
-
default: "",
|
|
724
845
|
description:
|
|
725
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.",
|
|
726
870
|
},
|
|
727
|
-
"FooterSchemeSettings.logoUrl": { type: "url", readOnly: true },
|
|
728
|
-
"FooterSchemeSettings.backgroundImageId": { type: "site-owned-image-uuid", default: "" },
|
|
729
|
-
"FooterSchemeSettings.backgroundImageUrl": { type: "url", readOnly: true },
|
|
730
|
-
"FooterSchemeSettings.backgroundImageOpacity": { type: "number", default: 1, minimum: 0, maximum: 1 },
|
|
731
871
|
"FooterSchemeSettings.backgroundPresentation": {
|
|
732
872
|
type: "enum",
|
|
733
|
-
default: FOOTER_BACKGROUND_PRESENTATIONS[0],
|
|
734
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.",
|
|
735
880
|
},
|
|
736
|
-
"FooterSchemeSettings.backgroundFade": { type: "enum", default: FOOTER_FADE_MODES[0], values: FOOTER_FADE_MODES },
|
|
737
881
|
"FooterSchemeSettings.backgroundRepeatHeightPx": {
|
|
738
882
|
type: "integer",
|
|
739
|
-
default: FOOTER_LIMITS.backgroundRepeatHeightDefault,
|
|
740
883
|
minimum: FOOTER_LIMITS.backgroundRepeatHeightMinimum,
|
|
741
884
|
maximum: FOOTER_LIMITS.backgroundRepeatHeightMaximum,
|
|
742
885
|
step: FOOTER_LIMITS.backgroundRepeatHeightStep,
|
|
886
|
+
renders: "The background image height when it repeats horizontally, in this color scheme.",
|
|
743
887
|
},
|
|
744
888
|
"FooterSchemeSettings.additionalTopPaddingRem": {
|
|
745
889
|
type: "number",
|
|
746
|
-
default: 0,
|
|
747
890
|
minimum: 0,
|
|
748
891
|
maximum: FOOTER_LIMITS.additionalTopPaddingRemMaximum,
|
|
892
|
+
renders: "Space at the top of the footer content in this color scheme.",
|
|
749
893
|
},
|
|
750
894
|
"FooterFeatureImageSettings.imageId": { type: "site-owned-image-uuid", requiredWith: "alt" },
|
|
751
895
|
"FooterFeatureImageSettings.imageUrl": { type: "url", readOnly: true },
|
|
@@ -759,11 +903,28 @@ const FOOTER_FIELD_DETAILS = Object.freeze({
|
|
|
759
903
|
"FooterFeatureResponsiveImageUrl.url": { type: "url", readOnly: true },
|
|
760
904
|
});
|
|
761
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
|
+
|
|
762
923
|
function footerMessages() {
|
|
763
924
|
return Object.entries(FOOTER_FIELD_INVENTORY).map(([name, fields]) => ({
|
|
764
925
|
name,
|
|
765
926
|
additionalProperties: false,
|
|
766
|
-
fields: fields.map((field) => ({ name: field, ...
|
|
927
|
+
fields: fields.map((field) => ({ name: field, ...describeFooterField(name, field) })),
|
|
767
928
|
}));
|
|
768
929
|
}
|
|
769
930
|
|
|
@@ -771,7 +932,21 @@ export function getFooterReference() {
|
|
|
771
932
|
return {
|
|
772
933
|
title: "Complete footer workspace and save contract",
|
|
773
934
|
referenceKind: "footer",
|
|
774
|
-
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.",
|
|
775
950
|
workspaceFile: APPEARANCE_FILES[SETTINGS_TYPE_SITE_PUBLISHING_PREFERENCES],
|
|
776
951
|
workspacePath: "settings.footerSettings",
|
|
777
952
|
messages: footerMessages(),
|
|
@@ -807,24 +982,26 @@ export function getFooterReference() {
|
|
|
807
982
|
fitCheck:
|
|
808
983
|
"validate reports footer.word_breaks at five widths: desktop, small desktop, tablet, phone and Small phone (320px); footer push "
|
|
809
984
|
+ "prints the same warnings before saving. At most 12 are shown, with the true count and any remainder. "
|
|
810
|
-
+ "Estimates use
|
|
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. "
|
|
811
987
|
+ "Supported whitespace, hyphen and zero-width break opportunities are estimated; contextual shaping is bounded, "
|
|
812
988
|
+ "and Han, Kana or Thai fragments are skipped. When local upload dimensions are unavailable the CLI assumes a maximum "
|
|
813
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. "
|
|
814
990
|
+ "The deployment check covers standard and profile sites; managed Docs sites use validate and the Footer tab.",
|
|
815
991
|
readOnlyProjections: FOOTER_READ_ONLY_FIELDS,
|
|
816
992
|
concurrency:
|
|
817
|
-
|
|
818
|
-
+ "and both logo ids, but no context, logoVariant, retired colors, response URLs or effective inherited choices.
|
|
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 "
|
|
819
995
|
+ "footer.concurrent_modification; pull, reconcile, and retry.",
|
|
820
996
|
themeInteraction:
|
|
821
997
|
"theme push saves the footer context and logoVariant atomically with the themes and rewrites the file from the saved result. "
|
|
822
|
-
+ "
|
|
998
|
+
+ "A live theme push refuses while unpushed footer-content edits exist (theme.unpushed_footer_content); run " + CLI_BINARY_NAME
|
|
823
999
|
+ " footer push first, or pull to discard the edit. Footer push strips the context and logoVariant from its request and restores "
|
|
824
1000
|
+ "the local choice after projecting the response, so presentation edits not yet sent by theme push are preserved.",
|
|
825
1001
|
workflow: [
|
|
826
1002
|
CLI_BINARY_NAME + " pull",
|
|
827
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",
|
|
828
1005
|
CLI_BINARY_NAME + " footer push",
|
|
829
1006
|
CLI_BINARY_NAME + " pull to verify the semantic round trip",
|
|
830
1007
|
],
|
|
@@ -851,7 +1028,8 @@ function fieldConstraint(field) {
|
|
|
851
1028
|
if (field.requiredWhen) details.push(`required when ${field.requiredWhen}`);
|
|
852
1029
|
if (field.requiredWith) details.push(`required with ${field.requiredWith}`);
|
|
853
1030
|
if (field.exclusiveWith) details.push(`exclusive with ${field.exclusiveWith}`);
|
|
854
|
-
|
|
1031
|
+
const defaultDetail = formatReferenceDefault(field);
|
|
1032
|
+
if (defaultDetail) details.push(defaultDetail);
|
|
855
1033
|
if (field.inheritedWhenOmitted) details.push("inherits when omitted");
|
|
856
1034
|
if (field.additionalProperties === true) details.push("open named map");
|
|
857
1035
|
if (field.additionalProperties === false) details.push("unlisted keys rejected");
|
|
@@ -889,6 +1067,25 @@ function fieldConstraint(field) {
|
|
|
889
1067
|
return (field.type ?? "object") + (details.length > 0 ? `; ${details.join("; ")}` : "");
|
|
890
1068
|
}
|
|
891
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
|
+
|
|
892
1089
|
export function formatPresentationReference(reference) {
|
|
893
1090
|
if (reference.referenceKind === "theme") {
|
|
894
1091
|
const groups = reference.groups.map((group) =>
|
|
@@ -908,7 +1105,9 @@ export function formatPresentationReference(reference) {
|
|
|
908
1105
|
+ reference.roleResolution.bindingForms.map((line) => " - " + line).join("\n")
|
|
909
1106
|
+ "\n\nPrecedence:\n"
|
|
910
1107
|
+ reference.roleResolution.precedence.map((line, index) => " " + (index + 1) + ". " + line).join("\n")
|
|
911
|
-
+ "\n\nTheme groups:\n" + groups + "\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"
|
|
912
1111
|
+ JSON.stringify(reference.example, null, 2) + "\n";
|
|
913
1112
|
}
|
|
914
1113
|
if (reference.referenceKind === "appearance") {
|
|
@@ -917,12 +1116,18 @@ export function formatPresentationReference(reference) {
|
|
|
917
1116
|
" " + field.file + " :: " + field.path + " — " + fieldConstraint(field)
|
|
918
1117
|
+ "\n app: " + field.appLabel + ". " + field.description
|
|
919
1118
|
+ (field.renders === undefined ? "" : "\n renders: " + field.renders)
|
|
1119
|
+
+ (field.defaultRendering === undefined ? "" : "\n " + formatDefaultRendering(field))
|
|
1120
|
+
+ formatSettingSizes(field)
|
|
920
1121
|
).join("\n")
|
|
921
1122
|
+ "\n\nRead-only server projections:\n"
|
|
922
|
-
+ reference.readOnlyProjections.map((field) =>
|
|
1123
|
+
+ reference.readOnlyProjections.map((field) =>
|
|
1124
|
+
" " + field.file + " :: " + field.path + " — " + formatReferenceDefault(field)
|
|
1125
|
+
+ "\n renders: " + field.renders
|
|
1126
|
+
).join("\n")
|
|
923
1127
|
+ "\n\nPage background image versus canvas image:\n - " + reference.pageBackgroundVersusCanvas.pageBackground
|
|
924
1128
|
+ "\n - " + reference.pageBackgroundVersusCanvas.canvas
|
|
925
1129
|
+ "\n - " + reference.pageBackgroundVersusCanvas.shared
|
|
1130
|
+
+ "\n\nBuild a tag listing\n" + reference.tagListingWorkflow.map(step => " - " + step).join("\n")
|
|
926
1131
|
+ "\n\nField map: " + reference.fieldMap
|
|
927
1132
|
+ "\n\nImages: " + reference.imageReferences + "\nLogos: " + reference.logoContract
|
|
928
1133
|
+ "\nLogo contrast: " + reference.logoContrastContract
|
|
@@ -930,6 +1135,7 @@ export function formatPresentationReference(reference) {
|
|
|
930
1135
|
+ "\nFavicon: " + reference.faviconContract
|
|
931
1136
|
+ "\nHeader width: " + reference.headerWidthContract
|
|
932
1137
|
+ "\nBlock spacing: " + reference.blockSpacingContract
|
|
1138
|
+
+ "\nBreadcrumbs: " + reference.breadcrumbContract
|
|
933
1139
|
+ "\nMobile menu and menu font: " + reference.menuContract
|
|
934
1140
|
+ "\nSurface contexts: " + reference.surfaceContexts
|
|
935
1141
|
+ "\nRetired footer color recipe: " + reference.footerColorMigration
|
|
@@ -939,7 +1145,7 @@ export function formatPresentationReference(reference) {
|
|
|
939
1145
|
+ "\nRevision: " + reference.revision
|
|
940
1146
|
+ "\nDry run: " + reference.dryRun
|
|
941
1147
|
+ "\nRetry: " + reference.retry
|
|
942
|
-
+ "\nRecovery: " + reference.recovery +
|
|
1148
|
+
+ "\nRecovery: " + reference.recovery + formatFixedValues(reference.fixedValues);
|
|
943
1149
|
}
|
|
944
1150
|
if (reference.referenceKind === "settings") return formatSettingsReference(reference);
|
|
945
1151
|
if (reference.referenceKind === "footer") {
|
|
@@ -948,6 +1154,7 @@ export function formatPresentationReference(reference) {
|
|
|
948
1154
|
+ message.fields.map((field) =>
|
|
949
1155
|
" " + field.name.padEnd(30) + fieldConstraint(field)
|
|
950
1156
|
+ (field.description ? "; " + field.description : "")
|
|
1157
|
+
+ (field.renders ? "\n renders: " + field.renders : "")
|
|
951
1158
|
).join("\n")
|
|
952
1159
|
).join("\n\n");
|
|
953
1160
|
return reference.title + "\nUsage: " + reference.usage + "\nWorkspace: "
|
|
@@ -956,12 +1163,16 @@ export function formatPresentationReference(reference) {
|
|
|
956
1163
|
+ "\nImages: " + reference.imageRule
|
|
957
1164
|
+ "\nLayout: " + reference.layoutRule + "\nAlignment: " + reference.alignmentRule
|
|
958
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")
|
|
959
1170
|
+ "\nConcurrency: " + reference.concurrency
|
|
960
1171
|
+ "\nTheme interaction: " + reference.themeInteraction + "\nRead-only projections: "
|
|
961
1172
|
+ reference.readOnlyProjections.join(", ") + "\n\nWorkflow:\n"
|
|
962
1173
|
+ reference.workflow.map((step, index) => " " + (index + 1) + ". " + step).join("\n")
|
|
963
1174
|
+ "\n\nValid marketing-site example:\n"
|
|
964
|
-
+ JSON.stringify(reference.example, null, 2) +
|
|
1175
|
+
+ JSON.stringify(reference.example, null, 2) + formatFixedValues(reference.fixedValues);
|
|
965
1176
|
}
|
|
966
1177
|
throw new TypeError("Unknown presentation reference kind '" + reference.referenceKind + "'.");
|
|
967
1178
|
}
|