@liveblocks/client 0.16.1 → 0.16.2
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/{lib/esm → esm}/index.js +8 -2
- package/{lib/esm → esm}/index.mjs +8 -2
- package/{lib/esm → esm}/internal.js +0 -0
- package/{lib/esm → esm}/internal.mjs +0 -0
- package/{lib/index.d.ts → index.d.ts} +2 -2
- package/{lib/index.js → index.js} +10 -2
- package/{lib/internal.d.ts → internal.d.ts} +1 -1
- package/{lib/internal.js → internal.js} +0 -0
- package/package.json +13 -13
package/{lib/esm → esm}/index.js
RENAMED
|
@@ -2778,7 +2778,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
2778
2778
|
function lsonObjectToJson(obj) {
|
|
2779
2779
|
const result = {};
|
|
2780
2780
|
for (const key in obj) {
|
|
2781
|
-
|
|
2781
|
+
const val = obj[key];
|
|
2782
|
+
if (val !== void 0) {
|
|
2783
|
+
result[key] = lsonToJson(val);
|
|
2784
|
+
}
|
|
2782
2785
|
}
|
|
2783
2786
|
return result;
|
|
2784
2787
|
}
|
|
@@ -2968,7 +2971,10 @@ function patchImmutableNode(state, path, update) {
|
|
|
2968
2971
|
const newState = Object.assign({}, state);
|
|
2969
2972
|
for (const key in update.updates) {
|
|
2970
2973
|
if (((_a = update.updates[key]) == null ? void 0 : _a.type) === "update") {
|
|
2971
|
-
|
|
2974
|
+
const val = update.node.get(key);
|
|
2975
|
+
if (val !== void 0) {
|
|
2976
|
+
newState[key] = lsonToJson(val);
|
|
2977
|
+
}
|
|
2972
2978
|
} else if (((_b = update.updates[key]) == null ? void 0 : _b.type) === "delete") {
|
|
2973
2979
|
delete newState[key];
|
|
2974
2980
|
}
|
|
@@ -2778,7 +2778,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
2778
2778
|
function lsonObjectToJson(obj) {
|
|
2779
2779
|
const result = {};
|
|
2780
2780
|
for (const key in obj) {
|
|
2781
|
-
|
|
2781
|
+
const val = obj[key];
|
|
2782
|
+
if (val !== void 0) {
|
|
2783
|
+
result[key] = lsonToJson(val);
|
|
2784
|
+
}
|
|
2782
2785
|
}
|
|
2783
2786
|
return result;
|
|
2784
2787
|
}
|
|
@@ -2968,7 +2971,10 @@ function patchImmutableNode(state, path, update) {
|
|
|
2968
2971
|
const newState = Object.assign({}, state);
|
|
2969
2972
|
for (const key in update.updates) {
|
|
2970
2973
|
if (((_a = update.updates[key]) == null ? void 0 : _a.type) === "update") {
|
|
2971
|
-
|
|
2974
|
+
const val = update.node.get(key);
|
|
2975
|
+
if (val !== void 0) {
|
|
2976
|
+
newState[key] = lsonToJson(val);
|
|
2977
|
+
}
|
|
2972
2978
|
} else if (((_b = update.updates[key]) == null ? void 0 : _b.type) === "delete") {
|
|
2973
2979
|
delete newState[key];
|
|
2974
2980
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -12,7 +12,7 @@ declare type Json = JsonScalar | JsonArray | JsonObject;
|
|
|
12
12
|
declare type JsonScalar = string | number | boolean | null;
|
|
13
13
|
declare type JsonArray = Json[];
|
|
14
14
|
declare type JsonObject = {
|
|
15
|
-
[key: string]: Json;
|
|
15
|
+
[key: string]: Json | undefined;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -83,7 +83,7 @@ declare type Lson = Json | LiveObject<LsonObject> | LiveList<Lson> | LiveMap<str
|
|
|
83
83
|
* value or a Live storage data structure (LiveMap, LiveList, etc.)
|
|
84
84
|
*/
|
|
85
85
|
declare type LsonObject = {
|
|
86
|
-
[key: string]: Lson;
|
|
86
|
+
[key: string]: Lson | undefined;
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
/**
|
|
@@ -3995,7 +3995,11 @@ function lsonObjectToJson(obj) {
|
|
|
3995
3995
|
var result = {};
|
|
3996
3996
|
|
|
3997
3997
|
for (var _key in obj) {
|
|
3998
|
-
|
|
3998
|
+
var val = obj[_key];
|
|
3999
|
+
|
|
4000
|
+
if (val !== undefined) {
|
|
4001
|
+
result[_key] = lsonToJson(val);
|
|
4002
|
+
}
|
|
3999
4003
|
}
|
|
4000
4004
|
|
|
4001
4005
|
return result;
|
|
@@ -4239,7 +4243,11 @@ function patchImmutableNode(state, path, update) {
|
|
|
4239
4243
|
var _update$updates$_key, _update$updates$_key2;
|
|
4240
4244
|
|
|
4241
4245
|
if (((_update$updates$_key = update.updates[_key6]) == null ? void 0 : _update$updates$_key.type) === "update") {
|
|
4242
|
-
|
|
4246
|
+
var val = update.node.get(_key6);
|
|
4247
|
+
|
|
4248
|
+
if (val !== undefined) {
|
|
4249
|
+
newState[_key6] = lsonToJson(val);
|
|
4250
|
+
}
|
|
4243
4251
|
} else if (((_update$updates$_key2 = update.updates[_key6]) == null ? void 0 : _update$updates$_key2.type) === "delete") {
|
|
4244
4252
|
delete newState[_key6];
|
|
4245
4253
|
}
|
|
@@ -12,7 +12,7 @@ declare type Json = JsonScalar | JsonArray | JsonObject;
|
|
|
12
12
|
declare type JsonScalar = string | number | boolean | null;
|
|
13
13
|
declare type JsonArray = Json[];
|
|
14
14
|
declare type JsonObject = {
|
|
15
|
-
[key: string]: Json;
|
|
15
|
+
[key: string]: Json | undefined;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
declare type Presence = Record<string, unknown>;
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liveblocks/client",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"description": "A client that lets you interact with Liveblocks servers.",
|
|
5
|
-
"main": "./
|
|
6
|
-
"types": "./
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"
|
|
8
|
+
"**"
|
|
9
9
|
],
|
|
10
10
|
"exports": {
|
|
11
11
|
"./package.json": "./package.json",
|
|
12
12
|
".": {
|
|
13
|
-
"types": "./
|
|
14
|
-
"module": "./
|
|
15
|
-
"import": "./
|
|
16
|
-
"default": "./
|
|
13
|
+
"types": "./index.d.ts",
|
|
14
|
+
"module": "./esm/index.js",
|
|
15
|
+
"import": "./esm/index.mjs",
|
|
16
|
+
"default": "./index.js"
|
|
17
17
|
},
|
|
18
18
|
"./internal": {
|
|
19
|
-
"types": "./
|
|
20
|
-
"module": "./
|
|
21
|
-
"import": "./
|
|
22
|
-
"default": "./
|
|
19
|
+
"types": "./internal.d.ts",
|
|
20
|
+
"module": "./esm/internal.js",
|
|
21
|
+
"import": "./esm/internal.mjs",
|
|
22
|
+
"default": "./internal.js"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"url": "https://github.com/liveblocks/liveblocks/issues"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
|
-
"build": "rollup -c",
|
|
35
|
+
"build": "rollup -c && cp ./package.json ./README.md ./lib",
|
|
36
36
|
"test": "jest --watch",
|
|
37
37
|
"test-ci": "jest"
|
|
38
38
|
},
|