@trunkjs/browser-utils 1.0.32 → 1.0.35
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 1.0.35 (2026-02-07)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for browser-utils to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 1.0.34 (2026-02-07)
|
|
6
|
+
|
|
7
|
+
This was a version bump only for browser-utils to align it with other projects, there were no code changes.
|
|
8
|
+
|
|
9
|
+
## 1.0.33 (2026-02-07)
|
|
10
|
+
|
|
11
|
+
This was a version bump only for browser-utils to align it with other projects, there were no code changes.
|
|
12
|
+
|
|
1
13
|
## 1.0.32 (2026-02-07)
|
|
2
14
|
|
|
3
15
|
This was a version bump only for browser-utils to align it with other projects, there were no code changes.
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import { Debouncer } from '../lib/Debouncer';
|
|
2
1
|
type Constructor<T = object> = abstract new (...args: any[]) => T;
|
|
3
2
|
export interface BreakPointMixinInterface {
|
|
4
3
|
currentBreakPoint: string | null;
|
|
5
4
|
}
|
|
6
|
-
export declare function BreakPointMixin<TBase extends Constructor<object>>(Base: TBase):
|
|
7
|
-
"__#2564@#debouncer": Debouncer;
|
|
8
|
-
currentBreakPoint: string | null;
|
|
9
|
-
"__#2564@#updateBreakPoint": () => Promise<void>;
|
|
10
|
-
connectedCallback(): void;
|
|
11
|
-
disconnectedCallback(): void;
|
|
12
|
-
}) & TBase;
|
|
5
|
+
export declare function BreakPointMixin<TBase extends Constructor<object>>(Base: TBase): TBase & Constructor<BreakPointMixinInterface>;
|
|
13
6
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type Ctor<T = object> = new (...args: any[]) => T;
|
|
1
|
+
type Ctor<T = object> = abstract new (...args: any[]) => T;
|
|
2
2
|
type TargetSpec = 'host' | 'document' | 'window' | 'shadowRoot' | EventTarget | ((host: HTMLElement) => EventTarget);
|
|
3
3
|
type ListenOpts = {
|
|
4
4
|
target?: TargetSpec;
|
|
@@ -8,10 +8,5 @@ type EventName = keyof DocumentEventMap;
|
|
|
8
8
|
type OneOrMany<N extends EventName> = N | readonly N[];
|
|
9
9
|
type EventFromInput<I extends OneOrMany<EventName>> = I extends readonly (infer K)[] ? K extends EventName ? DocumentEventMap[K] : never : I extends EventName ? DocumentEventMap[I] : never;
|
|
10
10
|
export declare function Listen<I extends OneOrMany<EventName>>(type: I, opts?: ListenOpts): <This, Fn extends (this: This, ev: EventFromInput<I>, ...args: any[]) => any>(value: Fn, context: ClassMethodDecoratorContext<This, Fn>) => Fn;
|
|
11
|
-
export declare function EventBindingsMixin<TBase extends Ctor<object>>(Base: TBase):
|
|
12
|
-
"__#2565@#ac"?: AbortController;
|
|
13
|
-
connectedCallback(): void;
|
|
14
|
-
disconnectedCallback(): void;
|
|
15
|
-
"__#2565@#bindEventListeners"(): void;
|
|
16
|
-
}) & TBase;
|
|
11
|
+
export declare function EventBindingsMixin<TBase extends Ctor<object>>(Base: TBase): TBase;
|
|
17
12
|
export {};
|
package/mixins/LoggingMixin.d.ts
CHANGED
|
@@ -32,20 +32,5 @@ export interface LoggerMixinInterface {
|
|
|
32
32
|
*
|
|
33
33
|
* <my-element debug></my-element> // enables debug logging
|
|
34
34
|
*/
|
|
35
|
-
export declare function LoggingMixin<TBase extends Constructor<object>>(Base: TBase):
|
|
36
|
-
"__#2566@#debugCached": boolean | null;
|
|
37
|
-
"__#2566@#myElementId": number;
|
|
38
|
-
/**
|
|
39
|
-
* Clears the cached debug flag so the attribute will be checked again
|
|
40
|
-
* on the next log/warn/error call.
|
|
41
|
-
*/
|
|
42
|
-
invalidateDebugCache(): void;
|
|
43
|
-
"__#2566@#myLoggerInstance": Logger | null;
|
|
44
|
-
readonly _debug: boolean;
|
|
45
|
-
getLogger(instanceId?: string): Logger;
|
|
46
|
-
log(...args: any[]): void;
|
|
47
|
-
warn(...args: any[]): void;
|
|
48
|
-
error(...args: any[]): void;
|
|
49
|
-
throwError(...args: any[]): never;
|
|
50
|
-
}) & TBase;
|
|
35
|
+
export declare function LoggingMixin<TBase extends Constructor<object>>(Base: TBase): TBase & Constructor<LoggerMixinInterface>;
|
|
51
36
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|