Skip to content

feat: custom bezier curves and plugin optimizations#4

Merged
enisbu merged 3 commits into
mainfrom
feat/custom-bezier-and-optimizations
Apr 3, 2026
Merged

feat: custom bezier curves and plugin optimizations#4
enisbu merged 3 commits into
mainfrom
feat/custom-bezier-and-optimizations

Conversation

@enisbu

@enisbu enisbu commented Apr 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Custom bezier curves via arbitrary values: bg-ease-to-r-[0.22,1,0.36,1]
  • Plugin optimizations: gradient stops cached per easing (32→4 computations), redundant ternary removed, constants derived from source, matchUtilities batched into single call
  • New exports: getCoordinatesFromControlPoints(), parseBezierValues()
  • Test improvements: toBeCloseTo → exact toBe, imported DIRECTIONS instead of duplicating, 57 tests all passing
  • Playground: interactive bezier curve editor with draggable SVG handles
  • Docs: custom bezier documented across all pages, landing page updated, pseudo-element patterns replaced with absolute divs, install button with PM tabs
  • Infra: GitHub API error logging for star count debugging

Package Changes (minor bump)

Before After
4 preset easings only 4 presets + arbitrary bezier via [x1,y1,x2,y2]
32 computations per build 4 computations (cached per easing)
26 matchUtilities calls 1 batched call
ESM 5.25 KB ESM 3.56 KB

Test plan

  • pnpm test — 57 tests passing (unit, plugin, integration)
  • pnpm build — ESM + CJS + DTS successful
  • Docs build successful
  • Verify playground custom bezier editor works (drag handles, preview updates)
  • Verify preset easings still render correctly
  • Verify install button PM tabs work

enisbu added 3 commits April 3, 2026 15:43
- Add matchUtilities for arbitrary bezier values (bg-ease-to-r-[0.22,1,0.36,1])
- Cache gradient stops per easing (32 → 4 computations)
- Remove redundant class name ternary
- Derive constants from source types
- Batch matchUtilities into single call
- Add getCoordinatesFromControlPoints and parseBezierValues exports
- Accept readonly tuples in getCoordinatesFromControlPoints
- Replace toBeCloseTo with exact toBe in tests
- Import DIRECTIONS in tests instead of duplicating
- Add interactive bezier curve editor to playground
- Document custom bezier in utilities, examples, getting started
- Update landing page hero and install button with PM tabs
- Replace pseudo-element patterns with absolute divs
- Add shared gradient-utils.ts and extend constants.ts
- Add GitHub API error logging for star count debugging
- actions/checkout v4 → v6
- actions/setup-node v4 → v6
- pnpm/action-setup v4 → v5
- Fix tsc --noEmit with explicit tsconfig.json path
@enisbu
enisbu merged commit 8ef8815 into main Apr 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant