@pluv/client 0.11.1 → 0.12.1

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.
@@ -17,7 +17,7 @@ export type UsersManagerConfig<TPresence extends JsonObject = {}> = {
17
17
 
18
18
  export class UsersManager<
19
19
  TIO extends IOLike,
20
- TPresence extends JsonObject = {}
20
+ TPresence extends JsonObject = {},
21
21
  > {
22
22
  private _initialPresence: TPresence;
23
23
  /**
@@ -62,7 +62,7 @@ export class UsersManager<
62
62
 
63
63
  public patchPresence(
64
64
  connectionId: string,
65
- patch: Partial<TPresence>
65
+ patch: Partial<TPresence>,
66
66
  ): void {
67
67
  if (this._myself?.connectionId === connectionId) {
68
68
  const presence = {
@@ -100,7 +100,7 @@ export class UsersManager<
100
100
 
101
101
  public setMyself(
102
102
  connectionId: string,
103
- user: Id<InferIOAuthorizeUser<InferIOAuthorize<TIO>>>
103
+ user: Id<InferIOAuthorizeUser<InferIOAuthorize<TIO>>>,
104
104
  ): void {
105
105
  this._myself = {
106
106
  connectionId,
@@ -129,7 +129,7 @@ export class UsersManager<
129
129
  public setUser(
130
130
  connectionId: string,
131
131
  user: Id<InferIOAuthorizeUser<InferIOAuthorize<TIO>>>,
132
- presence?: TPresence
132
+ presence?: TPresence,
133
133
  ): void {
134
134
  if (this._myself?.connectionId === connectionId) return;
135
135
 
@@ -3,7 +3,7 @@ import type { PluvClientOptions } from "./PluvClient";
3
3
  import { PluvClient } from "./PluvClient";
4
4
 
5
5
  export const createClient = <TIO extends IOLike = IOLike>(
6
- options: PluvClientOptions<TIO>
6
+ options: PluvClientOptions<TIO>,
7
7
  ): PluvClient<TIO> => {
8
8
  return new PluvClient<TIO>(options);
9
9
  };
package/src/index.ts CHANGED
@@ -1,4 +1,7 @@
1
- export type { InferYjsSharedTypeJson } from "@pluv/crdt-yjs";
1
+ export type {
2
+ InferYjsSharedTypeJson,
3
+ TrackOriginOptions,
4
+ } from "@pluv/crdt-yjs";
2
5
  export type {
3
6
  BaseUser,
4
7
  EventMessage,
package/src/types.ts CHANGED
@@ -37,7 +37,7 @@ export interface WebSocketState<TIO extends IOLike> {
37
37
 
38
38
  export interface UserInfo<
39
39
  TIO extends IOLike,
40
- TPresence extends JsonObject = {}
40
+ TPresence extends JsonObject = {},
41
41
  > {
42
42
  connectionId: string;
43
43
  presence: TPresence;