Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

feat(richtext): release @astryxdesign/richtext as a stable package (#7224)

Cindy Zhang22743455aa9a
diff --git a/.changeset/config.json b/.changeset/config.json
index 4e50e39a22..0659e81f39 100644
--- a/.changeset/config.json
+++ b/.changeset/config.json
@@ -7,6 +7,7 @@
"@astryxdesign/build",
"@astryxdesign/cli",
"@astryxdesign/core",
+ "@astryxdesign/richtext",
"@astryxdesign/theme-butter",
"@astryxdesign/theme-chocolate",
"@astryxdesign/theme-gothic",
diff --git a/.changeset/richtext-stable-release.md b/.changeset/richtext-stable-release.md
new file mode 100644
index 0000000000..fa5c630a0a
--- /dev/null
+++ b/.changeset/richtext-stable-release.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/richtext': patch
+---
+
+[feat] `@astryxdesign/richtext` is now a stable package, released together with `@astryxdesign/core` at the same version. Install it without the `@canary` tag: `npm install @astryxdesign/richtext`. It provides `RichTextEditor`, `RichTextView`, `RichTextEditorToolbar`, `RichTextEditorAutoLinkPlugin`, the headless Markdown serializers (also at `@astryxdesign/richtext/markdown`), and Markdown plugin support through `createRichTextExtension`. `RichTextView` and core `Markdown` render the same document the same way, and Markdown that is imported and exported without edits comes back byte for byte. `lexical` and the `@lexical/*` packages remain optional peer dependencies.
+
+@cixzhang
diff --git a/.github/scripts/rtl-audit-coverage.test.mjs b/.github/scripts/rtl-audit-coverage.test.mjs
index 1ff9a78fa7..1692ca43a0 100644
--- a/.github/scripts/rtl-audit-coverage.test.mjs
+++ b/.github/scripts/rtl-audit-coverage.test.mjs
@@ -490,6 +490,7 @@ describe('audited package and story routing', () => {
'core-',
'lab-',
'charts-',
+ 'richtext-',
'vega-',
]);
});
@@ -518,20 +519,20 @@ describe('audited package and story routing', () => {
title: 'Charts/Chrome/Tooltip',
},
{
- id: 'lab-richtexteditor--default',
- title: 'Lab/RichTextEditor',
+ id: 'richtext-richtexteditor--default',
+ title: 'RichText/RichTextEditor',
},
{
- id: 'lab-richtexteditor--with-toolbar',
- title: 'Lab/RichTextEditor',
+ id: 'richtext-richtexteditor--with-toolbar',
+ title: 'RichText/RichTextEditor',
},
{
- id: 'lab-richtexteditor--with-auto-link',
- title: 'Lab/RichTextEditor',
+ id: 'richtext-richtexteditor--with-auto-link',
+ title: 'RichText/RichTextEditor',
},
{
- id: 'lab-richtexteditor--markdown-serializers',
- title: 'Lab/RichTextEditor',
+ id: 'richtext-richtexteditor--markdown-serializers',
+ title: 'RichText/RichTextEditor',
},
{
id: 'vega-vegachart--radial-plot',
@@ -549,19 +550,19 @@ describe('audited package and story routing', () => {
},
{
component: 'richtext/RichTextEditor',
- storyId: 'lab-richtexteditor--default',
+ storyId: 'richtext-richtexteditor--default',
},
{
component: 'richtext/RichTextEditorToolbar',
- storyId: 'lab-richtexteditor--with-toolbar',
+ storyId: 'richtext-richtexteditor--with-toolbar',
},
{
component: 'richtext/RichTextEditorAutoLinkPlugin',
- storyId: 'lab-richtexteditor--with-auto-link',
+ storyId: 'richtext-richtexteditor--with-auto-link',
},
{
component: 'richtext/RichTextView',
- storyId: 'lab-richtexteditor--markdown-serializers',
+ storyId: 'richtext-richtexteditor--markdown-serializers',
},
],
publicComponentsByPackage,
@@ -593,19 +594,19 @@ describe('audited package and story routing', () => {
component: 'charts/ChartTooltip',
},
{
- id: 'lab-richtexteditor--default',
+ id: 'richtext-richtexteditor--default',
component: 'richtext/RichTextEditor',
},
{
- id: 'lab-richtexteditor--with-toolbar',
+ id: 'richtext-richtexteditor--with-toolbar',
component: 'richtext/RichTextEditorToolbar',
},
{
- id: 'lab-richtexteditor--with-auto-link',
+ id: 'richtext-richtexteditor--with-auto-link',
component: 'richtext/RichTextEditorAutoLinkPlugin',
},
{
- id: 'lab-richtexteditor--markdown-serializers',
+ id: 'richtext-richtexteditor--markdown-serializers',
component: 'richtext/RichTextView',
},
{
@@ -628,10 +629,10 @@ describe('audited package and story routing', () => {
const assigned = Object.values(shardRoutes).flat().map(routeKey).sort();
expect(assigned).toEqual(routesWithUnknown.map(routeKey).sort());
expect(shardRoutes.richtext.map(routeKey)).toContain(
- 'lab-richtexteditor--with-toolbar::richtext/RichTextEditorToolbar',
+ 'richtext-richtexteditor--with-toolbar::richtext/RichTextEditorToolbar',
);
expect(shardRoutes.lab.map(routeKey)).not.toContain(
- 'lab-richtexteditor--with-toolbar::richtext/RichTextEditorToolbar',
+ 'richtext-richtexteditor--with-toolbar::richtext/RichTextEditorToolbar',
);
expect(shardRoutes.core.map(routeKey)).toContain(
'core-mystery--default::unknown/mystery',
@@ -652,9 +653,9 @@ describe('audited package and story routing', () => {
'charts-chrome-axes-grids--playground',
'charts-chrome-swatch--gallery',
'charts-chrome-tooltip--default',
- 'lab-richtexteditor--with-toolbar',
- 'lab-richtexteditor--with-auto-link',
- 'lab-richtexteditor--markdown-serializers',
+ 'richtext-richtexteditor--with-toolbar',
+ 'richtext-richtexteditor--with-auto-link',
+ 'richtext-richtexteditor--markdown-serializers',
]);
expect(unresolvedComponentFilters(routes, groupedOwners)).toEqual([]);
expect(unresolvedComponentFilters(routes, ['charts/MissingOwner'])).toEqual(
@@ -708,20 +709,20 @@ describe('audited package and story routing', () => {
const routes = buildStoryComponentRoutes({
stories: [
{
- id: 'lab-richtexteditor--default',
- title: 'Lab/RichTextEditor',
+ id: 'richtext-richtexteditor--default',
+ title: 'RichText/RichTextEditor',
},
{
- id: 'lab-richtexteditor--with-toolbar',
- title: 'Lab/RichTextEditor',
+ id: 'richtext-richtexteditor--with-toolbar',
+ title: 'RichText/RichTextEditor',
},
{
- id: 'lab-richtexteditor--with-auto-link',
- title: 'Lab/RichTextEditor',
+ id: 'richtext-richtexteditor--with-auto-link',
+ title: 'RichText/RichTextEditor',
},
{
- id: 'lab-richtexteditor--markdown-serializers',
- title: 'Lab/RichTextEditor',
+ id: 'richtext-richtexteditor--markdown-serializers',
+ title: 'RichText/RichTextEditor',
},
],
targets,
@@ -730,10 +731,10 @@ describe('audited package and story routing', () => {
const owners = richTextComponents.map(component => `richtext/${component}`);
expect(unresolvedComponentFilters(routes, owners)).toEqual([]);
expect(storyIdsForComponentFilters(routes, owners)).toEqual([
- 'lab-richtexteditor--default',
- 'lab-richtexteditor--with-toolbar',
- 'lab-richtexteditor--with-auto-link',
- 'lab-richtexteditor--markdown-serializers',
+ 'richtext-richtexteditor--default',
+ 'richtext-richtexteditor--with-toolbar',
+ 'richtext-richtexteditor--with-auto-link',
+ 'richtext-richtexteditor--markdown-serializers',
]);
});
@@ -779,12 +780,12 @@ describe('audited package and story routing', () => {
curatedResults: [
{
component: 'richtext/RichTextEditor',
- storyId: 'lab-richtexteditor--error-status',
+ storyId: 'richtext-richtexteditor--error-status',
rollup: 'RTL-ready',
},
{
component: 'richtext/RichTextEditorToolbar',
- storyId: 'lab-richtexteditor--with-toolbar',
+ storyId: 'richtext-richtexteditor--with-toolbar',
rollup: 'RTL-ready',
},
],
diff --git a/.github/scripts/visual-gate/visual-gate.config.json b/.github/scripts/visual-gate/visual-gate.config.json
index 80934b8b21..2fbee08d08 100644
--- a/.github/scripts/visual-gate/visual-gate.config.json
+++ b/.github/scripts/visual-gate/visual-gate.config.json
@@ -6,9 +6,9 @@
"$baselineThemes": "Themes allowed to own canonical stable baseline frames. Neutral is the default product reference; probe is the generated coverage fixture.",
"baselineThemes": ["neutral", "probe"],
"$stableStoryPackages": "Only these workspace packages may own stable visual stories.",
- "stableStoryPackages": ["Core"],
+ "stableStoryPackages": ["Core", "RichText"],
"$stableStoryGroups": "Ownership fallback for stories that declare no component: only these Storybook title groups may own canonical baseline frames, so a story from another group cannot earn one merely by importing Core. A story that DOES declare a component published by stableStoryPackages owns its frames wherever it is titled.",
- "stableStoryGroups": ["Core"],
+ "stableStoryGroups": ["Core", "RichText"],
"$prVisualShotLimit": "Review ceiling for focused component shots and broad shared-infrastructure plans. Theme-only matrices are not component-budgeted.",
"prVisualShotLimit": 240,
"$visualPlanSafetyLimit": "Absolute resource ceiling for every ordinary and trusted visual plan, regardless of scope.",
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2313476ad1..03993cf35d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -697,8 +697,8 @@ Changeset it adds or edits names that package:
dependency or peer ranges.
Stories, the sandbox, tests, fixtures, snapshots, spec records, generated
-CHANGELOGs, private and canary-only packages (`lab`, `charts`, `richtext`,
-`vega`), the docsite app, CI, and repository tooling never reach a consumer and
+CHANGELOGs, private and canary-only packages (`lab`, `charts`, `vega`), the
+docsite app, CI, and repository tooling never reach a consumer and
need no Changeset. The failure names the package and the command to run, for
example `pnpm changeset:new --packages @astryxdesign/cli --category docs`. Run
the check locally with
diff --git a/apps/storybook/rtl-audit/targets.json b/apps/storybook/rtl-audit/targets.json
index 3c3ef80e9a..5b6b667080 100644
--- a/apps/storybook/rtl-audit/targets.json
+++ b/apps/storybook/rtl-audit/targets.json
@@ -512,7 +512,7 @@
},
{
"component": "richtext/RichTextEditor",
- "storyId": "lab-richtexteditor--error-status",
+ "storyId": "richtext-richtexteditor--error-status",
"dims": ["D4"],
"selectors": {
"overlay": ".astryx-rich-text-editor > div:first-child > div:last-child",
@@ -521,7 +521,7 @@
},
{
"component": "richtext/RichTextEditorToolbar",
- "storyId": "lab-richtexteditor--with-toolbar",
+ "storyId": "richtext-richtexteditor--with-toolbar",
"dims": ["D2"],
"selectors": {
"prev": "[role=\"group\"][aria-label=\"Formatting actions\"] button:first-of-type",
@@ -530,12 +530,12 @@
},
{
"component": "richtext/RichTextEditorAutoLinkPlugin",
- "storyId": "lab-richtexteditor--with-auto-link",
+ "storyId": "richtext-richtexteditor--with-auto-link",
"dims": []
},
{
"component": "richtext/RichTextView",
- "storyId": "lab-richtexteditor--markdown-serializers",
+ "storyId": "richtext-richtexteditor--markdown-serializers",
"dims": []
},
{
diff --git a/apps/storybook/stories/RichTextEditor.playground.tsx b/apps/storybook/stories/RichTextEditor.playground.tsx
index 640b0884b8..7825f3edd6 100644
--- a/apps/storybook/stories/RichTextEditor.playground.tsx
+++ b/apps/storybook/stories/RichTextEditor.playground.tsx
@@ -9,7 +9,7 @@
* @output `RichTextEditorPlayground`: ONE editor with every RichText feature
* switchable around it, and the live Markdown, HTML, editor-state, node-tree
* and RichTextView readouts of that same editor beside it.
- * @position Storybook-only sandbox for the Lab/RichTextEditor Playground story
+ * @position Storybook-only sandbox for the RichText/RichTextEditor Playground story
* — the Astryx counterpart of playground.lexical.dev. Every other story
* mounts its own editor to show one feature; this one exists so features can
* be combined on a single document and watched for interactions (a toolbar
diff --git a/apps/storybook/stories/RichTextEditor.stories.tsx b/apps/storybook/stories/RichTextEditor.stories.tsx
index 5bbf1124a0..706ef85ec0 100644
--- a/apps/storybook/stories/RichTextEditor.stories.tsx
+++ b/apps/storybook/stories/RichTextEditor.stories.tsx
@@ -24,7 +24,7 @@ import {MarkdownPluginsSandbox} from './RichTextEditor.markdownPlugins';
import {RichTextEditorPlayground} from './RichTextEditor.playground';
const meta: Meta<typeof RichTextEditor> = {
- title: 'Lab/RichTextEditor',
+ title: 'RichText/RichTextEditor',
component: RichTextEditor,
tags: ['autodocs'],
argTypes: {
diff --git a/docs/families/input-fields.md b/docs/families/input-fields.md
index 68e7667c6c..f3bc0f523c 100644
--- a/docs/families/input-fields.md
+++ b/docs/families/input-fields.md
@@ -77,8 +77,8 @@ form value through a labeled field surface with a content lane. Members use
models without this content/end-lane geometry. PowerSearch and ChatComposer
are higher-level compositions that consume member behavior rather than define
another field primitive. BaseTypeahead is a combobox engine without a field
- surface. RichTextEditor is a canary package and stays outside this family
- until a family adoption is recorded.
+ surface. RichTextEditor stays outside this family until a family adoption is
+ recorded.
FR10 and DEC-7 also bind CheckboxList, RadioList, and Slider. They stay
outside this family's geometry rules, but they compose Field, and every
diff --git a/docs/specs/AST-061-document-surface-parity/spec.md b/docs/specs/AST-061-document-surface-parity/spec.md
index d000dec7ae..bf4abb828d 100644
--- a/docs/specs/AST-061-document-surface-parity/spec.md
+++ b/docs/specs/AST-061-document-surface-parity/spec.md
@@ -42,7 +42,9 @@ reflows no line; only editing affordances appear or disappear.
- Which editor engine a product chooses for editing whole documents, and the
value that product stores. This record governs how the surfaces render the
same document; RichText's own role and value are DEC-7.
-- RichText's release channel. RichText stays canary-only.
+- RichText's release channel. Package release-channel metadata decides it
+ (spec:AST-033 FR4), and promotion follows spec:AST-017 FR23; this record
+ does not.
- Equivalent internal implementations remain valid when they satisfy this
contract, except the character reference decoder, which DEC-5 makes one
shared public function.
diff --git a/internal/lab-readiness/audit.test.mjs b/internal/lab-readiness/audit.test.mjs
index 0864142005..a0014b5e9a 100644
--- a/internal/lab-readiness/audit.test.mjs
+++ b/internal/lab-readiness/audit.test.mjs
@@ -372,6 +372,7 @@ describe('CI wiring parsers', () => {
'core-',
'lab-',
'charts-',
+ 'richtext-',
'vega-',
]);
});
diff --git a/packages/lab/src/index.ts b/packages/lab/src/index.ts
index 86ba68beb4..7da5ac1a29 100644
--- a/packages/lab/src/index.ts
+++ b/packages/lab/src/index.ts
@@ -267,7 +267,6 @@ export {
type MobileTokenizerChange,
} from './MobileTokenizer';
-// RichTextEditor (RFC facebook/astryx#3899) has graduated out of @astryxdesign/lab
-// into its own canary-only package, @astryxdesign/richtext, so it can be canaried
-// independently by an adopting application. Import it from there:
+// RichTextEditor (RFC facebook/astryx#3899) moved out of @astryxdesign/lab into
+// its own package, @astryxdesign/richtext. Import it from there:
// import {RichTextEditor, RichTextView} from '@astryxdesign/richtext';
diff --git a/packages/richtext/README.md b/packages/richtext/README.md
index 9344b0ea93..4500206caf 100644
--- a/packages/richtext/README.md
+++ b/packages/richtext/README.md
@@ -12,11 +12,15 @@ import {RichTextEditor, RichTextView} from '@astryxdesign/richtext';
The editor is deliberately minimal and extensible: pass `nodes` and `plugins` to
layer richer behaviour (toolbars, mentions, hover cards) on top without forking.
-`RichTextEditorToolbar` is a composable formatting toolbar that drops into the
-editor's `plugins` slot, and `markdownToEditorStateJSON` /
-`editorStateJSONToMarkdown` convert Markdown to/from serialized editor state
-headlessly (no mounted editor required). It consumes `@astryxdesign/core` theme
-tokens directly (StyleX build mirrors `@astryxdesign/lab` / `@astryxdesign/charts`).
+`RichTextEditorToolbar` is a composable formatting toolbar for the editor's
+`toolbar` slot, and `markdownToEditorStateJSON` / `editorStateJSONToMarkdown`
+convert Markdown to and from serialized editor state headlessly (no mounted
+editor required). The server-safe serializers are also available from
+`@astryxdesign/richtext/markdown`.
+
+`RichTextView` and core `Markdown` render the same document the same way, and
+Markdown imported into the editor exports back byte for byte when nothing was
+edited.
## Built on Lexical
@@ -34,66 +38,27 @@ package manager does not add them: install them at that minor alongside
richtext. See the RFC:
[facebook/astryx#3899](https://github.com/facebook/astryx/issues/3899).
-It ships to npm **only under the `@canary` dist-tag** — there is never a stable
-(`latest`) release yet.
-
-> Note: this package is the successor to the experimental `RichTextEditor` that
-> used to live in `@astryxdesign/lab`; that code has moved here so it can be
-> canaried independently by an adopting application without a fresh package
-> rollout.
-
-## Status
+## Install
-Under active development. The editor, view, composable toolbar, and Markdown
-serializers are in place; API and visuals are still being refined. The goal is
-graduation to `@astryxdesign/core` after the design/API stabilizes.
+```bash
+npm install @astryxdesign/richtext @astryxdesign/core
+```
-## Usage
+Then install every `lexical` and `@lexical/*` package listed in richtext's
+`peerDependencies`, at the range shown there (`npm view @astryxdesign/richtext
+peerDependencies` prints them).
-Inside the monorepo (storybook/sandbox), imports resolve via pnpm workspaces:
+`@astryxdesign/richtext` is released together with `@astryxdesign/core` at the
+same version; install matching versions. `lexical` and the `@lexical/*` packages
+are optional peer dependencies, so a project that only uses the headless
+Markdown serializers installs just those.
```tsx
-import {RichTextEditor, RichTextView} from '@astryxdesign/richtext';
import '@astryxdesign/core/astryx.css';
import '@astryxdesign/richtext/richtext.css';
```
-Interactive examples live in the storybook app under **Lab/RichTextEditor**
-(`apps/storybook/stories/RichTextEditor.stories.tsx`).
-
-### Trying richtext in your own project (canary)
+## Examples
-`@astryxdesign/richtext` is published **only** under the `@canary` dist-tag, so
-you must request that tag explicitly. There is no `latest` version to install.
-
-```bash
-npm install @astryxdesign/richtext@canary @astryxdesign/core@canary
-```
-
-Then install every `lexical` and `@lexical/*` package listed in richtext's
-`peerDependencies`, at the range shown there (`npm view
-@astryxdesign/richtext@canary peerDependencies` prints them).
-
-> Canary builds track the latest commit on `main` (`0.x.y-canary.<sha>`). They
-> can break between any two versions — pin an exact version if you need
-> stability.
-
-## Why no stable release?
-
-`package.json` keeps `"private": true` plus an `"astryx": { "canaryOnly": true }`
-marker. The release workflow's stable (`latest`) job skips both private and
-`canaryOnly` packages, while the canary job strips `private` in its ephemeral CI
-checkout only (never in git) to publish the `@canary` tag. The committed
-`private: true` is npm's hard guarantee that no stable publish can ever happen —
-**do not remove it.**
-
-## Publishing publicly (when the editor/view are ready)
-
-When maintainers are ready to promote richtext to a stable public release:
-
-1. Remove `"private": true` **and** the `"astryx": { "canaryOnly": true }`
- marker from `package.json`.
-2. Add a changeset (`pnpm changeset`) selecting `@astryxdesign/richtext` so the
- release workflow versions and publishes it to the `latest` dist-tag.
-3. The stable (`latest`) release job (`.github/workflows/release.yml`) will then
- include richtext on the next release.
+Interactive examples live in Storybook under **RichText/RichTextEditor**
+(`apps/storybook/stories/RichTextEditor.stories.tsx`).
diff --git a/packages/richtext/package.json b/packages/richtext/package.json
index c2cee9090b..573d2a0761 100644
--- a/packages/richtext/package.json
+++ b/packages/richtext/package.json
@@ -1,9 +1,8 @@
{
"name": "@astryxdesign/richtext",
"displayName": "Rich Text",
- "version": "0.1.9",
- "private": true,
- "description": "Astryx rich text — a Lexical-based rich text editor and viewer. Published to npm only under the @canary dist-tag for early testing; never released as a stable (latest) version.",
+ "version": "0.7.1",
+ "description": "Astryx rich text — a Lexical-based rich text editor and viewer, styled with Astryx design tokens.",
"author": "Meta Open Source",
"license": "MIT",
"homepage": "https://github.com/facebook/astryx#readme",
@@ -23,10 +22,6 @@
"lexical",
"design-system"
],
- "astryx": {
- "canaryOnly": true,
- "_comment": "Published ONLY to the @canary dist-tag (see .github/workflows/release.yml). Never released as a stable `latest` release. `private: true` is intentional and must stay — it is npm\"s hard guarantee against an accidental stable publish."
- },
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
diff --git a/packages/richtext/src/RichTextEditor.doc.mjs b/packages/richtext/src/RichTextEditor.doc.mjs
index ca6cd7d983..84f171f1a8 100644
--- a/packages/richtext/src/RichTextEditor.doc.mjs
+++ b/packages/richtext/src/RichTextEditor.doc.mjs
@@ -179,7 +179,7 @@ export const docs = {
},
usage: {
description:
- 'A WYSIWYG rich-text editor built on Lexical, styled with Astryx design tokens. Its field container shares TextArea input visuals for the resting border, hover ring, focus-within ring, disabled state, and status colors. Experimental component in @astryxdesign/richtext (canary). lexical and @lexical/* are optional peer dependencies. The editor is deliberately minimal and extensible: pass toolbar, nodes, and plugins to layer richer behaviour (formatting, mentions, hover cards) on top without forking. Use RichTextView to render serialized content read-only.',
+ 'A WYSIWYG rich-text editor built on Lexical, styled with Astryx design tokens. Its field container shares TextArea input visuals for the resting border, hover ring, focus-within ring, disabled state, and status colors. Ships from @astryxdesign/richtext; lexical and @lexical/* are optional peer dependencies. The editor is deliberately minimal and extensible: pass toolbar, nodes, and plugins to layer richer behaviour (formatting, mentions, hover cards) on top without forking. Use RichTextView to render serialized content read-only.',
bestPractices: [
{
guidance: true,
diff --git a/packages/richtext/src/RichTextEditor.tsx b/packages/richtext/src/RichTextEditor.tsx
index 0ac93d9aa5..13fae1f0ea 100644
--- a/packages/richtext/src/RichTextEditor.tsx
+++ b/packages/richtext/src/RichTextEditor.tsx
@@ -11,7 +11,7 @@
* top toolbar slot, configurable editable-surface minimum height, and distinct
* read-only and disabled states that follow prop changes, RichTextEditorProps,
* RichTextEditorStatus, RichTextEditorStatusType, RichTextEditorSize
- * @position Experimental (richtext) implementation; consumed by the package index.ts and
+ * @position @astryxdesign/richtext implementation; consumed by the package index.ts and
* re-exported from @astryxdesign/richtext. Tested by RichTextEditor.test.tsx.
*
* SYNC: When modified, update these files to stay in sync:
@@ -20,11 +20,8 @@
* - /packages/richtext/src/index.ts (exports if types change)
* - /apps/storybook/stories/RichTextEditor.stories.tsx (storybook stories)
*
- * NOTE: This is an EXPERIMENTAL component in @astryxdesign/richtext (published only under
- * the `@canary` dist-tag, never as stable `latest`). It is the initial landing for the
- * OSS Lexical editor RFC; the goal is graduation to @astryxdesign/core after the
- * Component Specification Protocol. `lexical` and `@lexical/*` are OPTIONAL peer
- * dependencies — install them to use this component.
+ * NOTE: `lexical` and `@lexical/*` are OPTIONAL peer dependencies — install them to
+ * use this component.
*/
import {
@@ -473,9 +470,8 @@ export interface RichTextEditorProps extends Omit<
/**
* A WYSIWYG rich-text editor built on Lexical, styled with Astryx design
- * tokens. Experimental — ships from `@astryxdesign/richtext` (canary). `lexical` and
- * `@lexical/*` are optional peer dependencies — install them to use this
- * component.
+ * tokens. Ships from `@astryxdesign/richtext`. `lexical` and `@lexical/*` are
+ * optional peer dependencies — install them to use this component.
*
* The editor is intentionally minimal and extensible: pass `toolbar`, `nodes`,
* and `plugins` to layer richer behaviour (formatting, mentions, hover cards)
diff --git a/packages/richtext/src/RichTextEditorAutoLinkPlugin.tsx b/packages/richtext/src/RichTextEditorAutoLinkPlugin.tsx
index f9585603f1..3dd7c5c03a 100644
--- a/packages/richtext/src/RichTextEditorAutoLinkPlugin.tsx
+++ b/packages/richtext/src/RichTextEditorAutoLinkPlugin.tsx
@@ -9,7 +9,7 @@
* `linkUtils`.
* @output Exports `RichTextEditorAutoLinkPlugin` and its props type, plus the
* default `DEFAULT_LINK_MATCHERS`.
- * @position Experimental (richtext). Drop into RichTextEditor's `plugins` slot to
+ * @position @astryxdesign/richtext. Drop into RichTextEditor's `plugins` slot to
* auto-linkify URLs and emails as they are typed or pasted. Requires
* `AutoLinkNode` to be registered (it is, by default).
*
@@ -19,8 +19,8 @@
* - /packages/richtext/src/RichTextEditor.test.tsx (tests)
* - /apps/storybook/stories/RichTextEditor.stories.tsx (story)
*
- * NOTE: Experimental `@astryxdesign/richtext` component (canary). `lexical` and
- * `@lexical/*` are OPTIONAL peer dependencies — install them to use this.
+ * NOTE: `lexical` and `@lexical/*` are OPTIONAL peer dependencies — install them
+ * to use this.
*
* COMPATIBILITY: the plugin is deliberately a thin pass-through so an
* application with its own link conventions can adopt it without forking. It
diff --git a/packages/richtext/src/RichTextEditorToolbar.tsx b/packages/richtext/src/RichTextEditorToolbar.tsx
index a52a0962c3..1e90fe4114 100644
--- a/packages/richtext/src/RichTextEditorToolbar.tsx
+++ b/packages/richtext/src/RichTextEditorToolbar.tsx
@@ -11,7 +11,7 @@
* @output Exports RichTextEditorToolbar (a compact formatting toolbar with a
* RichText-owned 4px control gutter and horizontally scrollable action row)
* and RichTextEditorToolbarProps.
- * @position Experimental (richtext). Drop into RichTextEditor's `toolbar` slot to
+ * @position @astryxdesign/richtext. Drop into RichTextEditor's `toolbar` slot to
* add a flush top formatting toolbar. Themed via Astryx Toolbar, Selector,
* IconButton, and ToggleButton, so it inherits the active theme. Base props
* pass through to the Astryx Toolbar exactly as Toolbar places them
@@ -23,8 +23,8 @@
* - /packages/richtext/src/RichTextEditor.test.tsx (tests)
* - /apps/storybook/stories/RichTextEditor.stories.tsx (WithToolbar story)
*
- * NOTE: Experimental `@astryxdesign/richtext` component (canary). `lexical` and
- * `@lexical/*` are OPTIONAL peer dependencies — install them to use this.
+ * NOTE: `lexical` and `@lexical/*` are OPTIONAL peer dependencies — install them
+ * to use this.
* Behavior mirrors the Lexical playground toolbar (selection sync + format
* commands); the UI is built from Astryx primitives so it matches the theme.
*
diff --git a/packages/richtext/src/RichTextView.tsx b/packages/richtext/src/RichTextView.tsx
index 89f1196d42..825461fd6c 100644
--- a/packages/richtext/src/RichTextView.tsx
+++ b/packages/richtext/src/RichTextView.tsx
@@ -10,7 +10,7 @@
* @output Exports RichTextView component and RichTextViewProps
* @position Read-only renderer for serialized Lexical editor state, exposed to
* assistive technology as document content rather than a form field;
- * experimental (richtext), exported from @astryxdesign/richtext
+ * exported from @astryxdesign/richtext
*
* SYNC: When modified, update these files to stay in sync:
* - /packages/richtext/src/RichTextEditor.test.tsx
diff --git a/packages/richtext/src/__tests__/MarkdownParitySandbox.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/MarkdownParitySandbox.a11y.chromium.spec.ts
index ec3ec5687b..0142129c44 100644
--- a/packages/richtext/src/__tests__/MarkdownParitySandbox.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/MarkdownParitySandbox.a11y.chromium.spec.ts
@@ -34,10 +34,10 @@ import {
const OUTPUT = path.resolve('test-results/richtext-markdown-parity');
const STORY = {
- sideBySide: 'lab-richtexteditor--markdown-parity',
- toggle: 'lab-richtexteditor--markdown-parity-toggle',
- overlay: 'lab-richtexteditor--markdown-parity-overlay',
- longDocument: 'lab-richtexteditor--markdown-parity-long-document',
+ sideBySide: 'richtext-richtexteditor--markdown-parity',
+ toggle: 'richtext-richtexteditor--markdown-parity-toggle',
+ overlay: 'richtext-richtexteditor--markdown-parity-overlay',
+ longDocument: 'richtext-richtexteditor--markdown-parity-long-document',
} as const;
/** The exemptions the repository's Storybook axe audit already makes. */
@@ -315,7 +315,7 @@ test('a rule at either edge of the document adds no outer margin', async ({
}) => {
await page.setViewportSize(DESKTOP);
await page.goto(
- `${storybook.origin}/iframe.html?id=lab-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
+ `${storybook.origin}/iframe.html?id=richtext-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
{waitUntil: 'load'},
);
await page.locator('textarea').fill('---\n\nBetween the rules.\n\n---');
@@ -542,7 +542,7 @@ test('task items own their checkboxes, keep link tab order, and toggle by keyboa
}) => {
await page.setViewportSize(DESKTOP);
await page.goto(
- `${storybook.origin}/iframe.html?id=lab-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
+ `${storybook.origin}/iframe.html?id=richtext-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
{waitUntil: 'load'},
);
await page
@@ -842,7 +842,7 @@ test('code blocks wrap long lines at phone width and copy from the keyboard', as
await context.grantPermissions(['clipboard-read', 'clipboard-write']);
await page.setViewportSize(PHONE);
await page.goto(
- `${storybook.origin}/iframe.html?id=lab-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
+ `${storybook.origin}/iframe.html?id=richtext-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
{waitUntil: 'load'},
);
const token = 'x'.repeat(160);
@@ -955,7 +955,7 @@ for (const globals of [
test(`list markers cycle by depth (${globals})`, async ({page}) => {
await page.setViewportSize(DESKTOP);
await page.goto(
- `${storybook.origin}/iframe.html?id=lab-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;${globals}`,
+ `${storybook.origin}/iframe.html?id=richtext-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;${globals}`,
{waitUntil: 'load'},
);
const depths = Array.from({length: 9}, (_, depth) => depth);
@@ -1061,7 +1061,7 @@ test('struck text is a deletion around its other marks, and stays one while edit
}) => {
await page.setViewportSize(DESKTOP);
await page.goto(
- `${storybook.origin}/iframe.html?id=lab-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
+ `${storybook.origin}/iframe.html?id=richtext-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
{waitUntil: 'load'},
);
await page
@@ -1292,7 +1292,7 @@ for (const globals of [
test('edited code is colored again as it changes', async ({page}) => {
await page.setViewportSize(DESKTOP);
await page.goto(
- `${storybook.origin}/iframe.html?id=lab-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
+ `${storybook.origin}/iframe.html?id=richtext-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
{waitUntil: 'load'},
);
await page.locator('textarea').fill('```ts\nlet value = 1;\n```');
@@ -1330,7 +1330,7 @@ test('bold italic text is emphasis and strong in the editor and the view', async
}) => {
await page.setViewportSize(DESKTOP);
await page.goto(
- `${storybook.origin}/iframe.html?id=lab-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
+ `${storybook.origin}/iframe.html?id=richtext-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
{waitUntil: 'load'},
);
await page.locator('textarea').fill('Keep ***both*** and **bold** here.');
@@ -1351,7 +1351,7 @@ test('nested numbered lists keep their start in the editor and the view', async
}) => {
await page.setViewportSize(DESKTOP);
await page.goto(
- `${storybook.origin}/iframe.html?id=lab-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
+ `${storybook.origin}/iframe.html?id=richtext-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:ltr`,
{waitUntil: 'load'},
);
await page
@@ -1398,7 +1398,7 @@ for (const viewport of [PHONE, {width: 1280, height: 900}] as const) {
}) => {
await page.setViewportSize(viewport);
await page.goto(
- `${storybook.origin}/iframe.html?id=lab-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;${globals}`,
+ `${storybook.origin}/iframe.html?id=richtext-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;${globals}`,
{waitUntil: 'load'},
);
for (const columnCount of [2, 20]) {
@@ -1870,7 +1870,7 @@ for (const direction of ['ltr', 'rtl'] as const) {
}) => {
await page.setViewportSize(DESKTOP);
await page.goto(
- `${storybook.origin}/iframe.html?id=lab-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:${direction}`,
+ `${storybook.origin}/iframe.html?id=richtext-richtexteditor--markdown-serializers&viewMode=story&globals=astryxTheme:neutral;colorMode:light;direction:${direction}`,
{waitUntil: 'load'},
);
await page
diff --git a/packages/richtext/src/__tests__/MarkdownPlugins.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/MarkdownPlugins.a11y.chromium.spec.ts
index 8f4a54fcda..2624c623ac 100644
--- a/packages/richtext/src/__tests__/MarkdownPlugins.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/MarkdownPlugins.a11y.chromium.spec.ts
@@ -2,7 +2,7 @@
/**
* @file MarkdownPlugins.a11y.chromium.spec.ts
- * @input The built Storybook's Lab/RichTextEditor "Markdown plugins" story.
+ * @input The built Storybook's RichText/RichTextEditor "Markdown plugins" story.
* @output Real-browser proof for spec:AST-064 FR7 and FR8: a plugin node
* renders the same DOM and accessibility in core Markdown, RichTextView, and
* RichTextEditor, and the editor moves over, selects, deletes, restores,
@@ -22,7 +22,7 @@ import {
} from '@astryxdesign/a11y-spec/storybook';
const STORYBOOK_DIR = process.env.ASTRYX_STORYBOOK_DIR ?? DEFAULT_STORYBOOK_DIR;
-const STORY = 'lab-richtexteditor--markdown-plugins';
+const STORY = 'richtext-richtexteditor--markdown-plugins';
let storybook: StaticServer;
diff --git a/packages/richtext/src/__tests__/MarkdownPluginsImportExport.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/MarkdownPluginsImportExport.a11y.chromium.spec.ts
index bc92165b91..d49a367477 100644
--- a/packages/richtext/src/__tests__/MarkdownPluginsImportExport.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/MarkdownPluginsImportExport.a11y.chromium.spec.ts
@@ -23,7 +23,7 @@ import {
} from '@astryxdesign/a11y-spec/storybook';
const STORYBOOK_DIR = process.env.ASTRYX_STORYBOOK_DIR ?? DEFAULT_STORYBOOK_DIR;
-const STORY = 'lab-richtexteditor--markdown-plugins-import-export';
+const STORY = 'richtext-richtexteditor--markdown-plugins-import-export';
let storybook: StaticServer;
diff --git a/packages/richtext/src/__tests__/Playground.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/Playground.a11y.chromium.spec.ts
index 07ffd2894e..0c373109e0 100644
--- a/packages/richtext/src/__tests__/Playground.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/Playground.a11y.chromium.spec.ts
@@ -2,7 +2,7 @@
/**
* @file Playground.a11y.chromium.spec.ts
- * @input The built Storybook's Lab/RichTextEditor "Playground" story.
+ * @input The built Storybook's RichText/RichTextEditor "Playground" story.
* @output Real-browser proof that the playground is ONE editor carrying every
* feature at once: the seeded document brings every block type, each
* readout reports that same editor, switching a feature on or off leaves a
@@ -27,7 +27,7 @@ import {
} from '@astryxdesign/a11y-spec/storybook';
const STORYBOOK_DIR = process.env.ASTRYX_STORYBOOK_DIR ?? DEFAULT_STORYBOOK_DIR;
-const STORY = 'lab-richtexteditor--playground';
+const STORY = 'richtext-richtexteditor--playground';
/** The one editable surface the whole page is about. */
const EDITOR = '[data-playground-editor] [role="textbox"]';
diff --git a/packages/richtext/src/__tests__/RichTextEditorToolbar.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/RichTextEditorToolbar.a11y.chromium.spec.ts
index 4c47c915fc..3570469717 100644
--- a/packages/richtext/src/__tests__/RichTextEditorToolbar.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/RichTextEditorToolbar.a11y.chromium.spec.ts
@@ -22,7 +22,7 @@ import {
} from '@astryxdesign/a11y-spec/storybook';
const STORYBOOK_DIR = process.env.ASTRYX_STORYBOOK_DIR ?? DEFAULT_STORYBOOK_DIR;
-const STORY = 'lab-richtexteditor--with-toolbar';
+const STORY = 'richtext-richtexteditor--with-toolbar';
let storybook: StaticServer;
diff --git a/packages/richtext/src/__tests__/RichTextView.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/RichTextView.a11y.chromium.spec.ts
index 8502c53936..0b13cdd778 100644
--- a/packages/richtext/src/__tests__/RichTextView.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/RichTextView.a11y.chromium.spec.ts
@@ -21,7 +21,7 @@ import {
} from '@astryxdesign/a11y-spec/storybook';
const STORYBOOK_DIR = process.env.ASTRYX_STORYBOOK_DIR ?? DEFAULT_STORYBOOK_DIR;
-const STORY = 'lab-richtexteditor--markdown-serializers';
+const STORY = 'richtext-richtexteditor--markdown-serializers';
const DOCUMENT = [
'Paragraph text',
'',
diff --git a/packages/richtext/src/linkUtils.ts b/packages/richtext/src/linkUtils.ts
index a5b57b6845..bffc84a668 100644
--- a/packages/richtext/src/linkUtils.ts
+++ b/packages/richtext/src/linkUtils.ts
@@ -5,7 +5,7 @@
* @input Uses only the DOM URL constructor (guarded via try/catch for SSR/edge).
* @output Exports `sanitizeUrl`, `validateUrl`, and the URL/email matcher regexes
* used by the AutoLink wiring.
- * @position Experimental (richtext) helper shared by RichTextEditorToolbar (link
+ * @position @astryxdesign/richtext helper shared by RichTextEditorToolbar (link
* button) and the AutoLink matchers in RichTextEditor. Kept dependency-free so
* both can import it without pulling in extra `@lexical/*` surface.
*
diff --git a/packages/richtext/src/markdownSerializers.ts b/packages/richtext/src/markdownSerializers.ts
index 9bfc1752ed..5cdd0e727c 100644
--- a/packages/richtext/src/markdownSerializers.ts
+++ b/packages/richtext/src/markdownSerializers.ts
@@ -17,9 +17,8 @@
* - /packages/richtext/src/RichTextEditor.test.tsx (tests)
*
* NOTE: `@lexical/headless`, `@lexical/markdown`, and `lexical` are OPTIONAL
- * peer dependencies (this is a canary lab module). Install them to use these
- * helpers. `@lexical/headless` runs Lexical without a DOM, so these work in
- * Node / SSR contexts.
+ * peer dependencies. Install them to use these helpers. `@lexical/headless`
+ * runs Lexical without a DOM, so these work in Node / SSR contexts.
*/
import {createHeadlessEditor} from '@lexical/headless';
diff --git a/scripts/component-packages.cjs b/scripts/component-packages.cjs
index 6ca7e88956..99cd885cdc 100644
--- a/scripts/component-packages.cjs
+++ b/scripts/component-packages.cjs
@@ -49,8 +49,8 @@ const COMPONENT_PACKAGES = Object.freeze([
name: 'richtext',
src: 'packages/richtext/src',
layout: 'flat',
- storyPrefixes: ['lab-'],
- storyNamespaces: ['Lab'],
+ storyPrefixes: ['richtext-'],
+ storyNamespaces: ['RichText'],
},
{
name: 'vega',