@lexical/code 0.1.20 → 0.2.1
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/LexicalCode.dev.js +101 -11
- package/LexicalCode.js.flow +3 -0
- package/LexicalCode.prod.js +20 -18
- package/package.json +4 -4
package/LexicalCode.dev.js
CHANGED
|
@@ -91,6 +91,7 @@ function $createCodeHighlightNode(text, highlightType) {
|
|
|
91
91
|
function $isCodeHighlightNode(node) {
|
|
92
92
|
return node instanceof CodeHighlightNode;
|
|
93
93
|
}
|
|
94
|
+
const LANGUAGE_DATA_ATTRIBUTE = 'data-highlight-language';
|
|
94
95
|
class CodeNode extends lexical.ElementNode {
|
|
95
96
|
static getType() {
|
|
96
97
|
return 'code';
|
|
@@ -110,14 +111,31 @@ class CodeNode extends lexical.ElementNode {
|
|
|
110
111
|
const element = document.createElement('code');
|
|
111
112
|
utils.addClassNamesToElement(element, config.theme.code);
|
|
112
113
|
element.setAttribute('spellcheck', 'false');
|
|
114
|
+
const language = this.getLanguage();
|
|
115
|
+
|
|
116
|
+
if (language) {
|
|
117
|
+
element.setAttribute(LANGUAGE_DATA_ATTRIBUTE, language);
|
|
118
|
+
}
|
|
119
|
+
|
|
113
120
|
return element;
|
|
114
121
|
}
|
|
115
122
|
|
|
116
123
|
updateDOM(prevNode, dom) {
|
|
124
|
+
const language = this.__language;
|
|
125
|
+
const prevLanguage = prevNode.__language;
|
|
126
|
+
|
|
127
|
+
if (language) {
|
|
128
|
+
if (language !== prevLanguage) {
|
|
129
|
+
dom.setAttribute(LANGUAGE_DATA_ATTRIBUTE, language);
|
|
130
|
+
}
|
|
131
|
+
} else if (prevLanguage) {
|
|
132
|
+
dom.removeAttribute(LANGUAGE_DATA_ATTRIBUTE);
|
|
133
|
+
}
|
|
134
|
+
|
|
117
135
|
return false;
|
|
118
136
|
}
|
|
119
137
|
|
|
120
|
-
static
|
|
138
|
+
static importDOM() {
|
|
121
139
|
return {
|
|
122
140
|
div: node => ({
|
|
123
141
|
conversion: convertDivElement,
|
|
@@ -364,6 +382,35 @@ function textNodeTransform(node, editor) {
|
|
|
364
382
|
// code highlight nodes converted back to normal text
|
|
365
383
|
node.replace(lexical.$createTextNode(node.__text));
|
|
366
384
|
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
function updateCodeGutter(node, editor) {
|
|
388
|
+
const codeElement = editor.getElementByKey(node.getKey());
|
|
389
|
+
|
|
390
|
+
if (codeElement === null) {
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
const children = node.getChildren();
|
|
395
|
+
const childrenLength = children.length; // $FlowFixMe: internal field
|
|
396
|
+
|
|
397
|
+
if (childrenLength === codeElement.__cachedChildrenLength) {
|
|
398
|
+
// Avoid updating the attribute if the children length hasn't changed.
|
|
399
|
+
return;
|
|
400
|
+
} // $FlowFixMe: internal field
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
codeElement.__cachedChildrenLength = childrenLength;
|
|
404
|
+
let gutter = '1';
|
|
405
|
+
let count = 1;
|
|
406
|
+
|
|
407
|
+
for (let i = 0; i < childrenLength; i++) {
|
|
408
|
+
if (lexical.$isLineBreakNode(children[i])) {
|
|
409
|
+
gutter += '\n' + ++count;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
codeElement.setAttribute('data-gutter', gutter);
|
|
367
414
|
} // Using `skipTransforms` to prevent extra transforms since reformatting the code
|
|
368
415
|
// will not affect code block content itself.
|
|
369
416
|
//
|
|
@@ -380,13 +427,16 @@ function codeNodeTransform(node, editor) {
|
|
|
380
427
|
return;
|
|
381
428
|
}
|
|
382
429
|
|
|
383
|
-
isHighlighting = true;
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
430
|
+
isHighlighting = true; // When new code block inserted it might not have language selected
|
|
431
|
+
|
|
432
|
+
if (node.getLanguage() === undefined) {
|
|
433
|
+
node.setLanguage(DEFAULT_CODE_LANGUAGE);
|
|
434
|
+
} // Using nested update call to pass `skipTransforms` since we don't want
|
|
435
|
+
// each individual codehighlight node to be transformed again as it's already
|
|
436
|
+
// in its final state
|
|
389
437
|
|
|
438
|
+
|
|
439
|
+
editor.update(() => {
|
|
390
440
|
updateAndRetainSelection(node, () => {
|
|
391
441
|
const code = node.getTextContent();
|
|
392
442
|
const tokens = Prism.tokenize(code, Prism.languages[node.getLanguage() || ''] || Prism.languages[DEFAULT_CODE_LANGUAGE]);
|
|
@@ -618,7 +668,7 @@ function handleShiftLines(type, event) {
|
|
|
618
668
|
// We only care about the alt+arrow keys
|
|
619
669
|
const selection = lexical.$getSelection();
|
|
620
670
|
|
|
621
|
-
if (!
|
|
671
|
+
if (!lexical.$isRangeSelection(selection)) {
|
|
622
672
|
return false;
|
|
623
673
|
} // I'm not quite sure why, but it seems like calling anchor.getNode() collapses the selection here
|
|
624
674
|
// So first, get the anchor and the focus, then get their nodes
|
|
@@ -631,12 +681,41 @@ function handleShiftLines(type, event) {
|
|
|
631
681
|
const anchorOffset = anchor.offset;
|
|
632
682
|
const focusOffset = focus.offset;
|
|
633
683
|
const anchorNode = anchor.getNode();
|
|
634
|
-
const focusNode = focus.getNode();
|
|
684
|
+
const focusNode = focus.getNode();
|
|
685
|
+
const arrowIsUp = type === lexical.KEY_ARROW_UP_COMMAND; // Ensure the selection is within the codeblock
|
|
635
686
|
|
|
636
687
|
if (!$isCodeHighlightNode(anchorNode) || !$isCodeHighlightNode(focusNode)) {
|
|
637
688
|
return false;
|
|
638
689
|
}
|
|
639
690
|
|
|
691
|
+
if (!event.altKey) {
|
|
692
|
+
// Handle moving selection out of the code block, given there are no
|
|
693
|
+
// sibling thats can natively take the selection.
|
|
694
|
+
if (selection.isCollapsed()) {
|
|
695
|
+
const codeNode = anchorNode.getParentOrThrow();
|
|
696
|
+
|
|
697
|
+
if (arrowIsUp && anchorOffset === 0 && anchorNode.getPreviousSibling() === null) {
|
|
698
|
+
const codeNodeSibling = codeNode.getPreviousSibling();
|
|
699
|
+
|
|
700
|
+
if (codeNodeSibling === null) {
|
|
701
|
+
codeNode.selectPrevious();
|
|
702
|
+
event.preventDefault();
|
|
703
|
+
return true;
|
|
704
|
+
}
|
|
705
|
+
} else if (!arrowIsUp && anchorOffset === anchorNode.getTextContentSize() && anchorNode.getNextSibling() === null) {
|
|
706
|
+
const codeNodeSibling = codeNode.getNextSibling();
|
|
707
|
+
|
|
708
|
+
if (codeNodeSibling === null) {
|
|
709
|
+
codeNode.selectNext();
|
|
710
|
+
event.preventDefault();
|
|
711
|
+
return true;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
return false;
|
|
717
|
+
}
|
|
718
|
+
|
|
640
719
|
const start = getFirstCodeHighlightNodeOfLine(anchorNode);
|
|
641
720
|
const end = getLastCodeHighlightNodeOfLine(focusNode);
|
|
642
721
|
|
|
@@ -660,7 +739,6 @@ function handleShiftLines(type, event) {
|
|
|
660
739
|
event.preventDefault();
|
|
661
740
|
event.stopPropagation(); // required to stop cursor movement under Firefox
|
|
662
741
|
|
|
663
|
-
const arrowIsUp = type === lexical.KEY_ARROW_UP_COMMAND;
|
|
664
742
|
const linebreak = arrowIsUp ? start.getPreviousSibling() : end.getNextSibling();
|
|
665
743
|
|
|
666
744
|
if (!lexical.$isLineBreakNode(linebreak)) {
|
|
@@ -699,7 +777,19 @@ function registerCodeHighlighting(editor) {
|
|
|
699
777
|
throw new Error('CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor');
|
|
700
778
|
}
|
|
701
779
|
|
|
702
|
-
return utils.mergeRegister(editor.
|
|
780
|
+
return utils.mergeRegister(editor.registerMutationListener(CodeNode, mutations => {
|
|
781
|
+
editor.update(() => {
|
|
782
|
+
for (const [key, type] of mutations) {
|
|
783
|
+
if (type !== 'destroyed') {
|
|
784
|
+
const node = lexical.$getNodeByKey(key);
|
|
785
|
+
|
|
786
|
+
if (node !== null) {
|
|
787
|
+
updateCodeGutter(node, editor);
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
}), editor.registerNodeTransform(CodeNode, node => codeNodeTransform(node, editor)), editor.registerNodeTransform(lexical.TextNode, node => textNodeTransform(node, editor)), editor.registerNodeTransform(CodeHighlightNode, node => textNodeTransform(node, editor)), editor.registerCommand(lexical.INDENT_CONTENT_COMMAND, payload => handleMultilineIndent(lexical.INDENT_CONTENT_COMMAND), 1), editor.registerCommand(lexical.OUTDENT_CONTENT_COMMAND, payload => handleMultilineIndent(lexical.OUTDENT_CONTENT_COMMAND), 1), editor.registerCommand(lexical.KEY_ARROW_UP_COMMAND, payload => handleShiftLines(lexical.KEY_ARROW_UP_COMMAND, payload), 1), editor.registerCommand(lexical.KEY_ARROW_DOWN_COMMAND, payload => handleShiftLines(lexical.KEY_ARROW_DOWN_COMMAND, payload), 1));
|
|
703
793
|
}
|
|
704
794
|
|
|
705
795
|
exports.$createCodeHighlightNode = $createCodeHighlightNode;
|
package/LexicalCode.js.flow
CHANGED
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
ParagraphNode,
|
|
15
15
|
RangeSelection,
|
|
16
16
|
EditorThemeClasses,
|
|
17
|
+
LexicalEditor,
|
|
17
18
|
} from 'lexical';
|
|
18
19
|
|
|
19
20
|
import {ElementNode} from 'lexical';
|
|
@@ -72,3 +73,5 @@ declare export function $createCodeHighlightNode(
|
|
|
72
73
|
declare export function $isCodeHighlightNode(
|
|
73
74
|
node: ?LexicalNode,
|
|
74
75
|
): boolean %checks(node instanceof CodeHighlightNode);
|
|
76
|
+
|
|
77
|
+
declare export function registerCodeHighlighting(editor: LexicalEditor): () => void;
|
package/LexicalCode.prod.js
CHANGED
|
@@ -5,21 +5,23 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
var e=require("prismjs/components/prism-core");require("prismjs/components/prism-clike");require("prismjs/components/prism-javascript");require("prismjs/components/prism-markup");require("prismjs/components/prism-markdown");require("prismjs/components/prism-c");require("prismjs/components/prism-css");require("prismjs/components/prism-objectivec");require("prismjs/components/prism-sql");require("prismjs/components/prism-python");require("prismjs/components/prism-rust");require("prismjs/components/prism-swift");
|
|
8
|
-
var
|
|
9
|
-
class
|
|
10
|
-
function
|
|
11
|
-
class z extends
|
|
12
|
-
{conversion:E,priority:4}:
|
|
13
|
-
1;if(0<
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
function L(a,
|
|
17
|
-
(a
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function T(a,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
var n=require("@lexical/utils"),r=require("lexical");
|
|
9
|
+
class t extends r.TextNode{constructor(a,c,b){super(a,b);this.__highlightType=c}static getType(){return"code-highlight"}static clone(a){return new t(a.__text,a.__highlightType||void 0,a.__key)}createDOM(a){const c=super.createDOM(a);a=u(a.theme,this.__highlightType);n.addClassNamesToElement(c,a);return c}updateDOM(a,c,b){const d=super.updateDOM(a,c,b);a=u(b.theme,a.__highlightType);b=u(b.theme,this.__highlightType);a!==b&&(a&&n.removeClassNamesFromElement(c,a),b&&n.addClassNamesToElement(c,b));return d}setFormat(){return this.getWritable()}}
|
|
10
|
+
function u(a,c){return c&&a&&a.codeHighlight&&a.codeHighlight[c]}function x(a,c){return new t(a,c)}function y(a){return a instanceof t}
|
|
11
|
+
class z extends r.ElementNode{static getType(){return"code"}static clone(a){return new z(a.__language,a.__key)}constructor(a,c){super(c);this.__language=a}createDOM(a){const c=document.createElement("code");n.addClassNamesToElement(c,a.theme.code);c.setAttribute("spellcheck","false");(a=this.getLanguage())&&c.setAttribute("data-highlight-language",a);return c}updateDOM(a,c){const b=this.__language;a=a.__language;b?b!==a&&c.setAttribute("data-highlight-language",b):a&&c.removeAttribute("data-highlight-language");
|
|
12
|
+
return!1}static importDOM(){return{div:()=>({conversion:B,priority:1}),pre:()=>({conversion:C,priority:0}),table:a=>D(a)?{conversion:E,priority:4}:null,td:a=>{const c=a.closest("table");return a.classList.contains("js-file-line")?{conversion:F,priority:4}:c&&D(c)?{conversion:G,priority:4}:null},tr:a=>(a=a.closest("table"))&&D(a)?{conversion:G,priority:4}:null}}insertNewAfter(a){var c=this.getChildren(),b=c.length;if(2<=b&&"\n"===c[b-1].getTextContent()&&"\n"===c[b-2].getTextContent()&&a.isCollapsed()&&
|
|
13
|
+
a.anchor.key===this.__key&&a.anchor.offset===b)return c[b-1].remove(),c[b-2].remove(),a=r.$createParagraphNode(),this.insertAfter(a),a;c=a.anchor.getNode();var d=H(c);if(null!=d){b=0;for(d=d.getTextContent();b<d.length&&/[\t ]/.test(d[b]);)b+=1;if(0<b)return b=d.substring(0,b),b=x(b),c.insertAfter(b),a.insertNodes([r.$createLineBreakNode()]),b.select(),b}return null}canInsertTab(){return!0}collapseAtStart(){const a=r.$createParagraphNode();this.getChildren().forEach(c=>a.append(c));this.replace(a);
|
|
14
|
+
return!0}setLanguage(a){this.getWritable().__language=a}getLanguage(){return this.getLatest().__language}}function I(a){return new z(a)}function J(a){return a instanceof z}function H(a){let c=null;const b=a.getPreviousSiblings();for(b.push(a);0<b.length&&(a=b.pop(),y(a)&&(c=a),!r.$isLineBreakNode(a)););return c}function K(a){let c=null;const b=a.getNextSiblings();for(b.unshift(a);0<b.length&&(a=b.shift(),y(a)&&(c=a),!r.$isLineBreakNode(a)););return c}function C(){return{node:I()}}
|
|
15
|
+
function B(a){return{after:c=>{const b=a.parentNode;null!=b&&a!==b.lastChild&&c.push(r.$createLineBreakNode());return c},node:null!==a.style.fontFamily.match("monospace")?I():null}}function E(){return{node:I()}}function G(){return{node:null}}function F(a){return{after:c=>{a.parentNode&&a.parentNode.nextSibling&&c.push(r.$createLineBreakNode());return c},node:null}}function D(a){return a.classList.contains("js-file-line-container")}
|
|
16
|
+
function L(a,c){const b=a.getParent();J(b)?M(b,c):y(a)&&a.replace(r.$createTextNode(a.__text))}let N=!1;
|
|
17
|
+
function M(a,c){N||(N=!0,void 0===a.getLanguage()&&a.setLanguage("javascript"),c.update(()=>{O(a,()=>{var b=a.getTextContent();b=e.tokenize(b,e.languages[a.getLanguage()||""]||e.languages.javascript);b=Q(b);var d=a.getChildren();let f=0;for(;f<d.length&&R(d[f],b[f]);)f++;var h=d.length;const m=b.length,g=Math.min(h,m)-f;let k=0;for(;k<g;)if(k++,!R(d[h-k],b[m-k])){k--;break}d=f;h-=k;b=b.slice(f,m-k);const {from:l,to:p,nodesForReplacement:v}={from:d,nodesForReplacement:b,to:h};return l!==p||v.length?
|
|
18
|
+
(a.splice(l,p-l,v),!0):!1})},{onUpdate:()=>{N=!1},skipTransforms:!0}))}function Q(a){const c=[];a.forEach(b=>{if("string"===typeof b){b=b.split("\n");for(var d=0;d<b.length;d++){const f=b[d];f.length&&c.push(x(f));d<b.length-1&&c.push(r.$createLineBreakNode())}}else({content:d}=b),"string"===typeof d?c.push(x(d,b.type)):1===d.length&&"string"===typeof d[0]?c.push(x(d[0],b.type)):c.push(...Q(d))});return c}
|
|
19
|
+
function O(a,c){var b=r.$getSelection();if(r.$isRangeSelection(b)&&b.anchor){b=b.anchor;var d=b.offset,f="element"===b.type&&r.$isLineBreakNode(a.getChildAtIndex(b.offset-1)),h=0;if(!f){const m=b.getNode();h=d+m.getPreviousSiblings().reduce((g,k)=>g+(r.$isLineBreakNode(k)?0:k.getTextContentSize()),0)}c()&&(f?b.getNode().select(d,d):a.getChildren().some(m=>{if(r.$isTextNode(m)){const g=m.getTextContentSize();if(g>=h)return m.select(h,h),!0;h-=g}return!1}))}}
|
|
20
|
+
function R(a,c){return y(a)&&y(c)?a.__text===c.__text&&a.__highlightType===c.__highlightType:r.$isLineBreakNode(a)&&r.$isLineBreakNode(c)?!0:!1}function S(a){var c=r.$getSelection();if(!r.$isRangeSelection(c)||c.isCollapsed())return!1;c=c.getNodes();for(var b=0;b<c.length;b++){var d=c[b];if(!y(d)&&!r.$isLineBreakNode(d))return!1}b=H(c[0]);null!=b&&T(b,a);for(b=1;b<c.length;b++)d=c[b],r.$isLineBreakNode(c[b-1])&&y(d)&&T(d,a);return!0}
|
|
21
|
+
function T(a,c){const b=a.getTextContent();c===r.INDENT_CONTENT_COMMAND?0<b.length&&/\s/.test(b[0])?a.setTextContent("\t"+b):(c=x("\t"),a.insertBefore(c)):0===b.indexOf("\t")&&(1===b.length?a.remove():a.setTextContent(b.substring(1)))}
|
|
22
|
+
function U(a,c){const b=r.$getSelection();if(!r.$isRangeSelection(b))return!1;const {anchor:d,focus:f}=b,h=d.offset,m=f.offset,g=d.getNode(),k=f.getNode();var l=a===r.KEY_ARROW_UP_COMMAND;if(!y(g)||!y(k))return!1;if(!c.altKey){if(b.isCollapsed())if(a=g.getParentOrThrow(),l&&0===h&&null===g.getPreviousSibling()){if(null===a.getPreviousSibling())return a.selectPrevious(),c.preventDefault(),!0}else if(!l&&h===g.getTextContentSize()&&null===g.getNextSibling()&&null===a.getNextSibling())return a.selectNext(),
|
|
23
|
+
c.preventDefault(),!0;return!1}var p=H(g);const v=K(k);if(null==p||null==v)return!1;const A=p.getNodesBetween(v);for(let q=0;q<A.length;q++){const P=A[q];if(!y(P)&&!r.$isLineBreakNode(P))return!1}c.preventDefault();c.stopPropagation();c=l?p.getPreviousSibling():v.getNextSibling();if(!r.$isLineBreakNode(c))return!0;p=l?c.getPreviousSibling():c.getNextSibling();if(null==p)return!0;l=l?H(p):K(p);let w=null!=l?l:p;c.remove();A.forEach(q=>q.remove());a===r.KEY_ARROW_UP_COMMAND?(A.forEach(q=>w.insertBefore(q)),
|
|
24
|
+
w.insertBefore(c)):(w.insertAfter(c),w=c,A.forEach(q=>{w.insertAfter(q);w=q}));b.setTextNodeRange(g,h,k,m);return!0}exports.$createCodeHighlightNode=x;exports.$createCodeNode=I;exports.$isCodeHighlightNode=y;exports.$isCodeNode=J;exports.CodeHighlightNode=t;exports.CodeNode=z;exports.getCodeLanguages=()=>Object.keys(e.languages).filter(a=>"function"!==typeof e.languages[a]).sort();exports.getDefaultCodeLanguage=()=>"javascript";exports.getFirstCodeHighlightNodeOfLine=H;
|
|
25
|
+
exports.getLastCodeHighlightNodeOfLine=K;
|
|
26
|
+
exports.registerCodeHighlighting=function(a){if(!a.hasNodes([z,t]))throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return n.mergeRegister(a.registerMutationListener(z,c=>{a.update(()=>{for(const [f,h]of c)if("destroyed"!==h){var b=r.$getNodeByKey(f);if(null!==b)a:{var d=b;b=a.getElementByKey(d.getKey());if(null===b)break a;d=d.getChildren();const m=d.length;if(m===b.__cachedChildrenLength)break a;b.__cachedChildrenLength=m;let g="1",k=1;for(let l=0;l<m;l++)r.$isLineBreakNode(d[l])&&
|
|
27
|
+
(g+="\n"+ ++k);b.setAttribute("data-gutter",g)}}})}),a.registerNodeTransform(z,c=>M(c,a)),a.registerNodeTransform(r.TextNode,c=>L(c,a)),a.registerNodeTransform(t,c=>L(c,a)),a.registerCommand(r.INDENT_CONTENT_COMMAND,()=>S(r.INDENT_CONTENT_COMMAND),1),a.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>S(r.OUTDENT_CONTENT_COMMAND),1),a.registerCommand(r.KEY_ARROW_UP_COMMAND,c=>U(r.KEY_ARROW_UP_COMMAND,c),1),a.registerCommand(r.KEY_ARROW_DOWN_COMMAND,c=>U(r.KEY_ARROW_DOWN_COMMAND,c),1))};
|
package/package.json
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"code"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"version": "0.1
|
|
11
|
+
"version": "0.2.1",
|
|
12
12
|
"main": "LexicalCode.js",
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"lexical": "0.1
|
|
14
|
+
"lexical": "0.2.1"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@lexical/utils": "0.1
|
|
18
|
-
"prismjs": "^1.
|
|
17
|
+
"@lexical/utils": "0.2.1",
|
|
18
|
+
"prismjs": "^1.27.0"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|