export { registry } from './registry'; /** Handle returned by {@link mount}. */ export interface BladeApp { /** Re-scan the root and mount any newly-added, not-yet-mounted markup. */ refresh(): void; /** Disconnect the observer and destroy every controller this app mounted. */ unmount(): void; } /** A DOM root that can be scanned for `data-c42-*` markup. */ export type MountRoot = Document | HTMLElement; /** * Auto-mount every `@42/core` controller in the {@link registry} onto matching * `data-c42-*` markup found under `root`. * * A `MutationObserver` keeps the tree in sync: nodes added later are mounted and * removed nodes have their controllers destroyed. Mounting is idempotent — an * element already carrying `data-c42-mounted` is never wrapped twice — so * calling `mount()` again or invoking `refresh()` is safe. * * @example * import { mount } from '@42/blade'; * const app = mount(); * // later: app.refresh() / app.unmount() */ export declare function mount(root?: MountRoot): BladeApp;