@syntrologie/runtime-sdk 2.6.0-canary.6 → 2.6.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.
- package/dist/{chunk-6KBZVVD3.js → chunk-KETP7BVG.js} +23 -12
- package/dist/chunk-KETP7BVG.js.map +7 -0
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/dist/smart-canvas.esm.js +23 -23
- package/dist/smart-canvas.esm.js.map +3 -3
- package/dist/smart-canvas.js +23 -12
- package/dist/smart-canvas.js.map +3 -3
- package/dist/smart-canvas.min.js +23 -23
- package/dist/smart-canvas.min.js.map +3 -3
- package/dist/version.d.ts +1 -1
- package/package.json +7 -7
- package/dist/chunk-6KBZVVD3.js.map +0 -7
|
@@ -3358,7 +3358,7 @@ function getAntiFlickerSnippet(config = {}) {
|
|
|
3358
3358
|
}
|
|
3359
3359
|
|
|
3360
3360
|
// src/version.ts
|
|
3361
|
-
var SDK_VERSION = "2.6.0
|
|
3361
|
+
var SDK_VERSION = "2.6.0";
|
|
3362
3362
|
|
|
3363
3363
|
// src/types.ts
|
|
3364
3364
|
var SDK_SCHEMA_VERSION = "2.0";
|
|
@@ -3526,9 +3526,12 @@ function getVariantFlagKeys(experiments, manifestKey, variantFlagPrefix) {
|
|
|
3526
3526
|
if (keys && keys.length > 0) return keys;
|
|
3527
3527
|
}
|
|
3528
3528
|
}
|
|
3529
|
-
if (
|
|
3529
|
+
if (experiments.getAllFeatures) {
|
|
3530
3530
|
const all = experiments.getAllFeatures();
|
|
3531
|
-
|
|
3531
|
+
if (variantFlagPrefix) {
|
|
3532
|
+
return Object.keys(all).filter((k) => k.startsWith(variantFlagPrefix));
|
|
3533
|
+
}
|
|
3534
|
+
return Object.keys(all);
|
|
3532
3535
|
}
|
|
3533
3536
|
return [];
|
|
3534
3537
|
}
|
|
@@ -3550,7 +3553,7 @@ var createCanvasConfigFetcher = ({
|
|
|
3550
3553
|
return directConfig;
|
|
3551
3554
|
}
|
|
3552
3555
|
}
|
|
3553
|
-
if (experiments && (manifestKey || variantFlagPrefix)) {
|
|
3556
|
+
if (experiments && (manifestKey || variantFlagPrefix || experiments.getAllFeatures)) {
|
|
3554
3557
|
const variantKeys = getVariantFlagKeys(experiments, manifestKey, variantFlagPrefix);
|
|
3555
3558
|
if (variantKeys.length > 0) {
|
|
3556
3559
|
const resolved = resolveVariantConfigs(experiments, variantKeys);
|
|
@@ -6709,7 +6712,7 @@ var GrowthBookAdapter = class {
|
|
|
6709
6712
|
await this.gb.loadFeatures();
|
|
6710
6713
|
}
|
|
6711
6714
|
setAttributes(attrs) {
|
|
6712
|
-
this.gb.setAttributes(attrs);
|
|
6715
|
+
this.gb.setAttributes({ ...this.gb.getAttributes(), ...attrs });
|
|
6713
6716
|
}
|
|
6714
6717
|
setForcedVariations(variations) {
|
|
6715
6718
|
this.gb.setForcedVariations(variations);
|
|
@@ -9620,10 +9623,15 @@ var StateStore = class {
|
|
|
9620
9623
|
__publicField(this, "namespacedStorages", /* @__PURE__ */ new Map());
|
|
9621
9624
|
var _a2;
|
|
9622
9625
|
this.namespace = (_a2 = options.namespace) != null ? _a2 : DEFAULT_NAMESPACE;
|
|
9623
|
-
const isUsable = (s) => typeof s === "object" && s !== null && typeof s.setItem === "function";
|
|
9624
9626
|
if (typeof window !== "undefined") {
|
|
9625
|
-
this.session =
|
|
9626
|
-
|
|
9627
|
+
this.session = createBrowserStorage(
|
|
9628
|
+
typeof sessionStorage !== "undefined" ? sessionStorage : void 0,
|
|
9629
|
+
this.namespace
|
|
9630
|
+
);
|
|
9631
|
+
this.user = createBrowserStorage(
|
|
9632
|
+
typeof localStorage !== "undefined" ? localStorage : void 0,
|
|
9633
|
+
this.namespace
|
|
9634
|
+
);
|
|
9627
9635
|
} else {
|
|
9628
9636
|
this.session = createMemoryStorage(this.namespace);
|
|
9629
9637
|
this.user = createMemoryStorage(this.namespace);
|
|
@@ -10722,7 +10730,7 @@ var ExperimentsFetcher = class {
|
|
|
10722
10730
|
}
|
|
10723
10731
|
}
|
|
10724
10732
|
}
|
|
10725
|
-
if (this.manifestKey || this.variantFlagPrefix) {
|
|
10733
|
+
if (this.manifestKey || this.variantFlagPrefix || this.client.getAllFeatures) {
|
|
10726
10734
|
const config2 = this.fetchMultiFlag();
|
|
10727
10735
|
if (config2) {
|
|
10728
10736
|
const fetchTimeMs2 = performance.now() - start;
|
|
@@ -10773,9 +10781,12 @@ var ExperimentsFetcher = class {
|
|
|
10773
10781
|
}
|
|
10774
10782
|
}
|
|
10775
10783
|
}
|
|
10776
|
-
if (this.
|
|
10784
|
+
if (this.client.getAllFeatures) {
|
|
10777
10785
|
const allFeatures = this.client.getAllFeatures();
|
|
10778
|
-
|
|
10786
|
+
if (this.variantFlagPrefix) {
|
|
10787
|
+
return Object.keys(allFeatures).filter((key) => key.startsWith(this.variantFlagPrefix));
|
|
10788
|
+
}
|
|
10789
|
+
return Object.keys(allFeatures);
|
|
10779
10790
|
}
|
|
10780
10791
|
return [];
|
|
10781
10792
|
}
|
|
@@ -11363,4 +11374,4 @@ export {
|
|
|
11363
11374
|
encodeToken,
|
|
11364
11375
|
Syntro
|
|
11365
11376
|
};
|
|
11366
|
-
//# sourceMappingURL=chunk-
|
|
11377
|
+
//# sourceMappingURL=chunk-KETP7BVG.js.map
|