@vertz/ui 0.2.34 → 0.2.35

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.
@@ -1018,12 +1018,33 @@ function query(source, options = {}) {
1018
1018
  let ssrHydrated = false;
1019
1019
  let navPrefetchDeferred = false;
1020
1020
  if (!isSSR() && initialData === undefined) {
1021
- const hydrationKey = customKey ?? baseKey;
1021
+ let hydrationKey;
1022
+ const hasSSRData = !!globalThis.__VERTZ_SSR_DATA__;
1023
+ if (customKey) {
1024
+ hydrationKey = customKey;
1025
+ } else if (hasSSRData) {
1026
+ try {
1027
+ const raw = callThunkWithCapture();
1028
+ if (raw !== null) {
1029
+ if (isQueryDescriptor(raw)) {
1030
+ if (raw._entity && !entityMeta) {
1031
+ entityMeta = raw._entity;
1032
+ }
1033
+ } else {
1034
+ raw.catch(() => {});
1035
+ }
1036
+ }
1037
+ } catch {}
1038
+ hydrationKey = getCacheKey();
1039
+ } else {
1040
+ hydrationKey = baseKey;
1041
+ }
1022
1042
  const isNavigation = isNavPrefetchActive();
1023
1043
  ssrHydrationCleanup = hydrateQueryFromSSR(hydrationKey, (result) => {
1024
1044
  normalizeToEntityStore(result);
1025
1045
  rawData.value = result;
1026
1046
  loading.value = false;
1047
+ idle.value = false;
1027
1048
  cache.set(hydrationKey, result);
1028
1049
  ssrHydrated = true;
1029
1050
  }, { persistent: isNavigation });
package/dist/src/index.js CHANGED
@@ -66,7 +66,7 @@ import {
66
66
  query,
67
67
  registerRelationSchema,
68
68
  resetRelationSchemas_TEST_ONLY
69
- } from "../shared/chunk-rdz5k67m.js";
69
+ } from "../shared/chunk-25nwt5fm.js";
70
70
  import"../shared/chunk-jrtrk5z4.js";
71
71
  import {
72
72
  ThemeProvider,
@@ -20,7 +20,7 @@ import {
20
20
  MemoryCache,
21
21
  QueryEnvelopeStore,
22
22
  deriveKey
23
- } from "../shared/chunk-rdz5k67m.js";
23
+ } from "../shared/chunk-25nwt5fm.js";
24
24
  import"../shared/chunk-jrtrk5z4.js";
25
25
  import {
26
26
  ALIGNMENT_MAP,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  query
3
- } from "../../shared/chunk-rdz5k67m.js";
3
+ } from "../../shared/chunk-25nwt5fm.js";
4
4
  import"../../shared/chunk-jrtrk5z4.js";
5
5
  import"../../shared/chunk-pv0apt9z.js";
6
6
  import"../../shared/chunk-sjypbv24.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertz/ui",
3
- "version": "0.2.34",
3
+ "version": "0.2.35",
4
4
  "description": "Vertz UI framework — signals, components, JSX runtime",
5
5
  "license": "MIT",
6
6
  "repository": {