@lexical/table
Advanced tools
Comparing version 0.2.7 to 0.2.8
@@ -21,5 +21,5 @@ /** | ||
} from 'lexical'; | ||
import {TableSelection} from './src/TableSelection'; | ||
import {$Values} from 'utility-types'; | ||
export enum TableCellHeaderState { | ||
export enum TableCellHeaderStates { | ||
NO_STATUS = 0, | ||
@@ -35,11 +35,2 @@ ROW = 1, | ||
export const TableCellHeaderStates = { | ||
NO_STATUS: 0, | ||
ROW: 1, | ||
COLUMN: 2, | ||
BOTH: 3, | ||
}; | ||
export type TableCellHeaderState = $Values<typeof TableCellHeaderStates>; | ||
export declare class TableCellNode extends ElementNode { | ||
@@ -49,7 +40,8 @@ static getType(): string; | ||
constructor( | ||
headerState?: TableCellHeaderState, | ||
headerState?: TableCellHeaderStates, | ||
colSpan?: number, | ||
width?: ?number, | ||
width?: number | null | undefined, | ||
key?: NodeKey, | ||
); | ||
__headerState: TableCellHeaderStates; | ||
createDOM(config: EditorConfig): HTMLElement; | ||
@@ -62,8 +54,9 @@ updateDOM(prevNode: TableCellNode, dom: HTMLElement): boolean; | ||
getTag(): string; | ||
setHeaderState(headerState: TableCellHeaderState): TableCellHeaderState; | ||
getHeaderState(): TableCellHeaderState; | ||
toggleHeaderState(headerState: TableCellHeaderState): TableCellNode; | ||
setHeaderState(headerState: TableCellHeaderStates): TableCellHeaderStates; | ||
getHeaderState(): TableCellHeaderStates; | ||
toggleHeaderState(headerState: TableCellHeaderStates): TableCellNode; | ||
hasHeader(): boolean; | ||
setWidth(width: number): ?number; | ||
getWidth(): ?number; | ||
setWidth(width: number): number | null | undefined; | ||
getWidth(): number | null | undefined; | ||
toggleHeaderStyle(headerState: TableCellHeaderStates): TableCellNode; | ||
updateDOM(prevNode: TableCellNode): boolean; | ||
@@ -73,3 +66,7 @@ collapseAtStart(): true; | ||
} | ||
export declare function $createTableCellNode(): TableCellNode; | ||
declare function $createTableCellNode( | ||
headerState: TableCellHeaderStates, | ||
colSpan?: number, | ||
width?: number | null | undefined, | ||
): TableCellNode; | ||
export declare function $isTableCellNode( | ||
@@ -92,3 +89,3 @@ node?: LexicalNode, | ||
getCordsFromCellNode(tableCellNode: TableCellNode): {x: number; y: number}; | ||
getCellFromCords(x: number, y: number, grid: Grid): ?Cell; | ||
getCellFromCords(x: number, y: number, grid: Grid): Cell | null | undefined; | ||
getCellFromCordsOrThrow(x: number, y: number, grid: Grid): Cell; | ||
@@ -111,3 +108,3 @@ getCellNodeFromCords(x: number, y: number): TableCellNode | null; | ||
static clone(node: TableRowNode): TableRowNode; | ||
constructor(key?: NodeKey, height?: ?number); | ||
constructor(key?: NodeKey, height?: number | null | undefined); | ||
createDOM(config: EditorConfig): HTMLElement; | ||
@@ -118,4 +115,4 @@ updateDOM(prevNode: TableRowNode, dom: HTMLElement): boolean; | ||
): null | ParagraphNode | TableRowNode; | ||
setHeight(height: number): ?number; | ||
getHeight(): ?number; | ||
setHeight(height: number): number | null | undefined; | ||
getHeight(): number | null | undefined; | ||
collapseAtStart(): true; | ||
@@ -122,0 +119,0 @@ } |
@@ -11,9 +11,9 @@ { | ||
"license": "MIT", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"main": "LexicalTable.js", | ||
"peerDependencies": { | ||
"lexical": "0.2.7" | ||
"lexical": "0.2.8" | ||
}, | ||
"dependencies": { | ||
"@lexical/utils": "0.2.7" | ||
"@lexical/utils": "0.2.8" | ||
}, | ||
@@ -20,0 +20,0 @@ "repository": { |
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
91350
1809
+ Added@lexical/list@0.2.8(transitive)
+ Added@lexical/utils@0.2.8(transitive)
+ Addedlexical@0.2.8(transitive)
- Removed@lexical/list@0.2.7(transitive)
- Removed@lexical/utils@0.2.7(transitive)
- Removedlexical@0.2.7(transitive)
Updated@lexical/utils@0.2.8