@palbase/web 1.6.0 → 1.6.2
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/{analytics-facade-iAWinswQ.d.cts → analytics-facade-ATGUv2-f.d.cts} +8 -0
- package/dist/{analytics-facade-DYNLUW0L.d.ts → analytics-facade-DhcTP_kw.d.ts} +8 -0
- package/dist/{chunk-A5WIPBGQ.js → chunk-XQZ53URR.js} +34 -18
- package/dist/chunk-XQZ53URR.js.map +1 -0
- package/dist/index.cjs +33 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/internal.cjs +33 -17
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +3 -3
- package/dist/internal.d.ts +3 -3
- package/dist/internal.js +1 -1
- package/dist/next/client.cjs +33 -17
- package/dist/next/client.cjs.map +1 -1
- package/dist/next/client.js +1 -1
- package/dist/next/index.cjs +33 -17
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +2 -2
- package/dist/next/index.d.ts +2 -2
- package/dist/next/index.js +1 -1
- package/dist/{pb-DPPpThNg.d.ts → pb-TAUNVyT6.d.ts} +1 -1
- package/dist/{pb-Blj85_cg.d.cts → pb-VzJvX7Gg.d.cts} +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-A5WIPBGQ.js.map +0 -1
|
@@ -1281,6 +1281,14 @@ declare class Chat {
|
|
|
1281
1281
|
start?: 'send' | 'read';
|
|
1282
1282
|
};
|
|
1283
1283
|
}): Promise<SentReceipt>;
|
|
1284
|
+
/** Resolve a send's effective per-message expiry at COMPOSE TIME: the caller's explicit
|
|
1285
|
+
* `expiresIn` if present, ELSE the chat's active default timer stamped onto the message
|
|
1286
|
+
* NOW (the durable record per spec §"Compose-time stamping"). A `send`-anchored expiry
|
|
1287
|
+
* (explicit or default-inherited) stamps `senderSendTs` = the sender's compose epoch
|
|
1288
|
+
* seconds; a `read`-anchored one carries none (the deadline is the recipient's local
|
|
1289
|
+
* first-read). Returns null when there is neither an explicit expiry nor an active
|
|
1290
|
+
* default (a plain, non-disappearing send). Mirrors the iOS compose-time stamping. */
|
|
1291
|
+
private composeExpiry;
|
|
1284
1292
|
/** Set (or DISABLE) this chat's DEFAULT disappearing timer. Emits a `timer_set` control
|
|
1285
1293
|
* envelope (server-blind — an opaque application message, NEVER a bubble) and folds the
|
|
1286
1294
|
* own-set locally so the default applies immediately to subsequent sends that carry no
|
|
@@ -1281,6 +1281,14 @@ declare class Chat {
|
|
|
1281
1281
|
start?: 'send' | 'read';
|
|
1282
1282
|
};
|
|
1283
1283
|
}): Promise<SentReceipt>;
|
|
1284
|
+
/** Resolve a send's effective per-message expiry at COMPOSE TIME: the caller's explicit
|
|
1285
|
+
* `expiresIn` if present, ELSE the chat's active default timer stamped onto the message
|
|
1286
|
+
* NOW (the durable record per spec §"Compose-time stamping"). A `send`-anchored expiry
|
|
1287
|
+
* (explicit or default-inherited) stamps `senderSendTs` = the sender's compose epoch
|
|
1288
|
+
* seconds; a `read`-anchored one carries none (the deadline is the recipient's local
|
|
1289
|
+
* first-read). Returns null when there is neither an explicit expiry nor an active
|
|
1290
|
+
* default (a plain, non-disappearing send). Mirrors the iOS compose-time stamping. */
|
|
1291
|
+
private composeExpiry;
|
|
1284
1292
|
/** Set (or DISABLE) this chat's DEFAULT disappearing timer. Emits a `timer_set` control
|
|
1285
1293
|
* envelope (server-blind — an opaque application message, NEVER a bubble) and folds the
|
|
1286
1294
|
* own-set locally so the default applies immediately to subsequent sends that carry no
|
|
@@ -4574,24 +4574,38 @@ var Chat = class {
|
|
|
4574
4574
|
resolvedReplyTo = resolveReply(replyRef, (id) => this.byClientMsgId.get(id) ?? null);
|
|
4575
4575
|
}
|
|
4576
4576
|
const bodyRanges = opts?.mentions ?? null;
|
|
4577
|
-
const
|
|
4578
|
-
const expiry = opts?.expiresIn ? {
|
|
4579
|
-
v: 1,
|
|
4580
|
-
ttlSeconds: opts.expiresIn.ttlSeconds,
|
|
4581
|
-
start,
|
|
4582
|
-
senderSendTs: start === "send" ? Math.floor(Date.now() / 1e3) : null
|
|
4583
|
-
} : null;
|
|
4577
|
+
const effectiveExpiry = this.composeExpiry(opts?.expiresIn);
|
|
4584
4578
|
const { receipt, clientMsgId } = await this.backend.sendText(
|
|
4585
4579
|
group,
|
|
4586
4580
|
text,
|
|
4587
4581
|
replyRef,
|
|
4588
4582
|
bodyRanges,
|
|
4589
|
-
|
|
4583
|
+
effectiveExpiry
|
|
4590
4584
|
);
|
|
4591
|
-
this.appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges);
|
|
4592
|
-
if (
|
|
4585
|
+
this.appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges, effectiveExpiry);
|
|
4586
|
+
if (effectiveExpiry) void this.armPurge(effectiveExpiry, receipt.serverSeq, clientMsgId);
|
|
4593
4587
|
return receipt;
|
|
4594
4588
|
}
|
|
4589
|
+
/** Resolve a send's effective per-message expiry at COMPOSE TIME: the caller's explicit
|
|
4590
|
+
* `expiresIn` if present, ELSE the chat's active default timer stamped onto the message
|
|
4591
|
+
* NOW (the durable record per spec §"Compose-time stamping"). A `send`-anchored expiry
|
|
4592
|
+
* (explicit or default-inherited) stamps `senderSendTs` = the sender's compose epoch
|
|
4593
|
+
* seconds; a `read`-anchored one carries none (the deadline is the recipient's local
|
|
4594
|
+
* first-read). Returns null when there is neither an explicit expiry nor an active
|
|
4595
|
+
* default (a plain, non-disappearing send). Mirrors the iOS compose-time stamping. */
|
|
4596
|
+
composeExpiry(explicit) {
|
|
4597
|
+
const base = explicit ? {
|
|
4598
|
+
v: 1,
|
|
4599
|
+
ttlSeconds: explicit.ttlSeconds,
|
|
4600
|
+
start: explicit.start ?? "send",
|
|
4601
|
+
senderSendTs: null
|
|
4602
|
+
} : this.defaultExpiry();
|
|
4603
|
+
if (!base) return null;
|
|
4604
|
+
return {
|
|
4605
|
+
...base,
|
|
4606
|
+
senderSendTs: base.start === "send" ? Math.floor(Date.now() / 1e3) : null
|
|
4607
|
+
};
|
|
4608
|
+
}
|
|
4595
4609
|
/** Set (or DISABLE) this chat's DEFAULT disappearing timer. Emits a `timer_set` control
|
|
4596
4610
|
* envelope (server-blind — an opaque application message, NEVER a bubble) and folds the
|
|
4597
4611
|
* own-set locally so the default applies immediately to subsequent sends that carry no
|
|
@@ -4616,7 +4630,7 @@ var Chat = class {
|
|
|
4616
4630
|
eventClientMsgId: clientMsgId
|
|
4617
4631
|
});
|
|
4618
4632
|
}
|
|
4619
|
-
appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges) {
|
|
4633
|
+
appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges, expiry) {
|
|
4620
4634
|
if (receipt.serverSeq <= 0) return;
|
|
4621
4635
|
const key = this.internalKey(receipt.serverSeq);
|
|
4622
4636
|
if (this.seenKeys.has(key)) return;
|
|
@@ -4645,9 +4659,11 @@ var Chat = class {
|
|
|
4645
4659
|
// Mentions T6: resolve the own-sent bubble's mentions for its own render (the
|
|
4646
4660
|
// sender never gets a wire echo of its own message — this is the only local copy).
|
|
4647
4661
|
mentions: this.resolveMentions(text, bodyRanges),
|
|
4648
|
-
// Disappearing T10: the surfaced deadline
|
|
4649
|
-
//
|
|
4650
|
-
|
|
4662
|
+
// Disappearing T10: the surfaced deadline reflects the message's effective expiry
|
|
4663
|
+
// (explicit `expiresIn` OR the chat default stamped at compose time). null only when
|
|
4664
|
+
// this send is non-disappearing. armPurge re-derives the durable monotonic deadline;
|
|
4665
|
+
// this is the immediate UI countdown baseline (own sender and receiver are symmetric).
|
|
4666
|
+
expiresAt: this.deadlineFor(expiry ?? null)
|
|
4651
4667
|
});
|
|
4652
4668
|
this.messageList.sort((a, b) => a.serverSeq - b.serverSeq);
|
|
4653
4669
|
this.emit();
|
|
@@ -7225,9 +7241,9 @@ var MessagingCoordinator = class {
|
|
|
7225
7241
|
});
|
|
7226
7242
|
return group;
|
|
7227
7243
|
}
|
|
7228
|
-
async sendText(group, text, replyTo, bodyRanges) {
|
|
7244
|
+
async sendText(group, text, replyTo, bodyRanges, expiry) {
|
|
7229
7245
|
const r = await this.resolve();
|
|
7230
|
-
return r.groups.sendText(group, text, replyTo, bodyRanges);
|
|
7246
|
+
return r.groups.sendText(group, text, replyTo, bodyRanges, expiry);
|
|
7231
7247
|
}
|
|
7232
7248
|
async sendReaction(group, args) {
|
|
7233
7249
|
const r = await this.resolve();
|
|
@@ -8267,7 +8283,7 @@ function defaultSessionStorage(key) {
|
|
|
8267
8283
|
}
|
|
8268
8284
|
|
|
8269
8285
|
// src/version.ts
|
|
8270
|
-
var VERSION = "1.6.
|
|
8286
|
+
var VERSION = "1.6.2";
|
|
8271
8287
|
|
|
8272
8288
|
// src/runtime.ts
|
|
8273
8289
|
function buildRuntime(config) {
|
|
@@ -8627,4 +8643,4 @@ export {
|
|
|
8627
8643
|
pb,
|
|
8628
8644
|
createBoundClient
|
|
8629
8645
|
};
|
|
8630
|
-
//# sourceMappingURL=chunk-
|
|
8646
|
+
//# sourceMappingURL=chunk-XQZ53URR.js.map
|