@liveblocks/zustand 0.15.11 → 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/README.md CHANGED
@@ -18,6 +18,8 @@
18
18
  </a>
19
19
  </p>
20
20
 
21
+ A [middleware](https://github.com/pmndrs/zustand#middleware) to integrate [Liveblocks](https://liveblocks.io) into [Zustand](https://github.com/pmndrs/zustand) stores.
22
+
21
23
  ## Installation
22
24
 
23
25
  ```
@@ -39,7 +39,7 @@ var __spreadValues = (a, b) => {
39
39
  return a;
40
40
  };
41
41
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
42
- const { patchLiveObjectKey, patchImmutableObject, liveNodeToJson } = internals;
42
+ const { patchLiveObjectKey, patchImmutableObject, lsonToJson } = internals;
43
43
  function middleware(config, options) {
44
44
  if (process.env.NODE_ENV !== "production" && options.client == null) {
45
45
  throw missingClient();
@@ -101,7 +101,7 @@ function middleware(config, options) {
101
101
  updates[key] = initialState[key];
102
102
  patchLiveObjectKey(root, key, void 0, initialState[key]);
103
103
  } else {
104
- updates[key] = liveNodeToJson(liveblocksStatePart);
104
+ updates[key] = lsonToJson(liveblocksStatePart);
105
105
  }
106
106
  }
107
107
  });
@@ -39,7 +39,7 @@ var __spreadValues = (a, b) => {
39
39
  return a;
40
40
  };
41
41
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
42
- const { patchLiveObjectKey, patchImmutableObject, liveNodeToJson } = internals;
42
+ const { patchLiveObjectKey, patchImmutableObject, lsonToJson } = internals;
43
43
  function middleware(config, options) {
44
44
  if (process.env.NODE_ENV !== "production" && options.client == null) {
45
45
  throw missingClient();
@@ -101,7 +101,7 @@ function middleware(config, options) {
101
101
  updates[key] = initialState[key];
102
102
  patchLiveObjectKey(root, key, void 0, initialState[key]);
103
103
  } else {
104
- updates[key] = liveNodeToJson(liveblocksStatePart);
104
+ updates[key] = lsonToJson(liveblocksStatePart);
105
105
  }
106
106
  }
107
107
  });
File without changes
@@ -82,7 +82,7 @@ function mappingToFunctionIsNotAllowed(key) {
82
82
 
83
83
  var patchLiveObjectKey = client.internals.patchLiveObjectKey,
84
84
  patchImmutableObject = client.internals.patchImmutableObject,
85
- liveNodeToJson = client.internals.liveNodeToJson;
85
+ lsonToJson = client.internals.lsonToJson;
86
86
  function middleware(config, options) {
87
87
  if (process.env.NODE_ENV !== "production" && options.client == null) {
88
88
  throw missingClient();
@@ -157,7 +157,7 @@ function middleware(config, options) {
157
157
  updates[_key] = initialState[_key];
158
158
  patchLiveObjectKey(root, _key, undefined, initialState[_key]);
159
159
  } else {
160
- updates[_key] = liveNodeToJson(liveblocksStatePart);
160
+ updates[_key] = lsonToJson(liveblocksStatePart);
161
161
  }
162
162
  }
163
163
  });
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@liveblocks/zustand",
3
- "version": "0.15.11",
3
+ "version": "0.16.2",
4
4
  "sideEffects": false,
5
- "description": "",
6
- "main": "./lib/index.js",
7
- "types": "./lib/index.d.ts",
5
+ "description": "A middleware to integrate Liveblocks into Zustand stores.",
6
+ "main": "./index.js",
7
+ "types": "./index.d.ts",
8
8
  "files": [
9
- "lib/"
9
+ "**"
10
10
  ],
11
11
  "exports": {
12
12
  ".": {
13
- "types": "./lib/index.d.ts",
14
- "module": "./lib/esm/index.js",
15
- "import": "./lib/esm/index.mjs",
16
- "default": "./lib/index.js"
13
+ "types": "./index.d.ts",
14
+ "module": "./esm/index.js",
15
+ "import": "./esm/index.mjs",
16
+ "default": "./index.js"
17
17
  }
18
18
  },
19
19
  "keywords": [
@@ -25,7 +25,7 @@
25
25
  "collaborative"
26
26
  ],
27
27
  "scripts": {
28
- "build": "rollup -c",
28
+ "build": "rollup -c && cp ./package.json ./README.md ./lib",
29
29
  "test": "jest --watch",
30
30
  "dtslint": "dtslint --localTs node_modules/typescript/lib --expectOnly types"
31
31
  },
@@ -36,7 +36,7 @@
36
36
  "directory": "packages/liveblocks-zustand"
37
37
  },
38
38
  "peerDependencies": {
39
- "@liveblocks/client": "0.15.11",
39
+ "@liveblocks/client": "0.16.2",
40
40
  "zustand": "^3"
41
41
  },
42
42
  "devDependencies": {