@celljs/ta-nearby 4.13.0 → 4.14.0
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/extension/index.mjs +22 -1
- package/host/index.mjs +189 -4
- package/package.json +6 -6
- package/web/index.js +10 -2
package/extension/index.mjs
CHANGED
|
@@ -31,6 +31,27 @@ var TaHostUtil;
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
TaHostUtil2.reach = reach;
|
|
34
|
+
function marked(systemPrompt, mark) {
|
|
35
|
+
return role(systemPrompt).includes(mark);
|
|
36
|
+
}
|
|
37
|
+
TaHostUtil2.marked = marked;
|
|
38
|
+
function role(systemPrompt) {
|
|
39
|
+
if (!systemPrompt) {
|
|
40
|
+
return "";
|
|
41
|
+
}
|
|
42
|
+
const open = `<addendum>
|
|
43
|
+
`;
|
|
44
|
+
const start = systemPrompt.indexOf(open);
|
|
45
|
+
const context = systemPrompt.indexOf(`<project_context>
|
|
46
|
+
`);
|
|
47
|
+
if (start < 0 || context >= 0 && context < start) {
|
|
48
|
+
return "";
|
|
49
|
+
}
|
|
50
|
+
const end = systemPrompt.indexOf(`
|
|
51
|
+
</addendum>`, start);
|
|
52
|
+
return systemPrompt.slice(start + open.length, end < 0 ? undefined : end);
|
|
53
|
+
}
|
|
54
|
+
TaHostUtil2.role = role;
|
|
34
55
|
})(TaHostUtil || (TaHostUtil = {}));
|
|
35
56
|
var TA_WITH_OTHERS_MARK = "[ta:speaks-with-others]";
|
|
36
57
|
var TA_ASK_ENTRY = "ta-ask";
|
|
@@ -244,7 +265,7 @@ function activate(pi) {
|
|
|
244
265
|
return service2;
|
|
245
266
|
};
|
|
246
267
|
pi.on("before_agent_start", async (event, ctx) => {
|
|
247
|
-
if (ctx.getSystemPrompt()
|
|
268
|
+
if (TaHostUtil.marked(ctx.getSystemPrompt(), TA_WITH_OTHERS_MARK)) {
|
|
248
269
|
return;
|
|
249
270
|
}
|
|
250
271
|
const section = (await reach()).service?.section();
|
package/host/index.mjs
CHANGED
|
@@ -328,6 +328,168 @@ var NearbyMeetUtil;
|
|
|
328
328
|
import { createSocket } from "node:dgram";
|
|
329
329
|
import { createConnection, createServer } from "node:net";
|
|
330
330
|
import { networkInterfaces } from "node:os";
|
|
331
|
+
|
|
332
|
+
// ../ta-relay/esm/common/relay-bytes.js
|
|
333
|
+
var RelayBytes;
|
|
334
|
+
(function(RelayBytes2) {
|
|
335
|
+
function random(length) {
|
|
336
|
+
return globalThis.crypto.getRandomValues(new Uint8Array(length));
|
|
337
|
+
}
|
|
338
|
+
RelayBytes2.random = random;
|
|
339
|
+
function toBase64(bytes) {
|
|
340
|
+
let binary = "";
|
|
341
|
+
for (const byte of bytes) {
|
|
342
|
+
binary += String.fromCharCode(byte);
|
|
343
|
+
}
|
|
344
|
+
return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
345
|
+
}
|
|
346
|
+
RelayBytes2.toBase64 = toBase64;
|
|
347
|
+
function fromBase64(text) {
|
|
348
|
+
if (!/^[A-Za-z0-9_-]*$/.test(text)) {
|
|
349
|
+
throw new Error("Not base64url.");
|
|
350
|
+
}
|
|
351
|
+
const binary = atob(text.replace(/-/g, "+").replace(/_/g, "/"));
|
|
352
|
+
const bytes = new Uint8Array(binary.length);
|
|
353
|
+
for (let i = 0;i < binary.length; i++) {
|
|
354
|
+
bytes[i] = binary.charCodeAt(i);
|
|
355
|
+
}
|
|
356
|
+
return bytes;
|
|
357
|
+
}
|
|
358
|
+
RelayBytes2.fromBase64 = fromBase64;
|
|
359
|
+
function concat(...parts) {
|
|
360
|
+
const bytes = new Uint8Array(parts.reduce((length, part) => length + part.length, 0));
|
|
361
|
+
let offset = 0;
|
|
362
|
+
for (const part of parts) {
|
|
363
|
+
bytes.set(part, offset);
|
|
364
|
+
offset += part.length;
|
|
365
|
+
}
|
|
366
|
+
return bytes;
|
|
367
|
+
}
|
|
368
|
+
RelayBytes2.concat = concat;
|
|
369
|
+
})(RelayBytes || (RelayBytes = {}));
|
|
370
|
+
|
|
371
|
+
// ../ta-relay/esm/common/relay-identity.js
|
|
372
|
+
var encoder = new TextEncoder;
|
|
373
|
+
var decoder = new TextDecoder;
|
|
374
|
+
var subtle = () => globalThis.crypto.subtle;
|
|
375
|
+
var SIGN = { name: "ECDSA", namedCurve: "P-256" };
|
|
376
|
+
var BOX = { name: "ECDH", namedCurve: "P-256" };
|
|
377
|
+
var SIGNATURE = { name: "ECDSA", hash: "SHA-256" };
|
|
378
|
+
var RelayKeys;
|
|
379
|
+
(function(RelayKeys2) {
|
|
380
|
+
async function hkdf(key, salt, info) {
|
|
381
|
+
const secret = await subtle().importKey("raw", key, "HKDF", false, ["deriveBits"]);
|
|
382
|
+
const bits = await subtle().deriveBits({ name: "HKDF", hash: "SHA-256", salt, info: encoder.encode(info) }, secret, 256);
|
|
383
|
+
return new Uint8Array(bits);
|
|
384
|
+
}
|
|
385
|
+
RelayKeys2.hkdf = hkdf;
|
|
386
|
+
async function sha256(bytes) {
|
|
387
|
+
const data = typeof bytes === "string" ? encoder.encode(bytes) : bytes;
|
|
388
|
+
return new Uint8Array(await subtle().digest("SHA-256", data));
|
|
389
|
+
}
|
|
390
|
+
RelayKeys2.sha256 = sha256;
|
|
391
|
+
async function hash(text) {
|
|
392
|
+
return RelayBytes.toBase64(await sha256(text));
|
|
393
|
+
}
|
|
394
|
+
RelayKeys2.hash = hash;
|
|
395
|
+
async function hmac(key, text) {
|
|
396
|
+
const imported = await subtle().importKey("raw", key, { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
|
|
397
|
+
return RelayBytes.toBase64(new Uint8Array(await subtle().sign("HMAC", imported, encoder.encode(text))));
|
|
398
|
+
}
|
|
399
|
+
RelayKeys2.hmac = hmac;
|
|
400
|
+
function aesKey(key) {
|
|
401
|
+
return subtle().importKey("raw", key, "AES-GCM", false, ["encrypt", "decrypt"]);
|
|
402
|
+
}
|
|
403
|
+
RelayKeys2.aesKey = aesKey;
|
|
404
|
+
async function seal(key, text) {
|
|
405
|
+
const iv = RelayBytes.random(12);
|
|
406
|
+
const sealed = await subtle().encrypt({ name: "AES-GCM", iv }, key, encoder.encode(text));
|
|
407
|
+
return RelayBytes.toBase64(RelayBytes.concat(iv, new Uint8Array(sealed)));
|
|
408
|
+
}
|
|
409
|
+
RelayKeys2.seal = seal;
|
|
410
|
+
async function open(key, sealed) {
|
|
411
|
+
const bytes = RelayBytes.fromBase64(sealed);
|
|
412
|
+
const opened = await subtle().decrypt({ name: "AES-GCM", iv: bytes.subarray(0, 12) }, key, bytes.subarray(12));
|
|
413
|
+
return decoder.decode(opened);
|
|
414
|
+
}
|
|
415
|
+
RelayKeys2.open = open;
|
|
416
|
+
})(RelayKeys || (RelayKeys = {}));
|
|
417
|
+
var RelayIdentityUtil;
|
|
418
|
+
(function(RelayIdentityUtil2) {
|
|
419
|
+
async function create(name, now = Date.now()) {
|
|
420
|
+
const sign2 = await subtle().generateKey(SIGN, true, ["sign", "verify"]);
|
|
421
|
+
const box = await subtle().generateKey(BOX, true, ["deriveBits"]);
|
|
422
|
+
const raw = async (key) => RelayBytes.toBase64(new Uint8Array(await subtle().exportKey("raw", key)));
|
|
423
|
+
const [signPublic, boxPublic] = await Promise.all([raw(sign2.publicKey), raw(box.publicKey)]);
|
|
424
|
+
return {
|
|
425
|
+
id: await id(signPublic, boxPublic),
|
|
426
|
+
name,
|
|
427
|
+
sign: signPublic,
|
|
428
|
+
box: boxPublic,
|
|
429
|
+
signKey: await subtle().exportKey("jwk", sign2.privateKey),
|
|
430
|
+
boxKey: await subtle().exportKey("jwk", box.privateKey),
|
|
431
|
+
createdAt: now
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
RelayIdentityUtil2.create = create;
|
|
435
|
+
async function id(sign2, box) {
|
|
436
|
+
const digest = await RelayKeys.sha256(RelayBytes.concat(RelayBytes.fromBase64(sign2), RelayBytes.fromBase64(box)));
|
|
437
|
+
return RelayBytes.toBase64(digest.subarray(0, 16));
|
|
438
|
+
}
|
|
439
|
+
RelayIdentityUtil2.id = id;
|
|
440
|
+
async function check(identity) {
|
|
441
|
+
try {
|
|
442
|
+
if (identity.id !== await id(identity.sign, identity.box)) {
|
|
443
|
+
return false;
|
|
444
|
+
}
|
|
445
|
+
await Promise.all([importSign(identity.sign), importBox(identity.box)]);
|
|
446
|
+
return true;
|
|
447
|
+
} catch (_a) {
|
|
448
|
+
return false;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
RelayIdentityUtil2.check = check;
|
|
452
|
+
function publicOf(identity) {
|
|
453
|
+
return withLook({ id: identity.id, name: identity.name, sign: identity.sign, box: identity.box }, identity.look);
|
|
454
|
+
}
|
|
455
|
+
RelayIdentityUtil2.publicOf = publicOf;
|
|
456
|
+
function isLook(look) {
|
|
457
|
+
return typeof look === "string" && /^[a-z][a-z0-9-]{0,31}$/.test(look);
|
|
458
|
+
}
|
|
459
|
+
RelayIdentityUtil2.isLook = isLook;
|
|
460
|
+
function withLook(value, look) {
|
|
461
|
+
const { look: _, ...rest } = value;
|
|
462
|
+
return isLook(look) ? { ...rest, look } : rest;
|
|
463
|
+
}
|
|
464
|
+
RelayIdentityUtil2.withLook = withLook;
|
|
465
|
+
async function sign(identity, text) {
|
|
466
|
+
const key = await subtle().importKey("jwk", identity.signKey, SIGN, false, ["sign"]);
|
|
467
|
+
return RelayBytes.toBase64(new Uint8Array(await subtle().sign(SIGNATURE, key, encoder.encode(text))));
|
|
468
|
+
}
|
|
469
|
+
RelayIdentityUtil2.sign = sign;
|
|
470
|
+
async function verify(signPublic, text, signature) {
|
|
471
|
+
try {
|
|
472
|
+
return await subtle().verify(SIGNATURE, await importSign(signPublic), RelayBytes.fromBase64(signature), encoder.encode(text));
|
|
473
|
+
} catch (_a) {
|
|
474
|
+
return false;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
RelayIdentityUtil2.verify = verify;
|
|
478
|
+
async function agree(identity, otherBox, salt, info) {
|
|
479
|
+
const own = await subtle().importKey("jwk", identity.boxKey, BOX, false, ["deriveBits"]);
|
|
480
|
+
const shared = await subtle().deriveBits({ name: "ECDH", public: await importBox(otherBox) }, own, 256);
|
|
481
|
+
return RelayKeys.hkdf(new Uint8Array(shared), encoder.encode(salt), info);
|
|
482
|
+
}
|
|
483
|
+
RelayIdentityUtil2.agree = agree;
|
|
484
|
+
function importSign(raw) {
|
|
485
|
+
return subtle().importKey("raw", RelayBytes.fromBase64(raw), SIGN, false, ["verify"]);
|
|
486
|
+
}
|
|
487
|
+
function importBox(raw) {
|
|
488
|
+
return subtle().importKey("raw", RelayBytes.fromBase64(raw), BOX, false, []);
|
|
489
|
+
}
|
|
490
|
+
})(RelayIdentityUtil || (RelayIdentityUtil = {}));
|
|
491
|
+
|
|
492
|
+
// web-src/nearby-net.ts
|
|
331
493
|
var OFFERS = ["show", "work"];
|
|
332
494
|
var MAX_LINE = 1500000;
|
|
333
495
|
var SEND_MS = 4000;
|
|
@@ -367,7 +529,8 @@ var NearbyNetUtil;
|
|
|
367
529
|
x: data.x,
|
|
368
530
|
h: data.h,
|
|
369
531
|
...offers.length ? { o: [...new Set(offers)] } : {},
|
|
370
|
-
...data.m === 1 ? { m: 1 } : {}
|
|
532
|
+
...data.m === 1 ? { m: 1 } : {},
|
|
533
|
+
...RelayIdentityUtil.isLook(data.l) ? { l: data.l } : {}
|
|
371
534
|
};
|
|
372
535
|
} catch {
|
|
373
536
|
return;
|
|
@@ -911,6 +1074,7 @@ var GATHER_MS = 5 * 60000;
|
|
|
911
1074
|
var PROPOSE_GAP_MS = 2 * 60 * 60000;
|
|
912
1075
|
var SKEW_MS = 5 * 60000;
|
|
913
1076
|
var TICK_MS = 2000;
|
|
1077
|
+
var IDENTITY_MS = 1e4;
|
|
914
1078
|
var INITIATIVE = "@celljs/ta-initiative";
|
|
915
1079
|
var NOTIFY = "@celljs/ta-notify";
|
|
916
1080
|
var ROOM_KIND = "nearby.room";
|
|
@@ -933,6 +1097,7 @@ class NearbyService {
|
|
|
933
1097
|
sent = new Map;
|
|
934
1098
|
received = new Map;
|
|
935
1099
|
identity;
|
|
1100
|
+
identityAt = 0;
|
|
936
1101
|
friends = [];
|
|
937
1102
|
friendsAt = 0;
|
|
938
1103
|
error;
|
|
@@ -1023,7 +1188,11 @@ class NearbyService {
|
|
|
1023
1188
|
return {
|
|
1024
1189
|
visible: !!this.visible,
|
|
1025
1190
|
...this.visible?.until !== undefined ? { until: this.visible.until } : {},
|
|
1026
|
-
self: {
|
|
1191
|
+
self: {
|
|
1192
|
+
name: this.selfName(),
|
|
1193
|
+
face: this.identity ? FaceUtil.of(this.identity.id) : 0,
|
|
1194
|
+
...this.identity?.look ? { look: this.identity.look } : {}
|
|
1195
|
+
},
|
|
1027
1196
|
peers: this.peers(),
|
|
1028
1197
|
invites: [...this.received.values()].filter((invite) => now - invite.at < INVITE_MS).map(({ link: _, ...invite }) => invite),
|
|
1029
1198
|
...this.shown ? { shown: NearbyService.withoutData(this.shown) } : {},
|
|
@@ -1035,7 +1204,15 @@ class NearbyService {
|
|
|
1035
1204
|
};
|
|
1036
1205
|
}
|
|
1037
1206
|
peers() {
|
|
1038
|
-
return [...this.heard.values()].sort((a, b) => a.since - b.since).map(({ data, since, friend }) => ({
|
|
1207
|
+
return [...this.heard.values()].sort((a, b) => a.since - b.since).map(({ data, since, friend }) => ({
|
|
1208
|
+
e: data.e,
|
|
1209
|
+
name: data.n,
|
|
1210
|
+
face: data.f,
|
|
1211
|
+
...data.l ? { look: data.l } : {},
|
|
1212
|
+
...friend ? { friend } : {},
|
|
1213
|
+
offers: data.o ?? [],
|
|
1214
|
+
since
|
|
1215
|
+
}));
|
|
1039
1216
|
}
|
|
1040
1217
|
section() {
|
|
1041
1218
|
if (!this.visible) {
|
|
@@ -1114,6 +1291,7 @@ class NearbyService {
|
|
|
1114
1291
|
e: keys.e,
|
|
1115
1292
|
n: this.selfName(),
|
|
1116
1293
|
f: this.identity ? FaceUtil.of(this.identity.id) : 0,
|
|
1294
|
+
...this.identity?.look ? { l: this.identity.look } : {},
|
|
1117
1295
|
p: port,
|
|
1118
1296
|
a: NearbyNetUtil.addresses(),
|
|
1119
1297
|
x: keys.x,
|
|
@@ -1132,9 +1310,10 @@ class NearbyService {
|
|
|
1132
1310
|
return this.settings.hideName ? "" : (this.identity?.name ?? "").slice(0, 40);
|
|
1133
1311
|
}
|
|
1134
1312
|
async loadIdentity() {
|
|
1313
|
+
this.identityAt = this.now();
|
|
1135
1314
|
try {
|
|
1136
1315
|
const identity = await this.host.rooms.getIdentity();
|
|
1137
|
-
this.identity = { id: identity.id, name: identity.name };
|
|
1316
|
+
this.identity = { id: identity.id, name: identity.name, ...identity.look ? { look: identity.look } : {} };
|
|
1138
1317
|
} catch {}
|
|
1139
1318
|
}
|
|
1140
1319
|
async tick() {
|
|
@@ -1147,6 +1326,9 @@ class NearbyService {
|
|
|
1147
1326
|
await this.publish(true);
|
|
1148
1327
|
return;
|
|
1149
1328
|
}
|
|
1329
|
+
if (this.keys && now - this.identityAt >= IDENTITY_MS) {
|
|
1330
|
+
await this.loadIdentity();
|
|
1331
|
+
}
|
|
1150
1332
|
if (this.keys && now - this.keys.createdAt >= SLOT_MS) {
|
|
1151
1333
|
this.previous = this.keys;
|
|
1152
1334
|
this.keys = new NearbyKeys(now);
|
|
@@ -1331,6 +1513,7 @@ class NearbyService {
|
|
|
1331
1513
|
title: String(message.title ?? "").slice(0, 80) || NearbyTexts.nearby(),
|
|
1332
1514
|
name: heard.data.n,
|
|
1333
1515
|
face: heard.data.f,
|
|
1516
|
+
...heard.data.l ? { look: heard.data.l } : {},
|
|
1334
1517
|
...heard.friend ? { friend: heard.friend } : {},
|
|
1335
1518
|
...typeof message.why === "string" && message.why ? { why: message.why.slice(0, 200) } : {},
|
|
1336
1519
|
at: this.now(),
|
|
@@ -1405,6 +1588,7 @@ class NearbyService {
|
|
|
1405
1588
|
kind: message.kind,
|
|
1406
1589
|
name: heard.data.n,
|
|
1407
1590
|
face: heard.data.f,
|
|
1591
|
+
...heard.data.l ? { look: heard.data.l } : {},
|
|
1408
1592
|
...heard.friend ? { friend: heard.friend } : {},
|
|
1409
1593
|
ask: mode === "ask",
|
|
1410
1594
|
at: this.now(),
|
|
@@ -1586,6 +1770,7 @@ class NearbyService {
|
|
|
1586
1770
|
e: heard.data.e,
|
|
1587
1771
|
name: heard.data.n,
|
|
1588
1772
|
face: heard.data.f,
|
|
1773
|
+
...heard.data.l ? { look: heard.data.l } : {},
|
|
1589
1774
|
...heard.friend ? { friend: heard.friend } : {},
|
|
1590
1775
|
line: String(message.line ?? "").slice(0, 200),
|
|
1591
1776
|
why: String(message.why ?? "").slice(0, 300),
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-nearby",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.0",
|
|
4
4
|
"description": "A pi package for Ta: the other Ta around on the same network while you let them see you, known to Ta in your conversations, and rooms of those present made in a tap",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
7
7
|
],
|
|
8
|
-
"homepage": "https://github.com/cellbang/
|
|
8
|
+
"homepage": "https://github.com/cellbang/ta",
|
|
9
9
|
"bugs": {
|
|
10
|
-
"url": "https://github.com/cellbang/
|
|
10
|
+
"url": "https://github.com/cellbang/ta/issues"
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@celljs/ta-protocol": "4.
|
|
31
|
-
"@celljs/ta-relay": "4.
|
|
32
|
-
"@celljs/ta-web": "4.
|
|
30
|
+
"@celljs/ta-protocol": "4.14.0",
|
|
31
|
+
"@celljs/ta-relay": "4.14.0",
|
|
32
|
+
"@celljs/ta-web": "4.14.0",
|
|
33
33
|
"@types/react": "^19.3.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
package/web/index.js
CHANGED
|
@@ -288,10 +288,11 @@ function restOfDay(now = new Date) {
|
|
|
288
288
|
end.setHours(23, 59, 59, 999);
|
|
289
289
|
return Math.max(1, Math.round((end.getTime() - now.getTime()) / 60000));
|
|
290
290
|
}
|
|
291
|
-
function Face({ seed, face, size }) {
|
|
291
|
+
function Face({ seed, face, look, size }) {
|
|
292
292
|
return /* @__PURE__ */ React.createElement(pi.ui.Face, {
|
|
293
293
|
seed,
|
|
294
294
|
face,
|
|
295
|
+
look,
|
|
295
296
|
size
|
|
296
297
|
});
|
|
297
298
|
}
|
|
@@ -324,6 +325,7 @@ function Looking({ peers }) {
|
|
|
324
325
|
}, /* @__PURE__ */ React.createElement(Face, {
|
|
325
326
|
seed: peer.friend?.id ?? peer.e,
|
|
326
327
|
face: peer.face,
|
|
328
|
+
look: peer.look,
|
|
327
329
|
size: 30
|
|
328
330
|
}))));
|
|
329
331
|
}
|
|
@@ -365,6 +367,7 @@ function PeerTile({ peer, chosen, toggle }) {
|
|
|
365
367
|
}, /* @__PURE__ */ React.createElement(Face, {
|
|
366
368
|
seed: peer.friend?.id ?? peer.e,
|
|
367
369
|
face: peer.face,
|
|
370
|
+
look: peer.look,
|
|
368
371
|
size: 52
|
|
369
372
|
}), /* @__PURE__ */ React.createElement("span", {
|
|
370
373
|
className: "tnb-check"
|
|
@@ -382,6 +385,7 @@ function InviteRow({ invite }) {
|
|
|
382
385
|
}, /* @__PURE__ */ React.createElement(Face, {
|
|
383
386
|
seed: invite.friend?.id ?? invite.e,
|
|
384
387
|
face: invite.face,
|
|
388
|
+
look: invite.look,
|
|
385
389
|
size: 40
|
|
386
390
|
}), /* @__PURE__ */ React.createElement("div", {
|
|
387
391
|
className: "tnb-invite-text"
|
|
@@ -588,6 +592,7 @@ function ShowOverlay({ shown, close }) {
|
|
|
588
592
|
}, /* @__PURE__ */ React.createElement(Face, {
|
|
589
593
|
seed: current.friend?.id ?? current.k,
|
|
590
594
|
face: current.face,
|
|
595
|
+
look: current.look,
|
|
591
596
|
size: 48
|
|
592
597
|
}), /* @__PURE__ */ React.createElement("strong", null, t("wantsToShow", { name: who(current), title: current.title }))), /* @__PURE__ */ React.createElement("p", {
|
|
593
598
|
className: "tnb-quiet"
|
|
@@ -609,6 +614,7 @@ function ShowOverlay({ shown, close }) {
|
|
|
609
614
|
}, /* @__PURE__ */ React.createElement(Face, {
|
|
610
615
|
seed: current.friend?.id ?? current.k,
|
|
611
616
|
face: current.face,
|
|
617
|
+
look: current.look,
|
|
612
618
|
size: 26
|
|
613
619
|
}), /* @__PURE__ */ React.createElement("span", {
|
|
614
620
|
className: "tnb-show-title tnb-ellipsis"
|
|
@@ -690,6 +696,7 @@ function GreetRow({ greet }) {
|
|
|
690
696
|
}, /* @__PURE__ */ React.createElement(Face, {
|
|
691
697
|
seed: greet.friend?.id ?? greet.e,
|
|
692
698
|
face: greet.face,
|
|
699
|
+
look: greet.look,
|
|
693
700
|
size: 40
|
|
694
701
|
}), /* @__PURE__ */ React.createElement("div", {
|
|
695
702
|
className: "tnb-invite-text"
|
|
@@ -847,6 +854,7 @@ function openInvite(invite) {
|
|
|
847
854
|
}, /* @__PURE__ */ React.createElement(Face, {
|
|
848
855
|
seed: invite.friend?.id ?? invite.e,
|
|
849
856
|
face: invite.face,
|
|
857
|
+
look: invite.look,
|
|
850
858
|
size: 48
|
|
851
859
|
}), /* @__PURE__ */ React.createElement("div", {
|
|
852
860
|
className: "tnb-invite-text"
|
|
@@ -954,7 +962,7 @@ var STYLE = `
|
|
|
954
962
|
/* Off: what it does, and for how long */
|
|
955
963
|
.tnb-off, .tnb-on { display: flex; flex-direction: column; align-items: center; text-align: center; }
|
|
956
964
|
.tnb-off h2 { margin: 6px 0 6px; font-size: calc(17px * var(--ta-font-scale)); font-weight: 600; }
|
|
957
|
-
.tnb-off p { max-width: 380px; margin: 0; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; }
|
|
965
|
+
.tnb-off p { max-width: 380px; margin: 0; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
|
|
958
966
|
.tnb-durations { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 280px; margin-top: 20px; }
|
|
959
967
|
.tnb-durations .ta-button { width: 100%; justify-content: center; min-height: 40px; }
|
|
960
968
|
/* Rings that go out from the user */
|