Socket
Socket
Sign inDemoInstall

@composi/gestures

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@composi/gestures - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "@composi/gestures",
"version": "1.0.1",
"version": "1.0.2",
"description": "Cross-platform gesture library for desktop and mobile.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,6 +28,6 @@ # @composi/gestures

1. eventStart
2. eventEnd
3. eventMove
4. eventCancel
1. eventstart
2. eventend
3. eventmove
4. eventcancel

@@ -37,5 +37,5 @@ On desktop these resolve to `mousedown`, `mouseup` (click), `mousemove` and `mouseout`. On a device with support for pointer events, these become: `pointerdown`, `pointerup`, `pointermove` and `pointercancel`. On a device that supports touch events these become: `touchstart`, `touchend`, `touchmove` and `touchcancel`. You can use these event aliases just like you would any other events, with the assurance that they will work the same everywhere:

```javascript
import { eventStart, eventEnd, eventMove, eventCancel } from '@composi/gestures'
import { eventstart, eventend, eventmove, eventcancel } from '@composi/gestures'
document.querySelector('button').addEventListener(eventEnd, (e) => {
document.querySelector('button').addEventListener(eventend, (e) => {
e.target.classList.toggle('selected')

@@ -85,3 +85,3 @@ })

return (
<button onTap={() => announceTap()}>Tap</button>
<button ontap={() => announceTap()}>Tap</button>
)

@@ -92,3 +92,3 @@ },

return (
<button onSwipe={() => announceSwipe()}>Swipe</button>
<button onswipe={() => announceSwipe()}>Swipe</button>
)

@@ -153,3 +153,3 @@ }

return (
<button ref={this.button} onSwipe={e => this.handleSwipe(e)}>Swipe Me!</button>
<button ref={this.button} onswipe={e => this.handleSwipe(e)}>Swipe Me!</button>
)

@@ -156,0 +156,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc