@platejs/ai 52.0.10 → 52.0.11

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,4 +1,4 @@
1
- import * as platejs5 from "platejs";
1
+ import * as platejs0 from "platejs";
2
2
  import { Descendant, History, OmitFirst, Path, PluginConfig, SlateEditor, TLocation } from "platejs";
3
3
 
4
4
  //#region src/lib/transforms/insertAINodes.d.ts
@@ -43,15 +43,15 @@ type BaseAIPluginConfig = PluginConfig<'ai', {}, {}, {
43
43
  removeNodes: OmitFirst<typeof removeAINodes>;
44
44
  };
45
45
  }>;
46
- declare const BaseAIPlugin: platejs5.SlatePlugin<PluginConfig<any, {}, {}, Record<any, {
47
- insertNodes: (nodes: platejs5.Descendant[], args_1?: {
48
- target?: platejs5.Path;
46
+ declare const BaseAIPlugin: platejs0.SlatePlugin<PluginConfig<any, {}, {}, Record<any, {
47
+ insertNodes: (nodes: platejs0.Descendant[], args_1?: {
48
+ target?: platejs0.Path;
49
49
  } | undefined) => void;
50
50
  removeMarks: (args_0?: {
51
- at?: platejs5.TLocation;
51
+ at?: platejs0.TLocation;
52
52
  } | undefined) => void;
53
53
  removeNodes: (args_0?: {
54
- at?: platejs5.Path;
54
+ at?: platejs0.Path;
55
55
  } | undefined) => void;
56
56
  undo: () => void;
57
57
  }>, {}>>;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as insertAINodes, a as EditorPromptParams, c as AIMode, d as BaseAIPluginConfig, f as AIBatch, g as removeAIMarks, h as removeAINodes, i as EditorPrompt, l as AIToolName, m as undoAI, n as MarkdownType, o as PromptConfig, p as withAIBatch, r as replacePlaceholders, s as getEditorPrompt, t as getMarkdown, u as BaseAIPlugin } from "./index-DOcs1xmw.js";
1
+ import { _ as insertAINodes, a as EditorPromptParams, c as AIMode, d as BaseAIPluginConfig, f as AIBatch, g as removeAIMarks, h as removeAINodes, i as EditorPrompt, l as AIToolName, m as undoAI, n as MarkdownType, o as PromptConfig, p as withAIBatch, r as replacePlaceholders, s as getEditorPrompt, t as getMarkdown, u as BaseAIPlugin } from "./index-CyVv31EV.js";
2
2
  export { AIBatch, AIMode, AIToolName, BaseAIPlugin, BaseAIPluginConfig, EditorPrompt, EditorPromptParams, MarkdownType, PromptConfig, getEditorPrompt, getMarkdown, insertAINodes, removeAIMarks, removeAINodes, replacePlaceholders, undoAI, withAIBatch };
@@ -1,8 +1,8 @@
1
- import { c as AIMode, d as BaseAIPluginConfig, i as EditorPrompt, l as AIToolName } from "../index-DOcs1xmw.js";
2
- import * as platejs0 from "platejs";
1
+ import { c as AIMode, d as BaseAIPluginConfig, i as EditorPrompt, l as AIToolName } from "../index-CyVv31EV.js";
2
+ import * as platejs5 from "platejs";
3
3
  import { Descendant, EditorNodesOptions, ExtendConfig, NodeEntry, OmitFirst, Path, PluginConfig, Range, RemoveNodesOptions, SlateEditor, TElement, TIdElement, TRange, 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,15 +11,15 @@ 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<platejs0.PluginConfig<any, {}, {}, Record<any, {
15
- insertNodes: (nodes: platejs0.Descendant[], args_1?: {
16
- target?: platejs0.Path;
14
+ declare const AIPlugin: platejs_react1.PlatePlugin<platejs5.PluginConfig<any, {}, {}, Record<any, {
15
+ insertNodes: (nodes: platejs5.Descendant[], args_1?: {
16
+ target?: platejs5.Path;
17
17
  } | undefined) => void;
18
18
  removeMarks: (args_0?: {
19
- at?: platejs0.TLocation;
19
+ at?: platejs5.TLocation;
20
20
  } | undefined) => void;
21
21
  removeNodes: (args_0?: {
22
- at?: platejs0.Path;
22
+ at?: platejs5.Path;
23
23
  } | undefined) => void;
24
24
  undo: () => void;
25
25
  }>, {}>>;
@@ -151,7 +151,7 @@ type AIChatPluginConfig = PluginConfig<'aiChat', {
151
151
  removeAnchor: (options?: EditorNodesOptions) => void;
152
152
  };
153
153
  }>;
154
- declare const AIChatPlugin: platejs_react0.PlatePlugin<PluginConfig<"aiChat", {
154
+ declare const AIChatPlugin: platejs_react1.PlatePlugin<PluginConfig<"aiChat", {
155
155
  _blockChunks: string;
156
156
  _blockPath: Path | null;
157
157
  /** @private Using For streamInsertChunk */
@@ -227,7 +227,7 @@ declare const AIChatPlugin: platejs_react0.PlatePlugin<PluginConfig<"aiChat", {
227
227
  insertBelow: (sourceEditor: SlateEditor, args_1?: {
228
228
  format?: "all" | "none" | "single";
229
229
  } | undefined) => void;
230
- removeAnchor: (options?: platejs0.RemoveNodesOptions | undefined) => void;
230
+ removeAnchor: (options?: platejs5.RemoveNodesOptions | undefined) => void;
231
231
  replaceSelection: (sourceEditor: SlateEditor, args_1?: {
232
232
  format?: "all" | "none" | "single";
233
233
  } | undefined) => void;
@@ -279,7 +279,7 @@ declare const useEditorChat: ({
279
279
  }: UseEditorChatOptions) => void;
280
280
  //#endregion
281
281
  //#region src/react/ai-chat/streaming/streamDeserializeInlineMd.d.ts
282
- declare const streamDeserializeInlineMd: (editor: PlateEditor, text: string, options?: DeserializeMdOptions) => platejs0.Descendant[];
282
+ declare const streamDeserializeInlineMd: (editor: PlateEditor, text: string, options?: DeserializeMdOptions) => platejs5.Descendant[];
283
283
  //#endregion
284
284
  //#region src/react/ai-chat/streaming/streamDeserializeMd.d.ts
285
285
  declare const streamDeserializeMd: (editor: PlateEditor, data: string, options?: DeserializeMdOptions) => TElement[] | {
@@ -464,7 +464,7 @@ type CompletionState = {
464
464
  error?: Error | null;
465
465
  isLoading?: boolean;
466
466
  };
467
- declare const CopilotPlugin: platejs_react0.PlatePlugin<PluginConfig<"copilot", CompletionState & {
467
+ declare const CopilotPlugin: platejs_react1.PlatePlugin<PluginConfig<"copilot", CompletionState & {
468
468
  /**
469
469
  * AI completion options. See:
470
470
  * {@link https://sdk.vercel.ai/docs/reference/ai-sdk-ui/use-completion#parameters | AI SDK UI useCompletion Parameters}
@@ -8,7 +8,7 @@ import { distance } from "fastest-levenshtein";
8
8
  import { BlockSelectionPlugin, removeBlockSelectionNodes } from "@platejs/selection/react";
9
9
  import { SuggestionPlugin } from "@platejs/suggestion/react";
10
10
  import cloneDeep from "lodash/cloneDeep.js";
11
- import { c } from "react/compiler-runtime";
11
+ import { c } from "react-compiler-runtime";
12
12
  import React, { useEffect, useMemo, useRef } from "react";
13
13
  import debounce from "lodash/debounce.js";
14
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platejs/ai",
3
- "version": "52.0.10",
3
+ "version": "52.0.11",
4
4
  "description": "Text AI plugin for Plate",
5
5
  "keywords": [
6
6
  "plate",
@@ -40,19 +40,20 @@
40
40
  "typecheck": "yarn p:typecheck"
41
41
  },
42
42
  "dependencies": {
43
- "@platejs/markdown": "52.0.10",
44
- "@platejs/selection": "52.0.1",
45
- "@platejs/suggestion": "52.0.1",
43
+ "@platejs/markdown": "52.0.11",
44
+ "@platejs/selection": "52.0.11",
45
+ "@platejs/suggestion": "52.0.11",
46
46
  "fastest-levenshtein": "1.0.16",
47
- "lodash": "^4.17.21"
47
+ "lodash": "^4.17.21",
48
+ "react-compiler-runtime": "^1.0.0"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@ai-sdk/react": "2.0.28",
51
- "@platejs/combobox": "52.0.1",
52
+ "@platejs/combobox": "52.0.11",
52
53
  "ai": "5.0.28"
53
54
  },
54
55
  "peerDependencies": {
55
- "platejs": ">=52.0.10",
56
+ "platejs": ">=52.0.11",
56
57
  "react": ">=18.0.0",
57
58
  "react-dom": ">=18.0.0"
58
59
  },