Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Dec 25, 2024
1 parent 379cc93 commit 6ab6ada
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 91 deletions.
9 changes: 9 additions & 0 deletions .changeset/core copy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@udecode/plate-caption': patch
'@udecode/plate-utils': patch
'@udecode/plate-resizable': patch
'@udecode/plate-selection': patch
'@udecode/plate-tabbable': patch
---

Use `editor.findPath`
5 changes: 5 additions & 0 deletions .changeset/core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@udecode/plate-core': patch
---

- `withPlate` overrides `editor.findPath` with `ReactEditor.findPath` (memo). We now **recommend to always use** `editor.findPath` over `findNodePath` / `findPath`.
15 changes: 14 additions & 1 deletion .changeset/table-m.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,21 @@

- `TablePlugin` merging is now enabled by default:
- Rename `enableMerging` to `disableMerge`
- Migration:
- **Migration**:
- `enableMerging: true` -> remove the option
- else -> `TablePlugin.configure({ options: { disableMerge: true } })`
- Rename `unmergeTableCells` to `splitTableCell`
- Rename `editor.api.create.cell` to `editor.api.create.tableCell`
- `useTableMergeState` return: rename `canUnmerge` to `canSplit`
- `insertTableRow`, `insertTableColumn`: remove `disableSelect` in favor of `select`. **Migration**: Replace by the opposite boolean
- `getTableCellBorders`: params `(element, options)` -> `(editor, options)`. Remove `isFirstCell`, `isFirstRow` options
- Merged `useTableCellElementState` into `useTableCellElement`:
- Remove parameter
- Remove `hovered`, `hoveredLeft` returned values in favor of CSS
- Rename `rowSize` return to `minHeight`
- Computes column sizes and add `width` return
- Merged `useTableCellElementResizableState` into `useTableCellElementResizable`:
- Remove `onHover`, `onHoverEnd` props in favor of CSS
- Merged `useTableElementState` into `useTableElement`:
- Remove parameter
- Does not compute and return `colSizes`, `minColumnWidth`, `colGroupProps` anymore.
41 changes: 41 additions & 0 deletions .changeset/table-mi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
'@udecode/plate-table': minor
---

- `TablePlugin` new api and transforms:

```ts
type TableApi = {
create: {
table: OmitFirst<typeof getEmptyTableNode>;
/** Cell node factory used each time a cell is created. */
tableCell: OmitFirst<typeof getEmptyCellNode>;
tableRow: OmitFirst<typeof getEmptyRowNode>;
};
table: {
getCellBorders: OmitFirst<typeof getTableCellBorders>;
getCellSize: OmitFirst<typeof getTableCellSize>;
getColSpan: typeof getColSpan;
getRowSpan: typeof getRowSpan;
};
};

type TableTransforms = {
insert: {
table: OmitFirst<typeof insertTable>;
};
remove: {
table: OmitFirst<typeof deleteTable>;
tableColumn: OmitFirst<typeof deleteColumn>;
tableRow: OmitFirst<typeof deleteRow>;
};
table: {
merge: OmitFirst<typeof mergeTableCells>;
split: OmitFirst<typeof splitTableCell>;
};
};
```

- `insertTableColumn` add `before` option to insert a column before the current column.
- `insertTableRow` add `before` option to insert a row before the current row.
- `insertTable` now supports inserting a table after the current table.
9 changes: 7 additions & 2 deletions apps/www/content/docs/components/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ Use the [CLI](https://platejs.org/docs/components/cli) to install the latest ver

### December 25 #17.6

- `table-element`
- v42
v42

- `table-element`, `table-element-static`
- Move icons to `table-icons`
- Remove `colgroup`, col width is now set in `table-cell-element`
- `table-row-element`: remove `hideBorder` prop
- `table-cell-element`, `table-cell-element-static`: column hover/resizing state is now using Tailwind instead of JS
- `table-dropdown-menu`: add more actions
- `tooltip`: add `TooltipButton`

### December 23 #17.5

Expand Down
41 changes: 0 additions & 41 deletions apps/www/src/app/api/ai/command/route.ts

This file was deleted.

47 changes: 0 additions & 47 deletions apps/www/src/app/api/ai/copilot/route.ts

This file was deleted.

0 comments on commit 6ab6ada

Please sign in to comment.