@decocms/tanstack 7.66.7 → 7.67.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/tanstack",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.67.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deco framework binding for TanStack Start + Cloudflare Workers",
|
|
6
6
|
"repository": {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"lint:unused": "knip"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@decocms/blocks": "7.
|
|
31
|
-
"@decocms/blocks-admin": "7.
|
|
32
|
-
"@decocms/blocks-cli": "7.
|
|
30
|
+
"@decocms/blocks": "7.67.0",
|
|
31
|
+
"@decocms/blocks-admin": "7.67.0",
|
|
32
|
+
"@decocms/blocks-cli": "7.67.0",
|
|
33
33
|
"@deco-cx/warp-node": "^0.3.16",
|
|
34
34
|
"fast-json-patch": "^3.1.0",
|
|
35
35
|
"ws": "^8.18.0"
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import { Await, ClientOnly } from "@tanstack/react-router";
|
|
12
12
|
import type { SectionOptions } from "@decocms/blocks/cms/client";
|
|
13
13
|
import {
|
|
14
|
+
getDeferredTrigger,
|
|
14
15
|
getResolvedComponent,
|
|
15
16
|
getSectionOptions,
|
|
16
17
|
getSectionRegistry,
|
|
@@ -323,7 +324,19 @@ function DeferredSectionWrapper({
|
|
|
323
324
|
.catch((e) => setError(e));
|
|
324
325
|
};
|
|
325
326
|
|
|
326
|
-
|
|
327
|
+
// `"load"` — dispatch on mount, no scroll needed.
|
|
328
|
+
//
|
|
329
|
+
// This is what Deco on Fresh does: `DispatchAsyncRender` with
|
|
330
|
+
// `partialTriggerMode: "load"` clicks the hidden partial trigger as soon as
|
|
331
|
+
// the island hydrates, so a page ships a light skeleton HTML and then fills
|
|
332
|
+
// in every deferred section about half a second later. Sites migrating from
|
|
333
|
+
// Fresh need it for parity — under `"intersection"` alone, everything below
|
|
334
|
+
// the fold does not exist until the user scrolls: the document stays short
|
|
335
|
+
// and below-the-fold analytics impressions never fire.
|
|
336
|
+
//
|
|
337
|
+
// Opt-in per site via `setAsyncRenderingConfig({ deferredTrigger: "load" })`;
|
|
338
|
+
// the default stays `"intersection"`, so a framework bump changes nothing.
|
|
339
|
+
if (getDeferredTrigger() === "load" || typeof IntersectionObserver === "undefined") {
|
|
327
340
|
load();
|
|
328
341
|
return;
|
|
329
342
|
}
|