@eveshipfit/ui-ingame 1.8.0 → 1.9.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.d.mts CHANGED
@@ -14,6 +14,7 @@ interface TreeListProps {
14
14
  label: string;
15
15
  children: ReactNode;
16
16
  }
17
+ /** Arrow keys, Home and End walk the open rows. */
17
18
  export declare function TreeList({ label, children }: TreeListProps): import("react").JSX.Element;
18
19
  interface TreeGroupProps {
19
20
  label: ReactNode;
package/dist/index.mjs CHANGED
@@ -365,6 +365,7 @@ var TreeList_module_default = {
365
365
  };
366
366
  //#endregion
367
367
  //#region src/primitives/TreeList/TreeList.tsx
368
+ /** Arrow keys, Home and End walk the open rows. */
368
369
  function TreeList(t0) {
369
370
  const $ = c(3);
370
371
  const { label, children } = t0;
@@ -373,6 +374,7 @@ function TreeList(t0) {
373
374
  t1 = /* @__PURE__ */ jsx("ul", {
374
375
  className: TreeList_module_default.tree,
375
376
  "aria-label": label,
377
+ onKeyDown: walk,
376
378
  children
377
379
  });
378
380
  $[0] = children;
@@ -381,22 +383,89 @@ function TreeList(t0) {
381
383
  } else t1 = $[2];
382
384
  return t1;
383
385
  }
386
+ function rows(scope) {
387
+ return [...scope.querySelectorAll(`.${TreeList_module_default.row}`)];
388
+ }
389
+ const walkKeys = /* @__PURE__ */ new Set([
390
+ "ArrowDown",
391
+ "ArrowUp",
392
+ "ArrowLeft",
393
+ "ArrowRight",
394
+ "Home",
395
+ "End"
396
+ ]);
397
+ function hasModifier(event) {
398
+ return event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
399
+ }
400
+ function walk(event) {
401
+ if (event.defaultPrevented || hasModifier(event) || !walkKeys.has(event.key)) return;
402
+ const tree = event.currentTarget;
403
+ const all = rows(tree);
404
+ const row = event.target;
405
+ const index = all.indexOf(row);
406
+ if (index === -1) return;
407
+ let next;
408
+ switch (event.key) {
409
+ case "ArrowDown":
410
+ next = all[index + 1];
411
+ break;
412
+ case "ArrowUp":
413
+ next = all[index - 1];
414
+ break;
415
+ case "Home":
416
+ next = all[0];
417
+ break;
418
+ case "End":
419
+ next = all.at(-1);
420
+ break;
421
+ case "ArrowRight":
422
+ if (row.getAttribute("aria-expanded") === "true") next = all[index + 1];
423
+ break;
424
+ case "ArrowLeft": {
425
+ const parent = row.closest("li")?.parentElement?.closest("li");
426
+ if (parent && tree.contains(parent)) next = parent.querySelector(`.${TreeList_module_default.row}`) ?? void 0;
427
+ break;
428
+ }
429
+ }
430
+ if (next === void 0) return;
431
+ event.preventDefault();
432
+ next.focus();
433
+ }
434
+ /** Focuses the first row of the first `TreeList` in `scope`. */
435
+ function focusTree(scope) {
436
+ const first = scope.querySelector(`.${TreeList_module_default.tree} .${TreeList_module_default.row}`);
437
+ first?.focus();
438
+ return first !== null;
439
+ }
440
+ function isTreeRow(element) {
441
+ return element.matches(`.${TreeList_module_default.tree} .${TreeList_module_default.row}`);
442
+ }
384
443
  function TreeGroup(t0) {
385
- const $ = c(34);
444
+ const $ = c(36);
386
445
  const { label, typeId, icon, description, defaultOpen: t1, after, onDragStart, onDragEnd, children } = t0;
387
446
  const [open, setOpen] = useState(t1 === void 0 ? false : t1);
388
447
  const descriptionId = useId();
389
448
  const t2 = description !== void 0 ? descriptionId : void 0;
390
449
  const t3 = onDragStart !== void 0 || void 0;
391
450
  let t4;
451
+ let t5;
392
452
  if ($[0] !== open) {
393
453
  t4 = () => setOpen(!open);
454
+ t5 = (event) => {
455
+ if (hasModifier(event) || event.key !== (open ? "ArrowLeft" : "ArrowRight")) return;
456
+ event.preventDefault();
457
+ setOpen(!open);
458
+ };
394
459
  $[0] = open;
395
460
  $[1] = t4;
396
- } else t4 = $[1];
397
- let t5;
398
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
399
- t5 = /* @__PURE__ */ jsx("svg", {
461
+ $[2] = t5;
462
+ } else {
463
+ t4 = $[1];
464
+ t5 = $[2];
465
+ }
466
+ let t6;
467
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
468
+ t6 = /* @__PURE__ */ jsx("svg", {
400
469
  className: TreeList_module_default.chevron,
401
470
  viewBox: "0 0 12 12",
402
471
  "aria-hidden": true,
@@ -405,113 +474,115 @@ function TreeGroup(t0) {
405
474
  fill: "currentColor"
406
475
  })
407
476
  });
408
- $[2] = t5;
409
- } else t5 = $[2];
410
- let t6;
411
- if ($[3] !== typeId) {
412
- t6 = typeId !== void 0 && /* @__PURE__ */ jsx(RowIcon, { typeId });
413
- $[3] = typeId;
414
- $[4] = t6;
415
- } else t6 = $[4];
477
+ $[3] = t6;
478
+ } else t6 = $[3];
416
479
  let t7;
417
- if ($[5] !== icon) {
418
- t7 = icon !== void 0 && /* @__PURE__ */ jsx("img", {
480
+ if ($[4] !== typeId) {
481
+ t7 = typeId !== void 0 && /* @__PURE__ */ jsx(RowIcon, { typeId });
482
+ $[4] = typeId;
483
+ $[5] = t7;
484
+ } else t7 = $[5];
485
+ let t8;
486
+ if ($[6] !== icon) {
487
+ t8 = icon !== void 0 && /* @__PURE__ */ jsx("img", {
419
488
  className: TreeList_module_default.smallIcon,
420
489
  src: icon,
421
490
  alt: "",
422
491
  draggable: false
423
492
  });
424
- $[5] = icon;
425
- $[6] = t7;
426
- } else t7 = $[6];
427
- let t8;
428
- if ($[7] !== label) {
429
- t8 = /* @__PURE__ */ jsx("span", {
493
+ $[6] = icon;
494
+ $[7] = t8;
495
+ } else t8 = $[7];
496
+ let t9;
497
+ if ($[8] !== label) {
498
+ t9 = /* @__PURE__ */ jsx("span", {
430
499
  className: TreeList_module_default.label,
431
500
  children: label
432
501
  });
433
- $[7] = label;
434
- $[8] = t8;
435
- } else t8 = $[8];
436
- let t9;
437
- if ($[9] !== description || $[10] !== descriptionId) {
438
- t9 = description !== void 0 && /* @__PURE__ */ jsx("span", {
502
+ $[8] = label;
503
+ $[9] = t9;
504
+ } else t9 = $[9];
505
+ let t10;
506
+ if ($[10] !== description || $[11] !== descriptionId) {
507
+ t10 = description !== void 0 && /* @__PURE__ */ jsx("span", {
439
508
  id: descriptionId,
440
509
  className: TreeList_module_default.label,
441
510
  "aria-hidden": true,
442
511
  children: description
443
512
  });
444
- $[9] = description;
445
- $[10] = descriptionId;
446
- $[11] = t9;
447
- } else t9 = $[11];
448
- let t10;
449
- if ($[12] !== t8 || $[13] !== t9) {
450
- t10 = /* @__PURE__ */ jsxs("span", {
513
+ $[10] = description;
514
+ $[11] = descriptionId;
515
+ $[12] = t10;
516
+ } else t10 = $[12];
517
+ let t11;
518
+ if ($[13] !== t10 || $[14] !== t9) {
519
+ t11 = /* @__PURE__ */ jsxs("span", {
451
520
  className: TreeList_module_default.text,
452
- children: [t8, t9]
521
+ children: [t9, t10]
453
522
  });
454
- $[12] = t8;
455
- $[13] = t9;
456
- $[14] = t10;
457
- } else t10 = $[14];
458
- let t11;
459
- if ($[15] !== onDragEnd || $[16] !== onDragStart || $[17] !== open || $[18] !== t10 || $[19] !== t2 || $[20] !== t3 || $[21] !== t4 || $[22] !== t6 || $[23] !== t7) {
460
- t11 = /* @__PURE__ */ jsxs("button", {
523
+ $[13] = t10;
524
+ $[14] = t9;
525
+ $[15] = t11;
526
+ } else t11 = $[15];
527
+ let t12;
528
+ if ($[16] !== onDragEnd || $[17] !== onDragStart || $[18] !== open || $[19] !== t11 || $[20] !== t2 || $[21] !== t3 || $[22] !== t4 || $[23] !== t5 || $[24] !== t7 || $[25] !== t8) {
529
+ t12 = /* @__PURE__ */ jsxs("button", {
461
530
  type: "button",
462
531
  className: TreeList_module_default.row,
463
532
  "aria-expanded": open,
464
533
  "aria-describedby": t2,
465
534
  draggable: t3,
466
535
  onClick: t4,
536
+ onKeyDown: t5,
467
537
  onDragStart,
468
538
  onDragEnd,
469
539
  children: [
470
- t5,
471
540
  t6,
472
541
  t7,
473
- t10
542
+ t8,
543
+ t11
474
544
  ]
475
545
  });
476
- $[15] = onDragEnd;
477
- $[16] = onDragStart;
478
- $[17] = open;
479
- $[18] = t10;
480
- $[19] = t2;
481
- $[20] = t3;
482
- $[21] = t4;
483
- $[22] = t6;
484
- $[23] = t7;
485
- $[24] = t11;
486
- } else t11 = $[24];
487
- let t12;
488
- if ($[25] !== after || $[26] !== t11) {
489
- t12 = /* @__PURE__ */ jsxs("div", {
546
+ $[16] = onDragEnd;
547
+ $[17] = onDragStart;
548
+ $[18] = open;
549
+ $[19] = t11;
550
+ $[20] = t2;
551
+ $[21] = t3;
552
+ $[22] = t4;
553
+ $[23] = t5;
554
+ $[24] = t7;
555
+ $[25] = t8;
556
+ $[26] = t12;
557
+ } else t12 = $[26];
558
+ let t13;
559
+ if ($[27] !== after || $[28] !== t12) {
560
+ t13 = /* @__PURE__ */ jsxs("div", {
490
561
  className: TreeList_module_default.head,
491
- children: [t11, after]
562
+ children: [t12, after]
492
563
  });
493
- $[25] = after;
494
- $[26] = t11;
495
- $[27] = t12;
496
- } else t12 = $[27];
497
- let t13;
498
- if ($[28] !== children || $[29] !== open) {
499
- t13 = open && /* @__PURE__ */ jsx("ul", {
564
+ $[27] = after;
565
+ $[28] = t12;
566
+ $[29] = t13;
567
+ } else t13 = $[29];
568
+ let t14;
569
+ if ($[30] !== children || $[31] !== open) {
570
+ t14 = open && /* @__PURE__ */ jsx("ul", {
500
571
  className: TreeList_module_default.group,
501
572
  children: children()
502
573
  });
503
- $[28] = children;
504
- $[29] = open;
505
- $[30] = t13;
506
- } else t13 = $[30];
507
- let t14;
508
- if ($[31] !== t12 || $[32] !== t13) {
509
- t14 = /* @__PURE__ */ jsxs("li", { children: [t12, t13] });
510
- $[31] = t12;
511
- $[32] = t13;
512
- $[33] = t14;
513
- } else t14 = $[33];
514
- return t14;
574
+ $[30] = children;
575
+ $[31] = open;
576
+ $[32] = t14;
577
+ } else t14 = $[32];
578
+ let t15;
579
+ if ($[33] !== t13 || $[34] !== t14) {
580
+ t15 = /* @__PURE__ */ jsxs("li", { children: [t13, t14] });
581
+ $[33] = t13;
582
+ $[34] = t14;
583
+ $[35] = t15;
584
+ } else t15 = $[35];
585
+ return t15;
515
586
  }
516
587
  /** Activates on double click, as EVE's own lists do, unless `activateOnClick` is set. */
517
588
  function TreeLeaf(t0) {
@@ -1270,7 +1341,7 @@ function SlotPress(t0) {
1270
1341
  className,
1271
1342
  "aria-label": label,
1272
1343
  onClick: onPress,
1273
- onKeyDown: _temp$21
1344
+ onKeyDown: _temp$22
1274
1345
  });
1275
1346
  $[0] = className;
1276
1347
  $[1] = label;
@@ -1279,7 +1350,7 @@ function SlotPress(t0) {
1279
1350
  } else t1 = $[3];
1280
1351
  return t1;
1281
1352
  }
1282
- function _temp$21(event) {
1353
+ function _temp$22(event) {
1283
1354
  if (event.key !== "Enter" && event.key !== " ") return;
1284
1355
  event.preventDefault();
1285
1356
  event.currentTarget.dispatchEvent(new MouseEvent("click", {
@@ -1487,7 +1558,7 @@ function WheelSlot(t0) {
1487
1558
  })
1488
1559
  });
1489
1560
  }
1490
- t8 = row.findLastIndex(_temp$20);
1561
+ t8 = row.findLastIndex(_temp$21);
1491
1562
  $[27] = chargeTypeId;
1492
1563
  $[28] = fitted;
1493
1564
  $[29] = onRemoveCharge;
@@ -1692,7 +1763,7 @@ function WheelSlot(t0) {
1692
1763
  } else t27 = $[100];
1693
1764
  return t27;
1694
1765
  }
1695
- function _temp$20(action) {
1766
+ function _temp$21(action) {
1696
1767
  return action !== void 0;
1697
1768
  }
1698
1769
  function frameTexture(fitted, preview, state, activatable) {
@@ -1873,7 +1944,7 @@ function useDecoded(src) {
1873
1944
  image.decode().then(() => {
1874
1945
  decoded.add(src);
1875
1946
  setReady(src);
1876
- }, _temp$19);
1947
+ }, _temp$20);
1877
1948
  };
1878
1949
  t1 = [src];
1879
1950
  $[0] = src;
@@ -1893,7 +1964,7 @@ function useDecoded(src) {
1893
1964
  } else t2 = $[5];
1894
1965
  return t2;
1895
1966
  }
1896
- function _temp$19() {}
1967
+ function _temp$20() {}
1897
1968
  function WheelGauge(t0) {
1898
1969
  const $ = c(15);
1899
1970
  const { resource, used, total, valueText } = t0;
@@ -2527,7 +2598,8 @@ var WheelAugmentation_module_default = {
2527
2598
  "number": "BVBbxW_number",
2528
2599
  "press": "BVBbxW_press",
2529
2600
  "slot": "BVBbxW_slot",
2530
- "track": "BVBbxW_track"
2601
+ "track": "BVBbxW_track",
2602
+ "tray": "BVBbxW_tray"
2531
2603
  };
2532
2604
  //#endregion
2533
2605
  //#region src/primitives/Wheel/WheelAugmentationTrack.tsx
@@ -2631,12 +2703,19 @@ function WheelAugmentationTrack(t0) {
2631
2703
  } else t10 = $[20];
2632
2704
  return t10;
2633
2705
  }
2706
+ //#endregion
2707
+ //#region src/primitives/Wheel/WheelAugmentationSlot.tsx
2708
+ const slotSize = 32;
2634
2709
  const slotGap = 3;
2635
- const unfitOffset = 28.99;
2636
- const bridgeOffset = 19.25;
2710
+ const actionSize = 12.97;
2711
+ /** From the slot's centre, inward: where the tray with the actions starts. */
2712
+ const trayStart = 20;
2713
+ const trayLength = 31.94;
2714
+ const unfitOffset = -28.485;
2715
+ const infoOffset = -43.455;
2637
2716
  /** A small slot for an implant or a booster, on its `WheelAugmentationTrack`. */
2638
2717
  function WheelAugmentationSlot(t0) {
2639
- const $ = c(70);
2718
+ const $ = c(77);
2640
2719
  let className;
2641
2720
  let kind;
2642
2721
  let label;
@@ -2644,16 +2723,18 @@ function WheelAugmentationSlot(t0) {
2644
2723
  let onDragEnd;
2645
2724
  let onDragStart;
2646
2725
  let onPress;
2726
+ let onShowInfo;
2647
2727
  let onUnfit;
2648
2728
  let position;
2649
2729
  let props;
2650
2730
  let style;
2651
2731
  let t1;
2732
+ let t2;
2652
2733
  let tooltip;
2653
2734
  let typeId;
2654
2735
  let typeName;
2655
2736
  if ($[0] !== t0) {
2656
- ({kind, position, number, typeId, typeName, preview: t1, tooltip, onDragStart, onDragEnd, onUnfit, onPress, label, className, style, ...props} = t0);
2737
+ ({kind, position, number, typeId, typeName, preview: t1, tooltip, onDragStart, onDragEnd, onUnfit, onShowInfo, onPress, label, actions: t2, className, style, ...props} = t0);
2657
2738
  $[0] = t0;
2658
2739
  $[1] = className;
2659
2740
  $[2] = kind;
@@ -2662,14 +2743,16 @@ function WheelAugmentationSlot(t0) {
2662
2743
  $[5] = onDragEnd;
2663
2744
  $[6] = onDragStart;
2664
2745
  $[7] = onPress;
2665
- $[8] = onUnfit;
2666
- $[9] = position;
2667
- $[10] = props;
2668
- $[11] = style;
2669
- $[12] = t1;
2670
- $[13] = tooltip;
2671
- $[14] = typeId;
2672
- $[15] = typeName;
2746
+ $[8] = onShowInfo;
2747
+ $[9] = onUnfit;
2748
+ $[10] = position;
2749
+ $[11] = props;
2750
+ $[12] = style;
2751
+ $[13] = t1;
2752
+ $[14] = t2;
2753
+ $[15] = tooltip;
2754
+ $[16] = typeId;
2755
+ $[17] = typeName;
2673
2756
  } else {
2674
2757
  className = $[1];
2675
2758
  kind = $[2];
@@ -2678,93 +2761,99 @@ function WheelAugmentationSlot(t0) {
2678
2761
  onDragEnd = $[5];
2679
2762
  onDragStart = $[6];
2680
2763
  onPress = $[7];
2681
- onUnfit = $[8];
2682
- position = $[9];
2683
- props = $[10];
2684
- style = $[11];
2685
- t1 = $[12];
2686
- tooltip = $[13];
2687
- typeId = $[14];
2688
- typeName = $[15];
2764
+ onShowInfo = $[8];
2765
+ onUnfit = $[9];
2766
+ position = $[10];
2767
+ props = $[11];
2768
+ style = $[12];
2769
+ t1 = $[13];
2770
+ t2 = $[14];
2771
+ tooltip = $[15];
2772
+ typeId = $[16];
2773
+ typeName = $[17];
2689
2774
  }
2690
2775
  const preview = t1 === void 0 ? false : t1;
2691
- let bridge;
2692
- let t2;
2776
+ const actions = t2 === void 0 ? true : t2;
2777
+ let angle;
2778
+ let info;
2693
2779
  let t3;
2694
2780
  let t4;
2781
+ let t5;
2695
2782
  let unfit;
2696
- if ($[16] !== className || $[17] !== kind || $[18] !== position || $[19] !== props) {
2697
- const angle = augmentationAngle(kind, position);
2783
+ if ($[18] !== className || $[19] !== kind || $[20] !== position || $[21] !== props) {
2784
+ angle = augmentationAngle(kind, position);
2698
2785
  unfit = polar(angle, unfitOffset);
2699
- bridge = polar(angle, bridgeOffset);
2700
- t3 = props;
2701
- let t5;
2702
- if ($[25] !== className) {
2703
- t5 = [WheelAugmentation_module_default.slot, className].filter(Boolean);
2704
- $[25] = className;
2705
- $[26] = t5;
2706
- } else t5 = $[26];
2707
- t4 = t5.join(" ");
2708
- t2 = placeAt(angle, 319);
2709
- $[16] = className;
2710
- $[17] = kind;
2711
- $[18] = position;
2712
- $[19] = props;
2713
- $[20] = bridge;
2714
- $[21] = t2;
2715
- $[22] = t3;
2716
- $[23] = t4;
2717
- $[24] = unfit;
2786
+ info = polar(angle, infoOffset);
2787
+ t4 = props;
2788
+ let t6;
2789
+ if ($[28] !== className) {
2790
+ t6 = [WheelAugmentation_module_default.slot, className].filter(Boolean);
2791
+ $[28] = className;
2792
+ $[29] = t6;
2793
+ } else t6 = $[29];
2794
+ t5 = t6.join(" ");
2795
+ t3 = placeAt(angle, 319);
2796
+ $[18] = className;
2797
+ $[19] = kind;
2798
+ $[20] = position;
2799
+ $[21] = props;
2800
+ $[22] = angle;
2801
+ $[23] = info;
2802
+ $[24] = t3;
2803
+ $[25] = t4;
2804
+ $[26] = t5;
2805
+ $[27] = unfit;
2718
2806
  } else {
2719
- bridge = $[20];
2720
- t2 = $[21];
2721
- t3 = $[22];
2722
- t4 = $[23];
2723
- unfit = $[24];
2807
+ angle = $[22];
2808
+ info = $[23];
2809
+ t3 = $[24];
2810
+ t4 = $[25];
2811
+ t5 = $[26];
2812
+ unfit = $[27];
2724
2813
  }
2725
- let t5;
2726
- if ($[27] !== style || $[28] !== t2) {
2727
- t5 = {
2728
- ...t2,
2814
+ let t6;
2815
+ if ($[30] !== style || $[31] !== t3) {
2816
+ t6 = {
2817
+ ...t3,
2729
2818
  ...style
2730
2819
  };
2731
- $[27] = style;
2732
- $[28] = t2;
2733
- $[29] = t5;
2734
- } else t5 = $[29];
2735
- const t6 = typeId !== void 0 || void 0;
2736
- const t7 = preview || void 0;
2737
- let t8;
2738
- if ($[30] !== onUnfit) {
2739
- t8 = onUnfit && ((event) => {
2820
+ $[30] = style;
2821
+ $[31] = t3;
2822
+ $[32] = t6;
2823
+ } else t6 = $[32];
2824
+ const t7 = typeId !== void 0 || void 0;
2825
+ const t8 = preview || void 0;
2826
+ let t9;
2827
+ if ($[33] !== onUnfit) {
2828
+ t9 = onUnfit && ((event) => {
2740
2829
  event.preventDefault();
2741
2830
  onUnfit();
2742
2831
  });
2743
- $[30] = onUnfit;
2744
- $[31] = t8;
2745
- } else t8 = $[31];
2746
- const t9 = onDragStart !== void 0 || void 0;
2747
- let t10;
2748
- if ($[32] !== kind || $[33] !== position) {
2749
- t10 = framePath(kind, position);
2750
- $[32] = kind;
2751
- $[33] = position;
2752
- $[34] = t10;
2753
- } else t10 = $[34];
2832
+ $[33] = onUnfit;
2833
+ $[34] = t9;
2834
+ } else t9 = $[34];
2835
+ const t10 = onDragStart !== void 0 || void 0;
2754
2836
  let t11;
2755
- if ($[35] !== t10) {
2756
- t11 = /* @__PURE__ */ jsx("svg", {
2837
+ if ($[35] !== kind || $[36] !== position) {
2838
+ t11 = framePath(kind, position);
2839
+ $[35] = kind;
2840
+ $[36] = position;
2841
+ $[37] = t11;
2842
+ } else t11 = $[37];
2843
+ let t12;
2844
+ if ($[38] !== t11) {
2845
+ t12 = /* @__PURE__ */ jsx("svg", {
2757
2846
  className: WheelAugmentation_module_default.frame,
2758
2847
  viewBox: `-16 -16 32 32`,
2759
2848
  "aria-hidden": true,
2760
- children: /* @__PURE__ */ jsx("path", { d: t10 })
2849
+ children: /* @__PURE__ */ jsx("path", { d: t11 })
2761
2850
  });
2762
- $[35] = t10;
2763
- $[36] = t11;
2764
- } else t11 = $[36];
2765
- let t12;
2766
- if ($[37] !== number || $[38] !== typeId) {
2767
- t12 = typeId !== void 0 ? /* @__PURE__ */ jsx("span", {
2851
+ $[38] = t11;
2852
+ $[39] = t12;
2853
+ } else t12 = $[39];
2854
+ let t13;
2855
+ if ($[40] !== number || $[41] !== typeId) {
2856
+ t13 = typeId !== void 0 ? /* @__PURE__ */ jsx("span", {
2768
2857
  className: WheelAugmentation_module_default.icon,
2769
2858
  children: /* @__PURE__ */ jsx(TypeIcon, {
2770
2859
  typeId,
@@ -2775,108 +2864,127 @@ function WheelAugmentationSlot(t0) {
2775
2864
  className: WheelAugmentation_module_default.number,
2776
2865
  children: number
2777
2866
  });
2778
- $[37] = number;
2779
- $[38] = typeId;
2780
- $[39] = t12;
2781
- } else t12 = $[39];
2782
- let t13;
2783
- if ($[40] !== label || $[41] !== onPress) {
2784
- t13 = onPress && /* @__PURE__ */ jsx(SlotPress, {
2867
+ $[40] = number;
2868
+ $[41] = typeId;
2869
+ $[42] = t13;
2870
+ } else t13 = $[42];
2871
+ let t14;
2872
+ if ($[43] !== label || $[44] !== onPress) {
2873
+ t14 = onPress && /* @__PURE__ */ jsx(SlotPress, {
2785
2874
  className: WheelAugmentation_module_default.press,
2786
2875
  label,
2787
2876
  onPress
2788
2877
  });
2789
- $[40] = label;
2790
- $[41] = onPress;
2791
- $[42] = t13;
2792
- } else t13 = $[42];
2793
- let t14;
2794
- if ($[43] !== onDragEnd || $[44] !== onDragStart || $[45] !== t11 || $[46] !== t12 || $[47] !== t13 || $[48] !== t9) {
2795
- t14 = /* @__PURE__ */ jsxs("div", {
2878
+ $[43] = label;
2879
+ $[44] = onPress;
2880
+ $[45] = t14;
2881
+ } else t14 = $[45];
2882
+ let t15;
2883
+ if ($[46] !== onDragEnd || $[47] !== onDragStart || $[48] !== t10 || $[49] !== t12 || $[50] !== t13 || $[51] !== t14) {
2884
+ t15 = /* @__PURE__ */ jsxs("div", {
2796
2885
  className: WheelAugmentation_module_default.body,
2797
- draggable: t9,
2886
+ draggable: t10,
2798
2887
  onDragStart,
2799
2888
  onDragEnd,
2800
2889
  children: [
2801
- t11,
2802
2890
  t12,
2803
- t13
2891
+ t13,
2892
+ t14
2804
2893
  ]
2805
2894
  });
2806
- $[43] = onDragEnd;
2807
- $[44] = onDragStart;
2808
- $[45] = t11;
2809
- $[46] = t12;
2810
- $[47] = t13;
2811
- $[48] = t9;
2812
- $[49] = t14;
2813
- } else t14 = $[49];
2814
- let t15;
2815
- if ($[50] !== t14 || $[51] !== tooltip) {
2816
- t15 = /* @__PURE__ */ jsx(Tooltip, {
2817
- label: tooltip,
2818
- children: t14
2819
- });
2820
- $[50] = t14;
2821
- $[51] = tooltip;
2895
+ $[46] = onDragEnd;
2896
+ $[47] = onDragStart;
2897
+ $[48] = t10;
2898
+ $[49] = t12;
2899
+ $[50] = t13;
2900
+ $[51] = t14;
2822
2901
  $[52] = t15;
2823
2902
  } else t15 = $[52];
2824
2903
  let t16;
2825
- if ($[53] !== bridge || $[54] !== kind || $[55] !== onUnfit || $[56] !== typeId || $[57] !== typeName || $[58] !== unfit) {
2826
- t16 = typeId !== void 0 && onUnfit && /* @__PURE__ */ jsxs("fieldset", {
2904
+ if ($[53] !== t15 || $[54] !== tooltip) {
2905
+ t16 = /* @__PURE__ */ jsx(Tooltip, {
2906
+ label: tooltip,
2907
+ children: t15
2908
+ });
2909
+ $[53] = t15;
2910
+ $[54] = tooltip;
2911
+ $[55] = t16;
2912
+ } else t16 = $[55];
2913
+ let t17;
2914
+ if ($[56] !== actions || $[57] !== angle || $[58] !== info || $[59] !== kind || $[60] !== onShowInfo || $[61] !== onUnfit || $[62] !== preview || $[63] !== typeId || $[64] !== typeName || $[65] !== unfit) {
2915
+ t17 = typeId !== void 0 && actions && /* @__PURE__ */ jsxs("fieldset", {
2827
2916
  className: WheelAugmentation_module_default.actions,
2828
2917
  "aria-label": typeName,
2829
- children: [/* @__PURE__ */ jsx("span", {
2830
- className: WheelAugmentation_module_default.bridge,
2831
- style: {
2832
- "--x": bridge.x,
2833
- "--y": bridge.y
2834
- }
2835
- }), /* @__PURE__ */ jsx("span", {
2836
- className: WheelAugmentation_module_default.action,
2837
- style: {
2838
- "--x": unfit.x,
2839
- "--y": unfit.y
2840
- },
2841
- children: /* @__PURE__ */ jsx(SlotAction, {
2842
- icon: "module-unfit",
2843
- label: kind === "implant" ? "Unfit Implant" : "Unfit Booster",
2844
- onPress: onUnfit
2918
+ inert: preview,
2919
+ style: {
2920
+ "--angle": `${angle}deg`,
2921
+ "--slot-size": slotSize,
2922
+ "--action-size": actionSize,
2923
+ "--tray-start": trayStart,
2924
+ "--tray-length": trayLength,
2925
+ "--tray-width": 16.97
2926
+ },
2927
+ children: [
2928
+ /* @__PURE__ */ jsx("span", { className: WheelAugmentation_module_default.bridge }),
2929
+ /* @__PURE__ */ jsx("span", { className: WheelAugmentation_module_default.tray }),
2930
+ onUnfit && /* @__PURE__ */ jsx("span", {
2931
+ className: WheelAugmentation_module_default.action,
2932
+ style: {
2933
+ "--x": unfit.x,
2934
+ "--y": unfit.y
2935
+ },
2936
+ children: /* @__PURE__ */ jsx(SlotAction, {
2937
+ icon: "module-unfit",
2938
+ label: kind === "implant" ? "Unfit Implant" : "Unfit Booster",
2939
+ onPress: onUnfit
2940
+ })
2941
+ }),
2942
+ /* @__PURE__ */ jsx("span", {
2943
+ className: WheelAugmentation_module_default.action,
2944
+ style: {
2945
+ "--x": info.x,
2946
+ "--y": info.y
2947
+ },
2948
+ children: /* @__PURE__ */ jsx(SlotInfo, { onPress: onShowInfo })
2845
2949
  })
2846
- })]
2950
+ ]
2847
2951
  });
2848
- $[53] = bridge;
2849
- $[54] = kind;
2850
- $[55] = onUnfit;
2851
- $[56] = typeId;
2852
- $[57] = typeName;
2853
- $[58] = unfit;
2854
- $[59] = t16;
2855
- } else t16 = $[59];
2856
- let t17;
2857
- if ($[60] !== kind || $[61] !== t15 || $[62] !== t16 || $[63] !== t3 || $[64] !== t4 || $[65] !== t5 || $[66] !== t6 || $[67] !== t7 || $[68] !== t8) {
2858
- t17 = /* @__PURE__ */ jsxs("div", {
2859
- ...t3,
2860
- className: t4,
2861
- style: t5,
2952
+ $[56] = actions;
2953
+ $[57] = angle;
2954
+ $[58] = info;
2955
+ $[59] = kind;
2956
+ $[60] = onShowInfo;
2957
+ $[61] = onUnfit;
2958
+ $[62] = preview;
2959
+ $[63] = typeId;
2960
+ $[64] = typeName;
2961
+ $[65] = unfit;
2962
+ $[66] = t17;
2963
+ } else t17 = $[66];
2964
+ let t18;
2965
+ if ($[67] !== kind || $[68] !== t16 || $[69] !== t17 || $[70] !== t4 || $[71] !== t5 || $[72] !== t6 || $[73] !== t7 || $[74] !== t8 || $[75] !== t9) {
2966
+ t18 = /* @__PURE__ */ jsxs("div", {
2967
+ ...t4,
2968
+ className: t5,
2969
+ style: t6,
2862
2970
  "data-kind": kind,
2863
- "data-filled": t6,
2864
- "data-preview": t7,
2865
- onContextMenu: t8,
2866
- children: [t15, t16]
2971
+ "data-filled": t7,
2972
+ "data-preview": t8,
2973
+ onContextMenu: t9,
2974
+ children: [t16, t17]
2867
2975
  });
2868
- $[60] = kind;
2869
- $[61] = t15;
2870
- $[62] = t16;
2871
- $[63] = t3;
2872
- $[64] = t4;
2873
- $[65] = t5;
2874
- $[66] = t6;
2875
- $[67] = t7;
2876
- $[68] = t8;
2976
+ $[67] = kind;
2977
+ $[68] = t16;
2877
2978
  $[69] = t17;
2878
- } else t17 = $[69];
2879
- return t17;
2979
+ $[70] = t4;
2980
+ $[71] = t5;
2981
+ $[72] = t6;
2982
+ $[73] = t7;
2983
+ $[74] = t8;
2984
+ $[75] = t9;
2985
+ $[76] = t18;
2986
+ } else t18 = $[76];
2987
+ return t18;
2880
2988
  }
2881
2989
  /** The slot as a piece of its track, around its centre; the gaps to its neighbours as wide inside as out. */
2882
2990
  function framePath(kind, position) {
@@ -3598,7 +3706,7 @@ function SensorStrengths(t0) {
3598
3706
  if ($[0] !== strengths) {
3599
3707
  t4 = Symbol.for("react.early_return_sentinel");
3600
3708
  bb0: {
3601
- const shown = strengths.filter(_temp$18);
3709
+ const shown = strengths.filter(_temp$19);
3602
3710
  if (shown.length === 0) {
3603
3711
  t4 = null;
3604
3712
  break bb0;
@@ -3653,7 +3761,7 @@ function _temp2$10(strength) {
3653
3761
  strength.displayName
3654
3762
  ] }, strength.name);
3655
3763
  }
3656
- function _temp$18(t0) {
3764
+ function _temp$19(t0) {
3657
3765
  const { value } = t0;
3658
3766
  return value;
3659
3767
  }
@@ -3701,14 +3809,14 @@ function Cloak(t0) {
3701
3809
  itemRef,
3702
3810
  name: "maxVelocityModifier",
3703
3811
  decimals: 0,
3704
- format: _temp$17
3812
+ format: _temp$18
3705
3813
  });
3706
3814
  $[0] = itemRef;
3707
3815
  $[1] = t1;
3708
3816
  } else t1 = $[1];
3709
3817
  return t1;
3710
3818
  }
3711
- function _temp$17(value, format) {
3819
+ function _temp$18(value, format) {
3712
3820
  return percent((value - 1) * 100, format);
3713
3821
  }
3714
3822
  //#endregion
@@ -4236,7 +4344,7 @@ function DamageTypes(t0) {
4236
4344
  t4,
4237
4345
  t5,
4238
4346
  t6
4239
- ].filter(_temp$16);
4347
+ ].filter(_temp$17);
4240
4348
  $[0] = t3;
4241
4349
  $[1] = t4;
4242
4350
  $[2] = t5;
@@ -4304,7 +4412,7 @@ function _temp2$9(t0) {
4304
4412
  text
4305
4413
  }, name_0);
4306
4414
  }
4307
- function _temp$16(damage) {
4415
+ function _temp$17(damage) {
4308
4416
  return damage.value;
4309
4417
  }
4310
4418
  function useDamage(name, itemRef, charge) {
@@ -4554,9 +4662,9 @@ function Resistance$1(t0) {
4554
4662
  /** The resistances a module gives, for every layer. */
4555
4663
  function _temp2$8(t0) {
4556
4664
  const { resistances } = t0;
4557
- return resistances.some(_temp$15);
4665
+ return resistances.some(_temp$16);
4558
4666
  }
4559
- function _temp$15(t0) {
4667
+ function _temp$16(t0) {
4560
4668
  const { value } = t0;
4561
4669
  return value !== 1;
4562
4670
  }
@@ -4764,7 +4872,7 @@ function ResistanceBonus(t0) {
4764
4872
  t3,
4765
4873
  t4,
4766
4874
  t5
4767
- ].filter(_temp$14);
4875
+ ].filter(_temp$15);
4768
4876
  const [first] = bonuses;
4769
4877
  if (first === void 0) {
4770
4878
  t6 = null;
@@ -4814,7 +4922,7 @@ function _temp2$7(t0) {
4814
4922
  text
4815
4923
  }, name);
4816
4924
  }
4817
- function _temp$14(bonus) {
4925
+ function _temp$15(bonus) {
4818
4926
  return bonus.value;
4819
4927
  }
4820
4928
  //#endregion
@@ -4917,14 +5025,14 @@ function SignatureSuppressor(t0) {
4917
5025
  itemRef,
4918
5026
  name: "signatureSuppressorSignatureRadiusBonusPassive",
4919
5027
  decimals: 0,
4920
- format: _temp$13
5028
+ format: _temp$14
4921
5029
  });
4922
5030
  $[0] = itemRef;
4923
5031
  $[1] = t1;
4924
5032
  } else t1 = $[1];
4925
5033
  return t1;
4926
5034
  }
4927
- function _temp$13(value, format) {
5035
+ function _temp$14(value, format) {
4928
5036
  return percent((1 - value) * 100, format);
4929
5037
  }
4930
5038
  //#endregion
@@ -5027,7 +5135,7 @@ function StasisWebifier(props) {
5027
5135
  t0 = {
5028
5136
  of: props.itemRef,
5029
5137
  decimals: 0,
5030
- format: _temp$12
5138
+ format: _temp$13
5031
5139
  };
5032
5140
  $[0] = props.itemRef;
5033
5141
  $[1] = t0;
@@ -5057,7 +5165,7 @@ function StasisWebifier(props) {
5057
5165
  } else t3 = $[8];
5058
5166
  return t3;
5059
5167
  }
5060
- function _temp$12(value, format) {
5168
+ function _temp$13(value, format) {
5061
5169
  return percent(-value, format);
5062
5170
  }
5063
5171
  //#endregion
@@ -5945,7 +6053,7 @@ function FittingAugmentations(t0) {
5945
6053
  const boosters = useBoosters();
5946
6054
  let t1;
5947
6055
  if ($[0] !== implants || $[1] !== readOnly) {
5948
- t1 = !readOnly || implants.some(_temp$11);
6056
+ t1 = !readOnly || implants.some(_temp$12);
5949
6057
  $[0] = implants;
5950
6058
  $[1] = readOnly;
5951
6059
  $[2] = t1;
@@ -6000,11 +6108,11 @@ function FittingAugmentations(t0) {
6000
6108
  } else t5 = $[15];
6001
6109
  return t5;
6002
6110
  }
6003
- function _temp$11(slot) {
6111
+ function _temp$12(slot) {
6004
6112
  return slot.item !== void 0;
6005
6113
  }
6006
6114
  function FittingAugmentation(t0) {
6007
- const $ = c(67);
6115
+ const $ = c(73);
6008
6116
  const { kind, position, number, content, readOnly } = t0;
6009
6117
  const store = useFitStore();
6010
6118
  const sde = useSde();
@@ -6012,6 +6120,7 @@ function FittingAugmentation(t0) {
6012
6120
  const { show, clear } = usePreview();
6013
6121
  const { dragging, start, end } = useDrag();
6014
6122
  const { browse } = useBrowse();
6123
+ const { show: showInfo } = useShowInfo();
6015
6124
  const item = content?.item;
6016
6125
  const type = useType(item?.type_id);
6017
6126
  const ref = content?.ref;
@@ -6089,7 +6198,10 @@ function FittingAugmentation(t0) {
6089
6198
  if (readOnly) {
6090
6199
  let t9;
6091
6200
  if ($[22] !== shown) {
6092
- t9 = /* @__PURE__ */ jsx(WheelAugmentationSlot, { ...shown });
6201
+ t9 = /* @__PURE__ */ jsx(WheelAugmentationSlot, {
6202
+ ...shown,
6203
+ actions: false
6204
+ });
6093
6205
  $[22] = shown;
6094
6206
  $[23] = t9;
6095
6207
  } else t9 = $[23];
@@ -6169,21 +6281,36 @@ function FittingAugmentation(t0) {
6169
6281
  $[50] = t14;
6170
6282
  } else t14 = $[50];
6171
6283
  let t15;
6172
- if ($[51] !== browse || $[52] !== content?.index || $[53] !== kind || $[54] !== number) {
6173
- t15 = () => browse({
6284
+ if ($[51] !== item || $[52] !== kind || $[53] !== ref || $[54] !== showInfo) {
6285
+ t15 = item && ref !== void 0 ? (element) => showInfo({
6286
+ typeId: item.type_id,
6287
+ ref
6288
+ }, {
6289
+ element,
6290
+ side: kind === "implant" ? "right" : "left"
6291
+ }) : void 0;
6292
+ $[51] = item;
6293
+ $[52] = kind;
6294
+ $[53] = ref;
6295
+ $[54] = showInfo;
6296
+ $[55] = t15;
6297
+ } else t15 = $[55];
6298
+ let t16;
6299
+ if ($[56] !== browse || $[57] !== content?.index || $[58] !== kind || $[59] !== number) {
6300
+ t16 = () => browse({
6174
6301
  type: kind,
6175
6302
  index: number ?? content?.index
6176
6303
  });
6177
- $[51] = browse;
6178
- $[52] = content?.index;
6179
- $[53] = kind;
6180
- $[54] = number;
6181
- $[55] = t15;
6182
- } else t15 = $[55];
6183
- const t16 = type?.name ?? (number === void 0 ? `Empty ${slotName}` : `Empty ${slotName} ${number}`);
6184
- let t17;
6185
- if ($[56] !== end || $[57] !== shown || $[58] !== t10 || $[59] !== t11 || $[60] !== t12 || $[61] !== t13 || $[62] !== t14 || $[63] !== t15 || $[64] !== t16 || $[65] !== t9) {
6186
- t17 = /* @__PURE__ */ jsx(WheelAugmentationSlot, {
6304
+ $[56] = browse;
6305
+ $[57] = content?.index;
6306
+ $[58] = kind;
6307
+ $[59] = number;
6308
+ $[60] = t16;
6309
+ } else t16 = $[60];
6310
+ const t17 = type?.name ?? (number === void 0 ? `Empty ${slotName}` : `Empty ${slotName} ${number}`);
6311
+ let t18;
6312
+ if ($[61] !== end || $[62] !== shown || $[63] !== t10 || $[64] !== t11 || $[65] !== t12 || $[66] !== t13 || $[67] !== t14 || $[68] !== t15 || $[69] !== t16 || $[70] !== t17 || $[71] !== t9) {
6313
+ t18 = /* @__PURE__ */ jsx(WheelAugmentationSlot, {
6187
6314
  ...shown,
6188
6315
  onDragStart: t9,
6189
6316
  onDragEnd: end,
@@ -6192,22 +6319,24 @@ function FittingAugmentation(t0) {
6192
6319
  onDragOver: t12,
6193
6320
  onDrop: t13,
6194
6321
  onUnfit: t14,
6195
- onPress: t15,
6196
- label: t16
6197
- });
6198
- $[56] = end;
6199
- $[57] = shown;
6200
- $[58] = t10;
6201
- $[59] = t11;
6202
- $[60] = t12;
6203
- $[61] = t13;
6204
- $[62] = t14;
6205
- $[63] = t15;
6206
- $[64] = t16;
6207
- $[65] = t9;
6208
- $[66] = t17;
6209
- } else t17 = $[66];
6210
- return t17;
6322
+ onShowInfo: t15,
6323
+ onPress: t16,
6324
+ label: t17
6325
+ });
6326
+ $[61] = end;
6327
+ $[62] = shown;
6328
+ $[63] = t10;
6329
+ $[64] = t11;
6330
+ $[65] = t12;
6331
+ $[66] = t13;
6332
+ $[67] = t14;
6333
+ $[68] = t15;
6334
+ $[69] = t16;
6335
+ $[70] = t17;
6336
+ $[71] = t9;
6337
+ $[72] = t18;
6338
+ } else t18 = $[72];
6339
+ return t18;
6211
6340
  }
6212
6341
  //#endregion
6213
6342
  //#region src/components/FittingWheel/FittingWheel.module.css
@@ -6257,7 +6386,7 @@ function FittingWheel(t0) {
6257
6386
  } else t7 = $[5];
6258
6387
  let t8;
6259
6388
  if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
6260
- t8 = markedRacks.map(_temp$10);
6389
+ t8 = markedRacks.map(_temp$11);
6261
6390
  $[6] = t8;
6262
6391
  } else t8 = $[6];
6263
6392
  let t9;
@@ -6347,7 +6476,7 @@ function FittingWheel(t0) {
6347
6476
  } else t14 = $[30];
6348
6477
  return t14;
6349
6478
  }
6350
- function _temp$10(rack) {
6479
+ function _temp$11(rack) {
6351
6480
  return /* @__PURE__ */ jsx(WheelRackMarker, { rack }, rack);
6352
6481
  }
6353
6482
  function onEveShipFit() {
@@ -7266,7 +7395,7 @@ function Variations(t0) {
7266
7395
  const swapper = t6;
7267
7396
  let t7;
7268
7397
  if ($[13] !== anchor || $[14] !== sde || $[15] !== show || $[16] !== swapper || $[17] !== target.typeId || $[18] !== variations) {
7269
- const groups = Map.groupBy(variations, _temp$9);
7398
+ const groups = Map.groupBy(variations, _temp$10);
7270
7399
  t7 = /* @__PURE__ */ jsx("ul", {
7271
7400
  className: ItemInfo_module_default.list,
7272
7401
  children: [...groups].map((t8) => {
@@ -7299,7 +7428,7 @@ function Variations(t0) {
7299
7428
  } else t7 = $[19];
7300
7429
  return t7;
7301
7430
  }
7302
- function _temp$9(type_0) {
7431
+ function _temp$10(type_0) {
7303
7432
  return type_0.metaGroupId;
7304
7433
  }
7305
7434
  function Variation(t0) {
@@ -7391,7 +7520,8 @@ function Variation(t0) {
7391
7520
  }
7392
7521
  function slotName(slot) {
7393
7522
  const name = slotNames$1[slot.type] ?? slot.type;
7394
- return "index" in slot ? `${name} ${slot.index + 1}` : name;
7523
+ if (!("index" in slot)) return name;
7524
+ return `${name} ${slot.type === "implant" || slot.type === "booster" ? slot.index : slot.index + 1}`;
7395
7525
  }
7396
7526
  //#endregion
7397
7527
  //#region src/components/ShipStatistics/AttributeTooltip.tsx
@@ -7986,7 +8116,7 @@ function FighterTooltip(t0) {
7986
8116
  } else t7 = $[10];
7987
8117
  let t8;
7988
8118
  if ($[11] !== itemRef || $[12] !== quantity || $[13] !== type?.fighterAbilities) {
7989
- t8 = type?.fighterAbilities.filter(_temp$8).map((ability) => /* @__PURE__ */ jsx(AbilityLines, {
8119
+ t8 = type?.fighterAbilities.filter(_temp$9).map((ability) => /* @__PURE__ */ jsx(AbilityLines, {
7990
8120
  itemRef,
7991
8121
  ability,
7992
8122
  quantity
@@ -8044,7 +8174,7 @@ function FighterTooltip(t0) {
8044
8174
  } else t12 = $[26];
8045
8175
  return t12;
8046
8176
  }
8047
- function _temp$8(t0) {
8177
+ function _temp$9(t0) {
8048
8178
  const { slot } = t0;
8049
8179
  return slot !== 1;
8050
8180
  }
@@ -8468,7 +8598,7 @@ function BayContents(t0) {
8468
8598
  const maxActive = t1;
8469
8599
  let t2;
8470
8600
  if ($[2] !== contents || $[3] !== fighters || $[4] !== fit) {
8471
- const launched = fighters ? fit.items.flatMap(_temp$7) : [];
8601
+ const launched = fighters ? fit.items.flatMap(_temp$8) : [];
8472
8602
  t2 = [...contents.flatMap(_temp2$5), ...launched];
8473
8603
  $[2] = contents;
8474
8604
  $[3] = fighters;
@@ -8662,7 +8792,7 @@ function _temp2$5(t0) {
8662
8792
  const { refs } = t0;
8663
8793
  return refs;
8664
8794
  }
8665
- function _temp$7(item, ref) {
8795
+ function _temp$8(item, ref) {
8666
8796
  return item.slot.type === "fighter_tube" ? [ref] : [];
8667
8797
  }
8668
8798
  function DroneSelection(t0) {
@@ -9394,7 +9524,7 @@ function FitName() {
9394
9524
  defaultValue: fit.name,
9395
9525
  placeholder: ship?.name,
9396
9526
  ref: input,
9397
- onFocus: _temp$6,
9527
+ onFocus: _temp$7,
9398
9528
  onBlur: (event_0) => rename(event_0.currentTarget.value),
9399
9529
  onKeyDown: (event_1) => {
9400
9530
  if (event_1.key === "Escape") event_1.currentTarget.value = fit.name ?? "";
@@ -9423,7 +9553,7 @@ function FitName() {
9423
9553
  } else t5 = $[12];
9424
9554
  return t5;
9425
9555
  }
9426
- function _temp$6(event) {
9556
+ function _temp$7(event) {
9427
9557
  return event.currentTarget.select();
9428
9558
  }
9429
9559
  const violationKinds = [
@@ -11124,7 +11254,7 @@ function NameForm(t0) {
11124
11254
  t5 = /* @__PURE__ */ jsx("input", {
11125
11255
  id,
11126
11256
  value: name,
11127
- onFocus: _temp$5,
11257
+ onFocus: _temp$6,
11128
11258
  onChange: t4
11129
11259
  });
11130
11260
  $[10] = id;
@@ -11189,7 +11319,7 @@ function NameForm(t0) {
11189
11319
  } else t11 = $[26];
11190
11320
  return t11;
11191
11321
  }
11192
- function _temp$5(event_0) {
11322
+ function _temp$6(event_0) {
11193
11323
  return event_0.currentTarget.select();
11194
11324
  }
11195
11325
  function ImportForm(t0) {
@@ -11413,7 +11543,7 @@ function HullsAndFits() {
11413
11543
  const anySource = browserFits || personalFits;
11414
11544
  let t2;
11415
11545
  if ($[4] !== anySource || $[5] !== browserFits || $[6] !== fits || $[7] !== personal.fits || $[8] !== personalFits) {
11416
- const listed = [...!anySource || browserFits ? fits.map(_temp$4) : [], ...!anySource || personalFits ? personal.fits.map(_temp2$2) : []].toSorted(_temp3);
11546
+ const listed = [...!anySource || browserFits ? fits.map(_temp$5) : [], ...!anySource || personalFits ? personal.fits.map(_temp2$2) : []].toSorted(_temp3);
11417
11547
  t2 = Map.groupBy(listed, _temp4);
11418
11548
  $[4] = anySource;
11419
11549
  $[5] = browserFits;
@@ -11586,7 +11716,7 @@ function HullsAndFits() {
11586
11716
  if ($[47] !== personal.character || $[48] !== personalFits) {
11587
11717
  t17 = personalFits && personal.character?.canReadFits !== true && /* @__PURE__ */ jsx("p", {
11588
11718
  className: ItemBrowser_module_default.empty,
11589
- children: personal.character === void 0 ? "Pick a logged-in character" : "Log in again to see fittings"
11719
+ children: personal.character === void 0 ? "Log in or pick a character with the Character button" : "Log in again with the Character button to see fittings"
11590
11720
  });
11591
11721
  $[47] = personal.character;
11592
11722
  $[48] = personalFits;
@@ -11708,7 +11838,7 @@ function _temp2$2(fit_0) {
11708
11838
  kind: "fits-personal"
11709
11839
  };
11710
11840
  }
11711
- function _temp$4(fit) {
11841
+ function _temp$5(fit) {
11712
11842
  return {
11713
11843
  fit,
11714
11844
  kind: "fits-browser"
@@ -11891,7 +12021,7 @@ function Implants() {
11891
12021
  const placement = usePlacement();
11892
12022
  const missingSkills = useMissingSkills();
11893
12023
  const [search, setSearch] = useState("");
11894
- const [kinds, setKinds] = useState(_temp$3);
12024
+ const [kinds, setKinds] = useState(_temp$4);
11895
12025
  const [flyable, setFlyable] = useState(false);
11896
12026
  const [view, setView] = useState("market");
11897
12027
  const [collapses, setCollapses] = useState(0);
@@ -12139,7 +12269,7 @@ function Implants() {
12139
12269
  } else t19 = $[49];
12140
12270
  return t19;
12141
12271
  }
12142
- function _temp$3() {
12272
+ function _temp$4() {
12143
12273
  return /* @__PURE__ */ new Set();
12144
12274
  }
12145
12275
  function KindToggle(t0) {
@@ -12261,7 +12391,7 @@ function Modules() {
12261
12391
  const canFit = useCanFit();
12262
12392
  const missingSkills = useMissingSkills();
12263
12393
  const [search, setSearch] = useState("");
12264
- const [slots, setSlots] = useState(_temp$2);
12394
+ const [slots, setSlots] = useState(_temp$3);
12265
12395
  const [hullRestrictions, setHullRestrictions] = useState(false);
12266
12396
  const [flyable, setFlyable] = useState(false);
12267
12397
  const [collapses, setCollapses] = useState(0);
@@ -12464,7 +12594,7 @@ function Modules() {
12464
12594
  function _temp2$1(slot) {
12465
12595
  return slot.places;
12466
12596
  }
12467
- function _temp$2() {
12597
+ function _temp$3() {
12468
12598
  return /* @__PURE__ */ new Set();
12469
12599
  }
12470
12600
  //#endregion
@@ -12553,6 +12683,7 @@ function ItemBrowser(t0) {
12553
12683
  role: "tabpanel",
12554
12684
  "aria-labelledby": `${id}-${each_0.tab}-tab`,
12555
12685
  hidden: tab !== each_0.tab,
12686
+ onKeyDown: _temp$2,
12556
12687
  children: ready ? /* @__PURE__ */ jsx(Activity, {
12557
12688
  mode: tab === each_0.tab ? "visible" : "hidden",
12558
12689
  children: each_0.panel
@@ -12589,6 +12720,20 @@ function ItemBrowser(t0) {
12589
12720
  } else t9 = $[15];
12590
12721
  return t9;
12591
12722
  }
12723
+ function _temp$2(event) {
12724
+ if (event.defaultPrevented || event.nativeEvent.isComposing) return;
12725
+ if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
12726
+ const panel = event.currentTarget;
12727
+ const target = event.target;
12728
+ if (event.key === "ArrowDown" && target.matches("input[type=search]")) {
12729
+ if (focusTree(panel)) event.preventDefault();
12730
+ } else if (event.key === "ArrowUp" && isTreeRow(target)) {
12731
+ const search = panel.querySelector("input[type=search]");
12732
+ if (search === null) return;
12733
+ event.preventDefault();
12734
+ search.focus();
12735
+ }
12736
+ }
12592
12737
  //#endregion
12593
12738
  //#region src/components/ShipStatistics/ShipStatistics.module.css
12594
12739
  var ShipStatistics_module_default = {
package/dist/style.css CHANGED
@@ -1083,6 +1083,10 @@
1083
1083
  inset: 0;
1084
1084
  }
1085
1085
 
1086
+ .BVBbxW_slot:hover, .BVBbxW_slot:has(:focus-visible) {
1087
+ z-index: 1;
1088
+ }
1089
+
1086
1090
  .BVBbxW_slot:hover > .BVBbxW_actions, .BVBbxW_slot:has(:focus-visible) > .BVBbxW_actions {
1087
1091
  opacity: 1;
1088
1092
  }
@@ -1092,21 +1096,36 @@
1092
1096
  }
1093
1097
 
1094
1098
  .BVBbxW_action {
1095
- height: calc(12.97 * var(--wheel-unit));
1099
+ height: calc(var(--action-size) * var(--wheel-unit));
1096
1100
  left: calc(50% + var(--x) * var(--wheel-unit));
1097
- margin: calc(-6.49 * var(--wheel-unit));
1101
+ margin: calc(var(--action-size) / -2 * var(--wheel-unit));
1098
1102
  top: calc(50% + var(--y) * var(--wheel-unit));
1099
- width: calc(12.97 * var(--wheel-unit));
1103
+ width: calc(var(--action-size) * var(--wheel-unit));
1100
1104
  position: absolute;
1101
1105
  }
1102
1106
 
1103
1107
  .BVBbxW_bridge {
1104
- height: calc(8 * var(--wheel-unit));
1105
- left: calc(50% + var(--x) * var(--wheel-unit));
1106
- margin: calc(-4 * var(--wheel-unit));
1107
- top: calc(50% + var(--y) * var(--wheel-unit));
1108
- width: calc(8 * var(--wheel-unit));
1108
+ height: calc((var(--tray-start) + var(--tray-length) - var(--slot-size) / 2) * var(--wheel-unit));
1109
+ left: calc(50% - var(--slot-size) / 2 * var(--wheel-unit));
1110
+ transform: rotate(var(--angle)) translateY(calc(var(--slot-size) / 2 * var(--wheel-unit)));
1111
+ transform-origin: 50% 0;
1112
+ width: calc(var(--slot-size) * var(--wheel-unit));
1113
+ position: absolute;
1114
+ top: 50%;
1115
+ }
1116
+
1117
+ .BVBbxW_tray {
1118
+ border-radius: calc(var(--tray-width) / 2 * var(--wheel-unit));
1119
+ box-sizing: border-box;
1120
+ height: calc(var(--tray-length) * var(--wheel-unit));
1121
+ left: calc(50% - var(--tray-width) / 2 * var(--wheel-unit));
1122
+ transform: rotate(var(--angle)) translateY(calc(var(--tray-start) * var(--wheel-unit)));
1123
+ transform-origin: 50% 0;
1124
+ width: calc(var(--tray-width) * var(--wheel-unit));
1125
+ background: #0d1213f2;
1126
+ border: 1px solid #3d5960;
1109
1127
  position: absolute;
1128
+ top: 50%;
1110
1129
  }
1111
1130
  ._f5iUa_tooltip {
1112
1131
  gap: 8px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eveshipfit/ui-ingame",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "EVE Online ship fitting UI that looks like the in-game one",
5
5
  "license": "MIT",
6
6
  "author": "EVEShipFit Team <info@eveship.fit>",
@@ -27,7 +27,7 @@
27
27
  "access": "public"
28
28
  },
29
29
  "dependencies": {
30
- "@eveshipfit/react-hooks": "2.3.0"
30
+ "@eveshipfit/react-hooks": "2.3.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@babel/core": "^7.29.0",
@@ -43,7 +43,7 @@
43
43
  "storybook": "^10.6.0",
44
44
  "tsdown": "^0.23.0",
45
45
  "vite": "^8.3.0",
46
- "@eveshipfit/fitting": "2.3.0",
46
+ "@eveshipfit/fitting": "2.4.0",
47
47
  "@eveshipfit/sde-loader": "3.0.0"
48
48
  },
49
49
  "peerDependencies": {