@wisemen/vue-core-actions 0.3.0 → 0.5.0
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/dist/index.js
CHANGED
|
@@ -311,11 +311,11 @@ function ye(e, n, r = {}) {
|
|
|
311
311
|
}
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/const/index.ts
|
|
314
|
-
var be = .24, xe = .85, Se = -.15, Ce = .05, we = m(!1);
|
|
315
|
-
function Te(e) {
|
|
316
|
-
we.value = e;
|
|
317
|
-
}
|
|
314
|
+
var be = .24, xe = .85, Se = -.15, Ce = .05, we = .02, Te = m(!1);
|
|
318
315
|
function Ee(e) {
|
|
316
|
+
Te.value = e;
|
|
317
|
+
}
|
|
318
|
+
function De(e) {
|
|
319
319
|
return e;
|
|
320
320
|
}
|
|
321
321
|
//#endregion
|
|
@@ -325,94 +325,94 @@ function j(e) {
|
|
|
325
325
|
}
|
|
326
326
|
//#endregion
|
|
327
327
|
//#region src/utils/resolveActions.util.ts
|
|
328
|
-
var
|
|
329
|
-
async function
|
|
330
|
-
let
|
|
331
|
-
if (
|
|
332
|
-
let e = [],
|
|
333
|
-
for (;
|
|
334
|
-
let n =
|
|
328
|
+
var Oe = /[\s\-_./]+/;
|
|
329
|
+
async function ke(e, t, n, r, i = !1) {
|
|
330
|
+
let a = t.searchInput.length, o = a >= 0, s = Me(e);
|
|
331
|
+
if (o) {
|
|
332
|
+
let e = [], o = [], c = [...s];
|
|
333
|
+
for (; c.length > 0;) {
|
|
334
|
+
let n = c.shift();
|
|
335
335
|
if (e.push(n), !N(n, t)) continue;
|
|
336
|
-
let r =
|
|
337
|
-
if (n.subActions !== void 0 &&
|
|
336
|
+
let r = ze(n, t), i = a >= (r?.minLength ?? 2);
|
|
337
|
+
if (n.subActions !== void 0 && i) {
|
|
338
338
|
let e = r?.maxResults ?? 99, i = n.subActions(t);
|
|
339
339
|
if (Array.isArray(i)) {
|
|
340
|
-
let t =
|
|
341
|
-
|
|
342
|
-
} else if (
|
|
343
|
-
let t =
|
|
344
|
-
|
|
340
|
+
let t = Ne(i.slice(0, e), n);
|
|
341
|
+
c.push(...t);
|
|
342
|
+
} else if (Ae(i)) {
|
|
343
|
+
let t = Ne(i.actions.slice(0, e), n);
|
|
344
|
+
c.push(...t);
|
|
345
345
|
} else {
|
|
346
346
|
let t = n;
|
|
347
|
-
|
|
347
|
+
o.push(async () => Ne(await je(i, e), t));
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
if (
|
|
352
|
-
n(M(e, t, r));
|
|
353
|
-
let
|
|
354
|
-
return await Promise.all(
|
|
355
|
-
let
|
|
356
|
-
|
|
357
|
-
})), M(
|
|
351
|
+
if (o.length > 0 && n !== void 0) {
|
|
352
|
+
n(M(e, t, r, i));
|
|
353
|
+
let a = [...e];
|
|
354
|
+
return await Promise.all(o.map(async (e) => {
|
|
355
|
+
let o = await e();
|
|
356
|
+
a.push(...o), n(M(a, t, r, i));
|
|
357
|
+
})), M(a, t, r, i);
|
|
358
358
|
}
|
|
359
|
-
let
|
|
360
|
-
|
|
359
|
+
let l = (await Promise.all(o.map((e) => e()))).flat();
|
|
360
|
+
s = [...e, ...l];
|
|
361
361
|
}
|
|
362
|
-
return M(
|
|
362
|
+
return M(s, t, r, i);
|
|
363
363
|
}
|
|
364
|
-
function M(e, t, n) {
|
|
365
|
-
let
|
|
364
|
+
function M(e, t, n, r = !1) {
|
|
365
|
+
let i = t.searchInput.length >= 0, a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = [];
|
|
366
366
|
for (let n of e) if (N(n, t)) {
|
|
367
367
|
if (n.id !== void 0) {
|
|
368
|
-
if (
|
|
369
|
-
|
|
368
|
+
if (o.has(n.id)) continue;
|
|
369
|
+
o.add(n.id);
|
|
370
370
|
}
|
|
371
371
|
if (n.key !== void 0) {
|
|
372
|
-
if (
|
|
373
|
-
|
|
372
|
+
if (a.has(n.key)) continue;
|
|
373
|
+
a.add(n.key);
|
|
374
374
|
}
|
|
375
|
-
|
|
375
|
+
s.push(n);
|
|
376
376
|
}
|
|
377
|
-
if (
|
|
378
|
-
let e =
|
|
377
|
+
if (i) {
|
|
378
|
+
let e = s.map((e) => ({
|
|
379
379
|
action: e,
|
|
380
|
-
score:
|
|
380
|
+
score: Pe(e, t.searchInput, t)
|
|
381
381
|
})).filter(({ score: e }) => e >= be);
|
|
382
|
-
return e = e.toSorted((e,
|
|
383
|
-
let
|
|
384
|
-
if (
|
|
385
|
-
let
|
|
386
|
-
if (
|
|
387
|
-
let
|
|
388
|
-
return
|
|
382
|
+
return e = e.toSorted((e, i) => {
|
|
383
|
+
let a = e.action.parentAction ?? n, o = i.action.parentAction ?? n, s = a?.showSelectedSubActionsFirst !== !1 && L(e.action, t) ? 0 : 1, c = o?.showSelectedSubActionsFirst !== !1 && L(i.action, t) ? 0 : 1;
|
|
384
|
+
if (s !== c) return s - c;
|
|
385
|
+
let l = r ? we : Ce, u = Math.floor(e.score / l + 1e-9), d = Math.floor(i.score / l + 1e-9);
|
|
386
|
+
if (u !== d) return d - u;
|
|
387
|
+
let f = P(e.action, t), p = P(i.action, t);
|
|
388
|
+
return f === p ? i.score - e.score : f - p;
|
|
389
389
|
}), e.map((e) => e.action);
|
|
390
390
|
}
|
|
391
|
-
let
|
|
392
|
-
return
|
|
393
|
-
let r =
|
|
391
|
+
let c = n?.showSelectedSubActionsFirst !== !1;
|
|
392
|
+
return s.sort((e, n) => {
|
|
393
|
+
let r = c && L(e, t) ? 0 : 1, i = c && L(n, t) ? 0 : 1;
|
|
394
394
|
return r === i ? P(e, t) - P(n, t) : r - i;
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function Ae(e) {
|
|
398
398
|
return typeof e == "object" && !!e && "actions" in e && "pagination" in e && Array.isArray(e.actions);
|
|
399
399
|
}
|
|
400
|
-
async function
|
|
400
|
+
async function je(e, t) {
|
|
401
401
|
if (j(e)) {
|
|
402
402
|
let n = await e;
|
|
403
|
-
return
|
|
403
|
+
return Ae(n) ? n.actions.slice(0, t) : n.slice(0, t);
|
|
404
404
|
}
|
|
405
405
|
if (e == null || !(Symbol.asyncIterator in e)) return [];
|
|
406
406
|
let n = [];
|
|
407
407
|
for await (let r of e) if (n.push(r), n.length >= t) break;
|
|
408
408
|
return n;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function Me(e) {
|
|
411
411
|
let t = [];
|
|
412
412
|
for (let n of e) typeof n == "function" ? t.push(...n()) : t.push(n);
|
|
413
413
|
return t;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function Ne(e, t) {
|
|
416
416
|
let n = t.rootAction ?? t;
|
|
417
417
|
return e.map((e) => ({
|
|
418
418
|
...e,
|
|
@@ -423,23 +423,23 @@ function Me(e, t) {
|
|
|
423
423
|
}));
|
|
424
424
|
}
|
|
425
425
|
function N(e, t) {
|
|
426
|
-
return !(!
|
|
426
|
+
return !(!Te.value && e.availableWhenUnauthenticated !== !0 || e.isApplicable !== void 0 && !e.isApplicable(t) || t.menuType === "commandMenu" && e.disabledReason !== void 0 && typeof e.disabledReason(t) == "string" || e.onlyVisibleThroughSearch && t.menuType !== void 0 && t.searchInput.length === 0);
|
|
427
427
|
}
|
|
428
428
|
function P(e, t) {
|
|
429
429
|
let n = e.group?.priority ?? null;
|
|
430
430
|
return n === null ? 9999 : typeof n == "function" ? n(t) : n;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function Pe(e, t, n) {
|
|
433
433
|
if (t.trim().length === 0 || e.skipFilterScoring) return 1;
|
|
434
|
-
let r = I(e, n), i =
|
|
434
|
+
let r = I(e, n), i = Fe(e, n);
|
|
435
435
|
if (e.keywordsExactMatch) {
|
|
436
436
|
let t = Array.isArray(e.keywordsExactMatch) ? e.keywordsExactMatch : [e.keywordsExactMatch];
|
|
437
437
|
if (t.some((e) => r.toLowerCase().includes(e.toLowerCase())) || t.some((e) => i.toLowerCase().includes(e.toLowerCase()))) return 1;
|
|
438
438
|
}
|
|
439
|
-
let a =
|
|
439
|
+
let a = Ie(r, t), o = Ie(i, t) * xe, s = Math.max(a, o);
|
|
440
440
|
return s < .24 && (r.toLowerCase().includes(t.toLowerCase()) ? s = .29 : i.toLowerCase().includes(t.toLowerCase()) && (s = .245)), e.parentAction && (s += Se), e.scoreOverride !== void 0 && (s = e.scoreOverride), e.sortPriority !== void 0 && (s -= e.sortPriority * 1e-4), s;
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function Fe(e, t) {
|
|
443
443
|
let n = [], r = e.parentScoreInfluence ?? "all";
|
|
444
444
|
if (r !== "none") {
|
|
445
445
|
let i = e.parentAction;
|
|
@@ -458,14 +458,14 @@ function Pe(e, t) {
|
|
|
458
458
|
}
|
|
459
459
|
return n.join(" ");
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function Ie(e, t) {
|
|
462
462
|
if (!e || !t) return 0;
|
|
463
463
|
let n = e.toLowerCase().trim(), r = t.toLowerCase().trim();
|
|
464
464
|
if (!r || n === r) return 1;
|
|
465
465
|
if (n.startsWith(r)) return .92 - Math.min(.12, (n.length - r.length) * .002);
|
|
466
466
|
let i = n.indexOf(r);
|
|
467
467
|
if (i !== -1) return .82 - Math.min(.12, i * .004);
|
|
468
|
-
let a = n.split(
|
|
468
|
+
let a = n.split(Oe);
|
|
469
469
|
if (a.some((e) => e.startsWith(r))) return .68;
|
|
470
470
|
let o = a.map((e) => e[0] ?? "").join("");
|
|
471
471
|
if (o === r || o.startsWith(r)) return .6;
|
|
@@ -483,28 +483,31 @@ function F(e, t) {
|
|
|
483
483
|
function I(e, t) {
|
|
484
484
|
return typeof e.name == "function" ? e.name(t) : e.name;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function Le(e, t) {
|
|
487
487
|
return typeof e.avatar == "function" ? e.avatar(t) : e.avatar ?? null;
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function Re(e, t) {
|
|
490
490
|
return typeof e.hint == "function" ? e.hint(t) : e.hint ?? null;
|
|
491
491
|
}
|
|
492
492
|
function L(e, t) {
|
|
493
493
|
return typeof e.selected == "function" ? e.selected(t) : e.selected ?? null;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function ze(e, t) {
|
|
496
496
|
return typeof e.searchSubActionsConfig == "function" ? e.searchSubActionsConfig(t) : e.searchSubActionsConfig ?? null;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Be(e, t) {
|
|
499
499
|
return typeof e.preview == "function" ? e.preview(t) : null;
|
|
500
500
|
}
|
|
501
|
+
function Ve(e, t) {
|
|
502
|
+
return typeof e.rightContent == "function" ? e.rightContent(t) : null;
|
|
503
|
+
}
|
|
501
504
|
//#endregion
|
|
502
505
|
//#region src/composables/actionPreview.composable.ts
|
|
503
|
-
function
|
|
506
|
+
function He({ highlightedActionId: e, getContext: n, resolvedActions: r }) {
|
|
504
507
|
let i = p(!1), a = t(() => {
|
|
505
508
|
if (e.value === null || !i.value) return null;
|
|
506
509
|
let t = r.value.find((t) => t.id === e.value) ?? null;
|
|
507
|
-
return t === null ? null :
|
|
510
|
+
return t === null ? null : Be(t, n());
|
|
508
511
|
});
|
|
509
512
|
function o() {
|
|
510
513
|
i.value = !0;
|
|
@@ -526,7 +529,7 @@ function ze({ highlightedActionId: e, getContext: n, resolvedActions: r }) {
|
|
|
526
529
|
}
|
|
527
530
|
//#endregion
|
|
528
531
|
//#region src/composables/isSelectorVisible.composable.ts
|
|
529
|
-
function
|
|
532
|
+
function Ue(e) {
|
|
530
533
|
let t = p(!1), n = null;
|
|
531
534
|
function r() {
|
|
532
535
|
t.value = document.querySelector(e) !== null;
|
|
@@ -542,15 +545,15 @@ function Be(e) {
|
|
|
542
545
|
}
|
|
543
546
|
//#endregion
|
|
544
547
|
//#region src/stores/actionManager.store.ts
|
|
545
|
-
async function
|
|
548
|
+
async function We(e, t, n) {
|
|
546
549
|
e.execute !== void 0 && (await e.execute(t), n?.onComplete?.());
|
|
547
550
|
}
|
|
548
|
-
function
|
|
551
|
+
function Ge(e) {
|
|
549
552
|
let t = /* @__PURE__ */ new Set();
|
|
550
553
|
return e.filter((e) => t.has(e) ? !1 : (t.add(e), !0));
|
|
551
554
|
}
|
|
552
|
-
var
|
|
553
|
-
let e = p([]), t = p([]), n = p([]), r = p(null), i = p({}), a = x(), o = b(), s =
|
|
555
|
+
var R = y("actionManager", () => {
|
|
556
|
+
let e = p([]), t = p([]), n = p([]), r = p(null), i = p({}), a = x(), o = b(), s = Ue("[data-dialog]:not([data-command-menu])");
|
|
554
557
|
function c(e) {
|
|
555
558
|
i.value = {
|
|
556
559
|
...i.value,
|
|
@@ -580,7 +583,7 @@ var z = y("actionManager", () => {
|
|
|
580
583
|
};
|
|
581
584
|
}
|
|
582
585
|
function g(c) {
|
|
583
|
-
let l =
|
|
586
|
+
let l = Ge([
|
|
584
587
|
...c.models ?? [],
|
|
585
588
|
...n.value,
|
|
586
589
|
...t.value,
|
|
@@ -618,7 +621,7 @@ var z = y("actionManager", () => {
|
|
|
618
621
|
return {
|
|
619
622
|
actionContext: g,
|
|
620
623
|
clearTableSelection: h,
|
|
621
|
-
executeAction:
|
|
624
|
+
executeAction: We,
|
|
622
625
|
focusedModels: e,
|
|
623
626
|
metadata: i,
|
|
624
627
|
registerMetadata: c,
|
|
@@ -634,44 +637,44 @@ var z = y("actionManager", () => {
|
|
|
634
637
|
});
|
|
635
638
|
//#endregion
|
|
636
639
|
//#region src/utils/subActions.util.ts
|
|
637
|
-
function
|
|
640
|
+
function z(e) {
|
|
638
641
|
return typeof e == "object" && !!e && "actions" in e && "pagination" in e && Array.isArray(e.actions);
|
|
639
642
|
}
|
|
640
|
-
function
|
|
641
|
-
return
|
|
643
|
+
function B(e, t, n) {
|
|
644
|
+
return z(t) ? (e.id && (n[e.id] = t.pagination.nextOffset), t.actions) : (e.id && delete n[e.id], t);
|
|
642
645
|
}
|
|
643
|
-
async function
|
|
646
|
+
async function Ke(e, t, n, r = 297) {
|
|
644
647
|
if (e.subActions === void 0) return [];
|
|
645
648
|
let i = e.subActions(t);
|
|
646
|
-
if (Array.isArray(i) ||
|
|
647
|
-
if (j(i)) return
|
|
649
|
+
if (Array.isArray(i) || z(i)) return B(e, i, n);
|
|
650
|
+
if (j(i)) return B(e, await i, n);
|
|
648
651
|
let a = [];
|
|
649
652
|
for await (let e of i) if (a.push(e), a.length >= r) break;
|
|
650
653
|
return a;
|
|
651
654
|
}
|
|
652
655
|
//#endregion
|
|
653
656
|
//#region src/composables/actionDropdownMenuContent.composable.ts
|
|
654
|
-
function
|
|
655
|
-
let o = v(), s =
|
|
657
|
+
function qe({ actions: e, metadata: n, models: r, parentAction: i, scrollContainerRef: a }) {
|
|
658
|
+
let o = v(), s = R(), c = p(null), l = p(""), u = p(""), d = p(!1), f = p([]), m = p({}), h = p(!0), g = 0, y = t(() => s.actionContext({
|
|
656
659
|
menuType: "contextualMenu",
|
|
657
660
|
metadata: n.value,
|
|
658
661
|
models: r.value,
|
|
659
662
|
searchInput: u.value
|
|
660
|
-
})), { preview: b, onHidePreview: x, onKeyDown: S, onShowPreview: C } =
|
|
663
|
+
})), { preview: b, onHidePreview: x, onKeyDown: S, onShowPreview: C } = He({
|
|
661
664
|
highlightedActionId: c,
|
|
662
665
|
getContext: () => y.value,
|
|
663
666
|
resolvedActions: f
|
|
664
667
|
}), w = t(() => {
|
|
665
668
|
if (i.value == null) return o.t("search");
|
|
666
|
-
let e =
|
|
669
|
+
let e = ze(i.value, y.value)?.placeholder;
|
|
667
670
|
return e === void 0 ? o.t("search") : typeof e == "function" ? e() : e;
|
|
668
671
|
});
|
|
669
672
|
async function T() {
|
|
670
673
|
let t = ++g, n = y.value;
|
|
671
674
|
try {
|
|
672
675
|
let r = e.value;
|
|
673
|
-
i.value?.subActions !== void 0 && (r = await
|
|
674
|
-
let a = await
|
|
676
|
+
i.value?.subActions !== void 0 && (r = await Ke(i.value, n, m.value));
|
|
677
|
+
let a = await ke(r, n, (e) => {
|
|
675
678
|
t !== g || e.length === 0 || (f.value = e);
|
|
676
679
|
}, i.value ?? void 0);
|
|
677
680
|
if (t !== g) return;
|
|
@@ -694,7 +697,7 @@ function We({ actions: e, metadata: n, models: r, parentAction: i, scrollContain
|
|
|
694
697
|
searchInput: l.value,
|
|
695
698
|
subActionsMeta: { [e.id]: t }
|
|
696
699
|
}), o = e.subActions(a), c;
|
|
697
|
-
if (Array.isArray(o) ||
|
|
700
|
+
if (Array.isArray(o) || z(o)) c = o;
|
|
698
701
|
else if (j(o)) c = await o;
|
|
699
702
|
else {
|
|
700
703
|
let e = [];
|
|
@@ -702,7 +705,7 @@ function We({ actions: e, metadata: n, models: r, parentAction: i, scrollContain
|
|
|
702
705
|
f.value = [...f.value, ...e];
|
|
703
706
|
return;
|
|
704
707
|
}
|
|
705
|
-
f.value = [...f.value, ...
|
|
708
|
+
f.value = [...f.value, ...B(e, c, m.value)];
|
|
706
709
|
}, {
|
|
707
710
|
canLoadMore: () => {
|
|
708
711
|
let e = i.value;
|
|
@@ -739,10 +742,10 @@ function We({ actions: e, metadata: n, models: r, parentAction: i, scrollContain
|
|
|
739
742
|
}
|
|
740
743
|
//#endregion
|
|
741
744
|
//#region src/composables/actionGroup.composable.ts
|
|
742
|
-
var
|
|
745
|
+
var Je = /* @__PURE__ */ function(e) {
|
|
743
746
|
return e[e.HOVER = 1] = "HOVER", e[e.VIEW = 2] = "VIEW", e[e.MODEL = 3] = "MODEL", e[e.GENERAL = 4] = "GENERAL", e[e.NAVIGATION = 5] = "NAVIGATION", e[e.PREFERENCES = 6] = "PREFERENCES", e[e.SETTINGS = 7] = "SETTINGS", e[e.APPLICATION = 8] = "APPLICATION", e[e.ACCOUNT = 9] = "ACCOUNT", e[e.DEVELOPER = 10] = "DEVELOPER", e;
|
|
744
747
|
}({});
|
|
745
|
-
function
|
|
748
|
+
function Ye() {
|
|
746
749
|
let e = v();
|
|
747
750
|
return {
|
|
748
751
|
account: {
|
|
@@ -777,25 +780,25 @@ function Ke() {
|
|
|
777
780
|
}
|
|
778
781
|
//#endregion
|
|
779
782
|
//#region ../../../node_modules/.pnpm/@tanstack+vue-hotkeys@0.10.0_vue@3.5.27_typescript@5.9.3_/node_modules/@tanstack/vue-hotkeys/dist/HotkeysProviderContext.js
|
|
780
|
-
var
|
|
781
|
-
function
|
|
782
|
-
return i(
|
|
783
|
+
var Xe = Symbol("HotkeysContext");
|
|
784
|
+
function Ze() {
|
|
785
|
+
return i(Xe, null)?.defaultOptions ?? {};
|
|
783
786
|
}
|
|
784
787
|
//#endregion
|
|
785
788
|
//#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/constants.js
|
|
786
|
-
function
|
|
789
|
+
function V() {
|
|
787
790
|
if (typeof navigator > "u") return "linux";
|
|
788
791
|
let e = navigator.platform?.toLowerCase() ?? "", t = navigator.userAgent?.toLowerCase() ?? "";
|
|
789
792
|
return e.includes("mac") || t.includes("mac") ? "mac" : e.includes("win") || t.includes("win") ? "windows" : "linux";
|
|
790
793
|
}
|
|
791
|
-
var
|
|
794
|
+
var H = [
|
|
792
795
|
"Control",
|
|
793
796
|
"Alt",
|
|
794
797
|
"Shift",
|
|
795
798
|
"Meta"
|
|
796
799
|
];
|
|
797
|
-
new Set(
|
|
798
|
-
var
|
|
800
|
+
new Set(H);
|
|
801
|
+
var U = {
|
|
799
802
|
Control: "Control",
|
|
800
803
|
Ctrl: "Control",
|
|
801
804
|
control: "Control",
|
|
@@ -821,10 +824,10 @@ var W = {
|
|
|
821
824
|
commandorcontrol: "Mod",
|
|
822
825
|
mod: "Mod"
|
|
823
826
|
};
|
|
824
|
-
function
|
|
827
|
+
function Qe(e, t = V()) {
|
|
825
828
|
return e === "Mod" ? t === "mac" ? "Meta" : "Control" : e;
|
|
826
829
|
}
|
|
827
|
-
var
|
|
830
|
+
var $e = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")), et = /* @__PURE__ */ new Set([
|
|
828
831
|
"0",
|
|
829
832
|
"1",
|
|
830
833
|
"2",
|
|
@@ -835,7 +838,7 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
|
|
|
835
838
|
"7",
|
|
836
839
|
"8",
|
|
837
840
|
"9"
|
|
838
|
-
]),
|
|
841
|
+
]), tt = /* @__PURE__ */ new Set([
|
|
839
842
|
"F1",
|
|
840
843
|
"F2",
|
|
841
844
|
"F3",
|
|
@@ -848,7 +851,7 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
|
|
|
848
851
|
"F10",
|
|
849
852
|
"F11",
|
|
850
853
|
"F12"
|
|
851
|
-
]),
|
|
854
|
+
]), nt = /* @__PURE__ */ new Set([
|
|
852
855
|
"ArrowUp",
|
|
853
856
|
"ArrowDown",
|
|
854
857
|
"ArrowLeft",
|
|
@@ -857,14 +860,14 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
|
|
|
857
860
|
"End",
|
|
858
861
|
"PageUp",
|
|
859
862
|
"PageDown"
|
|
860
|
-
]),
|
|
863
|
+
]), rt = /* @__PURE__ */ new Set([
|
|
861
864
|
"Enter",
|
|
862
865
|
"Escape",
|
|
863
866
|
"Space",
|
|
864
867
|
"Tab",
|
|
865
868
|
"Backspace",
|
|
866
869
|
"Delete"
|
|
867
|
-
]),
|
|
870
|
+
]), it = /* @__PURE__ */ new Set([
|
|
868
871
|
"/",
|
|
869
872
|
"[",
|
|
870
873
|
"]",
|
|
@@ -875,7 +878,7 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
|
|
|
875
878
|
".",
|
|
876
879
|
";",
|
|
877
880
|
"`"
|
|
878
|
-
]),
|
|
881
|
+
]), at = {
|
|
879
882
|
Backquote: "`",
|
|
880
883
|
Backslash: "\\",
|
|
881
884
|
BracketLeft: "[",
|
|
@@ -888,14 +891,14 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
|
|
|
888
891
|
Slash: "/"
|
|
889
892
|
};
|
|
890
893
|
[
|
|
891
|
-
...Xe,
|
|
892
|
-
...Ze,
|
|
893
|
-
...Qe,
|
|
894
894
|
...$e,
|
|
895
895
|
...et,
|
|
896
|
-
...tt
|
|
896
|
+
...tt,
|
|
897
|
+
...nt,
|
|
898
|
+
...rt,
|
|
899
|
+
...it
|
|
897
900
|
];
|
|
898
|
-
var
|
|
901
|
+
var ot = {
|
|
899
902
|
Esc: "Escape",
|
|
900
903
|
esc: "Escape",
|
|
901
904
|
escape: "Escape",
|
|
@@ -932,13 +935,13 @@ var rt = {
|
|
|
932
935
|
pgup: "PageUp",
|
|
933
936
|
pgdn: "PageDown"
|
|
934
937
|
};
|
|
935
|
-
function
|
|
938
|
+
function st(e) {
|
|
936
939
|
return /^\p{Letter}$/u.test(e);
|
|
937
940
|
}
|
|
938
|
-
function
|
|
941
|
+
function W(e) {
|
|
939
942
|
if (!e) return "";
|
|
940
|
-
if (e in
|
|
941
|
-
if (
|
|
943
|
+
if (e in ot) return ot[e];
|
|
944
|
+
if (st(e)) {
|
|
942
945
|
let t = e.toUpperCase();
|
|
943
946
|
return t.length === 1 ? t : e;
|
|
944
947
|
}
|
|
@@ -947,32 +950,32 @@ function G(e) {
|
|
|
947
950
|
}
|
|
948
951
|
//#endregion
|
|
949
952
|
//#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/parse.js
|
|
950
|
-
function
|
|
953
|
+
function G(e, t = V()) {
|
|
951
954
|
let n = e.split("+"), r = /* @__PURE__ */ new Set(), i = "";
|
|
952
955
|
for (let e = 0; e < n.length; e++) {
|
|
953
956
|
let a = n[e].trim();
|
|
954
|
-
if (e === n.length - 1) i =
|
|
957
|
+
if (e === n.length - 1) i = W(a);
|
|
955
958
|
else {
|
|
956
|
-
let e =
|
|
959
|
+
let e = U[a] ?? U[a.toLowerCase()];
|
|
957
960
|
if (e) {
|
|
958
|
-
let n =
|
|
961
|
+
let n = Qe(e, t);
|
|
959
962
|
r.add(n);
|
|
960
|
-
} else n.length === 1 && (i =
|
|
963
|
+
} else n.length === 1 && (i = W(a));
|
|
961
964
|
}
|
|
962
965
|
}
|
|
963
|
-
return !i && n.length > 0 && (i =
|
|
966
|
+
return !i && n.length > 0 && (i = W(n[n.length - 1].trim())), {
|
|
964
967
|
key: i,
|
|
965
968
|
ctrl: r.has("Control"),
|
|
966
969
|
shift: r.has("Shift"),
|
|
967
970
|
alt: r.has("Alt"),
|
|
968
971
|
meta: r.has("Meta"),
|
|
969
|
-
modifiers:
|
|
972
|
+
modifiers: H.filter((e) => r.has(e))
|
|
970
973
|
};
|
|
971
974
|
}
|
|
972
|
-
function
|
|
975
|
+
function ct(e, t = V()) {
|
|
973
976
|
let n = e.ctrl ?? !1, r = e.shift ?? !1, i = e.alt ?? !1, a = e.meta ?? !1;
|
|
974
|
-
e.mod && (
|
|
975
|
-
let o =
|
|
977
|
+
e.mod && (Qe("Mod", t) === "Control" ? n = !0 : a = !0);
|
|
978
|
+
let o = H.filter((e) => {
|
|
976
979
|
switch (e) {
|
|
977
980
|
case "Control": return n;
|
|
978
981
|
case "Shift": return r;
|
|
@@ -990,43 +993,43 @@ function at(e, t = H()) {
|
|
|
990
993
|
modifiers: o
|
|
991
994
|
};
|
|
992
995
|
}
|
|
993
|
-
function
|
|
996
|
+
function lt(e, t) {
|
|
994
997
|
let n = t === "mac" ? e.meta && !e.ctrl : e.ctrl && !e.meta, r = [];
|
|
995
998
|
if (n) r.push("Mod"), e.alt && r.push("Alt"), e.shift && r.push("Shift");
|
|
996
|
-
else for (let t of
|
|
997
|
-
return r.push(
|
|
999
|
+
else for (let t of H) e.modifiers.includes(t) && r.push(t);
|
|
1000
|
+
return r.push(W(e.key)), r.join("+");
|
|
998
1001
|
}
|
|
999
|
-
function
|
|
1000
|
-
return
|
|
1002
|
+
function ut(e, t = V()) {
|
|
1003
|
+
return lt(G(e, t), t);
|
|
1001
1004
|
}
|
|
1002
|
-
function
|
|
1003
|
-
return
|
|
1005
|
+
function dt(e, t = V()) {
|
|
1006
|
+
return lt(e, t);
|
|
1004
1007
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return typeof e == "string" ?
|
|
1008
|
+
function ft(e, t = V()) {
|
|
1009
|
+
return typeof e == "string" ? ut(e, t) : dt(ct(e, t), t);
|
|
1007
1010
|
}
|
|
1008
|
-
function
|
|
1009
|
-
return e in
|
|
1011
|
+
function pt(e) {
|
|
1012
|
+
return e in U || e.toLowerCase() in U;
|
|
1010
1013
|
}
|
|
1011
1014
|
//#endregion
|
|
1012
1015
|
//#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/format.js
|
|
1013
|
-
function
|
|
1016
|
+
function mt(e) {
|
|
1014
1017
|
return e.join(" ");
|
|
1015
1018
|
}
|
|
1016
|
-
function
|
|
1019
|
+
function ht(e) {
|
|
1017
1020
|
let t = [];
|
|
1018
|
-
for (let n of
|
|
1021
|
+
for (let n of H) e.modifiers.includes(n) && t.push(n);
|
|
1019
1022
|
return t.push(e.key), t.join("+");
|
|
1020
1023
|
}
|
|
1021
1024
|
//#endregion
|
|
1022
1025
|
//#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/match.js
|
|
1023
|
-
function
|
|
1024
|
-
let r = typeof t == "string" ?
|
|
1026
|
+
function K(e, t, n = V()) {
|
|
1027
|
+
let r = typeof t == "string" ? G(t, n) : t;
|
|
1025
1028
|
if (e.ctrlKey !== r.ctrl || e.shiftKey !== r.shift || e.altKey !== r.alt || e.metaKey !== r.meta) return !1;
|
|
1026
|
-
let i =
|
|
1029
|
+
let i = W(e.key), a = r.key;
|
|
1027
1030
|
if (i !== "Dead" && i.length === 1 && a.length === 1) {
|
|
1028
1031
|
if (i.toUpperCase() === a.toUpperCase()) return !0;
|
|
1029
|
-
if (
|
|
1032
|
+
if (st(i) && (/^[A-Za-z]$/.test(i) || !e.altKey)) return !1;
|
|
1030
1033
|
}
|
|
1031
1034
|
if (e.code && (i === "Dead" || i.length === 1 && a.length === 1)) {
|
|
1032
1035
|
if (e.code.startsWith("Key")) {
|
|
@@ -1037,13 +1040,13 @@ function q(e, t, n = H()) {
|
|
|
1037
1040
|
let t = e.code.slice(5);
|
|
1038
1041
|
if (t.length === 1 && /^[0-9]$/.test(t)) return t === a;
|
|
1039
1042
|
}
|
|
1040
|
-
return e.code in
|
|
1043
|
+
return e.code in at ? at[e.code] === a : !1;
|
|
1041
1044
|
}
|
|
1042
1045
|
return i === a;
|
|
1043
1046
|
}
|
|
1044
1047
|
//#endregion
|
|
1045
1048
|
//#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/manager.utils.js
|
|
1046
|
-
var
|
|
1049
|
+
var gt = {
|
|
1047
1050
|
preventDefault: !0,
|
|
1048
1051
|
stopPropagation: !0,
|
|
1049
1052
|
eventType: "keydown",
|
|
@@ -1051,10 +1054,10 @@ var pt = {
|
|
|
1051
1054
|
ignoreInputs: !0,
|
|
1052
1055
|
conflictBehavior: "warn"
|
|
1053
1056
|
};
|
|
1054
|
-
function
|
|
1057
|
+
function _t(e) {
|
|
1055
1058
|
return !(e.ctrl || e.meta || e.key === "Escape");
|
|
1056
1059
|
}
|
|
1057
|
-
function
|
|
1060
|
+
function vt(e) {
|
|
1058
1061
|
if (!e) return !1;
|
|
1059
1062
|
if (e instanceof HTMLInputElement) {
|
|
1060
1063
|
let t = e.type.toLowerCase();
|
|
@@ -1062,17 +1065,17 @@ function ht(e) {
|
|
|
1062
1065
|
}
|
|
1063
1066
|
return !!(e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement || e instanceof HTMLElement && e.isContentEditable);
|
|
1064
1067
|
}
|
|
1065
|
-
function
|
|
1068
|
+
function yt(e) {
|
|
1066
1069
|
return typeof document > "u" ? null : typeof Document < "u" && e instanceof Document || typeof Node < "u" && e.nodeType === Node.DOCUMENT_NODE ? e.activeElement : typeof HTMLElement < "u" && e instanceof HTMLElement ? e.ownerDocument.activeElement ?? null : e.document.activeElement ?? null;
|
|
1067
1070
|
}
|
|
1068
|
-
function
|
|
1069
|
-
let r =
|
|
1070
|
-
return r &&
|
|
1071
|
+
function bt(e, t, n) {
|
|
1072
|
+
let r = yt(t);
|
|
1073
|
+
return r && vt(r) && r !== n || e.composedPath().some((e) => vt(e) && e !== n) ? !0 : vt(e.target) && e.target !== n;
|
|
1071
1074
|
}
|
|
1072
|
-
function
|
|
1075
|
+
function xt(e, t) {
|
|
1073
1076
|
return t === document || t === window ? e.currentTarget === t || e.currentTarget === document.documentElement : t === window ? e.currentTarget === window || e.currentTarget === document || e.currentTarget === document.documentElement : !!(t instanceof HTMLElement && (e.currentTarget === t || e.target instanceof Node && t.contains(e.target)));
|
|
1074
1077
|
}
|
|
1075
|
-
function
|
|
1078
|
+
function St(e, t, n, r) {
|
|
1076
1079
|
if (n !== "allow") {
|
|
1077
1080
|
if (n === "warn") {
|
|
1078
1081
|
console.warn(`'${t}' is already registered. Multiple handlers will be triggered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to suppress this warning.`);
|
|
@@ -1084,11 +1087,11 @@ function yt(e, t, n, r) {
|
|
|
1084
1087
|
}
|
|
1085
1088
|
//#endregion
|
|
1086
1089
|
//#region ../../../node_modules/.pnpm/@tanstack+store@0.11.0/node_modules/@tanstack/store/dist/alien.js
|
|
1087
|
-
var
|
|
1090
|
+
var q = /* @__PURE__ */ function(e) {
|
|
1088
1091
|
return e[e.None = 0] = "None", e[e.Mutable = 1] = "Mutable", e[e.Watching = 2] = "Watching", e[e.RecursedCheck = 4] = "RecursedCheck", e[e.Recursed = 8] = "Recursed", e[e.Dirty = 16] = "Dirty", e[e.Pending = 32] = "Pending", e;
|
|
1089
1092
|
}({});
|
|
1090
1093
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1091
|
-
function
|
|
1094
|
+
function Ct({ update: e, notify: t, unwatched: n }) {
|
|
1092
1095
|
return {
|
|
1093
1096
|
link: r,
|
|
1094
1097
|
unlink: i,
|
|
@@ -1125,7 +1128,7 @@ function bt({ update: e, notify: t, unwatched: n }) {
|
|
|
1125
1128
|
let n = e.nextSub, r;
|
|
1126
1129
|
top: do {
|
|
1127
1130
|
let i = e.sub, a = i.flags;
|
|
1128
|
-
if (a & (
|
|
1131
|
+
if (a & (q.RecursedCheck | q.Recursed | q.Dirty | q.Pending) ? a & (q.RecursedCheck | q.Recursed) ? a & q.RecursedCheck ? !(a & (q.Dirty | q.Pending)) && c(e, i) ? (i.flags = a | (q.Recursed | q.Pending), a &= q.Mutable) : a = q.None : i.flags = a & ~q.Recursed | q.Pending : a = q.None : i.flags = a | q.Pending, a & q.Watching && t(i), a & q.Mutable) {
|
|
1129
1132
|
let t = i.subs;
|
|
1130
1133
|
if (t !== void 0) {
|
|
1131
1134
|
let i = (e = t).nextSub;
|
|
@@ -1151,13 +1154,13 @@ function bt({ update: e, notify: t, unwatched: n }) {
|
|
|
1151
1154
|
let r, i = 0, a = !1;
|
|
1152
1155
|
top: do {
|
|
1153
1156
|
let o = t.dep, c = o.flags;
|
|
1154
|
-
if (n.flags &
|
|
1155
|
-
else if ((c & (
|
|
1157
|
+
if (n.flags & q.Dirty) a = !0;
|
|
1158
|
+
else if ((c & (q.Mutable | q.Dirty)) === (q.Mutable | q.Dirty)) {
|
|
1156
1159
|
if (e(o)) {
|
|
1157
1160
|
let e = o.subs;
|
|
1158
1161
|
e.nextSub !== void 0 && s(e), a = !0;
|
|
1159
1162
|
}
|
|
1160
|
-
} else if ((c & (
|
|
1163
|
+
} else if ((c & (q.Mutable | q.Pending)) === (q.Mutable | q.Pending)) {
|
|
1161
1164
|
(t.nextSub !== void 0 || t.prevSub !== void 0) && (r = {
|
|
1162
1165
|
value: t,
|
|
1163
1166
|
prev: r
|
|
@@ -1179,7 +1182,7 @@ function bt({ update: e, notify: t, unwatched: n }) {
|
|
|
1179
1182
|
continue;
|
|
1180
1183
|
}
|
|
1181
1184
|
a = !1;
|
|
1182
|
-
} else n.flags &= ~
|
|
1185
|
+
} else n.flags &= ~q.Pending;
|
|
1183
1186
|
n = t.sub;
|
|
1184
1187
|
let c = t.nextDep;
|
|
1185
1188
|
if (c !== void 0) {
|
|
@@ -1193,7 +1196,7 @@ function bt({ update: e, notify: t, unwatched: n }) {
|
|
|
1193
1196
|
function s(e) {
|
|
1194
1197
|
do {
|
|
1195
1198
|
let n = e.sub, r = n.flags;
|
|
1196
|
-
(r & (
|
|
1199
|
+
(r & (q.Pending | q.Dirty)) === q.Pending && (n.flags = r | q.Dirty, (r & (q.Watching | q.RecursedCheck)) === q.Watching && t(n));
|
|
1197
1200
|
} while ((e = e.nextSub) !== void 0);
|
|
1198
1201
|
}
|
|
1199
1202
|
function c(e, t) {
|
|
@@ -1207,7 +1210,7 @@ function bt({ update: e, notify: t, unwatched: n }) {
|
|
|
1207
1210
|
}
|
|
1208
1211
|
//#endregion
|
|
1209
1212
|
//#region ../../../node_modules/.pnpm/@tanstack+store@0.11.0/node_modules/@tanstack/store/dist/atom.js
|
|
1210
|
-
function
|
|
1213
|
+
function wt(e, t, n) {
|
|
1211
1214
|
let r = typeof e == "object", i = r ? e : void 0;
|
|
1212
1215
|
return {
|
|
1213
1216
|
next: (r ? e.next : e)?.bind(i),
|
|
@@ -1215,43 +1218,43 @@ function xt(e, t, n) {
|
|
|
1215
1218
|
complete: (r ? e.complete : n)?.bind(i)
|
|
1216
1219
|
};
|
|
1217
1220
|
}
|
|
1218
|
-
var
|
|
1221
|
+
var Tt = [], J = 0, { link: Et, unlink: Dt, propagate: Ot, checkDirty: kt, shallowPropagate: At } = /* @__PURE__ */ Ct({
|
|
1219
1222
|
update(e) {
|
|
1220
1223
|
return e._update();
|
|
1221
1224
|
},
|
|
1222
1225
|
notify(e) {
|
|
1223
|
-
|
|
1226
|
+
Tt[jt++] = e, e.flags &= ~q.Watching;
|
|
1224
1227
|
},
|
|
1225
1228
|
unwatched(e) {
|
|
1226
|
-
e.depsTail !== void 0 && (e.depsTail = void 0, e.flags =
|
|
1229
|
+
e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = q.Mutable | q.Dirty, Z(e));
|
|
1227
1230
|
}
|
|
1228
|
-
}),
|
|
1229
|
-
function
|
|
1231
|
+
}), Y = 0, jt = 0, X, Mt = 0;
|
|
1232
|
+
function Z(e) {
|
|
1230
1233
|
let t = e.depsTail, n = t === void 0 ? e.deps : t.nextDep;
|
|
1231
|
-
for (; n !== void 0;) n =
|
|
1234
|
+
for (; n !== void 0;) n = Dt(n, e);
|
|
1232
1235
|
}
|
|
1233
|
-
function
|
|
1234
|
-
if (!(
|
|
1235
|
-
for (;
|
|
1236
|
-
let e =
|
|
1237
|
-
|
|
1236
|
+
function Nt() {
|
|
1237
|
+
if (!(Mt > 0)) {
|
|
1238
|
+
for (; Y < jt;) {
|
|
1239
|
+
let e = Tt[Y];
|
|
1240
|
+
Tt[Y++] = void 0, e.notify();
|
|
1238
1241
|
}
|
|
1239
|
-
|
|
1242
|
+
Y = 0, jt = 0;
|
|
1240
1243
|
}
|
|
1241
1244
|
}
|
|
1242
|
-
function
|
|
1245
|
+
function Pt(e, t) {
|
|
1243
1246
|
let n = typeof e == "function", r = e, i = {
|
|
1244
1247
|
_snapshot: n ? void 0 : e,
|
|
1245
1248
|
subs: void 0,
|
|
1246
1249
|
subsTail: void 0,
|
|
1247
1250
|
deps: void 0,
|
|
1248
1251
|
depsTail: void 0,
|
|
1249
|
-
flags: n ?
|
|
1252
|
+
flags: n ? q.None : q.Mutable,
|
|
1250
1253
|
get() {
|
|
1251
|
-
return
|
|
1254
|
+
return X !== void 0 && Et(i, X, J), i._snapshot;
|
|
1252
1255
|
},
|
|
1253
1256
|
subscribe(e) {
|
|
1254
|
-
let t =
|
|
1257
|
+
let t = wt(e), n = { current: !1 }, r = Ft(() => {
|
|
1255
1258
|
i.get(), n.current ? t.next?.(i._snapshot) : n.current = !0;
|
|
1256
1259
|
});
|
|
1257
1260
|
return { unsubscribe: () => {
|
|
@@ -1259,64 +1262,64 @@ function Mt(e, t) {
|
|
|
1259
1262
|
} };
|
|
1260
1263
|
},
|
|
1261
1264
|
_update(e) {
|
|
1262
|
-
let a =
|
|
1263
|
-
if (n)
|
|
1265
|
+
let a = X, o = t?.compare ?? Object.is;
|
|
1266
|
+
if (n) X = i, ++J, i.depsTail = void 0;
|
|
1264
1267
|
else if (e === void 0) return !1;
|
|
1265
|
-
n && (i.flags =
|
|
1268
|
+
n && (i.flags = q.Mutable | q.RecursedCheck);
|
|
1266
1269
|
try {
|
|
1267
1270
|
let t = i._snapshot, a = typeof e == "function" ? e(t) : e === void 0 && n ? r(t) : e;
|
|
1268
1271
|
return t === void 0 || !o(t, a) ? (i._snapshot = a, !0) : !1;
|
|
1269
1272
|
} finally {
|
|
1270
|
-
|
|
1273
|
+
X = a, n && (i.flags &= ~q.RecursedCheck), Z(i);
|
|
1271
1274
|
}
|
|
1272
1275
|
}
|
|
1273
1276
|
};
|
|
1274
|
-
return n ? (i.flags =
|
|
1277
|
+
return n ? (i.flags = q.Mutable | q.Dirty, i.get = function() {
|
|
1275
1278
|
let e = i.flags;
|
|
1276
|
-
if (e &
|
|
1279
|
+
if (e & q.Dirty || e & q.Pending && kt(i.deps, i)) {
|
|
1277
1280
|
if (i._update()) {
|
|
1278
1281
|
let e = i.subs;
|
|
1279
|
-
e !== void 0 &&
|
|
1282
|
+
e !== void 0 && At(e);
|
|
1280
1283
|
}
|
|
1281
|
-
} else e &
|
|
1282
|
-
return
|
|
1284
|
+
} else e & q.Pending && (i.flags = e & ~q.Pending);
|
|
1285
|
+
return X !== void 0 && Et(i, X, J), i._snapshot;
|
|
1283
1286
|
}) : i.set = function(e) {
|
|
1284
1287
|
if (i._update(e)) {
|
|
1285
1288
|
let e = i.subs;
|
|
1286
|
-
e !== void 0 && (
|
|
1289
|
+
e !== void 0 && (Ot(e), At(e), Nt());
|
|
1287
1290
|
}
|
|
1288
1291
|
}, i;
|
|
1289
1292
|
}
|
|
1290
|
-
function
|
|
1293
|
+
function Ft(e) {
|
|
1291
1294
|
let t = () => {
|
|
1292
|
-
let t =
|
|
1293
|
-
|
|
1295
|
+
let t = X;
|
|
1296
|
+
X = n, ++J, n.depsTail = void 0, n.flags = q.Watching | q.RecursedCheck;
|
|
1294
1297
|
try {
|
|
1295
1298
|
return e();
|
|
1296
1299
|
} finally {
|
|
1297
|
-
|
|
1300
|
+
X = t, n.flags &= ~q.RecursedCheck, Z(n);
|
|
1298
1301
|
}
|
|
1299
1302
|
}, n = {
|
|
1300
1303
|
deps: void 0,
|
|
1301
1304
|
depsTail: void 0,
|
|
1302
1305
|
subs: void 0,
|
|
1303
1306
|
subsTail: void 0,
|
|
1304
|
-
flags:
|
|
1307
|
+
flags: q.Watching | q.RecursedCheck,
|
|
1305
1308
|
notify() {
|
|
1306
1309
|
let e = this.flags;
|
|
1307
|
-
e &
|
|
1310
|
+
e & q.Dirty || e & q.Pending && kt(this.deps, this) ? t() : this.flags = q.Watching;
|
|
1308
1311
|
},
|
|
1309
1312
|
stop() {
|
|
1310
|
-
this.flags =
|
|
1313
|
+
this.flags = q.None, this.depsTail = void 0, Z(this);
|
|
1311
1314
|
}
|
|
1312
1315
|
};
|
|
1313
1316
|
return t(), n;
|
|
1314
1317
|
}
|
|
1315
1318
|
//#endregion
|
|
1316
1319
|
//#region ../../../node_modules/.pnpm/@tanstack+store@0.11.0/node_modules/@tanstack/store/dist/store.js
|
|
1317
|
-
var
|
|
1320
|
+
var It = class {
|
|
1318
1321
|
constructor(e, t) {
|
|
1319
|
-
this.atom =
|
|
1322
|
+
this.atom = Pt(e), this.get = this.get.bind(this), this.setState = this.setState.bind(this), this.subscribe = this.subscribe.bind(this), t && (this.actions = t(this));
|
|
1320
1323
|
}
|
|
1321
1324
|
setState(e) {
|
|
1322
1325
|
this.atom.set(e);
|
|
@@ -1328,19 +1331,19 @@ var Pt = class {
|
|
|
1328
1331
|
return this.state;
|
|
1329
1332
|
}
|
|
1330
1333
|
subscribe(e) {
|
|
1331
|
-
return this.atom.subscribe(
|
|
1334
|
+
return this.atom.subscribe(wt(e));
|
|
1332
1335
|
}
|
|
1333
|
-
},
|
|
1334
|
-
function
|
|
1335
|
-
return `hotkey_${++
|
|
1336
|
+
}, Lt = 0;
|
|
1337
|
+
function Rt() {
|
|
1338
|
+
return `hotkey_${++Lt}`;
|
|
1336
1339
|
}
|
|
1337
|
-
var
|
|
1340
|
+
var zt = class e {
|
|
1338
1341
|
static #e = null;
|
|
1339
1342
|
#t;
|
|
1340
1343
|
#n = /* @__PURE__ */ new Map();
|
|
1341
1344
|
#r = /* @__PURE__ */ new Map();
|
|
1342
1345
|
constructor() {
|
|
1343
|
-
this.registrations = new
|
|
1346
|
+
this.registrations = new It(/* @__PURE__ */ new Map()), this.#t = V();
|
|
1344
1347
|
}
|
|
1345
1348
|
static getInstance() {
|
|
1346
1349
|
return e.#e ||= new e(), e.#e;
|
|
@@ -1352,7 +1355,7 @@ var Lt = class e {
|
|
|
1352
1355
|
if (typeof document > "u" && !n.target) {
|
|
1353
1356
|
let e = t;
|
|
1354
1357
|
return {
|
|
1355
|
-
id:
|
|
1358
|
+
id: Rt(),
|
|
1356
1359
|
unregister: () => {},
|
|
1357
1360
|
get callback() {
|
|
1358
1361
|
return e;
|
|
@@ -1366,15 +1369,15 @@ var Lt = class e {
|
|
|
1366
1369
|
}
|
|
1367
1370
|
};
|
|
1368
1371
|
}
|
|
1369
|
-
let r =
|
|
1370
|
-
l &&
|
|
1371
|
-
let u = n.ignoreInputs ??
|
|
1372
|
+
let r = Rt(), i = n.platform ?? this.#t, a = typeof e == "string" ? G(e, i) : ct(e, i), o = typeof e == "string" ? e : ht(a), s = n.target ?? document, c = n.conflictBehavior ?? "warn", l = this.#d(o, s);
|
|
1373
|
+
l && St(l.id, o, c, (e) => this.#i(e));
|
|
1374
|
+
let u = n.ignoreInputs ?? _t(a), d = {
|
|
1372
1375
|
id: r,
|
|
1373
1376
|
hotkey: o,
|
|
1374
1377
|
parsedHotkey: a,
|
|
1375
1378
|
callback: t,
|
|
1376
1379
|
options: {
|
|
1377
|
-
...
|
|
1380
|
+
...gt,
|
|
1378
1381
|
requireReset: !1,
|
|
1379
1382
|
...n,
|
|
1380
1383
|
platform: i,
|
|
@@ -1449,10 +1452,10 @@ var Lt = class e {
|
|
|
1449
1452
|
let r = this.#r.get(t);
|
|
1450
1453
|
if (r) for (let i of r) {
|
|
1451
1454
|
let r = this.registrations.state.get(i);
|
|
1452
|
-
if (r &&
|
|
1455
|
+
if (r && xt(e, t) && r.options.enabled && !(r.options.ignoreInputs !== !1 && bt(e, t, r.target))) if (n === "keydown") {
|
|
1453
1456
|
if (r.options.eventType !== "keydown") continue;
|
|
1454
|
-
|
|
1455
|
-
} else r.options.eventType === "keyup" &&
|
|
1457
|
+
K(e, r.parsedHotkey, r.options.platform) && (r.options.preventDefault && e.preventDefault(), r.options.stopPropagation && e.stopPropagation(), (!r.options.requireReset || !r.hasFired) && (this.#c(r, e), r.options.requireReset && (r.hasFired = !0)));
|
|
1458
|
+
} else r.options.eventType === "keyup" && K(e, r.parsedHotkey, r.options.platform) && this.#c(r, e), r.options.requireReset && r.hasFired && this.#f(r, e) && (r.hasFired = !1);
|
|
1456
1459
|
}
|
|
1457
1460
|
}
|
|
1458
1461
|
#c(e, t) {
|
|
@@ -1478,7 +1481,7 @@ var Lt = class e {
|
|
|
1478
1481
|
return null;
|
|
1479
1482
|
}
|
|
1480
1483
|
#f(e, t) {
|
|
1481
|
-
let n = e.parsedHotkey, r =
|
|
1484
|
+
let n = e.parsedHotkey, r = W(t.key), i = n.key.length === 1 ? n.key.toUpperCase() : n.key;
|
|
1482
1485
|
return !!((r.length === 1 ? r.toUpperCase() : r) === i || n.ctrl && r === "Control" || n.shift && r === "Shift" || n.alt && r === "Alt" || n.meta && r === "Meta");
|
|
1483
1486
|
}
|
|
1484
1487
|
triggerRegistration(e) {
|
|
@@ -1510,19 +1513,19 @@ var Lt = class e {
|
|
|
1510
1513
|
this.registrations.setState(() => /* @__PURE__ */ new Map()), this.#n.clear(), this.#r.clear();
|
|
1511
1514
|
}
|
|
1512
1515
|
};
|
|
1513
|
-
function
|
|
1514
|
-
return
|
|
1516
|
+
function Bt() {
|
|
1517
|
+
return zt.getInstance();
|
|
1515
1518
|
}
|
|
1516
1519
|
//#endregion
|
|
1517
1520
|
//#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/sequence-manager.js
|
|
1518
|
-
var
|
|
1519
|
-
function
|
|
1520
|
-
return `sequence_${++
|
|
1521
|
+
var Vt = 1e3, Ht = 0;
|
|
1522
|
+
function Ut() {
|
|
1523
|
+
return `sequence_${++Ht}`;
|
|
1521
1524
|
}
|
|
1522
|
-
function
|
|
1525
|
+
function Wt(e) {
|
|
1523
1526
|
return e.join("|");
|
|
1524
1527
|
}
|
|
1525
|
-
function
|
|
1528
|
+
function Gt(e) {
|
|
1526
1529
|
let t = e.parsedSequence.length, n = e.currentIndex > 0 && e.currentIndex < t;
|
|
1527
1530
|
return {
|
|
1528
1531
|
id: e.id,
|
|
@@ -1535,14 +1538,14 @@ function Ut(e) {
|
|
|
1535
1538
|
partialMatchLastKeyTime: n ? e.lastKeyTime : 0
|
|
1536
1539
|
};
|
|
1537
1540
|
}
|
|
1538
|
-
var
|
|
1541
|
+
var Kt = class e {
|
|
1539
1542
|
static #e = null;
|
|
1540
1543
|
#t = /* @__PURE__ */ new Map();
|
|
1541
1544
|
#n = /* @__PURE__ */ new Map();
|
|
1542
1545
|
#r = /* @__PURE__ */ new Map();
|
|
1543
1546
|
#i;
|
|
1544
1547
|
constructor() {
|
|
1545
|
-
this.registrations = new
|
|
1548
|
+
this.registrations = new It(/* @__PURE__ */ new Map()), this.#i = V();
|
|
1546
1549
|
}
|
|
1547
1550
|
static getInstance() {
|
|
1548
1551
|
return e.#e ||= new e(), e.#e;
|
|
@@ -1551,20 +1554,20 @@ var Wt = class e {
|
|
|
1551
1554
|
e.#e &&= (e.#e.destroy(), null);
|
|
1552
1555
|
}
|
|
1553
1556
|
#a(e) {
|
|
1554
|
-
this.registrations.setState((t) => new Map(t).set(e.id,
|
|
1557
|
+
this.registrations.setState((t) => new Map(t).set(e.id, Gt(e)));
|
|
1555
1558
|
}
|
|
1556
1559
|
register(e, t, n = {}) {
|
|
1557
1560
|
if (e.length === 0) throw Error("Sequence must contain at least one hotkey");
|
|
1558
|
-
let r =
|
|
1559
|
-
c &&
|
|
1560
|
-
let l = a[0], u = n.ignoreInputs ??
|
|
1561
|
+
let r = Ut(), i = n.platform ?? this.#i, a = e.map((e) => G(e, i)), o = n.target ?? (typeof document < "u" ? document : {}), s = n.conflictBehavior ?? "warn", c = this.#f(e, o);
|
|
1562
|
+
c && St(c.id, mt(e), s, (e) => this.#o(e));
|
|
1563
|
+
let l = a[0], u = n.ignoreInputs ?? _t(l), d = {
|
|
1561
1564
|
id: r,
|
|
1562
1565
|
sequence: e,
|
|
1563
1566
|
parsedSequence: a,
|
|
1564
1567
|
callback: t,
|
|
1565
1568
|
options: {
|
|
1566
|
-
...
|
|
1567
|
-
timeout:
|
|
1569
|
+
...gt,
|
|
1570
|
+
timeout: Vt,
|
|
1568
1571
|
...n,
|
|
1569
1572
|
platform: i,
|
|
1570
1573
|
ignoreInputs: u
|
|
@@ -1575,7 +1578,7 @@ var Wt = class e {
|
|
|
1575
1578
|
triggerCount: 0,
|
|
1576
1579
|
hasFired: !1
|
|
1577
1580
|
};
|
|
1578
|
-
this.#t.set(r, d), this.registrations.setState((e) => new Map(e).set(r,
|
|
1581
|
+
this.#t.set(r, d), this.registrations.setState((e) => new Map(e).set(r, Gt(d))), this.#r.has(o) || this.#r.set(o, /* @__PURE__ */ new Set()), this.#r.get(o).add(r), this.#s(o);
|
|
1579
1582
|
let f = this;
|
|
1580
1583
|
return {
|
|
1581
1584
|
get id() {
|
|
@@ -1596,7 +1599,7 @@ var Wt = class e {
|
|
|
1596
1599
|
t && (t.options = {
|
|
1597
1600
|
...t.options,
|
|
1598
1601
|
...e
|
|
1599
|
-
}, f.registrations.setState((e) => new Map(e).set(r,
|
|
1602
|
+
}, f.registrations.setState((e) => new Map(e).set(r, Gt(t))));
|
|
1600
1603
|
},
|
|
1601
1604
|
unregister: () => {
|
|
1602
1605
|
f.#o(r);
|
|
@@ -1638,20 +1641,20 @@ var Wt = class e {
|
|
|
1638
1641
|
};
|
|
1639
1642
|
}
|
|
1640
1643
|
#d(e, t, n) {
|
|
1641
|
-
if (
|
|
1644
|
+
if (pt(W(e.key))) return;
|
|
1642
1645
|
let r = this.#r.get(t);
|
|
1643
1646
|
if (!r) return;
|
|
1644
1647
|
let i = Date.now();
|
|
1645
1648
|
registrationIds: for (let a of r) {
|
|
1646
1649
|
let r = this.#t.get(a);
|
|
1647
|
-
if (!r || !
|
|
1648
|
-
if (r.options.ignoreInputs !== !1 &&
|
|
1650
|
+
if (!r || !xt(e, t) || !r.options.enabled) continue;
|
|
1651
|
+
if (r.options.ignoreInputs !== !1 && bt(e, t, r.target)) continue registrationIds;
|
|
1649
1652
|
if (r.options.eventType !== n) continue;
|
|
1650
1653
|
let o = r.options.timeout ?? 1e3;
|
|
1651
1654
|
r.currentIndex > 0 && i - r.lastKeyTime > o && (r.currentIndex = 0, this.#a(r));
|
|
1652
1655
|
let s = r.parsedSequence[r.currentIndex];
|
|
1653
1656
|
if (s) {
|
|
1654
|
-
if (
|
|
1657
|
+
if (K(e, s, r.options.platform)) if (r.lastKeyTime = i, r.currentIndex++, r.currentIndex >= r.parsedSequence.length) {
|
|
1655
1658
|
r.options.preventDefault && e.preventDefault(), r.options.stopPropagation && e.stopPropagation();
|
|
1656
1659
|
let t = {
|
|
1657
1660
|
hotkey: r.sequence.join(" "),
|
|
@@ -1661,14 +1664,14 @@ var Wt = class e {
|
|
|
1661
1664
|
} else this.#a(r);
|
|
1662
1665
|
else if (r.currentIndex > 0) {
|
|
1663
1666
|
let t = r.parsedSequence[0];
|
|
1664
|
-
|
|
1667
|
+
K(e, t, r.options.platform) ? (r.currentIndex = 1, r.lastKeyTime = i) : r.currentIndex = 0, this.#a(r);
|
|
1665
1668
|
}
|
|
1666
1669
|
}
|
|
1667
1670
|
}
|
|
1668
1671
|
}
|
|
1669
1672
|
#f(e, t) {
|
|
1670
|
-
let n =
|
|
1671
|
-
for (let e of this.#t.values()) if (
|
|
1673
|
+
let n = Wt(e);
|
|
1674
|
+
for (let e of this.#t.values()) if (Wt(e.sequence) === n && e.target === t) return e;
|
|
1672
1675
|
return null;
|
|
1673
1676
|
}
|
|
1674
1677
|
resetAll() {
|
|
@@ -1703,20 +1706,20 @@ var Wt = class e {
|
|
|
1703
1706
|
this.#t.clear(), this.registrations.setState(() => /* @__PURE__ */ new Map());
|
|
1704
1707
|
}
|
|
1705
1708
|
};
|
|
1706
|
-
function
|
|
1707
|
-
return
|
|
1709
|
+
function qt() {
|
|
1710
|
+
return Kt.getInstance();
|
|
1708
1711
|
}
|
|
1709
1712
|
//#endregion
|
|
1710
1713
|
//#region ../../../node_modules/.pnpm/@tanstack+vue-hotkeys@0.10.0_vue@3.5.27_typescript@5.9.3_/node_modules/@tanstack/vue-hotkeys/dist/useHotkeys.js
|
|
1711
|
-
function
|
|
1712
|
-
let n =
|
|
1714
|
+
function Jt(e, t = {}) {
|
|
1715
|
+
let n = Ze(), r = Bt(), i = /* @__PURE__ */ new Map(), a = _(() => {
|
|
1713
1716
|
let r = Q(e), i = Q(t);
|
|
1714
1717
|
return r.map((e, t) => {
|
|
1715
1718
|
let r = Q(e.hotkey), a = e.options ? Q(e.options) : {}, o = {
|
|
1716
1719
|
...n.hotkey,
|
|
1717
1720
|
...i,
|
|
1718
1721
|
...a
|
|
1719
|
-
}, s =
|
|
1722
|
+
}, s = ft(r, o.platform ?? V()), c = o.enabled === void 0 ? void 0 : Q(o.enabled), l = o.target === void 0 ? void 0 : Q(o.target);
|
|
1720
1723
|
return {
|
|
1721
1724
|
index: t,
|
|
1722
1725
|
hotkeyString: s,
|
|
@@ -1775,15 +1778,15 @@ function Q(e) {
|
|
|
1775
1778
|
}
|
|
1776
1779
|
//#endregion
|
|
1777
1780
|
//#region ../../../node_modules/.pnpm/@tanstack+vue-hotkeys@0.10.0_vue@3.5.27_typescript@5.9.3_/node_modules/@tanstack/vue-hotkeys/dist/useHotkeySequences.js
|
|
1778
|
-
function
|
|
1779
|
-
let n =
|
|
1781
|
+
function Yt(e, t = {}) {
|
|
1782
|
+
let n = Ze(), r = qt(), i = /* @__PURE__ */ new Map(), a = _(() => {
|
|
1780
1783
|
let r = $(e), i = $(t);
|
|
1781
1784
|
return r.map((e, t) => {
|
|
1782
1785
|
let r = $(e.sequence), a = e.options ? $(e.options) : {}, o = {
|
|
1783
1786
|
...n.hotkeySequence,
|
|
1784
1787
|
...i,
|
|
1785
1788
|
...a
|
|
1786
|
-
}, s =
|
|
1789
|
+
}, s = mt(r), c = o.enabled === void 0 ? void 0 : $(o.enabled), l = o.target === void 0 ? void 0 : $(o.target);
|
|
1787
1790
|
return {
|
|
1788
1791
|
index: t,
|
|
1789
1792
|
resolvedSequence: r,
|
|
@@ -1844,7 +1847,7 @@ function $(e) {
|
|
|
1844
1847
|
}
|
|
1845
1848
|
//#endregion
|
|
1846
1849
|
//#region src/stores/actionRegistry.store.ts
|
|
1847
|
-
var
|
|
1850
|
+
var Xt = y("actionRegistry", () => {
|
|
1848
1851
|
let e = p([]), t = p(/* @__PURE__ */ new Map()), n = 1;
|
|
1849
1852
|
function r() {
|
|
1850
1853
|
return [...e.value, ...t.value.values().map((e) => e)];
|
|
@@ -1868,14 +1871,14 @@ var Jt = y("actionRegistry", () => {
|
|
|
1868
1871
|
});
|
|
1869
1872
|
//#endregion
|
|
1870
1873
|
//#region src/composables/actionShortcuts.composable.ts
|
|
1871
|
-
function*
|
|
1874
|
+
function* Zt(e, t) {
|
|
1872
1875
|
for (let n of e) {
|
|
1873
1876
|
if (yield n, n.subActionsHaveKeyboardShortcuts !== !0 || n.subActions === void 0) continue;
|
|
1874
1877
|
let e = n.subActions(t);
|
|
1875
|
-
Array.isArray(e) ? yield*
|
|
1878
|
+
Array.isArray(e) ? yield* Zt(e, t) : typeof e == "object" && e && "actions" in e && Array.isArray(e.actions) && (yield* Zt(e.actions, t));
|
|
1876
1879
|
}
|
|
1877
1880
|
}
|
|
1878
|
-
function
|
|
1881
|
+
function Qt(e) {
|
|
1879
1882
|
return [
|
|
1880
1883
|
e.key,
|
|
1881
1884
|
e.alt === !0 ? "alt" : "",
|
|
@@ -1885,8 +1888,8 @@ function Xt(e) {
|
|
|
1885
1888
|
e.shift === !0 ? "shift" : ""
|
|
1886
1889
|
].filter(Boolean).join("+");
|
|
1887
1890
|
}
|
|
1888
|
-
function
|
|
1889
|
-
let t =
|
|
1891
|
+
function $t(e) {
|
|
1892
|
+
let t = Xt(), n = R();
|
|
1890
1893
|
function r(t) {
|
|
1891
1894
|
return () => {
|
|
1892
1895
|
let r = e ? e() : n.actionContext({});
|
|
@@ -1901,11 +1904,11 @@ function Zt(e) {
|
|
|
1901
1904
|
}
|
|
1902
1905
|
};
|
|
1903
1906
|
}
|
|
1904
|
-
|
|
1907
|
+
Jt(() => {
|
|
1905
1908
|
let i = /* @__PURE__ */ new Map(), a = e ? e() : n.actionContext({});
|
|
1906
|
-
for (let e of
|
|
1909
|
+
for (let e of Zt(t.allActions(), a)) {
|
|
1907
1910
|
if (e.keyboardShortcut === void 0 || "sequence" in e.keyboardShortcut) continue;
|
|
1908
|
-
let t = e.keyboardShortcut, n =
|
|
1911
|
+
let t = e.keyboardShortcut, n = Qt(t);
|
|
1909
1912
|
i.has(n) || i.set(n, []), i.get(n).push(e);
|
|
1910
1913
|
}
|
|
1911
1914
|
return Array.from(i.values()).map((e) => {
|
|
@@ -1927,9 +1930,9 @@ function Zt(e) {
|
|
|
1927
1930
|
}
|
|
1928
1931
|
};
|
|
1929
1932
|
});
|
|
1930
|
-
}, { conflictBehavior: "allow" }),
|
|
1933
|
+
}, { conflictBehavior: "allow" }), Yt(() => {
|
|
1931
1934
|
let i = /* @__PURE__ */ new Map(), a = e ? e() : n.actionContext({});
|
|
1932
|
-
for (let e of
|
|
1935
|
+
for (let e of Zt(t.allActions(), a)) {
|
|
1933
1936
|
if (e.keyboardShortcut === void 0 || !("sequence" in e.keyboardShortcut)) continue;
|
|
1934
1937
|
let t = e.keyboardShortcut.sequence.join(",");
|
|
1935
1938
|
i.has(t) || i.set(t, []), i.get(t).push(e);
|
|
@@ -1950,85 +1953,87 @@ function Zt(e) {
|
|
|
1950
1953
|
}
|
|
1951
1954
|
//#endregion
|
|
1952
1955
|
//#region src/composables/commandMenuActions.composable.ts
|
|
1953
|
-
function
|
|
1954
|
-
let
|
|
1955
|
-
function
|
|
1956
|
-
return
|
|
1956
|
+
function en({ isGroupingDisabled: e, actionsSnapshot: n, focusedModelsSnapshot: r, listboxContentRef: i, listboxRootRef: a, manager: o, navStack: s, searchInput: c }) {
|
|
1957
|
+
let l = p(!1), u = p(!1), d = m([]), f = p({}), h = 0, g = t(() => i.value?.$el);
|
|
1958
|
+
function v(e) {
|
|
1959
|
+
return o.actionContext({
|
|
1957
1960
|
menuType: "commandMenu",
|
|
1958
|
-
models:
|
|
1959
|
-
searchInput:
|
|
1961
|
+
models: r,
|
|
1962
|
+
searchInput: c.value,
|
|
1960
1963
|
subActionsMeta: e
|
|
1961
1964
|
});
|
|
1962
1965
|
}
|
|
1963
|
-
async function
|
|
1964
|
-
let t = ++
|
|
1965
|
-
|
|
1966
|
+
async function y() {
|
|
1967
|
+
let t = ++h;
|
|
1968
|
+
u.value = !1, l.value = !0;
|
|
1966
1969
|
try {
|
|
1967
|
-
let
|
|
1968
|
-
if (
|
|
1969
|
-
let e =
|
|
1970
|
-
|
|
1971
|
-
} else
|
|
1972
|
-
let
|
|
1973
|
-
t ===
|
|
1974
|
-
},
|
|
1975
|
-
t ===
|
|
1970
|
+
let r = v(), i;
|
|
1971
|
+
if (s.value.length > 0) {
|
|
1972
|
+
let e = s.value.at(-1);
|
|
1973
|
+
i = e.parentAction.subActions === void 0 ? e.actions : await Ke(e.parentAction, r, f.value);
|
|
1974
|
+
} else i = n;
|
|
1975
|
+
let a = await ke(i, r, (e) => {
|
|
1976
|
+
t === h && e.length > 0 && (d.value = e);
|
|
1977
|
+
}, s.value.at(-1)?.parentAction, e.value);
|
|
1978
|
+
t === h && (d.value = a);
|
|
1976
1979
|
} catch (e) {
|
|
1977
1980
|
throw console.error("Error refreshing actions", e), e;
|
|
1978
1981
|
} finally {
|
|
1979
|
-
t ===
|
|
1982
|
+
t === h && (l.value = !1);
|
|
1980
1983
|
}
|
|
1981
1984
|
}
|
|
1982
|
-
let
|
|
1983
|
-
return _(
|
|
1984
|
-
|
|
1985
|
+
let b = ie(y, 80);
|
|
1986
|
+
return _(c, () => {
|
|
1987
|
+
f.value = {}, u.value = !0, (i.value?.$el)?.scrollTo({
|
|
1985
1988
|
behavior: "instant",
|
|
1986
1989
|
top: 0
|
|
1987
|
-
}),
|
|
1988
|
-
}), _(
|
|
1990
|
+
}), b();
|
|
1991
|
+
}), _(e, () => {
|
|
1992
|
+
y();
|
|
1993
|
+
}), _(d, (e, t) => {
|
|
1989
1994
|
if (e.length === 0) return;
|
|
1990
|
-
let n =
|
|
1995
|
+
let n = a.value?.$el;
|
|
1991
1996
|
setTimeout(() => {
|
|
1992
|
-
(n?.querySelector("[data-highlighted]") ?? null) === null &&
|
|
1997
|
+
(n?.querySelector("[data-highlighted]") ?? null) === null && a.value?.highlightFirstItem();
|
|
1993
1998
|
}), t.length === 0 && setTimeout(() => {
|
|
1994
|
-
(
|
|
1999
|
+
(i.value?.$el)?.scrollTo({
|
|
1995
2000
|
behavior: "instant",
|
|
1996
2001
|
top: 0
|
|
1997
2002
|
});
|
|
1998
2003
|
});
|
|
1999
|
-
}), ye(
|
|
2000
|
-
let e =
|
|
2004
|
+
}), ye(g, async () => {
|
|
2005
|
+
let e = s.value.at(-1)?.parentAction;
|
|
2001
2006
|
if (e?.subActions === void 0 || e.id === void 0) return;
|
|
2002
|
-
let t =
|
|
2007
|
+
let t = f.value[e.id];
|
|
2003
2008
|
if (t == null) return;
|
|
2004
|
-
let n =
|
|
2005
|
-
if (Array.isArray(r) ||
|
|
2009
|
+
let n = v({ [e.id]: t }), r = e.subActions(n), i;
|
|
2010
|
+
if (Array.isArray(r) || z(r)) i = r;
|
|
2006
2011
|
else if (j(r)) i = await r;
|
|
2007
2012
|
else {
|
|
2008
2013
|
let e = [];
|
|
2009
2014
|
for await (let t of r) e.push(t);
|
|
2010
|
-
|
|
2015
|
+
d.value = [...d.value, ...e];
|
|
2011
2016
|
return;
|
|
2012
2017
|
}
|
|
2013
|
-
|
|
2018
|
+
d.value = [...d.value, ...B(e, i, f.value)];
|
|
2014
2019
|
}, {
|
|
2015
2020
|
canLoadMore: () => {
|
|
2016
|
-
let e =
|
|
2017
|
-
return e?.subActions === void 0 || e.id === void 0 ? !1 :
|
|
2021
|
+
let e = s.value.at(-1)?.parentAction;
|
|
2022
|
+
return e?.subActions === void 0 || e.id === void 0 ? !1 : f.value[e.id] != null;
|
|
2018
2023
|
},
|
|
2019
2024
|
distance: 40
|
|
2020
2025
|
}), {
|
|
2021
|
-
isDebouncing:
|
|
2022
|
-
isLoadingActions:
|
|
2023
|
-
buildContext:
|
|
2024
|
-
refreshActions:
|
|
2025
|
-
resolvedActions:
|
|
2026
|
-
subActionsMetaMap:
|
|
2026
|
+
isDebouncing: u,
|
|
2027
|
+
isLoadingActions: l,
|
|
2028
|
+
buildContext: v,
|
|
2029
|
+
refreshActions: y,
|
|
2030
|
+
resolvedActions: d,
|
|
2031
|
+
subActionsMetaMap: f
|
|
2027
2032
|
};
|
|
2028
2033
|
}
|
|
2029
2034
|
//#endregion
|
|
2030
2035
|
//#region src/composables/commandMenuAnimation.composable.ts
|
|
2031
|
-
function
|
|
2036
|
+
function tn(e, t) {
|
|
2032
2037
|
let n = p(!1), r = p(!1), i = null;
|
|
2033
2038
|
return _(e, (e) => {
|
|
2034
2039
|
e || (r.value = !1);
|
|
@@ -2045,7 +2050,7 @@ function $t(e, t) {
|
|
|
2045
2050
|
}
|
|
2046
2051
|
//#endregion
|
|
2047
2052
|
//#region src/composables/commandMenuNavigation.composable.ts
|
|
2048
|
-
function
|
|
2053
|
+
function nn({ isShiftKeyHeld: e, buildContext: n, emit: r, listboxRootRef: i, manager: a, navStack: o, refreshActions: s, resolvedActions: c, scrollToTopOfGroup: l, searchInput: u, subActionsMetaMap: d }) {
|
|
2049
2054
|
let f = v(), m = p(null), h = t(() => o.value.at(-1)?.parentAction ?? null), g = t(() => {
|
|
2050
2055
|
let e = n();
|
|
2051
2056
|
return o.value.filter((e) => e.parentAction.forceAsRootMenu !== !0).map((t) => {
|
|
@@ -2054,9 +2059,9 @@ function en({ isShiftKeyHeld: e, buildContext: n, emit: r, listboxRootRef: i, ma
|
|
|
2054
2059
|
});
|
|
2055
2060
|
}), _ = t(() => {
|
|
2056
2061
|
if (h.value === null) return f.t("type_a_command_or_search");
|
|
2057
|
-
let e =
|
|
2062
|
+
let e = ze(h.value, n())?.placeholder;
|
|
2058
2063
|
return e === void 0 ? f.t("search") : typeof e == "function" ? e() : e;
|
|
2059
|
-
}), { preview: y, onKeyDown: b } =
|
|
2064
|
+
}), { preview: y, onKeyDown: b } = He({
|
|
2060
2065
|
highlightedActionId: m,
|
|
2061
2066
|
getContext: n,
|
|
2062
2067
|
resolvedActions: c
|
|
@@ -2095,7 +2100,7 @@ function en({ isShiftKeyHeld: e, buildContext: n, emit: r, listboxRootRef: i, ma
|
|
|
2095
2100
|
onKeyDown: C
|
|
2096
2101
|
};
|
|
2097
2102
|
}
|
|
2098
|
-
function
|
|
2103
|
+
function rn(e, t) {
|
|
2099
2104
|
let n = [], r = e.parentAction ?? null;
|
|
2100
2105
|
for (; r !== null;) {
|
|
2101
2106
|
if (r.forceAsRootMenu === !0) return n;
|
|
@@ -2109,8 +2114,8 @@ function tn(e, t) {
|
|
|
2109
2114
|
}
|
|
2110
2115
|
//#endregion
|
|
2111
2116
|
//#region src/composables/focusedModels.composable.ts
|
|
2112
|
-
function
|
|
2113
|
-
let t =
|
|
2117
|
+
function an(e) {
|
|
2118
|
+
let t = R(), n = p(!1);
|
|
2114
2119
|
function r() {
|
|
2115
2120
|
n.value = !0, t.setFocusedModels([...t.focusedModels, ...e.value]);
|
|
2116
2121
|
}
|
|
@@ -2128,8 +2133,8 @@ function nn(e) {
|
|
|
2128
2133
|
}
|
|
2129
2134
|
//#endregion
|
|
2130
2135
|
//#region src/composables/temporaryActions.composable.ts
|
|
2131
|
-
function
|
|
2132
|
-
let r =
|
|
2136
|
+
function on(e, t, n = !1) {
|
|
2137
|
+
let r = Xt(), i = [];
|
|
2133
2138
|
function a() {
|
|
2134
2139
|
i.length > 0 || (i = (Array.isArray(e) ? e : [e]).map((e) => r.registerTemporaryAction(s(e))));
|
|
2135
2140
|
}
|
|
@@ -2155,8 +2160,8 @@ function rn(e, t, n = !1) {
|
|
|
2155
2160
|
}
|
|
2156
2161
|
//#endregion
|
|
2157
2162
|
//#region src/composables/activeModels.composable.ts
|
|
2158
|
-
function
|
|
2159
|
-
let n =
|
|
2163
|
+
function sn(e, t) {
|
|
2164
|
+
let n = R();
|
|
2160
2165
|
function r() {
|
|
2161
2166
|
t === "focused" ? n.setFocusedModels([...n.focusedModels, ...e.value]) : n.setViewModels([...n.viewModels, ...e.value]);
|
|
2162
2167
|
}
|
|
@@ -2171,19 +2176,19 @@ function an(e, t) {
|
|
|
2171
2176
|
}
|
|
2172
2177
|
//#endregion
|
|
2173
2178
|
//#region src/composables/viewModels.composable.ts
|
|
2174
|
-
function
|
|
2175
|
-
|
|
2179
|
+
function cn(e) {
|
|
2180
|
+
sn(e, "view");
|
|
2176
2181
|
}
|
|
2177
2182
|
//#endregion
|
|
2178
2183
|
//#region src/utils/commandMenuGroups.util.ts
|
|
2179
|
-
var
|
|
2180
|
-
function
|
|
2181
|
-
return e === void 0 ? "no-group" : e.name ? F(e.name, t) : (
|
|
2184
|
+
var ln = 0, un = /* @__PURE__ */ new WeakMap();
|
|
2185
|
+
function dn(e, t) {
|
|
2186
|
+
return e === void 0 ? "no-group" : e.name ? F(e.name, t) : (un.has(e) || un.set(e, `unnamed-${ln++}`), un.get(e));
|
|
2182
2187
|
}
|
|
2183
|
-
function
|
|
2188
|
+
function fn(e, t) {
|
|
2184
2189
|
let n = /* @__PURE__ */ new Map();
|
|
2185
2190
|
for (let r of e) {
|
|
2186
|
-
let e = r.group, i =
|
|
2191
|
+
let e = r.group, i = dn(e, t), a = n.get(i);
|
|
2187
2192
|
if (a === void 0) {
|
|
2188
2193
|
let r = e?.name ? F(e.name, t) : null;
|
|
2189
2194
|
a = {
|
|
@@ -2200,4 +2205,4 @@ function un(e, t) {
|
|
|
2200
2205
|
return [...n.values()];
|
|
2201
2206
|
}
|
|
2202
2207
|
//#endregion
|
|
2203
|
-
export {
|
|
2208
|
+
export { Je as GroupPriority, e as actionsLocales, ke as applicableActions, fn as buildCommandMenuGroups, De as createAction, Te as isAuthenticated, z as isSubActionsWithMeta, Le as resolveActionAvatar, rn as resolveActionBreadcrumbs, Re as resolveActionHint, I as resolveActionName, Be as resolveActionPreview, Ve as resolveActionRightContent, L as resolveActionSelected, F as resolveActionValue, N as resolveApplicable, ze as resolveSearchSubActionsConfig, Ke as resolveSubActions, Ee as setIsAuthenticated, B as storeSubActionsPagination, qe as useActionDropdownMenuContent, Ye as useActionGroup, R as useActionManagerStore, He as useActionPreview, Xt as useActionRegistryStore, $t as useActionShortcuts, en as useCommandMenuActions, tn as useCommandMenuAnimation, nn as useCommandMenuNavigation, an as useFocusedModels, on as useTemporaryActions, cn as useViewModels };
|