/**
* JQHTML Runtime Configuration
*
* Integration-level settings supplied by the host application (RSpade, Laravel,
* a bundler entry point) when jqhtml is loaded. Distinct from `jqhtml.debug`,
* which is a developer's interactive tracing switch: config here describes the
* ENVIRONMENT the app is running in, and jqhtml derives behaviour from it.
*
* jqhtml.init($, { mode: 'production' });
* jqhtml.configure({ mode: 'development' });
*
* Default mode is 'development', so an integration that passes nothing keeps
* every diagnostic. Production is always opt-in.
*/
export type Jqhtml_Mode = 'development' | 'production';
export interface Jqhtml_Config {
/** Environment the host app is running in. Sets defaults for every flag below. */
mode?: Jqhtml_Mode;
/**
* Warn when a component that fetches data is invoked with args that cannot be
* serialized into a cache key, and defines no cache_id() to compensate.
* Default: on in development, off in production.
*/
warn_uncacheable_args?: boolean;
/**
* Emit debug-only DOM attributes. Both of the ones jqhtml renders exist purely
* for DevTools legibility; the runtime reads neither.
*
* data-sid mirrors the scoped `id=":"` that $sid() resolves against
* data-cid mirrors the component's `_cid`, marking component boundaries
*
* Default: on in development, off in production.
*
* NOTE: the instruction processor also writes a TRANSIENT `data-cid` into the
* generated HTML string to correlate each node with its JS-side component data.
* That one is functional and is never suppressed - it is matched and removed
* during rendering, before the debug attribute above is ever written.
*/
debug_attributes?: boolean;
}
/**
* Apply integration configuration.
*
* `mode` resets every flag to that mode's defaults; any explicit flag in the
* same call then overrides it. Calling with only flags leaves the mode alone.
* Repeated calls merge.
*/
export declare function configure(config: Jqhtml_Config | undefined | null): void;
/** Current mode plus every resolved flag. */
export declare function get_config(): Jqhtml_Config & {
mode: Jqhtml_Mode;
};
/** True when debug-only DOM attributes (data-sid) should be emitted. */
export declare function debug_attributes_enabled(): boolean;
/** True when uncacheable-args warnings should be printed. */
export declare function warn_uncacheable_args_enabled(): boolean;
//# sourceMappingURL=config.d.ts.map