@syntrologie/runtime-sdk 2.8.0-canary.159 → 2.8.0-canary.160

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/dist/index.js CHANGED
@@ -8190,7 +8190,7 @@ function error(prefix, message, data) {
8190
8190
  }
8191
8191
 
8192
8192
  // src/version.ts
8193
- var SDK_VERSION = "2.8.0-canary.159";
8193
+ var SDK_VERSION = "2.8.0-canary.160";
8194
8194
 
8195
8195
  // src/types.ts
8196
8196
  var SDK_SCHEMA_VERSION = "2.0";
@@ -16190,7 +16190,7 @@ async function _initCore(options) {
16190
16190
  }
16191
16191
  const warnedAppFailures = /* @__PURE__ */ new Set();
16192
16192
  const appLoadingFetcher = baseFetcher ? async () => {
16193
- var _a4, _b2, _c2, _d2, _e3, _f2, _g2, _h2, _i2, _j2, _k2, _l2;
16193
+ var _a4, _b2, _c2, _d2, _e3, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m;
16194
16194
  const config = await baseFetcher();
16195
16195
  const tileCount = (_b2 = (_a4 = config.tiles) == null ? void 0 : _a4.length) != null ? _b2 : 0;
16196
16196
  const actionCount = (_d2 = (_c2 = config.actions) == null ? void 0 : _c2.length) != null ? _d2 : 0;
@@ -16203,22 +16203,27 @@ async function _initCore(options) {
16203
16203
  }
16204
16204
  }
16205
16205
  if (telemetry && variantId) {
16206
- const tracker = new InterventionTracker(telemetry, variantId);
16207
- tracker.trackServed(tileCount, actionCount);
16208
- if (typeof window !== "undefined") {
16209
- window.SynOS.interventionTracker = tracker;
16206
+ const synOS = typeof window !== "undefined" ? (_f2 = window.SynOS) != null ? _f2 : window.SynOS = {} : void 0;
16207
+ const existing = synOS == null ? void 0 : synOS.interventionTracker;
16208
+ let tracker;
16209
+ if (existing && existing.variantId === variantId) {
16210
+ tracker = existing;
16211
+ } else {
16212
+ tracker = new InterventionTracker(telemetry, variantId);
16213
+ if (synOS) synOS.interventionTracker = tracker;
16214
+ runtime5.navigation.subscribe(() => {
16215
+ tracker.resetPage();
16216
+ });
16210
16217
  }
16211
- runtime5.navigation.subscribe(() => {
16212
- tracker.resetPage();
16213
- });
16218
+ tracker.trackServed(tileCount, actionCount);
16214
16219
  }
16215
16220
  console.log(
16216
16221
  "[Syntro Bootstrap] Config fetched:",
16217
- `tiles=${(_g2 = (_f2 = config.tiles) == null ? void 0 : _f2.length) != null ? _g2 : 0},`,
16218
- `actions=${(_i2 = (_h2 = config.actions) == null ? void 0 : _h2.length) != null ? _i2 : 0},`,
16219
- `theme=${(_k2 = (_j2 = config.theme) == null ? void 0 : _j2.name) != null ? _k2 : "none"}`
16222
+ `tiles=${(_h2 = (_g2 = config.tiles) == null ? void 0 : _g2.length) != null ? _h2 : 0},`,
16223
+ `actions=${(_j2 = (_i2 = config.actions) == null ? void 0 : _i2.length) != null ? _j2 : 0},`,
16224
+ `theme=${(_l2 = (_k2 = config.theme) == null ? void 0 : _k2.name) != null ? _l2 : "none"}`
16220
16225
  );
16221
- if (((_l2 = config.actions) == null ? void 0 : _l2.length) > 0) {
16226
+ if (((_m = config.actions) == null ? void 0 : _m.length) > 0) {
16222
16227
  console.log(
16223
16228
  "[Syntro Bootstrap] Actions in config:",
16224
16229
  config.actions.map(