@moneydevkit/nextjs 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 CHANGED
@@ -189,6 +189,10 @@ function ProductPage() {
189
189
  - **`type: 'AMOUNT'`** - For donations, tips, or custom amounts. Requires `amount` field.
190
190
  - **`type: 'PRODUCTS'`** - For selling products. Requires `product` field with a product ID. Amount is calculated from product price.
191
191
 
192
+ > **Note:** Product prices are returned in base currency units:
193
+ > - **USD**: cents (divide by 100 for dollars)
194
+ > - **SAT**: satoshis (no conversion needed)
195
+
192
196
  ### Pay What You Want (CUSTOM prices)
193
197
  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:
194
198
 
@@ -0,0 +1,2 @@
1
+ export { useCustomer } from '@moneydevkit/core/client';
2
+ export type { CustomerIdentifier, CustomerData, UseCustomerOptions } from '@moneydevkit/core/client';
@@ -0,0 +1,3 @@
1
+ 'use client';
2
+ export { useCustomer } from '@moneydevkit/core/client';
3
+ //# sourceMappingURL=useCustomer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCustomer.js","sourceRoot":"","sources":["../../src/hooks/useCustomer.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,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/nextjs",
3
- "version": "0.9.0-beta.3",
3
+ "version": "0.9.0-beta.4",
4
4
  "title": "@moneydevkit/nextjs",
5
5
  "description": "moneydevkit checkout components for Next.js.",
6
6
  "repository": {
@@ -55,8 +55,8 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@hookform/resolvers": "^5.0.1",
58
- "@moneydevkit/api-contract": "^0.1.17",
59
- "@moneydevkit/core": "0.9.0-beta.3",
58
+ "@moneydevkit/api-contract": "^0.1.21",
59
+ "@moneydevkit/core": "0.9.0-beta.4",
60
60
  "@moneydevkit/lightning-js": "^0.1.65",
61
61
  "@orpc/client": "1.3.0",
62
62
  "@orpc/contract": "1.3.0",