import MagicString from 'magic-string'; /** * Prefix for this plugin's virtual module ids. Rewritten specifiers carry * the `\0` convention directly in the transformed source; Vite's * import-analysis resolves them through our `resolveId` and encodes the * `\0` for the browser, so it never reaches the network. */ export declare const VIRTUAL_PREFIX = "\0lit-plugin:"; /** Virtual module that installs the define interceptor. */ export declare const INSTALL_ID = "\0lit-plugin:install"; /** * A module needs the define interceptor + self-accept if it registers * custom elements: a textual `customElements.define(` call, or — only when * a lit-family import is present — a `customElement(` decorator call (the * decorator runtime call stays textually present after TS transpilation). */ export declare const isComponentModule: (code: string, hasLitFamilyImport: boolean) => boolean; export interface LitPluginTransformResult { code: string; map: ReturnType; } /** * The whole dev transform, as a pure function of the module source: * * - Pass 1 (all user modules — shared template-partial modules must intern * too): rewrite import/export-from/dynamic-import specifiers found in the * wrap table to their `\0lit-plugin:` wrapper module. * - Pass 2 (component modules): prepend the interceptor install import * (static imports hoist, so the interceptor is installed before this * module's defines) and append a self-accept (re-execution alone triggers * the define interceptor — no hotUpdate hook needed). * * Returns `null` when the module needs no changes. */ export declare const transformLitModule: (code: string) => Promise; //# sourceMappingURL=transform.d.ts.map