@eveshipfit/ui-ingame 1.9.0 → 1.11.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 +25 -72
- package/dist/index.mjs +4248 -4992
- package/dist/style.css +263 -78
- 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;
|
|
@@ -177,51 +173,48 @@ type FilterToggleProps = ({
|
|
|
177
173
|
}) & {
|
|
178
174
|
label: string;
|
|
179
175
|
pressed?: boolean;
|
|
176
|
+
disabled?: boolean;
|
|
180
177
|
/** Without it, the filter shows as not implemented yet. */
|
|
181
178
|
onPressedChange?: (pressed: boolean) => void;
|
|
182
179
|
};
|
|
183
180
|
/** One of the icons above EVE's lists that filter them. */
|
|
184
|
-
export declare function FilterToggle({ icon, typeId, src, label, pressed, onPressedChange }: FilterToggleProps): import("react").JSX.Element;
|
|
185
|
-
//#endregion
|
|
186
|
-
//#region src/primitives/Tooltip/Tooltip.d.ts
|
|
181
|
+
export declare function FilterToggle({ icon, typeId, src, label, pressed, disabled, onPressedChange }: FilterToggleProps): import("react").JSX.Element;
|
|
187
182
|
interface TooltipProps {
|
|
188
183
|
/** Without one, there is no tooltip; a function is only called once the tooltip has opened. */
|
|
189
184
|
label?: ReactNode | (() => ReactNode);
|
|
190
185
|
/** The tooltip points at the first element. */
|
|
191
186
|
children: ReactNode;
|
|
187
|
+
/** Lets the tooltip grow as wide as its label. */
|
|
188
|
+
wide?: boolean;
|
|
192
189
|
}
|
|
193
190
|
/**
|
|
194
191
|
* Screen readers do not get the tooltip; name `children` itself, like with `aria-label`.
|
|
195
192
|
*
|
|
196
193
|
* Firefox places the tooltip as if `children` had no CSS transform, so do not rotate or scale it, or its parents.
|
|
197
194
|
*/
|
|
198
|
-
export declare function Tooltip({ label, children }: TooltipProps): import("react").JSX.Element;
|
|
195
|
+
export declare function Tooltip({ label, children, wide }: TooltipProps): import("react").JSX.Element;
|
|
199
196
|
interface TooltipTextProps {
|
|
200
197
|
title: ReactNode;
|
|
201
198
|
description?: ReactNode;
|
|
202
199
|
}
|
|
203
200
|
/** A tooltip's `label` with a title; give several to stack them. */
|
|
204
201
|
export declare function TooltipText({ title, description }: TooltipTextProps): import("react").JSX.Element;
|
|
205
|
-
//#endregion
|
|
206
|
-
//#region src/primitives/HistoryBar/HistoryBar.d.ts
|
|
207
202
|
interface HistoryBarProps {
|
|
208
203
|
label: string;
|
|
209
204
|
length: number;
|
|
210
205
|
/** 0 is the oldest. */
|
|
211
206
|
position: number;
|
|
212
207
|
onGoTo: (position: number) => void;
|
|
208
|
+
/** The entry under the pointer; undefined when it leaves. */
|
|
209
|
+
onHover?: (position: number | undefined) => void;
|
|
213
210
|
/** Shows the title as a tooltip. */
|
|
214
211
|
tooltipTitle?: boolean;
|
|
215
212
|
}
|
|
216
213
|
/** EVE's Simulation History. */
|
|
217
|
-
export declare function HistoryBar({ label, length, position, onGoTo, tooltipTitle }: HistoryBarProps): import("react").JSX.Element;
|
|
218
|
-
//#endregion
|
|
219
|
-
//#region src/primitives/Wheel/layout.d.ts
|
|
214
|
+
export declare function HistoryBar({ label, length, position, onGoTo, onHover, tooltipTitle }: HistoryBarProps): import("react").JSX.Element;
|
|
220
215
|
type WheelRack = "high" | "medium" | "low" | "rig" | "subsystem";
|
|
221
216
|
export declare function rackSize(rack: WheelRack): number;
|
|
222
217
|
export declare function slotAngle(rack: WheelRack, index: number): number;
|
|
223
|
-
//#endregion
|
|
224
|
-
//#region src/primitives/Wheel/Wheel.d.ts
|
|
225
218
|
interface WheelProps {
|
|
226
219
|
label: string;
|
|
227
220
|
/** Leaves out the scales of the gauges. */
|
|
@@ -230,15 +223,11 @@ interface WheelProps {
|
|
|
230
223
|
}
|
|
231
224
|
/** Square, and as big as EVE's at `--esf-scale`, or as wide as `--esf-wheel-size`. */
|
|
232
225
|
export declare function Wheel({ label, hideScales, children }: WheelProps): import("react").JSX.Element;
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region src/primitives/Wheel/WheelRackMarker.d.ts
|
|
235
226
|
type MarkedRack = Extract<WheelRack, "high" | "medium" | "low">;
|
|
236
227
|
interface WheelRackMarkerProps {
|
|
237
228
|
rack: MarkedRack;
|
|
238
229
|
}
|
|
239
230
|
export declare function WheelRackMarker({ rack }: WheelRackMarkerProps): import("react").JSX.Element;
|
|
240
|
-
//#endregion
|
|
241
|
-
//#region src/primitives/Wheel/WheelSlot.d.ts
|
|
242
231
|
type SlotState = "offline" | "online" | "active" | "overload";
|
|
243
232
|
interface WheelSlotProps extends HTMLAttributes<HTMLDivElement> {
|
|
244
233
|
rack: WheelRack;
|
|
@@ -261,6 +250,7 @@ interface WheelSlotProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
261
250
|
/** Makes the slot draggable. */
|
|
262
251
|
onDragStart?: DragEventHandler<HTMLDivElement>;
|
|
263
252
|
onDragEnd?: DragEventHandler<HTMLDivElement>;
|
|
253
|
+
/** The slot's name for screen readers. */
|
|
264
254
|
label?: string;
|
|
265
255
|
/** False leaves out the actions shown on hover. */
|
|
266
256
|
actions?: boolean;
|
|
@@ -271,8 +261,6 @@ interface WheelSlotProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
271
261
|
onShowChargeInfo?: (anchor: HTMLElement) => void;
|
|
272
262
|
}
|
|
273
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;
|
|
274
|
-
//#endregion
|
|
275
|
-
//#region src/primitives/Wheel/WheelHardpoints.d.ts
|
|
276
264
|
interface Hardpoints {
|
|
277
265
|
used: number;
|
|
278
266
|
total: number;
|
|
@@ -282,8 +270,6 @@ interface WheelHardpointsProps {
|
|
|
282
270
|
launchers: Hardpoints;
|
|
283
271
|
}
|
|
284
272
|
export declare function WheelHardpoints({ turrets, launchers }: WheelHardpointsProps): import("react").JSX.Element;
|
|
285
|
-
//#endregion
|
|
286
|
-
//#region src/primitives/Wheel/WheelGauge.d.ts
|
|
287
273
|
type WheelResource = "cpu" | "powergrid" | "calibration";
|
|
288
274
|
interface WheelGaugeProps {
|
|
289
275
|
resource: WheelResource;
|
|
@@ -292,22 +278,16 @@ interface WheelGaugeProps {
|
|
|
292
278
|
valueText?: string;
|
|
293
279
|
}
|
|
294
280
|
export declare function WheelGauge({ resource, used, total, valueText }: WheelGaugeProps): import("react").JSX.Element;
|
|
295
|
-
//#endregion
|
|
296
|
-
//#region src/primitives/Wheel/WheelHull.d.ts
|
|
297
281
|
interface WheelHullProps {
|
|
298
282
|
typeId: number;
|
|
299
283
|
}
|
|
300
284
|
export declare function WheelHull({ typeId }: WheelHullProps): import("react").JSX.Element;
|
|
301
|
-
//#endregion
|
|
302
|
-
//#region src/primitives/Wheel/WheelLink.d.ts
|
|
303
285
|
interface WheelLinkProps {
|
|
304
286
|
href: string;
|
|
305
287
|
text: string;
|
|
306
288
|
}
|
|
307
289
|
/** A link written along the top of the wheel's rim. */
|
|
308
290
|
export declare function WheelLink({ href, text }: WheelLinkProps): import("react").JSX.Element;
|
|
309
|
-
//#endregion
|
|
310
|
-
//#region src/primitives/Stat/Stat.d.ts
|
|
311
291
|
interface StatProps {
|
|
312
292
|
/** Without one, the value still lines up with those that have one; `null` leaves that space out. */
|
|
313
293
|
icon?: IconName | null;
|
|
@@ -317,8 +297,6 @@ interface StatProps {
|
|
|
317
297
|
children: ReactNode;
|
|
318
298
|
}
|
|
319
299
|
export declare function Stat({ icon, label, tooltip, children }: StatProps): import("react").JSX.Element;
|
|
320
|
-
//#endregion
|
|
321
|
-
//#region src/primitives/StatsSection/StatsSection.d.ts
|
|
322
300
|
interface StatsSectionProps {
|
|
323
301
|
title: string;
|
|
324
302
|
summary?: ReactNode;
|
|
@@ -329,8 +307,6 @@ interface StatsSectionProps {
|
|
|
329
307
|
children: ReactNode;
|
|
330
308
|
}
|
|
331
309
|
export declare function StatsSection({ title, summary, action, columns, children }: StatsSectionProps): import("react").JSX.Element;
|
|
332
|
-
//#endregion
|
|
333
|
-
//#region src/primitives/ResistanceBar/ResistanceBar.d.ts
|
|
334
310
|
type DamageType = "em" | "thermal" | "kinetic" | "explosive";
|
|
335
311
|
interface ResistanceBarProps {
|
|
336
312
|
damage: DamageType;
|
|
@@ -341,8 +317,6 @@ interface ResistanceBarProps {
|
|
|
341
317
|
children: ReactNode;
|
|
342
318
|
}
|
|
343
319
|
export declare function ResistanceBar({ damage, label, resistance, children }: ResistanceBarProps): import("react").JSX.Element;
|
|
344
|
-
//#endregion
|
|
345
|
-
//#region src/primitives/CapacitorRing/CapacitorRing.d.ts
|
|
346
320
|
interface CapacitorRingProps {
|
|
347
321
|
/** In GJ. */
|
|
348
322
|
capacity: number;
|
|
@@ -352,8 +326,6 @@ interface CapacitorRingProps {
|
|
|
352
326
|
}
|
|
353
327
|
/** EVE's ring of capacitor cells. */
|
|
354
328
|
export declare function CapacitorRing({ capacity, level, label }: CapacitorRingProps): import("react").JSX.Element;
|
|
355
|
-
//#endregion
|
|
356
|
-
//#region src/components/FittingWheel/FittingWheel.d.ts
|
|
357
329
|
interface FittingWheelProps {
|
|
358
330
|
label?: string;
|
|
359
331
|
/** Shows the fit without letting it be changed. */
|
|
@@ -365,8 +337,6 @@ interface FittingWheelProps {
|
|
|
365
337
|
}
|
|
366
338
|
/** The fitting wheel of the fit in the surrounding `EveShipFitProvider`. */
|
|
367
339
|
export declare function FittingWheel({ label, readOnly, hideStats, credit }: FittingWheelProps): import("react").JSX.Element;
|
|
368
|
-
//#endregion
|
|
369
|
-
//#region src/components/FittingWindow/FittingWindow.d.ts
|
|
370
340
|
interface FittingWindowProps {
|
|
371
341
|
label?: string;
|
|
372
342
|
/** Like `ItemBrowser`; slid out by the Item Browser button, which is only there with it. */
|
|
@@ -380,56 +350,39 @@ interface FittingWindowProps {
|
|
|
380
350
|
}
|
|
381
351
|
/** EVE's fitting window around the `FittingWheel`. */
|
|
382
352
|
export declare function FittingWindow({ label, browser, statistics: givenStatistics, preview, placeholder }: FittingWindowProps): import("react").JSX.Element;
|
|
383
|
-
//#endregion
|
|
384
|
-
//#region src/components/ItemBrowser/ItemBrowser.d.ts
|
|
385
353
|
interface ItemBrowserProps {
|
|
386
354
|
label?: string;
|
|
355
|
+
/** Turns off everything that needs a hull. */
|
|
356
|
+
noHullSelected?: boolean;
|
|
357
|
+
/** Opens a fit pasted anywhere on the page. */
|
|
358
|
+
pasteToOpen?: boolean;
|
|
387
359
|
}
|
|
388
360
|
/** EVE's browser of hulls and fits, modules, charges, and implants, left of the fitting wheel. */
|
|
389
|
-
export declare function ItemBrowser({ label }: ItemBrowserProps): import("react").JSX.Element;
|
|
390
|
-
//#endregion
|
|
391
|
-
//#region src/components/ShipStatistics/ShipStatistics.d.ts
|
|
361
|
+
export declare function ItemBrowser({ label, noHullSelected, pasteToOpen }: ItemBrowserProps): import("react").JSX.Element;
|
|
392
362
|
interface ShipStatisticsProps {
|
|
393
363
|
label?: string;
|
|
394
364
|
}
|
|
395
365
|
/** EVE's statistics of the fit, as its fitting window shows them. */
|
|
396
366
|
export declare function ShipStatistics({ label }: ShipStatisticsProps): import("react").JSX.Element;
|
|
397
|
-
//#endregion
|
|
398
|
-
//#region src/components/ShipStatistics/CapacitorStats.d.ts
|
|
399
367
|
export declare function CapacitorStats(): import("react").JSX.Element;
|
|
400
|
-
//#endregion
|
|
401
|
-
//#region src/components/ShipStatistics/OffenseStats.d.ts
|
|
402
368
|
export declare function OffenseStats(): import("react").JSX.Element;
|
|
403
|
-
//#endregion
|
|
404
|
-
//#region src/components/ShipStatistics/DefenseStats.d.ts
|
|
405
369
|
export declare function DefenseStats(): import("react").JSX.Element;
|
|
406
|
-
//#endregion
|
|
407
|
-
//#region src/components/ShipStatistics/RepairRate.d.ts
|
|
408
370
|
/** One of the ways the fit gets its hitpoints back; click it to pick another. */
|
|
409
371
|
export declare function RepairRate(): import("react").JSX.Element;
|
|
410
|
-
//#endregion
|
|
411
|
-
//#region src/components/ShipStatistics/Resistances.d.ts
|
|
412
372
|
type Layer = "shield" | "armor" | "structure";
|
|
413
373
|
/** The four resistances of one layer. */
|
|
414
374
|
export declare function Resistances({ layer }: {
|
|
415
375
|
layer: Layer;
|
|
416
376
|
}): import("react").JSX.Element[];
|
|
417
|
-
//#endregion
|
|
418
|
-
//#region src/components/ShipStatistics/TargetingStats.d.ts
|
|
419
377
|
export declare function TargetingStats(): import("react").JSX.Element;
|
|
420
|
-
//#endregion
|
|
421
|
-
//#region src/components/ShipStatistics/NavigationStats.d.ts
|
|
422
378
|
export declare function NavigationStats(): import("react").JSX.Element;
|
|
423
|
-
//#endregion
|
|
424
|
-
//#region src/components/ShipStatistics/DroneStats.d.ts
|
|
425
379
|
export declare function DroneStats(): import("react").JSX.Element;
|
|
426
|
-
//#endregion
|
|
427
|
-
//#region src/components/ShipStatistics/FitPrice.d.ts
|
|
428
380
|
interface FitPriceProps {
|
|
429
381
|
/** In ISK; undefined while unknown. */
|
|
430
382
|
price: number | undefined;
|
|
431
383
|
change?: "better" | "worse";
|
|
384
|
+
/** What `price` adds up, listed in its tooltip. */
|
|
385
|
+
items?: readonly FitPriceItem[];
|
|
432
386
|
}
|
|
433
|
-
export declare function FitPrice({ price, change }: FitPriceProps): import("react").JSX.Element;
|
|
434
|
-
//#endregion
|
|
387
|
+
export declare function FitPrice({ price, change, items }: FitPriceProps): import("react").JSX.Element;
|
|
435
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 };
|