tinybase 9.3.0-beta.1 → 9.3.0
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-react-dom/index.d.ts +10 -10
- package/@types/ui-react-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-react-dom-charts/index.d.ts +7 -7
- package/@types/ui-react-dom-charts/with-schemas/index.d.ts +7 -7
- package/@types/ui-react-inspector/index.d.ts +1 -1
- package/@types/ui-react-inspector/with-schemas/index.d.ts +1 -1
- package/@types/ui-solid-dom/index.d.ts +10 -10
- package/@types/ui-solid-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-solid-inspector/index.d.ts +1 -1
- package/@types/ui-solid-inspector/with-schemas/index.d.ts +1 -1
- package/@types/ui-svelte-dom/index.d.ts +10 -10
- package/@types/ui-svelte-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-svelte-inspector/index.d.ts +1 -1
- package/@types/ui-svelte-inspector/with-schemas/index.d.ts +1 -1
- package/min/omni/index.js +1 -1
- package/min/omni/index.js.gz +0 -0
- package/min/omni/with-schemas/index.js +1 -1
- package/min/omni/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-powersync/index.js +1 -1
- package/min/persisters/persister-powersync/index.js.gz +0 -0
- package/min/persisters/persister-powersync/with-schemas/index.js +1 -1
- package/min/persisters/persister-powersync/with-schemas/index.js.gz +0 -0
- package/omni/index.js +0 -1
- package/omni/with-schemas/index.js +0 -1
- package/package.json +13 -8
- package/persisters/persister-powersync/index.js +0 -1
- package/persisters/persister-powersync/with-schemas/index.js +0 -1
- package/readme.md +1 -1
- package/ui-svelte/index.js +1 -1
- package/ui-svelte/with-schemas/index.js +1 -1
- package/ui-svelte-dom/index.js +2 -2
- package/ui-svelte-dom/with-schemas/index.js +2 -2
- package/ui-svelte-inspector/index.js +2 -2
- package/ui-svelte-inspector/with-schemas/index.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=a=>typeof a,t="tinybase",n="",e=",",s=a(n),i="true",r=(a,t,n)=>a.replace(t,n),o=Promise,c=a=>(t,n,e)=>a(t)?e?.():n(t),l=globalThis,w=a=>null==a,u=a=>void 0===a,y=a=>null===a,d=a=>!0===a,v=c(w),f=c(u),E=t=>a(t)==s,$=a=>Array.isArray(a),N=a=>a.length,m=a=>0==N(a),A=()=>{},_=a=>new o(a),T=async a=>o.all(a),g=(a,t)=>a.forEach(t),h=(a,t="")=>a.join(t),O=(a,t)=>a.map(t),p=(a,t)=>a.filter(t),S=(a,t=N(a))=>a.splice(0,t),I=(a,...t)=>a.push(...t),b=(a,e)=>{throw((a,e)=>Error(t+":"+a+(u(e)?n:":"+e)))(a,e)},R=async(a,t)=>{try{return await a()}catch(a){t?.(a)}},D=(a,t)=>R(a,a=>{R(()=>t?.(a))}),L=async(a,t)=>{try{return await a()}finally{await t()}},C=Object,P=a=>C.getPrototypeOf(a),M=C.entries,F=a=>!w(a)&&v(P(a),a=>a==C.prototype||w(P(a)),()=>!0),x=C.keys,U=C.freeze,B=(...a)=>C.assign(C.create(null),...a),j=(a,t,n)=>(C.defineProperty(a,t,{configurable:!0,enumerable:!0,value:n,writable:!0}),n),k=(a=[])=>{const t=C.create(null);return g(a,([a,n])=>j(t,a,n)),t},q=(a,t)=>(delete a[t],a),G=(a,t)=>g(x(a),n=>t(a[n],n)),J=(a,t)=>O(M(a),([a,n])=>t(n,a)),X=(a,t)=>{const n=k();return G(a,(a,e)=>j(n,e,t(a,e))),n},Y=a=>N(x(a)),z=a=>F(a)&&0==Y(a),H="_",K="_id",V="SELECT",Q="WHERE",W="TABLE",Z="INSERT",aa="UPDATE",ta="ALTER "+W,na="FROM",ea="DELETE "+na,sa=V+"*"+na,ia="pragma_",ra="data_version",oa="schema_version",ca="pragma_table_",la="CREATE "+W,wa=/\$tableName/g,ua=a=>h(O(((a,t="",n)=>a.split(t,n))(a,"."),a=>`"${r(a,/"/g,'""')}"`),"."),ya=(...a)=>h(O(a,ua),e),da=(a,t=[1])=>h(O(a,()=>"$"+t[0]++),e),va=(a,t=i)=>Q+`(${fa(t,ua(a))})`,fa=(a,t)=>r(a,wa,t),Ea=(a,t)=>a?.has(t)??!1,$a=a=>u(a)||0==(a=>a?.size??0)(a),Na=a=>[...a?.values()??[]],ma=a=>a.clear(),Aa=(a,t)=>a?.forEach(t),_a=(a,t)=>a?.delete(t),Ta=Map,ga=a=>new Ta(a),ha=(a,t)=>a?.get(t),Oa=(a,t)=>Aa(a,(a,n)=>t(n,a)),pa=(a,t)=>{const n=[];return Oa(a,(a,e)=>I(n,t(e,a))),n},Sa=(a,t,n)=>u(n)?(_a(a,t),a):a?.set(t,n),Ia=(a,t,n,e)=>{let s=ha(a,t);return Ea(a,t)?e?.(s):Sa(a,t,s=n()),s},ba=(a,t,n,e,s=0)=>f((n?Ia:ha)(a,t[s],s>N(t)-2?n:ga),i=>{if(s>N(t)-2)return e?.(i)&&Sa(a,t[s]),i;const r=ba(i,t,n,e,s+1);return $a(i)&&Sa(a,t[s]),r}),Ra=a=>new Set($(a)||u(a)?a:[a]),Da=(a,t)=>a?.add(t),La="ColumnName",Ca="store",Pa="json",Ma=Ca+"TableName",Fa=Ca+"Id"+La,xa=Ca+La,Ua="autoLoadIntervalSeconds",Ba="rowId"+La,ja="tableId",ka="tableName",qa="deleteEmptyColumns",Ga="deleteEmptyTable",Ja="condition",Xa={mode:Pa,[Ua]:1},Ya={load:0,save:0,[ka]:t+"_values"},za=a=>$(a)?a:void 0,Ha=a=>d(a)||$(a),Ka=(a,t,n,e,s)=>{const i=ga();return G(a,(a,r)=>{const o=(w=B(t,E(a)?{[n]:a}:a),c=C.values(w),l=Y(t),c.slice(0,l));var c,l,w;y(o[0])||e(r,o[0])||(s(r,o[0]),Sa(i,r,o))}),i},Va=JSON.stringify,Qa=JSON.parse,Wa=a=>""===a?void 0:$(a)?O(a,Wa):F(a)?X(a,Wa):a,Za=/^\d+$/,at=ga(),tt=ga(),nt=ga(),et=(a,t,e,s,i,r,o,c={},l=0,w=[])=>{let d,v,E,A,T,h=0,D=0,C=0,P=0,M=0,F=0,x=0,B=0,j=0;const k={},q=c.destroy;Ia(at,w,()=>0),Ia(tt,w,()=>[]),Sa(nt,w,(ha(nt,w)??0)+1);const G=ga(),[J,X,Y,H,K]=((a=1,t,n)=>1!=a&&t.isMergeable()?[1,t.__[1],()=>t.__[2](!n),([[a],[t]])=>!z(a)||!z(t),t.setDefaultContent]:2!=a?[0,t._[7],t._[8],([a,t])=>!z(a)||!z(t),t.setContent]:b(0))(o,a,l),[V,Q,W]=(a=>{let t;const[e,s]=(()=>{const a=[];let t=0;return[e=>(e?a.shift():null)??n+t++,t=>{Za.test(t)&&N(a)<1e3&&I(a,t)}]})(),i=ga(),r=(a,e,s,r)=>{let o,c=!1;if(g(((a,t=[n])=>{const e=[],s=(a,n)=>n==N(t)?I(e,a):y(t[n])?Aa(a,a=>s(a,n+1)):g([t[n],null],t=>s(ha(a,t),n+1));return s(a,0),e})(e,s),n=>Aa(n,n=>{const e=()=>ha(i,n)[0](t,...s??[],...r);a?(a=>{try{return a()}catch(a){(a=>{c||(o=a),c=!0})?.(a)}})(e):e()})),c)throw o};return[(s,r,o,c=[],l=()=>[])=>{t??=a();const w=e(1);return Sa(i,w,[s,r,o,c,l]),Da(ba(r,o??[n],Ra),w),w},(a,t,...n)=>r(!1,a,t,n),a=>f(ha(i,a),([,t,e])=>(ba(t,e??[n],void 0,t=>(_a(t,a),$a(t)?1:0)),Sa(i,a),s(a),e)),a=>f(ha(i,a),([a,,n=[],e,s])=>{const i=(...r)=>{const o=N(r);o==N(n)?a(t,...r,...s(r)):y(n[o])?g(e[o]?.(...r)??[],a=>i(...r,a)):i(...r,n[o])};i()}),(a,t,...n)=>r(!0,a,t,n)]})(()=>va),Z=a=>{a!=h&&(h=a,Q(G,void 0,h))},aa=()=>{ha(nt,w)||ha(at,w)||!m(ha(tt,w)??[])||(Sa(at,w),Sa(tt,w),Sa(nt,w))},ta=t=>{(J&&$(t?.[0])?1===t?.[2]?a.__[4]:a.__[3]:1===t?.[2]?a._[10]:a._[9])(t)},na=async()=>{ua()&&a.__?.[0]?.()&&await ca()},ea=a=>L(()=>v=a,()=>{v==a&&(v=void 0)}),sa=async a=>(2!=h&&(await L(async()=>{Z(1),D++,await da(()=>R(async()=>{const n=await t();$(n)?ta(n):u(n)&&a?K(a):u(n)||b(1,n)},t=>{r?.(t),a&&K(a)}))},()=>Z(0)),await na()),va),ia=async()=>{const a=x;x=0,a&&a==P&&!j&&(2==h?x=a:await sa())},ra=async a=>{const t=++P;let n=!0;if(await oa(!0),t==P&&!j){const e=R(async()=>{const a=await s(async(a,e)=>{if(t==P&&!j)if(e||a){const t=n||2==h||!!F;M++,t&&F++,await L(async()=>{Z(1),D++,await(t?da(()=>ta(e??a)):(()=>{try{return ta(e??a)}finally{Z(0)}})())},()=>{t&&F--,--M||Z(0)}),M||await na()}else 2==h?x=t:await sa()});t!=P||j?u(a)||await i(a):d=a},r);await ea(e),t!=P||j||await L(()=>sa(a),()=>{n=!1})}return va},oa=async(a=!1)=>{x=0,a||P++;const t=v,n=d;return d=void 0,await ea(L(async()=>{await t},async()=>{u(n)||await R(()=>i(n),r)})),va},ca=async a=>(1!=h&&await L(()=>L(async()=>{Z(2),C++,await da(()=>R(()=>e(X,a),r))},()=>Z(0)),ia),va),la=async()=>{const t=++B;return await wa(!0),t!=B||j||(await ca(),t!=B||j||(E=a.addDidFinishTransactionListener(()=>{if(t==B&&!j){const a=Y();H(a)&&R(()=>ca(a))}}))),va},wa=async(t=!1)=>{t||B++;const n=E;return E=void 0,u(n)||a.delListener(n),va},ua=()=>!u(E),ya=async(a=!1)=>{const[t,n]=a?[wa,oa]:[oa,wa];return await L(()=>t(),async()=>{await n()}),va},da=async(...a)=>{let t,n=!1;const e=_(e=>m(a)?e():I(ha(tt,w),...O(a,(s,i)=>{const o=i==N(a)-1;return[async()=>{let a;T=_(t=>a=t),await L(async()=>{try{await R(s,r)}catch(a){n||(n=!0,t=a)}o&&e()},()=>{T=void 0,a()})},o?e:void 0,k]})));if(await(async()=>{if(!ha(at,w)){Sa(at,w,1);const a=ha(tt,w);let t=0;await L(async()=>{for(;t<N(a);){const n=a[t++];n[2]=void 0,await n[0]()}},()=>{S(a,t),Sa(at,w,0),aa()})}})(),await e,n)throw t;return va},va={load:sa,startAutoLoad:ra,stopAutoLoad:oa,isAutoLoading:()=>!u(d),save:ca,startAutoSave:la,stopAutoSave:wa,isAutoSaving:ua,startAutoPersisting:async(a,t=!1)=>{const[n,e]=t?[la,ra]:[ra,la];return await n(a),await e(a),va},stopAutoPersisting:ya,getStatus:()=>h,addStatusListener:a=>V(a,G),delListener:t=>(W(t),a),schedule:da,getStore:()=>a,getStats:()=>({loads:D,saves:C}),...c,destroy:async()=>(u(A)&&(j=1,A=(async()=>{const a=ha(tt,w),t=p(a,([,a,t])=>t!=k||(a?.(),!1)),n=T;S(a),I(a,...t),await L(()=>L(()=>L(ya,()=>n),()=>q?.()),()=>{const a=(ha(nt,w)??1)-1;Sa(nt,w,a||void 0),aa()})})()),await A,va)};return U(va)},st=new l.TextEncoder,it=(a,n,s,r,o=rt,c,l,w)=>{const y=ga(),d=ga();let v=a;return[async()=>{ma(y),ma(d),g(await s(v,n),({tn:a,cn:t,uq:n})=>{Da(Ia(y,a,Ra),t),n&&Da(Ia(d,a,Ra),t)})},async(a,t,n,e)=>{const s=u(e)?void 0:Ra(e);return((a,t)=>Ea(ha(y,a),t))(a,t)?k(p(O(await v(sa+ua(a)+va(a,n)),a=>{const n=a[t],e=l?X(q(a,t),l):q(a,t);return[n,u(s)?e:k(p(J(e,(a,t)=>[t,a]),([a])=>(a=>u(s)||Ea(s,a))(a)))]}),a=>!u(a[0])&&!z(a[1]))):{}},async(a,n,s,l,w,f=!1,E=i,$)=>{const N=u($)?void 0:Ra($),A=a=>u(N)||Ea(N,a),_=Ra();G(s??{},a=>g(p(x(a??{}),A),a=>Da(_,a)));const S=Na(_);if(u(N)&&!f&&w&&E==i&&m(S)&&Ea(y,a))return await v("DROP "+W+ua(a)),Sa(y,a),void Sa(d,a);const b=ha(y,a),R=Ra(p(Na(b),a=>a==n||A(a)));if(!m(S))if(Ea(y,a)){if(await T(O([n,...S],async t=>{_a(R,t)||(await v(ta+ua(a)+"ADD"+ua(t)+r),Da(b,t))})),o==rt&&!Ea(ha(d,a),n)){const e=t+"_pk_"+(a=>{let t=2166136261;return g(st.encode(a),a=>{t^=a,t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24)}),t>>>0})(Va([a,n]));await v("CREATE UNIQUE INDEX IF NOT EXISTS"+ua(e)+"ON"+ua(a)+`(${ua(n)})`),Da(Ia(d,a,Ra),n)}}else await v(la+ua(a)+`(${ua(n)}${r} PRIMARY KEY${h(O(S,a=>e+ua(a)+r))});`),Sa(y,a,Ra([n,...S])),Sa(d,a,Ra([n]));if(await T([...!f&&l?O(Na(R),async t=>{t!=n&&(await v(ta+ua(a)+"DROP"+ua(t)),_a(b,t))}):[]]),f)u(s)?u(N)&&await v(ea+ua(a)+va(a,E)):await T(J(s,async(t,e)=>{if(u(t))await v(ea+ua(a)+va(a,E)+`AND(${ua(n)}=$1)`,[e]);else if(!m(S)){const s=p(x(t),A);m(s)||await o(v,a,n,s,{[e]:O(s,a=>c?c(t[a]):t[a])},b)}}));else if(m(S))u(N)&&Ea(y,a)&&await v(ea+ua(a)+va(a,E));else{const t=p(Na(ha(y,a)),a=>a!=n&&A(a)),e=k(),i=[];G(s??{},(a,n)=>{j(e,n,O(t,t=>c?c(a?.[t]):a?.[t])),I(i,n)}),await o(v,a,n,t,e,b),await v(ea+ua(a)+va(a,E)+`AND${ua(n)}NOT IN(${da(i)})`,i)}},async t=>{if(w)return await w(async a=>{const n=v;return v=a,await L(t,()=>{v=n})});await a("BEGIN");try{const n=await t();return await a("END"),n}catch(t){throw await R(()=>a("ROLLBACK")),t}}]},rt=async(a,t,n,s,i)=>{const r=[1];await a(Z+" INTO"+ua(t)+"("+ya(n,...s)+")VALUES"+h(J(i,a=>"($"+r[0]+++","+da(a,r)+")"),e)+"ON CONFLICT("+ua(n)+`)DO ${aa} SET`+h(O(s,a=>ua(a)+"=excluded."+ua(a)),e),J(i,(a,t)=>[t,...O(a,a=>a??null)]).flat())},ot=(a,t,n,e,s,i,r,[o,c,l],w,y,d,v,f,E,$,N,m)=>{const[A,_,T,g]=it(t,w,y,f,E,void 0,void 0,m);return et(a,()=>g(async()=>{return await A(),a=(await _(o,c))[H]?.[l]??"null",Wa(Qa(a));var a}),a=>g(async()=>{var t;await A(),await T(o,c,{[H]:{[l]:(t=a()??null,Va(t,(a,t)=>u(t)?"":t))}},!0,!0)}),n,e,s,r,{[v]:()=>d,destroy:i},0,d)},ct=(a,t,n,e,s,i,r,[o,c,[l,w,y,d,v]],f,E,$,N,m,A,_,g,h)=>{const[S,I,b,R]=it(t,f,E,m,A,_,g,h),D=(a,t)=>T(pa(c,async([n,e,s,i,r],o)=>{var c,l;t&&(c=a,l=o,!C.hasOwn(c,l))||await b(n,e,a[o],s,i,t,r)})),L=(a,t,n)=>k(1==n?p(J(a,(a,t)=>[t,a]),([a])=>{return n=a,t.includes(n);var n}):p(O(t,t=>[t,a[t]]),([,a])=>!u(a))),P=async(a,t)=>w?await b(y,K,{[H]:u(v)?a:L(a,v,t)},!0,!0,t,void 0,v):null;return et(a,()=>R(async()=>{await S();const a=await(async()=>k(p(await T(pa(o,async([a,t,n],e)=>[a,await I(e,t,n)])),a=>!z(a[1]))))(),t=await(async()=>l?(await I(y,K,void 0,d))[H]:{})();return z(a)&&u(t)?void 0:[a,t]}),(a,t)=>R(async()=>{if(await S(),u(t)){const[t,n]=a();await D(t),await P(n)}else await D(t[0],!0),await P(t[1],!0)}),n,e,s,r,{[N]:()=>$,destroy:i},0,$)},lt=(a,e,s,r,c,l,y,v,f,$,N="getDb",m,A)=>{let _,T,g;const h=((a,t)=>t?async(n,e)=>(t(n,e),await a(n,e)):a)(s,l),[O,p,S,I]=(a=>{const n=(a=>B(Xa,E(a)?{[Ma]:a}:a??{}))(a),e=n[Ua];if(n.mode==Pa){const a=n[Ma]??t;return[1,e,[a,n[Fa]??K,n[xa]??Ca],Ra(a)]}const{tables:{load:s={},save:r={}}={},values:o={}}=n,c=B(Ya,o),{load:l,save:w}=c,u=[Ha(l),Ha(w),c[ka],za(l),za(w)],y=u[2],d=Ra(y),v=Ra(y),f=Ka(s,{[ja]:null,[Ba]:K,[Ja]:i},ja,a=>Ea(v,a),a=>Da(d,a)),$=Ka(r,{[ka]:null,[Ba]:K,[qa]:0,[Ga]:0,[Ja]:null},ka,(a,t)=>Ea(v,t),(a,t)=>Da(d,t));return Oa($,(a,t)=>t[4]??=ha(f,t[0])?.[2]??i),[0,e,[f,$,u],d]})(e);return!O&&a.isMergeable()&&b(0),(O?ot:ct)(a,h,a=>{let t,n,e=1,s=0,i=0;const l=async(t=!0)=>{const[{d:n,s:s,c:r}]=await h(V+` ${ra} d,${oa} s,TOTAL_CHANGES() c FROM ${ia}${ra} JOIN ${ia}${oa}`);if(e&&(n!=_||s!=T||r!=g)){const o=t&&!i&&!w(_);_=n,T=s,g=r,o&&e&&await a()}},d=()=>{u(t)||((a=>{clearInterval(a)})(t),t=void 0)},v=(r=!1)=>{if(n)return n;const o=L(()=>D(async()=>{for(s?r&&await l():(await l(!1),s=1);e&&i;)i=0,await l(!1),e&&(await a(),await l())},y),()=>{n==o&&(n=void 0),e&&(i?v():e&&u(t)&&(t=setInterval(()=>v(!0),1e3*p)))});return n=o,o},f=r(a=>{e&&Ea(I,a)&&(i=1,d(),o.resolve().then(()=>e?void v():0))});return v().then(()=>async()=>{e=0,i=0,d(),await L(async()=>await n,async()=>{_=T=g=null,await c(f)})})},a=>a(),y,v,f,S,Na(I),async(a,t)=>await a(V+` t.name tn,c.name cn,c.pk OR EXISTS(${V} 1 FROM ${ia}index_list(t.name)i,${ia}index_info(i.name)ii ${Q} i."unique"=1 AND ii.name=c.name AND(${V} count(*) FROM ${ia}index_info(i.name))=1)uq FROM ${ca}list()t,${ca}info(t.name)c ${Q} t.schema='main'AND t.type IN('table','view')AND t.name IN(${da(t)})ORDER BY t.name,c.name`,t),$,N,n,m,a=>d(a)?1:(a=>!1===a)(a)?0:a,void 0,A)},wt=(a,t,n,e,s)=>{let i;return lt(a,n,async(a,n=[])=>t.execute(a,n).then(a=>a.rows?._array??[]),a=>{const n=new AbortController,e=t.onChange({rawTableNames:!0,signal:n.signal});return D(async()=>{for await(const a of e)i&&g(a.changedTables,i)},s),i=a,n},a=>{i=void 0,a.abort()},e,s,A,1,t,"getPowerSync",ut)},ut=async(a,t,n,s,i)=>{const r=h(O(s,(a,t)=>ua(a)+"=$"+(t+1)),e);for(const[e,o]of J(i,(a,t)=>[t,a])){const i=O(o,a=>a??null);if(m(await a(aa+ua(t)+" SET"+r+" "+Q+ua(n)+"=$"+(N(o)+1)+" RETURNING"+ua(n),[...i,e]))){const r=[1];await a(Z+" INTO"+ua(t)+"("+ya(n,...s)+")VALUES("+da([e,...o],r)+")",[e,...i])}}};export{wt as createPowerSyncPersister};
|
|
1
|
+
const a=a=>typeof a,t="tinybase",n="",e=",",s=a(n),i="true",r=(a,t,n)=>a.replace(t,n),o=Promise,c=a=>(t,n,e)=>a(t)?e?.():n(t),l=globalThis,w=a=>null==a,u=a=>void 0===a,y=a=>null===a,d=a=>!0===a,v=c(w),f=c(u),E=t=>a(t)==s,$=a=>Array.isArray(a),N=a=>a.length,m=a=>0==N(a),A=()=>{},_=a=>new o(a),g=async a=>o.all(a),T=(a,t)=>a.forEach(t),h=(a,t="")=>a.join(t),O=(a,t)=>a.map(t),p=(a,t)=>a.filter(t),S=(a,t=N(a))=>a.splice(0,t),I=(a,...t)=>a.push(...t),b=(a,e)=>{throw((a,e)=>Error(t+":"+a+(u(e)?n:":"+e)))(a,e)},R=async(a,t)=>{try{return await a()}catch(a){t?.(a)}},D=(a,t)=>R(a,a=>{R(()=>t?.(a))}),L=async(a,t)=>{try{return await a()}finally{await t()}},C=Object,P=a=>C.getPrototypeOf(a),M=C.entries,F=a=>!w(a)&&v(P(a),a=>a==C.prototype||w(P(a)),()=>!0),x=C.keys,U=C.freeze,B=(...a)=>C.assign(C.create(null),...a),j=(a,t,n)=>(C.defineProperty(a,t,{configurable:!0,enumerable:!0,value:n,writable:!0}),n),k=(a=[])=>{const t=C.create(null);return T(a,([a,n])=>j(t,a,n)),t},q=(a,t)=>(delete a[t],a),G=(a,t)=>T(x(a),n=>t(a[n],n)),J=(a,t)=>O(M(a),([a,n])=>t(n,a)),X=(a,t)=>{const n=k();return G(a,(a,e)=>j(n,e,t(a,e))),n},Y=a=>N(x(a)),z=a=>F(a)&&0==Y(a),H="_",K="_id",V="SELECT",Q="WHERE",W="TABLE",Z="INSERT",aa="UPDATE",ta="ALTER "+W,na="FROM",ea="DELETE "+na,sa=V+"*"+na,ia="pragma_",ra="data_version",oa="schema_version",ca="pragma_table_",la="CREATE "+W,wa=/\$tableName/g,ua=a=>h(O(((a,t="",n)=>a.split(t,n))(a,"."),a=>`"${r(a,/"/g,'""')}"`),"."),ya=(...a)=>h(O(a,ua),e),da=(a,t=[1])=>h(O(a,()=>"$"+t[0]++),e),va=(a,t=i)=>Q+`(${fa(t,ua(a))})`,fa=(a,t)=>r(a,wa,t),Ea=(a,t)=>a?.has(t)??!1,$a=a=>u(a)||0==(a=>a?.size??0)(a),Na=a=>[...a?.values()??[]],ma=a=>a.clear(),Aa=(a,t)=>a?.forEach(t),_a=(a,t)=>a?.delete(t),ga=Map,Ta=a=>new ga(a),ha=(a,t)=>a?.get(t),Oa=(a,t)=>Aa(a,(a,n)=>t(n,a)),pa=(a,t)=>{const n=[];return Oa(a,(a,e)=>I(n,t(e,a))),n},Sa=(a,t,n)=>u(n)?(_a(a,t),a):a?.set(t,n),Ia=(a,t,n,e)=>{let s=ha(a,t);return Ea(a,t)?e?.(s):Sa(a,t,s=n()),s},ba=(a,t,n,e,s=0)=>f((n?Ia:ha)(a,t[s],s>N(t)-2?n:Ta),i=>{if(s>N(t)-2)return e?.(i)&&Sa(a,t[s]),i;const r=ba(i,t,n,e,s+1);return $a(i)&&Sa(a,t[s]),r}),Ra=a=>new Set($(a)||u(a)?a:[a]),Da=(a,t)=>a?.add(t),La="ColumnName",Ca="store",Pa="json",Ma=Ca+"TableName",Fa=Ca+"Id"+La,xa=Ca+La,Ua="autoLoadIntervalSeconds",Ba="rowId"+La,ja="tableId",ka="tableName",qa="deleteEmptyColumns",Ga="deleteEmptyTable",Ja="condition",Xa={mode:Pa,[Ua]:1},Ya={load:0,save:0,[ka]:t+"_values"},za=a=>$(a)?a:void 0,Ha=a=>d(a)||$(a),Ka=(a,t,n,e,s)=>{const i=Ta();return G(a,(a,r)=>{const o=(w=B(t,E(a)?{[n]:a}:a),c=C.values(w),l=Y(t),c.slice(0,l));var c,l,w;y(o[0])||e(r,o[0])||(s(r,o[0]),Sa(i,r,o))}),i},Va=JSON.stringify,Qa=JSON.parse,Wa=a=>""===a?void 0:$(a)?O(a,Wa):F(a)?X(a,Wa):a,Za=/^\d+$/,at=Ta(),tt=Ta(),nt=Ta(),et=(a,t,e,s,i,r,o,c={},l=0,w=[])=>{let d,v,E,A,g,h=0,D=0,C=0,P=0,M=0,F=0,x=0,B=0,j=0;const k={},q=c.destroy;Ia(at,w,()=>0),Ia(tt,w,()=>[]),Sa(nt,w,(ha(nt,w)??0)+1);const G=Ta(),[J,X,Y,H,K]=((a=1,t,n)=>1!=a&&t.isMergeable()?[1,t.__[1],()=>t.__[2](!n),([[a],[t]])=>!z(a)||!z(t),t.setDefaultContent]:2!=a?[0,t._[7],t._[8],([a,t])=>!z(a)||!z(t),t.setContent]:b(0))(o,a,l),[V,Q,W]=(a=>{let t;const[e,s]=(()=>{const a=[];let t=0;return[e=>(e?a.shift():null)??n+t++,t=>{Za.test(t)&&N(a)<1e3&&I(a,t)}]})(),i=Ta(),r=(a,e,s,r)=>{let o,c=!1;if(T(((a,t=[n])=>{const e=[],s=(a,n)=>n==N(t)?I(e,a):y(t[n])?Aa(a,a=>s(a,n+1)):T([t[n],null],t=>s(ha(a,t),n+1));return s(a,0),e})(e,s),n=>Aa(n,n=>{const e=()=>ha(i,n)[0](t,...s??[],...r);a?(a=>{try{return a()}catch(a){(a=>{c||(o=a),c=!0})?.(a)}})(e):e()})),c)throw o};return[(s,r,o,c=[],l=()=>[])=>{t??=a();const w=e(1);return Sa(i,w,[s,r,o,c,l]),Da(ba(r,o??[n],Ra),w),w},(a,t,...n)=>r(!1,a,t,n),a=>f(ha(i,a),([,t,e])=>(ba(t,e??[n],void 0,t=>(_a(t,a),$a(t)?1:0)),Sa(i,a),s(a),e)),a=>f(ha(i,a),([a,,n=[],e,s])=>{const i=(...r)=>{const o=N(r);o==N(n)?a(t,...r,...s(r)):y(n[o])?T(e[o]?.(...r)??[],a=>i(...r,a)):i(...r,n[o])};i()}),(a,t,...n)=>r(!0,a,t,n)]})(()=>va),Z=a=>{a!=h&&(h=a,Q(G,void 0,h))},aa=()=>{ha(nt,w)||ha(at,w)||!m(ha(tt,w)??[])||(Sa(at,w),Sa(tt,w),Sa(nt,w))},ta=t=>{(J&&$(t?.[0])?1===t?.[2]?a.__[4]:a.__[3]:1===t?.[2]?a._[10]:a._[9])(t)},na=async()=>{ua()&&a.__?.[0]?.()&&await ca()},ea=a=>L(()=>v=a,()=>{v==a&&(v=void 0)}),sa=async a=>(2!=h&&(await L(async()=>{Z(1),D++,await da(()=>R(async()=>{const n=await t();$(n)?ta(n):u(n)&&a?K(a):u(n)||b(1,n)},t=>{r?.(t),a&&K(a)}))},()=>Z(0)),await na()),va),ia=async()=>{const a=x;x=0,a&&a==P&&!j&&(2==h?x=a:await sa())},ra=async a=>{const t=++P;let n=!0;if(await oa(!0),t==P&&!j){const e=R(async()=>{const a=await s(async(a,e)=>{if(t==P&&!j)if(e||a){const t=n||2==h||!!F;M++,t&&F++,await L(async()=>{Z(1),D++,await(t?da(()=>ta(e??a)):(()=>{try{return ta(e??a)}finally{Z(0)}})())},()=>{t&&F--,--M||Z(0)}),M||await na()}else 2==h?x=t:await sa()});t!=P||j?u(a)||await i(a):d=a},r);await ea(e),t!=P||j||await L(()=>sa(a),()=>{n=!1})}return va},oa=async(a=!1)=>{x=0,a||P++;const t=v,n=d;return d=void 0,await ea(L(async()=>{await t},async()=>{u(n)||await R(()=>i(n),r)})),va},ca=async a=>(1!=h&&await L(()=>L(async()=>{Z(2),C++,await da(()=>R(()=>e(X,a),r))},()=>Z(0)),ia),va),la=async()=>{const t=++B;return await wa(!0),t!=B||j||(await ca(),t!=B||j||(E=a.addDidFinishTransactionListener(()=>{if(t==B&&!j){const a=Y();H(a)&&R(()=>ca(a))}}))),va},wa=async(t=!1)=>{t||B++;const n=E;return E=void 0,u(n)||a.delListener(n),va},ua=()=>!u(E),ya=async(a=!1)=>{const[t,n]=a?[wa,oa]:[oa,wa];return await L(()=>t(),async()=>{await n()}),va},da=async(...a)=>{let t,n=!1;const e=_(e=>m(a)?e():I(ha(tt,w),...O(a,(s,i)=>{const o=i==N(a)-1;return[async()=>{let a;g=_(t=>a=t),await L(async()=>{try{await R(s,r)}catch(a){n||(n=!0,t=a)}o&&e()},()=>{g=void 0,a()})},o?e:void 0,k]})));if(await(async()=>{if(!ha(at,w)){Sa(at,w,1);const a=ha(tt,w);let t=0;await L(async()=>{for(;t<N(a);){const n=a[t++];n[2]=void 0,await n[0]()}},()=>{S(a,t),Sa(at,w,0),aa()})}})(),await e,n)throw t;return va},va={load:sa,startAutoLoad:ra,stopAutoLoad:oa,isAutoLoading:()=>!u(d),save:ca,startAutoSave:la,stopAutoSave:wa,isAutoSaving:ua,startAutoPersisting:async(a,t=!1)=>{const[n,e]=t?[la,ra]:[ra,la];return await n(a),await e(a),va},stopAutoPersisting:ya,getStatus:()=>h,addStatusListener:a=>V(a,G),delListener:t=>(W(t),a),schedule:da,getStore:()=>a,getStats:()=>({loads:D,saves:C}),...c,destroy:async()=>(u(A)&&(j=1,A=(async()=>{const a=ha(tt,w),t=p(a,([,a,t])=>t!=k||(a?.(),!1)),n=g;S(a),I(a,...t),await L(()=>L(()=>L(ya,()=>n),()=>q?.()),()=>{const a=(ha(nt,w)??1)-1;Sa(nt,w,a||void 0),aa()})})()),await A,va)};return U(va)},st=new l.TextEncoder,it=(a,n,s,r,o=rt,c,l,w)=>{const y=Ta(),d=Ta();let v=a;return[async()=>{ma(y),ma(d),T(await s(v,n),({tn:a,cn:t,uq:n})=>{Da(Ia(y,a,Ra),t),n&&Da(Ia(d,a,Ra),t)})},async(a,t,n,e)=>{const s=u(e)?void 0:Ra(e);return((a,t)=>Ea(ha(y,a),t))(a,t)?k(p(O(await v(sa+ua(a)+va(a,n)),a=>{const n=a[t],e=l?X(q(a,t),l):q(a,t);return[n,u(s)?e:k(p(J(e,(a,t)=>[t,a]),([a])=>(a=>u(s)||Ea(s,a))(a)))]}),a=>!u(a[0])&&!z(a[1]))):{}},async(a,n,s,l,w,f=!1,E=i,$)=>{const N=u($)?void 0:Ra($),A=a=>u(N)||Ea(N,a),_=Ra();G(s??{},a=>T(p(x(a??{}),A),a=>Da(_,a)));const S=Na(_);if(u(N)&&!f&&w&&E==i&&m(S)&&Ea(y,a))return await v("DROP "+W+ua(a)),Sa(y,a),void Sa(d,a);const b=ha(y,a),R=Ra(p(Na(b),a=>a==n||A(a)));if(!m(S))if(Ea(y,a)){if(await g(O([n,...S],async t=>{_a(R,t)||(await v(ta+ua(a)+"ADD"+ua(t)+r),Da(b,t))})),o==rt&&!Ea(ha(d,a),n)){const e=t+"_pk_"+(a=>{let t=2166136261;return T(st.encode(a),a=>{t^=a,t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24)}),t>>>0})(Va([a,n]));await v("CREATE UNIQUE INDEX IF NOT EXISTS"+ua(e)+"ON"+ua(a)+`(${ua(n)})`),Da(Ia(d,a,Ra),n)}}else await v(la+ua(a)+`(${ua(n)}${r} PRIMARY KEY${h(O(S,a=>e+ua(a)+r))});`),Sa(y,a,Ra([n,...S])),Sa(d,a,Ra([n]));if(await g([...!f&&l?O(Na(R),async t=>{t!=n&&(await v(ta+ua(a)+"DROP"+ua(t)),_a(b,t))}):[]]),f)u(s)?u(N)&&await v(ea+ua(a)+va(a,E)):await g(J(s,async(t,e)=>{if(u(t))await v(ea+ua(a)+va(a,E)+`AND(${ua(n)}=$1)`,[e]);else if(!m(S)){const s=p(x(t),A);m(s)||await o(v,a,n,s,{[e]:O(s,a=>c?c(t[a]):t[a])},b)}}));else if(m(S))u(N)&&Ea(y,a)&&await v(ea+ua(a)+va(a,E));else{const t=p(Na(ha(y,a)),a=>a!=n&&A(a)),e=k(),i=[];G(s??{},(a,n)=>{j(e,n,O(t,t=>c?c(a?.[t]):a?.[t])),I(i,n)}),await o(v,a,n,t,e,b),await v(ea+ua(a)+va(a,E)+`AND${ua(n)}NOT IN(${da(i)})`,i)}},async t=>{if(w)return await w(async a=>{const n=v;return v=a,await L(t,()=>{v=n})});await a("BEGIN");try{const n=await t();return await a("END"),n}catch(t){throw await R(()=>a("ROLLBACK")),t}}]},rt=async(a,t,n,s,i)=>{const r=[1];await a(Z+" INTO"+ua(t)+"("+ya(n,...s)+")VALUES"+h(J(i,a=>"($"+r[0]+++","+da(a,r)+")"),e)+"ON CONFLICT("+ua(n)+`)DO ${aa} SET`+h(O(s,a=>ua(a)+"=excluded."+ua(a)),e),J(i,(a,t)=>[t,...O(a,a=>a??null)]).flat())},ot=(a,t,n,e,s,i,r,[o,c,l],w,y,d,v,f,E,$,N,m)=>{const[A,_,g,T]=it(t,w,y,f,E,void 0,void 0,m);return et(a,()=>T(async()=>{return await A(),a=(await _(o,c))[H]?.[l]??"null",Wa(Qa(a));var a}),a=>T(async()=>{var t;await A(),await g(o,c,{[H]:{[l]:(t=a()??null,Va(t,(a,t)=>u(t)?"":t))}},!0,!0)}),n,e,s,r,{[v]:()=>d,destroy:i},0,d)},ct=(a,t,n,e,s,i,r,[o,c,[l,w,y,d,v]],f,E,$,N,m,A,_,T,h)=>{const[S,I,b,R]=it(t,f,E,m,A,_,T,h),D=(a,t)=>g(pa(c,async([n,e,s,i,r],o)=>{var c,l;t&&(c=a,l=o,!C.hasOwn(c,l))||await b(n,e,a[o],s,i,t,r)})),L=(a,t,n)=>k(1==n?p(J(a,(a,t)=>[t,a]),([a])=>{return n=a,t.includes(n);var n}):p(O(t,t=>[t,a[t]]),([,a])=>!u(a))),P=async(a,t)=>w?await b(y,K,{[H]:u(v)?a:L(a,v,t)},!0,!0,t,void 0,v):null;return et(a,()=>R(async()=>{await S();const a=await(async()=>k(p(await g(pa(o,async([a,t,n],e)=>[a,await I(e,t,n)])),a=>!z(a[1]))))(),t=await(async()=>l?(await I(y,K,void 0,d))[H]:{})();return z(a)&&u(t)?void 0:[a,t]}),(a,t)=>R(async()=>{if(await S(),u(t)){const[t,n]=a();await D(t),await P(n)}else await D(t[0],!0),await P(t[1],!0)}),n,e,s,r,{[N]:()=>$,destroy:i},0,$)},lt=(a,e,s,r,c,l,y,v,f,$,N="getDb",m,A)=>{let _,g,T;const h=((a,t)=>t?async(n,e)=>(t(n,e),await a(n,e)):a)(s,l),[O,p,S,I]=(a=>{const n=(a=>B(Xa,E(a)?{[Ma]:a}:a??{}))(a),e=n[Ua];if(n.mode==Pa){const a=n[Ma]??t;return[1,e,[a,n[Fa]??K,n[xa]??Ca],Ra(a)]}const{tables:{load:s={},save:r={}}={},values:o={}}=n,c=B(Ya,o),{load:l,save:w}=c,u=[Ha(l),Ha(w),c[ka],za(l),za(w)],y=u[2],d=Ra(y),v=Ra(y),f=Ka(s,{[ja]:null,[Ba]:K,[Ja]:i},ja,a=>Ea(v,a),a=>Da(d,a)),$=Ka(r,{[ka]:null,[Ba]:K,[qa]:0,[Ga]:0,[Ja]:null},ka,(a,t)=>Ea(v,t),(a,t)=>Da(d,t));return Oa($,(a,t)=>t[4]??=ha(f,t[0])?.[2]??i),[0,e,[f,$,u],d]})(e);return!O&&a.isMergeable()&&b(0),(O?ot:ct)(a,h,a=>{let t,n,e=1,s=0,i=0;const l=async(t=!0)=>{const[{d:n,s:s,c:r}]=await h(V+` ${ra} d,${oa} s,TOTAL_CHANGES() c FROM ${ia}${ra} JOIN ${ia}${oa}`);if(e&&(n!=_||s!=g||r!=T)){const o=t&&!i&&!w(_);_=n,g=s,T=r,o&&e&&await a()}},d=()=>{u(t)||((a=>{clearInterval(a)})(t),t=void 0)},v=(r=!1)=>{if(n)return n;const o=L(()=>D(async()=>{for(s?r&&await l():(await l(!1),s=1);e&&i;)i=0,await l(!1),e&&(await a(),await l())},y),()=>{n==o&&(n=void 0),e&&(i?v():e&&u(t)&&(t=setInterval(()=>v(!0),1e3*p)))});return n=o,o},f=r(a=>{e&&Ea(I,a)&&(i=1,d(),o.resolve().then(()=>e?void v():0))});return v().then(()=>async()=>{e=0,i=0,d(),await L(async()=>await n,async()=>{_=g=T=null,await c(f)})})},a=>a(),y,v,f,S,Na(I),async(a,t)=>await a(V+` t.name tn,c.name cn,c.pk OR EXISTS(${V} 1 FROM ${ia}index_list(t.name)i,${ia}index_info(i.name)ii ${Q} i."unique"=1 AND ii.name=c.name AND(${V} count(*) FROM ${ia}index_info(i.name))=1)uq FROM ${ca}list()t,${ca}info(t.name)c ${Q} t.schema='main'AND t.type IN('table','view')AND t.name IN(${da(t)})ORDER BY t.name,c.name`,t),$,N,n,m,a=>d(a)?1:(a=>!1===a)(a)?0:a,void 0,A)},wt=(a,t,n,e,s)=>{let i;return lt(a,n,async(a,n=[])=>t.execute(a,n).then(a=>a.rows?._array??[]),a=>{const n=new AbortController,e=t.onChange({signal:n.signal});return D(async()=>{for await(const a of e)i&&T(a.changedTables,i)},s),i=a,n},a=>{i=void 0,a.abort()},e,s,A,1,t,"getPowerSync",ut)},ut=async(a,t,n,s,i)=>{const r=h(O(s,(a,t)=>ua(a)+"=$"+(t+1)),e);for(const[e,o]of J(i,(a,t)=>[t,a])){const i=O(o,a=>a??null);if(m(await a(aa+ua(t)+" SET"+r+" "+Q+ua(n)+"=$"+(N(o)+1)+" RETURNING"+ua(n),[...i,e]))){const r=[1];await a(Z+" INTO"+ua(t)+"("+ya(n,...s)+")VALUES("+da([e,...o],r)+")",[e,...i])}}};export{wt as createPowerSyncPersister};
|
|
Binary file
|
package/omni/index.js
CHANGED
|
@@ -7672,7 +7672,6 @@ const createPowerSyncPersister = (
|
|
|
7672
7672
|
(listener) => {
|
|
7673
7673
|
const abortController = new AbortController();
|
|
7674
7674
|
const onChange = powerSync.onChange({
|
|
7675
|
-
rawTableNames: true,
|
|
7676
7675
|
signal: abortController.signal,
|
|
7677
7676
|
});
|
|
7678
7677
|
void tryCatchIgnore(async () => {
|
|
@@ -7672,7 +7672,6 @@ const createPowerSyncPersister = (
|
|
|
7672
7672
|
(listener) => {
|
|
7673
7673
|
const abortController = new AbortController();
|
|
7674
7674
|
const onChange = powerSync.onChange({
|
|
7675
|
-
rawTableNames: true,
|
|
7676
7675
|
signal: abortController.signal,
|
|
7677
7676
|
});
|
|
7678
7677
|
void tryCatchIgnore(async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinybase",
|
|
3
|
-
"version": "9.3.0
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"author": "jamesgpearce",
|
|
5
5
|
"repository": "github:tinyplex/tinybase",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"sideEffects": false,
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@automerge/automerge-repo": "^2.5.6",
|
|
34
|
-
"@cloudflare/workers-types": "^5.
|
|
34
|
+
"@cloudflare/workers-types": "^5.20260726.1",
|
|
35
35
|
"@electric-sql/pglite": "^0.5.4",
|
|
36
36
|
"@libsql/client": "^0.17.4",
|
|
37
|
-
"@powersync/common": "^
|
|
37
|
+
"@powersync/common": "^2.0.0",
|
|
38
38
|
"@sinclair/typebox": "^0.34.52",
|
|
39
39
|
"@sqlite.org/sqlite-wasm": "^3.53.0-build1",
|
|
40
40
|
"@vlcn.io/crsqlite-wasm": "^0.16.0",
|
|
@@ -42,18 +42,18 @@
|
|
|
42
42
|
"bun": "^1.3.14",
|
|
43
43
|
"effect": "^3.22.0",
|
|
44
44
|
"electric-sql": "^0.12.1",
|
|
45
|
-
"expo": "^57.0.
|
|
46
|
-
"expo-sqlite": "^57.0.
|
|
45
|
+
"expo": "^57.0.8",
|
|
46
|
+
"expo-sqlite": "^57.0.1",
|
|
47
47
|
"partykit": "^0.0.115",
|
|
48
48
|
"partysocket": "^1.3.0",
|
|
49
49
|
"postgres": "^3.4.9",
|
|
50
|
-
"react": "^19.2.
|
|
51
|
-
"react-dom": "^19.2.
|
|
50
|
+
"react": "^19.2.8",
|
|
51
|
+
"react-dom": "^19.2.8",
|
|
52
52
|
"react-native-mmkv": "4.3.2",
|
|
53
53
|
"react-native-sqlite-storage": "^6.0.1",
|
|
54
54
|
"solid-js": "^1.9.14",
|
|
55
55
|
"sqlite3": "^5.1.7",
|
|
56
|
-
"svelte": "^5.56.
|
|
56
|
+
"svelte": "^5.56.8",
|
|
57
57
|
"valibot": "^1.4.2",
|
|
58
58
|
"ws": "^8.21.1",
|
|
59
59
|
"yjs": "^13.6.31",
|
|
@@ -145,6 +145,11 @@
|
|
|
145
145
|
"optional": true
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
|
+
"overrides": {
|
|
149
|
+
"@rolldown/plugin-babel": {
|
|
150
|
+
"@babel/plugin-transform-runtime": "7.29.7"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
148
153
|
"main": "./index.js",
|
|
149
154
|
"types": "./@types/index.d.ts",
|
|
150
155
|
"typesVersions": {
|
|
@@ -1718,7 +1718,6 @@ const createPowerSyncPersister = (
|
|
|
1718
1718
|
(listener) => {
|
|
1719
1719
|
const abortController = new AbortController();
|
|
1720
1720
|
const onChange = powerSync.onChange({
|
|
1721
|
-
rawTableNames: true,
|
|
1722
1721
|
signal: abortController.signal,
|
|
1723
1722
|
});
|
|
1724
1723
|
void tryCatchIgnore(async () => {
|
|
@@ -1718,7 +1718,6 @@ const createPowerSyncPersister = (
|
|
|
1718
1718
|
(listener) => {
|
|
1719
1719
|
const abortController = new AbortController();
|
|
1720
1720
|
const onChange = powerSync.onChange({
|
|
1721
|
-
rawTableNames: true,
|
|
1722
1721
|
signal: abortController.signal,
|
|
1723
1722
|
});
|
|
1724
1723
|
void tryCatchIgnore(async () => {
|
package/readme.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
📦 Creating your project...
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
<hr><section><h2 id="it-s-reactive">It'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>, <a href="#pre-built-reactive-components">pre-built components</a>, and <a href="#local-first-data-visualizations">charts</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'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-or-a-database">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's Built For A <em>Local-First</em> World</h2><p>TinyBase works anywhere that JavaScript does, but it's especially great for local-first apps: where data is stored locally on the user's device and that can be run offline. It's tiny by name, tiny by nature: just <a href="#did-we-say-tiny">7.2kB - 15.6kB</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><h3 id="ui-frameworks"><a href="https://beta.tinybase.org/guides/">UI Frameworks</a></h3><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-solid/getting-started-with-ui-solid"><img src="https://beta.tinybase.org/solid.svg?asImg" width="48"> Solid</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><h3 id="storage-sync"><a href="https://beta.tinybase.org/guides/persistence/">Storage & Sync</a></h3><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><h3 id="schema-systems"><a href="https://beta.tinybase.org/guides/schemas/using-schematizers/">Schema Systems</a></h3><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&logo=GitHub&logoColor=%23fff&label=GitHub&labelColor=%23d81b60&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&logo=bluesky&logoColor=%23fff&color=%23333&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&logo=x&logoColor=%23fff&color=%23333&labelColor=%23000"> </a><a href="https://discord.com/invite/mGz3mevwP8" target="_blank"><img src="https://img.shields.io/discord/1027918215323590676?style=for-the-badge&logo=discord&logoColor=%23fff&label=Discord&labelColor=%233131e8&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&logo=GitHub&logoColor=%23fff&label=Ideas&labelColor=%23d81b60&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&logo=GitHub&logoColor=%23fff&label=Issues&labelColor=%23d81b60&color=%23333"> </a><a href="#well-tested-and-documented"><img src="https://img.shields.io/badge/Tests-100%25-green?style=for-the-badge&logo=Vitest&logoColor=%23fff&color=%23333&labelColor=%2387c305"> </a><a href="https://www.npmjs.com/package/tinybase/v/9.3.0-beta.0" target="_blank"><img src="https://img.shields.io/npm/v/tinybase?style=for-the-badge&logo=npm&logoColor=%23fff&labelColor=%23bd0005&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'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>, <a href="#pre-built-reactive-components">pre-built components</a>, and <a href="#local-first-data-visualizations">charts</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'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-or-a-database">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's Built For A <em>Local-First</em> World</h2><p>TinyBase works anywhere that JavaScript does, but it's especially great for local-first apps: where data is stored locally on the user's device and that can be run offline. It's tiny by name, tiny by nature: just <a href="#did-we-say-tiny">7.2kB - 15.6kB</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><h3 id="ui-frameworks"><a href="https://beta.tinybase.org/guides/">UI Frameworks</a></h3><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-solid/getting-started-with-ui-solid"><img src="https://beta.tinybase.org/solid.svg?asImg" width="48"> Solid</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><h3 id="storage-sync"><a href="https://beta.tinybase.org/guides/persistence/">Storage & Sync</a></h3><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><h3 id="schema-systems"><a href="https://beta.tinybase.org/guides/schemas/using-schematizers/">Schema Systems</a></h3><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&logo=GitHub&logoColor=%23fff&label=GitHub&labelColor=%23d81b60&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&logo=bluesky&logoColor=%23fff&color=%23333&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&logo=x&logoColor=%23fff&color=%23333&labelColor=%23000"> </a><a href="https://discord.com/invite/mGz3mevwP8" target="_blank"><img src="https://img.shields.io/discord/1027918215323590676?style=for-the-badge&logo=discord&logoColor=%23fff&label=Discord&labelColor=%233131e8&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&logo=GitHub&logoColor=%23fff&label=Ideas&labelColor=%23d81b60&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&logo=GitHub&logoColor=%23fff&label=Issues&labelColor=%23d81b60&color=%23333"> </a><a href="#well-tested-and-documented"><img src="https://img.shields.io/badge/Tests-100%25-green?style=for-the-badge&logo=Vitest&logoColor=%23fff&color=%23333&labelColor=%2387c305"> </a><a href="https://www.npmjs.com/package/tinybase/v/9.3.0-beta.1" target="_blank"><img src="https://img.shields.io/npm/v/tinybase?style=for-the-badge&logo=npm&logoColor=%23fff&labelColor=%23bd0005&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';
|
package/ui-svelte/index.js
CHANGED
package/ui-svelte-dom/index.js
CHANGED
|
@@ -107,7 +107,7 @@ const objMap = (obj, cb) => {
|
|
|
107
107
|
|
|
108
108
|
const TINYBASE_CONTEXT_KEY = TINYBASE + '_uisc';
|
|
109
109
|
|
|
110
|
-
/* functions.svelte.ts generated by Svelte v5.56.
|
|
110
|
+
/* functions.svelte.ts generated by Svelte v5.56.8 */
|
|
111
111
|
|
|
112
112
|
class ReactiveHandle {
|
|
113
113
|
#get;
|
|
@@ -1750,7 +1750,7 @@ function SortedTablePaginator($$anchor, $$props) {
|
|
|
1750
1750
|
|
|
1751
1751
|
$.delegate(['click']);
|
|
1752
1752
|
|
|
1753
|
-
/* sortingAndPagination.svelte.ts generated by Svelte v5.56.
|
|
1753
|
+
/* sortingAndPagination.svelte.ts generated by Svelte v5.56.8 */
|
|
1754
1754
|
|
|
1755
1755
|
const createSortingAndPagination = (
|
|
1756
1756
|
getCellId,
|
|
@@ -107,7 +107,7 @@ const objMap = (obj, cb) => {
|
|
|
107
107
|
|
|
108
108
|
const TINYBASE_CONTEXT_KEY = TINYBASE + '_uisc';
|
|
109
109
|
|
|
110
|
-
/* functions.svelte.ts generated by Svelte v5.56.
|
|
110
|
+
/* functions.svelte.ts generated by Svelte v5.56.8 */
|
|
111
111
|
|
|
112
112
|
class ReactiveHandle {
|
|
113
113
|
#get;
|
|
@@ -1750,7 +1750,7 @@ function SortedTablePaginator($$anchor, $$props) {
|
|
|
1750
1750
|
|
|
1751
1751
|
$.delegate(['click']);
|
|
1752
1752
|
|
|
1753
|
-
/* sortingAndPagination.svelte.ts generated by Svelte v5.56.
|
|
1753
|
+
/* sortingAndPagination.svelte.ts generated by Svelte v5.56.8 */
|
|
1754
1754
|
|
|
1755
1755
|
const createSortingAndPagination = (
|
|
1756
1756
|
getCellId,
|
|
@@ -3541,7 +3541,7 @@ const createStore = () => {
|
|
|
3541
3541
|
|
|
3542
3542
|
const TINYBASE_CONTEXT_KEY = TINYBASE + '_uisc';
|
|
3543
3543
|
|
|
3544
|
-
/* functions.svelte.ts generated by Svelte v5.56.
|
|
3544
|
+
/* functions.svelte.ts generated by Svelte v5.56.8 */
|
|
3545
3545
|
|
|
3546
3546
|
class ReactiveHandle {
|
|
3547
3547
|
#get;
|
|
@@ -5411,7 +5411,7 @@ function SortedTablePaginator($$anchor, $$props) {
|
|
|
5411
5411
|
|
|
5412
5412
|
$.delegate(['click']);
|
|
5413
5413
|
|
|
5414
|
-
/* sortingAndPagination.svelte.ts generated by Svelte v5.56.
|
|
5414
|
+
/* sortingAndPagination.svelte.ts generated by Svelte v5.56.8 */
|
|
5415
5415
|
|
|
5416
5416
|
const createSortingAndPagination = (
|
|
5417
5417
|
getCellId,
|
|
@@ -3541,7 +3541,7 @@ const createStore = () => {
|
|
|
3541
3541
|
|
|
3542
3542
|
const TINYBASE_CONTEXT_KEY = TINYBASE + '_uisc';
|
|
3543
3543
|
|
|
3544
|
-
/* functions.svelte.ts generated by Svelte v5.56.
|
|
3544
|
+
/* functions.svelte.ts generated by Svelte v5.56.8 */
|
|
3545
3545
|
|
|
3546
3546
|
class ReactiveHandle {
|
|
3547
3547
|
#get;
|
|
@@ -5411,7 +5411,7 @@ function SortedTablePaginator($$anchor, $$props) {
|
|
|
5411
5411
|
|
|
5412
5412
|
$.delegate(['click']);
|
|
5413
5413
|
|
|
5414
|
-
/* sortingAndPagination.svelte.ts generated by Svelte v5.56.
|
|
5414
|
+
/* sortingAndPagination.svelte.ts generated by Svelte v5.56.8 */
|
|
5415
5415
|
|
|
5416
5416
|
const createSortingAndPagination = (
|
|
5417
5417
|
getCellId,
|