@astryxdesign/cli 0.7.1-canary.fe8cad0 → 0.7.1
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @xds/cli
|
|
2
2
|
|
|
3
|
+
# 0.7.1
|
|
4
|
+
|
|
5
|
+
#### Fixes
|
|
6
|
+
|
|
7
|
+
- `CommandPaletteInput` now exposes the semantics and name that its visible state promises. (#7321)
|
|
8
|
+
- A standalone field with no popup attributes was `role="combobox"` with `aria-expanded="true"` and `aria-autocomplete="list"`; it is now `role="searchbox"` with no popup state. Pass `role="combobox"`, or your popup's own ARIA attributes, to keep the old semantics. A field that already passes popup attributes (`aria-expanded`, `aria-controls`, `aria-owns`, `aria-haspopup`, and the like) stays a `combobox` and keeps them, and a field inside `CommandPalette` is unchanged.
|
|
9
|
+
|
|
10
|
+
- The field's default accessible name was its placeholder (`Search…`, or the caller's `placeholder`); it is now `Search commands`, translated. Pass `label` to keep a specific name, for example `label="Search…"` for the old default. A caller whose custom `placeholder` served as the name keeps working code and hears the generic name until it passes `label`.
|
|
11
|
+
|
|
12
|
+
- The CLI's async-search CommandPalette block names its field `Search files`.
|
|
13
|
+
|
|
14
|
+
- `endContent={true}` no longer renders an empty trailing slot, and `endContent={0}` renders inside the trailing slot instead of after it.
|
|
15
|
+
- Stone, Y2K, and Gothic set `CodeBlock`'s diff row slots in their own syntax palettes, so a reader of a diff on those themes gets added and removed rows whose code, line numbers, and `+`/`-` glyphs stay readable: every syntax token keeps at least 4.5:1 on the tinted rows in Stone (light and dark) and Y2K (light and dark), and in Gothic the rows take a deep green and a deep red at the background's own luminance, so every token keeps the contrast it has on the plain background. Line numbers and glyphs on changed rows use each theme's own green and red. The CLI's bundled copies of the three themes (`astryx theme eject`) carry the same palettes. (#7428)
|
|
16
|
+
- A `secondary` Selector, MultiSelector, or ComplexSelector now matches the theme's secondary Button: under butter, chocolate, gothic, stone, and y2k it takes that Button's border, fill, text color, and hover instead of the default borderless neutral fill, so a toolbar mixing secondary buttons and selectors reads as one set of controls. Disabled and read-only triggers keep a still fill on hover, as a disabled Button does, and a Selector or MultiSelector inside an InputGroup keeps the group's neutral fill and edges. The default theme is unchanged, the selector docs now say `secondary` follows the theme's secondary Button, and themes added with the CLI get the same parity. (#7548)
|
|
17
|
+
- `astryx theme build --watch` stops as soon as it is interrupted (Ctrl-C or SIGTERM). A change saved while a rebuild was running no longer starts another rebuild after "Stopped watching.", and a rebuild in progress stops with the watcher instead of keeping the process alive. (#7508)
|
|
18
|
+
|
|
19
|
+
#### Performance
|
|
20
|
+
|
|
21
|
+
- `astryx search` and `astryx build`, and the `search` and `build` API functions, read each source directory once per call instead of once per candidate. Results are unchanged. A warm `search` drops from about 1.9 s to 0.4 s on macOS. (#7421)
|
|
22
|
+
|
|
23
|
+
#### Documentation
|
|
24
|
+
|
|
25
|
+
- The generated token docs list the five diff row slots of the syntax vocabulary — `--color-syntax-added`, `--color-syntax-removed`, `--color-syntax-diff-header`, `--color-syntax-added-marker`, `--color-syntax-removed-marker` — with their defaults, so `astryx docs tokens` describes nineteen syntax slots. (#7389)
|
|
26
|
+
- The Tailwind and migration setup docs now say that `globals.css` (or a `layers.css` holding only the `@layer` line) must be the first import in the root layout or app entry, before the `astryx-themes` module or any component that imports theme CSS; otherwise Tailwind preflight overrides Astryx base styles and theme overrides lose. The Tailwind v3 coexistence snippet moves its `@layer` line into a `layers.css` imported first, because Next.js (webpack or Turbopack) hoists CSS imports above an inline `@layer` line. (#7534)
|
|
27
|
+
- Grid's `columns` docs now lead with the shape that reflows: a numeric `columns` is exactly N columns at every width and never reflows, and `columns={{minWidth, max}}` is the form for columns that must survive a phone. The `astryx docs layout/responsive` topic gains a "Columns that reflow" section with a reflowing stat row beside a fixed week row. No behavior changes. (#7340)
|
|
28
|
+
- The styling setup docs now load the prebuilt stylesheets on every path. The "StyleX from source" path becomes "StyleX for your own code": it keeps `astryx.css` and points the StyleX compiler at your own and swizzled source only. A new "Other Astryx packages" section lists each package's stylesheet (`richtext.css`, `lab.css`, `charts.css`) and where to import it. Getting started no longer lists the two example setups that compile Astryx source; the remaining examples all load `astryx.css`. (#7587)
|
|
29
|
+
|
|
30
|
+
#### Contributors
|
|
31
|
+
|
|
32
|
+
Thanks to everyone who contributed to this release:
|
|
33
|
+
|
|
34
|
+
- @cixzhang
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
3
38
|
# 0.7.0
|
|
4
39
|
|
|
5
40
|
#### Breaking Changes
|
|
@@ -185,16 +185,6 @@ const overrides = stylex.create({
|
|
|
185
185
|
'Next.js + Tailwind bridge',
|
|
186
186
|
'[apps/example-nextjs-tailwind](https://github.com/facebook/astryx/tree/main/apps/example-nextjs-tailwind)',
|
|
187
187
|
],
|
|
188
|
-
[
|
|
189
|
-
'Next.js Source',
|
|
190
|
-
'Next.js importing from source',
|
|
191
|
-
'[apps/example-nextjs-source](https://github.com/facebook/astryx/tree/main/apps/example-nextjs-source)',
|
|
192
|
-
],
|
|
193
|
-
[
|
|
194
|
-
'Vite',
|
|
195
|
-
'Vite',
|
|
196
|
-
'[apps/example-vite](https://github.com/facebook/astryx/tree/main/apps/example-vite)',
|
|
197
|
-
],
|
|
198
188
|
[
|
|
199
189
|
'Vite + Tailwind',
|
|
200
190
|
'Vite + Tailwind bridge',
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* @file `astryx docs styling-overview`
|
|
5
5
|
*
|
|
6
6
|
* One question: "How do I set up CSS?"
|
|
7
|
-
* Three paths, each with its exact imports.
|
|
7
|
+
* Three paths, each with its exact imports. Every path loads the prebuilt
|
|
8
|
+
* stylesheets (spec:AST-080 FR5); none compiles Astryx package source.
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
|
|
@@ -14,7 +15,7 @@ export const docs = {
|
|
|
14
15
|
title: 'Styling overview',
|
|
15
16
|
category: 'guide',
|
|
16
17
|
description:
|
|
17
|
-
'How to set up CSS — exact imports for three paths: plain, Tailwind, and StyleX
|
|
18
|
+
'How to set up CSS — exact imports for three paths: plain, Tailwind, and StyleX for your own code — plus the stylesheet each Astryx package ships.',
|
|
18
19
|
keywords: [
|
|
19
20
|
'styling',
|
|
20
21
|
'CSS',
|
|
@@ -46,15 +47,15 @@ export const docs = {
|
|
|
46
47
|
"None beyond Tailwind's own.",
|
|
47
48
|
],
|
|
48
49
|
[
|
|
49
|
-
'StyleX
|
|
50
|
-
'
|
|
51
|
-
'Yes \u2014 a StyleX
|
|
50
|
+
'StyleX for your own code',
|
|
51
|
+
'Your own `stylex.create()` styles and swizzled (ejected) components. Astryx itself stays prebuilt.',
|
|
52
|
+
'Yes \u2014 a StyleX plugin for your own code.',
|
|
52
53
|
],
|
|
53
54
|
],
|
|
54
55
|
},
|
|
55
56
|
{
|
|
56
57
|
type: 'prose',
|
|
57
|
-
text: 'All three resolve to the same design tokens and support theming and dark mode. You can mix them in one app.',
|
|
58
|
+
text: 'All three load the same prebuilt Astryx stylesheets, resolve to the same design tokens, and support theming and dark mode. None of them compiles Astryx package source. You can mix them in one app.',
|
|
58
59
|
},
|
|
59
60
|
],
|
|
60
61
|
},
|
|
@@ -117,12 +118,12 @@ export const docs = {
|
|
|
117
118
|
],
|
|
118
119
|
},
|
|
119
120
|
{
|
|
120
|
-
id: 'stylex-
|
|
121
|
-
title: 'StyleX
|
|
121
|
+
id: 'stylex-own-code',
|
|
122
|
+
title: 'StyleX for your own code',
|
|
122
123
|
content: [
|
|
123
124
|
{
|
|
124
125
|
type: 'prose',
|
|
125
|
-
text: 'Only needed when you swizzle a component (`astryx swizzle <Component>`)
|
|
126
|
+
text: 'Only needed when you write your own StyleX (`stylex.create()`) or swizzle a component (`astryx swizzle <Component>`), which copies its StyleX source into your app. The plain path already supports `xstyle` overrides \u2014 this path is for your own StyleX code. Some built-in page templates also use StyleX for layout; if you scaffold one and see "Unexpected stylex.create call at runtime", add the compiler plugin for your bundler below.',
|
|
126
127
|
},
|
|
127
128
|
{
|
|
128
129
|
type: 'code',
|
|
@@ -134,14 +135,13 @@ export const docs = {
|
|
|
134
135
|
type: 'code',
|
|
135
136
|
lang: 'css',
|
|
136
137
|
label: 'globals.css',
|
|
137
|
-
code: `@
|
|
138
|
-
|
|
139
|
-
@import "@astryxdesign/core/reset.css";
|
|
138
|
+
code: `@import "@astryxdesign/core/reset.css";
|
|
139
|
+
@import "@astryxdesign/core/astryx.css";
|
|
140
140
|
@import "@astryxdesign/theme-neutral/theme.css";`,
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
type: 'prose',
|
|
144
|
-
text: '
|
|
144
|
+
text: 'Keep `astryx.css`: Astryx component styles always come from the prebuilt stylesheets. Point the StyleX compiler at your own source only, never at `node_modules/@astryxdesign`. Add the plugin for your bundler:',
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
type: 'table',
|
|
@@ -149,7 +149,10 @@ export const docs = {
|
|
|
149
149
|
rows: [
|
|
150
150
|
['Webpack', '@stylexjs/webpack-plugin'],
|
|
151
151
|
['Vite / Rollup', '@stylexjs/rollup-plugin'],
|
|
152
|
-
[
|
|
152
|
+
[
|
|
153
|
+
'Babel (any)',
|
|
154
|
+
'@stylexjs/babel-plugin + @stylexjs/postcss-plugin',
|
|
155
|
+
],
|
|
153
156
|
['Next.js (keep next/font)', '@stylexswc/nextjs-plugin'],
|
|
154
157
|
],
|
|
155
158
|
},
|
|
@@ -159,6 +162,37 @@ export const docs = {
|
|
|
159
162
|
},
|
|
160
163
|
],
|
|
161
164
|
},
|
|
165
|
+
{
|
|
166
|
+
id: 'other-packages',
|
|
167
|
+
title: 'Other Astryx packages',
|
|
168
|
+
content: [
|
|
169
|
+
{
|
|
170
|
+
type: 'prose',
|
|
171
|
+
text: 'Every Astryx package whose components carry styles ships its own prebuilt stylesheet. Import it after `astryx.css` for each package you use. All of them place their rules in the same `astryx-base` layer, so your theme overrides win over every package.',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
type: 'code',
|
|
175
|
+
lang: 'css',
|
|
176
|
+
label: 'globals.css',
|
|
177
|
+
code: `@import "@astryxdesign/core/reset.css";
|
|
178
|
+
@import "@astryxdesign/core/astryx.css";
|
|
179
|
+
@import "@astryxdesign/richtext/richtext.css"; /* Rich Text */
|
|
180
|
+
@import "@astryxdesign/lab/lab.css"; /* Lab */
|
|
181
|
+
@import "@astryxdesign/charts/charts.css"; /* Charts */
|
|
182
|
+
@import "@astryxdesign/theme-neutral/theme.css";`,
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
type: 'table',
|
|
186
|
+
headers: ['Package', 'Stylesheet'],
|
|
187
|
+
rows: [
|
|
188
|
+
['@astryxdesign/core', '@astryxdesign/core/astryx.css'],
|
|
189
|
+
['@astryxdesign/richtext', '@astryxdesign/richtext/richtext.css'],
|
|
190
|
+
['@astryxdesign/lab', '@astryxdesign/lab/lab.css'],
|
|
191
|
+
['@astryxdesign/charts', '@astryxdesign/charts/charts.css'],
|
|
192
|
+
],
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
},
|
|
162
196
|
{
|
|
163
197
|
id: 'what-each-file-does',
|
|
164
198
|
title: 'What each import does',
|
|
@@ -175,7 +209,12 @@ export const docs = {
|
|
|
175
209
|
[
|
|
176
210
|
'astryx.css',
|
|
177
211
|
'astryx-base',
|
|
178
|
-
'
|
|
212
|
+
'Prebuilt component styles. Required on every path.',
|
|
213
|
+
],
|
|
214
|
+
[
|
|
215
|
+
'richtext.css, lab.css, charts.css',
|
|
216
|
+
'astryx-base',
|
|
217
|
+
'Prebuilt styles for each other Astryx package you use. Load after astryx.css.',
|
|
179
218
|
],
|
|
180
219
|
[
|
|
181
220
|
'theme.css',
|
|
@@ -77,7 +77,7 @@ const styles = stylex.create({
|
|
|
77
77
|
content: [
|
|
78
78
|
{
|
|
79
79
|
type: 'prose',
|
|
80
|
-
text: 'Astryx components ship pre-compiled, so consuming the published
|
|
80
|
+
text: 'Astryx components ship pre-compiled: `astryx.css` and each package\'s own stylesheet hold all of their styles, so consuming the published packages needs no StyleX setup. But `astryx swizzle <Component>` copies the raw StyleX *source* into your app, and StyleX source requires a build-time StyleX compiler to produce atomic CSS. Without one the component compiles but renders completely unstyled: no error, no warning. If a swizzled component looks unstyled, a missing StyleX compiler is almost always why. The same applies if you author your own StyleX with `stylex.create()`.',
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
type: 'table',
|
|
@@ -105,7 +105,7 @@ const styles = stylex.create({
|
|
|
105
105
|
|
|
106
106
|
export default stylexPlugin({
|
|
107
107
|
rsOptions: {
|
|
108
|
-
// Resolve
|
|
108
|
+
// Resolve the Astryx token modules that swizzled source imports.
|
|
109
109
|
aliases: {'@/*': ['./src/*']},
|
|
110
110
|
unstable_moduleResolution: {type: 'commonJS'},
|
|
111
111
|
},
|
|
@@ -120,6 +120,7 @@ export default stylexPlugin({
|
|
|
120
120
|
'Symptom of a missing compiler: swizzled component renders with no styles, but no build or runtime error.',
|
|
121
121
|
'A Babel config turns off SWC in Next.js; skip it if you need `next/font`.',
|
|
122
122
|
'Pure theming (defineTheme + astryx theme build) needs NO StyleX compiler; only swizzled/authored StyleX source does.',
|
|
123
|
+
'Keep loading `astryx.css` with a StyleX compiler in place. The compiler builds your own and swizzled source only; never add `node_modules/@astryxdesign` to its inputs.',
|
|
123
124
|
],
|
|
124
125
|
},
|
|
125
126
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.7.1
|
|
3
|
+
"version": "0.7.1",
|
|
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": "
|
|
105
|
-
"@astryxdesign/core": "
|
|
106
|
-
"@astryxdesign/lab": "
|
|
107
|
-
"@astryxdesign/theme-neutral": "
|
|
104
|
+
"@astryxdesign/charts": "*",
|
|
105
|
+
"@astryxdesign/core": "*",
|
|
106
|
+
"@astryxdesign/lab": "*",
|
|
107
|
+
"@astryxdesign/theme-neutral": "*"
|
|
108
108
|
},
|
|
109
109
|
"peerDependenciesMeta": {
|
|
110
110
|
"@astryxdesign/charts": {
|
|
@@ -121,10 +121,10 @@
|
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
|
-
"@astryxdesign/charts": "
|
|
125
|
-
"@astryxdesign/core": "
|
|
126
|
-
"@astryxdesign/lab": "
|
|
127
|
-
"@astryxdesign/theme-neutral": "
|
|
124
|
+
"@astryxdesign/charts": "*",
|
|
125
|
+
"@astryxdesign/core": "*",
|
|
126
|
+
"@astryxdesign/lab": "*",
|
|
127
|
+
"@astryxdesign/theme-neutral": "*",
|
|
128
128
|
"@heroicons/react": "^2.2.0",
|
|
129
129
|
"@stylexjs/stylex": "^0.19.0",
|
|
130
130
|
"@types/babel__core": "^7.20.5",
|