@1sat/permission-module-ui 0.0.9 → 0.0.11

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":"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,2CAgH7B"}
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,7 +28,15 @@ var promptStyles = `
28
28
  flex-direction: column;
29
29
  width: 100%;
30
30
  max-width: 480px;
31
- overflow: hidden;
31
+ min-height: 100%;
32
+ overflow-x: hidden;
33
+ overflow-y: auto;
34
+ }
35
+
36
+ .opp-bottom {
37
+ margin-top: auto;
38
+ display: flex;
39
+ flex-direction: column;
32
40
  }
33
41
 
34
42
  .opp-root.opp-dark {
@@ -154,8 +162,12 @@ var promptStyles = `
154
162
  font-family: 'Roboto Mono', ui-monospace, SFMono-Regular, monospace;
155
163
  font-size: 13px;
156
164
  font-weight: 500;
157
- word-break: break-all;
158
165
  text-align: right;
166
+ white-space: nowrap;
167
+ overflow: hidden;
168
+ text-overflow: ellipsis;
169
+ min-width: 0;
170
+ max-width: 60%;
159
171
  }
160
172
 
161
173
  .opp-meta {
@@ -347,57 +359,62 @@ function OneSatPermissionPrompt({
347
359
  ]
348
360
  }, `${row.key}:${row.value}`))
349
361
  }),
350
- (summary.network || summary.feeSats !== undefined) && /* @__PURE__ */ jsxs("div", {
351
- className: "opp-meta",
362
+ /* @__PURE__ */ jsxs("div", {
363
+ className: "opp-bottom",
352
364
  children: [
353
- summary.network && /* @__PURE__ */ jsxs("span", {
365
+ (summary.network || summary.feeSats !== undefined) && /* @__PURE__ */ jsxs("div", {
366
+ className: "opp-meta",
354
367
  children: [
355
- "Network ",
356
- /* @__PURE__ */ jsx("span", {
357
- className: "opp-meta-value",
358
- children: summary.network
368
+ summary.network && /* @__PURE__ */ jsxs("span", {
369
+ children: [
370
+ "Network ",
371
+ /* @__PURE__ */ jsx("span", {
372
+ className: "opp-meta-value",
373
+ children: summary.network
374
+ })
375
+ ]
376
+ }),
377
+ summary.feeSats !== undefined && /* @__PURE__ */ jsxs("span", {
378
+ children: [
379
+ "Estimated Fee",
380
+ " ",
381
+ /* @__PURE__ */ jsxs("span", {
382
+ className: "opp-meta-value",
383
+ children: [
384
+ summary.feeSats,
385
+ " sats"
386
+ ]
387
+ })
388
+ ]
359
389
  })
360
390
  ]
361
391
  }),
362
- summary.feeSats !== undefined && /* @__PURE__ */ jsxs("span", {
392
+ /* @__PURE__ */ jsxs("div", {
393
+ className: "opp-actions",
363
394
  children: [
364
- "Estimated Fee",
365
- " ",
366
- /* @__PURE__ */ jsxs("span", {
367
- className: "opp-meta-value",
368
- children: [
369
- summary.feeSats,
370
- " sats"
371
- ]
395
+ /* @__PURE__ */ jsx("button", {
396
+ type: "button",
397
+ className: "opp-button opp-button-reject",
398
+ onClick: handle("reject"),
399
+ disabled: busy,
400
+ children: "Reject"
401
+ }),
402
+ /* @__PURE__ */ jsx("button", {
403
+ type: "button",
404
+ className: "opp-button opp-button-approve",
405
+ onClick: handle("approve"),
406
+ disabled: busy,
407
+ children: "Approve"
372
408
  })
373
409
  ]
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
410
  }),
387
- /* @__PURE__ */ jsx("button", {
388
- type: "button",
389
- className: "opp-button opp-button-approve",
390
- onClick: handle("approve"),
391
- disabled: busy,
392
- children: "Approve"
411
+ /* @__PURE__ */ jsx("div", {
412
+ className: "opp-footer",
413
+ children: /* @__PURE__ */ jsx("span", {
414
+ children: "Secured by 1Sat Ordinals"
415
+ })
393
416
  })
394
417
  ]
395
- }),
396
- /* @__PURE__ */ jsx("div", {
397
- className: "opp-footer",
398
- children: /* @__PURE__ */ jsx("span", {
399
- children: "Secured by 1Sat Ordinals"
400
- })
401
418
  })
402
419
  ]
403
420
  });
@@ -436,6 +453,12 @@ function summarizeRequest(req) {
436
453
  return summarizeUnlock(req, intent);
437
454
  case "inscription":
438
455
  return summarizeInscription(req, intent);
456
+ case "listing":
457
+ return summarizeListing(req, intent);
458
+ case "cancel-listing":
459
+ return summarizeCancelListing(req, intent);
460
+ case "purchase":
461
+ return summarizePurchase(req, intent);
439
462
  case "social-post":
440
463
  return summarizeSocialPost(req, intent);
441
464
  default:
@@ -464,12 +487,12 @@ function summarizeOrdinalTransfer(req, intent) {
464
487
  const contentType = tagValue(ordinal?.tags, "type");
465
488
  const collectionId = tagValue(ordinal?.tags, "collectionId");
466
489
  const recipient = intent.outputs.find((o) => o.recipient)?.recipient;
467
- const imageUrl = ordinal && intent.contentUrls?.[ordinal.id];
490
+ const imageUrl = origin ? intent.contentUrls?.[origin] : undefined;
468
491
  const rows = [];
469
492
  if (recipient)
470
- rows.push({ key: "Recipient", value: recipient });
493
+ rows.push({ key: "Recipient", value: shortenValue(recipient) });
471
494
  if (origin)
472
- rows.push({ key: "Origin", value: origin });
495
+ rows.push({ key: "Origin", value: shortenValue(origin) });
473
496
  if (contentType)
474
497
  rows.push({ key: "Type", value: contentType });
475
498
  return {
@@ -508,7 +531,7 @@ function summarizeTokenTransfer(req, intent) {
508
531
  }
509
532
  const recipient = intent.outputs.find((o) => o.recipient)?.recipient;
510
533
  if (recipient)
511
- rows.push({ key: "Recipient", value: recipient });
534
+ rows.push({ key: "Recipient", value: shortenValue(recipient) });
512
535
  return {
513
536
  title: "Token Transfer",
514
537
  subtitle: `${shortenOriginator(req.originator)} wants to send tokens`,
@@ -517,8 +540,9 @@ function summarizeTokenTransfer(req, intent) {
517
540
  };
518
541
  }
519
542
  function summarizeLock(req, intent) {
520
- const sats = intent.outputs.reduce((s, o) => s + o.satoshis, 0);
521
- const until = intent.outputs.flatMap((o) => o.tags).find((t) => t.startsWith("lock:until:"))?.slice("lock:until:".length);
543
+ const lockOutputs = intent.outputs.filter((o) => o.basket === "lock");
544
+ const sats = (lockOutputs.length > 0 ? lockOutputs : intent.outputs).reduce((s, o) => s + o.satoshis, 0);
545
+ const until = (lockOutputs.length > 0 ? lockOutputs : intent.outputs).flatMap((o) => o.tags).find((t) => t.startsWith("until:"))?.slice("until:".length);
522
546
  const rows = [{ key: "Amount", value: `${sats} sats` }];
523
547
  if (until)
524
548
  rows.push({ key: "Lock until block", value: until });
@@ -539,17 +563,122 @@ function summarizeUnlock(req, intent) {
539
563
  };
540
564
  }
541
565
  function summarizeInscription(req, intent) {
542
- const recipient = intent.outputs.find((o) => o.recipient)?.recipient;
566
+ const inscriptionOutput = intent.outputs.find((o) => o.tags.some((t) => t.startsWith("type:"))) ?? intent.outputs[0];
567
+ const contentType = tagValue(inscriptionOutput?.tags, "type");
568
+ const name = tagValue(inscriptionOutput?.tags, "name");
569
+ const recipient = inscriptionOutput?.recipient;
543
570
  const rows = [];
571
+ if (contentType)
572
+ rows.push({ key: "Type", value: contentType });
573
+ if (name)
574
+ rows.push({ key: "Name", value: name });
544
575
  if (recipient)
545
- rows.push({ key: "Recipient", value: recipient });
576
+ rows.push({ key: "Recipient", value: shortenValue(recipient) });
546
577
  return {
547
578
  title: "Create Inscription",
548
- subtitle: `${shortenOriginator(req.originator)} wants to inscribe content`,
579
+ subtitle: `${shortenOriginator(req.originator)} wants to inscribe content into your wallet`,
549
580
  rows,
550
581
  network: networkLabel(intent.chain)
551
582
  };
552
583
  }
584
+ function summarizeListing(req, intent) {
585
+ const ordinal = intent.inputs[0];
586
+ const origin = tagValue(ordinal?.tags, "origin");
587
+ const name = tagValue(ordinal?.tags, "name");
588
+ const contentType = tagValue(ordinal?.tags, "type");
589
+ const collectionId = tagValue(ordinal?.tags, "collectionId");
590
+ const imageUrl = origin ? intent.contentUrls?.[origin] : undefined;
591
+ const listingOutput = intent.outputs.find((o) => o.tags.some((t) => t.startsWith("price:")));
592
+ const price = tagValue(listingOutput?.tags, "price");
593
+ const rows = [];
594
+ if (price)
595
+ rows.push({ key: "Price", value: `${price} sats` });
596
+ if (origin)
597
+ rows.push({ key: "Origin", value: shortenValue(origin) });
598
+ if (contentType)
599
+ rows.push({ key: "Type", value: contentType });
600
+ return {
601
+ title: "List Ordinal for Sale",
602
+ subtitle: `${shortenOriginator(req.originator)} wants to list an ordinal for sale`,
603
+ rows,
604
+ featured: imageUrl ? {
605
+ imageUrl,
606
+ title: name ?? "Untitled ordinal",
607
+ subtitle: collectionId ?? contentType
608
+ } : undefined,
609
+ network: networkLabel(intent.chain)
610
+ };
611
+ }
612
+ function summarizeCancelListing(req, intent) {
613
+ const listing = intent.inputs[0];
614
+ const origin = tagValue(listing?.tags, "origin");
615
+ const name = tagValue(listing?.tags, "name");
616
+ const contentType = tagValue(listing?.tags, "type");
617
+ const collectionId = tagValue(listing?.tags, "collectionId");
618
+ const price = tagValue(listing?.tags, "price");
619
+ const imageUrl = origin ? intent.contentUrls?.[origin] : undefined;
620
+ const rows = [];
621
+ if (price)
622
+ rows.push({ key: "Original price", value: `${price} sats` });
623
+ if (origin)
624
+ rows.push({ key: "Origin", value: shortenValue(origin) });
625
+ if (contentType)
626
+ rows.push({ key: "Type", value: contentType });
627
+ return {
628
+ title: "Cancel Listing",
629
+ subtitle: `${shortenOriginator(req.originator)} wants to cancel an ordinal listing`,
630
+ rows,
631
+ featured: imageUrl ? {
632
+ imageUrl,
633
+ title: name ?? "Untitled ordinal",
634
+ subtitle: collectionId ?? contentType
635
+ } : undefined,
636
+ network: networkLabel(intent.chain)
637
+ };
638
+ }
639
+ function summarizePurchase(req, intent) {
640
+ const incoming = intent.outputs.find((o) => o.basket === "1sat" || o.basket === "bsv21");
641
+ const isToken = incoming?.basket === "bsv21";
642
+ const origin = tagValue(incoming?.tags, "origin");
643
+ const name = tagValue(incoming?.tags, "name");
644
+ const contentType = tagValue(incoming?.tags, "type");
645
+ const collectionId = tagValue(incoming?.tags, "collectionId");
646
+ const sym = tagValue(incoming?.tags, "sym");
647
+ const amt = tagValue(incoming?.tags, "amt");
648
+ const tokenId = tagValue(incoming?.tags, "bsv21");
649
+ const sellerOutput = intent.outputs.find((o) => !o.basket && o.recipient && o.satoshis > 1);
650
+ const price = sellerOutput?.satoshis;
651
+ const rows = [];
652
+ if (price !== undefined)
653
+ rows.push({ key: "Price", value: `${price} sats` });
654
+ if (isToken) {
655
+ if (amt)
656
+ rows.push({ key: "Amount", value: amt });
657
+ if (sym || tokenId) {
658
+ rows.push({
659
+ key: "Token",
660
+ value: sym && tokenId ? `${sym} — ${shortenId(tokenId)}` : sym ?? shortenId(tokenId ?? "")
661
+ });
662
+ }
663
+ } else {
664
+ if (origin)
665
+ rows.push({ key: "Origin", value: shortenValue(origin) });
666
+ if (contentType)
667
+ rows.push({ key: "Type", value: contentType });
668
+ }
669
+ const featuredImage = !isToken && origin ? intent.contentUrls?.[origin] : undefined;
670
+ return {
671
+ title: isToken ? "Purchase Tokens" : "Purchase Ordinal",
672
+ subtitle: isToken ? `${shortenOriginator(req.originator)} wants to purchase tokens into your wallet` : `${shortenOriginator(req.originator)} wants to purchase an ordinal into your wallet`,
673
+ rows,
674
+ featured: !isToken && featuredImage ? {
675
+ imageUrl: featuredImage,
676
+ title: name ?? "Untitled ordinal",
677
+ subtitle: collectionId ?? contentType
678
+ } : undefined,
679
+ network: networkLabel(intent.chain)
680
+ };
681
+ }
553
682
  function summarizeSocialPost(req, intent) {
554
683
  return {
555
684
  title: "Social Post",
@@ -576,6 +705,11 @@ function shortenId(id, max = 24) {
576
705
  return id;
577
706
  return `${id.slice(0, 8)}…${id.slice(-6)}`;
578
707
  }
708
+ function shortenValue(value, head = 12, tail = 10) {
709
+ if (value.length <= head + tail + 1)
710
+ return value;
711
+ return `${value.slice(0, head)}…${value.slice(-tail)}`;
712
+ }
579
713
  function summarizeProtocol(req) {
580
714
  const intent = req.intent;
581
715
  const rows = [
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-x: hidden;\n overflow-y: auto;\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 text-align: right;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n max-width: 60%;\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
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,q6HAmNxB,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,0nIA+NxB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/permission-module-ui",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
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.13"
31
+ "@1sat/permission-module": "0.0.15"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "^18.0.0 || ^19.0.0"