@astryxdesign/cli 0.7.5-canary.d9b43cf → 0.7.5-canary.dae1747

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.
@@ -0,0 +1,47 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file Contract test for the Tokenizer showcase block.
5
+ * @input The shipped TokenizerShowcase block source.
6
+ * @output Guards the block's search source: typing in the showcase must list
7
+ * matching tags rather than an empty menu.
8
+ * @position CLI template regression coverage; runs in the node test project.
9
+ * The block is the hero example of the Tokenizer docs page. Like the other
10
+ * template contract tests here it reads the block's source instead of
11
+ * importing it, so it needs no built `@astryxdesign/core`.
12
+ */
13
+
14
+ import fs from 'node:fs';
15
+ import path from 'node:path';
16
+ import {fileURLToPath} from 'node:url';
17
+ import {describe, expect, it} from 'vitest';
18
+
19
+ const sourcePath = path.resolve(
20
+ path.dirname(fileURLToPath(import.meta.url)),
21
+ '../../assets/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx',
22
+ );
23
+ const source = fs.readFileSync(sourcePath, 'utf8');
24
+
25
+ // Evaluate the block's tag list and search source on their own, with the
26
+ // type annotations removed, so the test exercises the shipped logic.
27
+ function loadSearchSource() {
28
+ const tags = source.match(/const tags[^=]*=\s*(\[[\s\S]*?\n\]);/)?.[1];
29
+ const searchSource = source.match(
30
+ /const source[^=]*=\s*(\{[\s\S]*?\n\});/,
31
+ )?.[1];
32
+ if (tags == null || searchSource == null) {
33
+ throw new Error('TokenizerShowcase no longer declares `tags` and `source`');
34
+ }
35
+ const untyped = searchSource.replace(/\((\w+):\s*string\)/g, '($1)');
36
+ return new Function(`const tags = ${tags}; return ${untyped};`)();
37
+ }
38
+
39
+ describe('Tokenizer showcase block', () => {
40
+ it('lists the tags that match a typed query, ignoring case', async () => {
41
+ const {search, bootstrap} = loadSearchSource();
42
+ const labels = async query => (await search(query)).map(tag => tag.label);
43
+ expect(await labels('mar')).toEqual(['Marketing']);
44
+ expect(await labels('A')).toEqual(['Marketing', 'Research', 'Sales']);
45
+ expect((await bootstrap()).length).toBeGreaterThan(0);
46
+ });
47
+ });
@@ -86,6 +86,10 @@ describe('values the root accepts without enrollment are accepted rule-only', ()
86
86
  // case. It must NOT be an adaptation-specific exception; it is simply
87
87
  // whatever root does.
88
88
  ['an unresolved domain', 'avatar-group', 'size:not-a-real-avatar-size'],
89
+ // `IconVariantMap` is public and augmentable, but `Icon.variant` selects
90
+ // artwork and has no component styling map (component-theming-surface
91
+ // INV14), so a styling key on it never enrolls a value.
92
+ ['an artwork-request axis', 'icon', 'variant:filled'],
89
93
  ])('accepts %s on both surfaces', async (_label, component, key) => {
90
94
  const rootReceipt = await buildWithRootValue('root-ok', component, key);
91
95
  expect(rootReceipt?.type).toBe('theme.build');
@@ -0,0 +1,105 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file A built theme keeps its `iconVariants` list.
5
+ *
6
+ * `architecture:theme-compilation` (System model item 7): a built theme carries
7
+ * its `iconVariants` list in its JavaScript, so the built theme, and a theme
8
+ * that `extends` it, read the same list as the runtime theme
9
+ * (`spec:AST-087` FR2, FR18).
10
+ *
11
+ * `themeBuild` compiles via @astryxdesign/core, so it needs a built core — the
12
+ * `node` project's globalSetup builds it once before workers fork.
13
+ */
14
+
15
+ import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest';
16
+ import * as fs from 'node:fs';
17
+ import * as os from 'node:os';
18
+ import * as path from 'node:path';
19
+ import {pathToFileURL} from 'node:url';
20
+ import {defineTheme} from '@astryxdesign/core/theme';
21
+ import {themeBuild} from './build.mjs';
22
+
23
+ vi.setConfig({testTimeout: 30000});
24
+
25
+ let tmpDir;
26
+ beforeEach(() => {
27
+ tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'astryx-icon-variants-'));
28
+ });
29
+ afterEach(() => {
30
+ fs.rmSync(tmpDir, {recursive: true, force: true});
31
+ });
32
+
33
+ /**
34
+ * Build a raw theme source and import the generated module's theme.
35
+ * @param {Record<string, unknown>} source
36
+ */
37
+ async function buildAndImport(source) {
38
+ const name = String(source.name);
39
+ fs.writeFileSync(
40
+ path.join(tmpDir, `${name}.mjs`),
41
+ `export default ${JSON.stringify({tokens: {}, ...source})};\n`,
42
+ );
43
+ await themeBuild(`${name}.mjs`, {}, {cwd: tmpDir});
44
+ const mod = await import(pathToFileURL(path.join(tmpDir, `${name}.js`)).href);
45
+ const [theme] = Object.values(mod);
46
+ return /** @type {any} */ (theme);
47
+ }
48
+
49
+ describe('theme build keeps the iconVariants list', () => {
50
+ it('writes the list a theme sets, as the runtime theme reads it', async () => {
51
+ const source = {name: 'listed-icons', iconVariants: ['outline', 'filled']};
52
+ const built = await buildAndImport(source);
53
+
54
+ expect(built.__built).toBe(true);
55
+ expect(built.iconVariants).toEqual(['outline', 'filled']);
56
+ expect(built.iconVariants).toEqual(defineTheme(source).iconVariants);
57
+ });
58
+
59
+ it('lets a child of the built theme inherit or replace the list, as at runtime', async () => {
60
+ const source = {name: 'base-icons', iconVariants: ['outline', 'filled']};
61
+ const built = await buildAndImport(source);
62
+ const runtime = defineTheme(source);
63
+
64
+ const inherits = defineTheme({name: 'inherits', extends: built});
65
+ const replaces = defineTheme({
66
+ name: 'replaces',
67
+ extends: built,
68
+ iconVariants: ['bold'],
69
+ });
70
+
71
+ expect(inherits.iconVariants).toEqual(['outline', 'filled']);
72
+ expect(replaces.iconVariants).toEqual(['bold']);
73
+ expect(inherits.iconVariants).toEqual(
74
+ defineTheme({name: 'inherits-runtime', extends: runtime}).iconVariants,
75
+ );
76
+ expect(replaces.iconVariants).toEqual(
77
+ defineTheme({
78
+ name: 'replaces-runtime',
79
+ extends: runtime,
80
+ iconVariants: ['bold'],
81
+ }).iconVariants,
82
+ );
83
+ });
84
+
85
+ it('keeps an explicit empty list, which replaces an inherited one', async () => {
86
+ const built = await buildAndImport({
87
+ name: 'emptied-icons',
88
+ iconVariants: [],
89
+ });
90
+
91
+ expect(built.iconVariants).toEqual([]);
92
+ expect(
93
+ defineTheme({name: 'emptied-child', extends: built}).iconVariants,
94
+ ).toEqual([]);
95
+ });
96
+
97
+ it('writes no list for a theme without one', async () => {
98
+ const built = await buildAndImport({name: 'unlisted-icons'});
99
+
100
+ expect('iconVariants' in built).toBe(false);
101
+ expect(
102
+ defineTheme({name: 'unlisted-child', extends: built}).iconVariants,
103
+ ).toBeUndefined();
104
+ });
105
+ });
@@ -1103,6 +1103,28 @@ function componentHasAugmentableInterface(pascalName, interfaceName) {
1103
1103
  return re.test(decl);
1104
1104
  }
1105
1105
 
1106
+ /**
1107
+ * Public augmentable maps whose axis requests artwork instead of styling.
1108
+ * `Icon.variant` selects a theme's icon artwork, so it has no component styling
1109
+ * map (architecture:component-theming-surface INV14): a `components` key on it
1110
+ * never enrolls a value or generates an augmentation of its map.
1111
+ */
1112
+ const ARTWORK_REQUEST_MAPS = new Set(['IconVariantMap']);
1113
+
1114
+ /**
1115
+ * Whether a theme's component styling keys may enroll values in `interfaceName`
1116
+ * on `@astryxdesign/core/<Component>`.
1117
+ * @param {string} pascalName
1118
+ * @param {string} interfaceName
1119
+ * @returns {boolean}
1120
+ */
1121
+ function isComponentValueAugmentationPoint(pascalName, interfaceName) {
1122
+ return (
1123
+ !ARTWORK_REQUEST_MAPS.has(interfaceName) &&
1124
+ componentHasAugmentableInterface(pascalName, interfaceName)
1125
+ );
1126
+ }
1127
+
1106
1128
  /**
1107
1129
  * Adaptation values from resolved runtime rules, raw input, or normalized built
1108
1130
  * metadata. Built modules intentionally omit `__adaptationRules`, so every CLI
@@ -1410,7 +1432,7 @@ async function classifyComponentValue(component, prop, value) {
1410
1432
  const propPascal = prop.charAt(0).toUpperCase() + prop.slice(1);
1411
1433
  const target = (await resolveAugmentationTargetCandidates(component)).find(
1412
1434
  candidate =>
1413
- componentHasAugmentableInterface(
1435
+ isComponentValueAugmentationPoint(
1414
1436
  candidate.moduleName,
1415
1437
  `${candidate.interfacePrefix}${propPascal}Map`,
1416
1438
  ),
@@ -1567,7 +1589,7 @@ async function generateVariantDeclarationsAsync(themeDef) {
1567
1589
  const target = (
1568
1590
  await resolveAugmentationTargetCandidates(component)
1569
1591
  ).find(candidate =>
1570
- componentHasAugmentableInterface(
1592
+ isComponentValueAugmentationPoint(
1571
1593
  candidate.moduleName,
1572
1594
  `${candidate.interfacePrefix}${propPascal}Map`,
1573
1595
  ),
@@ -2151,7 +2173,9 @@ function generateBuiltModule(
2151
2173
  serializeField('__onDark', themeDef.__onDark) +
2152
2174
  serializeField('__onLight', themeDef.__onLight) +
2153
2175
  serializeField('__adaptations', themeDef.__adaptations) +
2154
- serializeField('__axes', themeDef.__axes ?? {}, true);
2176
+ serializeField('__axes', themeDef.__axes ?? {}, true) +
2177
+ // An explicit empty list replaces an inherited one, so keep `[]`.
2178
+ serializeField('iconVariants', themeDef.iconVariants, true);
2155
2179
 
2156
2180
  return `${iconImport}${iconDeclaration}/**
2157
2181
  * ${themeDef.name} theme — built by \`${getCliInvocation()} theme build\`
@@ -599,6 +599,33 @@ describe('themeBuild() — component override validation', () => {
599
599
  });
600
600
  });
601
601
 
602
+ describe('themeBuild() — Icon size dimensions', () => {
603
+ it('writes width and height on an icon size into the vars the glyph reads, with no warnings', async () => {
604
+ // spec:AST-087 FR10: a built theme sets an Icon size's glyph dimension the
605
+ // way the runtime provider does, through the shared compiler's derived
606
+ // vars. Raw width/height would lose to a consumer's unlayered StyleX.
607
+ const themeFile = path.join(tmpDir, 'iconsizes.mjs');
608
+ fs.writeFileSync(
609
+ themeFile,
610
+ `export default {
611
+ name: 'iconsizes',
612
+ tokens: {'--color-bg': '#0a0a0a'},
613
+ components: {icon: {'size:sm': {width: '18px', height: '22px'}}},
614
+ };\n`,
615
+ );
616
+
617
+ const result = await themeBuild('iconsizes.mjs', {}, {cwd: tmpDir});
618
+
619
+ expect(result?.data.warnings).toEqual([]);
620
+ const css = fs.readFileSync(path.join(tmpDir, 'iconsizes.css'), 'utf8');
621
+ const rule =
622
+ css.match(/\.astryx-icon\[data-size="sm"\]\s*\{([^}]*)\}/)?.[1] ?? '';
623
+ expect(rule).toMatch(/--_icon-width:\s*18px/);
624
+ expect(rule).toMatch(/--_icon-height:\s*22px/);
625
+ expect(rule).not.toMatch(/(^|[\s;])(width|height)\s*:/);
626
+ });
627
+ });
628
+
602
629
  describe('themeBuild() — the shipped theme template', () => {
603
630
  // `assets/theme.template.ts` is what `astryx theme template` puts in a
604
631
  // consumer's project. It is the one theme file we hand out, so it has to
@@ -55,9 +55,11 @@ export const docs = {
55
55
  ['tokens', 'Base tokens are copied first, then child tokens override on top.'],
56
56
  ['components', 'Deep-merged: child component rules override matching keys from the base.'],
57
57
  ['icons', 'Shallow-merged: child icons override matching names from the base.'],
58
+ ['iconVariants', 'Replaced, never merged: a child that sets iconVariants replaces the base list; a child that omits it inherits the list.'],
58
59
  ['indicators', 'Shallow-merged: child indicators override matching names from the base.'],
59
60
  ['onDark, onLight', "Deep-merged per surface: the base's resolved surface first, then the child's overrides."],
60
- ['typography, motion, radius, color', 'Child config replaces base entirely (these are scale inputs, not additive).'],
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."],
62
+ ['typography, radius, color', 'Child config replaces base entirely (these are scale inputs, not additive).'],
61
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.'],
62
64
  ]},
63
65
  {type: 'prose', text: "Inheritance is resolved when the theme is defined, so an extended theme is flat: `{@command theme build}` emits one self-contained stylesheet holding everything the child inherited, and the base theme's CSS does not need to be loaded next to it. A base that is not a theme (most often an import that missed) throws when `defineTheme` runs, rather than producing a theme that silently inherits nothing."},
@@ -101,11 +101,81 @@ export const brandTheme = defineTheme({
101
101
  },
102
102
  });`,
103
103
  },
104
+ {
105
+ type: 'prose',
106
+ text: "An entry can also be a function of the request, so the theme maps Icon's size to its icon library's own props or artwork. `Icon` calls it with `{size, variant}`, where `size` is the size it renders at (`xsm`, `sm`, `md`, or `lg`: an explicit `size`, else the owning component's default, else `md`). Reads that return one node — `getIcon()`, `useIcon()`, `getIconRegistry()`, and the theme's `icons` field — call it with `{size: 'md'}`. The same entry shape works in `registerIcons()`.",
107
+ },
108
+ {
109
+ type: 'code',
110
+ lang: 'tsx',
111
+ label: 'A size-aware icon entry',
112
+ code: `import {defineTheme} from '@astryxdesign/core/theme';
113
+ import {Info} from 'lucide-react';
114
+
115
+ export const brandTheme = defineTheme({
116
+ name: 'brand',
117
+ icons: {
118
+ // A heavier stroke keeps the small size legible.
119
+ info: ({size}) => <Info strokeWidth={size === 'sm' || size === 'xsm' ? 2.5 : 2} />,
120
+ },
121
+ });`,
122
+ },
123
+ {
124
+ type: 'prose',
125
+ text: 'Keep the function pure and synchronous: it computes its result from the request only, with no hooks, DOM or SVG measurement, browser globals, network access, mutable module state, or side effects. Its result is final. Returning `null` draws no glyph instead of falling back to a registered or built-in icon, while a `null` or `undefined` node entry still falls back. A child theme that sets an entry for a key replaces the inherited entry for that key.',
126
+ },
104
127
  ],
105
128
  },
106
129
  {
107
- title: 'Component and Library Icons',
130
+ title: 'Icon Variants',
108
131
  category: 'foundations',
132
+ content: [
133
+ {
134
+ type: 'prose',
135
+ text: "A theme lists the icon variant names it supports once, with `iconVariants` in `defineTheme()`. The list belongs to the whole theme, never to one icon, and Astryx defines no names of its own. Inside `defineTheme`, an entry function receives `variant` typed as the listed names, or `undefined`, so a misspelled name is a type error. An entry that receives `undefined` draws its normal artwork.",
136
+ },
137
+ {
138
+ type: 'code',
139
+ lang: 'tsx',
140
+ label: 'Listing variants and mapping them to artwork',
141
+ code: `import {defineTheme} from '@astryxdesign/core/theme';
142
+ import {InfoFilledIcon, InfoIcon} from './brand-icons';
143
+
144
+ export const brandTheme = defineTheme({
145
+ name: 'brand',
146
+ iconVariants: ['outline', 'filled'],
147
+ icons: {
148
+ info: ({size, variant}) =>
149
+ variant === 'filled' ? <InfoFilledIcon /> : <InfoIcon bold={size === 'sm'} />,
150
+ },
151
+ });
152
+
153
+ brandTheme.iconVariants; // ['outline', 'filled']`,
154
+ },
155
+ {
156
+ type: 'prose',
157
+ text: 'A theme that `extends` another inherits its list unless it sets its own; a list it sets replaces the inherited one instead of merging with it.',
158
+ },
159
+ {
160
+ type: 'prose',
161
+ text: 'An application declares the variant names it uses by augmenting `IconVariantMap` from `@astryxdesign/core/Icon`. `IconVariant` is those names, and an entry passed to `registerIcons()` receives `variant` typed as `IconVariant`.',
162
+ },
163
+ {
164
+ type: 'code',
165
+ lang: 'ts',
166
+ label: 'Declaring the variant names an application uses',
167
+ code: `declare module '@astryxdesign/core/Icon' {
168
+ interface IconVariantMap {
169
+ outline: true;
170
+ filled: true;
171
+ }
172
+ }`,
173
+ },
174
+ ],
175
+ },
176
+ {
177
+ title: 'Component and Library Icons',
178
+ category: 'foundations',
109
179
  content: [
110
180
  {
111
181
  type: 'prose',
@@ -21,6 +21,14 @@ export const docsDense = {
21
21
  {type: 'prose', text: "new palette: `astryx theme palette generate palette.config.json --out palette.generated.ts` → review + commit module and receipt → `import {palette} from './palette.generated';` → map semantic tokens to stable stops such as `palette.neutral.light[100]` / `palette.neutral.dark[15]`. regeneration updates mapped roles; generation does not rewrite the theme."},
22
22
  ],
23
23
  },
24
+ {
25
+ section: 'Icon sizes',
26
+ title: 'Icon sizes',
27
+ content: [
28
+ {type: 'prose', text: "theme sets each Icon size's glyph dimension: `width` + `height` on `components.icon['size:sm']` (or xsm/md/lg); semantic names + SVG components alike. px or rem only: a semantic icon takes its font size from the dimension, so em also grows its box. unstyled: xsm/sm/md/lg = 12/16/20/24px at 16px root, scale w/ root font size (rem keeps it). size names are fixed."},
29
+ null,
30
+ ],
31
+ },
24
32
  {
25
33
  section: 'Dark mode',
26
34
  title: 'Dark mode',
@@ -53,6 +53,22 @@ export const docs = {
53
53
  },
54
54
  ],
55
55
  },
56
+ {
57
+ id: 'icon-sizes',
58
+ title: 'Icon sizes',
59
+ content: [
60
+ {
61
+ type: 'prose',
62
+ text: "A theme sets the dimension of each Icon size in its stylesheet: `width` and `height` on `components.icon['size:sm']` (or `xsm`, `md`, `lg`) resize that size's glyph, for semantic icon names and SVG components passed to `Icon` alike. Give the dimension in `px` or `rem`: a semantic icon takes its font size from it, so an `em` value would also grow its box. A size the theme leaves alone stays 12, 16, 20, or 24px at a 16px root (`xsm`, `sm`, `md`, `lg`) and scales with the root font size; `rem` keeps that scaling. The four size names are fixed.",
63
+ },
64
+ {
65
+ type: 'code',
66
+ lang: 'tsx',
67
+ label: 'Set Icon size dimensions',
68
+ code: "const brandTheme = defineTheme({\n name: 'brand',\n components: {\n icon: {\n 'size:sm': {width: '1.125rem', height: '1.125rem'},\n 'size:lg': {width: '1.75rem', height: '1.75rem'},\n },\n },\n});",
69
+ },
70
+ ],
71
+ },
56
72
  {
57
73
  id: 'light-dark-mode',
58
74
  title: 'Dark mode',
@@ -25,6 +25,17 @@ export const docsZh = {
25
25
  },
26
26
  ],
27
27
  },
28
+ {
29
+ section: 'Icon sizes',
30
+ title: '图标尺寸',
31
+ content: [
32
+ {
33
+ type: 'prose',
34
+ text: "主题在样式表中设置每个 Icon 尺寸的大小:在 `components.icon['size:sm']`(或 `xsm`、`md`、`lg`)上设置 `width` 和 `height`,即可调整该尺寸的图标,语义图标名称和直接传给 `Icon` 的 SVG 组件都适用。请使用 `px` 或 `rem` 设置尺寸:语义图标会据此设置自身的字号,因此 `em` 值也会放大它的外框。主题未设置的尺寸在 16px 根字号下保持 12、16、20 或 24px(`xsm`、`sm`、`md`、`lg`),并随根字号缩放;`rem` 可保留这种缩放。四个尺寸名称是固定的。",
35
+ },
36
+ null,
37
+ ],
38
+ },
28
39
  {
29
40
  section: 'Dark mode',
30
41
  title: '深色模式',
@@ -6,16 +6,23 @@ import {useState} from 'react';
6
6
  import {Tokenizer} from '@astryxdesign/core/Tokenizer';
7
7
  import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
8
8
 
9
+ const tags: SearchableItem[] = [
10
+ {id: '1', label: 'Design'},
11
+ {id: '2', label: 'Engineering'},
12
+ {id: '3', label: 'Marketing'},
13
+ {id: '4', label: 'Product'},
14
+ {id: '5', label: 'Research'},
15
+ {id: '6', label: 'Sales'},
16
+ ];
17
+
9
18
  const source: SearchSource = {
10
- search: () => [],
11
- bootstrap: () => [],
19
+ search: (query: string) =>
20
+ tags.filter(tag => tag.label.toLowerCase().includes(query.toLowerCase())),
21
+ bootstrap: () => tags,
12
22
  };
13
23
 
14
24
  export default function TokenizerShowcase() {
15
- const [value, setValue] = useState<SearchableItem[]>([
16
- {id: '1', label: 'Design'},
17
- {id: '2', label: 'Engineering'},
18
- ]);
25
+ const [value, setValue] = useState<SearchableItem[]>([tags[0], tags[1]]);
19
26
  return (
20
27
  <div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 400px)'}}>
21
28
  <Tokenizer
@@ -91,9 +91,11 @@ export const myTheme = defineTheme({
91
91
 
92
92
  /**
93
93
  * Start from another theme instead of the defaults. Tokens are copied then
94
- * overridden, `components` deep-merge, `icons` shallow-merge — but the scale
95
- * configs below REPLACE the base's rather than merging, because they are
96
- * inputs to a generator, not values.
94
+ * overridden, `components` deep-merge, `icons` shallow-merge — but the
95
+ * typography, radius and color scale configs below REPLACE the base's rather
96
+ * than merging, because they are inputs to a generator, not values. `motion`
97
+ * inherits field by field: `fast`, `medium` and `ratio` regenerate the fast
98
+ * and medium durations, and a `slow` or `easing` left unset keeps the base's.
97
99
  *
98
100
  * Reference: `astryx theme list` (themes you can install and extend).
99
101
  */
@@ -312,10 +314,21 @@ export const myTheme = defineTheme({
312
314
 
313
315
  /**
314
316
  * Swap the artwork behind semantic icon names — every component that asks
315
- * for `check`, `close`, `chevron-down` gets yours.
317
+ * for `check`, `close`, `chevron-down` gets yours. An entry may also be a
318
+ * pure function of `{size, variant}` that picks artwork for the size Icon
319
+ * renders at.
316
320
  * Reference: `astryx docs icons` lists the names.
317
321
  */
318
- // icons: {check: <MyCheck />, close: <MyClose />},
322
+ // icons: {check: <MyCheck />, info: ({size}) => <MyInfo bold={size === 'sm'} />},
323
+
324
+ /**
325
+ * The icon variant names this theme supports, listed once for the whole
326
+ * theme. An icon entry function receives `variant` typed as these names.
327
+ * A theme that sets the list replaces the one it would inherit; omit it to
328
+ * inherit the base's list.
329
+ * Reference: `astryx docs icons`.
330
+ */
331
+ // iconVariants: ['outline', 'filled'],
319
332
 
320
333
  /**
321
334
  * Replace the small components that DRAW control state — the checkbox box,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.7.5-canary.d9b43cf",
3
+ "version": "0.7.5-canary.dae1747",
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.5-canary.d9b43cf",
115
- "@astryxdesign/core": "0.7.5-canary.d9b43cf",
116
- "@astryxdesign/lab": "0.7.5-canary.d9b43cf",
117
- "@astryxdesign/theme-neutral": "0.7.5-canary.d9b43cf"
114
+ "@astryxdesign/charts": "0.7.5-canary.dae1747",
115
+ "@astryxdesign/core": "0.7.5-canary.dae1747",
116
+ "@astryxdesign/lab": "0.7.5-canary.dae1747",
117
+ "@astryxdesign/theme-neutral": "0.7.5-canary.dae1747"
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.5-canary.d9b43cf",
135
- "@astryxdesign/core": "0.7.5-canary.d9b43cf",
136
- "@astryxdesign/lab": "0.7.5-canary.d9b43cf",
137
- "@astryxdesign/theme-neutral": "0.7.5-canary.d9b43cf",
134
+ "@astryxdesign/charts": "0.7.5-canary.dae1747",
135
+ "@astryxdesign/core": "0.7.5-canary.dae1747",
136
+ "@astryxdesign/lab": "0.7.5-canary.dae1747",
137
+ "@astryxdesign/theme-neutral": "0.7.5-canary.dae1747",
138
138
  "@heroicons/react": "^2.2.0",
139
139
  "@stylexjs/stylex": "^0.19.0",
140
140
  "@types/babel__core": "^7.20.5",