Skip to content

Commit

Permalink
fix: revert schema changes [TOL-2249]
Browse files Browse the repository at this point in the history
This reverts commit 010831e.
  • Loading branch information
2wce authored Jul 17, 2024
1 parent dde84f2 commit de0157b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1,421 deletions.
17 changes: 4 additions & 13 deletions packages/rich-text-types/src/nodeTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export interface ResourceHyperlink extends Inline {
}

export interface TableCell extends Block {
nodeType: BLOCKS.TABLE_CELL;
nodeType: BLOCKS.TABLE_HEADER_CELL | BLOCKS.TABLE_CELL;
data: {
colspan?: number;
rowspan?: number;
Expand All @@ -207,20 +207,11 @@ export interface TableCell extends Block {
/**
* @minItems 1
*/
content: (Paragraph | OrderedList | UnorderedList)[];
content: Paragraph[];
}

export interface TableHeaderCell extends Block {
export interface TableHeaderCell extends TableCell {
nodeType: BLOCKS.TABLE_HEADER_CELL;
data: {
colspan?: number;
rowspan?: number;
};

/**
* @minItems 1
*/
content: Paragraph[];
}

// An abstract table row can have both table cell types
Expand All @@ -232,7 +223,7 @@ export interface TableRow extends Block {
/**
* @minItems 1
*/
content: (TableCell | TableHeaderCell)[];
content: TableCell[];
}

export interface Table extends Block {
Expand Down
Loading

0 comments on commit de0157b

Please sign in to comment.