@cedros/pay-react 1.0.5 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +190 -38
- package/dist/{CedrosContext-CFEXGwQg.mjs → CedrosContext-DUT3cLZg.mjs} +683 -372
- package/dist/CedrosContext-efFL4kQz.js +11 -0
- package/dist/admin/index.d.ts +9 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/plugin.d.ts +9 -0
- package/dist/admin/plugin.d.ts.map +1 -0
- package/dist/admin/types.d.ts +115 -0
- package/dist/admin/types.d.ts.map +1 -0
- package/dist/components/CedrosPay.d.ts.map +1 -1
- package/dist/components/CreditsButton.d.ts +42 -0
- package/dist/components/CreditsButton.d.ts.map +1 -0
- package/dist/components/CreditsSubscribeButton.d.ts +55 -0
- package/dist/components/CreditsSubscribeButton.d.ts.map +1 -0
- package/dist/components/CryptoButton.d.ts.map +1 -1
- package/dist/components/CryptoSubscribeButton.d.ts.map +1 -1
- package/dist/components/PaymentModal.d.ts +8 -2
- package/dist/components/PaymentModal.d.ts.map +1 -1
- package/dist/components/PurchaseButton.d.ts +14 -3
- package/dist/components/PurchaseButton.d.ts.map +1 -1
- package/dist/components/SubscriptionManagementPanel.d.ts.map +1 -1
- package/dist/components/admin/AISettingsSection.d.ts +3 -0
- package/dist/components/admin/AISettingsSection.d.ts.map +1 -0
- package/dist/components/admin/AdminAuthManager.d.ts +95 -0
- package/dist/components/admin/AdminAuthManager.d.ts.map +1 -0
- package/dist/components/admin/CedrosPayAdminDashboard.d.ts +40 -0
- package/dist/components/admin/CedrosPayAdminDashboard.d.ts.map +1 -0
- package/dist/components/admin/ConfigEditor.d.ts +13 -0
- package/dist/components/admin/ConfigEditor.d.ts.map +1 -0
- package/dist/components/admin/CouponsSection.d.ts +3 -0
- package/dist/components/admin/CouponsSection.d.ts.map +1 -0
- package/dist/components/admin/Dropdown.d.ts +29 -0
- package/dist/components/admin/Dropdown.d.ts.map +1 -0
- package/dist/components/admin/FAQSection.d.ts +3 -0
- package/dist/components/admin/FAQSection.d.ts.map +1 -0
- package/dist/components/admin/MessagingSection.d.ts +10 -0
- package/dist/components/admin/MessagingSection.d.ts.map +1 -0
- package/dist/components/admin/OverviewSection.d.ts +3 -0
- package/dist/components/admin/OverviewSection.d.ts.map +1 -0
- package/dist/components/admin/PaymentSettingsSection.d.ts +3 -0
- package/dist/components/admin/PaymentSettingsSection.d.ts.map +1 -0
- package/dist/components/admin/ProductVariationsEditor.d.ts +14 -0
- package/dist/components/admin/ProductVariationsEditor.d.ts.map +1 -0
- package/dist/components/admin/ProductsSection.d.ts +3 -0
- package/dist/components/admin/ProductsSection.d.ts.map +1 -0
- package/dist/components/admin/RefundsSection.d.ts +3 -0
- package/dist/components/admin/RefundsSection.d.ts.map +1 -0
- package/dist/components/admin/SettingsSection.d.ts +10 -0
- package/dist/components/admin/SettingsSection.d.ts.map +1 -0
- package/dist/components/admin/SingleCategorySettings.d.ts +21 -0
- package/dist/components/admin/SingleCategorySettings.d.ts.map +1 -0
- package/dist/components/admin/StatsBar.d.ts +19 -0
- package/dist/components/admin/StatsBar.d.ts.map +1 -0
- package/dist/components/admin/StorefrontSection.d.ts +3 -0
- package/dist/components/admin/StorefrontSection.d.ts.map +1 -0
- package/dist/components/admin/SubscriptionsSection.d.ts +3 -0
- package/dist/components/admin/SubscriptionsSection.d.ts.map +1 -0
- package/dist/components/admin/TransactionsSection.d.ts +3 -0
- package/dist/components/admin/TransactionsSection.d.ts.map +1 -0
- package/dist/components/admin/VariantInventoryGrid.d.ts +19 -0
- package/dist/components/admin/VariantInventoryGrid.d.ts.map +1 -0
- package/dist/components/admin/VariationTypeEditor.d.ts +15 -0
- package/dist/components/admin/VariationTypeEditor.d.ts.map +1 -0
- package/dist/components/admin/configApi.d.ts +104 -0
- package/dist/components/admin/configApi.d.ts.map +1 -0
- package/dist/components/admin/icons.d.ts +50 -0
- package/dist/components/admin/icons.d.ts.map +1 -0
- package/dist/components/admin/index.d.ts +16 -0
- package/dist/components/admin/index.d.ts.map +1 -0
- package/dist/components/admin/sections-more.d.ts +12 -0
- package/dist/components/admin/sections-more.d.ts.map +1 -0
- package/dist/components/admin/sections.d.ts +12 -0
- package/dist/components/admin/sections.d.ts.map +1 -0
- package/dist/components/admin/types.d.ts +324 -0
- package/dist/components/admin/types.d.ts.map +1 -0
- package/dist/components/admin/useAdminAuth.d.ts +50 -0
- package/dist/components/admin/useAdminAuth.d.ts.map +1 -0
- package/dist/components/admin/useAutosave.d.ts +56 -0
- package/dist/components/admin/useAutosave.d.ts.map +1 -0
- package/dist/components/admin/useProductVariations.d.ts +56 -0
- package/dist/components/admin/useProductVariations.d.ts.map +1 -0
- package/dist/components/subscriptionPanelStyles.d.ts +2 -3
- package/dist/components/subscriptionPanelStyles.d.ts.map +1 -1
- package/dist/context/CedrosContext.d.ts +2 -0
- package/dist/context/CedrosContext.d.ts.map +1 -1
- package/dist/context/ThemeContext.d.ts +6 -0
- package/dist/context/ThemeContext.d.ts.map +1 -1
- package/dist/crypto-only.d.ts +1 -1
- package/dist/crypto-only.d.ts.map +1 -1
- package/dist/crypto-only.js +1 -1
- package/dist/crypto-only.mjs +16 -17
- package/dist/ecommerce/__tests__/cartCheckoutRequirements.test.d.ts +2 -0
- package/dist/ecommerce/__tests__/cartCheckoutRequirements.test.d.ts.map +1 -0
- package/dist/ecommerce/__tests__/cartProviderPersistence.test.d.ts +2 -0
- package/dist/ecommerce/__tests__/cartProviderPersistence.test.d.ts.map +1 -0
- package/dist/ecommerce/__tests__/cartReducer.test.d.ts +2 -0
- package/dist/ecommerce/__tests__/cartReducer.test.d.ts.map +1 -0
- package/dist/ecommerce/__tests__/cartServerMerge.test.d.ts +2 -0
- package/dist/ecommerce/__tests__/cartServerMerge.test.d.ts.map +1 -0
- package/dist/ecommerce/__tests__/checkoutPaymentMethods.test.d.ts +2 -0
- package/dist/ecommerce/__tests__/checkoutPaymentMethods.test.d.ts.map +1 -0
- package/dist/ecommerce/__tests__/checkoutReturn.test.d.ts +2 -0
- package/dist/ecommerce/__tests__/checkoutReturn.test.d.ts.map +1 -0
- package/dist/ecommerce/__tests__/checkoutSchema.test.d.ts +2 -0
- package/dist/ecommerce/__tests__/checkoutSchema.test.d.ts.map +1 -0
- package/dist/ecommerce/__tests__/mockAdapter.test.d.ts +2 -0
- package/dist/ecommerce/__tests__/mockAdapter.test.d.ts.map +1 -0
- package/dist/ecommerce/adapters/CommerceAdapter.d.ts +235 -0
- package/dist/ecommerce/adapters/CommerceAdapter.d.ts.map +1 -0
- package/dist/ecommerce/adapters/mock/mockAdapter.d.ts +3 -0
- package/dist/ecommerce/adapters/mock/mockAdapter.d.ts.map +1 -0
- package/dist/ecommerce/adapters/paywall/paywallAdapter.d.ts +6 -0
- package/dist/ecommerce/adapters/paywall/paywallAdapter.d.ts.map +1 -0
- package/dist/ecommerce/components/cart/CartLineItem.d.ts +12 -0
- package/dist/ecommerce/components/cart/CartLineItem.d.ts.map +1 -0
- package/dist/ecommerce/components/cart/CartPageContent.d.ts +6 -0
- package/dist/ecommerce/components/cart/CartPageContent.d.ts.map +1 -0
- package/dist/ecommerce/components/cart/CartPanel.d.ts +5 -0
- package/dist/ecommerce/components/cart/CartPanel.d.ts.map +1 -0
- package/dist/ecommerce/components/cart/CartSidebar.d.ts +11 -0
- package/dist/ecommerce/components/cart/CartSidebar.d.ts.map +1 -0
- package/dist/ecommerce/components/cart/CartSummary.d.ts +13 -0
- package/dist/ecommerce/components/cart/CartSummary.d.ts.map +1 -0
- package/dist/ecommerce/components/cart/PromoCodeInput.d.ts +6 -0
- package/dist/ecommerce/components/cart/PromoCodeInput.d.ts.map +1 -0
- package/dist/ecommerce/components/catalog/Breadcrumbs.d.ts +9 -0
- package/dist/ecommerce/components/catalog/Breadcrumbs.d.ts.map +1 -0
- package/dist/ecommerce/components/catalog/CategoryNav.d.ts +8 -0
- package/dist/ecommerce/components/catalog/CategoryNav.d.ts.map +1 -0
- package/dist/ecommerce/components/catalog/FilterPanel.d.ts +29 -0
- package/dist/ecommerce/components/catalog/FilterPanel.d.ts.map +1 -0
- package/dist/ecommerce/components/catalog/Price.d.ts +9 -0
- package/dist/ecommerce/components/catalog/Price.d.ts.map +1 -0
- package/dist/ecommerce/components/catalog/ProductCard.d.ts +14 -0
- package/dist/ecommerce/components/catalog/ProductCard.d.ts.map +1 -0
- package/dist/ecommerce/components/catalog/ProductGallery.d.ts +6 -0
- package/dist/ecommerce/components/catalog/ProductGallery.d.ts.map +1 -0
- package/dist/ecommerce/components/catalog/ProductGrid.d.ts +20 -0
- package/dist/ecommerce/components/catalog/ProductGrid.d.ts.map +1 -0
- package/dist/ecommerce/components/catalog/QuantitySelector.d.ts +8 -0
- package/dist/ecommerce/components/catalog/QuantitySelector.d.ts.map +1 -0
- package/dist/ecommerce/components/catalog/QuickViewDialog.d.ts +10 -0
- package/dist/ecommerce/components/catalog/QuickViewDialog.d.ts.map +1 -0
- package/dist/ecommerce/components/catalog/SearchInput.d.ts +7 -0
- package/dist/ecommerce/components/catalog/SearchInput.d.ts.map +1 -0
- package/dist/ecommerce/components/catalog/VariantSelector.d.ts +19 -0
- package/dist/ecommerce/components/catalog/VariantSelector.d.ts.map +1 -0
- package/dist/ecommerce/components/chat/ShopChatPanel.d.ts +4 -0
- package/dist/ecommerce/components/chat/ShopChatPanel.d.ts.map +1 -0
- package/dist/ecommerce/components/checkout/AddressForm.d.ts +9 -0
- package/dist/ecommerce/components/checkout/AddressForm.d.ts.map +1 -0
- package/dist/ecommerce/components/checkout/CheckoutCancelPage.d.ts +24 -0
- package/dist/ecommerce/components/checkout/CheckoutCancelPage.d.ts.map +1 -0
- package/dist/ecommerce/components/checkout/CheckoutForm.d.ts +4 -0
- package/dist/ecommerce/components/checkout/CheckoutForm.d.ts.map +1 -0
- package/dist/ecommerce/components/checkout/CheckoutLayout.d.ts +6 -0
- package/dist/ecommerce/components/checkout/CheckoutLayout.d.ts.map +1 -0
- package/dist/ecommerce/components/checkout/CheckoutReceipt.d.ts +8 -0
- package/dist/ecommerce/components/checkout/CheckoutReceipt.d.ts.map +1 -0
- package/dist/ecommerce/components/checkout/CheckoutSuccessPage.d.ts +29 -0
- package/dist/ecommerce/components/checkout/CheckoutSuccessPage.d.ts.map +1 -0
- package/dist/ecommerce/components/checkout/InventoryVerificationDialog.d.ts +19 -0
- package/dist/ecommerce/components/checkout/InventoryVerificationDialog.d.ts.map +1 -0
- package/dist/ecommerce/components/checkout/OrderReview.d.ts +4 -0
- package/dist/ecommerce/components/checkout/OrderReview.d.ts.map +1 -0
- package/dist/ecommerce/components/checkout/PaymentStep.d.ts +15 -0
- package/dist/ecommerce/components/checkout/PaymentStep.d.ts.map +1 -0
- package/dist/ecommerce/components/checkout/ShippingMethodSelector.d.ts +9 -0
- package/dist/ecommerce/components/checkout/ShippingMethodSelector.d.ts.map +1 -0
- package/dist/ecommerce/components/faq/FAQItem.d.ts +29 -0
- package/dist/ecommerce/components/faq/FAQItem.d.ts.map +1 -0
- package/dist/ecommerce/components/faq/FAQItem.test.d.ts +7 -0
- package/dist/ecommerce/components/faq/FAQItem.test.d.ts.map +1 -0
- package/dist/ecommerce/components/faq/FAQList.d.ts +15 -0
- package/dist/ecommerce/components/faq/FAQList.d.ts.map +1 -0
- package/dist/ecommerce/components/faq/index.d.ts +3 -0
- package/dist/ecommerce/components/faq/index.d.ts.map +1 -0
- package/dist/ecommerce/components/general/EmptyState.d.ts +8 -0
- package/dist/ecommerce/components/general/EmptyState.d.ts.map +1 -0
- package/dist/ecommerce/components/general/ErrorBoundary.d.ts +16 -0
- package/dist/ecommerce/components/general/ErrorBoundary.d.ts.map +1 -0
- package/dist/ecommerce/components/general/ErrorState.d.ts +7 -0
- package/dist/ecommerce/components/general/ErrorState.d.ts.map +1 -0
- package/dist/ecommerce/components/general/toast.d.ts +19 -0
- package/dist/ecommerce/components/general/toast.d.ts.map +1 -0
- package/dist/ecommerce/components/orders/OrderCard.d.ts +7 -0
- package/dist/ecommerce/components/orders/OrderCard.d.ts.map +1 -0
- package/dist/ecommerce/components/orders/OrderDetails.d.ts +7 -0
- package/dist/ecommerce/components/orders/OrderDetails.d.ts.map +1 -0
- package/dist/ecommerce/components/orders/OrderList.d.ts +7 -0
- package/dist/ecommerce/components/orders/OrderList.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/accordion.d.ts +7 -0
- package/dist/ecommerce/components/ui/accordion.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/badge.d.ts +10 -0
- package/dist/ecommerce/components/ui/badge.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/button.d.ts +12 -0
- package/dist/ecommerce/components/ui/button.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/card.d.ts +8 -0
- package/dist/ecommerce/components/ui/card.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/dialog.d.ts +13 -0
- package/dist/ecommerce/components/ui/dialog.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/input.d.ts +5 -0
- package/dist/ecommerce/components/ui/input.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/label.d.ts +3 -0
- package/dist/ecommerce/components/ui/label.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/select.d.ts +9 -0
- package/dist/ecommerce/components/ui/select.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/separator.d.ts +4 -0
- package/dist/ecommerce/components/ui/separator.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/sheet.d.ts +21 -0
- package/dist/ecommerce/components/ui/sheet.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/skeleton.d.ts +3 -0
- package/dist/ecommerce/components/ui/skeleton.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/tabs.d.ts +7 -0
- package/dist/ecommerce/components/ui/tabs.d.ts.map +1 -0
- package/dist/ecommerce/components/ui/textarea.d.ts +5 -0
- package/dist/ecommerce/components/ui/textarea.d.ts.map +1 -0
- package/dist/ecommerce/config/context.d.ts +13 -0
- package/dist/ecommerce/config/context.d.ts.map +1 -0
- package/dist/ecommerce/config/types.d.ts +48 -0
- package/dist/ecommerce/config/types.d.ts.map +1 -0
- package/dist/ecommerce/hooks/checkoutReturn.d.ts +3 -0
- package/dist/ecommerce/hooks/checkoutReturn.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useAIRelatedProducts.d.ts +33 -0
- package/dist/ecommerce/hooks/useAIRelatedProducts.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useCartInventory.d.ts +42 -0
- package/dist/ecommerce/hooks/useCartInventory.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useCatalogUrlState.d.ts +15 -0
- package/dist/ecommerce/hooks/useCatalogUrlState.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useCategories.d.ts +7 -0
- package/dist/ecommerce/hooks/useCategories.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useCheckoutResultFromUrl.d.ts +4 -0
- package/dist/ecommerce/hooks/useCheckoutResultFromUrl.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useHoldExpiry.d.ts +34 -0
- package/dist/ecommerce/hooks/useHoldExpiry.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useInventoryVerification.d.ts +41 -0
- package/dist/ecommerce/hooks/useInventoryVerification.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useOrders.d.ts +7 -0
- package/dist/ecommerce/hooks/useOrders.d.ts.map +1 -0
- package/dist/ecommerce/hooks/usePaymentMethodsConfig.d.ts +6 -0
- package/dist/ecommerce/hooks/usePaymentMethodsConfig.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useProduct.d.ts +7 -0
- package/dist/ecommerce/hooks/useProduct.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useProducts.d.ts +8 -0
- package/dist/ecommerce/hooks/useProducts.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useShippingMethods.d.ts +10 -0
- package/dist/ecommerce/hooks/useShippingMethods.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useStorefrontSettings.d.ts +32 -0
- package/dist/ecommerce/hooks/useStorefrontSettings.d.ts.map +1 -0
- package/dist/ecommerce/hooks/useSubscriptionData.d.ts +8 -0
- package/dist/ecommerce/hooks/useSubscriptionData.d.ts.map +1 -0
- package/dist/ecommerce/index.d.ts +98 -0
- package/dist/ecommerce/index.d.ts.map +1 -0
- package/dist/ecommerce/integrations/cedros-pay/useCedrosPayCheckoutAdapter.d.ts +10 -0
- package/dist/ecommerce/integrations/cedros-pay/useCedrosPayCheckoutAdapter.d.ts.map +1 -0
- package/dist/ecommerce/state/cart/CartProvider.d.ts +27 -0
- package/dist/ecommerce/state/cart/CartProvider.d.ts.map +1 -0
- package/dist/ecommerce/state/cart/cartReducer.d.ts +35 -0
- package/dist/ecommerce/state/cart/cartReducer.d.ts.map +1 -0
- package/dist/ecommerce/state/checkout/checkoutSchema.d.ts +21 -0
- package/dist/ecommerce/state/checkout/checkoutSchema.d.ts.map +1 -0
- package/dist/ecommerce/state/checkout/useCheckout.d.ts +34 -0
- package/dist/ecommerce/state/checkout/useCheckout.d.ts.map +1 -0
- package/dist/ecommerce/templates/CartTemplate.d.ts +5 -0
- package/dist/ecommerce/templates/CartTemplate.d.ts.map +1 -0
- package/dist/ecommerce/templates/CategoryTemplate.d.ts +11 -0
- package/dist/ecommerce/templates/CategoryTemplate.d.ts.map +1 -0
- package/dist/ecommerce/templates/CheckoutTemplate.d.ts +9 -0
- package/dist/ecommerce/templates/CheckoutTemplate.d.ts.map +1 -0
- package/dist/ecommerce/templates/ProductTemplate.d.ts +11 -0
- package/dist/ecommerce/templates/ProductTemplate.d.ts.map +1 -0
- package/dist/ecommerce/templates/PurchaseHistoryTemplate.d.ts +6 -0
- package/dist/ecommerce/templates/PurchaseHistoryTemplate.d.ts.map +1 -0
- package/dist/ecommerce/templates/ReceiptTemplate.d.ts +19 -0
- package/dist/ecommerce/templates/ReceiptTemplate.d.ts.map +1 -0
- package/dist/ecommerce/templates/ShopTemplate.d.ts +15 -0
- package/dist/ecommerce/templates/ShopTemplate.d.ts.map +1 -0
- package/dist/ecommerce/templates/SubscriptionTemplate.d.ts +15 -0
- package/dist/ecommerce/templates/SubscriptionTemplate.d.ts.map +1 -0
- package/dist/ecommerce/testing/adapterContract.d.ts +11 -0
- package/dist/ecommerce/testing/adapterContract.d.ts.map +1 -0
- package/dist/ecommerce/types.d.ts +164 -0
- package/dist/ecommerce/types.d.ts.map +1 -0
- package/dist/ecommerce/utils/cartCheckoutRequirements.d.ts +18 -0
- package/dist/ecommerce/utils/cartCheckoutRequirements.d.ts.map +1 -0
- package/dist/ecommerce/utils/cartItemMetadata.d.ts +3 -0
- package/dist/ecommerce/utils/cartItemMetadata.d.ts.map +1 -0
- package/dist/ecommerce/utils/cn.d.ts +3 -0
- package/dist/ecommerce/utils/cn.d.ts.map +1 -0
- package/dist/ecommerce/utils/money.d.ts +6 -0
- package/dist/ecommerce/utils/money.d.ts.map +1 -0
- package/dist/ecommerce/utils/storage.d.ts +5 -0
- package/dist/ecommerce/utils/storage.d.ts.map +1 -0
- package/dist/en-BXheDBal.mjs +19 -0
- package/dist/en-Yikrt96u.js +1 -0
- package/dist/hooks/useCreditsPayment.d.ts +64 -0
- package/dist/hooks/useCreditsPayment.d.ts.map +1 -0
- package/dist/hooks/useCreditsSubscription.d.ts +42 -0
- package/dist/hooks/useCreditsSubscription.d.ts.map +1 -0
- package/dist/hooks/usePaymentMode.d.ts.map +1 -1
- package/dist/hooks/useStripeCheckout.d.ts +1 -0
- package/dist/hooks/useStripeCheckout.d.ts.map +1 -1
- package/dist/hooks/useSubscriptionManagement.d.ts +4 -0
- package/dist/hooks/useSubscriptionManagement.d.ts.map +1 -1
- package/dist/hooks/useX402Payment.d.ts +1 -0
- package/dist/hooks/useX402Payment.d.ts.map +1 -1
- package/dist/index-DPl2S6i0.js +136 -0
- package/dist/index-SV9PXby1.mjs +26838 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +79 -1922
- package/dist/magic-string.es-B81Zo59j.js +10 -0
- package/dist/magic-string.es-uPKorP4O.mjs +663 -0
- package/dist/managers/CreditsManager.d.ts +151 -0
- package/dist/managers/CreditsManager.d.ts.map +1 -0
- package/dist/managers/ManagerCache.d.ts +2 -0
- package/dist/managers/ManagerCache.d.ts.map +1 -1
- package/dist/managers/RouteDiscoveryManager.d.ts.map +1 -1
- package/dist/managers/StripeManager.d.ts.map +1 -1
- package/dist/managers/X402Manager.d.ts.map +1 -1
- package/dist/pay-react.css +1 -1
- package/dist/sections-BsFQxfHN.mjs +10 -0
- package/dist/sections-CTqBNAKW.js +1 -0
- package/dist/stripe-only.d.ts +1 -1
- package/dist/stripe-only.d.ts.map +1 -1
- package/dist/stripe-only.js +1 -1
- package/dist/stripe-only.mjs +12 -13
- package/dist/styles-C4-_hbgr.js +1 -0
- package/dist/styles-QcAsIVWl.mjs +1909 -0
- package/dist/telemetry.js +1 -1
- package/dist/telemetry.mjs +1 -1
- package/dist/testing/index.js +147 -1
- package/dist/testing/index.mjs +10555 -103
- package/dist/types/componentOptions.d.ts +14 -4
- package/dist/types/componentOptions.d.ts.map +1 -1
- package/dist/types/errors.d.ts +26 -4
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/index.d.ts +115 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/cartHelpers.d.ts +3 -0
- package/dist/utils/cartHelpers.d.ts.map +1 -1
- package/dist/utils/cspHelper.d.ts +7 -1
- package/dist/utils/cspHelper.d.ts.map +1 -1
- package/dist/utils/csvHelpers.d.ts +62 -0
- package/dist/utils/csvHelpers.d.ts.map +1 -0
- package/dist/utils/csvHelpers.test.d.ts +2 -0
- package/dist/utils/csvHelpers.test.d.ts.map +1 -0
- package/dist/utils/dateHelpers.d.ts +24 -0
- package/dist/utils/dateHelpers.d.ts.map +1 -0
- package/dist/utils/eventEmitter.d.ts +1 -1
- package/dist/utils/eventEmitter.d.ts.map +1 -1
- package/dist/utils/fetchWithTimeout.d.ts +3 -3
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/tokenMintValidator.d.ts +10 -6
- package/dist/utils/tokenMintValidator.d.ts.map +1 -1
- package/dist/utils/uuid.d.ts.map +1 -1
- package/dist/uuid-C5B8o31X.js +1 -0
- package/dist/uuid-_z3jSatJ.mjs +17 -0
- package/package.json +25 -9
- package/dist/CedrosContext-DbndTsTA.js +0 -11
- package/dist/en-C739WV_-.mjs +0 -19
- package/dist/en-Cz4OpvN-.js +0 -1
- package/dist/styles-DFcRS8Uu.mjs +0 -1626
- package/dist/styles-Dup9uK6S.js +0 -1
- package/dist/utils/uuid-shim.d.ts +0 -9
- package/dist/utils/uuid-shim.d.ts.map +0 -1
- package/dist/uuid-C0iMjdcc.js +0 -1
- package/dist/uuid-UlzrVY8Y.mjs +0 -17
- package/dist/walletDetection-JZR3UCOa.mjs +0 -27
- package/dist/walletDetection-bNmV5ItZ.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../../../src/ecommerce/components/ui/sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,KAAK,uCAAuB,CAAC;AAC1C,eAAO,MAAM,YAAY,8GAA0B,CAAC;AACpD,eAAO,MAAM,UAAU,4GAAwB,CAAC;AAChD,eAAO,MAAM,WAAW,6CAAyB,CAAC;AAElD,eAAO,MAAM,YAAY,8JAYvB,CAAC;AAIH,QAAA,MAAM,oBAAoB;;8EAoBzB,CAAC;AAEF,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,EACpE,YAAY,CAAC,OAAO,oBAAoB,CAAC;CAAG;AAEhD,eAAO,MAAM,YAAY;uBAEkB,MAAM;wCAY/C,CAAC;AAIH,eAAO,MAAM,WAAW,GAAI,yBAAyB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,4CAExF,CAAC;AAEF,eAAO,MAAM,UAAU,oKASrB,CAAC;AAIH,eAAO,MAAM,gBAAgB,8KAS3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../../src/ecommerce/components/ui/skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,2CAOrF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
+
export declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/ecommerce/components/ui/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAGtD,eAAO,MAAM,IAAI,gGAAqB,CAAC;AAEvC,eAAO,MAAM,QAAQ,uJAYnB,CAAC;AAIH,eAAO,MAAM,WAAW,gKAYtB,CAAC;AAIH,eAAO,MAAM,WAAW,0JAYtB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
}
|
|
4
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
5
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/ecommerce/components/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC;CAAG;AAE3F,eAAO,MAAM,QAAQ,2FAWpB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CedrosShopConfig } from './types';
|
|
3
|
+
export type CedrosShopContextValue = {
|
|
4
|
+
config: CedrosShopConfig;
|
|
5
|
+
};
|
|
6
|
+
export declare function useCedrosShop(): CedrosShopContextValue;
|
|
7
|
+
/** Optional version that returns null when used outside CedrosShopProvider */
|
|
8
|
+
export declare function useOptionalCedrosShop(): CedrosShopContextValue | null;
|
|
9
|
+
export declare function CedrosShopProvider({ config, children, }: {
|
|
10
|
+
config: CedrosShopConfig;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/config/context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAIF,wBAAgB,aAAa,2BAM5B;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,IAAI,sBAAsB,GAAG,IAAI,CAErE;AAED,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAIA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CommerceAdapter } from '../adapters/CommerceAdapter';
|
|
2
|
+
import { CheckoutMode } from '../types';
|
|
3
|
+
export type CedrosShopConfig = {
|
|
4
|
+
brand?: {
|
|
5
|
+
name: string;
|
|
6
|
+
logoUrl?: string;
|
|
7
|
+
};
|
|
8
|
+
currency: string;
|
|
9
|
+
customer?: {
|
|
10
|
+
id?: string;
|
|
11
|
+
email?: string;
|
|
12
|
+
isSignedIn?: boolean;
|
|
13
|
+
};
|
|
14
|
+
checkout: {
|
|
15
|
+
mode: CheckoutMode;
|
|
16
|
+
requireEmail?: boolean;
|
|
17
|
+
guestCheckout?: boolean;
|
|
18
|
+
requireAccount?: boolean;
|
|
19
|
+
allowPromoCodes?: boolean;
|
|
20
|
+
allowShipping?: boolean;
|
|
21
|
+
allowTaxDisplay?: boolean;
|
|
22
|
+
allowTipping?: boolean;
|
|
23
|
+
paymentMethods?: Array<{
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
ctaLabel?: string;
|
|
28
|
+
}>;
|
|
29
|
+
successUrl?: string;
|
|
30
|
+
cancelUrl?: string;
|
|
31
|
+
};
|
|
32
|
+
ui?: {
|
|
33
|
+
layout?: 'sidebar' | 'standard';
|
|
34
|
+
productGrid?: {
|
|
35
|
+
columns?: {
|
|
36
|
+
base: number;
|
|
37
|
+
md: number;
|
|
38
|
+
lg: number;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
cart?: {
|
|
43
|
+
storageKey?: string;
|
|
44
|
+
syncDebounceMs?: number;
|
|
45
|
+
};
|
|
46
|
+
adapter: CommerceAdapter;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE;QACT,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,QAAQ,EAAE;QACR,IAAI,EAAE,YAAY,CAAC;QACnB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,cAAc,CAAC,EAAE,KAAK,CAAC;YACrB,EAAE,EAAE,MAAM,CAAC;YACX,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;SACnB,CAAC,CAAC;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,EAAE,CAAC,EAAE;QACH,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;QAChC,WAAW,CAAC,EAAE;YAAE,OAAO,CAAC,EAAE;gBAAE,IAAI,EAAE,MAAM,CAAC;gBAAC,EAAE,EAAE,MAAM,CAAC;gBAAC,EAAE,EAAE,MAAM,CAAA;aAAE,CAAA;SAAE,CAAC;KACtE,CAAC;IACF,IAAI,CAAC,EAAE;QACL,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkoutReturn.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/checkoutReturn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAUxE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,oBAAoB,CAmBnG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to fetch AI-powered related product recommendations.
|
|
3
|
+
*
|
|
4
|
+
* Uses the adapter from CedrosShopProvider context to call the AI endpoint.
|
|
5
|
+
* Results are cached by productId to avoid repeated API calls.
|
|
6
|
+
*/
|
|
7
|
+
export interface UseAIRelatedProductsOptions {
|
|
8
|
+
/** Product ID to get recommendations for */
|
|
9
|
+
productId?: string;
|
|
10
|
+
/** Product details (alternative to productId) */
|
|
11
|
+
product?: {
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
tags?: string[];
|
|
15
|
+
categoryIds?: string[];
|
|
16
|
+
};
|
|
17
|
+
/** Whether to enable the fetch (default: true) */
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface UseAIRelatedProductsResult {
|
|
21
|
+
/** IDs of recommended related products */
|
|
22
|
+
relatedProductIds: string[] | null;
|
|
23
|
+
/** AI's reasoning for the recommendations */
|
|
24
|
+
reasoning: string | null;
|
|
25
|
+
/** Whether the request is in progress */
|
|
26
|
+
isLoading: boolean;
|
|
27
|
+
/** Error message if request failed */
|
|
28
|
+
error: string | null;
|
|
29
|
+
/** Manually refetch recommendations */
|
|
30
|
+
refetch: () => Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export declare function useAIRelatedProducts(options?: UseAIRelatedProductsOptions): UseAIRelatedProductsResult;
|
|
33
|
+
//# sourceMappingURL=useAIRelatedProducts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAIRelatedProducts.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useAIRelatedProducts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,WAAW,2BAA2B;IAC1C,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;IACF,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,0BAA0B;IACzC,0CAA0C;IAC1C,iBAAiB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACnC,6CAA6C;IAC7C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,yCAAyC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,uCAAuC;IACvC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAWD,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,2BAAgC,GACxC,0BAA0B,CAsG5B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CartItem } from '../types';
|
|
2
|
+
export type CartItemInventory = {
|
|
3
|
+
productId: string;
|
|
4
|
+
variantId?: string;
|
|
5
|
+
/** Current available quantity (undefined = unlimited) */
|
|
6
|
+
availableQty?: number;
|
|
7
|
+
/** Inventory status from product/variant */
|
|
8
|
+
status?: 'in_stock' | 'low' | 'out_of_stock' | 'backorder';
|
|
9
|
+
/** True if item is now out of stock */
|
|
10
|
+
isOutOfStock: boolean;
|
|
11
|
+
/** True if requested qty exceeds available */
|
|
12
|
+
exceedsAvailable: boolean;
|
|
13
|
+
/** True if stock is low (1-5 remaining) */
|
|
14
|
+
isLowStock: boolean;
|
|
15
|
+
/** Human-readable message for display */
|
|
16
|
+
message?: string;
|
|
17
|
+
};
|
|
18
|
+
export type CartInventoryMap = Map<string, CartItemInventory>;
|
|
19
|
+
export interface UseCartInventoryOptions {
|
|
20
|
+
/** Cart items to check inventory for */
|
|
21
|
+
items: CartItem[];
|
|
22
|
+
/** Refresh interval in ms (0 to disable auto-refresh, default: 30000) */
|
|
23
|
+
refreshInterval?: number;
|
|
24
|
+
/** Skip fetching (e.g., when cart is empty) */
|
|
25
|
+
skip?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface UseCartInventoryResult {
|
|
28
|
+
/** Map of product::variant key to inventory info */
|
|
29
|
+
inventory: CartInventoryMap;
|
|
30
|
+
/** True while fetching inventory */
|
|
31
|
+
isLoading: boolean;
|
|
32
|
+
/** Error message if fetch failed */
|
|
33
|
+
error: string | null;
|
|
34
|
+
/** Manually refresh inventory */
|
|
35
|
+
refresh: () => void;
|
|
36
|
+
/** Get inventory for a specific cart item */
|
|
37
|
+
getItemInventory: (productId: string, variantId?: string) => CartItemInventory | undefined;
|
|
38
|
+
/** True if any item has inventory issues */
|
|
39
|
+
hasIssues: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare function useCartInventory({ items, refreshInterval, skip, }: UseCartInventoryOptions): UseCartInventoryResult;
|
|
42
|
+
//# sourceMappingURL=useCartInventory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCartInventory.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useCartInventory.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAW,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,cAAc,GAAG,WAAW,CAAC;IAC3D,uCAAuC;IACvC,YAAY,EAAE,OAAO,CAAC;IACtB,8CAA8C;IAC9C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,2CAA2C;IAC3C,UAAU,EAAE,OAAO,CAAC;IACpB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAmF9D,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,oDAAoD;IACpD,SAAS,EAAE,gBAAgB,CAAC;IAC5B,oCAAoC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,oCAAoC;IACpC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iCAAiC;IACjC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,6CAA6C;IAC7C,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,iBAAiB,GAAG,SAAS,CAAC;IAC3F,4CAA4C;IAC5C,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,eAAuB,EACvB,IAAY,GACb,EAAE,uBAAuB,GAAG,sBAAsB,CAuGlD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CatalogFilters } from '../components/catalog/FilterPanel';
|
|
2
|
+
export type CatalogUrlState = {
|
|
3
|
+
search: string;
|
|
4
|
+
sort: string;
|
|
5
|
+
page: number;
|
|
6
|
+
category?: string;
|
|
7
|
+
filters: CatalogFilters;
|
|
8
|
+
};
|
|
9
|
+
export declare function readCatalogUrlState({ includeCategory }: {
|
|
10
|
+
includeCategory: boolean;
|
|
11
|
+
}): CatalogUrlState | null;
|
|
12
|
+
export declare function useCatalogUrlSync(state: CatalogUrlState, { includeCategory }: {
|
|
13
|
+
includeCategory: boolean;
|
|
14
|
+
}): void;
|
|
15
|
+
//# sourceMappingURL=useCatalogUrlState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCatalogUrlState.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useCatalogUrlState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;CACzB,CAAC;AA4CF,wBAAgB,mBAAmB,CAAC,EAAE,eAAe,EAAE,EAAE;IAAE,eAAe,EAAE,OAAO,CAAA;CAAE,GAAG,eAAe,GAAG,IAAI,CAkB7G;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,eAAe,EAAE,EAAE;IAAE,eAAe,EAAE,OAAO,CAAA;CAAE,QA8C1G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCategories.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useCategories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,aAAa;;;;EAgC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCheckoutResultFromUrl.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useCheckoutResultFromUrl.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAUlD,wBAAgB,wBAAwB,IAAI,cAAc,CA+BzD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CartItem } from '../types';
|
|
2
|
+
export type HoldExpiryEvent = {
|
|
3
|
+
productId: string;
|
|
4
|
+
variantId?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
expiredAt: Date;
|
|
7
|
+
};
|
|
8
|
+
export interface UseHoldExpiryOptions {
|
|
9
|
+
/** Cart items to monitor */
|
|
10
|
+
items: CartItem[];
|
|
11
|
+
/** Callback when a hold expires */
|
|
12
|
+
onExpiry?: (event: HoldExpiryEvent) => void;
|
|
13
|
+
/** Whether monitoring is enabled */
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface UseHoldExpiryResult {
|
|
17
|
+
/** Items with holds that are about to expire (within 2 minutes) */
|
|
18
|
+
expiringItems: Array<{
|
|
19
|
+
productId: string;
|
|
20
|
+
variantId?: string;
|
|
21
|
+
expiresAt: Date;
|
|
22
|
+
remainingMs: number;
|
|
23
|
+
}>;
|
|
24
|
+
/** Items with expired holds */
|
|
25
|
+
expiredItems: Array<{
|
|
26
|
+
productId: string;
|
|
27
|
+
variantId?: string;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Monitors cart item holds and reports expiry events
|
|
32
|
+
*/
|
|
33
|
+
export declare function useHoldExpiry({ items, onExpiry, enabled, }: UseHoldExpiryOptions): UseHoldExpiryResult;
|
|
34
|
+
//# sourceMappingURL=useHoldExpiry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHoldExpiry.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useHoldExpiry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,4BAA4B;IAC5B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5C,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,mEAAmE;IACnE,aAAa,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,IAAI,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtG,+BAA+B;IAC/B,YAAY,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,OAAc,GACf,EAAE,oBAAoB,GAAG,mBAAmB,CAmF5C"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CartItem } from '../types';
|
|
2
|
+
export type InventoryIssue = {
|
|
3
|
+
productId: string;
|
|
4
|
+
variantId?: string;
|
|
5
|
+
/** Product/variant title for display */
|
|
6
|
+
title: string;
|
|
7
|
+
/** Quantity requested in cart */
|
|
8
|
+
requestedQty: number;
|
|
9
|
+
/** Currently available quantity (0 if out of stock) */
|
|
10
|
+
availableQty: number;
|
|
11
|
+
/** Type of issue */
|
|
12
|
+
type: 'out_of_stock' | 'insufficient_stock' | 'product_unavailable';
|
|
13
|
+
/** Human-readable message */
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
export type VerificationResult = {
|
|
17
|
+
/** Whether all items passed verification */
|
|
18
|
+
ok: boolean;
|
|
19
|
+
/** List of items with inventory issues */
|
|
20
|
+
issues: InventoryIssue[];
|
|
21
|
+
/** Timestamp of verification */
|
|
22
|
+
verifiedAt: Date;
|
|
23
|
+
};
|
|
24
|
+
export interface UseInventoryVerificationOptions {
|
|
25
|
+
/** Cart items to verify */
|
|
26
|
+
items: CartItem[];
|
|
27
|
+
}
|
|
28
|
+
export interface UseInventoryVerificationResult {
|
|
29
|
+
/** Most recent verification result (null if never verified) */
|
|
30
|
+
result: VerificationResult | null;
|
|
31
|
+
/** True while verification is in progress */
|
|
32
|
+
isVerifying: boolean;
|
|
33
|
+
/** Error if verification failed entirely */
|
|
34
|
+
error: string | null;
|
|
35
|
+
/** Trigger verification and return result */
|
|
36
|
+
verify: () => Promise<VerificationResult>;
|
|
37
|
+
/** Clear the current result */
|
|
38
|
+
reset: () => void;
|
|
39
|
+
}
|
|
40
|
+
export declare function useInventoryVerification({ items, }: UseInventoryVerificationOptions): UseInventoryVerificationResult;
|
|
41
|
+
//# sourceMappingURL=useInventoryVerification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInventoryVerification.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useInventoryVerification.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAW,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,IAAI,EAAE,cAAc,GAAG,oBAAoB,GAAG,qBAAqB,CAAC;IACpE,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,4CAA4C;IAC5C,EAAE,EAAE,OAAO,CAAC;IACZ,0CAA0C;IAC1C,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,gCAAgC;IAChC,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,WAAW,+BAA+B;IAC9C,2BAA2B;IAC3B,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,8BAA8B;IAC7C,+DAA+D;IAC/D,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAClC,6CAA6C;IAC7C,WAAW,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,6CAA6C;IAC7C,MAAM,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC1C,+BAA+B;IAC/B,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAkFD,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,GACN,EAAE,+BAA+B,GAAG,8BAA8B,CAmGlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOrders.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useOrders.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,wBAAgB,SAAS;;;;EAgCxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePaymentMethodsConfig.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/usePaymentMethodsConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAUxE,wBAAgB,uBAAuB,IAAI;IACzC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;CACpB,CAsCA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProduct.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useProduct.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM;;;;EAgCtC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ListResult, Product } from '../types';
|
|
2
|
+
import { ProductListParams } from '../adapters/CommerceAdapter';
|
|
3
|
+
export declare function useProducts(params: ProductListParams): {
|
|
4
|
+
data: ListResult<Product> | null;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
error: string | null;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=useProducts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProducts.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useProducts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB;;;;EAqCpD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CustomerInfo, ShippingMethod } from '../types';
|
|
2
|
+
export declare function useShippingMethods({ enabled, customer, }: {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
customer: CustomerInfo;
|
|
5
|
+
}): {
|
|
6
|
+
methods: ShippingMethod[];
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
error: string | null;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useShippingMethods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShippingMethods.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useShippingMethods.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG7D,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;CACxB;;;;EA0CA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ProductPageSettings, RelatedProductsMode, CatalogFilterSettings, CatalogSortSettings, CheckoutDisplaySettings, LayoutSettings, ProductCardLayout, ImageCropPosition, ProductPageSectionSettings, InventorySettings } from '../../components/admin/types';
|
|
2
|
+
export interface ShopPageSettings {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
}
|
|
6
|
+
export interface StorefrontSettings {
|
|
7
|
+
relatedProducts: {
|
|
8
|
+
mode: RelatedProductsMode;
|
|
9
|
+
maxItems: number;
|
|
10
|
+
layout: LayoutSettings;
|
|
11
|
+
};
|
|
12
|
+
catalog: {
|
|
13
|
+
filters: CatalogFilterSettings;
|
|
14
|
+
sort: CatalogSortSettings;
|
|
15
|
+
};
|
|
16
|
+
checkout: CheckoutDisplaySettings;
|
|
17
|
+
shopLayout: LayoutSettings;
|
|
18
|
+
categoryLayout: LayoutSettings;
|
|
19
|
+
sections: ProductPageSectionSettings;
|
|
20
|
+
inventory: InventorySettings;
|
|
21
|
+
shopPage: ShopPageSettings;
|
|
22
|
+
}
|
|
23
|
+
export interface UseStorefrontSettingsOptions {
|
|
24
|
+
/** @deprecated Server URL - now automatically uses adapter from context */
|
|
25
|
+
serverUrl?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function useStorefrontSettings(_options?: UseStorefrontSettingsOptions): {
|
|
28
|
+
settings: StorefrontSettings;
|
|
29
|
+
isLoading: boolean;
|
|
30
|
+
};
|
|
31
|
+
export type { ProductPageSettings, RelatedProductsMode, CatalogFilterSettings, CatalogSortSettings, CheckoutDisplaySettings, LayoutSettings, ProductCardLayout, ImageCropPosition, ProductPageSectionSettings, InventorySettings };
|
|
32
|
+
//# sourceMappingURL=useStorefrontSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStorefrontSettings.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useStorefrontSettings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AAItC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE;QACf,IAAI,EAAE,mBAAmB,CAAC;QAC1B,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,cAAc,CAAC;KACxB,CAAC;IACF,OAAO,EAAE;QACP,OAAO,EAAE,qBAAqB,CAAC;QAC/B,IAAI,EAAE,mBAAmB,CAAC;KAC3B,CAAC;IACF,QAAQ,EAAE,uBAAuB,CAAC;IAClC,UAAU,EAAE,cAAc,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,EAAE,0BAA0B,CAAC;IACrC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAmDD,MAAM,WAAW,4BAA4B;IAC3C,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAqDD,wBAAgB,qBAAqB,CAAC,QAAQ,GAAE,4BAAiC,GAAG;IAClF,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;CACpB,CAyCA;AAED,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SubscriptionStatus, SubscriptionTier } from '../adapters/CommerceAdapter';
|
|
2
|
+
export declare function useSubscriptionData(): {
|
|
3
|
+
tiers: SubscriptionTier[];
|
|
4
|
+
status: SubscriptionStatus | null;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
error: string | null;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=useSubscriptionData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSubscriptionData.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/hooks/useSubscriptionData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGxF,wBAAgB,mBAAmB;;;;;EAsClC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export type { CedrosShopConfig } from './config/types';
|
|
2
|
+
export { CedrosShopProvider, useCedrosShop } from './config/context';
|
|
3
|
+
export type { Product, Category, CartItem, CartSnapshot, Order, OrderStatus, CheckoutMode, CustomerInfo, Address, ShippingMethod, } from './types';
|
|
4
|
+
export type { CommerceAdapter, ProductListParams, CheckoutSessionPayload, CheckoutSessionResult, CheckoutReturnResult, SubscriptionTier, SubscriptionStatus, CartItemInventoryStatus, CartInventoryStatus, StorefrontConfig, PaymentMethodsConfig, AIRelatedProductsParams, AIRelatedProductsResult, } from './adapters/CommerceAdapter';
|
|
5
|
+
export { createMockCommerceAdapter } from './adapters/mock/mockAdapter';
|
|
6
|
+
export { createPaywallCommerceAdapter } from './adapters/paywall/paywallAdapter';
|
|
7
|
+
export { CartProvider, useCart } from './state/cart/CartProvider';
|
|
8
|
+
export { CheckoutProvider, useCheckout, useStandaloneCheckout } from './state/checkout/useCheckout';
|
|
9
|
+
export { useCategories } from './hooks/useCategories';
|
|
10
|
+
export { useProducts } from './hooks/useProducts';
|
|
11
|
+
export { useProduct } from './hooks/useProduct';
|
|
12
|
+
export { useOrders } from './hooks/useOrders';
|
|
13
|
+
export { useSubscriptionData } from './hooks/useSubscriptionData';
|
|
14
|
+
export { useShippingMethods } from './hooks/useShippingMethods';
|
|
15
|
+
export { useCheckoutResultFromUrl } from './hooks/useCheckoutResultFromUrl';
|
|
16
|
+
export type { CheckoutResult } from './hooks/useCheckoutResultFromUrl';
|
|
17
|
+
export { parseCheckoutReturn } from './hooks/checkoutReturn';
|
|
18
|
+
export { readCatalogUrlState, useCatalogUrlSync } from './hooks/useCatalogUrlState';
|
|
19
|
+
export type { CatalogUrlState } from './hooks/useCatalogUrlState';
|
|
20
|
+
export { useCartInventory } from './hooks/useCartInventory';
|
|
21
|
+
export type { CartItemInventory, UseCartInventoryOptions, UseCartInventoryResult } from './hooks/useCartInventory';
|
|
22
|
+
export { useInventoryVerification } from './hooks/useInventoryVerification';
|
|
23
|
+
export type { InventoryIssue, VerificationResult, UseInventoryVerificationOptions, UseInventoryVerificationResult, } from './hooks/useInventoryVerification';
|
|
24
|
+
export { useHoldExpiry } from './hooks/useHoldExpiry';
|
|
25
|
+
export type { HoldExpiryEvent, UseHoldExpiryOptions, UseHoldExpiryResult } from './hooks/useHoldExpiry';
|
|
26
|
+
export { useStorefrontSettings } from './hooks/useStorefrontSettings';
|
|
27
|
+
export type { StorefrontSettings } from './hooks/useStorefrontSettings';
|
|
28
|
+
export { usePaymentMethodsConfig } from './hooks/usePaymentMethodsConfig';
|
|
29
|
+
export { useAIRelatedProducts } from './hooks/useAIRelatedProducts';
|
|
30
|
+
export type { UseAIRelatedProductsOptions, UseAIRelatedProductsResult } from './hooks/useAIRelatedProducts';
|
|
31
|
+
export { validateCommerceAdapterContract } from './testing/adapterContract';
|
|
32
|
+
export type { AdapterContractOptions } from './testing/adapterContract';
|
|
33
|
+
export { Button } from './components/ui/button';
|
|
34
|
+
export { Badge } from './components/ui/badge';
|
|
35
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './components/ui/card';
|
|
36
|
+
export { Input } from './components/ui/input';
|
|
37
|
+
export { Label } from './components/ui/label';
|
|
38
|
+
export { Separator } from './components/ui/separator';
|
|
39
|
+
export { Skeleton } from './components/ui/skeleton';
|
|
40
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectItem, } from './components/ui/select';
|
|
41
|
+
export { Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from './components/ui/dialog';
|
|
42
|
+
export { Sheet, SheetTrigger, SheetClose, SheetPortal, SheetOverlay, SheetContent, SheetHeader, SheetTitle, SheetDescription, } from './components/ui/sheet';
|
|
43
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './components/ui/accordion';
|
|
44
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent } from './components/ui/tabs';
|
|
45
|
+
export { EmptyState } from './components/general/EmptyState';
|
|
46
|
+
export { ErrorState } from './components/general/ErrorState';
|
|
47
|
+
export { ErrorBoundary } from './components/general/ErrorBoundary';
|
|
48
|
+
export { ToastProvider, useToast } from './components/general/toast';
|
|
49
|
+
export { useOptionalToast } from './components/general/toast';
|
|
50
|
+
export { FAQItem, FAQList } from './components/faq';
|
|
51
|
+
export type { FAQItemData, FAQItemProps, FAQListProps } from './components/faq';
|
|
52
|
+
export { Price } from './components/catalog/Price';
|
|
53
|
+
export { ProductCard } from './components/catalog/ProductCard';
|
|
54
|
+
export { ProductGrid } from './components/catalog/ProductGrid';
|
|
55
|
+
export { ProductGallery } from './components/catalog/ProductGallery';
|
|
56
|
+
export { VariantSelector } from './components/catalog/VariantSelector';
|
|
57
|
+
export { QuantitySelector } from './components/catalog/QuantitySelector';
|
|
58
|
+
export { QuickViewDialog } from './components/catalog/QuickViewDialog';
|
|
59
|
+
export { CategoryNav } from './components/catalog/CategoryNav';
|
|
60
|
+
export { Breadcrumbs } from './components/catalog/Breadcrumbs';
|
|
61
|
+
export type { BreadcrumbItem } from './components/catalog/Breadcrumbs';
|
|
62
|
+
export { SearchInput } from './components/catalog/SearchInput';
|
|
63
|
+
export { FilterPanel } from './components/catalog/FilterPanel';
|
|
64
|
+
export type { CatalogFilters, CatalogFacets } from './components/catalog/FilterPanel';
|
|
65
|
+
export { CartSidebar } from './components/cart/CartSidebar';
|
|
66
|
+
export { CartPanel } from './components/cart/CartPanel';
|
|
67
|
+
export { CartPageContent } from './components/cart/CartPageContent';
|
|
68
|
+
export { CartLineItem } from './components/cart/CartLineItem';
|
|
69
|
+
export { CartSummary } from './components/cart/CartSummary';
|
|
70
|
+
export { PromoCodeInput } from './components/cart/PromoCodeInput';
|
|
71
|
+
export { CheckoutLayout } from './components/checkout/CheckoutLayout';
|
|
72
|
+
export { CheckoutForm } from './components/checkout/CheckoutForm';
|
|
73
|
+
export { AddressForm } from './components/checkout/AddressForm';
|
|
74
|
+
export { ShippingMethodSelector } from './components/checkout/ShippingMethodSelector';
|
|
75
|
+
export { PaymentStep } from './components/checkout/PaymentStep';
|
|
76
|
+
export { OrderReview } from './components/checkout/OrderReview';
|
|
77
|
+
export { CheckoutReceipt } from './components/checkout/CheckoutReceipt';
|
|
78
|
+
export { CheckoutSuccessPage } from './components/checkout/CheckoutSuccessPage';
|
|
79
|
+
export type { CheckoutSuccessPageProps } from './components/checkout/CheckoutSuccessPage';
|
|
80
|
+
export { CheckoutCancelPage } from './components/checkout/CheckoutCancelPage';
|
|
81
|
+
export type { CheckoutCancelPageProps } from './components/checkout/CheckoutCancelPage';
|
|
82
|
+
export { InventoryVerificationDialog } from './components/checkout/InventoryVerificationDialog';
|
|
83
|
+
export type { InventoryVerificationDialogProps } from './components/checkout/InventoryVerificationDialog';
|
|
84
|
+
export { OrderList } from './components/orders/OrderList';
|
|
85
|
+
export { OrderCard } from './components/orders/OrderCard';
|
|
86
|
+
export { OrderDetails } from './components/orders/OrderDetails';
|
|
87
|
+
export { ShopTemplate } from './templates/ShopTemplate';
|
|
88
|
+
export type { CedrosShopRoutes } from './templates/ShopTemplate';
|
|
89
|
+
export { CategoryTemplate } from './templates/CategoryTemplate';
|
|
90
|
+
export { ProductTemplate } from './templates/ProductTemplate';
|
|
91
|
+
export { CartTemplate } from './templates/CartTemplate';
|
|
92
|
+
export { CheckoutTemplate } from './templates/CheckoutTemplate';
|
|
93
|
+
export { PurchaseHistoryTemplate } from './templates/PurchaseHistoryTemplate';
|
|
94
|
+
export { ReceiptTemplate } from './templates/ReceiptTemplate';
|
|
95
|
+
export type { ReceiptTemplateProps } from './templates/ReceiptTemplate';
|
|
96
|
+
export { SubscriptionTemplate } from './templates/SubscriptionTemplate';
|
|
97
|
+
export { useCedrosPayCheckoutAdapter } from './integrations/cedros-pay/useCedrosPayCheckoutAdapter';
|
|
98
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ecommerce/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAErE,YAAY,EACV,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,cAAc,GACf,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAGpG,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,mBAAm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,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommerceAdapter } from '../../adapters/CommerceAdapter';
|
|
2
|
+
/**
|
|
3
|
+
* Wrap an existing CommerceAdapter and implement `createCheckoutSession` using Cedros Pay's
|
|
4
|
+
* existing Stripe checkout primitive.
|
|
5
|
+
*
|
|
6
|
+
* This keeps the ecommerce layer payment-provider-agnostic while giving apps a ready default
|
|
7
|
+
* integration point when Cedros Pay is already installed.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useCedrosPayCheckoutAdapter(base: CommerceAdapter): CommerceAdapter;
|
|
10
|
+
//# sourceMappingURL=useCedrosPayCheckoutAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCedrosPayCheckoutAdapter.d.ts","sourceRoot":"","sources":["../../../../src/ecommerce/integrations/cedros-pay/useCedrosPayCheckoutAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAGxC;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,eAAe,GAAG,eAAe,CA+BlF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CartItem } from '../../types';
|
|
3
|
+
export type CartContextValue = {
|
|
4
|
+
items: CartItem[];
|
|
5
|
+
promoCode?: string;
|
|
6
|
+
count: number;
|
|
7
|
+
subtotal: number;
|
|
8
|
+
addItem: (item: Omit<CartItem, 'qty'>, qty?: number) => void;
|
|
9
|
+
removeItem: (productId: string, variantId?: string) => void;
|
|
10
|
+
setQty: (productId: string, variantId: string | undefined, qty: number) => void;
|
|
11
|
+
clear: () => void;
|
|
12
|
+
setPromoCode: (promoCode?: string) => void;
|
|
13
|
+
/** Whether inventory holds are supported (backend creates holds on cart quote) */
|
|
14
|
+
holdsSupported: boolean;
|
|
15
|
+
/** Get hold info for an item (populated from cart inventory status) */
|
|
16
|
+
getItemHold: (productId: string, variantId?: string) => {
|
|
17
|
+
holdId?: string;
|
|
18
|
+
expiresAt?: string;
|
|
19
|
+
} | undefined;
|
|
20
|
+
/** Update hold info for an item (called after fetching cart inventory status) */
|
|
21
|
+
updateItemHold: (productId: string, variantId: string | undefined, holdExpiresAt?: string) => void;
|
|
22
|
+
};
|
|
23
|
+
export declare function useCart(): CartContextValue;
|
|
24
|
+
export declare function CartProvider({ children }: {
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=CartProvider.d.ts.map
|