@liberfi.io/ui-perpetuals 0.2.16 → 0.2.18

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
@@ -12,7 +12,7 @@ declare global {
12
12
  };
13
13
  }
14
14
  }
15
- declare const _default: "0.2.16";
15
+ declare const _default: "0.2.18";
16
16
 
17
17
  /**
18
18
  * Trading pair symbol format
@@ -2012,15 +2012,17 @@ declare function useCoinInfo(symbol: string): UseCoinInfoReturnType;
2012
2012
  /**
2013
2013
  * Skeleton placeholder for {@link CoinInfoUI}.
2014
2014
  *
2015
- * Mirrors the real component's flex layout so the loading shell occupies
2016
- * exactly the same footprint (no layout jump on data arrival):
2015
+ * Mirrors the live widget's flex layout so the loading shell occupies
2016
+ * exactly the same footprint (no jump on data arrival):
2017
2017
  * `[price + 24h%] [Oracle] [24h Volume] [Open Interest] [Funding / Countdown]`
2018
2018
  *
2019
- * The container is intentionally transparent — coin-info renders inside
2020
- * the perpetuals chart column whose host page provides the background
2021
- * (e.g. `#000000` on the perpetuals page). A separate gray wash here
2022
- * would clash with that. Only the individual `Skeleton` cells carry the
2023
- * shimmer to indicate loading.
2019
+ * The container is intentionally transparent — coin-info renders inside the
2020
+ * perpetuals chart column whose host page provides the background (e.g.
2021
+ * `#000000` on the perpetuals page). A separate gray wash here would
2022
+ * clash with that.
2023
+ *
2024
+ * Shimmer styling is shared with the other perpetuals skeletons via
2025
+ * {@link ShimmerStyle} / {@link shimmerDelay}; see `../../internal/skeleton`.
2024
2026
  */
2025
2027
  declare function CoinInfoSkeletonsUI(): react_jsx_runtime.JSX.Element;
2026
2028
 
@@ -2257,6 +2259,12 @@ type UsePlaceOrderFormScriptResult = {
2257
2259
  accountValue: number;
2258
2260
  currentPosition?: number;
2259
2261
  maxLeverage: number;
2262
+ /**
2263
+ * Leverage currently configured on Hyperliquid for the active symbol's
2264
+ * position. `undefined` when the user has no open position for the
2265
+ * symbol (and therefore no per-asset leverage to read).
2266
+ */
2267
+ currentLeverage?: number;
2260
2268
  };
2261
2269
  declare function usePlaceOrderFormScript({ symbol, userAddress, maxLeverage: maxLeverageProp, onSuccess, onError, }: UsePlaceOrderFormScriptParams): UsePlaceOrderFormScriptResult;
2262
2270
 
@@ -2285,7 +2293,7 @@ type PlaceOrderFormUIProps = {
2285
2293
  */
2286
2294
  onAddFunds?: () => void;
2287
2295
  };
2288
- declare function PlaceOrderFormUI({ methods, side, orderType, onSideChange, onOrderTypeChange, onSubmit, isSubmitting, symbol, currentPrice, estimatedFee, liquidationPrice, availableMargin, accountValue, currentPosition, maxLeverage, onAddFunds, }: PlaceOrderFormUIProps): react_jsx_runtime.JSX.Element;
2296
+ declare function PlaceOrderFormUI({ methods, side, orderType, onSideChange, onOrderTypeChange, onSubmit, isSubmitting, symbol, currentPrice, estimatedFee, liquidationPrice, availableMargin, accountValue, currentPosition, maxLeverage: _maxLeverage, onAddFunds, }: PlaceOrderFormUIProps): react_jsx_runtime.JSX.Element;
2289
2297
 
2290
2298
  type PositionsWidgetProps = {
2291
2299
  userAddress?: string;
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@ declare global {
12
12
  };
13
13
  }
14
14
  }
15
- declare const _default: "0.2.16";
15
+ declare const _default: "0.2.18";
16
16
 
17
17
  /**
18
18
  * Trading pair symbol format
@@ -2012,15 +2012,17 @@ declare function useCoinInfo(symbol: string): UseCoinInfoReturnType;
2012
2012
  /**
2013
2013
  * Skeleton placeholder for {@link CoinInfoUI}.
2014
2014
  *
2015
- * Mirrors the real component's flex layout so the loading shell occupies
2016
- * exactly the same footprint (no layout jump on data arrival):
2015
+ * Mirrors the live widget's flex layout so the loading shell occupies
2016
+ * exactly the same footprint (no jump on data arrival):
2017
2017
  * `[price + 24h%] [Oracle] [24h Volume] [Open Interest] [Funding / Countdown]`
2018
2018
  *
2019
- * The container is intentionally transparent — coin-info renders inside
2020
- * the perpetuals chart column whose host page provides the background
2021
- * (e.g. `#000000` on the perpetuals page). A separate gray wash here
2022
- * would clash with that. Only the individual `Skeleton` cells carry the
2023
- * shimmer to indicate loading.
2019
+ * The container is intentionally transparent — coin-info renders inside the
2020
+ * perpetuals chart column whose host page provides the background (e.g.
2021
+ * `#000000` on the perpetuals page). A separate gray wash here would
2022
+ * clash with that.
2023
+ *
2024
+ * Shimmer styling is shared with the other perpetuals skeletons via
2025
+ * {@link ShimmerStyle} / {@link shimmerDelay}; see `../../internal/skeleton`.
2024
2026
  */
2025
2027
  declare function CoinInfoSkeletonsUI(): react_jsx_runtime.JSX.Element;
2026
2028
 
@@ -2257,6 +2259,12 @@ type UsePlaceOrderFormScriptResult = {
2257
2259
  accountValue: number;
2258
2260
  currentPosition?: number;
2259
2261
  maxLeverage: number;
2262
+ /**
2263
+ * Leverage currently configured on Hyperliquid for the active symbol's
2264
+ * position. `undefined` when the user has no open position for the
2265
+ * symbol (and therefore no per-asset leverage to read).
2266
+ */
2267
+ currentLeverage?: number;
2260
2268
  };
2261
2269
  declare function usePlaceOrderFormScript({ symbol, userAddress, maxLeverage: maxLeverageProp, onSuccess, onError, }: UsePlaceOrderFormScriptParams): UsePlaceOrderFormScriptResult;
2262
2270
 
@@ -2285,7 +2293,7 @@ type PlaceOrderFormUIProps = {
2285
2293
  */
2286
2294
  onAddFunds?: () => void;
2287
2295
  };
2288
- declare function PlaceOrderFormUI({ methods, side, orderType, onSideChange, onOrderTypeChange, onSubmit, isSubmitting, symbol, currentPrice, estimatedFee, liquidationPrice, availableMargin, accountValue, currentPosition, maxLeverage, onAddFunds, }: PlaceOrderFormUIProps): react_jsx_runtime.JSX.Element;
2296
+ declare function PlaceOrderFormUI({ methods, side, orderType, onSideChange, onOrderTypeChange, onSubmit, isSubmitting, symbol, currentPrice, estimatedFee, liquidationPrice, availableMargin, accountValue, currentPosition, maxLeverage: _maxLeverage, onAddFunds, }: PlaceOrderFormUIProps): react_jsx_runtime.JSX.Element;
2289
2297
 
2290
2298
  type PositionsWidgetProps = {
2291
2299
  userAddress?: string;