(html: string)
| 16 | // ── Initialize ──────────────────────────────────────────────────────────────── |
| 17 | |
| 18 | export async function initEditor(html: string): Promise<Composition> { |
| 19 | // Use createFsAdapter({ root: projectDir }) in production: |
| 20 | // import { createFsAdapter } from '@hyperframes/sdk/adapters/fs' |
| 21 | const persist = createMemoryAdapter(); |
| 22 | |
| 23 | const comp = await openComposition(html, { |
| 24 | persist, |
| 25 | coalesceMs: 300, |
| 26 | }); |
| 27 | |
| 28 | comp.on("persist:error", ({ error }) => { |
| 29 | showError(`Auto-save failed: ${error.message}${error.hint ? ` — ${error.hint}` : ""}`); |
| 30 | }); |
| 31 | |
| 32 | return comp; |
| 33 | } |
| 34 | |
| 35 | // ── Property panel — typed method layer (F10 docs page one) ────────────────── |
| 36 |
nothing calls this directly
no test coverage detected