@mintmoney/react 0.1.0-alpha.11 → 0.1.0-alpha.12
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/esm/api/checkouts.js +9 -9
- package/dist/esm/api/generated.js +544 -592
- package/dist/esm/api/index.js +10 -10
- package/dist/esm/api/payments.js +17 -21
- package/dist/esm/api/types.js +8 -2
- package/dist/esm/api/types.js.map +1 -1
- package/dist/esm/checkout/container.js +2 -2
- package/dist/esm/checkout/index.js +18 -38
- package/dist/esm/checkout/modal.js +52 -63
- package/dist/esm/checkout/views/back.js +3 -7
- package/dist/esm/checkout/views/card-intent/details.js +4 -21
- package/dist/esm/checkout/views/crypto-intent/curreny.js +18 -43
- package/dist/esm/checkout/views/crypto-intent/curreny.js.map +1 -1
- package/dist/esm/checkout/views/crypto-intent/direct-details.js +16 -60
- package/dist/esm/checkout/views/crypto-intent/methods.js +19 -27
- package/dist/esm/checkout/views/crypto-intent/processing.js +31 -39
- package/dist/esm/checkout/views/crypto-intent/processing.js.map +1 -1
- package/dist/esm/checkout/views/crypto-intent/success.js +14 -32
- package/dist/esm/checkout/views/initial.js +24 -29
- package/dist/esm/checkout/views/method-select.js +10 -24
- package/dist/esm/components/buttons/index.js +11 -20
- package/dist/esm/components/icons/checkMark.js +4 -16
- package/dist/esm/components/icons/close.js +4 -19
- package/dist/esm/components/icons/index.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/lists/empty.js +2 -5
- package/dist/esm/components/lists/index.js +8 -47
- package/dist/esm/components/loading/index.js +6 -47
- package/dist/esm/components/modals/index.js +1 -1
- package/dist/esm/components/modals/modal-with-views.js +23 -62
- package/dist/esm/components/modals/modal.js +11 -67
- package/dist/esm/components/modals/use-modal-with-views.js +22 -25
- package/dist/esm/components/text/index.js +21 -21
- package/dist/esm/config.js +14 -5
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/context.js +10 -18
- package/dist/esm/index.js +1 -1
- package/dist/esm/state/checkout/store.js +144 -144
- package/dist/esm/state/checkout/store.js.map +1 -1
- package/dist/esm/themes/default.js +55 -55
- package/dist/esm/themes/index.js +1 -1
- package/dist/esm/themes/types.js +1 -1
- package/dist/esm/utils/cn.js +1 -1
- package/dist/types/api/checkouts.d.ts +5 -5
- package/dist/types/api/generated.d.ts +835 -924
- package/dist/types/api/index.d.ts +1 -1
- package/dist/types/api/payments.d.ts +3 -10
- package/dist/types/api/types.d.ts +16 -14
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/checkout/container.d.ts +2 -12
- package/dist/types/checkout/index.d.ts +6 -10
- package/dist/types/checkout/modal.d.ts +5 -7
- package/dist/types/checkout/views/back.d.ts +3 -5
- package/dist/types/checkout/views/card-intent/details.d.ts +1 -1
- package/dist/types/checkout/views/crypto-intent/curreny.d.ts +1 -1
- package/dist/types/checkout/views/crypto-intent/curreny.d.ts.map +1 -1
- package/dist/types/checkout/views/crypto-intent/direct-details.d.ts +2 -4
- package/dist/types/checkout/views/crypto-intent/methods.d.ts +1 -1
- package/dist/types/checkout/views/crypto-intent/processing.d.ts +1 -1
- package/dist/types/checkout/views/crypto-intent/processing.d.ts.map +1 -1
- package/dist/types/checkout/views/crypto-intent/success.d.ts +3 -5
- package/dist/types/checkout/views/initial.d.ts +3 -5
- package/dist/types/checkout/views/method-select.d.ts +1 -1
- package/dist/types/components/buttons/index.d.ts +6 -16
- package/dist/types/components/icons/checkMark.d.ts +3 -5
- package/dist/types/components/icons/close.d.ts +3 -5
- package/dist/types/components/icons/index.d.ts +1 -1
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/lists/empty.d.ts +3 -5
- package/dist/types/components/lists/index.d.ts +9 -17
- package/dist/types/components/loading/index.d.ts +4 -4
- package/dist/types/components/modals/index.d.ts +1 -1
- package/dist/types/components/modals/modal-with-views.d.ts +18 -23
- package/dist/types/components/modals/modal.d.ts +9 -17
- package/dist/types/components/modals/use-modal-with-views.d.ts +6 -9
- package/dist/types/components/text/index.d.ts +7 -17
- package/dist/types/config.d.ts +16 -12
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/context.d.ts +4 -7
- package/dist/types/index.d.ts +1 -1
- package/dist/types/state/checkout/store.d.ts +51 -74
- package/dist/types/state/checkout/store.d.ts.map +1 -1
- package/dist/types/themes/default.d.ts +1 -1
- package/dist/types/themes/index.d.ts +1 -1
- package/dist/types/themes/types.d.ts +26 -25
- package/dist/types/utils/cn.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { PaymentsCryptoPayCreateData } from "../api/generated.js";
|
|
2
2
|
import { Payment, CreatePaymentParams, CryptoCurrency } from "./types.js";
|
|
3
|
-
export declare function createPayment({
|
|
4
|
-
|
|
5
|
-
checkoutId,
|
|
6
|
-
}: CreatePaymentParams): Promise<Payment>;
|
|
7
|
-
export declare function createPaymentAttempt(
|
|
8
|
-
paymentId: string,
|
|
9
|
-
currency: CryptoCurrency,
|
|
10
|
-
confirmations?: number,
|
|
11
|
-
): Promise<PaymentsCryptoPayCreateData["data"]>;
|
|
3
|
+
export declare function createPayment({ amount, checkoutId, }: CreatePaymentParams): Promise<Payment>;
|
|
4
|
+
export declare function createPaymentAttempt(paymentId: string, currency: CryptoCurrency, confirmations?: number): Promise<PaymentsCryptoPayCreateData["data"]>;
|
|
12
5
|
export declare function getPaymentById(id: string): Promise<Payment>;
|
|
13
|
-
//# sourceMappingURL=payments.d.ts.map
|
|
6
|
+
//# sourceMappingURL=payments.d.ts.map
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PaymentsCreateData,
|
|
3
|
-
CheckoutsDetailData,
|
|
4
|
-
PaymentsCryptoPayCreateData,
|
|
5
|
-
} from "./generated.js";
|
|
1
|
+
import { PaymentsCreateData, CheckoutsDetailData, PaymentsCryptoPayCreateData } from "./generated.js";
|
|
6
2
|
export type Payment = PaymentsCreateData["data"];
|
|
3
|
+
export declare enum PaymentStatus {
|
|
4
|
+
PENDING = "pending",
|
|
5
|
+
CONFIRMING_PAYMENT = "confirming_payment",
|
|
6
|
+
PAID = "paid",
|
|
7
|
+
FAILED = "failed"
|
|
8
|
+
}
|
|
7
9
|
export type CreatePaymentParams = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
amount: number;
|
|
11
|
+
checkoutId: string;
|
|
10
12
|
};
|
|
11
13
|
export type Checkout = CheckoutsDetailData["data"];
|
|
12
14
|
export type CheckoutMethod = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
name: string;
|
|
16
|
+
intentName: string;
|
|
15
17
|
};
|
|
16
18
|
export type CryptoCurrency = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
chain: string;
|
|
20
|
+
asset: string;
|
|
21
|
+
chain_name: string;
|
|
22
|
+
asset_name: string;
|
|
21
23
|
};
|
|
22
24
|
export type CryptoPaymentAttempt = PaymentsCryptoPayCreateData["data"];
|
|
23
|
-
//# sourceMappingURL=types.d.ts.map
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,2BAA2B,CAAC,MAAM,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAEjD,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,kBAAkB,uBAAuB;IACzC,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,2BAA2B,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
export declare const ModalViewContainer: import("styled-components/dist/types.js").IStyledComponentBase<
|
|
2
|
-
|
|
3
|
-
import("styled-components").FastOmit<
|
|
4
|
-
import("react").DetailedHTMLProps<
|
|
5
|
-
import("react").HTMLAttributes<HTMLDivElement>,
|
|
6
|
-
HTMLDivElement
|
|
7
|
-
>,
|
|
8
|
-
never
|
|
9
|
-
>
|
|
10
|
-
> &
|
|
11
|
-
string;
|
|
12
|
-
//# sourceMappingURL=container.d.ts.map
|
|
1
|
+
export declare const ModalViewContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
//# sourceMappingURL=container.d.ts.map
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { Payment } from "../api/types.js";
|
|
3
3
|
export type CheckoutProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
createPayment: () => Promise<Payment>;
|
|
5
|
+
onError?: (err: Error) => Promise<void>;
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
children?: ReactNode;
|
|
8
8
|
};
|
|
9
|
-
export declare function Checkout({
|
|
10
|
-
|
|
11
|
-
asChild,
|
|
12
|
-
children,
|
|
13
|
-
}: CheckoutProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
9
|
+
export declare function Checkout({ createPayment, asChild, children }: CheckoutProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
import { Payment } from "../api/types.js";
|
|
3
3
|
interface CheckoutModalProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
open: boolean;
|
|
5
|
+
payment: Payment;
|
|
6
|
+
onOpenChange: Dispatch<boolean>;
|
|
7
7
|
}
|
|
8
|
-
export declare const CheckoutModal: (
|
|
9
|
-
props: CheckoutModalProps,
|
|
10
|
-
) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const CheckoutModal: (props: CheckoutModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
9
|
export {};
|
|
12
|
-
//# sourceMappingURL=modal.d.ts.map
|
|
10
|
+
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
type BackButtonProps = {
|
|
2
|
-
|
|
2
|
+
view: string;
|
|
3
3
|
};
|
|
4
|
-
declare const ModalBackButton: ({
|
|
5
|
-
view,
|
|
6
|
-
}: BackButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const ModalBackButton: ({ view }: BackButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
export { ModalBackButton };
|
|
8
|
-
//# sourceMappingURL=back.d.ts.map
|
|
6
|
+
//# sourceMappingURL=back.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curreny.d.ts","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/curreny.tsx"],"names":[],"mappings":"AAiBA,QAAA,MAAM,oCAAoC,+
|
|
1
|
+
{"version":3,"file":"curreny.d.ts","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/curreny.tsx"],"names":[],"mappings":"AAiBA,QAAA,MAAM,oCAAoC,+CAyCzC,CAAC;AAEF,OAAO,EAAE,oCAAoC,EAAE,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
declare const CryptoIntentDirectDetailsViewContent: () =>
|
|
2
|
-
| import("react/jsx-runtime").JSX.Element
|
|
3
|
-
| null;
|
|
1
|
+
declare const CryptoIntentDirectDetailsViewContent: () => import("react/jsx-runtime").JSX.Element | null;
|
|
4
2
|
export { CryptoIntentDirectDetailsViewContent };
|
|
5
|
-
//# sourceMappingURL=direct-details.d.ts.map
|
|
3
|
+
//# sourceMappingURL=direct-details.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processing.d.ts","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/processing.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"processing.d.ts","sourceRoot":"","sources":["../../../../../src/checkout/views/crypto-intent/processing.tsx"],"names":[],"mappings":"AASA,QAAA,MAAM,oCAAoC,+CA6CzC,CAAC;AAEF,OAAO,EAAE,oCAAoC,EAAE,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
interface Props {
|
|
3
|
-
|
|
3
|
+
onClose: Dispatch<boolean>;
|
|
4
4
|
}
|
|
5
|
-
declare const CryptoIntentPaymentSuccessViewContent: ({
|
|
6
|
-
onClose,
|
|
7
|
-
}: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const CryptoIntentPaymentSuccessViewContent: ({ onClose }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
6
|
export { CryptoIntentPaymentSuccessViewContent };
|
|
9
|
-
//# sourceMappingURL=success.d.ts.map
|
|
7
|
+
//# sourceMappingURL=success.d.ts.map
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Payment } from "../../api/types.js";
|
|
2
2
|
type InitialProps = {
|
|
3
|
-
|
|
3
|
+
payment: Payment;
|
|
4
4
|
};
|
|
5
|
-
declare const InitialiseCheckoutViewContent: (
|
|
6
|
-
props: InitialProps,
|
|
7
|
-
) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
declare const InitialiseCheckoutViewContent: (props: InitialProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
6
|
export { InitialiseCheckoutViewContent };
|
|
9
|
-
//# sourceMappingURL=initial.d.ts.map
|
|
7
|
+
//# sourceMappingURL=initial.d.ts.map
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
export interface StyledButtonProps {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
variant?: "primary" | "secondary";
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
declare const StyledButton: import("styled-components/dist/types.js").IStyledComponentBase<
|
|
8
|
-
"web",
|
|
9
|
-
import("styled-components/dist/types.js").Substitute<
|
|
10
|
-
import("react").DetailedHTMLProps<
|
|
11
|
-
import("react").ButtonHTMLAttributes<HTMLButtonElement>,
|
|
12
|
-
HTMLButtonElement
|
|
13
|
-
>,
|
|
14
|
-
StyledButtonProps
|
|
15
|
-
>
|
|
16
|
-
> &
|
|
17
|
-
string;
|
|
7
|
+
declare const StyledButton: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledButtonProps>> & string;
|
|
18
8
|
export { StyledButton };
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
interface CheckMarkIconProps {
|
|
2
|
-
|
|
2
|
+
size?: number;
|
|
3
3
|
}
|
|
4
|
-
declare const CheckMarkIcon: ({
|
|
5
|
-
size,
|
|
6
|
-
}: CheckMarkIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const CheckMarkIcon: ({ size }: CheckMarkIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
export { CheckMarkIcon };
|
|
8
|
-
//# sourceMappingURL=checkMark.d.ts.map
|
|
6
|
+
//# sourceMappingURL=checkMark.d.ts.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
interface CloseIconProps {
|
|
2
|
-
|
|
2
|
+
size?: number;
|
|
3
3
|
}
|
|
4
|
-
declare const CloseIcon: ({
|
|
5
|
-
size,
|
|
6
|
-
}: CloseIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const CloseIcon: ({ size }: CloseIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
export { CloseIcon };
|
|
8
|
-
//# sourceMappingURL=close.d.ts.map
|
|
6
|
+
//# sourceMappingURL=close.d.ts.map
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export declare const ListEmpty: ({
|
|
2
|
-
|
|
3
|
-
}: {
|
|
4
|
-
content: string;
|
|
1
|
+
export declare const ListEmpty: ({ content }: {
|
|
2
|
+
content: string;
|
|
5
3
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
//# sourceMappingURL=empty.d.ts.map
|
|
4
|
+
//# sourceMappingURL=empty.d.ts.map
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import { ListEmpty } from "./empty.js";
|
|
2
2
|
export interface SelectableListProps<T> {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
title?: string;
|
|
4
|
+
noItemsMsg?: string;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
items: T[];
|
|
7
|
+
getKey: (item: T) => string;
|
|
8
|
+
getLabel: (item: T) => string;
|
|
9
|
+
onSelect: (item: T) => void;
|
|
10
10
|
}
|
|
11
|
-
declare const SelectableList: <T>({
|
|
12
|
-
title,
|
|
13
|
-
items,
|
|
14
|
-
getKey,
|
|
15
|
-
getLabel,
|
|
16
|
-
onSelect,
|
|
17
|
-
loading,
|
|
18
|
-
noItemsMsg,
|
|
19
|
-
}: SelectableListProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const SelectableList: <T>({ title, items, getKey, getLabel, onSelect, loading, noItemsMsg, }: SelectableListProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
20
12
|
export { SelectableList, ListEmpty };
|
|
21
|
-
//# sourceMappingURL=index.d.ts.map
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface LoaderProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
asChild?: boolean;
|
|
6
6
|
}
|
|
7
7
|
declare const Loader: React.FC<LoaderProps>;
|
|
8
8
|
export { Loader };
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface ModalWithViewProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
>;
|
|
20
|
-
defaultNavigateButtonPosition?: "left" | "center" | "right";
|
|
21
|
-
defaultNavigateButtonComponent?: React.ReactNode;
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
className?: string;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
initialView: string;
|
|
7
|
+
initialProps?: Record<string, unknown>;
|
|
8
|
+
views: Record<string, {
|
|
9
|
+
title: string;
|
|
10
|
+
header?: (viewProps: Record<string, unknown>) => React.ReactNode;
|
|
11
|
+
content: (viewProps: Record<string, unknown>) => React.ReactNode;
|
|
12
|
+
footer?: (viewProps: Record<string, unknown>) => React.ReactNode;
|
|
13
|
+
navigateButtonPosition?: "left" | "center" | "right";
|
|
14
|
+
navigateComponent?: React.ReactNode;
|
|
15
|
+
navigateShouldGoToView?: string;
|
|
16
|
+
}>;
|
|
17
|
+
defaultNavigateButtonPosition?: "left" | "center" | "right";
|
|
18
|
+
defaultNavigateButtonComponent?: React.ReactNode;
|
|
22
19
|
}
|
|
23
|
-
export declare function ModalWithView(
|
|
24
|
-
|
|
25
|
-
): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
//# sourceMappingURL=modal-with-views.d.ts.map
|
|
20
|
+
export declare function ModalWithView(props: ModalWithViewProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=modal-with-views.d.ts.map
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
export interface ModalProps {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
className?: string;
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange?: (open: boolean) => void;
|
|
5
|
+
navBarComponent?: React.ReactNode;
|
|
6
|
+
disableCloseOnInteractOutside?: boolean;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
title: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const Modal: ({
|
|
11
|
-
|
|
12
|
-
open,
|
|
13
|
-
onOpenChange,
|
|
14
|
-
navBarComponent,
|
|
15
|
-
disableCloseOnInteractOutside,
|
|
16
|
-
title,
|
|
17
|
-
children,
|
|
18
|
-
}: ModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
//# sourceMappingURL=modal.d.ts.map
|
|
10
|
+
export declare const Modal: ({ className, open, onOpenChange, navBarComponent, disableCloseOnInteractOutside, title, children, }: ModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ModalWithViewProps } from "./modal-with-views.jsx";
|
|
3
3
|
type ModalContext = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
currentView: string;
|
|
5
|
+
goToView: (view: string, props?: Record<string, unknown>) => void;
|
|
6
|
+
viewProps: Record<string, unknown>;
|
|
7
7
|
};
|
|
8
8
|
declare const ModalContext: React.Context<ModalContext | undefined>;
|
|
9
|
-
export declare const ModalWithViewProvider: ({
|
|
10
|
-
|
|
11
|
-
initialView,
|
|
12
|
-
}: Pick<ModalWithViewProps, "initialView"> & {
|
|
13
|
-
children: React.ReactNode;
|
|
9
|
+
export declare const ModalWithViewProvider: ({ children, initialView, }: Pick<ModalWithViewProps, "initialView"> & {
|
|
10
|
+
children: React.ReactNode;
|
|
14
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
12
|
export declare const useModalWithView: () => ModalContext;
|
|
16
13
|
export {};
|
|
17
|
-
//# sourceMappingURL=use-modal-with-views.d.ts.map
|
|
14
|
+
//# sourceMappingURL=use-modal-with-views.d.ts.map
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
export interface TextProps {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
size?: "xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl";
|
|
3
|
+
weight?: "light" | "normal" | "medium" | "semibold" | "bold";
|
|
4
|
+
color?: string;
|
|
5
|
+
align?: "left" | "center" | "right";
|
|
6
|
+
uppercase?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const Text: import("styled-components/dist/types.js").IStyledComponentBase<
|
|
9
|
-
"web",
|
|
10
|
-
import("styled-components/dist/types.js").Substitute<
|
|
11
|
-
import("react").DetailedHTMLProps<
|
|
12
|
-
import("react").HTMLAttributes<HTMLParagraphElement>,
|
|
13
|
-
HTMLParagraphElement
|
|
14
|
-
>,
|
|
15
|
-
TextProps
|
|
16
|
-
>
|
|
17
|
-
> &
|
|
18
|
-
string;
|
|
8
|
+
declare const Text: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, TextProps>> & string;
|
|
19
9
|
export { Text };
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/types/config.d.ts
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
+
import { PaymentStatus } from "./api/types.js";
|
|
1
2
|
import { ThemeConfig } from "./themes/types.js";
|
|
3
|
+
export type CryptoCheckoutConfig = {
|
|
4
|
+
numBlockConfirmations: number;
|
|
5
|
+
paymentConfirmationStatus: PaymentStatus;
|
|
6
|
+
};
|
|
2
7
|
export type Config = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
publicKey: string;
|
|
9
|
+
checkoutId: string;
|
|
10
|
+
apiUrl: string;
|
|
11
|
+
cryptoCheckoutConfig: CryptoCheckoutConfig;
|
|
12
|
+
theme: ThemeConfig;
|
|
7
13
|
};
|
|
8
14
|
type ConfigOptions = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
apiUrl?: string;
|
|
16
|
+
checkoutId: string;
|
|
17
|
+
theme?: Partial<ThemeConfig>;
|
|
18
|
+
cryptoCheckoutConfig?: CryptoCheckoutConfig;
|
|
12
19
|
};
|
|
13
|
-
export declare const createConfig: (
|
|
14
|
-
publicKey: string,
|
|
15
|
-
options?: ConfigOptions,
|
|
16
|
-
) => Config;
|
|
20
|
+
export declare const createConfig: (publicKey: string, options?: ConfigOptions) => Config;
|
|
17
21
|
export {};
|
|
18
|
-
//# sourceMappingURL=config.d.ts.map
|
|
22
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG;IACjC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,yBAAyB,EAAE,aAAa,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7B,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C,CAAC;AAIF,eAAO,MAAM,YAAY,GACvB,WAAW,MAAM,EACjB,UAAU,aAAa,KACtB,MAgBF,CAAC"}
|
package/dist/types/context.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Config } from "./config.js";
|
|
3
3
|
export type MintMoneyProviderProps = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
config: Config;
|
|
5
|
+
children: React.ReactNode;
|
|
6
6
|
};
|
|
7
|
-
export declare function MintMoneyProvider({
|
|
8
|
-
config,
|
|
9
|
-
children,
|
|
10
|
-
}: MintMoneyProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function MintMoneyProvider({ config, children, }: MintMoneyProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
8
|
export declare function useMintMoneyConfig(): Config;
|
|
12
|
-
//# sourceMappingURL=context.d.ts.map
|
|
9
|
+
//# sourceMappingURL=context.d.ts.map
|
package/dist/types/index.d.ts
CHANGED