@etrepum/lexical-builder-markdown 0.0.37-nightly.20260316.0 → 0.1.0
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/MarkdownExport.d.ts.map +1 -1
- package/dist/MarkdownImport.d.ts.map +1 -1
- package/dist/MarkdownShortcutsExtension.d.ts +1 -3
- package/dist/MarkdownShortcutsExtension.d.ts.map +1 -1
- package/dist/MarkdownTransformersExtension.d.ts +1 -1
- package/dist/MarkdownTransformersExtension.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +292 -299
- package/package.json +20 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownExport.d.ts","sourceRoot":"","sources":["../src/MarkdownExport.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"MarkdownExport.d.ts","sourceRoot":"","sources":["../src/MarkdownExport.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,KAAK,EACV,WAAW,EAIZ,MAAM,SAAS,CAAC;AAWjB,OAAO,KAAK,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE9E;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kBAAkB,EAC1B,EAAE,sBAAsB,EAAE,EAAE,0BAA0B,GACrD,CAAC,IAAI,CAAC,EAAE,WAAW,KAAK,MAAM,CAsChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownImport.d.ts","sourceRoot":"","sources":["../src/MarkdownImport.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"MarkdownImport.d.ts","sourceRoot":"","sources":["../src/MarkdownImport.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,EAOL,KAAK,WAAW,EACjB,MAAM,SAAS,CAAC;AAYjB,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACxB,MAAM,SAAS,CAAC;AASjB;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kBAAkB,EAC1B,cAAc,EAAE,0BAA0B,GACzC,CACD,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,0BAA0B,KACjC,WAAW,EAAE,CA0DjB"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { LexicalEditor } from 'lexical';
|
|
2
|
-
import { DisabledToggleOutput } from '@etrepum/lexical-builder';
|
|
3
2
|
import { TransformersByType } from './types';
|
|
4
3
|
export declare function registerMarkdownShortcuts(editor: LexicalEditor, byType: TransformersByType): () => void;
|
|
5
4
|
export interface MarkdownShortcutsConfig {
|
|
6
5
|
disabled: boolean;
|
|
7
6
|
}
|
|
8
|
-
export
|
|
9
|
-
export declare const MarkdownShortcutsExtension: import('@etrepum/lexical-builder').LexicalExtension<MarkdownShortcutsConfig, "@etrepum/lexical-builder-markdown/MarkdownShortcuts", DisabledToggleOutput, unknown>;
|
|
7
|
+
export declare const MarkdownShortcutsExtension: import('lexical').LexicalExtension<MarkdownShortcutsConfig, "@etrepum/lexical-builder-markdown/MarkdownShortcuts", import('@lexical/extension').NamedSignalsOutput<MarkdownShortcutsConfig>, unknown>;
|
|
10
8
|
//# sourceMappingURL=MarkdownShortcutsExtension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownShortcutsExtension.d.ts","sourceRoot":"","sources":["../src/MarkdownShortcutsExtension.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,EAEL,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"MarkdownShortcutsExtension.d.ts","sourceRoot":"","sources":["../src/MarkdownShortcutsExtension.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,EAEL,KAAK,aAAa,EAYnB,MAAM,SAAS,CAAC;AAIjB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA0SlD,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,kBAAkB,GACzB,MAAM,IAAI,CAkGZ;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,0BAA0B,uMAiBrC,CAAC"}
|
|
@@ -10,5 +10,5 @@ export interface MarkdownTransformersOutput {
|
|
|
10
10
|
readonly $markdownImport: ReturnType<typeof createMarkdownImport>;
|
|
11
11
|
readonly $markdownExport: ReturnType<typeof createMarkdownExport>;
|
|
12
12
|
}
|
|
13
|
-
export declare const MarkdownTransformersExtension: import('
|
|
13
|
+
export declare const MarkdownTransformersExtension: import('lexical').LexicalExtension<MarkdownTransformersConfig, "@etrepum/lexical-builder-markdown/MarkdownTransformers", MarkdownTransformersOutput, MarkdownTransformersOutput>;
|
|
14
14
|
//# sourceMappingURL=MarkdownTransformersExtension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownTransformersExtension.d.ts","sourceRoot":"","sources":["../src/MarkdownTransformersExtension.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MarkdownTransformersExtension.d.ts","sourceRoot":"","sources":["../src/MarkdownTransformersExtension.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,GAAG;KACnE,CAAC,IAAI,MAAM,kBAAkB,IAAI,GAAG,CAAC,cAAc,GAAG,kBAAkB,CAAC,CAAC,CAAC;CAC7E,CAAC;AAeF,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,kBAAkB,EAAE,0BAA0B,CAAC;IACxD,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD,QAAQ,CAAC,eAAe,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;IAClE,QAAQ,CAAC,eAAe,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;CACnE;AAED,eAAO,MAAM,6BAA6B,kLA2DxC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { type MarkdownTransformerOptions, type TransformersByType, type Filter, type KebabToCamel, } from './types';
|
|
9
9
|
export { type MarkdownTransformersConfig, type MarkdownTransformersOutput, MarkdownTransformersExtension, } from './MarkdownTransformersExtension';
|
|
10
|
-
export { type MarkdownShortcutsConfig,
|
|
10
|
+
export { type MarkdownShortcutsConfig, MarkdownShortcutsExtension, } from './MarkdownShortcutsExtension';
|
|
11
11
|
export declare const PACKAGE_VERSION: string;
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,MAAM,EACX,KAAK,YAAY,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,uBAAuB,EAC5B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,MAAM,EACX,KAAK,YAAY,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,uBAAuB,EAC5B,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC;AACtC,eAAO,MAAM,eAAe,EAAE,MAAwC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,214 +1,213 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { $
|
|
6
|
-
import { $
|
|
7
|
-
import {
|
|
8
|
-
function D(e,
|
|
1
|
+
import { $getSelection as S, $setSelection as G, $isParagraphNode as H, $isTextNode as x, $createParagraphNode as q, $isElementNode as N, $createTextNode as Q, $createLineBreakNode as re, $isRootOrShadowRoot as V, $getRoot as se, $isDecoratorNode as Y, $isLineBreakNode as J, defineExtension as Z, safeCast as ee, declarePeerDependency as ie, $isRangeSelection as k, $createRangeSelection as ce } from "lexical";
|
|
2
|
+
import { $isQuoteNode as le, RichTextExtension as ae } from "@lexical/rich-text";
|
|
3
|
+
import { getKnownTypesAndNodes as fe, effect as ue, namedSignals as ge } from "@lexical/extension";
|
|
4
|
+
import { UNORDERED_LIST as de, CHECK_LIST as me, MULTILINE_ELEMENT_TRANSFORMERS as pe, TEXT_MATCH_TRANSFORMERS as he, TEXT_FORMAT_TRANSFORMERS as xe, ELEMENT_TRANSFORMERS as Te } from "@lexical/markdown";
|
|
5
|
+
import { $createCodeNode as Ee, $isCodeNode as Se } from "@lexical/code";
|
|
6
|
+
import { $isListNode as O, $isListItemNode as Ne } from "@lexical/list";
|
|
7
|
+
import { IS_SAFARI as A, IS_IOS as B, IS_APPLE_WEBKIT as y, $findMatchingParent as Ce } from "@lexical/utils";
|
|
8
|
+
function D(e, n) {
|
|
9
9
|
const o = {};
|
|
10
10
|
for (const r of e) {
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const i = n(r), t = o[i];
|
|
12
|
+
t ? t.push(r) : o[i] = [r];
|
|
13
13
|
}
|
|
14
14
|
return o;
|
|
15
15
|
}
|
|
16
16
|
const $ = /[!-/:-@[-`{-~\s]/, $e = /^\s{0,3}$/;
|
|
17
17
|
function F(e) {
|
|
18
|
-
if (!
|
|
18
|
+
if (!H(e))
|
|
19
19
|
return !1;
|
|
20
|
-
const
|
|
21
|
-
return
|
|
20
|
+
const n = e.getFirstChild();
|
|
21
|
+
return n == null || e.getChildrenSize() === 1 && x(n) && $e.test(n.getTextContent());
|
|
22
22
|
}
|
|
23
23
|
function we(e) {
|
|
24
24
|
return function(...o) {
|
|
25
|
-
const r = S(),
|
|
26
|
-
return
|
|
25
|
+
const r = S(), i = r ? r.clone() : null, t = e(...o), c = S(), s = i && i.is(r) && !Object.isFrozen(r) ? r : i;
|
|
26
|
+
return c !== s && G(s), t;
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function T(e,
|
|
29
|
+
function T(e, n, ...o) {
|
|
30
30
|
if (!e)
|
|
31
31
|
throw new Error(
|
|
32
|
-
o.reduce((r,
|
|
32
|
+
o.reduce((r, i) => r.replace("%s", String(i)), n || "")
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
const K = /^[ \t]*```(\w{1,10})?\s?$/;
|
|
36
|
-
function Re(e,
|
|
36
|
+
function Re(e, n) {
|
|
37
37
|
const o = Fe(
|
|
38
38
|
e.textFormat
|
|
39
39
|
);
|
|
40
|
-
return function(
|
|
41
|
-
const
|
|
42
|
-
`), s =
|
|
40
|
+
return function(i, { shouldPreserveNewlines: t } = n) {
|
|
41
|
+
const c = i.split(`
|
|
42
|
+
`), s = c.length, l = q();
|
|
43
43
|
for (let f = 0; f < s; f++) {
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
f =
|
|
44
|
+
const p = c[f], [g, u] = _e(c, f, l);
|
|
45
|
+
if (g != null) {
|
|
46
|
+
f = u;
|
|
47
47
|
continue;
|
|
48
48
|
}
|
|
49
49
|
Me(
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
p,
|
|
51
|
+
l,
|
|
52
52
|
e.element,
|
|
53
53
|
o,
|
|
54
54
|
e.textMatch
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
|
-
const
|
|
58
|
-
for (let f =
|
|
57
|
+
const a = [];
|
|
58
|
+
for (let f = l.getFirstChild(); f; f = f.getNextSibling())
|
|
59
59
|
T(
|
|
60
60
|
N(f),
|
|
61
61
|
"markdownImport: Expected child of type %s to be an ElementNode",
|
|
62
62
|
f.getType()
|
|
63
|
-
), (
|
|
64
|
-
return
|
|
63
|
+
), (t || !F(f)) && a.push(f);
|
|
64
|
+
return l.clear(), a;
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function Me(e,
|
|
68
|
-
const
|
|
69
|
-
s.append(
|
|
70
|
-
for (const { regExp:
|
|
71
|
-
const f = e.match(
|
|
67
|
+
function Me(e, n, o, r, i) {
|
|
68
|
+
const t = e.trim(), c = Q(t), s = q();
|
|
69
|
+
s.append(c), n.append(s);
|
|
70
|
+
for (const { regExp: l, replace: a } of o) {
|
|
71
|
+
const f = e.match(l);
|
|
72
72
|
if (f) {
|
|
73
|
-
|
|
73
|
+
c.setTextContent(e.slice(f[0].length)), a(s, [c], f, !0);
|
|
74
74
|
break;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
if (C(
|
|
78
|
-
|
|
78
|
+
c,
|
|
79
79
|
r,
|
|
80
|
-
|
|
81
|
-
), s.isAttached() &&
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
84
|
-
let
|
|
85
|
-
if (O(
|
|
86
|
-
const f =
|
|
87
|
-
f == null ?
|
|
80
|
+
i
|
|
81
|
+
), s.isAttached() && t.length > 0) {
|
|
82
|
+
const l = s.getPreviousSibling();
|
|
83
|
+
if (H(l) || le(l) || O(l)) {
|
|
84
|
+
let a = l;
|
|
85
|
+
if (O(l)) {
|
|
86
|
+
const f = l.getLastDescendant();
|
|
87
|
+
f == null ? a = null : a = Ce(f, Ne);
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
a != null && a.getTextContentSize() > 0 && (a.splice(a.getChildrenSize(), 0, [
|
|
90
|
+
re(),
|
|
91
91
|
...s.getChildren()
|
|
92
92
|
]), s.remove());
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function _e(e,
|
|
97
|
-
const r = K.exec(e[
|
|
96
|
+
function _e(e, n, o) {
|
|
97
|
+
const r = K.exec(e[n]);
|
|
98
98
|
if (r) {
|
|
99
|
-
let
|
|
100
|
-
const
|
|
101
|
-
for (; ++
|
|
102
|
-
if (K.exec(e[
|
|
103
|
-
const s =
|
|
104
|
-
e.slice(
|
|
99
|
+
let i = n;
|
|
100
|
+
const t = e.length;
|
|
101
|
+
for (; ++i < t; )
|
|
102
|
+
if (K.exec(e[i])) {
|
|
103
|
+
const s = Ee(r[1]), l = Q(
|
|
104
|
+
e.slice(n + 1, i).join(`
|
|
105
105
|
`)
|
|
106
106
|
);
|
|
107
|
-
return s.append(
|
|
107
|
+
return s.append(l), o.append(s), [s, i];
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
return [null,
|
|
110
|
+
return [null, n];
|
|
111
111
|
}
|
|
112
|
-
function C(e,
|
|
113
|
-
const r = e.getTextContent(),
|
|
114
|
-
if (!
|
|
115
|
-
|
|
112
|
+
function C(e, n, o) {
|
|
113
|
+
const r = e.getTextContent(), i = ke(r, n);
|
|
114
|
+
if (!i) {
|
|
115
|
+
te(e, o);
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
118
|
T(
|
|
119
|
-
|
|
119
|
+
i[1] !== void 0 && i[2] !== void 0,
|
|
120
120
|
"importTextMatchTransformers: expecting match with two groups"
|
|
121
121
|
);
|
|
122
|
-
let
|
|
123
|
-
if (
|
|
124
|
-
|
|
122
|
+
let t, c, s;
|
|
123
|
+
if (i[0] === r)
|
|
124
|
+
t = e;
|
|
125
125
|
else {
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
const a = i.index || 0, f = a + i[0].length;
|
|
127
|
+
a === 0 ? [t, c] = e.splitText(f) : [s, t, c] = e.splitText(
|
|
128
|
+
a,
|
|
129
129
|
f
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
132
|
T(
|
|
133
|
-
|
|
133
|
+
t !== void 0,
|
|
134
134
|
"importTextMatchTransformers: currentNode must be defined"
|
|
135
|
-
),
|
|
136
|
-
const
|
|
137
|
-
if (
|
|
138
|
-
for (const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
n,
|
|
135
|
+
), t.setTextContent(i[2]);
|
|
136
|
+
const l = n.transformersByTag[i[1]];
|
|
137
|
+
if (l)
|
|
138
|
+
for (const a of l.format)
|
|
139
|
+
t.hasFormat(a) || t.toggleFormat(a);
|
|
140
|
+
t.hasFormat("code") || C(
|
|
142
141
|
t,
|
|
142
|
+
n,
|
|
143
143
|
o
|
|
144
144
|
), s && C(
|
|
145
145
|
s,
|
|
146
|
-
|
|
146
|
+
n,
|
|
147
147
|
o
|
|
148
|
-
),
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
), c && C(
|
|
149
|
+
c,
|
|
150
|
+
n,
|
|
151
151
|
o
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
var r;
|
|
154
|
+
function te(e, n) {
|
|
156
155
|
let o = e;
|
|
157
156
|
e: for (; o; ) {
|
|
158
|
-
const
|
|
159
|
-
for (const
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
157
|
+
const r = o.getTextContent();
|
|
158
|
+
for (const i of n) {
|
|
159
|
+
const t = i.importRegExp && r.match(i.importRegExp);
|
|
160
|
+
if (!t)
|
|
162
161
|
continue;
|
|
163
|
-
const
|
|
164
|
-
let l,
|
|
165
|
-
if (
|
|
166
|
-
const
|
|
162
|
+
const c = t.index || 0, s = c + t[0].length;
|
|
163
|
+
let l, a;
|
|
164
|
+
if (c === 0) {
|
|
165
|
+
const f = o.splitText(s);
|
|
167
166
|
T(
|
|
168
|
-
|
|
167
|
+
f[0] !== void 0,
|
|
169
168
|
"importTextMatchTransformers: splitText expected at least one node"
|
|
170
|
-
), [l, o] =
|
|
169
|
+
), [l, o] = f;
|
|
171
170
|
} else {
|
|
172
|
-
const
|
|
171
|
+
const f = o.splitText(c, s);
|
|
173
172
|
T(
|
|
174
|
-
|
|
173
|
+
f[1] !== void 0,
|
|
175
174
|
"importTextMatchTransformers: splitText expected at least two nodes"
|
|
176
|
-
), [, l,
|
|
175
|
+
), [, l, a] = f, a && te(a, n);
|
|
177
176
|
}
|
|
178
|
-
|
|
177
|
+
i.replace?.(l, t);
|
|
179
178
|
continue e;
|
|
180
179
|
}
|
|
181
180
|
break;
|
|
182
181
|
}
|
|
183
182
|
}
|
|
184
|
-
function ke(e,
|
|
185
|
-
const o = e.match(
|
|
183
|
+
function ke(e, n) {
|
|
184
|
+
const o = e.match(n.openTagsRegExp);
|
|
186
185
|
if (o == null)
|
|
187
186
|
return null;
|
|
188
187
|
for (const r of o) {
|
|
189
|
-
const
|
|
190
|
-
if (
|
|
188
|
+
const i = r.replace(/^\s/, ""), t = n.fullMatchRegExpByTag[i];
|
|
189
|
+
if (t == null)
|
|
191
190
|
continue;
|
|
192
|
-
const
|
|
193
|
-
if (
|
|
191
|
+
const c = e.match(t), s = n.transformersByTag[i];
|
|
192
|
+
if (c != null && s != null) {
|
|
194
193
|
if (s.intraword !== !1)
|
|
195
|
-
return
|
|
196
|
-
const { index:
|
|
197
|
-
if ((!
|
|
198
|
-
return
|
|
194
|
+
return c;
|
|
195
|
+
const { index: l = 0 } = c, a = e[l - 1], f = e[l + c[0].length];
|
|
196
|
+
if ((!a || $.test(a)) && (!f || $.test(f)))
|
|
197
|
+
return c;
|
|
199
198
|
}
|
|
200
199
|
}
|
|
201
200
|
return null;
|
|
202
201
|
}
|
|
203
202
|
function Fe(e) {
|
|
204
|
-
const
|
|
205
|
-
for (const
|
|
206
|
-
const { tag:
|
|
207
|
-
|
|
208
|
-
const s =
|
|
209
|
-
r.push(s), A || B || y ? o[
|
|
203
|
+
const n = {}, o = {}, r = [], i = "(?<![\\\\])";
|
|
204
|
+
for (const t of e) {
|
|
205
|
+
const { tag: c } = t;
|
|
206
|
+
n[c] = t;
|
|
207
|
+
const s = c.replace(/(\*|\^|\+)/g, "\\$1");
|
|
208
|
+
r.push(s), A || B || y ? o[c] = new RegExp(
|
|
210
209
|
`(${s})(?![${s}\\s])(.*?[^${s}\\s])${s}(?!${s})`
|
|
211
|
-
) : o[
|
|
210
|
+
) : o[c] = new RegExp(
|
|
212
211
|
`(?<![\\\\${s}])(${s})((\\\\${s})?.*?[^${s}\\s](\\\\${s})?)((?<!\\\\)|(?<=\\\\\\\\))(${s})(?![\\\\${s}])`
|
|
213
212
|
);
|
|
214
213
|
}
|
|
@@ -217,109 +216,107 @@ function Fe(e) {
|
|
|
217
216
|
fullMatchRegExpByTag: o,
|
|
218
217
|
// Reg exp to find opening tags
|
|
219
218
|
openTagsRegExp: new RegExp(
|
|
220
|
-
`${A || B || y ? "" :
|
|
219
|
+
`${A || B || y ? "" : i}(${r.join("|")})`,
|
|
221
220
|
"g"
|
|
222
221
|
),
|
|
223
|
-
transformersByTag:
|
|
222
|
+
transformersByTag: n
|
|
224
223
|
};
|
|
225
224
|
}
|
|
226
|
-
function ve(e, { shouldPreserveNewlines:
|
|
227
|
-
const o = !
|
|
228
|
-
(
|
|
225
|
+
function ve(e, { shouldPreserveNewlines: n }) {
|
|
226
|
+
const o = !n, r = e.textFormat.filter(
|
|
227
|
+
(i) => i.format.length === 1
|
|
229
228
|
);
|
|
230
|
-
return function(
|
|
231
|
-
const
|
|
232
|
-
for (let
|
|
233
|
-
const
|
|
234
|
-
|
|
229
|
+
return function(t = se()) {
|
|
230
|
+
const c = [], s = V(t) ? t.getChildren() : [t];
|
|
231
|
+
for (let l = 0; l < s.length; l++) {
|
|
232
|
+
const a = s[l], f = Ie(
|
|
233
|
+
a,
|
|
235
234
|
e.element,
|
|
236
235
|
r,
|
|
237
236
|
e.textMatch
|
|
238
237
|
);
|
|
239
|
-
f != null &&
|
|
238
|
+
f != null && c.push(
|
|
240
239
|
// separate consecutive group of texts with a line break: eg. ["hello", "world"] -> ["hello", "\nworld"]
|
|
241
|
-
o &&
|
|
240
|
+
o && l > 0 && !F(a) && !F(s[l - 1]) ? `
|
|
242
241
|
`.concat(f) : f
|
|
243
242
|
);
|
|
244
243
|
}
|
|
245
|
-
return
|
|
244
|
+
return c.join(`
|
|
246
245
|
`);
|
|
247
246
|
};
|
|
248
247
|
}
|
|
249
|
-
function Ie(e,
|
|
250
|
-
for (const
|
|
251
|
-
const
|
|
248
|
+
function Ie(e, n, o, r) {
|
|
249
|
+
for (const i of n) {
|
|
250
|
+
const t = i.export(
|
|
252
251
|
e,
|
|
253
|
-
(
|
|
252
|
+
(c) => w(c, o, r)
|
|
254
253
|
);
|
|
255
|
-
if (
|
|
256
|
-
return
|
|
254
|
+
if (t != null)
|
|
255
|
+
return t;
|
|
257
256
|
}
|
|
258
|
-
return N(e) ? w(e, o, r) :
|
|
257
|
+
return N(e) ? w(e, o, r) : Y(e) ? e.getTextContent() : null;
|
|
259
258
|
}
|
|
260
|
-
function w(e,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
s,
|
|
267
|
-
i,
|
|
259
|
+
function w(e, n, o) {
|
|
260
|
+
const r = [], i = e.getChildren();
|
|
261
|
+
e: for (const t of i) {
|
|
262
|
+
for (const c of o) {
|
|
263
|
+
const s = c.export?.(
|
|
264
|
+
t,
|
|
268
265
|
(l) => w(
|
|
269
266
|
l,
|
|
270
|
-
|
|
267
|
+
n,
|
|
271
268
|
o
|
|
272
269
|
),
|
|
273
|
-
(l,
|
|
270
|
+
(l, a) => j(l, a, n)
|
|
274
271
|
);
|
|
275
|
-
if (
|
|
276
|
-
r.push(
|
|
272
|
+
if (s != null) {
|
|
273
|
+
r.push(s);
|
|
277
274
|
continue e;
|
|
278
275
|
}
|
|
279
276
|
}
|
|
280
|
-
|
|
281
|
-
`) : x(
|
|
282
|
-
j(
|
|
283
|
-
) : N(
|
|
284
|
-
w(
|
|
285
|
-
) :
|
|
277
|
+
J(t) ? r.push(`
|
|
278
|
+
`) : x(t) ? r.push(
|
|
279
|
+
j(t, t.getTextContent(), n)
|
|
280
|
+
) : N(t) ? r.push(
|
|
281
|
+
w(t, n, o)
|
|
282
|
+
) : Y(t) && r.push(t.getTextContent());
|
|
286
283
|
}
|
|
287
284
|
return r.join("");
|
|
288
285
|
}
|
|
289
|
-
function j(e,
|
|
290
|
-
const r =
|
|
291
|
-
let
|
|
292
|
-
const
|
|
293
|
-
for (const
|
|
294
|
-
const s =
|
|
286
|
+
function j(e, n, o) {
|
|
287
|
+
const r = n.trim();
|
|
288
|
+
let i = r;
|
|
289
|
+
const t = /* @__PURE__ */ new Set();
|
|
290
|
+
for (const c of o) {
|
|
291
|
+
const s = c.format[0], l = c.tag;
|
|
295
292
|
if (T(
|
|
296
293
|
s !== void 0,
|
|
297
294
|
"TextFormatTransformer for tag %s has empty format array",
|
|
298
|
-
|
|
299
|
-
), M(e, s) && !
|
|
300
|
-
|
|
301
|
-
const
|
|
302
|
-
M(
|
|
295
|
+
l
|
|
296
|
+
), M(e, s) && !t.has(s)) {
|
|
297
|
+
t.add(s);
|
|
298
|
+
const a = z(e, !0);
|
|
299
|
+
M(a, s) || (i = l + i);
|
|
303
300
|
const f = z(e, !1);
|
|
304
|
-
M(f, s) || (
|
|
301
|
+
M(f, s) || (i += l);
|
|
305
302
|
}
|
|
306
303
|
}
|
|
307
|
-
return
|
|
304
|
+
return n.replace(r, () => i);
|
|
308
305
|
}
|
|
309
|
-
function z(e,
|
|
310
|
-
let o =
|
|
306
|
+
function z(e, n) {
|
|
307
|
+
let o = n ? e.getPreviousSibling() : e.getNextSibling();
|
|
311
308
|
if (!o) {
|
|
312
309
|
const r = e.getParentOrThrow();
|
|
313
|
-
r.isInline() && (o =
|
|
310
|
+
r.isInline() && (o = n ? r.getPreviousSibling() : r.getNextSibling());
|
|
314
311
|
}
|
|
315
312
|
for (; o; ) {
|
|
316
313
|
if (N(o)) {
|
|
317
314
|
if (!o.isInline())
|
|
318
315
|
break;
|
|
319
|
-
const r =
|
|
316
|
+
const r = n ? o.getLastDescendant() : o.getFirstDescendant();
|
|
320
317
|
if (x(r))
|
|
321
318
|
return r;
|
|
322
|
-
o =
|
|
319
|
+
o = n ? o.getPreviousSibling() : o.getNextSibling();
|
|
323
320
|
}
|
|
324
321
|
if (x(o))
|
|
325
322
|
return o;
|
|
@@ -328,148 +325,147 @@ function z(e, t) {
|
|
|
328
325
|
}
|
|
329
326
|
return null;
|
|
330
327
|
}
|
|
331
|
-
function M(e,
|
|
332
|
-
return x(e) && e.hasFormat(
|
|
328
|
+
function M(e, n) {
|
|
329
|
+
return x(e) && e.hasFormat(n);
|
|
333
330
|
}
|
|
334
|
-
function _({ nodes: e },
|
|
331
|
+
function _({ nodes: e }, n) {
|
|
335
332
|
const o = e.has.bind(e);
|
|
336
|
-
return
|
|
333
|
+
return n.filter((r) => r.dependencies.every(o));
|
|
337
334
|
}
|
|
338
|
-
const U = "@
|
|
335
|
+
const U = "@lexical/list/CheckList", W = Z({
|
|
339
336
|
name: "@etrepum/lexical-builder-markdown/MarkdownTransformers",
|
|
340
|
-
dependencies: [
|
|
337
|
+
dependencies: [ae],
|
|
341
338
|
peerDependencies: [
|
|
342
339
|
ie(U)
|
|
343
340
|
],
|
|
344
|
-
config:
|
|
345
|
-
elementTransformers:
|
|
346
|
-
textFormatTransformers:
|
|
347
|
-
textMatchTransformers:
|
|
348
|
-
multilineElementTransformers:
|
|
341
|
+
config: ee({
|
|
342
|
+
elementTransformers: Te,
|
|
343
|
+
textFormatTransformers: xe,
|
|
344
|
+
textMatchTransformers: he,
|
|
345
|
+
multilineElementTransformers: pe,
|
|
349
346
|
shouldPreserveNewlines: !1
|
|
350
347
|
}),
|
|
351
348
|
// For now we replace the transformer arrays with the default
|
|
352
349
|
// shallowMergeConfig. I think ideally these should be additive
|
|
353
|
-
init(e,
|
|
354
|
-
const r =
|
|
355
|
-
shouldPreserveNewlines:
|
|
356
|
-
},
|
|
350
|
+
init(e, n, o) {
|
|
351
|
+
const r = fe(e), i = {
|
|
352
|
+
shouldPreserveNewlines: n.shouldPreserveNewlines
|
|
353
|
+
}, t = _(
|
|
357
354
|
r,
|
|
358
|
-
|
|
355
|
+
n.elementTransformers
|
|
359
356
|
);
|
|
360
357
|
if (o.getPeer(U)) {
|
|
361
|
-
const
|
|
362
|
-
|
|
358
|
+
const a = t.indexOf(de);
|
|
359
|
+
a >= 0 && t.splice(a, 0, me);
|
|
363
360
|
}
|
|
364
|
-
const
|
|
361
|
+
const c = {
|
|
365
362
|
// Only register transforms for nodes that are configured
|
|
366
|
-
element:
|
|
367
|
-
textMatch: _(r,
|
|
363
|
+
element: t,
|
|
364
|
+
textMatch: _(r, n.textMatchTransformers),
|
|
368
365
|
multilineElement: _(
|
|
369
366
|
r,
|
|
370
|
-
|
|
367
|
+
n.multilineElementTransformers
|
|
371
368
|
),
|
|
372
|
-
textFormat:
|
|
369
|
+
textFormat: n.textFormatTransformers
|
|
373
370
|
}, s = we(
|
|
374
|
-
Re(
|
|
375
|
-
),
|
|
376
|
-
|
|
377
|
-
|
|
371
|
+
Re(c, i)
|
|
372
|
+
), l = ve(
|
|
373
|
+
c,
|
|
374
|
+
i
|
|
378
375
|
);
|
|
379
376
|
return {
|
|
380
|
-
transformerOptions:
|
|
381
|
-
transformersByType:
|
|
382
|
-
$markdownExport:
|
|
377
|
+
transformerOptions: i,
|
|
378
|
+
transformersByType: c,
|
|
379
|
+
$markdownExport: l,
|
|
383
380
|
$markdownImport: s
|
|
384
381
|
};
|
|
385
382
|
},
|
|
386
|
-
|
|
383
|
+
build: (e, n, o) => o.getInitResult()
|
|
387
384
|
});
|
|
388
|
-
function
|
|
389
|
-
const
|
|
390
|
-
if (!
|
|
385
|
+
function Pe(e, n, o, r) {
|
|
386
|
+
const i = e.getParent();
|
|
387
|
+
if (!V(i) || e.getFirstChild() !== n)
|
|
391
388
|
return !1;
|
|
392
|
-
const
|
|
393
|
-
if (
|
|
389
|
+
const t = n.getTextContent();
|
|
390
|
+
if (t[o - 1] !== " ")
|
|
394
391
|
return !1;
|
|
395
|
-
for (const { regExp:
|
|
396
|
-
const
|
|
397
|
-
if (
|
|
398
|
-
const
|
|
392
|
+
for (const { regExp: c, replace: s } of r) {
|
|
393
|
+
const l = t.match(c);
|
|
394
|
+
if (l && l[0].length === o) {
|
|
395
|
+
const a = n.getNextSiblings(), [f, p] = n.splitText(o);
|
|
399
396
|
f.remove();
|
|
400
|
-
const
|
|
401
|
-
return s(e,
|
|
397
|
+
const g = p ? [p, ...a] : a;
|
|
398
|
+
return s(e, g, l, !1), !0;
|
|
402
399
|
}
|
|
403
400
|
}
|
|
404
401
|
return !1;
|
|
405
402
|
}
|
|
406
|
-
function
|
|
407
|
-
var i;
|
|
403
|
+
function be(e, n, o) {
|
|
408
404
|
let r = e.getTextContent();
|
|
409
|
-
const
|
|
410
|
-
if (
|
|
405
|
+
const i = r[n - 1], t = o[i];
|
|
406
|
+
if (t == null)
|
|
411
407
|
return !1;
|
|
412
|
-
|
|
413
|
-
for (const
|
|
414
|
-
const
|
|
415
|
-
if (
|
|
408
|
+
n < r.length && (r = r.slice(0, n));
|
|
409
|
+
for (const c of t) {
|
|
410
|
+
const s = r.match(c.regExp);
|
|
411
|
+
if (s === null)
|
|
416
412
|
continue;
|
|
417
|
-
const l =
|
|
418
|
-
let
|
|
419
|
-
return l === 0 ?
|
|
420
|
-
x(
|
|
413
|
+
const l = s.index || 0, a = l + s[0].length;
|
|
414
|
+
let f;
|
|
415
|
+
return l === 0 ? f = e.splitText(a)[0] : f = e.splitText(l, a)[1], T(
|
|
416
|
+
x(f),
|
|
421
417
|
"MarkdownShortcuts: splitText(%s, %s)[%s] did not return the expected TextNode",
|
|
422
418
|
String(l),
|
|
423
|
-
String(
|
|
419
|
+
String(a),
|
|
424
420
|
String(l === 0 ? 0 : 1)
|
|
425
|
-
),
|
|
421
|
+
), f.selectNext(0, 0), c.replace?.(f, s), !0;
|
|
426
422
|
}
|
|
427
423
|
return !1;
|
|
428
424
|
}
|
|
429
|
-
function Le(e,
|
|
430
|
-
const r = e.getTextContent(),
|
|
431
|
-
if (!
|
|
425
|
+
function Le(e, n, o) {
|
|
426
|
+
const r = e.getTextContent(), i = n - 1, t = r[i], c = o[t];
|
|
427
|
+
if (!c)
|
|
432
428
|
return !1;
|
|
433
|
-
for (const s of
|
|
434
|
-
const { tag:
|
|
435
|
-
if (
|
|
429
|
+
for (const s of c) {
|
|
430
|
+
const { tag: l } = s, a = l.length, f = i - a + 1;
|
|
431
|
+
if (a > 1 && !ne(r, f, l, 0, a) || r[f - 1] === " ")
|
|
436
432
|
continue;
|
|
437
|
-
const
|
|
438
|
-
if (s.intraword === !1 &&
|
|
433
|
+
const p = r[i + 1];
|
|
434
|
+
if (s.intraword === !1 && p && !$.test(p))
|
|
439
435
|
continue;
|
|
440
|
-
const
|
|
441
|
-
let
|
|
436
|
+
const g = e;
|
|
437
|
+
let u = g, d = X(
|
|
442
438
|
r,
|
|
443
439
|
f,
|
|
444
|
-
|
|
445
|
-
), E =
|
|
446
|
-
for (;
|
|
440
|
+
l
|
|
441
|
+
), E = u;
|
|
442
|
+
for (; d < 0 && (E = E.getPreviousSibling()) && !J(E); )
|
|
447
443
|
if (x(E)) {
|
|
448
444
|
const h = E.getTextContent();
|
|
449
|
-
|
|
445
|
+
u = E, d = X(
|
|
450
446
|
h,
|
|
451
447
|
h.length,
|
|
452
|
-
|
|
448
|
+
l
|
|
453
449
|
);
|
|
454
450
|
}
|
|
455
|
-
if (
|
|
451
|
+
if (d < 0 || u === g && d + a === f)
|
|
456
452
|
continue;
|
|
457
|
-
const R =
|
|
458
|
-
if (
|
|
453
|
+
const R = u.getTextContent();
|
|
454
|
+
if (d > 0 && R[d - 1] === t)
|
|
459
455
|
continue;
|
|
460
|
-
const v = R[
|
|
456
|
+
const v = R[d - 1];
|
|
461
457
|
if (s.intraword === !1 && v && !$.test(v))
|
|
462
458
|
continue;
|
|
463
|
-
const I =
|
|
464
|
-
|
|
465
|
-
const
|
|
466
|
-
|
|
467
|
-
|
|
459
|
+
const I = g.getTextContent(), P = I.slice(0, f) + I.slice(i + 1);
|
|
460
|
+
g.setTextContent(P);
|
|
461
|
+
const b = u === g ? P : R;
|
|
462
|
+
u.setTextContent(
|
|
463
|
+
b.slice(0, d) + b.slice(d + a)
|
|
468
464
|
);
|
|
469
|
-
const L = S(), m =
|
|
470
|
-
|
|
471
|
-
const
|
|
472
|
-
m.anchor.set(
|
|
465
|
+
const L = S(), m = ce();
|
|
466
|
+
G(m);
|
|
467
|
+
const oe = i - a * (u === g ? 2 : 1) + 1;
|
|
468
|
+
m.anchor.set(u.__key, d, "text"), m.focus.set(g.__key, oe, "text");
|
|
473
469
|
for (const h of s.format)
|
|
474
470
|
m.hasFormat(h) || m.formatText(h);
|
|
475
471
|
m.anchor.set(
|
|
@@ -483,82 +479,79 @@ function Le(e, t, o) {
|
|
|
483
479
|
}
|
|
484
480
|
return !1;
|
|
485
481
|
}
|
|
486
|
-
function X(e,
|
|
482
|
+
function X(e, n, o) {
|
|
487
483
|
const r = o.length;
|
|
488
|
-
for (let
|
|
489
|
-
const
|
|
490
|
-
if (
|
|
491
|
-
e[
|
|
492
|
-
return
|
|
484
|
+
for (let i = n; i >= r; i--) {
|
|
485
|
+
const t = i - r;
|
|
486
|
+
if (ne(e, t, o, 0, r) && // Space after opening tag cancels transformation
|
|
487
|
+
e[t + r] !== " ")
|
|
488
|
+
return t;
|
|
493
489
|
}
|
|
494
490
|
return -1;
|
|
495
491
|
}
|
|
496
|
-
function
|
|
497
|
-
for (let
|
|
498
|
-
if (e[
|
|
492
|
+
function ne(e, n, o, r, i) {
|
|
493
|
+
for (let t = 0; t < i; t++)
|
|
494
|
+
if (e[n + t] !== o[r + t])
|
|
499
495
|
return !1;
|
|
500
496
|
return !0;
|
|
501
497
|
}
|
|
502
|
-
function Oe(e,
|
|
498
|
+
function Oe(e, n) {
|
|
503
499
|
const o = D(
|
|
504
|
-
|
|
505
|
-
({ tag:
|
|
500
|
+
n.textFormat,
|
|
501
|
+
({ tag: t }) => t[t.length - 1]
|
|
506
502
|
), r = D(
|
|
507
|
-
|
|
508
|
-
(
|
|
503
|
+
n.textMatch.filter(
|
|
504
|
+
(t) => !!t.trigger
|
|
509
505
|
),
|
|
510
|
-
({ trigger:
|
|
511
|
-
),
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
506
|
+
({ trigger: t }) => t
|
|
507
|
+
), i = (t, c, s) => {
|
|
508
|
+
Pe(
|
|
509
|
+
t,
|
|
510
|
+
c,
|
|
515
511
|
s,
|
|
516
|
-
|
|
517
|
-
) ||
|
|
518
|
-
|
|
512
|
+
n.element
|
|
513
|
+
) || be(
|
|
514
|
+
c,
|
|
519
515
|
s,
|
|
520
516
|
r
|
|
521
517
|
) || Le(
|
|
522
|
-
|
|
518
|
+
c,
|
|
523
519
|
s,
|
|
524
520
|
o
|
|
525
521
|
);
|
|
526
522
|
};
|
|
527
523
|
return e.registerUpdateListener(
|
|
528
|
-
({ tags:
|
|
529
|
-
if (
|
|
524
|
+
({ tags: t, dirtyLeaves: c, editorState: s, prevEditorState: l }) => {
|
|
525
|
+
if (t.has("collaboration") || t.has("historic") || e.isComposing())
|
|
530
526
|
return;
|
|
531
|
-
const
|
|
532
|
-
if (!k(f) || !k(
|
|
527
|
+
const a = s.read(S), f = l.read(S);
|
|
528
|
+
if (!k(f) || !k(a) || !a.isCollapsed())
|
|
533
529
|
return;
|
|
534
|
-
const
|
|
535
|
-
!x(
|
|
536
|
-
if (
|
|
530
|
+
const p = a.anchor.key, g = a.anchor.offset, u = s._nodeMap.get(p);
|
|
531
|
+
!x(u) || !c.has(p) || g !== 1 && g > f.anchor.offset + 1 || e.update(() => {
|
|
532
|
+
if (u.hasFormat("code"))
|
|
537
533
|
return;
|
|
538
|
-
const
|
|
539
|
-
|
|
534
|
+
const d = u.getParent();
|
|
535
|
+
d === null || Se(d) || i(d, u, a.anchor.offset);
|
|
540
536
|
});
|
|
541
537
|
}
|
|
542
538
|
);
|
|
543
539
|
}
|
|
544
|
-
const Ue =
|
|
540
|
+
const Ue = Z({
|
|
545
541
|
name: "@etrepum/lexical-builder-markdown/MarkdownShortcuts",
|
|
546
542
|
dependencies: [W],
|
|
547
|
-
config:
|
|
543
|
+
config: ee({
|
|
548
544
|
disabled: !1
|
|
549
545
|
}),
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
);
|
|
560
|
-
}
|
|
561
|
-
}), We = "0.0.37-nightly.20260316.0";
|
|
546
|
+
build: (e, n) => ge(n),
|
|
547
|
+
register: (e, n, o) => ue(() => {
|
|
548
|
+
if (!o.getOutput().disabled.value)
|
|
549
|
+
return Oe(
|
|
550
|
+
e,
|
|
551
|
+
o.getDependency(W).output.transformersByType
|
|
552
|
+
);
|
|
553
|
+
})
|
|
554
|
+
}), We = "0.1.0";
|
|
562
555
|
export {
|
|
563
556
|
Ue as MarkdownShortcutsExtension,
|
|
564
557
|
W as MarkdownTransformersExtension,
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"test": "vitest run",
|
|
17
17
|
"test:watch": "vitest"
|
|
18
18
|
},
|
|
19
|
-
"version": "0.
|
|
19
|
+
"version": "0.1.0",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
@@ -27,32 +27,37 @@
|
|
|
27
27
|
"url": "https://github.com/etrepum/lexical-builder/issues"
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/etrepum/lexical-builder",
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"@etrepum/lexical-builder": "*",
|
|
32
|
-
"@etrepum/lexical-builder-list": "*"
|
|
33
|
-
},
|
|
30
|
+
"dependencies": {},
|
|
34
31
|
"peerDependencies": {
|
|
35
|
-
"@lexical/code": ">=0.
|
|
36
|
-
"@lexical/
|
|
37
|
-
"@lexical/
|
|
38
|
-
"@lexical/
|
|
39
|
-
"@lexical/
|
|
40
|
-
"lexical": ">=0.
|
|
32
|
+
"@lexical/code": ">=0.41.1-nightly.20260317.0",
|
|
33
|
+
"@lexical/extension": ">=0.41.1-nightly.20260317.0",
|
|
34
|
+
"@lexical/list": ">=0.41.1-nightly.20260317.0",
|
|
35
|
+
"@lexical/markdown": ">=0.41.1-nightly.20260317.0",
|
|
36
|
+
"@lexical/rich-text": ">=0.41.1-nightly.20260317.0",
|
|
37
|
+
"@lexical/utils": ">=0.41.1-nightly.20260317.0",
|
|
38
|
+
"lexical": ">=0.41.1-nightly.20260317.0"
|
|
41
39
|
},
|
|
42
40
|
"sideEffects": false,
|
|
43
41
|
"devDependencies": {
|
|
42
|
+
"@lexical/code": "0.41.1-nightly.20260317.0",
|
|
43
|
+
"@lexical/extension": "0.41.1-nightly.20260317.0",
|
|
44
|
+
"@lexical/list": "0.41.1-nightly.20260317.0",
|
|
45
|
+
"@lexical/markdown": "0.41.1-nightly.20260317.0",
|
|
46
|
+
"@lexical/rich-text": "0.41.1-nightly.20260317.0",
|
|
47
|
+
"@lexical/utils": "0.41.1-nightly.20260317.0",
|
|
44
48
|
"@repo/eslint-config": "*",
|
|
45
49
|
"@testing-library/dom": "^10.1.0",
|
|
46
50
|
"@testing-library/jest-dom": "^6.4.5",
|
|
47
51
|
"@testing-library/user-event": "^14.5.2",
|
|
48
|
-
"eslint": "^
|
|
52
|
+
"eslint": "^10.0.3",
|
|
49
53
|
"jsdom": "^24.1.0",
|
|
54
|
+
"lexical": "0.41.1-nightly.20260317.0",
|
|
50
55
|
"tslib": "^2.6.2",
|
|
51
56
|
"typescript": "^5.5.2",
|
|
52
|
-
"vite": "^
|
|
53
|
-
"vite-plugin-dts": "^
|
|
57
|
+
"vite": "^7.3.1",
|
|
58
|
+
"vite-plugin-dts": "^5.0.0-beta.6",
|
|
54
59
|
"vite-plugin-package-version": "^1.1.0",
|
|
55
|
-
"vitest": "^
|
|
60
|
+
"vitest": "^4.1.0"
|
|
56
61
|
},
|
|
57
62
|
"exports": {
|
|
58
63
|
".": {
|