@openexam/sdk-widget
v0.1.0
Published
Declarative-render protocol + browser host runtime for OpenExam widgets (ADR-009 Layer 4).
Readme
@openexam/sdk-widget
The declarative-render protocol and browser host runtime that realizes ADR-009 Layer 4 ("SES Compartment + declarative render protocol").
Two entry points:
@openexam/sdk-widget— VDOM types + theWidgetMountModulecontract that addons implement. Type-only at runtime; safe to import from inside a Compartment-targeted bundle (no DOM usage).@openexam/sdk-widget/host— the browser-side runtime. Locks down the realm with SES, defines a single<oe-widget>custom element, and on mount creates a per-elementCompartment, imports the addon's web module into it, and applies the addon's rendered VDOM into the element's Shadow DOM.
The host serves a tiny, capability-restricted API (render,
responseChanged) into each Compartment. Addons cannot reach
document, window, fetch, localStorage, cookies, or any
other global surface.
License: Apache-2.0. See the canonical text at the repo root.
