@astryxdesign/cli 0.6.5-canary.eb0010b → 0.6.5-canary.efac39f
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/theme/build/build.icon-lineage.test.mjs +117 -0
- package/api/theme/build/build.icon-preservation.test.mjs +639 -0
- package/api/theme/build/build.mjs +146 -69
- package/api/theme/build/build.test.mjs +190 -1
- package/api/theme/build/icon-imports.d.mts +47 -0
- package/api/theme/build/icon-imports.mjs +691 -0
- package/api/theme/themeBuild.doc.d.mts +4 -1
- package/api/theme/themeBuild.doc.mjs +14 -3
- package/foundation/doc-compiler/doc-loads.test.mjs +1 -1
- package/package.json +9 -9
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file FunctionDoc for `themeBuild()` / `astryx theme build`. Colocated with
|
|
5
5
|
* the API function it documents; the response-shape source of truth stays in
|
|
6
|
-
* `theme.type.mjs`.
|
|
6
|
+
* `theme.type.mjs`. Documents imported/inherited icons and atomic rejection
|
|
7
|
+
* of registries that cannot be preserved in build/check modes.
|
|
8
|
+
* @input themeBuild's build/check and icon-import behavior.
|
|
9
|
+
* @output Consumer API documentation for generated theme artifacts.
|
|
7
10
|
* @position packages/cli/api/theme — function documentation
|
|
8
11
|
*/
|
|
9
12
|
|
|
@@ -21,6 +24,14 @@ export const doc = {
|
|
|
21
24
|
'writes a scoped CSS file, a JS module that re-exports the built theme, and a .d.ts ' +
|
|
22
25
|
'(plus an optional .variants.d.ts when the theme adds custom prop values). It uses ' +
|
|
23
26
|
"@astryxdesign/core's own generator, so the CSS matches what the <Theme> runtime emits. " +
|
|
27
|
+
'When another build step emits the icon registry, ' +
|
|
28
|
+
'{iconsSpecifier} declares the fully specified module path for the generated JS import. ' +
|
|
29
|
+
'Real registry imports are preserved, including aliases, default imports, and namespace ' +
|
|
30
|
+
'imports. Icons inherited through extends are retained, with child entries taking precedence. ' +
|
|
31
|
+
'Comment and string contents do not affect import detection. ' +
|
|
32
|
+
'An inline registry that cannot be preserved fails with ERR_THEME_INVALID before any ' +
|
|
33
|
+
'output is written, including in check mode. Move the registry to its own module and ' +
|
|
34
|
+
'import it into the theme file. ' +
|
|
24
35
|
'With {check: true} it writes nothing and instead compares ' +
|
|
25
36
|
'each output against disk, returning the drift: the CI guard for committed, generated theme CSS.',
|
|
26
37
|
importPath: '@astryxdesign/cli/api',
|
|
@@ -60,7 +71,7 @@ export const doc = {
|
|
|
60
71
|
name: 'options.iconsSpecifier',
|
|
61
72
|
type: 'string',
|
|
62
73
|
description:
|
|
63
|
-
'Override the import specifier
|
|
74
|
+
'Override the selected icon-registry import specifier in the generated JS module, for example ./icons.mjs. With child and inherited registries, this changes the child registry import. When omitted, direct source specifiers are preserved; relative imports followed through a local base are rebased to the theme file. A registry inherited through a package theme must be imported directly to use this option.',
|
|
64
75
|
},
|
|
65
76
|
{
|
|
66
77
|
name: 'ctx.cwd',
|
|
@@ -90,7 +101,7 @@ export const doc = {
|
|
|
90
101
|
},
|
|
91
102
|
{
|
|
92
103
|
code: 'ERR_THEME_INVALID',
|
|
93
|
-
when: 'the resolved theme is invalid, for example it has no name,
|
|
104
|
+
when: 'the resolved theme is invalid, for example it has no name, a custom Heading type has no standalone rule with a declaration the compiler can emit, or its icon registry cannot be preserved through an import (also rejected in check mode)',
|
|
94
105
|
},
|
|
95
106
|
{
|
|
96
107
|
code: 'ERR_PATH_TRAVERSAL',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.6.5-canary.
|
|
3
|
+
"version": "0.6.5-canary.efac39f",
|
|
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",
|
|
@@ -101,10 +101,10 @@
|
|
|
101
101
|
"zod": "^4.4.3"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
|
-
"@astryxdesign/charts": "0.6.5-canary.
|
|
105
|
-
"@astryxdesign/core": "0.6.5-canary.
|
|
106
|
-
"@astryxdesign/lab": "0.6.5-canary.
|
|
107
|
-
"@astryxdesign/theme-neutral": "0.6.5-canary.
|
|
104
|
+
"@astryxdesign/charts": "0.6.5-canary.efac39f",
|
|
105
|
+
"@astryxdesign/core": "0.6.5-canary.efac39f",
|
|
106
|
+
"@astryxdesign/lab": "0.6.5-canary.efac39f",
|
|
107
|
+
"@astryxdesign/theme-neutral": "0.6.5-canary.efac39f"
|
|
108
108
|
},
|
|
109
109
|
"peerDependenciesMeta": {
|
|
110
110
|
"@astryxdesign/charts": {
|
|
@@ -121,10 +121,10 @@
|
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
|
-
"@astryxdesign/charts": "0.6.5-canary.
|
|
125
|
-
"@astryxdesign/core": "0.6.5-canary.
|
|
126
|
-
"@astryxdesign/lab": "0.6.5-canary.
|
|
127
|
-
"@astryxdesign/theme-neutral": "0.6.5-canary.
|
|
124
|
+
"@astryxdesign/charts": "0.6.5-canary.efac39f",
|
|
125
|
+
"@astryxdesign/core": "0.6.5-canary.efac39f",
|
|
126
|
+
"@astryxdesign/lab": "0.6.5-canary.efac39f",
|
|
127
|
+
"@astryxdesign/theme-neutral": "0.6.5-canary.efac39f",
|
|
128
128
|
"@heroicons/react": "^2.2.0",
|
|
129
129
|
"@stylexjs/stylex": "^0.19.0",
|
|
130
130
|
"@types/babel__core": "^7.20.5",
|