tinybase 9.0.0 → 9.1.0-beta.1

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 (111) hide show
  1. package/@types/common/index.d.ts +17 -2
  2. package/@types/common/with-schemas/index.d.ts +18 -2
  3. package/@types/store/index.d.ts +37 -7
  4. package/@types/store/with-schemas/index.d.ts +38 -7
  5. package/@types/ui-react/index.d.ts +6 -2
  6. package/@types/ui-react/with-schemas/index.d.ts +7 -2
  7. package/@types/ui-react-dom/index.d.ts +10 -10
  8. package/@types/ui-react-dom/with-schemas/index.d.ts +10 -10
  9. package/@types/ui-react-dom-charts/index.d.ts +7 -7
  10. package/@types/ui-react-dom-charts/with-schemas/index.d.ts +7 -7
  11. package/@types/ui-react-inspector/index.d.ts +1 -1
  12. package/@types/ui-react-inspector/with-schemas/index.d.ts +1 -1
  13. package/@types/ui-solid/index.d.ts +9 -2
  14. package/@types/ui-solid/with-schemas/index.d.ts +10 -2
  15. package/@types/ui-solid-dom/index.d.ts +10 -10
  16. package/@types/ui-solid-dom/with-schemas/index.d.ts +10 -10
  17. package/@types/ui-solid-inspector/index.d.ts +1 -1
  18. package/@types/ui-solid-inspector/with-schemas/index.d.ts +1 -1
  19. package/@types/ui-svelte/index.d.ts +50 -2
  20. package/@types/ui-svelte/with-schemas/index.d.ts +88 -25
  21. package/@types/ui-svelte-dom/index.d.ts +10 -10
  22. package/@types/ui-svelte-dom/with-schemas/index.d.ts +10 -10
  23. package/@types/ui-svelte-inspector/index.d.ts +1 -1
  24. package/@types/ui-svelte-inspector/with-schemas/index.d.ts +1 -1
  25. package/index.js +34 -6
  26. package/mergeable-store/index.js +34 -6
  27. package/mergeable-store/with-schemas/index.js +34 -6
  28. package/min/index.js +1 -1
  29. package/min/index.js.gz +0 -0
  30. package/min/mergeable-store/index.js +1 -1
  31. package/min/mergeable-store/index.js.gz +0 -0
  32. package/min/mergeable-store/with-schemas/index.js +1 -1
  33. package/min/mergeable-store/with-schemas/index.js.gz +0 -0
  34. package/min/omni/index.js +1 -1
  35. package/min/omni/index.js.gz +0 -0
  36. package/min/omni/with-schemas/index.js +1 -1
  37. package/min/omni/with-schemas/index.js.gz +0 -0
  38. package/min/store/index.js +1 -1
  39. package/min/store/index.js.gz +0 -0
  40. package/min/store/with-schemas/index.js +1 -1
  41. package/min/store/with-schemas/index.js.gz +0 -0
  42. package/min/ui-react/index.js +1 -1
  43. package/min/ui-react/index.js.gz +0 -0
  44. package/min/ui-react/with-schemas/index.js +1 -1
  45. package/min/ui-react/with-schemas/index.js.gz +0 -0
  46. package/min/ui-react-dom/index.js +1 -1
  47. package/min/ui-react-dom/index.js.gz +0 -0
  48. package/min/ui-react-dom/with-schemas/index.js +1 -1
  49. package/min/ui-react-dom/with-schemas/index.js.gz +0 -0
  50. package/min/ui-react-dom-charts/index.js +1 -1
  51. package/min/ui-react-dom-charts/index.js.gz +0 -0
  52. package/min/ui-react-dom-charts/with-schemas/index.js +1 -1
  53. package/min/ui-react-dom-charts/with-schemas/index.js.gz +0 -0
  54. package/min/ui-react-inspector/index.js +1 -1
  55. package/min/ui-react-inspector/index.js.gz +0 -0
  56. package/min/ui-react-inspector/with-schemas/index.js +1 -1
  57. package/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
  58. package/min/ui-solid/index.js +1 -1
  59. package/min/ui-solid/index.js.gz +0 -0
  60. package/min/ui-solid/with-schemas/index.js +1 -1
  61. package/min/ui-solid/with-schemas/index.js.gz +0 -0
  62. package/min/ui-solid-dom/index.js +1 -1
  63. package/min/ui-solid-dom/index.js.gz +0 -0
  64. package/min/ui-solid-dom/with-schemas/index.js +1 -1
  65. package/min/ui-solid-dom/with-schemas/index.js.gz +0 -0
  66. package/min/ui-solid-inspector/index.js +1 -1
  67. package/min/ui-solid-inspector/index.js.gz +0 -0
  68. package/min/ui-solid-inspector/with-schemas/index.js +1 -1
  69. package/min/ui-solid-inspector/with-schemas/index.js.gz +0 -0
  70. package/min/ui-svelte/index.js +1 -1
  71. package/min/ui-svelte/index.js.gz +0 -0
  72. package/min/ui-svelte/with-schemas/index.js +1 -1
  73. package/min/ui-svelte/with-schemas/index.js.gz +0 -0
  74. package/min/ui-svelte-dom/index.js +1 -1
  75. package/min/ui-svelte-dom/index.js.gz +0 -0
  76. package/min/ui-svelte-dom/with-schemas/index.js +1 -1
  77. package/min/ui-svelte-dom/with-schemas/index.js.gz +0 -0
  78. package/min/ui-svelte-inspector/index.js +1 -1
  79. package/min/ui-svelte-inspector/index.js.gz +0 -0
  80. package/min/ui-svelte-inspector/with-schemas/index.js +1 -1
  81. package/min/ui-svelte-inspector/with-schemas/index.js.gz +0 -0
  82. package/min/with-schemas/index.js +1 -1
  83. package/min/with-schemas/index.js.gz +0 -0
  84. package/omni/index.js +34 -6
  85. package/omni/with-schemas/index.js +34 -6
  86. package/package.json +3 -3
  87. package/readme.md +14 -14
  88. package/releases.md +59 -59
  89. package/store/index.js +34 -6
  90. package/store/with-schemas/index.js +34 -6
  91. package/ui-react/index.js +36 -6
  92. package/ui-react/with-schemas/index.js +36 -6
  93. package/ui-react-dom/index.js +24 -4
  94. package/ui-react-dom/with-schemas/index.js +24 -4
  95. package/ui-react-dom-charts/index.js +24 -4
  96. package/ui-react-dom-charts/with-schemas/index.js +24 -4
  97. package/ui-react-inspector/index.js +58 -10
  98. package/ui-react-inspector/with-schemas/index.js +58 -10
  99. package/ui-solid/index.js +32 -2
  100. package/ui-solid/with-schemas/index.js +32 -2
  101. package/ui-solid-dom/index.js +17 -1
  102. package/ui-solid-dom/with-schemas/index.js +17 -1
  103. package/ui-solid-inspector/index.js +51 -7
  104. package/ui-solid-inspector/with-schemas/index.js +51 -7
  105. package/ui-svelte/index.js +73 -31
  106. package/ui-svelte/with-schemas/index.js +73 -31
  107. package/ui-svelte-dom/index.js +35 -14
  108. package/ui-svelte-dom/with-schemas/index.js +35 -14
  109. package/ui-svelte-inspector/index.js +69 -20
  110. package/ui-svelte-inspector/with-schemas/index.js +69 -20
  111. package/with-schemas/index.js +34 -6
@@ -83,11 +83,26 @@ export type ParameterizedCallback<Parameter> = (parameter?: Parameter) => void;
83
83
  export type Callback = () => void;
84
84
 
85
85
  /**
86
- * The SortKey type represents a value that can be used by a sort function.
86
+ * The SortKey type represents a Cell value, or `undefined`, that can be used by
87
+ * a sort function.
87
88
  * @category Parameter
88
89
  * @since v1.0.0
89
90
  */
90
- export type SortKey = string | number | boolean | null;
91
+ export type SortKey = CellOrUndefined;
92
+
93
+ /**
94
+ * The Sorter type represents a function that compares two SortKey values.
95
+ *
96
+ * A Sorter is provided to methods that sort Row Ids when the default
97
+ * alphanumeric ordering is not appropriate. Return a positive or negative
98
+ * number to indicate which of the two SortKey values should be ordered first.
99
+ * @param sortKey1 The first item of the pair to compare.
100
+ * @param sortKey2 The second item of the pair to compare.
101
+ * @returns A number indicating how to sort the pair.
102
+ * @category Parameter
103
+ * @since v9.1.0
104
+ */
105
+ export type Sorter = (sortKey1: SortKey, sortKey2: SortKey) => number;
91
106
 
92
107
  /**
93
108
  * The GetNow type is used to represent a function that returns the current time
@@ -95,11 +95,27 @@ export type ParameterizedCallback<Parameter> = (parameter?: Parameter) => void;
95
95
  export type Callback = () => void;
96
96
 
97
97
  /**
98
- * The SortKey type represents a value that can be used by a sort function.
98
+ * The SortKey type represents a Cell value, or `undefined`, that can be used by
99
+ * a sort function.
99
100
  * @category Parameter
100
101
  * @since v1.0.0
101
102
  */
102
- export type SortKey = string | number | boolean;
103
+ export type SortKey =
104
+ string | number | boolean | null | AnyObject | AnyArray | undefined;
105
+
106
+ /**
107
+ * The Sorter type represents a function that compares two SortKey values.
108
+ *
109
+ * A Sorter is provided to methods that sort Row Ids when the default
110
+ * alphanumeric ordering is not appropriate. Return a positive or negative
111
+ * number to indicate which of the two SortKey values should be ordered first.
112
+ * @param sortKey1 The first item of the pair to compare.
113
+ * @param sortKey2 The second item of the pair to compare.
114
+ * @returns A number indicating how to sort the pair.
115
+ * @category Parameter
116
+ * @since v9.1.0
117
+ */
118
+ export type Sorter = (sortKey1: SortKey, sortKey2: SortKey) => number;
103
119
 
104
120
  /**
105
121
  * The GetNow type is used to represent a function that returns the current time
@@ -18,6 +18,7 @@ import type {
18
18
  IdOrNull,
19
19
  Ids,
20
20
  Json,
21
+ Sorter,
21
22
  } from '../common/index.d.ts';
22
23
 
23
24
  /**
@@ -625,7 +626,7 @@ export type DoRollback = (store: Store) => boolean;
625
626
  * the getSortedRowIds method.
626
627
  *
627
628
  * It's an object containing the Id of the Table in the Store, and optional
628
- * `cellId`, `descending`, `offset`, and `limit` parameters. See the
629
+ * `cellId`, `descending`, `offset`, `limit`, and `sorter` parameters. See the
629
630
  * getSortedRowIds method for specific examples.
630
631
  * @category Store
631
632
  * @since v6.1.0
@@ -662,6 +663,13 @@ export type SortedRowIdsArgs = {
662
663
  * @since v6.1.0
663
664
  */
664
665
  limit?: number;
666
+ /**
667
+ * A custom function for comparing the sorting values, defaulting to the
668
+ * defaultSorter function.
669
+ * @category Argument
670
+ * @since v9.1.0
671
+ */
672
+ sorter?: Sorter;
665
673
  };
666
674
 
667
675
  /**
@@ -2196,10 +2204,11 @@ export interface Store {
2196
2204
  * The getSortedRowIds method returns the Ids of every Row in a given Table,
2197
2205
  * sorted according to the values in a specified Cell.
2198
2206
  *
2199
- * The sorting of the rows is alphanumeric, and you can indicate whether it
2200
- * should be in descending order. The `offset` and `limit` parameters are used
2201
- * to paginate results, but default to `0` and `undefined` to return all
2202
- * available Row Ids if not specified.
2207
+ * By default the sorting of the rows is alphanumeric, and you can indicate
2208
+ * whether it should be in descending order. The `offset` and `limit`
2209
+ * parameters are used to paginate results, but default to `0` and
2210
+ * `undefined` to return all available Row Ids if not specified. The `sorter`
2211
+ * parameter can provide a custom comparison function.
2203
2212
  *
2204
2213
  * Note that every call to this method will perform the sorting afresh - there
2205
2214
  * is no caching of the results - and so you are advised to memoize the
@@ -2216,6 +2225,8 @@ export interface Store {
2216
2225
  * any.
2217
2226
  * @param limit The maximum number of Row Ids to return, or `undefined` for
2218
2227
  * all.
2228
+ * @param sorter A custom function for comparing the sorting values, or
2229
+ * `undefined` to use the defaultSorter function.
2219
2230
  * @returns An array of the sorted Ids of appropriate Rows in the Table.
2220
2231
  * @example
2221
2232
  * This example retrieves sorted Row Ids in a Table.
@@ -2287,6 +2298,24 @@ export interface Store {
2287
2298
  * // -> ['cujo', 'felix', 'fido']
2288
2299
  * ```
2289
2300
  * @example
2301
+ * This example retrieves Row Ids sorted numerically by their own value.
2302
+ *
2303
+ * ```js
2304
+ * import {createStore} from 'tinybase';
2305
+ *
2306
+ * const store = createStore();
2307
+ * ['1', '10', '2'].forEach((rowId) =>
2308
+ * store.setRow('pets', rowId, {sold: false}),
2309
+ * );
2310
+ * const numericSorter = (sortKey1, sortKey2) =>
2311
+ * Number(sortKey1) - Number(sortKey2);
2312
+ *
2313
+ * console.log(
2314
+ * store.getSortedRowIds({tableId: 'pets', sorter: numericSorter}),
2315
+ * );
2316
+ * // -> ['1', '2', '10']
2317
+ * ```
2318
+ * @example
2290
2319
  * This example retrieves the sorted Row Ids of a Table that does not exist,
2291
2320
  * returning an empty array.
2292
2321
  *
@@ -2306,13 +2335,14 @@ export interface Store {
2306
2335
  descending?: boolean,
2307
2336
  offset?: number,
2308
2337
  limit?: number,
2338
+ sorter?: Sorter,
2309
2339
  ): Ids;
2310
2340
 
2311
2341
  /**
2312
2342
  * When called with one object argument, the getSortedRowIds method
2313
2343
  * destructures it to make it easier to skip optional parameters.
2314
2344
  * @param args A SortedRowIdsArgs object containing the Id of the Table in the
2315
- * Store, and optional `cellId`, `descending`, `offset`, and `limit`
2345
+ * Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
2316
2346
  * parameters.
2317
2347
  * @returns An array of the sorted Ids of appropriate Rows in the Table.
2318
2348
  * @example
@@ -5813,7 +5843,7 @@ export interface Store {
5813
5843
  * addSortedRowIdsListener method destructures it to make it easier to skip
5814
5844
  * optional parameters.
5815
5845
  * @param args A SortedRowIdsArgs object containing the Id of the Table in the
5816
- * Store, and optional `cellId`, `descending`, `offset`, and `limit`
5846
+ * Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
5817
5847
  * parameters.
5818
5848
  * @param listener The function that will be called whenever the sorted Row
5819
5849
  * Ids in the Table change.
@@ -29,6 +29,7 @@ import type {
29
29
  IdOrNull,
30
30
  Ids,
31
31
  Json,
32
+ Sorter,
32
33
  } from '../../common/with-schemas/index.d.ts';
33
34
 
34
35
  /**
@@ -947,7 +948,7 @@ export type DoRollback<Schemas extends OptionalSchemas> = (
947
948
  * the getSortedRowIds method.
948
949
  *
949
950
  * It's an object containing the Id of the Table in the Store, and optional
950
- * `cellId`, `descending`, `offset`, and `limit` parameters. See the
951
+ * `cellId`, `descending`, `offset`, `limit`, and `sorter` parameters. See the
951
952
  * getSortedRowIds method for specific examples.
952
953
  * @category Store
953
954
  * @since v6.1.0
@@ -989,6 +990,13 @@ export type SortedRowIdsArgs<
989
990
  * @since v6.1.0
990
991
  */
991
992
  limit?: number;
993
+ /**
994
+ * A custom function for comparing the sorting values, defaulting to the
995
+ * defaultSorter function.
996
+ * @category Argument
997
+ * @since v9.1.0
998
+ */
999
+ sorter?: Sorter;
992
1000
  };
993
1001
 
994
1002
  /**
@@ -3216,13 +3224,15 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3216
3224
  * descending?: boolean,
3217
3225
  * offset?: number,
3218
3226
  * limit?: number,
3227
+ * sorter?: Sorter,
3219
3228
  * ): Ids;
3220
3229
  * ```
3221
3230
  *
3222
- * The sorting of the rows is alphanumeric, and you can indicate whether it
3223
- * should be in descending order. The `offset` and `limit` parameters are used
3224
- * to paginate results, but default to `0` and `undefined` to return all
3225
- * available Row Ids if not specified.
3231
+ * By default the sorting of the rows is alphanumeric, and you can indicate
3232
+ * whether it should be in descending order. The `offset` and `limit`
3233
+ * parameters are used to paginate results, but default to `0` and
3234
+ * `undefined` to return all available Row Ids if not specified. The `sorter`
3235
+ * parameter can provide a custom comparison function.
3226
3236
  *
3227
3237
  * Note that every call to this method will perform the sorting afresh - there
3228
3238
  * is no caching of the results - and so you are advised to memoize the
@@ -3239,6 +3249,8 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3239
3249
  * any.
3240
3250
  * @param limit The maximum number of Row Ids to return, or `undefined` for
3241
3251
  * all.
3252
+ * @param sorter A custom function for comparing the sorting values, or
3253
+ * `undefined` to use the defaultSorter function.
3242
3254
  * @returns An array of the sorted Ids of appropriate Rows in the Table.
3243
3255
  * @example
3244
3256
  * This example retrieves sorted Row Ids in a Table.
@@ -3310,6 +3322,24 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3310
3322
  * // -> ['cujo', 'felix', 'fido']
3311
3323
  * ```
3312
3324
  * @example
3325
+ * This example retrieves Row Ids sorted numerically by their own value.
3326
+ *
3327
+ * ```js
3328
+ * import {createStore} from 'tinybase';
3329
+ *
3330
+ * const store = createStore();
3331
+ * ['1', '10', '2'].forEach((rowId) =>
3332
+ * store.setRow('pets', rowId, {sold: false}),
3333
+ * );
3334
+ * const numericSorter = (sortKey1, sortKey2) =>
3335
+ * Number(sortKey1) - Number(sortKey2);
3336
+ *
3337
+ * console.log(
3338
+ * store.getSortedRowIds({tableId: 'pets', sorter: numericSorter}),
3339
+ * );
3340
+ * // -> ['1', '2', '10']
3341
+ * ```
3342
+ * @example
3313
3343
  * This example retrieves the sorted Row Ids of a Table that does not exist,
3314
3344
  * returning an empty array.
3315
3345
  *
@@ -3329,13 +3359,14 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3329
3359
  descending?: boolean,
3330
3360
  offset?: number,
3331
3361
  limit?: number,
3362
+ sorter?: Sorter,
3332
3363
  ): Ids;
3333
3364
 
3334
3365
  /**
3335
3366
  * When called with one object argument, the getSortedRowIds method
3336
3367
  * destructures it to make it easier to skip optional parameters.
3337
3368
  * @param args A SortedRowIdsArgs object containing the Id of the Table in the
3338
- * Store, and optional `cellId`, `descending`, `offset`, and `limit`
3369
+ * Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
3339
3370
  * parameters.
3340
3371
  * @returns An array of the sorted Ids of appropriate Rows in the Table.
3341
3372
  * @example
@@ -7295,7 +7326,7 @@ export interface Store<in out Schemas extends OptionalSchemas> {
7295
7326
  * addSortedRowIdsListener method destructures it to make it easier to skip
7296
7327
  * optional parameters.
7297
7328
  * @param args A SortedRowIdsArgs object containing the Id of the Table in the
7298
- * Store, and optional `cellId`, `descending`, `offset`, and `limit`
7329
+ * Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
7299
7330
  * parameters.
7300
7331
  * @param listener The function that will be called whenever the sorted Row
7301
7332
  * Ids in the Table change.
@@ -36,6 +36,7 @@ import type {
36
36
  IdOrNull,
37
37
  Ids,
38
38
  ParameterizedCallback,
39
+ Sorter,
39
40
  } from '../common/index.d.ts';
40
41
  import type {
41
42
  Indexes,
@@ -1797,6 +1798,7 @@ export function useSortedRowIds(
1797
1798
  descending?: boolean,
1798
1799
  offset?: number,
1799
1800
  limit?: number,
1801
+ sorterOrStoreOrStoreId?: Sorter | StoreOrStoreId,
1800
1802
  storeOrStoreId?: StoreOrStoreId,
1801
1803
  ): Ids;
1802
1804
 
@@ -1804,7 +1806,8 @@ export function useSortedRowIds(
1804
1806
  * When called with an object as the first argument, the useSortedRowIds method
1805
1807
  * destructures it to make it easier to skip optional parameters.
1806
1808
  * @param args A SortedRowIdsArgs object containing the Id of the Table in the
1807
- * Store, and optional `cellId`, `descending`, `offset`, and `limit` parameters.
1809
+ * Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
1810
+ * parameters.
1808
1811
  * @param storeOrStoreId The Store to be accessed: omit for the default context
1809
1812
  * Store, provide an Id for a named context Store, or provide an explicit
1810
1813
  * reference.
@@ -5178,7 +5181,8 @@ export function useSortedRowIdsListener(
5178
5181
  * When called with an object as the first argument, the useSortedRowIds method
5179
5182
  * destructures it to make it easier to skip optional parameters.
5180
5183
  * @param args A SortedRowIdsArgs object containing the Id of the Table in the
5181
- * Store, and optional `cellId`, `descending`, `offset`, and `limit` parameters.
5184
+ * Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
5185
+ * parameters.
5182
5186
  * @param listener The function that will be called whenever the sorted Row Ids
5183
5187
  * in the Table change.
5184
5188
  * @param listenerDeps An optional array of dependencies for the `listener`
@@ -82,6 +82,7 @@ import type {
82
82
  IdOrNull,
83
83
  Ids,
84
84
  ParameterizedCallback,
85
+ Sorter,
85
86
  } from '../../common/with-schemas/index.d.ts';
86
87
  import type {
87
88
  Indexes,
@@ -1901,6 +1902,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
1901
1902
  * descending?: boolean,
1902
1903
  * offset?: number,
1903
1904
  * limit?: number,
1905
+ * sorterOrStoreOrStoreId?: Sorter | StoreOrStoreId,
1904
1906
  * storeOrStoreId?: StoreOrStoreId,
1905
1907
  * ): Ids;
1906
1908
  * ```
@@ -2032,6 +2034,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
2032
2034
  descending?: boolean,
2033
2035
  offset?: number,
2034
2036
  limit?: number,
2037
+ sorterOrStoreOrStoreId?: Sorter | StoreOrStoreId<Schemas>,
2035
2038
  storeOrStoreId?: StoreOrStoreId<Schemas>,
2036
2039
  ): Ids;
2037
2040
 
@@ -2039,7 +2042,8 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
2039
2042
  * When called with an object as the first argument, the useSortedRowIds method
2040
2043
  * destructures it to make it easier to skip optional parameters.
2041
2044
  * @param args A SortedRowIdsArgs object containing the Id of the Table in the
2042
- * Store, and optional `cellId`, `descending`, `offset`, and `limit` parameters.
2045
+ * Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
2046
+ * parameters.
2043
2047
  * @param storeOrStoreId The Store to be accessed: omit for the default context
2044
2048
  * Store, provide an Id for a named context Store, or provide an explicit
2045
2049
  * reference.
@@ -5957,7 +5961,8 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
5957
5961
  * When called with an object as the first argument, the useSortedRowIds method
5958
5962
  * destructures it to make it easier to skip optional parameters.
5959
5963
  * @param args A SortedRowIdsArgs object containing the Id of the Table in the
5960
- * Store, and optional `cellId`, `descending`, `offset`, and `limit` parameters.
5964
+ * Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
5965
+ * parameters.
5961
5966
  * @param listener The function that will be called whenever the sorted Row Ids
5962
5967
  * in the Table change.
5963
5968
  * @param listenerDeps An optional array of dependencies for the `listener`
@@ -692,7 +692,7 @@ export type SortedTablePaginatorProps = {
692
692
  *
693
693
  * See the <TableInHtmlTable /> (React) demo for this component in action:
694
694
  *
695
- * ![TableInHtmlTable example](https://tinybase.org/shots/tableinhtmltable-react-demo.png
695
+ * ![TableInHtmlTable example](https://beta.tinybase.org/shots/tableinhtmltable-react-demo.png
696
696
  * "TableInHtmlTable example")
697
697
  *
698
698
  * The component's props identify which Table to render based on Table Id, and
@@ -838,7 +838,7 @@ export function TableInHtmlTable(
838
838
  * See the <SortedTableInHtmlTable /> (React) demo for this component in
839
839
  * action:
840
840
  *
841
- * ![SortedTableInHtmlTable example](https://tinybase.org/shots/sortedtableinhtmltable-react-demo.png
841
+ * ![SortedTableInHtmlTable example](https://beta.tinybase.org/shots/sortedtableinhtmltable-react-demo.png
842
842
  * "SortedTableInHtmlTable example")
843
843
  *
844
844
  * The component's props identify which Table to render based on Table Id, and
@@ -1011,7 +1011,7 @@ export function SortedTableInHtmlTable(
1011
1011
  *
1012
1012
  * See the <ValuesInHtmlTable /> (React) demo for this component in action:
1013
1013
  *
1014
- * ![ValuesInHtmlTable example](https://tinybase.org/shots/valuesinhtmltable-react-demo.png
1014
+ * ![ValuesInHtmlTable example](https://beta.tinybase.org/shots/valuesinhtmltable-react-demo.png
1015
1015
  * "ValuesInHtmlTable example")
1016
1016
  *
1017
1017
  * The component's props identify which Row to render based on Table Id, Row Id,
@@ -1142,7 +1142,7 @@ export function ValuesInHtmlTable(
1142
1142
  *
1143
1143
  * See the <SliceInHtmlTable /> (React) demo for this component in action:
1144
1144
  *
1145
- * ![SliceInHtmlTable example](https://tinybase.org/shots/sliceinhtmltable-react-demo.png
1145
+ * ![SliceInHtmlTable example](https://beta.tinybase.org/shots/sliceinhtmltable-react-demo.png
1146
1146
  * "SliceInHtmlTable example")
1147
1147
  *
1148
1148
  * The component's props identify which Slice to render based on Index Id, Slice
@@ -1300,7 +1300,7 @@ export function SliceInHtmlTable(
1300
1300
  * See the <RelationshipInHtmlTable /> (React) demo for this component in
1301
1301
  * action:
1302
1302
  *
1303
- * ![RelationshipInHtmlTable example](https://tinybase.org/shots/relationshipinhtmltable-react-demo.png
1303
+ * ![RelationshipInHtmlTable example](https://beta.tinybase.org/shots/relationshipinhtmltable-react-demo.png
1304
1304
  * "RelationshipInHtmlTable example")
1305
1305
  *
1306
1306
  * The component's props identify which Relationship to render based on
@@ -1478,7 +1478,7 @@ export function RelationshipInHtmlTable(
1478
1478
  * See the <ResultTableInHtmlTable /> (React) demo for this component in
1479
1479
  * action:
1480
1480
  *
1481
- * ![ResultTableInHtmlTable example](https://tinybase.org/shots/resulttableinhtmltable-react-demo.png
1481
+ * ![ResultTableInHtmlTable example](https://beta.tinybase.org/shots/resulttableinhtmltable-react-demo.png
1482
1482
  * "ResultTableInHtmlTable example")
1483
1483
  *
1484
1484
  * The component's props identify which ResultTable to render based on query Id,
@@ -1631,7 +1631,7 @@ export function ResultTableInHtmlTable(
1631
1631
  * See the <ResultSortedTableInHtmlTable /> (React) demo for this component in
1632
1632
  * action:
1633
1633
  *
1634
- * ![ResultSortedTableInHtmlTable example](https://tinybase.org/shots/resultsortedtableinhtmltable-react-demo.png
1634
+ * ![ResultSortedTableInHtmlTable example](https://beta.tinybase.org/shots/resultsortedtableinhtmltable-react-demo.png
1635
1635
  * "ResultSortedTableInHtmlTable example")
1636
1636
  *
1637
1637
  * The component's props identify which ResultTable to render based on query Id,
@@ -1805,7 +1805,7 @@ export function ResultSortedTableInHtmlTable(
1805
1805
  *
1806
1806
  * See the <EditableCellView /> (React) demo for this component in action:
1807
1807
  *
1808
- * ![EditableCellView example](https://tinybase.org/shots/editablecellview-react-demo.png
1808
+ * ![EditableCellView example](https://beta.tinybase.org/shots/editablecellview-react-demo.png
1809
1809
  * "EditableCellView example")
1810
1810
  *
1811
1811
  * The component's props identify which Cell to render based on Table Id, Row
@@ -1876,7 +1876,7 @@ export function EditableCellView(
1876
1876
  *
1877
1877
  * See the <EditableValueView /> (React) demo for this component in action:
1878
1878
  *
1879
- * ![EditableValueView example](https://tinybase.org/shots/editablevalueview-react-demo.png
1879
+ * ![EditableValueView example](https://beta.tinybase.org/shots/editablevalueview-react-demo.png
1880
1880
  * "EditableValueView example")
1881
1881
  *
1882
1882
  * The component's props identify which Value to render based on Table Id, Row
@@ -1947,7 +1947,7 @@ export function EditableValueView(
1947
1947
  * See the <SortedTableInHtmlTable /> (React) demo for this component in
1948
1948
  * action:
1949
1949
  *
1950
- * ![SortedTablePaginator example](https://tinybase.org/shots/sortedtablepaginator-react-demo.png
1950
+ * ![SortedTablePaginator example](https://beta.tinybase.org/shots/sortedtablepaginator-react-demo.png
1951
1951
  * "SortedTablePaginator example")
1952
1952
  *
1953
1953
  * The component displays 'previous' and 'next' buttons for paging through the
@@ -668,7 +668,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
668
668
  *
669
669
  * See the <TableInHtmlTable /> (React) demo for this component in action:
670
670
  *
671
- * ![TableInHtmlTable example](https://tinybase.org/shots/tableinhtmltable-react-demo.png
671
+ * ![TableInHtmlTable example](https://beta.tinybase.org/shots/tableinhtmltable-react-demo.png
672
672
  * "TableInHtmlTable example")
673
673
  *
674
674
  * The component's props identify which Table to render based on Table Id, and
@@ -822,7 +822,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
822
822
  * See the <SortedTableInHtmlTable /> (React) demo for this component in
823
823
  * action:
824
824
  *
825
- * ![SortedTableInHtmlTable example](https://tinybase.org/shots/sortedtableinhtmltable-react-demo.png
825
+ * ![SortedTableInHtmlTable example](https://beta.tinybase.org/shots/sortedtableinhtmltable-react-demo.png
826
826
  * "SortedTableInHtmlTable example")
827
827
  *
828
828
  * The component's props identify which Table to render based on Table Id, and
@@ -1003,7 +1003,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
1003
1003
  *
1004
1004
  * See the <ValuesInHtmlTable /> (React) demo for this component in action:
1005
1005
  *
1006
- * ![ValuesInHtmlTable example](https://tinybase.org/shots/valuesinhtmltable-react-demo.png
1006
+ * ![ValuesInHtmlTable example](https://beta.tinybase.org/shots/valuesinhtmltable-react-demo.png
1007
1007
  * "ValuesInHtmlTable example")
1008
1008
  *
1009
1009
  * The component's props identify which Row to render based on Table Id, Row Id,
@@ -1142,7 +1142,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
1142
1142
  *
1143
1143
  * See the <SliceInHtmlTable /> (React) demo for this component in action:
1144
1144
  *
1145
- * ![SliceInHtmlTable example](https://tinybase.org/shots/sliceinhtmltable-react-demo.png
1145
+ * ![SliceInHtmlTable example](https://beta.tinybase.org/shots/sliceinhtmltable-react-demo.png
1146
1146
  * "SliceInHtmlTable example")
1147
1147
  *
1148
1148
  * The component's props identify which Slice to render based on Index Id, Slice
@@ -1308,7 +1308,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
1308
1308
  * See the <RelationshipInHtmlTable /> (React) demo for this component in
1309
1309
  * action:
1310
1310
  *
1311
- * ![RelationshipInHtmlTable example](https://tinybase.org/shots/relationshipinhtmltable-react-demo.png
1311
+ * ![RelationshipInHtmlTable example](https://beta.tinybase.org/shots/relationshipinhtmltable-react-demo.png
1312
1312
  * "RelationshipInHtmlTable example")
1313
1313
  *
1314
1314
  * The component's props identify which Relationship to render based on
@@ -1494,7 +1494,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
1494
1494
  * See the <ResultTableInHtmlTable /> (React) demo for this component in
1495
1495
  * action:
1496
1496
  *
1497
- * ![ResultTableInHtmlTable example](https://tinybase.org/shots/resulttableinhtmltable-react-demo.png
1497
+ * ![ResultTableInHtmlTable example](https://beta.tinybase.org/shots/resulttableinhtmltable-react-demo.png
1498
1498
  * "ResultTableInHtmlTable example")
1499
1499
  *
1500
1500
  * The component's props identify which ResultTable to render based on query Id,
@@ -1655,7 +1655,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
1655
1655
  * See the <ResultSortedTableInHtmlTable /> (React) demo for this component in
1656
1656
  * action:
1657
1657
  *
1658
- * ![ResultSortedTableInHtmlTable example](https://tinybase.org/shots/resultsortedtableinhtmltable-react-demo.png
1658
+ * ![ResultSortedTableInHtmlTable example](https://beta.tinybase.org/shots/resultsortedtableinhtmltable-react-demo.png
1659
1659
  * "ResultSortedTableInHtmlTable example")
1660
1660
  *
1661
1661
  * The component's props identify which ResultTable to render based on query Id,
@@ -1837,7 +1837,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
1837
1837
  *
1838
1838
  * See the <EditableCellView /> (React) demo for this component in action:
1839
1839
  *
1840
- * ![EditableCellView example](https://tinybase.org/shots/editablecellview-react-demo.png
1840
+ * ![EditableCellView example](https://beta.tinybase.org/shots/editablecellview-react-demo.png
1841
1841
  * "EditableCellView example")
1842
1842
  *
1843
1843
  * The component's props identify which Cell to render based on Table Id, Row
@@ -1922,7 +1922,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
1922
1922
  *
1923
1923
  * See the <EditableValueView /> (React) demo for this component in action:
1924
1924
  *
1925
- * ![EditableValueView example](https://tinybase.org/shots/editablevalueview-react-demo.png
1925
+ * ![EditableValueView example](https://beta.tinybase.org/shots/editablevalueview-react-demo.png
1926
1926
  * "EditableValueView example")
1927
1927
  *
1928
1928
  * The component's props identify which Value to render based on Table Id, Row
@@ -1993,7 +1993,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
1993
1993
  * See the <SortedTableInHtmlTable /> (React) demo for this component in
1994
1994
  * action:
1995
1995
  *
1996
- * ![SortedTablePaginator example](https://tinybase.org/shots/sortedtablepaginator-react-demo.png
1996
+ * ![SortedTablePaginator example](https://beta.tinybase.org/shots/sortedtablepaginator-react-demo.png
1997
1997
  * "SortedTablePaginator example")
1998
1998
  *
1999
1999
  * The component displays 'previous' and 'next' buttons for paging through the
@@ -483,7 +483,7 @@ export type YAxisProps = {
483
483
  *
484
484
  * See the Composing Charts (React) demo for this component in action:
485
485
  *
486
- * ![CartesianChart component example](https://tinybase.org/shots/composing-charts-react-demo.png
486
+ * ![CartesianChart component example](https://beta.tinybase.org/shots/composing-charts-react-demo.png
487
487
  * "CartesianChart component example")
488
488
  *
489
489
  * The series children declare their own xCellId and yCellId bindings. The
@@ -542,7 +542,7 @@ export function CartesianChart(
542
542
  *
543
543
  * See the Axis Overrides (React) demo for this component in action:
544
544
  *
545
- * ![XAxis component example](https://tinybase.org/shots/axis-overrides-react-demo.png
545
+ * ![XAxis component example](https://beta.tinybase.org/shots/axis-overrides-react-demo.png
546
546
  * "XAxis component example")
547
547
  * @category Store components
548
548
  * @since v8.5.0
@@ -558,7 +558,7 @@ export function XAxis(props: XAxisProps): ComponentReturnType;
558
558
  *
559
559
  * See the Axis Overrides (React) demo for this component in action:
560
560
  *
561
- * ![YAxis component example](https://tinybase.org/shots/axis-overrides-react-demo.png
561
+ * ![YAxis component example](https://beta.tinybase.org/shots/axis-overrides-react-demo.png
562
562
  * "YAxis component example")
563
563
  * @category Store components
564
564
  * @since v8.5.0
@@ -574,7 +574,7 @@ export function YAxis(props: YAxisProps): ComponentReturnType;
574
574
  *
575
575
  * See the Composing Charts (React) demo for this component in action:
576
576
  *
577
- * ![LineSeries component example](https://tinybase.org/shots/composing-charts-react-demo.png
577
+ * ![LineSeries component example](https://beta.tinybase.org/shots/composing-charts-react-demo.png
578
578
  * "LineSeries component example")
579
579
  * @category Store components
580
580
  * @since v8.5.0
@@ -590,7 +590,7 @@ export function LineSeries(props: SeriesProps): ComponentReturnType;
590
590
  *
591
591
  * See the Composing Charts (React) demo for this component in action:
592
592
  *
593
- * ![BarSeries component example](https://tinybase.org/shots/composing-charts-react-demo.png
593
+ * ![BarSeries component example](https://beta.tinybase.org/shots/composing-charts-react-demo.png
594
594
  * "BarSeries component example")
595
595
  * @category Store components
596
596
  * @since v8.5.0
@@ -607,7 +607,7 @@ export function BarSeries(props: SeriesProps): ComponentReturnType;
607
607
  *
608
608
  * See the <LineChart /> (React) demo for this component in action:
609
609
  *
610
- * ![LineChart component example](https://tinybase.org/shots/basic-chart-react-demo.png "LineChart
610
+ * ![LineChart component example](https://beta.tinybase.org/shots/basic-chart-react-demo.png "LineChart
611
611
  * component example")
612
612
  * @category Store components
613
613
  * @since v8.5.0
@@ -660,7 +660,7 @@ export function LineChart(
660
660
  *
661
661
  * See the Sorting And Types (React) demo for this component in action:
662
662
  *
663
- * ![BarChart component example](https://tinybase.org/shots/sorting-and-types-react-demo.png
663
+ * ![BarChart component example](https://beta.tinybase.org/shots/sorting-and-types-react-demo.png
664
664
  * "BarChart component example")
665
665
  * @category Store components
666
666
  * @since v8.5.0
@@ -544,7 +544,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
544
544
  *
545
545
  * See the Composing Charts (React) demo for this component in action:
546
546
  *
547
- * ![CartesianChart component example](https://tinybase.org/shots/composing-charts-react-demo.png
547
+ * ![CartesianChart component example](https://beta.tinybase.org/shots/composing-charts-react-demo.png
548
548
  * "CartesianChart component example")
549
549
  *
550
550
  * The series children declare their own xCellId and yCellId bindings. The
@@ -609,7 +609,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
609
609
  *
610
610
  * See the Axis Overrides (React) demo for this component in action:
611
611
  *
612
- * ![XAxis component example](https://tinybase.org/shots/axis-overrides-react-demo.png
612
+ * ![XAxis component example](https://beta.tinybase.org/shots/axis-overrides-react-demo.png
613
613
  * "XAxis component example")
614
614
  * @category Store components
615
615
  * @since v8.5.0
@@ -625,7 +625,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
625
625
  *
626
626
  * See the Axis Overrides (React) demo for this component in action:
627
627
  *
628
- * ![YAxis component example](https://tinybase.org/shots/axis-overrides-react-demo.png
628
+ * ![YAxis component example](https://beta.tinybase.org/shots/axis-overrides-react-demo.png
629
629
  * "YAxis component example")
630
630
  * @category Store components
631
631
  * @since v8.5.0
@@ -641,7 +641,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
641
641
  *
642
642
  * See the Composing Charts (React) demo for this component in action:
643
643
  *
644
- * ![LineSeries component example](https://tinybase.org/shots/composing-charts-react-demo.png
644
+ * ![LineSeries component example](https://beta.tinybase.org/shots/composing-charts-react-demo.png
645
645
  * "LineSeries component example")
646
646
  * @category Store components
647
647
  * @since v8.5.0
@@ -657,7 +657,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
657
657
  *
658
658
  * See the Composing Charts (React) demo for this component in action:
659
659
  *
660
- * ![BarSeries component example](https://tinybase.org/shots/composing-charts-react-demo.png
660
+ * ![BarSeries component example](https://beta.tinybase.org/shots/composing-charts-react-demo.png
661
661
  * "BarSeries component example")
662
662
  * @category Store components
663
663
  * @since v8.5.0
@@ -684,7 +684,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
684
684
  *
685
685
  * See the <LineChart /> (React) demo for this component in action:
686
686
  *
687
- * ![LineChart component example](https://tinybase.org/shots/basic-chart-react-demo.png "LineChart
687
+ * ![LineChart component example](https://beta.tinybase.org/shots/basic-chart-react-demo.png "LineChart
688
688
  * component example")
689
689
  * @category Store components
690
690
  * @since v8.5.0
@@ -750,7 +750,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
750
750
  *
751
751
  * See the Sorting And Types (React) demo for this component in action:
752
752
  *
753
- * ![BarChart component example](https://tinybase.org/shots/sorting-and-types-react-demo.png
753
+ * ![BarChart component example](https://beta.tinybase.org/shots/sorting-and-types-react-demo.png
754
754
  * "BarChart component example")
755
755
  * @category Store components
756
756
  * @since v8.5.0
@@ -46,7 +46,7 @@ export type InspectorProps = {
46
46
  *
47
47
  * See the <Inspector /> (React) demo for this component in action:
48
48
  *
49
- * ![Inspector example](https://tinybase.org/shots/inspector-react-demo.png
49
+ * ![Inspector example](https://beta.tinybase.org/shots/inspector-react-demo.png
50
50
  * "Inspector example")
51
51
  *
52
52
  * The component displays a nub in the corner of the screen which you may then