@orderly.network/hooks 2.11.1-alpha.0 → 2.11.2-alpha.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,7 +37,7 @@ declare global {
37
37
  };
38
38
  }
39
39
  }
40
- declare const _default: "2.11.1-alpha.0";
40
+ declare const _default: "2.11.2-alpha.0";
41
41
 
42
42
  declare const fetcher: (url: string, init: RequestInit | undefined, queryOptions: useQueryOptions<any>) => Promise<any>;
43
43
  type useQueryOptions<T> = SWRConfiguration & {
@@ -1909,6 +1909,7 @@ declare const useStatisticsDaily: (params: QueryParams, options?: {
1909
1909
 
1910
1910
  type UserStatistics = {
1911
1911
  perp_trading_volume_last_24_hours?: number;
1912
+ perp_trading_volume_today?: number;
1912
1913
  };
1913
1914
  declare const useUserStatistics: () => readonly [UserStatistics | null, {
1914
1915
  readonly isValidating: boolean;
@@ -2251,7 +2252,7 @@ type posterDataSource = {
2251
2252
  position: {
2252
2253
  symbol: string;
2253
2254
  side: "LONG" | "SHORT";
2254
- marginMode?: "isolated" | "cross";
2255
+ marginMode?: MarginMode;
2255
2256
  /**
2256
2257
  * The leverage of the position
2257
2258
  */
package/dist/index.d.ts CHANGED
@@ -37,7 +37,7 @@ declare global {
37
37
  };
38
38
  }
39
39
  }
40
- declare const _default: "2.11.1-alpha.0";
40
+ declare const _default: "2.11.2-alpha.0";
41
41
 
42
42
  declare const fetcher: (url: string, init: RequestInit | undefined, queryOptions: useQueryOptions<any>) => Promise<any>;
43
43
  type useQueryOptions<T> = SWRConfiguration & {
@@ -1909,6 +1909,7 @@ declare const useStatisticsDaily: (params: QueryParams, options?: {
1909
1909
 
1910
1910
  type UserStatistics = {
1911
1911
  perp_trading_volume_last_24_hours?: number;
1912
+ perp_trading_volume_today?: number;
1912
1913
  };
1913
1914
  declare const useUserStatistics: () => readonly [UserStatistics | null, {
1914
1915
  readonly isValidating: boolean;
@@ -2251,7 +2252,7 @@ type posterDataSource = {
2251
2252
  position: {
2252
2253
  symbol: string;
2253
2254
  side: "LONG" | "SHORT";
2254
- marginMode?: "isolated" | "cross";
2255
+ marginMode?: MarginMode;
2255
2256
  /**
2256
2257
  * The leverage of the position
2257
2258
  */
package/dist/index.js CHANGED
@@ -64,9 +64,9 @@ var __export = (target, all) => {
64
64
  // src/version.ts
65
65
  if (typeof window !== "undefined") {
66
66
  window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
67
- window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.11.1-alpha.0";
67
+ window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.11.2-alpha.0";
68
68
  }
69
- var version_default = "2.11.1-alpha.0";
69
+ var version_default = "2.11.2-alpha.0";
70
70
  var fetcher = (url, init2 = {}, queryOptions) => net.get(url, init2, queryOptions?.formatter);
71
71
  var noCacheConfig = {
72
72
  dedupingInterval: 0,
@@ -12705,6 +12705,9 @@ var DataPaint = class extends BasePaint {
12705
12705
  this.transformTop = 0;
12706
12706
  this.QRCODE_SIZE = 56;
12707
12707
  }
12708
+ formatMarginMode(marginMode) {
12709
+ return marginMode === types.MarginMode.ISOLATED ? "Isolated" : "Cross";
12710
+ }
12708
12711
  async draw(options) {
12709
12712
  const needDrawDetails = Array.isArray(options.data?.position?.informations) && (options.data?.position?.informations?.length ?? 0) > 0;
12710
12713
  const hasReferral = this.hasReferral(options);
@@ -12804,7 +12807,7 @@ var DataPaint = class extends BasePaint {
12804
12807
  });
12805
12808
  }
12806
12809
  left += (prevElementBoundingBox.width ?? 0) + this._ratio(7);
12807
- const marginModeText = marginMode.charAt(0).toUpperCase() + marginMode.slice(1);
12810
+ const marginModeText = this.formatMarginMode(marginMode);
12808
12811
  prevElementBoundingBox = this._drawText(marginModeText, {
12809
12812
  color: layout.color,
12810
12813
  left,