import { a as stable, i as StableDeps, n as Stable, r as StableDependency, t as Primitive } from "./core-DN1BZm7Y.mjs"; import { t as CheckedDeps } from "./strict-deps-C8RGmSxZ.mjs"; import * as Preact from "preact"; import { Context } from "preact"; import * as PreactHooks from "preact/hooks"; //#region src/preact-context.d.ts /** A Preact context whose provider only accepts stable values. */ type StableContext = Context>; /** Create a Preact context whose Provider rejects unbranded reference values. */ declare function createStableContext(defaultValue: Stable): StableContext; //#endregion //#region src/preact-hooks.d.ts type Dispatch = (value: A) => void; type StateUpdater = S | ((previousState: S) => S); type EffectCallback = () => void | (() => void); type StrictEffectHook = { (effect: EffectCallback): void; (effect: EffectCallback, inputs: undefined): void; (effect: EffectCallback, inputs: CheckedDeps): void; }; type StrictImperativeHandle = { (ref: Preact.Ref, create: () => R): void; (ref: Preact.Ref, create: () => R, inputs: undefined): void; (ref: Preact.Ref, create: () => R, inputs: CheckedDeps): void; }; declare const useMemo: (factory: () => T, inputs: CheckedDeps) => Stable; declare const useCallback: any, const D extends readonly unknown[]>(callback: F, inputs: CheckedDeps) => Stable; declare const useEffect: StrictEffectHook; declare const useLayoutEffect: StrictEffectHook; declare const useImperativeHandle: StrictImperativeHandle; type StrictStateHook = { (initialState: S | (() => S)): [Stable, Stable>>]; (): [Stable, Stable>>]; }; declare const useState: StrictStateHook; type StrictReducerHook = { (reducer: PreactHooks.Reducer, initialState: S): [Stable, Stable>]; (reducer: PreactHooks.Reducer, initialArg: I, init: (arg: I) => S): [Stable, Stable>]; }; declare const useReducer: StrictReducerHook; type StrictRefHook = { (initialValue: T): Stable<{ current: T; }>; (initialValue: T | null): Stable>; (): Stable<{ current: T | undefined; }>; }; declare const useRef: StrictRefHook; //#endregion export { type Primitive, type Stable, type StableContext, type StableDependency, type StableDeps, createStableContext, stable, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState };