@lexical/table 0.29.1-nightly.20250404.0 → 0.30.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.
@@ -1706,7 +1706,7 @@ function $isTableSelection(x) {
1706
1706
  function $createTableSelection() {
1707
1707
  // TODO this is a suboptimal design, it doesn't make sense to have
1708
1708
  // a table selection that isn't associated with a table. This
1709
- // constructor should have required argumnets and in true we
1709
+ // constructor should have required arguments and in true we
1710
1710
  // should check that they point to a table and are element points to
1711
1711
  // cell nodes of that table.
1712
1712
  const anchor = lexical.$createPoint('root', 0, 'element');
@@ -1957,7 +1957,7 @@ class TableObserver {
1957
1957
  // set one then the reconciler will undo it.
1958
1958
  // TODO - it would make sense to have one so that native
1959
1959
  // copy/paste worked. Right now we have to emulate with
1960
- // keyboard events but it won't fire if trigged from the menu
1960
+ // keyboard events but it won't fire if triggered from the menu
1961
1961
  if (domSelection && domSelection.rangeCount > 0) {
1962
1962
  domSelection.removeAllRanges();
1963
1963
  }
@@ -2134,7 +2134,7 @@ function applyTableHandlers(tableNode, element, editor, hasTabHandler) {
2134
2134
  const tableObserver = new TableObserver(editor, tableNode.getKey());
2135
2135
  const tableElement = getTableElement(tableNode, element);
2136
2136
  attachTableObserverToTableElement(tableElement, tableObserver);
2137
- tableObserver.listenersToRemove.add(() => detatchTableObserverFromTableElement(tableElement, tableObserver));
2137
+ tableObserver.listenersToRemove.add(() => detachTableObserverFromTableElement(tableElement, tableObserver));
2138
2138
  const createPointerHandlers = () => {
2139
2139
  if (tableObserver.isSelecting) {
2140
2140
  return;
@@ -2722,7 +2722,7 @@ function applyTableHandlers(tableNode, element, editor, hasTabHandler) {
2722
2722
  }, lexical.COMMAND_PRIORITY_CRITICAL));
2723
2723
  return tableObserver;
2724
2724
  }
2725
- function detatchTableObserverFromTableElement(tableElement, tableObserver) {
2725
+ function detachTableObserverFromTableElement(tableElement, tableObserver) {
2726
2726
  if (getTableObserverFromTableElement(tableElement) === tableObserver) {
2727
2727
  delete tableElement[LEXICAL_ELEMENT_KEY];
2728
2728
  }
@@ -1704,7 +1704,7 @@ function $isTableSelection(x) {
1704
1704
  function $createTableSelection() {
1705
1705
  // TODO this is a suboptimal design, it doesn't make sense to have
1706
1706
  // a table selection that isn't associated with a table. This
1707
- // constructor should have required argumnets and in true we
1707
+ // constructor should have required arguments and in true we
1708
1708
  // should check that they point to a table and are element points to
1709
1709
  // cell nodes of that table.
1710
1710
  const anchor = $createPoint('root', 0, 'element');
@@ -1955,7 +1955,7 @@ class TableObserver {
1955
1955
  // set one then the reconciler will undo it.
1956
1956
  // TODO - it would make sense to have one so that native
1957
1957
  // copy/paste worked. Right now we have to emulate with
1958
- // keyboard events but it won't fire if trigged from the menu
1958
+ // keyboard events but it won't fire if triggered from the menu
1959
1959
  if (domSelection && domSelection.rangeCount > 0) {
1960
1960
  domSelection.removeAllRanges();
1961
1961
  }
@@ -2132,7 +2132,7 @@ function applyTableHandlers(tableNode, element, editor, hasTabHandler) {
2132
2132
  const tableObserver = new TableObserver(editor, tableNode.getKey());
2133
2133
  const tableElement = getTableElement(tableNode, element);
2134
2134
  attachTableObserverToTableElement(tableElement, tableObserver);
2135
- tableObserver.listenersToRemove.add(() => detatchTableObserverFromTableElement(tableElement, tableObserver));
2135
+ tableObserver.listenersToRemove.add(() => detachTableObserverFromTableElement(tableElement, tableObserver));
2136
2136
  const createPointerHandlers = () => {
2137
2137
  if (tableObserver.isSelecting) {
2138
2138
  return;
@@ -2720,7 +2720,7 @@ function applyTableHandlers(tableNode, element, editor, hasTabHandler) {
2720
2720
  }, COMMAND_PRIORITY_CRITICAL));
2721
2721
  return tableObserver;
2722
2722
  }
2723
- function detatchTableObserverFromTableElement(tableElement, tableObserver) {
2723
+ function detachTableObserverFromTableElement(tableElement, tableObserver) {
2724
2724
  if (getTableObserverFromTableElement(tableElement) === tableObserver) {
2725
2725
  delete tableElement[LEXICAL_ELEMENT_KEY];
2726
2726
  }
@@ -20,7 +20,7 @@ export declare function applyTableHandlers(tableNode: TableNode, element: HTMLEl
20
20
  export type HTMLTableElementWithWithTableSelectionState = HTMLTableElement & {
21
21
  [LEXICAL_ELEMENT_KEY]?: TableObserver | undefined;
22
22
  };
23
- export declare function detatchTableObserverFromTableElement(tableElement: HTMLTableElementWithWithTableSelectionState, tableObserver: TableObserver): void;
23
+ export declare function detachTableObserverFromTableElement(tableElement: HTMLTableElementWithWithTableSelectionState, tableObserver: TableObserver): void;
24
24
  export declare function attachTableObserverToTableElement(tableElement: HTMLTableElementWithWithTableSelectionState, tableObserver: TableObserver): void;
25
25
  export declare function getTableObserverFromTableElement(tableElement: HTMLTableElementWithWithTableSelectionState): TableObserver | null;
26
26
  export declare function getDOMCellFromTarget(node: null | Node): TableDOMCell | null;
package/package.json CHANGED
@@ -8,13 +8,13 @@
8
8
  "table"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "0.29.1-nightly.20250404.0",
11
+ "version": "0.30.0",
12
12
  "main": "LexicalTable.js",
13
13
  "types": "index.d.ts",
14
14
  "dependencies": {
15
- "@lexical/clipboard": "0.29.1-nightly.20250404.0",
16
- "@lexical/utils": "0.29.1-nightly.20250404.0",
17
- "lexical": "0.29.1-nightly.20250404.0"
15
+ "@lexical/clipboard": "0.30.0",
16
+ "@lexical/utils": "0.30.0",
17
+ "lexical": "0.30.0"
18
18
  },
19
19
  "repository": {
20
20
  "type": "git",