// Generated by dts-bundle-generator v9.5.1 declare global { namespace JSX { type GlobalHtmlAttributes = GlobalAttributes; type Element = VNode; interface ElementClass { props: TProps; } interface ElementAttributesProperty { props: TProps; } interface ElementChildrenAttribute { children: unknown; } interface IntrinsicAttributes { key?: string | number; } interface IntrinsicElements { nothing: Record; a: AAttributes; abbr: GlobalHtmlAttributes; address: GlobalHtmlAttributes; area: AreaAttributes; article: GlobalHtmlAttributes; aside: GlobalHtmlAttributes; audio: AudioAttributes; b: GlobalHtmlAttributes; bdi: GlobalHtmlAttributes; bdo: GlobalHtmlAttributes; blockquote: GlobalHtmlAttributes; br: GlobalHtmlAttributes; button: ButtonAttributes; canvas: CanvasAttributes; caption: GlobalHtmlAttributes; cite: GlobalHtmlAttributes; code: GlobalHtmlAttributes; col: ColAttributes; colgroup: ColGroupAttributes; data: GlobalHtmlAttributes; datalist: GlobalHtmlAttributes; dd: GlobalHtmlAttributes; del: DelAttributes; details: DetailsAttributes; dfn: GlobalHtmlAttributes; div: GlobalHtmlAttributes; dl: GlobalHtmlAttributes; dt: GlobalHtmlAttributes; em: GlobalHtmlAttributes; embed: EmbedAttributes; fieldset: FieldsetAttributes; figcaption: GlobalHtmlAttributes; figure: GlobalHtmlAttributes; footer: GlobalHtmlAttributes; form: FormAttributes; h1: GlobalHtmlAttributes; h2: GlobalHtmlAttributes; h3: GlobalHtmlAttributes; h4: GlobalHtmlAttributes; h5: GlobalHtmlAttributes; h6: GlobalHtmlAttributes; header: GlobalHtmlAttributes; hr: GlobalHtmlAttributes; i: GlobalHtmlAttributes; iframe: IframeAttributes; img: ImgAttributes; input: InputAttributes; ins: InsAttributes; kbd: GlobalHtmlAttributes; label: LabelAttributes; legend: GlobalHtmlAttributes; li: LiAttributes; main: GlobalHtmlAttributes; map: MapAttributes; mark: GlobalHtmlAttributes; meter: MeterAttributes; nav: GlobalHtmlAttributes; object: ObjectAttributes; ol: GlobalHtmlAttributes; optgroup: OptgroupAttributes; option: OptionAttributes; output: GlobalHtmlAttributes; p: GlobalHtmlAttributes; param: ParamAttributes; picture: GlobalHtmlAttributes; pre: GlobalHtmlAttributes; progress: ProgressAttributes; q: QAttributes; rb: GlobalHtmlAttributes; rp: GlobalHtmlAttributes; rt: GlobalHtmlAttributes; rtc: GlobalHtmlAttributes; ruby: GlobalHtmlAttributes; s: GlobalHtmlAttributes; samp: GlobalHtmlAttributes; section: GlobalHtmlAttributes; select: SelectAttributes; small: GlobalHtmlAttributes; source: SourceAttributes; span: GlobalHtmlAttributes; strong: GlobalHtmlAttributes; sub: GlobalHtmlAttributes; summary: GlobalHtmlAttributes; sup: GlobalHtmlAttributes; table: GlobalHtmlAttributes; tbody: GlobalHtmlAttributes; td: TdAttributes; textarea: TextareaAttributes; tfoot: GlobalHtmlAttributes; th: ThAttributes; thead: GlobalHtmlAttributes; time: TimeAttributes; tr: GlobalHtmlAttributes; track: TrackAttributes; u: GlobalHtmlAttributes; ul: GlobalHtmlAttributes; var: GlobalHtmlAttributes; video: VideoAttributes; wbr: GlobalHtmlAttributes; altGlyph: SvgAttributes; altGlyphDef: SvgAttributes; altGlyphItem: SvgAttributes; animate: SvgAttributes; animateColor: SvgAttributes; animateMotion: SvgAttributes; animateTransform: SvgAttributes; circle: SvgAttributes; clipPath: SvgAttributes; "color-profile": SvgAttributes; cursor: SvgAttributes; defs: SvgAttributes; desc: SvgAttributes; discard: SvgAttributes; ellipse: SvgAttributes; feBlend: SvgAttributes; feColorMatrix: SvgAttributes; feComponentTransfer: SvgAttributes; feComposite: SvgAttributes; feConvolveMatrix: SvgAttributes; feDiffuseLighting: SvgAttributes; feDisplacementMap: SvgAttributes; feDistantLight: SvgAttributes; feDropShadow: SvgAttributes; feFlood: SvgAttributes; feFuncA: SvgAttributes; feFuncB: SvgAttributes; feFuncG: SvgAttributes; feFuncR: SvgAttributes; feGaussianBlur: SvgAttributes; feImage: SvgAttributes; feMerge: SvgAttributes; feMergeNode: SvgAttributes; feMorphology: SvgAttributes; feOffset: SvgAttributes; fePointLight: SvgAttributes; feSpecularLighting: SvgAttributes; feSpotLight: SvgAttributes; feTile: SvgAttributes; feTurbulence: SvgAttributes; filter: SvgAttributes; font: SvgAttributes; "font-face": SvgAttributes; "font-face-format": SvgAttributes; "font-face-name": SvgAttributes; "font-face-src": SvgAttributes; "font-face-uri": SvgAttributes; foreignObject: SvgAttributes; g: SvgAttributes; glyph: SvgAttributes; glyphRef: SvgAttributes; hatch: SvgAttributes; hatchpath: SvgAttributes; hkern: SvgAttributes; image: SvgAttributes; line: SvgAttributes; linearGradient: SvgAttributes; marker: SvgAttributes; mask: SvgAttributes; mesh: SvgAttributes; meshgradient: SvgAttributes; meshpatch: SvgAttributes; meshrow: SvgAttributes; metadata: SvgAttributes; "missing-glyph": SvgAttributes; mpath: SvgAttributes; path: SvgAttributes; pattern: SvgAttributes; polygon: SvgAttributes; polyline: SvgAttributes; radialGradient: SvgAttributes; rect: SvgAttributes; script: SvgAttributes; set: SvgAttributes; solidcolor: SvgAttributes; stop: SvgAttributes; style: SvgAttributes; svg: SvgAttributes; switch: SvgAttributes; symbol: SvgAttributes; text: SvgAttributes; textPath: SvgAttributes; title: SvgAttributes; tref: SvgAttributes; tspan: SvgAttributes; unknown: SvgAttributes; use: SvgAttributes; view: SvgAttributes; vkern: SvgAttributes; } } } export type TextNode = string | number; export type Key = string | number; type MyraChild = VNode | TextNode; export type MyraNode = MyraChild | Array | boolean | null | undefined; export type UpdateState = TState | ((s: TState) => TState); export type Evolve = (update: UpdateState) => TState; export type ComponentFactory = (props: TProps) => MyraNode; export type JSXElementFactory = (props: TProps) => VNode; export type ErrorHandler = (error: unknown) => VNode; export interface Ref { current: T; } export interface ContextBinding { getValue: () => T; subscribe: (callback: () => void) => (() => void); } export interface ProviderProps extends ComponentProps { value: T; } export interface Context { readonly Provider: (props: ProviderProps & ComponentProps) => VNode; } export type Effect = () => EffectCleanupCallback; export type EffectCleanupCallback = (() => void) | void; export interface ComponentProps { children?: MyraNode; key?: Key; } export declare const enum VNodeType { Nothing = 0, Text = 1, Element = 2, Fragment = 3, Component = 4 } /** * A virtual node representing nothing. Will be rendered as a comment DOM * node. */ export interface NothingVNode { readonly _: VNodeType.Nothing; } /** * A virtual node that represents a text DOM node. */ export interface TextVNode { readonly _: VNodeType.Text; readonly text: string; } /** * A virtual node representing a DOM Element. */ export interface ElementVNode { readonly _: VNodeType.Element; readonly tagName: string; readonly props: GlobalAttributes & { children: VNode[]; }; } export interface FragmentVNode { readonly _: VNodeType.Fragment; readonly props: { children: VNode[]; key?: Key; }; } /** * A virtual node representing a component. */ export interface ComponentVNode { readonly _: VNodeType.Component; props: TProps; /** The function that generates a VNode tree for the component. */ readonly view: ComponentFactory; } /** * Union type of the different types of virtual nodes. */ export type VNode = TextVNode | ElementVNode | FragmentVNode | ComponentVNode | NothingVNode; export interface GenericEvent extends Event { currentTarget: T; } export interface GenericClipboardEvent extends ClipboardEvent { currentTarget: T; } export interface GenericCompositionEvent extends CompositionEvent { currentTarget: T; } export interface GenericDragEvent extends DragEvent { currentTarget: T; } export interface GenericFocusEvent extends FocusEvent { currentTarget: T; } export interface GenericInputEvent extends InputEvent { currentTarget: T; } export interface GenericKeyboardEvent extends KeyboardEvent { currentTarget: T; } export interface GenericMouseEvent extends MouseEvent { currentTarget: T; } export interface GenericTouchEvent extends TouchEvent { currentTarget: T; } export interface GenericWheelEvent extends WheelEvent { currentTarget: T; } /** * A function used as callback for event triggers. */ type EventListener$1 = (event: TEvent) => void; export interface GlobalAttributes { children?: MyraNode; key?: Key; ref?: Ref; accesskey?: string; autocapitalize?: string; "class"?: string; contenteditable?: boolean | "" | "true" | "false"; contextmenu?: string; dir?: "ltr" | "rtl" | "auto"; draggable?: boolean | "true" | "false"; hidden?: boolean | "true" | "false"; id?: string; inputmode?: "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url"; is?: string; itemid?: string; itemprop?: string; itemref?: string; itemscope?: boolean | "true" | "false"; itemtype?: string; lang?: string; part?: string; slot?: string; spellcheck?: boolean | "default" | "true" | "false"; style?: string; tabindex?: number | string; title?: string; translate?: "" | "yes" | "no"; onauxclick?: EventListener$1>; onblur?: EventListener$1>; onclick?: EventListener$1>; oncontextmenu?: EventListener$1>; ondblclick?: EventListener$1>; onerror?: EventListener$1>; onfocus?: EventListener$1>; onfocusin?: EventListener$1>; onfocusout?: EventListener$1>; onfullscreenchange?: EventListener$1>; onfullscreenerror?: EventListener$1>; oninput?: EventListener$1>; onkeydown?: EventListener$1>; onkeypress?: EventListener$1>; onkeyup?: EventListener$1>; onmousedown?: EventListener$1>; onmouseenter?: EventListener$1>; onmouseleave?: EventListener$1>; onmousemove?: EventListener$1>; onmouseout?: EventListener$1>; onmouseover?: EventListener$1>; onmouseup?: EventListener$1>; onselect?: EventListener$1>; onwheel?: EventListener$1>; oncompositionend?: EventListener$1>; oncompositionstart?: EventListener$1>; oncompositionupdate?: EventListener$1>; oncopy?: EventListener$1>; oncut?: EventListener$1>; onpaste?: EventListener$1>; ondrag?: EventListener$1>; ondragend?: EventListener$1>; ondragenter?: EventListener$1>; ondragexit?: EventListener$1>; ondragleave?: EventListener$1>; ondragover?: EventListener$1>; ondragstart?: EventListener$1>; ondrop?: EventListener$1>; ontouchcancel?: EventListener$1>; ontouchend?: EventListener$1>; ontouchmove?: EventListener$1>; ontouchstart?: EventListener$1>; role?: string; "aria-autocomplete"?: string | boolean | number; "aria-checked"?: string | boolean | number; "aria-disabled"?: string | boolean | number; "aria-expanded"?: string | boolean | number; "aria-haspopup"?: string | boolean | number; "aria-hidden"?: string | boolean | number; "aria-invalid"?: string | boolean | number; "aria-label"?: string | boolean | number; "aria-level"?: string | boolean | number; "aria-multiline"?: string | boolean | number; "aria-multiselectable"?: string | boolean | number; "aria-orientation"?: string | boolean | number; "aria-pressed"?: string | boolean | number; "aria-readonly"?: string | boolean | number; "aria-required"?: string | boolean | number; "aria-selected"?: string | boolean | number; "aria-sort"?: string | boolean | number; "aria-valuemax"?: string | boolean | number; "aria-valuemin"?: string | boolean | number; "aria-valuenow"?: string | boolean | number; "aria-valuetext"?: string | boolean | number; "aria-live"?: string | boolean | number; "aria-relevant"?: string | boolean | number; "aria-atomic"?: string | boolean | number; "aria-busy"?: string | boolean | number; "aria-dropeffect"?: string | boolean | number; "aria-dragged"?: string | boolean | number; "aria-activedescendant"?: string | boolean | number; "aria-controls"?: string | boolean | number; "aria-describedby"?: string | boolean | number; "aria-flowto"?: string | boolean | number; "aria-labelledby"?: string | boolean | number; "aria-owns"?: string | boolean | number; "aria-posinset"?: string | boolean | number; "aria-setsize"?: string | boolean | number; } export interface AAttributes extends GlobalAttributes { download?: string; href?: string; hreflang?: string; rel?: string; target?: string; type?: string; } export interface AreaAttributes extends GlobalAttributes { alt?: string; coords?: string; download?: string; href?: string; hreflang?: string; media?: string; rel?: string; shape?: string; target?: string; type?: string; } export interface AudioAttributes extends GlobalAttributes { autoplay?: boolean | "true" | "false"; buffered?: string | boolean | number; controls?: string | boolean | number; loop?: boolean | "true" | "false"; muted?: boolean | "true" | "false"; played?: string | boolean | number; preload?: "" | "none" | "metadata" | "auto"; src?: string; volume?: number | string; } export interface ButtonAttributes extends GlobalAttributes { autofocus?: boolean | "true" | "false"; disabled?: boolean | "true" | "false"; form?: string; formaction?: string; formenctype?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"; formmethod?: "post" | "get"; formnovalidate?: boolean | "true" | "false"; formtarget?: string; name?: string; type?: "submit" | "reset" | "button"; value?: string | number; } export interface CanvasAttributes extends GlobalAttributes { height?: number | string; width?: number | string; } export interface ColAttributes extends GlobalAttributes { span?: number | string; } export interface ColGroupAttributes extends GlobalAttributes { span?: number | string; } export interface DelAttributes extends GlobalAttributes { cite?: string; datetime?: string; } export interface DetailsAttributes extends GlobalAttributes { open?: boolean | "true" | "false"; } export interface EmbedAttributes extends GlobalAttributes { height?: number | string; src?: string; type?: string; width?: number | string; } export interface FieldsetAttributes extends GlobalAttributes { disabled?: boolean | "true" | "false"; form?: string; name?: string; } export interface FormAttributes extends GlobalAttributes { accept?: string; "accept-charset"?: string; action?: string; autocomplete?: "on" | "off"; enctype?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"; method?: "post" | "get"; name?: string; novalidate?: boolean | "true" | "false"; target?: string; onreset?: EventListener$1>; onsubmit?: EventListener$1>; onchange?: EventListener$1>; } export interface IframeAttributes extends GlobalAttributes { allow?: string; allowfullscreen?: boolean | "true" | "false"; allowpaymentrequest?: boolean | "true" | "false"; height?: number | string; loading?: "eager" | "lazy"; name?: string; referrerpolicy?: string; sandbox?: string; src?: string; srcdoc?: string; width?: number | string; } export interface ImgAttributes extends GlobalAttributes { alt?: string; crossorigin?: "anonymous" | "use-credentials"; height?: number | string; ismap?: boolean | "true" | "false"; longdesc?: string; sizes?: string; src: string; srcset?: string; width?: number | string; usemap?: string; } export interface InputAttributes extends Omit, "oninput"> { type?: "button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week"; accept?: string; autocomplete?: string; autofocus?: boolean | "true" | "false"; capture?: boolean | "true" | "false"; checked?: boolean | "true" | "false"; disabled?: boolean | "true" | "false"; form?: string; formaction?: string; formenctype?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"; formmethod?: "post" | "get"; formnovalidate?: boolean | "true" | "false"; formtarget?: string; height?: number | string; list?: string; max?: number | string; maxlength?: number | string; min?: number | string; minlength?: number | string; multiple?: boolean | "true" | "false"; name?: string; pattern?: string; placeholder?: string; readonly?: boolean | "true" | "false"; required?: boolean | "true" | "false"; selectionDirection?: string; size?: number | string; spellcheck?: boolean | "true" | "false"; src?: string; step?: number | string; value?: string | number; width?: number | string; onchange?: EventListener$1>; oninput?: EventListener$1>; } export interface InsAttributes extends GlobalAttributes { cite?: string; datetime?: string; } export interface LabelAttributes extends GlobalAttributes { for?: string; form?: string; } export interface LiAttributes extends GlobalAttributes { value?: number | string; } export interface MapAttributes extends GlobalAttributes { name?: string; } export interface MeterAttributes extends GlobalAttributes { value?: number | string; min?: number | string; max?: number | string; low?: number | string; high?: number | string; optimum?: number | string; form?: string; } export interface ObjectAttributes extends GlobalAttributes { data?: string; height?: number | string; name?: string; type?: string; usemap?: string; width?: number | string; } export interface OptgroupAttributes extends GlobalAttributes { disabled?: boolean | "true" | "false"; label?: string; } export interface OptionAttributes extends GlobalAttributes { disabled?: boolean | "true" | "false"; label?: string; selected?: boolean | "true" | "false"; value?: string | number; } export interface ParamAttributes extends GlobalAttributes { name?: string; value?: string; } export interface ProgressAttributes extends GlobalAttributes { max?: number | string; value?: number | string; } export interface QAttributes extends GlobalAttributes { cite?: string; } export interface SelectAttributes extends GlobalAttributes { autofocus?: boolean | "true" | "false"; disabled?: boolean | "true" | "false"; form?: string; multiple?: boolean | "true" | "false"; name?: string; required?: boolean | "true" | "false"; size?: number | string; onchange?: EventListener$1>; } export interface SourceAttributes extends GlobalAttributes { src?: string; type?: string; } export interface TdAttributes extends GlobalAttributes { colspan?: number | string; headers?: string; rowspan?: number | string; } export interface TextareaAttributes extends Omit, "oninput"> { autocomplete?: "on" | "off"; autofocus?: boolean | "true" | "false"; cols?: number | string; disabled?: boolean | "true" | "false"; form?: string; maxlength?: number | string; minlength?: number | string; name?: string; placeholder?: string; required?: boolean | "true" | "false"; rows?: number | string; selectionDirection?: string; selectionEnd?: number | string; selectionStart?: number | string; value?: string; wrap?: "soft" | "hard"; onchange?: EventListener$1>; oninput?: EventListener$1>; } export interface ThAttributes extends GlobalAttributes { colspan?: number | string; headers?: string; rowspan?: number | string; scope?: "row" | "col" | "rowgroup" | "colgroup" | "auto"; } export interface TimeAttributes extends GlobalAttributes { datetime?: string; } export interface TrackAttributes extends GlobalAttributes { default?: boolean | "true" | "false"; kind?: "subtitles" | "captions" | "descriptions" | "chapters" | "metadata"; label?: string; src?: string; srclang?: string; } export interface VideoAttributes extends GlobalAttributes { autoplay?: boolean | "true" | "false"; buffered?: string | boolean | number; controls?: boolean | "true" | "false"; crossorigin?: "anonymous" | "use-credentials"; height?: number | string; loop?: boolean | "true" | "false"; muted?: boolean | "true" | "false"; playsinline?: boolean; poster?: string; preload?: "none" | "metadata" | "auto" | ""; src?: string; width?: number | string; } export interface SvgAttributes { [name: string]: any; } export declare function createContext(defaultValue: T): Context; interface IProps { children?: MyraNode; key?: Key; } export declare function Fragment(props: IProps): FragmentVNode | NothingVNode; /** * Creates a JSX.Element/VNode from a JSX tag. */ export declare function h(tagNameOrComponent: string | ComponentFactory | undefined | null, props: TProps, ...children: Array): JSX.Element; type LazyStateInitialization = () => TState; /** * * @param initialState the initial state */ export declare function useState(initialState: TState | LazyStateInitialization): [ TState, Evolve ]; /** * * @param current an optional value */ export declare function useRef(current?: T): Ref; /** * * @param handler */ export declare function useErrorHandler(handler: ErrorHandler): void; /** * * @param effect * @param arg */ export declare function useLayoutEffect(effect: Effect, arg?: TArg): void; /** * * @param effect * @param arg */ export declare function useEffect(effect: Effect, arg?: TArg): void; /** * * @param fn * @param deps */ export declare function useMemo(fn: () => TMemoization, deps: unknown[]): TMemoization; /** * * @param callback * @param deps */ export declare function useCallback(callback: TCallback, deps: unknown[]): TCallback; /** * * @param context */ export declare function useContext(context: Context): T; /** * * @param reducer * @param initialState */ export declare function useReducer(reducer: (state: TState, action: TAction) => TState, initialState: TState): [ TState, (action: TAction) => void ]; type CompareFn = (newProps: TProps, oldProps: TProps) => boolean; /** * Memoizes a component view, preventing unnecessary renders. * * If no custom compare function is supplied, a shallow comparison of the props' * properties will decide whether the component will be rerendered or not. * * @param factory A component factory function * @param compare An optional props equality comparer function. If true is * returned the memoized view will be kept, otherwise the view * will be rerendered. */ export declare function memo(factory: ComponentFactory, compare?: CompareFn): JSXElementFactory; export type Type = "array" | "object" | "string" | "date" | "regexp" | "function" | "boolean" | "number" | "null" | "undefined"; /** * Better "typeof" which identifies arrays. */ export declare function typeOf(obj: unknown): Type; /** * Does a deep equality check. */ export declare function equal(a: T, b: T): boolean; /** * Convenience function for type hinting * * @param fn */ export declare function define(fn: JSXElementFactory): JSXElementFactory; /** * Mounts a virtual DOM node onto the supplied element. */ export declare function mount(vNode: VNode, element: Element): void; export { EventListener$1 as EventListener, }; export as namespace myra; export {};