diff --git a/docs/docs.json b/docs/docs.json index 6048e8322..9e6829eb4 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -339,6 +339,41 @@ } ] }, + { + "tab": "SDK", + "groups": [ + { + "group": "Overview", + "pages": [ + "sdk/overview", + "sdk/quickstart" + ] + }, + { + "group": "Guides", + "pages": [ + "sdk/guides/querying-and-editing", + "sdk/guides/timing-and-animation", + "sdk/guides/undo-redo-and-patches", + "sdk/guides/persistence", + "sdk/guides/embedded-override-mode", + "sdk/guides/canvas-integration", + "sdk/guides/editing-affordances" + ] + }, + { + "group": "Reference", + "pages": [ + "sdk/reference/open-composition", + "sdk/reference/composition", + "sdk/reference/edit-operations", + "sdk/reference/types", + "sdk/reference/adapters", + "sdk/reference/utilities" + ] + } + ] + }, { "tab": "Reference", "groups": [ diff --git a/docs/packages/sdk.mdx b/docs/packages/sdk.mdx index df8b1ebfa..e6e11e565 100644 --- a/docs/packages/sdk.mdx +++ b/docs/packages/sdk.mdx @@ -29,6 +29,10 @@ npm install @hyperframes/sdk The SDK is the right layer for product integrations and agents that need structured edits. The CLI and Studio are user-facing tools built around the same composition format; the SDK is the editing engine you embed behind your own UI or automation. + + This page is the package overview. For the full API — guides and a complete reference for every method, operation, type, and adapter — see the [**SDK**](/sdk/overview) tab. + + ## Package Exports | Import | Description | diff --git a/docs/sdk/guides/canvas-integration.mdx b/docs/sdk/guides/canvas-integration.mdx new file mode 100644 index 000000000..e9d7bc57d --- /dev/null +++ b/docs/sdk/guides/canvas-integration.mdx @@ -0,0 +1,185 @@ +--- +title: "Canvas & Preview Integration" +description: "Connect a same-origin composition iframe to the SDK for hit-testing, draft preview, and selection." +--- + +The SDK's `PreviewAdapter` interface decouples the editing model from the visual surface. For browser-based editors, `createIframePreviewAdapter` bridges the SDK to a same-origin `