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
|
@@ -112,6 +112,7 @@ const id = (key) => EMPTY_STRING + key;
|
|
|
112
112
|
const strSplit = (str, separator = EMPTY_STRING, limit) =>
|
|
113
113
|
str.split(separator, limit);
|
|
114
114
|
|
|
115
|
+
const math = Math;
|
|
115
116
|
const getIfNotFunction = (predicate) => (value, then, otherwise) =>
|
|
116
117
|
predicate(value)
|
|
117
118
|
? /* istanbul ignore next */
|
|
@@ -119,7 +120,9 @@ const getIfNotFunction = (predicate) => (value, then, otherwise) =>
|
|
|
119
120
|
: then(value);
|
|
120
121
|
const GLOBAL = globalThis;
|
|
121
122
|
const WINDOW = GLOBAL.window;
|
|
122
|
-
const
|
|
123
|
+
const number = Number;
|
|
124
|
+
const string = String;
|
|
125
|
+
const boolean = Boolean;
|
|
123
126
|
const mathMin = math.min;
|
|
124
127
|
const mathFloor = math.floor;
|
|
125
128
|
const isFiniteNumber = isFinite;
|
|
@@ -162,6 +165,7 @@ const tryCatch = async (action, then1, then2) => {
|
|
|
162
165
|
};
|
|
163
166
|
|
|
164
167
|
const arrayHas = (array, value) => array.includes(value);
|
|
168
|
+
const arrayIndexOf = (array, value) => array.indexOf(value);
|
|
165
169
|
const arrayEvery = (array, cb) => array.every(cb);
|
|
166
170
|
const arrayIsEqual = (array1, array2) =>
|
|
167
171
|
size(array1) === size(array2) &&
|
|
@@ -284,7 +288,7 @@ const NO_PROVIDED_OBJECTS_MESSAGE =
|
|
|
284
288
|
const INSPECTOR_ERROR_MESSAGE =
|
|
285
289
|
'Inspector error: please see console for details.';
|
|
286
290
|
const getInitialPosition = (position) => {
|
|
287
|
-
const index = POSITIONS
|
|
291
|
+
const index = arrayIndexOf(POSITIONS, position);
|
|
288
292
|
return index == -1 ? 1 : index;
|
|
289
293
|
};
|
|
290
294
|
const getUniqueId = (...args) => jsonStringWithMap(args);
|
|
@@ -419,6 +423,7 @@ const TEXT_OVERFLOW = 'text-overflow';
|
|
|
419
423
|
const ALIGN_ITEMS = 'align-items';
|
|
420
424
|
const BACKDROP_FILTER = 'backdrop-filter';
|
|
421
425
|
const MARGIN_RIGHT = MARGIN + '-' + RIGHT;
|
|
426
|
+
const Z_INDEX = 'z-index';
|
|
422
427
|
const FIXED = 'fixed';
|
|
423
428
|
const REVERT = 'revert';
|
|
424
429
|
const UNSET = 'unset';
|
|
@@ -442,8 +447,8 @@ const APP_STYLESHEET = arrayJoin(
|
|
|
442
447
|
all: 'initial',
|
|
443
448
|
[FONT_SIZE]: rem(0.75),
|
|
444
449
|
[POSITION]: FIXED,
|
|
450
|
+
[Z_INDEX]: 999999,
|
|
445
451
|
'font-family': 'inter,sans-serif',
|
|
446
|
-
'z-index': 999999,
|
|
447
452
|
'--bg': oklch(20),
|
|
448
453
|
'--bg2': oklch(15),
|
|
449
454
|
'--bg3': oklch(25),
|
|
@@ -547,6 +552,7 @@ const APP_STYLESHEET = arrayJoin(
|
|
|
547
552
|
[BACKGROUND]: oklch(30, '% 0.008 var(--hue) / .5'),
|
|
548
553
|
[WIDTH]: 'calc(100% - .5rem)',
|
|
549
554
|
[POSITION]: 'absolute',
|
|
555
|
+
[Z_INDEX]: 1,
|
|
550
556
|
[BORDER + '-' + BOTTOM]: cssVar(BORDER),
|
|
551
557
|
[ALIGN_ITEMS]: 'center',
|
|
552
558
|
[BACKDROP_FILTER]: 'blur(4px)',
|
|
@@ -3516,9 +3522,9 @@ const EditableThing = (props) => {
|
|
|
3516
3522
|
} else if (isArray(thing)) {
|
|
3517
3523
|
setArrayThing(jsonString(thing));
|
|
3518
3524
|
} else {
|
|
3519
|
-
setStringThing(
|
|
3520
|
-
setNumberThing(
|
|
3521
|
-
setBooleanThing(
|
|
3525
|
+
setStringThing(string(thing));
|
|
3526
|
+
setNumberThing(number(thing) || 0);
|
|
3527
|
+
setBooleanThing(boolean(thing));
|
|
3522
3528
|
}
|
|
3523
3529
|
}
|
|
3524
3530
|
});
|
|
@@ -3575,7 +3581,7 @@ const EditableThing = (props) => {
|
|
|
3575
3581
|
var _el$0 = _tmpl$7$1();
|
|
3576
3582
|
_el$0.addEventListener('input', (event) =>
|
|
3577
3583
|
handleThingChange(
|
|
3578
|
-
|
|
3584
|
+
string(event[CURRENT_TARGET][_VALUE]),
|
|
3579
3585
|
setStringThing,
|
|
3580
3586
|
),
|
|
3581
3587
|
);
|
|
@@ -3586,7 +3592,7 @@ const EditableThing = (props) => {
|
|
|
3586
3592
|
var _el$1 = _tmpl$8$1();
|
|
3587
3593
|
_el$1.addEventListener('input', (event) =>
|
|
3588
3594
|
handleThingChange(
|
|
3589
|
-
|
|
3595
|
+
number(event[CURRENT_TARGET][_VALUE] || 0),
|
|
3590
3596
|
setNumberThing,
|
|
3591
3597
|
),
|
|
3592
3598
|
);
|
|
@@ -3597,7 +3603,7 @@ const EditableThing = (props) => {
|
|
|
3597
3603
|
var _el$10 = _tmpl$9$1();
|
|
3598
3604
|
_el$10.addEventListener('input', (event) =>
|
|
3599
3605
|
handleThingChange(
|
|
3600
|
-
|
|
3606
|
+
boolean(event[CURRENT_TARGET].checked),
|
|
3601
3607
|
setBooleanThing,
|
|
3602
3608
|
),
|
|
3603
3609
|
);
|
|
@@ -5286,7 +5292,7 @@ const Header = (props) => {
|
|
|
5286
5292
|
const handleClick = () => open('https://tinybase.org', '_blank');
|
|
5287
5293
|
const handleClose = () => props.s.setValue(OPEN_VALUE, false);
|
|
5288
5294
|
const handleDock = (event) =>
|
|
5289
|
-
props.s.setValue(POSITION_VALUE,
|
|
5295
|
+
props.s.setValue(POSITION_VALUE, number(event.currentTarget.dataset.id));
|
|
5290
5296
|
return (() => {
|
|
5291
5297
|
var _el$24 = _tmpl$1(),
|
|
5292
5298
|
_el$25 = _el$24.firstChild,
|
package/ui-svelte/index.js
CHANGED
|
@@ -60,7 +60,7 @@ const objGet = (obj, id) => ifNotUndefined(obj, (obj2) => obj2[id]);
|
|
|
60
60
|
|
|
61
61
|
const TINYBASE_CONTEXT_KEY = TINYBASE + '_uisc';
|
|
62
62
|
|
|
63
|
-
/* functions.svelte.ts generated by Svelte v5.
|
|
63
|
+
/* functions.svelte.ts generated by Svelte v5.56.3 */
|
|
64
64
|
|
|
65
65
|
class ReactiveHandle {
|
|
66
66
|
#get;
|
|
@@ -1163,13 +1163,13 @@ function CheckpointView($$anchor, $$props) {
|
|
|
1163
1163
|
$.pop();
|
|
1164
1164
|
}
|
|
1165
1165
|
|
|
1166
|
-
var
|
|
1167
|
-
var
|
|
1166
|
+
var root$1 = $.from_html(`<!><!>`, 1);
|
|
1167
|
+
var root_1 = $.from_html(`<!><!><!>`, 1);
|
|
1168
1168
|
|
|
1169
1169
|
function Wrap($$anchor, $$props) {
|
|
1170
1170
|
$.push($$props, true);
|
|
1171
1171
|
|
|
1172
|
-
var fragment =
|
|
1172
|
+
var fragment = root_1();
|
|
1173
1173
|
var node = $.first_child(fragment);
|
|
1174
1174
|
|
|
1175
1175
|
{
|
|
@@ -1195,7 +1195,7 @@ function Wrap($$anchor, $$props) {
|
|
|
1195
1195
|
() => $$props.ids,
|
|
1196
1196
|
(itemId) => itemId,
|
|
1197
1197
|
($$anchor, itemId, i) => {
|
|
1198
|
-
var fragment_2 =
|
|
1198
|
+
var fragment_2 = root$1();
|
|
1199
1199
|
var node_2 = $.first_child(fragment_2);
|
|
1200
1200
|
|
|
1201
1201
|
{
|
|
@@ -60,7 +60,7 @@ const objGet = (obj, id) => ifNotUndefined(obj, (obj2) => obj2[id]);
|
|
|
60
60
|
|
|
61
61
|
const TINYBASE_CONTEXT_KEY = TINYBASE + '_uisc';
|
|
62
62
|
|
|
63
|
-
/* functions.svelte.ts generated by Svelte v5.
|
|
63
|
+
/* functions.svelte.ts generated by Svelte v5.56.3 */
|
|
64
64
|
|
|
65
65
|
class ReactiveHandle {
|
|
66
66
|
#get;
|
|
@@ -1163,13 +1163,13 @@ function CheckpointView($$anchor, $$props) {
|
|
|
1163
1163
|
$.pop();
|
|
1164
1164
|
}
|
|
1165
1165
|
|
|
1166
|
-
var
|
|
1167
|
-
var
|
|
1166
|
+
var root$1 = $.from_html(`<!><!>`, 1);
|
|
1167
|
+
var root_1 = $.from_html(`<!><!><!>`, 1);
|
|
1168
1168
|
|
|
1169
1169
|
function Wrap($$anchor, $$props) {
|
|
1170
1170
|
$.push($$props, true);
|
|
1171
1171
|
|
|
1172
|
-
var fragment =
|
|
1172
|
+
var fragment = root_1();
|
|
1173
1173
|
var node = $.first_child(fragment);
|
|
1174
1174
|
|
|
1175
1175
|
{
|
|
@@ -1195,7 +1195,7 @@ function Wrap($$anchor, $$props) {
|
|
|
1195
1195
|
() => $$props.ids,
|
|
1196
1196
|
(itemId) => itemId,
|
|
1197
1197
|
($$anchor, itemId, i) => {
|
|
1198
|
-
var fragment_2 =
|
|
1198
|
+
var fragment_2 = root$1();
|
|
1199
1199
|
var node_2 = $.first_child(fragment_2);
|
|
1200
1200
|
|
|
1201
1201
|
{
|