UNPKG

ranui

Version:

A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.

54 lines (53 loc) 1.62 kB
import { RanElement } from '../../utils'; export type { LoadingVariant } from './types'; export declare enum ICON_NAME_AMP { DOUBLE_BOUNCE = "double-bounce", ROTATE = "rotate", STRETCH = "stretch", CUBE = "cube", DOT = "dot", TRIPLE_BOUNCE = "triple-bounce", SCALE_OUT = "scale-out", CIRCLE = "circle", CIRCLE_LINE = "circle-line", SQUARE = "square", PULSE = "pulse", SOLAR = "solar", CUBE_FOLD = "cube-fold", CIRCLE_FOLD = "circle-fold", CUBE_GRID = "cube-grid", CIRCLE_TURN = "circle-turn", CIRCLE_ROTATE = "circle-rotate", CIRCLE_SPIN = "circle-spin", DOT_BAR = "dot-bar", DOT_CIRCLE = "dot-circle", LINE = "line", DOT_PULSE = "dot-pulse", LINE_SCALE = "line-scale", TEXT = "text", CUBE_DIM = "cube-dim", DOT_LINE = "dot-line", ARC = "arc", DROP = "drop", PACMAN = "pacman" } export declare class Loading extends RanElement { contain: HTMLDivElement; _shadowDom: ShadowRoot; /** 递增令牌:异步渲染回来时若 name 已变则丢弃,避免竞态覆盖。 */ private _renderToken; /** 最近一次渲染的 Promise,便于测试 await。 */ _pending: Promise<void>; static get observedAttributes(): string[]; constructor(); get name(): ICON_NAME_AMP; set name(value: string); get sheet(): string; set sheet(value: string); handlerExternalCss: () => void; private applyVariant; createLoading: () => void; connectedCallback(): void; attributeChangedCallback(k: string, o: string, n: string): void; } export default Loading;