@eveshipfit/ui-ingame 2.0.0 → 2.0.1
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.mjs +223 -217
- package/dist/style.css +6 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13719,8 +13719,9 @@ const kindLabels = {
|
|
|
13719
13719
|
booster: "Booster"
|
|
13720
13720
|
};
|
|
13721
13721
|
/** The Implants tab of the `ItemBrowser`: implants and boosters by market group or by slot. */
|
|
13722
|
-
function Implants() {
|
|
13722
|
+
function Implants(t0) {
|
|
13723
13723
|
const $ = c(61);
|
|
13724
|
+
const { handled } = t0;
|
|
13724
13725
|
const { actions, clear, overlays } = useTypeActions();
|
|
13725
13726
|
const placement = usePlacement();
|
|
13726
13727
|
const missingSkills = useMissingSkills();
|
|
@@ -13731,7 +13732,7 @@ function Implants() {
|
|
|
13731
13732
|
const [collapses, setCollapses] = useState(0);
|
|
13732
13733
|
const [opened, setOpened] = useState();
|
|
13733
13734
|
const { request } = useBrowse();
|
|
13734
|
-
const [browsed, setBrowsed] = useState(
|
|
13735
|
+
const [browsed, setBrowsed] = useState(handled);
|
|
13735
13736
|
if (request !== browsed) {
|
|
13736
13737
|
setBrowsed(request);
|
|
13737
13738
|
const target = request?.target;
|
|
@@ -13745,22 +13746,22 @@ function Implants() {
|
|
|
13745
13746
|
setCollapses(collapses + 1);
|
|
13746
13747
|
}
|
|
13747
13748
|
}
|
|
13748
|
-
let
|
|
13749
|
+
let t1;
|
|
13749
13750
|
if ($[0] !== search) {
|
|
13750
|
-
|
|
13751
|
+
t1 = search.trim().toLowerCase();
|
|
13751
13752
|
$[0] = search;
|
|
13752
|
-
$[1] =
|
|
13753
|
-
} else
|
|
13754
|
-
const query =
|
|
13755
|
-
let
|
|
13753
|
+
$[1] = t1;
|
|
13754
|
+
} else t1 = $[1];
|
|
13755
|
+
const query = t1;
|
|
13756
|
+
let t2;
|
|
13756
13757
|
bb0: {
|
|
13757
13758
|
if (query === "" && kinds.size === 0 && !flyable) {
|
|
13758
|
-
|
|
13759
|
+
t2 = void 0;
|
|
13759
13760
|
break bb0;
|
|
13760
13761
|
}
|
|
13761
|
-
let
|
|
13762
|
+
let t3;
|
|
13762
13763
|
if ($[2] !== flyable || $[3] !== kinds || $[4] !== missingSkills || $[5] !== placement || $[6] !== query) {
|
|
13763
|
-
|
|
13764
|
+
t3 = (type) => {
|
|
13764
13765
|
if (kinds.size > 0) {
|
|
13765
13766
|
const place = placement(type)?.type;
|
|
13766
13767
|
if (place !== "implant" && place !== "booster") return false;
|
|
@@ -13774,75 +13775,75 @@ function Implants() {
|
|
|
13774
13775
|
$[4] = missingSkills;
|
|
13775
13776
|
$[5] = placement;
|
|
13776
13777
|
$[6] = query;
|
|
13777
|
-
$[7] =
|
|
13778
|
-
} else
|
|
13779
|
-
|
|
13778
|
+
$[7] = t3;
|
|
13779
|
+
} else t3 = $[7];
|
|
13780
|
+
t2 = t3;
|
|
13780
13781
|
}
|
|
13781
|
-
const keep =
|
|
13782
|
+
const keep = t2;
|
|
13782
13783
|
const tree = useImplantTree(view === "slot" || query === "" ? keep : void 0);
|
|
13783
13784
|
const found = useImplantSearch(view === "market" && query !== "" ? keep : void 0);
|
|
13784
|
-
let
|
|
13785
|
+
let t3;
|
|
13785
13786
|
if ($[8] !== placement || $[9] !== tree || $[10] !== view) {
|
|
13786
|
-
|
|
13787
|
+
t3 = view === "slot" ? slotGroups(tree, placement) : [];
|
|
13787
13788
|
$[8] = placement;
|
|
13788
13789
|
$[9] = tree;
|
|
13789
13790
|
$[10] = view;
|
|
13790
|
-
$[11] =
|
|
13791
|
-
} else
|
|
13792
|
-
const slots =
|
|
13791
|
+
$[11] = t3;
|
|
13792
|
+
} else t3 = $[11];
|
|
13793
|
+
const slots = t3;
|
|
13793
13794
|
const empty = view === "slot" ? slots.length === 0 : query === "" ? tree.length === 0 : found.length === 0;
|
|
13794
13795
|
const treeRef = useRef(null);
|
|
13795
13796
|
const scrolledTo = useRef(opened);
|
|
13796
|
-
let t3;
|
|
13797
13797
|
let t4;
|
|
13798
|
+
let t5;
|
|
13798
13799
|
if ($[12] !== opened) {
|
|
13799
|
-
|
|
13800
|
+
t4 = () => {
|
|
13800
13801
|
if (scrolledTo.current === opened) return;
|
|
13801
13802
|
scrolledTo.current = opened;
|
|
13802
13803
|
treeRef.current?.querySelector("[aria-expanded=true]")?.scrollIntoView({ block: "start" });
|
|
13803
13804
|
};
|
|
13804
|
-
|
|
13805
|
+
t5 = [opened];
|
|
13805
13806
|
$[12] = opened;
|
|
13806
|
-
$[13] =
|
|
13807
|
-
$[14] =
|
|
13807
|
+
$[13] = t4;
|
|
13808
|
+
$[14] = t5;
|
|
13808
13809
|
} else {
|
|
13809
|
-
|
|
13810
|
-
|
|
13810
|
+
t4 = $[13];
|
|
13811
|
+
t5 = $[14];
|
|
13811
13812
|
}
|
|
13812
|
-
useEffect(
|
|
13813
|
-
let
|
|
13813
|
+
useEffect(t4, t5);
|
|
13814
|
+
let t6;
|
|
13814
13815
|
if ($[15] !== kinds) {
|
|
13815
|
-
|
|
13816
|
+
t6 = (kind, pressed) => {
|
|
13816
13817
|
const next = new Set(kinds);
|
|
13817
13818
|
if (pressed) next.add(kind);
|
|
13818
13819
|
else next.delete(kind);
|
|
13819
13820
|
setKinds(next);
|
|
13820
13821
|
};
|
|
13821
13822
|
$[15] = kinds;
|
|
13822
|
-
$[16] =
|
|
13823
|
-
} else
|
|
13824
|
-
const toggleKind =
|
|
13825
|
-
let
|
|
13823
|
+
$[16] = t6;
|
|
13824
|
+
} else t6 = $[16];
|
|
13825
|
+
const toggleKind = t6;
|
|
13826
|
+
let t7;
|
|
13826
13827
|
if ($[17] !== clear) {
|
|
13827
|
-
|
|
13828
|
+
t7 = (value) => {
|
|
13828
13829
|
clear();
|
|
13829
13830
|
setSearch(value);
|
|
13830
13831
|
};
|
|
13831
13832
|
$[17] = clear;
|
|
13832
|
-
$[18] =
|
|
13833
|
-
} else
|
|
13834
|
-
let
|
|
13833
|
+
$[18] = t7;
|
|
13834
|
+
} else t7 = $[18];
|
|
13835
|
+
let t8;
|
|
13835
13836
|
if ($[19] !== collapses) {
|
|
13836
|
-
|
|
13837
|
+
t8 = () => {
|
|
13837
13838
|
setOpened(void 0);
|
|
13838
13839
|
setCollapses(collapses + 1);
|
|
13839
13840
|
};
|
|
13840
13841
|
$[19] = collapses;
|
|
13841
|
-
$[20] =
|
|
13842
|
-
} else
|
|
13843
|
-
let
|
|
13842
|
+
$[20] = t8;
|
|
13843
|
+
} else t8 = $[20];
|
|
13844
|
+
let t9;
|
|
13844
13845
|
if ($[21] !== view) {
|
|
13845
|
-
|
|
13846
|
+
t9 = views.map((each) => /* @__PURE__ */ jsx(Tooltip, {
|
|
13846
13847
|
label: each.label,
|
|
13847
13848
|
children: /* @__PURE__ */ jsx("button", {
|
|
13848
13849
|
type: "button",
|
|
@@ -13857,96 +13858,96 @@ function Implants() {
|
|
|
13857
13858
|
})
|
|
13858
13859
|
}, each.view));
|
|
13859
13860
|
$[21] = view;
|
|
13860
|
-
$[22] =
|
|
13861
|
-
} else
|
|
13862
|
-
let
|
|
13863
|
-
if ($[23] !==
|
|
13864
|
-
|
|
13861
|
+
$[22] = t9;
|
|
13862
|
+
} else t9 = $[22];
|
|
13863
|
+
let t10;
|
|
13864
|
+
if ($[23] !== t9) {
|
|
13865
|
+
t10 = /* @__PURE__ */ jsx("fieldset", {
|
|
13865
13866
|
className: ItemBrowser_module_default.views,
|
|
13866
13867
|
"aria-label": "View",
|
|
13867
|
-
children:
|
|
13868
|
+
children: t9
|
|
13868
13869
|
});
|
|
13869
|
-
$[23] =
|
|
13870
|
-
$[24] =
|
|
13871
|
-
} else
|
|
13872
|
-
let
|
|
13873
|
-
if ($[25] !== search || $[26] !==
|
|
13874
|
-
|
|
13870
|
+
$[23] = t9;
|
|
13871
|
+
$[24] = t10;
|
|
13872
|
+
} else t10 = $[24];
|
|
13873
|
+
let t11;
|
|
13874
|
+
if ($[25] !== search || $[26] !== t10 || $[27] !== t7 || $[28] !== t8) {
|
|
13875
|
+
t11 = /* @__PURE__ */ jsx(Search, {
|
|
13875
13876
|
value: search,
|
|
13876
|
-
onChange:
|
|
13877
|
-
onCollapse:
|
|
13878
|
-
after:
|
|
13877
|
+
onChange: t7,
|
|
13878
|
+
onCollapse: t8,
|
|
13879
|
+
after: t10
|
|
13879
13880
|
});
|
|
13880
13881
|
$[25] = search;
|
|
13881
|
-
$[26] =
|
|
13882
|
+
$[26] = t10;
|
|
13882
13883
|
$[27] = t7;
|
|
13883
|
-
$[28] =
|
|
13884
|
-
$[29] =
|
|
13885
|
-
} else
|
|
13886
|
-
let
|
|
13884
|
+
$[28] = t8;
|
|
13885
|
+
$[29] = t11;
|
|
13886
|
+
} else t11 = $[29];
|
|
13887
|
+
let t12;
|
|
13887
13888
|
if ($[30] !== kinds) {
|
|
13888
|
-
|
|
13889
|
+
t12 = kinds.has("implant");
|
|
13889
13890
|
$[30] = kinds;
|
|
13890
|
-
$[31] =
|
|
13891
|
-
} else
|
|
13892
|
-
let
|
|
13893
|
-
if ($[32] !==
|
|
13894
|
-
|
|
13891
|
+
$[31] = t12;
|
|
13892
|
+
} else t12 = $[31];
|
|
13893
|
+
let t13;
|
|
13894
|
+
if ($[32] !== t12 || $[33] !== toggleKind) {
|
|
13895
|
+
t13 = /* @__PURE__ */ jsx(KindToggle, {
|
|
13895
13896
|
kind: "implant",
|
|
13896
|
-
pressed:
|
|
13897
|
+
pressed: t12,
|
|
13897
13898
|
onPressedChange: toggleKind
|
|
13898
13899
|
});
|
|
13899
|
-
$[32] =
|
|
13900
|
+
$[32] = t12;
|
|
13900
13901
|
$[33] = toggleKind;
|
|
13901
|
-
$[34] =
|
|
13902
|
-
} else
|
|
13903
|
-
let
|
|
13902
|
+
$[34] = t13;
|
|
13903
|
+
} else t13 = $[34];
|
|
13904
|
+
let t14;
|
|
13904
13905
|
if ($[35] !== kinds) {
|
|
13905
|
-
|
|
13906
|
+
t14 = kinds.has("booster");
|
|
13906
13907
|
$[35] = kinds;
|
|
13907
|
-
$[36] =
|
|
13908
|
-
} else
|
|
13909
|
-
let
|
|
13910
|
-
if ($[37] !==
|
|
13911
|
-
|
|
13908
|
+
$[36] = t14;
|
|
13909
|
+
} else t14 = $[36];
|
|
13910
|
+
let t15;
|
|
13911
|
+
if ($[37] !== t14 || $[38] !== toggleKind) {
|
|
13912
|
+
t15 = /* @__PURE__ */ jsx(KindToggle, {
|
|
13912
13913
|
kind: "booster",
|
|
13913
|
-
pressed:
|
|
13914
|
+
pressed: t14,
|
|
13914
13915
|
onPressedChange: toggleKind
|
|
13915
13916
|
});
|
|
13916
|
-
$[37] =
|
|
13917
|
+
$[37] = t14;
|
|
13917
13918
|
$[38] = toggleKind;
|
|
13918
|
-
$[39] =
|
|
13919
|
-
} else
|
|
13920
|
-
let
|
|
13919
|
+
$[39] = t15;
|
|
13920
|
+
} else t15 = $[39];
|
|
13921
|
+
let t16;
|
|
13921
13922
|
if ($[40] !== flyable) {
|
|
13922
|
-
|
|
13923
|
+
t16 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
13923
13924
|
icon: "skills",
|
|
13924
13925
|
label: "Skills",
|
|
13925
13926
|
pressed: flyable,
|
|
13926
13927
|
onPressedChange: setFlyable
|
|
13927
13928
|
});
|
|
13928
13929
|
$[40] = flyable;
|
|
13929
|
-
$[41] =
|
|
13930
|
-
} else
|
|
13931
|
-
let
|
|
13932
|
-
if ($[42] !==
|
|
13933
|
-
|
|
13930
|
+
$[41] = t16;
|
|
13931
|
+
} else t16 = $[41];
|
|
13932
|
+
let t17;
|
|
13933
|
+
if ($[42] !== t13 || $[43] !== t15 || $[44] !== t16) {
|
|
13934
|
+
t17 = /* @__PURE__ */ jsxs("fieldset", {
|
|
13934
13935
|
className: ItemBrowser_module_default.filters,
|
|
13935
13936
|
"aria-label": "Filters",
|
|
13936
13937
|
children: [
|
|
13937
|
-
|
|
13938
|
-
|
|
13939
|
-
|
|
13938
|
+
t13,
|
|
13939
|
+
t15,
|
|
13940
|
+
t16
|
|
13940
13941
|
]
|
|
13941
13942
|
});
|
|
13942
|
-
$[42] =
|
|
13943
|
-
$[43] =
|
|
13944
|
-
$[44] =
|
|
13945
|
-
$[45] =
|
|
13946
|
-
} else
|
|
13947
|
-
let
|
|
13943
|
+
$[42] = t13;
|
|
13944
|
+
$[43] = t15;
|
|
13945
|
+
$[44] = t16;
|
|
13946
|
+
$[45] = t17;
|
|
13947
|
+
} else t17 = $[45];
|
|
13948
|
+
let t18;
|
|
13948
13949
|
if ($[46] !== actions || $[47] !== collapses || $[48] !== empty || $[49] !== found || $[50] !== opened || $[51] !== query || $[52] !== slots || $[53] !== tree || $[54] !== view) {
|
|
13949
|
-
|
|
13950
|
+
t18 = /* @__PURE__ */ jsx("div", {
|
|
13950
13951
|
ref: treeRef,
|
|
13951
13952
|
className: ItemBrowser_module_default.tree,
|
|
13952
13953
|
children: empty ? /* @__PURE__ */ jsx("p", {
|
|
@@ -13977,23 +13978,23 @@ function Implants() {
|
|
|
13977
13978
|
$[52] = slots;
|
|
13978
13979
|
$[53] = tree;
|
|
13979
13980
|
$[54] = view;
|
|
13980
|
-
$[55] =
|
|
13981
|
-
} else
|
|
13982
|
-
let
|
|
13983
|
-
if ($[56] !== overlays || $[57] !==
|
|
13984
|
-
|
|
13985
|
-
|
|
13986
|
-
t16,
|
|
13981
|
+
$[55] = t18;
|
|
13982
|
+
} else t18 = $[55];
|
|
13983
|
+
let t19;
|
|
13984
|
+
if ($[56] !== overlays || $[57] !== t11 || $[58] !== t17 || $[59] !== t18) {
|
|
13985
|
+
t19 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
13986
|
+
t11,
|
|
13987
13987
|
t17,
|
|
13988
|
+
t18,
|
|
13988
13989
|
overlays
|
|
13989
13990
|
] });
|
|
13990
13991
|
$[56] = overlays;
|
|
13991
|
-
$[57] =
|
|
13992
|
-
$[58] =
|
|
13993
|
-
$[59] =
|
|
13994
|
-
$[60] =
|
|
13995
|
-
} else
|
|
13996
|
-
return
|
|
13992
|
+
$[57] = t11;
|
|
13993
|
+
$[58] = t17;
|
|
13994
|
+
$[59] = t18;
|
|
13995
|
+
$[60] = t19;
|
|
13996
|
+
} else t19 = $[60];
|
|
13997
|
+
return t19;
|
|
13997
13998
|
}
|
|
13998
13999
|
function _temp$3() {
|
|
13999
14000
|
return /* @__PURE__ */ new Set();
|
|
@@ -14128,8 +14129,9 @@ const slotFilters = [
|
|
|
14128
14129
|
}
|
|
14129
14130
|
];
|
|
14130
14131
|
/** The Modules tab of the `ItemBrowser`: what goes on a ship, by market group. */
|
|
14131
|
-
function Modules() {
|
|
14132
|
+
function Modules(t0) {
|
|
14132
14133
|
const $ = c(52);
|
|
14134
|
+
const { handled } = t0;
|
|
14133
14135
|
const { actions, clear, overlays } = useTypeActions();
|
|
14134
14136
|
const placement = usePlacement();
|
|
14135
14137
|
const canFit = useCanFit();
|
|
@@ -14137,28 +14139,28 @@ function Modules() {
|
|
|
14137
14139
|
const snapshot = useSnapshotIfAny();
|
|
14138
14140
|
const noHullSelected = snapshot === void 0;
|
|
14139
14141
|
const services = (snapshot?.stats.slots.service.total ?? 0) > 0;
|
|
14140
|
-
let
|
|
14142
|
+
let t1;
|
|
14141
14143
|
if ($[0] !== services) {
|
|
14142
|
-
|
|
14143
|
-
const { filter } =
|
|
14144
|
+
t1 = (t2) => {
|
|
14145
|
+
const { filter } = t2;
|
|
14144
14146
|
return services || filter !== "service";
|
|
14145
14147
|
};
|
|
14146
14148
|
$[0] = services;
|
|
14147
|
-
$[1] =
|
|
14148
|
-
} else
|
|
14149
|
-
const shownFilters = slotFilters.filter(
|
|
14149
|
+
$[1] = t1;
|
|
14150
|
+
} else t1 = $[1];
|
|
14151
|
+
const shownFilters = slotFilters.filter(t1);
|
|
14150
14152
|
const [search, setSearch] = useState("");
|
|
14151
14153
|
const [slots, setSlots] = useState(_temp$2);
|
|
14152
14154
|
const [hullRestrictions, setHullRestrictions] = useState(false);
|
|
14153
14155
|
const [flyable, setFlyable] = useState(false);
|
|
14154
14156
|
const [collapses, setCollapses] = useState(0);
|
|
14155
14157
|
const { request } = useBrowse();
|
|
14156
|
-
const [browsed, setBrowsed] = useState(
|
|
14158
|
+
const [browsed, setBrowsed] = useState(handled);
|
|
14157
14159
|
if (request !== browsed) {
|
|
14158
14160
|
setBrowsed(request);
|
|
14159
14161
|
const target = request?.target;
|
|
14160
|
-
const filter_0 = typeof target === "string" ? slotFilters.find((
|
|
14161
|
-
const { places } =
|
|
14162
|
+
const filter_0 = typeof target === "string" ? slotFilters.find((t2) => {
|
|
14163
|
+
const { places } = t2;
|
|
14162
14164
|
return places.includes(target);
|
|
14163
14165
|
})?.filter : void 0;
|
|
14164
14166
|
if (filter_0 !== void 0) {
|
|
@@ -14166,33 +14168,33 @@ function Modules() {
|
|
|
14166
14168
|
setHullRestrictions(true);
|
|
14167
14169
|
}
|
|
14168
14170
|
}
|
|
14169
|
-
let
|
|
14171
|
+
let t2;
|
|
14170
14172
|
if ($[2] !== search) {
|
|
14171
|
-
|
|
14173
|
+
t2 = search.trim().toLowerCase();
|
|
14172
14174
|
$[2] = search;
|
|
14173
|
-
$[3] =
|
|
14174
|
-
} else
|
|
14175
|
-
const query =
|
|
14176
|
-
let
|
|
14175
|
+
$[3] = t2;
|
|
14176
|
+
} else t2 = $[3];
|
|
14177
|
+
const query = t2;
|
|
14178
|
+
let t3;
|
|
14177
14179
|
bb0: {
|
|
14178
|
-
let
|
|
14180
|
+
let t4;
|
|
14179
14181
|
if ($[4] !== services || $[5] !== slots) {
|
|
14180
|
-
|
|
14181
|
-
const { filter: filter_1 } =
|
|
14182
|
+
t4 = new Set(slotFilters.filter((t5) => {
|
|
14183
|
+
const { filter: filter_1 } = t5;
|
|
14182
14184
|
return slots.has(filter_1) && (services || filter_1 !== "service");
|
|
14183
14185
|
}).flatMap(_temp2$1));
|
|
14184
14186
|
$[4] = services;
|
|
14185
14187
|
$[5] = slots;
|
|
14186
|
-
$[6] =
|
|
14187
|
-
} else
|
|
14188
|
-
const places_0 =
|
|
14188
|
+
$[6] = t4;
|
|
14189
|
+
} else t4 = $[6];
|
|
14190
|
+
const places_0 = t4;
|
|
14189
14191
|
if (query === "" && places_0.size === 0 && !hullRestrictions && !flyable) {
|
|
14190
|
-
|
|
14192
|
+
t3 = void 0;
|
|
14191
14193
|
break bb0;
|
|
14192
14194
|
}
|
|
14193
|
-
let
|
|
14195
|
+
let t5;
|
|
14194
14196
|
if ($[7] !== canFit || $[8] !== flyable || $[9] !== hullRestrictions || $[10] !== missingSkills || $[11] !== noHullSelected || $[12] !== placement || $[13] !== places_0 || $[14] !== query) {
|
|
14195
|
-
|
|
14197
|
+
t5 = (type) => {
|
|
14196
14198
|
if (places_0.size > 0) {
|
|
14197
14199
|
const place = placement(type)?.type;
|
|
14198
14200
|
if (place === void 0 || !places_0.has(place)) return false;
|
|
@@ -14209,59 +14211,59 @@ function Modules() {
|
|
|
14209
14211
|
$[12] = placement;
|
|
14210
14212
|
$[13] = places_0;
|
|
14211
14213
|
$[14] = query;
|
|
14212
|
-
$[15] =
|
|
14213
|
-
} else
|
|
14214
|
-
|
|
14214
|
+
$[15] = t5;
|
|
14215
|
+
} else t5 = $[15];
|
|
14216
|
+
t3 = t5;
|
|
14215
14217
|
}
|
|
14216
|
-
const keep =
|
|
14218
|
+
const keep = t3;
|
|
14217
14219
|
const tree = useModuleTree(query === "" ? keep : void 0);
|
|
14218
14220
|
const found = useModuleSearch(query === "" ? void 0 : keep);
|
|
14219
14221
|
const groups = query === "" ? tree : found;
|
|
14220
|
-
let
|
|
14222
|
+
let t4;
|
|
14221
14223
|
if ($[16] !== slots) {
|
|
14222
|
-
|
|
14224
|
+
t4 = (filter_2, pressed) => {
|
|
14223
14225
|
const next = new Set(slots);
|
|
14224
14226
|
if (pressed) next.add(filter_2);
|
|
14225
14227
|
else next.delete(filter_2);
|
|
14226
14228
|
setSlots(next);
|
|
14227
14229
|
};
|
|
14228
14230
|
$[16] = slots;
|
|
14229
|
-
$[17] =
|
|
14230
|
-
} else
|
|
14231
|
-
const toggleSlot =
|
|
14232
|
-
let
|
|
14231
|
+
$[17] = t4;
|
|
14232
|
+
} else t4 = $[17];
|
|
14233
|
+
const toggleSlot = t4;
|
|
14234
|
+
let t5;
|
|
14233
14235
|
if ($[18] !== clear) {
|
|
14234
|
-
|
|
14236
|
+
t5 = (value) => {
|
|
14235
14237
|
clear();
|
|
14236
14238
|
setSearch(value);
|
|
14237
14239
|
};
|
|
14238
14240
|
$[18] = clear;
|
|
14239
|
-
$[19] =
|
|
14240
|
-
} else
|
|
14241
|
-
let
|
|
14241
|
+
$[19] = t5;
|
|
14242
|
+
} else t5 = $[19];
|
|
14243
|
+
let t6;
|
|
14242
14244
|
if ($[20] !== collapses) {
|
|
14243
|
-
|
|
14245
|
+
t6 = () => setCollapses(collapses + 1);
|
|
14244
14246
|
$[20] = collapses;
|
|
14245
|
-
$[21] =
|
|
14246
|
-
} else
|
|
14247
|
-
let
|
|
14248
|
-
if ($[22] !== search || $[23] !==
|
|
14249
|
-
|
|
14247
|
+
$[21] = t6;
|
|
14248
|
+
} else t6 = $[21];
|
|
14249
|
+
let t7;
|
|
14250
|
+
if ($[22] !== search || $[23] !== t5 || $[24] !== t6) {
|
|
14251
|
+
t7 = /* @__PURE__ */ jsx(Search, {
|
|
14250
14252
|
value: search,
|
|
14251
|
-
onChange:
|
|
14252
|
-
onCollapse:
|
|
14253
|
+
onChange: t5,
|
|
14254
|
+
onCollapse: t6
|
|
14253
14255
|
});
|
|
14254
14256
|
$[22] = search;
|
|
14255
|
-
$[23] =
|
|
14256
|
-
$[24] =
|
|
14257
|
-
$[25] =
|
|
14258
|
-
} else
|
|
14259
|
-
const
|
|
14260
|
-
const
|
|
14261
|
-
let
|
|
14257
|
+
$[23] = t5;
|
|
14258
|
+
$[24] = t6;
|
|
14259
|
+
$[25] = t7;
|
|
14260
|
+
} else t7 = $[25];
|
|
14261
|
+
const t8 = ItemBrowser_module_default;
|
|
14262
|
+
const t9 = "Filters";
|
|
14263
|
+
let t10;
|
|
14262
14264
|
if ($[26] !== slots || $[27] !== toggleSlot) {
|
|
14263
|
-
|
|
14264
|
-
const { filter: filter_3, icon, label } =
|
|
14265
|
+
t10 = (t11) => {
|
|
14266
|
+
const { filter: filter_3, icon, label } = t11;
|
|
14265
14267
|
return /* @__PURE__ */ jsx(FilterToggle, {
|
|
14266
14268
|
icon,
|
|
14267
14269
|
label,
|
|
@@ -14271,12 +14273,12 @@ function Modules() {
|
|
|
14271
14273
|
};
|
|
14272
14274
|
$[26] = slots;
|
|
14273
14275
|
$[27] = toggleSlot;
|
|
14274
|
-
$[28] =
|
|
14275
|
-
} else
|
|
14276
|
-
const
|
|
14277
|
-
let
|
|
14276
|
+
$[28] = t10;
|
|
14277
|
+
} else t10 = $[28];
|
|
14278
|
+
const t11 = shownFilters.map(t10);
|
|
14279
|
+
let t12;
|
|
14278
14280
|
if ($[29] !== hullRestrictions || $[30] !== noHullSelected || $[31] !== setHullRestrictions) {
|
|
14279
|
-
|
|
14281
|
+
t12 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
14280
14282
|
icon: "filter-hull-restrictions",
|
|
14281
14283
|
label: "Hull Restrictions",
|
|
14282
14284
|
pressed: hullRestrictions,
|
|
@@ -14286,19 +14288,19 @@ function Modules() {
|
|
|
14286
14288
|
$[29] = hullRestrictions;
|
|
14287
14289
|
$[30] = noHullSelected;
|
|
14288
14290
|
$[31] = setHullRestrictions;
|
|
14289
|
-
$[32] =
|
|
14290
|
-
} else
|
|
14291
|
-
let
|
|
14291
|
+
$[32] = t12;
|
|
14292
|
+
} else t12 = $[32];
|
|
14293
|
+
let t13;
|
|
14292
14294
|
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
14293
|
-
|
|
14295
|
+
t13 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
14294
14296
|
icon: "filter-resources",
|
|
14295
14297
|
label: "Resources"
|
|
14296
14298
|
});
|
|
14297
|
-
$[33] =
|
|
14298
|
-
} else
|
|
14299
|
-
let
|
|
14299
|
+
$[33] = t13;
|
|
14300
|
+
} else t13 = $[33];
|
|
14301
|
+
let t14;
|
|
14300
14302
|
if ($[34] !== flyable || $[35] !== setFlyable) {
|
|
14301
|
-
|
|
14303
|
+
t14 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
14302
14304
|
icon: "skills",
|
|
14303
14305
|
label: "Skills",
|
|
14304
14306
|
pressed: flyable,
|
|
@@ -14306,29 +14308,29 @@ function Modules() {
|
|
|
14306
14308
|
});
|
|
14307
14309
|
$[34] = flyable;
|
|
14308
14310
|
$[35] = setFlyable;
|
|
14309
|
-
$[36] =
|
|
14310
|
-
} else
|
|
14311
|
-
let
|
|
14312
|
-
if ($[37] !==
|
|
14313
|
-
|
|
14314
|
-
className:
|
|
14315
|
-
"aria-label":
|
|
14311
|
+
$[36] = t14;
|
|
14312
|
+
} else t14 = $[36];
|
|
14313
|
+
let t15;
|
|
14314
|
+
if ($[37] !== t11 || $[38] !== t12 || $[39] !== t14 || $[40] !== t8.filters) {
|
|
14315
|
+
t15 = /* @__PURE__ */ jsxs("fieldset", {
|
|
14316
|
+
className: t8.filters,
|
|
14317
|
+
"aria-label": t9,
|
|
14316
14318
|
children: [
|
|
14317
|
-
t10,
|
|
14318
14319
|
t11,
|
|
14319
14320
|
t12,
|
|
14320
|
-
t13
|
|
14321
|
+
t13,
|
|
14322
|
+
t14
|
|
14321
14323
|
]
|
|
14322
14324
|
});
|
|
14323
|
-
$[37] =
|
|
14324
|
-
$[38] =
|
|
14325
|
-
$[39] =
|
|
14326
|
-
$[40] =
|
|
14327
|
-
$[41] =
|
|
14328
|
-
} else
|
|
14329
|
-
let
|
|
14325
|
+
$[37] = t11;
|
|
14326
|
+
$[38] = t12;
|
|
14327
|
+
$[39] = t14;
|
|
14328
|
+
$[40] = t8.filters;
|
|
14329
|
+
$[41] = t15;
|
|
14330
|
+
} else t15 = $[41];
|
|
14331
|
+
let t16;
|
|
14330
14332
|
if ($[42] !== actions || $[43] !== collapses || $[44] !== groups || $[45] !== query) {
|
|
14331
|
-
|
|
14333
|
+
t16 = /* @__PURE__ */ jsx("div", {
|
|
14332
14334
|
className: ItemBrowser_module_default.tree,
|
|
14333
14335
|
children: groups.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
14334
14336
|
className: ItemBrowser_module_default.empty,
|
|
@@ -14348,23 +14350,23 @@ function Modules() {
|
|
|
14348
14350
|
$[43] = collapses;
|
|
14349
14351
|
$[44] = groups;
|
|
14350
14352
|
$[45] = query;
|
|
14351
|
-
$[46] =
|
|
14352
|
-
} else
|
|
14353
|
-
let
|
|
14354
|
-
if ($[47] !== overlays || $[48] !==
|
|
14355
|
-
|
|
14356
|
-
|
|
14357
|
-
t14,
|
|
14353
|
+
$[46] = t16;
|
|
14354
|
+
} else t16 = $[46];
|
|
14355
|
+
let t17;
|
|
14356
|
+
if ($[47] !== overlays || $[48] !== t15 || $[49] !== t16 || $[50] !== t7) {
|
|
14357
|
+
t17 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
14358
|
+
t7,
|
|
14358
14359
|
t15,
|
|
14360
|
+
t16,
|
|
14359
14361
|
overlays
|
|
14360
14362
|
] });
|
|
14361
14363
|
$[47] = overlays;
|
|
14362
|
-
$[48] =
|
|
14363
|
-
$[49] =
|
|
14364
|
-
$[50] =
|
|
14365
|
-
$[51] =
|
|
14366
|
-
} else
|
|
14367
|
-
return
|
|
14364
|
+
$[48] = t15;
|
|
14365
|
+
$[49] = t16;
|
|
14366
|
+
$[50] = t7;
|
|
14367
|
+
$[51] = t17;
|
|
14368
|
+
} else t17 = $[51];
|
|
14369
|
+
return t17;
|
|
14368
14370
|
}
|
|
14369
14371
|
function _temp2$1(slot) {
|
|
14370
14372
|
return slot.places;
|
|
@@ -14373,17 +14375,21 @@ function _temp$2() {
|
|
|
14373
14375
|
return /* @__PURE__ */ new Set();
|
|
14374
14376
|
}
|
|
14375
14377
|
// src/components/ItemBrowser/ItemBrowser.tsx
|
|
14378
|
+
const NO_TABS = /* @__PURE__ */ new Set();
|
|
14376
14379
|
/** EVE's browser of hulls and fits, modules, charges, and implants, left of the fitting wheel. */
|
|
14377
14380
|
function ItemBrowser({ label = "Item Browser", pasteToOpen = false }) {
|
|
14378
14381
|
const [tab, setTab] = useState("hulls");
|
|
14382
|
+
const [opened, setOpened] = useState(() => /* @__PURE__ */ new Set([tab]));
|
|
14383
|
+
if (!opened.has(tab)) setOpened(/* @__PURE__ */ new Set([...opened, tab]));
|
|
14384
|
+
const rendered = useDeferredValue(opened, NO_TABS);
|
|
14379
14385
|
const { request } = useBrowse();
|
|
14380
14386
|
const [browsed, setBrowsed] = useState(request);
|
|
14387
|
+
const [handled] = useState(request);
|
|
14381
14388
|
if (request !== browsed) {
|
|
14382
14389
|
setBrowsed(request);
|
|
14383
14390
|
if (request !== void 0) setTab(typeof request.target === "string" ? "modules" : "implants");
|
|
14384
14391
|
}
|
|
14385
14392
|
const id = useId();
|
|
14386
|
-
const ready = useDeferredValue(true, false);
|
|
14387
14393
|
const tabs = [
|
|
14388
14394
|
{
|
|
14389
14395
|
tab: "hulls",
|
|
@@ -14393,7 +14399,7 @@ function ItemBrowser({ label = "Item Browser", pasteToOpen = false }) {
|
|
|
14393
14399
|
{
|
|
14394
14400
|
tab: "modules",
|
|
14395
14401
|
label: "Modules",
|
|
14396
|
-
panel: /* @__PURE__ */ jsx(Modules, {})
|
|
14402
|
+
panel: /* @__PURE__ */ jsx(Modules, { handled })
|
|
14397
14403
|
},
|
|
14398
14404
|
{
|
|
14399
14405
|
tab: "charges",
|
|
@@ -14403,7 +14409,7 @@ function ItemBrowser({ label = "Item Browser", pasteToOpen = false }) {
|
|
|
14403
14409
|
{
|
|
14404
14410
|
tab: "implants",
|
|
14405
14411
|
label: "Implants",
|
|
14406
|
-
panel: /* @__PURE__ */ jsx(Implants, {})
|
|
14412
|
+
panel: /* @__PURE__ */ jsx(Implants, { handled })
|
|
14407
14413
|
}
|
|
14408
14414
|
];
|
|
14409
14415
|
return /* @__PURE__ */ jsxs("section", {
|
|
@@ -14444,7 +14450,7 @@ function ItemBrowser({ label = "Item Browser", pasteToOpen = false }) {
|
|
|
14444
14450
|
search.focus();
|
|
14445
14451
|
}
|
|
14446
14452
|
},
|
|
14447
|
-
children:
|
|
14453
|
+
children: rendered.has(each_0.tab) ? /* @__PURE__ */ jsx(Activity, {
|
|
14448
14454
|
mode: tab === each_0.tab ? "visible" : "hidden",
|
|
14449
14455
|
children: each_0.panel
|
|
14450
14456
|
}) : /* @__PURE__ */ jsx("p", {
|
package/dist/style.css
CHANGED