@intentic/extension-ui
v1.317.0
Published
The UI kit intentic extensions render with, host-provided at runtime (the app's own components via the import map), so extension UI is always native to the shell
Readme
extension-ui
The UI kit extensions render with: a curated slice of the editor's design system that the host supplies at runtime, so extension views use the shell's own component instances.
flowchart LR
ui["_editor/ui<br/>design system"] -- "re-exported by src/" --> kit(["extension-ui"])
kit -- "compiled into" --> host["Editor<br/>hostModules.ts"]
bundle["Extension bundle"] -- "import map" --> shim["/ext-shims/extension-ui.js"]
shim -- "globalThis.__intenticHost" --> hostsrc/index.tsre-exports chosen components and helpers from@intentic/ui(_editor/ui) plus the PrimeVue primitives extension views use. Nothing is reimplemented, so an extension view looks and behaves like the shell around it. This dependency on_editor/uiis a recorded exception to the_shared/boundary.- At runtime the host supplies the kit:
hostModules.tspublishes the editor's own module instances onglobalThis.__intenticHost, and the import map in the editor'sindex.htmlresolves@intentic/extension-uito a shim that reads them. A second copy would render unthemed, outside the app's reactivity and its query cache. scripts/build.mjscompiles the published package from_editor/ui's sources: declarations pruned to what the kit re-exports, and adist/index.jsbridge that throws when loaded outside an intentic host.names.mjslists the runtime export names by hand, because the.vuegraph cannot load in Node. The editor's shim generator reads it, and a dev-time assertion inhostModules.tscatches drift../diff,./format,./i18nand./workerskip the component barrel, for extension tests that run without a Vue compiler../workeris also what a worker module importsserveWorkerCallfrom. A worker has no host bridge, so an extension built outside this repository bundles that module into its worker instead of marking it external.
Key files
- src/index.ts — the kit: every name an extension may import, with usage notes.
- scripts/build.mjs — builds the published types and the host bridge from
_editor/ui. - names.mjs — the runtime export names the shims and the host check read.
- ../../_editor/web/src/extension-host/hostModules.ts — where the shell publishes its instances to extension bundles.
Commands
pnpm --filter @intentic/extension-ui build