@ensofinance/checkout-widget 0.1.3 → 0.1.4
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/dist/checkout-widget.es.js.map +1 -1
- package/dist/checkout-widget.umd.js.map +1 -1
- package/dist/index.d.ts +21 -4
- package/package.json +1 -2
- package/src/components/Checkout.tsx +1 -1
- package/src/components/CheckoutModal.tsx +1 -1
- package/src/components/steps/ExchangeFlow.tsx +1 -1
- package/src/index.ts +6 -17
- package/tsconfig.json +3 -1
- package/vite.config.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { CheckoutConfig } from '../../../../../../../src/types';
|
|
2
|
-
import { CheckoutModalProps } from '../../../../../../../src/types';
|
|
3
1
|
import { ComponentType } from 'react';
|
|
4
2
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
3
|
import { SystemConfig as WidgetTheme } from '@chakra-ui/react';
|
|
@@ -10,14 +8,33 @@ export declare const Checkout: ({ config: { apiKey, tokenOut, chainIdOut, theme,
|
|
|
10
8
|
onClose?: () => void;
|
|
11
9
|
}) => JSX_2.Element;
|
|
12
10
|
|
|
13
|
-
export
|
|
11
|
+
export declare type CheckoutConfig = {
|
|
12
|
+
tokenOut: string;
|
|
13
|
+
chainIdOut: number;
|
|
14
|
+
apiKey: string;
|
|
15
|
+
theme?: WidgetTheme;
|
|
16
|
+
enableExchange?: SupportedExchanges[];
|
|
17
|
+
/** Override the default CEX bridge chain mapping (maps target chains to intermediate chains for withdrawal + bridge) */
|
|
18
|
+
cexBridgeChainMapping?: Record<number, number>;
|
|
19
|
+
/** Override recipient address (defaults to connected wallet's smart account) */
|
|
20
|
+
recipient?: string;
|
|
21
|
+
/** Force the widget to open in a specific flow, bypassing the selector */
|
|
22
|
+
enforceFlow?: EnforceFlow;
|
|
23
|
+
};
|
|
14
24
|
|
|
15
25
|
export declare const CheckoutModal: ({ config, setIsActive, isActive, onClose, }: CheckoutModalProps) => JSX_2.Element;
|
|
16
26
|
|
|
17
|
-
export
|
|
27
|
+
export declare type CheckoutModalProps = {
|
|
28
|
+
config: CheckoutConfig;
|
|
29
|
+
isActive: boolean;
|
|
30
|
+
setIsActive: (active: boolean) => void;
|
|
31
|
+
onClose?: () => void;
|
|
32
|
+
};
|
|
18
33
|
|
|
19
34
|
export declare const DEFAULT_CEX_BRIDGE_CHAIN_MAPPING: Record<number, number>;
|
|
20
35
|
|
|
36
|
+
declare type EnforceFlow = "exchange" | "wallet";
|
|
37
|
+
|
|
21
38
|
export declare enum SupportedExchanges {
|
|
22
39
|
Binance = "binance",
|
|
23
40
|
Kraken = "kraken",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ensofinance/checkout-widget",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://www.enso.build/",
|
|
6
6
|
"repository": {
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
"globals": "^15.14.0",
|
|
61
61
|
"orval": "^7.10.0",
|
|
62
62
|
"prettier": "^3.4.2",
|
|
63
|
-
"source-map-explorer": "^2.5.3",
|
|
64
63
|
"typescript": "~5.8.2",
|
|
65
64
|
"typescript-eslint": "^8.18.2",
|
|
66
65
|
"vite": "^6.0.5",
|
|
@@ -56,7 +56,7 @@ import { ConfirmExchangeStep } from "../ExchangeConfirmSecurity";
|
|
|
56
56
|
|
|
57
57
|
import SuccessIcon from "@/assets/success.svg";
|
|
58
58
|
import FailIcon from "@/assets/fail.svg";
|
|
59
|
-
import { SupportedExchanges } from "
|
|
59
|
+
import { SupportedExchanges } from "../../types";
|
|
60
60
|
import { useLayerZeroStatus } from "@/util/tx-tracker";
|
|
61
61
|
import { STARGATE_CHAIN_NAMES, CHAINS_ETHERSCAN } from "@/util/constants";
|
|
62
62
|
|
package/src/index.ts
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type CheckoutModalProps,
|
|
4
|
-
} from "./components/CheckoutModal";
|
|
5
|
-
import { Checkout, type CheckoutConfig } from "./components/Checkout";
|
|
1
|
+
import { CheckoutModal } from "./components/CheckoutModal";
|
|
2
|
+
import { Checkout } from "./components/Checkout";
|
|
6
3
|
|
|
7
|
-
// Export
|
|
8
|
-
export {
|
|
9
|
-
// Modal version with isActive/setIsActive control
|
|
10
|
-
CheckoutModal,
|
|
11
|
-
CheckoutModalProps,
|
|
4
|
+
// Export components
|
|
5
|
+
export { CheckoutModal, Checkout };
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
CheckoutConfig,
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// Export theme type for TypeScript users
|
|
19
|
-
export type { WidgetTheme } from "./types";
|
|
7
|
+
// Export types directly from types module for proper bundling
|
|
8
|
+
export type { CheckoutConfig, CheckoutModalProps, WidgetTheme } from "./types";
|
|
20
9
|
export { SupportedExchanges } from "./types";
|
|
21
10
|
|
|
22
11
|
// Export default CEX bridge chain mapping for users to extend
|
package/tsconfig.json
CHANGED
package/vite.config.ts
CHANGED