@liveblocks/client
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -230,2 +230,3 @@ "use strict"; | ||
_socket = null; | ||
updateUsers({}); | ||
if (event.wasClean === false) { | ||
@@ -267,3 +268,2 @@ state = types_1.RoomState.Default; | ||
if (_socket) { | ||
_socket.close(); | ||
_socket.removeEventListener("open", onOpen); | ||
@@ -273,6 +273,7 @@ _socket.removeEventListener("message", onMessage); | ||
_socket.removeEventListener("error", onError); | ||
_socket.close(); | ||
_socket = null; | ||
} | ||
state = types_1.RoomState.Default; | ||
_users = {}; | ||
updateUsers({}); | ||
clearTimeout(retryTimeoutId); | ||
@@ -291,2 +292,5 @@ _listeners.open = []; | ||
} | ||
function getOthers() { | ||
return _users; | ||
} | ||
function updatePresence(overrides) { | ||
@@ -393,4 +397,5 @@ updateMyPresence(Object.assign(Object.assign({}, _me), overrides)); | ||
updatePresence, | ||
getOthers, | ||
}; | ||
} | ||
exports.createRoom = createRoom; |
@@ -50,2 +50,3 @@ import { RecordData, Record, List } from "./doc"; | ||
getPresence: <T extends Presence>() => T | null; | ||
getOthers: <T extends Presence>() => Others<T>; | ||
updatePresence: <T extends Presence>(overrides: Partial<T>) => void; | ||
@@ -52,0 +53,0 @@ }; |
@@ -208,2 +208,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
_socket = null; | ||
updateUsers({}); | ||
if (event.wasClean === false) { | ||
@@ -245,3 +246,2 @@ state = RoomState.Default; | ||
if (_socket) { | ||
_socket.close(); | ||
_socket.removeEventListener("open", onOpen); | ||
@@ -251,6 +251,7 @@ _socket.removeEventListener("message", onMessage); | ||
_socket.removeEventListener("error", onError); | ||
_socket.close(); | ||
_socket = null; | ||
} | ||
state = RoomState.Default; | ||
_users = {}; | ||
updateUsers({}); | ||
clearTimeout(retryTimeoutId); | ||
@@ -269,2 +270,5 @@ _listeners.open = []; | ||
} | ||
function getOthers() { | ||
return _users; | ||
} | ||
function updatePresence(overrides) { | ||
@@ -371,3 +375,4 @@ updateMyPresence(Object.assign(Object.assign({}, _me), overrides)); | ||
updatePresence, | ||
getOthers, | ||
}; | ||
} |
@@ -50,2 +50,3 @@ import { RecordData, Record, List } from "./doc"; | ||
getPresence: <T extends Presence>() => T | null; | ||
getOthers: <T extends Presence>() => Others<T>; | ||
updatePresence: <T extends Presence>(overrides: Partial<T>) => void; | ||
@@ -52,0 +53,0 @@ }; |
{ | ||
"name": "@liveblocks/client", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93803
2746