import type { Homography, ResolvedShape, TiltParams } from '@ax-design/shape'; import type { PropertySpec } from '@ax-design/typed-om'; import type { Quad, ShapeSpec } from '@ax-design/shape'; import type { TriggerTarget } from './triggers.js'; import type { PointerListener, PointerState } from './global.js'; import type { LocalPointer, PaintBox } from './layer.js'; import type { FrameClient, Quality } from './scheduler.js'; import { Values } from './schema.js'; import type { MotionState } from './tilt.js'; import type { Point, TiltParams as Tilt } from '@ax-design/shape'; declare const ElementBase: typeof HTMLElement; export declare class AxSurface extends ElementBase implements FrameClient, PointerListener, TriggerTarget { static readonly ElementName: string; static get observedAttributes(): string[]; private root; private contentBox; private layerBox; private containers; private tiltKey; private layers; private pendingLayers; private layerNames; private activeNames; private binding; private values; private connected; private visible; private width; private height; private shape; private paint; private borderWidths; private inner; private styleDirty; private sizeDirty; private pointerDirty; private tiltDirty; private tiltFrom; private tiltTo; private tiltStart; private tiltNow; private homography; private pressPoint; private released; private apiPress; private takenOver; private tiltChanged; private motionState; private motionDirty; private contentHidden; private contentFadeStart; private contentOpacity; private flatPaint; private paintMoved; private appearanceSeen; private previous; private uniformBorder; private hostAnimating; private reads; private geometryPending; private paintKey; private parentFound; private parentSurfaceNow; private get parentSurface(); private offsetInParent; isTilted(): boolean; private ancestorTilted; private toUntiltedLocal; toLocal(x: number, y: number): Point | null; private geometryFresh; private ringCache; private ringInner; private needsGeometry; private rect; private lastRect; private local; private animating; constructor(); static extraSheets(): CSSStyleSheet[]; static schemaKey: string; static extraSchema: PropertySpec[]; protected layerNames_(): string[]; protected shapeFor(values: Values, width: number, height: number): ShapeSpec; protected borderWidthsFor(values: Values): Quad; protected tiltParams(values: Values, width: number, height: number, x: number, y: number): Tilt | null; protected tiltPerspective(values: Values): number; protected pointerAllowed(): boolean; protected get currentValues(): Values | null; private layerOverflow; protected layerReach(): number; connectedCallback(): void; disconnectedCallback(): void; private visibilityElement; private inView; private pausedNow; private onVisibility; /** * A paused surface runs no frame, reads no style and draws nothing, as one outside the viewport, * until it is resumed (paused = false), which draws it again at once. For a surface that is * known to show nothing for a while (a part of a component that is faded out): a page with * hundreds of them then costs nothing until they show. */ get paused(): boolean; set paused(on: boolean); /** * The element whose visibility in the viewport is this surface's. Its own box by default. A surface * that always lies inside another element's box (the parts of a component, in the component's * shadow root) may return that element: the page then watches one element for all of them, which * matters when a component has dozens of surfaces. */ protected visibilityTarget(): Element; private onLayerRegistered; attributeChangedCallback(name: string): void; private get precise(); private startObserving; private stopObserving; private mayAnimate; invalidateStyle(): void; refresh(): void; private buildLayers; private layersAttached; private attachLayers; private setVisible; private onAppearance; private onStyleChange; onPointer(_state: PointerState, type: string): void; private onPointerDown; private pointerPressing; press(at?: { x: number; y: number; } | 'center'): void; private apiPoint; release(): void; get pressTakenOver(): boolean; pressRemaining(): number; private endPointerPress; private endApiPress; private requestFrame; priority(): number; read(): void; private mappable; compute(now: number): void; write(now: number, quality: Quality): void; /** * Moves the surface in 3D and fades it, for one frame: call it on every frame of an animation * with the state of that frame, and with null to end it. `rotateX` / `rotateY` (degrees), * `translateZ` (px) and `perspective` (px, default 1000) turn the surface around `originX` / * `originY` (local px, default its center; may lie outside it), outside its press tilt. `opacity` * fades it. Nothing is written on an ancestor of the layers: the layers draw the motion * themselves, so acrylic keeps its backdrop. In Firefox, where no 3D transform may sit above * acrylic, a 3D motion hides the content, which fades back in once the motion ends. */ motion(state: MotionState | null): void; private layersHidden; private writeLayersHidden; private writeContentOpacity; private clipKey; private writeClip; private canTilt; private writeTilt; get debugState(): { width: number; height: number; paint: PaintBox; shape: ResolvedShape | null; tilt: TiltParams | null; homography: Homography | null; motion: MotionState | null; local: LocalPointer | null; values: Values | null; }; } export {};