@astryxdesign/richtext 0.7.1-canary.df75749 → 0.7.1-canary.e71c4e9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -4
- package/package.json +4 -4
- package/src/RichTextEditor.doc.mjs +1 -1
package/README.md
CHANGED
|
@@ -18,8 +18,20 @@ editor's `plugins` slot, and `markdownToEditorStateJSON` /
|
|
|
18
18
|
headlessly (no mounted editor required). It consumes `@astryxdesign/core` theme
|
|
19
19
|
tokens directly (StyleX build mirrors `@astryxdesign/lab` / `@astryxdesign/charts`).
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
## Built on Lexical
|
|
22
|
+
|
|
23
|
+
RichText is built on [Lexical](https://lexical.dev) and does not hide it:
|
|
24
|
+
`nodes` and `transformers` take Lexical types, `plugins` takes Lexical React
|
|
25
|
+
plugins, and `onChange(editorState, editor)` and the editor ref's
|
|
26
|
+
`getEditorState()` report Lexical types, so you extend the editor with Lexical
|
|
27
|
+
directly. The value you store is serialized Lexical editor state;
|
|
28
|
+
`markdownToEditorStateJSON` and `editorStateJSONToMarkdown` convert it to and
|
|
29
|
+
from Markdown.
|
|
30
|
+
|
|
31
|
+
RichText supports one Lexical minor at a time, named by its `lexical` and
|
|
32
|
+
`@lexical/*` peer ranges. Those are **optional** peer dependencies, so your
|
|
33
|
+
package manager does not add them: install them at that minor alongside
|
|
34
|
+
richtext. See the RFC:
|
|
23
35
|
[facebook/astryx#3899](https://github.com/facebook/astryx/issues/3899).
|
|
24
36
|
|
|
25
37
|
It ships to npm **only under the `@canary` dist-tag** — there is never a stable
|
|
@@ -56,10 +68,12 @@ you must request that tag explicitly. There is no `latest` version to install.
|
|
|
56
68
|
|
|
57
69
|
```bash
|
|
58
70
|
npm install @astryxdesign/richtext@canary @astryxdesign/core@canary
|
|
59
|
-
# plus the optional lexical peers you use:
|
|
60
|
-
npm install lexical @lexical/react @lexical/markdown @lexical/rich-text
|
|
61
71
|
```
|
|
62
72
|
|
|
73
|
+
Then install every `lexical` and `@lexical/*` package listed in richtext's
|
|
74
|
+
`peerDependencies`, at the range shown there (`npm view
|
|
75
|
+
@astryxdesign/richtext@canary peerDependencies` prints them).
|
|
76
|
+
|
|
63
77
|
> Canary builds track the latest commit on `main` (`0.x.y-canary.<sha>`). They
|
|
64
78
|
> can break between any two versions — pin an exact version if you need
|
|
65
79
|
> stability.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/richtext",
|
|
3
3
|
"displayName": "Rich Text",
|
|
4
|
-
"version": "0.7.1-canary.
|
|
4
|
+
"version": "0.7.1-canary.e71c4e9",
|
|
5
5
|
"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.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
7
7
|
"license": "MIT",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@stylexjs/stylex": ">=0.10.0",
|
|
58
|
-
"@astryxdesign/core": "0.7.1-canary.
|
|
58
|
+
"@astryxdesign/core": "0.7.1-canary.e71c4e9",
|
|
59
59
|
"react": ">=19.0.0",
|
|
60
60
|
"react-dom": ">=19.0.0",
|
|
61
61
|
"lexical": "^0.46.0",
|
|
@@ -114,8 +114,8 @@
|
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
|
-
"@astryxdesign/a11y-spec": "0.7.1-canary.
|
|
118
|
-
"@astryxdesign/cli": "0.7.1-canary.
|
|
117
|
+
"@astryxdesign/a11y-spec": "0.7.1-canary.e71c4e9",
|
|
118
|
+
"@astryxdesign/cli": "0.7.1-canary.e71c4e9",
|
|
119
119
|
"@babel/cli": "^7.29.7",
|
|
120
120
|
"@babel/core": "^7.29.7",
|
|
121
121
|
"@babel/preset-react": "^7.29.7",
|
|
@@ -184,7 +184,7 @@ export const docs = {
|
|
|
184
184
|
{
|
|
185
185
|
guidance: true,
|
|
186
186
|
description:
|
|
187
|
-
'Install lexical and @lexical
|
|
187
|
+
'RichText is built on Lexical and exposes it: nodes and transformers take Lexical types, plugins takes Lexical React plugins, and onChange and getEditorState() report Lexical types. Install the lexical and @lexical/* peers (optional peers) at the Lexical minor named in the package peer ranges before importing from @astryxdesign/richtext.',
|
|
188
188
|
},
|
|
189
189
|
{
|
|
190
190
|
guidance: true,
|