@trunkjs/browser-utils 1.0.28 → 1.0.32

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