@page-engine/renderer-adapter-vue3
v0.4.0
Published
Vue 3 renderer adapter implementing the PageEngine TrustedRendererHandle ABI.
Readme
@page-engine/renderer-adapter-vue3
Vue 3 renderer adapter for the PageEngine declarative front-end engine.
Implements the TrustedRendererHandle ABI from
@page-engine/page-runtime-browser (type-only dependency) so Vue 3
components can serve as PageEngine renderers. Renderer assets produced
through this adapter stay light-DOM and framework-agnostic from the engine's
perspective: the engine never imports Vue, your bundle does.
Install
npm install @page-engine/renderer-adapter-vue3Vue is a peer dependency (>=3.4 <4). Requires Node >= 22.12 for tooling;
the adapter runs in the browser. ESM only.
Minimal example
import { defineComponent, h } from "vue";
import { createVueRenderer } from "@page-engine/renderer-adapter-vue3";
const implementation = createVueRenderer("page-hello", defineComponent({
props: { input: { type: Object, required: true } },
render() { return h("section", JSON.stringify(this.input)); },
}));
implementation.registerElement();
const handle = implementation.createHandle();The custom element defined by createVueRenderer stays light-DOM: the
engine attaches it and calls handle.render with
{ config, data, viewState }; Vue lives entirely inside your component.
Global plugins (e.g. a component library) can be installed through the
optional configureApp hook. See the monorepo adapter tests
(packages/renderer-adapter-vue3/test) for complete working examples.
