@shipeasy/sdk 2.1.13 → 2.1.14

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.
@@ -798,9 +798,18 @@ function labelAttrs(key, variables, desc) {
798
798
  }
799
799
  var _createElement = null;
800
800
  var _I18N_SSR_SYM = /* @__PURE__ */ Symbol.for("@shipeasy/sdk:ssr-i18n");
801
+ var _I18N_CACHE_SYM = /* @__PURE__ */ Symbol.for("@shipeasy/sdk:ssr-i18n-cache");
801
802
  var _EDIT_MODE_SSR_SYM = /* @__PURE__ */ Symbol.for("@shipeasy/sdk:ssr-edit-mode");
802
803
  function getSSRI18nStore() {
803
- return globalThis[_I18N_SSR_SYM]?.() ?? null;
804
+ const fromGetter = globalThis[_I18N_SSR_SYM]?.();
805
+ if (fromGetter && Object.keys(fromGetter.strings).length > 0) return fromGetter;
806
+ const cache = globalThis[_I18N_CACHE_SYM];
807
+ if (cache) {
808
+ for (const v of cache.values()) {
809
+ if (Object.keys(v.strings).length > 0) return v;
810
+ }
811
+ }
812
+ return fromGetter ?? null;
804
813
  }
805
814
  var _EDIT_MODE_FALLBACK_SYM = /* @__PURE__ */ Symbol.for("@shipeasy/sdk:ssr-edit-mode-fallback");
806
815
  function isEditLabelsMode() {
@@ -755,9 +755,18 @@ function labelAttrs(key, variables, desc) {
755
755
  }
756
756
  var _createElement = null;
757
757
  var _I18N_SSR_SYM = /* @__PURE__ */ Symbol.for("@shipeasy/sdk:ssr-i18n");
758
+ var _I18N_CACHE_SYM = /* @__PURE__ */ Symbol.for("@shipeasy/sdk:ssr-i18n-cache");
758
759
  var _EDIT_MODE_SSR_SYM = /* @__PURE__ */ Symbol.for("@shipeasy/sdk:ssr-edit-mode");
759
760
  function getSSRI18nStore() {
760
- return globalThis[_I18N_SSR_SYM]?.() ?? null;
761
+ const fromGetter = globalThis[_I18N_SSR_SYM]?.();
762
+ if (fromGetter && Object.keys(fromGetter.strings).length > 0) return fromGetter;
763
+ const cache = globalThis[_I18N_CACHE_SYM];
764
+ if (cache) {
765
+ for (const v of cache.values()) {
766
+ if (Object.keys(v.strings).length > 0) return v;
767
+ }
768
+ }
769
+ return fromGetter ?? null;
761
770
  }
762
771
  var _EDIT_MODE_FALLBACK_SYM = /* @__PURE__ */ Symbol.for("@shipeasy/sdk:ssr-edit-mode-fallback");
763
772
  function isEditLabelsMode() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipeasy/sdk",
3
- "version": "2.1.13",
3
+ "version": "2.1.14",
4
4
  "description": "Shipeasy SDK — feature gates, runtime configs, experiments, and metrics for the Shipeasy hosted service.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://shipeasy.ai",