labellife-design-tool 2.5.1 → 2.5.3

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.
@@ -422,9 +422,14 @@ function t(key, defaultValue) {
422
422
  }
423
423
 
424
424
  // ── Backend API base URL (used by background-panel.js's Unsplash proxy calls) ─
425
- var _apiBaseUrl = '';
425
+ // Window-level singleton, same reasoning as translations/input-fields config above:
426
+ // each Rollup output bundle (index, side-panel, toolbar, canvas...) gets its own copy
427
+ // of this module, so a plain closure variable set from one bundle (e.g. via the host
428
+ // app's top-level `labellife-design-tool/config` import) would never be seen by another
429
+ // bundle (e.g. background-panel.js, built into the side-panel bundle).
430
+ var API_BASE_URL_KEY = '__labellife_api_base_url__';
426
431
  function getApiBaseUrl() {
427
- return _apiBaseUrl;
432
+ return typeof window !== 'undefined' && window[API_BASE_URL_KEY] || '';
428
433
  }
429
434
 
430
435
  // ── Input Fields Dialog Config ───────────────────────────────────────