@levo-so/studio 0.3.8 → 0.3.9

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.
@@ -38,16 +38,18 @@ var l = Object.defineProperty, u = (e, t) => {
38
38
  defaultVariants: { size: "medium" },
39
39
  compoundVariants: []
40
40
  }), h = "_1gklkndn", g = a(null), _ = (e) => {
41
- let t = i(6), { popup: n, callbacks: r, children: a } = e, o;
42
- t[0] !== r || t[1] !== n ? (o = {
41
+ let t = i(8), { popup: n, callbacks: r, client: a, preview: o, children: c } = e, l;
42
+ t[0] !== r || t[1] !== a || t[2] !== n || t[3] !== o ? (l = {
43
43
  popup: n,
44
- callbacks: r
45
- }, t[0] = r, t[1] = n, t[2] = o) : o = t[2];
46
- let c;
47
- return t[3] !== a || t[4] !== o ? (c = /* @__PURE__ */ s(g.Provider, {
48
- value: o,
49
- children: a
50
- }), t[3] = a, t[4] = o, t[5] = c) : c = t[5], c;
44
+ callbacks: r,
45
+ client: a,
46
+ preview: o
47
+ }, t[0] = r, t[1] = a, t[2] = n, t[3] = o, t[4] = l) : l = t[4];
48
+ let u;
49
+ return t[5] !== c || t[6] !== l ? (u = /* @__PURE__ */ s(g.Provider, {
50
+ value: l,
51
+ children: c
52
+ }), t[5] = c, t[6] = l, t[7] = u) : u = t[7], u;
51
53
  }, v = () => {
52
54
  let e = o(g);
53
55
  if (!e) throw Error("usePopupContext must be used within a PopupProvider");
@@ -67,14 +69,14 @@ var l = Object.defineProperty, u = (e, t) => {
67
69
  }, x = "zv6sjd1", S = "zv6sjd2 zv6sjd1", C = "zv6sjd3", w = "zv6sjd8", T = "zv6sjd9", E = "zv6sjda", D = (e) => {
68
70
  let t = i(6), n = y(), r = n?.callbacks?.onAction, a = b(), { action: o } = e.content, s;
69
71
  t[0] !== o || t[1] !== a || t[2] !== n || t[3] !== r || t[4] !== e ? (s = () => {
70
- o?.type === "redirect" && n && (r?.(e, {
72
+ o?.type === "redirect" && (!n || n.preview || (r?.(e, {
71
73
  action_type: "redirect",
72
74
  redirect_url: o.url,
73
75
  open_in_new_tab: !!o.openInNewTab
74
- }), a("cta_click"), o.openInNewTab ? window.open(o.url, "_blank", "noopener,noreferrer") : window.location.href = o.url);
76
+ }), a("cta_click"), o.openInNewTab ? window.open(o.url, "_blank", "noopener,noreferrer") : window.location.href = o.url));
75
77
  }, t[0] = o, t[1] = a, t[2] = n, t[3] = r, t[4] = e, t[5] = s) : s = t[5];
76
78
  let c = s;
77
79
  return o?.type === "redirect" && o.url ? c : null;
78
80
  };
79
81
  //#endregion
80
- export { u as _, y as a, p as c, m as d, f, D as g, v as h, E as i, w as l, x as m, C as n, S as o, h as p, T as r, _ as s, b as t, d as u };
82
+ export { S as a, w as c, f as d, h as f, u as g, D as h, E as i, d as l, v as m, C as n, _ as o, x as p, T as r, p as s, b as t, m as u };