@syntrologie/runtime-sdk 2.7.0-canary.3 → 2.7.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.
@@ -3358,7 +3358,7 @@ function getAntiFlickerSnippet(config = {}) {
3358
3358
  }
3359
3359
 
3360
3360
  // src/version.ts
3361
- var SDK_VERSION = "2.7.0-canary.3";
3361
+ var SDK_VERSION = "2.7.0";
3362
3362
 
3363
3363
  // src/types.ts
3364
3364
  var SDK_SCHEMA_VERSION = "2.0";
@@ -6080,9 +6080,8 @@ function validateEditorUrl(url) {
6080
6080
  var getActiveSdkMode = () => {
6081
6081
  const conf = getEditorConf();
6082
6082
  const source = getEditorSource();
6083
- if (!(source == null ? void 0 : source.token) || !conf) return null;
6084
- if (conf.mode === "editor" || conf.mode === "audit" || conf.mode === "review") return conf.mode;
6085
- return null;
6083
+ if (!(source == null ? void 0 : source.token) || !(conf == null ? void 0 : conf.mode)) return null;
6084
+ return conf.mode;
6086
6085
  };
6087
6086
  function getToken() {
6088
6087
  var _a2, _b;
@@ -10860,39 +10859,6 @@ function getEnvVar(name) {
10860
10859
  }
10861
10860
  return void 0;
10862
10861
  }
10863
- function isEditorMode() {
10864
- if (typeof window === "undefined") {
10865
- debug("Syntro Bootstrap", "isEditorMode: not in browser");
10866
- return false;
10867
- }
10868
- const conf = getEditorConf();
10869
- const source = getEditorSource();
10870
- const isEditor = !!((source == null ? void 0 : source.token) && (conf == null ? void 0 : conf.mode) === "editor");
10871
- debug("Syntro Bootstrap", "isEditorMode:", isEditor);
10872
- return isEditor;
10873
- }
10874
- function isAuditMode() {
10875
- if (typeof window === "undefined") {
10876
- debug("Syntro Bootstrap", "isAuditMode: not in browser");
10877
- return false;
10878
- }
10879
- const conf = getEditorConf();
10880
- const source = getEditorSource();
10881
- const isAudit = !!((source == null ? void 0 : source.token) && (conf == null ? void 0 : conf.mode) === "audit");
10882
- debug("Syntro Bootstrap", "isAuditMode:", isAudit);
10883
- return isAudit;
10884
- }
10885
- function isReviewMode() {
10886
- if (typeof window === "undefined") {
10887
- debug("Syntro Bootstrap", "isReviewMode: not in browser");
10888
- return false;
10889
- }
10890
- const conf = getEditorConf();
10891
- const source = getEditorSource();
10892
- const isReview = !!((source == null ? void 0 : source.token) && (conf == null ? void 0 : conf.mode) === "review");
10893
- debug("Syntro Bootstrap", "isReviewMode:", isReview);
10894
- return isReview;
10895
- }
10896
10862
  var SEGMENT_CACHE_KEY = "syntro_segment_attributes";
10897
10863
  function loadCachedSegmentAttributes() {
10898
10864
  if (typeof window === "undefined") return {};
@@ -10975,13 +10941,8 @@ async function init(options) {
10975
10941
  tokenPrefix: `${(_a2 = options.token) == null ? void 0 : _a2.slice(0, 15)}...`,
10976
10942
  hasCanvasOptions: !!options.canvas
10977
10943
  });
10978
- const editorMode = isEditorMode();
10979
- const auditMode = isAuditMode();
10980
- const reviewMode = isReviewMode();
10981
- const sdkMode = editorMode ? "editor" : auditMode ? "audit" : reviewMode ? "review" : null;
10982
- console.log(
10983
- `[DIAG] Mode detection: editor=${editorMode}, audit=${auditMode}, review=${reviewMode}, sdkMode=${sdkMode}`
10984
- );
10944
+ const sdkMode = getActiveSdkMode();
10945
+ console.log(`[DIAG] Mode detection: sdkMode=${sdkMode}`);
10985
10946
  console.log(`[DIAG] editorSource:`, getEditorSource());
10986
10947
  console.log(`[DIAG] editorConf:`, getEditorConf());
10987
10948
  debug("Syntro Bootstrap", "SDK mode:", sdkMode != null ? sdkMode : "normal");
@@ -11099,8 +11060,8 @@ async function init(options) {
11099
11060
  });
11100
11061
  debug("Syntro Bootstrap", "SessionMetricTracker created");
11101
11062
  let runtimeMode = "production";
11102
- if (editorMode) runtimeMode = "editor";
11103
- else if (auditMode) runtimeMode = "audit";
11063
+ if (sdkMode === "editor") runtimeMode = "editor";
11064
+ else if (sdkMode === "audit") runtimeMode = "audit";
11104
11065
  else if (getEnvVar("NODE_ENV") === "development") runtimeMode = "development";
11105
11066
  const runtime3 = createSmartCanvasRuntime({
11106
11067
  telemetry,
@@ -11369,4 +11330,4 @@ export {
11369
11330
  encodeToken,
11370
11331
  Syntro
11371
11332
  };
11372
- //# sourceMappingURL=chunk-T6UFJCU3.js.map
11333
+ //# sourceMappingURL=chunk-UUFNSBJN.js.map