@1sat/permission-module-ui 0.0.4 → 0.0.6
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 +210 -24
- 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;IACb,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;
|
|
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;IACb,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAqCD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EACtC,OAAO,EACP,SAAS,EACT,QAAQ,EACR,KAAc,EACd,OAAyB,EACzB,OAAO,GACP,EAAE,2BAA2B,2CA2H7B"}
|
package/dist/index.js
CHANGED
|
@@ -135,6 +135,47 @@ var promptStyles = `
|
|
|
135
135
|
gap: 8px;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
.opp-featured {
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
gap: 12px;
|
|
142
|
+
background: var(--opp-card-bg);
|
|
143
|
+
border-radius: 8px;
|
|
144
|
+
margin: 0 16px;
|
|
145
|
+
padding: 12px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.opp-featured-image {
|
|
149
|
+
width: 64px;
|
|
150
|
+
height: 64px;
|
|
151
|
+
border-radius: 8px;
|
|
152
|
+
object-fit: cover;
|
|
153
|
+
background: rgba(0, 0, 0, 0.1);
|
|
154
|
+
flex-shrink: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.opp-featured-meta {
|
|
158
|
+
display: flex;
|
|
159
|
+
flex-direction: column;
|
|
160
|
+
min-width: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.opp-featured-title {
|
|
164
|
+
font-size: 14px;
|
|
165
|
+
font-weight: 600;
|
|
166
|
+
white-space: nowrap;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
text-overflow: ellipsis;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.opp-featured-subtitle {
|
|
172
|
+
font-size: 12px;
|
|
173
|
+
color: var(--opp-muted);
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
overflow: hidden;
|
|
176
|
+
text-overflow: ellipsis;
|
|
177
|
+
}
|
|
178
|
+
|
|
138
179
|
.opp-row {
|
|
139
180
|
display: flex;
|
|
140
181
|
justify-content: space-between;
|
|
@@ -304,6 +345,29 @@ function OneSatPermissionPrompt({
|
|
|
304
345
|
})
|
|
305
346
|
]
|
|
306
347
|
}),
|
|
348
|
+
summary.featured && /* @__PURE__ */ jsxs("div", {
|
|
349
|
+
className: "opp-featured",
|
|
350
|
+
children: [
|
|
351
|
+
/* @__PURE__ */ jsx("img", {
|
|
352
|
+
className: "opp-featured-image",
|
|
353
|
+
src: summary.featured.imageUrl,
|
|
354
|
+
alt: summary.featured.title
|
|
355
|
+
}),
|
|
356
|
+
/* @__PURE__ */ jsxs("div", {
|
|
357
|
+
className: "opp-featured-meta",
|
|
358
|
+
children: [
|
|
359
|
+
/* @__PURE__ */ jsx("div", {
|
|
360
|
+
className: "opp-featured-title",
|
|
361
|
+
children: summary.featured.title
|
|
362
|
+
}),
|
|
363
|
+
summary.featured.subtitle && /* @__PURE__ */ jsx("div", {
|
|
364
|
+
className: "opp-featured-subtitle",
|
|
365
|
+
children: summary.featured.subtitle
|
|
366
|
+
})
|
|
367
|
+
]
|
|
368
|
+
})
|
|
369
|
+
]
|
|
370
|
+
}),
|
|
307
371
|
summary.rows.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
308
372
|
className: "opp-card",
|
|
309
373
|
children: summary.rows.map((row) => /* @__PURE__ */ jsxs("div", {
|
|
@@ -408,13 +472,158 @@ function readSystemTheme() {
|
|
|
408
472
|
}
|
|
409
473
|
function summarizeRequest(req) {
|
|
410
474
|
if (req.kind === "transaction") {
|
|
411
|
-
|
|
475
|
+
const intent = req.intent;
|
|
476
|
+
switch (intent.kind) {
|
|
477
|
+
case "ordinal-transfer":
|
|
478
|
+
return summarizeOrdinalTransfer(req, intent);
|
|
479
|
+
case "token-transfer":
|
|
480
|
+
return summarizeTokenTransfer(req, intent);
|
|
481
|
+
case "lock":
|
|
482
|
+
return summarizeLock(req, intent);
|
|
483
|
+
case "unlock":
|
|
484
|
+
return summarizeUnlock(req, intent);
|
|
485
|
+
case "inscription":
|
|
486
|
+
return summarizeInscription(req, intent);
|
|
487
|
+
case "social-post":
|
|
488
|
+
return summarizeSocialPost(req, intent);
|
|
489
|
+
default:
|
|
490
|
+
return summarizeUnknownTx(req, intent);
|
|
491
|
+
}
|
|
412
492
|
}
|
|
413
493
|
if (req.kind === "protocol") {
|
|
414
494
|
return summarizeProtocol(req);
|
|
415
495
|
}
|
|
416
496
|
return summarizeSignature(req);
|
|
417
497
|
}
|
|
498
|
+
function tagValue(tags, key) {
|
|
499
|
+
if (!tags)
|
|
500
|
+
return;
|
|
501
|
+
const prefix = `${key}:`;
|
|
502
|
+
for (const t of tags) {
|
|
503
|
+
if (t.startsWith(prefix))
|
|
504
|
+
return t.slice(prefix.length);
|
|
505
|
+
}
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
function summarizeOrdinalTransfer(req, intent) {
|
|
509
|
+
const ordinal = intent.inputs[0];
|
|
510
|
+
const origin = tagValue(ordinal?.tags, "origin");
|
|
511
|
+
const name = tagValue(ordinal?.tags, "name");
|
|
512
|
+
const contentType = tagValue(ordinal?.tags, "type");
|
|
513
|
+
const collectionId = tagValue(ordinal?.tags, "collectionId");
|
|
514
|
+
const recipient = intent.outputs.find((o) => o.recipient)?.recipient;
|
|
515
|
+
const imageUrl = ordinal && intent.contentUrls?.[ordinal.id];
|
|
516
|
+
const rows = [];
|
|
517
|
+
if (recipient)
|
|
518
|
+
rows.push({ key: "Recipient", value: recipient });
|
|
519
|
+
if (origin)
|
|
520
|
+
rows.push({ key: "Origin", value: origin });
|
|
521
|
+
if (contentType)
|
|
522
|
+
rows.push({ key: "Type", value: contentType });
|
|
523
|
+
return {
|
|
524
|
+
title: "NFT Transfer",
|
|
525
|
+
subtitle: `${shortenOriginator(req.originator)} wants to transfer an ordinal`,
|
|
526
|
+
rows,
|
|
527
|
+
featured: imageUrl ? {
|
|
528
|
+
imageUrl,
|
|
529
|
+
title: name ?? "Untitled ordinal",
|
|
530
|
+
subtitle: collectionId ?? contentType
|
|
531
|
+
} : undefined,
|
|
532
|
+
network: networkLabel(intent.chain)
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
function summarizeTokenTransfer(req, intent) {
|
|
536
|
+
const totals = new Map;
|
|
537
|
+
for (const input of intent.inputs) {
|
|
538
|
+
const tokenId = tagValue(input.tags, "bsv21");
|
|
539
|
+
if (!tokenId)
|
|
540
|
+
continue;
|
|
541
|
+
const sym = tagValue(input.tags, "sym");
|
|
542
|
+
const amt = BigInt(tagValue(input.tags, "amt") ?? "0");
|
|
543
|
+
const cur = totals.get(tokenId) ?? { sym, amt: 0n };
|
|
544
|
+
cur.amt += amt;
|
|
545
|
+
if (!cur.sym && sym)
|
|
546
|
+
cur.sym = sym;
|
|
547
|
+
totals.set(tokenId, cur);
|
|
548
|
+
}
|
|
549
|
+
const rows = [];
|
|
550
|
+
for (const [tokenId, info] of totals) {
|
|
551
|
+
rows.push({
|
|
552
|
+
key: "Token",
|
|
553
|
+
value: info.sym ? `${info.sym} — ${shortenId(tokenId)}` : shortenId(tokenId)
|
|
554
|
+
});
|
|
555
|
+
rows.push({ key: "Amount", value: info.amt.toString() });
|
|
556
|
+
}
|
|
557
|
+
const recipient = intent.outputs.find((o) => o.recipient)?.recipient;
|
|
558
|
+
if (recipient)
|
|
559
|
+
rows.push({ key: "Recipient", value: recipient });
|
|
560
|
+
return {
|
|
561
|
+
title: "Token Transfer",
|
|
562
|
+
subtitle: `${shortenOriginator(req.originator)} wants to send tokens`,
|
|
563
|
+
rows,
|
|
564
|
+
network: networkLabel(intent.chain)
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
function summarizeLock(req, intent) {
|
|
568
|
+
const sats = intent.outputs.reduce((s, o) => s + o.satoshis, 0);
|
|
569
|
+
const until = intent.outputs.flatMap((o) => o.tags).find((t) => t.startsWith("lock:until:"))?.slice("lock:until:".length);
|
|
570
|
+
const rows = [{ key: "Amount", value: `${sats} sats` }];
|
|
571
|
+
if (until)
|
|
572
|
+
rows.push({ key: "Lock until block", value: until });
|
|
573
|
+
return {
|
|
574
|
+
title: "Lock BSV",
|
|
575
|
+
subtitle: `${shortenOriginator(req.originator)} wants to time-lock funds`,
|
|
576
|
+
rows,
|
|
577
|
+
network: networkLabel(intent.chain)
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
function summarizeUnlock(req, intent) {
|
|
581
|
+
const sats = intent.inputs.reduce((s, i) => s + i.satoshis, 0);
|
|
582
|
+
return {
|
|
583
|
+
title: "Unlock Matured",
|
|
584
|
+
subtitle: `${shortenOriginator(req.originator)} wants to unlock matured locks`,
|
|
585
|
+
rows: [{ key: "Amount", value: `${sats} sats` }],
|
|
586
|
+
network: networkLabel(intent.chain)
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
function summarizeInscription(req, intent) {
|
|
590
|
+
const recipient = intent.outputs.find((o) => o.recipient)?.recipient;
|
|
591
|
+
const rows = [];
|
|
592
|
+
if (recipient)
|
|
593
|
+
rows.push({ key: "Recipient", value: recipient });
|
|
594
|
+
return {
|
|
595
|
+
title: "Create Inscription",
|
|
596
|
+
subtitle: `${shortenOriginator(req.originator)} wants to inscribe content`,
|
|
597
|
+
rows,
|
|
598
|
+
network: networkLabel(intent.chain)
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
function summarizeSocialPost(req, intent) {
|
|
602
|
+
return {
|
|
603
|
+
title: "Social Post",
|
|
604
|
+
subtitle: `${shortenOriginator(req.originator)} wants to publish a post`,
|
|
605
|
+
rows: [],
|
|
606
|
+
network: networkLabel(intent.chain)
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
function summarizeUnknownTx(req, intent) {
|
|
610
|
+
const ins = intent.inputs.length;
|
|
611
|
+
const outs = intent.outputs.length;
|
|
612
|
+
return {
|
|
613
|
+
title: "Transaction Request",
|
|
614
|
+
subtitle: `${shortenOriginator(req.originator)} wants to ${req.summary.toLowerCase()}`,
|
|
615
|
+
rows: [{ key: "Inputs / Outputs", value: `${ins} / ${outs}` }],
|
|
616
|
+
network: networkLabel(intent.chain)
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
function networkLabel(chain) {
|
|
620
|
+
return chain === "testnet" ? "BSV Testnet" : "BSV Mainnet";
|
|
621
|
+
}
|
|
622
|
+
function shortenId(id, max = 24) {
|
|
623
|
+
if (id.length <= max)
|
|
624
|
+
return id;
|
|
625
|
+
return `${id.slice(0, 8)}…${id.slice(-6)}`;
|
|
626
|
+
}
|
|
418
627
|
function summarizeProtocol(req) {
|
|
419
628
|
const intent = req.intent;
|
|
420
629
|
const rows = [
|
|
@@ -427,29 +636,6 @@ function summarizeProtocol(req) {
|
|
|
427
636
|
rows
|
|
428
637
|
};
|
|
429
638
|
}
|
|
430
|
-
function summarizeTransaction(req) {
|
|
431
|
-
const intent = req.intent;
|
|
432
|
-
const rows = [];
|
|
433
|
-
let totalSats = 0;
|
|
434
|
-
for (const out of intent.outputs ?? []) {
|
|
435
|
-
totalSats += out.satoshis ?? 0;
|
|
436
|
-
if (out.outputDescription) {
|
|
437
|
-
rows.push({
|
|
438
|
-
key: out.outputDescription,
|
|
439
|
-
value: `${out.satoshis ?? 0} sats`
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
if (rows.length === 0 && totalSats > 0) {
|
|
444
|
-
rows.push({ key: "Total Out", value: `${totalSats} sats` });
|
|
445
|
-
}
|
|
446
|
-
return {
|
|
447
|
-
title: "Transaction Request",
|
|
448
|
-
subtitle: `${shortenOriginator(req.originator)} wants to ${req.summary.toLowerCase()}`,
|
|
449
|
-
rows,
|
|
450
|
-
network: "BSV Mainnet"
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
639
|
function summarizeSignature(req) {
|
|
454
640
|
const intent = req.intent;
|
|
455
641
|
const rows = [];
|
package/dist/styles.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* Colors and spacing are kept minimal and theme-driven via CSS variables;
|
|
6
6
|
* a designer pass will replace these with the production palette.
|
|
7
7
|
*/
|
|
8
|
-
export declare const promptStyles = "\n.opp-root {\n --opp-bg: #ffffff;\n --opp-fg: #1a1a1a;\n --opp-muted: #6b7280;\n --opp-card-bg: #f5f5f7;\n --opp-card-border: #e5e7eb;\n --opp-accent: #f59e0b;\n --opp-approve-bg: #f59e0b;\n --opp-approve-fg: #ffffff;\n --opp-reject-bg: #ffffff;\n --opp-reject-fg: #1a1a1a;\n --opp-reject-border: #d1d5db;\n --opp-status-bg: #fde68a;\n --opp-status-fg: #92400e;\n\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n background: var(--opp-bg);\n color: var(--opp-fg);\n border-radius: 12px;\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: #1a1a1a;\n --opp-fg: #f5f5f7;\n --opp-muted: #9ca3af;\n --opp-card-bg: #262626;\n --opp-card-border: #3a3a3a;\n --opp-reject-bg: #262626;\n --opp-reject-fg: #f5f5f7;\n --opp-reject-border: #3a3a3a;\n --opp-status-bg: rgba(245, 158, 11, 0.2);\n --opp-status-fg: #fbbf24;\n}\n\n.opp-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n border-bottom: 1px solid var(--opp-card-border);\n}\n\n.opp-header-brand,\n.opp-header-app {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n font-weight: 600;\n}\n\n.opp-avatar {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: var(--opp-accent);\n color: #ffffff;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n font-weight: 700;\n flex-shrink: 0;\n}\n\n.opp-avatar.opp-app {\n background: #3b82f6;\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-icon {\n width: 36px;\n height: 36px;\n border-radius: 50%;\n background: var(--opp-card-bg);\n border: 1px solid var(--opp-card-border);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 4px;\n}\n\n.opp-title {\n font-size: 18px;\n font-weight: 700;\n margin: 0;\n text-align: center;\n}\n\n.opp-subtitle {\n font-size: 13px;\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: 12px;\n font-weight: 600;\n margin-top: 4px;\n}\n\n.opp-card {\n background: var(--opp-card-bg);\n border-radius: 8px;\n margin: 0 16px;\n padding: 12px 16px;\n font-size: 13px;\n display: flex;\n flex-direction: column;\n gap: 8px;\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: ui-monospace, SFMono-Regular, monospace;\n font-size: 12px;\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}\n\n.opp-actions {\n display: flex;\n gap: 12px;\n padding: 16px 20px 12px;\n}\n\n.opp-button {\n flex: 1;\n padding: 12px 16px;\n border-radius: 8px;\n font-size: 14px;\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 flex-direction: column;\n align-items: center;\n gap: 4px;\n padding: 8px 20px 16px;\n font-size: 11px;\n color: var(--opp-muted);\n text-align: center;\n}\n";
|
|
8
|
+
export declare const promptStyles = "\n.opp-root {\n --opp-bg: #ffffff;\n --opp-fg: #1a1a1a;\n --opp-muted: #6b7280;\n --opp-card-bg: #f5f5f7;\n --opp-card-border: #e5e7eb;\n --opp-accent: #f59e0b;\n --opp-approve-bg: #f59e0b;\n --opp-approve-fg: #ffffff;\n --opp-reject-bg: #ffffff;\n --opp-reject-fg: #1a1a1a;\n --opp-reject-border: #d1d5db;\n --opp-status-bg: #fde68a;\n --opp-status-fg: #92400e;\n\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n background: var(--opp-bg);\n color: var(--opp-fg);\n border-radius: 12px;\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: #1a1a1a;\n --opp-fg: #f5f5f7;\n --opp-muted: #9ca3af;\n --opp-card-bg: #262626;\n --opp-card-border: #3a3a3a;\n --opp-reject-bg: #262626;\n --opp-reject-fg: #f5f5f7;\n --opp-reject-border: #3a3a3a;\n --opp-status-bg: rgba(245, 158, 11, 0.2);\n --opp-status-fg: #fbbf24;\n}\n\n.opp-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n border-bottom: 1px solid var(--opp-card-border);\n}\n\n.opp-header-brand,\n.opp-header-app {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n font-weight: 600;\n}\n\n.opp-avatar {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: var(--opp-accent);\n color: #ffffff;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n font-weight: 700;\n flex-shrink: 0;\n}\n\n.opp-avatar.opp-app {\n background: #3b82f6;\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-icon {\n width: 36px;\n height: 36px;\n border-radius: 50%;\n background: var(--opp-card-bg);\n border: 1px solid var(--opp-card-border);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 4px;\n}\n\n.opp-title {\n font-size: 18px;\n font-weight: 700;\n margin: 0;\n text-align: center;\n}\n\n.opp-subtitle {\n font-size: 13px;\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: 12px;\n font-weight: 600;\n margin-top: 4px;\n}\n\n.opp-card {\n background: var(--opp-card-bg);\n border-radius: 8px;\n margin: 0 16px;\n padding: 12px 16px;\n font-size: 13px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.opp-featured {\n display: flex;\n align-items: center;\n gap: 12px;\n background: var(--opp-card-bg);\n border-radius: 8px;\n margin: 0 16px;\n padding: 12px;\n}\n\n.opp-featured-image {\n width: 64px;\n height: 64px;\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 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: ui-monospace, SFMono-Regular, monospace;\n font-size: 12px;\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}\n\n.opp-actions {\n display: flex;\n gap: 12px;\n padding: 16px 20px 12px;\n}\n\n.opp-button {\n flex: 1;\n padding: 12px 16px;\n border-radius: 8px;\n font-size: 14px;\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 flex-direction: column;\n align-items: center;\n gap: 4px;\n padding: 8px 20px 16px;\n font-size: 11px;\n color: var(--opp-muted);\n text-align: center;\n}\n";
|
|
9
9
|
//# 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;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,q/IAqPxB,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.6",
|
|
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.8"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^18.0.0 || ^19.0.0"
|