@decocms/tanstack 7.85.3 → 7.85.4

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.85.3",
3
+ "version": "7.85.4",
4
4
  "type": "module",
5
5
  "description": "Deco framework binding for TanStack Start + Cloudflare Workers",
6
6
  "repository": {
@@ -26,9 +26,9 @@
26
26
  "lint:unused": "knip"
27
27
  },
28
28
  "dependencies": {
29
- "@decocms/blocks": "7.85.3",
30
- "@decocms/blocks-admin": "7.85.3",
31
- "@decocms/blocks-cli": "7.85.3"
29
+ "@decocms/blocks": "7.85.4",
30
+ "@decocms/blocks-admin": "7.85.4",
31
+ "@decocms/blocks-cli": "7.85.4"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@tanstack/react-query": ">=5.0.0",
@@ -91,6 +91,7 @@ import { RequestContext } from "@decocms/blocks/sdk/requestContext";
91
91
  import { createResponseCache } from "@decocms/blocks/sdk/responseCache";
92
92
  import { cleanPathForCacheKey, hasTrackingParams } from "@decocms/blocks/sdk/urlUtils";
93
93
  import { type Device, isMobileUA } from "@decocms/blocks/sdk/useDevice";
94
+ import { LIVE_CONTROLS_SCRIPT } from "@decocms/blocks-admin/admin/liveControls";
94
95
  import { getRenderShellConfig, setMetaAssetFetcher } from "@decocms/blocks-admin/admin/setup";
95
96
  import { reconfigureAppsOnce } from "@decocms/blocks-admin/apps/autoconfig";
96
97
  import { buildHtmlShell } from "@decocms/blocks-admin/sdk/htmlShell";
@@ -709,24 +710,8 @@ export interface DecoWorkerEntryOptions {
709
710
  // Constants
710
711
  // ---------------------------------------------------------------------------
711
712
 
712
- const PREVIEW_SHELL_SCRIPT = `(function() {
713
- if (window.__DECO_LIVE_CONTROLS__) return;
714
- window.__DECO_LIVE_CONTROLS__ = true;
715
- addEventListener("message", function(event) {
716
- var data = event.data;
717
- if (!data || typeof data !== "object") return;
718
- switch (data.type) {
719
- case "editor::inject":
720
- if (data.args && data.args.script) {
721
- try { eval(data.args.script); } catch(e) { console.error("[deco] inject error:", e); }
722
- }
723
- break;
724
- }
725
- });
726
- })();`;
727
-
728
713
  function buildPreviewShell(): string {
729
- return buildHtmlShell({ script: PREVIEW_SHELL_SCRIPT });
714
+ return buildHtmlShell({ script: LIVE_CONTROLS_SCRIPT });
730
715
  }
731
716
 
732
717
  // ---------------------------------------------------------------------------