@ensofinance/checkout-widget 0.0.2 → 0.0.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/index.d.ts CHANGED
@@ -1,20 +1,18 @@
1
- import { CheckoutConfig } from '../../../../../../src/types';
2
- import { CheckoutConfig as CheckoutConfig_2 } from '../../../../../../../src/types';
3
- import { CheckoutModalProps } from '../../../../../../src/types';
4
- import { CheckoutModalProps as CheckoutModalProps_2 } from '../../../../../../../src/types';
1
+ import { CheckoutConfig } from '../../../../../../../src/types';
2
+ import { CheckoutModalProps } from '../../../../../../../src/types';
5
3
  import { ComponentType } from 'react';
6
4
  import { JSX as JSX_2 } from 'react/jsx-runtime';
7
5
  import { SystemConfig as WidgetTheme } from '@chakra-ui/react';
8
6
 
9
7
  export declare const Checkout: ({ config: { apiKey, tokenOut, chainIdOut, theme, enableExchange }, onClose, wrapper, }: {
10
- config: CheckoutConfig_2;
8
+ config: CheckoutConfig;
11
9
  wrapper?: ComponentType;
12
10
  onClose?: () => void;
13
11
  }) => JSX_2.Element;
14
12
 
15
13
  export { CheckoutConfig }
16
14
 
17
- export declare const CheckoutModal: ({ config, setIsActive, isActive, onClose, }: CheckoutModalProps_2) => JSX_2.Element;
15
+ export declare const CheckoutModal: ({ config, setIsActive, isActive, onClose, }: CheckoutModalProps) => JSX_2.Element;
18
16
 
19
17
  export { CheckoutModalProps }
20
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ensofinance/checkout-widget",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "homepage": "https://www.enso.build/",
6
6
  "repository": {
@@ -28,7 +28,6 @@
28
28
  "@chakra-ui/react": "^3.19.1",
29
29
  "@emotion/cache": "^11.14.0",
30
30
  "@emotion/react": "^11.14.0",
31
- "@ensofinance/checkout-ui-library": "^0.0.2",
32
31
  "@ensofinance/sdk": "^1.0.18",
33
32
  "@meshconnect/web-link-sdk": "^3.2.14",
34
33
  "@uidotdev/usehooks": "^2.4.1",
@@ -16,7 +16,7 @@ import ExchangeFlow from "./steps/ExchangeFlow";
16
16
  import { useAppStore } from "@/store";
17
17
  import { TxTracker } from "@/util/tx-tracker";
18
18
  import ChakraProvider from "./ChakraProvider";
19
- import { CheckoutConfig, SupportedExchanges } from "@/types";
19
+ import { type CheckoutConfig, type SupportedExchanges } from "@/types";
20
20
 
21
21
  type ICheckoutContext = {
22
22
  step: string;
@@ -51,11 +51,9 @@ const FLOWS: Record<
51
51
  },
52
52
  };
53
53
 
54
- export const CheckoutContext = createContext<ICheckoutContext>(
55
- {} as ICheckoutContext,
56
- );
54
+ const CheckoutContext = createContext<ICheckoutContext>({} as ICheckoutContext);
57
55
 
58
- export const Checkout = ({
56
+ const Checkout = ({
59
57
  config: { apiKey, tokenOut, chainIdOut, theme, enableExchange },
60
58
  onClose,
61
59
  wrapper,
@@ -125,3 +123,5 @@ export const Checkout = ({
125
123
  </CheckoutContext.Provider>
126
124
  );
127
125
  };
126
+
127
+ export { CheckoutConfig, Checkout, CheckoutContext };
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from "react";
2
2
  import { Checkout } from "./Checkout";
3
3
  import Modal from "./modal";
4
- import { CheckoutModalProps } from "@/types";
4
+ import { type CheckoutModalProps } from "@/types";
5
5
 
6
6
  export const CheckoutModal = ({
7
7
  config,
@@ -20,3 +20,5 @@ export const CheckoutModal = ({
20
20
 
21
21
  return <Checkout wrapper={Modal} config={config} onClose={handleClose} />;
22
22
  };
23
+
24
+ export { CheckoutModalProps };
@@ -1,4 +1,3 @@
1
- // Theme-aware UI components to replace @ensofinance/checkout-ui-library imports
2
1
  import React, { forwardRef, useMemo } from "react";
3
2
  import {
4
3
  Button as ChakraButton,
package/src/index.ts CHANGED
@@ -1,6 +1,8 @@
1
- import { CheckoutModal } from "./components/CheckoutModal";
2
- import { Checkout } from "./components/Checkout";
3
- import { type CheckoutModalProps, type CheckoutConfig } from "@/types";
1
+ import {
2
+ CheckoutModal,
3
+ type CheckoutModalProps,
4
+ } from "./components/CheckoutModal";
5
+ import { Checkout, type CheckoutConfig } from "./components/Checkout";
4
6
 
5
7
  // Export two versions for different integration needs
6
8
  export {
@@ -1,9 +1,5 @@
1
- import {
2
- useAccount,
3
- useCapabilities,
4
- useSendCalls,
5
- useWalletClient,
6
- } from "wagmi";
1
+ import { useAccount, useWalletClient } from "wagmi";
2
+ import { useCapabilities, useSendCalls } from "wagmi/experimental";
7
3
  import { Address } from "viem";
8
4
  import { useCallback, useMemo } from "react";
9
5
  import { useEnsoToken, useEnsoPrice, useEnsoData } from "@/enso-api/api";