An open source design system that's fully customizable and agent ready
TypeScript
fix(theme): document the two tokens their landings left undocumented (#5069)
Cindy Zhang9378ba5ce7ec
diff --git a/.changeset/main-red-thumbnail-border-docs.md b/.changeset/main-red-thumbnail-border-docs.mdnew file mode 100644index 0000000000..4186ed1e21--- /dev/null+++ b/.changeset/main-red-thumbnail-border-docs.md@@ -0,0 +1,8 @@+---+'@astryxdesign/cli': patch+'@astryxdesign/core': patch+---++[fix] Two guards left failing on `main` by their own landings, so every PR since has been red through no fault of its own. #4963 gave Thumbnail's remove button a coarse-pointer hit-area var and did not document it, which the derived-var guard reads as an undocumented private var; the var is an `inset` on a `::after` overlay, so it is documented as private and listed alongside the other vars no standard CSS property maps onto. #5026 moved `borderDefaults` into `CoreTokenName` — the landing the theme-template guard was explicitly waiting for (its comment says "when #5017 lands, this guard starts requiring the template to cover it") — so the template's token inventory now names `--border-width`.++@cixzhangdiff --git a/packages/cli/assets/theme.template.ts b/packages/cli/assets/theme.template.tsindex 486955b56a..998309607d 100644--- a/packages/cli/assets/theme.template.ts+++ b/packages/cli/assets/theme.template.ts@@ -198,6 +198,7 @@ export const myTheme = defineTheme({// --spacing-* 0 · 0-5 · 1 … 12// --size-element-* sm · md · lg (control heights)// --focus-outline-* width · style · color · offset+ // --border-width hairline thickness shared by bordered surfaces// --radius-* none · inner · element · container · page · chat · full// --shadow-* low/med/high + inset-{hover,selected,success,warning,error}// --duration-* {fast,medium,slow} × {-min, base, -max}diff --git a/packages/core/src/Thumbnail/Thumbnail.doc.mjs b/packages/core/src/Thumbnail/Thumbnail.doc.mjsindex 85a74b2281..f4906ca8b7 100644--- a/packages/core/src/Thumbnail/Thumbnail.doc.mjs+++ b/packages/core/src/Thumbnail/Thumbnail.doc.mjs@@ -77,6 +77,9 @@ export const docs = {targets: [{className: 'astryx-thumbnail'},],+ vars: [+ {name: '--_thumbnail-hit-inset', description: 'Outset of the remove button\u2019s invisible hit area, applied to a ::after overlay. 0 on a fine pointer; negative on a coarse one, which grows the 20px button to the 24px touch target without changing what is drawn.', default: '0px', private: true},+ ],},usage: {description:diff --git a/packages/core/src/theme/derivedVarRegistry.test.ts b/packages/core/src/theme/derivedVarRegistry.test.tsindex df9b1c8142..393c96ad19 100644--- a/packages/core/src/theme/derivedVarRegistry.test.ts+++ b/packages/core/src/theme/derivedVarRegistry.test.ts@@ -262,6 +262,9 @@ const VARS_WITHOUT_DERIVED_MAPPING = new Set(['--_avatar-group-overlap','--_codeblock-gutter-width','--_tab-indicator-bottom',+ // Hit-area outset on a ::after overlay — `inset` on a pseudo-element is not+ // a property a theme author sets on the component.+ '--_thumbnail-hit-inset',// Indentation and row-spacing metrics: --tree-list-indent is the authorable// step, --_tree-indent the per-row distance TreeListItem computes from it.// --tree-list-row-gap is applied as half a padding-block on each row wrapper,