tinybase 8.3.0-beta.1 → 8.3.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 (74) hide show
  1. package/@types/_internal/ui-solid/index.d.ts +0 -0
  2. package/@types/_internal/ui-solid/with-schemas/index.d.ts +1104 -0
  3. package/@types/persisters/index.d.ts +2 -2
  4. package/@types/persisters/with-schemas/index.d.ts +2 -2
  5. package/@types/schematizers/schematizer-arktype/index.d.ts +5 -4
  6. package/@types/schematizers/schematizer-effect/index.d.ts +7 -7
  7. package/@types/schematizers/schematizer-typebox/index.d.ts +4 -3
  8. package/@types/schematizers/schematizer-valibot/index.d.ts +5 -4
  9. package/@types/schematizers/schematizer-yup/index.d.ts +4 -3
  10. package/@types/schematizers/schematizer-zod/index.d.ts +6 -5
  11. package/@types/ui-react/index.d.ts +6 -6
  12. package/@types/ui-react/with-schemas/index.d.ts +6 -6
  13. package/@types/ui-solid/index.d.ts +16336 -0
  14. package/@types/ui-solid/with-schemas/index.d.ts +16951 -0
  15. package/@types/ui-svelte/index.d.ts +6123 -80
  16. package/@types/ui-svelte/with-schemas/index.d.ts +7348 -89
  17. package/agents.md +3 -3
  18. package/min/schematizers/schematizer-arktype/index.js +1 -1
  19. package/min/schematizers/schematizer-arktype/index.js.gz +0 -0
  20. package/min/schematizers/schematizer-arktype/with-schemas/index.js +1 -1
  21. package/min/schematizers/schematizer-arktype/with-schemas/index.js.gz +0 -0
  22. package/min/schematizers/schematizer-effect/index.js +1 -1
  23. package/min/schematizers/schematizer-effect/index.js.gz +0 -0
  24. package/min/schematizers/schematizer-effect/with-schemas/index.js +1 -1
  25. package/min/schematizers/schematizer-effect/with-schemas/index.js.gz +0 -0
  26. package/min/schematizers/schematizer-typebox/index.js +1 -1
  27. package/min/schematizers/schematizer-typebox/index.js.gz +0 -0
  28. package/min/schematizers/schematizer-typebox/with-schemas/index.js +1 -1
  29. package/min/schematizers/schematizer-typebox/with-schemas/index.js.gz +0 -0
  30. package/min/schematizers/schematizer-valibot/index.js +1 -1
  31. package/min/schematizers/schematizer-valibot/index.js.gz +0 -0
  32. package/min/schematizers/schematizer-valibot/with-schemas/index.js +1 -1
  33. package/min/schematizers/schematizer-valibot/with-schemas/index.js.gz +0 -0
  34. package/min/schematizers/schematizer-yup/index.js +1 -1
  35. package/min/schematizers/schematizer-yup/index.js.gz +0 -0
  36. package/min/schematizers/schematizer-yup/with-schemas/index.js +1 -1
  37. package/min/schematizers/schematizer-yup/with-schemas/index.js.gz +0 -0
  38. package/min/schematizers/schematizer-zod/index.js +1 -1
  39. package/min/schematizers/schematizer-zod/index.js.gz +0 -0
  40. package/min/schematizers/schematizer-zod/with-schemas/index.js +1 -1
  41. package/min/schematizers/schematizer-zod/with-schemas/index.js.gz +0 -0
  42. package/min/ui-react/index.js +1 -1
  43. package/min/ui-react/index.js.gz +0 -0
  44. package/min/ui-react/with-schemas/index.js +1 -1
  45. package/min/ui-react/with-schemas/index.js.gz +0 -0
  46. package/min/ui-solid/index.js +1 -0
  47. package/min/ui-solid/index.js.gz +0 -0
  48. package/min/ui-solid/with-schemas/index.js +1 -0
  49. package/min/ui-solid/with-schemas/index.js.gz +0 -0
  50. package/min/ui-svelte/index.js +1 -1
  51. package/min/ui-svelte/index.js.gz +0 -0
  52. package/min/ui-svelte/with-schemas/index.js +1 -1
  53. package/min/ui-svelte/with-schemas/index.js.gz +0 -0
  54. package/package.json +48 -8
  55. package/readme.md +3 -3
  56. package/releases.md +55 -14
  57. package/schematizers/schematizer-arktype/index.js +16 -11
  58. package/schematizers/schematizer-arktype/with-schemas/index.js +16 -11
  59. package/schematizers/schematizer-effect/index.js +27 -14
  60. package/schematizers/schematizer-effect/with-schemas/index.js +27 -14
  61. package/schematizers/schematizer-typebox/index.js +13 -4
  62. package/schematizers/schematizer-typebox/with-schemas/index.js +13 -4
  63. package/schematizers/schematizer-valibot/index.js +17 -1
  64. package/schematizers/schematizer-valibot/with-schemas/index.js +17 -1
  65. package/schematizers/schematizer-yup/index.js +16 -5
  66. package/schematizers/schematizer-yup/with-schemas/index.js +16 -5
  67. package/schematizers/schematizer-zod/index.js +16 -6
  68. package/schematizers/schematizer-zod/with-schemas/index.js +16 -6
  69. package/ui-react/index.js +1 -1
  70. package/ui-react/with-schemas/index.js +1 -1
  71. package/ui-solid/index.js +2154 -0
  72. package/ui-solid/with-schemas/index.js +2154 -0
  73. package/ui-svelte/index.js +11 -4
  74. package/ui-svelte/with-schemas/index.js +11 -4
@@ -1 +1 @@
1
- import"svelte/internal/disclose-version";import*as e from"svelte/internal/client";import{getContext as t,setContext as r,untrack as n}from"svelte";import{createSubscriber as s}from"svelte/reactivity";const d=e=>typeof e,u=d(""),o=d(d),c="Listener",g="Result",i="Has",a="Ids",p="Table",l=p+"s",I=p+a,f="Row",b=f+"Count",h=f+a,m="Sorted"+f+a,v="Cell",x=v+a,_="Value",w=_+"s",y=_+a,$="Transaction",k="Finish",q="Status",R="Metric",C="Slice",T="RemoteRowId",L="Local",B="Linked",V="Checkpoint",S=globalThis,z=e=>void 0===e,F=()=>!z(S.window),P=(j=z,(e,t,r)=>j(e)?r?.():t(e));var j;const A=()=>{},D=Object.keys,H="tinybase_uisc";class M{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get current(){return this.#t(),this.#e()}}class O extends M{#r;constructor(e,t,r){super(e,r),this.#r=t}get current(){return super.current}set current(e){this.#r(e)}}const Q=[],W={},E=[Q,void 0,Q],G=e=>(e=>d(e)==o)(e)?e():e,J=()=>t(H)??[],K=(e,t,r)=>{return z(t)?e[2*r]:d(t)==u?(n=e[2*r+1],s=t,P(n,e=>e[s])):t;var n,s},N=(e,t)=>K(J(),e,t),U=(e,t)=>{const r=J();return()=>K(r,G(e),t)},X=(e,t)=>D(e[2*t+1]??W),Y=e=>U(e,0),Z=e=>U(e,1),ee=e=>U(e,2),te=e=>U(e,3),re=e=>U(e,4),ne=e=>U(e,5),se=e=>U(e,6),de=e=>U(e,7),ue=(t,r,n,d=()=>Q,u)=>{const o=(u?"has":"get")+r,g="add"+(u?i:"")+r+c;let a=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const r=t(),n=d();e.set(a,s(e=>{const t=r?.[g]?.(...n,e);return()=>r?.delListener?.(t)}),!0)}),new M(()=>t()?.[o]?.(...d())??n,()=>e.get(a)())},oe=(t,r,n,s=()=>Q,d)=>{F()&&e.user_effect(()=>{const e=t(),u=s(),o=e?.["add"+r+c]?.(...u,n,...void 0!==d?[d]:Q);return()=>e?.delListener?.(o)})},ce=e=>ue(Y(e),l,!1,()=>Q,1),ge=e=>ue(Y(e),l,W),ie=e=>ue(Y(e),I,Q),ae=(e,t)=>ue(Y(t),p,!1,()=>[G(e)],1),pe=(e,t)=>ue(Y(t),p,W,()=>[G(e)]),le=(e,t)=>ue(Y(t),p+x,Q,()=>[G(e)]),Ie=(e,t,r)=>ue(Y(r),p+v,!1,()=>[G(e),G(t)],1),fe=(e,t)=>ue(Y(t),b,0,()=>[G(e)]),be=(e,t)=>ue(Y(t),h,Q,()=>[G(e)]),he=(e,t,r=!1,n=0,s,d)=>ue(Y(d),m,Q,()=>[G(e),G(t),G(r),G(n),G(s)]),me=(e,t,r)=>ue(Y(r),f,!1,()=>[G(e),G(t)],1),ve=(e,t,r)=>ue(Y(r),f,W,()=>[G(e),G(t)]),xe=(e,t,r)=>ue(Y(r),x,Q,()=>[G(e),G(t)]),_e=(e,t,r,n)=>ue(Y(n),v,!1,()=>[G(e),G(t),G(r)],1),we=(t,r,n,d)=>{const u=Y(d);let o=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const d=u(),c=G(t),g=G(r),i=G(n);e.set(o,s(e=>{const t=d?.addCellListener(c,g,i,e);return()=>d?.delListener?.(t)}),!0)}),new O(()=>u()?.getCell(G(t),G(r),G(n)),e=>u()?.setCell(G(t),G(r),G(n),e),()=>e.get(o)())},ye=e=>ue(Y(e),w,!1,()=>Q,1),$e=e=>ue(Y(e),w,W),ke=e=>ue(Y(e),y,Q),qe=(e,t)=>ue(Y(t),_,!1,()=>[G(e)],1),Re=(t,r)=>{const n=Y(r);let d=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const r=n(),u=G(t);e.set(d,s(e=>{const t=r?.addValueListener(u,e);return()=>r?.delListener?.(t)}),!0)}),new O(()=>n()?.getValue(G(t)),e=>n()?.setValue(G(t),e),()=>e.get(d)())},Ce=e=>N(e,0),Te=()=>{const t=J();let r=e.state(e.proxy(X(t,0)));return F()&&e.user_effect(()=>{e.set(r,X(t,0),!0)}),{get current(){return e.get(r)}}},Le=e=>N(e,1),Be=()=>{const t=J();let r=e.state(e.proxy(X(t,1)));return F()&&e.user_effect(()=>{e.set(r,X(t,1),!0)}),{get current(){return e.get(r)}}},Ve=e=>ue(Z(e),R+a,Q),Se=(e,t)=>ue(Z(t),R,void 0,()=>[G(e)]),ze=e=>N(e,2),Fe=()=>{const t=J();let r=e.state(e.proxy(X(t,2)));return F()&&e.user_effect(()=>{e.set(r,X(t,2),!0)}),{get current(){return e.get(r)}}},Pe=e=>ue(ee(e),"Index"+a,Q),je=(e,t)=>ue(ee(t),C+a,Q,()=>[G(e)]),Ae=(e,t,r)=>ue(ee(r),C+h,Q,()=>[G(e),G(t)]),De=(e,t)=>{const r=ee(e);return{get store(){return r()?.getStore()},get tableId(){return r()?.getTableId(G(t))}}},He=e=>N(e,4),Me=()=>{const t=J();let r=e.state(e.proxy(X(t,4)));return F()&&e.user_effect(()=>{e.set(r,X(t,4),!0)}),{get current(){return e.get(r)}}},Oe=e=>ue(re(e),"Query"+a,Q),Qe=(e,t)=>ue(re(t),g+p,W,()=>[G(e)]),We=(e,t)=>ue(re(t),g+p+x,Q,()=>[G(e)]),Ee=(e,t)=>ue(re(t),g+b,0,()=>[G(e)]),Ge=(e,t)=>ue(re(t),g+h,Q,()=>[G(e)]),Je=(e,t,r=!1,n=0,s,d)=>ue(re(d),g+m,Q,()=>[G(e),G(t),G(r),G(n),G(s)]),Ke=(e,t,r)=>ue(re(r),g+f,W,()=>[G(e),G(t)]),Ne=(e,t,r)=>ue(re(r),g+x,Q,()=>[G(e),G(t)]),Ue=(e,t,r,n)=>ue(re(n),g+v,void 0,()=>[G(e),G(t),G(r)]),Xe=e=>N(e,3),Ye=()=>{const t=J();let r=e.state(e.proxy(X(t,3)));return F()&&e.user_effect(()=>{e.set(r,X(t,3),!0)}),{get current(){return e.get(r)}}},Ze=e=>ue(te(e),"Relationship"+a,Q),et=(e,t,r)=>ue(te(r),T,void 0,()=>[G(e),G(t)]),tt=(e,t,r)=>ue(te(r),L+h,Q,()=>[G(e),G(t)]),rt=(e,t,r)=>ue(te(r),B+h,Q,()=>[G(e),G(t)]),nt=(e,t)=>{const r=te(e);return{get store(){return r()?.getStore()},get localTableId(){return r()?.getLocalTableId(G(t))},get remoteTableId(){return r()?.getRemoteTableId(G(t))}}},st=e=>N(e,5),dt=()=>{const t=J();let r=e.state(e.proxy(X(t,5)));return F()&&e.user_effect(()=>{e.set(r,X(t,5),!0)}),{get current(){return e.get(r)}}},ut=e=>ue(ne(e),V+a,E),ot=(e,t)=>ue(ne(t),V,void 0,()=>[G(e)]),ct=e=>{const t=ne(e);return()=>t()?.goBackward()},gt=e=>{const t=ne(e);return()=>t()?.goForward()},it=e=>N(e,6),at=()=>{const t=J();let r=e.state(e.proxy(X(t,6)));return F()&&e.user_effect(()=>{e.set(r,X(t,6),!0)}),{get current(){return e.get(r)}}},pt=e=>ue(se(e),q,0),lt=e=>N(e,7),It=()=>{const t=J();let r=e.state(e.proxy(X(t,7)));return F()&&e.user_effect(()=>{e.set(r,X(t,7),!0)}),{get current(){return e.get(r)}}},ft=e=>ue(de(e),q,0),bt=(e,t,r)=>oe(Y(r),i+l,e,()=>Q,t),ht=(e,t,r)=>oe(Y(r),l,e,()=>Q,t),mt=(e,t,r)=>oe(Y(r),I,e,()=>Q,t),vt=(e,t,r,n)=>oe(Y(n),i+p,t,()=>[G(e)],r),xt=(e,t,r,n)=>oe(Y(n),p,t,()=>[G(e)],r),_t=(e,t,r,n)=>oe(Y(n),p+x,t,()=>[G(e)],r),wt=(e,t,r,n,s)=>oe(Y(s),i+p+v,r,()=>[G(e),G(t)],n),yt=(e,t,r,n)=>oe(Y(n),b,t,()=>[G(e)],r),$t=(e,t,r,n)=>oe(Y(n),h,t,()=>[G(e)],r),kt=(e,t,r,n,s,d,u,o)=>oe(Y(o),m,d,()=>[G(e),G(t),G(r),G(n),G(s)],u),qt=(e,t,r,n,s)=>oe(Y(s),i+f,r,()=>[G(e),G(t)],n),Rt=(e,t,r,n,s)=>oe(Y(s),f,r,()=>[G(e),G(t)],n),Ct=(e,t,r,n,s)=>oe(Y(s),x,r,()=>[G(e),G(t)],n),Tt=(e,t,r,n,s,d)=>oe(Y(d),i+v,n,()=>[G(e),G(t),G(r)],s),Lt=(e,t,r,n,s,d)=>oe(Y(d),v,n,()=>[G(e),G(t),G(r)],s),Bt=(e,t,r)=>oe(Y(r),i+w,e,()=>Q,t),Vt=(e,t,r)=>oe(Y(r),w,e,()=>Q,t),St=(e,t,r)=>oe(Y(r),y,e,()=>Q,t),zt=(e,t,r,n)=>oe(Y(n),i+_,t,()=>[G(e)],r),Ft=(e,t,r,n)=>oe(Y(n),_,t,()=>[G(e)],r),Pt=(e,t)=>oe(Y(t),"Start"+$,e),jt=(e,t)=>oe(Y(t),"Will"+k+$,e),At=(e,t)=>oe(Y(t),"Did"+k+$,e),Dt=(e,t,r)=>oe(Z(r),R,t,()=>[G(e)]),Ht=(e,t,r)=>oe(ee(r),C+a,t,()=>[G(e)]),Mt=(e,t,r,n)=>oe(ee(n),C+h,r,()=>[G(e),G(t)]),Ot=(e,t,r,n)=>oe(te(n),T,r,()=>[G(e),G(t)]),Qt=(e,t,r,n)=>oe(te(n),L+h,r,()=>[G(e),G(t)]),Wt=(e,t,r,n)=>oe(te(n),B+h,r,()=>[G(e),G(t)]),Et=(e,t,r)=>oe(re(r),g+p,t,()=>[G(e)]),Gt=(e,t,r)=>oe(re(r),g+p+x,t,()=>[G(e)]),Jt=(e,t,r)=>oe(re(r),g+b,t,()=>[G(e)]),Kt=(e,t,r)=>oe(re(r),g+h,t,()=>[G(e)]),Nt=(e,t,r,n,s,d,u)=>oe(re(u),g+m,d,()=>[G(e),G(t),G(r),G(n),G(s)]),Ut=(e,t,r,n)=>oe(re(n),g+f,r,()=>[G(e),G(t)]),Xt=(e,t,r,n)=>oe(re(n),g+x,r,()=>[G(e),G(t)]),Yt=(e,t,r,n,s)=>oe(re(s),g+v,n,()=>[G(e),G(t),G(r)]),Zt=(e,t,r)=>oe(re(r),"ParamValues",t,()=>[G(e)]),er=(e,t,r,n)=>oe(re(n),"ParamValue",r,()=>[G(e),G(t)]),tr=(e,t)=>oe(ne(t),V+a,e),rr=(e,t,r)=>oe(ne(r),V,t,()=>[G(e)]),nr=(e,t)=>oe(se(t),q,e),sr=(e,t)=>oe(de(t),q,e),dr=(t,r,n)=>{const s=J();F()&&e.user_effect(()=>(s[16]?.(n,t,r),()=>s[17]?.(n,t)))},ur=(e,t)=>dr(e,t,0),or=(e,t)=>dr(e,t,1),cr=(e,t)=>dr(e,t,2),gr=(e,t)=>dr(e,t,3),ir=(e,t)=>dr(e,t,4),ar=(e,t)=>dr(e,t,5),pr=(e,t)=>dr(e,t,6),lr=(e,t)=>dr(e,t,7);function Ir(t,r){e.push(r,!0);const n=ot(()=>r.checkpointId,()=>r.checkpoints),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.checkpointId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}var fr=e.from_html("<!><!>",1),br=e.from_html("<!><!><!>",1);function hr(t,r){e.push(r,!0);var n=br(),s=e.first_child(n),d=t=>{var n=e.text();e.template_effect(()=>e.set_text(n,(r.id??"")+":{")),e.append(t,n)},u=e.derived(()=>r.debugIds&&!z(r.id));e.if(s,t=>{e.get(u)&&t(d)});var o=e.sibling(s);e.each(o,18,()=>r.ids,e=>e,(t,n,s)=>{var d=fr(),u=e.first_child(d),o=t=>{var n=e.comment(),s=e.first_child(n);e.snippet(s,()=>r.separator),e.append(t,n)};e.if(u,t=>{e.get(s)>0&&r.separator&&t(o)});var c=e.sibling(u),g=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.custom,()=>n),e.append(t,s)},i=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.children,()=>n),e.append(t,s)};e.if(c,e=>{r.custom?e(g):e(i,-1)}),e.append(t,d)});var c=e.sibling(o),g=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)},i=e.derived(()=>r.debugIds&&!z(r.id));e.if(c,t=>{e.get(i)&&t(g)}),e.append(t,n),e.pop()}function mr(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[0]);{const n=(t,n=e.noop)=>{Ir(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n,$$slots:{default:!0}})}e.pop()}function vr(t,r){e.push(r,!0);const n=we(()=>r.tableId,()=>r.rowId,()=>r.cellId,()=>r.store),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.cellId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function xr(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[1]);var d=e.comment(),u=e.first_child(d),o=t=>{var n=e.comment(),d=e.first_child(n),u=t=>{var n=e.comment(),d=e.first_child(n);e.snippet(d,()=>r.checkpoint,()=>e.get(s)),e.append(t,n)},o=t=>{Ir(t,{get checkpointId(){return e.get(s)},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};e.if(d,e=>{r.checkpoint?e(u):e(o,-1)}),e.append(t,n)},c=e.derived(()=>!z(e.get(s)));e.if(u,t=>{e.get(c)&&t(o)}),e.append(t,d),e.pop()}function _r(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[2]);{const n=(t,n=e.noop)=>{Ir(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n,$$slots:{default:!0}})}e.pop()}function wr(t,r){e.push(r,!0);const n=xe(()=>r.tableId,()=>r.rowId,()=>r.store),s=e.derived(()=>r.customCellIds??n.current);{const n=(t,n=e.noop)=>{vr(t,{get tableId(){return r.tableId},get rowId(){return r.rowId},get cellId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.rowId},get custom(){return r.cell},children:n,$$slots:{default:!0}})}e.pop()}function yr(t,r){e.push(r,!0);const{store:n,tableId:s}=De(()=>r.indexes,()=>r.indexId),d=Ae(()=>r.indexId,()=>r.sliceId,()=>r.indexes);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})};e.if(o,e=>{s&&e(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.sliceId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function $r(t,r){e.push(r,!0);const n=je(()=>r.indexId,()=>r.indexes);{const s=(t,n=e.noop)=>{yr(t,{get indexId(){return r.indexId},get sliceId(){return n()},get indexes(){return r.indexes},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.indexId},get custom(){return r.slice},children:s,$$slots:{default:!0}})}e.pop()}function kr(t,r){e.push(r,!0);const{store:n,localTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=rt(()=>r.relationshipId,()=>r.firstRowId,()=>r.relationships);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})};e.if(o,e=>{s&&e(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.firstRowId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function qr(t,r){e.push(r,!0);const{store:n,localTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=tt(()=>r.relationshipId,()=>r.remoteRowId,()=>r.relationships);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})};e.if(o,e=>{s&&e(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.remoteRowId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function Rr(t,r){e.push(r,!0);const n=Se(()=>r.metricId,()=>r.metrics),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.metricId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Cr(s,d){e.push(d,!0);const u=t(H)??[];let o=e.proxy(Array.from({length:8},()=>({})));const c=(e,t,r)=>{o[e]={...n(()=>o[e]),[t]:r}},g=(e,t)=>{const{[t]:r,...s}=n(()=>o[e]);o[e]=s};r(H,{get 0(){return d.store??u[0]},get 1(){return{...u[1]??{},...d.storesById,...o[0]}},get 2(){return d.metrics??u[2]},get 3(){return{...u[3]??{},...d.metricsById,...o[1]}},get 4(){return d.indexes??u[4]},get 5(){return{...u[5]??{},...d.indexesById,...o[2]}},get 6(){return d.relationships??u[6]},get 7(){return{...u[7]??{},...d.relationshipsById,...o[3]}},get 8(){return d.queries??u[8]},get 9(){return{...u[9]??{},...d.queriesById,...o[4]}},get 10(){return d.checkpoints??u[10]},get 11(){return{...u[11]??{},...d.checkpointsById,...o[5]}},get 12(){return d.persister??u[12]},get 13(){return{...u[13]??{},...d.persistersById,...o[6]}},get 14(){return d.synchronizer??u[14]},get 15(){return{...u[15]??{},...d.synchronizersById,...o[7]}},get 16(){return c},get 17(){return g}});var i=e.comment(),a=e.first_child(i);e.snippet(a,()=>d.children),e.append(s,i),e.pop()}var Tr=e.from_html("<!><!><!>",1);function Lr(t,r){e.push(r,!0);const{store:n,remoteTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=et(()=>r.relationshipId,()=>r.localRowId,()=>r.relationships);var u=Tr(),o=e.first_child(u),c=t=>{var n=e.text();e.template_effect(()=>e.set_text(n,(r.localRowId??"")+":{")),e.append(t,n)};e.if(o,e=>{r.debugIds&&e(c)});var g=e.sibling(o),i=t=>{var u=e.comment(),o=e.first_child(u),c=t=>{var n=e.comment(),s=e.first_child(n);e.snippet(s,()=>r.row,()=>d.current),e.append(t,n)},g=e=>{wr(e,{get tableId(){return s},get rowId(){return d.current},get store(){return n},get debugIds(){return r.debugIds}})};e.if(o,e=>{r.row?e(c):s&&e(g,1)}),e.append(t,u)},a=e.derived(()=>!z(d.current));e.if(g,t=>{e.get(a)&&t(i)});var p=e.sibling(g),l=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)};e.if(p,e=>{r.debugIds&&e(l)}),e.append(t,u),e.pop()}function Br(t,r){e.push(r,!0);const n=Ue(()=>r.queryId,()=>r.rowId,()=>r.cellId,()=>r.queries),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.cellId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Vr(t,r){e.push(r,!0);const n=Ne(()=>r.queryId,()=>r.rowId,()=>r.queries);{const s=(t,n=e.noop)=>{Br(t,{get queryId(){return r.queryId},get rowId(){return r.rowId},get cellId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.rowId},get custom(){return r.cell},children:s,$$slots:{default:!0}})}e.pop()}function Sr(t,r){e.push(r,!0);const n=Je(()=>r.queryId,()=>r.cellId,()=>r.descending??!1,()=>r.offset??0,()=>r.limit,()=>r.queries);{const s=(t,n=e.noop)=>{Vr(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.queryId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function zr(t,r){e.push(r,!0);const n=Ge(()=>r.queryId,()=>r.queries);{const s=(t,n=e.noop)=>{Vr(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.queryId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function Fr(t,r){e.push(r,!0);const n=he(()=>r.tableId,()=>r.cellId,()=>r.descending??!1,()=>r.offset??0,()=>r.limit,()=>r.store);{const s=(t,n=e.noop)=>{wr(t,{get tableId(){return r.tableId},get rowId(){return n()},get store(){return r.store},get customCellIds(){return r.customCellIds},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.tableId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function Pr(t,r){e.push(r,!0);const n=be(()=>r.tableId,()=>r.store);{const s=(t,n=e.noop)=>{wr(t,{get tableId(){return r.tableId},get rowId(){return n()},get store(){return r.store},get customCellIds(){return r.customCellIds},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.tableId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function jr(t,r){e.push(r,!0);const n=ie(()=>r.store);{const s=(t,n=e.noop)=>{Pr(t,{get tableId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.table},children:s,$$slots:{default:!0}})}e.pop()}function Ar(t,r){e.push(r,!0);const n=Re(()=>r.valueId,()=>r.store),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.valueId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Dr(t,r){e.push(r,!0);const n=ke(()=>r.store);{const s=(t,n=e.noop)=>{Ar(t,{get valueId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.value},children:s,$$slots:{default:!0}})}e.pop()}export{mr as BackwardCheckpointsView,vr as CellView,Ir as CheckpointView,xr as CurrentCheckpointView,_r as ForwardCheckpointsView,$r as IndexView,kr as LinkedRowsView,qr as LocalRowsView,Rr as MetricView,Cr as Provider,Lr as RemoteRowView,Br as ResultCellView,Vr as ResultRowView,Sr as ResultSortedTableView,zr as ResultTableView,wr as RowView,yr as SliceView,Fr as SortedTableView,Pr as TableView,jr as TablesView,Ar as ValueView,Dr as ValuesView,ct as createGoBackwardCallback,gt as createGoForwardCallback,we as getCell,xe as getCellIds,ot as getCheckpoint,ut as getCheckpointIds,st as getCheckpoints,dt as getCheckpointsIds,Pe as getIndexIds,De as getIndexStoreTableId,ze as getIndexes,Fe as getIndexesIds,rt as getLinkedRowIds,tt as getLocalRowIds,Se as getMetric,Ve as getMetricIds,Le as getMetrics,Be as getMetricsIds,it as getPersister,at as getPersisterIds,pt as getPersisterStatus,He as getQueries,Me as getQueriesIds,Oe as getQueryIds,Ze as getRelationshipIds,Xe as getRelationships,Ye as getRelationshipsIds,nt as getRelationshipsStoreTableIds,et as getRemoteRowId,Ue as getResultCell,Ne as getResultCellIds,Ke as getResultRow,Ee as getResultRowCount,Ge as getResultRowIds,Je as getResultSortedRowIds,Qe as getResultTable,We as getResultTableCellIds,ve as getRow,fe as getRowCount,be as getRowIds,je as getSliceIds,Ae as getSliceRowIds,he as getSortedRowIds,Ce as getStore,Te as getStoreIds,lt as getSynchronizer,It as getSynchronizerIds,ft as getSynchronizerStatus,pe as getTable,le as getTableCellIds,ie as getTableIds,ge as getTables,Re as getValue,ke as getValueIds,$e as getValues,_e as hasCell,me as hasRow,ae as hasTable,Ie as hasTableCell,ce as hasTables,qe as hasValue,ye as hasValues,Lt as onCell,Ct as onCellIds,rr as onCheckpoint,tr as onCheckpointIds,At as onDidFinishTransaction,Tt as onHasCell,qt as onHasRow,vt as onHasTable,wt as onHasTableCell,bt as onHasTables,zt as onHasValue,Bt as onHasValues,Wt as onLinkedRowIds,Qt as onLocalRowIds,Dt as onMetric,er as onParamValue,Zt as onParamValues,nr as onPersisterStatus,Ot as onRemoteRowId,Yt as onResultCell,Xt as onResultCellIds,Ut as onResultRow,Jt as onResultRowCount,Kt as onResultRowIds,Nt as onResultSortedRowIds,Et as onResultTable,Gt as onResultTableCellIds,Rt as onRow,yt as onRowCount,$t as onRowIds,Ht as onSliceIds,Mt as onSliceRowIds,kt as onSortedRowIds,Pt as onStartTransaction,sr as onSynchronizerStatus,xt as onTable,_t as onTableCellIds,mt as onTableIds,ht as onTables,Ft as onValue,St as onValueIds,Vt as onValues,jt as onWillFinishTransaction,ar as provideCheckpoints,cr as provideIndexes,or as provideMetrics,pr as providePersister,ir as provideQueries,gr as provideRelationships,ur as provideStore,lr as provideSynchronizer,ne as resolveCheckpoints,ee as resolveIndexes,Z as resolveMetrics,se as resolvePersister,re as resolveQueries,te as resolveRelationships,Y as resolveStore,de as resolveSynchronizer};
1
+ import"svelte/internal/disclose-version";import*as e from"svelte/internal/client";import{getContext as t,setContext as r,untrack as n}from"svelte";import{createSubscriber as s}from"svelte/reactivity";const d=e=>typeof e,u=d(""),o=d(d),c="Listener",g="Result",i="Has",a="Ids",p="Table",l=p+"s",I=p+a,f="Row",b=f+"Count",h=f+a,m="Sorted"+f+a,v="Cell",x=v+a,_="Value",w=_+"s",y=_+a,$="Transaction",k="Finish",q="Status",R="Metric",C="Slice",T="RemoteRowId",L="Local",B="Linked",V="Checkpoint",S=globalThis,z=e=>void 0===e,F=()=>!z(S.window),P=(j=z,(e,t,r)=>j(e)?r?.():t(e));var j;const A=()=>{},D=Object.keys,H="tinybase_uisc";class M{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get current(){return this.#t(),this.#e()}}class O extends M{#r;constructor(e,t,r){super(e,r),this.#r=t}get current(){return super.current}set current(e){this.#r(e)}}const Q=[],W={},E=[Q,void 0,Q],G=e=>(e=>d(e)==o)(e)?e():e,J=()=>t(H)??[],K=(e,t,r)=>{return z(t)?e[2*r]:d(t)==u?(n=e[2*r+1],s=t,P(n,e=>e[s])):t;var n,s},N=(e,t)=>K(J(),e,t),U=(e,t)=>{const r=J();return()=>K(r,G(e),t)},X=(e,t)=>D(e[2*t+1]??W),Y=e=>U(e,0),Z=e=>U(e,1),ee=e=>U(e,2),te=e=>U(e,3),re=e=>U(e,4),ne=e=>U(e,5),se=e=>U(e,6),de=e=>U(e,7),ue=(t,r,n,d=()=>Q,u)=>{const o=(u?"has":"get")+r,g="add"+(u?i:"")+r+c;let a=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const r=t(),n=d();e.set(a,s(e=>{const t=r?.[g]?.(...n,e);return()=>r?.delListener?.(t)}),!0)}),new M(()=>t()?.[o]?.(...d())??n,()=>e.get(a)())},oe=(t,r,n,s=()=>Q,d)=>{F()&&e.user_effect(()=>{const e=t(),u=s(),o=e?.["add"+r+c]?.(...u,n,...void 0!==d?[d]:Q);return()=>e?.delListener?.(o)})},ce=e=>ue(Y(e),l,!1,()=>Q,1),ge=e=>ue(Y(e),l,W),ie=e=>ue(Y(e),I,Q),ae=(e,t)=>ue(Y(t),p,!1,()=>[G(e)],1),pe=(e,t)=>ue(Y(t),p,W,()=>[G(e)]),le=(e,t)=>ue(Y(t),p+x,Q,()=>[G(e)]),Ie=(e,t,r)=>ue(Y(r),p+v,!1,()=>[G(e),G(t)],1),fe=(e,t)=>ue(Y(t),b,0,()=>[G(e)]),be=(e,t)=>ue(Y(t),h,Q,()=>[G(e)]),he=(e,t,r=!1,n=0,s,d)=>ue(Y(d),m,Q,()=>[G(e),G(t),G(r),G(n),G(s)]),me=(e,t,r)=>ue(Y(r),f,!1,()=>[G(e),G(t)],1),ve=(e,t,r)=>ue(Y(r),f,W,()=>[G(e),G(t)]),xe=(e,t,r)=>ue(Y(r),x,Q,()=>[G(e),G(t)]),_e=(e,t,r,n)=>ue(Y(n),v,!1,()=>[G(e),G(t),G(r)],1),we=(t,r,n,d)=>{const u=Y(d);let o=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const d=u(),c=G(t),g=G(r),i=G(n);e.set(o,s(e=>{const t=d?.addCellListener(c,g,i,e);return()=>d?.delListener?.(t)}),!0)}),new O(()=>u()?.getCell(G(t),G(r),G(n)),e=>u()?.setCell(G(t),G(r),G(n),e),()=>e.get(o)())},ye=e=>ue(Y(e),w,!1,()=>Q,1),$e=e=>ue(Y(e),w,W),ke=e=>ue(Y(e),y,Q),qe=(e,t)=>ue(Y(t),_,!1,()=>[G(e)],1),Re=(t,r)=>{const n=Y(r);let d=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const r=n(),u=G(t);e.set(d,s(e=>{const t=r?.addValueListener(u,e);return()=>r?.delListener?.(t)}),!0)}),new O(()=>n()?.getValue(G(t)),e=>n()?.setValue(G(t),e),()=>e.get(d)())},Ce=e=>N(e,0),Te=()=>{const t=J();let r=e.state(e.proxy(X(t,0)));return F()&&e.user_effect(()=>{e.set(r,X(t,0),!0)}),{get current(){return e.get(r)}}},Le=e=>N(e,1),Be=()=>{const t=J();let r=e.state(e.proxy(X(t,1)));return F()&&e.user_effect(()=>{e.set(r,X(t,1),!0)}),{get current(){return e.get(r)}}},Ve=e=>ue(Z(e),R+a,Q),Se=(e,t)=>ue(Z(t),R,void 0,()=>[G(e)]),ze=e=>N(e,2),Fe=()=>{const t=J();let r=e.state(e.proxy(X(t,2)));return F()&&e.user_effect(()=>{e.set(r,X(t,2),!0)}),{get current(){return e.get(r)}}},Pe=e=>ue(ee(e),"Index"+a,Q),je=(e,t)=>ue(ee(t),C+a,Q,()=>[G(e)]),Ae=(e,t,r)=>ue(ee(r),C+h,Q,()=>[G(e),G(t)]),De=(e,t)=>{const r=ee(e);return{get store(){return r()?.getStore()},get tableId(){return r()?.getTableId(G(t))}}},He=e=>N(e,4),Me=()=>{const t=J();let r=e.state(e.proxy(X(t,4)));return F()&&e.user_effect(()=>{e.set(r,X(t,4),!0)}),{get current(){return e.get(r)}}},Oe=e=>ue(re(e),"Query"+a,Q),Qe=(e,t)=>ue(re(t),g+p,W,()=>[G(e)]),We=(e,t)=>ue(re(t),g+p+x,Q,()=>[G(e)]),Ee=(e,t)=>ue(re(t),g+b,0,()=>[G(e)]),Ge=(e,t)=>ue(re(t),g+h,Q,()=>[G(e)]),Je=(e,t,r=!1,n=0,s,d)=>ue(re(d),g+m,Q,()=>[G(e),G(t),G(r),G(n),G(s)]),Ke=(e,t,r)=>ue(re(r),g+f,W,()=>[G(e),G(t)]),Ne=(e,t,r)=>ue(re(r),g+x,Q,()=>[G(e),G(t)]),Ue=(e,t,r,n)=>ue(re(n),g+v,void 0,()=>[G(e),G(t),G(r)]),Xe=e=>N(e,3),Ye=()=>{const t=J();let r=e.state(e.proxy(X(t,3)));return F()&&e.user_effect(()=>{e.set(r,X(t,3),!0)}),{get current(){return e.get(r)}}},Ze=e=>ue(te(e),"Relationship"+a,Q),et=(e,t,r)=>ue(te(r),T,void 0,()=>[G(e),G(t)]),tt=(e,t,r)=>ue(te(r),L+h,Q,()=>[G(e),G(t)]),rt=(e,t,r)=>ue(te(r),B+h,Q,()=>[G(e),G(t)]),nt=(e,t)=>{const r=te(e);return{get store(){return r()?.getStore()},get localTableId(){return r()?.getLocalTableId(G(t))},get remoteTableId(){return r()?.getRemoteTableId(G(t))}}},st=e=>N(e,5),dt=()=>{const t=J();let r=e.state(e.proxy(X(t,5)));return F()&&e.user_effect(()=>{e.set(r,X(t,5),!0)}),{get current(){return e.get(r)}}},ut=e=>ue(ne(e),V+a,E),ot=(e,t)=>ue(ne(t),V,void 0,()=>[G(e)]),ct=e=>{const t=ne(e);return()=>t()?.goBackward()},gt=e=>{const t=ne(e);return()=>t()?.goForward()},it=e=>N(e,6),at=()=>{const t=J();let r=e.state(e.proxy(X(t,6)));return F()&&e.user_effect(()=>{e.set(r,X(t,6),!0)}),{get current(){return e.get(r)}}},pt=e=>ue(se(e),q,0),lt=e=>N(e,7),It=()=>{const t=J();let r=e.state(e.proxy(X(t,7)));return F()&&e.user_effect(()=>{e.set(r,X(t,7),!0)}),{get current(){return e.get(r)}}},ft=e=>ue(de(e),q,0),bt=(e,t,r)=>oe(Y(r),i+l,e,()=>Q,t),ht=(e,t,r)=>oe(Y(r),l,e,()=>Q,t),mt=(e,t,r)=>oe(Y(r),I,e,()=>Q,t),vt=(e,t,r,n)=>oe(Y(n),i+p,t,()=>[G(e)],r),xt=(e,t,r,n)=>oe(Y(n),p,t,()=>[G(e)],r),_t=(e,t,r,n)=>oe(Y(n),p+x,t,()=>[G(e)],r),wt=(e,t,r,n,s)=>oe(Y(s),i+p+v,r,()=>[G(e),G(t)],n),yt=(e,t,r,n)=>oe(Y(n),b,t,()=>[G(e)],r),$t=(e,t,r,n)=>oe(Y(n),h,t,()=>[G(e)],r),kt=(e,t,r,n,s,d,u,o)=>oe(Y(o),m,d,()=>[G(e),G(t),G(r),G(n),G(s)],u),qt=(e,t,r,n,s)=>oe(Y(s),i+f,r,()=>[G(e),G(t)],n),Rt=(e,t,r,n,s)=>oe(Y(s),f,r,()=>[G(e),G(t)],n),Ct=(e,t,r,n,s)=>oe(Y(s),x,r,()=>[G(e),G(t)],n),Tt=(e,t,r,n,s,d)=>oe(Y(d),i+v,n,()=>[G(e),G(t),G(r)],s),Lt=(e,t,r,n,s,d)=>oe(Y(d),v,n,()=>[G(e),G(t),G(r)],s),Bt=(e,t,r)=>oe(Y(r),i+w,e,()=>Q,t),Vt=(e,t,r)=>oe(Y(r),w,e,()=>Q,t),St=(e,t,r)=>oe(Y(r),y,e,()=>Q,t),zt=(e,t,r,n)=>oe(Y(n),i+_,t,()=>[G(e)],r),Ft=(e,t,r,n)=>oe(Y(n),_,t,()=>[G(e)],r),Pt=(e,t)=>oe(Y(t),"Start"+$,e),jt=(e,t)=>oe(Y(t),"Will"+k+$,e),At=(e,t)=>oe(Y(t),"Did"+k+$,e),Dt=(e,t,r)=>oe(Z(r),R,t,()=>[G(e)]),Ht=(e,t,r)=>oe(ee(r),C+a,t,()=>[G(e)]),Mt=(e,t,r,n)=>oe(ee(n),C+h,r,()=>[G(e),G(t)]),Ot=(e,t,r,n)=>oe(te(n),T,r,()=>[G(e),G(t)]),Qt=(e,t,r,n)=>oe(te(n),L+h,r,()=>[G(e),G(t)]),Wt=(e,t,r,n)=>oe(te(n),B+h,r,()=>[G(e),G(t)]),Et=(e,t,r)=>oe(re(r),g+p,t,()=>[G(e)]),Gt=(e,t,r)=>oe(re(r),g+p+x,t,()=>[G(e)]),Jt=(e,t,r)=>oe(re(r),g+b,t,()=>[G(e)]),Kt=(e,t,r)=>oe(re(r),g+h,t,()=>[G(e)]),Nt=(e,t,r,n,s,d,u)=>oe(re(u),g+m,d,()=>[G(e),G(t),G(r),G(n),G(s)]),Ut=(e,t,r,n)=>oe(re(n),g+f,r,()=>[G(e),G(t)]),Xt=(e,t,r,n)=>oe(re(n),g+x,r,()=>[G(e),G(t)]),Yt=(e,t,r,n,s)=>oe(re(s),g+v,n,()=>[G(e),G(t),G(r)]),Zt=(e,t,r)=>oe(re(r),"ParamValues",t,()=>[G(e)]),er=(e,t,r,n)=>oe(re(n),"ParamValue",r,()=>[G(e),G(t)]),tr=(e,t)=>oe(ne(t),V+a,e),rr=(e,t,r)=>oe(ne(r),V,t,()=>[G(e)]),nr=(e,t)=>oe(se(t),q,e),sr=(e,t)=>oe(de(t),q,e),dr=(t,r,n)=>{const s=J();F()&&e.user_effect(()=>(s[16]?.(n,t,r),()=>s[17]?.(n,t)))},ur=(e,t)=>dr(e,t,0),or=(e,t)=>dr(e,t,1),cr=(e,t)=>dr(e,t,2),gr=(e,t)=>dr(e,t,3),ir=(e,t)=>dr(e,t,4),ar=(e,t)=>dr(e,t,5),pr=(e,t)=>dr(e,t,6),lr=(e,t)=>dr(e,t,7);function Ir(t,r){e.push(r,!0);const n=ot(()=>r.checkpointId,()=>r.checkpoints),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.checkpointId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}var fr=e.from_html("<!><!>",1),br=e.from_html("<!><!><!>",1);function hr(t,r){e.push(r,!0);var n=br(),s=e.first_child(n),d=t=>{var n=e.text();e.template_effect(()=>e.set_text(n,(r.id??"")+":{")),e.append(t,n)},u=e.derived(()=>r.debugIds&&!z(r.id));e.if(s,t=>{e.get(u)&&t(d)});var o=e.sibling(s);e.each(o,18,()=>r.ids,e=>e,(t,n,s)=>{var d=fr(),u=e.first_child(d),o=t=>{var n=e.comment(),s=e.first_child(n);e.snippet(s,()=>r.separator),e.append(t,n)};e.if(u,t=>{e.get(s)>0&&r.separator&&t(o)});var c=e.sibling(u),g=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.custom,()=>n),e.append(t,s)},i=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.children,()=>n),e.append(t,s)};e.if(c,e=>{r.custom?e(g):e(i,-1)}),e.append(t,d)});var c=e.sibling(o),g=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)},i=e.derived(()=>r.debugIds&&!z(r.id));e.if(c,t=>{e.get(i)&&t(g)}),e.append(t,n),e.pop()}function mr(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[0]);{const n=(t,n=e.noop)=>{Ir(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n,$$slots:{default:!0}})}e.pop()}function vr(t,r){e.push(r,!0);const n=we(()=>r.tableId,()=>r.rowId,()=>r.cellId,()=>r.store),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.cellId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function xr(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[1]);var d=e.comment(),u=e.first_child(d),o=t=>{var n=e.comment(),d=e.first_child(n),u=t=>{var n=e.comment(),d=e.first_child(n);e.snippet(d,()=>r.checkpoint,()=>e.get(s)),e.append(t,n)},o=t=>{Ir(t,{get checkpointId(){return e.get(s)},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};e.if(d,e=>{r.checkpoint?e(u):e(o,-1)}),e.append(t,n)},c=e.derived(()=>!(null==e.get(s)));e.if(u,t=>{e.get(c)&&t(o)}),e.append(t,d),e.pop()}function _r(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[2]);{const n=(t,n=e.noop)=>{Ir(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n,$$slots:{default:!0}})}e.pop()}function wr(t,r){e.push(r,!0);const n=xe(()=>r.tableId,()=>r.rowId,()=>r.store),s=e.derived(()=>r.customCellIds??n.current);{const n=(t,n=e.noop)=>{vr(t,{get tableId(){return r.tableId},get rowId(){return r.rowId},get cellId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.rowId},get custom(){return r.cell},children:n,$$slots:{default:!0}})}e.pop()}function yr(t,r){e.push(r,!0);const{store:n,tableId:s}=De(()=>r.indexes,()=>r.indexId),d=Ae(()=>r.indexId,()=>r.sliceId,()=>r.indexes);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})},g=e.derived(()=>!z(s));e.if(o,t=>{e.get(g)&&t(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.sliceId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function $r(t,r){e.push(r,!0);const n=je(()=>r.indexId,()=>r.indexes);{const s=(t,n=e.noop)=>{yr(t,{get indexId(){return r.indexId},get sliceId(){return n()},get indexes(){return r.indexes},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.indexId},get custom(){return r.slice},children:s,$$slots:{default:!0}})}e.pop()}function kr(t,r){e.push(r,!0);const{store:n,localTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=rt(()=>r.relationshipId,()=>r.firstRowId,()=>r.relationships);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})},g=e.derived(()=>!z(s));e.if(o,t=>{e.get(g)&&t(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.firstRowId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function qr(t,r){e.push(r,!0);const{store:n,localTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=tt(()=>r.relationshipId,()=>r.remoteRowId,()=>r.relationships);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})},g=e.derived(()=>!z(s));e.if(o,t=>{e.get(g)&&t(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.remoteRowId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function Rr(t,r){e.push(r,!0);const n=Se(()=>r.metricId,()=>r.metrics),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.metricId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Cr(s,d){e.push(d,!0);const u=t(H)??[];let o=e.proxy(Array.from({length:8},()=>({})));const c=(e,t,r)=>{o[e]={...n(()=>o[e]),[t]:r}},g=(e,t)=>{const{[t]:r,...s}=n(()=>o[e]);o[e]=s};r(H,{get 0(){return d.store??u[0]},get 1(){return{...u[1]??{},...d.storesById,...o[0]}},get 2(){return d.metrics??u[2]},get 3(){return{...u[3]??{},...d.metricsById,...o[1]}},get 4(){return d.indexes??u[4]},get 5(){return{...u[5]??{},...d.indexesById,...o[2]}},get 6(){return d.relationships??u[6]},get 7(){return{...u[7]??{},...d.relationshipsById,...o[3]}},get 8(){return d.queries??u[8]},get 9(){return{...u[9]??{},...d.queriesById,...o[4]}},get 10(){return d.checkpoints??u[10]},get 11(){return{...u[11]??{},...d.checkpointsById,...o[5]}},get 12(){return d.persister??u[12]},get 13(){return{...u[13]??{},...d.persistersById,...o[6]}},get 14(){return d.synchronizer??u[14]},get 15(){return{...u[15]??{},...d.synchronizersById,...o[7]}},get 16(){return c},get 17(){return g}});var i=e.comment(),a=e.first_child(i);e.snippet(a,()=>d.children),e.append(s,i),e.pop()}var Tr=e.from_html("<!><!><!>",1);function Lr(t,r){e.push(r,!0);const{store:n,remoteTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=et(()=>r.relationshipId,()=>r.localRowId,()=>r.relationships);var u=Tr(),o=e.first_child(u),c=t=>{var n=e.text();e.template_effect(()=>e.set_text(n,(r.localRowId??"")+":{")),e.append(t,n)};e.if(o,e=>{r.debugIds&&e(c)});var g=e.sibling(o),i=t=>{var u=e.comment(),o=e.first_child(u),c=t=>{var n=e.comment(),s=e.first_child(n);e.snippet(s,()=>r.row,()=>d.current),e.append(t,n)},g=e=>{wr(e,{get tableId(){return s},get rowId(){return d.current},get store(){return n},get debugIds(){return r.debugIds}})};e.if(o,e=>{r.row?e(c):s&&e(g,1)}),e.append(t,u)},a=e.derived(()=>!z(d.current));e.if(g,t=>{e.get(a)&&t(i)});var p=e.sibling(g),l=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)};e.if(p,e=>{r.debugIds&&e(l)}),e.append(t,u),e.pop()}function Br(t,r){e.push(r,!0);const n=Ue(()=>r.queryId,()=>r.rowId,()=>r.cellId,()=>r.queries),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.cellId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Vr(t,r){e.push(r,!0);const n=Ne(()=>r.queryId,()=>r.rowId,()=>r.queries);{const s=(t,n=e.noop)=>{Br(t,{get queryId(){return r.queryId},get rowId(){return r.rowId},get cellId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.rowId},get custom(){return r.cell},children:s,$$slots:{default:!0}})}e.pop()}function Sr(t,r){e.push(r,!0);const n=Je(()=>r.queryId,()=>r.cellId,()=>r.descending??!1,()=>r.offset??0,()=>r.limit,()=>r.queries);{const s=(t,n=e.noop)=>{Vr(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.queryId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function zr(t,r){e.push(r,!0);const n=Ge(()=>r.queryId,()=>r.queries);{const s=(t,n=e.noop)=>{Vr(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.queryId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function Fr(t,r){e.push(r,!0);const n=he(()=>r.tableId,()=>r.cellId,()=>r.descending??!1,()=>r.offset??0,()=>r.limit,()=>r.store);{const s=(t,n=e.noop)=>{wr(t,{get tableId(){return r.tableId},get rowId(){return n()},get store(){return r.store},get customCellIds(){return r.customCellIds},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.tableId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function Pr(t,r){e.push(r,!0);const n=be(()=>r.tableId,()=>r.store);{const s=(t,n=e.noop)=>{wr(t,{get tableId(){return r.tableId},get rowId(){return n()},get store(){return r.store},get customCellIds(){return r.customCellIds},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.tableId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function jr(t,r){e.push(r,!0);const n=ie(()=>r.store);{const s=(t,n=e.noop)=>{Pr(t,{get tableId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.table},children:s,$$slots:{default:!0}})}e.pop()}function Ar(t,r){e.push(r,!0);const n=Re(()=>r.valueId,()=>r.store),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.valueId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Dr(t,r){e.push(r,!0);const n=ke(()=>r.store);{const s=(t,n=e.noop)=>{Ar(t,{get valueId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.value},children:s,$$slots:{default:!0}})}e.pop()}export{mr as BackwardCheckpointsView,vr as CellView,Ir as CheckpointView,xr as CurrentCheckpointView,_r as ForwardCheckpointsView,$r as IndexView,kr as LinkedRowsView,qr as LocalRowsView,Rr as MetricView,Cr as Provider,Lr as RemoteRowView,Br as ResultCellView,Vr as ResultRowView,Sr as ResultSortedTableView,zr as ResultTableView,wr as RowView,yr as SliceView,Fr as SortedTableView,Pr as TableView,jr as TablesView,Ar as ValueView,Dr as ValuesView,ct as createGoBackwardCallback,gt as createGoForwardCallback,we as getCell,xe as getCellIds,ot as getCheckpoint,ut as getCheckpointIds,st as getCheckpoints,dt as getCheckpointsIds,Pe as getIndexIds,De as getIndexStoreTableId,ze as getIndexes,Fe as getIndexesIds,rt as getLinkedRowIds,tt as getLocalRowIds,Se as getMetric,Ve as getMetricIds,Le as getMetrics,Be as getMetricsIds,it as getPersister,at as getPersisterIds,pt as getPersisterStatus,He as getQueries,Me as getQueriesIds,Oe as getQueryIds,Ze as getRelationshipIds,Xe as getRelationships,Ye as getRelationshipsIds,nt as getRelationshipsStoreTableIds,et as getRemoteRowId,Ue as getResultCell,Ne as getResultCellIds,Ke as getResultRow,Ee as getResultRowCount,Ge as getResultRowIds,Je as getResultSortedRowIds,Qe as getResultTable,We as getResultTableCellIds,ve as getRow,fe as getRowCount,be as getRowIds,je as getSliceIds,Ae as getSliceRowIds,he as getSortedRowIds,Ce as getStore,Te as getStoreIds,lt as getSynchronizer,It as getSynchronizerIds,ft as getSynchronizerStatus,pe as getTable,le as getTableCellIds,ie as getTableIds,ge as getTables,Re as getValue,ke as getValueIds,$e as getValues,_e as hasCell,me as hasRow,ae as hasTable,Ie as hasTableCell,ce as hasTables,qe as hasValue,ye as hasValues,Lt as onCell,Ct as onCellIds,rr as onCheckpoint,tr as onCheckpointIds,At as onDidFinishTransaction,Tt as onHasCell,qt as onHasRow,vt as onHasTable,wt as onHasTableCell,bt as onHasTables,zt as onHasValue,Bt as onHasValues,Wt as onLinkedRowIds,Qt as onLocalRowIds,Dt as onMetric,er as onParamValue,Zt as onParamValues,nr as onPersisterStatus,Ot as onRemoteRowId,Yt as onResultCell,Xt as onResultCellIds,Ut as onResultRow,Jt as onResultRowCount,Kt as onResultRowIds,Nt as onResultSortedRowIds,Et as onResultTable,Gt as onResultTableCellIds,Rt as onRow,yt as onRowCount,$t as onRowIds,Ht as onSliceIds,Mt as onSliceRowIds,kt as onSortedRowIds,Pt as onStartTransaction,sr as onSynchronizerStatus,xt as onTable,_t as onTableCellIds,mt as onTableIds,ht as onTables,Ft as onValue,St as onValueIds,Vt as onValues,jt as onWillFinishTransaction,ar as provideCheckpoints,cr as provideIndexes,or as provideMetrics,pr as providePersister,ir as provideQueries,gr as provideRelationships,ur as provideStore,lr as provideSynchronizer,ne as resolveCheckpoints,ee as resolveIndexes,Z as resolveMetrics,se as resolvePersister,re as resolveQueries,te as resolveRelationships,Y as resolveStore,de as resolveSynchronizer};
Binary file
@@ -1 +1 @@
1
- import"svelte/internal/disclose-version";import*as e from"svelte/internal/client";import{getContext as t,setContext as r,untrack as n}from"svelte";import{createSubscriber as s}from"svelte/reactivity";const d=e=>typeof e,u=d(""),o=d(d),c="Listener",g="Result",i="Has",a="Ids",p="Table",l=p+"s",I=p+a,f="Row",b=f+"Count",h=f+a,m="Sorted"+f+a,v="Cell",x=v+a,_="Value",w=_+"s",y=_+a,$="Transaction",k="Finish",q="Status",R="Metric",C="Slice",T="RemoteRowId",L="Local",B="Linked",V="Checkpoint",S=globalThis,z=e=>void 0===e,F=()=>!z(S.window),P=(j=z,(e,t,r)=>j(e)?r?.():t(e));var j;const A=()=>{},D=Object.keys,H="tinybase_uisc";class M{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get current(){return this.#t(),this.#e()}}class O extends M{#r;constructor(e,t,r){super(e,r),this.#r=t}get current(){return super.current}set current(e){this.#r(e)}}const Q=[],W={},E=[Q,void 0,Q],G=e=>(e=>d(e)==o)(e)?e():e,J=()=>t(H)??[],K=(e,t,r)=>{return z(t)?e[2*r]:d(t)==u?(n=e[2*r+1],s=t,P(n,e=>e[s])):t;var n,s},N=(e,t)=>K(J(),e,t),U=(e,t)=>{const r=J();return()=>K(r,G(e),t)},X=(e,t)=>D(e[2*t+1]??W),Y=e=>U(e,0),Z=e=>U(e,1),ee=e=>U(e,2),te=e=>U(e,3),re=e=>U(e,4),ne=e=>U(e,5),se=e=>U(e,6),de=e=>U(e,7),ue=(t,r,n,d=()=>Q,u)=>{const o=(u?"has":"get")+r,g="add"+(u?i:"")+r+c;let a=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const r=t(),n=d();e.set(a,s(e=>{const t=r?.[g]?.(...n,e);return()=>r?.delListener?.(t)}),!0)}),new M(()=>t()?.[o]?.(...d())??n,()=>e.get(a)())},oe=(t,r,n,s=()=>Q,d)=>{F()&&e.user_effect(()=>{const e=t(),u=s(),o=e?.["add"+r+c]?.(...u,n,...void 0!==d?[d]:Q);return()=>e?.delListener?.(o)})},ce=e=>ue(Y(e),l,!1,()=>Q,1),ge=e=>ue(Y(e),l,W),ie=e=>ue(Y(e),I,Q),ae=(e,t)=>ue(Y(t),p,!1,()=>[G(e)],1),pe=(e,t)=>ue(Y(t),p,W,()=>[G(e)]),le=(e,t)=>ue(Y(t),p+x,Q,()=>[G(e)]),Ie=(e,t,r)=>ue(Y(r),p+v,!1,()=>[G(e),G(t)],1),fe=(e,t)=>ue(Y(t),b,0,()=>[G(e)]),be=(e,t)=>ue(Y(t),h,Q,()=>[G(e)]),he=(e,t,r=!1,n=0,s,d)=>ue(Y(d),m,Q,()=>[G(e),G(t),G(r),G(n),G(s)]),me=(e,t,r)=>ue(Y(r),f,!1,()=>[G(e),G(t)],1),ve=(e,t,r)=>ue(Y(r),f,W,()=>[G(e),G(t)]),xe=(e,t,r)=>ue(Y(r),x,Q,()=>[G(e),G(t)]),_e=(e,t,r,n)=>ue(Y(n),v,!1,()=>[G(e),G(t),G(r)],1),we=(t,r,n,d)=>{const u=Y(d);let o=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const d=u(),c=G(t),g=G(r),i=G(n);e.set(o,s(e=>{const t=d?.addCellListener(c,g,i,e);return()=>d?.delListener?.(t)}),!0)}),new O(()=>u()?.getCell(G(t),G(r),G(n)),e=>u()?.setCell(G(t),G(r),G(n),e),()=>e.get(o)())},ye=e=>ue(Y(e),w,!1,()=>Q,1),$e=e=>ue(Y(e),w,W),ke=e=>ue(Y(e),y,Q),qe=(e,t)=>ue(Y(t),_,!1,()=>[G(e)],1),Re=(t,r)=>{const n=Y(r);let d=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const r=n(),u=G(t);e.set(d,s(e=>{const t=r?.addValueListener(u,e);return()=>r?.delListener?.(t)}),!0)}),new O(()=>n()?.getValue(G(t)),e=>n()?.setValue(G(t),e),()=>e.get(d)())},Ce=e=>N(e,0),Te=()=>{const t=J();let r=e.state(e.proxy(X(t,0)));return F()&&e.user_effect(()=>{e.set(r,X(t,0),!0)}),{get current(){return e.get(r)}}},Le=e=>N(e,1),Be=()=>{const t=J();let r=e.state(e.proxy(X(t,1)));return F()&&e.user_effect(()=>{e.set(r,X(t,1),!0)}),{get current(){return e.get(r)}}},Ve=e=>ue(Z(e),R+a,Q),Se=(e,t)=>ue(Z(t),R,void 0,()=>[G(e)]),ze=e=>N(e,2),Fe=()=>{const t=J();let r=e.state(e.proxy(X(t,2)));return F()&&e.user_effect(()=>{e.set(r,X(t,2),!0)}),{get current(){return e.get(r)}}},Pe=e=>ue(ee(e),"Index"+a,Q),je=(e,t)=>ue(ee(t),C+a,Q,()=>[G(e)]),Ae=(e,t,r)=>ue(ee(r),C+h,Q,()=>[G(e),G(t)]),De=(e,t)=>{const r=ee(e);return{get store(){return r()?.getStore()},get tableId(){return r()?.getTableId(G(t))}}},He=e=>N(e,4),Me=()=>{const t=J();let r=e.state(e.proxy(X(t,4)));return F()&&e.user_effect(()=>{e.set(r,X(t,4),!0)}),{get current(){return e.get(r)}}},Oe=e=>ue(re(e),"Query"+a,Q),Qe=(e,t)=>ue(re(t),g+p,W,()=>[G(e)]),We=(e,t)=>ue(re(t),g+p+x,Q,()=>[G(e)]),Ee=(e,t)=>ue(re(t),g+b,0,()=>[G(e)]),Ge=(e,t)=>ue(re(t),g+h,Q,()=>[G(e)]),Je=(e,t,r=!1,n=0,s,d)=>ue(re(d),g+m,Q,()=>[G(e),G(t),G(r),G(n),G(s)]),Ke=(e,t,r)=>ue(re(r),g+f,W,()=>[G(e),G(t)]),Ne=(e,t,r)=>ue(re(r),g+x,Q,()=>[G(e),G(t)]),Ue=(e,t,r,n)=>ue(re(n),g+v,void 0,()=>[G(e),G(t),G(r)]),Xe=e=>N(e,3),Ye=()=>{const t=J();let r=e.state(e.proxy(X(t,3)));return F()&&e.user_effect(()=>{e.set(r,X(t,3),!0)}),{get current(){return e.get(r)}}},Ze=e=>ue(te(e),"Relationship"+a,Q),et=(e,t,r)=>ue(te(r),T,void 0,()=>[G(e),G(t)]),tt=(e,t,r)=>ue(te(r),L+h,Q,()=>[G(e),G(t)]),rt=(e,t,r)=>ue(te(r),B+h,Q,()=>[G(e),G(t)]),nt=(e,t)=>{const r=te(e);return{get store(){return r()?.getStore()},get localTableId(){return r()?.getLocalTableId(G(t))},get remoteTableId(){return r()?.getRemoteTableId(G(t))}}},st=e=>N(e,5),dt=()=>{const t=J();let r=e.state(e.proxy(X(t,5)));return F()&&e.user_effect(()=>{e.set(r,X(t,5),!0)}),{get current(){return e.get(r)}}},ut=e=>ue(ne(e),V+a,E),ot=(e,t)=>ue(ne(t),V,void 0,()=>[G(e)]),ct=e=>{const t=ne(e);return()=>t()?.goBackward()},gt=e=>{const t=ne(e);return()=>t()?.goForward()},it=e=>N(e,6),at=()=>{const t=J();let r=e.state(e.proxy(X(t,6)));return F()&&e.user_effect(()=>{e.set(r,X(t,6),!0)}),{get current(){return e.get(r)}}},pt=e=>ue(se(e),q,0),lt=e=>N(e,7),It=()=>{const t=J();let r=e.state(e.proxy(X(t,7)));return F()&&e.user_effect(()=>{e.set(r,X(t,7),!0)}),{get current(){return e.get(r)}}},ft=e=>ue(de(e),q,0),bt=(e,t,r)=>oe(Y(r),i+l,e,()=>Q,t),ht=(e,t,r)=>oe(Y(r),l,e,()=>Q,t),mt=(e,t,r)=>oe(Y(r),I,e,()=>Q,t),vt=(e,t,r,n)=>oe(Y(n),i+p,t,()=>[G(e)],r),xt=(e,t,r,n)=>oe(Y(n),p,t,()=>[G(e)],r),_t=(e,t,r,n)=>oe(Y(n),p+x,t,()=>[G(e)],r),wt=(e,t,r,n,s)=>oe(Y(s),i+p+v,r,()=>[G(e),G(t)],n),yt=(e,t,r,n)=>oe(Y(n),b,t,()=>[G(e)],r),$t=(e,t,r,n)=>oe(Y(n),h,t,()=>[G(e)],r),kt=(e,t,r,n,s,d,u,o)=>oe(Y(o),m,d,()=>[G(e),G(t),G(r),G(n),G(s)],u),qt=(e,t,r,n,s)=>oe(Y(s),i+f,r,()=>[G(e),G(t)],n),Rt=(e,t,r,n,s)=>oe(Y(s),f,r,()=>[G(e),G(t)],n),Ct=(e,t,r,n,s)=>oe(Y(s),x,r,()=>[G(e),G(t)],n),Tt=(e,t,r,n,s,d)=>oe(Y(d),i+v,n,()=>[G(e),G(t),G(r)],s),Lt=(e,t,r,n,s,d)=>oe(Y(d),v,n,()=>[G(e),G(t),G(r)],s),Bt=(e,t,r)=>oe(Y(r),i+w,e,()=>Q,t),Vt=(e,t,r)=>oe(Y(r),w,e,()=>Q,t),St=(e,t,r)=>oe(Y(r),y,e,()=>Q,t),zt=(e,t,r,n)=>oe(Y(n),i+_,t,()=>[G(e)],r),Ft=(e,t,r,n)=>oe(Y(n),_,t,()=>[G(e)],r),Pt=(e,t)=>oe(Y(t),"Start"+$,e),jt=(e,t)=>oe(Y(t),"Will"+k+$,e),At=(e,t)=>oe(Y(t),"Did"+k+$,e),Dt=(e,t,r)=>oe(Z(r),R,t,()=>[G(e)]),Ht=(e,t,r)=>oe(ee(r),C+a,t,()=>[G(e)]),Mt=(e,t,r,n)=>oe(ee(n),C+h,r,()=>[G(e),G(t)]),Ot=(e,t,r,n)=>oe(te(n),T,r,()=>[G(e),G(t)]),Qt=(e,t,r,n)=>oe(te(n),L+h,r,()=>[G(e),G(t)]),Wt=(e,t,r,n)=>oe(te(n),B+h,r,()=>[G(e),G(t)]),Et=(e,t,r)=>oe(re(r),g+p,t,()=>[G(e)]),Gt=(e,t,r)=>oe(re(r),g+p+x,t,()=>[G(e)]),Jt=(e,t,r)=>oe(re(r),g+b,t,()=>[G(e)]),Kt=(e,t,r)=>oe(re(r),g+h,t,()=>[G(e)]),Nt=(e,t,r,n,s,d,u)=>oe(re(u),g+m,d,()=>[G(e),G(t),G(r),G(n),G(s)]),Ut=(e,t,r,n)=>oe(re(n),g+f,r,()=>[G(e),G(t)]),Xt=(e,t,r,n)=>oe(re(n),g+x,r,()=>[G(e),G(t)]),Yt=(e,t,r,n,s)=>oe(re(s),g+v,n,()=>[G(e),G(t),G(r)]),Zt=(e,t,r)=>oe(re(r),"ParamValues",t,()=>[G(e)]),er=(e,t,r,n)=>oe(re(n),"ParamValue",r,()=>[G(e),G(t)]),tr=(e,t)=>oe(ne(t),V+a,e),rr=(e,t,r)=>oe(ne(r),V,t,()=>[G(e)]),nr=(e,t)=>oe(se(t),q,e),sr=(e,t)=>oe(de(t),q,e),dr=(t,r,n)=>{const s=J();F()&&e.user_effect(()=>(s[16]?.(n,t,r),()=>s[17]?.(n,t)))},ur=(e,t)=>dr(e,t,0),or=(e,t)=>dr(e,t,1),cr=(e,t)=>dr(e,t,2),gr=(e,t)=>dr(e,t,3),ir=(e,t)=>dr(e,t,4),ar=(e,t)=>dr(e,t,5),pr=(e,t)=>dr(e,t,6),lr=(e,t)=>dr(e,t,7);function Ir(t,r){e.push(r,!0);const n=ot(()=>r.checkpointId,()=>r.checkpoints),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.checkpointId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}var fr=e.from_html("<!><!>",1),br=e.from_html("<!><!><!>",1);function hr(t,r){e.push(r,!0);var n=br(),s=e.first_child(n),d=t=>{var n=e.text();e.template_effect(()=>e.set_text(n,(r.id??"")+":{")),e.append(t,n)},u=e.derived(()=>r.debugIds&&!z(r.id));e.if(s,t=>{e.get(u)&&t(d)});var o=e.sibling(s);e.each(o,18,()=>r.ids,e=>e,(t,n,s)=>{var d=fr(),u=e.first_child(d),o=t=>{var n=e.comment(),s=e.first_child(n);e.snippet(s,()=>r.separator),e.append(t,n)};e.if(u,t=>{e.get(s)>0&&r.separator&&t(o)});var c=e.sibling(u),g=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.custom,()=>n),e.append(t,s)},i=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.children,()=>n),e.append(t,s)};e.if(c,e=>{r.custom?e(g):e(i,-1)}),e.append(t,d)});var c=e.sibling(o),g=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)},i=e.derived(()=>r.debugIds&&!z(r.id));e.if(c,t=>{e.get(i)&&t(g)}),e.append(t,n),e.pop()}function mr(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[0]);{const n=(t,n=e.noop)=>{Ir(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n,$$slots:{default:!0}})}e.pop()}function vr(t,r){e.push(r,!0);const n=we(()=>r.tableId,()=>r.rowId,()=>r.cellId,()=>r.store),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.cellId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function xr(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[1]);var d=e.comment(),u=e.first_child(d),o=t=>{var n=e.comment(),d=e.first_child(n),u=t=>{var n=e.comment(),d=e.first_child(n);e.snippet(d,()=>r.checkpoint,()=>e.get(s)),e.append(t,n)},o=t=>{Ir(t,{get checkpointId(){return e.get(s)},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};e.if(d,e=>{r.checkpoint?e(u):e(o,-1)}),e.append(t,n)},c=e.derived(()=>!z(e.get(s)));e.if(u,t=>{e.get(c)&&t(o)}),e.append(t,d),e.pop()}function _r(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[2]);{const n=(t,n=e.noop)=>{Ir(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n,$$slots:{default:!0}})}e.pop()}function wr(t,r){e.push(r,!0);const n=xe(()=>r.tableId,()=>r.rowId,()=>r.store),s=e.derived(()=>r.customCellIds??n.current);{const n=(t,n=e.noop)=>{vr(t,{get tableId(){return r.tableId},get rowId(){return r.rowId},get cellId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.rowId},get custom(){return r.cell},children:n,$$slots:{default:!0}})}e.pop()}function yr(t,r){e.push(r,!0);const{store:n,tableId:s}=De(()=>r.indexes,()=>r.indexId),d=Ae(()=>r.indexId,()=>r.sliceId,()=>r.indexes);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})};e.if(o,e=>{s&&e(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.sliceId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function $r(t,r){e.push(r,!0);const n=je(()=>r.indexId,()=>r.indexes);{const s=(t,n=e.noop)=>{yr(t,{get indexId(){return r.indexId},get sliceId(){return n()},get indexes(){return r.indexes},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.indexId},get custom(){return r.slice},children:s,$$slots:{default:!0}})}e.pop()}function kr(t,r){e.push(r,!0);const{store:n,localTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=rt(()=>r.relationshipId,()=>r.firstRowId,()=>r.relationships);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})};e.if(o,e=>{s&&e(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.firstRowId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function qr(t,r){e.push(r,!0);const{store:n,localTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=tt(()=>r.relationshipId,()=>r.remoteRowId,()=>r.relationships);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})};e.if(o,e=>{s&&e(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.remoteRowId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function Rr(t,r){e.push(r,!0);const n=Se(()=>r.metricId,()=>r.metrics),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.metricId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Cr(s,d){e.push(d,!0);const u=t(H)??[];let o=e.proxy(Array.from({length:8},()=>({})));const c=(e,t,r)=>{o[e]={...n(()=>o[e]),[t]:r}},g=(e,t)=>{const{[t]:r,...s}=n(()=>o[e]);o[e]=s};r(H,{get 0(){return d.store??u[0]},get 1(){return{...u[1]??{},...d.storesById,...o[0]}},get 2(){return d.metrics??u[2]},get 3(){return{...u[3]??{},...d.metricsById,...o[1]}},get 4(){return d.indexes??u[4]},get 5(){return{...u[5]??{},...d.indexesById,...o[2]}},get 6(){return d.relationships??u[6]},get 7(){return{...u[7]??{},...d.relationshipsById,...o[3]}},get 8(){return d.queries??u[8]},get 9(){return{...u[9]??{},...d.queriesById,...o[4]}},get 10(){return d.checkpoints??u[10]},get 11(){return{...u[11]??{},...d.checkpointsById,...o[5]}},get 12(){return d.persister??u[12]},get 13(){return{...u[13]??{},...d.persistersById,...o[6]}},get 14(){return d.synchronizer??u[14]},get 15(){return{...u[15]??{},...d.synchronizersById,...o[7]}},get 16(){return c},get 17(){return g}});var i=e.comment(),a=e.first_child(i);e.snippet(a,()=>d.children),e.append(s,i),e.pop()}var Tr=e.from_html("<!><!><!>",1);function Lr(t,r){e.push(r,!0);const{store:n,remoteTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=et(()=>r.relationshipId,()=>r.localRowId,()=>r.relationships);var u=Tr(),o=e.first_child(u),c=t=>{var n=e.text();e.template_effect(()=>e.set_text(n,(r.localRowId??"")+":{")),e.append(t,n)};e.if(o,e=>{r.debugIds&&e(c)});var g=e.sibling(o),i=t=>{var u=e.comment(),o=e.first_child(u),c=t=>{var n=e.comment(),s=e.first_child(n);e.snippet(s,()=>r.row,()=>d.current),e.append(t,n)},g=e=>{wr(e,{get tableId(){return s},get rowId(){return d.current},get store(){return n},get debugIds(){return r.debugIds}})};e.if(o,e=>{r.row?e(c):s&&e(g,1)}),e.append(t,u)},a=e.derived(()=>!z(d.current));e.if(g,t=>{e.get(a)&&t(i)});var p=e.sibling(g),l=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)};e.if(p,e=>{r.debugIds&&e(l)}),e.append(t,u),e.pop()}function Br(t,r){e.push(r,!0);const n=Ue(()=>r.queryId,()=>r.rowId,()=>r.cellId,()=>r.queries),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.cellId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Vr(t,r){e.push(r,!0);const n=Ne(()=>r.queryId,()=>r.rowId,()=>r.queries);{const s=(t,n=e.noop)=>{Br(t,{get queryId(){return r.queryId},get rowId(){return r.rowId},get cellId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.rowId},get custom(){return r.cell},children:s,$$slots:{default:!0}})}e.pop()}function Sr(t,r){e.push(r,!0);const n=Je(()=>r.queryId,()=>r.cellId,()=>r.descending??!1,()=>r.offset??0,()=>r.limit,()=>r.queries);{const s=(t,n=e.noop)=>{Vr(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.queryId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function zr(t,r){e.push(r,!0);const n=Ge(()=>r.queryId,()=>r.queries);{const s=(t,n=e.noop)=>{Vr(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.queryId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function Fr(t,r){e.push(r,!0);const n=he(()=>r.tableId,()=>r.cellId,()=>r.descending??!1,()=>r.offset??0,()=>r.limit,()=>r.store);{const s=(t,n=e.noop)=>{wr(t,{get tableId(){return r.tableId},get rowId(){return n()},get store(){return r.store},get customCellIds(){return r.customCellIds},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.tableId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function Pr(t,r){e.push(r,!0);const n=be(()=>r.tableId,()=>r.store);{const s=(t,n=e.noop)=>{wr(t,{get tableId(){return r.tableId},get rowId(){return n()},get store(){return r.store},get customCellIds(){return r.customCellIds},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.tableId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function jr(t,r){e.push(r,!0);const n=ie(()=>r.store);{const s=(t,n=e.noop)=>{Pr(t,{get tableId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.table},children:s,$$slots:{default:!0}})}e.pop()}function Ar(t,r){e.push(r,!0);const n=Re(()=>r.valueId,()=>r.store),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.valueId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Dr(t,r){e.push(r,!0);const n=ke(()=>r.store);{const s=(t,n=e.noop)=>{Ar(t,{get valueId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.value},children:s,$$slots:{default:!0}})}e.pop()}export{mr as BackwardCheckpointsView,vr as CellView,Ir as CheckpointView,xr as CurrentCheckpointView,_r as ForwardCheckpointsView,$r as IndexView,kr as LinkedRowsView,qr as LocalRowsView,Rr as MetricView,Cr as Provider,Lr as RemoteRowView,Br as ResultCellView,Vr as ResultRowView,Sr as ResultSortedTableView,zr as ResultTableView,wr as RowView,yr as SliceView,Fr as SortedTableView,Pr as TableView,jr as TablesView,Ar as ValueView,Dr as ValuesView,ct as createGoBackwardCallback,gt as createGoForwardCallback,we as getCell,xe as getCellIds,ot as getCheckpoint,ut as getCheckpointIds,st as getCheckpoints,dt as getCheckpointsIds,Pe as getIndexIds,De as getIndexStoreTableId,ze as getIndexes,Fe as getIndexesIds,rt as getLinkedRowIds,tt as getLocalRowIds,Se as getMetric,Ve as getMetricIds,Le as getMetrics,Be as getMetricsIds,it as getPersister,at as getPersisterIds,pt as getPersisterStatus,He as getQueries,Me as getQueriesIds,Oe as getQueryIds,Ze as getRelationshipIds,Xe as getRelationships,Ye as getRelationshipsIds,nt as getRelationshipsStoreTableIds,et as getRemoteRowId,Ue as getResultCell,Ne as getResultCellIds,Ke as getResultRow,Ee as getResultRowCount,Ge as getResultRowIds,Je as getResultSortedRowIds,Qe as getResultTable,We as getResultTableCellIds,ve as getRow,fe as getRowCount,be as getRowIds,je as getSliceIds,Ae as getSliceRowIds,he as getSortedRowIds,Ce as getStore,Te as getStoreIds,lt as getSynchronizer,It as getSynchronizerIds,ft as getSynchronizerStatus,pe as getTable,le as getTableCellIds,ie as getTableIds,ge as getTables,Re as getValue,ke as getValueIds,$e as getValues,_e as hasCell,me as hasRow,ae as hasTable,Ie as hasTableCell,ce as hasTables,qe as hasValue,ye as hasValues,Lt as onCell,Ct as onCellIds,rr as onCheckpoint,tr as onCheckpointIds,At as onDidFinishTransaction,Tt as onHasCell,qt as onHasRow,vt as onHasTable,wt as onHasTableCell,bt as onHasTables,zt as onHasValue,Bt as onHasValues,Wt as onLinkedRowIds,Qt as onLocalRowIds,Dt as onMetric,er as onParamValue,Zt as onParamValues,nr as onPersisterStatus,Ot as onRemoteRowId,Yt as onResultCell,Xt as onResultCellIds,Ut as onResultRow,Jt as onResultRowCount,Kt as onResultRowIds,Nt as onResultSortedRowIds,Et as onResultTable,Gt as onResultTableCellIds,Rt as onRow,yt as onRowCount,$t as onRowIds,Ht as onSliceIds,Mt as onSliceRowIds,kt as onSortedRowIds,Pt as onStartTransaction,sr as onSynchronizerStatus,xt as onTable,_t as onTableCellIds,mt as onTableIds,ht as onTables,Ft as onValue,St as onValueIds,Vt as onValues,jt as onWillFinishTransaction,ar as provideCheckpoints,cr as provideIndexes,or as provideMetrics,pr as providePersister,ir as provideQueries,gr as provideRelationships,ur as provideStore,lr as provideSynchronizer,ne as resolveCheckpoints,ee as resolveIndexes,Z as resolveMetrics,se as resolvePersister,re as resolveQueries,te as resolveRelationships,Y as resolveStore,de as resolveSynchronizer};
1
+ import"svelte/internal/disclose-version";import*as e from"svelte/internal/client";import{getContext as t,setContext as r,untrack as n}from"svelte";import{createSubscriber as s}from"svelte/reactivity";const d=e=>typeof e,u=d(""),o=d(d),c="Listener",g="Result",i="Has",a="Ids",p="Table",l=p+"s",I=p+a,f="Row",b=f+"Count",h=f+a,m="Sorted"+f+a,v="Cell",x=v+a,_="Value",w=_+"s",y=_+a,$="Transaction",k="Finish",q="Status",R="Metric",C="Slice",T="RemoteRowId",L="Local",B="Linked",V="Checkpoint",S=globalThis,z=e=>void 0===e,F=()=>!z(S.window),P=(j=z,(e,t,r)=>j(e)?r?.():t(e));var j;const A=()=>{},D=Object.keys,H="tinybase_uisc";class M{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get current(){return this.#t(),this.#e()}}class O extends M{#r;constructor(e,t,r){super(e,r),this.#r=t}get current(){return super.current}set current(e){this.#r(e)}}const Q=[],W={},E=[Q,void 0,Q],G=e=>(e=>d(e)==o)(e)?e():e,J=()=>t(H)??[],K=(e,t,r)=>{return z(t)?e[2*r]:d(t)==u?(n=e[2*r+1],s=t,P(n,e=>e[s])):t;var n,s},N=(e,t)=>K(J(),e,t),U=(e,t)=>{const r=J();return()=>K(r,G(e),t)},X=(e,t)=>D(e[2*t+1]??W),Y=e=>U(e,0),Z=e=>U(e,1),ee=e=>U(e,2),te=e=>U(e,3),re=e=>U(e,4),ne=e=>U(e,5),se=e=>U(e,6),de=e=>U(e,7),ue=(t,r,n,d=()=>Q,u)=>{const o=(u?"has":"get")+r,g="add"+(u?i:"")+r+c;let a=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const r=t(),n=d();e.set(a,s(e=>{const t=r?.[g]?.(...n,e);return()=>r?.delListener?.(t)}),!0)}),new M(()=>t()?.[o]?.(...d())??n,()=>e.get(a)())},oe=(t,r,n,s=()=>Q,d)=>{F()&&e.user_effect(()=>{const e=t(),u=s(),o=e?.["add"+r+c]?.(...u,n,...void 0!==d?[d]:Q);return()=>e?.delListener?.(o)})},ce=e=>ue(Y(e),l,!1,()=>Q,1),ge=e=>ue(Y(e),l,W),ie=e=>ue(Y(e),I,Q),ae=(e,t)=>ue(Y(t),p,!1,()=>[G(e)],1),pe=(e,t)=>ue(Y(t),p,W,()=>[G(e)]),le=(e,t)=>ue(Y(t),p+x,Q,()=>[G(e)]),Ie=(e,t,r)=>ue(Y(r),p+v,!1,()=>[G(e),G(t)],1),fe=(e,t)=>ue(Y(t),b,0,()=>[G(e)]),be=(e,t)=>ue(Y(t),h,Q,()=>[G(e)]),he=(e,t,r=!1,n=0,s,d)=>ue(Y(d),m,Q,()=>[G(e),G(t),G(r),G(n),G(s)]),me=(e,t,r)=>ue(Y(r),f,!1,()=>[G(e),G(t)],1),ve=(e,t,r)=>ue(Y(r),f,W,()=>[G(e),G(t)]),xe=(e,t,r)=>ue(Y(r),x,Q,()=>[G(e),G(t)]),_e=(e,t,r,n)=>ue(Y(n),v,!1,()=>[G(e),G(t),G(r)],1),we=(t,r,n,d)=>{const u=Y(d);let o=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const d=u(),c=G(t),g=G(r),i=G(n);e.set(o,s(e=>{const t=d?.addCellListener(c,g,i,e);return()=>d?.delListener?.(t)}),!0)}),new O(()=>u()?.getCell(G(t),G(r),G(n)),e=>u()?.setCell(G(t),G(r),G(n),e),()=>e.get(o)())},ye=e=>ue(Y(e),w,!1,()=>Q,1),$e=e=>ue(Y(e),w,W),ke=e=>ue(Y(e),y,Q),qe=(e,t)=>ue(Y(t),_,!1,()=>[G(e)],1),Re=(t,r)=>{const n=Y(r);let d=e.state(e.proxy(A));return F()&&e.user_effect(()=>{const r=n(),u=G(t);e.set(d,s(e=>{const t=r?.addValueListener(u,e);return()=>r?.delListener?.(t)}),!0)}),new O(()=>n()?.getValue(G(t)),e=>n()?.setValue(G(t),e),()=>e.get(d)())},Ce=e=>N(e,0),Te=()=>{const t=J();let r=e.state(e.proxy(X(t,0)));return F()&&e.user_effect(()=>{e.set(r,X(t,0),!0)}),{get current(){return e.get(r)}}},Le=e=>N(e,1),Be=()=>{const t=J();let r=e.state(e.proxy(X(t,1)));return F()&&e.user_effect(()=>{e.set(r,X(t,1),!0)}),{get current(){return e.get(r)}}},Ve=e=>ue(Z(e),R+a,Q),Se=(e,t)=>ue(Z(t),R,void 0,()=>[G(e)]),ze=e=>N(e,2),Fe=()=>{const t=J();let r=e.state(e.proxy(X(t,2)));return F()&&e.user_effect(()=>{e.set(r,X(t,2),!0)}),{get current(){return e.get(r)}}},Pe=e=>ue(ee(e),"Index"+a,Q),je=(e,t)=>ue(ee(t),C+a,Q,()=>[G(e)]),Ae=(e,t,r)=>ue(ee(r),C+h,Q,()=>[G(e),G(t)]),De=(e,t)=>{const r=ee(e);return{get store(){return r()?.getStore()},get tableId(){return r()?.getTableId(G(t))}}},He=e=>N(e,4),Me=()=>{const t=J();let r=e.state(e.proxy(X(t,4)));return F()&&e.user_effect(()=>{e.set(r,X(t,4),!0)}),{get current(){return e.get(r)}}},Oe=e=>ue(re(e),"Query"+a,Q),Qe=(e,t)=>ue(re(t),g+p,W,()=>[G(e)]),We=(e,t)=>ue(re(t),g+p+x,Q,()=>[G(e)]),Ee=(e,t)=>ue(re(t),g+b,0,()=>[G(e)]),Ge=(e,t)=>ue(re(t),g+h,Q,()=>[G(e)]),Je=(e,t,r=!1,n=0,s,d)=>ue(re(d),g+m,Q,()=>[G(e),G(t),G(r),G(n),G(s)]),Ke=(e,t,r)=>ue(re(r),g+f,W,()=>[G(e),G(t)]),Ne=(e,t,r)=>ue(re(r),g+x,Q,()=>[G(e),G(t)]),Ue=(e,t,r,n)=>ue(re(n),g+v,void 0,()=>[G(e),G(t),G(r)]),Xe=e=>N(e,3),Ye=()=>{const t=J();let r=e.state(e.proxy(X(t,3)));return F()&&e.user_effect(()=>{e.set(r,X(t,3),!0)}),{get current(){return e.get(r)}}},Ze=e=>ue(te(e),"Relationship"+a,Q),et=(e,t,r)=>ue(te(r),T,void 0,()=>[G(e),G(t)]),tt=(e,t,r)=>ue(te(r),L+h,Q,()=>[G(e),G(t)]),rt=(e,t,r)=>ue(te(r),B+h,Q,()=>[G(e),G(t)]),nt=(e,t)=>{const r=te(e);return{get store(){return r()?.getStore()},get localTableId(){return r()?.getLocalTableId(G(t))},get remoteTableId(){return r()?.getRemoteTableId(G(t))}}},st=e=>N(e,5),dt=()=>{const t=J();let r=e.state(e.proxy(X(t,5)));return F()&&e.user_effect(()=>{e.set(r,X(t,5),!0)}),{get current(){return e.get(r)}}},ut=e=>ue(ne(e),V+a,E),ot=(e,t)=>ue(ne(t),V,void 0,()=>[G(e)]),ct=e=>{const t=ne(e);return()=>t()?.goBackward()},gt=e=>{const t=ne(e);return()=>t()?.goForward()},it=e=>N(e,6),at=()=>{const t=J();let r=e.state(e.proxy(X(t,6)));return F()&&e.user_effect(()=>{e.set(r,X(t,6),!0)}),{get current(){return e.get(r)}}},pt=e=>ue(se(e),q,0),lt=e=>N(e,7),It=()=>{const t=J();let r=e.state(e.proxy(X(t,7)));return F()&&e.user_effect(()=>{e.set(r,X(t,7),!0)}),{get current(){return e.get(r)}}},ft=e=>ue(de(e),q,0),bt=(e,t,r)=>oe(Y(r),i+l,e,()=>Q,t),ht=(e,t,r)=>oe(Y(r),l,e,()=>Q,t),mt=(e,t,r)=>oe(Y(r),I,e,()=>Q,t),vt=(e,t,r,n)=>oe(Y(n),i+p,t,()=>[G(e)],r),xt=(e,t,r,n)=>oe(Y(n),p,t,()=>[G(e)],r),_t=(e,t,r,n)=>oe(Y(n),p+x,t,()=>[G(e)],r),wt=(e,t,r,n,s)=>oe(Y(s),i+p+v,r,()=>[G(e),G(t)],n),yt=(e,t,r,n)=>oe(Y(n),b,t,()=>[G(e)],r),$t=(e,t,r,n)=>oe(Y(n),h,t,()=>[G(e)],r),kt=(e,t,r,n,s,d,u,o)=>oe(Y(o),m,d,()=>[G(e),G(t),G(r),G(n),G(s)],u),qt=(e,t,r,n,s)=>oe(Y(s),i+f,r,()=>[G(e),G(t)],n),Rt=(e,t,r,n,s)=>oe(Y(s),f,r,()=>[G(e),G(t)],n),Ct=(e,t,r,n,s)=>oe(Y(s),x,r,()=>[G(e),G(t)],n),Tt=(e,t,r,n,s,d)=>oe(Y(d),i+v,n,()=>[G(e),G(t),G(r)],s),Lt=(e,t,r,n,s,d)=>oe(Y(d),v,n,()=>[G(e),G(t),G(r)],s),Bt=(e,t,r)=>oe(Y(r),i+w,e,()=>Q,t),Vt=(e,t,r)=>oe(Y(r),w,e,()=>Q,t),St=(e,t,r)=>oe(Y(r),y,e,()=>Q,t),zt=(e,t,r,n)=>oe(Y(n),i+_,t,()=>[G(e)],r),Ft=(e,t,r,n)=>oe(Y(n),_,t,()=>[G(e)],r),Pt=(e,t)=>oe(Y(t),"Start"+$,e),jt=(e,t)=>oe(Y(t),"Will"+k+$,e),At=(e,t)=>oe(Y(t),"Did"+k+$,e),Dt=(e,t,r)=>oe(Z(r),R,t,()=>[G(e)]),Ht=(e,t,r)=>oe(ee(r),C+a,t,()=>[G(e)]),Mt=(e,t,r,n)=>oe(ee(n),C+h,r,()=>[G(e),G(t)]),Ot=(e,t,r,n)=>oe(te(n),T,r,()=>[G(e),G(t)]),Qt=(e,t,r,n)=>oe(te(n),L+h,r,()=>[G(e),G(t)]),Wt=(e,t,r,n)=>oe(te(n),B+h,r,()=>[G(e),G(t)]),Et=(e,t,r)=>oe(re(r),g+p,t,()=>[G(e)]),Gt=(e,t,r)=>oe(re(r),g+p+x,t,()=>[G(e)]),Jt=(e,t,r)=>oe(re(r),g+b,t,()=>[G(e)]),Kt=(e,t,r)=>oe(re(r),g+h,t,()=>[G(e)]),Nt=(e,t,r,n,s,d,u)=>oe(re(u),g+m,d,()=>[G(e),G(t),G(r),G(n),G(s)]),Ut=(e,t,r,n)=>oe(re(n),g+f,r,()=>[G(e),G(t)]),Xt=(e,t,r,n)=>oe(re(n),g+x,r,()=>[G(e),G(t)]),Yt=(e,t,r,n,s)=>oe(re(s),g+v,n,()=>[G(e),G(t),G(r)]),Zt=(e,t,r)=>oe(re(r),"ParamValues",t,()=>[G(e)]),er=(e,t,r,n)=>oe(re(n),"ParamValue",r,()=>[G(e),G(t)]),tr=(e,t)=>oe(ne(t),V+a,e),rr=(e,t,r)=>oe(ne(r),V,t,()=>[G(e)]),nr=(e,t)=>oe(se(t),q,e),sr=(e,t)=>oe(de(t),q,e),dr=(t,r,n)=>{const s=J();F()&&e.user_effect(()=>(s[16]?.(n,t,r),()=>s[17]?.(n,t)))},ur=(e,t)=>dr(e,t,0),or=(e,t)=>dr(e,t,1),cr=(e,t)=>dr(e,t,2),gr=(e,t)=>dr(e,t,3),ir=(e,t)=>dr(e,t,4),ar=(e,t)=>dr(e,t,5),pr=(e,t)=>dr(e,t,6),lr=(e,t)=>dr(e,t,7);function Ir(t,r){e.push(r,!0);const n=ot(()=>r.checkpointId,()=>r.checkpoints),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.checkpointId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}var fr=e.from_html("<!><!>",1),br=e.from_html("<!><!><!>",1);function hr(t,r){e.push(r,!0);var n=br(),s=e.first_child(n),d=t=>{var n=e.text();e.template_effect(()=>e.set_text(n,(r.id??"")+":{")),e.append(t,n)},u=e.derived(()=>r.debugIds&&!z(r.id));e.if(s,t=>{e.get(u)&&t(d)});var o=e.sibling(s);e.each(o,18,()=>r.ids,e=>e,(t,n,s)=>{var d=fr(),u=e.first_child(d),o=t=>{var n=e.comment(),s=e.first_child(n);e.snippet(s,()=>r.separator),e.append(t,n)};e.if(u,t=>{e.get(s)>0&&r.separator&&t(o)});var c=e.sibling(u),g=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.custom,()=>n),e.append(t,s)},i=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.children,()=>n),e.append(t,s)};e.if(c,e=>{r.custom?e(g):e(i,-1)}),e.append(t,d)});var c=e.sibling(o),g=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)},i=e.derived(()=>r.debugIds&&!z(r.id));e.if(c,t=>{e.get(i)&&t(g)}),e.append(t,n),e.pop()}function mr(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[0]);{const n=(t,n=e.noop)=>{Ir(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n,$$slots:{default:!0}})}e.pop()}function vr(t,r){e.push(r,!0);const n=we(()=>r.tableId,()=>r.rowId,()=>r.cellId,()=>r.store),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.cellId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function xr(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[1]);var d=e.comment(),u=e.first_child(d),o=t=>{var n=e.comment(),d=e.first_child(n),u=t=>{var n=e.comment(),d=e.first_child(n);e.snippet(d,()=>r.checkpoint,()=>e.get(s)),e.append(t,n)},o=t=>{Ir(t,{get checkpointId(){return e.get(s)},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};e.if(d,e=>{r.checkpoint?e(u):e(o,-1)}),e.append(t,n)},c=e.derived(()=>!(null==e.get(s)));e.if(u,t=>{e.get(c)&&t(o)}),e.append(t,d),e.pop()}function _r(t,r){e.push(r,!0);const n=ut(()=>r.checkpoints),s=e.derived(()=>n.current[2]);{const n=(t,n=e.noop)=>{Ir(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n,$$slots:{default:!0}})}e.pop()}function wr(t,r){e.push(r,!0);const n=xe(()=>r.tableId,()=>r.rowId,()=>r.store),s=e.derived(()=>r.customCellIds??n.current);{const n=(t,n=e.noop)=>{vr(t,{get tableId(){return r.tableId},get rowId(){return r.rowId},get cellId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.rowId},get custom(){return r.cell},children:n,$$slots:{default:!0}})}e.pop()}function yr(t,r){e.push(r,!0);const{store:n,tableId:s}=De(()=>r.indexes,()=>r.indexId),d=Ae(()=>r.indexId,()=>r.sliceId,()=>r.indexes);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})},g=e.derived(()=>!z(s));e.if(o,t=>{e.get(g)&&t(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.sliceId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function $r(t,r){e.push(r,!0);const n=je(()=>r.indexId,()=>r.indexes);{const s=(t,n=e.noop)=>{yr(t,{get indexId(){return r.indexId},get sliceId(){return n()},get indexes(){return r.indexes},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.indexId},get custom(){return r.slice},children:s,$$slots:{default:!0}})}e.pop()}function kr(t,r){e.push(r,!0);const{store:n,localTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=rt(()=>r.relationshipId,()=>r.firstRowId,()=>r.relationships);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})},g=e.derived(()=>!z(s));e.if(o,t=>{e.get(g)&&t(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.firstRowId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function qr(t,r){e.push(r,!0);const{store:n,localTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=tt(()=>r.relationshipId,()=>r.remoteRowId,()=>r.relationships);{const u=(t,d=e.noop)=>{var u=e.comment(),o=e.first_child(u),c=e=>{wr(e,{get tableId(){return s},get rowId(){return d()},get store(){return n},get debugIds(){return r.debugIds}})},g=e.derived(()=>!z(s));e.if(o,t=>{e.get(g)&&t(c)}),e.append(t,u)};hr(t,{get ids(){return d.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.remoteRowId},get custom(){return r.row},children:u,$$slots:{default:!0}})}e.pop()}function Rr(t,r){e.push(r,!0);const n=Se(()=>r.metricId,()=>r.metrics),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.metricId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Cr(s,d){e.push(d,!0);const u=t(H)??[];let o=e.proxy(Array.from({length:8},()=>({})));const c=(e,t,r)=>{o[e]={...n(()=>o[e]),[t]:r}},g=(e,t)=>{const{[t]:r,...s}=n(()=>o[e]);o[e]=s};r(H,{get 0(){return d.store??u[0]},get 1(){return{...u[1]??{},...d.storesById,...o[0]}},get 2(){return d.metrics??u[2]},get 3(){return{...u[3]??{},...d.metricsById,...o[1]}},get 4(){return d.indexes??u[4]},get 5(){return{...u[5]??{},...d.indexesById,...o[2]}},get 6(){return d.relationships??u[6]},get 7(){return{...u[7]??{},...d.relationshipsById,...o[3]}},get 8(){return d.queries??u[8]},get 9(){return{...u[9]??{},...d.queriesById,...o[4]}},get 10(){return d.checkpoints??u[10]},get 11(){return{...u[11]??{},...d.checkpointsById,...o[5]}},get 12(){return d.persister??u[12]},get 13(){return{...u[13]??{},...d.persistersById,...o[6]}},get 14(){return d.synchronizer??u[14]},get 15(){return{...u[15]??{},...d.synchronizersById,...o[7]}},get 16(){return c},get 17(){return g}});var i=e.comment(),a=e.first_child(i);e.snippet(a,()=>d.children),e.append(s,i),e.pop()}var Tr=e.from_html("<!><!><!>",1);function Lr(t,r){e.push(r,!0);const{store:n,remoteTableId:s}=nt(()=>r.relationships,()=>r.relationshipId),d=et(()=>r.relationshipId,()=>r.localRowId,()=>r.relationships);var u=Tr(),o=e.first_child(u),c=t=>{var n=e.text();e.template_effect(()=>e.set_text(n,(r.localRowId??"")+":{")),e.append(t,n)};e.if(o,e=>{r.debugIds&&e(c)});var g=e.sibling(o),i=t=>{var u=e.comment(),o=e.first_child(u),c=t=>{var n=e.comment(),s=e.first_child(n);e.snippet(s,()=>r.row,()=>d.current),e.append(t,n)},g=e=>{wr(e,{get tableId(){return s},get rowId(){return d.current},get store(){return n},get debugIds(){return r.debugIds}})};e.if(o,e=>{r.row?e(c):s&&e(g,1)}),e.append(t,u)},a=e.derived(()=>!z(d.current));e.if(g,t=>{e.get(a)&&t(i)});var p=e.sibling(g),l=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)};e.if(p,e=>{r.debugIds&&e(l)}),e.append(t,u),e.pop()}function Br(t,r){e.push(r,!0);const n=Ue(()=>r.queryId,()=>r.rowId,()=>r.cellId,()=>r.queries),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.cellId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Vr(t,r){e.push(r,!0);const n=Ne(()=>r.queryId,()=>r.rowId,()=>r.queries);{const s=(t,n=e.noop)=>{Br(t,{get queryId(){return r.queryId},get rowId(){return r.rowId},get cellId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.rowId},get custom(){return r.cell},children:s,$$slots:{default:!0}})}e.pop()}function Sr(t,r){e.push(r,!0);const n=Je(()=>r.queryId,()=>r.cellId,()=>r.descending??!1,()=>r.offset??0,()=>r.limit,()=>r.queries);{const s=(t,n=e.noop)=>{Vr(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.queryId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function zr(t,r){e.push(r,!0);const n=Ge(()=>r.queryId,()=>r.queries);{const s=(t,n=e.noop)=>{Vr(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.queryId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function Fr(t,r){e.push(r,!0);const n=he(()=>r.tableId,()=>r.cellId,()=>r.descending??!1,()=>r.offset??0,()=>r.limit,()=>r.store);{const s=(t,n=e.noop)=>{wr(t,{get tableId(){return r.tableId},get rowId(){return n()},get store(){return r.store},get customCellIds(){return r.customCellIds},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.tableId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function Pr(t,r){e.push(r,!0);const n=be(()=>r.tableId,()=>r.store);{const s=(t,n=e.noop)=>{wr(t,{get tableId(){return r.tableId},get rowId(){return n()},get store(){return r.store},get customCellIds(){return r.customCellIds},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get id(){return r.tableId},get custom(){return r.row},children:s,$$slots:{default:!0}})}e.pop()}function jr(t,r){e.push(r,!0);const n=ie(()=>r.store);{const s=(t,n=e.noop)=>{Pr(t,{get tableId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.table},children:s,$$slots:{default:!0}})}e.pop()}function Ar(t,r){e.push(r,!0);const n=Re(()=>r.valueId,()=>r.store),s=e.derived(()=>""+(n.current??"")),d=e.derived(()=>r.debugIds?`${r.valueId}:{${e.get(s)}}`:e.get(s));e.next();var u=e.text();e.template_effect(()=>e.set_text(u,e.get(d))),e.append(t,u),e.pop()}function Dr(t,r){e.push(r,!0);const n=ke(()=>r.store);{const s=(t,n=e.noop)=>{Ar(t,{get valueId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};hr(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.value},children:s,$$slots:{default:!0}})}e.pop()}export{mr as BackwardCheckpointsView,vr as CellView,Ir as CheckpointView,xr as CurrentCheckpointView,_r as ForwardCheckpointsView,$r as IndexView,kr as LinkedRowsView,qr as LocalRowsView,Rr as MetricView,Cr as Provider,Lr as RemoteRowView,Br as ResultCellView,Vr as ResultRowView,Sr as ResultSortedTableView,zr as ResultTableView,wr as RowView,yr as SliceView,Fr as SortedTableView,Pr as TableView,jr as TablesView,Ar as ValueView,Dr as ValuesView,ct as createGoBackwardCallback,gt as createGoForwardCallback,we as getCell,xe as getCellIds,ot as getCheckpoint,ut as getCheckpointIds,st as getCheckpoints,dt as getCheckpointsIds,Pe as getIndexIds,De as getIndexStoreTableId,ze as getIndexes,Fe as getIndexesIds,rt as getLinkedRowIds,tt as getLocalRowIds,Se as getMetric,Ve as getMetricIds,Le as getMetrics,Be as getMetricsIds,it as getPersister,at as getPersisterIds,pt as getPersisterStatus,He as getQueries,Me as getQueriesIds,Oe as getQueryIds,Ze as getRelationshipIds,Xe as getRelationships,Ye as getRelationshipsIds,nt as getRelationshipsStoreTableIds,et as getRemoteRowId,Ue as getResultCell,Ne as getResultCellIds,Ke as getResultRow,Ee as getResultRowCount,Ge as getResultRowIds,Je as getResultSortedRowIds,Qe as getResultTable,We as getResultTableCellIds,ve as getRow,fe as getRowCount,be as getRowIds,je as getSliceIds,Ae as getSliceRowIds,he as getSortedRowIds,Ce as getStore,Te as getStoreIds,lt as getSynchronizer,It as getSynchronizerIds,ft as getSynchronizerStatus,pe as getTable,le as getTableCellIds,ie as getTableIds,ge as getTables,Re as getValue,ke as getValueIds,$e as getValues,_e as hasCell,me as hasRow,ae as hasTable,Ie as hasTableCell,ce as hasTables,qe as hasValue,ye as hasValues,Lt as onCell,Ct as onCellIds,rr as onCheckpoint,tr as onCheckpointIds,At as onDidFinishTransaction,Tt as onHasCell,qt as onHasRow,vt as onHasTable,wt as onHasTableCell,bt as onHasTables,zt as onHasValue,Bt as onHasValues,Wt as onLinkedRowIds,Qt as onLocalRowIds,Dt as onMetric,er as onParamValue,Zt as onParamValues,nr as onPersisterStatus,Ot as onRemoteRowId,Yt as onResultCell,Xt as onResultCellIds,Ut as onResultRow,Jt as onResultRowCount,Kt as onResultRowIds,Nt as onResultSortedRowIds,Et as onResultTable,Gt as onResultTableCellIds,Rt as onRow,yt as onRowCount,$t as onRowIds,Ht as onSliceIds,Mt as onSliceRowIds,kt as onSortedRowIds,Pt as onStartTransaction,sr as onSynchronizerStatus,xt as onTable,_t as onTableCellIds,mt as onTableIds,ht as onTables,Ft as onValue,St as onValueIds,Vt as onValues,jt as onWillFinishTransaction,ar as provideCheckpoints,cr as provideIndexes,or as provideMetrics,pr as providePersister,ir as provideQueries,gr as provideRelationships,ur as provideStore,lr as provideSynchronizer,ne as resolveCheckpoints,ee as resolveIndexes,Z as resolveMetrics,se as resolvePersister,re as resolveQueries,te as resolveRelationships,Y as resolveStore,de as resolveSynchronizer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinybase",
3
- "version": "8.3.0-beta.1",
3
+ "version": "8.3.0-beta.3",
4
4
  "author": "jamesgpearce",
5
5
  "repository": "github:tinyplex/tinybase",
6
6
  "license": "MIT",
@@ -22,8 +22,8 @@
22
22
  "sideEffects": false,
23
23
  "peerDependencies": {
24
24
  "@automerge/automerge-repo": "^2.5.5",
25
- "@cloudflare/workers-types": "^4.20260426.1",
26
- "@electric-sql/pglite": "^0.4.4",
25
+ "@cloudflare/workers-types": "^4.20260506.1",
26
+ "@electric-sql/pglite": "^0.4.5",
27
27
  "@libsql/client": "^0.17.3",
28
28
  "@powersync/common": "^1.52.0",
29
29
  "@sinclair/typebox": "^0.34.49",
@@ -33,21 +33,22 @@
33
33
  "bun": "^1.3.13",
34
34
  "effect": "^3.21.2",
35
35
  "electric-sql": "^0.12.1",
36
- "expo": "^55.0.17",
36
+ "expo": "^55.0.23",
37
37
  "expo-sqlite": "^55.0.15",
38
38
  "partykit": "^0.0.115",
39
39
  "partysocket": "^1.1.18",
40
40
  "postgres": "^3.4.9",
41
- "react": "^19.2.5",
42
- "react-dom": "^19.2.5",
41
+ "react": "^19.2.6",
42
+ "react-dom": "^19.2.6",
43
43
  "react-native-mmkv": "4.3.1",
44
44
  "react-native-sqlite-storage": "^6.0.1",
45
+ "solid-js": "^1.9.12",
45
46
  "sqlite3": "^5.1.7",
46
47
  "svelte": "^5.55.5",
47
- "valibot": "^1.3.1",
48
+ "valibot": "^1.4.0",
48
49
  "ws": "^8.20.0",
49
50
  "yjs": "^13.6.30",
50
- "zod": "^4.3.6"
51
+ "zod": "^4.4.3"
51
52
  },
52
53
  "peerDependenciesMeta": {
53
54
  "@automerge/automerge-repo": {
@@ -113,6 +114,9 @@
113
114
  "react-native-mmkv": {
114
115
  "optional": true
115
116
  },
117
+ "solid-js": {
118
+ "optional": true
119
+ },
116
120
  "sqlite3": {
117
121
  "optional": true
118
122
  },
@@ -442,6 +446,12 @@
442
446
  "ui-react/with-schemas": [
443
447
  "./@types/ui-react/with-schemas/index.d.ts"
444
448
  ],
449
+ "ui-solid": [
450
+ "./@types/ui-solid/index.d.ts"
451
+ ],
452
+ "ui-solid/with-schemas": [
453
+ "./@types/ui-solid/with-schemas/index.d.ts"
454
+ ],
445
455
  "ui-svelte-dom": [
446
456
  "./@types/ui-svelte-dom/index.d.ts"
447
457
  ],
@@ -766,6 +776,12 @@
766
776
  "min/ui-react/with-schemas": [
767
777
  "./@types/ui-react/with-schemas/index.d.ts"
768
778
  ],
779
+ "min/ui-solid": [
780
+ "./@types/ui-solid/index.d.ts"
781
+ ],
782
+ "min/ui-solid/with-schemas": [
783
+ "./@types/ui-solid/with-schemas/index.d.ts"
784
+ ],
769
785
  "min/ui-svelte-dom": [
770
786
  "./@types/ui-svelte-dom/index.d.ts"
771
787
  ],
@@ -1399,6 +1415,18 @@
1399
1415
  "default": "./ui-react/index.js"
1400
1416
  }
1401
1417
  },
1418
+ "./ui-solid": {
1419
+ "default": {
1420
+ "types": "./@types/ui-solid/index.d.ts",
1421
+ "default": "./ui-solid/index.js"
1422
+ }
1423
+ },
1424
+ "./ui-solid/with-schemas": {
1425
+ "default": {
1426
+ "types": "./@types/ui-solid/with-schemas/index.d.ts",
1427
+ "default": "./ui-solid/index.js"
1428
+ }
1429
+ },
1402
1430
  "./ui-svelte-dom": {
1403
1431
  "default": {
1404
1432
  "types": "./@types/ui-svelte-dom/index.d.ts",
@@ -2047,6 +2075,18 @@
2047
2075
  "default": "./min/ui-react/index.js"
2048
2076
  }
2049
2077
  },
2078
+ "./min/ui-solid": {
2079
+ "default": {
2080
+ "types": "./@types/ui-solid/index.d.ts",
2081
+ "default": "./min/ui-solid/index.js"
2082
+ }
2083
+ },
2084
+ "./min/ui-solid/with-schemas": {
2085
+ "default": {
2086
+ "types": "./@types/ui-solid/with-schemas/index.d.ts",
2087
+ "default": "./min/ui-solid/index.js"
2088
+ }
2089
+ },
2050
2090
  "./min/ui-svelte-dom": {
2051
2091
  "default": {
2052
2092
  "types": "./@types/ui-svelte-dom/index.d.ts",
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/svelte.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/browser.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/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/bun.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/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://beta.tinybase.org/zod.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/typebox.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/valibot.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/arktype.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/yup.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/effect.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=Vitest&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/inspector.webp"><link rel="preload" as="image" href="https://github.com/fastrepl.png?size=48"><link rel="preload" as="image" href="https://github.com/ComputelessComputer.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/expo.png?size=48"><link rel="preload" as="image" href="https://github.com/braden-w.png?size=48"><link rel="preload" as="image" href="https://github.com/dylmye.png?size=48"><link rel="preload" as="image" href="https://github.com/gonza224.png?size=48"><link rel="preload" as="image" href="https://github.com/cpojer.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/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://synclets.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 &amp; <span><em>sync</em> engine</span></h2></section><p><a href="https://beta.tinybase.org/guides/releases/#v8-2"><em>NEW!</em> v8.2 release</a></p><p><span id="one-with">&quot;The one with Svelte Components!&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/the-essentials/creating-stores/store/">Read the docs</a></p><hr><section><h2 id="let-s-build-local-first-apps">Let&#x27;s build <em>local-first</em> apps</h2><p>Create a todo list, a chat app, a drawing tool, or a tic-tac-toe game - with sync &amp; persistence! - in less than 60 seconds.</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/svelte.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/browser.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/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/bun.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/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://beta.tinybase.org/zod.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/typebox.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/valibot.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/arktype.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/yup.svg?asImg"><link rel="preload" as="image" href="https://beta.tinybase.org/effect.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=Vitest&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/inspector.webp"><link rel="preload" as="image" href="https://github.com/fastrepl.png?size=48"><link rel="preload" as="image" href="https://github.com/ComputelessComputer.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/expo.png?size=48"><link rel="preload" as="image" href="https://github.com/braden-w.png?size=48"><link rel="preload" as="image" href="https://github.com/dylmye.png?size=48"><link rel="preload" as="image" href="https://github.com/gonza224.png?size=48"><link rel="preload" as="image" href="https://github.com/cpojer.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/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://synclets.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 &amp; <span><em>sync</em> engine</span></h2></section><p><a href="https://beta.tinybase.org/guides/releases/#v8-3"><em>NEW!</em> v8.3 release</a></p><p><span id="one-with">&quot;The one with Solid!&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/the-essentials/creating-stores/store/">Read the docs</a></p><hr><section><h2 id="let-s-build-local-first-apps">Let&#x27;s build <em>local-first</em> apps</h2><p>Create a todo list, a chat app, a drawing tool, or a tic-tac-toe game - with sync &amp; persistence! - in less than 60 seconds.</p></section>
2
2
 
3
3
  ```bash
4
4
  > npm create tinybase@latest
@@ -6,7 +6,7 @@
6
6
  📦 Creating your project...
7
7
  ```
8
8
 
9
- <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">6.2kB - 13.2kB</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-with-react/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/guides/building-uis-with-svelte/getting-started-with-ui-svelte"><img src="https://beta.tinybase.org/svelte.svg?asImg" width="48"> Svelte</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/api/persister-browser"><img src="https://beta.tinybase.org/browser.svg?asImg" width="48"> OPFS</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/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/bun.svg?asImg" width="48"> Bun 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/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><div><a href="https://beta.tinybase.org/api/schematizer-zod/functions/creation/createzodschematizer"><img src="https://beta.tinybase.org/zod.svg?asImg" width="48"> Zod</a></div><div><a href="https://beta.tinybase.org/api/schematizer-typebox/functions/creation/createtypeboxschematizer"><img src="https://beta.tinybase.org/typebox.svg?asImg" width="48"> TypeBox</a></div><div><a href="https://beta.tinybase.org/api/schematizer-valibot/functions/creation/createvalibotschematizer"><img src="https://beta.tinybase.org/valibot.svg?asImg" width="48"> Valibot</a></div><div><a href="https://beta.tinybase.org/api/schematizer-arktype/functions/creation/createarktypeschematizer"><img src="https://beta.tinybase.org/arktype.svg?asImg" width="48"> ArkType</a></div><div><a href="https://beta.tinybase.org/api/schematizer-yup/functions/creation/createyupschematizer"><img src="https://beta.tinybase.org/yup.svg?asImg" width="48"> Yup</a></div><div><a href="https://beta.tinybase.org/api/schematizer-effect/functions/creation/createeffectschematizer"><img src="https://beta.tinybase.org/effect.svg?asImg" width="48"> Effect</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=Vitest&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%2387c305"> </a><a href="https://www.npmjs.com/package/tinybase/v/8.3.0-beta.0" 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/the-essentials/creating-stores/store/"><code>Store</code></a> requires just a simple call to the <a href="https://beta.tinybase.org/api/the-essentials/creating-stores/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>
9
+ <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">6.2kB - 13.7kB</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-with-react/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/guides/building-uis-with-svelte/getting-started-with-ui-svelte"><img src="https://beta.tinybase.org/svelte.svg?asImg" width="48"> Svelte</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/api/persister-browser"><img src="https://beta.tinybase.org/browser.svg?asImg" width="48"> OPFS</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/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/bun.svg?asImg" width="48"> Bun 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/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><div><a href="https://beta.tinybase.org/api/schematizer-zod/functions/creation/createzodschematizer"><img src="https://beta.tinybase.org/zod.svg?asImg" width="48"> Zod</a></div><div><a href="https://beta.tinybase.org/api/schematizer-typebox/functions/creation/createtypeboxschematizer"><img src="https://beta.tinybase.org/typebox.svg?asImg" width="48"> TypeBox</a></div><div><a href="https://beta.tinybase.org/api/schematizer-valibot/functions/creation/createvalibotschematizer"><img src="https://beta.tinybase.org/valibot.svg?asImg" width="48"> Valibot</a></div><div><a href="https://beta.tinybase.org/api/schematizer-arktype/functions/creation/createarktypeschematizer"><img src="https://beta.tinybase.org/arktype.svg?asImg" width="48"> ArkType</a></div><div><a href="https://beta.tinybase.org/api/schematizer-yup/functions/creation/createyupschematizer"><img src="https://beta.tinybase.org/yup.svg?asImg" width="48"> Yup</a></div><div><a href="https://beta.tinybase.org/api/schematizer-effect/functions/creation/createeffectschematizer"><img src="https://beta.tinybase.org/effect.svg?asImg" width="48"> Effect</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=Vitest&amp;logoColor=%23fff&amp;color=%23333&amp;labelColor=%2387c305"> </a><a href="https://www.npmjs.com/package/tinybase/v/8.3.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/the-essentials/creating-stores/store/"><code>Store</code></a> requires just a simple call to the <a href="https://beta.tinybase.org/api/the-essentials/creating-stores/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>
10
10
 
11
11
  ```js
12
12
  import {createStore} from 'tinybase';
@@ -283,4 +283,4 @@ console.log(store.getCell('pets', 'felix', 'sold'));
283
283
  // -> false
284
284
  ```
285
285
 
286
- <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>6.2kB</em> to your app. Incrementally add the other modules as you need more functionality, or get it all for <em>13.2kB</em>.</p><p>The optional <a href="https://beta.tinybase.org/api/ui-react/"><code>ui-react</code></a> module is just <em>5.6kB</em>, the ui-react-dom components are another <em>4.0kB</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>6.2kB</td><td>65.5kB</td></tr><tr><th class="right">tinybase (complete)</th><td>13.2kB</td><td>142.7kB</td></tr><tr><th class="right"><a href="https://beta.tinybase.org/api/ui-react/">ui-react</a></th><td>5.6kB</td><td>60.7kB</td></tr><tr><th class="right"><a href="https://beta.tinybase.org/api/ui-react-dom/">ui-react-dom</a></th><td>4.0kB</td><td>36.7kB</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 <a href="https://beta.tinybase.org/api/">API</a> 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>3,602</td><td>3,602</td><td>100.0%</td></tr><tr><th class="right">Statements</th><td>3,902</td><td>3,902</td><td>100.0%</td></tr><tr><th class="right">[Functions](/api/store/functions/)</th><td>1,735</td><td>1,735</td><td>100.0%</td></tr><tr><th class="right">Branches</th><td>1,161</td><td>1,161</td><td>100.0%</td></tr><tr><th class="right">Tests</th><td colspan="3">7,946</td></tr><tr><th class="right">Assertions</th><td colspan="3">34,024</td></tr></tbody></table></div><hr><section id="sponsors"><h2 id="proud-to-be-supported-by">Proud to be supported by:</h2><a href="https://github.com/fastrepl" target="_blank"><img src="https://github.com/fastrepl.png?size=48" title="fastrepl" width="48" height="48"></a><a href="https://github.com/ComputelessComputer" target="_blank"><img src="https://github.com/ComputelessComputer.png?size=48" title="ComputelessComputer" 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/expo" target="_blank"><img src="https://github.com/expo.png?size=48" title="expo" width="48" height="48"></a><a href="https://github.com/braden-w" target="_blank"><img src="https://github.com/braden-w.png?size=48" title="braden-w" width="48" height="48"></a><a href="https://github.com/dylmye" target="_blank"><img src="https://github.com/dylmye.png?size=48" title="dylmye" width="48" height="48"></a><a href="https://github.com/gonza224" target="_blank"><img src="https://github.com/gonza224.png?size=48" title="gonza224" 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/beekeeb" target="_blank"><img src="https://github.com/beekeeb.png?size=48" title="beekeeb" 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/the-essentials/creating-stores/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><a href="https://synclets.org" target="_blank"><img src="https://synclets.org/favicon.svg?asImg" width="48"><br><b>Synclets</b></a><br>An open, storage-agnostic, sync engine development kit.</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](/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>
286
+ <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>6.2kB</em> to your app. Incrementally add the other modules as you need more functionality, or get it all for <em>13.7kB</em>.</p><p>The optional <a href="https://beta.tinybase.org/api/ui-react/"><code>ui-react</code></a> module is just <em>5.6kB</em>, the ui-react-dom components are another <em>4.0kB</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>6.2kB</td><td>65.5kB</td></tr><tr><th class="right">tinybase (complete)</th><td>13.7kB</td><td>150.2kB</td></tr><tr><th class="right"><a href="https://beta.tinybase.org/api/ui-react/">ui-react</a></th><td>5.6kB</td><td>60.7kB</td></tr><tr><th class="right"><a href="https://beta.tinybase.org/api/ui-react-dom/">ui-react-dom</a></th><td>4.0kB</td><td>36.7kB</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 <a href="https://beta.tinybase.org/api/">API</a> 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>4,400</td><td>4,400</td><td>100.0%</td></tr><tr><th class="right">Statements</th><td>4,779</td><td>4,779</td><td>100.0%</td></tr><tr><th class="right">[Functions](/api/checkpoints/functions/)</th><td>2,143</td><td>2,143</td><td>100.0%</td></tr><tr><th class="right">Branches</th><td>1,357</td><td>1,357</td><td>100.0%</td></tr><tr><th class="right">Tests</th><td colspan="3">8,414</td></tr><tr><th class="right">Assertions</th><td colspan="3">35,263</td></tr></tbody></table></div><hr><section id="sponsors"><h2 id="proud-to-be-supported-by">Proud to be supported by:</h2><a href="https://github.com/fastrepl" target="_blank"><img src="https://github.com/fastrepl.png?size=48" title="fastrepl" width="48" height="48"></a><a href="https://github.com/ComputelessComputer" target="_blank"><img src="https://github.com/ComputelessComputer.png?size=48" title="ComputelessComputer" 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/expo" target="_blank"><img src="https://github.com/expo.png?size=48" title="expo" width="48" height="48"></a><a href="https://github.com/braden-w" target="_blank"><img src="https://github.com/braden-w.png?size=48" title="braden-w" width="48" height="48"></a><a href="https://github.com/dylmye" target="_blank"><img src="https://github.com/dylmye.png?size=48" title="dylmye" width="48" height="48"></a><a href="https://github.com/gonza224" target="_blank"><img src="https://github.com/gonza224.png?size=48" title="gonza224" 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/beekeeb" target="_blank"><img src="https://github.com/beekeeb.png?size=48" title="beekeeb" 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/the-essentials/creating-stores/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><a href="https://synclets.org" target="_blank"><img src="https://synclets.org/favicon.svg?asImg" width="48"><br><b>Synclets</b></a><br>An open, storage-agnostic, sync engine development kit.</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](/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>