tinybase 8.1.0-beta.2 → 8.1.0-beta.4

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 (65) hide show
  1. package/@types/ui-svelte/index.d.ts +743 -825
  2. package/@types/ui-svelte/with-schemas/index.d.ts +747 -841
  3. package/index.js +1 -1
  4. package/mergeable-store/index.js +1 -1
  5. package/mergeable-store/with-schemas/index.js +1 -1
  6. package/min/index.js +1 -1
  7. package/min/index.js.gz +0 -0
  8. package/min/mergeable-store/index.js +1 -1
  9. package/min/mergeable-store/index.js.gz +0 -0
  10. package/min/mergeable-store/with-schemas/index.js +1 -1
  11. package/min/mergeable-store/with-schemas/index.js.gz +0 -0
  12. package/min/omni/index.js +1 -1
  13. package/min/omni/index.js.gz +0 -0
  14. package/min/omni/with-schemas/index.js +1 -1
  15. package/min/omni/with-schemas/index.js.gz +0 -0
  16. package/min/persisters/persister-remote/index.js +1 -1
  17. package/min/persisters/persister-remote/index.js.gz +0 -0
  18. package/min/persisters/persister-remote/with-schemas/index.js +1 -1
  19. package/min/persisters/persister-remote/with-schemas/index.js.gz +0 -0
  20. package/min/queries/index.js +1 -1
  21. package/min/queries/index.js.gz +0 -0
  22. package/min/queries/with-schemas/index.js +1 -1
  23. package/min/queries/with-schemas/index.js.gz +0 -0
  24. package/min/store/index.js +1 -1
  25. package/min/store/index.js.gz +0 -0
  26. package/min/store/with-schemas/index.js +1 -1
  27. package/min/store/with-schemas/index.js.gz +0 -0
  28. package/min/ui-react/index.js +1 -1
  29. package/min/ui-react/index.js.gz +0 -0
  30. package/min/ui-react/with-schemas/index.js +1 -1
  31. package/min/ui-react/with-schemas/index.js.gz +0 -0
  32. package/min/ui-react-dom/index.js +1 -1
  33. package/min/ui-react-dom/index.js.gz +0 -0
  34. package/min/ui-react-dom/with-schemas/index.js +1 -1
  35. package/min/ui-react-dom/with-schemas/index.js.gz +0 -0
  36. package/min/ui-react-inspector/index.js +1 -1
  37. package/min/ui-react-inspector/index.js.gz +0 -0
  38. package/min/ui-react-inspector/with-schemas/index.js +1 -1
  39. package/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
  40. package/min/ui-svelte/index.js +1 -1
  41. package/min/ui-svelte/index.js.gz +0 -0
  42. package/min/ui-svelte/with-schemas/index.js +1 -1
  43. package/min/ui-svelte/with-schemas/index.js.gz +0 -0
  44. package/min/with-schemas/index.js +1 -1
  45. package/min/with-schemas/index.js.gz +0 -0
  46. package/omni/index.js +11 -10
  47. package/omni/with-schemas/index.js +11 -10
  48. package/package.json +17 -17
  49. package/persisters/persister-remote/index.js +10 -9
  50. package/persisters/persister-remote/with-schemas/index.js +10 -9
  51. package/queries/index.js +1 -1
  52. package/queries/with-schemas/index.js +1 -1
  53. package/readme.md +3 -3
  54. package/releases.md +16 -5
  55. package/store/index.js +1 -1
  56. package/store/with-schemas/index.js +1 -1
  57. package/ui-react/index.js +7 -6
  58. package/ui-react/with-schemas/index.js +7 -6
  59. package/ui-react-dom/index.js +7 -6
  60. package/ui-react-dom/with-schemas/index.js +7 -6
  61. package/ui-react-inspector/index.js +29 -21
  62. package/ui-react-inspector/with-schemas/index.js +29 -21
  63. package/ui-svelte/index.js +550 -598
  64. package/ui-svelte/with-schemas/index.js +550 -598
  65. package/with-schemas/index.js +1 -1
@@ -194,7 +194,7 @@ const objIsEqual = (
194
194
  isObject(value1)
195
195
  ? /* istanbul ignore next */
196
196
  isObject(obj2[index])
197
- ? objIsEqual(obj2[index], value1)
197
+ ? objIsEqual(obj2[index], value1, isEqual)
198
198
  : false
199
199
  : isEqual(value1, obj2[index]),
200
200
  )
@@ -2589,8 +2589,12 @@ const DEFAULTS = [
2589
2589
  false,
2590
2590
  0,
2591
2591
  ];
2592
+ const cellOrValueEqual = (thing1, thing2) =>
2593
+ thing1 === thing2 ||
2594
+ ((isObject(thing1) || isArray(thing1)) &&
2595
+ jsonString(thing1) === jsonString(thing2));
2592
2596
  const IS_EQUALS = [
2593
- objIsEqual,
2597
+ (obj1, obj2) => objIsEqual(obj1, obj2, cellOrValueEqual),
2594
2598
  arrayIsEqual,
2595
2599
  (
2596
2600
  [backwardIds1, currentId1, forwardIds1],
@@ -2602,10 +2606,7 @@ const IS_EQUALS = [
2602
2606
  (paramValues1, paramValues2) =>
2603
2607
  objIsEqual(paramValues1, paramValues2, arrayOrValueEqual),
2604
2608
  arrayOrValueEqual,
2605
- (thing1, thing2) =>
2606
- thing1 === thing2 ||
2607
- ((isObject(thing1) || isArray(thing1)) &&
2608
- jsonString(thing1) === jsonString(thing2)),
2609
+ cellOrValueEqual,
2609
2610
  ];
2610
2611
  const isEqual = (thing1, thing2) => thing1 === thing2;
2611
2612
  const addAndDelListener = (thing, listenable, ...args) => {
@@ -4414,7 +4415,7 @@ const TablesView = ({store, storeId, s}) => {
4414
4415
  s,
4415
4416
  children: [
4416
4417
  arrayIsEmpty(tableIds)
4417
- ? /* @__PURE__ */ jsx('caption', {children: 'No tables.'})
4418
+ ? /* @__PURE__ */ jsx('p', {children: 'No tables.'})
4418
4419
  : sortedIdsMap(tableIds, (tableId) =>
4419
4420
  /* @__PURE__ */ jsx(
4420
4421
  TableView,
@@ -4511,7 +4512,7 @@ const ValuesView = ({store, storeId, s}) => {
4511
4512
  s,
4512
4513
  children: [
4513
4514
  arrayIsEmpty(useValueIds$1(store))
4514
- ? /* @__PURE__ */ jsx('caption', {children: 'No values.'})
4515
+ ? /* @__PURE__ */ jsx('p', {children: 'No values.'})
4515
4516
  : /* @__PURE__ */ jsx(ValuesInHtmlTable, {
4516
4517
  store,
4517
4518
  editable,
@@ -4788,10 +4789,10 @@ const MAX_WIDTH = 'max-' + WIDTH;
4788
4789
  const MIN_WIDTH = 'min-' + WIDTH;
4789
4790
  const HEIGHT = 'height';
4790
4791
  const BORDER = 'border';
4791
- const BORDER_RADIUS = BORDER + '-radius';
4792
+ const RADIUS = 'radius';
4793
+ const BORDER_RADIUS = BORDER + '-' + RADIUS;
4792
4794
  const PADDING = 'padding';
4793
4795
  const MARGIN = 'margin';
4794
- const MARGIN_RIGHT = MARGIN + '-right';
4795
4796
  const TOP = 'top';
4796
4797
  const BOTTOM = 'bottom';
4797
4798
  const LEFT = 'left';
@@ -4806,6 +4807,11 @@ const CURSOR = 'cursor';
4806
4807
  const VERTICAL_ALIGN = 'vertical-align';
4807
4808
  const TEXT_ALIGN = 'text-align';
4808
4809
  const JUSTIFY_CONTENT = 'justify-content';
4810
+ const WHITE_SPACE = 'white-space';
4811
+ const TEXT_OVERFLOW = 'text-overflow';
4812
+ const ALIGN_ITEMS = 'align-items';
4813
+ const BACKDROP_FILTER = 'backdrop-filter';
4814
+ const MARGIN_RIGHT = MARGIN + '-' + RIGHT;
4809
4815
  const FIXED = 'fixed';
4810
4816
  const REVERT = 'revert';
4811
4817
  const UNSET = 'unset';
@@ -4935,8 +4941,8 @@ const APP_STYLESHEET = arrayJoin(
4935
4941
  [WIDTH]: 'calc(100% - .5rem)',
4936
4942
  [POSITION]: 'absolute',
4937
4943
  [BORDER + '-' + BOTTOM]: cssVar(BORDER),
4938
- 'align-items': 'center',
4939
- 'backdrop-filter': 'blur(4px)',
4944
+ [ALIGN_ITEMS]: 'center',
4945
+ [BACKDROP_FILTER]: 'blur(4px)',
4940
4946
  },
4941
4947
  'header>img:nth-of-type(1)': {
4942
4948
  [HEIGHT]: rem(1),
@@ -4954,8 +4960,8 @@ const APP_STYLESHEET = arrayJoin(
4954
4960
  [OVERFLOW]: HIDDEN,
4955
4961
  [FLEX]: 1,
4956
4962
  'font-weight': 800,
4957
- 'white-space': NOWRAP,
4958
- 'text-overflow': 'ellipsis',
4963
+ [WHITE_SPACE]: NOWRAP,
4964
+ [TEXT_OVERFLOW]: 'ellipsis',
4959
4965
  },
4960
4966
  // Body
4961
4967
  article: {[OVERFLOW]: AUTO, [FLEX]: 1, [PADDING + '-' + TOP]: rem(2)},
@@ -4973,7 +4979,8 @@ const APP_STYLESHEET = arrayJoin(
4973
4979
  [BORDER_RADIUS]: rem(0.25),
4974
4980
  'user-select': NONE,
4975
4981
  [JUSTIFY_CONTENT]: 'space-between',
4976
- 'align-items': 'center',
4982
+ [ALIGN_ITEMS]: 'center',
4983
+ [BACKDROP_FILTER]: 'blur(4px)',
4977
4984
  },
4978
4985
  'summary>span::before': {
4979
4986
  [DISPLAY]: 'inline-block',
@@ -4984,8 +4991,8 @@ const APP_STYLESHEET = arrayJoin(
4984
4991
  ...RIGHT_SVG,
4985
4992
  },
4986
4993
  'details[open]>summary': {
4987
- 'border-bottom-left-radius': 0,
4988
- 'border-bottom-right-radius': 0,
4994
+ [BORDER + '-' + BOTTOM + '-' + LEFT + '-' + RADIUS]: 0,
4995
+ [BORDER + '-' + BOTTOM + '-' + RIGHT + '-' + RADIUS]: 0,
4989
4996
  [MARGIN + '-' + BOTTOM]: 0,
4990
4997
  },
4991
4998
  'details[open]>summary>span::before': DOWN_SVG,
@@ -4995,11 +5002,12 @@ const APP_STYLESHEET = arrayJoin(
4995
5002
  [MARGIN + '-' + LEFT]: rem(0.25),
4996
5003
  },
4997
5004
  'details>div': {[OVERFLOW]: AUTO},
4998
- caption: {
5005
+ [`caption,#${UNIQUE_ID} p`]: {
4999
5006
  [COLOR]: cssVar('fg2'),
5000
5007
  [PADDING]: rem(0.25, 0.5),
5001
5008
  [TEXT_ALIGN]: LEFT,
5002
- 'white-space': NOWRAP,
5009
+ [MARGIN]: 0,
5010
+ [WHITE_SPACE]: NOWRAP,
5003
5011
  },
5004
5012
  'caption button': {
5005
5013
  [WIDTH]: rem(1.5),
@@ -5029,8 +5037,8 @@ const APP_STYLESHEET = arrayJoin(
5029
5037
  [PADDING]: rem(0.25, 0.5),
5030
5038
  [MAX_WIDTH]: rem(20),
5031
5039
  [BORDER]: cssVar(BORDER),
5032
- 'text-overflow': 'ellipsis',
5033
- 'white-space': NOWRAP,
5040
+ [TEXT_OVERFLOW]: 'ellipsis',
5041
+ [WHITE_SPACE]: NOWRAP,
5034
5042
  'border-width': px(1, 0, 0),
5035
5043
  [TEXT_ALIGN]: LEFT,
5036
5044
  },
@@ -194,7 +194,7 @@ const objIsEqual = (
194
194
  isObject(value1)
195
195
  ? /* istanbul ignore next */
196
196
  isObject(obj2[index])
197
- ? objIsEqual(obj2[index], value1)
197
+ ? objIsEqual(obj2[index], value1, isEqual)
198
198
  : false
199
199
  : isEqual(value1, obj2[index]),
200
200
  )
@@ -2589,8 +2589,12 @@ const DEFAULTS = [
2589
2589
  false,
2590
2590
  0,
2591
2591
  ];
2592
+ const cellOrValueEqual = (thing1, thing2) =>
2593
+ thing1 === thing2 ||
2594
+ ((isObject(thing1) || isArray(thing1)) &&
2595
+ jsonString(thing1) === jsonString(thing2));
2592
2596
  const IS_EQUALS = [
2593
- objIsEqual,
2597
+ (obj1, obj2) => objIsEqual(obj1, obj2, cellOrValueEqual),
2594
2598
  arrayIsEqual,
2595
2599
  (
2596
2600
  [backwardIds1, currentId1, forwardIds1],
@@ -2602,10 +2606,7 @@ const IS_EQUALS = [
2602
2606
  (paramValues1, paramValues2) =>
2603
2607
  objIsEqual(paramValues1, paramValues2, arrayOrValueEqual),
2604
2608
  arrayOrValueEqual,
2605
- (thing1, thing2) =>
2606
- thing1 === thing2 ||
2607
- ((isObject(thing1) || isArray(thing1)) &&
2608
- jsonString(thing1) === jsonString(thing2)),
2609
+ cellOrValueEqual,
2609
2610
  ];
2610
2611
  const isEqual = (thing1, thing2) => thing1 === thing2;
2611
2612
  const addAndDelListener = (thing, listenable, ...args) => {
@@ -4414,7 +4415,7 @@ const TablesView = ({store, storeId, s}) => {
4414
4415
  s,
4415
4416
  children: [
4416
4417
  arrayIsEmpty(tableIds)
4417
- ? /* @__PURE__ */ jsx('caption', {children: 'No tables.'})
4418
+ ? /* @__PURE__ */ jsx('p', {children: 'No tables.'})
4418
4419
  : sortedIdsMap(tableIds, (tableId) =>
4419
4420
  /* @__PURE__ */ jsx(
4420
4421
  TableView,
@@ -4511,7 +4512,7 @@ const ValuesView = ({store, storeId, s}) => {
4511
4512
  s,
4512
4513
  children: [
4513
4514
  arrayIsEmpty(useValueIds$1(store))
4514
- ? /* @__PURE__ */ jsx('caption', {children: 'No values.'})
4515
+ ? /* @__PURE__ */ jsx('p', {children: 'No values.'})
4515
4516
  : /* @__PURE__ */ jsx(ValuesInHtmlTable, {
4516
4517
  store,
4517
4518
  editable,
@@ -4788,10 +4789,10 @@ const MAX_WIDTH = 'max-' + WIDTH;
4788
4789
  const MIN_WIDTH = 'min-' + WIDTH;
4789
4790
  const HEIGHT = 'height';
4790
4791
  const BORDER = 'border';
4791
- const BORDER_RADIUS = BORDER + '-radius';
4792
+ const RADIUS = 'radius';
4793
+ const BORDER_RADIUS = BORDER + '-' + RADIUS;
4792
4794
  const PADDING = 'padding';
4793
4795
  const MARGIN = 'margin';
4794
- const MARGIN_RIGHT = MARGIN + '-right';
4795
4796
  const TOP = 'top';
4796
4797
  const BOTTOM = 'bottom';
4797
4798
  const LEFT = 'left';
@@ -4806,6 +4807,11 @@ const CURSOR = 'cursor';
4806
4807
  const VERTICAL_ALIGN = 'vertical-align';
4807
4808
  const TEXT_ALIGN = 'text-align';
4808
4809
  const JUSTIFY_CONTENT = 'justify-content';
4810
+ const WHITE_SPACE = 'white-space';
4811
+ const TEXT_OVERFLOW = 'text-overflow';
4812
+ const ALIGN_ITEMS = 'align-items';
4813
+ const BACKDROP_FILTER = 'backdrop-filter';
4814
+ const MARGIN_RIGHT = MARGIN + '-' + RIGHT;
4809
4815
  const FIXED = 'fixed';
4810
4816
  const REVERT = 'revert';
4811
4817
  const UNSET = 'unset';
@@ -4935,8 +4941,8 @@ const APP_STYLESHEET = arrayJoin(
4935
4941
  [WIDTH]: 'calc(100% - .5rem)',
4936
4942
  [POSITION]: 'absolute',
4937
4943
  [BORDER + '-' + BOTTOM]: cssVar(BORDER),
4938
- 'align-items': 'center',
4939
- 'backdrop-filter': 'blur(4px)',
4944
+ [ALIGN_ITEMS]: 'center',
4945
+ [BACKDROP_FILTER]: 'blur(4px)',
4940
4946
  },
4941
4947
  'header>img:nth-of-type(1)': {
4942
4948
  [HEIGHT]: rem(1),
@@ -4954,8 +4960,8 @@ const APP_STYLESHEET = arrayJoin(
4954
4960
  [OVERFLOW]: HIDDEN,
4955
4961
  [FLEX]: 1,
4956
4962
  'font-weight': 800,
4957
- 'white-space': NOWRAP,
4958
- 'text-overflow': 'ellipsis',
4963
+ [WHITE_SPACE]: NOWRAP,
4964
+ [TEXT_OVERFLOW]: 'ellipsis',
4959
4965
  },
4960
4966
  // Body
4961
4967
  article: {[OVERFLOW]: AUTO, [FLEX]: 1, [PADDING + '-' + TOP]: rem(2)},
@@ -4973,7 +4979,8 @@ const APP_STYLESHEET = arrayJoin(
4973
4979
  [BORDER_RADIUS]: rem(0.25),
4974
4980
  'user-select': NONE,
4975
4981
  [JUSTIFY_CONTENT]: 'space-between',
4976
- 'align-items': 'center',
4982
+ [ALIGN_ITEMS]: 'center',
4983
+ [BACKDROP_FILTER]: 'blur(4px)',
4977
4984
  },
4978
4985
  'summary>span::before': {
4979
4986
  [DISPLAY]: 'inline-block',
@@ -4984,8 +4991,8 @@ const APP_STYLESHEET = arrayJoin(
4984
4991
  ...RIGHT_SVG,
4985
4992
  },
4986
4993
  'details[open]>summary': {
4987
- 'border-bottom-left-radius': 0,
4988
- 'border-bottom-right-radius': 0,
4994
+ [BORDER + '-' + BOTTOM + '-' + LEFT + '-' + RADIUS]: 0,
4995
+ [BORDER + '-' + BOTTOM + '-' + RIGHT + '-' + RADIUS]: 0,
4989
4996
  [MARGIN + '-' + BOTTOM]: 0,
4990
4997
  },
4991
4998
  'details[open]>summary>span::before': DOWN_SVG,
@@ -4995,11 +5002,12 @@ const APP_STYLESHEET = arrayJoin(
4995
5002
  [MARGIN + '-' + LEFT]: rem(0.25),
4996
5003
  },
4997
5004
  'details>div': {[OVERFLOW]: AUTO},
4998
- caption: {
5005
+ [`caption,#${UNIQUE_ID} p`]: {
4999
5006
  [COLOR]: cssVar('fg2'),
5000
5007
  [PADDING]: rem(0.25, 0.5),
5001
5008
  [TEXT_ALIGN]: LEFT,
5002
- 'white-space': NOWRAP,
5009
+ [MARGIN]: 0,
5010
+ [WHITE_SPACE]: NOWRAP,
5003
5011
  },
5004
5012
  'caption button': {
5005
5013
  [WIDTH]: rem(1.5),
@@ -5029,8 +5037,8 @@ const APP_STYLESHEET = arrayJoin(
5029
5037
  [PADDING]: rem(0.25, 0.5),
5030
5038
  [MAX_WIDTH]: rem(20),
5031
5039
  [BORDER]: cssVar(BORDER),
5032
- 'text-overflow': 'ellipsis',
5033
- 'white-space': NOWRAP,
5040
+ [TEXT_OVERFLOW]: 'ellipsis',
5041
+ [WHITE_SPACE]: NOWRAP,
5034
5042
  'border-width': px(1, 0, 0),
5035
5043
  [TEXT_ALIGN]: LEFT,
5036
5044
  },