/** * vapor-chamber — IIFE variant: CORE * * Audience: server-rendered apps with sprinkled JS — Blade, Rails, Django, * .NET MVC, WordPress. The page already returns HTML; you need a command bus * to dispatch user actions to the backend (cart add, form submit, analytics). * * Surface: * • Command bus (sync + async) * • HTTP transport only (createHttpBridge) * • Lightweight plugins: logger, validator, debounce, throttle, retry, authGuard * • createApp() for one-line setup * • connect() — even shorter: HTTP + CSRF in a single call * * NOT in this variant (use `vapor-chamber.iife.js` if you need them): * • WebSocket / SSE transports — realtime infra is a different deployment shape * • persist / sync / history / optimistic — stateful plugins, niche for sprinkled JS * • mount() — DOM-coupled convenience * • Vapor custom elements — see `vapor-chamber-elements.iife.js` * * Variant contents are not stable across major versions until v2.0; see ROADMAP.md. */ import { createCommandBus, createAsyncCommandBus, type CommandBusOptions } from './command-bus'; import { logger, validator, debounce, throttle, authGuard, retry } from './plugins'; import { createHttpBridge, type HttpBridgeOptions } from './transports'; import type { AsyncPlugin, Plugin } from './command-bus'; export type CreateAppOptions = { transport?: AsyncPlugin; plugins?: Plugin[]; onMissing?: CommandBusOptions['onMissing']; }; declare function createApp(options?: CreateAppOptions): { bus: import("./command-bus").AsyncCommandBus; dispatch: (action: A, target: any, payload?: any, options?: import("./command-bus").DispatchOptions) => Promise>; }; /** * connect — one-line setup for the sprinkled-JS audience. * * Equivalent to: * createApp({ transport: createHttpBridge({ endpoint, csrf: true, ...rest }) }) * * @example * */ declare function connect(options: HttpBridgeOptions & { plugins?: Plugin[]; onMissing?: CommandBusOptions['onMissing']; }): { bus: import("./command-bus").AsyncCommandBus; dispatch: (action: A, target: any, payload?: any, options?: import("./command-bus").DispatchOptions) => Promise>; }; declare const VaporChamber: { readonly createCommandBus: typeof createCommandBus; readonly createAsyncCommandBus: typeof createAsyncCommandBus; readonly createApp: typeof createApp; readonly connect: typeof connect; readonly http: typeof createHttpBridge; readonly logger: typeof logger; readonly validator: typeof validator; readonly debounce: typeof debounce; readonly throttle: typeof throttle; readonly authGuard: typeof authGuard; readonly retry: typeof retry; }; export default VaporChamber; //# sourceMappingURL=iife-core.d.ts.map