{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ripple-reveal",
  "title": "Ripple Reveal",
  "description": "Hide or show a sensitive value with a ripple that starts exactly where you tap. A damped sine swell travels out across the surface and flips the content between its shown and hidden faces as the front passes, with a soft tap and a light haptic.",
  "dependencies": [
    "@rexa-developer/tiks",
    "web-haptics"
  ],
  "files": [
    {
      "path": "src/registry/components/ripple-reveal/ripple-reveal.tsx",
      "content": "\"use client\";\n\nimport { useTiks } from \"@rexa-developer/tiks/react\";\nimport {\n\ttype ComponentProps,\n\tcreateContext,\n\ttype MouseEvent,\n\ttype ReactNode,\n\ttype RefObject,\n\tuseContext,\n\tuseEffect,\n\tuseId,\n\tuseLayoutEffect,\n\tuseReducer,\n\tuseRef,\n\tuseState,\n} from \"react\";\nimport { useWebHaptics } from \"web-haptics/react\";\nimport { cn } from \"@/lib/utils\";\n\n// The wave, in CSS px and seconds.\n/** Time for the front to cross the surface: a base, plus 1 s per `CROSSING_PX` of reach. */\nconst BASE_CROSSING = 0.36;\nconst CROSSING_PX = 4000;\nconst MIN_CROSSING = 0.38;\nconst MAX_CROSSING = 0.55;\n/** Wavelength, as a fraction of the reach. */\nconst WAVELENGTH_FACTOR = 0.45;\nconst MIN_WAVELENGTH = 48;\nconst MAX_WAVELENGTH = 150;\n/** Decay per radian of the swell: one full period leaves about 18 percent. */\nconst DECAY_RATIO = 0.27;\n/** Steepest slope of the swell at full strength, just behind the front. */\nconst MAX_SLOPE = 0.6;\n/** Strength left at the far corner. */\nconst FAR_STRENGTH = 0.65;\n/** Hiding is the same wave, a touch calmer. */\nconst HIDE_STRENGTH = 0.85;\n/** The slope eases to zero this close to the tap point, in px, so it never pinches. */\nconst CENTER_EASE = 12;\n/** Periods the surface rings after the front leaves the far corner. */\nconst RING_PERIODS = 1.5;\n/** The last part of the ring fades out over this many periods, so nothing pops. */\nconst FADE_PERIODS = 0.5;\n/** Live fronts at once; another tap retires the oldest. */\nconst MAX_FRONTS = 3;\n/** Soft edge of each front's mask, in px. */\nconst FEATHER = 1.5;\n/** The light fades out over this many px at the surface's edges, or a quarter of its height. */\nconst EDGE_FEATHER = 8;\n/** Peak scale step of the face inside a front, and of the face outside it. */\nconst LENS_IN = 0.02;\nconst LENS_OUT = 0.012;\n/** Cross-fade without WebGL or with reduced motion, in ms. */\nconst FADE_MS = 140;\nconst MAX_BACKING_SCALE = 2;\n/** Light strengths when the surface's custom properties are unset. */\nconst DEFAULT_HIGHLIGHT = 0.6;\nconst DEFAULT_SHADE = 0.12;\n\n// A fingertip on a taut surface: a short burst of pink noise through a low\n// band-pass. No pitch sweep, so it never turns into a droplet. Reveal sits a\n// shade higher than hide.\nconst REVEAL_SOUND = {\n\tname: \"ripple-reveal-show\",\n\tbaseFreq: 440,\n\tnoiseColor: \"pink\",\n\toscType: \"sine\",\n\tfilterFreq: 640,\n\tfilterQ: 2.2,\n\tattack: 0.001,\n\tdecay: 1.1,\n\tbrightness: 1500,\n} as const;\nconst HIDE_SOUND = {\n\t...REVEAL_SOUND,\n\tname: \"ripple-reveal-hide\",\n\tfilterFreq: 500,\n} as const;\n\nconst VERTEX_SHADER = `\nattribute vec2 aPosition;\nvoid main() {\n\tgl_Position = vec4(aPosition, 0.0, 1.0);\n}\n`;\n\n// One damped sine per front, evaluated per pixel. The slope becomes a surface\n// normal lit from the top left; only light is drawn, in premultiplied alpha,\n// and flat water draws nothing at all.\nconst FRAGMENT_SHADER = `\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\nuniform vec2 uSize;\nuniform float uHeight;\nuniform float uScale;\nuniform vec2 uOrigin[${MAX_FRONTS}];\nuniform float uAge[${MAX_FRONTS}];\nuniform float uSpeed[${MAX_FRONTS}];\nuniform float uFreq[${MAX_FRONTS}];\nuniform float uDecay[${MAX_FRONTS}];\nuniform float uStrength[${MAX_FRONTS}];\nuniform float uReach[${MAX_FRONTS}];\nuniform float uHighlight;\nuniform float uShade;\n\n// Toward the light, top left (y points down), and halfway to the viewer.\nconst vec3 LIGHT = vec3(-0.42, -0.56, 0.714);\nconst vec3 HALFWAY = vec3(-0.227, -0.303, 0.926);\n\nvoid main() {\n\tvec2 px = vec2(gl_FragCoord.x, uHeight - gl_FragCoord.y) / uScale;\n\tvec2 grad = vec2(0.0);\n\tvec2 displacement = vec2(0.0);\n\tfloat rise = 0.0;\n\tfloat height = 0.0;\n\tfloat glint = 0.0;\n\n\tfor (int i = 0; i < ${MAX_FRONTS}; i++) {\n\t\tif (uStrength[i] <= 0.0) continue;\n\t\tvec2 d = px - uOrigin[i];\n\t\tfloat r = length(d);\n\t\tvec2 direction = d / max(r, 1.0);\n\t\t// How long ago the front reached this pixel.\n\t\tfloat local = max(0.0, uAge[i] - r / uSpeed[i]);\n\t\tfloat env = exp(-uDecay[i] * local);\n\t\tfloat s = sin(uFreq[i] * local);\n\t\tfloat c = cos(uFreq[i] * local);\n\t\tfloat swell = s * env;\n\t\tfloat k = uStrength[i] * mix(1.0, ${FAR_STRENGTH.toFixed(2)}, clamp(r / uReach[i], 0.0, 1.0));\n\t\t// Px behind the front, anti-aliased over one px; nothing moves ahead of it.\n\t\tfloat behind = uAge[i] * uSpeed[i] - r;\n\t\tfloat reached = clamp(behind + 0.5, 0.0, 1.0) * smoothstep(0.0, ${CENTER_EASE.toFixed(1)}, r);\n\t\t// The slope along the radius, normalised so the steepest is 1.\n\t\tfloat slope = -(c - (uDecay[i] / uFreq[i]) * s) * env * k * reached;\n\t\t// Where a DOM texture would be sampled once HTML-in-canvas ships.\n\t\tdisplacement += ${MAX_SLOPE.toFixed(2)} * uSpeed[i] / uFreq[i] * swell * k * direction;\n\t\tgrad += ${MAX_SLOPE.toFixed(2)} * slope * direction;\n\t\trise -= slope;\n\t\theight += swell * k;\n\t\tglint += k * exp(-behind * behind * 1.4);\n\t}\n\n\t// Light fades out near the edges, so on a bare line of text it never reads as a box.\n\tvec2 edge = min(px, uSize - px);\n\tfloat feather = clamp(min(uSize.x, uSize.y) * 0.25, 1.0, ${EDGE_FEATHER.toFixed(1)});\n\tfloat edges = smoothstep(0.0, feather, min(edge.x, edge.y));\n\n\tvec3 n = normalize(vec3(-grad, 1.0));\n\tfloat diffuse = (dot(n, LIGHT) - LIGHT.z) / 0.3;\n\tfloat specular = max(pow(max(dot(n, HALFWAY), 0.0), 48.0) - pow(HALFWAY.z, 48.0), 0.0);\n\tfloat light = uHighlight * clamp(\n\t\t0.6 * specular + 0.25 * max(diffuse, 0.0) + 0.6 * max(rise, 0.0) +\n\t\t0.35 * max(height, 0.0) + 0.35 * glint,\n\t\t0.0, 1.0);\n\tfloat shade = uShade * clamp(\n\t\t0.35 * max(-diffuse, 0.0) + 0.5 * max(-rise, 0.0) + 0.9 * max(-height, 0.0),\n\t\t0.0, 1.0);\n\tlight *= edges;\n\tshade *= edges;\n\tgl_FragColor = vec4(vec3(light), light + shade * (1.0 - light));\n}\n`;\n\nconst UNIFORMS = [\n\t\"uSize\",\n\t\"uHeight\",\n\t\"uScale\",\n\t\"uOrigin\",\n\t\"uAge\",\n\t\"uSpeed\",\n\t\"uFreq\",\n\t\"uDecay\",\n\t\"uStrength\",\n\t\"uReach\",\n\t\"uHighlight\",\n\t\"uShade\",\n] as const;\n\ninterface WaveRenderer {\n\tcanvas: HTMLCanvasElement;\n\tgl: WebGLRenderingContext;\n\tuniforms: Record<(typeof UNIFORMS)[number], WebGLUniformLocation | null>;\n}\n\n// One WebGL context for the whole page: browsers cap live contexts at about\n// 16, and a list of accounts can hold a dozen values. Each surface draws here\n// and copies the result into its own 2D canvas in the same frame.\nlet renderer: WaveRenderer | null = null;\n/** Set once WebGL is missing, fails to build, or loses its context; the fade is used from then on. */\nlet rendererBroken = false;\nconst lossListeners = new Set<() => void>();\nconst scratch = {\n\torigin: new Float32Array(MAX_FRONTS * 2),\n\tage: new Float32Array(MAX_FRONTS),\n\tspeed: new Float32Array(MAX_FRONTS),\n\tfreq: new Float32Array(MAX_FRONTS),\n\tdecay: new Float32Array(MAX_FRONTS),\n\tstrength: new Float32Array(MAX_FRONTS),\n\treach: new Float32Array(MAX_FRONTS),\n};\n\nfunction compileShader(\n\tgl: WebGLRenderingContext,\n\ttype: number,\n\tsource: string,\n) {\n\tconst shader = gl.createShader(type);\n\tif (!shader) return null;\n\tgl.shaderSource(shader, source);\n\tgl.compileShader(shader);\n\tif (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n\t\tgl.deleteShader(shader);\n\t\treturn null;\n\t}\n\treturn shader;\n}\n\nfunction createRenderer(): WaveRenderer | null {\n\tconst canvas = document.createElement(\"canvas\");\n\tcanvas.width = 1;\n\tcanvas.height = 1;\n\tconst options: WebGLContextAttributes = {\n\t\talpha: true,\n\t\tantialias: false,\n\t\tdepth: false,\n\t\tstencil: false,\n\t\tpremultipliedAlpha: true,\n\t\tpreserveDrawingBuffer: false,\n\t\tpowerPreference: \"low-power\",\n\t};\n\tconst gl = (canvas.getContext(\"webgl2\", options) ??\n\t\tcanvas.getContext(\"webgl\", options)) as WebGLRenderingContext | null;\n\tif (!gl) return null;\n\n\tconst vertex = compileShader(gl, gl.VERTEX_SHADER, VERTEX_SHADER);\n\tconst fragment = compileShader(gl, gl.FRAGMENT_SHADER, FRAGMENT_SHADER);\n\tconst program = gl.createProgram();\n\tif (!vertex || !fragment || !program) return null;\n\tgl.attachShader(program, vertex);\n\tgl.attachShader(program, fragment);\n\tgl.linkProgram(program);\n\tif (!gl.getProgramParameter(program, gl.LINK_STATUS)) return null;\n\t// biome-ignore lint/correctness/useHookAtTopLevel: WebGL's useProgram, not a React hook\n\tgl.useProgram(program);\n\n\t// One triangle that covers the viewport.\n\tgl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer());\n\tgl.bufferData(\n\t\tgl.ARRAY_BUFFER,\n\t\tnew Float32Array([-1, -1, 3, -1, -1, 3]),\n\t\tgl.STATIC_DRAW,\n\t);\n\tconst position = gl.getAttribLocation(program, \"aPosition\");\n\tgl.enableVertexAttribArray(position);\n\tgl.vertexAttribPointer(position, 2, gl.FLOAT, false, 0, 0);\n\tgl.clearColor(0, 0, 0, 0);\n\n\tconst uniforms = {} as WaveRenderer[\"uniforms\"];\n\tfor (const name of UNIFORMS) {\n\t\tuniforms[name] = gl.getUniformLocation(program, name);\n\t}\n\n\t// A lost context isn't asked back: the fade takes over for the rest of the page.\n\tcanvas.addEventListener(\"webglcontextlost\", () => {\n\t\trenderer = null;\n\t\trendererBroken = true;\n\t\tfor (const listener of lossListeners) listener();\n\t});\n\treturn { canvas, gl, uniforms };\n}\n\n/** The page's wave renderer, created on first use. `null` means use the fade. */\nfunction getRenderer() {\n\tif (renderer || rendererBroken || typeof document === \"undefined\") {\n\t\treturn renderer;\n\t}\n\trenderer = createRenderer();\n\tif (!renderer) rendererBroken = true;\n\treturn renderer;\n}\n\n/** Builds the renderer and draws one empty frame, so the first ripple doesn't wait on the driver. */\nfunction warmRenderer() {\n\tif (renderer || rendererBroken || prefersReducedMotion()) return;\n\tconst created = getRenderer();\n\tif (!created) return;\n\tconst { gl, uniforms } = created;\n\tgl.viewport(0, 0, 1, 1);\n\tgl.uniform1fv(uniforms.uStrength, new Float32Array(MAX_FRONTS));\n\tgl.drawArrays(gl.TRIANGLES, 0, 3);\n\tgl.flush();\n}\n\nfunction prefersReducedMotion() {\n\treturn (\n\t\ttypeof window !== \"undefined\" &&\n\t\twindow.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n\t);\n}\n\nfunction clamp(value: number, min: number, max: number) {\n\treturn Math.min(Math.max(value, min), max);\n}\n\nfunction round(value: number) {\n\treturn Math.round(value * 100) / 100;\n}\n\ninterface Front {\n\t/** The tap point, in the surface's px. */\n\tx: number;\n\ty: number;\n\t/** `performance.now()` when the front left the tap point. */\n\tstart: number;\n\t/** The face the front turns on: `true` for the shown face. */\n\tto: boolean;\n\tspeed: number;\n\tfreq: number;\n\tdecay: number;\n\tstrength: number;\n\t/** Distance to the farthest corner of the surface. */\n\treach: number;\n\t/** Seconds for the front to reach the farthest corner. */\n\tcrossing: number;\n\tperiod: number;\n\t/** Seconds until the farthest corner is `RING_PERIODS` behind the front. */\n\tlife: number;\n}\n\nfunction createFront(\n\tx: number,\n\ty: number,\n\twidth: number,\n\theight: number,\n\tto: boolean,\n\tstart: number,\n): Front {\n\tconst reach = Math.max(\n\t\tMath.hypot(x, y),\n\t\tMath.hypot(width - x, y),\n\t\tMath.hypot(x, height - y),\n\t\tMath.hypot(width - x, height - y),\n\t\t1,\n\t);\n\t// A small value gets a slower wave so it is still seen; a big card doesn't drag.\n\tconst crossing = clamp(\n\t\tBASE_CROSSING + reach / CROSSING_PX,\n\t\tMIN_CROSSING,\n\t\tMAX_CROSSING,\n\t);\n\tconst speed = reach / crossing;\n\tconst wavelength = clamp(\n\t\tWAVELENGTH_FACTOR * reach,\n\t\tMIN_WAVELENGTH,\n\t\tMAX_WAVELENGTH,\n\t);\n\tconst freq = (2 * Math.PI * speed) / wavelength;\n\tconst period = wavelength / speed;\n\treturn {\n\t\tx,\n\t\ty,\n\t\tstart,\n\t\tto,\n\t\tspeed,\n\t\tfreq,\n\t\tdecay: DECAY_RATIO * freq,\n\t\tstrength: to ? 1 : HIDE_STRENGTH,\n\t\treach,\n\t\tcrossing,\n\t\tperiod,\n\t\tlife: crossing + RING_PERIODS * period,\n\t};\n}\n\n/** Strength of a front `age` seconds in, faded out over its last half period. */\nfunction strengthAt(front: Front, age: number) {\n\tconst fade = clamp((front.life - age) / (FADE_PERIODS * front.period), 0, 1);\n\treturn front.strength * fade;\n}\n\n/**\n * The same damped sine as the wave, stretched so half a period spans the\n * crossing. At the wave's own period the swell is spent before the front\n * reaches the value; this way the lens step peaks while it crosses the text.\n */\nfunction lensAt(front: Front, age: number) {\n\tconst freq = Math.PI / front.crossing;\n\treturn (\n\t\tMath.sin(freq * age) *\n\t\tMath.exp(-DECAY_RATIO * freq * age) *\n\t\tstrengthAt(front, age)\n\t);\n}\n\ntype Mode = \"idle\" | \"ripple\" | \"fade\";\n\ninterface Engine {\n\t/** The state every live front ends on. */\n\ttarget: boolean;\n\tmode: Mode;\n\tfronts: Front[];\n\tframe: number;\n\t/** Opacity of the shown face during the fade. */\n\tfade: number;\n\tlastTime: number;\n\t/** Surface size in px, and canvas px per px. */\n\twidth: number;\n\theight: number;\n\tscale: number;\n\t/** Where each face sits in the surface, measured once per ripple and on resize. */\n\tshownOffset: Point;\n\thiddenOffset: Point;\n\thighlight: number;\n\tshade: number;\n\tcontext: CanvasRenderingContext2D | null;\n}\n\ntype Point = { x: number; y: number };\n\ninterface SurfaceController {\n\t/** Plays the change to `next`. A `point` in client px is where the wave starts; `null` is the center. */\n\tplay: (next: boolean, point: Point | null, user: boolean) => void;\n}\n\ninterface RippleRevealContextValue {\n\trevealed: boolean;\n\tdisabled: boolean;\n\tsurfaceId: string;\n\tsurfaceRef: RefObject<SurfaceController | null>;\n\ttoggle: (point: Point) => void;\n}\n\nconst RippleRevealContext = createContext<RippleRevealContextValue | null>(\n\tnull,\n);\n\nfunction useRippleReveal() {\n\tconst context = useContext(RippleRevealContext);\n\tif (!context) {\n\t\tthrow new Error(\n\t\t\t\"RippleReveal parts must be rendered inside <RippleReveal>.\",\n\t\t);\n\t}\n\treturn context;\n}\n\nexport interface RippleRevealProps extends ComponentProps<\"div\"> {\n\t/** Controlled state: `true` shows the value, `false` hides it. */\n\trevealed?: boolean;\n\t/** Initial state when uncontrolled. */\n\tdefaultRevealed?: boolean;\n\t/** Called the moment the trigger is pressed, before the wave has crossed. */\n\tonRevealedChange?: (revealed: boolean) => void;\n\tdisabled?: boolean;\n\t/** Play a soft tap when the trigger is pressed. */\n\tsound?: boolean;\n\t/** Trigger a light haptic on supported devices when the trigger is pressed. */\n\thaptics?: boolean;\n}\n\nexport function RippleReveal({\n\trevealed: revealedProp,\n\tdefaultRevealed = true,\n\tonRevealedChange,\n\tdisabled = false,\n\tsound = true,\n\thaptics = true,\n\tclassName,\n\tchildren,\n\t...props\n}: RippleRevealProps) {\n\tconst [internalRevealed, setInternalRevealed] = useState(defaultRevealed);\n\tconst controlled = revealedProp !== undefined;\n\tconst revealed = controlled ? revealedProp : internalRevealed;\n\t// A controlled root re-renders on every press, so a refused change is played back.\n\tconst [, rerender] = useReducer((count: number) => count + 1, 0);\n\n\tconst surfaceId = useId();\n\tconst surfaceRef = useRef<SurfaceController | null>(null);\n\tconst { trigger: haptic } = useWebHaptics();\n\t// Sound stays on under reduced motion; only movement is reduced.\n\tconst { click: playTap, setTheme: setTapSound } = useTiks({\n\t\ttheme: REVEAL_SOUND,\n\t\trespectReducedMotion: false,\n\t});\n\n\t// Event handlers read the latest props through a ref.\n\tconst latest = useRef({\n\t\trevealed,\n\t\tcontrolled,\n\t\tonRevealedChange,\n\t\tdisabled,\n\t\tsound,\n\t\thaptics,\n\t});\n\tuseLayoutEffect(() => {\n\t\tlatest.current = {\n\t\t\trevealed,\n\t\t\tcontrolled,\n\t\t\tonRevealedChange,\n\t\t\tdisabled,\n\t\t\tsound,\n\t\t\thaptics,\n\t\t};\n\t});\n\n\t// Called only for user input, so the first render and prop changes stay quiet.\n\tconst toggle = (point: Point) => {\n\t\tconst current = latest.current;\n\t\tif (current.disabled) return;\n\t\tconst next = !current.revealed;\n\t\t// Two presses inside one frame still alternate.\n\t\tcurrent.revealed = next;\n\t\tif (current.controlled) rerender();\n\t\telse setInternalRevealed(next);\n\t\tcurrent.onRevealedChange?.(next);\n\t\tif (document.visibilityState !== \"hidden\") {\n\t\t\tif (current.sound) {\n\t\t\t\tsetTapSound(next ? REVEAL_SOUND : HIDE_SOUND);\n\t\t\t\tplayTap();\n\t\t\t}\n\t\t\tif (current.haptics) void haptic(\"light\");\n\t\t}\n\t\tsurfaceRef.current?.play(next, point, true);\n\t};\n\n\treturn (\n\t\t<RippleRevealContext.Provider\n\t\t\tvalue={{ revealed, disabled, surfaceId, surfaceRef, toggle }}\n\t\t>\n\t\t\t<div\n\t\t\t\tdata-slot=\"ripple-reveal\"\n\t\t\t\tdata-state={revealed ? \"revealed\" : \"hidden\"}\n\t\t\t\tdata-disabled={disabled || undefined}\n\t\t\t\t{...props}\n\t\t\t\tclassName={className}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</RippleRevealContext.Provider>\n\t);\n}\n\nconst DOT_KEYS = [\"a\", \"b\", \"c\", \"d\", \"e\"] as const;\n\n/** Five em-sized dots, so they don't depend on the font. */\nfunction Dots() {\n\treturn (\n\t\t<span className=\"inline-flex h-[1lh] items-center gap-[0.24em] align-top opacity-55\">\n\t\t\t{DOT_KEYS.map((key) => (\n\t\t\t\t<span key={key} className=\"size-[0.42em] rounded-full bg-current\" />\n\t\t\t))}\n\t\t</span>\n\t);\n}\n\n/** Readable text of a face, with its lines joined by spaces. */\nfunction textOf(element: HTMLElement | null) {\n\treturn element?.innerText.replace(/\\s+/g, \" \").trim() ?? \"\";\n}\n\nconst FACE_STYLES = [\n\t\"-webkit-mask-image\",\n\t\"mask-image\",\n\t\"-webkit-mask-composite\",\n\t\"mask-composite\",\n\t\"-webkit-mask-repeat\",\n\t\"mask-repeat\",\n\t\"-webkit-mask-size\",\n\t\"mask-size\",\n\t\"transform\",\n\t\"transform-origin\",\n\t\"opacity\",\n] as const;\n\nconst NO_MASK = \"linear-gradient(transparent, transparent)\";\nconst FULL_MASK = \"linear-gradient(#000, #000)\";\n\nexport interface RippleRevealSurfaceProps\n\textends Omit<ComponentProps<\"div\">, \"ref\"> {\n\t/** The shown face: the value itself. */\n\tchildren?: ReactNode;\n\t/** The hidden face. Defaults to five dots in the current text color. */\n\tplaceholder?: ReactNode;\n\t/** What assistive technology gets in place of the value while it's hidden. */\n\thiddenLabel?: string;\n\t/** Plain text announced on reveal. Defaults to the shown face's text. */\n\tvalueText?: string;\n}\n\nexport function RippleRevealSurface({\n\tchildren,\n\tplaceholder,\n\thiddenLabel = \"Hidden\",\n\tvalueText,\n\tclassName,\n\t...props\n}: RippleRevealSurfaceProps) {\n\tconst { revealed, surfaceId, surfaceRef: controllerRef } = useRippleReveal();\n\tconst [announcement, setAnnouncement] = useState(\"\");\n\n\tconst surfaceRef = useRef<HTMLDivElement>(null);\n\tconst shownRef = useRef<HTMLDivElement>(null);\n\tconst hiddenRef = useRef<HTMLDivElement>(null);\n\tconst canvasRef = useRef<HTMLCanvasElement>(null);\n\tconst pendingAnnouncementRef = useRef<boolean | null>(null);\n\tconst engineRef = useRef<Engine | null>(null);\n\tengineRef.current ??= {\n\t\ttarget: revealed,\n\t\tmode: \"idle\",\n\t\tfronts: [],\n\t\tframe: 0,\n\t\tfade: revealed ? 1 : 0,\n\t\tlastTime: 0,\n\t\twidth: 0,\n\t\theight: 0,\n\t\tscale: 1,\n\t\tshownOffset: { x: 0, y: 0 },\n\t\thiddenOffset: { x: 0, y: 0 },\n\t\thighlight: DEFAULT_HIGHLIGHT,\n\t\tshade: DEFAULT_SHADE,\n\t\tcontext: null,\n\t};\n\tconst engine = engineRef.current;\n\n\t/** Back to rest in the final state: no canvas pixels, masks, transforms, or frames. */\n\tconst stop = () => {\n\t\tcancelAnimationFrame(engine.frame);\n\t\tengine.frame = 0;\n\t\tengine.fronts = [];\n\t\tengine.mode = \"idle\";\n\t\tfor (const face of [shownRef.current, hiddenRef.current]) {\n\t\t\tif (!face) continue;\n\t\t\tfor (const property of FACE_STYLES) face.style.removeProperty(property);\n\t\t}\n\t\tsurfaceRef.current?.removeAttribute(\"data-animating\");\n\t\tconst canvas = canvasRef.current;\n\t\tif (canvas) {\n\t\t\t// Zero size frees the backing store until the next ripple.\n\t\t\tcanvas.width = 0;\n\t\t\tcanvas.height = 0;\n\t\t\tcanvas.style.removeProperty(\"display\");\n\t\t}\n\t};\n\n\tconst measure = () => {\n\t\tconst surface = surfaceRef.current;\n\t\tconst canvas = canvasRef.current;\n\t\tconst shown = shownRef.current;\n\t\tconst hidden = hiddenRef.current;\n\t\tif (!surface || !canvas || !shown || !hidden) return;\n\t\tengine.width = surface.clientWidth;\n\t\tengine.height = surface.clientHeight;\n\t\tengine.shownOffset = { x: shown.offsetLeft, y: shown.offsetTop };\n\t\tengine.hiddenOffset = { x: hidden.offsetLeft, y: hidden.offsetTop };\n\t\tengine.scale = Math.min(window.devicePixelRatio || 1, MAX_BACKING_SCALE);\n\t\tcanvas.width = Math.max(1, Math.round(engine.width * engine.scale));\n\t\tcanvas.height = Math.max(1, Math.round(engine.height * engine.scale));\n\t};\n\n\t/** Draws the wave into this surface's canvas. `false` once WebGL is gone. */\n\tconst drawWave = (now: number) => {\n\t\tconst canvas = canvasRef.current;\n\t\tconst wave = getRenderer();\n\t\tif (!canvas || !wave || wave.gl.isContextLost()) return false;\n\t\tengine.context ??= canvas.getContext(\"2d\");\n\t\tconst context = engine.context;\n\t\tif (!context) return false;\n\t\tconst { gl, uniforms } = wave;\n\t\tconst width = canvas.width;\n\t\tconst height = canvas.height;\n\t\tif (wave.canvas.width < width || wave.canvas.height < height) {\n\t\t\twave.canvas.width = Math.max(wave.canvas.width, width);\n\t\t\twave.canvas.height = Math.max(wave.canvas.height, height);\n\t\t}\n\t\tgl.viewport(0, 0, width, height);\n\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\n\t\tscratch.strength.fill(0);\n\t\tengine.fronts.forEach((front, index) => {\n\t\t\tconst age = (now - front.start) / 1000;\n\t\t\tscratch.origin[index * 2] = front.x;\n\t\t\tscratch.origin[index * 2 + 1] = front.y;\n\t\t\tscratch.age[index] = age;\n\t\t\tscratch.speed[index] = front.speed;\n\t\t\tscratch.freq[index] = front.freq;\n\t\t\tscratch.decay[index] = front.decay;\n\t\t\tscratch.strength[index] = strengthAt(front, age);\n\t\t\tscratch.reach[index] = front.reach;\n\t\t});\n\t\tgl.uniform2f(uniforms.uSize, engine.width, engine.height);\n\t\tgl.uniform1f(uniforms.uHeight, height);\n\t\tgl.uniform1f(uniforms.uScale, width / Math.max(engine.width, 1));\n\t\tgl.uniform2fv(uniforms.uOrigin, scratch.origin);\n\t\tgl.uniform1fv(uniforms.uAge, scratch.age);\n\t\tgl.uniform1fv(uniforms.uSpeed, scratch.speed);\n\t\tgl.uniform1fv(uniforms.uFreq, scratch.freq);\n\t\tgl.uniform1fv(uniforms.uDecay, scratch.decay);\n\t\tgl.uniform1fv(uniforms.uStrength, scratch.strength);\n\t\tgl.uniform1fv(uniforms.uReach, scratch.reach);\n\t\tgl.uniform1f(uniforms.uHighlight, engine.highlight);\n\t\tgl.uniform1f(uniforms.uShade, engine.shade);\n\t\tgl.drawArrays(gl.TRIANGLES, 0, 3);\n\n\t\t// The viewport sits at the bottom left of the shared canvas.\n\t\tcontext.clearRect(0, 0, width, height);\n\t\tcontext.drawImage(\n\t\t\twave.canvas,\n\t\t\t0,\n\t\t\twave.canvas.height - height,\n\t\t\twidth,\n\t\t\theight,\n\t\t\t0,\n\t\t\t0,\n\t\t\twidth,\n\t\t\theight,\n\t\t);\n\t\treturn true;\n\t};\n\n\t/**\n\t * Masks and scales one face. Each front still crossing is a circle; the\n\t * circles are combined with XOR, so every front a pixel has passed flips it.\n\t */\n\tconst paintFace = (face: HTMLElement, shown: boolean, now: number) => {\n\t\tconst offset = shown ? engine.shownOffset : engine.hiddenOffset;\n\t\tconst offsetX = offset.x;\n\t\tconst offsetY = offset.y;\n\t\t// Each front scales the face about its tap point; together they are one\n\t\t// uniform scale and a translation.\n\t\tlet scale = 1;\n\t\tlet x = 0;\n\t\tlet y = 0;\n\t\tfor (const front of engine.fronts) {\n\t\t\tconst age = (now - front.start) / 1000;\n\t\t\tconst step =\n\t\t\t\t1 + (front.to === shown ? LENS_IN : -LENS_OUT) * lensAt(front, age);\n\t\t\tconst originX = front.x - offsetX;\n\t\t\tconst originY = front.y - offsetY;\n\t\t\tscale *= step;\n\t\t\tx = step * x + (1 - step) * originX;\n\t\t\ty = step * y + (1 - step) * originY;\n\t\t}\n\n\t\tconst layers: string[] = [];\n\t\tfor (const front of engine.fronts) {\n\t\t\tconst radius = ((now - front.start) / 1000) * front.speed;\n\t\t\tif (radius >= front.reach + FEATHER) continue;\n\t\t\t// Map the circle back through the transform so both faces meet on it.\n\t\t\tconst centerX = (front.x - offsetX - x) / scale;\n\t\t\tconst centerY = (front.y - offsetY - y) / scale;\n\t\t\tconst inner = Math.max(0, radius - FEATHER / 2) / scale;\n\t\t\tconst outer = (radius + FEATHER / 2) / scale;\n\t\t\tlayers.push(\n\t\t\t\t`radial-gradient(circle at ${round(centerX)}px ${round(centerY)}px, #000 ${round(inner)}px, transparent ${round(outer)}px)`,\n\t\t\t);\n\t\t}\n\t\t// Outside every circle a face shows its state from before those fronts.\n\t\tconst before = engine.target !== (layers.length % 2 === 1);\n\t\tif (before === shown) layers.push(FULL_MASK);\n\t\tconst mask = layers.length ? layers.join(\", \") : NO_MASK;\n\t\tface.style.setProperty(\"-webkit-mask-image\", mask);\n\t\tface.style.setProperty(\"mask-image\", mask);\n\t\tface.style.transform = `matrix(${scale}, 0, 0, ${scale}, ${round(x)}, ${round(y)})`;\n\t};\n\n\tconst paintRipple = (now: number) => {\n\t\tengine.fronts = engine.fronts.filter(\n\t\t\t(front) => (now - front.start) / 1000 < front.life,\n\t\t);\n\t\tconst shown = shownRef.current;\n\t\tconst hidden = hiddenRef.current;\n\t\tif (!engine.fronts.length || !shown || !hidden || !drawWave(now)) {\n\t\t\tstop();\n\t\t\treturn;\n\t\t}\n\t\tpaintFace(shown, true, now);\n\t\tpaintFace(hidden, false, now);\n\t};\n\n\tconst paintFade = (now: number) => {\n\t\tconst shown = shownRef.current;\n\t\tconst hidden = hiddenRef.current;\n\t\tif (!shown || !hidden) {\n\t\t\tstop();\n\t\t\treturn;\n\t\t}\n\t\tconst goal = engine.target ? 1 : 0;\n\t\tconst step = (now - engine.lastTime) / FADE_MS;\n\t\tengine.lastTime = now;\n\t\tengine.fade =\n\t\t\tgoal > engine.fade\n\t\t\t\t? Math.min(goal, engine.fade + step)\n\t\t\t\t: Math.max(goal, engine.fade - step);\n\t\tif (engine.fade === goal) {\n\t\t\tstop();\n\t\t\treturn;\n\t\t}\n\t\tshown.style.opacity = String(round(engine.fade));\n\t\thidden.style.opacity = String(round(1 - engine.fade));\n\t};\n\n\tconst frame = (now: number) => {\n\t\tengine.frame = 0;\n\t\tif (engine.mode === \"ripple\") paintRipple(now);\n\t\telse if (engine.mode === \"fade\") paintFade(now);\n\t\tif (engine.mode !== \"idle\") wake();\n\t};\n\n\tconst frameHandlerRef = useRef(frame);\n\tuseLayoutEffect(() => {\n\t\tframeHandlerRef.current = frame;\n\t});\n\n\tfunction wake() {\n\t\tif (engine.frame) return;\n\t\tengine.frame = requestAnimationFrame((now) => frameHandlerRef.current(now));\n\t}\n\n\tconst play = (next: boolean, point: Point | null, user: boolean) => {\n\t\tif (user) pendingAnnouncementRef.current = next;\n\t\tif (next === engine.target) return;\n\t\tconst previous = engine.target;\n\t\tengine.target = next;\n\t\tconst surface = surfaceRef.current;\n\t\tconst shown = shownRef.current;\n\t\tconst hidden = hiddenRef.current;\n\t\tif (!surface || !shown || !hidden) return;\n\t\tconst width = surface.clientWidth;\n\t\tconst height = surface.clientHeight;\n\t\t// Nothing to see: land in the final state at once.\n\t\tif (!width || !height || document.visibilityState === \"hidden\") {\n\t\t\tstop();\n\t\t\treturn;\n\t\t}\n\t\tconst now = performance.now();\n\n\t\t// Reduced motion, or no WebGL: a plain cross-fade. Read live, every time.\n\t\tif (prefersReducedMotion() || !getRenderer()) {\n\t\t\tif (engine.mode === \"ripple\") stop();\n\t\t\tif (engine.mode === \"idle\") engine.fade = previous ? 1 : 0;\n\t\t\tengine.mode = \"fade\";\n\t\t\tengine.lastTime = now;\n\t\t\tsurface.setAttribute(\"data-animating\", \"\");\n\t\t\tpaintFade(now);\n\t\t\twake();\n\t\t\treturn;\n\t\t}\n\n\t\tif (engine.mode === \"fade\") stop();\n\t\tlet x = width / 2;\n\t\tlet y = height / 2;\n\t\tif (point) {\n\t\t\t// CSS zoom and transforms scale client px; work in the surface's own px.\n\t\t\tconst rect = surface.getBoundingClientRect();\n\t\t\tconst zoom = rect.width / (surface.offsetWidth || 1) || 1;\n\t\t\tx = (point.x - rect.left) / zoom - surface.clientLeft;\n\t\t\ty = (point.y - rect.top) / zoom - surface.clientTop;\n\t\t}\n\t\tif (engine.fronts.length >= MAX_FRONTS) engine.fronts.shift();\n\t\tengine.fronts.push(createFront(x, y, width, height, next, now));\n\n\t\tif (engine.mode === \"idle\") {\n\t\t\t// Light strengths are read once per ripple, from the surface's custom properties.\n\t\t\tconst style = getComputedStyle(surface);\n\t\t\tconst highlight = Number.parseFloat(\n\t\t\t\tstyle.getPropertyValue(\"--ripple-reveal-highlight\"),\n\t\t\t);\n\t\t\tconst shade = Number.parseFloat(\n\t\t\t\tstyle.getPropertyValue(\"--ripple-reveal-shade\"),\n\t\t\t);\n\t\t\tengine.highlight = Number.isFinite(highlight)\n\t\t\t\t? highlight\n\t\t\t\t: DEFAULT_HIGHLIGHT;\n\t\t\tengine.shade = Number.isFinite(shade) ? shade : DEFAULT_SHADE;\n\t\t\tmeasure();\n\t\t\tcanvasRef.current?.style.setProperty(\"display\", \"block\");\n\t\t\tfor (const face of [shown, hidden]) {\n\t\t\t\tface.style.setProperty(\"-webkit-mask-repeat\", \"no-repeat\");\n\t\t\t\tface.style.setProperty(\"mask-repeat\", \"no-repeat\");\n\t\t\t\tface.style.setProperty(\"-webkit-mask-size\", \"100% 100%\");\n\t\t\t\tface.style.setProperty(\"mask-size\", \"100% 100%\");\n\t\t\t\tface.style.setProperty(\"-webkit-mask-composite\", \"xor\");\n\t\t\t\tface.style.setProperty(\"mask-composite\", \"exclude\");\n\t\t\t\tface.style.transformOrigin = \"0 0\";\n\t\t\t}\n\t\t\tsurface.setAttribute(\"data-animating\", \"\");\n\t\t}\n\t\tengine.mode = \"ripple\";\n\t\tpaintRipple(now);\n\t\twake();\n\t};\n\n\tconst controller = useRef<SurfaceController>({ play });\n\tuseLayoutEffect(() => {\n\t\tcontroller.current.play = play;\n\t\tcontrollerRef.current = controller.current;\n\t\treturn () => {\n\t\t\tif (controllerRef.current === controller.current) {\n\t\t\t\tcontrollerRef.current = null;\n\t\t\t}\n\t\t};\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t// A change that didn't come from the trigger, such as the parent's\n\t\t// `revealed`: a silent wave from the center.\n\t\tif (engine.target !== revealed) play(revealed, null, false);\n\t\tconst pending = pendingAnnouncementRef.current;\n\t\tif (pending === null) return;\n\t\tpendingAnnouncementRef.current = null;\n\t\tif (pending !== revealed) return;\n\t\tsetAnnouncement(\n\t\t\trevealed ? (valueText ?? textOf(shownRef.current)) : hiddenLabel,\n\t\t);\n\t});\n\n\t// Hiding the tab, losing the context, or collapsing the surface ends a\n\t// ripple in its final state.\n\tconst stopRef = useRef(stop);\n\tconst resizeRef = useRef(measure);\n\tuseLayoutEffect(() => {\n\t\tstopRef.current = stop;\n\t\tresizeRef.current = measure;\n\t});\n\n\tuseEffect(() => {\n\t\tconst surface = surfaceRef.current;\n\t\tif (!surface) return;\n\t\tconst engine = engineRef.current;\n\t\tconst onResize = () => {\n\t\t\tif (engine?.mode !== \"ripple\") return;\n\t\t\tif (!surface.clientWidth || !surface.clientHeight) stopRef.current();\n\t\t\telse resizeRef.current();\n\t\t};\n\t\tconst onVisibilityChange = () => {\n\t\t\tif (document.visibilityState === \"hidden\") stopRef.current();\n\t\t};\n\t\tconst onLoss = () => {\n\t\t\tif (engine?.mode === \"ripple\") stopRef.current();\n\t\t};\n\t\tconst observer = new ResizeObserver(onResize);\n\t\tobserver.observe(surface);\n\t\tdocument.addEventListener(\"visibilitychange\", onVisibilityChange);\n\t\tlossListeners.add(onLoss);\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t\tdocument.removeEventListener(\"visibilitychange\", onVisibilityChange);\n\t\t\tlossListeners.delete(onLoss);\n\t\t\tif (engine) cancelAnimationFrame(engine.frame);\n\t\t};\n\t}, []);\n\n\treturn (\n\t\t<div\n\t\t\tref={surfaceRef}\n\t\t\tid={surfaceId}\n\t\t\tdata-slot=\"ripple-reveal-surface\"\n\t\t\tdata-state={revealed ? \"revealed\" : \"hidden\"}\n\t\t\t{...props}\n\t\t\tclassName={cn(\n\t\t\t\t\"relative inline-grid [--ripple-reveal-highlight:0.6] [--ripple-reveal-shade:0.12] data-animating:overflow-clip dark:[--ripple-reveal-highlight:0.4] dark:[--ripple-reveal-shade:0.25]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{/* While hidden and at rest, the value can't be found, selected, or focused. */}\n\t\t\t<div\n\t\t\t\tref={shownRef}\n\t\t\t\tdata-slot=\"ripple-reveal-value\"\n\t\t\t\taria-hidden={!revealed || undefined}\n\t\t\t\tinert={!revealed}\n\t\t\t\tclassName=\"rounded-[inherit] [grid-area:1/1] [[data-state=hidden]:not([data-animating])>&]:invisible\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tref={hiddenRef}\n\t\t\t\taria-hidden\n\t\t\t\tinert\n\t\t\t\tdata-slot=\"ripple-reveal-placeholder\"\n\t\t\t\tclassName=\"rounded-[inherit] [grid-area:1/1] [[data-state=revealed]:not([data-animating])>&]:invisible\"\n\t\t\t>\n\t\t\t\t{placeholder ?? <Dots />}\n\t\t\t</div>\n\t\t\t{revealed ? null : <span className=\"sr-only\">{hiddenLabel}</span>}\n\t\t\t<canvas\n\t\t\t\tref={canvasRef}\n\t\t\t\taria-hidden\n\t\t\t\twidth={0}\n\t\t\t\theight={0}\n\t\t\t\tdata-slot=\"ripple-reveal-canvas\"\n\t\t\t\tclassName=\"pointer-events-none absolute inset-0 hidden size-full rounded-[inherit]\"\n\t\t\t/>\n\t\t\t<span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n\t\t\t\t{announcement}\n\t\t\t</span>\n\t\t</div>\n\t);\n}\n\n/** An eye whose slash draws in while the value is shown, and out while it's hidden. */\nfunction EyeIcon({ slashed }: { slashed: boolean }) {\n\tconst maskId = `ripple-reveal-eye-${useId().replace(/[^\\w-]/g, \"\")}`;\n\tconst slash = {\n\t\tstrokeDashoffset: slashed ? 0 : 1,\n\t\topacity: slashed ? 1 : 0,\n\t};\n\tconst slashClass =\n\t\t\"transition-[stroke-dashoffset,opacity] duration-150 ease-out motion-reduce:transition-none\";\n\treturn (\n\t\t<svg\n\t\t\taria-hidden\n\t\t\twidth={16}\n\t\t\theight={16}\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\tstroke=\"currentColor\"\n\t\t\tstrokeWidth={2}\n\t\t\tstrokeLinecap=\"round\"\n\t\t\tstrokeLinejoin=\"round\"\n\t\t>\n\t\t\t<mask\n\t\t\t\tid={maskId}\n\t\t\t\tmaskUnits=\"userSpaceOnUse\"\n\t\t\t\tx={0}\n\t\t\t\ty={0}\n\t\t\t\twidth={24}\n\t\t\t\theight={24}\n\t\t\t>\n\t\t\t\t<rect width={24} height={24} fill=\"#fff\" />\n\t\t\t\t{/* Cuts a gap in the eye on either side of the slash. */}\n\t\t\t\t<path\n\t\t\t\t\td=\"M3 3L21 21\"\n\t\t\t\t\tstroke=\"#000\"\n\t\t\t\t\tstrokeWidth={5.5}\n\t\t\t\t\tpathLength={1}\n\t\t\t\t\tstrokeDasharray=\"1 1\"\n\t\t\t\t\tclassName={slashClass}\n\t\t\t\t\tstyle={slash}\n\t\t\t\t/>\n\t\t\t</mask>\n\t\t\t<g mask={`url(#${maskId})`}>\n\t\t\t\t<path d=\"M2.06 12.35a1 1 0 0 1 0-.7 10.75 10.75 0 0 1 19.88 0 1 1 0 0 1 0 .7 10.75 10.75 0 0 1-19.88 0\" />\n\t\t\t\t<circle cx={12} cy={12} r={3} />\n\t\t\t</g>\n\t\t\t<path\n\t\t\t\td=\"M3 3L21 21\"\n\t\t\t\tpathLength={1}\n\t\t\t\tstrokeDasharray=\"1 1\"\n\t\t\t\tclassName={slashClass}\n\t\t\t\tstyle={slash}\n\t\t\t/>\n\t\t</svg>\n\t);\n}\n\nexport interface RippleRevealTriggerProps extends ComponentProps<\"button\"> {\n\t/** Accessible name. Ignored when `aria-label` or `aria-labelledby` is set. */\n\tlabel?: string;\n\t/** Replaces the default eye icon. */\n\tchildren?: ReactNode;\n}\n\nexport function RippleRevealTrigger({\n\tlabel = \"Show value\",\n\tchildren,\n\tclassName,\n\tdisabled: disabledProp,\n\tonClick,\n\tonFocus,\n\tonPointerEnter,\n\tonTouchStart,\n\t\"aria-label\": ariaLabel,\n\t\"aria-labelledby\": ariaLabelledBy,\n\t...props\n}: RippleRevealTriggerProps) {\n\tconst { revealed, disabled, surfaceId, toggle } = useRippleReveal();\n\n\tconst handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n\t\tonClick?.(event);\n\t\tif (event.defaultPrevented) return;\n\t\t// Keys, and clicks without a pointer, start from the center of the trigger.\n\t\tif (event.detail === 0) {\n\t\t\tconst rect = event.currentTarget.getBoundingClientRect();\n\t\t\ttoggle({ x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 });\n\t\t} else {\n\t\t\ttoggle({ x: event.clientX, y: event.clientY });\n\t\t}\n\t};\n\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\taria-pressed={revealed}\n\t\t\taria-label={ariaLabelledBy ? ariaLabel : (ariaLabel ?? label)}\n\t\t\taria-labelledby={ariaLabelledBy}\n\t\t\taria-controls={surfaceId}\n\t\t\tdisabled={disabled || disabledProp}\n\t\t\tdata-slot=\"ripple-reveal-trigger\"\n\t\t\tdata-state={revealed ? \"revealed\" : \"hidden\"}\n\t\t\t{...props}\n\t\t\t// Compile the shader before the first press needs it.\n\t\t\tonPointerEnter={(event) => {\n\t\t\t\tonPointerEnter?.(event);\n\t\t\t\twarmRenderer();\n\t\t\t}}\n\t\t\tonFocus={(event) => {\n\t\t\t\tonFocus?.(event);\n\t\t\t\twarmRenderer();\n\t\t\t}}\n\t\t\tonTouchStart={(event) => {\n\t\t\t\tonTouchStart?.(event);\n\t\t\t\twarmRenderer();\n\t\t\t}}\n\t\t\tonClick={handleClick}\n\t\t\tclassName={cn(\n\t\t\t\t\"relative inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground outline-none transition-[color,background-color,opacity] duration-150 ease-out [-webkit-tap-highlight-color:transparent] before:absolute before:top-1/2 before:left-1/2 before:size-full before:min-h-11 before:min-w-11 before:-translate-x-1/2 before:-translate-y-1/2 hover:bg-foreground/6 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{children ?? <EyeIcon slashed={revealed} />}\n\t\t</button>\n\t);\n}\n\nexport default RippleReveal;\n",
      "type": "registry:component",
      "target": "@components/ripple-reveal.tsx"
    }
  ],
  "meta": {
    "createdAt": "2026-11-11",
    "image": "https://cdn.tentui.com/images/components/ripple-reveal?v=1",
    "video": "https://cdn.tentui.com/videos/components/ripple-reveal?v=1"
  },
  "docs": "https://tentui.com/components/ripple-reveal",
  "categories": [],
  "type": "registry:component"
}