playlight-sdk 0.1.4 → 0.1.5
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/playlight-sdk.es.js
CHANGED
|
@@ -3846,21 +3846,28 @@ function App(e2, t2) {
|
|
|
3846
3846
|
var _a2, _b2, _c2, _d;
|
|
3847
3847
|
push(t2, true);
|
|
3848
3848
|
const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ve, "$discoveryOpen", n2);
|
|
3849
|
-
let i2 = proxy((_b2 = (_a2 = t2.config) == null ? void 0 : _a2.button) == null ? void 0 : _b2.position),
|
|
3849
|
+
let i2, s2 = proxy((_b2 = (_a2 = t2.config) == null ? void 0 : _a2.button) == null ? void 0 : _b2.position), a2 = proxy((_d = (_c2 = t2.config) == null ? void 0 : _c2.button) == null ? void 0 : _d.visible);
|
|
3850
3850
|
function openDiscovery() {
|
|
3851
3851
|
store_set(Ve, true), Qe.trackOpen();
|
|
3852
3852
|
}
|
|
3853
|
-
|
|
3854
|
-
|
|
3853
|
+
Ve.subscribe((e3) => {
|
|
3854
|
+
try {
|
|
3855
|
+
e3 ? (i2 = document.body.style.overflow, document.body.style.overflow = "hidden") : document.body.style.overflow = i2;
|
|
3856
|
+
} catch (e4) {
|
|
3857
|
+
console.error("Failed to toggle body overflow style:", e4);
|
|
3858
|
+
}
|
|
3859
|
+
});
|
|
3860
|
+
var l2 = ht(), c2 = first_child(l2);
|
|
3861
|
+
FloatingButton(c2, {
|
|
3855
3862
|
get position() {
|
|
3856
|
-
return
|
|
3863
|
+
return s2;
|
|
3857
3864
|
},
|
|
3858
3865
|
get visible() {
|
|
3859
|
-
return
|
|
3866
|
+
return a2;
|
|
3860
3867
|
},
|
|
3861
3868
|
onClick: openDiscovery
|
|
3862
3869
|
});
|
|
3863
|
-
var
|
|
3870
|
+
var u2 = sibling(c2, 2), consequent = (e3) => {
|
|
3864
3871
|
const n3 = /* @__PURE__ */ derived(() => {
|
|
3865
3872
|
var _a3, _b3;
|
|
3866
3873
|
return (_b3 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b3.enabled;
|
|
@@ -3871,11 +3878,11 @@ function App(e2, t2) {
|
|
|
3871
3878
|
}
|
|
3872
3879
|
});
|
|
3873
3880
|
};
|
|
3874
|
-
if_block(
|
|
3881
|
+
if_block(u2, (e3) => {
|
|
3875
3882
|
$discoveryOpen() && e3(consequent);
|
|
3876
3883
|
});
|
|
3877
|
-
var
|
|
3878
|
-
const
|
|
3884
|
+
var d2 = sibling(u2, 2);
|
|
3885
|
+
const f2 = /* @__PURE__ */ derived(() => {
|
|
3879
3886
|
var _a3, _b3;
|
|
3880
3887
|
return (_b3 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b3.enabled;
|
|
3881
3888
|
});
|
|
@@ -3891,14 +3898,14 @@ function App(e2, t2) {
|
|
|
3891
3898
|
}, sibling(a3, 2).__mouseover = function handleBottomBarTrigger() {
|
|
3892
3899
|
o3 = "bottom", i3 = Date.now();
|
|
3893
3900
|
}, append(e3, s3), pop();
|
|
3894
|
-
}(
|
|
3901
|
+
}(d2, {
|
|
3895
3902
|
get enabled() {
|
|
3896
|
-
return get$1(
|
|
3903
|
+
return get$1(f2);
|
|
3897
3904
|
},
|
|
3898
3905
|
onIntent: () => {
|
|
3899
3906
|
$discoveryOpen() || openDiscovery();
|
|
3900
3907
|
}
|
|
3901
|
-
}), Toaster(sibling(
|
|
3908
|
+
}), Toaster(sibling(d2, 2), {}), append(e2, l2), pop(), o2();
|
|
3902
3909
|
}
|
|
3903
3910
|
const mt = {
|
|
3904
3911
|
button: {
|
|
@@ -3949,10 +3956,10 @@ const yt = new (_c = class {
|
|
|
3949
3956
|
}
|
|
3950
3957
|
/**
|
|
3951
3958
|
* Show or hide the discovery
|
|
3952
|
-
* @param {boolean} value - Whether to show the discovery
|
|
3959
|
+
* @param {boolean} [value=true] - Whether to show the discovery
|
|
3953
3960
|
*/
|
|
3954
|
-
setDiscovery(e2) {
|
|
3955
|
-
this.isInitialized && (Ve.set(e2),
|
|
3961
|
+
setDiscovery(e2 = true) {
|
|
3962
|
+
this.isInitialized && (Ve.set(e2), e2 && Qe.trackOpen());
|
|
3956
3963
|
}
|
|
3957
3964
|
}, _PlaylightSDK_instances = new WeakSet(), /**
|
|
3958
3965
|
* Mount the Svelte app to the playlight container
|