@skip-go/widget 1.2.0 → 1.2.1-alpha.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 +47 -12
- package/build/index.es.js +85 -17
- package/build/index.es.js.map +1 -1
- package/build/provider/assets.d.ts +1 -1
- package/build/store/swap-widget.d.ts +51 -0
- package/package.json +2 -3
- package/build/assets/fonts/ABCDiatype-Black.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-BlackItalic.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-Bold.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-BoldItalic.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-Heavy.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-HeavyItalic.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-Light.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-LightItalic.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-Medium.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-MediumItalic.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-Regular.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-RegularItalic.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-Thin.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-ThinItalic.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-Ultra.woff2 +0 -0
- package/build/assets/fonts/ABCDiatype-UltraItalic.woff2 +0 -0
- package/build/assets/fonts/ABCDiatypeMono-Medium.woff2 +0 -0
- package/build/assets/fonts/ABCDiatypeMono-Regular.woff2 +0 -0
- package/build/hooks/use-delete-injected-styles-from-react-hot-toast.d.ts +0 -1
- package/build/hooks/use-force-client-render.d.ts +0 -2
- package/build/hooks/use-inject-style-to-document-head.d.ts +0 -1
- package/build/hooks/use-inject-styles-to-head.d.ts +0 -1
- package/build/styles/importFonts.d.ts +0 -1
|
@@ -2,7 +2,7 @@ import { Asset } from '@skip-go/core';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
interface AssetsContext {
|
|
4
4
|
assets: Record<string, Asset[]>;
|
|
5
|
-
assetsByChainID: (chainID?: string) => Asset[];
|
|
5
|
+
assetsByChainID: (chainID?: string, filterDenoms?: string[]) => Asset[];
|
|
6
6
|
getAsset(denom: string, chainID: string): Asset | undefined;
|
|
7
7
|
getFeeAsset(chainID: string): Promise<Asset | undefined>;
|
|
8
8
|
getNativeAssets(): Asset[];
|
|
@@ -8,6 +8,33 @@ interface SwapWidgetStore {
|
|
|
8
8
|
onlyTestnet?: boolean;
|
|
9
9
|
defaultRoute?: DefaultRouteConfig;
|
|
10
10
|
routeConfig?: RouteConfig;
|
|
11
|
+
/**
|
|
12
|
+
* Filter chains and assets in selection
|
|
13
|
+
*
|
|
14
|
+
* Record<chainID, assetDenoms>
|
|
15
|
+
* if assetDenoms is undefined, all assets are allowed
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* {
|
|
19
|
+
* source: {
|
|
20
|
+
* 'noble-1': undefined,
|
|
21
|
+
* },
|
|
22
|
+
* destination: {
|
|
23
|
+
* 'cosmoshub-4': [
|
|
24
|
+
* 'uatom',
|
|
25
|
+
* 'ibc/2181AAB0218EAC24BC9F86BD1364FBBFA3E6E3FCC25E88E3E68C15DC6E752D86',
|
|
26
|
+
* ],
|
|
27
|
+
* 'agoric-3': [
|
|
28
|
+
* 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9',
|
|
29
|
+
* ],
|
|
30
|
+
* 'osmosis-1': undefined,
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
filter?: {
|
|
35
|
+
source?: Record<string, string[] | undefined>;
|
|
36
|
+
destination?: Record<string, string[] | undefined>;
|
|
37
|
+
};
|
|
11
38
|
}
|
|
12
39
|
export declare const swapWidgetDefaultValues: SwapWidgetStore;
|
|
13
40
|
export declare const useSwapWidgetUIStore: import("zustand").UseBoundStore<Omit<Omit<import("zustand").StoreApi<SwapWidgetStore>, "subscribe"> & {
|
|
@@ -51,6 +78,30 @@ export interface ConfigureSwapWidgetArgs {
|
|
|
51
78
|
onlyTestnet?: boolean;
|
|
52
79
|
defaultRoute?: DefaultRouteConfig;
|
|
53
80
|
routeConfig?: RouteConfig;
|
|
81
|
+
/**
|
|
82
|
+
* Filter chains and assets in selection
|
|
83
|
+
*
|
|
84
|
+
* Record<chainID, assetDenoms>
|
|
85
|
+
* if assetDenoms is undefined, all assets are allowed
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* {
|
|
89
|
+
* source: {
|
|
90
|
+
* 'noble-1': undefined,
|
|
91
|
+
* },
|
|
92
|
+
* destination: {
|
|
93
|
+
* 'cosmoshub-4': [
|
|
94
|
+
* 'uatom',
|
|
95
|
+
* 'ibc/2181AAB0218EAC24BC9F86BD1364FBBFA3E6E3FCC25E88E3E68C15DC6E752D86',
|
|
96
|
+
* ],
|
|
97
|
+
* 'agoric-3': [
|
|
98
|
+
* 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9',
|
|
99
|
+
* ],
|
|
100
|
+
* 'osmosis-1': undefined,
|
|
101
|
+
* }
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
filter?: SwapWidgetStore['filter'];
|
|
54
105
|
}
|
|
55
106
|
export declare const configureSwapWidget: (args: ConfigureSwapWidgetArgs) => void;
|
|
56
107
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skip-go/widget",
|
|
3
3
|
"description": "Swap widget",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.1-alpha.1",
|
|
5
5
|
"repository": "https://github.com/skip-mev/widget",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -61,8 +61,7 @@
|
|
|
61
61
|
"@radix-ui/react-scroll-area": "^1.0.5",
|
|
62
62
|
"@radix-ui/react-switch": "^1.0.3",
|
|
63
63
|
"@radix-ui/react-tooltip": "^1.0.7",
|
|
64
|
-
"@
|
|
65
|
-
"@skip-go/core": "0.3.0",
|
|
64
|
+
"@skip-go/core": "0.3.1-alpha.0",
|
|
66
65
|
"@solana/spl-token": "^0.4.6",
|
|
67
66
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
68
67
|
"@solana/wallet-adapter-wallets": "^0.19.32",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useDeleteInjectedStylesFromReactHotToast: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useInjectStyleToDocumentHead: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useInjectStylesToDocumentHead: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const fonts: string;
|