@pluv/types 0.0.0-canary-20261026091827
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/LICENSE +21 -0
- package/dist/index.d.mts +567 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +17 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +44 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Shoubhit Dash
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
import { StandardSchemaV1, StandardSchemaV1 as StandardSchemaV1$1 } from "@standard-schema/spec";
|
|
2
|
+
import { Subject } from "wonka";
|
|
3
|
+
type Constructable = {
|
|
4
|
+
new (...args: any[]): any;
|
|
5
|
+
};
|
|
6
|
+
type HasRequiredProperty<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? never : K; }[keyof T] extends never ? false : true;
|
|
7
|
+
type Maybe<T> = T | Nil;
|
|
8
|
+
type MaybePromise<T> = Promise<T> | T;
|
|
9
|
+
type MaybeReadonlyArray<T> = T[] | readonly T[];
|
|
10
|
+
type Nil = null | undefined;
|
|
11
|
+
type OptionalPropertyNames<T> = { [K in keyof T]-?: {} extends { [P in K]: T[K]; } ? K : never; }[keyof T];
|
|
12
|
+
type SpreadProperties<L, R, K extends keyof L & keyof R> = { [P in K]: L[P] | Exclude<R[P], undefined>; };
|
|
13
|
+
type Id<T> = T extends Nil ? T : T extends (infer U) ? U extends Constructable ? U : { [K in keyof U]: U[K]; } : never;
|
|
14
|
+
type SpreadTwo<L, R> = Id<Pick<L, Exclude<keyof L, keyof R>> & Pick<R, Exclude<keyof R, OptionalPropertyNames<R>>> & Pick<R, Exclude<OptionalPropertyNames<R>, keyof L>> & SpreadProperties<L, R, OptionalPropertyNames<R> & keyof L>>;
|
|
15
|
+
type Spread<A extends readonly [...any]> = A extends [infer L, ...infer R] ? SpreadTwo<L, Spread<R>> : unknown;
|
|
16
|
+
type DeepPartial<T> = { [P in keyof T]?: T[P] extends Array<infer U> ? Array<DeepPartial<U>> : T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : DeepPartial<T[P]>; };
|
|
17
|
+
type DeepReadonly<T> = T extends ((...args: any[]) => any) ? T : T extends Array<infer U> ? ReadonlyArray<DeepReadonly<U>> : T extends object ? { readonly [P in keyof T]: DeepReadonly<T[P]>; } : T;
|
|
18
|
+
type DeepWriteable<T> = { -readonly [P in keyof T]: DeepWriteable<T[P]>; };
|
|
19
|
+
type UndefinedProps<T extends Record<string, any>, K extends keyof T = keyof T> = Id<{ [P in K]?: undefined; } & { [P in Exclude<keyof T, K>]: T[P]; }>;
|
|
20
|
+
type OptionalProps<T extends Record<string, any>, K extends keyof T = keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
21
|
+
type NonNilProps<T extends Record<string, any>, K extends keyof T = keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]>; };
|
|
22
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
23
|
+
type Json = JsonPrimitive | Json[] | readonly Json[] | {
|
|
24
|
+
[key: string]: Json;
|
|
25
|
+
};
|
|
26
|
+
type JsonObject = Record<string, Json>;
|
|
27
|
+
type SetKey<T, K extends keyof T, V> = Omit<T, K> & { [P in K]: V; };
|
|
28
|
+
type UnionToIntersection<U> = (U extends any ? (arg: U) => any : never) extends ((arg: infer I) => void) ? I : never;
|
|
29
|
+
/** `true` when `T` is `any`. `any` is the only type for which `1 & T` stays `any`. */
|
|
30
|
+
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
31
|
+
type AreAllOptional<T> = [T] extends [{}] ? keyof T extends never ? true : HasRequiredProperty<T> extends true ? false : true : false;
|
|
32
|
+
interface CrdtDocFactory<TDoc extends any = any, TStorage extends Record<string, any> = Record<string, any>, TJson extends Record<string, any> = any, TSeed extends Record<string, any> = any> {
|
|
33
|
+
getEmpty(): CrdtDocLike<TDoc, TStorage, TJson>;
|
|
34
|
+
getFactory(seed?: TSeed): CrdtDocFactory<TDoc, TStorage, TJson, TSeed>;
|
|
35
|
+
getInitialized(seed?: TSeed): CrdtDocLike<TDoc, TStorage, TJson>;
|
|
36
|
+
isEmpty(initialStorage: Maybe<string>): boolean;
|
|
37
|
+
}
|
|
38
|
+
type CrdtLibraryKind = "loro" | "noop" | "yjs";
|
|
39
|
+
interface CrdtLibraryType<TDoc extends CrdtDocFactory<any, any, any, any> = CrdtDocFactory<any, any>> {
|
|
40
|
+
doc: (value?: any) => TDoc;
|
|
41
|
+
kind: CrdtLibraryKind;
|
|
42
|
+
}
|
|
43
|
+
/** True when `TCrdt` is a real CRDT library (`yjs` / `loro`), not the noop default. */
|
|
44
|
+
type HasCrdtLibrary<TCrdt> = [TCrdt] extends [never] ? false : IsAny<TCrdt> extends true ? false : [TCrdt] extends [{
|
|
45
|
+
kind: "loro" | "yjs";
|
|
46
|
+
}] ? true : false;
|
|
47
|
+
/** True when `TStorage` is a real doc schema/factory (`y.doc` / `loro.doc`), not the noop default. */
|
|
48
|
+
type HasStorage<TStorage> = [TStorage] extends [never] ? false : [TStorage] extends [undefined] ? false : IsAny<TStorage> extends true ? false : [TStorage] extends [{
|
|
49
|
+
kind: "loro.doc" | "y.doc";
|
|
50
|
+
getEmpty: (...args: any[]) => any;
|
|
51
|
+
}] ? true : false;
|
|
52
|
+
interface DocApplyEncodedStateParams {
|
|
53
|
+
origin?: string;
|
|
54
|
+
update?: Maybe<string | Uint8Array>;
|
|
55
|
+
}
|
|
56
|
+
interface DocBatchApplyEncodedStateParams {
|
|
57
|
+
origin?: string;
|
|
58
|
+
updates?: Maybe<readonly Maybe<string | Uint8Array>[]>;
|
|
59
|
+
}
|
|
60
|
+
interface DocSubscribeCallbackParams<TDoc extends any = any, TStorage extends Record<string, any> = Record<string, any>, TJson extends Record<string, any> = any> {
|
|
61
|
+
doc: CrdtDocLike<TDoc, TStorage, TJson>;
|
|
62
|
+
local: boolean;
|
|
63
|
+
origin?: string | null;
|
|
64
|
+
update: string;
|
|
65
|
+
}
|
|
66
|
+
interface CrdtDocLike<TDoc extends any = any, TStorage extends Record<string, any> = Record<string, any>, TJson extends Record<string, any> = any> {
|
|
67
|
+
value: TDoc;
|
|
68
|
+
applyEncodedState(params: DocApplyEncodedStateParams): this;
|
|
69
|
+
batchApplyEncodedState(params: DocBatchApplyEncodedStateParams): this;
|
|
70
|
+
canRedo(): boolean;
|
|
71
|
+
canUndo(): boolean;
|
|
72
|
+
destroy(): void;
|
|
73
|
+
get(key?: undefined): TStorage;
|
|
74
|
+
get<TKey extends keyof TStorage>(key: TKey): TStorage[TKey];
|
|
75
|
+
/**
|
|
76
|
+
* @description Run `fn` and return only the changes it made. Returns `null` when `fn`
|
|
77
|
+
* does not change the document.
|
|
78
|
+
*/
|
|
79
|
+
captureUpdate(fn: () => void): string | null;
|
|
80
|
+
/**
|
|
81
|
+
* @description The changes this document has that another copy is missing.
|
|
82
|
+
* `stateVector` is that copy's `getStateVector()` result. An empty string means the
|
|
83
|
+
* other copy has nothing, so this returns every change.
|
|
84
|
+
*/
|
|
85
|
+
encodeDiff(stateVector: string): string;
|
|
86
|
+
getEncodedState(): string;
|
|
87
|
+
/**
|
|
88
|
+
* @description Gets which changes this document already contains. Another copy passes
|
|
89
|
+
* the result to `encodeDiff` to learn what it is missing.
|
|
90
|
+
*/
|
|
91
|
+
getStateVector(): string;
|
|
92
|
+
/**
|
|
93
|
+
* @description Clocks in a `getStateVector()` value. Each clock is the next
|
|
94
|
+
* change that client would write.
|
|
95
|
+
*/
|
|
96
|
+
readStateVersion(encoded: string): readonly (readonly [string, number])[];
|
|
97
|
+
/**
|
|
98
|
+
* @description Clocks carried by an update. Computed once, when those bytes arrive.
|
|
99
|
+
*/
|
|
100
|
+
readUpdateVersion(update: string): readonly (readonly [string, number])[];
|
|
101
|
+
/**
|
|
102
|
+
* @description Whether this document already contains `update`, including deletes.
|
|
103
|
+
* The clocks already say it is covered.
|
|
104
|
+
*/
|
|
105
|
+
containsUpdate(update: string): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* @description Whether a received change is waiting because an earlier change has not
|
|
108
|
+
* arrived yet.
|
|
109
|
+
*/
|
|
110
|
+
hasPending(): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* @description Whether `hasPending()` can tell that a change is waiting. When this is
|
|
113
|
+
* false, ask for the whole document instead of a diff.
|
|
114
|
+
*/
|
|
115
|
+
canDetectPending(): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* @description Whether the document has ever received an operation. Not the inverse of
|
|
118
|
+
* `isEmpty()`: a document whose content was deleted is still dirty.
|
|
119
|
+
*/
|
|
120
|
+
isDirty(): boolean;
|
|
121
|
+
isEmpty(): boolean;
|
|
122
|
+
rebuildStorage(reference?: TStorage): this;
|
|
123
|
+
redo(): this;
|
|
124
|
+
subscribe(listener: (params: DocSubscribeCallbackParams<TDoc, TStorage, TJson>) => void): () => void;
|
|
125
|
+
toJson(): TJson;
|
|
126
|
+
toJson<TKey extends keyof TJson>(type: TKey): TJson[TKey];
|
|
127
|
+
track(): this;
|
|
128
|
+
transact(fn: () => void, origin?: string): this;
|
|
129
|
+
undo(): this;
|
|
130
|
+
}
|
|
131
|
+
type BaseUser = {
|
|
132
|
+
id: string;
|
|
133
|
+
};
|
|
134
|
+
type ParticipantRef = {
|
|
135
|
+
kind: ParticipantKind;
|
|
136
|
+
operator: OperatorUser | null;
|
|
137
|
+
};
|
|
138
|
+
type ParticipantRecord<TUser extends BaseUser> = ParticipantRef & {
|
|
139
|
+
data: Id<TUser>;
|
|
140
|
+
};
|
|
141
|
+
type PresenceSeq = {
|
|
142
|
+
presence: number | null;
|
|
143
|
+
};
|
|
144
|
+
interface SessionPresence<TPresence extends JsonObject | null = JsonObject | null> extends ParticipantRef {
|
|
145
|
+
presence: TPresence;
|
|
146
|
+
seq: PresenceSeq;
|
|
147
|
+
}
|
|
148
|
+
type KindStats = {
|
|
149
|
+
connectionCount: number;
|
|
150
|
+
userCount: number;
|
|
151
|
+
};
|
|
152
|
+
type RoomStatsByKind = { [Kind in ParticipantKind]: KindStats; };
|
|
153
|
+
type ListUsersCursor = {
|
|
154
|
+
kind: ParticipantKind;
|
|
155
|
+
id: string;
|
|
156
|
+
};
|
|
157
|
+
type RoomError = {
|
|
158
|
+
message: string;
|
|
159
|
+
stack?: string | null;
|
|
160
|
+
};
|
|
161
|
+
interface BaseClientEventRecord {
|
|
162
|
+
$getOthers: {};
|
|
163
|
+
$initializeSession: {
|
|
164
|
+
presence: JsonObject | null;
|
|
165
|
+
stateVector?: string | null;
|
|
166
|
+
update: string | null;
|
|
167
|
+
};
|
|
168
|
+
$listUsers: {
|
|
169
|
+
cursor?: ListUsersCursor | null;
|
|
170
|
+
kinds?: readonly ParticipantKind[];
|
|
171
|
+
limit?: number;
|
|
172
|
+
requestId: string;
|
|
173
|
+
};
|
|
174
|
+
$ping: {};
|
|
175
|
+
$updatePresence: {
|
|
176
|
+
presence: JsonObject | null;
|
|
177
|
+
procedure?: string | null;
|
|
178
|
+
};
|
|
179
|
+
$syncStorage: {
|
|
180
|
+
/**
|
|
181
|
+
* @description This client's `getStateVector()`. An empty string asks for the whole
|
|
182
|
+
* document.
|
|
183
|
+
*/
|
|
184
|
+
stateVector: string;
|
|
185
|
+
};
|
|
186
|
+
$updateStorage: {
|
|
187
|
+
origin: string | null;
|
|
188
|
+
/**
|
|
189
|
+
* @description This update is the reply to `$storageResync`. The server does not ask
|
|
190
|
+
* again when the reply leaves the document unchanged.
|
|
191
|
+
*/
|
|
192
|
+
resync?: boolean | null;
|
|
193
|
+
update: string | null;
|
|
194
|
+
procedure?: string | null;
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
type BaseClientMessage = InferEventMessage<BaseClientEventRecord>;
|
|
198
|
+
type BaseIOEventRecord<TAuthorize extends IOAuthorize<any>> = {
|
|
199
|
+
$error: RoomError;
|
|
200
|
+
$exit: {
|
|
201
|
+
sessionId: string;
|
|
202
|
+
user: Id<InferIOAuthorizeUser<TAuthorize>>;
|
|
203
|
+
operator: OperatorUser | null;
|
|
204
|
+
};
|
|
205
|
+
$othersReceived: {
|
|
206
|
+
myConnectionIds: string[];
|
|
207
|
+
others: {
|
|
208
|
+
connectionIds: string[];
|
|
209
|
+
data: Id<InferIOAuthorizeUser<TAuthorize>>;
|
|
210
|
+
session: SessionPresence<JsonObject | null>;
|
|
211
|
+
}[];
|
|
212
|
+
};
|
|
213
|
+
$pong: {};
|
|
214
|
+
$roomStats: RoomStatsByKind;
|
|
215
|
+
$presenceUpdated: {
|
|
216
|
+
user: Id<InferIOAuthorizeUser<TAuthorize>>;
|
|
217
|
+
session: SessionPresence<JsonObject>;
|
|
218
|
+
};
|
|
219
|
+
$registered: {
|
|
220
|
+
sessionId: string;
|
|
221
|
+
state: string | null;
|
|
222
|
+
stats: RoomStatsByKind;
|
|
223
|
+
session: SessionPresence<JsonObject | null>;
|
|
224
|
+
};
|
|
225
|
+
$storageReceived: {
|
|
226
|
+
changeKind: "empty" | "initialized" | "unchanged";
|
|
227
|
+
state: string;
|
|
228
|
+
};
|
|
229
|
+
$storageDiff: {
|
|
230
|
+
update: string;
|
|
231
|
+
};
|
|
232
|
+
$storageResync: {
|
|
233
|
+
/**
|
|
234
|
+
* @description The server's `getStateVector()`. The caller who sent the update replies
|
|
235
|
+
* with `encodeDiff` of this, because the server could not integrate that update.
|
|
236
|
+
*/
|
|
237
|
+
stateVector: string;
|
|
238
|
+
};
|
|
239
|
+
$storageUpdated: {
|
|
240
|
+
/**
|
|
241
|
+
* @description Bytes to merge into the local document. The changes the server integrated.
|
|
242
|
+
*/
|
|
243
|
+
state: string;
|
|
244
|
+
};
|
|
245
|
+
$syncStateReceived: {
|
|
246
|
+
connectionIds: readonly string[];
|
|
247
|
+
};
|
|
248
|
+
$userJoined: {
|
|
249
|
+
connectionId: string;
|
|
250
|
+
user: Id<InferIOAuthorizeUser<TAuthorize>>;
|
|
251
|
+
session: SessionPresence<JsonObject>;
|
|
252
|
+
};
|
|
253
|
+
$usersPage: {
|
|
254
|
+
requestId: string;
|
|
255
|
+
success: true;
|
|
256
|
+
pageInfo: {
|
|
257
|
+
endCursor: ListUsersCursor | null;
|
|
258
|
+
hasNextPage: boolean;
|
|
259
|
+
};
|
|
260
|
+
users: ParticipantRecord<InferIOAuthorizeUser<TAuthorize>>[];
|
|
261
|
+
} | {
|
|
262
|
+
requestId: string;
|
|
263
|
+
success: false;
|
|
264
|
+
error: {
|
|
265
|
+
code: "FAILED" | "INVALID_LIMIT";
|
|
266
|
+
message: string;
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
interface EventMessage<TEvent extends string, TData extends JsonObject = {}> {
|
|
271
|
+
data: TData;
|
|
272
|
+
type: TEvent;
|
|
273
|
+
}
|
|
274
|
+
type EventRecord<TEvent extends string, TData extends JsonObject> = { [key in `${TEvent}`]: TData; };
|
|
275
|
+
type GetEventMessage<T extends EventRecord<string, any>, TEvent extends keyof T> = TEvent extends string ? EventMessage<TEvent, T[TEvent]> : never;
|
|
276
|
+
type InferStandardSchemaOutput<TSchema> = TSchema extends StandardSchemaV1$1<any, infer TOutput> ? TOutput : never;
|
|
277
|
+
type TreatyProcedureKind = "presence" | "storage";
|
|
278
|
+
type TreatyProcedureLike<TKind extends TreatyProcedureKind = TreatyProcedureKind, TInput extends Record<string, any> = Record<string, any>> = {
|
|
279
|
+
kind: TKind;
|
|
280
|
+
readonly prepared?: boolean;
|
|
281
|
+
config: {
|
|
282
|
+
input?: StandardSchemaV1$1<unknown, TInput> | null;
|
|
283
|
+
prepare?: ((data: never, ...args: any[]) => unknown) | null;
|
|
284
|
+
resolve?: ((data: never, ...args: any[]) => unknown) | null;
|
|
285
|
+
transact?: boolean | null;
|
|
286
|
+
};
|
|
287
|
+
apply: (data: unknown, context: any, prepared?: unknown) => unknown;
|
|
288
|
+
load?: (data: unknown, context: any) => Promise<{
|
|
289
|
+
input: unknown;
|
|
290
|
+
prepared: unknown;
|
|
291
|
+
}>;
|
|
292
|
+
};
|
|
293
|
+
type InferTreatyProcedureInput<TProcedure extends TreatyProcedureLike<any, any>> = TProcedure extends TreatyProcedureLike<any, infer TInput> ? Id<TInput> : never;
|
|
294
|
+
type InferTreatyPresenceProcedures<TTreaty extends TreatyLike | undefined> = TTreaty extends TreatyLike ? TTreaty["_defs"]["procedures"]["presence"] : {};
|
|
295
|
+
type InferTreatyStorageProcedures<TTreaty extends TreatyLike | undefined> = TTreaty extends TreatyLike ? TTreaty["_defs"]["procedures"]["storage"] : {};
|
|
296
|
+
type TreatyProcedureInputJson = {
|
|
297
|
+
input: unknown;
|
|
298
|
+
};
|
|
299
|
+
type TreatyProcedureInputsJson<TProcedures extends Record<string, TreatyProcedureLike>> = { [K in keyof TProcedures]: TreatyProcedureInputJson; };
|
|
300
|
+
type TreatyProceduresJson<TPresence extends Record<string, TreatyProcedureLike> = Record<string, TreatyProcedureLike<"presence">>, TStorage extends Record<string, TreatyProcedureLike> = Record<string, TreatyProcedureLike<"storage">>> = {
|
|
301
|
+
presence: TreatyProcedureInputsJson<TPresence>;
|
|
302
|
+
storage: TreatyProcedureInputsJson<TStorage>;
|
|
303
|
+
};
|
|
304
|
+
interface TreatyLike {
|
|
305
|
+
user: StandardSchemaV1$1<unknown, BaseUser>;
|
|
306
|
+
presence?: StandardSchemaV1$1<any, any> | undefined;
|
|
307
|
+
storage?: CrdtDocFactory<any, any, any, any> | undefined;
|
|
308
|
+
toUserJson(): unknown;
|
|
309
|
+
toPresenceJson(): unknown;
|
|
310
|
+
toStorageJson(): unknown;
|
|
311
|
+
toProceduresJson(): TreatyProceduresJson<this["_defs"]["procedures"]["presence"], this["_defs"]["procedures"]["storage"]>;
|
|
312
|
+
_defs: {
|
|
313
|
+
user: StandardSchemaV1$1<unknown, BaseUser>;
|
|
314
|
+
presence: StandardSchemaV1$1<any, any> | undefined;
|
|
315
|
+
storage: CrdtDocFactory<any, any, any, any> | undefined;
|
|
316
|
+
procedures: {
|
|
317
|
+
presence: Record<string, TreatyProcedureLike<"presence">>;
|
|
318
|
+
storage: Record<string, TreatyProcedureLike<"storage">>;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
type InferTreatyUser<TTreaty extends TreatyLike | undefined> = TTreaty extends TreatyLike ? InferIOAuthorizeUser<{
|
|
323
|
+
user: TTreaty["user"];
|
|
324
|
+
}> : BaseUser;
|
|
325
|
+
type InferTreatyPresence<TTreaty extends TreatyLike | undefined> = TTreaty extends TreatyLike ? InferStandardSchemaOutput<TTreaty["presence"]> : never;
|
|
326
|
+
type InferTreatyStorage<TTreaty extends TreatyLike | undefined> = TTreaty extends TreatyLike ? TTreaty["storage"] : undefined;
|
|
327
|
+
type InferIOAuthorize<TIO extends IOLike> = TIO extends IOLike<infer D> ? IsAny<D> extends true ? {
|
|
328
|
+
user: StandardSchemaV1$1<unknown, any>;
|
|
329
|
+
} : {
|
|
330
|
+
user: D["treaty"]["user"];
|
|
331
|
+
} : never;
|
|
332
|
+
type InferIOAuthorizeUser<TAuthorize> = IsAny<TAuthorize> extends true ? any : TAuthorize extends {
|
|
333
|
+
user: infer TUserSchema;
|
|
334
|
+
} ? InferStandardSchemaOutput<TUserSchema> extends (infer TUser extends BaseUser) ? TUser : BaseUser : never;
|
|
335
|
+
type IOAuthorize<TUser extends BaseUser = any> = {
|
|
336
|
+
secret?: string;
|
|
337
|
+
user: StandardSchemaV1$1<unknown, TUser>;
|
|
338
|
+
};
|
|
339
|
+
type IOAuthorizeEventMessage<TIO extends IOLike> = {
|
|
340
|
+
connectionId: string;
|
|
341
|
+
user: InferIOAuthorizeUser<InferIOAuthorize<TIO>>;
|
|
342
|
+
operator: OperatorUser | null;
|
|
343
|
+
};
|
|
344
|
+
type ProcedureLike<TInput extends Record<string, any> = {}, TOutput extends EventRecord<string, any> = {}> = {
|
|
345
|
+
config: {
|
|
346
|
+
broadcast?: ((data: TInput, ...args: any[]) => MaybePromise<Partial<TOutput> | void>) | null;
|
|
347
|
+
input?: StandardSchemaV1$1<unknown, TInput> | null;
|
|
348
|
+
self?: ((data: TInput, ...args: any[]) => MaybePromise<Partial<TOutput> | void>) | null;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
interface IORouterLike<TEvents extends Record<string, ProcedureLike<any, any>> = {}> {
|
|
352
|
+
_defs: {
|
|
353
|
+
events: TEvents;
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
type IOLikeDefs = {
|
|
357
|
+
treaty: TreatyLike;
|
|
358
|
+
events: Record<string, ProcedureLike<any, any>>;
|
|
359
|
+
};
|
|
360
|
+
interface IOLike<T extends IOLikeDefs = any> extends IORouterLike<T["events"]> {
|
|
361
|
+
_defs: T;
|
|
362
|
+
}
|
|
363
|
+
type InferIOCrdtKind<TIO extends IOLike> = InferIOStorage<TIO>;
|
|
364
|
+
type InferIOCrdt<TIO extends IOLike> = InferIOStorage<TIO>;
|
|
365
|
+
type InferIOStorage<TIO extends IOLike> = TIO extends IOLike<infer D> ? (IsAny<D> extends true ? any : D["treaty"]["storage"]) : never;
|
|
366
|
+
type InferIOTreaty<TIO extends IOLike> = TIO extends IOLike<infer D> ? (IsAny<D> extends true ? TreatyLike : D["treaty"]) : TreatyLike;
|
|
367
|
+
type InferIOEvents<TIO extends IOLike> = TIO extends IOLike<infer D> ? IsAny<D> extends true ? any : { [P in keyof D["events"]]: ProcedureLike<InferIOProcedureInput<D["events"][P]>, InferIOProcedureOutput<D["events"][P]>>; } : never;
|
|
368
|
+
type InferIOProcedureInput<TProcedure extends ProcedureLike<any, any>> = TProcedure extends ProcedureLike<infer IInput, any> ? Id<IInput> : never;
|
|
369
|
+
type InferIOProcedureOutput<TProcedure extends ProcedureLike<any, any>> = TProcedure extends ProcedureLike<any, infer IOutput> ? Id<IOutput> : never;
|
|
370
|
+
type InferEventsInput<TEvents extends Record<string, ProcedureLike<any, any>>> = { [P in keyof TEvents]: TEvents[P] extends ProcedureLike<infer IInput, any> ? Id<IInput> : never; };
|
|
371
|
+
type InferEventsOutput<TEvents extends Record<string, ProcedureLike<any, any>>> = UnionToIntersection<{ [P in keyof TEvents]: TEvents[P] extends ProcedureLike<any, infer IOutput> ? Id<IOutput> : never; }[keyof TEvents]>;
|
|
372
|
+
type InferIOInput<TRouter extends IORouterLike<any>> = TRouter extends IORouterLike<infer IEvents> ? InferEventsInput<IEvents> : never;
|
|
373
|
+
type InferIOOutput<TRouter extends IORouterLike<any>> = TRouter extends IORouterLike<infer IEvents> ? InferEventsOutput<IEvents> : never;
|
|
374
|
+
type InferEventMessage<TEvents = EventRecord<string, any>, TEvent extends keyof TEvents = keyof TEvents> = TEvents extends EventRecord<string, any> ? { [P in TEvent]: P extends string ? Id<EventMessage<P, TEvents[P]>> : never; }[TEvent] : never;
|
|
375
|
+
type ServerOriginEvent = "$error" | "$roomStats" | "$syncStateReceived";
|
|
376
|
+
type IOEventMessage<TIO extends IOLike, TEvent extends keyof InferIOOutput<TIO> = keyof InferIOOutput<TIO>> = Id<{
|
|
377
|
+
room: string;
|
|
378
|
+
} & InferEventMessage<InferIOOutput<TIO>, TEvent> & (InferEventMessage<InferIOOutput<TIO>, TEvent>["type"] extends ServerOriginEvent ? {
|
|
379
|
+
connectionId?: string | null;
|
|
380
|
+
user?: InferIOAuthorizeUser<InferIOAuthorize<TIO>> | null;
|
|
381
|
+
operator?: OperatorUser | null;
|
|
382
|
+
} : IOAuthorizeEventMessage<TIO>)>;
|
|
383
|
+
type ParticipantKind = "user" | "operator";
|
|
384
|
+
type OperatorUser = {
|
|
385
|
+
id: string;
|
|
386
|
+
name: string;
|
|
387
|
+
imageUrl: string | null;
|
|
388
|
+
};
|
|
389
|
+
type OnGetOperator<TUser extends BaseUser = BaseUser> = (params: {
|
|
390
|
+
operator: OperatorUser & {
|
|
391
|
+
email: string;
|
|
392
|
+
};
|
|
393
|
+
room: string;
|
|
394
|
+
}) => MaybePromise<TUser | null>;
|
|
395
|
+
type ParticipantKindOptions = {
|
|
396
|
+
kind?: ParticipantKind;
|
|
397
|
+
};
|
|
398
|
+
type ParticipantKindsOptions = {
|
|
399
|
+
kinds?: readonly ParticipantKind[];
|
|
400
|
+
};
|
|
401
|
+
export declare const ConnectionState: {
|
|
402
|
+
readonly Closed: "closed";
|
|
403
|
+
readonly Connecting: "connecting";
|
|
404
|
+
readonly Open: "open";
|
|
405
|
+
readonly Unavailable: "unavailable";
|
|
406
|
+
readonly Untouched: "untouched";
|
|
407
|
+
};
|
|
408
|
+
export type ConnectionState = (typeof ConnectionState)[keyof typeof ConnectionState];
|
|
409
|
+
export declare const StorageState: {
|
|
410
|
+
Loading: string;
|
|
411
|
+
Offline: string;
|
|
412
|
+
Synced: string;
|
|
413
|
+
Unavailable: string;
|
|
414
|
+
};
|
|
415
|
+
export type StorageState = (typeof StorageState)[keyof typeof StorageState];
|
|
416
|
+
interface AuthorizationState<TIO extends IOLike> {
|
|
417
|
+
token: string | null;
|
|
418
|
+
user: Id<InferIOAuthorizeUser<InferIOAuthorize<TIO>>> | null;
|
|
419
|
+
kind: ParticipantKind;
|
|
420
|
+
operator: OperatorUser | null;
|
|
421
|
+
}
|
|
422
|
+
type OtherSubscriptionCallback<TIO extends IOLike, TPresence extends Record<string, any>> = (value: Id<UserInfo<TIO, TPresence>> | null) => void;
|
|
423
|
+
type OtherSubscriptionFn<TIO extends IOLike, TPresence extends Record<string, any>> = (userId: string, callback: OtherSubscriptionCallback<TIO, TPresence>, options?: ParticipantKindOptions) => () => void;
|
|
424
|
+
type OthersSubscriptionEvent<TIO extends IOLike, TPresence extends Record<string, any>> = {
|
|
425
|
+
kind: "clear";
|
|
426
|
+
} | {
|
|
427
|
+
kind: "enter";
|
|
428
|
+
user: Id<UserInfo<TIO, TPresence>>;
|
|
429
|
+
} | {
|
|
430
|
+
kind: "leave";
|
|
431
|
+
user: Id<UserInfo<TIO, TPresence>>;
|
|
432
|
+
} | {
|
|
433
|
+
kind: "sync";
|
|
434
|
+
users: readonly Id<UserInfo<TIO, TPresence>>[];
|
|
435
|
+
} | {
|
|
436
|
+
kind: "update";
|
|
437
|
+
user: Id<UserInfo<TIO, TPresence>>;
|
|
438
|
+
};
|
|
439
|
+
type OthersSubscriptionCallback<TIO extends IOLike, TPresence extends Record<string, any>> = (value: readonly Id<UserInfo<TIO, TPresence>>[], event: OthersSubscriptionEvent<TIO, TPresence>) => void;
|
|
440
|
+
type OthersSubscriptionFn<TIO extends IOLike, TPresence extends Record<string, any>> = (callback: OthersSubscriptionCallback<TIO, TPresence>, options?: ParticipantKindsOptions) => () => void;
|
|
441
|
+
interface StateNotifierSubjects<TIO extends IOLike, TPresence extends Record<string, any>> {
|
|
442
|
+
connection: Subject<Id<WebSocketState<TIO>>>;
|
|
443
|
+
"my-presence": Subject<TPresence | null>;
|
|
444
|
+
myself: Subject<Readonly<Id<UserInfo<TIO, TPresence>>> | null>;
|
|
445
|
+
others: Subject<readonly Id<UserInfo<TIO, TPresence>>[]>;
|
|
446
|
+
roomStats: Subject<RoomStats>;
|
|
447
|
+
"storage-loaded": Subject<boolean>;
|
|
448
|
+
}
|
|
449
|
+
type InferSubjectValue<TIO extends IOLike, TPresence extends Record<string, any>, TSubject extends keyof StateNotifierSubjects<TIO, TPresence>> = StateNotifierSubjects<TIO, TPresence>[TSubject] extends Subject<infer IValue> ? Id<IValue> : never;
|
|
450
|
+
type SubscriptionCallback<TIO extends IOLike, TPresence extends Record<string, any>, TSubject extends keyof StateNotifierSubjects<TIO, TPresence>> = (value: InferSubjectValue<TIO, TPresence, TSubject>) => void;
|
|
451
|
+
type UpdateMyPresenceAction<TPresence extends Record<string, any>> = Partial<TPresence> | ((oldPresence: TPresence | null) => Partial<TPresence>);
|
|
452
|
+
interface UserRecord<TIO extends IOLike> {
|
|
453
|
+
data: Id<InferIOAuthorizeUser<InferIOAuthorize<TIO>>>;
|
|
454
|
+
}
|
|
455
|
+
interface UserInfo<TIO extends IOLike, TPresence extends Record<string, any> = {}> extends UserRecord<TIO> {
|
|
456
|
+
presence: TPresence;
|
|
457
|
+
kind: ParticipantKind;
|
|
458
|
+
operator: OperatorUser | null;
|
|
459
|
+
}
|
|
460
|
+
type RoomStats = KindStats;
|
|
461
|
+
type RoomErrorSubscriptionCallback = (error: RoomError) => void;
|
|
462
|
+
type RoomErrorSubscriptionFn = (callback: RoomErrorSubscriptionCallback) => () => void;
|
|
463
|
+
type ListUsersOptions = {
|
|
464
|
+
cursor?: ListUsersCursor | null;
|
|
465
|
+
kinds?: readonly ParticipantKind[];
|
|
466
|
+
limit?: number;
|
|
467
|
+
};
|
|
468
|
+
type ListUsersRow<TIO extends IOLike> = ParticipantRecord<InferIOAuthorizeUser<InferIOAuthorize<TIO>>>;
|
|
469
|
+
type UsersPage<TIO extends IOLike> = {
|
|
470
|
+
pageInfo: {
|
|
471
|
+
endCursor: ListUsersCursor | null;
|
|
472
|
+
hasNextPage: boolean;
|
|
473
|
+
};
|
|
474
|
+
users: ListUsersRow<TIO>[];
|
|
475
|
+
};
|
|
476
|
+
type ListUsersErrorCode = "FAILED" | "INVALID_LIMIT" | "NOT_CONNECTED";
|
|
477
|
+
type ListUsersError = {
|
|
478
|
+
code: ListUsersErrorCode;
|
|
479
|
+
message: string;
|
|
480
|
+
};
|
|
481
|
+
type ListUsersResult<TIO extends IOLike> = {
|
|
482
|
+
success: true;
|
|
483
|
+
pageInfo: UsersPage<TIO>["pageInfo"];
|
|
484
|
+
users: UsersPage<TIO>["users"];
|
|
485
|
+
} | {
|
|
486
|
+
success: false;
|
|
487
|
+
error: ListUsersError;
|
|
488
|
+
};
|
|
489
|
+
interface WebSocketConnection {
|
|
490
|
+
/**
|
|
491
|
+
* @description How many times a connection attempt was made. This will increment upon each
|
|
492
|
+
* unsuccessful attempt, and will reset upon a successful connection.
|
|
493
|
+
* @date April 13, 2025
|
|
494
|
+
*/
|
|
495
|
+
attempts: number;
|
|
496
|
+
id: string | null;
|
|
497
|
+
state: ConnectionState;
|
|
498
|
+
}
|
|
499
|
+
interface StorageInfo {
|
|
500
|
+
state: StorageState;
|
|
501
|
+
}
|
|
502
|
+
interface WebSocketState<TIO extends IOLike> {
|
|
503
|
+
authorization: AuthorizationState<TIO>;
|
|
504
|
+
connection: WebSocketConnection;
|
|
505
|
+
storage: StorageInfo;
|
|
506
|
+
webSocket: WebSocket | null;
|
|
507
|
+
}
|
|
508
|
+
type BroadcastProxy<TIO extends IOLike> = (<TEvent extends keyof InferIOInput<TIO>>(event: TEvent, data: Id<InferIOInput<TIO>[TEvent]>) => Promise<void>) & { [PEvent in keyof InferIOInput<TIO>]: (data: Id<InferIOInput<TIO>[PEvent]>) => Promise<void>; };
|
|
509
|
+
type PresenceProcedureProxy<TProcedures extends Record<string, TreatyProcedureLike<"presence">> = {}> = (<TName extends Extract<keyof TProcedures, string>>(name: TName, data: InferTreatyProcedureInput<TProcedures[TName]>) => Promise<void>) & { [TName in Extract<keyof TProcedures, string>]: (data: InferTreatyProcedureInput<TProcedures[TName]>) => Promise<void>; };
|
|
510
|
+
type StorageProcedureProxy<TProcedures extends Record<string, TreatyProcedureLike<"storage">> = {}> = (<TName extends Extract<keyof TProcedures, string>>(name: TName, data: InferTreatyProcedureInput<TProcedures[TName]>) => void) & { [TName in Extract<keyof TProcedures, string>]: (data: InferTreatyProcedureInput<TProcedures[TName]>) => void; };
|
|
511
|
+
type PublicEventKey<TEvents> = Exclude<Extract<keyof TEvents, string>, `$${string}`>;
|
|
512
|
+
type EventNotifierSubscriptionCallback<TIO extends IOLike, TEvent extends keyof InferIOOutput<TIO>> = (value: Id<IOEventMessage<TIO, TEvent>>) => void;
|
|
513
|
+
type EventSubscriptionFn<TIO extends IOLike> = <TEvent extends PublicEventKey<InferIOOutput<TIO>>>(event: TEvent, callback: EventNotifierSubscriptionCallback<TIO, TEvent>) => () => void;
|
|
514
|
+
type EventProxy<TIO extends IOLike> = EventSubscriptionFn<TIO> & { [PEvent in PublicEventKey<InferIOOutput<TIO>>]: (callback: EventNotifierSubscriptionCallback<TIO, PEvent>) => () => void; };
|
|
515
|
+
type StorageSubscriptionCallback<TJson extends Record<string, any>, TKey extends keyof TJson> = (value: TJson[TKey]) => void;
|
|
516
|
+
type StorageSubscriptionFn<TJson extends Record<string, any>> = <TKey extends keyof TJson>(key: TKey, fn: StorageSubscriptionCallback<TJson, TKey>) => () => void;
|
|
517
|
+
type StorageRootSubscriptionCallback<TJson extends Record<string, any>> = (value: TJson) => void;
|
|
518
|
+
type StorageRootSubscriptionFn<TJson extends Record<string, any>> = (callback: StorageRootSubscriptionCallback<TJson>) => () => void;
|
|
519
|
+
type StorageProxy<TJson extends Record<string, any>> = StorageSubscriptionFn<TJson> & StorageRootSubscriptionFn<TJson> & { [PKey in keyof TJson]: (callback: StorageSubscriptionCallback<TJson, PKey>) => () => void; };
|
|
520
|
+
type SubscribeFn<TValue extends unknown> = (callback: (value: TValue) => void) => () => void;
|
|
521
|
+
type SubscribeProxy<TIO extends IOLike, TPresence extends Record<string, any>, TJson extends Record<string, any>> = (<TSubject extends keyof StateNotifierSubjects<TIO, TPresence>>(name: TSubject, callback: SubscriptionCallback<TIO, TPresence, TSubject>) => () => void) & {
|
|
522
|
+
connection: SubscribeFn<Id<WebSocketState<TIO>>>;
|
|
523
|
+
error: RoomErrorSubscriptionFn;
|
|
524
|
+
event: EventProxy<TIO>;
|
|
525
|
+
myPresence: SubscribeFn<TPresence | null>;
|
|
526
|
+
myself: SubscribeFn<Id<UserInfo<TIO>> | null>;
|
|
527
|
+
other: OtherSubscriptionFn<TIO, TPresence>;
|
|
528
|
+
others: OthersSubscriptionFn<TIO, TPresence>;
|
|
529
|
+
roomStats: SubscribeFn<RoomStats>;
|
|
530
|
+
storage: StorageProxy<TJson>;
|
|
531
|
+
storageLoaded: SubscribeFn<boolean>;
|
|
532
|
+
};
|
|
533
|
+
interface RoomEventListenerMap {
|
|
534
|
+
close: (event: CloseEvent | null) => void;
|
|
535
|
+
error: (event: Event) => void;
|
|
536
|
+
message: (event: MessageEvent<any>) => void;
|
|
537
|
+
open: (event: Event) => void;
|
|
538
|
+
}
|
|
539
|
+
interface RoomLike<TIO extends IOLike, TDoc extends any, TPresence extends Record<string, any> = {}, TStorage extends Record<string, any> = {}, TJson extends Record<string, any> = any, TTreaty extends TreatyLike = TreatyLike> {
|
|
540
|
+
id: string;
|
|
541
|
+
broadcast: BroadcastProxy<TIO>;
|
|
542
|
+
presence: PresenceProcedureProxy<TTreaty["_defs"]["procedures"]["presence"]>;
|
|
543
|
+
storage: StorageProcedureProxy<TTreaty["_defs"]["procedures"]["storage"]>;
|
|
544
|
+
addEventListener<TKind extends keyof RoomEventListenerMap>(kind: TKind, handler: RoomEventListenerMap[TKind]): () => void;
|
|
545
|
+
canRedo(): boolean;
|
|
546
|
+
canUndo(): boolean;
|
|
547
|
+
getDoc(): CrdtDocLike<TDoc, TStorage, TJson>;
|
|
548
|
+
getConnection(): WebSocketConnection;
|
|
549
|
+
getMyPresence(): TPresence;
|
|
550
|
+
getMyself(): Id<UserInfo<TIO, TPresence>> | null;
|
|
551
|
+
getOther(userId: string, options?: ParticipantKindOptions): Id<UserInfo<TIO, TPresence>> | null;
|
|
552
|
+
getOtherByConnectionId(connectionId: string, options?: ParticipantKindsOptions): Id<UserInfo<TIO, TPresence>> | null;
|
|
553
|
+
getOthers(options?: ParticipantKindsOptions): readonly Id<UserInfo<TIO, TPresence>>[];
|
|
554
|
+
getRoomStats(options?: ParticipantKindsOptions): RoomStats;
|
|
555
|
+
getStorage<TKey extends keyof TStorage>(type: TKey): TStorage[TKey] | null;
|
|
556
|
+
getStorageJson(): TJson | null;
|
|
557
|
+
getStorageJson<TKey extends keyof TJson>(type: TKey): TJson[TKey] | null;
|
|
558
|
+
getStorageLoaded: () => boolean;
|
|
559
|
+
listUsers(options?: ListUsersOptions): Promise<ListUsersResult<TIO>>;
|
|
560
|
+
redo(): void;
|
|
561
|
+
subscribe: SubscribeProxy<TIO, TPresence, TJson>;
|
|
562
|
+
transact(fn: (storage: TStorage) => void, origin?: string): void;
|
|
563
|
+
undo(): void;
|
|
564
|
+
updateMyPresence(presence: UpdateMyPresenceAction<TPresence>): void;
|
|
565
|
+
}
|
|
566
|
+
export type { AreAllOptional, BaseClientEventRecord, BaseClientMessage, BaseIOEventRecord, BaseUser, BroadcastProxy, Constructable, CrdtDocFactory, CrdtDocLike, CrdtLibraryKind, CrdtLibraryType, DeepPartial, DeepReadonly, DeepWriteable, DocApplyEncodedStateParams, DocBatchApplyEncodedStateParams, DocSubscribeCallbackParams, EventMessage, EventNotifierSubscriptionCallback, EventProxy, EventRecord, GetEventMessage, HasCrdtLibrary, HasRequiredProperty, HasStorage, IOAuthorize, IOAuthorizeEventMessage, IOEventMessage, IOLike, IOLikeDefs, IORouterLike, Id, InferEventMessage, InferEventsInput, InferEventsOutput, InferIOAuthorize, InferIOAuthorizeUser, InferIOCrdt, InferIOCrdtKind, InferIOEvents, InferIOInput, InferIOOutput, InferIOProcedureInput, InferIOProcedureOutput, InferIOStorage, InferIOTreaty, InferTreatyPresence, InferTreatyPresenceProcedures, InferTreatyProcedureInput, InferTreatyStorage, InferTreatyStorageProcedures, InferTreatyUser, IsAny, Json, JsonObject, JsonPrimitive, KindStats, ListUsersCursor, ListUsersError, ListUsersErrorCode, ListUsersOptions, ListUsersResult, ListUsersRow, Maybe, MaybePromise, MaybeReadonlyArray, NonNilProps, OnGetOperator, OperatorUser, OptionalProps, OtherSubscriptionCallback, OtherSubscriptionFn, OthersSubscriptionCallback, OthersSubscriptionEvent, OthersSubscriptionFn, ParticipantKind, ParticipantKindOptions, ParticipantKindsOptions, ParticipantRecord, ParticipantRef, PresenceProcedureProxy, PresenceSeq, ProcedureLike, PublicEventKey, RoomError, RoomErrorSubscriptionCallback, RoomErrorSubscriptionFn, RoomEventListenerMap, RoomLike, RoomStats, RoomStatsByKind, ServerOriginEvent, SessionPresence, SetKey, Spread, SpreadProperties, StandardSchemaV1, StateNotifierSubjects, StorageInfo, StorageProcedureProxy, StorageProxy, StorageRootSubscriptionCallback, StorageRootSubscriptionFn, StorageSubscriptionCallback, StorageSubscriptionFn, SubscribeFn, SubscribeProxy, SubscriptionCallback, TreatyLike, TreatyProcedureInputJson, TreatyProcedureInputsJson, TreatyProcedureKind, TreatyProcedureLike, TreatyProceduresJson, UndefinedProps, UpdateMyPresenceAction, UserInfo, UserRecord, UsersPage, WebSocketConnection, WebSocketState };
|
|
567
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":["StandardSchemaV1"],"sources":["../src/general.ts","../src/pluv/crdt.ts","../src/pluv/shared.ts","../src/pluv/operator.ts","../src/pluv/enums.ts","../src/pluv/room.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AU,yBAAyB,GAAG,SAAS,KAAK;EAE7E,uBACI,sBACA,UAAU,0BACX,GAAG,SAAS,KAAK;EAEpB,UAAU,UAAU,mCAAmC,GAAG,SAAS,KAAK;EAExE,aAAa,UAAU,0BAA0B;EAEjD,WAAW,mBAAmB,UAAU,MAAM,OAAO,SAAS;EAE9D,kBAAkB;EAClB,eAAe,mBAAmB,OAAO,MAAM,OAAO,MAAM;EAE5D;EAEA,UAAU,UAAU,mBAAmB,QAAQ,gBAAgB;EAE/D;EAEA,WAAW,eAAe,KAAK,WAAW;EAE1C,SAAS,KAAK,SAAS,mBAAmB;EAE1C;EAEA,iBAAiB,UAAU,uBAAuB"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/pluv/enums.ts
|
|
2
|
+
const ConnectionState = {
|
|
3
|
+
Closed: "closed",
|
|
4
|
+
Connecting: "connecting",
|
|
5
|
+
Open: "open",
|
|
6
|
+
Unavailable: "unavailable",
|
|
7
|
+
Untouched: "untouched"
|
|
8
|
+
};
|
|
9
|
+
const StorageState = {
|
|
10
|
+
Loading: "loading",
|
|
11
|
+
Offline: "offline",
|
|
12
|
+
Synced: "synced",
|
|
13
|
+
Unavailable: "unavailable"
|
|
14
|
+
};
|
|
15
|
+
export { ConnectionState, StorageState };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/pluv/enums.ts"],"sourcesContent":["export const ConnectionState = {\n Closed: \"closed\",\n Connecting: \"connecting\",\n Open: \"open\",\n Unavailable: \"unavailable\",\n Untouched: \"untouched\",\n} as const;\n\nexport type ConnectionState = (typeof ConnectionState)[keyof typeof ConnectionState];\n\nexport const StorageState = {\n Loading: \"loading\",\n Offline: \"offline\",\n Synced: \"synced\",\n Unavailable: \"unavailable\",\n};\n\nexport type StorageState = (typeof StorageState)[keyof typeof StorageState];\n"],"mappings":";AAAA,MAAa,kBAAkB;CAC3B,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,aAAa;CACb,WAAW;AACf;AAIA,MAAa,eAAe;CACxB,SAAS;CACT,SAAS;CACT,QAAQ;CACR,aAAa;AACjB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pluv/types",
|
|
3
|
+
"version": "0.0.0-canary-20261026091827",
|
|
4
|
+
"description": "@pluv/io shared types",
|
|
5
|
+
"author": {
|
|
6
|
+
"email": "david@pluv.io",
|
|
7
|
+
"name": "i3dly",
|
|
8
|
+
"url": "https://github.com/i3dly"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"homepage": "https://github.com/pluv-io/pluv",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/pluv-io/pluv.git",
|
|
15
|
+
"directory": "packages/types"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"types": "./dist/index.d.mts",
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@pluv/tsconfig": "^0.0.0-canary-20261026091827",
|
|
27
|
+
"tsdown": "^0.23.2",
|
|
28
|
+
"typescript": "7.1.0-beta"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@standard-schema/spec": "^1.1.0",
|
|
32
|
+
"wonka": "^6.3.6"
|
|
33
|
+
},
|
|
34
|
+
"exports": {
|
|
35
|
+
".": "./dist/index.mjs",
|
|
36
|
+
"./*": "./*"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsdown",
|
|
40
|
+
"dev": "tsdown --watch",
|
|
41
|
+
"typecheck": "tsc --noEmit",
|
|
42
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
|
43
|
+
}
|
|
44
|
+
}
|