@liveblocks/core 3.6.0 → 3.6.1-preview1
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.cjs +7 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.cjs
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 = "3.6.
|
|
9
|
+
var PKG_VERSION = "3.6.1-preview1";
|
|
10
10
|
var PKG_FORMAT = "cjs";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -6392,13 +6392,14 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
6392
6392
|
const previousKey = nn(child._parentKey);
|
|
6393
6393
|
const previousIndex = this.#items.indexOf(child);
|
|
6394
6394
|
const existingItemIndex = this._indexOfPosition(newKey);
|
|
6395
|
+
let actualNewKey = newKey;
|
|
6395
6396
|
if (existingItemIndex !== -1) {
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6397
|
+
actualNewKey = makePosition(
|
|
6398
|
+
newKey,
|
|
6399
|
+
_optionalChain([this, 'access', _128 => _128.#items, 'access', _129 => _129[existingItemIndex + 1], 'optionalAccess', _130 => _130._parentPos])
|
|
6399
6400
|
);
|
|
6400
6401
|
}
|
|
6401
|
-
child._setParentLink(this,
|
|
6402
|
+
child._setParentLink(this, actualNewKey);
|
|
6402
6403
|
this._sortItems();
|
|
6403
6404
|
const newIndex = this.#items.indexOf(child);
|
|
6404
6405
|
if (previousIndex === newIndex) {
|
|
@@ -9885,7 +9886,7 @@ function getBaseUrl(baseUrl) {
|
|
|
9885
9886
|
}
|
|
9886
9887
|
function createClient(options) {
|
|
9887
9888
|
const clientOptions = options;
|
|
9888
|
-
const throttleDelay = getThrottle(_nullishCoalesce(clientOptions.throttle, () => ( DEFAULT_THROTTLE)));
|
|
9889
|
+
const throttleDelay = process.env.NODE_ENV !== "production" && clientOptions.__DANGEROUSLY_disableThrottling ? 0 : getThrottle(_nullishCoalesce(clientOptions.throttle, () => ( DEFAULT_THROTTLE)));
|
|
9889
9890
|
const lostConnectionTimeout = getLostConnectionTimeout(
|
|
9890
9891
|
_nullishCoalesce(clientOptions.lostConnectionTimeout, () => ( DEFAULT_LOST_CONNECTION_TIMEOUT))
|
|
9891
9892
|
);
|