Skip to content

Commit 261534d

Browse files
authored
Merge pull request udecode#4600 from udecode/vendor/slate
2 parents 9e8d834 + c7c4054 commit 261534d

8 files changed

Lines changed: 95 additions & 80 deletions

File tree

.changeset/neat-walls-mix.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@platejs/core": patch
3+
"@platejs/slate": patch
4+
"@platejs/test-utils": patch
5+
---
6+
7+
slate 0.118

apps/www/src/registry/blocks/editor-ai/components/editor/plate-editor.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import * as React from 'react';
44

5+
import { normalizeNodeId } from 'platejs';
56
import { Plate, usePlateEditor } from 'platejs/react';
67

78
import { EditorKit } from '@/registry/blocks/editor-ai/components/editor/editor-kit';
@@ -25,7 +26,7 @@ export function PlateEditor() {
2526
);
2627
}
2728

28-
const value = [
29+
const value = normalizeNodeId([
2930
{
3031
children: [{ text: 'Welcome to the Plate Playground!' }],
3132
type: 'h1',
@@ -580,4 +581,4 @@ const value = [
580581
children: [{ text: '' }],
581582
type: 'p',
582583
},
583-
];
584+
]);

apps/www/src/registry/blocks/editor-basic/components/editor/plate-editor.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use client';
22

3+
import { normalizeNodeId } from 'platejs';
34
import { Plate, usePlateEditor } from 'platejs/react';
45

56
import { BasicNodesKit } from '@/registry/components/editor/plugins/basic-nodes-kit';
@@ -20,7 +21,7 @@ export function PlateEditor() {
2021
);
2122
}
2223

23-
const value = [
24+
const value = normalizeNodeId([
2425
{
2526
children: [{ text: 'Basic Editor' }],
2627
type: 'h1',
@@ -51,4 +52,4 @@ const value = [
5152
],
5253
type: 'p',
5354
},
54-
];
55+
]);

packages/core/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@
6969
"lodash": "^4.17.21",
7070
"nanoid": "^5.1.5",
7171
"optics-ts": "2.4.1",
72-
"slate-hyperscript": "0.100.0",
73-
"slate-react": "0.117.1",
72+
"slate": "0.118.1",
73+
"slate-dom": "0.118.1",
74+
"slate-hyperscript": "0.115.0",
75+
"slate-react": "0.117.4",
7476
"use-deep-compare": "^1.3.0",
7577
"zustand": "^5.0.5",
7678
"zustand-x": "6.1.0"

packages/slate/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
"@udecode/utils": "47.2.7",
4646
"is-plain-object": "^5.0.0",
4747
"lodash": "^4.17.21",
48-
"slate": "0.117.0",
49-
"slate-dom": "0.116.0"
48+
"slate": "0.118.1",
49+
"slate-dom": "0.118.1"
5050
},
5151
"publishConfig": {
5252
"access": "public"

packages/slate/src/interfaces/node.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ export const NodeApi: {
223223
},
224224
fragment: (...args) => {
225225
try {
226-
return SlateNode.fragment(...args);
226+
const fragment = SlateNode.fragment as any;
227+
228+
return fragment(...args);
227229
} catch {
228230
return [];
229231
}

packages/test-utils/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
},
4747
"dependencies": {
4848
"@platejs/slate": "49.2.4",
49-
"slate-hyperscript": "0.100.0"
49+
"slate": "0.118.1",
50+
"slate-hyperscript": "0.115.0"
5051
},
5152
"publishConfig": {
5253
"access": "public"

0 commit comments

Comments
 (0)