What's New
Release notes and changelog for all packages.0.7.1
Fixes
CommandPaletteInputnow exposes the semantics and name that its visible state promises. (#7321)- A standalone field with no popup attributes was
role="combobox"witharia-expanded="true"andaria-autocomplete="list"; it is nowrole="searchbox"with no popup state. Passrole="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 acomboboxand keeps them, and a field insideCommandPaletteis unchanged. - The field's default accessible name was its placeholder (
Search…, or the caller'splaceholder); it is nowSearch commands, translated. Passlabelto keep a specific name, for examplelabel="Search…"for the old default. A caller whose customplaceholderserved as the name keeps working code and hears the generic name until it passeslabel. - The CLI's async-search CommandPalette block names its field
Search files. endContent={true}no longer renders an empty trailing slot, andendContent={0}renders inside the trailing slot instead of after it.
- A standalone field with no popup attributes was
- 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) - A
secondarySelector, 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 saysecondaryfollows the theme's secondary Button, and themes added with the CLI get the same parity. (#7548) astryx theme build --watchstops 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)
Performance
astryx searchandastryx build, and thesearchandbuildAPI functions, read each source directory once per call instead of once per candidate. Results are unchanged. A warmsearchdrops from about 1.9 s to 0.4 s on macOS. (#7421)
Documentation
- 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, soastryx docs tokensdescribes nineteen syntax slots. (#7389) - The Tailwind and migration setup docs now say that
globals.css(or alayers.cssholding only the@layerline) must be the first import in the root layout or app entry, before theastryx-themesmodule 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@layerline into alayers.cssimported first, because Next.js (webpack or Turbopack) hoists CSS imports above an inline@layerline. (#7534) - Grid's
columnsdocs now lead with the shape that reflows: a numericcolumnsis exactly N columns at every width and never reflows, andcolumns={{minWidth, max}}is the form for columns that must survive a phone. Theastryx docs layout/responsivetopic gains a "Columns that reflow" section with a reflowing stat row beside a fixed week row. No behavior changes. (#7340) - 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.cssand 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 loadastryx.css. (#7587)
Contributors
Thanks to everyone who contributed to this release:
0.7.0
Breaking Changes
theme addnow imports built themes; usetheme ejectto copy theme source. (#7138) The old contract copied theme source withtheme add <slug> [path] [--overwrite] [--package <package>]and returnedtheme.addJSON. TheThemeAddResponsetype and thetheme.addresponse type are removed, with theirThemeAddResponse.type,ThemeAddResponse.data, andThemeAddResponse.metafields. The replacement imports the built theme withtheme add <slug> [--package <package>]and returnstheme.app;--importremains an accepted no-op. Plaintheme addnow returnstheme.appwith the ownerpackagedirectly aftertype. Local themes carry no package.A path aftertheme addnow exits 1 withERR_INVALID_ARGUMENT, and--overwriteexits 1 withERR_INVALID_OPTION; neither writes files. To migrate a script that copied source, runtheme ejectwith the same slug, path,--overwrite, and--packagearguments. A script that already runstheme add --importkeeps the same meaning and needs no change.init --remove-agentssays when there was nothing to remove. (#6623) Migration: a consumer readingdata.removedas a boolean keeps working; a consumer that narrowed on the literaltruemust accept the corrected value.- Four commands refuse silently ignored option pairs. (#7132) Migration: remove the option the command was ignoring.
- Refuse invalid input that used to silently succeed. (#7149)
Migration: pass a valid type or package, an integer limit, or the documented arguments, and catch
ERR_AMBIGUOUS_COMPONENTfor a multi-package name. - An empty-string argument no longer discards the rest of the command. (#6620) Migration: remove the empty string from the invocation; omit the argument to list.
doctor integration validateexits 1 when there is no package.json. (#7150) A missing package.json now produces ano_packageerror, so the existing error-severity exit rule applies. A directory with package.json but no integration manifest still exits 0.Migration: run the command in a directory that has apackage.json, or handle exit 1 for that case.- Move canonical data-color defaults from generated theme CSS to the public StyleX
dataVarsgroup. (#6834) ImportdataVarsfrom@astryxdesign/core/theme/dataTokens.stylexfor CSS-capable code. Canvas and other non-CSS APIs continue to useresolveThemeToken()oruseTheme().token(). Rebuild committed theme CSS withastryx theme build; concrete themes now emit only explicitly authored data-color overrides.Old usage: Generated theme CSS owned the canonical--color-data-*root defaults.Replacement: The public StyleXdataVarsgroup in@astryxdesign/core/theme/dataTokens.stylexowns the defaults; concrete themes emit only explicitly authored data-color overrides.Migration: ImportdataVarsfrom@astryxdesign/core/theme/dataTokens.stylexfor CSS-capable code. Canvas and other non-CSS APIs continue to useresolveThemeToken()oruseTheme().token(). Rebuild committed theme CSS withastryx theme build.Codemod:astryx upgraderunsvalidate-data-token-ownership, which rewrites nothing and reports fallback-lessvar(--color-data-*)uses (whole or embedded source strings, and stylesheets) and stale generated theme CSS for manual migration. - Doctor fails when the CLI cannot load what astryx.config asks for (#7130) A new
configured-integrationscheck fails when an integration named in astryx.config cannot be loaded: not installed, installed without a manifest, or a manifest that throws or fails its schema. Such an integration is withdrawn whole and contributes nothing. The config check fails, instead of warning, when astryx.config imports but the CLI cannot load the project from it.Unchanged: a problem inside one contribution kind (an invalid component doc, a missing or unreadable root, or an unresolved replacement) stays a warning underintegration-issues, and an autolinked dependency that cannot be loaded stays informational.No codemod applies: nothing in a project's source changes; install the integration, repair its manifest, or editintegrationsin astryx.config.What counts as configured is every name astryx.config lists, including a package set aside for a provider conflict and the package being authored when its own config names it. Migration: install the integration, fix its manifest, or remove it fromintegrations; fix the astryx.config field the message names. - Typeahead, Tokenizer, CheckboxList, RadioList, and Slider no longer accept root
xstyle,className, orstyle. Style the field withcontainerXstyle/containerClassName/containerStyle(the Field box; no effect inside InputGroup or ahorizontal-labelsFormLayout) and the visual control box withcontrolXstyle/controlClassName/controlStyle. Base props now reach the primary semantic control: the combobox input for Typeahead and Tokenizer, therole="group"/role="radiogroup"element for CheckboxList and RadioList, and therole="slider"thumb for Slider (therole="group"control in range mode). A calleraria-describedbyis kept alongside the field's own description and status, on these components and on TextInput, TextArea, and NumberInput, which previously dropped it. CLI templates use the new props. (#7339) Migration: rename rootxstyle/className/styleto the part they styled before:containerXstyle/containerClassName/containerStyleon all five components, except a Typeahead inside InputGroup, whose root styling painted the control surface and moves tocontrolXstyle/controlClassName/controlStyle. The release'sastryx upgradecodemod,migrate-field-input-styling, performs these renames on JSX usage.Not rewritten by the codemod, so update by hand:refandid, plusdata-*(except Typeahead and Tokenizerdata-testid, which marked the control surface),aria-*, and DOM event handlers such asonClick, previously landed on the outer Field (or were dropped by RadioList and Slider). They now land on the primary semantic control. Update code that measured, queried, or listened on the outer field, and wrap the component in your own element when you need an outer boundary.- Typeahead and Tokenizer refs are now
HTMLInputElement. - A consumer
onKeyDownon Typeahead or Tokenizer still runs after the built-in key handling, cannot cancel it, and still fires for keys on the clear button and tokens; for keys on the input it now runs on the combobox input itself. - RadioList and Slider used to drop DOM event handlers; they now run after the component's own handling, so a Slider
onPointerDown,onKeyDown,onFocus, oronBlurthat never fired before now fires (on the thumb, or on the group in range mode). - Tokenizer's
onFocus/onBlurkeep their meaning: focus entering or leaving the field. - Styling passed through a wrapper's own props or a spread is not rewritten and now fails type-checking at that callsite.
Untyped callers get a development warning and the value is ignored.From #5656 by @harjothkhara. - Selector, MultiSelector, and ComplexSelector no longer accept root
xstyle,className, orstyle. Style the field withcontainerXstyle/containerClassName/containerStyle(the Field box; no effect inside InputGroup, ahorizontal-labelsFormLayout, or withrenderTrigger) and the visual control box withcontrolXstyle/controlClassName/controlStyle. Base props such asref,id,data-*(includingdata-testid),aria-*, and DOM handlers reach the trigger button that carries the combobox role (or, withrenderTrigger, the caller's control), and a calleraria-describedbyis kept alongside the field's own description and status instead of being replaced. Handlers keep their existing order: a ComplexSelectoronClickon its own trigger can still cancel opening, and newly forwarded handlers (including those reaching arenderTriggercontrol) run after the built-in toggle and keyboard handling. CLI templates use the new props. (#7341) Migration: rename rootxstyle/className/styleon these components tocontrolXstyle/controlClassName/controlStyle, which style the same element as before. Not a rename: adata-testidor other base prop now lands on the trigger button rather than the bordered box around it (query the box with.closest()if a test measured it), and withrenderTriggerbase props andrefnow reach the caller's control. Rename JSX usage by hand, or runastryx upgrade; it runsmigrate-field-input-styling, which does not follow styling passed through a wrapper's own props or a spread, which now fails type-checking at that callsite, so rename it there. Untyped callers get a development warning and the value is ignored.From #5656 by @harjothkhara. - TextInput, TextArea, NumberInput, and FileInput no longer accept root
xstyle,className, orstyle. Style the field withcontainerXstyle/containerClassName/containerStyle(the Field box; no effect inside InputGroup or ahorizontal-labelsFormLayout) and the visual control box withcontrolXstyle/controlClassName/controlStyle. Base props such asref,id,data-*,aria-*, and DOM handlers reach the native control, and a calleridis now honored there. CLI templates use the new props. (#7336) Migration: rename rootxstyle/className/styleon these components tocontrolXstyle/controlClassName/controlStyle, which style the same element as before.astryx upgraderewrites JSX usage; styling passed through a wrapper's own props or a spread is not rewritten and now fails type-checking at that callsite, so rename it there. Untyped callers get a development warning and the value is ignored. Not rewritten by the codemod: a calleridused to be replaced by a generated one and now reaches the native control (the label stays associated), so remove anidyou passed but relied on being ignored. Other base props already reached the native control and are unchanged.From #5656 by @harjothkhara. - matcha's and y2k's spacing steps are rem (
--spacing-2: 0.75rem), so their gaps and padding follow the reader's root font size like the core scale. Every step is the same pixel value at the default 16px root; a reader with a larger root font size now sees proportionally larger spacing on these themes. The CLI's copies of both theme templates and the annotated theme template's spacing example change the same way. (#7374) Migration: nothing to change to take the new behaviour. To keep fixed pixel spacing on one of these themes, extend it and override the steps in px, which is honoured as written:defineTheme({name: 'app', extends: matchaTheme, tokens: {'--spacing-2': '12px'}}). - On touch devices narrower than the
lgbreakpoint ((width < 1024px) and (pointer: coarse)), the 14px-base first-party themes now floor their type base to 16px and re-derive the ratio so Display 1 keeps its desktop size: neutral and chocolate (base 14, ratio 1.2 → 1.1736) and butter and stone (base 14, ratio 1.25 → 1.2225). On phones, body, label and code text rise from 14px to 16px; supporting text, the headings and Display 2 and 3 grow by 1–2px; only Display 1 holds its desktop size. Desktop sizes are unchanged. gothic, matcha and y2k already use a 16px base and need no rule. The CLI's theme templates carry the same rule, so a newly scaffolded theme gets it too. (#6699) An app theme that extends one of these four themes and sets its owntypography.scaleor type-size tokens inherits this rule, and on touch + narrow screens the rule replaces those values (a base-18 child drops to a 16px body and a 42px Display 1). Append your own rule for the same condition with the values you want; a later rule for the same condition wins.Migration: nothing to change to take the new phone scale. To keep the previous 14px phone scale in an app, extend the theme and append a later rule for the same condition:defineTheme({name: 'app', extends: neutralTheme, adaptations: {rules: [{when: {pointer: 'coarse', width: {below: 'lg'}}, value: {typography: {scale: {base: 14, ratio: 1.2}}}}]}}). For butter and stone useratio: 1.25and also settokens: {'--text-supporting-size': '12px'}in that rule's value, because those themes pin supporting text at 12px rather than the 11px the scale alone gives. This cannot be rewritten by a codemod: whether an app wants the floor is a product choice. - Stop reading the Astryx-owned agent variables ASTRYX_AGENT_ID, ASTRYX_AGENT_SESSION_ID, and ASTRYX_AGENT_METADATA (#7127) The theme-import change already stopped reading
ASTRYX_THEME; these three were the last Astryx-owned agent variables. A test now fails on anyprocess.env.ASTRYX_*read in the CLI source.Migration: setAGENTandAGENT_SESSION_ID, which the CLI already reads, instead of the Astryx-prefixed variants.ASTRYX_AGENT_METADATAhas no replacement variable. - Remove the deprecated component-theming compatibility surface scheduled for 0.7.0. Components now emit only canonical target classes and reflected
data-*prop/state selectors. Theme discovery and build output no longer expose deprecated targets, andThemePropsOptionsplusComponentThemingTarget.deprecatedForare removed. Thetheme targets --jsonresponse drops theThemeTargetEntry.deprecatedForfield, because no target it lists is deprecated. (#7302) Migration: run the required codemodmigrate-deprecated-theme-surfacewithastryx upgrade --from <your 0.6 version> --apply --path .after upgrading.The codemod renames removed target keys inside themecomponentsmaps (an importeddefineTheme()call, an object typed as an Astryx theme, or a theme object with a staticname), renames target classes in CSS, and replaces target-qualified bare prop/value/state classes with reflecteddata-*selectors, using every bare class the final 0.6 release emitted. It leaves dynamic/computed theme keys, unqualified or unknown classes, and CSS embedded in JavaScript/TypeScript strings for manual review. It addsTODO(astryx upgrade)when old and canonical keys coexist, and when a bare class Astryx once emitted has no known meaning on the target it qualifies.The four per-component clear-icon aliases all become the sharedinput-clear-icon, which styles every input's clear icon. In CSS the codemod keeps each rule on its component with:where(.astryx-<component> *), which adds no specificity. Theme keys cannot carry that scope, so the codemod adds a TODO naming the CSS selector to use.Code that passed{legacyNames}tothemeProps()or setdeprecatedForin a component doc should delete that argument or field; the canonical target is unchanged.Rename theme keys and CSS target classes with this complete mapping:base-table→tablecheckbox→checkbox-indicatorcodeblock→code-blockcodeblock-copy-button→code-block-copy-buttoncodeblock-header→code-block-headercodeblock-title→code-block-titledate-input-clear-icon→input-clear-icondate-range-input-clear-icon→input-clear-iconhovercard→hover-cardmulti-selector-clear-icon→input-clear-iconnavicon→nav-iconpopover-surface→popoverprogressbar→progress-barprogressbar-fill→progress-bar-fillprogressbar-mark→progress-bar-markprogressbar-track→progress-bar-trackradio→radio-indicatorradio-dot→radio-indicator-dotselector-clear-icon→input-clear-iconstatusdot→status-dottextarea→text-area
For custom CSS, replace removed bare selectors with the corresponding reflected attribute on a canonical target—for example,.astryx-button.primary.smbecomes.astryx-button[data-variant="primary"][data-size="sm"], and.astryx-switch.checkedbecomes.astryx-switch[data-checked="checked"]. Review unqualified classes such as.primarymanually because they may be application-owned. - Remove the
astryx layoutcommand group. (#7137) Removes the deprecatedastryx layoutcommand group (expand,check,grammar), its three response types (layout.expand,layout.check,layout.grammar), and the programmatic API exports (layoutExpand,layoutCheck,layoutGrammar).Useastryx buildto choose the template to start from,astryx templateto scaffold it, andastryx docs layoutfor layout guidance. The layout guide is unaffected. The error codesERR_LAYOUT_PARSEandERR_LAYOUT_INVALIDare retained.Removed JSON ids:LayoutBlockReference.modeLayoutBlockReference.nameLayoutCheckOptions.cwdLayoutCheckOptions.formLayoutCheckOptions.looseLayoutCheckResponse.dataLayoutCheckResponse.data.compactLayoutCheckResponse.data.errorsLayoutCheckResponse.data.formLayoutCheckResponse.data.outlineLayoutCheckResponse.data.validLayoutCheckResponse.data.warningsLayoutCheckResponse.typeLayoutExpandOptions.cwdLayoutExpandOptions.formLayoutExpandOptions.looseLayoutExpandOptions.nameLayoutExpandOptions.targetPathLayoutExpandResponse.dataLayoutExpandResponse.data.blocksReferencedLayoutExpandResponse.data.codeLayoutExpandResponse.data.componentsUsedLayoutExpandResponse.data.demoMediaReplacedLayoutExpandResponse.data.formLayoutExpandResponse.data.statesLayoutExpandResponse.data.todosLayoutExpandResponse.data.warningsLayoutExpandResponse.data.writtenLayoutExpandResponse.typeLayoutGrammarOptions.cwdLayoutGrammarResponse.dataLayoutGrammarResponse.data.aliasesLayoutGrammarResponse.data.textLayoutGrammarResponse.typeLayoutIssue.colLayoutIssue.formattedLayoutIssue.lineLayoutIssue.messageLayoutIssue.suggestions - Spacing tokens are rem (
--spacing-2: 0.5rem), so gaps and padding follow the reader's root font size the way the type scale does. Every token value is unchanged at the default 16px root. (#7359) One change shows at the default root: theuseTableRowExpansionchevron now sits centered in its fixed 40px column instead of running past its edge (its button moves from 24–48px to 8–32px of the column). Under a theme with a larger spacing scale, such as matcha, the chevron is visible again and the detail panel lines up with the first column instead of starting 20px past it.Old usage: The--spacing-*defaults were fixed px (--spacing-2: 8px), souseTheme().token(),resolveThemeToken(),tokenDefaultsandspacingDefaultsreturned px strings, and spacing stayed the same size when a reader raised the browser font size.Replacement: The defaults are rem with the same value at a 16px root (--spacing-2: 0.5rem,--spacing-4: 1rem), and those readers return the rem string.Migration: CSS that readsvar(--spacing-*)needs no change. Code that parses a spacing token as a px number converts the rem value with the root font size, or reads the element's computed length. A theme that wants fixed px spacing sets the tokens back, for exampledefineTheme({tokens: {'--spacing-2': '8px'}}).Codemod: None. A token read and parsed at runtime cannot be found and rewritten statically, and CSS uses need no rewrite. theme buildexits 1 when it reports private--_*variables. (#6872) The old contract reported private-variable errors but exited 0. The corrected contract keeps the same warnings, receipts, generated files, and--checkoutput, but exits 1.To migrate, a CI step that relied on exit 0 must fix the theme's private--_*inputs.
New Features
astryx upgradeaddspadding={0}to BottomSheet elements that do not setpadding, keeping their unpadded content box now that BottomSheet pads like Dialog. Sheets whose only child is a Section or a Layout are left unchanged. A sheet with a Layout anywhere in its content also gets a TODO comment, becausepadding={0}removes the inset between that Layout's regions and the Layout's ownpaddingrestores only its outer edges. A shadowedBottomSheetbinding is left alone, and a second run changes nothing. (#6884)astryx upgraderunsmigrate-field-input-styling, which renames rootxstyle/className/styleon Field-composed inputs to the part they styled before:controlXstyle/controlClassName/controlStyleon TextInput, TextArea, NumberInput, FileInput, DateInput, DateRangeInput, DateTimeInput, TimeInput, Selector, MultiSelector, and ComplexSelector, andcontainerXstyle/containerClassName/containerStyleon Typeahead, Tokenizer, CheckboxList, RadioList, and Slider. It rewrites JSX written directly on an Astryx import (named, aliased, or namespace). Spreads and wrappers that forward their own styling props are left for manual migration, and a callsite that already sets the target prop gets a TODO instead of a rename. (#7342)astryx upgraderenamesemptySearchResultsTexttoemptySearchTextonTokenizer,Typeahead,BaseTypeahead, andChatComposerInputtrigger objects, for the release that removes the old name. (#7289)
Fixes
templateandbuildfollow the project's package manager. The nearest directory from the target up to the workspace root that has apackageManagerfield or a lockfile decides. With neither, the command uses npm, whatever package manager launched the CLI. When that directory's lockfiles disagree and nothing it commits picks one,installCommandisnulland the note names the missing packages, the directory, and the lockfiles that disagree, instead of guessing a command that would write a second lockfile. (#7343)- Teach generated palette references in the full custom-theme authoring guide. (#7268)
- Generate Neutral's runtime palette references from the stops its theme uses, and fail verification when the package or CLI template copy drifts. (#7255)
Documentation
- Clarify release-branch codemod promotion and version ownership. (#7293)
Contributors
Thanks to everyone who contributed to this release:
0.6.8
Fixes
- A template that sets
replacesneeds@astryxdesign/cli0.6.4, and one that setskeywordsneeds 0.6.6, not 0.7.0 (#7265). Published 0.6.4 applies a template'sreplaces, and published 0.6.6 reads itskeywords.integration verifyasked for">=0.7.0"for both, a range no released CLI satisfies, and npm leaves the CLI uninstalled in an app that installs a package with that optional peer.integration verifynow accepts">=0.6.4"forreplacesand">=0.6.6"forkeywords, and still refuses a range that admits an older CLI. Its messages now say what older CLIs do. Before 0.6.6 a template that setskeywordsis dropped, and before 0.6.4 the package's doc topics are hidden too.
Documentation
- Guide new theme authors to the palette generator and keep the broad color scale opt-in in generated theme templates (#6795).
Contributors
Thanks to everyone who contributed to this release:
0.6.7
New Features
- Apps can opt into package-managed themes with
astryx theme add <slug> --import. The command records the theme in one generated app module with its production CSS, optional font CSS, and default slug. Usetheme removeandtheme useto manage that record, and passthemes[defaultThemeSlug]to<Theme>. Plainastryx theme addkeeps its released source-copy behavior, options, stdout, exit status, and everytheme.adddata field. It now warns thattheme ejectis the explicit source-fork command andtheme add --importis the way to use the package-managed theme. Its machine result adds theDEP-0005deprecation entry; the cleanup isCLN-0005in a later scheduled minor.UsedefineTheme({extends: importedTheme, ...})for ordinary customization.theme ejectcreates an independent local fork with its descriptor. JSON callers receivetheme.appfrom import, remove, and use, ortheme.ejectfrom eject.Existing bundled source copies stay where they are and keep their bytes. Runastryx upgrade --from 0.6.4 --path . --applyto add the missing unmaintained descriptor beside each bundled copy insrc/themes. Until then, theme commands skip those copies andtheme listand doctor name them as unmigrated. Package integration themes keep their released complete-directory copy, including the authoring descriptor.ASTRYX_THEMEis no longer read. In a project with a generated app theme module, component metadata reads that record's default built theme. Without the module, the releasedpackage.json#astryx.themelookup keeps its meaning. Doctor loads every recorded built module through the same theme adapter, so a broken runtime import failstheme-ownersinstead of passing.theme buildalso writes<out>.css.d.tsso TypeScript accepts generated CSS imports. Check mode stays compatible with released output sets that do not have this new stub yet.Integration themes can export built modules and stylesheets.astryx integration add themecreates those exports, andintegration verifychecks the exported paths against the packed package and source. Missing partner exports alone do not block packing. Every declared export must resolve; staleness is a warning for an incomplete set and an error for the complete importable module and stylesheet pair. - Every result now names the package it comes from. A
--jsonresult about one artifact (a component and each of its projections, a doc topic, index, section, or docs-tree node, a template, a hook, andswizzle) carriespackagein its envelope, directly aftertype. A result that lists artifacts gives each item its ownpackage: everysearchhit,build's start, alternatives, blocks, and components, a doc's sections, a docs-tree node's children,--blocksentries, and thecomponent --listandupgrade --listentries. Text names the same package;--source,--showcase, and a template's source still print only the source on stdout and name the package on stderr. Existing fields are unchanged. - Deprecate the
astryx layoutcommand group Theastryx layoutcommand group (expand,check,grammar) is deprecated. Useastryx buildto choose the template to start from,astryx templateto scaffold it, andastryx docs layoutfor layout guidance.In human mode each invocation prints a stderr warning naming the replacement. In JSON mode the response envelope carries machine-readable deprecation metadata in itsmetafield. Canonical stdout, exit codes, and thelayout.expand/layout.check/layout.grammarresponse schemas are unchanged.Deprecation lifecycle (spec:AST-017FR28, FR31) — removal only in a later minor whose frozen manifest carries both ids of a pair: - An integration component can replace a Core component, once its package opts in An
@acme/navcomponent whose doc setsreplaces: 'SideNav'takes overSideNavfor unqualified component detail, batch selectors, everycomponent --listdetail level,search,swizzle, and gap-report routing, when@acme/navdeclares"@astryxdesign/cli": ">=0.6.7"inpeerDependencies(optional inpeerDependenciesMeta). Every result names its package,--package @astryxdesign/corestill selects the original Core component, and the replacement keeps answering to its own name.component SideNav --package @acme/navalso selects it.Any@astryxdesign/clirange that starts at 0.6.7 or later is the opt-in, including the>=0.7.0thatintegration add doc --parentwrote in 0.6.4 and 0.6.5, andintegration add themein 0.6.5. A package whose range admits an earlier CLI keeps its component under its own name and Core stays selected, and an app that loads it sees no new output; its author gets warnings naming the range to add, fromastryx doctor integration componentsandintegration verify. For a package that declares the range,astryx doctor integration componentsreports a missing Core target, an invalid value, a component named after a different Core component, or two replacements for one target in the package as errors and exits 1. When several packages replace one target, an explicitly configured package beats an autolinked one, the later configured package wins, and Doctor warns. - Add the model comparison page template with responsive sticky context and accessible interactions. (#6251)
- New
table-collapsiblepage template: several tables on one page, each in a collapsible card with its own columns, for groups that do not share a schema. Every table sorts on its own, one time range in the page header drives all of them, and rows expand in place into a full-width history chart. Below 720px each table folds to its name and headline figure. (#6065)
Fixes
- Printed commands name the scoped
@astryxdesign/clipackage whenever theastryxbin is not installed for the project - Compact the generated agent-docs block: fewer lines, same behavioral coverage
astryx doctorkeeps itsthemescheck, with the same id, label and fields, beside the new theme checks, so scripts that read it by id keep working. Without a generated theme module it reports what it did before: whether an@astryxdesign/theme-*package is installed, and whether the app's package.json names a theme inastryx.theme. Its fix now namestheme add --import. With a generated module it reports the overall result of the theme checks. In a workspace,themesreads the app's own package.json, the file the CLI reads when it resolves the theme, rather than the package.json beside the rootnode_modules. It no longer counts theASTRYX_THEMEvariable, which the CLI does not read, as a wired theme.- Doctor says why it skipped a check and what it checked, and
doctor integration validateno longer crashes on a folder it cannot read - upgrade: exclude node_modules from integration codemod discovery
When an integration declared its codemods root as the package root (
codemods: "./"), the version-folder scan treatednode_modules,.git,__tests__, and__fixtures__as version folders and loaded their files as codemods. The sameSKIP_DIRSfilter that the recursive file walk already used is now also applied to the top-level version-folder enumeration. - Align the layout deprecation (DEP-0006) with the documented envelope and precedent
The layout command's JSON envelope now emits
meta.deprecations: [{id, replacements}], matching the response schema doc and the DEP-0005 theme add precedent. ThedeprecatedCommandDoc field renders in--helpand the manifest. The programmatic API exports (layoutExpand,layoutCheck,layoutGrammar) carry@deprecatedin their declarations and generated types. Command and function reference pages name DEP-0006 and the replacement. The DEP-0006 record names its direct authority. All released data fields are unchanged. - swizzle: rewrite every .stylex import to a deep path
astryx swizzle Button(and any component that imports a.stylexmodule from outside its own directory) emitted an import that collapsed to the directory barrel — e.g.@astryxdesign/core/utilsinstead of@astryxdesign/core/utils/interactionOverlay.stylex. The barrel does not re-export those StyleX symbols, so the swizzled file could not compile.rewriteImportsnow gives every*.stylexmodule the deep subpath. The exports generator (scripts/sync-exports.js) adds 16 specific subpath exports for the.stylexmodules swizzled components actually reference across directories:DateInput/tokens.stylex,Icon/IconSize.stylex,Indicator/indicator.markers.stylex,Layer/layerAnimations.stylex,Layer/layerTextReset.stylex,Layer/layerViewportInset.stylex,Layout/container.stylex,Layout/edgeCompensation.stylex,Layout/padding.stylex,NavItem/navItemStyles.stylex,Selector/selectorPresentation.stylex,Stack/stack.stylex,Stack/stackItem.stylex,Text/text.stylex,utils/focusOutline.stylex,utils/interactionOverlay.stylexThese are public API additions. Each module already ships in the npm tarball (indist/); only the exports map entry is new. No wildcard — a future cross-directory.styleximport needs a deliberate entry inSTATIC_EXPORTS. Precedent:./theme/dataTokens.stylex(AST-066 FR2). - template: show a grouped summary by default instead of the full catalog Bare
astryx template(no name, no--list) now shows templates grouped by category with counts — about 21 KB instead of the full 149 KB catalog. The full catalog with descriptions is still reachable viaastryx template --list.JSON output is unchanged —--json templatestill returns the completetemplate.listresponse. This is a text-only rendering change under AST-017 FR11: the machine-readable response schema is the contract; text formatting is not.Trade-off: the grouped output still includes every template id (sotemplate <id>works from a copy-paste), at the cost of ~21 KB. An even shorter summary (type + count only, no ids) would be ~500 bytes but would require a second step to discover any id. The current shape serves both human scanning and agent copy-paste without a round-trip. - template: bare
template --typeno longer prints an empty group header - A section read on a docs-tree namespace answers from the guide that has the section again, so
astryx docs layout side-panelsand the other layout section reads released in 0.6.6 work after the layout split.docs(route, section)returns the samedocs.detail.sectionthe guide's own section read returns, found by key, then by title, in--denseand--zhtoo. When no guide or more than one has the section, the read fails withERR_UNKNOWN_SECTIONand names the guides to read it from. astryx searchranks a component, hook, or template that a query word names above a doc that matched only by keyword, heading, or text.font sizefinds Text first again instead of a typography guide. A doc the query names, such asfont setupormigration, or one whose title the query holds, such asresizable side panels, keeps its place. Result scores do not change; only the order between domains moves.astryx searchfinds a guide when the query is its route or title in the other number:side panelfinds the side panels guide first again, andheader and footerfinds headers and footers. A section's heading still doesn't count as its topic's name, sofont sizekeeps finding Text first.- Fix comparison table category from "Table - Frozen Column" to "Table - Comparison" The category described an implementation detail (the frozen label column) instead of what the template is for. Builders searching by layout type now find it under Comparison.
- Template and build tell you what a scaffolded template needs that your project lacks. When
astryx template <name> <path>scaffolds a file that imports packages your project does not have (e.g.@heroicons/react,recharts,lucide-react), the receipt now includes a ready-to-run install command with the project's package manager and version ranges from the CLI workspace.astryx buildshows the same note on its start template.When a scaffolded template uses StyleX and the project has no compiler plugin configured, the receipt warns and points toastryx docs styling-overview. The agent-docs block no longer says "don't use xstyle" flat-out — it acknowledges that some templates need it and links the setup doc.detectStylingSystemnow recognizes the official@stylexjs/rollup-plugin,@stylexjs/webpack-plugin, and@stylexjs/nextjs-pluginalongside the existing entries. astryx theme buildprints one line per built theme, plus one line naming fonts the themes do not load. Before, every theme printed the same install example and font recipe, so a build of many themes printed the same blocks again and again.--detail fullprints the install example and font recipe, once for a batch instead of once per theme; for one theme it prints what the default printed before. Only the text report changes:--jsonoutput,--check, exit codes and written files are unchanged.- Wherever the CLI shows the
<Theme>wrapper, it now also shows whereThemecomes from:import {Theme} from '@astryxdesign/core'. This covers theastryx initnext steps,theme addandtheme buildoutput, the doctor fix for an unimported theme module,buildhelp, and the theme guides. astryx theme add <slug> --importnames the npm package that owns the added theme, in its JSON envelope (package, directly aftertype) and in its text output, the same way other results about one artifact do. A local theme has no package, so its result has nopackage, andtheme removeandtheme useare unchanged.astryx theme add --listkeeps its JSON. Its text now namestheme add <slug> --importto use a theme andtheme eject <slug>to fork one, instead of the deprecated copy form.astryx doctoradds atheme-managementcheck, and focusedtheme-*checks once a project has a generated theme module.- One-off commands in a classic Yarn (1.x) project use
npx @astryxdesign/cli …instead ofyarn dlx, which classic Yarn does not have
Documentation
astryx docs migration,internationalization,styling,styling-libraries,typographyandtokensstill work and now list focused guides. Each section is also readable under its guide, for exampleastryx docs tokens/tokens-spacingorastryx docs styling/tokens-and-setup stylex-setup, andastryx docs <topic> <section>keeps working: every section key these topics had still opens the same section.astryx docs tokens --depth all --detail fullprints every token table, and atoken-reftotokenskeeps resolving through the guide that holds the table. Integrations: these six names are now docs-tree sections, not topics, so an integration doc that declaresextendsorreplaceswith one of them is reported as naming no topic, and its content no longer shows. To keep that content, ship it as your own topic under a new name, or as a guide in your package's own section (astryx integration add doc <name> --parent <your-section>). Topics that are still flat, such asthemeorcolor, can still be extended or replaced.(#7184)astryx docs layoutstill works and now lists the focused guides. Each section is also readable under its guide, for exampleastryx docs layout/side-panelsorastryx docs layout/scaffold shell, andastryx docs layout <section>keeps working. (#7125)astryx docs layoutopens with its overview again, andastryx docs author-a-themeanduse-a-themerestore guidance the theme split dropped: what a badextendsbase does, how adaptation rules are validated, what__builtmeans, the icon-registry specifier traps,registerTheme, and wiring built themes in development too. (#7204)- Add a choose-a-path styling overview and restore the import-based workflow across the theme guides. (#7134)
- Split the theme documentation into focused guides for using and authoring themes, with a concise overview that points to both workflows. (#7141)
Other Changes
- A hint uses
npx astryx …(orpnpm exec,yarn,bunx) only when theastryxbin is innode_modules/.bin, in the project or a folder above it. Otherwise it printsnpx @astryxdesign/cli …(pnpm dlx,yarn dlx,bunx), as it already did when the CLI ran from an npx or dlx cache. - A global install, or a workspace install used in a fresh package, used to print
npx astryx …. The npm package namedastryxis not this CLI, so following that hint fetched an unrelated package. astryx blogfollows the same rule, and the incident console template names the scoped package.Classification: contract-restoring. JSON shapes are unchanged; only hint text changes, and projects with the CLI installed keepnpx astryx ….- deprecation
DEP-0006/ cleanupCLN-0006—astryx layoutcommand group (expand,check,grammar) - A check that needs the loaded project quotes the reason the CLI could not load it, instead of only "Skipped".
- The config check warns when astryx.config imports but the CLI cannot load the project from it. Before, it said the config loaded cleanly.
- Integration contributions name the integrations they checked; with none loaded, the check reports info and says there is nothing to check.
- The agent-docs check reads every file init can write (Hermes included) and looks in the project root as well as the working directory, so running doctor from a subfolder no longer reports that there are no agent docs.
astryx doctor integration validatenames a folder it cannot read and keeps checking. A declared root that is a file or that cannot be read is reported asinvalid_rootorunreadable_rootinstead of a raw error or a crash.Classification: contract-restoring. No check becomes stricter: every new finding is a warning or info, and the only exit-code change is that an unreadable folder outside every root no longer crashes validation.- Whenever the CLI prints its scoped one-off form (it ran from an npx or dlx cache, or the
astryxbin is not installed for the project), a Yarn project gotyarn dlx @astryxdesign/cli …. On classic Yarn that command fails. - Classic Yarn is read from the declared
packageManagerversion, theyarn.lockheader (# yarn lockfile v1), a committed.yarnrc(without.yarnrc.yml), or the runner. Yarn 2 and later keepyarn dlx.Classification: contract-restoring. JSON shapes are unchanged; only hint text changes.
Contributors
Thanks to everyone who contributed to this release:
0.6.6
New Features
- Add a shared
uploadicon, and use it for FileInput's upload affordance instead of the directionalarrowUpThemes drawuploadthroughicons.upload, separately fromarrowUp, so sort arrows and every otherarrowUpuse stay unchanged. Every bundled theme and theme template drawsuploadin its own icon style. FileInput keeps its icon size, placement, color, and accessibility in both modes; a theme with nouploadartwork shows the default upload-into-tray glyph there.A completeIconRegistrymay still omituploadin this release. The next minor makes it required, so add anuploadentry to any registry you type asIconRegistry. - Templates declare their
keywords, andbuildtells a part of a page from a page by the components the project can use (#6805) buildchooses where to start with a checked-in table of word weights blended with the page rankerastryx docs <route> --depth <levels>reads as far down the docs tree as you ask, from one doc to everything below it.--depth 0reads only the namespace you name,--depth 1adds the docs right below it (what a read without--depthshows), and--depth allgoes to the bottom. With--depth,--detailsets how much of each doc below shows:brief(the default) is one line each, named by where it sits so you can open it,compactadds its sections, andfullprints it whole. Soastryx docs cli --depth allis a map of every CLI doc, andastryx docs cli/integrations --depth all --detail fullprints the integration guides as one read. Where a read stops, a namespace says how many docs sit below it.--jsonreturns the same tree asdocs.node: each child carries its ownslotswhile the read goes deeper,childCountwhere it stops, and its text atcompactorfull.docs()takes the samedepthanddetailoptions. Reads without--depthare unchanged.- Point at
discoverwhere people look for things to add Nothing an agent reads nameddiscover, so agents asked to find a theme searched the package registry instead. The agent blockastryx initwrites now listsdiscover <words>(integrations you could add, and the ones you have),theme listends withMore themes in packages you could add: astryx discover theme, and a text search ends withMore in packages you could add: astryx discover <query>(except--type hook, since no integration adds hooks). JSON output is unchanged. integration add theme --from <base>forks an existing theme as the starting point instead of a blank scaffold. The new theme copies the base's source files — renamed and rewritten for the new slug — with no link back. Use--fromwhen you want to change a lot; for a small change that stays linked, useextendsindefineTheme.
Fixes
- Say when a command did nothing:
upgradereportssourcePathFound, the integration checks reportvalidated. Two commands could legitimately do nothing and produce an envelope identical to a clean success. Both now carry the fact in a field of their own response instead of only in human text.astryx upgradedefaults--pathto./src. A project laid out asapp/(or a typo) skipped every code codemod and still reported exit 0,filesChanged: 0,errors: []and "Upgrade complete". The only warning was a log line--jsonsuppresses by design.upgrade.runnow carriessourcePathFound, and the human completion line names the directory it did not find.astryx doctor integration validate|components|docs|templatesreturned{name: null, version: null, issues: []}and exit 0 when no integration manifest was found — the same shape as a validated, healthy integration. All four envelopes now carryvalidated, false only when nothing was inspected. astryx manifest --jsonnow takes each command's examples from its CommandDoc and its response types from the API function it wraps, so no example differs from the documented one andupgradelistsupgrade.registry, whichupgrade --registry --jsonalready emits.astryx template <name> <path>andastryx layout expandnow say when they replaced Astryx demo media. Thetemplate.copyandlayout.expandreceipts carrydemoMediaReplaced, the number of demo image and video references that became placeholders (one per reference, however many fixture paths its URL carries), and the text output names the file to update (whenlayout expandprints the code instead, the same line follows it as a comment, so the output is still valid TSX). Nothing about the copy itself changed.astryx template <name>andtemplate()now return the same source thatastryx template <name> <path>writes, and say how many Astryx demo media references they replaced. Demo images and videos that only Astryx's own previews serve are replaced the same way in both, so code copied from the printed source no longer points at media your project doesn't have.template.showgainsdemoMediaReplaced(0 when the template carried none); in text mode the count is stated on stderr so the printed source stays exact.- A write that fails reports ERR_WRITE_FAILED instead of a raw Node errno.
astryx templateinto an unwritable directory returned{"error": "EACCES: permission denied, open '/home/you/project/readonly/x.tsx'", "code": "ERR_UNKNOWN"}, andswizzlereturned themkdirequivalent. Two things were wrong: ERR_WRITE_FAILED is already in the frozen error registry for exactly this case, and the message carried an absolute host path where every other Astryx message names its target relative to the project.Both now throw ERR_WRITE_FAILED with the errno kept (it is the part that says what to fix) and the target named relative to the project. Nothing is left half-written: aswizzlethat fails part-way removes the files it already copied and puts back any it replaced before it reports the error, and the message names any file it could not restore. - When
discover --availableruns without a discover source, the CLI now explains what discover sources are and where to find Astryx packages on npm, instead of the misleading message that told users to add package names they had no way to find. The basediscoverwith no integrations also gains a pointer to npm and the integrations docs. - A package with a namespace doc or a placed guide needs
@astryxdesign/cli0.6.4, not 0.7.0. Published 0.6.4 reads an integration's docs tree: it lists the namespace and reads each guide placed in it. 0.6.3 rejects a namespace doc and hides every doc topic the package ships.integration add doc --parentwrote"@astryxdesign/cli": ">=0.7.0", a range no released CLI satisfies, andintegration verifyfailed a docs-tree package whose CLI peer started at 0.6.4.integration add doc --parentnow writes">=0.6.4", marked optional, andintegration verifyaccepts it. A template that setsreplacesorkeywordsstill needs">=0.7.0". gap-reportfails when a listed integration cannot load, instead of reporting a clean result. An integration whoseastryx.integrationmodule throws on import or fails validation was left out of the handler set. With no other handler, the report fell through to the built-in GitHub fallback for Core: the command exited 0 withconsent_required, printed nothing on stderr, and offered--confirm-publicto file on Core's public tracker a report the integration might have been meant to receive.The unloadable integration now records a failed delivery in its config position, with the load error and the fix in its message. Like any handler, it turns the fallback off, so the report never goes to another package's tracker. The command exits 1, and a failed or partial report now prints each failed delivery on stderr as well as in the receipt.astryx integration add theme <name> --from <base>now adds the packages the copied theme files import todependencies. A fork of a bundled theme such asneutralcopies itsicons.tsx, which importslucide-react, but the package did not declare it. Soastryx theme buildon the fork failed with "Cannot find module 'lucide-react'", and an app that installed the package hit the same error.--fromnow adds each package the copied files import, at the range the bundled themes use. It leaves out Core and React, which every Astryx app already has, and anything the package already declares.astryx integration packwithout--checknow points only atastryx integration verify. It used to say "Pass --check to verify the integration tarball, or runastryx integration verify", which sent people to the deprecated spelling. It now says thatintegration packis nowintegration verify, and thatnpm packbuilds the tarball. The error code and exit code are unchanged, andintegration pack --checkstill runs the same check as before.- Search: differentiate all-word matches by total quality; index themes Within the all-words tier, every candidate whose strongest token hit was a keyword scored the same (e.g. 157), regardless of how the other query words matched. A doc matching both words by keyword outranked nothing, and
search "how to use a theme"put API reference docs above the consumer theme guide.The bonus now uses the sum of ALL token scores instead of just the strongest, so a candidate matching every word by keyword outranks one matching keyword + prose. Thethemedoc also gains consumer-facing keywords so it surfaces for questions like "how to use a theme" and "how to apply a theme".Themes are now a search domain: bundled and integration-provided themes appear in results with their slug, displayName, package, and theastryx theme addcommand.--type themefilters to them. Like--type doc, it works outside an app, where an open search now covers the docs and themes. Search help, the manifest, and the API reference list the new domain and its result fields. - Search ranks a theme's description as prose, not as keywords
A word a theme shares with your query only through its description, such as
minimal,focusorcontent, now ranks the theme like any other description instead of like a declared keyword, so it no longer lands above the components, hooks and docs that declare that word. A theme still comes first for its own slug or display name:astryx search neutralfinds the Neutral theme first. - A package that ships a theme or a doc section
idneeds@astryxdesign/cli0.6.4, not 0.7.0. Published 0.6.4 reads typed theme descriptors and section ids; 0.6.3 rejects both and hides the package's themes or doc topics. The 0.6.5 notes said a stable CLI before 0.7.0 rejects them, sointegration add themewrote"@astryxdesign/cli": ">=0.7.0", a range no released CLI satisfies, andintegration verifyfailed a theme or section-id package whose CLI peer started at 0.6.4.integration add themenow writes">=0.6.4", marked optional, andintegration verifyaccepts it for themes and section ids. A template that setsreplacesorkeywordsstill needs">=0.7.0". theme buildresolves real icon imports from the selected theme instead of matching comment or string contents. Generated modules preserve named, aliased, default, and namespace registry imports, plus inherited icons with child overrides. Normal builds and--checkreject unsupported inline registries withERR_THEME_INVALIDbefore generating or writing output. Move such a registry into its own module and import it into the theme file.astryx theme buildin an app uses the app's installed@astryxdesign/core, and says to install Core when there is none. Run one-off withnpx @astryxdesign/cli, it failed with "Build @astryxdesign/core first (e.g.pnpm -F @astryxdesign/core build)" even when the app had Core installed, because it looked for Core only next to the CLI. It now generates with the Core the project installed, the same Core the app's<Theme>runs on. In an app without Core, the error now says to install it (npm install @astryxdesign/core). The build command stays only for the Astryx repository itself. The error code (ERR_CORE_NOT_FOUND) is unchanged.
Other Changes
TemplateDocgains an optionalkeywordslist: the ideas, domains, and other names a builder might use for what the template serves.parseTemplatevalidates it, discovery carries it from every template source,astryx searchmatches it as it matches a template's description, andastryx buildranks page templates on it. Each Core page template's closing list of ideas moved out of itsdescriptionintokeywords, so descriptions describe the layout.buildstarts a part of a page where it lives (spec:AST-048FR3), and the project's own components say what a part is: an idea whose head noun is a word of a component's name or keywords, Core's or an integration's, asks for a part, unless the noun names a family of page templates or the idea lists three or more pieces. A part starts from the base template of the family the idea names, else from the app shell; a change to an existing page or part (an idea whose "existing" names a page family or a component, such as "the existing table", and that does not ask for a new page) starts from the app shell. The start's reason says which case applies and why.- A family's base template leads its family unless a variant matches two terms of its own; a base that cannot start on its own never displaces the variant that leads.Integration templates that set
keywordsneed@astryxdesign/cli0.7.0 or later. The template metadata object is strict, so a stable CLI before 0.7.0 rejects the field, drops that template, and hides the package's doc topics; onlytemplate --listandsearchprint a warning.integration verifyfails a package whose template setskeywordsuntil it declares@astryxdesign/cli >=0.7.0, as it does forreplaces. api/build/kit/weights.mjsscores each candidate start (the app shell and every ready page template) from the idea's stemmed words using the tables inweights.json, and blends those scores with the ranker's own. The blend decides the start of every whole page; a part or an edit starts where it did before, and the ranker's pick of a template the tables do not list stands. Without a weights file the ranker's pick stands. The response's shape is unchanged.
Contributors
Thanks to everyone who contributed to this release: