@nebuladocs/controller
v0.2.0
Published
Framework-neutral PDF editor controller: lifecycle, commands, and events shared by the React and Angular adapters
Readme
@nebuladocs/controller
The framework-neutral PdfEditorController — the shared brain of the NebulaDocs
editor. It owns the document store, PDF sources, load/import/export/print
lifecycle and every editing primitive, and exposes a typed event surface
(controller.on(...)). Both the React and Angular wrappers are thin adapters
over this controller, so their behaviour is identical.
import { PdfEditorController } from "@nebuladocs/controller";
const controller = new PdfEditorController({ workerSrc });
controller.on("change", ({ revision }) => { /* … */ });
await controller.load(file);
await controller.exportBlob();Also exports the shared command/menu layer (createCommandHandlers,
buildMenuNodes) used by both wrappers. Depends on @nebuladocs/core and
@nebuladocs/engine; no framework dependency.
Proprietary — see LICENSE.
