@donotdev/billing 0.0.4 → 0.0.5
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/dist/components/StripeCheckoutButton.d.ts.map +1 -1
- package/dist/components/StripeCheckoutButton.js +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/useStripeBilling.d.ts.map +1 -1
- package/dist/useStripeBilling.js +1 -1
- package/package.json +5 -5
- package/dist/components/PaymentRedirectOverlay.d.ts +0 -23
- package/dist/components/PaymentRedirectOverlay.d.ts.map +0 -1
- package/dist/components/PaymentRedirectOverlay.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StripeCheckoutButton.d.ts","sourceRoot":"","sources":["../../src/components/StripeCheckoutButton.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"StripeCheckoutButton.d.ts","sourceRoot":"","sources":["../../src/components/StripeCheckoutButton.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CACrD,WAAW,EACX,SAAS,GAAG,UAAU,GAAG,SAAS,CACnC;IACC,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,4BAA4B;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,yCAAyC;IACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,OAAO,EACP,IAAI,EACJ,UAAU,EACV,SAAS,EACT,QAAa,EACb,mBAA0B,EAC1B,OAAmB,EACnB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,GAAG,WAAW,EACf,EAAE,yBAAyB,2CAmF3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i,Fragment as
|
|
1
|
+
import{jsx as i,Fragment as w}from"react/jsx-runtime";import{Button as x,cn as y}from"@donotdev/components";import{useTranslation as E,redirectToExternalUrlWithErrorHandling as F}from"@donotdev/core";import{useStripeBilling as c}from"../useStripeBilling";function R({configKey:n,priceId:l,mode:r,successUrl:a,cancelUrl:u,metadata:d={},allowPromotionCodes:p=!0,variant:h="primary",className:g,disabled:s,loadingText:k,icon:m,children:C,onError:f,...B}){const{t:o}=E("billing"),b=c("checkout"),e=c("status")==="initializing",S=k||o("components.buttons.processing"),U=C||o(r==="payment"?"components.buttons.purchase":"components.buttons.subscribe");return i(w,{children:i(x,{...B,onClick:async()=>{if(!(e||s))try{const t=await b({priceId:l,mode:r,successUrl:a,cancelUrl:u,metadata:{...n&&{billingConfigKey:n},...d},allowPromotionCodes:p});t.sessionUrl&&await F(t.sessionUrl,{},"Failed to redirect to payment page")}catch(t){f?.(t instanceof Error?t:new Error("Checkout failed"))}},disabled:s||e,variant:h,className:y("dndev-w-full",g),icon:m,children:e?S:U})})}export{R as StripeCheckoutButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./
|
|
1
|
+
export*from"./ProductCard";export*from"./PurchaseButton";export*from"./SecurityNotice";export*from"./StripeCheckoutButton";export*from"./SubscriptionButton";export*from"./SubscriptionManager";
|
package/dist/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* @author AMBROISE PARK Consulting
|
|
7
7
|
*/
|
|
8
8
|
export { useStripeBilling, type BillingAuthState } from './useStripeBilling';
|
|
9
|
-
export {
|
|
9
|
+
export { ProductCard, SecurityNotice, StripeCheckoutButton, SubscriptionManager, } from './components';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAGH,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG7E,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAGH,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG7E,OAAO,EACL,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useStripeBilling as
|
|
1
|
+
import{useStripeBilling as e}from"./useStripeBilling";import{ProductCard as i,SecurityNotice as u,StripeCheckoutButton as c,SubscriptionManager as p}from"./components";export{i as ProductCard,u as SecurityNotice,c as StripeCheckoutButton,p as SubscriptionManager,e as useStripeBilling};
|