lexical-medium-editor 1.2.18 → 1.2.19

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.
@@ -1,11 +1,11 @@
1
- import { jsx as o, jsxs as x, Fragment as _ } from "react/jsx-runtime";
2
- import { DecoratorNode as p, $createNodeSelection as S, $setSelection as O, $applyNodeReplacement as l, TextNode as v, ElementNode as D, $getSelection as b, $isRangeSelection as w, $isLineBreakNode as N, $isTextNode as A, $isParagraphNode as C, $createParagraphNode as E, $createTextNode as J } from "lexical";
3
- import { addClassNamesToElement as a, $findMatchingParent as T } from "@lexical/utils";
4
- import { useRef as q, useEffect as k } from "react";
1
+ import { jsx as o, jsxs as f, Fragment as N } from "react/jsx-runtime";
2
+ import { DecoratorNode as _, $createNodeSelection as O, $setSelection as M, $applyNodeReplacement as l, TextNode as b, ElementNode as v, $getSelection as $, $isRangeSelection as E, $isLineBreakNode as S, $isTextNode as w, $isParagraphNode as T, $createParagraphNode as C, $createTextNode as J } from "lexical";
3
+ import { addClassNamesToElement as a, $findMatchingParent as q } from "@lexical/utils";
4
+ import { useRef as k, useEffect as I } from "react";
5
5
  import { renderToString as z } from "react-dom/server";
6
- const I = ({ children: n, inline: t }) => {
7
- const e = q(null);
8
- k(() => {
6
+ const B = ({ children: n, inline: t }) => {
7
+ const e = k(null);
8
+ I(() => {
9
9
  e.current && window.MathJax && window.MathJax.typesetPromise && window.MathJax.typesetPromise([e.current]).catch(
10
10
  (i) => console.error("MathJax typesetting failed:", i)
11
11
  );
@@ -13,12 +13,12 @@ const I = ({ children: n, inline: t }) => {
13
13
  const r = `${n}`;
14
14
  return /* @__PURE__ */ o("span", { ref: e, children: r });
15
15
  };
16
- class h extends p {
16
+ class d extends _ {
17
17
  static getType() {
18
18
  return "math";
19
19
  }
20
20
  static clone(t) {
21
- return new h(t.__equation, t.__inline, t.__key);
21
+ return new d(t.__equation, t.__inline, t.__key);
22
22
  }
23
23
  constructor(t, e, r) {
24
24
  super(r), this.__equation = t, this.__inline = e;
@@ -33,8 +33,8 @@ class h extends p {
33
33
  return this.__inline;
34
34
  }
35
35
  select() {
36
- const t = S();
37
- return t.add(this.getKey()), O(t), t;
36
+ const t = O();
37
+ return t.add(this.getKey()), M(t), t;
38
38
  }
39
39
  createDOM(t) {
40
40
  const e = document.createElement("span");
@@ -46,7 +46,7 @@ class h extends p {
46
46
  static importDOM() {
47
47
  return {
48
48
  span: (t) => ({
49
- conversion: B,
49
+ conversion: H,
50
50
  priority: 1
51
51
  })
52
52
  };
@@ -57,7 +57,7 @@ class h extends p {
57
57
  }
58
58
  static importJSON(t) {
59
59
  const { equation: e, inline: r } = t;
60
- return M(e, r).updateFromJSON(t);
60
+ return D(e, r).updateFromJSON(t);
61
61
  }
62
62
  exportJSON() {
63
63
  return {
@@ -67,29 +67,29 @@ class h extends p {
67
67
  };
68
68
  }
69
69
  decorate() {
70
- return /* @__PURE__ */ o(I, { inline: this.__inline, children: this.__equation });
70
+ return /* @__PURE__ */ o(B, { inline: this.__inline, children: this.__equation });
71
71
  }
72
72
  }
73
- function B(n) {
73
+ function H(n) {
74
74
  let t = null;
75
75
  if (n.getAttribute("data-lexical-math") === "true") {
76
76
  const e = n.textContent, i = n.getAttribute("data-math-inline") === "true";
77
- t = M(e, i);
77
+ t = D(e, i);
78
78
  }
79
79
  return { node: t };
80
80
  }
81
- function M(n, t) {
82
- return l(new h(n, t));
81
+ function D(n, t) {
82
+ return l(new d(n, t));
83
83
  }
84
84
  function G(n) {
85
- return n instanceof h;
85
+ return n instanceof d;
86
86
  }
87
- class d extends v {
87
+ class h extends b {
88
88
  static getType() {
89
89
  return "math-highlight-inline";
90
90
  }
91
91
  static clone(t) {
92
- return new d(t.__equation, t.__key);
92
+ return new h(t.__equation, t.__key);
93
93
  }
94
94
  createDOM(t) {
95
95
  const e = super.createDOM(t);
@@ -111,14 +111,14 @@ class d extends v {
111
111
  return a(e, t._config.theme.math.renderedInline), e.textContent = this.getTextContent(), e.setAttribute("data-lexical-math", "true"), e.setAttribute("data-math-inline", "true"), { element: e };
112
112
  }
113
113
  }
114
- function V(n) {
115
- const t = new d(n);
114
+ function W(n) {
115
+ const t = new h(n);
116
116
  return l(t);
117
117
  }
118
- function Q(n) {
119
- return n instanceof d;
118
+ function V(n) {
119
+ return n instanceof h;
120
120
  }
121
- class m extends D {
121
+ class m extends v {
122
122
  static getType() {
123
123
  return "math-highlight-block";
124
124
  }
@@ -154,25 +154,25 @@ class m extends D {
154
154
  return this.remove(), !0;
155
155
  }
156
156
  insertNewAfter() {
157
- const t = b();
158
- if (w(t) && t.isCollapsed()) {
157
+ const t = $();
158
+ if (E(t) && t.isCollapsed()) {
159
159
  const e = this.getLastChild(), r = t.anchor.getNode();
160
- if (r.getKey() === this.getKey() && t.anchor.offset === 0 && this.getChildrenSize() === 0 || e && N(e) && r.getKey() === this.getKey() && t.anchor.offset === this.getChildrenSize() || e && A(e) && r.getKey() === e.getKey() && t.anchor.offset === e.getTextContent().length)
161
- if (e && N(e)) {
160
+ if (r.getKey() === this.getKey() && t.anchor.offset === 0 && this.getChildrenSize() === 0 || e && S(e) && r.getKey() === this.getKey() && t.anchor.offset === this.getChildrenSize() || e && w(e) && r.getKey() === e.getKey() && t.anchor.offset === e.getTextContent().length)
161
+ if (e && S(e)) {
162
162
  e.remove();
163
- const u = T(this, C), s = E();
163
+ const u = q(this, T), s = C();
164
164
  return u ? u.insertAfter(s) : this.insertAfter(s), s.select(), s;
165
165
  } else
166
166
  return t.insertLineBreak(), null;
167
167
  }
168
168
  }
169
169
  }
170
- function U(n) {
170
+ function Q(n) {
171
171
  const t = J(n);
172
172
  let e = new m(n);
173
173
  return l(e.append(t));
174
174
  }
175
- function W(n) {
175
+ function X(n) {
176
176
  return n instanceof m;
177
177
  }
178
178
  function c() {
@@ -188,12 +188,12 @@ function c() {
188
188
  }
189
189
  );
190
190
  }
191
- class f extends p {
191
+ class x extends _ {
192
192
  static getType() {
193
193
  return "horizontal-divider";
194
194
  }
195
195
  static clone(t) {
196
- return new f(t.__key);
196
+ return new x(t.__key);
197
197
  }
198
198
  createDOM(t) {
199
199
  const e = document.createElement("div");
@@ -212,7 +212,7 @@ class f extends p {
212
212
  static importDOM() {
213
213
  return {
214
214
  div: (t) => t.getAttribute("data-lexical-horizontal-divider") === "true" ? {
215
- conversion: H,
215
+ conversion: L,
216
216
  priority: 2
217
217
  } : null
218
218
  };
@@ -220,7 +220,7 @@ class f extends p {
220
220
  exportDOM(t) {
221
221
  const { element: e } = super.exportDOM(t);
222
222
  return e.setAttribute("data-lexical-horizontal-divider", "true"), { after: (i) => {
223
- const s = z(/* @__PURE__ */ x(_, { children: [
223
+ const s = z(/* @__PURE__ */ f(N, { children: [
224
224
  /* @__PURE__ */ o(c, {}),
225
225
  /* @__PURE__ */ o(c, {}),
226
226
  /* @__PURE__ */ o(c, {})
@@ -229,35 +229,41 @@ class f extends p {
229
229
  }, element: e };
230
230
  }
231
231
  static importJSON(t) {
232
- return y().updateFromJSON(t);
232
+ return A().updateFromJSON(t);
233
233
  }
234
234
  exportJSON() {
235
235
  return super.exportJSON();
236
236
  }
237
237
  decorate() {
238
- return /* @__PURE__ */ x(_, { children: [
238
+ return /* @__PURE__ */ f(N, { children: [
239
239
  /* @__PURE__ */ o(c, {}),
240
240
  /* @__PURE__ */ o(c, {}),
241
241
  /* @__PURE__ */ o(c, {})
242
242
  ] });
243
243
  }
244
244
  }
245
- function H(n) {
245
+ function L(n) {
246
246
  let t = null;
247
- return n.getAttribute("data-lexical-horizontal-divider") === "true" && (t = y()), { node: t };
247
+ return n.getAttribute("data-lexical-horizontal-divider") === "true" && (t = A()), { node: t };
248
248
  }
249
- function y() {
250
- return l(new f());
249
+ function A() {
250
+ return l(new x());
251
251
  }
252
- class g extends p {
252
+ const p = {
253
+ UPLOADED: "uploaded",
254
+ UPLOADING: "uploading",
255
+ ERROR: "error"
256
+ };
257
+ class g extends _ {
253
258
  static getType() {
254
259
  return "image";
255
260
  }
256
261
  static clone(t) {
257
- return new g(t.__src, t.__key);
262
+ const e = new g(t.__src, t.__uploadState, t.__key);
263
+ return e.__attributes = { ...t.__attributes }, e;
258
264
  }
259
- constructor(t, e) {
260
- super(e), this.__src = t, this.__attributes = {};
265
+ constructor(t, e = p.UPLOADED, r) {
266
+ super(r), this.__src = t, this.__attributes = {}, this.__uploadState = e;
261
267
  }
262
268
  createDOM(t) {
263
269
  const e = document.createElement("figure");
@@ -269,7 +275,7 @@ class g extends p {
269
275
  static importDOM() {
270
276
  return {
271
277
  figure: (t) => ({
272
- conversion: K,
278
+ conversion: P,
273
279
  priority: 1
274
280
  })
275
281
  };
@@ -285,7 +291,7 @@ class g extends p {
285
291
  }
286
292
  static importJSON(t) {
287
293
  const { src: e } = t;
288
- return $(e).updateFromJSON(t);
294
+ return y(e).updateFromJSON(t);
289
295
  }
290
296
  exportJSON() {
291
297
  return {
@@ -294,12 +300,23 @@ class g extends p {
294
300
  };
295
301
  }
296
302
  select() {
297
- const t = S();
298
- return t.add(this.getKey()), O(t), t;
303
+ const t = O();
304
+ return t.add(this.getKey()), M(t), t;
299
305
  }
300
306
  getSrc() {
301
307
  return this.__src;
302
308
  }
309
+ setSrc(t) {
310
+ const e = this.getWritable();
311
+ return e.__src = t, e;
312
+ }
313
+ getUploadState() {
314
+ return this.__uploadState;
315
+ }
316
+ setUploadState(t) {
317
+ const e = this.getWritable();
318
+ return e.__uploadState = t, e;
319
+ }
303
320
  getTextContent() {
304
321
  return `
305
322
  `;
@@ -308,40 +325,44 @@ class g extends p {
308
325
  return !1;
309
326
  }
310
327
  decorate() {
311
- const t = { src: this.getSrc(), ...this.__attributes };
312
- return /* @__PURE__ */ o("img", { ...t });
328
+ const t = { src: this.getSrc(), ...this.__attributes }, e = this.__uploadState;
329
+ return e === p.UPLOADED ? /* @__PURE__ */ o("img", { ...t }) : /* @__PURE__ */ f("div", { className: `medium-img-wrapper medium-img-${e}`, children: [
330
+ /* @__PURE__ */ o("img", { ...t }),
331
+ /* @__PURE__ */ o("div", { className: "medium-img-overlay", children: e === p.UPLOADING ? "Uploading…" : "Upload failed" })
332
+ ] });
313
333
  }
314
334
  }
315
- function K(n) {
335
+ function P(n) {
316
336
  let t = null;
317
337
  if (n.getAttribute("data-lexical-image-container") === "true") {
318
338
  const e = n.querySelector("img"), r = e.getAttribute("src");
319
- t = $(r);
339
+ t = y(r);
320
340
  for (const i of e.attributes)
321
341
  i.name !== "src" && (t.__attributes[i.name] = i.value);
322
342
  }
323
343
  return { node: t };
324
344
  }
325
- function $(n) {
326
- return l(new g(n));
345
+ function y(n, t) {
346
+ return l(new g(n, t));
327
347
  }
328
- function X(n) {
348
+ function Y(n) {
329
349
  return n instanceof g;
330
350
  }
331
351
  export {
332
352
  G as $,
333
- f as H,
353
+ x as H,
334
354
  g as I,
335
- h as M,
336
- Q as a,
337
- W as b,
338
- y as c,
339
- $ as d,
340
- X as e,
341
- d as f,
342
- V as g,
343
- M as h,
344
- m as i,
345
- U as j
355
+ d as M,
356
+ V as a,
357
+ X as b,
358
+ A as c,
359
+ Y as d,
360
+ y as e,
361
+ p as f,
362
+ h as g,
363
+ W as h,
364
+ D as i,
365
+ m as j,
366
+ Q as k
346
367
  };
347
- //# sourceMappingURL=ImageNode-BhH71HMX.js.map
368
+ //# sourceMappingURL=ImageNode-Cqkp_4Y6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageNode-Cqkp_4Y6.js","sources":["../src/components/MathJaxRenderer.jsx","../src/nodes/MathNode.jsx","../src/nodes/MathHighlightNode.jsx","../src/nodes/HorizontalDividerNode.jsx","../src/nodes/ImageNode.jsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\";\n\nconst MathJaxRenderer = ({ children, inline }) => {\n const containerRef = useRef(null);\n\n useEffect(() => {\n if (containerRef.current && window.MathJax && window.MathJax.typesetPromise) {\n window.MathJax.typesetPromise([containerRef.current]).catch((err) =>\n console.error(\"MathJax typesetting failed:\", err)\n );\n }\n }, [children, inline]);\n\n const content = `${children}`;\n\n return <span ref={containerRef}>{content}</span>;\n};\n\nexport default MathJaxRenderer;\n","import {\n DecoratorNode,\n $applyNodeReplacement,\n $createNodeSelection,\n $setSelection,\n} from \"lexical\";\nimport { addClassNamesToElement } from \"@lexical/utils\";\nimport MathJaxRenderer from \"../components/MathJaxRenderer\";\n\nexport class MathNode extends DecoratorNode {\n static getType() {\n return \"math\";\n }\n\n static clone(node) {\n return new MathNode(node.__equation, node.__inline, node.__key);\n }\n\n constructor(equation, inline, key) {\n super(key);\n this.__equation = equation;\n this.__inline = inline;\n }\n\n getEquation() {\n return this.__equation;\n }\n\n getTextContent() {\n return this.getEquation();\n }\n\n isInline() {\n return this.__inline;\n }\n\n select() {\n // only call during updates\n const nodeSelection = $createNodeSelection();\n nodeSelection.add(this.getKey());\n $setSelection(nodeSelection);\n return nodeSelection;\n }\n\n createDOM(config) {\n const element = document.createElement(\"span\");\n if (this.__inline) {\n addClassNamesToElement(element, config.theme.math.renderedInline);\n } else {\n addClassNamesToElement(element, config.theme.math.renderedBlock);\n }\n return element;\n }\n\n updateDOM() {\n return false;\n }\n\n static importDOM() {\n return {\n span: (node) => ({\n conversion: $convertMathElement,\n priority: 1,\n }),\n };\n }\n\n exportDOM(editor) {\n const { element } = super.exportDOM(editor); // calls the createDOM method\n element.textContent = this.getEquation();\n element.setAttribute(\"data-lexical-math\", \"true\");\n element.setAttribute(\"data-math-inline\", this.__inline.toString());\n return { element };\n }\n\n static importJSON(serializedNode) {\n const { equation, inline } = serializedNode;\n return $createMathNode(equation, inline).updateFromJSON(serializedNode);\n }\n\n exportJSON() {\n return {\n ...super.exportJSON(),\n equation: this.getEquation(),\n inline: this.isInline(),\n };\n }\n\n decorate() {\n return <MathJaxRenderer inline={this.__inline}>{this.__equation}</MathJaxRenderer>;\n }\n}\n\nfunction $convertMathElement(element) {\n let node = null;\n if (element.getAttribute(\"data-lexical-math\") === \"true\") {\n const equation = element.textContent;\n const inlineAttr = element.getAttribute(\"data-math-inline\");\n const inline = inlineAttr === \"true\";\n node = $createMathNode(equation, inline);\n }\n\n return { node };\n}\n\nexport function $createMathNode(equation, inline) {\n return $applyNodeReplacement(new MathNode(equation, inline));\n}\n\nexport function $isMathNode(node) {\n return node instanceof MathNode;\n}\n","import {\n TextNode,\n $applyNodeReplacement,\n ElementNode,\n $createParagraphNode,\n $createTextNode,\n $isParagraphNode,\n $getSelection,\n $isRangeSelection,\n $isTextNode,\n $isLineBreakNode,\n} from \"lexical\";\nimport { addClassNamesToElement, $findMatchingParent } from \"@lexical/utils\";\n\nexport class MathHighlightNodeInline extends TextNode {\n static getType() {\n return \"math-highlight-inline\";\n }\n\n static clone(node) {\n return new MathHighlightNodeInline(node.__equation, node.__key);\n }\n\n createDOM(config) {\n const element = super.createDOM(config);\n addClassNamesToElement(element, config.theme.math.highlightInline);\n return element;\n }\n\n static importJSON(serializedNode) {\n // This method will likely be never used\n return null;\n }\n\n exportJSON() {\n // Export as a MathNode\n return {\n type: \"math\",\n version: 1,\n equation: this.getTextContent(),\n inline: true,\n };\n }\n\n exportDOM(editor) {\n // Export as a MathNode\n const element = document.createElement(\"span\");\n addClassNamesToElement(element, editor._config.theme.math.renderedInline);\n element.textContent = this.getTextContent();\n element.setAttribute(\"data-lexical-math\", \"true\");\n element.setAttribute(\"data-math-inline\", \"true\");\n return { element };\n }\n}\n\nexport function $createMathHighlightNodeInline(equation) {\n const mathHighlightNode = new MathHighlightNodeInline(equation);\n return $applyNodeReplacement(mathHighlightNode);\n}\n\nexport function $isMathHighlightNodeInline(node) {\n return node instanceof MathHighlightNodeInline;\n}\n\nexport class MathHighlightNodeBlock extends ElementNode {\n static getType() {\n return \"math-highlight-block\";\n }\n\n static clone(node) {\n return new MathHighlightNodeBlock(node.__equation, node.__key);\n }\n\n constructor(equation, key) {\n super(key);\n this.__equation = equation;\n }\n\n createDOM(config) {\n const element = document.createElement(\"span\");\n addClassNamesToElement(element, config.theme.math.highlightBlock);\n return element;\n }\n\n updateDOM() {\n return false;\n }\n\n static importJSON(serializedNode) {\n return null;\n }\n\n exportJSON() {\n return {\n type: \"math\",\n version: 1,\n equation: this.getTextContent(),\n inline: false,\n };\n }\n\n exportDOM(editor) {\n const element = document.createElement(\"span\");\n addClassNamesToElement(element, editor._config.theme.math.renderedBlock);\n element.textContent = this.getTextContent();\n element.setAttribute(\"data-lexical-math\", \"true\");\n element.setAttribute(\"data-math-inline\", \"false\");\n return { element };\n }\n\n collapseAtStart() {\n this.remove();\n return true;\n }\n\n insertNewAfter() {\n const selection = $getSelection();\n if ($isRangeSelection(selection) && selection.isCollapsed()) {\n const lastChild = this.getLastChild();\n const anchorNode = selection.anchor.getNode();\n const isAtBlockEnd =\n (anchorNode.getKey() === this.getKey() &&\n selection.anchor.offset === 0 &&\n this.getChildrenSize() === 0) ||\n (lastChild &&\n $isLineBreakNode(lastChild) &&\n anchorNode.getKey() === this.getKey() &&\n selection.anchor.offset === this.getChildrenSize()) ||\n (lastChild &&\n $isTextNode(lastChild) &&\n anchorNode.getKey() === lastChild.getKey() &&\n selection.anchor.offset === lastChild.getTextContent().length);\n if (isAtBlockEnd) {\n // If the last child is a LineBreakNode, it means the user pressed Enter twice (once to create the break, once now).\n // In this case, we exit the block.\n if (lastChild && $isLineBreakNode(lastChild)) {\n lastChild.remove();\n const parentNode = $findMatchingParent(this, $isParagraphNode);\n const paragraphNode = $createParagraphNode();\n if (!parentNode) {\n this.insertAfter(paragraphNode);\n } else {\n parentNode.insertAfter(paragraphNode);\n }\n paragraphNode.select();\n return paragraphNode;\n } else {\n // Otherwise, we just insert a line break within the block.\n selection.insertLineBreak();\n return null;\n }\n }\n }\n }\n}\n\nexport function $createMathHighlightNodeBlock(equation) {\n const equationTextNode = $createTextNode(equation);\n let mathHighlightNode = new MathHighlightNodeBlock(equation);\n return $applyNodeReplacement(mathHighlightNode.append(equationTextNode));\n}\n\nexport function $isMathHighlightNodeBlock(node) {\n return node instanceof MathHighlightNodeBlock;\n}\n","import { DecoratorNode, $applyNodeReplacement } from \"lexical\";\nimport { addClassNamesToElement } from \"@lexical/utils\";\nimport { renderToString } from \"react-dom/server\";\n\nfunction SVGDot() {\n const dotSize = 6;\n const radius = dotSize / 2;\n const viewBox = `0 0 ${dotSize} ${dotSize}`;\n\n return (\n <svg\n width={dotSize}\n height={dotSize}\n viewBox={viewBox}\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx={radius} cy={radius} r={radius} />\n </svg>\n );\n}\n\nexport class HorizontalDividerNode extends DecoratorNode {\n static getType() {\n return \"horizontal-divider\";\n }\n\n static clone(node) {\n return new HorizontalDividerNode(node.__key);\n }\n\n createDOM(config) {\n const element = document.createElement(\"div\");\n addClassNamesToElement(element, config.theme.divider);\n return element;\n }\n\n getTextContent() {\n return \"\\n\";\n }\n\n isInline() {\n return false;\n }\n\n updateDOM() {\n return false;\n }\n\n static importDOM() {\n return {\n div: (node) => {\n if (node.getAttribute(\"data-lexical-horizontal-divider\") === \"true\") {\n return {\n conversion: $convertHorizontalDividerElement,\n priority: 2,\n };\n }\n return null;\n },\n };\n }\n\n exportDOM(editor) {\n const { element } = super.exportDOM(editor);\n element.setAttribute(\"data-lexical-horizontal-divider\", \"true\");\n\n // post-processing function\n const after = (element) => {\n const dotsComponent = (\n <>\n <SVGDot />\n <SVGDot />\n <SVGDot />\n </>\n );\n const dotsHTML = renderToString(dotsComponent);\n element.innerHTML = dotsHTML;\n\n return element;\n };\n\n return { after, element };\n }\n\n static importJSON(serializedNode) {\n return $createHorizontalDividerNode().updateFromJSON(serializedNode);\n }\n\n exportJSON() {\n return super.exportJSON();\n }\n\n decorate() {\n return (\n <>\n <SVGDot />\n <SVGDot />\n <SVGDot />\n </>\n );\n }\n}\n\nfunction $convertHorizontalDividerElement(element) {\n let node = null;\n if (element.getAttribute(\"data-lexical-horizontal-divider\") === \"true\") {\n node = $createHorizontalDividerNode();\n }\n return { node };\n}\n\nexport function $createHorizontalDividerNode() {\n return $applyNodeReplacement(new HorizontalDividerNode());\n}\n\nexport function $isHorizontalDividerNode(node) {\n return node instanceof HorizontalDividerNode;\n}\n","import {\n DecoratorNode,\n $applyNodeReplacement,\n $createNodeSelection,\n $setSelection,\n} from \"lexical\";\nimport { addClassNamesToElement } from \"@lexical/utils\";\n\nexport const IMAGE_UPLOAD_STATE = {\n UPLOADED: \"uploaded\",\n UPLOADING: \"uploading\",\n ERROR: \"error\",\n};\n\nexport class ImageNode extends DecoratorNode {\n static getType() {\n return \"image\";\n }\n\n static clone(node) {\n const clone = new ImageNode(node.__src, node.__uploadState, node.__key);\n clone.__attributes = { ...node.__attributes };\n return clone;\n }\n\n constructor(src, uploadState = IMAGE_UPLOAD_STATE.UPLOADED, key) {\n super(key);\n this.__src = src;\n this.__attributes = {};\n this.__uploadState = uploadState;\n }\n\n createDOM(config) {\n const element = document.createElement(\"figure\");\n addClassNamesToElement(element, config.theme.img);\n return element;\n }\n\n updateDOM() {\n return false;\n }\n\n static importDOM() {\n return {\n figure: (node) => ({\n conversion: $convertImageElement,\n priority: 1,\n }),\n };\n }\n\n exportDOM(editor) {\n const { element } = super.exportDOM(editor);\n element.setAttribute(\"data-lexical-image-container\", \"true\");\n\n const imgElement = document.createElement(\"img\");\n imgElement.setAttribute(\"src\", this.getSrc());\n\n // Apply stored attributes\n for (const [name, value] of Object.entries(this.__attributes)) {\n imgElement.setAttribute(name, value);\n }\n\n element.appendChild(imgElement);\n return { element };\n }\n\n static importJSON(serializedNode) {\n const { src } = serializedNode;\n return $createImageNode(src).updateFromJSON(serializedNode);\n }\n\n exportJSON() {\n return {\n ...super.exportJSON(),\n src: this.getSrc(),\n };\n }\n\n select() {\n const nodeSelection = $createNodeSelection();\n nodeSelection.add(this.getKey());\n $setSelection(nodeSelection);\n return nodeSelection;\n }\n\n getSrc() {\n return this.__src;\n }\n\n setSrc(src) {\n const self = this.getWritable();\n self.__src = src;\n return self;\n }\n\n getUploadState() {\n return this.__uploadState;\n }\n\n setUploadState(state) {\n const self = this.getWritable();\n self.__uploadState = state;\n return self;\n }\n\n getTextContent() {\n return \"\\n\";\n }\n\n isInline() {\n return false;\n }\n\n decorate() {\n const props = { src: this.getSrc(), ...this.__attributes };\n const state = this.__uploadState;\n\n if (state === IMAGE_UPLOAD_STATE.UPLOADED) {\n return <img {...props} />;\n }\n\n return (\n <div className={`medium-img-wrapper medium-img-${state}`}>\n <img {...props} />\n <div className=\"medium-img-overlay\">\n {state === IMAGE_UPLOAD_STATE.UPLOADING ? \"Uploading…\" : \"Upload failed\"}\n </div>\n </div>\n );\n }\n}\n\nfunction $convertImageElement(element) {\n let node = null;\n if (element.getAttribute(\"data-lexical-image-container\") === \"true\") {\n const imgElement = element.querySelector(\"img\");\n const src = imgElement.getAttribute(\"src\");\n node = $createImageNode(src);\n\n // Store attributes\n for (const attr of imgElement.attributes) {\n if (attr.name !== \"src\") {\n node.__attributes[attr.name] = attr.value;\n }\n }\n }\n\n return { node };\n}\n\nexport function $createImageNode(src, uploadState) {\n return $applyNodeReplacement(new ImageNode(src, uploadState));\n}\n\nexport function $isImageNode(node) {\n return node instanceof ImageNode;\n}\n"],"names":["MathJaxRenderer","children","inline","containerRef","useRef","useEffect","err","content","jsx","MathNode","DecoratorNode","node","equation","key","nodeSelection","$createNodeSelection","$setSelection","config","element","addClassNamesToElement","$convertMathElement","editor","serializedNode","$createMathNode","$applyNodeReplacement","$isMathNode","MathHighlightNodeInline","TextNode","$createMathHighlightNodeInline","mathHighlightNode","$isMathHighlightNodeInline","MathHighlightNodeBlock","ElementNode","selection","$getSelection","$isRangeSelection","lastChild","anchorNode","$isLineBreakNode","$isTextNode","parentNode","$findMatchingParent","$isParagraphNode","paragraphNode","$createParagraphNode","$createMathHighlightNodeBlock","equationTextNode","$createTextNode","$isMathHighlightNodeBlock","SVGDot","HorizontalDividerNode","$convertHorizontalDividerElement","dotsHTML","renderToString","jsxs","Fragment","$createHorizontalDividerNode","IMAGE_UPLOAD_STATE","ImageNode","clone","src","uploadState","$convertImageElement","imgElement","name","value","$createImageNode","self","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;AAAA,EAExC;AAGF,SAAO,EAAE,MAAA3D,EAAK;AAChB;AAEgB,SAAAuD,EAAiBN,GAAKC,GAAa;AACjD,SAAOrC,EAAsB,IAAIkC,EAAUE,GAAKC,CAAW,CAAC;AAC9D;AAEO,SAASU,EAAa5D,GAAM;AACjC,SAAOA,aAAgB+C;AACzB;"}
@@ -1,7 +1,7 @@
1
1
  import './lexical-medium-editor.css';
2
2
  import { HeadingNode as t, QuoteNode as o } from "@lexical/rich-text";
3
3
  import { LinkNode as i } from "@lexical/link";
4
- import { M as n, f as r, i as m, H as d, I as a } from "./ImageNode-BhH71HMX.js";
4
+ import { M as n, g as r, j as m, H as d, I as a } from "./ImageNode-Cqkp_4Y6.js";
5
5
  import { CodeNode as l, CodeHighlightNode as k } from "@lexical/code";
6
6
  import { ListNode as h, ListItemNode as c } from "@lexical/list";
7
7
  const u = {
@@ -69,13 +69,13 @@ const u = {
69
69
  variable: "tokenVariable"
70
70
  }
71
71
  };
72
- function p(e) {
72
+ function g(e) {
73
73
  console.error(e);
74
74
  }
75
75
  const f = {
76
76
  namespace: "MyEditor",
77
77
  theme: u,
78
- onError: p,
78
+ onError: g,
79
79
  nodes: [
80
80
  t,
81
81
  o,