@taprootio/site-authoring 0.61.0 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +97 -23
  2. package/package.json +2 -2
  3. package/src/api.js +149 -21
  4. package/src/appearance-contract.js +27 -0
  5. package/src/article-appearance.js +19 -0
  6. package/src/article-appearance.json +9 -0
  7. package/src/article-end-settings.js +295 -0
  8. package/src/changelog.json +49 -0
  9. package/src/chrome-input.js +1 -1
  10. package/src/cli.js +110 -26
  11. package/src/constants.js +7 -0
  12. package/src/content/components.js +130 -14
  13. package/src/content/cta-decoration-paint.js +321 -0
  14. package/src/content/form-placement-presentation.js +91 -0
  15. package/src/content/form-placement-presentation.json +6 -0
  16. package/src/content/free-form-section-registry.json +19 -1
  17. package/src/content/free-form-sections.js +64 -55
  18. package/src/content/markdown.js +13 -0
  19. package/src/content/tiptap-prosemirror.ts +72 -59
  20. package/src/content/validate-document.js +2 -0
  21. package/src/cta-artwork-warnings.js +164 -0
  22. package/src/errors.js +6 -0
  23. package/src/field-schema.json +6 -2
  24. package/src/field-validation.js +14 -5
  25. package/src/footer-workspace.js +7 -3
  26. package/src/form-references.js +71 -9
  27. package/src/forms-contract.js +3 -5
  28. package/src/heading-outline.js +7 -0
  29. package/src/output.js +2 -0
  30. package/src/page-article-end.js +66 -0
  31. package/src/page-block-catalog.js +54 -0
  32. package/src/page-form-presentation.js +104 -0
  33. package/src/page-structure-checks.js +7 -1
  34. package/src/placed-image-ids.js +15 -18
  35. package/src/presentation-reference.js +31 -53
  36. package/src/reference-help.js +97 -27
  37. package/src/reusable-blocks.js +429 -0
  38. package/src/reusable-placements.js +271 -0
  39. package/src/setting-reference.js +57 -1
  40. package/src/settings-catalog.js +3 -0
  41. package/src/site-check-findings.js +30 -2
  42. package/src/site-check-rules.json +1 -0
  43. package/src/site-checks.js +26 -2
  44. package/src/site-health-findings.js +25 -3
  45. package/src/site-health-image-checks.js +1 -1
  46. package/src/staging-check.js +108 -21
  47. package/src/staging-served.js +5 -49
  48. package/src/status-warning-paints.js +17 -0
  49. package/src/template-token-reach.json +20 -2
  50. package/src/theme-resolve.js +27 -0
  51. package/src/transport.js +41 -5
  52. package/src/typed-page-reference.js +55 -5
  53. package/src/typed-pages.js +27 -4
  54. package/src/verbs/approve.js +2 -1
  55. package/src/verbs/deploy.js +93 -15
  56. package/src/verbs/footer-push.js +4 -2
  57. package/src/verbs/forms-push.js +9 -0
  58. package/src/verbs/health.js +11 -6
  59. package/src/verbs/index.js +3 -0
  60. package/src/verbs/pages-blocks-pull.js +22 -0
  61. package/src/verbs/pages-push.js +89 -34
  62. package/src/verbs/plan.js +34 -5
  63. package/src/verbs/pull.js +213 -124
  64. package/src/verbs/status.js +20 -2
  65. package/src/verbs/theme-push.js +170 -20
  66. package/src/verbs/theme-resolve.js +114 -40
  67. package/src/verbs/validate.js +49 -18
  68. package/src/workspace-check.js +42 -5
  69. package/src/workspace-context-usage.js +54 -1
  70. package/src/workspace.js +37 -7
  71. package/test/fixtures/default-site-theme.json +1 -1
@@ -47,6 +47,7 @@ import {
47
47
  import {
48
48
  FORM_FILE_EXTENSION,
49
49
  FORM_KEY_MAXIMUM_LENGTH,
50
+ FORM_KEY_PATTERN,
50
51
  FORM_LIMITS,
51
52
  FORM_RETENTION_DAYS,
52
53
  FORM_SINKS,
@@ -99,7 +100,7 @@ import {
99
100
 
100
101
  export { getAppearanceReference, getFooterReference, getSettingsReference, getThemeReference };
101
102
 
102
- export const REFERENCE_VERSION = 85;
103
+ export const REFERENCE_VERSION = 89;
103
104
 
104
105
  // The date-limit examples `help forms` prints; tests run them through the form validator.
105
106
  export const FORM_DATE_WINDOW_FIELD = Object.freeze({
@@ -400,7 +401,7 @@ export function getDesignBlueprint(type) {
400
401
  return DESIGN_BLUEPRINTS.find((blueprint) => blueprint.type === type);
401
402
  }
402
403
  export const REFERENCE_TOPICS = Object.freeze([
403
- Object.freeze({ name: "pages", usage: `${CLI_BINARY_NAME} help pages`, summary: "List page types: free-form, article, recipe, album, place-review, generated, and legal draft pages." }),
404
+ Object.freeze({ name: "pages", usage: `${CLI_BINARY_NAME} help pages`, summary: "List page types and the command that refreshes page block choices." }),
404
405
  Object.freeze({
405
406
  name: "page",
406
407
  usage: `${CLI_BINARY_NAME} help page <page-type>`,
@@ -661,6 +662,16 @@ const WORKFLOW_REFERENCES = Object.freeze({
661
662
  + "site-publishing-preferences.json also carries timeZone, the site's IANA zone (UTC until the owner sets it), "
662
663
  + "which decides what \"today\" means for relative form date bounds; it is read-only here, so ask the owner to set "
663
664
  + "it in the editor under Site settings.",
665
+ "Set Article end on a Standard site: Design pull --settings-only writes settings/article-end.json. Set "
666
+ + "defaultCtaKey to a reusable CTA key and list rules in priority order. Each rule pairs template (article, recipe, album or place-review) "
667
+ + "with ctaKey and an optional tag slug. Preserve each tagId recorded by pull. The first matching rule wins. Use {} to clear the settings "
668
+ + "or omit the file to preserve them. Review the readable theme push --dry-run diff, then stage publishing preferences. "
669
+ + "Individual pages can set articleEnd: false.",
670
+ "Add defaultBand beside defaultCtaKey or band on an individual rule to wrap that CTA in a full-width Section. "
671
+ + "Use {} for a band with defaults. Omit band on a rule to keep its placement inline, even when the default has a band. "
672
+ + "A band accepts context from both themes, surface, borderBlockStartWidth, and decoration with an owned image. "
673
+ + "Set decoration.image to a workspace media path such as media/graph-paper.png or the pulled {imageId} object. "
674
+ + "Use the same repeat, sizeMode, opacity and tint fields as a placed Section. See help sections.",
664
675
  "Edit both schemes: settings.lightTheme and settings.darkTheme are separate documents. Declare anchors, then roles "
665
676
  + "(help theme lists the role slots and how anchor references resolve), tune typography per scheme, and keep "
666
677
  + "contexts and intents paired across schemes. Set appearance scalars (default scheme, header, logos, favicon) "
@@ -706,8 +717,9 @@ const WORKFLOW_REFERENCES = Object.freeze({
706
717
  + "see 'help preview' for what ends it. A page draft is "
707
718
  + "not needed to review a presentation change; preview page renders one persisted draft and is a different tool. "
708
719
  + `On a standard site ${CLI_BINARY_NAME} health --staging then reads the staged release's stored Site Health report: `
709
- + "every finding with its workspace file and a fix, the ones new since production marked newSinceProduction. deploy "
710
- + "--staging returns the same report as siteHealth. A fix reaches the report only after another deploy --staging.",
720
+ + "findings with a fix, newSinceProduction when known. A new affected page makes an image finding new. "
721
+ + "imageIdentityComplete is false when a group cannot be compared. deploy --staging returns the same report "
722
+ + "as siteHealth. Stage again after a fix.",
711
723
  `Promote only after review: ${CLI_BINARY_NAME} deploy --production promotes the completed staging deployment. `
712
724
  + "Never use production to discover what staging should have shown.",
713
725
  ]),
@@ -792,18 +804,18 @@ const WORKFLOW_REFERENCES = Object.freeze({
792
804
  usage: `${CLI_BINARY_NAME} redirects pull | ${CLI_BINARY_NAME} redirects push | ${CLI_BINARY_NAME} redirects check`,
793
805
  details: Object.freeze([
794
806
  "Run 'redirects check' after staging, or read deploy --staging's automatic check. The Node CLI consumes "
795
- + "a separate staging handoff and checks the current map at the real edge, using an in-memory cookie and "
796
- + "manual redirects. It reports each path, HTTP status and Location without following targets.",
797
- "The result carries routeCheck (resolved or unresolved) and redirects: { revision, revisionUnchanged, "
807
+ + "a separate staging handoff and checks the acknowledged staging release's frozen map at the edge. "
808
+ + "It reports each path, HTTP status and Location without following targets.",
809
+ "The result carries routeCheck (resolved or unresolved) and redirects: { revision, revisionUnchanged, stagingReleaseVerified, "
798
810
  + "verified, total, checked, matched, failed, items: [{ path, status, location, expectedStatus, matches, "
799
811
  + "error? }], itemsTruncated? }, at the top level of both redirects check and deploy --staging. An entry "
800
812
  + "whose request failed carries error: \"request_failed\". A check that cannot finish at all reports "
801
813
  + "verified: false, an empty items list and redirects.error { code, message }.",
802
- "verified is true only if every entry matched and the map revision stayed unchanged during the check. "
803
- + "The check proves the current map at staging, not a historical deployment. A mismatch means the staged "
804
- + "release does not carry the entry (yet); re-run redirects check after the deployment completes, before promoting. Requests are bounded to 90 seconds, eight at a time; "
805
- + "large JSON lists are truncated explicitly with failed entries first (redirects.itemsTruncated). Progress "
806
- + "output reports every entry on stderr; --quiet hides it.",
814
+ "verified is true when the edge showed the acknowledged output before and after the checks, every frozen entry matched, and the stage stayed the same. "
815
+ + "redirects.waitingForMove lists authored sources whose folder indexes still serve in this stage. "
816
+ + "Stage the page moves to activate those redirects. They are outside the mismatch count. "
817
+ + "Requests are bounded to 90 seconds, eight at a time. Large lists are truncated explicitly, "
818
+ + "with failed entries first. Progress output reports every entry on stderr; --quiet hides it.",
807
819
  "redirects check and deploy --staging report no review URL unless you pass --handoff; the check "
808
820
  + "authenticates with its own handoff either way. With --handoff, stagingPreview.url is a fresh, single-use "
809
821
  + "two-minute handoff, minted after checks. It is emitted only in final JSON, excluded from progress and "
@@ -845,7 +857,10 @@ const WORKFLOW_REFERENCES = Object.freeze({
845
857
  + "usable source once the home page has moved, which is the entry a home-page rename records. A page you "
846
858
  + "deleted ('pages delete', which stages a live page's removal) no longer occupies its path, and neither "
847
859
  + "does a folder index once every page under it is deleted, so the redirect goes live in the release that "
848
- + "removes the page. If the page is kept or restored, it takes its path back and the redirect is dropped.",
860
+ + "removes the page. If the page is kept or restored, it takes its path back and the redirect is dropped. "
861
+ + "An approved move can also empty a folder. Add the old folder redirect yourself and stage the move in "
862
+ + "the same selection. Approving a rename does not publish its redirect. Staging previews the page's "
863
+ + "automatic redirect, and production promotion makes it live and records its path history.",
849
864
  "Moving pages to another site: on the old site, point navigation items at the new site's URLs (kind "
850
865
  + "NAV_ITEM_KIND_EXTERNAL_URL with externalUrl, and no resourceId) and 'nav push', which the next staging deploy "
851
866
  + "carries; change links in pages that stay, 'pages push' and 'approve' them; 'pages "
@@ -925,6 +940,25 @@ const WORKFLOW_REFERENCES = Object.freeze({
925
940
  + "submissions are deleted that many days after they arrive. Leave it out and the site chooses on creation (its "
926
941
  + "plan's default, usually 365) and keeps the current value on an update. Shortening it deletes the submissions that fall outside it, "
927
942
  + "so a key cannot do it; the site refuses it, and an owner or admin must make that change.",
943
+ "For a newsletter signup, the site needs a license that includes newsletters, a saved physical mailing address "
944
+ + "and an enabled Newsletter. Place the form on a published page. On the live site, a visitor submits the "
945
+ + "contact email and consent, then follows the confirmation link in their inbox. Staging test submissions "
946
+ + "send no confirmation email and do not add subscribers. In Newsletter → Subscribers "
947
+ + "the address stays pending until it confirms. To route confirmed readers to a specific manual audience, "
948
+ + "choose an active audience in the form editor or set definition.newsletter_audience_id to that audience's ID. "
949
+ + "The confirmation adds the reader to the chosen audience. For a Newsletter form, set the custom after-submit message "
950
+ + "to tell visitors what to do, for example 'If your subscription still needs confirmation, check your inbox for a confirmation link.' "
951
+ + "A staging test also shows that message, beside the staging notice.",
952
+ "For a reusable newsletter signup, put heading, introduction, context and finePrint beside formKey in the reusable Form definition in settings/reusable-blocks.json. "
953
+ + "Place the block with just reusableKey. Edit the definition once, then include publishing preferences in the next stage. "
954
+ + "The privacy link uses finePrint.linkLabel and finePrint.linkUrl together. See help component form for the inline fields.",
955
+ "In Newsletter → Templates, publish an email template version. In Campaigns, create a draft, choose that "
956
+ + "version and a saved audience or all eligible subscribers, write the issue, preview it and send a test. "
957
+ + "Then send or schedule the campaign. Every campaign includes unsubscribe links for that site's newsletter.",
958
+ "Use Newsletter → Subscribers → Export subscribers to download addresses, subscription status and consent "
959
+ + "history as CSV. Form submission retention controls the Forms inbox separately from newsletter consent "
960
+ + "and subscription history. Unsubscribing stops this site's newsletter sends. Subscription erasure removes identifying "
961
+ + "newsletter records while keeping anonymous delivery counts.",
928
962
  "notify_owner is an optional top-level boolean, independent of the sink. New forms default to false; omitting it "
929
963
  + "on an existing form preserves the site's preference. It opts into hourly counts-only email to the current site "
930
964
  + "account owner, never visitor answers or addresses. This setting takes effect without a new version or publishing. "
@@ -932,7 +966,7 @@ const WORKFLOW_REFERENCES = Object.freeze({
932
966
  `definition is { fields, contact_field?, submit_label?, after_submit? } (contact_field only with several email fields). Each field is { id, type, label, hint?, ...constraints }; the closed `
933
967
  + `field types are ${FIELD_TYPES.join(", ")}. hint is optional helper text of up to ${MAX_HINT_LENGTH} `
934
968
  + "characters, drawn under the field on the published form. The published form marks a required field itself: its label "
935
- + "ends with ' *' and a '* Required' legend sits above the fields, so do not write 'required' into a label or hint; the "
969
+ + "ends with ' *' and the form shows a '* Required' legend by default. Use the field label or hint for the visitor's instructions. The "
936
970
  + "stored label stays exactly as written. "
937
971
  + `At most ${MAX_FIELDS} fields and ${MAX_SUBMISSION_BYTES} bytes `
938
972
  + "per submission. There are no author-supplied regular expressions: use 'format' from its closed list. "
@@ -967,7 +1001,7 @@ const WORKFLOW_REFERENCES = Object.freeze({
967
1001
  + "each release is the one the page has in that release, so the published form never asks the site where "
968
1002
  + "to go. The page must be one you created, the home page included: a generated page (a folder index or "
969
1003
  + "the published archive), the 404 page, a legal page (help page legal), a profile home and an integration-managed page are refused as forms.page_not_allowed. The button text and the confirmation belong to the form, not to the page that places it: "
970
- + "the 'form' component takes only formKey.",
1004
+ + "the form block takes formKey and optional layout: compact. Compact needs a required contact email and one consent checkbox, with no other fields.",
971
1005
  "A form's contact address is the value of one email field, stored with each submission. That is what lets the "
972
1006
  + "owner find and delete every row for a visitor who asks. With exactly one email field, that field is the "
973
1007
  + "contact address and the file leaves contact_field out (a file that names it anyway is accepted, and a pull "
@@ -982,9 +1016,11 @@ const WORKFLOW_REFERENCES = Object.freeze({
982
1016
  + "version it was published with until the next deploy, and a rollback restores the form it shipped with.",
983
1017
  "definition.presentation optionally overrides the site's form appearance: background, border and shadow are "
984
1018
  + "optional booleans. Omit a property to inherit the corresponding site preference (formBoxBackground, "
985
- + "formBoxBorder, formBoxShadow); false turns that choice off. Omit presentation when all three inherit: an empty "
986
- + "object is refused. Site defaults are background on, border off and shadow on. Background can be off while border "
987
- + "and shadow remain on. The release freezes both the form choices and the site defaults.",
1019
+ + "formBoxBorder, formBoxShadow). False turns that surface choice off. Site defaults are background on, "
1020
+ + "border off and shadow on. Set presentation.hideRequiredLegend to true to hide the '* Required' legend. "
1021
+ + "Omission or false shows the legend when the form has required fields. Required indicators and validation stay in place. "
1022
+ + "Omit presentation when it has no choices. The release freezes the form choices and the site defaults. "
1023
+ + "If forms push reports forms.appearance_unavailable, retry after the rollout finishes.",
988
1024
  "Both verbs write the file in one canonical key order, so a pulled file pushed back unchanged reports "
989
1025
  + "'unchanged' and leaves the bytes as they were. Write your own files in that order and a push rewrites "
990
1026
  + "nothing you did not change.",
@@ -997,7 +1033,8 @@ const WORKFLOW_REFERENCES = Object.freeze({
997
1033
  "To show a form, place the free-form component 'form' on a page (a component:form block) with formKey set "
998
1034
  + "to the form's key ('help component form' lists its properties). Push the form first: 'pages push' turns the "
999
1035
  + "key into the form's id for the site and refuses a key the site does not have or has archived, and 'pages pull' "
1000
- + "turns the id back into the key. Then deploy: the release freezes the form it was built with.",
1036
+ + "turns the id back into the key. Use the same block between paragraphs of an article ('help page article'). "
1037
+ + "Then deploy: the release freezes the form it was built with.",
1001
1038
  "The delegation.content capability carries site.forms.manage, which every forms verb needs: it covers "
1002
1039
  + "definitions, settings and status. Visitors' submissions are in no capability: reading them "
1003
1040
  + "(site.forms.submissions.read) belongs to the site's owners, admins and moderators, and finding, marking or "
@@ -1160,6 +1197,7 @@ const WORKFLOW_REFERENCES = Object.freeze({
1160
1197
  + "opens the review on that page instead of the home page. Handoffs never go to GITHUB_OUTPUT.",
1161
1198
  `Review session: ${STAGING_REVIEW_SESSION_NOTE} Once the session has ended, run staging review again for a `
1162
1199
  + "fresh link, or stay signed in to the Taproot app in a browser whose account can preview the site, to review longer.",
1200
+ "For a Standard site, deploy --reset-staging restores the current production release on staging without making it eligible for promotion. Use deploy --staging for your later candidate.",
1163
1201
  "On a managed Docs site deploy --staging stages settings only: run staging review (or deploy --staging "
1164
1202
  + "--handoff) and open the URL once, then use the site's theme toggle to review both schemes; no page draft is "
1165
1203
  + "needed to preview a presentation change. When a requested handoff can't be minted the result carries "
@@ -1317,6 +1355,30 @@ export function listComponentTypeReferences() {
1317
1355
 
1318
1356
  const EXAMPLE_MEDIA_PATH = "media/photo.webp";
1319
1357
 
1358
+ const REUSABLE_BLOCK_CATALOG_COMMAND = `${CLI_BINARY_NAME} pages blocks pull`;
1359
+ const REUSABLE_BLOCK_RELEASE_GUIDANCE =
1360
+ "Include publishing preferences in the release when the definition exists only in draft. "
1361
+ + "The draft catalog cannot identify a selected release's definitions.";
1362
+
1363
+ function reusablePlacementReference(type) {
1364
+ const key = type === "cta" ? "open-house" : "newsletter";
1365
+ const data = { reusableKey: key };
1366
+ return {
1367
+ data,
1368
+ schema: {
1369
+ type: "object", required: ["reusableKey"], additionalProperties: false,
1370
+ properties: { reusableKey: { type: "string", pattern: FORM_KEY_PATTERN.source, maxLength: FORM_KEY_MAXIMUM_LENGTH } },
1371
+ },
1372
+ markdown: "```component:" + type + "\n" + JSON.stringify(data) + "\n```",
1373
+ componentBlock: {
1374
+ type: "componentBlock",
1375
+ attrs: { componentType: type, componentData: canonicalizeComponentData(type, data) },
1376
+ },
1377
+ catalog: REUSABLE_BLOCK_CATALOG_COMMAND,
1378
+ release: REUSABLE_BLOCK_RELEASE_GUIDANCE,
1379
+ };
1380
+ }
1381
+
1320
1382
  export function getComponentReference(type) {
1321
1383
  const definition = getComponentDefinition(type);
1322
1384
  if (!definition) return undefined;
@@ -1329,7 +1391,9 @@ export function getComponentReference(type) {
1329
1391
  displayName: definition.displayName,
1330
1392
  summary: definition.summary,
1331
1393
  dataEncoding:
1332
- "componentData is a JSON string containing an object; do not place an object directly in the attribute.",
1394
+ type === "cta" || type === "form"
1395
+ ? "Use a JSON string in componentData. A reusable reference also accepts an object, which the CLI sends as the canonical JSON string."
1396
+ : "componentData is a JSON string containing an object.",
1333
1397
  componentDataMaxUtf8Bytes: CONTENT_LIMITS.componentDataBytes,
1334
1398
  additionalProperties: false,
1335
1399
  properties: getComponentPropertyReference(type),
@@ -1343,6 +1407,7 @@ export function getComponentReference(type) {
1343
1407
  authoringMarkdownExample: definition.authoring.markdownExample,
1344
1408
  }
1345
1409
  : {}),
1410
+ ...(type === "cta" || type === "form" ? { reusablePlacement: reusablePlacementReference(type) } : {}),
1346
1411
  componentBlockExample: {
1347
1412
  type: "componentBlock",
1348
1413
  attrs: {
@@ -1395,6 +1460,8 @@ function registryFieldReference(name, definition) {
1395
1460
  Object.entries(definition.fields).map(([fieldName, field]) =>
1396
1461
  Object.freeze({
1397
1462
  ...registryFieldReference(fieldName, field),
1463
+ ...(field.label === undefined ? {} : { label: field.label }),
1464
+ ...(field.help === undefined ? {} : { help: field.help }),
1398
1465
  ...(field.requiredKeys ? { requiredKeys: [...field.requiredKeys] } : {}),
1399
1466
  ...(field.optionalKeys ? { optionalKeys: [...field.optionalKeys] } : {}),
1400
1467
  ...(field.tokenByValue ? { tokenByValue: { ...field.tokenByValue } } : {}),
@@ -1504,7 +1571,7 @@ function decorationReference() {
1504
1571
  maskGuidance:
1505
1572
  "Use a transparent PNG or WebP whose alpha channel holds only the mark; the section context tints it in both schemes.",
1506
1573
  sizeGuidance:
1507
- "Set inlineSizePercent to size the art by the section's width, or blockSizePercent by its height; the two cannot be combined. Or set repeat to tile a small seamless image: \"repeat\" tiles both ways at its natural size, with neither size; \"repeat-x\" and \"repeat-y\" tile along one axis and take either size. Leave repeat out for no tiling; true and false are refused.",
1574
+ "Set inlineSizePercent to size the art by the section's width, or blockSizePercent by its height; the two cannot be combined. Or set repeat to tile a small seamless image: \"repeat\" tiles both ways at its natural size, with neither size; \"repeat-x\" and \"repeat-y\" tile along one axis. Use either percentage size or set sizeMode to \"natural\" with no percentage. Leave repeat out for no tiling.",
1508
1575
  opaqueWarning:
1509
1576
  "An opaque rectangle renders as a tinted rectangle, not a cut-out mark.",
1510
1577
  });
@@ -2031,11 +2098,11 @@ const FREE_FORM_REFERENCE = Object.freeze({
2031
2098
  Object.freeze({ command: `${CLI_BINARY_NAME} pages push`, result: "Create or update an unapproved draft." }),
2032
2099
  Object.freeze({
2033
2100
  command: `${CLI_BINARY_NAME} approve [page-path...]`,
2034
- result: "Approve drafts and build the staged site.",
2101
+ result: "Approve drafts so they can be selected for staging.",
2035
2102
  }),
2036
2103
  Object.freeze({
2037
2104
  command: `${CLI_BINARY_NAME} deploy --staging`,
2038
- result: "Deploy the staged build to the staging site; the result's siteHealth reports its stored Site Health warnings.",
2105
+ result: "Build the staging release and preview automatic redirects for selected page moves. siteHealth reports stored Site Health warnings.",
2039
2106
  }),
2040
2107
  Object.freeze({
2041
2108
  command: `${CLI_BINARY_NAME} health --staging`,
@@ -2043,7 +2110,7 @@ const FREE_FORM_REFERENCE = Object.freeze({
2043
2110
  }),
2044
2111
  Object.freeze({
2045
2112
  command: `${CLI_BINARY_NAME} deploy --production`,
2046
- result: "Promote the completed staging deployment to production.",
2113
+ result: "Promote the staged release. Automatic page redirects go live and become path history.",
2047
2114
  }),
2048
2115
  ]),
2049
2116
  });
@@ -2116,6 +2183,7 @@ export function getPageTypeReference(type) {
2116
2183
  if (!page) return undefined;
2117
2184
  return Object.freeze({
2118
2185
  ...page,
2186
+ ...(type === "article" ? { reusableBlocks: ["cta", "form"].map(reusablePlacementReference) } : {}),
2119
2187
  ...(BADGE_PAGE_TYPES.has(type) ? { tagBadges: pageBadgeReference(type) } : {}),
2120
2188
  contentInset: PAGE_INSET,
2121
2189
  fixedValues: Object.freeze(type === "recipe" ? [RECIPE_ANCHOR] : []),
@@ -2331,7 +2399,7 @@ export function formatReferenceResult(result) {
2331
2399
  result.pageTypes.map((page) =>
2332
2400
  ` ${page.type.padEnd(16)} ${page.summary}\n${" ".repeat(19)}Help: ${page.helpCommand}`
2333
2401
  ).join("\n")
2334
- }\n\n${result.sourceRule}\n`;
2402
+ }\n\n${result.sourceRule}\n\nPage blocks: ${result.pageBlockCatalog.command}\n${result.pageBlockCatalog.description}\n`;
2335
2403
  case "component-types":
2336
2404
  return `Free-form components:\n${
2337
2405
  result.components.map((component) =>
@@ -2366,7 +2434,8 @@ export function formatReferenceResult(result) {
2366
2434
  + [badges.renders, badges.visibility, badges.preview, badges.destinations, badges.recipeMetadata, badges.focusRing].filter(Boolean).join(" ")
2367
2435
  + "\n Theme properties: " + badges.componentProperties.join(", ")
2368
2436
  : "";
2369
- return `${formatTypedPageReference(page).trimEnd()}${badgeText}${styling}`;
2437
+ const reusable = page.reusableBlocks === undefined ? "" : `\n\nReusable CTA and Form blocks:\nRun '${REUSABLE_BLOCK_CATALOG_COMMAND}' to read the site's draft keys. Use reusableKey as the only field.\n${REUSABLE_BLOCK_RELEASE_GUIDANCE}\n\n${page.reusableBlocks.map(({ markdown }) => markdown).join("\n\n")}`;
2438
+ return `${formatTypedPageReference(page).trimEnd()}${badgeText}${reusable}${styling}`;
2370
2439
  }
2371
2440
  const markdownFormat = page.workspace.formats.find((format) => format.extension === ".md");
2372
2441
  const sourceRule = page.workspace.sourceRule;
@@ -2406,6 +2475,7 @@ export function formatReferenceResult(result) {
2406
2475
  }
2407
2476
  case "component": {
2408
2477
  const component = result.component;
2478
+ const reusable = component.reusablePlacement === undefined ? "" : `\n\nReusable placement:\nRun '${component.reusablePlacement.catalog}' for the site's draft keys. Use reusableKey as the only field.\n${component.reusablePlacement.release}\n\n${component.reusablePlacement.markdown}`;
2409
2479
  return `${component.displayName} (${component.type})\n${component.summary}\n\nProperties:\n${
2410
2480
  component.properties.map(formatComponentProperty).join("\n")
2411
2481
  }\n\nUnlisted properties are rejected at every object level.\ncomponentData maximum: ${component.componentDataMaxUtf8Bytes} UTF-8 bytes.\n\nAccessibility:\n${
@@ -2416,7 +2486,7 @@ export function formatReferenceResult(result) {
2416
2486
  component.authoringNotes === undefined
2417
2487
  ? ""
2418
2488
  : `\n\nAuthoring by link:\n${component.authoringNotes.map((note) => ` - ${note}`).join("\n")}\n${component.authoringMarkdownExample}`
2419
- }\n\nRemember: componentData stores JSON.stringify(the object), not the object itself. Use --json for the exact nested schema and a complete componentBlock example.\n`;
2489
+ }${reusable}\n\nRemember: componentData stores the JSON string. Use --json for the exact nested schema and a complete componentBlock example.\n`;
2420
2490
  }
2421
2491
  case "workflow": {
2422
2492
  const reference = result.reference;