@stonecrop/utilities 0.4.6 → 0.4.7

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.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.48.0"
8
+ "packageVersion": "7.50.1"
9
9
  }
10
10
  ]
11
11
  }
package/dist/utilities.js CHANGED
@@ -1,134 +1,205 @@
1
- import { getCurrentScope as W, onScopeDispose as K, unref as V, computed as w, ref as $, watch as T, getCurrentInstance as F, onMounted as U, onBeforeUnmount as j } from "vue";
2
- function I(e) {
3
- return W() ? (K(e), !0) : !1;
4
- }
1
+ import { watch as T, getCurrentScope as K, onScopeDispose as V, computed as y, shallowRef as N, toValue as $, ref as k, watchEffect as j, unref as B, getCurrentInstance as q, onMounted as F, onBeforeUnmount as G } from "vue";
5
2
  function A(e) {
6
- return typeof e == "function" ? e() : V(e);
3
+ return K() ? (V(e), !0) : !1;
7
4
  }
8
- const B = typeof window < "u" && typeof document < "u";
5
+ const z = typeof window < "u" && typeof document < "u";
9
6
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
10
- const q = (e) => e != null, G = Object.prototype.toString, z = (e) => G.call(e) === "[object Object]", J = () => {
11
- }, v = B ? window : void 0;
12
- function h(e) {
7
+ const J = (e) => e != null, Q = Object.prototype.toString, X = (e) => Q.call(e) === "[object Object]", Y = () => {
8
+ };
9
+ function S(e) {
10
+ return Array.isArray(e) ? e : [e];
11
+ }
12
+ function Z(e, t, n) {
13
+ return T(
14
+ e,
15
+ t,
16
+ {
17
+ ...n,
18
+ immediate: !0
19
+ }
20
+ );
21
+ }
22
+ const C = z ? window : void 0;
23
+ function v(e) {
13
24
  var t;
14
- const n = A(e);
25
+ const n = $(e);
15
26
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
16
27
  }
17
- function y(...e) {
18
- let t, n, o, c;
19
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, c] = e, t = v) : [t, n, o, c] = e, !t)
20
- return J;
21
- Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
22
- const r = [], l = () => {
23
- r.forEach((s) => s()), r.length = 0;
24
- }, i = (s, p, u, d) => (s.addEventListener(p, u, d), () => s.removeEventListener(p, u, d)), a = T(
25
- () => [h(t), A(c)],
26
- ([s, p]) => {
27
- if (l(), !s)
28
+ function b(...e) {
29
+ const t = [], n = () => {
30
+ t.forEach((s) => s()), t.length = 0;
31
+ }, o = (s, i, u, c) => (s.addEventListener(i, u, c), () => s.removeEventListener(i, u, c)), a = y(() => {
32
+ const s = S($(e[0])).filter((i) => i != null);
33
+ return s.every((i) => typeof i != "string") ? s : void 0;
34
+ }), r = Z(
35
+ () => {
36
+ var s, i;
37
+ return [
38
+ (i = (s = a.value) == null ? void 0 : s.map((u) => v(u))) != null ? i : [C].filter((u) => u != null),
39
+ S($(a.value ? e[1] : e[0])),
40
+ S(B(a.value ? e[2] : e[1])),
41
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
42
+ $(a.value ? e[3] : e[2])
43
+ ];
44
+ },
45
+ ([s, i, u, c]) => {
46
+ if (n(), !(s != null && s.length) || !(i != null && i.length) || !(u != null && u.length))
28
47
  return;
29
- const u = z(p) ? { ...p } : p;
30
- r.push(
31
- ...n.flatMap((d) => o.map((C) => i(s, d, C, u)))
48
+ const p = X(c) ? { ...c } : c;
49
+ t.push(
50
+ ...s.flatMap(
51
+ (f) => i.flatMap(
52
+ (d) => u.map((m) => o(f, d, m, p))
53
+ )
54
+ )
32
55
  );
33
56
  },
34
- { immediate: !0, flush: "post" }
35
- ), f = () => {
36
- a(), l();
57
+ { flush: "post" }
58
+ ), l = () => {
59
+ r(), n();
37
60
  };
38
- return I(f), f;
61
+ return A(n), l;
39
62
  }
40
- function Q() {
41
- const e = $(!1), t = F();
42
- return t && U(() => {
63
+ function ee() {
64
+ const e = N(!1), t = q();
65
+ return t && F(() => {
43
66
  e.value = !0;
44
67
  }, t), e;
45
68
  }
46
- function X(e) {
47
- const t = Q();
48
- return w(() => (t.value, !!e()));
69
+ function te(e) {
70
+ const t = ee();
71
+ return y(() => (t.value, !!e()));
49
72
  }
50
- function Y(e, t, n = {}) {
51
- const { window: o = v, ...c } = n;
73
+ function ne(e, t, n = {}) {
74
+ const { window: o = C, ...a } = n;
52
75
  let r;
53
- const l = X(() => o && "MutationObserver" in o), i = () => {
76
+ const l = te(() => o && "MutationObserver" in o), s = () => {
54
77
  r && (r.disconnect(), r = void 0);
55
- }, a = w(() => {
56
- const u = A(e), d = (Array.isArray(u) ? u : [u]).map(h).filter(q);
78
+ }, i = y(() => {
79
+ const f = $(e), d = S(f).map(v).filter(J);
57
80
  return new Set(d);
58
- }), f = T(
59
- () => a.value,
60
- (u) => {
61
- i(), l.value && u.size && (r = new MutationObserver(t), u.forEach((d) => r.observe(d, c)));
81
+ }), u = T(
82
+ () => i.value,
83
+ (f) => {
84
+ s(), l.value && f.size && (r = new MutationObserver(t), f.forEach((d) => r.observe(d, a)));
62
85
  },
63
86
  { immediate: !0, flush: "post" }
64
- ), s = () => r == null ? void 0 : r.takeRecords(), p = () => {
65
- f(), i();
87
+ ), c = () => r == null ? void 0 : r.takeRecords(), p = () => {
88
+ u(), s();
66
89
  };
67
- return I(p), {
90
+ return A(p), {
68
91
  isSupported: l,
69
92
  stop: p,
70
- takeRecords: s
93
+ takeRecords: c
94
+ };
95
+ }
96
+ function oe(e, t, n = {}) {
97
+ const {
98
+ window: o = C,
99
+ document: a = o == null ? void 0 : o.document,
100
+ flush: r = "sync"
101
+ } = n;
102
+ if (!o || !a)
103
+ return Y;
104
+ let l;
105
+ const s = (c) => {
106
+ l == null || l(), l = c;
107
+ }, i = j(() => {
108
+ const c = v(e);
109
+ if (c) {
110
+ const { stop: p } = ne(
111
+ a,
112
+ (f) => {
113
+ f.map((m) => [...m.removedNodes]).flat().some((m) => m === c || m.contains(c)) && t(f);
114
+ },
115
+ {
116
+ window: o,
117
+ childList: !0,
118
+ subtree: !0
119
+ }
120
+ );
121
+ s(p);
122
+ }
123
+ }, { flush: r }), u = () => {
124
+ i(), s();
71
125
  };
126
+ return A(u), u;
72
127
  }
73
- function Z(e = {}) {
128
+ function le(e = {}) {
74
129
  var t;
75
130
  const {
76
- window: n = v,
131
+ window: n = C,
77
132
  deep: o = !0,
78
- triggerOnRemoval: c = !1
133
+ triggerOnRemoval: a = !1
79
134
  } = e, r = (t = e.document) != null ? t : n == null ? void 0 : n.document, l = () => {
80
- var f;
81
- let s = r == null ? void 0 : r.activeElement;
135
+ var u;
136
+ let c = r == null ? void 0 : r.activeElement;
82
137
  if (o)
83
- for (; s != null && s.shadowRoot; )
84
- s = (f = s == null ? void 0 : s.shadowRoot) == null ? void 0 : f.activeElement;
85
- return s;
86
- }, i = $(), a = () => {
87
- i.value = l();
138
+ for (; c != null && c.shadowRoot; )
139
+ c = (u = c == null ? void 0 : c.shadowRoot) == null ? void 0 : u.activeElement;
140
+ return c;
141
+ }, s = k(), i = () => {
142
+ s.value = l();
88
143
  };
89
- return n && (y(n, "blur", (f) => {
90
- f.relatedTarget === null && a();
91
- }, !0), y(n, "focus", a, !0)), c && Y(r, (f) => {
92
- f.filter((s) => s.removedNodes.length).map((s) => Array.from(s.removedNodes)).flat().forEach((s) => {
93
- s === i.value && a();
94
- });
95
- }, {
96
- childList: !0,
97
- subtree: !0
98
- }), a(), i;
144
+ if (n) {
145
+ const u = {
146
+ capture: !0,
147
+ passive: !0
148
+ };
149
+ b(
150
+ n,
151
+ "blur",
152
+ (c) => {
153
+ c.relatedTarget === null && i();
154
+ },
155
+ u
156
+ ), b(
157
+ n,
158
+ "focus",
159
+ i,
160
+ u
161
+ );
162
+ }
163
+ return a && oe(s, i, { document: r }), i(), s;
99
164
  }
100
- const ee = "focusin", te = "focusout";
101
- function ne(e, t = {}) {
102
- const { window: n = v } = t, o = w(() => h(e)), c = $(!1), r = w(() => c.value), l = Z(t);
103
- return !n || !l.value ? { focused: r } : (y(o, ee, () => c.value = !0), y(o, te, () => c.value = !1), { focused: r });
165
+ const se = "focusin", re = "focusout", ie = ":focus-within";
166
+ function ce(e, t = {}) {
167
+ const { window: n = C } = t, o = y(() => v(e)), a = N(!1), r = y(() => a.value), l = le(t);
168
+ if (!n || !l.value)
169
+ return { focused: r };
170
+ const s = { passive: !0 };
171
+ return b(o, se, () => a.value = !0, s), b(o, re, () => {
172
+ var i, u, c;
173
+ return a.value = (c = (u = (i = o.value) == null ? void 0 : i.matches) == null ? void 0 : u.call(i, ie)) != null ? c : !1;
174
+ }, s), { focused: r };
104
175
  }
105
- function oe(e, { window: t = v, scrollTarget: n } = {}) {
106
- const o = $(!1), c = () => {
176
+ function ae(e, { window: t = C, scrollTarget: n } = {}) {
177
+ const o = k(!1), a = () => {
107
178
  if (!t) return;
108
- const r = t.document, l = h(e);
179
+ const r = t.document, l = v(e);
109
180
  if (!l)
110
181
  o.value = !1;
111
182
  else {
112
- const i = l.getBoundingClientRect();
113
- o.value = i.top <= (t.innerHeight || r.documentElement.clientHeight) && i.left <= (t.innerWidth || r.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;
183
+ const s = l.getBoundingClientRect();
184
+ o.value = s.top <= (t.innerHeight || r.documentElement.clientHeight) && s.left <= (t.innerWidth || r.documentElement.clientWidth) && s.bottom >= 0 && s.right >= 0;
114
185
  }
115
186
  };
116
187
  return T(
117
- () => h(e),
118
- () => c(),
188
+ () => v(e),
189
+ () => a(),
119
190
  { immediate: !0, flush: "post" }
120
- ), t && y(n || t, "scroll", c, {
191
+ ), t && b(n || t, "scroll", a, {
121
192
  capture: !1,
122
193
  passive: !0
123
194
  }), o;
124
195
  }
125
- const m = (e) => {
126
- let t = oe(e).value;
196
+ const g = (e) => {
197
+ let t = ae(e).value;
127
198
  return t = t && e.offsetHeight > 0, t;
128
- }, g = (e) => e.tabIndex >= 0, D = (e) => {
199
+ }, E = (e) => e.tabIndex >= 0, P = (e) => {
129
200
  const t = e.target;
130
- return M(t);
131
- }, M = (e) => {
201
+ return L(t);
202
+ }, L = (e) => {
132
203
  var n;
133
204
  let t;
134
205
  if (e instanceof HTMLTableCellElement) {
@@ -141,29 +212,29 @@ const m = (e) => {
141
212
  const o = e.previousElementSibling;
142
213
  o && (t = o);
143
214
  }
144
- return t && (!g(t) || !m(t)) ? M(t) : t;
145
- }, le = (e) => {
215
+ return t && (!E(t) || !g(t)) ? L(t) : t;
216
+ }, ue = (e) => {
146
217
  var o;
147
218
  const t = e.target;
148
219
  let n;
149
220
  if (t instanceof HTMLTableCellElement) {
150
- const c = (o = t.parentElement) == null ? void 0 : o.parentElement;
151
- if (c) {
152
- const r = c.firstElementChild, l = r == null ? void 0 : r.children[t.cellIndex];
221
+ const a = (o = t.parentElement) == null ? void 0 : o.parentElement;
222
+ if (a) {
223
+ const r = a.firstElementChild, l = r == null ? void 0 : r.children[t.cellIndex];
153
224
  l && (n = l);
154
225
  }
155
226
  } else if (t instanceof HTMLTableRowElement) {
156
- const c = t.parentElement;
157
- if (c) {
158
- const r = c.firstElementChild;
227
+ const a = t.parentElement;
228
+ if (a) {
229
+ const r = a.firstElementChild;
159
230
  r && (n = r);
160
231
  }
161
232
  }
162
- return n && (!g(n) || !m(n)) ? k(n) : n;
163
- }, P = (e) => {
233
+ return n && (!E(n) || !g(n)) ? H(n) : n;
234
+ }, O = (e) => {
164
235
  const t = e.target;
165
- return k(t);
166
- }, k = (e) => {
236
+ return H(t);
237
+ }, H = (e) => {
167
238
  var n;
168
239
  let t;
169
240
  if (e instanceof HTMLTableCellElement) {
@@ -176,29 +247,29 @@ const m = (e) => {
176
247
  const o = e.nextElementSibling;
177
248
  o && (t = o);
178
249
  }
179
- return t && (!g(t) || !m(t)) ? k(t) : t;
180
- }, re = (e) => {
250
+ return t && (!E(t) || !g(t)) ? H(t) : t;
251
+ }, fe = (e) => {
181
252
  var o;
182
253
  const t = e.target;
183
254
  let n;
184
255
  if (t instanceof HTMLTableCellElement) {
185
- const c = (o = t.parentElement) == null ? void 0 : o.parentElement;
186
- if (c) {
187
- const r = c.lastElementChild, l = r == null ? void 0 : r.children[t.cellIndex];
256
+ const a = (o = t.parentElement) == null ? void 0 : o.parentElement;
257
+ if (a) {
258
+ const r = a.lastElementChild, l = r == null ? void 0 : r.children[t.cellIndex];
188
259
  l && (n = l);
189
260
  }
190
261
  } else if (t instanceof HTMLTableRowElement) {
191
- const c = t.parentElement;
192
- if (c) {
193
- const r = c.lastElementChild;
262
+ const a = t.parentElement;
263
+ if (a) {
264
+ const r = a.lastElementChild;
194
265
  r && (n = r);
195
266
  }
196
267
  }
197
- return n && (!g(n) || !m(n)) ? M(n) : n;
198
- }, R = (e) => {
268
+ return n && (!E(n) || !g(n)) ? L(n) : n;
269
+ }, U = (e) => {
199
270
  const t = e.target;
200
- return L(t);
201
- }, L = (e) => {
271
+ return D(t);
272
+ }, D = (e) => {
202
273
  var n;
203
274
  let t;
204
275
  if (e.previousElementSibling)
@@ -207,11 +278,11 @@ const m = (e) => {
207
278
  const o = (n = e.parentElement) == null ? void 0 : n.previousElementSibling;
208
279
  t = o == null ? void 0 : o.lastElementChild;
209
280
  }
210
- return t && (!g(t) || !m(t)) ? L(t) : t;
211
- }, O = (e) => {
281
+ return t && (!E(t) || !g(t)) ? D(t) : t;
282
+ }, _ = (e) => {
212
283
  const t = e.target;
213
- return H(t);
214
- }, H = (e) => {
284
+ return R(t);
285
+ }, R = (e) => {
215
286
  var n;
216
287
  let t;
217
288
  if (e.nextElementSibling)
@@ -220,152 +291,152 @@ const m = (e) => {
220
291
  const o = (n = e.parentElement) == null ? void 0 : n.nextElementSibling;
221
292
  t = o == null ? void 0 : o.firstElementChild;
222
293
  }
223
- return t && (!g(t) || !m(t)) ? H(t) : t;
224
- }, _ = (e) => {
294
+ return t && (!E(t) || !g(t)) ? R(t) : t;
295
+ }, I = (e) => {
225
296
  const n = e.target.parentElement, o = n == null ? void 0 : n.firstElementChild;
226
- return o && (!g(o) || !m(o)) ? H(o) : o;
227
- }, N = (e) => {
297
+ return o && (!E(o) || !g(o)) ? R(o) : o;
298
+ }, W = (e) => {
228
299
  const n = e.target.parentElement, o = n == null ? void 0 : n.lastElementChild;
229
- return o && (!g(o) || !m(o)) ? L(o) : o;
230
- }, b = ["alt", "control", "shift", "meta"], se = {
300
+ return o && (!E(o) || !g(o)) ? D(o) : o;
301
+ }, w = ["alt", "control", "shift", "meta"], pe = {
231
302
  ArrowUp: "up",
232
303
  ArrowDown: "down",
233
304
  ArrowLeft: "left",
234
305
  ArrowRight: "right"
235
- }, ie = {
306
+ }, de = {
236
307
  "keydown.up": (e) => {
237
- const t = D(e);
308
+ const t = P(e);
238
309
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
239
310
  },
240
311
  "keydown.down": (e) => {
241
- const t = P(e);
312
+ const t = O(e);
242
313
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
243
314
  },
244
315
  "keydown.left": (e) => {
245
- const t = R(e);
316
+ const t = U(e);
246
317
  e.preventDefault(), e.stopPropagation(), t && t.focus();
247
318
  },
248
319
  "keydown.right": (e) => {
249
- const t = O(e);
320
+ const t = _(e);
250
321
  e.preventDefault(), e.stopPropagation(), t && t.focus();
251
322
  },
252
323
  "keydown.control.up": (e) => {
253
- const t = le(e);
324
+ const t = ue(e);
254
325
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
255
326
  },
256
327
  "keydown.control.down": (e) => {
257
- const t = re(e);
328
+ const t = fe(e);
258
329
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
259
330
  },
260
331
  "keydown.control.left": (e) => {
261
- const t = _(e);
332
+ const t = I(e);
262
333
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
263
334
  },
264
335
  "keydown.control.right": (e) => {
265
- const t = N(e);
336
+ const t = W(e);
266
337
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
267
338
  },
268
339
  "keydown.end": (e) => {
269
- const t = N(e);
340
+ const t = W(e);
270
341
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
271
342
  },
272
343
  "keydown.enter": (e) => {
273
344
  if (e.target instanceof HTMLTableCellElement) {
274
345
  e.preventDefault(), e.stopPropagation();
275
- const n = P(e);
346
+ const n = O(e);
276
347
  n && n.focus();
277
348
  }
278
349
  },
279
350
  "keydown.shift.enter": (e) => {
280
351
  if (e.target instanceof HTMLTableCellElement) {
281
352
  e.preventDefault(), e.stopPropagation();
282
- const n = D(e);
353
+ const n = P(e);
283
354
  n && n.focus();
284
355
  }
285
356
  },
286
357
  "keydown.home": (e) => {
287
- const t = _(e);
358
+ const t = I(e);
288
359
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
289
360
  },
290
361
  "keydown.tab": (e) => {
291
- const t = O(e);
362
+ const t = _(e);
292
363
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
293
364
  },
294
365
  "keydown.shift.tab": (e) => {
295
- const t = R(e);
366
+ const t = U(e);
296
367
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
297
368
  }
298
369
  };
299
- function ae(e) {
370
+ function ge(e) {
300
371
  const t = (l) => {
301
- let i = null;
302
- return l.parent && (typeof l.parent == "string" ? i = document.querySelector(l.parent) : l.parent instanceof HTMLElement ? i = l.parent : i = l.parent.value), i;
372
+ let s = null;
373
+ return l.parent && (typeof l.parent == "string" ? s = document.querySelector(l.parent) : l.parent instanceof HTMLElement ? s = l.parent : s = l.parent.value), s;
303
374
  }, n = (l) => {
304
- var f;
305
- const i = t(l);
306
- let a = [];
375
+ var u;
376
+ const s = t(l);
377
+ let i = [];
307
378
  if (typeof l.selectors == "string")
308
- a = i ? Array.from(i.querySelectorAll(l.selectors)) : Array.from(document.querySelectorAll(l.selectors));
379
+ i = s ? Array.from(s.querySelectorAll(l.selectors)) : Array.from(document.querySelectorAll(l.selectors));
309
380
  else if (Array.isArray(l.selectors))
310
- for (const s of l.selectors)
311
- s instanceof HTMLElement ? a.push(s) : a.push(s.$el);
381
+ for (const c of l.selectors)
382
+ c instanceof HTMLElement ? i.push(c) : i.push(c.$el);
312
383
  else if (l.selectors instanceof HTMLElement)
313
- a.push(l.selectors);
314
- else if ((f = l.selectors) != null && f.value)
384
+ i.push(l.selectors);
385
+ else if ((u = l.selectors) != null && u.value)
315
386
  if (Array.isArray(l.selectors.value))
316
- for (const s of l.selectors.value)
317
- s instanceof HTMLElement ? a.push(s) : a.push(s.$el);
387
+ for (const c of l.selectors.value)
388
+ c instanceof HTMLElement ? i.push(c) : i.push(c.$el);
318
389
  else
319
- a.push(l.selectors.value);
320
- return a;
390
+ i.push(l.selectors.value);
391
+ return i;
321
392
  }, o = (l) => {
322
- const i = t(l);
323
- let a = [];
324
- return l.selectors ? a = n(l) : i && (a = Array.from(i.children).filter((s) => g(s) && m(s))), a;
325
- }, c = (l) => (i) => {
326
- const a = se[i.key] || i.key.toLowerCase();
327
- if (b.includes(a)) return;
328
- const f = l.handlers || ie;
329
- for (const s of Object.keys(f)) {
330
- const [p, ...u] = s.split(".");
331
- if (p === "keydown" && u.includes(a)) {
332
- const d = f[s], C = u.filter((E) => b.includes(E)), x = b.some((E) => {
333
- const S = E.charAt(0).toUpperCase() + E.slice(1);
334
- return i.getModifierState(S);
393
+ const s = t(l);
394
+ let i = [];
395
+ return l.selectors ? i = n(l) : s && (i = Array.from(s.children).filter((c) => E(c) && g(c))), i;
396
+ }, a = (l) => (s) => {
397
+ const i = pe[s.key] || s.key.toLowerCase();
398
+ if (w.includes(i)) return;
399
+ const u = l.handlers || de;
400
+ for (const c of Object.keys(u)) {
401
+ const [p, ...f] = c.split(".");
402
+ if (p === "keydown" && f.includes(i)) {
403
+ const d = u[c], m = f.filter((h) => w.includes(h)), x = w.some((h) => {
404
+ const M = h.charAt(0).toUpperCase() + h.slice(1);
405
+ return s.getModifierState(M);
335
406
  });
336
- if (C.length > 0) {
407
+ if (m.length > 0) {
337
408
  if (x) {
338
- for (const E of b)
339
- if (u.includes(E)) {
340
- const S = E.charAt(0).toUpperCase() + E.slice(1);
341
- i.getModifierState(S) && d(i);
409
+ for (const h of w)
410
+ if (f.includes(h)) {
411
+ const M = h.charAt(0).toUpperCase() + h.slice(1);
412
+ s.getModifierState(M) && d(s);
342
413
  }
343
414
  }
344
415
  } else
345
- x || d(i);
416
+ x || d(s);
346
417
  }
347
418
  }
348
419
  }, r = [];
349
- U(() => {
420
+ F(() => {
350
421
  for (const l of e) {
351
- const i = t(l), a = o(l), f = c(l), s = i ? [i] : a;
352
- for (const p of s) {
353
- const { focused: u } = ne($(p)), d = T(u, (C) => {
354
- C ? p.addEventListener("keydown", f) : p.removeEventListener("keydown", f);
422
+ const s = t(l), i = o(l), u = a(l), c = s ? [s] : i;
423
+ for (const p of c) {
424
+ const { focused: f } = ce(k(p)), d = T(f, (m) => {
425
+ m ? p.addEventListener("keydown", u) : p.removeEventListener("keydown", u);
355
426
  });
356
427
  r.push(d);
357
428
  }
358
429
  }
359
- }), j(() => {
430
+ }), G(() => {
360
431
  for (const l of r)
361
432
  l();
362
433
  });
363
434
  }
364
- function fe(e) {
435
+ function Ee(e) {
365
436
  }
366
437
  export {
367
- ie as defaultKeypressHandlers,
368
- fe as install,
369
- ae as useKeyboardNav
438
+ de as defaultKeypressHandlers,
439
+ Ee as install,
440
+ ge as useKeyboardNav
370
441
  };
371
442
  //# sourceMappingURL=utilities.js.map