tinybase 6.1.0-beta.0 → 6.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/@types/_internal/ui-react/with-schemas/index.d.ts +1 -1
  2. package/@types/common/index.d.ts +4 -4
  3. package/@types/common/with-schemas/index.d.ts +4 -4
  4. package/@types/index.d.ts +1 -1
  5. package/@types/persisters/persister-automerge/index.d.ts +1 -1
  6. package/@types/persisters/persister-automerge/with-schemas/index.d.ts +1 -1
  7. package/@types/persisters/persister-cr-sqlite-wasm/index.d.ts +1 -1
  8. package/@types/persisters/persister-cr-sqlite-wasm/with-schemas/index.d.ts +1 -1
  9. package/@types/persisters/persister-electric-sql/index.d.ts +4 -4
  10. package/@types/persisters/persister-electric-sql/with-schemas/index.d.ts +4 -4
  11. package/@types/persisters/persister-expo-sqlite/index.d.ts +1 -1
  12. package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.ts +1 -1
  13. package/@types/persisters/persister-libsql/index.d.ts +1 -1
  14. package/@types/persisters/persister-libsql/with-schemas/index.d.ts +1 -1
  15. package/@types/persisters/persister-partykit-client/index.d.ts +1 -1
  16. package/@types/persisters/persister-partykit-client/with-schemas/index.d.ts +1 -1
  17. package/@types/persisters/persister-partykit-server/index.d.ts +7 -7
  18. package/@types/persisters/persister-partykit-server/with-schemas/index.d.ts +1 -1
  19. package/@types/persisters/persister-pglite/index.d.ts +1 -1
  20. package/@types/persisters/persister-pglite/with-schemas/index.d.ts +1 -1
  21. package/@types/persisters/persister-postgres/index.d.ts +1 -1
  22. package/@types/persisters/persister-postgres/with-schemas/index.d.ts +1 -1
  23. package/@types/persisters/persister-powersync/index.d.ts +1 -1
  24. package/@types/persisters/persister-powersync/with-schemas/index.d.ts +1 -1
  25. package/@types/persisters/persister-sqlite3/index.d.ts +1 -1
  26. package/@types/persisters/persister-sqlite3/with-schemas/index.d.ts +1 -1
  27. package/@types/persisters/persister-yjs/index.d.ts +1 -1
  28. package/@types/persisters/persister-yjs/with-schemas/index.d.ts +1 -1
  29. package/@types/synchronizers/synchronizer-ws-client/index.d.ts +1 -1
  30. package/@types/synchronizers/synchronizer-ws-client/with-schemas/index.d.ts +1 -1
  31. package/@types/synchronizers/synchronizer-ws-server/index.d.ts +1 -1
  32. package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.ts +1 -1
  33. package/@types/synchronizers/synchronizer-ws-server-durable-object/index.d.ts +1 -1
  34. package/@types/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.d.ts +1 -1
  35. package/@types/ui-react/index.d.ts +3 -3
  36. package/@types/ui-react/with-schemas/index.d.ts +1 -1
  37. package/@types/ui-react-dom/index.d.ts +1 -1
  38. package/@types/ui-react-dom/with-schemas/index.d.ts +1 -1
  39. package/@types/ui-react-inspector/with-schemas/index.d.ts +1 -1
  40. package/@types/with-schemas/index.d.ts +1 -1
  41. package/index.js +1579 -1567
  42. package/indexes/index.js +15 -3
  43. package/indexes/with-schemas/index.js +15 -3
  44. package/min/index.js +1 -1
  45. package/min/index.js.gz +0 -0
  46. package/min/indexes/index.js +1 -1
  47. package/min/indexes/index.js.gz +0 -0
  48. package/min/indexes/with-schemas/index.js +1 -1
  49. package/min/indexes/with-schemas/index.js.gz +0 -0
  50. package/min/persisters/index.js +1 -1
  51. package/min/persisters/index.js.gz +0 -0
  52. package/min/persisters/with-schemas/index.js +1 -1
  53. package/min/persisters/with-schemas/index.js.gz +0 -0
  54. package/min/ui-react/index.js +1 -1
  55. package/min/ui-react/index.js.gz +0 -0
  56. package/min/ui-react/with-schemas/index.js +1 -1
  57. package/min/ui-react/with-schemas/index.js.gz +0 -0
  58. package/min/with-schemas/index.js +1 -1
  59. package/min/with-schemas/index.js.gz +0 -0
  60. package/package.json +7 -10
  61. package/persisters/index.js +95 -95
  62. package/persisters/with-schemas/index.js +95 -95
  63. package/readme.md +13 -13
  64. package/releases.md +25 -25
  65. package/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  66. package/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
  67. package/ui-react/index.js +64 -53
  68. package/ui-react/with-schemas/index.js +64 -53
  69. package/ui-react-dom/index.js +3 -3
  70. package/ui-react-dom/with-schemas/index.js +3 -3
  71. package/ui-react-inspector/index.js +4 -4
  72. package/ui-react-inspector/with-schemas/index.js +4 -4
  73. package/with-schemas/index.js +1579 -1567
  74. package/@types/_internal/queries/index.d.cts +0 -0
  75. package/@types/_internal/queries/with-schemas/index.d.cts +0 -22
  76. package/@types/_internal/store/index.d.cts +0 -3
  77. package/@types/_internal/store/with-schemas/index.d.cts +0 -106
  78. package/@types/_internal/ui-react/index.d.cts +0 -0
  79. package/@types/_internal/ui-react/with-schemas/index.d.cts +0 -1130
  80. package/@types/checkpoints/index.d.cts +0 -1059
  81. package/@types/checkpoints/with-schemas/index.d.cts +0 -1151
  82. package/@types/common/index.d.cts +0 -158
  83. package/@types/common/with-schemas/index.d.cts +0 -158
  84. package/@types/index.d.cts +0 -17
  85. package/@types/indexes/index.d.cts +0 -1064
  86. package/@types/indexes/with-schemas/index.d.cts +0 -1210
  87. package/@types/mergeable-store/index.d.cts +0 -1139
  88. package/@types/mergeable-store/with-schemas/index.d.cts +0 -1628
  89. package/@types/metrics/index.d.cts +0 -917
  90. package/@types/metrics/with-schemas/index.d.cts +0 -1004
  91. package/@types/persisters/index.d.cts +0 -1877
  92. package/@types/persisters/persister-automerge/index.d.cts +0 -165
  93. package/@types/persisters/persister-automerge/with-schemas/index.d.cts +0 -180
  94. package/@types/persisters/persister-browser/index.d.cts +0 -185
  95. package/@types/persisters/persister-browser/with-schemas/index.d.cts +0 -208
  96. package/@types/persisters/persister-cr-sqlite-wasm/index.d.cts +0 -159
  97. package/@types/persisters/persister-cr-sqlite-wasm/with-schemas/index.d.cts +0 -178
  98. package/@types/persisters/persister-durable-object-storage/index.d.cts +0 -122
  99. package/@types/persisters/persister-durable-object-storage/with-schemas/index.d.cts +0 -136
  100. package/@types/persisters/persister-electric-sql/index.d.cts +0 -185
  101. package/@types/persisters/persister-electric-sql/with-schemas/index.d.cts +0 -204
  102. package/@types/persisters/persister-expo-sqlite/index.d.cts +0 -186
  103. package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.cts +0 -205
  104. package/@types/persisters/persister-file/index.d.cts +0 -94
  105. package/@types/persisters/persister-file/with-schemas/index.d.cts +0 -107
  106. package/@types/persisters/persister-indexed-db/index.d.cts +0 -120
  107. package/@types/persisters/persister-indexed-db/with-schemas/index.d.cts +0 -135
  108. package/@types/persisters/persister-libsql/index.d.cts +0 -158
  109. package/@types/persisters/persister-libsql/with-schemas/index.d.cts +0 -177
  110. package/@types/persisters/persister-partykit-client/index.d.cts +0 -195
  111. package/@types/persisters/persister-partykit-client/with-schemas/index.d.cts +0 -210
  112. package/@types/persisters/persister-partykit-server/index.d.cts +0 -650
  113. package/@types/persisters/persister-partykit-server/with-schemas/index.d.cts +0 -695
  114. package/@types/persisters/persister-pglite/index.d.cts +0 -177
  115. package/@types/persisters/persister-pglite/with-schemas/index.d.cts +0 -196
  116. package/@types/persisters/persister-postgres/index.d.cts +0 -166
  117. package/@types/persisters/persister-postgres/with-schemas/index.d.cts +0 -185
  118. package/@types/persisters/persister-powersync/index.d.cts +0 -174
  119. package/@types/persisters/persister-powersync/with-schemas/index.d.cts +0 -193
  120. package/@types/persisters/persister-remote/index.d.cts +0 -117
  121. package/@types/persisters/persister-remote/with-schemas/index.d.cts +0 -133
  122. package/@types/persisters/persister-sqlite-wasm/index.d.cts +0 -175
  123. package/@types/persisters/persister-sqlite-wasm/with-schemas/index.d.cts +0 -195
  124. package/@types/persisters/persister-sqlite3/index.d.cts +0 -176
  125. package/@types/persisters/persister-sqlite3/with-schemas/index.d.cts +0 -195
  126. package/@types/persisters/persister-yjs/index.d.cts +0 -161
  127. package/@types/persisters/persister-yjs/with-schemas/index.d.cts +0 -176
  128. package/@types/persisters/with-schemas/index.d.cts +0 -2054
  129. package/@types/queries/index.d.cts +0 -3695
  130. package/@types/queries/with-schemas/index.d.cts +0 -4016
  131. package/@types/relationships/index.d.cts +0 -1320
  132. package/@types/relationships/with-schemas/index.d.cts +0 -1474
  133. package/@types/store/index.d.cts +0 -7598
  134. package/@types/store/with-schemas/index.d.cts +0 -9278
  135. package/@types/synchronizers/index.d.cts +0 -485
  136. package/@types/synchronizers/synchronizer-broadcast-channel/index.d.cts +0 -121
  137. package/@types/synchronizers/synchronizer-broadcast-channel/with-schemas/index.d.cts +0 -137
  138. package/@types/synchronizers/synchronizer-local/index.d.cts +0 -95
  139. package/@types/synchronizers/synchronizer-local/with-schemas/index.d.cts +0 -114
  140. package/@types/synchronizers/synchronizer-ws-client/index.d.cts +0 -160
  141. package/@types/synchronizers/synchronizer-ws-client/with-schemas/index.d.cts +0 -179
  142. package/@types/synchronizers/synchronizer-ws-server/index.d.cts +0 -736
  143. package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.cts +0 -765
  144. package/@types/synchronizers/synchronizer-ws-server-durable-object/index.d.cts +0 -311
  145. package/@types/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.d.cts +0 -349
  146. package/@types/synchronizers/synchronizer-ws-server-simple/index.d.cts +0 -144
  147. package/@types/synchronizers/synchronizer-ws-server-simple/with-schemas/index.d.cts +0 -144
  148. package/@types/synchronizers/with-schemas/index.d.cts +0 -503
  149. package/@types/ui-react/index.d.cts +0 -16640
  150. package/@types/ui-react/with-schemas/index.d.cts +0 -17281
  151. package/@types/ui-react-dom/index.d.cts +0 -1862
  152. package/@types/ui-react-dom/with-schemas/index.d.cts +0 -1994
  153. package/@types/ui-react-inspector/index.d.cts +0 -79
  154. package/@types/ui-react-inspector/with-schemas/index.d.cts +0 -1985
  155. package/@types/with-schemas/index.d.cts +0 -17
@@ -1,3 +1,4 @@
1
+ import type {ComponentType, ReactElement} from 'react';
1
2
  import type {Checkpoints} from '../../../checkpoints/with-schemas/index.d.ts';
2
3
  import type {Callback, Id} from '../../../common/with-schemas/index.d.ts';
3
4
  import type {Indexes} from '../../../indexes/with-schemas/index.d.ts';
@@ -18,7 +19,6 @@ import type {
18
19
  TableIdFromSchema,
19
20
  ValueIdFromSchema,
20
21
  } from '../../store/with-schemas/index.d.ts';
21
- import type {ComponentType, ReactElement} from 'react';
22
22
 
23
23
  type StoreOrStoreId<Schemas extends OptionalSchemas> = Store<Schemas> | Id;
24
24
 
@@ -33,10 +33,10 @@ export type Ids = Id[];
33
33
  export type Id = string;
34
34
 
35
35
  /**
36
- * The Id type is a simple alias for the union of a string or `null` value,
37
- * where the string should be considered to be the key of an objects (such as a
38
- * Row Id string used in a Table), and typically `null` indicates a wildcard -
39
- * such as when used in the Store addRowListener method.
36
+ * The IdOrNull type is a simple alias for the union of a string or `null`
37
+ * value, where the string should be considered to be the key of an objects
38
+ * (such as a Row Id string used in a Table), and typically `null` indicates a
39
+ * wildcard - such as when used in the Store addRowListener method.
40
40
  * @category Identity
41
41
  * @since v1.0.0
42
42
  */
@@ -33,10 +33,10 @@ export type Ids = Id[];
33
33
  export type Id = string;
34
34
 
35
35
  /**
36
- * The Id type is a simple alias for the union of a string or `null` value,
37
- * where the string should be considered to be the key of an objects (such as a
38
- * Row Id string used in a Table), and typically `null` indicates a wildcard -
39
- * such as when used in the Store addRowListener method.
36
+ * The IdOrNull type is a simple alias for the union of a string or `null`
37
+ * value, where the string should be considered to be the key of an objects
38
+ * (such as a Row Id string used in a Table), and typically `null` indicates a
39
+ * wildcard - such as when used in the Store addRowListener method.
40
40
  * @category Identity
41
41
  * @since v1.0.0
42
42
  */
package/@types/index.d.ts CHANGED
@@ -10,8 +10,8 @@
10
10
  export * from './checkpoints/index.d.ts';
11
11
  export * from './common/index.d.ts';
12
12
  export * from './indexes/index.d.ts';
13
+ export * from './mergeable-store/index.d.ts';
13
14
  export * from './metrics/index.d.ts';
14
15
  export * from './queries/index.d.ts';
15
16
  export * from './relationships/index.d.ts';
16
- export * from './mergeable-store/index.d.ts';
17
17
  export * from './store/index.d.ts';
@@ -10,9 +10,9 @@
10
10
  * @module persister-automerge
11
11
  * @since v4.0.0
12
12
  */
13
+ import type {DocHandle} from '@automerge/automerge-repo';
13
14
  import type {Store} from '../../store/index.d.ts';
14
15
  import type {Persister} from '../index.d.ts';
15
- import type {DocHandle} from '@automerge/automerge-repo';
16
16
 
17
17
  /**
18
18
  * The AutomergePersister interface represents a Persister that lets you save
@@ -10,12 +10,12 @@
10
10
  * @module persister-automerge
11
11
  * @since v4.0.0
12
12
  */
13
+ import type {DocHandle} from '@automerge/automerge-repo';
13
14
  import type {
14
15
  OptionalSchemas,
15
16
  Store,
16
17
  } from '../../../store/with-schemas/index.d.ts';
17
18
  import type {Persister} from '../../with-schemas/index.d.ts';
18
- import type {DocHandle} from '@automerge/automerge-repo';
19
19
 
20
20
  /**
21
21
  * The AutomergePersister interface represents a Persister that lets you save
@@ -7,9 +7,9 @@
7
7
  * @module persister-cr-sqlite-wasm
8
8
  * @since v4.0.0
9
9
  */
10
+ import type {DB} from '@vlcn.io/crsqlite-wasm';
10
11
  import type {Store} from '../../store/index.d.ts';
11
12
  import type {DatabasePersisterConfig, Persister} from '../index.d.ts';
12
- import type {DB} from '@vlcn.io/crsqlite-wasm';
13
13
 
14
14
  /**
15
15
  * The CrSqliteWasmPersister interface represents a Persister that lets you save
@@ -7,6 +7,7 @@
7
7
  * @module persister-cr-sqlite-wasm
8
8
  * @since v4.0.0
9
9
  */
10
+ import type {DB} from '@vlcn.io/crsqlite-wasm';
10
11
  import type {
11
12
  OptionalSchemas,
12
13
  Store,
@@ -15,7 +16,6 @@ import type {
15
16
  DatabasePersisterConfig,
16
17
  Persister,
17
18
  } from '../../with-schemas/index.d.ts';
18
- import type {DB} from '@vlcn.io/crsqlite-wasm';
19
19
 
20
20
  /**
21
21
  * The CrSqliteWasmPersister interface represents a Persister that lets you save
@@ -7,9 +7,9 @@
7
7
  * @module persister-electric-sql
8
8
  * @since v4.6.0
9
9
  */
10
+ import type {ElectricClient} from 'electric-sql/client/model';
10
11
  import type {Store} from '../../store/index.d.ts';
11
12
  import type {DatabasePersisterConfig, Persister} from '../index.d.ts';
12
- import type {ElectricClient} from 'electric-sql/client/model';
13
13
 
14
14
  /**
15
15
  * The ElectricSqlPersister interface represents a Persister that lets you save
@@ -34,10 +34,10 @@ export interface ElectricSqlPersister extends Persister {
34
34
  * then gets the Electric client back out again.
35
35
  *
36
36
  * ```js yolo
37
- * import {schema} from './generated/client';
38
37
  * import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
39
38
  * import {createStore} from 'tinybase';
40
39
  * import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
40
+ * import {schema} from './generated/client';
41
41
  *
42
42
  * const electricClient = await electrify(
43
43
  * await ElectricDatabase.init('electric.db', ''),
@@ -103,10 +103,10 @@ export interface ElectricSqlPersister extends Persister {
103
103
  * into the Store.
104
104
  *
105
105
  * ```js yolo
106
- * import {schema} from './generated/client';
107
106
  * import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
108
107
  * import {createStore} from 'tinybase';
109
108
  * import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
109
+ * import {schema} from './generated/client';
110
110
  *
111
111
  * const electricClient = await electrify(
112
112
  * await ElectricDatabase.init('electric.db', ''),
@@ -144,10 +144,10 @@ export interface ElectricSqlPersister extends Persister {
144
144
  * a local ElectricSql database with tabular mapping.
145
145
  *
146
146
  * ```js yolo
147
- * import {schema} from './generated/client';
148
147
  * import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
149
148
  * import {createStore} from 'tinybase';
150
149
  * import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
150
+ * import {schema} from './generated/client';
151
151
  *
152
152
  * const electricClient = await electrify(
153
153
  * await ElectricDatabase.init('electric.db', ''),
@@ -7,6 +7,7 @@
7
7
  * @module persister-electric-sql
8
8
  * @since v4.6.0
9
9
  */
10
+ import type {ElectricClient} from 'electric-sql/client/model';
10
11
  import type {
11
12
  OptionalSchemas,
12
13
  Store,
@@ -15,7 +16,6 @@ import type {
15
16
  DatabasePersisterConfig,
16
17
  Persister,
17
18
  } from '../../with-schemas/index.d.ts';
18
- import type {ElectricClient} from 'electric-sql/client/model';
19
19
 
20
20
  /**
21
21
  * The ElectricSqlPersister interface represents a Persister that lets you save
@@ -41,10 +41,10 @@ export interface ElectricSqlPersister<Schemas extends OptionalSchemas>
41
41
  * then gets the Electric client back out again.
42
42
  *
43
43
  * ```js yolo
44
- * import {schema} from './generated/client';
45
44
  * import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
46
45
  * import {createStore} from 'tinybase';
47
46
  * import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
47
+ * import {schema} from './generated/client';
48
48
  *
49
49
  * const electricClient = await electrify(
50
50
  * await ElectricDatabase.init('electric.db', ''),
@@ -122,10 +122,10 @@ export interface ElectricSqlPersister<Schemas extends OptionalSchemas>
122
122
  * into the Store.
123
123
  *
124
124
  * ```js yolo
125
- * import {schema} from './generated/client';
126
125
  * import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
127
126
  * import {createStore} from 'tinybase';
128
127
  * import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
128
+ * import {schema} from './generated/client';
129
129
  *
130
130
  * const electricClient = await electrify(
131
131
  * await ElectricDatabase.init('electric.db', ''),
@@ -163,10 +163,10 @@ export interface ElectricSqlPersister<Schemas extends OptionalSchemas>
163
163
  * a local ElectricSql database with tabular mapping.
164
164
  *
165
165
  * ```js yolo
166
- * import {schema} from './generated/client';
167
166
  * import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
168
167
  * import {createStore} from 'tinybase';
169
168
  * import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
169
+ * import {schema} from './generated/client';
170
170
  *
171
171
  * const electricClient = await electrify(
172
172
  * await ElectricDatabase.init('electric.db', ''),
@@ -14,10 +14,10 @@
14
14
  * @module persister-expo-sqlite
15
15
  * @since v4.5.0
16
16
  */
17
+ import type {SQLiteDatabase} from 'expo-sqlite';
17
18
  import type {MergeableStore} from '../../mergeable-store/index.d.ts';
18
19
  import type {Store} from '../../store/index.d.ts';
19
20
  import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
20
- import type {SQLiteDatabase} from 'expo-sqlite';
21
21
 
22
22
  /**
23
23
  * The ExpoSqlitePersister interface represents a Persister that lets you save
@@ -14,6 +14,7 @@
14
14
  * @module persister-expo-sqlite
15
15
  * @since v4.5.0
16
16
  */
17
+ import type {SQLiteDatabase} from 'expo-sqlite';
17
18
  import type {MergeableStore} from '../../../mergeable-store/with-schemas/index.d.ts';
18
19
  import type {
19
20
  OptionalSchemas,
@@ -24,7 +25,6 @@ import type {
24
25
  Persister,
25
26
  Persists,
26
27
  } from '../../with-schemas/index.d.ts';
27
- import type {SQLiteDatabase} from 'expo-sqlite';
28
28
 
29
29
  /**
30
30
  * The ExpoSqlitePersister interface represents a Persister that lets you save
@@ -7,9 +7,9 @@
7
7
  * @module persister-libsql
8
8
  * @since v4.7.0
9
9
  */
10
+ import type {Client} from '@libsql/client';
10
11
  import type {Store} from '../../store/index.d.ts';
11
12
  import type {DatabasePersisterConfig, Persister} from '../index.d.ts';
12
- import type {Client} from '@libsql/client';
13
13
 
14
14
  /**
15
15
  * The LibSqlPersister interface represents a Persister that lets you save and
@@ -7,6 +7,7 @@
7
7
  * @module persister-libsql
8
8
  * @since v4.7.0
9
9
  */
10
+ import type {Client} from '@libsql/client';
10
11
  import type {
11
12
  OptionalSchemas,
12
13
  Store,
@@ -15,7 +16,6 @@ import type {
15
16
  DatabasePersisterConfig,
16
17
  Persister,
17
18
  } from '../../with-schemas/index.d.ts';
18
- import type {Client} from '@libsql/client';
19
19
 
20
20
  /**
21
21
  * The LibSqlPersister interface represents a Persister that lets you save and
@@ -17,9 +17,9 @@
17
17
  * @module persister-partykit-client
18
18
  * @since v4.3.0
19
19
  */
20
+ import type {PartySocket} from 'partysocket';
20
21
  import type {Store} from '../../store/index.d.ts';
21
22
  import type {Persister} from '../index.d.ts';
22
- import type {PartySocket} from 'partysocket';
23
23
 
24
24
  /**
25
25
  * The PartyKitPersister interface represents a Persister that lets you save and
@@ -17,12 +17,12 @@
17
17
  * @module persister-partykit-client
18
18
  * @since v4.3.0
19
19
  */
20
+ import type {PartySocket} from 'partysocket';
20
21
  import type {
21
22
  OptionalSchemas,
22
23
  Store,
23
24
  } from '../../../store/with-schemas/index.d.ts';
24
25
  import type {Persister} from '../../with-schemas/index.d.ts';
25
- import type {PartySocket} from 'partysocket';
26
26
 
27
27
  /**
28
28
  * The PartyKitPersister interface represents a Persister that lets you save and
@@ -16,6 +16,13 @@
16
16
  * @module persister-partykit-server
17
17
  * @since v4.3.0
18
18
  */
19
+ import type {
20
+ Connection,
21
+ Party,
22
+ Request,
23
+ Server,
24
+ Storage,
25
+ } from 'partykit/server';
19
26
  import type {Id} from '../../common/index.d.ts';
20
27
  import type {
21
28
  Cell,
@@ -25,13 +32,6 @@ import type {
25
32
  Value,
26
33
  ValueOrUndefined,
27
34
  } from '../../store/index.d.ts';
28
- import type {
29
- Connection,
30
- Party,
31
- Request,
32
- Server,
33
- Storage,
34
- } from 'partykit/server';
35
35
 
36
36
  /**
37
37
  * The TinyBasePartyKitServerConfig type describes the configuration of a
@@ -16,6 +16,7 @@
16
16
  * @module persister-partykit-server
17
17
  * @since v4.3.0
18
18
  */
19
+ import type {Connection, Party, Request, Server} from 'partykit/server';
19
20
  import type {Id} from '../../../common/with-schemas/index.d.ts';
20
21
  import type {
21
22
  Cell,
@@ -28,7 +29,6 @@ import type {
28
29
  Value,
29
30
  ValueOrUndefined,
30
31
  } from '../../../store/with-schemas/index.d.ts';
31
- import type {Connection, Party, Request, Server} from 'partykit/server';
32
32
 
33
33
  /**
34
34
  * The TinyBasePartyKitServerConfig type describes the configuration of a
@@ -6,10 +6,10 @@
6
6
  * @module persister-pglite
7
7
  * @since 5.2.0
8
8
  */
9
+ import type {PGlite} from '@electric-sql/pglite';
9
10
  import type {MergeableStore} from '../../mergeable-store/index.d.ts';
10
11
  import type {Store} from '../../store/index.d.ts';
11
12
  import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
12
- import type {PGlite} from '@electric-sql/pglite';
13
13
 
14
14
  /**
15
15
  * The PglitePersister interface represents a Persister that lets you save and
@@ -6,6 +6,7 @@
6
6
  * @module persister-pglite
7
7
  * @since 5.2.0
8
8
  */
9
+ import type {PGlite} from '@electric-sql/pglite';
9
10
  import type {MergeableStore} from '../../../mergeable-store/with-schemas/index.d.ts';
10
11
  import type {
11
12
  OptionalSchemas,
@@ -16,7 +17,6 @@ import type {
16
17
  Persister,
17
18
  Persists,
18
19
  } from '../../with-schemas/index.d.ts';
19
- import type {PGlite} from '@electric-sql/pglite';
20
20
 
21
21
  /**
22
22
  * The PglitePersister interface represents a Persister that lets you save and
@@ -6,10 +6,10 @@
6
6
  * @module persister-postgres
7
7
  * @since 5.2.0
8
8
  */
9
+ import type {Sql} from 'postgres';
9
10
  import type {MergeableStore} from '../../mergeable-store/index.d.ts';
10
11
  import type {Store} from '../../store/index.d.ts';
11
12
  import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
12
- import type {Sql} from 'postgres';
13
13
 
14
14
  /**
15
15
  * The PostgresPersister interface represents a Persister that lets you save and
@@ -6,6 +6,7 @@
6
6
  * @module persister-postgres
7
7
  * @since 5.2.0
8
8
  */
9
+ import type {Sql} from 'postgres';
9
10
  import type {MergeableStore} from '../../../mergeable-store/with-schemas/index.d.ts';
10
11
  import type {
11
12
  OptionalSchemas,
@@ -16,7 +17,6 @@ import type {
16
17
  Persister,
17
18
  Persists,
18
19
  } from '../../with-schemas/index.d.ts';
19
- import type {Sql} from 'postgres';
20
20
 
21
21
  /**
22
22
  * The PostgresPersister interface represents a Persister that lets you save and
@@ -7,9 +7,9 @@
7
7
  * @module persister-powersync
8
8
  * @since v4.8.0
9
9
  */
10
+ import type {AbstractPowerSyncDatabase} from '@powersync/common';
10
11
  import type {Store} from '../../store/index.d.ts';
11
12
  import type {DatabasePersisterConfig, Persister} from '../index.d.ts';
12
- import type {AbstractPowerSyncDatabase} from '@powersync/common';
13
13
 
14
14
  /**
15
15
  * The PowerSyncPersister interface represents a Persister that lets you save
@@ -7,6 +7,7 @@
7
7
  * @module persister-powersync
8
8
  * @since v4.8.0
9
9
  */
10
+ import type {AbstractPowerSyncDatabase} from '@powersync/common';
10
11
  import type {
11
12
  OptionalSchemas,
12
13
  Store,
@@ -15,7 +16,6 @@ import type {
15
16
  DatabasePersisterConfig,
16
17
  Persister,
17
18
  } from '../../with-schemas/index.d.ts';
18
- import type {AbstractPowerSyncDatabase} from '@powersync/common';
19
19
 
20
20
  /**
21
21
  * The PowerSyncPersister interface represents a Persister that lets you save
@@ -7,10 +7,10 @@
7
7
  * @module persister-sqlite3
8
8
  * @since v4.0.0
9
9
  */
10
+ import type {Database} from 'sqlite3';
10
11
  import type {MergeableStore} from '../../mergeable-store/index.d.ts';
11
12
  import type {Store} from '../../store/index.d.ts';
12
13
  import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
13
- import type {Database} from 'sqlite3';
14
14
 
15
15
  /**
16
16
  * The Sqlite3Persister interface represents a Persister that lets you save and
@@ -7,6 +7,7 @@
7
7
  * @module persister-sqlite3
8
8
  * @since v4.0.0
9
9
  */
10
+ import type {Database} from 'sqlite3';
10
11
  import type {MergeableStore} from '../../../mergeable-store/with-schemas/index.d.ts';
11
12
  import type {
12
13
  OptionalSchemas,
@@ -17,7 +18,6 @@ import type {
17
18
  Persister,
18
19
  Persists,
19
20
  } from '../../with-schemas/index.d.ts';
20
- import type {Database} from 'sqlite3';
21
21
 
22
22
  /**
23
23
  * The Sqlite3Persister interface represents a Persister that lets you save and
@@ -10,9 +10,9 @@
10
10
  * @module persister-yjs
11
11
  * @since v4.0.0
12
12
  */
13
+ import type {Doc as YDoc} from 'yjs';
13
14
  import type {Store} from '../../store/index.d.ts';
14
15
  import type {Persister} from '../index.d.ts';
15
- import type {Doc as YDoc} from 'yjs';
16
16
 
17
17
  /**
18
18
  * The YjsPersister interface represents a Persister that lets you save and load
@@ -10,12 +10,12 @@
10
10
  * @module persister-yjs
11
11
  * @since v4.0.0
12
12
  */
13
+ import type {Doc as YDoc} from 'yjs';
13
14
  import type {
14
15
  OptionalSchemas,
15
16
  Store,
16
17
  } from '../../../store/with-schemas/index.d.ts';
17
18
  import type {Persister} from '../../with-schemas/index.d.ts';
18
- import type {Doc as YDoc} from 'yjs';
19
19
 
20
20
  /**
21
21
  * The YjsPersister interface represents a Persister that lets you save and load
@@ -8,9 +8,9 @@
8
8
  * @module synchronizer-ws-client
9
9
  * @since v5.0.0
10
10
  */
11
+ import type {WebSocket as WsWebSocket} from 'ws';
11
12
  import type {MergeableStore} from '../../mergeable-store/index.d.ts';
12
13
  import type {Receive, Send, Synchronizer} from '../index.d.ts';
13
- import type {WebSocket as WsWebSocket} from 'ws';
14
14
 
15
15
  /**
16
16
  * The WebSocketTypes type represents the valid types of WebSocket that can be
@@ -8,10 +8,10 @@
8
8
  * @module synchronizer-ws-client
9
9
  * @since v5.0.0
10
10
  */
11
+ import type {WebSocket as WsWebSocket} from 'ws';
11
12
  import type {MergeableStore} from '../../../mergeable-store/with-schemas/index.d.ts';
12
13
  import type {OptionalSchemas} from '../../../store/with-schemas/index.d.ts';
13
14
  import type {Receive, Send, Synchronizer} from '../../with-schemas/index.d.ts';
14
- import type {WebSocket as WsWebSocket} from 'ws';
15
15
 
16
16
  /**
17
17
  * The WebSocketTypes type represents the valid types of WebSocket that can be
@@ -7,11 +7,11 @@
7
7
  * @module synchronizer-ws-server
8
8
  * @since v5.0.0
9
9
  */
10
+ import type {WebSocketServer} from 'ws';
10
11
  import type {Id, IdOrNull, Ids} from '../../common/index.d.ts';
11
12
  import type {MergeableStore} from '../../mergeable-store/index.d.ts';
12
13
  import type {Persister, Persists} from '../../persisters/index.d.ts';
13
14
  import type {IdAddedOrRemoved} from '../../store/index.d.ts';
14
- import type {WebSocketServer} from 'ws';
15
15
 
16
16
  /**
17
17
  * The PathIdsListener type describes a function that is used to listen to
@@ -7,6 +7,7 @@
7
7
  * @module synchronizer-ws-server
8
8
  * @since v5.0.0
9
9
  */
10
+ import type {WebSocketServer} from 'ws';
10
11
  import type {Id, IdOrNull, Ids} from '../../../common/with-schemas/index.d.ts';
11
12
  import type {MergeableStore} from '../../../mergeable-store/with-schemas/index.d.ts';
12
13
  import type {
@@ -17,7 +18,6 @@ import type {
17
18
  IdAddedOrRemoved,
18
19
  OptionalSchemas,
19
20
  } from '../../../store/with-schemas/index.d.ts';
20
- import type {WebSocketServer} from 'ws';
21
21
 
22
22
  /**
23
23
  * The PathIdsListener type describes a function that is used to listen to
@@ -9,9 +9,9 @@
9
9
  * @module synchronizer-ws-server-durable-object
10
10
  * @since v5.4.0
11
11
  */
12
+ import {DurableObject} from 'cloudflare:workers';
12
13
  import type {Id, IdAddedOrRemoved, Ids} from '../../index.d.ts';
13
14
  import type {Persister, Persists} from '../../persisters/index.d.ts';
14
- import {DurableObject} from 'cloudflare:workers';
15
15
 
16
16
  /**
17
17
  * A WsServerDurableObject is the server component (running as a Cloudflare
@@ -9,6 +9,7 @@
9
9
  * @module synchronizer-ws-server-durable-object
10
10
  * @since v5.4.0
11
11
  */
12
+ import {DurableObject} from 'cloudflare:workers';
12
13
  import type {
13
14
  Persister,
14
15
  Persists,
@@ -19,7 +20,6 @@ import type {
19
20
  Ids,
20
21
  OptionalSchemas,
21
22
  } from '../../../with-schemas/index.d.ts';
22
- import {DurableObject} from 'cloudflare:workers';
23
23
 
24
24
  /**
25
25
  * A WsServerDurableObject is the server component (running as a Cloudflare
@@ -22,6 +22,7 @@
22
22
  * @module ui-react
23
23
  * @since v1.0.0
24
24
  */
25
+ import type {ComponentType, ReactElement} from 'react';
25
26
  import type {
26
27
  CheckpointIds,
27
28
  CheckpointIdsListener,
@@ -102,7 +103,6 @@ import type {
102
103
  ValuesListener,
103
104
  } from '../store/index.d.ts';
104
105
  import type {Synchronizer} from '../synchronizers/index.d.ts';
105
- import type {ComponentType, ReactElement} from 'react';
106
106
 
107
107
  /**
108
108
  * The StoreOrStoreId type is used when you need to refer to a Store in a React
@@ -11815,7 +11815,7 @@ export function usePersisterOrPersisterById(
11815
11815
  // useProvidePersister
11816
11816
  export function useProvidePersister(
11817
11817
  persisterId: Id,
11818
- persister: AnyPersister | undefined,
11818
+ persister: AnyPersister,
11819
11819
  ): void;
11820
11820
 
11821
11821
  /**
@@ -12318,7 +12318,7 @@ export function useSynchronizerOrSynchronizerById(
12318
12318
  // useProvideSynchronizer
12319
12319
  export function useProvideSynchronizer(
12320
12320
  synchronizerId: Id,
12321
- synchronizer: Synchronizer | undefined,
12321
+ synchronizer: Synchronizer,
12322
12322
  ): void;
12323
12323
 
12324
12324
  /**
@@ -22,6 +22,7 @@
22
22
  * @module ui-react
23
23
  * @since v1.0.0
24
24
  */
25
+ import type {ReactElement} from 'react';
25
26
  import type {
26
27
  AllCellIdFromSchema,
27
28
  CellIdFromSchema,
@@ -152,7 +153,6 @@ import type {
152
153
  ValuesListener,
153
154
  } from '../../store/with-schemas/index.d.ts';
154
155
  import type {Synchronizer} from '../../synchronizers/with-schemas/index.d.ts';
155
- import type {ReactElement} from 'react';
156
156
 
157
157
  export type WithSchemas<Schemas extends OptionalSchemas> = {
158
158
  /**
@@ -10,6 +10,7 @@
10
10
  * @module ui-react-dom
11
11
  * @since v4.1.0
12
12
  */
13
+ import type {ComponentType} from 'react';
13
14
  import type {Id, Ids} from '../common/index.d.ts';
14
15
  import type {
15
16
  CellProps,
@@ -22,7 +23,6 @@ import type {
22
23
  StoreOrStoreId,
23
24
  ValueProps,
24
25
  } from '../ui-react/index.d.ts';
25
- import type {ComponentType} from 'react';
26
26
 
27
27
  /**
28
28
  * The CustomCell object is used to configure custom cell rendering in an HTML
@@ -10,6 +10,7 @@
10
10
  * @module ui-react-dom
11
11
  * @since v4.1.0
12
12
  */
13
+ import type {ComponentType} from 'react';
13
14
  import type {
14
15
  CellIdFromSchema,
15
16
  TableIdFromSchema,
@@ -29,7 +30,6 @@ import type {
29
30
  import type {Id, Ids} from '../../common/with-schemas/index.d.ts';
30
31
  import type {NoSchemas} from '../../store/index.d.ts';
31
32
  import type {OptionalSchemas} from '../../store/with-schemas/index.d.ts';
32
- import type {ComponentType} from 'react';
33
33
 
34
34
  /**
35
35
  * The CustomCell object is used to configure custom cell rendering in an HTML