@usequota/nextjs 0.2.0 → 0.2.1

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
@@ -1,6 +1,6 @@
1
1
  # @usequota/nextjs
2
2
 
3
- Next.js SDK for [Quota](https://quota.io) - AI credit wallet and multi-provider inference API.
3
+ Next.js SDK for [Quota](https://usequota.app) - AI credit wallet and multi-provider inference API.
4
4
 
5
5
  ## Installation
6
6
 
@@ -106,7 +106,7 @@ export function MyComponent() {
106
106
  return (
107
107
  <div>
108
108
  <p>Welcome, {user.email}!</p>
109
- <p>Balance: {user.balance} credits</p>
109
+ <p>Balance: ${(user.balance / 1_000_000).toFixed(2)}</p>
110
110
  </div>
111
111
  );
112
112
  }
package/dist/index.d.mts CHANGED
@@ -223,7 +223,7 @@ declare function useQuota(): QuotaContextValue;
223
223
  * return (
224
224
  * <div>
225
225
  * <p>Email: {user.email}</p>
226
- * <p>Balance: {user.balance} credits</p>
226
+ * <p>Balance: ${(user.balance / 1_000_000).toFixed(2)}</p>
227
227
  * </div>
228
228
  * );
229
229
  * }
@@ -255,7 +255,9 @@ declare function useQuotaAuth(): {
255
255
  logout: () => Promise<void>;
256
256
  };
257
257
  /**
258
- * Hook to get user's credit balance
258
+ * Hook to get user's credit balance.
259
+ * Balance is in micro-dollars (1 unit = $0.000001).
260
+ * To convert to USD: balance / 1_000_000
259
261
  *
260
262
  * @example
261
263
  * ```tsx
@@ -270,7 +272,7 @@ declare function useQuotaAuth(): {
270
272
  *
271
273
  * return (
272
274
  * <div>
273
- * Balance: {balance} credits (${(balance / 100).toFixed(2)})
275
+ * Balance: ${(balance / 1_000_000).toFixed(2)}
274
276
  * </div>
275
277
  * );
276
278
  * }
package/dist/index.d.ts CHANGED
@@ -223,7 +223,7 @@ declare function useQuota(): QuotaContextValue;
223
223
  * return (
224
224
  * <div>
225
225
  * <p>Email: {user.email}</p>
226
- * <p>Balance: {user.balance} credits</p>
226
+ * <p>Balance: ${(user.balance / 1_000_000).toFixed(2)}</p>
227
227
  * </div>
228
228
  * );
229
229
  * }
@@ -255,7 +255,9 @@ declare function useQuotaAuth(): {
255
255
  logout: () => Promise<void>;
256
256
  };
257
257
  /**
258
- * Hook to get user's credit balance
258
+ * Hook to get user's credit balance.
259
+ * Balance is in micro-dollars (1 unit = $0.000001).
260
+ * To convert to USD: balance / 1_000_000
259
261
  *
260
262
  * @example
261
263
  * ```tsx
@@ -270,7 +272,7 @@ declare function useQuotaAuth(): {
270
272
  *
271
273
  * return (
272
274
  * <div>
273
- * Balance: {balance} credits (${(balance / 100).toFixed(2)})
275
+ * Balance: ${(balance / 1_000_000).toFixed(2)}
274
276
  * </div>
275
277
  * );
276
278
  * }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usequota/nextjs",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Next.js SDK for Quota — AI credit billing middleware, hooks, and components",
5
5
  "license": "MIT",
6
6
  "repository": {