@etrepum/lexical-builder-devtools-core 0.0.36-nightly.20250714.0 → 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/BuilderGraphExtension.d.ts +4 -0
- package/dist/BuilderGraphExtension.d.ts.map +1 -0
- package/dist/displayName.d.ts +2 -2
- package/dist/displayName.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -44
- package/package.json +7 -7
- package/dist/BuilderGraphPlan.d.ts +0 -4
- package/dist/BuilderGraphPlan.d.ts.map +0 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const BuilderGraphExtension: import('@etrepum/lexical-builder').LexicalExtension<import('@etrepum/lexical-builder').ExtensionConfigBase, "@etrepum/lexical-builder-devtools-core/BuilderGraph", {
|
|
2
|
+
Component: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
}, unknown>;
|
|
4
|
+
//# sourceMappingURL=BuilderGraphExtension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BuilderGraphExtension.d.ts","sourceRoot":"","sources":["../src/BuilderGraphExtension.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB;;WAYhC,CAAC"}
|
package/dist/displayName.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function displayName(
|
|
1
|
+
import { AnyLexicalExtension } from '@etrepum/lexical-builder';
|
|
2
|
+
export declare function displayName(extension: AnyLexicalExtension): string;
|
|
3
3
|
//# sourceMappingURL=displayName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"displayName.d.ts","sourceRoot":"","sources":["../src/displayName.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"displayName.d.ts","sourceRoot":"","sources":["../src/displayName.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,wBAAgB,WAAW,CAAC,SAAS,EAAE,mBAAmB,UASzD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
export declare const PACKAGE_VERSION: string;
|
|
9
9
|
export { BuilderGraphComponent, type BuilderGraphComponentProps, } from './BuilderGraphComponent';
|
|
10
10
|
export { buildGraph } from './buildGraph';
|
|
11
|
-
export {
|
|
11
|
+
export { BuilderGraphExtension } from './BuilderGraphExtension';
|
|
12
12
|
export { getMermaidLiveUrl } from './getMermaidLiveUrl';
|
|
13
13
|
//# 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,eAAO,MAAM,eAAe,EAAE,MAAwC,CAAC;AAEvE,OAAO,EACL,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,eAAe,EAAE,MAAwC,CAAC;AAEvE,OAAO,EACL,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { jsxs as m, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { lazy as u, useMemo as f, Suspense as h } from "react";
|
|
3
|
-
import { LexicalBuilder as
|
|
4
|
-
import { deflate as
|
|
5
|
-
import { fromUint8Array as
|
|
6
|
-
import {
|
|
7
|
-
function
|
|
8
|
-
const { name:
|
|
9
|
-
for (; e.length > 1 && /^
|
|
3
|
+
import { LexicalBuilder as x, defineExtension as g, provideOutput as y } from "@etrepum/lexical-builder";
|
|
4
|
+
import { deflate as $ } from "pako";
|
|
5
|
+
import { fromUint8Array as E } from "js-base64";
|
|
6
|
+
import { ReactExtension as v } from "@etrepum/lexical-react-extension";
|
|
7
|
+
function A(t) {
|
|
8
|
+
const { name: n } = t, e = n.split(/\//g);
|
|
9
|
+
for (; e.length > 1 && /^extension$/i.test(e[e.length - 1] ?? ""); )
|
|
10
10
|
e.pop();
|
|
11
|
-
return (e[e.length - 1] ||
|
|
11
|
+
return (e[e.length - 1] || n).replaceAll("/", "-").replaceAll(/[\\"<>]/g, "");
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
function i(
|
|
16
|
-
e.push(
|
|
13
|
+
function N(t) {
|
|
14
|
+
const n = x.fromEditor(t), e = ["flowchart TB"];
|
|
15
|
+
function i(r) {
|
|
16
|
+
e.push(r);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
19
|
-
for (let
|
|
20
|
-
|
|
21
|
-
function
|
|
22
|
-
return
|
|
18
|
+
const s = n.sortedExtensionReps(), a = {};
|
|
19
|
+
for (let r = 0; r < s.length; r++)
|
|
20
|
+
a[s[r].extension.name] = `P${String(r)}`;
|
|
21
|
+
function l(r) {
|
|
22
|
+
return a[r.name];
|
|
23
23
|
}
|
|
24
|
-
for (const
|
|
25
|
-
const {
|
|
26
|
-
i(`${
|
|
27
|
-
for (const
|
|
28
|
-
i(`${
|
|
29
|
-
for (const [
|
|
30
|
-
const d =
|
|
31
|
-
d && i(`${
|
|
24
|
+
for (const r of s) {
|
|
25
|
+
const { extension: o } = r;
|
|
26
|
+
i(`${l(o)}["${A(o)}"]`);
|
|
27
|
+
for (const p of o.dependencies || [])
|
|
28
|
+
i(`${l(o)} --> ${l(Array.isArray(p) ? p[0] : p)}`);
|
|
29
|
+
for (const [p] of o.peerDependencies || []) {
|
|
30
|
+
const d = n.extensionNameMap.get(p);
|
|
31
|
+
d && i(`${l(o)} -.-> ${l(d.extension)}`);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
return `${e.join(`
|
|
@@ -36,7 +36,7 @@ function P(t) {
|
|
|
36
36
|
`;
|
|
37
37
|
}
|
|
38
38
|
function S(t) {
|
|
39
|
-
const
|
|
39
|
+
const n = JSON.stringify({
|
|
40
40
|
code: t,
|
|
41
41
|
mermaid: JSON.stringify({ theme: "dark" }, null, 2),
|
|
42
42
|
autoSync: !0,
|
|
@@ -45,40 +45,40 @@ function S(t) {
|
|
|
45
45
|
updateEditor: !1,
|
|
46
46
|
editorMode: "code"
|
|
47
47
|
});
|
|
48
|
-
return `https://mermaid.live/edit#pako:${
|
|
49
|
-
|
|
48
|
+
return `https://mermaid.live/edit#pako:${E(
|
|
49
|
+
$(new TextEncoder().encode(n), { level: 9 })
|
|
50
50
|
)}`;
|
|
51
51
|
}
|
|
52
52
|
const B = u(() => import("./Mermaid-hdIyOO2O.js"));
|
|
53
|
-
function
|
|
53
|
+
function G({
|
|
54
54
|
editor: t,
|
|
55
|
-
...
|
|
55
|
+
...n
|
|
56
56
|
}) {
|
|
57
57
|
const { text: e, href: i } = f(() => {
|
|
58
|
-
const
|
|
58
|
+
const a = N(t);
|
|
59
59
|
return {
|
|
60
|
-
text:
|
|
61
|
-
href: S(
|
|
60
|
+
text: a,
|
|
61
|
+
href: S(a)
|
|
62
62
|
};
|
|
63
|
-
}, [t]),
|
|
64
|
-
return /* @__PURE__ */ m("div", { ...
|
|
63
|
+
}, [t]), s = n.className ? {} : { style: { display: "grid", gap: "1rem" } };
|
|
64
|
+
return /* @__PURE__ */ m("div", { ...s, ...n, children: [
|
|
65
65
|
/* @__PURE__ */ c("a", { href: i, target: "_blank", rel: "noopener", children: "mermaid.live" }),
|
|
66
66
|
/* @__PURE__ */ c(B, { text: e })
|
|
67
67
|
] });
|
|
68
68
|
}
|
|
69
|
-
const
|
|
69
|
+
const w = g({
|
|
70
70
|
name: "@etrepum/lexical-builder-devtools-core/BuilderGraph",
|
|
71
|
-
dependencies: [
|
|
71
|
+
dependencies: [v],
|
|
72
72
|
register(t) {
|
|
73
|
-
return
|
|
74
|
-
Component: () => /* @__PURE__ */ c(h, { children: /* @__PURE__ */ c(
|
|
73
|
+
return y({
|
|
74
|
+
Component: () => /* @__PURE__ */ c(h, { children: /* @__PURE__ */ c(G, { editor: t }) })
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
}),
|
|
77
|
+
}), C = "0.0.36";
|
|
78
78
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
G as BuilderGraphComponent,
|
|
80
|
+
w as BuilderGraphExtension,
|
|
81
|
+
C as PACKAGE_VERSION,
|
|
82
|
+
N as buildGraph,
|
|
83
83
|
S as getMermaidLiveUrl
|
|
84
84
|
};
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"lexical-builder",
|
|
8
8
|
"devtools",
|
|
9
9
|
"plug-in",
|
|
10
|
-
"
|
|
10
|
+
"extension"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "tsc --noEmit && vite build",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lint": "eslint",
|
|
17
17
|
"test:watch": "vitest"
|
|
18
18
|
},
|
|
19
|
-
"version": "0.0.36
|
|
19
|
+
"version": "0.0.36",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@docusaurus/theme-mermaid": "^3.4.0",
|
|
32
32
|
"@etrepum/lexical-builder": "*",
|
|
33
|
-
"@etrepum/lexical-react-
|
|
33
|
+
"@etrepum/lexical-react-extension": "*",
|
|
34
34
|
"js-base64": "^3.7.7",
|
|
35
35
|
"mermaid": "^10.9.1",
|
|
36
36
|
"pako": "^2.1.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@lexical/react": ">=0.
|
|
40
|
-
"@lexical/text": ">=0.
|
|
41
|
-
"@lexical/utils": ">=0.
|
|
42
|
-
"lexical": ">=0.
|
|
39
|
+
"@lexical/react": ">=0.33.1 || >=0.33.2-nightly.0",
|
|
40
|
+
"@lexical/text": ">=0.33.1 || >=0.33.2-nightly.0",
|
|
41
|
+
"@lexical/utils": ">=0.33.1 || >=0.33.2-nightly.0",
|
|
42
|
+
"lexical": ">=0.33.1 || >=0.33.2-nightly.0",
|
|
43
43
|
"react": ">=18"
|
|
44
44
|
},
|
|
45
45
|
"sideEffects": false,
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const BuilderGraphPlan: import('@etrepum/lexical-builder').LexicalPlan<import('@etrepum/lexical-builder').PlanConfigBase, "@etrepum/lexical-builder-devtools-core/BuilderGraph", {
|
|
2
|
-
Component: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
}, unknown>;
|
|
4
|
-
//# sourceMappingURL=BuilderGraphPlan.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BuilderGraphPlan.d.ts","sourceRoot":"","sources":["../src/BuilderGraphPlan.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;WAY3B,CAAC"}
|