@trunkjs/browser-utils 1.0.49 → 1.0.50

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/.ai-usage-info.md CHANGED
@@ -153,6 +153,10 @@ Empty slots get the CSS class:
153
153
  <slot class="slot-empty"></slot>
154
154
  ```
155
155
 
156
+ Notes:
157
+ - whitespace-only text nodes are treated as empty
158
+ - HTML comments are treated as empty as well (important for Lit comment markers)
159
+
156
160
  ## Other exports
157
161
 
158
162
  ```ts
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.50 (2026-05-19)
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.49 (2026-05-18)
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/index.js CHANGED
@@ -1,10 +1,10 @@
1
- var D = Object.defineProperty;
2
- var x = (e) => {
1
+ var B = Object.defineProperty;
2
+ var _ = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var R = (e, t, n) => t in e ? D(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var c = (e, t, n) => R(e, typeof t != "symbol" ? t + "" : t, n), k = (e, t, n) => t.has(e) || x("Cannot " + n);
7
- var d = (e, t, n) => (k(e, t, "read from private field"), n ? n.call(e) : t.get(e)), m = (e, t, n) => t.has(e) ? x("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), w = (e, t, n, i) => (k(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), y = (e, t, n) => (k(e, t, "access private method"), n);
5
+ var O = (e, t, n) => t in e ? B(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var m = (e, t, n) => O(e, typeof t != "symbol" ? t + "" : t, n), T = (e, t, n) => t.has(e) || _("Cannot " + n);
7
+ var l = (e, t, n) => (T(e, t, "read from private field"), n ? n.call(e) : t.get(e)), f = (e, t, n) => t.has(e) ? _("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), b = (e, t, n, i) => (T(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), w = (e, t, n) => (T(e, t, "access private method"), n);
8
8
  const v = [
9
9
  { name: "xs", minWidth: 0 },
10
10
  { name: "sm", minWidth: 576 },
@@ -12,26 +12,26 @@ const v = [
12
12
  { name: "lg", minWidth: 992 },
13
13
  { name: "xl", minWidth: 1200 },
14
14
  { name: "xxl", minWidth: 1400 }
15
- ], _ = v.reduce(
15
+ ], M = v.reduce(
16
16
  (e, t) => (e[t.name] = t.minWidth, e),
17
17
  {}
18
18
  );
19
19
  function E(e) {
20
- if (!(e in _))
20
+ if (!(e in M))
21
21
  throw new Error(`Unknown breakpoint: ${e}`);
22
- return _[e];
22
+ return M[e];
23
23
  }
24
- function O() {
24
+ function U() {
25
25
  return window.visualViewport ? window.visualViewport.width : window.innerWidth;
26
26
  }
27
- function U(e) {
28
- e === void 0 && (e = O());
27
+ function j(e) {
28
+ e === void 0 && (e = U());
29
29
  for (let t = v.length - 1; t >= 0; t--)
30
30
  if (e >= v[t].minWidth)
31
31
  return v[t].name;
32
32
  return "xs";
33
33
  }
34
- function J(e, t = {}, n = []) {
34
+ function X(e, t = {}, n = []) {
35
35
  Array.isArray(n) || (n = [n]);
36
36
  const i = document.createElement(e);
37
37
  for (const r in t)
@@ -40,16 +40,16 @@ function J(e, t = {}, n = []) {
40
40
  i.append(typeof r == "string" ? document.createTextNode(r) : r);
41
41
  return i;
42
42
  }
43
- class P {
43
+ class C {
44
44
  /**
45
45
  *
46
46
  * @param delay Debounce delay in milliseconds
47
47
  * @param max_delay Maximum delay in milliseconds, if false then no maximum delay is applied
48
48
  */
49
49
  constructor(t, n = !1) {
50
- c(this, "timeout", null);
51
- c(this, "startTimeWithMs", 0);
52
- c(this, "maxTimeout", null);
50
+ m(this, "timeout", null);
51
+ m(this, "startTimeWithMs", 0);
52
+ m(this, "maxTimeout", null);
53
53
  this.delay = t, this.max_delay = n;
54
54
  }
55
55
  async wait() {
@@ -70,25 +70,25 @@ class P {
70
70
  this.timeout && (clearTimeout(this.timeout), this.timeout = null), this.maxTimeout && (clearTimeout(this.maxTimeout), this.maxTimeout = null), this.startTimeWithMs = 0, t();
71
71
  };
72
72
  if (this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(i, this.delay), this.max_delay !== !1 && !this.maxTimeout) {
73
- const r = n - this.startTimeWithMs, a = Math.max(0, this.max_delay - r);
74
- this.maxTimeout = setTimeout(i, a);
73
+ const r = n - this.startTimeWithMs, o = Math.max(0, this.max_delay - r);
74
+ this.maxTimeout = setTimeout(i, o);
75
75
  }
76
76
  }
77
77
  }
78
- function X(e, t = !1) {
78
+ function Q(e, t = !1) {
79
79
  const n = /* @__PURE__ */ new WeakMap();
80
80
  return function(i, r) {
81
81
  if (r.kind !== "method") return i;
82
- const a = r.name;
83
- return function(...u) {
82
+ const o = r.name;
83
+ return function(...c) {
84
84
  let s = n.get(this);
85
85
  s || (s = /* @__PURE__ */ new Map(), n.set(this, s));
86
- let o = s.get(a);
87
- o || (o = new P(e, t), s.set(a, o)), o.debounce(() => i.apply(this, u));
86
+ let a = s.get(o);
87
+ a || (a = new C(e, t), s.set(o, a)), a.debounce(() => i.apply(this, c));
88
88
  };
89
89
  };
90
90
  }
91
- function Q(e) {
91
+ function Y(e) {
92
92
  if (typeof e.lineNumber == "number")
93
93
  return {
94
94
  file: e.fileName || e.sourceURL,
@@ -104,13 +104,13 @@ function Q(e) {
104
104
  const n = String(e.stack || e.message || "").split(`
105
105
  `), i = /(.*?)(?:\(|@)?(.*?):(\d+):(\d+)\)?$/;
106
106
  for (const r of n) {
107
- const a = r.match(i);
108
- if (a)
109
- return { file: a[2], line: +a[3], column: +a[4] };
107
+ const o = r.match(i);
108
+ if (o)
109
+ return { file: o[2], line: +o[3], column: +o[4] };
110
110
  }
111
111
  return { file: e.fileName || e.sourceURL };
112
112
  }
113
- class j {
113
+ class V {
114
114
  constructor(t, n, i, r = "main") {
115
115
  this._debug = t, this.myTag = n, this.myElementId = i, this.instanceId = r;
116
116
  }
@@ -131,13 +131,13 @@ class j {
131
131
  throw this.error(...t), new Error(n);
132
132
  }
133
133
  }
134
- class Y {
134
+ class Z {
135
135
  constructor(t, n = !0) {
136
- c(this, "label");
137
- c(this, "last");
138
- c(this, "startTime");
139
- c(this, "running", !1);
140
- c(this, "enabled");
136
+ m(this, "label");
137
+ m(this, "last");
138
+ m(this, "startTime");
139
+ m(this, "running", !1);
140
+ m(this, "enabled");
141
141
  this.label = t, this.enabled = n, this.startTime = this.last = performance.now(), this.running = !0;
142
142
  }
143
143
  lap(t = "") {
@@ -161,10 +161,10 @@ class Y {
161
161
  return this.running;
162
162
  }
163
163
  }
164
- function V(e) {
164
+ function F(e) {
165
165
  return typeof e == "object" && e !== null && !Array.isArray(e);
166
166
  }
167
- function F(e) {
167
+ function K(e) {
168
168
  if (e != null)
169
169
  try {
170
170
  return JSON.parse(e);
@@ -172,28 +172,28 @@ function F(e) {
172
172
  return;
173
173
  }
174
174
  }
175
- function M(e) {
175
+ function P(e) {
176
176
  const t = JSON.stringify(e);
177
177
  return t === void 0 ? "null" : t;
178
178
  }
179
- function K(e, t) {
179
+ function z(e, t) {
180
180
  const n = { ...t };
181
- if (V(e))
181
+ if (F(e))
182
182
  for (const i of Object.keys(t))
183
183
  i in e && (n[i] = e[i]);
184
184
  return n;
185
185
  }
186
- class C {
186
+ class A {
187
187
  constructor(t, n, i) {
188
- c(this, "cache");
188
+ m(this, "cache");
189
189
  this.backend = t, this.storageKey = n, this.initialValue = i;
190
190
  }
191
191
  read() {
192
192
  if (this.cache) return this.cache;
193
- const t = this.backend ? F(this.backend.getItem(this.storageKey)) : void 0, n = K(t, this.initialValue);
193
+ const t = this.backend ? K(this.backend.getItem(this.storageKey)) : void 0, n = z(t, this.initialValue);
194
194
  if (this.backend && this.backend.getItem(this.storageKey) == null)
195
195
  try {
196
- this.backend.setItem(this.storageKey, M(n));
196
+ this.backend.setItem(this.storageKey, P(n));
197
197
  } catch {
198
198
  }
199
199
  return this.cache = n, n;
@@ -201,7 +201,7 @@ class C {
201
201
  write(t) {
202
202
  if (this.cache = t, !!this.backend)
203
203
  try {
204
- this.backend.setItem(this.storageKey, M(t));
204
+ this.backend.setItem(this.storageKey, P(t));
205
205
  } catch {
206
206
  }
207
207
  }
@@ -215,15 +215,15 @@ class C {
215
215
  },
216
216
  set: (n, i, r) => {
217
217
  if (typeof i != "string") return !1;
218
- const u = { ...this.read() };
219
- return u[i] = r, this.write(u), !0;
218
+ const c = { ...this.read() };
219
+ return c[i] = r, this.write(c), !0;
220
220
  },
221
221
  deleteProperty: (n, i) => {
222
222
  if (typeof i != "string") return !1;
223
223
  const r = this.read();
224
224
  if (!(i in r)) return !0;
225
- const a = { ...r };
226
- return delete a[i], this.write(a), !0;
225
+ const o = { ...r };
226
+ return delete o[i], this.write(o), !0;
227
227
  },
228
228
  has: (n, i) => {
229
229
  if (typeof i != "string") return !1;
@@ -249,47 +249,47 @@ class C {
249
249
  return new Proxy({}, t);
250
250
  }
251
251
  }
252
- function A(e) {
252
+ function W(e) {
253
253
  const t = globalThis.window;
254
254
  return (e === "session" ? t == null ? void 0 : t.sessionStorage : t == null ? void 0 : t.localStorage) ?? void 0;
255
255
  }
256
- function Z(e, t) {
257
- return new C(A("session"), e, t).asProxy();
258
- }
259
256
  function tt(e, t) {
260
- return new C(A("local"), e, t).asProxy();
257
+ return new A(W("session"), e, t).asProxy();
258
+ }
259
+ function et(e, t) {
260
+ return new A(W("local"), e, t).asProxy();
261
261
  }
262
- function T(e, t, n) {
262
+ function L(e, t, n) {
263
263
  return new Promise((i, r) => {
264
- const a = (u) => {
265
- e.removeEventListener(t, a, n), i(u);
264
+ const o = (c) => {
265
+ e.removeEventListener(t, o, n), i(c);
266
266
  };
267
- e.addEventListener(t, a, n);
267
+ e.addEventListener(t, o, n);
268
268
  });
269
269
  }
270
- function z() {
270
+ function H() {
271
271
  return document.readyState === "loading" ? new Promise((e) => {
272
272
  document.addEventListener("DOMContentLoaded", () => e());
273
273
  }) : Promise.resolve();
274
274
  }
275
- function et() {
276
- return window.tj_loader_state ? window.tj_loader_state !== "loading" ? Promise.resolve() : T(window, "loader:ready") : L();
277
- }
278
275
  function nt() {
279
- return window.tj_loader_state ? window.tj_loader_state === "pre-visual" || window.tj_loader_state === "visual" ? Promise.resolve() : T(window, "loader:pre-visual") : L();
276
+ return window.tj_loader_state ? window.tj_loader_state !== "loading" ? Promise.resolve() : L(window, "loader:ready") : x();
280
277
  }
281
278
  function it() {
282
- return window.tj_loader_state ? window.tj_loader_state === "visual" ? Promise.resolve() : T(window, "loader:visual") : L();
279
+ return window.tj_loader_state ? window.tj_loader_state === "pre-visual" || window.tj_loader_state === "visual" ? Promise.resolve() : L(window, "loader:pre-visual") : x();
280
+ }
281
+ function rt() {
282
+ return window.tj_loader_state ? window.tj_loader_state === "visual" ? Promise.resolve() : L(window, "loader:visual") : x();
283
283
  }
284
- function L(e = window) {
284
+ function x(e = window) {
285
285
  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) => {
286
286
  e.addEventListener("load", () => t(), { once: !0 }), e.addEventListener("error", () => n(new Error("image error")), { once: !0 });
287
287
  }) : 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 }));
288
288
  }
289
- function rt(e) {
289
+ function st(e) {
290
290
  return new Promise((t) => setTimeout(t, e));
291
291
  }
292
- function st(e) {
292
+ function ot(e) {
293
293
  return new Promise((t) => {
294
294
  const n = (i) => {
295
295
  e.removeEventListener("animationend", n), t(i);
@@ -297,118 +297,118 @@ function st(e) {
297
297
  e.addEventListener("animationend", n);
298
298
  });
299
299
  }
300
- function ot(e) {
300
+ function at(e) {
301
301
  var n, i;
302
302
  class t extends e {
303
303
  constructor() {
304
304
  super(...arguments);
305
- m(this, n, new P(200, 5e3));
306
- c(this, "currentBreakPoint", null);
307
- m(this, i, async () => {
308
- var b;
309
- await d(this, n).wait(), await z();
310
- const u = this, s = window.innerWidth;
311
- let o = getComputedStyle(u).getPropertyValue("--breakpoint");
312
- if (!o || o === "")
305
+ f(this, n, new C(200, 5e3));
306
+ m(this, "currentBreakPoint", null);
307
+ f(this, i, async () => {
308
+ var y;
309
+ await l(this, n).wait(), await H();
310
+ const c = this, s = window.innerWidth;
311
+ let a = getComputedStyle(c).getPropertyValue("--breakpoint");
312
+ if (!a || a === "")
313
313
  return;
314
- o = o.trim().replace(/^['"]|['"]$/g, "");
315
- const l = o.split(","), h = l[0].trim(), f = ((b = l[1]) == null ? void 0 : b.trim()) ?? h, g = U(s);
316
- this.currentBreakPoint !== g && (E(f) <= E(g) ? u.setAttribute("mode", "desktop") : E(h) > E(g) ? u.setAttribute("mode", "mobile") : u.setAttribute("mode", "tablet"));
314
+ a = a.trim().replace(/^['"]|['"]$/g, "");
315
+ const u = a.split(","), d = u[0].trim(), h = ((y = u[1]) == null ? void 0 : y.trim()) ?? d, g = j(s);
316
+ this.currentBreakPoint !== g && (E(h) <= E(g) ? c.setAttribute("mode", "desktop") : E(d) > E(g) ? c.setAttribute("mode", "mobile") : c.setAttribute("mode", "tablet"));
317
317
  });
318
318
  }
319
319
  connectedCallback() {
320
320
  super.connectedCallback();
321
321
  try {
322
- d(this, i).call(this), window.addEventListener("resize", d(this, i)), d(this, i).call(this);
323
- } catch (u) {
324
- throw console.error("Error in BreakPointMixin:", u, "in element", this), u;
322
+ l(this, i).call(this), window.addEventListener("resize", l(this, i)), l(this, i).call(this);
323
+ } catch (c) {
324
+ throw console.error("Error in BreakPointMixin:", c, "in element", this), c;
325
325
  }
326
326
  }
327
327
  disconnectedCallback() {
328
- super.disconnectedCallback(), window.removeEventListener("resize", d(this, i));
328
+ super.disconnectedCallback(), window.removeEventListener("resize", l(this, i));
329
329
  }
330
330
  }
331
331
  return n = new WeakMap(), i = new WeakMap(), t;
332
332
  }
333
- const p = Symbol("listenerDefs"), W = Symbol("withEventBindings");
334
- function at(e, t) {
333
+ const p = Symbol("listenerDefs"), $ = Symbol("withEventBindings");
334
+ function ut(e, t) {
335
335
  const n = Array.isArray(e) ? e : [e];
336
336
  return function(i, r) {
337
337
  if (r.kind !== "method") throw new Error("@Listen nur für Methoden");
338
338
  return r.addInitializer(function() {
339
- const a = this;
340
- (a[p] || (a[p] = [])).push({
339
+ const o = this;
340
+ (o[p] || (o[p] = [])).push({
341
341
  method: r.name,
342
342
  events: [...n],
343
343
  opts: t
344
344
  });
345
- }), function(...a) {
346
- if (!this[W])
345
+ }), function(...o) {
346
+ if (!this[$])
347
347
  throw new Error("[EventBindings] @Listen - decorator requires EventBindingMixin.");
348
- return i.apply(this, a);
348
+ return i.apply(this, o);
349
349
  };
350
350
  };
351
351
  }
352
- function H(e, t) {
352
+ function G(e, t) {
353
353
  var n;
354
354
  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;
355
355
  }
356
356
  function dt(e) {
357
- var n, i, $;
357
+ var n, i, I;
358
358
  class t extends e {
359
359
  constructor(...s) {
360
360
  super(...s);
361
- m(this, i);
362
- m(this, n);
363
- this[W] = !0;
361
+ f(this, i);
362
+ f(this, n);
363
+ this[$] = !0;
364
364
  }
365
365
  connectedCallback() {
366
366
  var s;
367
- (s = super.connectedCallback) == null || s.call(this), y(this, i, $).call(this);
367
+ (s = super.connectedCallback) == null || s.call(this), w(this, i, I).call(this);
368
368
  }
369
369
  disconnectedCallback() {
370
- var s, o;
371
- (s = d(this, n)) == null || s.abort(), (o = super.disconnectedCallback) == null || o.call(this);
370
+ var s, a;
371
+ (s = l(this, n)) == null || s.abort(), (a = super.disconnectedCallback) == null || a.call(this);
372
372
  }
373
373
  }
374
- return n = new WeakMap(), i = new WeakSet(), $ = function() {
375
- var o, l, h;
376
- (o = d(this, n)) == null || o.abort(), w(this, n, new AbortController());
374
+ return n = new WeakMap(), i = new WeakSet(), I = function() {
375
+ var a, u, d;
376
+ (a = l(this, n)) == null || a.abort(), b(this, n, new AbortController());
377
377
  const s = this[p] || [];
378
- for (const f of s) {
379
- const g = H(this, (l = f.opts) == null ? void 0 : l.target), b = ((h = f.opts) == null ? void 0 : h.options) ?? {}, S = this[f.method].bind(this);
380
- for (const B of f.events)
381
- g.addEventListener(B, S, { ...b, signal: d(this, n).signal });
378
+ for (const h of s) {
379
+ const g = G(this, (u = h.opts) == null ? void 0 : u.target), y = ((d = h.opts) == null ? void 0 : d.options) ?? {}, D = this[h.method].bind(this);
380
+ for (const R of h.events)
381
+ g.addEventListener(R, D, { ...y, signal: l(this, n).signal });
382
382
  }
383
383
  }, t;
384
384
  }
385
- let G = 1;
386
- function ut(e) {
385
+ let q = 1;
386
+ function lt(e) {
387
387
  var n, i, r;
388
388
  class t extends e {
389
389
  constructor() {
390
390
  super(...arguments);
391
- m(this, n, null);
392
- m(this, i, G++);
393
- m(this, r, null);
391
+ f(this, n, null);
392
+ f(this, i, q++);
393
+ f(this, r, null);
394
394
  }
395
395
  /**
396
396
  * Clears the cached debug flag so the attribute will be checked again
397
397
  * on the next log/warn/error call.
398
398
  */
399
399
  invalidateDebugCache() {
400
- w(this, n, null);
400
+ b(this, n, null);
401
401
  }
402
402
  get _debug() {
403
- return d(this, n) !== null ? d(this, n) : (this instanceof HTMLElement && w(this, n, this.hasAttribute("debug") && !["false", "0", "off", "no"].includes(this.getAttribute("debug") || "")), d(this, n) === !0 && console.info(
403
+ return l(this, n) !== null ? l(this, n) : (this instanceof HTMLElement && b(this, n, this.hasAttribute("debug") && !["false", "0", "off", "no"].includes(this.getAttribute("debug") || "")), l(this, n) === !0 && console.info(
404
404
  // @ts-expect-error - it says tagName is not defined -whatever
405
- `[DEBUG][ID:${d(this, i)}] LoggingMixin: Debug mode is enabled for <${this.tagName}>`,
405
+ `[DEBUG][ID:${l(this, i)}] LoggingMixin: Debug mode is enabled for <${this.tagName}>`,
406
406
  this
407
- ), d(this, n) ?? !1);
407
+ ), l(this, n) ?? !1);
408
408
  }
409
409
  getLogger(s = "main") {
410
- const o = "<" + (this.tagName || this.constructor.name || "UnknownElement") + ">";
411
- return d(this, r) || w(this, r, new j(this._debug, o, `${d(this, i)}`, s)), d(this, r);
410
+ const a = "<" + (this.tagName || this.constructor.name || "UnknownElement") + ">";
411
+ return l(this, r) || b(this, r, new V(this._debug, a, `${l(this, i)}`, s)), l(this, r);
412
412
  }
413
413
  debug(...s) {
414
414
  this.getLogger().debug(...s);
@@ -428,7 +428,7 @@ function ut(e) {
428
428
  }
429
429
  return n = new WeakMap(), i = new WeakMap(), r = new WeakMap(), t;
430
430
  }
431
- function lt(e) {
431
+ function ct(e) {
432
432
  class t extends e {
433
433
  connectedCallback() {
434
434
  this.dispatchEvent(
@@ -470,58 +470,60 @@ function lt(e) {
470
470
  }
471
471
  return t;
472
472
  }
473
- function ct(e) {
474
- var n, I, r, N;
473
+ function ht(e) {
474
+ var n, N, r, k, S;
475
475
  class t extends e {
476
476
  constructor() {
477
477
  super(...arguments);
478
- m(this, n);
479
- m(this, r, (o) => {
480
- const l = o.target;
481
- l.assignedNodes({ flatten: !0 }).filter((g) => y(this, n, N).call(this, g)).length > 0 || l.childNodes.length > 0 ? l.classList.remove("slot-empty") : l.classList.add("slot-empty");
478
+ f(this, n);
479
+ f(this, r, (u) => {
480
+ const d = u.target, h = w(this, n, k).call(this, d.assignedNodes({ flatten: !0 })), g = w(this, n, k).call(this, d.childNodes);
481
+ h || g ? d.classList.remove("slot-empty") : d.classList.add("slot-empty");
482
482
  });
483
483
  }
484
- firstUpdated(o) {
485
- var l;
486
- (l = super.firstUpdated) == null || l.call(this, o), y(this, n, I).call(this);
484
+ firstUpdated(u) {
485
+ var d;
486
+ (d = super.firstUpdated) == null || d.call(this, u), w(this, n, N).call(this);
487
487
  }
488
488
  }
489
- return n = new WeakSet(), I = function() {
490
- var l;
491
- const o = (l = this.shadowRoot) == null ? void 0 : l.querySelectorAll("slot");
492
- o == null || o.forEach((h) => {
493
- h.childNodes.length === 0 && h.classList.add("slot-empty"), h.addEventListener("slotchange", (f) => d(this, r).call(this, f));
489
+ return n = new WeakSet(), N = function() {
490
+ var d;
491
+ const u = (d = this.shadowRoot) == null ? void 0 : d.querySelectorAll("slot");
492
+ u == null || u.forEach((h) => {
493
+ w(this, n, k).call(this, h.childNodes) || h.classList.add("slot-empty"), h.addEventListener("slotchange", (g) => l(this, r).call(this, g));
494
494
  });
495
- }, r = new WeakMap(), N = function(o) {
496
- return o.nodeType === Node.TEXT_NODE ? (o.textContent || "").trim().length > 0 : o.nodeType === Node.ELEMENT_NODE;
495
+ }, r = new WeakMap(), k = function(u) {
496
+ return Array.from(u).some((d) => w(this, n, S).call(this, d));
497
+ }, S = function(u) {
498
+ return u.nodeType === Node.TEXT_NODE ? (u.textContent || "").trim().length > 0 : u.nodeType === Node.ELEMENT_NODE;
497
499
  }, t;
498
500
  }
499
501
  export {
500
- ot as BreakPointMixin,
501
- P as Debouncer,
502
+ at as BreakPointMixin,
503
+ C as Debouncer,
502
504
  dt as EventBindingsMixin,
503
- at as Listen,
504
- lt as LoaderMixin,
505
- j as Logger,
506
- ut as LoggingMixin,
507
- ct as SlotVisibilityMixin,
508
- Y as Stopwatch,
509
- _ as breakpointMap,
505
+ ut as Listen,
506
+ ct as LoaderMixin,
507
+ V as Logger,
508
+ lt as LoggingMixin,
509
+ ht as SlotVisibilityMixin,
510
+ Z as Stopwatch,
511
+ M as breakpointMap,
510
512
  v as breakpoints,
511
- J as create_element,
512
- X as debounce,
513
+ X as create_element,
514
+ Q as debounce,
513
515
  E as getBreakpointMinWidth,
514
- U as getCurrentBreakpoint,
515
- Q as getErrorLocation,
516
- O as getViewportWidth,
517
- tt as local_storage,
518
- Z as session_storage,
519
- rt as sleep,
520
- T as waitFor,
521
- st as waitForAnimationEnd,
522
- z as waitForDomContentLoaded,
523
- L as waitForLoad,
524
- nt as waitForPreVisual,
525
- et as waitForReady,
526
- it as waitForVisual
516
+ j as getCurrentBreakpoint,
517
+ Y as getErrorLocation,
518
+ U as getViewportWidth,
519
+ et as local_storage,
520
+ tt as session_storage,
521
+ st as sleep,
522
+ L as waitFor,
523
+ ot as waitForAnimationEnd,
524
+ H as waitForDomContentLoaded,
525
+ x as waitForLoad,
526
+ it as waitForPreVisual,
527
+ nt as waitForReady,
528
+ rt as waitForVisual
527
529
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trunkjs/browser-utils",
3
- "version": "1.0.49",
3
+ "version": "1.0.50",
4
4
  "main": "./index.js",
5
5
  "repository": {
6
6
  "directory": "packages/browser-utils",