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.
- package/@types/ui-react-dom-charts/index.d.ts +387 -0
- package/@types/ui-react-dom-charts/with-schemas/index.d.ts +476 -0
- package/common/index.js +3 -2
- package/common/with-schemas/index.js +3 -2
- package/index.js +5 -3
- package/mergeable-store/index.js +5 -3
- package/mergeable-store/with-schemas/index.js +5 -3
- package/metrics/index.js +1 -1
- package/metrics/with-schemas/index.js +1 -1
- package/min/common/index.js +1 -1
- package/min/common/index.js.gz +0 -0
- package/min/common/with-schemas/index.js +1 -1
- package/min/common/with-schemas/index.js.gz +0 -0
- package/min/index.js +1 -1
- package/min/index.js.gz +0 -0
- package/min/mergeable-store/index.js +1 -1
- package/min/mergeable-store/index.js.gz +0 -0
- package/min/mergeable-store/with-schemas/index.js +1 -1
- package/min/mergeable-store/with-schemas/index.js.gz +0 -0
- package/min/omni/index.js +1 -1
- package/min/omni/index.js.gz +0 -0
- package/min/omni/with-schemas/index.js +1 -1
- package/min/omni/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-durable-object-sql-storage/index.js +1 -1
- package/min/persisters/persister-durable-object-sql-storage/index.js.gz +0 -0
- package/min/persisters/persister-durable-object-sql-storage/with-schemas/index.js +1 -1
- package/min/persisters/persister-durable-object-sql-storage/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-partykit-server/index.js +1 -1
- package/min/persisters/persister-partykit-server/index.js.gz +0 -0
- package/min/persisters/persister-partykit-server/with-schemas/index.js +1 -1
- package/min/persisters/persister-partykit-server/with-schemas/index.js.gz +0 -0
- package/min/queries/index.js +1 -1
- package/min/queries/index.js.gz +0 -0
- package/min/queries/with-schemas/index.js +1 -1
- package/min/queries/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/index.js +1 -1
- package/min/synchronizers/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-broadcast-channel/index.js +1 -1
- package/min/synchronizers/synchronizer-broadcast-channel/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-local/index.js +1 -1
- package/min/synchronizers/synchronizer-local/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-local/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-local/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-client/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server-durable-object/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/with-schemas/index.js +1 -1
- package/min/synchronizers/with-schemas/index.js.gz +0 -0
- package/min/ui-react/index.js +1 -1
- package/min/ui-react/index.js.gz +0 -0
- package/min/ui-react/with-schemas/index.js +1 -1
- package/min/ui-react/with-schemas/index.js.gz +0 -0
- package/min/ui-react-dom/index.js +1 -1
- package/min/ui-react-dom/index.js.gz +0 -0
- package/min/ui-react-dom/with-schemas/index.js +1 -1
- package/min/ui-react-dom/with-schemas/index.js.gz +0 -0
- package/min/ui-react-dom-charts/index.js +1 -0
- package/min/ui-react-dom-charts/index.js.gz +0 -0
- package/min/ui-react-dom-charts/with-schemas/index.js +1 -0
- package/min/ui-react-dom-charts/with-schemas/index.js.gz +0 -0
- package/min/ui-react-inspector/index.js +1 -1
- package/min/ui-react-inspector/index.js.gz +0 -0
- package/min/ui-react-inspector/with-schemas/index.js +1 -1
- package/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
- package/min/ui-solid-dom/index.js +1 -1
- package/min/ui-solid-dom/index.js.gz +0 -0
- package/min/ui-solid-dom/with-schemas/index.js +1 -1
- package/min/ui-solid-dom/with-schemas/index.js.gz +0 -0
- package/min/ui-solid-inspector/index.js +1 -1
- package/min/ui-solid-inspector/index.js.gz +0 -0
- package/min/ui-solid-inspector/with-schemas/index.js +1 -1
- package/min/ui-solid-inspector/with-schemas/index.js.gz +0 -0
- package/min/ui-svelte-dom/index.js +1 -1
- package/min/ui-svelte-dom/index.js.gz +0 -0
- package/min/ui-svelte-dom/with-schemas/index.js +1 -1
- package/min/ui-svelte-dom/with-schemas/index.js.gz +0 -0
- package/min/ui-svelte-inspector/index.js +1 -1
- package/min/ui-svelte-inspector/index.js.gz +0 -0
- package/min/ui-svelte-inspector/with-schemas/index.js +1 -1
- package/min/ui-svelte-inspector/with-schemas/index.js.gz +0 -0
- package/min/with-schemas/index.js +1 -1
- package/min/with-schemas/index.js.gz +0 -0
- package/omni/index.js +7 -4
- package/omni/with-schemas/index.js +7 -4
- package/package.json +53 -17
- package/persisters/persister-durable-object-sql-storage/index.js +13 -11
- package/persisters/persister-durable-object-sql-storage/with-schemas/index.js +13 -11
- package/persisters/persister-partykit-client/index.js +2 -1
- package/persisters/persister-partykit-client/with-schemas/index.js +2 -1
- package/persisters/persister-partykit-server/index.js +2 -1
- package/persisters/persister-partykit-server/with-schemas/index.js +2 -1
- package/queries/index.js +1 -1
- package/queries/with-schemas/index.js +1 -1
- package/readme.md +14 -14
- package/releases.md +124 -61
- package/synchronizers/index.js +3 -2
- package/synchronizers/synchronizer-broadcast-channel/index.js +3 -2
- package/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +3 -2
- package/synchronizers/synchronizer-local/index.js +3 -2
- package/synchronizers/synchronizer-local/with-schemas/index.js +3 -2
- package/synchronizers/synchronizer-ws-client/index.js +3 -2
- package/synchronizers/synchronizer-ws-client/with-schemas/index.js +3 -2
- package/synchronizers/synchronizer-ws-server/index.js +3 -2
- package/synchronizers/synchronizer-ws-server/with-schemas/index.js +3 -2
- package/synchronizers/synchronizer-ws-server-durable-object/index.js +3 -2
- package/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +3 -2
- package/synchronizers/with-schemas/index.js +3 -2
- package/ui-react/index.js +3 -0
- package/ui-react/with-schemas/index.js +3 -0
- package/ui-react-dom/index.js +18 -12
- package/ui-react-dom/with-schemas/index.js +18 -12
- package/ui-react-dom-charts/index.js +1783 -0
- package/ui-react-dom-charts/with-schemas/index.js +1783 -0
- package/ui-react-inspector/index.js +29 -20
- package/ui-react-inspector/with-schemas/index.js +29 -20
- package/ui-solid-dom/index.js +10 -7
- package/ui-solid-dom/with-schemas/index.js +10 -7
- package/ui-solid-inspector/index.js +16 -10
- package/ui-solid-inspector/with-schemas/index.js +16 -10
- package/ui-svelte/index.js +5 -5
- package/ui-svelte/with-schemas/index.js +5 -5
- package/ui-svelte-dom/index.js +162 -164
- package/ui-svelte-dom/with-schemas/index.js +162 -164
- package/ui-svelte-inspector/index.js +192 -196
- package/ui-svelte-inspector/with-schemas/index.js +192 -196
- package/with-schemas/index.js +5 -3
package/synchronizers/index.js
CHANGED
|
@@ -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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
package/ui-react-dom/index.js
CHANGED
|
@@ -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
|
|
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(
|
|
709
|
-
setNumberThing(
|
|
710
|
-
setBooleanThing(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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(
|
|
709
|
-
setNumberThing(
|
|
710
|
-
setBooleanThing(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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',
|