@lunora/svelte 1.0.0-alpha.184 → 1.0.0-alpha.185

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
@@ -653,11 +653,11 @@ declare function flags<T extends Record<string, FlagValue>>(client: LunoraClient
653
653
  *
654
654
  * The store is seeded **synchronously** with `preloaded.value`, so the very
655
655
  * first read (`$store` during hydration) returns the server value with no
656
- * loading flash and no hydration mismatch — there is no `undefined` window and
657
- * no refetch. When the store gains its first subscriber on the client, a live
658
- * WS subscription attaches and every subsequent delta re-emits, exactly like a
659
- * plain `query` store. This is the Svelte equivalent of React's
660
- * `usePreloadedQuery`.
656
+ * loading flash and no hydration mismatch — no `undefined` window (until an
657
+ * identity is retired, see below) and no refetch. When the store gains its
658
+ * first subscriber on the client, a live WS subscription attaches and every
659
+ * subsequent delta re-emits, exactly like a plain `query` store. This is the
660
+ * Svelte equivalent of React's `usePreloadedQuery`.
661
661
  *
662
662
  * Pass `client` explicitly, or omit it to resolve the ambient client published
663
663
  * by `setLunoraClient`. Pass `onError` to surface a subscription-scoped error the
@@ -674,11 +674,12 @@ declare function flags<T extends Record<string, FlagValue>>(client: LunoraClient
674
674
  * After a sign-out or user switch retires that identity
675
675
  * (`client.identityEpoch() > 0`), every `hydratePreloaded` store on the client
676
676
  * (subscribed then or later) stops using it and holds `undefined` until the live
677
- * value arrives — matching `@lunora/react`'s `usePreloadedQuery`.
677
+ * value arrives — matching `@lunora/react`'s `usePreloadedQuery`, hence the
678
+ * `Readable<T | undefined>` type.
678
679
  */
679
680
  declare const hydratePreloaded: <T>(preloaded: Preloaded<T>, client?: LunoraClient, options?: {
680
681
  onError?: SubscriptionErrorCallback;
681
- }) => Readable<T>;
682
+ }) => Readable<T | undefined>;
682
683
  /**
683
684
  * The reactive handle returned by {@link mutation} — the Svelte counterpart to
684
685
  * React's `useMutation`, re-expressed as stores you read with `$`. The surface
package/dist/index.d.ts CHANGED
@@ -653,11 +653,11 @@ declare function flags<T extends Record<string, FlagValue>>(client: LunoraClient
653
653
  *
654
654
  * The store is seeded **synchronously** with `preloaded.value`, so the very
655
655
  * first read (`$store` during hydration) returns the server value with no
656
- * loading flash and no hydration mismatch — there is no `undefined` window and
657
- * no refetch. When the store gains its first subscriber on the client, a live
658
- * WS subscription attaches and every subsequent delta re-emits, exactly like a
659
- * plain `query` store. This is the Svelte equivalent of React's
660
- * `usePreloadedQuery`.
656
+ * loading flash and no hydration mismatch — no `undefined` window (until an
657
+ * identity is retired, see below) and no refetch. When the store gains its
658
+ * first subscriber on the client, a live WS subscription attaches and every
659
+ * subsequent delta re-emits, exactly like a plain `query` store. This is the
660
+ * Svelte equivalent of React's `usePreloadedQuery`.
661
661
  *
662
662
  * Pass `client` explicitly, or omit it to resolve the ambient client published
663
663
  * by `setLunoraClient`. Pass `onError` to surface a subscription-scoped error the
@@ -674,11 +674,12 @@ declare function flags<T extends Record<string, FlagValue>>(client: LunoraClient
674
674
  * After a sign-out or user switch retires that identity
675
675
  * (`client.identityEpoch() > 0`), every `hydratePreloaded` store on the client
676
676
  * (subscribed then or later) stops using it and holds `undefined` until the live
677
- * value arrives — matching `@lunora/react`'s `usePreloadedQuery`.
677
+ * value arrives — matching `@lunora/react`'s `usePreloadedQuery`, hence the
678
+ * `Readable<T | undefined>` type.
678
679
  */
679
680
  declare const hydratePreloaded: <T>(preloaded: Preloaded<T>, client?: LunoraClient, options?: {
680
681
  onError?: SubscriptionErrorCallback;
681
- }) => Readable<T>;
682
+ }) => Readable<T | undefined>;
682
683
  /**
683
684
  * The reactive handle returned by {@link mutation} — the Svelte counterpart to
684
685
  * React's `useMutation`, re-expressed as stores you read with `$`. The surface
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/svelte",
3
- "version": "1.0.0-alpha.184",
3
+ "version": "1.0.0-alpha.185",
4
4
  "description": "Svelte adapter for Lunora — live stores, optimistic mutations, and reactive loaders",
5
5
  "keywords": [
6
6
  "cloudflare",