@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
package/src/verbs/plan.js
CHANGED
|
@@ -30,6 +30,8 @@ import { SiteAuthoringError } from "../errors.js";
|
|
|
30
30
|
import { computeFooterContentHash, computeFooterDraftHash, stableJson } from "../footer-draft-hash.js";
|
|
31
31
|
import { FOOTER_SETTINGS_FILE } from "../footer-workspace.js";
|
|
32
32
|
import { workspaceFormKeys } from "../forms-workspace.js";
|
|
33
|
+
import { preflightPageTagWrites } from "../page-tag-writes.js";
|
|
34
|
+
import { latestPostsTagProblems } from "../latest-posts-tags.js";
|
|
33
35
|
import { CHECK_AREA, collectProblems, problemsError, problemsOf, problemsWithinBudget, withinByteBudget } from "../problems.js";
|
|
34
36
|
import { openSession, successResult, warnIfExternalWritesPaused } from "../session.js";
|
|
35
37
|
import { IMAGE_IDENTIFIER, usedImageIds } from "../typed-pages.js";
|
|
@@ -54,6 +56,7 @@ import {
|
|
|
54
56
|
placedVideoProblems,
|
|
55
57
|
planPages,
|
|
56
58
|
plannedPageItem,
|
|
59
|
+
plannedPageWriteIdentity,
|
|
57
60
|
staleGeneratedSourcesField,
|
|
58
61
|
} from "./pages-push.js";
|
|
59
62
|
import { comparePresentation, presentationMovedRefusal, presentationPullRequired, themePush } from "./theme-push.js";
|
|
@@ -289,7 +292,8 @@ async function preflight(session, invocation) {
|
|
|
289
292
|
: sharedThemeContextNames(offline.presentation.style.lightTheme, offline.presentation.style.darkTheme),
|
|
290
293
|
onProgress,
|
|
291
294
|
});
|
|
292
|
-
|
|
295
|
+
const pageTagCapabilities = await preflightPageTagWrites(client, siteId, pages);
|
|
296
|
+
problems.push(...pages.problems, ...latestPostsTagProblems(pages.planned, manifest, { sendingOnly: true }));
|
|
293
297
|
problems.push(...await placedVideoProblems(client, siteId, pages.planned));
|
|
294
298
|
problems.push(...(await placedFormProblems(client, siteId, pages.planned, () => workspaceFormKeys(workspaceDir))).problems);
|
|
295
299
|
const sending = pages.planned.filter((page) => !page.unchanged);
|
|
@@ -430,7 +434,7 @@ async function preflight(session, invocation) {
|
|
|
430
434
|
version: 1,
|
|
431
435
|
siteId,
|
|
432
436
|
media: pendingMedia.map((entry) => [entry.file, entry.identity]),
|
|
433
|
-
pages: pages.planned.map((page) => [page.file, page.
|
|
437
|
+
pages: pages.planned.map((page) => [page.file, page.unchanged, page.contentKey, plannedPageWriteIdentity(page)]),
|
|
434
438
|
footer: [footerChanged, workspaceFooter === undefined ? "" : computeFooterContentHash(workspaceFooter), liveFooterDraftHash ?? ""],
|
|
435
439
|
theme: theme === undefined ? [] : [theme.changeSetHash, theme.current.revision],
|
|
436
440
|
navigation: [stableJson(offline.navigation?.navItems ?? null), stableJson(liveNavigation ?? null)],
|
|
@@ -443,7 +447,8 @@ async function preflight(session, invocation) {
|
|
|
443
447
|
planHash,
|
|
444
448
|
// The live state each step must still find: page revisions and the navigation tree, which the steps check
|
|
445
449
|
// themselves (the theme and footer saves are fenced by the server, and the navigation save is as well).
|
|
446
|
-
plannedPages: new Map(sending.map((page) => [page.file, stableJson(
|
|
450
|
+
plannedPages: new Map(sending.map((page) => [page.file, stableJson(plannedPageWriteIdentity(page))])),
|
|
451
|
+
pageTagCapabilities,
|
|
447
452
|
plannedLiveNavigation: stableJson(liveNavigation ?? null),
|
|
448
453
|
};
|
|
449
454
|
});
|
|
@@ -522,6 +527,7 @@ const STEP_RUNNERS = Object.freeze({
|
|
|
522
527
|
pagePaths: undefined,
|
|
523
528
|
dryRun: false,
|
|
524
529
|
plannedPages: planned.plannedPages,
|
|
530
|
+
pageTagCapabilities: planned.pageTagCapabilities,
|
|
525
531
|
}),
|
|
526
532
|
[PLAN_STEP.footer]: (invocation) => footerPush({ ...invocation, verb: PLAN_STEP.footer }),
|
|
527
533
|
[PLAN_STEP.theme]: (invocation) => themePush({ ...invocation, verb: PLAN_STEP.theme, dryRun: false }),
|
|
@@ -548,7 +554,7 @@ export async function apply(invocation) {
|
|
|
548
554
|
"The workspace or the site changed since that plan was made, so nothing was applied. Run 'taproot-site plan' "
|
|
549
555
|
+ "again, read it, and apply the new planHash.",
|
|
550
556
|
{ field: "planHash", alternatives: [planned.planHash] },
|
|
551
|
-
);
|
|
557
|
+
).withProblems(planned.problems);
|
|
552
558
|
}
|
|
553
559
|
if (planned.problems.length > 0) throw problemsError(planned.problems, "apply sent nothing; the plan has problems");
|
|
554
560
|
|