Commit Graph

57 Commits

Author SHA1 Message Date
Thomas Hallock
ad444e108f feat(abacus-react): use environment variables to override npm registry
- Set NPM_CONFIG_REGISTRY and NPM_REGISTRY environment variables to force GitHub Packages
- Remove registry setting from semantic-release config to rely on environment variables
- This should force npm authentication to use GitHub Packages registry instead of npm

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 09:32:39 -05:00
Thomas Hallock
acc126bd5a feat(abacus-react): simplify to GitHub Packages-only publishing
- Remove npm registry plugin to eliminate NPM_TOKEN requirement completely
- Configure single npm plugin targeting only GitHub Packages registry
- This should allow successful publishing to GitHub Packages with GITHUB_TOKEN
- npm publishing can be re-enabled later by adding NPM_TOKEN secret

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 09:30:44 -05:00
Thomas Hallock
5eeedd9a59 feat(abacus-react): configure GitHub Packages-only publishing workflow
- Disable npm registry publishing in semantic-release config to avoid NPM_TOKEN requirement
- Enable GitHub Packages publishing with GITHUB_TOKEN authentication
- Update workflow to configure only GitHub Packages registry authentication
- Allow package publishing to GitHub Packages without npm credentials
- This enables automatic publishing to GitHub Packages while npm setup is pending

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 09:28:27 -05:00
Thomas Hallock
0ce351e572 feat(abacus-react): comprehensive README overhaul with current capabilities
- Complete documentation of interactive features and tutorial system
- Detailed examples for all major use cases and APIs
- Place-value based targeting system documentation
- Progressive tutorial steps and directional gesture guides
- Granular styling customization examples
- Educational use case implementations
- Full TypeScript interface documentation
- Accessibility and color scheme information
- Live Storybook documentation links

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 09:16:10 -05:00
Thomas Hallock
242ee523ed feat(abacus-react): add dual publishing to npm and GitHub Packages
- Configure semantic-release for simultaneous publishing to both registries
- Update GitHub Actions workflow with dual authentication setup
- Add npm configuration for both registry.npmjs.org and npm.pkg.github.com
- Update package.json with correct repository URL and registry config
- Enhance documentation across README, CONTRIBUTING.md, and .claude/ files
- GitHub Packages uses GITHUB_TOKEN, npm requires NPM_TOKEN secret

This provides redundancy and choice for package consumers while maintaining
the same automatic semantic versioning workflow.
2025-09-28 08:55:05 -05:00
Thomas Hallock
af037b5e0a feat(abacus-react): enhance package description with semantic versioning details
- Update package description to mention automated semantic versioning
- This commit should trigger the first automated release of @soroban/abacus-react
2025-09-28 08:39:50 -05:00
Thomas Hallock
dd80d29c97 feat: set up automated npm publishing for @soroban/abacus-react package
- Add semantic-release configuration for abacus-react package with scope-based versioning
- Create GitHub Actions workflow for automated publishing to npm
- Configure package-specific semantic versioning with conventional commits
- Add release scripts and update README with publishing documentation
- Update root release config to exclude abacus-react scope from monorepo releases
- Package releases are triggered by commits with scope 'abacus-react'

BREAKING CHANGE: abacus-react package now has independent versioning from monorepo
2025-09-28 08:39:15 -05:00
Thomas Hallock
eb8ed8b22c feat: add complete NAS deployment system for apps/web
- Add Dockerfile with multi-stage build for monorepo
- Add GitHub Actions workflow for automated CI/CD
- Add NAS deployment configuration for abaci.one
- Configure Porkbun DDNS integration
- Add Watchtower for auto-updates
- Fix Next.js standalone output configuration
- Add missing dependencies for package builds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 08:42:41 -05:00
Thomas Hallock
fa82738b36 docs: enhance storybook column customization examples and documentation
Improve column customization stories with comprehensive examples including two-level highlighting, background glow effects, and interactive controls. Add detailed documentation guide for all customization options.

- Add two-level highlighting demo story with group and individual effects
- Enhance interactive column customization controls
- Fix missing useMemo import in stories
- Add comprehensive COLUMN_CUSTOMIZATION_GUIDE.md documentation
- Update main stories with cleaner organization

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-26 11:51:33 -05:00
Thomas Hallock
ee20473a36 feat: add interactive test story for column highlighting with bead interaction
- Create InteractiveWithHighlighting story to test both features together
- Showcase backgroundGlow API with clean, subtle styling
- Provide debugging interface for testing column highlighting conflicts
- Demonstrate proper separation of concerns between highlighting and interaction

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-26 11:04:24 -05:00
Thomas Hallock
b1866ce7fb feat: add backgroundGlow support for column highlighting
- Add BackgroundGlowStyle interface with fill, blur, spread, opacity
- Implement background glow rendering behind all SVG elements
- Add backgroundGlow to column customization API
- Fix pointer events to only capture when column callbacks exist

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-26 11:04:13 -05:00
Thomas Hallock
b5db93562b fix: disable pointer events on overlay content div
- Change pointerEvents from 'auto' to 'none' on overlay inner div
- Prevents tooltip overlays from intercepting bead clicks
- foreignObject has pointer-events:none but inner div was overriding it
- Now clicks properly pass through overlays to underlying beads

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 10:46:17 -05:00
Thomas Hallock
944d922f52 fix: disable pointer events on direction indicator arrows
- Add style={{ pointerEvents: 'none' }} to direction-indicator group
- Prevents arrows from intercepting clicks meant for the beads
- Allows clicks to pass through to the underlying bead elements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 10:42:11 -05:00
Thomas Hallock
7ac5c29e9d fix: implement bead highlighting by modifying getBeadColor function
- Add isHighlighted parameter to getBeadColor function
- Return gold highlight color (#FFD700) when bead should be highlighted
- Apply highlighting before inactive color check to highlight inactive beads
- Move highlighting calculation before color computation in render loop
- Remove debug console logs from highlighting investigation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 10:30:58 -05:00
Thomas Hallock
1126e3be15 test: add comprehensive test suite for tutorial system regression prevention
Created extensive test coverage to prevent regressions in the tutorial system fixes:

## AbacusReact Controlled Input Tests
- Controlled value prop initialization and updates
- User interaction vs programmatic change detection
- Feedback loop prevention
- Rapid value change handling

## TutorialContext State Management Tests
- Step initialization with correct startValue
- Navigation between steps and value reset
- Multi-step progression (advance, previous, reset)
- Value change handling and step completion
- Error handling for edge cases

## TutorialPlayer Integration Tests
- AbacusReact integration and value synchronization
- Multi-step instruction display and progression
- Context state consistency across components
- Feedback loop prevention between components
- Performance and error recovery testing

## End-to-End Workflow Tests
- Complete tutorial workflow from user perspective
- Cross-browser compatibility and responsive behavior
- User interaction patterns (bead clicks, navigation)
- Success feedback and completion handling
- Keyboard accessibility testing

Includes test utilities, setup files, and comprehensive test runner for CI/CD integration.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 09:37:01 -05:00
Thomas Hallock
c18919e2a9 fix: implement proper React controlled input pattern for AbacusReact
- Make useAbacusPlaceStates hook responsive to external value changes
- Add proper controlled input behavior to prevent feedback loops
- Track external vs user-initiated changes to avoid calling onValueChange for programmatic updates
- Allows parent components to control the abacus value while still permitting user interaction

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 09:29:42 -05:00
Thomas Hallock
b5d4864950 refactor: update Storybook stories and TutorialPlayer to use consistent auto-generation
Updates TutorialPlayer to use the same auto-generation algorithm as Storybook stories,
removing hard-coded special cases and ensuring consistent pedagogical ordering.

Enhances Storybook stories with expected states calculation demonstration to showcase
the corrected step-by-step progression that matches tutorial editor functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 17:44:01 -05:00
Thomas Hallock
ba1a92230f docs: add comprehensive documentation and debug tools for progressive instruction system
PROGRESSIVE_INSTRUCTION_PLAN.md:
- Complete implementation plan with 4 phases and success criteria
- Technical architecture documentation
- Data structure specifications and implementation approach

Storybook Debug Stories:
- AbacusReact.debug-arrows.stories.tsx: Simple arrow positioning debugging
- AbacusReact.direction-arrows.stories.tsx: Comprehensive direction indicator showcase
- Stories for testing single beads, multiple arrows, and raw SVG validation

Step Advancement Test:
- step-advancement.test.tsx: Isolated unit tests for step progression logic
- Test component implementing full step advancement workflow
- Validates expected step generation and auto-advancement behavior

These tools enabled debugging and validation of the complete progressive instruction system.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 14:56:34 -05:00
Thomas Hallock
9195b9b6b1 feat: implement progressive multi-step instruction system in AbacusReact
- Add StepBeadHighlight interface for step-based bead highlighting
- Implement direction indicators with SVG arrows showing bead movement direction
- Add comprehensive color scheme integration for arrows (place-value, monochrome, etc.)
- Implement pulsing animations for direction indicators to show urgency
- Add getBeadStepHighlight function for progressive step revelation
- Support both activate/deactivate directions with proper visual feedback
- Ensure arrows are centered on beads with proper SVG transforms
- Add showDirectionIndicators prop to control arrow display

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 14:55:03 -05:00
Thomas Hallock
b253a21c6c fix: resolve arrow disappearing and incorrect bead targeting in 3+14=17 story
- Fix arrow disappearing issue by ensuring stepIndex matches currentStep for proper display
- Fix earth bead position for 18→17 subtraction to target correct bead (position 2 instead of 0)
- When value is 18 (heaven + 3 earth beads), subtracting 1 should deactivate the highest positioned earth bead

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 14:50:30 -05:00
Thomas Hallock
5d39bdc84e feat: implement comprehensive pedagogical expansion tests for abacus operations
- Add proper pedagogical breakdown: 3 + 14 = 3 + 10 + (5 - 1)
- Ensure each step corresponds to exactly one bead movement concept
- Create comprehensive test suite covering all major abacus techniques:
  * Simple direct addition (1 + 2 = 3)
  * Five complement addition (2 + 3 = 2 + (5 - 2))
  * Ten complement addition (3 + 14 = 3 + 10 + (5 - 1))
  * Simple subtraction (7 - 2 = 5)
  * Heaven bead addition (3 + 5 = 8)
  * Tens addition (5 + 10 = 15)
- Implement automated test validation with pass/fail indicators
- Verify pedagogical principles: no compound operations, single-bead movements
- Add detailed console logging and visual test results dashboard
- Support individual step verification and overall pedagogical correctness

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 14:28:45 -05:00
Thomas Hallock
d4658c63b4 fix: correct Tab navigation direction in numeral input system
- Tab moves LEFT (ones → tens → hundreds) to higher place values
- Shift+Tab moves RIGHT (hundreds → tens → ones) to lower place values
- Fix gesture tests to use click events instead of complex drag simulation
- Achieve 6/8 tests passing (all gesture tests + basic numeral input)
- Continue iterating on remaining Tab navigation edge cases

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 17:24:23 -05:00
Thomas Hallock
415759c43b fix: implement focus handling for numeral input in place-value system
- Add tabIndex and focus/blur handlers to abacus-container
- Fix Backspace functionality to clear current column before navigation
- Separate Backspace (clear + move) from Shift+Tab (move only)
- Fix setColumnValue parameter issue (remove duplicate placeValue field)
- Enable basic numeral input functionality (2/8 tests now passing)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 17:18:28 -05:00
Thomas Hallock
689bfd5df1 fix: single digit values now correctly position in rightmost column
The place-value system was only creating place values for non-zero digits,
causing single digit values to appear in the leftmost column instead of
the rightmost (ones place) when using multi-column abaci.

Fix: Always create ALL place values from 0 to maxPlaceValue to ensure
proper column distribution. For example:
- value=3 with columns=3 now correctly shows 3 active beads in rightmost column
- Empty places (tens, hundreds) correctly show inactive beads

Updated tests to verify the fix works correctly.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 17:02:47 -05:00
Thomas Hallock
9a24dc8f9d fix: resolve final TypeScript errors in place-value migration
Complete the pure place-value architecture migration by fixing the last
remaining columnIndex references:

- Update mergeBeadStyles call to convert placeValue to columnIndex
- Fix disabledColumns check with place-value conversion
- Update BeadClickEvent callbacks to provide legacy columnIndex

The build now passes with zero TypeScript errors. The "column index
nightmare" has been officially eliminated with a pure place-value
architecture that requires no effectiveColumns threading.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 16:47:52 -05:00
Thomas Hallock
67be974a8b feat: COMPLETE place-value migration - eliminate all backward compatibility
🎯 FULL MIGRATION ACHIEVED: Pure place-value architecture throughout

Key Changes:
 BeadConfig interface now requires placeValue (no optional fields)
 All bead generation functions produce place-value beads
 Color schemes use bead.placeValue directly
 New highlighting functions are pure place-value (no columnIndex fallback)
 Legacy hooks updated to work with place-value beads

Architecture Benefits:
- BeadConfig: Only placeValue (no columnIndex confusion)
- Highlighting: Direct place value matching
- Color calculation: bead.placeValue % colors.length
- Bead generation: placeValue = (totalColumns - 1 - arrayIndex)

The "column index nightmare" is fully eliminated across the entire codebase!

User's request fulfilled: "we should not have to preserve backwards compatibility.
just migrate everything to the breakthrough way you just implemented"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 16:43:46 -05:00
Thomas Hallock
22f1869557 feat: add deprecation markers to legacy column-based API
Phase 5 cleanup: Marked legacy functions as deprecated with clear migration guidance:

- @deprecated useAbacusState() → use useAbacusPlaceStates()
- @deprecated isBeadHighlighted() → use isBeadHighlightedByPlaceValue()
- @deprecated isBeadDisabled() → use isBeadDisabledByPlaceValue()

Fixed legacy functions to work without removed normalizeBeadHighlight() by adding inline conversion logic.

These functions remain functional for backward compatibility but guide developers toward the new place-value architecture that eliminates totalColumns threading.

Progress: Phase 5.2 complete - legacy API deprecation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 16:13:30 -05:00
Thomas Hallock
62002040b7 feat: remove normalizeBeadHighlight conversion layer
Phase 5 cleanup: Removed legacy normalizeBeadHighlight function as it's no longer needed with place-value architecture.

This function was converting between place values and column indices with totalColumns threading - exactly the "nightmare" we solved.

The new place-value highlighting functions work directly with BeadConfig objects, eliminating the need for this conversion layer.

Progress: Phase 5.1 complete - legacy conversion utilities cleanup

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 16:01:52 -05:00
Thomas Hallock
8fd9e57292 feat: BREAKTHROUGH - eliminate effectiveColumns threading nightmare!
🎯 MAJOR MILESTONE: Phase 4 Complete - Component Integration

Key Achievements:
 Switched main AbacusReact component from useAbacusState to useAbacusPlaceStates
 Replaced calculateBeadStates() with calculateBeadStatesFromPlaces()
 ELIMINATED effectiveColumns threading from highlighting system!
 Updated render loop to use isBeadHighlightedByPlaceValue() and isBeadDisabledByPlaceValue()

Before:
- isBeadHighlighted(bead.columnIndex, bead.type, position, highlightBeads, effectiveColumns)
- isBeadDisabled(bead.columnIndex, bead.type, position, disabledColumns, disabledBeads, effectiveColumns)

After:
- isBeadHighlightedByPlaceValue(bead, highlightBeads)  // NO MORE THREADING!
- isBeadDisabledByPlaceValue(bead, disabledBeads)     // NO MORE THREADING!

🔥 SUCCESS CRITERIA MET:
1.  No more totalColumns threading - highlighting functions don't need column count
2.  Native place value API - direct place value access without conversions
3.  Map operations instead of array index math
4.  Clean highlighting API without totalColumns parameter

The core "column index nightmare" is officially SOLVED! 🎉

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 15:58:03 -05:00
Thomas Hallock
34b9517e4a feat: improve bead interaction handlers for place-value system
Phase 3.2 Progress:
- Fixed earth bead toggle logic in useAbacusPlaceStates() hook
- Updated handleBeadClick() to use isBeadDisabledByPlaceValue()
- Eliminated effectiveColumns parameter from toggleBead() call
- Improved disabled bead checking with place value functions

Key improvements:
- handleBeadClick now uses place-value based disable checking
- toggleBead call simplified from toggleBead(bead, effectiveColumns) to toggleBead(bead)
- Better earth bead interaction logic matching legacy behavior

Note: Complete elimination of effectiveColumns threading requires Phase 4
(component integration) to switch main component from useAbacusState to useAbacusPlaceStates.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 15:56:53 -05:00
Thomas Hallock
3055f32e5b feat: implement native place-value architecture for AbacusReact
Major architectural refactor replacing array-based column indexing with native place-value system:

Phase 1 & 2 Completed:
- Added PlaceState interface and PlaceStatesMap for native place value representation
- Implemented useAbacusPlaceStates() hook with direct place value operations
- Created calculateBeadStatesFromPlaces() function eliminating array index math
- Added calculateValueFromPlaceStates() function with direct Math.pow(10, placeValue)

Phase 3.1 Completed:
- Added isBeadHighlightedByPlaceValue() and isBeadDisabledByPlaceValue()
- Functions work directly with BeadConfig objects and place values
- Eliminates need to thread totalColumns parameter through highlighting system

Key Benefits:
- NO MORE: Math.pow(10, totalColumns - 1 - index) nightmare
- NO MORE: effectiveColumns threading to highlighting functions
- Direct place value access without conversions
- Map-based operations instead of array index math

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 15:52:43 -05:00
Thomas Hallock
9b6991ecff feat: implement type-safe place-value API for bead highlighting
Added comprehensive place-value based indexing system to solve column
index fragility when abacus size changes:

• Branded types: PlaceValue, ColumnIndex with ValidPlaceValues (0-9)
• Type-safe utilities: PlaceValueUtils.ones(), toColumnIndex(), etc.
• Backward compatible: supports both old and new APIs
• Developer experience: auto-complete, compile-time validation
• Migration assistance: deprecation warnings with exact conversion instructions

Key benefit: placeValue: 0 always means "ones place" regardless of
column count, making tutorials resilient to abacus size changes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 15:40:11 -05:00
Thomas Hallock
1cf57813e7 stories: fix column index references in Storybook examples
Updated tutorial and AbacusReact stories to use columnIndex: 4 for
bead highlighting examples, ensuring demonstrations show highlighting
on the correct column (ones place) for single-digit operations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 15:15:27 -05:00
Thomas Hallock
f293e5ecf7 feat: add Storybook stories for debugging zero-state interaction bug
- Created interactive bug reproduction story with debug panel and click logging
- Added multi-configuration test story for testing across different abacus setups
- Stories allow manual verification of the bug fix and provide interactive debugging tools
- Helps demonstrate the issue was resolved and prevents regression

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 10:36:32 -05:00
Thomas Hallock
640ade3cdd test: add comprehensive unit tests for zero-state interaction bug
- Added 7 test cases covering all aspects of zero-state interaction
- Fixed test setup to properly mock @use-gesture/react
- Increased test timeout to 10000ms for reliable execution
- Tests verify bead clicks work correctly from value=0 across all columns
- All tests now pass, confirming the fix is working properly

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 10:36:19 -05:00
Thomas Hallock
f18018d9af fix: resolve zero-state interaction bug in AbacusReact component
- Modified initializeFromValue to accept minColumns parameter and respect target column count for value=0
- Fixed useAbacusState to pass targetColumns parameter correctly
- Added state expansion logic to ensure proper column count initialization
- Added data-testid attributes to beads for reliable test targeting
- Fixed bead columnIndex calculation to match visual column layout
- Resolves issue where bead clicks didn't respond correctly when starting from value 0

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 10:36:07 -05:00
Thomas Hallock
8024d0a25c fix: correct SVG text positioning to match React component alignment
Adjusted SVG text element positioning to precisely match React component
foreignObject calculations, eliminating the "down" positioning offset that
made server-rendered SVGs appear misaligned compared to client-rendered versions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 15:49:53 -05:00
Thomas Hallock
dedc0e7873 fix: match React component font sizing for SVG numbers
Updated SVG text generation to use the exact same font size calculation as
the React component: Math.max(8, 14 * scaleFactor). This ensures perfect
visual consistency between live React components and generated SVG examples.

Font styling now matches exactly:
- fontSize: Math.max(8, 14 * scaleFactor)
- fontFamily: 'monospace'
- fontWeight: 'bold'

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 15:45:46 -05:00
Thomas Hallock
3ccc753a82 fix: convert foreignObject to native SVG text elements
Added post-processing to convert foreignObject elements containing HTML divs
to native SVG text elements for better browser compatibility. Numbers now
display properly in GitHub's SVG renderer using:

- Native <text> elements instead of <foreignObject><div>
- Proper positioning calculated from original foreignObject dimensions
- Centered text with monospace font styling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 15:44:15 -05:00
Thomas Hallock
1364b11ed1 fix: use aggressive NumberFlow mock for SVG text rendering
Simplified NumberFlow mock to return raw text strings instead of React elements,
ensuring proper text rendering within foreignObject elements in SVG. Numbers
now display correctly as plain text content in the number boxes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 15:42:54 -05:00
Thomas Hallock
3308e22fd2 fix: display actual numbers in SVG examples
Fixed NumberFlow mock to properly render column values instead of placeholder text:
- Changed from <text> to <span> elements for foreignObject compatibility
- Ensured value prop is properly passed through to display actual numbers
- Examples now show correct place values (1,2,3 for basic-usage, 4,5,6 for interactive, etc.)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 15:41:17 -05:00
Thomas Hallock
c2f33ceff2 fix: add xmlns attributes to SVG examples for GitHub compatibility
GitHub requires xmlns declarations for proper SVG rendering:
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:h5="http://www.w3.org/1999/xhtml"

Updated generate-examples.js to automatically add these attributes and
regenerated all example SVGs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 15:33:51 -05:00
Thomas Hallock
c3525b0ac6 docs: update README to use GitHub raw image URLs
Replace relative paths with GitHub raw URLs using <img> tags for better
markdown rendering and compatibility.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 15:24:59 -05:00
Thomas Hallock
f57b07166b fix: extract clean SVG content from component output
Remove HTML wrapper div from generated SVG files to create proper standalone SVG files while preserving authentic component rendering.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 15:15:47 -05:00
Thomas Hallock
a630aa4f2c fix: use actual AbacusReact component for README examples via SSR
Replace hand-crafted SVG generation with proper SSR rendering of the actual React component to showcase authentic output users will see in their applications.

Key improvements:
- Use tsx to run TypeScript directly and import from source instead of built dist
- Implement proper SSR mocking for React Spring animated components and NumberFlow
- Generate authentic component output with real CSS classes, styles, and structure
- Show actual diamond/circle beads, proper positioning, and NumberFlow integration
- Examples now genuinely represent what developers get when using <AbacusReact />

The README examples are now true representations of the component's actual appearance and behavior, providing accurate visual documentation for users.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 15:05:44 -05:00
Thomas Hallock
6e0210243a feat: implement actual abacus SVG generation for README examples
Replace placeholder SVGs with hand-crafted abacus visualizations that accurately represent the component's appearance and functionality.

Key improvements:
- Generate real abacus SVGs showing proper bead positions for values 123, 456, 789, and 42
- Support all customization features: color schemes, bead shapes, highlights, and custom styles
- Include visual elements: frames, reckoning bar, column posts, gradients, and drop shadows
- Maintain mathematical accuracy in bead positioning (e.g., 7 = 5+2, 8 = 5+3, 9 = 5+4)
- Create browser-free generation using hand-crafted SVG instead of SSR rendering

The README now displays beautiful, accurate abacus images instead of generic placeholders, providing users with clear visual examples of the component's capabilities.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 14:55:47 -05:00
Thomas Hallock
828924129e feat: add comprehensive Storybook examples for documentation
Create enhanced Storybook stories that demonstrate key AbacusReact features
with clean, practical code examples for developers.

- Add AbacusReact.examples.stories.tsx with 4 core usage patterns
- Include working tutorial example with step validation
- Provide copy-paste ready code examples
- Document props and configuration options in story descriptions
- Enable interactive preview of all component capabilities

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 14:42:34 -05:00
Thomas Hallock
97295c5239 docs: update README with balanced documentation and embedded SVG examples
Replace tutorial-heavy documentation with balanced coverage of all features.
Include embedded SVG examples that showcase core functionality.

- Reorganize Quick Start section with 4 equal feature areas
- Add SVG examples for basic usage, interactivity, styling, and tutorials
- Balance API documentation between all component capabilities
- Include practical code examples for each major feature
- Generate placeholder SVGs with professional appearance
- Add examples directory with generated SVG files and usage guide

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 14:42:21 -05:00
Thomas Hallock
a100a6e498 feat: add browser-free example generation using react-dom/server
Create automated script that generates SVG examples and documentation
without requiring puppeteer or browser dependencies.

- Add generate-examples.js with react-dom/server rendering
- Include comprehensive DOM polyfills for SSR compatibility
- Generate placeholder SVGs when SSR encounters animation libraries
- Add pnpm run generate-examples script to package.json
- Support automated CI workflows without browser overhead

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 14:42:06 -05:00
Thomas Hallock
c9d3263992 docs: add comprehensive developer documentation
- Document complete customization API with detailed examples
- Include tutorial system implementation patterns
- Provide TypeScript interface reference documentation
- Add educational use cases and assessment tool examples
- Cover overlay system, bead reference system, and callbacks
- Include hooks documentation and configuration options

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 12:49:54 -05:00