@platejs/ai 52.1.0 → 52.3.1

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-Dyi5V2wm.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-BvrXoj5P.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-Dyi5V2wm.js";
2
- import * as platejs0 from "platejs";
1
+ import { c as AIMode, d as BaseAIPluginConfig, i as EditorPrompt, l as AIToolName } from "../index-BvrXoj5P.js";
2
+ import * as platejs5 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,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;
@@ -245,7 +245,7 @@ declare const withAIChat: OverrideEditor<AIChatPluginConfig>;
245
245
  */
246
246
  declare const useAIChatEditor: (editor: SlateEditor, content: string, {
247
247
  parser
248
- }?: DeserializeMdOptions) => platejs0.Value;
248
+ }?: DeserializeMdOptions) => platejs5.Value;
249
249
  //#endregion
250
250
  //#region src/react/ai-chat/hooks/useChatChunk.d.ts
251
251
  declare const useChatChunk: ({
@@ -281,7 +281,7 @@ declare const useEditorChat: ({
281
281
  }: UseEditorChatOptions) => void;
282
282
  //#endregion
283
283
  //#region src/react/ai-chat/streaming/streamDeserializeInlineMd.d.ts
284
- declare const streamDeserializeInlineMd: (editor: PlateEditor, text: string, options?: DeserializeMdOptions) => platejs0.Descendant[];
284
+ declare const streamDeserializeInlineMd: (editor: PlateEditor, text: string, options?: DeserializeMdOptions) => platejs5.Descendant[];
285
285
  //#endregion
286
286
  //#region src/react/ai-chat/streaming/streamDeserializeMd.d.ts
287
287
  declare const streamDeserializeMd: (editor: PlateEditor, data: string, options?: DeserializeMdOptions) => TElement[] | {
@@ -486,7 +486,7 @@ type CompletionState = {
486
486
  error?: Error | null;
487
487
  isLoading?: boolean;
488
488
  };
489
- declare const CopilotPlugin: platejs_react0.PlatePlugin<PluginConfig<"copilot", CompletionState & {
489
+ declare const CopilotPlugin: platejs_react1.PlatePlugin<PluginConfig<"copilot", CompletionState & {
490
490
  /**
491
491
  * AI completion options. See:
492
492
  * {@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.1.0",
3
+ "version": "52.3.1",
4
4
  "description": "Text AI plugin for Plate",
5
5
  "keywords": [
6
6
  "plate",
@@ -40,7 +40,7 @@
40
40
  "typecheck": "yarn p:typecheck"
41
41
  },
42
42
  "dependencies": {
43
- "@platejs/markdown": "52.1.0",
43
+ "@platejs/markdown": "52.3.1",
44
44
  "@platejs/selection": "52.0.16",
45
45
  "@platejs/suggestion": "52.0.11",
46
46
  "fastest-levenshtein": "1.0.16",