UNPKG

lume

Version:

Build next-level interactive web applications.

870 lines 52.9 kB
import { Object3D } from 'three/src/core/Object3D.js'; import { Transformable } from './Transformable.js'; import { ElementOperations } from './ElementOperations.js'; import type { Element3D } from './Element3D.js'; import type { Scene } from './Scene.js'; import { type CompositionType } from './CompositionTracker.js'; import type { TransformableAttributes } from './Transformable.js'; import type { SinglePropertyFunction } from './PropertyAnimator.js'; export type BaseAttributes = TransformableAttributes | 'opacity'; declare const SharedAPI_base: { new (...args: any[]): { initialBehaviors?: Record<string, string>; "__#19@#setBehaviors"(): void; connectedCallback?(): void; disconnectedCallback?(): void; adoptedCallback?(): void; attributeChangedCallback?(name: string, oldVal: string | null, newVal: string | null): void; accessKey: string; readonly accessKeyLabel: string; autocapitalize: string; dir: string; draggable: boolean; hidden: boolean; inert: boolean; innerText: string; lang: string; readonly offsetHeight: number; readonly offsetLeft: number; readonly offsetParent: Element | null; readonly offsetTop: number; readonly offsetWidth: number; outerText: string; popover: string | null; spellcheck: boolean; title: string; translate: boolean; attachInternals(): ElementInternals; click(): void; hidePopover(): void; showPopover(): void; togglePopover(force?: boolean): boolean; addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; readonly attributes: NamedNodeMap; readonly classList: DOMTokenList; className: string; readonly clientHeight: number; readonly clientLeft: number; readonly clientTop: number; readonly clientWidth: number; id: string; innerHTML: string; readonly localName: string; readonly namespaceURI: string | null; onfullscreenchange: ((this: Element, ev: Event) => any) | null; onfullscreenerror: ((this: Element, ev: Event) => any) | null; outerHTML: string; readonly ownerDocument: Document; readonly part: DOMTokenList; readonly prefix: string | null; readonly scrollHeight: number; scrollLeft: number; scrollTop: number; readonly scrollWidth: number; readonly shadowRoot: ShadowRoot | null; slot: string; readonly tagName: string; attachShadow(init: ShadowRootInit): ShadowRoot; checkVisibility(options?: CheckVisibilityOptions): boolean; closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null; closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null; closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null; closest<E extends Element = Element>(selectors: string): E | null; computedStyleMap(): StylePropertyMapReadOnly; getAttribute(qualifiedName: string): string | null; getAttributeNS(namespace: string | null, localName: string): string | null; getAttributeNames(): string[]; getAttributeNode(qualifiedName: string): Attr | null; getAttributeNodeNS(namespace: string | null, localName: string): Attr | null; getBoundingClientRect(): DOMRect; getClientRects(): DOMRectList; getElementsByClassName(classNames: string): HTMLCollectionOf<Element>; getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>; getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>; getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>; getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>; getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>; getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>; getHTML(options?: GetHTMLOptions): string; hasAttribute(qualifiedName: string): boolean; hasAttributeNS(namespace: string | null, localName: string): boolean; hasAttributes(): boolean; hasPointerCapture(pointerId: number): boolean; insertAdjacentElement(where: InsertPosition, element: Element): Element | null; insertAdjacentHTML(position: InsertPosition, string: string): void; insertAdjacentText(where: InsertPosition, data: string): void; matches(selectors: string): boolean; releasePointerCapture(pointerId: number): void; removeAttribute(qualifiedName: string): void; removeAttributeNS(namespace: string | null, localName: string): void; removeAttributeNode(attr: Attr): Attr; requestFullscreen(options?: FullscreenOptions): Promise<void>; requestPointerLock(options?: PointerLockOptions): Promise<void>; scroll(options?: ScrollToOptions): void; scroll(x: number, y: number): void; scrollBy(options?: ScrollToOptions): void; scrollBy(x: number, y: number): void; scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void; scrollTo(options?: ScrollToOptions): void; scrollTo(x: number, y: number): void; setAttribute(qualifiedName: string, value: string): void; setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void; setAttributeNode(attr: Attr): Attr | null; setAttributeNodeNS(attr: Attr): Attr | null; setHTMLUnsafe(html: string): void; setPointerCapture(pointerId: number): void; toggleAttribute(qualifiedName: string, force?: boolean): boolean; webkitMatchesSelector(selectors: string): boolean; readonly baseURI: string; readonly childNodes: NodeListOf<ChildNode>; readonly firstChild: ChildNode | null; readonly isConnected: boolean; readonly lastChild: ChildNode | null; readonly nextSibling: ChildNode | null; readonly nodeName: string; readonly nodeType: number; nodeValue: string | null; readonly parentElement: HTMLElement | null; readonly parentNode: ParentNode | null; readonly previousSibling: ChildNode | null; textContent: string | null; appendChild<T extends Node>(node: T): T; cloneNode(deep?: boolean): Node; compareDocumentPosition(other: Node): number; contains(other: Node | null): boolean; getRootNode(options?: GetRootNodeOptions): Node; hasChildNodes(): boolean; insertBefore<T extends Node>(node: T, child: Node | null): T; isDefaultNamespace(namespace: string | null): boolean; isEqualNode(otherNode: Node | null): boolean; isSameNode(otherNode: Node | null): boolean; lookupNamespaceURI(prefix: string | null): string | null; lookupPrefix(namespace: string | null): string | null; normalize(): void; removeChild<T extends Node>(child: T): T; replaceChild<T extends Node>(node: Node, child: T): T; readonly ELEMENT_NODE: 1; readonly ATTRIBUTE_NODE: 2; readonly TEXT_NODE: 3; readonly CDATA_SECTION_NODE: 4; readonly ENTITY_REFERENCE_NODE: 5; readonly ENTITY_NODE: 6; readonly PROCESSING_INSTRUCTION_NODE: 7; readonly COMMENT_NODE: 8; readonly DOCUMENT_NODE: 9; readonly DOCUMENT_TYPE_NODE: 10; readonly DOCUMENT_FRAGMENT_NODE: 11; readonly NOTATION_NODE: 12; readonly DOCUMENT_POSITION_DISCONNECTED: 1; readonly DOCUMENT_POSITION_PRECEDING: 2; readonly DOCUMENT_POSITION_FOLLOWING: 4; readonly DOCUMENT_POSITION_CONTAINS: 8; readonly DOCUMENT_POSITION_CONTAINED_BY: 16; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32; dispatchEvent(event: Event): boolean; ariaAtomic: string | null; ariaAutoComplete: string | null; ariaBrailleLabel: string | null; ariaBrailleRoleDescription: string | null; ariaBusy: string | null; ariaChecked: string | null; ariaColCount: string | null; ariaColIndex: string | null; ariaColSpan: string | null; ariaCurrent: string | null; ariaDescription: string | null; ariaDisabled: string | null; ariaExpanded: string | null; ariaHasPopup: string | null; ariaHidden: string | null; ariaInvalid: string | null; ariaKeyShortcuts: string | null; ariaLabel: string | null; ariaLevel: string | null; ariaLive: string | null; ariaModal: string | null; ariaMultiLine: string | null; ariaMultiSelectable: string | null; ariaOrientation: string | null; ariaPlaceholder: string | null; ariaPosInSet: string | null; ariaPressed: string | null; ariaReadOnly: string | null; ariaRequired: string | null; ariaRoleDescription: string | null; ariaRowCount: string | null; ariaRowIndex: string | null; ariaRowSpan: string | null; ariaSelected: string | null; ariaSetSize: string | null; ariaSort: string | null; ariaValueMax: string | null; ariaValueMin: string | null; ariaValueNow: string | null; ariaValueText: string | null; role: string | null; animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation; getAnimations(options?: GetAnimationsOptions): Animation[]; after(...nodes: (Node | string)[]): void; before(...nodes: (Node | string)[]): void; remove(): void; replaceWith(...nodes: (Node | string)[]): void; readonly nextElementSibling: Element | null; readonly previousElementSibling: Element | null; readonly childElementCount: number; readonly children: HTMLCollection; readonly firstElementChild: Element | null; readonly lastElementChild: Element | null; append(...nodes: (Node | string)[]): void; prepend(...nodes: (Node | string)[]): void; querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null; querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null; querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null; querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null; querySelector<E extends Element = Element>(selectors: string): E | null; querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>; querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>; querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>; querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>; querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>; replaceChildren(...nodes: (Node | string)[]): void; readonly assignedSlot: HTMLSlotElement | null; behaviors: import("packages/element-behaviors/dist/BehaviorMap.js").BehaviorMap; readonly attributeStyleMap: StylePropertyMap; readonly style: CSSStyleDeclaration; contentEditable: string; enterKeyHint: string; inputMode: string; readonly isContentEditable: boolean; onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null; onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null; onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null; onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null; onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null; onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null; onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null; onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null; oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null; ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null; onended: ((this: GlobalEventHandlers, ev: Event) => any) | null; onerror: OnErrorEventHandler; onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null; ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null; oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null; onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null; onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null; onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null; onload: ((this: GlobalEventHandlers, ev: Event) => any) | null; onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null; onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null; onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null; onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null; onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null; onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null; onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null; onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null; onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null; onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null; onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null; onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null; onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null; onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null; onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null; onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null; onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null; onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null; ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null; ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null; onbeforexrselect: ((this: GlobalEventHandlers, ev: XRSessionEvent) => any) | null; autofocus: boolean; readonly dataset: DOMStringMap; nonce?: string; tabIndex: number; blur(): void; focus(options?: FocusOptions): void; }; observedAttributes?: string[]; } & { new (...args: any[]): { awaitChildrenDefined: boolean; syncChildCallbacks: boolean; connectedCallback(): void; disconnectedCallback(): void; childConnectedCallback?(_child: Element): void; childDisconnectedCallback?(_child: Element): void; "__#18@#awaitedChildren": Set<Element>; "__#18@#runChildConnectedCallbacks"(): void; "__#18@#runChildConnect"(child: Element): void; "__#18@#runChildDisconnectedCallbacks"(): void; "__#18@#runChildDisconnect"(child: Element): void; "__#18@#unobserveChildren": (() => void) | null; "__#18@#createObserver"(): void; "__#18@#destroyObserver"(): void; adoptedCallback?(): void; attributeChangedCallback?(name: string, oldVal: string | null, newVal: string | null): void; accessKey: string; readonly accessKeyLabel: string; autocapitalize: string; dir: string; draggable: boolean; hidden: boolean; inert: boolean; innerText: string; lang: string; readonly offsetHeight: number; readonly offsetLeft: number; readonly offsetParent: Element | null; readonly offsetTop: number; readonly offsetWidth: number; outerText: string; popover: string | null; spellcheck: boolean; title: string; translate: boolean; attachInternals(): ElementInternals; click(): void; hidePopover(): void; showPopover(): void; togglePopover(force?: boolean): boolean; addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; readonly attributes: NamedNodeMap; readonly classList: DOMTokenList; className: string; readonly clientHeight: number; readonly clientLeft: number; readonly clientTop: number; readonly clientWidth: number; id: string; innerHTML: string; readonly localName: string; readonly namespaceURI: string | null; onfullscreenchange: ((this: Element, ev: Event) => any) | null; onfullscreenerror: ((this: Element, ev: Event) => any) | null; outerHTML: string; readonly ownerDocument: Document; readonly part: DOMTokenList; readonly prefix: string | null; readonly scrollHeight: number; scrollLeft: number; scrollTop: number; readonly scrollWidth: number; readonly shadowRoot: ShadowRoot | null; slot: string; readonly tagName: string; attachShadow(init: ShadowRootInit): ShadowRoot; checkVisibility(options?: CheckVisibilityOptions): boolean; closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null; closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null; closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null; closest<E extends Element = Element>(selectors: string): E | null; computedStyleMap(): StylePropertyMapReadOnly; getAttribute(qualifiedName: string): string | null; getAttributeNS(namespace: string | null, localName: string): string | null; getAttributeNames(): string[]; getAttributeNode(qualifiedName: string): Attr | null; getAttributeNodeNS(namespace: string | null, localName: string): Attr | null; getBoundingClientRect(): DOMRect; getClientRects(): DOMRectList; getElementsByClassName(classNames: string): HTMLCollectionOf<Element>; getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>; getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>; getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>; getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>; getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>; getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>; getHTML(options?: GetHTMLOptions): string; hasAttribute(qualifiedName: string): boolean; hasAttributeNS(namespace: string | null, localName: string): boolean; hasAttributes(): boolean; hasPointerCapture(pointerId: number): boolean; insertAdjacentElement(where: InsertPosition, element: Element): Element | null; insertAdjacentHTML(position: InsertPosition, string: string): void; insertAdjacentText(where: InsertPosition, data: string): void; matches(selectors: string): boolean; releasePointerCapture(pointerId: number): void; removeAttribute(qualifiedName: string): void; removeAttributeNS(namespace: string | null, localName: string): void; removeAttributeNode(attr: Attr): Attr; requestFullscreen(options?: FullscreenOptions): Promise<void>; requestPointerLock(options?: PointerLockOptions): Promise<void>; scroll(options?: ScrollToOptions): void; scroll(x: number, y: number): void; scrollBy(options?: ScrollToOptions): void; scrollBy(x: number, y: number): void; scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void; scrollTo(options?: ScrollToOptions): void; scrollTo(x: number, y: number): void; setAttribute(qualifiedName: string, value: string): void; setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void; setAttributeNode(attr: Attr): Attr | null; setAttributeNodeNS(attr: Attr): Attr | null; setHTMLUnsafe(html: string): void; setPointerCapture(pointerId: number): void; toggleAttribute(qualifiedName: string, force?: boolean): boolean; webkitMatchesSelector(selectors: string): boolean; readonly baseURI: string; readonly childNodes: NodeListOf<ChildNode>; readonly firstChild: ChildNode | null; readonly isConnected: boolean; readonly lastChild: ChildNode | null; readonly nextSibling: ChildNode | null; readonly nodeName: string; readonly nodeType: number; nodeValue: string | null; readonly parentElement: HTMLElement | null; readonly parentNode: ParentNode | null; readonly previousSibling: ChildNode | null; textContent: string | null; appendChild<T extends Node>(node: T): T; cloneNode(deep?: boolean): Node; compareDocumentPosition(other: Node): number; contains(other: Node | null): boolean; getRootNode(options?: GetRootNodeOptions): Node; hasChildNodes(): boolean; insertBefore<T extends Node>(node: T, child: Node | null): T; isDefaultNamespace(namespace: string | null): boolean; isEqualNode(otherNode: Node | null): boolean; isSameNode(otherNode: Node | null): boolean; lookupNamespaceURI(prefix: string | null): string | null; lookupPrefix(namespace: string | null): string | null; normalize(): void; removeChild<T extends Node>(child: T): T; replaceChild<T extends Node>(node: Node, child: T): T; readonly ELEMENT_NODE: 1; readonly ATTRIBUTE_NODE: 2; readonly TEXT_NODE: 3; readonly CDATA_SECTION_NODE: 4; readonly ENTITY_REFERENCE_NODE: 5; readonly ENTITY_NODE: 6; readonly PROCESSING_INSTRUCTION_NODE: 7; readonly COMMENT_NODE: 8; readonly DOCUMENT_NODE: 9; readonly DOCUMENT_TYPE_NODE: 10; readonly DOCUMENT_FRAGMENT_NODE: 11; readonly NOTATION_NODE: 12; readonly DOCUMENT_POSITION_DISCONNECTED: 1; readonly DOCUMENT_POSITION_PRECEDING: 2; readonly DOCUMENT_POSITION_FOLLOWING: 4; readonly DOCUMENT_POSITION_CONTAINS: 8; readonly DOCUMENT_POSITION_CONTAINED_BY: 16; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32; dispatchEvent(event: Event): boolean; ariaAtomic: string | null; ariaAutoComplete: string | null; ariaBrailleLabel: string | null; ariaBrailleRoleDescription: string | null; ariaBusy: string | null; ariaChecked: string | null; ariaColCount: string | null; ariaColIndex: string | null; ariaColSpan: string | null; ariaCurrent: string | null; ariaDescription: string | null; ariaDisabled: string | null; ariaExpanded: string | null; ariaHasPopup: string | null; ariaHidden: string | null; ariaInvalid: string | null; ariaKeyShortcuts: string | null; ariaLabel: string | null; ariaLevel: string | null; ariaLive: string | null; ariaModal: string | null; ariaMultiLine: string | null; ariaMultiSelectable: string | null; ariaOrientation: string | null; ariaPlaceholder: string | null; ariaPosInSet: string | null; ariaPressed: string | null; ariaReadOnly: string | null; ariaRequired: string | null; ariaRoleDescription: string | null; ariaRowCount: string | null; ariaRowIndex: string | null; ariaRowSpan: string | null; ariaSelected: string | null; ariaSetSize: string | null; ariaSort: string | null; ariaValueMax: string | null; ariaValueMin: string | null; ariaValueNow: string | null; ariaValueText: string | null; role: string | null; animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation; getAnimations(options?: GetAnimationsOptions): Animation[]; after(...nodes: (Node | string)[]): void; before(...nodes: (Node | string)[]): void; remove(): void; replaceWith(...nodes: (Node | string)[]): void; readonly nextElementSibling: Element | null; readonly previousElementSibling: Element | null; readonly childElementCount: number; readonly children: HTMLCollection; readonly firstElementChild: Element | null; readonly lastElementChild: Element | null; append(...nodes: (Node | string)[]): void; prepend(...nodes: (Node | string)[]): void; querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null; querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null; querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null; querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null; querySelector<E extends Element = Element>(selectors: string): E | null; querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>; querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>; querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>; querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>; querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>; replaceChildren(...nodes: (Node | string)[]): void; readonly assignedSlot: HTMLSlotElement | null; behaviors: import("packages/element-behaviors/dist/BehaviorMap.js").BehaviorMap; readonly attributeStyleMap: StylePropertyMap; readonly style: CSSStyleDeclaration; contentEditable: string; enterKeyHint: string; inputMode: string; readonly isContentEditable: boolean; onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null; onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null; onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null; onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null; onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null; onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null; onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null; onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null; oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null; ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null; onended: ((this: GlobalEventHandlers, ev: Event) => any) | null; onerror: OnErrorEventHandler; onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null; ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null; oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null; onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null; onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null; onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null; onload: ((this: GlobalEventHandlers, ev: Event) => any) | null; onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null; onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null; onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null; onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null; onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null; onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null; onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null; onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null; onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null; onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null; onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null; onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null; onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null; onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null; onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null; onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null; onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null; onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null; ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null; ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null; onbeforexrselect: ((this: GlobalEventHandlers, ev: XRSessionEvent) => any) | null; autofocus: boolean; readonly dataset: DOMStringMap; nonce?: string; tabIndex: number; blur(): void; focus(options?: FocusOptions): void; }; observedAttributes?: string[]; } & { new (...a: any[]): { set<T extends any, K extends keyof T, V extends T[K]>(props: Partial<Record<K, V>>): any; }; } & typeof Transformable; /** * @abstract * @class SharedAPI - This is an abstract base class that provides common * properties and methods for the non-abstract [`Element3D`](./Element3D) and * [`Scene`](./Scene) custom element classes. * * This class is not intended for extension by end users. You'll want to extend * from [`Scene`](./Scene) or [`Element3D`](./Element3D) (or their * subclasses) instead of this class. * * For purposes of documentation it is still useful to know what properties and * methods subclasses inherit from here. * * @extends Settable * @extends Transformable */ export declare class SharedAPI extends SharedAPI_base { #private; /** @deprecated use `.defineElement()` instead */ static define(name?: string): void; /** @property {boolean} isScene - True if a subclass of this class is a Scene. */ isScene: boolean; /** * @property {boolean} isElement3D - True if a subclass of this class is an `Element3D`. */ isElement3D: boolean; /** * @property {string | number | null} opacity - * * *attribute* * * Default: `1` * * Set the object's opacity. * * The value should be a number from `0` to `1`. `0` is fully transparent, and `1` is fully opaque. */ set opacity(newValue: number | SinglePropertyFunction); get opacity(): number; /** * @property {boolean} debug - * * `attribute` * * Default: `false` * * When `true`, show debug visuals for the object. Not all objects implement * debug visuals yet. */ debug: boolean; /** * @deprecated * @property {boolean} glLoaded * * DEPRECATED Now always true. For logic depending on this in an effect (f.e. returning early when false), instead init things when an element is connected, and uninit when an element is disconnected. * * *readonly* */ get glLoaded(): boolean; /** * @deprecated * @property {boolean} cssLoaded * * DEPRECATED Now always true. For logic depending on this in an effect (f.e. returning early when false), instead init things when an element is connected, and uninit when an element is disconnected. * * *readonly* */ get cssLoaded(): boolean; /** * @property {THREE.Scene} scene - * * *signal*, *readonly* * * The `<lume-scene>` that the element is a child or grandchild of, `null` * if the element is not a descendant of a Scene, `null` if the child is a * descendant of a Scene that is not connected into the DOM, or `null` if * the element is a descendant of a connected Scene but the element is not * participating in the composed tree (i.e. the element is not distributed * to a `<slot>` element of a ShadowRoot of the element's parent). */ get scene(): Scene | null; /** * @property {Object3D} three - * * *readonly* * * The WebGL rendering content of this element. Useful if you know Three.js * APIs. See * [`Object3D`](https://threejs.org/docs/index.html#api/en/core/Object3D). */ get three(): ReturnType<this['makeThreeObject3d']>; /** * @method recreateThree - Replaces the current three object with a new * one, reconnecting it to the same parent and children. This can be useful * in scenarios where a property of a three object needs to be updated but the property * can only be updated via the constructor, requiring us to make a new object. */ recreateThree(): void; /** * @property {Object3D} threeCSS - * * *readonly* * * The CSS rendering content of this element. Useful if you know Three.js * APIs. See * [`THREE.Object3D`](https://threejs.org/docs/index.html#api/en/core/Object3D). */ get threeCSS(): ReturnType<this['makeThreeCSSObject']>; /** * @method recreateThreeCSS - Replaces the current threeCSS object with a new * one, reconnecting it to the same parent and children. This can be useful * in scenarios where a property of a threeCSS object needs to be updated but the property * can only be updated via the constructor, requiring us to make a new object. */ recreateThreeCSS(): void; connectedCallback(): void; disconnectedCallback(): void; composedCallback(composedParent: Element, compositionType: CompositionType): void; uncomposedCallback(uncomposedParent: Element, compositionType: CompositionType): void; /** * Called whenever a child element is composed to this element. * This is called with a `compositionType` argument that tells us how the element is * composed relative to the ["composed tree"](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM). * * @param {"root" | "slot" | "actual"} compositionType - If the value is * `"root"`, then the child was composed as a child of a shadow root of the * current element. If the value is `"slot"`, then the child was composed (i.e. distributed, or assigned) to * the current element via a [`<slot>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) element. * If the value is `"actual"`, then the child was composed to the current * element as a regular child (`childComposedCallback` with `"actual"` passed * in is essentially the same as [`ChildTracker`](./ChildTracker)'s [`childConnectedCallback`](./ChildTracker#childconnectedcallback)). */ childComposedCallback(child: Element, _compositionType: CompositionType): void; childUncomposedCallback(child: Element, _compositionType: CompositionType): void; /** @abstract */ traverseSceneGraph(_visitor: (el: SharedAPI) => void, _waitForUpgrade?: boolean): Promise<void> | void; /** * Overrides [`TreeNode.parentLumeElement`](./TreeNode?id=parentLumeElement) to assert * that parents are `SharedAPI` (`Element3D` or `Scene`) instances. */ get parentLumeElement(): SharedAPI | null; /** * @method needsUpdate - Schedules a rendering update for the element. * Usually you don't need to call this when using the outer APIs, as setting * attributes or properties will queue an update. * * But if you're doing something special to an Element3D or a Scene, f.e. * modifying the [`.three`](#three) or [`.threeCSS`](#threeCSS) properties * whose updates are not tracked (are not reactive), you should call this so * that LUME will know to re-render the visuals for the element. * * Example: * * ```js * const mesh = document.querySelector('lume-mesh') * * // Custom modification of underlying Three.js objects: * mesh.three.material.transparent = true * mesh.three.material.opacity = 0.4 * mesh.three.add(new THREE.Mesh(...)) * * // Tell LUME the element