@astryxdesign/cli 0.7.6-canary.ec128c4 → 0.7.6-canary.eecd9c1
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/api/doctor/built-checks.test.mjs +11 -5
- package/api/integration/authoring-checks.test.mjs +8 -0
- package/api/integration/validate-integration-gaps.test.mjs +8 -0
- package/assets/docs/author-a-theme.doc.mjs +3 -3
- package/assets/docs/motion.doc.mjs +39 -3
- package/assets/docs/tree/tokens-duration.doc.mjs +2 -2
- package/assets/docs/tree/tokens-ease.doc.mjs +10 -2
- package/assets/docs/tree/tokens.doc.mjs +1 -1
- package/assets/theme.template.ts +20 -5
- package/foundation/config/theme-private-vars.mjs +26 -6
- package/foundation/config/theme-private-vars.test.mjs +21 -0
- package/package.json +9 -9
|
@@ -290,15 +290,21 @@ describe('--built edge cases', () => {
|
|
|
290
290
|
});
|
|
291
291
|
|
|
292
292
|
it('warns, not fails, when the file limit ends the read before any Astryx', () => {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
293
|
+
// One more file than the read takes, spread over 50 folders. Each folder
|
|
294
|
+
// is made once, and each file is a link to one empty file: a file is
|
|
295
|
+
// one directory entry, not a recursive mkdir and a write each.
|
|
296
|
+
const empty = path.join(dir, 'empty.txt');
|
|
297
|
+
fs.writeFileSync(empty, '');
|
|
298
|
+
for (let folder = 0; folder < 50; folder++) {
|
|
299
|
+
fs.mkdirSync(path.join(dir, 'a', String(folder)), {recursive: true});
|
|
300
|
+
}
|
|
301
|
+
for (let i = 0; i < 20_000; i++) {
|
|
302
|
+
fs.linkSync(empty, path.join(dir, 'a', String(i % 50), `${i}.txt`));
|
|
297
303
|
}
|
|
298
304
|
const {usage} = check('.');
|
|
299
305
|
expect(usage.status).toBe('warn');
|
|
300
306
|
expect(usage.message).toContain('went unread');
|
|
301
|
-
}
|
|
307
|
+
});
|
|
302
308
|
|
|
303
309
|
it('finds a root-relative asset from the build root for a page in a subfolder', () => {
|
|
304
310
|
write({
|
|
@@ -147,6 +147,14 @@ beforeEach(() => {
|
|
|
147
147
|
tmpDir = fs.mkdtempSync(
|
|
148
148
|
path.join(process.cwd(), '.astryx-template-conflicts-'),
|
|
149
149
|
);
|
|
150
|
+
// The fixture is a package with its own TypeScript config, scoped to its
|
|
151
|
+
// own files. Without one, the prop check reads the repository's root
|
|
152
|
+
// config, as `tsc` would for a folder inside it, and compiles every
|
|
153
|
+
// declaration in the repository for each check.
|
|
154
|
+
fs.writeFileSync(
|
|
155
|
+
path.join(tmpDir, 'tsconfig.json'),
|
|
156
|
+
`${JSON.stringify({extends: '../tsconfig.json', include: ['**/*']})}\n`,
|
|
157
|
+
);
|
|
150
158
|
});
|
|
151
159
|
|
|
152
160
|
afterEach(() => {
|
|
@@ -45,6 +45,14 @@ const CLI = path.join(
|
|
|
45
45
|
|
|
46
46
|
beforeEach(() => {
|
|
47
47
|
tmpDir = fs.mkdtempSync(path.join(process.cwd(), '.astryx-validate-gaps-'));
|
|
48
|
+
// The fixture is a package with its own TypeScript config, scoped to its
|
|
49
|
+
// own files. Without one, the prop check reads the repository's root
|
|
50
|
+
// config, as `tsc` would for a folder inside it, and compiles every
|
|
51
|
+
// declaration in the repository for each check.
|
|
52
|
+
fs.writeFileSync(
|
|
53
|
+
path.join(tmpDir, 'tsconfig.json'),
|
|
54
|
+
`${JSON.stringify({extends: '../tsconfig.json', include: ['**/*']})}\n`,
|
|
55
|
+
);
|
|
48
56
|
});
|
|
49
57
|
|
|
50
58
|
afterEach(() => {
|
|
@@ -41,7 +41,7 @@ export const docs = {
|
|
|
41
41
|
['typography.scale', '--text-heading-*-size/weight/leading, --text-body-size/weight/leading', 'base (px), ratio'],
|
|
42
42
|
['typography.body/heading/code', '--font-family-body, --font-family-heading, --font-family-code', 'family, fallbacks?, url?, weight?'],
|
|
43
43
|
['radius', '--radius-inner, --radius-element, --radius-container, --radius-page, --radius-chat', 'base (px), multiplier (0–2)'],
|
|
44
|
-
['motion', '--duration
|
|
44
|
+
['motion', 'Every --duration-* token, --ease-entrance and --ease-move (springs don\'t read them yet)', 'tempo? (0.75–1.5), character? (crisp|standard|expressive); and/or a duration scale: fast (ms), medium (ms), ratio, slow?, easing?. The scale wins over tempo for the durations it sets, and explicit tokens win over both. Fixed whatever the knobs say: drags and momentum, rubber band, keyboard, press onset/cancel/flash, hover intent, gesture thresholds, Spinner/Skeleton loops, the 200 ms Reduce Motion cap. See {@link generic:motion}.'],
|
|
45
45
|
]},
|
|
46
46
|
{type: 'prose', text: 'For dark mode tuples in token values, see the Dark mode section of {@link generic:use-a-theme}.'},
|
|
47
47
|
],
|
|
@@ -58,7 +58,7 @@ export const docs = {
|
|
|
58
58
|
['iconVariants', 'Replaced, never merged: a child that sets iconVariants replaces the base list; a child that omits it inherits the list.'],
|
|
59
59
|
['indicators', 'Shallow-merged: child indicators override matching names from the base.'],
|
|
60
60
|
['onDark, onLight', "Deep-merged per surface: the base's resolved surface first, then the child's overrides."],
|
|
61
|
-
['motion', "Field by field: the child's `fast`, `medium` and `ratio` regenerate the fast and medium duration tokens; `slow` and `easing` left unset keep the base theme's tokens, so an inherited slow band stays at the base's ratio."],
|
|
61
|
+
['motion', "Field by field: the child's `fast`, `medium` and `ratio` regenerate the fast and medium duration tokens; `slow` and `easing` left unset keep the base theme's tokens, so an inherited slow band stays at the base's ratio. Each knob (`tempo`, `character`) the child leaves unset keeps the base's."],
|
|
62
62
|
['typography, radius, color', 'Child config replaces base entirely (these are scale inputs, not additive).'],
|
|
63
63
|
['adaptations', 'Width-breakpoint overrides merge by fixed name. Inherited ordered rules keep their relative order; child rules append and re-resolve against the child root axes.'],
|
|
64
64
|
]},
|
|
@@ -106,7 +106,7 @@ export const docs = {
|
|
|
106
106
|
{type: 'prose', text: "Precedence follows rule order. Root theme values apply first, then every matching rule in declaration order. A later rule may deliberately restore a root value. `onDark` and `onLight` media-surface overrides apply after adaptations and win on the same leaf."},
|
|
107
107
|
{type: 'prose', text: "`extends` preserves the base rule order and appends child rules. Inherited conditions use the child's effective breakpoint map. An empty child rule is a no-op, not a removal operator."},
|
|
108
108
|
{type: 'prose', text: "A rule may replace a theme-local token only when the exact name is already enrolled by root `localTokens` or an enrolled base. Component writes in a rule are validated exactly like root `components`: same targets, axes, and value domains. The one addition is that a rule may not be the only place a custom value is enrolled: a value that is valid only because a theme enrolls it generates unconditional type augmentation, so declare it on the root theme first and let rules restyle it. Built-in values need no root declaration. When rules can match together, their ordered portable and local token writes are validated as one effective graph; any reachable cycle fails before CSS is emitted."},
|
|
109
|
-
{type: 'prose', text:
|
|
109
|
+
{type: 'prose', text: "Adaptations compile to CSS media queries with no resize listener or styling rerender. Runtime and `{@command theme build}` use the same compiler, but only a built theme is present at first paint in an SSR app."},
|
|
110
110
|
],
|
|
111
111
|
},
|
|
112
112
|
{
|
|
@@ -50,7 +50,7 @@ export const docs = {
|
|
|
50
50
|
content: [
|
|
51
51
|
{
|
|
52
52
|
type: 'prose',
|
|
53
|
-
text:
|
|
53
|
+
text: "Four easing curves. `--ease-standard` decelerates, for state changes. `--ease-entrance` is for things arriving and `--ease-move` for things moving on screen; a theme's `character` sets both, and at `standard` they equal `--ease-standard`. `--ease-exit` accelerates, for things leaving: it moves off from rest and leaves fast, so the travel stays visible for the whole duration, and it is the same at every `character`.",
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
type: 'token-ref',
|
|
@@ -120,7 +120,7 @@ export const docs = {
|
|
|
120
120
|
content: [
|
|
121
121
|
{
|
|
122
122
|
type: 'prose',
|
|
123
|
-
text:
|
|
123
|
+
text: "Set transition durations and easing from the motion tokens, so a theme that retunes motion retunes your animations too. Ease something arriving on `--ease-entrance` and something moving on screen on `--ease-move`, so it follows the theme's `character`, and something leaving on `--ease-exit`, which stays the same at every `character`.",
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
type: 'code',
|
|
@@ -137,12 +137,48 @@ const styles = stylex.create({
|
|
|
137
137
|
slideUp: {
|
|
138
138
|
transitionProperty: 'transform, opacity',
|
|
139
139
|
transitionDuration: durationVars['--duration-medium'],
|
|
140
|
-
transitionTimingFunction: easeVars['--ease-
|
|
140
|
+
transitionTimingFunction: easeVars['--ease-entrance'],
|
|
141
141
|
},
|
|
142
142
|
});`,
|
|
143
143
|
},
|
|
144
144
|
],
|
|
145
145
|
},
|
|
146
|
+
{
|
|
147
|
+
id: 'theme-motion',
|
|
148
|
+
title: 'Tune motion from the theme',
|
|
149
|
+
category: 'foundations',
|
|
150
|
+
content: [
|
|
151
|
+
{
|
|
152
|
+
type: 'prose',
|
|
153
|
+
text: "A theme sets how motion feels with two knobs in `defineTheme`'s `motion`. They drive the CSS motion tokens; the springs of touch motion don't read them yet. Every theme follows each person's Reduce Motion setting; no theme loosens it.",
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
type: 'list',
|
|
157
|
+
style: 'unordered',
|
|
158
|
+
items: [
|
|
159
|
+
"`tempo` scales every motion duration: 1 is Astryx's own, 0.75 the quickest and 1.5 the slowest (values outside are clamped).",
|
|
160
|
+
"`character` sets how lively motion is: `'crisp'` decelerates without overshoot, `'standard'` is Astryx's own, and `'expressive'` overshoots slightly on entrances and moves. Exits and fades never overshoot.",
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'code',
|
|
165
|
+
lang: 'ts',
|
|
166
|
+
label: 'A quicker, crisper theme',
|
|
167
|
+
code: `export const brandTheme = defineTheme({
|
|
168
|
+
name: 'brand',
|
|
169
|
+
motion: {tempo: 0.85, character: 'crisp'},
|
|
170
|
+
});`,
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
type: 'prose',
|
|
174
|
+
text: "Some motion never follows the knobs, because it tracks a finger or the system: finger tracking, momentum and the rubber band, the on-screen keyboard, the press model's onset delay, cancel distance and tap flash (its release fade follows tempo), hover-intent delays, gesture thresholds, the loops of busy indicators such as Spinner and Skeleton, and the 200 ms Reduce Motion cross-fade.",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
type: 'prose',
|
|
178
|
+
text: 'Precedence, lowest to highest: the knobs, then a duration scale (`fast`, `medium`, `slow`, `ratio`) for the durations it sets, then explicit `tokens`. A theme with no `motion` renders exactly as before.',
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
},
|
|
146
182
|
{
|
|
147
183
|
title: 'Best Practices',
|
|
148
184
|
category: 'foundations',
|
|
@@ -17,14 +17,14 @@ export const docs = {
|
|
|
17
17
|
"order": 100
|
|
18
18
|
},
|
|
19
19
|
"category": "foundations",
|
|
20
|
-
"description": "Motion duration primitives. Three bands: fast (micro-interactions), medium (entrance/exit), slow (continuous). Min/max variants derive from base × ratio.",
|
|
20
|
+
"description": "Motion duration primitives. Three bands: fast (micro-interactions), medium (entrance/exit), slow (continuous). Min/max variants derive from base × ratio. Of a theme's two `motion` knobs, `tempo` (0.75–1.5) scales every duration here; `character` leaves durations alone. A duration scale beats `tempo` for the bands it sets, and explicit `tokens` beat both. `tempo` leaves these unscaled: finger tracking, momentum, the rubber band, the on-screen keyboard, the press's onset delay, cancel distance and tap flash, hover-intent delays, gesture thresholds, Spinner's and Skeleton's loops, and the 200 ms Reduce Motion cap.",
|
|
21
21
|
"sections": [
|
|
22
22
|
{
|
|
23
23
|
"title": "Duration Tokens",
|
|
24
24
|
"content": [
|
|
25
25
|
{
|
|
26
26
|
"type": "prose",
|
|
27
|
-
"text": "Motion duration primitives. Three bands: fast (micro-interactions), medium (entrance/exit), slow (continuous). Min/max variants derive from base × ratio."
|
|
27
|
+
"text": "Motion duration primitives. Three bands: fast (micro-interactions), medium (entrance/exit), slow (continuous). Min/max variants derive from base × ratio. Of a theme's two `motion` knobs, `tempo` (0.75–1.5) scales every duration here; `character` leaves durations alone. A duration scale beats `tempo` for the bands it sets, and explicit `tokens` beat both. `tempo` leaves these unscaled: finger tracking, momentum, the rubber band, the on-screen keyboard, the press's onset delay, cancel distance and tap flash, hover-intent delays, gesture thresholds, Spinner's and Skeleton's loops, and the 200 ms Reduce Motion cap."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "table",
|
|
@@ -17,14 +17,14 @@ export const docs = {
|
|
|
17
17
|
"order": 110
|
|
18
18
|
},
|
|
19
19
|
"category": "foundations",
|
|
20
|
-
"description": "Easing curves for animations and transitions.",
|
|
20
|
+
"description": "Easing curves for animations and transitions. Of a theme's two `motion` knobs, `character` sets `--ease-entrance` and `--ease-move`: `crisp` decelerates without overshoot, `expressive` overshoots slightly, and at `standard` both equal `--ease-standard`; `--ease-exit` keeps its own curve at every character. `tempo` leaves curves alone. A duration scale's own fields win over the knobs, and explicit `tokens` win over everything. No curve here shapes motion that follows a finger or the system (dragging, momentum, the rubber band, the on-screen keyboard), and the press's clocks, hover-intent delays and gesture thresholds keep their timing whatever the character.",
|
|
21
21
|
"sections": [
|
|
22
22
|
{
|
|
23
23
|
"title": "Easing Tokens",
|
|
24
24
|
"content": [
|
|
25
25
|
{
|
|
26
26
|
"type": "prose",
|
|
27
|
-
"text": "Easing curves for animations and transitions."
|
|
27
|
+
"text": "Easing curves for animations and transitions. Of a theme's two `motion` knobs, `character` sets `--ease-entrance` and `--ease-move`: `crisp` decelerates without overshoot, `expressive` overshoots slightly, and at `standard` both equal `--ease-standard`; `--ease-exit` keeps its own curve at every character. `tempo` leaves curves alone. A duration scale's own fields win over the knobs, and explicit `tokens` win over everything. No curve here shapes motion that follows a finger or the system (dragging, momentum, the rubber band, the on-screen keyboard), and the press's clocks, hover-intent delays and gesture thresholds keep their timing whatever the character."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "table",
|
|
@@ -37,6 +37,14 @@ export const docs = {
|
|
|
37
37
|
"--ease-standard",
|
|
38
38
|
"cubic-bezier(0.24, 1, 0.4, 1)"
|
|
39
39
|
],
|
|
40
|
+
[
|
|
41
|
+
"--ease-entrance",
|
|
42
|
+
"cubic-bezier(0.24, 1, 0.4, 1)"
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
"--ease-move",
|
|
46
|
+
"cubic-bezier(0.24, 1, 0.4, 1)"
|
|
47
|
+
],
|
|
40
48
|
[
|
|
41
49
|
"--ease-exit",
|
|
42
50
|
"cubic-bezier(0.3, 0, 0.6, 0.6)"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// AUTO-GENERATED — do not edit manually.
|
|
4
4
|
// Run: node scripts/generate-token-docs.mjs
|
|
5
|
-
// Total:
|
|
5
|
+
// Total: 285 tokens across 15 categories.
|
|
6
6
|
|
|
7
7
|
/** @type {import('@astryxdesign/cli/authoring').NamespaceDoc} */
|
|
8
8
|
export const docs = {
|
package/assets/theme.template.ts
CHANGED
|
@@ -181,12 +181,26 @@ export const myTheme = defineTheme({
|
|
|
181
181
|
radius: {base: 4, multiplier: 1},
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
184
|
+
* Motion. Two knobs set how its CSS feels (touch springs don't read them
|
|
185
|
+
* yet):
|
|
186
|
+
* tempo — 1 is Astryx's own; 0.75 the quickest, 1.5 the slowest.
|
|
187
|
+
* character — 'crisp' | 'standard' | 'expressive': the entrance and move
|
|
188
|
+
* curves (--ease-entrance, --ease-move). --ease-exit, the curve for
|
|
189
|
+
* something leaving, is the same at every character; exits and fades
|
|
190
|
+
* never overshoot.
|
|
191
|
+
* e.g. motion: {tempo: 0.85, character: 'crisp'}
|
|
192
|
+
* Finger tracking, momentum, the rubber band, the on-screen keyboard,
|
|
193
|
+
* hover-intent delays, gesture thresholds, the press's onset delay, cancel
|
|
194
|
+
* distance and tap flash, and busy loops never follow them; the press
|
|
195
|
+
* release fade follows tempo, up to the 200 ms Reduce Motion cap.
|
|
196
|
+
*
|
|
197
|
+
* A duration scale in ms wins over tempo for the durations it sets. Each of
|
|
198
|
+
* fast/medium/slow also gets a -min and -max sibling computed with `ratio`
|
|
199
|
+
* (min = base × ratio, max = base ÷ ratio), so a component can pick a longer
|
|
200
|
+
* or shorter variant of the same tempo.
|
|
187
201
|
* Snappy {fast: 100, medium: 250} · Default {fast: 175, medium: 410, slow: 975}
|
|
188
202
|
* Cinematic {fast: 200, medium: 500, slow: 1200}
|
|
189
|
-
* `easing` overrides --ease-standard.
|
|
203
|
+
* `easing` overrides --ease-standard. Explicit `tokens` win over both.
|
|
190
204
|
*
|
|
191
205
|
* Reference: `astryx docs motion`.
|
|
192
206
|
*/
|
|
@@ -217,7 +231,8 @@ export const myTheme = defineTheme({
|
|
|
217
231
|
// --radius-* none · inner · element · container · page · chat · full
|
|
218
232
|
// --shadow-* low/med/high + inset-{hover,selected,success,warning,error}
|
|
219
233
|
// --duration-* {fast,medium,slow} × {-min, base, -max}
|
|
220
|
-
// --ease-* standard (
|
|
234
|
+
// --ease-* standard (state) · entrance (arriving) · move (on
|
|
235
|
+
// screen) · exit (leaving)
|
|
221
236
|
// --font-family-* body · heading · code
|
|
222
237
|
// --font-size-* 4xs … 5xl
|
|
223
238
|
// --font-weight-* normal · medium · semibold · bold
|
|
@@ -6,18 +6,35 @@
|
|
|
6
6
|
* this check.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* The authored adaptation rule values: a defined theme's normalized rules keep
|
|
11
|
+
* them, while its resolved `__adaptationRules` hold compiler output.
|
|
12
|
+
* @param {Record<string, any>} themeDef
|
|
13
|
+
*/
|
|
10
14
|
function adaptationRuleValues(themeDef) {
|
|
11
|
-
if (Array.isArray(themeDef.__adaptationRules)) {
|
|
12
|
-
return themeDef.__adaptationRules;
|
|
13
|
-
}
|
|
14
15
|
const rules = themeDef.adaptations?.rules ?? themeDef.__adaptations?.rules;
|
|
15
|
-
if (!Array.isArray(rules))
|
|
16
|
+
if (!Array.isArray(rules)) {
|
|
17
|
+
return Array.isArray(themeDef.__adaptationRules)
|
|
18
|
+
? themeDef.__adaptationRules
|
|
19
|
+
: [];
|
|
20
|
+
}
|
|
16
21
|
return rules
|
|
17
22
|
.map(/** @param {any} rule */ rule => rule?.value)
|
|
18
23
|
.filter(Boolean);
|
|
19
24
|
}
|
|
20
25
|
|
|
26
|
+
/**
|
|
27
|
+
* The tokens a surface's author wrote. A defined theme's `tokens` are
|
|
28
|
+
* resolved, with the private vars the compiler derives (the motion knobs'
|
|
29
|
+
* `--_astryx-*`, `spec:AST-108` FR4), so its authored ones are
|
|
30
|
+
* `__inputTokens`; a built module is compiler output, checked when built.
|
|
31
|
+
* @param {Record<string, any>} value
|
|
32
|
+
*/
|
|
33
|
+
function authoredTokens(value) {
|
|
34
|
+
if ('__built' in value) return undefined;
|
|
35
|
+
return '__inputTokens' in value ? value.__inputTokens : value.tokens;
|
|
36
|
+
}
|
|
37
|
+
|
|
21
38
|
/**
|
|
22
39
|
* Every named theme-input surface that can contain token or component writes.
|
|
23
40
|
* @param {Record<string, any>} themeDef
|
|
@@ -54,7 +71,10 @@ export function validatePrivateVars(themeDef) {
|
|
|
54
71
|
|
|
55
72
|
for (const surface of inputSurfaces(themeDef)) {
|
|
56
73
|
for (const field of ['tokens', 'localTokens']) {
|
|
57
|
-
const values =
|
|
74
|
+
const values =
|
|
75
|
+
field === 'tokens'
|
|
76
|
+
? authoredTokens(surface.value)
|
|
77
|
+
: surface.value[field];
|
|
58
78
|
if (!values || typeof values !== 'object' || Array.isArray(values)) {
|
|
59
79
|
continue;
|
|
60
80
|
}
|
|
@@ -17,6 +17,27 @@ describe('validatePrivateVars', () => {
|
|
|
17
17
|
).toEqual([]);
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
+
it('checks a defined theme’s authored input, not the private vars its motion knobs derive (spec:AST-108 FR4)', async () => {
|
|
21
|
+
const {defineTheme} = await import('@astryxdesign/core/theme');
|
|
22
|
+
const derived = defineTheme({
|
|
23
|
+
name: 'motion-knobs',
|
|
24
|
+
motion: {fast: 125, medium: 300, slow: 700, ratio: 0.75, tempo: 1.2},
|
|
25
|
+
adaptations: {
|
|
26
|
+
rules: [{when: {pointer: 'coarse'}, value: {motion: {fast: 100}}}],
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
expect(
|
|
30
|
+
Object.keys(derived.tokens).some(name => name.startsWith('--_')),
|
|
31
|
+
).toBe(true);
|
|
32
|
+
expect(validatePrivateVars(derived)).toEqual([]);
|
|
33
|
+
const authored = defineTheme({
|
|
34
|
+
name: 'authored',
|
|
35
|
+
motion: {tempo: 1.2},
|
|
36
|
+
tokens: {'--_astryx-motion-tempo': '3'},
|
|
37
|
+
});
|
|
38
|
+
expect(validatePrivateVars(authored)).toHaveLength(1);
|
|
39
|
+
});
|
|
40
|
+
|
|
20
41
|
it('reports direct private keys on every authored input surface', () => {
|
|
21
42
|
const errors = validatePrivateVars({
|
|
22
43
|
name: 'private-inputs',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.7.6-canary.
|
|
3
|
+
"version": "0.7.6-canary.eecd9c1",
|
|
4
4
|
"displayName": "CLI",
|
|
5
5
|
"description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -111,10 +111,10 @@
|
|
|
111
111
|
"zod": "^4.4.3"
|
|
112
112
|
},
|
|
113
113
|
"peerDependencies": {
|
|
114
|
-
"@astryxdesign/charts": "0.7.6-canary.
|
|
115
|
-
"@astryxdesign/core": "0.7.6-canary.
|
|
116
|
-
"@astryxdesign/lab": "0.7.6-canary.
|
|
117
|
-
"@astryxdesign/theme-neutral": "0.7.6-canary.
|
|
114
|
+
"@astryxdesign/charts": "0.7.6-canary.eecd9c1",
|
|
115
|
+
"@astryxdesign/core": "0.7.6-canary.eecd9c1",
|
|
116
|
+
"@astryxdesign/lab": "0.7.6-canary.eecd9c1",
|
|
117
|
+
"@astryxdesign/theme-neutral": "0.7.6-canary.eecd9c1"
|
|
118
118
|
},
|
|
119
119
|
"peerDependenciesMeta": {
|
|
120
120
|
"@astryxdesign/charts": {
|
|
@@ -131,10 +131,10 @@
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
|
-
"@astryxdesign/charts": "0.7.6-canary.
|
|
135
|
-
"@astryxdesign/core": "0.7.6-canary.
|
|
136
|
-
"@astryxdesign/lab": "0.7.6-canary.
|
|
137
|
-
"@astryxdesign/theme-neutral": "0.7.6-canary.
|
|
134
|
+
"@astryxdesign/charts": "0.7.6-canary.eecd9c1",
|
|
135
|
+
"@astryxdesign/core": "0.7.6-canary.eecd9c1",
|
|
136
|
+
"@astryxdesign/lab": "0.7.6-canary.eecd9c1",
|
|
137
|
+
"@astryxdesign/theme-neutral": "0.7.6-canary.eecd9c1",
|
|
138
138
|
"@heroicons/react": "^2.2.0",
|
|
139
139
|
"@stylexjs/stylex": "^0.19.0",
|
|
140
140
|
"@types/babel__core": "^7.20.5",
|