import { PropDef, SyElement } from '@sylar_iii/ui'; /** Particle look and motion. */ export type SyParticleEffect = 'nebula' | 'trail' | 'sparkle' | 'fire' | 'smoke' | 'bubbles' | 'confetti' | 'stars' | 'snow' | 'hearts'; /** `additive` adds light (glowing on dark backgrounds), `normal` paints over. Empty = the effect's default. */ export type SyParticleBlend = '' | 'additive' | 'normal'; type Shape = 'dot' | 'soft' | 'spark' | 'star' | 'rect' | 'ring' | 'heart'; interface EffectDef { shape: Shape; additive: boolean; colors: string[]; /** Random start speed (px per frame at speed 1). */ spread: number; /** Share of the pointer's velocity a particle inherits. */ inherit: number; /** Downward pull per frame; negative rises. */ gravity: number; /** Velocity kept per frame (0–1). */ drag: number; /** Size at end of life relative to start (0 shrinks away, 3 grows to triple). */ grow: number; /** Swirl strength: particles curl around their path. */ swirl: number; /** Side-to-side drift (snow, bubbles). */ wobble: number; spin: boolean; /** Multipliers for the count, life and size props. */ countMul: number; lifeMul: number; sizeMul: number; } /** Built-in effects. Colors are defaults; the colors prop replaces them. */ export declare const SY_PARTICLE_EFFECTS: Readonly>; /** Splits a comma list of CSS colors, keeping commas inside rgb()/hsl() parentheses. */ export declare function parseColors(value: string): string[]; /** * Particles that follow the pointer, drawn on a canvas behind the slotted content: * `

Hello

`. * No dependencies; stops drawing when nothing moves and honors prefers-reduced-motion. */ export declare class SyParticleCursorElement extends SyElement { static props: Record; static styles: string; effect: SyParticleEffect; /** Comma-separated CSS colors (hex, rgb(), hsl(), names). Empty = the effect's palette. */ colors: string; /** Particles per pointer move (multiplied by the effect). */ count: number; /** Base particle size in px. */ size: number; /** Particle lifetime in ms (multiplied by the effect). */ life: number; /** Motion speed multiplier. */ speed: number; /** Extra downward pull added to the effect's own (negative rises). */ gravity: number; blend: SyParticleBlend; /** Follow the pointer over the whole page with a fixed, full-viewport canvas. */ global: boolean; /** When no pointer is over the element, an invisible cursor wanders so the effect is always visible. */ autoplay: boolean; /** Clicking (or tapping) bursts extra particles. */ clickBurst: boolean; /** Hard cap on live particles, for performance. */ maxParticles: number; disabled: boolean; private _canvas; private _ctx; private _particles; private _frame; private _last; private _pointer; private _ratio; private _visible; private _resize; private _intersect; private _reduce; private _target; /** Live particle count (read-only). */ get activeParticles(): number; protected render(root: ShadowRoot): void; connectedCallback(): void; disconnectedCallback(): void; protected update(changed: ReadonlySet): void; /** Emits `amount` particles at (x, y) in px relative to the element (the viewport when global). */ burst(x: number, y: number, amount?: number): void; /** Removes every particle immediately. */ clear(): void; private get _effect(); private _reduced; private readonly _onResize; private _listen; private _unlisten; private _local; private readonly _onMove; private readonly _onDown; private readonly _onLeave; /** Spreads a move's particles along the segment so fast moves leave a continuous trail. */ private _emitAlong; private _spawn; private _fit; private _start; private readonly _tick; /** Invisible cursor on a slow figure-eight inside the element. */ private _wander; private _step; private _draw; /** Each shape and color is rendered once to a small canvas, then stamped with drawImage (far faster than paths). */ private readonly _sprites; private _sprite; } declare global { interface HTMLElementTagNameMap { 'sy-particle-cursor': SyParticleCursorElement; } } export {};