@lexical/table 0.3.6 → 0.3.9

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.
@@ -239,5 +239,5 @@ declare export class TableSelection {
239
239
  declare export var INSERT_TABLE_COMMAND: LexicalCommand<{
240
240
  rows: string,
241
241
  columns: string,
242
- includeHeaders?: string,
242
+ includeHeaders?: boolean,
243
243
  }>;
@@ -10,7 +10,7 @@ a.theme.tableCell,this.hasHeader()&&a.theme.tableCellHeader);return b}exportDOM(
10
10
  "th":"td"}setHeaderStyles(a){this.getWritable().__headerState=a;return this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(a){this.getWritable().__width=a;return this.__width}getWidth(){return this.getLatest().__width}toggleHeaderStyle(a){let b=this.getWritable();b.__headerState=(b.__headerState&a)===a?b.__headerState-a:b.__headerState+a;return b}hasHeaderState(a){return(this.getHeaderStyles()&a)===a}hasHeader(){return this.getLatest().__headerState!==q.NO_STATUS}updateDOM(a){return a.__headerState!==
11
11
  this.__headerState||a.__width!==this.__width}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function w(a){a=a.nodeName.toLowerCase();return{forChild:(b,d)=>{if(y(d)&&!f.$isElementNode(b)){d=f.$createParagraphNode();if(f.$isLineBreakNode(b)&&"\n"===b.getTextContent())return null;d.append(b);return d}return b},node:x("th"===a?q.ROW:q.NO_STATUS)}}function x(a,b=1,d){return new t(a,b,d)}function y(a){return a instanceof t}
12
12
  class z extends f.GridRowNode{static getType(){return"tablerow"}static clone(a){return new z(a.__height,a.__key)}static importDOM(){return{tr:()=>({conversion:A,priority:0})}}static importJSON(a){return B(a.height)}constructor(a,b){super(b);this.__height=a}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(a){let b=document.createElement("tr");this.__height&&(b.style.height=`${this.__height}px`);p.addClassNamesToElement(b,a.theme.tableRow);return b}setHeight(a){this.getWritable().__height=
13
- a;return this.__height}getHeight(){return this.getLatest().__height}updateDOM(a){return a.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function A(){return{node:B()}}function B(a){return new z(a)}function C(a){return a instanceof z}function D(a){throw Error(`Minified Lexical error #${a}; see codes.json for the full message or `+"use the non-minified dev environment for full errors and additional helpful warnings.");}
13
+ a;return this.__height}getHeight(){return this.getLatest().__height}updateDOM(a){return a.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function A(){return{node:B()}}function B(a){return new z(a)}function C(a){return a instanceof z}function D(a){throw Error(`Minified Lexical error #${a}; visit https://lexical.dev/docs/error?code=${a} for the full message or `+"use the non-minified dev environment for full errors and additional helpful warnings.");}
14
14
  if("undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement){let a=document.createElement("style");a.innerHTML="\n table.disable-selection {\n -webkit-touch-callout: none;\n -webkit-user-select: none; \n -khtml-user-select: none; \n -moz-user-select: none; \n -ms-user-select: none; \n user-select: none;\n }\n \n .disable-selection span::selection{\n background-color: transparent;\n }\n .disable-selection br::selection{\n background-color: transparent;\n }\n ";
15
15
  document.body&&document.body.append(a)}
16
16
  class E{constructor(a,b){this.isHighlightingCells=!1;this.currentY=this.currentX=this.startY=this.startX=-1;this.listenersToRemove=new Set;this.tableNodeKey=b;this.editor=a;this.grid={cells:[],columns:0,rows:0};this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null;this.hasHijackedSelectionStyles=!1;this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(a=>a())}trackTableGrid(){let a=new MutationObserver(b=>
package/package.json CHANGED
@@ -8,13 +8,13 @@
8
8
  "table"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "0.3.6",
11
+ "version": "0.3.9",
12
12
  "main": "LexicalTable.js",
13
13
  "peerDependencies": {
14
- "lexical": "0.3.6"
14
+ "lexical": "0.3.9"
15
15
  },
16
16
  "dependencies": {
17
- "@lexical/utils": "0.3.6"
17
+ "@lexical/utils": "0.3.9"
18
18
  },
19
19
  "repository": {
20
20
  "type": "git",