@taprootio/site-authoring 0.34.0 → 0.36.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 +115 -1
- package/examples/riverbend-wellness/nav.json +3 -1
- package/package.json +2 -2
- package/src/api.js +20 -1
- package/src/appearance-contract.js +54 -14
- package/src/block-flow.js +8 -0
- package/src/changelog.json +51 -0
- package/src/constants.js +10 -3
- package/src/content/free-form-columns.js +250 -0
- package/src/content/free-form-section-registry.json +47 -1
- package/src/content/markdown.js +84 -4
- package/src/content/tiptap-prosemirror.ts +31 -3
- package/src/content/validate-document.js +14 -1
- package/src/content/vocabulary.js +3 -0
- package/src/header-presentation.js +47 -0
- package/src/presentation-reference.js +29 -30
- package/src/reference-help.js +51 -7
- package/src/setting-reference.js +21 -5
- package/src/settings-catalog.js +16 -0
- package/src/transport.js +2 -4
- package/src/typed-page-reference.js +1 -1
- package/src/verbs/nav-push.js +65 -29
- package/src/verbs/pages-push.js +8 -1
- package/src/verbs/theme-push.js +29 -9
- package/src/workspace.js +2 -1
package/README.md
CHANGED
|
@@ -463,7 +463,43 @@ description over 160 characters is a warning (`descriptionWarnings`), because
|
|
|
463
463
|
search results cut it off; over 1000 is refused with
|
|
464
464
|
`pages.description_too_long`, by the CLI and by Taproot.
|
|
465
465
|
|
|
466
|
-
|
|
466
|
+
#### Columns inside a section
|
|
467
|
+
|
|
468
|
+
Free-form pages can put two or three editable regions side by side inside a
|
|
469
|
+
section. The regions stack in source order when the section is too narrow.
|
|
470
|
+
`taproot-site help page free-form` describes the JSON vocabulary and limits.
|
|
471
|
+
|
|
472
|
+
```markdown
|
|
473
|
+
:::section {}
|
|
474
|
+
:::columns {"ratio":"40-60"}
|
|
475
|
+
:::column {}
|
|
476
|
+
## Start a conversation
|
|
477
|
+
|
|
478
|
+
Tell us about your project.
|
|
479
|
+
:::endcolumn
|
|
480
|
+
:::column {}
|
|
481
|
+
Your ordinary blocks or form component go here.
|
|
482
|
+
:::endcolumn
|
|
483
|
+
:::endcolumns
|
|
484
|
+
:::
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
The default is two equal columns; omit default `count` and `ratio`. Set
|
|
488
|
+
`count` to `3` for three equal regions. Two columns also accept `40-60` and
|
|
489
|
+
`60-40`. Each `:::column {}` needs at least one ordinary flow block. Layouts
|
|
490
|
+
belong directly in sections and cannot nest. Headers and closers must be
|
|
491
|
+
unindented, standalone lines; close each region and layout before closing the
|
|
492
|
+
section. Code fences keep marker text literal. Prefix a marker with a backslash
|
|
493
|
+
to write it as prose. Existing Markdown parsing budgets still apply across all
|
|
494
|
+
regions.
|
|
495
|
+
|
|
496
|
+
JSON uses `columns` with `column` children, and preserves component, image and
|
|
497
|
+
form references. `pull` writes JSON; Markdown conversion remains one way. The
|
|
498
|
+
existing 1 MiB response limit and 2 MiB workspace input limit remain in force:
|
|
499
|
+
a large hydrated page can be refused by the CLI even when it is valid on the
|
|
500
|
+
server. A refused response does not partially replace workspace files.
|
|
501
|
+
|
|
502
|
+
## Page authors
|
|
467
503
|
|
|
468
504
|
Pages are authorless by default: a page you create with the CLI publishes with
|
|
469
505
|
no byline unless you name an author, and `pages push` lists the pages it created
|
|
@@ -991,6 +1027,84 @@ this. Existing pages change when a publish renders the whole site, such as a
|
|
|
991
1027
|
settings or navigation change; pages an incremental publish copies forward keep
|
|
992
1028
|
their old links until then.
|
|
993
1029
|
|
|
1030
|
+
### Navigation groups expand in 0.35.0
|
|
1031
|
+
|
|
1032
|
+
An item with children is a dropdown header with no address of its own. Its label
|
|
1033
|
+
opens and closes the group; put each destination in a child item. `nav push` and
|
|
1034
|
+
the app refuse an address on a parent with children and explain how to repair it.
|
|
1035
|
+
See `taproot-site help nav` for the file shape.
|
|
1036
|
+
|
|
1037
|
+
Pull preserves an old linked parent's address as a first child with the same
|
|
1038
|
+
title. The parent keeps its ID and title, and existing children keep their IDs
|
|
1039
|
+
and order. Push the pulled tree normally to persist that form. Published pages
|
|
1040
|
+
change on regeneration and deployment: the group is a button without a new-tab
|
|
1041
|
+
announcement, while its child links retain their destinations and link behavior.
|
|
1042
|
+
The workspace accepts up to 2,000 navigation items in a 2 MiB navigation file.
|
|
1043
|
+
|
|
1044
|
+
### Header end links in 0.35.0
|
|
1045
|
+
|
|
1046
|
+
In Site settings → Header & navigation, edit a top-level page or external link
|
|
1047
|
+
and set **Show in** to **Header end** to place it before the header controls.
|
|
1048
|
+
For CLI authoring, set `"position": "NAV_ITEM_POSITION_HEADER_END"` on that item
|
|
1049
|
+
in `nav.json`. Omit `position` for Menu; explicit `NAV_ITEM_POSITION_MENU` and
|
|
1050
|
+
`NAV_ITEM_POSITION_UNSPECIFIED` mean the same thing and disappear on pull.
|
|
1051
|
+
Dropdown headers and nested items stay in Menu. An unsupported position is
|
|
1052
|
+
refused at its exact item `.position` path before saving.
|
|
1053
|
+
|
|
1054
|
+
Auto headers show these links beside their controls while everything fits,
|
|
1055
|
+
then put every item in the same collapsed menu in original order on phones.
|
|
1056
|
+
Drawer mode always combines them, and the minimal layout uses the drawer.
|
|
1057
|
+
The existing auto and drawer display choices stay the same. Destinations
|
|
1058
|
+
and external-link behavior stay the same. Pull, edit and `nav push` as usual;
|
|
1059
|
+
the next whole-site render applies the change. Help reference version 55 covers
|
|
1060
|
+
the new rule and file shape in `taproot-site help nav`.
|
|
1061
|
+
|
|
1062
|
+
### Navigation button links in 0.36.0
|
|
1063
|
+
|
|
1064
|
+
Set **Display as** to **Button** on a page or external link in the navigation
|
|
1065
|
+
item dialog, or add `"appearance": "NAV_ITEM_APPEARANCE_BUTTON"` to that item in
|
|
1066
|
+
`nav.json`. Button styling works at any depth, in Menu and wherever Header end
|
|
1067
|
+
is available. Dropdown headers cannot use it. Changing a link to a dropdown
|
|
1068
|
+
resets Display as to Link.
|
|
1069
|
+
|
|
1070
|
+
Omit `appearance` for Link. Explicit `NAV_ITEM_APPEARANCE_UNSPECIFIED` and
|
|
1071
|
+
`NAV_ITEM_APPEARANCE_LINK` are equivalent and disappear on pull; Button survives
|
|
1072
|
+
pull, validation and `nav push`. Invalid appearance values and Button on a
|
|
1073
|
+
dropdown are refused at the exact item `.appearance` path before saving.
|
|
1074
|
+
|
|
1075
|
+
Button links retain their destinations, external-link behavior and styling in
|
|
1076
|
+
the collapsed menu. The current page keeps Button styling without becoming an
|
|
1077
|
+
interactive link. The next whole-site render applies the change. Help reference
|
|
1078
|
+
version 56 covers the file shape in `taproot-site help nav`. Upgrade to 0.36.0
|
|
1079
|
+
before sign-in or token exchange; older clients cannot safely replace this
|
|
1080
|
+
whole tree because they do not preserve appearance.
|
|
1081
|
+
|
|
1082
|
+
### Header height and compact logos in 0.36.0
|
|
1083
|
+
|
|
1084
|
+
Edit the existing pulled `settings/site-header.json`: set `settings.headerPosition`
|
|
1085
|
+
to `"fixed"` and `settings.headerHeightMultiplier` to a string such as `"1.8"`.
|
|
1086
|
+
The range is `"1.0"` through `"5.0"` in 0.1 steps. Omitted, empty, `"1"` and
|
|
1087
|
+
`"1.0"` mean standard height and disappear on pull; `"2"` normalizes to `"2.0"`.
|
|
1088
|
+
JSON numbers, scientific notation, whitespace and off-grid values are refused
|
|
1089
|
+
at `site-header.headerHeightMultiplier`. Preserve the file's envelope and other
|
|
1090
|
+
settings, then use `validate` and `theme push` as usual.
|
|
1091
|
+
|
|
1092
|
+
The multiplier changes the primary bar. Extra menu rows, navigation text and
|
|
1093
|
+
header controls retain their size. Fixed headers above 1.0 shrink to standard
|
|
1094
|
+
height on scroll and expand near the top. Normal and Sticky retain their
|
|
1095
|
+
configured height; Fixed at 1.0 keeps the regular logo.
|
|
1096
|
+
|
|
1097
|
+
To use alternate artwork after shrinking, upload it with `media upload` and set
|
|
1098
|
+
`settings.lightCompactLogoId` and/or `settings.darkCompactLogoId` in the existing
|
|
1099
|
+
`settings/taproot-styles.json`. The app exposes **Compact logo** for Fixed above
|
|
1100
|
+
1.0 in **Settings → Header & navigation**. Each compact scheme falls back to the
|
|
1101
|
+
other compact scheme, then the regular resolved logo. Without alternate artwork,
|
|
1102
|
+
the regular logo resizes. A compact choice needs a regular header logo and cannot
|
|
1103
|
+
create a brand by itself. Saved choices survive other header modes; their URLs
|
|
1104
|
+
are read-only server projections. Preview light/dark and desktop/390-wide, then
|
|
1105
|
+
stage and deploy the settings for the published site. `help appearance` and
|
|
1106
|
+
`help settings` describe both files.
|
|
1107
|
+
|
|
994
1108
|
### What changed between releases
|
|
995
1109
|
|
|
996
1110
|
Taproot accepts only the latest CLI, so an upgrade can be forced at any time.
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
"id": "a0000000-0000-4000-8000-000000000032",
|
|
18
18
|
"kind": "NAV_ITEM_KIND_EXTERNAL_URL",
|
|
19
19
|
"title": "Book a class",
|
|
20
|
-
"externalUrl": "https://schedule.example.test/riverbend"
|
|
20
|
+
"externalUrl": "https://schedule.example.test/riverbend",
|
|
21
|
+
"position": "NAV_ITEM_POSITION_HEADER_END",
|
|
22
|
+
"appearance": "NAV_ITEM_APPEARANCE_BUTTON"
|
|
21
23
|
}
|
|
22
24
|
]
|
|
23
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taprootio/site-authoring",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.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": "6.
|
|
31
|
+
"@taprootio/espalier": "6.13.1",
|
|
32
32
|
"mediabunny": "1.61.1"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
package/src/api.js
CHANGED
|
@@ -92,6 +92,22 @@ export const NAV_ITEM_KINDS = Object.freeze([
|
|
|
92
92
|
NAV_ITEM_KIND_EXTERNAL_URL,
|
|
93
93
|
NAV_ITEM_KIND_GROUP_HEADER,
|
|
94
94
|
]);
|
|
95
|
+
export const NAV_ITEM_POSITION_UNSPECIFIED = "NAV_ITEM_POSITION_UNSPECIFIED";
|
|
96
|
+
export const NAV_ITEM_POSITION_MENU = "NAV_ITEM_POSITION_MENU";
|
|
97
|
+
export const NAV_ITEM_POSITION_HEADER_END = "NAV_ITEM_POSITION_HEADER_END";
|
|
98
|
+
export const NAV_ITEM_POSITIONS = Object.freeze([
|
|
99
|
+
NAV_ITEM_POSITION_UNSPECIFIED,
|
|
100
|
+
NAV_ITEM_POSITION_MENU,
|
|
101
|
+
NAV_ITEM_POSITION_HEADER_END,
|
|
102
|
+
]);
|
|
103
|
+
export const NAV_ITEM_APPEARANCE_UNSPECIFIED = "NAV_ITEM_APPEARANCE_UNSPECIFIED";
|
|
104
|
+
export const NAV_ITEM_APPEARANCE_LINK = "NAV_ITEM_APPEARANCE_LINK";
|
|
105
|
+
export const NAV_ITEM_APPEARANCE_BUTTON = "NAV_ITEM_APPEARANCE_BUTTON";
|
|
106
|
+
export const NAV_ITEM_APPEARANCES = Object.freeze([
|
|
107
|
+
NAV_ITEM_APPEARANCE_UNSPECIFIED,
|
|
108
|
+
NAV_ITEM_APPEARANCE_LINK,
|
|
109
|
+
NAV_ITEM_APPEARANCE_BUTTON,
|
|
110
|
+
]);
|
|
95
111
|
export const NAVIGATION_MAXIMUM_DEPTH = 3;
|
|
96
112
|
|
|
97
113
|
export const DEPLOYMENT_ENVIRONMENT_STAGING = "DEPLOYMENT_ENVIRONMENT_STAGING";
|
|
@@ -686,7 +702,9 @@ export async function publishDrafts(client, pageIds) {
|
|
|
686
702
|
*/
|
|
687
703
|
export async function getNavigation(client, siteId) {
|
|
688
704
|
const search = query([["environment", SITE_ENVIRONMENT_DRAFT]]);
|
|
689
|
-
return requireNavigation(await client.request(sitePath(siteId, `navigation${search}`)
|
|
705
|
+
return requireNavigation(await client.request(sitePath(siteId, `navigation${search}`), {
|
|
706
|
+
maximumResponseBytes: LIMITS.navigationResponseBytes,
|
|
707
|
+
}));
|
|
690
708
|
}
|
|
691
709
|
|
|
692
710
|
/**
|
|
@@ -698,6 +716,7 @@ export async function saveNavigation(client, siteId, navItems, expectedRevision)
|
|
|
698
716
|
await client.request(sitePath(siteId, "navigation"), {
|
|
699
717
|
method: "PUT",
|
|
700
718
|
body: { siteId, navItems, expectedRevision },
|
|
719
|
+
maximumResponseBytes: LIMITS.navigationResponseBytes,
|
|
701
720
|
}),
|
|
702
721
|
);
|
|
703
722
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BLOCK_SPACINGS, DEFAULT_BLOCK_SPACING } from "./block-flow.js";
|
|
2
2
|
import { hasControlCharacter, isCanonicalUuid, SiteAuthoringError } from "./errors.js";
|
|
3
|
+
import { HEADER_HEIGHT_MULTIPLIER_LIMITS, parseHeaderHeightMultiplier } from "./header-presentation.js";
|
|
3
4
|
import {
|
|
4
5
|
SETTINGS_TYPE_BRAND,
|
|
5
6
|
SETTINGS_TYPE_SITE_HEADER,
|
|
@@ -37,15 +38,17 @@ export const APPEARANCE_SCALAR_FIELDS = Object.freeze([
|
|
|
37
38
|
values: Object.freeze(Object.keys(BLOCK_SPACINGS)),
|
|
38
39
|
default: DEFAULT_BLOCK_SPACING,
|
|
39
40
|
}),
|
|
40
|
-
...["lightLogoId", "darkLogoId", "lightCanvasImageId", "darkCanvasImageId"]
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
...["lightLogoId", "darkLogoId", "lightCompactLogoId", "darkCompactLogoId", "lightCanvasImageId", "darkCanvasImageId"]
|
|
42
|
+
.map((name) =>
|
|
43
|
+
Object.freeze({
|
|
44
|
+
settingsType: SETTINGS_TYPE_TAPROOT_STYLES,
|
|
45
|
+
name,
|
|
46
|
+
path: `taproot-styles.${name}`,
|
|
47
|
+
type: "site-owned-image-id",
|
|
48
|
+
optional: name === "lightCompactLogoId" || name === "darkCompactLogoId",
|
|
49
|
+
default: "",
|
|
50
|
+
})
|
|
51
|
+
),
|
|
49
52
|
...["lightCanvasImageOpacity", "darkCanvasImageOpacity"].map((name) =>
|
|
50
53
|
Object.freeze({
|
|
51
54
|
settingsType: SETTINGS_TYPE_TAPROOT_STYLES,
|
|
@@ -125,9 +128,18 @@ export const APPEARANCE_SCALAR_FIELDS = Object.freeze([
|
|
|
125
128
|
name: "headerPosition",
|
|
126
129
|
path: "site-header.headerPosition",
|
|
127
130
|
type: "enum",
|
|
128
|
-
values: Object.freeze(["normal", "sticky"]),
|
|
131
|
+
values: Object.freeze(["normal", "sticky", "fixed"]),
|
|
129
132
|
default: "normal",
|
|
130
133
|
}),
|
|
134
|
+
Object.freeze({
|
|
135
|
+
settingsType: SETTINGS_TYPE_SITE_HEADER,
|
|
136
|
+
name: "headerHeightMultiplier",
|
|
137
|
+
path: "site-header.headerHeightMultiplier",
|
|
138
|
+
type: "header-height-multiplier",
|
|
139
|
+
...HEADER_HEIGHT_MULTIPLIER_LIMITS,
|
|
140
|
+
optional: true,
|
|
141
|
+
default: "",
|
|
142
|
+
}),
|
|
131
143
|
Object.freeze({
|
|
132
144
|
settingsType: SETTINGS_TYPE_SITE_HEADER,
|
|
133
145
|
name: "showThemeToggle",
|
|
@@ -199,6 +211,8 @@ function refuseRetiredScalarFonts(stylesDocument) {
|
|
|
199
211
|
export const APPEARANCE_READ_ONLY_FIELDS = Object.freeze([
|
|
200
212
|
Object.freeze({ file: APPEARANCE_FILES[SETTINGS_TYPE_TAPROOT_STYLES], path: "settings.lightLogoUrl" }),
|
|
201
213
|
Object.freeze({ file: APPEARANCE_FILES[SETTINGS_TYPE_TAPROOT_STYLES], path: "settings.darkLogoUrl" }),
|
|
214
|
+
Object.freeze({ file: APPEARANCE_FILES[SETTINGS_TYPE_TAPROOT_STYLES], path: "settings.lightCompactLogoUrl" }),
|
|
215
|
+
Object.freeze({ file: APPEARANCE_FILES[SETTINGS_TYPE_TAPROOT_STYLES], path: "settings.darkCompactLogoUrl" }),
|
|
202
216
|
Object.freeze({ file: APPEARANCE_FILES[SETTINGS_TYPE_TAPROOT_STYLES], path: "settings.lightCanvasImageUrl" }),
|
|
203
217
|
Object.freeze({ file: APPEARANCE_FILES[SETTINGS_TYPE_TAPROOT_STYLES], path: "settings.darkCanvasImageUrl" }),
|
|
204
218
|
Object.freeze({ file: APPEARANCE_FILES[SETTINGS_TYPE_BRAND], path: "settings.faviconUrl" }),
|
|
@@ -225,9 +239,13 @@ export const APPEARANCE_IMAGE_FIELDS = Object.freeze(
|
|
|
225
239
|
);
|
|
226
240
|
|
|
227
241
|
export function appearanceImageIds(documents) {
|
|
228
|
-
return [
|
|
229
|
-
|
|
230
|
-
|
|
242
|
+
return [
|
|
243
|
+
...new Set(
|
|
244
|
+
APPEARANCE_IMAGE_FIELDS
|
|
245
|
+
.map((field) => documents[field.settingsType]?.[field.name])
|
|
246
|
+
.filter((value) => isCanonicalUuid(value)),
|
|
247
|
+
),
|
|
248
|
+
].sort();
|
|
231
249
|
}
|
|
232
250
|
|
|
233
251
|
function fail(code, message, field) {
|
|
@@ -243,6 +261,17 @@ function requireString(value, field, maximum = 256 * 1024) {
|
|
|
243
261
|
|
|
244
262
|
function validateScalar(definition, value, knownImageIds) {
|
|
245
263
|
switch (definition.type) {
|
|
264
|
+
case "header-height-multiplier": {
|
|
265
|
+
const height = parseHeaderHeightMultiplier(value);
|
|
266
|
+
if (!height) {
|
|
267
|
+
fail(
|
|
268
|
+
"theme.setting_invalid",
|
|
269
|
+
`${definition.path} must be a string from 1.0 through 5.0 in 0.1 steps.`,
|
|
270
|
+
definition.path,
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
return height.canonical;
|
|
274
|
+
}
|
|
246
275
|
case "enum":
|
|
247
276
|
if (typeof value !== "string" || !definition.values.includes(value)) {
|
|
248
277
|
fail(
|
|
@@ -303,6 +332,13 @@ function validateScalar(definition, value, knownImageIds) {
|
|
|
303
332
|
}
|
|
304
333
|
}
|
|
305
334
|
|
|
335
|
+
/** Compare authored aliases and omitted optional fields with the same values sent to Taproot. */
|
|
336
|
+
export function appearanceScalarInput(definition, value) {
|
|
337
|
+
const input = value === undefined && definition.optional ? definition.default : value;
|
|
338
|
+
if (definition.type === "header-height-multiplier") return parseHeaderHeightMultiplier(input)?.canonical ?? input;
|
|
339
|
+
return input;
|
|
340
|
+
}
|
|
341
|
+
|
|
306
342
|
export function buildAppearanceScalarOperations(documents, knownImageIds) {
|
|
307
343
|
if (!(knownImageIds instanceof Set)) {
|
|
308
344
|
throw new TypeError("Appearance validation requires the known site-owned image identities.");
|
|
@@ -311,7 +347,11 @@ export function buildAppearanceScalarOperations(documents, knownImageIds) {
|
|
|
311
347
|
return APPEARANCE_SCALAR_FIELDS.map((definition) => ({
|
|
312
348
|
settingsType: definition.settingsType,
|
|
313
349
|
setting: definition.name,
|
|
314
|
-
value: validateScalar(
|
|
350
|
+
value: validateScalar(
|
|
351
|
+
definition,
|
|
352
|
+
appearanceScalarInput(definition, documents[definition.settingsType]?.[definition.name]),
|
|
353
|
+
knownImageIds,
|
|
354
|
+
),
|
|
315
355
|
}));
|
|
316
356
|
}
|
|
317
357
|
|
package/src/block-flow.js
CHANGED
|
@@ -27,6 +27,7 @@ export const DEFAULT_BLOCK_SPACING = "standard";
|
|
|
27
27
|
// which must not gain a margin.
|
|
28
28
|
const FLOW_CONTAINERS = [
|
|
29
29
|
"[data-section-content]",
|
|
30
|
+
"[data-taproot-column]",
|
|
30
31
|
"[slot=\"body\"]",
|
|
31
32
|
"[slot=\"introduction\"]",
|
|
32
33
|
".recipe-story",
|
|
@@ -74,6 +75,7 @@ ${SCALE_MAPPING}
|
|
|
74
75
|
:where(${FLOW_CONTAINERS}) > :where(p, h1, h2, h3, h4, figure, blockquote, dl) {
|
|
75
76
|
margin-block-end: 0;
|
|
76
77
|
}
|
|
78
|
+
esp-columns,
|
|
77
79
|
taproot-hero,
|
|
78
80
|
taproot-cta,
|
|
79
81
|
taproot-testimonial,
|
|
@@ -83,6 +85,12 @@ taproot-card-grid,
|
|
|
83
85
|
taproot-product-grid {
|
|
84
86
|
display: block;
|
|
85
87
|
}
|
|
88
|
+
[data-taproot-column] {
|
|
89
|
+
display: flow-root;
|
|
90
|
+
min-inline-size: 0;
|
|
91
|
+
}
|
|
92
|
+
[data-taproot-column] > :first-child { margin-block-start: 0; }
|
|
93
|
+
[data-taproot-column] > :last-child { margin-block-end: 0; }
|
|
86
94
|
:is(${FLOW_CONTAINERS}) > :where(h1, h2, h3, h4, h5) {
|
|
87
95
|
margin-block-start: calc(var(--esp-size-small-to-normal, 0.83em) * var(--taproot-block-scale, 1));
|
|
88
96
|
}
|
package/src/changelog.json
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
+
{
|
|
4
|
+
"version": "0.36.0",
|
|
5
|
+
"note": "Navigation links can use Button styling, headers can scale and switch to compact logos, and sections can arrange content in responsive columns.",
|
|
6
|
+
"behavior": [
|
|
7
|
+
"Set optional nav.json appearance to NAV_ITEM_APPEARANCE_BUTTON on a PAGE or EXTERNAL_URL leaf at any depth. Appearance is independent of Menu or Header end placement. Dropdown headers cannot use Button; invalid values and group appearance are refused at the exact item appearance path before saving.",
|
|
8
|
+
"Omit appearance for Link. NAV_ITEM_APPEARANCE_UNSPECIFIED and NAV_ITEM_APPEARANCE_LINK are equivalent defaults; pull and nav push omit both while retaining Button. The app edits this under Display as and resets it to Link when a leaf becomes a dropdown.",
|
|
9
|
+
"Button links retain their destinations and external-link behavior in inline menus and the drawer. The current page keeps Button styling without becoming interactive. Existing published pages change at the next whole-site render.",
|
|
10
|
+
"Taproot refuses older authoring clients at sign-in and token exchange so a whole-tree push cannot drop saved appearance. Upgrade with npm install -g @taprootio/site-authoring@latest.",
|
|
11
|
+
"Set string headerHeightMultiplier in settings/site-header.json from \"1.0\" through \"5.0\" in 0.1 steps. Omitted, empty, \"1\" and \"1.0\" retain standard height and are omitted on pull; integer aliases such as \"2\" normalize to \"2.0\". JSON numbers and malformed or off-grid text are refused at the field path.",
|
|
12
|
+
"Header position now accepts fixed. Above standard height, Fixed shrinks its primary bar to standard on scroll; extra rows and controls keep their size. Normal and Sticky retain the configured height.",
|
|
13
|
+
"Optional lightCompactLogoId and darkCompactLogoId in settings/taproot-styles.json select alternate artwork for eligible compact headers. They use existing site-owned media handling; URLs are read-only. Inactive stored choices survive, and compact-only artwork never creates a missing regular brand.",
|
|
14
|
+
"Free-form sections accept structural two- or three-column regions, with equal widths or 40-60/60-40 for two columns. Markdown and JSON preserve ordinary blocks, forms and identities; narrow sections stack in source order. See help page free-form.",
|
|
15
|
+
"The help reference version is 56."
|
|
16
|
+
],
|
|
17
|
+
"help": [
|
|
18
|
+
"nav",
|
|
19
|
+
"appearance",
|
|
20
|
+
"settings",
|
|
21
|
+
"page"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"version": "0.35.0",
|
|
26
|
+
"note": "Header navigation groups expand without a destination; selected top-level links can sit beside the header controls and join the collapsed menu.",
|
|
27
|
+
"behavior": [
|
|
28
|
+
"The navigation limit rises from 1000 to 2000 items and the workspace file limit rises from 1 MiB to 2 MiB, so preserving legacy group destinations fits when pulled and pushed.",
|
|
29
|
+
"Only GROUP_HEADER may have children, and it has no destination. nav push refuses PAGE and EXTERNAL_URL items with children locally as nav.group_target_unexpected at the item path, before saving. Move the address into a child item and use a dropdown header. Empty groups remain allowed.",
|
|
30
|
+
"pull exposes existing linked parents as GROUP_HEADER with the same ID and title. The old destination becomes a same-title first child with a stable ID; existing children keep their IDs and order. A normal nav push persists the migrated draft without a revision conflict on an unchanged tree.",
|
|
31
|
+
"Published header groups are disclosure buttons without a URL or new-tab cue. Child links keep their own destinations and new-tab behavior. Existing published pages change on regeneration and deployment.",
|
|
32
|
+
"The app offers a child-add button only under dropdown headers below the depth limit. To add children to a link, change Type to Dropdown header first and move its address into a child item. Save still refuses an invalid parent if it changes while the child editor is open.",
|
|
33
|
+
"In the published burger drawer, link and disclosure targets fit their text with standard padding, and the dropdown caret sits immediately after its label. Empty space beside an item does not activate it.",
|
|
34
|
+
"WordPress import help preserves a page or custom-link parent address in a same-title first leaf child, clears the dropdown parent address, and keeps the original children in order.",
|
|
35
|
+
"Set optional nav.json position to NAV_ITEM_POSITION_HEADER_END on a top-level PAGE or EXTERNAL_URL leaf to show it before the header controls inline. Omit position for Menu; NAV_ITEM_POSITION_MENU and NAV_ITEM_POSITION_UNSPECIFIED are equivalent and pull omits them. Dropdown headers and nested items cannot use Header end. Collapsed menus keep all items in their original order. The app edits this under Show in.",
|
|
36
|
+
"The help reference version is 55."
|
|
37
|
+
],
|
|
38
|
+
"help": [
|
|
39
|
+
"nav",
|
|
40
|
+
"import"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"version": "0.34.1",
|
|
45
|
+
"note": "Published pages no longer repeat the page title as the last breadcrumb; the trail ends at the parent, as it did before 0.34.0.",
|
|
46
|
+
"behavior": [
|
|
47
|
+
"The visible trail shows only the page's linked ancestors, because the page's title is already its heading. A folder's breadcrumbTitle names it only in the trails of pages beneath it, and the generated-page help and the folder editor's hint say so again. The page's structured data still ends its BreadcrumbList with the page itself. No command changed.",
|
|
48
|
+
"The help reference version is 54."
|
|
49
|
+
],
|
|
50
|
+
"help": [
|
|
51
|
+
"page"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
3
54
|
{
|
|
4
55
|
"version": "0.34.0",
|
|
5
56
|
"note": "Published pages now end the breadcrumb trail with the current page, and the folder breadcrumb label is that page's last crumb. The reference pins Espalier 6.10.0. The help reference version is 53.",
|
package/src/constants.js
CHANGED
|
@@ -265,6 +265,8 @@ export const HTTP_UNAUTHORIZED = 401;
|
|
|
265
265
|
export const GRPC_NOT_FOUND = 5;
|
|
266
266
|
export const HTTP_NOT_FOUND = 404;
|
|
267
267
|
|
|
268
|
+
const NAVIGATION_WORKSPACE_BYTES = 2 * 1024 * 1024;
|
|
269
|
+
|
|
268
270
|
export const LIMITS = Object.freeze({
|
|
269
271
|
configBytes: 16 * 1024,
|
|
270
272
|
configPathBytes: 4 * 1024,
|
|
@@ -272,10 +274,15 @@ export const LIMITS = Object.freeze({
|
|
|
272
274
|
settingsBytes: 4 * 1024,
|
|
273
275
|
configDiscoveryParents: 32,
|
|
274
276
|
workspacePathBytes: 4 * 1024,
|
|
277
|
+
// Preserved destination children must fit when a legacy linked tree is pulled.
|
|
278
|
+
navigationItems: 2_000,
|
|
279
|
+
navigationWorkspaceBytes: NAVIGATION_WORKSPACE_BYTES,
|
|
280
|
+
// Navigation replies include proto3 defaults that the workspace leaves out.
|
|
281
|
+
navigationResponseBytes: 2 * NAVIGATION_WORKSPACE_BYTES,
|
|
275
282
|
apiResponseBytes: 1024 * 1024,
|
|
276
|
-
//
|
|
277
|
-
//
|
|
278
|
-
//
|
|
283
|
+
// A redirect map also exceeds the ordinary response bound: two thousand
|
|
284
|
+
// entries with long absolute targets. Sized with its workspace file
|
|
285
|
+
// (WORKSPACE_LIMITS.redirectsBytes).
|
|
279
286
|
redirectMapResponseBytes: 8 * 1024 * 1024,
|
|
280
287
|
requestMilliseconds: 60_000,
|
|
281
288
|
uploadMilliseconds: 5 * 60_000,
|