react-reason-editor 1.0.114 → 1.0.116
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/Ai-DOAuz6ZE.js +1 -0
- package/dist/Ai-DVWZg0-D.cjs +1 -0
- package/dist/Ai.cjs +1 -1
- package/dist/Ai.js +1 -1
- package/dist/BubbleMenus-D8BicxJF.cjs +1 -0
- package/dist/{BubbleMenus-CFzQBrVG.js → BubbleMenus-DopOZm_P.js} +43 -43
- package/dist/{Drawio-s-Xgqy7a.js → Drawio-LEtUoVAY.js} +7 -7
- package/dist/Drawio.js +1 -1
- package/dist/{Emoji-CTKm00BR.js → Emoji-CIxVw-Kv.js} +2 -2
- package/dist/Emoji.js +1 -1
- package/dist/{ReasonDocs-CsmZMk6W.cjs → ReasonDocs-BCjyspDd.cjs} +1 -1
- package/dist/{ReasonDocs-BXtUm4zk.js → ReasonDocs-eAuJLZVg.js} +17 -17
- package/dist/{RichTextProvider-KRSFedCE.cjs → RichTextProvider-C0V3hhy_.cjs} +1 -1
- package/dist/RichTextProvider-z_4PSTNH.js +5 -0
- package/dist/{bubble-B39N7x_B.js → bubble-DF0FOqik.js} +17 -17
- package/dist/bubble.cjs +1 -1
- package/dist/bubble.js +1 -1
- package/dist/docs-agent/plate/ai-controller.d.ts +82 -0
- package/dist/docs-agent/plate/kits/ai-kit.d.ts +37 -0
- package/dist/docs-agent/plate/ui/ai-menu.d.ts +19 -0
- package/dist/docs-agent/plate/ui/ai-toolbar-button.d.ts +12 -0
- package/dist/docs-agent.cjs +1 -1
- package/dist/docs-agent.d.ts +4 -0
- package/dist/docs-agent.js +18 -18
- package/dist/editor-kit.cjs +1 -1
- package/dist/editor-kit.js +1 -1
- package/dist/editorConfig-CpUHUq44.js +18 -0
- package/dist/editorConfig-DaUET9eN.cjs +1 -0
- package/dist/extensions/Ai/index.d.ts +1 -0
- package/dist/extensions/Ai/lib/rewriteEndpoint.d.ts +17 -0
- package/dist/{html-to-docx.esm-BLUcO7pp-BKB2FJoB.cjs → html-to-docx.esm-BLUcO7pp-sCMiaq9J.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/reason-docs.cjs +1 -1
- package/dist/reason-docs.js +1 -1
- package/dist/reason-toolbar-skin-BQRPoci6.cjs +1 -0
- package/dist/reason-toolbar-skin-Beh6Q5Ra.js +560 -0
- package/package.json +2 -2
- package/dist/Ai-B_8fziaT.js +0 -1
- package/dist/Ai-BxQjqvdT.cjs +0 -1
- package/dist/BubbleMenus-3RiQc4lw.cjs +0 -1
- package/dist/RichTextProvider-BcsYTR6Z.js +0 -5
- package/dist/editorConfig-9-ZxkRbw.js +0 -18
- package/dist/editorConfig-DF8EAH_P.cjs +0 -1
- package/dist/reason-toolbar-skin-DY4w9SRA.cjs +0 -1
- package/dist/reason-toolbar-skin-DarRq6V-.js +0 -539
|
@@ -8,6 +8,7 @@ export * from './components/AiMenu';
|
|
|
8
8
|
export * from './components/RichTextAi';
|
|
9
9
|
export { mockAiCompletion } from './lib/mockCompletion';
|
|
10
10
|
export { createStreamingCompletion } from './lib/createStreamingCompletion';
|
|
11
|
+
export { createRewriteCompletion, DEFAULT_AI_ENDPOINT } from './lib/rewriteEndpoint';
|
|
11
12
|
export type { StreamingCompletionOptions } from './lib/createStreamingCompletion';
|
|
12
13
|
export { buildAiInstruction, buildAiUserPrompt, clampContext, commandRequiresSelection, commandsForSelection, groupCommands, } from './lib/prompt';
|
|
13
14
|
export { sanitizeCompletion } from './lib/sanitizeCompletion';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AiCompletionFn } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default endpoint the AI writing assistant posts to. It matches the
|
|
4
|
+
* `{ text, prompt } -> { rewrittenText }` contract the QwkSearch web app
|
|
5
|
+
* serves at `/api/agent/rewrite`, which is where this editor is mounted.
|
|
6
|
+
* Hosts without that route point it at their own (or clear it) — an empty
|
|
7
|
+
* value falls back to the offline demo transform rather than failing every
|
|
8
|
+
* action.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DEFAULT_AI_ENDPOINT = "/api/agent/rewrite";
|
|
11
|
+
/**
|
|
12
|
+
* Builds a completion function for a rewrite endpoint. The request carries the
|
|
13
|
+
* whole instruction as one prompt, so a plain rewrite route needs no changes to
|
|
14
|
+
* serve every command in the menu. An empty `endpoint` returns the offline demo
|
|
15
|
+
* transform, which is what keeps the menu usable with no backend at all.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createRewriteCompletion(endpoint: string): AiCompletionFn;
|