@q9labsai/chalk-whiteboard
v5.4.1
Published
Readme
@q9labsai/chalk-whiteboard
Reusable Chalk whiteboard behavior for SDKs and first-party applications.
@q9labsai/chalk-whiteboardexports framework-neutral whiteboard contracts.@q9labsai/chalk-whiteboard/collabexports the Excalidraw collaboration and file synchronization engine.@q9labsai/chalk-whiteboard/reactexportsWhiteboardCanvas, math authoring, and React-facing whiteboard types.@q9labsai/chalk-whiteboard/embeddedexports the versioned native bridge,ChalkWhiteboardController, and the compatibility manifest used by mobile hosts.
WhiteboardCanvas owns Excalidraw loading, collaboration lifecycle, cursor and
scene updates, file synchronization, and math elements. Its classNames and
icons props let each surface provide presentation without reimplementing that
behavior. @q9labsai/chalk-react supplies Chalk's styled WhiteboardView as a
thin wrapper around this component.
The embedded build is generated by pnpm run build:embedded. It produces a
self-contained dist/embedded/chalk-whiteboard directory with Excalidraw
0.18.1, its fonts, MathJax, license notices, a content-security policy, and
SHA-256 asset metadata. The renderer is offline-only. Authentication
credentials, Sync tokens, storage signatures, and signed URLs remain in the
native JavaScript host and are never posted into renderer JavaScript.
The native bridge uses exact build, protocol, renderer-generation, and
scene-generation checks. Messages are strictly decoded and bounded to 32 MiB,
duplicate message IDs are ignored, and a reload requests a canonical snapshot
instead of trusting renderer state. Documents containing a required element
type outside packages/whiteboard/src/embedded/compatibility-manifest.json open read-only with an
“Update required” message.
The canonical whiteboard-v1 transport keeps the existing 128-element and
256-KiB per-frame limits, then carries larger logical updates as atomic
multipart operations. A logical update can contain at most 10,000 elements,
128 parts, and 16 MiB of encoded frames. Incomplete inbound operations are
never exposed to the renderer and recover by requesting a new snapshot after
10 seconds.
