From a17b84f1aa09ac5bcc019823b5d0dfea581ada57 Mon Sep 17 00:00:00 2001 From: zbeyens Date: Sun, 20 Oct 2024 03:17:22 +0200 Subject: [PATCH] fix --- .changeset/chilly-cougars-love.md | 5 +++++ .changeset/grumpy-carrots-taste.md | 5 +++++ .changeset/mean-spoons-flash.md | 5 +++++ packages/ai/package.json | 6 +++-- .../ai-chat/transforms/insertBelowAIChat.ts | 2 +- .../transforms/replaceSelectionAIChat.ts | 2 +- yarn.lock | 22 +++++++++---------- 7 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 .changeset/chilly-cougars-love.md create mode 100644 .changeset/grumpy-carrots-taste.md create mode 100644 .changeset/mean-spoons-flash.md diff --git a/.changeset/chilly-cougars-love.md b/.changeset/chilly-cougars-love.md new file mode 100644 index 0000000000..38ffc14ae1 --- /dev/null +++ b/.changeset/chilly-cougars-love.md @@ -0,0 +1,5 @@ +--- +'@udecode/slate': patch +--- + +Add `withNewBatch` to history plugin diff --git a/.changeset/grumpy-carrots-taste.md b/.changeset/grumpy-carrots-taste.md new file mode 100644 index 0000000000..01d185f454 --- /dev/null +++ b/.changeset/grumpy-carrots-taste.md @@ -0,0 +1,5 @@ +--- +'@udecode/plate-ai': patch +--- + +Fix lodash imports diff --git a/.changeset/mean-spoons-flash.md b/.changeset/mean-spoons-flash.md new file mode 100644 index 0000000000..acc26ab004 --- /dev/null +++ b/.changeset/mean-spoons-flash.md @@ -0,0 +1,5 @@ +--- +'@udecode/plate-core': patch +--- + +Use slate-history fork diff --git a/packages/ai/package.json b/packages/ai/package.json index 6f0a6680a5..18f267be9b 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -50,12 +50,14 @@ "typecheck": "yarn p:typecheck" }, "dependencies": { - "@udecode/plate-combobox": "39.0.0", "@udecode/plate-markdown": "39.2.0", "@udecode/plate-selection": "39.2.0", - "ai": "^3.4.10", "lodash": "^4.17.21" }, + "devDependencies": { + "@udecode/plate-combobox": "39.0.0", + "ai": "^3.4.10" + }, "peerDependencies": { "@udecode/plate-common": ">=39.1.4", "react": ">=16.8.0", diff --git a/packages/ai/src/react/ai-chat/transforms/insertBelowAIChat.ts b/packages/ai/src/react/ai-chat/transforms/insertBelowAIChat.ts index 6ab3021725..188bdce40f 100644 --- a/packages/ai/src/react/ai-chat/transforms/insertBelowAIChat.ts +++ b/packages/ai/src/react/ai-chat/transforms/insertBelowAIChat.ts @@ -2,7 +2,7 @@ import type { PlateEditor } from '@udecode/plate-common/react'; import { isEditorEmpty } from '@udecode/plate-common'; import { BlockSelectionPlugin } from '@udecode/plate-selection/react'; -import { cloneDeep } from 'lodash'; +import cloneDeep from 'lodash/cloneDeep.js'; import { Path, Range } from 'slate'; import type { AIChatPluginConfig } from '../AIChatPlugin'; diff --git a/packages/ai/src/react/ai-chat/transforms/replaceSelectionAIChat.ts b/packages/ai/src/react/ai-chat/transforms/replaceSelectionAIChat.ts index 454a03eb63..9a2398425c 100644 --- a/packages/ai/src/react/ai-chat/transforms/replaceSelectionAIChat.ts +++ b/packages/ai/src/react/ai-chat/transforms/replaceSelectionAIChat.ts @@ -6,7 +6,7 @@ import { BlockSelectionPlugin, removeBlockSelectionNodes, } from '@udecode/plate-selection/react'; -import { cloneDeep } from 'lodash'; +import cloneDeep from 'lodash/cloneDeep.js'; import type { AIChatPluginConfig } from '../AIChatPlugin'; diff --git a/yarn.lock b/yarn.lock index f618ebf659..efeb537ba7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6321,8 +6321,8 @@ __metadata: resolution: "@udecode/plate-ai@workspace:packages/ai" dependencies: "@udecode/plate-combobox": "npm:39.0.0" - "@udecode/plate-markdown": "npm:39.1.5" - "@udecode/plate-selection": "npm:39.1.4" + "@udecode/plate-markdown": "npm:39.2.0" + "@udecode/plate-selection": "npm:39.2.0" ai: "npm:^3.4.10" lodash: "npm:^4.17.21" peerDependencies: @@ -6680,7 +6680,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-docx@npm:39.1.10, @udecode/plate-docx@workspace:^, @udecode/plate-docx@workspace:packages/docx": +"@udecode/plate-docx@npm:39.2.0, @udecode/plate-docx@workspace:^, @udecode/plate-docx@workspace:packages/docx": version: 0.0.0-use.local resolution: "@udecode/plate-docx@workspace:packages/docx" dependencies: @@ -6688,7 +6688,7 @@ __metadata: "@udecode/plate-heading": "npm:39.0.0" "@udecode/plate-indent": "npm:39.0.0" "@udecode/plate-indent-list": "npm:39.1.10" - "@udecode/plate-media": "npm:39.0.0" + "@udecode/plate-media": "npm:39.2.0" "@udecode/plate-table": "npm:39.1.6" validator: "npm:^13.12.0" peerDependencies: @@ -6990,7 +6990,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-markdown@npm:39.1.5, @udecode/plate-markdown@workspace:^, @udecode/plate-markdown@workspace:packages/markdown": +"@udecode/plate-markdown@npm:39.2.0, @udecode/plate-markdown@workspace:^, @udecode/plate-markdown@workspace:packages/markdown": version: 0.0.0-use.local resolution: "@udecode/plate-markdown@workspace:packages/markdown" dependencies: @@ -7027,7 +7027,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-media@npm:39.0.0, @udecode/plate-media@workspace:^, @udecode/plate-media@workspace:packages/media": +"@udecode/plate-media@npm:39.2.0, @udecode/plate-media@workspace:^, @udecode/plate-media@workspace:packages/media": version: 0.0.0-use.local resolution: "@udecode/plate-media@workspace:packages/media" dependencies: @@ -7160,7 +7160,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-selection@npm:39.1.4, @udecode/plate-selection@workspace:^, @udecode/plate-selection@workspace:packages/selection": +"@udecode/plate-selection@npm:39.2.0, @udecode/plate-selection@workspace:^, @udecode/plate-selection@workspace:packages/selection": version: 0.0.0-use.local resolution: "@udecode/plate-selection@workspace:packages/selection" dependencies: @@ -7347,7 +7347,7 @@ __metadata: "@udecode/plate-common": "npm:39.1.8" "@udecode/plate-csv": "npm:39.1.6" "@udecode/plate-diff": "npm:39.0.0" - "@udecode/plate-docx": "npm:39.1.10" + "@udecode/plate-docx": "npm:39.2.0" "@udecode/plate-find-replace": "npm:39.0.0" "@udecode/plate-floating": "npm:39.1.6" "@udecode/plate-font": "npm:39.0.0" @@ -7362,15 +7362,15 @@ __metadata: "@udecode/plate-line-height": "npm:39.0.0" "@udecode/plate-link": "npm:39.1.9" "@udecode/plate-list": "npm:39.0.0" - "@udecode/plate-markdown": "npm:39.1.5" - "@udecode/plate-media": "npm:39.0.0" + "@udecode/plate-markdown": "npm:39.2.0" + "@udecode/plate-media": "npm:39.2.0" "@udecode/plate-mention": "npm:39.0.0" "@udecode/plate-node-id": "npm:39.0.0" "@udecode/plate-normalizers": "npm:39.0.0" "@udecode/plate-reset-node": "npm:39.0.0" "@udecode/plate-resizable": "npm:39.1.6" "@udecode/plate-select": "npm:39.0.0" - "@udecode/plate-selection": "npm:39.1.4" + "@udecode/plate-selection": "npm:39.2.0" "@udecode/plate-slash-command": "npm:39.0.0" "@udecode/plate-suggestion": "npm:39.0.0" "@udecode/plate-tabbable": "npm:39.0.0"