{"version":3,"names":["Animated","pulse","shimmer","wave","Shimmer","props","baseColor","highlightColor","speed","direction","paused","tick","time","children","Wave","from","to","wavelength","Pulse","flashColor","period"],"sources":["components.tsx"],"sourcesContent":["import type { ColorInput } from \"bun\";\nimport type { Accessor, Element as JSXElement } from \"solid-js\";\nimport { Animated } from \"./animated.tsx\";\nimport { pulse, shimmer, wave } from \"./effects.ts\";\n\n/**\n * Named wrappers for the built-in effects. Each runs its effect across all of\n * its children as one linked region — so a shimmer (or wave, or pulse) sweeps a\n * spinner glyph and the text beside it together:\n *\n * ```tsx\n * <Shimmer baseColor=\"#666\" highlightColor=\"#fff\">\n *   <Spinner />\n *   <text>{` ${verb}…`}</text>\n * </Shimmer>\n * ```\n *\n * For a custom effect, use `<Animated effect={…}>` directly.\n */\n\ntype GroupProps = {\n\tchildren: JSXElement;\n\t/** Freeze the animation at its resting color. */\n\tpaused?: boolean;\n\t/** Clock tick in ms. Default 50. */\n\ttick?: number;\n\t/** Share an external clock instead of creating one. */\n\ttime?: Accessor<number>;\n};\n\nexport type ShimmerProps = GroupProps & {\n\tbaseColor: ColorInput;\n\thighlightColor: ColorInput;\n\t/** Milliseconds per cell. Lower = faster. Default 200. */\n\tspeed?: number;\n\t/** Sweep direction. Default \"ltr\". */\n\tdirection?: \"ltr\" | \"rtl\";\n};\n\nexport function Shimmer(props: ShimmerProps) {\n\treturn (\n\t\t<Animated\n\t\t\teffect={shimmer({\n\t\t\t\tbaseColor: () => props.baseColor,\n\t\t\t\thighlightColor: () => props.highlightColor,\n\t\t\t\tspeed: props.speed,\n\t\t\t\tdirection: props.direction,\n\t\t\t})}\n\t\t\tpaused={props.paused}\n\t\t\ttick={props.tick}\n\t\t\ttime={props.time}\n\t\t>\n\t\t\t{props.children}\n\t\t</Animated>\n\t);\n}\n\nexport type WaveProps = GroupProps & {\n\tfrom: ColorInput;\n\tto: ColorInput;\n\t/** Milliseconds per full cycle. Default 1500. */\n\tspeed?: number;\n\t/** Cells per wave. Default 6. */\n\twavelength?: number;\n};\n\nexport function Wave(props: WaveProps) {\n\treturn (\n\t\t<Animated\n\t\t\teffect={wave({\n\t\t\t\tfrom: () => props.from,\n\t\t\t\tto: () => props.to,\n\t\t\t\tspeed: props.speed,\n\t\t\t\twavelength: props.wavelength,\n\t\t\t})}\n\t\t\tpaused={props.paused}\n\t\t\ttick={props.tick}\n\t\t\ttime={props.time}\n\t\t>\n\t\t\t{props.children}\n\t\t</Animated>\n\t);\n}\n\nexport type PulseProps = GroupProps & {\n\tbaseColor: ColorInput;\n\tflashColor: ColorInput;\n\t/** Full cycle period in ms. Default 2000. */\n\tperiod?: number;\n};\n\nexport function Pulse(props: PulseProps) {\n\treturn (\n\t\t<Animated\n\t\t\teffect={pulse({\n\t\t\t\tbaseColor: () => props.baseColor,\n\t\t\t\tflashColor: () => props.flashColor,\n\t\t\t\tperiod: props.period,\n\t\t\t})}\n\t\t\tpaused={props.paused}\n\t\t\ttick={props.tick}\n\t\t\ttime={props.time}\n\t\t>\n\t\t\t{props.children}\n\t\t</Animated>\n\t);\n}\n"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,KAAK,EAAEC,OAAO,EAAEC,IAAI,QAAQ,cAAc;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA,OAAO,SAASC,OAAOA,CAACC,KAAmB,EAAE;EAC5C,OACC,CAAC,QAAQ,CACR,MAAM,CAAC,CAACH,OAAO,CAAC;IACfI,SAAS,EAAEA,CAAA,KAAMD,KAAK,CAACC,SAAS;IAChCC,cAAc,EAAEA,CAAA,KAAMF,KAAK,CAACE,cAAc;IAC1CC,KAAK,EAAEH,KAAK,CAACG,KAAK;IAClBC,SAAS,EAAEJ,KAAK,CAACI;EAClB,CAAC,CAAC,CAAC,CACH,MAAM,CAAC,CAACJ,KAAK,CAACK,MAAM,CAAC,CACrB,IAAI,CAAC,CAACL,KAAK,CAACM,IAAI,CAAC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