import type { TungstenElement } from './TungstenElement.js'; import type { Instance } from './Instance/Instance.js'; import type { DomRegion } from './DomRegion.js'; import type { AnyComponent } from './AnyComponent.js'; import type { ContentFunctionStatic, ContentFunctionStateful } from './ContentFunction.js'; import type { RouteParams } from './routing/RouteParams.type.js'; import type { RouteData } from './routing/RouteData.js'; import type { ContentNode } from './ContentNode.js'; import type { CssNames } from './CssNames.js'; export type TungstenComponentDefaultProps = { routeParams?: RouteParams; routeData?: RouteData; children?: ContentNode; }; export type TungstenComponentGenericProps = { children?: ContentNode; routeParams?: RouteParams; routeData?: RouteData; [key: string]: unknown; }; export type TungstenComponentPropsBase = object; export type TungstenComponentStandardProps = { children?: ContentNode; routeParams?: RouteParams; routeData?: RouteData; [key: string]: unknown; }; export type TungstenComponentStateConstraint = object; export type TungstenComponentSignalsConstraint = object; export type TungstenComponentGenericState = { [key: string]: unknown; }; export type TungstenComponentStoreConstraint = object; export type ReactiveAction = (...args: unknown[]) => any; export type ReactiveDeps = any[]; export type ReactiveSets = any[]; export type Reactive = { action: ReactiveAction; sets: ReactiveSets; }; export type ConstructPackage = { props: Props; routeParams: RouteParams | undefined; routeData: RouteData; instance: Instance; parentElement: TungstenElement | null; }; export type TungstenBaseComponentType = { new (pkg: ConstructPackage): TungstenBaseComponent; tagName?: string; displayName?: string; render?: ComponentRenderInfo; }; export type TungstenSimpleComponentType = { new (pkg: ConstructPackage): TungstenSimpleComponent; tagName?: string; displayName?: string; }; export type TungstenStatefulComponentType = { new (pkg: ConstructPackage): TungstenStatefulComponent; tagName?: string; displayName?: string; }; export type TungstenBaseStoreComponentType = { new (pkg: ConstructPackage): TungstenBaseStoreComponent; tagName?: string; displayName?: string; }; export declare abstract class TungstenBaseComponent { #private; __testing_tci: number; __instance: Instance; __domRegion?: DomRegion; parentComponent: AnyComponent | null; childComponents: AnyComponent[]; props: Props; routeParams?: RouteParams | undefined; routeData: RouteData; storeData?: Record; abstract __init: (() => void); abstract init?: ((props: Props, state: any) => void) | ((props: Props) => void) | (() => void); abstract clientInit?: ((props: Props, state: any) => void) | ((props: Props) => void) | (() => void); abstract serverInit?: ((props: Props, state: any) => void) | ((props: Props) => void) | (() => void); title?: string | number | ((props: Props, state: any) => string) | ((props: Props) => any) | (() => any); style?: CssNames; __queuedUpdateHandle?: NodeJS.Timeout; __initialized: boolean; __currentContent: RenderedContentNode | $ContentNull; protected __dead: boolean; content?: ContentFunctionStateful; render?: ContentFunctionStateful; abstract __initialContent: () => Promise; abstract __handleTitle: () => void; abstract __content: () => Promise; abstract __styledContent: () => Promise; abstract __update: () => Promise; abstract __updateAndReturnContent: () => Promise<{ content: ContentNode; complete: () => void; }>; componentDidMount?: () => void; _mounted?: () => void; componentDidHydrate?: () => void; _hydrated?: () => void; abstract componentDidUpdate?: ((prevProps: Props, state: any) => any) | ((prevProps: Props) => any) | (() => any); abstract _updated?: ((prevProps: Props, state: any) => any) | ((prevProps: Props) => any) | (() => any); abstract componentDidRender?: ((prevProps: Props, state: any) => any) | ((prevProps: Props) => any) | (() => any); abstract _rendered?: ((prevProps: Props, state: any) => any) | ((prevProps: Props) => any) | (() => any); componentWillUnmount?: () => void; _deleting?: () => void; componentDidUnmount?: () => void; _deleted?: () => void; shouldStoreComponentUpdate?: (key: Key, data: unknown) => boolean; static tagName?: string; static displayName?: string; constructor(pkg: ConstructPackage); get globalData(): GlobalData; __queueUpdate: () => void; triggerUpdate: () => Promise; reactive: (code: any) => void; __didMount: () => void; __didHydrate: () => void; abstract __didUpdate: () => void; abstract __didRender: () => void; __delete: any; __deleted: () => void; delayed: (func: Function, delay?: number) => number; pickProps: (...keys: Key[]) => Pick extends infer T ? { [K in keyof T]: T[K]; } : never; __disposables?: Set; using: (d: D, callback?: (disposable: D) => void) => D; } export declare abstract class TungstenSimpleComponent extends TungstenBaseComponent { state?: never; init?: ((props: Props) => void) | (() => void); clientInit?: ((props: Props) => void) | (() => void); serverInit?: ((props: Props) => void) | (() => void); title?: string | number | ((props: Props) => any) | (() => any); abstract content: ContentFunctionStatic; render?: ContentFunctionStatic; componentDidUpdate?: ((prevProps: Props) => any) | (() => any); _updated?: ((prevProps: Props) => any) | (() => any); componentDidRender?: ((prevProps: Props) => any) | (() => any); _rendered?: ((prevProps: Props) => any) | (() => any); __init: () => Promise; __initialContent: () => Promise; __update: () => Promise; __updateAndReturnContent: () => Promise<{ content: ContentNode; complete: () => void; }>; __newUpdateCompleted: (props: Props) => void; __handleTitle: () => void; __content: () => Promise; __styledContent: () => Promise; __didUpdate: () => void; __didRender: () => void; } export declare abstract class TungstenComponent extends TungstenBaseComponent { state?: State; init?: ((props: Props, state: State) => void) | ((props: Props) => void) | (() => void); clientInit?: ((props: Props, state: State) => void) | ((props: Props) => void) | (() => void); serverInit?: ((props: Props, state: State) => void) | ((props: Props) => void) | (() => void); title?: string | number | ((props: Props, state: State) => string) | ((props: Props) => string) | (() => string); content?: ContentFunctionStateful; render?: ContentFunctionStateful; componentDidUpdate?: ((prevProps: Props, prevState: State) => void) | ((prevProps: Props) => void) | (() => void); _updated?: ((prevProps: Props, prevState: State) => void) | ((prevProps: Props) => void) | (() => void); componentDidRender?: ((prevProps: Props, prevState: State) => void) | ((prevProps: Props) => void) | (() => void); _rendered?: ((prevProps: Props, prevState: State) => void) | ((prevProps: Props) => void) | (() => void); static tagName?: string; static displayName?: string; constructor(pkg: ConstructPackage); __init: () => void; __initialContent: () => Promise; __update: () => Promise; __handleTitle: () => void; setState: (stateUpdates: State) => void; __doSetState: (stateUpdates: State) => void; __stateUpdated: () => void; __stateCopy: (item: unknown) => unknown; __content: () => Promise; __styledContent: () => Promise; } export declare abstract class TungstenStatefulComponent extends TungstenBaseComponent { abstract state: State; init?: ((props: Props, state: State) => void) | ((props: Props) => void) | (() => void); clientInit?: ((props: Props, state: State) => void) | ((props: Props) => void) | (() => void); serverInit?: ((props: Props, state: State) => void) | ((props: Props) => void) | (() => void); title?: string | number | ((props: Props, state: State) => string) | ((props: Props) => string) | (() => string); abstract content: ContentFunctionStateful; render?: ContentFunctionStateful; componentDidUpdate?: ((prevProps: Props, prevState: State) => void) | ((prevProps: Props) => void) | (() => void); _updated?: ((prevProps: Props, prevState: State) => void) | ((prevProps: Props) => void) | (() => void); componentDidRender?: ((prevProps: Props, prevState: State) => void) | ((prevProps: Props) => void) | (() => void); _rendered?: ((prevProps: Props, prevState: State) => void) | ((prevProps: Props) => void) | (() => void); static tagName?: string; static displayName?: string; constructor(pkg: ConstructPackage); __init: () => Promise; __initialContent: () => Promise; __update: () => Promise; __updateAndReturnContent: () => Promise<{ content: ContentNode; complete: () => void; }>; __newUpdateCompleted: (props: Props, state: State) => void; __handleTitle: () => void; setState: (stateUpdates: State) => void; __doSetState: (stateUpdates: State) => void; __stateUpdated: () => void; __stateCopy: (item: unknown) => unknown; __content: () => Promise; __styledContent: () => Promise; __didUpdate: () => void; __didRender: () => void; pickState: (...keys: Key[]) => Pick extends infer T ? { [K in keyof T]: T[K]; } : never; } import type { TrueStore } from './Store/makeStore.js'; import type { Prettify } from '../types/helpers.js'; import type { Key } from './Key.js'; import type { GlobalData } from './routing/registerGlobalData.js'; import { type $ContentNull } from './symbols.js'; import { RenderedContentNode } from './RenderedContentNode.js'; import { UpdateResult } from './update/UpdateResult.js'; import { InternalStoreSchema } from './Store/InternalStoreSchema.js'; import { ComponentRenderInfo } from './ComponentRenderInfo.type.js'; export type ComponentStore = { [Property in keyof Schema]: { readonly get: () => Schema[Property]; readonly set: (value: Schema[Property]) => void; readonly subscribe: () => void; readonly unsubscribe: () => void; readonly sync: () => Schema[Property]; }; }; export type ComponentStoreWithTrueStore = ComponentStore & { __trueStore: TrueStore; }; export declare function __proxyStore(this: TungstenBaseStoreComponent, store: TrueStore): Prettify>; export declare abstract class TungstenBaseStoreComponent extends TungstenBaseComponent { abstract store: ComponentStore; constructor(pkg: ConstructPackage); __proxyStore: typeof __proxyStore; __delete: () => void; } export declare abstract class TungstenBaseSimpleStoreComponent extends TungstenSimpleComponent { abstract store: ComponentStore; constructor(pkg: ConstructPackage); __proxyStore: typeof __proxyStore; __delete: () => void; } export declare abstract class TungstenBaseStatefulStoreComponent extends TungstenStatefulComponent { abstract store: ComponentStore; constructor(pkg: ConstructPackage); __proxyStore: typeof __proxyStore; __delete: () => void; } export declare abstract class TungstenSimpleInternalStoreComponent extends TungstenBaseSimpleStoreComponent { store: ComponentStore; } export declare abstract class TungstenStatefulInternalStoreComponent extends TungstenBaseStatefulStoreComponent { store: ComponentStore; } //# sourceMappingURL=Components.d.ts.map