playlight-sdk 0.1.11 → 0.2.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.
@@ -280,13 +280,13 @@ function proxy(e2, t2 = null, o2) {
280
280
  function update_version(e2, t2 = 1) {
281
281
  set(e2, e2.v + t2);
282
282
  }
283
- var q, P, O, D, E;
283
+ var q, P, D, O, E;
284
284
  function create_text(e2 = "") {
285
285
  return document.createTextNode(e2);
286
286
  }
287
287
  // @__NO_SIDE_EFFECTS__
288
288
  function get_first_child(e2) {
289
- return D.call(e2);
289
+ return O.call(e2);
290
290
  }
291
291
  // @__NO_SIDE_EFFECTS__
292
292
  function get_next_sibling(e2) {
@@ -1103,7 +1103,7 @@ function template(e2, t2) {
1103
1103
  /* @__PURE__ */ get_first_child(n2)));
1104
1104
  var t3 = (
1105
1105
  /** @type {TemplateNode} */
1106
- s2 || O ? document.importNode(n2, true) : n2.cloneNode(true)
1106
+ s2 || D ? document.importNode(n2, true) : n2.cloneNode(true)
1107
1107
  );
1108
1108
  o2 ? assign_nodes(
1109
1109
  /** @type {TemplateNode} */
@@ -1167,9 +1167,9 @@ function mount(e2, t2) {
1167
1167
  */
1168
1168
  function init_operations() {
1169
1169
  if (void 0 === q) {
1170
- q = window, P = document, O = /Firefox/.test(navigator.userAgent);
1170
+ q = window, P = document, D = /Firefox/.test(navigator.userAgent);
1171
1171
  var e4 = Element.prototype, t4 = Node.prototype;
1172
- D = a(t4, "firstChild").get, // @ts-ignore
1172
+ O = a(t4, "firstChild").get, // @ts-ignore
1173
1173
  E = a(t4, "nextSibling").get, // the following assignments improve perf of lookups on DOM nodes
1174
1174
  // @ts-expect-error
1175
1175
  e4.__click = void 0, // @ts-expect-error
@@ -2261,67 +2261,6 @@ function Loader_circle(e2, t2) {
2261
2261
  }
2262
2262
  }));
2263
2263
  }
2264
- var on_click$3 = (e2, t2) => {
2265
- var _a2;
2266
- (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2);
2267
- }, Ce = /* @__PURE__ */ template('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="absolute bottom-0 left-0 h-full w-0 bg-background transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');
2268
- function FloatingButton(e2, t2) {
2269
- push(t2, true);
2270
- let n2 = prop(t2, "position", 3, "bottom-right"), o2 = prop(t2, "visible", 3, true);
2271
- var s2 = comment(), i2 = first_child(s2), consequent = (e3) => {
2272
- var o3 = Ce();
2273
- o3.__click = [on_click$3, t2];
2274
- var s3 = child(o3);
2275
- !function Gamepad(e4, t3) {
2276
- const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
2277
- Icon$1(e4, spread_props({
2278
- name: "gamepad"
2279
- }, () => n3, {
2280
- iconNode: [["line", {
2281
- x1: "6",
2282
- x2: "10",
2283
- y1: "12",
2284
- y2: "12"
2285
- }], ["line", {
2286
- x1: "8",
2287
- x2: "8",
2288
- y1: "10",
2289
- y2: "14"
2290
- }], ["line", {
2291
- x1: "15",
2292
- x2: "15.01",
2293
- y1: "13",
2294
- y2: "13"
2295
- }], ["line", {
2296
- x1: "18",
2297
- x2: "18.01",
2298
- y1: "11",
2299
- y2: "11"
2300
- }], ["rect", {
2301
- width: "20",
2302
- height: "12",
2303
- x: "2",
2304
- y: "6",
2305
- rx: "2"
2306
- }]],
2307
- children: (e5, n4) => {
2308
- var o4 = comment();
2309
- slot(first_child(o4), t3, "default", {}, null), append(e5, o4);
2310
- },
2311
- $$slots: {
2312
- default: true
2313
- }
2314
- }));
2315
- }(child(s3), {
2316
- size: 26,
2317
- strokeWidth: 1.75,
2318
- class: "z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"
2319
- }), template_effect(() => set_class(o3, 1, `fixed ${("bottom-left" == n2() ? "bottom-4 left-4" : "bottom-right" == n2() ? "right-4 bottom-4" : "") ?? ""} group children-text-white z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold text-background uppercase shadow-lg transition-all hover:scale-105`, "svelte-1j97rta")), append(e3, o3);
2320
- };
2321
- if_block(i2, (e3) => {
2322
- o2() && e3(consequent);
2323
- }), append(e2, s2), pop();
2324
- }
2325
2264
  function cubic_out(e2) {
2326
2265
  const t2 = e2 - 1;
2327
2266
  return t2 * t2 * t2 + 1;
@@ -2381,6 +2320,67 @@ function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out,
2381
2320
  `
2382
2321
  };
2383
2322
  }
2323
+ var on_click$3 = (e2, t2) => {
2324
+ var _a2;
2325
+ (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2);
2326
+ }, Ce = /* @__PURE__ */ template('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="bg-background absolute bottom-0 left-0 h-full w-0 transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');
2327
+ function FloatingButton(e2, t2) {
2328
+ push(t2, true);
2329
+ let n2 = prop(t2, "position", 3, "bottom-right"), o2 = prop(t2, "visible", 3, true);
2330
+ var s2 = comment(), i2 = first_child(s2), consequent = (e3) => {
2331
+ var o3 = Ce();
2332
+ o3.__click = [on_click$3, t2];
2333
+ var s3 = child(o3);
2334
+ !function Gamepad(e4, t3) {
2335
+ const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
2336
+ Icon$1(e4, spread_props({
2337
+ name: "gamepad"
2338
+ }, () => n3, {
2339
+ iconNode: [["line", {
2340
+ x1: "6",
2341
+ x2: "10",
2342
+ y1: "12",
2343
+ y2: "12"
2344
+ }], ["line", {
2345
+ x1: "8",
2346
+ x2: "8",
2347
+ y1: "10",
2348
+ y2: "14"
2349
+ }], ["line", {
2350
+ x1: "15",
2351
+ x2: "15.01",
2352
+ y1: "13",
2353
+ y2: "13"
2354
+ }], ["line", {
2355
+ x1: "18",
2356
+ x2: "18.01",
2357
+ y1: "11",
2358
+ y2: "11"
2359
+ }], ["rect", {
2360
+ width: "20",
2361
+ height: "12",
2362
+ x: "2",
2363
+ y: "6",
2364
+ rx: "2"
2365
+ }]],
2366
+ children: (e5, n4) => {
2367
+ var o4 = comment();
2368
+ slot(first_child(o4), t3, "default", {}, null), append(e5, o4);
2369
+ },
2370
+ $$slots: {
2371
+ default: true
2372
+ }
2373
+ }));
2374
+ }(child(s3), {
2375
+ size: 26,
2376
+ strokeWidth: 1.75,
2377
+ class: "z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"
2378
+ }), template_effect(() => set_class(o3, 1, `fixed ${("bottom-left" == n2() ? "bottom-4 left-4" : "bottom-right" == n2() ? "right-4 bottom-4" : "") ?? ""} group children-text-white text-background z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold uppercase shadow-lg transition-all hover:scale-105`, "svelte-1j97rta")), transition(3, o3, () => blur), append(e3, o3);
2379
+ };
2380
+ if_block(i2, (e3) => {
2381
+ o2() && e3(consequent);
2382
+ }), append(e2, s2), pop();
2383
+ }
2384
2384
  delegate(["click"]);
2385
2385
  var Se = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'), Me = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'), Te = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'), Ie = /* @__PURE__ */ ns_template('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');
2386
2386
  function Icon(e2, t2) {
@@ -2428,20 +2428,20 @@ function Loader(e2, t2) {
2428
2428
  function cn(...e2) {
2429
2429
  return e2.filter(Boolean).join(" ");
2430
2430
  }
2431
- const Oe = "undefined" != typeof document;
2431
+ const De = "undefined" != typeof document;
2432
2432
  function clientWritable(e2) {
2433
2433
  const t2 = writable(e2);
2434
2434
  return {
2435
2435
  subscribe: t2.subscribe,
2436
2436
  set: function set2(e3) {
2437
- Oe && t2.set(e3);
2437
+ De && t2.set(e3);
2438
2438
  },
2439
2439
  update: function update2(e3) {
2440
- Oe && t2.update(e3);
2440
+ De && t2.update(e3);
2441
2441
  }
2442
2442
  };
2443
2443
  }
2444
- let De = 0;
2444
+ let Oe = 0;
2445
2445
  const Ee = function createToastState() {
2446
2446
  const e2 = clientWritable([]), t2 = clientWritable([]);
2447
2447
  function addToast(t3) {
@@ -2449,7 +2449,7 @@ const Ee = function createToastState() {
2449
2449
  }
2450
2450
  function create(t3) {
2451
2451
  var _a2;
2452
- const { message: n2, ...o2 } = t3, s2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : De++, i2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === s2);
2452
+ const { message: n2, ...o2 } = t3, s2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : Oe++, i2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === s2);
2453
2453
  return l2 ? e2.update((e3) => e3.map((e4) => e4.id === s2 ? {
2454
2454
  ...e4,
2455
2455
  ...t3,
@@ -2586,7 +2586,7 @@ const Ee = function createToastState() {
2586
2586
  }), n2;
2587
2587
  },
2588
2588
  custom: function custom(e3, t3) {
2589
- const n2 = (t3 == null ? void 0 : t3.id) || De++;
2589
+ const n2 = (t3 == null ? void 0 : t3.id) || Oe++;
2590
2590
  return create({
2591
2591
  component: e3,
2592
2592
  id: n2,
@@ -2643,7 +2643,7 @@ function Toast(e2, t2) {
2643
2643
  info: "",
2644
2644
  loading: ""
2645
2645
  }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = Ee;
2646
- let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), S2 = prop(t2, "expanded", 9), M2 = prop(t2, "invert", 13), T2 = prop(t2, "position", 9), I2 = prop(t2, "visibleToasts", 9), q2 = prop(t2, "expandByDefault", 9), P2 = prop(t2, "closeButton", 9), O2 = prop(t2, "interacting", 9), D2 = prop(t2, "cancelButtonStyle", 9, ""), E2 = prop(t2, "actionButtonStyle", 9, ""), j2 = prop(t2, "duration", 9, 4e3), N2 = prop(t2, "descriptionClass", 9, ""), B2 = prop(t2, "classes", 29, () => ({})), A2 = prop(t2, "unstyled", 9, false), W2 = mutable_state(false, true), z2 = mutable_state(false, true), L2 = mutable_state(false, true), G2 = mutable_state(false, true), F2 = mutable_state(0, true), H2 = mutable_state(0, true), R2 = mutable_state(void 0, true), U2 = mutable_state(0, true), V2 = 0, K2 = 0, Y2 = null;
2646
+ let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), S2 = prop(t2, "expanded", 9), M2 = prop(t2, "invert", 13), T2 = prop(t2, "position", 9), I2 = prop(t2, "visibleToasts", 9), q2 = prop(t2, "expandByDefault", 9), P2 = prop(t2, "closeButton", 9), D2 = prop(t2, "interacting", 9), O2 = prop(t2, "cancelButtonStyle", 9, ""), E2 = prop(t2, "actionButtonStyle", 9, ""), j2 = prop(t2, "duration", 9, 4e3), N2 = prop(t2, "descriptionClass", 9, ""), B2 = prop(t2, "classes", 29, () => ({})), A2 = prop(t2, "unstyled", 9, false), W2 = mutable_state(false, true), z2 = mutable_state(false, true), L2 = mutable_state(false, true), G2 = mutable_state(false, true), F2 = mutable_state(0, true), H2 = mutable_state(0, true), R2 = mutable_state(void 0, true), U2 = mutable_state(0, true), V2 = 0, K2 = 0, Y2 = null;
2647
2647
  function deleteToast() {
2648
2648
  set(z2, true), // Save the offset for the exit swipe animation
2649
2649
  set(F2, get$1(U2)), $2(k2().id), setTimeout(() => {
@@ -2721,13 +2721,13 @@ function Toast(e2, t2) {
2721
2721
  (clearTimeout(get$1(Z2)), set(J2, k2().duration || j2() || 4e3), startTimer());
2722
2722
  }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(u2)), () => {
2723
2723
  set(h2, k2().promise && "loading" === get$1(u2) || k2().duration === Number.POSITIVE_INFINITY);
2724
- }), legacy_pre_effect(() => (get$1(h2), deep_read_state(S2()), deep_read_state(O2()), get$1(Z2)), () => {
2724
+ }), legacy_pre_effect(() => (get$1(h2), deep_read_state(S2()), deep_read_state(D2()), get$1(Z2)), () => {
2725
2725
  var e3;
2726
2726
  !function store_unsub(e4, t3, n3) {
2727
2727
  let o3 = n3[t3];
2728
2728
  return o3 && o3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
2729
2729
  (o3.unsubscribe(), o3.unsubscribe = noop), e4;
2730
- }(set(Q2, (e3 = () => (get$1(h2) || (S2() || O2() ? (
2730
+ }(set(Q2, (e3 = () => (get$1(h2) || (S2() || D2() ? (
2731
2731
  // If toast's duration changes, it will be out of sync with the
2732
2732
  // remainingAtTimeout, so we know we need to restart the timer
2733
2733
  // with the new duration
@@ -2874,7 +2874,7 @@ function Toast(e2, t2) {
2874
2874
  var l3 = sibling(s3, 2), consequent_13 = (e4) => {
2875
2875
  var t3 = Le(), n4 = child(t3);
2876
2876
  template_effect((e5) => {
2877
- set_style(t3, D2()), set_class(t3, 1, e5), set_text(n4, k2().cancel.label);
2877
+ set_style(t3, O2()), set_class(t3, 1, e5), set_text(n4, k2().cancel.label);
2878
2878
  }, [() => {
2879
2879
  var _a2, _b2, _c2;
2880
2880
  return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.cancelButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.cancelButton));
@@ -2954,21 +2954,21 @@ function Toaster(e2, t2) {
2954
2954
  const { toasts: k2, heights: C2, reset: S2 } = Ee;
2955
2955
  let M2 = mutable_state(false), T2 = mutable_state(false), q2 = mutable_state(function getInitialTheme(e3) {
2956
2956
  return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? c2 : u2;
2957
- }(f2())), P2 = mutable_state(), O2 = null, D2 = false;
2957
+ }(f2())), P2 = mutable_state(), D2 = null, O2 = false;
2958
2958
  function handleBlur(e3) {
2959
- D2 && !e3.currentTarget.contains(e3.relatedTarget) && (D2 = false, O2 && (O2.focus({
2959
+ O2 && !e3.currentTarget.contains(e3.relatedTarget) && (O2 = false, D2 && (D2.focus({
2960
2960
  preventScroll: true
2961
- }), O2 = null));
2961
+ }), D2 = null));
2962
2962
  }
2963
2963
  function handleFocus(e3) {
2964
- D2 || (D2 = true, O2 = e3.relatedTarget);
2964
+ O2 || (O2 = true, D2 = e3.relatedTarget);
2965
2965
  }
2966
2966
  !function onDestroy(e3) {
2967
2967
  null === I && lifecycle_outside_component(), onMount(() => () => untrack(e3));
2968
2968
  }(() => {
2969
- get$1(P2) && O2 && (O2.focus({
2969
+ get$1(P2) && D2 && (D2.focus({
2970
2970
  preventScroll: true
2971
- }), O2 = null, D2 = false);
2971
+ }), D2 = null, O2 = false);
2972
2972
  }), onMount(() => {
2973
2973
  S2();
2974
2974
  const handleKeydown = (e3) => {
@@ -3849,13 +3849,12 @@ var ht = /* @__PURE__ */ template('<div class="fixed top-0 right-0 left-0 h-4"><
3849
3849
  delegate(["mouseover"]);
3850
3850
  var mt = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3851
3851
  function App(e2, t2) {
3852
- var _a2, _b2, _c2, _d;
3853
3852
  push(t2, true);
3854
- const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ve, "$discoveryOpen", n2);
3855
- let s2, i2 = 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);
3853
+ const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ve, "$discoveryOpen", n2), $config = () => store_get(t2.config, "$config", n2);
3856
3854
  function openDiscovery() {
3857
3855
  store_set(Ve, true), et.trackOpen();
3858
3856
  }
3857
+ let s2;
3859
3858
  Ve.subscribe((e3) => {
3860
3859
  try {
3861
3860
  e3 ? (s2 = document.body.style.overflow, document.body.style.overflow = "hidden") : document.body.style.overflow = s2;
@@ -3863,24 +3862,31 @@ function App(e2, t2) {
3863
3862
  console.error("Failed to toggle body overflow style:", e4);
3864
3863
  }
3865
3864
  });
3866
- var l2 = mt(), c2 = first_child(l2);
3867
- FloatingButton(c2, {
3865
+ var i2 = mt(), a2 = first_child(i2);
3866
+ const l2 = /* @__PURE__ */ derived(() => {
3867
+ var _a2, _b2;
3868
+ return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.button) == null ? void 0 : _b2.position;
3869
+ }), c2 = /* @__PURE__ */ derived(() => {
3870
+ var _a2, _b2;
3871
+ return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.button) == null ? void 0 : _b2.visible;
3872
+ });
3873
+ FloatingButton(a2, {
3868
3874
  get position() {
3869
- return i2;
3875
+ return get$1(l2);
3870
3876
  },
3871
3877
  get visible() {
3872
- return a2;
3878
+ return get$1(c2);
3873
3879
  },
3874
3880
  onClick: openDiscovery
3875
3881
  });
3876
- var u2 = sibling(c2, 2), consequent = (e3) => {
3877
- const n3 = /* @__PURE__ */ derived(() => {
3878
- var _a3, _b3;
3879
- return (_b3 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b3.enabled;
3882
+ var u2 = sibling(a2, 2), consequent = (e3) => {
3883
+ const t3 = /* @__PURE__ */ derived(() => {
3884
+ var _a2, _b2;
3885
+ return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.exitIntent) == null ? void 0 : _b2.enabled;
3880
3886
  });
3881
3887
  DiscoveryOverlay(e3, {
3882
3888
  get showIntentToggle() {
3883
- return get$1(n3);
3889
+ return get$1(t3);
3884
3890
  }
3885
3891
  });
3886
3892
  };
@@ -3889,20 +3895,22 @@ function App(e2, t2) {
3889
3895
  });
3890
3896
  var d2 = sibling(u2, 2);
3891
3897
  const f2 = /* @__PURE__ */ derived(() => {
3892
- var _a3, _b3;
3893
- return (_b3 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b3.enabled;
3898
+ var _a2, _b2;
3899
+ return (_b2 = (_a2 = $config()) == null ? void 0 : _a2.exitIntent) == null ? void 0 : _b2.enabled;
3894
3900
  });
3895
3901
  !function ExitIntentDetector(e3, t3) {
3896
3902
  push(t3, true);
3897
- let n3 = prop(t3, "enabled", 3, true), o3 = false;
3898
- var s3 = ht();
3899
- event("mousemove", q, function trackMouse() {
3900
- o3 || setTimeout(() => o3 = true, 250);
3901
- }), s3.__mouseover = function handleBarTrigger() {
3902
- var _a3;
3903
- n3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && o3 && // Trigger exit intent
3904
- ((_a3 = t3.onIntent) == null ? void 0 : _a3.call(t3));
3905
- }, append(e3, s3), pop();
3903
+ let n3, o3, s3 = prop(t3, "enabled", 3, true), i3 = false;
3904
+ var a3 = ht();
3905
+ event("mousemove", q, function trackMouse(e4) {
3906
+ i3 || setTimeout(() => i3 = true, 250), n3.contains(e4.target) || (o3 = Date.now());
3907
+ }), a3.__mouseover = function handleBarTrigger() {
3908
+ s3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && i3 && // Trigger exit intent
3909
+ setTimeout(() => {
3910
+ var _a2;
3911
+ o3 < Date.now() - 50 && ((_a2 = t3.onIntent) == null ? void 0 : _a2.call(t3));
3912
+ }, 150);
3913
+ }, bind_this(a3, (e4) => n3 = e4, () => n3), append(e3, a3), pop();
3906
3914
  }(d2, {
3907
3915
  get enabled() {
3908
3916
  return get$1(f2);
@@ -3910,7 +3918,7 @@ function App(e2, t2) {
3910
3918
  onIntent: () => {
3911
3919
  $discoveryOpen() || openDiscovery();
3912
3920
  }
3913
- }), Toaster(sibling(d2, 2), {}), append(e2, l2), pop(), o2();
3921
+ }), Toaster(sibling(d2, 2), {}), append(e2, i2), pop(), o2();
3914
3922
  }
3915
3923
  const bt = {
3916
3924
  button: {
@@ -3945,7 +3953,7 @@ function isObject(e2) {
3945
3953
  const $t = new (_c = class {
3946
3954
  constructor() {
3947
3955
  __privateAdd(this, _PlaylightSDK_instances);
3948
- this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api = et;
3956
+ this.container = null, this.app = null, this.isInitialized = false, this.config = writable(null), this.api = et;
3949
3957
  }
3950
3958
  /**
3951
3959
  * Initialize Playlight
@@ -3954,7 +3962,7 @@ const $t = new (_c = class {
3954
3962
  async init(e2 = {}) {
3955
3963
  return "undefined" == typeof window ? console.error("Playlight cannot run on the server, as it depends on browser APIs.") : this.isInitialized ? (console.warn("Playlight SDK already initialized!"), void (document.getElementById("playlight-sdk-container") || __privateMethod(this, _PlaylightSDK_instances, t_fn).call(this))) : (
3956
3964
  // Initialize configuration with defaults and user overrides
3957
- (this.config = initializeConfig(e2), __privateMethod(this, _PlaylightSDK_instances, t_fn).call(this), // Create container and mount
3965
+ (this.setConfig(e2), __privateMethod(this, _PlaylightSDK_instances, t_fn).call(this), // Create container and mount
3958
3966
  // Fetch current game info to cache it
3959
3967
  await this.api.getCurrentGameInfo(), void (this.isInitialized = true))
3960
3968
  );
@@ -3966,6 +3974,14 @@ const $t = new (_c = class {
3966
3974
  setDiscovery(e2 = true) {
3967
3975
  this.isInitialized && (Ve.set(e2), e2 && et.trackOpen());
3968
3976
  }
3977
+ /**
3978
+ * Update the configuration
3979
+ * @param {Object} [config] - Playlight configuration object
3980
+ */
3981
+ setConfig(e2 = {}) {
3982
+ var _a2;
3983
+ (_a2 = this.config) == null ? void 0 : _a2.set(initializeConfig(e2));
3984
+ }
3969
3985
  }, _PlaylightSDK_instances = new WeakSet(), /**
3970
3986
  * Mount the Svelte app to the playlight container
3971
3987
  * @private