@1sat/permission-module-ui 0.0.8 → 0.0.10
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/dist/OneSatPermissionPrompt.d.ts.map +1 -1
- package/dist/index.js +166 -43
- package/dist/styles.d.ts +1 -1
- package/dist/styles.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OneSatPermissionPrompt.d.ts","sourceRoot":"","sources":["../src/OneSatPermissionPrompt.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAI5D,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAE7C,MAAM,WAAW,2BAA2B;IAC3C,mEAAmE;IACnE,OAAO,EAAE,aAAa,CAAA;IACtB,yFAAyF;IACzF,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,yFAAyF;IACzF,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,KAAK,CAAA;CACb;AAqCD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EACtC,OAAO,EACP,SAAS,EACT,QAAQ,EACR,KAAc,GACd,EAAE,2BAA2B,
|
|
1
|
+
{"version":3,"file":"OneSatPermissionPrompt.d.ts","sourceRoot":"","sources":["../src/OneSatPermissionPrompt.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAI5D,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAE7C,MAAM,WAAW,2BAA2B;IAC3C,mEAAmE;IACnE,OAAO,EAAE,aAAa,CAAA;IACtB,yFAAyF;IACzF,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,yFAAyF;IACzF,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,KAAK,CAAA;CACb;AAqCD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EACtC,OAAO,EACP,SAAS,EACT,QAAQ,EACR,KAAc,GACd,EAAE,2BAA2B,2CAkH7B"}
|
package/dist/index.js
CHANGED
|
@@ -28,9 +28,16 @@ var promptStyles = `
|
|
|
28
28
|
flex-direction: column;
|
|
29
29
|
width: 100%;
|
|
30
30
|
max-width: 480px;
|
|
31
|
+
min-height: 100%;
|
|
31
32
|
overflow: hidden;
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
.opp-bottom {
|
|
36
|
+
margin-top: auto;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
.opp-root.opp-dark {
|
|
35
42
|
--opp-bg: #0F1117;
|
|
36
43
|
--opp-fg: #F9FAFB;
|
|
@@ -347,57 +354,62 @@ function OneSatPermissionPrompt({
|
|
|
347
354
|
]
|
|
348
355
|
}, `${row.key}:${row.value}`))
|
|
349
356
|
}),
|
|
350
|
-
|
|
351
|
-
className: "opp-
|
|
357
|
+
/* @__PURE__ */ jsxs("div", {
|
|
358
|
+
className: "opp-bottom",
|
|
352
359
|
children: [
|
|
353
|
-
summary.network && /* @__PURE__ */ jsxs("
|
|
360
|
+
(summary.network || summary.feeSats !== undefined) && /* @__PURE__ */ jsxs("div", {
|
|
361
|
+
className: "opp-meta",
|
|
354
362
|
children: [
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
363
|
+
summary.network && /* @__PURE__ */ jsxs("span", {
|
|
364
|
+
children: [
|
|
365
|
+
"Network ",
|
|
366
|
+
/* @__PURE__ */ jsx("span", {
|
|
367
|
+
className: "opp-meta-value",
|
|
368
|
+
children: summary.network
|
|
369
|
+
})
|
|
370
|
+
]
|
|
371
|
+
}),
|
|
372
|
+
summary.feeSats !== undefined && /* @__PURE__ */ jsxs("span", {
|
|
373
|
+
children: [
|
|
374
|
+
"Estimated Fee",
|
|
375
|
+
" ",
|
|
376
|
+
/* @__PURE__ */ jsxs("span", {
|
|
377
|
+
className: "opp-meta-value",
|
|
378
|
+
children: [
|
|
379
|
+
summary.feeSats,
|
|
380
|
+
" sats"
|
|
381
|
+
]
|
|
382
|
+
})
|
|
383
|
+
]
|
|
359
384
|
})
|
|
360
385
|
]
|
|
361
386
|
}),
|
|
362
|
-
|
|
387
|
+
/* @__PURE__ */ jsxs("div", {
|
|
388
|
+
className: "opp-actions",
|
|
363
389
|
children: [
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
390
|
+
/* @__PURE__ */ jsx("button", {
|
|
391
|
+
type: "button",
|
|
392
|
+
className: "opp-button opp-button-reject",
|
|
393
|
+
onClick: handle("reject"),
|
|
394
|
+
disabled: busy,
|
|
395
|
+
children: "Reject"
|
|
396
|
+
}),
|
|
397
|
+
/* @__PURE__ */ jsx("button", {
|
|
398
|
+
type: "button",
|
|
399
|
+
className: "opp-button opp-button-approve",
|
|
400
|
+
onClick: handle("approve"),
|
|
401
|
+
disabled: busy,
|
|
402
|
+
children: "Approve"
|
|
372
403
|
})
|
|
373
404
|
]
|
|
374
|
-
})
|
|
375
|
-
]
|
|
376
|
-
}),
|
|
377
|
-
/* @__PURE__ */ jsxs("div", {
|
|
378
|
-
className: "opp-actions",
|
|
379
|
-
children: [
|
|
380
|
-
/* @__PURE__ */ jsx("button", {
|
|
381
|
-
type: "button",
|
|
382
|
-
className: "opp-button opp-button-reject",
|
|
383
|
-
onClick: handle("reject"),
|
|
384
|
-
disabled: busy,
|
|
385
|
-
children: "Reject"
|
|
386
405
|
}),
|
|
387
|
-
/* @__PURE__ */ jsx("
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
children: "Approve"
|
|
406
|
+
/* @__PURE__ */ jsx("div", {
|
|
407
|
+
className: "opp-footer",
|
|
408
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
409
|
+
children: "Secured by 1Sat Ordinals"
|
|
410
|
+
})
|
|
393
411
|
})
|
|
394
412
|
]
|
|
395
|
-
}),
|
|
396
|
-
/* @__PURE__ */ jsx("div", {
|
|
397
|
-
className: "opp-footer",
|
|
398
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
399
|
-
children: "Secured by 1Sat Ordinals"
|
|
400
|
-
})
|
|
401
413
|
})
|
|
402
414
|
]
|
|
403
415
|
});
|
|
@@ -436,6 +448,12 @@ function summarizeRequest(req) {
|
|
|
436
448
|
return summarizeUnlock(req, intent);
|
|
437
449
|
case "inscription":
|
|
438
450
|
return summarizeInscription(req, intent);
|
|
451
|
+
case "listing":
|
|
452
|
+
return summarizeListing(req, intent);
|
|
453
|
+
case "cancel-listing":
|
|
454
|
+
return summarizeCancelListing(req, intent);
|
|
455
|
+
case "purchase":
|
|
456
|
+
return summarizePurchase(req, intent);
|
|
439
457
|
case "social-post":
|
|
440
458
|
return summarizeSocialPost(req, intent);
|
|
441
459
|
default:
|
|
@@ -464,7 +482,7 @@ function summarizeOrdinalTransfer(req, intent) {
|
|
|
464
482
|
const contentType = tagValue(ordinal?.tags, "type");
|
|
465
483
|
const collectionId = tagValue(ordinal?.tags, "collectionId");
|
|
466
484
|
const recipient = intent.outputs.find((o) => o.recipient)?.recipient;
|
|
467
|
-
const imageUrl =
|
|
485
|
+
const imageUrl = origin ? intent.contentUrls?.[origin] : undefined;
|
|
468
486
|
const rows = [];
|
|
469
487
|
if (recipient)
|
|
470
488
|
rows.push({ key: "Recipient", value: recipient });
|
|
@@ -539,17 +557,122 @@ function summarizeUnlock(req, intent) {
|
|
|
539
557
|
};
|
|
540
558
|
}
|
|
541
559
|
function summarizeInscription(req, intent) {
|
|
542
|
-
const
|
|
560
|
+
const inscriptionOutput = intent.outputs.find((o) => o.tags.some((t) => t.startsWith("type:"))) ?? intent.outputs[0];
|
|
561
|
+
const contentType = tagValue(inscriptionOutput?.tags, "type");
|
|
562
|
+
const name = tagValue(inscriptionOutput?.tags, "name");
|
|
563
|
+
const recipient = inscriptionOutput?.recipient;
|
|
543
564
|
const rows = [];
|
|
565
|
+
if (contentType)
|
|
566
|
+
rows.push({ key: "Type", value: contentType });
|
|
567
|
+
if (name)
|
|
568
|
+
rows.push({ key: "Name", value: name });
|
|
544
569
|
if (recipient)
|
|
545
570
|
rows.push({ key: "Recipient", value: recipient });
|
|
546
571
|
return {
|
|
547
572
|
title: "Create Inscription",
|
|
548
|
-
subtitle: `${shortenOriginator(req.originator)} wants to inscribe content`,
|
|
573
|
+
subtitle: `${shortenOriginator(req.originator)} wants to inscribe content into your wallet`,
|
|
549
574
|
rows,
|
|
550
575
|
network: networkLabel(intent.chain)
|
|
551
576
|
};
|
|
552
577
|
}
|
|
578
|
+
function summarizeListing(req, intent) {
|
|
579
|
+
const ordinal = intent.inputs[0];
|
|
580
|
+
const origin = tagValue(ordinal?.tags, "origin");
|
|
581
|
+
const name = tagValue(ordinal?.tags, "name");
|
|
582
|
+
const contentType = tagValue(ordinal?.tags, "type");
|
|
583
|
+
const collectionId = tagValue(ordinal?.tags, "collectionId");
|
|
584
|
+
const imageUrl = origin ? intent.contentUrls?.[origin] : undefined;
|
|
585
|
+
const listingOutput = intent.outputs.find((o) => o.tags.some((t) => t.startsWith("price:")));
|
|
586
|
+
const price = tagValue(listingOutput?.tags, "price");
|
|
587
|
+
const rows = [];
|
|
588
|
+
if (price)
|
|
589
|
+
rows.push({ key: "Price", value: `${price} sats` });
|
|
590
|
+
if (origin)
|
|
591
|
+
rows.push({ key: "Origin", value: origin });
|
|
592
|
+
if (contentType)
|
|
593
|
+
rows.push({ key: "Type", value: contentType });
|
|
594
|
+
return {
|
|
595
|
+
title: "List Ordinal for Sale",
|
|
596
|
+
subtitle: `${shortenOriginator(req.originator)} wants to list an ordinal for sale`,
|
|
597
|
+
rows,
|
|
598
|
+
featured: imageUrl ? {
|
|
599
|
+
imageUrl,
|
|
600
|
+
title: name ?? "Untitled ordinal",
|
|
601
|
+
subtitle: collectionId ?? contentType
|
|
602
|
+
} : undefined,
|
|
603
|
+
network: networkLabel(intent.chain)
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
function summarizeCancelListing(req, intent) {
|
|
607
|
+
const listing = intent.inputs[0];
|
|
608
|
+
const origin = tagValue(listing?.tags, "origin");
|
|
609
|
+
const name = tagValue(listing?.tags, "name");
|
|
610
|
+
const contentType = tagValue(listing?.tags, "type");
|
|
611
|
+
const collectionId = tagValue(listing?.tags, "collectionId");
|
|
612
|
+
const price = tagValue(listing?.tags, "price");
|
|
613
|
+
const imageUrl = origin ? intent.contentUrls?.[origin] : undefined;
|
|
614
|
+
const rows = [];
|
|
615
|
+
if (price)
|
|
616
|
+
rows.push({ key: "Original price", value: `${price} sats` });
|
|
617
|
+
if (origin)
|
|
618
|
+
rows.push({ key: "Origin", value: origin });
|
|
619
|
+
if (contentType)
|
|
620
|
+
rows.push({ key: "Type", value: contentType });
|
|
621
|
+
return {
|
|
622
|
+
title: "Cancel Listing",
|
|
623
|
+
subtitle: `${shortenOriginator(req.originator)} wants to cancel an ordinal listing`,
|
|
624
|
+
rows,
|
|
625
|
+
featured: imageUrl ? {
|
|
626
|
+
imageUrl,
|
|
627
|
+
title: name ?? "Untitled ordinal",
|
|
628
|
+
subtitle: collectionId ?? contentType
|
|
629
|
+
} : undefined,
|
|
630
|
+
network: networkLabel(intent.chain)
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
function summarizePurchase(req, intent) {
|
|
634
|
+
const incoming = intent.outputs.find((o) => o.basket === "1sat" || o.basket === "bsv21");
|
|
635
|
+
const isToken = incoming?.basket === "bsv21";
|
|
636
|
+
const origin = tagValue(incoming?.tags, "origin");
|
|
637
|
+
const name = tagValue(incoming?.tags, "name");
|
|
638
|
+
const contentType = tagValue(incoming?.tags, "type");
|
|
639
|
+
const collectionId = tagValue(incoming?.tags, "collectionId");
|
|
640
|
+
const sym = tagValue(incoming?.tags, "sym");
|
|
641
|
+
const amt = tagValue(incoming?.tags, "amt");
|
|
642
|
+
const tokenId = tagValue(incoming?.tags, "bsv21");
|
|
643
|
+
const sellerOutput = intent.outputs.find((o) => !o.basket && o.recipient && o.satoshis > 1);
|
|
644
|
+
const price = sellerOutput?.satoshis;
|
|
645
|
+
const rows = [];
|
|
646
|
+
if (price !== undefined)
|
|
647
|
+
rows.push({ key: "Price", value: `${price} sats` });
|
|
648
|
+
if (isToken) {
|
|
649
|
+
if (amt)
|
|
650
|
+
rows.push({ key: "Amount", value: amt });
|
|
651
|
+
if (sym || tokenId) {
|
|
652
|
+
rows.push({
|
|
653
|
+
key: "Token",
|
|
654
|
+
value: sym && tokenId ? `${sym} — ${shortenId(tokenId)}` : sym ?? shortenId(tokenId ?? "")
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
} else {
|
|
658
|
+
if (origin)
|
|
659
|
+
rows.push({ key: "Origin", value: origin });
|
|
660
|
+
if (contentType)
|
|
661
|
+
rows.push({ key: "Type", value: contentType });
|
|
662
|
+
}
|
|
663
|
+
const featuredImage = !isToken && origin ? intent.contentUrls?.[origin] : undefined;
|
|
664
|
+
return {
|
|
665
|
+
title: isToken ? "Purchase Tokens" : "Purchase Ordinal",
|
|
666
|
+
subtitle: isToken ? `${shortenOriginator(req.originator)} wants to purchase tokens into your wallet` : `${shortenOriginator(req.originator)} wants to purchase an ordinal into your wallet`,
|
|
667
|
+
rows,
|
|
668
|
+
featured: !isToken && featuredImage ? {
|
|
669
|
+
imageUrl: featuredImage,
|
|
670
|
+
title: name ?? "Untitled ordinal",
|
|
671
|
+
subtitle: collectionId ?? contentType
|
|
672
|
+
} : undefined,
|
|
673
|
+
network: networkLabel(intent.chain)
|
|
674
|
+
};
|
|
675
|
+
}
|
|
553
676
|
function summarizeSocialPost(req, intent) {
|
|
554
677
|
return {
|
|
555
678
|
title: "Social Post",
|
package/dist/styles.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Colors match the design in `1sat-permissions-popups.pen`.
|
|
6
6
|
*/
|
|
7
|
-
export declare const promptStyles = "\n.opp-root {\n --opp-bg: #ffffff;\n --opp-fg: #111827;\n --opp-muted: #6b7280;\n --opp-card-bg: #f7f8fa;\n --opp-card-border: #eceef2;\n --opp-accent: #E5A920;\n --opp-approve-bg: #E5A920;\n --opp-approve-fg: #ffffff;\n --opp-reject-bg: #ffffff;\n --opp-reject-fg: #111827;\n --opp-reject-border: #d1d5db;\n --opp-status-bg: #FFFBE6;\n --opp-status-fg: #E5A920;\n\n font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n background: var(--opp-bg);\n color: var(--opp-fg);\n border-radius: 16px;\n display: flex;\n flex-direction: column;\n width: 100%;\n max-width: 480px;\n overflow: hidden;\n}\n\n.opp-root.opp-dark {\n --opp-bg: #0F1117;\n --opp-fg: #F9FAFB;\n --opp-muted: #9ca3af;\n --opp-card-bg: #1A1D27;\n --opp-card-border: #232636;\n --opp-reject-bg: #0F1117;\n --opp-reject-fg: #F9FAFB;\n --opp-reject-border: #2D3142;\n --opp-status-bg: #2A2408;\n --opp-status-fg: #E5A920;\n}\n\n.opp-body {\n padding: 24px 20px 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n align-items: center;\n}\n\n.opp-coin {\n width: 48px;\n height: 48px;\n flex-shrink: 0;\n}\n\n.opp-title {\n font-size: 16px;\n font-weight: 700;\n margin: 0;\n text-align: center;\n}\n\n.opp-subtitle {\n font-size: 12px;\n color: var(--opp-muted);\n margin: 0;\n text-align: center;\n line-height: 1.4;\n}\n\n.opp-status {\n background: var(--opp-status-bg);\n color: var(--opp-status-fg);\n padding: 4px 12px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n margin-top: 4px;\n border: 1px solid var(--opp-card-border);\n}\n\n.opp-card {\n background: var(--opp-card-bg);\n border: 1px solid var(--opp-card-border);\n border-radius: 10px;\n margin: 0 20px;\n padding: 16px;\n font-size: 13px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.opp-featured {\n display: flex;\n align-items: center;\n gap: 12px;\n background: var(--opp-card-bg);\n border: 1px solid var(--opp-card-border);\n border-radius: 10px;\n margin: 0 20px;\n padding: 16px;\n}\n\n.opp-featured-image {\n width: 80px;\n height: 80px;\n border-radius: 8px;\n object-fit: cover;\n background: rgba(0, 0, 0, 0.1);\n flex-shrink: 0;\n}\n\n.opp-featured-meta {\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n}\n\n.opp-featured-title {\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.opp-featured-subtitle {\n font-size: 12px;\n color: var(--opp-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.opp-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n}\n\n.opp-row-key {\n color: var(--opp-muted);\n}\n\n.opp-row-value {\n font-family: 'Roboto Mono', ui-monospace, SFMono-Regular, monospace;\n font-size: 13px;\n font-weight: 500;\n word-break: break-all;\n text-align: right;\n}\n\n.opp-meta {\n display: flex;\n justify-content: space-between;\n padding: 12px 20px;\n font-size: 12px;\n color: var(--opp-muted);\n}\n\n.opp-meta-value {\n color: var(--opp-fg);\n font-weight: 500;\n}\n\n.opp-actions {\n display: flex;\n gap: 12px;\n padding: 20px 20px 12px;\n}\n\n.opp-button {\n flex: 1;\n padding: 0 16px;\n height: 48px;\n border-radius: 10px;\n font-size: 15px;\n font-weight: 600;\n cursor: pointer;\n border: 1px solid transparent;\n transition: opacity 120ms ease;\n}\n\n.opp-button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.opp-button-reject {\n background: var(--opp-reject-bg);\n color: var(--opp-reject-fg);\n border-color: var(--opp-reject-border);\n}\n\n.opp-button-approve {\n background: var(--opp-approve-bg);\n color: var(--opp-approve-fg);\n}\n\n.opp-footer {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 8px 20px 16px;\n font-size: 11px;\n font-weight: 500;\n color: var(--opp-muted);\n}\n";
|
|
7
|
+
export declare const promptStyles = "\n.opp-root {\n --opp-bg: #ffffff;\n --opp-fg: #111827;\n --opp-muted: #6b7280;\n --opp-card-bg: #f7f8fa;\n --opp-card-border: #eceef2;\n --opp-accent: #E5A920;\n --opp-approve-bg: #E5A920;\n --opp-approve-fg: #ffffff;\n --opp-reject-bg: #ffffff;\n --opp-reject-fg: #111827;\n --opp-reject-border: #d1d5db;\n --opp-status-bg: #FFFBE6;\n --opp-status-fg: #E5A920;\n\n font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n background: var(--opp-bg);\n color: var(--opp-fg);\n border-radius: 16px;\n display: flex;\n flex-direction: column;\n width: 100%;\n max-width: 480px;\n min-height: 100%;\n overflow: hidden;\n}\n\n.opp-bottom {\n margin-top: auto;\n display: flex;\n flex-direction: column;\n}\n\n.opp-root.opp-dark {\n --opp-bg: #0F1117;\n --opp-fg: #F9FAFB;\n --opp-muted: #9ca3af;\n --opp-card-bg: #1A1D27;\n --opp-card-border: #232636;\n --opp-reject-bg: #0F1117;\n --opp-reject-fg: #F9FAFB;\n --opp-reject-border: #2D3142;\n --opp-status-bg: #2A2408;\n --opp-status-fg: #E5A920;\n}\n\n.opp-body {\n padding: 24px 20px 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n align-items: center;\n}\n\n.opp-coin {\n width: 48px;\n height: 48px;\n flex-shrink: 0;\n}\n\n.opp-title {\n font-size: 16px;\n font-weight: 700;\n margin: 0;\n text-align: center;\n}\n\n.opp-subtitle {\n font-size: 12px;\n color: var(--opp-muted);\n margin: 0;\n text-align: center;\n line-height: 1.4;\n}\n\n.opp-status {\n background: var(--opp-status-bg);\n color: var(--opp-status-fg);\n padding: 4px 12px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n margin-top: 4px;\n border: 1px solid var(--opp-card-border);\n}\n\n.opp-card {\n background: var(--opp-card-bg);\n border: 1px solid var(--opp-card-border);\n border-radius: 10px;\n margin: 0 20px;\n padding: 16px;\n font-size: 13px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.opp-featured {\n display: flex;\n align-items: center;\n gap: 12px;\n background: var(--opp-card-bg);\n border: 1px solid var(--opp-card-border);\n border-radius: 10px;\n margin: 0 20px;\n padding: 16px;\n}\n\n.opp-featured-image {\n width: 80px;\n height: 80px;\n border-radius: 8px;\n object-fit: cover;\n background: rgba(0, 0, 0, 0.1);\n flex-shrink: 0;\n}\n\n.opp-featured-meta {\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n}\n\n.opp-featured-title {\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.opp-featured-subtitle {\n font-size: 12px;\n color: var(--opp-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.opp-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n}\n\n.opp-row-key {\n color: var(--opp-muted);\n}\n\n.opp-row-value {\n font-family: 'Roboto Mono', ui-monospace, SFMono-Regular, monospace;\n font-size: 13px;\n font-weight: 500;\n word-break: break-all;\n text-align: right;\n}\n\n.opp-meta {\n display: flex;\n justify-content: space-between;\n padding: 12px 20px;\n font-size: 12px;\n color: var(--opp-muted);\n}\n\n.opp-meta-value {\n color: var(--opp-fg);\n font-weight: 500;\n}\n\n.opp-actions {\n display: flex;\n gap: 12px;\n padding: 20px 20px 12px;\n}\n\n.opp-button {\n flex: 1;\n padding: 0 16px;\n height: 48px;\n border-radius: 10px;\n font-size: 15px;\n font-weight: 600;\n cursor: pointer;\n border: 1px solid transparent;\n transition: opacity 120ms ease;\n}\n\n.opp-button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.opp-button-reject {\n background: var(--opp-reject-bg);\n color: var(--opp-reject-fg);\n border-color: var(--opp-reject-border);\n}\n\n.opp-button-approve {\n background: var(--opp-approve-bg);\n color: var(--opp-approve-fg);\n}\n\n.opp-footer {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 8px 20px 16px;\n font-size: 11px;\n font-weight: 500;\n color: var(--opp-muted);\n}\n";
|
|
8
8
|
//# sourceMappingURL=styles.d.ts.map
|
package/dist/styles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,ghIA0NxB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1sat/permission-module-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "React component for the 1Sat permission module's prompt UX",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@1sat/permission-module": "0.0.
|
|
31
|
+
"@1sat/permission-module": "0.0.14"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^18.0.0 || ^19.0.0"
|