@skip-go/widget 1.3.1 → 2.0.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 +7 -3
- package/build/index.es.js +325 -233
- package/build/index.es.js.map +1 -1
- package/build/provider/index.d.ts +0 -2
- package/build/store/swap-widget.d.ts +0 -9
- package/build/ui/AssetSelect/AssetSelectContent.d.ts +5 -0
- package/build/ui/StyledComponents/Buttons.d.ts +3 -0
- package/build/ui/StyledComponents/Input.d.ts +2 -0
- package/build/ui/StyledComponents/Theme.d.ts +4 -0
- package/build/ui/Widget.d.ts +6 -1
- package/build/ui/WithStyledShadowDom.d.ts +4 -0
- package/build/ui/index.d.ts +5 -1
- package/build/ui/theme.d.ts +20 -0
- package/package.json +4 -3
- package/build/hooks/use-fix-radix-ui-wheel-event.d.ts +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SkipRouterOptions } from '@skip-go/core';
|
|
3
|
-
import { ToasterProps } from 'react-hot-toast';
|
|
4
3
|
import { DefaultRouteConfig } from '../hooks/use-swap-widget';
|
|
5
4
|
import { RouteConfig } from '../hooks/use-route';
|
|
6
5
|
interface WalletProviderProps {
|
|
@@ -12,7 +11,6 @@ export interface WidgetConfig {
|
|
|
12
11
|
}
|
|
13
12
|
export interface SwapWidgetProviderProps extends SkipAPIProviderProps {
|
|
14
13
|
children: React.ReactNode;
|
|
15
|
-
toasterProps?: ToasterProps;
|
|
16
14
|
}
|
|
17
15
|
export interface SkipAPIProviderProps {
|
|
18
16
|
children: React.ReactNode;
|
|
@@ -2,9 +2,6 @@ import { DefaultRouteConfig } from '../hooks/use-swap-widget';
|
|
|
2
2
|
import { RouteConfig } from '../hooks/use-route';
|
|
3
3
|
import { PersistOptions } from 'zustand/middleware';
|
|
4
4
|
interface SwapWidgetStore {
|
|
5
|
-
colors: {
|
|
6
|
-
primary?: string;
|
|
7
|
-
};
|
|
8
5
|
onlyTestnet?: boolean;
|
|
9
6
|
defaultRoute?: DefaultRouteConfig;
|
|
10
7
|
routeConfig?: RouteConfig;
|
|
@@ -57,12 +54,6 @@ export declare const useSwapWidgetUIStore: import("zustand").UseBoundStore<Omit<
|
|
|
57
54
|
};
|
|
58
55
|
}>;
|
|
59
56
|
export interface ConfigureSwapWidgetArgs {
|
|
60
|
-
colors?: {
|
|
61
|
-
/**
|
|
62
|
-
* @default '#FF486E'
|
|
63
|
-
*/
|
|
64
|
-
primary?: string;
|
|
65
|
-
};
|
|
66
57
|
settings?: {
|
|
67
58
|
/**
|
|
68
59
|
* gas amount for validation
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as ScrollArea from '@radix-ui/react-scroll-area';
|
|
1
3
|
import { Asset } from '@skip-go/core';
|
|
2
4
|
interface Props {
|
|
3
5
|
assets?: Asset[];
|
|
@@ -9,3 +11,6 @@ interface Props {
|
|
|
9
11
|
}
|
|
10
12
|
declare function AssetSelectContent({ assets, balances, onChange, onClose, showChainInfo, isBalancesLoading, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export default AssetSelectContent;
|
|
14
|
+
export declare const StyledScrollAreaRoot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<ScrollArea.ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
16
|
+
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<ScrollArea.ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledThemedButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
3
|
+
export declare const StyledHighlightButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledSearchInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledThemedDiv: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const StyledBrandDiv: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const StyledBorderDiv: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
package/build/ui/Widget.d.ts
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ToasterProps } from 'react-hot-toast';
|
|
3
|
+
export type SwapWidgetUIProps = Pick<React.HTMLAttributes<HTMLDivElement>, 'className' | 'style'> & {
|
|
4
|
+
toasterProps?: ToasterProps;
|
|
5
|
+
};
|
|
6
|
+
export declare const SwapWidgetUI: ({ className, style, toasterProps, }: SwapWidgetUIProps) => import("react/jsx-runtime").JSX.Element;
|
package/build/ui/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SwapWidgetProviderProps } from '../provider';
|
|
3
3
|
import { ConfigureSwapWidgetArgs } from '../store/swap-widget';
|
|
4
|
-
|
|
4
|
+
import { SwapWidgetUIProps } from './Widget';
|
|
5
|
+
import { PartialTheme } from './theme';
|
|
6
|
+
export type SwapWidgetWithoutProvidersProps = SwapWidgetUIProps & ConfigureSwapWidgetArgs & {
|
|
7
|
+
theme?: PartialTheme;
|
|
8
|
+
};
|
|
5
9
|
export type SwapWidgetProps = SwapWidgetWithoutProvidersProps & Partial<SwapWidgetProviderProps>;
|
|
6
10
|
export declare const SwapWidgetWithoutProviders: React.FC<SwapWidgetWithoutProvidersProps>;
|
|
7
11
|
export declare const SwapWidget: React.FC<SwapWidgetProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import 'styled-components';
|
|
2
|
+
export declare const defaultTheme: {
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
textColor: string;
|
|
5
|
+
borderColor: string;
|
|
6
|
+
brandColor: string;
|
|
7
|
+
highlightColor: string;
|
|
8
|
+
};
|
|
9
|
+
export type PartialTheme = Partial<Theme> | undefined;
|
|
10
|
+
export type Theme = {
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
textColor: string;
|
|
13
|
+
borderColor: string;
|
|
14
|
+
brandColor: string;
|
|
15
|
+
highlightColor: string;
|
|
16
|
+
};
|
|
17
|
+
declare module 'styled-components' {
|
|
18
|
+
interface DefaultTheme extends Theme {
|
|
19
|
+
}
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skip-go/widget",
|
|
3
3
|
"description": "Swap widget",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"repository": "https://github.com/skip-mev/widget",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
],
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": "17.x || 18.x",
|
|
27
|
-
"react-dom": "17.x || 18.x"
|
|
27
|
+
"react-dom": "17.x || 18.x",
|
|
28
|
+
"styled-components": "^6.0.0",
|
|
29
|
+
"stylis": "^4.0.0"
|
|
28
30
|
},
|
|
29
31
|
"resolutions": {
|
|
30
32
|
"@cosmos-kit/cosmostation-extension": "^2.7.10",
|
|
@@ -72,7 +74,6 @@
|
|
|
72
74
|
"match-sorter": "^6.3.4",
|
|
73
75
|
"react-hot-toast": "^2.4.1",
|
|
74
76
|
"react-icons": "^5.2.1",
|
|
75
|
-
"react-shadow-scope": "^1.0.5",
|
|
76
77
|
"tailwind-merge": "^2.3.0",
|
|
77
78
|
"viem": "2.x",
|
|
78
79
|
"wagmi": "2.x",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useFixRadixUiWheelEvent: () => void;
|