@fairfox/polly 0.74.0 → 0.75.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/dist/src/mesh.js +15 -1
- package/dist/src/mesh.js.map +3 -3
- package/dist/src/polly-ui/Collapsible.d.ts +3 -1
- package/dist/src/polly-ui/Dropdown.d.ts +3 -1
- package/dist/src/polly-ui/FileInput.d.ts +25 -0
- package/dist/src/polly-ui/Html.d.ts +21 -0
- package/dist/src/polly-ui/Layout.d.ts +2 -1
- package/dist/src/polly-ui/Link.d.ts +25 -0
- package/dist/src/polly-ui/Output.d.ts +26 -0
- package/dist/src/polly-ui/Surface.d.ts +20 -3
- package/dist/src/polly-ui/Text.d.ts +2 -0
- package/dist/src/polly-ui/index.css +102 -1
- package/dist/src/polly-ui/index.d.ts +4 -0
- package/dist/src/polly-ui/index.js +168 -42
- package/dist/src/polly-ui/index.js.map +13 -9
- package/dist/src/polly-ui/internal/passthrough.d.ts +8 -4
- package/dist/src/polly-ui/markdown.d.ts +4 -0
- package/dist/src/polly-ui/markdown.js +3 -1
- package/dist/src/polly-ui/markdown.js.map +3 -3
- package/dist/src/polly-ui/styles.css +111 -1
- package/dist/src/shared/lib/mesh-webrtc-adapter.d.ts +43 -2
- package/package.json +1 -1
package/dist/src/mesh.js
CHANGED
|
@@ -2702,6 +2702,7 @@ class MeshWebRTCAdapter extends NetworkAdapter2 {
|
|
|
2702
2702
|
}
|
|
2703
2703
|
handlePeerJoined(remotePeerId) {
|
|
2704
2704
|
this.presentPeers.add(remotePeerId);
|
|
2705
|
+
this.evictStaleSlotForRejoin(remotePeerId);
|
|
2705
2706
|
if (!this.shouldInitiateTo(remotePeerId))
|
|
2706
2707
|
return;
|
|
2707
2708
|
this.tryCreateInitiatingSlot(remotePeerId);
|
|
@@ -2709,11 +2710,24 @@ class MeshWebRTCAdapter extends NetworkAdapter2 {
|
|
|
2709
2710
|
handlePeersPresent(peerIds) {
|
|
2710
2711
|
for (const remotePeerId of peerIds) {
|
|
2711
2712
|
this.presentPeers.add(remotePeerId);
|
|
2713
|
+
this.evictStaleSlotForRejoin(remotePeerId);
|
|
2712
2714
|
if (!this.shouldInitiateTo(remotePeerId))
|
|
2713
2715
|
continue;
|
|
2714
2716
|
this.tryCreateInitiatingSlot(remotePeerId);
|
|
2715
2717
|
}
|
|
2716
2718
|
}
|
|
2719
|
+
evictStaleSlotForRejoin(remotePeerId) {
|
|
2720
|
+
const slot = this.slots.get(remotePeerId);
|
|
2721
|
+
if (!slot)
|
|
2722
|
+
return;
|
|
2723
|
+
const state = slot.connection.connectionState;
|
|
2724
|
+
if (state === "connected" && slot.channel?.readyState === "open")
|
|
2725
|
+
return;
|
|
2726
|
+
if (this.slotNeverConnectedTimeoutMs > 0 && (state === "new" || state === "connecting") && performance.now() - slot.createdAt < this.slotNeverConnectedTimeoutMs) {
|
|
2727
|
+
return;
|
|
2728
|
+
}
|
|
2729
|
+
this.tearDownWedgedSlot(remotePeerId);
|
|
2730
|
+
}
|
|
2717
2731
|
tryCreateInitiatingSlot(remotePeerId) {
|
|
2718
2732
|
try {
|
|
2719
2733
|
this.createInitiatingSlot(remotePeerId);
|
|
@@ -4296,4 +4310,4 @@ export {
|
|
|
4296
4310
|
$meshCounter
|
|
4297
4311
|
};
|
|
4298
4312
|
|
|
4299
|
-
//# debugId=
|
|
4313
|
+
//# debugId=0D84EA4EDCC2765464756E2164756E21
|