/** * @file Shimmer-configuration methods for the Socket `Spinner` class, split out * of `create-spinner-class.ts` to keep that module under the file-size cap. * The methods read and write the spinner's shimmer state through well-known * symbols (`getShimmerSymbol`, `setShimmerSymbol`, `getSavedShimmerSymbol`, * `setSavedShimmerSymbol`, `updateTextSymbol`) the class exposes, so they * share the same private state without crossing the private-field boundary. * `installShimmerMethods()` defines them on the prototype after the class is * built. */ import type { ShimmerInfo, SpinnerInstance } from './types.js'; /** * Well-known symbol the spinner class exposes to read its current shimmer * state. */ export declare const getShimmerSymbol: unique symbol; /** * Well-known symbol the spinner class exposes to replace its current shimmer * state. */ export declare const setShimmerSymbol: unique symbol; /** * Well-known symbol the spinner class exposes to read the saved shimmer config * that `enableShimmer()` restores from. */ export declare const getSavedShimmerSymbol: unique symbol; /** * Well-known symbol the spinner class exposes to replace the saved shimmer * config. */ export declare const setSavedShimmerSymbol: unique symbol; /** * Well-known symbol the spinner class exposes for its `#updateSpinnerText` * helper so the shimmer methods can trigger a re-render after a state change. */ export declare const updateTextSymbol: unique symbol; /** * Runtime shape of the spinner instance the shimmer methods operate on. */ export type ShimmerHost = SpinnerInstance & { [getShimmerSymbol]: () => ShimmerInfo | undefined; [setShimmerSymbol]: (value: ShimmerInfo | undefined) => void; [getSavedShimmerSymbol]: () => ShimmerInfo | undefined; [setSavedShimmerSymbol]: (value: ShimmerInfo | undefined) => void; [updateTextSymbol]: () => void; }; /** * Install the shimmer-configuration methods + `shimmerState` getter onto the * spinner prototype. The methods reach the spinner's private shimmer state * through the well-known symbols the class exposes. * * @param proto - The spinner class prototype to augment. */ export declare function installShimmerMethods(proto: object): void;