An open source design system that's fully customizable and agent ready
TypeScript
docs: credit and backfill PR refs on v0.4.2 changesets (#5061)
Cindy Zhangb91f1059a90a
diff --git a/.changeset/avatar-audit-theme-box-blank-name.md b/.changeset/avatar-audit-theme-box-blank-name.mdindex fd70d56f01..2c278bf5ce 100644--- a/.changeset/avatar-audit-theme-box-blank-name.md+++ b/.changeset/avatar-audit-theme-box-blank-name.md@@ -2,5 +2,5 @@'@astryxdesign/core': patch----[fix] Avatar: put the avatar box on the element that carries the `astryx-avatar` theme target, so a theme rule on the documented `size` axis resizes the whole avatar instead of growing the wrapper around a fixed-size circle; treat a whitespace-only `name` or `alt` as absent, so it falls through to the default icon rather than rendering an empty plate behind a blank accessible name; warn through the shared `useDevWarning` hook rather than a bare `console.warn` in the render body; and replace the phantom `<OnlineIndicator />` in the JSDoc example with the real `AvatarStatusDot`+[fix] Avatar: put the avatar box on the element that carries the `astryx-avatar` theme target, so a theme rule on the documented `size` axis resizes the whole avatar instead of growing the wrapper around a fixed-size circle; treat a whitespace-only `name` or `alt` as absent, so it falls through to the default icon rather than rendering an empty plate behind a blank accessible name; warn through the shared `useDevWarning` hook rather than a bare `console.warn` in the render body; and replace the phantom `<OnlineIndicator />` in the JSDoc example with the real `AvatarStatusDot` (#5030)@cixzhangdiff --git a/.changeset/command-palette-footer-i18n.md b/.changeset/command-palette-footer-i18n.mdindex f3897b6f64..445f9e0b67 100644--- a/.changeset/command-palette-footer-i18n.md+++ b/.changeset/command-palette-footer-i18n.md@@ -2,5 +2,5 @@'@astryxdesign/core': patch----[fix] CommandPaletteFooter: wire default keyboard-hint strings through useTranslator so they resolve from the locale catalog instead of being hardcoded English+[fix] CommandPaletteFooter: wire default keyboard-hint strings through useTranslator so they resolve from the locale catalog instead of being hardcoded English (#4506)@cixzhangdiff --git a/.changeset/context-menu-derived-vars.md b/.changeset/context-menu-derived-vars.mdindex aa288257aa..50915a2593 100644--- a/.changeset/context-menu-derived-vars.md+++ b/.changeset/context-menu-derived-vars.md@@ -2,6 +2,6 @@'@astryxdesign/core': patch----[fix] `context-menu` component overrides now drive the menu's internal radius and padding vars. `ContextMenu.doc.mjs` has always documented `derived` entries mapping `borderRadius` → `--_dropdown-menu-radius` and `padding` → `--_dropdown-menu-padding`, but `derivedVarRegistry` had no `context-menu` key, so the mapping was dead: `components: {'context-menu': {base: {borderRadius: '12px'}}}` emitted `border-radius` alone and the menu kept reading its own `var(--_dropdown-menu-radius)`. The registry entry now matches the doc, as it already does for `dropdown-menu`.+[fix] `context-menu` component overrides now drive the menu's internal radius and padding vars. `ContextMenu.doc.mjs` has always documented `derived` entries mapping `borderRadius` → `--_dropdown-menu-radius` and `padding` → `--_dropdown-menu-padding`, but `derivedVarRegistry` had no `context-menu` key, so the mapping was dead: `components: {'context-menu': {base: {borderRadius: '12px'}}}` emitted `border-radius` alone and the menu kept reading its own `var(--_dropdown-menu-radius)`. The registry entry now matches the doc, as it already does for `dropdown-menu` (#4783).@cixzhangdiff --git a/.changeset/document-private-theming-vars.md b/.changeset/document-private-theming-vars.mdindex fa56e442a8..a499da2678 100644--- a/.changeset/document-private-theming-vars.md+++ b/.changeset/document-private-theming-vars.md@@ -2,6 +2,6 @@'@astryxdesign/core': patch----[docs] Ten private (`--_*`) component theming vars are now documented in their owning component's `theming.vars[]`: `--_avatar-group-overlap`, `--_card-elevation`, `--_card-ring`, `--_codeblock-gutter-width`, `--_item-label-color`, `--_item-description-color`, `--_tab-indicator-bottom`, `--_tree-indent` (plus `--_dropdown-menu-radius`/`--_dropdown-menu-padding`, which Breadcrumbs sets on a child menu). They were declared in source and described nowhere, because the drift guard skipped the `--_` prefix outright.+[docs] Ten private (`--_*`) component theming vars are now documented in their owning component's `theming.vars[]`: `--_avatar-group-overlap`, `--_card-elevation`, `--_card-ring`, `--_codeblock-gutter-width`, `--_item-label-color`, `--_item-description-color`, `--_tab-indicator-bottom`, `--_tree-indent` (plus `--_dropdown-menu-radius`/`--_dropdown-menu-padding`, which Breadcrumbs sets on a child menu). They were declared in source and described nowhere, because the drift guard skipped the `--_` prefix outright (#4783).@cixzhangdiff --git a/.changeset/focus-trap-no-tabbable-controls.md b/.changeset/focus-trap-no-tabbable-controls.mdnew file mode 100644index 0000000000..768ffcb0a4--- /dev/null+++ b/.changeset/focus-trap-no-tabbable-controls.md@@ -0,0 +1,7 @@+---+'@astryxdesign/core': patch+---++[fix] `useFocusTrap`: a modal surface with no tabbable controls keeps its programmatic focus target instead of letting Tab escape into the page behind it. A dialog that places initial focus on a `tabIndex={-1}` heading or panel had nowhere to advance to, so Tab walked straight out of the trap. `@astryxdesign/core/hooks` also exports `hasActiveFocusTrapEscape` and `isImeKeyEvent`, which coordinate nested traps and skip IME composition keys (#5023).++@imdreamrunnerdiff --git a/.changeset/heading-type-theming-target.md b/.changeset/heading-type-theming-target.mdindex e28722a6db..deb5a4945f 100644--- a/.changeset/heading-type-theming-target.md+++ b/.changeset/heading-type-theming-target.md@@ -3,7 +3,7 @@'@astryxdesign/cli': patch----[fix] Heading's `type` is a documented theming target, and the docs stop teaching a CSS variable that does not exist.+[fix] Heading's `type` is a documented theming target, and the docs stop teaching a CSS variable that does not exist (#5016).`Heading` reflects `type` as a theme selector — `typography.scale` generates `heading: {'type:display-1' …}` rules for it — but `theming.targets` listed only `level` and `color`, so `astryx theme build` warned `Unknown prop "type" on component "heading"` on every theme that sets a type scale, including the shipped `neutralTheme`. The drift guard missed it twice over: it read a conditional spread (`{level, color, ...(type && {type})}`) as an unknown bag, and it only checked a component against a doc file in its own directory, so `Heading/` — documented from `Text/Text.doc.mjs` — was never checked at all. Both are fixed, which brings three more previously unchecked directories under the guard.diff --git a/.changeset/lucky-layers-travel.md b/.changeset/lucky-layers-travel.mdindex 2389b4a63f..b5aabc29e5 100644--- a/.changeset/lucky-layers-travel.md+++ b/.changeset/lucky-layers-travel.md@@ -2,5 +2,5 @@'@astryxdesign/core': patch----[fix] Layer: use an inert `<template>` marker to find each context layer's actual JSX position. Safe positions stay inline; positions inside a paragraph, link, button, inline formatting, or a structurally restricted container portal to the nearest safe ancestor. Corrective portals keep CSS custom properties inheriting from that nearby host while preserving direction and writing mode, and `show()` passes the trigger as the popover's invoker `source`. The new `lazyMount` option waits until opening to resolve and mount content; HoverCard uses it so rich content never enters an invalid paragraph during initial render and unmounts again when hidden. Other context layers keep their existing closed-content behavior.+[fix] Layer: use an inert `<template>` marker to find each context layer's actual JSX position. Safe positions stay inline; positions inside a paragraph, link, button, inline formatting, or a structurally restricted container portal to the nearest safe ancestor. Corrective portals keep CSS custom properties inheriting from that nearby host while preserving direction and writing mode, and `show()` passes the trigger as the popover's invoker `source`. The new `lazyMount` option waits until opening to resolve and mount content; HoverCard uses it so rich content never enters an invalid paragraph during initial render and unmounts again when hidden. Other context layers keep their existing closed-content behavior (#5039).@cixzhangdiff --git a/.changeset/slider-thumb-bounds.md b/.changeset/slider-thumb-bounds.mdindex 0e0f2a702a..914d2fe291 100644--- a/.changeset/slider-thumb-bounds.md+++ b/.changeset/slider-thumb-bounds.md@@ -2,6 +2,6 @@'@astryxdesign/core': patch----[fix] Slider: the thumb no longer overhangs the component's own box at `min` and `max`. It was centred on the container edge at either extreme, leaving half of it (10px) outside the control, where a tight container clipped it or it overlapped the next element. Thumb travel is now inset by half a thumb at each end — the geometry a native `input[type=range]` uses — and the fill, the marks and the pointer-to-value mapping share that inset, so the thumb also stays under the pointer that grabbed it instead of jumping by up to half its width. Vertical sliders and both thumbs of a range slider are fixed the same way.+[fix] Slider: the thumb no longer overhangs the component's own box at `min` and `max`. It was centred on the container edge at either extreme, leaving half of it (10px) outside the control, where a tight container clipped it or it overlapped the next element. Thumb travel is now inset by half a thumb at each end — the geometry a native `input[type=range]` uses — and the fill, the marks and the pointer-to-value mapping share that inset, so the thumb also stays under the pointer that grabbed it instead of jumping by up to half its width. Vertical sliders and both thumbs of a range slider are fixed the same way (#5051).@cixzhangdiff --git a/.changeset/theme-template.md b/.changeset/theme-template.mdindex 43fa6a2f95..50a241b13b 100644--- a/.changeset/theme-template.md+++ b/.changeset/theme-template.md@@ -3,7 +3,7 @@'@astryxdesign/core': patch----[feat] `astryx theme template` writes an annotated theme template into your project.+[feat] `astryx theme template` writes an annotated theme template into your project (#5048).New sibling of `theme add`: where `add` starts you from a theme we ship, `template` starts you from a blank annotated one. `astryx init --features theme` calls the same leaf, so project setup writes it too — it previously printed a one-line hint and wrote nothing, which is the weakest form of the help a theme author needs, since the first problem is not knowing the command but not knowing what the theme surface contains. The file is `theme.template.ts`: every `defineTheme` field with a note on when to reach for it, the token families, the component override syntax, and the consumption steps (providing the theme, loading the fonts you name, building for SSR), each section naming the CLI command that prints its authoritative reference. An existing file is never clobbered.