/** * Component context injection API — `inject` / `injectStrict` / `provide` / `createContext`. * * Context values are stored on the providing element via a WeakMap registry and * resolved by walking up the DOM tree (including through shadow boundaries). * Providing is done via `provide(key, value)` inside `setup()`. * * Keys are `Symbol.for`-based (see `createContext`) so provide/inject still match * across a duplicated module graph — the same cross-copy survival rule as the * object brands in `utils/brand.ts`. */ export type InjectionKey = symbol & { readonly __ore_injection_key?: T; }; /** * Register a context value on the current component's host element, making it * available to descendant components via `inject(key)`. * * Provide a `Readable` (signal/computed) rather than a raw value if descendants * need to observe later changes — `inject()` resolves and caches the value once * per consumer, so re-calling `provide()` with a new raw value later is not seen. */ export declare const provide: (key: InjectionKey, value: T) => void; export declare function inject(key: InjectionKey): T | undefined; export declare function inject(key: InjectionKey, fallback: T): T; export declare const injectStrict: (key: InjectionKey) => T; /** * Create a typed context key. `Symbol.for`-keyed (`ore:context:`) so * a provider and an injector loaded from two bundled copies of ore still match * (see module header). Two `createContext('theme')` calls intentionally produce * the same key — use distinct descriptions for distinct contexts. * * Always pass a description: anonymous keys are minted from a per-graph counter, * so they do NOT survive duplicated module graphs (each copy numbers its own). */ export declare function createContext(description?: string): InjectionKey; //# sourceMappingURL=context.d.ts.map