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