@lifi/widget 2.0.0-alpha.0 → 2.0.0-alpha.2
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/App.js +1 -1
- package/AppDrawer.d.ts +1 -3
- package/AppDrawer.js +2 -2
- package/AppProvider.d.ts +2 -2
- package/AppProvider.js +4 -3
- package/cjs/App.js +1 -1
- package/cjs/AppDrawer.d.ts +1 -3
- package/cjs/AppDrawer.js +2 -2
- package/cjs/AppProvider.d.ts +2 -2
- package/cjs/AppProvider.js +2 -1
- package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +2 -2
- package/cjs/components/Header/Header.style.d.ts +1 -1
- package/cjs/components/ListItemButton.d.ts +1 -1
- package/cjs/components/PoweredBy/PoweredBy.style.d.ts +3 -12
- package/cjs/components/Step/DestinationWalletAddress.d.ts +2 -2
- package/cjs/components/Step/DestinationWalletAddress.js +2 -6
- package/cjs/components/Step/GasStepProcess.d.ts +2 -2
- package/cjs/components/Step/GasStepProcess.js +1 -1
- package/cjs/components/Step/Step.d.ts +2 -2
- package/cjs/components/Step/Step.js +0 -4
- package/cjs/components/Step/StepProcess.d.ts +2 -2
- package/cjs/components/Step/StepProcess.js +1 -5
- package/cjs/components/Step/StepProcess.style.d.ts +3 -39
- package/cjs/components/Step/StepTimer.d.ts +2 -2
- package/cjs/components/Step/StepTimer.js +1 -1
- package/cjs/components/StepActions/StepActions.d.ts +2 -2
- package/cjs/components/StepActions/StepActions.js +3 -4
- package/cjs/components/StepActions/types.d.ts +2 -2
- package/cjs/components/SwapRoutes/SwapRoutesExpanded.js +1 -6
- package/cjs/components/Token/Token.d.ts +2 -2
- package/cjs/components/TokenList/TokenList.style.d.ts +2 -2
- package/cjs/config/version.d.ts +1 -1
- package/cjs/config/version.js +1 -1
- package/cjs/hooks/useProcessMessage.d.ts +3 -3
- package/cjs/pages/MainPage/MainPage.js +1 -1
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
- package/cjs/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +2 -1
- package/cjs/providers/SwapFormProvider/SwapFormProvider.js +2 -3
- package/cjs/providers/SwapFormProvider/index.d.ts +1 -0
- package/cjs/providers/SwapFormProvider/index.js +1 -0
- package/cjs/types/widget.d.ts +7 -3
- package/components/ActiveSwaps/ActiveSwaps.style.d.ts +2 -2
- package/components/Header/Header.style.d.ts +1 -1
- package/components/ListItemButton.d.ts +1 -1
- package/components/PoweredBy/PoweredBy.style.d.ts +3 -12
- package/components/Step/DestinationWalletAddress.d.ts +2 -2
- package/components/Step/DestinationWalletAddress.js +2 -6
- package/components/Step/GasStepProcess.d.ts +2 -2
- package/components/Step/GasStepProcess.js +1 -1
- package/components/Step/Step.d.ts +2 -2
- package/components/Step/Step.js +0 -4
- package/components/Step/StepProcess.d.ts +2 -2
- package/components/Step/StepProcess.js +1 -5
- package/components/Step/StepProcess.style.d.ts +3 -39
- package/components/Step/StepTimer.d.ts +2 -2
- package/components/Step/StepTimer.js +1 -1
- package/components/StepActions/StepActions.d.ts +2 -2
- package/components/StepActions/StepActions.js +3 -4
- package/components/StepActions/types.d.ts +2 -2
- package/components/SwapRoutes/SwapRoutesExpanded.js +2 -7
- package/components/Token/Token.d.ts +2 -2
- package/components/TokenList/TokenList.style.d.ts +2 -2
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/useProcessMessage.d.ts +3 -3
- package/package.json +11 -11
- package/pages/MainPage/MainPage.js +1 -1
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
- package/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
- package/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +2 -1
- package/providers/SwapFormProvider/SwapFormProvider.js +2 -3
- package/providers/SwapFormProvider/index.d.ts +1 -0
- package/providers/SwapFormProvider/index.js +1 -0
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/types/widget.d.ts +7 -3
|
@@ -17,4 +17,4 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
|
|
|
17
17
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
18
18
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
19
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
|
-
}, "className" | "style" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "
|
|
20
|
+
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "dense" | "divider" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -17,5 +17,5 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
|
|
|
17
17
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
18
18
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
19
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
|
-
}, "className" | "style" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "
|
|
20
|
+
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "dense" | "divider" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
21
21
|
export declare const ListItemText: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemTextProps<import("react").ElementType<any>, import("react").ElementType<any>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -4,7 +4,8 @@ export declare const Stack: import("@emotion/styled").StyledComponent<import("@m
|
|
|
4
4
|
direction?: import("@mui/system").ResponsiveStyleValue<"column" | "column-reverse" | "row" | "row-reverse"> | undefined;
|
|
5
5
|
spacing?: import("@mui/system").ResponsiveStyleValue<string | number> | undefined;
|
|
6
6
|
divider?: import("react").ReactNode;
|
|
7
|
+
useFlexGap?: boolean | undefined;
|
|
7
8
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
8
9
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
10
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
10
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "direction" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "divider" | "spacing"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
11
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "direction" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "divider" | "spacing" | "useFlexGap"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -4,7 +4,6 @@ import { FormProvider, useForm } from 'react-hook-form';
|
|
|
4
4
|
import { useWidgetConfig } from '../WidgetProvider';
|
|
5
5
|
import { FormUpdater } from './FormUpdater';
|
|
6
6
|
import { SwapFormKey } from './types';
|
|
7
|
-
import { URLSearchParamsBuilder } from './URLSearchParamsBuilder';
|
|
8
7
|
export const formDefaultValues = {
|
|
9
8
|
[SwapFormKey.FromAmount]: '',
|
|
10
9
|
[SwapFormKey.ToAddress]: '',
|
|
@@ -16,7 +15,7 @@ export const formDefaultValues = {
|
|
|
16
15
|
[SwapFormKey.ToAmount]: '',
|
|
17
16
|
};
|
|
18
17
|
export const SwapFormProvider = ({ children, }) => {
|
|
19
|
-
const { fromChain, fromToken, fromAmount, toChain, toToken, toAddress
|
|
18
|
+
const { fromChain, fromToken, fromAmount, toChain, toToken, toAddress } = useWidgetConfig();
|
|
20
19
|
const defaultValues = useMemo(() => ({
|
|
21
20
|
...formDefaultValues,
|
|
22
21
|
fromChain,
|
|
@@ -32,5 +31,5 @@ export const SwapFormProvider = ({ children, }) => {
|
|
|
32
31
|
// values,
|
|
33
32
|
defaultValues,
|
|
34
33
|
});
|
|
35
|
-
return (_jsxs(FormProvider, { ...methods, children: [_jsx(FormUpdater, { defaultValues: defaultValues }),
|
|
34
|
+
return (_jsxs(FormProvider, { ...methods, children: [_jsx(FormUpdater, { defaultValues: defaultValues }), children] }));
|
|
36
35
|
};
|