Write HTML. Render video. Built for agents.
JavaScript aiai-agentsanimationclaude-codeffmpegframeworkgsaphtmlhtml-to-videomcpmotion-graphicspuppeteerrenderingtypescriptvideo-editor
docs: correct four developer-reference claims the source contradicts
ukimsanov7a91b93dd622
diff --git a/docs/packages/cli.mdx b/docs/packages/cli.mdxindex 6f49419740..387f34cd20 100644--- a/docs/packages/cli.mdx+++ b/docs/packages/cli.mdx@@ -934,7 +934,7 @@ npx hyperframes render --gpu --output gpu.mp4| `--batch` | path | — | Render one output per variables row from a JSON array or `{ "rows": [...] }` object || `--batch-concurrency` | positive integer | 1 | Maximum number of batch rows rendered at once || `--batch-fail-fast` | — | off | Stop launching new batch rows after the first failure |-| `--json` | — | off | Emit JSON progress events for a batch render |+| `--json` | — | off | Print one final JSON result for the batch instead of human-readable progress || `--page-side-compositing` / `--no-page-side-compositing` | — | on | Use the faster page-side WebGL path for compatible SDR shader transitions, or force layered compositing || `--browser-timeout` | seconds (0.001–86400) | 60 | Puppeteer page-navigation timeout for the entry HTML. Increase when heavy compositions (many videos, fonts, or asset requests) cannot reach `domcontentloaded` within the default 60 s. The flag takes **seconds**; the env fallback `PRODUCER_PAGE_NAVIGATION_TIMEOUT_MS` takes **milliseconds**. This controls `page.goto` only — very heavy compositions may also need `PRODUCER_PUPPETEER_PROTOCOL_TIMEOUT_MS` and/or `PRODUCER_PLAYER_READY_TIMEOUT_MS` bumped (post-navigation `window.__hf` readiness has its own 45 s budget). || `--protocol-timeout` | milliseconds (≥ 1000) | 300000 (5 min) | Puppeteer CDP protocol timeout — the per-call budget for `Runtime.callFunctionOn` seek/paint, `Page.captureScreenshot`, and other CDP round-trips. Raise on RAM-pressured hosts (≤ 8 GB), heavy-asset compositions (many videos + images), or when the render fails with `Runtime.callFunctionOn timed out` / `Target closed`. The default is auto-scaled per composition by output pixel area (a 4K comp bumps the ceiling proportionally, capped at 30 min); an explicit override sets the floor and disables scaling below it. Env fallback `PRODUCER_PUPPETEER_PROTOCOL_TIMEOUT_MS` (also **milliseconds**). |diff --git a/docs/sdk/guides/canvas-integration.mdx b/docs/sdk/guides/canvas-integration.mdxindex be878c0da4..80b17a9836 100644--- a/docs/sdk/guides/canvas-integration.mdx+++ b/docs/sdk/guides/canvas-integration.mdx@@ -123,8 +123,11 @@ iframe.addEventListener("load", () => {targetId = hit.id;startX = event.clientX;startY = event.clientY;- if (event.target instanceof Element && "setPointerCapture" in event.target) {- event.target.setPointerCapture(event.pointerId);+ // The target comes from the iframe's realm, so `instanceof Element` against+ // this window's constructor is always false and capture would be skipped —+ // then a pointer leaving the frame loses `pointerup` and drag state sticks.+ if (event.target && "setPointerCapture" in event.target) {+ (event.target as Element).setPointerCapture(event.pointerId);}});diff --git a/docs/sdk/reference/adapters.mdx b/docs/sdk/reference/adapters.mdxindex f02e3ec217..a8b6a6760a 100644--- a/docs/sdk/reference/adapters.mdx+++ b/docs/sdk/reference/adapters.mdx@@ -301,8 +301,11 @@ Returns a `PreviewAdapter` that bridges the SDK to a same-origin `<iframe>` contimport { openComposition, createIframePreviewAdapter } from "@hyperframes/sdk";const iframe = document.querySelector<HTMLIFrameElement>("#preview-frame")!;-let comp: Awaited<ReturnType<typeof openComposition>>;-const preview = createIframePreviewAdapter(iframe, (op) => comp.dispatch(op));+// Optional, and dispatched with `?.` — the callback cannot fire before+// openComposition() resolves, but strict TypeScript cannot prove that and+// rejects a definite `let` captured before assignment (TS2454).+let comp: Awaited<ReturnType<typeof openComposition>> | undefined;+const preview = createIframePreviewAdapter(iframe, (op) => comp?.dispatch(op));comp = await openComposition(html, { preview });// Hit-test at pointer positiondiff --git a/docs/sdk/reference/composition.mdx b/docs/sdk/reference/composition.mdxindex 08983e5892..9dccfdb1d6 100644--- a/docs/sdk/reference/composition.mdx+++ b/docs/sdk/reference/composition.mdx@@ -628,6 +628,8 @@ comp.on("selectionchange", (ids) => {Fires after every committed change with a `PatchEvent` containing RFC 6902 forward and inverse patches, the `origin`, and semantic `opTypes`. Use this to mirror edits into a host history stack, collaboration layer, or audit log.```typescript+import { ORIGIN_APPLY_PATCHES } from "@hyperframes/sdk";+comp.on("patch", ({ patches, inversePatches, origin, opTypes }) => {if (origin !== ORIGIN_APPLY_PATCHES) {hostHistory.push({ patches, inversePatches });diff --git a/docs/sdk/reference/open-composition.mdx b/docs/sdk/reference/open-composition.mdxindex f7de91d9b6..880a472e31 100644--- a/docs/sdk/reference/open-composition.mdx+++ b/docs/sdk/reference/open-composition.mdx@@ -6,7 +6,7 @@ description: "Open a composition HTML string for editing. Returns a Composition`openComposition` is the single entry point for every SDK session. It parses the composition HTML, stamps stable `hf-id` attributes on any elements that lack them, and returns a [`Composition`](/sdk/reference/composition) ready to receive edits.```typescript-import { openComposition, ORIGIN_APPLY_PATCHES } from "@hyperframes/sdk";+import { openComposition } from "@hyperframes/sdk";const comp = await openComposition(html, opts?);```@@ -118,6 +118,8 @@ comp.dispose();### Embedded mode with overrides```typescript+import { ORIGIN_APPLY_PATCHES } from "@hyperframes/sdk";+import { openComposition } from "@hyperframes/sdk";// Stored override delta for one customerdiff --git a/docs/sdk/reference/types.mdx b/docs/sdk/reference/types.mdxindex f9e29d5d7a..efeaf8ca7e 100644--- a/docs/sdk/reference/types.mdx+++ b/docs/sdk/reference/types.mdx@@ -3,7 +3,7 @@ title: "Types"description: "All exported types from @hyperframes/sdk."----This page documents every type exported from `@hyperframes/sdk`. Types are verified against `packages/sdk/src/types.ts` and the export barrel at `packages/sdk/src/index.ts`.+This page documents the core types exported from `@hyperframes/sdk`, verified against `packages/sdk/src/types.ts` and the export barrel at `packages/sdk/src/index.ts`. Adapter, history, and persistence types live with the APIs that take them — see [Adapters](/sdk/reference/adapters), [Utilities](/sdk/reference/utilities), [Composition](/sdk/reference/composition), and [openComposition](/sdk/reference/open-composition).See also: [`Composition`](/sdk/reference/composition) for the main session interface, [`Edit Operations`](/sdk/reference/edit-operations) for the `EditOp` catalog.@@ -677,6 +677,33 @@ title.setTiming({ start: 0.5, duration: 3 });---+## CompositionVariableType++```typescript+type CompositionVariableType =+ | "string" | "number" | "color" | "boolean" | "enum" | "font" | "image";+```++The declared type of a composition variable. Re-exported from+`@hyperframes/parsers`; `VARIABLE_TYPES` is the matching runtime list, useful+for validators that need the set rather than the union.++## VariableUsageScan++```typescript+interface VariableUsageScan {+ usedIds: string[];+ scanIncomplete: boolean;+}+```++The result of statically scanning a composition's script for variable reads.+`usedIds` is in first-seen order. `scanIncomplete` is `true` when the script+reaches variables in a way the scan cannot resolve — computed keys, rest+spreads, the values object escaping into a call — or when it fails to parse;+`usedIds` is then a lower bound, not a complete list, so treat an unlisted id as+unknown rather than unused.+## ORIGIN_APPLY_PATCHES / ORIGIN_LOCAL```typescript