@moneydevkit/replit 0.9.0-beta.3 → 0.9.0-beta.4
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 +4 -0
- package/dist/hooks/useCustomer.d.ts +2 -0
- package/dist/hooks/useCustomer.js +2 -0
- package/dist/hooks/useCustomer.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -179,6 +179,10 @@ function ProductPage() {
|
|
|
179
179
|
- **`type: 'AMOUNT'`** - For donations, tips, or custom amounts. Requires `amount` field.
|
|
180
180
|
- **`type: 'PRODUCTS'`** - For selling products. Requires `product` field with a product ID. Amount is calculated from product price.
|
|
181
181
|
|
|
182
|
+
> **Note:** Product prices are returned in base currency units:
|
|
183
|
+
> - **USD**: cents (divide by 100 for dollars)
|
|
184
|
+
> - **SAT**: satoshis (no conversion needed)
|
|
185
|
+
|
|
182
186
|
### Pay What You Want (CUSTOM prices)
|
|
183
187
|
Products can have CUSTOM prices that let customers choose their own amount. When a checkout includes a product with a CUSTOM price, the checkout UI automatically shows an amount input field:
|
|
184
188
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCustomer.js","sourceRoot":"","sources":["../../src/hooks/useCustomer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,6 @@ export type { CheckoutProps } from './components/Checkout';
|
|
|
3
3
|
export { useCheckout } from './hooks/useCheckout';
|
|
4
4
|
export { useCheckoutSuccess } from './hooks/useCheckoutSuccess';
|
|
5
5
|
export { useProducts } from './hooks/useProducts';
|
|
6
|
+
export { useCustomer } from './hooks/useCustomer';
|
|
7
|
+
export type { CustomerIdentifier, CustomerData, UseCustomerOptions } from './hooks/useCustomer';
|
|
6
8
|
export type { MdkError, Result } from '@moneydevkit/core/client';
|
package/dist/index.js
CHANGED
|
@@ -2,4 +2,5 @@ export { Checkout } from './components/Checkout';
|
|
|
2
2
|
export { useCheckout } from './hooks/useCheckout';
|
|
3
3
|
export { useCheckoutSuccess } from './hooks/useCheckoutSuccess';
|
|
4
4
|
export { useProducts } from './hooks/useProducts';
|
|
5
|
+
export { useCustomer } from './hooks/useCustomer';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneydevkit/replit",
|
|
3
|
-
"version": "0.9.0-beta.
|
|
3
|
+
"version": "0.9.0-beta.4",
|
|
4
4
|
"description": "Money Dev Kit checkout package for Replit (Vite + Express).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"react-dom": "^18 || ^19"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@moneydevkit/core": "0.9.0-beta.
|
|
43
|
+
"@moneydevkit/core": "0.9.0-beta.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/express": "^4.17.21",
|