@pluv/types 2.3.1 → 3.0.0

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @pluv/types@2.3.1 build /home/runner/work/pluv/pluv/packages/types
2
+ > @pluv/types@3.0.0 build /home/runner/work/pluv/pluv/packages/types
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,11 +8,11 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.mjs 330.00 B
12
- ESM ⚡️ Build success in 46ms
13
11
  CJS dist/index.js 1.37 KB
14
- CJS ⚡️ Build success in 45ms
12
+ CJS ⚡️ Build success in 37ms
13
+ ESM dist/index.mjs 330.00 B
14
+ ESM ⚡️ Build success in 38ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 1296ms
17
- DTS dist/index.d.mts 18.73 KB
18
- DTS dist/index.d.ts 18.73 KB
16
+ DTS ⚡️ Build success in 1256ms
17
+ DTS dist/index.d.mts 18.34 KB
18
+ DTS dist/index.d.ts 18.34 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @pluv/types
2
2
 
3
+ ## 3.0.0
4
+
3
5
  ## 2.3.1
4
6
 
5
7
  ## 2.3.0
package/dist/index.d.mts CHANGED
@@ -340,15 +340,10 @@ interface RoomEventListenerMap {
340
340
  interface RoomLike<TIO extends IOLike, TDoc extends any, TPresence extends Record<string, any> = {}, TStorage extends Record<string, CrdtType<any, any>> = {}, TEvents extends PluvRouterEventConfig = {}> {
341
341
  id: string;
342
342
  broadcast: BroadcastProxy<TIO, TEvents>;
343
- /**
344
- * @deprecated To be removed in v3. Use getStorageLoaded instead.
345
- */
346
- storageLoaded: boolean;
347
343
  addEventListener<TKind extends keyof RoomEventListenerMap>(kind: TKind, handler: RoomEventListenerMap[TKind]): () => void;
348
344
  canRedo(): boolean;
349
345
  canUndo(): boolean;
350
346
  getDoc(): CrdtDocLike<TDoc, TStorage>;
351
- event: EventProxy<TIO, TEvents>;
352
347
  getConnection(): WebSocketConnection;
353
348
  getMyPresence(): TPresence;
354
349
  getMyself(): Id<UserInfo<TIO, TPresence>> | null;
@@ -358,12 +353,7 @@ interface RoomLike<TIO extends IOLike, TDoc extends any, TPresence extends Recor
358
353
  getStorageJson(): InferCrdtJson<TStorage> | null;
359
354
  getStorageJson<TKey extends keyof TStorage>(type: TKey): InferCrdtJson<TStorage[TKey]> | null;
360
355
  getStorageLoaded: () => boolean;
361
- other(connectionId: string, callback: OtherSubscriptionCallback<TIO, TPresence>): () => void;
362
356
  redo(): void;
363
- storage: StorageProxy<TStorage>;
364
- storageRoot(fn: (value: {
365
- [P in keyof TStorage]: InferCrdtJson<TStorage[P]>;
366
- }) => void): () => void;
367
357
  subscribe: SubscribeProxy<TIO, TPresence, TStorage, TEvents>;
368
358
  transact(fn: (storage: TStorage) => void, origin?: string): void;
369
359
  undo(): void;
package/dist/index.d.ts CHANGED
@@ -340,15 +340,10 @@ interface RoomEventListenerMap {
340
340
  interface RoomLike<TIO extends IOLike, TDoc extends any, TPresence extends Record<string, any> = {}, TStorage extends Record<string, CrdtType<any, any>> = {}, TEvents extends PluvRouterEventConfig = {}> {
341
341
  id: string;
342
342
  broadcast: BroadcastProxy<TIO, TEvents>;
343
- /**
344
- * @deprecated To be removed in v3. Use getStorageLoaded instead.
345
- */
346
- storageLoaded: boolean;
347
343
  addEventListener<TKind extends keyof RoomEventListenerMap>(kind: TKind, handler: RoomEventListenerMap[TKind]): () => void;
348
344
  canRedo(): boolean;
349
345
  canUndo(): boolean;
350
346
  getDoc(): CrdtDocLike<TDoc, TStorage>;
351
- event: EventProxy<TIO, TEvents>;
352
347
  getConnection(): WebSocketConnection;
353
348
  getMyPresence(): TPresence;
354
349
  getMyself(): Id<UserInfo<TIO, TPresence>> | null;
@@ -358,12 +353,7 @@ interface RoomLike<TIO extends IOLike, TDoc extends any, TPresence extends Recor
358
353
  getStorageJson(): InferCrdtJson<TStorage> | null;
359
354
  getStorageJson<TKey extends keyof TStorage>(type: TKey): InferCrdtJson<TStorage[TKey]> | null;
360
355
  getStorageLoaded: () => boolean;
361
- other(connectionId: string, callback: OtherSubscriptionCallback<TIO, TPresence>): () => void;
362
356
  redo(): void;
363
- storage: StorageProxy<TStorage>;
364
- storageRoot(fn: (value: {
365
- [P in keyof TStorage]: InferCrdtJson<TStorage[P]>;
366
- }) => void): () => void;
367
357
  subscribe: SubscribeProxy<TIO, TPresence, TStorage, TEvents>;
368
358
  transact(fn: (storage: TStorage) => void, origin?: string): void;
369
359
  undo(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/types",
3
- "version": "2.3.1",
3
+ "version": "3.0.0",
4
4
  "description": "@pluv/io shared types",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -19,8 +19,8 @@
19
19
  "eslint": "^9.27.0",
20
20
  "tsup": "^8.5.0",
21
21
  "typescript": "^5.8.3",
22
- "@pluv/tsconfig": "^2.3.1",
23
- "eslint-config-pluv": "^2.3.1"
22
+ "@pluv/tsconfig": "^3.0.0",
23
+ "eslint-config-pluv": "^3.0.0"
24
24
  },
25
25
  "dependencies": {
26
26
  "wonka": "^6.3.5"
package/src/pluv/room.ts CHANGED
@@ -197,10 +197,6 @@ export interface RoomLike<
197
197
  > {
198
198
  id: string;
199
199
  broadcast: BroadcastProxy<TIO, TEvents>;
200
- /**
201
- * @deprecated To be removed in v3. Use getStorageLoaded instead.
202
- */
203
- storageLoaded: boolean;
204
200
 
205
201
  addEventListener<TKind extends keyof RoomEventListenerMap>(
206
202
  kind: TKind,
@@ -213,8 +209,6 @@ export interface RoomLike<
213
209
 
214
210
  getDoc(): CrdtDocLike<TDoc, TStorage>;
215
211
 
216
- event: EventProxy<TIO, TEvents>;
217
-
218
212
  getConnection(): WebSocketConnection;
219
213
 
220
214
  getMyPresence(): TPresence;
@@ -232,18 +226,8 @@ export interface RoomLike<
232
226
 
233
227
  getStorageLoaded: () => boolean;
234
228
 
235
- other(connectionId: string, callback: OtherSubscriptionCallback<TIO, TPresence>): () => void;
236
-
237
229
  redo(): void;
238
230
 
239
- storage: StorageProxy<TStorage>;
240
-
241
- storageRoot(
242
- fn: (value: {
243
- [P in keyof TStorage]: InferCrdtJson<TStorage[P]>;
244
- }) => void,
245
- ): () => void;
246
-
247
231
  subscribe: SubscribeProxy<TIO, TPresence, TStorage, TEvents>;
248
232
 
249
233
  transact(fn: (storage: TStorage) => void, origin?: string): void;