@1sat/permission-module-ui 0.0.40 → 0.0.41
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;AAU5D,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;
|
|
1
|
+
{"version":3,"file":"OneSatPermissionPrompt.d.ts","sourceRoot":"","sources":["../src/OneSatPermissionPrompt.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAU5D,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;AAkED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EACtC,OAAO,EACP,SAAS,EACT,QAAQ,EACR,KAAc,GACd,EAAE,2BAA2B,+BAyL7B"}
|
package/dist/index.js
CHANGED
|
@@ -29,7 +29,6 @@ var P1SAT_INTENTS = {
|
|
|
29
29
|
BSV21_DEPLOY: "bsv21.deploy"
|
|
30
30
|
};
|
|
31
31
|
var P1SAT_INTENT_IDS = new Set(Object.values(P1SAT_INTENTS));
|
|
32
|
-
var OPNS_REGISTER_LOCK_PLACEHOLDER_HEX = "00".repeat(142);
|
|
33
32
|
var MAX_INSCRIPTION_BYTES = 50 * 1024 * 1024;
|
|
34
33
|
var EXCHANGE_RATE_CACHE_TTL = 5 * 60 * 1000;
|
|
35
34
|
var DEFAULT_STREAM_CHUNK_SIZE = 1024 * 1024;
|
|
@@ -1216,6 +1215,9 @@ function summarizeOpns(req, intent) {
|
|
|
1216
1215
|
const rows = [];
|
|
1217
1216
|
if (name)
|
|
1218
1217
|
rows.push({ key: "Name", value: name });
|
|
1218
|
+
if (opnsOutput?.opnsProfileName) {
|
|
1219
|
+
rows.push({ key: "Display name", value: opnsOutput.opnsProfileName });
|
|
1220
|
+
}
|
|
1219
1221
|
if (recipient)
|
|
1220
1222
|
rows.push(copyable("Recipient", recipient));
|
|
1221
1223
|
if (price)
|
|
@@ -1224,10 +1226,20 @@ function summarizeOpns(req, intent) {
|
|
|
1224
1226
|
rows.push(copyable("Origin", origin));
|
|
1225
1227
|
const copy = opnsCopy(intent.p1satIntent, Boolean(recipient));
|
|
1226
1228
|
const nameBit = name ? `“${name}”` : "an OpNS name";
|
|
1229
|
+
const avatarOrigin = opnsOutput?.opnsAvatarOrigin;
|
|
1230
|
+
const avatarUrl = avatarOrigin ? intent.contentUrls?.[avatarOrigin] : undefined;
|
|
1227
1231
|
return {
|
|
1228
1232
|
title: copy.title,
|
|
1229
1233
|
subtitle: `${shortenOriginator(req.originator)} wants to ${copy.verb} ${nameBit}`,
|
|
1230
|
-
rows
|
|
1234
|
+
rows,
|
|
1235
|
+
...avatarUrl && {
|
|
1236
|
+
featured: {
|
|
1237
|
+
variant: "token",
|
|
1238
|
+
imageUrl: avatarUrl,
|
|
1239
|
+
title: opnsOutput?.opnsProfileName ?? name ?? "Avatar",
|
|
1240
|
+
...name && { subtitle: name }
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1231
1243
|
};
|
|
1232
1244
|
}
|
|
1233
1245
|
function opnsCopy(p1satIntent, isTransferHeuristic) {
|
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.41",
|
|
4
4
|
"description": "React component for the 1Sat permission module's prompt UX",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@1sat/permission-module": "0.0.
|
|
32
|
-
"@1sat/types": "0.0.
|
|
31
|
+
"@1sat/permission-module": "0.0.46",
|
|
32
|
+
"@1sat/types": "0.0.39"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "^18.0.0 || ^19.0.0"
|