@rovela-ai/sdk 0.1.57 → 0.1.58

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CheckoutSuccess.d.ts","sourceRoot":"","sources":["../../../src/checkout/components/CheckoutSuccess.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAMpD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,KAAK,EACL,SAAS,EACT,oBAA0B,EAC1B,aAAa,EACb,OAAO,GACR,EAAE,oBAAoB,2CAsFtB"}
1
+ {"version":3,"file":"CheckoutSuccess.d.ts","sourceRoot":"","sources":["../../../src/checkout/components/CheckoutSuccess.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAMpD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,KAAK,EACL,SAAS,EACT,oBAA0B,EAC1B,aAAa,EACb,OAAO,GACR,EAAE,oBAAoB,2CA+FtB"}
@@ -7,8 +7,8 @@
7
7
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  import { useEffect } from 'react';
9
9
  import { Check, Truck, HelpCircle } from 'lucide-react';
10
- import { useCheckoutSuccess } from '../hooks/useCheckout';
11
10
  import { cn } from '../../core/utils';
11
+ import { useStoreSettingsOptional } from '../../core/StoreSettingsProvider';
12
12
  // =============================================================================
13
13
  // Component
14
14
  // =============================================================================
@@ -34,13 +34,16 @@ import { cn } from '../../core/utils';
34
34
  * ```
35
35
  */
36
36
  export function CheckoutSuccess({ orderId, email, className, continueShoppingHref = '/', viewOrderHref, onMount, }) {
37
- const { sessionId } = useCheckoutSuccess();
37
+ // Get store settings for support email and shipping enabled
38
+ const storeSettings = useStoreSettingsOptional();
39
+ const supportEmail = storeSettings?.supportEmail;
40
+ const shippingEnabled = storeSettings?.settings?.shippingEnabled ?? true;
38
41
  // Call onMount callback (e.g., to clear cart)
39
42
  useEffect(() => {
40
43
  if (onMount) {
41
44
  onMount();
42
45
  }
43
46
  }, [onMount]);
44
- return (_jsxs("div", { className: cn('text-center py-12 px-4', className), children: [_jsx("div", { className: "mx-auto w-16 h-16 rounded-full bg-green-100 flex items-center justify-center mb-6", children: _jsx(Check, { className: "w-8 h-8 text-green-600" }) }), _jsx("h1", { className: "text-2xl font-bold mb-2", children: "Thank you for your order!" }), _jsx("p", { className: "text-muted-foreground mb-6 max-w-md mx-auto", children: email ? (_jsxs(_Fragment, { children: ["We've sent a confirmation email to", ' ', _jsx("span", { className: "font-medium text-foreground", children: email }), "."] })) : ('A confirmation email has been sent to your email address.') }), (orderId || sessionId) && (_jsxs("div", { className: "bg-muted rounded-lg p-4 mb-8 max-w-sm mx-auto", children: [_jsx("p", { className: "text-sm text-muted-foreground mb-1", children: orderId ? 'Order ID' : 'Confirmation ID' }), _jsx("p", { className: "font-mono font-medium", children: orderId || sessionId })] })), _jsxs("div", { className: "flex flex-col sm:flex-row gap-4 justify-center", children: [viewOrderHref && orderId && (_jsx("a", { href: viewOrderHref.replace('{orderId}', orderId), className: cn('inline-flex items-center justify-center', 'px-6 py-3 rounded-md font-medium', 'bg-primary text-primary-foreground', 'hover:bg-primary/90 transition-colors'), children: "View Order" })), _jsx("a", { href: continueShoppingHref, className: cn('inline-flex items-center justify-center', 'px-6 py-3 rounded-md font-medium', 'border border-input bg-background', 'hover:bg-accent hover:text-accent-foreground', 'transition-colors'), children: "Continue Shopping" })] }), _jsxs("div", { className: "mt-12 text-sm text-muted-foreground space-y-2", children: [_jsxs("p", { children: [_jsx(Truck, { className: "inline-block w-4 h-4 mr-1" }), "You'll receive a shipping confirmation when your order ships."] }), _jsxs("p", { children: [_jsx(HelpCircle, { className: "inline-block w-4 h-4 mr-1" }), "Questions? Contact us at support@example.com"] })] })] }));
47
+ return (_jsxs("div", { className: cn('text-center py-12 px-4', className), children: [_jsx("div", { className: "mx-auto w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mb-6", children: _jsx(Check, { className: "w-8 h-8 text-primary" }) }), _jsx("h1", { className: "text-2xl font-bold mb-2", children: "Thank you for your order!" }), _jsx("p", { className: "text-muted-foreground mb-6 max-w-md mx-auto", children: email ? (_jsxs(_Fragment, { children: ["We've sent a confirmation email to", ' ', _jsx("span", { className: "font-medium text-foreground", children: email }), "."] })) : ('A confirmation email has been sent to your email address.') }), orderId && (_jsxs("div", { className: "bg-muted rounded-lg p-4 mb-8 max-w-sm mx-auto", children: [_jsx("p", { className: "text-sm text-muted-foreground mb-1", children: "Order ID" }), _jsx("p", { className: "font-mono font-medium", children: orderId })] })), _jsxs("div", { className: "flex flex-col sm:flex-row gap-4 justify-center", children: [viewOrderHref && orderId && (_jsx("a", { href: viewOrderHref.replace('{orderId}', orderId), className: cn('inline-flex items-center justify-center', 'px-6 py-3 rounded-md font-medium', 'bg-primary text-primary-foreground', 'hover:bg-primary/90 transition-colors'), children: "View Order" })), _jsx("a", { href: continueShoppingHref, className: cn('inline-flex items-center justify-center', 'px-6 py-3 rounded-md font-medium', 'border border-input bg-background', 'hover:bg-accent hover:text-accent-foreground', 'transition-colors'), children: "Continue Shopping" })] }), _jsxs("div", { className: "mt-12 text-sm text-muted-foreground space-y-2", children: [shippingEnabled && (_jsxs("p", { children: [_jsx(Truck, { className: "inline-block w-4 h-4 mr-1" }), "You'll receive a shipping confirmation when your order ships."] })), supportEmail && (_jsxs("p", { children: [_jsx(HelpCircle, { className: "inline-block w-4 h-4 mr-1" }), "Questions? Contact us at", ' ', _jsx("a", { href: `mailto:${supportEmail}`, className: "text-primary hover:underline", children: supportEmail })] }))] })] }));
45
48
  }
46
49
  //# sourceMappingURL=CheckoutSuccess.js.map
@@ -1 +1 @@
1
- {"version":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G,SAAS,EAAC,oCAAoC,YAC9C,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,GACvC,EACJ,YAAG,SAAS,EAAC,uBAAuB,YACjC,OAAO,IAAI,SAAS,GACnB,IACA,CACP,EAGD,eAAK,SAAS,EAAC,gDAAgD,aAC5D,aAAa,IAAI,OAAO,IAAI,CAC3B,YACE,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,EACjD,SAAS,EAAE,EAAE,CACX,yCAAyC,EACzC,kCAAkC,EAClC,oCAAoC,EACpC,uCAAuC,CACxC,2BAGC,CACL,EACD,YACE,IAAI,EAAE,oBAAoB,EAC1B,SAAS,EAAE,EAAE,CACX,yCAAyC,EACzC,kCAAkC,EAClC,mCAAmC,EACnC,8CAA8C,EAC9C,mBAAmB,CACpB,kCAGC,IACA,EAGN,eAAK,SAAS,EAAC,+CAA+C,aAC5D,wBACE,KAAC,KAAK,IAAC,SAAS,EAAC,2BAA2B,GAAG,qEAE7C,EACJ,wBACE,KAAC,UAAU,IAAC,SAAS,EAAC,2BAA2B,GAAG,oDAElD,IACA,IACF,CACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"CheckoutSuccess.js","sourceRoot":"","sources":["../../../src/checkout/components/CheckoutSuccess.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,CAAA;;AAEZ,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAA;AAG3E,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,OAAO,EACP,KAAK,EACL,SA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,CACX,yCAAyC,EACzC,kCAAkC,EAClC,mCAAmC,EACnC,8CAA8C,EAC9C,mBAAmB,CACpB,kCAGC,IACA,EAGN,eAAK,SAAS,EAAC,+CAA+C,aAC3D,eAAe,IAAI,CAClB,wBACE,KAAC,KAAK,IAAC,SAAS,EAAC,2BAA2B,GAAG,qEAE7C,CACL,EACA,YAAY,IAAI,CACf,wBACE,KAAC,UAAU,IAAC,SAAS,EAAC,2BAA2B,GAAG,8BAC3B,GAAG,EAC5B,YACE,IAAI,EAAE,UAAU,YAAY,EAAE,EAC9B,SAAS,EAAC,8BAA8B,YAEvC,YAAY,GACX,IACF,CACL,IACG,IACF,CACP,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rovela-ai/sdk",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "description": "Rovela SDK - Pre-built e-commerce components for AI-powered store generation",
5
5
  "type": "module",
6
6
  "license": "MIT",