@decocms/tanstack 7.53.0 → 7.55.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 +4 -4
- package/src/hooks/DecoRootLayout.tsx +15 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/tanstack",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.55.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deco framework binding for TanStack Start + Cloudflare Workers",
|
|
6
6
|
"repository": {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"lint:unused": "knip"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@decocms/blocks": "7.
|
|
28
|
-
"@decocms/blocks-admin": "7.
|
|
29
|
-
"@decocms/blocks-cli": "7.
|
|
27
|
+
"@decocms/blocks": "7.55.0",
|
|
28
|
+
"@decocms/blocks-admin": "7.55.0",
|
|
29
|
+
"@decocms/blocks-cli": "7.55.0",
|
|
30
30
|
"@deco-cx/warp-node": "^0.3.16",
|
|
31
31
|
"fast-json-patch": "^3.1.0",
|
|
32
32
|
"ws": "^8.18.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, type ReactNode } from "react";
|
|
2
2
|
import { HeadContent, Scripts, ScriptOnce, useRouterState } from "@tanstack/react-router";
|
|
3
|
-
import { LiveControls } from "@decocms/blocks/hooks";
|
|
3
|
+
import { LiveControls, Stats } from "@decocms/blocks/hooks";
|
|
4
4
|
import {
|
|
5
5
|
ANALYTICS_SCRIPT,
|
|
6
6
|
SPECULATION_DEV_WARN_SCRIPT,
|
|
@@ -161,6 +161,20 @@ export function DecoRootLayout({
|
|
|
161
161
|
</head>
|
|
162
162
|
<body className={bodyClassName} suppressHydrationWarning>
|
|
163
163
|
<ScriptOnce children={buildDecoEventsBootstrap(account)} />
|
|
164
|
+
{/*
|
|
165
|
+
* AFTER the bootstrap above, and in the body rather than the head. The collector's
|
|
166
|
+
* deco module subscribes with `window?.DECO?.events?.subscribe?.(…)` — once,
|
|
167
|
+
* optional-chained, with no retry. In the head it is an `async` script the parser
|
|
168
|
+
* can reach and run before the inline bootstrap below it has defined
|
|
169
|
+
* `DECO.events`, and the subscription would simply not happen: pageviews would
|
|
170
|
+
* still flow while every commerce event went nowhere, with no error. Here the
|
|
171
|
+
* parser has already executed the bootstrap.
|
|
172
|
+
*
|
|
173
|
+
* Rendering unconditionally is safe — the component returns null unless
|
|
174
|
+
* DECO_ANALYTICS_ENABLED is exactly "true", which is what makes this an env-var
|
|
175
|
+
* change for a site instead of a code change.
|
|
176
|
+
*/}
|
|
177
|
+
<Stats />
|
|
164
178
|
<NavigationProgress />
|
|
165
179
|
<main>
|
|
166
180
|
<StableOutlet />
|