@dvcol/neo-svelte
Version:
Neomorphic ui library for svelte 5
31 lines (30 loc) • 1.45 kB
TypeScript
import type { INeoThemeProviderContext } from './neo-theme-provider.model.js';
type NeoThemeProviderRoot = INeoThemeProviderContext['root'] | (() => INeoThemeProviderContext['root']);
export type NeoThemeProviderContextState = Partial<Omit<INeoThemeProviderContext, 'root'>> & {
root?: NeoThemeProviderRoot;
};
export declare class NeoThemeProviderContext implements INeoThemeProviderContext {
#private;
get reset(): boolean | undefined;
get theme(): import("./neo-theme-provider.model.js").NeoThemes;
get source(): import("./neo-theme-provider.model.js").NeoSources;
get remember(): boolean;
get root(): HTMLElement | ShadowRoot | undefined;
get state(): {
reset: boolean | undefined;
theme: import("./neo-theme-provider.model.js").NeoThemes;
source: import("./neo-theme-provider.model.js").NeoSources;
remember: boolean;
root: HTMLElement | ShadowRoot | undefined;
};
constructor({ reset, theme, source, remember, root }: NeoThemeProviderContextState);
update(partial: Partial<NeoThemeProviderContextState>): void;
private setTheme;
private setSource;
sync(): void;
destroy(): void;
}
export declare function setNeoThemeContext(context: NeoThemeProviderContextState): NeoThemeProviderContext;
export declare const getNeoThemeContext: () => NeoThemeProviderContext;
export declare function useNeoThemeContext(): NeoThemeProviderContext;
export {};