@astryxdesign/cli 0.7.1-canary.ff40b78 → 0.7.2-canary.07f97c6
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 +35 -0
- package/api/build/_adapter.d.mts +1 -0
- package/api/build/_adapter.mjs +7 -0
- package/api/build/build.mjs +4 -1
- package/api/component/component.test.mjs +357 -184
- package/api/search/search.mjs +12 -0
- package/api/template/table-filter-view-tabs.test.mjs +45 -0
- package/api/theme/build/build.core-on-demand.test.mjs +113 -0
- package/api/theme/build/build.d.mts +13 -13
- package/api/theme/build/build.mjs +72 -37
- package/assets/docs/getting-started.doc.mjs +0 -10
- package/assets/docs/styling-overview.doc.mjs +54 -15
- package/assets/docs/tree/migration-setup.doc.mjs +31 -6
- package/assets/docs/tree/responsive.doc.mjs +37 -0
- package/assets/docs/tree/tailwind.doc.mjs +12 -0
- package/assets/docs/tree/tokens-and-setup.doc.mjs +3 -2
- package/assets/docs/tree/tokens-syntax.doc.mjs +20 -0
- package/assets/docs/tree/tokens.doc.mjs +1 -1
- package/assets/templates/blocks/components/CommandPalette/CommandPaletteAsyncSearch.tsx +6 -1
- package/assets/templates/blocks/components/Drawer/DrawerForm.doc.mjs +24 -0
- package/assets/templates/blocks/components/Drawer/DrawerForm.tsx +62 -0
- package/assets/templates/blocks/components/Drawer/DrawerScrim.doc.mjs +22 -0
- package/assets/templates/blocks/components/Drawer/DrawerScrim.tsx +68 -0
- package/assets/templates/blocks/components/Drawer/DrawerShowcase.doc.mjs +22 -0
- package/assets/templates/blocks/components/Drawer/DrawerShowcase.tsx +41 -0
- package/assets/templates/blocks/components/Drawer/DrawerStart.doc.mjs +21 -0
- package/assets/templates/blocks/components/Drawer/DrawerStart.tsx +41 -0
- package/assets/templates/blocks/components/Drawer/DrawerWidths.doc.mjs +22 -0
- package/assets/templates/blocks/components/Drawer/DrawerWidths.tsx +54 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderShowcase.tsx +73 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderSubtitleEndContent.doc.mjs +22 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderSubtitleEndContent.tsx +49 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderWithCloseButton.doc.mjs +21 -0
- package/assets/templates/blocks/components/DrawerHeader/DrawerHeaderWithCloseButton.tsx +42 -0
- package/assets/templates/pages/detail-page/page.tsx +3 -3
- package/assets/templates/pages/table-filter/page.tsx +3 -2
- package/assets/templates/pages/table-inbox/page.tsx +10 -8
- package/assets/templates/themes/butter/butterTheme.ts +53 -11
- package/assets/templates/themes/chocolate/chocolateTheme.ts +29 -5
- package/assets/templates/themes/gothic/gothicTheme.ts +44 -9
- package/assets/templates/themes/stone/stoneTheme.ts +58 -11
- package/assets/templates/themes/y2k/y2kTheme.ts +60 -10
- package/authoring/doctypes/base/type.ts +6 -0
- package/authoring/doctypes/component/component.doc.mjs +2 -2
- package/clients/cli/commands/build-theme.mjs +32 -4
- package/clients/cli/commands/build-theme.watch.test.mjs +63 -2
- package/clients/cli/lib/component-format.mjs +5 -1
- package/foundation/discovery/component-discovery.mjs +27 -26
- package/foundation/discovery/hook-discovery.mjs +13 -12
- package/foundation/fs/listing-cache.d.mts +36 -0
- package/foundation/fs/listing-cache.mjs +95 -0
- package/foundation/fs/listing-cache.test.mjs +88 -0
- package/foundation/fs/paths.mjs +3 -2
- package/package.json +10 -10
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
|
package/api/build/_adapter.d.mts
CHANGED
|
@@ -66,6 +66,7 @@ export function isWeightsFile(file: any): file is import("./kit/weights.mjs").We
|
|
|
66
66
|
* @returns {string[]} Setup notes (empty when the template needs nothing).
|
|
67
67
|
*/
|
|
68
68
|
export function templateSetupNotes(template: PageTemplate, cwd: string): string[];
|
|
69
|
+
export { withListingCache } from "../../foundation/fs/listing-cache.mjs";
|
|
69
70
|
/**
|
|
70
71
|
* A page template the kit can recommend starting from.
|
|
71
72
|
*/
|
package/api/build/_adapter.mjs
CHANGED
|
@@ -23,6 +23,13 @@ import {componentKeywords} from '../search/search.mjs';
|
|
|
23
23
|
import {findCoreDir} from '../../foundation/fs/paths.mjs';
|
|
24
24
|
import {analyzeTemplateNeeds} from '../../foundation/discovery/template-needs.mjs';
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Runs one build with a single directory listing per path: the kit resolves
|
|
28
|
+
* every candidate's source and docs by walking the same tree, which does not
|
|
29
|
+
* change during the call.
|
|
30
|
+
*/
|
|
31
|
+
export {withListingCache} from '../../foundation/fs/listing-cache.mjs';
|
|
32
|
+
|
|
26
33
|
/**
|
|
27
34
|
* A page template the kit can recommend starting from.
|
|
28
35
|
* @typedef {object} PageTemplate
|
package/api/build/build.mjs
CHANGED
|
@@ -17,6 +17,7 @@ import {AstryxError} from '../error.mjs';
|
|
|
17
17
|
import {ERROR_CODES} from '../../foundation/response/error-codes.mjs';
|
|
18
18
|
import {buildHelp} from './help/help.mjs';
|
|
19
19
|
import {buildKit} from './kit/kit.mjs';
|
|
20
|
+
import {withListingCache} from './_adapter.mjs';
|
|
20
21
|
|
|
21
22
|
// Barrel: surface the leaves alongside the dispatcher for the fractal shape.
|
|
22
23
|
export {buildHelp, buildKit};
|
|
@@ -40,5 +41,7 @@ export async function build(query, options = {}) {
|
|
|
40
41
|
ERROR_CODES.ERR_INVALID_ARGUMENT,
|
|
41
42
|
);
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
+
// The kit resolves every candidate's source and docs by walking the same
|
|
45
|
+
// tree; read each directory once for this call.
|
|
46
|
+
return withListingCache(() => buildKit(query, options));
|
|
44
47
|
}
|