@pluv/react 0.5.2 → 0.5.4
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 +20 -0
- package/dist/index.js +8 -4
- package/dist/index.mjs +8 -4
- package/package.json +6 -6
- package/src/createBundle.tsx +2 -2
- package/src/createRoomBundle.tsx +4 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/react@0.5.
|
|
2
|
+
> @pluv/react@0.5.4 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
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m8.75 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 126ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m11.24 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 128ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 6409ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m4.37 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @pluv/react
|
|
2
2
|
|
|
3
|
+
## 0.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 19433af: updated MockedRoomProvider events to allow partial events
|
|
8
|
+
- b80c555: updated react hooks to not re-render if state is deeply equal by default
|
|
9
|
+
- 74870ee: bumped dependencies
|
|
10
|
+
- Updated dependencies [19433af]
|
|
11
|
+
- Updated dependencies [74870ee]
|
|
12
|
+
- @pluv/client@0.6.1
|
|
13
|
+
- @pluv/types@0.1.5
|
|
14
|
+
|
|
15
|
+
## 0.5.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 57ae13f: bumped dependencies
|
|
20
|
+
- @pluv/client@0.6.0
|
|
21
|
+
- @pluv/types@0.1.4
|
|
22
|
+
|
|
3
23
|
## 0.5.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -140,6 +140,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
140
140
|
);
|
|
141
141
|
};
|
|
142
142
|
const usePluvConnection = (selector = identity, options2) => {
|
|
143
|
+
var _a;
|
|
143
144
|
const room = usePluvRoom();
|
|
144
145
|
const subscribe = (0, import_react3.useCallback)(
|
|
145
146
|
(onStoreChange) => {
|
|
@@ -157,7 +158,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
157
158
|
getSnapshot,
|
|
158
159
|
getSnapshot,
|
|
159
160
|
_selector,
|
|
160
|
-
options2 == null ? void 0 : options2.isEqual
|
|
161
|
+
(_a = options2 == null ? void 0 : options2.isEqual) != null ? _a : import_fast_deep_equal.default
|
|
161
162
|
);
|
|
162
163
|
};
|
|
163
164
|
const usePluvEvent = (type, callback) => {
|
|
@@ -170,6 +171,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
170
171
|
}, [callback, room, type]);
|
|
171
172
|
};
|
|
172
173
|
const usePluvMyPresence = (selector = identity, options2) => {
|
|
174
|
+
var _a;
|
|
173
175
|
const room = usePluvRoom();
|
|
174
176
|
const subscribe = (0, import_react3.useCallback)(
|
|
175
177
|
(onStoreChange) => {
|
|
@@ -189,7 +191,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
189
191
|
getSnapshot,
|
|
190
192
|
getSnapshot,
|
|
191
193
|
_selector,
|
|
192
|
-
options2 == null ? void 0 : options2.isEqual
|
|
194
|
+
(_a = options2 == null ? void 0 : options2.isEqual) != null ? _a : import_fast_deep_equal.default
|
|
193
195
|
);
|
|
194
196
|
const updateMyPresence = (0, import_react3.useCallback)(
|
|
195
197
|
(value) => {
|
|
@@ -205,6 +207,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
205
207
|
return [myPresence, updateMyPresence];
|
|
206
208
|
};
|
|
207
209
|
const usePluvMyself = (selector = identity, options2) => {
|
|
210
|
+
var _a;
|
|
208
211
|
const room = usePluvRoom();
|
|
209
212
|
const subscribe = (0, import_react3.useCallback)(
|
|
210
213
|
(onStoreChange) => {
|
|
@@ -224,10 +227,11 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
224
227
|
getSnapshot,
|
|
225
228
|
getSnapshot,
|
|
226
229
|
_selector,
|
|
227
|
-
options2 == null ? void 0 : options2.isEqual
|
|
230
|
+
(_a = options2 == null ? void 0 : options2.isEqual) != null ? _a : import_fast_deep_equal.default
|
|
228
231
|
);
|
|
229
232
|
};
|
|
230
233
|
const usePluvOther = (connectionId, selector = identity, options2) => {
|
|
234
|
+
var _a;
|
|
231
235
|
const room = usePluvRoom();
|
|
232
236
|
const subscribe = (0, import_react3.useCallback)(
|
|
233
237
|
(onStoreChange) => {
|
|
@@ -250,7 +254,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
250
254
|
getSnapshot,
|
|
251
255
|
getSnapshot,
|
|
252
256
|
_selector,
|
|
253
|
-
options2 == null ? void 0 : options2.isEqual
|
|
257
|
+
(_a = options2 == null ? void 0 : options2.isEqual) != null ? _a : import_fast_deep_equal.default
|
|
254
258
|
);
|
|
255
259
|
};
|
|
256
260
|
const usePluvOthers = (selector = identity, options2) => {
|
package/dist/index.mjs
CHANGED
|
@@ -103,6 +103,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
103
103
|
);
|
|
104
104
|
};
|
|
105
105
|
const usePluvConnection = (selector = identity, options2) => {
|
|
106
|
+
var _a;
|
|
106
107
|
const room = usePluvRoom();
|
|
107
108
|
const subscribe = useCallback2(
|
|
108
109
|
(onStoreChange) => {
|
|
@@ -120,7 +121,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
120
121
|
getSnapshot,
|
|
121
122
|
getSnapshot,
|
|
122
123
|
_selector,
|
|
123
|
-
options2 == null ? void 0 : options2.isEqual
|
|
124
|
+
(_a = options2 == null ? void 0 : options2.isEqual) != null ? _a : fastDeepEqual
|
|
124
125
|
);
|
|
125
126
|
};
|
|
126
127
|
const usePluvEvent = (type, callback) => {
|
|
@@ -133,6 +134,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
133
134
|
}, [callback, room, type]);
|
|
134
135
|
};
|
|
135
136
|
const usePluvMyPresence = (selector = identity, options2) => {
|
|
137
|
+
var _a;
|
|
136
138
|
const room = usePluvRoom();
|
|
137
139
|
const subscribe = useCallback2(
|
|
138
140
|
(onStoreChange) => {
|
|
@@ -152,7 +154,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
152
154
|
getSnapshot,
|
|
153
155
|
getSnapshot,
|
|
154
156
|
_selector,
|
|
155
|
-
options2 == null ? void 0 : options2.isEqual
|
|
157
|
+
(_a = options2 == null ? void 0 : options2.isEqual) != null ? _a : fastDeepEqual
|
|
156
158
|
);
|
|
157
159
|
const updateMyPresence = useCallback2(
|
|
158
160
|
(value) => {
|
|
@@ -168,6 +170,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
168
170
|
return [myPresence, updateMyPresence];
|
|
169
171
|
};
|
|
170
172
|
const usePluvMyself = (selector = identity, options2) => {
|
|
173
|
+
var _a;
|
|
171
174
|
const room = usePluvRoom();
|
|
172
175
|
const subscribe = useCallback2(
|
|
173
176
|
(onStoreChange) => {
|
|
@@ -187,10 +190,11 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
187
190
|
getSnapshot,
|
|
188
191
|
getSnapshot,
|
|
189
192
|
_selector,
|
|
190
|
-
options2 == null ? void 0 : options2.isEqual
|
|
193
|
+
(_a = options2 == null ? void 0 : options2.isEqual) != null ? _a : fastDeepEqual
|
|
191
194
|
);
|
|
192
195
|
};
|
|
193
196
|
const usePluvOther = (connectionId, selector = identity, options2) => {
|
|
197
|
+
var _a;
|
|
194
198
|
const room = usePluvRoom();
|
|
195
199
|
const subscribe = useCallback2(
|
|
196
200
|
(onStoreChange) => {
|
|
@@ -213,7 +217,7 @@ var createRoomBundle = (client, options = {}) => {
|
|
|
213
217
|
getSnapshot,
|
|
214
218
|
getSnapshot,
|
|
215
219
|
_selector,
|
|
216
|
-
options2 == null ? void 0 : options2.isEqual
|
|
220
|
+
(_a = options2 == null ? void 0 : options2.isEqual) != null ? _a : fastDeepEqual
|
|
217
221
|
);
|
|
218
222
|
};
|
|
219
223
|
const usePluvOthers = (selector = identity, options2) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/react",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "@pluv/client React.js bindings",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,21 +20,21 @@
|
|
|
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.
|
|
24
|
-
"@pluv/types": "^0.1.
|
|
23
|
+
"@pluv/client": "^0.6.1",
|
|
24
|
+
"@pluv/types": "^0.1.5"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^17.0.0 || ^18.0.0",
|
|
28
28
|
"yjs": "^13.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@types/react": "18.0.
|
|
31
|
+
"@types/react": "18.0.31",
|
|
32
32
|
"react": "18.2.0",
|
|
33
33
|
"tsup": "^6.7.0",
|
|
34
|
-
"typescript": "^5.0.
|
|
34
|
+
"typescript": "^5.0.3",
|
|
35
35
|
"yjs": "^13.5.51",
|
|
36
36
|
"@pluv/tsconfig": "^0.1.4",
|
|
37
|
-
"eslint-config-pluv": "^0.1.
|
|
37
|
+
"eslint-config-pluv": "^0.1.8"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "tsup src/index.ts --format esm,cjs --dts --external react",
|
package/src/createBundle.tsx
CHANGED
|
@@ -3,11 +3,11 @@ import type { IOLike, JsonObject } from "@pluv/types";
|
|
|
3
3
|
import { createContext, FC, ReactNode } from "react";
|
|
4
4
|
import { memo, useContext } from "react";
|
|
5
5
|
import type { AbstractType } from "yjs";
|
|
6
|
-
import {
|
|
6
|
+
import type {
|
|
7
7
|
CreateRoomBundle,
|
|
8
|
-
createRoomBundle as _createRoomBundle,
|
|
9
8
|
CreateRoomBundleOptions,
|
|
10
9
|
} from "./createRoomBundle";
|
|
10
|
+
import { createRoomBundle as _createRoomBundle } from "./createRoomBundle";
|
|
11
11
|
|
|
12
12
|
export interface PluvProviderProps {
|
|
13
13
|
children?: ReactNode;
|
package/src/createRoomBundle.tsx
CHANGED
|
@@ -282,7 +282,7 @@ export const createRoomBundle = <
|
|
|
282
282
|
getSnapshot,
|
|
283
283
|
getSnapshot,
|
|
284
284
|
_selector,
|
|
285
|
-
options?.isEqual
|
|
285
|
+
options?.isEqual ?? fastDeepEqual
|
|
286
286
|
);
|
|
287
287
|
};
|
|
288
288
|
|
|
@@ -328,7 +328,7 @@ export const createRoomBundle = <
|
|
|
328
328
|
getSnapshot,
|
|
329
329
|
getSnapshot,
|
|
330
330
|
_selector,
|
|
331
|
-
options?.isEqual
|
|
331
|
+
options?.isEqual ?? fastDeepEqual
|
|
332
332
|
);
|
|
333
333
|
|
|
334
334
|
const updateMyPresence: Dispatch<UpdateMyPresenceAction<TPresence>> =
|
|
@@ -378,7 +378,7 @@ export const createRoomBundle = <
|
|
|
378
378
|
getSnapshot,
|
|
379
379
|
getSnapshot,
|
|
380
380
|
_selector,
|
|
381
|
-
options?.isEqual
|
|
381
|
+
options?.isEqual ?? fastDeepEqual
|
|
382
382
|
);
|
|
383
383
|
};
|
|
384
384
|
|
|
@@ -413,7 +413,7 @@ export const createRoomBundle = <
|
|
|
413
413
|
getSnapshot,
|
|
414
414
|
getSnapshot,
|
|
415
415
|
_selector,
|
|
416
|
-
options?.isEqual
|
|
416
|
+
options?.isEqual ?? fastDeepEqual
|
|
417
417
|
);
|
|
418
418
|
};
|
|
419
419
|
|