diff --git a/dist/event-listener.cjs.map b/dist/event-listener.cjs.map index 6a1e56b..8b9cfd5 100644 --- a/dist/event-listener.cjs.map +++ b/dist/event-listener.cjs.map @@ -1 +1 @@ -{"version":3,"file":"event-listener.cjs","sources":["../src/index.ts"],"sourcesContent":["/**\n * Advanced event listener based on subscribe / publish pattern.\n *\n * @see https://www.patterns.dev/posts/classic-design-patterns/#observerpatternjavascript\n * @see https://gist.github.com/shystruk/d16c0ee7ac7d194da9644e5d740c8338#file-subpub-js\n * @see https://hackernoon.com/do-you-still-register-window-event-listeners-in-each-component-react-in-example-31a4b1f6f1c8\n */\n\nimport {\n SupportedEventObject,\n SupportedEventHandler,\n EventHandler,\n NativeEventTypes,\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n ListenerObject,\n EventsRegistry,\n} from './types';\n\nconst registry: EventsRegistry = {};\n\n/**\n * The global event listener. This function must be a Function.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n * eslint-ignore-next\n */\nconst globalListener = (e: NativeEvent) => {\n const { type, currentTarget } = e;\n\n [...registry[type]].forEach(([element, listenersMap]) => {\n /* istanbul ignore else */\n if (currentTarget === element) {\n [...listenersMap].forEach(([listener, options]) => {\n (listener as EventHandler).apply(element, [e]);\n\n if (typeof options === 'object' && options.once) {\n removeListener(element, type, listener, options);\n }\n });\n }\n });\n};\n\n/**\n * Register a new listener with its options and attach the `globalListener`\n * to the target if this is the first listener.\n */\nconst addListener = (\n element: T,\n eventType: NativeEventTypes,\n listener: SupportedEventHandler,\n options?: AddEventListenerOptions,\n): void => {\n // get element listeners first\n if (!registry[eventType]) {\n registry[eventType] = new Map();\n }\n const oneEventMap = registry[eventType] as unknown as Map>>;\n\n if (!oneEventMap.has(element)) {\n oneEventMap.set(element, new Map());\n }\n const oneElementMap = oneEventMap.get(element) as ListenerObject;\n\n // get listeners size\n const { size } = oneElementMap;\n\n // register listener with its options\n oneElementMap.set(listener as SupportedEventHandler, options);\n\n // add listener last\n if (!size) {\n element.addEventListener(eventType, globalListener as unknown as EventListenerObject, options);\n }\n};\n\n/**\n * Remove a listener from registry and detach the `globalListener`\n * if no listeners are found in the registry.\n *\n */\nconst removeListener = (\n element: T,\n eventType: NativeEventTypes,\n listener: SupportedEventHandler,\n options?: AddEventListenerOptions,\n): void => {\n // get listener first\n const oneEventMap = registry[eventType];\n const oneElementMap = oneEventMap && oneEventMap.get(element);\n const savedOptions = oneElementMap && oneElementMap.get(listener);\n\n // also recover initial options\n const eventOptions = savedOptions !== undefined ? savedOptions : options;\n\n // unsubscribe second, remove from registry\n if (oneElementMap && oneElementMap.has(listener)) oneElementMap.delete(listener);\n if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element);\n if (!oneEventMap || !oneEventMap.size) delete registry[eventType];\n\n // remove listener last\n /* istanbul ignore else */\n if (!oneElementMap || !oneElementMap.size) {\n element.removeEventListener(eventType, globalListener as unknown as EventListenerObject, eventOptions);\n }\n};\n\n// alias main methods\nconst on: typeof addListener = addListener;\nconst off: typeof removeListener = removeListener;\n\nexport { addListener, removeListener, on, off, globalListener, registry };\nexport type {\n SupportedEventObject,\n SupportedEventHandler,\n EventHandler,\n NativeEventTypes,\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n ListenerObject,\n EventsRegistry,\n};\n"],"names":["registry","globalListener","e","type","currentTarget","element","listenersMap","listener","options","removeListener","addListener","eventType","oneEventMap","oneElementMap","size","savedOptions","eventOptions","on","off"],"mappings":"gFAgDA,MAAMA,EAA2B,CAAC,EAQ5BC,EAAkBC,GAAmB,CACnC,KAAA,CAAE,KAAAC,EAAM,cAAAC,CAAkB,EAAAF,EAE/B,CAAA,GAAGF,EAASG,CAAI,CAAC,EAAE,QAAQ,CAAC,CAACE,EAASC,CAAY,IAAM,CAEnDF,IAAkBC,GACnB,CAAA,GAAGC,CAAY,EAAE,QAAQ,CAAC,CAACC,EAAUC,CAAO,IAAM,CAChDD,EAAoC,MAAMF,EAAS,CAACH,CAAC,CAAC,EAEnD,OAAOM,GAAY,UAAYA,EAAQ,MAC1BC,EAAAJ,EAASF,EAAMI,EAAUC,CAAO,CACjD,CACD,CACH,CACD,CACH,EAMME,EAAc,CAClBL,EACAM,EACAJ,EACAC,IACS,CAEJR,EAASW,CAAS,IACZX,EAAAW,CAAS,EAAI,IAAI,KAEtB,MAAAC,EAAcZ,EAASW,CAAS,EAEjCC,EAAY,IAAIP,CAAO,GAC1BO,EAAY,IAAIP,EAAa,IAAA,GAAK,EAE9B,MAAAQ,EAAgBD,EAAY,IAAIP,CAAO,EAGvC,CAAE,KAAAS,CAAS,EAAAD,EAGHA,EAAA,IAAIN,EAAwDC,CAAO,EAG5EM,GACKT,EAAA,iBAAiBM,EAAWV,EAAkDO,CAAO,CAEjG,EAOMC,EAAiB,CACrBJ,EACAM,EACAJ,EACAC,IACS,CAEH,MAAAI,EAAcZ,EAASW,CAAS,EAChCE,EAAgBD,GAAeA,EAAY,IAAIP,CAAO,EACtDU,EAAeF,GAAiBA,EAAc,IAAIN,CAAQ,EAG1DS,EAAeD,IAAiB,OAAYA,EAAeP,EAG7DK,GAAiBA,EAAc,IAAIN,CAAQ,GAAGM,EAAc,OAAON,CAAQ,EAC3EK,IAAgB,CAACC,GAAiB,CAACA,EAAc,OAAOD,EAAY,OAAOP,CAAO,GAClF,CAACO,GAAe,CAACA,EAAY,OAAM,OAAOZ,EAASW,CAAS,GAI5D,CAACE,GAAiB,CAACA,EAAc,OAC3BR,EAAA,oBAAoBM,EAAWV,EAAkDe,CAAY,CAEzG,EAGMC,EAAyBP,EACzBQ,EAA6BT"} \ No newline at end of file +{"version":3,"file":"event-listener.cjs","sources":["../src/index.ts"],"sourcesContent":["/**\n * Advanced event listener based on subscribe / publish pattern.\n *\n * @see https://www.patterns.dev/posts/classic-design-patterns/#observerpatternjavascript\n * @see https://gist.github.com/shystruk/d16c0ee7ac7d194da9644e5d740c8338#file-subpub-js\n * @see https://hackernoon.com/do-you-still-register-window-event-listeners-in-each-component-react-in-example-31a4b1f6f1c8\n */\n\nimport {\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n EventRegistryEntry,\n EventsRegistry,\n} from './types';\n\nconst registry: EventsRegistry = {};\n\n/**\n * The global event listener. This function must be a Function.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n * eslint-ignore-next\n */\nconst globalListener = (e: NativeEvent) => {\n const { type, currentTarget } = e;\n\n [...registry[type]].forEach(([element, listenersMap]) => {\n /* istanbul ignore else */\n if (currentTarget === element) {\n [...listenersMap].forEach(([listener, options]) => {\n listener.apply(element, [e]);\n\n if (typeof options === 'object' && options.once) {\n removeListener(element, type, listener, options);\n }\n });\n }\n });\n};\n\n/**\n * Register a new listener with its options and attach the `globalListener`\n * to the target if this is the first listener.\n */\nconst addListener = (\n element: T,\n eventType: string,\n listener: L,\n options?: AddEventListenerOptions,\n): void => {\n // get element listeners first\n if (!registry[eventType]) {\n registry[eventType] = new Map();\n }\n const oneEventMap = registry[eventType];\n\n if (!oneEventMap.has(element as PossibleEventTarget)) {\n oneEventMap.set(element as PossibleEventTarget, new Map());\n }\n const oneElementMap = oneEventMap.get(element as PossibleEventTarget) as EventRegistryEntry;\n\n // get listeners size\n const { size } = oneElementMap;\n\n // register listener with its options\n oneElementMap.set(listener, options);\n\n // add listener last\n if (!size) {\n (element as PossibleEventTarget).addEventListener(eventType, globalListener as unknown as EventListener, options);\n }\n};\n\n/**\n * Remove a listener from registry and detach the `globalListener`\n * if no listeners are found in the registry.\n *\n */\nconst removeListener = (\n element: T,\n eventType: string,\n listener: L,\n options?: AddEventListenerOptions,\n): void => {\n // get listener first\n const oneEventMap = registry[eventType];\n const oneElementMap = oneEventMap && (oneEventMap.get(element as PossibleEventTarget) as EventRegistryEntry);\n const savedOptions = oneElementMap && oneElementMap.get(listener as NativeEventHandler);\n\n // also recover initial options\n const eventOptions = savedOptions !== undefined ? savedOptions : options;\n\n // unsubscribe second, remove from registry\n if (oneElementMap && oneElementMap.has(listener as NativeEventHandler))\n oneElementMap.delete(listener as NativeEventHandler);\n if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element as PossibleEventTarget);\n if (!oneEventMap || !oneEventMap.size) delete registry[eventType];\n\n // remove listener last\n /* istanbul ignore else */\n if (!oneElementMap || !oneElementMap.size) {\n (element as PossibleEventTarget).removeEventListener(\n eventType,\n globalListener as unknown as EventListener,\n eventOptions,\n );\n }\n};\n\n// alias main methods\nconst on: typeof addListener = addListener;\nconst off: typeof removeListener = removeListener;\n\nexport { addListener, removeListener, on, off, globalListener, registry };\nexport type {\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n EventRegistryEntry,\n EventsRegistry,\n};\n"],"names":["registry","globalListener","e","type","currentTarget","element","listenersMap","listener","options","removeListener","addListener","eventType","oneEventMap","oneElementMap","size","savedOptions","eventOptions","on","off"],"mappings":"gFA4CA,MAAMA,EAA2B,CAAC,EAQ5BC,EAAkBC,GAAmB,CACnC,KAAA,CAAE,KAAAC,EAAM,cAAAC,CAAkB,EAAAF,EAE/B,CAAA,GAAGF,EAASG,CAAI,CAAC,EAAE,QAAQ,CAAC,CAACE,EAASC,CAAY,IAAM,CAEnDF,IAAkBC,GACnB,CAAA,GAAGC,CAAY,EAAE,QAAQ,CAAC,CAACC,EAAUC,CAAO,IAAM,CACjDD,EAAS,MAAMF,EAAS,CAACH,CAAC,CAAC,EAEvB,OAAOM,GAAY,UAAYA,EAAQ,MAC1BC,EAAAJ,EAASF,EAAMI,EAAUC,CAAO,CACjD,CACD,CACH,CACD,CACH,EAMME,EAAc,CAClBL,EACAM,EACAJ,EACAC,IACS,CAEJR,EAASW,CAAS,IACZX,EAAAW,CAAS,EAAI,IAAI,KAEtB,MAAAC,EAAcZ,EAASW,CAAS,EAEjCC,EAAY,IAAIP,CAA8B,GACjDO,EAAY,IAAIP,EAAoC,IAAA,GAAK,EAErD,MAAAQ,EAAgBD,EAAY,IAAIP,CAA8B,EAG9D,CAAE,KAAAS,CAAS,EAAAD,EAGHA,EAAA,IAAIN,EAAUC,CAAO,EAG9BM,GACFT,EAAgC,iBAAiBM,EAAWV,EAA4CO,CAAO,CAEpH,EAOMC,EAAiB,CACrBJ,EACAM,EACAJ,EACAC,IACS,CAEH,MAAAI,EAAcZ,EAASW,CAAS,EAChCE,EAAgBD,GAAgBA,EAAY,IAAIP,CAA8B,EAC9EU,EAAeF,GAAiBA,EAAc,IAAIN,CAA8C,EAGhGS,EAAeD,IAAiB,OAAYA,EAAeP,EAG7DK,GAAiBA,EAAc,IAAIN,CAA8C,GACnFM,EAAc,OAAON,CAA8C,EACjEK,IAAgB,CAACC,GAAiB,CAACA,EAAc,OAAOD,EAAY,OAAOP,CAA8B,GACzG,CAACO,GAAe,CAACA,EAAY,OAAM,OAAOZ,EAASW,CAAS,GAI5D,CAACE,GAAiB,CAACA,EAAc,OAClCR,EAAgC,oBAC/BM,EACAV,EACAe,CAAA,CAGN,EAGMC,EAAyBP,EACzBQ,EAA6BT"} \ No newline at end of file diff --git a/dist/event-listener.d.ts b/dist/event-listener.d.ts index 45d01d1..15ae70e 100644 --- a/dist/event-listener.d.ts +++ b/dist/event-listener.d.ts @@ -18,9 +18,9 @@ export interface AbstractView { styleMedia: StyleMedia; document: Document; } -export interface BaseEvent { - nativeEvent: Event & E; - currentTarget: C & EventTarget; +export interface BaseEvent { + nativeEvent: E; + currentTarget: C | null; target: T & EventTarget; bubbles: boolean; cancelable: boolean; @@ -33,7 +33,7 @@ export interface BaseEvent { isPropagationStopped(): boolean; persist(): void; timeStamp: number; - type: string & NativeEventTypes; + type: string; } /** * currentTarget - a reference to the element on which the event listener is registered. @@ -42,9 +42,9 @@ export interface BaseEvent { * This might be a child element to the element on which the event listener is registered. * If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11508#issuecomment-256045682 */ -export type NativeEvent = BaseEvent; +export type NativeEvent = BaseEvent; export interface ClipboardEvent extends NativeEvent { - clipboardData?: DataTransfer; + clipboardData: DataTransfer; } export interface CompositionEvent extends NativeEvent { data: string; @@ -152,28 +152,25 @@ export interface TransitionEvent extends NativeEvent> = (event: E) => void; -export type NativeEventHandler = EventHandler>; -export type ClipboardEventHandler = EventHandler>; -export type CompositionEventHandler = EventHandler>; -export type DragEventHandler = EventHandler>; -export type FocusEventHandler = EventHandler>; -export type FormEventHandler = EventHandler>; -export type ChangeEventHandler = EventHandler>; -export type KeyboardEventHandler = EventHandler>; -export type MouseEventHandler = EventHandler>; -export type TouchEventHandler = EventHandler>; -export type PointerEventHandler = EventHandler>; -export type UIEventHandler = EventHandler>; -export type WheelEventHandler = EventHandler>; -export type AnimationEventHandler = EventHandler>; -export type TransitionEventHandler = EventHandler>; -export type SupportedEventObject = NativeEvent | ClipboardEvent | CompositionEvent | DragEvent | FocusEvent | FormEvent | ChangeEvent | KeyboardEvent | MouseEvent | TouchEvent | PointerEvent | UIEvent | WheelEvent | AnimationEvent | TransitionEvent; -export type SupportedEventHandler = NativeEventHandler | ClipboardEventHandler | CompositionEventHandler | DragEventHandler | FocusEventHandler | FormEventHandler | ChangeEventHandler | KeyboardEventHandler | MouseEventHandler | TouchEventHandler | PointerEventHandler | UIEventHandler | WheelEventHandler | AnimationEventHandler | TransitionEventHandler; -export type NativeEventTypes = "DOMContentLoaded" | "DOMMouseScroll" | "abort" | "beforeunload" | "blur" | "change" | "click" | "contextmenu" | "dblclick" | "error" | "focus" | "focusin" | "focusout" | "gesturechange" | "gestureend" | "gesturestart" | "hover" | "keydown" | "keypress" | "keyup" | "load" | "mousedown" | "mouseenter" | "mousein" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "mousewheel" | "move" | "orientationchange" | "pointercancel" | "pointerdown" | "pointerleave" | "pointermove" | "pointerup" | "readystatechange" | "reset" | "resize" | "scroll" | "select" | "selectend" | "selectstart" | "submit" | "touchcancel" | "touchend" | "touchmove" | "touchstart" | "unload"; +export type EventHandler> = (event: E) => void; +export type NativeEventHandler = EventHandler>; +export type ClipboardEventHandler = EventHandler>; +export type CompositionEventHandler = EventHandler>; +export type DragEventHandler = EventHandler>; +export type FocusEventHandler = EventHandler>; +export type FormEventHandler = EventHandler>; +export type ChangeEventHandler = EventHandler>; +export type KeyboardEventHandler = EventHandler>; +export type MouseEventHandler = EventHandler>; +export type TouchEventHandler = EventHandler>; +export type PointerEventHandler = EventHandler>; +export type UIEventHandler = EventHandler>; +export type WheelEventHandler = EventHandler>; +export type AnimationEventHandler = EventHandler>; +export type TransitionEventHandler = EventHandler>; export type PossibleEventTarget = EventTarget & (Element | Document | Window); -export type ListenerObject> = Map; -export type EventsRegistry = Record>>; +export type EventRegistryEntry> = Map; +export type EventsRegistry = Record>>; export declare const registry: EventsRegistry; /** * The global event listener. This function must be a Function. @@ -186,13 +183,13 @@ export declare const globalListener: (e: NativeEvent) => void; * Register a new listener with its options and attach the `globalListener` * to the target if this is the first listener. */ -export declare const addListener: (element: T, eventType: NativeEventTypes, listener: SupportedEventHandler, options?: AddEventListenerOptions) => void; +export declare const addListener: (element: T, eventType: string, listener: L, options?: AddEventListenerOptions) => void; /** * Remove a listener from registry and detach the `globalListener` * if no listeners are found in the registry. * */ -export declare const removeListener: (element: T, eventType: NativeEventTypes, listener: SupportedEventHandler, options?: AddEventListenerOptions) => void; +export declare const removeListener: (element: T, eventType: string, listener: L, options?: AddEventListenerOptions) => void; export declare const on: typeof addListener; export declare const off: typeof removeListener; diff --git a/dist/event-listener.js.map b/dist/event-listener.js.map index 8f46251..fc7c3cd 100644 --- a/dist/event-listener.js.map +++ b/dist/event-listener.js.map @@ -1 +1 @@ -{"version":3,"file":"event-listener.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * Advanced event listener based on subscribe / publish pattern.\n *\n * @see https://www.patterns.dev/posts/classic-design-patterns/#observerpatternjavascript\n * @see https://gist.github.com/shystruk/d16c0ee7ac7d194da9644e5d740c8338#file-subpub-js\n * @see https://hackernoon.com/do-you-still-register-window-event-listeners-in-each-component-react-in-example-31a4b1f6f1c8\n */\n\nimport {\n SupportedEventObject,\n SupportedEventHandler,\n EventHandler,\n NativeEventTypes,\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n ListenerObject,\n EventsRegistry,\n} from './types';\n\nconst registry: EventsRegistry = {};\n\n/**\n * The global event listener. This function must be a Function.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n * eslint-ignore-next\n */\nconst globalListener = (e: NativeEvent) => {\n const { type, currentTarget } = e;\n\n [...registry[type]].forEach(([element, listenersMap]) => {\n /* istanbul ignore else */\n if (currentTarget === element) {\n [...listenersMap].forEach(([listener, options]) => {\n (listener as EventHandler).apply(element, [e]);\n\n if (typeof options === 'object' && options.once) {\n removeListener(element, type, listener, options);\n }\n });\n }\n });\n};\n\n/**\n * Register a new listener with its options and attach the `globalListener`\n * to the target if this is the first listener.\n */\nconst addListener = (\n element: T,\n eventType: NativeEventTypes,\n listener: SupportedEventHandler,\n options?: AddEventListenerOptions,\n): void => {\n // get element listeners first\n if (!registry[eventType]) {\n registry[eventType] = new Map();\n }\n const oneEventMap = registry[eventType] as unknown as Map>>;\n\n if (!oneEventMap.has(element)) {\n oneEventMap.set(element, new Map());\n }\n const oneElementMap = oneEventMap.get(element) as ListenerObject;\n\n // get listeners size\n const { size } = oneElementMap;\n\n // register listener with its options\n oneElementMap.set(listener as SupportedEventHandler, options);\n\n // add listener last\n if (!size) {\n element.addEventListener(eventType, globalListener as unknown as EventListenerObject, options);\n }\n};\n\n/**\n * Remove a listener from registry and detach the `globalListener`\n * if no listeners are found in the registry.\n *\n */\nconst removeListener = (\n element: T,\n eventType: NativeEventTypes,\n listener: SupportedEventHandler,\n options?: AddEventListenerOptions,\n): void => {\n // get listener first\n const oneEventMap = registry[eventType];\n const oneElementMap = oneEventMap && oneEventMap.get(element);\n const savedOptions = oneElementMap && oneElementMap.get(listener);\n\n // also recover initial options\n const eventOptions = savedOptions !== undefined ? savedOptions : options;\n\n // unsubscribe second, remove from registry\n if (oneElementMap && oneElementMap.has(listener)) oneElementMap.delete(listener);\n if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element);\n if (!oneEventMap || !oneEventMap.size) delete registry[eventType];\n\n // remove listener last\n /* istanbul ignore else */\n if (!oneElementMap || !oneElementMap.size) {\n element.removeEventListener(eventType, globalListener as unknown as EventListenerObject, eventOptions);\n }\n};\n\n// alias main methods\nconst on: typeof addListener = addListener;\nconst off: typeof removeListener = removeListener;\n\nexport { addListener, removeListener, on, off, globalListener, registry };\nexport type {\n SupportedEventObject,\n SupportedEventHandler,\n EventHandler,\n NativeEventTypes,\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n ListenerObject,\n EventsRegistry,\n};\n"],"names":["registry","globalListener","e","type","currentTarget","element","listenersMap","listener","options","removeListener","addListener","eventType","oneEventMap","oneElementMap","size","savedOptions","eventOptions","on","off"],"mappings":"sCAgDM,MAAAA,EAA2B,CAAC,EAQ5BC,EAAkBC,GAAmB,CACnC,KAAA,CAAE,KAAAC,EAAM,cAAAC,CAAkB,EAAAF,EAE/B,CAAA,GAAGF,EAASG,CAAI,CAAC,EAAE,QAAQ,CAAC,CAACE,EAASC,CAAY,IAAM,CAEnDF,IAAkBC,GACnB,CAAA,GAAGC,CAAY,EAAE,QAAQ,CAAC,CAACC,EAAUC,CAAO,IAAM,CAChDD,EAAoC,MAAMF,EAAS,CAACH,CAAC,CAAC,EAEnD,OAAOM,GAAY,UAAYA,EAAQ,MAC1BC,EAAAJ,EAASF,EAAMI,EAAUC,CAAO,CACjD,CACD,CACH,CACD,CACH,EAMME,EAAc,CAClBL,EACAM,EACAJ,EACAC,IACS,CAEJR,EAASW,CAAS,IACZX,EAAAW,CAAS,EAAI,IAAI,KAEtB,MAAAC,EAAcZ,EAASW,CAAS,EAEjCC,EAAY,IAAIP,CAAO,GAC1BO,EAAY,IAAIP,EAAa,IAAA,GAAK,EAE9B,MAAAQ,EAAgBD,EAAY,IAAIP,CAAO,EAGvC,CAAE,KAAAS,CAAS,EAAAD,EAGHA,EAAA,IAAIN,EAAwDC,CAAO,EAG5EM,GACKT,EAAA,iBAAiBM,EAAWV,EAAkDO,CAAO,CAEjG,EAOMC,EAAiB,CACrBJ,EACAM,EACAJ,EACAC,IACS,CAEH,MAAAI,EAAcZ,EAASW,CAAS,EAChCE,EAAgBD,GAAeA,EAAY,IAAIP,CAAO,EACtDU,EAAeF,GAAiBA,EAAc,IAAIN,CAAQ,EAG1DS,EAAeD,IAAiB,OAAYA,EAAeP,EAG7DK,GAAiBA,EAAc,IAAIN,CAAQ,GAAGM,EAAc,OAAON,CAAQ,EAC3EK,IAAgB,CAACC,GAAiB,CAACA,EAAc,OAAOD,EAAY,OAAOP,CAAO,GAClF,CAACO,GAAe,CAACA,EAAY,OAAM,OAAOZ,EAASW,CAAS,GAI5D,CAACE,GAAiB,CAACA,EAAc,OAC3BR,EAAA,oBAAoBM,EAAWV,EAAkDe,CAAY,CAEzG,EAGMC,EAAyBP,EACzBQ,EAA6BT"} \ No newline at end of file +{"version":3,"file":"event-listener.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * Advanced event listener based on subscribe / publish pattern.\n *\n * @see https://www.patterns.dev/posts/classic-design-patterns/#observerpatternjavascript\n * @see https://gist.github.com/shystruk/d16c0ee7ac7d194da9644e5d740c8338#file-subpub-js\n * @see https://hackernoon.com/do-you-still-register-window-event-listeners-in-each-component-react-in-example-31a4b1f6f1c8\n */\n\nimport {\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n EventRegistryEntry,\n EventsRegistry,\n} from './types';\n\nconst registry: EventsRegistry = {};\n\n/**\n * The global event listener. This function must be a Function.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n * eslint-ignore-next\n */\nconst globalListener = (e: NativeEvent) => {\n const { type, currentTarget } = e;\n\n [...registry[type]].forEach(([element, listenersMap]) => {\n /* istanbul ignore else */\n if (currentTarget === element) {\n [...listenersMap].forEach(([listener, options]) => {\n listener.apply(element, [e]);\n\n if (typeof options === 'object' && options.once) {\n removeListener(element, type, listener, options);\n }\n });\n }\n });\n};\n\n/**\n * Register a new listener with its options and attach the `globalListener`\n * to the target if this is the first listener.\n */\nconst addListener = (\n element: T,\n eventType: string,\n listener: L,\n options?: AddEventListenerOptions,\n): void => {\n // get element listeners first\n if (!registry[eventType]) {\n registry[eventType] = new Map();\n }\n const oneEventMap = registry[eventType];\n\n if (!oneEventMap.has(element as PossibleEventTarget)) {\n oneEventMap.set(element as PossibleEventTarget, new Map());\n }\n const oneElementMap = oneEventMap.get(element as PossibleEventTarget) as EventRegistryEntry;\n\n // get listeners size\n const { size } = oneElementMap;\n\n // register listener with its options\n oneElementMap.set(listener, options);\n\n // add listener last\n if (!size) {\n (element as PossibleEventTarget).addEventListener(eventType, globalListener as unknown as EventListener, options);\n }\n};\n\n/**\n * Remove a listener from registry and detach the `globalListener`\n * if no listeners are found in the registry.\n *\n */\nconst removeListener = (\n element: T,\n eventType: string,\n listener: L,\n options?: AddEventListenerOptions,\n): void => {\n // get listener first\n const oneEventMap = registry[eventType];\n const oneElementMap = oneEventMap && (oneEventMap.get(element as PossibleEventTarget) as EventRegistryEntry);\n const savedOptions = oneElementMap && oneElementMap.get(listener as NativeEventHandler);\n\n // also recover initial options\n const eventOptions = savedOptions !== undefined ? savedOptions : options;\n\n // unsubscribe second, remove from registry\n if (oneElementMap && oneElementMap.has(listener as NativeEventHandler))\n oneElementMap.delete(listener as NativeEventHandler);\n if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element as PossibleEventTarget);\n if (!oneEventMap || !oneEventMap.size) delete registry[eventType];\n\n // remove listener last\n /* istanbul ignore else */\n if (!oneElementMap || !oneElementMap.size) {\n (element as PossibleEventTarget).removeEventListener(\n eventType,\n globalListener as unknown as EventListener,\n eventOptions,\n );\n }\n};\n\n// alias main methods\nconst on: typeof addListener = addListener;\nconst off: typeof removeListener = removeListener;\n\nexport { addListener, removeListener, on, off, globalListener, registry };\nexport type {\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n EventRegistryEntry,\n EventsRegistry,\n};\n"],"names":["registry","globalListener","e","type","currentTarget","element","listenersMap","listener","options","removeListener","addListener","eventType","oneEventMap","oneElementMap","size","savedOptions","eventOptions","on","off"],"mappings":"sCA4CM,MAAAA,EAA2B,CAAC,EAQ5BC,EAAkBC,GAAmB,CACnC,KAAA,CAAE,KAAAC,EAAM,cAAAC,CAAkB,EAAAF,EAE/B,CAAA,GAAGF,EAASG,CAAI,CAAC,EAAE,QAAQ,CAAC,CAACE,EAASC,CAAY,IAAM,CAEnDF,IAAkBC,GACnB,CAAA,GAAGC,CAAY,EAAE,QAAQ,CAAC,CAACC,EAAUC,CAAO,IAAM,CACjDD,EAAS,MAAMF,EAAS,CAACH,CAAC,CAAC,EAEvB,OAAOM,GAAY,UAAYA,EAAQ,MAC1BC,EAAAJ,EAASF,EAAMI,EAAUC,CAAO,CACjD,CACD,CACH,CACD,CACH,EAMME,EAAc,CAClBL,EACAM,EACAJ,EACAC,IACS,CAEJR,EAASW,CAAS,IACZX,EAAAW,CAAS,EAAI,IAAI,KAEtB,MAAAC,EAAcZ,EAASW,CAAS,EAEjCC,EAAY,IAAIP,CAA8B,GACjDO,EAAY,IAAIP,EAAoC,IAAA,GAAK,EAErD,MAAAQ,EAAgBD,EAAY,IAAIP,CAA8B,EAG9D,CAAE,KAAAS,CAAS,EAAAD,EAGHA,EAAA,IAAIN,EAAUC,CAAO,EAG9BM,GACFT,EAAgC,iBAAiBM,EAAWV,EAA4CO,CAAO,CAEpH,EAOMC,EAAiB,CACrBJ,EACAM,EACAJ,EACAC,IACS,CAEH,MAAAI,EAAcZ,EAASW,CAAS,EAChCE,EAAgBD,GAAgBA,EAAY,IAAIP,CAA8B,EAC9EU,EAAeF,GAAiBA,EAAc,IAAIN,CAA8C,EAGhGS,EAAeD,IAAiB,OAAYA,EAAeP,EAG7DK,GAAiBA,EAAc,IAAIN,CAA8C,GACnFM,EAAc,OAAON,CAA8C,EACjEK,IAAgB,CAACC,GAAiB,CAACA,EAAc,OAAOD,EAAY,OAAOP,CAA8B,GACzG,CAACO,GAAe,CAACA,EAAY,OAAM,OAAOZ,EAASW,CAAS,GAI5D,CAACE,GAAiB,CAACA,EAAc,OAClCR,EAAgC,oBAC/BM,EACAV,EACAe,CAAA,CAGN,EAGMC,EAAyBP,EACzBQ,EAA6BT"} \ No newline at end of file diff --git a/dist/event-listener.mjs b/dist/event-listener.mjs index af51c2a..8d29214 100644 --- a/dist/event-listener.mjs +++ b/dist/event-listener.mjs @@ -13,7 +13,11 @@ const e = {}, f = (t) => { o.set(i, n), a || t.addEventListener(c, f, n); }, r = (t, c, i, n) => { const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n; - o && o.has(i) && o.delete(i), s && (!o || !o.size) && s.delete(t), (!s || !s.size) && delete e[c], (!o || !o.size) && t.removeEventListener(c, f, d); + o && o.has(i) && o.delete(i), s && (!o || !o.size) && s.delete(t), (!s || !s.size) && delete e[c], (!o || !o.size) && t.removeEventListener( + c, + f, + d + ); }, g = E, M = r; export { E as addListener, diff --git a/dist/event-listener.mjs.map b/dist/event-listener.mjs.map index 33c2bd5..b75e009 100644 --- a/dist/event-listener.mjs.map +++ b/dist/event-listener.mjs.map @@ -1 +1 @@ -{"version":3,"file":"event-listener.mjs","sources":["../src/index.ts"],"sourcesContent":["/**\n * Advanced event listener based on subscribe / publish pattern.\n *\n * @see https://www.patterns.dev/posts/classic-design-patterns/#observerpatternjavascript\n * @see https://gist.github.com/shystruk/d16c0ee7ac7d194da9644e5d740c8338#file-subpub-js\n * @see https://hackernoon.com/do-you-still-register-window-event-listeners-in-each-component-react-in-example-31a4b1f6f1c8\n */\n\nimport {\n SupportedEventObject,\n SupportedEventHandler,\n EventHandler,\n NativeEventTypes,\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n ListenerObject,\n EventsRegistry,\n} from './types';\n\nconst registry: EventsRegistry = {};\n\n/**\n * The global event listener. This function must be a Function.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n * eslint-ignore-next\n */\nconst globalListener = (e: NativeEvent) => {\n const { type, currentTarget } = e;\n\n [...registry[type]].forEach(([element, listenersMap]) => {\n /* istanbul ignore else */\n if (currentTarget === element) {\n [...listenersMap].forEach(([listener, options]) => {\n (listener as EventHandler).apply(element, [e]);\n\n if (typeof options === 'object' && options.once) {\n removeListener(element, type, listener, options);\n }\n });\n }\n });\n};\n\n/**\n * Register a new listener with its options and attach the `globalListener`\n * to the target if this is the first listener.\n */\nconst addListener = (\n element: T,\n eventType: NativeEventTypes,\n listener: SupportedEventHandler,\n options?: AddEventListenerOptions,\n): void => {\n // get element listeners first\n if (!registry[eventType]) {\n registry[eventType] = new Map();\n }\n const oneEventMap = registry[eventType] as unknown as Map>>;\n\n if (!oneEventMap.has(element)) {\n oneEventMap.set(element, new Map());\n }\n const oneElementMap = oneEventMap.get(element) as ListenerObject;\n\n // get listeners size\n const { size } = oneElementMap;\n\n // register listener with its options\n oneElementMap.set(listener as SupportedEventHandler, options);\n\n // add listener last\n if (!size) {\n element.addEventListener(eventType, globalListener as unknown as EventListenerObject, options);\n }\n};\n\n/**\n * Remove a listener from registry and detach the `globalListener`\n * if no listeners are found in the registry.\n *\n */\nconst removeListener = (\n element: T,\n eventType: NativeEventTypes,\n listener: SupportedEventHandler,\n options?: AddEventListenerOptions,\n): void => {\n // get listener first\n const oneEventMap = registry[eventType];\n const oneElementMap = oneEventMap && oneEventMap.get(element);\n const savedOptions = oneElementMap && oneElementMap.get(listener);\n\n // also recover initial options\n const eventOptions = savedOptions !== undefined ? savedOptions : options;\n\n // unsubscribe second, remove from registry\n if (oneElementMap && oneElementMap.has(listener)) oneElementMap.delete(listener);\n if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element);\n if (!oneEventMap || !oneEventMap.size) delete registry[eventType];\n\n // remove listener last\n /* istanbul ignore else */\n if (!oneElementMap || !oneElementMap.size) {\n element.removeEventListener(eventType, globalListener as unknown as EventListenerObject, eventOptions);\n }\n};\n\n// alias main methods\nconst on: typeof addListener = addListener;\nconst off: typeof removeListener = removeListener;\n\nexport { addListener, removeListener, on, off, globalListener, registry };\nexport type {\n SupportedEventObject,\n SupportedEventHandler,\n EventHandler,\n NativeEventTypes,\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n ListenerObject,\n EventsRegistry,\n};\n"],"names":["registry","globalListener","e","type","currentTarget","element","listenersMap","listener","options","removeListener","addListener","eventType","oneEventMap","oneElementMap","size","savedOptions","eventOptions","on","off"],"mappings":"AAgDA,MAAMA,IAA2B,CAAC,GAQ5BC,IAAiB,CAACC,MAAmB;AACnC,QAAA,EAAE,MAAAC,GAAM,eAAAC,EAAkB,IAAAF;AAE/B,GAAA,GAAGF,EAASG,CAAI,CAAC,EAAE,QAAQ,CAAC,CAACE,GAASC,CAAY,MAAM;AAEvD,IAAIF,MAAkBC,KACnB,CAAA,GAAGC,CAAY,EAAE,QAAQ,CAAC,CAACC,GAAUC,CAAO,MAAM;AAChD,MAAAD,EAAoC,MAAMF,GAAS,CAACH,CAAC,CAAC,GAEnD,OAAOM,KAAY,YAAYA,EAAQ,QAC1BC,EAAAJ,GAASF,GAAMI,GAAUC,CAAO;AAAA,IACjD,CACD;AAAA,EACH,CACD;AACH,GAMME,IAAc,CAClBL,GACAM,GACAJ,GACAC,MACS;AAEL,EAACR,EAASW,CAAS,MACZX,EAAAW,CAAS,IAAI,oBAAI;AAEtB,QAAAC,IAAcZ,EAASW,CAAS;AAEtC,EAAKC,EAAY,IAAIP,CAAO,KAC1BO,EAAY,IAAIP,GAAa,oBAAA,IAAK,CAAA;AAE9B,QAAAQ,IAAgBD,EAAY,IAAIP,CAAO,GAGvC,EAAE,MAAAS,EAAS,IAAAD;AAGH,EAAAA,EAAA,IAAIN,GAAwDC,CAAO,GAG5EM,KACKT,EAAA,iBAAiBM,GAAWV,GAAkDO,CAAO;AAEjG,GAOMC,IAAiB,CACrBJ,GACAM,GACAJ,GACAC,MACS;AAEH,QAAAI,IAAcZ,EAASW,CAAS,GAChCE,IAAgBD,KAAeA,EAAY,IAAIP,CAAO,GACtDU,IAAeF,KAAiBA,EAAc,IAAIN,CAAQ,GAG1DS,IAAeD,MAAiB,SAAYA,IAAeP;AAG7D,EAAAK,KAAiBA,EAAc,IAAIN,CAAQ,KAAGM,EAAc,OAAON,CAAQ,GAC3EK,MAAgB,CAACC,KAAiB,CAACA,EAAc,SAAOD,EAAY,OAAOP,CAAO,IAClF,CAACO,KAAe,CAACA,EAAY,SAAM,OAAOZ,EAASW,CAAS,IAI5D,CAACE,KAAiB,CAACA,EAAc,SAC3BR,EAAA,oBAAoBM,GAAWV,GAAkDe,CAAY;AAEzG,GAGMC,IAAyBP,GACzBQ,IAA6BT;"} \ No newline at end of file +{"version":3,"file":"event-listener.mjs","sources":["../src/index.ts"],"sourcesContent":["/**\n * Advanced event listener based on subscribe / publish pattern.\n *\n * @see https://www.patterns.dev/posts/classic-design-patterns/#observerpatternjavascript\n * @see https://gist.github.com/shystruk/d16c0ee7ac7d194da9644e5d740c8338#file-subpub-js\n * @see https://hackernoon.com/do-you-still-register-window-event-listeners-in-each-component-react-in-example-31a4b1f6f1c8\n */\n\nimport {\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n EventRegistryEntry,\n EventsRegistry,\n} from './types';\n\nconst registry: EventsRegistry = {};\n\n/**\n * The global event listener. This function must be a Function.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n * eslint-ignore-next\n */\nconst globalListener = (e: NativeEvent) => {\n const { type, currentTarget } = e;\n\n [...registry[type]].forEach(([element, listenersMap]) => {\n /* istanbul ignore else */\n if (currentTarget === element) {\n [...listenersMap].forEach(([listener, options]) => {\n listener.apply(element, [e]);\n\n if (typeof options === 'object' && options.once) {\n removeListener(element, type, listener, options);\n }\n });\n }\n });\n};\n\n/**\n * Register a new listener with its options and attach the `globalListener`\n * to the target if this is the first listener.\n */\nconst addListener = (\n element: T,\n eventType: string,\n listener: L,\n options?: AddEventListenerOptions,\n): void => {\n // get element listeners first\n if (!registry[eventType]) {\n registry[eventType] = new Map();\n }\n const oneEventMap = registry[eventType];\n\n if (!oneEventMap.has(element as PossibleEventTarget)) {\n oneEventMap.set(element as PossibleEventTarget, new Map());\n }\n const oneElementMap = oneEventMap.get(element as PossibleEventTarget) as EventRegistryEntry;\n\n // get listeners size\n const { size } = oneElementMap;\n\n // register listener with its options\n oneElementMap.set(listener, options);\n\n // add listener last\n if (!size) {\n (element as PossibleEventTarget).addEventListener(eventType, globalListener as unknown as EventListener, options);\n }\n};\n\n/**\n * Remove a listener from registry and detach the `globalListener`\n * if no listeners are found in the registry.\n *\n */\nconst removeListener = (\n element: T,\n eventType: string,\n listener: L,\n options?: AddEventListenerOptions,\n): void => {\n // get listener first\n const oneEventMap = registry[eventType];\n const oneElementMap = oneEventMap && (oneEventMap.get(element as PossibleEventTarget) as EventRegistryEntry);\n const savedOptions = oneElementMap && oneElementMap.get(listener as NativeEventHandler);\n\n // also recover initial options\n const eventOptions = savedOptions !== undefined ? savedOptions : options;\n\n // unsubscribe second, remove from registry\n if (oneElementMap && oneElementMap.has(listener as NativeEventHandler))\n oneElementMap.delete(listener as NativeEventHandler);\n if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element as PossibleEventTarget);\n if (!oneEventMap || !oneEventMap.size) delete registry[eventType];\n\n // remove listener last\n /* istanbul ignore else */\n if (!oneElementMap || !oneElementMap.size) {\n (element as PossibleEventTarget).removeEventListener(\n eventType,\n globalListener as unknown as EventListener,\n eventOptions,\n );\n }\n};\n\n// alias main methods\nconst on: typeof addListener = addListener;\nconst off: typeof removeListener = removeListener;\n\nexport { addListener, removeListener, on, off, globalListener, registry };\nexport type {\n NativeEvent,\n ClipboardEvent,\n CompositionEvent,\n DragEvent,\n FocusEvent,\n FormEvent,\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n TouchEvent,\n PointerEvent,\n UIEvent,\n WheelEvent,\n AnimationEvent,\n TransitionEvent,\n NativeEventHandler,\n ClipboardEventHandler,\n CompositionEventHandler,\n DragEventHandler,\n FocusEventHandler,\n FormEventHandler,\n ChangeEventHandler,\n KeyboardEventHandler,\n MouseEventHandler,\n TouchEventHandler,\n PointerEventHandler,\n UIEventHandler,\n WheelEventHandler,\n AnimationEventHandler,\n TransitionEventHandler,\n PossibleEventTarget,\n EventRegistryEntry,\n EventsRegistry,\n};\n"],"names":["registry","globalListener","e","type","currentTarget","element","listenersMap","listener","options","removeListener","addListener","eventType","oneEventMap","oneElementMap","size","savedOptions","eventOptions","on","off"],"mappings":"AA4CA,MAAMA,IAA2B,CAAC,GAQ5BC,IAAiB,CAACC,MAAmB;AACnC,QAAA,EAAE,MAAAC,GAAM,eAAAC,EAAkB,IAAAF;AAE/B,GAAA,GAAGF,EAASG,CAAI,CAAC,EAAE,QAAQ,CAAC,CAACE,GAASC,CAAY,MAAM;AAEvD,IAAIF,MAAkBC,KACnB,CAAA,GAAGC,CAAY,EAAE,QAAQ,CAAC,CAACC,GAAUC,CAAO,MAAM;AACjD,MAAAD,EAAS,MAAMF,GAAS,CAACH,CAAC,CAAC,GAEvB,OAAOM,KAAY,YAAYA,EAAQ,QAC1BC,EAAAJ,GAASF,GAAMI,GAAUC,CAAO;AAAA,IACjD,CACD;AAAA,EACH,CACD;AACH,GAMME,IAAc,CAClBL,GACAM,GACAJ,GACAC,MACS;AAEL,EAACR,EAASW,CAAS,MACZX,EAAAW,CAAS,IAAI,oBAAI;AAEtB,QAAAC,IAAcZ,EAASW,CAAS;AAEtC,EAAKC,EAAY,IAAIP,CAA8B,KACjDO,EAAY,IAAIP,GAAoC,oBAAA,IAAK,CAAA;AAErD,QAAAQ,IAAgBD,EAAY,IAAIP,CAA8B,GAG9D,EAAE,MAAAS,EAAS,IAAAD;AAGH,EAAAA,EAAA,IAAIN,GAAUC,CAAO,GAG9BM,KACFT,EAAgC,iBAAiBM,GAAWV,GAA4CO,CAAO;AAEpH,GAOMC,IAAiB,CACrBJ,GACAM,GACAJ,GACAC,MACS;AAEH,QAAAI,IAAcZ,EAASW,CAAS,GAChCE,IAAgBD,KAAgBA,EAAY,IAAIP,CAA8B,GAC9EU,IAAeF,KAAiBA,EAAc,IAAIN,CAA8C,GAGhGS,IAAeD,MAAiB,SAAYA,IAAeP;AAG7D,EAAAK,KAAiBA,EAAc,IAAIN,CAA8C,KACnFM,EAAc,OAAON,CAA8C,GACjEK,MAAgB,CAACC,KAAiB,CAACA,EAAc,SAAOD,EAAY,OAAOP,CAA8B,IACzG,CAACO,KAAe,CAACA,EAAY,SAAM,OAAOZ,EAASW,CAAS,IAI5D,CAACE,KAAiB,CAACA,EAAc,SAClCR,EAAgC;AAAA,IAC/BM;AAAA,IACAV;AAAA,IACAe;AAAA,EAAA;AAGN,GAGMC,IAAyBP,GACzBQ,IAA6BT;"} \ No newline at end of file diff --git a/docs/event-listener.js.map b/docs/event-listener.js.map index 113b1cb..e2ef76b 100644 --- a/docs/event-listener.js.map +++ b/docs/event-listener.js.map @@ -1 +1 @@ -{"version":3,"file":"event-listener.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * Advanced event listener based on subscribe / publish pattern.\n *\n * @see https://www.patterns.dev/posts/classic-design-patterns/#observerpatternjavascript\n * @see https://gist.github.com/shystruk/d16c0ee7ac7d194da9644e5d740c8338#file-subpub-js\n * @see https://hackernoon.com/do-you-still-register-window-event-listeners-in-each-component-react-in-example-31a4b1f6f1c8\n */\n\ntype ListenerObject = Map;\ntype EventsRegistry = Record>;\nconst registry: EventsRegistry = {};\n\n/**\n * The global event listener. This function must be a Function.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n * eslint-ignore-next\n */\nconst globalListener = (e: Event): void => {\n const { type, currentTarget } = e;\n\n [...registry[type]].forEach(([element, listenersMap]) => {\n /* istanbul ignore else */\n if (currentTarget === element) {\n [...listenersMap].forEach(([listener, options]) => {\n listener.apply(element, [e]);\n\n if (typeof options === 'object' && options.once) {\n removeListener(element, type, listener, options);\n }\n });\n }\n });\n};\n\n/**\n * Register a new listener with its options and attach the `globalListener`\n * to the target if this is the first listener.\n */\nconst addListener = (\n element: EventTarget,\n eventType: string,\n listener: EventListener,\n options?: AddEventListenerOptions,\n): void => {\n // get element listeners first\n if (!registry[eventType]) {\n registry[eventType] = new Map();\n }\n const oneEventMap = registry[eventType];\n\n if (!oneEventMap.has(element)) {\n oneEventMap.set(element, new Map());\n }\n const oneElementMap = oneEventMap.get(element) as ListenerObject;\n\n // get listeners size\n const { size } = oneElementMap;\n\n // register listener with its options\n oneElementMap.set(listener, options);\n\n // add listener last\n if (!size) {\n element.addEventListener(eventType, globalListener, options);\n }\n};\n\n/**\n * Remove a listener from registry and detach the `globalListener`\n * if no listeners are found in the registry.\n *\n */\nconst removeListener = (\n element: EventTarget,\n eventType: string,\n listener: EventListener,\n options?: AddEventListenerOptions,\n): void => {\n // get listener first\n const oneEventMap = registry[eventType];\n const oneElementMap = oneEventMap && oneEventMap.get(element);\n const savedOptions = oneElementMap && oneElementMap.get(listener);\n\n // also recover initial options\n const eventOptions = savedOptions !== undefined ? savedOptions : options;\n\n // unsubscribe second, remove from registry\n if (oneElementMap && oneElementMap.has(listener)) oneElementMap.delete(listener);\n if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element);\n if (!oneEventMap || !oneEventMap.size) delete registry[eventType];\n\n // remove listener last\n /* istanbul ignore else */\n if (!oneElementMap || !oneElementMap.size) {\n element.removeEventListener(eventType, globalListener, eventOptions);\n }\n};\n\n// alias main methods\nconst on: typeof addListener = addListener;\nconst off: typeof removeListener = removeListener;\n\nexport { addListener, removeListener, on, off, globalListener, registry };\n"],"names":["registry","globalListener","e","type","currentTarget","element","listenersMap","listener","options","removeListener","addListener","eventType","oneEventMap","oneElementMap","size","savedOptions","eventOptions","on","off"],"mappings":"sCAUM,MAAAA,EAA2B,CAAC,EAQ5BC,EAAkBC,GAAmB,CACnC,KAAA,CAAE,KAAAC,EAAM,cAAAC,CAAkB,EAAAF,EAE/B,CAAA,GAAGF,EAASG,CAAI,CAAC,EAAE,QAAQ,CAAC,CAACE,EAASC,CAAY,IAAM,CAEnDF,IAAkBC,GACnB,CAAA,GAAGC,CAAY,EAAE,QAAQ,CAAC,CAACC,EAAUC,CAAO,IAAM,CACjDD,EAAS,MAAMF,EAAS,CAACH,CAAC,CAAC,EAEvB,OAAOM,GAAY,UAAYA,EAAQ,MAC1BC,EAAAJ,EAASF,EAAMI,EAAUC,CAAO,CACjD,CACD,CACH,CACD,CACH,EAMME,EAAc,CAClBL,EACAM,EACAJ,EACAC,IACS,CAEJR,EAASW,CAAS,IACZX,EAAAW,CAAS,EAAI,IAAI,KAEtB,MAAAC,EAAcZ,EAASW,CAAS,EAEjCC,EAAY,IAAIP,CAAO,GAC1BO,EAAY,IAAIP,EAAa,IAAA,GAAK,EAE9B,MAAAQ,EAAgBD,EAAY,IAAIP,CAAO,EAGvC,CAAE,KAAAS,CAAS,EAAAD,EAGHA,EAAA,IAAIN,EAAUC,CAAO,EAG9BM,GACKT,EAAA,iBAAiBM,EAAWV,EAAgBO,CAAO,CAE/D,EAOMC,EAAiB,CACrBJ,EACAM,EACAJ,EACAC,IACS,CAEH,MAAAI,EAAcZ,EAASW,CAAS,EAChCE,EAAgBD,GAAeA,EAAY,IAAIP,CAAO,EACtDU,EAAeF,GAAiBA,EAAc,IAAIN,CAAQ,EAG1DS,EAAeD,IAAiB,OAAYA,EAAeP,EAG7DK,GAAiBA,EAAc,IAAIN,CAAQ,GAAGM,EAAc,OAAON,CAAQ,EAC3EK,IAAgB,CAACC,GAAiB,CAACA,EAAc,OAAOD,EAAY,OAAOP,CAAO,GAClF,CAACO,GAAe,CAACA,EAAY,OAAM,OAAOZ,EAASW,CAAS,GAI5D,CAACE,GAAiB,CAACA,EAAc,OAC3BR,EAAA,oBAAoBM,EAAWV,EAAgBe,CAAY,CAEvE,EAGMC,EAAyBP,EACzBQ,EAA6BT"} \ No newline at end of file +{"version":3,"file":"event-listener.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * Advanced event listener based on subscribe / publish pattern.\n *\n * @see https://www.patterns.dev/posts/classic-design-patterns/#observerpatternjavascript\n * @see https://gist.github.com/shystruk/d16c0ee7ac7d194da9644e5d740c8338#file-subpub-js\n * @see https://hackernoon.com/do-you-still-register-window-event-listeners-in-each-component-react-in-example-31a4b1f6f1c8\n */\n\ntype EventRegistryEntry = Map;\ntype EventsRegistry = Record>;\nconst registry: EventsRegistry = {};\n\n/**\n * The global event listener. This function must be a Function.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n * eslint-ignore-next\n */\nconst globalListener = (e: Event): void => {\n const { type, currentTarget } = e;\n\n [...registry[type]].forEach(([element, listenersMap]) => {\n /* istanbul ignore else */\n if (currentTarget === element) {\n [...listenersMap].forEach(([listener, options]) => {\n listener.apply(element, [e]);\n\n if (typeof options === 'object' && options.once) {\n removeListener(element, type, listener, options);\n }\n });\n }\n });\n};\n\n/**\n * Register a new listener with its options and attach the `globalListener`\n * to the target if this is the first listener.\n */\nconst addListener = (\n element: EventTarget,\n eventType: string,\n listener: EventListener,\n options?: AddEventListenerOptions,\n): void => {\n // get element listeners first\n if (!registry[eventType]) {\n registry[eventType] = new Map();\n }\n const oneEventMap = registry[eventType];\n\n if (!oneEventMap.has(element)) {\n oneEventMap.set(element, new Map());\n }\n const oneElementMap = oneEventMap.get(element) as EventRegistryEntry;\n\n // get listeners size\n const { size } = oneElementMap;\n\n // register listener with its options\n oneElementMap.set(listener, options);\n\n // add listener last\n if (!size) {\n element.addEventListener(eventType, globalListener, options);\n }\n};\n\n/**\n * Remove a listener from registry and detach the `globalListener`\n * if no listeners are found in the registry.\n *\n */\nconst removeListener = (\n element: EventTarget,\n eventType: string,\n listener: EventListener,\n options?: AddEventListenerOptions,\n): void => {\n // get listener first\n const oneEventMap = registry[eventType];\n const oneElementMap = oneEventMap && oneEventMap.get(element);\n const savedOptions = oneElementMap && oneElementMap.get(listener);\n\n // also recover initial options\n const eventOptions = savedOptions !== undefined ? savedOptions : options;\n\n // unsubscribe second, remove from registry\n if (oneElementMap && oneElementMap.has(listener)) oneElementMap.delete(listener);\n if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element);\n if (!oneEventMap || !oneEventMap.size) delete registry[eventType];\n\n // remove listener last\n /* istanbul ignore else */\n if (!oneElementMap || !oneElementMap.size) {\n element.removeEventListener(eventType, globalListener, eventOptions);\n }\n};\n\n// alias main methods\nconst on: typeof addListener = addListener;\nconst off: typeof removeListener = removeListener;\n\nexport { addListener, removeListener, on, off, globalListener, registry };\n"],"names":["registry","globalListener","e","type","currentTarget","element","listenersMap","listener","options","removeListener","addListener","eventType","oneEventMap","oneElementMap","size","savedOptions","eventOptions","on","off"],"mappings":"sCAUM,MAAAA,EAA2B,CAAC,EAQ5BC,EAAkBC,GAAmB,CACnC,KAAA,CAAE,KAAAC,EAAM,cAAAC,CAAkB,EAAAF,EAE/B,CAAA,GAAGF,EAASG,CAAI,CAAC,EAAE,QAAQ,CAAC,CAACE,EAASC,CAAY,IAAM,CAEnDF,IAAkBC,GACnB,CAAA,GAAGC,CAAY,EAAE,QAAQ,CAAC,CAACC,EAAUC,CAAO,IAAM,CACjDD,EAAS,MAAMF,EAAS,CAACH,CAAC,CAAC,EAEvB,OAAOM,GAAY,UAAYA,EAAQ,MAC1BC,EAAAJ,EAASF,EAAMI,EAAUC,CAAO,CACjD,CACD,CACH,CACD,CACH,EAMME,EAAc,CAClBL,EACAM,EACAJ,EACAC,IACS,CAEJR,EAASW,CAAS,IACZX,EAAAW,CAAS,EAAI,IAAI,KAEtB,MAAAC,EAAcZ,EAASW,CAAS,EAEjCC,EAAY,IAAIP,CAAO,GAC1BO,EAAY,IAAIP,EAAa,IAAA,GAAK,EAE9B,MAAAQ,EAAgBD,EAAY,IAAIP,CAAO,EAGvC,CAAE,KAAAS,CAAS,EAAAD,EAGHA,EAAA,IAAIN,EAAUC,CAAO,EAG9BM,GACKT,EAAA,iBAAiBM,EAAWV,EAAgBO,CAAO,CAE/D,EAOMC,EAAiB,CACrBJ,EACAM,EACAJ,EACAC,IACS,CAEH,MAAAI,EAAcZ,EAASW,CAAS,EAChCE,EAAgBD,GAAeA,EAAY,IAAIP,CAAO,EACtDU,EAAeF,GAAiBA,EAAc,IAAIN,CAAQ,EAG1DS,EAAeD,IAAiB,OAAYA,EAAeP,EAG7DK,GAAiBA,EAAc,IAAIN,CAAQ,GAAGM,EAAc,OAAON,CAAQ,EAC3EK,IAAgB,CAACC,GAAiB,CAACA,EAAc,OAAOD,EAAY,OAAOP,CAAO,GAClF,CAACO,GAAe,CAACA,EAAY,OAAM,OAAOZ,EAASW,CAAS,GAI5D,CAACE,GAAiB,CAACA,EAAc,OAC3BR,EAAA,oBAAoBM,EAAWV,EAAgBe,CAAY,CAEvE,EAGMC,EAAyBP,EACzBQ,EAA6BT"} \ No newline at end of file diff --git a/package.json b/package.json index 7ce4464..d60ea57 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@thednp/event-listener", "author": "thednp", - "version": "2.0.3", + "version": "2.0.4", "description": "Modern event listener for efficient web applications based on subscribe-publish pattern.", "license": "MIT", "homepage": "https://thednp.github.io/event-listener", @@ -44,10 +44,11 @@ "cypress": "pnpm pre-test && cypress open", "coverage:report": "nyc report --reporter=lcov --reporter=json --reporter=text --reporter=json-summary", "format": "prettier --write \"src/**/*.ts\"", + "check:ts": "tsc --noEmit", "lint:ts": "eslint -c .eslintrc.cjs --ext .ts src", "fix:ts": "eslint -c .eslintrc.cjs --ext .ts src --fix", "dts": "dts-bundle-generator --config ./dts.config.ts", - "build": "pnpm lint:ts && vite build && pnpm dts", + "build": "pnpm check:ts && pnpm lint:ts && vite build && pnpm dts", "docs": "ncp dist/event-listener.js docs/event-listener.js && ncp dist/event-listener.js.map docs/event-listener.js.map" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e5e37be..e7ea609 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ devDependencies: version: 2.2.0(esbuild@0.19.2) '@cypress/code-coverage': specifier: ^3.12.0 - version: 3.12.0(@babel/core@7.22.15)(@babel/preset-env@7.22.15)(babel-loader@9.1.3)(cypress@12.17.4)(webpack@5.88.2) + version: 3.12.0(@babel/core@7.22.17)(@babel/preset-env@7.22.15)(babel-loader@9.1.3)(cypress@12.17.4)(webpack@5.88.2) '@types/istanbul-lib-instrument': specifier: ^1.7.4 version: 1.7.4 @@ -91,20 +91,20 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/core@7.22.15: - resolution: {integrity: sha512-PtZqMmgRrvj8ruoEOIwVA3yoF91O+Hgw9o7DAUTNBA6Mo2jpu31clx9a7Nz/9JznqetTR6zwfC4L3LAjKQXUwA==} + /@babel/core@7.22.17: + resolution: {integrity: sha512-2EENLmhpwplDux5PSsZnSbnSkB3tZ6QTksgO25xwEL7pIDcNOMhF5v/s6RzwjMZzZzw9Ofc30gHv5ChCC8pifQ==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.22.13 '@babel/generator': 7.22.15 '@babel/helper-compilation-targets': 7.22.15 - '@babel/helper-module-transforms': 7.22.15(@babel/core@7.22.15) + '@babel/helper-module-transforms': 7.22.17(@babel/core@7.22.17) '@babel/helpers': 7.22.15 '@babel/parser': 7.22.16 '@babel/template': 7.22.15 - '@babel/traverse': 7.22.15 - '@babel/types': 7.22.15 + '@babel/traverse': 7.22.17 + '@babel/types': 7.22.17 convert-source-map: 1.9.0 debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 @@ -118,7 +118,7 @@ packages: resolution: {integrity: sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.19 jsesc: 2.5.2 @@ -128,14 +128,14 @@ packages: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true /@babel/helper-builder-binary-assignment-operator-visitor@7.22.15: resolution: {integrity: sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true /@babel/helper-compilation-targets@7.22.15: @@ -149,42 +149,42 @@ packages: semver: 6.3.1 dev: true - /@babel/helper-create-class-features-plugin@7.22.15(@babel/core@7.22.15): + /@babel/helper-create-class-features-plugin@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-member-expression-to-functions': 7.22.15 '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.15) + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.17) '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 semver: 6.3.1 dev: true - /@babel/helper-create-regexp-features-plugin@7.22.15(@babel/core@7.22.15): + /@babel/helper-create-regexp-features-plugin@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-annotate-as-pure': 7.22.5 regexpu-core: 5.3.2 semver: 6.3.1 dev: true - /@babel/helper-define-polyfill-provider@0.4.2(@babel/core@7.22.15): + /@babel/helper-define-polyfill-provider@0.4.2(@babel/core@7.22.17): resolution: {integrity: sha512-k0qnnOqHn5dK9pZpfD5XXZ9SojAITdCKRn2Lp6rnDGzIbaP0rHyMPk/4wsSxVBVz4RfN0q6VpXWP2pDGIoQ7hw==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 debug: 4.3.4(supports-color@8.1.1) @@ -204,37 +204,37 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true /@babel/helper-member-expression-to-functions@7.22.15: resolution: {integrity: sha512-qLNsZbgrNh0fDQBCPocSL8guki1hcPvltGDv/NxvUoABwFq7GkKSu1nRXeJkVZc+wJvne2E0RKQz+2SQrz6eAA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true /@babel/helper-module-imports@7.22.15: resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true - /@babel/helper-module-transforms@7.22.15(@babel/core@7.22.15): - resolution: {integrity: sha512-l1UiX4UyHSFsYt17iQ3Se5pQQZZHa22zyIXURmvkmLCD4t/aU+dvNWHatKac/D9Vm9UES7nvIqHs4jZqKviUmQ==} + /@babel/helper-module-transforms@7.22.17(@babel/core@7.22.17): + resolution: {integrity: sha512-XouDDhQESrLHTpnBtCKExJdyY4gJCdrvH2Pyv8r8kovX2U8G0dRUOT45T9XlbLtuu9CLXP15eusnkprhoPV5iQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 @@ -246,7 +246,7 @@ packages: resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true /@babel/helper-plugin-utils@7.22.5: @@ -254,25 +254,25 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-remap-async-to-generator@7.22.9(@babel/core@7.22.15): - resolution: {integrity: sha512-8WWC4oR4Px+tr+Fp0X3RHDVfINGpF3ad1HIbrc8A77epiR6eMMc6jsgozkzT2uDiOOdoS9cLIQ+XD2XvI2WSmQ==} + /@babel/helper-remap-async-to-generator@7.22.17(@babel/core@7.22.17): + resolution: {integrity: sha512-bxH77R5gjH3Nkde6/LuncQoLaP16THYPscurp1S8z7S9ZgezCyV3G8Hc+TZiCmY8pz4fp8CvKSgtJMW0FkLAxA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-wrap-function': 7.22.10 + '@babel/helper-wrap-function': 7.22.17 dev: true - /@babel/helper-replace-supers@7.22.9(@babel/core@7.22.15): + /@babel/helper-replace-supers@7.22.9(@babel/core@7.22.17): resolution: {integrity: sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-member-expression-to-functions': 7.22.15 '@babel/helper-optimise-call-expression': 7.22.5 @@ -282,21 +282,21 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true /@babel/helper-skip-transparent-expression-wrappers@7.22.5: resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true /@babel/helper-string-parser@7.22.5: @@ -314,13 +314,13 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-wrap-function@7.22.10: - resolution: {integrity: sha512-OnMhjWjuGYtdoO3FmsEFWvBStBAe2QOgwOLsLNDjN+aaiMD8InJk1/O3HSD8lkqTjCgg5YI34Tz15KNNA3p+nQ==} + /@babel/helper-wrap-function@7.22.17: + resolution: {integrity: sha512-nAhoheCMlrqU41tAojw9GpVEKDlTS8r3lzFmF0lP52LwblCPbuFSO7nGIZoIcoU5NIm1ABrna0cJExE4Ay6l2Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-function-name': 7.22.5 '@babel/template': 7.22.15 - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true /@babel/helpers@7.22.15: @@ -328,8 +328,8 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/traverse': 7.22.15 - '@babel/types': 7.22.15 + '@babel/traverse': 7.22.17 + '@babel/types': 7.22.17 transitivePeerDependencies: - supports-color dev: true @@ -348,840 +348,840 @@ packages: engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true - /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.15(@babel/core@7.22.15): + /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.15(@babel/core@7.22.15): + /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.13.0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-transform-optional-chaining': 7.22.15(@babel/core@7.22.15) + '@babel/plugin-transform-optional-chaining': 7.22.15(@babel/core@7.22.17) dev: true - /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.15): + /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.17): resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 dev: true - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.15): + /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.17): resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.22.15): + /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.22.17): resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.22.15): + /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.22.17): resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.22.15): + /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.22.15): + /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.22.15): + /@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.22.15): + /@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.22.15): + /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.22.17): resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.22.15): + /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.15): + /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.17): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.22.15): + /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.22.15): + /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.22.17): resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.22.15): + /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.22.15): + /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.22.15): + /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.22.15): + /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.22.17): resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.22.15): + /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.22.17): resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.22.15): + /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.22.17): resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-async-generator-functions@7.22.15(@babel/core@7.22.15): + /@babel/plugin-transform-async-generator-functions@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-jBm1Es25Y+tVoTi5rfd5t1KLmL8ogLKpXszboWOTTtGFGz2RKnQe2yn7HbZ+kb/B8N0FVSGQo874NSlOU1T4+w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.22.15) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.15) + '@babel/helper-remap-async-to-generator': 7.22.17(@babel/core@7.22.17) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-module-imports': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.22.15) + '@babel/helper-remap-async-to-generator': 7.22.17(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-block-scoping@7.22.15(@babel/core@7.22.15): + /@babel/plugin-transform-block-scoping@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-G1czpdJBZCtngoK1sJgloLiOHUnkb/bLZwqVZD8kXmq0ZnVfTTWUcs9OWtp0mBtYJ+4LQY1fllqBkOIPhXmFmw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-class-static-block@7.22.11(@babel/core@7.22.15): + /@babel/plugin-transform-class-static-block@7.22.11(@babel/core@7.22.17): resolution: {integrity: sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.15) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-classes@7.22.15(@babel/core@7.22.15): + /@babel/plugin-transform-classes@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-optimise-call-expression': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.15) + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.17) '@babel/helper-split-export-declaration': 7.22.6 globals: 11.12.0 dev: true - /@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 '@babel/template': 7.22.15 dev: true - /@babel/plugin-transform-destructuring@7.22.15(@babel/core@7.22.15): + /@babel/plugin-transform-destructuring@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-HzG8sFl1ZVGTme74Nw+X01XsUTqERVQ6/RLHo3XjGRzm7XD6QTtfS3NJotVgCGy8BzkDqRjRBD8dAyJn5TuvSQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-dynamic-import@7.22.11(@babel/core@7.22.15): + /@babel/plugin-transform-dynamic-import@7.22.11(@babel/core@7.22.17): resolution: {integrity: sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.15) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-export-namespace-from@7.22.11(@babel/core@7.22.15): + /@babel/plugin-transform-export-namespace-from@7.22.11(@babel/core@7.22.17): resolution: {integrity: sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.15) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-for-of@7.22.15(@babel/core@7.22.15): + /@babel/plugin-transform-for-of@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-function-name@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-function-name@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-function-name': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-json-strings@7.22.11(@babel/core@7.22.15): + /@babel/plugin-transform-json-strings@7.22.11(@babel/core@7.22.17): resolution: {integrity: sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.15) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-literals@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-literals@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-logical-assignment-operators@7.22.11(@babel/core@7.22.15): + /@babel/plugin-transform-logical-assignment-operators@7.22.11(@babel/core@7.22.17): resolution: {integrity: sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.15) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-module-transforms': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-module-transforms': 7.22.17(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-modules-commonjs@7.22.15(@babel/core@7.22.15): + /@babel/plugin-transform-modules-commonjs@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-jWL4eh90w0HQOTKP2MoXXUpVxilxsB2Vl4ji69rSjS3EcZ/v4sBmn+A3NpepuJzBhOaEBbR7udonlHHn5DWidg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-module-transforms': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-module-transforms': 7.22.17(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-simple-access': 7.22.5 dev: true - /@babel/plugin-transform-modules-systemjs@7.22.11(@babel/core@7.22.15): + /@babel/plugin-transform-modules-systemjs@7.22.11(@babel/core@7.22.17): resolution: {integrity: sha512-rIqHmHoMEOhI3VkVf5jQ15l539KrwhzqcBO6wdCNWPWc/JWt9ILNYNUssbRpeq0qWns8svuw8LnMNCvWBIJ8wA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-module-transforms': 7.22.15(@babel/core@7.22.15) + '@babel/helper-module-transforms': 7.22.17(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-validator-identifier': 7.22.15 dev: true - /@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-module-transforms': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-module-transforms': 7.22.17(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-new-target@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-new-target@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-nullish-coalescing-operator@7.22.11(@babel/core@7.22.15): + /@babel/plugin-transform-nullish-coalescing-operator@7.22.11(@babel/core@7.22.17): resolution: {integrity: sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.15) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-numeric-separator@7.22.11(@babel/core@7.22.15): + /@babel/plugin-transform-numeric-separator@7.22.11(@babel/core@7.22.17): resolution: {integrity: sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.15) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-object-rest-spread@7.22.15(@babel/core@7.22.15): + /@babel/plugin-transform-object-rest-spread@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-fEB+I1+gAmfAyxZcX1+ZUwLeAuuf8VIg67CTznZE0MqVFumWkh8xWtn58I4dxdVf080wn7gzWoF8vndOViJe9Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.15) - '@babel/plugin-transform-parameters': 7.22.15(@babel/core@7.22.15) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-transform-parameters': 7.22.15(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-object-super@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-object-super@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.15) + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-optional-catch-binding@7.22.11(@babel/core@7.22.15): + /@babel/plugin-transform-optional-catch-binding@7.22.11(@babel/core@7.22.17): resolution: {integrity: sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.15) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-optional-chaining@7.22.15(@babel/core@7.22.15): + /@babel/plugin-transform-optional-chaining@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-ngQ2tBhq5vvSJw2Q2Z9i7ealNkpDMU0rGWnHPKqRZO0tzZ5tlaoz4hDvhXioOoaE0X2vfNss1djwg0DXlfu30A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.15) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-parameters@7.22.15(@babel/core@7.22.15): + /@babel/plugin-transform-parameters@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-private-property-in-object@7.22.11(@babel/core@7.22.15): + /@babel/plugin-transform-private-property-in-object@7.22.11(@babel/core@7.22.17): resolution: {integrity: sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.15) + '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.15) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.17) dev: true - /@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-regenerator@7.22.10(@babel/core@7.22.15): + /@babel/plugin-transform-regenerator@7.22.10(@babel/core@7.22.17): resolution: {integrity: sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 regenerator-transform: 0.15.2 dev: true - /@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-spread@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-spread@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 dev: true - /@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-unicode-escapes@7.22.10(@babel/core@7.22.15): + /@babel/plugin-transform-unicode-escapes@7.22.10(@babel/core@7.22.17): resolution: {integrity: sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.22.15): + /@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.22.17): resolution: {integrity: sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.22.17) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/preset-env@7.22.15(@babel/core@7.22.15): + /@babel/preset-env@7.22.15(@babel/core@7.22.17): resolution: {integrity: sha512-tZFHr54GBkHk6hQuVA8w4Fmq+MSPsfvMG0vPnOYyTnJpyfMqybL8/MbNCPRT9zc2KBO2pe4tq15g6Uno4Jpoag==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-validator-option': 7.22.15 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.15(@babel/core@7.22.15) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.15(@babel/core@7.22.15) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.15) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.15) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.15) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.15) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.15) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.15) - '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-syntax-import-attributes': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.15) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.15) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.15) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.15) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.15) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.15) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.15) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.15) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.15) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.15) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.22.15) - '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-async-generator-functions': 7.22.15(@babel/core@7.22.15) - '@babel/plugin-transform-async-to-generator': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-block-scoping': 7.22.15(@babel/core@7.22.15) - '@babel/plugin-transform-class-properties': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-class-static-block': 7.22.11(@babel/core@7.22.15) - '@babel/plugin-transform-classes': 7.22.15(@babel/core@7.22.15) - '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-destructuring': 7.22.15(@babel/core@7.22.15) - '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-duplicate-keys': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-dynamic-import': 7.22.11(@babel/core@7.22.15) - '@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-export-namespace-from': 7.22.11(@babel/core@7.22.15) - '@babel/plugin-transform-for-of': 7.22.15(@babel/core@7.22.15) - '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-json-strings': 7.22.11(@babel/core@7.22.15) - '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-logical-assignment-operators': 7.22.11(@babel/core@7.22.15) - '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-modules-amd': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-modules-commonjs': 7.22.15(@babel/core@7.22.15) - '@babel/plugin-transform-modules-systemjs': 7.22.11(@babel/core@7.22.15) - '@babel/plugin-transform-modules-umd': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-new-target': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-nullish-coalescing-operator': 7.22.11(@babel/core@7.22.15) - '@babel/plugin-transform-numeric-separator': 7.22.11(@babel/core@7.22.15) - '@babel/plugin-transform-object-rest-spread': 7.22.15(@babel/core@7.22.15) - '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-optional-catch-binding': 7.22.11(@babel/core@7.22.15) - '@babel/plugin-transform-optional-chaining': 7.22.15(@babel/core@7.22.15) - '@babel/plugin-transform-parameters': 7.22.15(@babel/core@7.22.15) - '@babel/plugin-transform-private-methods': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-private-property-in-object': 7.22.11(@babel/core@7.22.15) - '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-regenerator': 7.22.10(@babel/core@7.22.15) - '@babel/plugin-transform-reserved-words': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-sticky-regex': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-typeof-symbol': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-unicode-escapes': 7.22.10(@babel/core@7.22.15) - '@babel/plugin-transform-unicode-property-regex': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.22.15) - '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.22.15) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.22.15) - '@babel/types': 7.22.15 - babel-plugin-polyfill-corejs2: 0.4.5(@babel/core@7.22.15) - babel-plugin-polyfill-corejs3: 0.8.3(@babel/core@7.22.15) - babel-plugin-polyfill-regenerator: 0.5.2(@babel/core@7.22.15) - core-js-compat: 3.32.1 + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.17) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.17) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.17) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.17) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-syntax-import-attributes': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.17) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.17) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.17) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.17) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.17) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.17) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.22.17) + '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-async-generator-functions': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-async-to-generator': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-block-scoping': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-class-properties': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-class-static-block': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-classes': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-destructuring': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-duplicate-keys': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-dynamic-import': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-export-namespace-from': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-for-of': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-json-strings': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-logical-assignment-operators': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-modules-amd': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-modules-commonjs': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-modules-systemjs': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-modules-umd': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-new-target': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-nullish-coalescing-operator': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-numeric-separator': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-object-rest-spread': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-optional-catch-binding': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-optional-chaining': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-parameters': 7.22.15(@babel/core@7.22.17) + '@babel/plugin-transform-private-methods': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-private-property-in-object': 7.22.11(@babel/core@7.22.17) + '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-regenerator': 7.22.10(@babel/core@7.22.17) + '@babel/plugin-transform-reserved-words': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-sticky-regex': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-typeof-symbol': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-unicode-escapes': 7.22.10(@babel/core@7.22.17) + '@babel/plugin-transform-unicode-property-regex': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.22.17) + '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.22.17) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.22.17) + '@babel/types': 7.22.17 + babel-plugin-polyfill-corejs2: 0.4.5(@babel/core@7.22.17) + babel-plugin-polyfill-corejs3: 0.8.3(@babel/core@7.22.17) + babel-plugin-polyfill-regenerator: 0.5.2(@babel/core@7.22.17) + core-js-compat: 3.32.2 semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.22.15): + /@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.22.17): resolution: {integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==} peerDependencies: '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/helper-plugin-utils': 7.22.5 - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 esutils: 2.0.3 dev: true @@ -1202,11 +1202,11 @@ packages: dependencies: '@babel/code-frame': 7.22.13 '@babel/parser': 7.22.16 - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 dev: true - /@babel/traverse@7.22.15: - resolution: {integrity: sha512-DdHPwvJY0sEeN4xJU5uRLmZjgMMDIvMPniLuYzUVXj/GGzysPl0/fwt44JBkyUIzGJPV8QgHMcQdQ34XFuKTYQ==} + /@babel/traverse@7.22.17: + resolution: {integrity: sha512-xK4Uwm0JnAMvxYZxOVecss85WxTEIbTa7bnGyf/+EgCL5Zt3U7htUpEOWv9detPlamGKuRzCqw74xVglDWpPdg==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.13 @@ -1216,15 +1216,15 @@ packages: '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.22.16 - '@babel/types': 7.22.15 + '@babel/types': 7.22.17 debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true - /@babel/types@7.22.15: - resolution: {integrity: sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==} + /@babel/types@7.22.17: + resolution: {integrity: sha512-YSQPHLFtQNE5xN9tHuZnzu8vPr61wVTBZdfv1meex1NBosa4iT05k/Jw06ddJugi4bk7The/oSwQGFcksmEJQg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 @@ -1250,7 +1250,7 @@ packages: dev: true optional: true - /@cypress/code-coverage@3.12.0(@babel/core@7.22.15)(@babel/preset-env@7.22.15)(babel-loader@9.1.3)(cypress@12.17.4)(webpack@5.88.2): + /@cypress/code-coverage@3.12.0(@babel/core@7.22.17)(@babel/preset-env@7.22.15)(babel-loader@9.1.3)(cypress@12.17.4)(webpack@5.88.2): resolution: {integrity: sha512-Z4Lk/ckBc9Mv11vXMp1ike5MtIYsHCCu7Wtp4uWTcFEshi9uSbBNS6v2cwhf0beUThph0EXsVtKMi7EFAdM1Mw==} peerDependencies: '@babel/core': ^7.0.1 @@ -1259,10 +1259,10 @@ packages: cypress: '*' webpack: ^4 || ^5 dependencies: - '@babel/core': 7.22.15 - '@babel/preset-env': 7.22.15(@babel/core@7.22.15) - '@cypress/webpack-preprocessor': 5.17.1(@babel/core@7.22.15)(@babel/preset-env@7.22.15)(babel-loader@9.1.3)(webpack@5.88.2) - babel-loader: 9.1.3(@babel/core@7.22.15)(webpack@5.88.2) + '@babel/core': 7.22.17 + '@babel/preset-env': 7.22.15(@babel/core@7.22.17) + '@cypress/webpack-preprocessor': 5.17.1(@babel/core@7.22.17)(@babel/preset-env@7.22.15)(babel-loader@9.1.3)(webpack@5.88.2) + babel-loader: 9.1.3(@babel/core@7.22.17)(webpack@5.88.2) chalk: 4.1.2 cypress: 12.17.4 dayjs: 1.11.9 @@ -1301,7 +1301,7 @@ packages: uuid: 8.3.2 dev: true - /@cypress/webpack-preprocessor@5.17.1(@babel/core@7.22.15)(@babel/preset-env@7.22.15)(babel-loader@9.1.3)(webpack@5.88.2): + /@cypress/webpack-preprocessor@5.17.1(@babel/core@7.22.17)(@babel/preset-env@7.22.15)(babel-loader@9.1.3)(webpack@5.88.2): resolution: {integrity: sha512-FE/e8ikPc8z4EVopJCaior3RGy0jd2q9Xcp5NtiwNG4XnLfEnUFTZlAGwXe75sEh4fNMPrBJW1KIz77PX5vGAw==} peerDependencies: '@babel/core': ^7.0.1 @@ -1309,9 +1309,9 @@ packages: babel-loader: ^8.0.2 || ^9 webpack: ^4 || ^5 dependencies: - '@babel/core': 7.22.15 - '@babel/preset-env': 7.22.15(@babel/core@7.22.15) - babel-loader: 9.1.3(@babel/core@7.22.15)(webpack@5.88.2) + '@babel/core': 7.22.17 + '@babel/preset-env': 7.22.15(@babel/core@7.22.17) + babel-loader: 9.1.3(@babel/core@7.22.17)(webpack@5.88.2) bluebird: 3.7.1 debug: 4.3.4(supports-color@8.1.1) lodash: 4.17.21 @@ -2383,51 +2383,51 @@ packages: resolution: {integrity: sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==} dev: true - /babel-loader@9.1.3(@babel/core@7.22.15)(webpack@5.88.2): + /babel-loader@9.1.3(@babel/core@7.22.17)(webpack@5.88.2): resolution: {integrity: sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw==} engines: {node: '>= 14.15.0'} peerDependencies: '@babel/core': ^7.12.0 webpack: '>=5' dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 find-cache-dir: 4.0.0 schema-utils: 4.2.0 webpack: 5.88.2(esbuild@0.19.2) dev: true - /babel-plugin-polyfill-corejs2@0.4.5(@babel/core@7.22.15): + /babel-plugin-polyfill-corejs2@0.4.5(@babel/core@7.22.17): resolution: {integrity: sha512-19hwUH5FKl49JEsvyTcoHakh6BE0wgXLLptIyKZ3PijHc/Ci521wygORCUCCred+E/twuqRyAkE02BAWPmsHOg==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.22.15 - '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.17) semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-corejs3@0.8.3(@babel/core@7.22.15): + /babel-plugin-polyfill-corejs3@0.8.3(@babel/core@7.22.17): resolution: {integrity: sha512-z41XaniZL26WLrvjy7soabMXrfPWARN25PZoriDEiLMxAp50AUW3t35BGQUMg5xK3UrpVTtagIDklxYa+MhiNA==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.15) - core-js-compat: 3.32.1 + '@babel/core': 7.22.17 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.17) + core-js-compat: 3.32.2 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-regenerator@0.5.2(@babel/core@7.22.15): + /babel-plugin-polyfill-regenerator@0.5.2(@babel/core@7.22.17): resolution: {integrity: sha512-tAlOptU0Xj34V1Y2PNTL4Y0FOJMDB6bZmoW39FeCQIhigGLkqu3Fj6uiXpxIf6Ij274ENdYx64y6Au+ZKlb1IA==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.15) + '@babel/core': 7.22.17 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.17) transitivePeerDependencies: - supports-color dev: true @@ -2483,8 +2483,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001527 - electron-to-chromium: 1.4.509 + caniuse-lite: 1.0.30001529 + electron-to-chromium: 1.4.513 node-releases: 2.0.13 update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: true @@ -2541,8 +2541,8 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite@1.0.30001527: - resolution: {integrity: sha512-YkJi7RwPgWtXVSgK4lG9AHH57nSzvvOp9MesgXmw4Q7n0C3H04L0foHqfxcmSAm5AcWb8dW9AYj2tR7/5GnddQ==} + /caniuse-lite@1.0.30001529: + resolution: {integrity: sha512-n2pUQYGAkrLG4QYj2desAh+NqsJpHbNmVZz87imptDdxLAtjxary7Df/psdfyDGmskJK/9Dt9cPnx5RZ3CU4Og==} dev: true /caseless@0.12.0: @@ -2694,8 +2694,8 @@ packages: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: true - /core-js-compat@3.32.1: - resolution: {integrity: sha512-GSvKDv4wE0bPnQtjklV101juQ85g6H3rm5PDP20mqlS5j0kXF3pP97YvAu5hl+uFHqMictp3b2VxOHljWMAtuA==} + /core-js-compat@3.32.2: + resolution: {integrity: sha512-+GjlguTDINOijtVRUxrQOv3kfu9rl+qPNdX2LTbJ/ZyVTuxK+ksVSAGX1nHstu4hrv1En/uPTtWgq2gI5wt4AQ==} dependencies: browserslist: 4.21.10 dev: true @@ -2855,8 +2855,8 @@ packages: safer-buffer: 2.1.2 dev: true - /electron-to-chromium@1.4.509: - resolution: {integrity: sha512-G5KlSWY0zzhANtX15tkikHl4WB7zil2Y65oT52EZUL194abjUXBZym12Ht7Bhuwm/G3LJFEqMADyv2Cks56dmg==} + /electron-to-chromium@1.4.513: + resolution: {integrity: sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw==} dev: true /emoji-regex@8.0.0: @@ -3688,7 +3688,7 @@ packages: resolution: {integrity: sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==} engines: {node: '>=8'} dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 semver: 6.3.1 @@ -3700,7 +3700,7 @@ packages: resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} engines: {node: '>=8'} dependencies: - '@babel/core': 7.22.15 + '@babel/core': 7.22.17 '@babel/parser': 7.22.16 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 diff --git a/src/index.ts b/src/index.ts index ae6906a..26bfffe 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,10 +7,6 @@ */ import { - SupportedEventObject, - SupportedEventHandler, - EventHandler, - NativeEventTypes, NativeEvent, ClipboardEvent, CompositionEvent, @@ -42,7 +38,7 @@ import { AnimationEventHandler, TransitionEventHandler, PossibleEventTarget, - ListenerObject, + EventRegistryEntry, EventsRegistry, } from './types'; @@ -61,7 +57,7 @@ const globalListener = (e: NativeEvent) => { /* istanbul ignore else */ if (currentTarget === element) { [...listenersMap].forEach(([listener, options]) => { - (listener as EventHandler).apply(element, [e]); + listener.apply(element, [e]); if (typeof options === 'object' && options.once) { removeListener(element, type, listener, options); @@ -75,32 +71,32 @@ const globalListener = (e: NativeEvent) => { * Register a new listener with its options and attach the `globalListener` * to the target if this is the first listener. */ -const addListener = ( +const addListener = ( element: T, - eventType: NativeEventTypes, - listener: SupportedEventHandler, + eventType: string, + listener: L, options?: AddEventListenerOptions, ): void => { // get element listeners first if (!registry[eventType]) { registry[eventType] = new Map(); } - const oneEventMap = registry[eventType] as unknown as Map>>; + const oneEventMap = registry[eventType]; - if (!oneEventMap.has(element)) { - oneEventMap.set(element, new Map()); + if (!oneEventMap.has(element as PossibleEventTarget)) { + oneEventMap.set(element as PossibleEventTarget, new Map()); } - const oneElementMap = oneEventMap.get(element) as ListenerObject; + const oneElementMap = oneEventMap.get(element as PossibleEventTarget) as EventRegistryEntry; // get listeners size const { size } = oneElementMap; // register listener with its options - oneElementMap.set(listener as SupportedEventHandler, options); + oneElementMap.set(listener, options); // add listener last if (!size) { - element.addEventListener(eventType, globalListener as unknown as EventListenerObject, options); + (element as PossibleEventTarget).addEventListener(eventType, globalListener as unknown as EventListener, options); } }; @@ -109,29 +105,34 @@ const addListener = ( * if no listeners are found in the registry. * */ -const removeListener = ( +const removeListener = ( element: T, - eventType: NativeEventTypes, - listener: SupportedEventHandler, + eventType: string, + listener: L, options?: AddEventListenerOptions, ): void => { // get listener first const oneEventMap = registry[eventType]; - const oneElementMap = oneEventMap && oneEventMap.get(element); - const savedOptions = oneElementMap && oneElementMap.get(listener); + const oneElementMap = oneEventMap && (oneEventMap.get(element as PossibleEventTarget) as EventRegistryEntry); + const savedOptions = oneElementMap && oneElementMap.get(listener as NativeEventHandler); // also recover initial options const eventOptions = savedOptions !== undefined ? savedOptions : options; // unsubscribe second, remove from registry - if (oneElementMap && oneElementMap.has(listener)) oneElementMap.delete(listener); - if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element); + if (oneElementMap && oneElementMap.has(listener as NativeEventHandler)) + oneElementMap.delete(listener as NativeEventHandler); + if (oneEventMap && (!oneElementMap || !oneElementMap.size)) oneEventMap.delete(element as PossibleEventTarget); if (!oneEventMap || !oneEventMap.size) delete registry[eventType]; // remove listener last /* istanbul ignore else */ if (!oneElementMap || !oneElementMap.size) { - element.removeEventListener(eventType, globalListener as unknown as EventListenerObject, eventOptions); + (element as PossibleEventTarget).removeEventListener( + eventType, + globalListener as unknown as EventListener, + eventOptions, + ); } }; @@ -141,10 +142,6 @@ const off: typeof removeListener = removeListener; export { addListener, removeListener, on, off, globalListener, registry }; export type { - SupportedEventObject, - SupportedEventHandler, - EventHandler, - NativeEventTypes, NativeEvent, ClipboardEvent, CompositionEvent, @@ -176,6 +173,6 @@ export type { AnimationEventHandler, TransitionEventHandler, PossibleEventTarget, - ListenerObject, + EventRegistryEntry, EventsRegistry, }; diff --git a/src/types.ts b/src/types.ts index 2ff2b2c..62c6fe3 100644 --- a/src/types.ts +++ b/src/types.ts @@ -25,9 +25,9 @@ interface AbstractView { // Event System // ---------------------------------------------------------------------- // E = EventObject, C = e.currentTarget, T = e.target -interface BaseEvent { - nativeEvent: Event & E; - currentTarget: C & EventTarget; +interface BaseEvent { + nativeEvent: E; + currentTarget: C | null; target: T & EventTarget; bubbles: boolean; cancelable: boolean; @@ -40,7 +40,7 @@ interface BaseEvent { isPropagationStopped(): boolean; persist(): void; timeStamp: number; - type: string & NativeEventTypes; + type: string; } /** @@ -50,10 +50,10 @@ interface BaseEvent { * This might be a child element to the element on which the event listener is registered. * If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11508#issuecomment-256045682 */ -type NativeEvent = BaseEvent; +type NativeEvent = BaseEvent; interface ClipboardEvent extends NativeEvent { - clipboardData?: DataTransfer; + clipboardData: DataTransfer; } interface CompositionEvent extends NativeEvent { @@ -89,7 +89,7 @@ interface ChangeEvent extends FormEvent { target: EventTarget & T; } -export type ModifierKey = +type ModifierKey = | 'Alt' | 'AltGraph' | 'CapsLock' @@ -193,121 +193,32 @@ interface TransitionEvent extends NativeEvent> = // (this: unknown & EventTarget, event: E): void; - (event: E) => void; -type NativeEventHandler = EventHandler>; -type ClipboardEventHandler = EventHandler>; -type CompositionEventHandler = EventHandler>; -type DragEventHandler = EventHandler>; -type FocusEventHandler = EventHandler>; -type FormEventHandler = EventHandler>; -type ChangeEventHandler = EventHandler>; -type KeyboardEventHandler = EventHandler>; -type MouseEventHandler = EventHandler>; -type TouchEventHandler = EventHandler>; -type PointerEventHandler = EventHandler>; -type UIEventHandler = EventHandler>; -type WheelEventHandler = EventHandler>; -type AnimationEventHandler = EventHandler>; -type TransitionEventHandler = EventHandler>; - -type SupportedEventObject = - | NativeEvent - | ClipboardEvent - | CompositionEvent - | DragEvent - | FocusEvent - | FormEvent - | ChangeEvent - | KeyboardEvent - | MouseEvent - | TouchEvent - | PointerEvent - | UIEvent - | WheelEvent - | AnimationEvent - | TransitionEvent; - -type SupportedEventHandler = - | NativeEventHandler - | ClipboardEventHandler - | CompositionEventHandler - | DragEventHandler - | FocusEventHandler - | FormEventHandler - | ChangeEventHandler - | KeyboardEventHandler - | MouseEventHandler - | TouchEventHandler - | PointerEventHandler - | UIEventHandler - | WheelEventHandler - | AnimationEventHandler - | TransitionEventHandler; - -type NativeEventTypes = - | 'DOMContentLoaded' - | 'DOMMouseScroll' - | 'abort' - | 'beforeunload' - | 'blur' - | 'change' - | 'click' - | 'contextmenu' - | 'dblclick' - | 'error' - | 'focus' - | 'focusin' - | 'focusout' - | 'gesturechange' - | 'gestureend' - | 'gesturestart' - | 'hover' - | 'keydown' - | 'keypress' - | 'keyup' - | 'load' - | 'mousedown' - | 'mouseenter' - | 'mousein' - | 'mouseleave' - | 'mousemove' - | 'mouseout' - | 'mouseover' - | 'mouseup' - | 'mousewheel' - | 'move' - | 'orientationchange' - | 'pointercancel' - | 'pointerdown' - | 'pointerleave' - | 'pointermove' - | 'pointerup' - | 'readystatechange' - | 'reset' - | 'resize' - | 'scroll' - | 'select' - | 'selectend' - | 'selectstart' - | 'submit' - | 'touchcancel' - | 'touchend' - | 'touchmove' - | 'touchstart' - | 'unload'; +// (this: unknown & EventTarget, event: E): void; +type EventHandler> = (event: E) => void; +type NativeEventHandler = EventHandler>; +type ClipboardEventHandler = EventHandler>; +type CompositionEventHandler = EventHandler>; +type DragEventHandler = EventHandler>; +type FocusEventHandler = EventHandler>; +type FormEventHandler = EventHandler>; +type ChangeEventHandler = EventHandler>; +type KeyboardEventHandler = EventHandler>; +type MouseEventHandler = EventHandler>; +type TouchEventHandler = EventHandler>; +type PointerEventHandler = EventHandler>; +type UIEventHandler = EventHandler>; +type WheelEventHandler = EventHandler>; +type AnimationEventHandler = EventHandler>; +type TransitionEventHandler = EventHandler>; type PossibleEventTarget = EventTarget & (Element | Document | Window); -type ListenerObject> = Map< +type EventRegistryEntry> = Map< H, AddEventListenerOptions | undefined | boolean >; -type EventsRegistry = Record>>; +// type EventsRegistry = Record>>; +type EventsRegistry = Record>>; export { - SupportedEventObject, - SupportedEventHandler, - EventHandler, - NativeEventTypes, NativeEvent, ClipboardEvent, CompositionEvent, @@ -339,6 +250,6 @@ export { AnimationEventHandler, TransitionEventHandler, PossibleEventTarget, - ListenerObject, + EventRegistryEntry, EventsRegistry, };