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
@@ -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 math = Math;
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.indexOf(position);
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(String(thing));
3520
- setNumberThing(Number(thing) || 0);
3521
- setBooleanThing(Boolean(thing));
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
- String(event[CURRENT_TARGET][_VALUE]),
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
- Number(event[CURRENT_TARGET][_VALUE] || 0),
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
- Boolean(event[CURRENT_TARGET].checked),
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, Number(event.currentTarget.dataset.id));
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,
@@ -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.55.5 */
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 root_2 = $.from_html(`<!><!>`, 1);
1167
- var root$1 = $.from_html(`<!><!><!>`, 1);
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 = root$1();
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 = root_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.55.5 */
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 root_2 = $.from_html(`<!><!>`, 1);
1167
- var root$1 = $.from_html(`<!><!><!>`, 1);
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 = root$1();
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 = root_2();
1198
+ var fragment_2 = root$1();
1199
1199
  var node_2 = $.first_child(fragment_2);
1200
1200
 
1201
1201
  {