@haklex/rich-editor 0.0.34 → 0.0.36
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/dist/{RichEditor-C6rSAXFC.js → RichEditor-B9KIgSwn.js} +3 -2
- package/dist/editor.mjs +2 -2
- package/dist/index.mjs +3 -3
- package/dist/nodes/ImageNode.d.ts.map +1 -1
- package/dist/plugins/AutoLinkPlugin.d.ts.map +1 -1
- package/dist/static-entry.mjs +1 -1
- package/dist/{theme-DOLFsBRg.js → theme-D1COY7pa.js} +2 -1
- package/package.json +22 -22
|
@@ -12,7 +12,7 @@ import { ListPlugin } from "@lexical/react/LexicalListPlugin";
|
|
|
12
12
|
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
|
|
13
13
|
import { TabIndentationPlugin } from "@lexical/react/LexicalTabIndentationPlugin";
|
|
14
14
|
import { TablePlugin } from "@lexical/react/LexicalTablePlugin";
|
|
15
|
-
import { V as $isAlertQuoteNode, d as RendererWrapper, W as AlertRenderer, X as SpoilerNode, Y as MentionNode, Z as FootnoteNode, L as KaTeXInlineNode, _ as AlertQuoteNode, f as editorTheme, a0 as $isBannerNode, a1 as BannerRenderer, a2 as BannerNode, a3 as normalizeBannerType, a4 as $isCodeBlockNode, a5 as CodeBlockRenderer, a6 as CodeBlockNode, i as useFootnoteDefinitions, G as FootnoteSectionNode, t as $isGridContainerNode, I as GridContainerNode, b as builtinNodes, K as KaTeXBlockNode, J as ImageNode, a7 as VideoNode, O as LinkCardNode, a8 as DetailsNode, Q as MermaidNode, F as FootnoteDefinitionsProvider, p as $createImageNode, T as computeImageMeta, S as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, a9 as $createKaTeXInlineNode, aa as $createKaTeXBlockNode, ab as $createDetailsNode, ac as $createFootnoteNode, s as $isFootnoteSectionNode, $ as $createFootnoteSectionNode, ad as $createMentionNode, g as extractTextContent, ae as $createSpoilerNode, r as $createMermaidNode, C as ColorSchemeProvider, R as RendererConfigProvider } from "./theme-
|
|
15
|
+
import { V as $isAlertQuoteNode, d as RendererWrapper, W as AlertRenderer, X as SpoilerNode, Y as MentionNode, Z as FootnoteNode, L as KaTeXInlineNode, _ as AlertQuoteNode, f as editorTheme, a0 as $isBannerNode, a1 as BannerRenderer, a2 as BannerNode, a3 as normalizeBannerType, a4 as $isCodeBlockNode, a5 as CodeBlockRenderer, a6 as CodeBlockNode, i as useFootnoteDefinitions, G as FootnoteSectionNode, t as $isGridContainerNode, I as GridContainerNode, b as builtinNodes, K as KaTeXBlockNode, J as ImageNode, a7 as VideoNode, O as LinkCardNode, a8 as DetailsNode, Q as MermaidNode, F as FootnoteDefinitionsProvider, p as $createImageNode, T as computeImageMeta, S as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, a9 as $createKaTeXInlineNode, aa as $createKaTeXBlockNode, ab as $createDetailsNode, ac as $createFootnoteNode, s as $isFootnoteSectionNode, $ as $createFootnoteSectionNode, ad as $createMentionNode, g as extractTextContent, ae as $createSpoilerNode, r as $createMermaidNode, C as ColorSchemeProvider, R as RendererConfigProvider } from "./theme-D1COY7pa.js";
|
|
16
16
|
import { $getNodeByKey, $insertNodes, createEditor, $nodesOfType, $getRoot, createCommand, COMMAND_PRIORITY_EDITOR, $parseSerializedNode, $getSelection, $isRangeSelection, $createParagraphNode, COMMAND_PRIORITY_HIGH, PASTE_COMMAND, $createTextNode, KEY_ENTER_COMMAND } from "lexical";
|
|
17
17
|
import { Info, Lightbulb, TriangleAlert, Flag, LayoutGrid, Plus, Minus, Check, Upload, Link2 } from "lucide-react";
|
|
18
18
|
import { useCallback, createElement, useState, useEffect, createContext, use, useRef, useMemo } from "react";
|
|
@@ -865,7 +865,8 @@ function AutoLinkPlugin({ matchers }) {
|
|
|
865
865
|
useEffect(() => {
|
|
866
866
|
return registerAutoLink(editor, {
|
|
867
867
|
matchers: matchers ?? DEFAULT_MATCHERS,
|
|
868
|
-
changeHandlers: []
|
|
868
|
+
changeHandlers: [],
|
|
869
|
+
excludeParents: []
|
|
869
870
|
});
|
|
870
871
|
}, [editor, matchers]);
|
|
871
872
|
return null;
|
package/dist/editor.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R, a, c, g, s } from "./RichEditor-
|
|
2
|
-
import { a as a2, b, c as c2 } from "./theme-
|
|
1
|
+
import { R, a, c, g, s } from "./RichEditor-B9KIgSwn.js";
|
|
2
|
+
import { a as a2, b, c as c2 } from "./theme-D1COY7pa.js";
|
|
3
3
|
export {
|
|
4
4
|
R as RichEditor,
|
|
5
5
|
a as allEditNodes,
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A, F, b, I, d, e, f, h, N, R, a, c, i, g, s, u } from "./RichEditor-
|
|
2
|
-
import { h as useFootnoteContent, j as useFootnoteDisplayNumber } from "./theme-
|
|
3
|
-
import { $, o, p, q, r, s as s2, t, v, w, x, y, z, A as A2, B, D, E, C, F as F2, G, H, I as I2, J, K, L, M, O, P, Q, N as N2, S, a as a2, b as b2, T, e as e2, c as c2, U, f as f2, g as g2, u as u2, i as i2, k, l, m, n } from "./theme-
|
|
1
|
+
import { A, F, b, I, d, e, f, h, N, R, a, c, i, g, s, u } from "./RichEditor-B9KIgSwn.js";
|
|
2
|
+
import { h as useFootnoteContent, j as useFootnoteDisplayNumber } from "./theme-D1COY7pa.js";
|
|
3
|
+
import { $, o, p, q, r, s as s2, t, v, w, x, y, z, A as A2, B, D, E, C, F as F2, G, H, I as I2, J, K, L, M, O, P, Q, N as N2, S, a as a2, b as b2, T, e as e2, c as c2, U, f as f2, g as g2, u as u2, i as i2, k, l, m, n } from "./theme-D1COY7pa.js";
|
|
4
4
|
import { a as a3, c as c3, g as g3, n as n2 } from "./utils-fpeaZV1R.js";
|
|
5
5
|
import { r as r2 } from "./shared.css-BqX4HjVE.js";
|
|
6
6
|
import { articleTheme, commentTheme, noteTheme, vars } from "@haklex/rich-style-token";
|
|
@@ -1 +1 @@
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AAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,SAAS,CAEnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoLinkPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/AutoLinkPlugin.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAA;AAiBtB,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;CACzB;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"AutoLinkPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/AutoLinkPlugin.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAA;AAiBtB,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;CACzB;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,QAY/D"}
|
package/dist/static-entry.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C, F, N, R, d, a, b, e, c, f, g, u, h, i, j, k, l, m, n } from "./theme-
|
|
1
|
+
import { C, F, N, R, d, a, b, e, c, f, g, u, h, i, j, k, l, m, n } from "./theme-D1COY7pa.js";
|
|
2
2
|
import { a as a2, c as c2, g as g2, n as n2 } from "./utils-fpeaZV1R.js";
|
|
3
3
|
import { r } from "./shared.css-BqX4HjVE.js";
|
|
4
4
|
import { articleTheme, commentTheme, noteTheme, vars } from "@haklex/rich-style-token";
|
|
@@ -1442,7 +1442,8 @@ __publicField(_ImageNode, "slashMenuItems", [
|
|
|
1442
1442
|
section: "MEDIA",
|
|
1443
1443
|
onSelect: (editor) => {
|
|
1444
1444
|
const opened = editor.dispatchCommand(
|
|
1445
|
-
OPEN_IMAGE_UPLOAD_DIALOG_COMMAND
|
|
1445
|
+
OPEN_IMAGE_UPLOAD_DIALOG_COMMAND,
|
|
1446
|
+
void 0
|
|
1446
1447
|
);
|
|
1447
1448
|
if (opened) return;
|
|
1448
1449
|
editor.update(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-editor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"description": "Core rich text editor based on Lexical",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -29,26 +29,26 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"thumbhash": "^0.1.1",
|
|
32
|
-
"@haklex/rich-
|
|
33
|
-
"@haklex/rich-
|
|
34
|
-
"@haklex/rich-
|
|
32
|
+
"@haklex/rich-editor-ui": "0.0.36",
|
|
33
|
+
"@haklex/rich-headless": "0.0.36",
|
|
34
|
+
"@haklex/rich-style-token": "0.0.36"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@base-ui/react": "^1.2.0",
|
|
38
|
-
"@lexical/code": "^0.
|
|
39
|
-
"@lexical/extension": "^0.
|
|
40
|
-
"@lexical/link": "^0.
|
|
41
|
-
"@lexical/list": "^0.
|
|
42
|
-
"@lexical/markdown": "^0.
|
|
43
|
-
"@lexical/react": "^0.
|
|
44
|
-
"@lexical/rich-text": "^0.
|
|
45
|
-
"@lexical/table": "^0.
|
|
38
|
+
"@lexical/code": "^0.41.0",
|
|
39
|
+
"@lexical/extension": "^0.41.0",
|
|
40
|
+
"@lexical/link": "^0.41.0",
|
|
41
|
+
"@lexical/list": "^0.41.0",
|
|
42
|
+
"@lexical/markdown": "^0.41.0",
|
|
43
|
+
"@lexical/react": "^0.41.0",
|
|
44
|
+
"@lexical/rich-text": "^0.41.0",
|
|
45
|
+
"@lexical/table": "^0.41.0",
|
|
46
46
|
"@types/react": "^19.2.14",
|
|
47
47
|
"@types/react-dom": "^19.2.3",
|
|
48
48
|
"@vanilla-extract/css": "^1.18.0",
|
|
49
49
|
"@vanilla-extract/vite-plugin": "^4.0.20",
|
|
50
50
|
"katex": "^0.16.33",
|
|
51
|
-
"lexical": "^0.
|
|
51
|
+
"lexical": "^0.41.0",
|
|
52
52
|
"lucide-react": "^0.574.0",
|
|
53
53
|
"react": "^19.2.4",
|
|
54
54
|
"react-dom": "^19.2.4",
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@base-ui/react": "^1.1.0",
|
|
62
|
-
"@lexical/code": "^0.
|
|
63
|
-
"@lexical/extension": "^0.
|
|
64
|
-
"@lexical/link": "^0.
|
|
65
|
-
"@lexical/list": "^0.
|
|
66
|
-
"@lexical/markdown": "^0.
|
|
67
|
-
"@lexical/react": "^0.
|
|
68
|
-
"@lexical/rich-text": "^0.
|
|
69
|
-
"@lexical/table": "^0.
|
|
62
|
+
"@lexical/code": "^0.41.0",
|
|
63
|
+
"@lexical/extension": "^0.41.0",
|
|
64
|
+
"@lexical/link": "^0.41.0",
|
|
65
|
+
"@lexical/list": "^0.41.0",
|
|
66
|
+
"@lexical/markdown": "^0.41.0",
|
|
67
|
+
"@lexical/react": "^0.41.0",
|
|
68
|
+
"@lexical/rich-text": "^0.41.0",
|
|
69
|
+
"@lexical/table": "^0.41.0",
|
|
70
70
|
"katex": ">=0.16.0",
|
|
71
|
-
"lexical": "^0.
|
|
71
|
+
"lexical": "^0.41.0",
|
|
72
72
|
"lucide-react": "^0.574.0",
|
|
73
73
|
"react": ">=19",
|
|
74
74
|
"react-dom": ">=19",
|