Skip to content

v0.1.4

Latest

Choose a tag to compare

@cixzhang cixzhang released this 08 Jul 00:34
7b76c68

@astryxdesign/core

New Features

  • Code: add color and size props. color accepts 'primary' | 'secondary' | 'inherit' and now defaults to 'primary' (mirroring Text's color subset); previously the color was left to inherit implicitly. size="inherit" makes inline code adopt the surrounding text's font-size and line-height. Exports CodeColor and CodeSize types (#2846)
  • Markdown: support CommonMark link reference definitions. Reference-style "footer" links — full [text][label], collapsed [text][], and shortcut [text] (plus their ![alt] image forms) — now resolve against a [label]: destination "title" block, which is stripped from the output instead of leaking as a visible paragraph. Labels match case-insensitively with collapsed whitespace; top-level definitions are collected across the document (so a reference can precede its definition, including in the streaming/incremental parser, whose settled-block cache invalidates when definitions change). Footnotes ([^1]) are intentionally left untouched. Known limit: a definition nested inside a blockquote/list resolves within that container but is not yet exposed document-wide. (#3621)
  • Native form participation for custom inputs via htmlName (#3343)
    Switch, CheckboxInput, RadioList, Slider, Selector, MultiSelector, and Tokenizer now accept the same htmlName prop TextInput and NumberInput already had, so they serialize into native form submission. Components with a real native input (Switch, CheckboxInput, RadioList) forward the name; the synthetic controls render hidden inputs that mirror native semantics — one entry per value for MultiSelector/Tokenizer (like a multi-select), string value for Slider (two entries in range mode), and exclusion from FormData when disabled.
  • Add useTableRowExpansion — expand/collapse tree rows inline.

Fixes

  • Button: keep edge compensation working when a ghost button also has a tooltip. The tooltip is now attached via the tooltip hook instead of a wrapper element, so the button stays a direct child of its container — no extra DOM node, no layout shift, and containers (Toolbar, Banner) still detect the edge-compensation marker via their direct-child :has() selector and pull the button flush to the optical edge. (#2578)
  • Calendar: stop range-highlighting adjacent-month (outside) days, and cap the range highlight where it meets a disabled or adjacent-month day. In the two-month range view the same date renders in both panes, so the spillover copy on the neighbouring month's pane was drawn as part of the selection; outside days now never receive selection, range, or preview state. A highlighted day next to a disabled or outside day now gets a rounded end cap so the run reads as properly terminated instead of running square-edged into the gap. (#2715)
  • Code and CommandPaletteEmpty now forward props correctly (#3620)
    Code spreads rest props (aria-*, role, event handlers) onto the DOM element. CommandPaletteEmpty applies the xstyle/className/style escape hatches and theme props.
  • DateRangeInput: use the label type-size token for the trigger field. The trigger was reading the body size/leading tokens (--text-body-size/--text-body-leading) instead of the label ones (--text-label-size/--text-label-leading), so its text rendered a step larger than the other date inputs. (#3655)
  • Spinner: promote the canvas to its own compositor layer (willChange: transform) so rotation stays smooth on WebKit — fixes wobbly spinning in Safari and Tauri WebViews. (#3628)
  • Text: apply the documented size prop as a font-size override (#3615)
    Text now reflects size in theme props and applies the corresponding typography size token after its type-based baseline styles. The override changes font size while preserving the selected text type's line-height, weight, and family behavior.

Documentation

  • MobileNav previews with an open trigger instead of an empty stage: new playground.overlay for full-viewport overlay components, and inline sub-components can declare their own playground (#3616)

Other Changes

  • Inherited-columns mode: child rows use the same columns as their parents,
    indented by depth. Injects a chevron column; clicking (or right-click → "Expand/Collapse row") toggles a row's children.
  • Headless: the consumer owns expandedKeys state; the plugin provides the UI.
    Pair with useTableRowExpansionState to flatten a tree into the visible rows.
  • Optional expand-all header toggle via isAllExpanded + onToggleExpandAll.
  • Optional expandOnRowClick to toggle by clicking anywhere in the row.
  • Contributes a context-menu action for expand/collapse (via the
    contextMenuActions system).

@astryxdesign/cli

Fixes

  • astryx component <Name> now prints the correct defineTheme component-override key. The theming example stripped a stale xds- prefix (left over from the astryx rename) instead of astryx-, so it advertised keys like astryx-base-table / astryx-button. Those double-prefix to .astryx-astryx-* selectors at runtime and silently match nothing. Keys are now the stable class name minus astryx- (e.g. base-table, button), which is what generateThemeRules expects (#3458).
  • Harden the v0.1.0 upgrade codemods against three cases surfaced while migrating consumer apps:

Documentation

  • Add a browser-support guide (astryx docs browser-support) documenting the support tiers, the modern platform features Astryx depends on (Popover API, CSS anchor positioning, light-dark()), which components are affected, and how consumers can support older browsers for their own audience.

Other Changes

  • drop-xds-prefix-imports: when un-prefixing an @xds/core import (e.g. XDSCodeBlockCodeBlock) would collide with a same-named local binding in the file (such as a local export function CodeBlock wrapper), alias the import to Astryx<Name> and rewrite its usages instead of producing a duplicate declaration that breaks the build.
  • migrate-xds-css-surfaces: rewrite CSS @import of @xds/* package stylesheets (both '…'/"…" and url(…) forms), including the @xds/core/xds.css@astryxdesign/core/astryx.css file rename and the theme-default/theme-dailytheme-neutral collapse.
  • migrate-xds-module-specifiers: when collapsing @xds/theme-default/@xds/theme-daily to @astryxdesign/theme-neutral, remap the defaultTheme export to neutralTheme, aliasing back to the original local name (neutralTheme as defaultTheme) so downstream usages keep working.

@astryxdesign/theme-stone

Fixes

  • Stone theme: dark-mode overlay/accent-muted tokens missing alpha (#3624)
    The dark-mode values for --color-accent-muted, --color-overlay-hover, and --color-overlay-pressed were fully opaque #f3f3f5, unlike their light-mode counterparts which are semi-transparent tints. Because these tokens paint absolutely-positioned hover/press overlays and muted-accent fills, the opaque dark value covered the content underneath instead of tinting it. Changed the dark values to carry alpha suffixes following the conventions used by every other theme in the repo: overlays symmetric with light (#f3f3f50d hover / #f3f3f51a pressed, matching butter/chocolate/matcha/neutral/y2k), and accent-muted one step stronger in dark (#f3f3f520, matching the 14-light/20-dark pattern in chocolate/matcha/y2k). Fixes #3622.
  • Stone theme: restore dark-mode alpha for overlay/border/shadow tokens (#3626)
    The dark-mode values for --color-overlay, --color-border, and --color-shadow were fully opaque (#28282a, #f3f3f5, #000000), unlike their light-mode counterparts and their own original pre-regression values, which are semi-transparent tints. An opaque overlay hides the page behind a solid block instead of a translucent scrim, an opaque border paints a solid near-white line instead of a subtle hairline, and an opaque shadow has no falloff. Restored the exact values from Stone's introduction (30e9d12, #2020), stripped by a later tooling pass (e2892c0, #2173): --color-overlay to #28282acc (80%), --color-border to #f3f3f51a (T96 · 10%), and --color-shadow to #0000004d (30%). Fixes #3625.

Contributors

Thanks to everyone who contributed to this release:

Full Changelog: v0.1.3...v0.1.4