@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/internal.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { v as PalbeConfig, N as PalbeRuntime } from './analytics-facade-
|
|
2
|
-
export { Q as buildRuntime } from './analytics-facade-
|
|
1
|
+
import { v as PalbeConfig, N as PalbeRuntime } from './analytics-facade-ATGUv2-f.cjs';
|
|
2
|
+
export { Q as buildRuntime } from './analytics-facade-ATGUv2-f.cjs';
|
|
3
3
|
import { B as BackendError } from './errors-fDoNdTrJ.cjs';
|
|
4
|
-
export { P as PB, c as createBoundClient } from './pb-
|
|
4
|
+
export { P as PB, c as createBoundClient } from './pb-VzJvX7Gg.cjs';
|
|
5
5
|
import 'livekit-client';
|
|
6
6
|
import './storage-BPaeSG8K.cjs';
|
|
7
7
|
import './pooled-flags-Bwq4usn0.js';
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { v as PalbeConfig, N as PalbeRuntime } from './analytics-facade-
|
|
2
|
-
export { Q as buildRuntime } from './analytics-facade-
|
|
1
|
+
import { v as PalbeConfig, N as PalbeRuntime } from './analytics-facade-DhcTP_kw.js';
|
|
2
|
+
export { Q as buildRuntime } from './analytics-facade-DhcTP_kw.js';
|
|
3
3
|
import { B as BackendError } from './errors-fDoNdTrJ.js';
|
|
4
|
-
export { P as PB, c as createBoundClient } from './pb-
|
|
4
|
+
export { P as PB, c as createBoundClient } from './pb-TAUNVyT6.js';
|
|
5
5
|
import 'livekit-client';
|
|
6
6
|
import './storage-BPaeSG8K.js';
|
|
7
7
|
import './pooled-flags-Bwq4usn0.js';
|
package/dist/internal.js
CHANGED
package/dist/next/client.cjs
CHANGED
|
@@ -4396,24 +4396,38 @@ var Chat = class {
|
|
|
4396
4396
|
resolvedReplyTo = resolveReply(replyRef, (id) => this.byClientMsgId.get(id) ?? null);
|
|
4397
4397
|
}
|
|
4398
4398
|
const bodyRanges = opts?.mentions ?? null;
|
|
4399
|
-
const
|
|
4400
|
-
const expiry = opts?.expiresIn ? {
|
|
4401
|
-
v: 1,
|
|
4402
|
-
ttlSeconds: opts.expiresIn.ttlSeconds,
|
|
4403
|
-
start,
|
|
4404
|
-
senderSendTs: start === "send" ? Math.floor(Date.now() / 1e3) : null
|
|
4405
|
-
} : null;
|
|
4399
|
+
const effectiveExpiry = this.composeExpiry(opts?.expiresIn);
|
|
4406
4400
|
const { receipt, clientMsgId } = await this.backend.sendText(
|
|
4407
4401
|
group,
|
|
4408
4402
|
text,
|
|
4409
4403
|
replyRef,
|
|
4410
4404
|
bodyRanges,
|
|
4411
|
-
|
|
4405
|
+
effectiveExpiry
|
|
4412
4406
|
);
|
|
4413
|
-
this.appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges);
|
|
4414
|
-
if (
|
|
4407
|
+
this.appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges, effectiveExpiry);
|
|
4408
|
+
if (effectiveExpiry) void this.armPurge(effectiveExpiry, receipt.serverSeq, clientMsgId);
|
|
4415
4409
|
return receipt;
|
|
4416
4410
|
}
|
|
4411
|
+
/** Resolve a send's effective per-message expiry at COMPOSE TIME: the caller's explicit
|
|
4412
|
+
* `expiresIn` if present, ELSE the chat's active default timer stamped onto the message
|
|
4413
|
+
* NOW (the durable record per spec §"Compose-time stamping"). A `send`-anchored expiry
|
|
4414
|
+
* (explicit or default-inherited) stamps `senderSendTs` = the sender's compose epoch
|
|
4415
|
+
* seconds; a `read`-anchored one carries none (the deadline is the recipient's local
|
|
4416
|
+
* first-read). Returns null when there is neither an explicit expiry nor an active
|
|
4417
|
+
* default (a plain, non-disappearing send). Mirrors the iOS compose-time stamping. */
|
|
4418
|
+
composeExpiry(explicit) {
|
|
4419
|
+
const base = explicit ? {
|
|
4420
|
+
v: 1,
|
|
4421
|
+
ttlSeconds: explicit.ttlSeconds,
|
|
4422
|
+
start: explicit.start ?? "send",
|
|
4423
|
+
senderSendTs: null
|
|
4424
|
+
} : this.defaultExpiry();
|
|
4425
|
+
if (!base) return null;
|
|
4426
|
+
return {
|
|
4427
|
+
...base,
|
|
4428
|
+
senderSendTs: base.start === "send" ? Math.floor(Date.now() / 1e3) : null
|
|
4429
|
+
};
|
|
4430
|
+
}
|
|
4417
4431
|
/** Set (or DISABLE) this chat's DEFAULT disappearing timer. Emits a `timer_set` control
|
|
4418
4432
|
* envelope (server-blind — an opaque application message, NEVER a bubble) and folds the
|
|
4419
4433
|
* own-set locally so the default applies immediately to subsequent sends that carry no
|
|
@@ -4438,7 +4452,7 @@ var Chat = class {
|
|
|
4438
4452
|
eventClientMsgId: clientMsgId
|
|
4439
4453
|
});
|
|
4440
4454
|
}
|
|
4441
|
-
appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges) {
|
|
4455
|
+
appendOwnSend(text, receipt, clientMsgId, resolvedReplyTo, bodyRanges, expiry) {
|
|
4442
4456
|
if (receipt.serverSeq <= 0) return;
|
|
4443
4457
|
const key = this.internalKey(receipt.serverSeq);
|
|
4444
4458
|
if (this.seenKeys.has(key)) return;
|
|
@@ -4467,9 +4481,11 @@ var Chat = class {
|
|
|
4467
4481
|
// Mentions T6: resolve the own-sent bubble's mentions for its own render (the
|
|
4468
4482
|
// sender never gets a wire echo of its own message — this is the only local copy).
|
|
4469
4483
|
mentions: this.resolveMentions(text, bodyRanges),
|
|
4470
|
-
// Disappearing T10: the surfaced deadline
|
|
4471
|
-
//
|
|
4472
|
-
|
|
4484
|
+
// Disappearing T10: the surfaced deadline reflects the message's effective expiry
|
|
4485
|
+
// (explicit `expiresIn` OR the chat default stamped at compose time). null only when
|
|
4486
|
+
// this send is non-disappearing. armPurge re-derives the durable monotonic deadline;
|
|
4487
|
+
// this is the immediate UI countdown baseline (own sender and receiver are symmetric).
|
|
4488
|
+
expiresAt: this.deadlineFor(expiry ?? null)
|
|
4473
4489
|
});
|
|
4474
4490
|
this.messageList.sort((a, b) => a.serverSeq - b.serverSeq);
|
|
4475
4491
|
this.emit();
|
|
@@ -7048,9 +7064,9 @@ var MessagingCoordinator = class {
|
|
|
7048
7064
|
});
|
|
7049
7065
|
return group;
|
|
7050
7066
|
}
|
|
7051
|
-
async sendText(group, text, replyTo, bodyRanges) {
|
|
7067
|
+
async sendText(group, text, replyTo, bodyRanges, expiry) {
|
|
7052
7068
|
const r = await this.resolve();
|
|
7053
|
-
return r.groups.sendText(group, text, replyTo, bodyRanges);
|
|
7069
|
+
return r.groups.sendText(group, text, replyTo, bodyRanges, expiry);
|
|
7054
7070
|
}
|
|
7055
7071
|
async sendReaction(group, args) {
|
|
7056
7072
|
const r = await this.resolve();
|
|
@@ -8090,7 +8106,7 @@ function defaultSessionStorage(key) {
|
|
|
8090
8106
|
}
|
|
8091
8107
|
|
|
8092
8108
|
// src/version.ts
|
|
8093
|
-
var VERSION = "1.6.
|
|
8109
|
+
var VERSION = "1.6.2";
|
|
8094
8110
|
|
|
8095
8111
|
// src/runtime.ts
|
|
8096
8112
|
function buildRuntime(config) {
|