tinybase 8.5.0-beta.0 → 8.5.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/@types/ui-react-dom-charts/index.d.ts +387 -0
  2. package/@types/ui-react-dom-charts/with-schemas/index.d.ts +476 -0
  3. package/common/index.js +3 -2
  4. package/common/with-schemas/index.js +3 -2
  5. package/index.js +5 -3
  6. package/mergeable-store/index.js +5 -3
  7. package/mergeable-store/with-schemas/index.js +5 -3
  8. package/metrics/index.js +1 -1
  9. package/metrics/with-schemas/index.js +1 -1
  10. package/min/common/index.js +1 -1
  11. package/min/common/index.js.gz +0 -0
  12. package/min/common/with-schemas/index.js +1 -1
  13. package/min/common/with-schemas/index.js.gz +0 -0
  14. package/min/index.js +1 -1
  15. package/min/index.js.gz +0 -0
  16. package/min/mergeable-store/index.js +1 -1
  17. package/min/mergeable-store/index.js.gz +0 -0
  18. package/min/mergeable-store/with-schemas/index.js +1 -1
  19. package/min/mergeable-store/with-schemas/index.js.gz +0 -0
  20. package/min/omni/index.js +1 -1
  21. package/min/omni/index.js.gz +0 -0
  22. package/min/omni/with-schemas/index.js +1 -1
  23. package/min/omni/with-schemas/index.js.gz +0 -0
  24. package/min/persisters/persister-durable-object-sql-storage/index.js +1 -1
  25. package/min/persisters/persister-durable-object-sql-storage/index.js.gz +0 -0
  26. package/min/persisters/persister-durable-object-sql-storage/with-schemas/index.js +1 -1
  27. package/min/persisters/persister-durable-object-sql-storage/with-schemas/index.js.gz +0 -0
  28. package/min/persisters/persister-partykit-server/index.js +1 -1
  29. package/min/persisters/persister-partykit-server/index.js.gz +0 -0
  30. package/min/persisters/persister-partykit-server/with-schemas/index.js +1 -1
  31. package/min/persisters/persister-partykit-server/with-schemas/index.js.gz +0 -0
  32. package/min/queries/index.js +1 -1
  33. package/min/queries/index.js.gz +0 -0
  34. package/min/queries/with-schemas/index.js +1 -1
  35. package/min/queries/with-schemas/index.js.gz +0 -0
  36. package/min/synchronizers/index.js +1 -1
  37. package/min/synchronizers/index.js.gz +0 -0
  38. package/min/synchronizers/synchronizer-broadcast-channel/index.js +1 -1
  39. package/min/synchronizers/synchronizer-broadcast-channel/index.js.gz +0 -0
  40. package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +1 -1
  41. package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js.gz +0 -0
  42. package/min/synchronizers/synchronizer-local/index.js +1 -1
  43. package/min/synchronizers/synchronizer-local/index.js.gz +0 -0
  44. package/min/synchronizers/synchronizer-local/with-schemas/index.js +1 -1
  45. package/min/synchronizers/synchronizer-local/with-schemas/index.js.gz +0 -0
  46. package/min/synchronizers/synchronizer-ws-client/index.js +1 -1
  47. package/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
  48. package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
  49. package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
  50. package/min/synchronizers/synchronizer-ws-server/index.js +1 -1
  51. package/min/synchronizers/synchronizer-ws-server/index.js.gz +0 -0
  52. package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js +1 -1
  53. package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js.gz +0 -0
  54. package/min/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  55. package/min/synchronizers/synchronizer-ws-server-durable-object/index.js.gz +0 -0
  56. package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
  57. package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js.gz +0 -0
  58. package/min/synchronizers/with-schemas/index.js +1 -1
  59. package/min/synchronizers/with-schemas/index.js.gz +0 -0
  60. package/min/ui-react/index.js +1 -1
  61. package/min/ui-react/index.js.gz +0 -0
  62. package/min/ui-react/with-schemas/index.js +1 -1
  63. package/min/ui-react/with-schemas/index.js.gz +0 -0
  64. package/min/ui-react-dom/index.js +1 -1
  65. package/min/ui-react-dom/index.js.gz +0 -0
  66. package/min/ui-react-dom/with-schemas/index.js +1 -1
  67. package/min/ui-react-dom/with-schemas/index.js.gz +0 -0
  68. package/min/ui-react-dom-charts/index.js +1 -0
  69. package/min/ui-react-dom-charts/index.js.gz +0 -0
  70. package/min/ui-react-dom-charts/with-schemas/index.js +1 -0
  71. package/min/ui-react-dom-charts/with-schemas/index.js.gz +0 -0
  72. package/min/ui-react-inspector/index.js +1 -1
  73. package/min/ui-react-inspector/index.js.gz +0 -0
  74. package/min/ui-react-inspector/with-schemas/index.js +1 -1
  75. package/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
  76. package/min/ui-solid-dom/index.js +1 -1
  77. package/min/ui-solid-dom/index.js.gz +0 -0
  78. package/min/ui-solid-dom/with-schemas/index.js +1 -1
  79. package/min/ui-solid-dom/with-schemas/index.js.gz +0 -0
  80. package/min/ui-solid-inspector/index.js +1 -1
  81. package/min/ui-solid-inspector/index.js.gz +0 -0
  82. package/min/ui-solid-inspector/with-schemas/index.js +1 -1
  83. package/min/ui-solid-inspector/with-schemas/index.js.gz +0 -0
  84. package/min/ui-svelte-dom/index.js +1 -1
  85. package/min/ui-svelte-dom/index.js.gz +0 -0
  86. package/min/ui-svelte-dom/with-schemas/index.js +1 -1
  87. package/min/ui-svelte-dom/with-schemas/index.js.gz +0 -0
  88. package/min/ui-svelte-inspector/index.js +1 -1
  89. package/min/ui-svelte-inspector/index.js.gz +0 -0
  90. package/min/ui-svelte-inspector/with-schemas/index.js +1 -1
  91. package/min/ui-svelte-inspector/with-schemas/index.js.gz +0 -0
  92. package/min/with-schemas/index.js +1 -1
  93. package/min/with-schemas/index.js.gz +0 -0
  94. package/omni/index.js +7 -4
  95. package/omni/with-schemas/index.js +7 -4
  96. package/package.json +53 -17
  97. package/persisters/persister-durable-object-sql-storage/index.js +13 -11
  98. package/persisters/persister-durable-object-sql-storage/with-schemas/index.js +13 -11
  99. package/persisters/persister-partykit-client/index.js +2 -1
  100. package/persisters/persister-partykit-client/with-schemas/index.js +2 -1
  101. package/persisters/persister-partykit-server/index.js +2 -1
  102. package/persisters/persister-partykit-server/with-schemas/index.js +2 -1
  103. package/queries/index.js +1 -1
  104. package/queries/with-schemas/index.js +1 -1
  105. package/readme.md +14 -14
  106. package/releases.md +124 -61
  107. package/synchronizers/index.js +3 -2
  108. package/synchronizers/synchronizer-broadcast-channel/index.js +3 -2
  109. package/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +3 -2
  110. package/synchronizers/synchronizer-local/index.js +3 -2
  111. package/synchronizers/synchronizer-local/with-schemas/index.js +3 -2
  112. package/synchronizers/synchronizer-ws-client/index.js +3 -2
  113. package/synchronizers/synchronizer-ws-client/with-schemas/index.js +3 -2
  114. package/synchronizers/synchronizer-ws-server/index.js +3 -2
  115. package/synchronizers/synchronizer-ws-server/with-schemas/index.js +3 -2
  116. package/synchronizers/synchronizer-ws-server-durable-object/index.js +3 -2
  117. package/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +3 -2
  118. package/synchronizers/with-schemas/index.js +3 -2
  119. package/ui-react/index.js +3 -0
  120. package/ui-react/with-schemas/index.js +3 -0
  121. package/ui-react-dom/index.js +18 -12
  122. package/ui-react-dom/with-schemas/index.js +18 -12
  123. package/ui-react-dom-charts/index.js +1783 -0
  124. package/ui-react-dom-charts/with-schemas/index.js +1783 -0
  125. package/ui-react-inspector/index.js +29 -20
  126. package/ui-react-inspector/with-schemas/index.js +29 -20
  127. package/ui-solid-dom/index.js +10 -7
  128. package/ui-solid-dom/with-schemas/index.js +10 -7
  129. package/ui-solid-inspector/index.js +16 -10
  130. package/ui-solid-inspector/with-schemas/index.js +16 -10
  131. package/ui-svelte/index.js +5 -5
  132. package/ui-svelte/with-schemas/index.js +5 -5
  133. package/ui-svelte-dom/index.js +162 -164
  134. package/ui-svelte-dom/with-schemas/index.js +162 -164
  135. package/ui-svelte-inspector/index.js +192 -196
  136. package/ui-svelte-inspector/with-schemas/index.js +192 -196
  137. package/with-schemas/index.js +5 -3
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -121,7 +122,7 @@ const encode = (num) => ENCODE[num & MASK6];
121
122
  const getRandomValues = GLOBAL.crypto
122
123
  ? (array) => GLOBAL.crypto.getRandomValues(array)
123
124
  : /* istanbul ignore next */
124
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
125
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
125
126
  const getUniqueId = (length = 16) =>
126
127
  arrayReduce(
127
128
  getRandomValues(new Uint8Array(length)),
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -121,7 +122,7 @@ const encode = (num) => ENCODE[num & MASK6];
121
122
  const getRandomValues = GLOBAL.crypto
122
123
  ? (array) => GLOBAL.crypto.getRandomValues(array)
123
124
  : /* istanbul ignore next */
124
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
125
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
125
126
  const getUniqueId = (length = 16) =>
126
127
  arrayReduce(
127
128
  getRandomValues(new Uint8Array(length)),
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -121,7 +122,7 @@ const encode = (num) => ENCODE[num & MASK6];
121
122
  const getRandomValues = GLOBAL.crypto
122
123
  ? (array) => GLOBAL.crypto.getRandomValues(array)
123
124
  : /* istanbul ignore next */
124
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
125
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
125
126
  const getUniqueId = (length = 16) =>
126
127
  arrayReduce(
127
128
  getRandomValues(new Uint8Array(length)),
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -123,7 +124,7 @@ const encode = (num) => ENCODE[num & MASK6];
123
124
  const getRandomValues = GLOBAL.crypto
124
125
  ? (array) => GLOBAL.crypto.getRandomValues(array)
125
126
  : /* istanbul ignore next */
126
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
127
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
127
128
  const getUniqueId = (length = 16) =>
128
129
  arrayReduce(
129
130
  getRandomValues(new Uint8Array(length)),
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -123,7 +124,7 @@ const encode = (num) => ENCODE[num & MASK6];
123
124
  const getRandomValues = GLOBAL.crypto
124
125
  ? (array) => GLOBAL.crypto.getRandomValues(array)
125
126
  : /* istanbul ignore next */
126
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
127
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
127
128
  const getUniqueId = (length = 16) =>
128
129
  arrayReduce(
129
130
  getRandomValues(new Uint8Array(length)),
@@ -9,6 +9,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
9
9
  str.split(separator, limit);
10
10
 
11
11
  const promise = Promise;
12
+ const math = Math;
12
13
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
13
14
  predicate(value)
14
15
  ? /* istanbul ignore next */
@@ -18,8 +19,8 @@ const GLOBAL = globalThis;
18
19
  const THOUSAND = 1e3;
19
20
  const startTimeout = (callback, sec = 0) =>
20
21
  setTimeout(callback, sec * THOUSAND);
21
- const math = Math;
22
22
  const mathFloor = math.floor;
23
+ const mathRandom = math.random;
23
24
  const isNullish = (thing) => thing == null;
24
25
  const isUndefined = (thing) => thing === void 0;
25
26
  const isNull = (thing) => thing === null;
@@ -163,7 +164,7 @@ const encode = (num) => ENCODE[num & MASK6];
163
164
  const getRandomValues = GLOBAL.crypto
164
165
  ? (array) => GLOBAL.crypto.getRandomValues(array)
165
166
  : /* istanbul ignore next */
166
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
167
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
167
168
  const getUniqueId = (length = 16) =>
168
169
  arrayReduce(
169
170
  getRandomValues(new Uint8Array(length)),
@@ -9,6 +9,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
9
9
  str.split(separator, limit);
10
10
 
11
11
  const promise = Promise;
12
+ const math = Math;
12
13
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
13
14
  predicate(value)
14
15
  ? /* istanbul ignore next */
@@ -18,8 +19,8 @@ const GLOBAL = globalThis;
18
19
  const THOUSAND = 1e3;
19
20
  const startTimeout = (callback, sec = 0) =>
20
21
  setTimeout(callback, sec * THOUSAND);
21
- const math = Math;
22
22
  const mathFloor = math.floor;
23
+ const mathRandom = math.random;
23
24
  const isNullish = (thing) => thing == null;
24
25
  const isUndefined = (thing) => thing === void 0;
25
26
  const isNull = (thing) => thing === null;
@@ -163,7 +164,7 @@ const encode = (num) => ENCODE[num & MASK6];
163
164
  const getRandomValues = GLOBAL.crypto
164
165
  ? (array) => GLOBAL.crypto.getRandomValues(array)
165
166
  : /* istanbul ignore next */
166
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
167
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
167
168
  const getUniqueId = (length = 16) =>
168
169
  arrayReduce(
169
170
  getRandomValues(new Uint8Array(length)),
@@ -9,6 +9,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
9
9
  str.split(separator, limit);
10
10
 
11
11
  const promise = Promise;
12
+ const math = Math;
12
13
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
13
14
  predicate(value)
14
15
  ? /* istanbul ignore next */
@@ -18,8 +19,8 @@ const GLOBAL = globalThis;
18
19
  const THOUSAND = 1e3;
19
20
  const startTimeout = (callback, sec = 0) =>
20
21
  setTimeout(callback, sec * THOUSAND);
21
- const math = Math;
22
22
  const mathFloor = math.floor;
23
+ const mathRandom = math.random;
23
24
  const isNullish = (thing) => thing == null;
24
25
  const isUndefined = (thing) => thing === void 0;
25
26
  const isNull = (thing) => thing === null;
@@ -269,7 +270,7 @@ const encode = (num) => ENCODE[num & MASK6];
269
270
  const getRandomValues = GLOBAL.crypto
270
271
  ? (array) => GLOBAL.crypto.getRandomValues(array)
271
272
  : /* istanbul ignore next */
272
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
273
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
273
274
  const getUniqueId = (length = 16) =>
274
275
  arrayReduce(
275
276
  getRandomValues(new Uint8Array(length)),
@@ -9,6 +9,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
9
9
  str.split(separator, limit);
10
10
 
11
11
  const promise = Promise;
12
+ const math = Math;
12
13
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
13
14
  predicate(value)
14
15
  ? /* istanbul ignore next */
@@ -18,8 +19,8 @@ const GLOBAL = globalThis;
18
19
  const THOUSAND = 1e3;
19
20
  const startTimeout = (callback, sec = 0) =>
20
21
  setTimeout(callback, sec * THOUSAND);
21
- const math = Math;
22
22
  const mathFloor = math.floor;
23
+ const mathRandom = math.random;
23
24
  const isNullish = (thing) => thing == null;
24
25
  const isUndefined = (thing) => thing === void 0;
25
26
  const isNull = (thing) => thing === null;
@@ -269,7 +270,7 @@ const encode = (num) => ENCODE[num & MASK6];
269
270
  const getRandomValues = GLOBAL.crypto
270
271
  ? (array) => GLOBAL.crypto.getRandomValues(array)
271
272
  : /* istanbul ignore next */
272
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
273
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
273
274
  const getUniqueId = (length = 16) =>
274
275
  arrayReduce(
275
276
  getRandomValues(new Uint8Array(length)),
@@ -8,6 +8,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
8
8
  str.split(separator, limit);
9
9
 
10
10
  const promise = Promise;
11
+ const math = Math;
11
12
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
12
13
  predicate(value)
13
14
  ? /* istanbul ignore next */
@@ -17,8 +18,8 @@ const GLOBAL = globalThis;
17
18
  const THOUSAND = 1e3;
18
19
  const startTimeout = (callback, sec = 0) =>
19
20
  setTimeout(callback, sec * THOUSAND);
20
- const math = Math;
21
21
  const mathFloor = math.floor;
22
+ const mathRandom = math.random;
22
23
  const isNullish = (thing) => thing == null;
23
24
  const isUndefined = (thing) => thing === void 0;
24
25
  const isNull = (thing) => thing === null;
@@ -165,7 +166,7 @@ const encode = (num) => ENCODE[num & MASK6];
165
166
  const getRandomValues = GLOBAL.crypto
166
167
  ? (array) => GLOBAL.crypto.getRandomValues(array)
167
168
  : /* istanbul ignore next */
168
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
169
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
169
170
  const getUniqueId = (length = 16) =>
170
171
  arrayReduce(
171
172
  getRandomValues(new Uint8Array(length)),
@@ -8,6 +8,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
8
8
  str.split(separator, limit);
9
9
 
10
10
  const promise = Promise;
11
+ const math = Math;
11
12
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
12
13
  predicate(value)
13
14
  ? /* istanbul ignore next */
@@ -17,8 +18,8 @@ const GLOBAL = globalThis;
17
18
  const THOUSAND = 1e3;
18
19
  const startTimeout = (callback, sec = 0) =>
19
20
  setTimeout(callback, sec * THOUSAND);
20
- const math = Math;
21
21
  const mathFloor = math.floor;
22
+ const mathRandom = math.random;
22
23
  const isNullish = (thing) => thing == null;
23
24
  const isUndefined = (thing) => thing === void 0;
24
25
  const isNull = (thing) => thing === null;
@@ -165,7 +166,7 @@ const encode = (num) => ENCODE[num & MASK6];
165
166
  const getRandomValues = GLOBAL.crypto
166
167
  ? (array) => GLOBAL.crypto.getRandomValues(array)
167
168
  : /* istanbul ignore next */
168
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
169
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
169
170
  const getUniqueId = (length = 16) =>
170
171
  arrayReduce(
171
172
  getRandomValues(new Uint8Array(length)),
@@ -4,6 +4,7 @@ const strSplit = (str, separator = EMPTY_STRING, limit) =>
4
4
  str.split(separator, limit);
5
5
 
6
6
  const promise = Promise;
7
+ const math = Math;
7
8
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
8
9
  predicate(value)
9
10
  ? /* istanbul ignore next */
@@ -13,8 +14,8 @@ const GLOBAL = globalThis;
13
14
  const THOUSAND = 1e3;
14
15
  const startTimeout = (callback, sec = 0) =>
15
16
  setTimeout(callback, sec * THOUSAND);
16
- const math = Math;
17
17
  const mathFloor = math.floor;
18
+ const mathRandom = math.random;
18
19
  const isNullish = (thing) => thing == null;
19
20
  const isUndefined = (thing) => thing === void 0;
20
21
  const isNull = (thing) => thing === null;
@@ -121,7 +122,7 @@ const encode = (num) => ENCODE[num & MASK6];
121
122
  const getRandomValues = GLOBAL.crypto
122
123
  ? (array) => GLOBAL.crypto.getRandomValues(array)
123
124
  : /* istanbul ignore next */
124
- (array) => arrayMap(array, () => mathFloor(math.random() * 256));
125
+ (array) => arrayMap(array, () => mathFloor(mathRandom() * 256));
125
126
  const getUniqueId = (length = 16) =>
126
127
  arrayReduce(
127
128
  getRandomValues(new Uint8Array(length)),
package/ui-react/index.js CHANGED
@@ -119,8 +119,11 @@ const objIsEqual = (
119
119
  const jsonString = JSON.stringify;
120
120
 
121
121
  const {
122
+ Children,
123
+ Fragment,
122
124
  PureComponent,
123
125
  createContext,
126
+ isValidElement,
124
127
  useCallback,
125
128
  useContext,
126
129
  useEffect,
@@ -119,8 +119,11 @@ const objIsEqual = (
119
119
  const jsonString = JSON.stringify;
120
120
 
121
121
  const {
122
+ Children,
123
+ Fragment,
122
124
  PureComponent,
123
125
  createContext,
126
+ isValidElement,
124
127
  useCallback,
125
128
  useContext,
126
129
  useEffect,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import {Fragment, jsx, jsxs} from 'react/jsx-runtime';
2
+ import {Fragment as Fragment$1, jsx, jsxs} from 'react/jsx-runtime';
3
3
  import {CellView, ResultCellView, ValueView} from '../ui-react/index.js';
4
4
 
5
5
  const getTypeOf = (thing) => typeof thing;
@@ -38,13 +38,16 @@ const EXTRA = 'extra';
38
38
  const strSplit = (str, separator = EMPTY_STRING, limit) =>
39
39
  str.split(separator, limit);
40
40
 
41
+ const math = Math;
41
42
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
42
43
  predicate(value)
43
44
  ? /* istanbul ignore next */
44
45
  otherwise?.()
45
46
  : then(value);
46
47
  const GLOBAL = globalThis;
47
- const math = Math;
48
+ const number = Number;
49
+ const string = String;
50
+ const boolean = Boolean;
48
51
  const mathMin = math.min;
49
52
  const isFiniteNumber = isFinite;
50
53
  const isNullish = (thing) => thing == null;
@@ -128,8 +131,11 @@ const jsonString = JSON.stringify;
128
131
  const jsonParse = JSON.parse;
129
132
 
130
133
  const {
134
+ Children,
135
+ Fragment,
131
136
  PureComponent,
132
137
  createContext,
138
+ isValidElement,
133
139
  useCallback,
134
140
  useContext,
135
141
  useEffect,
@@ -705,9 +711,9 @@ const EditableThing = ({
705
711
  } else if (isArray(thing)) {
706
712
  setArrayThing(jsonString(thing));
707
713
  } else {
708
- setStringThing(String(thing));
709
- setNumberThing(Number(thing) || 0);
710
- setBooleanThing(Boolean(thing));
714
+ setStringThing(string(thing));
715
+ setNumberThing(number(thing) || 0);
716
+ setBooleanThing(boolean(thing));
711
717
  }
712
718
  }
713
719
  const handleThingChange = useCallback(
@@ -775,7 +781,7 @@ const EditableThing = ({
775
781
  onChange: useCallback(
776
782
  (event) =>
777
783
  handleThingChange(
778
- String(event[CURRENT_TARGET][_VALUE]),
784
+ string(event[CURRENT_TARGET][_VALUE]),
779
785
  setStringThing,
780
786
  ),
781
787
  [handleThingChange],
@@ -791,7 +797,7 @@ const EditableThing = ({
791
797
  onChange: useCallback(
792
798
  (event) =>
793
799
  handleThingChange(
794
- Number(event[CURRENT_TARGET][_VALUE] || 0),
800
+ number(event[CURRENT_TARGET][_VALUE] || 0),
795
801
  setNumberThing,
796
802
  ),
797
803
  [handleThingChange],
@@ -807,7 +813,7 @@ const EditableThing = ({
807
813
  onChange: useCallback(
808
814
  (event) =>
809
815
  handleThingChange(
810
- Boolean(event[CURRENT_TARGET].checked),
816
+ boolean(event[CURRENT_TARGET].checked),
811
817
  setBooleanThing,
812
818
  ),
813
819
  [handleThingChange],
@@ -924,7 +930,7 @@ const RelationshipInHtmlRow = ({
924
930
  extraRowCells(extraCellsBefore, rowProps),
925
931
  isFalse(idColumn)
926
932
  ? null
927
- : /* @__PURE__ */ jsxs(Fragment, {
933
+ : /* @__PURE__ */ jsxs(Fragment$1, {
928
934
  children: [
929
935
  /* @__PURE__ */ jsx('th', {
930
936
  title: localRowId,
@@ -1013,7 +1019,7 @@ const RelationshipInHtmlTable = ({
1013
1019
  extraHeaders(extraCellsBefore),
1014
1020
  isFalse(idColumn)
1015
1021
  ? null
1016
- : /* @__PURE__ */ jsxs(Fragment, {
1022
+ : /* @__PURE__ */ jsxs(Fragment$1, {
1017
1023
  children: [
1018
1024
  /* @__PURE__ */ jsxs('th', {
1019
1025
  children: [localTableId, '.Id'],
@@ -1130,10 +1136,10 @@ const SortedTablePaginator = ({
1130
1136
  [onChange, offset, limit],
1131
1137
  offset + limit < total,
1132
1138
  );
1133
- return /* @__PURE__ */ jsxs(Fragment, {
1139
+ return /* @__PURE__ */ jsxs(Fragment$1, {
1134
1140
  children: [
1135
1141
  total > limit &&
1136
- /* @__PURE__ */ jsxs(Fragment, {
1142
+ /* @__PURE__ */ jsxs(Fragment$1, {
1137
1143
  children: [
1138
1144
  /* @__PURE__ */ jsx('button', {
1139
1145
  className: 'previous',
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import {Fragment, jsx, jsxs} from 'react/jsx-runtime';
2
+ import {Fragment as Fragment$1, jsx, jsxs} from 'react/jsx-runtime';
3
3
  import {CellView, ResultCellView, ValueView} from '../../ui-react/with-schemas/index.js';
4
4
 
5
5
  const getTypeOf = (thing) => typeof thing;
@@ -38,13 +38,16 @@ const EXTRA = 'extra';
38
38
  const strSplit = (str, separator = EMPTY_STRING, limit) =>
39
39
  str.split(separator, limit);
40
40
 
41
+ const math = Math;
41
42
  const getIfNotFunction = (predicate) => (value, then, otherwise) =>
42
43
  predicate(value)
43
44
  ? /* istanbul ignore next */
44
45
  otherwise?.()
45
46
  : then(value);
46
47
  const GLOBAL = globalThis;
47
- const math = Math;
48
+ const number = Number;
49
+ const string = String;
50
+ const boolean = Boolean;
48
51
  const mathMin = math.min;
49
52
  const isFiniteNumber = isFinite;
50
53
  const isNullish = (thing) => thing == null;
@@ -128,8 +131,11 @@ const jsonString = JSON.stringify;
128
131
  const jsonParse = JSON.parse;
129
132
 
130
133
  const {
134
+ Children,
135
+ Fragment,
131
136
  PureComponent,
132
137
  createContext,
138
+ isValidElement,
133
139
  useCallback,
134
140
  useContext,
135
141
  useEffect,
@@ -705,9 +711,9 @@ const EditableThing = ({
705
711
  } else if (isArray(thing)) {
706
712
  setArrayThing(jsonString(thing));
707
713
  } else {
708
- setStringThing(String(thing));
709
- setNumberThing(Number(thing) || 0);
710
- setBooleanThing(Boolean(thing));
714
+ setStringThing(string(thing));
715
+ setNumberThing(number(thing) || 0);
716
+ setBooleanThing(boolean(thing));
711
717
  }
712
718
  }
713
719
  const handleThingChange = useCallback(
@@ -775,7 +781,7 @@ const EditableThing = ({
775
781
  onChange: useCallback(
776
782
  (event) =>
777
783
  handleThingChange(
778
- String(event[CURRENT_TARGET][_VALUE]),
784
+ string(event[CURRENT_TARGET][_VALUE]),
779
785
  setStringThing,
780
786
  ),
781
787
  [handleThingChange],
@@ -791,7 +797,7 @@ const EditableThing = ({
791
797
  onChange: useCallback(
792
798
  (event) =>
793
799
  handleThingChange(
794
- Number(event[CURRENT_TARGET][_VALUE] || 0),
800
+ number(event[CURRENT_TARGET][_VALUE] || 0),
795
801
  setNumberThing,
796
802
  ),
797
803
  [handleThingChange],
@@ -807,7 +813,7 @@ const EditableThing = ({
807
813
  onChange: useCallback(
808
814
  (event) =>
809
815
  handleThingChange(
810
- Boolean(event[CURRENT_TARGET].checked),
816
+ boolean(event[CURRENT_TARGET].checked),
811
817
  setBooleanThing,
812
818
  ),
813
819
  [handleThingChange],
@@ -924,7 +930,7 @@ const RelationshipInHtmlRow = ({
924
930
  extraRowCells(extraCellsBefore, rowProps),
925
931
  isFalse(idColumn)
926
932
  ? null
927
- : /* @__PURE__ */ jsxs(Fragment, {
933
+ : /* @__PURE__ */ jsxs(Fragment$1, {
928
934
  children: [
929
935
  /* @__PURE__ */ jsx('th', {
930
936
  title: localRowId,
@@ -1013,7 +1019,7 @@ const RelationshipInHtmlTable = ({
1013
1019
  extraHeaders(extraCellsBefore),
1014
1020
  isFalse(idColumn)
1015
1021
  ? null
1016
- : /* @__PURE__ */ jsxs(Fragment, {
1022
+ : /* @__PURE__ */ jsxs(Fragment$1, {
1017
1023
  children: [
1018
1024
  /* @__PURE__ */ jsxs('th', {
1019
1025
  children: [localTableId, '.Id'],
@@ -1130,10 +1136,10 @@ const SortedTablePaginator = ({
1130
1136
  [onChange, offset, limit],
1131
1137
  offset + limit < total,
1132
1138
  );
1133
- return /* @__PURE__ */ jsxs(Fragment, {
1139
+ return /* @__PURE__ */ jsxs(Fragment$1, {
1134
1140
  children: [
1135
1141
  total > limit &&
1136
- /* @__PURE__ */ jsxs(Fragment, {
1142
+ /* @__PURE__ */ jsxs(Fragment$1, {
1137
1143
  children: [
1138
1144
  /* @__PURE__ */ jsx('button', {
1139
1145
  className: 'previous',