Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plate Static #3830

Merged
merged 58 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
5b8072d
feat
felixfeng33 Dec 4, 2024
ff2db0c
feat
felixfeng33 Dec 5, 2024
002a53e
fix
felixfeng33 Dec 5, 2024
93cafba
lint
felixfeng33 Dec 5, 2024
2a06713
tmp any
felixfeng33 Dec 5, 2024
4f31bcb
ci
felixfeng33 Dec 5, 2024
f2a5557
ci
felixfeng33 Dec 5, 2024
e2afc1c
fix serialize leaf
felixfeng33 Dec 6, 2024
dab5db8
render props
felixfeng33 Dec 10, 2024
70cbc13
fix
felixfeng33 Dec 10, 2024
f015a12
fix
felixfeng33 Dec 10, 2024
ea1ab66
fix
felixfeng33 Dec 10, 2024
f5c2bc3
Merge branch 'main' into plate/view
felixfeng33 Dec 10, 2024
b7638e7
fix
felixfeng33 Dec 10, 2024
6030943
table
felixfeng33 Dec 11, 2024
12b5e82
indent list
felixfeng33 Dec 12, 2024
b4f50de
fix
felixfeng33 Dec 12, 2024
cd6954b
fix
felixfeng33 Dec 12, 2024
88edf40
fix
felixfeng33 Dec 12, 2024
2c20b99
test
felixfeng33 Dec 13, 2024
64aadf6
fix
felixfeng33 Dec 13, 2024
8a00478
fix
felixfeng33 Dec 13, 2024
298a0ad
fix
felixfeng33 Dec 13, 2024
b9f121e
test
felixfeng33 Dec 13, 2024
ac88ec4
test
felixfeng33 Dec 13, 2024
817234e
fix
felixfeng33 Dec 14, 2024
3c75efc
fix
felixfeng33 Dec 14, 2024
e6ec801
fix
felixfeng33 Dec 14, 2024
b9cade8
test
felixfeng33 Dec 14, 2024
a422876
refactor
felixfeng33 Dec 14, 2024
c974e6b
fix
felixfeng33 Dec 14, 2024
4865f83
Add column and editor static component
felixfeng33 Dec 15, 2024
30c71b4
test
felixfeng33 Dec 15, 2024
3824d70
fix
felixfeng33 Dec 15, 2024
c77bdae
clean
felixfeng33 Dec 15, 2024
868fd3d
refactor
zbeyens Dec 15, 2024
15b8669
ci
felixfeng33 Dec 16, 2024
a7f7027
decorate
felixfeng33 Dec 17, 2024
ed7c677
decorate
felixfeng33 Dec 17, 2024
1f538d1
fix
felixfeng33 Dec 17, 2024
a5a6835
fix
zbeyens Dec 17, 2024
2e71885
refactor
zbeyens Dec 17, 2024
f9f57f8
refactor
zbeyens Dec 17, 2024
1aae726
refactor
zbeyens Dec 17, 2024
8d14973
ci
zbeyens Dec 17, 2024
771a239
repo
zbeyens Dec 17, 2024
43c0a97
refactor
zbeyens Dec 17, 2024
9171958
Merge branch 'main' into plate/view
zbeyens Dec 18, 2024
e1d5f93
fix
zbeyens Dec 18, 2024
6759ee3
feat
zbeyens Dec 18, 2024
14a2b61
docs
zbeyens Dec 18, 2024
cf31257
fix prism
felixfeng33 Dec 18, 2024
6e3eec0
docs
zbeyens Dec 19, 2024
c6c2521
refactor
zbeyens Dec 19, 2024
c196f0e
docs
zbeyens Dec 19, 2024
1d2fba3
refactor
zbeyens Dec 19, 2024
1c0f8fe
Merge branch 'main' into plate/view
zbeyens Dec 19, 2024
5f180fb
ci
felixfeng33 Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .changeset/base.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@udecode/plate-table': patch
'@udecode/plate-link': patch
---

Move `node.props` plugin attributes from `/react` to `/`
13 changes: 13 additions & 0 deletions .changeset/core-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@udecode/plate-core': minor
---

## @udecode/[email protected]

### Minor Changes

- [#3744](https://github.com/udecode/plate/pull/3744) by [@zbeyens](https://github.com/zbeyens) –
- Add `PlateStatic`, `SlateElement`, `SlateLeaf` components for static rendering and server-side HTML serialization
- Add `serializeHtml` function to serialize editor content to HTML. Deprecating `@udecode/plate-html` in favor of core serialization.
- Move from `PlatePlugin` (`/react`) to `BasePlugin` (`/`): `node.component`, `render.aboveEditable`, `render.aboveSlate`, `render.node`
- Add to `SlatePlugin`: `node.props`, `render.aboveNodes`, `render.belowNodes`, `render.afterEditable`, `render.beforeEditable`, `render.node`
16 changes: 16 additions & 0 deletions .changeset/findNodePath.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@udecode/plate-indent-list': patch
'@udecode/plate-utils': patch
'@udecode/plate-code-block': patch
'@udecode/plate-resizable': patch
'@udecode/plate-selection': patch
'@udecode/plate-combobox': patch
'@udecode/plate-tabbable': patch
'@udecode/plate-caption': patch
'@udecode/plate-layout': patch
'@udecode/plate-table': patch
'@udecode/plate-list': patch
'@udecode/plate-dnd': patch
---

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

- Fix floating link url input being focused when focusing the placeholder input
6 changes: 6 additions & 0 deletions .changeset/list-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@udecode/plate-indent-list': major
---

- Move `render.belowNodes` from `IndentListPlugin` to `BaseIndentListPlugin`. Props type for `listStyleTypes.liComponent` and `listStyleTypes.markerComponent` options is now `SlateRenderElementProps` instead of `PlateRenderElementProps`
- Move `someIndentList`, `someIndentTodo` from `@udecode/plate-indent-list/react` to `@udecode/plate-indent-list`
12 changes: 12 additions & 0 deletions .changeset/slate-react major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@udecode/slate-react': major
---

Rename `findNodePath` to `findPath` since the addition of `findNodePath` in the headless lib.

We recommend using `findPath` mostly when subscribing to its value (e.g. in a React component) as it has O(path.length) complexity, compared to O(n) for the traversal-based `findNodePath`. This optimization is particularly important in:

- Render functions of Plate components where using `findNodePath` would increase the initial render time by O(n²)
- Key press handlers where using `findNodePath` would increase the handling time by O(n)

where n is the number of nodes in the editor.
5 changes: 5 additions & 0 deletions .changeset/slate-react.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@udecode/slate-react': patch
---

Update `TRenderElementProps`, `TRenderLeafProps` types
9 changes: 9 additions & 0 deletions .changeset/slate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@udecode/slate': minor
---

Add `findNodePath` - a traversal-based node path finder with O(n) complexity. This is the headless alternative to `findPath` from `@udecode/slate-react`, recommended for:

- Non-React contexts
- Plugin logic that doesn't require React dependencies
- Non-performance-critical paths where O(n) traversal is acceptable
27 changes: 27 additions & 0 deletions .changeset/table-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
'@udecode/plate-table': major
---

Move from `@udecode/plate-table/react` to `@udecode/plate-table`:

- `deleteColumn`
- `deleteColumnWhenExpanded`
- `deleteRow`
- `deleteRowWhenExpanded`
- `getTableColumn`
- `getTableGridAbove`
- `getTableGridByRange`
- `getTableRow`
- `insertTable`
- `mergeTableCells`
- `moveSelectionFromCell`
- `overrideSelectionFromCell`
- `unmergeTableCells`
- `withDeleteTable`
- `withGetFragmentlable`
- `withInsertFragmentTable`
- `withInsertTextTable`
- `withMarkTable`
- `withSelectionTable`
- `withSetFragmentDataTable`
- `withTable`
2 changes: 1 addition & 1 deletion .github/workflows/registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
key: packages-cache-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: 🏗 Build Registry
run: yarn build:registry
run: yarn build:registry && yarn build:tw

- name: ◻️ Create Pull Request
uses: peter-evans/create-pull-request@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.repo_ignore

**/traceDir

Expand Down
2 changes: 1 addition & 1 deletion apps/www/content/docs/api/slate-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Find the corresponding documentation in the [Slate React docs](https://docs.slat

### `findNodeKey`

### `findNodePath`
### `findPath`

### `focusEditor`

Expand Down
12 changes: 12 additions & 0 deletions apps/www/content/docs/components/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ Use the [CLI](https://platejs.org/docs/components/cli) to install the latest ver

## December 2024 #17

### December 19 #17.2

Plate 41

- New RSC components for element and leaf components, filename ending with `-static.tsx`. Those are now added along with the default client components.
- `editor`: add `select-text` to `editorVariants`
- `date-element`: remove popover when read-only
- `indent-todo-marker`: use `SlateRenderElementProps` type instead of `PlateRenderElementProps`
- `hr-element`, `media-audio-element`, `media-embed-element`, `mention-element`: improve cursor styling
- `media-file-element`: use `<a>` instead of `div` + `onClick`
- all element and leaf components: `className` prop is now placed before inline prop.

### December 16 #17.1

- `column-element`:
Expand Down
5 changes: 0 additions & 5 deletions apps/www/content/docs/examples/iframe.mdx

This file was deleted.

Loading
Loading