Skip to content

Releases

v0.5.2 — ports Astryx 0.5.2

Choose a tag to compare

@DevRohit06 DevRohit06 released this 01 Sep 23:23
fd33842

Ports Astryx 0.5.2.

Three upstream releases in one. 0.4.5 was the last tag here, so this entry covers 0.5.0,
0.5.1 and 0.5.2 together — 363 files changed under packages/core/src/lib, +21,328 / −3,269.
Upstream's own surface moved only once in that span: Stepper was promoted out of lab at 0.5.0,
and 0.5.1 and 0.5.2 added no component directories at all.

Two upstream breaking changes

  • Banner collapses its disclosure axis onto one collapsible: boolean | CollapsibleConfig
    prop backed by the shared useCollapsible hook. defaultIsExpanded is removed (upstream
    #5255).
  • Layer replaces every overlay's own Escape listener with one shared dismissal stack. Overlays
    take an escapeBehavior of close or block, guard IME composition, and resolve "topmost" from
    tree nesting rather than DOM containment (upstream #4881). Six families register on the stack.

Stepper

A new component, promoted out of lab upstream. Horizontal and vertical orientations, a Step per
entry, and per-step content. A children passed to an inactive Step must be a conditional
snippet rather than an {#if} inside the tag: the vertical connector geometry is driven by
children != null, so a wrapper around an empty slot grows a segment on every inactive step.

The touch date picker

DateInput and DateTimeInput gain Astryx's own touch surface — a bottom sheet with a virtualized
month scroller and scroll-snapped month/year wheels — and it reaches npm for the first time in this
release. nativePicker selects it: 'touch' (the default) hands a coarse pointer to the platform
picker, 'never' always draws Astryx's own, 'always' always defers to the platform. Selection is
on the primary pointer alone, so a tablet gets the thumb picker and a touchscreen laptop keeps
the typable field.

NativeDateField arrives with it, and Icon moves from px to rem.

Themes

The theme CSS API is aligned to upstream's shape, and all eight theme packages ship at this version:
butter, chocolate, gothic, liquid-glass, matcha, neutral, stone and y2k.

Fixed in this port

  • The touch calendar opened three months early. MonthScroller positioned its scrollport from a
    pre-effect, so the write landed before the DOM it measures against existed and the browser clamped
    it to 0; scroll-snap-type: mandatory then pulled the scroller to the first mounted pane. Opened
    on August it showed May. It also reached the wheels, which derive from the same month index, so a
    wheel commit could read the wrong year.
  • ToastViewport logged a Svelte derived_inert warning on every dismissal, in production
    builds as well as development, because a handler on a detached node read state belonging to the
    block it had just destroyed.
  • Toast adopts MediaTheme mode="auto" with a fallback, so its surface no longer paints
    unreadable text under a themed parent.

Parity

Every upstream component directory has a counterpart here, and nothing is exported that upstream
does not export. Four upstream features are known-absent and recorded in port/debts.md:
Markdown's sourceRanges, MultiSelector.formatValue, Icon's namespaced names, and two of
upstream's module-augmentation seams. lab, charts and vega remain out of scope by decision.

The test-parity worklist is measured rather than described, in port/status.md.


Install: pnpm add @astryx-svelte/core@0.5.2 @astryx-svelte/theme-neutral@0.5.2

All ten packages publish together and carry the version of the upstream Astryx release they port:
core, cli, and the eight themes.

v0.4.5 — BottomSheet, every locale, and the test delta closed

Choose a tag to compare

@DevRohit06 DevRohit06 released this 20 Aug 22:21
4c40bd2

Ten packages at 0.4.5, on npm now.

npm install @astryx-svelte/core @astryx-svelte/theme-neutral

The first release since 0.4.1 — 0.4.2 was merged and never tagged, so it never reached npm. Upgrading from 0.4.1 brings both entries' worth of change (0.4.2 is in the changelog), and two changes are breaking: expandTypeScale's signature, and the StyleX layer move if you compile from source. Both are spelled out below.


Across 0.4.3, 0.4.4 and 0.4.5 upstream added exactly one component directory — BottomSheet,
promoted out of lab — extracted four modules onto subpaths of their own, and drifted inside
directories this port already shipped.

BottomSheet, promoted out of lab

A mobile touch sheet that rises from the bottom edge, with drag-to-dismiss, drag-to-resize snap
points, and mobile-keyboard accommodation. Upstream did not write it for this release; it moved from
packages/lab into core at 0.4.4 and was rewritten on the way, so it arrives here as a fresh
port rather than as drift.

Two shapes. A standalone BottomSheet owns its own <dialog> — modal with a scrim by default,
non-modal with hasScrim={false} so the page behind stays interactive. A BottomSheetSwitcher
owns one shared dialog for a multi-step flow, and its children opt in with sheetId; handing off
between steps keeps the native top layer, moves the sheet to the incoming step's height, and never
closes and reopens the dialog underneath.

height takes 'hug', 'capped', 'tall', or any CSS length. snapPoints adds resting heights
the user can drag between; a stop of a quarter of the sheet or less is treated as a peek — it slides
away rather than reflowing into itself, and thins the scrim as it goes. Only a fully expanded tall
sheet accommodates the mobile keyboard, which is upstream's rule, and it stops doing so the moment
the user drags it to a shorter detent.

An IME composition no longer reads as a command

Seven components ran their keydown logic while an IME composition was still open. Because the
composing keydown fires before compositionend, a Korean, Japanese or Chinese user committing a
candidate with Enter was committing the pending date, selecting the highlighted option or toggling
it; the candidate window's arrows were stepping the time instead of walking candidates.

DateInput, DateTimeInput, TimeInput, NumberInput, Typeahead, Selector and
MultiSelector now guard on the shared isImeKeyEvent predicate, as upstream does. ChatComposer,
ContextMenu and useTooltip already behaved correctly but carried their own inlined copy of the
test; they call the shared predicate now, so there is one definition of "this keystroke belongs to
the IME" rather than four.

Every locale upstream ships, and announcements that use them

This port vendored three of upstream's locale catalogs — en, fr-FR and the pseudo build. The
exports map has always declared "./locales/*.json", so
@astryx-svelte/core/locales/de-DE.json was a specifier a consumer could legitimately write from
upstream's documentation and it threw ERR_MODULE_NOT_FOUND. All 30 catalogs are vendored now,
byte-identical to upstream's, and en/fr-FR are refreshed — they were stale, not modified, and
were missing keys added after 0.4.1.

Vendoring them exposed the reason the newest keys had no reader. Upstream moved its live-region
announcements onto the catalog; this port still built them in English by hand, so MultiSelector,
Selector, Typeahead, Tokenizer and Lightbox announced in English whatever locale was
installed. Twelve keys are wired now — selection counts, empty and non-empty search results, token
added/removed, and lightbox position.

English output is unchanged: every catalog default renders the string these components already
produced, down to the plural of "result". What changes is that every other locale now reaches
them.

One thing this deliberately does not fix: upstream's own translations lag its source strings —
de-DE carries 241 of the 297 keys en has — so a non-English consumer gets translated text where
a translation exists and English where it does not. The catalogs are copied verbatim; inventing the
remainder is not a port's job.

Forms can declare a default optionality

FormLayout takes defaultOptionality, so a form states once whether its fields are optional or
required and only the exception carries a visible indicator. Fields resolve isRequired /
isOptional against it; a field outside any layout is unaffected.

New

  • characterCount, firstCharacter and truncateCharacters on @astryx-svelte/core/utils —
    grapheme-aware, so an emoji or a combining sequence counts as one character.
  • isImeKeyEvent moves to @astryx-svelte/core/utils. The hooks re-export stays for one release
    and is marked deprecated, matching upstream.
  • getStandaloneShortWeekdayNames for calendar headers, from the CLDR standalone forms.
  • deepMergeComponents, split out of defineTheme so component style maps can be merged directly.
  • expandColorScale takes a per-scheme accent — accent?: string | [light, dark] — so one seed can
    drive different accents in light and dark.
  • TreeList exposes density and variant as theming axes.
  • StatusDot takes an icon slot.

Fixed

  • Three documented theming targets rendered no class at all, so a theme could not reach them:
    input-clear-button, date-time-input-toggle-icon and date-time-input-clock-icon.
  • ComplexSelector, Banner, MobileNav and DateRangeInput pick up upstream's fixes at these
    tags; MobileNav's close-timing rework (#4290) retires a divergence this port carried.

The demo routes are gone

packages/core no longer ships src/routes — a SvelteKit demo app that predated the documentation
site and duplicated it. Nothing published changes: the route was excluded from the tarball already.
pnpm dev now runs the docs site, which is where every component's examples live, and
@sveltejs/adapter-auto is no longer a dependency of core.

Breaking: expandTypeScale takes upstream's config

expandTypeScale is published from @astryx-svelte/core/theme, and its signature was not
upstream's. It took the whole typography block — {scale, body, heading, code} — and did two
jobs upstream gives to defineTheme: building --font-family-* from the role declarations, and
mapping named weights ('bold') onto var(--font-weight-bold).

So the published TypeScaleConfig was shape drift under a shared name: a consumer typing against
it got {base, ratio} and handed the function an object it would not accept.

// before
expandTypeScale({ scale: { base: 14, ratio: 1.2 }, heading: { weights: { 1: 'bold' } } });

// now — upstream's shape; weights arrive already resolved to CSS values
expandTypeScale({ base: 14, ratio: 1.2, weights: { heading: { 1: 'var(--font-weight-bold)' } } });

generateTypeScaleComponents likewise takes that config. defineTheme is unaffected — it still
takes typography: {scale, body, heading, code}, and it is where the two moved jobs now live, so a
theme definition needs no change.

Two renames come with it, to the names upstream publishes: TypeRole → TypographyRole and
TypeWeight → FontWeight, both now exported from ./theme via theme/types rather than from the
expander. TypographyConfig is unchanged in shape and still exported.

One behaviour is removed: a typography with weights but no scale used to emit
--text-*-weight tokens. Upstream emits nothing without a scale, and neither does this now.

Breaking: StyleX priority layers move under astryx-base

Only if you compile this package from source — a consumer of the pre-built
@astryx-svelte/core/astryx.css is unaffected, and that is the default.

Upstream's own build wraps its compiled output in @layer astryx-base { … }, so the
priority1…N buckets StyleX emits are nested inside it. This port turned layers on without that
wrapper, so the buckets landed at the top level in order of first appearance — after astryx-theme
and product — inverting the cascade. base.css mitigated it by naming sixteen buckets by hand.

The Vite preset now passes StyleX 0.19's useLayers: {prefix: 'astryx-base'}, so the buckets are
emitted as astryx-base.priority1…N — sub-layers, which sort inside their parent. base.css
declares four layers instead of twenty. If you ordered layers around priority1…16 yourself,
order around astryx-base instead.

New: a Tailwind bridge

@astryx-svelte/core/tailwind-theme.css maps the design tokens onto Tailwind v4 @theme inline
variables, so a Tailwind consumer writes class="text-primary bg-surface" rather than
class="text-[var(--color-text-primary)]". Ported from upstream's, token for token. Because it
registers variables rather than emitting declarations, theme switching keeps working — the utilities
resolve through the same custom properties the theme sets.

Fixed, in the components

  • A consumer's style no longer beats the prop the component exists for. AspectRatio, Stack
    and Grid merged their own sizing before the consumer's style, and inline styles resolve by
    declaration order — so <Stack width={400} style="width:100%"> rendered 100% here and 400px
    upstream, and style="aspect-ratio: 3 / 1" silently beat ratio={16/9}. Upstream merges
    {...style, ...sizing}, sizing last.
  • typography.heading inherits body's font family when it declares none of its own, as
    upstream does. A theme naming only body.family kept the base theme's heading face.
  • The pseudo locale had rotted 34 keys behind English, missing...
Read more

v0.4.1 — the codemods arrive

Choose a tag to compare

@DevRohit06 DevRohit06 released this 16 Aug 09:20
59f7d46

Ports Astryx 0.4.1. Ten packages — core, the CLI and eight themes — publish together, because the version here is the parity target.

0.4.1 and not 0.4.0, deliberately. 0.4.1 is upstream's npm latest, and it repairs something 0.4.0 shipped: the complex-selector-popup / multi-selector-popup theme targets landed on an element that cannot paint. Porting 0.4.0 exactly would have meant reproducing a known-bad implementation in order to undo it in the next release.

⚠️ Breaking: useTableRowExpansion is a detail panel, and nothing else

Its tree mode is gone and useTableRowExpansionState is deleted. Child rows that reuse the parent's columns are now useTableTreeData + useTableTreeState.

Upstream shipped a codemod rather than a compatibility shim, and this follows it:

npx @astryx-svelte/cli upgrade --from 0.3.1

These are the first codemods this port has ever registered. The registry had been empty by design since it was written — a codemod migrates between two releases, and there had only ever been one.

All three of upstream's v0.4.0 transforms are here. Two of them are renames, and they matter more than they look: a theme keyed on the removed dropdown-menu-radio-dot target keeps compiling and simply stops matching. Runtime themes are not validated, so there is no error anywhere — which is why it needs a codemod rather than a line in a changelog. That rename is also not scope-preserving and cannot be, so every rewritten site gets a TODO(astryx upgrade) comment asking whether the widening was intended.

Upstream's transforms are jscodeshift over .tsx; these are magic-string + svelte/compiler, which changes their reach in both directions. .svelte files are in scope, so a <Table data={state.data}> in markup is rewritten in the same pass as the hook call.

The command is dry-run by default. Add --apply to write.

The Indicator layer

Three indicators — checkbox, radio, switch — a family-typed registry, and useIndicator.

A theme replaces a control's visual by name, not per call site, so one entry reaches every component that draws it. Each entry is checked against its indicator's family, so a replacement has to accept the states that family passes.

CheckboxInput, RadioListItem and the menu checkbox and radio rows all draw from these now.

Every focus ring comes from one definition

36 modules had their own ring. They now draw from one themeable definition, so a theme restyles focus once rather than per component.

This is also where the release's most useful finding came from, and it is worth stating plainly: migrating a module means deleting its local ring declaration and wrapping the call site instead — and deleting the declaration while forgetting the wrap produces zero oracle mismatches. 16 modules silently lost their ring, and they were found by grepping, not by the gates that exist to catch exactly this.

Generalised: both fidelity oracles prove what a module declares, never what an element receives.

Theme authoring: extends does something now

const myTheme = defineTheme({
	name: 'my-brand',
	extends: neutralTheme,
	tokens: { '--color-accent': '#FF0000' }
});

Unofficial and not affiliated with Meta. Full detail in CHANGELOG.md.

v0.3.1 — the setup step is gone

Choose a tag to compare

@DevRohit06 DevRohit06 released this 11 Aug 09:02
4540ab2

Installing the package is now enough to get styled components.

import { Button } from '@astryx-svelte/core';
import '@astryx-svelte/core/base.css';
import '@astryx-svelte/core/astryx.css';

Ports Astryx 0.3.0, unchanged in parity terms — this is the port's own release.

⚠️ Upgrading from 0.3.0 is a breaking change, and a silent one

dist now ships compiled, so your StyleX plugin has nothing left to compile. A 0.3.0 project that configured the compiler will get no component CSS and no error.

Pick one:

  • add import '@astryx-svelte/core/astryx.css', or
  • keep compiling and ask for the new condition: resolve: { conditions: ['source'] }

astryx-svelte doctor accepts either and no longer reports the first as broken.

The stylesheet was a missing port, not a limitation

0.3.0 claimed this package "cannot" ship pre-built CSS. Upstream generates astryx.css from a post-build script we had simply never ported — so the limitation was an omission wearing a justification.

Porting it also settled the open useCSSLayers question: upstream calls processStylexRules(rules, false) and wraps in one @layer astryx-base, so priority is :not(#\#) padding rather than @layer priority1…9.

Shipping the sheet alone was not enough. stylex.create throws at runtime rather than degrading, so the stylesheet by itself crashed instead of rendering unstyled. prepack now compiles the 200 dist modules under their source identity — StyleX hashes defineVars companion classes from the module path, and the first run mismatched 26 classes because of it.

A third oracle, and the bug it found

compare-upstream-css.mjs compares emitted CSS, where a stylex.create function style is just another rule — the exact blind spot of the existing class oracle, which reads modules statically and cannot see inside all 54 of them.

On its first run it found Avatar's status dot mispositioned in RTL: ported against upstream 0.2.0's physical right, never updated when 0.3.0 moved to insetInlineEnd with a mirrored transform. The class oracle had reported 0 mismatches throughout — correctly.

The cascade defect nobody could see

base.css declared four layers while the compiler emits nine, so nine unnamed layers sorted after product and inverted the cascade: themes stopped overriding components, app CSS lost to component CSS. Silent in every case. It now names priority1…16.

Also

  • main on every package. exports masks it from Node and modern bundlers, which is why nothing caught it — publint included.
  • A source export condition on all nine non-CSS subpaths, keeping the tree-shaken route alive.
  • The docs site can be found now — canonical URLs, Open Graph and Twitter cards, /sitemap.xml (281 URLs) built from the same registries the pages render from, a generated social card, and JSON-LD.
  • Fixed: both READMEs said template --list finds nothing from core. It returns 43 page templates, every id matching upstream.
  • Fixed: doctor reported optional peer dependencies as missing.

Verified

Check Result
Class oracle 1,528 style keys + 615 call sites, 0 mismatches
Stylesheet oracle 1,463 shared atomic classes, 0 differing
Theme oracle 2,418 declarations, 0 mismatches
Published tarball 43 classes referenced by the module, 43/43 present in the stylesheet

Verified as a consumer would experience it: a Vite app with no StyleX plugin at all, built and driven in headless Chromium, renders an Avatar at border-radius: 9999px, 36×36, inline-flex.

Full notes: CHANGELOG.md · Docs: https://astryx-svelte.rohitk06.in/

v0.3.0 — the first release

Choose a tag to compare

@DevRohit06 DevRohit06 released this 10 Aug 17:51

The first release. Ports Astryx 0.3.0 — the tag, not the tarball, where the two disagree.

Documentation: https://astryx-svelte.rohitk06.in/, generated from the same .doc.mjs modules
the CLI reads, so the site and the terminal cannot disagree.

Published

Package What it is
@astryx-svelte/core Components, theme system, hooks, message catalogs
@astryx-svelte/cli Docs, search, page templates, theme tooling and codemods
@astryx-svelte/theme-{neutral,butter,chocolate,gothic,matcha,stone,y2k} Upstream's seven themes
@astryx-svelte/theme-liquid-glass macOS translucent materials — no upstream counterpart, see below

What is in it

  • 101 / 101 upstream component directories, with a bidirectional diff confirming nothing here
    is invented. Ours are 97 directories because HStack/VStack fold into stack/ and
    SizeContext/InteractiveRoleContext into context modules; all four are exported.
  • 184 / 184 design tokens, and a 250-key en catalog byte-identical to upstream's, alongside
    fr-FR (upstream's own 3-key partial) and pseudo.
  • Eight theme packages — upstream's seven, plus liquid-glass, which ports nothing and is
    labelled as the port's own addition rather than presented as parity.
  • All 19 hooks, including useContainerReveal and its pooled style module.
  • 43 page templates shipped by the CLI and injectable with astryx-svelte template <name>. The
    docs registry carries 42 of them, which is upstream's own count — its generator skips scaffold
    templates, dropping blank from the gallery while leaving it scaffoldable.
  • Upstream's reset.css ported in full into base.css, because the components are authored
    against it and misrender without it. Upstream ships it as an opt-in subpath; here it is not
    optional, so it is not separable.

Verified, not reviewed

Components are authored against the same design-token references Astryx uses, so the StyleX
compiler emits byte-identical atomic CSS. Two oracles diff our compiled output against the
already-compiled classes in the published @astryxdesign/* packages, in both directions — a
missing declaration, a wrong value and an invented one all fail the run:

  • component classes: 1,528 style keys + 615 inline call sites, 0 skips, 0 mismatches
  • theme declarations: 2,418 across the seven ported themes, 0 mismatches

Known limitations

Named rather than hidden; each is tracked in TODO.md.

  • The class oracle cannot see a stylex.create function style — 54 of them across 32 modules.
    A clean run means "every static style matches", which is narrower than it sounds, and the
    blindness was measured rather than assumed: inverting a !isDisabled guard in text-input left
    the oracle at 0 mismatches while the bug was live in 13 call sites.
  • 434 upstream test cases have no counterpart here yet. Ported suites are case-for-case and the
    count is the contract, but suites with no ported file have no header to be wrong, and that
    blindness had already let a real ChatComposer bug ship.
  • The full browser suite does not complete in one run. It passes in chunks; the shared Chromium
    instance dies late in an unchunked run and takes the remaining files with it. Infrastructure, not
    product.
  • Page templates are outside every tsconfig, so svelte-check reports 0 errors on a deliberate
    type error in one. It matters more now that the templates import real icon packages.
  • The 28-name icon registry cannot keep upstream's glyphs distinct at page-template scale. Every
    collision is named in its file's header and retires when the registry grows.
  • Upstream bugs are reproduced, not corrected, and each is written down in TODO.md.

Setup that has no upstream counterpart

@astryxdesign/core ships pre-built CSS; this package cannot. svelte-package transpiles
TypeScript and does not run StyleX, so dist/**/*.stylex.js publishes uncompiled and every
consumer compiles it as part of their own build. Getting that wrong fails without an error —
the components render, unstyled. packages/core/README.md has the Vite/SvelteKit configuration,
including the two settings that exist because Vite has two ways to route a dependency around a
plugin.