@taprootio/site-authoring 0.5.0 → 0.6.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/examples/riverbend-wellness/settings/taproot-styles.json +0 -4
- package/package.json +2 -2
- package/src/appearance-contract.js +28 -28
- package/src/constants.js +1 -1
- package/src/content/components.js +3 -0
- package/src/presentation-reference.js +4 -9
- package/src/reference-help.js +1 -1
- package/src/settings-catalog.js +0 -4
- package/src/theme-validation.js +2 -0
|
@@ -716,10 +716,6 @@
|
|
|
716
716
|
"viewportMin": 320
|
|
717
717
|
},
|
|
718
718
|
"defaultScheme": "system",
|
|
719
|
-
"fontBrand": "",
|
|
720
|
-
"fontWeightBrand": "",
|
|
721
|
-
"fontMenu": "",
|
|
722
|
-
"fontWeightMenu": "",
|
|
723
719
|
"lightLogoId": "a0000000-0000-4000-8000-0000000000a0",
|
|
724
720
|
"darkLogoId": "a0000000-0000-4000-8000-0000000000a1",
|
|
725
721
|
"lightCanvasImageId": "",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taprootio/site-authoring",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Taproot site authoring CLI: sign in once in the browser, then pull, validate, push, preview, approve, and deploy a site from the terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "ISC",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"README.md"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@taprootio/espalier": "4.
|
|
31
|
+
"@taprootio/espalier": "4.9.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"test": "node --test",
|
|
@@ -26,34 +26,6 @@ export const APPEARANCE_SCALAR_FIELDS = Object.freeze([
|
|
|
26
26
|
values: Object.freeze(["system", "light", "dark"]),
|
|
27
27
|
default: "light",
|
|
28
28
|
}),
|
|
29
|
-
Object.freeze({
|
|
30
|
-
settingsType: SETTINGS_TYPE_TAPROOT_STYLES,
|
|
31
|
-
name: "fontBrand",
|
|
32
|
-
path: "taproot-styles.fontBrand",
|
|
33
|
-
type: "string",
|
|
34
|
-
default: "",
|
|
35
|
-
}),
|
|
36
|
-
Object.freeze({
|
|
37
|
-
settingsType: SETTINGS_TYPE_TAPROOT_STYLES,
|
|
38
|
-
name: "fontWeightBrand",
|
|
39
|
-
path: "taproot-styles.fontWeightBrand",
|
|
40
|
-
type: "string",
|
|
41
|
-
default: "",
|
|
42
|
-
}),
|
|
43
|
-
Object.freeze({
|
|
44
|
-
settingsType: SETTINGS_TYPE_TAPROOT_STYLES,
|
|
45
|
-
name: "fontMenu",
|
|
46
|
-
path: "taproot-styles.fontMenu",
|
|
47
|
-
type: "string",
|
|
48
|
-
default: "",
|
|
49
|
-
}),
|
|
50
|
-
Object.freeze({
|
|
51
|
-
settingsType: SETTINGS_TYPE_TAPROOT_STYLES,
|
|
52
|
-
name: "fontWeightMenu",
|
|
53
|
-
path: "taproot-styles.fontWeightMenu",
|
|
54
|
-
type: "string",
|
|
55
|
-
default: "",
|
|
56
|
-
}),
|
|
57
29
|
...["lightLogoId", "darkLogoId", "lightCanvasImageId", "darkCanvasImageId"].map((name) =>
|
|
58
30
|
Object.freeze({
|
|
59
31
|
settingsType: SETTINGS_TYPE_TAPROOT_STYLES,
|
|
@@ -186,6 +158,33 @@ export const APPEARANCE_SCALAR_FIELDS = Object.freeze([
|
|
|
186
158
|
),
|
|
187
159
|
]);
|
|
188
160
|
|
|
161
|
+
// TR00728: these four scalars were retired in favor of per-scheme theme
|
|
162
|
+
// properties (docs/architecture/decisions/site-fonts-are-per-scheme-theme-properties.md).
|
|
163
|
+
// There is no compatibility read path: a workspace pulled before the change
|
|
164
|
+
// can still carry them at the top level of the styles document, and the
|
|
165
|
+
// owner must move each value into lightTheme/darkTheme by hand rather than
|
|
166
|
+
// have it silently discarded. Declaration order is refusal order.
|
|
167
|
+
const RETIRED_TAPROOT_STYLES_SCALARS = Object.freeze([
|
|
168
|
+
"fontBrand",
|
|
169
|
+
"fontWeightBrand",
|
|
170
|
+
"fontMenu",
|
|
171
|
+
"fontWeightMenu",
|
|
172
|
+
]);
|
|
173
|
+
|
|
174
|
+
function refuseRetiredScalarFonts(stylesDocument) {
|
|
175
|
+
if (stylesDocument === null || typeof stylesDocument !== "object") return;
|
|
176
|
+
for (const name of RETIRED_TAPROOT_STYLES_SCALARS) {
|
|
177
|
+
if (Object.hasOwn(stylesDocument, name)) {
|
|
178
|
+
fail(
|
|
179
|
+
"appearance.retired_scalar",
|
|
180
|
+
`taproot-styles.${name} is retired; move its value into lightTheme.${name} and darkTheme.${name} `
|
|
181
|
+
+ "instead. Fonts are per-scheme theme properties now.",
|
|
182
|
+
`taproot-styles.${name}`,
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
189
188
|
export const APPEARANCE_READ_ONLY_FIELDS = Object.freeze([
|
|
190
189
|
Object.freeze({ file: APPEARANCE_FILES[SETTINGS_TYPE_TAPROOT_STYLES], path: "settings.lightLogoUrl" }),
|
|
191
190
|
Object.freeze({ file: APPEARANCE_FILES[SETTINGS_TYPE_TAPROOT_STYLES], path: "settings.darkLogoUrl" }),
|
|
@@ -297,6 +296,7 @@ export function buildAppearanceScalarOperations(documents, knownImageIds) {
|
|
|
297
296
|
if (!(knownImageIds instanceof Set)) {
|
|
298
297
|
throw new TypeError("Appearance validation requires the known site-owned image identities.");
|
|
299
298
|
}
|
|
299
|
+
refuseRetiredScalarFonts(documents[SETTINGS_TYPE_TAPROOT_STYLES]);
|
|
300
300
|
return APPEARANCE_SCALAR_FIELDS.map((definition) => ({
|
|
301
301
|
settingsType: definition.settingsType,
|
|
302
302
|
setting: definition.name,
|
package/src/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const CLI_NAME = "@taprootio/site-authoring";
|
|
2
|
-
export const CLI_VERSION = "0.
|
|
2
|
+
export const CLI_VERSION = "0.6.0";
|
|
3
3
|
export const CLI_BINARY_NAME = "taproot-site";
|
|
4
4
|
export const RESULT_SCHEMA_VERSION = 1;
|
|
5
5
|
export const CONFIG_FILE_NAME = "taproot-site.json";
|
|
@@ -253,6 +253,8 @@ const IMAGE_BANNER = Object.freeze({
|
|
|
253
253
|
scrim: enumOf("auto", "none", "flat", "top", "bottom", "left", "right", "radial"),
|
|
254
254
|
scrimStrength: enumOf("soft", "medium", "strong"),
|
|
255
255
|
bannerScheme: enumOf("auto", "light", "dark"),
|
|
256
|
+
// Drop-shadow strength applied to the overlay text.
|
|
257
|
+
textShadow: enumOf("none", "light", "medium", "strong"),
|
|
256
258
|
// A built-in or application-registered Espalier texture name.
|
|
257
259
|
texture: textureName(),
|
|
258
260
|
textureScale: enumOf("fine", "medium", "coarse"),
|
|
@@ -486,6 +488,7 @@ const COMPONENT_DEFINITIONS = Object.freeze({
|
|
|
486
488
|
scrim: "auto",
|
|
487
489
|
scrimStrength: "medium",
|
|
488
490
|
bannerScheme: "auto",
|
|
491
|
+
textShadow: "none",
|
|
489
492
|
texture: "none",
|
|
490
493
|
textureScale: "medium",
|
|
491
494
|
},
|
|
@@ -57,12 +57,6 @@ function getEspalierVersion() {
|
|
|
57
57
|
|
|
58
58
|
const OPTIONAL_THEME_FIELDS = Object.freeze([
|
|
59
59
|
"explicitMappingTokens",
|
|
60
|
-
// Espalier 4.7.0 menu typography: documented so the theme help covers the
|
|
61
|
-
// installed contract, optional so pulled baselines that predate it stay
|
|
62
|
-
// complete (the server seeds and requires the fields listed in
|
|
63
|
-
// DefaultSiteTheme.RequiredProperties only).
|
|
64
|
-
"fontMenu",
|
|
65
|
-
"fontWeightMenu",
|
|
66
60
|
"boxBackgroundImage",
|
|
67
61
|
"boxBackgroundImageOpacity",
|
|
68
62
|
"vellumOpacity",
|
|
@@ -350,11 +344,12 @@ export function getAppearanceReference() {
|
|
|
350
344
|
"navDrawerStyle 'full-screen' (the published default) opens the mobile menu over the whole viewport with the "
|
|
351
345
|
+ "brand centered above large centered items and navDrawerTransition choosing how it appears (fade, slide-down, "
|
|
352
346
|
+ "slide-up, slide-left, or slide-right); 'panel' keeps the side panel, which exists for application-style "
|
|
353
|
-
+ "menus with many groups.
|
|
354
|
-
+ "
|
|
347
|
+
+ "menus with many groups. The navigation face itself is not an appearance scalar: fontMenu and fontWeightMenu "
|
|
348
|
+
+ "are per-scheme theme fields set in settings.lightTheme/darkTheme the same way fontBrand is, and an empty "
|
|
349
|
+
+ "fontMenu falls back to the body font, never to headings.",
|
|
355
350
|
mutationOrder: [
|
|
356
351
|
"fresh footer read plus concurrency-protected ten-color overlay",
|
|
357
|
-
"default scheme,
|
|
352
|
+
"default scheme, assets, favicon, and header scalars",
|
|
358
353
|
"complete light theme, then complete dark theme",
|
|
359
354
|
],
|
|
360
355
|
nonAtomic: true,
|
package/src/reference-help.js
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
|
|
57
57
|
export { getAppearanceReference, getFooterReference, getThemeReference };
|
|
58
58
|
|
|
59
|
-
export const REFERENCE_VERSION =
|
|
59
|
+
export const REFERENCE_VERSION = 19;
|
|
60
60
|
export const PAGE_TYPES = Object.freeze(["free-form"]);
|
|
61
61
|
export const REFERENCE_TOPICS = Object.freeze([
|
|
62
62
|
Object.freeze({ name: "pages", usage: `${CLI_BINARY_NAME} help pages`, summary: "List authorable page types." }),
|
package/src/settings-catalog.js
CHANGED
|
@@ -56,10 +56,6 @@ export const SETTINGS_GROUPS = Object.freeze([
|
|
|
56
56
|
{ name: "darkTheme", wireType: "theme" },
|
|
57
57
|
...stringFields(
|
|
58
58
|
"defaultScheme",
|
|
59
|
-
"fontBrand",
|
|
60
|
-
"fontWeightBrand",
|
|
61
|
-
"fontMenu",
|
|
62
|
-
"fontWeightMenu",
|
|
63
59
|
"lightLogoId",
|
|
64
60
|
"lightLogoUrl",
|
|
65
61
|
"darkLogoId",
|
package/src/theme-validation.js
CHANGED
|
@@ -44,10 +44,12 @@ export const REQUIRED_THEME_PROPERTIES = Object.freeze([
|
|
|
44
44
|
"fontHeadings",
|
|
45
45
|
"fontBrand",
|
|
46
46
|
"fontMonospace",
|
|
47
|
+
"fontMenu",
|
|
47
48
|
"fontWeightBody",
|
|
48
49
|
"fontWeightHeadings",
|
|
49
50
|
"fontWeightBrand",
|
|
50
51
|
"fontWeightMonospace",
|
|
52
|
+
"fontWeightMenu",
|
|
51
53
|
]);
|
|
52
54
|
|
|
53
55
|
const REQUIRED_ANGLE_LEAVES = Object.freeze([
|