@eveshipfit/ui-ingame 1.4.0 → 1.6.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 CHANGED
@@ -6,7 +6,7 @@ interface DialogProps {
6
6
  onClose: () => void;
7
7
  children: ReactNode;
8
8
  }
9
- /** A modal; `onClose` is called when the user closes it, by Escape or the close button. */
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
11
  //#endregion
12
12
  //#region src/primitives/TreeList/TreeList.d.ts
@@ -38,14 +38,16 @@ interface TreeLeafProps {
38
38
  typeId?: number;
39
39
  title?: string;
40
40
  onActivate?: () => void;
41
+ /** Activates on a single click. */
42
+ activateOnClick?: boolean;
41
43
  onHover?: (hovering: boolean) => void;
42
44
  onDragStart?: (event: DragEvent) => void;
43
45
  onDragEnd?: () => void;
44
46
  /** Shown at the end of the row, like a count or an action. */
45
47
  after?: ReactNode;
46
48
  }
47
- /** Activates on double click, as EVE's own lists do; single clicks are for selecting text and dragging. */
48
- export declare function TreeLeaf({ label, typeId, title, onActivate, onHover, onDragStart, onDragEnd, after }: TreeLeafProps): import("react").JSX.Element;
49
+ /** Activates on double click, as EVE's own lists do, unless `activateOnClick` is set. */
50
+ export declare function TreeLeaf({ label, typeId, title, onActivate, activateOnClick, onHover, onDragStart, onDragEnd, after }: TreeLeafProps): import("react").JSX.Element;
49
51
  //#endregion
50
52
  //#region src/primitives/Icon/Icon.d.ts
51
53
  declare const textures: {
@@ -60,12 +62,16 @@ declare const textures: {
60
62
  "module-unfit": string;
61
63
  "module-power": string;
62
64
  "module-info": string;
65
+ "mode-defense": string;
66
+ "mode-sharpshooter": string;
67
+ "mode-propulsion": string;
63
68
  link: string;
64
69
  search: string;
65
70
  collapse: string;
66
71
  checkmark: string;
67
72
  close: string;
68
73
  folder: string;
74
+ export: string;
69
75
  "fits-browser": string;
70
76
  "fits-personal": string;
71
77
  "fits-corporation": string;
@@ -166,8 +172,9 @@ export declare function FilterToggle({ icon, typeId, label, pressed, onPressedCh
166
172
  //#endregion
167
173
  //#region src/primitives/Tooltip/Tooltip.d.ts
168
174
  interface TooltipProps {
169
- label: ReactNode;
170
- /** One element, which the tooltip points at. */
175
+ /** Without one, there is no tooltip. */
176
+ label?: ReactNode;
177
+ /** The tooltip points at the first element. */
171
178
  children: ReactNode;
172
179
  }
173
180
  /**
@@ -204,10 +211,12 @@ export declare function slotAngle(rack: WheelRack, index: number): number;
204
211
  //#region src/primitives/Wheel/Wheel.d.ts
205
212
  interface WheelProps {
206
213
  label: string;
214
+ /** Leaves out the scales of the gauges. */
215
+ hideScales?: boolean;
207
216
  children?: ReactNode;
208
217
  }
209
218
  /** Square, and as big as EVE's at `--esf-scale`, or as wide as `--esf-wheel-size`. */
210
- export declare function Wheel({ label, children }: WheelProps): import("react").JSX.Element;
219
+ export declare function Wheel({ label, hideScales, children }: WheelProps): import("react").JSX.Element;
211
220
  //#endregion
212
221
  //#region src/primitives/Wheel/WheelRackMarker.d.ts
213
222
  type MarkedRack = Extract<WheelRack, "high" | "medium" | "low">;
@@ -232,17 +241,21 @@ interface WheelSlotProps extends HTMLAttributes<HTMLDivElement> {
232
241
  available?: boolean;
233
242
  /** Shown, but not fitted yet. */
234
243
  preview?: boolean;
244
+ /** Shown when hovering the slot. */
245
+ tooltip?: ReactNode;
235
246
  /** Makes the slot a button, named `label`. */
236
247
  onPress?: MouseEventHandler<HTMLElement>;
237
248
  /** Makes the slot draggable. */
238
249
  onDragStart?: DragEventHandler<HTMLDivElement>;
239
250
  onDragEnd?: DragEventHandler<HTMLDivElement>;
240
251
  label?: string;
252
+ /** False leaves out the actions shown on hover. */
253
+ actions?: boolean;
241
254
  onUnfit?: () => void;
242
255
  onRemoveCharge?: () => void;
243
256
  onTogglePower?: () => void;
244
257
  }
245
- export declare function WheelSlot({ rack, angle, typeId, typeName, chargeTypeId, chargeable, state, activatable, available, preview, onPress, onDragStart, onDragEnd, label, onUnfit, onRemoveCharge, onTogglePower, className, style, ...props }: WheelSlotProps): import("react").JSX.Element;
258
+ export declare function WheelSlot({ rack, angle, typeId, typeName, chargeTypeId, chargeable, state, activatable, available, preview, tooltip, onPress, onDragStart, onDragEnd, label, actions: showActions, onUnfit, onRemoveCharge, onTogglePower, className, style, ...props }: WheelSlotProps): import("react").JSX.Element;
246
259
  //#endregion
247
260
  //#region src/primitives/Wheel/WheelHardpoints.d.ts
248
261
  interface Hardpoints {
@@ -271,6 +284,14 @@ interface WheelHullProps {
271
284
  }
272
285
  export declare function WheelHull({ typeId }: WheelHullProps): import("react").JSX.Element;
273
286
  //#endregion
287
+ //#region src/primitives/Wheel/WheelLink.d.ts
288
+ interface WheelLinkProps {
289
+ href: string;
290
+ text: string;
291
+ }
292
+ /** A link written along the top of the wheel's rim. */
293
+ export declare function WheelLink({ href, text }: WheelLinkProps): import("react").JSX.Element;
294
+ //#endregion
274
295
  //#region src/primitives/Stat/Stat.d.ts
275
296
  interface StatProps {
276
297
  /** Without one, the value still lines up with those that have one; `null` leaves that space out. */
@@ -318,9 +339,15 @@ export declare function CapacitorRing({ capacity, level, label }: CapacitorRingP
318
339
  //#region src/components/FittingWheel/FittingWheel.d.ts
319
340
  interface FittingWheelProps {
320
341
  label?: string;
342
+ /** Shows the fit without letting it be changed. */
343
+ readOnly?: boolean;
344
+ /** Leaves out the hardpoints, and the CPU, powergrid and calibration gauges and their scales. */
345
+ hideStats?: boolean;
346
+ /** Writes "generated by eveship.fit" along the top, also on eveship.fit. */
347
+ credit?: boolean;
321
348
  }
322
349
  /** The fitting wheel of the fit in the surrounding `EveShipFitProvider`. */
323
- export declare function FittingWheel({ label }: FittingWheelProps): import("react").JSX.Element;
350
+ export declare function FittingWheel({ label, readOnly, hideStats, credit }: FittingWheelProps): import("react").JSX.Element;
324
351
  //#endregion
325
352
  //#region src/components/FittingWindow/FittingWindow.d.ts
326
353
  interface FittingWindowProps {
@@ -329,9 +356,11 @@ interface FittingWindowProps {
329
356
  browser?: ReactNode;
330
357
  /** Like `ShipStatistics`; slid out by the Statistics button, which is only there with it. */
331
358
  statistics?: ReactNode;
359
+ /** Shows the fit without its name, warnings, history or anything to change it. */
360
+ preview?: boolean;
332
361
  }
333
362
  /** EVE's fitting window around the `FittingWheel`. */
334
- export declare function FittingWindow({ label, browser, statistics }: FittingWindowProps): import("react").JSX.Element;
363
+ export declare function FittingWindow({ label, browser, statistics, preview }: FittingWindowProps): import("react").JSX.Element;
335
364
  //#endregion
336
365
  //#region src/components/ItemBrowser/ItemBrowser.d.ts
337
366
  interface ItemBrowserProps {
@@ -384,4 +413,4 @@ interface FitPriceProps {
384
413
  }
385
414
  export declare function FitPrice({ price, change }: FitPriceProps): import("react").JSX.Element;
386
415
  //#endregion
387
- 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, WheelProps, WheelRack, WheelRackMarkerProps, WheelResource, WheelSlotProps };
416
+ 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 };