@astryxdesign/richtext 0.6.5-canary.f261d2f → 0.6.5-canary.f27f749

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 CHANGED
@@ -27,7 +27,8 @@ It ships to npm **only under the `@canary` dist-tag** — there is never a stabl
27
27
 
28
28
  > Note: this package is the successor to the experimental `RichTextEditor` that
29
29
  > used to live in `@astryxdesign/lab`; that code has moved here so it can be
30
- > canaried independently (e.g. into EPS/Nest) without a fresh package rollout.
30
+ > canaried independently by an adopting application without a fresh package
31
+ > rollout.
31
32
 
32
33
  ## Status
33
34
 
@@ -18,22 +18,21 @@
18
18
  * NOTE: Experimental `@astryxdesign/richtext` component (canary). `lexical` and
19
19
  * `@lexical/*` are OPTIONAL peer dependencies — install them to use this.
20
20
  *
21
- * COMPATIBILITY: astryx aims for its RichTextEditor internals to eventually
22
- * back Meta's EPS `EPSRichTextArea` (nest/libs/eps-lexical). EPS's auto-link is
23
- * matcher-driven and applies `target="_blank"` + `rel="noopener noreferrer"` to
24
- * created links (its `NEW_TAB_LINK_ATTRIBUTES`). This plugin uses the same
25
- * matcher shape (`createLinkMatcherWithRegExp` + `attributes`) and the same
26
- * new-tab defaults, so EPS can pass its own richer matcher set (e.g. shortform
27
- * `D123` / `T456` / `S789` intern URLs) through the `matchers` prop without
28
- * changing the contract. EPS ships a hardened fork of the transform itself
29
- * (expanded separators, code-block exclusion) — astryx stays on the OSS
30
- * `AutoLinkPlugin`, and EPS can substitute its own plugin in the same slot.
21
+ * COMPATIBILITY: the plugin is deliberately a thin pass-through so an
22
+ * application with its own link conventions can adopt it without forking. It
23
+ * uses the stock matcher shape (`createLinkMatcherWithRegExp` + `attributes`)
24
+ * and new-tab defaults, so a consumer supplies a richer matcher set — an
25
+ * application-specific identifier or ticket syntax, say — through the
26
+ * `matchers` prop without changing the contract. An application needing a
27
+ * hardened transform (expanded separators, code-block exclusion) substitutes
28
+ * its own plugin in the same slot; astryx stays on the upstream
29
+ * `AutoLinkPlugin`.
31
30
  */
32
31
  import { type LinkMatcher } from '@lexical/react/LexicalAutoLinkPlugin';
33
32
  /**
34
33
  * Attributes written onto every auto-created link so it opens in a new tab.
35
34
  * `rel="noopener noreferrer"` is required whenever `target="_blank"` is set, to
36
- * prevent reverse-tabnabbing. Matches EPS eps-lexical's `NEW_TAB_LINK_ATTRIBUTES`.
35
+ * prevent reverse-tabnabbing.
37
36
  */
38
37
  export declare const NEW_TAB_LINK_ATTRIBUTES: {
39
38
  readonly target: "_blank";
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextEditorAutoLinkPlugin.d.ts","sourceRoot":"","sources":["../src/RichTextEditorAutoLinkPlugin.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,sCAAsC,CAAC;AAG9C;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;CAG1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,EAc9C,CAAC;AAEF,MAAM,WAAW,iCAAiC;IAChD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACjE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,QAAgC,EAChC,QAAQ,GACT,EAAE,iCAAiC,+BAEnC;yBALe,4BAA4B"}
1
+ {"version":3,"file":"RichTextEditorAutoLinkPlugin.d.ts","sourceRoot":"","sources":["../src/RichTextEditorAutoLinkPlugin.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,sCAAsC,CAAC;AAG9C;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;CAG1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,EAc9C,CAAC;AAEF,MAAM,WAAW,iCAAiC;IAChD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACjE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,QAAgC,EAChC,QAAQ,GACT,EAAE,iCAAiC,+BAEnC;yBALe,4BAA4B"}
@@ -22,16 +22,15 @@
22
22
  * NOTE: Experimental `@astryxdesign/richtext` component (canary). `lexical` and
23
23
  * `@lexical/*` are OPTIONAL peer dependencies — install them to use this.
24
24
  *
25
- * COMPATIBILITY: astryx aims for its RichTextEditor internals to eventually
26
- * back Meta's EPS `EPSRichTextArea` (nest/libs/eps-lexical). EPS's auto-link is
27
- * matcher-driven and applies `target="_blank"` + `rel="noopener noreferrer"` to
28
- * created links (its `NEW_TAB_LINK_ATTRIBUTES`). This plugin uses the same
29
- * matcher shape (`createLinkMatcherWithRegExp` + `attributes`) and the same
30
- * new-tab defaults, so EPS can pass its own richer matcher set (e.g. shortform
31
- * `D123` / `T456` / `S789` intern URLs) through the `matchers` prop without
32
- * changing the contract. EPS ships a hardened fork of the transform itself
33
- * (expanded separators, code-block exclusion) — astryx stays on the OSS
34
- * `AutoLinkPlugin`, and EPS can substitute its own plugin in the same slot.
25
+ * COMPATIBILITY: the plugin is deliberately a thin pass-through so an
26
+ * application with its own link conventions can adopt it without forking. It
27
+ * uses the stock matcher shape (`createLinkMatcherWithRegExp` + `attributes`)
28
+ * and new-tab defaults, so a consumer supplies a richer matcher set — an
29
+ * application-specific identifier or ticket syntax, say — through the
30
+ * `matchers` prop without changing the contract. An application needing a
31
+ * hardened transform (expanded separators, code-block exclusion) substitutes
32
+ * its own plugin in the same slot; astryx stays on the upstream
33
+ * `AutoLinkPlugin`.
35
34
  */
36
35
  import { AutoLinkPlugin, createLinkMatcherWithRegExp } from '@lexical/react/LexicalAutoLinkPlugin';
37
36
  import { URL_MATCHER, EMAIL_MATCHER, sanitizeUrl } from "./linkUtils.js";
@@ -39,7 +38,7 @@ import { URL_MATCHER, EMAIL_MATCHER, sanitizeUrl } from "./linkUtils.js";
39
38
  /**
40
39
  * Attributes written onto every auto-created link so it opens in a new tab.
41
40
  * `rel="noopener noreferrer"` is required whenever `target="_blank"` is set, to
42
- * prevent reverse-tabnabbing. Matches EPS eps-lexical's `NEW_TAB_LINK_ATTRIBUTES`.
41
+ * prevent reverse-tabnabbing.
43
42
  */
44
43
  import { jsx as _jsx } from "react/jsx-runtime";
45
44
  export const NEW_TAB_LINK_ATTRIBUTES = {
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextEditorToolbar.d.ts","sourceRoot":"","sources":["../src/RichTextEditorToolbar.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAgHf;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;CAgBrB,CAAC;AAwOX,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;IAClD;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,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AW,EACX,OAAc,EACd,YAAY,EACZ,iBAAwB,EACxB,UAAU,GACX,EAAE,0BAA0B,+BA6d5B;yBAree,qBAAqB"}
@@ -431,9 +431,8 @@ export function RichTextEditorToolbar({
431
431
  setActiveFormats(formats);
432
432
 
433
433
  // Link active state — a link is "active" when the caret/selection anchor
434
- // sits inside a LinkNode (or its immediate parent is one). Mirrors the EPS
435
- // eps-lexical toolbar (`$isLinkNode(parent) || $isLinkNode(node)`), which is
436
- // the implementation astryx aims to be swappable with.
434
+ // sits inside a LinkNode (or its immediate parent is one):
435
+ // `$isLinkNode(parent) || $isLinkNode(node)`.
437
436
  const node = selection.anchor.getNode();
438
437
  const parent = node.getParent();
439
438
  const linkNode = $isLinkNode(node) ? node : $isLinkNode(parent) ? parent : null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astryxdesign/richtext",
3
3
  "displayName": "Rich Text",
4
- "version": "0.6.5-canary.f261d2f",
4
+ "version": "0.6.5-canary.f27f749",
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",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@stylexjs/stylex": ">=0.10.0",
53
- "@astryxdesign/core": "0.6.5-canary.f261d2f",
53
+ "@astryxdesign/core": "0.6.5-canary.f27f749",
54
54
  "react": ">=19.0.0",
55
55
  "react-dom": ">=19.0.0",
56
56
  "lexical": "^0.46.0",
@@ -101,7 +101,7 @@
101
101
  }
102
102
  },
103
103
  "devDependencies": {
104
- "@astryxdesign/cli": "0.6.5-canary.f261d2f",
104
+ "@astryxdesign/cli": "0.6.5-canary.f27f749",
105
105
  "@babel/cli": "^7.29.7",
106
106
  "@babel/core": "^7.29.7",
107
107
  "@babel/preset-react": "^7.29.7",
@@ -22,16 +22,15 @@
22
22
  * NOTE: Experimental `@astryxdesign/richtext` component (canary). `lexical` and
23
23
  * `@lexical/*` are OPTIONAL peer dependencies — install them to use this.
24
24
  *
25
- * COMPATIBILITY: astryx aims for its RichTextEditor internals to eventually
26
- * back Meta's EPS `EPSRichTextArea` (nest/libs/eps-lexical). EPS's auto-link is
27
- * matcher-driven and applies `target="_blank"` + `rel="noopener noreferrer"` to
28
- * created links (its `NEW_TAB_LINK_ATTRIBUTES`). This plugin uses the same
29
- * matcher shape (`createLinkMatcherWithRegExp` + `attributes`) and the same
30
- * new-tab defaults, so EPS can pass its own richer matcher set (e.g. shortform
31
- * `D123` / `T456` / `S789` intern URLs) through the `matchers` prop without
32
- * changing the contract. EPS ships a hardened fork of the transform itself
33
- * (expanded separators, code-block exclusion) — astryx stays on the OSS
34
- * `AutoLinkPlugin`, and EPS can substitute its own plugin in the same slot.
25
+ * COMPATIBILITY: the plugin is deliberately a thin pass-through so an
26
+ * application with its own link conventions can adopt it without forking. It
27
+ * uses the stock matcher shape (`createLinkMatcherWithRegExp` + `attributes`)
28
+ * and new-tab defaults, so a consumer supplies a richer matcher set — an
29
+ * application-specific identifier or ticket syntax, say — through the
30
+ * `matchers` prop without changing the contract. An application needing a
31
+ * hardened transform (expanded separators, code-block exclusion) substitutes
32
+ * its own plugin in the same slot; astryx stays on the upstream
33
+ * `AutoLinkPlugin`.
35
34
  */
36
35
 
37
36
  import {
@@ -44,7 +43,7 @@ import {URL_MATCHER, EMAIL_MATCHER, sanitizeUrl} from './linkUtils';
44
43
  /**
45
44
  * Attributes written onto every auto-created link so it opens in a new tab.
46
45
  * `rel="noopener noreferrer"` is required whenever `target="_blank"` is set, to
47
- * prevent reverse-tabnabbing. Matches EPS eps-lexical's `NEW_TAB_LINK_ATTRIBUTES`.
46
+ * prevent reverse-tabnabbing.
48
47
  */
49
48
  export const NEW_TAB_LINK_ATTRIBUTES = {
50
49
  target: '_blank',
@@ -526,9 +526,8 @@ export function RichTextEditorToolbar({
526
526
  setActiveFormats(formats);
527
527
 
528
528
  // Link active state — a link is "active" when the caret/selection anchor
529
- // sits inside a LinkNode (or its immediate parent is one). Mirrors the EPS
530
- // eps-lexical toolbar (`$isLinkNode(parent) || $isLinkNode(node)`), which is
531
- // the implementation astryx aims to be swappable with.
529
+ // sits inside a LinkNode (or its immediate parent is one):
530
+ // `$isLinkNode(parent) || $isLinkNode(node)`.
532
531
  const node = selection.anchor.getNode();
533
532
  const parent = node.getParent();
534
533
  const linkNode = $isLinkNode(node)