lexical 0.32.2-nightly.20250703.0 → 0.33.0

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/Lexical.dev.js CHANGED
@@ -3209,9 +3209,13 @@ class LexicalNode {
3209
3209
  *
3210
3210
  */
3211
3211
  static getType() {
3212
- {
3212
+ const {
3213
+ ownNodeType
3214
+ } = getStaticNodeConfig(this);
3215
+ if (!(ownNodeType !== undefined)) {
3213
3216
  formatDevErrorMessage(`LexicalNode: Node ${this.name} does not implement .getType().`);
3214
3217
  }
3218
+ return ownNodeType;
3215
3219
  }
3216
3220
 
3217
3221
  /**
@@ -10010,7 +10014,11 @@ function createEditor(editorConfig) {
10010
10014
  } else if (replace) {
10011
10015
  console.warn(`Override for ${name} specifies 'replace' without 'withKlass'. 'withKlass' will be required in a future version.`);
10012
10016
  }
10013
- if (name !== 'RootNode' && nodeType !== 'root' && nodeType !== 'artificial') {
10017
+ if (name !== 'RootNode' && nodeType !== 'root' && nodeType !== 'artificial' &&
10018
+ // This is mostly for the unit test suite which
10019
+ // uses LexicalNode in an otherwise incorrect way
10020
+ // by mocking its static getType
10021
+ klass !== LexicalNode) {
10014
10022
  const proto = klass.prototype;
10015
10023
  ['getType', 'clone'].forEach(method => {
10016
10024
  if (!hasOwnStaticMethod(klass, method)) {
@@ -10733,7 +10741,7 @@ class LexicalEditor {
10733
10741
  };
10734
10742
  }
10735
10743
  }
10736
- LexicalEditor.version = "0.32.2-nightly.20250703.0+dev.cjs";
10744
+ LexicalEditor.version = "0.33.0+dev.cjs";
10737
10745
 
10738
10746
  let pendingNodeToClone = null;
10739
10747
  function setPendingNodeToClone(pendingNode) {
package/Lexical.dev.mjs CHANGED
@@ -3207,9 +3207,13 @@ class LexicalNode {
3207
3207
  *
3208
3208
  */
3209
3209
  static getType() {
3210
- {
3210
+ const {
3211
+ ownNodeType
3212
+ } = getStaticNodeConfig(this);
3213
+ if (!(ownNodeType !== undefined)) {
3211
3214
  formatDevErrorMessage(`LexicalNode: Node ${this.name} does not implement .getType().`);
3212
3215
  }
3216
+ return ownNodeType;
3213
3217
  }
3214
3218
 
3215
3219
  /**
@@ -10008,7 +10012,11 @@ function createEditor(editorConfig) {
10008
10012
  } else if (replace) {
10009
10013
  console.warn(`Override for ${name} specifies 'replace' without 'withKlass'. 'withKlass' will be required in a future version.`);
10010
10014
  }
10011
- if (name !== 'RootNode' && nodeType !== 'root' && nodeType !== 'artificial') {
10015
+ if (name !== 'RootNode' && nodeType !== 'root' && nodeType !== 'artificial' &&
10016
+ // This is mostly for the unit test suite which
10017
+ // uses LexicalNode in an otherwise incorrect way
10018
+ // by mocking its static getType
10019
+ klass !== LexicalNode) {
10012
10020
  const proto = klass.prototype;
10013
10021
  ['getType', 'clone'].forEach(method => {
10014
10022
  if (!hasOwnStaticMethod(klass, method)) {
@@ -10731,7 +10739,7 @@ class LexicalEditor {
10731
10739
  };
10732
10740
  }
10733
10741
  }
10734
- LexicalEditor.version = "0.32.2-nightly.20250703.0+dev.esm";
10742
+ LexicalEditor.version = "0.33.0+dev.esm";
10735
10743
 
10736
10744
  let pendingNodeToClone = null;
10737
10745
  function setPendingNodeToClone(pendingNode) {