revojs 0.0.56 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/html/index.d.ts +1 -1
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/html/index.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ export declare const toCustomElement: <TEvents extends Events, TAttributes exten
|
|
|
86
86
|
export declare const registerComponent: <TEvents extends Events, TAttributes extends Attributes>(component: ComponentConstructor<TEvents, TAttributes>) => ComponentConstructor<TEvents, TAttributes>;
|
|
87
87
|
export declare function useEvent<T extends keyof ElementEventMap>(scope: Scope, target: EventTarget | undefined | null, event: T, input: EventListener<ElementEventMap[T]>, options?: AddEventListenerOptions): void;
|
|
88
88
|
export declare function useEvent<T extends keyof WindowEventMap>(scope: Scope, target: Window | undefined | null, event: T, input: EventListener<WindowEventMap[T]>, options?: AddEventListenerOptions): void;
|
|
89
|
-
export declare function useEvent<T extends keyof HTMLElementEventMap>(scope: Scope, target: HTMLElement | undefined | null, event: T, input: EventListener<HTMLElementEventMap[T]>, options?: AddEventListenerOptions): void;
|
|
89
|
+
export declare function useEvent<T extends keyof HTMLElementEventMap>(scope: Scope, target: Document | HTMLElement | undefined | null, event: T, input: EventListener<HTMLElementEventMap[T]>, options?: AddEventListenerOptions): void;
|
|
90
90
|
export declare const isClient: () => boolean;
|
|
91
91
|
export declare const isServer: () => boolean;
|
|
92
92
|
export declare const preventDefault: (event: Event) => void;
|
package/dist/index.js
CHANGED
|
@@ -164,7 +164,10 @@ var Handler = class Handler {
|
|
|
164
164
|
const value = Reflect.get(target, key);
|
|
165
165
|
if (value) {
|
|
166
166
|
if (typeof value === "function" && !value.prototype) return value.bind(target);
|
|
167
|
-
if (typeof value === "object")
|
|
167
|
+
if (typeof value === "object") {
|
|
168
|
+
const tag = Object.prototype.toString.call(value);
|
|
169
|
+
if (tag === "[object Object]" || tag === "[object Array]" || tag === "[object Map]" || tag === "[object Set]" || tag === "[object WeakMap]" || tag === "[object WeakSet]") return new Proxy(value, new Handler());
|
|
170
|
+
}
|
|
168
171
|
}
|
|
169
172
|
return value;
|
|
170
173
|
}
|