hivewrite-sdk 1.1.90 → 1.1.91
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 +2 -0
- package/bundle.min.js +1 -1
- package/index.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -123,6 +123,7 @@ Initializes and mounts the editor.
|
|
|
123
123
|
| `branding` | `object` | No | Custom white-labeling options (`primaryColor`, `secondaryColor`, `accentColor`, `logoUrl`, `customCSS`) |
|
|
124
124
|
| `mergeTags` | `array` | No | Array of `{ label, value }` for dynamic content |
|
|
125
125
|
| `portalTarget` | `string` | No | `'window'` (default) or `'container'`. Controls where dialogs render. |
|
|
126
|
+
| `autosave` | `number` | No | Autosave interval in seconds (e.g. `120`). Fires `onAutoSave` on that interval only when the design changed since it was loaded or last saved. Requires `callbacks.onAutoSave`. |
|
|
126
127
|
| `callbacks` | `object` | No | Event hooks for SDK actions |
|
|
127
128
|
|
|
128
129
|
---
|
|
@@ -291,6 +292,7 @@ mergeTags: [
|
|
|
291
292
|
| `onLoad` | `()` | Editor fully initialized |
|
|
292
293
|
| `onExport` | `(html: string, user_id?: string)` | Triggered on HTML export |
|
|
293
294
|
| `onSave` | `(json: {blocks: any[], canvasSettings: CanvasSettings, name: string, description: string, category: string}, user_id?: string)` | Triggered on design save |
|
|
295
|
+
| `onAutoSave` | `(json, user_id?: string)` — same JSON as `onSave` | Fired every `autosave` seconds while there are unsaved changes |
|
|
294
296
|
| `onError` | `(err: any, user_id?: string)` | Initialization or processing error |
|
|
295
297
|
| `onTemplateChange` | `(templateId: string, user_id?: string)` | Template selection changed |
|
|
296
298
|
| `onImageUpload` | `(file: File, user_id?: string)` | **Async**. Handle image uploads, return URL |
|