@tokenoftrust/storefront-runner 6.10.0 → 6.11.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.
@@ -578,8 +578,9 @@ const footerWidgets = await renderWidgetSlot(
578
578
  root-absolute links inside that prefix so navigation stays on the
579
579
  tenant. Host-routed requests have no base path and skip this entirely. */}
580
580
  <script>
581
- import { bindBasePathAnchors } from "@/lib/publication/shared/basePath";
582
- bindBasePathAnchors();
581
+ void import("@/lib/publication/shared/basePath")
582
+ .then(({ bindBasePathAnchors }) => bindBasePathAnchors())
583
+ .catch(() => console.warn("[storefront] bindBasePathAnchors failed to start"));
583
584
  </script>
584
585
 
585
586
  {/* Dev-loop theme hot-patch: tenant-hot-reload.mjs broadcasts a
@@ -603,8 +604,9 @@ const footerWidgets = await renderWidgetSlot(
603
604
  `[data-tot-widget-origin]` frames itself, so it doesn't need to know
604
605
  which slots rendered above. */}
605
606
  <script>
606
- import { mountWidgetPostMessageBridge } from "@tot/public-runtime";
607
- mountWidgetPostMessageBridge();
607
+ void import("@tot/public-runtime/widget-postmessage")
608
+ .then(({ mountWidgetPostMessageBridge }) => mountWidgetPostMessageBridge())
609
+ .catch(() => console.warn("[storefront] mountWidgetPostMessageBridge failed to start"));
608
610
  </script>
609
611
 
610
612
  {/* Scroll-reveal. Initial-viewport blocks stay visible (no .is-below).
@@ -647,8 +649,9 @@ const footerWidgets = await renderWidgetSlot(
647
649
  where PerformanceObserver is absent. This is the per-route-template
648
650
  signal the `core-web-vitals` monitor consumes. */}
649
651
  <script>
650
- import { startConsentGatedWebVitals } from "@/lib/observability/performance/webVitals";
651
- startConsentGatedWebVitals();
652
+ void import("@/lib/observability/performance/webVitals")
653
+ .then(({ startConsentGatedWebVitals }) => startConsentGatedWebVitals())
654
+ .catch(() => console.warn("[storefront] startConsentGatedWebVitals failed to start"));
652
655
  </script>
653
656
 
654
657
  {/* Protected-surface tamper sentinel (ext-policy-09, D-R7) — a DETECTIVE
@@ -659,8 +662,9 @@ const footerWidgets = await renderWidgetSlot(
659
662
  suspends the attributable integration. No-ops when no integration plan is
660
663
  present. */}
661
664
  <script>
662
- import { bootTamperSentinel } from "@/lib/compliance/tamper-sentinel-boot";
663
- bootTamperSentinel();
665
+ void import("@/lib/compliance/tamper-sentinel-boot")
666
+ .then(({ bootTamperSentinel }) => bootTamperSentinel())
667
+ .catch(() => console.warn("[storefront] bootTamperSentinel failed to start"));
664
668
  </script>
665
669
 
666
670
  {/* Declarative interaction tracking (dt-contract-v1) — ONE delegated click
@@ -16,14 +16,13 @@ import {
16
16
  PROTECTED_SURFACE_ATTR,
17
17
  type TamperSink,
18
18
  } from "./tamper-sentinel";
19
+ import type { ProtectedSurface } from "@tot/public-runtime/compliance-obligations";
19
20
  import type {
20
- ProtectedSurface,
21
21
  TamperAttribution,
22
22
  TamperEvidenceBeacon,
23
- IntegrationEnvironment,
24
- IntegrationSiteSurface,
25
- } from "@tot/public-runtime";
26
- import { INTEGRATION_PLAN_GLOBAL } from "@tot/public-runtime";
23
+ } from "@tot/public-runtime/integration/tamper-evidence";
24
+ import type { IntegrationEnvironment, IntegrationSiteSurface } from "@tot/public-runtime/integration/environment";
25
+ import { INTEGRATION_PLAN_GLOBAL } from "@tot/public-runtime/integration/render-phases";
27
26
  import { withClientApiBase } from "@/lib/publication/shared/basePath";
28
27
 
29
28
  /** Where the browser posts a tamper beacon; the server receiver records + suspends. */
@@ -26,14 +26,12 @@
26
26
  import {
27
27
  buildTamperEvidenceBeacon,
28
28
  attributeSoleSuspect,
29
- PROTECTED_SURFACES,
30
- type ProtectedSurface,
31
29
  type TamperKind,
32
30
  type TamperAttribution,
33
31
  type TamperEvidenceBeacon,
34
- type IntegrationEnvironment,
35
- type IntegrationSiteSurface,
36
- } from "@tot/public-runtime";
32
+ } from "@tot/public-runtime/integration/tamper-evidence";
33
+ import { PROTECTED_SURFACES, type ProtectedSurface } from "@tot/public-runtime/compliance-obligations";
34
+ import type { IntegrationEnvironment, IntegrationSiteSurface } from "@tot/public-runtime/integration/environment";
37
35
 
38
36
  /** The DOM marker a protected surface stamps; its value is a `ProtectedSurface`. */
39
37
  export const PROTECTED_SURFACE_ATTR = "data-tot-protected-surface";
@@ -28,12 +28,12 @@
28
28
  * budget gate and regression alert (`rumAlert.ts`) reason over.
29
29
  */
30
30
  import { classifyPath, PERF_BUDGETS, type PerfBudgetManifest, type RouteClass } from "./perfBudgets.js";
31
+ import { INTEGRATION_CONSENT_GLOBAL } from "@tot/public-runtime/integration/render-phases";
31
32
  import {
32
- INTEGRATION_CONSENT_GLOBAL,
33
33
  VIEWER_ANALYTICS_CONSENT_CHANGE_EVENT,
34
34
  isPurposeEligible,
35
35
  parseConsentSnapshot,
36
- } from "@tot/public-runtime";
36
+ } from "@tot/public-runtime/integration/consent-broker";
37
37
  import { withClientApiBase } from "@/lib/publication/shared/basePath";
38
38
 
39
39
  /** The three field metrics we collect. INP is field-only (no lab equivalent). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/storefront-runner",
3
- "version": "6.10.0",
3
+ "version": "6.11.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
6
6
  "packageManager": "pnpm@11.9.0",
@@ -5,10 +5,17 @@
5
5
  "private": true,
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "type": "module",
8
+ "sideEffects": false,
8
9
  "main": "./src/index.ts",
9
10
  "types": "./src/index.ts",
10
11
  "exports": {
11
12
  ".": "./src/index.ts",
13
+ "./widget-postmessage": "./src/widget-postmessage.ts",
14
+ "./compliance-obligations": "./src/compliance-obligations.ts",
15
+ "./integration/consent-broker": "./src/integration/consent-broker.ts",
16
+ "./integration/environment": "./src/integration/environment.ts",
17
+ "./integration/render-phases": "./src/integration/render-phases.ts",
18
+ "./integration/tamper-evidence": "./src/integration/tamper-evidence.ts",
12
19
  "./blog-visibility": "./src/blog-visibility.mjs",
13
20
  "./sitemap-index": "./src/sitemap-index.mjs",
14
21
  "./preview-url": "./src/preview-url.mjs",