@whfzgyx/ojo-canvas-sdk
v0.3.18
Published
Pure OJO Canvas browser SDK.
Downloads
8,331
Readme
@whfzgyx/ojo-canvas-sdk
Pure OJO Canvas browser SDK.
Usage
import { mountOjoCanvas } from "@whfzgyx/ojo-canvas-sdk";
import { createHttpProvider } from "@whfzgyx/ojo-canvas-sdk/providers/http";
const mount = await mountOjoCanvas({
container: document.getElementById("canvas")!,
projectId: "project-id",
providers: createHttpProvider({ baseUrl: "/api/ojo" }),
});
mount.dispose();Package Shape
dist/runtime: mount API plus the internal runtime bundle.dist/providers: optional provider adapters.dist/manifest.json: package contract.
The SDK mounts directly into the caller-provided DOM container. It does not publish widget or standalone HTML shells, and callers do not configure runtime asset URLs.
Commands
npm run build
npm test
npm run pack:check
npm run publish:npm