declare const DREAMLAND: unique symbol; declare const NO_CHANGE: unique symbol; declare const COMMA_TOKEN: unique symbol; declare const TOPRIMITIVE: typeof Symbol.toPrimitive; type Stateful = T & { readonly [COMMA_TOKEN]: unique symbol; }; declare let createState: (target: T) => Stateful; declare let stateListen: (state: Stateful, func: (newValue: any, prop: string | symbol) => void) => void; declare let stateProxy: (state: Stateful, key: Key, ptr: Pointer) => void; declare class Pointer { get value(): T; set value(val: T); [DREAMLAND](): ReadonlyArray> | null; [TOPRIMITIVE](): symbol; listen(func: (val: T) => void): void; zip>>(...pointers: Ptrs): Pointer<[ T, ...{ [Idx in keyof Ptrs]: Ptrs[Idx] extends Pointer ? Val : never; } ]>; andThen(then: True, otherwise?: False): Pointer<(True extends (val: T) => infer TR ? TR : True) | (False extends (val: T) => infer FR ? FR : False)>; map(func: (val: T) => U): Pointer; map(func: (val: T) => U, reverse: (val: U) => T): Pointer; mapEach(this: Pointer>, func: (val: U, i: number) => R): Pointer; } declare global { function use(stateful: T): Pointer; function use(...statefuls: T): Pointer; function use(template: TemplateStringsArray, ...params: any[]): Pointer; } type StoreSyncBacking = { read: (ident: string) => string | null; write: (ident: string, data: string) => void; }; type StoreAsyncBacking = { read: (ident: string) => Promise; write: (ident: string, data: string) => Promise; }; declare function _createStore(target: T, options: { ident: string; backing: StoreAsyncBacking; autosave: "auto" | "manual" | "beforeunload"; }): Promise>; declare function _createStore(target: T, options: { ident: string; backing: "localstorage" | StoreSyncBacking; autosave: "auto" | "manual" | "beforeunload"; }): Stateful; declare let createStore: typeof _createStore; declare let saveAllStores: () => void; type Delegate = { listen: (callback: (value: T) => void) => void; (value: T): void; }; declare let createDelegate: () => Delegate; type ComponentChild = Node | string | number | boolean | null | undefined | ComponentChild[] | Pointer; type ComponentContext = { state: Stateful; root: HTMLElement; children: ComponentChild[]; id?: string; mount?: () => void; init?: () => void; }; type MappedProps = { [Key in keyof Props]: Props[Key] | Pointer; }; type Empty = Record; type Component = { (this: Stateful>, cx: ComponentContext): HTMLElement; style?: CssInit; }; type StateObj = { [P in keyof (Props & Private & Public) as Exclude]: (Props & Private & Public)[P]; }; type ComponentStateObj> = T extends Component ? StateObj : never; type ComponentState> = Stateful>; type ComponentInstance> = DLElement>; type DLElement = HTMLElement & { $: ComponentContext; }; type IntrinsicProps = { this?: Pointer; children?: any; [key: `class:${string}`]: Pointer | boolean; [key: `on:${string}`]: (e: any) => void; [key: string]: any; }; type DLElementTagNames = HTMLElementTagNameMap & HTMLElementDeprecatedTagNameMap & Pick>; type DLElementNameToElement = T extends keyof DLElementTagNames ? DLElementTagNames[T] : HTMLElement; type GlobalElement = Element; declare namespace JSX { type IntrinsicElements = { [El in keyof DLElementTagNames]: IntrinsicProps; } & { [element: string]: IntrinsicProps; }; type ElementType = keyof IntrinsicElements | Component; type Element = HTMLElement; type LibraryManagedAttributes = C extends Component ? MappedProps : never; } type CssInit = { _strings: TemplateStringsArray; _funcs: (((state: any) => any) | string)[]; _rewrite: typeof _rewrite; }; declare let css: >(_strings: TemplateStringsArray, ..._funcs: (((state: ThisParameterType) => any) | string)[]) => CssInit; declare let _rewrite: (style: HTMLStyleElement, css: string, tag: string) => void; declare function _jsx>(init: T, props: Record | null, key?: string): ComponentInstance; declare function _jsx(init: T, props: Record | null, key?: string): DLElementNameToElement; declare function _h>(init: T, props: Record | null, ...children: ComponentChild[]): ComponentInstance; declare function _h(init: T, props: Record | null, ...children: ComponentChild[]): DLElementNameToElement; declare let h: typeof _h; declare let jsx: typeof _jsx; declare let Fragment: (cx: any) => any; type DomImpl = [ any, any, (text?: string) => any, (text?: string) => any, () => string, ((el: HTMLElement) => boolean) | undefined, (((init: Component, cx?: ComponentContext) => void) | undefined) ]; declare let setDomImpl: ([Doc, Node, New_Text, New_Comment, GenCssUid, Hydrating, SsrTransform,]: DomImpl) => void; declare let getDomImpl: () => DomImpl; export { DREAMLAND, Fragment, JSX, NO_CHANGE, Pointer, createDelegate, createState, createStore, css, getDomImpl, h, jsx, saveAllStores, setDomImpl, stateListen, stateProxy }; export type { Component, ComponentChild, ComponentContext, ComponentInstance, ComponentState, DLElement, DLElementNameToElement, Delegate, DomImpl, Stateful };