@syntrologie/runtime-sdk 2.2.0-canary.16 → 2.2.0-canary.17

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.
@@ -1149,6 +1149,7 @@ function showTooltip(anchorEl, overlayRoot, opts) {
1149
1149
  const currentAnchorRef = getAnchorReference(anchorEl);
1150
1150
  const result = await computePosition(currentAnchorRef, div, {
1151
1151
  placement,
1152
+ strategy: "fixed",
1152
1153
  middleware
1153
1154
  });
1154
1155
  const { x, y, strategy, middlewareData, placement: finalPlacement } = result;
@@ -2091,7 +2092,7 @@ function getAntiFlickerSnippet(config = {}) {
2091
2092
  }
2092
2093
 
2093
2094
  // src/version.ts
2094
- var SDK_VERSION = "2.2.0-canary.16";
2095
+ var SDK_VERSION = "2.2.0-canary.17";
2095
2096
 
2096
2097
  // src/types.ts
2097
2098
  var SDK_SCHEMA_VERSION = "2.0";
@@ -4211,7 +4212,7 @@ var _cachedSource;
4211
4212
  var _cachedConf;
4212
4213
  function getEditorSource() {
4213
4214
  var _a2;
4214
- if (_cachedSource === void 0) {
4215
+ if (_cachedSource === void 0 || _cachedSource === null) {
4215
4216
  const globalParams = typeof window !== "undefined" ? window.__SYNTRO_EDITOR_PARAMS__ : null;
4216
4217
  if (globalParams == null ? void 0 : globalParams.token) {
4217
4218
  _cachedSource = { token: globalParams.token, api_base: globalParams.apiBase || "" };
@@ -4219,19 +4220,22 @@ function getEditorSource() {
4219
4220
  `[DIAG] getEditorSource: from __SYNTRO_EDITOR_PARAMS__ (token=${_cachedSource.token.slice(0, 15)}...)`
4220
4221
  );
4221
4222
  } else {
4222
- _cachedSource = decodeParam("editor_source");
4223
+ const decoded = decodeParam("editor_source");
4224
+ if (decoded) {
4225
+ _cachedSource = decoded;
4226
+ }
4223
4227
  console.log(
4224
- `[DIAG] getEditorSource: from URL param \u2192 ${_cachedSource ? `token=${(_a2 = _cachedSource.token) == null ? void 0 : _a2.slice(0, 15)}...` : "NULL"}`
4228
+ `[DIAG] getEditorSource: from URL param \u2192 ${decoded ? `token=${(_a2 = decoded.token) == null ? void 0 : _a2.slice(0, 15)}...` : "NULL"}`
4225
4229
  );
4226
- if (!_cachedSource && typeof window !== "undefined") {
4230
+ if (!decoded && typeof window !== "undefined") {
4227
4231
  console.log(`[DIAG] getEditorSource: URL search = ${window.location.search.slice(0, 200)}`);
4228
4232
  }
4229
4233
  }
4230
4234
  }
4231
- return _cachedSource;
4235
+ return _cachedSource != null ? _cachedSource : null;
4232
4236
  }
4233
4237
  function getEditorConf() {
4234
- if (_cachedConf === void 0) {
4238
+ if (_cachedConf === void 0 || _cachedConf === null) {
4235
4239
  const globalParams = typeof window !== "undefined" ? window.__SYNTRO_EDITOR_PARAMS__ : null;
4236
4240
  if (globalParams == null ? void 0 : globalParams.mode) {
4237
4241
  _cachedConf = {
@@ -4242,13 +4246,16 @@ function getEditorConf() {
4242
4246
  };
4243
4247
  console.log(`[DIAG] getEditorConf: from __SYNTRO_EDITOR_PARAMS__ (mode=${_cachedConf.mode})`);
4244
4248
  } else {
4245
- _cachedConf = decodeParam("editor_conf");
4249
+ const decoded = decodeParam("editor_conf");
4250
+ if (decoded) {
4251
+ _cachedConf = decoded;
4252
+ }
4246
4253
  console.log(
4247
- `[DIAG] getEditorConf: from URL param \u2192 ${_cachedConf ? `mode=${_cachedConf.mode}` : "NULL"}`
4254
+ `[DIAG] getEditorConf: from URL param \u2192 ${decoded ? `mode=${decoded.mode}` : "NULL"}`
4248
4255
  );
4249
4256
  }
4250
4257
  }
4251
- return _cachedConf;
4258
+ return _cachedConf != null ? _cachedConf : null;
4252
4259
  }
4253
4260
  function validateEditorUrl(url) {
4254
4261
  debug("Syntro Runtime", "Validating editor URL:", url);
@@ -8954,6 +8961,21 @@ async function init(options) {
8954
8961
  console.log(`[DIAG] editorSource:`, getEditorSource());
8955
8962
  console.log(`[DIAG] editorConf:`, getEditorConf());
8956
8963
  debug("Syntro Bootstrap", "SDK mode:", sdkMode != null ? sdkMode : "normal");
8964
+ if (!sdkMode && typeof window !== "undefined") {
8965
+ const hasEditorGlobal = !!window.__SYNTRO_EDITOR_PARAMS__;
8966
+ const hasAuditLegend = !!window.__SYNTRO_AUDIT_LEGEND__;
8967
+ const hasReviewData = !!window.__SYNTRO_REVIEW_DATA__;
8968
+ if (hasEditorGlobal || hasAuditLegend || hasReviewData) {
8969
+ const globals = [
8970
+ hasEditorGlobal && "__SYNTRO_EDITOR_PARAMS__",
8971
+ hasAuditLegend && "__SYNTRO_AUDIT_LEGEND__",
8972
+ hasReviewData && "__SYNTRO_REVIEW_DATA__"
8973
+ ].filter(Boolean);
8974
+ console.warn(
8975
+ `[Syntro Bootstrap] \u26A0 Mode detection returned null but mode-specific globals found: ${globals.join(", ")}. This suggests URL params were lost (redirect?) but the service worker injected mode data. Check if replaceState failed or if page JS changed the URL before init().`
8976
+ );
8977
+ }
8978
+ }
8957
8979
  console.log(
8958
8980
  `[DIAG] Token resolution: options.token=${options.token ? options.token.slice(0, 15) + "..." : "null"}`
8959
8981
  );
@@ -9322,4 +9344,4 @@ export {
9322
9344
  encodeToken,
9323
9345
  Syntro
9324
9346
  };
9325
- //# sourceMappingURL=chunk-GOEPJYL6.js.map
9347
+ //# sourceMappingURL=chunk-GQKP6IUV.js.map