Skip to content

Update#1

Merged
No898 merged 15 commits intomainfrom
update
Mar 14, 2026
Merged

Update#1
No898 merged 15 commits intomainfrom
update

Conversation

@No898
Copy link
Owner

@No898 No898 commented Mar 14, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced CursorFollower component for building custom cursor implementations
    • Added Star cursor mode to demo alongside Rocket mode
    • Added preset configurations (Arcade, Cruise, Stealth) with runtime tuning controls
  • Documentation

    • Comprehensive README rewrite with Quick Start, API reference, and SVG customization guides
    • Updated demo with English language support and improved visual design
  • Chores

    • Updated build system, CI/CD workflows, and testing infrastructure
    • Modernized module system with ESM/CJS hybrid setup
    • Updated Node.js to 22.12.0

@No898 No898 self-assigned this Mar 14, 2026
@No898 No898 merged commit 9a99987 into main Mar 14, 2026
1 check failed
@No898 No898 deleted the update branch March 14, 2026 22:37
@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ba4e0eaf-d2ef-435c-812b-172128473547

📥 Commits

Reviewing files that changed from the base of the PR and between 03767a3 and ab8c97b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (24)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .nvmrc
  • README.md
  • demo/index.html
  • demo/main.tsx
  • demo/styles.css
  • package.json
  • sandbox/follow-test.html
  • scripts/check-published-version.mjs
  • scripts/pre-push.mjs
  • scripts/publish-guard.mjs
  • scripts/publish-guard.test.mjs
  • scripts/smoke-pack.mjs
  • src/cursorFollower.test.tsx
  • src/cursorFollower.tsx
  • src/index.ts
  • src/rocket.Cursor.test.tsx
  • src/rocket.Cursor.tsx
  • tsconfig.json
  • tsup.config.ts
  • vite.config.ts
  • vitest.config.ts
  • vitest.setup.ts

📝 Walkthrough

Walkthrough

This pull request introduces a new CursorFollower component for flexible cursor rendering, refactors RocketCursor to leverage it, modernizes the build toolchain with tsup and Vitest, establishes GitHub Actions workflows for CI and release automation with version validation, enhances the demo with dual-cursor modes and comprehensive UI controls, and rewrites documentation with expanded API guidance.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/ci.yml, .github/workflows/release.yml
Added CI workflow for validation (checkout, Node setup, dependencies, quality checks, smoke tests). Added Release workflow triggered on version tags with npm publish and pre-release version validation against npm registry.
Build Tooling & Configuration
package.json, tsup.config.ts, tsconfig.json, vite.config.ts, vitest.config.ts, vitest.setup.ts, .nvmrc
Migrated from tsc to tsup build system. Added ESM/CommonJS hybrid exports with conditional entry points. Updated TypeScript config to ES2020 target with stricter rules. Added Vitest test runner with jsdom environment. Pinned Node.js version to 22.12.0. Expanded dev dependencies and lifecycle scripts including pre-push hook configuration.
Publish Guard Scripts
scripts/publish-guard.mjs, scripts/publish-guard.test.mjs, scripts/check-published-version.mjs, scripts/pre-push.mjs, scripts/smoke-pack.mjs
Added version validation utilities and semver comparison logic. Implemented pre-push guard to prevent publishing without version bump. Added smoke test automation for CommonJS, ESM, and TypeScript compatibility validation.
Core Library Components
src/cursorFollower.tsx, src/cursorFollower.test.tsx, src/rocket.Cursor.tsx, src/rocket.Cursor.test.tsx, src/index.ts
Introduced new CursorFollower component with motion tracking, configurable positioning, visibility control, and render-prop API. Refactored RocketCursor to use CursorFollower for rendering and motion handling. Added comprehensive test coverage for both components. Exported public API surface with type definitions.
Demo Application
demo/index.html, demo/main.tsx, demo/styles.css
Updated to English locale with theme optimizations. Added dual-cursor mode system (RocketCursor and StarCursor via CursorFollower). Introduced extensive UI controls for presets, telemetry, and runtime tuning. Implemented dark glassy design system with component-based styling, grids, and responsive adjustments.
Documentation & Testing
README.md, sandbox/follow-test.html
Rewrote README with Quick Start, Build Your Own Cursor guide, API documentation with default values, and SVG extension examples. Updated follow-test sandbox to demonstrate followSpeed control and movement-driven rotation with simplified positioning logic.

Sequence Diagram

sequenceDiagram
    participant User as User/Browser
    participant Demo as Demo App
    participant CF as CursorFollower
    participant RC as RocketCursor
    participant DOM as DOM

    User->>Demo: mousemove event
    Demo->>CF: CursorFollower receives event
    CF->>CF: Calculate distance to target
    alt Distance > threshold
        CF->>CF: Update moving state = true
        CF->>CF: Calculate movement angle
    end
    CF->>CF: Lerp current position toward target
    CF->>CF: Apply rotation if rotateWithMovement enabled
    CF->>RC: Render with isMoving state
    RC->>RC: Conditional FlameSvg opacity based on isMoving
    RC->>DOM: Update transform and rotation
    DOM->>User: Visual feedback
    
    User->>Demo: Stop moving
    CF->>CF: Wait movingTimeout duration
    CF->>CF: Update moving state = false
    RC->>DOM: Update FlameSvg opacity to 0
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~65 minutes

Poem

🐰 A fluffy whisker-twitch of joy
Cursors now dance, not toys,
Two modes spin—rocket bright,
Stars follow, motion takes flight,
Whoosh—the build is strong and tight! 🚀✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

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