@lockerverse/react 0.2.168-dev.1 → 0.2.170
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/MIGRATIONS.md +14 -24
- package/README.md +2 -2
- package/dist/lockerverse-donate-launcher.d.ts.map +1 -1
- package/dist/lockerverse-donate-launcher.js +1 -1
- package/dist/lockerverse-donate-launcher.js.map +1 -1
- package/dist/lockerverse-payment.js +1 -1
- package/dist/lockerverse-payment.js.map +1 -1
- package/dist/payment-form.d.ts.map +1 -1
- package/dist/payment-summary.js +1 -1
- package/dist/payment-summary.js.map +1 -1
- package/guides/auctions.md +1 -1
- package/guides/events.md +1 -1
- package/guides/integration.md +1 -1
- package/guides/payment-widgets.md +4 -4
- package/guides/signup.md +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-form.d.ts","names":[],"sources":["../src/lockerverse-payment.tsx","../src/payment-form.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"payment-form.d.ts","names":[],"sources":["../src/lockerverse-payment.tsx","../src/payment-form.tsx"],"mappings":";;;;iBAwYgB,qBACd,WACG,aACF,0CAAuB,IAAA;;;iBC/UV,0BACd,SAAS,KAAK,iCAA8B,oCAAA"}
|
package/dist/payment-summary.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./format-money.js";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";function i({quote:i,displayedTipCents:a=i.tipCents,displayedTotalCents:o=i.totalCents,displayedBaseCents:s=o-a}){let c=null;i.paymentOption===`monthly`?c={label:`Monthly`}:i.paymentOption===`annually`&&(c={label:`
|
|
1
|
+
import{t as e}from"./format-money.js";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";function i({quote:i,displayedTipCents:a=i.tipCents,displayedTotalCents:o=i.totalCents,displayedBaseCents:s=o-a}){let c=null;i.paymentOption===`monthly`?c={label:`Monthly`}:i.paymentOption===`annually`?c={label:`Annual`}:i.paymentOption===`every-six-months`&&(c={label:`Every 6 months`});let l=Math.max(0,s-i.subtotalCents+i.discountCents);return r(`section`,{"aria-label":`Payment summary`,className:`lockerverse-payment__payment-summary`,children:[n(`h2`,{children:`Order summary`}),n(`div`,{className:`lockerverse-payment__payment-summary-items`,children:i.lineItems.map(i=>r(`div`,{className:`lockerverse-payment__payment-summary-row`,children:[r(`span`,{children:[i.productName,i.quantity>1?r(t,{children:[` `,r(`small`,{children:[`× `,i.quantity]})]}):null,i.paymentOption===`monthly`?n(`small`,{children:` · Monthly`}):null,i.paymentOption===`every-six-months`?n(`small`,{children:` · Every 6 months`}):null,i.paymentOption===`annually`?n(`small`,{children:` · Annual`}):null]}),n(`strong`,{children:e(i.subtotalCents)})]},i.listingId))}),r(`div`,{className:`lockerverse-payment__payment-summary-totals`,children:[l>0?r(`div`,{className:`lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-detail`,children:[n(`span`,{children:`Service fee`}),n(`strong`,{children:e(l)})]}):null,i.discountCents>0&&i.appliedDiscount?r(`div`,{className:`lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-discount`,children:[r(`span`,{children:[i.appliedDiscount.source===`email_list`?`Email discount`:`Promo code discount`,` `,`(`,i.appliedDiscount.percentageOff,`% off)`]}),r(`strong`,{children:[`-`,e(i.discountCents)]})]}):null,a>0?r(`div`,{className:`lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-detail lockerverse-payment__payment-summary-tip`,children:[n(`span`,{children:`Tip`}),n(`strong`,{children:e(a)})]}):null,r(`div`,{className:`lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-total`,children:[n(`span`,{children:c?`${c.label} total`:`Total`}),n(`strong`,{children:e(o)})]})]})]})}export{i as t};
|
|
2
2
|
//# sourceMappingURL=payment-summary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-summary.js","names":[],"sources":["../src/payment-summary.tsx"],"sourcesContent":["import type {\n LockerverseCheckoutEstimate,\n LockerversePreparedCheckout,\n} from \"@lockerverse/sdk/checkout\";\nimport { formatMoney } from \"./format-money.ts\";\n\nexport function PaymentSummary({\n quote,\n displayedTipCents = quote.tipCents,\n displayedTotalCents = quote.totalCents,\n displayedBaseCents = displayedTotalCents - displayedTipCents,\n}: {\n displayedBaseCents?: number;\n displayedTipCents?: number;\n displayedTotalCents?: number;\n quote: LockerverseCheckoutEstimate | LockerversePreparedCheckout;\n}) {\n let cadence: { label: string } | null = null;\n if (quote.paymentOption === \"monthly\") {\n cadence = { label: \"Monthly\" };\n } else if (quote.paymentOption === \"annually\") {\n cadence = { label: \"Annual\" };\n }\n const displayedServiceFeeCents = Math.max(\n 0,\n displayedBaseCents - quote.subtotalCents + quote.discountCents\n );\n return (\n <section\n aria-label=\"Payment summary\"\n className=\"lockerverse-payment__payment-summary\"\n >\n <h2>Order summary</h2>\n <div className=\"lockerverse-payment__payment-summary-items\">\n {quote.lineItems.map((item) => (\n <div\n className=\"lockerverse-payment__payment-summary-row\"\n key={item.listingId}\n >\n <span>\n {item.productName}\n {item.quantity > 1 ? (\n <>\n {\" \"}\n <small>× {item.quantity}</small>\n </>\n ) : null}\n {item.paymentOption === \"monthly\" ? (\n <small> · Monthly</small>\n ) : null}\n {item.paymentOption === \"annually\" ? (\n <small> · Annual</small>\n ) : null}\n </span>\n <strong>{formatMoney(item.subtotalCents)}</strong>\n </div>\n ))}\n </div>\n <div className=\"lockerverse-payment__payment-summary-totals\">\n {displayedServiceFeeCents > 0 ? (\n <div className=\"lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-detail\">\n <span>Service fee</span>\n <strong>{formatMoney(displayedServiceFeeCents)}</strong>\n </div>\n ) : null}\n {quote.discountCents > 0 && quote.appliedDiscount ? (\n <div className=\"lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-discount\">\n <span>\n {quote.appliedDiscount.source === \"email_list\"\n ? \"Email discount\"\n : \"Promo code discount\"}{\" \"}\n ({quote.appliedDiscount.percentageOff}% off)\n </span>\n <strong>-{formatMoney(quote.discountCents)}</strong>\n </div>\n ) : null}\n {displayedTipCents > 0 ? (\n <div className=\"lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-detail lockerverse-payment__payment-summary-tip\">\n <span>Tip</span>\n <strong>{formatMoney(displayedTipCents)}</strong>\n </div>\n ) : null}\n <div className=\"lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-total\">\n <span>{cadence ? `${cadence.label} total` : \"Total\"}</span>\n <strong>{formatMoney(displayedTotalCents)}</strong>\n </div>\n </div>\n </section>\n );\n}\n"],"mappings":"sGAMA,SAAgB,EAAe,CAC7B,QACA,oBAAoB,EAAM,SAC1B,sBAAsB,EAAM,WAC5B,qBAAqB,EAAsB,GAM1C,CACD,IAAI,EAAoC,KACpC,EAAM,gBAAkB,UAC1B,EAAU,CAAE,MAAO,SAAU,EACpB,EAAM,gBAAkB,
|
|
1
|
+
{"version":3,"file":"payment-summary.js","names":[],"sources":["../src/payment-summary.tsx"],"sourcesContent":["import type {\n LockerverseCheckoutEstimate,\n LockerversePreparedCheckout,\n} from \"@lockerverse/sdk/checkout\";\nimport { formatMoney } from \"./format-money.ts\";\n\nexport function PaymentSummary({\n quote,\n displayedTipCents = quote.tipCents,\n displayedTotalCents = quote.totalCents,\n displayedBaseCents = displayedTotalCents - displayedTipCents,\n}: {\n displayedBaseCents?: number;\n displayedTipCents?: number;\n displayedTotalCents?: number;\n quote: LockerverseCheckoutEstimate | LockerversePreparedCheckout;\n}) {\n let cadence: { label: string } | null = null;\n if (quote.paymentOption === \"monthly\") {\n cadence = { label: \"Monthly\" };\n } else if (quote.paymentOption === \"annually\") {\n cadence = { label: \"Annual\" };\n } else if (quote.paymentOption === \"every-six-months\") {\n cadence = { label: \"Every 6 months\" };\n }\n const displayedServiceFeeCents = Math.max(\n 0,\n displayedBaseCents - quote.subtotalCents + quote.discountCents\n );\n return (\n <section\n aria-label=\"Payment summary\"\n className=\"lockerverse-payment__payment-summary\"\n >\n <h2>Order summary</h2>\n <div className=\"lockerverse-payment__payment-summary-items\">\n {quote.lineItems.map((item) => (\n <div\n className=\"lockerverse-payment__payment-summary-row\"\n key={item.listingId}\n >\n <span>\n {item.productName}\n {item.quantity > 1 ? (\n <>\n {\" \"}\n <small>× {item.quantity}</small>\n </>\n ) : null}\n {item.paymentOption === \"monthly\" ? (\n <small> · Monthly</small>\n ) : null}\n {item.paymentOption === \"every-six-months\" ? (\n <small> · Every 6 months</small>\n ) : null}\n {item.paymentOption === \"annually\" ? (\n <small> · Annual</small>\n ) : null}\n </span>\n <strong>{formatMoney(item.subtotalCents)}</strong>\n </div>\n ))}\n </div>\n <div className=\"lockerverse-payment__payment-summary-totals\">\n {displayedServiceFeeCents > 0 ? (\n <div className=\"lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-detail\">\n <span>Service fee</span>\n <strong>{formatMoney(displayedServiceFeeCents)}</strong>\n </div>\n ) : null}\n {quote.discountCents > 0 && quote.appliedDiscount ? (\n <div className=\"lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-discount\">\n <span>\n {quote.appliedDiscount.source === \"email_list\"\n ? \"Email discount\"\n : \"Promo code discount\"}{\" \"}\n ({quote.appliedDiscount.percentageOff}% off)\n </span>\n <strong>-{formatMoney(quote.discountCents)}</strong>\n </div>\n ) : null}\n {displayedTipCents > 0 ? (\n <div className=\"lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-detail lockerverse-payment__payment-summary-tip\">\n <span>Tip</span>\n <strong>{formatMoney(displayedTipCents)}</strong>\n </div>\n ) : null}\n <div className=\"lockerverse-payment__payment-summary-row lockerverse-payment__payment-summary-total\">\n <span>{cadence ? `${cadence.label} total` : \"Total\"}</span>\n <strong>{formatMoney(displayedTotalCents)}</strong>\n </div>\n </div>\n </section>\n );\n}\n"],"mappings":"sGAMA,SAAgB,EAAe,CAC7B,QACA,oBAAoB,EAAM,SAC1B,sBAAsB,EAAM,WAC5B,qBAAqB,EA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,EAAC,MAAD,CAAK,UAAU,yFAAf,SAAA,CACE,EAAC,OAAD,CAAA,SAAA,CACG,EAAM,gBAAgB,SAAW,aAC9B,iBACA,sBAAuB,IAAI,IAC7B,EAAM,gBAAgB,cAAc,QAClC,CAAA,CAAA,EACN,EAAC,SAAD,CAAA,SAAA,CAAQ,IAAE,EAAY,EAAM,aAAa,CAAU,CAAA,CAAA,CAChD,CACH,CAAA,EAAA,KACH,EAAoB,EACnB,EAAC,MAAD,CAAK,UAAU,gIAAf,SAAA,CACE,EAAC,OAAD,CAAA,SAAM,KAAS,CAAA,EACf,EAAC,SAAD,CAAA,SAAS,EAAY,CAAiB,CAAU,CAAA,CAC7C,CACH,CAAA,EAAA,KACJ,EAAC,MAAD,CAAK,UAAU,sFAAf,SAAA,CACE,EAAC,OAAD,CAAA,SAAO,EAAU,GAAG,EAAQ,MAAM,QAAU,OAAc,CAAA,EAC1D,EAAC,SAAD,CAAA,SAAS,EAAY,CAAmB,CAAU,CAAA,CAC/C,GACF,GACE,GAEb"}
|
package/guides/auctions.md
CHANGED
package/guides/events.md
CHANGED
package/guides/integration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lockerverse payment-widgets guide
|
|
2
2
|
|
|
3
|
-
Package: @lockerverse/react@0.2.
|
|
3
|
+
Package: @lockerverse/react@0.2.170
|
|
4
4
|
|
|
5
5
|
Generated from this release's maintained documentation. Do not edit this copy.
|
|
6
6
|
|
|
@@ -37,7 +37,7 @@ cart, quantities, selected tier, and entered amounts. Names, prices, limits,
|
|
|
37
37
|
recurring cadence, inventory, and shared capacity come from the live catalog.
|
|
38
38
|
|
|
39
39
|
For separate product buttons, select the matching product. For a cart with one
|
|
40
|
-
pay button, combine only one-time products. Monthly and annual products require
|
|
40
|
+
pay button, combine only one-time products. Monthly, six-month, and annual products require
|
|
41
41
|
an exclusive single-product flow; never combine them with each other or a
|
|
42
42
|
one-time cart. Disable checkout when no product is selected or a value violates
|
|
43
43
|
live limits. Local totals are feedback only; Lockerverse decides the final
|
|
@@ -195,7 +195,7 @@ requires the current authoritative quote.
|
|
|
195
195
|
This small example shows fixed-price Products. For a custom-price Product, ask
|
|
196
196
|
for the amount in the host UI and pass `amountCents` with `productSlug`.
|
|
197
197
|
|
|
198
|
-
For a monthly or annual Product, omit quantity. The component shows the
|
|
198
|
+
For a monthly, six-month, or annual Product, omit quantity. The component shows the
|
|
199
199
|
cadence and configures Stripe Elements for a subscription:
|
|
200
200
|
|
|
201
201
|
```tsx
|
|
@@ -246,7 +246,7 @@ closes. Closing a dialog does not complete or cancel a payment.
|
|
|
246
246
|
React dialog. The launcher selects its controls from each Product's existing
|
|
247
247
|
capabilities. Visitors can set quantities for fixed one-time Products and add
|
|
248
248
|
an inline amount for custom one-time Products. The launcher combines these
|
|
249
|
-
one-time choices in one checkout. Monthly and annual Products are exclusive:
|
|
249
|
+
one-time choices in one checkout. Monthly, six-month, and annual Products are exclusive:
|
|
250
250
|
the visitor selects one tier before the same `LockerversePayment` form opens in
|
|
251
251
|
subscription mode.
|
|
252
252
|
|
package/guides/signup.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lockerverse/react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.170",
|
|
4
4
|
"description": "Tree-shakable React payment and signup UI for Lockerverse",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"embla-carousel-react": "8.6.0",
|
|
137
137
|
"lucide-react": "0.536.0",
|
|
138
138
|
"valibot": "1.4.2",
|
|
139
|
-
"@lockerverse/sdk": "0.2.
|
|
139
|
+
"@lockerverse/sdk": "0.2.170"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
142
|
"@size-limit/file": "13.0.3",
|