@1sat/react 0.0.3 → 0.0.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.
Files changed (2) hide show
  1. package/dist/index.js +14 -12
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  // src/index.ts
2
4
  export * from "@1sat/connect";
3
5
 
@@ -13,7 +15,7 @@ import {
13
15
  useMemo,
14
16
  useState
15
17
  } from "react";
16
- import { jsxDEV } from "react/jsx-dev-runtime";
18
+ import { jsx } from "react/jsx-runtime";
17
19
  "use client";
18
20
  var OneSatContext = createContext(null);
19
21
  function OneSatProvider({
@@ -106,10 +108,10 @@ function OneSatProvider({
106
108
  disconnect,
107
109
  error
108
110
  ]);
109
- return /* @__PURE__ */ jsxDEV(OneSatContext.Provider, {
111
+ return /* @__PURE__ */ jsx(OneSatContext.Provider, {
110
112
  value,
111
113
  children
112
- }, undefined, false, undefined, this);
114
+ });
113
115
  }
114
116
  function useOneSatContext() {
115
117
  const context = useContext(OneSatContext);
@@ -325,7 +327,7 @@ function useCancelListing() {
325
327
  return { cancelListing, isLoading, error };
326
328
  }
327
329
  // src/ConnectButton.tsx
328
- import { jsxDEV as jsxDEV2, Fragment } from "react/jsx-dev-runtime";
330
+ import { jsx as jsx2, Fragment } from "react/jsx-runtime";
329
331
  "use client";
330
332
  function truncateAddress(address) {
331
333
  if (address.length <= 12)
@@ -368,7 +370,7 @@ function ConnectButton({
368
370
  }
369
371
  };
370
372
  if (children) {
371
- return /* @__PURE__ */ jsxDEV2(Fragment, {
373
+ return /* @__PURE__ */ jsx2(Fragment, {
372
374
  children: children({
373
375
  isConnected,
374
376
  isConnecting,
@@ -376,34 +378,34 @@ function ConnectButton({
376
378
  connect,
377
379
  disconnect
378
380
  })
379
- }, undefined, false, undefined, this);
381
+ });
380
382
  }
381
383
  if (isConnecting) {
382
- return /* @__PURE__ */ jsxDEV2("button", {
384
+ return /* @__PURE__ */ jsx2("button", {
383
385
  className,
384
386
  style,
385
387
  disabled: true,
386
388
  type: "button",
387
389
  children: connectingLabel
388
- }, undefined, false, undefined, this);
390
+ });
389
391
  }
390
392
  if (isConnected) {
391
393
  const label = typeof connectedLabel === "function" ? connectedLabel(paymentAddress ?? "") : connectedLabel ?? truncateAddress(paymentAddress ?? "");
392
- return /* @__PURE__ */ jsxDEV2("button", {
394
+ return /* @__PURE__ */ jsx2("button", {
393
395
  className,
394
396
  style,
395
397
  onClick: disconnectOnClick ? disconnect : undefined,
396
398
  type: "button",
397
399
  children: label
398
- }, undefined, false, undefined, this);
400
+ });
399
401
  }
400
- return /* @__PURE__ */ jsxDEV2("button", {
402
+ return /* @__PURE__ */ jsx2("button", {
401
403
  className,
402
404
  style,
403
405
  onClick: connect,
404
406
  type: "button",
405
407
  children: connectLabel
406
- }, undefined, false, undefined, this);
408
+ });
407
409
  }
408
410
  export {
409
411
  useUtxos,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/react",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "React hooks and components for 1Sat wallet integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "files": ["dist"],
15
15
  "scripts": {
16
- "build": "bun build ./src/index.ts --outdir ./dist --target browser --external react --external @1sat/connect && tsc --emitDeclarationOnly",
16
+ "build": "bun run build.ts && tsc --emitDeclarationOnly",
17
17
  "dev": "tsc --watch"
18
18
  },
19
19
  "keywords": ["1sat", "bsv", "ordinals", "wallet", "sdk", "react", "hooks"],