import { type Readable } from 'svelte/store'; type UserContextEntry = Record; type UserContext = Record; type SetThrelteUserContextOptions = { existing: 'merge' | 'replace' | 'skip'; }; /** * ### `useThrelteUserContext` * * The `UserContext` is a store scoped to the context of your root `` component and can be used to * store and retrieve arbitrary data from anywhere in the Threlte app. * Because it's scoped, it's especially interesting for authoring reusable components and inter-component communication. * * `useThrelteUserContext` can set and get the user context store. * * ### Get the user context store * * If no `namespace` is provided, the whole user context store is returned. * * ```svelte * * ``` * * If a `namespace` is provided, the hook returns a derived store. * * ```svelte * * ``` * * ### Set the user context store * * ```svelte * * ``` * * By default, when a context is set at a given namespace, setting it again will be ignored. * You can override this behaviour: * * ```svelte * * ``` */ export declare function useThrelteUserContext(): Readable; export declare function useThrelteUserContext(namespace: string): Readable; export declare function useThrelteUserContext(namespace: string, value: UCT | (() => UCT), options?: SetThrelteUserContextOptions): UCT; export {};