@liveblocks/core 3.13.0-ack1 → 3.13.0-vincent1

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 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.13.0-ack1";
9
+ var PKG_VERSION = "3.13.0-vincent1";
10
10
  var PKG_FORMAT = "cjs";
11
11
 
12
12
  // src/dupe-detection.ts
@@ -3090,9 +3090,11 @@ var ServerMsgCode = Object.freeze({
3090
3090
  BROADCASTED_EVENT: 103,
3091
3091
  ROOM_STATE: 104,
3092
3092
  // For Storage
3093
- INITIAL_STORAGE_STATE: 200,
3093
+ STORAGE_STATE_V7: 200,
3094
+ // Only sent in V7
3095
+ STORAGE_CHUNK: 210,
3096
+ // Used in V8+
3094
3097
  UPDATE_STORAGE: 201,
3095
- STORAGE_ACK: 202,
3096
3098
  // For Yjs Docs
3097
3099
  UPDATE_YDOC: 300,
3098
3100
  // For Comments
@@ -5927,6 +5929,9 @@ var OpCode = Object.freeze({
5927
5929
  ACK: 9
5928
5930
  // Will only appear in v8+
5929
5931
  });
5932
+ function isAckOp(op) {
5933
+ return op.type === OpCode.DELETE_CRDT && op.id === "ACK";
5934
+ }
5930
5935
 
5931
5936
  // src/crdts/AbstractCrdt.ts
5932
5937
  function createManagedPool(roomId, options) {
@@ -6140,6 +6145,54 @@ var CrdtType = Object.freeze({
6140
6145
  MAP: 2,
6141
6146
  REGISTER: 3
6142
6147
  });
6148
+ function isRootNode(node) {
6149
+ return node[0] === "root";
6150
+ }
6151
+ function isRootCrdt(id, _) {
6152
+ return id === "root";
6153
+ }
6154
+ function* compactNodesToNodeStream(nodes) {
6155
+ for (const node of nodes) {
6156
+ switch (node[1]) {
6157
+ case CrdtType.OBJECT:
6158
+ yield isRootNode(node) ? [node[0], { type: CrdtType.OBJECT, data: node[2] }] : (
6159
+ // prettier-ignore
6160
+ [node[0], { type: CrdtType.OBJECT, parentId: node[2], parentKey: node[3], data: node[4] }]
6161
+ );
6162
+ break;
6163
+ case CrdtType.LIST:
6164
+ yield [node[0], { type: CrdtType.LIST, parentId: node[2], parentKey: node[3] }];
6165
+ break;
6166
+ case CrdtType.MAP:
6167
+ yield [node[0], { type: CrdtType.MAP, parentId: node[2], parentKey: node[3] }];
6168
+ break;
6169
+ case CrdtType.REGISTER:
6170
+ yield [node[0], { type: CrdtType.REGISTER, parentId: node[2], parentKey: node[3], data: node[4] }];
6171
+ break;
6172
+ }
6173
+ }
6174
+ }
6175
+ function* nodeStreamToCompactNodes(nodes) {
6176
+ for (const [id, node] of nodes) {
6177
+ switch (node.type) {
6178
+ case CrdtType.OBJECT:
6179
+ if (isRootCrdt(id, node))
6180
+ yield [id, CrdtType.OBJECT, node.data];
6181
+ else
6182
+ yield [id, CrdtType.OBJECT, node.parentId, node.parentKey, node.data];
6183
+ break;
6184
+ case CrdtType.LIST:
6185
+ yield [id, CrdtType.LIST, node.parentId, node.parentKey];
6186
+ break;
6187
+ case CrdtType.MAP:
6188
+ yield [id, CrdtType.MAP, node.parentId, node.parentKey];
6189
+ break;
6190
+ case CrdtType.REGISTER:
6191
+ yield [id, CrdtType.REGISTER, node.parentId, node.parentKey, node.data];
6192
+ break;
6193
+ }
6194
+ }
6195
+ }
6143
6196
 
6144
6197
  // src/crdts/LiveRegister.ts
6145
6198
  var LiveRegister = class _LiveRegister extends AbstractCrdt {
@@ -6381,7 +6434,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
6381
6434
  };
6382
6435
  }
6383
6436
  }
6384
- #applySetFixop(op) {
6437
+ #applySetAck(op) {
6385
6438
  if (this._pool === void 0) {
6386
6439
  throw new Error("Can't attach child if managed pool is not present");
6387
6440
  }
@@ -6491,7 +6544,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
6491
6544
  reverse: []
6492
6545
  };
6493
6546
  }
6494
- #applyInsertFixop(op) {
6547
+ #applyInsertAck(op) {
6495
6548
  const existingItem = this.#items.find((item) => item._id === op.id);
6496
6549
  const key = asPos(op.parentKey);
6497
6550
  const itemIndexAtPosition = this._indexOfPosition(key);
@@ -6611,18 +6664,18 @@ var LiveList = class _LiveList extends AbstractCrdt {
6611
6664
  }
6612
6665
  let result;
6613
6666
  if (op.intent === "set") {
6614
- if (source === 1 /* REMOTE */) {
6667
+ if (source === 1 /* THEIRS */) {
6615
6668
  result = this.#applySetRemote(op);
6616
- } else if (source === 2 /* FIXOP */) {
6617
- result = this.#applySetFixop(op);
6669
+ } else if (source === 2 /* OURS */) {
6670
+ result = this.#applySetAck(op);
6618
6671
  } else {
6619
6672
  result = this.#applySetUndoRedo(op);
6620
6673
  }
6621
6674
  } else {
6622
- if (source === 1 /* REMOTE */) {
6675
+ if (source === 1 /* THEIRS */) {
6623
6676
  result = this.#applyRemoteInsert(op);
6624
- } else if (source === 2 /* FIXOP */) {
6625
- result = this.#applyInsertFixop(op);
6677
+ } else if (source === 2 /* OURS */) {
6678
+ result = this.#applyInsertAck(op);
6626
6679
  } else {
6627
6680
  result = this.#applyInsertUndoRedo(op);
6628
6681
  }
@@ -6705,7 +6758,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
6705
6758
  };
6706
6759
  }
6707
6760
  }
6708
- #applySetChildKeyFixop(newKey, child) {
6761
+ #applySetChildKeyAck(newKey, child) {
6709
6762
  const previousKey = nn(child._parentKey);
6710
6763
  if (this.#implicitlyDeletedItems.has(child)) {
6711
6764
  const existingItemIndex = this._indexOfPosition(newKey);
@@ -6784,10 +6837,10 @@ var LiveList = class _LiveList extends AbstractCrdt {
6784
6837
  }
6785
6838
  /** @internal */
6786
6839
  _setChildKey(newKey, child, source) {
6787
- if (source === 1 /* REMOTE */) {
6840
+ if (source === 1 /* THEIRS */) {
6788
6841
  return this.#applySetChildKeyRemote(newKey, child);
6789
- } else if (source === 2 /* FIXOP */) {
6790
- return this.#applySetChildKeyFixop(newKey, child);
6842
+ } else if (source === 2 /* OURS */) {
6843
+ return this.#applySetChildKeyAck(newKey, child);
6791
6844
  } else {
6792
6845
  return this.#applySetChildKeyUndoRedo(newKey, child);
6793
6846
  }
@@ -7300,7 +7353,7 @@ var LiveMap = class _LiveMap extends AbstractCrdt {
7300
7353
  if (this._pool.getNode(id) !== void 0) {
7301
7354
  return { modified: false };
7302
7355
  }
7303
- if (source === 2 /* FIXOP */) {
7356
+ if (source === 2 /* OURS */) {
7304
7357
  const lastUpdateOpId = this.#unacknowledgedSet.get(key);
7305
7358
  if (lastUpdateOpId === opId) {
7306
7359
  this.#unacknowledgedSet.delete(key);
@@ -7308,7 +7361,7 @@ var LiveMap = class _LiveMap extends AbstractCrdt {
7308
7361
  } else if (lastUpdateOpId !== void 0) {
7309
7362
  return { modified: false };
7310
7363
  }
7311
- } else if (source === 1 /* REMOTE */) {
7364
+ } else if (source === 1 /* THEIRS */) {
7312
7365
  this.#unacknowledgedSet.delete(key);
7313
7366
  }
7314
7367
  const previousValue = this.#map.get(key);
@@ -7574,7 +7627,7 @@ var LiveMap = class _LiveMap extends AbstractCrdt {
7574
7627
 
7575
7628
  // src/crdts/LiveObject.ts
7576
7629
  var MAX_LIVE_OBJECT_SIZE = 128 * 1024;
7577
- function isRootCrdt(id, _) {
7630
+ function isRootCrdt2(id, _) {
7578
7631
  return id === "root";
7579
7632
  }
7580
7633
  var LiveObject = (_class2 = class _LiveObject extends AbstractCrdt {
@@ -7594,7 +7647,7 @@ var LiveObject = (_class2 = class _LiveObject extends AbstractCrdt {
7594
7647
  const parentToChildren = /* @__PURE__ */ new Map();
7595
7648
  let root = null;
7596
7649
  for (const [id, crdt] of items) {
7597
- if (isRootCrdt(id, crdt)) {
7650
+ if (isRootCrdt2(id, crdt)) {
7598
7651
  root = crdt;
7599
7652
  } else {
7600
7653
  const tuple = [id, crdt];
@@ -7612,8 +7665,8 @@ var LiveObject = (_class2 = class _LiveObject extends AbstractCrdt {
7612
7665
  return [root, parentToChildren];
7613
7666
  }
7614
7667
  /** @private Do not use this API directly */
7615
- static _fromItems(items, pool) {
7616
- const [root, parentToChildren] = _LiveObject.#buildRootAndParentToChildren(items);
7668
+ static _fromItems(nodes, pool) {
7669
+ const [root, parentToChildren] = _LiveObject.#buildRootAndParentToChildren(nodes);
7617
7670
  return _LiveObject._deserialize(
7618
7671
  ["root", root],
7619
7672
  parentToChildren,
@@ -8232,10 +8285,7 @@ function getTreesDiffOperations(currentItems, newItems) {
8232
8285
  const ops = [];
8233
8286
  currentItems.forEach((_, id) => {
8234
8287
  if (!newItems.get(id)) {
8235
- ops.push({
8236
- type: OpCode.DELETE_CRDT,
8237
- id
8238
- });
8288
+ ops.push({ type: OpCode.DELETE_CRDT, id });
8239
8289
  }
8240
8290
  });
8241
8291
  newItems.forEach((crdt, id) => {
@@ -8733,6 +8783,21 @@ function installBackgroundTabSpy() {
8733
8783
  };
8734
8784
  return [inBackgroundSince, unsub];
8735
8785
  }
8786
+ function makePartialNodeMap() {
8787
+ let map = /* @__PURE__ */ new Map();
8788
+ return {
8789
+ append(chunk2) {
8790
+ for (const [id, node] of chunk2) {
8791
+ map.set(id, node);
8792
+ }
8793
+ },
8794
+ clear() {
8795
+ const result = map;
8796
+ map = /* @__PURE__ */ new Map();
8797
+ return result;
8798
+ }
8799
+ };
8800
+ }
8736
8801
  function createRoom(options, config) {
8737
8802
  const roomId = config.roomId;
8738
8803
  const initialPresence = options.initialPresence;
@@ -8793,6 +8858,7 @@ function createRoom(options, config) {
8793
8858
  activeBatch: null,
8794
8859
  unacknowledgedOps: /* @__PURE__ */ new Map()
8795
8860
  };
8861
+ const partialNodes = makePartialNodeMap();
8796
8862
  let lastTokenKey;
8797
8863
  function onStatusDidChange(newStatus) {
8798
8864
  const authValue = managedSocket.authValue;
@@ -9074,14 +9140,11 @@ function createRoom(options, config) {
9074
9140
  self,
9075
9141
  (me) => me !== null ? userToTreeNode("Me", me) : null
9076
9142
  );
9077
- function createOrUpdateRootFromMessage(message) {
9078
- if (message.items.length === 0) {
9079
- throw new Error("Internal error: cannot load storage without items");
9080
- }
9143
+ function createOrUpdateRootFromMessage(nodes) {
9081
9144
  if (context.root !== void 0) {
9082
- updateRoot(message.items);
9145
+ updateRoot(new Map(nodes));
9083
9146
  } else {
9084
- context.root = LiveObject._fromItems(message.items, context.pool);
9147
+ context.root = LiveObject._fromItems(nodes, context.pool);
9085
9148
  }
9086
9149
  const canWrite = _nullishCoalesce(_optionalChain([self, 'access', _196 => _196.get, 'call', _197 => _197(), 'optionalAccess', _198 => _198.canWrite]), () => ( true));
9087
9150
  const stackSizeBefore = context.undoStack.length;
@@ -9098,7 +9161,10 @@ function createRoom(options, config) {
9098
9161
  }
9099
9162
  context.undoStack.length = stackSizeBefore;
9100
9163
  }
9101
- function updateRoot(items) {
9164
+ function updateRoot(nodes) {
9165
+ if (nodes.size === 0) {
9166
+ throw new Error("Internal error: cannot load storage without items");
9167
+ }
9102
9168
  if (context.root === void 0) {
9103
9169
  return;
9104
9170
  }
@@ -9106,7 +9172,7 @@ function createRoom(options, config) {
9106
9172
  for (const [id, node] of context.pool.nodes) {
9107
9173
  currentItems.set(id, node._serialize());
9108
9174
  }
9109
- const ops = getTreesDiffOperations(currentItems, new Map(items));
9175
+ const ops = getTreesDiffOperations(currentItems, nodes);
9110
9176
  const result = applyOps(
9111
9177
  ops,
9112
9178
  /* isLocal */
@@ -9193,11 +9259,10 @@ function createRoom(options, config) {
9193
9259
  let source;
9194
9260
  if (isLocal) {
9195
9261
  source = 0 /* LOCAL */;
9196
- } else if (op.opId) {
9197
- context.unacknowledgedOps.delete(op.opId);
9198
- source = 2 /* FIXOP */;
9199
9262
  } else {
9200
- source = 1 /* REMOTE */;
9263
+ const opId = nn(op.opId);
9264
+ const deleted = context.unacknowledgedOps.delete(opId);
9265
+ source = deleted ? 2 /* OURS */ : 1 /* THEIRS */;
9201
9266
  }
9202
9267
  const applyOpResult = applyOp(op, source);
9203
9268
  if (applyOpResult.modified) {
@@ -9228,6 +9293,9 @@ function createRoom(options, config) {
9228
9293
  };
9229
9294
  }
9230
9295
  function applyOp(op, source) {
9296
+ if (isAckOp(op)) {
9297
+ return { modified: false };
9298
+ }
9231
9299
  switch (op.type) {
9232
9300
  case OpCode.DELETE_OBJECT_KEY:
9233
9301
  case OpCode.UPDATE_OBJECT:
@@ -9471,8 +9539,11 @@ function createRoom(options, config) {
9471
9539
  updates.others.push(onRoomStateMessage(message));
9472
9540
  break;
9473
9541
  }
9474
- case ServerMsgCode.INITIAL_STORAGE_STATE: {
9475
- processInitialStorage(message);
9542
+ case ServerMsgCode.STORAGE_CHUNK: {
9543
+ partialNodes.append(compactNodesToNodeStream(message.nodes));
9544
+ if (message.done) {
9545
+ processInitialStorage(partialNodes.clear());
9546
+ }
9476
9547
  break;
9477
9548
  }
9478
9549
  case ServerMsgCode.UPDATE_STORAGE: {
@@ -9489,14 +9560,6 @@ function createRoom(options, config) {
9489
9560
  }
9490
9561
  break;
9491
9562
  }
9492
- // Since V8. On V7, acks were sent disguised as an Ops in UPDATE_STORAGE messages.
9493
- case ServerMsgCode.STORAGE_ACK: {
9494
- for (const opId of message.opIds) {
9495
- context.unacknowledgedOps.delete(opId);
9496
- }
9497
- notifyStorageStatus();
9498
- break;
9499
- }
9500
9563
  // Receiving a RejectedOps message in the client means that the server is no
9501
9564
  // longer in sync with the client. Trying to synchronize the client again by
9502
9565
  // rolling back particular Ops may be hard/impossible. It's fine to not try and
@@ -9525,6 +9588,8 @@ function createRoom(options, config) {
9525
9588
  eventHub.comments.notify(message);
9526
9589
  break;
9527
9590
  }
9591
+ case ServerMsgCode.STORAGE_STATE_V7:
9592
+ // No longer used in V8
9528
9593
  default:
9529
9594
  break;
9530
9595
  }
@@ -9626,9 +9691,9 @@ function createRoom(options, config) {
9626
9691
  }
9627
9692
  let _getStorage$ = null;
9628
9693
  let _resolveStoragePromise = null;
9629
- function processInitialStorage(message) {
9694
+ function processInitialStorage(nodes) {
9630
9695
  const unacknowledgedOps = new Map(context.unacknowledgedOps);
9631
- createOrUpdateRootFromMessage(message);
9696
+ createOrUpdateRootFromMessage(nodes);
9632
9697
  applyAndSendOps(unacknowledgedOps);
9633
9698
  _optionalChain([_resolveStoragePromise, 'optionalCall', _201 => _201()]);
9634
9699
  notifyStorageStatus();
@@ -9636,8 +9701,8 @@ function createRoom(options, config) {
9636
9701
  }
9637
9702
  async function streamStorage() {
9638
9703
  if (!managedSocket.authValue) return;
9639
- const items = await httpClient.streamStorage({ roomId });
9640
- processInitialStorage({ type: ServerMsgCode.INITIAL_STORAGE_STATE, items });
9704
+ const nodes = new Map(await httpClient.streamStorage({ roomId }));
9705
+ processInitialStorage(nodes);
9641
9706
  }
9642
9707
  function refreshStorage(options2) {
9643
9708
  const messages = context.buffer.messages;
@@ -9645,6 +9710,7 @@ function createRoom(options, config) {
9645
9710
  void streamStorage();
9646
9711
  } else if (!messages.some((msg) => msg.type === ClientMsgCode.FETCH_STORAGE)) {
9647
9712
  messages.push({ type: ClientMsgCode.FETCH_STORAGE });
9713
+ partialNodes.clear();
9648
9714
  }
9649
9715
  if (options2.flush) {
9650
9716
  flushNowOrSoon();
@@ -10224,7 +10290,7 @@ function makeAuthDelegateForRoom(roomId, authManager) {
10224
10290
  return authManager.getAuthValue({ requestedScope: "room:read", roomId });
10225
10291
  };
10226
10292
  }
10227
- function makeCreateSocketDelegateForRoom(roomId, baseUrl, WebSocketPolyfill) {
10293
+ function makeCreateSocketDelegateForRoom(roomId, baseUrl, WebSocketPolyfill, engine) {
10228
10294
  return (authValue) => {
10229
10295
  const ws = _nullishCoalesce(WebSocketPolyfill, () => ( (typeof WebSocket === "undefined" ? void 0 : WebSocket)));
10230
10296
  if (ws === void 0) {
@@ -10244,6 +10310,9 @@ function makeCreateSocketDelegateForRoom(roomId, baseUrl, WebSocketPolyfill) {
10244
10310
  return assertNever(authValue, "Unhandled case");
10245
10311
  }
10246
10312
  url2.searchParams.set("version", PKG_VERSION || "dev");
10313
+ if (engine !== void 0) {
10314
+ url2.searchParams.set("e", String(engine));
10315
+ }
10247
10316
  return new ws(url2.toString());
10248
10317
  };
10249
10318
  }
@@ -10363,7 +10432,8 @@ function createClient(options) {
10363
10432
  createSocket: makeCreateSocketDelegateForRoom(
10364
10433
  roomId,
10365
10434
  baseUrl,
10366
- _optionalChain([clientOptions, 'access', _224 => _224.polyfills, 'optionalAccess', _225 => _225.WebSocket])
10435
+ _optionalChain([clientOptions, 'access', _224 => _224.polyfills, 'optionalAccess', _225 => _225.WebSocket]),
10436
+ options2.engine
10367
10437
  ),
10368
10438
  authenticate: makeAuthDelegateForRoom(roomId, authManager)
10369
10439
  })),
@@ -11548,5 +11618,6 @@ detectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);
11548
11618
 
11549
11619
 
11550
11620
 
11551
- exports.ClientMsgCode = ClientMsgCode; exports.CrdtType = CrdtType; exports.DefaultMap = DefaultMap; exports.Deque = Deque; exports.DerivedSignal = DerivedSignal; exports.HttpError = HttpError; exports.LiveList = LiveList; exports.LiveMap = LiveMap; exports.LiveObject = LiveObject; exports.LiveblocksError = LiveblocksError; exports.MENTION_CHARACTER = MENTION_CHARACTER; exports.MutableSignal = MutableSignal; exports.OpCode = OpCode; exports.Permission = Permission; exports.Promise_withResolvers = Promise_withResolvers; exports.ServerMsgCode = ServerMsgCode; exports.Signal = Signal; exports.SortedList = SortedList; exports.TextEditorType = TextEditorType; exports.WebsocketCloseCodes = WebsocketCloseCodes; exports.asPos = asPos; exports.assert = assert; exports.assertNever = assertNever; exports.autoRetry = autoRetry; exports.b64decode = b64decode; exports.batch = batch; exports.checkBounds = checkBounds; exports.chunk = chunk; exports.cloneLson = cloneLson; exports.compactObject = compactObject; exports.console = fancy_console_exports; exports.convertToCommentData = convertToCommentData; exports.convertToCommentUserReaction = convertToCommentUserReaction; exports.convertToGroupData = convertToGroupData; exports.convertToInboxNotificationData = convertToInboxNotificationData; exports.convertToSubscriptionData = convertToSubscriptionData; exports.convertToThreadData = convertToThreadData; exports.convertToUserSubscriptionData = convertToUserSubscriptionData; exports.createClient = createClient; exports.createCommentAttachmentId = createCommentAttachmentId; exports.createCommentId = createCommentId; exports.createInboxNotificationId = createInboxNotificationId; exports.createManagedPool = createManagedPool; exports.createNotificationSettings = createNotificationSettings; exports.createThreadId = createThreadId; exports.defineAiTool = defineAiTool; exports.deprecate = deprecate; exports.deprecateIf = deprecateIf; exports.detectDupes = detectDupes; exports.entries = entries; exports.errorIf = errorIf; exports.findLastIndex = findLastIndex; exports.freeze = freeze; exports.generateUrl = generateUrl; exports.getMentionsFromCommentBody = getMentionsFromCommentBody; exports.getSubscriptionKey = getSubscriptionKey; exports.html = html; exports.htmlSafe = htmlSafe; exports.isCommentBodyLink = isCommentBodyLink; exports.isCommentBodyMention = isCommentBodyMention; exports.isCommentBodyText = isCommentBodyText; exports.isJsonArray = isJsonArray; exports.isJsonObject = isJsonObject; exports.isJsonScalar = isJsonScalar; exports.isLiveNode = isLiveNode; exports.isNotificationChannelEnabled = isNotificationChannelEnabled; exports.isNumberOperator = isNumberOperator; exports.isPlainObject = isPlainObject; exports.isStartsWithOperator = isStartsWithOperator; exports.isUrl = isUrl; exports.kInternal = kInternal; exports.keys = keys; exports.legacy_patchImmutableObject = legacy_patchImmutableObject; exports.lsonToJson = lsonToJson; exports.makeAbortController = makeAbortController; exports.makeEventSource = makeEventSource; exports.makePoller = makePoller; exports.makePosition = makePosition; exports.mapValues = mapValues; exports.memoizeOnSuccess = memoizeOnSuccess; exports.nanoid = nanoid; exports.nn = nn; exports.objectToQuery = objectToQuery; exports.patchLiveObjectKey = patchLiveObjectKey; exports.patchNotificationSettings = patchNotificationSettings; exports.raise = raise; exports.resolveMentionsInCommentBody = resolveMentionsInCommentBody; exports.sanitizeUrl = sanitizeUrl; exports.shallow = shallow; exports.shallow2 = shallow2; exports.stableStringify = stableStringify; exports.stringifyCommentBody = stringifyCommentBody; exports.throwUsageError = throwUsageError; exports.toPlainLson = toPlainLson; exports.tryParseJson = tryParseJson; exports.url = url; exports.urljoin = urljoin; exports.wait = wait; exports.warnOnce = warnOnce; exports.warnOnceIf = warnOnceIf; exports.withTimeout = withTimeout;
11621
+
11622
+ exports.ClientMsgCode = ClientMsgCode; exports.CrdtType = CrdtType; exports.DefaultMap = DefaultMap; exports.Deque = Deque; exports.DerivedSignal = DerivedSignal; exports.HttpError = HttpError; exports.LiveList = LiveList; exports.LiveMap = LiveMap; exports.LiveObject = LiveObject; exports.LiveblocksError = LiveblocksError; exports.MENTION_CHARACTER = MENTION_CHARACTER; exports.MutableSignal = MutableSignal; exports.OpCode = OpCode; exports.Permission = Permission; exports.Promise_withResolvers = Promise_withResolvers; exports.ServerMsgCode = ServerMsgCode; exports.Signal = Signal; exports.SortedList = SortedList; exports.TextEditorType = TextEditorType; exports.WebsocketCloseCodes = WebsocketCloseCodes; exports.asPos = asPos; exports.assert = assert; exports.assertNever = assertNever; exports.autoRetry = autoRetry; exports.b64decode = b64decode; exports.batch = batch; exports.checkBounds = checkBounds; exports.chunk = chunk; exports.cloneLson = cloneLson; exports.compactObject = compactObject; exports.console = fancy_console_exports; exports.convertToCommentData = convertToCommentData; exports.convertToCommentUserReaction = convertToCommentUserReaction; exports.convertToGroupData = convertToGroupData; exports.convertToInboxNotificationData = convertToInboxNotificationData; exports.convertToSubscriptionData = convertToSubscriptionData; exports.convertToThreadData = convertToThreadData; exports.convertToUserSubscriptionData = convertToUserSubscriptionData; exports.createClient = createClient; exports.createCommentAttachmentId = createCommentAttachmentId; exports.createCommentId = createCommentId; exports.createInboxNotificationId = createInboxNotificationId; exports.createManagedPool = createManagedPool; exports.createNotificationSettings = createNotificationSettings; exports.createThreadId = createThreadId; exports.defineAiTool = defineAiTool; exports.deprecate = deprecate; exports.deprecateIf = deprecateIf; exports.detectDupes = detectDupes; exports.entries = entries; exports.errorIf = errorIf; exports.findLastIndex = findLastIndex; exports.freeze = freeze; exports.generateUrl = generateUrl; exports.getMentionsFromCommentBody = getMentionsFromCommentBody; exports.getSubscriptionKey = getSubscriptionKey; exports.html = html; exports.htmlSafe = htmlSafe; exports.isCommentBodyLink = isCommentBodyLink; exports.isCommentBodyMention = isCommentBodyMention; exports.isCommentBodyText = isCommentBodyText; exports.isJsonArray = isJsonArray; exports.isJsonObject = isJsonObject; exports.isJsonScalar = isJsonScalar; exports.isLiveNode = isLiveNode; exports.isNotificationChannelEnabled = isNotificationChannelEnabled; exports.isNumberOperator = isNumberOperator; exports.isPlainObject = isPlainObject; exports.isStartsWithOperator = isStartsWithOperator; exports.isUrl = isUrl; exports.kInternal = kInternal; exports.keys = keys; exports.legacy_patchImmutableObject = legacy_patchImmutableObject; exports.lsonToJson = lsonToJson; exports.makeAbortController = makeAbortController; exports.makeEventSource = makeEventSource; exports.makePoller = makePoller; exports.makePosition = makePosition; exports.mapValues = mapValues; exports.memoizeOnSuccess = memoizeOnSuccess; exports.nanoid = nanoid; exports.nn = nn; exports.nodeStreamToCompactNodes = nodeStreamToCompactNodes; exports.objectToQuery = objectToQuery; exports.patchLiveObjectKey = patchLiveObjectKey; exports.patchNotificationSettings = patchNotificationSettings; exports.raise = raise; exports.resolveMentionsInCommentBody = resolveMentionsInCommentBody; exports.sanitizeUrl = sanitizeUrl; exports.shallow = shallow; exports.shallow2 = shallow2; exports.stableStringify = stableStringify; exports.stringifyCommentBody = stringifyCommentBody; exports.throwUsageError = throwUsageError; exports.toPlainLson = toPlainLson; exports.tryParseJson = tryParseJson; exports.url = url; exports.urljoin = urljoin; exports.wait = wait; exports.warnOnce = warnOnce; exports.warnOnceIf = warnOnceIf; exports.withTimeout = withTimeout;
11552
11623
  //# sourceMappingURL=index.cjs.map