@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
package/README.md
CHANGED
|
@@ -5,19 +5,26 @@
|
|
|
5
5
|
[](https://www.typescriptlang.org/)
|
|
6
6
|
[](https://bundlephobia.com/package/@cedros/pay-react)
|
|
7
7
|
[]()
|
|
8
|
-
[](https://github.com/
|
|
8
|
+
[](https://github.com/conorholds/cedros-pay/tree/main/ui)
|
|
9
9
|
|
|
10
|
-
> **
|
|
10
|
+
> **Three payment rails. One React component.**
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Stripe for cards. Solana USDC for wallets. Credits for cedros-login users. Uses your existing products. No deposit wallets. No monitoring. No custom crypto backend.
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
+
## Ecommerce UI (Cedros Shop)
|
|
17
|
+
|
|
18
|
+
This repo now includes a provider-agnostic storefront UI layer (catalog + cart + checkout orchestration) built in a shadcn-inspired style.
|
|
19
|
+
|
|
20
|
+
- Docs: `docs/ecommerce/README.md`
|
|
21
|
+
- Import: `import { ecommerce } from '@cedros/pay-react'`
|
|
22
|
+
|
|
16
23
|
## What is Cedros Pay?
|
|
17
24
|
|
|
18
|
-
**One component,
|
|
25
|
+
**One component, three payment rails.** Stripe for cards, Solana USDC for wallets, Credits for account balances. No second checkout.
|
|
19
26
|
|
|
20
|
-
Cedros Pay connects traditional payments (Stripe) with crypto (Solana x402) using the product IDs you already have. No deposit wallets to manage. No wallet infrastructure to secure. No custody risk.
|
|
27
|
+
Cedros Pay connects traditional payments (Stripe) with crypto (Solana x402) and account credits (cedros-login) using the product IDs you already have. No deposit wallets to manage. No wallet infrastructure to secure. No custody risk.
|
|
21
28
|
|
|
22
29
|
### The Problem with Traditional Crypto Payments
|
|
23
30
|
|
|
@@ -69,13 +76,13 @@ User → Sign Transaction → Your Backend → Verify On-Chain → Merchant (Dir
|
|
|
69
76
|
|
|
70
77
|
## Key Features
|
|
71
78
|
|
|
72
|
-
### 1. One Component,
|
|
79
|
+
### 1. One Component, Three Rails
|
|
73
80
|
|
|
74
|
-
Stripe for cards, Solana USDC for wallets. No second checkout.
|
|
81
|
+
Stripe for cards, Solana USDC for wallets, Credits for account balances. No second checkout.
|
|
75
82
|
|
|
76
83
|
```tsx
|
|
77
84
|
<CedrosPay resource="product-1" />
|
|
78
|
-
//
|
|
85
|
+
// All three payment methods work
|
|
79
86
|
```
|
|
80
87
|
|
|
81
88
|
### 2. Works With Your Products
|
|
@@ -98,16 +105,19 @@ Carts, coupons, refunds, metadata.
|
|
|
98
105
|
/>
|
|
99
106
|
```
|
|
100
107
|
|
|
101
|
-
### 4. Auto-Detects
|
|
108
|
+
### 4. Auto-Detects Payment Options
|
|
102
109
|
|
|
103
|
-
|
|
110
|
+
Shows available payment methods based on user context.
|
|
104
111
|
|
|
105
112
|
```tsx
|
|
106
|
-
// User without wallet
|
|
107
|
-
[Pay with Card]
|
|
113
|
+
// User without wallet, not logged in:
|
|
114
|
+
[Pay with Card]
|
|
108
115
|
|
|
109
|
-
// User with Phantom
|
|
116
|
+
// User with Phantom wallet:
|
|
110
117
|
[Pay with Card] [Pay with Crypto]
|
|
118
|
+
|
|
119
|
+
// User logged into cedros-login:
|
|
120
|
+
[Pay with Card] [Pay with Crypto] [Pay with Credits]
|
|
111
121
|
```
|
|
112
122
|
|
|
113
123
|
### 5. Agent-Ready
|
|
@@ -120,9 +130,29 @@ X-PAYMENT: <signed-transaction>
|
|
|
120
130
|
# Agent gets data instantly
|
|
121
131
|
```
|
|
122
132
|
|
|
123
|
-
### 6.
|
|
133
|
+
### 6. Credits Payment (cedros-login)
|
|
134
|
+
|
|
135
|
+
Let users pay with account credits. Instant, zero-fee payments.
|
|
136
|
+
|
|
137
|
+
```tsx
|
|
138
|
+
import { useCedrosLogin } from '@cedros/login-react';
|
|
139
|
+
|
|
140
|
+
function Checkout() {
|
|
141
|
+
const { authToken } = useCedrosLogin();
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<CedrosPay
|
|
145
|
+
resource="product-1"
|
|
146
|
+
display={{ showCredits: !!authToken }}
|
|
147
|
+
checkout={{ authToken }}
|
|
148
|
+
/>
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### 7. Self-Host or Roll Your Own
|
|
124
154
|
|
|
125
|
-
React UI +
|
|
155
|
+
React UI + Rust backend. Open API.
|
|
126
156
|
|
|
127
157
|
```tsx
|
|
128
158
|
<CedrosPay resource="item" wallets={customWallets} renderModal={CustomModal} />
|
|
@@ -132,13 +162,13 @@ React UI + Go backend. Open API.
|
|
|
132
162
|
|
|
133
163
|
- 🌍 **Open source** — MIT-licensed and extensible
|
|
134
164
|
- 🔐 **Stateless & secure** — No user accounts or deposit addresses required
|
|
135
|
-
- 🧱 **Minimal integration** — Middleware or proxy for
|
|
165
|
+
- 🧱 **Minimal integration** — Middleware or proxy for Rust APIs
|
|
136
166
|
|
|
137
167
|
---
|
|
138
168
|
|
|
139
169
|
## Quick Start (3 Steps in ~3 Minutes)
|
|
140
170
|
|
|
141
|
-
If you can wrap a provider, you can ship
|
|
171
|
+
If you can wrap a provider, you can ship triple-rail payments.
|
|
142
172
|
|
|
143
173
|
### Step 1: Install
|
|
144
174
|
|
|
@@ -301,13 +331,13 @@ function Checkout() {
|
|
|
301
331
|
}
|
|
302
332
|
```
|
|
303
333
|
|
|
304
|
-
**Backend options:** Use the
|
|
334
|
+
**Backend options:** Use the Rust server, or implement the open API.
|
|
305
335
|
|
|
306
336
|
**Links:**
|
|
307
337
|
|
|
308
|
-
- [Backend setup →](https://github.com/
|
|
338
|
+
- [Backend setup →](https://github.com/conorholds/cedros-pay/tree/main/server)
|
|
309
339
|
- [Full docs →](https://docs.cedrospay.com)
|
|
310
|
-
- [Example apps →](https://github.com/
|
|
340
|
+
- [Example apps →](https://github.com/conorholds/cedros-pay/tree/main/ui/tree/main/examples)
|
|
311
341
|
|
|
312
342
|
**Cross-Domain Backend (Optional):**
|
|
313
343
|
If your backend is on a different domain (e.g., `api.example.com` while your frontend is on `example.com`), explicitly set `serverUrl`:
|
|
@@ -329,7 +359,7 @@ If your backend is on a different domain (e.g., `api.example.com` while your fro
|
|
|
329
359
|
Your backend must implement the Cedros Pay API endpoints:
|
|
330
360
|
|
|
331
361
|
```bash
|
|
332
|
-
|
|
362
|
+
cargo install cedros-pay-server
|
|
333
363
|
```
|
|
334
364
|
|
|
335
365
|
**Required Endpoints (v2.0.0+):**
|
|
@@ -417,7 +447,7 @@ X-Signer: <admin-wallet-address>
|
|
|
417
447
|
# Response: [{ refundId, originalPurchaseId, recipientWallet, amount, token, reason, ... }]
|
|
418
448
|
```
|
|
419
449
|
|
|
420
|
-
See [Backend Integration](https://github.com/
|
|
450
|
+
See [Backend Integration](https://github.com/conorholds/cedros-pay/tree/main/server) and `@backend-migration-resource-leakage.md` for complete API reference and migration guide.
|
|
421
451
|
|
|
422
452
|
---
|
|
423
453
|
|
|
@@ -1148,6 +1178,23 @@ import { CryptoSubscribeButton } from "@cedros/pay-react";
|
|
|
1148
1178
|
/>;
|
|
1149
1179
|
```
|
|
1150
1180
|
|
|
1181
|
+
**Credits Subscription (cedros-login):**
|
|
1182
|
+
|
|
1183
|
+
```tsx
|
|
1184
|
+
import { CreditsSubscribeButton } from "@cedros/pay-react";
|
|
1185
|
+
|
|
1186
|
+
<CreditsSubscribeButton
|
|
1187
|
+
resource="plan-pro"
|
|
1188
|
+
interval="monthly"
|
|
1189
|
+
authToken={user.cedrosToken}
|
|
1190
|
+
userId={user.id}
|
|
1191
|
+
autoCheckStatus
|
|
1192
|
+
onSubscriptionSuccess={(result) => {
|
|
1193
|
+
console.log("Subscription active until:", result.expiresAt);
|
|
1194
|
+
}}
|
|
1195
|
+
/>;
|
|
1196
|
+
```
|
|
1197
|
+
|
|
1151
1198
|
**Subscription Management (Upgrade/Downgrade/Cancel):**
|
|
1152
1199
|
|
|
1153
1200
|
```tsx
|
|
@@ -1387,6 +1434,109 @@ For complete control over styling, use the `unstyled` prop to disable all defaul
|
|
|
1387
1434
|
|
|
1388
1435
|
---
|
|
1389
1436
|
|
|
1437
|
+
## Admin Dashboard
|
|
1438
|
+
|
|
1439
|
+
Cedros Pay includes a complete admin dashboard for managing your store. Use it standalone or combine it with cedros-login for a unified admin experience.
|
|
1440
|
+
|
|
1441
|
+
### Standalone Dashboard
|
|
1442
|
+
|
|
1443
|
+
Drop in `<CedrosPayAdminDashboard />` for a complete payment admin interface:
|
|
1444
|
+
|
|
1445
|
+
```tsx
|
|
1446
|
+
import { CedrosPayAdminDashboard } from "@cedros/pay-react";
|
|
1447
|
+
|
|
1448
|
+
function AdminPage() {
|
|
1449
|
+
return (
|
|
1450
|
+
<CedrosPayAdminDashboard
|
|
1451
|
+
serverUrl="https://api.example.com"
|
|
1452
|
+
title="My Store"
|
|
1453
|
+
defaultSection="transactions"
|
|
1454
|
+
/>
|
|
1455
|
+
);
|
|
1456
|
+
}
|
|
1457
|
+
```
|
|
1458
|
+
|
|
1459
|
+
**Available Sections:**
|
|
1460
|
+
|
|
1461
|
+
| Section | Description |
|
|
1462
|
+
|---------|-------------|
|
|
1463
|
+
| `transactions` | Payment history with filtering by method |
|
|
1464
|
+
| `products` | Manage products, pricing, and variations |
|
|
1465
|
+
| `subscriptions` | Configure subscription plans |
|
|
1466
|
+
| `coupons` | Create and manage discount codes |
|
|
1467
|
+
| `refunds` | Process refund requests |
|
|
1468
|
+
| `storefront` | Customize shop layout and appearance |
|
|
1469
|
+
| `ai-settings` | Configure AI-powered features |
|
|
1470
|
+
| `payment-settings` | Payment method configuration |
|
|
1471
|
+
| `messaging` | Email and notification templates |
|
|
1472
|
+
| `settings` | Server and integration settings |
|
|
1473
|
+
|
|
1474
|
+
### Unified Dashboard with Plugin System
|
|
1475
|
+
|
|
1476
|
+
For apps using both **cedros-login** and **cedros-pay**, use cedros-login's `AdminShell` component with the `cedrosPayPlugin` to create a combined admin interface:
|
|
1477
|
+
|
|
1478
|
+
```tsx
|
|
1479
|
+
import { AdminShell, cedrosLoginPlugin, useCedrosLogin } from "@cedros/login-react";
|
|
1480
|
+
import { cedrosPayPlugin } from "@cedros/pay-react";
|
|
1481
|
+
|
|
1482
|
+
function UnifiedAdmin() {
|
|
1483
|
+
const { user, getAccessToken, serverUrl } = useCedrosLogin();
|
|
1484
|
+
|
|
1485
|
+
// Build host context from your auth providers
|
|
1486
|
+
const hostContext = {
|
|
1487
|
+
cedrosLogin: {
|
|
1488
|
+
user,
|
|
1489
|
+
getAccessToken,
|
|
1490
|
+
serverUrl,
|
|
1491
|
+
},
|
|
1492
|
+
cedrosPay: {
|
|
1493
|
+
serverUrl: "https://api.example.com",
|
|
1494
|
+
},
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1497
|
+
return (
|
|
1498
|
+
<AdminShell
|
|
1499
|
+
title="Admin Dashboard"
|
|
1500
|
+
plugins={[cedrosLoginPlugin, cedrosPayPlugin]}
|
|
1501
|
+
hostContext={hostContext}
|
|
1502
|
+
defaultSection="cedros-pay:transactions"
|
|
1503
|
+
/>
|
|
1504
|
+
);
|
|
1505
|
+
}
|
|
1506
|
+
```
|
|
1507
|
+
|
|
1508
|
+
> **Note:** The `AdminShell` component is provided by `@cedros/login-react`. This package only exports the `cedrosPayPlugin` for use with their shell.
|
|
1509
|
+
|
|
1510
|
+
### cedrosPayPlugin Sections
|
|
1511
|
+
|
|
1512
|
+
The plugin registers these sections for the unified dashboard:
|
|
1513
|
+
|
|
1514
|
+
| Section ID | Group | Description |
|
|
1515
|
+
|------------|-------|-------------|
|
|
1516
|
+
| `transactions` | Store | Payment transactions |
|
|
1517
|
+
| `products` | Store | Product management |
|
|
1518
|
+
| `subscriptions` | Store | Subscription plans |
|
|
1519
|
+
| `coupons` | Store | Coupon management |
|
|
1520
|
+
| `refunds` | Store | Refund requests |
|
|
1521
|
+
| `storefront` | Configuration | Storefront settings |
|
|
1522
|
+
| `ai-settings` | Configuration | AI assistant settings |
|
|
1523
|
+
| `payment-settings` | Configuration | Payment method toggles |
|
|
1524
|
+
| `messaging` | Configuration | Email/webhook settings |
|
|
1525
|
+
| `settings` | Configuration | Server configuration |
|
|
1526
|
+
|
|
1527
|
+
### Section Addressing
|
|
1528
|
+
|
|
1529
|
+
Sections are addressed using the format `pluginId:sectionId`:
|
|
1530
|
+
|
|
1531
|
+
- `cedros-pay:transactions` - Cedros Pay transactions
|
|
1532
|
+
- `cedros-pay:products` - Cedros Pay products
|
|
1533
|
+
- `cedros-login:users` - Cedros Login user management
|
|
1534
|
+
- `cedros-login:orgs` - Cedros Login organizations
|
|
1535
|
+
|
|
1536
|
+
See the [cedros-login documentation](https://github.com/cedros-dev/cedros-login) for full `AdminShell` API reference and custom plugin creation.
|
|
1537
|
+
|
|
1538
|
+
---
|
|
1539
|
+
|
|
1390
1540
|
## Props Reference
|
|
1391
1541
|
|
|
1392
1542
|
### CedrosProvider Configuration
|
|
@@ -1427,24 +1577,26 @@ For complete control over styling, use the `unstyled` prop to disable all defaul
|
|
|
1427
1577
|
|
|
1428
1578
|
#### Display Options
|
|
1429
1579
|
|
|
1430
|
-
| Field
|
|
1431
|
-
|
|
|
1432
|
-
| `cardLabel`
|
|
1433
|
-
| `cryptoLabel`
|
|
1434
|
-
| `
|
|
1435
|
-
| `
|
|
1436
|
-
| `
|
|
1437
|
-
| `
|
|
1580
|
+
| Field | Type | Description |
|
|
1581
|
+
| -------------- | ---------------------------- | ------------------------------------ |
|
|
1582
|
+
| `cardLabel` | `string` | Stripe button label |
|
|
1583
|
+
| `cryptoLabel` | `string` | Crypto button label |
|
|
1584
|
+
| `creditsLabel` | `string` | Credits button label |
|
|
1585
|
+
| `showCard` | `boolean` | Show Stripe button (default: true) |
|
|
1586
|
+
| `showCrypto` | `boolean` | Show crypto button (default: true) |
|
|
1587
|
+
| `showCredits` | `boolean` | Show credits button (default: false) |
|
|
1588
|
+
| `layout` | `'vertical' \| 'horizontal'` | Button layout (default: 'vertical') |
|
|
1589
|
+
| `className` | `string` | Custom CSS class |
|
|
1438
1590
|
|
|
1439
1591
|
#### Callback Options
|
|
1440
1592
|
|
|
1441
|
-
| Field | Type
|
|
1442
|
-
| ------------------ |
|
|
1443
|
-
| `onPaymentSuccess` | `(result: PaymentSuccessResult) => void`
|
|
1444
|
-
| `onPaymentError` | `(error: PaymentErrorDetail) => void`
|
|
1445
|
-
| `onPaymentAttempt` | `(method: 'stripe' \| 'crypto') => void` | Called when payment starts |
|
|
1593
|
+
| Field | Type | Description |
|
|
1594
|
+
| ------------------ | ----------------------------------------------------- | ---------------------------- |
|
|
1595
|
+
| `onPaymentSuccess` | `(result: PaymentSuccessResult) => void` | Called on successful payment |
|
|
1596
|
+
| `onPaymentError` | `(error: PaymentErrorDetail) => void` | Called on payment error |
|
|
1597
|
+
| `onPaymentAttempt` | `(method: 'stripe' \| 'crypto' \| 'credits') => void` | Called when payment starts |
|
|
1446
1598
|
|
|
1447
|
-
[Full API Reference →](https://github.com/
|
|
1599
|
+
[Full API Reference →](https://github.com/conorholds/cedros-pay/tree/main/ui/tree/main/stories)
|
|
1448
1600
|
|
|
1449
1601
|
---
|
|
1450
1602
|
|
|
@@ -1678,8 +1830,8 @@ We follow [Semantic Versioning](https://semver.org/):
|
|
|
1678
1830
|
|
|
1679
1831
|
**These exports are guaranteed stable** and follow semantic versioning:
|
|
1680
1832
|
|
|
1681
|
-
- ✅ **Components** - All exported React components (CedrosPay, StripeButton, CryptoButton, SubscribeButton, CryptoSubscribeButton, SubscriptionManagementPanel, etc.)
|
|
1682
|
-
- ✅ **Hooks** - useCedrosContext, useStripeCheckout, useX402Payment, useSubscription, useCryptoSubscription, useSubscriptionManagement, etc.
|
|
1833
|
+
- ✅ **Components** - All exported React components (CedrosPay, StripeButton, CryptoButton, CreditsButton, SubscribeButton, CryptoSubscribeButton, CreditsSubscribeButton, SubscriptionManagementPanel, etc.)
|
|
1834
|
+
- ✅ **Hooks** - useCedrosContext, useStripeCheckout, useX402Payment, useCreditsPayment, useSubscription, useCryptoSubscription, useCreditsSubscription, useSubscriptionManagement, etc.
|
|
1683
1835
|
- ✅ **Manager Interfaces** - IStripeManager, IX402Manager, IWalletManager, ISubscriptionManager, ISubscriptionChangeManager, IRouteDiscoveryManager
|
|
1684
1836
|
- ✅ **Types** - All types exported via versioned namespaces (v1, v2, etc.)
|
|
1685
1837
|
- ✅ **Utilities** - validateConfig, parseCouponCodes, rate limiters, logging, events
|