@cedros/pay-react 1.0.4 → 1.1.0
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 +297 -39
- package/dist/CedrosContext-DUT3cLZg.mjs +2474 -0
- 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 +50 -0
- package/dist/components/CryptoSubscribeButton.d.ts.map +1 -0
- 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/SubscribeButton.d.ts +55 -0
- package/dist/components/SubscribeButton.d.ts.map +1 -0
- package/dist/components/SubscriptionManagementPanel.d.ts +67 -0
- package/dist/components/SubscriptionManagementPanel.d.ts.map +1 -0
- 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 +12 -0
- package/dist/components/subscriptionPanelStyles.d.ts.map +1 -0
- package/dist/context/CedrosContext.d.ts +6 -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/useCryptoSubscription.d.ts +42 -0
- package/dist/hooks/useCryptoSubscription.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/useSubscription.d.ts +42 -0
- package/dist/hooks/useSubscription.d.ts.map +1 -0
- package/dist/hooks/useSubscriptionManagement.d.ts +92 -0
- package/dist/hooks/useSubscriptionManagement.d.ts.map +1 -0
- package/dist/hooks/useX402Payment.d.ts +1 -0
- package/dist/hooks/useX402Payment.d.ts.map +1 -1
- package/dist/i18n/index.d.ts +7 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/index-D2d_ukkR.mjs +26838 -0
- package/dist/index-DGkSHjb1.js +136 -0
- package/dist/index.d.ts +20 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +79 -625
- 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 +6 -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/SubscriptionChangeManager.d.ts +42 -0
- package/dist/managers/SubscriptionChangeManager.d.ts.map +1 -0
- package/dist/managers/SubscriptionManager.d.ts +113 -0
- package/dist/managers/SubscriptionManager.d.ts.map +1 -0
- package/dist/managers/X402Manager.d.ts.map +1 -1
- package/dist/pay-react.css +1 -1
- package/dist/sections-6IcZ6JeN.js +1 -0
- package/dist/sections-a0Dz-MMz.mjs +10 -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 +116 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/subscription.d.ts +300 -0
- package/dist/types/subscription.d.ts.map +1 -0
- 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-B3iCqN6e.js +0 -11
- package/dist/CedrosContext-vX9uqZKp.mjs +0 -1796
- package/dist/en-CSsJl3nf.mjs +0 -19
- package/dist/en-D-uY3ltT.js +0 -1
- package/dist/styles-61pRysGe.js +0 -1
- package/dist/styles-DI2LPVdQ.mjs +0 -1625
- 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,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,UA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EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAGxE,OAAO,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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartProvider.d.ts","sourceRoot":"","sources":["../../../../src/ecommerce/state/cart/CartProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAW5C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChF,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,YAAY,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,kFAAkF;IAClF,cAAc,EAAE,OAAO,CAAC;IACxB,uEAAuE;IACvE,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAC5G,iFAAiF;IACjF,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACpG,CAAC;AAIF,wBAAgB,OAAO,qBAItB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAmIvE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CartItem, CartSnapshot } from '../../types';
|
|
2
|
+
export type CartState = CartSnapshot;
|
|
3
|
+
export type CartAction = {
|
|
4
|
+
type: 'cart/hydrate';
|
|
5
|
+
state: CartState;
|
|
6
|
+
} | {
|
|
7
|
+
type: 'cart/add';
|
|
8
|
+
item: Omit<CartItem, 'qty'>;
|
|
9
|
+
qty?: number;
|
|
10
|
+
} | {
|
|
11
|
+
type: 'cart/remove';
|
|
12
|
+
productId: string;
|
|
13
|
+
variantId?: string;
|
|
14
|
+
} | {
|
|
15
|
+
type: 'cart/setQty';
|
|
16
|
+
productId: string;
|
|
17
|
+
variantId?: string;
|
|
18
|
+
qty: number;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'cart/clear';
|
|
21
|
+
} | {
|
|
22
|
+
type: 'cart/setPromoCode';
|
|
23
|
+
promoCode?: string;
|
|
24
|
+
} | {
|
|
25
|
+
type: 'cart/updateHold';
|
|
26
|
+
productId: string;
|
|
27
|
+
variantId?: string;
|
|
28
|
+
holdId?: string;
|
|
29
|
+
holdExpiresAt?: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const initialCartState: CartState;
|
|
32
|
+
export declare function cartReducer(state: CartState, action: CartAction): CartState;
|
|
33
|
+
export declare function getCartCount(items: CartItem[]): number;
|
|
34
|
+
export declare function getCartSubtotal(items: CartItem[]): number;
|
|
35
|
+
//# sourceMappingURL=cartReducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cartReducer.d.ts","sourceRoot":"","sources":["../../../../src/ecommerce/state/cart/cartReducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,MAAM,SAAS,GAAG,YAAY,CAAC;AAErC,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC3E;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAUhH,eAAO,MAAM,gBAAgB,EAAE,SAAyB,CAAC;AAEzD,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,SAAS,CA4D3E;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,UAE7C;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,EAAE,UAEhD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Address } from '../../types';
|
|
3
|
+
export declare function buildCheckoutSchema(opts: {
|
|
4
|
+
requireEmail: boolean;
|
|
5
|
+
requireName: boolean;
|
|
6
|
+
requirePhone: boolean;
|
|
7
|
+
requireShippingAddress: boolean;
|
|
8
|
+
requireBillingAddress: boolean;
|
|
9
|
+
}): z.ZodObject<{
|
|
10
|
+
email: z.ZodString | z.ZodOptional<z.ZodString>;
|
|
11
|
+
name: z.ZodString | z.ZodOptional<z.ZodString>;
|
|
12
|
+
phone: z.ZodString | z.ZodOptional<z.ZodString>;
|
|
13
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
14
|
+
shippingAddress: z.ZodType<Address, unknown, z.core.$ZodTypeInternals<Address, unknown>> | z.ZodOptional<z.ZodType<Address, unknown, z.core.$ZodTypeInternals<Address, unknown>>>;
|
|
15
|
+
billingAddress: z.ZodType<Address, unknown, z.core.$ZodTypeInternals<Address, unknown>> | z.ZodOptional<z.ZodType<Address, unknown, z.core.$ZodTypeInternals<Address, unknown>>>;
|
|
16
|
+
discountCode: z.ZodOptional<z.ZodString>;
|
|
17
|
+
tipAmount: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
shippingMethodId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type CheckoutFormValues = z.infer<ReturnType<typeof buildCheckoutSchema>>;
|
|
21
|
+
//# sourceMappingURL=checkoutSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkoutSchema.d.ts","sourceRoot":"","sources":["../../../../src/ecommerce/state/checkout/checkoutSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAW3C,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,sBAAsB,EAAE,OAAO,CAAC;IAChC,qBAAqB,EAAE,OAAO,CAAC;CAChC;;;;;;;;;;kBAcA;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CheckoutFormValues } from './checkoutSchema';
|
|
3
|
+
import { CheckoutSessionResult } from '../../adapters/CommerceAdapter';
|
|
4
|
+
export type CheckoutStatus = 'idle' | 'validating' | 'creating_session' | 'redirecting' | 'error' | 'success';
|
|
5
|
+
export type CheckoutContextValue = {
|
|
6
|
+
values: CheckoutFormValues;
|
|
7
|
+
setValues: React.Dispatch<React.SetStateAction<CheckoutFormValues>>;
|
|
8
|
+
setField: <K extends keyof CheckoutFormValues>(key: K, value: CheckoutFormValues[K]) => void;
|
|
9
|
+
fieldErrors: Record<string, string>;
|
|
10
|
+
status: CheckoutStatus;
|
|
11
|
+
error: string | null;
|
|
12
|
+
session: CheckoutSessionResult | null;
|
|
13
|
+
reset: () => void;
|
|
14
|
+
validate: () => {
|
|
15
|
+
ok: true;
|
|
16
|
+
values: CheckoutFormValues;
|
|
17
|
+
} | {
|
|
18
|
+
ok: false;
|
|
19
|
+
};
|
|
20
|
+
createCheckoutSession: (overrides?: {
|
|
21
|
+
paymentMethodId?: string;
|
|
22
|
+
}) => Promise<{
|
|
23
|
+
ok: true;
|
|
24
|
+
session: CheckoutSessionResult;
|
|
25
|
+
} | {
|
|
26
|
+
ok: false;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
export declare function CheckoutProvider({ children }: {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function useCheckout(): CheckoutContextValue;
|
|
33
|
+
export declare function useStandaloneCheckout(): CheckoutContextValue;
|
|
34
|
+
//# sourceMappingURL=useCheckout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCheckout.d.ts","sourceRoot":"","sources":["../../../../src/ecommerce/state/checkout/useCheckout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAuB,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAG5E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,YAAY,GAAG,kBAAkB,GAAG,aAAa,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9G,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACpE,QAAQ,EAAE,CAAC,CAAC,SAAS,MAAM,kBAAkB,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7F,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM;QAAE,EAAE,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,kBAAkB,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,KAAK,CAAA;KAAE,CAAC;IACzE,qBAAqB,EAAE,CAAC,SAAS,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CACxE;QAAE,EAAE,EAAE,IAAI,CAAC;QAAC,OAAO,EAAE,qBAAqB,CAAA;KAAE,GAC5C;QAAE,EAAE,EAAE,KAAK,CAAA;KAAE,CAChB,CAAC;CACH,CAAC;AAqNF,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAG3E;AAED,wBAAgB,WAAW,IAAI,oBAAoB,CAMlD;AAGD,wBAAgB,qBAAqB,yBAEpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartTemplate.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/templates/CartTemplate.tsx"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,YAAY,GACb,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,2CA0BA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function CategoryTemplate({ categorySlug, className, routes, }: {
|
|
2
|
+
categorySlug: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
routes?: {
|
|
5
|
+
product?: (slug: string) => string;
|
|
6
|
+
shop?: string;
|
|
7
|
+
cart?: string;
|
|
8
|
+
checkout?: string;
|
|
9
|
+
};
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=CategoryTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryTemplate.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/templates/CategoryTemplate.tsx"],"names":[],"mappings":"AAiCA,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,SAAS,EACT,MAAM,GACP,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAClG,2CA0VA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckoutTemplate.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/templates/CheckoutTemplate.tsx"],"names":[],"mappings":"AAeA,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,MAAM,GACP,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7D,2CAmGA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function ProductTemplate({ slug, className, routes, }: {
|
|
2
|
+
slug: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
routes?: {
|
|
5
|
+
shop?: string;
|
|
6
|
+
checkout?: string;
|
|
7
|
+
cart?: string;
|
|
8
|
+
product?: (slug: string) => string;
|
|
9
|
+
};
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=ProductTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductTemplate.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/templates/ProductTemplate.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,SAAS,EACT,MAAM,GACP,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;KAAE,CAAC;CAClG,2CAiRA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PurchaseHistoryTemplate.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/templates/PurchaseHistoryTemplate.tsx"],"names":[],"mappings":"AAUA,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,UAAiB,EACjB,OAAO,GACR,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,2CA4DA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Order } from '../types';
|
|
2
|
+
export interface ReceiptTemplateProps {
|
|
3
|
+
/** The order to display */
|
|
4
|
+
order: Order;
|
|
5
|
+
/** Override payment source (defaults to order.source) */
|
|
6
|
+
source?: 'stripe' | 'x402' | 'credits';
|
|
7
|
+
/** Override purchase ID (defaults to order.purchaseId) */
|
|
8
|
+
purchaseId?: string;
|
|
9
|
+
/** Override customer email (defaults to order.customerEmail) */
|
|
10
|
+
customerEmail?: string;
|
|
11
|
+
/** Override customer name (defaults to order.customerName) */
|
|
12
|
+
customerName?: string;
|
|
13
|
+
/** Additional CSS class */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** Callback to go back */
|
|
16
|
+
onBack?: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function ReceiptTemplate({ order, source, purchaseId, customerEmail, customerName, className, onBack, }: ReceiptTemplateProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=ReceiptTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReceiptTemplate.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/templates/ReceiptTemplate.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,yDAAyD;IACzD,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAiCD,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,MAAM,EACN,UAAU,EACV,aAAa,EACb,YAAY,EACZ,SAAS,EACT,MAAM,GACP,EAAE,oBAAoB,2CAkKtB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type CedrosShopRoutes = {
|
|
2
|
+
shop?: string;
|
|
3
|
+
category?: (slug: string) => string;
|
|
4
|
+
product?: (slug: string) => string;
|
|
5
|
+
cart?: string;
|
|
6
|
+
checkout?: string;
|
|
7
|
+
orders?: string;
|
|
8
|
+
subscribe?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function ShopTemplate({ className, routes, initialCategorySlug, }: {
|
|
11
|
+
className?: string;
|
|
12
|
+
routes?: CedrosShopRoutes;
|
|
13
|
+
initialCategorySlug?: string;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=ShopTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShopTemplate.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/templates/ShopTemplate.tsx"],"names":[],"mappings":"AAgCA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA0BF,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,MAAM,EACN,mBAAmB,GACpB,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,2CAiZA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface SubscriptionTemplateProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
/** Page title */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Subtitle shown below title */
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
/** Text for annual savings badge (e.g., "2 months free") */
|
|
8
|
+
annualSavingsBadge?: string;
|
|
9
|
+
/** Badge text for popular plan (default: "Best Deal") */
|
|
10
|
+
popularBadgeText?: string;
|
|
11
|
+
/** Footer notice text */
|
|
12
|
+
footerNotice?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function SubscriptionTemplate({ className, title, subtitle, annualSavingsBadge, popularBadgeText, footerNotice, }: SubscriptionTemplateProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=SubscriptionTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionTemplate.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/templates/SubscriptionTemplate.tsx"],"names":[],"mappings":"AA2BA,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,KAA0B,EAC1B,QAAuD,EACvD,kBAAoC,EACpC,gBAA8B,EAC9B,YAAY,GACb,EAAE,yBAAyB,2CA2O3B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CommerceAdapter } from '../adapters/CommerceAdapter';
|
|
2
|
+
export type AdapterContractOptions = {
|
|
3
|
+
pageSize?: number;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Lightweight runtime validation for a CommerceAdapter.
|
|
7
|
+
*
|
|
8
|
+
* This is intentionally framework-agnostic so consumers can run it in Jest/Vitest.
|
|
9
|
+
*/
|
|
10
|
+
export declare function validateCommerceAdapterContract(adapter: CommerceAdapter, options?: AdapterContractOptions): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=adapterContract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapterContract.d.ts","sourceRoot":"","sources":["../../../src/ecommerce/testing/adapterContract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAUnE,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,+BAA+B,CACnD,OAAO,EAAE,eAAe,EACxB,OAAO,GAAE,sBAA2B,iBA0CrC"}
|