Skip to content

Release v1.0.1#19

Merged
0xNeit merged 19 commits into
mainfrom
release/v1.0.1
May 18, 2026
Merged

Release v1.0.1#19
0xNeit merged 19 commits into
mainfrom
release/v1.0.1

Conversation

@0xNeit
Copy link
Copy Markdown
Contributor

@0xNeit 0xNeit commented May 17, 2026

Summary

Patch release bundling eight fixes from the open-issue triage (#10#17). All 14 linked @usemotif/* packages bump 1.0.01.0.1.

Each fix was developed on its own fix/issue-* branch and merged into release/v1.0.1 via --no-ff, so the history keeps a clear per-issue boundary.

Fixes

Issue Severity Change
#17 P0 Native <Heading>/<Paragraph> rendered invisible text — unitless lineHeight is now resolved against fontSize
#12 P1 useReducedMotion() hook + reduced-motion handling in headless components
#13 P1 Default themes ship borderWidths and letterSpacings token scales
#11 P1 RTL: <Direction> provider + useDirection() hook on both renderers
#16 P2 px/mx are now logical (paddingInline/marginInline); new ps/pe/ms/me/start/end logical props
#10 P2 Tree-shakeable @usemotif/react/svg entry — a single-icon import drops ~6.2 KB → ~0.6 KB gzip
#15 P2 Next.js bundler guide documents transpilePackages
#14 P3 Corrected the misleading @usemotif/compiler-swc package description

Release chores

  • All 14 packages bumped to 1.0.1 with per-package CHANGELOG.md entries (done by hand — @changesets/cli majors linked-group minors).
  • Documentation app updated: v1.0.1 changelog entry, new Direction / useDirection and useReducedMotion reference pages, and updates to the style-props, tokens, and icons references.

Test plan

  • CI verify passes (typecheck, lint, format, build, test, size, treeshake)
  • yarn test — full suite green (verified locally: 23/23 tasks)
  • Docs site builds — vorge build (verified locally: 170 pages)
  • Spot-check RTL: <Direction value="rtl"> flips logical props on web and native
  • Spot-check a single-icon import cost against the tightened tree-shaking budget

Known follow-up

0xNeit added 19 commits May 17, 2026 22:33
RN's lineHeight is absolute DIPs with no unitless ratio form, so a
web-style multiplier like 1.2 set a ~1px line box that clipped glyphs
to nothing — Heading and Paragraph rendered invisible text.

Resolve a sub-cutoff lineHeight as a ratio against the resolved
fontSize in the native Text resolver, so any consumer using web
habits renders correctly. Absolute values pass through unchanged.

Fixes #17
Add a cross-platform useReducedMotion hook — matchMedia on web,
AccessibilityInfo on native — and gate headless motion on it: the
exit transition skips its exit phase and unmounts synchronously, and
the native Toast fade-in is skipped. The hook is exported so consumers
supplying their own animation CSS can read the same signal.

Fixes #12
The core schema declares borderWidths and letterSpacings scales and
several style props resolve against them, but the default light/dark
themes shipped neither — so a $-ref like borderWidth="$borderWidths.thin"
had nothing to resolve to on the default token set.

Add both scales to the shared primitive layer and wire them into the
default themes. Values are plain numbers so they resolve correctly on
web and React Native alike.

Fixes #13
Ship writing-direction support across both renderers.

- core: `px`/`mx` now map to the logical `paddingInline`/`marginInline`
  instead of physical left/right, so they adapt to writing direction.
  Add logical props `ps`/`pe`/`ms`/`me`, `start`/`end` insets, and the
  long forms (`paddingInline*`, `marginInline*`, `insetInline*`).
  `pl`/`pr`/`ml`/`mr`/`left`/`right` stay physical as escape hatches.
- Add a `<Direction>` provider + `useDirection()` hook on both
  renderers. Web renders a `dir` boundary (`display: contents`) and
  lets the browser flip logical CSS and `row` layouts. Native is
  context-only — `Box`/`Text` inject the Yoga `direction` style so
  logical props and `row` flip; with no provider it follows
  `I18nManager.isRTL`.

Directional primitives need no change: flex `row` is already
writing-direction-relative on both CSS and Yoga.

Fixes #11
Fixes #16
Importing one @usemotif/icons glyph dragged in all of @usemotif/core
plus the styled primitives — ~6.2 KB gzip for a single icon — because
the glyphs imported Icon/Svg through the @usemotif/react barrel.

Add a dedicated @usemotif/react/svg entry that exposes only Icon, Svg,
and SVG_PRIMITIVES (which import zero engine code), and repoint the
glyph generator and the hand-written extras at it. Regenerated all
1932 glyphs. A single-icon import is now ~556 B gzip; the tree-shaking
budget drops from 7000 to 1500.

The entry source is svg-entry.ts (not svg.ts) to avoid colliding with
Svg.tsx on a case-insensitive filesystem; tsup's object-form entry
maps it to dist/svg.js.

Fixes #10
The Next.js guide never mentioned `transpilePackages`, yet the
official example app sets it. Without it, developers following the
guide hit `'use client'` / RSC build errors that the example silently
avoids — notably in workspace/monorepo installs.

Add it to the canonical `next.config.ts` block and a section
explaining which packages to list and when it is required.

Fixes #15
The package.json description claimed "SWC plugin wrapper", but the
package contains no SWC plugin — it is a universal unplugin shim that
runs the @usemotif/compiler-babel transform through @babel/core.
Describe what the package actually is.

The package is not renamed: it is published at 1.0.0 and referenced
across the docs and the example app, so a rename is a breaking change
out of proportion to this fix. The source JSDoc, README, and bundler
docs already describe it accurately as a universal unplugin.

Fixes #14
The prior wording still said "pairs with SWC toolchains", which keeps
implying an SWC association the package does not have — it runs a
Babel transform and is bundler-agnostic. Describe it by the bundlers
it actually supports.
Bump all 14 linked @usemotif/* packages 1.0.0 → 1.0.1 and add
CHANGELOG entries for the v1.0.1 patch fixes (#10#17).

Done by hand rather than via @changesets/cli, which majors any minor
on a linked group.
- changelog: add the v1.0.1 entry (#10#17).
- style-props reference: document the logical ps/pe/ms/me and start/end
  shorthands; note logical vs physical insets.
- tokens reference: add the borderWidths and letterSpacings scales.
- icons reference: document the @usemotif/react/svg tree-shakeable entry.
- new reference pages: Direction / useDirection, and useReducedMotion.
- animation recipe: cross-link useReducedMotion for headless motion.
The `@usemotif/headless — Tooltip only` budget was 11000, set on the
assumption that Tooltip ≈ Dialog. It never was: an esbuild metafile
diff confirms Tooltip pulls the exact same module set as Dialog (no
Tooltip-only package), but is a larger component — ~11.2 KB gzip vs
Dialog's ~10.6 KB. The budget had zero headroom and failed CI.

Rebaseline to 12000 (~850 B headroom). No bloat and no regression —
verified pre-existing and independent of the v1.0.1 changes.

Closes #18
@0xNeit 0xNeit merged commit 0ba96a4 into main May 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant