@solid-primitives/event-listener
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -52,4 +52,4 @@ import { MaybeAccessor, Many, Directive } from '@solid-primitives/utils'; | ||
*/ | ||
declare function createEventListener<Target extends TargetWithEventMap, EventMap extends EventMapOf<Target>, EventType extends keyof EventMap>(target: MaybeAccessor<Many<Target>>, type: MaybeAccessor<Many<EventType>>, handler: (event: EventMap[EventType]) => void, options?: EventListenerOptions): void; | ||
declare function createEventListener<EventMap extends Record<string, Event>, EventType extends keyof EventMap = keyof EventMap>(target: MaybeAccessor<Many<EventTarget>>, type: MaybeAccessor<Many<EventType>>, handler: (event: EventMap[EventType]) => void, options?: EventListenerOptions): void; | ||
declare function createEventListener<Target extends TargetWithEventMap, EventMap extends EventMapOf<Target>, EventType extends keyof EventMap>(target: MaybeAccessor<Many<Target | undefined>>, type: MaybeAccessor<Many<EventType>>, handler: (event: EventMap[EventType]) => void, options?: EventListenerOptions): void; | ||
declare function createEventListener<EventMap extends Record<string, Event>, EventType extends keyof EventMap = keyof EventMap>(target: MaybeAccessor<Many<EventTarget | undefined>>, type: MaybeAccessor<Many<EventType>>, handler: (event: EventMap[EventType]) => void, options?: EventListenerOptions): void; | ||
/** | ||
@@ -56,0 +56,0 @@ * Provides an reactive signal of last captured event. |
{ | ||
"name": "@solid-primitives/event-listener", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "SolidJS Primitives to manage creating event listeners.", | ||
@@ -38,3 +38,3 @@ "author": "David Di Biase <dave.dibiase@gmail.com>", | ||
"start": "vite serve dev --host", | ||
"dev": "yarn start", | ||
"dev": "npm run start", | ||
"build": "tsup", | ||
@@ -53,3 +53,3 @@ "test": "uvu -r solid-register", | ||
"prettier": "^2.6.2", | ||
"solid-register": "^0.2.3", | ||
"solid-register": "^0.2.5", | ||
"tslib": "^2.3.1", | ||
@@ -69,2 +69,2 @@ "tsup": "^5.12.6", | ||
} | ||
} | ||
} |
@@ -16,3 +16,3 @@ <p> | ||
- [`makeEventListener`](#makeEventListener) - Non-reactive primitive for adding event listeners that get's removed onCleanup. | ||
- [`makeEventListener`](#makeEventListener) - Non-reactive primitive for adding event listeners that gets removed onCleanup. | ||
- [`makeEventListenerStack`](#makeEventListenerStack) - Creates a stack of event listeners, that will be automatically disposed on cleanup. | ||
@@ -41,2 +41,4 @@ | ||
###### Added id `@2.0.0` | ||
Can be used to listen to DOM or Custom Events on window, document, or any EventTarget. | ||
@@ -85,2 +87,4 @@ | ||
###### Added id `@2.0.0` | ||
Creates a stack of event listeners, that will be automatically disposed on cleanup. | ||
@@ -341,2 +345,6 @@ | ||
2.1.0 | ||
Allow for `undefined` targets in `createEventListener` | ||
</details> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28672
347