tinybase 8.1.0-beta.1 → 8.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 (124) hide show
  1. package/@types/_internal/ui/index.d.ts +0 -0
  2. package/@types/_internal/ui/with-schemas/index.d.ts +47 -0
  3. package/@types/_internal/ui-react/with-schemas/index.d.ts +9 -31
  4. package/@types/omni/index.d.ts +0 -3
  5. package/@types/omni/with-schemas/index.d.ts +0 -3
  6. package/@types/ui-react/with-schemas/index.d.ts +10 -8
  7. package/@types/ui-react-dom/with-schemas/index.d.ts +6 -4
  8. package/@types/ui-svelte/index.d.ts +1458 -222
  9. package/@types/ui-svelte/with-schemas/index.d.ts +2482 -406
  10. package/checkpoints/index.js +4 -1
  11. package/checkpoints/with-schemas/index.js +4 -1
  12. package/common/index.js +4 -1
  13. package/common/with-schemas/index.js +4 -1
  14. package/index.js +4 -1
  15. package/indexes/index.js +4 -1
  16. package/indexes/with-schemas/index.js +4 -1
  17. package/mergeable-store/index.js +4 -1
  18. package/mergeable-store/with-schemas/index.js +4 -1
  19. package/metrics/index.js +4 -1
  20. package/metrics/with-schemas/index.js +4 -1
  21. package/min/omni/index.js +1 -1
  22. package/min/omni/index.js.gz +0 -0
  23. package/min/omni/with-schemas/index.js +1 -1
  24. package/min/omni/with-schemas/index.js.gz +0 -0
  25. package/min/ui-react/index.js +1 -1
  26. package/min/ui-react/index.js.gz +0 -0
  27. package/min/ui-react/with-schemas/index.js +1 -1
  28. package/min/ui-react/with-schemas/index.js.gz +0 -0
  29. package/min/ui-svelte/index.js +1 -1
  30. package/min/ui-svelte/index.js.gz +0 -0
  31. package/min/ui-svelte/with-schemas/index.js +1 -1
  32. package/min/ui-svelte/with-schemas/index.js.gz +0 -0
  33. package/omni/index.js +11 -4739
  34. package/omni/with-schemas/index.js +11 -4739
  35. package/package.json +8 -8
  36. package/persisters/index.js +4 -1
  37. package/persisters/persister-automerge/index.js +4 -1
  38. package/persisters/persister-automerge/with-schemas/index.js +4 -1
  39. package/persisters/persister-browser/index.js +4 -1
  40. package/persisters/persister-browser/with-schemas/index.js +4 -1
  41. package/persisters/persister-cr-sqlite-wasm/index.js +4 -1
  42. package/persisters/persister-cr-sqlite-wasm/with-schemas/index.js +4 -1
  43. package/persisters/persister-durable-object-sql-storage/index.js +4 -1
  44. package/persisters/persister-durable-object-sql-storage/with-schemas/index.js +4 -1
  45. package/persisters/persister-durable-object-storage/index.js +4 -1
  46. package/persisters/persister-durable-object-storage/with-schemas/index.js +4 -1
  47. package/persisters/persister-electric-sql/index.js +4 -1
  48. package/persisters/persister-electric-sql/with-schemas/index.js +4 -1
  49. package/persisters/persister-expo-sqlite/index.js +4 -1
  50. package/persisters/persister-expo-sqlite/with-schemas/index.js +4 -1
  51. package/persisters/persister-file/index.js +4 -1
  52. package/persisters/persister-file/with-schemas/index.js +4 -1
  53. package/persisters/persister-indexed-db/index.js +4 -1
  54. package/persisters/persister-indexed-db/with-schemas/index.js +4 -1
  55. package/persisters/persister-libsql/index.js +4 -1
  56. package/persisters/persister-libsql/with-schemas/index.js +4 -1
  57. package/persisters/persister-partykit-client/index.js +4 -1
  58. package/persisters/persister-partykit-client/with-schemas/index.js +4 -1
  59. package/persisters/persister-partykit-server/index.js +4 -1
  60. package/persisters/persister-partykit-server/with-schemas/index.js +4 -1
  61. package/persisters/persister-pglite/index.js +4 -1
  62. package/persisters/persister-pglite/with-schemas/index.js +4 -1
  63. package/persisters/persister-postgres/index.js +4 -1
  64. package/persisters/persister-postgres/with-schemas/index.js +4 -1
  65. package/persisters/persister-powersync/index.js +4 -1
  66. package/persisters/persister-powersync/with-schemas/index.js +4 -1
  67. package/persisters/persister-react-native-mmkv/index.js +4 -1
  68. package/persisters/persister-react-native-mmkv/with-schemas/index.js +4 -1
  69. package/persisters/persister-react-native-sqlite/index.js +4 -1
  70. package/persisters/persister-react-native-sqlite/with-schemas/index.js +4 -1
  71. package/persisters/persister-remote/index.js +4 -1
  72. package/persisters/persister-remote/with-schemas/index.js +4 -1
  73. package/persisters/persister-sqlite-bun/index.js +4 -1
  74. package/persisters/persister-sqlite-bun/with-schemas/index.js +4 -1
  75. package/persisters/persister-sqlite-wasm/index.js +4 -1
  76. package/persisters/persister-sqlite-wasm/with-schemas/index.js +4 -1
  77. package/persisters/persister-sqlite3/index.js +4 -1
  78. package/persisters/persister-sqlite3/with-schemas/index.js +4 -1
  79. package/persisters/persister-yjs/index.js +4 -1
  80. package/persisters/persister-yjs/with-schemas/index.js +4 -1
  81. package/persisters/with-schemas/index.js +4 -1
  82. package/queries/index.js +4 -1
  83. package/queries/with-schemas/index.js +4 -1
  84. package/relationships/index.js +4 -1
  85. package/relationships/with-schemas/index.js +4 -1
  86. package/schematizers/index.js +4 -1
  87. package/schematizers/schematizer-arktype/index.js +4 -1
  88. package/schematizers/schematizer-arktype/with-schemas/index.js +4 -1
  89. package/schematizers/schematizer-effect/index.js +4 -1
  90. package/schematizers/schematizer-effect/with-schemas/index.js +4 -1
  91. package/schematizers/schematizer-typebox/index.js +4 -1
  92. package/schematizers/schematizer-typebox/with-schemas/index.js +4 -1
  93. package/schematizers/schematizer-valibot/index.js +4 -1
  94. package/schematizers/schematizer-valibot/with-schemas/index.js +4 -1
  95. package/schematizers/schematizer-yup/index.js +4 -1
  96. package/schematizers/schematizer-yup/with-schemas/index.js +4 -1
  97. package/schematizers/schematizer-zod/index.js +4 -1
  98. package/schematizers/schematizer-zod/with-schemas/index.js +4 -1
  99. package/schematizers/with-schemas/index.js +4 -1
  100. package/store/index.js +4 -1
  101. package/store/with-schemas/index.js +4 -1
  102. package/synchronizers/index.js +4 -1
  103. package/synchronizers/synchronizer-broadcast-channel/index.js +4 -1
  104. package/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +4 -1
  105. package/synchronizers/synchronizer-local/index.js +4 -1
  106. package/synchronizers/synchronizer-local/with-schemas/index.js +4 -1
  107. package/synchronizers/synchronizer-ws-client/index.js +4 -1
  108. package/synchronizers/synchronizer-ws-client/with-schemas/index.js +4 -1
  109. package/synchronizers/synchronizer-ws-server/index.js +4 -1
  110. package/synchronizers/synchronizer-ws-server/with-schemas/index.js +4 -1
  111. package/synchronizers/synchronizer-ws-server-durable-object/index.js +4 -1
  112. package/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +4 -1
  113. package/synchronizers/synchronizer-ws-server-simple/index.js +4 -1
  114. package/synchronizers/synchronizer-ws-server-simple/with-schemas/index.js +4 -1
  115. package/synchronizers/with-schemas/index.js +4 -1
  116. package/ui-react/index.js +100 -100
  117. package/ui-react/with-schemas/index.js +100 -100
  118. package/ui-react-dom/index.js +4 -1
  119. package/ui-react-dom/with-schemas/index.js +4 -1
  120. package/ui-react-inspector/index.js +4 -1
  121. package/ui-react-inspector/with-schemas/index.js +4 -1
  122. package/ui-svelte/index.js +1016 -347
  123. package/ui-svelte/with-schemas/index.js +1002 -333
  124. package/with-schemas/index.js +4 -1
@@ -9,8 +9,8 @@
9
9
  * re-render when data changes.
10
10
  *
11
11
  * Hook parameters accept either plain values or reactive getter functions
12
- * (`R<T> = T | (() => T)`), so passing `() => tableId` from a `let`-bound
13
- * Svelte prop makes the hook re-execute whenever the prop changes.
12
+ * (`MaybeGetter<T> = T | (() => T)`), so passing `() => tableId` from a
13
+ * `let`-bound Svelte prop makes the hook re-execute whenever the prop changes.
14
14
  *
15
15
  * The components in this module provide a further abstraction over those hooks
16
16
  * to ease the composition of user interfaces that use TinyBase.
@@ -20,29 +20,80 @@
20
20
  * @since v8.1.0
21
21
  */
22
22
  import type {Component, Snippet} from 'svelte';
23
- import type {CheckpointIds, Checkpoints} from '../checkpoints/index.d.ts';
24
- import type {Id, Ids} from '../common/index.d.ts';
25
- import type {Indexes} from '../indexes/index.d.ts';
26
- import type {Metrics} from '../metrics/index.d.ts';
27
- import type {AnyPersister, Status} from '../persisters/index.d.ts';
28
- import type {Queries} from '../queries/index.d.ts';
29
- import type {Relationships} from '../relationships/index.d.ts';
23
+ import type {
24
+ CheckpointIds,
25
+ CheckpointIdsListener,
26
+ CheckpointListener,
27
+ Checkpoints,
28
+ } from '../checkpoints/index.d.ts';
29
+ import type {Id, IdOrNull, Ids} from '../common/index.d.ts';
30
+ import type {
31
+ Indexes,
32
+ SliceIdsListener,
33
+ SliceRowIdsListener,
34
+ } from '../indexes/index.d.ts';
35
+ import type {MetricListener, Metrics} from '../metrics/index.d.ts';
36
+ import type {
37
+ AnyPersister,
38
+ Status,
39
+ StatusListener,
40
+ } from '../persisters/index.d.ts';
41
+ import type {
42
+ ParamValueListener,
43
+ ParamValuesListener,
44
+ Queries,
45
+ ResultCellIdsListener,
46
+ ResultCellListener,
47
+ ResultRowCountListener,
48
+ ResultRowIdsListener,
49
+ ResultRowListener,
50
+ ResultSortedRowIdsListener,
51
+ ResultTableCellIdsListener,
52
+ ResultTableListener,
53
+ } from '../queries/index.d.ts';
54
+ import type {
55
+ LinkedRowIdsListener,
56
+ LocalRowIdsListener,
57
+ Relationships,
58
+ RemoteRowIdListener,
59
+ } from '../relationships/index.d.ts';
30
60
  import type {
31
61
  Cell,
62
+ CellIdsListener,
63
+ CellListener,
32
64
  CellOrUndefined,
65
+ HasCellListener,
66
+ HasRowListener,
67
+ HasTableCellListener,
68
+ HasTableListener,
69
+ HasTablesListener,
70
+ HasValueListener,
71
+ HasValuesListener,
33
72
  Row,
73
+ RowCountListener,
74
+ RowIdsListener,
75
+ RowListener,
76
+ SortedRowIdsListener,
34
77
  Store,
35
78
  Table,
79
+ TableCellIdsListener,
80
+ TableIdsListener,
81
+ TableListener,
36
82
  Tables,
83
+ TablesListener,
84
+ TransactionListener,
37
85
  Value,
86
+ ValueIdsListener,
87
+ ValueListener,
38
88
  ValueOrUndefined,
39
89
  Values,
90
+ ValuesListener,
40
91
  } from '../store/index.d.ts';
41
92
  import type {Synchronizer} from '../synchronizers/index.d.ts';
42
93
 
43
94
  /**
44
- * The R type represents a value that can be provided either as a plain value
45
- * or as a reactive getter function.
95
+ * The MaybeGetter type represents a value that can be provided either as a
96
+ * plain value or as a reactive getter function.
46
97
  *
47
98
  * When a getter function is provided to a hook, the hook's internal `$effect`
48
99
  * will re-run whenever the getter's reactive dependencies change. This is the
@@ -50,10 +101,172 @@ import type {Synchronizer} from '../synchronizers/index.d.ts';
50
101
  * @category Identity
51
102
  * @since v8.1.0
52
103
  */
53
- export type R<T> = T | (() => T);
104
+ export type MaybeGetter<T> = T | (() => T);
105
+
106
+ /**
107
+ * The StoreOrStoreId type is used when you need to refer to a Store in a
108
+ * Svelte hook or component.
109
+ *
110
+ * In some simple cases you will already have a direct reference to the Store.
111
+ *
112
+ * This module also includes a Provider component that can be used to wrap
113
+ * multiple Store objects into a context that can be used throughout the app. In
114
+ * this case you will want to refer to a Store by its Id in that context.
115
+ *
116
+ * Many hooks and components in this ui-svelte module take this type as a
117
+ * parameter or a prop, allowing you to pass in either the Store or its Id.
118
+ * @category Identity
119
+ * @since v8.1.0
120
+ */
121
+ export type StoreOrStoreId = Store | Id;
122
+
123
+ /**
124
+ * The MetricsOrMetricsId type is used when you need to refer to a Metrics
125
+ * object in a Svelte hook or component.
126
+ *
127
+ * In some simple cases you will already have a direct reference to the Metrics
128
+ * object.
129
+ *
130
+ * This module also includes a Provider component that can be used to wrap
131
+ * multiple Metrics objects into a context that can be used throughout the app.
132
+ * In this case you will want to refer to a Metrics object by its Id in that
133
+ * context.
134
+ *
135
+ * Many hooks and components in this ui-svelte module take this type as a
136
+ * parameter or a prop, allowing you to pass in either the Metrics object or its
137
+ * Id.
138
+ * @category Identity
139
+ * @since v8.1.0
140
+ */
141
+ export type MetricsOrMetricsId = Metrics | Id;
54
142
 
55
143
  /**
56
- * The ProviderProps type describes the props of the Provider component.
144
+ * The IndexesOrIndexesId type is used when you need to refer to an Indexes
145
+ * object in a Svelte hook or component.
146
+ *
147
+ * In some simple cases you will already have a direct reference to the Indexes
148
+ * object.
149
+ *
150
+ * This module also includes a Provider component that can be used to wrap
151
+ * multiple Indexes objects into a context that can be used throughout the app.
152
+ * In this case you will want to refer to an Indexes object by its Id in that
153
+ * context.
154
+ *
155
+ * Many hooks and components in this ui-svelte module take this type as a
156
+ * parameter or a prop, allowing you to pass in either the Indexes object or its
157
+ * Id.
158
+ * @category Identity
159
+ * @since v8.1.0
160
+ */
161
+ export type IndexesOrIndexesId = Indexes | Id;
162
+
163
+ /**
164
+ * The RelationshipsOrRelationshipsId type is used when you need to refer to a
165
+ * Relationships object in a Svelte hook or component.
166
+ *
167
+ * In some simple cases you will already have a direct reference to the
168
+ * Relationships object.
169
+ *
170
+ * This module also includes a Provider component that can be used to wrap
171
+ * multiple Relationships objects into a context that can be used throughout the
172
+ * app. In this case you will want to refer to a Relationships object by its Id
173
+ * in that context.
174
+ *
175
+ * Many hooks and components in this ui-svelte module take this type as a
176
+ * parameter or a prop, allowing you to pass in either the Relationships object
177
+ * or its Id.
178
+ * @category Identity
179
+ * @since v8.1.0
180
+ */
181
+ export type RelationshipsOrRelationshipsId = Relationships | Id;
182
+
183
+ /**
184
+ * The QueriesOrQueriesId type is used when you need to refer to a Queries
185
+ * object in a Svelte hook or component.
186
+ *
187
+ * In some simple cases you will already have a direct reference to the Queries
188
+ * object.
189
+ *
190
+ * This module also includes a Provider component that can be used to wrap
191
+ * multiple Queries objects into a context that can be used throughout the app.
192
+ * In this case you will want to refer to a Queries object by its Id in that
193
+ * context.
194
+ *
195
+ * Many hooks and components in this ui-svelte module take this type as a
196
+ * parameter or a prop, allowing you to pass in either the Queries object or its
197
+ * Id.
198
+ * @category Identity
199
+ * @since v8.1.0
200
+ */
201
+ export type QueriesOrQueriesId = Queries | Id;
202
+
203
+ /**
204
+ * The CheckpointsOrCheckpointsId type is used when you need to refer to a
205
+ * Checkpoints object in a Svelte hook or component.
206
+ *
207
+ * In some simple cases you will already have a direct reference to the
208
+ * Checkpoints object.
209
+ *
210
+ * This module also includes a Provider component that can be used to wrap
211
+ * multiple Checkpoints objects into a context that can be used throughout the
212
+ * app. In this case you will want to refer to a Checkpoints object by its Id in
213
+ * that context.
214
+ *
215
+ * Many hooks and components in this ui-svelte module take this type as a
216
+ * parameter or a prop, allowing you to pass in either the Checkpoints object or
217
+ * its Id.
218
+ * @category Identity
219
+ * @since v8.1.0
220
+ */
221
+ export type CheckpointsOrCheckpointsId = Checkpoints | Id;
222
+
223
+ /**
224
+ * The PersisterOrPersisterId type is used when you need to refer to a Persister
225
+ * object in a Svelte hook or component.
226
+ *
227
+ * In some simple cases you will already have a direct reference to the
228
+ * Persister object.
229
+ *
230
+ * This module also includes a Provider component that can be used to wrap
231
+ * multiple Persister objects into a context that can be used throughout the
232
+ * app. In this case you will want to refer to a Persister object by its Id in
233
+ * that context.
234
+ *
235
+ * Many hooks and components in this ui-svelte module take this type as a
236
+ * parameter or a prop, allowing you to pass in either the Persister or its Id.
237
+ * @category Identity
238
+ * @since v8.1.0
239
+ */
240
+ export type PersisterOrPersisterId = AnyPersister | Id;
241
+
242
+ /**
243
+ * The SynchronizerOrSynchronizerId type is used when you need to refer to a
244
+ * Synchronizer object in a Svelte hook or component.
245
+ *
246
+ * In some simple cases you will already have a direct reference to the
247
+ * Synchronizer object.
248
+ *
249
+ * This module also includes a Provider component that can be used to wrap
250
+ * multiple Synchronizer objects into a context that can be used throughout the
251
+ * app. In this case you will want to refer to a Synchronizer object by its Id
252
+ * in that context.
253
+ *
254
+ * Many hooks and components in this ui-svelte module take this type as a
255
+ * parameter or a prop, allowing you to pass in either the Synchronizer or its
256
+ * Id.
257
+ * @category Identity
258
+ * @since v8.1.0
259
+ */
260
+ export type SynchronizerOrSynchronizerId = Synchronizer | Id;
261
+
262
+ /**
263
+ * ProviderProps props are used with the Provider component, so that Store,
264
+ * Metrics, Indexes, Relationships, Queries, and Checkpoints objects can be
265
+ * passed into the context of a Svelte 5 application and used throughout.
266
+ *
267
+ * One of each type of object can be provided as a default within the context.
268
+ * Additionally, multiple of each type of object can be provided in an Id-keyed
269
+ * map to the `___ById` props.
57
270
  * @category Props
58
271
  * @since v8.1.0
59
272
  */
@@ -62,118 +275,118 @@ export type ProviderProps = {
62
275
  * A default single Store object that will be available within the Provider
63
276
  * context.
64
277
  * @category Prop
65
- * @since v1.0.0
278
+ * @since v8.1.0
66
279
  */
67
280
  readonly store?: Store;
68
281
  /**
69
282
  * An object containing multiple Store objects that will be available within
70
283
  * the Provider context by their Id.
71
284
  * @category Prop
72
- * @since v1.0.0
285
+ * @since v8.1.0
73
286
  */
74
287
  readonly storesById?: {readonly [id: Id]: Store};
75
288
  /**
76
289
  * A default single Metrics object that will be available within the Provider
77
290
  * context.
78
291
  * @category Prop
79
- * @since v1.0.0
292
+ * @since v8.1.0
80
293
  */
81
294
  readonly metrics?: Metrics;
82
295
  /**
83
296
  * An object containing multiple Metrics objects that will be available within
84
297
  * the Provider context by their Id.
85
298
  * @category Prop
86
- * @since v1.0.0
299
+ * @since v8.1.0
87
300
  */
88
301
  readonly metricsById?: {readonly [id: Id]: Metrics};
89
302
  /**
90
303
  * A default single Indexes object that will be available within the Provider
91
304
  * context.
92
305
  * @category Prop
93
- * @since v1.0.0
306
+ * @since v8.1.0
94
307
  */
95
308
  readonly indexes?: Indexes;
96
309
  /**
97
310
  * An object containing multiple Indexes objects that will be available within
98
311
  * the Provider context by their Id.
99
312
  * @category Prop
100
- * @since v1.0.0
313
+ * @since v8.1.0
101
314
  */
102
315
  readonly indexesById?: {readonly [id: Id]: Indexes};
103
316
  /**
104
317
  * A default single Relationships object that will be available within the
105
318
  * Provider context.
106
319
  * @category Prop
107
- * @since v1.0.0
320
+ * @since v8.1.0
108
321
  */
109
322
  readonly relationships?: Relationships;
110
323
  /**
111
324
  * An object containing multiple Relationships objects that will be available
112
325
  * within the Provider context by their Id.
113
326
  * @category Prop
114
- * @since v1.0.0
327
+ * @since v8.1.0
115
328
  */
116
329
  readonly relationshipsById?: {readonly [id: Id]: Relationships};
117
330
  /**
118
331
  * A default single Queries object that will be available within the Provider
119
- * context, since v2.0.
332
+ * context.
120
333
  * @category Prop
121
- * @since v1.0.0
334
+ * @since v8.1.0
122
335
  */
123
336
  readonly queries?: Queries;
124
337
  /**
125
338
  * An object containing multiple Queries objects that will be available within
126
- * the Provider context by their Id, since v2.0.
339
+ * the Provider context by their Id.
127
340
  * @category Prop
128
- * @since v1.0.0
341
+ * @since v8.1.0
129
342
  */
130
343
  readonly queriesById?: {readonly [id: Id]: Queries};
131
344
  /**
132
345
  * A default single Checkpoints object that will be available within the
133
346
  * Provider context.
134
347
  * @category Prop
135
- * @since v1.0.0
348
+ * @since v8.1.0
136
349
  */
137
350
  readonly checkpoints?: Checkpoints;
138
351
  /**
139
352
  * An object containing multiple Checkpoints objects that will be available
140
353
  * within the Provider context by their Id.
141
354
  * @category Prop
142
- * @since v1.0.0
355
+ * @since v8.1.0
143
356
  */
144
357
  readonly checkpointsById?: {readonly [id: Id]: Checkpoints};
145
358
  /**
146
359
  * A default single Persister object that will be available within the
147
360
  * Provider context.
148
361
  * @category Prop
149
- * @since v5.3.0
362
+ * @since v8.1.0
150
363
  */
151
364
  readonly persister?: AnyPersister;
152
365
  /**
153
366
  * An object containing multiple Persister objects that will be available
154
367
  * within the Provider context by their Id.
155
368
  * @category Prop
156
- * @since v5.3.0
369
+ * @since v8.1.0
157
370
  */
158
371
  readonly persistersById?: {readonly [id: Id]: AnyPersister};
159
372
  /**
160
373
  * A default single Synchronizer object that will be available within the
161
374
  * Provider context.
162
375
  * @category Prop
163
- * @since v5.3.0
376
+ * @since v8.1.0
164
377
  */
165
378
  readonly synchronizer?: Synchronizer;
166
379
  /**
167
380
  * An object containing multiple Synchronizer objects that will be available
168
381
  * within the Provider context by their Id.
169
382
  * @category Prop
170
- * @since v5.3.0
383
+ * @since v8.1.0
171
384
  */
172
385
  readonly synchronizersById?: {readonly [id: Id]: Synchronizer};
173
386
  /**
174
387
  * The `children` prop of a ProviderProps object — the app subtree that will
175
388
  * have access to the provided context.
176
- * @category Props
389
+ * @category Prop
177
390
  * @since v8.1.0
178
391
  */
179
392
  readonly children: Snippet;
@@ -208,7 +421,7 @@ export type CellViewProps = {
208
421
  * @category Props
209
422
  * @since v8.1.0
210
423
  */
211
- readonly store?: Store | Id;
424
+ readonly store?: StoreOrStoreId;
212
425
  /**
213
426
  * The `debugIds` prop of a CellViewProps object.
214
427
  * @category Props
@@ -234,7 +447,7 @@ export type ValueViewProps = {
234
447
  * @category Props
235
448
  * @since v8.1.0
236
449
  */
237
- readonly store?: Store | Id;
450
+ readonly store?: StoreOrStoreId;
238
451
  /**
239
452
  * The `debugIds` prop of a ValueViewProps object.
240
453
  * @category Props
@@ -260,7 +473,7 @@ export type MetricViewProps = {
260
473
  * @category Props
261
474
  * @since v8.1.0
262
475
  */
263
- readonly metrics?: Metrics | Id;
476
+ readonly metrics?: MetricsOrMetricsId;
264
477
  /**
265
478
  * The `debugIds` prop of a MetricViewProps object.
266
479
  * @category Props
@@ -287,7 +500,7 @@ export type CheckpointViewProps = {
287
500
  * @category Props
288
501
  * @since v8.1.0
289
502
  */
290
- readonly checkpoints?: Checkpoints | Id;
503
+ readonly checkpoints?: CheckpointsOrCheckpointsId;
291
504
  /**
292
505
  * The `debugIds` prop of a CheckpointViewProps object.
293
506
  * @category Props
@@ -319,7 +532,7 @@ export type RowViewProps = {
319
532
  * @category Props
320
533
  * @since v8.1.0
321
534
  */
322
- readonly store?: Store | Id;
535
+ readonly store?: StoreOrStoreId;
323
536
  /**
324
537
  * The `customCellIds` prop of a RowViewProps object.
325
538
  * @category Props
@@ -363,7 +576,7 @@ export type TableViewProps = {
363
576
  * @category Props
364
577
  * @since v8.1.0
365
578
  */
366
- readonly store?: Store | Id;
579
+ readonly store?: StoreOrStoreId;
367
580
  /**
368
581
  * The `customCellIds` prop of a TableViewProps object.
369
582
  * @category Props
@@ -432,7 +645,7 @@ export type SortedTableViewProps = {
432
645
  * @category Props
433
646
  * @since v8.1.0
434
647
  */
435
- readonly store?: Store | Id;
648
+ readonly store?: StoreOrStoreId;
436
649
  /**
437
650
  * The `customCellIds` prop of a SortedTableViewProps object.
438
651
  * @category Props
@@ -470,7 +683,7 @@ export type TablesViewProps = {
470
683
  * @category Props
471
684
  * @since v8.1.0
472
685
  */
473
- readonly store?: Store | Id;
686
+ readonly store?: StoreOrStoreId;
474
687
  /**
475
688
  * The `separator` prop of a TablesViewProps object.
476
689
  * @category Props
@@ -502,7 +715,7 @@ export type ValuesViewProps = {
502
715
  * @category Props
503
716
  * @since v8.1.0
504
717
  */
505
- readonly store?: Store | Id;
718
+ readonly store?: StoreOrStoreId;
506
719
  /**
507
720
  * The `separator` prop of a ValuesViewProps object.
508
721
  * @category Props
@@ -540,7 +753,7 @@ export type IndexViewProps = {
540
753
  * @category Props
541
754
  * @since v8.1.0
542
755
  */
543
- readonly indexes?: Indexes | Id;
756
+ readonly indexes?: IndexesOrIndexesId;
544
757
  /**
545
758
  * The `separator` prop of an IndexViewProps object.
546
759
  * @category Props
@@ -584,7 +797,7 @@ export type SliceViewProps = {
584
797
  * @category Props
585
798
  * @since v8.1.0
586
799
  */
587
- readonly indexes?: Indexes | Id;
800
+ readonly indexes?: IndexesOrIndexesId;
588
801
  /**
589
802
  * The `separator` prop of a SliceViewProps object.
590
803
  * @category Props
@@ -629,7 +842,7 @@ export type RemoteRowViewProps = {
629
842
  * @category Props
630
843
  * @since v8.1.0
631
844
  */
632
- readonly relationships?: Relationships | Id;
845
+ readonly relationships?: RelationshipsOrRelationshipsId;
633
846
  /**
634
847
  * The `debugIds` prop of a RemoteRowViewProps object.
635
848
  * @category Props
@@ -668,7 +881,7 @@ export type LocalRowsViewProps = {
668
881
  * @category Props
669
882
  * @since v8.1.0
670
883
  */
671
- readonly relationships?: Relationships | Id;
884
+ readonly relationships?: RelationshipsOrRelationshipsId;
672
885
  /**
673
886
  * The `separator` prop of a LocalRowsViewProps object.
674
887
  * @category Props
@@ -713,7 +926,7 @@ export type LinkedRowsViewProps = {
713
926
  * @category Props
714
927
  * @since v8.1.0
715
928
  */
716
- readonly relationships?: Relationships | Id;
929
+ readonly relationships?: RelationshipsOrRelationshipsId;
717
930
  /**
718
931
  * The `separator` prop of a LinkedRowsViewProps object.
719
932
  * @category Props
@@ -764,7 +977,7 @@ export type ResultCellViewProps = {
764
977
  * @category Props
765
978
  * @since v8.1.0
766
979
  */
767
- readonly queries?: Queries | Id;
980
+ readonly queries?: QueriesOrQueriesId;
768
981
  /**
769
982
  * The `debugIds` prop of a ResultCellViewProps object.
770
983
  * @category Props
@@ -797,7 +1010,7 @@ export type ResultRowViewProps = {
797
1010
  * @category Props
798
1011
  * @since v8.1.0
799
1012
  */
800
- readonly queries?: Queries | Id;
1013
+ readonly queries?: QueriesOrQueriesId;
801
1014
  /**
802
1015
  * The `separator` prop of a ResultRowViewProps object.
803
1016
  * @category Props
@@ -836,7 +1049,7 @@ export type ResultTableViewProps = {
836
1049
  * @category Props
837
1050
  * @since v8.1.0
838
1051
  */
839
- readonly queries?: Queries | Id;
1052
+ readonly queries?: QueriesOrQueriesId;
840
1053
  /**
841
1054
  * The `separator` prop of a ResultTableViewProps object.
842
1055
  * @category Props
@@ -899,7 +1112,7 @@ export type ResultSortedTableViewProps = {
899
1112
  * @category Props
900
1113
  * @since v8.1.0
901
1114
  */
902
- readonly queries?: Queries | Id;
1115
+ readonly queries?: QueriesOrQueriesId;
903
1116
  /**
904
1117
  * The `separator` prop of a ResultSortedTableViewProps object.
905
1118
  * @category Props
@@ -932,7 +1145,7 @@ export type BackwardCheckpointsViewProps = {
932
1145
  * @category Props
933
1146
  * @since v8.1.0
934
1147
  */
935
- readonly checkpoints?: Checkpoints | Id;
1148
+ readonly checkpoints?: CheckpointsOrCheckpointsId;
936
1149
  /**
937
1150
  * The `separator` prop of a BackwardCheckpointsViewProps object.
938
1151
  * @category Props
@@ -965,7 +1178,7 @@ export type ForwardCheckpointsViewProps = {
965
1178
  * @category Props
966
1179
  * @since v8.1.0
967
1180
  */
968
- readonly checkpoints?: Checkpoints | Id;
1181
+ readonly checkpoints?: CheckpointsOrCheckpointsId;
969
1182
  /**
970
1183
  * The `separator` prop of a ForwardCheckpointsViewProps object.
971
1184
  * @category Props
@@ -998,7 +1211,7 @@ export type CurrentCheckpointViewProps = {
998
1211
  * @category Props
999
1212
  * @since v8.1.0
1000
1213
  */
1001
- readonly checkpoints?: Checkpoints | Id;
1214
+ readonly checkpoints?: CheckpointsOrCheckpointsId;
1002
1215
  /**
1003
1216
  * The `debugIds` prop of a CurrentCheckpointViewProps object.
1004
1217
  * @category Props
@@ -1033,7 +1246,7 @@ export type CurrentCheckpointViewProps = {
1033
1246
  * @category Component
1034
1247
  * @since v8.1.0
1035
1248
  */
1036
- export declare const Provider: Component<ProviderProps>;
1249
+ export const Provider: Component<ProviderProps>;
1037
1250
 
1038
1251
  /**
1039
1252
  * The BackwardCheckpointsView component renders the list of checkpoint Ids that
@@ -1044,18 +1257,18 @@ export declare const Provider: Component<ProviderProps>;
1044
1257
  * @category Component
1045
1258
  * @since v8.1.0
1046
1259
  */
1047
- export declare const BackwardCheckpointsView: Component<BackwardCheckpointsViewProps>;
1260
+ export const BackwardCheckpointsView: Component<BackwardCheckpointsViewProps>;
1048
1261
 
1049
1262
  /**
1050
- * The CellView component renders the value of a single Cell in a given Row in
1051
- * a given Table, and registers a listener so that any changes to that result
1052
- * will cause a re-render.
1263
+ * The CellView component renders the value of a single Cell in a given Row in a
1264
+ * given Table, and registers a listener so that any changes to that result will
1265
+ * cause a re-render.
1053
1266
  * @param props The props for this component.
1054
1267
  * @returns A rendering of the Cell, or nothing if not present.
1055
1268
  * @category Component
1056
1269
  * @since v8.1.0
1057
1270
  */
1058
- export declare const CellView: Component<CellViewProps>;
1271
+ export const CellView: Component<CellViewProps>;
1059
1272
 
1060
1273
  /**
1061
1274
  * The CheckpointView component renders the label of a checkpoint in a
@@ -1066,7 +1279,7 @@ export declare const CellView: Component<CellViewProps>;
1066
1279
  * @category Component
1067
1280
  * @since v8.1.0
1068
1281
  */
1069
- export declare const CheckpointView: Component<CheckpointViewProps>;
1282
+ export const CheckpointView: Component<CheckpointViewProps>;
1070
1283
 
1071
1284
  /**
1072
1285
  * The CurrentCheckpointView component renders the current checkpoint in a
@@ -1077,7 +1290,7 @@ export declare const CheckpointView: Component<CheckpointViewProps>;
1077
1290
  * @category Component
1078
1291
  * @since v8.1.0
1079
1292
  */
1080
- export declare const CurrentCheckpointView: Component<CurrentCheckpointViewProps>;
1293
+ export const CurrentCheckpointView: Component<CurrentCheckpointViewProps>;
1081
1294
 
1082
1295
  /**
1083
1296
  * The ForwardCheckpointsView component renders the list of checkpoint Ids that
@@ -1088,7 +1301,7 @@ export declare const CurrentCheckpointView: Component<CurrentCheckpointViewProps
1088
1301
  * @category Component
1089
1302
  * @since v8.1.0
1090
1303
  */
1091
- export declare const ForwardCheckpointsView: Component<ForwardCheckpointsViewProps>;
1304
+ export const ForwardCheckpointsView: Component<ForwardCheckpointsViewProps>;
1092
1305
 
1093
1306
  /**
1094
1307
  * The IndexView component renders the slices in a named Index, and registers a
@@ -1098,7 +1311,7 @@ export declare const ForwardCheckpointsView: Component<ForwardCheckpointsViewPro
1098
1311
  * @category Component
1099
1312
  * @since v8.1.0
1100
1313
  */
1101
- export declare const IndexView: Component<IndexViewProps>;
1314
+ export const IndexView: Component<IndexViewProps>;
1102
1315
 
1103
1316
  /**
1104
1317
  * The LinkedRowsView component renders the Rows in a linked list Relationship,
@@ -1109,7 +1322,7 @@ export declare const IndexView: Component<IndexViewProps>;
1109
1322
  * @category Component
1110
1323
  * @since v8.1.0
1111
1324
  */
1112
- export declare const LinkedRowsView: Component<LinkedRowsViewProps>;
1325
+ export const LinkedRowsView: Component<LinkedRowsViewProps>;
1113
1326
 
1114
1327
  /**
1115
1328
  * The LocalRowsView component renders the local Row Ids for a given remote Row
@@ -1120,7 +1333,7 @@ export declare const LinkedRowsView: Component<LinkedRowsViewProps>;
1120
1333
  * @category Component
1121
1334
  * @since v8.1.0
1122
1335
  */
1123
- export declare const LocalRowsView: Component<LocalRowsViewProps>;
1336
+ export const LocalRowsView: Component<LocalRowsViewProps>;
1124
1337
 
1125
1338
  /**
1126
1339
  * The MetricView component renders the value of a named Metric in a Metrics
@@ -1131,7 +1344,7 @@ export declare const LocalRowsView: Component<LocalRowsViewProps>;
1131
1344
  * @category Component
1132
1345
  * @since v8.1.0
1133
1346
  */
1134
- export declare const MetricView: Component<MetricViewProps>;
1347
+ export const MetricView: Component<MetricViewProps>;
1135
1348
 
1136
1349
  /**
1137
1350
  * The RemoteRowView component renders the remote Row Id for a given local Row
@@ -1142,7 +1355,7 @@ export declare const MetricView: Component<MetricViewProps>;
1142
1355
  * @category Component
1143
1356
  * @since v8.1.0
1144
1357
  */
1145
- export declare const RemoteRowView: Component<RemoteRowViewProps>;
1358
+ export const RemoteRowView: Component<RemoteRowViewProps>;
1146
1359
 
1147
1360
  /**
1148
1361
  * The ResultCellView component renders the value of a single Cell in a given
@@ -1153,7 +1366,7 @@ export declare const RemoteRowView: Component<RemoteRowViewProps>;
1153
1366
  * @category Component
1154
1367
  * @since v8.1.0
1155
1368
  */
1156
- export declare const ResultCellView: Component<ResultCellViewProps>;
1369
+ export const ResultCellView: Component<ResultCellViewProps>;
1157
1370
 
1158
1371
  /**
1159
1372
  * The ResultRowView component renders the contents of a single Result Row in a
@@ -1164,7 +1377,7 @@ export declare const ResultCellView: Component<ResultCellViewProps>;
1164
1377
  * @category Component
1165
1378
  * @since v8.1.0
1166
1379
  */
1167
- export declare const ResultRowView: Component<ResultRowViewProps>;
1380
+ export const ResultRowView: Component<ResultRowViewProps>;
1168
1381
 
1169
1382
  /**
1170
1383
  * The ResultSortedTableView component renders the contents of a single sorted
@@ -1175,7 +1388,7 @@ export declare const ResultRowView: Component<ResultRowViewProps>;
1175
1388
  * @category Component
1176
1389
  * @since v8.1.0
1177
1390
  */
1178
- export declare const ResultSortedTableView: Component<ResultSortedTableViewProps>;
1391
+ export const ResultSortedTableView: Component<ResultSortedTableViewProps>;
1179
1392
 
1180
1393
  /**
1181
1394
  * The ResultTableView component renders the contents of a single Result Table
@@ -1186,7 +1399,7 @@ export declare const ResultSortedTableView: Component<ResultSortedTableViewProps
1186
1399
  * @category Component
1187
1400
  * @since v8.1.0
1188
1401
  */
1189
- export declare const ResultTableView: Component<ResultTableViewProps>;
1402
+ export const ResultTableView: Component<ResultTableViewProps>;
1190
1403
 
1191
1404
  /**
1192
1405
  * The RowView component renders the contents of a single Row in a given Table,
@@ -1197,18 +1410,18 @@ export declare const ResultTableView: Component<ResultTableViewProps>;
1197
1410
  * @category Component
1198
1411
  * @since v8.1.0
1199
1412
  */
1200
- export declare const RowView: Component<RowViewProps>;
1413
+ export const RowView: Component<RowViewProps>;
1201
1414
 
1202
1415
  /**
1203
- * The SliceView component renders the Row Ids in a named Slice in an Index,
1204
- * and registers a listener so that any changes to that result will cause a
1416
+ * The SliceView component renders the Row Ids in a named Slice in an Index, and
1417
+ * registers a listener so that any changes to that result will cause a
1205
1418
  * re-render.
1206
1419
  * @param props The props for this component.
1207
1420
  * @returns A rendering of the Rows in the Slice.
1208
1421
  * @category Component
1209
1422
  * @since v8.1.0
1210
1423
  */
1211
- export declare const SliceView: Component<SliceViewProps>;
1424
+ export const SliceView: Component<SliceViewProps>;
1212
1425
 
1213
1426
  /**
1214
1427
  * The SortedTableView component renders the contents of a single Table in a
@@ -1219,18 +1432,17 @@ export declare const SliceView: Component<SliceViewProps>;
1219
1432
  * @category Component
1220
1433
  * @since v8.1.0
1221
1434
  */
1222
- export declare const SortedTableView: Component<SortedTableViewProps>;
1435
+ export const SortedTableView: Component<SortedTableViewProps>;
1223
1436
 
1224
1437
  /**
1225
- * The TableView component renders the contents of a single Table, and
1226
- * registers a listener so that any changes to that result will cause a
1227
- * re-render.
1438
+ * The TableView component renders the contents of a single Table, and registers
1439
+ * a listener so that any changes to that result will cause a re-render.
1228
1440
  * @param props The props for this component.
1229
1441
  * @returns A rendering of the Table.
1230
1442
  * @category Component
1231
1443
  * @since v8.1.0
1232
1444
  */
1233
- export declare const TableView: Component<TableViewProps>;
1445
+ export const TableView: Component<TableViewProps>;
1234
1446
 
1235
1447
  /**
1236
1448
  * The TablesView component renders the contents of all Tables in a Store, and
@@ -1241,7 +1453,7 @@ export declare const TableView: Component<TableViewProps>;
1241
1453
  * @category Component
1242
1454
  * @since v8.1.0
1243
1455
  */
1244
- export declare const TablesView: Component<TablesViewProps>;
1456
+ export const TablesView: Component<TablesViewProps>;
1245
1457
 
1246
1458
  /**
1247
1459
  * The ValueView component renders the value of a single Value in a Store, and
@@ -1252,7 +1464,7 @@ export declare const TablesView: Component<TablesViewProps>;
1252
1464
  * @category Component
1253
1465
  * @since v8.1.0
1254
1466
  */
1255
- export declare const ValueView: Component<ValueViewProps>;
1467
+ export const ValueView: Component<ValueViewProps>;
1256
1468
 
1257
1469
  /**
1258
1470
  * The ValuesView component renders all Values in a Store, and registers a
@@ -1262,7 +1474,7 @@ export declare const ValueView: Component<ValueViewProps>;
1262
1474
  * @category Component
1263
1475
  * @since v8.1.0
1264
1476
  */
1265
- export declare const ValuesView: Component<ValuesViewProps>;
1477
+ export const ValuesView: Component<ValuesViewProps>;
1266
1478
 
1267
1479
  /**
1268
1480
  * The useHasTables hook returns a reactive object indicating whether any Tables
@@ -1273,7 +1485,9 @@ export declare const ValuesView: Component<ValuesViewProps>;
1273
1485
  * @category Hook
1274
1486
  * @since v8.1.0
1275
1487
  */
1276
- export function useHasTables(storeOrStoreId?: R<Store | Id | undefined>): {
1488
+ export function useHasTables(
1489
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1490
+ ): {
1277
1491
  readonly current: boolean;
1278
1492
  };
1279
1493
 
@@ -1286,7 +1500,9 @@ export function useHasTables(storeOrStoreId?: R<Store | Id | undefined>): {
1286
1500
  * @category Hook
1287
1501
  * @since v8.1.0
1288
1502
  */
1289
- export function useTables(storeOrStoreId?: R<Store | Id | undefined>): {
1503
+ export function useTables(
1504
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1505
+ ): {
1290
1506
  readonly current: Tables;
1291
1507
  };
1292
1508
 
@@ -1299,7 +1515,9 @@ export function useTables(storeOrStoreId?: R<Store | Id | undefined>): {
1299
1515
  * @category Hook
1300
1516
  * @since v8.1.0
1301
1517
  */
1302
- export function useTableIds(storeOrStoreId?: R<Store | Id | undefined>): {
1518
+ export function useTableIds(
1519
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1520
+ ): {
1303
1521
  readonly current: Ids;
1304
1522
  };
1305
1523
 
@@ -1314,8 +1532,8 @@ export function useTableIds(storeOrStoreId?: R<Store | Id | undefined>): {
1314
1532
  * @since v8.1.0
1315
1533
  */
1316
1534
  export function useHasTable(
1317
- tableId: R<Id>,
1318
- storeOrStoreId?: R<Store | Id | undefined>,
1535
+ tableId: MaybeGetter<Id>,
1536
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1319
1537
  ): {readonly current: boolean};
1320
1538
 
1321
1539
  /**
@@ -1329,8 +1547,8 @@ export function useHasTable(
1329
1547
  * @since v8.1.0
1330
1548
  */
1331
1549
  export function useTable(
1332
- tableId: R<Id>,
1333
- storeOrStoreId?: R<Store | Id | undefined>,
1550
+ tableId: MaybeGetter<Id>,
1551
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1334
1552
  ): {readonly current: Table};
1335
1553
 
1336
1554
  /**
@@ -1344,14 +1562,14 @@ export function useTable(
1344
1562
  * @since v8.1.0
1345
1563
  */
1346
1564
  export function useTableCellIds(
1347
- tableId: R<Id>,
1348
- storeOrStoreId?: R<Store | Id | undefined>,
1565
+ tableId: MaybeGetter<Id>,
1566
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1349
1567
  ): {readonly current: Ids};
1350
1568
 
1351
1569
  /**
1352
1570
  * The useHasTableCell hook returns a reactive object indicating whether a
1353
- * particular Cell is used anywhere in a Table, and registers a listener so
1354
- * that any changes to that result will update `.current`.
1571
+ * particular Cell is used anywhere in a Table, and registers a listener so that
1572
+ * any changes to that result will update `.current`.
1355
1573
  * @param tableId The Id of the Table (or a getter returning it).
1356
1574
  * @param cellId The Id of the Cell (or a getter returning it).
1357
1575
  * @param storeOrStoreId The Store to use (plain value or getter), or its Id.
@@ -1360,9 +1578,9 @@ export function useTableCellIds(
1360
1578
  * @since v8.1.0
1361
1579
  */
1362
1580
  export function useHasTableCell(
1363
- tableId: R<Id>,
1364
- cellId: R<Id>,
1365
- storeOrStoreId?: R<Store | Id | undefined>,
1581
+ tableId: MaybeGetter<Id>,
1582
+ cellId: MaybeGetter<Id>,
1583
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1366
1584
  ): {readonly current: boolean};
1367
1585
 
1368
1586
  /**
@@ -1376,8 +1594,8 @@ export function useHasTableCell(
1376
1594
  * @since v8.1.0
1377
1595
  */
1378
1596
  export function useRowCount(
1379
- tableId: R<Id>,
1380
- storeOrStoreId?: R<Store | Id | undefined>,
1597
+ tableId: MaybeGetter<Id>,
1598
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1381
1599
  ): {readonly current: number};
1382
1600
 
1383
1601
  /**
@@ -1391,8 +1609,8 @@ export function useRowCount(
1391
1609
  * @since v8.1.0
1392
1610
  */
1393
1611
  export function useRowIds(
1394
- tableId: R<Id>,
1395
- storeOrStoreId?: R<Store | Id | undefined>,
1612
+ tableId: MaybeGetter<Id>,
1613
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1396
1614
  ): {readonly current: Ids};
1397
1615
 
1398
1616
  /**
@@ -1410,12 +1628,12 @@ export function useRowIds(
1410
1628
  * @since v8.1.0
1411
1629
  */
1412
1630
  export function useSortedRowIds(
1413
- tableId: R<Id>,
1414
- cellId?: R<Id | undefined>,
1415
- descending?: R<boolean>,
1416
- offset?: R<number>,
1417
- limit?: R<number | undefined>,
1418
- storeOrStoreId?: R<Store | Id | undefined>,
1631
+ tableId: MaybeGetter<Id>,
1632
+ cellId?: MaybeGetter<Id | undefined>,
1633
+ descending?: MaybeGetter<boolean>,
1634
+ offset?: MaybeGetter<number>,
1635
+ limit?: MaybeGetter<number | undefined>,
1636
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1419
1637
  ): {readonly current: Ids};
1420
1638
 
1421
1639
  /**
@@ -1430,9 +1648,9 @@ export function useSortedRowIds(
1430
1648
  * @since v8.1.0
1431
1649
  */
1432
1650
  export function useHasRow(
1433
- tableId: R<Id>,
1434
- rowId: R<Id>,
1435
- storeOrStoreId?: R<Store | Id | undefined>,
1651
+ tableId: MaybeGetter<Id>,
1652
+ rowId: MaybeGetter<Id>,
1653
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1436
1654
  ): {readonly current: boolean};
1437
1655
 
1438
1656
  /**
@@ -1446,14 +1664,14 @@ export function useHasRow(
1446
1664
  * @since v8.1.0
1447
1665
  */
1448
1666
  export function useRow(
1449
- tableId: R<Id>,
1450
- rowId: R<Id>,
1451
- storeOrStoreId?: R<Store | Id | undefined>,
1667
+ tableId: MaybeGetter<Id>,
1668
+ rowId: MaybeGetter<Id>,
1669
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1452
1670
  ): {readonly current: Row};
1453
1671
 
1454
1672
  /**
1455
- * The useCellIds hook returns a reactive object reflecting the Ids of the
1456
- * Cells in a Row, and registers a listener so that any changes will update
1673
+ * The useCellIds hook returns a reactive object reflecting the Ids of the Cells
1674
+ * in a Row, and registers a listener so that any changes will update
1457
1675
  * `.current`.
1458
1676
  * @param tableId The Id of the Table (or a getter returning it).
1459
1677
  * @param rowId The Id of the Row (or a getter returning it).
@@ -1463,9 +1681,9 @@ export function useRow(
1463
1681
  * @since v8.1.0
1464
1682
  */
1465
1683
  export function useCellIds(
1466
- tableId: R<Id>,
1467
- rowId: R<Id>,
1468
- storeOrStoreId?: R<Store | Id | undefined>,
1684
+ tableId: MaybeGetter<Id>,
1685
+ rowId: MaybeGetter<Id>,
1686
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1469
1687
  ): {readonly current: Ids};
1470
1688
 
1471
1689
  /**
@@ -1481,10 +1699,10 @@ export function useCellIds(
1481
1699
  * @since v8.1.0
1482
1700
  */
1483
1701
  export function useHasCell(
1484
- tableId: R<Id>,
1485
- rowId: R<Id>,
1486
- cellId: R<Id>,
1487
- storeOrStoreId?: R<Store | Id | undefined>,
1702
+ tableId: MaybeGetter<Id>,
1703
+ rowId: MaybeGetter<Id>,
1704
+ cellId: MaybeGetter<Id>,
1705
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1488
1706
  ): {readonly current: boolean};
1489
1707
 
1490
1708
  /**
@@ -1509,14 +1727,14 @@ export function useHasCell(
1509
1727
  * @since v8.1.0
1510
1728
  */
1511
1729
  export function useCell(
1512
- tableId: R<Id>,
1513
- rowId: R<Id>,
1514
- cellId: R<Id>,
1515
- storeOrStoreId?: R<Store | Id | undefined>,
1730
+ tableId: MaybeGetter<Id>,
1731
+ rowId: MaybeGetter<Id>,
1732
+ cellId: MaybeGetter<Id>,
1733
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1516
1734
  ): {readonly current: CellOrUndefined};
1517
1735
 
1518
1736
  /**
1519
- * The useCellState hook returns a reactive object reflecting the value of a
1737
+ * The useBindableCell hook returns a reactive object reflecting the value of a
1520
1738
  * Cell, with a settable `current` property that writes back to the Store.
1521
1739
  * @param tableId The Id of the Table (or a getter returning it).
1522
1740
  * @param rowId The Id of the Row (or a getter returning it).
@@ -1526,11 +1744,11 @@ export function useCell(
1526
1744
  * @category Hook
1527
1745
  * @since v8.1.0
1528
1746
  */
1529
- export function useCellState(
1530
- tableId: R<Id>,
1531
- rowId: R<Id>,
1532
- cellId: R<Id>,
1533
- storeOrStoreId?: R<Store | Id | undefined>,
1747
+ export function useBindableCell(
1748
+ tableId: MaybeGetter<Id>,
1749
+ rowId: MaybeGetter<Id>,
1750
+ cellId: MaybeGetter<Id>,
1751
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1534
1752
  ): {get current(): CellOrUndefined; set current(v: Cell)};
1535
1753
 
1536
1754
  /**
@@ -1542,7 +1760,9 @@ export function useCellState(
1542
1760
  * @category Hook
1543
1761
  * @since v8.1.0
1544
1762
  */
1545
- export function useHasValues(storeOrStoreId?: R<Store | Id | undefined>): {
1763
+ export function useHasValues(
1764
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1765
+ ): {
1546
1766
  readonly current: boolean;
1547
1767
  };
1548
1768
 
@@ -1554,7 +1774,9 @@ export function useHasValues(storeOrStoreId?: R<Store | Id | undefined>): {
1554
1774
  * @category Hook
1555
1775
  * @since v8.1.0
1556
1776
  */
1557
- export function useValues(storeOrStoreId?: R<Store | Id | undefined>): {
1777
+ export function useValues(
1778
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1779
+ ): {
1558
1780
  readonly current: Values;
1559
1781
  };
1560
1782
 
@@ -1567,7 +1789,9 @@ export function useValues(storeOrStoreId?: R<Store | Id | undefined>): {
1567
1789
  * @category Hook
1568
1790
  * @since v8.1.0
1569
1791
  */
1570
- export function useValueIds(storeOrStoreId?: R<Store | Id | undefined>): {
1792
+ export function useValueIds(
1793
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1794
+ ): {
1571
1795
  readonly current: Ids;
1572
1796
  };
1573
1797
 
@@ -1582,8 +1806,8 @@ export function useValueIds(storeOrStoreId?: R<Store | Id | undefined>): {
1582
1806
  * @since v8.1.0
1583
1807
  */
1584
1808
  export function useHasValue(
1585
- valueId: R<Id>,
1586
- storeOrStoreId?: R<Store | Id | undefined>,
1809
+ valueId: MaybeGetter<Id>,
1810
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1587
1811
  ): {readonly current: boolean};
1588
1812
 
1589
1813
  /**
@@ -1597,12 +1821,12 @@ export function useHasValue(
1597
1821
  * @since v8.1.0
1598
1822
  */
1599
1823
  export function useValue(
1600
- valueId: R<Id>,
1601
- storeOrStoreId?: R<Store | Id | undefined>,
1824
+ valueId: MaybeGetter<Id>,
1825
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1602
1826
  ): {readonly current: ValueOrUndefined};
1603
1827
 
1604
1828
  /**
1605
- * The useValueState hook returns a reactive object reflecting the value of a
1829
+ * The useBindableValue hook returns a reactive object reflecting the value of a
1606
1830
  * Value, with a settable `current` property that writes back to the Store.
1607
1831
  * @param valueId The Id of the Value (or a getter returning it).
1608
1832
  * @param storeOrStoreId The Store to use (plain value or getter), or its Id.
@@ -1610,9 +1834,9 @@ export function useValue(
1610
1834
  * @category Hook
1611
1835
  * @since v8.1.0
1612
1836
  */
1613
- export function useValueState(
1614
- valueId: R<Id>,
1615
- storeOrStoreId?: R<Store | Id | undefined>,
1837
+ export function useBindableValue(
1838
+ valueId: MaybeGetter<Id>,
1839
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1616
1840
  ): {get current(): ValueOrUndefined; set current(v: Value)};
1617
1841
 
1618
1842
  /**
@@ -1625,6 +1849,18 @@ export function useValueState(
1625
1849
  */
1626
1850
  export function useStore(id?: Id): Store | undefined;
1627
1851
 
1852
+ /**
1853
+ * The useStoreOrStoreById hook is used to get a reference to a Store object
1854
+ * from a Provider context, or have it passed directly.
1855
+ * @param storeOrStoreId The Store, its Id, or a getter returning either.
1856
+ * @returns A getter function returning the Store, or `undefined`.
1857
+ * @category Hook
1858
+ * @since v8.1.0
1859
+ */
1860
+ export function useStoreOrStoreById(
1861
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
1862
+ ): () => Store | undefined;
1863
+
1628
1864
  /**
1629
1865
  * The useStoreIds hook returns a reactive object with the Ids of all Stores
1630
1866
  * registered in the current Provider context.
@@ -1644,6 +1880,19 @@ export function useStoreIds(): {readonly current: Ids};
1644
1880
  */
1645
1881
  export function useMetrics(id?: Id): Metrics | undefined;
1646
1882
 
1883
+ /**
1884
+ * The useMetricsOrMetricsById hook is used to get a reference to a Metrics
1885
+ * object from a Provider context, or have it passed directly.
1886
+ * @param metricsOrMetricsId The Metrics object, its Id, or a getter returning
1887
+ * either.
1888
+ * @returns A getter function returning the Metrics object, or `undefined`.
1889
+ * @category Hook
1890
+ * @since v8.1.0
1891
+ */
1892
+ export function useMetricsOrMetricsById(
1893
+ metricsOrMetricsId?: MaybeGetter<MetricsOrMetricsId | undefined>,
1894
+ ): () => Metrics | undefined;
1895
+
1647
1896
  /**
1648
1897
  * The useMetricsIds hook returns a reactive object with the Ids of all Metrics
1649
1898
  * objects registered in the current Provider context.
@@ -1663,7 +1912,7 @@ export function useMetricsIds(): {readonly current: Ids};
1663
1912
  * @since v8.1.0
1664
1913
  */
1665
1914
  export function useMetricIds(
1666
- metricsOrMetricsId?: R<Metrics | Id | undefined>,
1915
+ metricsOrMetricsId?: MaybeGetter<MetricsOrMetricsId | undefined>,
1667
1916
  ): {
1668
1917
  readonly current: Ids;
1669
1918
  };
@@ -1673,15 +1922,15 @@ export function useMetricIds(
1673
1922
  * Metric in a Metrics object, and registers a listener so that any changes to
1674
1923
  * that Metric will update `.current`.
1675
1924
  * @param metricId The Id of the Metric (or a getter returning it).
1676
- * @param metricsOrMetricsId The Metrics object to use (plain or getter), or
1677
- * its Id.
1925
+ * @param metricsOrMetricsId The Metrics object to use (plain or getter), or its
1926
+ * Id.
1678
1927
  * @returns A reactive object with a `current` number | undefined property.
1679
1928
  * @category Hook
1680
1929
  * @since v8.1.0
1681
1930
  */
1682
1931
  export function useMetric(
1683
- metricId: R<Id>,
1684
- metricsOrMetricsId?: R<Metrics | Id | undefined>,
1932
+ metricId: MaybeGetter<Id>,
1933
+ metricsOrMetricsId?: MaybeGetter<MetricsOrMetricsId | undefined>,
1685
1934
  ): {readonly current: number | undefined};
1686
1935
 
1687
1936
  /**
@@ -1694,6 +1943,33 @@ export function useMetric(
1694
1943
  */
1695
1944
  export function useIndexes(id?: Id): Indexes | undefined;
1696
1945
 
1946
+ /**
1947
+ * The useIndexesOrIndexesById hook is used to get a reference to an Indexes
1948
+ * object from a Provider context, or have it passed directly.
1949
+ * @param indexesOrIndexesId The Indexes object, its Id, or a getter returning
1950
+ * either.
1951
+ * @returns A getter function returning the Indexes object, or `undefined`.
1952
+ * @category Hook
1953
+ * @since v8.1.0
1954
+ */
1955
+ export function useIndexesOrIndexesById(
1956
+ indexesOrIndexesId?: MaybeGetter<IndexesOrIndexesId | undefined>,
1957
+ ): () => Indexes | undefined;
1958
+
1959
+ /**
1960
+ * The useIndexStoreTableId hook returns the Store and table Id for a given
1961
+ * Indexes object and index Id.
1962
+ * @param indexesOrId The Indexes object, its Id, or a getter returning either.
1963
+ * @param indexId The Id of the index, or a getter returning it.
1964
+ * @returns An object with `store` and `tableId` getter properties.
1965
+ * @category Hook
1966
+ * @since v8.1.0
1967
+ */
1968
+ export function useIndexStoreTableId(
1969
+ indexesOrId: MaybeGetter<IndexesOrIndexesId | undefined>,
1970
+ indexId: MaybeGetter<Id>,
1971
+ ): {readonly store: Store | undefined; readonly tableId: Id | undefined};
1972
+
1697
1973
  /**
1698
1974
  * The useIndexesIds hook returns a reactive object with the Ids of all Indexes
1699
1975
  * objects registered in the current Provider context.
@@ -1712,7 +1988,9 @@ export function useIndexesIds(): {readonly current: Ids};
1712
1988
  * @category Hook
1713
1989
  * @since v8.1.0
1714
1990
  */
1715
- export function useIndexIds(indexesOrIndexesId?: R<Indexes | Id | undefined>): {
1991
+ export function useIndexIds(
1992
+ indexesOrIndexesId?: MaybeGetter<IndexesOrIndexesId | undefined>,
1993
+ ): {
1716
1994
  readonly current: Ids;
1717
1995
  };
1718
1996
 
@@ -1721,15 +1999,15 @@ export function useIndexIds(indexesOrIndexesId?: R<Indexes | Id | undefined>): {
1721
1999
  * Slices in an Index, and registers a listener so that any changes will update
1722
2000
  * `.current`.
1723
2001
  * @param indexId The Id of the Index (or a getter returning it).
1724
- * @param indexesOrIndexesId The Indexes object to use (plain or getter), or
1725
- * its Id.
2002
+ * @param indexesOrIndexesId The Indexes object to use (plain or getter), or its
2003
+ * Id.
1726
2004
  * @returns A reactive object with a `current` Ids property.
1727
2005
  * @category Hook
1728
2006
  * @since v8.1.0
1729
2007
  */
1730
2008
  export function useSliceIds(
1731
- indexId: R<Id>,
1732
- indexesOrIndexesId?: R<Indexes | Id | undefined>,
2009
+ indexId: MaybeGetter<Id>,
2010
+ indexesOrIndexesId?: MaybeGetter<IndexesOrIndexesId | undefined>,
1733
2011
  ): {readonly current: Ids};
1734
2012
 
1735
2013
  /**
@@ -1738,16 +2016,16 @@ export function useSliceIds(
1738
2016
  * `.current`.
1739
2017
  * @param indexId The Id of the Index (or a getter returning it).
1740
2018
  * @param sliceId The Id of the Slice (or a getter returning it).
1741
- * @param indexesOrIndexesId The Indexes object to use (plain or getter), or
1742
- * its Id.
2019
+ * @param indexesOrIndexesId The Indexes object to use (plain or getter), or its
2020
+ * Id.
1743
2021
  * @returns A reactive object with a `current` Ids property.
1744
2022
  * @category Hook
1745
2023
  * @since v8.1.0
1746
2024
  */
1747
2025
  export function useSliceRowIds(
1748
- indexId: R<Id>,
1749
- sliceId: R<Id>,
1750
- indexesOrIndexesId?: R<Indexes | Id | undefined>,
2026
+ indexId: MaybeGetter<Id>,
2027
+ sliceId: MaybeGetter<Id>,
2028
+ indexesOrIndexesId?: MaybeGetter<IndexesOrIndexesId | undefined>,
1751
2029
  ): {readonly current: Ids};
1752
2030
 
1753
2031
  /**
@@ -1760,6 +2038,19 @@ export function useSliceRowIds(
1760
2038
  */
1761
2039
  export function useQueries(id?: Id): Queries | undefined;
1762
2040
 
2041
+ /**
2042
+ * The useQueriesOrQueriesById hook is used to get a reference to a Queries
2043
+ * object from a Provider context, or have it passed directly.
2044
+ * @param queriesOrQueriesId The Queries object, its Id, or a getter returning
2045
+ * either.
2046
+ * @returns A getter function returning the Queries object, or `undefined`.
2047
+ * @category Hook
2048
+ * @since v8.1.0
2049
+ */
2050
+ export function useQueriesOrQueriesById(
2051
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
2052
+ ): () => Queries | undefined;
2053
+
1763
2054
  /**
1764
2055
  * The useQueriesIds hook returns a reactive object with the Ids of all Queries
1765
2056
  * objects registered in the current Provider context.
@@ -1778,7 +2069,9 @@ export function useQueriesIds(): {readonly current: Ids};
1778
2069
  * @category Hook
1779
2070
  * @since v8.1.0
1780
2071
  */
1781
- export function useQueryIds(queriesOrQueriesId?: R<Queries | Id | undefined>): {
2072
+ export function useQueryIds(
2073
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
2074
+ ): {
1782
2075
  readonly current: Ids;
1783
2076
  };
1784
2077
 
@@ -1787,31 +2080,31 @@ export function useQueryIds(queriesOrQueriesId?: R<Queries | Id | undefined>): {
1787
2080
  * in a Queries object, and registers a listener so that any changes to that
1788
2081
  * result will update `.current`.
1789
2082
  * @param queryId The Id of the Query (or a getter returning it).
1790
- * @param queriesOrQueriesId The Queries object to use (plain or getter), or
1791
- * its Id.
2083
+ * @param queriesOrQueriesId The Queries object to use (plain or getter), or its
2084
+ * Id.
1792
2085
  * @returns A reactive object with a `current` Table property.
1793
2086
  * @category Hook
1794
2087
  * @since v8.1.0
1795
2088
  */
1796
2089
  export function useResultTable(
1797
- queryId: R<Id>,
1798
- queriesOrQueriesId?: R<Queries | Id | undefined>,
2090
+ queryId: MaybeGetter<Id>,
2091
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
1799
2092
  ): {readonly current: Table};
1800
2093
 
1801
2094
  /**
1802
2095
  * The useResultTableCellIds hook returns a reactive object reflecting the Ids
1803
- * of all Cells used across a result Table, and registers a listener so that
1804
- * any changes will update `.current`.
2096
+ * of all Cells used across a result Table, and registers a listener so that any
2097
+ * changes will update `.current`.
1805
2098
  * @param queryId The Id of the Query (or a getter returning it).
1806
- * @param queriesOrQueriesId The Queries object to use (plain or getter), or
1807
- * its Id.
2099
+ * @param queriesOrQueriesId The Queries object to use (plain or getter), or its
2100
+ * Id.
1808
2101
  * @returns A reactive object with a `current` Ids property.
1809
2102
  * @category Hook
1810
2103
  * @since v8.1.0
1811
2104
  */
1812
2105
  export function useResultTableCellIds(
1813
- queryId: R<Id>,
1814
- queriesOrQueriesId?: R<Queries | Id | undefined>,
2106
+ queryId: MaybeGetter<Id>,
2107
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
1815
2108
  ): {readonly current: Ids};
1816
2109
 
1817
2110
  /**
@@ -1819,15 +2112,15 @@ export function useResultTableCellIds(
1819
2112
  * Rows in a result Table, and registers a listener so that any changes will
1820
2113
  * update `.current`.
1821
2114
  * @param queryId The Id of the Query (or a getter returning it).
1822
- * @param queriesOrQueriesId The Queries object to use (plain or getter), or
1823
- * its Id.
2115
+ * @param queriesOrQueriesId The Queries object to use (plain or getter), or its
2116
+ * Id.
1824
2117
  * @returns A reactive object with a `current` number property.
1825
2118
  * @category Hook
1826
2119
  * @since v8.1.0
1827
2120
  */
1828
2121
  export function useResultRowCount(
1829
- queryId: R<Id>,
1830
- queriesOrQueriesId?: R<Queries | Id | undefined>,
2122
+ queryId: MaybeGetter<Id>,
2123
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
1831
2124
  ): {readonly current: number};
1832
2125
 
1833
2126
  /**
@@ -1835,15 +2128,15 @@ export function useResultRowCount(
1835
2128
  * Rows in a result Table, and registers a listener so that any changes will
1836
2129
  * update `.current`.
1837
2130
  * @param queryId The Id of the Query (or a getter returning it).
1838
- * @param queriesOrQueriesId The Queries object to use (plain or getter), or
1839
- * its Id.
2131
+ * @param queriesOrQueriesId The Queries object to use (plain or getter), or its
2132
+ * Id.
1840
2133
  * @returns A reactive object with a `current` Ids property.
1841
2134
  * @category Hook
1842
2135
  * @since v8.1.0
1843
2136
  */
1844
2137
  export function useResultRowIds(
1845
- queryId: R<Id>,
1846
- queriesOrQueriesId?: R<Queries | Id | undefined>,
2138
+ queryId: MaybeGetter<Id>,
2139
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
1847
2140
  ): {readonly current: Ids};
1848
2141
 
1849
2142
  /**
@@ -1855,19 +2148,19 @@ export function useResultRowIds(
1855
2148
  * @param descending Whether to sort descending (or a getter returning it).
1856
2149
  * @param offset The starting Row offset (or a getter returning it).
1857
2150
  * @param limit The maximum number of Rows (or a getter returning it).
1858
- * @param queriesOrQueriesId The Queries object to use (plain or getter), or
1859
- * its Id.
2151
+ * @param queriesOrQueriesId The Queries object to use (plain or getter), or its
2152
+ * Id.
1860
2153
  * @returns A reactive object with a `current` Ids property.
1861
2154
  * @category Hook
1862
2155
  * @since v8.1.0
1863
2156
  */
1864
2157
  export function useResultSortedRowIds(
1865
- queryId: R<Id>,
1866
- cellId?: R<Id | undefined>,
1867
- descending?: R<boolean>,
1868
- offset?: R<number>,
1869
- limit?: R<number | undefined>,
1870
- queriesOrQueriesId?: R<Queries | Id | undefined>,
2158
+ queryId: MaybeGetter<Id>,
2159
+ cellId?: MaybeGetter<Id | undefined>,
2160
+ descending?: MaybeGetter<boolean>,
2161
+ offset?: MaybeGetter<number>,
2162
+ limit?: MaybeGetter<number | undefined>,
2163
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
1871
2164
  ): {readonly current: Ids};
1872
2165
 
1873
2166
  /**
@@ -1876,16 +2169,16 @@ export function useResultSortedRowIds(
1876
2169
  * `.current`.
1877
2170
  * @param queryId The Id of the Query (or a getter returning it).
1878
2171
  * @param rowId The Id of the Row (or a getter returning it).
1879
- * @param queriesOrQueriesId The Queries object to use (plain or getter), or
1880
- * its Id.
2172
+ * @param queriesOrQueriesId The Queries object to use (plain or getter), or its
2173
+ * Id.
1881
2174
  * @returns A reactive object with a `current` Row property.
1882
2175
  * @category Hook
1883
2176
  * @since v8.1.0
1884
2177
  */
1885
2178
  export function useResultRow(
1886
- queryId: R<Id>,
1887
- rowId: R<Id>,
1888
- queriesOrQueriesId?: R<Queries | Id | undefined>,
2179
+ queryId: MaybeGetter<Id>,
2180
+ rowId: MaybeGetter<Id>,
2181
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
1889
2182
  ): {readonly current: Row};
1890
2183
 
1891
2184
  /**
@@ -1894,16 +2187,16 @@ export function useResultRow(
1894
2187
  * update `.current`.
1895
2188
  * @param queryId The Id of the Query (or a getter returning it).
1896
2189
  * @param rowId The Id of the Row (or a getter returning it).
1897
- * @param queriesOrQueriesId The Queries object to use (plain or getter), or
1898
- * its Id.
2190
+ * @param queriesOrQueriesId The Queries object to use (plain or getter), or its
2191
+ * Id.
1899
2192
  * @returns A reactive object with a `current` Ids property.
1900
2193
  * @category Hook
1901
2194
  * @since v8.1.0
1902
2195
  */
1903
2196
  export function useResultCellIds(
1904
- queryId: R<Id>,
1905
- rowId: R<Id>,
1906
- queriesOrQueriesId?: R<Queries | Id | undefined>,
2197
+ queryId: MaybeGetter<Id>,
2198
+ rowId: MaybeGetter<Id>,
2199
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
1907
2200
  ): {readonly current: Ids};
1908
2201
 
1909
2202
  /**
@@ -1913,17 +2206,17 @@ export function useResultCellIds(
1913
2206
  * @param queryId The Id of the Query (or a getter returning it).
1914
2207
  * @param rowId The Id of the Row (or a getter returning it).
1915
2208
  * @param cellId The Id of the Cell (or a getter returning it).
1916
- * @param queriesOrQueriesId The Queries object to use (plain or getter), or
1917
- * its Id.
2209
+ * @param queriesOrQueriesId The Queries object to use (plain or getter), or its
2210
+ * Id.
1918
2211
  * @returns A reactive object with a `current` Cell | undefined property.
1919
2212
  * @category Hook
1920
2213
  * @since v8.1.0
1921
2214
  */
1922
2215
  export function useResultCell(
1923
- queryId: R<Id>,
1924
- rowId: R<Id>,
1925
- cellId: R<Id>,
1926
- queriesOrQueriesId?: R<Queries | Id | undefined>,
2216
+ queryId: MaybeGetter<Id>,
2217
+ rowId: MaybeGetter<Id>,
2218
+ cellId: MaybeGetter<Id>,
2219
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
1927
2220
  ): {readonly current: CellOrUndefined};
1928
2221
 
1929
2222
  /**
@@ -1937,6 +2230,42 @@ export function useResultCell(
1937
2230
  */
1938
2231
  export function useRelationships(id?: Id): Relationships | undefined;
1939
2232
 
2233
+ /**
2234
+ * The useRelationshipsOrRelationshipsById hook is used to get a reference to a
2235
+ * Relationships object from a Provider context, or have it passed directly.
2236
+ * @param relationshipsOrRelationshipsId The Relationships object, its Id, or a
2237
+ * getter returning either.
2238
+ * @returns A getter function returning the Relationships object, or
2239
+ * `undefined`.
2240
+ * @category Hook
2241
+ * @since v8.1.0
2242
+ */
2243
+ export function useRelationshipsOrRelationshipsById(
2244
+ relationshipsOrRelationshipsId?: MaybeGetter<
2245
+ RelationshipsOrRelationshipsId | undefined
2246
+ >,
2247
+ ): () => Relationships | undefined;
2248
+
2249
+ /**
2250
+ * The useRelationshipsStoreTableIds hook returns the Store, local table Id, and
2251
+ * remote table Id for a given Relationships object and relationship Id.
2252
+ * @param relationshipsOrId The Relationships object, its Id, or a getter
2253
+ * returning either.
2254
+ * @param relationshipId The Id of the relationship, or a getter returning it.
2255
+ * @returns An object with `store`, `localTableId`, and `remoteTableId` getter
2256
+ * properties.
2257
+ * @category Hook
2258
+ * @since v8.1.0
2259
+ */
2260
+ export function useRelationshipsStoreTableIds(
2261
+ relationshipsOrId: MaybeGetter<RelationshipsOrRelationshipsId | undefined>,
2262
+ relationshipId: MaybeGetter<Id>,
2263
+ ): {
2264
+ readonly store: Store | undefined;
2265
+ readonly localTableId: Id | undefined;
2266
+ readonly remoteTableId: Id | undefined;
2267
+ };
2268
+
1940
2269
  /**
1941
2270
  * The useRelationshipsIds hook returns a reactive object with the Ids of all
1942
2271
  * Relationships objects registered in the current Provider context.
@@ -1948,16 +2277,18 @@ export function useRelationshipsIds(): {readonly current: Ids};
1948
2277
 
1949
2278
  /**
1950
2279
  * The useRelationshipIds hook returns a reactive object reflecting the Ids of
1951
- * the Relationships in a Relationships object, and registers a listener so
1952
- * that any changes will update `.current`.
1953
- * @param relationshipsOrRelationshipsId The Relationships object to use, or
1954
- * its Id.
2280
+ * the Relationships in a Relationships object, and registers a listener so that
2281
+ * any changes will update `.current`.
2282
+ * @param relationshipsOrRelationshipsId The Relationships object to use, or its
2283
+ * Id.
1955
2284
  * @returns A reactive object with a `current` Ids property.
1956
2285
  * @category Hook
1957
2286
  * @since v8.1.0
1958
2287
  */
1959
2288
  export function useRelationshipIds(
1960
- relationshipsOrRelationshipsId?: R<Relationships | Id | undefined>,
2289
+ relationshipsOrRelationshipsId?: MaybeGetter<
2290
+ RelationshipsOrRelationshipsId | undefined
2291
+ >,
1961
2292
  ): {readonly current: Ids};
1962
2293
 
1963
2294
  /**
@@ -1973,9 +2304,11 @@ export function useRelationshipIds(
1973
2304
  * @since v8.1.0
1974
2305
  */
1975
2306
  export function useRemoteRowId(
1976
- relationshipId: R<Id>,
1977
- localRowId: R<Id>,
1978
- relationshipsOrRelationshipsId?: R<Relationships | Id | undefined>,
2307
+ relationshipId: MaybeGetter<Id>,
2308
+ localRowId: MaybeGetter<Id>,
2309
+ relationshipsOrRelationshipsId?: MaybeGetter<
2310
+ RelationshipsOrRelationshipsId | undefined
2311
+ >,
1979
2312
  ): {readonly current: Id | undefined};
1980
2313
 
1981
2314
  /**
@@ -1991,9 +2324,11 @@ export function useRemoteRowId(
1991
2324
  * @since v8.1.0
1992
2325
  */
1993
2326
  export function useLocalRowIds(
1994
- relationshipId: R<Id>,
1995
- remoteRowId: R<Id>,
1996
- relationshipsOrRelationshipsId?: R<Relationships | Id | undefined>,
2327
+ relationshipId: MaybeGetter<Id>,
2328
+ remoteRowId: MaybeGetter<Id>,
2329
+ relationshipsOrRelationshipsId?: MaybeGetter<
2330
+ RelationshipsOrRelationshipsId | undefined
2331
+ >,
1997
2332
  ): {readonly current: Ids};
1998
2333
 
1999
2334
  /**
@@ -2009,9 +2344,11 @@ export function useLocalRowIds(
2009
2344
  * @since v8.1.0
2010
2345
  */
2011
2346
  export function useLinkedRowIds(
2012
- relationshipId: R<Id>,
2013
- firstRowId: R<Id>,
2014
- relationshipsOrRelationshipsId?: R<Relationships | Id | undefined>,
2347
+ relationshipId: MaybeGetter<Id>,
2348
+ firstRowId: MaybeGetter<Id>,
2349
+ relationshipsOrRelationshipsId?: MaybeGetter<
2350
+ RelationshipsOrRelationshipsId | undefined
2351
+ >,
2015
2352
  ): {readonly current: Ids};
2016
2353
 
2017
2354
  /**
@@ -2025,6 +2362,21 @@ export function useLinkedRowIds(
2025
2362
  */
2026
2363
  export function useCheckpoints(id?: Id): Checkpoints | undefined;
2027
2364
 
2365
+ /**
2366
+ * The useCheckpointsOrCheckpointsById hook is used to get a reference to a
2367
+ * Checkpoints object from a Provider context, or have it passed directly.
2368
+ * @param checkpointsOrCheckpointsId The Checkpoints object, its Id, or a
2369
+ * getter returning either.
2370
+ * @returns A getter function returning the Checkpoints object, or `undefined`.
2371
+ * @category Hook
2372
+ * @since v8.1.0
2373
+ */
2374
+ export function useCheckpointsOrCheckpointsById(
2375
+ checkpointsOrCheckpointsId?: MaybeGetter<
2376
+ CheckpointsOrCheckpointsId | undefined
2377
+ >,
2378
+ ): () => Checkpoints | undefined;
2379
+
2028
2380
  /**
2029
2381
  * The useCheckpointsIds hook returns a reactive object with the Ids of all
2030
2382
  * Checkpoints objects registered in the current Provider context.
@@ -2045,7 +2397,9 @@ export function useCheckpointsIds(): {readonly current: Ids};
2045
2397
  * @since v8.1.0
2046
2398
  */
2047
2399
  export function useCheckpointIds(
2048
- checkpointsOrCheckpointsId?: R<Checkpoints | Id | undefined>,
2400
+ checkpointsOrCheckpointsId?: MaybeGetter<
2401
+ CheckpointsOrCheckpointsId | undefined
2402
+ >,
2049
2403
  ): {readonly current: CheckpointIds};
2050
2404
 
2051
2405
  /**
@@ -2060,8 +2414,10 @@ export function useCheckpointIds(
2060
2414
  * @since v8.1.0
2061
2415
  */
2062
2416
  export function useCheckpoint(
2063
- checkpointId: R<Id>,
2064
- checkpointsOrCheckpointsId?: R<Checkpoints | Id | undefined>,
2417
+ checkpointId: MaybeGetter<Id>,
2418
+ checkpointsOrCheckpointsId?: MaybeGetter<
2419
+ CheckpointsOrCheckpointsId | undefined
2420
+ >,
2065
2421
  ): {readonly current: string | undefined};
2066
2422
 
2067
2423
  /**
@@ -2073,7 +2429,9 @@ export function useCheckpoint(
2073
2429
  * @since v8.1.0
2074
2430
  */
2075
2431
  export function useGoBackwardCallback(
2076
- checkpointsOrCheckpointsId?: R<Checkpoints | Id | undefined>,
2432
+ checkpointsOrCheckpointsId?: MaybeGetter<
2433
+ CheckpointsOrCheckpointsId | undefined
2434
+ >,
2077
2435
  ): () => void;
2078
2436
 
2079
2437
  /**
@@ -2085,7 +2443,9 @@ export function useGoBackwardCallback(
2085
2443
  * @since v8.1.0
2086
2444
  */
2087
2445
  export function useGoForwardCallback(
2088
- checkpointsOrCheckpointsId?: R<Checkpoints | Id | undefined>,
2446
+ checkpointsOrCheckpointsId?: MaybeGetter<
2447
+ CheckpointsOrCheckpointsId | undefined
2448
+ >,
2089
2449
  ): () => void;
2090
2450
 
2091
2451
  /**
@@ -2098,6 +2458,19 @@ export function useGoForwardCallback(
2098
2458
  */
2099
2459
  export function usePersister(id?: Id): AnyPersister | undefined;
2100
2460
 
2461
+ /**
2462
+ * The usePersisterOrPersisterById hook is used to get a reference to a
2463
+ * Persister object from a Provider context, or have it passed directly.
2464
+ * @param persisterOrPersisterId The Persister object, its Id, or a getter
2465
+ * returning either.
2466
+ * @returns A getter function returning the Persister object, or `undefined`.
2467
+ * @category Hook
2468
+ * @since v8.1.0
2469
+ */
2470
+ export function usePersisterOrPersisterById(
2471
+ persisterOrPersisterId?: MaybeGetter<PersisterOrPersisterId | undefined>,
2472
+ ): () => AnyPersister | undefined;
2473
+
2101
2474
  /**
2102
2475
  * The usePersisterIds hook returns a reactive object with the Ids of all
2103
2476
  * Persisters registered in the current Provider context.
@@ -2117,7 +2490,7 @@ export function usePersisterIds(): {readonly current: Ids};
2117
2490
  * @since v8.1.0
2118
2491
  */
2119
2492
  export function usePersisterStatus(
2120
- persisterOrPersisterId?: AnyPersister | Id,
2493
+ persisterOrPersisterId?: MaybeGetter<PersisterOrPersisterId | undefined>,
2121
2494
  ): {readonly current: Status};
2122
2495
 
2123
2496
  /**
@@ -2130,6 +2503,21 @@ export function usePersisterStatus(
2130
2503
  */
2131
2504
  export function useSynchronizer(id?: Id): Synchronizer | undefined;
2132
2505
 
2506
+ /**
2507
+ * The useSynchronizerOrSynchronizerById hook is used to get a reference to a
2508
+ * Synchronizer object from a Provider context, or have it passed directly.
2509
+ * @param synchronizerOrSynchronizerId The Synchronizer object, its Id, or a
2510
+ * getter returning either.
2511
+ * @returns A getter function returning the Synchronizer object, or `undefined`.
2512
+ * @category Hook
2513
+ * @since v8.1.0
2514
+ */
2515
+ export function useSynchronizerOrSynchronizerById(
2516
+ synchronizerOrSynchronizerId?: MaybeGetter<
2517
+ SynchronizerOrSynchronizerId | undefined
2518
+ >,
2519
+ ): () => Synchronizer | undefined;
2520
+
2133
2521
  /**
2134
2522
  * The useSynchronizerIds hook returns a reactive object with the Ids of all
2135
2523
  * Synchronizers registered in the current Provider context.
@@ -2149,9 +2537,857 @@ export function useSynchronizerIds(): {readonly current: Ids};
2149
2537
  * @since v8.1.0
2150
2538
  */
2151
2539
  export function useSynchronizerStatus(
2152
- synchronizerOrSynchronizerId?: Synchronizer | Id,
2540
+ synchronizerOrSynchronizerId?: MaybeGetter<
2541
+ SynchronizerOrSynchronizerId | undefined
2542
+ >,
2153
2543
  ): {readonly current: Status};
2154
2544
 
2545
+ /**
2546
+ * The useHasTablesListener hook registers a listener that is
2547
+ * called whenever any Tables are added to or removed from the
2548
+ * Store. The listener is tied to the component's `$effect`
2549
+ * lifecycle and is removed when the component unmounts.
2550
+ * @param listener The function to call when table presence
2551
+ * changes.
2552
+ * @param mutator An optional boolean indicating the listener
2553
+ * mutates Store data.
2554
+ * @param storeOrStoreId The Store to use, or its Id.
2555
+ * @category Hook
2556
+ * @since v8.1.0
2557
+ */
2558
+ export function useHasTablesListener(
2559
+ listener: HasTablesListener,
2560
+ mutator?: boolean,
2561
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2562
+ ): void;
2563
+
2564
+ /**
2565
+ * The useTablesListener hook registers a listener that is
2566
+ * called whenever tabular data in the Store changes.
2567
+ * @param listener The function to call when Tables change.
2568
+ * @param mutator An optional boolean indicating the listener
2569
+ * mutates Store data.
2570
+ * @param storeOrStoreId The Store to use, or its Id.
2571
+ * @category Hook
2572
+ * @since v8.1.0
2573
+ */
2574
+ export function useTablesListener(
2575
+ listener: TablesListener,
2576
+ mutator?: boolean,
2577
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2578
+ ): void;
2579
+
2580
+ /**
2581
+ * The useTableIdsListener hook registers a listener that is
2582
+ * called whenever the set of Table Ids in the Store changes.
2583
+ * @param listener The function to call when Table Ids change.
2584
+ * @param mutator An optional boolean indicating the listener
2585
+ * mutates Store data.
2586
+ * @param storeOrStoreId The Store to use, or its Id.
2587
+ * @category Hook
2588
+ * @since v8.1.0
2589
+ */
2590
+ export function useTableIdsListener(
2591
+ listener: TableIdsListener,
2592
+ mutator?: boolean,
2593
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2594
+ ): void;
2595
+
2596
+ /**
2597
+ * The useHasTableListener hook registers a listener that is
2598
+ * called whenever a specified Table is added to or removed
2599
+ * from the Store.
2600
+ * @param tableId The Id of the Table to listen to, or `null`
2601
+ * to listen to any Table.
2602
+ * @param listener The function to call when the Table changes.
2603
+ * @param mutator An optional boolean indicating the listener
2604
+ * mutates Store data.
2605
+ * @param storeOrStoreId The Store to use, or its Id.
2606
+ * @category Hook
2607
+ * @since v8.1.0
2608
+ */
2609
+ export function useHasTableListener(
2610
+ tableId: MaybeGetter<IdOrNull>,
2611
+ listener: HasTableListener,
2612
+ mutator?: boolean,
2613
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2614
+ ): void;
2615
+
2616
+ /**
2617
+ * The useTableListener hook registers a listener that is
2618
+ * called whenever data in a specified Table changes.
2619
+ * @param tableId The Id of the Table to listen to, or `null`
2620
+ * to listen to any Table.
2621
+ * @param listener The function to call when the Table changes.
2622
+ * @param mutator An optional boolean indicating the listener
2623
+ * mutates Store data.
2624
+ * @param storeOrStoreId The Store to use, or its Id.
2625
+ * @category Hook
2626
+ * @since v8.1.0
2627
+ */
2628
+ export function useTableListener(
2629
+ tableId: MaybeGetter<IdOrNull>,
2630
+ listener: TableListener,
2631
+ mutator?: boolean,
2632
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2633
+ ): void;
2634
+
2635
+ /**
2636
+ * The useTableCellIdsListener hook registers a listener that
2637
+ * is called whenever the Cell Ids used across a Table change.
2638
+ * @param tableId The Id of the Table to listen to, or `null`
2639
+ * to listen to any Table.
2640
+ * @param listener The function to call when Cell Ids change.
2641
+ * @param mutator An optional boolean indicating the listener
2642
+ * mutates Store data.
2643
+ * @param storeOrStoreId The Store to use, or its Id.
2644
+ * @category Hook
2645
+ * @since v8.1.0
2646
+ */
2647
+ export function useTableCellIdsListener(
2648
+ tableId: MaybeGetter<IdOrNull>,
2649
+ listener: TableCellIdsListener,
2650
+ mutator?: boolean,
2651
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2652
+ ): void;
2653
+
2654
+ /**
2655
+ * The useHasTableCellListener hook registers a listener that
2656
+ * is called whenever a specified Cell Id is added to or
2657
+ * removed from across a Table.
2658
+ * @param tableId The Id of the Table to listen to, or `null`
2659
+ * to listen to any Table.
2660
+ * @param cellId The Id of the Cell to listen to, or `null`
2661
+ * to listen to any Cell Id.
2662
+ * @param listener The function to call when the Cell Id
2663
+ * changes.
2664
+ * @param mutator An optional boolean indicating the listener
2665
+ * mutates Store data.
2666
+ * @param storeOrStoreId The Store to use, or its Id.
2667
+ * @category Hook
2668
+ * @since v8.1.0
2669
+ */
2670
+ export function useHasTableCellListener(
2671
+ tableId: MaybeGetter<IdOrNull>,
2672
+ cellId: MaybeGetter<IdOrNull>,
2673
+ listener: HasTableCellListener,
2674
+ mutator?: boolean,
2675
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2676
+ ): void;
2677
+
2678
+ /**
2679
+ * The useRowCountListener hook registers a listener that is
2680
+ * called whenever the count of Rows in a Table changes.
2681
+ * @param tableId The Id of the Table to listen to, or `null`
2682
+ * to listen to any Table.
2683
+ * @param listener The function to call when the Row count
2684
+ * changes.
2685
+ * @param mutator An optional boolean indicating the listener
2686
+ * mutates Store data.
2687
+ * @param storeOrStoreId The Store to use, or its Id.
2688
+ * @category Hook
2689
+ * @since v8.1.0
2690
+ */
2691
+ export function useRowCountListener(
2692
+ tableId: MaybeGetter<IdOrNull>,
2693
+ listener: RowCountListener,
2694
+ mutator?: boolean,
2695
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2696
+ ): void;
2697
+
2698
+ /**
2699
+ * The useRowIdsListener hook registers a listener that is
2700
+ * called whenever the Row Ids in a Table change.
2701
+ * @param tableId The Id of the Table to listen to, or `null`
2702
+ * to listen to any Table.
2703
+ * @param listener The function to call when Row Ids change.
2704
+ * @param mutator An optional boolean indicating the listener
2705
+ * mutates Store data.
2706
+ * @param storeOrStoreId The Store to use, or its Id.
2707
+ * @category Hook
2708
+ * @since v8.1.0
2709
+ */
2710
+ export function useRowIdsListener(
2711
+ tableId: MaybeGetter<IdOrNull>,
2712
+ listener: RowIdsListener,
2713
+ mutator?: boolean,
2714
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2715
+ ): void;
2716
+
2717
+ /**
2718
+ * The useSortedRowIdsListener hook registers a listener that
2719
+ * is called whenever the sorted Row Ids in a Table change.
2720
+ * @param tableId The Id of the Table to listen to.
2721
+ * @param cellId The Id of the Cell to sort by, or `undefined`
2722
+ * for default order.
2723
+ * @param descending Whether to sort descending.
2724
+ * @param offset The index of the first Row to include.
2725
+ * @param limit The maximum number of Rows to include, or
2726
+ * `undefined` for all.
2727
+ * @param listener The function to call when sorted Row Ids
2728
+ * change.
2729
+ * @param mutator An optional boolean indicating the listener
2730
+ * mutates Store data.
2731
+ * @param storeOrStoreId The Store to use, or its Id.
2732
+ * @category Hook
2733
+ * @since v8.1.0
2734
+ */
2735
+ export function useSortedRowIdsListener(
2736
+ tableId: MaybeGetter<Id>,
2737
+ cellId: MaybeGetter<Id | undefined>,
2738
+ descending: MaybeGetter<boolean>,
2739
+ offset: MaybeGetter<number>,
2740
+ limit: MaybeGetter<number | undefined>,
2741
+ listener: SortedRowIdsListener,
2742
+ mutator?: boolean,
2743
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2744
+ ): void;
2745
+
2746
+ /**
2747
+ * The useHasRowListener hook registers a listener that is
2748
+ * called whenever a specified Row is added to or removed from
2749
+ * a Table.
2750
+ * @param tableId The Id of the Table to listen to, or `null`
2751
+ * to listen to any Table.
2752
+ * @param rowId The Id of the Row to listen to, or `null` to
2753
+ * listen to any Row.
2754
+ * @param listener The function to call when the Row changes.
2755
+ * @param mutator An optional boolean indicating the listener
2756
+ * mutates Store data.
2757
+ * @param storeOrStoreId The Store to use, or its Id.
2758
+ * @category Hook
2759
+ * @since v8.1.0
2760
+ */
2761
+ export function useHasRowListener(
2762
+ tableId: MaybeGetter<IdOrNull>,
2763
+ rowId: MaybeGetter<IdOrNull>,
2764
+ listener: HasRowListener,
2765
+ mutator?: boolean,
2766
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2767
+ ): void;
2768
+
2769
+ /**
2770
+ * The useRowListener hook registers a listener that is called
2771
+ * whenever data in a specified Row changes.
2772
+ * @param tableId The Id of the Table to listen to, or `null`
2773
+ * to listen to any Table.
2774
+ * @param rowId The Id of the Row to listen to, or `null` to
2775
+ * listen to any Row.
2776
+ * @param listener The function to call when the Row changes.
2777
+ * @param mutator An optional boolean indicating the listener
2778
+ * mutates Store data.
2779
+ * @param storeOrStoreId The Store to use, or its Id.
2780
+ * @category Hook
2781
+ * @since v8.1.0
2782
+ */
2783
+ export function useRowListener(
2784
+ tableId: MaybeGetter<IdOrNull>,
2785
+ rowId: MaybeGetter<IdOrNull>,
2786
+ listener: RowListener,
2787
+ mutator?: boolean,
2788
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2789
+ ): void;
2790
+
2791
+ /**
2792
+ * The useCellIdsListener hook registers a listener that is
2793
+ * called whenever the Cell Ids in a Row change.
2794
+ * @param tableId The Id of the Table to listen to, or `null`
2795
+ * to listen to any Table.
2796
+ * @param rowId The Id of the Row to listen to, or `null` to
2797
+ * listen to any Row.
2798
+ * @param listener The function to call when Cell Ids change.
2799
+ * @param mutator An optional boolean indicating the listener
2800
+ * mutates Store data.
2801
+ * @param storeOrStoreId The Store to use, or its Id.
2802
+ * @category Hook
2803
+ * @since v8.1.0
2804
+ */
2805
+ export function useCellIdsListener(
2806
+ tableId: MaybeGetter<IdOrNull>,
2807
+ rowId: MaybeGetter<IdOrNull>,
2808
+ listener: CellIdsListener,
2809
+ mutator?: boolean,
2810
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2811
+ ): void;
2812
+
2813
+ /**
2814
+ * The useHasCellListener hook registers a listener that is
2815
+ * called whenever a specified Cell is added to or removed from
2816
+ * a Row.
2817
+ * @param tableId The Id of the Table to listen to, or `null`
2818
+ * to listen to any Table.
2819
+ * @param rowId The Id of the Row to listen to, or `null` to
2820
+ * listen to any Row.
2821
+ * @param cellId The Id of the Cell to listen to, or `null` to
2822
+ * listen to any Cell.
2823
+ * @param listener The function to call when the Cell changes.
2824
+ * @param mutator An optional boolean indicating the listener
2825
+ * mutates Store data.
2826
+ * @param storeOrStoreId The Store to use, or its Id.
2827
+ * @category Hook
2828
+ * @since v8.1.0
2829
+ */
2830
+ export function useHasCellListener(
2831
+ tableId: MaybeGetter<IdOrNull>,
2832
+ rowId: MaybeGetter<IdOrNull>,
2833
+ cellId: MaybeGetter<IdOrNull>,
2834
+ listener: HasCellListener,
2835
+ mutator?: boolean,
2836
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2837
+ ): void;
2838
+
2839
+ /**
2840
+ * The useCellListener hook registers a listener that is called
2841
+ * whenever the value of a specified Cell changes.
2842
+ * @param tableId The Id of the Table to listen to, or `null`
2843
+ * to listen to any Table.
2844
+ * @param rowId The Id of the Row to listen to, or `null` to
2845
+ * listen to any Row.
2846
+ * @param cellId The Id of the Cell to listen to, or `null` to
2847
+ * listen to any Cell.
2848
+ * @param listener The function to call when the Cell changes.
2849
+ * @param mutator An optional boolean indicating the listener
2850
+ * mutates Store data.
2851
+ * @param storeOrStoreId The Store to use, or its Id.
2852
+ * @category Hook
2853
+ * @since v8.1.0
2854
+ */
2855
+ export function useCellListener(
2856
+ tableId: MaybeGetter<IdOrNull>,
2857
+ rowId: MaybeGetter<IdOrNull>,
2858
+ cellId: MaybeGetter<IdOrNull>,
2859
+ listener: CellListener,
2860
+ mutator?: boolean,
2861
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2862
+ ): void;
2863
+
2864
+ /**
2865
+ * The useHasValuesListener hook registers a listener that is
2866
+ * called whenever any Values are added to or removed from the
2867
+ * Store.
2868
+ * @param listener The function to call when value presence
2869
+ * changes.
2870
+ * @param mutator An optional boolean indicating the listener
2871
+ * mutates Store data.
2872
+ * @param storeOrStoreId The Store to use, or its Id.
2873
+ * @category Hook
2874
+ * @since v8.1.0
2875
+ */
2876
+ export function useHasValuesListener(
2877
+ listener: HasValuesListener,
2878
+ mutator?: boolean,
2879
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2880
+ ): void;
2881
+
2882
+ /**
2883
+ * The useValuesListener hook registers a listener that is
2884
+ * called whenever any Values in the Store change.
2885
+ * @param listener The function to call when Values change.
2886
+ * @param mutator An optional boolean indicating the listener
2887
+ * mutates Store data.
2888
+ * @param storeOrStoreId The Store to use, or its Id.
2889
+ * @category Hook
2890
+ * @since v8.1.0
2891
+ */
2892
+ export function useValuesListener(
2893
+ listener: ValuesListener,
2894
+ mutator?: boolean,
2895
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2896
+ ): void;
2897
+
2898
+ /**
2899
+ * The useValueIdsListener hook registers a listener that is
2900
+ * called whenever the Value Ids in the Store change.
2901
+ * @param listener The function to call when Value Ids change.
2902
+ * @param mutator An optional boolean indicating the listener
2903
+ * mutates Store data.
2904
+ * @param storeOrStoreId The Store to use, or its Id.
2905
+ * @category Hook
2906
+ * @since v8.1.0
2907
+ */
2908
+ export function useValueIdsListener(
2909
+ listener: ValueIdsListener,
2910
+ mutator?: boolean,
2911
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2912
+ ): void;
2913
+
2914
+ /**
2915
+ * The useHasValueListener hook registers a listener that is
2916
+ * called whenever a specified Value is added to or removed
2917
+ * from the Store.
2918
+ * @param valueId The Id of the Value to listen to, or `null`
2919
+ * to listen to any Value.
2920
+ * @param listener The function to call when the Value changes.
2921
+ * @param mutator An optional boolean indicating the listener
2922
+ * mutates Store data.
2923
+ * @param storeOrStoreId The Store to use, or its Id.
2924
+ * @category Hook
2925
+ * @since v8.1.0
2926
+ */
2927
+ export function useHasValueListener(
2928
+ valueId: MaybeGetter<IdOrNull>,
2929
+ listener: HasValueListener,
2930
+ mutator?: boolean,
2931
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2932
+ ): void;
2933
+
2934
+ /**
2935
+ * The useValueListener hook registers a listener that is
2936
+ * called whenever the value of a specified Value changes.
2937
+ * @param valueId The Id of the Value to listen to, or `null`
2938
+ * to listen to any Value.
2939
+ * @param listener The function to call when the Value changes.
2940
+ * @param mutator An optional boolean indicating the listener
2941
+ * mutates Store data.
2942
+ * @param storeOrStoreId The Store to use, or its Id.
2943
+ * @category Hook
2944
+ * @since v8.1.0
2945
+ */
2946
+ export function useValueListener(
2947
+ valueId: MaybeGetter<IdOrNull>,
2948
+ listener: ValueListener,
2949
+ mutator?: boolean,
2950
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2951
+ ): void;
2952
+
2953
+ /**
2954
+ * The useStartTransactionListener hook registers a listener
2955
+ * that is called at the start of every Store transaction.
2956
+ * @param listener The function to call at transaction start.
2957
+ * @param storeOrStoreId The Store to use, or its Id.
2958
+ * @category Hook
2959
+ * @since v8.1.0
2960
+ */
2961
+ export function useStartTransactionListener(
2962
+ listener: TransactionListener,
2963
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2964
+ ): void;
2965
+
2966
+ /**
2967
+ * The useWillFinishTransactionListener hook registers a
2968
+ * listener called just before a Store transaction completes.
2969
+ * @param listener The function to call before transaction end.
2970
+ * @param storeOrStoreId The Store to use, or its Id.
2971
+ * @category Hook
2972
+ * @since v8.1.0
2973
+ */
2974
+ export function useWillFinishTransactionListener(
2975
+ listener: TransactionListener,
2976
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2977
+ ): void;
2978
+
2979
+ /**
2980
+ * The useDidFinishTransactionListener hook registers a
2981
+ * listener called just after a Store transaction completes.
2982
+ * @param listener The function to call after transaction end.
2983
+ * @param storeOrStoreId The Store to use, or its Id.
2984
+ * @category Hook
2985
+ * @since v8.1.0
2986
+ */
2987
+ export function useDidFinishTransactionListener(
2988
+ listener: TransactionListener,
2989
+ storeOrStoreId?: MaybeGetter<StoreOrStoreId | undefined>,
2990
+ ): void;
2991
+
2992
+ /**
2993
+ * The useMetricListener hook registers a listener that is
2994
+ * called whenever a specified Metric value changes.
2995
+ * @param metricId The Id of the Metric to listen to, or
2996
+ * `null` to listen to any Metric.
2997
+ * @param listener The function to call when the Metric
2998
+ * changes.
2999
+ * @param metricsOrMetricsId The Metrics object to use, or
3000
+ * its Id.
3001
+ * @category Hook
3002
+ * @since v8.1.0
3003
+ */
3004
+ export function useMetricListener(
3005
+ metricId: MaybeGetter<IdOrNull>,
3006
+ listener: MetricListener,
3007
+ metricsOrMetricsId?: MaybeGetter<MetricsOrMetricsId | undefined>,
3008
+ ): void;
3009
+
3010
+ /**
3011
+ * The useSliceIdsListener hook registers a listener that is
3012
+ * called whenever the Slice Ids in an Index change.
3013
+ * @param indexId The Id of the Index to listen to, or `null`
3014
+ * to listen to any Index.
3015
+ * @param listener The function to call when Slice Ids change.
3016
+ * @param indexesOrIndexesId The Indexes object to use, or its
3017
+ * Id.
3018
+ * @category Hook
3019
+ * @since v8.1.0
3020
+ */
3021
+ export function useSliceIdsListener(
3022
+ indexId: MaybeGetter<IdOrNull>,
3023
+ listener: SliceIdsListener,
3024
+ indexesOrIndexesId?: MaybeGetter<IndexesOrIndexesId | undefined>,
3025
+ ): void;
3026
+
3027
+ /**
3028
+ * The useSliceRowIdsListener hook registers a listener that
3029
+ * is called whenever the Row Ids in a Slice change.
3030
+ * @param indexId The Id of the Index to listen to, or `null`
3031
+ * to listen to any Index.
3032
+ * @param sliceId The Id of the Slice to listen to, or `null`
3033
+ * to listen to any Slice.
3034
+ * @param listener The function to call when Slice Row Ids
3035
+ * change.
3036
+ * @param indexesOrIndexesId The Indexes object to use, or its
3037
+ * Id.
3038
+ * @category Hook
3039
+ * @since v8.1.0
3040
+ */
3041
+ export function useSliceRowIdsListener(
3042
+ indexId: MaybeGetter<IdOrNull>,
3043
+ sliceId: MaybeGetter<IdOrNull>,
3044
+ listener: SliceRowIdsListener,
3045
+ indexesOrIndexesId?: MaybeGetter<IndexesOrIndexesId | undefined>,
3046
+ ): void;
3047
+
3048
+ /**
3049
+ * The useRemoteRowIdListener hook registers a listener that
3050
+ * is called whenever the remote Row Id for a local Row
3051
+ * changes.
3052
+ * @param relationshipId The Id of the Relationship, or `null`
3053
+ * to listen to any Relationship.
3054
+ * @param localRowId The Id of the local Row, or `null` to
3055
+ * listen to any local Row.
3056
+ * @param listener The function to call when the remote Row Id
3057
+ * changes.
3058
+ * @param relationshipsOrRelationshipsId The Relationships
3059
+ * object to use, or its Id.
3060
+ * @category Hook
3061
+ * @since v8.1.0
3062
+ */
3063
+ export function useRemoteRowIdListener(
3064
+ relationshipId: MaybeGetter<IdOrNull>,
3065
+ localRowId: MaybeGetter<IdOrNull>,
3066
+ listener: RemoteRowIdListener,
3067
+ relationshipsOrRelationshipsId?: MaybeGetter<
3068
+ RelationshipsOrRelationshipsId | undefined
3069
+ >,
3070
+ ): void;
3071
+
3072
+ /**
3073
+ * The useLocalRowIdsListener hook registers a listener that
3074
+ * is called whenever the local Row Ids for a remote Row
3075
+ * change.
3076
+ * @param relationshipId The Id of the Relationship, or `null`
3077
+ * to listen to any Relationship.
3078
+ * @param remoteRowId The Id of the remote Row, or `null` to
3079
+ * listen to any remote Row.
3080
+ * @param listener The function to call when local Row Ids
3081
+ * change.
3082
+ * @param relationshipsOrRelationshipsId The Relationships
3083
+ * object to use, or its Id.
3084
+ * @category Hook
3085
+ * @since v8.1.0
3086
+ */
3087
+ export function useLocalRowIdsListener(
3088
+ relationshipId: MaybeGetter<IdOrNull>,
3089
+ remoteRowId: MaybeGetter<IdOrNull>,
3090
+ listener: LocalRowIdsListener,
3091
+ relationshipsOrRelationshipsId?: MaybeGetter<
3092
+ RelationshipsOrRelationshipsId | undefined
3093
+ >,
3094
+ ): void;
3095
+
3096
+ /**
3097
+ * The useLinkedRowIdsListener hook registers a listener that
3098
+ * is called whenever the linked Row Ids for a first Row
3099
+ * change.
3100
+ * @param relationshipId The Id of the Relationship.
3101
+ * @param firstRowId The Id of the first Row.
3102
+ * @param listener The function to call when linked Row Ids
3103
+ * change.
3104
+ * @param relationshipsOrRelationshipsId The Relationships
3105
+ * object to use, or its Id.
3106
+ * @category Hook
3107
+ * @since v8.1.0
3108
+ */
3109
+ export function useLinkedRowIdsListener(
3110
+ relationshipId: MaybeGetter<Id>,
3111
+ firstRowId: MaybeGetter<Id>,
3112
+ listener: LinkedRowIdsListener,
3113
+ relationshipsOrRelationshipsId?: MaybeGetter<
3114
+ RelationshipsOrRelationshipsId | undefined
3115
+ >,
3116
+ ): void;
3117
+
3118
+ /**
3119
+ * The useResultTableListener hook registers a listener that
3120
+ * is called whenever the result Table of a query changes.
3121
+ * @param queryId The Id of the query to listen to, or `null`
3122
+ * to listen to any query.
3123
+ * @param listener The function to call when the result Table
3124
+ * changes.
3125
+ * @param queriesOrQueriesId The Queries object to use, or its
3126
+ * Id.
3127
+ * @category Hook
3128
+ * @since v8.1.0
3129
+ */
3130
+ export function useResultTableListener(
3131
+ queryId: MaybeGetter<IdOrNull>,
3132
+ listener: ResultTableListener,
3133
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
3134
+ ): void;
3135
+
3136
+ /**
3137
+ * The useResultTableCellIdsListener hook registers a listener
3138
+ * that is called whenever the Cell Ids across a result Table
3139
+ * change.
3140
+ * @param queryId The Id of the query to listen to, or `null`
3141
+ * to listen to any query.
3142
+ * @param listener The function to call when Cell Ids change.
3143
+ * @param queriesOrQueriesId The Queries object to use, or its
3144
+ * Id.
3145
+ * @category Hook
3146
+ * @since v8.1.0
3147
+ */
3148
+ export function useResultTableCellIdsListener(
3149
+ queryId: MaybeGetter<IdOrNull>,
3150
+ listener: ResultTableCellIdsListener,
3151
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
3152
+ ): void;
3153
+
3154
+ /**
3155
+ * The useResultRowCountListener hook registers a listener that
3156
+ * is called whenever the count of result Rows changes.
3157
+ * @param queryId The Id of the query to listen to, or `null`
3158
+ * to listen to any query.
3159
+ * @param listener The function to call when the count changes.
3160
+ * @param queriesOrQueriesId The Queries object to use, or its
3161
+ * Id.
3162
+ * @category Hook
3163
+ * @since v8.1.0
3164
+ */
3165
+ export function useResultRowCountListener(
3166
+ queryId: MaybeGetter<IdOrNull>,
3167
+ listener: ResultRowCountListener,
3168
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
3169
+ ): void;
3170
+
3171
+ /**
3172
+ * The useResultRowIdsListener hook registers a listener that
3173
+ * is called whenever the result Row Ids of a query change.
3174
+ * @param queryId The Id of the query to listen to, or `null`
3175
+ * to listen to any query.
3176
+ * @param listener The function to call when result Row Ids
3177
+ * change.
3178
+ * @param queriesOrQueriesId The Queries object to use, or its
3179
+ * Id.
3180
+ * @category Hook
3181
+ * @since v8.1.0
3182
+ */
3183
+ export function useResultRowIdsListener(
3184
+ queryId: MaybeGetter<IdOrNull>,
3185
+ listener: ResultRowIdsListener,
3186
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
3187
+ ): void;
3188
+
3189
+ /**
3190
+ * The useResultSortedRowIdsListener hook registers a listener
3191
+ * that is called whenever the sorted result Row Ids change.
3192
+ * @param queryId The Id of the query to listen to.
3193
+ * @param cellId The Id of the Cell to sort by, or `undefined`
3194
+ * for default order.
3195
+ * @param descending Whether to sort descending.
3196
+ * @param offset The index of the first Row to include.
3197
+ * @param limit The maximum number of Rows to include, or
3198
+ * `undefined` for all.
3199
+ * @param listener The function to call when sorted Row Ids
3200
+ * change.
3201
+ * @param queriesOrQueriesId The Queries object to use, or its
3202
+ * Id.
3203
+ * @category Hook
3204
+ * @since v8.1.0
3205
+ */
3206
+ export function useResultSortedRowIdsListener(
3207
+ queryId: MaybeGetter<Id>,
3208
+ cellId: MaybeGetter<Id | undefined>,
3209
+ descending: MaybeGetter<boolean>,
3210
+ offset: MaybeGetter<number>,
3211
+ limit: MaybeGetter<number | undefined>,
3212
+ listener: ResultSortedRowIdsListener,
3213
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
3214
+ ): void;
3215
+
3216
+ /**
3217
+ * The useResultRowListener hook registers a listener that is
3218
+ * called whenever a result Row changes.
3219
+ * @param queryId The Id of the query to listen to, or `null`
3220
+ * to listen to any query.
3221
+ * @param rowId The Id of the result Row to listen to, or
3222
+ * `null` to listen to any result Row.
3223
+ * @param listener The function to call when the result Row
3224
+ * changes.
3225
+ * @param queriesOrQueriesId The Queries object to use, or its
3226
+ * Id.
3227
+ * @category Hook
3228
+ * @since v8.1.0
3229
+ */
3230
+ export function useResultRowListener(
3231
+ queryId: MaybeGetter<IdOrNull>,
3232
+ rowId: MaybeGetter<IdOrNull>,
3233
+ listener: ResultRowListener,
3234
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
3235
+ ): void;
3236
+
3237
+ /**
3238
+ * The useResultCellIdsListener hook registers a listener that
3239
+ * is called whenever the Cell Ids in a result Row change.
3240
+ * @param queryId The Id of the query to listen to, or `null`
3241
+ * to listen to any query.
3242
+ * @param rowId The Id of the result Row to listen to, or
3243
+ * `null` to listen to any result Row.
3244
+ * @param listener The function to call when Cell Ids change.
3245
+ * @param queriesOrQueriesId The Queries object to use, or its
3246
+ * Id.
3247
+ * @category Hook
3248
+ * @since v8.1.0
3249
+ */
3250
+ export function useResultCellIdsListener(
3251
+ queryId: MaybeGetter<IdOrNull>,
3252
+ rowId: MaybeGetter<IdOrNull>,
3253
+ listener: ResultCellIdsListener,
3254
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
3255
+ ): void;
3256
+
3257
+ /**
3258
+ * The useResultCellListener hook registers a listener that is
3259
+ * called whenever the value of a result Cell changes.
3260
+ * @param queryId The Id of the query to listen to, or `null`
3261
+ * to listen to any query.
3262
+ * @param rowId The Id of the result Row to listen to, or
3263
+ * `null` to listen to any result Row.
3264
+ * @param cellId The Id of the result Cell to listen to, or
3265
+ * `null` to listen to any result Cell.
3266
+ * @param listener The function to call when the result Cell
3267
+ * changes.
3268
+ * @param queriesOrQueriesId The Queries object to use, or its
3269
+ * Id.
3270
+ * @category Hook
3271
+ * @since v8.1.0
3272
+ */
3273
+ export function useResultCellListener(
3274
+ queryId: MaybeGetter<IdOrNull>,
3275
+ rowId: MaybeGetter<IdOrNull>,
3276
+ cellId: MaybeGetter<IdOrNull>,
3277
+ listener: ResultCellListener,
3278
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
3279
+ ): void;
3280
+
3281
+ /**
3282
+ * The useParamValuesListener hook registers a listener that
3283
+ * is called whenever the parameter values for a query change.
3284
+ * @param queryId The Id of the query to listen to, or `null`
3285
+ * to listen to any query.
3286
+ * @param listener The function to call when parameter values
3287
+ * change.
3288
+ * @param queriesOrQueriesId The Queries object to use, or its
3289
+ * Id.
3290
+ * @category Hook
3291
+ * @since v8.1.0
3292
+ */
3293
+ export function useParamValuesListener(
3294
+ queryId: MaybeGetter<IdOrNull>,
3295
+ listener: ParamValuesListener,
3296
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
3297
+ ): void;
3298
+
3299
+ /**
3300
+ * The useParamValueListener hook registers a listener that is
3301
+ * called whenever a specific parameter value for a query
3302
+ * changes.
3303
+ * @param queryId The Id of the query to listen to, or `null`
3304
+ * to listen to any query.
3305
+ * @param paramId The Id of the parameter to listen to, or
3306
+ * `null` to listen to any parameter.
3307
+ * @param listener The function to call when the parameter
3308
+ * value changes.
3309
+ * @param queriesOrQueriesId The Queries object to use, or its
3310
+ * Id.
3311
+ * @category Hook
3312
+ * @since v8.1.0
3313
+ */
3314
+ export function useParamValueListener(
3315
+ queryId: MaybeGetter<IdOrNull>,
3316
+ paramId: MaybeGetter<IdOrNull>,
3317
+ listener: ParamValueListener,
3318
+ queriesOrQueriesId?: MaybeGetter<QueriesOrQueriesId | undefined>,
3319
+ ): void;
3320
+
3321
+ /**
3322
+ * The useCheckpointIdsListener hook registers a listener that
3323
+ * is called whenever the Checkpoint Ids change.
3324
+ * @param listener The function to call when Checkpoint Ids
3325
+ * change.
3326
+ * @param checkpointsOrCheckpointsId The Checkpoints object to
3327
+ * use, or its Id.
3328
+ * @category Hook
3329
+ * @since v8.1.0
3330
+ */
3331
+ export function useCheckpointIdsListener(
3332
+ listener: CheckpointIdsListener,
3333
+ checkpointsOrCheckpointsId?: MaybeGetter<
3334
+ CheckpointsOrCheckpointsId | undefined
3335
+ >,
3336
+ ): void;
3337
+
3338
+ /**
3339
+ * The useCheckpointListener hook registers a listener that is
3340
+ * called whenever the label of a specified Checkpoint changes.
3341
+ * @param checkpointId The Id of the Checkpoint to listen to,
3342
+ * or `null` to listen to any Checkpoint.
3343
+ * @param listener The function to call when the Checkpoint
3344
+ * label changes.
3345
+ * @param checkpointsOrCheckpointsId The Checkpoints object to
3346
+ * use, or its Id.
3347
+ * @category Hook
3348
+ * @since v8.1.0
3349
+ */
3350
+ export function useCheckpointListener(
3351
+ checkpointId: MaybeGetter<IdOrNull>,
3352
+ listener: CheckpointListener,
3353
+ checkpointsOrCheckpointsId?: MaybeGetter<
3354
+ CheckpointsOrCheckpointsId | undefined
3355
+ >,
3356
+ ): void;
3357
+
3358
+ /**
3359
+ * The usePersisterStatusListener hook registers a listener
3360
+ * that is called whenever the status of a Persister changes.
3361
+ * @param listener The function to call when the status
3362
+ * changes.
3363
+ * @param persisterOrPersisterId The Persister to use, or its
3364
+ * Id.
3365
+ * @category Hook
3366
+ * @since v8.1.0
3367
+ */
3368
+ export function usePersisterStatusListener(
3369
+ listener: StatusListener,
3370
+ persisterOrPersisterId?: MaybeGetter<PersisterOrPersisterId | undefined>,
3371
+ ): void;
3372
+
3373
+ /**
3374
+ * The useSynchronizerStatusListener hook registers a listener
3375
+ * that is called whenever the status of a Synchronizer
3376
+ * changes.
3377
+ * @param listener The function to call when the status
3378
+ * changes.
3379
+ * @param synchronizerOrSynchronizerId The Synchronizer to use,
3380
+ * or its Id.
3381
+ * @category Hook
3382
+ * @since v8.1.0
3383
+ */
3384
+ export function useSynchronizerStatusListener(
3385
+ listener: StatusListener,
3386
+ synchronizerOrSynchronizerId?: MaybeGetter<
3387
+ SynchronizerOrSynchronizerId | undefined
3388
+ >,
3389
+ ): void;
3390
+
2155
3391
  /**
2156
3392
  * The provideStore function registers a Store with a given Id into the current
2157
3393
  * Provider context, making it available to all descendant components.