@platejs/ai 51.0.0 → 51.0.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.
- package/dist/react/index.d.mts +5 -2
- package/dist/react/index.d.ts +5 -2
- package/dist/react/index.js +466 -436
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +363 -338
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react/index.d.mts
CHANGED
|
@@ -44,7 +44,6 @@ declare function findTextRangeInBlock({ block, findText, }: {
|
|
|
44
44
|
}): Range | null;
|
|
45
45
|
|
|
46
46
|
declare const acceptAIChat: (editor: PlateEditor) => void;
|
|
47
|
-
declare const acceptSuggestions: (editor: PlateEditor) => void;
|
|
48
47
|
|
|
49
48
|
declare const insertBelowAIChat: (editor: PlateEditor, sourceEditor: SlateEditor, { format }?: {
|
|
50
49
|
format?: "all" | "none" | "single";
|
|
@@ -265,11 +264,15 @@ declare function isCompleteMath(str: string): boolean;
|
|
|
265
264
|
|
|
266
265
|
declare const removeAnchorAIChat: (editor: PlateEditor, options?: RemoveNodesOptions) => void;
|
|
267
266
|
|
|
267
|
+
declare const acceptAISuggestions: (editor: PlateEditor) => void;
|
|
268
|
+
|
|
268
269
|
declare const applyAISuggestions: (editor: SlateEditor, content: string) => void;
|
|
269
270
|
|
|
270
271
|
declare function getLastAssistantMessage(editor: PlateEditor): ChatMessage | undefined;
|
|
271
272
|
declare function useLastAssistantMessage(): ChatMessage | undefined;
|
|
272
273
|
|
|
274
|
+
declare const rejectAISuggestions: (editor: PlateEditor) => void;
|
|
275
|
+
|
|
273
276
|
declare const getOriginalFetch: () => typeof fetch;
|
|
274
277
|
type CallCompletionApiOptions = {
|
|
275
278
|
prompt: string;
|
|
@@ -465,4 +468,4 @@ declare const withCopilot: OverrideEditor<CopilotPluginConfig>;
|
|
|
465
468
|
|
|
466
469
|
declare const withoutAbort: (editor: PlateEditor, fn: () => void) => void;
|
|
467
470
|
|
|
468
|
-
export { AIChatPlugin, type AIChatPluginConfig, AIPlugin, type AIPluginConfig, type CallCompletionApiOptions, type CompleteOptions, CopilotPlugin, type CopilotPluginConfig, type GetNextWord, type SteamInsertChunkOptions, type UseEditorChatOptions, acceptAIChat, acceptCopilot, acceptCopilotNextWord,
|
|
471
|
+
export { AIChatPlugin, type AIChatPluginConfig, AIPlugin, type AIPluginConfig, type CallCompletionApiOptions, type CompleteOptions, CopilotPlugin, type CopilotPluginConfig, type GetNextWord, type SteamInsertChunkOptions, type UseEditorChatOptions, acceptAIChat, acceptAISuggestions, acceptCopilot, acceptCopilotNextWord, aiCommentToRange, applyAISuggestions, callCompletionApi, createFormattedBlocks, escapeInput, findTextRangeInBlock, getChunkTrimmed, getCurrentBlockPath, getLastAssistantMessage, getListNode, getNextWord, insertBelowAIChat, insertBelowGenerate, isCompleteCodeBlock, isCompleteMath, isSameNode, nodesWithProps, rejectAISuggestions, removeAnchorAIChat, renderCopilotBelowNodes, replaceSelectionAIChat, resetAIChat, streamDeserializeInlineMd, streamDeserializeMd, streamInsertChunk, streamSerializeMd, submitAIChat, triggerCopilotSuggestion, useAIChatEditor, useChatChunk, useEditorChat, useLastAssistantMessage, withAIChat, withCopilot, withoutAbort };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -44,7 +44,6 @@ declare function findTextRangeInBlock({ block, findText, }: {
|
|
|
44
44
|
}): Range | null;
|
|
45
45
|
|
|
46
46
|
declare const acceptAIChat: (editor: PlateEditor) => void;
|
|
47
|
-
declare const acceptSuggestions: (editor: PlateEditor) => void;
|
|
48
47
|
|
|
49
48
|
declare const insertBelowAIChat: (editor: PlateEditor, sourceEditor: SlateEditor, { format }?: {
|
|
50
49
|
format?: "all" | "none" | "single";
|
|
@@ -265,11 +264,15 @@ declare function isCompleteMath(str: string): boolean;
|
|
|
265
264
|
|
|
266
265
|
declare const removeAnchorAIChat: (editor: PlateEditor, options?: RemoveNodesOptions) => void;
|
|
267
266
|
|
|
267
|
+
declare const acceptAISuggestions: (editor: PlateEditor) => void;
|
|
268
|
+
|
|
268
269
|
declare const applyAISuggestions: (editor: SlateEditor, content: string) => void;
|
|
269
270
|
|
|
270
271
|
declare function getLastAssistantMessage(editor: PlateEditor): ChatMessage | undefined;
|
|
271
272
|
declare function useLastAssistantMessage(): ChatMessage | undefined;
|
|
272
273
|
|
|
274
|
+
declare const rejectAISuggestions: (editor: PlateEditor) => void;
|
|
275
|
+
|
|
273
276
|
declare const getOriginalFetch: () => typeof fetch;
|
|
274
277
|
type CallCompletionApiOptions = {
|
|
275
278
|
prompt: string;
|
|
@@ -465,4 +468,4 @@ declare const withCopilot: OverrideEditor<CopilotPluginConfig>;
|
|
|
465
468
|
|
|
466
469
|
declare const withoutAbort: (editor: PlateEditor, fn: () => void) => void;
|
|
467
470
|
|
|
468
|
-
export { AIChatPlugin, type AIChatPluginConfig, AIPlugin, type AIPluginConfig, type CallCompletionApiOptions, type CompleteOptions, CopilotPlugin, type CopilotPluginConfig, type GetNextWord, type SteamInsertChunkOptions, type UseEditorChatOptions, acceptAIChat, acceptCopilot, acceptCopilotNextWord,
|
|
471
|
+
export { AIChatPlugin, type AIChatPluginConfig, AIPlugin, type AIPluginConfig, type CallCompletionApiOptions, type CompleteOptions, CopilotPlugin, type CopilotPluginConfig, type GetNextWord, type SteamInsertChunkOptions, type UseEditorChatOptions, acceptAIChat, acceptAISuggestions, acceptCopilot, acceptCopilotNextWord, aiCommentToRange, applyAISuggestions, callCompletionApi, createFormattedBlocks, escapeInput, findTextRangeInBlock, getChunkTrimmed, getCurrentBlockPath, getLastAssistantMessage, getListNode, getNextWord, insertBelowAIChat, insertBelowGenerate, isCompleteCodeBlock, isCompleteMath, isSameNode, nodesWithProps, rejectAISuggestions, removeAnchorAIChat, renderCopilotBelowNodes, replaceSelectionAIChat, resetAIChat, streamDeserializeInlineMd, streamDeserializeMd, streamInsertChunk, streamSerializeMd, submitAIChat, triggerCopilotSuggestion, useAIChatEditor, useChatChunk, useEditorChat, useLastAssistantMessage, withAIChat, withCopilot, withoutAbort };
|