@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.
@@ -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"}
@@ -1,3 +1,3 @@
1
- import { AnyLexicalPlan } from '@etrepum/lexical-builder';
2
- export declare function displayName(plan: AnyLexicalPlan): string;
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,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,wBAAgB,WAAW,CAAC,IAAI,EAAE,cAAc,UAS/C"}
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 { BuilderGraphPlan } from './BuilderGraphPlan';
11
+ export { BuilderGraphExtension } from './BuilderGraphExtension';
12
12
  export { getMermaidLiveUrl } from './getMermaidLiveUrl';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -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,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
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 g, definePlan as y, provideOutput as $ } from "@etrepum/lexical-builder";
4
- import { deflate as x } from "pako";
5
- import { fromUint8Array as v } from "js-base64";
6
- import { ReactPlan as A } from "@etrepum/lexical-react-plan";
7
- function N(t) {
8
- const { name: r } = t, e = r.split(/\//g);
9
- for (; e.length > 1 && /^plan$/i.test(e[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] || r).replaceAll("/", "-").replaceAll(/[\\"<>]/g, "");
11
+ return (e[e.length - 1] || n).replaceAll("/", "-").replaceAll(/[\\"<>]/g, "");
12
12
  }
13
- function P(t) {
14
- const r = g.fromEditor(t), e = ["flowchart TB"];
15
- function i(n) {
16
- e.push(n);
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 a = r.sortedPlanReps(), l = {};
19
- for (let n = 0; n < a.length; n++)
20
- l[a[n].plan.name] = `P${String(n)}`;
21
- function p(n) {
22
- return l[n.name];
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 n of a) {
25
- const { plan: o } = n;
26
- i(`${p(o)}["${N(o)}"]`);
27
- for (const s of o.dependencies || [])
28
- i(`${p(o)} --> ${p(Array.isArray(s) ? s[0] : s)}`);
29
- for (const [s] of o.peerDependencies || []) {
30
- const d = r.planNameMap.get(s);
31
- d && i(`${p(o)} -.-> ${p(d.plan)}`);
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 r = JSON.stringify({
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:${v(
49
- x(new TextEncoder().encode(r), { level: 9 })
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 E({
53
+ function G({
54
54
  editor: t,
55
- ...r
55
+ ...n
56
56
  }) {
57
57
  const { text: e, href: i } = f(() => {
58
- const l = P(t);
58
+ const a = N(t);
59
59
  return {
60
- text: l,
61
- href: S(l)
60
+ text: a,
61
+ href: S(a)
62
62
  };
63
- }, [t]), a = r.className ? {} : { style: { display: "grid", gap: "1rem" } };
64
- return /* @__PURE__ */ m("div", { ...a, ...r, children: [
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 k = y({
69
+ const w = g({
70
70
  name: "@etrepum/lexical-builder-devtools-core/BuilderGraph",
71
- dependencies: [A],
71
+ dependencies: [v],
72
72
  register(t) {
73
- return $({
74
- Component: () => /* @__PURE__ */ c(h, { children: /* @__PURE__ */ c(E, { editor: t }) })
73
+ return y({
74
+ Component: () => /* @__PURE__ */ c(h, { children: /* @__PURE__ */ c(G, { editor: t }) })
75
75
  });
76
76
  }
77
- }), w = "0.0.36-nightly.20250714.0";
77
+ }), C = "0.0.36";
78
78
  export {
79
- E as BuilderGraphComponent,
80
- k as BuilderGraphPlan,
81
- w as PACKAGE_VERSION,
82
- P as buildGraph,
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
- "plan"
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-nightly.20250714.0",
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-plan": "*",
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.31.0 || >=0.31.1-nightly.0",
40
- "@lexical/text": ">=0.31.0 || >=0.31.1-nightly.0",
41
- "@lexical/utils": ">=0.31.0 || >=0.31.1-nightly.0",
42
- "lexical": ">=0.31.0 || >=0.31.1-nightly.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"}