@1sat/sweep-ui 0.0.39 → 0.0.40
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-preview.d.ts","sourceRoot":"","sources":["../../src/components/asset-preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"asset-preview.d.ts","sourceRoot":"","sources":["../../src/components/asset-preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAwFnE,wBAAgB,cAAc,CAAC,EAC9B,OAAO,EACP,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,eAAe,GACf,EAAE;IACF,OAAO,EAAE,aAAa,EAAE,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACpD,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,eAAe,EAAE,OAAO,CAAA;CACxB,kDA0FA;AAED,wBAAgB,eAAe,CAAC,EAC/B,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,aAAa,EACb,OAAO,EACP,MAAM,EACN,MAAM,EACN,eAAe,GACf,EAAE;IACF,QAAQ,EAAE,eAAe,EAAE,CAAA;IAC3B,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC7B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,eAAe,EAAE,OAAO,CAAA;CACxB,kDA0IA;AAgED,wBAAgB,YAAY,CAAC,EAC5B,MAAM,EACN,OAAO,EACP,eAAe,GACf,EAAE;IACF,MAAM,EAAE,YAAY,EAAE,CAAA;IACtB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,eAAe,EAAE,OAAO,CAAA;CACxB,kDAuCA;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,aAAa,EAAE,CAAA;CAAE,kDAkCnE;AAED,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,aAAa,EAAE,CAAA;CAAE,kDAgBpE;AAED,wBAAgB,UAAU,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,EAAE,aAAa,EAAE,CAAA;CAAE,kDAkB3D"}
|
package/dist/index.js
CHANGED
|
@@ -520,7 +520,7 @@ function OrdinalCard({
|
|
|
520
520
|
const isImage = isImageType(ct);
|
|
521
521
|
const subtype = ct.includes("/") ? ct.split("/")[1] : ct;
|
|
522
522
|
return /* @__PURE__ */ jsxs("div", {
|
|
523
|
-
className: `relative p-2 rounded-lg border cursor-pointer transition-all ${isSelected ? "border-blue-500 bg-blue-500/10 ring-1 ring-blue-500/30" : "border-border/50 hover:border-border bg-
|
|
523
|
+
className: `relative p-2 rounded-lg border cursor-pointer transition-all overflow-hidden ${isSelected ? "border-blue-500 bg-blue-500/10 ring-1 ring-blue-500/30" : "border-border/50 hover:border-border bg-muted/30"}`,
|
|
524
524
|
onClick: onToggle,
|
|
525
525
|
children: [
|
|
526
526
|
/* @__PURE__ */ jsx4("div", {
|
|
@@ -531,7 +531,7 @@ function OrdinalCard({
|
|
|
531
531
|
})
|
|
532
532
|
}),
|
|
533
533
|
/* @__PURE__ */ jsx4("div", {
|
|
534
|
-
className: "w-full aspect-square mb-1.5 rounded overflow-hidden bg-
|
|
534
|
+
className: "w-full aspect-square mb-1.5 rounded overflow-hidden bg-muted/40 flex items-center justify-center",
|
|
535
535
|
children: !ordinal.contentUrl ? /* @__PURE__ */ jsx4("span", {
|
|
536
536
|
className: "text-muted-foreground text-lg",
|
|
537
537
|
children: "◆"
|
|
@@ -548,28 +548,35 @@ function OrdinalCard({
|
|
|
548
548
|
loading: "lazy"
|
|
549
549
|
})
|
|
550
550
|
}),
|
|
551
|
-
|
|
552
|
-
className: "
|
|
553
|
-
children: /* @__PURE__ */ jsx4("span", {
|
|
554
|
-
className: "px-1 py-0.5 text-[9px] rounded bg-blue-500/20 text-blue-400 truncate",
|
|
555
|
-
children: subtype
|
|
556
|
-
})
|
|
557
|
-
}),
|
|
558
|
-
ordinal.name ? /* @__PURE__ */ jsx4("a", {
|
|
559
|
-
href: ordinal.contentUrl,
|
|
560
|
-
target: "_blank",
|
|
561
|
-
rel: "noopener noreferrer",
|
|
562
|
-
className: "text-[10px] text-foreground truncate font-medium hover:text-blue-400",
|
|
563
|
-
title: ordinal.name,
|
|
564
|
-
children: ordinal.name
|
|
565
|
-
}) : /* @__PURE__ */ jsxs("a", {
|
|
566
|
-
href: ordinal.contentUrl,
|
|
567
|
-
target: "_blank",
|
|
568
|
-
rel: "noopener noreferrer",
|
|
569
|
-
className: "text-[9px] text-muted-foreground truncate font-mono hover:text-blue-400",
|
|
551
|
+
/* @__PURE__ */ jsxs("div", {
|
|
552
|
+
className: "min-h-[2rem] flex flex-col justify-end",
|
|
570
553
|
children: [
|
|
571
|
-
|
|
572
|
-
|
|
554
|
+
subtype && /* @__PURE__ */ jsx4("div", {
|
|
555
|
+
className: "mb-1",
|
|
556
|
+
children: /* @__PURE__ */ jsx4("span", {
|
|
557
|
+
className: "inline-block max-w-full px-1 py-0.5 text-[9px] rounded bg-blue-500/20 text-blue-400 truncate",
|
|
558
|
+
children: subtype
|
|
559
|
+
})
|
|
560
|
+
}),
|
|
561
|
+
ordinal.name ? /* @__PURE__ */ jsx4("a", {
|
|
562
|
+
href: ordinal.contentUrl,
|
|
563
|
+
target: "_blank",
|
|
564
|
+
rel: "noopener noreferrer",
|
|
565
|
+
className: "block text-[10px] text-foreground truncate font-medium hover:text-blue-400",
|
|
566
|
+
title: ordinal.name,
|
|
567
|
+
onClick: (e) => e.stopPropagation(),
|
|
568
|
+
children: ordinal.name
|
|
569
|
+
}) : /* @__PURE__ */ jsxs("a", {
|
|
570
|
+
href: ordinal.contentUrl,
|
|
571
|
+
target: "_blank",
|
|
572
|
+
rel: "noopener noreferrer",
|
|
573
|
+
className: "block text-[9px] text-muted-foreground truncate font-mono hover:text-blue-400",
|
|
574
|
+
onClick: (e) => e.stopPropagation(),
|
|
575
|
+
children: [
|
|
576
|
+
ordinal.outpoint.substring(0, 8),
|
|
577
|
+
"..."
|
|
578
|
+
]
|
|
579
|
+
})
|
|
573
580
|
]
|
|
574
581
|
})
|
|
575
582
|
]
|
|
@@ -783,7 +790,7 @@ function OrdinalsSection({
|
|
|
783
790
|
]
|
|
784
791
|
}),
|
|
785
792
|
/* @__PURE__ */ jsx4("div", {
|
|
786
|
-
className: "grid grid-cols-3 sm:grid-cols-4
|
|
793
|
+
className: "grid grid-cols-3 sm:grid-cols-4 gap-2 mb-3",
|
|
787
794
|
children: pageItems.map((ord) => /* @__PURE__ */ jsx4(OrdinalCard, {
|
|
788
795
|
ordinal: ord,
|
|
789
796
|
isSelected: selectedOrdinals.has(ord.outpoint),
|
|
@@ -876,7 +883,7 @@ function TokenRow({
|
|
|
876
883
|
walletConnected
|
|
877
884
|
}) {
|
|
878
885
|
return /* @__PURE__ */ jsxs("div", {
|
|
879
|
-
className: `flex items-center justify-between p-3 rounded-lg border ${tb.isActive ? "bg-
|
|
886
|
+
className: `flex items-center justify-between p-3 rounded-lg border ${tb.isActive ? "bg-muted/30 border-purple-500/10" : "bg-muted/20 border-muted/20 opacity-60"}`,
|
|
880
887
|
children: [
|
|
881
888
|
/* @__PURE__ */ jsxs("div", {
|
|
882
889
|
className: "flex items-center gap-3",
|
|
@@ -1322,7 +1329,7 @@ function OpnsSection({
|
|
|
1322
1329
|
const isSelected = selectedOpns.has(item.outpoint);
|
|
1323
1330
|
const displayName = resolvedNames.get(item.outpoint) ?? item.outpoint.substring(0, 8) + "...";
|
|
1324
1331
|
return /* @__PURE__ */ jsxs3("div", {
|
|
1325
|
-
className: `flex items-center gap-3 px-3 py-2 rounded-lg cursor-pointer transition-all ${isSelected ? "border border-orange-500 bg-orange-500/10 ring-1 ring-orange-500/30" : "border border-border/50 hover:border-border bg-
|
|
1332
|
+
className: `flex items-center gap-3 px-3 py-2 rounded-lg cursor-pointer transition-all ${isSelected ? "border border-orange-500 bg-orange-500/10 ring-1 ring-orange-500/30" : "border border-border/50 hover:border-border bg-muted/30"}`,
|
|
1326
1333
|
onClick: () => onToggle(item.outpoint),
|
|
1327
1334
|
children: [
|
|
1328
1335
|
/* @__PURE__ */ jsx6("div", {
|
|
@@ -1506,7 +1513,7 @@ function Tabs({
|
|
|
1506
1513
|
function TabsList({ className, ...props }) {
|
|
1507
1514
|
return /* @__PURE__ */ jsx8("div", {
|
|
1508
1515
|
"data-slot": "tabs-list",
|
|
1509
|
-
className: cn("inline-flex h-9 items-center justify-start gap-1 rounded-lg bg-muted p-1 text-muted-foreground", className),
|
|
1516
|
+
className: cn("inline-flex h-9 items-center justify-start gap-1 rounded-lg bg-muted p-1 text-muted-foreground overflow-x-auto scrollbar-none", className),
|
|
1510
1517
|
...props
|
|
1511
1518
|
});
|
|
1512
1519
|
}
|
|
@@ -1520,7 +1527,7 @@ function TabsTrigger({
|
|
|
1520
1527
|
return /* @__PURE__ */ jsx8("button", {
|
|
1521
1528
|
"data-slot": "tabs-trigger",
|
|
1522
1529
|
"data-active": isActive ? "" : undefined,
|
|
1523
|
-
className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50", isActive && "bg-background text-foreground shadow-sm", className),
|
|
1530
|
+
className: cn("inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50", isActive && "bg-background text-foreground shadow-sm", className),
|
|
1524
1531
|
onClick: () => context.onValueChange(value),
|
|
1525
1532
|
...props
|
|
1526
1533
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1sat/sweep-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.40",
|
|
4
4
|
"description": "Sweep UI components for migrating legacy BSV assets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
],
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@1sat/actions": "0.0.
|
|
32
|
+
"@1sat/actions": "0.0.109",
|
|
33
33
|
"@1sat/client": "0.0.24",
|
|
34
|
-
"@1sat/connect": "0.0.
|
|
34
|
+
"@1sat/connect": "0.0.45",
|
|
35
35
|
"@1sat/types": "0.0.18",
|
|
36
36
|
"@1sat/utils": "0.0.15",
|
|
37
37
|
"bitcoin-backup": "^0.0.11",
|
|
@@ -23,7 +23,7 @@ function OrdinalCard({
|
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
25
|
<div
|
|
26
|
-
className={`relative p-2 rounded-lg border cursor-pointer transition-all ${isSelected ? 'border-blue-500 bg-blue-500/10 ring-1 ring-blue-500/30' : 'border-border/50 hover:border-border bg-
|
|
26
|
+
className={`relative p-2 rounded-lg border cursor-pointer transition-all overflow-hidden ${isSelected ? 'border-blue-500 bg-blue-500/10 ring-1 ring-blue-500/30' : 'border-border/50 hover:border-border bg-muted/30'}`}
|
|
27
27
|
onClick={onToggle}
|
|
28
28
|
>
|
|
29
29
|
<div className="absolute top-1.5 right-1.5 z-10">
|
|
@@ -33,7 +33,7 @@ function OrdinalCard({
|
|
|
33
33
|
{isSelected && '\u2713'}
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
|
-
<div className="w-full aspect-square mb-1.5 rounded overflow-hidden bg-
|
|
36
|
+
<div className="w-full aspect-square mb-1.5 rounded overflow-hidden bg-muted/40 flex items-center justify-center">
|
|
37
37
|
{!ordinal.contentUrl ? (
|
|
38
38
|
<span className="text-muted-foreground text-lg">{'\u25C6'}</span>
|
|
39
39
|
) : isImage ? (
|
|
@@ -53,33 +53,37 @@ function OrdinalCard({
|
|
|
53
53
|
/>
|
|
54
54
|
)}
|
|
55
55
|
</div>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
56
|
+
<div className="min-h-[2rem] flex flex-col justify-end">
|
|
57
|
+
{subtype && (
|
|
58
|
+
<div className="mb-1">
|
|
59
|
+
<span className="inline-block max-w-full px-1 py-0.5 text-[9px] rounded bg-blue-500/20 text-blue-400 truncate">
|
|
60
|
+
{subtype}
|
|
61
|
+
</span>
|
|
62
|
+
</div>
|
|
63
|
+
)}
|
|
64
|
+
{ordinal.name ? (
|
|
65
|
+
<a
|
|
66
|
+
href={ordinal.contentUrl}
|
|
67
|
+
target="_blank"
|
|
68
|
+
rel="noopener noreferrer"
|
|
69
|
+
className="block text-[10px] text-foreground truncate font-medium hover:text-blue-400"
|
|
70
|
+
title={ordinal.name}
|
|
71
|
+
onClick={(e) => e.stopPropagation()}
|
|
72
|
+
>
|
|
73
|
+
{ordinal.name}
|
|
74
|
+
</a>
|
|
75
|
+
) : (
|
|
76
|
+
<a
|
|
77
|
+
href={ordinal.contentUrl}
|
|
78
|
+
target="_blank"
|
|
79
|
+
rel="noopener noreferrer"
|
|
80
|
+
className="block text-[9px] text-muted-foreground truncate font-mono hover:text-blue-400"
|
|
81
|
+
onClick={(e) => e.stopPropagation()}
|
|
82
|
+
>
|
|
83
|
+
{ordinal.outpoint.substring(0, 8)}...
|
|
84
|
+
</a>
|
|
85
|
+
)}
|
|
86
|
+
</div>
|
|
83
87
|
</div>
|
|
84
88
|
)
|
|
85
89
|
}
|
|
@@ -259,7 +263,7 @@ export function OrdinalsSection({
|
|
|
259
263
|
</Button>
|
|
260
264
|
</div>
|
|
261
265
|
</div>
|
|
262
|
-
<div className="grid grid-cols-3 sm:grid-cols-4
|
|
266
|
+
<div className="grid grid-cols-3 sm:grid-cols-4 gap-2 mb-3">
|
|
263
267
|
{pageItems.map((ord) => (
|
|
264
268
|
<OrdinalCard
|
|
265
269
|
key={ord.outpoint}
|
|
@@ -363,7 +367,7 @@ function TokenRow({
|
|
|
363
367
|
}) {
|
|
364
368
|
return (
|
|
365
369
|
<div
|
|
366
|
-
className={`flex items-center justify-between p-3 rounded-lg border ${tb.isActive ? 'bg-
|
|
370
|
+
className={`flex items-center justify-between p-3 rounded-lg border ${tb.isActive ? 'bg-muted/30 border-purple-500/10' : 'bg-muted/20 border-muted/20 opacity-60'}`}
|
|
367
371
|
>
|
|
368
372
|
<div className="flex items-center gap-3">
|
|
369
373
|
<img
|
|
@@ -136,7 +136,7 @@ export function OpnsSection({
|
|
|
136
136
|
return (
|
|
137
137
|
<div
|
|
138
138
|
key={item.outpoint}
|
|
139
|
-
className={`flex items-center gap-3 px-3 py-2 rounded-lg cursor-pointer transition-all ${isSelected ? 'border border-orange-500 bg-orange-500/10 ring-1 ring-orange-500/30' : 'border border-border/50 hover:border-border bg-
|
|
139
|
+
className={`flex items-center gap-3 px-3 py-2 rounded-lg cursor-pointer transition-all ${isSelected ? 'border border-orange-500 bg-orange-500/10 ring-1 ring-orange-500/30' : 'border border-border/50 hover:border-border bg-muted/30'}`}
|
|
140
140
|
onClick={() => onToggle(item.outpoint)}
|
|
141
141
|
>
|
|
142
142
|
<div
|
|
@@ -41,7 +41,7 @@ function TabsList({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
41
41
|
<div
|
|
42
42
|
data-slot="tabs-list"
|
|
43
43
|
className={cn(
|
|
44
|
-
'inline-flex h-9 items-center justify-start gap-1 rounded-lg bg-muted p-1 text-muted-foreground',
|
|
44
|
+
'inline-flex h-9 items-center justify-start gap-1 rounded-lg bg-muted p-1 text-muted-foreground overflow-x-auto scrollbar-none',
|
|
45
45
|
className,
|
|
46
46
|
)}
|
|
47
47
|
{...props}
|
|
@@ -61,7 +61,7 @@ function TabsTrigger({
|
|
|
61
61
|
data-slot="tabs-trigger"
|
|
62
62
|
data-active={isActive ? '' : undefined}
|
|
63
63
|
className={cn(
|
|
64
|
-
'inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50',
|
|
64
|
+
'inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50',
|
|
65
65
|
isActive && 'bg-background text-foreground shadow-sm',
|
|
66
66
|
className,
|
|
67
67
|
)}
|