@anpayeras/agnostic-checkout 0.1.9 → 0.1.11
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/components/accordion-layout.d.ts +3 -0
- package/dist/components/accordion-layout.d.ts.map +1 -0
- package/dist/components/checkout-content.d.ts +2 -1
- package/dist/components/checkout-content.d.ts.map +1 -1
- package/dist/components/{CheckoutLayout.d.ts → checkout-layout.d.ts} +1 -1
- package/dist/components/checkout-layout.d.ts.map +1 -0
- package/dist/components/{Checkout.d.ts → checkout.d.ts} +1 -1
- package/dist/components/checkout.d.ts.map +1 -0
- package/dist/components/dev-tools.d.ts.map +1 -1
- package/dist/components/{FeedbackScreen.d.ts → feedback-screen.d.ts} +1 -1
- package/dist/components/feedback-screen.d.ts.map +1 -0
- package/dist/components/mobile-bar.d.ts +2 -3
- package/dist/components/mobile-bar.d.ts.map +1 -1
- package/dist/components/mobile-order-bar.d.ts +3 -0
- package/dist/components/mobile-order-bar.d.ts.map +1 -0
- package/dist/components/order-sidebar-summary.d.ts +3 -0
- package/dist/components/order-sidebar-summary.d.ts.map +1 -0
- package/dist/components/order-summary.d.ts +4 -0
- package/dist/components/order-summary.d.ts.map +1 -0
- package/dist/components/{PaymentForm.d.ts → payment-form.d.ts} +1 -1
- package/dist/components/payment-form.d.ts.map +1 -0
- package/dist/components/payment-methods.d.ts +4 -0
- package/dist/components/payment-methods.d.ts.map +1 -0
- package/dist/components/shipping-methods.d.ts +3 -0
- package/dist/components/shipping-methods.d.ts.map +1 -0
- package/dist/components/types.d.ts +41 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +16 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +19 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +6 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/selectable-card.d.ts +15 -0
- package/dist/components/ui/selectable-card.d.ts.map +1 -0
- package/dist/components/ui/spinner.d.ts +7 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/core/checkout-context.d.ts +10 -1
- package/dist/core/checkout-context.d.ts.map +1 -1
- package/dist/core/checkout-machine.d.ts +1 -1
- package/dist/core/checkout-machine.d.ts.map +1 -1
- package/dist/core/event-system.d.ts +3 -0
- package/dist/core/event-system.d.ts.map +1 -1
- package/dist/core/i18n-context.d.ts.map +1 -1
- package/dist/hooks/useCheckout.d.ts +12 -1
- package/dist/hooks/useCheckout.d.ts.map +1 -1
- package/dist/index.cjs +49 -29
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1666 -1267
- package/dist/locales/en.d.ts.map +1 -1
- package/dist/locales/es.d.ts.map +1 -1
- package/dist/locales/pt-BR.d.ts.map +1 -1
- package/dist/locales/types.d.ts +5 -0
- package/dist/locales/types.d.ts.map +1 -1
- package/dist/plugins/cart-edit-plugin.d.ts.map +1 -1
- package/dist/plugins/discount-plugin.d.ts.map +1 -1
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/plugin-context.d.ts.map +1 -1
- package/dist/plugins/shipping-plugin.d.ts +27 -0
- package/dist/plugins/shipping-plugin.d.ts.map +1 -0
- package/dist/plugins/types.d.ts +3 -0
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/utils/utils.d.ts +1 -0
- package/dist/utils/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/components/Checkout.d.ts.map +0 -1
- package/dist/components/CheckoutLayout.d.ts.map +0 -1
- package/dist/components/FeedbackScreen.d.ts.map +0 -1
- package/dist/components/MobileOrderBar.d.ts +0 -10
- package/dist/components/MobileOrderBar.d.ts.map +0 -1
- package/dist/components/OrderSidebarSummary.d.ts +0 -3
- package/dist/components/OrderSidebarSummary.d.ts.map +0 -1
- package/dist/components/OrderSummary.d.ts +0 -2
- package/dist/components/OrderSummary.d.ts.map +0 -1
- package/dist/components/PaymentForm.d.ts.map +0 -1
- package/dist/components/PaymentMethods.d.ts +0 -2
- package/dist/components/PaymentMethods.d.ts.map +0 -1
- package/dist/components/button.d.ts +0 -3
- package/dist/components/button.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-layout.d.ts","sourceRoot":"","sources":["../../src/components/accordion-layout.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,eAAe,GAAI,iBAAiB,oBAAoB,4CAwPpE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare const CheckoutContent: ({ devTools }: {
|
|
1
|
+
export declare const CheckoutContent: ({ devTools, layout, }: {
|
|
2
2
|
devTools?: boolean;
|
|
3
|
+
layout?: "single-page" | "accordion";
|
|
3
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
//# sourceMappingURL=checkout-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-content.d.ts","sourceRoot":"","sources":["../../src/components/checkout-content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkout-content.d.ts","sourceRoot":"","sources":["../../src/components/checkout-content.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,eAAe,GAAI,uBAG7B;IACC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,aAAa,GAAG,WAAW,CAAC;CACxC,4CAmFA,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CheckoutLayoutProps } from './types';
|
|
2
2
|
export declare const CheckoutLayout: ({ children, sidebar, className, ...props }: CheckoutLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=checkout-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkout-layout.d.ts","sourceRoot":"","sources":["../../src/components/checkout-layout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,cAAc,GAAI,4CAA4C,mBAAmB,4CA8B7F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../src/components/checkout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-tools.d.ts","sourceRoot":"","sources":["../../src/components/dev-tools.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev-tools.d.ts","sourceRoot":"","sources":["../../src/components/dev-tools.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,+CAgFpB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FeedbackScreenProps } from './types';
|
|
2
2
|
export declare const FeedbackScreen: ({ title, description, actions, variant, children, }: FeedbackScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=feedback-screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback-screen.d.ts","sourceRoot":"","sources":["../../src/components/feedback-screen.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,SAAS,CAAC;AA4BlE,eAAO,MAAM,cAAc,GAAI,qDAM5B,mBAAmB,4CAqFrB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
1
|
+
import { MobileBarProps } from './types';
|
|
2
|
+
export declare const MobileBar: ({ step, hasShipping, layout }: MobileBarProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
3
|
//# sourceMappingURL=mobile-bar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-bar.d.ts","sourceRoot":"","sources":["../../src/components/mobile-bar.tsx"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"mobile-bar.d.ts","sourceRoot":"","sources":["../../src/components/mobile-bar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,SAAS,GAAI,+BAA+C,cAAc,mDAgDtF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-order-bar.d.ts","sourceRoot":"","sources":["../../src/components/mobile-order-bar.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,cAAc,GAAI,qEAM5B,mBAAmB,4CAuHrB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { OrderSidebarSummaryProps } from './types';
|
|
2
|
+
export declare const OrderSidebarSummary: ({ showItems: propShowItems, isLoading, hasShipping, layout }: OrderSidebarSummaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=order-sidebar-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-sidebar-summary.d.ts","sourceRoot":"","sources":["../../src/components/order-sidebar-summary.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGxD,eAAO,MAAM,mBAAmB,GAAI,8DAA8E,wBAAwB,4CA8HzI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-summary.d.ts","sourceRoot":"","sources":["../../src/components/order-summary.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,GAAI,iBAAgB;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,4CA+EzE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const PaymentForm: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=payment-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-form.d.ts","sourceRoot":"","sources":["../../src/components/payment-form.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,+CA+FvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-methods.d.ts","sourceRoot":"","sources":["../../src/components/payment-methods.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,cAAc,GAAI,iBAAgB;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,4CA4E3E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shipping-methods.d.ts","sourceRoot":"","sources":["../../src/components/shipping-methods.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,eAAe,GAAI,yBAAyB,oBAAoB,4CAyD5E,CAAC"}
|
|
@@ -5,25 +5,44 @@ import { CartController, CheckoutItem, CheckoutTotals, FractalButtonVariant, Pay
|
|
|
5
5
|
import { CheckoutTheme, CheckoutThemeName } from '../theme/tokens';
|
|
6
6
|
import { CheckoutMessages, CheckoutFormatters, SupportedCurrency, CheckoutLocale } from '../locales/types';
|
|
7
7
|
import { CheckoutPlugin } from '../plugins/types';
|
|
8
|
+
import { ShippingMethod } from '../plugins/shipping-plugin';
|
|
8
9
|
export interface CheckoutProps {
|
|
10
|
+
/** Array of items currently in the cart to be displayed in the order summary. */
|
|
9
11
|
items: CheckoutItem[];
|
|
12
|
+
/** Calculated totals including subtotal, taxes, shipping, discounts, and final total. */
|
|
10
13
|
totals: CheckoutTotals;
|
|
14
|
+
/** Available payment methods to present to the user (e.g., credit card, PayPal, etc.). */
|
|
11
15
|
paymentMethods: PaymentMethod[];
|
|
16
|
+
/** The core payment provider integration responsible for processing the payment. */
|
|
12
17
|
provider: PaymentProvider;
|
|
18
|
+
/** Currency code used for formatting prices (e.g., 'USD', 'EUR', 'ARS'). */
|
|
13
19
|
currency: SupportedCurrency;
|
|
20
|
+
/** Locale applied for internationalization and formatting (e.g., 'en', 'es'). Defaults to 'en'. */
|
|
14
21
|
locale?: CheckoutLocale;
|
|
22
|
+
/** UI theme preset to use, or partial theme configuration to override the default. */
|
|
15
23
|
theme?: CheckoutThemeName | Partial<CheckoutTheme>;
|
|
24
|
+
/** Base brand color used to auto-generate a custom theme palette. */
|
|
16
25
|
brandColor?: string;
|
|
26
|
+
/** Specific custom theme tokens to override properties of the active theme. */
|
|
17
27
|
customTheme?: Partial<CheckoutTheme>;
|
|
28
|
+
/** Callback function triggered when various core checkout actions occur (e.g., item update, payment submitted). */
|
|
18
29
|
onEvent?: EventHandler;
|
|
30
|
+
/** Optional controller to handle external cart actions programmatically. */
|
|
19
31
|
cartController?: CartController;
|
|
32
|
+
/** If provided, initializes the checkout directly into a feedback state (e.g., success, error) instead of the review step. */
|
|
20
33
|
initialState?: Extract<PaymentResult, {
|
|
21
34
|
status: "success" | "error" | "pending";
|
|
22
35
|
}>;
|
|
36
|
+
/** Enable Developer Tools panel to mock scenarios and intercept events. */
|
|
23
37
|
devTools?: boolean;
|
|
38
|
+
/** Custom override text messages to tailor the localization. */
|
|
24
39
|
messages?: Partial<CheckoutMessages>;
|
|
40
|
+
/** Optional custom formatting functions for prices and dates instead of defaults. */
|
|
25
41
|
formatters?: CheckoutFormatters;
|
|
42
|
+
/** Array of plugins to extend the core functionality (like shipping, cart editing, discounts). */
|
|
26
43
|
plugins?: CheckoutPlugin[];
|
|
44
|
+
/** Defines the visual structure of the checkout page. Defaults to 'single-page'. */
|
|
45
|
+
layout?: "single-page" | "accordion";
|
|
27
46
|
}
|
|
28
47
|
export interface CheckoutLayoutProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
29
48
|
children: React.ReactNode;
|
|
@@ -53,5 +72,27 @@ export interface ButtonProps {
|
|
|
53
72
|
export interface OrderSidebarSummaryProps {
|
|
54
73
|
showItems?: boolean;
|
|
55
74
|
isLoading?: boolean;
|
|
75
|
+
hasShipping?: boolean;
|
|
76
|
+
layout?: "single-page" | "accordion";
|
|
77
|
+
}
|
|
78
|
+
export type MockScenario = 'success' | 'pending' | 'error' | 'redirect';
|
|
79
|
+
export interface MobileOrderBarProps {
|
|
80
|
+
onAction?: () => void;
|
|
81
|
+
actionLabel?: string;
|
|
82
|
+
actionDisabled?: boolean;
|
|
83
|
+
isSubmitting?: boolean;
|
|
84
|
+
showItems?: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface ShippingMethodsProps {
|
|
87
|
+
methods: ShippingMethod[];
|
|
88
|
+
hideHeader?: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface AccordionLayoutProps {
|
|
91
|
+
hasShipping: boolean;
|
|
92
|
+
}
|
|
93
|
+
export interface MobileBarProps {
|
|
94
|
+
step: string;
|
|
95
|
+
hasShipping?: boolean;
|
|
96
|
+
layout?: "single-page" | "accordion";
|
|
56
97
|
}
|
|
57
98
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY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AAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,aAAa,GAAG,WAAW,CAAC;CACxC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface BadgeProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
variant?: "default" | "success" | "error" | "primary" | "outline";
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Badge: ({ children, variant, className }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,UAAU;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,GAAI,kCAA8C,UAAU,4CAgB7E,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
label: string;
|
|
4
|
+
onPress?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
5
|
+
variant?: "solid" | "outline" | "ghost" | "primary";
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
type?: "button" | "submit" | "reset";
|
|
12
|
+
id?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Button: ({ label, onPress, variant, size, icon, loading, disabled, className, type, id, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,UAAU,WAAW;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC3D,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACpD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,MAAM,GAAI,kFAWpB,WAAW,4CA8Bb,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface CardProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
variant?: "default" | "active" | "flat";
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
id?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Card: ({ children, className, variant, onClick, id }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const CardContent: ({ children, className }: {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const CardHeader: ({ children, className }: {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,SAAS;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,IAAI,GAAI,+CAA2D,SAAS,4CAiBxF,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,yBAAyB;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,4CAE/F,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,yBAAyB;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,4CAE9F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface SelectableCardProps {
|
|
3
|
+
isSelected: boolean;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
rightElement?: ReactNode;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const SelectableCard: ({ isSelected, onClick, icon, title, description, rightElement, children, className, disabled }: SelectableCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=selectable-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectable-card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/selectable-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,mBAAmB;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,GAAI,gGAU5B,mBAAmB,4CA+CrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/spinner.tsx"],"names":[],"mappings":"AAGA,UAAU,YAAY;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,OAAO,GAAI,qBAA4B,YAAY,4CAY/D,CAAC"}
|
|
@@ -12,11 +12,13 @@ interface CheckoutContextState {
|
|
|
12
12
|
locale: string;
|
|
13
13
|
step: CheckoutState;
|
|
14
14
|
selectedMethodId: string | null;
|
|
15
|
+
selectedShippingMethodId: string | null;
|
|
15
16
|
totals: CheckoutTotals;
|
|
16
17
|
cartController?: CartController;
|
|
17
18
|
theme?: CheckoutTheme;
|
|
18
19
|
error: string | null;
|
|
19
20
|
paymentResult?: PaymentResult;
|
|
21
|
+
readyMap: Record<string, boolean>;
|
|
20
22
|
}
|
|
21
23
|
type Action = {
|
|
22
24
|
type: "SET_STEP";
|
|
@@ -24,6 +26,9 @@ type Action = {
|
|
|
24
26
|
} | {
|
|
25
27
|
type: "SELECT_METHOD";
|
|
26
28
|
methodId: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: "SELECT_SHIPPING_METHOD";
|
|
31
|
+
methodId: string;
|
|
27
32
|
} | {
|
|
28
33
|
type: "SET_ERROR";
|
|
29
34
|
error: string | null;
|
|
@@ -37,10 +42,14 @@ type Action = {
|
|
|
37
42
|
} | {
|
|
38
43
|
type: "SET_PAYMENT_RESULT";
|
|
39
44
|
result: PaymentResult;
|
|
45
|
+
} | {
|
|
46
|
+
type: "SET_METHOD_READY";
|
|
47
|
+
methodId: string;
|
|
48
|
+
ready: boolean;
|
|
40
49
|
};
|
|
41
50
|
export declare const CheckoutProvider: ({ children, config, initialStatus, onEvent, }: {
|
|
42
51
|
children: ReactNode;
|
|
43
|
-
config: Omit<CheckoutContextState, "step" | "selectedMethodId" | "error" | "paymentResult">;
|
|
52
|
+
config: Omit<CheckoutContextState, "step" | "selectedMethodId" | "selectedShippingMethodId" | "error" | "paymentResult" | "readyMap">;
|
|
44
53
|
initialStatus?: Extract<PaymentResult, {
|
|
45
54
|
status: "success" | "error" | "pending";
|
|
46
55
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-context.d.ts","sourceRoot":"","sources":["../../src/core/checkout-context.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkout-context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IAAI,EAAE,wBAAwB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,YAAY,EAAE,CAAC;IAAC,MAAM,EAAE,cAAc,CAAA;CAAE,GACrE;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAgCrE,eAAO,MAAM,gBAAgB,GAAI,+CAK9B;IACC,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,kBAAkB,GAAG,0BAA0B,GAAG,OAAO,GAAG,eAAe,GAAG,UAAU,CAAC,CAAC;IACtI,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,EAAE;QAAE,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;IACpF,OAAO,CAAC,EAAE,YAAY,CAAC;CAC1B,4CA8BA,CAAC;AAEF,eAAO,MAAM,kBAAkB;WAvEpB,oBAAoB;cACjB,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;eACrB,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI;cAC/B,MAAM,EAAE;CA4ErB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type CheckoutState = "review" | "payment_method" | "payment_details" | "processing" | "pending" | "redirect" | "success" | "error";
|
|
1
|
+
export type CheckoutState = "review" | "shipping_method" | "payment_method" | "payment_details" | "processing" | "pending" | "redirect" | "success" | "error";
|
|
2
2
|
export declare const isValidTransition: (from: CheckoutState, to: CheckoutState) => boolean;
|
|
3
3
|
//# sourceMappingURL=checkout-machine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-machine.d.ts","sourceRoot":"","sources":["../../src/core/checkout-machine.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACnB,QAAQ,GACR,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,SAAS,GACT,UAAU,GACV,SAAS,GACT,OAAO,CAAC;AAEd,eAAO,MAAM,iBAAiB,GAAI,MAAM,aAAa,EAAE,IAAI,aAAa,KAAG,
|
|
1
|
+
{"version":3,"file":"checkout-machine.d.ts","sourceRoot":"","sources":["../../src/core/checkout-machine.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACnB,QAAQ,GACR,iBAAiB,GACjB,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,SAAS,GACT,UAAU,GACV,SAAS,GACT,OAAO,CAAC;AAEd,eAAO,MAAM,iBAAiB,GAAI,MAAM,aAAa,EAAE,IAAI,aAAa,KAAG,OAc1E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-system.d.ts","sourceRoot":"","sources":["../../src/core/event-system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,MAAM,aAAa,GACnB;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE,GAC7C;IAAE,IAAI,EAAE,yBAAyB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,mBAAmB,CAAA;CAAE,GAC7B;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACl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IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC5E;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-context.d.ts","sourceRoot":"","sources":["../../src/core/i18n-context.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"i18n-context.d.ts","sourceRoot":"","sources":["../../src/core/i18n-context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAI7E,UAAU,gBAAgB;IACtB,CAAC,EAAE,gBAAgB,CAAC;IACpB,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACnC;AAID,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,GAAI,sDAAsD,iBAAiB,4CAYnG,CAAC;AAEF,eAAO,MAAM,OAAO,QAAO,gBAM1B,CAAC"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { CheckoutState } from '../core/checkout-machine';
|
|
2
2
|
export declare const useCheckout: () => {
|
|
3
|
+
totals: {
|
|
4
|
+
subtotal: number;
|
|
5
|
+
discount?: number;
|
|
6
|
+
taxes?: number;
|
|
7
|
+
shipping?: number;
|
|
8
|
+
total: number;
|
|
9
|
+
};
|
|
3
10
|
setStep: (step: CheckoutState) => void;
|
|
4
11
|
selectMethod: (methodId: string) => void;
|
|
12
|
+
selectShippingMethod: (methodId: string) => void;
|
|
5
13
|
submitPayment: (data: unknown) => Promise<void>;
|
|
6
14
|
setError: (error: string) => void;
|
|
15
|
+
setMethodReady: (methodId: string, ready: boolean) => void;
|
|
16
|
+
isMethodReady: boolean;
|
|
7
17
|
updateQuantity: (id: string, qty: number) => Promise<void>;
|
|
8
18
|
removeItem: (id: string) => Promise<void>;
|
|
9
19
|
applyCoupon: (code: string) => Promise<boolean>;
|
|
@@ -17,10 +27,11 @@ export declare const useCheckout: () => {
|
|
|
17
27
|
locale: string;
|
|
18
28
|
step: CheckoutState;
|
|
19
29
|
selectedMethodId: string | null;
|
|
20
|
-
|
|
30
|
+
selectedShippingMethodId: string | null;
|
|
21
31
|
cartController?: import('..').CartController;
|
|
22
32
|
theme?: import('..').CheckoutTheme;
|
|
23
33
|
error: string | null;
|
|
24
34
|
paymentResult?: import('..').PaymentResult;
|
|
35
|
+
readyMap: Record<string, boolean>;
|
|
25
36
|
};
|
|
26
37
|
//# sourceMappingURL=useCheckout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCheckout.d.ts","sourceRoot":"","sources":["../../src/hooks/useCheckout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCheckout.d.ts","sourceRoot":"","sources":["../../src/hooks/useCheckout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,WAAW;;;;;;;;oBAIG,aAAa;6BAKJ,MAAM;qCAKE,MAAM;0BAgBX,OAAO;sBAyCjB,MAAM;+BApDG,MAAM,SAAS,OAAO;;yBAyDtB,MAAM,OAAO,MAAM;qBAMvB,MAAM;wBAMH,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;wBAW3B,OAAO,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;CAgDlD,CAAC"}
|