lexical-medium-editor 1.2.17 → 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.
@@ -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","state","props","attr","$isImageNode"],"mappings":";;;;;AAEA,MAAMA,IAAkB,CAAC,EAAE,UAAAC,GAAU,QAAAC,QAAa;AACxC,QAAAC,IAAeC,EAAO,IAAI;AAEhC,EAAAC,EAAU,MAAM;AACZ,IAAIF,EAAa,WAAW,OAAO,WAAW,OAAO,QAAQ,kBACzD,OAAO,QAAQ,eAAe,CAACA,EAAa,OAAO,CAAC,EAAE;AAAA,MAAM,CAACG,MACzD,QAAQ,MAAM,+BAA+BA,CAAG;AAAA,IACpD;AAAA,EACJ,GACD,CAACL,GAAUC,CAAM,CAAC;AAEf,QAAAK,IAAU,GAAGN,CAAQ;AAE3B,SAAQ,gBAAAO,EAAA,QAAA,EAAK,KAAKL,GAAe,UAAQI,GAAA;AAC7C;ACPO,MAAME,UAAiBC,EAAc;AAAA,EAC1C,OAAO,UAAU;AACR,WAAA;AAAA,EAAA;AAAA,EAGT,OAAO,MAAMC,GAAM;AACjB,WAAO,IAAIF,EAASE,EAAK,YAAYA,EAAK,UAAUA,EAAK,KAAK;AAAA,EAAA;AAAA,EAGhE,YAAYC,GAAUV,GAAQW,GAAK;AACjC,UAAMA,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EAAI,WAAW,iCAAiCc,CAAK,IACpD,UAAA;AAAA,MAAC,gBAAA5D,EAAA,OAAA,EAAK,GAAG6D,GAAO;AAAA,MAChB,gBAAA7D,EAAC,SAAI,WAAU,sBACZ,gBAAUiD,EAAmB,YAAY,eAAe,gBAC3D,CAAA;AAAA,IAAA,GACF;AAAA,EAAA;AAGN;AAEA,SAASK,EAAqB5C,GAAS;AACrC,MAAIP,IAAO;AACX,MAAIO,EAAQ,aAAa,8BAA8B,MAAM,QAAQ;AAC7D,UAAA6C,IAAa7C,EAAQ,cAAc,KAAK,GACxC0C,IAAMG,EAAW,aAAa,KAAK;AACzC,IAAApD,IAAOuD,EAAiBN,CAAG;AAGhB,eAAAU,KAAQP,EAAW;AACxB,MAAAO,EAAK,SAAS,UAChB3D,EAAK,aAAa2D,EAAK,IAAI,IAAIA,EAAK;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,