@lunora/svelte 1.0.0-alpha.181 → 1.0.0-alpha.182
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.d.mts
CHANGED
|
@@ -669,6 +669,12 @@ declare function flags<T extends Record<string, FlagValue>>(client: LunoraClient
|
|
|
669
669
|
* opened behind an explicit `isBrowser()` guard rather than left to the store's
|
|
670
670
|
* laziness. On the server the store simply holds the seeded value. The token's
|
|
671
671
|
* `value` is the single source of truth for the first paint either way.
|
|
672
|
+
*
|
|
673
|
+
* The preloaded value was read for whoever was signed in when the page loaded.
|
|
674
|
+
* After a sign-out or user switch retires that identity
|
|
675
|
+
* (`client.identityEpoch() > 0`), every `hydratePreloaded` store on the client
|
|
676
|
+
* (subscribed then or later) stops using it and holds `undefined` until the live
|
|
677
|
+
* value arrives — matching `@lunora/react`'s `usePreloadedQuery`.
|
|
672
678
|
*/
|
|
673
679
|
declare const hydratePreloaded: <T>(preloaded: Preloaded<T>, client?: LunoraClient, options?: {
|
|
674
680
|
onError?: SubscriptionErrorCallback;
|
package/dist/index.d.ts
CHANGED
|
@@ -669,6 +669,12 @@ declare function flags<T extends Record<string, FlagValue>>(client: LunoraClient
|
|
|
669
669
|
* opened behind an explicit `isBrowser()` guard rather than left to the store's
|
|
670
670
|
* laziness. On the server the store simply holds the seeded value. The token's
|
|
671
671
|
* `value` is the single source of truth for the first paint either way.
|
|
672
|
+
*
|
|
673
|
+
* The preloaded value was read for whoever was signed in when the page loaded.
|
|
674
|
+
* After a sign-out or user switch retires that identity
|
|
675
|
+
* (`client.identityEpoch() > 0`), every `hydratePreloaded` store on the client
|
|
676
|
+
* (subscribed then or later) stops using it and holds `undefined` until the live
|
|
677
|
+
* value arrives — matching `@lunora/react`'s `usePreloadedQuery`.
|
|
672
678
|
*/
|
|
673
679
|
declare const hydratePreloaded: <T>(preloaded: Preloaded<T>, client?: LunoraClient, options?: {
|
|
674
680
|
onError?: SubscriptionErrorCallback;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{action as t}from"./packem_shared/action-SjeZUGhX.mjs";import{agent as a}from"./packem_shared/agent-WMVWf1Ks.mjs";import{agentChat as f}from"./packem_shared/agentChat-CX6dTMoY.mjs";import{agentState as n}from"./packem_shared/agentState-BfiH58gs.mjs";import{agentToolEvents as i}from"./packem_shared/agentToolEvents-DhC7lunJ.mjs";import{auth as g,authGate as s}from"./packem_shared/auth-Z0G_aZYz.mjs";import{connectionStatus as l}from"./packem_shared/connectionStatus-DMx3BE5Q.mjs";import{getLunoraClient as h,setLunoraClient as y}from"./packem_shared/getLunoraClient-DU7BmZy1.mjs";import{flag as L,flags as v}from"./packem_shared/flag-Csh9LBiO.mjs";import{hydratePreloaded as S}from"./packem_shared/hydratePreloaded-
|
|
1
|
+
import{action as t}from"./packem_shared/action-SjeZUGhX.mjs";import{agent as a}from"./packem_shared/agent-WMVWf1Ks.mjs";import{agentChat as f}from"./packem_shared/agentChat-CX6dTMoY.mjs";import{agentState as n}from"./packem_shared/agentState-BfiH58gs.mjs";import{agentToolEvents as i}from"./packem_shared/agentToolEvents-DhC7lunJ.mjs";import{auth as g,authGate as s}from"./packem_shared/auth-Z0G_aZYz.mjs";import{connectionStatus as l}from"./packem_shared/connectionStatus-DMx3BE5Q.mjs";import{getLunoraClient as h,setLunoraClient as y}from"./packem_shared/getLunoraClient-DU7BmZy1.mjs";import{flag as L,flags as v}from"./packem_shared/flag-Csh9LBiO.mjs";import{hydratePreloaded as S}from"./packem_shared/hydratePreloaded-CNm2-Rha.mjs";import{mutation as q}from"./packem_shared/mutation-DLBr5Op1.mjs";import{mutator as E}from"./packem_shared/mutator-DECDuo94.mjs";import{infiniteQuery as P,paginatedQuery as T}from"./packem_shared/infiniteQuery-DGTn4Zbx.mjs";import{presence as k}from"./packem_shared/presence-Ybhe8so-.mjs";import{query as z}from"./packem_shared/query-DONZ7jtA.mjs";import{rateLimit as D}from"./packem_shared/rateLimit-Cli38qWO.mjs";import{stream as H}from"./packem_shared/stream-Cxl8guzh.mjs";import{subscription as J}from"./packem_shared/subscription-b5R8BAAh.mjs";import{voiceAgent as M}from"./packem_shared/voiceAgent-KSChAXsW.mjs";export{t as action,a as agent,f as agentChat,n as agentState,i as agentToolEvents,g as auth,s as authGate,l as connectionStatus,L as flag,v as flags,h as getLunoraClient,S as hydratePreloaded,P as infiniteQuery,q as mutation,E as mutator,T as paginatedQuery,k as presence,z as query,D as rateLimit,y as setLunoraClient,H as stream,J as subscription,M as voiceAgent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{readable as h}from"svelte/store";import{i as m}from"./is-browser-BEdfLJHK.mjs";import{getLunoraClient as p}from"./getLunoraClient-DU7BmZy1.mjs";const g=(t,e,i={})=>{const o=e??p(),{args:s,functionPath:a,shardKey:c,value:d}=t,f={__lunoraRef:a};return h(o.identityEpoch()===0?d:void 0,r=>{if(!m())return()=>{};const n=()=>{r(void 0)};o.identityEpoch()!==0&&n();const u=o.onIdentityChange(n),l=o.subscribe(f,s,b=>{r(b)},{onError:i.onError,shardKey:c});return()=>{u(),l()}})};export{g as hydratePreloaded};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/svelte",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.182",
|
|
4
4
|
"description": "Svelte adapter for Lunora — live stores, optimistic mutations, and reactive loaders",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@lunora/client": "1.0.0-alpha.
|
|
57
|
+
"@lunora/client": "1.0.0-alpha.148",
|
|
58
58
|
"@lunora/errors": "1.0.0-alpha.44",
|
|
59
59
|
"@lunora/ratelimit": "1.0.0-alpha.86",
|
|
60
60
|
"@visulima/storage-client": "1.0.3"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{readable as l}from"svelte/store";import{i as d}from"./is-browser-BEdfLJHK.mjs";import{getLunoraClient as m}from"./getLunoraClient-DU7BmZy1.mjs";const g=(r,o,e={})=>{const t=o??m(),{args:n,functionPath:s,shardKey:a,value:i}=r,u={__lunoraRef:s};return l(i,f=>d()?t.subscribe(u,n,c=>{f(c)},{onError:e.onError,shardKey:a}):()=>{})};export{g as hydratePreloaded};
|