tinybase 3.1.0-beta.4 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/lib/debug/ui-react.js +2 -2
  2. package/lib/{checkpoints.d.ts → types/checkpoints.d.ts} +13 -13
  3. package/lib/{debug → types}/indexes.d.ts +10 -16
  4. package/lib/{debug → types}/metrics.d.ts +49 -50
  5. package/lib/{debug → types}/persisters.d.ts +26 -30
  6. package/lib/{cjs-es6 → types}/queries.d.ts +474 -309
  7. package/lib/{debug → types}/relationships.d.ts +11 -17
  8. package/lib/{debug → types}/store.d.ts +180 -1038
  9. package/lib/types/tinybase.d.ts +14 -0
  10. package/lib/{debug → types}/tools.d.ts +12 -12
  11. package/lib/{debug → types}/ui-react.d.ts +11 -5
  12. package/lib/{cjs-es6 → types/with-schemas}/checkpoints.d.ts +93 -7
  13. package/lib/{cjs → types/with-schemas}/indexes.d.ts +136 -18
  14. package/lib/types/with-schemas/internal/queries.d.ts +15 -0
  15. package/lib/types/with-schemas/internal/store.d.ts +101 -0
  16. package/lib/types/with-schemas/internal/ui-react.d.ts +776 -0
  17. package/lib/{cjs → types/with-schemas}/metrics.d.ts +115 -50
  18. package/lib/{cjs → types/with-schemas}/persisters.d.ts +102 -4
  19. package/lib/{debug → types/with-schemas}/queries.d.ts +865 -346
  20. package/lib/{cjs → types/with-schemas}/relationships.d.ts +151 -20
  21. package/lib/{cjs-es6 → types/with-schemas}/store.d.ts +1082 -801
  22. package/lib/types/with-schemas/tinybase.d.ts +14 -0
  23. package/lib/{cjs-es6 → types/with-schemas}/tools.d.ts +21 -10
  24. package/lib/{cjs-es6 → types/with-schemas}/ui-react.d.ts +1871 -1314
  25. package/package.json +145 -29
  26. package/readme.md +14 -14
  27. package/lib/cjs/checkpoints.d.ts +0 -961
  28. package/lib/cjs/queries.d.ts +0 -3028
  29. package/lib/cjs/store.d.ts +0 -6143
  30. package/lib/cjs/tinybase.d.ts +0 -14
  31. package/lib/cjs/tools.d.ts +0 -536
  32. package/lib/cjs/ui-react.d.ts +0 -10921
  33. package/lib/cjs-es6/indexes.d.ts +0 -974
  34. package/lib/cjs-es6/metrics.d.ts +0 -829
  35. package/lib/cjs-es6/persisters.d.ts +0 -733
  36. package/lib/cjs-es6/relationships.d.ts +0 -1209
  37. package/lib/cjs-es6/tinybase.d.ts +0 -14
  38. package/lib/common.d.ts +0 -115
  39. package/lib/debug/checkpoints.d.ts +0 -961
  40. package/lib/debug/common.d.ts +0 -115
  41. package/lib/debug/tinybase.d.ts +0 -14
  42. package/lib/es6/checkpoints.d.ts +0 -961
  43. package/lib/es6/common.d.ts +0 -115
  44. package/lib/es6/indexes.d.ts +0 -974
  45. package/lib/es6/metrics.d.ts +0 -829
  46. package/lib/es6/persisters.d.ts +0 -733
  47. package/lib/es6/queries.d.ts +0 -3028
  48. package/lib/es6/relationships.d.ts +0 -1209
  49. package/lib/es6/store.d.ts +0 -6143
  50. package/lib/es6/tinybase.d.ts +0 -14
  51. package/lib/es6/tools.d.ts +0 -536
  52. package/lib/es6/ui-react.d.ts +0 -10921
  53. package/lib/indexes.d.ts +0 -974
  54. package/lib/metrics.d.ts +0 -829
  55. package/lib/persisters.d.ts +0 -733
  56. package/lib/queries.d.ts +0 -3028
  57. package/lib/relationships.d.ts +0 -1209
  58. package/lib/store.d.ts +0 -6143
  59. package/lib/tinybase.d.ts +0 -14
  60. package/lib/tools.d.ts +0 -536
  61. package/lib/ui-react.d.ts +0 -10921
  62. package/lib/umd/checkpoints.d.ts +0 -961
  63. package/lib/umd/common.d.ts +0 -115
  64. package/lib/umd/indexes.d.ts +0 -974
  65. package/lib/umd/metrics.d.ts +0 -829
  66. package/lib/umd/persisters.d.ts +0 -733
  67. package/lib/umd/queries.d.ts +0 -3028
  68. package/lib/umd/relationships.d.ts +0 -1209
  69. package/lib/umd/store.d.ts +0 -6143
  70. package/lib/umd/tinybase.d.ts +0 -14
  71. package/lib/umd/tools.d.ts +0 -536
  72. package/lib/umd/ui-react.d.ts +0 -10921
  73. package/lib/umd-es6/checkpoints.d.ts +0 -961
  74. package/lib/umd-es6/common.d.ts +0 -115
  75. package/lib/umd-es6/indexes.d.ts +0 -974
  76. package/lib/umd-es6/metrics.d.ts +0 -829
  77. package/lib/umd-es6/persisters.d.ts +0 -733
  78. package/lib/umd-es6/queries.d.ts +0 -3028
  79. package/lib/umd-es6/relationships.d.ts +0 -1209
  80. package/lib/umd-es6/store.d.ts +0 -6143
  81. package/lib/umd-es6/tinybase.d.ts +0 -14
  82. package/lib/umd-es6/tools.d.ts +0 -536
  83. package/lib/umd-es6/ui-react.d.ts +0 -10921
  84. /package/lib/{cjs-es6 → types}/common.d.ts +0 -0
  85. /package/lib/{cjs → types/with-schemas}/common.d.ts +0 -0
@@ -23,12 +23,56 @@
23
23
  * @module ui-react
24
24
  */
25
25
 
26
+ import {
27
+ AllCellIdFromSchema,
28
+ CellIdFromSchema,
29
+ DefaultedValueFromSchema,
30
+ NoInfer,
31
+ TableIdFromSchema,
32
+ ValueIdFromSchema,
33
+ } from './internal/store';
34
+ import {
35
+ BackwardCheckpointsProps,
36
+ CellProps,
37
+ CheckpointProps,
38
+ CheckpointsOrCheckpointsId,
39
+ ComponentReturnType,
40
+ CurrentCheckpointProps,
41
+ ExtraProps,
42
+ ForwardCheckpointsProps,
43
+ IndexProps,
44
+ IndexesOrIndexesId,
45
+ LinkedRowsProps,
46
+ LocalRowsProps,
47
+ MetricProps,
48
+ MetricsOrMetricsId,
49
+ ProviderProps,
50
+ QueriesOrQueriesId,
51
+ RelationshipsOrRelationshipsId,
52
+ RemoteRowProps,
53
+ ResultCellProps,
54
+ ResultRowProps,
55
+ ResultSortedTableProps,
56
+ ResultTableProps,
57
+ RowProps,
58
+ SliceProps,
59
+ SortedTableProps,
60
+ StoreOrStoreId,
61
+ TableProps,
62
+ TablesProps,
63
+ UndoOrRedoInformation,
64
+ ValueProps,
65
+ ValuesProps,
66
+ } from './internal/ui-react';
26
67
  import {Callback, Id, IdOrNull, Ids, ParameterizedCallback} from './common.d';
27
68
  import {
28
69
  Cell,
29
70
  CellIdsListener,
30
71
  CellListener,
72
+ CellOrUndefined,
31
73
  MapCell,
74
+ MapValue,
75
+ OptionalSchemas,
32
76
  Row,
33
77
  RowIdsListener,
34
78
  RowListener,
@@ -51,7 +95,6 @@ import {
51
95
  CheckpointListener,
52
96
  Checkpoints,
53
97
  } from './checkpoints.d';
54
- import {ComponentType, ReactElement} from 'react';
55
98
  import {Indexes, SliceIdsListener, SliceRowIdsListener} from './indexes.d';
56
99
  import {
57
100
  LinkedRowIdsListener,
@@ -62,18 +105,29 @@ import {
62
105
  import {MetricListener, Metrics} from './metrics.d';
63
106
  import {
64
107
  Queries,
108
+ ResultCell,
65
109
  ResultCellIdsListener,
66
110
  ResultCellListener,
111
+ ResultRow,
67
112
  ResultRowIdsListener,
68
113
  ResultRowListener,
114
+ ResultTable,
69
115
  ResultTableListener,
70
116
  } from './queries.d';
71
117
  import {Persister} from './persisters.d';
118
+ import {ReactElement} from 'react';
72
119
 
73
- /**
120
+ export type WithSchemas<Schemas extends OptionalSchemas> = {
121
+ /**
74
122
  * The StoreOrStoreId type is used when you need to refer to a Store in a React
75
123
  * hook or component.
76
124
  *
125
+ * This has schema-based typing. The following is a simplified representation:
126
+ *
127
+ * ```ts override
128
+ * Store | Id;
129
+ * ```
130
+ *
77
131
  * In some simple cases you will already have a direct reference to the Store.
78
132
  *
79
133
  * This module also includes a Provider component that can be used to wrap
@@ -85,12 +139,18 @@ import {Persister} from './persisters.d';
85
139
  *
86
140
  * @category Identity
87
141
  */
88
- export type StoreOrStoreId = Store | Id;
142
+ StoreOrStoreId: StoreOrStoreId<Schemas>;
89
143
 
90
- /**
144
+ /**
91
145
  * The MetricsOrMetricsId type is used when you need to refer to a Metrics
92
146
  * object in a React hook or component.
93
147
  *
148
+ * This has schema-based typing. The following is a simplified representation:
149
+ *
150
+ * ```ts override
151
+ * Metrics | Id;
152
+ * ```
153
+ *
94
154
  * In some simple cases you will already have a direct reference to the Metrics
95
155
  * object.
96
156
  *
@@ -104,12 +164,18 @@ export type StoreOrStoreId = Store | Id;
104
164
  *
105
165
  * @category Identity
106
166
  */
107
- export type MetricsOrMetricsId = Metrics | Id;
167
+ MetricsOrMetricsId: MetricsOrMetricsId<Schemas>;
108
168
 
109
- /**
169
+ /**
110
170
  * The IndexesOrIndexesId type is used when you need to refer to a Indexes
111
171
  * object in a React hook or component.
112
172
  *
173
+ * This has schema-based typing. The following is a simplified representation:
174
+ *
175
+ * ```ts override
176
+ * Indexes | Id;
177
+ * ```
178
+ *
113
179
  * In some simple cases you will already have a direct reference to the Indexes
114
180
  * object.
115
181
  *
@@ -123,12 +189,18 @@ export type MetricsOrMetricsId = Metrics | Id;
123
189
  *
124
190
  * @category Identity
125
191
  */
126
- export type IndexesOrIndexesId = Indexes | Id;
192
+ IndexesOrIndexesId: IndexesOrIndexesId<Schemas>;
127
193
 
128
- /**
194
+ /**
129
195
  * The RelationshipsOrRelationshipsId type is used when you need to refer to a
130
196
  * Relationships object in a React hook or component.
131
197
  *
198
+ * This has schema-based typing. The following is a simplified representation:
199
+ *
200
+ * ```ts override
201
+ * Relationships | Id;
202
+ * ```
203
+ *
132
204
  * In some simple cases you will already have a direct reference to the
133
205
  * Relationships object.
134
206
  *
@@ -142,12 +214,18 @@ export type IndexesOrIndexesId = Indexes | Id;
142
214
  *
143
215
  * @category Identity
144
216
  */
145
- export type RelationshipsOrRelationshipsId = Relationships | Id;
217
+ RelationshipsOrRelationshipsId: RelationshipsOrRelationshipsId<Schemas>;
146
218
 
147
- /**
219
+ /**
148
220
  * The QueriesOrQueriesId type is used when you need to refer to a Queries
149
221
  * object in a React hook or component.
150
222
  *
223
+ * This has schema-based typing. The following is a simplified representation:
224
+ *
225
+ * ```ts override
226
+ * Queries | Id;
227
+ * ```
228
+ *
151
229
  * In some simple cases you will already have a direct reference to the Queries
152
230
  * object.
153
231
  *
@@ -162,12 +240,18 @@ export type RelationshipsOrRelationshipsId = Relationships | Id;
162
240
  * @category Identity
163
241
  * @since v2.0.0
164
242
  */
165
- export type QueriesOrQueriesId = Queries | Id;
243
+ QueriesOrQueriesId: QueriesOrQueriesId<Schemas>;
166
244
 
167
- /**
245
+ /**
168
246
  * The CheckpointsOrCheckpointsId type is used when you need to refer to a
169
247
  * Checkpoints object in a React hook or component.
170
248
  *
249
+ * This has schema-based typing. The following is a simplified representation:
250
+ *
251
+ * ```ts override
252
+ * Checkpoints | Id;
253
+ * ```
254
+ *
171
255
  * In some simple cases you will already have a direct reference to the
172
256
  * Checkpoints object.
173
257
  *
@@ -181,9 +265,9 @@ export type QueriesOrQueriesId = Queries | Id;
181
265
  *
182
266
  * @category Identity
183
267
  */
184
- export type CheckpointsOrCheckpointsId = Checkpoints | Id;
268
+ CheckpointsOrCheckpointsId: CheckpointsOrCheckpointsId<Schemas>;
185
269
 
186
- /**
270
+ /**
187
271
  * The UndoOrRedoInformation type is an array that you can fetch from a
188
272
  * Checkpoints object to that indicates if and how you can move the state of the
189
273
  * underlying Store forward or backward.
@@ -194,12 +278,21 @@ export type CheckpointsOrCheckpointsId = Checkpoints | Id;
194
278
  *
195
279
  * @category Checkpoints
196
280
  */
197
- export type UndoOrRedoInformation = [boolean, Callback, Id | undefined, string];
281
+ UndoOrRedoInformation: UndoOrRedoInformation;
198
282
 
199
- /**
283
+ /**
200
284
  * The useCreateStore hook is used to create a Store within a React application
201
285
  * with convenient memoization.
202
286
  *
287
+ * This has schema-based typing. The following is a simplified representation:
288
+ *
289
+ * ```ts override
290
+ * useCreateStore(
291
+ * create: () => Store,
292
+ * createDeps?: React.DependencyList,
293
+ * ): Store;
294
+ * ```
295
+ *
203
296
  * It is possible to create a Store outside of the React app with the regular
204
297
  * createStore function and pass it in, but you may prefer to create it within
205
298
  * the app, perhaps inside the top-level component. To defend against a new
@@ -277,15 +370,21 @@ export type UndoOrRedoInformation = [boolean, Callback, Id | undefined, string];
277
370
  * ```
278
371
  * @category Store hooks
279
372
  */
280
- export function useCreateStore(
281
- create: () => Store,
282
- createDeps?: React.DependencyList,
283
- ): Store;
373
+ useCreateStore: (
374
+ create: () => Store<Schemas>,
375
+ createDeps?: React.DependencyList,
376
+ ) => Store<Schemas>;
284
377
 
285
- /**
378
+ /**
286
379
  * The useStore hook is used to get a reference to a Store from within a
287
380
  * Provider component context.
288
381
  *
382
+ * This has schema-based typing. The following is a simplified representation:
383
+ *
384
+ * ```ts override
385
+ * useStore(id?: Id): Store | undefined;
386
+ * ```
387
+ *
289
388
  * A Provider component is used to wrap part of an application in a context. It
290
389
  * can contain a default Store (or a set of Store objects named by Id) that can
291
390
  * be easily accessed without having to be passed down as props through every
@@ -341,13 +440,19 @@ export function useCreateStore(
341
440
  * ```
342
441
  * @category Store hooks
343
442
  */
344
- export function useStore(id?: Id): Store | undefined;
443
+ useStore: (id?: Id) => Store<Schemas> | undefined;
345
444
 
346
- /**
445
+ /**
347
446
  * The useTables hook returns a Tables object containing the tabular data of a
348
447
  * Store, and registers a listener so that any changes to that result will cause
349
448
  * a re-render.
350
449
  *
450
+ * This has schema-based typing. The following is a simplified representation:
451
+ *
452
+ * ```ts override
453
+ * useTables(storeOrStoreId?: StoreOrStoreId): Tables;
454
+ * ```
455
+ *
351
456
  * A Provider component is used to wrap part of an application in a context, and
352
457
  * it can contain a default Store or a set of Store objects named by Id. The
353
458
  * useTables hook lets you indicate which Store to get data for: omit the
@@ -419,12 +524,18 @@ export function useStore(id?: Id): Store | undefined;
419
524
  * ```
420
525
  * @category Store hooks
421
526
  */
422
- export function useTables(storeOrStoreId?: StoreOrStoreId): Tables;
527
+ useTables: (storeOrStoreId?: StoreOrStoreId<Schemas>) => Tables<Schemas[0]>;
423
528
 
424
- /**
529
+ /**
425
530
  * The useTableIds hook returns the Ids of every Table in a Store, and registers
426
531
  * a listener so that any changes to that result will cause a re-render.
427
532
  *
533
+ * This has schema-based typing. The following is a simplified representation:
534
+ *
535
+ * ```ts override
536
+ * useTableIds(storeOrStoreId?: StoreOrStoreId): Ids;
537
+ * ```
538
+ *
428
539
  * A Provider component is used to wrap part of an application in a context, and
429
540
  * it can contain a default Store or a set of Store objects named by Id. The
430
541
  * useTableIds hook lets you indicate which Store to get data for: omit the
@@ -495,13 +606,21 @@ export function useTables(storeOrStoreId?: StoreOrStoreId): Tables;
495
606
  * ```
496
607
  * @category Store hooks
497
608
  */
498
- export function useTableIds(storeOrStoreId?: StoreOrStoreId): Ids;
609
+ useTableIds: (
610
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
611
+ ) => TableIdFromSchema<Schemas[0]>[];
499
612
 
500
- /**
613
+ /**
501
614
  * The useTable hook returns an object containing the data of a single Table in
502
615
  * a Store, and registers a listener so that any changes to that result will
503
616
  * cause a re-render.
504
617
  *
618
+ * This has schema-based typing. The following is a simplified representation:
619
+ *
620
+ * ```ts override
621
+ * useTable(tableId: Id, storeOrStoreId?: StoreOrStoreId): Table;
622
+ * ```
623
+ *
505
624
  * A Provider component is used to wrap part of an application in a context, and
506
625
  * it can contain a default Store or a set of Store objects named by Id. The
507
626
  * useTable hook lets you indicate which Store to get data for: omit the final
@@ -575,13 +694,22 @@ export function useTableIds(storeOrStoreId?: StoreOrStoreId): Ids;
575
694
  * ```
576
695
  * @category Store hooks
577
696
  */
578
- export function useTable(tableId: Id, storeOrStoreId?: StoreOrStoreId): Table;
697
+ useTable: <TableId extends TableIdFromSchema<Schemas[0]>>(
698
+ tableId: TableId,
699
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
700
+ ) => Table<Schemas[0], TableId>;
579
701
 
580
- /**
702
+ /**
581
703
  * The useRowIds hook returns the Ids of every Row in a given Table, and
582
704
  * registers a listener so that any changes to that result will cause a
583
705
  * re-render.
584
706
  *
707
+ * This has schema-based typing. The following is a simplified representation:
708
+ *
709
+ * ```ts override
710
+ * useRowIds(tableId: Id, storeOrStoreId?: StoreOrStoreId): Ids;
711
+ * ```
712
+ *
585
713
  * A Provider component is used to wrap part of an application in a context, and
586
714
  * it can contain a default Store or a set of Store objects named by Id. The
587
715
  * useRowIds hook lets you indicate which Store to get data for: omit the
@@ -655,13 +783,29 @@ export function useTable(tableId: Id, storeOrStoreId?: StoreOrStoreId): Table;
655
783
  * ```
656
784
  * @category Store hooks
657
785
  */
658
- export function useRowIds(tableId: Id, storeOrStoreId?: StoreOrStoreId): Ids;
786
+ useRowIds: (
787
+ tableId: TableIdFromSchema<Schemas[0]>,
788
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
789
+ ) => Ids;
659
790
 
660
- /**
791
+ /**
661
792
  * The useSortedRowIds hook returns the sorted (and optionally, paginated) Ids
662
793
  * of every Row in a given Table, and registers a listener so that any changes
663
794
  * to that result will cause a re-render.
664
795
  *
796
+ * This has schema-based typing. The following is a simplified representation:
797
+ *
798
+ * ```ts override
799
+ * useSortedRowIds(
800
+ * tableId: Id,
801
+ * cellId?: Id,
802
+ * descending?: boolean,
803
+ * offset?: number,
804
+ * limit?: number,
805
+ * storeOrStoreId?: StoreOrStoreId,
806
+ * ): Ids;
807
+ * ```
808
+ *
665
809
  * A Provider component is used to wrap part of an application in a context, and
666
810
  * it can contain a default Store or a set of Store objects named by Id. The
667
811
  * useSortedRowIds hook lets you indicate which Store to get data for: omit the
@@ -766,20 +910,33 @@ export function useRowIds(tableId: Id, storeOrStoreId?: StoreOrStoreId): Ids;
766
910
  * @category Store hooks
767
911
  * @since v2.0.0
768
912
  */
769
- export function useSortedRowIds(
770
- tableId: Id,
771
- cellId?: Id,
772
- descending?: boolean,
773
- offset?: number,
774
- limit?: number,
775
- storeOrStoreId?: StoreOrStoreId,
776
- ): Ids;
913
+ useSortedRowIds: <
914
+ TableId extends TableIdFromSchema<Schemas[0]>,
915
+ CellId extends CellIdFromSchema<Schemas[0], TableId>,
916
+ >(
917
+ tableId: TableId,
918
+ cellId?: CellId,
919
+ descending?: boolean,
920
+ offset?: number,
921
+ limit?: number,
922
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
923
+ ) => Ids;
777
924
 
778
- /**
925
+ /**
779
926
  * The useRow hook returns an object containing the data of a single Row in a
780
927
  * given Table, and registers a listener so that any changes to that result will
781
928
  * cause a re-render.
782
929
  *
930
+ * This has schema-based typing. The following is a simplified representation:
931
+ *
932
+ * ```ts override
933
+ * useRow(
934
+ * tableId: Id,
935
+ * rowId: Id,
936
+ * storeOrStoreId?: StoreOrStoreId,
937
+ * ): Row;
938
+ * ```
939
+ *
783
940
  * A Provider component is used to wrap part of an application in a context, and
784
941
  * it can contain a default Store or a set of Store objects named by Id. The
785
942
  * useRow hook lets you indicate which Store to get data for: omit the final
@@ -856,17 +1013,27 @@ export function useSortedRowIds(
856
1013
  * ```
857
1014
  * @category Store hooks
858
1015
  */
859
- export function useRow(
860
- tableId: Id,
861
- rowId: Id,
862
- storeOrStoreId?: StoreOrStoreId,
863
- ): Row;
1016
+ useRow: <TableId extends TableIdFromSchema<Schemas[0]>>(
1017
+ tableId: TableId,
1018
+ rowId: Id,
1019
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
1020
+ ) => Row<Schemas[0], TableId>;
864
1021
 
865
- /**
1022
+ /**
866
1023
  * The useCellIds hook returns the Ids of every Cell in a given Row, in a given
867
1024
  * Table, and registers a listener so that any changes to that result will cause
868
1025
  * a re-render.
869
1026
  *
1027
+ * This has schema-based typing. The following is a simplified representation:
1028
+ *
1029
+ * ```ts override
1030
+ * useCellIds(
1031
+ * tableId: Id,
1032
+ * rowId: Id,
1033
+ * storeOrStoreId?: StoreOrStoreId,
1034
+ * ): Ids;
1035
+ * ```
1036
+ *
870
1037
  * A Provider component is used to wrap part of an application in a context, and
871
1038
  * it can contain a default Store or a set of Store objects named by Id. The
872
1039
  * useCellIds hook lets you indicate which Store to get data for: omit the
@@ -945,17 +1112,31 @@ export function useRow(
945
1112
  * ```
946
1113
  * @category Store hooks
947
1114
  */
948
- export function useCellIds(
949
- tableId: Id,
950
- rowId: Id,
951
- storeOrStoreId?: StoreOrStoreId,
952
- ): Ids;
1115
+ useCellIds: <
1116
+ TableId extends TableIdFromSchema<Schemas[0]>,
1117
+ Ids extends CellIdFromSchema<Schemas[0], TableId>[],
1118
+ >(
1119
+ tableId: TableId,
1120
+ rowId: Id,
1121
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
1122
+ ) => Ids;
953
1123
 
954
- /**
1124
+ /**
955
1125
  * The useCell hook returns an object containing the value of a single Cell in a
956
1126
  * given Row, in a given Table, and registers a listener so that any changes to
957
1127
  * that result will cause a re-render.
958
1128
  *
1129
+ * This has schema-based typing. The following is a simplified representation:
1130
+ *
1131
+ * ```ts override
1132
+ * useCell(
1133
+ * tableId: Id,
1134
+ * rowId: Id,
1135
+ * cellId: Id,
1136
+ * storeOrStoreId?: StoreOrStoreId,
1137
+ * ): CellOrUndefined;
1138
+ * ```
1139
+ *
959
1140
  * A Provider component is used to wrap part of an application in a context, and
960
1141
  * it can contain a default Store or a set of Store objects named by Id. The
961
1142
  * useCell hook lets you indicate which Store to get data for: omit the final
@@ -1031,18 +1212,27 @@ export function useCellIds(
1031
1212
  * ```
1032
1213
  * @category Store hooks
1033
1214
  */
1034
- export function useCell(
1035
- tableId: Id,
1036
- rowId: Id,
1037
- cellId: Id,
1038
- storeOrStoreId?: StoreOrStoreId,
1039
- ): Cell | undefined;
1215
+ useCell: <
1216
+ TableId extends TableIdFromSchema<Schemas[0]>,
1217
+ CellId extends CellIdFromSchema<Schemas[0], TableId>,
1218
+ >(
1219
+ tableId: TableId,
1220
+ rowId: Id,
1221
+ cellId: CellId,
1222
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
1223
+ ) => NoInfer<CellOrUndefined<Schemas[0], TableId, CellId>>;
1040
1224
 
1041
- /**
1225
+ /**
1042
1226
  * The useValues hook returns a Values object containing the keyed value data of
1043
1227
  * a Store, and registers a listener so that any changes to that result will
1044
1228
  * cause a re-render.
1045
1229
  *
1230
+ * This has schema-based typing. The following is a simplified representation:
1231
+ *
1232
+ * ```ts override
1233
+ * useValues(storeOrStoreId?: StoreOrStoreId): Values;
1234
+ * ```
1235
+ *
1046
1236
  * A Provider component is used to wrap part of an application in a context, and
1047
1237
  * it can contain a default Store or a set of Store objects named by Id. The
1048
1238
  * useValues hook lets you indicate which Store to get data for: omit the
@@ -1114,12 +1304,18 @@ export function useCell(
1114
1304
  * @category Store hooks
1115
1305
  * @since v3.0.0
1116
1306
  */
1117
- export function useValues(storeOrStoreId?: StoreOrStoreId): Values;
1307
+ useValues: (storeOrStoreId?: StoreOrStoreId<Schemas>) => Values<Schemas[1]>;
1118
1308
 
1119
- /**
1309
+ /**
1120
1310
  * The useValueIds hook returns the Ids of every Value in a Store, and registers
1121
1311
  * a listener so that any changes to that result will cause a re-render.
1122
1312
  *
1313
+ * This has schema-based typing. The following is a simplified representation:
1314
+ *
1315
+ * ```ts override
1316
+ * useValueIds(storeOrStoreId?: StoreOrStoreId): Ids;
1317
+ * ```
1318
+ *
1123
1319
  * A Provider component is used to wrap part of an application in a context, and
1124
1320
  * it can contain a default Store or a set of Store objects named by Id. The
1125
1321
  * useValueIds hook lets you indicate which Store to get data for: omit the
@@ -1191,13 +1387,24 @@ export function useValues(storeOrStoreId?: StoreOrStoreId): Values;
1191
1387
  * @category Store hooks
1192
1388
  * @since v3.0.0
1193
1389
  */
1194
- export function useValueIds(storeOrStoreId?: StoreOrStoreId): Ids;
1390
+ useValueIds: (
1391
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
1392
+ ) => ValueIdFromSchema<Schemas[1]>[];
1195
1393
 
1196
- /**
1394
+ /**
1197
1395
  * The useValue hook returns an object containing the data of a single Value in
1198
1396
  * a Store, and registers a listener so that any changes to that result will
1199
1397
  * cause a re-render.
1200
1398
  *
1399
+ * This has schema-based typing. The following is a simplified representation:
1400
+ *
1401
+ * ```ts override
1402
+ * useValue(
1403
+ * valueId: Id,
1404
+ * storeOrStoreId?: StoreOrStoreId,
1405
+ * ): ValueOrUndefined;
1406
+ * ```
1407
+ *
1201
1408
  * A Provider component is used to wrap part of an application in a context, and
1202
1409
  * it can contain a default Store or a set of Store objects named by Id. The
1203
1410
  * useValue hook lets you indicate which Store to get data for: omit the final
@@ -1272,12 +1479,27 @@ export function useValueIds(storeOrStoreId?: StoreOrStoreId): Ids;
1272
1479
  * @category Store hooks
1273
1480
  * @since v3.0.0
1274
1481
  */
1275
- export function useValue(valueId: Id, storeOrStoreId?: StoreOrStoreId): Value;
1482
+ useValue: <ValueId extends ValueIdFromSchema<Schemas[1]>>(
1483
+ valueId: ValueId,
1484
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
1485
+ ) => DefaultedValueFromSchema<Schemas[1], ValueId>;
1276
1486
 
1277
- /**
1487
+ /**
1278
1488
  * The useSetTablesCallback hook returns a parameterized callback that can be
1279
1489
  * used to set the tabular data of a Store.
1280
1490
  *
1491
+ * This has schema-based typing. The following is a simplified representation:
1492
+ *
1493
+ * ```ts override
1494
+ * useSetTablesCallback<Parameter>(
1495
+ * getTables: (parameter: Parameter, store: Store) => Tables,
1496
+ * getTablesDeps?: React.DependencyList,
1497
+ * storeOrStoreId?: StoreOrStoreId,
1498
+ * then?: (store: Store, tables: Tables) => void,
1499
+ * thenDeps?: React.DependencyList,
1500
+ * ): ParameterizedCallback<Parameter>;
1501
+ * ```
1502
+ *
1281
1503
  * This hook is useful, for example, when creating an event handler that will
1282
1504
  * mutate the data in the Store. In this case, the parameter will likely be the
1283
1505
  * event, so that you can use data from it as part of the mutation.
@@ -1349,18 +1571,34 @@ export function useValue(valueId: Id, storeOrStoreId?: StoreOrStoreId): Value;
1349
1571
  * ```
1350
1572
  * @category Store hooks
1351
1573
  */
1352
- export function useSetTablesCallback<Parameter>(
1353
- getTables: (parameter: Parameter, store: Store) => Tables,
1354
- getTablesDeps?: React.DependencyList,
1355
- storeOrStoreId?: StoreOrStoreId,
1356
- then?: (store: Store, tables: Tables) => void,
1357
- thenDeps?: React.DependencyList,
1358
- ): ParameterizedCallback<Parameter>;
1574
+ useSetTablesCallback: <Parameter, SetTables = Tables<Schemas[0], true>>(
1575
+ getTables: (
1576
+ parameter: Parameter,
1577
+ store: Store<Schemas>,
1578
+ ) => NoInfer<SetTables>,
1579
+ getTablesDeps?: React.DependencyList,
1580
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
1581
+ then?: (store: Store<Schemas>, tables: SetTables) => void,
1582
+ thenDeps?: React.DependencyList,
1583
+ ) => ParameterizedCallback<Parameter>;
1359
1584
 
1360
- /**
1585
+ /**
1361
1586
  * The useSetTableCallback hook returns a parameterized callback that can be
1362
1587
  * used to set the data of a single Table in a Store.
1363
1588
  *
1589
+ * This has schema-based typing. The following is a simplified representation:
1590
+ *
1591
+ * ```ts override
1592
+ * useSetTableCallback<Parameter>(
1593
+ * tableId: Id,
1594
+ * getTable: (parameter: Parameter, store: Store) => Table,
1595
+ * getTableDeps?: React.DependencyList,
1596
+ * storeOrStoreId?: StoreOrStoreId,
1597
+ * then?: (store: Store, table: Table) => void,
1598
+ * thenDeps?: React.DependencyList,
1599
+ * ): ParameterizedCallback<Parameter>;
1600
+ * ```
1601
+ *
1364
1602
  * This hook is useful, for example, when creating an event handler that will
1365
1603
  * mutate the data in the Store. In this case, the parameter will likely be the
1366
1604
  * event, so that you can use data from it as part of the mutation.
@@ -1434,19 +1672,40 @@ export function useSetTablesCallback<Parameter>(
1434
1672
  * ```
1435
1673
  * @category Store hooks
1436
1674
  */
1437
- export function useSetTableCallback<Parameter>(
1438
- tableId: Id,
1439
- getTable: (parameter: Parameter, store: Store) => Table,
1440
- getTableDeps?: React.DependencyList,
1441
- storeOrStoreId?: StoreOrStoreId,
1442
- then?: (store: Store, table: Table) => void,
1443
- thenDeps?: React.DependencyList,
1444
- ): ParameterizedCallback<Parameter>;
1675
+ useSetTableCallback: <
1676
+ Parameter,
1677
+ TableId extends TableIdFromSchema<Schemas[0]>,
1678
+ SetTable = Table<Schemas[0], TableId, true>,
1679
+ >(
1680
+ tableId: TableId,
1681
+ getTable: (
1682
+ parameter: Parameter,
1683
+ store: Store<Schemas>,
1684
+ ) => NoInfer<SetTable>,
1685
+ getTableDeps?: React.DependencyList,
1686
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
1687
+ then?: (store: Store<Schemas>, table: SetTable) => void,
1688
+ thenDeps?: React.DependencyList,
1689
+ ) => ParameterizedCallback<Parameter>;
1445
1690
 
1446
- /**
1691
+ /**
1447
1692
  * The useSetRowCallback hook returns a parameterized callback that can be used
1448
1693
  * to set the data of a single Row in a Store.
1449
1694
  *
1695
+ * This has schema-based typing. The following is a simplified representation:
1696
+ *
1697
+ * ```ts override
1698
+ * useSetRowCallback<Parameter>(
1699
+ * tableId: Id,
1700
+ * rowId: Id,
1701
+ * getRow: (parameter: Parameter, store: Store) => Row,
1702
+ * getRowDeps?: React.DependencyList,
1703
+ * storeOrStoreId?: StoreOrStoreId,
1704
+ * then?: (store: Store, row: Row) => void,
1705
+ * thenDeps?: React.DependencyList,
1706
+ * ): ParameterizedCallback<Parameter>;
1707
+ * ```
1708
+ *
1450
1709
  * This hook is useful, for example, when creating an event handler that will
1451
1710
  * mutate the data in the Store. In this case, the parameter will likely be the
1452
1711
  * event, so that you can use data from it as part of the mutation.
@@ -1522,20 +1781,37 @@ export function useSetTableCallback<Parameter>(
1522
1781
  * ```
1523
1782
  * @category Store hooks
1524
1783
  */
1525
- export function useSetRowCallback<Parameter>(
1526
- tableId: Id,
1527
- rowId: Id,
1528
- getRow: (parameter: Parameter, store: Store) => Row,
1529
- getRowDeps?: React.DependencyList,
1530
- storeOrStoreId?: StoreOrStoreId,
1531
- then?: (store: Store, row: Row) => void,
1532
- thenDeps?: React.DependencyList,
1533
- ): ParameterizedCallback<Parameter>;
1784
+ useSetRowCallback: <
1785
+ Parameter,
1786
+ TableId extends TableIdFromSchema<Schemas[0]>,
1787
+ SetRow = Row<Schemas[0], TableId, true>,
1788
+ >(
1789
+ tableId: TableId,
1790
+ rowId: Id,
1791
+ getRow: (parameter: Parameter, store: Store<Schemas>) => NoInfer<SetRow>,
1792
+ getRowDeps?: React.DependencyList,
1793
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
1794
+ then?: (store: Store<Schemas>, row: SetRow) => void,
1795
+ thenDeps?: React.DependencyList,
1796
+ ) => ParameterizedCallback<Parameter>;
1534
1797
 
1535
- /**
1798
+ /**
1536
1799
  * The useAddRowCallback hook returns a parameterized callback that can be used
1537
1800
  * to create a new Row in a Store.
1538
1801
  *
1802
+ * This has schema-based typing. The following is a simplified representation:
1803
+ *
1804
+ * ```ts override
1805
+ * useAddRowCallback<Parameter>(
1806
+ * tableId: Id,
1807
+ * getRow: (parameter: Parameter, store: Store) => Row,
1808
+ * getRowDeps?: React.DependencyList,
1809
+ * storeOrStoreId?: StoreOrStoreId,
1810
+ * then?: (rowId: Id | undefined, store: Store, row: Row) => void,
1811
+ * thenDeps?: React.DependencyList,
1812
+ * ): ParameterizedCallback<Parameter>;
1813
+ * ```
1814
+ *
1539
1815
  * This hook is useful, for example, when creating an event handler that will
1540
1816
  * mutate the data in the Store. In this case, the parameter will likely be the
1541
1817
  * event, so that you can use data from it as part of the mutation.
@@ -1609,20 +1885,38 @@ export function useSetRowCallback<Parameter>(
1609
1885
  * ```
1610
1886
  * @category Store hooks
1611
1887
  */
1612
- export function useAddRowCallback<Parameter>(
1613
- tableId: Id,
1614
- getRow: (parameter: Parameter, store: Store) => Row,
1615
- getRowDeps?: React.DependencyList,
1616
- storeOrStoreId?: StoreOrStoreId,
1617
- then?: (rowId: Id | undefined, store: Store, row: Row) => void,
1618
- thenDeps?: React.DependencyList,
1619
- ): ParameterizedCallback<Parameter>;
1888
+ useAddRowCallback: <
1889
+ Parameter,
1890
+ TableId extends TableIdFromSchema<Schemas[0]>,
1891
+ AddRow = Row<Schemas[0], TableId, true>,
1892
+ >(
1893
+ tableId: TableId,
1894
+ getRow: (parameter: Parameter, store: Store<Schemas>) => NoInfer<AddRow>,
1895
+ getRowDeps?: React.DependencyList,
1896
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
1897
+ then?: (rowId: Id | undefined, store: Store<Schemas>, row: AddRow) => void,
1898
+ thenDeps?: React.DependencyList,
1899
+ ) => ParameterizedCallback<Parameter>;
1620
1900
 
1621
- /**
1901
+ /**
1622
1902
  * The useSetPartialRowCallback hook returns a parameterized callback that can
1623
1903
  * be used to set partial data of a single Row in the Store, leaving other Cell
1624
1904
  * values unaffected.
1625
1905
  *
1906
+ * This has schema-based typing. The following is a simplified representation:
1907
+ *
1908
+ * ```ts override
1909
+ * useSetPartialRowCallback<Parameter>(
1910
+ * tableId: Id,
1911
+ * rowId: Id,
1912
+ * getPartialRow: (parameter: Parameter, store: Store) => Row,
1913
+ * getPartialRowDeps?: React.DependencyList,
1914
+ * storeOrStoreId?: StoreOrStoreId,
1915
+ * then?: (store: Store, partialRow: Row) => void,
1916
+ * thenDeps?: React.DependencyList,
1917
+ * ): ParameterizedCallback<Parameter>;
1918
+ * ```
1919
+ *
1626
1920
  * This hook is useful, for example, when creating an event handler that will
1627
1921
  * mutate the data in Store. In this case, the parameter will likely be the
1628
1922
  * event, so that you can use data from it as part of the mutation.
@@ -1699,20 +1993,42 @@ export function useAddRowCallback<Parameter>(
1699
1993
  * ```
1700
1994
  * @category Store hooks
1701
1995
  */
1702
- export function useSetPartialRowCallback<Parameter>(
1703
- tableId: Id,
1704
- rowId: Id,
1705
- getPartialRow: (parameter: Parameter, store: Store) => Row,
1706
- getPartialRowDeps?: React.DependencyList,
1707
- storeOrStoreId?: StoreOrStoreId,
1708
- then?: (store: Store, partialRow: Row) => void,
1709
- thenDeps?: React.DependencyList,
1710
- ): ParameterizedCallback<Parameter>;
1996
+ useSetPartialRowCallback: <
1997
+ Parameter,
1998
+ TableId extends TableIdFromSchema<Schemas[0]>,
1999
+ SetPartialRow = Row<Schemas[0], TableId, true>,
2000
+ >(
2001
+ tableId: TableId,
2002
+ rowId: Id,
2003
+ getPartialRow: (
2004
+ parameter: Parameter,
2005
+ store: Store<Schemas>,
2006
+ ) => NoInfer<SetPartialRow>,
2007
+ getPartialRowDeps?: React.DependencyList,
2008
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
2009
+ then?: (store: Store<Schemas>, partialRow: SetPartialRow) => void,
2010
+ thenDeps?: React.DependencyList,
2011
+ ) => ParameterizedCallback<Parameter>;
1711
2012
 
1712
- /**
2013
+ /**
1713
2014
  * The useSetCellCallback hook returns a parameterized callback that can be used
1714
2015
  * to set the value of a single Cell in a Store.
1715
2016
  *
2017
+ * This has schema-based typing. The following is a simplified representation:
2018
+ *
2019
+ * ```ts override
2020
+ * useSetCellCallback<Parameter>(
2021
+ * tableId: Id,
2022
+ * rowId: Id,
2023
+ * cellId: Id,
2024
+ * getCell: (parameter: Parameter, store: Store) => Cell | MapCell,
2025
+ * getCellDeps?: React.DependencyList,
2026
+ * storeOrStoreId?: StoreOrStoreId,
2027
+ * then?: (store: Store, cell: Cell | MapCell) => void,
2028
+ * thenDeps?: React.DependencyList,
2029
+ * ): ParameterizedCallback<Parameter>;
2030
+ * ```
2031
+ *
1716
2032
  * This hook is useful, for example, when creating an event handler that will
1717
2033
  * mutate the data in the Store. In this case, the parameter will likely be the
1718
2034
  * event, so that you can use data from it as part of the mutation.
@@ -1827,21 +2143,43 @@ export function useSetPartialRowCallback<Parameter>(
1827
2143
  * ```
1828
2144
  * @category Store hooks
1829
2145
  */
1830
- export function useSetCellCallback<Parameter>(
1831
- tableId: Id,
1832
- rowId: Id,
1833
- cellId: Id,
1834
- getCell: (parameter: Parameter, store: Store) => Cell | MapCell,
1835
- getCellDeps?: React.DependencyList,
1836
- storeOrStoreId?: StoreOrStoreId,
1837
- then?: (store: Store, cell: Cell | MapCell) => void,
1838
- thenDeps?: React.DependencyList,
1839
- ): ParameterizedCallback<Parameter>;
2146
+ useSetCellCallback: <
2147
+ Parameter,
2148
+ TableId extends TableIdFromSchema<Schemas[0]>,
2149
+ CellId extends CellIdFromSchema<Schemas[0], TableId>,
2150
+ SetOrMapCell =
2151
+ | Cell<Schemas[0], TableId, CellId>
2152
+ | MapCell<Schemas[0], TableId, CellId>,
2153
+ >(
2154
+ tableId: TableId,
2155
+ rowId: Id,
2156
+ cellId: CellId,
2157
+ getCell: (
2158
+ parameter: Parameter,
2159
+ store: Store<Schemas>,
2160
+ ) => NoInfer<SetOrMapCell>,
2161
+ getCellDeps?: React.DependencyList,
2162
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
2163
+ then?: (store: Store<Schemas>, cell: SetOrMapCell) => void,
2164
+ thenDeps?: React.DependencyList,
2165
+ ) => ParameterizedCallback<Parameter>;
1840
2166
 
1841
- /**
2167
+ /**
1842
2168
  * The useSetValuesCallback hook returns a parameterized callback that can be
1843
2169
  * used to set the keyed value data of a Store.
1844
2170
  *
2171
+ * This has schema-based typing. The following is a simplified representation:
2172
+ *
2173
+ * ```ts override
2174
+ * useSetValuesCallback<Parameter>(
2175
+ * getValues: (parameter: Parameter, store: Store) => Values,
2176
+ * getValuesDeps?: React.DependencyList,
2177
+ * storeOrStoreId?: StoreOrStoreId,
2178
+ * then?: (store: Store, values: Values) => void,
2179
+ * thenDeps?: React.DependencyList,
2180
+ * ): ParameterizedCallback<Parameter>;
2181
+ * ```
2182
+ *
1845
2183
  * This hook is useful, for example, when creating an event handler that will
1846
2184
  * mutate the data in the Store. In this case, the parameter will likely be the
1847
2185
  * event, so that you can use data from it as part of the mutation.
@@ -1914,19 +2252,34 @@ export function useSetCellCallback<Parameter>(
1914
2252
  * @category Store hooks
1915
2253
  * @since v3.0.0
1916
2254
  */
1917
- export function useSetValuesCallback<Parameter>(
1918
- getValues: (parameter: Parameter, store: Store) => Values,
1919
- getValuesDeps?: React.DependencyList,
1920
- storeOrStoreId?: StoreOrStoreId,
1921
- then?: (store: Store, values: Values) => void,
1922
- thenDeps?: React.DependencyList,
1923
- ): ParameterizedCallback<Parameter>;
2255
+ useSetValuesCallback: <Parameter, SetValues = Values<Schemas[1], true>>(
2256
+ getValues: (
2257
+ parameter: Parameter,
2258
+ store: Store<Schemas>,
2259
+ ) => NoInfer<SetValues>,
2260
+ getValuesDeps?: React.DependencyList,
2261
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
2262
+ then?: (store: Store<Schemas>, values: SetValues) => void,
2263
+ thenDeps?: React.DependencyList,
2264
+ ) => ParameterizedCallback<Parameter>;
1924
2265
 
1925
- /**
2266
+ /**
1926
2267
  * The useSetPartialValuesCallback hook returns a parameterized callback that
1927
2268
  * can be used to set partial Values data in the Store, leaving other Values
1928
2269
  * unaffected.
1929
2270
  *
2271
+ * This has schema-based typing. The following is a simplified representation:
2272
+ *
2273
+ * ```ts override
2274
+ * useSetPartialValuesCallback<Parameter>(
2275
+ * getPartialValues: (parameter: Parameter, store: Store) => Values,
2276
+ * getPartialValuesDeps?: React.DependencyList,
2277
+ * storeOrStoreId?: StoreOrStoreId,
2278
+ * then?: (store: Store, partialValues: Values) => void,
2279
+ * thenDeps?: React.DependencyList,
2280
+ * ): ParameterizedCallback<Parameter>;
2281
+ * ```
2282
+ *
1930
2283
  * This hook is useful, for example, when creating an event handler that will
1931
2284
  * mutate the data in the Store. In this case, the parameter will likely be the
1932
2285
  * event, so that you can use data from it as part of the mutation.
@@ -2000,18 +2353,37 @@ export function useSetValuesCallback<Parameter>(
2000
2353
  * @category Store hooks
2001
2354
  * @since v3.0.0
2002
2355
  */
2003
- export function useSetPartialValuesCallback<Parameter>(
2004
- getPartialValues: (parameter: Parameter, store: Store) => Values,
2005
- getPartialValuesDeps?: React.DependencyList,
2006
- storeOrStoreId?: StoreOrStoreId,
2007
- then?: (store: Store, partialValues: Values) => void,
2008
- thenDeps?: React.DependencyList,
2009
- ): ParameterizedCallback<Parameter>;
2356
+ useSetPartialValuesCallback: <
2357
+ Parameter,
2358
+ SetPartialValues = Values<Schemas[1], true>,
2359
+ >(
2360
+ getPartialValues: (
2361
+ parameter: Parameter,
2362
+ store: Store<Schemas>,
2363
+ ) => NoInfer<SetPartialValues>,
2364
+ getPartialValuesDeps?: React.DependencyList,
2365
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
2366
+ then?: (store: Store<Schemas>, partialValues: SetPartialValues) => void,
2367
+ thenDeps?: React.DependencyList,
2368
+ ) => ParameterizedCallback<Parameter>;
2010
2369
 
2011
- /**
2370
+ /**
2012
2371
  * The useSetValueCallback hook returns a parameterized callback that can be
2013
2372
  * used to set the data of a single Value in a Store.
2014
2373
  *
2374
+ * This has schema-based typing. The following is a simplified representation:
2375
+ *
2376
+ * ```ts override
2377
+ * useSetValueCallback<Parameter>(
2378
+ * valueId: Id,
2379
+ * getValue: (parameter: Parameter, store: Store) => Value | MapValue,
2380
+ * getValueDeps?: React.DependencyList,
2381
+ * storeOrStoreId?: StoreOrStoreId,
2382
+ * then?: (store: Store, value: Value | MapValue) => void,
2383
+ * thenDeps?: React.DependencyList,
2384
+ * ): ParameterizedCallback<Parameter>;
2385
+ * ```
2386
+ *
2015
2387
  * This hook is useful, for example, when creating an event handler that will
2016
2388
  * mutate the data in the Store. In this case, the parameter will likely be the
2017
2389
  * event, so that you can use data from it as part of the mutation.
@@ -2086,19 +2458,36 @@ export function useSetPartialValuesCallback<Parameter>(
2086
2458
  * @category Store hooks
2087
2459
  * @since v3.0.0
2088
2460
  */
2089
- export function useSetValueCallback<Parameter>(
2090
- valueId: Id,
2091
- getValue: (parameter: Parameter, store: Store) => Value,
2092
- getValueDeps?: React.DependencyList,
2093
- storeOrStoreId?: StoreOrStoreId,
2094
- then?: (store: Store, value: Value) => void,
2095
- thenDeps?: React.DependencyList,
2096
- ): ParameterizedCallback<Parameter>;
2461
+ useSetValueCallback: <
2462
+ Parameter,
2463
+ ValueId extends ValueIdFromSchema<Schemas[1]>,
2464
+ SetOrMapValue = Value<Schemas[1], ValueId> | MapValue<Schemas[1], ValueId>,
2465
+ >(
2466
+ valueId: ValueId,
2467
+ getValue: (
2468
+ parameter: Parameter,
2469
+ store: Store<Schemas>,
2470
+ ) => NoInfer<SetOrMapValue>,
2471
+ getValueDeps?: React.DependencyList,
2472
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
2473
+ then?: (store: Store<Schemas>, value: SetOrMapValue) => void,
2474
+ thenDeps?: React.DependencyList,
2475
+ ) => ParameterizedCallback<Parameter>;
2097
2476
 
2098
- /**
2477
+ /**
2099
2478
  * The useDelTablesCallback hook returns a callback that can be used to remove
2100
2479
  * all of the tabular data in a Store.
2101
2480
  *
2481
+ * This has schema-based typing. The following is a simplified representation:
2482
+ *
2483
+ * ```ts override
2484
+ * useDelTablesCallback(
2485
+ * storeOrStoreId?: StoreOrStoreId,
2486
+ * then?: (store: Store) => void,
2487
+ * thenDeps?: React.DependencyList,
2488
+ * ): Callback;
2489
+ * ```
2490
+ *
2102
2491
  * This hook is useful, for example, when creating an event handler that will
2103
2492
  * delete data in a Store.
2104
2493
  *
@@ -2152,16 +2541,27 @@ export function useSetValueCallback<Parameter>(
2152
2541
  * ```
2153
2542
  * @category Store hooks
2154
2543
  */
2155
- export function useDelTablesCallback(
2156
- storeOrStoreId?: StoreOrStoreId,
2157
- then?: (store: Store) => void,
2158
- thenDeps?: React.DependencyList,
2159
- ): Callback;
2544
+ useDelTablesCallback: (
2545
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
2546
+ then?: (store: Store<Schemas>) => void,
2547
+ thenDeps?: React.DependencyList,
2548
+ ) => Callback;
2160
2549
 
2161
- /**
2550
+ /**
2162
2551
  * The useDelTableCallback hook returns a callback that can be used to remove a
2163
2552
  * single Table from a Store.
2164
2553
  *
2554
+ * This has schema-based typing. The following is a simplified representation:
2555
+ *
2556
+ * ```ts override
2557
+ * useDelTableCallback(
2558
+ * tableId: Id,
2559
+ * storeOrStoreId?: StoreOrStoreId,
2560
+ * then?: (store: Store) => void,
2561
+ * thenDeps?: React.DependencyList,
2562
+ * ): Callback;
2563
+ * ```
2564
+ *
2165
2565
  * This hook is useful, for example, when creating an event handler that will
2166
2566
  * delete data in a Store.
2167
2567
  *
@@ -2216,17 +2616,29 @@ export function useDelTablesCallback(
2216
2616
  * ```
2217
2617
  * @category Store hooks
2218
2618
  */
2219
- export function useDelTableCallback(
2220
- tableId: Id,
2221
- storeOrStoreId?: StoreOrStoreId,
2222
- then?: (store: Store) => void,
2223
- thenDeps?: React.DependencyList,
2224
- ): Callback;
2619
+ useDelTableCallback: <TableId extends TableIdFromSchema<Schemas[0]>>(
2620
+ tableId: TableId,
2621
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
2622
+ then?: (store: Store<Schemas>) => void,
2623
+ thenDeps?: React.DependencyList,
2624
+ ) => Callback;
2225
2625
 
2226
- /**
2626
+ /**
2227
2627
  * The useDelRowCallback hook returns a callback that can be used to remove a
2228
2628
  * single Row from a Table.
2229
2629
  *
2630
+ * This has schema-based typing. The following is a simplified representation:
2631
+ *
2632
+ * ```ts override
2633
+ * useDelRowCallback(
2634
+ * tableId: Id,
2635
+ * rowId: Id,
2636
+ * storeOrStoreId?: StoreOrStoreId,
2637
+ * then?: (store: Store) => void,
2638
+ * thenDeps?: React.DependencyList,
2639
+ * ): Callback;
2640
+ * ```
2641
+ *
2230
2642
  * This hook is useful, for example, when creating an event handler that will
2231
2643
  * delete data in a Store.
2232
2644
  *
@@ -2282,18 +2694,32 @@ export function useDelTableCallback(
2282
2694
  * ```
2283
2695
  * @category Store hooks
2284
2696
  */
2285
- export function useDelRowCallback(
2286
- tableId: Id,
2287
- rowId: Id,
2288
- storeOrStoreId?: StoreOrStoreId,
2289
- then?: (store: Store) => void,
2290
- thenDeps?: React.DependencyList,
2291
- ): Callback;
2697
+ useDelRowCallback: <TableId extends TableIdFromSchema<Schemas[0]>>(
2698
+ tableId: TableId,
2699
+ rowId: Id,
2700
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
2701
+ then?: (store: Store<Schemas>) => void,
2702
+ thenDeps?: React.DependencyList,
2703
+ ) => Callback;
2292
2704
 
2293
- /**
2705
+ /**
2294
2706
  * The useDelCellCallback hook returns a callback that can be used to remove a
2295
2707
  * single Cell from a Row.
2296
2708
  *
2709
+ * This has schema-based typing. The following is a simplified representation:
2710
+ *
2711
+ * ```ts override
2712
+ * useDelCellCallback(
2713
+ * tableId: Id,
2714
+ * rowId: Id,
2715
+ * cellId: Id,
2716
+ * forceDel?: boolean,
2717
+ * storeOrStoreId?: StoreOrStoreId,
2718
+ * then?: (store: Store) => void,
2719
+ * thenDeps?: React.DependencyList,
2720
+ * ): Callback;
2721
+ * ```
2722
+ *
2297
2723
  * This hook is useful, for example, when creating an event handler that will
2298
2724
  * delete data in a Store.
2299
2725
  *
@@ -2358,20 +2784,33 @@ export function useDelRowCallback(
2358
2784
  * ```
2359
2785
  * @category Store hooks
2360
2786
  */
2361
- export function useDelCellCallback(
2362
- tableId: Id,
2363
- rowId: Id,
2364
- cellId: Id,
2365
- forceDel?: boolean,
2366
- storeOrStoreId?: StoreOrStoreId,
2367
- then?: (store: Store) => void,
2368
- thenDeps?: React.DependencyList,
2369
- ): Callback;
2787
+ useDelCellCallback: <
2788
+ TableId extends TableIdFromSchema<Schemas[0]>,
2789
+ CellId extends CellIdFromSchema<Schemas[0], TableId>,
2790
+ >(
2791
+ tableId: TableId,
2792
+ rowId: Id,
2793
+ cellId: CellId,
2794
+ forceDel?: boolean,
2795
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
2796
+ then?: (store: Store<Schemas>) => void,
2797
+ thenDeps?: React.DependencyList,
2798
+ ) => Callback;
2370
2799
 
2371
- /**
2800
+ /**
2372
2801
  * The useDelValuesCallback hook returns a callback that can be used to remove
2373
2802
  * all of the keyed value data in a Store.
2374
2803
  *
2804
+ * This has schema-based typing. The following is a simplified representation:
2805
+ *
2806
+ * ```ts override
2807
+ * useDelValuesCallback(
2808
+ * storeOrStoreId?: StoreOrStoreId,
2809
+ * then?: (store: Store) => void,
2810
+ * thenDeps?: React.DependencyList,
2811
+ * ): Callback;
2812
+ * ```
2813
+ *
2375
2814
  * This hook is useful, for example, when creating an event handler that will
2376
2815
  * delete data in a Store.
2377
2816
  *
@@ -2426,16 +2865,27 @@ export function useDelCellCallback(
2426
2865
  * @category Store hooks
2427
2866
  * @since v3.0.0
2428
2867
  */
2429
- export function useDelValuesCallback(
2430
- storeOrStoreId?: StoreOrStoreId,
2431
- then?: (store: Store) => void,
2432
- thenDeps?: React.DependencyList,
2433
- ): Callback;
2868
+ useDelValuesCallback: (
2869
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
2870
+ then?: (store: Store<Schemas>) => void,
2871
+ thenDeps?: React.DependencyList,
2872
+ ) => Callback;
2434
2873
 
2435
- /**
2874
+ /**
2436
2875
  * The useDelValueCallback hook returns a callback that can be used to remove a
2437
2876
  * single Value from a Store.
2438
2877
  *
2878
+ * This has schema-based typing. The following is a simplified representation:
2879
+ *
2880
+ * ```ts override
2881
+ * useDelValueCallback(
2882
+ * valueId: Id,
2883
+ * storeOrStoreId?: StoreOrStoreId,
2884
+ * then?: (store: Store) => void,
2885
+ * thenDeps?: React.DependencyList,
2886
+ * ): Callback;
2887
+ * ```
2888
+ *
2439
2889
  * This hook is useful, for example, when creating an event handler that will
2440
2890
  * delete data in a Store.
2441
2891
  *
@@ -2491,17 +2941,28 @@ export function useDelValuesCallback(
2491
2941
  * @category Store hooks
2492
2942
  * @since v3.0.0
2493
2943
  */
2494
- export function useDelValueCallback(
2495
- valueId: Id,
2496
- storeOrStoreId?: StoreOrStoreId,
2497
- then?: (store: Store) => void,
2498
- thenDeps?: React.DependencyList,
2499
- ): Callback;
2944
+ useDelValueCallback: <ValueId extends ValueIdFromSchema<Schemas[1]>>(
2945
+ valueId: ValueId,
2946
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
2947
+ then?: (store: Store<Schemas>) => void,
2948
+ thenDeps?: React.DependencyList,
2949
+ ) => Callback;
2500
2950
 
2501
- /**
2951
+ /**
2502
2952
  * The useTablesListener hook registers a listener function with a Store that
2503
2953
  * will be called whenever tabular data in it changes.
2504
2954
  *
2955
+ * This has schema-based typing. The following is a simplified representation:
2956
+ *
2957
+ * ```ts override
2958
+ * useTablesListener(
2959
+ * listener: TablesListener,
2960
+ * listenerDeps?: React.DependencyList,
2961
+ * mutator?: boolean,
2962
+ * storeOrStoreId?: StoreOrStoreId,
2963
+ * ): void;
2964
+ * ```
2965
+ *
2505
2966
  * This hook is useful for situations where a component needs to register its
2506
2967
  * own specific listener to do more than simply tracking the value (which is
2507
2968
  * more easily done with the useTables hook).
@@ -2553,17 +3014,28 @@ export function useDelValueCallback(
2553
3014
  * ```
2554
3015
  * @category Store hooks
2555
3016
  */
2556
- export function useTablesListener(
2557
- listener: TablesListener,
2558
- listenerDeps?: React.DependencyList,
2559
- mutator?: boolean,
2560
- storeOrStoreId?: StoreOrStoreId,
2561
- ): void;
3017
+ useTablesListener: (
3018
+ listener: TablesListener<Schemas>,
3019
+ listenerDeps?: React.DependencyList,
3020
+ mutator?: boolean,
3021
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
3022
+ ) => void;
2562
3023
 
2563
- /**
3024
+ /**
2564
3025
  * The useTableIdsListener hook registers a listener function with a Store that
2565
3026
  * will be called whenever the Table Ids in it change.
2566
3027
  *
3028
+ * This has schema-based typing. The following is a simplified representation:
3029
+ *
3030
+ * ```ts override
3031
+ * useTableIdsListener(
3032
+ * listener: TableIdsListener,
3033
+ * listenerDeps?: React.DependencyList,
3034
+ * mutator?: boolean,
3035
+ * storeOrStoreId?: StoreOrStoreId,
3036
+ * ): void;
3037
+ * ```
3038
+ *
2567
3039
  * This hook is useful for situations where a component needs to register its
2568
3040
  * own specific listener to do more than simply tracking the value (which is
2569
3041
  * more easily done with the useTableIds hook).
@@ -2616,17 +3088,29 @@ export function useTablesListener(
2616
3088
  * ```
2617
3089
  * @category Store hooks
2618
3090
  */
2619
- export function useTableIdsListener(
2620
- listener: TableIdsListener,
2621
- listenerDeps?: React.DependencyList,
2622
- mutator?: boolean,
2623
- storeOrStoreId?: StoreOrStoreId,
2624
- ): void;
3091
+ useTableIdsListener: (
3092
+ listener: TableIdsListener<Schemas>,
3093
+ listenerDeps?: React.DependencyList,
3094
+ mutator?: boolean,
3095
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
3096
+ ) => void;
2625
3097
 
2626
- /**
3098
+ /**
2627
3099
  * The useTableListener hook registers a listener function with a Store that
2628
3100
  * will be called whenever data in a Table changes.
2629
3101
  *
3102
+ * This has schema-based typing. The following is a simplified representation:
3103
+ *
3104
+ * ```ts override
3105
+ * useTableListener(
3106
+ * tableId: IdOrNull,
3107
+ * listener: TableListener,
3108
+ * listenerDeps?: React.DependencyList,
3109
+ * mutator?: boolean,
3110
+ * storeOrStoreId?: StoreOrStoreId,
3111
+ * ): void;
3112
+ * ```
3113
+ *
2630
3114
  * This hook is useful for situations where a component needs to register its
2631
3115
  * own specific listener to do more than simply tracking the value (which is
2632
3116
  * more easily done with the useTable hook).
@@ -2682,18 +3166,32 @@ export function useTableIdsListener(
2682
3166
  * ```
2683
3167
  * @category Store hooks
2684
3168
  */
2685
- export function useTableListener(
2686
- tableId: IdOrNull,
2687
- listener: TableListener,
2688
- listenerDeps?: React.DependencyList,
2689
- mutator?: boolean,
2690
- storeOrStoreId?: StoreOrStoreId,
2691
- ): void;
3169
+ useTableListener: <
3170
+ TableIdOrNull extends TableIdFromSchema<Schemas[0]> | null,
3171
+ >(
3172
+ tableId: TableIdOrNull,
3173
+ listener: TableListener<Schemas, TableIdOrNull>,
3174
+ listenerDeps?: React.DependencyList,
3175
+ mutator?: boolean,
3176
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
3177
+ ) => void;
2692
3178
 
2693
- /**
3179
+ /**
2694
3180
  * The useRowIdsListener hook registers a listener function with a Store that
2695
3181
  * will be called whenever the Row Ids in a Table change.
2696
3182
  *
3183
+ * This has schema-based typing. The following is a simplified representation:
3184
+ *
3185
+ * ```ts override
3186
+ * useRowIdsListener(
3187
+ * tableId: IdOrNull,
3188
+ * listener: RowIdsListener,
3189
+ * listenerDeps?: React.DependencyList,
3190
+ * mutator?: boolean,
3191
+ * storeOrStoreId?: StoreOrStoreId,
3192
+ * ): void;
3193
+ * ```
3194
+ *
2697
3195
  * This hook is useful for situations where a component needs to register its
2698
3196
  * own specific listener to do more than simply tracking the value (which is
2699
3197
  * more easily done with the useRowIds hook).
@@ -2749,19 +3247,37 @@ export function useTableListener(
2749
3247
  * ```
2750
3248
  * @category Store hooks
2751
3249
  */
2752
- export function useRowIdsListener(
2753
- tableId: IdOrNull,
2754
- listener: RowIdsListener,
2755
- listenerDeps?: React.DependencyList,
2756
- mutator?: boolean,
2757
- storeOrStoreId?: StoreOrStoreId,
2758
- ): void;
3250
+ useRowIdsListener: <
3251
+ TableIdOrNull extends TableIdFromSchema<Schemas[0]> | null,
3252
+ >(
3253
+ tableId: TableIdOrNull,
3254
+ listener: RowIdsListener<Schemas, TableIdOrNull>,
3255
+ listenerDeps?: React.DependencyList,
3256
+ mutator?: boolean,
3257
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
3258
+ ) => void;
2759
3259
 
2760
- /**
3260
+ /**
2761
3261
  * The useSortedRowIdsListener hook registers a listener function with a Store
2762
3262
  * that will be called whenever sorted (and optionally, paginated) Row Ids in a
2763
3263
  * Table change.
2764
3264
  *
3265
+ * This has schema-based typing. The following is a simplified representation:
3266
+ *
3267
+ * ```ts override
3268
+ * useSortedRowIdsListener(
3269
+ * tableId: Id,
3270
+ * cellId: Id | undefined,
3271
+ * descending: boolean,
3272
+ * offset: number,
3273
+ * limit: number | undefined,
3274
+ * listener: SortedRowIdsListener,
3275
+ * listenerDeps?: React.DependencyList,
3276
+ * mutator?: boolean,
3277
+ * storeOrStoreId?: StoreOrStoreId,
3278
+ * ): void;
3279
+ * ```
3280
+ *
2765
3281
  * This hook is useful for situations where a component needs to register its
2766
3282
  * own specific listener to do more than simply tracking the value (which is
2767
3283
  * more easily done with the useSortedRowIds hook).
@@ -2828,22 +3344,48 @@ export function useRowIdsListener(
2828
3344
  * @category Store hooks
2829
3345
  * @since v2.0.0
2830
3346
  */
2831
- export function useSortedRowIdsListener(
2832
- tableId: Id,
2833
- cellId: Id | undefined,
2834
- descending: boolean,
2835
- offset: number,
2836
- limit: number | undefined,
2837
- listener: SortedRowIdsListener,
2838
- listenerDeps?: React.DependencyList,
2839
- mutator?: boolean,
2840
- storeOrStoreId?: StoreOrStoreId,
2841
- ): void;
3347
+ useSortedRowIdsListener: <
3348
+ TableId extends TableIdFromSchema<Schemas[0]>,
3349
+ CellIdOrUndefined extends CellIdFromSchema<Schemas[0], TableId> | undefined,
3350
+ Descending extends boolean,
3351
+ Offset extends number,
3352
+ Limit extends number | undefined,
3353
+ >(
3354
+ tableId: TableId,
3355
+ cellId: CellIdOrUndefined,
3356
+ descending: Descending,
3357
+ offset: Offset,
3358
+ limit: Limit,
3359
+ listener: SortedRowIdsListener<
3360
+ Schemas,
3361
+ TableId,
3362
+ CellIdOrUndefined,
3363
+ Descending,
3364
+ Offset,
3365
+ Limit
3366
+ >,
3367
+ listenerDeps?: React.DependencyList,
3368
+ mutator?: boolean,
3369
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
3370
+ ) => void;
2842
3371
 
2843
- /**
3372
+ /**
2844
3373
  * The useRowListener hook registers a listener function with a Store that will
2845
3374
  * be called whenever data in a Row changes.
2846
3375
  *
3376
+ * This has schema-based typing. The following is a simplified representation:
3377
+ *
3378
+ * ```ts override
3379
+ * useRowListener(
3380
+ * tableId: IdOrNull,
3381
+ * rowId: IdOrNull,
3382
+ * listener: RowListener,
3383
+ * listenerDeps?: React.DependencyList,
3384
+ * mutator?: boolean,
3385
+ * storeOrStoreId?: StoreOrStoreId,
3386
+ * ): void;
3387
+ * ```
3388
+ *
2847
3389
  * This hook is useful for situations where a component needs to register its
2848
3390
  * own specific listener to do more than simply tracking the value (which is
2849
3391
  * more easily done with the useRow hook).
@@ -2906,19 +3448,35 @@ export function useSortedRowIdsListener(
2906
3448
  * ```
2907
3449
  * @category Store hooks
2908
3450
  */
2909
- export function useRowListener(
2910
- tableId: IdOrNull,
2911
- rowId: IdOrNull,
2912
- listener: RowListener,
2913
- listenerDeps?: React.DependencyList,
2914
- mutator?: boolean,
2915
- storeOrStoreId?: StoreOrStoreId,
2916
- ): void;
3451
+ useRowListener: <
3452
+ TableIdOrNull extends TableIdFromSchema<Schemas[0]> | null,
3453
+ RowIdOrNull extends IdOrNull,
3454
+ >(
3455
+ tableId: TableIdOrNull,
3456
+ rowId: RowIdOrNull,
3457
+ listener: RowListener<Schemas, TableIdOrNull, RowIdOrNull>,
3458
+ listenerDeps?: React.DependencyList,
3459
+ mutator?: boolean,
3460
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
3461
+ ) => void;
2917
3462
 
2918
- /**
3463
+ /**
2919
3464
  * The useCellIdsListener hook registers a listener function with a Store that
2920
3465
  * will be called whenever the Cell Ids in a Row change.
2921
3466
  *
3467
+ * This has schema-based typing. The following is a simplified representation:
3468
+ *
3469
+ * ```ts override
3470
+ * useCellIdsListener(
3471
+ * tableId: IdOrNull,
3472
+ * rowId: IdOrNull,
3473
+ * listener: CellIdsListener,
3474
+ * listenerDeps?: React.DependencyList,
3475
+ * mutator?: boolean,
3476
+ * storeOrStoreId?: StoreOrStoreId,
3477
+ * ): void;
3478
+ * ```
3479
+ *
2922
3480
  * This hook is useful for situations where a component needs to register its
2923
3481
  * own specific listener to do more than simply tracking the value (which is
2924
3482
  * more easily done with the useCellIds hook).
@@ -2984,19 +3542,36 @@ export function useRowListener(
2984
3542
  * ```
2985
3543
  * @category Store hooks
2986
3544
  */
2987
- export function useCellIdsListener(
2988
- tableId: IdOrNull,
2989
- rowId: IdOrNull,
2990
- listener: CellIdsListener,
2991
- listenerDeps?: React.DependencyList,
2992
- mutator?: boolean,
2993
- storeOrStoreId?: StoreOrStoreId,
2994
- ): void;
3545
+ useCellIdsListener: <
3546
+ TableIdOrNull extends TableIdFromSchema<Schemas[0]> | null,
3547
+ RowIdOrNull extends IdOrNull,
3548
+ >(
3549
+ tableId: TableIdOrNull,
3550
+ rowId: RowIdOrNull,
3551
+ listener: CellIdsListener<Schemas, TableIdOrNull, RowIdOrNull>,
3552
+ listenerDeps?: React.DependencyList,
3553
+ mutator?: boolean,
3554
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
3555
+ ) => void;
2995
3556
 
2996
- /**
3557
+ /**
2997
3558
  * The useCellListener hook registers a listener function with a Store that will
2998
3559
  * be called whenever data in a Cell changes.
2999
3560
  *
3561
+ * This has schema-based typing. The following is a simplified representation:
3562
+ *
3563
+ * ```ts override
3564
+ * useCellListener(
3565
+ * tableId: IdOrNull,
3566
+ * rowId: IdOrNull,
3567
+ * cellId: IdOrNull,
3568
+ * listener: CellListener,
3569
+ * listenerDeps?: React.DependencyList,
3570
+ * mutator?: boolean,
3571
+ * storeOrStoreId?: StoreOrStoreId,
3572
+ * ): void;
3573
+ * ```
3574
+ *
3000
3575
  * This hook is useful for situations where a component needs to register its
3001
3576
  * own specific listener to do more than simply tracking the value (which is
3002
3577
  * more easily done with the useCell hook).
@@ -3062,20 +3637,39 @@ export function useCellIdsListener(
3062
3637
  * ```
3063
3638
  * @category Store hooks
3064
3639
  */
3065
- export function useCellListener(
3066
- tableId: IdOrNull,
3067
- rowId: IdOrNull,
3068
- cellId: IdOrNull,
3069
- listener: CellListener,
3070
- listenerDeps?: React.DependencyList,
3071
- mutator?: boolean,
3072
- storeOrStoreId?: StoreOrStoreId,
3073
- ): void;
3640
+ useCellListener: <
3641
+ TableIdOrNull extends TableIdFromSchema<Schemas[0]> | null,
3642
+ RowIdOrNull extends IdOrNull,
3643
+ CellIdOrNull extends
3644
+ | (TableIdOrNull extends TableIdFromSchema<Schemas[0]>
3645
+ ? CellIdFromSchema<Schemas[0], TableIdOrNull>
3646
+ : AllCellIdFromSchema<Schemas[0]>)
3647
+ | null,
3648
+ >(
3649
+ tableId: TableIdOrNull,
3650
+ rowId: RowIdOrNull,
3651
+ cellId: CellIdOrNull,
3652
+ listener: CellListener<Schemas, TableIdOrNull, RowIdOrNull, CellIdOrNull>,
3653
+ listenerDeps?: React.DependencyList,
3654
+ mutator?: boolean,
3655
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
3656
+ ) => void;
3074
3657
 
3075
- /**
3658
+ /**
3076
3659
  * The useValuesListener hook registers a listener function with a Store that
3077
3660
  * will be called whenever keyed value data in it changes.
3078
3661
  *
3662
+ * This has schema-based typing. The following is a simplified representation:
3663
+ *
3664
+ * ```ts override
3665
+ * useValuesListener(
3666
+ * listener: ValuesListener,
3667
+ * listenerDeps?: React.DependencyList,
3668
+ * mutator?: boolean,
3669
+ * storeOrStoreId?: StoreOrStoreId,
3670
+ * ): void;
3671
+ * ```
3672
+ *
3079
3673
  * This hook is useful for situations where a component needs to register its
3080
3674
  * own specific listener to do more than simply tracking the value (which is
3081
3675
  * more easily done with the useValues hook).
@@ -3128,17 +3722,28 @@ export function useCellListener(
3128
3722
  * @category Store hooks
3129
3723
  * @since v3.0.0
3130
3724
  */
3131
- export function useValuesListener(
3132
- listener: ValuesListener,
3133
- listenerDeps?: React.DependencyList,
3134
- mutator?: boolean,
3135
- storeOrStoreId?: StoreOrStoreId,
3136
- ): void;
3725
+ useValuesListener: (
3726
+ listener: ValuesListener<Schemas>,
3727
+ listenerDeps?: React.DependencyList,
3728
+ mutator?: boolean,
3729
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
3730
+ ) => void;
3137
3731
 
3138
- /**
3732
+ /**
3139
3733
  * The useValueIdsListener hook registers a listener function with a Store that
3140
3734
  * will be called whenever the Value Ids in it change.
3141
3735
  *
3736
+ * This has schema-based typing. The following is a simplified representation:
3737
+ *
3738
+ * ```ts override
3739
+ * useValueIdsListener(
3740
+ * listener: ValueIdsListener,
3741
+ * listenerDeps?: React.DependencyList,
3742
+ * mutator?: boolean,
3743
+ * storeOrStoreId?: StoreOrStoreId,
3744
+ * ): void;
3745
+ * ```
3746
+ *
3142
3747
  * This hook is useful for situations where a component needs to register its
3143
3748
  * own specific listener to do more than simply tracking the value (which is
3144
3749
  * more easily done with the useValueIds hook).
@@ -3192,17 +3797,29 @@ export function useValuesListener(
3192
3797
  * @category Store hooks
3193
3798
  * @since v3.0.0
3194
3799
  */
3195
- export function useValueIdsListener(
3196
- listener: ValueIdsListener,
3197
- listenerDeps?: React.DependencyList,
3198
- mutator?: boolean,
3199
- storeOrStoreId?: StoreOrStoreId,
3200
- ): void;
3800
+ useValueIdsListener: (
3801
+ listener: ValueIdsListener<Schemas>,
3802
+ listenerDeps?: React.DependencyList,
3803
+ mutator?: boolean,
3804
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
3805
+ ) => void;
3201
3806
 
3202
- /**
3807
+ /**
3203
3808
  * The useValueListener hook registers a listener function with a Store that
3204
3809
  * will be called whenever data in a Value changes.
3205
3810
  *
3811
+ * This has schema-based typing. The following is a simplified representation:
3812
+ *
3813
+ * ```ts override
3814
+ * useValueListener(
3815
+ * valueId: IdOrNull,
3816
+ * listener: ValueListener,
3817
+ * listenerDeps?: React.DependencyList,
3818
+ * mutator?: boolean,
3819
+ * storeOrStoreId?: StoreOrStoreId,
3820
+ * ): void;
3821
+ * ```
3822
+ *
3206
3823
  * This hook is useful for situations where a component needs to register its
3207
3824
  * own specific listener to do more than simply tracking the value (which is
3208
3825
  * more easily done with the useValue hook).
@@ -3259,18 +3876,30 @@ export function useValueIdsListener(
3259
3876
  * @category Store hooks
3260
3877
  * @since v3.0.0
3261
3878
  */
3262
- export function useValueListener(
3263
- valueId: IdOrNull,
3264
- listener: ValueListener,
3265
- listenerDeps?: React.DependencyList,
3266
- mutator?: boolean,
3267
- storeOrStoreId?: StoreOrStoreId,
3268
- ): void;
3879
+ useValueListener: <
3880
+ ValueIdOrNull extends ValueIdFromSchema<Schemas[1]> | null,
3881
+ >(
3882
+ valueId: ValueIdOrNull,
3883
+ listener: ValueListener<Schemas, ValueIdOrNull>,
3884
+ listenerDeps?: React.DependencyList,
3885
+ mutator?: boolean,
3886
+ storeOrStoreId?: StoreOrStoreId<Schemas>,
3887
+ ) => void;
3269
3888
 
3270
- /**
3889
+ /**
3271
3890
  * The useCreateMetrics hook is used to create a Metrics object within a React
3272
3891
  * application with convenient memoization.
3273
3892
  *
3893
+ * This has schema-based typing. The following is a simplified representation:
3894
+ *
3895
+ * ```ts override
3896
+ * useCreateMetrics(
3897
+ * store: Store,
3898
+ * create: (store: Store) => Metrics,
3899
+ * createDeps?: React.DependencyList,
3900
+ * ): Metrics;
3901
+ * ```
3902
+ *
3274
3903
  * It is possible to create a Metrics object outside of the React app with the
3275
3904
  * regular createMetrics function and pass it in, but you may prefer to create
3276
3905
  * it within the app, perhaps inside the top-level component. To defend against
@@ -3372,16 +4001,22 @@ export function useValueListener(
3372
4001
  * ```
3373
4002
  * @category Metrics hooks
3374
4003
  */
3375
- export function useCreateMetrics(
3376
- store: Store,
3377
- create: (store: Store) => Metrics,
3378
- createDeps?: React.DependencyList,
3379
- ): Metrics;
4004
+ useCreateMetrics: (
4005
+ store: Store<Schemas>,
4006
+ create: (store: Store<Schemas>) => Metrics<Schemas>,
4007
+ createDeps?: React.DependencyList,
4008
+ ) => Metrics<Schemas>;
3380
4009
 
3381
- /**
4010
+ /**
3382
4011
  * The useMetrics hook is used to get a reference to a Metrics object from
3383
4012
  * within a Provider component context.
3384
4013
  *
4014
+ * This has schema-based typing. The following is a simplified representation:
4015
+ *
4016
+ * ```ts override
4017
+ * useMetrics(id?: Id): Metrics | undefined;
4018
+ * ```
4019
+ *
3385
4020
  * A Provider component is used to wrap part of an application in a context. It
3386
4021
  * can contain a default Metrics object (or a set of Metrics objects named by
3387
4022
  * Id) that can be easily accessed without having to be passed down as props
@@ -3439,12 +4074,21 @@ export function useCreateMetrics(
3439
4074
  * ```
3440
4075
  * @category Metrics hooks
3441
4076
  */
3442
- export function useMetrics(id?: Id): Metrics | undefined;
4077
+ useMetrics: (id?: Id) => Metrics<Schemas> | undefined;
3443
4078
 
3444
- /**
4079
+ /**
3445
4080
  * The useMetric hook gets the current value of a Metric, and registers a
3446
4081
  * listener so that any changes to that result will cause a re-render.
3447
4082
  *
4083
+ * This has schema-based typing. The following is a simplified representation:
4084
+ *
4085
+ * ```ts override
4086
+ * useMetric(
4087
+ * metricId: Id,
4088
+ * metricsOrMetricsId?: MetricsOrMetricsId,
4089
+ * ): number | undefined;
4090
+ * ```
4091
+ *
3448
4092
  * A Provider component is used to wrap part of an application in a context, and
3449
4093
  * it can contain a default Metrics object or a set of Metrics objects named by
3450
4094
  * Id. The useMetric hook lets you indicate which Metrics object to get data
@@ -3537,15 +4181,26 @@ export function useMetrics(id?: Id): Metrics | undefined;
3537
4181
  * ```
3538
4182
  * @category Metrics hooks
3539
4183
  */
3540
- export function useMetric(
3541
- metricId: Id,
3542
- metricsOrMetricsId?: MetricsOrMetricsId,
3543
- ): number | undefined;
4184
+ useMetric: (
4185
+ metricId: Id,
4186
+ metricsOrMetricsId?: MetricsOrMetricsId<Schemas>,
4187
+ ) => number | undefined;
3544
4188
 
3545
- /**
4189
+ /**
3546
4190
  * The useMetricListener hook registers a listener function with the Metrics
3547
4191
  * object that will be called whenever the value of a specified Metric changes.
3548
4192
  *
4193
+ * This has schema-based typing. The following is a simplified representation:
4194
+ *
4195
+ * ```ts override
4196
+ * useMetricListener(
4197
+ * metricId: IdOrNull,
4198
+ * listener: MetricListener,
4199
+ * listenerDeps?: React.DependencyList,
4200
+ * metricsOrMetricsId?: MetricsOrMetricsId,
4201
+ * ): void;
4202
+ * ```
4203
+ *
3549
4204
  * This hook is useful for situations where a component needs to register its
3550
4205
  * own specific listener to do more than simply tracking the value (which is
3551
4206
  * more easily done with the useMetric hook).
@@ -3607,17 +4262,27 @@ export function useMetric(
3607
4262
  * ```
3608
4263
  * @category Metrics hooks
3609
4264
  */
3610
- export function useMetricListener(
3611
- metricId: IdOrNull,
3612
- listener: MetricListener,
3613
- listenerDeps?: React.DependencyList,
3614
- metricsOrMetricsId?: MetricsOrMetricsId,
3615
- ): void;
4265
+ useMetricListener: (
4266
+ metricId: IdOrNull,
4267
+ listener: MetricListener<Schemas>,
4268
+ listenerDeps?: React.DependencyList,
4269
+ metricsOrMetricsId?: MetricsOrMetricsId<Schemas>,
4270
+ ) => void;
3616
4271
 
3617
- /**
4272
+ /**
3618
4273
  * The useCreateIndexes hook is used to create an Indexes object within a React
3619
4274
  * application with convenient memoization.
3620
4275
  *
4276
+ * This has schema-based typing. The following is a simplified representation:
4277
+ *
4278
+ * ```ts override
4279
+ * useCreateIndexes(
4280
+ * store: Store,
4281
+ * create: (store: Store) => Indexes,
4282
+ * createDeps?: React.DependencyList,
4283
+ * ): Indexes;
4284
+ * ```
4285
+ *
3621
4286
  * It is possible to create an Indexes object outside of the React app with the
3622
4287
  * regular createIndexes function and pass it in, but you may prefer to create
3623
4288
  * it within the app, perhaps inside the top-level component. To defend against
@@ -3727,16 +4392,22 @@ export function useMetricListener(
3727
4392
  * ```
3728
4393
  * @category Indexes hooks
3729
4394
  */
3730
- export function useCreateIndexes(
3731
- store: Store,
3732
- create: (store: Store) => Indexes,
3733
- createDeps?: React.DependencyList,
3734
- ): Indexes;
4395
+ useCreateIndexes: (
4396
+ store: Store<Schemas>,
4397
+ create: (store: Store<Schemas>) => Indexes<Schemas>,
4398
+ createDeps?: React.DependencyList,
4399
+ ) => Indexes<Schemas>;
3735
4400
 
3736
- /**
4401
+ /**
3737
4402
  * The useIndexes hook is used to get a reference to an Indexes object from
3738
4403
  * within a Provider component context.
3739
4404
  *
4405
+ * This has schema-based typing. The following is a simplified representation:
4406
+ *
4407
+ * ```ts override
4408
+ * useIndexes(id?: Id): Indexes | undefined;
4409
+ * ```
4410
+ *
3740
4411
  * A Provider component is used to wrap part of an application in a context. It
3741
4412
  * can contain a default Indexes object (or a set of Indexes objects named by
3742
4413
  * Id) that can be easily accessed without having to be passed down as props
@@ -3794,12 +4465,21 @@ export function useCreateIndexes(
3794
4465
  * ```
3795
4466
  * @category Indexes hooks
3796
4467
  */
3797
- export function useIndexes(id?: Id): Indexes | undefined;
4468
+ useIndexes: (id?: Id) => Indexes<Schemas> | undefined;
3798
4469
 
3799
- /**
4470
+ /**
3800
4471
  * The useSliceIds hook gets the list of Slice Ids in an Index, and registers a
3801
4472
  * listener so that any changes to that result will cause a re-render.
3802
4473
  *
4474
+ * This has schema-based typing. The following is a simplified representation:
4475
+ *
4476
+ * ```ts override
4477
+ * useSliceIds(
4478
+ * indexId: Id,
4479
+ * indexesOrIndexesId?: IndexesOrIndexesId,
4480
+ * ): Ids;
4481
+ * ```
4482
+ *
3803
4483
  * A Provider component is used to wrap part of an application in a context, and
3804
4484
  * it can contain a default Indexes object or a set of Indexes objects named by
3805
4485
  * Id. The useSliceIds hook lets you indicate which Indexes object to get data
@@ -3896,16 +4576,26 @@ export function useIndexes(id?: Id): Indexes | undefined;
3896
4576
  * ```
3897
4577
  * @category Indexes hooks
3898
4578
  */
3899
- export function useSliceIds(
3900
- indexId: Id,
3901
- indexesOrIndexesId?: IndexesOrIndexesId,
3902
- ): Ids;
4579
+ useSliceIds: (
4580
+ indexId: Id,
4581
+ indexesOrIndexesId?: IndexesOrIndexesId<Schemas>,
4582
+ ) => Ids;
3903
4583
 
3904
- /**
4584
+ /**
3905
4585
  * The useSliceRowIds hook gets the list of Row Ids in a given Slice, and
3906
4586
  * registers a listener so that any changes to that result will cause a
3907
4587
  * re-render.
3908
4588
  *
4589
+ * This has schema-based typing. The following is a simplified representation:
4590
+ *
4591
+ * ```ts override
4592
+ * useSliceRowIds(
4593
+ * indexId: Id,
4594
+ * sliceId: Id,
4595
+ * indexesOrIndexesId?: IndexesOrIndexesId,
4596
+ * ): Ids;
4597
+ * ```
4598
+ *
3909
4599
  * A Provider component is used to wrap part of an application in a context, and
3910
4600
  * it can contain a default Indexes object or a set of Indexes objects named by
3911
4601
  * Id. The useSliceRowIds hook lets you indicate which Indexes object to get
@@ -4009,16 +4699,27 @@ export function useSliceIds(
4009
4699
  * ```
4010
4700
  * @category Indexes hooks
4011
4701
  */
4012
- export function useSliceRowIds(
4013
- indexId: Id,
4014
- sliceId: Id,
4015
- indexesOrIndexesId?: IndexesOrIndexesId,
4016
- ): Ids;
4702
+ useSliceRowIds: (
4703
+ indexId: Id,
4704
+ sliceId: Id,
4705
+ indexesOrIndexesId?: IndexesOrIndexesId<Schemas>,
4706
+ ) => Ids;
4017
4707
 
4018
- /**
4708
+ /**
4019
4709
  * The useSliceIdsListener hook registers a listener function with the Indexes
4020
4710
  * object that will be called whenever the Slice Ids in an Index change.
4021
4711
  *
4712
+ * This has schema-based typing. The following is a simplified representation:
4713
+ *
4714
+ * ```ts override
4715
+ * useSliceIdsListener(
4716
+ * indexId: IdOrNull,
4717
+ * listener: SliceIdsListener,
4718
+ * listenerDeps?: React.DependencyList,
4719
+ * indexesOrIndexesId?: IndexesOrIndexesId,
4720
+ * ): void;
4721
+ * ```
4722
+ *
4022
4723
  * This hook is useful for situations where a component needs to register its
4023
4724
  * own specific listener to do more than simply tracking the value (which is
4024
4725
  * more easily done with the useSliceIds hook).
@@ -4081,17 +4782,29 @@ export function useSliceRowIds(
4081
4782
  * ```
4082
4783
  * @category Indexes hooks
4083
4784
  */
4084
- export function useSliceIdsListener(
4085
- indexId: IdOrNull,
4086
- listener: SliceIdsListener,
4087
- listenerDeps?: React.DependencyList,
4088
- indexesOrIndexesId?: IndexesOrIndexesId,
4089
- ): void;
4785
+ useSliceIdsListener: (
4786
+ indexId: IdOrNull,
4787
+ listener: SliceIdsListener<Schemas>,
4788
+ listenerDeps?: React.DependencyList,
4789
+ indexesOrIndexesId?: IndexesOrIndexesId<Schemas>,
4790
+ ) => void;
4090
4791
 
4091
- /**
4792
+ /**
4092
4793
  * The useSliceRowIdsListener hook registers a listener function with the
4093
4794
  * Indexes object that will be called whenever the Row Ids in a Slice change.
4094
4795
  *
4796
+ * This has schema-based typing. The following is a simplified representation:
4797
+ *
4798
+ * ```ts override
4799
+ * useSliceRowIdsListener(
4800
+ * indexId: IdOrNull,
4801
+ * sliceId: IdOrNull,
4802
+ * listener: SliceRowIdsListener,
4803
+ * listenerDeps?: React.DependencyList,
4804
+ * indexesOrIndexesId?: IndexesOrIndexesId,
4805
+ * ): void;
4806
+ * ```
4807
+ *
4095
4808
  * This hook is useful for situations where a component needs to register its
4096
4809
  * own specific listener to do more than simply tracking the value (which is
4097
4810
  * more easily done with the useSliceRowIds hook).
@@ -4162,18 +4875,28 @@ export function useSliceIdsListener(
4162
4875
  * ```
4163
4876
  * @category Indexes hooks
4164
4877
  */
4165
- export function useSliceRowIdsListener(
4166
- indexId: IdOrNull,
4167
- sliceId: IdOrNull,
4168
- listener: SliceRowIdsListener,
4169
- listenerDeps?: React.DependencyList,
4170
- indexesOrIndexesId?: IndexesOrIndexesId,
4171
- ): void;
4878
+ useSliceRowIdsListener: (
4879
+ indexId: IdOrNull,
4880
+ sliceId: IdOrNull,
4881
+ listener: SliceRowIdsListener<Schemas>,
4882
+ listenerDeps?: React.DependencyList,
4883
+ indexesOrIndexesId?: IndexesOrIndexesId<Schemas>,
4884
+ ) => void;
4172
4885
 
4173
- /**
4886
+ /**
4174
4887
  * The useCreateRelationships hook is used to create a Relationships object
4175
4888
  * within a React application with convenient memoization.
4176
4889
  *
4890
+ * This has schema-based typing. The following is a simplified representation:
4891
+ *
4892
+ * ```ts override
4893
+ * useCreateRelationships(
4894
+ * store: Store,
4895
+ * create: (store: Store) => Relationships,
4896
+ * createDeps?: React.DependencyList,
4897
+ * ): Relationships;
4898
+ * ```
4899
+ *
4177
4900
  * It is possible to create a Relationships object outside of the React app with
4178
4901
  * the regular createRelationships function and pass it in, but you may prefer
4179
4902
  * to create it within the app, perhaps inside the top-level component. To
@@ -4291,16 +5014,22 @@ export function useSliceRowIdsListener(
4291
5014
  * ```
4292
5015
  * @category Relationships hooks
4293
5016
  */
4294
- export function useCreateRelationships(
4295
- store: Store,
4296
- create: (store: Store) => Relationships,
4297
- createDeps?: React.DependencyList,
4298
- ): Relationships;
5017
+ useCreateRelationships: (
5018
+ store: Store<Schemas>,
5019
+ create: (store: Store<Schemas>) => Relationships<Schemas>,
5020
+ createDeps?: React.DependencyList,
5021
+ ) => Relationships<Schemas>;
4299
5022
 
4300
- /**
5023
+ /**
4301
5024
  * The useRelationships hook is used to get a reference to a Relationships
4302
5025
  * object from within a Provider component context.
4303
5026
  *
5027
+ * This has schema-based typing. The following is a simplified representation:
5028
+ *
5029
+ * ```ts override
5030
+ * useRelationships(id?: Id): Relationships | undefined;
5031
+ * ```
5032
+ *
4304
5033
  * A Provider component is used to wrap part of an application in a context. It
4305
5034
  * can contain a default Relationships object (or a set of Relationships objects
4306
5035
  * named by Id) that can be easily accessed without having to be passed down as
@@ -4366,13 +5095,23 @@ export function useCreateRelationships(
4366
5095
  * ```
4367
5096
  * @category Relationships hooks
4368
5097
  */
4369
- export function useRelationships(id?: Id): Relationships | undefined;
5098
+ useRelationships: (id?: Id) => Relationships<Schemas> | undefined;
4370
5099
 
4371
- /**
5100
+ /**
4372
5101
  * The useRemoteRowId hook gets the remote Row Id for a given local Row in a
4373
5102
  * Relationship, and registers a listener so that any changes to that result
4374
5103
  * will cause a re-render.
4375
5104
  *
5105
+ * This has schema-based typing. The following is a simplified representation:
5106
+ *
5107
+ * ```ts override
5108
+ * useRemoteRowId(
5109
+ * relationshipId: Id,
5110
+ * localRowId: Id,
5111
+ * relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
5112
+ * ): Id | undefined;
5113
+ * ```
5114
+ *
4376
5115
  * A Provider component is used to wrap part of an application in a context, and
4377
5116
  * it can contain a default Relationships object or a set of Relationships
4378
5117
  * objects named by Id. The useRemoteRowId hook lets you indicate which
@@ -4471,17 +5210,27 @@ export function useRelationships(id?: Id): Relationships | undefined;
4471
5210
  * ```
4472
5211
  * @category Relationships hooks
4473
5212
  */
4474
- export function useRemoteRowId(
4475
- relationshipId: Id,
4476
- localRowId: Id,
4477
- relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
4478
- ): Id | undefined;
5213
+ useRemoteRowId: (
5214
+ relationshipId: Id,
5215
+ localRowId: Id,
5216
+ relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId<Schemas>,
5217
+ ) => Id | undefined;
4479
5218
 
4480
- /**
5219
+ /**
4481
5220
  * The useLocalRowIds hook gets the local Row Ids for a given remote Row in a
4482
5221
  * Relationship, and registers a listener so that any changes to that result
4483
5222
  * will cause a re-render.
4484
5223
  *
5224
+ * This has schema-based typing. The following is a simplified representation:
5225
+ *
5226
+ * ```ts override
5227
+ * useLocalRowIds(
5228
+ * relationshipId: Id,
5229
+ * remoteRowId: Id,
5230
+ * relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
5231
+ * ): Ids;
5232
+ * ```
5233
+ *
4485
5234
  * A Provider component is used to wrap part of an application in a context, and
4486
5235
  * it can contain a default Relationships object or a set of Relationships
4487
5236
  * objects named by Id. The useLocalRowIds hook lets you indicate which
@@ -4588,17 +5337,27 @@ export function useRemoteRowId(
4588
5337
  * ```
4589
5338
  * @category Relationships hooks
4590
5339
  */
4591
- export function useLocalRowIds(
4592
- relationshipId: Id,
4593
- remoteRowId: Id,
4594
- relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
4595
- ): Ids;
5340
+ useLocalRowIds: (
5341
+ relationshipId: Id,
5342
+ remoteRowId: Id,
5343
+ relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId<Schemas>,
5344
+ ) => Ids;
4596
5345
 
4597
- /**
5346
+ /**
4598
5347
  * The useLinkedRowIds hook gets the linked Row Ids for a given Row in a linked
4599
5348
  * list Relationship, and registers a listener so that any changes to that
4600
5349
  * result will cause a re-render.
4601
5350
  *
5351
+ * This has schema-based typing. The following is a simplified representation:
5352
+ *
5353
+ * ```ts override
5354
+ * useLinkedRowIds(
5355
+ * relationshipId: Id,
5356
+ * firstRowId: Id,
5357
+ * relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
5358
+ * ): Ids;
5359
+ * ```
5360
+ *
4602
5361
  * A Provider component is used to wrap part of an application in a context, and
4603
5362
  * it can contain a default Relationships object or a set of Relationships
4604
5363
  * objects named by Id. The useLinkedRowIds hook lets you indicate which
@@ -4712,17 +5471,29 @@ export function useLocalRowIds(
4712
5471
  * ```
4713
5472
  * @category Relationships hooks
4714
5473
  */
4715
- export function useLinkedRowIds(
4716
- relationshipId: Id,
4717
- firstRowId: Id,
4718
- relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
4719
- ): Ids;
5474
+ useLinkedRowIds: (
5475
+ relationshipId: Id,
5476
+ firstRowId: Id,
5477
+ relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId<Schemas>,
5478
+ ) => Ids;
4720
5479
 
4721
- /**
5480
+ /**
4722
5481
  * The useRemoteRowIdListener hook registers a listener function with the
4723
5482
  * Relationships object that will be called whenever a remote Row Id in a
4724
5483
  * Relationship changes.
4725
5484
  *
5485
+ * This has schema-based typing. The following is a simplified representation:
5486
+ *
5487
+ * ```ts override
5488
+ * useRemoteRowIdListener(
5489
+ * relationshipId: IdOrNull,
5490
+ * localRowId: IdOrNull,
5491
+ * listener: RemoteRowIdListener,
5492
+ * listenerDeps?: React.DependencyList,
5493
+ * relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
5494
+ * ): void;
5495
+ * ```
5496
+ *
4726
5497
  * This hook is useful for situations where a component needs to register its
4727
5498
  * own specific listener to do more than simply tracking the value (which is
4728
5499
  * more easily done with the useRemoteRowId hook).
@@ -4799,19 +5570,31 @@ export function useLinkedRowIds(
4799
5570
  * ```
4800
5571
  * @category Relationships hooks
4801
5572
  */
4802
- export function useRemoteRowIdListener(
4803
- relationshipId: IdOrNull,
4804
- localRowId: IdOrNull,
4805
- listener: RemoteRowIdListener,
4806
- listenerDeps?: React.DependencyList,
4807
- relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
4808
- ): void;
5573
+ useRemoteRowIdListener: (
5574
+ relationshipId: IdOrNull,
5575
+ localRowId: IdOrNull,
5576
+ listener: RemoteRowIdListener<Schemas>,
5577
+ listenerDeps?: React.DependencyList,
5578
+ relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId<Schemas>,
5579
+ ) => void;
4809
5580
 
4810
- /**
5581
+ /**
4811
5582
  * The useLocalRowIdsListener hook registers a listener function with the
4812
5583
  * Relationships object that will be called whenever the local Row Ids in a
4813
5584
  * Relationship change.
4814
5585
  *
5586
+ * This has schema-based typing. The following is a simplified representation:
5587
+ *
5588
+ * ```ts override
5589
+ * useLocalRowIdsListener(
5590
+ * relationshipId: IdOrNull,
5591
+ * remoteRowId: IdOrNull,
5592
+ * listener: LocalRowIdsListener,
5593
+ * listenerDeps?: React.DependencyList,
5594
+ * relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
5595
+ * ): void;
5596
+ * ```
5597
+ *
4815
5598
  * This hook is useful for situations where a component needs to register its
4816
5599
  * own specific listener to do more than simply tracking the value (which is
4817
5600
  * more easily done with the useLocalRowsId hook).
@@ -4888,19 +5671,31 @@ export function useRemoteRowIdListener(
4888
5671
  * ```
4889
5672
  * @category Relationships hooks
4890
5673
  */
4891
- export function useLocalRowIdsListener(
4892
- relationshipId: IdOrNull,
4893
- remoteRowId: IdOrNull,
4894
- listener: LocalRowIdsListener,
4895
- listenerDeps?: React.DependencyList,
4896
- relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
4897
- ): void;
5674
+ useLocalRowIdsListener: (
5675
+ relationshipId: IdOrNull,
5676
+ remoteRowId: IdOrNull,
5677
+ listener: LocalRowIdsListener<Schemas>,
5678
+ listenerDeps?: React.DependencyList,
5679
+ relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId<Schemas>,
5680
+ ) => void;
4898
5681
 
4899
- /**
5682
+ /**
4900
5683
  * The useLinkedRowIdsListener hook registers a listener function with the
4901
5684
  * Relationships object that will be called whenever the linked Row Ids in a
4902
5685
  * Relationship change.
4903
5686
  *
5687
+ * This has schema-based typing. The following is a simplified representation:
5688
+ *
5689
+ * ```ts override
5690
+ * useLinkedRowIdsListener(
5691
+ * relationshipId: Id,
5692
+ * firstRowId: Id,
5693
+ * listener: LinkedRowIdsListener,
5694
+ * listenerDeps?: React.DependencyList,
5695
+ * relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
5696
+ * ): void;
5697
+ * ```
5698
+ *
4904
5699
  * This hook is useful for situations where a component needs to register its
4905
5700
  * own specific listener to do more than simply tracking the value (which is
4906
5701
  * more easily done with the useLinkedRowsId hook).
@@ -4974,18 +5769,28 @@ export function useLocalRowIdsListener(
4974
5769
  * ```
4975
5770
  * @category Relationships hooks
4976
5771
  */
4977
- export function useLinkedRowIdsListener(
4978
- relationshipId: Id,
4979
- firstRowId: Id,
4980
- listener: LinkedRowIdsListener,
4981
- listenerDeps?: React.DependencyList,
4982
- relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId,
4983
- ): void;
5772
+ useLinkedRowIdsListener: (
5773
+ relationshipId: Id,
5774
+ firstRowId: Id,
5775
+ listener: LinkedRowIdsListener<Schemas>,
5776
+ listenerDeps?: React.DependencyList,
5777
+ relationshipsOrRelationshipsId?: RelationshipsOrRelationshipsId<Schemas>,
5778
+ ) => void;
4984
5779
 
4985
- /**
5780
+ /**
4986
5781
  * The useCreateQueries hook is used to create a Queries object within a React
4987
5782
  * application with convenient memoization.
4988
5783
  *
5784
+ * This has schema-based typing. The following is a simplified representation:
5785
+ *
5786
+ * ```ts override
5787
+ * useCreateQueries(
5788
+ * store: Store,
5789
+ * create: (store: Store) => Queries,
5790
+ * createDeps?: React.DependencyList,
5791
+ * ): Queries;
5792
+ * ```
5793
+ *
4989
5794
  * It is possible to create a Queries object outside of the React app with the
4990
5795
  * regular createQueries function and pass it in, but you may prefer to create
4991
5796
  * it within the app, perhaps inside the top-level component. To defend against
@@ -5098,16 +5903,22 @@ export function useLinkedRowIdsListener(
5098
5903
  * @category Queries hooks
5099
5904
  * @since v2.0.0
5100
5905
  */
5101
- export function useCreateQueries(
5102
- store: Store,
5103
- create: (store: Store) => Queries,
5104
- createDeps?: React.DependencyList,
5105
- ): Queries;
5906
+ useCreateQueries: (
5907
+ store: Store<Schemas>,
5908
+ create: (store: Store<Schemas>) => Queries<Schemas>,
5909
+ createDeps?: React.DependencyList,
5910
+ ) => Queries<Schemas>;
5106
5911
 
5107
- /**
5912
+ /**
5108
5913
  * The useQueries hook is used to get a reference to a Queries object from
5109
5914
  * within a Provider component context.
5110
5915
  *
5916
+ * This has schema-based typing. The following is a simplified representation:
5917
+ *
5918
+ * ```ts override
5919
+ * useQueries(id?: Id): Queries | undefined;
5920
+ * ```
5921
+ *
5111
5922
  * A Provider component is used to wrap part of an application in a context. It
5112
5923
  * can contain a default Queries object (or a set of Queries objects named by
5113
5924
  * Id) that can be easily accessed without having to be passed down as props
@@ -5166,13 +5977,22 @@ export function useCreateQueries(
5166
5977
  * @category Queries hooks
5167
5978
  * @since v2.0.0
5168
5979
  */
5169
- export function useQueries(id?: Id): Queries | undefined;
5980
+ useQueries: (id?: Id) => Queries<Schemas> | undefined;
5170
5981
 
5171
- /**
5982
+ /**
5172
5983
  * The useResultTable hook returns an object containing the entire data of the
5173
5984
  * result Table of the given query, and registers a listener so that any changes
5174
5985
  * to that result will cause a re-render.
5175
5986
  *
5987
+ * This has schema-based typing. The following is a simplified representation:
5988
+ *
5989
+ * ```ts override
5990
+ * useResultTable(
5991
+ * queryId: Id,
5992
+ * queriesOrQueriesId?: QueriesOrQueriesId,
5993
+ * ): Table;
5994
+ * ```
5995
+ *
5176
5996
  * A Provider component is used to wrap part of an application in a context, and
5177
5997
  * it can contain a default Queries object or a set of Queries objects named by
5178
5998
  * Id. The useResultTable hook lets you indicate which Queries object to get
@@ -5283,16 +6103,25 @@ export function useQueries(id?: Id): Queries | undefined;
5283
6103
  * @category Queries hooks
5284
6104
  * @since v2.0.0
5285
6105
  */
5286
- export function useResultTable(
5287
- queryId: Id,
5288
- queriesOrQueriesId?: QueriesOrQueriesId,
5289
- ): Table;
6106
+ useResultTable: (
6107
+ queryId: Id,
6108
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
6109
+ ) => ResultTable;
5290
6110
 
5291
- /**
6111
+ /**
5292
6112
  * The useResultRowIds hook returns the Ids of every Row in the result Table of
5293
6113
  * the given query, and registers a listener so that any changes to those Ids
5294
6114
  * will cause a re-render.
5295
6115
  *
6116
+ * This has schema-based typing. The following is a simplified representation:
6117
+ *
6118
+ * ```ts override
6119
+ * useResultRowIds(
6120
+ * queryId: Id,
6121
+ * queriesOrQueriesId?: QueriesOrQueriesId,
6122
+ * ): Ids;
6123
+ * ```
6124
+ *
5296
6125
  * A Provider component is used to wrap part of an application in a context, and
5297
6126
  * it can contain a default Queries object or a set of Queries objects named by
5298
6127
  * Id. The useResultRowIds hook lets you indicate which Queries object to get
@@ -5404,16 +6233,29 @@ export function useResultTable(
5404
6233
  * @category Queries hooks
5405
6234
  * @since v2.0.0
5406
6235
  */
5407
- export function useResultRowIds(
5408
- queryId: Id,
5409
- queriesOrQueriesId?: QueriesOrQueriesId,
5410
- ): Ids;
6236
+ useResultRowIds: (
6237
+ queryId: Id,
6238
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
6239
+ ) => Ids;
5411
6240
 
5412
- /**
6241
+ /**
5413
6242
  * The useResultSortedRowIds hook returns the sorted (and optionally, paginated)
5414
6243
  * Ids of every Row in the result Table of the given query, and registers a
5415
6244
  * listener so that any changes to those Ids will cause a re-render.
5416
6245
  *
6246
+ * This has schema-based typing. The following is a simplified representation:
6247
+ *
6248
+ * ```ts override
6249
+ * useResultSortedRowIds(
6250
+ * queryId: Id,
6251
+ * cellId?: Id,
6252
+ * descending?: boolean,
6253
+ * offset?: number,
6254
+ * limit?: number,
6255
+ * queriesOrQueriesId?: QueriesOrQueriesId,
6256
+ * ): Ids;
6257
+ * ```
6258
+ *
5417
6259
  * A Provider component is used to wrap part of an application in a context, and
5418
6260
  * it can contain a default Queries object or a set of Queries objects named by
5419
6261
  * Id. The useResultSortedRowIds hook lets you indicate which Queries object to
@@ -5553,20 +6395,30 @@ export function useResultRowIds(
5553
6395
  * @category Queries hooks
5554
6396
  * @since v2.0.0
5555
6397
  */
5556
- export function useResultSortedRowIds(
5557
- queryId: Id,
5558
- cellId?: Id,
5559
- descending?: boolean,
5560
- offset?: number,
5561
- limit?: number,
5562
- queriesOrQueriesId?: QueriesOrQueriesId,
5563
- ): Ids;
6398
+ useResultSortedRowIds: (
6399
+ queryId: Id,
6400
+ cellId?: Id,
6401
+ descending?: boolean,
6402
+ offset?: number,
6403
+ limit?: number,
6404
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
6405
+ ) => Ids;
5564
6406
 
5565
- /**
6407
+ /**
5566
6408
  * The useResultRow hook returns an object containing the data of a
5567
6409
  * single Row in the result Table of the given query, and registers a listener
5568
6410
  * so that any changes to that Row will cause a re-render.
5569
6411
  *
6412
+ * This has schema-based typing. The following is a simplified representation:
6413
+ *
6414
+ * ```ts override
6415
+ * useResultRow(
6416
+ * queryId: Id,
6417
+ * rowId: Id,
6418
+ * queriesOrQueriesId?: QueriesOrQueriesId,
6419
+ * ): Row;
6420
+ * ```
6421
+ *
5570
6422
  * A Provider component is used to wrap part of an application in a context, and
5571
6423
  * it can contain a default Queries object or a set of Queries objects named by
5572
6424
  * Id. The useResultRow hook lets you indicate which Queries object to get data
@@ -5681,17 +6533,27 @@ export function useResultSortedRowIds(
5681
6533
  * @category Queries hooks
5682
6534
  * @since v2.0.0
5683
6535
  */
5684
- export function useResultRow(
5685
- queryId: Id,
5686
- rowId: Id,
5687
- queriesOrQueriesId?: QueriesOrQueriesId,
5688
- ): Row;
6536
+ useResultRow: (
6537
+ queryId: Id,
6538
+ rowId: Id,
6539
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
6540
+ ) => ResultRow;
5689
6541
 
5690
- /**
6542
+ /**
5691
6543
  * The useResultCellIds hook returns the Ids of every Cell in a given Row in the
5692
6544
  * result Table of the given query, and registers a listener so that any changes
5693
6545
  * to those Ids will cause a re-render.
5694
6546
  *
6547
+ * This has schema-based typing. The following is a simplified representation:
6548
+ *
6549
+ * ```ts override
6550
+ * useResultCellIds(
6551
+ * queryId: Id,
6552
+ * rowId: Id,
6553
+ * queriesOrQueriesId?: QueriesOrQueriesId,
6554
+ * ): Ids;
6555
+ * ```
6556
+ *
5695
6557
  * A Provider component is used to wrap part of an application in a context, and
5696
6558
  * it can contain a default Queries object or a set of Queries objects named by
5697
6559
  * Id. The useResultCellIds hook lets you indicate which Queries object to get
@@ -5812,17 +6674,28 @@ export function useResultRow(
5812
6674
  * @category Queries hooks
5813
6675
  * @since v2.0.0
5814
6676
  */
5815
- export function useResultCellIds(
5816
- queryId: Id,
5817
- rowId: Id,
5818
- queriesOrQueriesId?: QueriesOrQueriesId,
5819
- ): Ids;
6677
+ useResultCellIds: (
6678
+ queryId: Id,
6679
+ rowId: Id,
6680
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
6681
+ ) => Ids;
5820
6682
 
5821
- /**
6683
+ /**
5822
6684
  * The useResultCell hook returns the value of a single Cell in a given Row in
5823
6685
  * the result Table of the given query, and registers a listener so that any
5824
6686
  * changes to that value will cause a re-render.
5825
6687
  *
6688
+ * This has schema-based typing. The following is a simplified representation:
6689
+ *
6690
+ * ```ts override
6691
+ * useResultCell(
6692
+ * queryId: Id,
6693
+ * rowId: Id,
6694
+ * cellId: Id,
6695
+ * queriesOrQueriesId?: QueriesOrQueriesId,
6696
+ * ): Cell | undefined;
6697
+ * ```
6698
+ *
5826
6699
  * A Provider component is used to wrap part of an application in a context, and
5827
6700
  * it can contain a default Queries object or a set of Queries objects named by
5828
6701
  * Id. The useResultCell hook lets you indicate which Queries object to get data
@@ -5939,17 +6812,28 @@ export function useResultCellIds(
5939
6812
  * @category Queries hooks
5940
6813
  * @since v2.0.0
5941
6814
  */
5942
- export function useResultCell(
5943
- queryId: Id,
5944
- rowId: Id,
5945
- cellId: Id,
5946
- queriesOrQueriesId?: QueriesOrQueriesId,
5947
- ): Cell | undefined;
6815
+ useResultCell: (
6816
+ queryId: Id,
6817
+ rowId: Id,
6818
+ cellId: Id,
6819
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
6820
+ ) => ResultCell | undefined;
5948
6821
 
5949
- /**
6822
+ /**
5950
6823
  * The useResultTableListener hook registers a listener function with a Queries
5951
6824
  * object that will be called whenever data in a result Table changes.
5952
6825
  *
6826
+ * This has schema-based typing. The following is a simplified representation:
6827
+ *
6828
+ * ```ts override
6829
+ * useResultTableListener(
6830
+ * queryId: IdOrNull,
6831
+ * listener: ResultTableListener,
6832
+ * listenerDeps?: React.DependencyList,
6833
+ * queriesOrQueriesId?: QueriesOrQueriesId,
6834
+ * ): void;
6835
+ * ```
6836
+ *
5953
6837
  * This hook is useful for situations where a component needs to register its
5954
6838
  * own specific listener to do more than simply tracking the value (which is
5955
6839
  * more easily done with the useResultTable hook).
@@ -6017,17 +6901,28 @@ export function useResultCell(
6017
6901
  * @category Queries hooks
6018
6902
  * @since v2.0.0
6019
6903
  */
6020
- export function useResultTableListener(
6021
- queryId: IdOrNull,
6022
- listener: ResultTableListener,
6023
- listenerDeps?: React.DependencyList,
6024
- queriesOrQueriesId?: QueriesOrQueriesId,
6025
- ): void;
6904
+ useResultTableListener: (
6905
+ queryId: IdOrNull,
6906
+ listener: ResultTableListener<Schemas>,
6907
+ listenerDeps?: React.DependencyList,
6908
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
6909
+ ) => void;
6026
6910
 
6027
- /**
6911
+ /**
6028
6912
  * The useResultRowIdsListener hook registers a listener function with a Queries
6029
6913
  * object that will be called whenever the Row Ids in a result Table change.
6030
6914
  *
6915
+ * This has schema-based typing. The following is a simplified representation:
6916
+ *
6917
+ * ```ts override
6918
+ * useResultRowIdsListener(
6919
+ * queryId: IdOrNull,
6920
+ * listener: ResultRowIdsListener,
6921
+ * listenerDeps?: React.DependencyList,
6922
+ * queriesOrQueriesId?: QueriesOrQueriesId,
6923
+ * ): void;
6924
+ * ```
6925
+ *
6031
6926
  * This hook is useful for situations where a component needs to register its
6032
6927
  * own specific listener to do more than simply tracking the value (which is
6033
6928
  * more easily done with the useResultRowIds hook).
@@ -6095,18 +6990,33 @@ export function useResultTableListener(
6095
6990
  * @category Queries hooks
6096
6991
  * @since v2.0.0
6097
6992
  */
6098
- export function useResultRowIdsListener(
6099
- queryId: IdOrNull,
6100
- listener: ResultRowIdsListener,
6101
- listenerDeps?: React.DependencyList,
6102
- queriesOrQueriesId?: QueriesOrQueriesId,
6103
- ): void;
6993
+ useResultRowIdsListener: (
6994
+ queryId: IdOrNull,
6995
+ listener: ResultRowIdsListener<Schemas>,
6996
+ listenerDeps?: React.DependencyList,
6997
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
6998
+ ) => void;
6104
6999
 
6105
- /**
7000
+ /**
6106
7001
  * The useResultSortedRowIdsListener hook registers a listener function with a
6107
7002
  * Queries object that will be called whenever the sorted (and optionally,
6108
7003
  * paginated) Row Ids in a result Table change.
6109
7004
  *
7005
+ * This has schema-based typing. The following is a simplified representation:
7006
+ *
7007
+ * ```ts override
7008
+ * useResultSortedRowIdsListener(
7009
+ * queryId: Id,
7010
+ * cellId: Id | undefined,
7011
+ * descending: boolean,
7012
+ * offset: number,
7013
+ * limit: number | undefined,
7014
+ * listener: ResultRowIdsListener,
7015
+ * listenerDeps?: React.DependencyList,
7016
+ * queriesOrQueriesId?: QueriesOrQueriesId,
7017
+ * ): void;
7018
+ * ```
7019
+ *
6110
7020
  * This hook is useful for situations where a component needs to register its
6111
7021
  * own specific listener to do more than simply tracking the value (which is
6112
7022
  * more easily done with the useResultSortedRowIds hook).
@@ -6180,21 +7090,33 @@ export function useResultRowIdsListener(
6180
7090
  * @category Queries hooks
6181
7091
  * @since v2.0.0
6182
7092
  */
6183
- export function useResultSortedRowIdsListener(
6184
- queryId: Id,
6185
- cellId: Id | undefined,
6186
- descending: boolean,
6187
- offset: number,
6188
- limit: number | undefined,
6189
- listener: ResultRowIdsListener,
6190
- listenerDeps?: React.DependencyList,
6191
- queriesOrQueriesId?: QueriesOrQueriesId,
6192
- ): void;
7093
+ useResultSortedRowIdsListener: (
7094
+ queryId: Id,
7095
+ cellId: Id | undefined,
7096
+ descending: boolean,
7097
+ offset: number,
7098
+ limit: number | undefined,
7099
+ listener: ResultRowIdsListener<Schemas>,
7100
+ listenerDeps?: React.DependencyList,
7101
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
7102
+ ) => void;
6193
7103
 
6194
- /**
7104
+ /**
6195
7105
  * The useResultRowListener hook registers a listener function with a Queries
6196
7106
  * object that will be called whenever data in a result Row changes.
6197
7107
  *
7108
+ * This has schema-based typing. The following is a simplified representation:
7109
+ *
7110
+ * ```ts override
7111
+ * useResultRowListener(
7112
+ * queryId: IdOrNull,
7113
+ * rowId: IdOrNull,
7114
+ * listener: ResultRowListener,
7115
+ * listenerDeps?: React.DependencyList,
7116
+ * queriesOrQueriesId?: QueriesOrQueriesId,
7117
+ * ): void;
7118
+ * ```
7119
+ *
6198
7120
  * This hook is useful for situations where a component needs to register its
6199
7121
  * own specific listener to do more than simply tracking the value (which is
6200
7122
  * more easily done with the useResultRow hook).
@@ -6268,19 +7190,31 @@ export function useResultSortedRowIdsListener(
6268
7190
  * @category Queries hooks
6269
7191
  * @since v2.0.0
6270
7192
  */
6271
- export function useResultRowListener(
6272
- queryId: IdOrNull,
6273
- rowId: IdOrNull,
6274
- listener: ResultRowListener,
6275
- listenerDeps?: React.DependencyList,
6276
- queriesOrQueriesId?: QueriesOrQueriesId,
6277
- ): void;
7193
+ useResultRowListener: (
7194
+ queryId: IdOrNull,
7195
+ rowId: IdOrNull,
7196
+ listener: ResultRowListener<Schemas>,
7197
+ listenerDeps?: React.DependencyList,
7198
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
7199
+ ) => void;
6278
7200
 
6279
- /**
7201
+ /**
6280
7202
  * The useResultCellIdsListener hook registers a listener function with a
6281
7203
  * Queries object that will be called whenever the Cell Ids in a result Row
6282
7204
  * change.
6283
7205
  *
7206
+ * This has schema-based typing. The following is a simplified representation:
7207
+ *
7208
+ * ```ts override
7209
+ * useResultCellIdsListener(
7210
+ * queryId: IdOrNull,
7211
+ * rowId: IdOrNull,
7212
+ * listener: ResultCellIdsListener,
7213
+ * listenerDeps?: React.DependencyList,
7214
+ * queriesOrQueriesId?: QueriesOrQueriesId,
7215
+ * ): void;
7216
+ * ```
7217
+ *
6284
7218
  * This hook is useful for situations where a component needs to register its
6285
7219
  * own specific listener to do more than simply tracking the value (which is
6286
7220
  * more easily done with the useResultCellIds hook).
@@ -6353,18 +7287,31 @@ export function useResultRowListener(
6353
7287
  * @category Queries hooks
6354
7288
  * @since v2.0.0
6355
7289
  */
6356
- export function useResultCellIdsListener(
6357
- queryId: IdOrNull,
6358
- rowId: IdOrNull,
6359
- listener: ResultCellIdsListener,
6360
- listenerDeps?: React.DependencyList,
6361
- queriesOrQueriesId?: QueriesOrQueriesId,
6362
- ): void;
7290
+ useResultCellIdsListener: (
7291
+ queryId: IdOrNull,
7292
+ rowId: IdOrNull,
7293
+ listener: ResultCellIdsListener<Schemas>,
7294
+ listenerDeps?: React.DependencyList,
7295
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
7296
+ ) => void;
6363
7297
 
6364
- /**
7298
+ /**
6365
7299
  * The useResultCellListener hook registers a listener function with a Queries
6366
7300
  * object that will be called whenever data in a Cell changes.
6367
7301
  *
7302
+ * This has schema-based typing. The following is a simplified representation:
7303
+ *
7304
+ * ```ts override
7305
+ * useResultCellListener(
7306
+ * queryId: IdOrNull,
7307
+ * rowId: IdOrNull,
7308
+ * cellId: IdOrNull,
7309
+ * listener: ResultCellListener,
7310
+ * listenerDeps?: React.DependencyList,
7311
+ * queriesOrQueriesId?: QueriesOrQueriesId,
7312
+ * ): void;
7313
+ * ```
7314
+ *
6368
7315
  * This hook is useful for situations where a component needs to register its
6369
7316
  * own specific listener to do more than simply tracking the value (which is
6370
7317
  * more easily done with the useResultCell hook).
@@ -6440,19 +7387,29 @@ export function useResultCellIdsListener(
6440
7387
  * @category Queries hooks
6441
7388
  * @since v2.0.0
6442
7389
  */
6443
- export function useResultCellListener(
6444
- queryId: IdOrNull,
6445
- rowId: IdOrNull,
6446
- cellId: IdOrNull,
6447
- listener: ResultCellListener,
6448
- listenerDeps?: React.DependencyList,
6449
- queriesOrQueriesId?: QueriesOrQueriesId,
6450
- ): void;
7390
+ useResultCellListener: (
7391
+ queryId: IdOrNull,
7392
+ rowId: IdOrNull,
7393
+ cellId: IdOrNull,
7394
+ listener: ResultCellListener<Schemas>,
7395
+ listenerDeps?: React.DependencyList,
7396
+ queriesOrQueriesId?: QueriesOrQueriesId<Schemas>,
7397
+ ) => void;
6451
7398
 
6452
- /**
7399
+ /**
6453
7400
  * The useCreateCheckpoints hook is used to create a Checkpoints object within a
6454
7401
  * React application with convenient memoization.
6455
7402
  *
7403
+ * This has schema-based typing. The following is a simplified representation:
7404
+ *
7405
+ * ```ts override
7406
+ * useCreateCheckpoints(
7407
+ * store: Store,
7408
+ * create: (store: Store) => Checkpoints,
7409
+ * createDeps?: React.DependencyList,
7410
+ * ): Checkpoints;
7411
+ * ```
7412
+ *
6456
7413
  * It is possible to create a Checkpoints object outside of the React app with
6457
7414
  * the regular createCheckpoints function and pass it in, but you may prefer to
6458
7415
  * create it within the app, perhaps inside the top-level component. To defend
@@ -6544,16 +7501,22 @@ export function useResultCellListener(
6544
7501
  * ```
6545
7502
  * @category Checkpoints hooks
6546
7503
  */
6547
- export function useCreateCheckpoints(
6548
- store: Store,
6549
- create: (store: Store) => Checkpoints,
6550
- createDeps?: React.DependencyList,
6551
- ): Checkpoints;
7504
+ useCreateCheckpoints: (
7505
+ store: Store<Schemas>,
7506
+ create: (store: Store<Schemas>) => Checkpoints<Schemas>,
7507
+ createDeps?: React.DependencyList,
7508
+ ) => Checkpoints<Schemas>;
6552
7509
 
6553
- /**
7510
+ /**
6554
7511
  * The useCheckpoints hook is used to get a reference to a Checkpoints object
6555
7512
  * from within a Provider component context.
6556
7513
  *
7514
+ * This has schema-based typing. The following is a simplified representation:
7515
+ *
7516
+ * ```ts override
7517
+ * useCheckpoints(id?: Id): Checkpoints | undefined;
7518
+ * ```
7519
+ *
6557
7520
  * A Provider component is used to wrap part of an application in a context. It
6558
7521
  * can contain a default Checkpoints object (or a set of Checkpoints objects
6559
7522
  * named by Id) that can be easily accessed without having to be passed down as
@@ -6617,13 +7580,21 @@ export function useCreateCheckpoints(
6617
7580
  * ```
6618
7581
  * @category Checkpoints hooks
6619
7582
  */
6620
- export function useCheckpoints(id?: Id): Checkpoints | undefined;
7583
+ useCheckpoints: (id?: Id) => Checkpoints<Schemas> | undefined;
6621
7584
 
6622
- /**
7585
+ /**
6623
7586
  * The useCheckpointIds hook returns an array of the checkpoint Ids being
6624
7587
  * managed by this Checkpoints object, and registers a listener so that any
6625
7588
  * changes to that result will cause a re-render.
6626
7589
  *
7590
+ * This has schema-based typing. The following is a simplified representation:
7591
+ *
7592
+ * ```ts override
7593
+ * useCheckpointIds(
7594
+ * checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
7595
+ * ): CheckpointIds;
7596
+ * ```
7597
+ *
6627
7598
  *
6628
7599
  * A Provider component is used to wrap part of an application in a context, and
6629
7600
  * it can contain a default Checkpoints object or a set of Checkpoints objects
@@ -6716,14 +7687,23 @@ export function useCheckpoints(id?: Id): Checkpoints | undefined;
6716
7687
  * ```
6717
7688
  * @category Checkpoints hooks
6718
7689
  */
6719
- export function useCheckpointIds(
6720
- checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
6721
- ): CheckpointIds;
7690
+ useCheckpointIds: (
7691
+ checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId<Schemas>,
7692
+ ) => CheckpointIds;
6722
7693
 
6723
- /**
7694
+ /**
6724
7695
  * The useCheckpoint hook returns the label for a checkpoint, and registers a
6725
7696
  * listener so that any changes to that result will cause a re-render.
6726
7697
  *
7698
+ * This has schema-based typing. The following is a simplified representation:
7699
+ *
7700
+ * ```ts override
7701
+ * useCheckpoint(
7702
+ * checkpointId: Id,
7703
+ * checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
7704
+ * ): string | undefined;
7705
+ * ```
7706
+ *
6727
7707
  * A Provider component is used to wrap part of an application in a context, and
6728
7708
  * it can contain a default Checkpoints object or a set of Checkpoints objects
6729
7709
  * named by Id. The useCheckpoint hook lets you indicate which Checkpoints
@@ -6809,16 +7789,28 @@ export function useCheckpointIds(
6809
7789
  * ```
6810
7790
  * @category Checkpoints hooks
6811
7791
  */
6812
- export function useCheckpoint(
6813
- checkpointId: Id,
6814
- checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
6815
- ): string | undefined;
7792
+ useCheckpoint: (
7793
+ checkpointId: Id,
7794
+ checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId<Schemas>,
7795
+ ) => string | undefined;
6816
7796
 
6817
- /**
7797
+ /**
6818
7798
  * The useSetCheckpointCallback hook returns a parameterized callback that can
6819
7799
  * be used to record a checkpoint of a Store into a Checkpoints object that can
6820
7800
  * be reverted to in the future.
6821
7801
  *
7802
+ * This has schema-based typing. The following is a simplified representation:
7803
+ *
7804
+ * ```ts override
7805
+ * useSetCheckpointCallback<Parameter>(
7806
+ * getCheckpoint?: (parameter: Parameter) => string,
7807
+ * getCheckpointDeps?: React.DependencyList,
7808
+ * checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
7809
+ * then?: (checkpointId: Id, checkpoints: Checkpoints, label?: string) => void,
7810
+ * thenDeps?: React.DependencyList,
7811
+ * ): ParameterizedCallback<Parameter>;
7812
+ * ```
7813
+ *
6822
7814
  * This hook is useful, for example, when creating an event handler that will
6823
7815
  * set the checkpoint. In this case, the parameter will likely be the event, so
6824
7816
  * that you can use data from it as the checkpoint label.
@@ -6889,19 +7881,31 @@ export function useCheckpoint(
6889
7881
  * ```
6890
7882
  * @category Checkpoints hooks
6891
7883
  */
6892
- export function useSetCheckpointCallback<Parameter>(
6893
- getCheckpoint?: (parameter: Parameter) => string,
6894
- getCheckpointDeps?: React.DependencyList,
6895
- checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
6896
- then?: (checkpointId: Id, checkpoints: Checkpoints, label?: string) => void,
6897
- thenDeps?: React.DependencyList,
6898
- ): ParameterizedCallback<Parameter>;
7884
+ useSetCheckpointCallback: <Parameter>(
7885
+ getCheckpoint?: (parameter: Parameter) => string,
7886
+ getCheckpointDeps?: React.DependencyList,
7887
+ checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId<Schemas>,
7888
+ then?: (
7889
+ checkpointId: Id,
7890
+ checkpoints: Checkpoints<Schemas>,
7891
+ label?: string,
7892
+ ) => void,
7893
+ thenDeps?: React.DependencyList,
7894
+ ) => ParameterizedCallback<Parameter>;
6899
7895
 
6900
- /**
7896
+ /**
6901
7897
  * The useGoBackwardCallback hook returns a callback that moves the state of the
6902
7898
  * underlying Store back to the previous checkpoint, effectively performing an
6903
7899
  * 'undo' on the Store data.
6904
7900
  *
7901
+ * This has schema-based typing. The following is a simplified representation:
7902
+ *
7903
+ * ```ts override
7904
+ * useGoBackwardCallback(
7905
+ * checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
7906
+ * ): Callback;
7907
+ * ```
7908
+ *
6905
7909
  * This hook is useful, for example, when creating an event handler that will go
6906
7910
  * backward to the previous checkpoint - such as when clicking an undo button.
6907
7911
  *
@@ -6941,15 +7945,23 @@ export function useSetCheckpointCallback<Parameter>(
6941
7945
  * ```
6942
7946
  * @category Checkpoints hooks
6943
7947
  */
6944
- export function useGoBackwardCallback(
6945
- checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
6946
- ): Callback;
7948
+ useGoBackwardCallback: (
7949
+ checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId<Schemas>,
7950
+ ) => Callback;
6947
7951
 
6948
- /**
7952
+ /**
6949
7953
  * The useGoForwardCallback hook returns a callback that moves the state of the
6950
7954
  * underlying Store forwards to a future checkpoint, effectively performing an
6951
7955
  * 'redo' on the Store data.
6952
7956
  *
7957
+ * This has schema-based typing. The following is a simplified representation:
7958
+ *
7959
+ * ```ts override
7960
+ * useGoForwardCallback(
7961
+ * checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
7962
+ * ): Callback;
7963
+ * ```
7964
+ *
6953
7965
  * This hook is useful, for example, when creating an event handler that will go
6954
7966
  * forward to the next checkpoint - such as when clicking an redo button.
6955
7967
  *
@@ -6993,15 +8005,27 @@ export function useGoBackwardCallback(
6993
8005
  * ```
6994
8006
  * @category Checkpoints hooks
6995
8007
  */
6996
- export function useGoForwardCallback(
6997
- checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
6998
- ): Callback;
8008
+ useGoForwardCallback: (
8009
+ checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId<Schemas>,
8010
+ ) => Callback;
6999
8011
 
7000
- /**
8012
+ /**
7001
8013
  * The useGoToCallback hook returns a parameterized callback that can be used to
7002
8014
  * move the state of the underlying Store backwards or forwards to a specified
7003
8015
  * checkpoint.
7004
8016
  *
8017
+ * This has schema-based typing. The following is a simplified representation:
8018
+ *
8019
+ * ```ts override
8020
+ * useGoToCallback<Parameter>(
8021
+ * getCheckpointId: (parameter: Parameter) => Id,
8022
+ * getCheckpointIdDeps?: React.DependencyList,
8023
+ * checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
8024
+ * then?: (checkpoints: Checkpoints, checkpointId: Id) => void,
8025
+ * thenDeps?: React.DependencyList,
8026
+ * ): ParameterizedCallback<Parameter>;
8027
+ * ```
8028
+ *
7005
8029
  * This hook is useful, for example, when creating an event handler that will
7006
8030
  * move the checkpoint. In this case, the parameter will likely be the event, so
7007
8031
  * that you can use data from it as the checkpoint Id to move to.
@@ -7069,19 +8093,27 @@ export function useGoForwardCallback(
7069
8093
  * ```
7070
8094
  * @category Checkpoints hooks
7071
8095
  */
7072
- export function useGoToCallback<Parameter>(
7073
- getCheckpointId: (parameter: Parameter) => Id,
7074
- getCheckpointIdDeps?: React.DependencyList,
7075
- checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
7076
- then?: (checkpoints: Checkpoints, checkpointId: Id) => void,
7077
- thenDeps?: React.DependencyList,
7078
- ): ParameterizedCallback<Parameter>;
8096
+ useGoToCallback: <Parameter>(
8097
+ getCheckpointId: (parameter: Parameter) => Id,
8098
+ getCheckpointIdDeps?: React.DependencyList,
8099
+ checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId<Schemas>,
8100
+ then?: (checkpoints: Checkpoints<Schemas>, checkpointId: Id) => void,
8101
+ thenDeps?: React.DependencyList,
8102
+ ) => ParameterizedCallback<Parameter>;
7079
8103
 
7080
- /**
8104
+ /**
7081
8105
  * The useUndoInformation hook returns an UndoOrRedoInformation array that
7082
8106
  * indicates if and how you can move the state of the underlying Store backward
7083
8107
  * to the previous checkpoint.
7084
8108
  *
8109
+ * This has schema-based typing. The following is a simplified representation:
8110
+ *
8111
+ * ```ts override
8112
+ * useUndoInformation(
8113
+ * checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
8114
+ * ): UndoOrRedoInformation;
8115
+ * ```
8116
+ *
7085
8117
  * This hook is useful if you are building an undo button: the information
7086
8118
  * contains whether an undo action is available (to enable the button), the
7087
8119
  * callback to perform the undo action, the current checkpoint Id that will be
@@ -7119,15 +8151,23 @@ export function useGoToCallback<Parameter>(
7119
8151
  * ```
7120
8152
  * @category Checkpoints hooks
7121
8153
  */
7122
- export function useUndoInformation(
7123
- checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
7124
- ): UndoOrRedoInformation;
8154
+ useUndoInformation: (
8155
+ checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId<Schemas>,
8156
+ ) => UndoOrRedoInformation;
7125
8157
 
7126
- /**
8158
+ /**
7127
8159
  * The useRedoInformation hook returns an UndoOrRedoInformation array that
7128
8160
  * indicates if and how you can move the state of the underlying Store forwards
7129
8161
  * to a future checkpoint.
7130
8162
  *
8163
+ * This has schema-based typing. The following is a simplified representation:
8164
+ *
8165
+ * ```ts override
8166
+ * useRedoInformation(
8167
+ * checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
8168
+ * ): UndoOrRedoInformation;
8169
+ * ```
8170
+ *
7131
8171
  * This hook is useful if you are building an redo button: the information
7132
8172
  * contains whether a redo action is available (to enable the button), the
7133
8173
  * callback to perform the redo action, the checkpoint Id that will be redone,
@@ -7166,15 +8206,25 @@ export function useUndoInformation(
7166
8206
  * ```
7167
8207
  * @category Checkpoints hooks
7168
8208
  */
7169
- export function useRedoInformation(
7170
- checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
7171
- ): UndoOrRedoInformation;
8209
+ useRedoInformation: (
8210
+ checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId<Schemas>,
8211
+ ) => UndoOrRedoInformation;
7172
8212
 
7173
- /**
8213
+ /**
7174
8214
  * The useCheckpointIdsListener hook registers a listener function with the
7175
8215
  * Checkpoints object that will be called whenever its set of checkpoints
7176
8216
  * changes.
7177
8217
  *
8218
+ * This has schema-based typing. The following is a simplified representation:
8219
+ *
8220
+ * ```ts override
8221
+ * useCheckpointIdsListener(
8222
+ * listener: CheckpointIdsListener,
8223
+ * listenerDeps?: React.DependencyList,
8224
+ * checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
8225
+ * ): void;
8226
+ * ```
8227
+ *
7178
8228
  * This hook is useful for situations where a component needs to register its
7179
8229
  * own specific listener to do more than simply tracking the value (which is
7180
8230
  * more easily done with the useCheckpointIds hook).
@@ -7229,17 +8279,28 @@ export function useRedoInformation(
7229
8279
  * ```
7230
8280
  * @category Checkpoints hooks
7231
8281
  */
7232
- export function useCheckpointIdsListener(
7233
- listener: CheckpointIdsListener,
7234
- listenerDeps?: React.DependencyList,
7235
- checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
7236
- ): void;
8282
+ useCheckpointIdsListener: (
8283
+ listener: CheckpointIdsListener<Schemas>,
8284
+ listenerDeps?: React.DependencyList,
8285
+ checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId<Schemas>,
8286
+ ) => void;
7237
8287
 
7238
- /**
8288
+ /**
7239
8289
  * The useCheckpointListener hook registers a listener function with the
7240
8290
  * Checkpoints object that will be called whenever the label of a checkpoint
7241
8291
  * changes.
7242
8292
  *
8293
+ * This has schema-based typing. The following is a simplified representation:
8294
+ *
8295
+ * ```ts override
8296
+ * useCheckpointListener(
8297
+ * checkpointId: IdOrNull,
8298
+ * listener: CheckpointListener,
8299
+ * listenerDeps?: React.DependencyList,
8300
+ * checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
8301
+ * ): void;
8302
+ * ```
8303
+ *
7243
8304
  * This hook is useful for situations where a component needs to register its
7244
8305
  * own specific listener to do more than simply tracking the value (which is
7245
8306
  * more easily done with the useCheckpoint hook).
@@ -7300,17 +8361,29 @@ export function useCheckpointIdsListener(
7300
8361
  * ```
7301
8362
  * @category Checkpoints hooks
7302
8363
  */
7303
- export function useCheckpointListener(
7304
- checkpointId: IdOrNull,
7305
- listener: CheckpointListener,
7306
- listenerDeps?: React.DependencyList,
7307
- checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
7308
- ): void;
8364
+ useCheckpointListener: (
8365
+ checkpointId: IdOrNull,
8366
+ listener: CheckpointListener<Schemas>,
8367
+ listenerDeps?: React.DependencyList,
8368
+ checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId<Schemas>,
8369
+ ) => void;
7309
8370
 
7310
- /**
8371
+ /**
7311
8372
  * The useCreatePersister hook is used to create a Persister within a React
7312
8373
  * application along with convenient memoization and callbacks.
7313
8374
  *
8375
+ * This has schema-based typing. The following is a simplified representation:
8376
+ *
8377
+ * ```ts override
8378
+ * useCreatePersister(
8379
+ * store: Store,
8380
+ * create: (store: Store) => Persister,
8381
+ * createDeps?: React.DependencyList,
8382
+ * then?: (persister: Persister) => Promise<void>,
8383
+ * thenDeps?: React.DependencyList,
8384
+ * ): Persister;
8385
+ * ```
8386
+ *
7314
8387
  * It is possible to create a Persister outside of the React app with the
7315
8388
  * regular createPersister function and pass it in, but you may prefer to create
7316
8389
  * it within the app, perhaps inside the top-level component. To defend against
@@ -7435,801 +8508,203 @@ export function useCheckpointListener(
7435
8508
  * ```
7436
8509
  * @category Persister hooks
7437
8510
  */
7438
- export function useCreatePersister(
7439
- store: Store,
7440
- create: (store: Store) => Persister,
7441
- createDeps?: React.DependencyList,
7442
- then?: (persister: Persister) => Promise<void>,
7443
- thenDeps?: React.DependencyList,
7444
- ): Persister;
8511
+ useCreatePersister: (
8512
+ store: Store<Schemas>,
8513
+ create: (store: Store<Schemas>) => Persister<Schemas>,
8514
+ createDeps?: React.DependencyList,
8515
+ then?: (persister: Persister<Schemas>) => Promise<void>,
8516
+ thenDeps?: React.DependencyList,
8517
+ ) => Persister<Schemas>;
7445
8518
 
7446
- /**
8519
+ /**
7447
8520
  * The ExtraProps type represents a set of arbitrary additional props.
7448
8521
  *
7449
8522
  * @category Props
7450
8523
  */
7451
- export type ExtraProps = {[propName: string]: any};
8524
+ ExtraProps: ExtraProps;
7452
8525
 
7453
- /**
8526
+ /**
7454
8527
  * TablesProps props are used for components that refer to all the Tables in a
7455
8528
  * Store, such as the TablesView component.
7456
8529
  *
7457
8530
  * @category Props
7458
8531
  */
7459
- export type TablesProps = {
7460
- /**
7461
- * The Store to be accessed: omit for the default context Store, provide an Id
7462
- * for a named context Store, or provide an explicit reference.
7463
- */
7464
- readonly store?: StoreOrStoreId;
7465
- /**
7466
- * A component for rendering each Table in the Store (to override the default
7467
- * TableView component).
7468
- */
7469
- readonly tableComponent?: ComponentType<TableProps>;
7470
- /**
7471
- * A custom function for generating extra props for each Table component based
7472
- * on its Id.
7473
- */
7474
- readonly getTableComponentProps?: (tableId: Id) => ExtraProps;
7475
- /**
7476
- * A component or string to separate each Table component.
7477
- */
7478
- readonly separator?: ReactElement | string;
7479
- /**
7480
- * Whether the component should also render the Ids of each Table, and its
7481
- * descendent objects, to assist with debugging.
7482
- */
7483
- readonly debugIds?: boolean;
7484
- };
8532
+ TablesProps: TablesProps<Schemas>;
7485
8533
 
7486
- /**
8534
+ /**
7487
8535
  * TableProps props are used for components that refer to a single Table in a
7488
8536
  * Store, such as the TableView component.
7489
8537
  *
7490
8538
  * @category Props
7491
8539
  */
7492
- export type TableProps = {
7493
- /**
7494
- * The Id of the Table in the Store to be rendered.
7495
- */
7496
- readonly tableId: Id;
7497
- /**
7498
- * The Store to be accessed: omit for the default context Store, provide an Id
7499
- * for a named context Store, or provide an explicit reference.
7500
- */
7501
- readonly store?: StoreOrStoreId;
7502
- /**
7503
- * A custom component for rendering each Row in the Table (to override the
7504
- * default RowView component).
7505
- */
7506
- readonly rowComponent?: ComponentType<RowProps>;
7507
- /**
7508
- * A function for generating extra props for each custom Row component based
7509
- * on its Id.
7510
- */
7511
- readonly getRowComponentProps?: (rowId: Id) => ExtraProps;
7512
- /**
7513
- * A component or string to separate each Row component.
7514
- */
7515
- readonly separator?: ReactElement | string;
7516
- /**
7517
- * Whether the component should also render the Id of the Table, and its
7518
- * descendent objects, to assist with debugging.
7519
- */
7520
- readonly debugIds?: boolean;
7521
- };
8540
+ TableProps: TableProps<Schemas>;
7522
8541
 
7523
- /**
8542
+ /**
7524
8543
  * SortedTableProps props are used for components that refer to a single sorted
7525
8544
  * Table in a Store, such as the SortedTableView component.
7526
8545
  *
7527
8546
  * @category Props
7528
8547
  * @since v2.0.0
7529
8548
  */
7530
- export type SortedTableProps = {
7531
- /**
7532
- * The Id of the Table in the Store to be rendered.
7533
- */
7534
- readonly tableId: Id;
7535
- /**
7536
- * The Id of the Cell whose values are used for the sorting. If omitted, the
7537
- * view will sort the Row Id itself.
7538
- */
7539
- readonly cellId?: Id;
7540
- /**
7541
- * Whether the sorting should be in descending order.
7542
- */
7543
- readonly descending?: boolean;
7544
- /**
7545
- * The number of Row Ids to skip for pagination purposes.
7546
- */
7547
- readonly offset?: number;
7548
- /**
7549
- * The maximum number of Row Ids to return.
7550
- */
7551
- readonly limit?: number;
7552
- /**
7553
- * The Store to be accessed: omit for the default context Store, provide an Id
7554
- * for a named context Store, or provide an explicit reference.
7555
- */
7556
- readonly store?: StoreOrStoreId;
7557
- /**
7558
- * A custom component for rendering each Row in the Table (to override the
7559
- * default RowView component).
7560
- */
7561
- readonly rowComponent?: ComponentType<RowProps>;
7562
- /**
7563
- * A function for generating extra props for each custom Row component based
7564
- * on its Id.
7565
- */
7566
- readonly getRowComponentProps?: (rowId: Id) => ExtraProps;
7567
- /**
7568
- * A component or string to separate each Row component.
7569
- */
7570
- readonly separator?: ReactElement | string;
7571
- /**
7572
- * Whether the component should also render the Id of the Table, and its
7573
- * descendent objects, to assist with debugging.
7574
- */
7575
- readonly debugIds?: boolean;
7576
- };
8549
+ SortedTableProps: SortedTableProps<Schemas>;
7577
8550
 
7578
- /**
8551
+ /**
7579
8552
  * RowProps props are used for components that refer to a single Row in a Table,
7580
8553
  * such as the RowView component.
7581
8554
  *
7582
8555
  * @category Props
7583
8556
  */
7584
- export type RowProps = {
7585
- /**
7586
- * The Id of the Table in the Store.
7587
- */
7588
- readonly tableId: Id;
7589
- /**
7590
- * The Id of the Row in the Table to be rendered.
7591
- */
7592
- readonly rowId: Id;
7593
- /**
7594
- * The Store to be accessed: omit for the default context Store, provide an Id
7595
- * for a named context Store, or provide an explicit reference.
7596
- */
7597
- readonly store?: StoreOrStoreId;
7598
- /**
7599
- * A custom component for rendering each Cell in the Row (to override the
7600
- * default CellView component).
7601
- */
7602
- readonly cellComponent?: ComponentType<CellProps>;
7603
- /**
7604
- * A function for generating extra props for each custom Cell component based
7605
- * on its Id.
7606
- */
7607
- readonly getCellComponentProps?: (cellId: Id) => ExtraProps;
7608
- /**
7609
- * A component or string to separate each Cell component.
7610
- */
7611
- readonly separator?: ReactElement | string;
7612
- /**
7613
- * Whether the component should also render the Id of the Row, and its
7614
- * descendent objects, to assist with debugging.
7615
- */
7616
- readonly debugIds?: boolean;
7617
- };
8557
+ RowProps: RowProps<Schemas>;
7618
8558
 
7619
- /**
8559
+ /**
7620
8560
  * CellProps props are used for components that refer to a single Cell in a Row,
7621
8561
  * such as the CellView component.
7622
8562
  *
7623
8563
  * @category Props
7624
8564
  */
7625
- export type CellProps = {
7626
- /**
7627
- * The Id of the Table in the Store.
7628
- */
7629
- readonly tableId: Id;
7630
- /**
7631
- * The Id of the Row in the Table.
7632
- */
7633
- readonly rowId: Id;
7634
- /**
7635
- * The Id of the Cell in the Row to be rendered.
7636
- */
7637
- readonly cellId: Id;
7638
- /**
7639
- * The Store to be accessed: omit for the default context Store, provide an Id
7640
- * for a named context Store, or provide an explicit reference.
7641
- */
7642
- readonly store?: StoreOrStoreId;
7643
- /**
7644
- * Whether the component should also render the Id of the Cell to assist with
7645
- * debugging.
7646
- */
7647
- readonly debugIds?: boolean;
7648
- };
8565
+ CellProps: CellProps<Schemas>;
7649
8566
 
7650
- /**
8567
+ /**
7651
8568
  * ValuesProps props are used for components that refer to all the Values in a
7652
8569
  * Store, such as the ValuesView component.
7653
8570
  *
7654
8571
  * @category Props
7655
8572
  * @since v3.0.0
7656
8573
  */
7657
- export type ValuesProps = {
7658
- /**
7659
- * The Store to be accessed: omit for the default context Store, provide an Id
7660
- * for a named context Store, or provide an explicit reference.
7661
- */
7662
- readonly store?: StoreOrStoreId;
7663
- /**
7664
- * A custom component for rendering each Value in the Store (to override the
7665
- * default ValueView component).
7666
- */
7667
- readonly valueComponent?: ComponentType<ValueProps>;
7668
- /**
7669
- * A function for generating extra props for each custom Value component based
7670
- * on its Id.
7671
- */
7672
- readonly getValueComponentProps?: (valueId: Id) => ExtraProps;
7673
- /**
7674
- * A component or string to separate each Value component.
7675
- */
7676
- readonly separator?: ReactElement | string;
7677
- /**
7678
- * Whether the component should also render the Ids of each Value to assist
7679
- * with debugging.
7680
- */
7681
- readonly debugIds?: boolean;
7682
- };
8574
+ ValuesProps: ValuesProps<Schemas>;
7683
8575
 
7684
- /**
8576
+ /**
7685
8577
  * ValueProps props are used for components that refer to a single Value in a
7686
8578
  * Row, such as the ValueView component.
7687
8579
  *
7688
8580
  * @category Props
7689
8581
  * @since v3.0.0
7690
8582
  */
7691
- export type ValueProps = {
7692
- /**
7693
- * The Id of the Value in the Row to be rendered.
7694
- */
7695
- readonly valueId: Id;
7696
- /**
7697
- * The Store to be accessed: omit for the default context Store, provide an Id
7698
- * for a named context Store, or provide an explicit reference.
7699
- */
7700
- readonly store?: StoreOrStoreId;
7701
- /**
7702
- * Whether the component should also render the Id of the Value to assist with
7703
- * debugging.
7704
- */
7705
- readonly debugIds?: boolean;
7706
- };
8583
+ ValueProps: ValueProps<Schemas>;
7707
8584
 
7708
- /**
8585
+ /**
7709
8586
  * MetricProps props are used for components that refer to a single Metric in a
7710
8587
  * Metrics object, such as the MetricView component.
7711
8588
  *
7712
8589
  * @category Props
7713
8590
  */
7714
- export type MetricProps = {
7715
- /**
7716
- * The Id of the Metric in the Metrics object to be rendered.
7717
- */
7718
- readonly metricId: Id;
7719
- /**
7720
- * The Metrics object to be accessed: omit for the default context Metrics
7721
- * object, provide an Id for a named context Metrics object, or provide an
7722
- * explicit reference.
7723
- */
7724
- readonly metrics?: MetricsOrMetricsId;
7725
- /**
7726
- * Whether the component should also render the Id of the Metric to assist
7727
- * with debugging.
7728
- */
7729
- readonly debugIds?: boolean;
7730
- };
8591
+ MetricProps: MetricProps<Schemas>;
7731
8592
 
7732
- /**
8593
+ /**
7733
8594
  * IndexProps props are used for components that refer to a single Index in an
7734
8595
  * Indexes object, such as the IndexView component.
7735
8596
  *
7736
8597
  * @category Props
7737
8598
  */
7738
- export type IndexProps = {
7739
- /**
7740
- * The Id of the Index in the Indexes object to be rendered.
7741
- */
7742
- readonly indexId: Id;
7743
- /**
7744
- * The Indexes object to be accessed: omit for the default context Indexes
7745
- * object, provide an Id for a named context Indexes object, or provide an
7746
- * explicit reference.
7747
- */
7748
- readonly indexes?: IndexesOrIndexesId;
7749
- /**
7750
- * A component for rendering each Slice in the Index.
7751
- */
7752
- readonly sliceComponent?: ComponentType<SliceProps>;
7753
- /**
7754
- * A function for generating extra props for each Slice component based on its
7755
- * Id.
7756
- */
7757
- readonly getSliceComponentProps?: (sliceId: Id) => ExtraProps;
7758
- /**
7759
- * A component or string to separate each Slice component.
7760
- */
7761
- readonly separator?: ReactElement | string;
7762
- /**
7763
- * Whether the component should also render the Id of the Index, and its
7764
- * descendent objects, to assist with debugging.
7765
- */
7766
- readonly debugIds?: boolean;
7767
- };
8599
+ IndexProps: IndexProps<Schemas>;
7768
8600
 
7769
- /**
7770
- * IndexProps props are used for components that refer to a single Slice in an
8601
+ /**
8602
+ * SliceProps props are used for components that refer to a single Slice in an
7771
8603
  * Index object, such as the SliceView component.
7772
8604
  *
7773
8605
  * @category Props
7774
8606
  */
7775
- export type SliceProps = {
7776
- /**
7777
- * The Id of the Index in the Indexes object.
7778
- */
7779
- readonly indexId: Id;
7780
- /**
7781
- * The Id of the Slice in the Index to be rendered.
7782
- */
7783
- readonly sliceId: Id;
7784
- /**
7785
- * The Indexes object to be accessed: omit for the default context Indexes
7786
- * object, provide an Id for a named context Indexes object, or provide an
7787
- * explicit reference.
7788
- */
7789
- readonly indexes?: IndexesOrIndexesId;
7790
- /**
7791
- * A component for rendering each Row in the Index.
7792
- */
7793
- readonly rowComponent?: ComponentType<RowProps>;
7794
- /**
7795
- * A function for generating extra props for each Row component based on its
7796
- * Id.
7797
- */
7798
- readonly getRowComponentProps?: (rowId: Id) => ExtraProps;
7799
- /**
7800
- * A component or string to separate each Row component.
7801
- */
7802
- readonly separator?: ReactElement | string;
7803
- /**
7804
- * Whether the component should also render the Id of the Slice, and its
7805
- * descendent objects, to assist with debugging.
7806
- */
7807
- readonly debugIds?: boolean;
7808
- };
8607
+ SliceProps: SliceProps<Schemas>;
7809
8608
 
7810
- /**
8609
+ /**
7811
8610
  * RemoteRowProps props are used for components that refer to a single
7812
8611
  * Relationship in a Relationships object, and where you want to render a remote
7813
8612
  * Row based on a local Row, such as in the RemoteRowView component.
7814
8613
  *
7815
8614
  * @category Props
7816
8615
  */
7817
- export type RemoteRowProps = {
7818
- /**
7819
- * The Id of the Relationship in the Relationships object.
7820
- */
7821
- readonly relationshipId: Id;
7822
- /**
7823
- * The Id of the local Row for which to render the remote Row.
7824
- */
7825
- readonly localRowId: Id;
7826
- /**
7827
- * The Relationships object to be accessed: omit for the default context
7828
- * Relationships object, provide an Id for a named context Relationships
7829
- * object, or provide an explicit reference.
7830
- */
7831
- readonly relationships?: RelationshipsOrRelationshipsId;
7832
- /**
7833
- * A component for rendering each (remote, local, or linked) Row in the
7834
- * Relationship.
7835
- */
7836
- readonly rowComponent?: ComponentType<RowProps>;
7837
- /**
7838
- * A function for generating extra props for each Row component based on its
7839
- * Id.
7840
- */
7841
- readonly getRowComponentProps?: (rowId: Id) => ExtraProps;
7842
- /**
7843
- * Whether the component should also render the Id of the Row in the
7844
- * Relationship, and its descendent objects, to assist with debugging.
7845
- */
7846
- readonly debugIds?: boolean;
7847
- };
8616
+ RemoteRowProps: RemoteRowProps<Schemas>;
7848
8617
 
7849
- /**
8618
+ /**
7850
8619
  * LocalRowsProps props are used for components that refer to a single
7851
8620
  * Relationship in a Relationships object, and where you want to render local
7852
8621
  * Rows based on a remote Row, such as the LocalRowsView component.
7853
8622
  *
7854
8623
  * @category Props
7855
8624
  */
7856
- export type LocalRowsProps = {
7857
- /**
7858
- * The Id of the Relationship in the Relationships object.
7859
- */
7860
- readonly relationshipId: Id;
7861
- /**
7862
- * The Id of the remote Row for which to render the local Rows.
7863
- */
7864
- readonly remoteRowId: Id;
7865
- /**
7866
- * The Relationships object to be accessed: omit for the default context
7867
- * Relationships object, provide an Id for a named context Relationships
7868
- * object, or provide an explicit reference.
7869
- */
7870
- readonly relationships?: RelationshipsOrRelationshipsId;
7871
- /**
7872
- * A component for rendering each (remote, local, or linked) Row in the
7873
- * Relationship.
7874
- */
7875
- readonly rowComponent?: ComponentType<RowProps>;
7876
- /**
7877
- * A function for generating extra props for each Row component based on its
7878
- * Id.
7879
- */
7880
- readonly getRowComponentProps?: (rowId: Id) => ExtraProps;
7881
- /**
7882
- * A component or string to separate each Row component.
7883
- */
7884
- readonly separator?: ReactElement | string;
7885
- /**
7886
- * Whether the component should also render the Id of the Row in the
7887
- * Relationship, and its descendent objects, to assist with debugging.
7888
- */
7889
- readonly debugIds?: boolean;
7890
- };
8625
+ LocalRowsProps: LocalRowsProps<Schemas>;
7891
8626
 
7892
- /**
8627
+ /**
7893
8628
  * LinkedRowsProps props are used for components that refer to a single
7894
8629
  * Relationship in a Relationships object, and where you want to render a linked
7895
8630
  * list of Rows starting from a first Row, such as the LinkedRowsView component.
7896
8631
  *
7897
8632
  * @category Props
7898
8633
  */
7899
- export type LinkedRowsProps = {
7900
- /**
7901
- * The Id of the Relationship in the Relationships object.
7902
- */
7903
- readonly relationshipId: Id;
7904
- /**
7905
- * The Id of the first Row in the linked list Relationship.
7906
- */
7907
- readonly firstRowId: Id;
7908
- /**
7909
- * The Relationships object to be accessed: omit for the default context
7910
- * Relationships object, provide an Id for a named context Relationships
7911
- * object, or provide an explicit reference.
7912
- */
7913
- readonly relationships?: RelationshipsOrRelationshipsId;
7914
- /**
7915
- * A component for rendering each (remote, local, or linked) Row in the
7916
- * Relationship.
7917
- */
7918
- readonly rowComponent?: ComponentType<RowProps>;
7919
- /**
7920
- * A function for generating extra props for each Row component based on its
7921
- * Id.
7922
- */
7923
- readonly getRowComponentProps?: (rowId: Id) => ExtraProps;
7924
- /**
7925
- * A component or string to separate each Row component.
7926
- */
7927
- readonly separator?: ReactElement | string;
7928
- /**
7929
- * Whether the component should also render the Id of the Row in the
7930
- * Relationship, and its descendent objects, to assist with debugging.
7931
- */
7932
- readonly debugIds?: boolean;
7933
- };
8634
+ LinkedRowsProps: LinkedRowsProps<Schemas>;
7934
8635
 
7935
- /**
8636
+ /**
7936
8637
  * ResultTableProps props are used for components that refer to a single query
7937
8638
  * result Table, such as the ResultTableView component.
7938
8639
  *
7939
8640
  * @category Props
7940
8641
  * @since v2.0.0
7941
8642
  */
7942
- export type ResultTableProps = {
7943
- /**
7944
- * The Id of the query in the Queries object for which the result Table will
7945
- * be rendered.
7946
- */
7947
- readonly queryId: Id;
7948
- /**
7949
- * The Queries object to be accessed: omit for the default context Queries
7950
- * object, provide an Id for a named context Queries object, or provide an
7951
- * explicit reference.
7952
- */
7953
- readonly queries?: QueriesOrQueriesId;
7954
- /**
7955
- * A custom component for rendering each Row in the Table (to override the
7956
- * default ResultRowView component).
7957
- */
7958
- readonly resultRowComponent?: ComponentType<ResultRowProps>;
7959
- /**
7960
- * A function for generating extra props for each custom Row component based
7961
- * on its Id.
7962
- */
7963
- readonly getResultRowComponentProps?: (rowId: Id) => ExtraProps;
7964
- /**
7965
- * A component or string to separate each Row component.
7966
- */
7967
- readonly separator?: ReactElement | string;
7968
- /**
7969
- * Whether the component should also render the Id of the query, and its
7970
- * descendent objects, to assist with debugging.
7971
- */
7972
- readonly debugIds?: boolean;
7973
- };
8643
+ ResultTableProps: ResultTableProps<Schemas>;
7974
8644
 
7975
- /**
8645
+ /**
7976
8646
  * ResultSortedTableProps props are used for components that refer to a single
7977
8647
  * sorted query result Table, such as the ResultSortedTableView component.
7978
8648
  *
7979
8649
  * @category Props
7980
8650
  * @since v2.0.0
7981
8651
  */
7982
- export type ResultSortedTableProps = {
7983
- /**
7984
- * The Id of the query in the Queries object for which the sorted result Table
7985
- * will be rendered.
7986
- */
7987
- readonly queryId: Id;
7988
- /**
7989
- * The Id of the Cell whose values are used for the sorting. If omitted, the
7990
- * view will sort the Row Id itself.
7991
- */
7992
- readonly cellId?: Id;
7993
- /**
7994
- * Whether the sorting should be in descending order.
7995
- */
7996
- readonly descending?: boolean;
7997
- /**
7998
- * The number of Row Ids to skip for pagination purposes.
7999
- */
8000
- readonly offset?: number;
8001
- /**
8002
- * The maximum number of Row Ids to return.
8003
- */
8004
- readonly limit?: number;
8005
- /**
8006
- * The Queries object to be accessed: omit for the default context Queries
8007
- * object, provide an Id for a named context Queries object, or provide an
8008
- * explicit reference.
8009
- */
8010
- readonly queries?: QueriesOrQueriesId;
8011
- /**
8012
- * A custom component for rendering each Row in the Table (to override the
8013
- * default ResultRowView component).
8014
- */
8015
- readonly resultRowComponent?: ComponentType<ResultRowProps>;
8016
- /**
8017
- * A function for generating extra props for each custom Row component based
8018
- * on its Id.
8019
- */
8020
- readonly getResultRowComponentProps?: (rowId: Id) => ExtraProps;
8021
- /**
8022
- * A component or string to separate each Row component.
8023
- */
8024
- readonly separator?: ReactElement | string;
8025
- /**
8026
- * Whether the component should also render the Id of the query, and its
8027
- * descendent objects, to assist with debugging.
8028
- */
8029
- readonly debugIds?: boolean;
8030
- };
8652
+ ResultSortedTableProps: ResultSortedTableProps<Schemas>;
8031
8653
 
8032
- /**
8654
+ /**
8033
8655
  * ResultRowProps props are used for components that refer to a single Row in a
8034
8656
  * query result Table, such as the ResultRowView component.
8035
8657
  *
8036
8658
  * @category Props
8037
8659
  * @since v2.0.0
8038
8660
  */
8039
- export type ResultRowProps = {
8040
- /**
8041
- * The Id of the query in the Queries object for which the result Table will
8042
- * be rendered.
8043
- */
8044
- readonly queryId: Id;
8045
- /**
8046
- * The Id of the Row in the result Table to be rendered.
8047
- */
8048
- readonly rowId: Id;
8049
- /**
8050
- * The Queries object to be accessed: omit for the default context Queries
8051
- * object, provide an Id for a named context Queries object, or provide an
8052
- * explicit reference.
8053
- */
8054
- readonly queries?: QueriesOrQueriesId;
8055
- /**
8056
- * A custom component for rendering each Cell in the Row (to override the
8057
- * default CellView component).
8058
- */
8059
- readonly resultCellComponent?: ComponentType<ResultCellProps>;
8060
- /**
8061
- * A function for generating extra props for each custom Cell component based
8062
- * on its Id.
8063
- */
8064
- readonly getResultCellComponentProps?: (cellId: Id) => ExtraProps;
8065
- /**
8066
- * A component or string to separate each Cell component.
8067
- */
8068
- readonly separator?: ReactElement | string;
8069
- /**
8070
- * Whether the component should also render the Id of the Row, and its
8071
- * descendent objects, to assist with debugging.
8072
- */
8073
- readonly debugIds?: boolean;
8074
- };
8661
+ ResultRowProps: ResultRowProps<Schemas>;
8075
8662
 
8076
- /**
8663
+ /**
8077
8664
  * ResultRowProps props are used for components that refer to a single Cell in a
8078
8665
  * Row of a result Table, such as the ResultCellView component.
8079
8666
  *
8080
8667
  * @category Props
8081
8668
  * @since v2.0.0
8082
8669
  */
8083
- export type ResultCellProps = {
8084
- /**
8085
- * The Id of the query in the Queries object for which the result Table will
8086
- * be rendered.
8087
- */
8088
- readonly queryId: Id;
8089
- /**
8090
- * The Id of the Row in the Table.
8091
- */
8092
- readonly rowId: Id;
8093
- /**
8094
- * The Id of the Cell in the Row to be rendered.
8095
- */
8096
- readonly cellId: Id;
8097
- /**
8098
- * The Queries object to be accessed: omit for the default context Queries
8099
- * object, provide an Id for a named context Queries object, or provide an
8100
- * explicit reference.
8101
- */
8102
- readonly queries?: QueriesOrQueriesId;
8103
- /**
8104
- * Whether the component should also render the Id of the Cell to assist with
8105
- * debugging.
8106
- */
8107
- readonly debugIds?: boolean;
8108
- };
8670
+ ResultCellProps: ResultCellProps<Schemas>;
8109
8671
 
8110
- /**
8672
+ /**
8111
8673
  * CheckpointProps props are used for components that refer to a single
8112
8674
  * checkpoint in a Checkpoints object, such as the CheckpointView component.
8113
8675
  *
8114
8676
  * @category Props
8115
8677
  */
8116
- export type CheckpointProps = {
8117
- /**
8118
- * The Id of the checkpoint in the Checkpoints object.
8119
- */
8120
- readonly checkpointId: Id;
8121
- /**
8122
- * The Checkpoints object to be accessed: omit for the default context
8123
- * Checkpoints object, provide an Id for a named context Checkpoints object,
8124
- * or provide an explicit reference.
8125
- */
8126
- readonly checkpoints?: CheckpointsOrCheckpointsId;
8127
- /**
8128
- * Whether the component should also render the Id of the checkpoint to assist
8129
- * with debugging.
8130
- */
8131
- readonly debugIds?: boolean;
8132
- };
8678
+ CheckpointProps: CheckpointProps<Schemas>;
8133
8679
 
8134
- /**
8680
+ /**
8135
8681
  * BackwardCheckpointsProps props are used for components that refer to a list
8136
8682
  * of previous checkpoints in a Checkpoints object, such as the
8137
8683
  * BackwardCheckpointsView component.
8138
8684
  *
8139
8685
  * @category Props
8140
8686
  */
8141
- export type BackwardCheckpointsProps = {
8142
- /**
8143
- * The Checkpoints object to be accessed: omit for the default context
8144
- * Checkpoints object, provide an Id for a named context Checkpoints object,
8145
- * or provide an explicit reference.
8146
- */
8147
- readonly checkpoints?: CheckpointsOrCheckpointsId;
8148
- /**
8149
- * A component for rendering each checkpoint in the Checkpoints object.
8150
- */
8151
- readonly checkpointComponent?: ComponentType<CheckpointProps>;
8152
- /**
8153
- * A function for generating extra props for each checkpoint component based
8154
- * on its Id.
8155
- */
8156
- readonly getCheckpointComponentProps?: (checkpointId: Id) => ExtraProps;
8157
- /**
8158
- * A component or string to separate each Checkpoint component.
8159
- */
8160
- readonly separator?: ReactElement | string;
8161
- /**
8162
- * Whether the component should also render the Ids of the checkpoints to
8163
- * assist with debugging.
8164
- */
8165
- readonly debugIds?: boolean;
8166
- };
8687
+ BackwardCheckpointsProps: BackwardCheckpointsProps<Schemas>;
8167
8688
 
8168
- /**
8689
+ /**
8169
8690
  * CurrentCheckpointsProps props are used for components that refer to the
8170
8691
  * current checkpoints in a Checkpoints object, such as the
8171
8692
  * BackwardCheckpointsView component.
8172
8693
  *
8173
8694
  * @category Props
8174
8695
  */
8175
- export type CurrentCheckpointProps = {
8176
- /**
8177
- * The Checkpoints object to be accessed: omit for the default context
8178
- * Checkpoints object, provide an Id for a named context Checkpoints object,
8179
- * or provide an explicit reference.
8180
- */
8181
- readonly checkpoints?: CheckpointsOrCheckpointsId;
8182
- /**
8183
- * A component for rendering each checkpoint in the Checkpoints object.
8184
- */
8185
- readonly checkpointComponent?: ComponentType<CheckpointProps>;
8186
- /**
8187
- * A function for generating extra props for each checkpoint component based
8188
- * on its Id.
8189
- */
8190
- readonly getCheckpointComponentProps?: (checkpointId: Id) => ExtraProps;
8191
- /**
8192
- * Whether the component should also render the Ids of the checkpoints to
8193
- * assist with debugging.
8194
- */
8195
- readonly debugIds?: boolean;
8196
- };
8696
+ CurrentCheckpointProps: CurrentCheckpointProps<Schemas>;
8197
8697
 
8198
- /**
8698
+ /**
8199
8699
  * ForwardCheckpointsProps props are used for components that refer to a list of
8200
8700
  * future checkpoints in a Checkpoints object, such as the
8201
8701
  * ForwardCheckpointsView component.
8202
8702
  *
8203
8703
  * @category Props
8204
8704
  */
8205
- export type ForwardCheckpointsProps = {
8206
- /**
8207
- * The Checkpoints object to be accessed: omit for the default context
8208
- * Checkpoints object, provide an Id for a named context Checkpoints object,
8209
- * or provide an explicit reference.
8210
- */
8211
- readonly checkpoints?: CheckpointsOrCheckpointsId;
8212
- /**
8213
- * A component for rendering each checkpoint in the Checkpoints object.
8214
- */
8215
- readonly checkpointComponent?: ComponentType<CheckpointProps>;
8216
- /**
8217
- * A function for generating extra props for each checkpoint component based
8218
- * on its Id.
8219
- */
8220
- readonly getCheckpointComponentProps?: (checkpointId: Id) => ExtraProps;
8221
- /**
8222
- * A component or string to separate each Checkpoint component.
8223
- */
8224
- readonly separator?: ReactElement | string;
8225
- /**
8226
- * Whether the component should also render the Ids of the checkpoints to
8227
- * assist with debugging.
8228
- */
8229
- readonly debugIds?: boolean;
8230
- };
8705
+ ForwardCheckpointsProps: ForwardCheckpointsProps<Schemas>;
8231
8706
 
8232
- /**
8707
+ /**
8233
8708
  * ProviderProps props are used with the Provider component, so that Store
8234
8709
  * Metrics, Indexes, Relationships, Queries, and Checkpoints objects can be
8235
8710
  * passed into the context of an application and used throughout.
@@ -8240,81 +8715,28 @@ export type ForwardCheckpointsProps = {
8240
8715
  *
8241
8716
  * @category Props
8242
8717
  */
8243
- export type ProviderProps = {
8244
- /**
8245
- * A default single Store object that will be available within the Provider
8246
- * context.
8247
- */
8248
- readonly store?: Store;
8249
- /**
8250
- * An object containing multiple Store objects that will be available within
8251
- * the Provider context by their Id.
8252
- */
8253
- readonly storesById?: {[storeId: Id]: Store};
8254
- /**
8255
- * A default single Metrics object that will be available within the Provider
8256
- * context.
8257
- */
8258
- readonly metrics?: Metrics;
8259
- /**
8260
- * An object containing multiple Metrics objects that will be available within
8261
- * the Provider context by their Id.
8262
- */
8263
- readonly metricsById?: {[metricsId: Id]: Metrics};
8264
- /**
8265
- * A default single Indexes object that will be available within the Provider
8266
- * context.
8267
- */
8268
- readonly indexes?: Indexes;
8269
- /**
8270
- * An object containing multiple Indexes objects that will be available within
8271
- * the Provider context by their Id.
8272
- */
8273
- readonly indexesById?: {[indexesId: Id]: Indexes};
8274
- /**
8275
- * A default single Relationships object that will be available within the
8276
- * Provider context.
8277
- */
8278
- readonly relationships?: Relationships;
8279
- /**
8280
- * An object containing multiple Relationships objects that will be available
8281
- * within the Provider context by their Id.
8282
- */
8283
- readonly relationshipsById?: {[relationshipsId: Id]: Relationships};
8284
- /**
8285
- * A default single Queries object that will be available within the Provider
8286
- * context, since v2.0.0.
8287
- */
8288
- readonly queries?: Queries;
8289
- /**
8290
- * An object containing multiple Queries objects that will be available within
8291
- * the Provider context by their Id, since v2.0.0.
8292
- */
8293
- readonly queriesById?: {[queriesId: Id]: Queries};
8294
- /**
8295
- * A default single Checkpoints object that will be available within the
8296
- * Provider context.
8297
- */
8298
- readonly checkpoints?: Checkpoints;
8299
- /**
8300
- * An object containing multiple Checkpoints objects that will be available
8301
- * within the Provider context by their Id.
8302
- */
8303
- readonly checkpointsById?: {[checkpointsId: Id]: Checkpoints};
8304
- };
8718
+ ProviderProps: ProviderProps<Schemas>;
8305
8719
 
8306
- /**
8720
+ /**
8307
8721
  * ComponentReturnType is a simple alias for what a React component can return:
8308
8722
  * either a ReactElement, or `null` for an empty component.
8309
8723
  *
8310
8724
  * @category Component
8311
8725
  */
8312
- export type ComponentReturnType = ReactElement<any, any> | null;
8726
+ ComponentReturnType: ReactElement<any, any> | null;
8313
8727
 
8314
- /**
8728
+ /**
8315
8729
  * The Provider component is used to wrap part of an application in a context
8316
8730
  * that provides default objects to be used by hooks and components within.
8317
8731
  *
8732
+ * This has schema-based typing. The following is a simplified representation:
8733
+ *
8734
+ * ```ts override
8735
+ * Provider(
8736
+ * props: ProviderProps & {children: React.ReactNode},
8737
+ * ): ComponentReturnType;
8738
+ * ```
8739
+ *
8318
8740
  * Store, Metrics, Indexes, Relationships, Queries, and Checkpoints objects can
8319
8741
  * be passed into the context of an application and used throughout. One of each
8320
8742
  * type of object can be provided as a default within the context. Additionally,
@@ -8407,15 +8829,21 @@ export type ComponentReturnType = ReactElement<any, any> | null;
8407
8829
  * ```
8408
8830
  * @category Context components
8409
8831
  */
8410
- export function Provider(
8411
- props: ProviderProps & {children: React.ReactNode},
8412
- ): ComponentReturnType;
8832
+ Provider: (
8833
+ props: ProviderProps<Schemas> & {children: React.ReactNode},
8834
+ ) => ComponentReturnType;
8413
8835
 
8414
- /**
8836
+ /**
8415
8837
  * The CellView component renders the value of a single Cell in a given Row, in
8416
8838
  * a given Table, and registers a listener so that any changes to that result
8417
8839
  * will cause a re-render.
8418
8840
  *
8841
+ * This has schema-based typing. The following is a simplified representation:
8842
+ *
8843
+ * ```ts override
8844
+ * CellView(props: CellProps): ComponentReturnType;
8845
+ * ```
8846
+ *
8419
8847
  * The component's props identify which Cell to render based on Table Id, Row
8420
8848
  * Id, Cell Id, and Store (which is either the default context Store, a named
8421
8849
  * context Store, or an explicit reference).
@@ -8500,13 +8928,19 @@ export function Provider(
8500
8928
  * ```
8501
8929
  * @category Store components
8502
8930
  */
8503
- export function CellView(props: CellProps): ComponentReturnType;
8931
+ CellView: (props: CellProps<Schemas>) => ComponentReturnType;
8504
8932
 
8505
- /**
8933
+ /**
8506
8934
  * The RowView component renders the contents of a single Row in a given Table,
8507
8935
  * and registers a listener so that any changes to that result will cause a
8508
8936
  * re-render.
8509
8937
  *
8938
+ * This has schema-based typing. The following is a simplified representation:
8939
+ *
8940
+ * ```ts override
8941
+ * RowView(props: RowProps): ComponentReturnType;
8942
+ * ```
8943
+ *
8510
8944
  * The component's props identify which Row to render based on Table Id, Row Id,
8511
8945
  * and Store (which is either the default context Store, a named context Store,
8512
8946
  * or an explicit reference).
@@ -8614,13 +9048,19 @@ export function CellView(props: CellProps): ComponentReturnType;
8614
9048
  * ```
8615
9049
  * @category Store components
8616
9050
  */
8617
- export function RowView(props: RowProps): ComponentReturnType;
9051
+ RowView: (props: RowProps<Schemas>) => ComponentReturnType;
8618
9052
 
8619
- /**
9053
+ /**
8620
9054
  * The SortedTableView component renders the contents of a single sorted Table
8621
9055
  * in a Store, and registers a listener so that any changes to that result will
8622
9056
  * cause a re-render.
8623
9057
  *
9058
+ * This has schema-based typing. The following is a simplified representation:
9059
+ *
9060
+ * ```ts override
9061
+ * SortedTableView(props: SortedTableProps): ComponentReturnType;
9062
+ * ```
9063
+ *
8624
9064
  * The component's props identify which Table to render based on Table Id, and
8625
9065
  * Store (which is either the default context Store, a named context Store, or
8626
9066
  * by explicit reference). It also takes a Cell Id to sort by and a boolean to
@@ -8744,13 +9184,19 @@ export function RowView(props: RowProps): ComponentReturnType;
8744
9184
  * @category Store components
8745
9185
  * @since v2.0.0
8746
9186
  */
8747
- export function SortedTableView(props: SortedTableProps): ComponentReturnType;
9187
+ SortedTableView: (props: SortedTableProps<Schemas>) => ComponentReturnType;
8748
9188
 
8749
- /**
9189
+ /**
8750
9190
  * The TableView component renders the contents of a single Table in a Store,
8751
9191
  * and registers a listener so that any changes to that result will cause a
8752
9192
  * re-render.
8753
9193
  *
9194
+ * This has schema-based typing. The following is a simplified representation:
9195
+ *
9196
+ * ```ts override
9197
+ * TableView(props: TableProps): ComponentReturnType;
9198
+ * ```
9199
+ *
8754
9200
  * The component's props identify which Table to render based on Table Id, and
8755
9201
  * Store (which is either the default context Store, a named context Store, or
8756
9202
  * by explicit reference).
@@ -8856,13 +9302,19 @@ export function SortedTableView(props: SortedTableProps): ComponentReturnType;
8856
9302
  * ```
8857
9303
  * @category Store components
8858
9304
  */
8859
- export function TableView(props: TableProps): ComponentReturnType;
9305
+ TableView: (props: TableProps<Schemas>) => ComponentReturnType;
8860
9306
 
8861
- /**
9307
+ /**
8862
9308
  * The TablesView component renders the tabular contents of a Store, and
8863
9309
  * registers a listener so that any changes to that result will cause a
8864
9310
  * re-render.
8865
9311
  *
9312
+ * This has schema-based typing. The following is a simplified representation:
9313
+ *
9314
+ * ```ts override
9315
+ * TablesView(props: TablesProps): ComponentReturnType;
9316
+ * ```
9317
+ *
8866
9318
  * The component's props can identify which Store to render - either the default
8867
9319
  * context Store, a named context Store, or an explicit reference.
8868
9320
  *
@@ -8964,12 +9416,18 @@ export function TableView(props: TableProps): ComponentReturnType;
8964
9416
  * ```
8965
9417
  * @category Store components
8966
9418
  */
8967
- export function TablesView(props: TablesProps): ComponentReturnType;
9419
+ TablesView: (props: TablesProps<Schemas>) => ComponentReturnType;
8968
9420
 
8969
- /**
9421
+ /**
8970
9422
  * The ValueView component renders the value of a single Value, and registers a
8971
9423
  * listener so that any changes to that result will cause a re-render.
8972
9424
  *
9425
+ * This has schema-based typing. The following is a simplified representation:
9426
+ *
9427
+ * ```ts override
9428
+ * ValueView(props: ValueProps): ComponentReturnType;
9429
+ * ```
9430
+ *
8973
9431
  * The component's props identify which Value to render based on Value Id and
8974
9432
  * Store (which is either the default context Store, a named context Store, or
8975
9433
  * an explicit reference).
@@ -9055,13 +9513,19 @@ export function TablesView(props: TablesProps): ComponentReturnType;
9055
9513
  * @category Store components
9056
9514
  * @since v3.0.0
9057
9515
  */
9058
- export function ValueView(props: ValueProps): ComponentReturnType;
9516
+ ValueView: (props: ValueProps<Schemas>) => ComponentReturnType;
9059
9517
 
9060
- /**
9518
+ /**
9061
9519
  * The ValuesView component renders the keyed value contents of a Store, and
9062
9520
  * registers a listener so that any changes to that result will cause a
9063
9521
  * re-render.
9064
9522
  *
9523
+ * This has schema-based typing. The following is a simplified representation:
9524
+ *
9525
+ * ```ts override
9526
+ * ValuesView(props: ValuesProps): ComponentReturnType;
9527
+ * ```
9528
+ *
9065
9529
  * The component's props can identify which Store to render - either the default
9066
9530
  * context Store, a named context Store, or an explicit reference.
9067
9531
  *
@@ -9161,12 +9625,18 @@ export function ValueView(props: ValueProps): ComponentReturnType;
9161
9625
  * @category Store components
9162
9626
  * @since v3.0.0
9163
9627
  */
9164
- export function ValuesView(props: ValuesProps): ComponentReturnType;
9628
+ ValuesView: (props: ValuesProps<Schemas>) => ComponentReturnType;
9165
9629
 
9166
- /**
9630
+ /**
9167
9631
  * The MetricView component renders the current value of a Metric, and registers
9168
9632
  * a listener so that any changes to that result will cause a re-render.
9169
9633
  *
9634
+ * This has schema-based typing. The following is a simplified representation:
9635
+ *
9636
+ * ```ts override
9637
+ * MetricView(props: MetricProps): ComponentReturnType;
9638
+ * ```
9639
+ *
9170
9640
  * The component's props can identify which Metrics object to get data for: omit
9171
9641
  * the optional final parameter for the default context Metrics object, provide
9172
9642
  * an Id for a named context Metrics object, or by explicit reference.
@@ -9266,12 +9736,18 @@ export function ValuesView(props: ValuesProps): ComponentReturnType;
9266
9736
  * ```
9267
9737
  * @category Metrics components
9268
9738
  */
9269
- export function MetricView(props: MetricProps): ComponentReturnType;
9739
+ MetricView: (props: MetricProps<Schemas>) => ComponentReturnType;
9270
9740
 
9271
- /**
9741
+ /**
9272
9742
  * The SliceView component renders the contents of a Slice, and registers a
9273
9743
  * listener so that any changes to that result will cause a re-render.
9274
9744
  *
9745
+ * This has schema-based typing. The following is a simplified representation:
9746
+ *
9747
+ * ```ts override
9748
+ * SliceView(props: SliceProps): ComponentReturnType;
9749
+ * ```
9750
+ *
9275
9751
  * The component's props identify which Slice to render based on Index Id, Slice
9276
9752
  * Id, and Indexes object (which is either the default context Indexes object, a
9277
9753
  * named context Indexes object, or an explicit reference).
@@ -9392,12 +9868,18 @@ export function MetricView(props: MetricProps): ComponentReturnType;
9392
9868
  * ```
9393
9869
  * @category Indexes components
9394
9870
  */
9395
- export function SliceView(props: SliceProps): ComponentReturnType;
9871
+ SliceView: (props: SliceProps<Schemas>) => ComponentReturnType;
9396
9872
 
9397
- /**
9873
+ /**
9398
9874
  * The IndexView component renders the contents of a Index, and registers a
9399
9875
  * listener so that any changes to that result will cause a re-render.
9400
9876
  *
9877
+ * This has schema-based typing. The following is a simplified representation:
9878
+ *
9879
+ * ```ts override
9880
+ * IndexView(props: IndexProps): ComponentReturnType;
9881
+ * ```
9882
+ *
9401
9883
  * The component's props identify which Index to render based on Index Id, and
9402
9884
  * Indexes object (which is either the default context Indexes object, a named
9403
9885
  * context Indexes object, or an explicit reference).
@@ -9513,13 +9995,19 @@ export function SliceView(props: SliceProps): ComponentReturnType;
9513
9995
  * ```
9514
9996
  * @category Indexes components
9515
9997
  */
9516
- export function IndexView(props: IndexProps): ComponentReturnType;
9998
+ IndexView: (props: IndexProps<Schemas>) => ComponentReturnType;
9517
9999
 
9518
- /**
10000
+ /**
9519
10001
  * The RemoteRowView component renders the remote Row Id for a given local Row
9520
10002
  * in a Relationship, and registers a listener so that any changes to that
9521
10003
  * result will cause a re-render.
9522
10004
  *
10005
+ * This has schema-based typing. The following is a simplified representation:
10006
+ *
10007
+ * ```ts override
10008
+ * RemoteRowView(props: RemoteRowProps): ComponentReturnType;
10009
+ * ```
10010
+ *
9523
10011
  * The component's props identify which remote Row to render based on
9524
10012
  * Relationship Id, local Row Id, and Relationships object (which is either the
9525
10013
  * default context Relationships object, a named context Relationships object,
@@ -9647,13 +10135,19 @@ export function IndexView(props: IndexProps): ComponentReturnType;
9647
10135
  * ```
9648
10136
  * @category Relationships components
9649
10137
  */
9650
- export function RemoteRowView(props: RemoteRowProps): ComponentReturnType;
10138
+ RemoteRowView: (props: RemoteRowProps<Schemas>) => ComponentReturnType;
9651
10139
 
9652
- /**
10140
+ /**
9653
10141
  * The LocalRowsView component renders the local Row objects for a given remote
9654
10142
  * Row in a Relationship, and registers a listener so that any changes to that
9655
10143
  * result will cause a re-render.
9656
10144
  *
10145
+ * This has schema-based typing. The following is a simplified representation:
10146
+ *
10147
+ * ```ts override
10148
+ * LocalRowsView(props: LocalRowsProps): ComponentReturnType;
10149
+ * ```
10150
+ *
9657
10151
  * The component's props identify which local Rows to render based on
9658
10152
  * Relationship Id, remote Row Id, and Relationships object (which is either the
9659
10153
  * default context Relationships object, a named context Relationships object,
@@ -9782,13 +10276,19 @@ export function RemoteRowView(props: RemoteRowProps): ComponentReturnType;
9782
10276
  * ```
9783
10277
  * @category Relationships components
9784
10278
  */
9785
- export function LocalRowsView(props: LocalRowsProps): ComponentReturnType;
10279
+ LocalRowsView: (props: LocalRowsProps<Schemas>) => ComponentReturnType;
9786
10280
 
9787
- /**
10281
+ /**
9788
10282
  * The LinkedRowsView component renders the local Row objects for a given remote
9789
10283
  * Row in a Relationship, and registers a listener so that any changes to that
9790
10284
  * result will cause a re-render.
9791
10285
  *
10286
+ * This has schema-based typing. The following is a simplified representation:
10287
+ *
10288
+ * ```ts override
10289
+ * LinkedRowsView(props: LinkedRowsProps): ComponentReturnType;
10290
+ * ```
10291
+ *
9792
10292
  * The component's props identify which local Rows to render based on
9793
10293
  * Relationship Id, remote Row Id, and Relationships object (which is either the
9794
10294
  * default context Relationships object, a named context Relationships object,
@@ -9922,13 +10422,19 @@ export function LocalRowsView(props: LocalRowsProps): ComponentReturnType;
9922
10422
  * ```
9923
10423
  * @category Relationships components
9924
10424
  */
9925
- export function LinkedRowsView(props: LinkedRowsProps): ComponentReturnType;
10425
+ LinkedRowsView: (props: LinkedRowsProps<Schemas>) => ComponentReturnType;
9926
10426
 
9927
- /**
10427
+ /**
9928
10428
  * The ResultCellView component renders the value of a single Cell in a given
9929
10429
  * Row, in a given query's result Table, and registers a listener so that any
9930
10430
  * changes to that result will cause a re-render.
9931
10431
  *
10432
+ * This has schema-based typing. The following is a simplified representation:
10433
+ *
10434
+ * ```ts override
10435
+ * ResultCellView(props: ResultCellProps): ComponentReturnType;
10436
+ * ```
10437
+ *
9932
10438
  * The component's props identify which Cell to render based on query Id, Row
9933
10439
  * Id, Cell Id, and Queries object (which is either the default context Queries
9934
10440
  * object, a named context Queries object, or an explicit reference).
@@ -10045,13 +10551,19 @@ export function LinkedRowsView(props: LinkedRowsProps): ComponentReturnType;
10045
10551
  * @category Queries components
10046
10552
  * @since v2.0.0
10047
10553
  */
10048
- export function ResultCellView(props: ResultCellProps): ComponentReturnType;
10554
+ ResultCellView: (props: ResultCellProps<Schemas>) => ComponentReturnType;
10049
10555
 
10050
- /**
10556
+ /**
10051
10557
  * The ResultRowView component renders the contents of a single Row in a given
10052
10558
  * query's result Table, and registers a listener so that any changes to that
10053
10559
  * result will cause a re-render.
10054
10560
  *
10561
+ * This has schema-based typing. The following is a simplified representation:
10562
+ *
10563
+ * ```ts override
10564
+ * ResultRowView(props: ResultRowProps): ComponentReturnType;
10565
+ * ```
10566
+ *
10055
10567
  * The component's props identify which Row to render based on query Id, Row Id,
10056
10568
  * and Queries object (which is either the default context Queries object, a
10057
10569
  * named context Queries object, or an explicit reference).
@@ -10192,13 +10704,21 @@ export function ResultCellView(props: ResultCellProps): ComponentReturnType;
10192
10704
  * @category Queries components
10193
10705
  * @since v2.0.0
10194
10706
  */
10195
- export function ResultRowView(props: ResultRowProps): ComponentReturnType;
10707
+ ResultRowView: (props: ResultRowProps<Schemas>) => ComponentReturnType;
10196
10708
 
10197
- /**
10709
+ /**
10198
10710
  * The ResultSortedTableView component renders the contents of a single query's
10199
10711
  * sorted result Table in a Queries object, and registers a listener so that any
10200
10712
  * changes to that result will cause a re-render.
10201
10713
  *
10714
+ * This has schema-based typing. The following is a simplified representation:
10715
+ *
10716
+ * ```ts override
10717
+ * ResultSortedTableView(
10718
+ * props: ResultSortedTableProps,
10719
+ * ): ComponentReturnType;
10720
+ * ```
10721
+ *
10202
10722
  * The component's props identify which Table to render based on query Id, and
10203
10723
  * Queries object (which is either the default context Queries object, a named
10204
10724
  * context Queries object, or by explicit reference). It also takes a Cell Id to
@@ -10330,15 +10850,21 @@ export function ResultRowView(props: ResultRowProps): ComponentReturnType;
10330
10850
  * @category Queries components
10331
10851
  * @since v2.0.0
10332
10852
  */
10333
- export function ResultSortedTableView(
10334
- props: ResultSortedTableProps,
10335
- ): ComponentReturnType;
10853
+ ResultSortedTableView: (
10854
+ props: ResultSortedTableProps<Schemas>,
10855
+ ) => ComponentReturnType;
10336
10856
 
10337
- /**
10857
+ /**
10338
10858
  * The ResultTableView component renders the contents of a single query's result
10339
10859
  * Table in a Queries object, and registers a listener so that any changes to
10340
10860
  * that result will cause a re-render.
10341
10861
  *
10862
+ * This has schema-based typing. The following is a simplified representation:
10863
+ *
10864
+ * ```ts override
10865
+ * ResultTableView(props: ResultTableProps): ComponentReturnType;
10866
+ * ```
10867
+ *
10342
10868
  * The component's props identify which Table to render based on query Id, and
10343
10869
  * Queries object (which is either the default context Queries object, a named
10344
10870
  * context Queries object, or by explicit reference).
@@ -10455,11 +10981,17 @@ export function ResultSortedTableView(
10455
10981
  * @category Queries components
10456
10982
  * @since v2.0.0
10457
10983
  */
10458
- export function ResultTableView(props: ResultTableProps): ComponentReturnType;
10984
+ ResultTableView: (props: ResultTableProps<Schemas>) => ComponentReturnType;
10459
10985
 
10460
- /**
10986
+ /**
10461
10987
  * The CheckpointView component simply renders the label of a checkpoint.
10462
10988
  *
10989
+ * This has schema-based typing. The following is a simplified representation:
10990
+ *
10991
+ * ```ts override
10992
+ * CheckpointView(props: CheckpointProps): ComponentReturnType;
10993
+ * ```
10994
+ *
10463
10995
  * The component's props identify which checkpoint to render based on Checkpoint
10464
10996
  * Id and Checkpoints object (which is either the default context Checkpoints
10465
10997
  * object, a named context Checkpoints object, or an explicit reference).
@@ -10506,12 +11038,20 @@ export function ResultTableView(props: ResultTableProps): ComponentReturnType;
10506
11038
  * ```
10507
11039
  * @category Checkpoints components
10508
11040
  */
10509
- export function CheckpointView(props: CheckpointProps): ComponentReturnType;
11041
+ CheckpointView: (props: CheckpointProps<Schemas>) => ComponentReturnType;
10510
11042
 
10511
- /**
11043
+ /**
10512
11044
  * The BackwardCheckpointsView component renders a list of previous checkpoints
10513
11045
  * that the underlying Store can go back to.
10514
11046
  *
11047
+ * This has schema-based typing. The following is a simplified representation:
11048
+ *
11049
+ * ```ts override
11050
+ * BackwardCheckpointsView(
11051
+ * props: BackwardCheckpointsProps,
11052
+ * ): ComponentReturnType;
11053
+ * ```
11054
+ *
10515
11055
  * The component's props identify which previous checkpoints to render based on
10516
11056
  * the Checkpoints object (which is either the default context Checkpoints
10517
11057
  * object, a named context Checkpoints object, or an explicit reference).
@@ -10641,14 +11181,22 @@ export function CheckpointView(props: CheckpointProps): ComponentReturnType;
10641
11181
  * ```
10642
11182
  * @category Checkpoints components
10643
11183
  */
10644
- export function BackwardCheckpointsView(
10645
- props: BackwardCheckpointsProps,
10646
- ): ComponentReturnType;
11184
+ BackwardCheckpointsView: (
11185
+ props: BackwardCheckpointsProps<Schemas>,
11186
+ ) => ComponentReturnType;
10647
11187
 
10648
- /**
11188
+ /**
10649
11189
  * The CurrentCheckpointView component renders the current checkpoint that the
10650
11190
  * underlying Store is currently on.
10651
11191
  *
11192
+ * This has schema-based typing. The following is a simplified representation:
11193
+ *
11194
+ * ```ts override
11195
+ * CurrentCheckpointView(
11196
+ * props: CurrentCheckpointProps,
11197
+ * ): ComponentReturnType;
11198
+ * ```
11199
+ *
10652
11200
  * The component's props identify which current checkpoint to render based on
10653
11201
  * the Checkpoints object (which is either the default context Checkpoints
10654
11202
  * object, a named context Checkpoints object, or an explicit reference).
@@ -10778,14 +11326,22 @@ export function BackwardCheckpointsView(
10778
11326
  * ```
10779
11327
  * @category Checkpoints components
10780
11328
  */
10781
- export function CurrentCheckpointView(
10782
- props: CurrentCheckpointProps,
10783
- ): ComponentReturnType;
11329
+ CurrentCheckpointView: (
11330
+ props: CurrentCheckpointProps<Schemas>,
11331
+ ) => ComponentReturnType;
10784
11332
 
10785
- /**
11333
+ /**
10786
11334
  * The ForwardCheckpointsView component renders a list of future checkpoints
10787
11335
  * that the underlying Store can go forwards to.
10788
11336
  *
11337
+ * This has schema-based typing. The following is a simplified representation:
11338
+ *
11339
+ * ```ts override
11340
+ * ForwardCheckpointsView(
11341
+ * props: ForwardCheckpointsProps,
11342
+ * ): ComponentReturnType;
11343
+ * ```
11344
+ *
10789
11345
  * The component's props identify which future checkpoints to render based on
10790
11346
  * the Checkpoints object (which is either the default context Checkpoints
10791
11347
  * object, a named context Checkpoints object, or an explicit reference).
@@ -10916,6 +11472,7 @@ export function CurrentCheckpointView(
10916
11472
  * ```
10917
11473
  * @category Checkpoints components
10918
11474
  */
10919
- export function ForwardCheckpointsView(
10920
- props: ForwardCheckpointsProps,
10921
- ): ComponentReturnType;
11475
+ ForwardCheckpointsView: (
11476
+ props: ForwardCheckpointsProps<Schemas>,
11477
+ ) => ComponentReturnType;
11478
+ };