@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.
Files changed (372) hide show
  1. package/README.md +190 -38
  2. package/dist/{CedrosContext-CFEXGwQg.mjs → CedrosContext-DUT3cLZg.mjs} +683 -372
  3. package/dist/CedrosContext-efFL4kQz.js +11 -0
  4. package/dist/admin/index.d.ts +9 -0
  5. package/dist/admin/index.d.ts.map +1 -0
  6. package/dist/admin/plugin.d.ts +9 -0
  7. package/dist/admin/plugin.d.ts.map +1 -0
  8. package/dist/admin/types.d.ts +115 -0
  9. package/dist/admin/types.d.ts.map +1 -0
  10. package/dist/components/CedrosPay.d.ts.map +1 -1
  11. package/dist/components/CreditsButton.d.ts +42 -0
  12. package/dist/components/CreditsButton.d.ts.map +1 -0
  13. package/dist/components/CreditsSubscribeButton.d.ts +55 -0
  14. package/dist/components/CreditsSubscribeButton.d.ts.map +1 -0
  15. package/dist/components/CryptoButton.d.ts.map +1 -1
  16. package/dist/components/CryptoSubscribeButton.d.ts.map +1 -1
  17. package/dist/components/PaymentModal.d.ts +8 -2
  18. package/dist/components/PaymentModal.d.ts.map +1 -1
  19. package/dist/components/PurchaseButton.d.ts +14 -3
  20. package/dist/components/PurchaseButton.d.ts.map +1 -1
  21. package/dist/components/SubscriptionManagementPanel.d.ts.map +1 -1
  22. package/dist/components/admin/AISettingsSection.d.ts +3 -0
  23. package/dist/components/admin/AISettingsSection.d.ts.map +1 -0
  24. package/dist/components/admin/AdminAuthManager.d.ts +95 -0
  25. package/dist/components/admin/AdminAuthManager.d.ts.map +1 -0
  26. package/dist/components/admin/CedrosPayAdminDashboard.d.ts +40 -0
  27. package/dist/components/admin/CedrosPayAdminDashboard.d.ts.map +1 -0
  28. package/dist/components/admin/ConfigEditor.d.ts +13 -0
  29. package/dist/components/admin/ConfigEditor.d.ts.map +1 -0
  30. package/dist/components/admin/CouponsSection.d.ts +3 -0
  31. package/dist/components/admin/CouponsSection.d.ts.map +1 -0
  32. package/dist/components/admin/Dropdown.d.ts +29 -0
  33. package/dist/components/admin/Dropdown.d.ts.map +1 -0
  34. package/dist/components/admin/FAQSection.d.ts +3 -0
  35. package/dist/components/admin/FAQSection.d.ts.map +1 -0
  36. package/dist/components/admin/MessagingSection.d.ts +10 -0
  37. package/dist/components/admin/MessagingSection.d.ts.map +1 -0
  38. package/dist/components/admin/OverviewSection.d.ts +3 -0
  39. package/dist/components/admin/OverviewSection.d.ts.map +1 -0
  40. package/dist/components/admin/PaymentSettingsSection.d.ts +3 -0
  41. package/dist/components/admin/PaymentSettingsSection.d.ts.map +1 -0
  42. package/dist/components/admin/ProductVariationsEditor.d.ts +14 -0
  43. package/dist/components/admin/ProductVariationsEditor.d.ts.map +1 -0
  44. package/dist/components/admin/ProductsSection.d.ts +3 -0
  45. package/dist/components/admin/ProductsSection.d.ts.map +1 -0
  46. package/dist/components/admin/RefundsSection.d.ts +3 -0
  47. package/dist/components/admin/RefundsSection.d.ts.map +1 -0
  48. package/dist/components/admin/SettingsSection.d.ts +10 -0
  49. package/dist/components/admin/SettingsSection.d.ts.map +1 -0
  50. package/dist/components/admin/SingleCategorySettings.d.ts +21 -0
  51. package/dist/components/admin/SingleCategorySettings.d.ts.map +1 -0
  52. package/dist/components/admin/StatsBar.d.ts +19 -0
  53. package/dist/components/admin/StatsBar.d.ts.map +1 -0
  54. package/dist/components/admin/StorefrontSection.d.ts +3 -0
  55. package/dist/components/admin/StorefrontSection.d.ts.map +1 -0
  56. package/dist/components/admin/SubscriptionsSection.d.ts +3 -0
  57. package/dist/components/admin/SubscriptionsSection.d.ts.map +1 -0
  58. package/dist/components/admin/TransactionsSection.d.ts +3 -0
  59. package/dist/components/admin/TransactionsSection.d.ts.map +1 -0
  60. package/dist/components/admin/VariantInventoryGrid.d.ts +19 -0
  61. package/dist/components/admin/VariantInventoryGrid.d.ts.map +1 -0
  62. package/dist/components/admin/VariationTypeEditor.d.ts +15 -0
  63. package/dist/components/admin/VariationTypeEditor.d.ts.map +1 -0
  64. package/dist/components/admin/configApi.d.ts +104 -0
  65. package/dist/components/admin/configApi.d.ts.map +1 -0
  66. package/dist/components/admin/icons.d.ts +50 -0
  67. package/dist/components/admin/icons.d.ts.map +1 -0
  68. package/dist/components/admin/index.d.ts +16 -0
  69. package/dist/components/admin/index.d.ts.map +1 -0
  70. package/dist/components/admin/sections-more.d.ts +12 -0
  71. package/dist/components/admin/sections-more.d.ts.map +1 -0
  72. package/dist/components/admin/sections.d.ts +12 -0
  73. package/dist/components/admin/sections.d.ts.map +1 -0
  74. package/dist/components/admin/types.d.ts +324 -0
  75. package/dist/components/admin/types.d.ts.map +1 -0
  76. package/dist/components/admin/useAdminAuth.d.ts +50 -0
  77. package/dist/components/admin/useAdminAuth.d.ts.map +1 -0
  78. package/dist/components/admin/useAutosave.d.ts +56 -0
  79. package/dist/components/admin/useAutosave.d.ts.map +1 -0
  80. package/dist/components/admin/useProductVariations.d.ts +56 -0
  81. package/dist/components/admin/useProductVariations.d.ts.map +1 -0
  82. package/dist/components/subscriptionPanelStyles.d.ts +2 -3
  83. package/dist/components/subscriptionPanelStyles.d.ts.map +1 -1
  84. package/dist/context/CedrosContext.d.ts +2 -0
  85. package/dist/context/CedrosContext.d.ts.map +1 -1
  86. package/dist/context/ThemeContext.d.ts +6 -0
  87. package/dist/context/ThemeContext.d.ts.map +1 -1
  88. package/dist/crypto-only.d.ts +1 -1
  89. package/dist/crypto-only.d.ts.map +1 -1
  90. package/dist/crypto-only.js +1 -1
  91. package/dist/crypto-only.mjs +16 -17
  92. package/dist/ecommerce/__tests__/cartCheckoutRequirements.test.d.ts +2 -0
  93. package/dist/ecommerce/__tests__/cartCheckoutRequirements.test.d.ts.map +1 -0
  94. package/dist/ecommerce/__tests__/cartProviderPersistence.test.d.ts +2 -0
  95. package/dist/ecommerce/__tests__/cartProviderPersistence.test.d.ts.map +1 -0
  96. package/dist/ecommerce/__tests__/cartReducer.test.d.ts +2 -0
  97. package/dist/ecommerce/__tests__/cartReducer.test.d.ts.map +1 -0
  98. package/dist/ecommerce/__tests__/cartServerMerge.test.d.ts +2 -0
  99. package/dist/ecommerce/__tests__/cartServerMerge.test.d.ts.map +1 -0
  100. package/dist/ecommerce/__tests__/checkoutPaymentMethods.test.d.ts +2 -0
  101. package/dist/ecommerce/__tests__/checkoutPaymentMethods.test.d.ts.map +1 -0
  102. package/dist/ecommerce/__tests__/checkoutReturn.test.d.ts +2 -0
  103. package/dist/ecommerce/__tests__/checkoutReturn.test.d.ts.map +1 -0
  104. package/dist/ecommerce/__tests__/checkoutSchema.test.d.ts +2 -0
  105. package/dist/ecommerce/__tests__/checkoutSchema.test.d.ts.map +1 -0
  106. package/dist/ecommerce/__tests__/mockAdapter.test.d.ts +2 -0
  107. package/dist/ecommerce/__tests__/mockAdapter.test.d.ts.map +1 -0
  108. package/dist/ecommerce/adapters/CommerceAdapter.d.ts +235 -0
  109. package/dist/ecommerce/adapters/CommerceAdapter.d.ts.map +1 -0
  110. package/dist/ecommerce/adapters/mock/mockAdapter.d.ts +3 -0
  111. package/dist/ecommerce/adapters/mock/mockAdapter.d.ts.map +1 -0
  112. package/dist/ecommerce/adapters/paywall/paywallAdapter.d.ts +6 -0
  113. package/dist/ecommerce/adapters/paywall/paywallAdapter.d.ts.map +1 -0
  114. package/dist/ecommerce/components/cart/CartLineItem.d.ts +12 -0
  115. package/dist/ecommerce/components/cart/CartLineItem.d.ts.map +1 -0
  116. package/dist/ecommerce/components/cart/CartPageContent.d.ts +6 -0
  117. package/dist/ecommerce/components/cart/CartPageContent.d.ts.map +1 -0
  118. package/dist/ecommerce/components/cart/CartPanel.d.ts +5 -0
  119. package/dist/ecommerce/components/cart/CartPanel.d.ts.map +1 -0
  120. package/dist/ecommerce/components/cart/CartSidebar.d.ts +11 -0
  121. package/dist/ecommerce/components/cart/CartSidebar.d.ts.map +1 -0
  122. package/dist/ecommerce/components/cart/CartSummary.d.ts +13 -0
  123. package/dist/ecommerce/components/cart/CartSummary.d.ts.map +1 -0
  124. package/dist/ecommerce/components/cart/PromoCodeInput.d.ts +6 -0
  125. package/dist/ecommerce/components/cart/PromoCodeInput.d.ts.map +1 -0
  126. package/dist/ecommerce/components/catalog/Breadcrumbs.d.ts +9 -0
  127. package/dist/ecommerce/components/catalog/Breadcrumbs.d.ts.map +1 -0
  128. package/dist/ecommerce/components/catalog/CategoryNav.d.ts +8 -0
  129. package/dist/ecommerce/components/catalog/CategoryNav.d.ts.map +1 -0
  130. package/dist/ecommerce/components/catalog/FilterPanel.d.ts +29 -0
  131. package/dist/ecommerce/components/catalog/FilterPanel.d.ts.map +1 -0
  132. package/dist/ecommerce/components/catalog/Price.d.ts +9 -0
  133. package/dist/ecommerce/components/catalog/Price.d.ts.map +1 -0
  134. package/dist/ecommerce/components/catalog/ProductCard.d.ts +14 -0
  135. package/dist/ecommerce/components/catalog/ProductCard.d.ts.map +1 -0
  136. package/dist/ecommerce/components/catalog/ProductGallery.d.ts +6 -0
  137. package/dist/ecommerce/components/catalog/ProductGallery.d.ts.map +1 -0
  138. package/dist/ecommerce/components/catalog/ProductGrid.d.ts +20 -0
  139. package/dist/ecommerce/components/catalog/ProductGrid.d.ts.map +1 -0
  140. package/dist/ecommerce/components/catalog/QuantitySelector.d.ts +8 -0
  141. package/dist/ecommerce/components/catalog/QuantitySelector.d.ts.map +1 -0
  142. package/dist/ecommerce/components/catalog/QuickViewDialog.d.ts +10 -0
  143. package/dist/ecommerce/components/catalog/QuickViewDialog.d.ts.map +1 -0
  144. package/dist/ecommerce/components/catalog/SearchInput.d.ts +7 -0
  145. package/dist/ecommerce/components/catalog/SearchInput.d.ts.map +1 -0
  146. package/dist/ecommerce/components/catalog/VariantSelector.d.ts +19 -0
  147. package/dist/ecommerce/components/catalog/VariantSelector.d.ts.map +1 -0
  148. package/dist/ecommerce/components/chat/ShopChatPanel.d.ts +4 -0
  149. package/dist/ecommerce/components/chat/ShopChatPanel.d.ts.map +1 -0
  150. package/dist/ecommerce/components/checkout/AddressForm.d.ts +9 -0
  151. package/dist/ecommerce/components/checkout/AddressForm.d.ts.map +1 -0
  152. package/dist/ecommerce/components/checkout/CheckoutCancelPage.d.ts +24 -0
  153. package/dist/ecommerce/components/checkout/CheckoutCancelPage.d.ts.map +1 -0
  154. package/dist/ecommerce/components/checkout/CheckoutForm.d.ts +4 -0
  155. package/dist/ecommerce/components/checkout/CheckoutForm.d.ts.map +1 -0
  156. package/dist/ecommerce/components/checkout/CheckoutLayout.d.ts +6 -0
  157. package/dist/ecommerce/components/checkout/CheckoutLayout.d.ts.map +1 -0
  158. package/dist/ecommerce/components/checkout/CheckoutReceipt.d.ts +8 -0
  159. package/dist/ecommerce/components/checkout/CheckoutReceipt.d.ts.map +1 -0
  160. package/dist/ecommerce/components/checkout/CheckoutSuccessPage.d.ts +29 -0
  161. package/dist/ecommerce/components/checkout/CheckoutSuccessPage.d.ts.map +1 -0
  162. package/dist/ecommerce/components/checkout/InventoryVerificationDialog.d.ts +19 -0
  163. package/dist/ecommerce/components/checkout/InventoryVerificationDialog.d.ts.map +1 -0
  164. package/dist/ecommerce/components/checkout/OrderReview.d.ts +4 -0
  165. package/dist/ecommerce/components/checkout/OrderReview.d.ts.map +1 -0
  166. package/dist/ecommerce/components/checkout/PaymentStep.d.ts +15 -0
  167. package/dist/ecommerce/components/checkout/PaymentStep.d.ts.map +1 -0
  168. package/dist/ecommerce/components/checkout/ShippingMethodSelector.d.ts +9 -0
  169. package/dist/ecommerce/components/checkout/ShippingMethodSelector.d.ts.map +1 -0
  170. package/dist/ecommerce/components/faq/FAQItem.d.ts +29 -0
  171. package/dist/ecommerce/components/faq/FAQItem.d.ts.map +1 -0
  172. package/dist/ecommerce/components/faq/FAQItem.test.d.ts +7 -0
  173. package/dist/ecommerce/components/faq/FAQItem.test.d.ts.map +1 -0
  174. package/dist/ecommerce/components/faq/FAQList.d.ts +15 -0
  175. package/dist/ecommerce/components/faq/FAQList.d.ts.map +1 -0
  176. package/dist/ecommerce/components/faq/index.d.ts +3 -0
  177. package/dist/ecommerce/components/faq/index.d.ts.map +1 -0
  178. package/dist/ecommerce/components/general/EmptyState.d.ts +8 -0
  179. package/dist/ecommerce/components/general/EmptyState.d.ts.map +1 -0
  180. package/dist/ecommerce/components/general/ErrorBoundary.d.ts +16 -0
  181. package/dist/ecommerce/components/general/ErrorBoundary.d.ts.map +1 -0
  182. package/dist/ecommerce/components/general/ErrorState.d.ts +7 -0
  183. package/dist/ecommerce/components/general/ErrorState.d.ts.map +1 -0
  184. package/dist/ecommerce/components/general/toast.d.ts +19 -0
  185. package/dist/ecommerce/components/general/toast.d.ts.map +1 -0
  186. package/dist/ecommerce/components/orders/OrderCard.d.ts +7 -0
  187. package/dist/ecommerce/components/orders/OrderCard.d.ts.map +1 -0
  188. package/dist/ecommerce/components/orders/OrderDetails.d.ts +7 -0
  189. package/dist/ecommerce/components/orders/OrderDetails.d.ts.map +1 -0
  190. package/dist/ecommerce/components/orders/OrderList.d.ts +7 -0
  191. package/dist/ecommerce/components/orders/OrderList.d.ts.map +1 -0
  192. package/dist/ecommerce/components/ui/accordion.d.ts +7 -0
  193. package/dist/ecommerce/components/ui/accordion.d.ts.map +1 -0
  194. package/dist/ecommerce/components/ui/badge.d.ts +10 -0
  195. package/dist/ecommerce/components/ui/badge.d.ts.map +1 -0
  196. package/dist/ecommerce/components/ui/button.d.ts +12 -0
  197. package/dist/ecommerce/components/ui/button.d.ts.map +1 -0
  198. package/dist/ecommerce/components/ui/card.d.ts +8 -0
  199. package/dist/ecommerce/components/ui/card.d.ts.map +1 -0
  200. package/dist/ecommerce/components/ui/dialog.d.ts +13 -0
  201. package/dist/ecommerce/components/ui/dialog.d.ts.map +1 -0
  202. package/dist/ecommerce/components/ui/input.d.ts +5 -0
  203. package/dist/ecommerce/components/ui/input.d.ts.map +1 -0
  204. package/dist/ecommerce/components/ui/label.d.ts +3 -0
  205. package/dist/ecommerce/components/ui/label.d.ts.map +1 -0
  206. package/dist/ecommerce/components/ui/select.d.ts +9 -0
  207. package/dist/ecommerce/components/ui/select.d.ts.map +1 -0
  208. package/dist/ecommerce/components/ui/separator.d.ts +4 -0
  209. package/dist/ecommerce/components/ui/separator.d.ts.map +1 -0
  210. package/dist/ecommerce/components/ui/sheet.d.ts +21 -0
  211. package/dist/ecommerce/components/ui/sheet.d.ts.map +1 -0
  212. package/dist/ecommerce/components/ui/skeleton.d.ts +3 -0
  213. package/dist/ecommerce/components/ui/skeleton.d.ts.map +1 -0
  214. package/dist/ecommerce/components/ui/tabs.d.ts +7 -0
  215. package/dist/ecommerce/components/ui/tabs.d.ts.map +1 -0
  216. package/dist/ecommerce/components/ui/textarea.d.ts +5 -0
  217. package/dist/ecommerce/components/ui/textarea.d.ts.map +1 -0
  218. package/dist/ecommerce/config/context.d.ts +13 -0
  219. package/dist/ecommerce/config/context.d.ts.map +1 -0
  220. package/dist/ecommerce/config/types.d.ts +48 -0
  221. package/dist/ecommerce/config/types.d.ts.map +1 -0
  222. package/dist/ecommerce/hooks/checkoutReturn.d.ts +3 -0
  223. package/dist/ecommerce/hooks/checkoutReturn.d.ts.map +1 -0
  224. package/dist/ecommerce/hooks/useAIRelatedProducts.d.ts +33 -0
  225. package/dist/ecommerce/hooks/useAIRelatedProducts.d.ts.map +1 -0
  226. package/dist/ecommerce/hooks/useCartInventory.d.ts +42 -0
  227. package/dist/ecommerce/hooks/useCartInventory.d.ts.map +1 -0
  228. package/dist/ecommerce/hooks/useCatalogUrlState.d.ts +15 -0
  229. package/dist/ecommerce/hooks/useCatalogUrlState.d.ts.map +1 -0
  230. package/dist/ecommerce/hooks/useCategories.d.ts +7 -0
  231. package/dist/ecommerce/hooks/useCategories.d.ts.map +1 -0
  232. package/dist/ecommerce/hooks/useCheckoutResultFromUrl.d.ts +4 -0
  233. package/dist/ecommerce/hooks/useCheckoutResultFromUrl.d.ts.map +1 -0
  234. package/dist/ecommerce/hooks/useHoldExpiry.d.ts +34 -0
  235. package/dist/ecommerce/hooks/useHoldExpiry.d.ts.map +1 -0
  236. package/dist/ecommerce/hooks/useInventoryVerification.d.ts +41 -0
  237. package/dist/ecommerce/hooks/useInventoryVerification.d.ts.map +1 -0
  238. package/dist/ecommerce/hooks/useOrders.d.ts +7 -0
  239. package/dist/ecommerce/hooks/useOrders.d.ts.map +1 -0
  240. package/dist/ecommerce/hooks/usePaymentMethodsConfig.d.ts +6 -0
  241. package/dist/ecommerce/hooks/usePaymentMethodsConfig.d.ts.map +1 -0
  242. package/dist/ecommerce/hooks/useProduct.d.ts +7 -0
  243. package/dist/ecommerce/hooks/useProduct.d.ts.map +1 -0
  244. package/dist/ecommerce/hooks/useProducts.d.ts +8 -0
  245. package/dist/ecommerce/hooks/useProducts.d.ts.map +1 -0
  246. package/dist/ecommerce/hooks/useShippingMethods.d.ts +10 -0
  247. package/dist/ecommerce/hooks/useShippingMethods.d.ts.map +1 -0
  248. package/dist/ecommerce/hooks/useStorefrontSettings.d.ts +32 -0
  249. package/dist/ecommerce/hooks/useStorefrontSettings.d.ts.map +1 -0
  250. package/dist/ecommerce/hooks/useSubscriptionData.d.ts +8 -0
  251. package/dist/ecommerce/hooks/useSubscriptionData.d.ts.map +1 -0
  252. package/dist/ecommerce/index.d.ts +98 -0
  253. package/dist/ecommerce/index.d.ts.map +1 -0
  254. package/dist/ecommerce/integrations/cedros-pay/useCedrosPayCheckoutAdapter.d.ts +10 -0
  255. package/dist/ecommerce/integrations/cedros-pay/useCedrosPayCheckoutAdapter.d.ts.map +1 -0
  256. package/dist/ecommerce/state/cart/CartProvider.d.ts +27 -0
  257. package/dist/ecommerce/state/cart/CartProvider.d.ts.map +1 -0
  258. package/dist/ecommerce/state/cart/cartReducer.d.ts +35 -0
  259. package/dist/ecommerce/state/cart/cartReducer.d.ts.map +1 -0
  260. package/dist/ecommerce/state/checkout/checkoutSchema.d.ts +21 -0
  261. package/dist/ecommerce/state/checkout/checkoutSchema.d.ts.map +1 -0
  262. package/dist/ecommerce/state/checkout/useCheckout.d.ts +34 -0
  263. package/dist/ecommerce/state/checkout/useCheckout.d.ts.map +1 -0
  264. package/dist/ecommerce/templates/CartTemplate.d.ts +5 -0
  265. package/dist/ecommerce/templates/CartTemplate.d.ts.map +1 -0
  266. package/dist/ecommerce/templates/CategoryTemplate.d.ts +11 -0
  267. package/dist/ecommerce/templates/CategoryTemplate.d.ts.map +1 -0
  268. package/dist/ecommerce/templates/CheckoutTemplate.d.ts +9 -0
  269. package/dist/ecommerce/templates/CheckoutTemplate.d.ts.map +1 -0
  270. package/dist/ecommerce/templates/ProductTemplate.d.ts +11 -0
  271. package/dist/ecommerce/templates/ProductTemplate.d.ts.map +1 -0
  272. package/dist/ecommerce/templates/PurchaseHistoryTemplate.d.ts +6 -0
  273. package/dist/ecommerce/templates/PurchaseHistoryTemplate.d.ts.map +1 -0
  274. package/dist/ecommerce/templates/ReceiptTemplate.d.ts +19 -0
  275. package/dist/ecommerce/templates/ReceiptTemplate.d.ts.map +1 -0
  276. package/dist/ecommerce/templates/ShopTemplate.d.ts +15 -0
  277. package/dist/ecommerce/templates/ShopTemplate.d.ts.map +1 -0
  278. package/dist/ecommerce/templates/SubscriptionTemplate.d.ts +15 -0
  279. package/dist/ecommerce/templates/SubscriptionTemplate.d.ts.map +1 -0
  280. package/dist/ecommerce/testing/adapterContract.d.ts +11 -0
  281. package/dist/ecommerce/testing/adapterContract.d.ts.map +1 -0
  282. package/dist/ecommerce/types.d.ts +164 -0
  283. package/dist/ecommerce/types.d.ts.map +1 -0
  284. package/dist/ecommerce/utils/cartCheckoutRequirements.d.ts +18 -0
  285. package/dist/ecommerce/utils/cartCheckoutRequirements.d.ts.map +1 -0
  286. package/dist/ecommerce/utils/cartItemMetadata.d.ts +3 -0
  287. package/dist/ecommerce/utils/cartItemMetadata.d.ts.map +1 -0
  288. package/dist/ecommerce/utils/cn.d.ts +3 -0
  289. package/dist/ecommerce/utils/cn.d.ts.map +1 -0
  290. package/dist/ecommerce/utils/money.d.ts +6 -0
  291. package/dist/ecommerce/utils/money.d.ts.map +1 -0
  292. package/dist/ecommerce/utils/storage.d.ts +5 -0
  293. package/dist/ecommerce/utils/storage.d.ts.map +1 -0
  294. package/dist/en-BXheDBal.mjs +19 -0
  295. package/dist/en-Yikrt96u.js +1 -0
  296. package/dist/hooks/useCreditsPayment.d.ts +64 -0
  297. package/dist/hooks/useCreditsPayment.d.ts.map +1 -0
  298. package/dist/hooks/useCreditsSubscription.d.ts +42 -0
  299. package/dist/hooks/useCreditsSubscription.d.ts.map +1 -0
  300. package/dist/hooks/usePaymentMode.d.ts.map +1 -1
  301. package/dist/hooks/useStripeCheckout.d.ts +1 -0
  302. package/dist/hooks/useStripeCheckout.d.ts.map +1 -1
  303. package/dist/hooks/useSubscriptionManagement.d.ts +4 -0
  304. package/dist/hooks/useSubscriptionManagement.d.ts.map +1 -1
  305. package/dist/hooks/useX402Payment.d.ts +1 -0
  306. package/dist/hooks/useX402Payment.d.ts.map +1 -1
  307. package/dist/index-DPl2S6i0.js +136 -0
  308. package/dist/index-SV9PXby1.mjs +26838 -0
  309. package/dist/index.d.ts +10 -2
  310. package/dist/index.d.ts.map +1 -1
  311. package/dist/index.js +1 -1
  312. package/dist/index.mjs +79 -1922
  313. package/dist/magic-string.es-B81Zo59j.js +10 -0
  314. package/dist/magic-string.es-uPKorP4O.mjs +663 -0
  315. package/dist/managers/CreditsManager.d.ts +151 -0
  316. package/dist/managers/CreditsManager.d.ts.map +1 -0
  317. package/dist/managers/ManagerCache.d.ts +2 -0
  318. package/dist/managers/ManagerCache.d.ts.map +1 -1
  319. package/dist/managers/RouteDiscoveryManager.d.ts.map +1 -1
  320. package/dist/managers/StripeManager.d.ts.map +1 -1
  321. package/dist/managers/X402Manager.d.ts.map +1 -1
  322. package/dist/pay-react.css +1 -1
  323. package/dist/sections-BsFQxfHN.mjs +10 -0
  324. package/dist/sections-CTqBNAKW.js +1 -0
  325. package/dist/stripe-only.d.ts +1 -1
  326. package/dist/stripe-only.d.ts.map +1 -1
  327. package/dist/stripe-only.js +1 -1
  328. package/dist/stripe-only.mjs +12 -13
  329. package/dist/styles-C4-_hbgr.js +1 -0
  330. package/dist/styles-QcAsIVWl.mjs +1909 -0
  331. package/dist/telemetry.js +1 -1
  332. package/dist/telemetry.mjs +1 -1
  333. package/dist/testing/index.js +147 -1
  334. package/dist/testing/index.mjs +10555 -103
  335. package/dist/types/componentOptions.d.ts +14 -4
  336. package/dist/types/componentOptions.d.ts.map +1 -1
  337. package/dist/types/errors.d.ts +26 -4
  338. package/dist/types/errors.d.ts.map +1 -1
  339. package/dist/types/index.d.ts +115 -0
  340. package/dist/types/index.d.ts.map +1 -1
  341. package/dist/utils/cartHelpers.d.ts +3 -0
  342. package/dist/utils/cartHelpers.d.ts.map +1 -1
  343. package/dist/utils/cspHelper.d.ts +7 -1
  344. package/dist/utils/cspHelper.d.ts.map +1 -1
  345. package/dist/utils/csvHelpers.d.ts +62 -0
  346. package/dist/utils/csvHelpers.d.ts.map +1 -0
  347. package/dist/utils/csvHelpers.test.d.ts +2 -0
  348. package/dist/utils/csvHelpers.test.d.ts.map +1 -0
  349. package/dist/utils/dateHelpers.d.ts +24 -0
  350. package/dist/utils/dateHelpers.d.ts.map +1 -0
  351. package/dist/utils/eventEmitter.d.ts +1 -1
  352. package/dist/utils/eventEmitter.d.ts.map +1 -1
  353. package/dist/utils/fetchWithTimeout.d.ts +3 -3
  354. package/dist/utils/index.d.ts +2 -1
  355. package/dist/utils/index.d.ts.map +1 -1
  356. package/dist/utils/tokenMintValidator.d.ts +10 -6
  357. package/dist/utils/tokenMintValidator.d.ts.map +1 -1
  358. package/dist/utils/uuid.d.ts.map +1 -1
  359. package/dist/uuid-C5B8o31X.js +1 -0
  360. package/dist/uuid-_z3jSatJ.mjs +17 -0
  361. package/package.json +25 -9
  362. package/dist/CedrosContext-DbndTsTA.js +0 -11
  363. package/dist/en-C739WV_-.mjs +0 -19
  364. package/dist/en-Cz4OpvN-.js +0 -1
  365. package/dist/styles-DFcRS8Uu.mjs +0 -1626
  366. package/dist/styles-Dup9uK6S.js +0 -1
  367. package/dist/utils/uuid-shim.d.ts +0 -9
  368. package/dist/utils/uuid-shim.d.ts.map +0 -1
  369. package/dist/uuid-C0iMjdcc.js +0 -1
  370. package/dist/uuid-UlzrVY8Y.mjs +0 -17
  371. package/dist/walletDetection-JZR3UCOa.mjs +0 -27
  372. package/dist/walletDetection-bNmV5ItZ.js +0 -1
package/README.md CHANGED
@@ -5,19 +5,26 @@
5
5
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.4-blue.svg)](https://www.typescriptlang.org/)
6
6
  [![Bundle Size](https://img.shields.io/bundlephobia/minzip/@cedros/pay-react)](https://bundlephobia.com/package/@cedros/pay-react)
7
7
  [![Stripe-only: <100KB](https://img.shields.io/badge/stripe--only-%3C100KB-success)]()
8
- [![Tests](https://img.shields.io/badge/tests-55%20passed-brightgreen)](https://github.com/CedrosPay/react)
8
+ [![Tests](https://img.shields.io/badge/tests-55%20passed-brightgreen)](https://github.com/conorholds/cedros-pay/tree/main/ui)
9
9
 
10
- > **Add crypto to your store without building crypto.**
10
+ > **Three payment rails. One React component.**
11
11
 
12
- One React component for Stripe and Solana USDC. Uses your existing products. No deposit wallets. No monitoring. No custom crypto backend.
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, two payment rails.** Stripe for cards, Solana USDC for wallets. No second checkout.
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, Two Rails
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
- // Both payment methods work
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 Wallet
108
+ ### 4. Auto-Detects Payment Options
102
109
 
103
- No wallet: card only. Wallet: card and crypto.
110
+ Shows available payment methods based on user context.
104
111
 
105
112
  ```tsx
106
- // User without wallet sees:
107
- [Pay with Card] button
113
+ // User without wallet, not logged in:
114
+ [Pay with Card]
108
115
 
109
- // User with Phantom sees:
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. Self-Host or Roll Your Own
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 + Go backend. Open API.
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 Go APIs
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 dual payments.
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 Go server, or implement the open API.
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/CedrosPay/server)
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/CedrosPay/react/tree/main/examples)
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
- go get github.com/cedros-pay/server
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/CedrosPay/server) and `@backend-migration-resource-leakage.md` for complete API reference and migration guide.
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 | Type | Description |
1431
- | ------------- | ---------------------------- | ----------------------------------- |
1432
- | `cardLabel` | `string` | Stripe button label |
1433
- | `cryptoLabel` | `string` | Crypto button label |
1434
- | `showCard` | `boolean` | Show Stripe button (default: true) |
1435
- | `showCrypto` | `boolean` | Show crypto button (default: true) |
1436
- | `layout` | `'vertical' \| 'horizontal'` | Button layout (default: 'vertical') |
1437
- | `className` | `string` | Custom CSS class |
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 | Description |
1442
- | ------------------ | ---------------------------------------- | ---------------------------- |
1443
- | `onPaymentSuccess` | `(result: PaymentSuccessResult) => void` | Called on successful payment |
1444
- | `onPaymentError` | `(error: PaymentErrorDetail) => void` | Called on payment error |
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/CedrosPay/react/tree/main/stories)
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