UNPKG

@7x7cl/qwik

Version:

An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.

1,324 lines (1,226 loc) 57.8 kB
declare interface AbstractView { styleMedia: StyleMedia; document: Document; } declare interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> { download?: any; href?: string | undefined; hrefLang?: string | undefined; media?: string | undefined; ping?: string | undefined; rel?: string | undefined; target?: HTMLAttributeAnchorTarget | undefined; type?: string | undefined; referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; } declare interface AreaHTMLAttributes<T> extends HTMLAttributes<T> { alt?: string | undefined; coords?: string | undefined; download?: any; href?: string | undefined; hrefLang?: string | undefined; media?: string | undefined; referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; rel?: string | undefined; shape?: string | undefined; target?: string | undefined; children?: undefined; } /** * @public */ declare interface AriaAttributes { /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ 'aria-activedescendant'?: string | undefined; /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ 'aria-atomic'?: Booleanish | undefined; /** * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be * presented if they are made. */ 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both' | undefined; /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ 'aria-busy'?: Booleanish | undefined; /** * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * @see aria-pressed @see aria-selected. */ 'aria-checked'?: boolean | 'false' | 'mixed' | 'true' | undefined; /** * Defines the total number of columns in a table, grid, or treegrid. * @see aria-colindex. */ 'aria-colcount'?: number | undefined; /** * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * @see aria-colcount @see aria-colspan. */ 'aria-colindex'?: number | undefined; /** * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * @see aria-colindex @see aria-rowspan. */ 'aria-colspan'?: number | undefined; /** * Identifies the element (or elements) whose contents or presence are controlled by the current element. * @see aria-owns. */ 'aria-controls'?: string | undefined; /** Indicates the element that represents the current item within a container or set of related elements. */ 'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time' | undefined; /** * Identifies the element (or elements) that describes the object. * @see aria-labelledby */ 'aria-describedby'?: string | undefined; /** * Identifies the element that provides a detailed, extended description for the object. * @see aria-describedby. */ 'aria-details'?: string | undefined; /** * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * @see aria-hidden @see aria-readonly. */ 'aria-disabled'?: Booleanish | undefined; /** * Indicates what functions can be performed when a dragged object is released on the drop target. * @deprecated in ARIA 1.1 */ 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup' | undefined; /** * Identifies the element that provides an error message for the object. * @see aria-invalid @see aria-describedby. */ 'aria-errormessage'?: string | undefined; /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ 'aria-expanded'?: Booleanish | undefined; /** * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, * allows assistive technology to override the general default of reading in document source order. */ 'aria-flowto'?: string | undefined; /** * Indicates an element's "grabbed" state in a drag-and-drop operation. * @deprecated in ARIA 1.1 */ 'aria-grabbed'?: Booleanish | undefined; /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined; /** * Indicates whether the element is exposed to an accessibility API. * @see aria-disabled. */ 'aria-hidden'?: Booleanish | undefined; /** * Indicates the entered value does not conform to the format expected by the application. * @see aria-errormessage. */ 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling' | undefined; /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ 'aria-keyshortcuts'?: string | undefined; /** * Defines a string value that labels the current element. * @see aria-labelledby. */ 'aria-label'?: string | undefined; /** * Identifies the element (or elements) that labels the current element. * @see aria-describedby. */ 'aria-labelledby'?: string | undefined; /** Defines the hierarchical level of an element within a structure. */ 'aria-level'?: number | undefined; /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ 'aria-live'?: 'off' | 'assertive' | 'polite' | undefined; /** Indicates whether an element is modal when displayed. */ 'aria-modal'?: Booleanish | undefined; /** Indicates whether a text box accepts multiple lines of input or only a single line. */ 'aria-multiline'?: Booleanish | undefined; /** Indicates that the user may select more than one item from the current selectable descendants. */ 'aria-multiselectable'?: Booleanish | undefined; /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ 'aria-orientation'?: 'horizontal' | 'vertical' | undefined; /** * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. * @see aria-controls. */ 'aria-owns'?: string | undefined; /** * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. * A hint could be a sample value or a brief description of the expected format. */ 'aria-placeholder'?: string | undefined; /** * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. * @see aria-setsize. */ 'aria-posinset'?: number | undefined; /** * Indicates the current "pressed" state of toggle buttons. * @see aria-checked @see aria-selected. */ 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true' | undefined; /** * Indicates that the element is not editable, but is otherwise operable. * @see aria-disabled. */ 'aria-readonly'?: Booleanish | undefined; /** * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. * @see aria-atomic. */ 'aria-relevant'?: 'additions' | 'additions removals' | 'additions text' | 'all' | 'removals' | 'removals additions' | 'removals text' | 'text' | 'text additions' | 'text removals' | undefined; /** Indicates that user input is required on the element before a form may be submitted. */ 'aria-required'?: Booleanish | undefined; /** Defines a human-readable, author-localized description for the role of an element. */ 'aria-roledescription'?: string | undefined; /** * Defines the total number of rows in a table, grid, or treegrid. * @see aria-rowindex. */ 'aria-rowcount'?: number | undefined; /** * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * @see aria-rowcount @see aria-rowspan. */ 'aria-rowindex'?: number | undefined; /** * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * @see aria-rowindex @see aria-colspan. */ 'aria-rowspan'?: number | undefined; /** * Indicates the current "selected" state of various widgets. * @see aria-checked @see aria-pressed. */ 'aria-selected'?: Booleanish | undefined; /** * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. * @see aria-posinset. */ 'aria-setsize'?: number | undefined; /** Indicates if items in a table or grid are sorted in ascending or descending order. */ 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other' | undefined; /** Defines the maximum allowed value for a range widget. */ 'aria-valuemax'?: number | undefined; /** Defines the minimum allowed value for a range widget. */ 'aria-valuemin'?: number | undefined; /** * Defines the current value for a range widget. * @see aria-valuetext. */ 'aria-valuenow'?: number | undefined; /** Defines the human readable text alternative of aria-valuenow for a range widget. */ 'aria-valuetext'?: string | undefined; } /** * @public */ declare type AriaRole = 'alert' | 'alertdialog' | 'application' | 'article' | 'banner' | 'button' | 'cell' | 'checkbox' | 'columnheader' | 'combobox' | 'complementary' | 'contentinfo' | 'definition' | 'dialog' | 'directory' | 'document' | 'feed' | 'figure' | 'form' | 'grid' | 'gridcell' | 'group' | 'heading' | 'img' | 'link' | 'list' | 'listbox' | 'listitem' | 'log' | 'main' | 'marquee' | 'math' | 'menu' | 'menubar' | 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | 'navigation' | 'none' | 'note' | 'option' | 'presentation' | 'progressbar' | 'radio' | 'radiogroup' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'scrollbar' | 'search' | 'searchbox' | 'separator' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'table' | 'tablist' | 'tabpanel' | 'term' | 'textbox' | 'timer' | 'toolbar' | 'tooltip' | 'tree' | 'treegrid' | 'treeitem' | (string & {}); declare interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> { } declare type BaseClassList = string | undefined | null | false | Record<string, boolean | string | number | null | undefined> | BaseClassList[]; declare interface BaseHTMLAttributes<T> extends HTMLAttributes<T> { href?: string | undefined; target?: string | undefined; children?: undefined; } declare interface BaseSyntheticEvent<E = object, C = any, T = any> { nativeEvent: E | undefined; target: T; bubbles: boolean; cancelable: boolean; eventPhase: number; isTrusted: boolean; stopPropagation(): void; isPropagationStopped(): boolean; persist(): void; timeStamp: number; type: string; } declare type BivariantEventHandler<T extends SyntheticEvent<any> | Event, EL> = { bivarianceHack(event: T, element: EL): any; }['bivarianceHack']; declare interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> { cite?: string | undefined; } declare type Booleanish = boolean | `${boolean}`; declare interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> { autoFocus?: boolean | undefined; disabled?: boolean | undefined; form?: string | undefined; formAction?: string | undefined; formEncType?: string | undefined; formMethod?: string | undefined; formNoValidate?: boolean | undefined; formTarget?: string | undefined; name?: string | undefined; type?: 'submit' | 'reset' | 'button' | undefined; value?: string | ReadonlyArray<string> | number | undefined; } declare interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> { height?: Numberish | undefined; width?: Numberish | undefined; } /** * @public */ declare type ClassList = BaseClassList | BaseClassList[]; declare interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> { span?: number | undefined; } declare interface ColHTMLAttributes<T> extends HTMLAttributes<T> { span?: number | undefined; width?: Numberish | undefined; children?: undefined; } declare interface DataHTMLAttributes<T> extends HTMLAttributes<T> { value?: string | ReadonlyArray<string> | number | undefined; } declare interface DelHTMLAttributes<T> extends HTMLAttributes<T> { cite?: string | undefined; dateTime?: string | undefined; } declare interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> { open?: boolean | undefined; } declare interface DevJSX { fileName: string; lineNumber: number; columnNumber: number; stack?: string; } declare interface DialogHTMLAttributes<T> extends HTMLAttributes<T> { open?: boolean | undefined; } /** * @public */ declare interface DOMAttributes<T> extends QwikProps<T>, QwikEvents<T> { children?: JSXChildren; key?: string | number | null | undefined; } declare interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> { height?: Numberish | undefined; src?: string | undefined; type?: string | undefined; width?: Numberish | undefined; children?: undefined; } declare interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> { disabled?: boolean | undefined; form?: string | undefined; name?: string | undefined; } declare interface FormHTMLAttributes<T> extends HTMLAttributes<T> { acceptCharset?: string | undefined; action?: string | undefined; autoComplete?: 'on' | 'off' | Omit<'on' | 'off', string> | undefined; encType?: string | undefined; method?: string | undefined; name?: string | undefined; noValidate?: boolean | undefined; target?: string | undefined; } /** * @public */ export declare const Fragment: FunctionComponent<{ children?: any; key?: string | number | null; }>; /** * @public */ export declare interface FunctionComponent<P = Record<string, any>> { (props: P, key: string | null, flags: number): JSXNode | null; } declare interface HrHTMLAttributes<T> extends HTMLAttributes<T> { children?: undefined; } declare type HTMLAttributeAnchorTarget = '_self' | '_blank' | '_parent' | '_top' | (string & {}); declare type HTMLAttributeReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'; /** * @public */ declare interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> { accessKey?: string | undefined; contentEditable?: 'true' | 'false' | 'inherit' | undefined; contextMenu?: string | undefined; dir?: 'ltr' | 'rtl' | 'auto' | undefined; draggable?: boolean | undefined; hidden?: boolean | 'hidden' | 'until-found' | undefined; id?: string | undefined; lang?: string | undefined; placeholder?: string | undefined; slot?: string | undefined; spellcheck?: boolean | undefined; style?: Record<string, string | number | undefined> | string | undefined; tabIndex?: number | undefined; title?: string | undefined; translate?: 'yes' | 'no' | undefined; radioGroup?: string | undefined; role?: AriaRole | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; color?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; security?: string | undefined; unselectable?: 'on' | 'off' | undefined; /** * Hints at the type of data that might be entered by the user while editing the element or its contents * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute */ inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search' | undefined; /** * Specify that a standard HTML element should behave like a defined custom built-in element * @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is */ is?: string | undefined; } declare type HTMLCrossOriginAttribute = 'anonymous' | 'use-credentials' | '' | undefined; declare interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> { manifest?: string | undefined; } declare type HTMLInputAutocompleteAttribute = 'on' | 'off' | 'billing' | 'shipping' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'honorific-suffix' | 'nickname' | 'username' | 'new-password' | 'current-password' | 'one-time-code' | 'organization-title' | 'organization' | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2' | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-given-name' | 'cc-additional-name' | 'cc-family-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-currency' | 'transaction-amount' | 'language' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'url' | 'photo'; declare type HTMLInputTypeAttribute = 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | (string & {}); declare interface HTMLWebViewElement extends HTMLElement { } declare interface IframeHTMLAttributes<T> extends HTMLAttributes<T> { allow?: string | undefined; allowFullScreen?: boolean | undefined; allowTransparency?: boolean | undefined; /** @deprecated Deprecated */ frameBorder?: number | string | undefined; height?: Numberish | undefined; loading?: 'eager' | 'lazy' | undefined; /** @deprecated Deprecated */ marginHeight?: number | undefined; /** @deprecated Deprecated */ marginWidth?: number | undefined; name?: string | undefined; referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; sandbox?: string | undefined; /** @deprecated Deprecated */ scrolling?: string | undefined; seamless?: boolean | undefined; src?: string | undefined; srcDoc?: string | undefined; width?: Numberish | undefined; children?: undefined; } declare interface ImgHTMLAttributes<T> extends HTMLAttributes<T> { alt?: string | undefined; crossOrigin?: HTMLCrossOriginAttribute; decoding?: 'async' | 'auto' | 'sync' | undefined; /** * Intrinsic height of the image in pixels. */ height?: Numberish | undefined; loading?: 'eager' | 'lazy' | undefined; referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; sizes?: string | undefined; src?: string | undefined; srcSet?: string | undefined; useMap?: string | undefined; /** * Intrinsic width of the image in pixels. */ width?: Numberish | undefined; children?: undefined; } declare interface InputHTMLAttributes<T> extends HTMLAttributes<T> { accept?: string | undefined; alt?: string | undefined; autoComplete?: HTMLInputAutocompleteAttribute | Omit<HTMLInputAutocompleteAttribute, string> | undefined; autoFocus?: boolean | undefined; capture?: boolean | 'user' | 'environment' | undefined; checked?: boolean | undefined; 'bind:checked'?: Signal<boolean | undefined>; crossOrigin?: HTMLCrossOriginAttribute; disabled?: boolean | undefined; enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | undefined; form?: string | undefined; formAction?: string | undefined; formEncType?: string | undefined; formMethod?: string | undefined; formNoValidate?: boolean | undefined; formTarget?: string | undefined; height?: Numberish | undefined; list?: string | undefined; max?: number | string | undefined; maxLength?: number | undefined; min?: number | string | undefined; minLength?: number | undefined; multiple?: boolean | undefined; name?: string | undefined; pattern?: string | undefined; placeholder?: string | undefined; readOnly?: boolean | undefined; required?: boolean | undefined; size?: number | undefined; src?: string | undefined; step?: number | string | undefined; type?: HTMLInputTypeAttribute | undefined; value?: string | ReadonlyArray<string> | number | undefined | null | FormDataEntryValue; 'bind:value'?: Signal<string | undefined>; width?: Numberish | undefined; children?: undefined; } declare interface InsHTMLAttributes<T> extends HTMLAttributes<T> { cite?: string | undefined; dateTime?: string | undefined; } declare interface IntrinsicHTMLElements { a: AnchorHTMLAttributes<HTMLAnchorElement>; abbr: HTMLAttributes<HTMLElement>; address: HTMLAttributes<HTMLElement>; area: AreaHTMLAttributes<HTMLAreaElement>; article: HTMLAttributes<HTMLElement>; aside: HTMLAttributes<HTMLElement>; audio: AudioHTMLAttributes<HTMLAudioElement>; b: HTMLAttributes<HTMLElement>; base: BaseHTMLAttributes<HTMLBaseElement>; bdi: HTMLAttributes<HTMLElement>; bdo: HTMLAttributes<HTMLElement>; big: HTMLAttributes<HTMLElement>; blockquote: BlockquoteHTMLAttributes<HTMLElement>; body: HTMLAttributes<HTMLBodyElement>; br: HTMLAttributes<HTMLBRElement>; button: ButtonHTMLAttributes<HTMLButtonElement>; canvas: CanvasHTMLAttributes<HTMLCanvasElement>; caption: HTMLAttributes<HTMLElement>; cite: HTMLAttributes<HTMLElement>; code: HTMLAttributes<HTMLElement>; col: ColHTMLAttributes<HTMLTableColElement>; colgroup: ColgroupHTMLAttributes<HTMLTableColElement>; data: DataHTMLAttributes<HTMLDataElement>; datalist: HTMLAttributes<HTMLDataListElement>; dd: HTMLAttributes<HTMLElement>; del: DelHTMLAttributes<HTMLElement>; details: DetailsHTMLAttributes<HTMLElement>; dfn: HTMLAttributes<HTMLElement>; dialog: DialogHTMLAttributes<HTMLDialogElement>; div: HTMLAttributes<HTMLDivElement>; dl: HTMLAttributes<HTMLDListElement>; dt: HTMLAttributes<HTMLElement>; em: HTMLAttributes<HTMLElement>; embed: EmbedHTMLAttributes<HTMLEmbedElement>; fieldset: FieldsetHTMLAttributes<HTMLFieldSetElement>; figcaption: HTMLAttributes<HTMLElement>; figure: HTMLAttributes<HTMLElement>; footer: HTMLAttributes<HTMLElement>; form: FormHTMLAttributes<HTMLFormElement>; h1: HTMLAttributes<HTMLHeadingElement>; h2: HTMLAttributes<HTMLHeadingElement>; h3: HTMLAttributes<HTMLHeadingElement>; h4: HTMLAttributes<HTMLHeadingElement>; h5: HTMLAttributes<HTMLHeadingElement>; h6: HTMLAttributes<HTMLHeadingElement>; head: HTMLAttributes<HTMLHeadElement>; header: HTMLAttributes<HTMLElement>; hgroup: HTMLAttributes<HTMLElement>; hr: HrHTMLAttributes<HTMLHRElement>; html: HtmlHTMLAttributes<HTMLHtmlElement>; i: HTMLAttributes<HTMLElement>; iframe: IframeHTMLAttributes<HTMLIFrameElement>; img: ImgHTMLAttributes<HTMLImageElement>; input: InputHTMLAttributes<HTMLInputElement>; ins: InsHTMLAttributes<HTMLModElement>; kbd: HTMLAttributes<HTMLElement>; keygen: KeygenHTMLAttributes<HTMLElement>; label: LabelHTMLAttributes<HTMLLabelElement>; legend: HTMLAttributes<HTMLLegendElement>; li: LiHTMLAttributes<HTMLLIElement>; link: LinkHTMLAttributes<HTMLLinkElement>; main: HTMLAttributes<HTMLElement>; map: MapHTMLAttributes<HTMLMapElement>; mark: HTMLAttributes<HTMLElement>; menu: MenuHTMLAttributes<HTMLElement>; menuitem: HTMLAttributes<HTMLElement>; meta: MetaHTMLAttributes<HTMLMetaElement>; meter: MeterHTMLAttributes<HTMLElement>; nav: HTMLAttributes<HTMLElement>; noindex: HTMLAttributes<HTMLElement>; noscript: HTMLAttributes<HTMLElement>; object: ObjectHTMLAttributes<HTMLObjectElement>; ol: OlHTMLAttributes<HTMLOListElement>; optgroup: OptgroupHTMLAttributes<HTMLOptGroupElement>; option: OptionHTMLAttributes<HTMLOptionElement>; output: OutputHTMLAttributes<HTMLElement>; p: HTMLAttributes<HTMLParagraphElement>; param: ParamHTMLAttributes<HTMLParamElement>; picture: HTMLAttributes<HTMLElement>; pre: HTMLAttributes<HTMLPreElement>; progress: ProgressHTMLAttributes<HTMLProgressElement>; q: QuoteHTMLAttributes<HTMLQuoteElement>; rp: HTMLAttributes<HTMLElement>; rt: HTMLAttributes<HTMLElement>; ruby: HTMLAttributes<HTMLElement>; s: HTMLAttributes<HTMLElement>; samp: HTMLAttributes<HTMLElement>; slot: SlotHTMLAttributes<HTMLSlotElement>; script: ScriptHTMLAttributes<HTMLScriptElement>; section: HTMLAttributes<HTMLElement>; select: SelectHTMLAttributes<HTMLSelectElement>; small: HTMLAttributes<HTMLElement>; source: SourceHTMLAttributes<HTMLSourceElement>; span: HTMLAttributes<HTMLSpanElement>; strong: HTMLAttributes<HTMLElement>; style: StyleHTMLAttributes<HTMLStyleElement>; sub: HTMLAttributes<HTMLElement>; summary: HTMLAttributes<HTMLElement>; sup: HTMLAttributes<HTMLElement>; table: TableHTMLAttributes<HTMLTableElement>; template: HTMLAttributes<HTMLTemplateElement>; tbody: HTMLAttributes<HTMLTableSectionElement>; td: TdHTMLAttributes<HTMLTableDataCellElement>; textarea: TextareaHTMLAttributes<HTMLTextAreaElement>; tfoot: HTMLAttributes<HTMLTableSectionElement>; th: ThHTMLAttributes<HTMLTableHeaderCellElement>; thead: HTMLAttributes<HTMLTableSectionElement>; time: TimeHTMLAttributes<HTMLElement>; title: TitleHTMLAttributes<HTMLTitleElement>; tr: HTMLAttributes<HTMLTableRowElement>; track: TrackHTMLAttributes<HTMLTrackElement>; tt: HTMLAttributes<HTMLElement>; u: HTMLAttributes<HTMLElement>; ul: HTMLAttributes<HTMLUListElement>; video: VideoHTMLAttributes<HTMLVideoElement>; wbr: HTMLAttributes<HTMLElement>; webview: WebViewHTMLAttributes<HTMLWebViewElement>; } /** * @public */ export declare namespace JSX { export interface Element extends JSXNode { } export interface IntrinsicAttributes extends QwikIntrinsicAttributes { } export interface ElementChildrenAttribute { children: any; } export interface IntrinsicElements extends QwikIntrinsicElements { } } /** * @public */ declare const jsx: <T extends string | FunctionComponent<any>>(type: T, props: T extends FunctionComponent<infer PROPS> ? PROPS : Record<string, any>, key?: string | number | null) => JSXNode<T>; export { jsx } export { jsx as jsxs } /** * @public */ declare type JSXChildren = string | number | boolean | null | undefined | Function | RegExp | JSXChildren[] | Promise<JSXChildren> | Signal<JSXChildren> | JSXNode; /** * @public */ export declare const jsxDEV: <T extends string | FunctionComponent<any>>(type: T, props: T extends FunctionComponent<infer PROPS> ? PROPS : Record<string, any>, key: string | number | null | undefined, _isStatic: boolean, opts: JsxDevOpts, _ctx: any) => JSXNode<T>; declare interface JsxDevOpts { fileName: string; lineNumber: number; columnNumber: number; } /** * @public */ export declare interface JSXNode<T = string | FunctionComponent> { type: T; props: T extends FunctionComponent<infer B> ? B : Record<string, any>; immutableProps: Record<string, any> | null; children: any | null; flags: number; key: string | null; dev?: DevJSX; } declare interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> { autoFocus?: boolean | undefined; challenge?: string | undefined; disabled?: boolean | undefined; form?: string | undefined; keyType?: string | undefined; keyParams?: string | undefined; name?: string | undefined; children?: undefined; } declare interface LabelHTMLAttributes<T> extends HTMLAttributes<T> { form?: string | undefined; for?: string | undefined; } declare interface LiHTMLAttributes<T> extends HTMLAttributes<T> { value?: string | ReadonlyArray<string> | number | undefined; } declare interface LinkHTMLAttributes<T> extends HTMLAttributes<T> { as?: string | undefined; crossOrigin?: HTMLCrossOriginAttribute; href?: string | undefined; hrefLang?: string | undefined; integrity?: string | undefined; media?: string | undefined; imageSrcSet?: string | undefined; imageSizes?: string | undefined; referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; rel?: string | undefined; sizes?: string | undefined; type?: string | undefined; charSet?: string | undefined; children?: undefined; } declare interface MapHTMLAttributes<T> extends HTMLAttributes<T> { name?: string | undefined; } declare interface MediaHTMLAttributes<T> extends HTMLAttributes<T> { autoPlay?: boolean | undefined; controls?: boolean | undefined; controlsList?: string | undefined; crossOrigin?: HTMLCrossOriginAttribute; loop?: boolean | undefined; mediaGroup?: string | undefined; muted?: boolean | undefined; playsInline?: boolean | undefined; preload?: string | undefined; src?: string | undefined; } declare interface MenuHTMLAttributes<T> extends HTMLAttributes<T> { type?: string | undefined; } declare interface MetaHTMLAttributes<T> extends HTMLAttributes<T> { charSet?: string | undefined; content?: string | undefined; httpEquiv?: string | undefined; name?: string | undefined; media?: string | undefined; children?: undefined; } declare interface MeterHTMLAttributes<T> extends HTMLAttributes<T> { form?: string | undefined; high?: number | undefined; low?: number | undefined; max?: number | string | undefined; min?: number | string | undefined; optimum?: number | undefined; value?: string | ReadonlyArray<string> | number | undefined; } /** @public */ declare type NativeAnimationEvent = AnimationEvent; /** @public */ declare type NativeClipboardEvent = ClipboardEvent; /** @public */ declare type NativeCompositionEvent = CompositionEvent; /** @public */ declare type NativeDragEvent = DragEvent; /** * @public */ declare type NativeEventHandler<T extends Event = Event, EL = Element> = BivariantEventHandler<T, EL> | QRL<BivariantEventHandler<T, EL>>[]; /** @public */ declare type NativeFocusEvent = FocusEvent; /** @public */ declare type NativeKeyboardEvent = KeyboardEvent; /** @public */ declare type NativeMouseEvent = MouseEvent; /** @public */ declare type NativePointerEvent = PointerEvent; /** @public */ declare type NativeTouchEvent = TouchEvent; /** @public */ declare type NativeTransitionEvent = TransitionEvent; /** @public */ declare type NativeUIEvent = UIEvent; /** @public */ declare type NativeWheelEvent = WheelEvent; declare type Numberish = number | `${number}`; declare interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> { classID?: string | undefined; data?: string | undefined; form?: string | undefined; height?: Numberish | undefined; name?: string | undefined; type?: string | undefined; useMap?: string | undefined; width?: Numberish | undefined; wmode?: string | undefined; } declare interface OlHTMLAttributes<T> extends HTMLAttributes<T> { reversed?: boolean | undefined; start?: number | undefined; type?: '1' | 'a' | 'A' | 'i' | 'I' | undefined; } declare interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> { disabled?: boolean | undefined; label?: string | undefined; } declare interface OptionHTMLAttributes<T> extends HTMLAttributes<T> { disabled?: boolean | undefined; label?: string | undefined; selected?: boolean | undefined; value?: string | ReadonlyArray<string> | number | undefined; children?: string; } declare interface OutputHTMLAttributes<T> extends HTMLAttributes<T> { form?: string | undefined; for?: string | undefined; name?: string | undefined; } declare interface ParamHTMLAttributes<T> extends HTMLAttributes<T> { name?: string | undefined; value?: string | ReadonlyArray<string> | number | undefined; children?: undefined; } declare type PreventDefault<T> = { [K in keyof QwikEventMap<T> as `preventdefault:${Lowercase<K>}`]?: boolean; }; declare interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> { max?: number | string | undefined; value?: string | ReadonlyArray<string> | number | undefined; } /** * The `QRL` type represents a lazy-loadable AND serializable resource. * * QRL stands for Qwik URL. * * Use `QRL` when you want to refer to a lazy-loaded resource. `QRL`s are most often used for * code (functions) but can also be used for other resources such as `string`s in the case of * styles. * * `QRL` is an opaque token that is generated by the Qwik Optimizer. (Do not rely on any * properties in `QRL` as it may change between versions.) * * ## Creating `QRL` references * * Creating `QRL` is done using `$(...)` function. `$(...)` is a special marker for the Qwik * Optimizer that marks that the code should be extracted into a lazy-loaded symbol. * * ```tsx * useOnDocument( * 'mousemove', * $((event) => console.log('mousemove', event)) * ); * ``` * * In the above code, the Qwik Optimizer detects `$(...)` and transforms the code as shown below: * * ```tsx * // FILE: <current file> * useOnDocument('mousemove', qrl('./chunk-abc.js', 'onMousemove')); * * // FILE: chunk-abc.js * export const onMousemove = () => console.log('mousemove'); * ``` * * NOTE: `qrl(...)` is a result of Qwik Optimizer transformation. You should never have to invoke * this function directly in your application. The `qrl(...)` function should be invoked only * after the Qwik Optimizer transformation. * * ## Using `QRL`s * * Use `QRL` type in your application when you want to get a lazy-loadable reference to a * resource (most likely a function). * * ```tsx * // Example of declaring a custom functions which takes callback as QRL. * export function useMyFunction(callback: QRL<() => void>) { * doExtraStuff(); * // The callback passed to `onDocument` requires `QRL`. * useOnDocument('mousemove', callback); * } * ``` * * In the above example, the way to think about the code is that you are not asking for a * callback function but rather a reference to a lazy-loadable callback function. Specifically, * the function loading should be delayed until it is actually needed. In the above example, the * function would not load until after a `mousemove` event on `document` fires. * * ## Resolving `QRL` references * * At times it may be necessary to resolve a `QRL` reference to the actual value. This can be * performed using `QRL.resolve(..)` function. * * ```tsx * // Assume you have QRL reference to a greet function * const lazyGreet: QRL<() => void> = $(() => console.log('Hello World!')); * * // Use `qrlImport` to load / resolve the reference. * const greet: () => void = await lazyGreet.resolve(); * * // Invoke it * greet(); * ``` * * NOTE: `element` is needed because `QRL`s are relative and need a base location to resolve * against. The base location is encoded in the HTML in the form of `<div q:base="/url">`. * * ## Question: Why not just use `import()`? * * At first glance, `QRL` serves the same purpose as `import()`. However, there are three subtle * differences that need to be taken into account. * * 1. `QRL`s must be serializable into HTML. * 2. `QRL`s must be resolved by framework relative to `q:base`. * 3. `QRL`s must be able to capture lexically scoped variables. * 4. `QRL`s encapsulate the difference between running with and without Qwik Optimizer. * 5. `QRL`s allow expressing lazy-loaded boundaries without thinking about chunk and symbol * names. * * Let's assume that you intend to write code such as this: * * ```tsx * return <button onClick={() => (await import('./chunk-abc.js')).onClick}> * ``` * * The above code needs to be serialized into DOM such as: * * ``` * <div q:base="/build/"> * <button on:click="./chunk-abc.js#onClick">...</button> * </div> * ``` * * 1. Notice there is no easy way to extract chunk (`./chunk-abc.js`) and symbol (`onClick`) into * HTML. * 2. Notice that even if you could extract it, the `import('./chunk-abc.js')` would become * relative to where the `import()` file is declared. Because it is our framework doing the load, * the `./chunk-abc.js` would become relative to the framework file. This is not correct, as it * should be relative to the original file generated by the bundler. * 3. Next, the framework needs to resolve the `./chunk-abc.js` and needs a base location that is * encoded in the HTML. * 4. The QRL needs to be able to capture lexically scoped variables. (`import()` only allows * loading top-level symbols which don't capture variables.) * 5. As a developer, you don't want to think about `import` and naming the chunks and symbols. * You just want to say: "this should be lazy." * * These are the main reasons why Qwik introduces its own concept of `QRL`. * * @see `$` * * @public */ declare interface QRL<TYPE = any> { __brand__QRL__: TYPE; /** * Resolve the QRL of closure and invoke it. * @param signal - An AbortSignal object. * @param args - Closure arguments. * @returns A promise of the return value of the closure. */ (signal: AbortSignal, ...args: TYPE extends (...args: infer ARGS) => any ? ARGS : never): Promise<TYPE extends (...args: any[]) => infer RETURN ? Awaited<RETURN> : never>; /** * Resolve the QRL of closure and invoke it. * @param args - Closure arguments. * @returns A promise of the return value of the closure. */ (...args: TYPE extends (...args: infer ARGS) => any ? ARGS : never): Promise<TYPE extends (...args: any[]) => infer RETURN ? Awaited<RETURN> : never>; /** * Resolve the QRL and return the actual value. */ resolve(): Promise<TYPE>; getCaptured(): any[] | null; getSymbol(): string; getHash(): string; dev: QRLDev | null; } /** * @public */ declare interface QRLDev { file: string; lo: number; hi: number; } declare interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> { cite?: string | undefined; } /** * @public */ declare interface QwikAnimationEvent<T = Element> extends SyntheticEvent<T, NativeAnimationEvent> { animationName: string; elapsedTime: number; pseudoElement: string; } /** * @public */ declare interface QwikChangeEvent<T = Element> extends SyntheticEvent<T> { target: EventTarget & T; } /** * @public */ declare interface QwikClipboardEvent<T = Element> extends SyntheticEvent<T, NativeClipboardEvent> { clipboardData: DataTransfer; } /** * @public */ declare interface QwikCompositionEvent<T = Element> extends SyntheticEvent<T, NativeCompositionEvent> { data: string; } declare interface QwikCustomEvents<El> { [key: `${'document:' | 'window:' | ''}on${string}$`]: SingleOrArray<NativeEventHandler<Event, El>> | SingleOrArray<Function> | SingleOrArray<undefined>; } declare interface QwikCustomHTMLAttributes<T> extends HTMLAttributes<T> { [key: string]: any; } declare interface QwikCustomHTMLElement extends HTMLElement { } /** * @public */ declare interface QwikDragEvent<T = Element> extends QwikMouseEvent<T, NativeDragEvent> { dataTransfer: DataTransfer; } declare type QwikEventMap<T> = { Copy: QwikClipboardEvent<T>; CopyCapture: QwikClipboardEvent<T>; Cut: QwikClipboardEvent<T>; CutCapture: QwikClipboardEvent<T>; Paste: QwikClipboardEvent<T>; PasteCapture: QwikClipboardEvent<T>; CompositionEnd: QwikCompositionEvent<T>; CompositionEndCapture: QwikCompositionEvent<T>; CompositionStart: QwikCompositionEvent<T>; CompositionStartCapture: QwikCompositionEvent<T>; CompositionUpdate: QwikCompositionEvent<T>; CompositionUpdateCapture: QwikCompositionEvent<T>; Focus: QwikFocusEvent<T>; FocusCapture: QwikFocusEvent<T>; Focusin: QwikFocusEvent<T>; FocusinCapture: QwikFocusEvent<T>; Focusout: QwikFocusEvent<T>; FocusoutCapture: QwikFocusEvent<T>; Blur: QwikFocusEvent<T>; BlurCapture: QwikFocusEvent<T>; Change: QwikChangeEvent<T>; ChangeCapture: QwikChangeEvent<T>; Input: Event; InputCapture: Event; Reset: Event; ResetCapture: Event; Submit: QwikSubmitEvent<T>; SubmitCapture: Event; Invalid: QwikInvalidEvent<T>; InvalidCapture: QwikInvalidEvent<T>; Load: Event; LoadCapture: Event; Error: Event; ErrorCapture: Event; KeyDown: QwikKeyboardEvent<T>; KeyDownCapture: QwikKeyboardEvent<T>; KeyPress: QwikKeyboardEvent<T>; KeyPressCapture: QwikKeyboardEvent<T>; KeyUp: QwikKeyboardEvent<T>; KeyUpCapture: QwikKeyboardEvent<T>; AuxClick: QwikMouseEvent<T>; Click: QwikMouseEvent<T>; ClickCapture: QwikMouseEvent<T>; ContextMenu: QwikMouseEvent<T>; ContextMenuCapture: QwikMouseEvent<T>; DblClick: QwikMouseEvent<T>; DblClickCapture: QwikMouseEvent<T>; Drag: QwikDragEvent<T>; DragCapture: QwikDragEvent<T>; DragEnd: QwikDragEvent<T>; DragEndCapture: QwikDragEvent<T>; DragEnter: QwikDragEvent<T>; DragEnterCapture: QwikDragEvent<T>; DragExit: QwikDragEvent<T>; DragExitCapture: QwikDragEvent<T>; DragLeave: QwikDragEvent<T>; DragLeaveCapture: QwikDragEvent<T>; DragOver: QwikDragEvent<T>; DragOverCapture: QwikDragEvent<T>; DragStart: QwikDragEvent<T>; DragStartCapture: QwikDragEvent<T>; Drop: QwikDragEvent<T>; DropCapture: QwikDragEvent<T>; MouseDown: QwikMouseEvent<T>; MouseDownCapture: QwikMouseEvent<T>; MouseEnter: QwikMouseEvent<T>; MouseLeave: QwikMouseEvent<T>; MouseMove: QwikMouseEvent<T>; MouseMoveCapture: QwikMouseEvent<T>; MouseOut: QwikMouseEvent<T>; MouseOutCapture: QwikMouseEvent<T>; MouseOver: QwikMouseEvent<T>; MouseOverCapture: QwikMouseEvent<T>; MouseUp: QwikMouseEvent<T>; MouseUpCapture: QwikMouseEvent<T>; TouchCancel: QwikTouchEvent<T>; TouchCancelCapture: QwikTouchEvent<T>; TouchEnd: QwikTouchEvent<T>; TouchEndCapture: QwikTouchEvent<T>; TouchMove: QwikTouchEvent<T>; TouchMoveCapture: QwikTouchEvent<T>; TouchStart: QwikTouchEvent<T>; TouchStartCapture: QwikTouchEvent<T>; PointerDown: QwikPointerEvent<T>; PointerDownCapture: QwikPointerEvent<T>; PointerMove: QwikPointerEvent<T>; PointerMoveCapture: QwikPointerEvent<T>; PointerUp: QwikPointerEvent<T>; PointerUpCapture: QwikPointerEvent<T>; PointerCancel: QwikPointerEvent<T>; PointerCancelCapture: QwikPointerEvent<T>; PointerEnter: QwikPointerEvent<T>; PointerEnterCapture: QwikPointerEvent<T>; PointerLeave: QwikPointerEvent<T>; PointerLeaveCapture: QwikPointerEvent<T>; PointerOver: QwikPointerEvent<T>; PointerOverCapture: QwikPointerEvent<T>; PointerOut: QwikPointerEvent<T>; PointerOutCapture: QwikPointerEvent<T>; GotPointerCapture: QwikPointerEvent<T>; GotPointerCaptureCapture: QwikPointerEvent<T>; LostPointerCapture: QwikPointerEvent<T>; LostPointerCaptureCapture: QwikPointerEvent<T>; Scroll: QwikUIEvent<T>; ScrollCapture: QwikUIEvent<T>; Wheel: QwikWheelEvent<T>; WheelCapture: QwikWheelEvent<T>; AnimationStart: QwikAnimationEvent<T>; AnimationStartCapture: QwikAnimationEvent<T>; AnimationEnd: QwikAnimationEvent<T>; AnimationEndCapture: QwikAnimationEvent<T>; AnimationIteration: QwikAnimationEvent<T>; AnimationIterationCapture: QwikAnimationEvent<T>; TransitionEnd: QwikTransitionEvent<T>; TransitionEndCapture: QwikTransitionEvent<T>; AudioProcess: Event; CanPlay: Event; CanPlayThrough: Event; Complete: Event; DurationChange: Event; Emptied: Event; Ended: Event; LoadedData: Event; LoadedMetadata: Event; Pause: Event; Play: Event; Playing: Event; Progress: Event; RateChange: Event; Seeked: Event; Seeking: Event; Stalled: Event; Suspend: Event; TimeUpdate: Event; VolumeChange: Event; Waiting: Event; }; /** * @public */ declare interface QwikEvents<T> extends QwikKnownEvents<T>, QwikCustomEvents<T> { 'document:onLoad$'?: BivariantEventHandler<Event, T>; 'document:onScroll$'?: BivariantEventHandler<QwikUIEvent<T>, T>; 'document:onVisible$'?: BivariantEventHandler<Event, T>; 'document:onVisibilityChange$'?: BivariantEventHandler<Event, T>; } /** * @public */ declare interface QwikFocusEvent<T = Element> extends SyntheticEvent<T, NativeFocusEvent> { relatedTarget: EventTarget | null; target: EventTarget & T; } /** * @public */ declare interface QwikIntrinsicAttributes { key?: string | number | undefined | null; } /** * The interface holds available attributes of both native DOM elements and custom Qwik elements. * An example showing how to define a customizable wrapper component: * * ```tsx * import { component$, Slot, type QwikIntrinsicElements } from "@builder.io/qwik"; * * type WrapperProps = { * attributes?: QwikIntrinsicElements["div"]; * }; * * export default component$<WrapperProps>(({ attributes }) => { * return ( * <div {...attributes} class="p-2"> * <Slot /> * </div> * ); * }); * ``` * @public */ declare interface QwikIntrinsicElements extends IntrinsicHTMLElements { script: QwikScriptHTMLAttributes<HTMLScriptElement>; [key: string]: QwikCustomHTMLAttributes<QwikCustomHTMLElement>; } /** * @public */ declare interface QwikInvalidEvent<T = Element> extends SyntheticEvent<T> { target: EventTarget & T; } /** * @public */ declare interface QwikKeyboardEvent<T = Element> extends SyntheticEvent<T, NativeKeyboardEvent> { isComposing: boolean; altKey: boolean; charCode: number; ctrlKey: boolean; /** * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method. */ getModifierState(key: string): boolean; /** * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values */ key: string; keyCode: number; locale: string; location: number; metaKey: boolean; repeat: boolean; shiftKey: boolean; which: number; } declare type QwikKnownEvents<T> = { [K in keyof QwikEventMap<T> as `${'document:' | 'window:' | ''}on${K}$`]?: SingleOrArray<BivariantEventHandler<QwikEventMap<T>[K], T>>; }; /** * @public */ declare interface QwikMouseEvent<T = Element, E = NativeMouseEvent> extends SyntheticEvent<T, E> { altKey: boolean; button: number; buttons: number; clientX: number; clientY: number; ctrlKey: boolean; /** * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method. */ getModifierState(key: string): boolean; metaKey: boolean; movementX: number; movementY: number; pageX