@pluv/react 5.0.1 → 5.0.3
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/dist/index.d.mts +70 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +423 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +9 -9
- package/CHANGELOG.md +0 -2499
- package/eslint.config.mjs +0 -4
- package/src/createBundle.tsx +0 -626
- package/src/index.ts +0 -9
- package/src/internal/hooks/index.ts +0 -5
- package/src/internal/hooks/useAsyncQueue.ts +0 -18
- package/src/internal/hooks/useDeepAsyncMemo.ts +0 -121
- package/src/internal/hooks/useNoSsr.ts +0 -23
- package/src/internal/hooks/useRerender.ts +0 -9
- package/src/internal/hooks/useSyncExternalStoreWithSelector.ts +0 -57
- package/src/internal/index.ts +0 -7
- package/src/internal/utils/identity.ts +0 -1
- package/src/internal/utils/index.ts +0 -3
- package/src/internal/utils/shallowArrayEqual.ts +0 -6
- package/src/internal/utils/shallowEqual.ts +0 -1
- package/src/types.ts +0 -150
- package/tsconfig.json +0 -8
- package/tsdown.config.ts +0 -15
package/CHANGELOG.md
DELETED
|
@@ -1,2499 +0,0 @@
|
|
|
1
|
-
# @pluv/react
|
|
2
|
-
|
|
3
|
-
## 5.0.1
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- @pluv/client@5.0.1
|
|
8
|
-
- @pluv/crdt@5.0.1
|
|
9
|
-
- @pluv/types@5.0.1
|
|
10
|
-
|
|
11
|
-
## 5.0.0
|
|
12
|
-
|
|
13
|
-
### Patch Changes
|
|
14
|
-
|
|
15
|
-
- @pluv/client@5.0.0
|
|
16
|
-
- @pluv/crdt@5.0.0
|
|
17
|
-
- @pluv/types@5.0.0
|
|
18
|
-
|
|
19
|
-
## 4.1.0
|
|
20
|
-
|
|
21
|
-
### Patch Changes
|
|
22
|
-
|
|
23
|
-
- @pluv/client@4.1.0
|
|
24
|
-
- @pluv/crdt@4.1.0
|
|
25
|
-
- @pluv/types@4.1.0
|
|
26
|
-
|
|
27
|
-
## 4.0.2
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- e1913b3: Upgraded internal dependencies
|
|
32
|
-
- Updated dependencies [e1913b3]
|
|
33
|
-
- @pluv/client@4.0.2
|
|
34
|
-
- @pluv/types@4.0.2
|
|
35
|
-
- @pluv/crdt@4.0.2
|
|
36
|
-
|
|
37
|
-
## 4.0.1
|
|
38
|
-
|
|
39
|
-
### Patch Changes
|
|
40
|
-
|
|
41
|
-
- @pluv/client@4.0.1
|
|
42
|
-
- @pluv/crdt@4.0.1
|
|
43
|
-
- @pluv/types@4.0.1
|
|
44
|
-
|
|
45
|
-
## 4.0.0
|
|
46
|
-
|
|
47
|
-
### Major Changes
|
|
48
|
-
|
|
49
|
-
- df5c39c: Update all packages to be ESM only.
|
|
50
|
-
|
|
51
|
-
### Minor Changes
|
|
52
|
-
|
|
53
|
-
- 037074e: Migrated build process from tsup to tsdown.
|
|
54
|
-
|
|
55
|
-
### Patch Changes
|
|
56
|
-
|
|
57
|
-
- 2eb5def: Bumped dependencies.
|
|
58
|
-
- Updated dependencies [2eb5def]
|
|
59
|
-
- Updated dependencies [df5c39c]
|
|
60
|
-
- Updated dependencies [037074e]
|
|
61
|
-
- @pluv/client@4.0.0
|
|
62
|
-
- @pluv/types@4.0.0
|
|
63
|
-
- @pluv/crdt@4.0.0
|
|
64
|
-
|
|
65
|
-
## 3.2.2
|
|
66
|
-
|
|
67
|
-
### Patch Changes
|
|
68
|
-
|
|
69
|
-
- Updated dependencies [8665dbe]
|
|
70
|
-
- @pluv/client@3.2.2
|
|
71
|
-
- @pluv/types@3.2.2
|
|
72
|
-
- @pluv/crdt@3.2.2
|
|
73
|
-
|
|
74
|
-
## 3.2.1
|
|
75
|
-
|
|
76
|
-
### Patch Changes
|
|
77
|
-
|
|
78
|
-
- Updated dependencies [1e0c886]
|
|
79
|
-
- @pluv/client@3.2.1
|
|
80
|
-
- @pluv/crdt@3.2.1
|
|
81
|
-
- @pluv/types@3.2.1
|
|
82
|
-
|
|
83
|
-
## 3.2.0
|
|
84
|
-
|
|
85
|
-
### Patch Changes
|
|
86
|
-
|
|
87
|
-
- @pluv/client@3.2.0
|
|
88
|
-
- @pluv/crdt@3.2.0
|
|
89
|
-
- @pluv/types@3.2.0
|
|
90
|
-
|
|
91
|
-
## 3.1.7
|
|
92
|
-
|
|
93
|
-
### Patch Changes
|
|
94
|
-
|
|
95
|
-
- @pluv/client@3.1.7
|
|
96
|
-
- @pluv/crdt@3.1.7
|
|
97
|
-
- @pluv/types@3.1.7
|
|
98
|
-
|
|
99
|
-
## 3.1.6
|
|
100
|
-
|
|
101
|
-
### Patch Changes
|
|
102
|
-
|
|
103
|
-
- fd8d314: Fix creating excessive storage subscriptions.
|
|
104
|
-
- @pluv/client@3.1.6
|
|
105
|
-
- @pluv/crdt@3.1.6
|
|
106
|
-
- @pluv/types@3.1.6
|
|
107
|
-
|
|
108
|
-
## 3.1.5
|
|
109
|
-
|
|
110
|
-
### Patch Changes
|
|
111
|
-
|
|
112
|
-
- @pluv/client@3.1.5
|
|
113
|
-
- @pluv/crdt@3.1.5
|
|
114
|
-
- @pluv/types@3.1.5
|
|
115
|
-
|
|
116
|
-
## 3.1.4
|
|
117
|
-
|
|
118
|
-
### Patch Changes
|
|
119
|
-
|
|
120
|
-
- Updated dependencies [e443b66]
|
|
121
|
-
- @pluv/client@3.1.4
|
|
122
|
-
- @pluv/crdt@3.1.4
|
|
123
|
-
- @pluv/types@3.1.4
|
|
124
|
-
|
|
125
|
-
## 3.1.3
|
|
126
|
-
|
|
127
|
-
### Patch Changes
|
|
128
|
-
|
|
129
|
-
- @pluv/client@3.1.3
|
|
130
|
-
- @pluv/crdt@3.1.3
|
|
131
|
-
- @pluv/types@3.1.3
|
|
132
|
-
|
|
133
|
-
## 3.1.2
|
|
134
|
-
|
|
135
|
-
### Patch Changes
|
|
136
|
-
|
|
137
|
-
- @pluv/client@3.1.2
|
|
138
|
-
- @pluv/crdt@3.1.2
|
|
139
|
-
- @pluv/types@3.1.2
|
|
140
|
-
|
|
141
|
-
## 3.1.1
|
|
142
|
-
|
|
143
|
-
### Patch Changes
|
|
144
|
-
|
|
145
|
-
- @pluv/client@3.1.1
|
|
146
|
-
- @pluv/crdt@3.1.1
|
|
147
|
-
- @pluv/types@3.1.1
|
|
148
|
-
|
|
149
|
-
## 3.1.0
|
|
150
|
-
|
|
151
|
-
### Patch Changes
|
|
152
|
-
|
|
153
|
-
- Updated dependencies [022857d]
|
|
154
|
-
- @pluv/client@3.1.0
|
|
155
|
-
- @pluv/crdt@3.1.0
|
|
156
|
-
- @pluv/types@3.1.0
|
|
157
|
-
|
|
158
|
-
## 3.0.0
|
|
159
|
-
|
|
160
|
-
### Patch Changes
|
|
161
|
-
|
|
162
|
-
- Updated dependencies [bc1ae91]
|
|
163
|
-
- @pluv/client@3.0.0
|
|
164
|
-
- @pluv/crdt@3.0.0
|
|
165
|
-
- @pluv/types@3.0.0
|
|
166
|
-
|
|
167
|
-
## 2.3.1
|
|
168
|
-
|
|
169
|
-
### Patch Changes
|
|
170
|
-
|
|
171
|
-
- @pluv/client@2.3.1
|
|
172
|
-
- @pluv/crdt@2.3.1
|
|
173
|
-
- @pluv/types@2.3.1
|
|
174
|
-
|
|
175
|
-
## 2.3.0
|
|
176
|
-
|
|
177
|
-
### Patch Changes
|
|
178
|
-
|
|
179
|
-
- @pluv/client@2.3.0
|
|
180
|
-
- @pluv/crdt@2.3.0
|
|
181
|
-
- @pluv/types@2.3.0
|
|
182
|
-
|
|
183
|
-
## 2.2.8
|
|
184
|
-
|
|
185
|
-
### Patch Changes
|
|
186
|
-
|
|
187
|
-
- @pluv/client@2.2.8
|
|
188
|
-
- @pluv/crdt@2.2.8
|
|
189
|
-
- @pluv/types@2.2.8
|
|
190
|
-
|
|
191
|
-
## 2.2.7
|
|
192
|
-
|
|
193
|
-
### Patch Changes
|
|
194
|
-
|
|
195
|
-
- @pluv/client@2.2.7
|
|
196
|
-
- @pluv/crdt@2.2.7
|
|
197
|
-
- @pluv/types@2.2.7
|
|
198
|
-
|
|
199
|
-
## 2.2.6
|
|
200
|
-
|
|
201
|
-
### Patch Changes
|
|
202
|
-
|
|
203
|
-
- @pluv/client@2.2.6
|
|
204
|
-
- @pluv/crdt@2.2.6
|
|
205
|
-
- @pluv/types@2.2.6
|
|
206
|
-
|
|
207
|
-
## 2.2.5
|
|
208
|
-
|
|
209
|
-
### Patch Changes
|
|
210
|
-
|
|
211
|
-
- @pluv/client@2.2.5
|
|
212
|
-
- @pluv/crdt@2.2.5
|
|
213
|
-
- @pluv/types@2.2.5
|
|
214
|
-
|
|
215
|
-
## 2.2.4
|
|
216
|
-
|
|
217
|
-
### Patch Changes
|
|
218
|
-
|
|
219
|
-
- @pluv/client@2.2.4
|
|
220
|
-
- @pluv/crdt@2.2.4
|
|
221
|
-
- @pluv/types@2.2.4
|
|
222
|
-
|
|
223
|
-
## 2.2.3
|
|
224
|
-
|
|
225
|
-
### Patch Changes
|
|
226
|
-
|
|
227
|
-
- @pluv/client@2.2.3
|
|
228
|
-
- @pluv/crdt@2.2.3
|
|
229
|
-
- @pluv/types@2.2.3
|
|
230
|
-
|
|
231
|
-
## 2.2.2
|
|
232
|
-
|
|
233
|
-
### Patch Changes
|
|
234
|
-
|
|
235
|
-
- @pluv/client@2.2.2
|
|
236
|
-
- @pluv/crdt@2.2.2
|
|
237
|
-
- @pluv/types@2.2.2
|
|
238
|
-
|
|
239
|
-
## 2.2.1
|
|
240
|
-
|
|
241
|
-
### Patch Changes
|
|
242
|
-
|
|
243
|
-
- @pluv/client@2.2.1
|
|
244
|
-
- @pluv/crdt@2.2.1
|
|
245
|
-
- @pluv/types@2.2.1
|
|
246
|
-
|
|
247
|
-
## 2.2.0
|
|
248
|
-
|
|
249
|
-
### Minor Changes
|
|
250
|
-
|
|
251
|
-
- 3ce1547: Updated typings for `useDoc` to be narrower to get the native doc type.
|
|
252
|
-
|
|
253
|
-
```ts
|
|
254
|
-
import { createClient } from "@pluv/client";
|
|
255
|
-
import { yjs } from "@pluv/crdt-yjs";
|
|
256
|
-
import { createBundle } from "@pluv/react";
|
|
257
|
-
import type { Doc as YDoc } from "yjs";
|
|
258
|
-
|
|
259
|
-
const client = createClient({
|
|
260
|
-
// ...
|
|
261
|
-
crdt: yjs,
|
|
262
|
-
});
|
|
263
|
-
const { useDoc } = createBundle(client);
|
|
264
|
-
|
|
265
|
-
const doc = useDoc();
|
|
266
|
-
|
|
267
|
-
// This is now typed as the native YDoc
|
|
268
|
-
doc.value;
|
|
269
|
-
// ^? const value: YDoc
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
- b999c1c: Added a new type `InferBundleRoom` to get the type of the `PluvRoom` from the react bundle that is created.
|
|
273
|
-
|
|
274
|
-
```ts
|
|
275
|
-
import { createClient } from "@pluv/client";
|
|
276
|
-
import type { InferBundleRoom } from "@pluv/react";
|
|
277
|
-
import { createBundle } from "@pluv/react";
|
|
278
|
-
|
|
279
|
-
const client = createclient({/* ... */});
|
|
280
|
-
|
|
281
|
-
const bundle = createBundle(client);
|
|
282
|
-
|
|
283
|
-
type RoomType = InferBundleRoom<typeof bundle>;
|
|
284
|
-
|
|
285
|
-
const { useStorage } = bundle;
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
### Patch Changes
|
|
289
|
-
|
|
290
|
-
- cb660cd: Fixed the room not changing if the room name was changed on the `PluvRoomProvider` without first unmounting the component.
|
|
291
|
-
- 4916c27: Fixed `useConnection` requiring a selector function (this is now optional).
|
|
292
|
-
- 48191fa: Fixed `useDoc` not returning a stable doc reference for a single connection.
|
|
293
|
-
- Updated dependencies [3ce1547]
|
|
294
|
-
- Updated dependencies [fd3bfe2]
|
|
295
|
-
- Updated dependencies [aee40cb]
|
|
296
|
-
- Updated dependencies [edd1789]
|
|
297
|
-
- Updated dependencies [48191fa]
|
|
298
|
-
- @pluv/client@2.2.0
|
|
299
|
-
- @pluv/crdt@2.2.0
|
|
300
|
-
- @pluv/types@2.2.0
|
|
301
|
-
|
|
302
|
-
## 2.1.0
|
|
303
|
-
|
|
304
|
-
### Minor Changes
|
|
305
|
-
|
|
306
|
-
- 8931f7b: Moved `@pluv/client` from `peerDependencies` to `dependencies` due to an unfortunate [changesets design decision](https://github.com/changesets/changesets/issues/1011).
|
|
307
|
-
|
|
308
|
-
### Patch Changes
|
|
309
|
-
|
|
310
|
-
- e8d8fbc: Updated the internals of various hooks to use the new `PluvRoom.subscribe` object.
|
|
311
|
-
- Updated dependencies [e8d8fbc]
|
|
312
|
-
- Updated dependencies [a86ff5e]
|
|
313
|
-
- Updated dependencies [d5ac29e]
|
|
314
|
-
- Updated dependencies [5ca5cb6]
|
|
315
|
-
- Updated dependencies [4acbe1e]
|
|
316
|
-
- Updated dependencies [e8d8fbc]
|
|
317
|
-
- @pluv/client@2.1.0
|
|
318
|
-
- @pluv/crdt@2.1.0
|
|
319
|
-
- @pluv/types@2.1.0
|
|
320
|
-
|
|
321
|
-
## 2.0.2
|
|
322
|
-
|
|
323
|
-
### Patch Changes
|
|
324
|
-
|
|
325
|
-
- @pluv/client@2.0.2
|
|
326
|
-
- @pluv/crdt@2.0.2
|
|
327
|
-
- @pluv/types@2.0.2
|
|
328
|
-
|
|
329
|
-
## 2.0.1
|
|
330
|
-
|
|
331
|
-
### Patch Changes
|
|
332
|
-
|
|
333
|
-
- Updated dependencies [1b93b18]
|
|
334
|
-
- @pluv/client@2.0.1
|
|
335
|
-
- @pluv/crdt@2.0.1
|
|
336
|
-
- @pluv/types@2.0.1
|
|
337
|
-
|
|
338
|
-
## 2.0.0
|
|
339
|
-
|
|
340
|
-
### Minor Changes
|
|
341
|
-
|
|
342
|
-
- 5cec54a: **Deprecated** Declaring top-level types on your CRDT storage via the `yjs` or `loro` utility (e.g. `yjs.array` or `loro.list`) for the `initialStorage` prop on `PluvRoomProvider` is now deprecated, to be removed in the next major release (v2). Continuing to use the `yjs` or `loro` utilities to declare top-level types will log a warning to your console while in development mode (i.e. when `process.env.NODE_ENV === "development"`). To declare top-level types, you should now use the builder type exposed in the `initialStorage` function. See the example below:
|
|
343
|
-
|
|
344
|
-
```tsx
|
|
345
|
-
import { yjs } from "@pluv/crdt-yjs";
|
|
346
|
-
|
|
347
|
-
// Before
|
|
348
|
-
<PluvRoomProvider
|
|
349
|
-
room="example-room"
|
|
350
|
-
initialStorage={() => ({
|
|
351
|
-
// Using the `yjs` or `loro` utility (in this case `yjs.map`) when
|
|
352
|
-
// declaring top-level types is now deprecated
|
|
353
|
-
topType: yjs.map([
|
|
354
|
-
["key1", yjs.text("")],
|
|
355
|
-
["key2", yjs.text("")],
|
|
356
|
-
]),
|
|
357
|
-
})}
|
|
358
|
-
>
|
|
359
|
-
<div />
|
|
360
|
-
</PluvRoomProvider>
|
|
361
|
-
|
|
362
|
-
// After
|
|
363
|
-
<PluvRoomProvider
|
|
364
|
-
room="example-room"
|
|
365
|
-
initialStorage={(t) => ({
|
|
366
|
-
// Top-level properties must now use the builder (in this case `t`).
|
|
367
|
-
// This effectively calls `yjs.getMap("topType")` to instantiate the type on
|
|
368
|
-
// the root document.
|
|
369
|
-
// This simply returns the native Yjs shared-types (e.g. Y.Map), which
|
|
370
|
-
// allows you operate on your yjs shared-typess in a more native way.
|
|
371
|
-
topType: t.map("topType", [
|
|
372
|
-
// Declaring nested types should continue to use the `yjs` utilities
|
|
373
|
-
// you've used before
|
|
374
|
-
["key1", yjs.text("")],
|
|
375
|
-
["key2", yjs.text("")],
|
|
376
|
-
]),
|
|
377
|
-
})}
|
|
378
|
-
>
|
|
379
|
-
<div />
|
|
380
|
-
</PluvRoomProvider>
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
The functions on the builder type calls the native yjs shared-type (or loro container type) instantiating methods and returns the native types (e.g. `t.map("topType")` is simply just a `Y.Doc.getMap("topType")`) call under the hood. This allows you to declare your type in a more yjs-native and predictable way, and enables declaring more complex initial storage states if needed.
|
|
384
|
-
|
|
385
|
-
### Patch Changes
|
|
386
|
-
|
|
387
|
-
- Updated dependencies [047a1d8]
|
|
388
|
-
- Updated dependencies [0806212]
|
|
389
|
-
- Updated dependencies [3a34dbb]
|
|
390
|
-
- @pluv/client@2.0.0
|
|
391
|
-
- @pluv/types@2.0.0
|
|
392
|
-
- @pluv/crdt@2.0.0
|
|
393
|
-
|
|
394
|
-
## 1.0.2
|
|
395
|
-
|
|
396
|
-
### Patch Changes
|
|
397
|
-
|
|
398
|
-
- Updated dependencies [d87159c]
|
|
399
|
-
- @pluv/client@1.0.2
|
|
400
|
-
- @pluv/crdt@1.0.2
|
|
401
|
-
- @pluv/types@1.0.2
|
|
402
|
-
|
|
403
|
-
## 1.0.1
|
|
404
|
-
|
|
405
|
-
### Patch Changes
|
|
406
|
-
|
|
407
|
-
- Updated dependencies [c583be9]
|
|
408
|
-
- @pluv/client@1.0.1
|
|
409
|
-
- @pluv/crdt@1.0.1
|
|
410
|
-
- @pluv/types@1.0.1
|
|
411
|
-
|
|
412
|
-
## 1.0.0
|
|
413
|
-
|
|
414
|
-
### Major Changes
|
|
415
|
-
|
|
416
|
-
- 4c8b203: **BREAKING** `@pluv/client` is now a peer dependency of `@pluv/react`.
|
|
417
|
-
- af94706: pluv.io is now stable and production ready!
|
|
418
|
-
|
|
419
|
-
With this v1 release, pluv.io will now follow [semantic versioning](https://semver.org/) with more comprehensive release notes for future changes to the library.
|
|
420
|
-
|
|
421
|
-
Checkout the [full documentation here](https://pluv.io/docs/introduction) to get started today!
|
|
422
|
-
|
|
423
|
-
### Patch Changes
|
|
424
|
-
|
|
425
|
-
- Updated dependencies [af94706]
|
|
426
|
-
- @pluv/client@1.0.0
|
|
427
|
-
- @pluv/crdt@1.0.0
|
|
428
|
-
- @pluv/types@1.0.0
|
|
429
|
-
|
|
430
|
-
## 0.44.2
|
|
431
|
-
|
|
432
|
-
### Patch Changes
|
|
433
|
-
|
|
434
|
-
- Updated dependencies [6cfd36f]
|
|
435
|
-
- @pluv/client@0.44.2
|
|
436
|
-
- @pluv/crdt@0.44.2
|
|
437
|
-
- @pluv/types@0.44.2
|
|
438
|
-
|
|
439
|
-
## 0.44.1
|
|
440
|
-
|
|
441
|
-
### Patch Changes
|
|
442
|
-
|
|
443
|
-
- Updated dependencies [67c081d]
|
|
444
|
-
- @pluv/client@0.44.1
|
|
445
|
-
- @pluv/crdt@0.44.1
|
|
446
|
-
- @pluv/types@0.44.1
|
|
447
|
-
|
|
448
|
-
## 0.44.0
|
|
449
|
-
|
|
450
|
-
### Patch Changes
|
|
451
|
-
|
|
452
|
-
- Updated dependencies [fba9354]
|
|
453
|
-
- Updated dependencies [bc2d684]
|
|
454
|
-
- Updated dependencies [c9fcea5]
|
|
455
|
-
- @pluv/client@0.44.0
|
|
456
|
-
- @pluv/crdt@0.44.0
|
|
457
|
-
- @pluv/types@0.44.0
|
|
458
|
-
|
|
459
|
-
## 0.43.0
|
|
460
|
-
|
|
461
|
-
### Patch Changes
|
|
462
|
-
|
|
463
|
-
- Updated dependencies [65d9172]
|
|
464
|
-
- @pluv/client@0.43.0
|
|
465
|
-
- @pluv/crdt@0.43.0
|
|
466
|
-
- @pluv/types@0.43.0
|
|
467
|
-
|
|
468
|
-
## 0.42.0
|
|
469
|
-
|
|
470
|
-
### Patch Changes
|
|
471
|
-
|
|
472
|
-
- Updated dependencies [7ae56bf]
|
|
473
|
-
- @pluv/client@0.42.0
|
|
474
|
-
- @pluv/crdt@0.42.0
|
|
475
|
-
- @pluv/types@0.42.0
|
|
476
|
-
|
|
477
|
-
## 0.41.7
|
|
478
|
-
|
|
479
|
-
### Patch Changes
|
|
480
|
-
|
|
481
|
-
- @pluv/client@0.41.7
|
|
482
|
-
- @pluv/crdt@0.41.7
|
|
483
|
-
- @pluv/types@0.41.7
|
|
484
|
-
|
|
485
|
-
## 0.41.6
|
|
486
|
-
|
|
487
|
-
### Patch Changes
|
|
488
|
-
|
|
489
|
-
- Updated dependencies [71642fa]
|
|
490
|
-
- @pluv/client@0.41.6
|
|
491
|
-
- @pluv/crdt@0.41.6
|
|
492
|
-
- @pluv/types@0.41.6
|
|
493
|
-
|
|
494
|
-
## 0.41.5
|
|
495
|
-
|
|
496
|
-
### Patch Changes
|
|
497
|
-
|
|
498
|
-
- Updated dependencies [b3b7b30]
|
|
499
|
-
- @pluv/client@0.41.5
|
|
500
|
-
- @pluv/crdt@0.41.5
|
|
501
|
-
- @pluv/types@0.41.5
|
|
502
|
-
|
|
503
|
-
## 0.41.4
|
|
504
|
-
|
|
505
|
-
### Patch Changes
|
|
506
|
-
|
|
507
|
-
- @pluv/client@0.41.4
|
|
508
|
-
- @pluv/crdt@0.41.4
|
|
509
|
-
- @pluv/types@0.41.4
|
|
510
|
-
|
|
511
|
-
## 0.41.3
|
|
512
|
-
|
|
513
|
-
### Patch Changes
|
|
514
|
-
|
|
515
|
-
- Updated dependencies [49051c0]
|
|
516
|
-
- @pluv/client@0.41.3
|
|
517
|
-
- @pluv/crdt@0.41.3
|
|
518
|
-
- @pluv/types@0.41.3
|
|
519
|
-
|
|
520
|
-
## 0.41.2
|
|
521
|
-
|
|
522
|
-
### Patch Changes
|
|
523
|
-
|
|
524
|
-
- Updated dependencies [37956d3]
|
|
525
|
-
- @pluv/client@0.41.2
|
|
526
|
-
- @pluv/crdt@0.41.2
|
|
527
|
-
- @pluv/types@0.41.2
|
|
528
|
-
|
|
529
|
-
## 0.41.1
|
|
530
|
-
|
|
531
|
-
### Patch Changes
|
|
532
|
-
|
|
533
|
-
- @pluv/client@0.41.1
|
|
534
|
-
- @pluv/crdt@0.41.1
|
|
535
|
-
- @pluv/types@0.41.1
|
|
536
|
-
|
|
537
|
-
## 0.41.0
|
|
538
|
-
|
|
539
|
-
### Patch Changes
|
|
540
|
-
|
|
541
|
-
- Updated dependencies [41aa439]
|
|
542
|
-
- Updated dependencies [eb2d903]
|
|
543
|
-
- Updated dependencies [555b88d]
|
|
544
|
-
- Updated dependencies [555b88d]
|
|
545
|
-
- @pluv/client@0.41.0
|
|
546
|
-
- @pluv/crdt@0.41.0
|
|
547
|
-
- @pluv/types@0.41.0
|
|
548
|
-
|
|
549
|
-
## 0.40.2
|
|
550
|
-
|
|
551
|
-
### Patch Changes
|
|
552
|
-
|
|
553
|
-
- Updated dependencies [6fbc2fe]
|
|
554
|
-
- @pluv/client@0.40.2
|
|
555
|
-
- @pluv/crdt@0.40.2
|
|
556
|
-
- @pluv/types@0.40.2
|
|
557
|
-
|
|
558
|
-
## 0.40.1
|
|
559
|
-
|
|
560
|
-
### Patch Changes
|
|
561
|
-
|
|
562
|
-
- @pluv/client@0.40.1
|
|
563
|
-
- @pluv/crdt@0.40.1
|
|
564
|
-
- @pluv/types@0.40.1
|
|
565
|
-
|
|
566
|
-
## 0.40.0
|
|
567
|
-
|
|
568
|
-
### Patch Changes
|
|
569
|
-
|
|
570
|
-
- @pluv/client@0.40.0
|
|
571
|
-
- @pluv/crdt@0.40.0
|
|
572
|
-
- @pluv/types@0.40.0
|
|
573
|
-
|
|
574
|
-
## 0.39.1
|
|
575
|
-
|
|
576
|
-
### Patch Changes
|
|
577
|
-
|
|
578
|
-
- 36606b4: Fix `PluvRoomProvider` never connecting when `metadata` is a function.
|
|
579
|
-
- @pluv/client@0.39.1
|
|
580
|
-
- @pluv/crdt@0.39.1
|
|
581
|
-
- @pluv/types@0.39.1
|
|
582
|
-
|
|
583
|
-
## 0.39.0
|
|
584
|
-
|
|
585
|
-
### Minor Changes
|
|
586
|
-
|
|
587
|
-
- ca160f5: **BREAKING** Update the context value of `MockedRoomContext` to mirror the same shape as `PluvRoomContext`. i.e. the value of `MockedRoomContext` is now the room itself, rather than an object containing the room. This should not be breaking in most cases. If you happen to be using `useContext(MockedRoomContext)`, those will need to be updated as shown below:
|
|
588
|
-
|
|
589
|
-
```tsx
|
|
590
|
-
// Before
|
|
591
|
-
const { room } = useContext(MockedRoomContext);
|
|
592
|
-
|
|
593
|
-
// After
|
|
594
|
-
const room = useContext(MockedRoomContext);
|
|
595
|
-
```
|
|
596
|
-
|
|
597
|
-
### Patch Changes
|
|
598
|
-
|
|
599
|
-
- e6ddddc: Fixed potential race conditions between connecting and disconnecting between re-renders of `PluvRoomProvider`.
|
|
600
|
-
- e6ddddc: (Internal) Update how `PluvRoomProvider` handles the `metadata` prop internally to be updated to how `PluvClient` now handles this (i.e. moved to `PluvClient.enter`, from `PluvClient.createRoom`).
|
|
601
|
-
- e6ddddc: Add support for a passing either a function or object for the `metadata` prop on `PluvRoomProvider`. When a function is used, the `metadata` will be gotten at the moment of connection (internally this is a `useEffect`, so browser APIs can be used such as `document`, `window` and `localStorage`).
|
|
602
|
-
|
|
603
|
-
```tsx
|
|
604
|
-
// Both of these work
|
|
605
|
-
<PluvRoomProvider metadata={{ hello: "world" }}>
|
|
606
|
-
{children}
|
|
607
|
-
</PluvRoomProvider>
|
|
608
|
-
|
|
609
|
-
<PluvRoomProvider
|
|
610
|
-
metadata={() => {
|
|
611
|
-
const value = localStorage.get(MY_LOCALSTORAGE_KEY);
|
|
612
|
-
|
|
613
|
-
return { hello: value };
|
|
614
|
-
}}
|
|
615
|
-
>
|
|
616
|
-
{children}
|
|
617
|
-
</PluvRoomProvider>
|
|
618
|
-
```
|
|
619
|
-
|
|
620
|
-
- Updated dependencies [e6ddddc]
|
|
621
|
-
- Updated dependencies [e6ddddc]
|
|
622
|
-
- Updated dependencies [2cfb68d]
|
|
623
|
-
- Updated dependencies [e6ddddc]
|
|
624
|
-
- @pluv/client@0.39.0
|
|
625
|
-
- @pluv/crdt@0.39.0
|
|
626
|
-
- @pluv/types@0.39.0
|
|
627
|
-
|
|
628
|
-
## 0.38.14
|
|
629
|
-
|
|
630
|
-
### Patch Changes
|
|
631
|
-
|
|
632
|
-
- Updated dependencies [886a1f9]
|
|
633
|
-
- @pluv/client@0.38.14
|
|
634
|
-
- @pluv/crdt@0.38.14
|
|
635
|
-
- @pluv/types@0.38.14
|
|
636
|
-
|
|
637
|
-
## 0.38.13
|
|
638
|
-
|
|
639
|
-
### Patch Changes
|
|
640
|
-
|
|
641
|
-
- @pluv/client@0.38.13
|
|
642
|
-
- @pluv/crdt@0.38.13
|
|
643
|
-
- @pluv/types@0.38.13
|
|
644
|
-
|
|
645
|
-
## 0.38.12
|
|
646
|
-
|
|
647
|
-
### Patch Changes
|
|
648
|
-
|
|
649
|
-
- Updated dependencies [b617726]
|
|
650
|
-
- @pluv/client@0.38.12
|
|
651
|
-
- @pluv/crdt@0.38.12
|
|
652
|
-
- @pluv/types@0.38.12
|
|
653
|
-
|
|
654
|
-
## 0.38.11
|
|
655
|
-
|
|
656
|
-
### Patch Changes
|
|
657
|
-
|
|
658
|
-
- Updated dependencies [5ac1aba]
|
|
659
|
-
- @pluv/client@0.38.11
|
|
660
|
-
- @pluv/crdt@0.38.11
|
|
661
|
-
- @pluv/types@0.38.11
|
|
662
|
-
|
|
663
|
-
## 0.38.10
|
|
664
|
-
|
|
665
|
-
### Patch Changes
|
|
666
|
-
|
|
667
|
-
- Updated dependencies [cadd963]
|
|
668
|
-
- @pluv/client@0.38.10
|
|
669
|
-
- @pluv/crdt@0.38.10
|
|
670
|
-
- @pluv/types@0.38.10
|
|
671
|
-
|
|
672
|
-
## 0.38.9
|
|
673
|
-
|
|
674
|
-
### Patch Changes
|
|
675
|
-
|
|
676
|
-
- @pluv/client@0.38.9
|
|
677
|
-
- @pluv/crdt@0.38.9
|
|
678
|
-
- @pluv/types@0.38.9
|
|
679
|
-
|
|
680
|
-
## 0.38.8
|
|
681
|
-
|
|
682
|
-
### Patch Changes
|
|
683
|
-
|
|
684
|
-
- @pluv/client@0.38.8
|
|
685
|
-
- @pluv/crdt@0.38.8
|
|
686
|
-
- @pluv/types@0.38.8
|
|
687
|
-
|
|
688
|
-
## 0.38.7
|
|
689
|
-
|
|
690
|
-
### Patch Changes
|
|
691
|
-
|
|
692
|
-
- @pluv/client@0.38.7
|
|
693
|
-
- @pluv/crdt@0.38.7
|
|
694
|
-
- @pluv/types@0.38.7
|
|
695
|
-
|
|
696
|
-
## 0.38.6
|
|
697
|
-
|
|
698
|
-
### Patch Changes
|
|
699
|
-
|
|
700
|
-
- @pluv/client@0.38.6
|
|
701
|
-
- @pluv/crdt@0.38.6
|
|
702
|
-
- @pluv/types@0.38.6
|
|
703
|
-
|
|
704
|
-
## 0.38.5
|
|
705
|
-
|
|
706
|
-
### Patch Changes
|
|
707
|
-
|
|
708
|
-
- @pluv/client@0.38.5
|
|
709
|
-
- @pluv/crdt@0.38.5
|
|
710
|
-
- @pluv/types@0.38.5
|
|
711
|
-
|
|
712
|
-
## 0.38.4
|
|
713
|
-
|
|
714
|
-
### Patch Changes
|
|
715
|
-
|
|
716
|
-
- @pluv/client@0.38.4
|
|
717
|
-
- @pluv/crdt@0.38.4
|
|
718
|
-
- @pluv/types@0.38.4
|
|
719
|
-
|
|
720
|
-
## 0.38.3
|
|
721
|
-
|
|
722
|
-
### Patch Changes
|
|
723
|
-
|
|
724
|
-
- Updated dependencies [8346273]
|
|
725
|
-
- @pluv/client@0.38.3
|
|
726
|
-
- @pluv/crdt@0.38.3
|
|
727
|
-
- @pluv/types@0.38.3
|
|
728
|
-
|
|
729
|
-
## 0.38.2
|
|
730
|
-
|
|
731
|
-
### Patch Changes
|
|
732
|
-
|
|
733
|
-
- Updated dependencies [de35f0b]
|
|
734
|
-
- @pluv/client@0.38.2
|
|
735
|
-
- @pluv/crdt@0.38.2
|
|
736
|
-
- @pluv/types@0.38.2
|
|
737
|
-
|
|
738
|
-
## 0.38.1
|
|
739
|
-
|
|
740
|
-
### Patch Changes
|
|
741
|
-
|
|
742
|
-
- @pluv/client@0.38.1
|
|
743
|
-
- @pluv/crdt@0.38.1
|
|
744
|
-
- @pluv/types@0.38.1
|
|
745
|
-
|
|
746
|
-
## 0.38.0
|
|
747
|
-
|
|
748
|
-
### Patch Changes
|
|
749
|
-
|
|
750
|
-
- Updated dependencies [f4ceca3]
|
|
751
|
-
- @pluv/client@0.38.0
|
|
752
|
-
- @pluv/types@0.38.0
|
|
753
|
-
- @pluv/crdt@0.38.0
|
|
754
|
-
|
|
755
|
-
## 0.37.7
|
|
756
|
-
|
|
757
|
-
### Patch Changes
|
|
758
|
-
|
|
759
|
-
- @pluv/client@0.37.7
|
|
760
|
-
- @pluv/crdt@0.37.7
|
|
761
|
-
- @pluv/types@0.37.7
|
|
762
|
-
|
|
763
|
-
## 0.37.6
|
|
764
|
-
|
|
765
|
-
### Patch Changes
|
|
766
|
-
|
|
767
|
-
- @pluv/client@0.37.6
|
|
768
|
-
- @pluv/crdt@0.37.6
|
|
769
|
-
- @pluv/types@0.37.6
|
|
770
|
-
|
|
771
|
-
## 0.37.5
|
|
772
|
-
|
|
773
|
-
### Patch Changes
|
|
774
|
-
|
|
775
|
-
- @pluv/client@0.37.5
|
|
776
|
-
- @pluv/crdt@0.37.5
|
|
777
|
-
- @pluv/types@0.37.5
|
|
778
|
-
|
|
779
|
-
## 0.37.4
|
|
780
|
-
|
|
781
|
-
### Patch Changes
|
|
782
|
-
|
|
783
|
-
- Updated dependencies [a9c3d17]
|
|
784
|
-
- @pluv/client@0.37.4
|
|
785
|
-
- @pluv/crdt@0.37.4
|
|
786
|
-
- @pluv/types@0.37.4
|
|
787
|
-
|
|
788
|
-
## 0.37.3
|
|
789
|
-
|
|
790
|
-
### Patch Changes
|
|
791
|
-
|
|
792
|
-
- dff89ff: Added an error message for when `createBundle` functions are used outside of `PluvRoomProvider`.
|
|
793
|
-
- Updated dependencies [9ae837b]
|
|
794
|
-
- @pluv/client@0.37.3
|
|
795
|
-
- @pluv/crdt@0.37.3
|
|
796
|
-
- @pluv/types@0.37.3
|
|
797
|
-
|
|
798
|
-
## 0.37.2
|
|
799
|
-
|
|
800
|
-
### Patch Changes
|
|
801
|
-
|
|
802
|
-
- Updated dependencies [11920af]
|
|
803
|
-
- @pluv/client@0.37.2
|
|
804
|
-
- @pluv/crdt@0.37.2
|
|
805
|
-
- @pluv/types@0.37.2
|
|
806
|
-
|
|
807
|
-
## 0.37.1
|
|
808
|
-
|
|
809
|
-
### Patch Changes
|
|
810
|
-
|
|
811
|
-
- Updated dependencies [e923a8d]
|
|
812
|
-
- @pluv/client@0.37.1
|
|
813
|
-
- @pluv/crdt@0.37.1
|
|
814
|
-
- @pluv/types@0.37.1
|
|
815
|
-
|
|
816
|
-
## 0.37.0
|
|
817
|
-
|
|
818
|
-
### Patch Changes
|
|
819
|
-
|
|
820
|
-
- @pluv/client@0.37.0
|
|
821
|
-
- @pluv/crdt@0.37.0
|
|
822
|
-
- @pluv/types@0.37.0
|
|
823
|
-
|
|
824
|
-
## 0.36.0
|
|
825
|
-
|
|
826
|
-
### Minor Changes
|
|
827
|
-
|
|
828
|
-
- 2a84951: **BREAKING**
|
|
829
|
-
|
|
830
|
-
Removed re-exports of `@pluv/client` and `@pluv/crdt` parts from `@pluv/react`.
|
|
831
|
-
|
|
832
|
-
```ts
|
|
833
|
-
// Before
|
|
834
|
-
|
|
835
|
-
import { createBundle, createClient } from "@pluv/react";
|
|
836
|
-
|
|
837
|
-
// After
|
|
838
|
-
|
|
839
|
-
import { createClient } from "@pluv/client";
|
|
840
|
-
import { createBundle } from "@pluv/react";
|
|
841
|
-
```
|
|
842
|
-
|
|
843
|
-
### Patch Changes
|
|
844
|
-
|
|
845
|
-
- Updated dependencies [4518b6d]
|
|
846
|
-
- @pluv/client@0.36.0
|
|
847
|
-
- @pluv/crdt@0.36.0
|
|
848
|
-
- @pluv/types@0.36.0
|
|
849
|
-
|
|
850
|
-
## 0.35.4
|
|
851
|
-
|
|
852
|
-
### Patch Changes
|
|
853
|
-
|
|
854
|
-
- @pluv/client@0.35.4
|
|
855
|
-
- @pluv/crdt@0.35.4
|
|
856
|
-
- @pluv/types@0.35.4
|
|
857
|
-
|
|
858
|
-
## 0.35.3
|
|
859
|
-
|
|
860
|
-
### Patch Changes
|
|
861
|
-
|
|
862
|
-
- @pluv/client@0.35.3
|
|
863
|
-
- @pluv/crdt@0.35.3
|
|
864
|
-
- @pluv/types@0.35.3
|
|
865
|
-
|
|
866
|
-
## 0.35.2
|
|
867
|
-
|
|
868
|
-
### Patch Changes
|
|
869
|
-
|
|
870
|
-
- Updated dependencies [81cb692]
|
|
871
|
-
- @pluv/types@0.35.2
|
|
872
|
-
- @pluv/client@0.35.2
|
|
873
|
-
- @pluv/crdt@0.35.2
|
|
874
|
-
|
|
875
|
-
## 0.35.1
|
|
876
|
-
|
|
877
|
-
### Patch Changes
|
|
878
|
-
|
|
879
|
-
- @pluv/client@0.35.1
|
|
880
|
-
- @pluv/crdt@0.35.1
|
|
881
|
-
- @pluv/types@0.35.1
|
|
882
|
-
|
|
883
|
-
## 0.35.0
|
|
884
|
-
|
|
885
|
-
### Patch Changes
|
|
886
|
-
|
|
887
|
-
- @pluv/client@0.35.0
|
|
888
|
-
- @pluv/crdt@0.35.0
|
|
889
|
-
- @pluv/types@0.35.0
|
|
890
|
-
|
|
891
|
-
## 0.34.1
|
|
892
|
-
|
|
893
|
-
### Patch Changes
|
|
894
|
-
|
|
895
|
-
- @pluv/client@0.34.1
|
|
896
|
-
- @pluv/crdt@0.34.1
|
|
897
|
-
- @pluv/types@0.34.1
|
|
898
|
-
|
|
899
|
-
## 0.34.0
|
|
900
|
-
|
|
901
|
-
### Patch Changes
|
|
902
|
-
|
|
903
|
-
- @pluv/client@0.34.0
|
|
904
|
-
- @pluv/crdt@0.34.0
|
|
905
|
-
- @pluv/types@0.34.0
|
|
906
|
-
|
|
907
|
-
## 0.33.0
|
|
908
|
-
|
|
909
|
-
### Minor Changes
|
|
910
|
-
|
|
911
|
-
- c3b07ab: Allow peer react@19.0.0.
|
|
912
|
-
|
|
913
|
-
### Patch Changes
|
|
914
|
-
|
|
915
|
-
- @pluv/client@0.33.0
|
|
916
|
-
- @pluv/crdt@0.33.0
|
|
917
|
-
- @pluv/types@0.33.0
|
|
918
|
-
|
|
919
|
-
## 0.32.9
|
|
920
|
-
|
|
921
|
-
### Patch Changes
|
|
922
|
-
|
|
923
|
-
- 89d004d: Fix event proxy types for client-side events.
|
|
924
|
-
- @pluv/client@0.32.9
|
|
925
|
-
- @pluv/crdt@0.32.9
|
|
926
|
-
- @pluv/types@0.32.9
|
|
927
|
-
|
|
928
|
-
## 0.32.8
|
|
929
|
-
|
|
930
|
-
### Patch Changes
|
|
931
|
-
|
|
932
|
-
- @pluv/client@0.32.8
|
|
933
|
-
- @pluv/crdt@0.32.8
|
|
934
|
-
- @pluv/types@0.32.8
|
|
935
|
-
|
|
936
|
-
## 0.32.7
|
|
937
|
-
|
|
938
|
-
### Patch Changes
|
|
939
|
-
|
|
940
|
-
- @pluv/client@0.32.7
|
|
941
|
-
- @pluv/crdt@0.32.7
|
|
942
|
-
- @pluv/types@0.32.7
|
|
943
|
-
|
|
944
|
-
## 0.32.6
|
|
945
|
-
|
|
946
|
-
### Patch Changes
|
|
947
|
-
|
|
948
|
-
- @pluv/client@0.32.6
|
|
949
|
-
- @pluv/crdt@0.32.6
|
|
950
|
-
- @pluv/types@0.32.6
|
|
951
|
-
|
|
952
|
-
## 0.32.5
|
|
953
|
-
|
|
954
|
-
### Patch Changes
|
|
955
|
-
|
|
956
|
-
- @pluv/client@0.32.5
|
|
957
|
-
- @pluv/crdt@0.32.5
|
|
958
|
-
- @pluv/types@0.32.5
|
|
959
|
-
|
|
960
|
-
## 0.32.4
|
|
961
|
-
|
|
962
|
-
### Patch Changes
|
|
963
|
-
|
|
964
|
-
- @pluv/client@0.32.4
|
|
965
|
-
- @pluv/crdt@0.32.4
|
|
966
|
-
- @pluv/types@0.32.4
|
|
967
|
-
|
|
968
|
-
## 0.32.3
|
|
969
|
-
|
|
970
|
-
### Patch Changes
|
|
971
|
-
|
|
972
|
-
- 75e992f: Export `register` helper in `@pluv/react`.
|
|
973
|
-
- Updated dependencies [b18230f]
|
|
974
|
-
- @pluv/client@0.32.3
|
|
975
|
-
- @pluv/crdt@0.32.3
|
|
976
|
-
- @pluv/types@0.32.3
|
|
977
|
-
|
|
978
|
-
## 0.32.2
|
|
979
|
-
|
|
980
|
-
### Patch Changes
|
|
981
|
-
|
|
982
|
-
- @pluv/client@0.32.2
|
|
983
|
-
- @pluv/crdt@0.32.2
|
|
984
|
-
- @pluv/types@0.32.2
|
|
985
|
-
|
|
986
|
-
## 0.32.1
|
|
987
|
-
|
|
988
|
-
### Patch Changes
|
|
989
|
-
|
|
990
|
-
- @pluv/client@0.32.1
|
|
991
|
-
- @pluv/crdt@0.32.1
|
|
992
|
-
- @pluv/types@0.32.1
|
|
993
|
-
|
|
994
|
-
## 0.32.0
|
|
995
|
-
|
|
996
|
-
### Patch Changes
|
|
997
|
-
|
|
998
|
-
- @pluv/client@0.32.0
|
|
999
|
-
- @pluv/crdt@0.32.0
|
|
1000
|
-
- @pluv/types@0.32.0
|
|
1001
|
-
|
|
1002
|
-
## 0.31.0
|
|
1003
|
-
|
|
1004
|
-
### Patch Changes
|
|
1005
|
-
|
|
1006
|
-
- @pluv/client@0.31.0
|
|
1007
|
-
- @pluv/crdt@0.31.0
|
|
1008
|
-
- @pluv/types@0.31.0
|
|
1009
|
-
|
|
1010
|
-
## 0.30.2
|
|
1011
|
-
|
|
1012
|
-
### Patch Changes
|
|
1013
|
-
|
|
1014
|
-
- @pluv/client@0.30.2
|
|
1015
|
-
- @pluv/crdt@0.30.2
|
|
1016
|
-
- @pluv/types@0.30.2
|
|
1017
|
-
|
|
1018
|
-
## 0.30.1
|
|
1019
|
-
|
|
1020
|
-
### Patch Changes
|
|
1021
|
-
|
|
1022
|
-
- @pluv/client@0.30.1
|
|
1023
|
-
- @pluv/crdt@0.30.1
|
|
1024
|
-
- @pluv/types@0.30.1
|
|
1025
|
-
|
|
1026
|
-
## 0.30.0
|
|
1027
|
-
|
|
1028
|
-
### Patch Changes
|
|
1029
|
-
|
|
1030
|
-
- Updated dependencies [cff933a]
|
|
1031
|
-
- @pluv/client@0.30.0
|
|
1032
|
-
- @pluv/crdt@0.30.0
|
|
1033
|
-
- @pluv/types@0.30.0
|
|
1034
|
-
|
|
1035
|
-
## 0.29.0
|
|
1036
|
-
|
|
1037
|
-
### Minor Changes
|
|
1038
|
-
|
|
1039
|
-
- 525aeae: **BREAKING**
|
|
1040
|
-
|
|
1041
|
-
Merge `createBundle` with `createRoomBundle`.
|
|
1042
|
-
|
|
1043
|
-
```ts
|
|
1044
|
-
// Before
|
|
1045
|
-
const {
|
|
1046
|
-
createRoomBundle,
|
|
1047
|
-
|
|
1048
|
-
// components
|
|
1049
|
-
PluvProvider,
|
|
1050
|
-
|
|
1051
|
-
// hooks
|
|
1052
|
-
useClient,
|
|
1053
|
-
} = createBundle(client);
|
|
1054
|
-
|
|
1055
|
-
export const {
|
|
1056
|
-
// components
|
|
1057
|
-
MockedRoomProvider,
|
|
1058
|
-
PluvRoomProvider,
|
|
1059
|
-
|
|
1060
|
-
// utils
|
|
1061
|
-
event,
|
|
1062
|
-
|
|
1063
|
-
// hooks
|
|
1064
|
-
useBroadcast,
|
|
1065
|
-
useCanRedo,
|
|
1066
|
-
useCanUndo,
|
|
1067
|
-
useConnection,
|
|
1068
|
-
useDoc,
|
|
1069
|
-
useEvent,
|
|
1070
|
-
useMyPresence,
|
|
1071
|
-
useMyself,
|
|
1072
|
-
useOther,
|
|
1073
|
-
useOthers,
|
|
1074
|
-
useRedo,
|
|
1075
|
-
useRoom,
|
|
1076
|
-
useStorage,
|
|
1077
|
-
useTransact,
|
|
1078
|
-
useUndo,
|
|
1079
|
-
} = createRoomBundle({});
|
|
1080
|
-
|
|
1081
|
-
// After
|
|
1082
|
-
const {
|
|
1083
|
-
// components
|
|
1084
|
-
MockedRoomProvider,
|
|
1085
|
-
PluvProvider,
|
|
1086
|
-
PluvRoomProvider,
|
|
1087
|
-
|
|
1088
|
-
// utils
|
|
1089
|
-
event,
|
|
1090
|
-
|
|
1091
|
-
// hooks
|
|
1092
|
-
useBroadcast,
|
|
1093
|
-
useCanRedo,
|
|
1094
|
-
useCanUndo,
|
|
1095
|
-
useClient,
|
|
1096
|
-
useConnection,
|
|
1097
|
-
useDoc,
|
|
1098
|
-
useEvent,
|
|
1099
|
-
useMyPresence,
|
|
1100
|
-
useMyself,
|
|
1101
|
-
useOther,
|
|
1102
|
-
useOthers,
|
|
1103
|
-
useRedo,
|
|
1104
|
-
useRoom,
|
|
1105
|
-
useStorage,
|
|
1106
|
-
useTransact,
|
|
1107
|
-
useUndo,
|
|
1108
|
-
} = createBundle(client);
|
|
1109
|
-
```
|
|
1110
|
-
|
|
1111
|
-
### Patch Changes
|
|
1112
|
-
|
|
1113
|
-
- @pluv/client@0.29.0
|
|
1114
|
-
- @pluv/crdt@0.29.0
|
|
1115
|
-
- @pluv/types@0.29.0
|
|
1116
|
-
|
|
1117
|
-
## 0.28.0
|
|
1118
|
-
|
|
1119
|
-
### Minor Changes
|
|
1120
|
-
|
|
1121
|
-
- 778b43e: Remove the `initialStorage` option from `createRoomBundle`. This has been moved to `createClient`.
|
|
1122
|
-
|
|
1123
|
-
### Patch Changes
|
|
1124
|
-
|
|
1125
|
-
- @pluv/client@0.28.0
|
|
1126
|
-
- @pluv/crdt@0.28.0
|
|
1127
|
-
- @pluv/types@0.28.0
|
|
1128
|
-
|
|
1129
|
-
## 0.27.0
|
|
1130
|
-
|
|
1131
|
-
### Minor Changes
|
|
1132
|
-
|
|
1133
|
-
- 19ed36c: Updated `createClient` and `createRoomBundle` object params to better support automatic type inference.
|
|
1134
|
-
|
|
1135
|
-
```ts
|
|
1136
|
-
// Before
|
|
1137
|
-
import { createClient } from "@pluv/react";
|
|
1138
|
-
import { yjs } from "@pluv/crdt-yjs";
|
|
1139
|
-
import { z } from "zod";
|
|
1140
|
-
import type { ioServer } from "./server/ioServer";
|
|
1141
|
-
|
|
1142
|
-
const client = createClient<typeof ioServer>({
|
|
1143
|
-
authEndpoint: ({ room }) => "MY_AUTH_URL",
|
|
1144
|
-
wsEndpoint: ({ room }) => "MY_WEBSOCKET_URL",
|
|
1145
|
-
});
|
|
1146
|
-
|
|
1147
|
-
client.createRoom("my-example-room", {
|
|
1148
|
-
presence: z.object({
|
|
1149
|
-
selectionId: z.string().nullish(),
|
|
1150
|
-
}),
|
|
1151
|
-
initialPresence: {
|
|
1152
|
-
selectionId: null,
|
|
1153
|
-
},
|
|
1154
|
-
initialStorage: yjs.doc(() => ({
|
|
1155
|
-
messages: yjs.array<string>([]),
|
|
1156
|
-
})),
|
|
1157
|
-
});
|
|
1158
|
-
|
|
1159
|
-
// After
|
|
1160
|
-
|
|
1161
|
-
import { createBundle, createClient } from "@pluv/react";
|
|
1162
|
-
|
|
1163
|
-
const client = createClient({
|
|
1164
|
-
authEndpoint: ({ room }) => "MY_AUTH_URL",
|
|
1165
|
-
wsEndpoint: ({ room }) => "MY_WEBSOCKET_URL",
|
|
1166
|
-
/**
|
|
1167
|
-
* @description The ioServer type now needs to be inferred on this property
|
|
1168
|
-
* instead of within the generic on `createClient`. This is because of
|
|
1169
|
-
* limitations with TypeScript not yet supporting partial type-inference
|
|
1170
|
-
* for generics. Ensure to no-loonger include any generics on `createClient`
|
|
1171
|
-
*/
|
|
1172
|
-
infer: (i) => ({ io: i<typeof ioServer> }),
|
|
1173
|
-
// Now moved to `createClient` from `PluvClient.createRoom`
|
|
1174
|
-
presence: z.object({
|
|
1175
|
-
selectionId: z.string().nullish(),
|
|
1176
|
-
}),
|
|
1177
|
-
/**
|
|
1178
|
-
* @description Now added to `createClient` to specify defaults for all
|
|
1179
|
-
* rooms, and to infer types for storage. This value will be overwritten by
|
|
1180
|
-
* `PluvClient.createRoom`.
|
|
1181
|
-
*/
|
|
1182
|
-
initialStorage: yjs.doc(() => ({
|
|
1183
|
-
messages: yjs.array<string>([]),
|
|
1184
|
-
})),
|
|
1185
|
-
});
|
|
1186
|
-
|
|
1187
|
-
const { createRoomBundle } = createBundle(client);
|
|
1188
|
-
const pluv = createRoomBundle({});
|
|
1189
|
-
```
|
|
1190
|
-
|
|
1191
|
-
### Patch Changes
|
|
1192
|
-
|
|
1193
|
-
- 19ed36c: Added client-side event router. This more-or-less mirrors the server-side event router. You can use both the server-side and client-side router simultaneously, but you should generally prefer only using one or the other.
|
|
1194
|
-
|
|
1195
|
-
```ts
|
|
1196
|
-
// Backend Server
|
|
1197
|
-
import { createIO } from "@pluv/io";
|
|
1198
|
-
|
|
1199
|
-
const io = createIO({ /* ... */ });
|
|
1200
|
-
const ioServer = io.server({
|
|
1201
|
-
router: io.router({
|
|
1202
|
-
multiply2: io.procedure
|
|
1203
|
-
.input(z.object({ value: z.number() }))
|
|
1204
|
-
.broadcast(({ value }) => ({
|
|
1205
|
-
multiplied2: { value: value * 2 },
|
|
1206
|
-
})),
|
|
1207
|
-
}),
|
|
1208
|
-
});
|
|
1209
|
-
|
|
1210
|
-
// Frontend Client
|
|
1211
|
-
import { createBundle createClient } from "@pluv/react";
|
|
1212
|
-
|
|
1213
|
-
const io = createClient({ /* ... */ });
|
|
1214
|
-
|
|
1215
|
-
const { createRoomBundle } = createBundle(io);
|
|
1216
|
-
const pluv = createRoomBundle({
|
|
1217
|
-
// ...
|
|
1218
|
-
router: io.router({
|
|
1219
|
-
add5: io.procedure
|
|
1220
|
-
.input(z.object({ value: z.number() }))
|
|
1221
|
-
.broadcast(({ value }) => ({
|
|
1222
|
-
/**
|
|
1223
|
-
* @description Because `ioServer` does not specify `added5`,
|
|
1224
|
-
* this will be forwarded to connected peers.
|
|
1225
|
-
*/
|
|
1226
|
-
added5: { value: value + 5 },
|
|
1227
|
-
})),
|
|
1228
|
-
/**
|
|
1229
|
-
* @description This is possible, but not recommended to do. Because
|
|
1230
|
-
* `multiply2` is a procedure on `ioServer`, this will trigger the
|
|
1231
|
-
* `multiply2` procedure on `ioServer`. Connected peers will not
|
|
1232
|
-
* receive `multiply2`, but rather `multipled2`.
|
|
1233
|
-
*/
|
|
1234
|
-
subtract5Multiply2: io.procedure
|
|
1235
|
-
.input(z.object({ value: z.number() }))
|
|
1236
|
-
.broadcast(({ value }) => ({
|
|
1237
|
-
multiply2: { value: value - 5 },
|
|
1238
|
-
})),
|
|
1239
|
-
}),
|
|
1240
|
-
});
|
|
1241
|
-
```
|
|
1242
|
-
|
|
1243
|
-
- Updated dependencies [19ed36c]
|
|
1244
|
-
- Updated dependencies [19ed36c]
|
|
1245
|
-
- @pluv/client@0.27.0
|
|
1246
|
-
- @pluv/crdt@0.27.0
|
|
1247
|
-
- @pluv/types@0.27.0
|
|
1248
|
-
|
|
1249
|
-
## 0.26.0
|
|
1250
|
-
|
|
1251
|
-
### Minor Changes
|
|
1252
|
-
|
|
1253
|
-
- 19e5dda: **BREAKING**
|
|
1254
|
-
Update `authEndpoint` and `wsEndpoint` to now use a parameterized object that passes through additional data via a `metadata` property.
|
|
1255
|
-
|
|
1256
|
-
```tsx
|
|
1257
|
-
// Before
|
|
1258
|
-
|
|
1259
|
-
import { env } from "./env";
|
|
1260
|
-
import type { ioServer } from "./server";
|
|
1261
|
-
|
|
1262
|
-
const client = createClient<typeof ioServer>({
|
|
1263
|
-
authEndpoint: (room: string) => `${env.API_URL}}/room/${room}`,
|
|
1264
|
-
wsEndpoint: (room: string) => `${env.WS_URL}/room/${room}`,
|
|
1265
|
-
});
|
|
1266
|
-
|
|
1267
|
-
// After
|
|
1268
|
-
|
|
1269
|
-
const client = createClient<
|
|
1270
|
-
typeof ioServer,
|
|
1271
|
-
// Optional: You can specify types for metadata here. This is useful for Cloudflare Pages
|
|
1272
|
-
{ apiUrl: string; wsUrl: string }
|
|
1273
|
-
>({
|
|
1274
|
-
authEndpoint: ({ metadata, room }) => `${metadata.apiUrl}}/room/${room}`,
|
|
1275
|
-
wsEndpoint: ({ metadata, room }) => `${{ metadata.wsUrl }}/room/${room}`,
|
|
1276
|
-
});
|
|
1277
|
-
|
|
1278
|
-
client.createRoom("my-room", {
|
|
1279
|
-
// This property exists when the `metadata` generic type is defined above
|
|
1280
|
-
metadata: {
|
|
1281
|
-
apiUrl: "https://example.com/api",
|
|
1282
|
-
wsUrl: "wss://example.com/api",
|
|
1283
|
-
},
|
|
1284
|
-
// ...
|
|
1285
|
-
});
|
|
1286
|
-
|
|
1287
|
-
<PluvRoomProvider
|
|
1288
|
-
// This property exists when the `metadata` generic type is defined above
|
|
1289
|
-
metadata={{
|
|
1290
|
-
apiUrl: "https://example.com/api",
|
|
1291
|
-
wsUrl: "wss://example.com/api",
|
|
1292
|
-
}}
|
|
1293
|
-
>
|
|
1294
|
-
{/* ... */}
|
|
1295
|
-
</PluvRoomProvider>
|
|
1296
|
-
```
|
|
1297
|
-
|
|
1298
|
-
### Patch Changes
|
|
1299
|
-
|
|
1300
|
-
- Updated dependencies [19e5dda]
|
|
1301
|
-
- @pluv/client@0.26.0
|
|
1302
|
-
- @pluv/crdt@0.26.0
|
|
1303
|
-
- @pluv/types@0.26.0
|
|
1304
|
-
|
|
1305
|
-
## 0.25.4
|
|
1306
|
-
|
|
1307
|
-
### Patch Changes
|
|
1308
|
-
|
|
1309
|
-
- @pluv/client@0.25.4
|
|
1310
|
-
- @pluv/crdt@0.25.4
|
|
1311
|
-
- @pluv/types@0.25.4
|
|
1312
|
-
|
|
1313
|
-
## 0.25.3
|
|
1314
|
-
|
|
1315
|
-
### Patch Changes
|
|
1316
|
-
|
|
1317
|
-
- @pluv/client@0.25.3
|
|
1318
|
-
- @pluv/crdt@0.25.3
|
|
1319
|
-
- @pluv/types@0.25.3
|
|
1320
|
-
|
|
1321
|
-
## 0.25.2
|
|
1322
|
-
|
|
1323
|
-
### Patch Changes
|
|
1324
|
-
|
|
1325
|
-
- @pluv/client@0.25.2
|
|
1326
|
-
- @pluv/crdt@0.25.2
|
|
1327
|
-
- @pluv/types@0.25.2
|
|
1328
|
-
|
|
1329
|
-
## 0.25.1
|
|
1330
|
-
|
|
1331
|
-
### Patch Changes
|
|
1332
|
-
|
|
1333
|
-
- @pluv/client@0.25.1
|
|
1334
|
-
- @pluv/crdt@0.25.1
|
|
1335
|
-
- @pluv/types@0.25.1
|
|
1336
|
-
|
|
1337
|
-
## 0.25.0
|
|
1338
|
-
|
|
1339
|
-
### Patch Changes
|
|
1340
|
-
|
|
1341
|
-
- @pluv/client@0.25.0
|
|
1342
|
-
- @pluv/crdt@0.25.0
|
|
1343
|
-
- @pluv/types@0.25.0
|
|
1344
|
-
|
|
1345
|
-
## 0.24.1
|
|
1346
|
-
|
|
1347
|
-
### Patch Changes
|
|
1348
|
-
|
|
1349
|
-
- Updated dependencies [ba299e2]
|
|
1350
|
-
- @pluv/client@0.24.1
|
|
1351
|
-
- @pluv/crdt@0.24.1
|
|
1352
|
-
- @pluv/types@0.24.1
|
|
1353
|
-
|
|
1354
|
-
## 0.24.0
|
|
1355
|
-
|
|
1356
|
-
### Patch Changes
|
|
1357
|
-
|
|
1358
|
-
- @pluv/client@0.24.0
|
|
1359
|
-
- @pluv/crdt@0.24.0
|
|
1360
|
-
- @pluv/types@0.24.0
|
|
1361
|
-
|
|
1362
|
-
## 0.23.0
|
|
1363
|
-
|
|
1364
|
-
### Patch Changes
|
|
1365
|
-
|
|
1366
|
-
- @pluv/client@0.23.0
|
|
1367
|
-
- @pluv/crdt@0.23.0
|
|
1368
|
-
- @pluv/types@0.23.0
|
|
1369
|
-
|
|
1370
|
-
## 0.22.0
|
|
1371
|
-
|
|
1372
|
-
### Patch Changes
|
|
1373
|
-
|
|
1374
|
-
- @pluv/client@0.22.0
|
|
1375
|
-
- @pluv/crdt@0.22.0
|
|
1376
|
-
- @pluv/types@0.22.0
|
|
1377
|
-
|
|
1378
|
-
## 0.21.1
|
|
1379
|
-
|
|
1380
|
-
### Patch Changes
|
|
1381
|
-
|
|
1382
|
-
- @pluv/client@0.21.1
|
|
1383
|
-
- @pluv/crdt@0.21.1
|
|
1384
|
-
- @pluv/types@0.21.1
|
|
1385
|
-
|
|
1386
|
-
## 0.21.0
|
|
1387
|
-
|
|
1388
|
-
### Patch Changes
|
|
1389
|
-
|
|
1390
|
-
- Updated dependencies [b98ab6b]
|
|
1391
|
-
- @pluv/client@0.21.0
|
|
1392
|
-
- @pluv/crdt@0.21.0
|
|
1393
|
-
- @pluv/types@0.21.0
|
|
1394
|
-
|
|
1395
|
-
## 0.20.0
|
|
1396
|
-
|
|
1397
|
-
### Minor Changes
|
|
1398
|
-
|
|
1399
|
-
- 9492085: **BREAKING**: `@pluv/crdt-yjs` and `@pluv/crdt-loro` have been updated so that the utilities to create shared-types/containers no-longer return a wrapper around the underlying shared-types and containers, but rather return the shared-types/containers directly.
|
|
1400
|
-
|
|
1401
|
-
This means that for methods such as `getStorage` from `@pluv/client` and `useStorage` from `@pluv/react`, the shared-types/containers are also returned instead of the wrapper types.
|
|
1402
|
-
|
|
1403
|
-
The motivation for these changes are so that pluv.io is supplementary to `yjs` and `loro-crdt`, instead of having these libraries be an internal implementation of pluv.io.
|
|
1404
|
-
|
|
1405
|
-
```ts
|
|
1406
|
-
// Before
|
|
1407
|
-
|
|
1408
|
-
import { yjs } from "@pluv/crdt-yjs";
|
|
1409
|
-
|
|
1410
|
-
yjs.array([]); // Returns CrdtYjsArray
|
|
1411
|
-
yjs.object([]); // Returns CrdtYjsObject
|
|
1412
|
-
|
|
1413
|
-
const room: PluvRoom = /* ... */;
|
|
1414
|
-
|
|
1415
|
-
room.getStorage("messages"); // Returns AbstractCrdtType
|
|
1416
|
-
|
|
1417
|
-
const [, sharedType] = useStorage("messages"); // sharedType is an AbstractCrdtType
|
|
1418
|
-
```
|
|
1419
|
-
|
|
1420
|
-
```ts
|
|
1421
|
-
// Now
|
|
1422
|
-
|
|
1423
|
-
import { yjs } from "@pluv/crdt-yjs";
|
|
1424
|
-
|
|
1425
|
-
yjs.array([]); // Returns yjs.Array
|
|
1426
|
-
yjs.object([]); // Returns yjs.Map
|
|
1427
|
-
|
|
1428
|
-
const room: PluvRoom = /* ... */;
|
|
1429
|
-
|
|
1430
|
-
room.getStorage("messages"); // Returns yjs.AbstractType
|
|
1431
|
-
|
|
1432
|
-
const [, sharedType] = useStorage("messages"); // sharedType is a yjs.AbstractType
|
|
1433
|
-
```
|
|
1434
|
-
|
|
1435
|
-
For `@pluv/crdt-loro` specifically, `@pluv/client` relies on [loro events and subscriptions](https://www.loro.dev/docs/tutorial/get_started#event) to detect changes. The `AbstractLoroCrdt` types previously called `Loro.commit` after each change as an abstraction, but now this no-longer happens. To ensure that changes to loro containers are properly handled in `@pluv/react`, make sure to commit your changes whenever possible:
|
|
1436
|
-
|
|
1437
|
-
```ts
|
|
1438
|
-
// Before
|
|
1439
|
-
|
|
1440
|
-
const [data, container] = useStorage("messages");
|
|
1441
|
-
|
|
1442
|
-
// This automatically called Loro.commit under the hood and rerendered the page with updated data.
|
|
1443
|
-
container.push(loro.object({ name: "John Doe", age: 35 }));
|
|
1444
|
-
```
|
|
1445
|
-
|
|
1446
|
-
```ts
|
|
1447
|
-
// Now
|
|
1448
|
-
|
|
1449
|
-
const [data, container] = useStorage("messages");
|
|
1450
|
-
|
|
1451
|
-
const doc = useDoc();
|
|
1452
|
-
const transact = useTransact();
|
|
1453
|
-
|
|
1454
|
-
// Updates need to be committed back to the doc whenever the changes need to be emitted to other users
|
|
1455
|
-
// The returned data also will not update until the changes are commited
|
|
1456
|
-
|
|
1457
|
-
// The two operations below are functionally equivalent
|
|
1458
|
-
transact(() => {
|
|
1459
|
-
container.push(loro.object({ name: "John Doe", age: 35 }));
|
|
1460
|
-
});
|
|
1461
|
-
|
|
1462
|
-
container.push(loro.object({ name: "John Doe", age: 35 }));
|
|
1463
|
-
doc.value.commit();
|
|
1464
|
-
```
|
|
1465
|
-
|
|
1466
|
-
### Patch Changes
|
|
1467
|
-
|
|
1468
|
-
- Updated dependencies [9492085]
|
|
1469
|
-
- @pluv/client@0.20.0
|
|
1470
|
-
- @pluv/crdt@0.20.0
|
|
1471
|
-
- @pluv/types@0.20.0
|
|
1472
|
-
|
|
1473
|
-
## 0.19.0
|
|
1474
|
-
|
|
1475
|
-
### Minor Changes
|
|
1476
|
-
|
|
1477
|
-
- 798e32d: **Breaking**: useOthers now allows returning any data besides arrays when using a custom selector.
|
|
1478
|
-
- 8450306: **Breaking**: Require minimum react version of ^18.0.0.
|
|
1479
|
-
|
|
1480
|
-
### Patch Changes
|
|
1481
|
-
|
|
1482
|
-
- 607afe3: Update the `updateMyPresence` function from `useMyPresence` to simply forward the function from the `PluvRoom`. This means all `updateMyPresence` functions should be the same underlying reference across all `useMyPresence` hooks.
|
|
1483
|
-
- Updated dependencies [137444b]
|
|
1484
|
-
- Updated dependencies [f5e4370]
|
|
1485
|
-
- @pluv/client@0.19.0
|
|
1486
|
-
- @pluv/crdt@0.19.0
|
|
1487
|
-
- @pluv/types@0.19.0
|
|
1488
|
-
|
|
1489
|
-
## 0.18.0
|
|
1490
|
-
|
|
1491
|
-
### Minor Changes
|
|
1492
|
-
|
|
1493
|
-
- 99b5ca9: ## Breaking Changes
|
|
1494
|
-
- `@pluv/io` has been updated to introduce `PluvProcedure`, `PluvRouter` and `PluvServer`. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.
|
|
1495
|
-
|
|
1496
|
-
### Before:
|
|
1497
|
-
|
|
1498
|
-
```ts
|
|
1499
|
-
// backend/io.ts
|
|
1500
|
-
|
|
1501
|
-
import { createIO } from "@pluv/io";
|
|
1502
|
-
import { createPluvHandler, platformNode } from "@pluv/platform-node";
|
|
1503
|
-
import { z } from "zod";
|
|
1504
|
-
|
|
1505
|
-
export const io = createIO({
|
|
1506
|
-
platform: platformNode(),
|
|
1507
|
-
})
|
|
1508
|
-
.event("SEND_MESSAGE", {
|
|
1509
|
-
input: z.object({ message: z.string() }),
|
|
1510
|
-
resolver: ({ message }) => ({ RECEIVE_MESSAGE: { message } }),
|
|
1511
|
-
})
|
|
1512
|
-
.event("DOUBLE_VALUE", {
|
|
1513
|
-
input: z.object({ value: z.number() }),
|
|
1514
|
-
resolver: ({ value }) => ({ VALUE_DOUBLED: { value: value * 2 } }),
|
|
1515
|
-
});
|
|
1516
|
-
|
|
1517
|
-
const Pluv = createPluvHandler({
|
|
1518
|
-
io,
|
|
1519
|
-
/* ... */
|
|
1520
|
-
});
|
|
1521
|
-
```
|
|
1522
|
-
|
|
1523
|
-
```ts
|
|
1524
|
-
// frontend/pluv.ts
|
|
1525
|
-
|
|
1526
|
-
import { createClient } from "@pluv/react";
|
|
1527
|
-
import type { io } from "../backend/io";
|
|
1528
|
-
|
|
1529
|
-
const client = createClient<typeof io>({/* ... */});
|
|
1530
|
-
```
|
|
1531
|
-
|
|
1532
|
-
### Now:
|
|
1533
|
-
|
|
1534
|
-
```ts
|
|
1535
|
-
import { createIO } from "@pluv/io";
|
|
1536
|
-
import { createPluvHandler, platformNode } from "@pluv/platform-node";
|
|
1537
|
-
import { z } from "zod";
|
|
1538
|
-
|
|
1539
|
-
const io = createIO({
|
|
1540
|
-
platform: platformNode(),
|
|
1541
|
-
});
|
|
1542
|
-
|
|
1543
|
-
const router = io.router({
|
|
1544
|
-
SEND_MESSAGE: io.procedure
|
|
1545
|
-
.input(z.object({ message: z.string() }))
|
|
1546
|
-
.broadcast(({ message }) => ({
|
|
1547
|
-
RECEIVE_MESSAGE: { message },
|
|
1548
|
-
})),
|
|
1549
|
-
DOUBLE_VALUE: io.procedure
|
|
1550
|
-
.input(z.object({ value: z.number() }))
|
|
1551
|
-
.broadcast(({ value }) => ({
|
|
1552
|
-
VALUE_DOUBLED: { value: value * 2 },
|
|
1553
|
-
})),
|
|
1554
|
-
});
|
|
1555
|
-
|
|
1556
|
-
export const ioServer = io.server({ router });
|
|
1557
|
-
|
|
1558
|
-
const Pluv = createPluvHandler({
|
|
1559
|
-
io: ioServer, // <- This uses the PluvServer now
|
|
1560
|
-
/* ... */
|
|
1561
|
-
});
|
|
1562
|
-
```
|
|
1563
|
-
|
|
1564
|
-
```ts
|
|
1565
|
-
// frontend/pluv.ts
|
|
1566
|
-
|
|
1567
|
-
import { createClient } from "@pluv/react";
|
|
1568
|
-
import type { ioServer } from "../backend/io";
|
|
1569
|
-
|
|
1570
|
-
// This users the PluvServer type now
|
|
1571
|
-
const client = createClient<typeof ioServer>({/* ... */});
|
|
1572
|
-
```
|
|
1573
|
-
|
|
1574
|
-
- `PluvRouter` instances can also be merged via the `mergeRouters` method, which effectively performs an `Object.assign` of the events object and returns a new `PluvRouter` with the correct types:
|
|
1575
|
-
|
|
1576
|
-
```ts
|
|
1577
|
-
const router = io.mergeRouters(router1, router2);
|
|
1578
|
-
```
|
|
1579
|
-
|
|
1580
|
-
- 07a7725: Added broadcast proxy as a new way to broadcast events to other users.
|
|
1581
|
-
|
|
1582
|
-
```tsx
|
|
1583
|
-
// backend
|
|
1584
|
-
|
|
1585
|
-
const router = io.router({
|
|
1586
|
-
SEND_MESSAGE: io.procedure
|
|
1587
|
-
.input(z.object({ message: z.string() }))
|
|
1588
|
-
.broadcast(({ message }) => ({ RECEIVE_MESSAGE: { message } })),
|
|
1589
|
-
});
|
|
1590
|
-
|
|
1591
|
-
// frontend
|
|
1592
|
-
const pluv = createRoomBundle(/* ... */);
|
|
1593
|
-
|
|
1594
|
-
const broadcast = pluv.useBroadcast();
|
|
1595
|
-
|
|
1596
|
-
// Both of the examples below are equivalent.
|
|
1597
|
-
|
|
1598
|
-
broadcast("SEND_MESSAGE", { message: "Hello world~!" });
|
|
1599
|
-
|
|
1600
|
-
broadcast.SEND_MESSAGE({ message: "Hello world~!" });
|
|
1601
|
-
```
|
|
1602
|
-
|
|
1603
|
-
### Patch Changes
|
|
1604
|
-
|
|
1605
|
-
- e587c18: Added event proxy as a new way to listen to events.
|
|
1606
|
-
|
|
1607
|
-
```tsx
|
|
1608
|
-
// backend
|
|
1609
|
-
|
|
1610
|
-
const router = io.router({
|
|
1611
|
-
SEND_MESSAGE: io.procedure
|
|
1612
|
-
.input(z.object({ message: z.string() }))
|
|
1613
|
-
.broadcast(({ message }) => ({ RECEIVE_MESSAGE: { message } })),
|
|
1614
|
-
});
|
|
1615
|
-
|
|
1616
|
-
// frontend
|
|
1617
|
-
const pluv = createRoomBundle(/* ... */);
|
|
1618
|
-
|
|
1619
|
-
// Both of the examples below are equivalent.
|
|
1620
|
-
|
|
1621
|
-
pluv.useEvent("RECEIVE_MESSAGE", ({ data }) => {
|
|
1622
|
-
const { message } = data;
|
|
1623
|
-
|
|
1624
|
-
console.log(message);
|
|
1625
|
-
});
|
|
1626
|
-
|
|
1627
|
-
pluv.event.RECEIVE_MESSAGE.useEvent(({ data }) => {
|
|
1628
|
-
const { message } = data;
|
|
1629
|
-
|
|
1630
|
-
console.log(message);
|
|
1631
|
-
});
|
|
1632
|
-
```
|
|
1633
|
-
|
|
1634
|
-
- Updated dependencies [06c67be]
|
|
1635
|
-
- Updated dependencies [99b5ca9]
|
|
1636
|
-
- Updated dependencies [df1342c]
|
|
1637
|
-
- @pluv/client@0.18.0
|
|
1638
|
-
- @pluv/types@0.18.0
|
|
1639
|
-
- @pluv/crdt@0.18.0
|
|
1640
|
-
|
|
1641
|
-
## 0.17.3
|
|
1642
|
-
|
|
1643
|
-
### Patch Changes
|
|
1644
|
-
|
|
1645
|
-
- @pluv/client@0.17.3
|
|
1646
|
-
- @pluv/crdt@0.17.3
|
|
1647
|
-
- @pluv/types@0.17.3
|
|
1648
|
-
|
|
1649
|
-
## 0.17.2
|
|
1650
|
-
|
|
1651
|
-
### Patch Changes
|
|
1652
|
-
|
|
1653
|
-
- @pluv/client@0.17.2
|
|
1654
|
-
- @pluv/crdt@0.17.2
|
|
1655
|
-
- @pluv/types@0.17.2
|
|
1656
|
-
|
|
1657
|
-
## 0.17.1
|
|
1658
|
-
|
|
1659
|
-
### Patch Changes
|
|
1660
|
-
|
|
1661
|
-
- @pluv/client@0.17.1
|
|
1662
|
-
- @pluv/crdt@0.17.1
|
|
1663
|
-
- @pluv/types@0.17.1
|
|
1664
|
-
|
|
1665
|
-
## 0.17.0
|
|
1666
|
-
|
|
1667
|
-
### Patch Changes
|
|
1668
|
-
|
|
1669
|
-
- Updated dependencies [507bc00]
|
|
1670
|
-
- @pluv/types@0.17.0
|
|
1671
|
-
- @pluv/client@0.17.0
|
|
1672
|
-
- @pluv/crdt@0.17.0
|
|
1673
|
-
|
|
1674
|
-
## 0.16.3
|
|
1675
|
-
|
|
1676
|
-
### Patch Changes
|
|
1677
|
-
|
|
1678
|
-
- @pluv/client@0.16.3
|
|
1679
|
-
- @pluv/crdt@0.16.3
|
|
1680
|
-
- @pluv/types@0.16.3
|
|
1681
|
-
|
|
1682
|
-
## 0.16.2
|
|
1683
|
-
|
|
1684
|
-
### Patch Changes
|
|
1685
|
-
|
|
1686
|
-
- @pluv/client@0.16.2
|
|
1687
|
-
- @pluv/crdt@0.16.2
|
|
1688
|
-
- @pluv/types@0.16.2
|
|
1689
|
-
|
|
1690
|
-
## 0.16.1
|
|
1691
|
-
|
|
1692
|
-
### Patch Changes
|
|
1693
|
-
|
|
1694
|
-
- @pluv/client@0.16.1
|
|
1695
|
-
- @pluv/crdt@0.16.1
|
|
1696
|
-
- @pluv/types@0.16.1
|
|
1697
|
-
|
|
1698
|
-
## 0.16.0
|
|
1699
|
-
|
|
1700
|
-
### Minor Changes
|
|
1701
|
-
|
|
1702
|
-
- 995aa9c: Renamed all hooks from `@pluv/react` to be simply prefixed with `use` instead of `usePluv` (e.g. `usePluvStorage` is now just `useStorage`).
|
|
1703
|
-
|
|
1704
|
-
Hooks can be aliased to retain the same names if preferred:
|
|
1705
|
-
|
|
1706
|
-
```ts
|
|
1707
|
-
export const {
|
|
1708
|
-
// ...
|
|
1709
|
-
useStorage: usePluvStorage,
|
|
1710
|
-
useTransact: usePluvTransact,
|
|
1711
|
-
// ...
|
|
1712
|
-
} = createRoomBundle(/* */);
|
|
1713
|
-
```
|
|
1714
|
-
|
|
1715
|
-
- 4280220: ## Breaking Changes
|
|
1716
|
-
- Storage types are now kept on the root of the document.
|
|
1717
|
-
- Previously, `@pluv/crdt-yjs` kept all shared-types on a hidden Yjs Map called `storage` on the root of the Yjs Doc. Now all shared-types are kept on the root of the Yjs Doc instead. This behavior should be more in-line with how shared-types are documented to be used from Yjs.
|
|
1718
|
-
- `@pluv/client` and `@pluv/react` no-longer re-export `@pluv/crdt-yjs`. This package will now need to be installed separately.
|
|
1719
|
-
|
|
1720
|
-
```bash
|
|
1721
|
-
# if installing @pluv/client
|
|
1722
|
-
npm install @pluv/client @pluv/crdt-yjs
|
|
1723
|
-
# if installing @pluv/react
|
|
1724
|
-
npm install @pluv/react @pluv/crdt-yjs
|
|
1725
|
-
```
|
|
1726
|
-
|
|
1727
|
-
```ts
|
|
1728
|
-
// Before:
|
|
1729
|
-
import { createClient, y } from "@pluv/client";
|
|
1730
|
-
// After:
|
|
1731
|
-
import { createClient } from "@pluv/client";
|
|
1732
|
-
import { yjs } from "@pluv/crdt-yjs"; // y renamed to yjs
|
|
1733
|
-
```
|
|
1734
|
-
|
|
1735
|
-
- The `y` import has been renamed to `yjs`.
|
|
1736
|
-
```ts
|
|
1737
|
-
// Before:
|
|
1738
|
-
import { y } from "@pluv/crdt-yjs";
|
|
1739
|
-
// After:
|
|
1740
|
-
import { yjs } from "@pluv/crdt-yjs";
|
|
1741
|
-
```
|
|
1742
|
-
- `@pluv/crdt-yjs` functions no-longer return Yjs shared-types directly, but instead return an `AbstractCrdtType` from `@pluv/crdt` (new package). This also affects methods that return storage shared types in both `@pluv/client` and `@pluv/react` from functions like `PluvRoom.getStorage` and `PluvRoom.useStorage`.
|
|
1743
|
-
|
|
1744
|
-
```ts
|
|
1745
|
-
// Before:
|
|
1746
|
-
import { y } from "@pluv/crdt-yjs";
|
|
1747
|
-
import type { Array as YArray, Map as YMap } from "yjs";
|
|
1748
|
-
|
|
1749
|
-
const array: YArray<YMap<{ message: string }>> = y.array([y.object({ message: "Hello" })]);
|
|
1750
|
-
|
|
1751
|
-
array.push([y.object({ message: "World!" })]);
|
|
1752
|
-
|
|
1753
|
-
// After:
|
|
1754
|
-
import type { CrdtYjsArray, CrdtYjsObject } from "@pluv/crdt-yjs";
|
|
1755
|
-
import { yjs } from "@pluv/crdt-yjs";
|
|
1756
|
-
import type { Array as YArray } from "yjs";
|
|
1757
|
-
|
|
1758
|
-
const array: CrdtYjsArray<CrdtYjsObject<{ message: string }>> = yjs.array([
|
|
1759
|
-
yjs.object({ message: "Hello" }),
|
|
1760
|
-
]);
|
|
1761
|
-
|
|
1762
|
-
array.push(yjs.object({ message: "World!" }));
|
|
1763
|
-
|
|
1764
|
-
// use .value to get the underlying yjs type
|
|
1765
|
-
const yarray: YArray<YMap<{ message: string }>> = array.value;
|
|
1766
|
-
```
|
|
1767
|
-
|
|
1768
|
-
- `initialStorage` must now use the `doc` function from `@pluv/crdt-yjs` to be defined. This also affects `@pluv/react`.
|
|
1769
|
-
|
|
1770
|
-
```ts
|
|
1771
|
-
// Before:
|
|
1772
|
-
import { createClient, y } from "@pluv/client";
|
|
1773
|
-
|
|
1774
|
-
const client = createClient({/* ... */});
|
|
1775
|
-
|
|
1776
|
-
client.createRoom({
|
|
1777
|
-
// ...
|
|
1778
|
-
initialStorage: () => ({
|
|
1779
|
-
messages: y.array([y.object({ message: "Hello world!" })]),
|
|
1780
|
-
}),
|
|
1781
|
-
});
|
|
1782
|
-
|
|
1783
|
-
// After:
|
|
1784
|
-
import { createClient } from "@pluv/client";
|
|
1785
|
-
// This is now imported separately
|
|
1786
|
-
import { yjs } from "@pluv/crdt-yjs";
|
|
1787
|
-
|
|
1788
|
-
const client = createClient({/* ... */});
|
|
1789
|
-
|
|
1790
|
-
client.createRoom({
|
|
1791
|
-
// ...
|
|
1792
|
-
initialStorage: yjs.doc(() => ({
|
|
1793
|
-
messages: yjs.array([yjs.object({ message: "Hello world!" })]),
|
|
1794
|
-
})),
|
|
1795
|
-
});
|
|
1796
|
-
```
|
|
1797
|
-
|
|
1798
|
-
- `@pluv/client` can now instead use [loro](https://github.com/loro-dev/loro) instead of [yjs](https://github.com/yjs/yjs).
|
|
1799
|
-
```bash
|
|
1800
|
-
npm install @pluv/client @pluv/crdt-loro loro-crdt
|
|
1801
|
-
```
|
|
1802
|
-
- If you are using storage features with pluv, `@pluv/io` must now specify which crdt library (i.e. `@pluv/crdt-yjs` or `@pluv/crdt-loro`) it is meant to use.
|
|
1803
|
-
|
|
1804
|
-
```ts
|
|
1805
|
-
import { loro } from "@pluv/crdt-loro";
|
|
1806
|
-
import { yjs } from "@pluv/crdt-yjs";
|
|
1807
|
-
import { createIO } from "@pluv/io";
|
|
1808
|
-
|
|
1809
|
-
const io = createIO({
|
|
1810
|
-
// ...
|
|
1811
|
-
// If using loro
|
|
1812
|
-
crdt: loro,
|
|
1813
|
-
// If using yjs
|
|
1814
|
-
crdt: yjs,
|
|
1815
|
-
});
|
|
1816
|
-
```
|
|
1817
|
-
|
|
1818
|
-
- `PluvRoom.getDoc()` from `@pluv/client` no-longer returns the Yjs Doc instance, but rather a `AbstractCrdtDoc` instance from `@pluv/crdt`. This also affects the hook from `@pluv/react`.
|
|
1819
|
-
|
|
1820
|
-
```ts
|
|
1821
|
-
// Before:
|
|
1822
|
-
import { Doc as YDoc } from "yjs";
|
|
1823
|
-
|
|
1824
|
-
const room: PluvRoom = client.createRoom({/* ... */});
|
|
1825
|
-
|
|
1826
|
-
const doc: YDoc = room.getDoc();
|
|
1827
|
-
|
|
1828
|
-
// After:
|
|
1829
|
-
import { CrdtYjsDoc } from "@pluv/crdt-yjs";
|
|
1830
|
-
import { Doc as YDoc } from "yjs";
|
|
1831
|
-
|
|
1832
|
-
const room: PluvRoom = client.createRoom({/* ... */});
|
|
1833
|
-
|
|
1834
|
-
const doc: CrdtYjsDoc<any> = room.getDoc();
|
|
1835
|
-
const ydoc: YDoc = doc.value;
|
|
1836
|
-
```
|
|
1837
|
-
|
|
1838
|
-
- `@pluv/client` and `@pluv/react` now may return `null` when retrieving storage while storage is being initialized.
|
|
1839
|
-
|
|
1840
|
-
```ts
|
|
1841
|
-
const sharedType = room.getStorage("messages"); // This may be null
|
|
1842
|
-
|
|
1843
|
-
const [data, sharedType] = useStorage("messages"); // data and sharedType may both be null
|
|
1844
|
-
```
|
|
1845
|
-
|
|
1846
|
-
### Patch Changes
|
|
1847
|
-
|
|
1848
|
-
- Updated dependencies [4280220]
|
|
1849
|
-
- @pluv/client@0.16.0
|
|
1850
|
-
- @pluv/crdt@0.16.0
|
|
1851
|
-
- @pluv/types@0.16.0
|
|
1852
|
-
|
|
1853
|
-
## 0.15.0
|
|
1854
|
-
|
|
1855
|
-
### Patch Changes
|
|
1856
|
-
|
|
1857
|
-
- @pluv/client@0.15.0
|
|
1858
|
-
- @pluv/types@0.15.0
|
|
1859
|
-
|
|
1860
|
-
## 0.14.1
|
|
1861
|
-
|
|
1862
|
-
### Patch Changes
|
|
1863
|
-
|
|
1864
|
-
- @pluv/client@0.14.1
|
|
1865
|
-
- @pluv/types@0.14.1
|
|
1866
|
-
|
|
1867
|
-
## 0.14.0
|
|
1868
|
-
|
|
1869
|
-
### Patch Changes
|
|
1870
|
-
|
|
1871
|
-
- @pluv/client@0.14.0
|
|
1872
|
-
- @pluv/types@0.14.0
|
|
1873
|
-
|
|
1874
|
-
## 0.13.0
|
|
1875
|
-
|
|
1876
|
-
### Minor Changes
|
|
1877
|
-
|
|
1878
|
-
- 4c4b47f: Added `useDoc` to access the root Yjs doc.
|
|
1879
|
-
|
|
1880
|
-
```ts
|
|
1881
|
-
import type { Doc } from "yjs";
|
|
1882
|
-
|
|
1883
|
-
const doc: Doc = useDoc();
|
|
1884
|
-
```
|
|
1885
|
-
|
|
1886
|
-
### Patch Changes
|
|
1887
|
-
|
|
1888
|
-
- Updated dependencies [1126215]
|
|
1889
|
-
- @pluv/client@0.13.0
|
|
1890
|
-
- @pluv/types@0.13.0
|
|
1891
|
-
|
|
1892
|
-
## 0.12.3
|
|
1893
|
-
|
|
1894
|
-
### Patch Changes
|
|
1895
|
-
|
|
1896
|
-
- da9f600: Upgraded dependencies
|
|
1897
|
-
- Updated dependencies [da9f600]
|
|
1898
|
-
- @pluv/client@0.12.3
|
|
1899
|
-
- @pluv/types@0.12.3
|
|
1900
|
-
|
|
1901
|
-
## 0.12.2
|
|
1902
|
-
|
|
1903
|
-
### Patch Changes
|
|
1904
|
-
|
|
1905
|
-
- 259a7da: Bumped dependencies
|
|
1906
|
-
|
|
1907
|
-
## 0.12.1
|
|
1908
|
-
|
|
1909
|
-
### Patch Changes
|
|
1910
|
-
|
|
1911
|
-
- cae08aa: Updated storage from `getStorage` to never return null
|
|
1912
|
-
- Updated dependencies [cae08aa]
|
|
1913
|
-
- @pluv/client@0.12.1
|
|
1914
|
-
- @pluv/types@0.12.1
|
|
1915
|
-
|
|
1916
|
-
## 0.12.0
|
|
1917
|
-
|
|
1918
|
-
### Minor Changes
|
|
1919
|
-
|
|
1920
|
-
- 436040b: Added ability to undo and redo changes to storage.
|
|
1921
|
-
|
|
1922
|
-
## @pluv/crdt-yjs
|
|
1923
|
-
|
|
1924
|
-
`@pluv/crdt-yjs` now exposes 5 new methods: `canRedo`, `canUndo`, `redo`, `undo` and `trackOrigins`.
|
|
1925
|
-
|
|
1926
|
-
Refer to the code-example below to better understand how to undo and redo with your doc.
|
|
1927
|
-
|
|
1928
|
-
```ts
|
|
1929
|
-
// Example
|
|
1930
|
-
import { array, doc } from "@pluv/crdt-yjs";
|
|
1931
|
-
|
|
1932
|
-
// Create your doc with your shared-types
|
|
1933
|
-
const myDoc = doc({
|
|
1934
|
-
messages: array<string>([]),
|
|
1935
|
-
});
|
|
1936
|
-
|
|
1937
|
-
/**
|
|
1938
|
-
* @description Track origins to enable undos and redos for your document.
|
|
1939
|
-
* trackOrigins must be called before any storage mutations, to enable those
|
|
1940
|
-
* mutations to be undone/redone.
|
|
1941
|
-
*/
|
|
1942
|
-
myDoc.trackOrigins({
|
|
1943
|
-
/**
|
|
1944
|
-
* @description This is the same `captureTimeout` option from yjs's UndoManager.
|
|
1945
|
-
* This specifies a number in ms, during which edits are merged together to be
|
|
1946
|
-
* undone together. Set this to 0, to track each transacted change individually.
|
|
1947
|
-
* @see (@link https://docs.yjs.dev/api/undo-manager)
|
|
1948
|
-
* @default 500
|
|
1949
|
-
*/
|
|
1950
|
-
captureTimeout: 500,
|
|
1951
|
-
/**
|
|
1952
|
-
* @desription This is the same `trackedOrigins` option from yjs's UndoManager.
|
|
1953
|
-
* This specifies transaction origins (strings only) to filter which transactions
|
|
1954
|
-
* can be undone.
|
|
1955
|
-
* @see (@link https://docs.yjs.dev/api/undo-manager)
|
|
1956
|
-
* @default undefined
|
|
1957
|
-
*/
|
|
1958
|
-
trackedOrigins: ["user-123"],
|
|
1959
|
-
});
|
|
1960
|
-
|
|
1961
|
-
/**
|
|
1962
|
-
* @description Check whether calling undo will mutate storage
|
|
1963
|
-
* @returns boolean
|
|
1964
|
-
*/
|
|
1965
|
-
myDoc.canUndo();
|
|
1966
|
-
/**
|
|
1967
|
-
* @description Check whether calling redo will mutate storage
|
|
1968
|
-
* @returns boolean
|
|
1969
|
-
*/
|
|
1970
|
-
myDoc.canRedo();
|
|
1971
|
-
|
|
1972
|
-
// Perform a storage mutation within a transaction so that it can be affected
|
|
1973
|
-
// by undo/redo operations.
|
|
1974
|
-
myDoc.transact(() => {
|
|
1975
|
-
myDoc.get("messages").push(["hello world!"]);
|
|
1976
|
-
}, "user-123");
|
|
1977
|
-
|
|
1978
|
-
/**
|
|
1979
|
-
* @description Undoes the last valid mutation to storage
|
|
1980
|
-
*/
|
|
1981
|
-
myDoc.undo();
|
|
1982
|
-
|
|
1983
|
-
/**
|
|
1984
|
-
* @description Re-applies the last undone mutation to storage
|
|
1985
|
-
*/
|
|
1986
|
-
myDoc.redo();
|
|
1987
|
-
```
|
|
1988
|
-
|
|
1989
|
-
## @pluv/client
|
|
1990
|
-
|
|
1991
|
-
`@pluv/client`'s `PluvRoom` and `MockedRoom` now exposes 5 new methods: `canRedo`, `canUndo`, `redo`, `undo` and `transact`.
|
|
1992
|
-
|
|
1993
|
-
Refer to the code-example below to better understand how to undo and redo with your `PluvRoom`.
|
|
1994
|
-
|
|
1995
|
-
```ts
|
|
1996
|
-
import { createClient, y } from "@pluv/client";
|
|
1997
|
-
|
|
1998
|
-
const client = createClient({});
|
|
1999
|
-
|
|
2000
|
-
/**
|
|
2001
|
-
* @description When a room is created, undo/redo will automatically
|
|
2002
|
-
* be configured to filter for changes made by the connected user
|
|
2003
|
-
* (so that users only undo/redo their changes).
|
|
2004
|
-
*/
|
|
2005
|
-
const room = client.createRoom("my-room", {
|
|
2006
|
-
initialStorage: () => ({
|
|
2007
|
-
messages: y.array<string>([]),
|
|
2008
|
-
}),
|
|
2009
|
-
/**
|
|
2010
|
-
* @description This is the same `captureTimeout` option from yjs's UndoManager.
|
|
2011
|
-
* This specifies a number in ms, during which edits are merged together to be
|
|
2012
|
-
* undone together. Set this to 0, to track each transacted change individually.
|
|
2013
|
-
* @see (@link https://docs.yjs.dev/api/undo-manager)
|
|
2014
|
-
* @default 500
|
|
2015
|
-
*/
|
|
2016
|
-
captureTimeout: 500,
|
|
2017
|
-
/**
|
|
2018
|
-
* @desription This is the same `trackedOrigins` option from yjs's UndoManager.
|
|
2019
|
-
* This specifies transaction origins (strings only) to filter which transactions
|
|
2020
|
-
* can be undone.
|
|
2021
|
-
* When omitted, the user's connection id will be tracked. When provided,
|
|
2022
|
-
* specifies additional tracked origins besides the user's connection id.
|
|
2023
|
-
* @see (@link https://docs.yjs.dev/api/undo-manager)
|
|
2024
|
-
* @default undefined
|
|
2025
|
-
*/
|
|
2026
|
-
trackedOrigins: ["user-123"],
|
|
2027
|
-
});
|
|
2028
|
-
|
|
2029
|
-
/**
|
|
2030
|
-
* @description Check whether calling undo will mutate storage
|
|
2031
|
-
* @returns boolean
|
|
2032
|
-
*/
|
|
2033
|
-
room.canUndo();
|
|
2034
|
-
/**
|
|
2035
|
-
* @description Check whether calling redo will mutate storage
|
|
2036
|
-
* @returns boolean
|
|
2037
|
-
*/
|
|
2038
|
-
room.canRedo();
|
|
2039
|
-
|
|
2040
|
-
/**
|
|
2041
|
-
* @description Calling transact will enable a storage mutation to be undone/redone.
|
|
2042
|
-
* When called without an origin, the origin will default to the user's connection
|
|
2043
|
-
* id.
|
|
2044
|
-
*
|
|
2045
|
-
* You can specify a 2nd parameter to transact with a different transaction origin.
|
|
2046
|
-
*/
|
|
2047
|
-
room.transact(() => {
|
|
2048
|
-
room.get("messages").push(["hello world!"]);
|
|
2049
|
-
});
|
|
2050
|
-
|
|
2051
|
-
// This will also be undoable because `"user-123"` is a tracked origin.
|
|
2052
|
-
room.transact(() => {
|
|
2053
|
-
room.get("messages").push(["hello world!"]);
|
|
2054
|
-
}, "user-123");
|
|
2055
|
-
|
|
2056
|
-
/**
|
|
2057
|
-
* @description Undoes the last valid mutation to storage
|
|
2058
|
-
*/
|
|
2059
|
-
room.undo();
|
|
2060
|
-
|
|
2061
|
-
/**
|
|
2062
|
-
* @description Re-applies the last undone mutation to storage
|
|
2063
|
-
*/
|
|
2064
|
-
room.redo();
|
|
2065
|
-
```
|
|
2066
|
-
|
|
2067
|
-
## @pluv/react
|
|
2068
|
-
|
|
2069
|
-
`@pluv/react`'s `createRoomBundle` now exposes 5 new react hooks: `useCanRedo`, `useCanUndo`, `useRedo`, `useUndo` and `useTransact`.
|
|
2070
|
-
|
|
2071
|
-
Refer to the code-example below to better understand how to undo and redo with your `createRoomBundle`.
|
|
2072
|
-
|
|
2073
|
-
```tsx
|
|
2074
|
-
import { createBundle, createClient, y } from "@pluv/react";
|
|
2075
|
-
import { type io } from "./io";
|
|
2076
|
-
|
|
2077
|
-
const client = createClient<typeof io>();
|
|
2078
|
-
|
|
2079
|
-
const { createRoomBundle } = createBundle(client);
|
|
2080
|
-
|
|
2081
|
-
const { useCanRedo, useCanUndo, useRedo, useStorage, useTransact, useUndo } = createRoomBundle({
|
|
2082
|
-
initialStorage: () => ({
|
|
2083
|
-
messages: y.array<string>([]),
|
|
2084
|
-
}),
|
|
2085
|
-
/**
|
|
2086
|
-
* @description This is the same `captureTimeout` option from yjs's UndoManager.
|
|
2087
|
-
* This specifies a number in ms, during which edits are merged together to be
|
|
2088
|
-
* undone together. Set this to 0, to track each transacted change individually.
|
|
2089
|
-
* @see (@link https://docs.yjs.dev/api/undo-manager)
|
|
2090
|
-
* @default 500
|
|
2091
|
-
*/
|
|
2092
|
-
captureTimeout: 500,
|
|
2093
|
-
/**
|
|
2094
|
-
* @desription This is the same `trackedOrigins` option from yjs's UndoManager.
|
|
2095
|
-
* This specifies transaction origins (strings only) to filter which transactions
|
|
2096
|
-
* can be undone.
|
|
2097
|
-
* When omitted, the user's connection id will be tracked. When provided,
|
|
2098
|
-
* specifies additional tracked origins besides the user's connection id.
|
|
2099
|
-
* @see (@link https://docs.yjs.dev/api/undo-manager)
|
|
2100
|
-
* @default undefined
|
|
2101
|
-
*/
|
|
2102
|
-
trackedOrigins: ["user-123"],
|
|
2103
|
-
});
|
|
2104
|
-
|
|
2105
|
-
/**
|
|
2106
|
-
* @description Check whether calling undo will mutate storage
|
|
2107
|
-
*/
|
|
2108
|
-
const canUndo: boolean = useCanUndo();
|
|
2109
|
-
/**
|
|
2110
|
-
* @description Check whether calling redo will mutate storage
|
|
2111
|
-
*/
|
|
2112
|
-
const canRedo: boolean = useCanRedo();
|
|
2113
|
-
|
|
2114
|
-
const [messages, sharedType] = useStorage("messages");
|
|
2115
|
-
|
|
2116
|
-
/**
|
|
2117
|
-
* @description Calling transact will enable a storage mutation to be undone/redone.
|
|
2118
|
-
* When called without an origin, the origin will default to the user's connection
|
|
2119
|
-
* id.
|
|
2120
|
-
*
|
|
2121
|
-
* You can specify a 2nd parameter to transact with a different transaction origin.
|
|
2122
|
-
*/
|
|
2123
|
-
const transact = useTransact();
|
|
2124
|
-
|
|
2125
|
-
transact(() => {
|
|
2126
|
-
sharedType.push(["hello world!"]);
|
|
2127
|
-
});
|
|
2128
|
-
|
|
2129
|
-
// This will also be undoable because `"user-123"` is a tracked origin.
|
|
2130
|
-
transact(() => {
|
|
2131
|
-
sharedType.push(["hello world!"]);
|
|
2132
|
-
}, "user-123");
|
|
2133
|
-
|
|
2134
|
-
/**
|
|
2135
|
-
* @description Undoes the last valid mutation to storage
|
|
2136
|
-
*/
|
|
2137
|
-
const undo = useUndo();
|
|
2138
|
-
|
|
2139
|
-
undo();
|
|
2140
|
-
|
|
2141
|
-
/**
|
|
2142
|
-
* @description Re-applies the last undone mutation to storage
|
|
2143
|
-
*/
|
|
2144
|
-
const redo = useRedo();
|
|
2145
|
-
|
|
2146
|
-
redo();
|
|
2147
|
-
```
|
|
2148
|
-
|
|
2149
|
-
### Patch Changes
|
|
2150
|
-
|
|
2151
|
-
- Updated dependencies [436040b]
|
|
2152
|
-
- @pluv/client@0.12.0
|
|
2153
|
-
- @pluv/types@0.12.0
|
|
2154
|
-
|
|
2155
|
-
## 0.11.1
|
|
2156
|
-
|
|
2157
|
-
### Patch Changes
|
|
2158
|
-
|
|
2159
|
-
- 74b3061: Bumped minor and patch dependencies.
|
|
2160
|
-
- Updated dependencies [74b3061]
|
|
2161
|
-
- @pluv/client@0.11.1
|
|
2162
|
-
- @pluv/types@0.11.1
|
|
2163
|
-
|
|
2164
|
-
## 0.11.0
|
|
2165
|
-
|
|
2166
|
-
### Patch Changes
|
|
2167
|
-
|
|
2168
|
-
- @pluv/client@0.11.0
|
|
2169
|
-
- @pluv/types@0.11.0
|
|
2170
|
-
|
|
2171
|
-
## 0.10.3
|
|
2172
|
-
|
|
2173
|
-
### Patch Changes
|
|
2174
|
-
|
|
2175
|
-
- @pluv/client@0.10.3
|
|
2176
|
-
- @pluv/types@0.10.3
|
|
2177
|
-
|
|
2178
|
-
## 0.10.2
|
|
2179
|
-
|
|
2180
|
-
### Patch Changes
|
|
2181
|
-
|
|
2182
|
-
- @pluv/client@0.10.2
|
|
2183
|
-
- @pluv/types@0.10.2
|
|
2184
|
-
|
|
2185
|
-
## 0.10.1
|
|
2186
|
-
|
|
2187
|
-
### Patch Changes
|
|
2188
|
-
|
|
2189
|
-
- 885835d: remove unnecessary dependency
|
|
2190
|
-
- Updated dependencies [885835d]
|
|
2191
|
-
- @pluv/client@0.10.1
|
|
2192
|
-
- @pluv/types@0.10.1
|
|
2193
|
-
|
|
2194
|
-
## 0.10.0
|
|
2195
|
-
|
|
2196
|
-
### Minor Changes
|
|
2197
|
-
|
|
2198
|
-
- f43f1cc: Change packages to all be versioned together for consistency.
|
|
2199
|
-
|
|
2200
|
-
### Patch Changes
|
|
2201
|
-
|
|
2202
|
-
- Updated dependencies [f43f1cc]
|
|
2203
|
-
- @pluv/client@0.10.0
|
|
2204
|
-
- @pluv/types@0.10.0
|
|
2205
|
-
|
|
2206
|
-
## 0.6.2
|
|
2207
|
-
|
|
2208
|
-
### Patch Changes
|
|
2209
|
-
|
|
2210
|
-
- f4317ba: \* Renamed type `unstable_YObjectValue` to `YObjectValue`;
|
|
2211
|
-
- Renamed type `unstable_YObject` to `YObject`.
|
|
2212
|
-
- Re-exported `xmlElement`, `xmlFragment` and `xmlText` from `@pluv/client`.
|
|
2213
|
-
|
|
2214
|
-
```ts
|
|
2215
|
-
import { y } from "@pluv/client";
|
|
2216
|
-
// or
|
|
2217
|
-
import { y } from "@pluv/react";
|
|
2218
|
-
|
|
2219
|
-
y.xmlElement("MyElement", {});
|
|
2220
|
-
y.xmlFragment({});
|
|
2221
|
-
y.xmlText("hello world");
|
|
2222
|
-
```
|
|
2223
|
-
|
|
2224
|
-
- Updated dependencies [f4317ba]
|
|
2225
|
-
- @pluv/client@0.9.2
|
|
2226
|
-
|
|
2227
|
-
## 0.6.1
|
|
2228
|
-
|
|
2229
|
-
### Patch Changes
|
|
2230
|
-
|
|
2231
|
-
- 8fba48b: fix including incorrect dependency
|
|
2232
|
-
- 8997c65: bumped dependencies
|
|
2233
|
-
- Updated dependencies [8fba48b]
|
|
2234
|
-
- Updated dependencies [8997c65]
|
|
2235
|
-
- @pluv/client@0.9.1
|
|
2236
|
-
- @pluv/types@0.2.2
|
|
2237
|
-
|
|
2238
|
-
## 0.6.0
|
|
2239
|
-
|
|
2240
|
-
### Minor Changes
|
|
2241
|
-
|
|
2242
|
-
- 829d31b: Added support for defining persistant frontend storage for rooms via a new `addons` option on rooms.
|
|
2243
|
-
|
|
2244
|
-
This also introduces the first new addon `@pluv/addon-indexeddb`, which is more-or-less the equivalent to `y-indexeddb` which you can install like so:
|
|
2245
|
-
|
|
2246
|
-
```
|
|
2247
|
-
npm install @pluv/addon-indexeddb
|
|
2248
|
-
```
|
|
2249
|
-
|
|
2250
|
-
To use this new addon, simply pass it to options when creating a room:
|
|
2251
|
-
|
|
2252
|
-
```ts
|
|
2253
|
-
import { addonIndexedDB } from "@pluv/addon-indexeddb";
|
|
2254
|
-
import { createClient } from "@pluv/client";
|
|
2255
|
-
|
|
2256
|
-
const client = createClient({
|
|
2257
|
-
// ...
|
|
2258
|
-
});
|
|
2259
|
-
|
|
2260
|
-
const room = client.createRoom("my-new-room", {
|
|
2261
|
-
addons: [
|
|
2262
|
-
// Define your addons in an array like so
|
|
2263
|
-
addonIndexedDB(),
|
|
2264
|
-
],
|
|
2265
|
-
});
|
|
2266
|
-
```
|
|
2267
|
-
|
|
2268
|
-
Or when using `@pluv/react`:
|
|
2269
|
-
|
|
2270
|
-
```ts
|
|
2271
|
-
const PluvRoom = createRoomBundle({
|
|
2272
|
-
// ...
|
|
2273
|
-
addons: [
|
|
2274
|
-
// Define your addons in an array like so
|
|
2275
|
-
addonIndexedDB(),
|
|
2276
|
-
],
|
|
2277
|
-
});
|
|
2278
|
-
```
|
|
2279
|
-
|
|
2280
|
-
### Patch Changes
|
|
2281
|
-
|
|
2282
|
-
- 8d11672: bumped dependencies to latest
|
|
2283
|
-
- Updated dependencies [8d11672]
|
|
2284
|
-
- Updated dependencies [829d31b]
|
|
2285
|
-
- @pluv/client@0.9.0
|
|
2286
|
-
- @pluv/types@0.2.1
|
|
2287
|
-
|
|
2288
|
-
## 0.5.11
|
|
2289
|
-
|
|
2290
|
-
### Patch Changes
|
|
2291
|
-
|
|
2292
|
-
- 2c9c5c3: changed my-presence to be non-nullable
|
|
2293
|
-
- Updated dependencies [2c9c5c3]
|
|
2294
|
-
- @pluv/client@0.8.1
|
|
2295
|
-
|
|
2296
|
-
## 0.5.10
|
|
2297
|
-
|
|
2298
|
-
### Patch Changes
|
|
2299
|
-
|
|
2300
|
-
- 5bbfb98: fix not properly handling unauthorized checks
|
|
2301
|
-
- b85a232: bumped dependencies
|
|
2302
|
-
- Updated dependencies [5bbfb98]
|
|
2303
|
-
- Updated dependencies [b85a232]
|
|
2304
|
-
- Updated dependencies [fde89cf]
|
|
2305
|
-
- @pluv/client@0.8.0
|
|
2306
|
-
- @pluv/types@0.2.0
|
|
2307
|
-
|
|
2308
|
-
## 0.5.9
|
|
2309
|
-
|
|
2310
|
-
### Patch Changes
|
|
2311
|
-
|
|
2312
|
-
- 3518a83: bumped dependencies
|
|
2313
|
-
- Updated dependencies [0dd847e]
|
|
2314
|
-
- Updated dependencies [bb2886b]
|
|
2315
|
-
- Updated dependencies [ae679a8]
|
|
2316
|
-
- Updated dependencies [bb2886b]
|
|
2317
|
-
- Updated dependencies [3518a83]
|
|
2318
|
-
- @pluv/client@0.7.0
|
|
2319
|
-
- @pluv/types@0.2.0
|
|
2320
|
-
|
|
2321
|
-
## 0.5.8
|
|
2322
|
-
|
|
2323
|
-
### Patch Changes
|
|
2324
|
-
|
|
2325
|
-
- 7ad4967: fixed user's presence not updating locally while offline
|
|
2326
|
-
- Updated dependencies [7ad4967]
|
|
2327
|
-
- Updated dependencies [4535687]
|
|
2328
|
-
- @pluv/client@0.6.5
|
|
2329
|
-
- @pluv/types@0.1.6
|
|
2330
|
-
|
|
2331
|
-
## 0.5.7
|
|
2332
|
-
|
|
2333
|
-
### Patch Changes
|
|
2334
|
-
|
|
2335
|
-
- 78fd644: updated readmes with links to the documentation website
|
|
2336
|
-
- Updated dependencies [78fd644]
|
|
2337
|
-
- @pluv/client@0.6.4
|
|
2338
|
-
|
|
2339
|
-
## 0.5.6
|
|
2340
|
-
|
|
2341
|
-
### Patch Changes
|
|
2342
|
-
|
|
2343
|
-
- 850626e: bumped dependencies
|
|
2344
|
-
- Updated dependencies [850626e]
|
|
2345
|
-
- @pluv/client@0.6.3
|
|
2346
|
-
- @pluv/types@0.1.6
|
|
2347
|
-
|
|
2348
|
-
## 0.5.5
|
|
2349
|
-
|
|
2350
|
-
### Patch Changes
|
|
2351
|
-
|
|
2352
|
-
- 9ae251d: bumped dependencies
|
|
2353
|
-
- Updated dependencies [9ae251d]
|
|
2354
|
-
- @pluv/client@0.6.2
|
|
2355
|
-
|
|
2356
|
-
## 0.5.4
|
|
2357
|
-
|
|
2358
|
-
### Patch Changes
|
|
2359
|
-
|
|
2360
|
-
- 19433af: updated MockedRoomProvider events to allow partial events
|
|
2361
|
-
- b80c555: updated react hooks to not re-render if state is deeply equal by default
|
|
2362
|
-
- 74870ee: bumped dependencies
|
|
2363
|
-
- Updated dependencies [19433af]
|
|
2364
|
-
- Updated dependencies [74870ee]
|
|
2365
|
-
- @pluv/client@0.6.1
|
|
2366
|
-
- @pluv/types@0.1.5
|
|
2367
|
-
|
|
2368
|
-
## 0.5.3
|
|
2369
|
-
|
|
2370
|
-
### Patch Changes
|
|
2371
|
-
|
|
2372
|
-
- 57ae13f: bumped dependencies
|
|
2373
|
-
- @pluv/client@0.6.0
|
|
2374
|
-
- @pluv/types@0.1.4
|
|
2375
|
-
|
|
2376
|
-
## 0.5.2
|
|
2377
|
-
|
|
2378
|
-
### Patch Changes
|
|
2379
|
-
|
|
2380
|
-
- 9516a4e: updated typescript to 5.0
|
|
2381
|
-
- 7b6da1c: bumped dependencies
|
|
2382
|
-
- e9c1514: bumped dependencies
|
|
2383
|
-
- 9d1829c: chore: bumped dependencies
|
|
2384
|
-
- Updated dependencies [e1308e3]
|
|
2385
|
-
- Updated dependencies [9516a4e]
|
|
2386
|
-
- Updated dependencies [e1308e3]
|
|
2387
|
-
- Updated dependencies [7b6da1c]
|
|
2388
|
-
- Updated dependencies [e9c1514]
|
|
2389
|
-
- Updated dependencies [9d1829c]
|
|
2390
|
-
- @pluv/client@0.6.0
|
|
2391
|
-
- @pluv/types@0.1.4
|
|
2392
|
-
|
|
2393
|
-
## 0.5.1
|
|
2394
|
-
|
|
2395
|
-
### Patch Changes
|
|
2396
|
-
|
|
2397
|
-
- 161e00e: fixed links to other pluv packages in readmes
|
|
2398
|
-
- f6c0e65: bumped dependencies
|
|
2399
|
-
- Updated dependencies [161e00e]
|
|
2400
|
-
- Updated dependencies [f6c0e65]
|
|
2401
|
-
- @pluv/client@0.5.1
|
|
2402
|
-
- @pluv/types@0.1.3
|
|
2403
|
-
|
|
2404
|
-
## 0.5.0
|
|
2405
|
-
|
|
2406
|
-
### Minor Changes
|
|
2407
|
-
|
|
2408
|
-
- 327a6ef: renamed y.unstable\_\_object to y.object
|
|
2409
|
-
|
|
2410
|
-
### Patch Changes
|
|
2411
|
-
|
|
2412
|
-
- 78a6119: Fixed MockedRoom not sending storage updates
|
|
2413
|
-
- 8bf62cb: bumped dependencies
|
|
2414
|
-
- 7e52685: Bumped dependencies
|
|
2415
|
-
- b1cb325: Updated dependencies
|
|
2416
|
-
- b4e34bc: chore(deps): update dependency @types/react to v18.0.28
|
|
2417
|
-
- ec50c73: fix: fixed mocked room not working
|
|
2418
|
-
- 8e97fb2: Updated dependencies
|
|
2419
|
-
- Updated dependencies [78a6119]
|
|
2420
|
-
- Updated dependencies [8bf62cb]
|
|
2421
|
-
- Updated dependencies [7e52685]
|
|
2422
|
-
- Updated dependencies [b1cb325]
|
|
2423
|
-
- Updated dependencies [327a6ef]
|
|
2424
|
-
- Updated dependencies [8e97fb2]
|
|
2425
|
-
- @pluv/client@0.5.0
|
|
2426
|
-
- @pluv/types@0.1.3
|
|
2427
|
-
|
|
2428
|
-
## 0.4.0
|
|
2429
|
-
|
|
2430
|
-
### Minor Changes
|
|
2431
|
-
|
|
2432
|
-
- 043c915: Added MockedDataProvider from createRoomBundle
|
|
2433
|
-
|
|
2434
|
-
### Patch Changes
|
|
2435
|
-
|
|
2436
|
-
- 93f8c54: chore(deps): update dependency @types/react to v18.0.27
|
|
2437
|
-
- Updated dependencies [595e66f]
|
|
2438
|
-
- @pluv/client@0.4.0
|
|
2439
|
-
|
|
2440
|
-
## 0.3.0
|
|
2441
|
-
|
|
2442
|
-
### Minor Changes
|
|
2443
|
-
|
|
2444
|
-
- 043c915: Added MockedDataProvider from createRoomBundle
|
|
2445
|
-
|
|
2446
|
-
### Patch Changes
|
|
2447
|
-
|
|
2448
|
-
- 93f8c54: chore(deps): update dependency @types/react to v18.0.27
|
|
2449
|
-
- Updated dependencies [595e66f]
|
|
2450
|
-
- @pluv/client@0.3.0
|
|
2451
|
-
|
|
2452
|
-
## 0.2.0
|
|
2453
|
-
|
|
2454
|
-
### Minor Changes
|
|
2455
|
-
|
|
2456
|
-
- 95b5ef8: breaking: update PluvRoom.broadcast api
|
|
2457
|
-
|
|
2458
|
-
### Patch Changes
|
|
2459
|
-
|
|
2460
|
-
- Updated dependencies [95b5ef8]
|
|
2461
|
-
- @pluv/client@0.2.0
|
|
2462
|
-
- @pluv/types@0.1.2
|
|
2463
|
-
|
|
2464
|
-
## 0.1.3
|
|
2465
|
-
|
|
2466
|
-
### Patch Changes
|
|
2467
|
-
|
|
2468
|
-
- fe80d7b: added preview disclaimer about breaking changes in the readme
|
|
2469
|
-
- Updated dependencies [fe80d7b]
|
|
2470
|
-
- @pluv/client@0.1.3
|
|
2471
|
-
- @pluv/types@0.1.2
|
|
2472
|
-
|
|
2473
|
-
## 0.1.2
|
|
2474
|
-
|
|
2475
|
-
### Patch Changes
|
|
2476
|
-
|
|
2477
|
-
- @pluv/client@0.1.2
|
|
2478
|
-
|
|
2479
|
-
## 0.1.1
|
|
2480
|
-
|
|
2481
|
-
### Patch Changes
|
|
2482
|
-
|
|
2483
|
-
- 24016e6: Updated dependencies
|
|
2484
|
-
- Updated dependencies [23a7382]
|
|
2485
|
-
- Updated dependencies [24016e6]
|
|
2486
|
-
- @pluv/client@0.1.1
|
|
2487
|
-
- @pluv/types@0.1.1
|
|
2488
|
-
|
|
2489
|
-
## 0.1.0
|
|
2490
|
-
|
|
2491
|
-
### Minor Changes
|
|
2492
|
-
|
|
2493
|
-
- a22f525: Added documentation
|
|
2494
|
-
|
|
2495
|
-
### Patch Changes
|
|
2496
|
-
|
|
2497
|
-
- Updated dependencies [a22f525]
|
|
2498
|
-
- @pluv/client@0.1.0
|
|
2499
|
-
- @pluv/types@0.1.0
|