@liveblocks/core 1.1.1-yjs1 → 1.1.1-yjs2

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.ts CHANGED
@@ -1054,7 +1054,7 @@ declare type Room<TPresence extends JsonObject, TStorage extends LsonObject, TUs
1054
1054
  }): void;
1055
1055
  /**
1056
1056
  *
1057
- * Sends YJS document updates to liveblocks server
1057
+ * Sends Yjs document updates to liveblocks server
1058
1058
  *
1059
1059
  * @param {string} data the doc update to send to the server, base64 encoded uint8array
1060
1060
  */
@@ -1062,7 +1062,7 @@ declare type Room<TPresence extends JsonObject, TStorage extends LsonObject, TUs
1062
1062
  /**
1063
1063
  * Sends a request for the current document from liveblocks server
1064
1064
  */
1065
- getYDoc(stateVector: string): void;
1065
+ fetchYDoc(stateVector: string): void;
1066
1066
  /**
1067
1067
  * Broadcasts an event to other users in the room. Event broadcasted to the room can be listened with {@link Room.subscribe}("event").
1068
1068
  * @param {any} event the event to broadcast. Should be serializable to JSON
@@ -1120,7 +1120,7 @@ declare type Room<TPresence extends JsonObject, TStorage extends LsonObject, TUs
1120
1120
  */
1121
1121
  readonly storageDidLoad: Observable<void>;
1122
1122
  readonly storageStatus: Observable<StorageStatus>;
1123
- readonly docUpdated: Observable<string>;
1123
+ readonly ydoc: Observable<string>;
1124
1124
  };
1125
1125
  /**
1126
1126
  * Batches modifications made during the given function.
package/dist/index.js CHANGED
@@ -145,7 +145,7 @@ var onMessageFromPanel = eventSource.observable;
145
145
  // src/devtools/index.ts
146
146
  var VERSION = true ? (
147
147
  /* istanbul ignore next */
148
- "1.1.1-yjs1"
148
+ "1.1.1-yjs2"
149
149
  ) : "dev";
150
150
  var _devtoolsSetupHasRun = false;
151
151
  function setupDevTools(getAllRooms) {
@@ -4395,7 +4395,7 @@ function createRoom(options, config) {
4395
4395
  history: makeEventSource(),
4396
4396
  storageDidLoad: makeEventSource(),
4397
4397
  storageStatus: makeEventSource(),
4398
- docUpdated: makeEventSource()
4398
+ ydoc: makeEventSource()
4399
4399
  };
4400
4400
  function sendMessages(messageOrMessages) {
4401
4401
  var _a2, _b2;
@@ -4817,7 +4817,7 @@ function createRoom(options, config) {
4817
4817
  break;
4818
4818
  }
4819
4819
  case 300 /* UPDATE_YDOC */: {
4820
- eventHub.docUpdated.notify(message.update);
4820
+ eventHub.ydoc.notify(message.update);
4821
4821
  break;
4822
4822
  }
4823
4823
  case 104 /* ROOM_STATE */: {
@@ -5004,7 +5004,7 @@ ${Array.from(traces).join("\n\n")}`
5004
5004
  };
5005
5005
  });
5006
5006
  }
5007
- function getYDoc(vector) {
5007
+ function fetchYDoc(vector) {
5008
5008
  context.buffer.messages.push({
5009
5009
  type: 300 /* FETCH_YDOC */,
5010
5010
  vector
@@ -5133,7 +5133,7 @@ ${Array.from(traces).join("\n\n")}`
5133
5133
  history: eventHub.history.observable,
5134
5134
  storageDidLoad: eventHub.storageDidLoad.observable,
5135
5135
  storageStatus: eventHub.storageStatus.observable,
5136
- docUpdated: eventHub.docUpdated.observable
5136
+ ydoc: eventHub.ydoc.observable
5137
5137
  };
5138
5138
  return {
5139
5139
  /* NOTE: Exposing __internal here only to allow testing implementation details in unit tests */
@@ -5180,7 +5180,7 @@ ${Array.from(traces).join("\n\n")}`
5180
5180
  pause: pauseHistory,
5181
5181
  resume: resumeHistory
5182
5182
  },
5183
- getYDoc,
5183
+ fetchYDoc,
5184
5184
  getStorage,
5185
5185
  getStorageSnapshot,
5186
5186
  getStorageStatus,
@@ -5296,7 +5296,7 @@ function makeCreateSocketDelegateForRoom(liveblocksServer, WebSocketPolyfill) {
5296
5296
  // @ts-ignore (__PACKAGE_VERSION__ will be injected by the build script)
5297
5297
  true ? (
5298
5298
  /* istanbul ignore next */
5299
- "1.1.1-yjs1"
5299
+ "1.1.1-yjs2"
5300
5300
  ) : "dev"}`
5301
5301
  );
5302
5302
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liveblocks/core",
3
- "version": "1.1.1-yjs1",
3
+ "version": "1.1.1-yjs2",
4
4
  "description": "Shared code and foundational internals for Liveblocks",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",