@liveblocks/core 2.0.2 → 2.0.3-test1
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/index.d.mts +73 -49
- package/dist/index.d.ts +73 -49
- package/dist/index.js +39 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -44
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
|
|
7
7
|
// src/version.ts
|
|
8
8
|
var PKG_NAME = "@liveblocks/core";
|
|
9
|
-
var PKG_VERSION = "2.0.
|
|
9
|
+
var PKG_VERSION = "2.0.3-test1";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -1917,39 +1917,6 @@ function createStore(initialState) {
|
|
|
1917
1917
|
};
|
|
1918
1918
|
}
|
|
1919
1919
|
|
|
1920
|
-
// src/lib/deprecation.ts
|
|
1921
|
-
var _emittedDeprecationWarnings = /* @__PURE__ */ new Set();
|
|
1922
|
-
function deprecate(message, key = message) {
|
|
1923
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1924
|
-
if (!_emittedDeprecationWarnings.has(key)) {
|
|
1925
|
-
_emittedDeprecationWarnings.add(key);
|
|
1926
|
-
errorWithTitle("Deprecation warning", message);
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
function deprecateIf(condition, message, key = message) {
|
|
1931
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1932
|
-
if (condition) {
|
|
1933
|
-
deprecate(message, key);
|
|
1934
|
-
}
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
function throwUsageError(message) {
|
|
1938
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1939
|
-
const usageError = new Error(message);
|
|
1940
|
-
usageError.name = "Usage error";
|
|
1941
|
-
errorWithTitle("Usage error", message);
|
|
1942
|
-
throw usageError;
|
|
1943
|
-
}
|
|
1944
|
-
}
|
|
1945
|
-
function errorIf(condition, message) {
|
|
1946
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1947
|
-
if (condition) {
|
|
1948
|
-
throwUsageError(message);
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
|
|
1953
1920
|
// src/convert-plain-data.ts
|
|
1954
1921
|
function convertToCommentData(data) {
|
|
1955
1922
|
const editedAt = data.editedAt ? new Date(data.editedAt) : void 0;
|
|
@@ -5361,8 +5328,8 @@ function createCommentsApi(roomId, getAuthValue, fetchClientApi) {
|
|
|
5361
5328
|
}
|
|
5362
5329
|
var MARK_INBOX_NOTIFICATIONS_AS_READ_BATCH_DELAY2 = 50;
|
|
5363
5330
|
function createRoom(options, config) {
|
|
5364
|
-
const initialPresence =
|
|
5365
|
-
const initialStorage =
|
|
5331
|
+
const initialPresence = options.initialPresence;
|
|
5332
|
+
const initialStorage = options.initialStorage;
|
|
5366
5333
|
const [inBackgroundSince, uninstallBgTabSpy] = installBackgroundTabSpy();
|
|
5367
5334
|
const delegates = {
|
|
5368
5335
|
...config.delegates,
|
|
@@ -7259,15 +7226,10 @@ function createClient(options) {
|
|
|
7259
7226
|
if (existing !== void 0) {
|
|
7260
7227
|
return leaseRoom(existing);
|
|
7261
7228
|
}
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
"Please provide an initial presence value for the current user when entering the room."
|
|
7265
|
-
);
|
|
7229
|
+
const initialPresence = (typeof options2.initialPresence === "function" ? options2.initialPresence(roomId) : options2.initialPresence) ?? {};
|
|
7230
|
+
const initialStorage = (typeof options2.initialStorage === "function" ? options2.initialStorage(roomId) : options2.initialStorage) ?? {};
|
|
7266
7231
|
const newRoom = createRoom(
|
|
7267
|
-
{
|
|
7268
|
-
initialPresence: options2.initialPresence ?? {},
|
|
7269
|
-
initialStorage: options2.initialStorage
|
|
7270
|
-
},
|
|
7232
|
+
{ initialPresence, initialStorage },
|
|
7271
7233
|
{
|
|
7272
7234
|
roomId,
|
|
7273
7235
|
throttleDelay,
|
|
@@ -8084,6 +8046,39 @@ function legacy_patchImmutableNode(state, path, update) {
|
|
|
8084
8046
|
}
|
|
8085
8047
|
}
|
|
8086
8048
|
|
|
8049
|
+
// src/lib/deprecation.ts
|
|
8050
|
+
var _emittedDeprecationWarnings = /* @__PURE__ */ new Set();
|
|
8051
|
+
function deprecate(message, key = message) {
|
|
8052
|
+
if (process.env.NODE_ENV !== "production") {
|
|
8053
|
+
if (!_emittedDeprecationWarnings.has(key)) {
|
|
8054
|
+
_emittedDeprecationWarnings.add(key);
|
|
8055
|
+
errorWithTitle("Deprecation warning", message);
|
|
8056
|
+
}
|
|
8057
|
+
}
|
|
8058
|
+
}
|
|
8059
|
+
function deprecateIf(condition, message, key = message) {
|
|
8060
|
+
if (process.env.NODE_ENV !== "production") {
|
|
8061
|
+
if (condition) {
|
|
8062
|
+
deprecate(message, key);
|
|
8063
|
+
}
|
|
8064
|
+
}
|
|
8065
|
+
}
|
|
8066
|
+
function throwUsageError(message) {
|
|
8067
|
+
if (process.env.NODE_ENV !== "production") {
|
|
8068
|
+
const usageError = new Error(message);
|
|
8069
|
+
usageError.name = "Usage error";
|
|
8070
|
+
errorWithTitle("Usage error", message);
|
|
8071
|
+
throw usageError;
|
|
8072
|
+
}
|
|
8073
|
+
}
|
|
8074
|
+
function errorIf(condition, message) {
|
|
8075
|
+
if (process.env.NODE_ENV !== "production") {
|
|
8076
|
+
if (condition) {
|
|
8077
|
+
throwUsageError(message);
|
|
8078
|
+
}
|
|
8079
|
+
}
|
|
8080
|
+
}
|
|
8081
|
+
|
|
8087
8082
|
// src/lib/Poller.ts
|
|
8088
8083
|
function makePoller(callback) {
|
|
8089
8084
|
let context = {
|