@dhedge/trading-widget 4.0.11 → 4.1.1
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/README.md +13 -9
- package/core-kit/const/currency.d.ts +1 -0
- package/core-kit/utils/formatter.d.ts +7 -0
- package/core-kit/utils/token.d.ts +1 -0
- package/index.cjs +10 -10
- package/index.js +3984 -3869
- package/package.json +1 -1
- package/style.css +1 -1
- package/trading-widget/components/common/balance/balance.d.ts +1 -1
- package/trading-widget/components/common/layout/index.d.ts +0 -2
- package/trading-widget/components/widget/widget-buttons/index.d.ts +1 -0
- package/trading-widget/components/widget/widget-buttons/limit-order-button/limit-order-button.d.ts +3 -0
- package/trading-widget/components/widget/widget-input/index.d.ts +3 -0
- package/trading-widget/components/widget/widget-input/input-arrow/input-arrow.d.ts +2 -0
- package/trading-widget/components/widget/widget-input/input-arrow/input-arrow.hooks.d.ts +3 -0
- package/trading-widget/components/widget/widget-input/receive-token-balance/receive-token-balance.d.ts +2 -0
- package/trading-widget/components/widget/widget-input/receive-token-balance/receive-token-balance.hooks.d.ts +4 -0
- package/trading-widget/components/widget/widget-input/send-token-balance/send-token-balance.d.ts +2 -0
- package/trading-widget/components/widget/widget-input/send-token-balance/send-token-balance.hooks.d.ts +4 -0
- package/trading-widget/components/widget/widget-input/widget-input.d.ts +2 -2
- package/trading-widget/components/withdraw/init-step/button/valid-init-withdraw-button/valid-init-withdraw-button.hooks.d.ts +0 -2
- package/trading-widget/providers/component-provider/component-provider.d.ts +1 -0
- package/trading-widget/providers/component-provider/component-provider.hooks.d.ts +1 -0
- package/trading-widget/providers/component-provider/component-provider.types.d.ts +4 -0
- package/trading-widget/providers/theme-provider/theme-provider.types.d.ts +15 -2
- package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +5 -3
- package/trading-widget/components/common/layout/balance/balance.d.ts +0 -2
- package/trading-widget/components/deposit/balance/balance.d.ts +0 -2
- package/trading-widget/components/deposit/balance/balance.hooks.d.ts +0 -4
- package/trading-widget/components/withdraw/init-step/balance/init-withdraw-balance.d.ts +0 -2
- package/trading-widget/components/withdraw/init-step/balance/init-withdraw-balance.hooks.d.ts +0 -4
package/README.md
CHANGED
|
@@ -454,12 +454,16 @@ path: `component.actionButton[name]`
|
|
|
454
454
|
|
|
455
455
|
path: `component.meta[name]`
|
|
456
456
|
|
|
457
|
-
> | name
|
|
458
|
-
> |
|
|
459
|
-
> | `size.gap`
|
|
460
|
-
> | `size.px`
|
|
461
|
-
> | `
|
|
462
|
-
> | `
|
|
457
|
+
> | name | type | default value | description |
|
|
458
|
+
> | --------------------------- | ------ | ------------------------------------ | --------------------------- |
|
|
459
|
+
> | `size.gap` | string | `global.size.gap` | Meta flex gap |
|
|
460
|
+
> | `size.px` | string | `global.size.spacer * 3` | Meta padding inline |
|
|
461
|
+
> | `size.fontSize` | string | `global.size.fontSizeXs` | Meta font size |
|
|
462
|
+
> | `size.lineHeight` | string | `global.size.lineHeightXs` | Meta line height |
|
|
463
|
+
> | `size.emphasisedFontSize` | string | `global.size.fontSizeSm` | Meta font size emphasised |
|
|
464
|
+
> | `size.emphasisedLineHeight` | string | `global.size.lineHeightSm` | Meta line height emphasised |
|
|
465
|
+
> | `color.linkTextColor` | string | `global.color.colorBgAccentFrom` | Meta link text color |
|
|
466
|
+
> | `color.panelBgHover` | string | `config.global.color.colorBgNeutral` | Meta panel hover bg |
|
|
463
467
|
|
|
464
468
|
###### Source: `packages/trading-widget/src/trading-widget/providers/theme-provider/theme-provider.tsx`
|
|
465
469
|
|
|
@@ -507,12 +511,9 @@ path: `component.meta[name]`
|
|
|
507
511
|
> | `lengthenLockup` | string | Lengthen lockup to remove entry fee | |
|
|
508
512
|
> | `deposit` | string | Buy | |
|
|
509
513
|
> | `withdraw` | string | Sell | |
|
|
510
|
-
> | `yourBalance` | string | Your Balance | |
|
|
511
514
|
> | `max` | string | Max | |
|
|
512
515
|
> | `allAssets` | string | All Assets | |
|
|
513
516
|
> | `all` | string | All | |
|
|
514
|
-
> | `payWith` | string | Pay with | |
|
|
515
|
-
> | `buyEstimated` | string | Buy (estimated) | |
|
|
516
517
|
> | `sell` | string | Sell | |
|
|
517
518
|
> | `receiveEstimated` | string | Receive (estimated) | |
|
|
518
519
|
> | `confirmInWallet` | string | Please confirm in wallet | |
|
|
@@ -582,6 +583,9 @@ path: `component.meta[name]`
|
|
|
582
583
|
> | `paidLabel` | string | Paid | |
|
|
583
584
|
> | `priceLabel` | string | Price | |
|
|
584
585
|
> | `transactionLabel` | string | Transaction | |
|
|
586
|
+
> | `stopOrder` | string | Stop Order | |
|
|
587
|
+
> | `send` | string | Send | |
|
|
588
|
+
> | `cooldown` | string | Cooldown | |
|
|
585
589
|
|
|
586
590
|
###### Source: `packages/trading-widget/src/trading-widget/providers/translation-provider/translation-provider.tsx`
|
|
587
591
|
|
|
@@ -20,3 +20,10 @@ export declare function formatBalanceInUsd(balance: string | undefined, tokenPri
|
|
|
20
20
|
balanceInUsdNumber: number;
|
|
21
21
|
};
|
|
22
22
|
export declare const formatVaultBalance: (balance: bigint | undefined, tokenPrice: bigint | undefined) => Balance;
|
|
23
|
+
export declare const truncateString: (str: string, first?: number, last?: number) => string;
|
|
24
|
+
export declare const formatTokenBalance: ({ balance, symbol, precision, truncateSymbol, }: {
|
|
25
|
+
balance: string;
|
|
26
|
+
symbol: string;
|
|
27
|
+
precision: number;
|
|
28
|
+
truncateSymbol?: boolean | undefined;
|
|
29
|
+
}) => string;
|