@metamask-previews/perps-controller 22.3.0-preview-270326558 → 23.0.0-preview-c72f8b1

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.
@@ -161,6 +161,11 @@ export type PerpsFiatFormatOptions = PerpsDisplayFormatOptions & {
161
161
  * locale comes from `formatters`.
162
162
  */
163
163
  locale?: string;
164
+ /**
165
+ * `false` formats the number without the currency symbol, e.g. chart axis
166
+ * and crosshair labels: `87,123` (default `true`).
167
+ */
168
+ symbol?: boolean;
164
169
  };
165
170
  /**
166
171
  * Formats a fiat value (balance, price, fee, position value) as currency with
@@ -178,14 +183,17 @@ export type PerpsFiatFormatOptions = PerpsDisplayFormatOptions & {
178
183
  * @param options.currency - Currency code (default: 'USD').
179
184
  * @param options.stripTrailingZeros - Strip trailing zeros from output. `false` keeps them; otherwise the range decides (default: strip).
180
185
  * @param options.locale - Locale passed to a range's `customFormat` only (default `en-US`).
186
+ * @param options.symbol - `false` omits the currency symbol, for chart labels (default `true`).
181
187
  * @returns Formatted currency string, or `PERPS_CONSTANTS.FallbackPriceDisplay`
182
- * (`$---`) for a missing value.
188
+ * (`$---`) for a missing value (`PERPS_CONSTANTS.FallbackDataDisplay`, `--`,
189
+ * without the symbol).
183
190
  * @example
184
191
  * formatPerpsFiat(1234.56) => "$1,234.56"
185
192
  * formatPerpsFiat(1250) => "$1,250" // fiat-style stripping of .00
186
193
  * formatPerpsFiat(-0.004) => "-<$0.01" // below the range threshold
187
194
  * formatPerpsFiat(1234.5, { formatters: createFormatters({ locale: 'de' }) }) => "1.234,50 $"
188
195
  * formatPerpsFiat(12345.67, { ranges: PRICE_RANGES_UNIVERSAL }) => "$12,346"
196
+ * formatPerpsFiat(2480.37, { ranges: PRICE_RANGES_UNIVERSAL, symbol: false }) => "2,480.4"
189
197
  * formatPerpsFiat(undefined) => "$---"
190
198
  */
191
199
  export declare const formatPerpsFiat: (balance: string | number | null | undefined, options?: PerpsFiatFormatOptions) => string;
@@ -227,6 +235,16 @@ export declare const formatPositionSize: (size: string | number | null | undefin
227
235
  * @example formatPnl(undefined) => "$---"
228
236
  */
229
237
  export declare const formatPnl: (pnl: string | number | null | undefined, options?: PerpsDisplayFormatOptions) => string;
238
+ /**
239
+ * Options for `formatPercentage`.
240
+ */
241
+ export type PerpsPercentageFormatOptions = PerpsDisplayFormatOptions & {
242
+ /**
243
+ * Drop trailing fraction zeros, showing at most `decimals`: TWAP progress
244
+ * `25%`, `33.33%` (default `false`: always `decimals`).
245
+ */
246
+ stripTrailingZeros?: boolean;
247
+ };
230
248
  /**
231
249
  * Formats a percentage value (change, RoE, fee rate, slippage) with a sign
232
250
  * prefix and locale separators. Pick the precision from
@@ -235,7 +253,8 @@ export declare const formatPnl: (pnl: string | number | null | undefined, option
235
253
  * @param value - Raw percentage value (e.g., 5.25 for 5.25%, not 0.0525)
236
254
  * @param decimalsOrOptions - Decimal places (default:
237
255
  * `PERPS_DISPLAY_PRECISION.Percentage`, 2), or options: `decimals`,
238
- * `formatters` (default `en-US`) and `sign` (default `always`).
256
+ * `formatters` (default `en-US`), `sign` (default `always`) and
257
+ * `stripTrailingZeros` (default `false`).
239
258
  * @returns Format: "+X.XX%" or "-X.XX%", or
240
259
  * `PERPS_CONSTANTS.FallbackPercentageDisplay` (`--%`) for a missing value.
241
260
  * @example formatPercentage(5.25) => "+5.25%"
@@ -244,9 +263,10 @@ export declare const formatPnl: (pnl: string | number | null | undefined, option
244
263
  * @example formatPercentage(10.25, { decimals: PERPS_DISPLAY_PRECISION.RoePercent }) => "+10.3%"
245
264
  * @example formatPercentage(0.0021, { decimals: PERPS_DISPLAY_PRECISION.SlippageEstimatePercent, sign: 'never' }) => "0.0021%"
246
265
  * @example formatPercentage(-12345.67, { decimals: 1, formatters: createFormatters({ locale: 'es' }) }) => "-12.345,7%"
266
+ * @example formatPercentage(25, { decimals: PERPS_DISPLAY_PRECISION.TwapProgressPercent, stripTrailingZeros: true, sign: 'never' }) => "25%"
247
267
  * @example formatPercentage(undefined) => "--%"
248
268
  */
249
- export declare const formatPercentage: (value: string | number | null | undefined, decimalsOrOptions?: number | PerpsDisplayFormatOptions) => string;
269
+ export declare const formatPercentage: (value: string | number | null | undefined, decimalsOrOptions?: number | PerpsPercentageFormatOptions) => string;
250
270
  /**
251
271
  * Options for `formatFundingRate`.
252
272
  */
@@ -273,4 +293,206 @@ export type PerpsFundingRateFormatOptions = PerpsDisplayFormatOptions & {
273
293
  * @example formatFundingRate(undefined) => "--%"
274
294
  */
275
295
  export declare const formatFundingRate: (value?: string | number | null, options?: PerpsFundingRateFormatOptions) => string;
296
+ /**
297
+ * Formats a fee rate in basis points with the locale's separators.
298
+ *
299
+ * @param rate - Fee rate as a decimal (0.00045 for 0.045%).
300
+ * @param options - `formatters` (default `en-US`), `decimals` (at most,
301
+ * default `PERPS_DISPLAY_PRECISION.FeeBps`, 2; trailing zeros are dropped) and
302
+ * `sign` (default `auto`).
303
+ * @returns Format: "X.XX bps", or `PERPS_CONSTANTS.FallbackDataDisplay` (`--`)
304
+ * for a missing rate.
305
+ * @example formatFeeBps(0.00045) => "4.5 bps"
306
+ * @example formatFeeBps(0.000144) => "1.44 bps"
307
+ * @example formatFeeBps(0.0007) => "7 bps"
308
+ * @example formatFeeBps(0.00045, { formatters: createFormatters({ locale: 'de' }) }) => "4,5 bps"
309
+ * @example formatFeeBps(undefined) => "--"
310
+ */
311
+ export declare const formatFeeBps: (rate: string | number | null | undefined, options?: PerpsDisplayFormatOptions) => string;
312
+ /**
313
+ * Formats how far, in percent of the entry price, the price must move to
314
+ * reach the liquidation price.
315
+ *
316
+ * @param entryPrice - Entry (or mark) price.
317
+ * @param liquidationPrice - Liquidation price.
318
+ * @param options - `formatters` (default `en-US`), `decimals` (default
319
+ * `PERPS_DISPLAY_PRECISION.LiquidationDistancePercent`, 2) and `sign`
320
+ * (default `never`).
321
+ * @returns Format: "X.XX%", or `PERPS_CONSTANTS.FallbackPercentageDisplay`
322
+ * (`--%`) when either price is missing or not positive.
323
+ * @example formatLiquidationDistance(100, 70) => "30.00%"
324
+ * @example formatLiquidationDistance(100, '130') => "30.00%"
325
+ * @example formatLiquidationDistance(100, 70, { formatters: createFormatters({ locale: 'de' }) }) => "30,00%"
326
+ * @example formatLiquidationDistance(100, undefined) => "--%"
327
+ */
328
+ export declare const formatLiquidationDistance: (entryPrice: string | number | null | undefined, liquidationPrice: string | number | null | undefined, options?: PerpsDisplayFormatOptions) => string;
329
+ /**
330
+ * The value a compact number stands for, which sets its unit and precision.
331
+ *
332
+ * - `volume`: USD volume or open interest: `$1.23M`, `$123K`, `$999.50`.
333
+ * - `orderBookUsd`: USD order book size or total: `$2.1K` from 1,000 up,
334
+ * `PRICE_RANGES_UNIVERSAL` below.
335
+ * - `orderBookSize`: base-asset order book size or total: `604.9K` from 1,000
336
+ * up, `formatPositionSize` with `szDecimals` below.
337
+ */
338
+ export type PerpsCompactField = 'volume' | 'orderBookUsd' | 'orderBookSize';
339
+ /**
340
+ * Options for `formatPerpsCompact`.
341
+ */
342
+ export type PerpsCompactFormatOptions = PerpsDisplayFormatOptions & {
343
+ /** The value being shown, which sets the unit and precision. */
344
+ field: PerpsCompactField;
345
+ /** Asset size decimals for an `orderBookSize` value below 1,000. */
346
+ szDecimals?: number;
347
+ };
348
+ /**
349
+ * Formats a large number with a magnitude suffix (`K`, `M`, `B`, `T`), with
350
+ * the unit and precision of the field it shows.
351
+ *
352
+ * @param value - Raw value (USD for `volume` and `orderBookUsd`, base asset
353
+ * for `orderBookSize`).
354
+ * @param options - Formatting options.
355
+ * @param options.field - `volume`, `orderBookUsd` or `orderBookSize`.
356
+ * @param options.formatters - Locale-bound formatters, e.g. `createFormatters({ locale })` from `@metamask/client-utils` (default `en-US`).
357
+ * @param options.decimals - Decimals of abbreviated values, overriding the
358
+ * field's `PERPS_DISPLAY_PRECISION` (`VolumeCompact`, `VolumeCompactThousands`
359
+ * or `OrderBookCompact`).
360
+ * @param options.sign - Sign display (default `auto`).
361
+ * @param options.szDecimals - Asset size decimals for an `orderBookSize` value below 1,000.
362
+ * @returns The compact value, or `PERPS_CONSTANTS.FallbackPriceDisplay`
363
+ * (`$---`, `--` for `orderBookSize`) for a missing value.
364
+ * @example formatPerpsCompact(1234567, { field: 'volume' }) => "$1.23M"
365
+ * @example formatPerpsCompact(123456, { field: 'volume' }) => "$123K"
366
+ * @example formatPerpsCompact(999.5, { field: 'volume' }) => "$999.50"
367
+ * @example formatPerpsCompact(1234567, { field: 'volume', formatters: createFormatters({ locale: 'de' }) }) => "1,23M $"
368
+ * @example formatPerpsCompact(2100, { field: 'orderBookUsd' }) => "$2.1K"
369
+ * @example formatPerpsCompact(604900, { field: 'orderBookSize' }) => "604.9K"
370
+ */
371
+ export declare const formatPerpsCompact: (value: string | number | null | undefined, options: PerpsCompactFormatOptions) => string;
372
+ /**
373
+ * How every price of an order book ladder renders: divided by `divisor`, with
374
+ * `decimals` fixed decimals and `suffix` after the number.
375
+ */
376
+ export type PerpsOrderBookPriceFormat = {
377
+ /** Value each price is divided by before formatting. */
378
+ divisor: number;
379
+ /** Magnitude suffix appended after the number, or an empty string. */
380
+ suffix: string;
381
+ /** Fixed decimals shown after dividing. */
382
+ decimals: number;
383
+ };
384
+ /**
385
+ * Options for `getPerpsOrderBookPriceFormat`.
386
+ */
387
+ export type PerpsOrderBookLadderOptions = {
388
+ /** Ladder mid price, which sets the magnitude of an abbreviation. */
389
+ midPrice?: number | null;
390
+ /** Asset size decimals from the market metadata. */
391
+ szDecimals?: number;
392
+ };
393
+ /**
394
+ * Options for `formatPerpsOrderBookPrice`.
395
+ */
396
+ export type PerpsOrderBookPriceFormatOptions = {
397
+ /**
398
+ * Locale-bound formatters, e.g. `createFormatters({ locale })` from
399
+ * `@metamask/client-utils`. Default: `en-US`.
400
+ */
401
+ formatters?: PerpsIntlFormatters;
402
+ /** `false` omits the currency symbol (default `true`). */
403
+ symbol?: boolean;
404
+ };
405
+ /**
406
+ * Formats an order book price with the ladder format from
407
+ * `getPerpsOrderBookPriceFormat`, keeping trailing zeros so every row has the
408
+ * same width.
409
+ *
410
+ * @param price - Raw price.
411
+ * @param format - Ladder format, or null for `PRICE_RANGES_UNIVERSAL`.
412
+ * @param options - `formatters` (default `en-US`) and `symbol` (default `true`).
413
+ * @returns The price, or `PERPS_CONSTANTS.FallbackPriceDisplay` (`$---`; `--`
414
+ * without the symbol) for a missing price.
415
+ * @example formatPerpsOrderBookPrice(87000, { divisor: 1000, suffix: 'K', decimals: 0 }) => "$87K"
416
+ * @example formatPerpsOrderBookPrice(33.1, { divisor: 1, suffix: '', decimals: 3 }) => "$33.100"
417
+ * @example formatPerpsOrderBookPrice(87000, { divisor: 1, suffix: '', decimals: 0 }, { symbol: false }) => "87,000"
418
+ */
419
+ export declare const formatPerpsOrderBookPrice: (price: string | number | null | undefined, format: PerpsOrderBookPriceFormat | null, options?: PerpsOrderBookPriceFormatOptions) => string;
420
+ /**
421
+ * Resolves the one price format an order book ladder renders with, from the
422
+ * selected price grouping (tick) increment.
423
+ *
424
+ * Decimals match the grouping, capped at the asset's price precision
425
+ * (`PERPS_DISPLAY_PRECISION.MaxPriceDecimals − szDecimals`), so neighbouring
426
+ * levels never collapse into the same string and every row has the same
427
+ * width. The ladder is abbreviated (`$87K`) at the magnitude of `midPrice`
428
+ * only when that needs at most
429
+ * `PERPS_DISPLAY_PRECISION.OrderBookAbbreviatedPriceMax` decimals and is no
430
+ * longer than the plain form.
431
+ *
432
+ * @param grouping - Selected price grouping increment, or null when unknown.
433
+ * @param options - Ladder context.
434
+ * @param options.midPrice - Ladder mid price, which sets the magnitude.
435
+ * @param options.szDecimals - Asset size decimals from the market metadata.
436
+ * @returns The ladder format, or null to use `PRICE_RANGES_UNIVERSAL`.
437
+ * @example getPerpsOrderBookPriceFormat(1000, { midPrice: 87000, szDecimals: 5 }) => { divisor: 1000, suffix: 'K', decimals: 0 }
438
+ * @example getPerpsOrderBookPriceFormat(1, { midPrice: 87000, szDecimals: 5 }) => { divisor: 1, suffix: '', decimals: 0 }
439
+ * @example getPerpsOrderBookPriceFormat(0.001, { midPrice: 33.1, szDecimals: 2 }) => { divisor: 1, suffix: '', decimals: 3 }
440
+ */
441
+ export declare const getPerpsOrderBookPriceFormat: (grouping: number | null | undefined, options?: PerpsOrderBookLadderOptions) => PerpsOrderBookPriceFormat | null;
442
+ /**
443
+ * Options for `formatPerpsUsdInput`.
444
+ */
445
+ export type PerpsUsdInputFormatOptions = {
446
+ /**
447
+ * Locale-bound formatters, e.g. `createFormatters({ locale })` from
448
+ * `@metamask/client-utils`. Default: `en-US`.
449
+ */
450
+ formatters?: PerpsIntlFormatters;
451
+ /** Most fraction digits (default `PERPS_DISPLAY_PRECISION.UsdInput`, 2). */
452
+ decimals?: number;
453
+ /**
454
+ * Most digits, integer and fraction together (default
455
+ * `PERPS_DISPLAY_PRECISION.UsdInputMaxDigits`, 9; at most 15).
456
+ */
457
+ maxDigits?: number;
458
+ /**
459
+ * What `input` is: `typed` text in the locale's format, e.g. the field's
460
+ * display plus a keystroke (default), or a stored canonical `value` with a
461
+ * `.` decimal separator, e.g. a preset amount.
462
+ */
463
+ source?: 'typed' | 'value';
464
+ };
465
+ /**
466
+ * A masked USD input: `value` to store and parse, `display` to show.
467
+ */
468
+ export type PerpsUsdInput = {
469
+ /** Canonical amount with a `.` decimal separator: `1234567.5`. */
470
+ value: string;
471
+ /** The amount with the locale's grouping and decimal separator. */
472
+ display: string;
473
+ };
474
+ /**
475
+ * Masks a USD amount input: keeps digits and one decimal separator, drops
476
+ * leading zeros, caps the decimals and the number of digits, and groups the
477
+ * integer part for the locale. Passing `display` back in with the next
478
+ * keystroke returns the same amount.
479
+ *
480
+ * Typed text reads the locale's decimal separator as the decimal. A `.` also
481
+ * reads as the decimal where the locale uses `.` for neither (`fr`: `12.5` is
482
+ * 12.5); where `.` groups thousands (`de`, `es`), it stays a separator, so
483
+ * `1.2345` is 12345.
484
+ *
485
+ * @param input - Typed text, or a stored canonical value with `source: 'value'`.
486
+ * @param options - `formatters` (default `en-US`), `decimals` (default
487
+ * `PERPS_DISPLAY_PRECISION.UsdInput`, 2), `maxDigits` (default
488
+ * `PERPS_DISPLAY_PRECISION.UsdInputMaxDigits`, 9) and `source` (default
489
+ * `typed`).
490
+ * @returns The canonical `value` and the locale `display`; both are empty for
491
+ * input without digits.
492
+ * @example formatPerpsUsdInput('0012.345') => { value: '12.34', display: '12.34' }
493
+ * @example formatPerpsUsdInput('1234.') => { value: '1234.', display: '1,234.' }
494
+ * @example formatPerpsUsdInput('1.2345', { formatters: createFormatters({ locale: 'de' }) }) => { value: '12345', display: '12.345' }
495
+ * @example formatPerpsUsdInput('1234567.5', { formatters: createFormatters({ locale: 'de' }), source: 'value' }) => { value: '1234567.5', display: '1.234.567,5' }
496
+ */
497
+ export declare const formatPerpsUsdInput: (input: string, options?: PerpsUsdInputFormatOptions) => PerpsUsdInput;
276
498
  //# sourceMappingURL=perpsFormatters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"perpsFormatters.d.ts","sourceRoot":"","sources":["../../src/utils/perpsFormatters.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,yDAAyD;IACzD,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC;IACxE,kEAAkE;IAClE,cAAc,CACZ,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,GACjC,MAAM,CAAC;CACX,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;;OAIG;IACH,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM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