@wisemen/vue-core-actions 0.2.4 → 0.4.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/composables/commandMenuActions.composable.d.ts +10 -2
- package/dist/const/index.d.ts +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +313 -290
- package/dist/stores/actionManager.store.d.ts +72 -2
- package/dist/types/actionContext.type.d.ts +16 -0
- package/dist/types/tableSelection.type.d.ts +12 -0
- package/dist/utils/resolveActions.util.d.ts +1 -1
- package/package.json +4 -4
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 = R(n, t),
|
|
337
|
-
if (n.subActions !== void 0 &&
|
|
336
|
+
let r = R(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,10 +483,10 @@ 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) {
|
|
@@ -495,16 +495,16 @@ function L(e, t) {
|
|
|
495
495
|
function R(e, t) {
|
|
496
496
|
return typeof e.searchSubActionsConfig == "function" ? e.searchSubActionsConfig(t) : e.searchSubActionsConfig ?? null;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function ze(e, t) {
|
|
499
499
|
return typeof e.preview == "function" ? e.preview(t) : null;
|
|
500
500
|
}
|
|
501
501
|
//#endregion
|
|
502
502
|
//#region src/composables/actionPreview.composable.ts
|
|
503
|
-
function
|
|
503
|
+
function Be({ highlightedActionId: e, getContext: n, resolvedActions: r }) {
|
|
504
504
|
let i = p(!1), a = t(() => {
|
|
505
505
|
if (e.value === null || !i.value) return null;
|
|
506
506
|
let t = r.value.find((t) => t.id === e.value) ?? null;
|
|
507
|
-
return t === null ? null :
|
|
507
|
+
return t === null ? null : ze(t, n());
|
|
508
508
|
});
|
|
509
509
|
function o() {
|
|
510
510
|
i.value = !0;
|
|
@@ -526,7 +526,7 @@ function ze({ highlightedActionId: e, getContext: n, resolvedActions: r }) {
|
|
|
526
526
|
}
|
|
527
527
|
//#endregion
|
|
528
528
|
//#region src/composables/isSelectorVisible.composable.ts
|
|
529
|
-
function
|
|
529
|
+
function Ve(e) {
|
|
530
530
|
let t = p(!1), n = null;
|
|
531
531
|
function r() {
|
|
532
532
|
t.value = document.querySelector(e) !== null;
|
|
@@ -542,72 +542,93 @@ function Be(e) {
|
|
|
542
542
|
}
|
|
543
543
|
//#endregion
|
|
544
544
|
//#region src/stores/actionManager.store.ts
|
|
545
|
-
async function
|
|
545
|
+
async function He(e, t, n) {
|
|
546
546
|
e.execute !== void 0 && (await e.execute(t), n?.onComplete?.());
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function Ue(e) {
|
|
549
549
|
let t = /* @__PURE__ */ new Set();
|
|
550
550
|
return e.filter((e) => t.has(e) ? !1 : (t.add(e), !0));
|
|
551
551
|
}
|
|
552
552
|
var z = y("actionManager", () => {
|
|
553
|
-
let e = p([]), t = p([]), n = p({}),
|
|
554
|
-
function
|
|
555
|
-
|
|
556
|
-
...
|
|
553
|
+
let e = p([]), t = p([]), n = p([]), r = p(null), i = p({}), a = x(), o = b(), s = Ve("[data-dialog]:not([data-command-menu])");
|
|
554
|
+
function c(e) {
|
|
555
|
+
i.value = {
|
|
556
|
+
...i.value,
|
|
557
557
|
...e
|
|
558
558
|
};
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
let t = { ...
|
|
562
|
-
delete t[e],
|
|
560
|
+
function l(e) {
|
|
561
|
+
let t = { ...i.value };
|
|
562
|
+
delete t[e], i.value = t;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function u(t) {
|
|
565
565
|
e.value = t;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function d(e) {
|
|
568
568
|
t.value = e;
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
|
|
572
|
-
|
|
570
|
+
function f(e) {
|
|
571
|
+
n.value = e;
|
|
572
|
+
}
|
|
573
|
+
function m(e) {
|
|
574
|
+
r.value = e;
|
|
575
|
+
}
|
|
576
|
+
function h() {
|
|
577
|
+
r.value = {
|
|
578
|
+
items: [],
|
|
579
|
+
type: "include"
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
function g(c) {
|
|
583
|
+
let l = Ue([
|
|
584
|
+
...c.models ?? [],
|
|
585
|
+
...n.value,
|
|
573
586
|
...t.value,
|
|
574
587
|
...e.value
|
|
575
|
-
]),
|
|
576
|
-
...
|
|
577
|
-
...
|
|
588
|
+
]), u = {
|
|
589
|
+
...i.value,
|
|
590
|
+
...c.metadata
|
|
578
591
|
};
|
|
579
592
|
return {
|
|
580
|
-
getPaginationOffsetForSubActionId: (e) =>
|
|
581
|
-
hasActiveDialogs: () =>
|
|
582
|
-
hasTargetedModelsOfType: (e) =>
|
|
583
|
-
isRouteActive: (e, t) => t === void 0 || t === !1 ?
|
|
584
|
-
allModels:
|
|
593
|
+
getPaginationOffsetForSubActionId: (e) => c.subActionsMeta?.[e] ?? null,
|
|
594
|
+
hasActiveDialogs: () => s.value,
|
|
595
|
+
hasTargetedModelsOfType: (e) => l.some((t) => t.modelName === e),
|
|
596
|
+
isRouteActive: (e, t) => t === void 0 || t === !1 ? o.matched.some((t) => t.name === e) : o.name === e,
|
|
597
|
+
allModels: l,
|
|
598
|
+
clearTableSelection: h,
|
|
585
599
|
focusedModels: e.value,
|
|
586
|
-
keyboardEvent:
|
|
587
|
-
menuType:
|
|
588
|
-
metadata:
|
|
589
|
-
models:
|
|
590
|
-
router:
|
|
591
|
-
searchInput:
|
|
592
|
-
|
|
593
|
-
|
|
600
|
+
keyboardEvent: c.keyboardEvent,
|
|
601
|
+
menuType: c.menuType,
|
|
602
|
+
metadata: u,
|
|
603
|
+
models: c.models ?? [],
|
|
604
|
+
router: a,
|
|
605
|
+
searchInput: c.searchInput ?? "",
|
|
606
|
+
selectedModels: n.value,
|
|
607
|
+
subActionsMeta: c.subActionsMeta,
|
|
608
|
+
tableSelection: r.value,
|
|
609
|
+
targetedModelOfType: (e) => l.find((t) => t.modelName === e) ?? null,
|
|
594
610
|
targetedModelOfTypeOrThrow: (e) => {
|
|
595
|
-
let t =
|
|
611
|
+
let t = l.find((t) => t.modelName === e) ?? null;
|
|
596
612
|
if (t === null) throw Error(`Model of type: ${e} not found`);
|
|
597
613
|
return t;
|
|
598
614
|
},
|
|
599
|
-
targetedModelsOfType: (e) =>
|
|
615
|
+
targetedModelsOfType: (e) => l.filter((t) => t.modelName === e)
|
|
600
616
|
};
|
|
601
617
|
}
|
|
602
618
|
return {
|
|
603
|
-
actionContext:
|
|
604
|
-
|
|
619
|
+
actionContext: g,
|
|
620
|
+
clearTableSelection: h,
|
|
621
|
+
executeAction: He,
|
|
605
622
|
focusedModels: e,
|
|
606
|
-
metadata:
|
|
607
|
-
registerMetadata:
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
623
|
+
metadata: i,
|
|
624
|
+
registerMetadata: c,
|
|
625
|
+
selectedModels: n,
|
|
626
|
+
setFocusedModels: u,
|
|
627
|
+
setSelectedModels: f,
|
|
628
|
+
setTableSelection: m,
|
|
629
|
+
setViewModels: d,
|
|
630
|
+
tableSelection: r,
|
|
631
|
+
unregisterMetadata: l,
|
|
611
632
|
viewModels: t
|
|
612
633
|
};
|
|
613
634
|
});
|
|
@@ -619,7 +640,7 @@ function B(e) {
|
|
|
619
640
|
function V(e, t, n) {
|
|
620
641
|
return B(t) ? (e.id && (n[e.id] = t.pagination.nextOffset), t.actions) : (e.id && delete n[e.id], t);
|
|
621
642
|
}
|
|
622
|
-
async function
|
|
643
|
+
async function We(e, t, n, r = 297) {
|
|
623
644
|
if (e.subActions === void 0) return [];
|
|
624
645
|
let i = e.subActions(t);
|
|
625
646
|
if (Array.isArray(i) || B(i)) return V(e, i, n);
|
|
@@ -630,13 +651,13 @@ async function Ue(e, t, n, r = 297) {
|
|
|
630
651
|
}
|
|
631
652
|
//#endregion
|
|
632
653
|
//#region src/composables/actionDropdownMenuContent.composable.ts
|
|
633
|
-
function
|
|
654
|
+
function Ge({ actions: e, metadata: n, models: r, parentAction: i, scrollContainerRef: a }) {
|
|
634
655
|
let o = v(), s = z(), c = p(null), l = p(""), u = p(""), d = p(!1), f = p([]), m = p({}), h = p(!0), g = 0, y = t(() => s.actionContext({
|
|
635
656
|
menuType: "contextualMenu",
|
|
636
657
|
metadata: n.value,
|
|
637
658
|
models: r.value,
|
|
638
659
|
searchInput: u.value
|
|
639
|
-
})), { preview: b, onHidePreview: x, onKeyDown: S, onShowPreview: C } =
|
|
660
|
+
})), { preview: b, onHidePreview: x, onKeyDown: S, onShowPreview: C } = Be({
|
|
640
661
|
highlightedActionId: c,
|
|
641
662
|
getContext: () => y.value,
|
|
642
663
|
resolvedActions: f
|
|
@@ -649,8 +670,8 @@ function We({ actions: e, metadata: n, models: r, parentAction: i, scrollContain
|
|
|
649
670
|
let t = ++g, n = y.value;
|
|
650
671
|
try {
|
|
651
672
|
let r = e.value;
|
|
652
|
-
i.value?.subActions !== void 0 && (r = await
|
|
653
|
-
let a = await
|
|
673
|
+
i.value?.subActions !== void 0 && (r = await We(i.value, n, m.value));
|
|
674
|
+
let a = await ke(r, n, (e) => {
|
|
654
675
|
t !== g || e.length === 0 || (f.value = e);
|
|
655
676
|
}, i.value ?? void 0);
|
|
656
677
|
if (t !== g) return;
|
|
@@ -718,10 +739,10 @@ function We({ actions: e, metadata: n, models: r, parentAction: i, scrollContain
|
|
|
718
739
|
}
|
|
719
740
|
//#endregion
|
|
720
741
|
//#region src/composables/actionGroup.composable.ts
|
|
721
|
-
var
|
|
742
|
+
var Ke = /* @__PURE__ */ function(e) {
|
|
722
743
|
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;
|
|
723
744
|
}({});
|
|
724
|
-
function
|
|
745
|
+
function qe() {
|
|
725
746
|
let e = v();
|
|
726
747
|
return {
|
|
727
748
|
account: {
|
|
@@ -756,9 +777,9 @@ function Ke() {
|
|
|
756
777
|
}
|
|
757
778
|
//#endregion
|
|
758
779
|
//#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
|
|
759
|
-
var
|
|
760
|
-
function
|
|
761
|
-
return i(
|
|
780
|
+
var Je = Symbol("HotkeysContext");
|
|
781
|
+
function Ye() {
|
|
782
|
+
return i(Je, null)?.defaultOptions ?? {};
|
|
762
783
|
}
|
|
763
784
|
//#endregion
|
|
764
785
|
//#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/constants.js
|
|
@@ -800,10 +821,10 @@ var W = {
|
|
|
800
821
|
commandorcontrol: "Mod",
|
|
801
822
|
mod: "Mod"
|
|
802
823
|
};
|
|
803
|
-
function
|
|
824
|
+
function Xe(e, t = H()) {
|
|
804
825
|
return e === "Mod" ? t === "mac" ? "Meta" : "Control" : e;
|
|
805
826
|
}
|
|
806
|
-
var
|
|
827
|
+
var Ze = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")), Qe = /* @__PURE__ */ new Set([
|
|
807
828
|
"0",
|
|
808
829
|
"1",
|
|
809
830
|
"2",
|
|
@@ -814,7 +835,7 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
|
|
|
814
835
|
"7",
|
|
815
836
|
"8",
|
|
816
837
|
"9"
|
|
817
|
-
]),
|
|
838
|
+
]), $e = /* @__PURE__ */ new Set([
|
|
818
839
|
"F1",
|
|
819
840
|
"F2",
|
|
820
841
|
"F3",
|
|
@@ -827,7 +848,7 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
|
|
|
827
848
|
"F10",
|
|
828
849
|
"F11",
|
|
829
850
|
"F12"
|
|
830
|
-
]),
|
|
851
|
+
]), et = /* @__PURE__ */ new Set([
|
|
831
852
|
"ArrowUp",
|
|
832
853
|
"ArrowDown",
|
|
833
854
|
"ArrowLeft",
|
|
@@ -836,14 +857,14 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
|
|
|
836
857
|
"End",
|
|
837
858
|
"PageUp",
|
|
838
859
|
"PageDown"
|
|
839
|
-
]),
|
|
860
|
+
]), tt = /* @__PURE__ */ new Set([
|
|
840
861
|
"Enter",
|
|
841
862
|
"Escape",
|
|
842
863
|
"Space",
|
|
843
864
|
"Tab",
|
|
844
865
|
"Backspace",
|
|
845
866
|
"Delete"
|
|
846
|
-
]),
|
|
867
|
+
]), nt = /* @__PURE__ */ new Set([
|
|
847
868
|
"/",
|
|
848
869
|
"[",
|
|
849
870
|
"]",
|
|
@@ -854,7 +875,7 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
|
|
|
854
875
|
".",
|
|
855
876
|
";",
|
|
856
877
|
"`"
|
|
857
|
-
]),
|
|
878
|
+
]), rt = {
|
|
858
879
|
Backquote: "`",
|
|
859
880
|
Backslash: "\\",
|
|
860
881
|
BracketLeft: "[",
|
|
@@ -867,14 +888,14 @@ var Xe = /* @__PURE__ */ new Set(/* @__PURE__ */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ".sp
|
|
|
867
888
|
Slash: "/"
|
|
868
889
|
};
|
|
869
890
|
[
|
|
870
|
-
...Xe,
|
|
871
891
|
...Ze,
|
|
872
892
|
...Qe,
|
|
873
893
|
...$e,
|
|
874
894
|
...et,
|
|
875
|
-
...tt
|
|
895
|
+
...tt,
|
|
896
|
+
...nt
|
|
876
897
|
];
|
|
877
|
-
var
|
|
898
|
+
var it = {
|
|
878
899
|
Esc: "Escape",
|
|
879
900
|
esc: "Escape",
|
|
880
901
|
escape: "Escape",
|
|
@@ -911,13 +932,13 @@ var rt = {
|
|
|
911
932
|
pgup: "PageUp",
|
|
912
933
|
pgdn: "PageDown"
|
|
913
934
|
};
|
|
914
|
-
function
|
|
935
|
+
function at(e) {
|
|
915
936
|
return /^\p{Letter}$/u.test(e);
|
|
916
937
|
}
|
|
917
938
|
function G(e) {
|
|
918
939
|
if (!e) return "";
|
|
919
|
-
if (e in
|
|
920
|
-
if (
|
|
940
|
+
if (e in it) return it[e];
|
|
941
|
+
if (at(e)) {
|
|
921
942
|
let t = e.toUpperCase();
|
|
922
943
|
return t.length === 1 ? t : e;
|
|
923
944
|
}
|
|
@@ -934,7 +955,7 @@ function K(e, t = H()) {
|
|
|
934
955
|
else {
|
|
935
956
|
let e = W[a] ?? W[a.toLowerCase()];
|
|
936
957
|
if (e) {
|
|
937
|
-
let n =
|
|
958
|
+
let n = Xe(e, t);
|
|
938
959
|
r.add(n);
|
|
939
960
|
} else n.length === 1 && (i = G(a));
|
|
940
961
|
}
|
|
@@ -948,9 +969,9 @@ function K(e, t = H()) {
|
|
|
948
969
|
modifiers: U.filter((e) => r.has(e))
|
|
949
970
|
};
|
|
950
971
|
}
|
|
951
|
-
function
|
|
972
|
+
function ot(e, t = H()) {
|
|
952
973
|
let n = e.ctrl ?? !1, r = e.shift ?? !1, i = e.alt ?? !1, a = e.meta ?? !1;
|
|
953
|
-
e.mod && (
|
|
974
|
+
e.mod && (Xe("Mod", t) === "Control" ? n = !0 : a = !0);
|
|
954
975
|
let o = U.filter((e) => {
|
|
955
976
|
switch (e) {
|
|
956
977
|
case "Control": return n;
|
|
@@ -969,30 +990,30 @@ function at(e, t = H()) {
|
|
|
969
990
|
modifiers: o
|
|
970
991
|
};
|
|
971
992
|
}
|
|
972
|
-
function
|
|
993
|
+
function st(e, t) {
|
|
973
994
|
let n = t === "mac" ? e.meta && !e.ctrl : e.ctrl && !e.meta, r = [];
|
|
974
995
|
if (n) r.push("Mod"), e.alt && r.push("Alt"), e.shift && r.push("Shift");
|
|
975
996
|
else for (let t of U) e.modifiers.includes(t) && r.push(t);
|
|
976
997
|
return r.push(G(e.key)), r.join("+");
|
|
977
998
|
}
|
|
978
|
-
function st(e, t = H()) {
|
|
979
|
-
return ot(K(e, t), t);
|
|
980
|
-
}
|
|
981
999
|
function ct(e, t = H()) {
|
|
982
|
-
return
|
|
1000
|
+
return st(K(e, t), t);
|
|
983
1001
|
}
|
|
984
1002
|
function lt(e, t = H()) {
|
|
985
|
-
return
|
|
1003
|
+
return st(e, t);
|
|
1004
|
+
}
|
|
1005
|
+
function ut(e, t = H()) {
|
|
1006
|
+
return typeof e == "string" ? ct(e, t) : lt(ot(e, t), t);
|
|
986
1007
|
}
|
|
987
|
-
function
|
|
1008
|
+
function dt(e) {
|
|
988
1009
|
return e in W || e.toLowerCase() in W;
|
|
989
1010
|
}
|
|
990
1011
|
//#endregion
|
|
991
1012
|
//#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/format.js
|
|
992
|
-
function
|
|
1013
|
+
function ft(e) {
|
|
993
1014
|
return e.join(" ");
|
|
994
1015
|
}
|
|
995
|
-
function
|
|
1016
|
+
function pt(e) {
|
|
996
1017
|
let t = [];
|
|
997
1018
|
for (let n of U) e.modifiers.includes(n) && t.push(n);
|
|
998
1019
|
return t.push(e.key), t.join("+");
|
|
@@ -1005,7 +1026,7 @@ function q(e, t, n = H()) {
|
|
|
1005
1026
|
let i = G(e.key), a = r.key;
|
|
1006
1027
|
if (i !== "Dead" && i.length === 1 && a.length === 1) {
|
|
1007
1028
|
if (i.toUpperCase() === a.toUpperCase()) return !0;
|
|
1008
|
-
if (
|
|
1029
|
+
if (at(i) && (/^[A-Za-z]$/.test(i) || !e.altKey)) return !1;
|
|
1009
1030
|
}
|
|
1010
1031
|
if (e.code && (i === "Dead" || i.length === 1 && a.length === 1)) {
|
|
1011
1032
|
if (e.code.startsWith("Key")) {
|
|
@@ -1016,13 +1037,13 @@ function q(e, t, n = H()) {
|
|
|
1016
1037
|
let t = e.code.slice(5);
|
|
1017
1038
|
if (t.length === 1 && /^[0-9]$/.test(t)) return t === a;
|
|
1018
1039
|
}
|
|
1019
|
-
return e.code in
|
|
1040
|
+
return e.code in rt ? rt[e.code] === a : !1;
|
|
1020
1041
|
}
|
|
1021
1042
|
return i === a;
|
|
1022
1043
|
}
|
|
1023
1044
|
//#endregion
|
|
1024
1045
|
//#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/manager.utils.js
|
|
1025
|
-
var
|
|
1046
|
+
var mt = {
|
|
1026
1047
|
preventDefault: !0,
|
|
1027
1048
|
stopPropagation: !0,
|
|
1028
1049
|
eventType: "keydown",
|
|
@@ -1030,10 +1051,10 @@ var pt = {
|
|
|
1030
1051
|
ignoreInputs: !0,
|
|
1031
1052
|
conflictBehavior: "warn"
|
|
1032
1053
|
};
|
|
1033
|
-
function
|
|
1054
|
+
function ht(e) {
|
|
1034
1055
|
return !(e.ctrl || e.meta || e.key === "Escape");
|
|
1035
1056
|
}
|
|
1036
|
-
function
|
|
1057
|
+
function gt(e) {
|
|
1037
1058
|
if (!e) return !1;
|
|
1038
1059
|
if (e instanceof HTMLInputElement) {
|
|
1039
1060
|
let t = e.type.toLowerCase();
|
|
@@ -1041,17 +1062,17 @@ function ht(e) {
|
|
|
1041
1062
|
}
|
|
1042
1063
|
return !!(e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement || e instanceof HTMLElement && e.isContentEditable);
|
|
1043
1064
|
}
|
|
1044
|
-
function
|
|
1065
|
+
function _t(e) {
|
|
1045
1066
|
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;
|
|
1046
1067
|
}
|
|
1047
|
-
function
|
|
1048
|
-
let r =
|
|
1049
|
-
return r &&
|
|
1068
|
+
function vt(e, t, n) {
|
|
1069
|
+
let r = _t(t);
|
|
1070
|
+
return r && gt(r) && r !== n || e.composedPath().some((e) => gt(e) && e !== n) ? !0 : gt(e.target) && e.target !== n;
|
|
1050
1071
|
}
|
|
1051
|
-
function
|
|
1072
|
+
function yt(e, t) {
|
|
1052
1073
|
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)));
|
|
1053
1074
|
}
|
|
1054
|
-
function
|
|
1075
|
+
function bt(e, t, n, r) {
|
|
1055
1076
|
if (n !== "allow") {
|
|
1056
1077
|
if (n === "warn") {
|
|
1057
1078
|
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.`);
|
|
@@ -1067,7 +1088,7 @@ var J = /* @__PURE__ */ function(e) {
|
|
|
1067
1088
|
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;
|
|
1068
1089
|
}({});
|
|
1069
1090
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1070
|
-
function
|
|
1091
|
+
function xt({ update: e, notify: t, unwatched: n }) {
|
|
1071
1092
|
return {
|
|
1072
1093
|
link: r,
|
|
1073
1094
|
unlink: i,
|
|
@@ -1186,7 +1207,7 @@ function bt({ update: e, notify: t, unwatched: n }) {
|
|
|
1186
1207
|
}
|
|
1187
1208
|
//#endregion
|
|
1188
1209
|
//#region ../../../node_modules/.pnpm/@tanstack+store@0.11.0/node_modules/@tanstack/store/dist/atom.js
|
|
1189
|
-
function
|
|
1210
|
+
function St(e, t, n) {
|
|
1190
1211
|
let r = typeof e == "object", i = r ? e : void 0;
|
|
1191
1212
|
return {
|
|
1192
1213
|
next: (r ? e.next : e)?.bind(i),
|
|
@@ -1194,31 +1215,31 @@ function xt(e, t, n) {
|
|
|
1194
1215
|
complete: (r ? e.complete : n)?.bind(i)
|
|
1195
1216
|
};
|
|
1196
1217
|
}
|
|
1197
|
-
var
|
|
1218
|
+
var Ct = [], Y = 0, { link: wt, unlink: Tt, propagate: Et, checkDirty: Dt, shallowPropagate: Ot } = /* @__PURE__ */ xt({
|
|
1198
1219
|
update(e) {
|
|
1199
1220
|
return e._update();
|
|
1200
1221
|
},
|
|
1201
1222
|
notify(e) {
|
|
1202
|
-
|
|
1223
|
+
Ct[kt++] = e, e.flags &= ~J.Watching;
|
|
1203
1224
|
},
|
|
1204
1225
|
unwatched(e) {
|
|
1205
|
-
e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = J.Mutable | J.Dirty,
|
|
1226
|
+
e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = J.Mutable | J.Dirty, jt(e));
|
|
1206
1227
|
}
|
|
1207
|
-
}), X = 0,
|
|
1208
|
-
function
|
|
1228
|
+
}), X = 0, kt = 0, Z, At = 0;
|
|
1229
|
+
function jt(e) {
|
|
1209
1230
|
let t = e.depsTail, n = t === void 0 ? e.deps : t.nextDep;
|
|
1210
|
-
for (; n !== void 0;) n =
|
|
1231
|
+
for (; n !== void 0;) n = Tt(n, e);
|
|
1211
1232
|
}
|
|
1212
|
-
function
|
|
1213
|
-
if (!(
|
|
1214
|
-
for (; X <
|
|
1215
|
-
let e =
|
|
1216
|
-
|
|
1233
|
+
function Mt() {
|
|
1234
|
+
if (!(At > 0)) {
|
|
1235
|
+
for (; X < kt;) {
|
|
1236
|
+
let e = Ct[X];
|
|
1237
|
+
Ct[X++] = void 0, e.notify();
|
|
1217
1238
|
}
|
|
1218
|
-
X = 0,
|
|
1239
|
+
X = 0, kt = 0;
|
|
1219
1240
|
}
|
|
1220
1241
|
}
|
|
1221
|
-
function
|
|
1242
|
+
function Nt(e, t) {
|
|
1222
1243
|
let n = typeof e == "function", r = e, i = {
|
|
1223
1244
|
_snapshot: n ? void 0 : e,
|
|
1224
1245
|
subs: void 0,
|
|
@@ -1227,10 +1248,10 @@ function Mt(e, t) {
|
|
|
1227
1248
|
depsTail: void 0,
|
|
1228
1249
|
flags: n ? J.None : J.Mutable,
|
|
1229
1250
|
get() {
|
|
1230
|
-
return Z !== void 0 &&
|
|
1251
|
+
return Z !== void 0 && wt(i, Z, Y), i._snapshot;
|
|
1231
1252
|
},
|
|
1232
1253
|
subscribe(e) {
|
|
1233
|
-
let t =
|
|
1254
|
+
let t = St(e), n = { current: !1 }, r = Pt(() => {
|
|
1234
1255
|
i.get(), n.current ? t.next?.(i._snapshot) : n.current = !0;
|
|
1235
1256
|
});
|
|
1236
1257
|
return { unsubscribe: () => {
|
|
@@ -1246,34 +1267,34 @@ function Mt(e, t) {
|
|
|
1246
1267
|
let t = i._snapshot, a = typeof e == "function" ? e(t) : e === void 0 && n ? r(t) : e;
|
|
1247
1268
|
return t === void 0 || !o(t, a) ? (i._snapshot = a, !0) : !1;
|
|
1248
1269
|
} finally {
|
|
1249
|
-
Z = a, n && (i.flags &= ~J.RecursedCheck),
|
|
1270
|
+
Z = a, n && (i.flags &= ~J.RecursedCheck), jt(i);
|
|
1250
1271
|
}
|
|
1251
1272
|
}
|
|
1252
1273
|
};
|
|
1253
1274
|
return n ? (i.flags = J.Mutable | J.Dirty, i.get = function() {
|
|
1254
1275
|
let e = i.flags;
|
|
1255
|
-
if (e & J.Dirty || e & J.Pending &&
|
|
1276
|
+
if (e & J.Dirty || e & J.Pending && Dt(i.deps, i)) {
|
|
1256
1277
|
if (i._update()) {
|
|
1257
1278
|
let e = i.subs;
|
|
1258
|
-
e !== void 0 &&
|
|
1279
|
+
e !== void 0 && Ot(e);
|
|
1259
1280
|
}
|
|
1260
1281
|
} else e & J.Pending && (i.flags = e & ~J.Pending);
|
|
1261
|
-
return Z !== void 0 &&
|
|
1282
|
+
return Z !== void 0 && wt(i, Z, Y), i._snapshot;
|
|
1262
1283
|
}) : i.set = function(e) {
|
|
1263
1284
|
if (i._update(e)) {
|
|
1264
1285
|
let e = i.subs;
|
|
1265
|
-
e !== void 0 && (
|
|
1286
|
+
e !== void 0 && (Et(e), Ot(e), Mt());
|
|
1266
1287
|
}
|
|
1267
1288
|
}, i;
|
|
1268
1289
|
}
|
|
1269
|
-
function
|
|
1290
|
+
function Pt(e) {
|
|
1270
1291
|
let t = () => {
|
|
1271
1292
|
let t = Z;
|
|
1272
1293
|
Z = n, ++Y, n.depsTail = void 0, n.flags = J.Watching | J.RecursedCheck;
|
|
1273
1294
|
try {
|
|
1274
1295
|
return e();
|
|
1275
1296
|
} finally {
|
|
1276
|
-
Z = t, n.flags &= ~J.RecursedCheck,
|
|
1297
|
+
Z = t, n.flags &= ~J.RecursedCheck, jt(n);
|
|
1277
1298
|
}
|
|
1278
1299
|
}, n = {
|
|
1279
1300
|
deps: void 0,
|
|
@@ -1283,19 +1304,19 @@ function Nt(e) {
|
|
|
1283
1304
|
flags: J.Watching | J.RecursedCheck,
|
|
1284
1305
|
notify() {
|
|
1285
1306
|
let e = this.flags;
|
|
1286
|
-
e & J.Dirty || e & J.Pending &&
|
|
1307
|
+
e & J.Dirty || e & J.Pending && Dt(this.deps, this) ? t() : this.flags = J.Watching;
|
|
1287
1308
|
},
|
|
1288
1309
|
stop() {
|
|
1289
|
-
this.flags = J.None, this.depsTail = void 0,
|
|
1310
|
+
this.flags = J.None, this.depsTail = void 0, jt(this);
|
|
1290
1311
|
}
|
|
1291
1312
|
};
|
|
1292
1313
|
return t(), n;
|
|
1293
1314
|
}
|
|
1294
1315
|
//#endregion
|
|
1295
1316
|
//#region ../../../node_modules/.pnpm/@tanstack+store@0.11.0/node_modules/@tanstack/store/dist/store.js
|
|
1296
|
-
var
|
|
1317
|
+
var Ft = class {
|
|
1297
1318
|
constructor(e, t) {
|
|
1298
|
-
this.atom =
|
|
1319
|
+
this.atom = Nt(e), this.get = this.get.bind(this), this.setState = this.setState.bind(this), this.subscribe = this.subscribe.bind(this), t && (this.actions = t(this));
|
|
1299
1320
|
}
|
|
1300
1321
|
setState(e) {
|
|
1301
1322
|
this.atom.set(e);
|
|
@@ -1307,19 +1328,19 @@ var Pt = class {
|
|
|
1307
1328
|
return this.state;
|
|
1308
1329
|
}
|
|
1309
1330
|
subscribe(e) {
|
|
1310
|
-
return this.atom.subscribe(
|
|
1331
|
+
return this.atom.subscribe(St(e));
|
|
1311
1332
|
}
|
|
1312
|
-
},
|
|
1313
|
-
function
|
|
1314
|
-
return `hotkey_${++
|
|
1333
|
+
}, It = 0;
|
|
1334
|
+
function Lt() {
|
|
1335
|
+
return `hotkey_${++It}`;
|
|
1315
1336
|
}
|
|
1316
|
-
var
|
|
1337
|
+
var Rt = class e {
|
|
1317
1338
|
static #e = null;
|
|
1318
1339
|
#t;
|
|
1319
1340
|
#n = /* @__PURE__ */ new Map();
|
|
1320
1341
|
#r = /* @__PURE__ */ new Map();
|
|
1321
1342
|
constructor() {
|
|
1322
|
-
this.registrations = new
|
|
1343
|
+
this.registrations = new Ft(/* @__PURE__ */ new Map()), this.#t = H();
|
|
1323
1344
|
}
|
|
1324
1345
|
static getInstance() {
|
|
1325
1346
|
return e.#e ||= new e(), e.#e;
|
|
@@ -1331,7 +1352,7 @@ var Lt = class e {
|
|
|
1331
1352
|
if (typeof document > "u" && !n.target) {
|
|
1332
1353
|
let e = t;
|
|
1333
1354
|
return {
|
|
1334
|
-
id:
|
|
1355
|
+
id: Lt(),
|
|
1335
1356
|
unregister: () => {},
|
|
1336
1357
|
get callback() {
|
|
1337
1358
|
return e;
|
|
@@ -1345,15 +1366,15 @@ var Lt = class e {
|
|
|
1345
1366
|
}
|
|
1346
1367
|
};
|
|
1347
1368
|
}
|
|
1348
|
-
let r =
|
|
1349
|
-
l &&
|
|
1350
|
-
let u = n.ignoreInputs ??
|
|
1369
|
+
let r = Lt(), i = n.platform ?? this.#t, a = typeof e == "string" ? K(e, i) : ot(e, i), o = typeof e == "string" ? e : pt(a), s = n.target ?? document, c = n.conflictBehavior ?? "warn", l = this.#d(o, s);
|
|
1370
|
+
l && bt(l.id, o, c, (e) => this.#i(e));
|
|
1371
|
+
let u = n.ignoreInputs ?? ht(a), d = {
|
|
1351
1372
|
id: r,
|
|
1352
1373
|
hotkey: o,
|
|
1353
1374
|
parsedHotkey: a,
|
|
1354
1375
|
callback: t,
|
|
1355
1376
|
options: {
|
|
1356
|
-
...
|
|
1377
|
+
...mt,
|
|
1357
1378
|
requireReset: !1,
|
|
1358
1379
|
...n,
|
|
1359
1380
|
platform: i,
|
|
@@ -1428,7 +1449,7 @@ var Lt = class e {
|
|
|
1428
1449
|
let r = this.#r.get(t);
|
|
1429
1450
|
if (r) for (let i of r) {
|
|
1430
1451
|
let r = this.registrations.state.get(i);
|
|
1431
|
-
if (r &&
|
|
1452
|
+
if (r && yt(e, t) && r.options.enabled && !(r.options.ignoreInputs !== !1 && vt(e, t, r.target))) if (n === "keydown") {
|
|
1432
1453
|
if (r.options.eventType !== "keydown") continue;
|
|
1433
1454
|
q(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)));
|
|
1434
1455
|
} else r.options.eventType === "keyup" && q(e, r.parsedHotkey, r.options.platform) && this.#c(r, e), r.options.requireReset && r.hasFired && this.#f(r, e) && (r.hasFired = !1);
|
|
@@ -1489,19 +1510,19 @@ var Lt = class e {
|
|
|
1489
1510
|
this.registrations.setState(() => /* @__PURE__ */ new Map()), this.#n.clear(), this.#r.clear();
|
|
1490
1511
|
}
|
|
1491
1512
|
};
|
|
1492
|
-
function
|
|
1493
|
-
return
|
|
1513
|
+
function zt() {
|
|
1514
|
+
return Rt.getInstance();
|
|
1494
1515
|
}
|
|
1495
1516
|
//#endregion
|
|
1496
1517
|
//#region ../../../node_modules/.pnpm/@tanstack+hotkeys@0.8.0/node_modules/@tanstack/hotkeys/dist/sequence-manager.js
|
|
1497
|
-
var
|
|
1498
|
-
function
|
|
1499
|
-
return `sequence_${++
|
|
1518
|
+
var Bt = 1e3, Vt = 0;
|
|
1519
|
+
function Ht() {
|
|
1520
|
+
return `sequence_${++Vt}`;
|
|
1500
1521
|
}
|
|
1501
|
-
function
|
|
1522
|
+
function Ut(e) {
|
|
1502
1523
|
return e.join("|");
|
|
1503
1524
|
}
|
|
1504
|
-
function
|
|
1525
|
+
function Wt(e) {
|
|
1505
1526
|
let t = e.parsedSequence.length, n = e.currentIndex > 0 && e.currentIndex < t;
|
|
1506
1527
|
return {
|
|
1507
1528
|
id: e.id,
|
|
@@ -1514,14 +1535,14 @@ function Ut(e) {
|
|
|
1514
1535
|
partialMatchLastKeyTime: n ? e.lastKeyTime : 0
|
|
1515
1536
|
};
|
|
1516
1537
|
}
|
|
1517
|
-
var
|
|
1538
|
+
var Gt = class e {
|
|
1518
1539
|
static #e = null;
|
|
1519
1540
|
#t = /* @__PURE__ */ new Map();
|
|
1520
1541
|
#n = /* @__PURE__ */ new Map();
|
|
1521
1542
|
#r = /* @__PURE__ */ new Map();
|
|
1522
1543
|
#i;
|
|
1523
1544
|
constructor() {
|
|
1524
|
-
this.registrations = new
|
|
1545
|
+
this.registrations = new Ft(/* @__PURE__ */ new Map()), this.#i = H();
|
|
1525
1546
|
}
|
|
1526
1547
|
static getInstance() {
|
|
1527
1548
|
return e.#e ||= new e(), e.#e;
|
|
@@ -1530,20 +1551,20 @@ var Wt = class e {
|
|
|
1530
1551
|
e.#e &&= (e.#e.destroy(), null);
|
|
1531
1552
|
}
|
|
1532
1553
|
#a(e) {
|
|
1533
|
-
this.registrations.setState((t) => new Map(t).set(e.id,
|
|
1554
|
+
this.registrations.setState((t) => new Map(t).set(e.id, Wt(e)));
|
|
1534
1555
|
}
|
|
1535
1556
|
register(e, t, n = {}) {
|
|
1536
1557
|
if (e.length === 0) throw Error("Sequence must contain at least one hotkey");
|
|
1537
|
-
let r =
|
|
1538
|
-
c &&
|
|
1539
|
-
let l = a[0], u = n.ignoreInputs ??
|
|
1558
|
+
let r = Ht(), i = n.platform ?? this.#i, a = e.map((e) => K(e, i)), o = n.target ?? (typeof document < "u" ? document : {}), s = n.conflictBehavior ?? "warn", c = this.#f(e, o);
|
|
1559
|
+
c && bt(c.id, ft(e), s, (e) => this.#o(e));
|
|
1560
|
+
let l = a[0], u = n.ignoreInputs ?? ht(l), d = {
|
|
1540
1561
|
id: r,
|
|
1541
1562
|
sequence: e,
|
|
1542
1563
|
parsedSequence: a,
|
|
1543
1564
|
callback: t,
|
|
1544
1565
|
options: {
|
|
1545
|
-
...
|
|
1546
|
-
timeout:
|
|
1566
|
+
...mt,
|
|
1567
|
+
timeout: Bt,
|
|
1547
1568
|
...n,
|
|
1548
1569
|
platform: i,
|
|
1549
1570
|
ignoreInputs: u
|
|
@@ -1554,7 +1575,7 @@ var Wt = class e {
|
|
|
1554
1575
|
triggerCount: 0,
|
|
1555
1576
|
hasFired: !1
|
|
1556
1577
|
};
|
|
1557
|
-
this.#t.set(r, d), this.registrations.setState((e) => new Map(e).set(r,
|
|
1578
|
+
this.#t.set(r, d), this.registrations.setState((e) => new Map(e).set(r, Wt(d))), this.#r.has(o) || this.#r.set(o, /* @__PURE__ */ new Set()), this.#r.get(o).add(r), this.#s(o);
|
|
1558
1579
|
let f = this;
|
|
1559
1580
|
return {
|
|
1560
1581
|
get id() {
|
|
@@ -1575,7 +1596,7 @@ var Wt = class e {
|
|
|
1575
1596
|
t && (t.options = {
|
|
1576
1597
|
...t.options,
|
|
1577
1598
|
...e
|
|
1578
|
-
}, f.registrations.setState((e) => new Map(e).set(r,
|
|
1599
|
+
}, f.registrations.setState((e) => new Map(e).set(r, Wt(t))));
|
|
1579
1600
|
},
|
|
1580
1601
|
unregister: () => {
|
|
1581
1602
|
f.#o(r);
|
|
@@ -1617,14 +1638,14 @@ var Wt = class e {
|
|
|
1617
1638
|
};
|
|
1618
1639
|
}
|
|
1619
1640
|
#d(e, t, n) {
|
|
1620
|
-
if (
|
|
1641
|
+
if (dt(G(e.key))) return;
|
|
1621
1642
|
let r = this.#r.get(t);
|
|
1622
1643
|
if (!r) return;
|
|
1623
1644
|
let i = Date.now();
|
|
1624
1645
|
registrationIds: for (let a of r) {
|
|
1625
1646
|
let r = this.#t.get(a);
|
|
1626
|
-
if (!r || !
|
|
1627
|
-
if (r.options.ignoreInputs !== !1 &&
|
|
1647
|
+
if (!r || !yt(e, t) || !r.options.enabled) continue;
|
|
1648
|
+
if (r.options.ignoreInputs !== !1 && vt(e, t, r.target)) continue registrationIds;
|
|
1628
1649
|
if (r.options.eventType !== n) continue;
|
|
1629
1650
|
let o = r.options.timeout ?? 1e3;
|
|
1630
1651
|
r.currentIndex > 0 && i - r.lastKeyTime > o && (r.currentIndex = 0, this.#a(r));
|
|
@@ -1646,8 +1667,8 @@ var Wt = class e {
|
|
|
1646
1667
|
}
|
|
1647
1668
|
}
|
|
1648
1669
|
#f(e, t) {
|
|
1649
|
-
let n =
|
|
1650
|
-
for (let e of this.#t.values()) if (
|
|
1670
|
+
let n = Ut(e);
|
|
1671
|
+
for (let e of this.#t.values()) if (Ut(e.sequence) === n && e.target === t) return e;
|
|
1651
1672
|
return null;
|
|
1652
1673
|
}
|
|
1653
1674
|
resetAll() {
|
|
@@ -1682,20 +1703,20 @@ var Wt = class e {
|
|
|
1682
1703
|
this.#t.clear(), this.registrations.setState(() => /* @__PURE__ */ new Map());
|
|
1683
1704
|
}
|
|
1684
1705
|
};
|
|
1685
|
-
function
|
|
1686
|
-
return
|
|
1706
|
+
function Kt() {
|
|
1707
|
+
return Gt.getInstance();
|
|
1687
1708
|
}
|
|
1688
1709
|
//#endregion
|
|
1689
1710
|
//#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
|
|
1690
|
-
function
|
|
1691
|
-
let n =
|
|
1711
|
+
function qt(e, t = {}) {
|
|
1712
|
+
let n = Ye(), r = zt(), i = /* @__PURE__ */ new Map(), a = _(() => {
|
|
1692
1713
|
let r = Q(e), i = Q(t);
|
|
1693
1714
|
return r.map((e, t) => {
|
|
1694
1715
|
let r = Q(e.hotkey), a = e.options ? Q(e.options) : {}, o = {
|
|
1695
1716
|
...n.hotkey,
|
|
1696
1717
|
...i,
|
|
1697
1718
|
...a
|
|
1698
|
-
}, s =
|
|
1719
|
+
}, s = ut(r, o.platform ?? H()), c = o.enabled === void 0 ? void 0 : Q(o.enabled), l = o.target === void 0 ? void 0 : Q(o.target);
|
|
1699
1720
|
return {
|
|
1700
1721
|
index: t,
|
|
1701
1722
|
hotkeyString: s,
|
|
@@ -1754,15 +1775,15 @@ function Q(e) {
|
|
|
1754
1775
|
}
|
|
1755
1776
|
//#endregion
|
|
1756
1777
|
//#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
|
|
1757
|
-
function
|
|
1758
|
-
let n =
|
|
1778
|
+
function Jt(e, t = {}) {
|
|
1779
|
+
let n = Ye(), r = Kt(), i = /* @__PURE__ */ new Map(), a = _(() => {
|
|
1759
1780
|
let r = $(e), i = $(t);
|
|
1760
1781
|
return r.map((e, t) => {
|
|
1761
1782
|
let r = $(e.sequence), a = e.options ? $(e.options) : {}, o = {
|
|
1762
1783
|
...n.hotkeySequence,
|
|
1763
1784
|
...i,
|
|
1764
1785
|
...a
|
|
1765
|
-
}, s =
|
|
1786
|
+
}, s = ft(r), c = o.enabled === void 0 ? void 0 : $(o.enabled), l = o.target === void 0 ? void 0 : $(o.target);
|
|
1766
1787
|
return {
|
|
1767
1788
|
index: t,
|
|
1768
1789
|
resolvedSequence: r,
|
|
@@ -1823,7 +1844,7 @@ function $(e) {
|
|
|
1823
1844
|
}
|
|
1824
1845
|
//#endregion
|
|
1825
1846
|
//#region src/stores/actionRegistry.store.ts
|
|
1826
|
-
var
|
|
1847
|
+
var Yt = y("actionRegistry", () => {
|
|
1827
1848
|
let e = p([]), t = p(/* @__PURE__ */ new Map()), n = 1;
|
|
1828
1849
|
function r() {
|
|
1829
1850
|
return [...e.value, ...t.value.values().map((e) => e)];
|
|
@@ -1847,14 +1868,14 @@ var Jt = y("actionRegistry", () => {
|
|
|
1847
1868
|
});
|
|
1848
1869
|
//#endregion
|
|
1849
1870
|
//#region src/composables/actionShortcuts.composable.ts
|
|
1850
|
-
function*
|
|
1871
|
+
function* Xt(e, t) {
|
|
1851
1872
|
for (let n of e) {
|
|
1852
1873
|
if (yield n, n.subActionsHaveKeyboardShortcuts !== !0 || n.subActions === void 0) continue;
|
|
1853
1874
|
let e = n.subActions(t);
|
|
1854
|
-
Array.isArray(e) ? yield*
|
|
1875
|
+
Array.isArray(e) ? yield* Xt(e, t) : typeof e == "object" && e && "actions" in e && Array.isArray(e.actions) && (yield* Xt(e.actions, t));
|
|
1855
1876
|
}
|
|
1856
1877
|
}
|
|
1857
|
-
function
|
|
1878
|
+
function Zt(e) {
|
|
1858
1879
|
return [
|
|
1859
1880
|
e.key,
|
|
1860
1881
|
e.alt === !0 ? "alt" : "",
|
|
@@ -1864,8 +1885,8 @@ function Xt(e) {
|
|
|
1864
1885
|
e.shift === !0 ? "shift" : ""
|
|
1865
1886
|
].filter(Boolean).join("+");
|
|
1866
1887
|
}
|
|
1867
|
-
function
|
|
1868
|
-
let t =
|
|
1888
|
+
function Qt(e) {
|
|
1889
|
+
let t = Yt(), n = z();
|
|
1869
1890
|
function r(t) {
|
|
1870
1891
|
return () => {
|
|
1871
1892
|
let r = e ? e() : n.actionContext({});
|
|
@@ -1880,11 +1901,11 @@ function Zt(e) {
|
|
|
1880
1901
|
}
|
|
1881
1902
|
};
|
|
1882
1903
|
}
|
|
1883
|
-
|
|
1904
|
+
qt(() => {
|
|
1884
1905
|
let i = /* @__PURE__ */ new Map(), a = e ? e() : n.actionContext({});
|
|
1885
|
-
for (let e of
|
|
1906
|
+
for (let e of Xt(t.allActions(), a)) {
|
|
1886
1907
|
if (e.keyboardShortcut === void 0 || "sequence" in e.keyboardShortcut) continue;
|
|
1887
|
-
let t = e.keyboardShortcut, n =
|
|
1908
|
+
let t = e.keyboardShortcut, n = Zt(t);
|
|
1888
1909
|
i.has(n) || i.set(n, []), i.get(n).push(e);
|
|
1889
1910
|
}
|
|
1890
1911
|
return Array.from(i.values()).map((e) => {
|
|
@@ -1906,9 +1927,9 @@ function Zt(e) {
|
|
|
1906
1927
|
}
|
|
1907
1928
|
};
|
|
1908
1929
|
});
|
|
1909
|
-
}, { conflictBehavior: "allow" }),
|
|
1930
|
+
}, { conflictBehavior: "allow" }), Jt(() => {
|
|
1910
1931
|
let i = /* @__PURE__ */ new Map(), a = e ? e() : n.actionContext({});
|
|
1911
|
-
for (let e of
|
|
1932
|
+
for (let e of Xt(t.allActions(), a)) {
|
|
1912
1933
|
if (e.keyboardShortcut === void 0 || !("sequence" in e.keyboardShortcut)) continue;
|
|
1913
1934
|
let t = e.keyboardShortcut.sequence.join(",");
|
|
1914
1935
|
i.has(t) || i.set(t, []), i.get(t).push(e);
|
|
@@ -1929,85 +1950,87 @@ function Zt(e) {
|
|
|
1929
1950
|
}
|
|
1930
1951
|
//#endregion
|
|
1931
1952
|
//#region src/composables/commandMenuActions.composable.ts
|
|
1932
|
-
function
|
|
1933
|
-
let
|
|
1934
|
-
function
|
|
1935
|
-
return
|
|
1953
|
+
function $t({ isGroupingDisabled: e, actionsSnapshot: n, focusedModelsSnapshot: r, listboxContentRef: i, listboxRootRef: a, manager: o, navStack: s, searchInput: c }) {
|
|
1954
|
+
let l = p(!1), u = p(!1), d = m([]), f = p({}), h = 0, g = t(() => i.value?.$el);
|
|
1955
|
+
function v(e) {
|
|
1956
|
+
return o.actionContext({
|
|
1936
1957
|
menuType: "commandMenu",
|
|
1937
|
-
models:
|
|
1938
|
-
searchInput:
|
|
1958
|
+
models: r,
|
|
1959
|
+
searchInput: c.value,
|
|
1939
1960
|
subActionsMeta: e
|
|
1940
1961
|
});
|
|
1941
1962
|
}
|
|
1942
|
-
async function
|
|
1943
|
-
let t = ++
|
|
1944
|
-
|
|
1963
|
+
async function y() {
|
|
1964
|
+
let t = ++h;
|
|
1965
|
+
u.value = !1, l.value = !0;
|
|
1945
1966
|
try {
|
|
1946
|
-
let
|
|
1947
|
-
if (
|
|
1948
|
-
let e =
|
|
1949
|
-
|
|
1950
|
-
} else
|
|
1951
|
-
let
|
|
1952
|
-
t ===
|
|
1953
|
-
},
|
|
1954
|
-
t ===
|
|
1967
|
+
let r = v(), i;
|
|
1968
|
+
if (s.value.length > 0) {
|
|
1969
|
+
let e = s.value.at(-1);
|
|
1970
|
+
i = e.parentAction.subActions === void 0 ? e.actions : await We(e.parentAction, r, f.value);
|
|
1971
|
+
} else i = n;
|
|
1972
|
+
let a = await ke(i, r, (e) => {
|
|
1973
|
+
t === h && e.length > 0 && (d.value = e);
|
|
1974
|
+
}, s.value.at(-1)?.parentAction, e.value);
|
|
1975
|
+
t === h && (d.value = a);
|
|
1955
1976
|
} catch (e) {
|
|
1956
1977
|
throw console.error("Error refreshing actions", e), e;
|
|
1957
1978
|
} finally {
|
|
1958
|
-
t ===
|
|
1979
|
+
t === h && (l.value = !1);
|
|
1959
1980
|
}
|
|
1960
1981
|
}
|
|
1961
|
-
let
|
|
1962
|
-
return _(
|
|
1963
|
-
|
|
1982
|
+
let b = ie(y, 80);
|
|
1983
|
+
return _(c, () => {
|
|
1984
|
+
f.value = {}, u.value = !0, (i.value?.$el)?.scrollTo({
|
|
1964
1985
|
behavior: "instant",
|
|
1965
1986
|
top: 0
|
|
1966
|
-
}),
|
|
1967
|
-
}), _(
|
|
1987
|
+
}), b();
|
|
1988
|
+
}), _(e, () => {
|
|
1989
|
+
y();
|
|
1990
|
+
}), _(d, (e, t) => {
|
|
1968
1991
|
if (e.length === 0) return;
|
|
1969
|
-
let n =
|
|
1992
|
+
let n = a.value?.$el;
|
|
1970
1993
|
setTimeout(() => {
|
|
1971
|
-
(n?.querySelector("[data-highlighted]") ?? null) === null &&
|
|
1994
|
+
(n?.querySelector("[data-highlighted]") ?? null) === null && a.value?.highlightFirstItem();
|
|
1972
1995
|
}), t.length === 0 && setTimeout(() => {
|
|
1973
|
-
(
|
|
1996
|
+
(i.value?.$el)?.scrollTo({
|
|
1974
1997
|
behavior: "instant",
|
|
1975
1998
|
top: 0
|
|
1976
1999
|
});
|
|
1977
2000
|
});
|
|
1978
|
-
}), ye(
|
|
1979
|
-
let e =
|
|
2001
|
+
}), ye(g, async () => {
|
|
2002
|
+
let e = s.value.at(-1)?.parentAction;
|
|
1980
2003
|
if (e?.subActions === void 0 || e.id === void 0) return;
|
|
1981
|
-
let t =
|
|
2004
|
+
let t = f.value[e.id];
|
|
1982
2005
|
if (t == null) return;
|
|
1983
|
-
let n =
|
|
2006
|
+
let n = v({ [e.id]: t }), r = e.subActions(n), i;
|
|
1984
2007
|
if (Array.isArray(r) || B(r)) i = r;
|
|
1985
2008
|
else if (j(r)) i = await r;
|
|
1986
2009
|
else {
|
|
1987
2010
|
let e = [];
|
|
1988
2011
|
for await (let t of r) e.push(t);
|
|
1989
|
-
|
|
2012
|
+
d.value = [...d.value, ...e];
|
|
1990
2013
|
return;
|
|
1991
2014
|
}
|
|
1992
|
-
|
|
2015
|
+
d.value = [...d.value, ...V(e, i, f.value)];
|
|
1993
2016
|
}, {
|
|
1994
2017
|
canLoadMore: () => {
|
|
1995
|
-
let e =
|
|
1996
|
-
return e?.subActions === void 0 || e.id === void 0 ? !1 :
|
|
2018
|
+
let e = s.value.at(-1)?.parentAction;
|
|
2019
|
+
return e?.subActions === void 0 || e.id === void 0 ? !1 : f.value[e.id] != null;
|
|
1997
2020
|
},
|
|
1998
2021
|
distance: 40
|
|
1999
2022
|
}), {
|
|
2000
|
-
isDebouncing:
|
|
2001
|
-
isLoadingActions:
|
|
2002
|
-
buildContext:
|
|
2003
|
-
refreshActions:
|
|
2004
|
-
resolvedActions:
|
|
2005
|
-
subActionsMetaMap:
|
|
2023
|
+
isDebouncing: u,
|
|
2024
|
+
isLoadingActions: l,
|
|
2025
|
+
buildContext: v,
|
|
2026
|
+
refreshActions: y,
|
|
2027
|
+
resolvedActions: d,
|
|
2028
|
+
subActionsMetaMap: f
|
|
2006
2029
|
};
|
|
2007
2030
|
}
|
|
2008
2031
|
//#endregion
|
|
2009
2032
|
//#region src/composables/commandMenuAnimation.composable.ts
|
|
2010
|
-
function
|
|
2033
|
+
function en(e, t) {
|
|
2011
2034
|
let n = p(!1), r = p(!1), i = null;
|
|
2012
2035
|
return _(e, (e) => {
|
|
2013
2036
|
e || (r.value = !1);
|
|
@@ -2024,7 +2047,7 @@ function $t(e, t) {
|
|
|
2024
2047
|
}
|
|
2025
2048
|
//#endregion
|
|
2026
2049
|
//#region src/composables/commandMenuNavigation.composable.ts
|
|
2027
|
-
function
|
|
2050
|
+
function tn({ isShiftKeyHeld: e, buildContext: n, emit: r, listboxRootRef: i, manager: a, navStack: o, refreshActions: s, resolvedActions: c, scrollToTopOfGroup: l, searchInput: u, subActionsMetaMap: d }) {
|
|
2028
2051
|
let f = v(), m = p(null), h = t(() => o.value.at(-1)?.parentAction ?? null), g = t(() => {
|
|
2029
2052
|
let e = n();
|
|
2030
2053
|
return o.value.filter((e) => e.parentAction.forceAsRootMenu !== !0).map((t) => {
|
|
@@ -2035,7 +2058,7 @@ function en({ isShiftKeyHeld: e, buildContext: n, emit: r, listboxRootRef: i, ma
|
|
|
2035
2058
|
if (h.value === null) return f.t("type_a_command_or_search");
|
|
2036
2059
|
let e = R(h.value, n())?.placeholder;
|
|
2037
2060
|
return e === void 0 ? f.t("search") : typeof e == "function" ? e() : e;
|
|
2038
|
-
}), { preview: y, onKeyDown: b } =
|
|
2061
|
+
}), { preview: y, onKeyDown: b } = Be({
|
|
2039
2062
|
highlightedActionId: m,
|
|
2040
2063
|
getContext: n,
|
|
2041
2064
|
resolvedActions: c
|
|
@@ -2074,7 +2097,7 @@ function en({ isShiftKeyHeld: e, buildContext: n, emit: r, listboxRootRef: i, ma
|
|
|
2074
2097
|
onKeyDown: C
|
|
2075
2098
|
};
|
|
2076
2099
|
}
|
|
2077
|
-
function
|
|
2100
|
+
function nn(e, t) {
|
|
2078
2101
|
let n = [], r = e.parentAction ?? null;
|
|
2079
2102
|
for (; r !== null;) {
|
|
2080
2103
|
if (r.forceAsRootMenu === !0) return n;
|
|
@@ -2088,7 +2111,7 @@ function tn(e, t) {
|
|
|
2088
2111
|
}
|
|
2089
2112
|
//#endregion
|
|
2090
2113
|
//#region src/composables/focusedModels.composable.ts
|
|
2091
|
-
function
|
|
2114
|
+
function rn(e) {
|
|
2092
2115
|
let t = z(), n = p(!1);
|
|
2093
2116
|
function r() {
|
|
2094
2117
|
n.value = !0, t.setFocusedModels([...t.focusedModels, ...e.value]);
|
|
@@ -2107,8 +2130,8 @@ function nn(e) {
|
|
|
2107
2130
|
}
|
|
2108
2131
|
//#endregion
|
|
2109
2132
|
//#region src/composables/temporaryActions.composable.ts
|
|
2110
|
-
function
|
|
2111
|
-
let r =
|
|
2133
|
+
function an(e, t, n = !1) {
|
|
2134
|
+
let r = Yt(), i = [];
|
|
2112
2135
|
function a() {
|
|
2113
2136
|
i.length > 0 || (i = (Array.isArray(e) ? e : [e]).map((e) => r.registerTemporaryAction(s(e))));
|
|
2114
2137
|
}
|
|
@@ -2134,7 +2157,7 @@ function rn(e, t, n = !1) {
|
|
|
2134
2157
|
}
|
|
2135
2158
|
//#endregion
|
|
2136
2159
|
//#region src/composables/activeModels.composable.ts
|
|
2137
|
-
function
|
|
2160
|
+
function on(e, t) {
|
|
2138
2161
|
let n = z();
|
|
2139
2162
|
function r() {
|
|
2140
2163
|
t === "focused" ? n.setFocusedModels([...n.focusedModels, ...e.value]) : n.setViewModels([...n.viewModels, ...e.value]);
|
|
@@ -2150,19 +2173,19 @@ function an(e, t) {
|
|
|
2150
2173
|
}
|
|
2151
2174
|
//#endregion
|
|
2152
2175
|
//#region src/composables/viewModels.composable.ts
|
|
2153
|
-
function
|
|
2154
|
-
|
|
2176
|
+
function sn(e) {
|
|
2177
|
+
on(e, "view");
|
|
2155
2178
|
}
|
|
2156
2179
|
//#endregion
|
|
2157
2180
|
//#region src/utils/commandMenuGroups.util.ts
|
|
2158
|
-
var
|
|
2159
|
-
function ln(e, t) {
|
|
2160
|
-
return e === void 0 ? "no-group" : e.name ? F(e.name, t) : (cn.has(e) || cn.set(e, `unnamed-${sn++}`), cn.get(e));
|
|
2161
|
-
}
|
|
2181
|
+
var cn = 0, ln = /* @__PURE__ */ new WeakMap();
|
|
2162
2182
|
function un(e, t) {
|
|
2183
|
+
return e === void 0 ? "no-group" : e.name ? F(e.name, t) : (ln.has(e) || ln.set(e, `unnamed-${cn++}`), ln.get(e));
|
|
2184
|
+
}
|
|
2185
|
+
function dn(e, t) {
|
|
2163
2186
|
let n = /* @__PURE__ */ new Map();
|
|
2164
2187
|
for (let r of e) {
|
|
2165
|
-
let e = r.group, i =
|
|
2188
|
+
let e = r.group, i = un(e, t), a = n.get(i);
|
|
2166
2189
|
if (a === void 0) {
|
|
2167
2190
|
let r = e?.name ? F(e.name, t) : null;
|
|
2168
2191
|
a = {
|
|
@@ -2179,4 +2202,4 @@ function un(e, t) {
|
|
|
2179
2202
|
return [...n.values()];
|
|
2180
2203
|
}
|
|
2181
2204
|
//#endregion
|
|
2182
|
-
export {
|
|
2205
|
+
export { Ke as GroupPriority, e as actionsLocales, ke as applicableActions, dn as buildCommandMenuGroups, De as createAction, Te as isAuthenticated, B as isSubActionsWithMeta, Le as resolveActionAvatar, nn as resolveActionBreadcrumbs, Re as resolveActionHint, I as resolveActionName, ze as resolveActionPreview, L as resolveActionSelected, F as resolveActionValue, N as resolveApplicable, R as resolveSearchSubActionsConfig, We as resolveSubActions, Ee as setIsAuthenticated, V as storeSubActionsPagination, Ge as useActionDropdownMenuContent, qe as useActionGroup, z as useActionManagerStore, Be as useActionPreview, Yt as useActionRegistryStore, Qt as useActionShortcuts, $t as useCommandMenuActions, en as useCommandMenuAnimation, tn as useCommandMenuNavigation, rn as useFocusedModels, an as useTemporaryActions, sn as useViewModels };
|