Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@vuemod/vue-touch
Advanced tools
Enable tap, swipe, drag, touch, hold, mouse down, mouse up events on DOM Element in vue 3
Enable tap, swipe, drag, touch, hold, mouse down, mouse up events on DOM Element in vue 3
yarn add @vuemod/vue-touch
import touch from "@vuemod/vue-touch";
import type {VueTouch} from "@vuemod/vue-touch";
const app = createApp(App); // App - common component
app.use(touch, {} as VueTouch.Options); // options is optional
When installed globally, directives will be added:
import {defineTouch} from "@vuemod/vue-touch";
import type {VueTouch} from "@vuemod/vue-touch";
import {defineComponent} from "vue";
const app = createApp(defineComponent({
directives: {
touch: defineComponent({} as VueTouch.Options)
}
})); // App - common component
<template>
<div v-touch:tap:10="onTap">Test Event</div>
</template>
<script lang="ts">
import {defineComponent} from "vue";
import type {VueTouchEvent} from "@vuemod/vue-touch";
export default defineComponent({
name: "App",
methods: {
onAll(event: VueTouchEvent) {
console.log(event);
}
}
});
</script>
interface VueTouchEvent {
originalEvent: event,
type: VueTouch.events,
direction: "left" | "right" | "up" | "down",
currentXY: number[],
multi: number,
shiftXY: number[],
scale: 0|1|-1,
scroll: number[]
}
interface VueTouchScrollEvent {
originalEvent: event,
scroll: [number, number]
}
interface Options {
classes?: {
hover?: string,
leave?: string,
press?: string,
tap?: string,
dbltap?:string,
multi?:string,
longtap?: string,
hold?: string,
rollover?: string,
swipe?: string,
drag?: string,
release?: string,
} // classes for all state of component
tolerance?: { // in ms
tap?: number, // in px
multi?: number, // in px
dbltap?: number, // on pc it auto
longtap?: number, // in ms
hold?: number, // in ms
timeout?: number, // in ms
debounce?: number, // in ms
drag?: number, // min distance in px
swipe?: number // min distance in px
}
}
hold: "v-touch-hold",
press: "v-touch-press",
multi: "v-touch-multi",
dbltap: "v-touch-dbltap",
tap: "v-touch-tap",
longtap: "v-touch-longtap",
hover: "v-touch-hover",
leave: "v-touch-leave",
rollover: "v-touch-rollover",
swipe: "v-touch-swipe",
dragstart: "v-touch-dragstart",
drag: "v-touch-drag",
release: "v-touch-release",
FAQs
Enable tap, swipe, drag, touch, hold, mouse down, mouse up events on DOM Element in vue 3
We found that @vuemod/vue-touch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.