@platejs/ai 52.3.22 → 53.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { c as AIMode, d as BaseAIPluginConfig, i as EditorPrompt, l as AIToolName } from "../index-D2hJDomP";
2
- import * as platejs12 from "platejs";
2
+ import * as platejs13 from "platejs";
3
3
  import { Descendant, EditorNodesOptions, ExtendConfig, NodeEntry, OmitFirst, Path, PluginConfig, Range, RemoveNodesOptions, SlateEditor, TElement, TIdElement, TRange, TTableElement, TText } from "platejs";
4
4
  import { DeserializeMdOptions, SerializeMdOptions } from "@platejs/markdown";
5
- import * as platejs_react0 from "platejs/react";
5
+ import * as platejs_react1 from "platejs/react";
6
6
  import { OverrideEditor, PlateEditor, RenderNodeWrapperProps } from "platejs/react";
7
7
  import React from "react";
8
8
  import { ChatRequestOptions, UIMessage } from "ai";
@@ -11,31 +11,31 @@ import { TriggerComboboxPluginOptions } from "@platejs/combobox";
11
11
 
12
12
  //#region src/react/ai/AIPlugin.d.ts
13
13
  type AIPluginConfig = ExtendConfig<BaseAIPluginConfig>;
14
- declare const AIPlugin: platejs_react0.PlatePlugin<platejs12.PluginConfig<"ai", {}, {}, {
14
+ declare const AIPlugin: platejs_react1.PlatePlugin<platejs13.PluginConfig<"ai", {}, {}, {
15
15
  ai: {
16
- acceptPreview: ((_value?: platejs12.Value | undefined) => boolean) & ((_value?: platejs12.Value | undefined) => boolean);
16
+ acceptPreview: ((_value?: platejs13.Value | undefined) => boolean) & ((_value?: platejs13.Value | undefined) => boolean);
17
17
  beginPreview: ((args_0?: {
18
- originalBlocks?: platejs12.Value;
18
+ originalBlocks?: platejs13.Value;
19
19
  } | undefined) => boolean) & ((args_0?: {
20
- originalBlocks?: platejs12.Value;
20
+ originalBlocks?: platejs13.Value;
21
21
  } | undefined) => boolean);
22
22
  cancelPreview: (() => boolean) & (() => boolean);
23
23
  discardPreview: (() => boolean) & (() => boolean);
24
24
  hasPreview: (() => boolean) & (() => boolean);
25
- insertNodes: ((nodes: platejs12.Descendant[], args_1?: {
26
- target?: platejs12.Path;
27
- } | undefined) => void) & ((nodes: platejs12.Descendant[], args_1?: {
28
- target?: platejs12.Path;
25
+ insertNodes: ((nodes: platejs13.Descendant[], args_1?: {
26
+ target?: platejs13.Path;
27
+ } | undefined) => void) & ((nodes: platejs13.Descendant[], args_1?: {
28
+ target?: platejs13.Path;
29
29
  } | undefined) => void);
30
30
  removeMarks: ((args_0?: {
31
- at?: platejs12.TLocation;
31
+ at?: platejs13.TLocation;
32
32
  } | undefined) => void) & ((args_0?: {
33
- at?: platejs12.TLocation;
33
+ at?: platejs13.TLocation;
34
34
  } | undefined) => void);
35
35
  removeNodes: ((args_0?: {
36
- at?: platejs12.Path;
36
+ at?: platejs13.Path;
37
37
  } | undefined) => void) & ((args_0?: {
38
- at?: platejs12.Path;
38
+ at?: platejs13.Path;
39
39
  } | undefined) => void);
40
40
  undo: (() => void) & (() => void);
41
41
  };
@@ -168,7 +168,7 @@ type AIChatPluginConfig = PluginConfig<'aiChat', {
168
168
  removeAnchor: (options?: EditorNodesOptions) => void;
169
169
  };
170
170
  }>;
171
- declare const AIChatPlugin: platejs_react0.PlatePlugin<PluginConfig<"aiChat", {
171
+ declare const AIChatPlugin: platejs_react1.PlatePlugin<PluginConfig<"aiChat", {
172
172
  _blockChunks: string;
173
173
  _blockPath: Path | null;
174
174
  /** @private Using For streamInsertChunk */
@@ -244,7 +244,7 @@ declare const AIChatPlugin: platejs_react0.PlatePlugin<PluginConfig<"aiChat", {
244
244
  insertBelow: (sourceEditor: SlateEditor, args_1?: {
245
245
  format?: "all" | "none" | "single";
246
246
  } | undefined) => void;
247
- removeAnchor: (options?: platejs12.RemoveNodesOptions | undefined) => void;
247
+ removeAnchor: (options?: platejs13.RemoveNodesOptions | undefined) => void;
248
248
  replaceSelection: (sourceEditor: SlateEditor, args_1?: {
249
249
  format?: "all" | "none" | "single";
250
250
  } | undefined) => void;
@@ -262,7 +262,7 @@ declare const withAIChat: OverrideEditor<AIChatPluginConfig>;
262
262
  */
263
263
  declare const useAIChatEditor: (editor: SlateEditor, content: string, {
264
264
  parser
265
- }?: DeserializeMdOptions) => platejs12.Value;
265
+ }?: DeserializeMdOptions) => platejs13.Value;
266
266
  //#endregion
267
267
  //#region src/react/ai-chat/hooks/useChatChunk.d.ts
268
268
  declare const useChatChunk: ({
@@ -298,7 +298,7 @@ declare const useEditorChat: ({
298
298
  }: UseEditorChatOptions) => void;
299
299
  //#endregion
300
300
  //#region src/react/ai-chat/streaming/streamDeserializeInlineMd.d.ts
301
- declare const streamDeserializeInlineMd: (editor: PlateEditor, text: string, options?: DeserializeMdOptions) => platejs12.Descendant[] | {
301
+ declare const streamDeserializeInlineMd: (editor: PlateEditor, text: string, options?: DeserializeMdOptions) => platejs13.Descendant[] | {
302
302
  text: string;
303
303
  }[];
304
304
  //#endregion
@@ -317,7 +317,7 @@ type SteamInsertChunkOptions = {
317
317
  };
318
318
  declare const getInsertPreviewStart: (editor: SlateEditor) => {
319
319
  path: Path;
320
- startBlock: platejs12.TElement | platejs12.TText | undefined;
320
+ startBlock: platejs13.TElement | platejs13.TText | undefined;
321
321
  startInEmptyParagraph: boolean;
322
322
  };
323
323
  /** @experimental */
@@ -510,7 +510,7 @@ type CompletionState = {
510
510
  error?: Error | null;
511
511
  isLoading?: boolean;
512
512
  };
513
- declare const CopilotPlugin: platejs_react0.PlatePlugin<PluginConfig<"copilot", CompletionState & {
513
+ declare const CopilotPlugin: platejs_react1.PlatePlugin<PluginConfig<"copilot", CompletionState & {
514
514
  /**
515
515
  * AI completion options. See:
516
516
  * {@link https://sdk.vercel.ai/docs/reference/ai-sdk-ui/use-completion#parameters | AI SDK UI useCompletion Parameters}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platejs/ai",
3
- "version": "52.3.22",
3
+ "version": "53.0.0",
4
4
  "description": "Text AI plugin for Plate",
5
5
  "keywords": [
6
6
  "plate",
@@ -32,19 +32,19 @@
32
32
  "fastest-levenshtein": "1.0.16",
33
33
  "lodash": "^4.17.21",
34
34
  "react-compiler-runtime": "^1.0.0",
35
- "@platejs/markdown": "^52.3.22",
36
- "@platejs/suggestion": "^52.3.10",
37
- "@platejs/selection": "^52.3.10",
38
- "@platejs/table": "^52.3.20"
35
+ "@platejs/markdown": "^53.0.0",
36
+ "@platejs/selection": "^53.0.0",
37
+ "@platejs/suggestion": "^53.0.0",
38
+ "@platejs/table": "^53.0.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@ai-sdk/react": "^3.0.0",
42
42
  "ai": "^6.0.0",
43
43
  "@plate/scripts": "1.0.0",
44
- "platejs": "^52.3.21"
44
+ "platejs": "^53.0.0"
45
45
  },
46
46
  "peerDependencies": {
47
- "platejs": ">=52.0.15",
47
+ "platejs": ">=53.0.0",
48
48
  "react": ">=18.0.0",
49
49
  "react-dom": ">=18.0.0"
50
50
  },