@vc-shell/framework 1.1.20 → 1.1.22

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,16 @@
1
+ ## [1.1.22](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.21...v1.1.22) (2025-05-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * **useKeyboardNavigation:** add validation for focused index and improve focus handling ([9f403f1](https://github.com/VirtoCommerce/vc-shell/commit/9f403f181d27497e9090ac52f6c256e2de387c3f))
7
+
8
+
9
+
10
+ ## [1.1.21](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.20...v1.1.21) (2025-05-28)
11
+
12
+
13
+
1
14
  ## [1.1.20](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.19...v1.1.20) (2025-05-28)
2
15
 
3
16
 
@@ -25,6 +25,15 @@ export function useKeyboardNavigation(options: UseKeyboardNavigationOptions = {}
25
25
  const container = ref<HTMLElement | null>(null);
26
26
  const focusedItemIndex = ref(-1);
27
27
 
28
+ /**
29
+ * Validate and reset focused index if it's out of bounds
30
+ */
31
+ const validateFocusedIndex = (elements: HTMLElement[]) => {
32
+ if (focusedItemIndex.value >= elements.length || focusedItemIndex.value < 0) {
33
+ focusedItemIndex.value = elements.length > 0 ? 0 : -1;
34
+ }
35
+ };
36
+
28
37
  /**
29
38
  * Handler for keydown events for navigation
30
39
  */
@@ -35,19 +44,20 @@ export function useKeyboardNavigation(options: UseKeyboardNavigationOptions = {}
35
44
 
36
45
  if (!focusableElements.length) return;
37
46
 
47
+ // Validate focused index before processing any navigation
48
+ validateFocusedIndex(focusableElements);
49
+
38
50
  switch (event.key) {
39
51
  case "Tab":
40
52
  // Standard tabulation between elements
41
53
  handleTabNavigation(event, focusableElements);
42
54
  break;
43
55
  case "ArrowDown":
44
- case "ArrowRight":
45
56
  // Navigation forward
46
57
  event.preventDefault();
47
58
  focusNextElement(focusableElements);
48
59
  break;
49
60
  case "ArrowUp":
50
- case "ArrowLeft":
51
61
  // Navigation backward
52
62
  event.preventDefault();
53
63
  focusPreviousElement(focusableElements);
@@ -56,11 +66,14 @@ export function useKeyboardNavigation(options: UseKeyboardNavigationOptions = {}
56
66
  case " ":
57
67
  // Selection of the current element
58
68
  if (focusedItemIndex.value >= 0 && focusedItemIndex.value < focusableElements.length) {
59
- event.preventDefault();
60
- if (onEnter) {
61
- onEnter(focusableElements[focusedItemIndex.value]);
62
- } else {
63
- focusableElements[focusedItemIndex.value].click();
69
+ const currentElement = focusableElements[focusedItemIndex.value];
70
+ if (currentElement) {
71
+ event.preventDefault();
72
+ if (onEnter) {
73
+ onEnter(currentElement);
74
+ } else if (typeof currentElement.click === "function") {
75
+ currentElement.click();
76
+ }
64
77
  }
65
78
  }
66
79
  break;
@@ -71,16 +84,6 @@ export function useKeyboardNavigation(options: UseKeyboardNavigationOptions = {}
71
84
  onEscape();
72
85
  }
73
86
  break;
74
- case "Home":
75
- // Transition to the first element
76
- event.preventDefault();
77
- focusFirstElement(focusableElements);
78
- break;
79
- case "End":
80
- // Transition to the last element
81
- event.preventDefault();
82
- focusLastElement(focusableElements);
83
- break;
84
87
  }
85
88
  };
86
89
 
@@ -103,13 +106,21 @@ export function useKeyboardNavigation(options: UseKeyboardNavigationOptions = {}
103
106
  const focusNextElement = (elements: HTMLElement[]) => {
104
107
  if (!elements.length) return;
105
108
 
109
+ validateFocusedIndex(elements);
110
+
106
111
  if (focusedItemIndex.value < elements.length - 1) {
107
112
  focusedItemIndex.value++;
108
113
  } else if (loop) {
109
114
  focusedItemIndex.value = 0;
115
+ } else {
116
+ // If loop is false and we're at the last element, stay at the last element
117
+ return;
110
118
  }
111
119
 
112
- elements[focusedItemIndex.value].focus();
120
+ const elementToFocus = elements[focusedItemIndex.value];
121
+ if (elementToFocus && typeof elementToFocus.focus === "function") {
122
+ elementToFocus.focus();
123
+ }
113
124
  };
114
125
 
115
126
  /**
@@ -118,13 +129,21 @@ export function useKeyboardNavigation(options: UseKeyboardNavigationOptions = {}
118
129
  const focusPreviousElement = (elements: HTMLElement[]) => {
119
130
  if (!elements.length) return;
120
131
 
132
+ validateFocusedIndex(elements);
133
+
121
134
  if (focusedItemIndex.value > 0) {
122
135
  focusedItemIndex.value--;
123
136
  } else if (loop) {
124
137
  focusedItemIndex.value = elements.length - 1;
138
+ } else {
139
+ // If loop is false and we're at the first element, stay at the first element
140
+ return;
125
141
  }
126
142
 
127
- elements[focusedItemIndex.value].focus();
143
+ const elementToFocus = elements[focusedItemIndex.value];
144
+ if (elementToFocus && typeof elementToFocus.focus === "function") {
145
+ elementToFocus.focus();
146
+ }
128
147
  };
129
148
 
130
149
  /**
@@ -133,7 +152,10 @@ export function useKeyboardNavigation(options: UseKeyboardNavigationOptions = {}
133
152
  const focusFirstElement = (elements: HTMLElement[]) => {
134
153
  if (!elements.length) return;
135
154
  focusedItemIndex.value = 0;
136
- elements[0].focus();
155
+ const elementToFocus = elements[0];
156
+ if (elementToFocus && typeof elementToFocus.focus === "function") {
157
+ elementToFocus.focus();
158
+ }
137
159
  };
138
160
 
139
161
  /**
@@ -142,7 +164,10 @@ export function useKeyboardNavigation(options: UseKeyboardNavigationOptions = {}
142
164
  const focusLastElement = (elements: HTMLElement[]) => {
143
165
  if (!elements.length) return;
144
166
  focusedItemIndex.value = elements.length - 1;
145
- elements[elements.length - 1].focus();
167
+ const elementToFocus = elements[elements.length - 1];
168
+ if (elementToFocus && typeof elementToFocus.focus === "function") {
169
+ elementToFocus.focus();
170
+ }
146
171
  };
147
172
 
148
173
  /**
@@ -204,7 +229,12 @@ export function useKeyboardNavigation(options: UseKeyboardNavigationOptions = {}
204
229
  }
205
230
  },
206
231
  setFocusedIndex: (index: number) => {
207
- focusedItemIndex.value = index;
232
+ if (container.value) {
233
+ const elements = Array.from(container.value.querySelectorAll(itemSelector)) as HTMLElement[];
234
+ if (index >= 0 && index < elements.length) {
235
+ focusedItemIndex.value = index;
236
+ }
237
+ }
208
238
  },
209
239
  getFocusedIndex: () => focusedItemIndex.value,
210
240
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useKeyboardNavigation/index.ts"],"names":[],"mappings":"AAEA,UAAU,4BAA4B;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,4BAAiC;iCAuI1C,WAAW;;;;;;6BAuDpB,MAAM;;EAKlC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useKeyboardNavigation/index.ts"],"names":[],"mappings":"AAEA,UAAU,4BAA4B;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,4BAAiC;iCAgK1C,WAAW;;;;;;6BAuDpB,MAAM;;EAUlC"}
package/dist/framework.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue-router";
2
- import { de as o, H as n, F as c, bW as r, R as d, bX as l, bY as u, bK as p, U as b, X as g, dn as y, dq as S, dp as m, bI as V, bL as I, z as h, Y as C, B as D, d5 as P, bM as A, bZ as R, b_ as L, dO as M, e1 as f, b$ as B, c0 as v, c1 as T, c2 as w, Z as E, $ as O, a0 as N, a1 as U, a2 as K, c3 as W, c4 as x, c5 as F, a3 as k, D as q, dZ as z, bN as j, c6 as H, a4 as J, a5 as _, dY as G, dw as Q, dv as X, A as Y, c7 as Z, d6 as $, bO as aa, c8 as sa, c9 as ea, ca as ta, cb as ia, cc as oa, cd as na, ce as ca, d8 as ra, cf as da, cg as la, ch as ua, d7 as pa, ci as ba, dI as ga, dV as ya, bJ as Sa, cj as ma, dk as Va, a6 as Ia, dX as ha, G as Ca, a7 as Da, ck as Pa, cl as Aa, d_ as Ra, cm as La, bP as Ma, cn as fa, d9 as Ba, co as va, cp as Ta, dP as wa, cq as Ea, cr as Oa, cs as Na, ct as Ua, bQ as Ka, cu as Wa, d$ as xa, cv as Fa, cw as ka, a8 as qa, a9 as za, M as ja, aa as Ha, cx as Ja, cy as _a, cz as Ga, cA as Qa, bR as Xa, dE as Ya, dR as Za, dS as $a, y as as, cB as ss, cC as es, bS as ts, cD as is, da as os, ab as ns, cE as cs, cF as rs, cG as ds, db as ls, ac as us, ad as ps, cH as bs, cI as gs, ae as ys, af as Ss, ag as ms, cJ as Vs, cK as Is, dc as hs, cL as Cs, bT as Ds, cM as Ps, cN as As, e0 as Rs, cO as Ls, cP as Ms, cQ as fs, cR as Bs, ah as vs, bU as Ts, cS as ws, cT as Es, bV as Os, cU as Ns, ai as Us, dW as Ks, S as Ws, dm as xs, aj as Fs, dT as ks, cV as qs, cW as zs, cX as js, dd as Hs, cY as Js, cZ as _s, T as Gs, dU as Qs, c_ as Xs, c$ as Ys, dQ as Zs, d0 as $s, d1 as ae, d2 as se, d3 as ee, aP as te, dx as ie, _ as oe, aQ as ne, dC as ce, dB as re, ax as de, J as le, V as ue, aM as pe, K as be, O as ge, aR as ye, ay as Se, aK as me, aA as Ve, az as Ie, aS as he, P as Ce, Q as De, al as Pe, aB as Ae, aC as Re, aN as Le, am as Me, an as fe, ao as Be, aT as ve, aJ as Te, aE as we, aU as Ee, dL as Oe, dK as Ne, ap as Ue, aL as Ke, aF as We, aq as xe, aG as Fe, aw as ke, aH as qe, ar as ze, as as je, aO as He, aV as Je, aI as _e, aD as Ge, av as Qe, at as Xe, au as Ye, d4 as Ze, ak as $e, W as at, bk as st, b6 as et, bn as tt, bx as it, bq as ot, bw as nt, by as ct, dA as rt, df as dt, di as lt, dy as ut, bA as pt, dr as bt, bD as gt, bz as yt, w as St, bC as mt, bv as Vt, dj as It, dN as ht, bt as Ct, dg as Dt, dh as Pt, dl as At, br as Rt, bu as Lt, bs as Mt, x as ft, dH as Bt, bH as vt, dJ as Tt, bi as wt, bf as Et, b4 as Ot, bl as Nt, bc as Ut, bh as Kt, bE as Wt, be as xt, bG as Ft, bF as kt, b0 as qt, bj as zt, ba as jt, dz as Ht, b3 as Jt, a$ as _t, b7 as Gt, dD as Qt, b9 as Xt, dF as Yt, bg as Zt, dt as $t, bB as ai, bp as si, ds as ei, b2 as ti, aW as ii, dG as oi, b8 as ni, du as ci, b1 as ri, b5 as di, aY as li, a_ as ui, dM as pi, aZ as bi, bm as gi, bb as yi, bo as Si, aX as mi, bd as Vi } from "./index-DM05bSo6.js";
2
+ import { de as o, H as n, F as c, bW as r, R as d, bX as l, bY as u, bK as p, U as b, X as g, dn as y, dq as S, dp as m, bI as V, bL as I, z as h, Y as C, B as D, d5 as P, bM as A, bZ as R, b_ as L, dO as M, e1 as f, b$ as B, c0 as v, c1 as T, c2 as w, Z as E, $ as O, a0 as N, a1 as U, a2 as K, c3 as W, c4 as x, c5 as F, a3 as k, D as q, dZ as z, bN as j, c6 as H, a4 as J, a5 as _, dY as G, dw as Q, dv as X, A as Y, c7 as Z, d6 as $, bO as aa, c8 as sa, c9 as ea, ca as ta, cb as ia, cc as oa, cd as na, ce as ca, d8 as ra, cf as da, cg as la, ch as ua, d7 as pa, ci as ba, dI as ga, dV as ya, bJ as Sa, cj as ma, dk as Va, a6 as Ia, dX as ha, G as Ca, a7 as Da, ck as Pa, cl as Aa, d_ as Ra, cm as La, bP as Ma, cn as fa, d9 as Ba, co as va, cp as Ta, dP as wa, cq as Ea, cr as Oa, cs as Na, ct as Ua, bQ as Ka, cu as Wa, d$ as xa, cv as Fa, cw as ka, a8 as qa, a9 as za, M as ja, aa as Ha, cx as Ja, cy as _a, cz as Ga, cA as Qa, bR as Xa, dE as Ya, dR as Za, dS as $a, y as as, cB as ss, cC as es, bS as ts, cD as is, da as os, ab as ns, cE as cs, cF as rs, cG as ds, db as ls, ac as us, ad as ps, cH as bs, cI as gs, ae as ys, af as Ss, ag as ms, cJ as Vs, cK as Is, dc as hs, cL as Cs, bT as Ds, cM as Ps, cN as As, e0 as Rs, cO as Ls, cP as Ms, cQ as fs, cR as Bs, ah as vs, bU as Ts, cS as ws, cT as Es, bV as Os, cU as Ns, ai as Us, dW as Ks, S as Ws, dm as xs, aj as Fs, dT as ks, cV as qs, cW as zs, cX as js, dd as Hs, cY as Js, cZ as _s, T as Gs, dU as Qs, c_ as Xs, c$ as Ys, dQ as Zs, d0 as $s, d1 as ae, d2 as se, d3 as ee, aP as te, dx as ie, _ as oe, aQ as ne, dC as ce, dB as re, ax as de, J as le, V as ue, aM as pe, K as be, O as ge, aR as ye, ay as Se, aK as me, aA as Ve, az as Ie, aS as he, P as Ce, Q as De, al as Pe, aB as Ae, aC as Re, aN as Le, am as Me, an as fe, ao as Be, aT as ve, aJ as Te, aE as we, aU as Ee, dL as Oe, dK as Ne, ap as Ue, aL as Ke, aF as We, aq as xe, aG as Fe, aw as ke, aH as qe, ar as ze, as as je, aO as He, aV as Je, aI as _e, aD as Ge, av as Qe, at as Xe, au as Ye, d4 as Ze, ak as $e, W as at, bk as st, b6 as et, bn as tt, bx as it, bq as ot, bw as nt, by as ct, dA as rt, df as dt, di as lt, dy as ut, bA as pt, dr as bt, bD as gt, bz as yt, w as St, bC as mt, bv as Vt, dj as It, dN as ht, bt as Ct, dg as Dt, dh as Pt, dl as At, br as Rt, bu as Lt, bs as Mt, x as ft, dH as Bt, bH as vt, dJ as Tt, bi as wt, bf as Et, b4 as Ot, bl as Nt, bc as Ut, bh as Kt, bE as Wt, be as xt, bG as Ft, bF as kt, b0 as qt, bj as zt, ba as jt, dz as Ht, b3 as Jt, a$ as _t, b7 as Gt, dD as Qt, b9 as Xt, dF as Yt, bg as Zt, dt as $t, bB as ai, bp as si, ds as ei, b2 as ti, aW as ii, dG as oi, b8 as ni, du as ci, b1 as ri, b5 as di, aY as li, a_ as ui, dM as pi, aZ as bi, bm as gi, bb as yi, bo as Si, aX as mi, bd as Vi } from "./index-C-y5H4_R.js";
3
3
  import "vue";
4
4
  import "vee-validate";
5
5
  export {
@@ -1,4 +1,4 @@
1
- import { b as s, s as n, t as r, a as o, L as P, i as Q, f as i, c as a, k as c } from "./index-DM05bSo6.js";
1
+ import { b as s, s as n, t as r, a as o, L as P, i as Q, f as i, c as a, k as c } from "./index-C-y5H4_R.js";
2
2
  const g = n({
3
3
  String: r.string,
4
4
  Number: r.number,
@@ -1,4 +1,4 @@
1
- import { b as W, E as i, s as U, C as B, t as n, a as C, L as b, r as E, i as u, f as M, h as v, k as N } from "./index-DM05bSo6.js";
1
+ import { b as W, E as i, s as U, C as B, t as n, a as C, L as b, r as E, i as u, f as M, h as v, k as N } from "./index-C-y5H4_R.js";
2
2
  const c = 63, D = 64, j = 1, A = 2, y = 3, H = 4, Z = 5, F = 6, I = 7, z = 65, K = 66, J = 8, OO = 9, eO = 10, aO = 11, rO = 12, V = 13, tO = 19, nO = 20, oO = 29, PO = 33, QO = 34, sO = 47, lO = 0, T = 1, g = 2, d = 3, m = 4;
3
3
  class s {
4
4
  constructor(e, a, r) {
@@ -1,4 +1,4 @@
1
- import { b as o, E as S, s as t, t as $, a as l, p as x, L as R, r as V, i as r, f as U, c as W, h as v, k as u } from "./index-DM05bSo6.js";
1
+ import { b as o, E as S, s as t, t as $, a as l, p as x, L as R, r as V, i as r, f as U, c as W, h as v, k as u } from "./index-C-y5H4_R.js";
2
2
  const b = 1, m = 2, p = 263, k = 3, c = 264, s = 265, Y = 266, Z = 4, w = 5, _ = 6, h = 7, X = 8, j = 9, f = 10, G = 11, g = 12, E = 13, I = 14, N = 15, F = 16, C = 17, L = 18, A = 19, H = 20, K = 21, D = 22, B = 23, M = 24, J = 25, OO = 26, $O = 27, QO = 28, iO = 29, yO = 30, aO = 31, zO = 32, SO = 33, PO = 34, WO = 35, eO = 36, TO = 37, sO = 38, XO = 39, dO = 40, nO = 41, qO = 42, oO = 43, tO = 44, lO = 45, xO = 46, RO = 47, VO = 48, rO = 49, UO = 50, vO = 51, uO = 52, bO = 53, mO = 54, pO = 55, kO = 56, cO = 57, YO = 58, ZO = 59, wO = 60, _O = 61, e = 62, hO = 63, jO = 64, fO = 65, GO = {
3
3
  abstract: Z,
4
4
  and: w,
@@ -1,4 +1,4 @@
1
- import { a as O, L as b, b as r, i as s, f as a, s as t, h as P, k as n, t as e } from "./index-DM05bSo6.js";
1
+ import { a as O, L as b, b as r, i as s, f as a, s as t, h as P, k as n, t as e } from "./index-C-y5H4_R.js";
2
2
  const S = { __proto__: null, anyref: 34, dataref: 34, eqref: 34, externref: 34, i31ref: 34, funcref: 34, i8: 34, i16: 34, i32: 34, i64: 34, f32: 34, f64: 34 }, Q = /* @__PURE__ */ r.deserialize({
3
3
  version: 14,
4
4
  states: "!^Q]QPOOOqQPO'#CbOOQO'#Cd'#CdOOQO'#Cl'#ClOOQO'#Ch'#ChQ]QPOOOOQO,58|,58|OxQPO,58|OOQO-E6f-E6fOOQO1G.h1G.h",
@@ -1,4 +1,4 @@
1
- import { b as G, E as A, s as N, C as I, t as p, o as Y, a as j, L as U, g as k, q as Z, i as B, f as D, u as M } from "./index-DM05bSo6.js";
1
+ import { b as G, E as A, s as N, C as I, t as p, o as Y, a as j, L as U, g as k, q as Z, i as B, f as D, u as M } from "./index-C-y5H4_R.js";
2
2
  const h = 1, F = 2, L = 3, K = 4, H = 5, J = 36, ee = 37, te = 38, Oe = 11, oe = 13;
3
3
  function re(e) {
4
4
  return e == 45 || e == 46 || e == 58 || e >= 65 && e <= 90 || e == 95 || e >= 97 && e <= 122 || e >= 161;
@@ -1,4 +1,4 @@
1
- import { b as s, E as R, l as Y, s as x, C as w, t as O, a as d, m as X, L as k, d as h, e as f, i as u, f as y, c as l, h as g, j, k as U, g as G, N as b, I as Z } from "./index-DM05bSo6.js";
1
+ import { b as s, E as R, l as Y, s as x, C as w, t as O, a as d, m as X, L as k, d as h, e as f, i as u, f as y, c as l, h as g, j, k as U, g as G, N as b, I as Z } from "./index-C-y5H4_R.js";
2
2
  const _ = 177, q = 179, E = 184, v = 12, C = 13, D = 17, z = 20, F = 25, B = 53, N = 95, I = 142, L = 144, A = 145, J = 148, M = 10, H = 13, K = 32, OO = 9, $ = 47, QO = 41, eO = 125, aO = new R((Q, e) => {
3
3
  for (let n = 0, a = Q.next; (e.context && (a < 0 || a == M || a == H || a == $ && Q.peek(n + 1) == $) || a == QO || a == eO) && Q.acceptToken(_), !(a != K && a != OO); )
4
4
  a = Q.peek(++n);
@@ -51945,7 +51945,7 @@ function ut(t) {
51945
51945
  return new rk(Kfe.define(t));
51946
51946
  }
51947
51947
  function Wh(t) {
51948
- return import("./index-DV7CsykG.js").then((e) => e.sql({ dialect: e[t] }));
51948
+ return import("./index-DL0-yUXC.js").then((e) => e.sql({ dialect: e[t] }));
51949
51949
  }
51950
51950
  const S3t = [
51951
51951
  // New-style language modes
@@ -51953,7 +51953,7 @@ const S3t = [
51953
51953
  name: "C",
51954
51954
  extensions: ["c", "h", "ino"],
51955
51955
  load() {
51956
- return import("./index-CG0nR714.js").then((t) => t.cpp());
51956
+ return import("./index-DwjKpYAo.js").then((t) => t.cpp());
51957
51957
  }
51958
51958
  }),
51959
51959
  /* @__PURE__ */ We.of({
@@ -51961,7 +51961,7 @@ const S3t = [
51961
51961
  alias: ["cpp"],
51962
51962
  extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
51963
51963
  load() {
51964
- return import("./index-CG0nR714.js").then((t) => t.cpp());
51964
+ return import("./index-DwjKpYAo.js").then((t) => t.cpp());
51965
51965
  }
51966
51966
  }),
51967
51967
  /* @__PURE__ */ We.of({
@@ -51983,7 +51983,7 @@ const S3t = [
51983
51983
  name: "Go",
51984
51984
  extensions: ["go"],
51985
51985
  load() {
51986
- return import("./index-D0lfscLK.js").then((t) => t.go());
51986
+ return import("./index-BxrA7EzT.js").then((t) => t.go());
51987
51987
  }
51988
51988
  }),
51989
51989
  /* @__PURE__ */ We.of({
@@ -51998,7 +51998,7 @@ const S3t = [
51998
51998
  name: "Java",
51999
51999
  extensions: ["java"],
52000
52000
  load() {
52001
- return import("./index-CF1DpgKB.js").then((t) => t.java());
52001
+ return import("./index-DI3UVoln.js").then((t) => t.java());
52002
52002
  }
52003
52003
  }),
52004
52004
  /* @__PURE__ */ We.of({
@@ -52014,7 +52014,7 @@ const S3t = [
52014
52014
  alias: ["json5"],
52015
52015
  extensions: ["json", "map"],
52016
52016
  load() {
52017
- return import("./index-Bba2zxSI.js").then((t) => t.json());
52017
+ return import("./index--F0eI_oT.js").then((t) => t.json());
52018
52018
  }
52019
52019
  }),
52020
52020
  /* @__PURE__ */ We.of({
@@ -52028,14 +52028,14 @@ const S3t = [
52028
52028
  name: "LESS",
52029
52029
  extensions: ["less"],
52030
52030
  load() {
52031
- return import("./index-BcJRkiSZ.js").then((t) => t.less());
52031
+ return import("./index-wjw1DwqR.js").then((t) => t.less());
52032
52032
  }
52033
52033
  }),
52034
52034
  /* @__PURE__ */ We.of({
52035
52035
  name: "Liquid",
52036
52036
  extensions: ["liquid"],
52037
52037
  load() {
52038
- return import("./index-DMRhVrSq.js").then((t) => t.liquid());
52038
+ return import("./index-xCbUzsUb.js").then((t) => t.liquid());
52039
52039
  }
52040
52040
  }),
52041
52041
  /* @__PURE__ */ We.of({
@@ -52067,7 +52067,7 @@ const S3t = [
52067
52067
  name: "PHP",
52068
52068
  extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
52069
52069
  load() {
52070
- return import("./index-BkRumJFq.js").then((t) => t.php());
52070
+ return import("./index-BAngL0ix.js").then((t) => t.php());
52071
52071
  }
52072
52072
  }),
52073
52073
  /* @__PURE__ */ We.of({
@@ -52088,28 +52088,28 @@ const S3t = [
52088
52088
  extensions: ["BUILD", "bzl", "py", "pyw"],
52089
52089
  filename: /^(BUCK|BUILD)$/,
52090
52090
  load() {
52091
- return import("./index-BKR--p8M.js").then((t) => t.python());
52091
+ return import("./index-C_zSZ2pX.js").then((t) => t.python());
52092
52092
  }
52093
52093
  }),
52094
52094
  /* @__PURE__ */ We.of({
52095
52095
  name: "Rust",
52096
52096
  extensions: ["rs"],
52097
52097
  load() {
52098
- return import("./index-jIonXHwa.js").then((t) => t.rust());
52098
+ return import("./index-DqDgL4W3.js").then((t) => t.rust());
52099
52099
  }
52100
52100
  }),
52101
52101
  /* @__PURE__ */ We.of({
52102
52102
  name: "Sass",
52103
52103
  extensions: ["sass"],
52104
52104
  load() {
52105
- return import("./index-DAIB_vyb.js").then((t) => t.sass({ indented: !0 }));
52105
+ return import("./index-d16x5dY_.js").then((t) => t.sass({ indented: !0 }));
52106
52106
  }
52107
52107
  }),
52108
52108
  /* @__PURE__ */ We.of({
52109
52109
  name: "SCSS",
52110
52110
  extensions: ["scss"],
52111
52111
  load() {
52112
- return import("./index-DAIB_vyb.js").then((t) => t.sass());
52112
+ return import("./index-d16x5dY_.js").then((t) => t.sass());
52113
52113
  }
52114
52114
  }),
52115
52115
  /* @__PURE__ */ We.of({
@@ -52144,7 +52144,7 @@ const S3t = [
52144
52144
  name: "WebAssembly",
52145
52145
  extensions: ["wat", "wast"],
52146
52146
  load() {
52147
- return import("./index-D_QyrtwL.js").then((t) => t.wast());
52147
+ return import("./index-BQtOyLub.js").then((t) => t.wast());
52148
52148
  }
52149
52149
  }),
52150
52150
  /* @__PURE__ */ We.of({
@@ -52152,7 +52152,7 @@ const S3t = [
52152
52152
  alias: ["rss", "wsdl", "xsd"],
52153
52153
  extensions: ["xml", "xsl", "xsd", "svg"],
52154
52154
  load() {
52155
- return import("./index-CBnxRNLn.js").then((t) => t.xml());
52155
+ return import("./index-Bf4s6An9.js").then((t) => t.xml());
52156
52156
  }
52157
52157
  }),
52158
52158
  /* @__PURE__ */ We.of({
@@ -52160,7 +52160,7 @@ const S3t = [
52160
52160
  alias: ["yml"],
52161
52161
  extensions: ["yaml", "yml"],
52162
52162
  load() {
52163
- return import("./index-BulmqdPU.js").then((t) => t.yaml());
52163
+ return import("./index--KQZx7Nr.js").then((t) => t.yaml());
52164
52164
  }
52165
52165
  }),
52166
52166
  // Legacy modes ported from CodeMirror 5
@@ -52956,13 +52956,13 @@ const S3t = [
52956
52956
  name: "Vue",
52957
52957
  extensions: ["vue"],
52958
52958
  load() {
52959
- return import("./index-CEZLRfPx.js").then((t) => t.vue());
52959
+ return import("./index-DFdFt54f.js").then((t) => t.vue());
52960
52960
  }
52961
52961
  }),
52962
52962
  /* @__PURE__ */ We.of({
52963
52963
  name: "Angular Template",
52964
52964
  load() {
52965
- return import("./index-KqjQS0mN.js").then((t) => t.angular());
52965
+ return import("./index-DoHQrH4a.js").then((t) => t.angular());
52966
52966
  }
52967
52967
  })
52968
52968
  ];
@@ -77622,87 +77622,109 @@ function BDe(t = {}) {
77622
77622
  onEnter: r,
77623
77623
  onEscape: i,
77624
77624
  loop: a = !0
77625
- } = t, o = $(null), s = $(-1), l = (g) => {
77625
+ } = t, o = $(null), s = $(-1), l = (y) => {
77626
+ (s.value >= y.length || s.value < 0) && (s.value = y.length > 0 ? 0 : -1);
77627
+ }, u = (y) => {
77626
77628
  if (!o.value) return;
77627
- const y = Array.from(o.value.querySelectorAll(n));
77628
- if (y.length)
77629
- switch (g.key) {
77629
+ const k = Array.from(o.value.querySelectorAll(n));
77630
+ if (k.length)
77631
+ switch (l(k), y.key) {
77630
77632
  case "Tab":
77631
- u(g, y);
77633
+ c(y, k);
77632
77634
  break;
77633
77635
  case "ArrowDown":
77634
- case "ArrowRight":
77635
- g.preventDefault(), c(y);
77636
+ y.preventDefault(), d(k);
77636
77637
  break;
77637
77638
  case "ArrowUp":
77638
- case "ArrowLeft":
77639
- g.preventDefault(), d(y);
77639
+ y.preventDefault(), h(k);
77640
77640
  break;
77641
77641
  case "Enter":
77642
77642
  case " ":
77643
- s.value >= 0 && s.value < y.length && (g.preventDefault(), r ? r(y[s.value]) : y[s.value].click());
77643
+ if (s.value >= 0 && s.value < k.length) {
77644
+ const w = k[s.value];
77645
+ w && (y.preventDefault(), r ? r(w) : typeof w.click == "function" && w.click());
77646
+ }
77644
77647
  break;
77645
77648
  case "Escape":
77646
- i && (g.preventDefault(), i());
77647
- break;
77648
- case "Home":
77649
- g.preventDefault(), h(y);
77650
- break;
77651
- case "End":
77652
- g.preventDefault(), f(y);
77649
+ i && (y.preventDefault(), i());
77653
77650
  break;
77654
77651
  }
77655
- }, u = (g, y) => {
77656
- g.shiftKey ? d(y) : c(y);
77657
- }, c = (g) => {
77658
- g.length && (s.value < g.length - 1 ? s.value++ : a && (s.value = 0), g[s.value].focus());
77659
- }, d = (g) => {
77660
- g.length && (s.value > 0 ? s.value-- : a && (s.value = g.length - 1), g[s.value].focus());
77661
- }, h = (g) => {
77662
- g.length && (s.value = 0, g[0].focus());
77663
- }, f = (g) => {
77664
- g.length && (s.value = g.length - 1, g[g.length - 1].focus());
77665
- }, p = (g) => {
77666
- o.value = g, g.addEventListener("keydown", l);
77667
- }, v = () => {
77668
- o.value && (o.value.removeEventListener("keydown", l), o.value = null);
77652
+ }, c = (y, k) => {
77653
+ y.shiftKey ? h(k) : d(k);
77654
+ }, d = (y) => {
77655
+ if (!y.length) return;
77656
+ if (l(y), s.value < y.length - 1)
77657
+ s.value++;
77658
+ else if (a)
77659
+ s.value = 0;
77660
+ else
77661
+ return;
77662
+ const k = y[s.value];
77663
+ k && typeof k.focus == "function" && k.focus();
77664
+ }, h = (y) => {
77665
+ if (!y.length) return;
77666
+ if (l(y), s.value > 0)
77667
+ s.value--;
77668
+ else if (a)
77669
+ s.value = y.length - 1;
77670
+ else
77671
+ return;
77672
+ const k = y[s.value];
77673
+ k && typeof k.focus == "function" && k.focus();
77674
+ }, f = (y) => {
77675
+ if (!y.length) return;
77676
+ s.value = 0;
77677
+ const k = y[0];
77678
+ k && typeof k.focus == "function" && k.focus();
77679
+ }, p = (y) => {
77680
+ if (!y.length) return;
77681
+ s.value = y.length - 1;
77682
+ const k = y[y.length - 1];
77683
+ k && typeof k.focus == "function" && k.focus();
77684
+ }, v = (y) => {
77685
+ o.value = y, y.addEventListener("keydown", u);
77686
+ }, g = () => {
77687
+ o.value && (o.value.removeEventListener("keydown", u), o.value = null);
77669
77688
  };
77670
77689
  return Ct(() => {
77671
77690
  if (typeof document < "u" && e) {
77672
- const g = document.querySelector(e);
77673
- g && p(g);
77691
+ const y = document.querySelector(e);
77692
+ y && v(y);
77674
77693
  }
77675
77694
  }), io(() => {
77676
- v();
77695
+ g();
77677
77696
  }), {
77678
- initKeyboardNavigation: p,
77679
- cleanupKeyboardNavigation: v,
77697
+ initKeyboardNavigation: v,
77698
+ cleanupKeyboardNavigation: g,
77680
77699
  focusNextElement: () => {
77681
77700
  if (o.value) {
77682
- const g = Array.from(o.value.querySelectorAll(n));
77683
- c(g);
77701
+ const y = Array.from(o.value.querySelectorAll(n));
77702
+ d(y);
77684
77703
  }
77685
77704
  },
77686
77705
  focusPreviousElement: () => {
77687
77706
  if (o.value) {
77688
- const g = Array.from(o.value.querySelectorAll(n));
77689
- d(g);
77707
+ const y = Array.from(o.value.querySelectorAll(n));
77708
+ h(y);
77690
77709
  }
77691
77710
  },
77692
77711
  focusFirstElement: () => {
77693
77712
  if (o.value) {
77694
- const g = Array.from(o.value.querySelectorAll(n));
77695
- h(g);
77713
+ const y = Array.from(o.value.querySelectorAll(n));
77714
+ f(y);
77696
77715
  }
77697
77716
  },
77698
77717
  focusLastElement: () => {
77699
77718
  if (o.value) {
77700
- const g = Array.from(o.value.querySelectorAll(n));
77701
- f(g);
77719
+ const y = Array.from(o.value.querySelectorAll(n));
77720
+ p(y);
77702
77721
  }
77703
77722
  },
77704
- setFocusedIndex: (g) => {
77705
- s.value = g;
77723
+ setFocusedIndex: (y) => {
77724
+ if (o.value) {
77725
+ const k = Array.from(o.value.querySelectorAll(n));
77726
+ y >= 0 && y < k.length && (s.value = y);
77727
+ }
77706
77728
  },
77707
77729
  getFocusedIndex: () => s.value
77708
77730
  };
@@ -1,4 +1,4 @@
1
- import { b as D, E as h, s as L, C as H, t as n, d as B, a as K, L as M, e as OO, m as d, g as eO, i as iO, f as aO, h as f, k as nO, N as rO, I as QO } from "./index-DM05bSo6.js";
1
+ import { b as D, E as h, s as L, C as H, t as n, d as B, a as K, L as M, e as OO, m as d, g as eO, i as iO, f as aO, h as f, k as nO, N as rO, I as QO } from "./index-C-y5H4_R.js";
2
2
  const tO = 1, Z = 194, j = 195, oO = 196, x = 197, dO = 198, sO = 199, lO = 200, TO = 2, E = 3, u = 201, SO = 24, pO = 25, qO = 49, gO = 50, PO = 55, mO = 56, $O = 57, hO = 59, cO = 60, fO = 61, XO = 62, yO = 63, zO = 65, WO = 238, vO = 71, RO = 241, kO = 242, _O = 243, xO = 244, uO = 245, UO = 246, bO = 247, VO = 248, Y = 72, GO = 249, wO = 250, ZO = 251, jO = 252, EO = 253, YO = 254, FO = 255, CO = 256, JO = 73, AO = 77, NO = 263, IO = 112, DO = 130, LO = 151, HO = 152, BO = 155, p = 10, q = 13, k = 32, c = 9, _ = 35, KO = 40, MO = 46, R = 123, U = 125, F = 39, C = 34, b = 92, Oe = 111, ee = 120, ie = 78, ae = 117, ne = 85, re = /* @__PURE__ */ new Set([
3
3
  pO,
4
4
  qO,
@@ -1,4 +1,4 @@
1
- import { a as p, L as u, p as l, r as n, b, v as m, s as S, t, l as r } from "./index-DM05bSo6.js";
1
+ import { a as p, L as u, p as l, r as n, b, v as m, s as S, t, l as r } from "./index-C-y5H4_R.js";
2
2
  const c = /* @__PURE__ */ b.deserialize({
3
3
  version: 14,
4
4
  states: "%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",
@@ -1,4 +1,4 @@
1
- import { b as r, s as e, t as O, a as s, L as X, i as l, f as Y, c as $, h as S, j as o, k as t } from "./index-DM05bSo6.js";
1
+ import { b as r, s as e, t as O, a as s, L as X, i as l, f as Y, c as $, h as S, j as o, k as t } from "./index-C-y5H4_R.js";
2
2
  const Z = e({
3
3
  null: O.null,
4
4
  instanceof: O.operatorKeyword,
@@ -1,4 +1,4 @@
1
- import { L as te, a as ae, b as re, i as ne, f as ie, s as se, c as oe, t as i, E as le, d as ce, e as de, g as me } from "./index-DM05bSo6.js";
1
+ import { L as te, a as ae, b as re, i as ne, f as ie, s as se, c as oe, t as i, E as le, d as ce, e as de, g as me } from "./index-C-y5H4_R.js";
2
2
  const ue = 36, X = 1, fe = 2, b = 3, C = 4, pe = 5, ge = 6, he = 7, _e = 8, be = 9, ve = 10, ye = 11, ke = 12, xe = 13, Oe = 14, we = 15, Qe = 16, Ce = 17, I = 18, Se = 19, A = 20, E = 21, R = 22, Pe = 23, qe = 24;
3
3
  function P(t) {
4
4
  return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t >= 48 && t <= 57;
@@ -1,4 +1,4 @@
1
- import { a as g, L as P, p as q, r as l, b as c, v as i, s as R, t as r, E as p } from "./index-DM05bSo6.js";
1
+ import { a as g, L as P, p as q, r as l, b as c, v as i, s as R, t as r, E as p } from "./index-C-y5H4_R.js";
2
2
  const b = 1, $ = 33, m = 34, v = 35, x = 36, W = /* @__PURE__ */ new p((O) => {
3
3
  let e = O.pos;
4
4
  for (; ; ) {
@@ -1,4 +1,4 @@
1
- import { b as o, E as a, s as Z, t as Q, a as _, L as q, i as l, f as w, c as r, k as V } from "./index-DM05bSo6.js";
1
+ import { b as o, E as a, s as Z, t as Q, a as _, L as q, i as l, f as w, c as r, k as V } from "./index-C-y5H4_R.js";
2
2
  const R = 1, g = 2, b = 3, y = 4, T = 5, s = 98, c = 101, v = 102, t = 114, p = 69, X = 48, W = 46, d = 43, f = 45, Y = 35, z = 34, x = 124, U = 60, h = 62;
3
3
  function n(O) {
4
4
  return O >= 48 && O <= 57;
@@ -1,4 +1,4 @@
1
- import { b as o, E as t, s, t as Q, a as j, L as x, i as f, f as c, c as a, h as W, j as S, k as l } from "./index-DM05bSo6.js";
1
+ import { b as o, E as t, s, t as Q, a as j, L as x, i as f, f as c, c as a, h as W, j as S, k as l } from "./index-C-y5H4_R.js";
2
2
  const r = 1, q = 2, u = 3, n = 82, Z = 76, V = 117, T = 85, z = 97, w = 122, m = 65, b = 90, y = 95, i = 48, Y = 34, v = 40, P = 41, _ = 32, U = 62, p = new t((O) => {
3
3
  if (O.next == Z || O.next == T ? O.advance() : O.next == V && (O.advance(), O.next == i + 8 && O.advance()), O.next != n || (O.advance(), O.next != Y)) return;
4
4
  O.advance();
@@ -1,4 +1,4 @@
1
- import { b as v, E as i, s as _, C as W, t as e, n as g, a as x, L as V, f as p, i as U, k as E, c as N } from "./index-DM05bSo6.js";
1
+ import { b as v, E as i, s as _, C as W, t as e, n as g, a as x, L as V, f as p, i as U, k as E, c as N } from "./index-C-y5H4_R.js";
2
2
  const j = 168, X = 169, C = 170, I = 1, D = 2, w = 3, L = 171, F = 172, Y = 4, z = 173, K = 5, A = 174, T = 175, Z = 176, s = 177, G = 6, k = 7, B = 8, H = 9, c = 0, R = [
3
3
  9,
4
4
  10,
@@ -1,4 +1,4 @@
1
- import { n as r, a as i, L as n, b as $, i as y, f as P, c as X, k as m, E as S, s as c, t as O } from "./index-DM05bSo6.js";
1
+ import { n as r, a as i, L as n, b as $, i as y, f as P, c as X, k as m, E as S, s as c, t as O } from "./index-C-y5H4_R.js";
2
2
  const s = 110, l = 1, f = 2, t = [
3
3
  9,
4
4
  10,
@@ -1,4 +1,4 @@
1
- import { o as h, p as b, L as v, q as y, a as k, r as u, g as T, b as _, s as W, i as R, f as Y, t, h as w, E as P } from "./index-DM05bSo6.js";
1
+ import { o as h, p as b, L as v, q as y, a as k, r as u, g as T, b as _, s as W, i as R, f as Y, t, h as w, E as P } from "./index-C-y5H4_R.js";
2
2
  const U = 1, X = 2, j = 3, G = 180, S = 4, z = 181, x = 5, Z = 182, E = 6;
3
3
  function V(O) {
4
4
  return O >= 65 && O <= 90 || O >= 97 && O <= 122;