@lunora/solid 1.0.0-alpha.37 → 1.0.0-alpha.39
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/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{LunoraContext as r,useLunora as o}from"./packem_shared/LunoraContext-CVOsskhY.mjs";import{createAgent as c}from"./packem_shared/createAgent-BbHVxEpf.mjs";import{createAgentChat as f}from"./packem_shared/createAgentChat-B79ZiHfq.mjs";import{createAgentState as p}from"./packem_shared/createAgentState-CbE2MP_H.mjs";import{createAgentToolEvents as u}from"./packem_shared/createAgentToolEvents-DOU_J3JT.mjs";import{AuthLoading as d,Authenticated as g,Unauthenticated as s,createAuth as A}from"./packem_shared/AuthLoading-D6A1mBRs.mjs";import{default as h}from"./packem_shared/createConnectionStatus-B9ly5m1x.mjs";import{createFlag as y,createFlags as C}from"./packem_shared/createFlag-qBxuQ5hP.mjs";import{createMutation as S,createMutationForClient as F}from"./packem_shared/createMutation-9i34uh8U.mjs";import{createMutator as Q}from"./packem_shared/createMutator-zzxMk2QQ.mjs";import{createInfiniteQuery as b,createPaginatedQuery as E}from"./packem_shared/createInfiniteQuery-
|
|
1
|
+
import{LunoraContext as r,useLunora as o}from"./packem_shared/LunoraContext-CVOsskhY.mjs";import{createAgent as c}from"./packem_shared/createAgent-BbHVxEpf.mjs";import{createAgentChat as f}from"./packem_shared/createAgentChat-B79ZiHfq.mjs";import{createAgentState as p}from"./packem_shared/createAgentState-CbE2MP_H.mjs";import{createAgentToolEvents as u}from"./packem_shared/createAgentToolEvents-DOU_J3JT.mjs";import{AuthLoading as d,Authenticated as g,Unauthenticated as s,createAuth as A}from"./packem_shared/AuthLoading-D6A1mBRs.mjs";import{default as h}from"./packem_shared/createConnectionStatus-B9ly5m1x.mjs";import{createFlag as y,createFlags as C}from"./packem_shared/createFlag-qBxuQ5hP.mjs";import{createMutation as S,createMutationForClient as F}from"./packem_shared/createMutation-9i34uh8U.mjs";import{createMutator as Q}from"./packem_shared/createMutator-zzxMk2QQ.mjs";import{createInfiniteQuery as b,createPaginatedQuery as E}from"./packem_shared/createInfiniteQuery-DF_sCn__.mjs";import{createPresence as R}from"./packem_shared/createPresence-DNVSvTzP.mjs";import{createQuery as U}from"./packem_shared/createQuery-CFb7mUGW.mjs";import{createRateLimit as j}from"./packem_shared/createRateLimit-BdVo3eNW.mjs";import{createStream as q}from"./packem_shared/createStream-DozkYNOc.mjs";import{createSubscription as z}from"./packem_shared/createSubscription-KbQk0ohZ.mjs";import{createVoiceAgent as D}from"./packem_shared/createVoiceAgent-CzXF9acz.mjs";import{default as H}from"./packem_shared/hydratePreloaded-BbGFlPEb.mjs";import{LunoraProvider as K}from"./packem_shared/LunoraProvider-cifsrLab.mjs";export{d as AuthLoading,g as Authenticated,r as LunoraContext,K as LunoraProvider,s as Unauthenticated,c as createAgent,f as createAgentChat,p as createAgentState,u as createAgentToolEvents,A as createAuth,h as createConnectionStatus,y as createFlag,C as createFlags,b as createInfiniteQuery,S as createMutation,F as createMutationForClient,Q as createMutator,E as createPaginatedQuery,R as createPresence,U as createQuery,j as createRateLimit,q as createStream,z as createSubscription,D as createVoiceAgent,H as hydratePreloaded,o as useLunora};
|
package/dist/packem_shared/{createInfiniteQuery-CDLk3UVQ.mjs → createInfiniteQuery-DF_sCn__.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initialPages as U,derivePaginationStatus as E,applyLoadMore as G,rebalance as H}from"@lunora/client/pagination";import{createMemo as P,createSignal as F,createEffect as B,on as Q,onCleanup as V}from"solid-js";import{e as J}from"./stable-key-BSG0zK_E.mjs";import{useLunora as W}from"./LunoraContext-CVOsskhY.mjs";const j=e=>{let
|
|
1
|
+
import{initialPages as U,derivePaginationStatus as E,applyLoadMore as G,rebalance as H}from"@lunora/client/pagination";import{createMemo as P,createSignal as F,createEffect as B,on as Q,onCleanup as V}from"solid-js";import{e as J}from"./stable-key-BSG0zK_E.mjs";import{useLunora as W}from"./LunoraContext-CVOsskhY.mjs";const j=e=>{let r="";for(let f=0;f<e.length;f+=32768)r+=String.fromCharCode(...e.subarray(f,f+32768));return btoa(r)},u="$lunora.wire$",D=64,h=(e,r=0)=>{if(r>D)throw new RangeError(`wire-codec: value nesting exceeds the ${D}-level limit`);if(e===void 0)return[u,"undefined"];if(e===null)return null;const f=typeof e;if(f==="bigint")return[u,"bigint",e.toString()];if(f==="number"){const t=e;return Number.isNaN(t)?[u,"nan"]:t===1/0?[u,"inf"]:t===-1/0?[u,"-inf"]:t}if(f!=="object")return e;if(e instanceof Date)return[u,"date",h(e.getTime(),r+1)];if(e instanceof Error){const t=e,n={};for(const c of Object.keys(t))t[c]!==void 0&&(n[c]=h(t[c],r+1));const l=[u,"error",t.name,t.message,n];return t.cause!==void 0&&l.push(h(t.cause,r+1)),l}if(e instanceof URL)return[u,"url",e.href];if(e instanceof Map)return[u,"map",[...e.entries()].map(([t,n])=>[h(t,r+1),h(n,r+1)])];if(e instanceof Set)return[u,"set",[...e].map(t=>h(t,r+1))];if(e instanceof ArrayBuffer)return[u,"bytes",j(new Uint8Array(e)),"ArrayBuffer"];if(ArrayBuffer.isView(e)){const t=e,n=t.constructor.name,l=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return n==="Uint8Array"?[u,"bytes",j(l)]:[u,"bytes",j(l),n]}if(Array.isArray(e)){const t=e.map(n=>h(n,r+1));return t.length>0&&t[0]===u?[u,"arr",t]:t}const w=Object.getPrototypeOf(e);if(w!==null&&w!==Object.prototype){const t=e.constructor?.name??"value";throw new TypeError(`wire-codec: cannot encode a ${t} over the Lunora wire — only plain objects, arrays, and the supported built-ins (Date, Error, URL, Map, Set, ArrayBuffer/typed arrays, bigint) round-trip`)}const m=e,g={};for(const t of Object.keys(m)){const n=m[t];n!==void 0&&(g[t]=h(n,r+1))}return g},X=e=>J(h(e)),v=(e,r)=>({...r,paginationOpts:{cursor:e.lower,endCursor:e.upper,numItems:e.numItems}}),R=(e,r)=>`${e}::${X(r)}`,K=(e,r,f)=>{const w=W(),{initialNumItems:m,shardKey:g}=f,t=()=>typeof r=="function"?r():r,[n,l]=F(U(m)),c=new Map,[_,M]=F([]),y=new Map,A=new Set,S=(o,i)=>{const p=o.map(s=>{const a=R(e.__lunoraRef,v(s,i));return c.get(a)});M(p)},T=(o,i,p)=>{const s=a=>R(e.__lunoraRef,v(a,p));for(const a of i){const d=s(a);if(c.has(d))continue;const L=o.find(b=>b.lower===a.lower);if(L){const b=c.get(s(L));b&&c.set(d,b)}}},q=(o,i)=>{const p=new Set;for(const s of o)p.add(R(e.__lunoraRef,v(s,i)));for(const[s,a]of y)p.has(s)||(a(),y.delete(s),A.delete(s),c.delete(s));for(const s of o){const a=v(s,i),d=R(e.__lunoraRef,a);if(y.has(d))continue;A.add(d);const L=w.subscribe(e,a,b=>{c.set(d,b),A.delete(d);const k=t();if(k!=="skip"&&(S(n(),k),A.size===0)){const O=n(),$=H(O,_());$&&(T(O,$,k),l($))}},{shardKey:g});y.set(d,L)}};let C=!1,N=!1;const x=(o,i)=>{if(C){N=!0;return}C=!0;try{let p=o,s=i;do{N=!1,q(p,s);const a=t();if(a==="skip")break;p=n(),s=a}while(N)}finally{C=!1}},I=()=>{for(const o of y.values())o();y.clear(),c.clear(),A.clear()};B(Q(t,o=>{I(),l(U(m)),M([]),o!=="skip"&&(x(n(),o),S(n(),o)),V(I)})),B(Q(n,o=>{const i=t();i!=="skip"&&(x(o,i),S(o,i))}));const z=P(()=>{const o=t()==="skip";return E(o,_()).status});return{loadMore:o=>{const i=t();if(i==="skip")return;const{nextCursor:p,status:s}=E(!1,_());if(s!=="CanLoadMore")return;const a=G(n(),p,o);if(!a)return;const d=n().at(-1),L=a.at(-2);if(d&&L){const b=R(e.__lunoraRef,v(d,i)),k=R(e.__lunoraRef,v(L,i));if(b!==k){const O=c.get(b);O&&c.set(k,O)}}l(a)},pageResults:_,status:z}},ne=(e,r,f)=>{const{loadMore:w,pageResults:m,status:g}=K(e,r,f),t=P(()=>{const n=[];for(const l of m())l&&n.push(...l.page);return n});return{isLoading:P(()=>g()==="LoadingFirstPage"||g()==="LoadingMore"),loadMore:w,results:t,status:g}},re=(e,r,f)=>{const{initialNumItems:w}=f,{loadMore:m,pageResults:g,status:t}=K(e,r,f),n=P(()=>{const M=[];for(const y of g())y&&M.push(y.page);return M}),l=P(()=>t()==="LoadingFirstPage"),c=P(()=>t()==="CanLoadMore"),_=P(()=>t()==="LoadingMore");return{fetchNextPage:M=>{m(M??w)},hasNextPage:c,isFetchingNextPage:_,isLoading:l,pages:n,status:t}};export{re as createInfiniteQuery,ne as createPaginatedQuery};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/solid",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.39",
|
|
4
4
|
"description": "SolidJS adapter for Lunora — live queries, optimistic mutations, and reactive loaders",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@lunora/client": "1.0.0-alpha.
|
|
58
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
59
|
-
"@lunora/ratelimit": "1.0.0-alpha.
|
|
57
|
+
"@lunora/client": "1.0.0-alpha.37",
|
|
58
|
+
"@lunora/errors": "1.0.0-alpha.12",
|
|
59
|
+
"@lunora/ratelimit": "1.0.0-alpha.15",
|
|
60
60
|
"@visulima/storage-client": "1.0.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|