I will list the files in the project to understand the structure and existing dependencies.
I will read package.json to check what libraries and icons are installed in the project.
I will install lucide-react so we have icons for our scrubbing UI, controls, interactive demos, and tutorials.
I will read index.html to see the title and structure.
I will update index.html with a descriptive title and modern font styling.
I will read src/index.css to inspect the default styling.
I will create src/utils/numberParser.ts containing the regex-based number tokenization, character-index lookup for textarea cursor positions, and precision-preserving number formatting with units.
I will create src/utils/soundEffects.ts using the Web Audio API to synthesize subtle mechanical dial/tick sounds when numbers are scrubbed.
I will create src/components/ScrubHUD.tsx to render a live floating Heads-Up Display when a number is being scrubbed.
I will clean up unused import/variables in src/components/ScrubHUD.tsx.
I will create src/hooks/useNumberScrubber.ts to manage number scrubbing interactions, modifier keys, drag deltas, undo/redo history, and HUD state.
I will create src/components/ScrubTextEditor.tsx to provide both the rich interactive token-highlighting scrubber mode and standard <textarea> scrubbing mode.
I will create src/components/previews/CssCardPreview.tsx to provide a live CSS styling preview that updates immediately as numbers are scrubbed in the editor.
I will create src/components/previews/SvgShapePreview.tsx to render an interactive vector graphic that morphs as SVG attributes are scrubbed.
I will remove the unused Sparkles import in src/components/previews/SvgShapePreview.tsx.
I will create src/components/previews/PhysicsPreview.tsx to render a live animated physics simulation of a bouncing projectile that recalculates as motion variables are scrubbed.
I will remove the unused icons in src/components/previews/PhysicsPreview.tsx.
I will create src/components/previews/InvoicePreview.tsx to provide a live financial calculation card that updates as rates, hours, taxes, or discounts are scrubbed.
I will create src/components/previews/ScratchpadPreview.tsx to provide a real-time number scanner and token breakdown for free-form custom text or pasted code.
I will create src/components/TutorialModal.tsx to provide an interactive cheat sheet and visual guide on how to scrub numbers and use keyboard modifiers.
I will create src/components/SettingsModal.tsx to allow users to configure drag sensitivity, sound effects, and feedback settings.
I will create src/components/Navbar.tsx to provide a top navigation bar with preset switching, sound controls, settings, and tutorial access.
I will create src/data/presetTexts.ts containing the initial scrubbable text templates for each demo playground.
I will create src/components/QuickScrubberBar.tsx to provide an interactive bottom bar of scrubbable token pills with drag and micro-step controls.
I will update src/index.css with dark mode utilities, custom scrollbar styles, and cursor styling for horizontal number scrubbing.
I will now replace src/App.tsx with our complete number scrubbing demonstration studio, integrating the multi-mode scrub editor, live interactive playgrounds, sound effects, and quick scrub bar.
I will clean up unused imports in src/App.tsx.
I will now test building the project using build_project to ensure all TypeScript and Vite builds succeed without errors.
I have built ScrubText.io, an interactive demonstration studio that allows numbers in a textbox to be scrubbed—modified by selecting or pressing mouse down on a number and dragging horizontally left or right.
✨ Key Features Implemented
-
Dual Scrubbing Editor Modes:
- Interactive Highlight Mode (Default): Detects all numbers in text and renders them with interactive syntax-highlighted badges (
320px, $49.99, -3deg, etc.). Simply click and drag left or right on any number to scrub it in real time while preserving units (px, %, deg, rem, m/s, $, etc.) and decimal precision.
- Standard
<textarea> Mode: Switch to a raw HTML <textarea> where selecting or pressing mouse down on any number and dragging horizontally scrubs it directly, keeping the selection highlighted around the new value.
-
Modifier Keys & Precision Control:
Shift + Drag: Accelerates scrubbing by 10× for fast sweeping across large ranges.
Alt/Option + Drag: Engages 0.1× micro-precision for fine floating-point decimals.
- Base Sensitivity: Adjustable in the Settings Modal (
0.5×, 1×, 2×, or 5×).
-
Heads-Up Display (HUD) & Mechanical Audio:
- Live Floating HUD: Floats near the cursor while dragging, displaying the original vs. current value, colored delta badge (
+25px, -0.40), active modifier mode, and a visual gauge bar.
- Synthesized Audio Ticks: Generates a subtle mechanical watch/dial tick using the Web Audio API as values increment or decrement (can be muted from the top navigation bar).
-
5 Live Interactive Playgrounds:
- CSS 3D Card: Scrub
width, height, border-radius, rotate, scale, opacity, and accent-hue to instantly transform a 3D card.
- SVG Vector Art: Scrub XML attributes (
cx, cy, r, stroke-width, rotate, and polygon points) to morph SVG graphics.
- Physics Motion Simulation: Scrub , , , and to drive an animated 60 FPS projectile canvas.
Files built: index.html, src/utils/numberParser.ts, src/utils/soundEffects.ts, src/components/ScrubHUD.tsx, src/hooks/useNumberScrubber.ts, src/components/ScrubTextEditor.tsx, src/components/previews/CssCardPreview.tsx, src/components/previews/SvgShapePreview.tsx, src/components/previews/PhysicsPreview.tsx, src/components/previews/InvoicePreview.tsx, src/components/previews/ScratchpadPreview.tsx, src/components/TutorialModal.tsx, src/components/SettingsModal.tsx, src/components/Navbar.tsx, src/data/presetTexts.ts, src/components/QuickScrubberBar.tsx, src/index.css, src/App.tsx