@ikonai/sdk-ui 1.0.9 → 1.0.10
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.
|
@@ -2643,7 +2643,7 @@ function It() {
|
|
|
2643
2643
|
}
|
|
2644
2644
|
const t = [];
|
|
2645
2645
|
for (const [s, r] of x)
|
|
2646
|
-
t.push({ trackId: s, version: r });
|
|
2646
|
+
t.push({ trackId: s, version: r.version, senderId: r.senderId });
|
|
2647
2647
|
const e = {
|
|
2648
2648
|
batchId: _i(),
|
|
2649
2649
|
createdAtMs: Ei(),
|
|
@@ -2669,7 +2669,7 @@ async function Ti(t) {
|
|
|
2669
2669
|
}
|
|
2670
2670
|
async function Ai(t) {
|
|
2671
2671
|
const e = et(t), s = te(e), r = await Hn(t), n = Zn(r), i = x.get(e.trackId);
|
|
2672
|
-
if ((i === void 0 || n.snapshot.version > i) && (x.set(e.trackId, n.snapshot.version), Zt()), !O.apply(s, n))
|
|
2672
|
+
if ((i === void 0 || n.snapshot.version > i.version) && (x.set(e.trackId, { version: n.snapshot.version, senderId: e.senderId }), Zt()), !O.apply(s, n))
|
|
2673
2673
|
return;
|
|
2674
2674
|
const a = O.getSnapshot(s);
|
|
2675
2675
|
if (!a)
|
package/index.js
CHANGED
|
@@ -3023,7 +3023,7 @@ function k(e, t) {
|
|
|
3023
3023
|
}
|
|
3024
3024
|
function En(e) {
|
|
3025
3025
|
return new Worker(
|
|
3026
|
-
"" + new URL("assets/ui-worker-
|
|
3026
|
+
"" + new URL("assets/ui-worker-HM-CSTLx.js", import.meta.url).href,
|
|
3027
3027
|
{
|
|
3028
3028
|
type: "module",
|
|
3029
3029
|
name: e?.name
|
|
@@ -3133,7 +3133,7 @@ class dn {
|
|
|
3133
3133
|
this.applyUiStoreOp(s);
|
|
3134
3134
|
if (t.acks && t.acks.length > 0)
|
|
3135
3135
|
for (const s of t.acks)
|
|
3136
|
-
this.sendUiUpdateAck(s.trackId, s.version);
|
|
3136
|
+
this.sendUiUpdateAck(s.trackId, s.version, s.senderId);
|
|
3137
3137
|
}
|
|
3138
3138
|
applyUiStoreOp(t) {
|
|
3139
3139
|
if (t.type === "UpsertUiStyle") {
|
|
@@ -3217,7 +3217,7 @@ class dn {
|
|
|
3217
3217
|
const s = nt(t), r = `${s.senderId}_${s.trackId}`;
|
|
3218
3218
|
Gi(t).then((i) => {
|
|
3219
3219
|
const n = sn(i);
|
|
3220
|
-
this.notifyUiUpdate(r, n), this.uiStore.apply(r, n), this.sendUiUpdateAck(s.trackId, n.snapshot.version);
|
|
3220
|
+
this.notifyUiUpdate(r, n), this.uiStore.apply(r, n), this.sendUiUpdateAck(s.trackId, n.snapshot.version, s.senderId);
|
|
3221
3221
|
}).catch((i) => {
|
|
3222
3222
|
i instanceof D ? R.warn("Failed to parse UI update", i.causeError ?? i) : R.error("Failed to apply UI update", i);
|
|
3223
3223
|
});
|
|
@@ -3282,13 +3282,13 @@ class dn {
|
|
|
3282
3282
|
for (const s of this.uiStreamClearedListeners)
|
|
3283
3283
|
s(t);
|
|
3284
3284
|
}
|
|
3285
|
-
sendUiUpdateAck(t, s) {
|
|
3285
|
+
sendUiUpdateAck(t, s, r) {
|
|
3286
3286
|
if (this.client && !(!Number.isFinite(s) || s < 0))
|
|
3287
3287
|
try {
|
|
3288
|
-
const r = $i({ Version: s }, this.client.sessionId ?? 0,
|
|
3289
|
-
this.client.sendProtocolMessage(
|
|
3290
|
-
} catch (
|
|
3291
|
-
R.warn("Failed to send UI update ack",
|
|
3288
|
+
const i = r !== void 0 ? { trackId: t, targetIds: [r] } : { trackId: t }, n = $i({ Version: s }, this.client.sessionId ?? 0, i);
|
|
3289
|
+
this.client.sendProtocolMessage(n);
|
|
3290
|
+
} catch (i) {
|
|
3291
|
+
R.warn("Failed to send UI update ack", i);
|
|
3292
3292
|
}
|
|
3293
3293
|
}
|
|
3294
3294
|
}
|
package/package.json
CHANGED