foldkit-sync 0.3.0 → 0.4.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.
package/dist/index.d.mts CHANGED
@@ -1,69 +1,99 @@
1
- import { Config, Context, Duration, Effect, Exit, Layer, Metric, PubSub, Schema, Scope, Stream } from "effect";
1
+ import { Config, Context, Duration, Effect, Exit, Layer, Metric, PubSub, Schema as Schema$1, Scope, Stream } from "effect";
2
+ import { AppScope, Contract, MergeConstructors, MergeFields, MessageSet, RunnableApplication, Surface, WritableProjection } from "foldkit-surface";
2
3
  import { UrlRequest } from "foldkit/navigation";
3
4
  import { Subscriptions } from "foldkit/subscription";
4
5
  import * as Url from "foldkit/url";
5
- import { AppScope, Contract, MergeConstructors, MergeFields, MessageSet, RunnableApplication, Surface, WritableProjection } from "foldkit-surface";
6
6
  import { Document, HtmlBuilder } from "foldkit/html";
7
+ //#region src/ids.d.ts
8
+ /** Identifies the replicated document a replica or operation belongs to. */
9
+ export declare const DocumentId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/DocumentId">;
10
+ export type DocumentId = typeof DocumentId.Type;
11
+ /** Identifies one replica (writer identity) within a document. */
12
+ export declare const ReplicaId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/ReplicaId">;
13
+ export type ReplicaId = typeof ReplicaId.Type;
14
+ /** The stable identity of one operation within a document. */
15
+ export declare const OpId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/OpId">;
16
+ export type OpId = typeof OpId.Type;
17
+ /**
18
+ * A position in the committed document order. `0` is the start; a committed
19
+ * operation's `serverSequence` and a replica's `cursor` are the same family.
20
+ */
21
+ export declare const Sequence: Schema$1.brand<Schema$1.Number, "@foldkit-sync/Sequence">;
22
+ export type Sequence = typeof Sequence.Type;
23
+ /** A replica's own operation counter within a document; 1-based. */
24
+ export declare const LocalSequence: Schema$1.brand<Schema$1.Number, "@foldkit-sync/LocalSequence">;
25
+ export type LocalSequence = typeof LocalSequence.Type;
26
+ /**
27
+ * Decode-and-brand helpers. A branded schema constructs the same value with
28
+ * `DocumentId.make('todos')`, which is the spelling to lead with; these stay
29
+ * for callers that already have them.
30
+ */
31
+ export declare const documentId: (value: string) => DocumentId;
32
+ export declare const replicaId: (value: string) => ReplicaId;
33
+ export declare const opId: (value: string) => OpId;
34
+ export declare const sequence: (value: number) => Sequence;
35
+ export declare const localSequence: (value: number) => LocalSequence;
36
+ //#endregion
7
37
  //#region src/errors.d.ts
8
- declare const StorageError_base: Schema.Class<StorageError, Schema.TaggedStruct<"StorageError", {
9
- readonly message: Schema.String;
10
- readonly cause: Schema.optional<Schema.Unknown>;
38
+ declare const StorageError_base: Schema$1.Class<StorageError, Schema$1.TaggedStruct<"StorageError", {
39
+ readonly message: Schema$1.String;
40
+ readonly cause: Schema$1.optional<Schema$1.Unknown>;
11
41
  }>, import("effect/Cause").YieldableError>;
12
42
  /** The persisted storage could not be read or written. */
13
43
  export declare class StorageError extends StorageError_base {}
14
- declare const UnsupportedClockVersionError_base: Schema.Class<UnsupportedClockVersionError, Schema.TaggedStruct<"UnsupportedClockVersionError", {
15
- readonly schemaVersion: Schema.NullOr<Schema.Number>;
16
- readonly message: Schema.String;
44
+ declare const UnsupportedClockVersionError_base: Schema$1.Class<UnsupportedClockVersionError, Schema$1.TaggedStruct<"UnsupportedClockVersionError", {
45
+ readonly schemaVersion: Schema$1.NullOr<Schema$1.Number>;
46
+ readonly message: Schema$1.String;
17
47
  }>, import("effect/Cause").YieldableError>;
18
48
  /** The stored clock state targets a schema version this build does not support. */
19
49
  export declare class UnsupportedClockVersionError extends UnsupportedClockVersionError_base {}
20
- declare const WrongReplicaStorageError_base: Schema.Class<WrongReplicaStorageError, Schema.TaggedStruct<"WrongReplicaStorageError", {
21
- readonly documentId: Schema.String;
22
- readonly replicaId: Schema.String;
23
- readonly message: Schema.String;
50
+ declare const WrongReplicaStorageError_base: Schema$1.Class<WrongReplicaStorageError, Schema$1.TaggedStruct<"WrongReplicaStorageError", {
51
+ readonly documentId: Schema$1.String;
52
+ readonly replicaId: Schema$1.String;
53
+ readonly message: Schema$1.String;
24
54
  }>, import("effect/Cause").YieldableError>;
25
55
  /** The storage holds a different replica's state. */
26
56
  export declare class WrongReplicaStorageError extends WrongReplicaStorageError_base {}
27
- declare const InvalidReplicaHistoryError_base: Schema.Class<InvalidReplicaHistoryError, Schema.TaggedStruct<"InvalidReplicaHistoryError", {
28
- readonly message: Schema.String;
29
- readonly cause: Schema.optional<Schema.Unknown>;
57
+ declare const InvalidReplicaHistoryError_base: Schema$1.Class<InvalidReplicaHistoryError, Schema$1.TaggedStruct<"InvalidReplicaHistoryError", {
58
+ readonly message: Schema$1.String;
59
+ readonly cause: Schema$1.optional<Schema$1.Unknown>;
30
60
  }>, import("effect/Cause").YieldableError>;
31
61
  /** The persisted replica history is internally inconsistent. */
32
62
  export declare class InvalidReplicaHistoryError extends InvalidReplicaHistoryError_base {}
33
- declare const InvalidExchangeError_base: Schema.Class<InvalidExchangeError, Schema.TaggedStruct<"InvalidExchangeError", {
34
- readonly message: Schema.String;
35
- readonly cause: Schema.optional<Schema.Unknown>;
63
+ declare const InvalidExchangeError_base: Schema$1.Class<InvalidExchangeError, Schema$1.TaggedStruct<"InvalidExchangeError", {
64
+ readonly message: Schema$1.String;
65
+ readonly cause: Schema$1.optional<Schema$1.Unknown>;
36
66
  }>, import("effect/Cause").YieldableError>;
37
67
  /** The server's exchange response did not match the protocol schema. */
38
68
  export declare class InvalidExchangeError extends InvalidExchangeError_base {}
39
- declare const InvalidOutboxError_base: Schema.Class<InvalidOutboxError, Schema.TaggedStruct<"InvalidOutboxError", {
40
- readonly message: Schema.String;
69
+ declare const InvalidOutboxError_base: Schema$1.Class<InvalidOutboxError, Schema$1.TaggedStruct<"InvalidOutboxError", {
70
+ readonly message: Schema$1.String;
41
71
  }>, import("effect/Cause").YieldableError>;
42
72
  /** A persisted pending operation could not have been produced by this replica. */
43
73
  export declare class InvalidOutboxError extends InvalidOutboxError_base {}
44
- declare const CheckpointRegressionError_base: Schema.Class<CheckpointRegressionError, Schema.TaggedStruct<"CheckpointRegressionError", {
45
- readonly cursor: Schema.Number;
46
- readonly checkpointCursor: Schema.Number;
47
- readonly message: Schema.String;
74
+ declare const CheckpointRegressionError_base: Schema$1.Class<CheckpointRegressionError, Schema$1.TaggedStruct<"CheckpointRegressionError", {
75
+ readonly cursor: Schema$1.Number;
76
+ readonly checkpointCursor: Schema$1.Number;
77
+ readonly message: Schema$1.String;
48
78
  }>, import("effect/Cause").YieldableError>;
49
79
  /** The server sent a checkpoint older than the replica's cursor. */
50
80
  export declare class CheckpointRegressionError extends CheckpointRegressionError_base {}
51
- declare const CommittedOrderError_base: Schema.Class<CommittedOrderError, Schema.TaggedStruct<"CommittedOrderError", {
52
- readonly expected: Schema.Number;
53
- readonly actual: Schema.Number;
54
- readonly message: Schema.String;
81
+ declare const CommittedOrderError_base: Schema$1.Class<CommittedOrderError, Schema$1.TaggedStruct<"CommittedOrderError", {
82
+ readonly expected: Schema$1.Number;
83
+ readonly actual: Schema$1.Number;
84
+ readonly message: Schema$1.String;
55
85
  }>, import("effect/Cause").YieldableError>;
56
86
  /** Committed operations were not contiguous from the replica's cursor. */
57
87
  export declare class CommittedOrderError extends CommittedOrderError_base {}
58
- declare const ForeignRejectionError_base: Schema.Class<ForeignRejectionError, Schema.TaggedStruct<"ForeignRejectionError", {
59
- readonly opId: Schema.String;
60
- readonly message: Schema.String;
88
+ declare const ForeignRejectionError_base: Schema$1.Class<ForeignRejectionError, Schema$1.TaggedStruct<"ForeignRejectionError", {
89
+ readonly opId: Schema$1.String;
90
+ readonly message: Schema$1.String;
61
91
  }>, import("effect/Cause").YieldableError>;
62
92
  /** The server rejected an operation the replica never sent. */
63
93
  export declare class ForeignRejectionError extends ForeignRejectionError_base {}
64
- declare const ForeignAcknowledgementError_base: Schema.Class<ForeignAcknowledgementError, Schema.TaggedStruct<"ForeignAcknowledgementError", {
65
- readonly opId: Schema.String;
66
- readonly message: Schema.String;
94
+ declare const ForeignAcknowledgementError_base: Schema$1.Class<ForeignAcknowledgementError, Schema$1.TaggedStruct<"ForeignAcknowledgementError", {
95
+ readonly opId: Schema$1.String;
96
+ readonly message: Schema$1.String;
67
97
  }>, import("effect/Cause").YieldableError>;
68
98
  /**
69
99
  * The server answered an operation this request never sent, or both
@@ -71,21 +101,21 @@ declare const ForeignAcknowledgementError_base: Schema.Class<ForeignAcknowledgem
71
101
  * server delete local work.
72
102
  */
73
103
  export declare class ForeignAcknowledgementError extends ForeignAcknowledgementError_base {}
74
- declare const ReplicaClosedError_base: Schema.Class<ReplicaClosedError, Schema.TaggedStruct<"ReplicaClosedError", {
75
- readonly message: Schema.String;
104
+ declare const ReplicaClosedError_base: Schema$1.Class<ReplicaClosedError, Schema$1.TaggedStruct<"ReplicaClosedError", {
105
+ readonly message: Schema$1.String;
76
106
  }>, import("effect/Cause").YieldableError>;
77
107
  /** The replica was closed while work was still being submitted. */
78
108
  export declare class ReplicaClosedError extends ReplicaClosedError_base {}
79
- declare const UnsupportedReplicaVersionError_base: Schema.Class<UnsupportedReplicaVersionError, Schema.TaggedStruct<"UnsupportedReplicaVersionError", {
80
- readonly protocolVersion: Schema.NullOr<Schema.Number>;
81
- readonly schemaVersion: Schema.NullOr<Schema.Number>;
82
- readonly message: Schema.String;
109
+ declare const UnsupportedReplicaVersionError_base: Schema$1.Class<UnsupportedReplicaVersionError, Schema$1.TaggedStruct<"UnsupportedReplicaVersionError", {
110
+ readonly protocolVersion: Schema$1.NullOr<Schema$1.Number>;
111
+ readonly schemaVersion: Schema$1.NullOr<Schema$1.Number>;
112
+ readonly message: Schema$1.String;
83
113
  }>, import("effect/Cause").YieldableError>;
84
114
  /** The stored replica state targets a protocol or schema version this build does not support. */
85
115
  export declare class UnsupportedReplicaVersionError extends UnsupportedReplicaVersionError_base {}
86
- declare const ReplayError_base: Schema.Class<ReplayError, Schema.TaggedStruct<"ReplayError", {
87
- readonly message: Schema.String;
88
- readonly cause: Schema.optional<Schema.Unknown>;
116
+ declare const ReplayError_base: Schema$1.Class<ReplayError, Schema$1.TaggedStruct<"ReplayError", {
117
+ readonly message: Schema$1.String;
118
+ readonly cause: Schema$1.optional<Schema$1.Unknown>;
89
119
  }>, import("effect/Cause").YieldableError>;
90
120
  /**
91
121
  * `replay` threw for a submitted Message, so it could never be applied here or
@@ -105,34 +135,9 @@ interface Storage {
105
135
  /** One database per document/replica; CAS prevents two tabs from sharing a writer identity. */
106
136
  export declare const indexedDb: (name: string | Config.Config<string>, factory?: IDBFactory | undefined) => Effect.Effect<Storage, StorageError, Scope.Scope>;
107
137
  //#endregion
108
- //#region src/ids.d.ts
109
- /** Identifies the replicated document a replica or operation belongs to. */
110
- export declare const DocumentId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/DocumentId">;
111
- export type DocumentId = typeof DocumentId.Type;
112
- /** Identifies one replica (writer identity) within a document. */
113
- export declare const ReplicaId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/ReplicaId">;
114
- export type ReplicaId = typeof ReplicaId.Type;
115
- /** The stable identity of one operation within a document. */
116
- export declare const OpId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/OpId">;
117
- export type OpId = typeof OpId.Type;
118
- /**
119
- * A position in the committed document order. `0` is the start; a committed
120
- * operation's `serverSequence` and a replica's `cursor` are the same family.
121
- */
122
- export declare const Sequence: Schema.brand<Schema.Number, "@foldkit-sync/Sequence">;
123
- export type Sequence = typeof Sequence.Type;
124
- /** A replica's own operation counter within a document; 1-based. */
125
- export declare const LocalSequence: Schema.brand<Schema.Number, "@foldkit-sync/LocalSequence">;
126
- export type LocalSequence = typeof LocalSequence.Type;
127
- export declare const documentId: (value: string) => DocumentId;
128
- export declare const replicaId: (value: string) => ReplicaId;
129
- export declare const opId: (value: string) => OpId;
130
- export declare const sequence: (value: number) => Sequence;
131
- export declare const localSequence: (value: number) => LocalSequence;
132
- //#endregion
133
138
  //#region src/transport.d.ts
134
- declare const TransportError_base: Schema.Class<TransportError, Schema.TaggedStruct<"SyncTransportError", {
135
- readonly message: Schema.String;
139
+ declare const TransportError_base: Schema$1.Class<TransportError, Schema$1.TaggedStruct<"SyncTransportError", {
140
+ readonly message: Schema$1.String;
136
141
  }>, import("effect/Cause").YieldableError>;
137
142
  /** The wire failure of a transport. A refusal is a result, not an error. */
138
143
  export declare class TransportError extends TransportError_base {}
@@ -218,29 +223,29 @@ export declare const layerSocket: (options: SocketOptions) => Layer.Layer<Transp
218
223
  declare const PROTOCOL_VERSION = 1;
219
224
  declare const SCHEMA_VERSION = 1;
220
225
  /** A client-authored operation envelope. `message` is the application's encoded Message. */
221
- declare const OperationSchema: Schema.Struct<{
222
- readonly protocolVersion: Schema.Literal<1>;
223
- readonly schemaVersion: Schema.Literal<1>;
224
- readonly documentId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/DocumentId">;
225
- readonly replicaId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/ReplicaId">;
226
- readonly localSequence: Schema.brand<Schema.Number, "@foldkit-sync/LocalSequence">;
227
- readonly opId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/OpId">;
228
- readonly baseCursor: Schema.brand<Schema.Number, "@foldkit-sync/Sequence">;
229
- readonly message: Schema.Unknown;
226
+ declare const OperationSchema: Schema$1.Struct<{
227
+ readonly protocolVersion: Schema$1.Literal<1>;
228
+ readonly schemaVersion: Schema$1.Literal<1>;
229
+ readonly documentId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/DocumentId">;
230
+ readonly replicaId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/ReplicaId">;
231
+ readonly localSequence: Schema$1.brand<Schema$1.Number, "@foldkit-sync/LocalSequence">;
232
+ readonly opId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/OpId">;
233
+ readonly baseCursor: Schema$1.brand<Schema$1.Number, "@foldkit-sync/Sequence">;
234
+ readonly message: Schema$1.Unknown;
230
235
  }>;
231
236
  type Operation = typeof OperationSchema.Type;
232
237
  /** An operation the server committed, with its authoritative order and actor. */
233
- declare const CommittedSchema: Schema.Struct<{
234
- readonly serverSequence: Schema.brand<Schema.Number, "@foldkit-sync/Sequence">;
235
- readonly actorId: Schema.NonEmptyString;
236
- readonly protocolVersion: Schema.Literal<1>;
237
- readonly schemaVersion: Schema.Literal<1>;
238
- readonly documentId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/DocumentId">;
239
- readonly replicaId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/ReplicaId">;
240
- readonly localSequence: Schema.brand<Schema.Number, "@foldkit-sync/LocalSequence">;
241
- readonly opId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/OpId">;
242
- readonly baseCursor: Schema.brand<Schema.Number, "@foldkit-sync/Sequence">;
243
- readonly message: Schema.Unknown;
238
+ declare const CommittedSchema: Schema$1.Struct<{
239
+ readonly serverSequence: Schema$1.brand<Schema$1.Number, "@foldkit-sync/Sequence">;
240
+ readonly actorId: Schema$1.NonEmptyString;
241
+ readonly protocolVersion: Schema$1.Literal<1>;
242
+ readonly schemaVersion: Schema$1.Literal<1>;
243
+ readonly documentId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/DocumentId">;
244
+ readonly replicaId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/ReplicaId">;
245
+ readonly localSequence: Schema$1.brand<Schema$1.Number, "@foldkit-sync/LocalSequence">;
246
+ readonly opId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/OpId">;
247
+ readonly baseCursor: Schema$1.brand<Schema$1.Number, "@foldkit-sync/Sequence">;
248
+ readonly message: Schema$1.Unknown;
244
249
  }>;
245
250
  /** Named to avoid colliding with `foldkit-durable`'s `Committed`. */
246
251
  type CommittedOperation = typeof CommittedSchema.Type;
@@ -331,13 +336,13 @@ interface Replica<Message, Shared> {
331
336
  }
332
337
  interface SyncDefinition<Message, Shared, MessageEncoded, SharedEncoded> {
333
338
  readonly documentId: DocumentId;
334
- readonly message: Schema.Codec<Message, MessageEncoded, never, never>;
335
- readonly shared: Schema.Codec<Shared, SharedEncoded, never, never>;
339
+ readonly message: Schema$1.Codec<Message, MessageEncoded, never, never>;
340
+ readonly shared: Schema$1.Codec<Shared, SharedEncoded, never, never>;
336
341
  readonly empty: Shared;
337
342
  readonly durable: (message: Message) => boolean;
338
343
  readonly replay: (shared: Shared, message: Message) => Shared;
339
344
  }
340
- interface Sync<Message, Shared> {
345
+ interface Sync$1<Message, Shared> {
341
346
  readonly documentId: DocumentId;
342
347
  /**
343
348
  * Low-level wire codecs for adapters and the transport. Most applications use
@@ -375,13 +380,13 @@ interface JournalContract<Operation, Shared> {
375
380
  * projection means; the replica owns the local outbox, optimistic projection,
376
381
  * and reconciliation as Effects, and never runs a second reducer.
377
382
  */
378
- export declare const defineSync: <Message, Shared, MessageEncoded, SharedEncoded>(definition: SyncDefinition<Message, Shared, MessageEncoded, SharedEncoded>) => Sync<Message, Shared>;
383
+ export declare const defineSync: <Message, Shared, MessageEncoded, SharedEncoded>(definition: SyncDefinition<Message, Shared, MessageEncoded, SharedEncoded>) => Sync$1<Message, Shared>;
379
384
  //#endregion
380
385
  //#region src/make.d.ts
381
386
  type MessageConstructor<Message> = (...args: never[]) => Message;
382
387
  /** The Message union a tuple of constructors produces. */
383
388
  type MsgOf<Ms extends readonly unknown[]> = Ms[number] extends ((...args: never[]) => infer M) ? M : never;
384
- type AppMessage<AppModel, F extends Schema.Struct.Fields, Cases extends Record<string, Schema.Struct.Fields>> = Schema.Schema.Type<AppScope<AppModel, F, Cases>['Message']>;
389
+ type AppMessage<AppModel, F extends Schema$1.Struct.Fields, Cases extends Record<string, Schema$1.Struct.Fields>> = Schema$1.Schema.Type<AppScope<AppModel, F, Cases>['Message']>;
385
390
  /** The `_tag` literal of the Message a constructor produces. */
386
391
  type TagOf<C> = C extends ((...args: never[]) => infer M) ? M extends {
387
392
  readonly _tag: infer T extends string;
@@ -408,10 +413,10 @@ interface AuthorizeRequest<Principal, Message, Shared> {
408
413
  * `shared` the authoritative snapshot. A variant without a rule is allowed; the
409
414
  * server may still refuse on its own grounds.
410
415
  */
411
- type AuthorizePolicy<Principal, Fields extends Schema.Struct.Fields, Ms extends readonly unknown[]> = { readonly [K in TagOf<Ms[number]>]?: (request: AuthorizeRequest<Principal, Extract<MsgOf<Ms>, {
416
+ type AuthorizePolicy<Principal, Fields extends Schema$1.Struct.Fields, Ms extends readonly unknown[]> = { readonly [K in TagOf<Ms[number]>]?: (request: AuthorizeRequest<Principal, Extract<MsgOf<Ms>, {
412
417
  readonly _tag: K;
413
- }>, Schema.Struct.Type<Fields>>) => boolean; };
414
- interface BaseOptions<Principal, Fields extends Schema.Struct.Fields, Ms extends readonly unknown[]> {
418
+ }>, Schema$1.Struct.Type<Fields>>) => boolean; };
419
+ interface BaseOptions<Principal, Fields extends Schema$1.Struct.Fields, Ms extends readonly unknown[]> {
415
420
  readonly documentId: DocumentId;
416
421
  /** Name for the generated `surface`; defaults to the document id. */
417
422
  readonly name?: string;
@@ -421,11 +426,11 @@ interface BaseOptions<Principal, Fields extends Schema.Struct.Fields, Ms extends
421
426
  * during admission, replay, and optimistic projection. It is not guarded: the
422
427
  * author owns its agreement with `update`.
423
428
  */
424
- readonly replay?: (shared: Schema.Struct.Type<NoInfer<Fields>>, message: MsgOf<NoInfer<Ms>>) => Schema.Struct.Type<NoInfer<Fields>>;
429
+ readonly replay?: (shared: Schema$1.Struct.Type<NoInfer<Fields>>, message: MsgOf<NoInfer<Ms>>) => Schema$1.Struct.Type<NoInfer<Fields>>;
425
430
  /** Authorization the server journal applies before committing; see `AuthorizePolicy`. */
426
431
  readonly authorize?: AuthorizePolicy<Principal, NoInfer<Fields>, NoInfer<Ms>>;
427
432
  }
428
- interface MakeOptions<AppModel, Fields extends Schema.Struct.Fields, Subset, Ms extends readonly MessageConstructor<any>[], Principal = unknown> extends BaseOptions<Principal, Fields, Ms> {
433
+ interface MakeOptions<AppModel, Fields extends Schema$1.Struct.Fields, Subset, Ms extends readonly MessageConstructor<any>[], Principal = unknown> extends BaseOptions<Principal, Fields, Ms> {
429
434
  /** The writable projection of the shared fields. */
430
435
  readonly shared: WritableProjection<AppModel, Fields>;
431
436
  /** The Message subset the replica durably records and replays. */
@@ -437,7 +442,7 @@ interface MakeOptions<AppModel, Fields extends Schema.Struct.Fields, Subset, Ms
437
442
  * `make`; a field declared twice with a different codec or a tag declared twice
438
443
  * is rejected there.
439
444
  */
440
- interface SyncFragment<AppModel, Fields extends Schema.Struct.Fields, Subset, Ms extends readonly MessageConstructor<any>[]> {
445
+ interface SyncFragment<AppModel, Fields extends Schema$1.Struct.Fields, Subset, Ms extends readonly MessageConstructor<any>[]> {
441
446
  readonly shared: WritableProjection<AppModel, Fields>;
442
447
  readonly durable: MessageSet<AppModel, any, Subset, Ms>;
443
448
  }
@@ -454,17 +459,17 @@ type FragmentMessages<Fs extends readonly SyncFragment<any, any, any, any>[]> =
454
459
  * projection, the declared Messages, and a read-only Surface over the
455
460
  * projection. Exported so a consumer can name the type.
456
461
  */
457
- interface DefinedSync<AppModel, Fields extends Schema.Struct.Fields, Message, Ms extends readonly unknown[], Principal = unknown> extends Sync<Message, Schema.Struct.Type<Fields>> {
458
- readonly surface: Surface<AppModel, Schema.Struct.Type<Fields>, MsgOf<Ms>, void>;
462
+ interface DefinedSync<AppModel, Fields extends Schema$1.Struct.Fields, Message, Ms extends readonly unknown[], Principal = unknown> extends Sync$1<Message, Schema$1.Struct.Type<Fields>> {
463
+ readonly surface: Surface<AppModel, Schema$1.Struct.Type<Fields>, MsgOf<Ms>, void>;
459
464
  readonly projection: WritableProjection<AppModel, Fields>;
460
465
  readonly messages: Ms;
461
466
  /** For `Module`: this contract owns the shared projection's paths and records the durable tags. */
462
467
  readonly contract: Contract;
463
468
  /** The durable journal's codecs, reducer, and, when declared, authorization. */
464
- readonly journalContract: () => PolicyJournalContract<Operation, Schema.Struct.Type<Fields>, Principal>;
469
+ readonly journalContract: () => PolicyJournalContract<Operation, Schema$1.Struct.Type<Fields>, Principal>;
465
470
  }
466
471
  /** The sync constructors specialized to one application. */
467
- interface ApplicationSync<AppModel, F extends Schema.Struct.Fields, Cases extends Record<string, Schema.Struct.Fields>, Principal = unknown> {
472
+ interface ApplicationSync<AppModel, F extends Schema$1.Struct.Fields, Cases extends Record<string, Schema$1.Struct.Fields>, Principal = unknown> {
468
473
  /**
469
474
  * Fixes the `Principal` that `authorize` rules see. A `Principal` cannot be a
470
475
  * positional type argument beside an inferred Model, so it is supplied here:
@@ -472,7 +477,7 @@ interface ApplicationSync<AppModel, F extends Schema.Struct.Fields, Cases extend
472
477
  */
473
478
  readonly withPrincipal: <P>() => ApplicationSync<AppModel, F, Cases, P>;
474
479
  /** One feature's shared fields and durable Messages, for `compose`. */
475
- readonly fragment: <Fields extends Schema.Struct.Fields, Subset, Ms extends readonly MessageConstructor<AppMessage<AppModel, F, Cases>>[]>(config: {
480
+ readonly fragment: <Fields extends Schema$1.Struct.Fields, Subset, Ms extends readonly MessageConstructor<AppMessage<AppModel, F, Cases>>[]>(config: {
476
481
  readonly shared: WritableProjection<AppModel, Fields>;
477
482
  readonly durable: MessageSet<AppModel, any, Subset, Ms>;
478
483
  }) => SyncFragment<AppModel, Fields, Subset, Ms>;
@@ -482,7 +487,7 @@ interface ApplicationSync<AppModel, F extends Schema.Struct.Fields, Cases extend
482
487
  * fragment from another application throws.
483
488
  */
484
489
  readonly compose: <const Fs extends readonly SyncFragment<AppModel, any, any, any>[]>(...fragments: Fs) => SyncFragment<AppModel, FragmentFields<Fs>, FragmentMessages<Fs>, FragmentConstructors<Fs>>;
485
- readonly make: <Fields extends Schema.Struct.Fields, Subset, Ms extends readonly MessageConstructor<AppMessage<AppModel, F, Cases>>[]>(options: MakeOptions<AppModel, Fields, Subset, Ms, Principal>) => DefinedSync<AppModel, Fields, AppMessage<AppModel, F, Cases>, Ms, Principal>;
490
+ readonly make: <Fields extends Schema$1.Struct.Fields, Subset, Ms extends readonly MessageConstructor<AppMessage<AppModel, F, Cases>>[]>(options: MakeOptions<AppModel, Fields, Subset, Ms, Principal>) => DefinedSync<AppModel, Fields, AppMessage<AppModel, F, Cases>, Ms, Principal>;
486
491
  }
487
492
  /**
488
493
  * Specializes the sync constructors to a `Surface.application`, so
@@ -492,7 +497,7 @@ interface ApplicationSync<AppModel, F extends Schema.Struct.Fields, Cases extend
492
497
  * `defineSync` remains the protocol primitive when there is no application to
493
498
  * derive from.
494
499
  */
495
- export declare const forApplication: <AppModel, F extends Schema.Struct.Fields, Cases extends Record<string, Schema.Struct.Fields>>(app: RunnableApplication<AppModel, F, Cases, any>) => ApplicationSync<AppModel, F, Cases>;
500
+ export declare const forApplication: <AppModel, F extends Schema$1.Struct.Fields, Cases extends Record<string, Schema$1.Struct.Fields>>(app: RunnableApplication<AppModel, F, Cases, any>) => ApplicationSync<AppModel, F, Cases>;
496
501
  //#endregion
497
502
  //#region src/mount.d.ts
498
503
  /**
@@ -541,80 +546,8 @@ interface Mounted<Model, Message> {
541
546
  readonly dispose: () => Promise<void>;
542
547
  }
543
548
  /** The application's Message union, as `Surface.application` types it. */
544
- type MessageOf<App> = App extends RunnableApplication<any, any, any, any> ? Schema.Schema.Type<App['Message']> : never;
545
- export declare const mount: <Model, F extends Schema.Struct.Fields, Cases extends Record<string, Schema.Struct.Fields>, Fields extends Schema.Struct.Fields, Ms extends readonly unknown[], Resources = never, Principal = unknown>(app: RunnableApplication<Model, F, Cases, Resources>, sync: DefinedSync<Model, Fields, MessageOf<RunnableApplication<Model, F, Cases, Resources>>, Ms, Principal>, options: MountOptions<Model, MessageOf<RunnableApplication<Model, F, Cases, Resources>>, Schema.Struct.Type<Fields>, Resources>) => Mounted<Model, MessageOf<RunnableApplication<Model, F, Cases, Resources>>>;
546
- //#endregion
547
- //#region src/lww.d.ts
548
- /** A logical write time; replica ids break concurrent ties using UTF-16 order. */
549
- declare const Stamp: Schema.Struct<{
550
- readonly counter: Schema.Number;
551
- readonly replicaId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/ReplicaId">;
552
- }>;
553
- declare const ClockState: Schema.Struct<{
554
- readonly schemaVersion: Schema.Literal<1>;
555
- readonly documentId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/DocumentId">;
556
- readonly replicaId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/ReplicaId">;
557
- readonly revision: Schema.Number;
558
- }>;
559
- type LwwClockState = typeof ClockState.Type;
560
- interface LwwClock {
561
- /** Persists a timestamp beyond the saved counter and supplied observation. */
562
- next: (observedCounter?: number) => Effect.Effect<typeof Stamp.Type, StorageError>;
563
- /** Drains accepted allocations, then closes storage. Repeated calls no-op. */
564
- close: Effect.Effect<void>;
565
- }
566
- /**
567
- * Opens a durable clock over the caller's storage.
568
- *
569
- * Allocations are serialized through a `SynchronizedRef` and each persists before
570
- * its stamp is returned. A crash after the save may skip a timestamp but never
571
- * reuse one. Storage is owned by the caller; a failed open closes it so a partial
572
- * initialization does not leak the connection.
573
- */
574
- export declare const openLwwClock: (options: {
575
- readonly documentId: DocumentId;
576
- readonly replicaId: ReplicaId;
577
- readonly storage: Storage;
578
- }) => Effect.Effect<{
579
- next: (observedCounter?: any) => Effect.Effect<{
580
- readonly counter: number;
581
- readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
582
- }, StorageError, never>;
583
- close: Effect.Effect<void, never, never>;
584
- }, StorageError | UnsupportedClockVersionError, never>;
585
- /**
586
- * A schema and reducer helper for a last-writer-wins register.
587
- * Allocate a unique stamp per write before dispatch, and retain it in the Message.
588
- * Merge is for decoded values; the application's schema validates wire input.
589
- */
590
- export declare const lwwRegister: <Value, Encoded, RD, RE>(value: Schema.Codec<Value, Encoded, RD, RE>) => {
591
- schema: Schema.Struct<{
592
- readonly stamp: Schema.Struct<{
593
- readonly counter: Schema.Number;
594
- readonly replicaId: Schema.brand<Schema.NonEmptyString, "@foldkit-sync/ReplicaId">;
595
- }>;
596
- readonly value: Schema.Codec<Value, Encoded, RD, RE>;
597
- }>;
598
- merge: (left: {
599
- readonly stamp: {
600
- readonly counter: number;
601
- readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
602
- };
603
- readonly value: Value;
604
- }, right: {
605
- readonly stamp: {
606
- readonly counter: number;
607
- readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
608
- };
609
- readonly value: Value;
610
- }) => {
611
- readonly stamp: {
612
- readonly counter: number;
613
- readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
614
- };
615
- readonly value: Value;
616
- };
617
- };
549
+ type MessageOf<App> = App extends RunnableApplication<any, any, any, any> ? Schema$1.Schema.Type<App['Message']> : never;
550
+ export declare const mount: <Model, F extends Schema$1.Struct.Fields, Cases extends Record<string, Schema$1.Struct.Fields>, Fields extends Schema$1.Struct.Fields, Ms extends readonly unknown[], Resources = never, Principal = unknown>(app: RunnableApplication<Model, F, Cases, Resources>, sync: DefinedSync<Model, Fields, MessageOf<RunnableApplication<Model, F, Cases, Resources>>, Ms, Principal>, options: MountOptions<Model, MessageOf<RunnableApplication<Model, F, Cases, Resources>>, Schema$1.Struct.Type<Fields>, Resources>) => Mounted<Model, MessageOf<RunnableApplication<Model, F, Cases, Resources>>>;
618
551
  //#endregion
619
552
  //#region src/presence.d.ts
620
553
  /** One peer's presence. A `null` value means the peer left. */
@@ -718,5 +651,196 @@ export declare const servePresence: <Update>(socket: SocketLike, hub: PresenceHu
718
651
  readonly peerId: string;
719
652
  }) => (() => void);
720
653
  //#endregion
721
- export type { ApplicationSync, AuthorizePolicy, AuthorizeRequest, Checkpoint, CommittedOperation, DefinedSync, Exchange, ExchangeFrame, ExchangeReply, FragmentMessages, JournalContract, LwwClock, LwwClockState, MakeOptions, MountOptions, MountUrl, Mounted, MsgOf, Operation, PolicyJournalContract, Presence, PresenceChannel, PresenceHub, PresenceOptions, PresencePeer, PresenceUpdate, Replica, ReplicaError, ReplicaSnapshot, ReplicaState, ReplicaStatus, SocketLike, SocketOptions, Storage, Sync, SyncDefinition, SyncFragment, TransportClient, TransportShape };
654
+ //#region src/lww.d.ts
655
+ /** A logical write time; replica ids break concurrent ties using UTF-16 order. */
656
+ declare const Stamp: Schema$1.Struct<{
657
+ readonly counter: Schema$1.Number;
658
+ readonly replicaId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/ReplicaId">;
659
+ }>;
660
+ declare const ClockState: Schema$1.Struct<{
661
+ readonly schemaVersion: Schema$1.Literal<1>;
662
+ readonly documentId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/DocumentId">;
663
+ readonly replicaId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/ReplicaId">;
664
+ readonly revision: Schema$1.Number;
665
+ }>;
666
+ type LwwClockState = typeof ClockState.Type;
667
+ interface LwwClock {
668
+ /** Persists a timestamp beyond the saved counter and supplied observation. */
669
+ next: (observedCounter?: number) => Effect.Effect<typeof Stamp.Type, StorageError>;
670
+ /** Drains accepted allocations, then closes storage. Repeated calls no-op. */
671
+ close: Effect.Effect<void>;
672
+ }
673
+ /**
674
+ * Opens a durable clock over the caller's storage.
675
+ *
676
+ * Allocations are serialized through a `SynchronizedRef` and each persists before
677
+ * its stamp is returned. A crash after the save may skip a timestamp but never
678
+ * reuse one. Storage is owned by the caller; a failed open closes it so a partial
679
+ * initialization does not leak the connection.
680
+ */
681
+ export declare const openLwwClock: (options: {
682
+ readonly documentId: DocumentId;
683
+ readonly replicaId: ReplicaId;
684
+ readonly storage: Storage;
685
+ }) => Effect.Effect<{
686
+ next: (observedCounter?: any) => Effect.Effect<{
687
+ readonly counter: number;
688
+ readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
689
+ }, StorageError, never>;
690
+ close: Effect.Effect<void, never, never>;
691
+ }, StorageError | UnsupportedClockVersionError, never>;
692
+ /**
693
+ * A schema and reducer helper for a last-writer-wins register.
694
+ * Allocate a unique stamp per write before dispatch, and retain it in the Message.
695
+ * Merge is for decoded values; the application's schema validates wire input.
696
+ */
697
+ export declare const lwwRegister: <Value, Encoded, RD, RE>(value: Schema$1.Codec<Value, Encoded, RD, RE>) => {
698
+ schema: Schema$1.Struct<{
699
+ readonly stamp: Schema$1.Struct<{
700
+ readonly counter: Schema$1.Number;
701
+ readonly replicaId: Schema$1.brand<Schema$1.NonEmptyString, "@foldkit-sync/ReplicaId">;
702
+ }>;
703
+ readonly value: Schema$1.Codec<Value, Encoded, RD, RE>;
704
+ }>;
705
+ merge: (left: {
706
+ readonly stamp: {
707
+ readonly counter: number;
708
+ readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
709
+ };
710
+ readonly value: Value;
711
+ }, right: {
712
+ readonly stamp: {
713
+ readonly counter: number;
714
+ readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
715
+ };
716
+ readonly value: Value;
717
+ }) => {
718
+ readonly stamp: {
719
+ readonly counter: number;
720
+ readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
721
+ };
722
+ readonly value: Value;
723
+ };
724
+ };
725
+ //#endregion
726
+ //#region src/index.d.ts
727
+ /**
728
+ * The contract `Sync.define` and `Sync.forApplication(App).make` produce: the
729
+ * wire codecs, the server journal's contract, and `openReplica`.
730
+ *
731
+ * This is the type; `Sync` is also the value namespace below, the way
732
+ * `Effect.Effect` is both.
733
+ */
734
+ export type Sync<Message, Shared> = Sync$1<Message, Shared>;
735
+ /** The package's public surface, grouped. Each entry is the exported function itself. */
736
+ export declare const Sync: {
737
+ /** Derives a sync contract from a Foldkit application: `Sync.forApplication(App).make({…})`. */
738
+ forApplication: <AppModel, F extends import("effect/Schema").Struct.Fields, Cases extends Record<string, import("effect/Schema").Struct.Fields>>(app: import("foldkit-surface").RunnableApplication<AppModel, F, Cases, any>) => ApplicationSync<AppModel, F, Cases>;
739
+ /** The protocol primitive, for a client with no Foldkit application to derive from. */
740
+ define: <Message, Shared, MessageEncoded, SharedEncoded>(definition: SyncDefinition<Message, Shared, MessageEncoded, SharedEncoded>) => Sync$1<Message, Shared>;
741
+ /** Runs a Foldkit application over an open replica with one reducer. */
742
+ mount: <Model, F extends import("effect/Schema").Struct.Fields, Cases extends Record<string, import("effect/Schema").Struct.Fields>, Fields extends import("effect/Schema").Struct.Fields, Ms extends readonly unknown[], Resources = never, Principal = unknown>(app: import("foldkit-surface").RunnableApplication<Model, F, Cases, Resources>, sync: DefinedSync<Model, Fields, import("effect/Schema").Schema.Type<import("foldkit/message").MessageUnion<Cases>>, Ms, Principal>, options: MountOptions<Model, import("effect/Schema").Schema.Type<import("foldkit/message").MessageUnion<Cases>>, import("effect/Schema").Struct.Type<Fields>, Resources>) => Mounted<Model, import("effect/Schema").Schema.Type<import("foldkit/message").MessageUnion<Cases>>>;
743
+ /** Counters and a histogram an application can scrape. */
744
+ metrics: {
745
+ exchanges: import("effect/Metric").Counter<number>;
746
+ applied: import("effect/Metric").Counter<number>;
747
+ checkpoints: import("effect/Metric").Counter<number>;
748
+ exchangePending: import("effect/Metric").Histogram<number>;
749
+ };
750
+ /** The only storage adapter: one IndexedDB database per document/replica. */
751
+ indexedDb: (name: string | import("effect/Config").Config<string>, factory?: IDBFactory | undefined) => import("effect/Effect").Effect<Storage, StorageError, import("effect/Scope").Scope>;
752
+ /** The `Transport` service's layers, and the bridges to and from a promise client. */
753
+ transport: {
754
+ /** A reconnecting WebSocket client layer. */
755
+ socket: (options: SocketOptions) => import("effect/Layer").Layer<Transport, TransportError>;
756
+ /** An in-process layer, for tests and single-process demos. */
757
+ loopback: (handler: (cursor: number, pending: ReadonlyArray<Operation>) => unknown | Promise<unknown>) => import("effect/Layer").Layer<Transport>;
758
+ /** Wraps the promise-based client the replica already speaks. */
759
+ fromPromise: (transport: TransportClient) => import("effect/Layer").Layer<Transport>;
760
+ /** Bridges the service back to that promise client. */
761
+ toPromise: (transport: TransportShape) => TransportClient;
762
+ /** The server side of one accepted socket connection. */
763
+ serve: (socket: SocketLike, options: {
764
+ readonly exchange: (cursor: number, pending: ReadonlyArray<Operation>) => unknown | Promise<unknown>;
765
+ }) => (() => void);
766
+ /** The default socket factory: the platform `WebSocket`. */
767
+ nativeSocket: (url: string) => SocketLike;
768
+ };
769
+ /** An ephemeral, TTL'd peer registry, deliberately outside the durable log. */
770
+ presence: {
771
+ make: <Update>(options: PresenceOptions<Update>) => import("effect/Effect").Effect<{
772
+ set: (value: Update) => import("effect/Effect").Effect<void, never, never>;
773
+ leave: import("effect/Effect").Effect<void, never, never>;
774
+ peers: import("effect/Effect").Effect<{
775
+ id: string;
776
+ value: Update;
777
+ updatedAt: number;
778
+ }[], never, never>;
779
+ prune: import("effect/Effect").Effect<void, never, never>;
780
+ subscribe: (listener: () => void) => () => boolean;
781
+ changes: import("effect/Stream").Stream<{
782
+ id: string;
783
+ value: Update;
784
+ updatedAt: number;
785
+ }[], never, never>;
786
+ close: import("effect/Effect").Effect<void, never, never>;
787
+ }, never, import("effect/Scope").Scope>;
788
+ /** Broadcasts presence updates among connected peers, on the server. */
789
+ hub: <Update>() => PresenceHub<Update>;
790
+ /** Serves presence frames on an accepted socket, stamping the connection's identity. */
791
+ serve: <Update>(socket: SocketLike, hub: PresenceHub<Update>, options: {
792
+ readonly peerId: string;
793
+ }) => (() => void);
794
+ socketChannel: <Update>(socket: SocketLike) => import("effect/Effect").Effect<PresenceChannel<Update>, never, import("effect/Scope").Scope>;
795
+ loopbackChannel: <Update>() => import("effect/Effect").Effect<{
796
+ updates: import("effect/PubSub").PubSub<PresenceUpdate<Update>>;
797
+ publish: (update: PresenceUpdate<Update>) => import("effect/Effect").Effect<boolean, never, never>;
798
+ }, never, never>;
799
+ };
800
+ /** Last-writer-wins registers (experimental): a per-field merge on logical time. */
801
+ lww: {
802
+ register: <Value, Encoded, RD, RE>(value: import("effect/Schema").Codec<Value, Encoded, RD, RE>) => {
803
+ schema: import("effect/Schema").Struct<{
804
+ readonly stamp: import("effect/Schema").Struct<{
805
+ readonly counter: import("effect/Schema").Number;
806
+ readonly replicaId: import("effect/Schema").brand<import("effect/Schema").NonEmptyString, "@foldkit-sync/ReplicaId">;
807
+ }>;
808
+ readonly value: import("effect/Schema").Codec<Value, Encoded, RD, RE>;
809
+ }>;
810
+ merge: (left: {
811
+ readonly stamp: {
812
+ readonly counter: number;
813
+ readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
814
+ };
815
+ readonly value: Value;
816
+ }, right: {
817
+ readonly stamp: {
818
+ readonly counter: number;
819
+ readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
820
+ };
821
+ readonly value: Value;
822
+ }) => {
823
+ readonly stamp: {
824
+ readonly counter: number;
825
+ readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
826
+ };
827
+ readonly value: Value;
828
+ };
829
+ };
830
+ /** The durable counter a stamp is allocated from, before dispatch. */
831
+ openClock: (options: {
832
+ readonly documentId: DocumentId;
833
+ readonly replicaId: ReplicaId;
834
+ readonly storage: Storage;
835
+ }) => import("effect/Effect").Effect<{
836
+ next: (observedCounter?: any) => import("effect/Effect").Effect<{
837
+ readonly counter: number;
838
+ readonly replicaId: string & import("effect/Brand").Brand<"@foldkit-sync/ReplicaId">;
839
+ }, StorageError, never>;
840
+ close: import("effect/Effect").Effect<void, never, never>;
841
+ }, StorageError | UnsupportedClockVersionError, never>;
842
+ };
843
+ };
844
+ //#endregion
845
+ export type { ApplicationSync, AuthorizePolicy, AuthorizeRequest, Checkpoint, CommittedOperation, DefinedSync, Exchange, ExchangeFrame, ExchangeReply, FragmentMessages, JournalContract, LwwClock, LwwClockState, MakeOptions, MountOptions, MountUrl, Mounted, MsgOf, Operation, PolicyJournalContract, Presence, PresenceChannel, PresenceHub, PresenceOptions, PresencePeer, PresenceUpdate, Replica, ReplicaError, ReplicaSnapshot, ReplicaState, ReplicaStatus, SocketLike, SocketOptions, Storage, SyncDefinition, SyncFragment, TransportClient, TransportShape };
722
846
  //# sourceMappingURL=index.d.mts.map