@eveshipfit/ui-ingame 1.11.1 → 1.12.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.mjs +67 -4
- package/dist/style.css +6 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -8020,6 +8020,10 @@ const byRule = {
|
|
|
8020
8020
|
skill: "skill",
|
|
8021
8021
|
slots: "error",
|
|
8022
8022
|
wrong_slot: "error",
|
|
8023
|
+
not_a_module: "error",
|
|
8024
|
+
not_a_drone: "error",
|
|
8025
|
+
not_a_fighter: "error",
|
|
8026
|
+
not_an_implant: "error",
|
|
8023
8027
|
slot_taken: "error",
|
|
8024
8028
|
wrong_slot_index: "error",
|
|
8025
8029
|
subsystem_taken: "error",
|
|
@@ -8030,6 +8034,9 @@ const byRule = {
|
|
|
8030
8034
|
ship_item: "error",
|
|
8031
8035
|
max_group: "error",
|
|
8032
8036
|
max_type: "error",
|
|
8037
|
+
not_a_hull: "error",
|
|
8038
|
+
not_a_mode: "error",
|
|
8039
|
+
not_a_skill: "error",
|
|
8033
8040
|
charge_group: "error",
|
|
8034
8041
|
charge_size: "error"
|
|
8035
8042
|
};
|
|
@@ -8116,6 +8123,10 @@ function violationText({ target, rule }, fit, names) {
|
|
|
8116
8123
|
case "slots": return `Too many ${rackItems[rule.slot]}`;
|
|
8117
8124
|
case "skill": return `${names.type(rule.type_id)} ${romanLevels[rule.required - 1]}`;
|
|
8118
8125
|
case "wrong_slot": return `${subject}: goes in ${slotNames[rule.expected]}`;
|
|
8126
|
+
case "not_a_module": return `${subject}: not a module`;
|
|
8127
|
+
case "not_a_drone": return `${subject}: not a drone`;
|
|
8128
|
+
case "not_an_implant": return `${subject}: not an implant`;
|
|
8129
|
+
case "not_a_fighter": return `${subject}: not a fighter`;
|
|
8119
8130
|
case "slot_taken": return `${subject}: slot already taken`;
|
|
8120
8131
|
case "wrong_slot_index": return `${subject}: goes in ${item?.slot.type} slot ${rule.expected}`;
|
|
8121
8132
|
case "subsystem_taken": return `${subject}: another subsystem covers the same part of the ship`;
|
|
@@ -8126,6 +8137,9 @@ function violationText({ target, rule }, fit, names) {
|
|
|
8126
8137
|
case "ship_item": return `${subject}: does not fit on a structure`;
|
|
8127
8138
|
case "max_group": return `${subject}: only ${rule.allowed} ${names.group(rule.group_id)} can be ${rule.limit}`;
|
|
8128
8139
|
case "max_type": return `${subject}: only ${rule.allowed} can be fitted`;
|
|
8140
|
+
case "not_a_hull": return `${names.type(fit.ship.type_id)}: not a ship, structure or container`;
|
|
8141
|
+
case "not_a_mode": return `${fit.ship.mode === void 0 ? "" : names.type(fit.ship.mode)}: not a mode of this ship`;
|
|
8142
|
+
case "not_a_skill": return `${names.type(rule.type_id)}: not a skill`;
|
|
8129
8143
|
case "charge_group": return `${charge}: cannot be loaded in ${module}`;
|
|
8130
8144
|
case "charge_size": return `${charge}: wrong size for ${module}`;
|
|
8131
8145
|
}
|
|
@@ -8190,10 +8204,7 @@ function FittingWindow({ label = "Fitting Window", browser, statistics: givenSta
|
|
|
8190
8204
|
credit: preview
|
|
8191
8205
|
}) : /* @__PURE__ */ jsx(Wheel, {
|
|
8192
8206
|
label: "Fitting",
|
|
8193
|
-
children: /* @__PURE__ */ jsx(
|
|
8194
|
-
className: FittingWindow_module_default.placeholder,
|
|
8195
|
-
children: placeholder
|
|
8196
|
-
})
|
|
8207
|
+
children: /* @__PURE__ */ jsx(Placeholder, { text: placeholder })
|
|
8197
8208
|
})
|
|
8198
8209
|
}),
|
|
8199
8210
|
preview && placeholder === void 0 && /* @__PURE__ */ jsx(PreviewName, {}),
|
|
@@ -8288,6 +8299,58 @@ function FittingWindow({ label = "Fitting Window", browser, statistics: givenSta
|
|
|
8288
8299
|
})
|
|
8289
8300
|
});
|
|
8290
8301
|
}
|
|
8302
|
+
/** Picks a hull dropped on the empty wheel. */
|
|
8303
|
+
function Placeholder(t0) {
|
|
8304
|
+
const $ = c(12);
|
|
8305
|
+
const { text } = t0;
|
|
8306
|
+
const store = useFitStore();
|
|
8307
|
+
const { dragging, end } = useDrag();
|
|
8308
|
+
const hull = dragging?.type === "hull" ? dragging.typeId : void 0;
|
|
8309
|
+
let t1;
|
|
8310
|
+
if ($[0] !== dragging) {
|
|
8311
|
+
t1 = (event) => {
|
|
8312
|
+
if (dragging?.type === "hull") allowDrop(event, dragging);
|
|
8313
|
+
};
|
|
8314
|
+
$[0] = dragging;
|
|
8315
|
+
$[1] = t1;
|
|
8316
|
+
} else t1 = $[1];
|
|
8317
|
+
let t2;
|
|
8318
|
+
if ($[2] !== end || $[3] !== hull || $[4] !== store) {
|
|
8319
|
+
t2 = (event_0) => {
|
|
8320
|
+
if (hull === void 0) return;
|
|
8321
|
+
event_0.preventDefault();
|
|
8322
|
+
store.replace({
|
|
8323
|
+
ship: { type_id: hull },
|
|
8324
|
+
items: []
|
|
8325
|
+
});
|
|
8326
|
+
end();
|
|
8327
|
+
};
|
|
8328
|
+
$[2] = end;
|
|
8329
|
+
$[3] = hull;
|
|
8330
|
+
$[4] = store;
|
|
8331
|
+
$[5] = t2;
|
|
8332
|
+
} else t2 = $[5];
|
|
8333
|
+
let t3;
|
|
8334
|
+
if ($[6] !== text) {
|
|
8335
|
+
t3 = /* @__PURE__ */ jsx("p", { children: text });
|
|
8336
|
+
$[6] = text;
|
|
8337
|
+
$[7] = t3;
|
|
8338
|
+
} else t3 = $[7];
|
|
8339
|
+
let t4;
|
|
8340
|
+
if ($[8] !== t1 || $[9] !== t2 || $[10] !== t3) {
|
|
8341
|
+
t4 = /* @__PURE__ */ jsx("div", {
|
|
8342
|
+
className: FittingWindow_module_default.placeholder,
|
|
8343
|
+
onDragOver: t1,
|
|
8344
|
+
onDrop: t2,
|
|
8345
|
+
children: t3
|
|
8346
|
+
});
|
|
8347
|
+
$[8] = t1;
|
|
8348
|
+
$[9] = t2;
|
|
8349
|
+
$[10] = t3;
|
|
8350
|
+
$[11] = t4;
|
|
8351
|
+
} else t4 = $[11];
|
|
8352
|
+
return t4;
|
|
8353
|
+
}
|
|
8291
8354
|
function popover(id) {
|
|
8292
8355
|
const element = document.getElementById(id);
|
|
8293
8356
|
return element?.matches(":popover-open") ? null : element;
|
package/dist/style.css
CHANGED
|
@@ -2204,12 +2204,17 @@
|
|
|
2204
2204
|
color: var(--esf-text-muted);
|
|
2205
2205
|
justify-content: center;
|
|
2206
2206
|
align-items: center;
|
|
2207
|
-
margin: 0;
|
|
2208
2207
|
display: flex;
|
|
2209
2208
|
position: absolute;
|
|
2210
2209
|
inset: 0;
|
|
2211
2210
|
}
|
|
2212
2211
|
|
|
2212
|
+
.L9t91q_placeholder > p {
|
|
2213
|
+
text-align: center;
|
|
2214
|
+
white-space: pre-line;
|
|
2215
|
+
margin: 0;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2213
2218
|
.L9t91q_name, .L9t91q_violations, .L9t91q_tools, .L9t91q_panels, .L9t91q_bays, .L9t91q_history, .L9t91q_services, .L9t91q_resources {
|
|
2214
2219
|
position: absolute;
|
|
2215
2220
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eveshipfit/ui-ingame",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.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,8 +27,8 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@eveshipfit/fitting": "2.5.
|
|
31
|
-
"@eveshipfit/react-hooks": "2.5.
|
|
30
|
+
"@eveshipfit/fitting": "2.5.1",
|
|
31
|
+
"@eveshipfit/react-hooks": "2.5.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/core": "^8.0.9",
|