@pluv/react 0.0.0-experimental-20250527040415

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