slidecanvas 1.1.8 → 1.1.9
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/README.md +11 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -190,6 +190,14 @@ While SlideCanvas includes built-in Gemini support, you can override the logic w
|
|
|
190
190
|
> [!NOTE]
|
|
191
191
|
> When these hooks are provided, the editor will favor them over the default Gemini integration.
|
|
192
192
|
|
|
193
|
+
### 9. Toolbar Refine vs Ask AI
|
|
194
|
+
The editor separates "Quick Actions" (Toolbar) from "Conversational AI" (Slash Command). You can provide distinct handlers for each:
|
|
195
|
+
|
|
196
|
+
- **Toolbar (Refine Menu)**: Uses `onRefineShorten`, `onRefineReframe`, `onRefineLengthen`.
|
|
197
|
+
- **Slash Command (Ask AI)**: Uses `onAiShorten`, `onAiLengthen`, `onAiRewrite`, etc.
|
|
198
|
+
|
|
199
|
+
This allows you to use lighter/faster models for the toolbar buttons and more capable models for the conversational interface if desired.
|
|
200
|
+
|
|
193
201
|
## Advanced Usage Examples
|
|
194
202
|
|
|
195
203
|
### 1. 7-Second S3 Auto-Save (Real-Time Persistence)
|
|
@@ -337,6 +345,9 @@ async function extractCaptions(fileBuffer: ArrayBuffer) {
|
|
|
337
345
|
| `onAiShorten` | `(text: string) => Promise<string>` | `undefined` | Optional hook to override default Gemini shorten logic. |
|
|
338
346
|
| `onAiLengthen` | `(text: string) => Promise<string>` | `undefined` | Optional hook to override default Gemini lengthen logic. |
|
|
339
347
|
| `onAiContinue` | `(text: string) => Promise<string>` | `undefined` | Optional hook to override default Gemini continue-writing logic. |
|
|
348
|
+
| `onRefineShorten` | `(text: string) => Promise<string>` | `undefined` | Override loop for Toolbar "Shorten" button. |
|
|
349
|
+
| `onRefineReframe` | `(text: string) => Promise<string>` | `undefined` | Override loop for Toolbar "Reframe" button. |
|
|
350
|
+
| `onRefineLengthen` | `(text: string) => Promise<string>` | `undefined` | Override loop for Toolbar "Lengthen" button. |
|
|
340
351
|
|
|
341
352
|
### Usage Examples
|
|
342
353
|
|
package/dist/index.d.mts
CHANGED
|
@@ -77,6 +77,9 @@ interface PptEditorProps {
|
|
|
77
77
|
onAiContinue?: (text: string) => Promise<string>;
|
|
78
78
|
isTwoStepInfographicGeneration?: boolean;
|
|
79
79
|
onRefineInfographicPrompt?: (text: string) => Promise<string>;
|
|
80
|
+
onRefineShorten?: (text: string) => Promise<string>;
|
|
81
|
+
onRefineReframe?: (text: string) => Promise<string>;
|
|
82
|
+
onRefineLengthen?: (text: string) => Promise<string>;
|
|
80
83
|
}
|
|
81
84
|
declare const PptEditor: React.FC<PptEditorProps>;
|
|
82
85
|
|
package/dist/index.d.ts
CHANGED
|
@@ -77,6 +77,9 @@ interface PptEditorProps {
|
|
|
77
77
|
onAiContinue?: (text: string) => Promise<string>;
|
|
78
78
|
isTwoStepInfographicGeneration?: boolean;
|
|
79
79
|
onRefineInfographicPrompt?: (text: string) => Promise<string>;
|
|
80
|
+
onRefineShorten?: (text: string) => Promise<string>;
|
|
81
|
+
onRefineReframe?: (text: string) => Promise<string>;
|
|
82
|
+
onRefineLengthen?: (text: string) => Promise<string>;
|
|
80
83
|
}
|
|
81
84
|
declare const PptEditor: React.FC<PptEditorProps>;
|
|
82
85
|
|