@eveshipfit/ui-ingame 1.11.2 → 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 CHANGED
@@ -8204,10 +8204,7 @@ function FittingWindow({ label = "Fitting Window", browser, statistics: givenSta
8204
8204
  credit: preview
8205
8205
  }) : /* @__PURE__ */ jsx(Wheel, {
8206
8206
  label: "Fitting",
8207
- children: /* @__PURE__ */ jsx("p", {
8208
- className: FittingWindow_module_default.placeholder,
8209
- children: placeholder
8210
- })
8207
+ children: /* @__PURE__ */ jsx(Placeholder, { text: placeholder })
8211
8208
  })
8212
8209
  }),
8213
8210
  preview && placeholder === void 0 && /* @__PURE__ */ jsx(PreviewName, {}),
@@ -8302,6 +8299,58 @@ function FittingWindow({ label = "Fitting Window", browser, statistics: givenSta
8302
8299
  })
8303
8300
  });
8304
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
+ }
8305
8354
  function popover(id) {
8306
8355
  const element = document.getElementById(id);
8307
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.11.2",
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>",