@eveshipfit/ui-ingame 1.10.0 → 1.11.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.d.mts +21 -72
- package/dist/index.mjs +3272 -4481
- package/dist/style.css +147 -5
- package/dist/theme.css +3 -1
- package/package.json +13 -13
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DragEvent, DragEventHandler, HTMLAttributes, MouseEventHandler, ReactNode } from "react";
|
|
2
|
-
|
|
1
|
+
import { DragEvent, DragEventHandler, HTMLAttributes, MouseEvent, MouseEventHandler, ReactNode } from "react";
|
|
2
|
+
import { FitPriceItem } from "@eveshipfit/fitting";
|
|
3
3
|
interface DialogProps {
|
|
4
4
|
open: boolean;
|
|
5
5
|
title: string;
|
|
@@ -8,8 +8,6 @@ interface DialogProps {
|
|
|
8
8
|
}
|
|
9
9
|
/** A modal that opens on its first field; `onClose` is called when the user closes it, by Escape or the close button. */
|
|
10
10
|
export declare function Dialog({ open, title, onClose, children }: DialogProps): import("react").JSX.Element;
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/primitives/TreeList/TreeList.d.ts
|
|
13
11
|
interface TreeListProps {
|
|
14
12
|
label: string;
|
|
15
13
|
children: ReactNode;
|
|
@@ -24,15 +22,18 @@ interface TreeGroupProps {
|
|
|
24
22
|
icon?: string;
|
|
25
23
|
/** A second line under the label. */
|
|
26
24
|
description?: ReactNode;
|
|
25
|
+
/** Shown when hovering the type's icon. */
|
|
26
|
+
renderIconTooltip?: () => ReactNode;
|
|
27
27
|
defaultOpen?: boolean;
|
|
28
28
|
/** Shown at the end of the row, like a count or an action. */
|
|
29
29
|
after?: ReactNode;
|
|
30
30
|
onDragStart?: (event: DragEvent) => void;
|
|
31
31
|
onDragEnd?: () => void;
|
|
32
|
+
onContextMenu?: (event: MouseEvent<HTMLElement>) => void;
|
|
32
33
|
/** Only called while the group is open, so large trees stay cheap. */
|
|
33
34
|
children: () => ReactNode;
|
|
34
35
|
}
|
|
35
|
-
export declare function TreeGroup({ label, typeId, icon, description, defaultOpen, after, onDragStart, onDragEnd, children }: TreeGroupProps): import("react").JSX.Element;
|
|
36
|
+
export declare function TreeGroup({ label, typeId, icon, description, renderIconTooltip, defaultOpen, after, onDragStart, onDragEnd, onContextMenu, children }: TreeGroupProps): import("react").JSX.Element;
|
|
36
37
|
interface TreeLeafProps {
|
|
37
38
|
label: ReactNode;
|
|
38
39
|
/** Shows the type's icon in front of the label. */
|
|
@@ -46,13 +47,12 @@ interface TreeLeafProps {
|
|
|
46
47
|
onHover?: (hovering: boolean) => void;
|
|
47
48
|
onDragStart?: (event: DragEvent) => void;
|
|
48
49
|
onDragEnd?: () => void;
|
|
50
|
+
onContextMenu?: (event: MouseEvent<HTMLElement>) => void;
|
|
49
51
|
/** Shown at the end of the row, like a count or an action. */
|
|
50
52
|
after?: ReactNode;
|
|
51
53
|
}
|
|
52
54
|
/** Activates on double click, as EVE's own lists do, unless `activateOnClick` is set. */
|
|
53
|
-
export declare function TreeLeaf({ label, typeId, title, renderTooltip, onActivate, activateOnClick, onHover, onDragStart, onDragEnd, after }: TreeLeafProps): import("react").JSX.Element;
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region src/primitives/Icon/Icon.d.ts
|
|
55
|
+
export declare function TreeLeaf({ label, typeId, title, renderTooltip, onActivate, activateOnClick, onHover, onDragStart, onDragEnd, onContextMenu, after }: TreeLeafProps): import("react").JSX.Element;
|
|
56
56
|
declare const textures: {
|
|
57
57
|
"hardpoint-turret": string;
|
|
58
58
|
"hardpoint-launcher": string;
|
|
@@ -148,8 +148,6 @@ interface IconProps {
|
|
|
148
148
|
size?: number;
|
|
149
149
|
}
|
|
150
150
|
export declare function Icon({ name, size }: IconProps): import("react").JSX.Element;
|
|
151
|
-
//#endregion
|
|
152
|
-
//#region src/primitives/TypeIcon/TypeIcon.d.ts
|
|
153
151
|
interface TypeIconProps {
|
|
154
152
|
typeId: number;
|
|
155
153
|
size?: number;
|
|
@@ -158,8 +156,6 @@ interface TypeIconProps {
|
|
|
158
156
|
loading?: "lazy" | "eager";
|
|
159
157
|
}
|
|
160
158
|
export declare function TypeIcon({ typeId, size, marker, loading }: TypeIconProps): import("react").JSX.Element;
|
|
161
|
-
//#endregion
|
|
162
|
-
//#region src/primitives/FilterToggle/FilterToggle.d.ts
|
|
163
159
|
type FilterToggleProps = ({
|
|
164
160
|
icon: IconName;
|
|
165
161
|
typeId?: undefined;
|
|
@@ -183,46 +179,42 @@ type FilterToggleProps = ({
|
|
|
183
179
|
};
|
|
184
180
|
/** One of the icons above EVE's lists that filter them. */
|
|
185
181
|
export declare function FilterToggle({ icon, typeId, src, label, pressed, disabled, onPressedChange }: FilterToggleProps): import("react").JSX.Element;
|
|
186
|
-
//#endregion
|
|
187
|
-
//#region src/primitives/Tooltip/Tooltip.d.ts
|
|
188
182
|
interface TooltipProps {
|
|
189
183
|
/** Without one, there is no tooltip; a function is only called once the tooltip has opened. */
|
|
190
184
|
label?: ReactNode | (() => ReactNode);
|
|
191
185
|
/** The tooltip points at the first element. */
|
|
192
186
|
children: ReactNode;
|
|
187
|
+
/** Lets the tooltip grow as wide as its label. */
|
|
188
|
+
wide?: boolean;
|
|
193
189
|
}
|
|
194
190
|
/**
|
|
195
191
|
* Screen readers do not get the tooltip; name `children` itself, like with `aria-label`.
|
|
196
192
|
*
|
|
197
193
|
* Firefox places the tooltip as if `children` had no CSS transform, so do not rotate or scale it, or its parents.
|
|
198
194
|
*/
|
|
199
|
-
export declare function Tooltip({ label, children }: TooltipProps): import("react").JSX.Element;
|
|
195
|
+
export declare function Tooltip({ label, children, wide }: TooltipProps): import("react").JSX.Element;
|
|
200
196
|
interface TooltipTextProps {
|
|
201
197
|
title: ReactNode;
|
|
202
198
|
description?: ReactNode;
|
|
203
199
|
}
|
|
204
200
|
/** A tooltip's `label` with a title; give several to stack them. */
|
|
205
201
|
export declare function TooltipText({ title, description }: TooltipTextProps): import("react").JSX.Element;
|
|
206
|
-
//#endregion
|
|
207
|
-
//#region src/primitives/HistoryBar/HistoryBar.d.ts
|
|
208
202
|
interface HistoryBarProps {
|
|
209
203
|
label: string;
|
|
210
204
|
length: number;
|
|
211
205
|
/** 0 is the oldest. */
|
|
212
206
|
position: number;
|
|
213
207
|
onGoTo: (position: number) => void;
|
|
208
|
+
/** The entry under the pointer; undefined when it leaves. */
|
|
209
|
+
onHover?: (position: number | undefined) => void;
|
|
214
210
|
/** Shows the title as a tooltip. */
|
|
215
211
|
tooltipTitle?: boolean;
|
|
216
212
|
}
|
|
217
213
|
/** EVE's Simulation History. */
|
|
218
|
-
export declare function HistoryBar({ label, length, position, onGoTo, tooltipTitle }: HistoryBarProps): import("react").JSX.Element;
|
|
219
|
-
//#endregion
|
|
220
|
-
//#region src/primitives/Wheel/layout.d.ts
|
|
214
|
+
export declare function HistoryBar({ label, length, position, onGoTo, onHover, tooltipTitle }: HistoryBarProps): import("react").JSX.Element;
|
|
221
215
|
type WheelRack = "high" | "medium" | "low" | "rig" | "subsystem";
|
|
222
216
|
export declare function rackSize(rack: WheelRack): number;
|
|
223
217
|
export declare function slotAngle(rack: WheelRack, index: number): number;
|
|
224
|
-
//#endregion
|
|
225
|
-
//#region src/primitives/Wheel/Wheel.d.ts
|
|
226
218
|
interface WheelProps {
|
|
227
219
|
label: string;
|
|
228
220
|
/** Leaves out the scales of the gauges. */
|
|
@@ -231,15 +223,11 @@ interface WheelProps {
|
|
|
231
223
|
}
|
|
232
224
|
/** Square, and as big as EVE's at `--esf-scale`, or as wide as `--esf-wheel-size`. */
|
|
233
225
|
export declare function Wheel({ label, hideScales, children }: WheelProps): import("react").JSX.Element;
|
|
234
|
-
//#endregion
|
|
235
|
-
//#region src/primitives/Wheel/WheelRackMarker.d.ts
|
|
236
226
|
type MarkedRack = Extract<WheelRack, "high" | "medium" | "low">;
|
|
237
227
|
interface WheelRackMarkerProps {
|
|
238
228
|
rack: MarkedRack;
|
|
239
229
|
}
|
|
240
230
|
export declare function WheelRackMarker({ rack }: WheelRackMarkerProps): import("react").JSX.Element;
|
|
241
|
-
//#endregion
|
|
242
|
-
//#region src/primitives/Wheel/WheelSlot.d.ts
|
|
243
231
|
type SlotState = "offline" | "online" | "active" | "overload";
|
|
244
232
|
interface WheelSlotProps extends HTMLAttributes<HTMLDivElement> {
|
|
245
233
|
rack: WheelRack;
|
|
@@ -273,8 +261,6 @@ interface WheelSlotProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
273
261
|
onShowChargeInfo?: (anchor: HTMLElement) => void;
|
|
274
262
|
}
|
|
275
263
|
export declare function WheelSlot({ rack, angle, typeId, typeName, chargeTypeId, chargeable, state, activatable, available, preview, tooltip, onPress, onDragStart, onDragEnd, label, actions: showActions, onUnfit, onRemoveCharge, onTogglePower, onShowInfo, onShowChargeInfo, className, style, ...props }: WheelSlotProps): import("react").JSX.Element;
|
|
276
|
-
//#endregion
|
|
277
|
-
//#region src/primitives/Wheel/WheelHardpoints.d.ts
|
|
278
264
|
interface Hardpoints {
|
|
279
265
|
used: number;
|
|
280
266
|
total: number;
|
|
@@ -284,8 +270,6 @@ interface WheelHardpointsProps {
|
|
|
284
270
|
launchers: Hardpoints;
|
|
285
271
|
}
|
|
286
272
|
export declare function WheelHardpoints({ turrets, launchers }: WheelHardpointsProps): import("react").JSX.Element;
|
|
287
|
-
//#endregion
|
|
288
|
-
//#region src/primitives/Wheel/WheelGauge.d.ts
|
|
289
273
|
type WheelResource = "cpu" | "powergrid" | "calibration";
|
|
290
274
|
interface WheelGaugeProps {
|
|
291
275
|
resource: WheelResource;
|
|
@@ -294,22 +278,16 @@ interface WheelGaugeProps {
|
|
|
294
278
|
valueText?: string;
|
|
295
279
|
}
|
|
296
280
|
export declare function WheelGauge({ resource, used, total, valueText }: WheelGaugeProps): import("react").JSX.Element;
|
|
297
|
-
//#endregion
|
|
298
|
-
//#region src/primitives/Wheel/WheelHull.d.ts
|
|
299
281
|
interface WheelHullProps {
|
|
300
282
|
typeId: number;
|
|
301
283
|
}
|
|
302
284
|
export declare function WheelHull({ typeId }: WheelHullProps): import("react").JSX.Element;
|
|
303
|
-
//#endregion
|
|
304
|
-
//#region src/primitives/Wheel/WheelLink.d.ts
|
|
305
285
|
interface WheelLinkProps {
|
|
306
286
|
href: string;
|
|
307
287
|
text: string;
|
|
308
288
|
}
|
|
309
289
|
/** A link written along the top of the wheel's rim. */
|
|
310
290
|
export declare function WheelLink({ href, text }: WheelLinkProps): import("react").JSX.Element;
|
|
311
|
-
//#endregion
|
|
312
|
-
//#region src/primitives/Stat/Stat.d.ts
|
|
313
291
|
interface StatProps {
|
|
314
292
|
/** Without one, the value still lines up with those that have one; `null` leaves that space out. */
|
|
315
293
|
icon?: IconName | null;
|
|
@@ -319,8 +297,6 @@ interface StatProps {
|
|
|
319
297
|
children: ReactNode;
|
|
320
298
|
}
|
|
321
299
|
export declare function Stat({ icon, label, tooltip, children }: StatProps): import("react").JSX.Element;
|
|
322
|
-
//#endregion
|
|
323
|
-
//#region src/primitives/StatsSection/StatsSection.d.ts
|
|
324
300
|
interface StatsSectionProps {
|
|
325
301
|
title: string;
|
|
326
302
|
summary?: ReactNode;
|
|
@@ -331,8 +307,6 @@ interface StatsSectionProps {
|
|
|
331
307
|
children: ReactNode;
|
|
332
308
|
}
|
|
333
309
|
export declare function StatsSection({ title, summary, action, columns, children }: StatsSectionProps): import("react").JSX.Element;
|
|
334
|
-
//#endregion
|
|
335
|
-
//#region src/primitives/ResistanceBar/ResistanceBar.d.ts
|
|
336
310
|
type DamageType = "em" | "thermal" | "kinetic" | "explosive";
|
|
337
311
|
interface ResistanceBarProps {
|
|
338
312
|
damage: DamageType;
|
|
@@ -343,8 +317,6 @@ interface ResistanceBarProps {
|
|
|
343
317
|
children: ReactNode;
|
|
344
318
|
}
|
|
345
319
|
export declare function ResistanceBar({ damage, label, resistance, children }: ResistanceBarProps): import("react").JSX.Element;
|
|
346
|
-
//#endregion
|
|
347
|
-
//#region src/primitives/CapacitorRing/CapacitorRing.d.ts
|
|
348
320
|
interface CapacitorRingProps {
|
|
349
321
|
/** In GJ. */
|
|
350
322
|
capacity: number;
|
|
@@ -354,8 +326,6 @@ interface CapacitorRingProps {
|
|
|
354
326
|
}
|
|
355
327
|
/** EVE's ring of capacitor cells. */
|
|
356
328
|
export declare function CapacitorRing({ capacity, level, label }: CapacitorRingProps): import("react").JSX.Element;
|
|
357
|
-
//#endregion
|
|
358
|
-
//#region src/components/FittingWheel/FittingWheel.d.ts
|
|
359
329
|
interface FittingWheelProps {
|
|
360
330
|
label?: string;
|
|
361
331
|
/** Shows the fit without letting it be changed. */
|
|
@@ -367,73 +337,52 @@ interface FittingWheelProps {
|
|
|
367
337
|
}
|
|
368
338
|
/** The fitting wheel of the fit in the surrounding `EveShipFitProvider`. */
|
|
369
339
|
export declare function FittingWheel({ label, readOnly, hideStats, credit }: FittingWheelProps): import("react").JSX.Element;
|
|
370
|
-
//#endregion
|
|
371
|
-
//#region src/components/FittingWindow/FittingWindow.d.ts
|
|
372
340
|
interface FittingWindowProps {
|
|
373
341
|
label?: string;
|
|
374
342
|
/** Like `ItemBrowser`; slid out by the Item Browser button, which is only there with it. */
|
|
375
343
|
browser?: ReactNode;
|
|
376
344
|
/** Like `ShipStatistics`; slid out by the Statistics button, which is only there with it. */
|
|
377
345
|
statistics?: ReactNode;
|
|
378
|
-
/** Shows the fit without its
|
|
346
|
+
/** Shows the fit without its warnings, history or anything to change it. */
|
|
379
347
|
preview?: boolean;
|
|
380
348
|
/** Shows an empty wheel with this text, and nothing of the fit. */
|
|
381
349
|
placeholder?: string;
|
|
382
350
|
}
|
|
383
351
|
/** EVE's fitting window around the `FittingWheel`. */
|
|
384
352
|
export declare function FittingWindow({ label, browser, statistics: givenStatistics, preview, placeholder }: FittingWindowProps): import("react").JSX.Element;
|
|
385
|
-
//#endregion
|
|
386
|
-
//#region src/components/ItemBrowser/ItemBrowser.d.ts
|
|
387
353
|
interface ItemBrowserProps {
|
|
388
354
|
label?: string;
|
|
389
355
|
/** Turns off everything that needs a hull. */
|
|
390
356
|
noHullSelected?: boolean;
|
|
357
|
+
/** Opens a fit pasted anywhere on the page. */
|
|
358
|
+
pasteToOpen?: boolean;
|
|
391
359
|
}
|
|
392
360
|
/** EVE's browser of hulls and fits, modules, charges, and implants, left of the fitting wheel. */
|
|
393
|
-
export declare function ItemBrowser({ label, noHullSelected }: ItemBrowserProps): import("react").JSX.Element;
|
|
394
|
-
//#endregion
|
|
395
|
-
//#region src/components/ShipStatistics/ShipStatistics.d.ts
|
|
361
|
+
export declare function ItemBrowser({ label, noHullSelected, pasteToOpen }: ItemBrowserProps): import("react").JSX.Element;
|
|
396
362
|
interface ShipStatisticsProps {
|
|
397
363
|
label?: string;
|
|
398
364
|
}
|
|
399
365
|
/** EVE's statistics of the fit, as its fitting window shows them. */
|
|
400
366
|
export declare function ShipStatistics({ label }: ShipStatisticsProps): import("react").JSX.Element;
|
|
401
|
-
//#endregion
|
|
402
|
-
//#region src/components/ShipStatistics/CapacitorStats.d.ts
|
|
403
367
|
export declare function CapacitorStats(): import("react").JSX.Element;
|
|
404
|
-
//#endregion
|
|
405
|
-
//#region src/components/ShipStatistics/OffenseStats.d.ts
|
|
406
368
|
export declare function OffenseStats(): import("react").JSX.Element;
|
|
407
|
-
//#endregion
|
|
408
|
-
//#region src/components/ShipStatistics/DefenseStats.d.ts
|
|
409
369
|
export declare function DefenseStats(): import("react").JSX.Element;
|
|
410
|
-
//#endregion
|
|
411
|
-
//#region src/components/ShipStatistics/RepairRate.d.ts
|
|
412
370
|
/** One of the ways the fit gets its hitpoints back; click it to pick another. */
|
|
413
371
|
export declare function RepairRate(): import("react").JSX.Element;
|
|
414
|
-
//#endregion
|
|
415
|
-
//#region src/components/ShipStatistics/Resistances.d.ts
|
|
416
372
|
type Layer = "shield" | "armor" | "structure";
|
|
417
373
|
/** The four resistances of one layer. */
|
|
418
374
|
export declare function Resistances({ layer }: {
|
|
419
375
|
layer: Layer;
|
|
420
376
|
}): import("react").JSX.Element[];
|
|
421
|
-
//#endregion
|
|
422
|
-
//#region src/components/ShipStatistics/TargetingStats.d.ts
|
|
423
377
|
export declare function TargetingStats(): import("react").JSX.Element;
|
|
424
|
-
//#endregion
|
|
425
|
-
//#region src/components/ShipStatistics/NavigationStats.d.ts
|
|
426
378
|
export declare function NavigationStats(): import("react").JSX.Element;
|
|
427
|
-
//#endregion
|
|
428
|
-
//#region src/components/ShipStatistics/DroneStats.d.ts
|
|
429
379
|
export declare function DroneStats(): import("react").JSX.Element;
|
|
430
|
-
//#endregion
|
|
431
|
-
//#region src/components/ShipStatistics/FitPrice.d.ts
|
|
432
380
|
interface FitPriceProps {
|
|
433
381
|
/** In ISK; undefined while unknown. */
|
|
434
382
|
price: number | undefined;
|
|
435
383
|
change?: "better" | "worse";
|
|
384
|
+
/** What `price` adds up, listed in its tooltip. */
|
|
385
|
+
items?: readonly FitPriceItem[];
|
|
436
386
|
}
|
|
437
|
-
export declare function FitPrice({ price, change }: FitPriceProps): import("react").JSX.Element;
|
|
438
|
-
//#endregion
|
|
387
|
+
export declare function FitPrice({ price, change, items }: FitPriceProps): import("react").JSX.Element;
|
|
439
388
|
export type { CapacitorRingProps, DamageType, DialogProps, FilterToggleProps, FitPriceProps, FittingWheelProps, FittingWindowProps, Hardpoints, HistoryBarProps, IconName, IconProps, ItemBrowserProps, Layer, MarkedRack, ResistanceBarProps, ShipStatisticsProps, SlotState, StatProps, StatsSectionProps, TooltipProps, TooltipTextProps, TreeGroupProps, TreeLeafProps, TreeListProps, TypeIconProps, WheelGaugeProps, WheelHardpointsProps, WheelHullProps, WheelLinkProps, WheelProps, WheelRack, WheelRackMarkerProps, WheelResource, WheelSlotProps };
|