@liveblocks/client 0.14.4 → 0.14.5

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.
@@ -6,6 +6,7 @@ export declare type ApplyResult = {
6
6
  modified: false;
7
7
  };
8
8
  export interface Doc {
9
+ roomId: string;
9
10
  generateId: () => string;
10
11
  generateOpId: () => string;
11
12
  getItem: (id: string) => AbstractCrdt | undefined;
@@ -19,6 +20,7 @@ export declare abstract class AbstractCrdt {
19
20
  * INTERNAL
20
21
  */
21
22
  protected get _doc(): Doc | undefined;
23
+ get roomId(): string | null;
22
24
  /**
23
25
  * INTERNAL
24
26
  */
@@ -27,6 +27,9 @@ class AbstractCrdt {
27
27
  get _doc() {
28
28
  return __classPrivateFieldGet(this, _AbstractCrdt_doc, "f");
29
29
  }
30
+ get roomId() {
31
+ return __classPrivateFieldGet(this, _AbstractCrdt_doc, "f") ? __classPrivateFieldGet(this, _AbstractCrdt_doc, "f").roomId : null;
32
+ }
30
33
  /**
31
34
  * INTERNAL
32
35
  */
package/lib/cjs/room.js CHANGED
@@ -169,6 +169,7 @@ function makeStateMachine(state, context, mockedEffects) {
169
169
  generateId,
170
170
  generateOpId,
171
171
  dispatch: storageDispatch,
172
+ roomId: context.room,
172
173
  });
173
174
  }
174
175
  function addItem(id, item) {
@@ -6,6 +6,7 @@ export declare type ApplyResult = {
6
6
  modified: false;
7
7
  };
8
8
  export interface Doc {
9
+ roomId: string;
9
10
  generateId: () => string;
10
11
  generateOpId: () => string;
11
12
  getItem: (id: string) => AbstractCrdt | undefined;
@@ -19,6 +20,7 @@ export declare abstract class AbstractCrdt {
19
20
  * INTERNAL
20
21
  */
21
22
  protected get _doc(): Doc | undefined;
23
+ get roomId(): string | null;
22
24
  /**
23
25
  * INTERNAL
24
26
  */
@@ -24,6 +24,9 @@ export class AbstractCrdt {
24
24
  get _doc() {
25
25
  return __classPrivateFieldGet(this, _AbstractCrdt_doc, "f");
26
26
  }
27
+ get roomId() {
28
+ return __classPrivateFieldGet(this, _AbstractCrdt_doc, "f") ? __classPrivateFieldGet(this, _AbstractCrdt_doc, "f").roomId : null;
29
+ }
27
30
  /**
28
31
  * INTERNAL
29
32
  */
package/lib/esm/room.js CHANGED
@@ -166,6 +166,7 @@ export function makeStateMachine(state, context, mockedEffects) {
166
166
  generateId,
167
167
  generateOpId,
168
168
  dispatch: storageDispatch,
169
+ roomId: context.room,
169
170
  });
170
171
  }
171
172
  function addItem(id, item) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liveblocks/client",
3
- "version": "0.14.4",
3
+ "version": "0.14.5",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",