@platejs/ai 52.3.17 → 52.3.19

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 platejs0 from "platejs";
1
+ import * as platejs13 from "platejs";
2
2
  import { Descendant, History, OmitFirst, Path, PluginConfig, SlateEditor, TLocation, Value } from "platejs";
3
3
 
4
4
  //#region src/lib/transforms/aiStreamSnapshot.d.ts
@@ -67,31 +67,31 @@ type BaseAIPluginConfig = PluginConfig<'ai', {}, {}, {
67
67
  undo: OmitFirst<typeof undoAI>;
68
68
  };
69
69
  }>;
70
- declare const BaseAIPlugin: platejs0.SlatePlugin<PluginConfig<"ai", {}, {}, {
70
+ declare const BaseAIPlugin: platejs13.SlatePlugin<PluginConfig<"ai", {}, {}, {
71
71
  ai: {
72
- acceptPreview: ((_value?: platejs0.Value | undefined) => boolean) & ((_value?: platejs0.Value | undefined) => boolean);
72
+ acceptPreview: ((_value?: platejs13.Value | undefined) => boolean) & ((_value?: platejs13.Value | undefined) => boolean);
73
73
  beginPreview: ((args_0?: {
74
- originalBlocks?: platejs0.Value;
74
+ originalBlocks?: platejs13.Value;
75
75
  } | undefined) => boolean) & ((args_0?: {
76
- originalBlocks?: platejs0.Value;
76
+ originalBlocks?: platejs13.Value;
77
77
  } | undefined) => boolean);
78
78
  cancelPreview: (() => boolean) & (() => boolean);
79
79
  discardPreview: (() => boolean) & (() => boolean);
80
80
  hasPreview: (() => boolean) & (() => boolean);
81
- insertNodes: ((nodes: platejs0.Descendant[], args_1?: {
82
- target?: platejs0.Path;
83
- } | undefined) => void) & ((nodes: platejs0.Descendant[], args_1?: {
84
- target?: platejs0.Path;
81
+ insertNodes: ((nodes: platejs13.Descendant[], args_1?: {
82
+ target?: platejs13.Path;
83
+ } | undefined) => void) & ((nodes: platejs13.Descendant[], args_1?: {
84
+ target?: platejs13.Path;
85
85
  } | undefined) => void);
86
86
  removeMarks: ((args_0?: {
87
- at?: platejs0.TLocation;
87
+ at?: platejs13.TLocation;
88
88
  } | undefined) => void) & ((args_0?: {
89
- at?: platejs0.TLocation;
89
+ at?: platejs13.TLocation;
90
90
  } | undefined) => void);
91
91
  removeNodes: ((args_0?: {
92
- at?: platejs0.Path;
92
+ at?: platejs13.Path;
93
93
  } | undefined) => void) & ((args_0?: {
94
- at?: platejs0.Path;
94
+ at?: platejs13.Path;
95
95
  } | undefined) => void);
96
96
  undo: (() => void) & (() => void);
97
97
  };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { C as hasAIPreview, S as discardAIPreview, _ as insertAINodes, a as EditorPromptParams, b as beginAIPreview, 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, v as AI_PREVIEW_KEY, x as cancelAIPreview, y as acceptAIPreview } from "./index-D2hJDomP";
1
+ import { C as hasAIPreview, S as discardAIPreview, _ as insertAINodes, a as EditorPromptParams, b as beginAIPreview, 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, v as AI_PREVIEW_KEY, x as cancelAIPreview, y as acceptAIPreview } from "./index-tNeux7Mo";
2
2
  export { AIBatch, AIMode, AIToolName, AI_PREVIEW_KEY, BaseAIPlugin, BaseAIPluginConfig, EditorPrompt, EditorPromptParams, MarkdownType, PromptConfig, acceptAIPreview, beginAIPreview, cancelAIPreview, discardAIPreview, getEditorPrompt, getMarkdown, hasAIPreview, insertAINodes, removeAIMarks, removeAINodes, replacePlaceholders, undoAI, withAIBatch };
@@ -1,5 +1,5 @@
1
- import { c as AIMode, d as BaseAIPluginConfig, i as EditorPrompt, l as AIToolName } from "../index-D2hJDomP";
2
- import * as platejs12 from "platejs";
1
+ import { c as AIMode, d as BaseAIPluginConfig, i as EditorPrompt, l as AIToolName } from "../index-tNeux7Mo";
2
+ import * as platejs0 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
5
  import * as platejs_react0 from "platejs/react";
@@ -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_react0.PlatePlugin<platejs0.PluginConfig<"ai", {}, {}, {
15
15
  ai: {
16
- acceptPreview: ((_value?: platejs12.Value | undefined) => boolean) & ((_value?: platejs12.Value | undefined) => boolean);
16
+ acceptPreview: ((_value?: platejs0.Value | undefined) => boolean) & ((_value?: platejs0.Value | undefined) => boolean);
17
17
  beginPreview: ((args_0?: {
18
- originalBlocks?: platejs12.Value;
18
+ originalBlocks?: platejs0.Value;
19
19
  } | undefined) => boolean) & ((args_0?: {
20
- originalBlocks?: platejs12.Value;
20
+ originalBlocks?: platejs0.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: platejs0.Descendant[], args_1?: {
26
+ target?: platejs0.Path;
27
+ } | undefined) => void) & ((nodes: platejs0.Descendant[], args_1?: {
28
+ target?: platejs0.Path;
29
29
  } | undefined) => void);
30
30
  removeMarks: ((args_0?: {
31
- at?: platejs12.TLocation;
31
+ at?: platejs0.TLocation;
32
32
  } | undefined) => void) & ((args_0?: {
33
- at?: platejs12.TLocation;
33
+ at?: platejs0.TLocation;
34
34
  } | undefined) => void);
35
35
  removeNodes: ((args_0?: {
36
- at?: platejs12.Path;
36
+ at?: platejs0.Path;
37
37
  } | undefined) => void) & ((args_0?: {
38
- at?: platejs12.Path;
38
+ at?: platejs0.Path;
39
39
  } | undefined) => void);
40
40
  undo: (() => void) & (() => void);
41
41
  };
@@ -223,7 +223,7 @@ declare const AIChatPlugin: platejs_react0.PlatePlugin<PluginConfig<"aiChat", {
223
223
  reload: () => void;
224
224
  show: () => void;
225
225
  stop: () => void;
226
- }, "node" | "reset" | "stop" | "submit">> & Record<"aiChat", {
226
+ }, "node" | "stop" | "reset" | "submit">> & Record<"aiChat", {
227
227
  hide: ({
228
228
  focus,
229
229
  undo
@@ -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?: platejs0.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) => platejs0.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) => platejs0.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: platejs0.TElement | platejs0.TText | undefined;
321
321
  startInEmptyParagraph: boolean;
322
322
  };
323
323
  /** @experimental */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platejs/ai",
3
- "version": "52.3.17",
3
+ "version": "52.3.19",
4
4
  "description": "Text AI plugin for Plate",
5
5
  "keywords": [
6
6
  "plate",
@@ -32,10 +32,10 @@
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.10",
35
+ "@platejs/markdown": "^52.3.19",
36
36
  "@platejs/selection": "^52.3.10",
37
37
  "@platejs/suggestion": "^52.3.10",
38
- "@platejs/table": "^52.3.17"
38
+ "@platejs/table": "^52.3.18"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@ai-sdk/react": "^3.0.0",