@eveshipfit/ui-ingame 1.6.0 → 1.8.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
@@ -37,6 +37,8 @@ interface TreeLeafProps {
37
37
  /** Shows the type's icon in front of the label. */
38
38
  typeId?: number;
39
39
  title?: string;
40
+ /** Only called once the tooltip has opened. */
41
+ renderTooltip?: () => ReactNode;
40
42
  onActivate?: () => void;
41
43
  /** Activates on a single click. */
42
44
  activateOnClick?: boolean;
@@ -47,7 +49,7 @@ interface TreeLeafProps {
47
49
  after?: ReactNode;
48
50
  }
49
51
  /** 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;
52
+ export declare function TreeLeaf({ label, typeId, title, renderTooltip, onActivate, activateOnClick, onHover, onDragStart, onDragEnd, after }: TreeLeafProps): import("react").JSX.Element;
51
53
  //#endregion
52
54
  //#region src/primitives/Icon/Icon.d.ts
53
55
  declare const textures: {
@@ -71,6 +73,7 @@ declare const textures: {
71
73
  checkmark: string;
72
74
  close: string;
73
75
  folder: string;
76
+ number: string;
74
77
  export: string;
75
78
  "fits-browser": string;
76
79
  "fits-personal": string;
@@ -107,6 +110,7 @@ declare const textures: {
107
110
  "arrow-right": string;
108
111
  "arrow-down": string;
109
112
  "arrow-up": string;
113
+ edit: string;
110
114
  price: string;
111
115
  "stat-turret-dps": string;
112
116
  "stat-alpha-strike": string;
@@ -158,9 +162,17 @@ export declare function TypeIcon({ typeId, size, marker, loading }: TypeIconProp
158
162
  type FilterToggleProps = ({
159
163
  icon: IconName;
160
164
  typeId?: undefined;
165
+ src?: undefined;
161
166
  } | {
162
167
  icon?: undefined;
163
168
  typeId: number;
169
+ src?: undefined;
170
+ } |
171
+ /** The URL of an image, like a market group's icon. */
172
+ {
173
+ icon?: undefined;
174
+ typeId?: undefined;
175
+ src: string | undefined;
164
176
  }) & {
165
177
  label: string;
166
178
  pressed?: boolean;
@@ -168,12 +180,12 @@ type FilterToggleProps = ({
168
180
  onPressedChange?: (pressed: boolean) => void;
169
181
  };
170
182
  /** One of the icons above EVE's lists that filter them. */
171
- export declare function FilterToggle({ icon, typeId, label, pressed, onPressedChange }: FilterToggleProps): import("react").JSX.Element;
183
+ export declare function FilterToggle({ icon, typeId, src, label, pressed, onPressedChange }: FilterToggleProps): import("react").JSX.Element;
172
184
  //#endregion
173
185
  //#region src/primitives/Tooltip/Tooltip.d.ts
174
186
  interface TooltipProps {
175
- /** Without one, there is no tooltip. */
176
- label?: ReactNode;
187
+ /** Without one, there is no tooltip; a function is only called once the tooltip has opened. */
188
+ label?: ReactNode | (() => ReactNode);
177
189
  /** The tooltip points at the first element. */
178
190
  children: ReactNode;
179
191
  }
@@ -254,8 +266,10 @@ interface WheelSlotProps extends HTMLAttributes<HTMLDivElement> {
254
266
  onUnfit?: () => void;
255
267
  onRemoveCharge?: () => void;
256
268
  onTogglePower?: () => void;
269
+ onShowInfo?: (anchor: HTMLElement) => void;
270
+ onShowChargeInfo?: (anchor: HTMLElement) => void;
257
271
  }
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;
272
+ 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;
259
273
  //#endregion
260
274
  //#region src/primitives/Wheel/WheelHardpoints.d.ts
261
275
  interface Hardpoints {
@@ -307,11 +321,13 @@ export declare function Stat({ icon, label, tooltip, children }: StatProps): imp
307
321
  interface StatsSectionProps {
308
322
  title: string;
309
323
  summary?: ReactNode;
324
+ /** A control in the header, before `summary`. */
325
+ action?: ReactNode;
310
326
  /** How many `Stat`s go next to each other. */
311
327
  columns?: 1 | 2;
312
328
  children: ReactNode;
313
329
  }
314
- export declare function StatsSection({ title, summary, columns, children }: StatsSectionProps): import("react").JSX.Element;
330
+ export declare function StatsSection({ title, summary, action, columns, children }: StatsSectionProps): import("react").JSX.Element;
315
331
  //#endregion
316
332
  //#region src/primitives/ResistanceBar/ResistanceBar.d.ts
317
333
  type DamageType = "em" | "thermal" | "kinetic" | "explosive";
@@ -358,15 +374,17 @@ interface FittingWindowProps {
358
374
  statistics?: ReactNode;
359
375
  /** Shows the fit without its name, warnings, history or anything to change it. */
360
376
  preview?: boolean;
377
+ /** Shows an empty wheel with this text, and nothing of the fit. */
378
+ placeholder?: string;
361
379
  }
362
380
  /** EVE's fitting window around the `FittingWheel`. */
363
- export declare function FittingWindow({ label, browser, statistics, preview }: FittingWindowProps): import("react").JSX.Element;
381
+ export declare function FittingWindow({ label, browser, statistics: givenStatistics, preview, placeholder }: FittingWindowProps): import("react").JSX.Element;
364
382
  //#endregion
365
383
  //#region src/components/ItemBrowser/ItemBrowser.d.ts
366
384
  interface ItemBrowserProps {
367
385
  label?: string;
368
386
  }
369
- /** EVE's browser of hulls and fits, modules and charges, left of the fitting wheel. */
387
+ /** EVE's browser of hulls and fits, modules, charges, and implants, left of the fitting wheel. */
370
388
  export declare function ItemBrowser({ label }: ItemBrowserProps): import("react").JSX.Element;
371
389
  //#endregion
372
390
  //#region src/components/ShipStatistics/ShipStatistics.d.ts