Compare commits

...

2 Commits

Author SHA1 Message Date
semantic-release-bot
9703fed94c chore(release): 4.52.1 [skip ci]
## [4.52.1](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.52.0...v4.52.1) (2025-10-20)

### Bug Fixes

* **homepage:** correct flashcard transform rendering ([5dc636a](5dc636a71c))
2025-10-20 22:40:40 +00:00
Thomas Hallock
5dc636a71c fix(homepage): correct flashcard transform rendering
Fix interactive flashcards not rendering by properly converting
react-spring animated values to CSS transforms. The x, y, rotation,
and scale spring values now use the `to` helper to create proper
CSS transform strings.

Changes:
- Import `to` helper from @react-spring/web
- Convert spring values to CSS transform using translate/rotate/scale
- Set position to absolute with left:0, top:0 as transform origin

This fixes the issue where flashcards were invisible because the
spring values weren't being properly converted to CSS.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 17:39:20 -05:00
3 changed files with 16 additions and 7 deletions

View File

@@ -1,3 +1,10 @@
## [4.52.1](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.52.0...v4.52.1) (2025-10-20)
### Bug Fixes
* **homepage:** correct flashcard transform rendering ([5dc636a](https://github.com/antialias/soroban-abacus-flashcards/commit/5dc636a71c15db28c029fd4f60e4a6c95620f953))
## [4.52.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.51.0...v4.52.0) (2025-10-20)

View File

@@ -3,7 +3,7 @@
import { AbacusReact } from '@soroban/abacus-react'
import { useDrag } from '@use-gesture/react'
import { useEffect, useState } from 'react'
import { animated, config, useSpring } from '@react-spring/web'
import { animated, config, to, useSpring } from '@react-spring/web'
import { css } from '../../styled-system/css'
interface Flashcard {
@@ -130,12 +130,14 @@ function DraggableCard({ card }: DraggableCardProps) {
<animated.div
{...bind()}
style={{
x,
y,
rotation,
scale,
zIndex,
position: 'absolute',
left: 0,
top: 0,
transform: to(
[x, y, rotation, scale],
(x, y, r, s) => `translate(${x}px, ${y}px) rotate(${r}deg) scale(${s})`
),
zIndex,
touchAction: 'none',
cursor: 'grab',
}}

View File

@@ -1,6 +1,6 @@
{
"name": "soroban-monorepo",
"version": "4.52.0",
"version": "4.52.1",
"private": true,
"description": "Beautiful Soroban Flashcard Generator - Monorepo",
"workspaces": [