tinybase 6.0.0-beta.1 → 6.0.0-beta.3

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 (386) hide show
  1. package/@types/_internal/queries/with-schemas/index.d.cts +6 -6
  2. package/@types/_internal/queries/with-schemas/index.d.ts +6 -6
  3. package/@types/_internal/store/with-schemas/index.d.cts +1 -1
  4. package/@types/_internal/store/with-schemas/index.d.ts +1 -1
  5. package/@types/_internal/ui-react/with-schemas/index.d.cts +13 -13
  6. package/@types/_internal/ui-react/with-schemas/index.d.ts +13 -13
  7. package/@types/checkpoints/index.d.cts +0 -1
  8. package/@types/checkpoints/index.d.ts +0 -1
  9. package/@types/checkpoints/with-schemas/index.d.cts +0 -1
  10. package/@types/checkpoints/with-schemas/index.d.ts +0 -1
  11. package/@types/indexes/index.d.cts +1 -2
  12. package/@types/indexes/index.d.ts +1 -2
  13. package/@types/indexes/with-schemas/index.d.cts +6 -7
  14. package/@types/indexes/with-schemas/index.d.ts +6 -7
  15. package/@types/mergeable-store/index.d.cts +1 -2
  16. package/@types/mergeable-store/index.d.ts +1 -2
  17. package/@types/mergeable-store/with-schemas/index.d.cts +1 -2
  18. package/@types/mergeable-store/with-schemas/index.d.ts +1 -2
  19. package/@types/metrics/index.d.cts +1 -2
  20. package/@types/metrics/index.d.ts +1 -2
  21. package/@types/metrics/with-schemas/index.d.cts +1 -2
  22. package/@types/metrics/with-schemas/index.d.ts +1 -2
  23. package/@types/persisters/index.d.cts +22 -23
  24. package/@types/persisters/index.d.ts +22 -23
  25. package/@types/persisters/persister-automerge/index.d.cts +6 -7
  26. package/@types/persisters/persister-automerge/index.d.ts +6 -7
  27. package/@types/persisters/persister-automerge/with-schemas/index.d.cts +5 -6
  28. package/@types/persisters/persister-automerge/with-schemas/index.d.ts +5 -6
  29. package/@types/persisters/persister-browser/index.d.cts +5 -6
  30. package/@types/persisters/persister-browser/index.d.ts +5 -6
  31. package/@types/persisters/persister-browser/with-schemas/index.d.cts +5 -6
  32. package/@types/persisters/persister-browser/with-schemas/index.d.ts +5 -6
  33. package/@types/persisters/persister-cr-sqlite-wasm/index.d.cts +7 -8
  34. package/@types/persisters/persister-cr-sqlite-wasm/index.d.ts +7 -8
  35. package/@types/persisters/persister-cr-sqlite-wasm/with-schemas/index.d.cts +10 -11
  36. package/@types/persisters/persister-cr-sqlite-wasm/with-schemas/index.d.ts +10 -11
  37. package/@types/persisters/persister-durable-object-storage/index.d.cts +5 -6
  38. package/@types/persisters/persister-durable-object-storage/index.d.ts +5 -6
  39. package/@types/persisters/persister-durable-object-storage/with-schemas/index.d.cts +5 -6
  40. package/@types/persisters/persister-durable-object-storage/with-schemas/index.d.ts +5 -6
  41. package/@types/persisters/persister-electric-sql/index.d.cts +7 -8
  42. package/@types/persisters/persister-electric-sql/index.d.ts +7 -8
  43. package/@types/persisters/persister-electric-sql/with-schemas/index.d.cts +10 -11
  44. package/@types/persisters/persister-electric-sql/with-schemas/index.d.ts +10 -11
  45. package/@types/persisters/persister-expo-sqlite/index.d.cts +8 -9
  46. package/@types/persisters/persister-expo-sqlite/index.d.ts +8 -9
  47. package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.cts +11 -12
  48. package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.ts +11 -12
  49. package/@types/persisters/persister-file/index.d.cts +3 -4
  50. package/@types/persisters/persister-file/index.d.ts +3 -4
  51. package/@types/persisters/persister-file/with-schemas/index.d.cts +3 -4
  52. package/@types/persisters/persister-file/with-schemas/index.d.ts +3 -4
  53. package/@types/persisters/persister-indexed-db/index.d.cts +3 -4
  54. package/@types/persisters/persister-indexed-db/index.d.ts +3 -4
  55. package/@types/persisters/persister-indexed-db/with-schemas/index.d.cts +2 -3
  56. package/@types/persisters/persister-indexed-db/with-schemas/index.d.ts +2 -3
  57. package/@types/persisters/persister-libsql/index.d.cts +4 -5
  58. package/@types/persisters/persister-libsql/index.d.ts +4 -5
  59. package/@types/persisters/persister-libsql/with-schemas/index.d.cts +7 -8
  60. package/@types/persisters/persister-libsql/with-schemas/index.d.ts +7 -8
  61. package/@types/persisters/persister-partykit-client/index.d.cts +4 -5
  62. package/@types/persisters/persister-partykit-client/index.d.ts +4 -5
  63. package/@types/persisters/persister-partykit-client/with-schemas/index.d.cts +3 -4
  64. package/@types/persisters/persister-partykit-client/with-schemas/index.d.ts +3 -4
  65. package/@types/persisters/persister-partykit-server/index.d.cts +1 -2
  66. package/@types/persisters/persister-partykit-server/index.d.ts +1 -2
  67. package/@types/persisters/persister-partykit-server/with-schemas/index.d.cts +1 -2
  68. package/@types/persisters/persister-partykit-server/with-schemas/index.d.ts +1 -2
  69. package/@types/persisters/persister-pglite/index.d.cts +5 -6
  70. package/@types/persisters/persister-pglite/index.d.ts +5 -6
  71. package/@types/persisters/persister-pglite/with-schemas/index.d.cts +8 -9
  72. package/@types/persisters/persister-pglite/with-schemas/index.d.ts +8 -9
  73. package/@types/persisters/persister-postgres/index.d.cts +8 -9
  74. package/@types/persisters/persister-postgres/index.d.ts +8 -9
  75. package/@types/persisters/persister-postgres/with-schemas/index.d.cts +11 -12
  76. package/@types/persisters/persister-postgres/with-schemas/index.d.ts +11 -12
  77. package/@types/persisters/persister-powersync/index.d.cts +7 -8
  78. package/@types/persisters/persister-powersync/index.d.ts +7 -8
  79. package/@types/persisters/persister-powersync/with-schemas/index.d.cts +10 -11
  80. package/@types/persisters/persister-powersync/with-schemas/index.d.ts +10 -11
  81. package/@types/persisters/persister-remote/index.d.cts +3 -4
  82. package/@types/persisters/persister-remote/index.d.ts +3 -4
  83. package/@types/persisters/persister-remote/with-schemas/index.d.cts +2 -3
  84. package/@types/persisters/persister-remote/with-schemas/index.d.ts +2 -3
  85. package/@types/persisters/persister-sqlite-wasm/index.d.cts +7 -8
  86. package/@types/persisters/persister-sqlite-wasm/index.d.ts +7 -8
  87. package/@types/persisters/persister-sqlite-wasm/with-schemas/index.d.cts +11 -12
  88. package/@types/persisters/persister-sqlite-wasm/with-schemas/index.d.ts +11 -12
  89. package/@types/persisters/persister-sqlite3/index.d.cts +5 -6
  90. package/@types/persisters/persister-sqlite3/index.d.ts +5 -6
  91. package/@types/persisters/persister-sqlite3/with-schemas/index.d.cts +8 -9
  92. package/@types/persisters/persister-sqlite3/with-schemas/index.d.ts +8 -9
  93. package/@types/persisters/persister-yjs/index.d.cts +4 -5
  94. package/@types/persisters/persister-yjs/index.d.ts +4 -5
  95. package/@types/persisters/persister-yjs/with-schemas/index.d.cts +3 -4
  96. package/@types/persisters/persister-yjs/with-schemas/index.d.ts +3 -4
  97. package/@types/persisters/with-schemas/index.d.cts +26 -27
  98. package/@types/persisters/with-schemas/index.d.ts +26 -27
  99. package/@types/queries/index.d.cts +1 -2
  100. package/@types/queries/index.d.ts +1 -2
  101. package/@types/queries/with-schemas/index.d.cts +10 -11
  102. package/@types/queries/with-schemas/index.d.ts +10 -11
  103. package/@types/relationships/index.d.cts +25 -2
  104. package/@types/relationships/index.d.ts +25 -2
  105. package/@types/relationships/with-schemas/index.d.cts +25 -2
  106. package/@types/relationships/with-schemas/index.d.ts +25 -2
  107. package/@types/store/index.d.cts +1 -2
  108. package/@types/store/index.d.ts +1 -2
  109. package/@types/store/with-schemas/index.d.cts +0 -1
  110. package/@types/store/with-schemas/index.d.ts +0 -1
  111. package/@types/synchronizers/index.d.cts +6 -7
  112. package/@types/synchronizers/index.d.ts +6 -7
  113. package/@types/synchronizers/synchronizer-broadcast-channel/index.d.cts +3 -4
  114. package/@types/synchronizers/synchronizer-broadcast-channel/index.d.ts +3 -4
  115. package/@types/synchronizers/synchronizer-broadcast-channel/with-schemas/index.d.cts +3 -4
  116. package/@types/synchronizers/synchronizer-broadcast-channel/with-schemas/index.d.ts +3 -4
  117. package/@types/synchronizers/synchronizer-local/index.d.cts +2 -3
  118. package/@types/synchronizers/synchronizer-local/index.d.ts +2 -3
  119. package/@types/synchronizers/synchronizer-local/with-schemas/index.d.cts +2 -3
  120. package/@types/synchronizers/synchronizer-local/with-schemas/index.d.ts +2 -3
  121. package/@types/synchronizers/synchronizer-ws-client/index.d.cts +5 -6
  122. package/@types/synchronizers/synchronizer-ws-client/index.d.ts +5 -6
  123. package/@types/synchronizers/synchronizer-ws-client/with-schemas/index.d.cts +5 -6
  124. package/@types/synchronizers/synchronizer-ws-client/with-schemas/index.d.ts +5 -6
  125. package/@types/synchronizers/synchronizer-ws-server/index.d.cts +30 -32
  126. package/@types/synchronizers/synchronizer-ws-server/index.d.ts +30 -32
  127. package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.cts +34 -36
  128. package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.ts +34 -36
  129. package/@types/synchronizers/synchronizer-ws-server-durable-object/index.d.cts +2 -3
  130. package/@types/synchronizers/synchronizer-ws-server-durable-object/index.d.ts +2 -3
  131. package/@types/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.d.cts +6 -7
  132. package/@types/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.d.ts +6 -7
  133. package/@types/synchronizers/synchronizer-ws-server-simple/index.d.cts +4 -5
  134. package/@types/synchronizers/synchronizer-ws-server-simple/index.d.ts +4 -5
  135. package/@types/synchronizers/synchronizer-ws-server-simple/with-schemas/index.d.cts +4 -5
  136. package/@types/synchronizers/synchronizer-ws-server-simple/with-schemas/index.d.ts +4 -5
  137. package/@types/synchronizers/with-schemas/index.d.cts +10 -11
  138. package/@types/synchronizers/with-schemas/index.d.ts +10 -11
  139. package/@types/ui-react/index.d.cts +489 -490
  140. package/@types/ui-react/index.d.ts +489 -490
  141. package/@types/ui-react/with-schemas/index.d.cts +494 -495
  142. package/@types/ui-react/with-schemas/index.d.ts +494 -495
  143. package/@types/ui-react-dom/index.d.cts +39 -40
  144. package/@types/ui-react-dom/index.d.ts +39 -40
  145. package/@types/ui-react-dom/with-schemas/index.d.cts +39 -40
  146. package/@types/ui-react-dom/with-schemas/index.d.ts +39 -40
  147. package/@types/ui-react-inspector/index.d.cts +2 -3
  148. package/@types/ui-react-inspector/index.d.ts +2 -3
  149. package/@types/ui-react-inspector/with-schemas/index.d.cts +41 -42
  150. package/@types/ui-react-inspector/with-schemas/index.d.ts +41 -42
  151. package/checkpoints/index.js +9 -9
  152. package/checkpoints/with-schemas/index.js +9 -9
  153. package/index.js +110 -110
  154. package/indexes/index.js +3 -3
  155. package/indexes/with-schemas/index.js +3 -3
  156. package/mergeable-store/index.js +150 -150
  157. package/mergeable-store/with-schemas/index.js +150 -150
  158. package/metrics/index.js +3 -3
  159. package/metrics/with-schemas/index.js +3 -3
  160. package/min/checkpoints/index.js +1 -1
  161. package/min/checkpoints/index.js.gz +0 -0
  162. package/min/checkpoints/with-schemas/index.js +1 -1
  163. package/min/checkpoints/with-schemas/index.js.gz +0 -0
  164. package/min/index.js +1 -1
  165. package/min/index.js.gz +0 -0
  166. package/min/indexes/index.js +1 -1
  167. package/min/indexes/index.js.gz +0 -0
  168. package/min/indexes/with-schemas/index.js +1 -1
  169. package/min/indexes/with-schemas/index.js.gz +0 -0
  170. package/min/mergeable-store/index.js +1 -1
  171. package/min/mergeable-store/index.js.gz +0 -0
  172. package/min/mergeable-store/with-schemas/index.js +1 -1
  173. package/min/mergeable-store/with-schemas/index.js.gz +0 -0
  174. package/min/metrics/index.js +1 -1
  175. package/min/metrics/index.js.gz +0 -0
  176. package/min/metrics/with-schemas/index.js +1 -1
  177. package/min/metrics/with-schemas/index.js.gz +0 -0
  178. package/min/persisters/index.js +1 -1
  179. package/min/persisters/index.js.gz +0 -0
  180. package/min/persisters/persister-automerge/index.js +1 -1
  181. package/min/persisters/persister-automerge/index.js.gz +0 -0
  182. package/min/persisters/persister-automerge/with-schemas/index.js +1 -1
  183. package/min/persisters/persister-automerge/with-schemas/index.js.gz +0 -0
  184. package/min/persisters/persister-browser/index.js +1 -1
  185. package/min/persisters/persister-browser/index.js.gz +0 -0
  186. package/min/persisters/persister-browser/with-schemas/index.js +1 -1
  187. package/min/persisters/persister-browser/with-schemas/index.js.gz +0 -0
  188. package/min/persisters/persister-cr-sqlite-wasm/index.js +1 -1
  189. package/min/persisters/persister-cr-sqlite-wasm/index.js.gz +0 -0
  190. package/min/persisters/persister-cr-sqlite-wasm/with-schemas/index.js +1 -1
  191. package/min/persisters/persister-cr-sqlite-wasm/with-schemas/index.js.gz +0 -0
  192. package/min/persisters/persister-durable-object-storage/index.js +1 -1
  193. package/min/persisters/persister-durable-object-storage/index.js.gz +0 -0
  194. package/min/persisters/persister-durable-object-storage/with-schemas/index.js +1 -1
  195. package/min/persisters/persister-durable-object-storage/with-schemas/index.js.gz +0 -0
  196. package/min/persisters/persister-electric-sql/index.js +1 -1
  197. package/min/persisters/persister-electric-sql/index.js.gz +0 -0
  198. package/min/persisters/persister-electric-sql/with-schemas/index.js +1 -1
  199. package/min/persisters/persister-electric-sql/with-schemas/index.js.gz +0 -0
  200. package/min/persisters/persister-expo-sqlite/index.js +1 -1
  201. package/min/persisters/persister-expo-sqlite/index.js.gz +0 -0
  202. package/min/persisters/persister-expo-sqlite/with-schemas/index.js +1 -1
  203. package/min/persisters/persister-expo-sqlite/with-schemas/index.js.gz +0 -0
  204. package/min/persisters/persister-file/index.js +1 -1
  205. package/min/persisters/persister-file/index.js.gz +0 -0
  206. package/min/persisters/persister-file/with-schemas/index.js +1 -1
  207. package/min/persisters/persister-file/with-schemas/index.js.gz +0 -0
  208. package/min/persisters/persister-indexed-db/index.js +1 -1
  209. package/min/persisters/persister-indexed-db/index.js.gz +0 -0
  210. package/min/persisters/persister-indexed-db/with-schemas/index.js +1 -1
  211. package/min/persisters/persister-indexed-db/with-schemas/index.js.gz +0 -0
  212. package/min/persisters/persister-libsql/index.js +1 -1
  213. package/min/persisters/persister-libsql/index.js.gz +0 -0
  214. package/min/persisters/persister-libsql/with-schemas/index.js +1 -1
  215. package/min/persisters/persister-libsql/with-schemas/index.js.gz +0 -0
  216. package/min/persisters/persister-partykit-client/index.js +1 -1
  217. package/min/persisters/persister-partykit-client/index.js.gz +0 -0
  218. package/min/persisters/persister-partykit-client/with-schemas/index.js +1 -1
  219. package/min/persisters/persister-partykit-client/with-schemas/index.js.gz +0 -0
  220. package/min/persisters/persister-partykit-server/index.js +1 -1
  221. package/min/persisters/persister-partykit-server/index.js.gz +0 -0
  222. package/min/persisters/persister-partykit-server/with-schemas/index.js +1 -1
  223. package/min/persisters/persister-partykit-server/with-schemas/index.js.gz +0 -0
  224. package/min/persisters/persister-pglite/index.js +1 -1
  225. package/min/persisters/persister-pglite/index.js.gz +0 -0
  226. package/min/persisters/persister-pglite/with-schemas/index.js +1 -1
  227. package/min/persisters/persister-pglite/with-schemas/index.js.gz +0 -0
  228. package/min/persisters/persister-postgres/index.js +1 -1
  229. package/min/persisters/persister-postgres/index.js.gz +0 -0
  230. package/min/persisters/persister-postgres/with-schemas/index.js +1 -1
  231. package/min/persisters/persister-postgres/with-schemas/index.js.gz +0 -0
  232. package/min/persisters/persister-powersync/index.js +1 -1
  233. package/min/persisters/persister-powersync/index.js.gz +0 -0
  234. package/min/persisters/persister-powersync/with-schemas/index.js +1 -1
  235. package/min/persisters/persister-powersync/with-schemas/index.js.gz +0 -0
  236. package/min/persisters/persister-remote/index.js +1 -1
  237. package/min/persisters/persister-remote/index.js.gz +0 -0
  238. package/min/persisters/persister-remote/with-schemas/index.js +1 -1
  239. package/min/persisters/persister-remote/with-schemas/index.js.gz +0 -0
  240. package/min/persisters/persister-sqlite-wasm/index.js +1 -1
  241. package/min/persisters/persister-sqlite-wasm/index.js.gz +0 -0
  242. package/min/persisters/persister-sqlite-wasm/with-schemas/index.js +1 -1
  243. package/min/persisters/persister-sqlite-wasm/with-schemas/index.js.gz +0 -0
  244. package/min/persisters/persister-sqlite3/index.js +1 -1
  245. package/min/persisters/persister-sqlite3/index.js.gz +0 -0
  246. package/min/persisters/persister-sqlite3/with-schemas/index.js +1 -1
  247. package/min/persisters/persister-sqlite3/with-schemas/index.js.gz +0 -0
  248. package/min/persisters/persister-yjs/index.js +1 -1
  249. package/min/persisters/persister-yjs/index.js.gz +0 -0
  250. package/min/persisters/persister-yjs/with-schemas/index.js +1 -1
  251. package/min/persisters/persister-yjs/with-schemas/index.js.gz +0 -0
  252. package/min/persisters/with-schemas/index.js +1 -1
  253. package/min/persisters/with-schemas/index.js.gz +0 -0
  254. package/min/queries/index.js +1 -1
  255. package/min/queries/index.js.gz +0 -0
  256. package/min/queries/with-schemas/index.js +1 -1
  257. package/min/queries/with-schemas/index.js.gz +0 -0
  258. package/min/relationships/index.js +1 -1
  259. package/min/relationships/index.js.gz +0 -0
  260. package/min/relationships/with-schemas/index.js +1 -1
  261. package/min/relationships/with-schemas/index.js.gz +0 -0
  262. package/min/store/index.js +1 -1
  263. package/min/store/index.js.gz +0 -0
  264. package/min/store/with-schemas/index.js +1 -1
  265. package/min/store/with-schemas/index.js.gz +0 -0
  266. package/min/synchronizers/index.js +1 -1
  267. package/min/synchronizers/index.js.gz +0 -0
  268. package/min/synchronizers/synchronizer-broadcast-channel/index.js +1 -1
  269. package/min/synchronizers/synchronizer-broadcast-channel/index.js.gz +0 -0
  270. package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +1 -1
  271. package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js.gz +0 -0
  272. package/min/synchronizers/synchronizer-local/index.js +1 -1
  273. package/min/synchronizers/synchronizer-local/index.js.gz +0 -0
  274. package/min/synchronizers/synchronizer-local/with-schemas/index.js +1 -1
  275. package/min/synchronizers/synchronizer-local/with-schemas/index.js.gz +0 -0
  276. package/min/synchronizers/synchronizer-ws-client/index.js +1 -1
  277. package/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
  278. package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
  279. package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
  280. package/min/synchronizers/synchronizer-ws-server/index.js +1 -1
  281. package/min/synchronizers/synchronizer-ws-server/index.js.gz +0 -0
  282. package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js +1 -1
  283. package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js.gz +0 -0
  284. package/min/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
  285. package/min/synchronizers/synchronizer-ws-server-durable-object/index.js.gz +0 -0
  286. package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
  287. package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js.gz +0 -0
  288. package/min/synchronizers/synchronizer-ws-server-simple/index.js +1 -1
  289. package/min/synchronizers/synchronizer-ws-server-simple/index.js.gz +0 -0
  290. package/min/synchronizers/synchronizer-ws-server-simple/with-schemas/index.js +1 -1
  291. package/min/synchronizers/synchronizer-ws-server-simple/with-schemas/index.js.gz +0 -0
  292. package/min/synchronizers/with-schemas/index.js +1 -1
  293. package/min/synchronizers/with-schemas/index.js.gz +0 -0
  294. package/min/ui-react/index.js +1 -1
  295. package/min/ui-react/index.js.gz +0 -0
  296. package/min/ui-react/with-schemas/index.js +1 -1
  297. package/min/ui-react/with-schemas/index.js.gz +0 -0
  298. package/min/ui-react-dom/index.js +1 -1
  299. package/min/ui-react-dom/index.js.gz +0 -0
  300. package/min/ui-react-dom/with-schemas/index.js +1 -1
  301. package/min/ui-react-dom/with-schemas/index.js.gz +0 -0
  302. package/min/ui-react-inspector/index.js +1 -1
  303. package/min/ui-react-inspector/index.js.gz +0 -0
  304. package/min/ui-react-inspector/with-schemas/index.js +1 -1
  305. package/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
  306. package/min/with-schemas/index.js +1 -1
  307. package/min/with-schemas/index.js.gz +0 -0
  308. package/package.json +4 -44
  309. package/persisters/index.js +120 -120
  310. package/persisters/persister-automerge/index.js +8 -8
  311. package/persisters/persister-automerge/with-schemas/index.js +8 -8
  312. package/persisters/persister-browser/index.js +8 -8
  313. package/persisters/persister-browser/with-schemas/index.js +8 -8
  314. package/persisters/persister-cr-sqlite-wasm/index.js +119 -119
  315. package/persisters/persister-cr-sqlite-wasm/with-schemas/index.js +119 -119
  316. package/persisters/persister-durable-object-storage/index.js +12 -12
  317. package/persisters/persister-durable-object-storage/with-schemas/index.js +12 -12
  318. package/persisters/persister-electric-sql/index.js +119 -119
  319. package/persisters/persister-electric-sql/with-schemas/index.js +119 -119
  320. package/persisters/persister-expo-sqlite/index.js +119 -119
  321. package/persisters/persister-expo-sqlite/with-schemas/index.js +119 -119
  322. package/persisters/persister-file/index.js +10 -10
  323. package/persisters/persister-file/with-schemas/index.js +10 -10
  324. package/persisters/persister-indexed-db/index.js +8 -8
  325. package/persisters/persister-indexed-db/with-schemas/index.js +8 -8
  326. package/persisters/persister-libsql/index.js +119 -119
  327. package/persisters/persister-libsql/with-schemas/index.js +119 -119
  328. package/persisters/persister-partykit-client/index.js +23 -23
  329. package/persisters/persister-partykit-client/with-schemas/index.js +23 -23
  330. package/persisters/persister-partykit-server/index.js +13 -9
  331. package/persisters/persister-partykit-server/with-schemas/index.js +13 -9
  332. package/persisters/persister-pglite/index.js +128 -128
  333. package/persisters/persister-pglite/with-schemas/index.js +128 -128
  334. package/persisters/persister-postgres/index.js +128 -128
  335. package/persisters/persister-postgres/with-schemas/index.js +128 -128
  336. package/persisters/persister-powersync/index.js +119 -119
  337. package/persisters/persister-powersync/with-schemas/index.js +119 -119
  338. package/persisters/persister-remote/index.js +8 -8
  339. package/persisters/persister-remote/with-schemas/index.js +8 -8
  340. package/persisters/persister-sqlite-wasm/index.js +119 -119
  341. package/persisters/persister-sqlite-wasm/with-schemas/index.js +119 -119
  342. package/persisters/persister-sqlite3/index.js +119 -119
  343. package/persisters/persister-sqlite3/with-schemas/index.js +119 -119
  344. package/persisters/persister-yjs/index.js +14 -14
  345. package/persisters/persister-yjs/with-schemas/index.js +14 -14
  346. package/persisters/with-schemas/index.js +120 -120
  347. package/queries/index.js +16 -16
  348. package/queries/with-schemas/index.js +16 -16
  349. package/readme.md +3 -22
  350. package/relationships/index.js +3 -3
  351. package/relationships/with-schemas/index.js +3 -3
  352. package/releases.md +6 -6
  353. package/store/index.js +43 -43
  354. package/store/with-schemas/index.js +43 -43
  355. package/synchronizers/index.js +31 -31
  356. package/synchronizers/synchronizer-broadcast-channel/index.js +31 -31
  357. package/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +31 -31
  358. package/synchronizers/synchronizer-local/index.js +31 -31
  359. package/synchronizers/synchronizer-local/with-schemas/index.js +31 -31
  360. package/synchronizers/synchronizer-ws-client/index.js +25 -25
  361. package/synchronizers/synchronizer-ws-client/with-schemas/index.js +25 -25
  362. package/synchronizers/synchronizer-ws-server/index.js +65 -65
  363. package/synchronizers/synchronizer-ws-server/with-schemas/index.js +65 -65
  364. package/synchronizers/synchronizer-ws-server-durable-object/index.js +25 -25
  365. package/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +25 -25
  366. package/synchronizers/synchronizer-ws-server-simple/index.js +3 -3
  367. package/synchronizers/synchronizer-ws-server-simple/with-schemas/index.js +3 -3
  368. package/synchronizers/with-schemas/index.js +31 -31
  369. package/ui-react/index.js +31 -34
  370. package/ui-react/with-schemas/index.js +31 -34
  371. package/ui-react-dom/index.js +24 -24
  372. package/ui-react-dom/with-schemas/index.js +24 -24
  373. package/ui-react-inspector/index.js +3066 -3067
  374. package/ui-react-inspector/with-schemas/index.js +3066 -3067
  375. package/with-schemas/index.js +110 -110
  376. package/@types/tools/index.d.cts +0 -588
  377. package/@types/tools/index.d.ts +0 -588
  378. package/@types/tools/with-schemas/index.d.cts +0 -599
  379. package/@types/tools/with-schemas/index.d.ts +0 -599
  380. package/cli/index.js +0 -93
  381. package/min/tools/index.js +0 -1
  382. package/min/tools/index.js.gz +0 -0
  383. package/min/tools/with-schemas/index.js +0 -1
  384. package/min/tools/with-schemas/index.js.gz +0 -0
  385. package/tools/index.js +0 -3301
  386. package/tools/with-schemas/index.js +0 -3301
@@ -34,6 +34,14 @@ const arrayClear = (array, to) => array.splice(0, to);
34
34
  const arrayPush = (array, ...values) => array.push(...values);
35
35
  const arrayShift = (array) => array.shift();
36
36
 
37
+ const collSize = (coll) => coll?.size ?? 0;
38
+ const collHas = (coll, keyOrValue) => coll?.has(keyOrValue) ?? false;
39
+ const collIsEmpty = (coll) => isUndefined(coll) || collSize(coll) == 0;
40
+ const collValues = (coll) => [...(coll?.values() ?? [])];
41
+ const collClear = (coll) => coll.clear();
42
+ const collForEach = (coll, cb) => coll?.forEach(cb);
43
+ const collDel = (coll, keyOrValue) => coll?.delete(keyOrValue);
44
+
37
45
  const object = Object;
38
46
  const getPrototypeOf = (obj) => object.getPrototypeOf(obj);
39
47
  const objEntries = object.entries;
@@ -65,14 +73,6 @@ const objValues = (obj) => object.values(obj);
65
73
  const objSize = (obj) => size(objIds(obj));
66
74
  const objIsEmpty = (obj) => isObject(obj) && objSize(obj) == 0;
67
75
 
68
- const collSize = (coll) => coll?.size ?? 0;
69
- const collHas = (coll, keyOrValue) => coll?.has(keyOrValue) ?? false;
70
- const collIsEmpty = (coll) => isUndefined(coll) || collSize(coll) == 0;
71
- const collValues = (coll) => [...(coll?.values() ?? [])];
72
- const collClear = (coll) => coll.clear();
73
- const collForEach = (coll, cb) => coll?.forEach(cb);
74
- const collDel = (coll, keyOrValue) => coll?.delete(keyOrValue);
75
-
76
76
  const mapNew = (entries) => new Map(entries);
77
77
  const mapGet = (map, key) => map?.get(key);
78
78
  const mapMap = (coll, cb) =>
@@ -109,14 +109,6 @@ const visitTree = (node, path, ensureLeaf, pruneLeaf, p = 0) =>
109
109
  },
110
110
  );
111
111
 
112
- const setNew = (entryOrEntries) =>
113
- new Set(
114
- isArray(entryOrEntries) || isUndefined(entryOrEntries)
115
- ? entryOrEntries
116
- : [entryOrEntries],
117
- );
118
- const setAdd = (set, value) => set?.add(value);
119
-
120
112
  const INTEGER = /^\d+$/;
121
113
  const getPoolFunctions = () => {
122
114
  const pool = [];
@@ -131,6 +123,14 @@ const getPoolFunctions = () => {
131
123
  ];
132
124
  };
133
125
 
126
+ const setNew = (entryOrEntries) =>
127
+ new Set(
128
+ isArray(entryOrEntries) || isUndefined(entryOrEntries)
129
+ ? entryOrEntries
130
+ : [entryOrEntries],
131
+ );
132
+ const setAdd = (set, value) => set?.add(value);
133
+
134
134
  const getWildcardedLeaves = (deepIdSet, path = [EMPTY_STRING]) => {
135
135
  const leaves = [];
136
136
  const deep = (node, p) =>
@@ -463,6 +463,110 @@ const getPlaceholders = (array, offset = [1]) =>
463
463
  COMMA,
464
464
  );
465
465
 
466
+ const COLUMN_NAME = 'ColumnName';
467
+ const STORE = 'store';
468
+ const JSON$1 = 'json';
469
+ const STORE_TABLE_NAME = STORE + 'TableName';
470
+ const STORE_ID_COLUMN_NAME = STORE + 'Id' + COLUMN_NAME;
471
+ const STORE_COLUMN_NAME = STORE + COLUMN_NAME;
472
+ const AUTO_LOAD_INTERVAL_SECONDS = 'autoLoadIntervalSeconds';
473
+ const ROW_ID_COLUMN_NAME = 'rowId' + COLUMN_NAME;
474
+ const TABLE_ID = 'tableId';
475
+ const TABLE_NAME = 'tableName';
476
+ const DELETE_EMPTY_COLUMNS = 'deleteEmptyColumns';
477
+ const DELETE_EMPTY_TABLE = 'deleteEmptyTable';
478
+ const DEFAULT_CONFIG = {
479
+ mode: JSON$1,
480
+ [AUTO_LOAD_INTERVAL_SECONDS]: 1,
481
+ };
482
+ const DEFAULT_TABULAR_VALUES_CONFIG = {
483
+ load: 0,
484
+ save: 0,
485
+ [TABLE_NAME]: TINYBASE + '_values',
486
+ };
487
+ const getDefaultedConfig = (configOrStoreTableName) =>
488
+ objMerge(
489
+ DEFAULT_CONFIG,
490
+ isString(configOrStoreTableName)
491
+ ? {[STORE_TABLE_NAME]: configOrStoreTableName}
492
+ : (configOrStoreTableName ?? {}),
493
+ );
494
+ const getDefaultedTabularConfigMap = (
495
+ configsObj,
496
+ defaultObj,
497
+ tableField,
498
+ exclude,
499
+ then,
500
+ ) => {
501
+ const configMap = mapNew();
502
+ objMap(configsObj, (configObj, id) => {
503
+ const defaultedConfig = slice(
504
+ objValues(
505
+ objMerge(
506
+ defaultObj,
507
+ isString(configObj) ? {[tableField]: configObj} : configObj,
508
+ ),
509
+ ),
510
+ 0,
511
+ objSize(defaultObj),
512
+ );
513
+ if (!isUndefined(defaultedConfig[0]) && !exclude(id, defaultedConfig[0])) {
514
+ then(id, defaultedConfig[0]);
515
+ mapSet(configMap, id, defaultedConfig);
516
+ }
517
+ });
518
+ return configMap;
519
+ };
520
+ const getConfigStructures = (configOrStoreTableName) => {
521
+ const config = getDefaultedConfig(configOrStoreTableName);
522
+ const autoLoadIntervalSeconds = config[AUTO_LOAD_INTERVAL_SECONDS];
523
+ if (config.mode == JSON$1) {
524
+ const storeTableName = config[STORE_TABLE_NAME] ?? TINYBASE;
525
+ return [
526
+ 1,
527
+ autoLoadIntervalSeconds,
528
+ [
529
+ storeTableName,
530
+ config[STORE_ID_COLUMN_NAME] ?? DEFAULT_ROW_ID_COLUMN_NAME,
531
+ config[STORE_COLUMN_NAME] ?? STORE,
532
+ ],
533
+ setNew(storeTableName),
534
+ ];
535
+ }
536
+ const {tables: {load = {}, save = {}} = {}, values = {}} = config;
537
+ const valuesConfig = slice(
538
+ objValues(objMerge(DEFAULT_TABULAR_VALUES_CONFIG, values)),
539
+ 0,
540
+ objSize(DEFAULT_TABULAR_VALUES_CONFIG),
541
+ );
542
+ const valuesTable = valuesConfig[2];
543
+ const managedTableNames = setNew(valuesTable);
544
+ const excludedTableNames = setNew(valuesTable);
545
+ const tabularConfig = [
546
+ getDefaultedTabularConfigMap(
547
+ load,
548
+ {[TABLE_ID]: null, [ROW_ID_COLUMN_NAME]: DEFAULT_ROW_ID_COLUMN_NAME},
549
+ TABLE_ID,
550
+ (tableName) => collHas(excludedTableNames, tableName),
551
+ (tableName) => setAdd(managedTableNames, tableName),
552
+ ),
553
+ getDefaultedTabularConfigMap(
554
+ save,
555
+ {
556
+ [TABLE_NAME]: null,
557
+ [ROW_ID_COLUMN_NAME]: DEFAULT_ROW_ID_COLUMN_NAME,
558
+ [DELETE_EMPTY_COLUMNS]: 0,
559
+ [DELETE_EMPTY_TABLE]: 0,
560
+ },
561
+ TABLE_NAME,
562
+ (_, tableName) => collHas(excludedTableNames, tableName),
563
+ (_, tableName) => setAdd(managedTableNames, tableName),
564
+ ),
565
+ valuesConfig,
566
+ ];
567
+ return [0, autoLoadIntervalSeconds, tabularConfig, managedTableNames];
568
+ };
569
+
466
570
  const jsonString = JSON.stringify;
467
571
  const jsonParse = JSON.parse;
468
572
  const jsonStringWithUndefined = (obj) =>
@@ -919,110 +1023,6 @@ const createTabularPersister = (
919
1023
  return persister;
920
1024
  };
921
1025
 
922
- const COLUMN_NAME = 'ColumnName';
923
- const STORE = 'store';
924
- const JSON$1 = 'json';
925
- const STORE_TABLE_NAME = STORE + 'TableName';
926
- const STORE_ID_COLUMN_NAME = STORE + 'Id' + COLUMN_NAME;
927
- const STORE_COLUMN_NAME = STORE + COLUMN_NAME;
928
- const AUTO_LOAD_INTERVAL_SECONDS = 'autoLoadIntervalSeconds';
929
- const ROW_ID_COLUMN_NAME = 'rowId' + COLUMN_NAME;
930
- const TABLE_ID = 'tableId';
931
- const TABLE_NAME = 'tableName';
932
- const DELETE_EMPTY_COLUMNS = 'deleteEmptyColumns';
933
- const DELETE_EMPTY_TABLE = 'deleteEmptyTable';
934
- const DEFAULT_CONFIG = {
935
- mode: JSON$1,
936
- [AUTO_LOAD_INTERVAL_SECONDS]: 1,
937
- };
938
- const DEFAULT_TABULAR_VALUES_CONFIG = {
939
- load: 0,
940
- save: 0,
941
- [TABLE_NAME]: TINYBASE + '_values',
942
- };
943
- const getDefaultedConfig = (configOrStoreTableName) =>
944
- objMerge(
945
- DEFAULT_CONFIG,
946
- isString(configOrStoreTableName)
947
- ? {[STORE_TABLE_NAME]: configOrStoreTableName}
948
- : (configOrStoreTableName ?? {}),
949
- );
950
- const getDefaultedTabularConfigMap = (
951
- configsObj,
952
- defaultObj,
953
- tableField,
954
- exclude,
955
- then,
956
- ) => {
957
- const configMap = mapNew();
958
- objMap(configsObj, (configObj, id) => {
959
- const defaultedConfig = slice(
960
- objValues(
961
- objMerge(
962
- defaultObj,
963
- isString(configObj) ? {[tableField]: configObj} : configObj,
964
- ),
965
- ),
966
- 0,
967
- objSize(defaultObj),
968
- );
969
- if (!isUndefined(defaultedConfig[0]) && !exclude(id, defaultedConfig[0])) {
970
- then(id, defaultedConfig[0]);
971
- mapSet(configMap, id, defaultedConfig);
972
- }
973
- });
974
- return configMap;
975
- };
976
- const getConfigStructures = (configOrStoreTableName) => {
977
- const config = getDefaultedConfig(configOrStoreTableName);
978
- const autoLoadIntervalSeconds = config[AUTO_LOAD_INTERVAL_SECONDS];
979
- if (config.mode == JSON$1) {
980
- const storeTableName = config[STORE_TABLE_NAME] ?? TINYBASE;
981
- return [
982
- 1,
983
- autoLoadIntervalSeconds,
984
- [
985
- storeTableName,
986
- config[STORE_ID_COLUMN_NAME] ?? DEFAULT_ROW_ID_COLUMN_NAME,
987
- config[STORE_COLUMN_NAME] ?? STORE,
988
- ],
989
- setNew(storeTableName),
990
- ];
991
- }
992
- const {tables: {load = {}, save = {}} = {}, values = {}} = config;
993
- const valuesConfig = slice(
994
- objValues(objMerge(DEFAULT_TABULAR_VALUES_CONFIG, values)),
995
- 0,
996
- objSize(DEFAULT_TABULAR_VALUES_CONFIG),
997
- );
998
- const valuesTable = valuesConfig[2];
999
- const managedTableNames = setNew(valuesTable);
1000
- const excludedTableNames = setNew(valuesTable);
1001
- const tabularConfig = [
1002
- getDefaultedTabularConfigMap(
1003
- load,
1004
- {[TABLE_ID]: null, [ROW_ID_COLUMN_NAME]: DEFAULT_ROW_ID_COLUMN_NAME},
1005
- TABLE_ID,
1006
- (tableName) => collHas(excludedTableNames, tableName),
1007
- (tableName) => setAdd(managedTableNames, tableName),
1008
- ),
1009
- getDefaultedTabularConfigMap(
1010
- save,
1011
- {
1012
- [TABLE_NAME]: null,
1013
- [ROW_ID_COLUMN_NAME]: DEFAULT_ROW_ID_COLUMN_NAME,
1014
- [DELETE_EMPTY_COLUMNS]: 0,
1015
- [DELETE_EMPTY_TABLE]: 0,
1016
- },
1017
- TABLE_NAME,
1018
- (_, tableName) => collHas(excludedTableNames, tableName),
1019
- (_, tableName) => setAdd(managedTableNames, tableName),
1020
- ),
1021
- valuesConfig,
1022
- ];
1023
- return [0, autoLoadIntervalSeconds, tabularConfig, managedTableNames];
1024
- };
1025
-
1026
1026
  const createCustomSqlitePersister = (
1027
1027
  store,
1028
1028
  configOrStoreTableName,
package/queries/index.js CHANGED
@@ -46,6 +46,14 @@ const arrayIsEmpty = (array) => size(array) == 0;
46
46
  const arrayReduce = (array, cb, initial) => array.reduce(cb, initial);
47
47
  const arrayPush = (array, ...values) => array.push(...values);
48
48
 
49
+ const collSize = (coll) => coll?.size ?? 0;
50
+ const collHas = (coll, keyOrValue) => coll?.has(keyOrValue) ?? false;
51
+ const collIsEmpty = (coll) => isUndefined(coll) || collSize(coll) == 0;
52
+ const collValues = (coll) => [...(coll?.values() ?? [])];
53
+ const collClear = (coll) => coll.clear();
54
+ const collForEach = (coll, cb) => coll?.forEach(cb);
55
+ const collDel = (coll, keyOrValue) => coll?.delete(keyOrValue);
56
+
49
57
  const object = Object;
50
58
  const objEntries = object.entries;
51
59
  const objFreeze = object.freeze;
@@ -55,14 +63,6 @@ const objToArray = (obj, cb) =>
55
63
  const objMap = (obj, cb) =>
56
64
  objNew(objToArray(obj, (value, id) => [id, cb(value, id)]));
57
65
 
58
- const collSize = (coll) => coll?.size ?? 0;
59
- const collHas = (coll, keyOrValue) => coll?.has(keyOrValue) ?? false;
60
- const collIsEmpty = (coll) => isUndefined(coll) || collSize(coll) == 0;
61
- const collValues = (coll) => [...(coll?.values() ?? [])];
62
- const collClear = (coll) => coll.clear();
63
- const collForEach = (coll, cb) => coll?.forEach(cb);
64
- const collDel = (coll, keyOrValue) => coll?.delete(keyOrValue);
65
-
66
66
  const mapNew = (entries) => new Map(entries);
67
67
  const mapKeys = (map) => [...(map?.keys() ?? [])];
68
68
  const mapGet = (map, key) => map?.get(key);
@@ -100,14 +100,6 @@ const visitTree = (node, path, ensureLeaf, pruneLeaf, p = 0) =>
100
100
  },
101
101
  );
102
102
 
103
- const setNew = (entryOrEntries) =>
104
- new Set(
105
- isArray(entryOrEntries) || isUndefined(entryOrEntries)
106
- ? entryOrEntries
107
- : [entryOrEntries],
108
- );
109
- const setAdd = (set, value) => set?.add(value);
110
-
111
103
  const numericAggregators = /* @__PURE__ */ mapNew([
112
104
  [
113
105
  AVG,
@@ -189,6 +181,14 @@ const setOrDelCell = (store, tableId, rowId, cellId, cell) =>
189
181
  ? store.delCell(tableId, rowId, cellId, true)
190
182
  : store.setCell(tableId, rowId, cellId, cell);
191
183
 
184
+ const setNew = (entryOrEntries) =>
185
+ new Set(
186
+ isArray(entryOrEntries) || isUndefined(entryOrEntries)
187
+ ? entryOrEntries
188
+ : [entryOrEntries],
189
+ );
190
+ const setAdd = (set, value) => set?.add(value);
191
+
192
192
  const getDefinableFunctions = (
193
193
  store,
194
194
  getDefaultThing,
@@ -46,6 +46,14 @@ const arrayIsEmpty = (array) => size(array) == 0;
46
46
  const arrayReduce = (array, cb, initial) => array.reduce(cb, initial);
47
47
  const arrayPush = (array, ...values) => array.push(...values);
48
48
 
49
+ const collSize = (coll) => coll?.size ?? 0;
50
+ const collHas = (coll, keyOrValue) => coll?.has(keyOrValue) ?? false;
51
+ const collIsEmpty = (coll) => isUndefined(coll) || collSize(coll) == 0;
52
+ const collValues = (coll) => [...(coll?.values() ?? [])];
53
+ const collClear = (coll) => coll.clear();
54
+ const collForEach = (coll, cb) => coll?.forEach(cb);
55
+ const collDel = (coll, keyOrValue) => coll?.delete(keyOrValue);
56
+
49
57
  const object = Object;
50
58
  const objEntries = object.entries;
51
59
  const objFreeze = object.freeze;
@@ -55,14 +63,6 @@ const objToArray = (obj, cb) =>
55
63
  const objMap = (obj, cb) =>
56
64
  objNew(objToArray(obj, (value, id) => [id, cb(value, id)]));
57
65
 
58
- const collSize = (coll) => coll?.size ?? 0;
59
- const collHas = (coll, keyOrValue) => coll?.has(keyOrValue) ?? false;
60
- const collIsEmpty = (coll) => isUndefined(coll) || collSize(coll) == 0;
61
- const collValues = (coll) => [...(coll?.values() ?? [])];
62
- const collClear = (coll) => coll.clear();
63
- const collForEach = (coll, cb) => coll?.forEach(cb);
64
- const collDel = (coll, keyOrValue) => coll?.delete(keyOrValue);
65
-
66
66
  const mapNew = (entries) => new Map(entries);
67
67
  const mapKeys = (map) => [...(map?.keys() ?? [])];
68
68
  const mapGet = (map, key) => map?.get(key);
@@ -100,14 +100,6 @@ const visitTree = (node, path, ensureLeaf, pruneLeaf, p = 0) =>
100
100
  },
101
101
  );
102
102
 
103
- const setNew = (entryOrEntries) =>
104
- new Set(
105
- isArray(entryOrEntries) || isUndefined(entryOrEntries)
106
- ? entryOrEntries
107
- : [entryOrEntries],
108
- );
109
- const setAdd = (set, value) => set?.add(value);
110
-
111
103
  const numericAggregators = /* @__PURE__ */ mapNew([
112
104
  [
113
105
  AVG,
@@ -189,6 +181,14 @@ const setOrDelCell = (store, tableId, rowId, cellId, cell) =>
189
181
  ? store.delCell(tableId, rowId, cellId, true)
190
182
  : store.setCell(tableId, rowId, cellId, cell);
191
183
 
184
+ const setNew = (entryOrEntries) =>
185
+ new Set(
186
+ isArray(entryOrEntries) || isUndefined(entryOrEntries)
187
+ ? entryOrEntries
188
+ : [entryOrEntries],
189
+ );
190
+ const setAdd = (set, value) => set?.add(value);
191
+
192
192
  const getDefinableFunctions = (
193
193
  store,
194
194
  getDefaultThing,
package/readme.md CHANGED
@@ -1,4 +1,4 @@
1
- <link rel="preload" as="image" href="https://beta.tinybase.org/react.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/indexeddb.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/postgresql.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/pglite.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/sqlite.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/expo.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/cloudflare.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/electric.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/turso.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/powersync.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/partykit.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/yjs.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/crsqlite.png"><link rel="preload" as="image" href="https://beta.tinybase.org/automerge.svg?asImg"><link rel="preload" as="image" href="https://img.shields.io/github/stars/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=GitHub&amp;labelColor=%23d81b60&amp;color=%23333"><link rel="preload" as="image" href="https://img.shields.io/badge/Bluesky-Follow-blue?style=for-the-badge&amp;logo=bluesky&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%230285FF"><link rel="preload" as="image" href="https://img.shields.io/badge/%2F%20Twitter-Follow-blue?style=for-the-badge&amp;logo=x&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%23000"><link rel="preload" as="image" href="https://img.shields.io/discord/1027918215323590676?style=for-the-badge&amp;logo=discord&amp;logoColor=%23fff&amp;label=Discord&amp;labelColor=%233131e8&amp;color=%23333"><link rel="preload" as="image" href="https://img.shields.io/github/discussions/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=Ideas&amp;labelColor=%23d81b60&amp;color=%23333"><link rel="preload" as="image" href="https://img.shields.io/github/issues/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=Issues&amp;labelColor=%23d81b60&amp;color=%23333"><link rel="preload" as="image" href="https://img.shields.io/badge/Tests-100%25-green?style=for-the-badge&amp;logo=jest&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%2387c305"><link rel="preload" as="image" href="https://img.shields.io/npm/v/tinybase?style=for-the-badge&amp;logo=npm&amp;logoColor=%23fff&amp;labelColor=%23bd0005&amp;color=%23333"><link rel="preload" as="image" href="https://beta.tinybase.org/ui-react-dom.webp"><link rel="preload" as="image" href="https://beta.tinybase.org/store-inspector.webp"><link rel="preload" as="image" href="https://github.com/cpojer.png?size=48"><link rel="preload" as="image" href="https://github.com/expo.png?size=48"><link rel="preload" as="image" href="https://github.com/beekeeb.png?size=48"><link rel="preload" as="image" href="https://github.com/cancelself.png?size=48"><link rel="preload" as="image" href="https://github.com/WonderPanda.png?size=48"><link rel="preload" as="image" href="https://github.com/arpitBhalla.png?size=48"><link rel="preload" as="image" href="https://github.com/behrends.png?size=48"><link rel="preload" as="image" href="https://github.com/betomoedano.png?size=48"><link rel="preload" as="image" href="https://github.com/brentvatne.png?size=48"><link rel="preload" as="image" href="https://github.com/byCedric.png?size=48"><link rel="preload" as="image" href="https://github.com/circadian-risk.png?size=48"><link rel="preload" as="image" href="https://github.com/cubecull.png?size=48"><link rel="preload" as="image" href="https://github.com/erwinkn.png?size=48"><link rel="preload" as="image" href="https://github.com/ezra-en.png?size=48"><link rel="preload" as="image" href="https://github.com/feychenie.png?size=48"><link rel="preload" as="image" href="https://github.com/flaming-codes.png?size=48"><link rel="preload" as="image" href="https://github.com/fostertheweb.png?size=48"><link rel="preload" as="image" href="https://github.com/Giulio987.png?size=48"><link rel="preload" as="image" href="https://github.com/hi-ogawa.png?size=48"><link rel="preload" as="image" href="https://github.com/itsdevcoffee.png?size=48"><link rel="preload" as="image" href="https://github.com/jbolda.png?size=48"><link rel="preload" as="image" href="https://github.com/Kayoo-asso.png?size=48"><link rel="preload" as="image" href="https://github.com/kotofurumiya.png?size=48"><link rel="preload" as="image" href="https://github.com/Kudo.png?size=48"><link rel="preload" as="image" href="https://github.com/learn-anything.png?size=48"><link rel="preload" as="image" href="https://github.com/lluc.png?size=48"><link rel="preload" as="image" href="https://github.com/marksteve.png?size=48"><link rel="preload" as="image" href="https://github.com/miking-the-viking.png?size=48"><link rel="preload" as="image" href="https://github.com/mjamesderocher.png?size=48"><link rel="preload" as="image" href="https://github.com/mouktardev.png?size=48"><link rel="preload" as="image" href="https://github.com/nickmessing.png?size=48"><link rel="preload" as="image" href="https://github.com/nikitavoloboev.png?size=48"><link rel="preload" as="image" href="https://github.com/nkzw-tech.png?size=48"><link rel="preload" as="image" href="https://github.com/palerdot.png?size=48"><link rel="preload" as="image" href="https://github.com/PorcoRosso85.png?size=48"><link rel="preload" as="image" href="https://github.com/primodiumxyz.png?size=48"><link rel="preload" as="image" href="https://github.com/shaneosullivan.png?size=48"><link rel="preload" as="image" href="https://github.com/sudo-self.png?size=48"><link rel="preload" as="image" href="https://github.com/SuperSonicHub1.png?size=48"><link rel="preload" as="image" href="https://github.com/threepointone.png?size=48"><link rel="preload" as="image" href="https://github.com/uptonking.png?size=48"><link rel="preload" as="image" href="https://github.com/ViktorZhurbin.png?size=48"><link rel="preload" as="image" href="https://github.com/wilkerlucio.png?size=48"><link rel="preload" as="image" href="https://tinybase.org/favicon.svg?asImg"><link rel="preload" as="image" href="https://tinywidgets.org/favicon.svg?asImg"><link rel="preload" as="image" href="https://tinytick.org/favicon.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/youtube.webp"><section id="hero"><h2 id="a-reactive-data-store-sync-engine">A <em>reactive</em> data store <span>&amp; <em>sync</em> engine</span>.</h2></section><p><a href="https://beta.tinybase.org/guides/releases/#v5-4"><em>NEW!</em> v5.4 release</a></p><p><span id="one-with">&quot;The One With Durable Objects!&quot;</span></p><p><a class="start" href="https://beta.tinybase.org/guides/the-basics/getting-started/">Get started</a></p><p><a href="https://beta.tinybase.org/demos/">Try the demos</a></p><p><a href="https://beta.tinybase.org/api/store/interfaces/store/store/">Read the docs</a></p><hr><section><h2 id="it-s-reactive">It&#x27;s <em>Reactive</em></h2><p>TinyBase lets you <a href="#register-granular-listeners">listen to changes</a> made to any part of your data. This means your app will be fast, since you only spend rendering cycles on things that change. The optional <a href="#call-hooks-to-bind-to-data">bindings to React</a> and <a href="#pre-built-reactive-components">pre-built components</a> let you easily build fully reactive UIs on top of TinyBase. You even get a built-in <a href="#set-checkpoints-for-an-undo-stack">undo stack</a>, and <a href="#an-inspector-for-your-data">developer tools</a>!</p></section><section><h2 id="it-s-database-like">It&#x27;s <em>Database-Like</em></h2><p>Consumer app? Enterprise app? Or even a game? Model <a href="#start-with-a-simple-key-value-store">key-value data</a> and <a href="#level-up-to-use-tabular-data">tabular data</a> with optional typed <a href="#apply-schemas-to-tables-values">schematization</a>, whatever its data structures. There are built-in <a href="#create-indexes-for-fast-lookups">indexing</a>, <a href="#define-metrics-and-aggregations">metric aggregation</a>, and tabular <a href="#model-table-relationships">relationships</a> APIs - and a powerful <a href="#build-complex-queries-with-tinyql">query engine</a> to select, join, filter, and group data (reactively!) without SQL.</p></section><section><h2 id="it-synchronizes">It <em>Synchronizes</em></h2><p>TinyBase has <a href="#synchronize-between-devices">native CRDT</a> support, meaning that you can deterministically <a href="https://beta.tinybase.org/guides/synchronization/">synchronize</a> and merge data across multiple sources, clients, and servers. And although TinyBase is an in-memory data store, you can easily <a href="#persist-to-storage-databases-more">persist</a> your data to file, <a href="https://beta.tinybase.org/api/persister-browser">browser storage</a>, <a href="https://beta.tinybase.org/api/persister-indexed-db">IndexedDB</a>, <a href="https://beta.tinybase.org/guides/persistence/database-persistence/">SQLite or PostgreSQL databases</a>, and <a href="https://beta.tinybase.org/guides/persistence/third-party-crdt-persistence/">more</a>.</p></section><section><h2 id="it-s-built-for-a-local-first-world">It&#x27;s Built For A <em>Local-First</em> World</h2><p>TinyBase works anywhere that JavaScript does, but it&#x27;s especially great for local-first apps: where data is stored locally on the user&#x27;s device and that can be run offline. It&#x27;s tiny by name, tiny by nature: just <a href="#did-we-say-tiny">5.3kB - 11.4kB</a> and with no dependencies - yet <a href="#well-tested-and-documented">100% tested</a>, <a href="https://beta.tinybase.org/guides/the-basics/getting-started/">fully documented</a>, and of course, <a href="https://github.com/tinyplex/tinybase">open source</a>!</p></section><hr><section id="friends"><h2 id="tinybase-works-great-on-its-own-but-also-plays-well-with-friends">TinyBase works great on its own, but also plays well with friends.</h2><div><a href="https://beta.tinybase.org/guides/building-uis/getting-started-with-ui-react"><img src="https://beta.tinybase.org/react.svg?asImg" width="48"> React</a></div><div><a href="https://beta.tinybase.org/api/persister-indexed-db/functions/creation/createindexeddbpersister"><img src="https://beta.tinybase.org/indexeddb.svg?asImg" width="48"> IndexedDB</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/postgresql.svg?asImg" width="48"> PostgreSQL</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/pglite.svg?asImg" width="48"> PGlite</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/sqlite.svg?asImg" width="48"> SQLite</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/expo.svg?asImg" width="48"> Expo SQLite</a></div><div><a href="https://beta.tinybase.org/guides/integrations/cloudflare-durable-objects"><img src="https://beta.tinybase.org/cloudflare.svg?asImg" width="48"> Cloudflare</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/electric.svg?asImg" width="48"> ElectricSQL</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/turso.svg?asImg" width="48"> Turso</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/powersync.svg?asImg" width="48"> PowerSync</a></div><div><a href="https://beta.tinybase.org/api/persister-partykit-client"><img src="https://beta.tinybase.org/partykit.svg?asImg" width="48"> PartyKit</a></div><div><a href="https://beta.tinybase.org/api/persister-yjs/functions/creation/createyjspersister"><img src="https://beta.tinybase.org/yjs.svg?asImg" width="48"> YJS</a></div><div><a href="https://beta.tinybase.org/api/persister-cr-sqlite-wasm"><img src="https://beta.tinybase.org/crsqlite.png" width="48"> CR-SQLite</a></div><div><a href="https://beta.tinybase.org/api/persister-automerge"><img src="https://beta.tinybase.org/automerge.svg?asImg" width="48"> Automerge</a></div><p>(Baffled by all these logos? Check out our <a href="https://beta.tinybase.org/guides/the-basics/architectural-options">architectural options</a> guide to make sense of it all!)</p></section><hr><section id="follow"><a href="https://github.com/tinyplex/tinybase" target="_blank"><img src="https://img.shields.io/github/stars/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=GitHub&amp;labelColor=%23d81b60&amp;color=%23333"> </a><a href="https://bsky.app/profile/tinybase.bsky.social"><img src="https://img.shields.io/badge/Bluesky-Follow-blue?style=for-the-badge&amp;logo=bluesky&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%230285FF"> </a><a href="https://x.com/tinybasejs" target="_blank"><img src="https://img.shields.io/badge/%2F%20Twitter-Follow-blue?style=for-the-badge&amp;logo=x&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%23000"> </a><a href="https://discord.com/invite/mGz3mevwP8" target="_blank"><img src="https://img.shields.io/discord/1027918215323590676?style=for-the-badge&amp;logo=discord&amp;logoColor=%23fff&amp;label=Discord&amp;labelColor=%233131e8&amp;color=%23333"></a><br><a href="https://github.com/tinyplex/tinybase/discussions" target="_blank"><img src="https://img.shields.io/github/discussions/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=Ideas&amp;labelColor=%23d81b60&amp;color=%23333"> </a><a href="https://github.com/tinyplex/tinybase/issues" target="_blank"><img src="https://img.shields.io/github/issues/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=Issues&amp;labelColor=%23d81b60&amp;color=%23333"> </a><a href="#well-tested-and-documented"><img src="https://img.shields.io/badge/Tests-100%25-green?style=for-the-badge&amp;logo=jest&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%2387c305"> </a><a href="https://www.npmjs.com/package/tinybase/v/6.0.0-beta.1" target="_blank"><img src="https://img.shields.io/npm/v/tinybase?style=for-the-badge&amp;logo=npm&amp;logoColor=%23fff&amp;labelColor=%23bd0005&amp;color=%23333"></a></section><hr><section><h2 id="start-with-a-simple-key-value-store">Start with a simple key-value store.</h2><p>Creating a <a href="https://beta.tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a> requires just a simple call to the <a href="https://beta.tinybase.org/api/store/functions/creation/createstore/"><code>createStore</code></a> function. Once you have one, you can easily set <a href="https://beta.tinybase.org/api/store/type-aliases/store/values/"><code>Values</code></a> in it by unique <a href="https://beta.tinybase.org/api/common/type-aliases/identity/id/"><code>Id</code></a>. And of course you can easily get them back out again.</p><p>Read more about using keyed value data in <a href="https://beta.tinybase.org/guides/the-basics/">The Basics</a> guide.</p></section>
1
+ <link rel="preload" as="image" href="https://beta.tinybase.org/react.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/indexeddb.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/postgresql.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/pglite.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/sqlite.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/expo.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/cloudflare.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/electric.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/turso.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/powersync.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/partykit.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/yjs.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/crsqlite.png"><link rel="preload" as="image" href="https://beta.tinybase.org/automerge.svg?asImg"><link rel="preload" as="image" href="https://img.shields.io/github/stars/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=GitHub&amp;labelColor=%23d81b60&amp;color=%23333"><link rel="preload" as="image" href="https://img.shields.io/badge/Bluesky-Follow-blue?style=for-the-badge&amp;logo=bluesky&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%230285FF"><link rel="preload" as="image" href="https://img.shields.io/badge/%2F%20Twitter-Follow-blue?style=for-the-badge&amp;logo=x&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%23000"><link rel="preload" as="image" href="https://img.shields.io/discord/1027918215323590676?style=for-the-badge&amp;logo=discord&amp;logoColor=%23fff&amp;label=Discord&amp;labelColor=%233131e8&amp;color=%23333"><link rel="preload" as="image" href="https://img.shields.io/github/discussions/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=Ideas&amp;labelColor=%23d81b60&amp;color=%23333"><link rel="preload" as="image" href="https://img.shields.io/github/issues/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=Issues&amp;labelColor=%23d81b60&amp;color=%23333"><link rel="preload" as="image" href="https://img.shields.io/badge/Tests-100%25-green?style=for-the-badge&amp;logo=jest&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%2387c305"><link rel="preload" as="image" href="https://img.shields.io/npm/v/tinybase?style=for-the-badge&amp;logo=npm&amp;logoColor=%23fff&amp;labelColor=%23bd0005&amp;color=%23333"><link rel="preload" as="image" href="https://beta.tinybase.org/ui-react-dom.webp"><link rel="preload" as="image" href="https://beta.tinybase.org/store-inspector.webp"><link rel="preload" as="image" href="https://github.com/cpojer.png?size=48"><link rel="preload" as="image" href="https://github.com/expo.png?size=48"><link rel="preload" as="image" href="https://github.com/beekeeb.png?size=48"><link rel="preload" as="image" href="https://github.com/cancelself.png?size=48"><link rel="preload" as="image" href="https://github.com/WonderPanda.png?size=48"><link rel="preload" as="image" href="https://github.com/arpitBhalla.png?size=48"><link rel="preload" as="image" href="https://github.com/behrends.png?size=48"><link rel="preload" as="image" href="https://github.com/betomoedano.png?size=48"><link rel="preload" as="image" href="https://github.com/brentvatne.png?size=48"><link rel="preload" as="image" href="https://github.com/byCedric.png?size=48"><link rel="preload" as="image" href="https://github.com/circadian-risk.png?size=48"><link rel="preload" as="image" href="https://github.com/cubecull.png?size=48"><link rel="preload" as="image" href="https://github.com/erwinkn.png?size=48"><link rel="preload" as="image" href="https://github.com/ezra-en.png?size=48"><link rel="preload" as="image" href="https://github.com/feychenie.png?size=48"><link rel="preload" as="image" href="https://github.com/flaming-codes.png?size=48"><link rel="preload" as="image" href="https://github.com/fostertheweb.png?size=48"><link rel="preload" as="image" href="https://github.com/Giulio987.png?size=48"><link rel="preload" as="image" href="https://github.com/hi-ogawa.png?size=48"><link rel="preload" as="image" href="https://github.com/itsdevcoffee.png?size=48"><link rel="preload" as="image" href="https://github.com/jbolda.png?size=48"><link rel="preload" as="image" href="https://github.com/Kayoo-asso.png?size=48"><link rel="preload" as="image" href="https://github.com/kotofurumiya.png?size=48"><link rel="preload" as="image" href="https://github.com/Kudo.png?size=48"><link rel="preload" as="image" href="https://github.com/learn-anything.png?size=48"><link rel="preload" as="image" href="https://github.com/lluc.png?size=48"><link rel="preload" as="image" href="https://github.com/marksteve.png?size=48"><link rel="preload" as="image" href="https://github.com/miking-the-viking.png?size=48"><link rel="preload" as="image" href="https://github.com/mjamesderocher.png?size=48"><link rel="preload" as="image" href="https://github.com/mouktardev.png?size=48"><link rel="preload" as="image" href="https://github.com/nickmessing.png?size=48"><link rel="preload" as="image" href="https://github.com/nikitavoloboev.png?size=48"><link rel="preload" as="image" href="https://github.com/nkzw-tech.png?size=48"><link rel="preload" as="image" href="https://github.com/palerdot.png?size=48"><link rel="preload" as="image" href="https://github.com/PorcoRosso85.png?size=48"><link rel="preload" as="image" href="https://github.com/primodiumxyz.png?size=48"><link rel="preload" as="image" href="https://github.com/shaneosullivan.png?size=48"><link rel="preload" as="image" href="https://github.com/sudo-self.png?size=48"><link rel="preload" as="image" href="https://github.com/SuperSonicHub1.png?size=48"><link rel="preload" as="image" href="https://github.com/threepointone.png?size=48"><link rel="preload" as="image" href="https://github.com/uptonking.png?size=48"><link rel="preload" as="image" href="https://github.com/ViktorZhurbin.png?size=48"><link rel="preload" as="image" href="https://github.com/wilkerlucio.png?size=48"><link rel="preload" as="image" href="https://tinybase.org/favicon.svg?asImg"><link rel="preload" as="image" href="https://tinywidgets.org/favicon.svg?asImg"><link rel="preload" as="image" href="https://tinytick.org/favicon.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/youtube.webp"><section id="hero"><h2 id="a-reactive-data-store-sync-engine">A <em>reactive</em> data store <span>&amp; <em>sync</em> engine</span>.</h2></section><p><a href="https://beta.tinybase.org/guides/releases/#v6-0"><em>NEW!</em> v6.0 release</a></p><p><span id="one-with">&quot;The One With React 19!&quot;</span></p><p><a class="start" href="https://beta.tinybase.org/guides/the-basics/getting-started/">Get started</a></p><p><a href="https://beta.tinybase.org/demos/">Try the demos</a></p><p><a href="https://beta.tinybase.org/api/store/interfaces/store/store/">Read the docs</a></p><hr><section><h2 id="it-s-reactive">It&#x27;s <em>Reactive</em></h2><p>TinyBase lets you <a href="#register-granular-listeners">listen to changes</a> made to any part of your data. This means your app will be fast, since you only spend rendering cycles on things that change. The optional <a href="#call-hooks-to-bind-to-data">bindings to React</a> and <a href="#pre-built-reactive-components">pre-built components</a> let you easily build fully reactive UIs on top of TinyBase. You even get a built-in <a href="#set-checkpoints-for-an-undo-stack">undo stack</a>, and <a href="#an-inspector-for-your-data">developer tools</a>!</p></section><section><h2 id="it-s-database-like">It&#x27;s <em>Database-Like</em></h2><p>Consumer app? Enterprise app? Or even a game? Model <a href="#start-with-a-simple-key-value-store">key-value data</a> and <a href="#level-up-to-use-tabular-data">tabular data</a> with optional typed <a href="#apply-schemas-to-tables-values">schematization</a>, whatever its data structures. There are built-in <a href="#create-indexes-for-fast-lookups">indexing</a>, <a href="#define-metrics-and-aggregations">metric aggregation</a>, and tabular <a href="#model-table-relationships">relationships</a> APIs - and a powerful <a href="#build-complex-queries-with-tinyql">query engine</a> to select, join, filter, and group data (reactively!) without SQL.</p></section><section><h2 id="it-synchronizes">It <em>Synchronizes</em></h2><p>TinyBase has <a href="#synchronize-between-devices">native CRDT</a> support, meaning that you can deterministically <a href="https://beta.tinybase.org/guides/synchronization/">synchronize</a> and merge data across multiple sources, clients, and servers. And although TinyBase is an in-memory data store, you can easily <a href="#persist-to-storage-databases-more">persist</a> your data to file, <a href="https://beta.tinybase.org/api/persister-browser">browser storage</a>, <a href="https://beta.tinybase.org/api/persister-indexed-db">IndexedDB</a>, <a href="https://beta.tinybase.org/guides/persistence/database-persistence/">SQLite or PostgreSQL databases</a>, and <a href="https://beta.tinybase.org/guides/persistence/third-party-crdt-persistence/">more</a>.</p></section><section><h2 id="it-s-built-for-a-local-first-world">It&#x27;s Built For A <em>Local-First</em> World</h2><p>TinyBase works anywhere that JavaScript does, but it&#x27;s especially great for local-first apps: where data is stored locally on the user&#x27;s device and that can be run offline. It&#x27;s tiny by name, tiny by nature: just <a href="#did-we-say-tiny">5.3kB - 11.4kB</a> and with no dependencies - yet <a href="#well-tested-and-documented">100% tested</a>, <a href="https://beta.tinybase.org/guides/the-basics/getting-started/">fully documented</a>, and of course, <a href="https://github.com/tinyplex/tinybase">open source</a>!</p></section><hr><section id="friends"><h2 id="tinybase-works-great-on-its-own-but-also-plays-well-with-friends">TinyBase works great on its own, but also plays well with friends.</h2><div><a href="https://beta.tinybase.org/guides/building-uis/getting-started-with-ui-react"><img src="https://beta.tinybase.org/react.svg?asImg" width="48"> React</a></div><div><a href="https://beta.tinybase.org/api/persister-indexed-db/functions/creation/createindexeddbpersister"><img src="https://beta.tinybase.org/indexeddb.svg?asImg" width="48"> IndexedDB</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/postgresql.svg?asImg" width="48"> PostgreSQL</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/pglite.svg?asImg" width="48"> PGlite</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/sqlite.svg?asImg" width="48"> SQLite</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/expo.svg?asImg" width="48"> Expo SQLite</a></div><div><a href="https://beta.tinybase.org/guides/integrations/cloudflare-durable-objects"><img src="https://beta.tinybase.org/cloudflare.svg?asImg" width="48"> Cloudflare</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/electric.svg?asImg" width="48"> ElectricSQL</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/turso.svg?asImg" width="48"> Turso</a></div><div><a href="https://beta.tinybase.org/guides/schemas-and-persistence/database-persistence"><img src="https://beta.tinybase.org/powersync.svg?asImg" width="48"> PowerSync</a></div><div><a href="https://beta.tinybase.org/api/persister-partykit-client"><img src="https://beta.tinybase.org/partykit.svg?asImg" width="48"> PartyKit</a></div><div><a href="https://beta.tinybase.org/api/persister-yjs/functions/creation/createyjspersister"><img src="https://beta.tinybase.org/yjs.svg?asImg" width="48"> YJS</a></div><div><a href="https://beta.tinybase.org/api/persister-cr-sqlite-wasm"><img src="https://beta.tinybase.org/crsqlite.png" width="48"> CR-SQLite</a></div><div><a href="https://beta.tinybase.org/api/persister-automerge"><img src="https://beta.tinybase.org/automerge.svg?asImg" width="48"> Automerge</a></div><p>(Baffled by all these logos? Check out our <a href="https://beta.tinybase.org/guides/the-basics/architectural-options">architectural options</a> guide to make sense of it all!)</p></section><hr><section id="follow"><a href="https://github.com/tinyplex/tinybase" target="_blank"><img src="https://img.shields.io/github/stars/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=GitHub&amp;labelColor=%23d81b60&amp;color=%23333"> </a><a href="https://bsky.app/profile/tinybase.bsky.social"><img src="https://img.shields.io/badge/Bluesky-Follow-blue?style=for-the-badge&amp;logo=bluesky&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%230285FF"> </a><a href="https://x.com/tinybasejs" target="_blank"><img src="https://img.shields.io/badge/%2F%20Twitter-Follow-blue?style=for-the-badge&amp;logo=x&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%23000"> </a><a href="https://discord.com/invite/mGz3mevwP8" target="_blank"><img src="https://img.shields.io/discord/1027918215323590676?style=for-the-badge&amp;logo=discord&amp;logoColor=%23fff&amp;label=Discord&amp;labelColor=%233131e8&amp;color=%23333"></a><br><a href="https://github.com/tinyplex/tinybase/discussions" target="_blank"><img src="https://img.shields.io/github/discussions/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=Ideas&amp;labelColor=%23d81b60&amp;color=%23333"> </a><a href="https://github.com/tinyplex/tinybase/issues" target="_blank"><img src="https://img.shields.io/github/issues/tinyplex/tinybase?style=for-the-badge&amp;logo=GitHub&amp;logoColor=%23fff&amp;label=Issues&amp;labelColor=%23d81b60&amp;color=%23333"> </a><a href="#well-tested-and-documented"><img src="https://img.shields.io/badge/Tests-100%25-green?style=for-the-badge&amp;logo=jest&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%2387c305"> </a><a href="https://www.npmjs.com/package/tinybase/v/6.0.0-beta.2" target="_blank"><img src="https://img.shields.io/npm/v/tinybase?style=for-the-badge&amp;logo=npm&amp;logoColor=%23fff&amp;labelColor=%23bd0005&amp;color=%23333"></a></section><hr><section><h2 id="start-with-a-simple-key-value-store">Start with a simple key-value store.</h2><p>Creating a <a href="https://beta.tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a> requires just a simple call to the <a href="https://beta.tinybase.org/api/store/functions/creation/createstore/"><code>createStore</code></a> function. Once you have one, you can easily set <a href="https://beta.tinybase.org/api/store/type-aliases/store/values/"><code>Values</code></a> in it by unique <a href="https://beta.tinybase.org/api/common/type-aliases/identity/id/"><code>Id</code></a>. And of course you can easily get them back out again.</p><p>Read more about using keyed value data in <a href="https://beta.tinybase.org/guides/the-basics/">The Basics</a> guide.</p></section>
2
2
 
3
3
  ```js
4
4
  import {createStore} from 'tinybase';
@@ -60,7 +60,7 @@ console.log(app.innerHTML);
60
60
  root.unmount();
61
61
  ```
62
62
 
63
- <section><h2 id="pre-built-reactive-components">Pre-built reactive components.</h2><p>The <a href="https://beta.tinybase.org/api/ui-react/"><code>ui-react</code></a> module provides bare React components that let you build up a fully reactive user interface based on a <a href="https://beta.tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a>.</p><p>For web applications in particular, the new <a href="https://beta.tinybase.org/api/ui-react-dom/"><code>ui-react-dom</code></a> module provides pre-built components for tabular display of your data, with lots of customization and interactivity options.</p><p>Try them out in the <a href="https://beta.tinybase.org/demos/ui-components/">UI Components</a> demos, and read more about the underlying <a href="https://beta.tinybase.org/api/ui-react/"><code>ui-react</code></a> module in the <a href="https://beta.tinybase.org/guides/building-uis/">Building UIs</a> guides.</p></section><img src="https://beta.tinybase.org/ui-react-dom.webp"><section><h2 id="an-inspector-for-your-data">An inspector for your data.</h2><p>If you are building a web application, the new <a href="https://beta.tinybase.org/api/ui-react-inspector/functions/development-components/inspector/"><code>Inspector</code></a> component lets you overlay a view of the data in your <a href="https://beta.tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a>, <a href="https://beta.tinybase.org/api/indexes/interfaces/indexes/indexes/"><code>Indexes</code></a>, <a href="https://beta.tinybase.org/api/relationships/interfaces/relationships/relationships/"><code>Relationships</code></a>, and so on. You can even edit the data in place and see it update in your app immediately.</p><p>Read more about this powerful new tool in the <a href="https://beta.tinybase.org/guides/developer-tools/inspecting-data/">Inspecting Data</a> guide.</p></section><img src="https://beta.tinybase.org/store-inspector.webp"><section><h2 id="apply-schemas-to-tables-values">Apply schemas to tables &amp; values.</h2><p>By default, a <a href="https://beta.tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a> can contain any arbitrary <a href="https://beta.tinybase.org/api/store/type-aliases/store/value/"><code>Value</code></a>, and a <a href="https://beta.tinybase.org/api/store/type-aliases/store/row/"><code>Row</code></a> can contain any arbitrary <a href="https://beta.tinybase.org/api/store/type-aliases/store/cell/"><code>Cell</code></a>. But you can add a <a href="https://beta.tinybase.org/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a> or a <a href="https://beta.tinybase.org/api/store/type-aliases/schema/tablesschema/"><code>TablesSchema</code></a> to a <a href="https://beta.tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a> to ensure that the values are always what you expect: constraining their types, and providing defaults.</p><p>In this example, we set a new <a href="https://beta.tinybase.org/api/store/type-aliases/store/row/"><code>Row</code></a> without the <code>sold</code> <a href="https://beta.tinybase.org/api/store/type-aliases/store/cell/"><code>Cell</code></a> in it. The schema ensures it&#x27;s present with default of <code>false</code>.</p><p>Read more about schemas in the <a href="https://beta.tinybase.org/guides/schemas/">Schemas</a> guide.</p></section>
63
+ <section><h2 id="pre-built-reactive-components">Pre-built reactive components.</h2><p>The <a href="https://beta.tinybase.org/api/ui-react/"><code>ui-react</code></a> module provides bare React components that let you build up a fully reactive user interface based on a <a href="https://beta.tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a>.</p><p>For web applications in particular, the new <a href="https://beta.tinybase.org/api/ui-react-dom/"><code>ui-react-dom</code></a> module provides pre-built components for tabular display of your data, with lots of customization and interactivity options.</p><p>Try them out in the <a href="https://beta.tinybase.org/demos/ui-components/">UI Components</a> demos, and read more about the underlying <a href="https://beta.tinybase.org/api/ui-react/"><code>ui-react</code></a> module in the <a href="https://beta.tinybase.org/guides/building-uis/">Building UIs</a> guides.</p></section><img src="https://beta.tinybase.org/ui-react-dom.webp"><section><h2 id="an-inspector-for-your-data">An inspector for your data.</h2><p>If you are building a web application, the new <a href="https://beta.tinybase.org/api/ui-react-inspector/functions/development-components/inspector/"><code>Inspector</code></a> component lets you overlay a view of the data in your <a href="https://beta.tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a>, <a href="https://beta.tinybase.org/api/indexes/interfaces/indexes/indexes/"><code>Indexes</code></a>, <a href="https://beta.tinybase.org/api/relationships/interfaces/relationships/relationships/"><code>Relationships</code></a>, and so on. You can even edit the data in place and see it update in your app immediately.</p><p>Read more about this powerful new tool in the <a href="https://beta.tinybase.org/guides/inspecting-data/">Inspecting Data</a> guide.</p></section><img src="https://beta.tinybase.org/store-inspector.webp"><section><h2 id="apply-schemas-to-tables-values">Apply schemas to tables &amp; values.</h2><p>By default, a <a href="https://beta.tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a> can contain any arbitrary <a href="https://beta.tinybase.org/api/store/type-aliases/store/value/"><code>Value</code></a>, and a <a href="https://beta.tinybase.org/api/store/type-aliases/store/row/"><code>Row</code></a> can contain any arbitrary <a href="https://beta.tinybase.org/api/store/type-aliases/store/cell/"><code>Cell</code></a>. But you can add a <a href="https://beta.tinybase.org/api/store/type-aliases/schema/valuesschema/"><code>ValuesSchema</code></a> or a <a href="https://beta.tinybase.org/api/store/type-aliases/schema/tablesschema/"><code>TablesSchema</code></a> to a <a href="https://beta.tinybase.org/api/store/interfaces/store/store/"><code>Store</code></a> to ensure that the values are always what you expect: constraining their types, and providing defaults. There are even TypeScript definitions that infer API types from the data schemas you apply.</p><p>In this example, we set a new <a href="https://beta.tinybase.org/api/store/type-aliases/store/row/"><code>Row</code></a> without the <code>sold</code> <a href="https://beta.tinybase.org/api/store/type-aliases/store/cell/"><code>Cell</code></a> in it. The schema ensures it&#x27;s present with default of <code>false</code>.</p><p>Read more about schemas in the <a href="https://beta.tinybase.org/guides/schemas/">Schemas</a> guide.</p></section>
64
64
 
65
65
  ```js
66
66
  store.setTablesSchema({
@@ -275,23 +275,4 @@ console.log(store.getCell('pets', 'felix', 'sold'));
275
275
  // -> false
276
276
  ```
277
277
 
278
- <section><h2 id="type-definitions-orm-like-apis">Type definitions &amp; ORM-like APIs</h2><p>TinyBase has comprehensive type definitions, and even offers definitions that infer API types from the data schemas you apply.</p><p>Furthermore, you can easily create TypeScript <code>.d.ts</code> definitions that model your data and encourage type-safety when reading and writing data - as well as <code>.ts</code> implementations that provide ORM-like methods for your named tables.</p><p>Read more about type support in the <a href="https://beta.tinybase.org/guides/the-basics/tinybase-and-typescript/">TinyBase And TypeScript</a> guide.</p></section>
279
-
280
- ```js yolo
281
- const tools = createTools(store);
282
- const [dTs, ts] = tools.getStoreApi('shop');
283
-
284
- // -- shop.d.ts --
285
- /* Represents the 'pets' Table. */
286
- export type PetsTable = {[rowId: Id]: PetsRow};
287
- /* Represents a Row when getting the content of the 'pets' Table. */
288
- export type PetsRow = {species: string /* ... */};
289
- //...
290
-
291
- // -- shop.ts --
292
- export const createShop: typeof createShopDecl = () => {
293
- //...
294
- };
295
- ```
296
-
297
- <section><h2 id="did-we-say-tiny">Did we say tiny?</h2><p>If you use the basic <a href="https://beta.tinybase.org/api/store/"><code>store</code></a> module alone, you&#x27;ll only add a gzipped <em>5.3kB</em> to your app. Incrementally add the other modules as you need more functionality, or get it all for <em>11.4kB</em>.</p><p>The optional <a href="https://beta.tinybase.org/api/ui-react/"><code>ui-react</code></a> module is just <em>4.9kB</em>, the ui-react-dom components are another <em>2.6kB</em>, and everything is super fast. Life is easy when you have zero dependencies!</p><p>Read more about how TinyBase is structured and packaged in the <a href="https://beta.tinybase.org/guides/how-tinybase-is-built/architecture/">Architecture</a> guide.</p></section><div class="table"><table class="fixed"><tbody><tr><th> </th><th>Minified .js.gz</th><th>Source .js</th></tr><tr><th class="right"><a href="https://beta.tinybase.org/api/store/">tinybase/store</a> (minimal)</th><td>5.3kB</td><td>52.7kB</td></tr><tr><th class="right">tinybase (complete)</th><td>11.4kB</td><td>119.4kB</td></tr><tr><th class="right"><a href="https://beta.tinybase.org/api/ui-react/">ui-react</a></th><td>4.9kB</td><td>53.7kB</td></tr><tr><th class="right"><a href="https://beta.tinybase.org/api/ui-react-dom/">ui-react-dom</a></th><td>2.6kB</td><td>21.1kB</td></tr></tbody></table></div><section><h2 id="well-tested-and-documented">Well tested and documented.</h2><p>TinyBase has <em>100.0%</em> test coverage, including the code throughout the documentation - even on this page! The guides, demos, and API examples are designed to make it as easy as possible for you to get your TinyBase-powered app up and running.</p><p>Read more about how TinyBase is tested in the Unit <a href="https://beta.tinybase.org/guides/how-tinybase-is-built/testing/">Testing</a> guide.</p></section><div class="table"><table class="fixed"><tbody><tr><th width="30%"> </th><th>Total</th><th>Tested</th><th>Coverage</th></tr><tr><th class="right">Lines</th><td>2,292</td><td>2,292</td><td>100.0%</td></tr><tr><th class="right">Statements</th><td>2,477</td><td>2,477</td><td>100.0%</td></tr><tr><th class="right">Functions</th><td>990</td><td>990</td><td>100.0%</td></tr><tr><th class="right">Branches</th><td>854</td><td>854</td><td>100.0%</td></tr><tr><th class="right">Tests</th><td colspan="3">7,100</td></tr><tr><th class="right">Assertions</th><td colspan="3">32,824</td></tr></tbody></table></div><hr><section id="sponsors"><h2 id="proud-to-be-sponsored-by">Proud to be sponsored by:</h2><a href="https://github.com/cpojer" target="_blank"><img src="https://github.com/cpojer.png?size=48" title="cpojer" width="48" height="48"></a><a href="https://github.com/expo" target="_blank"><img src="https://github.com/expo.png?size=48" title="expo" width="48" height="48"></a><a href="https://github.com/beekeeb" target="_blank"><img src="https://github.com/beekeeb.png?size=48" title="beekeeb" width="48" height="48"></a><a href="https://github.com/cancelself" target="_blank"><img src="https://github.com/cancelself.png?size=48" title="cancelself" width="48" height="48"></a><a href="https://github.com/WonderPanda" target="_blank"><img src="https://github.com/WonderPanda.png?size=48" title="WonderPanda" width="48" height="48"></a><a href="https://github.com/arpitBhalla" target="_blank"><img src="https://github.com/arpitBhalla.png?size=48" title="arpitBhalla" width="48" height="48"></a></section><section id="users"><h2 id="excited-to-be-used-by">Excited to be used by:</h2><a href="https://github.com/behrends" target="_blank"><img src="https://github.com/behrends.png?size=48" title="behrends" width="48" height="48"></a><a href="https://github.com/betomoedano" target="_blank"><img src="https://github.com/betomoedano.png?size=48" title="betomoedano" width="48" height="48"></a><a href="https://github.com/brentvatne" target="_blank"><img src="https://github.com/brentvatne.png?size=48" title="brentvatne" width="48" height="48"></a><a href="https://github.com/byCedric" target="_blank"><img src="https://github.com/byCedric.png?size=48" title="byCedric" width="48" height="48"></a><a href="https://github.com/circadian-risk" target="_blank"><img src="https://github.com/circadian-risk.png?size=48" title="circadian-risk" width="48" height="48"></a><a href="https://github.com/cpojer" target="_blank"><img src="https://github.com/cpojer.png?size=48" title="cpojer" width="48" height="48"></a><a href="https://github.com/cubecull" target="_blank"><img src="https://github.com/cubecull.png?size=48" title="cubecull" width="48" height="48"></a><a href="https://github.com/erwinkn" target="_blank"><img src="https://github.com/erwinkn.png?size=48" title="erwinkn" width="48" height="48"></a><a href="https://github.com/expo" target="_blank"><img src="https://github.com/expo.png?size=48" title="expo" width="48" height="48"></a><a href="https://github.com/ezra-en" target="_blank"><img src="https://github.com/ezra-en.png?size=48" title="ezra-en" width="48" height="48"></a><a href="https://github.com/feychenie" target="_blank"><img src="https://github.com/feychenie.png?size=48" title="feychenie" width="48" height="48"></a><a href="https://github.com/flaming-codes" target="_blank"><img src="https://github.com/flaming-codes.png?size=48" title="flaming-codes" width="48" height="48"></a><a href="https://github.com/fostertheweb" target="_blank"><img src="https://github.com/fostertheweb.png?size=48" title="fostertheweb" width="48" height="48"></a><a href="https://github.com/Giulio987" target="_blank"><img src="https://github.com/Giulio987.png?size=48" title="Giulio987" width="48" height="48"></a><a href="https://github.com/hi-ogawa" target="_blank"><img src="https://github.com/hi-ogawa.png?size=48" title="hi-ogawa" width="48" height="48"></a><a href="https://github.com/itsdevcoffee" target="_blank"><img src="https://github.com/itsdevcoffee.png?size=48" title="itsdevcoffee" width="48" height="48"></a><a href="https://github.com/jbolda" target="_blank"><img src="https://github.com/jbolda.png?size=48" title="jbolda" width="48" height="48"></a><a href="https://github.com/Kayoo-asso" target="_blank"><img src="https://github.com/Kayoo-asso.png?size=48" title="Kayoo-asso" width="48" height="48"></a><a href="https://github.com/kotofurumiya" target="_blank"><img src="https://github.com/kotofurumiya.png?size=48" title="kotofurumiya" width="48" height="48"></a><a href="https://github.com/Kudo" target="_blank"><img src="https://github.com/Kudo.png?size=48" title="Kudo" width="48" height="48"></a><a href="https://github.com/learn-anything" target="_blank"><img src="https://github.com/learn-anything.png?size=48" title="learn-anything" width="48" height="48"></a><a href="https://github.com/lluc" target="_blank"><img src="https://github.com/lluc.png?size=48" title="lluc" width="48" height="48"></a><a href="https://github.com/marksteve" target="_blank"><img src="https://github.com/marksteve.png?size=48" title="marksteve" width="48" height="48"></a><a href="https://github.com/miking-the-viking" target="_blank"><img src="https://github.com/miking-the-viking.png?size=48" title="miking-the-viking" width="48" height="48"></a><a href="https://github.com/mjamesderocher" target="_blank"><img src="https://github.com/mjamesderocher.png?size=48" title="mjamesderocher" width="48" height="48"></a><a href="https://github.com/mouktardev" target="_blank"><img src="https://github.com/mouktardev.png?size=48" title="mouktardev" width="48" height="48"></a><a href="https://github.com/nickmessing" target="_blank"><img src="https://github.com/nickmessing.png?size=48" title="nickmessing" width="48" height="48"></a><a href="https://github.com/nikitavoloboev" target="_blank"><img src="https://github.com/nikitavoloboev.png?size=48" title="nikitavoloboev" width="48" height="48"></a><a href="https://github.com/nkzw-tech" target="_blank"><img src="https://github.com/nkzw-tech.png?size=48" title="nkzw-tech" width="48" height="48"></a><a href="https://github.com/palerdot" target="_blank"><img src="https://github.com/palerdot.png?size=48" title="palerdot" width="48" height="48"></a><a href="https://github.com/PorcoRosso85" target="_blank"><img src="https://github.com/PorcoRosso85.png?size=48" title="PorcoRosso85" width="48" height="48"></a><a href="https://github.com/primodiumxyz" target="_blank"><img src="https://github.com/primodiumxyz.png?size=48" title="primodiumxyz" width="48" height="48"></a><a href="https://github.com/shaneosullivan" target="_blank"><img src="https://github.com/shaneosullivan.png?size=48" title="shaneosullivan" width="48" height="48"></a><a href="https://github.com/sudo-self" target="_blank"><img src="https://github.com/sudo-self.png?size=48" title="sudo-self" width="48" height="48"></a><a href="https://github.com/SuperSonicHub1" target="_blank"><img src="https://github.com/SuperSonicHub1.png?size=48" title="SuperSonicHub1" width="48" height="48"></a><a href="https://github.com/threepointone" target="_blank"><img src="https://github.com/threepointone.png?size=48" title="threepointone" width="48" height="48"></a><a href="https://github.com/uptonking" target="_blank"><img src="https://github.com/uptonking.png?size=48" title="uptonking" width="48" height="48"></a><a href="https://github.com/ViktorZhurbin" target="_blank"><img src="https://github.com/ViktorZhurbin.png?size=48" title="ViktorZhurbin" width="48" height="48"></a><a href="https://github.com/wilkerlucio" target="_blank"><img src="https://github.com/wilkerlucio.png?size=48" title="wilkerlucio" width="48" height="48"></a><a href="https://github.com/WonderPanda" target="_blank"><img src="https://github.com/WonderPanda.png?size=48" title="WonderPanda" width="48" height="48"></a></section><hr><p><a class="start" href="https://beta.tinybase.org/guides/the-basics/getting-started/">Get started</a></p><p><a href="https://beta.tinybase.org/demos/">Try the demos</a></p><p><a href="https://beta.tinybase.org/api/store/interfaces/store/store/">Read the docs</a></p><hr><section id="family"><h2 id="meet-the-family">Meet the family</h2><p>TinyBase is part of a group of small libraries designed to help make rich client and local-first apps easier to build. Check out the others!</p><p><img src="https://tinybase.org/favicon.svg?asImg" width="48"><br><b>TinyBase</b><br>The reactive data store for local-first apps.</p><p><a href="https://tinywidgets.org" target="_blank"><img src="https://tinywidgets.org/favicon.svg?asImg" width="48"><br><b>TinyWidgets</b></a><br>A collection of tiny, reusable, UI components.</p><p><a href="https://tinytick.org" target="_blank"><img src="https://tinytick.org/favicon.svg?asImg" width="48"><br><b>TinyTick</b></a><br>A tiny but very useful task orchestrator.</p></section><hr><section id="about"><h2 id="about">About</h2><p>Modern apps deserve better. Why trade reactive user experiences to be able to use relational data? Or sacrifice features for bundle size? And why does the cloud do all the work <a href="https://localfirstweb.dev/" target="_blank">anyway</a>?</p><p>Building TinyBase was originally an interesting exercise for <a rel="me" href="https://tripleodeon.com">me</a> in API design, minification, and documentation. But now it has taken on a life of its own, and has grown beyond my wildest expectations.</p><p>It could not have been built without these great <a href="https://beta.tinybase.org/guides/how-tinybase-is-built/credits/#giants">projects</a> and <a href="https://beta.tinybase.org/guides/how-tinybase-is-built/credits/#and-friends">friends</a>, and I hope you enjoy using it as much as I do building it!</p></section><section id="story"><h2 id="the-story">The story</h2><a href="https://youtu.be/hXL7OkW-Prk?t=1232" target="_blank"><img src="https://beta.tinybase.org/youtube.webp"></a></section>
278
+ <section><h2 id="did-we-say-tiny">Did we say tiny?</h2><p>If you use the basic <a href="https://beta.tinybase.org/api/store/"><code>store</code></a> module alone, you&#x27;ll only add a gzipped <em>5.3kB</em> to your app. Incrementally add the other modules as you need more functionality, or get it all for <em>11.4kB</em>.</p><p>The optional <a href="https://beta.tinybase.org/api/ui-react/"><code>ui-react</code></a> module is just <em>4.9kB</em>, the ui-react-dom components are another <em>2.6kB</em>, and everything is super fast. Life is easy when you have zero dependencies!</p><p>Read more about how TinyBase is structured and packaged in the <a href="https://beta.tinybase.org/guides/how-tinybase-is-built/architecture/">Architecture</a> guide.</p></section><div class="table"><table class="fixed"><tbody><tr><th> </th><th>Minified .js.gz</th><th>Source .js</th></tr><tr><th class="right"><a href="https://beta.tinybase.org/api/store/">tinybase/store</a> (minimal)</th><td>5.3kB</td><td>52.7kB</td></tr><tr><th class="right">tinybase (complete)</th><td>11.4kB</td><td>119.4kB</td></tr><tr><th class="right"><a href="https://beta.tinybase.org/api/ui-react/">ui-react</a></th><td>4.9kB</td><td>53.7kB</td></tr><tr><th class="right"><a href="https://beta.tinybase.org/api/ui-react-dom/">ui-react-dom</a></th><td>2.6kB</td><td>21.1kB</td></tr></tbody></table></div><section><h2 id="well-tested-and-documented">Well tested and documented.</h2><p>TinyBase has <em>100.0%</em> test coverage, including the code throughout the documentation - even on this page! The guides, demos, and API examples are designed to make it as easy as possible for you to get your TinyBase-powered app up and running.</p><p>Read more about how TinyBase is tested in the Unit <a href="https://beta.tinybase.org/guides/how-tinybase-is-built/testing/">Testing</a> guide.</p></section><div class="table"><table class="fixed"><tbody><tr><th width="30%"> </th><th>Total</th><th>Tested</th><th>Coverage</th></tr><tr><th class="right">Lines</th><td>2,292</td><td>2,292</td><td>100.0%</td></tr><tr><th class="right">Statements</th><td>2,477</td><td>2,477</td><td>100.0%</td></tr><tr><th class="right">Functions</th><td>990</td><td>990</td><td>100.0%</td></tr><tr><th class="right">Branches</th><td>854</td><td>854</td><td>100.0%</td></tr><tr><th class="right">Tests</th><td colspan="3">7,063</td></tr><tr><th class="right">Assertions</th><td colspan="3">0</td></tr></tbody></table></div><hr><section id="sponsors"><h2 id="proud-to-be-sponsored-by">Proud to be sponsored by:</h2><a href="https://github.com/cpojer" target="_blank"><img src="https://github.com/cpojer.png?size=48" title="cpojer" width="48" height="48"></a><a href="https://github.com/expo" target="_blank"><img src="https://github.com/expo.png?size=48" title="expo" width="48" height="48"></a><a href="https://github.com/beekeeb" target="_blank"><img src="https://github.com/beekeeb.png?size=48" title="beekeeb" width="48" height="48"></a><a href="https://github.com/cancelself" target="_blank"><img src="https://github.com/cancelself.png?size=48" title="cancelself" width="48" height="48"></a><a href="https://github.com/WonderPanda" target="_blank"><img src="https://github.com/WonderPanda.png?size=48" title="WonderPanda" width="48" height="48"></a><a href="https://github.com/arpitBhalla" target="_blank"><img src="https://github.com/arpitBhalla.png?size=48" title="arpitBhalla" width="48" height="48"></a></section><section id="users"><h2 id="excited-to-be-used-by">Excited to be used by:</h2><a href="https://github.com/behrends" target="_blank"><img src="https://github.com/behrends.png?size=48" title="behrends" width="48" height="48"></a><a href="https://github.com/betomoedano" target="_blank"><img src="https://github.com/betomoedano.png?size=48" title="betomoedano" width="48" height="48"></a><a href="https://github.com/brentvatne" target="_blank"><img src="https://github.com/brentvatne.png?size=48" title="brentvatne" width="48" height="48"></a><a href="https://github.com/byCedric" target="_blank"><img src="https://github.com/byCedric.png?size=48" title="byCedric" width="48" height="48"></a><a href="https://github.com/circadian-risk" target="_blank"><img src="https://github.com/circadian-risk.png?size=48" title="circadian-risk" width="48" height="48"></a><a href="https://github.com/cpojer" target="_blank"><img src="https://github.com/cpojer.png?size=48" title="cpojer" width="48" height="48"></a><a href="https://github.com/cubecull" target="_blank"><img src="https://github.com/cubecull.png?size=48" title="cubecull" width="48" height="48"></a><a href="https://github.com/erwinkn" target="_blank"><img src="https://github.com/erwinkn.png?size=48" title="erwinkn" width="48" height="48"></a><a href="https://github.com/expo" target="_blank"><img src="https://github.com/expo.png?size=48" title="expo" width="48" height="48"></a><a href="https://github.com/ezra-en" target="_blank"><img src="https://github.com/ezra-en.png?size=48" title="ezra-en" width="48" height="48"></a><a href="https://github.com/feychenie" target="_blank"><img src="https://github.com/feychenie.png?size=48" title="feychenie" width="48" height="48"></a><a href="https://github.com/flaming-codes" target="_blank"><img src="https://github.com/flaming-codes.png?size=48" title="flaming-codes" width="48" height="48"></a><a href="https://github.com/fostertheweb" target="_blank"><img src="https://github.com/fostertheweb.png?size=48" title="fostertheweb" width="48" height="48"></a><a href="https://github.com/Giulio987" target="_blank"><img src="https://github.com/Giulio987.png?size=48" title="Giulio987" width="48" height="48"></a><a href="https://github.com/hi-ogawa" target="_blank"><img src="https://github.com/hi-ogawa.png?size=48" title="hi-ogawa" width="48" height="48"></a><a href="https://github.com/itsdevcoffee" target="_blank"><img src="https://github.com/itsdevcoffee.png?size=48" title="itsdevcoffee" width="48" height="48"></a><a href="https://github.com/jbolda" target="_blank"><img src="https://github.com/jbolda.png?size=48" title="jbolda" width="48" height="48"></a><a href="https://github.com/Kayoo-asso" target="_blank"><img src="https://github.com/Kayoo-asso.png?size=48" title="Kayoo-asso" width="48" height="48"></a><a href="https://github.com/kotofurumiya" target="_blank"><img src="https://github.com/kotofurumiya.png?size=48" title="kotofurumiya" width="48" height="48"></a><a href="https://github.com/Kudo" target="_blank"><img src="https://github.com/Kudo.png?size=48" title="Kudo" width="48" height="48"></a><a href="https://github.com/learn-anything" target="_blank"><img src="https://github.com/learn-anything.png?size=48" title="learn-anything" width="48" height="48"></a><a href="https://github.com/lluc" target="_blank"><img src="https://github.com/lluc.png?size=48" title="lluc" width="48" height="48"></a><a href="https://github.com/marksteve" target="_blank"><img src="https://github.com/marksteve.png?size=48" title="marksteve" width="48" height="48"></a><a href="https://github.com/miking-the-viking" target="_blank"><img src="https://github.com/miking-the-viking.png?size=48" title="miking-the-viking" width="48" height="48"></a><a href="https://github.com/mjamesderocher" target="_blank"><img src="https://github.com/mjamesderocher.png?size=48" title="mjamesderocher" width="48" height="48"></a><a href="https://github.com/mouktardev" target="_blank"><img src="https://github.com/mouktardev.png?size=48" title="mouktardev" width="48" height="48"></a><a href="https://github.com/nickmessing" target="_blank"><img src="https://github.com/nickmessing.png?size=48" title="nickmessing" width="48" height="48"></a><a href="https://github.com/nikitavoloboev" target="_blank"><img src="https://github.com/nikitavoloboev.png?size=48" title="nikitavoloboev" width="48" height="48"></a><a href="https://github.com/nkzw-tech" target="_blank"><img src="https://github.com/nkzw-tech.png?size=48" title="nkzw-tech" width="48" height="48"></a><a href="https://github.com/palerdot" target="_blank"><img src="https://github.com/palerdot.png?size=48" title="palerdot" width="48" height="48"></a><a href="https://github.com/PorcoRosso85" target="_blank"><img src="https://github.com/PorcoRosso85.png?size=48" title="PorcoRosso85" width="48" height="48"></a><a href="https://github.com/primodiumxyz" target="_blank"><img src="https://github.com/primodiumxyz.png?size=48" title="primodiumxyz" width="48" height="48"></a><a href="https://github.com/shaneosullivan" target="_blank"><img src="https://github.com/shaneosullivan.png?size=48" title="shaneosullivan" width="48" height="48"></a><a href="https://github.com/sudo-self" target="_blank"><img src="https://github.com/sudo-self.png?size=48" title="sudo-self" width="48" height="48"></a><a href="https://github.com/SuperSonicHub1" target="_blank"><img src="https://github.com/SuperSonicHub1.png?size=48" title="SuperSonicHub1" width="48" height="48"></a><a href="https://github.com/threepointone" target="_blank"><img src="https://github.com/threepointone.png?size=48" title="threepointone" width="48" height="48"></a><a href="https://github.com/uptonking" target="_blank"><img src="https://github.com/uptonking.png?size=48" title="uptonking" width="48" height="48"></a><a href="https://github.com/ViktorZhurbin" target="_blank"><img src="https://github.com/ViktorZhurbin.png?size=48" title="ViktorZhurbin" width="48" height="48"></a><a href="https://github.com/wilkerlucio" target="_blank"><img src="https://github.com/wilkerlucio.png?size=48" title="wilkerlucio" width="48" height="48"></a><a href="https://github.com/WonderPanda" target="_blank"><img src="https://github.com/WonderPanda.png?size=48" title="WonderPanda" width="48" height="48"></a></section><hr><p><a class="start" href="https://beta.tinybase.org/guides/the-basics/getting-started/">Get started</a></p><p><a href="https://beta.tinybase.org/demos/">Try the demos</a></p><p><a href="https://beta.tinybase.org/api/store/interfaces/store/store/">Read the docs</a></p><hr><section id="family"><h2 id="meet-the-family">Meet the family</h2><p>TinyBase is part of a group of small libraries designed to help make rich client and local-first apps easier to build. Check out the others!</p><p><img src="https://tinybase.org/favicon.svg?asImg" width="48"><br><b>TinyBase</b><br>The reactive data store for local-first apps.</p><p><a href="https://tinywidgets.org" target="_blank"><img src="https://tinywidgets.org/favicon.svg?asImg" width="48"><br><b>TinyWidgets</b></a><br>A collection of tiny, reusable, UI components.</p><p><a href="https://tinytick.org" target="_blank"><img src="https://tinytick.org/favicon.svg?asImg" width="48"><br><b>TinyTick</b></a><br>A tiny but very useful task orchestrator.</p></section><hr><section id="about"><h2 id="about">About</h2><p>Modern apps deserve better. Why trade reactive user experiences to be able to use relational data? Or sacrifice features for bundle size? And why does the cloud do all the work <a href="https://localfirstweb.dev/" target="_blank">anyway</a>?</p><p>Building TinyBase was originally an interesting exercise for <a rel="me" href="https://tripleodeon.com">me</a> in API design, minification, and documentation. But now it has taken on a life of its own, and has grown beyond my wildest expectations.</p><p>It could not have been built without these great <a href="https://beta.tinybase.org/guides/how-tinybase-is-built/credits/#giants">projects</a> and <a href="https://beta.tinybase.org/guides/how-tinybase-is-built/credits/#and-friends">friends</a>, and I hope you enjoy using it as much as I do building it!</p></section><section id="story"><h2 id="the-story">The story</h2><a href="https://youtu.be/hXL7OkW-Prk?t=1232" target="_blank"><img src="https://beta.tinybase.org/youtube.webp"></a></section>