Repository navigation
v0.6.5
Astryx 0.6.5 — all stable @astryxdesign/* packages ship at this version.
npx astryx upgrade --from 0.6.4 --apply@astryxdesign/core
New Features
- Stop bundling translator-only descriptions with the built-in English
fallback and add compact generated string-map modules for every shipped locale. Existing rich JSON catalog exports remain unchanged. - Popover and usePopover take a
paddingprop on the spacing scale (matching Card and Stack).padding={0}paints a flush surface for content that owns its own edges, such as a list of rows or a header with a rule; the default rung (3) is unchanged.
Fixes
- Button no longer overflows narrow rows: a labelled button can shrink below its label width and truncates the label with an ellipsis, while icon-only buttons stay square
- Prevent an empty Tokenizer input from creating a blank trailing row.
- SegmentedControl's default
huglayout is now capped at its container width, and its segments shrink and truncate their labels instead of overflowing narrow cards and phone rows - SelectableCard: keep disabled cards in sequential focus navigation with aria-disabled and gated interaction handlers.
- Selector's one-line trigger matches its size token when the theme's
--spacing-5is taller than the token can hold, instead of overshooting it. - Switch: announce busy/loading states through the persistent
useAnnouncelive region and localize the announcement via@astryx.switch.loading.
@astryxdesign/cli
New Features
astryx componentaccepts several exact selectors in one call. The JSON response keeps one ordered row per selector, including missing and ambiguous components, and text mode prints every row before exiting nonzero when any lookup fails. Thecomponent()API accepts selector arrays and always returnscomponent.batchfor an array, including empty and one-item arrays. Batches accept up to 100 selectors and reject larger arrays before lookup. The public API also exports sharedBatchResponseandBatchRowtypes for typed receipts.astryx discoverbrowses integrations: the ones a project has and, through discover sources, the ones it could add, with every version and what each one adds. It searches every kind of item and filters with--type,--installed,--available, and--limit. A project sets a source asdiscoverinastryx.config, and an integration exports one as adiscovernamed export. Discover only reads: it prints the command that adds a package and never runs it. Existing--jsonfields keep their meaning. A free-text query now always lists its matches, even an exact component name, andastryx discover <package>/<Name>opens one.astryx integration verifyis the new name ofastryx integration pack --check.
The check you run before publishing an integration now has a name that says what it does.astryx integration verifypacks the package with npm, installs the tarball into a temporary app, and checks that the app sees the same components, templates, themes, docs, and codemods. It takes no flags.astryx integration pack --checkstill works as a deprecated alias: it runs the same check with the same output, JSON, and exit codes, prints a note that namesintegration verify, and shows as deprecated in help. It will be removed in a later release. TheintegrationPackCheck()API and itsintegration.pack-checkJSON response do not change. With--json, a command group given an unknown subcommand now reportsERR_UNKNOWN_SUBCOMMANDand lists its subcommands, where it used to say JSON output is not supported.
Fixes
-
Fix the CLI's topic docs and how they print.
-
astryx doctorno longer reports an integration it could not check as absent or complete (#6619) -
upgrade'sfilesChangedcounts files, not (codemod, file) pairs (#6622)
One source file that four codemods each changed was reported as four files changed, sofilesChangedmatchedtransformsAppliedand the documented meaning, "Total files changed", was not true. The human summary said the same thing: "Found 4 changes across 4 files" for one file.filesChangedis now the count of distinct files.transformsAppliedis unchanged: a code or config codemod counts once for each file it changed, and a project codemod counts once. A file that both a core codemod and an integration codemod changed counts once infilesChanged. -
A parse error prints the Astryx error format in text mode.
astryx theme list --lang zh-Hansprinted Commander's own line —error: option '--lang <locale>' argument 'zh-Hans' is invalid…— while every other CLI error printsError: ….--jsonwas already correct (ERR_INVALID_LANG), so the two modes agreed only on the exit code.Commander writes that line before any Astryx code runs, so the JSON shim — the one place that already sees every parse failure — now suppresses it and writes the Astryx line itself, from the same message, for both modes. Every parse failure is covered: unknown option, unknown command, missing argument, and an invalid value for a global option.
--helpand--versionare untouched and still exit 0. -
The CLI reference now matches what the commands do. Every
--helpends with the command's examples and aMore:line that names its full docs page. Function docs show each parameter's default, mark required parameters, list the error codes each function throws, and use examples that run. The response-type list addshelp,version, andupgrade.registry, andastryx manifestnow listsupgrade.registryforupgrade. The--zh,--dense,--lang, and--detaildescriptions name the commands they change, and command summaries say when to use each command. Whenastryx templaterefuses to overwrite a file, it now says to re-run with--overwrite(or-f). Theupgradecommand page (astryx docs cli/commands/upgrade) now explains which files codemods never edit, what happens when one of them needs a change, and how to regenerate it. -
astryx integration pack --checknow checks the tarball when aprepack,prepare, orpostpackscript prints to stdout. Before, any lifecycle output made the check fail with "npm pack produced unparseable JSON output" before it looked at the tarball. A failing lifecycle script still fails the check, and its output stays in thepack_failedmessage. -
astryx doctor integration docsfails when a namespace doc or a placement fails, as its help says.
Such a failure hides the doc from the docs tree, so it now exits 1 with aninvalid_doc_grapherror instead of a warning. A link that names no doc still only warns, since it prints as written.doctor integration docsanddoctor integration componentsalso no longer print an[ok]line after a check that failed.A mistyped subcommand under
doctornow fails and lists the subcommands the group has:astryx doctor integrationsused to run the project checks, andastryx doctor integration bogusexited 0 in text though it exited 1 with--json. -
A package that ships a theme, or a doc section with an
id, now declares the CLI that can read it.
A stable CLI before 0.7.0 rejects both: it cannot read the typed theme descriptors thatastryx integration add themewrites, and it rejects a sectionid. Either way it hides the package's themes or doc topics with no warning.astryx integration add themenow adds"@astryxdesign/cli": ">=0.7.0"topeerDependencies, marked optional, andastryx integration verifyfails withthemes_need_cliorsection_ids_need_cliwhen a package needs that peer range and does not declare it. -
astryx integration verifyresolves every public import in the packed package, not in your source folder.
Before, its temporary app resolved your package's own name through the sourcepackage.json, so anexportstarget left out of the tarball still passed. It now fails withcomponent_export_missing, as an app that installs the tarball would. -
astryx theme addandastryx theme buildnow undo a failed write completely. Before, when one file failed to write after others were written, the written files kept their new content. Now every replaced file gets its previous content back, every new file is removed, and the error names any file that could not be restored. Both commands also refuse to replace a destination that is a symbolic link. (#6852)
Other Changes
- A code block's label now prints above the block instead of as a
// labelline inside it, so copied bash, CSS, JSON, and HTML stay valid. Table cells escape|, so a union type stays in one column. astryx search dark modesearches for both words; it used to drop every word after the first. A result that matches every word of a query, one of them by name or keyword, now outranks one that matches only some, and a section whose title or heading holds the whole query ranks near the top. Topics can declare searchkeywords, now a documented ReferenceDoc field, and a namespace'skeywordsnow count too. A query keeps its phrase when common words such asmake,build, orandrop out, soastryx search make an integrationfinds the integration guides, a plural of a doc's name matches it, one step below the exact name, and a component's name typed as words, such ascommand palette, finds the component. Outside an app, where@astryxdesign/coreis not installed,astryx searchsearches the docs instead of failing, and says so;--type component,hook, ortemplatestill needs Core.- Snippets that failed when copied now work: StyleX token imports, the
fr-FR.jsonlocale path, Tailwindrounded-lg,--color-background-muted, icon and color values, and the Cursor rule path. - Claims that did not match the code are corrected: the 30 shipped locales and how RTL mirroring works, what
astryx initwrites,--detail brieffor a shorter read, the Neutral and Matcha fonts, the components that need anchor positioning,gapsteps, Card's radius, and the Next.js StyleX example. The deprecated bare classes are still emitted and will be removed in a later release. astryx docs tokenslists all 258 tokens, adding the data visualization and syntax groups, and shows both halves of everylight-dark()value.- Long sections are split, vague titles renamed, and the
--denseand Chinese versions no longer drop blocks. Eleven long section keys are shorter, such asastryx docs styling stylex-setup, and every old key still resolves. An integration section that extends a Core topic by a section's old title still replaces that section. astryx integration add codemod --tohelp says it takes the Core version whose upgrade runs the codemod.- The agent block that
astryx initwrites now saysupgrade --from <old version> --apply;upgrade --applyalone stops with "Missing required --from". - The contributor-only sections, on adding a semantic icon and on strings and text direction inside components, moved to CONTRIBUTING.md.
- An installed dependency whose
astryx.integration.*manifest cannot be loaded is still kept out of the loaded set, butimplicit-integrationsnow names it and says it contributes nothing. Before, doctor said that no installed dependency ships a manifest. The check stays informational, andastryx doctor integration validate <package>gives the details. implicit-integrationslists only the roots that exist on disk. A package whose declared roots are missing is reported as contributing nothing, with the missing roots named. Before, it listed every root the manifest declared.provider-identitysays how many loaded integrations it could not read, instead of counting only the readable ones.
Contributors
Thanks to everyone who contributed to this release:
@Geervan @imdreamrunner @josephfarina @nynexman4464 @thedjpetersen @vjeux
Full Changelog: v0.6.4...v0.6.5