feat(tap): add tap gesture recognition with multi-tap support#13
Merged
devphilip21 merged 7 commits intomainfrom Jan 6, 2026
Merged
feat(tap): add tap gesture recognition with multi-tap support#13devphilip21 merged 7 commits intomainfrom
devphilip21 merged 7 commits intomainfrom
Conversation
…yles - Add position: relative to .container for proper positioning context - Constrain container width with max-width and center with margin: auto - Remove duplicate .container style rule from layout.css
- Implement TapRecognizer for detecting single/multi-tap gestures - Add tapRecognizer and tapEndOnly operators for stream integration - Support double-tap, triple-tap detection with configurable thresholds - Include comprehensive test coverage for recognizer, state, and geometry - Add TypeScript configuration and build tooling
- Integrate tap gesture recognition with zoom operator - Enable 2.5x zoom multiplier on double-tap, with smart reset near max scale - Update tip text to indicate double-tap as zoom option
- Add .npmignore to exclude source maps from npm package - Add MIT license for @cereb/tap package - Add comprehensive README with API documentation - Update .gitignore to exclude tmp_docs directory
- Add comprehensive tap API documentation with examples - Include multi-tap configuration and chaining behavior - Add sidebar entry for tap gesture documentation
…ignal types - Define PanSourceSignal, PinchSourceSignal, TapSourceSignal interfaces for recognizers - Update panRecognizer, pinchRecognizer, tapRecognizer operators to accept generic signals - Export source signal types for custom integrations (low-level API) - Update documentation and README with low-level recognizer usage examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@cereb/tappackage for tap gesture recognitionFeatures
Operators
tapRecognizer()- Full lifecycle operator emittingstart,end, andcancelphasestapEndOnly()- Simplified operator that only emits successful tap eventstap()- Convenience function that creates a tap stream from an elementConfiguration Options
movementThresholddurationThresholdchainMovementThresholdchainIntervalThresholdTapSignal Value
phase: Tap lifecycle phase (start,end,cancel)x,y: Client coordinatespageX,pageY: Page coordinatestapCount: Consecutive tap count (1=single, 2=double, etc.)duration: How long the pointer was pressed (ms)pointerType: Type of pointer (mouse,touch,pen)Usage Example