@deneb-ui/ui 2.0.122 → 2.0.123

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.
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ export interface EditableCheckoutProps {
3
+ basePath?: string;
4
+ apiEndpoint?: string;
5
+ configEndpoint?: string;
6
+ successUrl?: string;
7
+ shopSlug?: string;
8
+ whatsappNumber?: string;
9
+ storeName?: string;
10
+ currency?: string;
11
+ defaultDeliveryFee?: number;
12
+ freeDeliveryThreshold?: number;
13
+ checkoutMode?: 'WHATSAPP_ONLY' | 'FULL_ECOMMERCE';
14
+ ecommerceEnabled?: boolean;
15
+ className?: string;
16
+ onOrderPlaced?: (orderResult: any) => void;
17
+ inlineSuccess?: boolean;
18
+ }
19
+ /**
20
+ * Universal Editable Checkout Component for DENEB UI & Fivora
21
+ *
22
+ * Works seamlessly in both:
23
+ * 1. Showcase / WhatsApp Mode (instant order compilation into direct WhatsApp chat)
24
+ * 2. Full E-Commerce Mode (online card payments via PayHere, Cash on Delivery, Bank Transfer, inventory sync)
25
+ *
26
+ * Compliant with Fivora Visual Editing contract and Next.js static exports.
27
+ * Created by Chamika Gayashan & Induranga Kawishwara.
28
+ */
29
+ export declare function EditableCheckout({ basePath, apiEndpoint, configEndpoint, successUrl, shopSlug: customSlug, whatsappNumber: customWhatsapp, storeName: customStoreName, currency: customCurrency, defaultDeliveryFee: customDeliveryFee, freeDeliveryThreshold: customFreeDeliveryThreshold, checkoutMode: propCheckoutMode, ecommerceEnabled: propEcommerceEnabled, className, onOrderPlaced, inlineSuccess, }: EditableCheckoutProps): React.JSX.Element;
@@ -0,0 +1,333 @@
1
+ "use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.EditableCheckout = EditableCheckout;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const react_1 = require("react");
7
+ const useCart_1 = require("./cart/useCart");
8
+ const SiteDataProvider_1 = require("./SiteDataProvider");
9
+ const urls_1 = require("./utils/urls");
10
+ const EditableOrderSuccess_1 = require("./EditableOrderSuccess");
11
+ /**
12
+ * Universal Editable Checkout Component for DENEB UI & Fivora
13
+ *
14
+ * Works seamlessly in both:
15
+ * 1. Showcase / WhatsApp Mode (instant order compilation into direct WhatsApp chat)
16
+ * 2. Full E-Commerce Mode (online card payments via PayHere, Cash on Delivery, Bank Transfer, inventory sync)
17
+ *
18
+ * Compliant with Fivora Visual Editing contract and Next.js static exports.
19
+ * Created by Chamika Gayashan & Induranga Kawishwara.
20
+ */
21
+ function EditableCheckout({ basePath = 'checkout', apiEndpoint, configEndpoint, successUrl = '/order-success', shopSlug: customSlug, whatsappNumber: customWhatsapp, storeName: customStoreName, currency: customCurrency = 'LKR', defaultDeliveryFee: customDeliveryFee, freeDeliveryThreshold: customFreeDeliveryThreshold, checkoutMode: propCheckoutMode, ecommerceEnabled: propEcommerceEnabled, className = '', onOrderPlaced, inlineSuccess = true, }) {
22
+ const [placedOrder, setPlacedOrder] = (0, react_1.useState)(null);
23
+ const { items, subtotal, totalCount, updateQuantity, removeItem, clearCart, getWhatsAppOrderUrl } = (0, useCart_1.useCart)();
24
+ const siteData = (0, SiteDataProvider_1.useSiteData)();
25
+ const [mounted, setMounted] = (0, react_1.useState)(false);
26
+ const [loadingConfig, setLoadingConfig] = (0, react_1.useState)(true);
27
+ const [submitting, setSubmitting] = (0, react_1.useState)(false);
28
+ const [errorMessage, setErrorMessage] = (0, react_1.useState)(null);
29
+ // Form Fields
30
+ const [customerName, setCustomerName] = (0, react_1.useState)('');
31
+ const [customerPhone, setCustomerPhone] = (0, react_1.useState)('');
32
+ const [customerEmail, setCustomerEmail] = (0, react_1.useState)('');
33
+ const [deliveryType, setDeliveryType] = (0, react_1.useState)('DELIVERY');
34
+ const [shippingAddress, setShippingAddress] = (0, react_1.useState)('');
35
+ const [shippingCity, setShippingCity] = (0, react_1.useState)('');
36
+ const [shippingPostalCode, setShippingPostalCode] = (0, react_1.useState)('');
37
+ const [customerNotes, setCustomerNotes] = (0, react_1.useState)('');
38
+ const [paymentMethod, setPaymentMethod] = (0, react_1.useState)('COD');
39
+ const [honeypot, setHoneypot] = (0, react_1.useState)('');
40
+ // Server Payment Config
41
+ const [remoteConfig, setRemoteConfig] = (0, react_1.useState)(null);
42
+ (0, react_1.useEffect)(() => {
43
+ setMounted(true);
44
+ // Dynamically inject PayHere SDK script for seamless on-page checkout popup
45
+ if (typeof window !== 'undefined' && !document.getElementById('payhere-sdk')) {
46
+ const script = document.createElement('script');
47
+ script.id = 'payhere-sdk';
48
+ script.src = 'https://www.payhere.lk/lib/payhere.js';
49
+ script.async = true;
50
+ document.body.appendChild(script);
51
+ }
52
+ }, []);
53
+ // Determine Shop Slug
54
+ const resolvedSlug = (0, react_1.useMemo)(() => {
55
+ if (customSlug)
56
+ return customSlug;
57
+ if (siteData?.shop?.slug)
58
+ return siteData.shop.slug;
59
+ if (siteData?.site?.slug)
60
+ return siteData.site.slug;
61
+ if (typeof window !== 'undefined') {
62
+ const hostname = window.location.hostname;
63
+ return hostname.split('.')[0] || 'default';
64
+ }
65
+ return 'default';
66
+ }, [customSlug, siteData]);
67
+ const effectiveConfigUrl = (0, react_1.useMemo)(() => {
68
+ if (configEndpoint)
69
+ return configEndpoint;
70
+ return resolvedSlug && resolvedSlug !== 'default'
71
+ ? '/site-orders/' + resolvedSlug + '/config'
72
+ : '/site-orders/config';
73
+ }, [configEndpoint, resolvedSlug]);
74
+ const effectiveApiUrl = (0, react_1.useMemo)(() => {
75
+ if (apiEndpoint)
76
+ return apiEndpoint;
77
+ return resolvedSlug && resolvedSlug !== 'default'
78
+ ? '/site-orders/' + resolvedSlug + '/create'
79
+ : '/site-orders/create';
80
+ }, [apiEndpoint, resolvedSlug]);
81
+ // Fetch Store Payment & Checkout Configuration
82
+ (0, react_1.useEffect)(() => {
83
+ if (!mounted)
84
+ return;
85
+ let cancelled = false;
86
+ async function loadConfig() {
87
+ try {
88
+ const res = await fetch(effectiveConfigUrl);
89
+ if (res.ok) {
90
+ const data = await res.json();
91
+ if (!cancelled) {
92
+ setRemoteConfig(data);
93
+ if (data.payHereEnabled) {
94
+ setPaymentMethod('PAYHERE');
95
+ }
96
+ else if (data.codEnabled) {
97
+ setPaymentMethod('COD');
98
+ }
99
+ else if (data.bankDepositEnabled) {
100
+ setPaymentMethod('BANK_TRANSFER');
101
+ }
102
+ }
103
+ }
104
+ }
105
+ catch {
106
+ // Fallback to static siteData defaults
107
+ }
108
+ finally {
109
+ if (!cancelled)
110
+ setLoadingConfig(false);
111
+ }
112
+ }
113
+ loadConfig();
114
+ return () => {
115
+ cancelled = true;
116
+ };
117
+ }, [mounted, effectiveConfigUrl]);
118
+ // Resolve Store Capabilities
119
+ const isEcommerceActive = (0, react_1.useMemo)(() => {
120
+ if (propEcommerceEnabled !== undefined)
121
+ return propEcommerceEnabled;
122
+ if (propCheckoutMode !== undefined)
123
+ return propCheckoutMode === 'FULL_ECOMMERCE';
124
+ if (remoteConfig)
125
+ return remoteConfig.ecommerceEnabled && remoteConfig.checkoutMode === 'FULL_ECOMMERCE';
126
+ if (siteData?.ecommerceEnabled !== undefined)
127
+ return Boolean(siteData.ecommerceEnabled);
128
+ if (siteData?.checkoutMode !== undefined)
129
+ return siteData.checkoutMode === 'FULL_ECOMMERCE';
130
+ return false;
131
+ }, [propEcommerceEnabled, propCheckoutMode, remoteConfig, siteData]);
132
+ const resolvedWhatsapp = (0, react_1.useMemo)(() => {
133
+ return (customWhatsapp ||
134
+ remoteConfig?.whatsappNumber ||
135
+ siteData?.shop?.businessWhatsapp ||
136
+ siteData?.shop?.whatsapp ||
137
+ siteData?.shop?.phone ||
138
+ '94770000000');
139
+ }, [customWhatsapp, remoteConfig, siteData]);
140
+ const resolvedStoreName = (0, react_1.useMemo)(() => {
141
+ return (customStoreName ||
142
+ remoteConfig?.shopName ||
143
+ siteData?.content?.common?.websiteTitle ||
144
+ siteData?.shop?.businessName ||
145
+ siteData?.site?.name ||
146
+ 'Online Store');
147
+ }, [customStoreName, remoteConfig, siteData]);
148
+ const resolvedCurrency = remoteConfig?.currency || customCurrency || 'LKR';
149
+ // Delivery Fee Calculation
150
+ const deliveryFee = (0, react_1.useMemo)(() => {
151
+ if (deliveryType === 'PICKUP')
152
+ return 0;
153
+ const baseFee = customDeliveryFee ?? remoteConfig?.defaultDeliveryFee ?? 0;
154
+ const threshold = customFreeDeliveryThreshold ?? remoteConfig?.freeDeliveryThreshold;
155
+ if (threshold !== null && threshold !== undefined && subtotal >= threshold) {
156
+ return 0;
157
+ }
158
+ return baseFee;
159
+ }, [deliveryType, customDeliveryFee, remoteConfig, subtotal, customFreeDeliveryThreshold]);
160
+ const grandTotal = subtotal + deliveryFee;
161
+ // Visual Editing Field Helper
162
+ const getContent = (key, fallback) => {
163
+ const section = siteData?.content?.[basePath];
164
+ return section?.[key] || fallback;
165
+ };
166
+ const fieldPath = (key) => `${basePath}.${key}`;
167
+ // Direct WhatsApp Order URL
168
+ const whatsappOrderHref = (0, react_1.useMemo)(() => {
169
+ return getWhatsAppOrderUrl(resolvedWhatsapp, {
170
+ storeName: resolvedStoreName,
171
+ currency: resolvedCurrency,
172
+ });
173
+ }, [getWhatsAppOrderUrl, resolvedWhatsapp, resolvedStoreName, resolvedCurrency]);
174
+ // Order Submission Handler
175
+ const handlePlaceOrder = async (e) => {
176
+ e.preventDefault();
177
+ setErrorMessage(null);
178
+ // Validation
179
+ if (!customerName.trim()) {
180
+ setErrorMessage('Please enter your full name.');
181
+ return;
182
+ }
183
+ if (!customerPhone.trim()) {
184
+ setErrorMessage('Please enter your phone number.');
185
+ return;
186
+ }
187
+ if (deliveryType === 'DELIVERY') {
188
+ if (!shippingAddress.trim()) {
189
+ setErrorMessage('Please enter your delivery street address.');
190
+ return;
191
+ }
192
+ if (!shippingCity.trim()) {
193
+ setErrorMessage('Please enter your city.');
194
+ return;
195
+ }
196
+ }
197
+ if (items.length === 0) {
198
+ setErrorMessage('Your cart is empty.');
199
+ return;
200
+ }
201
+ setSubmitting(true);
202
+ try {
203
+ const payload = {
204
+ customerName: customerName.trim(),
205
+ customerPhone: customerPhone.trim(),
206
+ customerEmail: customerEmail.trim() || undefined,
207
+ shippingAddress: deliveryType === 'DELIVERY' ? shippingAddress.trim() : 'In-Store Pickup',
208
+ shippingCity: deliveryType === 'DELIVERY' ? shippingCity.trim() : 'Pickup',
209
+ shippingPostalCode: shippingPostalCode.trim() || undefined,
210
+ customerNotes: customerNotes.trim() || undefined,
211
+ paymentMethod,
212
+ items: items.map((item) => ({
213
+ productId: String(item.id),
214
+ quantity: item.quantity,
215
+ variantName: [item.size, item.color].filter(Boolean).join(' / ') || undefined,
216
+ })),
217
+ honeypot: honeypot || undefined,
218
+ };
219
+ const res = await fetch(effectiveApiUrl, {
220
+ method: 'POST',
221
+ headers: { 'Content-Type': 'application/json' },
222
+ body: JSON.stringify(payload),
223
+ });
224
+ const data = await res.json();
225
+ if (!res.ok) {
226
+ throw new Error(data.message || 'Failed to place order. Please try again.');
227
+ }
228
+ if (onOrderPlaced) {
229
+ onOrderPlaced(data);
230
+ }
231
+ // 1. PayHere Online Card Payment
232
+ if (paymentMethod === 'PAYHERE' && data.payHerePayload) {
233
+ const payHere = data.payHerePayload;
234
+ const anyWin = window;
235
+ // If PayHere on-page modal popup is available, open popup on SAME page
236
+ if (anyWin?.payhere && typeof anyWin.payhere.startPayment === 'function') {
237
+ anyWin.payhere.onCompleted = function onCompleted() {
238
+ clearCart();
239
+ setPlacedOrder({
240
+ orderNumber: data.orderNumber || 'ORD-PAID',
241
+ trackingToken: data.trackingToken,
242
+ status: 'PROCESSING',
243
+ method: 'PAYHERE',
244
+ total: Number(data.totalAmount || grandTotal),
245
+ });
246
+ setSubmitting(false);
247
+ };
248
+ anyWin.payhere.onDismissed = function onDismissed() {
249
+ setErrorMessage('Payment modal was closed before completion. You can try again.');
250
+ setSubmitting(false);
251
+ };
252
+ anyWin.payhere.onError = function onError(error) {
253
+ setErrorMessage('PayHere payment error: ' + (error?.message || error || 'Unknown'));
254
+ setSubmitting(false);
255
+ };
256
+ anyWin.payhere.startPayment(payHere);
257
+ return;
258
+ }
259
+ // Fallback: Submit hidden form to PayHere checkout
260
+ const form = document.createElement('form');
261
+ form.method = 'POST';
262
+ form.action = payHere.checkoutUrl;
263
+ form.style.display = 'none';
264
+ Object.entries(payHere).forEach(([k, v]) => {
265
+ if (k !== 'checkoutUrl' && v !== null && v !== undefined) {
266
+ const input = document.createElement('input');
267
+ input.type = 'hidden';
268
+ input.name = k;
269
+ input.value = String(v);
270
+ form.appendChild(input);
271
+ }
272
+ });
273
+ document.body.appendChild(form);
274
+ clearCart();
275
+ form.submit();
276
+ return;
277
+ }
278
+ // 2. Cash on Delivery or Bank Transfer
279
+ clearCart();
280
+ if (inlineSuccess) {
281
+ // Display order confirmation on the EXACT SAME page without navigation!
282
+ setPlacedOrder({
283
+ orderNumber: data.orderNumber || '',
284
+ trackingToken: data.trackingToken || '',
285
+ status: data.status || 'PENDING_PAYMENT',
286
+ method: paymentMethod,
287
+ total: Number(data.totalAmount || grandTotal),
288
+ });
289
+ setSubmitting(false);
290
+ return;
291
+ }
292
+ // Fallback: Redirect to dedicated success URL
293
+ const redirectParams = new URLSearchParams({
294
+ orderNumber: data.orderNumber || '',
295
+ trackingToken: data.trackingToken || '',
296
+ status: data.status || 'PENDING_PAYMENT',
297
+ method: paymentMethod,
298
+ total: String(data.totalAmount || grandTotal),
299
+ });
300
+ window.location.href = `${successUrl}?${redirectParams.toString()}`;
301
+ }
302
+ catch (err) {
303
+ setErrorMessage(err.message || 'An unexpected error occurred while placing your order.');
304
+ setSubmitting(false);
305
+ }
306
+ };
307
+ if (!mounted) {
308
+ return ((0, jsx_runtime_1.jsxs)("div", { className: `mx-auto max-w-5xl px-4 py-16 text-center ${className}`, children: [(0, jsx_runtime_1.jsx)("div", { className: "inline-block h-8 w-8 animate-spin rounded-full border-4 border-emerald-500 border-t-transparent" }), (0, jsx_runtime_1.jsx)("p", { className: "mt-4 text-sm text-neutral-400", children: "Loading checkout..." })] }));
309
+ }
310
+ // Same-Page Inline Order Confirmation View
311
+ if (placedOrder) {
312
+ return ((0, jsx_runtime_1.jsx)(EditableOrderSuccess_1.EditableOrderSuccess, { basePath: basePath, className: className, storeName: resolvedStoreName, whatsappNumber: resolvedWhatsapp, currency: resolvedCurrency, orderNumber: placedOrder.orderNumber, trackingToken: placedOrder.trackingToken, status: placedOrder.status, method: placedOrder.method, total: placedOrder.total }));
313
+ }
314
+ // MODE 1: WhatsApp Ordering Active
315
+ if (!isEcommerceActive) {
316
+ return ((0, jsx_runtime_1.jsxs)("div", { className: `mx-auto max-w-4xl px-4 py-12 ${className}`, children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-6", children: (0, jsx_runtime_1.jsxs)("a", { href: "/", className: "inline-flex items-center gap-1.5 text-sm font-medium text-neutral-400 hover:text-white transition-colors", children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 19l-7-7m0 0l7-7m-7 7h18" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Back to Store" })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "rounded-2xl border border-neutral-800 bg-neutral-900/90 p-8 shadow-xl", children: [(0, jsx_runtime_1.jsx)("div", { className: "mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-emerald-500/10 text-emerald-400 mb-4", children: (0, jsx_runtime_1.jsx)("svg", { className: "h-8 w-8 fill-current", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { d: "M12.031 6.172c-3.181 0-5.767 2.586-5.768 5.766-.001 1.298.38 2.27 1.019 3.287l-.711 2.598 2.664-.699c.971.531 1.769.813 2.796.813h.001c3.182 0 5.768-2.586 5.768-5.766 0-3.18-2.586-5.766-5.769-5.766zm9.969 5.766c0 5.518-4.482 10-10 10-1.745 0-3.415-.453-4.887-1.258l-5.113 1.341 1.365-4.989c-.931-1.537-1.465-3.327-1.465-5.094 0-5.518 4.482-10 10-10 5.518 0 10 4.482 10 10z" }) }) }), (0, jsx_runtime_1.jsx)("h1", { className: "text-2xl font-bold text-center text-white sm:text-3xl", "data-preview-field-path": fieldPath('whatsappTitle'), children: getContent('whatsappTitle', 'Direct WhatsApp Ordering Active') }), (0, jsx_runtime_1.jsx)("p", { className: "mt-2 text-center text-sm text-neutral-400 max-w-lg mx-auto", "data-preview-field-path": fieldPath('whatsappSubtitle'), children: getContent('whatsappSubtitle', 'This store accepts orders directly via WhatsApp. Review your selected items and click below to chat with the merchant to confirm delivery.') }), items.length === 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: "mt-8 rounded-xl border border-neutral-800 bg-neutral-950 p-6 text-center", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-sm text-neutral-400", children: "Your cart is currently empty." }), (0, jsx_runtime_1.jsx)("a", { href: "/", className: "mt-4 inline-flex items-center gap-2 rounded-xl bg-neutral-800 px-4 py-2.5 text-xs font-semibold text-white hover:bg-neutral-700 transition-colors", children: "Browse Catalog" })] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "mt-8 space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "rounded-xl border border-neutral-800 bg-neutral-950 p-5 divide-y divide-neutral-800", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-xs font-bold uppercase tracking-wider text-neutral-400 pb-3", children: ["Selected Items (", totalCount, ")"] }), (0, jsx_runtime_1.jsx)("div", { className: "divide-y divide-neutral-800/60 max-h-80 overflow-y-auto", children: items.map((item) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center py-3", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "text-sm font-medium text-white", children: item.name }), (0, jsx_runtime_1.jsxs)("p", { className: "text-xs text-neutral-400", children: ["Qty: ", item.quantity, " ", item.size ? `· Size: ${item.size}` : '', " ", item.color ? `· Color: ${item.color}` : ''] })] }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm font-semibold text-emerald-400", children: item.showPrice === false ? 'Price on Request' : (0, useCart_1.formatCurrency)(item.price * item.quantity, resolvedCurrency) })] }, `${item.id}-${item.size || ''}-${item.color || ''}`))) }), (0, jsx_runtime_1.jsxs)("div", { className: "pt-4 flex justify-between items-baseline", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm text-neutral-400", children: "Estimated Total:" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xl font-bold text-white", children: (0, useCart_1.formatCurrency)(subtotal, resolvedCurrency) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col sm:flex-row gap-3", children: [(0, jsx_runtime_1.jsxs)("a", { href: whatsappOrderHref, target: "_blank", rel: "noopener noreferrer", className: "flex-1 flex items-center justify-center gap-2.5 rounded-xl bg-emerald-600 px-6 py-4 text-sm font-bold text-white shadow-lg shadow-emerald-950/40 hover:bg-emerald-500 transition-all active:scale-[0.99]", children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-5 w-5 fill-current", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { d: "M12.031 6.172c-3.181 0-5.767 2.586-5.768 5.766-.001 1.298.38 2.27 1.019 3.287l-.711 2.598 2.664-.699c.971.531 1.769.813 2.796.813h.001c3.182 0 5.768-2.586 5.768-5.766 0-3.18-2.586-5.766-5.769-5.766zm9.969 5.766c0 5.518-4.482 10-10 10-1.745 0-3.415-.453-4.887-1.258l-5.113 1.341 1.365-4.989c-.931-1.537-1.465-3.327-1.465-5.094 0-5.518 4.482-10 10-10 5.518 0 10 4.482 10 10z" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Send Order via WhatsApp" })] }), (0, jsx_runtime_1.jsx)("a", { href: "/", className: "flex items-center justify-center rounded-xl border border-neutral-800 bg-neutral-900 px-6 py-4 text-sm font-semibold text-neutral-300 hover:text-white hover:bg-neutral-800 transition-colors", children: "Continue Shopping" })] })] }))] })] }));
317
+ }
318
+ // MODE 2: Full E-Commerce Checkout
319
+ if (items.length === 0) {
320
+ return ((0, jsx_runtime_1.jsxs)("div", { className: `mx-auto max-w-xl px-4 py-20 text-center ${className}`, children: [(0, jsx_runtime_1.jsx)("div", { className: "mx-auto flex h-20 w-20 items-center justify-center rounded-3xl bg-neutral-900 border border-neutral-800 text-neutral-400 mb-6", children: (0, jsx_runtime_1.jsx)("svg", { className: "h-10 w-10 fill-none stroke-current", strokeWidth: 1.5, viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z" }) }) }), (0, jsx_runtime_1.jsx)("h1", { className: "text-2xl font-bold text-white", children: "Your Cart is Empty" }), (0, jsx_runtime_1.jsx)("p", { className: "mt-2 text-sm text-neutral-400", children: "You do not have any items in your cart to checkout yet." }), (0, jsx_runtime_1.jsx)("a", { href: "/", className: "mt-6 inline-flex items-center gap-2 rounded-xl bg-emerald-600 px-6 py-3 text-sm font-semibold text-white hover:bg-emerald-500 transition-all shadow-lg shadow-emerald-950/30", children: "Explore Catalog" })] }));
321
+ }
322
+ return ((0, jsx_runtime_1.jsxs)("div", { className: `mx-auto max-w-6xl px-4 py-10 sm:px-6 ${className}`, children: [(0, jsx_runtime_1.jsxs)("div", { className: "mb-6 flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("a", { href: "/", className: "inline-flex items-center gap-1.5 text-sm font-medium text-neutral-400 hover:text-white transition-colors", children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 19l-7-7m0 0l7-7m-7 7h18" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Continue Shopping" })] }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs text-neutral-500", children: "Secure 256-bit Encrypted Checkout" })] }), (0, jsx_runtime_1.jsx)("h1", { className: "text-2xl font-bold text-white sm:text-3xl mb-8", "data-preview-field-path": fieldPath('pageTitle'), children: getContent('pageTitle', 'Checkout & Payment') }), errorMessage && ((0, jsx_runtime_1.jsxs)("div", { className: "mb-8 rounded-xl border border-red-500/30 bg-red-950/40 p-4 text-sm text-red-300 flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-5 w-5 text-red-400 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }), (0, jsx_runtime_1.jsx)("span", { children: errorMessage })] })), (0, jsx_runtime_1.jsxs)("form", { onSubmit: handlePlaceOrder, className: "grid gap-8 lg:grid-cols-[1fr_420px]", children: [(0, jsx_runtime_1.jsxs)("div", { className: "space-y-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "rounded-2xl border border-neutral-800 bg-neutral-900/80 p-6 shadow-sm", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "text-lg font-bold text-white mb-4 flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-emerald-500/20 text-xs font-bold text-emerald-400", children: "1" }), (0, jsx_runtime_1.jsx)("span", { children: "Customer Information" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid gap-4 sm:grid-cols-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "sm:col-span-2", children: [(0, jsx_runtime_1.jsxs)("label", { className: "block text-xs font-semibold text-neutral-300 mb-1.5", children: ["Full Name ", (0, jsx_runtime_1.jsx)("span", { className: "text-red-400", children: "*" })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", required: true, value: customerName, onChange: (e) => setCustomerName(e.target.value), placeholder: "e.g. Kamal Perera", className: "w-full rounded-xl border border-neutral-800 bg-neutral-950 px-4 py-2.5 text-sm text-white placeholder-neutral-500 focus:border-emerald-500 focus:outline-none focus:ring-1 focus:ring-emerald-500" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("label", { className: "block text-xs font-semibold text-neutral-300 mb-1.5", children: ["Phone / WhatsApp Number ", (0, jsx_runtime_1.jsx)("span", { className: "text-red-400", children: "*" })] }), (0, jsx_runtime_1.jsx)("input", { type: "tel", required: true, value: customerPhone, onChange: (e) => setCustomerPhone(e.target.value), placeholder: "e.g. 077 123 4567", className: "w-full rounded-xl border border-neutral-800 bg-neutral-950 px-4 py-2.5 text-sm text-white placeholder-neutral-500 focus:border-emerald-500 focus:outline-none focus:ring-1 focus:ring-emerald-500" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("label", { className: "block text-xs font-semibold text-neutral-300 mb-1.5", children: ["Email Address ", (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-500 text-[11px] font-normal", children: "(Optional for receipt)" })] }), (0, jsx_runtime_1.jsx)("input", { type: "email", value: customerEmail, onChange: (e) => setCustomerEmail(e.target.value), placeholder: "kamal@example.com", className: "w-full rounded-xl border border-neutral-800 bg-neutral-950 px-4 py-2.5 text-sm text-white placeholder-neutral-500 focus:border-emerald-500 focus:outline-none focus:ring-1 focus:ring-emerald-500" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "rounded-2xl border border-neutral-800 bg-neutral-900/80 p-6 shadow-sm", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "text-lg font-bold text-white mb-4 flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-emerald-500/20 text-xs font-bold text-emerald-400", children: "2" }), (0, jsx_runtime_1.jsx)("span", { children: "Delivery Details" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 gap-3 mb-5", children: [(0, jsx_runtime_1.jsxs)("button", { type: "button", onClick: () => setDeliveryType('DELIVERY'), className: `flex items-center justify-center gap-2 rounded-xl p-3 text-xs font-bold transition-all border ${deliveryType === 'DELIVERY'
323
+ ? 'border-emerald-500 bg-emerald-500/10 text-emerald-400'
324
+ : 'border-neutral-800 bg-neutral-950 text-neutral-400 hover:text-white'}`, children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Doorstep Delivery" })] }), (0, jsx_runtime_1.jsxs)("button", { type: "button", onClick: () => setDeliveryType('PICKUP'), className: `flex items-center justify-center gap-2 rounded-xl p-3 text-xs font-bold transition-all border ${deliveryType === 'PICKUP'
325
+ ? 'border-emerald-500 bg-emerald-500/10 text-emerald-400'
326
+ : 'border-neutral-800 bg-neutral-950 text-neutral-400 hover:text-white'}`, children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Store Pickup (Free)" })] })] }), deliveryType === 'DELIVERY' && ((0, jsx_runtime_1.jsxs)("div", { className: "grid gap-4 sm:grid-cols-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "sm:col-span-2", children: [(0, jsx_runtime_1.jsxs)("label", { className: "block text-xs font-semibold text-neutral-300 mb-1.5", children: ["Street Delivery Address ", (0, jsx_runtime_1.jsx)("span", { className: "text-red-400", children: "*" })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", required: true, value: shippingAddress, onChange: (e) => setShippingAddress(e.target.value), placeholder: "No. 45, Temple Road, Colombo", className: "w-full rounded-xl border border-neutral-800 bg-neutral-950 px-4 py-2.5 text-sm text-white placeholder-neutral-500 focus:border-emerald-500 focus:outline-none focus:ring-1 focus:ring-emerald-500" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("label", { className: "block text-xs font-semibold text-neutral-300 mb-1.5", children: ["City / Town ", (0, jsx_runtime_1.jsx)("span", { className: "text-red-400", children: "*" })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", required: true, value: shippingCity, onChange: (e) => setShippingCity(e.target.value), placeholder: "e.g. Colombo, Kandy, Galle", className: "w-full rounded-xl border border-neutral-800 bg-neutral-950 px-4 py-2.5 text-sm text-white placeholder-neutral-500 focus:border-emerald-500 focus:outline-none focus:ring-1 focus:ring-emerald-500" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("label", { className: "block text-xs font-semibold text-neutral-300 mb-1.5", children: ["Postal Code ", (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-500 text-[11px] font-normal", children: "(Optional)" })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: shippingPostalCode, onChange: (e) => setShippingPostalCode(e.target.value), placeholder: "e.g. 00500", className: "w-full rounded-xl border border-neutral-800 bg-neutral-950 px-4 py-2.5 text-sm text-white placeholder-neutral-500 focus:border-emerald-500 focus:outline-none focus:ring-1 focus:ring-emerald-500" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "sm:col-span-2", children: [(0, jsx_runtime_1.jsxs)("label", { className: "block text-xs font-semibold text-neutral-300 mb-1.5", children: ["Delivery Instructions / Landmark ", (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-500 text-[11px] font-normal", children: "(Optional)" })] }), (0, jsx_runtime_1.jsx)("textarea", { rows: 2, value: customerNotes, onChange: (e) => setCustomerNotes(e.target.value), placeholder: "Near water tank, gate code, ring bell twice...", className: "w-full rounded-xl border border-neutral-800 bg-neutral-950 px-4 py-2 text-sm text-white placeholder-neutral-500 focus:border-emerald-500 focus:outline-none focus:ring-1 focus:ring-emerald-500 resize-none" })] })] }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "rounded-2xl border border-neutral-800 bg-neutral-900/80 p-6 shadow-sm", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "text-lg font-bold text-white mb-4 flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-emerald-500/20 text-xs font-bold text-emerald-400", children: "3" }), (0, jsx_runtime_1.jsx)("span", { children: "Payment Method" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(remoteConfig?.payHereEnabled ?? true) && ((0, jsx_runtime_1.jsxs)("label", { className: `flex items-start gap-4 rounded-xl border p-4 cursor-pointer transition-all ${paymentMethod === 'PAYHERE'
327
+ ? 'border-emerald-500 bg-emerald-500/10'
328
+ : 'border-neutral-800 bg-neutral-950 hover:border-neutral-700'}`, children: [(0, jsx_runtime_1.jsx)("input", { type: "radio", name: "paymentMethod", value: "PAYHERE", checked: paymentMethod === 'PAYHERE', onChange: () => setPaymentMethod('PAYHERE'), className: "mt-1 text-emerald-500 focus:ring-emerald-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm font-bold text-white", children: "Online Payment (PayHere)" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] uppercase font-bold px-2 py-0.5 rounded bg-emerald-500/20 text-emerald-400", children: "Instant Confirmation" })] }), (0, jsx_runtime_1.jsx)("p", { className: "mt-1 text-xs text-neutral-400", children: "Credit / Debit Card (Visa, MasterCard), Genie, Frimi, eZ Cash, mCash." })] })] })), (remoteConfig?.codEnabled ?? true) && ((0, jsx_runtime_1.jsxs)("label", { className: `flex items-start gap-4 rounded-xl border p-4 cursor-pointer transition-all ${paymentMethod === 'COD'
329
+ ? 'border-emerald-500 bg-emerald-500/10'
330
+ : 'border-neutral-800 bg-neutral-950 hover:border-neutral-700'}`, children: [(0, jsx_runtime_1.jsx)("input", { type: "radio", name: "paymentMethod", value: "COD", checked: paymentMethod === 'COD', onChange: () => setPaymentMethod('COD'), className: "mt-1 text-emerald-500 focus:ring-emerald-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm font-bold text-white", children: "Cash on Delivery (COD)" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] uppercase font-bold px-2 py-0.5 rounded bg-neutral-800 text-neutral-300", children: "Pay at Doorstep" })] }), (0, jsx_runtime_1.jsx)("p", { className: "mt-1 text-xs text-neutral-400", children: "Pay with cash when your items are delivered to your door." })] })] })), (remoteConfig?.bankDepositEnabled ?? false) && ((0, jsx_runtime_1.jsxs)("label", { className: `flex items-start gap-4 rounded-xl border p-4 cursor-pointer transition-all ${paymentMethod === 'BANK_TRANSFER'
331
+ ? 'border-emerald-500 bg-emerald-500/10'
332
+ : 'border-neutral-800 bg-neutral-950 hover:border-neutral-700'}`, children: [(0, jsx_runtime_1.jsx)("input", { type: "radio", name: "paymentMethod", value: "BANK_TRANSFER", checked: paymentMethod === 'BANK_TRANSFER', onChange: () => setPaymentMethod('BANK_TRANSFER'), className: "mt-1 text-emerald-500 focus:ring-emerald-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm font-bold text-white", children: "Direct Bank Deposit / Transfer" }), (0, jsx_runtime_1.jsx)("p", { className: "mt-1 text-xs text-neutral-400", children: "Transfer directly to our store bank account and share the receipt via WhatsApp." }), paymentMethod === 'BANK_TRANSFER' && remoteConfig?.bankAccountNumber && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-3 rounded-lg bg-neutral-900 border border-neutral-800 p-3 text-xs text-neutral-300 space-y-1", children: [(0, jsx_runtime_1.jsxs)("p", { children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-500", children: "Bank:" }), " ", remoteConfig.bankName || 'Commercial Bank'] }), (0, jsx_runtime_1.jsxs)("p", { children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-500", children: "Account Name:" }), " ", remoteConfig.bankAccountName || resolvedStoreName] }), (0, jsx_runtime_1.jsxs)("p", { children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-500", children: "Account No:" }), " ", (0, jsx_runtime_1.jsx)("strong", { className: "font-mono text-emerald-400", children: remoteConfig.bankAccountNumber })] }), remoteConfig.bankBranch && (0, jsx_runtime_1.jsxs)("p", { children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-500", children: "Branch:" }), " ", remoteConfig.bankBranch] })] }))] })] }))] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-6", children: (0, jsx_runtime_1.jsxs)("div", { className: "rounded-2xl border border-neutral-800 bg-neutral-900/90 p-6 shadow-xl sticky top-24", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "text-lg font-bold text-white mb-4", children: ["Order Summary (", totalCount, ")"] }), (0, jsx_runtime_1.jsx)("div", { className: "divide-y divide-neutral-800/80 max-h-72 overflow-y-auto mb-6 pr-1", children: items.map((item) => ((0, jsx_runtime_1.jsxs)("div", { className: "py-3.5 flex gap-3.5 items-center", children: [item.image ? ((0, jsx_runtime_1.jsx)("img", { src: (0, urls_1.withBasePath)(item.image), alt: item.name, className: "h-14 w-14 rounded-lg object-cover bg-neutral-800 border border-neutral-700 flex-shrink-0" })) : ((0, jsx_runtime_1.jsx)("div", { className: "h-14 w-14 rounded-lg bg-neutral-800 border border-neutral-700 flex items-center justify-center text-neutral-500 flex-shrink-0", children: (0, jsx_runtime_1.jsx)("svg", { className: "h-6 w-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) })), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1 min-w-0", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-xs font-semibold text-white truncate", children: item.name }), (0, jsx_runtime_1.jsxs)("p", { className: "text-[11px] text-neutral-400", children: [item.size ? `Size: ${item.size} ` : '', item.color ? `Color: ${item.color}` : ''] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 mt-1", children: [(0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => updateQuantity(item.id, item.quantity - 1, item.size, item.color), className: "h-5 w-5 rounded bg-neutral-800 text-neutral-300 hover:text-white flex items-center justify-center text-xs", children: "-" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-mono font-bold text-white", children: item.quantity }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => updateQuantity(item.id, item.quantity + 1, item.size, item.color), className: "h-5 w-5 rounded bg-neutral-800 text-neutral-300 hover:text-white flex items-center justify-center text-xs", children: "+" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-right flex-shrink-0", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-emerald-400", children: item.showPrice === false ? 'On Request' : (0, useCart_1.formatCurrency)(item.price * item.quantity, resolvedCurrency) }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => removeItem(item.id, item.size, item.color), className: "block mt-1 text-[10px] text-neutral-500 hover:text-red-400 ml-auto", children: "Remove" })] })] }, `${item.id}-${item.size || ''}-${item.color || ''}`))) }), (0, jsx_runtime_1.jsxs)("div", { className: "border-t border-neutral-800 pt-4 space-y-2 text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between text-neutral-400", children: [(0, jsx_runtime_1.jsx)("span", { children: "Subtotal" }), (0, jsx_runtime_1.jsx)("span", { className: "text-white font-medium", children: (0, useCart_1.formatCurrency)(subtotal, resolvedCurrency) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between text-neutral-400", children: [(0, jsx_runtime_1.jsx)("span", { children: "Delivery Fee" }), (0, jsx_runtime_1.jsx)("span", { className: deliveryFee === 0 ? 'text-emerald-400 font-semibold' : 'text-white font-medium', children: deliveryFee === 0 ? 'FREE' : (0, useCart_1.formatCurrency)(deliveryFee, resolvedCurrency) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-t border-neutral-800 pt-3 flex justify-between items-baseline", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-base font-bold text-white", children: "Grand Total" }), (0, jsx_runtime_1.jsx)("span", { className: "text-2xl font-black text-emerald-400", children: (0, useCart_1.formatCurrency)(grandTotal, resolvedCurrency) })] })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", name: "honeypot", value: honeypot, onChange: (e) => setHoneypot(e.target.value), style: { display: 'none' }, tabIndex: -1, autoComplete: "off" }), (0, jsx_runtime_1.jsx)("button", { type: "submit", disabled: submitting, className: "mt-6 w-full rounded-xl bg-emerald-600 px-6 py-4 text-sm font-bold text-white shadow-lg shadow-emerald-950/40 hover:bg-emerald-500 active:scale-[0.98] transition-all disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 cursor-pointer", children: submitting ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent" }), (0, jsx_runtime_1.jsx)("span", { children: "Processing Order..." })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-4 w-4 fill-none stroke-current", strokeWidth: 2, viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }), (0, jsx_runtime_1.jsxs)("span", { children: ["Place Order (", (0, useCart_1.formatCurrency)(grandTotal, resolvedCurrency), ")"] })] })) }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-4 flex items-center justify-center gap-2 text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-3.5 w-3.5 text-emerald-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" }) }), (0, jsx_runtime_1.jsx)("span", { children: "100% Satisfaction Guarantee \u00B7 Fast Local Delivery" })] })] }) })] })] }));
333
+ }
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Header = exports.Navbar = void 0;
5
5
  exports.EditableNavbar = EditableNavbar;
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const useCart_1 = require("./cart/useCart");
7
8
  const react_1 = require("react");
8
9
  const SiteDataProvider_1 = require("./SiteDataProvider");
9
10
  const DEFAULT_PAGES = [
@@ -27,6 +28,8 @@ const DEFAULT_PAGES = [
27
28
  */
28
29
  function EditableNavbar({ defaultLinks = DEFAULT_PAGES, sticky = true, activeRoute, basePath = "", showSearch = true, searchFieldPath = "common.header.searchFramesLabel", searchLabel: customSearchLabel, onSearchClick, searchUrl = "/shop", showCart = false, cartCount, onCartClick, showWishlist = false, wishlistCount, onWishlistClick, className = "", style, ...props }) {
29
30
  const siteData = (0, SiteDataProvider_1.useSiteData)();
31
+ const cart = (0, useCart_1.useOptionalCart)();
32
+ const effectiveCartCount = cartCount ?? cart?.totalCount ?? 0;
30
33
  const [mobileMenuOpen, setMobileMenuOpen] = (0, react_1.useState)(false);
31
34
  const content = (siteData?.content || {});
32
35
  const common = (content?.common || {});
@@ -142,7 +145,41 @@ function EditableNavbar({ defaultLinks = DEFAULT_PAGES, sticky = true, activeRou
142
145
  }, className: `deneb-nav-item px-3.5 py-1.5 rounded-full text-sm font-medium transition-all border-0 cursor-pointer ${isActive
143
146
  ? 'bg-slate-100 text-slate-900 font-semibold dark:bg-slate-800 dark:text-white'
144
147
  : 'bg-transparent text-slate-600 hover:text-slate-900 hover:bg-slate-100/70 dark:text-slate-400 dark:hover:text-white dark:hover:bg-slate-800/70'}`, children: (0, jsx_runtime_1.jsx)("span", { "data-preview-field-path": `common.navLabels.${link.id}`, children: label }) }) }, link.id));
145
- })] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: '0.75rem' }, className: "flex items-center gap-3", children: [hasContact ? ((0, jsx_runtime_1.jsx)("span", { "data-target-page": "contact", children: (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => navigate('/contact'), style: {
148
+ })] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: '0.75rem' }, className: "flex items-center gap-3", children: [(showCart || (cart && cart.totalCount > 0)) && ((0, jsx_runtime_1.jsxs)("button", { type: "button", onClick: () => {
149
+ if (onCartClick)
150
+ onCartClick();
151
+ else if (cart)
152
+ cart.toggleCart();
153
+ }, "data-preview-static": "header-cart-toggle", "aria-label": `Shopping cart with ${effectiveCartCount} items`, style: {
154
+ position: 'relative',
155
+ display: 'inline-flex',
156
+ alignItems: 'center',
157
+ justifyContent: 'center',
158
+ width: '40px',
159
+ height: '40px',
160
+ borderRadius: '9999px',
161
+ backgroundColor: 'var(--color-secondary, #f1f5f9)',
162
+ color: 'var(--color-text, #0f172a)',
163
+ border: '1px solid var(--color-border, #e2e8f0)',
164
+ cursor: 'pointer',
165
+ transition: 'all 0.15s ease',
166
+ }, className: "deneb-cart-btn relative inline-flex items-center justify-center h-10 w-10 rounded-full bg-slate-100 dark:bg-slate-800 text-slate-800 dark:text-slate-100 hover:bg-slate-200 dark:hover:bg-slate-700 transition-colors cursor-pointer border border-slate-200 dark:border-slate-700", children: [(0, jsx_runtime_1.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", "data-preview-static": "cart-icon", children: [(0, jsx_runtime_1.jsx)("path", { d: "M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M3 6h18" }), (0, jsx_runtime_1.jsx)("path", { d: "M16 10a4 4 0 0 1-8 0" })] }), effectiveCartCount > 0 && ((0, jsx_runtime_1.jsx)("span", { style: {
167
+ position: 'absolute',
168
+ top: '-4px',
169
+ right: '-4px',
170
+ minWidth: '18px',
171
+ height: '18px',
172
+ padding: '0 4px',
173
+ borderRadius: '9999px',
174
+ backgroundColor: '#10b981',
175
+ color: '#ffffff',
176
+ fontSize: '11px',
177
+ fontWeight: 'bold',
178
+ display: 'flex',
179
+ alignItems: 'center',
180
+ justifyContent: 'center',
181
+ boxShadow: '0 2px 4px rgba(0,0,0,0.15)',
182
+ }, className: "absolute -top-1 -right-1 min-w-[18px] h-[18px] px-1 rounded-full bg-emerald-500 text-white text-[11px] font-bold flex items-center justify-center shadow-sm", children: effectiveCartCount > 99 ? '99+' : effectiveCartCount }))] })), hasContact ? ((0, jsx_runtime_1.jsx)("span", { "data-target-page": "contact", children: (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => navigate('/contact'), style: {
146
183
  display: 'inline-flex',
147
184
  alignItems: 'center',
148
185
  justifyContent: 'center',
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export interface EditableOrderSuccessProps {
3
+ basePath?: string;
4
+ className?: string;
5
+ storeName?: string;
6
+ whatsappNumber?: string;
7
+ currency?: string;
8
+ orderNumber?: string;
9
+ trackingToken?: string;
10
+ status?: string;
11
+ method?: string;
12
+ total?: number;
13
+ }
14
+ /**
15
+ * Universal Order Confirmation / Success View for DENEB UI & Fivora
16
+ * Reads order details from URL search params and displays a rich confirmation receipt.
17
+ * Created by Chamika Gayashan & Induranga Kawishwara.
18
+ */
19
+ export declare function EditableOrderSuccess({ basePath, className, storeName: customStoreName, whatsappNumber: customWhatsapp, currency: customCurrency, orderNumber: propOrderNumber, trackingToken: propTrackingToken, status: propStatus, method: propMethod, total: propTotal, }: EditableOrderSuccessProps): React.JSX.Element;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.EditableOrderSuccess = EditableOrderSuccess;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const react_1 = require("react");
7
+ const useCart_1 = require("./cart/useCart");
8
+ const SiteDataProvider_1 = require("./SiteDataProvider");
9
+ /**
10
+ * Universal Order Confirmation / Success View for DENEB UI & Fivora
11
+ * Reads order details from URL search params and displays a rich confirmation receipt.
12
+ * Created by Chamika Gayashan & Induranga Kawishwara.
13
+ */
14
+ function EditableOrderSuccess({ basePath = 'orderSuccess', className = '', storeName: customStoreName, whatsappNumber: customWhatsapp, currency: customCurrency = 'LKR', orderNumber: propOrderNumber, trackingToken: propTrackingToken, status: propStatus, method: propMethod, total: propTotal, }) {
15
+ const siteData = (0, SiteDataProvider_1.useSiteData)();
16
+ const [mounted, setMounted] = (0, react_1.useState)(false);
17
+ // Order fields (either from props or URL query params)
18
+ const [orderNumber, setOrderNumber] = (0, react_1.useState)(propOrderNumber || '');
19
+ const [trackingToken, setTrackingToken] = (0, react_1.useState)(propTrackingToken || '');
20
+ const [status, setStatus] = (0, react_1.useState)(propStatus || 'PENDING_PAYMENT');
21
+ const [method, setMethod] = (0, react_1.useState)(propMethod || 'COD');
22
+ const [total, setTotal] = (0, react_1.useState)(propTotal || 0);
23
+ (0, react_1.useEffect)(() => {
24
+ setMounted(true);
25
+ if (propOrderNumber) {
26
+ setOrderNumber(propOrderNumber);
27
+ if (propStatus)
28
+ setStatus(propStatus);
29
+ if (propMethod)
30
+ setMethod(propMethod);
31
+ if (propTotal !== undefined)
32
+ setTotal(propTotal);
33
+ if (propTrackingToken)
34
+ setTrackingToken(propTrackingToken);
35
+ return;
36
+ }
37
+ if (typeof window !== 'undefined') {
38
+ const params = new URLSearchParams(window.location.search);
39
+ setOrderNumber(params.get('orderNumber') || params.get('order_id') || 'ORD-CONFIRMED');
40
+ setTrackingToken(params.get('trackingToken') || '');
41
+ setStatus(params.get('status') || 'PROCESSING');
42
+ setMethod(params.get('method') || (params.get('order_id') ? 'PAYHERE' : 'COD'));
43
+ const parsedTotal = parseFloat(params.get('total') || params.get('amount') || '0');
44
+ setTotal(Number.isFinite(parsedTotal) ? parsedTotal : 0);
45
+ }
46
+ }, [propOrderNumber, propStatus, propMethod, propTotal, propTrackingToken]);
47
+ const resolvedStoreName = (0, react_1.useMemo)(() => {
48
+ return (customStoreName ||
49
+ siteData?.content?.common?.websiteTitle ||
50
+ siteData?.shop?.businessName ||
51
+ siteData?.site?.name ||
52
+ 'Our Store');
53
+ }, [customStoreName, siteData]);
54
+ const resolvedWhatsapp = (0, react_1.useMemo)(() => {
55
+ return (customWhatsapp ||
56
+ siteData?.shop?.businessWhatsapp ||
57
+ siteData?.shop?.whatsapp ||
58
+ siteData?.shop?.phone ||
59
+ '94770000000');
60
+ }, [customWhatsapp, siteData]);
61
+ const isPaid = status === 'PROCESSING' || status === 'PAID' || method === 'PAYHERE';
62
+ const handlePrint = () => {
63
+ if (typeof window !== 'undefined') {
64
+ window.print();
65
+ }
66
+ };
67
+ const cleanPhone = (resolvedWhatsapp || '').replace(/\D/g, '');
68
+ const whatsappSupportUrl = `https://wa.me/${cleanPhone}?text=${encodeURIComponent(`Hi ${resolvedStoreName}, I placed an order (#${orderNumber}). Could you please update me on delivery status? Thank you!`)}`;
69
+ if (!mounted) {
70
+ return ((0, jsx_runtime_1.jsx)("div", { className: `mx-auto max-w-2xl px-4 py-20 text-center ${className}`, children: (0, jsx_runtime_1.jsx)("div", { className: "inline-block h-8 w-8 animate-spin rounded-full border-4 border-emerald-500 border-t-transparent" }) }));
71
+ }
72
+ return ((0, jsx_runtime_1.jsx)("div", { className: `mx-auto max-w-3xl px-4 py-12 sm:px-6 ${className}`, children: (0, jsx_runtime_1.jsxs)("div", { className: "rounded-3xl border border-neutral-800 bg-neutral-900/90 p-8 sm:p-12 shadow-2xl text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "mx-auto flex h-20 w-20 items-center justify-center rounded-3xl bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 mb-6 shadow-lg shadow-emerald-950/40", children: (0, jsx_runtime_1.jsx)("svg", { className: "h-10 w-10 fill-none stroke-current", strokeWidth: 2.5, viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) }), (0, jsx_runtime_1.jsx)("h1", { className: "text-2xl font-black text-white sm:text-4xl tracking-tight", children: isPaid ? 'Payment Confirmed!' : 'Order Placed Successfully!' }), (0, jsx_runtime_1.jsxs)("p", { className: "mt-3 text-sm text-neutral-400 max-w-md mx-auto", children: ["Thank you for shopping with ", (0, jsx_runtime_1.jsx)("strong", { className: "text-white", children: resolvedStoreName }), ". Your order has been registered in our system and is now being prepared for fulfillment."] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-8 rounded-2xl border border-neutral-800 bg-neutral-950 p-6 max-w-md mx-auto text-left space-y-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-neutral-500 uppercase tracking-wider font-semibold", children: "Order Number" }), (0, jsx_runtime_1.jsx)("span", { className: "font-mono text-base font-bold text-white tracking-wide", children: orderNumber })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-neutral-500 uppercase tracking-wider font-semibold", children: "Payment Status" }), (0, jsx_runtime_1.jsx)("span", { className: `text-xs font-bold px-2.5 py-1 rounded-md ${isPaid
73
+ ? 'bg-emerald-500/20 text-emerald-400 border border-emerald-500/30'
74
+ : method === 'COD'
75
+ ? 'bg-blue-500/20 text-blue-400 border border-blue-500/30'
76
+ : 'bg-purple-500/20 text-purple-400 border border-purple-500/30'}`, children: isPaid ? 'PAID / ONLINE CONFIRMED' : method === 'COD' ? 'CASH ON DELIVERY' : 'BANK TRANSFER PENDING' })] }), total > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center border-t border-neutral-800/80 pt-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-neutral-500 uppercase tracking-wider font-semibold", children: "Total Amount" }), (0, jsx_runtime_1.jsx)("span", { className: "text-lg font-black text-emerald-400", children: (0, useCart_1.formatCurrency)(total, customCurrency) })] }))] }), method === 'COD' && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-6 rounded-xl border border-blue-500/20 bg-blue-950/20 p-4 max-w-md mx-auto text-xs text-blue-300 text-left flex items-start gap-3", children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-5 w-5 text-blue-400 flex-shrink-0 mt-0.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Please have the exact cash ready when the delivery rider arrives at your doorstep. You will receive an SMS/WhatsApp update upon dispatch." })] })), method === 'BANK_TRANSFER' && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-6 rounded-xl border border-purple-500/20 bg-purple-950/20 p-4 max-w-md mx-auto text-xs text-purple-300 text-left flex items-start gap-3", children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-5 w-5 text-purple-400 flex-shrink-0 mt-0.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Please transfer the order total to our bank account and send the payment slip/screenshot to our WhatsApp with your order number." })] })), (0, jsx_runtime_1.jsxs)("div", { className: "mt-8 flex flex-col sm:flex-row gap-3 justify-center max-w-md mx-auto", children: [(0, jsx_runtime_1.jsxs)("a", { href: whatsappSupportUrl, target: "_blank", rel: "noopener noreferrer", className: "flex-1 flex items-center justify-center gap-2 rounded-xl bg-emerald-600 px-5 py-3.5 text-sm font-bold text-white shadow-lg shadow-emerald-950/40 hover:bg-emerald-500 transition-all cursor-pointer", children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-4 w-4 fill-current", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { d: "M12.031 6.172c-3.181 0-5.767 2.586-5.768 5.766-.001 1.298.38 2.27 1.019 3.287l-.711 2.598 2.664-.699c.971.531 1.769.813 2.796.813h.001c3.182 0 5.768-2.586 5.768-5.766 0-3.18-2.586-5.766-5.769-5.766zm9.969 5.766c0 5.518-4.482 10-10 10-1.745 0-3.415-.453-4.887-1.258l-5.113 1.341 1.365-4.989c-.931-1.537-1.465-3.327-1.465-5.094 0-5.518 4.482-10 10-10 5.518 0 10 4.482 10 10z" }) }), (0, jsx_runtime_1.jsx)("span", { children: "WhatsApp Support" })] }), (0, jsx_runtime_1.jsxs)("button", { type: "button", onClick: handlePrint, className: "flex items-center justify-center gap-2 rounded-xl border border-neutral-800 bg-neutral-900 px-5 py-3.5 text-sm font-semibold text-neutral-300 hover:text-white hover:bg-neutral-800 transition-colors cursor-pointer", children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Print Receipt" })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-8 border-t border-neutral-800 pt-6", children: (0, jsx_runtime_1.jsxs)("a", { href: "/", className: "text-xs text-neutral-500 hover:text-neutral-300 transition-colors inline-flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("svg", { className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 19l-7-7m0 0l7-7m-7 7h18" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Return to Storefront Homepage" })] }) })] }) }));
77
+ }
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
+ 'use client';
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  exports.EditableProductDetail = EditableProductDetail;
4
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const SiteDataProvider_1 = require("./SiteDataProvider");
7
+ const useCart_1 = require("./cart/useCart");
5
8
  const react_1 = require("react");
6
9
  const utils_1 = require("./utils");
7
10
  const productOptions_1 = require("./utils/productOptions");
@@ -77,6 +80,10 @@ function EditableProductDetail({ sectionPath = 'product', product, sizes, colors
77
80
  const [selectedSize, setSelectedSize] = (0, react_1.useState)(effectiveOptions[0] || '');
78
81
  const [selectedColor, setSelectedColor] = (0, react_1.useState)(effectiveColors[0]?.name || '');
79
82
  const [activeTab, setActiveTab] = (0, react_1.useState)('specs');
83
+ const cart = (0, useCart_1.useOptionalCart)();
84
+ const siteData = (0, SiteDataProvider_1.useSiteData)();
85
+ const isFullEcommerce = siteData?.checkoutMode === 'FULL_ECOMMERCE' ||
86
+ Boolean(siteData?.ecommerceEnabled);
80
87
  // Keep active image in sync when product or images change
81
88
  (0, react_1.useEffect)(() => {
82
89
  if (validImages.length > 0 && !validImages.includes(activeImage)) {
@@ -192,5 +199,44 @@ function EditableProductDetail({ sectionPath = 'product', product, sizes, colors
192
199
  ? 'border-lime-400 ring-2 ring-lime-400/30 scale-105'
193
200
  : 'border-slate-700 hover:border-slate-500'}`, style: { backgroundColor: c.hex || '#334155' }, title: c.name, "aria-label": c.name, children: !c.hex && ((0, jsx_runtime_1.jsx)("span", { className: "text-[9px] font-bold text-white uppercase px-1 truncate", children: c.name.slice(0, 3) })) }, c.name))) })] })), effectiveOptions.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [(0, jsx_runtime_1.jsx)("span", { "data-preview-field-path": `${sectionPath}.${product.optionsLabel ? 'optionsLabel' : 'sizesLabel'}`, className: "block text-xs font-bold uppercase tracking-wider text-slate-400", children: effectiveOptionsLabel }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-semibold text-slate-300", children: resolved.formatSelectedDisplay(selectedSize) })] }), (0, jsx_runtime_1.jsx)("div", { className: "deneb-product-detail-sizes flex flex-wrap gap-2.5", children: effectiveOptions.map((s) => ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => setSelectedSize(s), className: `py-2.5 px-3.5 min-w-[48px] rounded-xl font-bold text-sm transition-all duration-150 text-center ${selectedSize === s
194
201
  ? 'bg-white text-slate-950 shadow-md font-extrabold scale-102 ring-2 ring-white/20'
195
- : 'bg-slate-900/60 text-slate-300 border border-slate-800 hover:bg-slate-800 hover:text-white'}`, children: resolved.formatOption(s) }, s))) })] })), (0, jsx_runtime_1.jsxs)("div", { className: "mt-8 flex flex-col gap-3", children: [(0, jsx_runtime_1.jsx)("button", { type: "button", disabled: !isAvailable, onClick: () => onAddToSelection?.({ ...product, price: resolvedPrice.numericPrice || product.price, showPrice: itemShowPrice }, selectedSize || undefined, selectedColor || undefined), className: "w-full py-4 px-6 rounded-2xl font-black text-sm uppercase tracking-wider bg-lime-400 text-slate-950 hover:bg-lime-300 active:scale-98 transition-all duration-150 shadow-lg shadow-lime-400/20 flex items-center justify-center gap-2 disabled:cursor-not-allowed disabled:bg-slate-700 disabled:text-slate-300 disabled:shadow-none", children: (0, jsx_runtime_1.jsx)("span", { "data-preview-field-path": `${sectionPath}.addToSelectionLabel`, children: isAvailable ? addToSelectionLabel : 'Out of Stock' }) }), isAvailable && resolvedWhatsappUrl && ((0, jsx_runtime_1.jsxs)("a", { href: resolvedWhatsappUrl, target: "_blank", rel: "noopener noreferrer", className: "w-full py-3.5 px-6 rounded-2xl font-bold text-sm bg-emerald-600/20 text-emerald-400 hover:bg-emerald-600/30 border border-emerald-500/30 transition-all duration-150 flex items-center justify-center gap-2", children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5 fill-current", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { d: "M17.472 14.382c-.301-.15-1.78-.879-2.056-.98-.276-.1-.477-.15-.678.15-.201.3-.78 0.98-.956 1.18-.175.2-.351.226-.652.075-.301-.15-1.272-.469-2.423-1.496-.896-.799-1.501-1.787-1.677-2.088-.175-.301-.019-.464.132-.614.136-.135.301-.351.452-.527.15-.176.201-.301.301-.502.1-.2.05-.376-.025-.527-.075-.15-.678-1.635-.93-2.242-.244-.592-.493-.512-.678-.521-.175-.009-.376-.009-.577-.009-.201 0-.527.075-.803.376-.276.301-1.054 1.03-1.054 2.512 0 1.482 1.079 2.912 1.23 3.113.15.201 2.124 3.243 5.145 4.548.718.311 1.279.497 1.716.636.722.23 1.378.197 1.898.12.579-.087 1.78-.728 2.03-1.431.251-.703.251-1.305.176-1.431-.075-.126-.276-.201-.577-.351zM12.004 2C6.48 2 2 6.48 2 12c0 1.82.49 3.52 1.34 4.99L2 22l5.14-1.35c1.42.78 3.04 1.22 4.86 1.22 5.52 0 10-4.48 10-10S17.524 2 12.004 2z" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Order Directly via WhatsApp" })] }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-10 border-t border-slate-800/80 pt-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex gap-6 border-b border-slate-800 pb-3 mb-4", children: [(0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => setActiveTab('specs'), className: `text-sm font-bold tracking-wide transition-colors ${activeTab === 'specs' ? 'text-lime-400' : 'text-slate-400 hover:text-slate-200'}`, children: (0, jsx_runtime_1.jsx)("span", { "data-preview-field-path": `${sectionPath}.specsTitle`, children: specsTitle }) }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => setActiveTab('shipping'), className: `text-sm font-bold tracking-wide transition-colors ${activeTab === 'shipping' ? 'text-lime-400' : 'text-slate-400 hover:text-slate-200'}`, children: (0, jsx_runtime_1.jsx)("span", { "data-preview-field-path": `${sectionPath}.shippingTitle`, children: shippingTitle }) })] }), activeTab === 'specs' ? ((0, jsx_runtime_1.jsx)("div", { className: "space-y-3", children: effectiveSpecs.length > 0 ? (effectiveSpecs.map((spec, i) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between text-xs py-1 border-b border-slate-900", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-slate-400 font-medium", children: spec.label }), (0, jsx_runtime_1.jsx)("span", { className: "text-slate-200 font-semibold", children: spec.value })] }, i)))) : ((0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-slate-400 space-y-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between py-1 border-b border-slate-800/50", children: [(0, jsx_runtime_1.jsx)("span", { children: "Status" }), (0, jsx_runtime_1.jsx)("span", { className: "text-slate-200 font-semibold", children: isAvailable ? 'Verified Authentic & In Stock' : 'Out of Stock' })] }), product.category && ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between py-1 border-b border-slate-800/50", children: [(0, jsx_runtime_1.jsx)("span", { children: "Category" }), (0, jsx_runtime_1.jsx)("span", { className: "text-slate-200 font-semibold", children: String(product.category) })] }))] })) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-slate-300 space-y-3 leading-relaxed", children: [(0, jsx_runtime_1.jsx)("p", { "data-preview-field-path": `${sectionPath}.shippingSummary`, children: shippingSummary }), (0, jsx_runtime_1.jsx)("p", { "data-preview-field-path": `${sectionPath}.shippingReturns`, className: "text-slate-400", children: shippingReturns })] }))] })] }) })] }) }));
202
+ : 'bg-slate-900/60 text-slate-300 border border-slate-800 hover:bg-slate-800 hover:text-white'}`, children: resolved.formatOption(s) }, s))) })] })), (0, jsx_runtime_1.jsxs)("div", { className: "mt-8 flex flex-col gap-3", children: [(0, jsx_runtime_1.jsx)("button", { type: "button", disabled: !isAvailable, onClick: () => {
203
+ const itemPrice = resolvedPrice.numericPrice || (0, useCart_1.parseNumericPrice)(product.price);
204
+ if (onAddToSelection) {
205
+ onAddToSelection({ ...product, price: itemPrice, showPrice: itemShowPrice }, selectedSize || undefined, selectedColor || undefined);
206
+ }
207
+ else if (cart) {
208
+ cart.addItem({
209
+ id: String(product.id || name),
210
+ name,
211
+ brand: product.brand,
212
+ price: itemPrice,
213
+ originalPrice: (0, useCart_1.parseNumericPrice)(product.compareAtPrice || product.originalPrice),
214
+ image: validImages[0] || activeImage,
215
+ size: selectedSize || undefined,
216
+ color: selectedColor || undefined,
217
+ quantity: 1,
218
+ sku: product.sku ? String(product.sku) : undefined,
219
+ showPrice: itemShowPrice,
220
+ });
221
+ cart.openCart();
222
+ }
223
+ }, className: "w-full py-4 px-6 rounded-2xl font-black text-sm uppercase tracking-wider bg-lime-400 text-slate-950 hover:bg-lime-300 active:scale-98 transition-all duration-150 shadow-lg shadow-lime-400/20 flex items-center justify-center gap-2 disabled:cursor-not-allowed disabled:bg-slate-700 disabled:text-slate-300 disabled:shadow-none cursor-pointer", children: (0, jsx_runtime_1.jsx)("span", { "data-preview-field-path": `${sectionPath}.addToSelectionLabel`, children: isAvailable ? (isFullEcommerce ? 'Add to Cart' : addToSelectionLabel) : 'Out of Stock' }) }), isAvailable && isFullEcommerce && ((0, jsx_runtime_1.jsxs)("button", { type: "button", onClick: () => {
224
+ const itemPrice = resolvedPrice.numericPrice || (0, useCart_1.parseNumericPrice)(product.price);
225
+ if (cart) {
226
+ cart.addItem({
227
+ id: String(product.id || name),
228
+ name,
229
+ brand: product.brand,
230
+ price: itemPrice,
231
+ originalPrice: (0, useCart_1.parseNumericPrice)(product.compareAtPrice || product.originalPrice),
232
+ image: validImages[0] || activeImage,
233
+ size: selectedSize || undefined,
234
+ color: selectedColor || undefined,
235
+ quantity: 1,
236
+ sku: product.sku ? String(product.sku) : undefined,
237
+ showPrice: itemShowPrice,
238
+ });
239
+ }
240
+ window.location.href = '/checkout';
241
+ }, className: "w-full py-3.5 px-6 rounded-2xl font-bold text-sm bg-emerald-600 text-white hover:bg-emerald-500 transition-all duration-150 flex items-center justify-center gap-2 cursor-pointer shadow-lg shadow-emerald-950/40", children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5 fill-none stroke-current", strokeWidth: 2, viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Buy Now \u00B7 Proceed to Checkout" })] })), isAvailable && resolvedWhatsappUrl && ((0, jsx_runtime_1.jsxs)("a", { href: resolvedWhatsappUrl, target: "_blank", rel: "noopener noreferrer", className: "w-full py-3.5 px-6 rounded-2xl font-bold text-sm bg-emerald-600/20 text-emerald-400 hover:bg-emerald-600/30 border border-emerald-500/30 transition-all duration-150 flex items-center justify-center gap-2", children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5 fill-current", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { d: "M17.472 14.382c-.301-.15-1.78-.879-2.056-.98-.276-.1-.477-.15-.678.15-.201.3-.78 0.98-.956 1.18-.175.2-.351.226-.652.075-.301-.15-1.272-.469-2.423-1.496-.896-.799-1.501-1.787-1.677-2.088-.175-.301-.019-.464.132-.614.136-.135.301-.351.452-.527.15-.176.201-.301.301-.502.1-.2.05-.376-.025-.527-.075-.15-.678-1.635-.93-2.242-.244-.592-.493-.512-.678-.521-.175-.009-.376-.009-.577-.009-.201 0-.527.075-.803.376-.276.301-1.054 1.03-1.054 2.512 0 1.482 1.079 2.912 1.23 3.113.15.201 2.124 3.243 5.145 4.548.718.311 1.279.497 1.716.636.722.23 1.378.197 1.898.12.579-.087 1.78-.728 2.03-1.431.251-.703.251-1.305.176-1.431-.075-.126-.276-.201-.577-.351zM12.004 2C6.48 2 2 6.48 2 12c0 1.82.49 3.52 1.34 4.99L2 22l5.14-1.35c1.42.78 3.04 1.22 4.86 1.22 5.52 0 10-4.48 10-10S17.524 2 12.004 2z" }) }), (0, jsx_runtime_1.jsx)("span", { children: "Order Directly via WhatsApp" })] }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-10 border-t border-slate-800/80 pt-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex gap-6 border-b border-slate-800 pb-3 mb-4", children: [(0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => setActiveTab('specs'), className: `text-sm font-bold tracking-wide transition-colors ${activeTab === 'specs' ? 'text-lime-400' : 'text-slate-400 hover:text-slate-200'}`, children: (0, jsx_runtime_1.jsx)("span", { "data-preview-field-path": `${sectionPath}.specsTitle`, children: specsTitle }) }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => setActiveTab('shipping'), className: `text-sm font-bold tracking-wide transition-colors ${activeTab === 'shipping' ? 'text-lime-400' : 'text-slate-400 hover:text-slate-200'}`, children: (0, jsx_runtime_1.jsx)("span", { "data-preview-field-path": `${sectionPath}.shippingTitle`, children: shippingTitle }) })] }), activeTab === 'specs' ? ((0, jsx_runtime_1.jsx)("div", { className: "space-y-3", children: effectiveSpecs.length > 0 ? (effectiveSpecs.map((spec, i) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between text-xs py-1 border-b border-slate-900", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-slate-400 font-medium", children: spec.label }), (0, jsx_runtime_1.jsx)("span", { className: "text-slate-200 font-semibold", children: spec.value })] }, i)))) : ((0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-slate-400 space-y-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between py-1 border-b border-slate-800/50", children: [(0, jsx_runtime_1.jsx)("span", { children: "Status" }), (0, jsx_runtime_1.jsx)("span", { className: "text-slate-200 font-semibold", children: isAvailable ? 'Verified Authentic & In Stock' : 'Out of Stock' })] }), product.category && ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between py-1 border-b border-slate-800/50", children: [(0, jsx_runtime_1.jsx)("span", { children: "Category" }), (0, jsx_runtime_1.jsx)("span", { className: "text-slate-200 font-semibold", children: String(product.category) })] }))] })) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-slate-300 space-y-3 leading-relaxed", children: [(0, jsx_runtime_1.jsx)("p", { "data-preview-field-path": `${sectionPath}.shippingSummary`, children: shippingSummary }), (0, jsx_runtime_1.jsx)("p", { "data-preview-field-path": `${sectionPath}.shippingReturns`, className: "text-slate-400", children: shippingReturns })] }))] })] }) })] }) }));
196
242
  }
@@ -33,6 +33,7 @@ exports.useCommon = useCommon;
33
33
  exports.useContact = useContact;
34
34
  exports.useSyncedBranding = useSyncedBranding;
35
35
  const jsx_runtime_1 = require("react/jsx-runtime");
36
+ const useCart_1 = require("./cart/useCart");
36
37
  const react_1 = require("react");
37
38
  const core_1 = require("@deneb-ui/core");
38
39
  const DenebComponentStyles_1 = require("./DenebComponentStyles");
@@ -630,7 +631,7 @@ function SiteDataProvider({ children, initialSiteData, fallbackSiteData, liveCat
630
631
  }
631
632
  }, [resolvedTheme]);
632
633
  const value = (0, react_1.useMemo)(() => siteData, [siteData]);
633
- return ((0, jsx_runtime_1.jsxs)(exports.SiteDataContext.Provider, { value: value, children: [(0, jsx_runtime_1.jsx)(ThemeStyles_1.ThemeStyles, { theme: resolvedTheme }), (0, jsx_runtime_1.jsx)(FontLoader_1.FontLoader, {}), (0, jsx_runtime_1.jsx)(ResponsiveBaseStyles_1.ResponsiveBaseStyles, {}), (0, jsx_runtime_1.jsx)(DenebComponentStyles_1.DenebComponentStyles, {}), children] }));
634
+ return ((0, jsx_runtime_1.jsxs)(exports.SiteDataContext.Provider, { value: value, children: [(0, jsx_runtime_1.jsx)(ThemeStyles_1.ThemeStyles, { theme: resolvedTheme }), (0, jsx_runtime_1.jsx)(FontLoader_1.FontLoader, {}), (0, jsx_runtime_1.jsx)(ResponsiveBaseStyles_1.ResponsiveBaseStyles, {}), (0, jsx_runtime_1.jsx)(DenebComponentStyles_1.DenebComponentStyles, {}), (0, jsx_runtime_1.jsx)(useCart_1.CartProvider, { children: children })] }));
634
635
  }
635
636
  function useSiteData() {
636
637
  const ctx = (0, react_1.useContext)(exports.SiteDataContext);
@@ -63,7 +63,7 @@ function getProductWhatsAppUrl(product, whatsappNumber, options) {
63
63
  }
64
64
  const CartContext = (0, react_1.createContext)(null);
65
65
  const STORAGE_KEY = 'deneb_cart_items_v1';
66
- function CartProvider({ children, storageKey = STORAGE_KEY, }) {
66
+ function CartProviderInternal({ children, storageKey = STORAGE_KEY, }) {
67
67
  const [items, setItems] = (0, react_1.useState)([]);
68
68
  const [isOpen, setIsOpen] = (0, react_1.useState)(false);
69
69
  const [hasHydrated, setHasHydrated] = (0, react_1.useState)(false);
@@ -206,6 +206,13 @@ function CartProvider({ children, storageKey = STORAGE_KEY, }) {
206
206
  ]);
207
207
  return (0, jsx_runtime_1.jsx)(CartContext.Provider, { value: value, children: children });
208
208
  }
209
+ function CartProvider({ children, storageKey = STORAGE_KEY, }) {
210
+ const existing = (0, react_1.useContext)(CartContext);
211
+ if (existing) {
212
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
213
+ }
214
+ return (0, jsx_runtime_1.jsx)(CartProviderInternal, { storageKey: storageKey, children: children });
215
+ }
209
216
  function useOptionalCart() {
210
217
  return (0, react_1.useContext)(CartContext);
211
218
  }
package/dist/index.d.ts CHANGED
@@ -43,6 +43,8 @@ export * from './ProductQuickView';
43
43
  export * from './CookieConsentBanner';
44
44
  export * from './cart/useCart';
45
45
  export * from './EditableCartDrawer';
46
+ export * from './EditableCheckout';
47
+ export * from './EditableOrderSuccess';
46
48
  export * from './EditableFilterSidebar';
47
49
  export * from './SiteDataProvider';
48
50
  export * from './ThemeStyles';
@@ -96,6 +98,8 @@ export { EditableHeroCentered as Hero, EditableHeroSplit as HeroSplit } from './
96
98
  export { EditableAnnouncementBar as AnnouncementBar } from './EditableAnnouncementBar';
97
99
  export { EditableCategoryPills as CategoryPills } from './EditableCategoryPills';
98
100
  export { EditableCartDrawer as CartDrawer } from './EditableCartDrawer';
101
+ export { EditableCheckout as Checkout } from './EditableCheckout';
102
+ export { EditableOrderSuccess as OrderSuccess } from './EditableOrderSuccess';
99
103
  export { EditableFilterSidebar as FilterSidebar } from './EditableFilterSidebar';
100
104
  export { EditableBeforeAfterSlider as BeforeAfterSlider } from './EditableBeforeAfterSlider';
101
105
  export { EditableBookingModal as BookingModal } from './EditableBookingModal';
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.ServiceCard = exports.GoogleFeedback = exports.CustomerReviews = exports.ProductDetail = exports.ProductShowcase = exports.ProductGrid = exports.EntityCard = exports.ListingCard = exports.UniversalCard = exports.VehicleCard = exports.ProductCard = exports.List = exports.Box = exports.Section = exports.Grid = exports.Map = exports.SafeImage = exports.DenebImage = exports.Image = exports.Quote = exports.Badge = exports.Paragraph = exports.Heading = exports.Text = exports.Dialog = exports.Card = exports.Button = exports.collectStyleTargetsFromHtml = exports.validateStyleTree = exports.styleToCssVariables = exports.patchStyleByPath = exports.patchElementStyle = exports.STYLE_TYPE_ATTRIBUTE = exports.STYLE_TARGET_ATTRIBUTE = exports.DENEB_STYLE_PATCH_MESSAGE = exports.STYLE_PATCH_MESSAGE = exports.formatResponsiveFontSize = exports.resolveInstallableFont = exports.normalizeFontId = exports.lookupFontDefinition = exports.listFontsByCategory = exports.collectFontIdsFromSiteData = exports.buildGoogleFontsStylesheetUrl = exports.DENEB_GOOGLE_FONT_COUNT = exports.DENEB_FONT_REGISTRY = exports.useDenebFonts = exports.DENEB_FONTS_LINK_ID = exports.FontLoader = exports.DenebComponentStyles = exports.ResponsiveBaseStyles = void 0;
22
- exports.generateThemeVariables = exports.mergeVisualCustomizationIntoTheme = exports.customizationToTheme = exports.parseVisualCustomization = exports.normalizeHexColor = exports.toHexColor = exports.getAutoContrastTextColor = exports.isDarkColor = exports.FONT_PAIRINGS = exports.GLOBAL_FONT_OPTIONS = exports.THEME_PALETTES = exports.DENEB_AUTHOR = exports.DENEB_FRAMEWORK_VERSION = exports.DENEB_FRAMEWORK_NAME = exports.AdditionalPagesNav = exports.PlatformAdditionalPages = exports.TestimonialCarousel = exports.BookingModal = exports.BeforeAfterSlider = exports.FilterSidebar = exports.CartDrawer = exports.CategoryPills = exports.AnnouncementBar = exports.HeroSplit = exports.Hero = exports.Footer = exports.Header = exports.Navbar = exports.ContactForm = exports.FAQ = exports.Accordion = exports.Testimonials = exports.TestimonialSection = exports.TestimonialCard = exports.PricingCard = void 0;
22
+ exports.generateThemeVariables = exports.mergeVisualCustomizationIntoTheme = exports.customizationToTheme = exports.parseVisualCustomization = exports.normalizeHexColor = exports.toHexColor = exports.getAutoContrastTextColor = exports.isDarkColor = exports.FONT_PAIRINGS = exports.GLOBAL_FONT_OPTIONS = exports.THEME_PALETTES = exports.DENEB_AUTHOR = exports.DENEB_FRAMEWORK_VERSION = exports.DENEB_FRAMEWORK_NAME = exports.AdditionalPagesNav = exports.PlatformAdditionalPages = exports.TestimonialCarousel = exports.BookingModal = exports.BeforeAfterSlider = exports.FilterSidebar = exports.OrderSuccess = exports.Checkout = exports.CartDrawer = exports.CategoryPills = exports.AnnouncementBar = exports.HeroSplit = exports.Hero = exports.Footer = exports.Header = exports.Navbar = exports.ContactForm = exports.FAQ = exports.Accordion = exports.Testimonials = exports.TestimonialSection = exports.TestimonialCard = exports.PricingCard = void 0;
23
23
  __exportStar(require("./PreviewField"), exports);
24
24
  __exportStar(require("./EditableText"), exports);
25
25
  __exportStar(require("./EditableImage"), exports);
@@ -61,6 +61,8 @@ __exportStar(require("./ProductQuickView"), exports);
61
61
  __exportStar(require("./CookieConsentBanner"), exports);
62
62
  __exportStar(require("./cart/useCart"), exports);
63
63
  __exportStar(require("./EditableCartDrawer"), exports);
64
+ __exportStar(require("./EditableCheckout"), exports);
65
+ __exportStar(require("./EditableOrderSuccess"), exports);
64
66
  __exportStar(require("./EditableFilterSidebar"), exports);
65
67
  __exportStar(require("./SiteDataProvider"), exports);
66
68
  __exportStar(require("./ThemeStyles"), exports);
@@ -181,6 +183,10 @@ var EditableCategoryPills_1 = require("./EditableCategoryPills");
181
183
  Object.defineProperty(exports, "CategoryPills", { enumerable: true, get: function () { return EditableCategoryPills_1.EditableCategoryPills; } });
182
184
  var EditableCartDrawer_1 = require("./EditableCartDrawer");
183
185
  Object.defineProperty(exports, "CartDrawer", { enumerable: true, get: function () { return EditableCartDrawer_1.EditableCartDrawer; } });
186
+ var EditableCheckout_1 = require("./EditableCheckout");
187
+ Object.defineProperty(exports, "Checkout", { enumerable: true, get: function () { return EditableCheckout_1.EditableCheckout; } });
188
+ var EditableOrderSuccess_1 = require("./EditableOrderSuccess");
189
+ Object.defineProperty(exports, "OrderSuccess", { enumerable: true, get: function () { return EditableOrderSuccess_1.EditableOrderSuccess; } });
184
190
  var EditableFilterSidebar_1 = require("./EditableFilterSidebar");
185
191
  Object.defineProperty(exports, "FilterSidebar", { enumerable: true, get: function () { return EditableFilterSidebar_1.EditableFilterSidebar; } });
186
192
  var EditableBeforeAfterSlider_1 = require("./EditableBeforeAfterSlider");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deneb-ui/ui",
3
- "version": "2.0.122",
3
+ "version": "2.0.123",
4
4
  "description": "Visual-first React component library for editable commerce storefronts. Built for Next.js and Fivora.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -50,7 +50,7 @@
50
50
  ],
51
51
  "license": "MIT",
52
52
  "dependencies": {
53
- "@deneb-ui/core": "^2.0.122"
53
+ "@deneb-ui/core": "^2.0.123"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "react": "^18.0.0 || ^19.0.0",