/** * @file Spinner factory — lazily builds the Socket `Spinner` class that wraps * `yocto-spinner` with Socket-specific behaviors (custom RGB color pipeline, * shimmer, progress bar, indented step messages, status methods that don't * auto-stop, *AndStop variants that auto-clear). The class graph is * constructed by `createSpinnerClass()` so the `super()` call binds against * the live `YoctoSpinner` constructor resolved here; building it lazily keeps * the module free of side effects at import time. */ import type { YoctoSpinnerConstructor } from './create-spinner-class.js'; import type { SpinnerInstance, SpinnerOptions } from './types.js'; export type YoctoSpinnerFactory = (options: Record) => { constructor: YoctoSpinnerConstructor; }; /** * Create a spinner instance for displaying loading indicators. Provides an * animated CLI spinner with status messages, progress tracking, and shimmer * effects. * * AUTO-CLEAR BEHAVIOR: * * - All *AndStop() methods AUTO-CLEAR the spinner line via yocto-spinner.stop() * Examples: `doneAndStop()`, `successAndStop()`, `failAndStop()`, etc. * - Methods WITHOUT "AndStop" do NOT clear, so the spinner keeps spinning. * Examples: `done()`, `success()`, `fail()`, etc. * * STREAM USAGE: * * - Spinner animation: stderr, the yocto-spinner default. * - Status methods `done`, `success`, `fail`, `info`, `warn`, `step`, and * `substep`: stderr * - Data methods (`log()`): stdout * * COMPARISON WITH LOGGER: * * - `logger.done()` does NOT auto-clear (requires manual `logger.clearLine()`) * - `spinner.doneAndStop()` DOES auto-clear (built into yocto-spinner.stop()) * - Pattern: `logger.clearLine().done()` vs `spinner.doneAndStop()` * * @param options - Configuration options for the spinner. * * @returns New spinner instance */ export declare function Spinner(options?: SpinnerOptions | undefined): SpinnerInstance;