@pluv/react 0.5.7 → 0.5.8
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/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +10 -0
- package/dist/index.js +2 -6
- package/dist/index.mjs +2 -6
- package/package.json +4 -4
- package/src/createRoomBundle.tsx +2 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/react@0.5.
|
|
2
|
+
> @pluv/react@0.5.8 build /home/runner/work/pluv/pluv/packages/react
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --dts --external react
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m11.15 KB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 100ms
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m8.66 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 110ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 4254ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m4.37 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @pluv/react
|
|
2
2
|
|
|
3
|
+
## 0.5.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7ad4967: fixed user's presence not updating locally while offline
|
|
8
|
+
- Updated dependencies [7ad4967]
|
|
9
|
+
- Updated dependencies [4535687]
|
|
10
|
+
- @pluv/client@0.6.5
|
|
11
|
+
- @pluv/types@0.1.6
|
|
12
|
+
|
|
3
13
|
## 0.5.7
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -195,12 +195,8 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
195
195
|
);
|
|
196
196
|
const updateMyPresence = (0, import_react3.useCallback)(
|
|
197
197
|
(value) => {
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
room.broadcast(
|
|
201
|
-
"$UPDATE_PRESENCE",
|
|
202
|
-
{ presence }
|
|
203
|
-
);
|
|
198
|
+
const presence = typeof value === "function" ? value(room.getMyPresence()) : value;
|
|
199
|
+
room.updateMyPresence(presence);
|
|
204
200
|
},
|
|
205
201
|
[room]
|
|
206
202
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -158,12 +158,8 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
158
158
|
);
|
|
159
159
|
const updateMyPresence = useCallback2(
|
|
160
160
|
(value) => {
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
room.broadcast(
|
|
164
|
-
"$UPDATE_PRESENCE",
|
|
165
|
-
{ presence }
|
|
166
|
-
);
|
|
161
|
+
const presence = typeof value === "function" ? value(room.getMyPresence()) : value;
|
|
162
|
+
room.updateMyPresence(presence);
|
|
167
163
|
},
|
|
168
164
|
[room]
|
|
169
165
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/react",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "@pluv/client React.js bindings",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@types/use-sync-external-store": "^0.0.3",
|
|
21
21
|
"fast-deep-equal": "^3.1.3",
|
|
22
22
|
"use-sync-external-store": "^1.2.0",
|
|
23
|
-
"@pluv/client": "^0.6.
|
|
23
|
+
"@pluv/client": "^0.6.5",
|
|
24
24
|
"@pluv/types": "^0.1.6"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"yjs": "^13.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@types/react": "18.0.
|
|
31
|
+
"@types/react": "18.0.37",
|
|
32
32
|
"react": "18.2.0",
|
|
33
33
|
"tsup": "^6.7.0",
|
|
34
34
|
"typescript": "^5.0.4",
|
|
35
35
|
"yjs": "^13.5.52",
|
|
36
|
-
"@pluv/tsconfig": "^0.1.
|
|
36
|
+
"@pluv/tsconfig": "^0.1.6",
|
|
37
37
|
"eslint-config-pluv": "^0.1.10"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
package/src/createRoomBundle.tsx
CHANGED
|
@@ -334,16 +334,12 @@ export const createRoomBundle = <
|
|
|
334
334
|
const updateMyPresence: Dispatch<UpdateMyPresenceAction<TPresence>> =
|
|
335
335
|
useCallback(
|
|
336
336
|
(value: UpdateMyPresenceAction<TPresence>): void => {
|
|
337
|
-
const oldMyPresence = room.getMyPresence();
|
|
338
337
|
const presence =
|
|
339
338
|
typeof value === "function"
|
|
340
|
-
? value(
|
|
339
|
+
? value(room.getMyPresence())
|
|
341
340
|
: value;
|
|
342
341
|
|
|
343
|
-
room.
|
|
344
|
-
"$UPDATE_PRESENCE" as keyof InferIOInput<TIO>,
|
|
345
|
-
{ presence } as any
|
|
346
|
-
);
|
|
342
|
+
room.updateMyPresence(presence);
|
|
347
343
|
},
|
|
348
344
|
[room]
|
|
349
345
|
);
|