Skip to content

feat(richtext): bootstrap @astryxdesign/richtext package (canary-only)#4281

Open
cixzhang wants to merge 1 commit into
mainfrom
navi/feat/richtext-package
Open

feat(richtext): bootstrap @astryxdesign/richtext package (canary-only)#4281
cixzhang wants to merge 1 commit into
mainfrom
navi/feat/richtext-package

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

What

Bootstraps a new empty @astryxdesign/richtext package. It will eventually house the Lexical-based rich text editor and viewer that currently live in @astryxdesign/lab — but this PR intentionally ships an empty scaffold (export {}). It only establishes the package and its build/publishing wiring so the editor/view can move here later without a fresh package rollout.

Mirrors the exact canary-only setup used for @astryxdesign/charts (#3570) and vega.

Why this shape

  • Canary-only: private: true + astryx.canaryOnly: true. The stable (latest) release job skips both private and canaryOnly packages; the canary job strips private in its ephemeral CI checkout only (never in git) and publishes 0.x.y-canary.<sha> under the @canary dist-tag. The committed private: true is npm's hard guarantee against an accidental stable publish.
  • StyleX-ready babel scaffold (core token alias, babel-plugin-add-extensions.cjs) mirroring lab/charts — the lexical editor is StyleX-based, so the build is already wired for when it moves here.
  • build:css deferred on purpose: build-css.mjs exits with an error ("No StyleX rules found") when a package has zero StyleX components, which would break CI for an empty package. The README documents the trivial add (register a richtext target, add the script + export) for when the first component lands.

Risk

Low. The package is empty and not consumed by any app. The release workflow auto-discovers packages by globbing packages/*, so no per-package workflow edits are needed. Root pnpm build lists packages explicitly via -F and does not include richtext yet (nothing to build).

Testing

  • pnpm -F @astryxdesign/richtext build → clean (babel esm + tsc declarations + check-no-dev-jsx all pass)
  • pnpm -F @astryxdesign/richtext typecheck / lint → clean
  • check:changesets, check:sync, check:package-boundaries → clean
  • Release-gate simulation: stable-publishable = no, canary-publishable (after private strip) = yes

Follow-up (separate maintainer step — not in this PR)

npm name bootstrap + trusted publishing (scripts/npm/setup-trusted-publishing.mjs --bootstrap --setup-trust) needs an authenticated npm session and is run by a maintainer. @astryxdesign/richtext is currently 404 on the registry.

Empty scaffold for a new package that will house the Lexical-based rich
text editor and viewer currently in @astryxdesign/lab. Mirrors the
charts/vega canary-only setup:

- private: true + astryx.canaryOnly:true — stable (latest) release job
  skips it; canary job strips private in its ephemeral CI checkout to
  publish 0.x.y-canary.<sha> under the @canary dist-tag only.
- StyleX-ready babel scaffold (core token alias) mirroring lab/charts,
  so the lexical editor/view can move here without new build wiring.
- build:css intentionally deferred: build-css.mjs errors on a package
  with zero StyleX rules, which would break CI for an empty package.
  README documents the trivial add when the first component lands.

Package is intentionally empty (export {}) — this only establishes the
package + npm canary publishing. npm name bootstrap + trusted publishing
is a separate maintainer step (scripts/npm/setup-trusted-publishing.mjs).
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jul 24, 2026 2:13am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 24, 2026
github-actions Bot added a commit that referenced this pull request Jul 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.7KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant