UNPKG

@persona/layout-editor-remote-module

Version:

Shared manifest format, Vite plugin, and host/iframe bridge for remotely-defined dashboard layout modules in Persona dashboard apps.

27 lines (25 loc) • 1.28 kB
import { n as LayoutModuleEntry, r as defineLayoutModule, t as LayoutModuleDefinitionInput } from "./define-BnDRhao0.mjs"; import { Plugin } from "vite"; //#region src/vite-plugin.d.ts interface PersonaLayoutModulesOptions { /** * Where the manifest document is emitted, relative to the site root — must * include the full JSON file name (e.g. `/manifests/my-app.json`), not just * a directory. Defaults to `DEFAULT_MANIFEST_PATH` (exported from the * package's `.` entry). A leading `/` is optional and stripped if present; * either form resolves to the same path. */ manifestPath?: string; /** Every module this app registers — passed directly, not discovered. */ modules: LayoutModuleDefinitionInput[]; } /** * Vite plugin that ensures declared module documents are built/served and * emits a `RemoteModuleRegistrationManifestV1[]` document for the host. * * Modules are configured directly here, not discovered by globbing the * source tree — a module IS whatever's in `options.modules`, full stop. */ declare function personaLayoutModules(options: PersonaLayoutModulesOptions): Plugin; //#endregion export { type LayoutModuleDefinitionInput, type LayoutModuleEntry, PersonaLayoutModulesOptions, defineLayoutModule, personaLayoutModules };