@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
package/dist/index.cjs
CHANGED
|
@@ -3590,24 +3590,38 @@ var Chat = class {
|
|
|
3590
3590
|
resolvedReplyTo = resolveReply(replyRef, (id) => this.byClientMsgId.get(id) ?? null);
|
|
3591
3591
|
}
|
|
3592
3592
|
const bodyRanges = opts?.mentions ?? null;
|
|
3593
|
-
const
|
|
3594
|
-
const expiry = opts?.expiresIn ? {
|
|
3595
|
-
v: 1,
|
|
3596
|
-
ttlSeconds: opts.expiresIn.ttlSeconds,
|
|
3597
|
-
start,
|
|
3598
|
-
senderSendTs: start === "send" ? Math.floor(Date.now() / 1e3) : null
|
|
3599
|
-
} : null;
|
|
3593
|
+
const effectiveExpiry = this.composeExpiry(opts?.expiresIn);
|
|
3600
3594
|
const { receipt, clientMsgId } = await this.backend.sendText(
|
|
3601
3595
|
group,
|
|
3602
3596
|
text,
|
|
3603
3597
|
replyRef,
|
|
3604
3598
|
bodyRanges,
|
|
3605
|
-
|
|
3599
|
+
effectiveExpiry
|
|
3606
3600
|
);
|
|
3607
|
-
this.appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges);
|
|
3608
|
-
if (
|
|
3601
|
+
this.appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges, effectiveExpiry);
|
|
3602
|
+
if (effectiveExpiry) void this.armPurge(effectiveExpiry, receipt.serverSeq, clientMsgId);
|
|
3609
3603
|
return receipt;
|
|
3610
3604
|
}
|
|
3605
|
+
/** Resolve a send's effective per-message expiry at COMPOSE TIME: the caller's explicit
|
|
3606
|
+
* `expiresIn` if present, ELSE the chat's active default timer stamped onto the message
|
|
3607
|
+
* NOW (the durable record per spec §"Compose-time stamping"). A `send`-anchored expiry
|
|
3608
|
+
* (explicit or default-inherited) stamps `senderSendTs` = the sender's compose epoch
|
|
3609
|
+
* seconds; a `read`-anchored one carries none (the deadline is the recipient's local
|
|
3610
|
+
* first-read). Returns null when there is neither an explicit expiry nor an active
|
|
3611
|
+
* default (a plain, non-disappearing send). Mirrors the iOS compose-time stamping. */
|
|
3612
|
+
composeExpiry(explicit) {
|
|
3613
|
+
const base = explicit ? {
|
|
3614
|
+
v: 1,
|
|
3615
|
+
ttlSeconds: explicit.ttlSeconds,
|
|
3616
|
+
start: explicit.start ?? "send",
|
|
3617
|
+
senderSendTs: null
|
|
3618
|
+
} : this.defaultExpiry();
|
|
3619
|
+
if (!base) return null;
|
|
3620
|
+
return {
|
|
3621
|
+
...base,
|
|
3622
|
+
senderSendTs: base.start === "send" ? Math.floor(Date.now() / 1e3) : null
|
|
3623
|
+
};
|
|
3624
|
+
}
|
|
3611
3625
|
/** Set (or DISABLE) this chat's DEFAULT disappearing timer. Emits a `timer_set` control
|
|
3612
3626
|
* envelope (server-blind — an opaque application message, NEVER a bubble) and folds the
|
|
3613
3627
|
* own-set locally so the default applies immediately to subsequent sends that carry no
|
|
@@ -3632,7 +3646,7 @@ var Chat = class {
|
|
|
3632
3646
|
eventClientMsgId: clientMsgId
|
|
3633
3647
|
});
|
|
3634
3648
|
}
|
|
3635
|
-
appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges) {
|
|
3649
|
+
appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges, expiry) {
|
|
3636
3650
|
if (receipt.serverSeq <= 0) return;
|
|
3637
3651
|
const key = this.internalKey(receipt.serverSeq);
|
|
3638
3652
|
if (this.seenKeys.has(key)) return;
|
|
@@ -3661,9 +3675,11 @@ var Chat = class {
|
|
|
3661
3675
|
// Mentions T6: resolve the own-sent bubble's mentions for its own render (the
|
|
3662
3676
|
// sender never gets a wire echo of its own message — this is the only local copy).
|
|
3663
3677
|
mentions: this.resolveMentions(text, bodyRanges),
|
|
3664
|
-
// Disappearing T10: the surfaced deadline
|
|
3665
|
-
//
|
|
3666
|
-
|
|
3678
|
+
// Disappearing T10: the surfaced deadline reflects the message's effective expiry
|
|
3679
|
+
// (explicit `expiresIn` OR the chat default stamped at compose time). null only when
|
|
3680
|
+
// this send is non-disappearing. armPurge re-derives the durable monotonic deadline;
|
|
3681
|
+
// this is the immediate UI countdown baseline (own sender and receiver are symmetric).
|
|
3682
|
+
expiresAt: this.deadlineFor(expiry ?? null)
|
|
3667
3683
|
});
|
|
3668
3684
|
this.messageList.sort((a, b) => a.serverSeq - b.serverSeq);
|
|
3669
3685
|
this.emit();
|
|
@@ -6242,9 +6258,9 @@ var MessagingCoordinator = class {
|
|
|
6242
6258
|
});
|
|
6243
6259
|
return group;
|
|
6244
6260
|
}
|
|
6245
|
-
async sendText(group, text, replyTo, bodyRanges) {
|
|
6261
|
+
async sendText(group, text, replyTo, bodyRanges, expiry) {
|
|
6246
6262
|
const r = await this.resolve();
|
|
6247
|
-
return r.groups.sendText(group, text, replyTo, bodyRanges);
|
|
6263
|
+
return r.groups.sendText(group, text, replyTo, bodyRanges, expiry);
|
|
6248
6264
|
}
|
|
6249
6265
|
async sendReaction(group, args) {
|
|
6250
6266
|
const r = await this.resolve();
|
|
@@ -7403,7 +7419,7 @@ function localStorageSessionStorage(key = DEFAULT_KEY) {
|
|
|
7403
7419
|
}
|
|
7404
7420
|
|
|
7405
7421
|
// src/version.ts
|
|
7406
|
-
var VERSION = "1.6.
|
|
7422
|
+
var VERSION = "1.6.2";
|
|
7407
7423
|
|
|
7408
7424
|
// src/internal.ts
|
|
7409
7425
|
function getRuntime() {
|