tinybase 8.1.0-beta.0 → 8.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/ui-svelte/index.d.ts +2248 -0
- package/@types/ui-svelte/with-schemas/index.d.ts +1552 -0
- package/min/ui-svelte/index.js +1 -0
- package/min/ui-svelte/index.js.gz +0 -0
- package/min/ui-svelte/with-schemas/index.js +1 -0
- package/min/ui-svelte/with-schemas/index.js.gz +0 -0
- package/package.json +42 -2
- package/readme.md +14 -14
- package/releases.md +70 -44
- package/ui-svelte/index.js +2015 -0
- package/ui-svelte/with-schemas/index.js +2015 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"svelte/internal/disclose-version";import*as e from"svelte/internal/client";import{getContext as t,setContext as r}from"svelte";const n=e=>typeof e,s=n(""),d="Listener",u="Result",o="Ids",g="Table",i=g+"s",c=g+o,p="Row",a=p+"Count",l=p+o,I="Sorted"+p+o,f="Cell",h=f+o,b="Value",v=b+"s",m=b+o,x="Status",_="Metric",y="Slice",w="Checkpoint",k=e=>void 0===e,q=(C=k,(e,t,r)=>C(e)?r?.():t(e));var C;const R=e=>n(e)==s,L=Object.keys,$=(e,t)=>q(e,e=>e[t]),B="tinybase_uisc",V=[],S={},T=[V,void 0,V],z=e=>"function"==typeof e?e():e,j=()=>t(B)??[],A=(e,t,r)=>k(t)||R(t)?k(t)?e[2*r]:$(e[2*r+1],t):t,F=(e,t)=>A(j(),e,t),H=(e,t)=>{const r=j();return()=>A(r,"function"==typeof t?t():t,e)},M=(e,t)=>L(e[2*t+1]??S),O=e=>H(0,e),Q=e=>H(1,e),D=e=>H(2,e),E=e=>H(3,e),G=e=>H(4,e),J=e=>H(5,e),K=(t,r,n,s,d)=>{let u=e.state(e.proxy(t()?.[r]?.(...d())??s));return e.user_effect(()=>{const o=t(),g=d();e.set(u,o?.[r]?.(...g)??s,!0);const i=o?.[n]?.(...g,()=>{e.set(u,o[r](...d())??s,!0)});return()=>o?.delListener?.(i)}),{get current(){return e.get(u)}}},N=(e,t,r,n=()=>V)=>K(e,"get"+t,"add"+t+d,r,n),P=(e,t,r=()=>V)=>K(e,"has"+t,"addHas"+t+d,!1,r),U=e=>P(O(e),i),W=e=>N(O(e),i,S),X=e=>N(O(e),c,V),Y=(e,t)=>P(O(t),g,()=>[z(e)]),Z=(e,t)=>N(O(t),g,S,()=>[z(e)]),ee=(e,t)=>N(O(t),g+h,V,()=>[z(e)]),te=(e,t,r)=>P(O(r),g+f,()=>[z(e),z(t)]),re=(e,t)=>N(O(t),a,0,()=>[z(e)]),ne=(e,t)=>N(O(t),l,V,()=>[z(e)]),se=(e,t,r=!1,n=0,s,d)=>N(O(d),I,V,()=>[z(e),z(t),z(r),z(n),z(s)]),de=(e,t,r)=>P(O(r),p,()=>[z(e),z(t)]),ue=(e,t,r)=>N(O(r),p,S,()=>[z(e),z(t)]),oe=(e,t,r)=>N(O(r),h,V,()=>[z(e),z(t)]),ge=(e,t,r,n)=>P(O(n),f,()=>[z(e),z(t),z(r)]),ie=(e,t,r,n)=>N(O(n),f,void 0,()=>[z(e),z(t),z(r)]),ce=(t,r,n,s)=>{const d=O(s);let u=e.state(e.proxy(d()?.getCell(z(t),z(r),z(n))));return e.user_effect(()=>{const s=d(),o=z(t),g=z(r),i=z(n);e.set(u,s?.getCell(o,g,i),!0);const c=s?.addCellListener(o,g,i,s=>{e.set(u,s.getCell(z(t),z(r),z(n)),!0)});return()=>s?.delListener?.(c)}),{get current(){return e.get(u)},set current(e){d()?.setCell(z(t),z(r),z(n),e)}}},pe=e=>P(O(e),v),ae=e=>N(O(e),v,S),le=e=>N(O(e),m,V),Ie=(e,t)=>P(O(t),b,()=>[z(e)]),fe=(e,t)=>N(O(t),b,void 0,()=>[z(e)]),he=(t,r)=>{const n=O(r);let s=e.state(e.proxy(n()?.getValue(z(t))));return e.user_effect(()=>{const r=n(),d=z(t);e.set(s,r?.getValue(d),!0);const u=r?.addValueListener(d,r=>{e.set(s,r.getValue(z(t)),!0)});return()=>r?.delListener?.(u)}),{get current(){return e.get(s)},set current(e){n()?.setValue(z(t),e)}}},be=e=>F(e,0),ve=()=>{const t=j();let r=e.state(e.proxy(M(t,0)));return e.user_effect(()=>{e.set(r,M(t,0),!0)}),{get current(){return e.get(r)}}},me=e=>F(e,1),xe=()=>{const t=j();let r=e.state(e.proxy(M(t,1)));return e.user_effect(()=>{e.set(r,M(t,1),!0)}),{get current(){return e.get(r)}}},_e=e=>N(Q(e),_+o,V),ye=(e,t)=>N(Q(t),_,void 0,()=>[z(e)]),we=e=>F(e,2),ke=()=>{const t=j();let r=e.state(e.proxy(M(t,2)));return e.user_effect(()=>{e.set(r,M(t,2),!0)}),{get current(){return e.get(r)}}},qe=e=>N(D(e),"Index"+o,V),Ce=(e,t)=>N(D(t),y+o,V,()=>[z(e)]),Re=(e,t,r)=>N(D(r),y+l,V,()=>[z(e),z(t)]),Le=e=>F(e,4),$e=()=>{const t=j();let r=e.state(e.proxy(M(t,4)));return e.user_effect(()=>{e.set(r,M(t,4),!0)}),{get current(){return e.get(r)}}},Be=e=>N(G(e),"Query"+o,V),Ve=(e,t)=>N(G(t),u+g,S,()=>[z(e)]),Se=(e,t)=>N(G(t),u+g+h,V,()=>[z(e)]),Te=(e,t)=>N(G(t),u+a,0,()=>[z(e)]),ze=(e,t)=>N(G(t),u+l,V,()=>[z(e)]),je=(e,t,r=!1,n=0,s,d)=>N(G(d),u+I,V,()=>[z(e),z(t),z(r),z(n),z(s)]),Ae=(e,t,r)=>N(G(r),u+p,S,()=>[z(e),z(t)]),Fe=(e,t,r)=>N(G(r),u+h,V,()=>[z(e),z(t)]),He=(e,t,r,n)=>N(G(n),u+f,void 0,()=>[z(e),z(t),z(r)]),Me=e=>F(e,3),Oe=()=>{const t=j();let r=e.state(e.proxy(M(t,3)));return e.user_effect(()=>{e.set(r,M(t,3),!0)}),{get current(){return e.get(r)}}},Qe=e=>N(E(e),"Relationship"+o,V),De=(e,t,r)=>N(E(r),"RemoteRowId",void 0,()=>[z(e),z(t)]),Ee=(e,t,r)=>N(E(r),"Local"+l,V,()=>[z(e),z(t)]),Ge=(e,t,r)=>N(E(r),"Linked"+l,V,()=>[z(e),z(t)]),Je=e=>F(e,5),Ke=()=>{const t=j();let r=e.state(e.proxy(M(t,5)));return e.user_effect(()=>{e.set(r,M(t,5),!0)}),{get current(){return e.get(r)}}},Ne=e=>N(J(e),w+o,T),Pe=(e,t)=>N(J(t),w,void 0,()=>[z(e)]),Ue=e=>{const t=J(e);return()=>t()?.goBackward()},We=e=>{const t=J(e);return()=>t()?.goForward()},Xe=e=>F(e,6),Ye=()=>{const t=j();let r=e.state(e.proxy(M(t,6)));return e.user_effect(()=>{e.set(r,M(t,6),!0)}),{get current(){return e.get(r)}}},Ze=e=>N(H(6,e),x,0),et=e=>F(e,7),tt=()=>{const t=j();let r=e.state(e.proxy(M(t,7)));return e.user_effect(()=>{e.set(r,M(t,7),!0)}),{get current(){return e.get(r)}}},rt=e=>N(H(7,e),x,0),nt=(t,r,n)=>{const s=j();e.user_effect(()=>(s[16]?.(t,r,n),()=>s[17]?.(t,r)))},st=(e,t)=>nt(0,e,t),dt=(e,t)=>nt(1,e,t),ut=(e,t)=>nt(2,e,t),ot=(e,t)=>nt(3,e,t),gt=(e,t)=>nt(4,e,t),it=(e,t)=>nt(5,e,t),ct=(e,t)=>nt(6,e,t),pt=(e,t)=>nt(7,e,t);function at(t,r){e.push(r,!0);const n=Pe(()=>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 lt=e.from_html("<!><!>",1),It=e.from_html("<!><!><!>",1);function ft(t,r){var n=It(),s=e.first_child(n),d=t=>{var n=e.text();e.template_effect(()=>e.set_text(n,(r.id??"")+":{")),e.append(t,n)};e.if(s,e=>{r.debugIds&&void 0!==r.id&&e(d)});var u=e.sibling(s);e.each(u,17,()=>r.ids,e.index,(t,n,s)=>{var d=lt(),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,e=>{s>0&&r.separator&&e(o)});var g=e.sibling(u),i=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.custom,()=>e.get(n)),e.append(t,s)},c=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.children,()=>e.get(n)),e.append(t,s)};e.if(g,e=>{r.custom?e(i):e(c,-1)}),e.append(t,d)});var o=e.sibling(u),g=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)};e.if(o,e=>{r.debugIds&&void 0!==r.id&&e(g)}),e.append(t,n)}function ht(t,r){e.push(r,!0);const n=Ne(()=>r.checkpoints),s=e.derived(()=>n.current[0]);{const n=(t,n=e.noop)=>{at(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};ft(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n})}e.pop()}function bt(t,r){e.push(r,!0);const n=ie(()=>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 vt(t,r){e.push(r,!0);const n=Ne(()=>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=>{at(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)};e.if(u,t=>{void 0!==e.get(s)&&t(o)}),e.append(t,d),e.pop()}function mt(t,r){e.push(r,!0);const n=Ne(()=>r.checkpoints),s=e.derived(()=>n.current[2]);{const n=(t,n=e.noop)=>{at(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};ft(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n})}e.pop()}function xt(t,r){e.push(r,!0);const n=oe(()=>r.tableId,()=>r.rowId,()=>r.store),s=e.derived(()=>r.customCellIds??n.current);{const n=(t,n=e.noop)=>{bt(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}})};ft(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})}e.pop()}function _t(r,n){e.push(n,!0);const s=t(B)??[],d=e.derived(()=>R(n.indexes)?$(s[5],n.indexes):n.indexes??s[4]),u=e.derived(()=>e.get(d)?.getStore()),o=e.derived(()=>e.get(d)?.getTableId(n.indexId)),g=Re(()=>n.indexId,()=>n.sliceId,()=>n.indexes);{const t=(t,r=e.noop)=>{var s=e.comment(),d=e.first_child(s),g=t=>{xt(t,{get tableId(){return e.get(o)},get rowId(){return r()},get store(){return e.get(u)},get debugIds(){return n.debugIds}})};e.if(d,t=>{e.get(o)&&t(g)}),e.append(t,s)};ft(r,{get ids(){return g.current},get separator(){return n.separator},get debugIds(){return n.debugIds},get id(){return n.sliceId},get custom(){return n.row},children:t})}e.pop()}function yt(t,r){e.push(r,!0);const n=Ce(()=>r.indexId,()=>r.indexes);{const s=(t,n=e.noop)=>{_t(t,{get indexId(){return r.indexId},get sliceId(){return n()},get indexes(){return r.indexes},get debugIds(){return r.debugIds}})};ft(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})}e.pop()}function wt(r,n){e.push(n,!0);const s=t(B)??[],d=e.derived(()=>R(n.relationships)?$(s[7],n.relationships):n.relationships??s[6]),u=e.derived(()=>e.get(d)?.getStore()),o=e.derived(()=>e.get(d)?.getLocalTableId(n.relationshipId)),g=Ge(()=>n.relationshipId,()=>n.firstRowId,()=>n.relationships);{const t=(t,r=e.noop)=>{var s=e.comment(),d=e.first_child(s),g=t=>{xt(t,{get tableId(){return e.get(o)},get rowId(){return r()},get store(){return e.get(u)},get debugIds(){return n.debugIds}})};e.if(d,t=>{e.get(o)&&t(g)}),e.append(t,s)};ft(r,{get ids(){return g.current},get separator(){return n.separator},get debugIds(){return n.debugIds},get id(){return n.firstRowId},get custom(){return n.row},children:t})}e.pop()}function kt(r,n){e.push(n,!0);const s=t(B)??[],d=e.derived(()=>R(n.relationships)?$(s[7],n.relationships):n.relationships??s[6]),u=e.derived(()=>e.get(d)?.getStore()),o=e.derived(()=>e.get(d)?.getLocalTableId(n.relationshipId)),g=Ee(()=>n.relationshipId,()=>n.remoteRowId,()=>n.relationships);{const t=(t,r=e.noop)=>{var s=e.comment(),d=e.first_child(s),g=t=>{xt(t,{get tableId(){return e.get(o)},get rowId(){return r()},get store(){return e.get(u)},get debugIds(){return n.debugIds}})};e.if(d,t=>{e.get(o)&&t(g)}),e.append(t,s)};ft(r,{get ids(){return g.current},get separator(){return n.separator},get debugIds(){return n.debugIds},get id(){return n.remoteRowId},get custom(){return n.row},children:t})}e.pop()}function qt(t,r){e.push(r,!0);const n=ye(()=>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 Ct(n,s){e.push(s,!0);const d=t(B)??[];let u=e.proxy(Array.from({length:8},()=>({})));const o=(e,t,r)=>{u[e]={...u[e],[t]:r}},g=(e,t)=>{const{[t]:r,...n}=u[e];u[e]=n};r(B,{get 0(){return s.store??d[0]},get 1(){return{...d[1]??{},...s.storesById,...u[0]}},get 2(){return s.metrics??d[2]},get 3(){return{...d[3]??{},...s.metricsById,...u[1]}},get 4(){return s.indexes??d[4]},get 5(){return{...d[5]??{},...s.indexesById,...u[2]}},get 6(){return s.relationships??d[6]},get 7(){return{...d[7]??{},...s.relationshipsById,...u[3]}},get 8(){return s.queries??d[8]},get 9(){return{...d[9]??{},...s.queriesById,...u[4]}},get 10(){return s.checkpoints??d[10]},get 11(){return{...d[11]??{},...s.checkpointsById,...u[5]}},get 12(){return s.persister??d[12]},get 13(){return{...d[13]??{},...s.persistersById,...u[6]}},get 14(){return s.synchronizer??d[14]},get 15(){return{...d[15]??{},...s.synchronizersById,...u[7]}},get 16(){return o},get 17(){return g}});var i=e.comment(),c=e.first_child(i);e.snippet(c,()=>s.children),e.append(n,i),e.pop()}var Rt=e.from_html("<!><!><!>",1);function Lt(r,n){e.push(n,!0);const s=t(B)??[],d=e.derived(()=>R(n.relationships)?$(s[7],n.relationships):n.relationships??s[6]),u=e.derived(()=>e.get(d)?.getStore()),o=e.derived(()=>e.get(d)?.getRemoteTableId(n.relationshipId)),g=De(()=>n.relationshipId,()=>n.localRowId,()=>n.relationships);var i=Rt(),c=e.first_child(i),p=t=>{var r=e.text();e.template_effect(()=>e.set_text(r,(n.localRowId??"")+":{")),e.append(t,r)};e.if(c,e=>{n.debugIds&&e(p)});var a=e.sibling(c),l=t=>{var r=e.comment(),s=e.first_child(r),d=t=>{var r=e.comment(),s=e.first_child(r);e.snippet(s,()=>n.row,()=>g.current),e.append(t,r)},i=t=>{xt(t,{get tableId(){return e.get(o)},get rowId(){return g.current},get store(){return e.get(u)},get debugIds(){return n.debugIds}})};e.if(s,t=>{n.row?t(d):e.get(o)&&t(i,1)}),e.append(t,r)};e.if(a,e=>{void 0!==g.current&&e(l)});var I=e.sibling(a),f=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)};e.if(I,e=>{n.debugIds&&e(f)}),e.append(r,i),e.pop()}function $t(t,r){e.push(r,!0);const n=He(()=>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 Bt(t,r){e.push(r,!0);const n=Fe(()=>r.queryId,()=>r.rowId,()=>r.queries);{const s=(t,n=e.noop)=>{$t(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}})};ft(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})}e.pop()}function Vt(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)=>{Bt(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};ft(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})}e.pop()}function St(t,r){e.push(r,!0);const n=ze(()=>r.queryId,()=>r.queries);{const s=(t,n=e.noop)=>{Bt(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};ft(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})}e.pop()}function Tt(t,r){e.push(r,!0);const n=se(()=>r.tableId,()=>r.cellId,()=>r.descending??!1,()=>r.offset??0,()=>r.limit,()=>r.store);{const s=(t,n=e.noop)=>{xt(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}})};ft(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})}e.pop()}function zt(t,r){e.push(r,!0);const n=ne(()=>r.tableId,()=>r.store);{const s=(t,n=e.noop)=>{xt(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}})};ft(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})}e.pop()}function jt(t,r){e.push(r,!0);const n=X(()=>r.store);{const s=(t,n=e.noop)=>{zt(t,{get tableId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};ft(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.table},children:s})}e.pop()}function At(t,r){e.push(r,!0);const n=fe(()=>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 Ft(t,r){e.push(r,!0);const n=le(()=>r.store);{const s=(t,n=e.noop)=>{At(t,{get valueId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};ft(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.value},children:s})}e.pop()}export{ht as BackwardCheckpointsView,bt as CellView,at as CheckpointView,vt as CurrentCheckpointView,mt as ForwardCheckpointsView,yt as IndexView,wt as LinkedRowsView,kt as LocalRowsView,qt as MetricView,Ct as Provider,Lt as RemoteRowView,$t as ResultCellView,Bt as ResultRowView,Vt as ResultSortedTableView,St as ResultTableView,xt as RowView,_t as SliceView,Tt as SortedTableView,zt as TableView,jt as TablesView,At as ValueView,Ft as ValuesView,it as provideCheckpoints,ut as provideIndexes,dt as provideMetrics,ct as providePersister,gt as provideQueries,ot as provideRelationships,st as provideStore,pt as provideSynchronizer,ie as useCell,oe as useCellIds,ce as useCellState,Pe as useCheckpoint,Ne as useCheckpointIds,Je as useCheckpoints,Ke as useCheckpointsIds,Ue as useGoBackwardCallback,We as useGoForwardCallback,ge as useHasCell,de as useHasRow,Y as useHasTable,te as useHasTableCell,U as useHasTables,Ie as useHasValue,pe as useHasValues,qe as useIndexIds,we as useIndexes,ke as useIndexesIds,Ge as useLinkedRowIds,Ee as useLocalRowIds,ye as useMetric,_e as useMetricIds,me as useMetrics,xe as useMetricsIds,Xe as usePersister,Ye as usePersisterIds,Ze as usePersisterStatus,Le as useQueries,$e as useQueriesIds,Be as useQueryIds,Qe as useRelationshipIds,Me as useRelationships,Oe as useRelationshipsIds,De as useRemoteRowId,He as useResultCell,Fe as useResultCellIds,Ae as useResultRow,Te as useResultRowCount,ze as useResultRowIds,je as useResultSortedRowIds,Ve as useResultTable,Se as useResultTableCellIds,ue as useRow,re as useRowCount,ne as useRowIds,Ce as useSliceIds,Re as useSliceRowIds,se as useSortedRowIds,be as useStore,ve as useStoreIds,et as useSynchronizer,tt as useSynchronizerIds,rt as useSynchronizerStatus,Z as useTable,ee as useTableCellIds,X as useTableIds,W as useTables,fe as useValue,le as useValueIds,he as useValueState,ae as useValues};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"svelte/internal/disclose-version";import*as e from"svelte/internal/client";import{getContext as t,setContext as r}from"svelte";const n=e=>typeof e,s=n(""),d="Listener",u="Result",o="Ids",g="Table",i=g+"s",c=g+o,p="Row",a=p+"Count",l=p+o,I="Sorted"+p+o,f="Cell",h=f+o,b="Value",v=b+"s",m=b+o,x="Status",_="Metric",y="Slice",w="Checkpoint",k=e=>void 0===e,q=(C=k,(e,t,r)=>C(e)?r?.():t(e));var C;const R=e=>n(e)==s,L=Object.keys,$=(e,t)=>q(e,e=>e[t]),B="tinybase_uisc",V=[],S={},T=[V,void 0,V],z=e=>"function"==typeof e?e():e,j=()=>t(B)??[],A=(e,t,r)=>k(t)||R(t)?k(t)?e[2*r]:$(e[2*r+1],t):t,F=(e,t)=>A(j(),e,t),H=(e,t)=>{const r=j();return()=>A(r,"function"==typeof t?t():t,e)},M=(e,t)=>L(e[2*t+1]??S),O=e=>H(0,e),Q=e=>H(1,e),D=e=>H(2,e),E=e=>H(3,e),G=e=>H(4,e),J=e=>H(5,e),K=(t,r,n,s,d)=>{let u=e.state(e.proxy(t()?.[r]?.(...d())??s));return e.user_effect(()=>{const o=t(),g=d();e.set(u,o?.[r]?.(...g)??s,!0);const i=o?.[n]?.(...g,()=>{e.set(u,o[r](...d())??s,!0)});return()=>o?.delListener?.(i)}),{get current(){return e.get(u)}}},N=(e,t,r,n=()=>V)=>K(e,"get"+t,"add"+t+d,r,n),P=(e,t,r=()=>V)=>K(e,"has"+t,"addHas"+t+d,!1,r),U=e=>P(O(e),i),W=e=>N(O(e),i,S),X=e=>N(O(e),c,V),Y=(e,t)=>P(O(t),g,()=>[z(e)]),Z=(e,t)=>N(O(t),g,S,()=>[z(e)]),ee=(e,t)=>N(O(t),g+h,V,()=>[z(e)]),te=(e,t,r)=>P(O(r),g+f,()=>[z(e),z(t)]),re=(e,t)=>N(O(t),a,0,()=>[z(e)]),ne=(e,t)=>N(O(t),l,V,()=>[z(e)]),se=(e,t,r=!1,n=0,s,d)=>N(O(d),I,V,()=>[z(e),z(t),z(r),z(n),z(s)]),de=(e,t,r)=>P(O(r),p,()=>[z(e),z(t)]),ue=(e,t,r)=>N(O(r),p,S,()=>[z(e),z(t)]),oe=(e,t,r)=>N(O(r),h,V,()=>[z(e),z(t)]),ge=(e,t,r,n)=>P(O(n),f,()=>[z(e),z(t),z(r)]),ie=(e,t,r,n)=>N(O(n),f,void 0,()=>[z(e),z(t),z(r)]),ce=(t,r,n,s)=>{const d=O(s);let u=e.state(e.proxy(d()?.getCell(z(t),z(r),z(n))));return e.user_effect(()=>{const s=d(),o=z(t),g=z(r),i=z(n);e.set(u,s?.getCell(o,g,i),!0);const c=s?.addCellListener(o,g,i,s=>{e.set(u,s.getCell(z(t),z(r),z(n)),!0)});return()=>s?.delListener?.(c)}),{get current(){return e.get(u)},set current(e){d()?.setCell(z(t),z(r),z(n),e)}}},pe=e=>P(O(e),v),ae=e=>N(O(e),v,S),le=e=>N(O(e),m,V),Ie=(e,t)=>P(O(t),b,()=>[z(e)]),fe=(e,t)=>N(O(t),b,void 0,()=>[z(e)]),he=(t,r)=>{const n=O(r);let s=e.state(e.proxy(n()?.getValue(z(t))));return e.user_effect(()=>{const r=n(),d=z(t);e.set(s,r?.getValue(d),!0);const u=r?.addValueListener(d,r=>{e.set(s,r.getValue(z(t)),!0)});return()=>r?.delListener?.(u)}),{get current(){return e.get(s)},set current(e){n()?.setValue(z(t),e)}}},be=e=>F(e,0),ve=()=>{const t=j();let r=e.state(e.proxy(M(t,0)));return e.user_effect(()=>{e.set(r,M(t,0),!0)}),{get current(){return e.get(r)}}},me=e=>F(e,1),xe=()=>{const t=j();let r=e.state(e.proxy(M(t,1)));return e.user_effect(()=>{e.set(r,M(t,1),!0)}),{get current(){return e.get(r)}}},_e=e=>N(Q(e),_+o,V),ye=(e,t)=>N(Q(t),_,void 0,()=>[z(e)]),we=e=>F(e,2),ke=()=>{const t=j();let r=e.state(e.proxy(M(t,2)));return e.user_effect(()=>{e.set(r,M(t,2),!0)}),{get current(){return e.get(r)}}},qe=e=>N(D(e),"Index"+o,V),Ce=(e,t)=>N(D(t),y+o,V,()=>[z(e)]),Re=(e,t,r)=>N(D(r),y+l,V,()=>[z(e),z(t)]),Le=e=>F(e,4),$e=()=>{const t=j();let r=e.state(e.proxy(M(t,4)));return e.user_effect(()=>{e.set(r,M(t,4),!0)}),{get current(){return e.get(r)}}},Be=e=>N(G(e),"Query"+o,V),Ve=(e,t)=>N(G(t),u+g,S,()=>[z(e)]),Se=(e,t)=>N(G(t),u+g+h,V,()=>[z(e)]),Te=(e,t)=>N(G(t),u+a,0,()=>[z(e)]),ze=(e,t)=>N(G(t),u+l,V,()=>[z(e)]),je=(e,t,r=!1,n=0,s,d)=>N(G(d),u+I,V,()=>[z(e),z(t),z(r),z(n),z(s)]),Ae=(e,t,r)=>N(G(r),u+p,S,()=>[z(e),z(t)]),Fe=(e,t,r)=>N(G(r),u+h,V,()=>[z(e),z(t)]),He=(e,t,r,n)=>N(G(n),u+f,void 0,()=>[z(e),z(t),z(r)]),Me=e=>F(e,3),Oe=()=>{const t=j();let r=e.state(e.proxy(M(t,3)));return e.user_effect(()=>{e.set(r,M(t,3),!0)}),{get current(){return e.get(r)}}},Qe=e=>N(E(e),"Relationship"+o,V),De=(e,t,r)=>N(E(r),"RemoteRowId",void 0,()=>[z(e),z(t)]),Ee=(e,t,r)=>N(E(r),"Local"+l,V,()=>[z(e),z(t)]),Ge=(e,t,r)=>N(E(r),"Linked"+l,V,()=>[z(e),z(t)]),Je=e=>F(e,5),Ke=()=>{const t=j();let r=e.state(e.proxy(M(t,5)));return e.user_effect(()=>{e.set(r,M(t,5),!0)}),{get current(){return e.get(r)}}},Ne=e=>N(J(e),w+o,T),Pe=(e,t)=>N(J(t),w,void 0,()=>[z(e)]),Ue=e=>{const t=J(e);return()=>t()?.goBackward()},We=e=>{const t=J(e);return()=>t()?.goForward()},Xe=e=>F(e,6),Ye=()=>{const t=j();let r=e.state(e.proxy(M(t,6)));return e.user_effect(()=>{e.set(r,M(t,6),!0)}),{get current(){return e.get(r)}}},Ze=e=>N(H(6,e),x,0),et=e=>F(e,7),tt=()=>{const t=j();let r=e.state(e.proxy(M(t,7)));return e.user_effect(()=>{e.set(r,M(t,7),!0)}),{get current(){return e.get(r)}}},rt=e=>N(H(7,e),x,0),nt=(t,r,n)=>{const s=j();e.user_effect(()=>(s[16]?.(t,r,n),()=>s[17]?.(t,r)))},st=(e,t)=>nt(0,e,t),dt=(e,t)=>nt(1,e,t),ut=(e,t)=>nt(2,e,t),ot=(e,t)=>nt(3,e,t),gt=(e,t)=>nt(4,e,t),it=(e,t)=>nt(5,e,t),ct=(e,t)=>nt(6,e,t),pt=(e,t)=>nt(7,e,t);function at(t,r){e.push(r,!0);const n=Pe(()=>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 lt=e.from_html("<!><!>",1),It=e.from_html("<!><!><!>",1);function ft(t,r){var n=It(),s=e.first_child(n),d=t=>{var n=e.text();e.template_effect(()=>e.set_text(n,(r.id??"")+":{")),e.append(t,n)};e.if(s,e=>{r.debugIds&&void 0!==r.id&&e(d)});var u=e.sibling(s);e.each(u,17,()=>r.ids,e.index,(t,n,s)=>{var d=lt(),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,e=>{s>0&&r.separator&&e(o)});var g=e.sibling(u),i=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.custom,()=>e.get(n)),e.append(t,s)},c=t=>{var s=e.comment(),d=e.first_child(s);e.snippet(d,()=>r.children,()=>e.get(n)),e.append(t,s)};e.if(g,e=>{r.custom?e(i):e(c,-1)}),e.append(t,d)});var o=e.sibling(u),g=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)};e.if(o,e=>{r.debugIds&&void 0!==r.id&&e(g)}),e.append(t,n)}function ht(t,r){e.push(r,!0);const n=Ne(()=>r.checkpoints),s=e.derived(()=>n.current[0]);{const n=(t,n=e.noop)=>{at(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};ft(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n})}e.pop()}function bt(t,r){e.push(r,!0);const n=ie(()=>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 vt(t,r){e.push(r,!0);const n=Ne(()=>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=>{at(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)};e.if(u,t=>{void 0!==e.get(s)&&t(o)}),e.append(t,d),e.pop()}function mt(t,r){e.push(r,!0);const n=Ne(()=>r.checkpoints),s=e.derived(()=>n.current[2]);{const n=(t,n=e.noop)=>{at(t,{get checkpointId(){return n()},get checkpoints(){return r.checkpoints},get debugIds(){return r.debugIds}})};ft(t,{get ids(){return e.get(s)},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.checkpoint},children:n})}e.pop()}function xt(t,r){e.push(r,!0);const n=oe(()=>r.tableId,()=>r.rowId,()=>r.store),s=e.derived(()=>r.customCellIds??n.current);{const n=(t,n=e.noop)=>{bt(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}})};ft(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})}e.pop()}function _t(r,n){e.push(n,!0);const s=t(B)??[],d=e.derived(()=>R(n.indexes)?$(s[5],n.indexes):n.indexes??s[4]),u=e.derived(()=>e.get(d)?.getStore()),o=e.derived(()=>e.get(d)?.getTableId(n.indexId)),g=Re(()=>n.indexId,()=>n.sliceId,()=>n.indexes);{const t=(t,r=e.noop)=>{var s=e.comment(),d=e.first_child(s),g=t=>{xt(t,{get tableId(){return e.get(o)},get rowId(){return r()},get store(){return e.get(u)},get debugIds(){return n.debugIds}})};e.if(d,t=>{e.get(o)&&t(g)}),e.append(t,s)};ft(r,{get ids(){return g.current},get separator(){return n.separator},get debugIds(){return n.debugIds},get id(){return n.sliceId},get custom(){return n.row},children:t})}e.pop()}function yt(t,r){e.push(r,!0);const n=Ce(()=>r.indexId,()=>r.indexes);{const s=(t,n=e.noop)=>{_t(t,{get indexId(){return r.indexId},get sliceId(){return n()},get indexes(){return r.indexes},get debugIds(){return r.debugIds}})};ft(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})}e.pop()}function wt(r,n){e.push(n,!0);const s=t(B)??[],d=e.derived(()=>R(n.relationships)?$(s[7],n.relationships):n.relationships??s[6]),u=e.derived(()=>e.get(d)?.getStore()),o=e.derived(()=>e.get(d)?.getLocalTableId(n.relationshipId)),g=Ge(()=>n.relationshipId,()=>n.firstRowId,()=>n.relationships);{const t=(t,r=e.noop)=>{var s=e.comment(),d=e.first_child(s),g=t=>{xt(t,{get tableId(){return e.get(o)},get rowId(){return r()},get store(){return e.get(u)},get debugIds(){return n.debugIds}})};e.if(d,t=>{e.get(o)&&t(g)}),e.append(t,s)};ft(r,{get ids(){return g.current},get separator(){return n.separator},get debugIds(){return n.debugIds},get id(){return n.firstRowId},get custom(){return n.row},children:t})}e.pop()}function kt(r,n){e.push(n,!0);const s=t(B)??[],d=e.derived(()=>R(n.relationships)?$(s[7],n.relationships):n.relationships??s[6]),u=e.derived(()=>e.get(d)?.getStore()),o=e.derived(()=>e.get(d)?.getLocalTableId(n.relationshipId)),g=Ee(()=>n.relationshipId,()=>n.remoteRowId,()=>n.relationships);{const t=(t,r=e.noop)=>{var s=e.comment(),d=e.first_child(s),g=t=>{xt(t,{get tableId(){return e.get(o)},get rowId(){return r()},get store(){return e.get(u)},get debugIds(){return n.debugIds}})};e.if(d,t=>{e.get(o)&&t(g)}),e.append(t,s)};ft(r,{get ids(){return g.current},get separator(){return n.separator},get debugIds(){return n.debugIds},get id(){return n.remoteRowId},get custom(){return n.row},children:t})}e.pop()}function qt(t,r){e.push(r,!0);const n=ye(()=>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 Ct(n,s){e.push(s,!0);const d=t(B)??[];let u=e.proxy(Array.from({length:8},()=>({})));const o=(e,t,r)=>{u[e]={...u[e],[t]:r}},g=(e,t)=>{const{[t]:r,...n}=u[e];u[e]=n};r(B,{get 0(){return s.store??d[0]},get 1(){return{...d[1]??{},...s.storesById,...u[0]}},get 2(){return s.metrics??d[2]},get 3(){return{...d[3]??{},...s.metricsById,...u[1]}},get 4(){return s.indexes??d[4]},get 5(){return{...d[5]??{},...s.indexesById,...u[2]}},get 6(){return s.relationships??d[6]},get 7(){return{...d[7]??{},...s.relationshipsById,...u[3]}},get 8(){return s.queries??d[8]},get 9(){return{...d[9]??{},...s.queriesById,...u[4]}},get 10(){return s.checkpoints??d[10]},get 11(){return{...d[11]??{},...s.checkpointsById,...u[5]}},get 12(){return s.persister??d[12]},get 13(){return{...d[13]??{},...s.persistersById,...u[6]}},get 14(){return s.synchronizer??d[14]},get 15(){return{...d[15]??{},...s.synchronizersById,...u[7]}},get 16(){return o},get 17(){return g}});var i=e.comment(),c=e.first_child(i);e.snippet(c,()=>s.children),e.append(n,i),e.pop()}var Rt=e.from_html("<!><!><!>",1);function Lt(r,n){e.push(n,!0);const s=t(B)??[],d=e.derived(()=>R(n.relationships)?$(s[7],n.relationships):n.relationships??s[6]),u=e.derived(()=>e.get(d)?.getStore()),o=e.derived(()=>e.get(d)?.getRemoteTableId(n.relationshipId)),g=De(()=>n.relationshipId,()=>n.localRowId,()=>n.relationships);var i=Rt(),c=e.first_child(i),p=t=>{var r=e.text();e.template_effect(()=>e.set_text(r,(n.localRowId??"")+":{")),e.append(t,r)};e.if(c,e=>{n.debugIds&&e(p)});var a=e.sibling(c),l=t=>{var r=e.comment(),s=e.first_child(r),d=t=>{var r=e.comment(),s=e.first_child(r);e.snippet(s,()=>n.row,()=>g.current),e.append(t,r)},i=t=>{xt(t,{get tableId(){return e.get(o)},get rowId(){return g.current},get store(){return e.get(u)},get debugIds(){return n.debugIds}})};e.if(s,t=>{n.row?t(d):e.get(o)&&t(i,1)}),e.append(t,r)};e.if(a,e=>{void 0!==g.current&&e(l)});var I=e.sibling(a),f=t=>{var r=e.text();r.nodeValue="}",e.append(t,r)};e.if(I,e=>{n.debugIds&&e(f)}),e.append(r,i),e.pop()}function $t(t,r){e.push(r,!0);const n=He(()=>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 Bt(t,r){e.push(r,!0);const n=Fe(()=>r.queryId,()=>r.rowId,()=>r.queries);{const s=(t,n=e.noop)=>{$t(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}})};ft(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})}e.pop()}function Vt(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)=>{Bt(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};ft(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})}e.pop()}function St(t,r){e.push(r,!0);const n=ze(()=>r.queryId,()=>r.queries);{const s=(t,n=e.noop)=>{Bt(t,{get queryId(){return r.queryId},get rowId(){return n()},get queries(){return r.queries},get debugIds(){return r.debugIds}})};ft(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})}e.pop()}function Tt(t,r){e.push(r,!0);const n=se(()=>r.tableId,()=>r.cellId,()=>r.descending??!1,()=>r.offset??0,()=>r.limit,()=>r.store);{const s=(t,n=e.noop)=>{xt(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}})};ft(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})}e.pop()}function zt(t,r){e.push(r,!0);const n=ne(()=>r.tableId,()=>r.store);{const s=(t,n=e.noop)=>{xt(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}})};ft(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})}e.pop()}function jt(t,r){e.push(r,!0);const n=X(()=>r.store);{const s=(t,n=e.noop)=>{zt(t,{get tableId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};ft(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.table},children:s})}e.pop()}function At(t,r){e.push(r,!0);const n=fe(()=>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 Ft(t,r){e.push(r,!0);const n=le(()=>r.store);{const s=(t,n=e.noop)=>{At(t,{get valueId(){return n()},get store(){return r.store},get debugIds(){return r.debugIds}})};ft(t,{get ids(){return n.current},get separator(){return r.separator},get debugIds(){return r.debugIds},get custom(){return r.value},children:s})}e.pop()}export{ht as BackwardCheckpointsView,bt as CellView,at as CheckpointView,vt as CurrentCheckpointView,mt as ForwardCheckpointsView,yt as IndexView,wt as LinkedRowsView,kt as LocalRowsView,qt as MetricView,Ct as Provider,Lt as RemoteRowView,$t as ResultCellView,Bt as ResultRowView,Vt as ResultSortedTableView,St as ResultTableView,xt as RowView,_t as SliceView,Tt as SortedTableView,zt as TableView,jt as TablesView,At as ValueView,Ft as ValuesView,it as provideCheckpoints,ut as provideIndexes,dt as provideMetrics,ct as providePersister,gt as provideQueries,ot as provideRelationships,st as provideStore,pt as provideSynchronizer,ie as useCell,oe as useCellIds,ce as useCellState,Pe as useCheckpoint,Ne as useCheckpointIds,Je as useCheckpoints,Ke as useCheckpointsIds,Ue as useGoBackwardCallback,We as useGoForwardCallback,ge as useHasCell,de as useHasRow,Y as useHasTable,te as useHasTableCell,U as useHasTables,Ie as useHasValue,pe as useHasValues,qe as useIndexIds,we as useIndexes,ke as useIndexesIds,Ge as useLinkedRowIds,Ee as useLocalRowIds,ye as useMetric,_e as useMetricIds,me as useMetrics,xe as useMetricsIds,Xe as usePersister,Ye as usePersisterIds,Ze as usePersisterStatus,Le as useQueries,$e as useQueriesIds,Be as useQueryIds,Qe as useRelationshipIds,Me as useRelationships,Oe as useRelationshipsIds,De as useRemoteRowId,He as useResultCell,Fe as useResultCellIds,Ae as useResultRow,Te as useResultRowCount,ze as useResultRowIds,je as useResultSortedRowIds,Ve as useResultTable,Se as useResultTableCellIds,ue as useRow,re as useRowCount,ne as useRowIds,Ce as useSliceIds,Re as useSliceRowIds,se as useSortedRowIds,be as useStore,ve as useStoreIds,et as useSynchronizer,tt as useSynchronizerIds,rt as useSynchronizerStatus,Z as useTable,ee as useTableCellIds,X as useTableIds,W as useTables,fe as useValue,le as useValueIds,he as useValueState,ae as useValues};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinybase",
|
|
3
|
-
"version": "8.1.0-beta.
|
|
3
|
+
"version": "8.1.0-beta.1",
|
|
4
4
|
"author": "jamesgpearce",
|
|
5
5
|
"repository": "github:tinyplex/tinybase",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@automerge/automerge-repo": "^2.5.3",
|
|
25
|
-
"@cloudflare/workers-types": "^4.
|
|
25
|
+
"@cloudflare/workers-types": "^4.20260307.1",
|
|
26
26
|
"@electric-sql/pglite": "^0.3.15",
|
|
27
27
|
"@libsql/client": "^0.17.0",
|
|
28
28
|
"@powersync/common": "^1.48.0",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"react-native-mmkv": "4.2.0",
|
|
44
44
|
"react-native-sqlite-storage": "^6.0.1",
|
|
45
45
|
"sqlite3": "^5.1.7",
|
|
46
|
+
"svelte": "^5.53.8",
|
|
46
47
|
"valibot": "^1.2.0",
|
|
47
48
|
"ws": "^8.19.0",
|
|
48
49
|
"yjs": "^13.6.29",
|
|
@@ -115,6 +116,9 @@
|
|
|
115
116
|
"sqlite3": {
|
|
116
117
|
"optional": true
|
|
117
118
|
},
|
|
119
|
+
"svelte": {
|
|
120
|
+
"optional": true
|
|
121
|
+
},
|
|
118
122
|
"valibot": {
|
|
119
123
|
"optional": true
|
|
120
124
|
},
|
|
@@ -438,6 +442,12 @@
|
|
|
438
442
|
"ui-react/with-schemas": [
|
|
439
443
|
"./@types/ui-react/with-schemas/index.d.ts"
|
|
440
444
|
],
|
|
445
|
+
"ui-svelte": [
|
|
446
|
+
"./@types/ui-svelte/index.d.ts"
|
|
447
|
+
],
|
|
448
|
+
"ui-svelte/with-schemas": [
|
|
449
|
+
"./@types/ui-svelte/with-schemas/index.d.ts"
|
|
450
|
+
],
|
|
441
451
|
"min": [
|
|
442
452
|
"./@types/index.d.ts"
|
|
443
453
|
],
|
|
@@ -743,6 +753,12 @@
|
|
|
743
753
|
],
|
|
744
754
|
"min/ui-react/with-schemas": [
|
|
745
755
|
"./@types/ui-react/with-schemas/index.d.ts"
|
|
756
|
+
],
|
|
757
|
+
"min/ui-svelte": [
|
|
758
|
+
"./@types/ui-svelte/index.d.ts"
|
|
759
|
+
],
|
|
760
|
+
"min/ui-svelte/with-schemas": [
|
|
761
|
+
"./@types/ui-svelte/with-schemas/index.d.ts"
|
|
746
762
|
]
|
|
747
763
|
}
|
|
748
764
|
},
|
|
@@ -1359,6 +1375,18 @@
|
|
|
1359
1375
|
"default": "./ui-react/index.js"
|
|
1360
1376
|
}
|
|
1361
1377
|
},
|
|
1378
|
+
"./ui-svelte": {
|
|
1379
|
+
"default": {
|
|
1380
|
+
"types": "./@types/ui-svelte/index.d.ts",
|
|
1381
|
+
"default": "./ui-svelte/index.js"
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
"./ui-svelte/with-schemas": {
|
|
1385
|
+
"default": {
|
|
1386
|
+
"types": "./@types/ui-svelte/with-schemas/index.d.ts",
|
|
1387
|
+
"default": "./ui-svelte/index.js"
|
|
1388
|
+
}
|
|
1389
|
+
},
|
|
1362
1390
|
"./min": {
|
|
1363
1391
|
"default": {
|
|
1364
1392
|
"types": "./@types/index.d.ts",
|
|
@@ -1970,6 +1998,18 @@
|
|
|
1970
1998
|
"types": "./@types/ui-react/with-schemas/index.d.ts",
|
|
1971
1999
|
"default": "./min/ui-react/index.js"
|
|
1972
2000
|
}
|
|
2001
|
+
},
|
|
2002
|
+
"./min/ui-svelte": {
|
|
2003
|
+
"default": {
|
|
2004
|
+
"types": "./@types/ui-svelte/index.d.ts",
|
|
2005
|
+
"default": "./min/ui-svelte/index.js"
|
|
2006
|
+
}
|
|
2007
|
+
},
|
|
2008
|
+
"./min/ui-svelte/with-schemas": {
|
|
2009
|
+
"default": {
|
|
2010
|
+
"types": "./@types/ui-svelte/with-schemas/index.d.ts",
|
|
2011
|
+
"default": "./min/ui-svelte/index.js"
|
|
2012
|
+
}
|
|
1973
2013
|
}
|
|
1974
2014
|
}
|
|
1975
2015
|
}
|