@trunkjs/browser-utils 1.0.19 → 1.0.20
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 +4 -0
- package/README.md +7 -0
- package/index.d.ts +1 -0
- package/index.js +149 -132
- package/lib/wait-for.d.ts +2 -2
- package/mixins/BreakPointMixin.d.ts +346 -0
- package/mixins/EventBindingsMixin.d.ts +2 -2
- package/mixins/LoggingMixin.d.ts +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 1.0.20 (2025-12-11)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for browser-utils to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
1
5
|
## 1.0.19 (2025-09-11)
|
|
2
6
|
|
|
3
7
|
This was a version bump only for browser-utils to align it with other projects, there were no code changes.
|
package/README.md
CHANGED
|
@@ -104,6 +104,8 @@ customElements.define('my-el', MyEl);
|
|
|
104
104
|
Tip:
|
|
105
105
|
- If you toggle the debug attribute at runtime, call el.invalidateDebugCache() so the mixin re-evaluates the attribute on the next log/warn/error call.
|
|
106
106
|
|
|
107
|
+
|
|
108
|
+
|
|
107
109
|
### `class EventBindingsMixin`: Auto-bind event listeners in custom elements
|
|
108
110
|
|
|
109
111
|
This mixin handles automatic registration and removal of event listeners in custom elements. It uses the `@Listen` decorator to bind class methods to events on specified targets.
|
|
@@ -153,6 +155,11 @@ await waitForAnimationEnd(document.querySelector('.animate')!);
|
|
|
153
155
|
```
|
|
154
156
|
|
|
155
157
|
|
|
158
|
+
### `BreakPointMixin`: Responsive behavior for custom elements
|
|
159
|
+
|
|
160
|
+
Evaluates the css variable `--breakpoint` and adds corresponding and adds a `desktop` attribute to the host element when the breakpoint is above the defined threshold.
|
|
161
|
+
|
|
162
|
+
|
|
156
163
|
|
|
157
164
|
|
|
158
165
|
## API Reference
|
package/index.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export * from './lib/get-error-location';
|
|
|
5
5
|
export * from './lib/Logger';
|
|
6
6
|
export * from './lib/Stopwatch';
|
|
7
7
|
export * from './lib/wait-for';
|
|
8
|
+
export * from './mixins/BreakPointMixin';
|
|
8
9
|
export * from './mixins/EventBindingsMixin';
|
|
9
10
|
export * from './mixins/LoggingMixin';
|
package/index.js
CHANGED
|
@@ -1,119 +1,120 @@
|
|
|
1
|
-
var
|
|
2
|
-
var L = (
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var W = Object.defineProperty;
|
|
2
|
+
var L = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var u = (
|
|
7
|
-
var a = (
|
|
8
|
-
|
|
5
|
+
var $ = (e, t, n) => t in e ? W(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var u = (e, t, n) => $(e, typeof t != "symbol" ? t + "" : t, n), w = (e, t, n) => t.has(e) || L("Cannot " + n);
|
|
7
|
+
var a = (e, t, n) => (w(e, t, "read from private field"), n ? n.call(e) : t.get(e)), c = (e, t, n) => t.has(e) ? L("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), m = (e, t, n, i) => (w(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), p = (e, t, n) => (w(e, t, "access private method"), n);
|
|
8
|
+
import { Debouncer as x } from "@kasimirjs/core";
|
|
9
|
+
const f = [
|
|
9
10
|
{ name: "xs", minWidth: 0 },
|
|
10
11
|
{ name: "sm", minWidth: 576 },
|
|
11
12
|
{ name: "md", minWidth: 768 },
|
|
12
13
|
{ name: "lg", minWidth: 992 },
|
|
13
14
|
{ name: "xl", minWidth: 1200 },
|
|
14
15
|
{ name: "xxl", minWidth: 1400 }
|
|
15
|
-
],
|
|
16
|
-
(
|
|
16
|
+
], v = f.reduce(
|
|
17
|
+
(e, t) => (e[t.name] = t.minWidth, e),
|
|
17
18
|
{}
|
|
18
19
|
);
|
|
19
|
-
function
|
|
20
|
-
if (!(
|
|
21
|
-
throw new Error(`Unknown breakpoint: ${
|
|
22
|
-
return
|
|
20
|
+
function y(e) {
|
|
21
|
+
if (!(e in v))
|
|
22
|
+
throw new Error(`Unknown breakpoint: ${e}`);
|
|
23
|
+
return v[e];
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
for (let
|
|
27
|
-
if (
|
|
28
|
-
return
|
|
25
|
+
function A(e) {
|
|
26
|
+
e === void 0 && (e = window.innerWidth);
|
|
27
|
+
for (let t = f.length - 1; t >= 0; t--)
|
|
28
|
+
if (e >= f[t].minWidth)
|
|
29
|
+
return f[t].name;
|
|
29
30
|
return "xs";
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function U(e, t = {}, n = []) {
|
|
32
33
|
Array.isArray(n) || (n = [n]);
|
|
33
|
-
const i = document.createElement(
|
|
34
|
-
for (const r in
|
|
35
|
-
|
|
34
|
+
const i = document.createElement(e);
|
|
35
|
+
for (const r in t)
|
|
36
|
+
t[r] !== null && t[r] !== void 0 && i.setAttribute(r, t[r] !== !0 ? t[r] : "");
|
|
36
37
|
for (const r of n)
|
|
37
38
|
i.append(typeof r == "string" ? document.createTextNode(r) : r);
|
|
38
39
|
return i;
|
|
39
40
|
}
|
|
40
|
-
class
|
|
41
|
+
class F {
|
|
41
42
|
/**
|
|
42
43
|
*
|
|
43
44
|
* @param delay Debounce delay in milliseconds
|
|
44
45
|
* @param max_delay Maximum delay in milliseconds, if false then no maximum delay is applied
|
|
45
46
|
*/
|
|
46
|
-
constructor(
|
|
47
|
+
constructor(t, n = !1) {
|
|
47
48
|
u(this, "timeout", null);
|
|
48
49
|
u(this, "startTimeWithMs", 0);
|
|
49
|
-
this.delay =
|
|
50
|
+
this.delay = t, this.max_delay = n;
|
|
50
51
|
}
|
|
51
52
|
async wait() {
|
|
52
|
-
return this.startTimeWithMs === 0 && (this.startTimeWithMs = Date.now()), this.timeout && (this.max_delay === !1 || this.startTimeWithMs + this.max_delay > Date.now()) && clearTimeout(this.timeout), new Promise((
|
|
53
|
+
return this.startTimeWithMs === 0 && (this.startTimeWithMs = Date.now()), this.timeout && (this.max_delay === !1 || this.startTimeWithMs + this.max_delay > Date.now()) && clearTimeout(this.timeout), new Promise((t) => {
|
|
53
54
|
this.timeout = setTimeout(() => {
|
|
54
|
-
this.startTimeWithMs = 0,
|
|
55
|
+
this.startTimeWithMs = 0, t(!0);
|
|
55
56
|
}, this.delay);
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
|
-
debounce(
|
|
59
|
+
debounce(t) {
|
|
59
60
|
this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(() => {
|
|
60
|
-
|
|
61
|
+
t();
|
|
61
62
|
}, this.delay);
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
-
if (typeof
|
|
65
|
+
function H(e) {
|
|
66
|
+
if (typeof e.lineNumber == "number")
|
|
66
67
|
return {
|
|
67
|
-
file:
|
|
68
|
-
line:
|
|
69
|
-
column:
|
|
68
|
+
file: e.fileName || e.sourceURL,
|
|
69
|
+
line: e.lineNumber,
|
|
70
|
+
column: e.columnNumber ?? void 0
|
|
70
71
|
};
|
|
71
|
-
if (typeof
|
|
72
|
+
if (typeof e.line == "number")
|
|
72
73
|
return {
|
|
73
|
-
file:
|
|
74
|
-
line:
|
|
75
|
-
column:
|
|
74
|
+
file: e.sourceURL,
|
|
75
|
+
line: e.line,
|
|
76
|
+
column: e.column
|
|
76
77
|
};
|
|
77
|
-
const n = String(
|
|
78
|
+
const n = String(e.stack || e.message || "").split(`
|
|
78
79
|
`), i = /(.*?)(?:\(|@)?(.*?):(\d+):(\d+)\)?$/;
|
|
79
80
|
for (const r of n) {
|
|
80
81
|
const s = r.match(i);
|
|
81
82
|
if (s)
|
|
82
83
|
return { file: s[2], line: +s[3], column: +s[4] };
|
|
83
84
|
}
|
|
84
|
-
return { file:
|
|
85
|
+
return { file: e.fileName || e.sourceURL };
|
|
85
86
|
}
|
|
86
|
-
class
|
|
87
|
-
constructor(
|
|
88
|
-
this._debug =
|
|
87
|
+
class C {
|
|
88
|
+
constructor(t, n, i = "main") {
|
|
89
|
+
this._debug = t, this.myElementId = n, this.instanceId = i;
|
|
89
90
|
}
|
|
90
|
-
log(...
|
|
91
|
-
this._debug && console.log(`[LOG][ID:${this.myElementId}:${this.instanceId}]`, ...
|
|
91
|
+
log(...t) {
|
|
92
|
+
this._debug && console.log(`[LOG][ID:${this.myElementId}:${this.instanceId}]`, ...t);
|
|
92
93
|
}
|
|
93
|
-
warn(...
|
|
94
|
-
console.warn(`[WARN][ID:${this.myElementId}:${this.instanceId}]`, ...
|
|
94
|
+
warn(...t) {
|
|
95
|
+
console.warn(`[WARN][ID:${this.myElementId}:${this.instanceId}]`, ...t);
|
|
95
96
|
}
|
|
96
|
-
error(...
|
|
97
|
-
console.error(`[ERROR][ID:${this.myElementId}:${this.instanceId}]`, ...
|
|
97
|
+
error(...t) {
|
|
98
|
+
console.error(`[ERROR][ID:${this.myElementId}:${this.instanceId}]`, ...t);
|
|
98
99
|
}
|
|
99
|
-
throwError(...
|
|
100
|
-
const n = `[ERROR][ID:${this.myElementId}:${this.instanceId}] ${
|
|
101
|
-
throw this.error(...
|
|
100
|
+
throwError(...t) {
|
|
101
|
+
const n = `[ERROR][ID:${this.myElementId}:${this.instanceId}] ${t.join(" ")}`;
|
|
102
|
+
throw this.error(...t), new Error(n);
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
class O {
|
|
105
|
-
constructor(
|
|
106
|
+
constructor(t, n = !0) {
|
|
106
107
|
u(this, "label");
|
|
107
108
|
u(this, "last");
|
|
108
109
|
u(this, "startTime");
|
|
109
110
|
u(this, "running", !1);
|
|
110
111
|
u(this, "enabled");
|
|
111
|
-
this.label =
|
|
112
|
+
this.label = t, this.enabled = n, this.startTime = this.last = performance.now(), this.running = !0;
|
|
112
113
|
}
|
|
113
|
-
lap(
|
|
114
|
+
lap(t = "") {
|
|
114
115
|
if (!this.enabled) return;
|
|
115
116
|
const n = performance.now(), i = (n - this.last) / 1e3;
|
|
116
|
-
this.last = n, console.debug(`[${this.label}] ${
|
|
117
|
+
this.last = n, console.debug(`[${this.label}] ${t} +${i.toFixed(3)}s`);
|
|
117
118
|
}
|
|
118
119
|
elapsed() {
|
|
119
120
|
return performance.now() - this.startTime;
|
|
@@ -131,119 +132,134 @@ class O {
|
|
|
131
132
|
return this.running;
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
|
-
function
|
|
135
|
+
function V(e, t, n) {
|
|
135
136
|
return new Promise((i, r) => {
|
|
136
|
-
const s = (
|
|
137
|
-
|
|
137
|
+
const s = (l) => {
|
|
138
|
+
e.removeEventListener(t, s, n), i(l);
|
|
138
139
|
};
|
|
139
|
-
|
|
140
|
+
e.addEventListener(t, s, n);
|
|
140
141
|
});
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
-
return document.readyState === "loading" ? new Promise((
|
|
144
|
-
document.addEventListener("DOMContentLoaded", () =>
|
|
143
|
+
function B() {
|
|
144
|
+
return document.readyState === "loading" ? new Promise((e) => {
|
|
145
|
+
document.addEventListener("DOMContentLoaded", () => e());
|
|
145
146
|
}) : Promise.resolve();
|
|
146
147
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
} else if (t instanceof HTMLImageElement) {
|
|
152
|
-
if (t.complete)
|
|
153
|
-
return Promise.resolve();
|
|
154
|
-
} else if (t instanceof HTMLVideoElement || t instanceof HTMLAudioElement)
|
|
155
|
-
return t.readyState >= 3 ? Promise.resolve() : new Promise((e) => {
|
|
156
|
-
t.addEventListener("loadeddata", () => e(), { once: !0 });
|
|
157
|
-
});
|
|
158
|
-
return new Promise((e) => {
|
|
159
|
-
t.addEventListener("load", () => e());
|
|
160
|
-
});
|
|
148
|
+
function z(e = window) {
|
|
149
|
+
return e || (e = window), e === window ? document.readyState === "complete" ? Promise.resolve() : new Promise((t) => window.addEventListener("load", () => t(), { once: !0 })) : e instanceof HTMLImageElement ? e.complete && e.naturalWidth !== 0 ? Promise.resolve() : new Promise((t, n) => {
|
|
150
|
+
e.addEventListener("load", () => t(), { once: !0 }), e.addEventListener("error", () => n(new Error("image error")), { once: !0 });
|
|
151
|
+
}) : e instanceof HTMLMediaElement ? e.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA ? Promise.resolve() : new Promise((t) => e.addEventListener("loadeddata", () => t(), { once: !0 })) : new Promise((t) => e.addEventListener("load", () => t(), { once: !0 }));
|
|
161
152
|
}
|
|
162
|
-
function G(
|
|
163
|
-
return new Promise((
|
|
153
|
+
function G(e) {
|
|
154
|
+
return new Promise((t) => setTimeout(t, e));
|
|
164
155
|
}
|
|
165
|
-
function j(
|
|
166
|
-
return new Promise((
|
|
156
|
+
function j(e) {
|
|
157
|
+
return new Promise((t) => {
|
|
167
158
|
const n = (i) => {
|
|
168
|
-
|
|
159
|
+
e.removeEventListener("animationend", n), t(i);
|
|
169
160
|
};
|
|
170
|
-
|
|
161
|
+
e.addEventListener("animationend", n);
|
|
171
162
|
});
|
|
172
163
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
const
|
|
164
|
+
function q(e) {
|
|
165
|
+
var i;
|
|
166
|
+
const t = new x(200, 5e3);
|
|
167
|
+
class n extends e {
|
|
168
|
+
constructor() {
|
|
169
|
+
super(...arguments);
|
|
170
|
+
u(this, "currentBreakPoint", null);
|
|
171
|
+
c(this, i, async () => {
|
|
172
|
+
await t.debounce(), await B();
|
|
173
|
+
const l = window.innerWidth;
|
|
174
|
+
let o = getComputedStyle(this).getPropertyValue("--breakpoint");
|
|
175
|
+
o || (this.style.setProperty("--breakpoint", "md"), o = getComputedStyle(this).getPropertyValue("--breakpoint"));
|
|
176
|
+
const d = A(l);
|
|
177
|
+
this.currentBreakPoint !== d && (y(o) < y(d) ? this.setAttribute("desktop", "true") : this.removeAttribute("desktop"));
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
connectedCallback() {
|
|
181
|
+
super.connectedCallback(), a(this, i).call(this), window.addEventListener("resize", a(this, i)), a(this, i).call(this);
|
|
182
|
+
}
|
|
183
|
+
disconnectedCallback() {
|
|
184
|
+
super.disconnectedCallback(), window.removeEventListener("resize", a(this, i));
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return i = new WeakMap(), n;
|
|
188
|
+
}
|
|
189
|
+
const g = Symbol("listenerDefs"), k = Symbol("withEventBindings");
|
|
190
|
+
function X(e, t) {
|
|
191
|
+
const n = Array.isArray(e) ? e : [e];
|
|
176
192
|
return function(i, r) {
|
|
177
193
|
if (r.kind !== "method") throw new Error("@Listen nur für Methoden");
|
|
178
194
|
return r.addInitializer(function() {
|
|
179
195
|
const s = this.constructor;
|
|
180
|
-
(s[
|
|
196
|
+
(s[g] || (s[g] = [])).push({
|
|
181
197
|
method: r.name,
|
|
182
198
|
events: n,
|
|
183
|
-
opts:
|
|
199
|
+
opts: t
|
|
184
200
|
});
|
|
185
201
|
}), function(...s) {
|
|
186
|
-
if (!this[
|
|
202
|
+
if (!this[k])
|
|
187
203
|
throw new Error("[EventBindings] @Listen - decorator requires EventBindingMixin.");
|
|
188
204
|
return i.apply(this, s);
|
|
189
205
|
};
|
|
190
206
|
};
|
|
191
207
|
}
|
|
192
|
-
function
|
|
208
|
+
function R(e, t) {
|
|
193
209
|
var n;
|
|
194
|
-
return !
|
|
210
|
+
return !t || t === "host" ? e : t === "document" ? e.ownerDocument ?? document : t === "window" ? ((n = e.ownerDocument) == null ? void 0 : n.defaultView) ?? window : t === "shadowRoot" ? e.shadowRoot ?? e : typeof t == "function" ? t(e) : t;
|
|
195
211
|
}
|
|
196
|
-
function
|
|
197
|
-
var n, i,
|
|
198
|
-
class
|
|
212
|
+
function J(e) {
|
|
213
|
+
var n, i, P;
|
|
214
|
+
class t extends e {
|
|
199
215
|
constructor(...o) {
|
|
200
216
|
super(...o);
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
this[
|
|
217
|
+
c(this, i);
|
|
218
|
+
c(this, n);
|
|
219
|
+
this[k] = !0;
|
|
204
220
|
}
|
|
205
221
|
connectedCallback() {
|
|
206
222
|
var o;
|
|
207
|
-
(o = super.connectedCallback) == null || o.call(this),
|
|
223
|
+
(o = super.connectedCallback) == null || o.call(this), p(this, i, P).call(this);
|
|
208
224
|
}
|
|
209
225
|
disconnectedCallback() {
|
|
210
|
-
var o,
|
|
211
|
-
(o = a(this, n)) == null || o.abort(), (
|
|
226
|
+
var o, d;
|
|
227
|
+
(o = a(this, n)) == null || o.abort(), (d = super.disconnectedCallback) == null || d.call(this);
|
|
212
228
|
}
|
|
213
229
|
}
|
|
214
|
-
return n = new WeakMap(), i = new WeakSet(),
|
|
215
|
-
var
|
|
216
|
-
(
|
|
217
|
-
const o = this.constructor[
|
|
230
|
+
return n = new WeakMap(), i = new WeakSet(), P = function() {
|
|
231
|
+
var d, b, E;
|
|
232
|
+
(d = a(this, n)) == null || d.abort(), m(this, n, new AbortController());
|
|
233
|
+
const o = this.constructor[g] || [];
|
|
218
234
|
for (const h of o) {
|
|
219
|
-
const
|
|
220
|
-
for (const
|
|
221
|
-
|
|
235
|
+
const I = R(this, (b = h.opts) == null ? void 0 : b.target), M = ((E = h.opts) == null ? void 0 : E.options) ?? {}, T = this[h.method].bind(this);
|
|
236
|
+
for (const D of h.events)
|
|
237
|
+
I.addEventListener(D, T, { ...M, signal: a(this, n).signal });
|
|
222
238
|
}
|
|
223
|
-
},
|
|
239
|
+
}, t;
|
|
224
240
|
}
|
|
225
|
-
let
|
|
226
|
-
function
|
|
241
|
+
let _ = 1;
|
|
242
|
+
function K(e) {
|
|
227
243
|
var n, i, r;
|
|
228
|
-
class
|
|
244
|
+
class t extends e {
|
|
229
245
|
constructor() {
|
|
230
246
|
super(...arguments);
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
247
|
+
c(this, n, null);
|
|
248
|
+
c(this, i, _++);
|
|
249
|
+
c(this, r, null);
|
|
234
250
|
}
|
|
235
251
|
/**
|
|
236
252
|
* Clears the cached debug flag so the attribute will be checked again
|
|
237
253
|
* on the next log/warn/error call.
|
|
238
254
|
*/
|
|
239
255
|
invalidateDebugCache() {
|
|
240
|
-
|
|
256
|
+
m(this, n, null);
|
|
241
257
|
}
|
|
242
258
|
get _debug() {
|
|
243
|
-
return a(this, n) !== null ? a(this, n) : (this instanceof HTMLElement &&
|
|
259
|
+
return a(this, n) !== null ? a(this, n) : (this instanceof HTMLElement && m(this, n, this.hasAttribute("debug") && !["false", "0", "off", "no"].includes(this.getAttribute("debug") || "")), a(this, n) === !0 && console.log(`[DEBUG][ID:${a(this, i)}] LoggingMixin: Debug mode is enabled for <${this.tagName}>`, this), a(this, n) ?? !1);
|
|
244
260
|
}
|
|
245
261
|
getLogger(o = "main") {
|
|
246
|
-
return a(this, r) ||
|
|
262
|
+
return a(this, r) || m(this, r, new C(this._debug, `${a(this, i)}`, o)), a(this, r);
|
|
247
263
|
}
|
|
248
264
|
log(...o) {
|
|
249
265
|
this.getLogger().log(...o);
|
|
@@ -258,24 +274,25 @@ function z(t) {
|
|
|
258
274
|
return this.getLogger().throwError(...o);
|
|
259
275
|
}
|
|
260
276
|
}
|
|
261
|
-
return n = new WeakMap(), i = new WeakMap(), r = new WeakMap(),
|
|
277
|
+
return n = new WeakMap(), i = new WeakMap(), r = new WeakMap(), t;
|
|
262
278
|
}
|
|
263
279
|
export {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
280
|
+
q as BreakPointMixin,
|
|
281
|
+
F as Debouncer,
|
|
282
|
+
J as EventBindingsMixin,
|
|
283
|
+
X as Listen,
|
|
284
|
+
C as Logger,
|
|
285
|
+
K as LoggingMixin,
|
|
269
286
|
O as Stopwatch,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
287
|
+
v as breakpointMap,
|
|
288
|
+
f as breakpoints,
|
|
289
|
+
U as create_element,
|
|
290
|
+
y as getBreakpointMinWidth,
|
|
291
|
+
A as getCurrentBreakpoint,
|
|
292
|
+
H as getErrorLocation,
|
|
276
293
|
G as sleep,
|
|
277
|
-
|
|
294
|
+
V as waitFor,
|
|
278
295
|
j as waitForAnimationEnd,
|
|
279
|
-
|
|
280
|
-
|
|
296
|
+
B as waitForDomContentLoaded,
|
|
297
|
+
z as waitForLoad
|
|
281
298
|
};
|
package/lib/wait-for.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export declare function waitForDomContentLoaded(): Promise<void>;
|
|
|
9
9
|
* - HTMLVideoElement and HTMLAudioElement: waits for 'loadeddata' event if not
|
|
10
10
|
*
|
|
11
11
|
*
|
|
12
|
-
* @param
|
|
12
|
+
* @param el
|
|
13
13
|
*/
|
|
14
|
-
export declare function waitForLoad(
|
|
14
|
+
export declare function waitForLoad(el?: Window | HTMLElement | null): Promise<void>;
|
|
15
15
|
export declare function sleep(ms: number): Promise<void>;
|
|
16
16
|
export declare function waitForAnimationEnd(element: HTMLElement): Promise<AnimationEvent>;
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
type Constructor<T = object> = abstract new (...args: any[]) => T;
|
|
2
|
+
export declare function BreakPointMixin<TBase extends Constructor<HTMLElement>>(Base: TBase): (abstract new (...args: any[]) => {
|
|
3
|
+
currentBreakPoint: string | null;
|
|
4
|
+
"__#2663@#updateBreakPoint": () => Promise<void>;
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
disconnectedCallback(): void;
|
|
7
|
+
accessKey: string;
|
|
8
|
+
readonly accessKeyLabel: string;
|
|
9
|
+
autocapitalize: string;
|
|
10
|
+
dir: string;
|
|
11
|
+
draggable: boolean;
|
|
12
|
+
hidden: boolean;
|
|
13
|
+
inert: boolean;
|
|
14
|
+
innerText: string;
|
|
15
|
+
lang: string;
|
|
16
|
+
readonly offsetHeight: number;
|
|
17
|
+
readonly offsetLeft: number;
|
|
18
|
+
readonly offsetParent: Element | null;
|
|
19
|
+
readonly offsetTop: number;
|
|
20
|
+
readonly offsetWidth: number;
|
|
21
|
+
outerText: string;
|
|
22
|
+
popover: string | null;
|
|
23
|
+
spellcheck: boolean;
|
|
24
|
+
title: string;
|
|
25
|
+
translate: boolean;
|
|
26
|
+
writingSuggestions: string;
|
|
27
|
+
attachInternals(): ElementInternals;
|
|
28
|
+
click(): void;
|
|
29
|
+
hidePopover(): void;
|
|
30
|
+
showPopover(): void;
|
|
31
|
+
togglePopover(options?: boolean): boolean;
|
|
32
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
33
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
34
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
35
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
36
|
+
readonly attributes: NamedNodeMap;
|
|
37
|
+
get classList(): DOMTokenList;
|
|
38
|
+
set classList(value: string);
|
|
39
|
+
className: string;
|
|
40
|
+
readonly clientHeight: number;
|
|
41
|
+
readonly clientLeft: number;
|
|
42
|
+
readonly clientTop: number;
|
|
43
|
+
readonly clientWidth: number;
|
|
44
|
+
readonly currentCSSZoom: number;
|
|
45
|
+
id: string;
|
|
46
|
+
innerHTML: string;
|
|
47
|
+
readonly localName: string;
|
|
48
|
+
readonly namespaceURI: string | null;
|
|
49
|
+
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
50
|
+
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
51
|
+
outerHTML: string;
|
|
52
|
+
readonly ownerDocument: Document;
|
|
53
|
+
get part(): DOMTokenList;
|
|
54
|
+
set part(value: string);
|
|
55
|
+
readonly prefix: string | null;
|
|
56
|
+
readonly scrollHeight: number;
|
|
57
|
+
scrollLeft: number;
|
|
58
|
+
scrollTop: number;
|
|
59
|
+
readonly scrollWidth: number;
|
|
60
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
61
|
+
slot: string;
|
|
62
|
+
readonly tagName: string;
|
|
63
|
+
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
64
|
+
checkVisibility(options?: CheckVisibilityOptions): boolean;
|
|
65
|
+
closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
66
|
+
closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
|
|
67
|
+
closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
|
|
68
|
+
closest<E extends Element = Element>(selectors: string): E | null;
|
|
69
|
+
computedStyleMap(): StylePropertyMapReadOnly;
|
|
70
|
+
getAttribute(qualifiedName: string): string | null;
|
|
71
|
+
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
72
|
+
getAttributeNames(): string[];
|
|
73
|
+
getAttributeNode(qualifiedName: string): Attr | null;
|
|
74
|
+
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
75
|
+
getBoundingClientRect(): DOMRect;
|
|
76
|
+
getClientRects(): DOMRectList;
|
|
77
|
+
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
78
|
+
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
|
|
79
|
+
getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
|
|
80
|
+
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
|
|
81
|
+
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
82
|
+
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
83
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
84
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
85
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
|
|
86
|
+
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
87
|
+
getHTML(options?: GetHTMLOptions): string;
|
|
88
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
89
|
+
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
90
|
+
hasAttributes(): boolean;
|
|
91
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
92
|
+
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
93
|
+
insertAdjacentHTML(position: InsertPosition, string: string): void;
|
|
94
|
+
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
95
|
+
matches(selectors: string): boolean;
|
|
96
|
+
releasePointerCapture(pointerId: number): void;
|
|
97
|
+
removeAttribute(qualifiedName: string): void;
|
|
98
|
+
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
99
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
100
|
+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
101
|
+
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
102
|
+
scroll(options?: ScrollToOptions): void;
|
|
103
|
+
scroll(x: number, y: number): void;
|
|
104
|
+
scrollBy(options?: ScrollToOptions): void;
|
|
105
|
+
scrollBy(x: number, y: number): void;
|
|
106
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
107
|
+
scrollTo(options?: ScrollToOptions): void;
|
|
108
|
+
scrollTo(x: number, y: number): void;
|
|
109
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
110
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
111
|
+
setAttributeNode(attr: Attr): Attr | null;
|
|
112
|
+
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
113
|
+
setHTMLUnsafe(html: string): void;
|
|
114
|
+
setPointerCapture(pointerId: number): void;
|
|
115
|
+
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
116
|
+
webkitMatchesSelector(selectors: string): boolean;
|
|
117
|
+
readonly baseURI: string;
|
|
118
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
119
|
+
readonly firstChild: ChildNode | null;
|
|
120
|
+
readonly isConnected: boolean;
|
|
121
|
+
readonly lastChild: ChildNode | null;
|
|
122
|
+
readonly nextSibling: ChildNode | null;
|
|
123
|
+
readonly nodeName: string;
|
|
124
|
+
readonly nodeType: number;
|
|
125
|
+
nodeValue: string | null;
|
|
126
|
+
readonly parentElement: HTMLElement | null;
|
|
127
|
+
readonly parentNode: ParentNode | null;
|
|
128
|
+
readonly previousSibling: ChildNode | null;
|
|
129
|
+
textContent: string | null;
|
|
130
|
+
appendChild<T extends Node>(node: T): T;
|
|
131
|
+
cloneNode(subtree?: boolean): Node;
|
|
132
|
+
compareDocumentPosition(other: Node): number;
|
|
133
|
+
contains(other: Node | null): boolean;
|
|
134
|
+
getRootNode(options?: GetRootNodeOptions): Node;
|
|
135
|
+
hasChildNodes(): boolean;
|
|
136
|
+
insertBefore<T extends Node>(node: T, child: Node | null): T;
|
|
137
|
+
isDefaultNamespace(namespace: string | null): boolean;
|
|
138
|
+
isEqualNode(otherNode: Node | null): boolean;
|
|
139
|
+
isSameNode(otherNode: Node | null): boolean;
|
|
140
|
+
lookupNamespaceURI(prefix: string | null): string | null;
|
|
141
|
+
lookupPrefix(namespace: string | null): string | null;
|
|
142
|
+
normalize(): void;
|
|
143
|
+
removeChild<T extends Node>(child: T): T;
|
|
144
|
+
replaceChild<T extends Node>(node: Node, child: T): T;
|
|
145
|
+
readonly ELEMENT_NODE: 1;
|
|
146
|
+
readonly ATTRIBUTE_NODE: 2;
|
|
147
|
+
readonly TEXT_NODE: 3;
|
|
148
|
+
readonly CDATA_SECTION_NODE: 4;
|
|
149
|
+
readonly ENTITY_REFERENCE_NODE: 5;
|
|
150
|
+
readonly ENTITY_NODE: 6;
|
|
151
|
+
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
152
|
+
readonly COMMENT_NODE: 8;
|
|
153
|
+
readonly DOCUMENT_NODE: 9;
|
|
154
|
+
readonly DOCUMENT_TYPE_NODE: 10;
|
|
155
|
+
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
156
|
+
readonly NOTATION_NODE: 12;
|
|
157
|
+
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
158
|
+
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
159
|
+
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
160
|
+
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
161
|
+
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
162
|
+
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
163
|
+
dispatchEvent(event: Event): boolean;
|
|
164
|
+
ariaAtomic: string | null;
|
|
165
|
+
ariaAutoComplete: string | null;
|
|
166
|
+
ariaBrailleLabel: string | null;
|
|
167
|
+
ariaBrailleRoleDescription: string | null;
|
|
168
|
+
ariaBusy: string | null;
|
|
169
|
+
ariaChecked: string | null;
|
|
170
|
+
ariaColCount: string | null;
|
|
171
|
+
ariaColIndex: string | null;
|
|
172
|
+
ariaColIndexText: string | null;
|
|
173
|
+
ariaColSpan: string | null;
|
|
174
|
+
ariaCurrent: string | null;
|
|
175
|
+
ariaDescription: string | null;
|
|
176
|
+
ariaDisabled: string | null;
|
|
177
|
+
ariaExpanded: string | null;
|
|
178
|
+
ariaHasPopup: string | null;
|
|
179
|
+
ariaHidden: string | null;
|
|
180
|
+
ariaInvalid: string | null;
|
|
181
|
+
ariaKeyShortcuts: string | null;
|
|
182
|
+
ariaLabel: string | null;
|
|
183
|
+
ariaLevel: string | null;
|
|
184
|
+
ariaLive: string | null;
|
|
185
|
+
ariaModal: string | null;
|
|
186
|
+
ariaMultiLine: string | null;
|
|
187
|
+
ariaMultiSelectable: string | null;
|
|
188
|
+
ariaOrientation: string | null;
|
|
189
|
+
ariaPlaceholder: string | null;
|
|
190
|
+
ariaPosInSet: string | null;
|
|
191
|
+
ariaPressed: string | null;
|
|
192
|
+
ariaReadOnly: string | null;
|
|
193
|
+
ariaRelevant: string | null;
|
|
194
|
+
ariaRequired: string | null;
|
|
195
|
+
ariaRoleDescription: string | null;
|
|
196
|
+
ariaRowCount: string | null;
|
|
197
|
+
ariaRowIndex: string | null;
|
|
198
|
+
ariaRowIndexText: string | null;
|
|
199
|
+
ariaRowSpan: string | null;
|
|
200
|
+
ariaSelected: string | null;
|
|
201
|
+
ariaSetSize: string | null;
|
|
202
|
+
ariaSort: string | null;
|
|
203
|
+
ariaValueMax: string | null;
|
|
204
|
+
ariaValueMin: string | null;
|
|
205
|
+
ariaValueNow: string | null;
|
|
206
|
+
ariaValueText: string | null;
|
|
207
|
+
role: string | null;
|
|
208
|
+
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
|
|
209
|
+
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
210
|
+
after(...nodes: (Node | string)[]): void;
|
|
211
|
+
before(...nodes: (Node | string)[]): void;
|
|
212
|
+
remove(): void;
|
|
213
|
+
replaceWith(...nodes: (Node | string)[]): void;
|
|
214
|
+
readonly nextElementSibling: Element | null;
|
|
215
|
+
readonly previousElementSibling: Element | null;
|
|
216
|
+
readonly childElementCount: number;
|
|
217
|
+
readonly children: HTMLCollection;
|
|
218
|
+
readonly firstElementChild: Element | null;
|
|
219
|
+
readonly lastElementChild: Element | null;
|
|
220
|
+
append(...nodes: (Node | string)[]): void;
|
|
221
|
+
prepend(...nodes: (Node | string)[]): void;
|
|
222
|
+
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
|
|
223
|
+
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
|
|
224
|
+
querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
|
|
225
|
+
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
|
|
226
|
+
querySelector<E extends Element = Element>(selectors: string): E | null;
|
|
227
|
+
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
228
|
+
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
|
|
229
|
+
querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
230
|
+
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
231
|
+
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
232
|
+
replaceChildren(...nodes: (Node | string)[]): void;
|
|
233
|
+
readonly assignedSlot: HTMLSlotElement | null;
|
|
234
|
+
readonly attributeStyleMap: StylePropertyMap;
|
|
235
|
+
get style(): CSSStyleDeclaration;
|
|
236
|
+
set style(cssText: string);
|
|
237
|
+
contentEditable: string;
|
|
238
|
+
enterKeyHint: string;
|
|
239
|
+
inputMode: string;
|
|
240
|
+
readonly isContentEditable: boolean;
|
|
241
|
+
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
242
|
+
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
243
|
+
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
244
|
+
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
245
|
+
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
246
|
+
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
247
|
+
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
248
|
+
onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
249
|
+
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
250
|
+
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
251
|
+
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
252
|
+
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
253
|
+
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
254
|
+
onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
255
|
+
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
256
|
+
oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
257
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
258
|
+
oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
259
|
+
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
260
|
+
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
261
|
+
oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
262
|
+
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
263
|
+
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
264
|
+
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
265
|
+
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
266
|
+
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
267
|
+
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
268
|
+
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
269
|
+
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
270
|
+
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
271
|
+
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
272
|
+
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
273
|
+
onerror: OnErrorEventHandler;
|
|
274
|
+
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
275
|
+
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
276
|
+
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
277
|
+
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
278
|
+
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
279
|
+
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
280
|
+
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
281
|
+
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
282
|
+
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
283
|
+
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
284
|
+
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
285
|
+
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
286
|
+
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
287
|
+
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
288
|
+
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
289
|
+
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
290
|
+
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
291
|
+
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
292
|
+
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
293
|
+
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
294
|
+
onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
295
|
+
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
296
|
+
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
297
|
+
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
298
|
+
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
299
|
+
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
300
|
+
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
301
|
+
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
302
|
+
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
303
|
+
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
304
|
+
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
305
|
+
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
306
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
307
|
+
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
308
|
+
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
309
|
+
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
310
|
+
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
311
|
+
onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
312
|
+
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
313
|
+
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
314
|
+
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
315
|
+
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
316
|
+
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
317
|
+
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
318
|
+
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
319
|
+
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
320
|
+
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
321
|
+
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
322
|
+
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
323
|
+
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
324
|
+
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
325
|
+
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
326
|
+
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
327
|
+
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
328
|
+
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
329
|
+
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
330
|
+
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
331
|
+
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
332
|
+
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
333
|
+
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
334
|
+
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
335
|
+
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
336
|
+
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
337
|
+
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
338
|
+
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
339
|
+
autofocus: boolean;
|
|
340
|
+
readonly dataset: DOMStringMap;
|
|
341
|
+
nonce?: string;
|
|
342
|
+
tabIndex: number;
|
|
343
|
+
blur(): void;
|
|
344
|
+
focus(options?: FocusOptions): void;
|
|
345
|
+
}) & TBase;
|
|
346
|
+
export {};
|
|
@@ -9,9 +9,9 @@ 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
11
|
export declare function EventBindingsMixin<TBase extends Ctor<object>>(Base: TBase): (abstract new (...a: any[]) => {
|
|
12
|
-
"__#
|
|
12
|
+
"__#2664@#ac"?: AbortController;
|
|
13
13
|
connectedCallback(): void;
|
|
14
14
|
disconnectedCallback(): void;
|
|
15
|
-
"__#
|
|
15
|
+
"__#2664@#bindEventListeners"(): void;
|
|
16
16
|
}) & TBase;
|
|
17
17
|
export {};
|
package/mixins/LoggingMixin.d.ts
CHANGED
|
@@ -26,14 +26,14 @@ type Constructor<T = object> = abstract new (...args: any[]) => T;
|
|
|
26
26
|
* <my-element debug></my-element> // enables debug logging
|
|
27
27
|
*/
|
|
28
28
|
export declare function LoggingMixin<TBase extends Constructor<object>>(Base: TBase): (abstract new (...args: any[]) => {
|
|
29
|
-
"__#
|
|
30
|
-
"__#
|
|
29
|
+
"__#2665@#debugCached": boolean | null;
|
|
30
|
+
"__#2665@#myElementId": number;
|
|
31
31
|
/**
|
|
32
32
|
* Clears the cached debug flag so the attribute will be checked again
|
|
33
33
|
* on the next log/warn/error call.
|
|
34
34
|
*/
|
|
35
35
|
invalidateDebugCache(): void;
|
|
36
|
-
"__#
|
|
36
|
+
"__#2665@#myLoggerInstance": Logger | null;
|
|
37
37
|
readonly _debug: boolean;
|
|
38
38
|
getLogger(instanceId?: string): Logger;
|
|
39
39
|
log(...args: any[]): void;
|