@liveblocks/yjs 1.1.1-yjs3 → 1.2.0-internal1

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 CHANGED
@@ -29,7 +29,6 @@ declare class Awareness extends Observable<unknown> {
29
29
  }
30
30
  declare class LiveblocksProvider<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json> extends Observable<unknown> {
31
31
  private room;
32
- private httpEndpoint?;
33
32
  private doc;
34
33
  private unsubscribers;
35
34
  awareness: Awareness;
package/dist/index.d.ts CHANGED
@@ -29,7 +29,6 @@ declare class Awareness extends Observable<unknown> {
29
29
  }
30
30
  declare class LiveblocksProvider<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json> extends Observable<unknown> {
31
31
  private room;
32
- private httpEndpoint?;
33
32
  private doc;
34
33
  private unsubscribers;
35
34
  awareness: Awareness;
package/dist/index.js CHANGED
@@ -14,26 +14,6 @@ var __spreadValues = (a, b) => {
14
14
  }
15
15
  return a;
16
16
  };
17
- var __async = (__this, __arguments, generator) => {
18
- return new Promise((resolve, reject) => {
19
- var fulfilled = (value) => {
20
- try {
21
- step(generator.next(value));
22
- } catch (e) {
23
- reject(e);
24
- }
25
- };
26
- var rejected = (value) => {
27
- try {
28
- step(generator.throw(value));
29
- } catch (e) {
30
- reject(e);
31
- }
32
- };
33
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
34
- step((generator = generator.apply(__this, __arguments)).next());
35
- });
36
- };
37
17
 
38
18
  // src/index.ts
39
19
  var _jsbase64 = require('js-base64');
@@ -202,18 +182,12 @@ var LiveblocksProvider = class extends Observable {
202
182
  const encodedVector = _jsbase64.Base64.fromUint8Array(Y.encodeStateVector(this.doc));
203
183
  this.room.fetchYDoc(encodedVector);
204
184
  };
205
- this.updateHandler = (update, origin) => __async(this, null, function* () {
185
+ this.updateHandler = (update, origin) => {
206
186
  if (origin !== "backend") {
207
187
  const encodedUpdate = _jsbase64.Base64.fromUint8Array(update);
208
188
  this.room.updateYDoc(encodedUpdate);
209
- if (this.httpEndpoint) {
210
- yield fetch(this.httpEndpoint, {
211
- method: "POST",
212
- body: encodedUpdate
213
- });
214
- }
215
189
  }
216
- });
190
+ };
217
191
  this.doc = doc;
218
192
  this.room = room;
219
193
  const connectionId = (_a = this.room.getSelf()) == null ? void 0 : _a.connectionId;
package/dist/index.mjs CHANGED
@@ -14,26 +14,6 @@ var __spreadValues = (a, b) => {
14
14
  }
15
15
  return a;
16
16
  };
17
- var __async = (__this, __arguments, generator) => {
18
- return new Promise((resolve, reject) => {
19
- var fulfilled = (value) => {
20
- try {
21
- step(generator.next(value));
22
- } catch (e) {
23
- reject(e);
24
- }
25
- };
26
- var rejected = (value) => {
27
- try {
28
- step(generator.throw(value));
29
- } catch (e) {
30
- reject(e);
31
- }
32
- };
33
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
34
- step((generator = generator.apply(__this, __arguments)).next());
35
- });
36
- };
37
17
 
38
18
  // src/index.ts
39
19
  import { Base64 } from "js-base64";
@@ -202,18 +182,12 @@ var LiveblocksProvider = class extends Observable {
202
182
  const encodedVector = Base64.fromUint8Array(Y.encodeStateVector(this.doc));
203
183
  this.room.fetchYDoc(encodedVector);
204
184
  };
205
- this.updateHandler = (update, origin) => __async(this, null, function* () {
185
+ this.updateHandler = (update, origin) => {
206
186
  if (origin !== "backend") {
207
187
  const encodedUpdate = Base64.fromUint8Array(update);
208
188
  this.room.updateYDoc(encodedUpdate);
209
- if (this.httpEndpoint) {
210
- yield fetch(this.httpEndpoint, {
211
- method: "POST",
212
- body: encodedUpdate
213
- });
214
- }
215
189
  }
216
- });
190
+ };
217
191
  this.doc = doc;
218
192
  this.room = room;
219
193
  const connectionId = (_a = this.room.getSelf()) == null ? void 0 : _a.connectionId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liveblocks/yjs",
3
- "version": "1.1.1-yjs3",
3
+ "version": "1.2.0-internal1",
4
4
  "description": "An integration with . Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -14,7 +14,7 @@
14
14
  "build": "tsup && cp dist/index.d.ts dist/index.d.mts",
15
15
  "format": "eslint --fix src/; prettier --write src/",
16
16
  "lint": "eslint src/",
17
- "lint:package": "publint --strict && attw /tmp/$( npm pack -q --pack-destination /tmp )",
17
+ "lint:package": "publint --strict && attw --pack",
18
18
  "test": "jest --silent --verbose --color=always",
19
19
  "test:types": "tsd",
20
20
  "test:watch": "jest --silent --verbose --color=always --watch"
@@ -32,8 +32,8 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@liveblocks/client": "1.1.1-yjs3",
36
- "@liveblocks/core": "1.1.1-yjs3",
35
+ "@liveblocks/client": "1.2.0-internal1",
36
+ "@liveblocks/core": "1.2.0-internal1",
37
37
  "js-base64": "^3.7.5"
38
38
  },
39
39
  "peerDependencies": {