Skip to content

Add crosshair and shared cursor primitives - #55

Draft
tannerlinsley wants to merge 3 commits into
mainfrom
taren/add-crosshair
Draft

Add crosshair and shared cursor primitives#55
tannerlinsley wants to merge 3 commits into
mainfrom
taren/add-crosshair

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

  • add a renderer-native crosshair mark with x/y rules, labels, marker, clipping, ordering, facets, motion, and export support
  • add shared focus and free cursor controllers with browser and React Native host bindings, synchronization, pinning, ownership, and accessibility behavior
  • make point-free rule marks focusable through semantic anchors without adding pointer hit targets
  • preserve SVG, Canvas, custom renderer/resource, React Native, and granular bundle boundaries
  • migrate the axis-pointer, synchronized-cursor, free-cursor, and cursor-motion catalog cases to the new primitives

Why

Issue #32 exposed a real gap: whenFocused resolved candidates only from interaction points, while ruleX and ruleY intentionally emit no interaction points. Applications therefore had to build renderer-specific rectangle or SVG overlays to get axis pointers and crosshairs.

This keeps rule hit testing unchanged, adds non-interactive semantic focus anchors, and introduces proper crosshair/cursor primitives for both focus-snapped and free cursor use cases.

Validation

  • pnpm test — 832 DOM tests and all six adapter/SSR targets
  • pnpm package:check — packed exports, declarations, runtime consumers, Metro, Expo, and framework adapters
  • pnpm react-native:poc:types
  • pnpm canvas:check — browser-backed Canvas focus regression
  • pnpm benchmark:check — 60-case cross-library comparison bundle baseline
  • node scripts/measure-bundles.mjs --check
  • pnpm exec tsc --noEmit --pretty false -p tsconfig.json
  • pnpm exec prettier --check .
  • pnpm docs:sync and documentation contract checks
  • catalog contract, production build, loading budget, and browser regressions at 320px and 640px
  • GitHub Chart library benchmarks workflow — all static, bundle, comparison, and stress partitions passed

Fixes #32

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 061114c6-923a-4be9-b133-5cf4bdef59b4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

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.

whenFocused silently never renders marks that emit no interaction points (ruleX/ruleY)

1 participant