@lexical/list
Advanced tools
Comparing version 0.21.1-nightly.20241213.0 to 0.21.1-nightly.20241216.0
@@ -1065,3 +1065,3 @@ /** | ||
const element = this.createDOM(editor._config, editor); | ||
if (element && utils.isHTMLElement(element)) { | ||
if (utils.isHTMLElement(element)) { | ||
if (this.__start !== 1) { | ||
@@ -1068,0 +1068,0 @@ element.setAttribute('start', String(this.__start)); |
@@ -35,3 +35,3 @@ /** | ||
String(this.__start));b.__lexicalListType=this.__listType;S(b,a.theme,this);return b}updateDOM(a,b,c){if(a.__tag!==this.__tag)return!0;S(b,c.theme,this);return!1}static transform(){return a=>{r(a)||l(163);var b=a.getNextSibling();r(b)&&a.getListType()===b.getListType()&&F(a,b);b="check"!==a.getListType();let c=a.getStart();for(let d of a.getChildren())q(d)&&(d.getValue()!==c&&d.setValue(c),b&&null!=d.getLatest().__checked&&d.setChecked(void 0),r(d.getFirstChild())||c++)}}static importDOM(){return{ol:()=> | ||
({conversion:T,priority:0}),ul:()=>({conversion:T,priority:0})}}static importJSON(a){let b=A(a.listType,a.start);b.setFormat(a.format);b.setIndent(a.indent);b.setDirection(a.direction);return b}exportDOM(a){(a=this.createDOM(a._config,a))&&g.isHTMLElement(a)&&(1!==this.__start&&a.setAttribute("start",String(this.__start)),"check"===this.__listType&&a.setAttribute("__lexicalListType","check"));return{element:a}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(), | ||
({conversion:T,priority:0}),ul:()=>({conversion:T,priority:0})}}static importJSON(a){let b=A(a.listType,a.start);b.setFormat(a.format);b.setIndent(a.indent);b.setDirection(a.direction);return b}exportDOM(a){a=this.createDOM(a._config,a);g.isHTMLElement(a)&&(1!==this.__start&&a.setAttribute("start",String(this.__start)),"check"===this.__listType&&a.setAttribute("__lexicalListType","check"));return{element:a}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(), | ||
tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...a){for(let c=0;c<a.length;c++){var b=a[c];if(q(b))super.append(b);else{let d=x();r(b)?d.append(b):h.$isElementNode(b)?b.isInline()?d.append(b):(b=h.$createTextNode(b.getTextContent()),d.append(b)):d.append(b);super.append(d)}}return this}extractWithChild(a){return q(a)}} | ||
@@ -38,0 +38,0 @@ function S(a,b,c){let d=[],e=[];var f=b.list;if(void 0!==f){let m=f[`${c.__tag}Depth`]||[];b=p(c)-1;let Q=b%m.length;var k=m[Q];let R=f[c.__tag],C,D=f.nested;f=f.checklist;void 0!==D&&D.list&&(C=D.list);void 0!==R&&d.push(R);void 0!==f&&"check"===c.__listType&&d.push(f);if(void 0!==k)for(d.push(...K(k)),k=0;k<m.length;k++)k!==Q&&e.push(c.__tag+k);void 0!==C&&(c=K(C),1<b?d.push(...c):e.push(...c))}0<e.length&&g.removeClassNamesFromElement(a,...e);0<d.length&&g.addClassNamesToElement(a,...d)} |
@@ -32,3 +32,3 @@ /** | ||
createDOM(config: EditorConfig, _editor?: LexicalEditor): HTMLElement; | ||
updateDOM(prevNode: ListNode, dom: HTMLElement, config: EditorConfig): boolean; | ||
updateDOM(prevNode: this, dom: HTMLElement, config: EditorConfig): boolean; | ||
static transform(): (node: LexicalNode) => void; | ||
@@ -35,0 +35,0 @@ static importDOM(): DOMConversionMap | null; |
@@ -11,8 +11,8 @@ { | ||
"license": "MIT", | ||
"version": "0.21.1-nightly.20241213.0", | ||
"version": "0.21.1-nightly.20241216.0", | ||
"main": "LexicalList.js", | ||
"types": "index.d.ts", | ||
"dependencies": { | ||
"@lexical/utils": "0.21.1-nightly.20241213.0", | ||
"lexical": "0.21.1-nightly.20241213.0" | ||
"@lexical/utils": "0.21.1-nightly.20241216.0", | ||
"lexical": "0.21.1-nightly.20241216.0" | ||
}, | ||
@@ -19,0 +19,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140049
+ Added@lexical/clipboard@0.21.1-nightly.20241216.0(transitive)
+ Added@lexical/html@0.21.1-nightly.20241216.0(transitive)
+ Added@lexical/selection@0.21.1-nightly.20241216.0(transitive)
+ Added@lexical/table@0.21.1-nightly.20241216.0(transitive)
+ Added@lexical/utils@0.21.1-nightly.20241216.0(transitive)
+ Addedlexical@0.21.1-nightly.20241216.0(transitive)
- Removed@lexical/clipboard@0.21.1-nightly.20241213.0(transitive)
- Removed@lexical/html@0.21.1-nightly.20241213.0(transitive)
- Removed@lexical/selection@0.21.1-nightly.20241213.0(transitive)
- Removed@lexical/table@0.21.1-nightly.20241213.0(transitive)
- Removed@lexical/utils@0.21.1-nightly.20241213.0(transitive)
- Removedlexical@0.21.1-nightly.20241213.0(transitive)