@charisol/plexo-sdk 2.0.25 → 2.0.26

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/v2.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, Ht as _, I as v, It as y, J as b, Jt as x, K as S, Kt as C, L as w, Lt as T, M as E, Mt as D, N as O, Nt as k, O as A, Ot as j, P as M, Pt as N, Q as P, Qt as F, R as ee, Rt as te, S as ne, St as re, T as I, Tt as ie, U as ae, Ut as oe, V as se, Vt as ce, W as L, Wt as le, X as ue, Xt as de, Y as fe, Yt as pe, Z as R, Zt as me, _ as he, _t as ge, a as _e, an as ve, at as ye, b as be, bt as xe, c as Se, cn as Ce, ct as we, d as Te, en as Ee, et as De, f as Oe, ft as ke, g as Ae, gt as je, h as Me, ht as Ne, i as Pe, in as Fe, it as Ie, j as Le, jt as Re, k as ze, kt as Be, l as Ve, ln as He, lt as Ue, m as We, nn as Ge, nt as Ke, o as qe, on as Je, ot as Ye, p as Xe, pt as z, q as Ze, qt as B, r as Qe, rn as V, rt as $e, s as et, sn as tt, st as nt, t as rt, tn as it, tt as at, u as ot, v as st, vt as ct, w as lt, wt as ut, x as dt, xt as ft, y as pt, yt as mt, z as ht, zt as gt } from "./InlineColorPicker-x6ODuEQD.js";
2
2
  import { a as _t, o as vt } from "./colorUtils-BaVkGjFC.js";
3
- import { $ as yt, $t as bt, A as xt, An as St, At as Ct, B as wt, Bt as Tt, C as Et, Cn as Dt, Ct as Ot, D as kt, Dn as At, Dt as jt, E as Mt, En as Nt, Et as Pt, F as Ft, Ft as It, G as Lt, Gt as Rt, H as zt, Ht as Bt, I as Vt, In as Ht, It as Ut, J as Wt, Jt as Gt, K as Kt, Kt as qt, L as Jt, Ln as Yt, Lt as Xt, M as Zt, Mn as Qt, Mt as $t, N as en, Nn as tn, Nt as nn, O as rn, On as an, Ot as on, Pn as sn, Pt as cn, Q as ln, Qt as un, R as dn, Rn as fn, Rt as pn, S as mn, Sn as hn, St as gn, T as _n, Tn as vn, Tt as yn, U as bn, Ut as xn, V as Sn, Vt as Cn, W as wn, Wt as Tn, X as En, Xt as Dn, Y as On, Yt as kn, Z as An, Zt as jn, _n as Mn, _t as Nn, an as Pn, at as Fn, b as In, bn as Ln, bt as Rn, c as zn, cn as Bn, ct as Vn, d as Hn, dn as Un, en as Wn, et as Gn, f as Kn, fn as qn, ft as Jn, g as Yn, gn as Xn, gt as Zn, h as Qn, ht as $n, in as er, it as tr, j as nr, jn as rr, jt as ir, k as ar, kn as or, kt as sr, l as cr, ln as lr, lt as ur, m as dr, mn as fr, mt as pr, n as mr, nn as hr, nt as gr, on as _r, ot as vr, p as yr, pn as br, pt as xr, q as Sr, qt as Cr, r as wr, rn as Tr, rt as Er, s as Dr, sn as Or, st as kr, t as Ar, tn as jr, tt as Mr, u as Nr, un as Pr, ut as Fr, vn as Ir, vt as Lr, w as Rr, wn as zr, wt as Br, x as Vr, xn as Hr, xt as Ur, y as Wr, yn as Gr, yt as Kr, z as qr, zt as Jr } from "./v1-DzPIZH4r.js";
3
+ import { $ as yt, $t as bt, A as xt, An as St, At as Ct, B as wt, Bt as Tt, C as Et, Cn as Dt, Ct as Ot, D as kt, Dn as At, Dt as jt, E as Mt, En as Nt, Et as Pt, F as Ft, Ft as It, G as Lt, Gt as Rt, H as zt, Ht as Bt, I as Vt, In as Ht, It as Ut, J as Wt, Jt as Gt, K as Kt, Kt as qt, L as Jt, Ln as Yt, Lt as Xt, M as Zt, Mn as Qt, Mt as $t, N as en, Nn as tn, Nt as nn, O as rn, On as an, Ot as on, Pn as sn, Pt as cn, Q as ln, Qt as un, R as dn, Rn as fn, Rt as pn, S as mn, Sn as hn, St as gn, T as _n, Tn as vn, Tt as yn, U as bn, Ut as xn, V as Sn, Vt as Cn, W as wn, Wt as Tn, X as En, Xt as Dn, Y as On, Yt as kn, Z as An, Zt as jn, _n as Mn, _t as Nn, an as Pn, at as Fn, b as In, bn as Ln, bt as Rn, c as zn, cn as Bn, ct as Vn, d as Hn, dn as Un, en as Wn, et as Gn, f as Kn, fn as qn, ft as Jn, g as Yn, gn as Xn, gt as Zn, h as Qn, ht as $n, in as er, it as tr, j as nr, jn as rr, jt as ir, k as ar, kn as or, kt as sr, l as cr, ln as lr, lt as ur, m as dr, mn as fr, mt as pr, n as mr, nn as hr, nt as gr, on as _r, ot as vr, p as yr, pn as br, pt as xr, q as Sr, qt as Cr, r as wr, rn as Tr, rt as Er, s as Dr, sn as Or, st as kr, t as Ar, tn as jr, tt as Mr, u as Nr, un as Pr, ut as Fr, vn as Ir, vt as Lr, w as Rr, wn as zr, wt as Br, x as Vr, xn as Hr, xt as Ur, y as Wr, yn as Gr, yt as Kr, z as qr, zt as Jr } from "./v1-CvbzlaB_.js";
4
4
  import { A as Yr, B as Xr, C as Zr, D as Qr, E as $r, F as ei, I as ti, L as ni, M as ri, N as ii, O as ai, P as oi, R as si, S as ci, T as li, _ as ui, a as di, b as fi, c as pi, d as mi, f as hi, g as gi, h as _i, i as vi, j as yi, k as bi, l as xi, m as Si, n as Ci, o as wi, p as Ti, r as Ei, s as Di, t as Oi, u as ki, v as Ai, w as ji, x as Mi, y as Ni, z as Pi } from "./brandGuide-DgoZ7spo.js";
5
5
  import { d as Fi, o as Ii, s as Li, t as Ri, u as zi } from "./client-DUSU8g5z.js";
6
6
  import Bi, { createContext as Vi, forwardRef as Hi, useCallback as H, useContext as Ui, useDeferredValue as Wi, useEffect as U, useImperativeHandle as Gi, useLayoutEffect as Ki, useMemo as W, useRef as G, useState as K } from "react";
@@ -10394,7 +10394,127 @@ var pc = [
10394
10394
  })
10395
10395
  ]
10396
10396
  });
10397
- }, hc = "w-full bg-px-raised border border-px-line2 rounded px-2 py-1 text-xs text-px-text placeholder-px-faint focus:outline-none focus:border-px-accent", gc = "w-6 h-6 rounded flex items-center justify-center text-px-muted hover:text-white hover:bg-px-line2 disabled:opacity-30 disabled:hover:bg-transparent cursor-pointer", _c = ({ title: e, children: t }) => /* @__PURE__ */ Y("div", {
10397
+ }, hc = "w-full bg-px-raised border border-px-line2 rounded px-2 py-1 text-xs text-px-text placeholder-px-faint focus:outline-none focus:border-px-accent", gc = ({ src: e }) => e ? /* @__PURE__ */ J("img", {
10398
+ src: e,
10399
+ alt: "",
10400
+ className: "w-8 h-8 rounded object-cover shrink-0 bg-px-line2"
10401
+ }) : /* @__PURE__ */ J("span", {
10402
+ className: "w-8 h-8 rounded shrink-0 bg-px-line2",
10403
+ "aria-hidden": "true"
10404
+ }), _c = ({ p: e }) => /* @__PURE__ */ Y("span", {
10405
+ className: "flex items-center gap-2 min-w-0 text-left",
10406
+ children: [/* @__PURE__ */ J(gc, { src: e.imageUrl }), /* @__PURE__ */ Y("span", {
10407
+ className: "min-w-0",
10408
+ children: [/* @__PURE__ */ J("span", {
10409
+ className: "block text-[11px] text-px-text truncate",
10410
+ children: e.name
10411
+ }), e.priceLabel && /* @__PURE__ */ J("span", {
10412
+ className: "block text-[10px] text-px-faint truncate",
10413
+ children: e.priceLabel
10414
+ })]
10415
+ })]
10416
+ }), vc = ({ value: e, onChange: t }) => {
10417
+ let { products: n } = La(), [r, i] = K(!1), [a, o] = K(""), [s, c] = K(null), [l, u] = K(!1), d = n?.list, f = H(() => {
10418
+ if (!d) return;
10419
+ u(!1), c(null);
10420
+ let e = !0;
10421
+ return d().then((t) => {
10422
+ e && c(Array.isArray(t) ? t : []);
10423
+ }).catch(() => {
10424
+ e && u(!0);
10425
+ }), () => {
10426
+ e = !1;
10427
+ };
10428
+ }, [d]);
10429
+ U(() => f(), [f]);
10430
+ let p = W(() => (s ?? []).filter((e) => !a.trim() || e.name.toLowerCase().includes(a.trim().toLowerCase())), [s, a]);
10431
+ if (!d) return /* @__PURE__ */ J("input", {
10432
+ className: hc,
10433
+ value: e,
10434
+ onChange: (e) => t(e.target.value),
10435
+ placeholder: "Paste the product's code",
10436
+ "aria-label": "Product"
10437
+ });
10438
+ let m = s?.find((t) => t.id === e), h = n?.onCreate && /* @__PURE__ */ Y("button", {
10439
+ type: "button",
10440
+ onClick: n.onCreate,
10441
+ className: "flex items-center justify-center gap-1.5 w-full h-8 rounded border border-px-line2 bg-px-raised hover:border-px-accent/60 text-[11px] text-px-text cursor-pointer",
10442
+ children: [/* @__PURE__ */ J(L, {
10443
+ size: 12,
10444
+ "aria-hidden": "true"
10445
+ }), n.createLabel ?? "Create a product"]
10446
+ }), g;
10447
+ return g = l ? /* @__PURE__ */ Y("div", {
10448
+ className: "space-y-1.5",
10449
+ children: [/* @__PURE__ */ J("p", {
10450
+ className: "text-[11px] text-px-muted leading-snug",
10451
+ children: "We couldn't load your products. Check your connection and try again."
10452
+ }), /* @__PURE__ */ J("button", {
10453
+ type: "button",
10454
+ onClick: f,
10455
+ className: "h-7 px-2.5 rounded border border-px-line2 bg-px-raised text-[11px] text-px-text cursor-pointer",
10456
+ children: "Try again"
10457
+ })]
10458
+ }) : s === null ? /* @__PURE__ */ J("p", {
10459
+ className: "text-[11px] text-px-faint",
10460
+ children: "Loading your products…"
10461
+ }) : s.length === 0 ? /* @__PURE__ */ Y("div", {
10462
+ className: "space-y-1.5",
10463
+ children: [/* @__PURE__ */ J("p", {
10464
+ className: "text-[11px] text-px-muted leading-snug",
10465
+ children: "You have no products yet"
10466
+ }), h]
10467
+ }) : /* @__PURE__ */ Y("div", {
10468
+ className: "space-y-2",
10469
+ children: [
10470
+ /* @__PURE__ */ J("input", {
10471
+ className: hc,
10472
+ value: a,
10473
+ onChange: (e) => o(e.target.value),
10474
+ placeholder: "Search your products",
10475
+ "aria-label": "Search your products"
10476
+ }),
10477
+ /* @__PURE__ */ Y("div", {
10478
+ role: "listbox",
10479
+ "aria-label": "Your products",
10480
+ className: "max-h-48 overflow-y-auto space-y-0.5",
10481
+ children: [p.map((n) => /* @__PURE__ */ J("button", {
10482
+ type: "button",
10483
+ role: "option",
10484
+ "aria-selected": n.id === e,
10485
+ onClick: () => {
10486
+ t(n.id), i(!1), o("");
10487
+ },
10488
+ className: `w-full flex items-center px-1.5 py-1 rounded cursor-pointer ${n.id === e ? "bg-px-line2" : "hover:bg-px-line2"}`,
10489
+ children: /* @__PURE__ */ J(_c, { p: n })
10490
+ }, n.id)), p.length === 0 && /* @__PURE__ */ J("p", {
10491
+ className: "text-[11px] text-px-faint px-1.5 py-1",
10492
+ children: "No product matches that."
10493
+ })]
10494
+ }),
10495
+ h
10496
+ ]
10497
+ }), /* @__PURE__ */ Y("div", {
10498
+ className: "space-y-1.5",
10499
+ children: [/* @__PURE__ */ Y("button", {
10500
+ type: "button",
10501
+ onClick: () => i(!r),
10502
+ "aria-expanded": r,
10503
+ className: "flex items-center justify-between gap-2 w-full min-h-10 px-2 py-1 rounded border border-px-line2 bg-px-raised hover:border-px-accent/60 cursor-pointer",
10504
+ children: [m ? /* @__PURE__ */ J(_c, { p: m }) : /* @__PURE__ */ J("span", {
10505
+ className: "text-[11px] text-px-muted",
10506
+ children: e && s ? "That product is no longer available. Choose another" : "Choose a product"
10507
+ }), /* @__PURE__ */ J(C, {
10508
+ size: 14,
10509
+ className: "text-px-faint shrink-0",
10510
+ "aria-hidden": "true"
10511
+ })]
10512
+ }), (r || s?.length === 0 || l) && /* @__PURE__ */ J("div", {
10513
+ className: "rounded-lg border border-px-line2 bg-px-surface p-2",
10514
+ children: g
10515
+ })]
10516
+ });
10517
+ }, yc = "w-full bg-px-raised border border-px-line2 rounded px-2 py-1 text-xs text-px-text placeholder-px-faint focus:outline-none focus:border-px-accent", bc = "w-6 h-6 rounded flex items-center justify-center text-px-muted hover:text-white hover:bg-px-line2 disabled:opacity-30 disabled:hover:bg-transparent cursor-pointer", xc = ({ title: e, children: t }) => /* @__PURE__ */ Y("div", {
10398
10518
  className: "space-y-2",
10399
10519
  children: [/* @__PURE__ */ J("div", {
10400
10520
  className: "text-[10px] uppercase tracking-wider font-semibold text-px-faint",
@@ -10409,7 +10529,7 @@ var pc = [
10409
10529
  className: "flex-1 min-w-0",
10410
10530
  children: t
10411
10531
  })]
10412
- }), vc = ({ label: e, checked: t, onChange: n, hint: r }) => /* @__PURE__ */ Y("label", {
10532
+ }), Sc = ({ label: e, checked: t, onChange: n, hint: r }) => /* @__PURE__ */ Y("label", {
10413
10533
  className: "flex items-start gap-2 cursor-pointer",
10414
10534
  children: [/* @__PURE__ */ J("input", {
10415
10535
  type: "checkbox",
@@ -10424,7 +10544,7 @@ var pc = [
10424
10544
  })]
10425
10545
  })]
10426
10546
  });
10427
- function yc({ items: e, onChange: n, render: r, blank: i, addLabel: a, min: o = 0 }) {
10547
+ function Cc({ items: e, onChange: n, render: r, blank: i, addLabel: a, min: o = 0 }) {
10428
10548
  let s = (t, r) => {
10429
10549
  let i = e.slice(), [a] = i.splice(t, 1);
10430
10550
  i.splice(t + r, 0, a), n(i);
@@ -10437,21 +10557,21 @@ function yc({ items: e, onChange: n, render: r, blank: i, addLabel: a, min: o =
10437
10557
  className: "flex items-center justify-end gap-0.5",
10438
10558
  children: [
10439
10559
  /* @__PURE__ */ J("button", {
10440
- className: gc,
10560
+ className: bc,
10441
10561
  disabled: a === 0,
10442
10562
  onClick: () => s(a, -1),
10443
10563
  "aria-label": "Move up",
10444
10564
  children: /* @__PURE__ */ J(t, { className: "w-3 h-3" })
10445
10565
  }),
10446
10566
  /* @__PURE__ */ J("button", {
10447
- className: gc,
10567
+ className: bc,
10448
10568
  disabled: a === e.length - 1,
10449
10569
  onClick: () => s(a, 1),
10450
10570
  "aria-label": "Move down",
10451
10571
  children: /* @__PURE__ */ J(Ge, { className: "w-3 h-3" })
10452
10572
  }),
10453
10573
  /* @__PURE__ */ J("button", {
10454
- className: gc,
10574
+ className: bc,
10455
10575
  disabled: e.length <= o,
10456
10576
  onClick: () => n(e.filter((e, t) => t !== a)),
10457
10577
  "aria-label": "Remove",
@@ -10473,7 +10593,7 @@ function yc({ items: e, onChange: n, render: r, blank: i, addLabel: a, min: o =
10473
10593
  })]
10474
10594
  });
10475
10595
  }
10476
- var bc = ({ value: e, onChange: t }) => {
10596
+ var wc = ({ value: e, onChange: t }) => {
10477
10597
  let n = La(), r = G(null), [i, a] = K(null), [o, s] = K(!1), c = async (e) => {
10478
10598
  if (e) {
10479
10599
  s(!0), a(null);
@@ -10510,7 +10630,7 @@ var bc = ({ value: e, onChange: t }) => {
10510
10630
  ]
10511
10631
  }),
10512
10632
  /* @__PURE__ */ J("input", {
10513
- className: hc,
10633
+ className: yc,
10514
10634
  value: e.startsWith("data:") ? "" : e,
10515
10635
  onChange: (e) => t(e.target.value),
10516
10636
  placeholder: "…or paste an image link"
@@ -10521,7 +10641,7 @@ var bc = ({ value: e, onChange: t }) => {
10521
10641
  children: i
10522
10642
  })]
10523
10643
  });
10524
- }, xc = ({ name: e, size: t = 20 }) => /* @__PURE__ */ J("svg", {
10644
+ }, Tc = ({ name: e, size: t = 20 }) => /* @__PURE__ */ J("svg", {
10525
10645
  width: t,
10526
10646
  height: t,
10527
10647
  viewBox: "0 0 24 24",
@@ -10535,12 +10655,12 @@ var bc = ({ value: e, onChange: t }) => {
10535
10655
  key: n,
10536
10656
  ...t
10537
10657
  }))
10538
- }), Sc = (e) => e.replace(/-/g, " "), Cc = ({ node: e, p: t, set: n }) => {
10539
- let { updateNodeStyles: r } = Z(), [i, a] = K(""), o = i.trim().toLowerCase(), s = Object.entries(rn).map(([e, t]) => [e, o ? t.filter((t) => Sc(t).includes(o) || e.toLowerCase().includes(o)) : t]).filter(([, e]) => e.length), c = parseInt(String(e.styles.fontSize ?? "40"), 10) || 40;
10540
- return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y(_c, {
10658
+ }), Ec = (e) => e.replace(/-/g, " "), Dc = ({ node: e, p: t, set: n }) => {
10659
+ let { updateNodeStyles: r } = Z(), [i, a] = K(""), o = i.trim().toLowerCase(), s = Object.entries(rn).map(([e, t]) => [e, o ? t.filter((t) => Ec(t).includes(o) || e.toLowerCase().includes(o)) : t]).filter(([, e]) => e.length), c = parseInt(String(e.styles.fontSize ?? "40"), 10) || 40;
10660
+ return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y(xc, {
10541
10661
  title: "Icon",
10542
10662
  children: [/* @__PURE__ */ J("input", {
10543
- className: hc,
10663
+ className: yc,
10544
10664
  value: i,
10545
10665
  onChange: (e) => a(e.target.value),
10546
10666
  placeholder: "Search icons (try “mail” or “heart”)",
@@ -10561,16 +10681,16 @@ var bc = ({ value: e, onChange: t }) => {
10561
10681
  className: "grid grid-cols-6 gap-1",
10562
10682
  children: r.map((e) => /* @__PURE__ */ J("button", {
10563
10683
  type: "button",
10564
- title: Sc(e),
10565
- "aria-label": Sc(e),
10684
+ title: Ec(e),
10685
+ "aria-label": Ec(e),
10566
10686
  "aria-pressed": t.iconName === e,
10567
10687
  onClick: () => n({ iconName: e }),
10568
10688
  className: `h-8 rounded-md flex items-center justify-center cursor-pointer transition-colors ${t.iconName === e ? "bg-px-accent text-px-onaccent" : "bg-px-raised text-px-text hover:bg-px-line2"}`,
10569
- children: /* @__PURE__ */ J(xc, { name: e })
10689
+ children: /* @__PURE__ */ J(Tc, { name: e })
10570
10690
  }, e))
10571
10691
  })] }, e))]
10572
10692
  })]
10573
- }), /* @__PURE__ */ Y(_c, {
10693
+ }), /* @__PURE__ */ Y(xc, {
10574
10694
  title: "Look",
10575
10695
  children: [
10576
10696
  /* @__PURE__ */ J(Q, {
@@ -10594,7 +10714,7 @@ var bc = ({ value: e, onChange: t }) => {
10594
10714
  /* @__PURE__ */ J(Q, {
10595
10715
  label: "Line",
10596
10716
  children: /* @__PURE__ */ Y("select", {
10597
- className: hc,
10717
+ className: yc,
10598
10718
  value: t.strokeWidth ?? 2,
10599
10719
  onChange: (e) => n({ strokeWidth: Number(e.target.value) }),
10600
10720
  children: [
@@ -10616,7 +10736,7 @@ var bc = ({ value: e, onChange: t }) => {
10616
10736
  /* @__PURE__ */ J(Q, {
10617
10737
  label: "Describe",
10618
10738
  children: /* @__PURE__ */ J("input", {
10619
- className: hc,
10739
+ className: yc,
10620
10740
  value: t.label ?? "",
10621
10741
  onChange: (e) => n({ label: e.target.value }),
10622
10742
  placeholder: "For screen readers (optional)"
@@ -10624,9 +10744,9 @@ var bc = ({ value: e, onChange: t }) => {
10624
10744
  })
10625
10745
  ]
10626
10746
  })] });
10627
- }, wc = ({ p: e, set: t }) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(_c, {
10747
+ }, Oc = ({ p: e, set: t }) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(xc, {
10628
10748
  title: "Slides",
10629
- children: /* @__PURE__ */ J(yc, {
10749
+ children: /* @__PURE__ */ J(Cc, {
10630
10750
  items: e.slides ?? [],
10631
10751
  onChange: (e) => t({ slides: e }),
10632
10752
  blank: () => ({
@@ -10636,18 +10756,18 @@ var bc = ({ value: e, onChange: t }) => {
10636
10756
  }),
10637
10757
  addLabel: "Add slide",
10638
10758
  render: (e, t) => /* @__PURE__ */ Y(q, { children: [
10639
- /* @__PURE__ */ J(bc, {
10759
+ /* @__PURE__ */ J(wc, {
10640
10760
  value: e.src,
10641
10761
  onChange: (e) => t({ src: e })
10642
10762
  }),
10643
10763
  /* @__PURE__ */ J("input", {
10644
- className: hc,
10764
+ className: yc,
10645
10765
  value: e.caption ?? "",
10646
10766
  onChange: (e) => t({ caption: e.target.value }),
10647
10767
  placeholder: "Caption (optional)"
10648
10768
  }),
10649
10769
  /* @__PURE__ */ J("input", {
10650
- className: hc,
10770
+ className: yc,
10651
10771
  value: e.alt ?? "",
10652
10772
  onChange: (e) => t({ alt: e.target.value }),
10653
10773
  placeholder: "Describe the image (for accessibility)"
@@ -10659,20 +10779,20 @@ var bc = ({ value: e, onChange: t }) => {
10659
10779
  })
10660
10780
  ] })
10661
10781
  })
10662
- }), /* @__PURE__ */ Y(_c, {
10782
+ }), /* @__PURE__ */ Y(xc, {
10663
10783
  title: "Behaviour",
10664
10784
  children: [
10665
- /* @__PURE__ */ J(vc, {
10785
+ /* @__PURE__ */ J(Sc, {
10666
10786
  label: "Show arrows",
10667
10787
  checked: e.showArrows !== !1,
10668
10788
  onChange: (e) => t({ showArrows: e })
10669
10789
  }),
10670
- /* @__PURE__ */ J(vc, {
10790
+ /* @__PURE__ */ J(Sc, {
10671
10791
  label: "Show dots",
10672
10792
  checked: e.showDots !== !1,
10673
10793
  onChange: (e) => t({ showDots: e })
10674
10794
  }),
10675
- /* @__PURE__ */ J(vc, {
10795
+ /* @__PURE__ */ J(Sc, {
10676
10796
  label: "Slide automatically",
10677
10797
  checked: !!e.autoplay,
10678
10798
  onChange: (e) => t({ autoplay: e }),
@@ -10696,15 +10816,15 @@ var bc = ({ value: e, onChange: t }) => {
10696
10816
  })
10697
10817
  })
10698
10818
  ]
10699
- })] }), Tc = ({ p: e, set: t }) => {
10819
+ })] }), kc = ({ p: e, set: t }) => {
10700
10820
  let n = e.url ?? "", r = n ? Mt(n) : null;
10701
- return /* @__PURE__ */ Y(_c, {
10821
+ return /* @__PURE__ */ Y(xc, {
10702
10822
  title: "Video",
10703
10823
  children: [
10704
10824
  /* @__PURE__ */ J(Q, {
10705
10825
  label: "Link",
10706
10826
  children: /* @__PURE__ */ J("input", {
10707
- className: hc,
10827
+ className: yc,
10708
10828
  value: n,
10709
10829
  onChange: (e) => t({ url: e.target.value }),
10710
10830
  placeholder: "YouTube, Vimeo or .mp4 link"
@@ -10716,7 +10836,7 @@ var bc = ({ value: e, onChange: t }) => {
10716
10836
  }),
10717
10837
  r?.kind === "file" && /* @__PURE__ */ J(Q, {
10718
10838
  label: "Cover",
10719
- children: /* @__PURE__ */ J(bc, {
10839
+ children: /* @__PURE__ */ J(wc, {
10720
10840
  value: e.poster ?? "",
10721
10841
  onChange: (e) => t({ poster: e })
10722
10842
  })
@@ -10724,7 +10844,7 @@ var bc = ({ value: e, onChange: t }) => {
10724
10844
  /* @__PURE__ */ J(Q, {
10725
10845
  label: "Shape",
10726
10846
  children: /* @__PURE__ */ Y("select", {
10727
- className: hc,
10847
+ className: yc,
10728
10848
  value: e.ratio ?? "16:9",
10729
10849
  onChange: (e) => t({ ratio: e.target.value }),
10730
10850
  children: [
@@ -10747,20 +10867,20 @@ var bc = ({ value: e, onChange: t }) => {
10747
10867
  ]
10748
10868
  })
10749
10869
  }),
10750
- r?.kind === "file" && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(vc, {
10870
+ r?.kind === "file" && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Sc, {
10751
10871
  label: "Play on load (muted)",
10752
10872
  checked: !!e.autoplay,
10753
10873
  onChange: (e) => t({ autoplay: e })
10754
- }), /* @__PURE__ */ J(vc, {
10874
+ }), /* @__PURE__ */ J(Sc, {
10755
10875
  label: "Loop",
10756
10876
  checked: !!e.loop,
10757
10877
  onChange: (e) => t({ loop: e })
10758
10878
  })] })
10759
10879
  ]
10760
10880
  });
10761
- }, Ec = ({ p: e, set: t }) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(_c, {
10881
+ }, Ac = ({ p: e, set: t }) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(xc, {
10762
10882
  title: "Links",
10763
- children: /* @__PURE__ */ J(yc, {
10883
+ children: /* @__PURE__ */ J(Cc, {
10764
10884
  items: e.links ?? [],
10765
10885
  onChange: (e) => t({ links: e }),
10766
10886
  blank: () => ({
@@ -10769,7 +10889,7 @@ var bc = ({ value: e, onChange: t }) => {
10769
10889
  }),
10770
10890
  addLabel: "Add link",
10771
10891
  render: (e, t) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("select", {
10772
- className: hc,
10892
+ className: yc,
10773
10893
  value: e.network,
10774
10894
  onChange: (e) => t({ network: e.target.value }),
10775
10895
  children: Object.entries(_r).map(([e, t]) => /* @__PURE__ */ J("option", {
@@ -10777,19 +10897,19 @@ var bc = ({ value: e, onChange: t }) => {
10777
10897
  children: t.label
10778
10898
  }, e))
10779
10899
  }), /* @__PURE__ */ J("input", {
10780
- className: hc,
10900
+ className: yc,
10781
10901
  value: e.url,
10782
10902
  onChange: (e) => t({ url: e.target.value }),
10783
10903
  placeholder: e.network === "email" ? "mailto:you@example.com" : "https://…"
10784
10904
  })] })
10785
10905
  })
10786
- }), /* @__PURE__ */ Y(_c, {
10906
+ }), /* @__PURE__ */ Y(xc, {
10787
10907
  title: "Look",
10788
10908
  children: [
10789
10909
  /* @__PURE__ */ J(Q, {
10790
10910
  label: "Style",
10791
10911
  children: /* @__PURE__ */ Y("select", {
10792
- className: hc,
10912
+ className: yc,
10793
10913
  value: e.shape ?? "circle",
10794
10914
  onChange: (e) => t({ shape: e.target.value }),
10795
10915
  children: [
@@ -10811,7 +10931,7 @@ var bc = ({ value: e, onChange: t }) => {
10811
10931
  /* @__PURE__ */ J(Q, {
10812
10932
  label: "Colours",
10813
10933
  children: /* @__PURE__ */ Y("select", {
10814
- className: hc,
10934
+ className: yc,
10815
10935
  value: e.colorMode ?? "brand",
10816
10936
  onChange: (e) => t({ colorMode: e.target.value }),
10817
10937
  children: [/* @__PURE__ */ J("option", {
@@ -10835,9 +10955,9 @@ var bc = ({ value: e, onChange: t }) => {
10835
10955
  })
10836
10956
  })
10837
10957
  ]
10838
- })] }), Dc = ({ p: e, set: t }) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(_c, {
10958
+ })] }), jc = ({ p: e, set: t }) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(xc, {
10839
10959
  title: "Menu items",
10840
- children: /* @__PURE__ */ J(yc, {
10960
+ children: /* @__PURE__ */ J(Cc, {
10841
10961
  items: e.links ?? [],
10842
10962
  onChange: (e) => t({ links: e }),
10843
10963
  blank: () => ({
@@ -10846,7 +10966,7 @@ var bc = ({ value: e, onChange: t }) => {
10846
10966
  }),
10847
10967
  addLabel: "Add menu item",
10848
10968
  render: (e, t) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("input", {
10849
- className: hc,
10969
+ className: yc,
10850
10970
  value: e.label,
10851
10971
  onChange: (e) => t({ label: e.target.value }),
10852
10972
  placeholder: "What it says",
@@ -10856,12 +10976,12 @@ var bc = ({ value: e, onChange: t }) => {
10856
10976
  onChange: (e) => t({ href: e })
10857
10977
  })] })
10858
10978
  })
10859
- }), /* @__PURE__ */ Y(_c, {
10979
+ }), /* @__PURE__ */ Y(xc, {
10860
10980
  title: "Layout",
10861
10981
  children: [/* @__PURE__ */ J(Q, {
10862
10982
  label: "Direction",
10863
10983
  children: /* @__PURE__ */ Y("select", {
10864
- className: hc,
10984
+ className: yc,
10865
10985
  value: e.layout ?? "horizontal",
10866
10986
  onChange: (e) => t({ layout: e.target.value }),
10867
10987
  children: [/* @__PURE__ */ J("option", {
@@ -10875,7 +10995,7 @@ var bc = ({ value: e, onChange: t }) => {
10875
10995
  }), /* @__PURE__ */ J(Q, {
10876
10996
  label: "On phones",
10877
10997
  children: /* @__PURE__ */ Y("select", {
10878
- className: hc,
10998
+ className: yc,
10879
10999
  value: e.mobile ?? "hamburger",
10880
11000
  onChange: (e) => t({ mobile: e.target.value }),
10881
11001
  children: [/* @__PURE__ */ J("option", {
@@ -10887,11 +11007,11 @@ var bc = ({ value: e, onChange: t }) => {
10887
11007
  })]
10888
11008
  })
10889
11009
  })]
10890
- })] }), Oc = ({ p: e, set: t }) => /* @__PURE__ */ Y(_c, {
11010
+ })] }), Mc = ({ p: e, set: t }) => /* @__PURE__ */ Y(xc, {
10891
11011
  title: "Embed code",
10892
11012
  children: [
10893
11013
  /* @__PURE__ */ J("textarea", {
10894
- className: `${hc} font-mono min-h-[140px] select-text`,
11014
+ className: `${yc} font-mono min-h-[140px] select-text`,
10895
11015
  value: e.code ?? "",
10896
11016
  onChange: (e) => t({ code: e.target.value }),
10897
11017
  placeholder: "Paste the embed code from your booking, map, form or video tool",
@@ -10904,27 +11024,27 @@ var bc = ({ value: e, onChange: t }) => {
10904
11024
  /* @__PURE__ */ J(Q, {
10905
11025
  label: "Title",
10906
11026
  children: /* @__PURE__ */ J("input", {
10907
- className: hc,
11027
+ className: yc,
10908
11028
  value: e.title ?? "",
10909
11029
  onChange: (e) => t({ title: e.target.value }),
10910
11030
  placeholder: "Describes it for screen readers"
10911
11031
  })
10912
11032
  })
10913
11033
  ]
10914
- }), kc = ({ p: e, set: t }) => {
11034
+ }), Nc = ({ p: e, set: t }) => {
10915
11035
  let n = e.rows?.length ? e.rows : [[""]], r = Math.max(...n.map((e) => e.length)), i = (e, i, a) => t({ rows: n.map((t, n) => n === e ? Array.from({ length: r }, (e, n) => n === i ? a : t[n] ?? "") : t) });
10916
- return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y(_c, {
11036
+ return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y(xc, {
10917
11037
  title: "Cells",
10918
11038
  children: [/* @__PURE__ */ J("div", {
10919
11039
  className: "overflow-x-auto",
10920
11040
  children: /* @__PURE__ */ J("table", {
10921
11041
  className: "border-separate border-spacing-1",
10922
11042
  children: /* @__PURE__ */ J("tbody", { children: n.map((a, o) => /* @__PURE__ */ Y("tr", { children: [Array.from({ length: r }, (t, n) => /* @__PURE__ */ J("td", { children: /* @__PURE__ */ J("input", {
10923
- className: `${hc} min-w-[72px] ${o === 0 && e.headerRow !== !1 ? "font-semibold" : ""}`,
11043
+ className: `${yc} min-w-[72px] ${o === 0 && e.headerRow !== !1 ? "font-semibold" : ""}`,
10924
11044
  value: a[n] ?? "",
10925
11045
  onChange: (e) => i(o, n, e.target.value)
10926
11046
  }) }, n)), /* @__PURE__ */ J("td", { children: /* @__PURE__ */ J("button", {
10927
- className: gc,
11047
+ className: bc,
10928
11048
  disabled: n.length <= 1,
10929
11049
  onClick: () => t({ rows: n.filter((e, t) => t !== o) }),
10930
11050
  "aria-label": "Remove row",
@@ -10952,32 +11072,32 @@ var bc = ({ value: e, onChange: t }) => {
10952
11072
  })
10953
11073
  ]
10954
11074
  })]
10955
- }), /* @__PURE__ */ Y(_c, {
11075
+ }), /* @__PURE__ */ Y(xc, {
10956
11076
  title: "Look",
10957
- children: [/* @__PURE__ */ J(vc, {
11077
+ children: [/* @__PURE__ */ J(Sc, {
10958
11078
  label: "First row is a heading",
10959
11079
  checked: e.headerRow !== !1,
10960
11080
  onChange: (e) => t({ headerRow: e })
10961
- }), /* @__PURE__ */ J(vc, {
11081
+ }), /* @__PURE__ */ J(Sc, {
10962
11082
  label: "Shade every other row",
10963
11083
  checked: e.striped !== !1,
10964
11084
  onChange: (e) => t({ striped: e })
10965
11085
  })]
10966
11086
  })] });
10967
- }, Ac = (e) => {
11087
+ }, Pc = (e) => {
10968
11088
  let t = new Date(e ?? "");
10969
11089
  if (Number.isNaN(t.getTime())) return "";
10970
11090
  let n = (e) => String(e).padStart(2, "0");
10971
11091
  return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`;
10972
- }, jc = ({ p: e, set: t }) => /* @__PURE__ */ Y(_c, {
11092
+ }, Fc = ({ p: e, set: t }) => /* @__PURE__ */ Y(xc, {
10973
11093
  title: "Countdown",
10974
11094
  children: [
10975
11095
  /* @__PURE__ */ J(Q, {
10976
11096
  label: "Ends at",
10977
11097
  children: /* @__PURE__ */ J("input", {
10978
11098
  type: "datetime-local",
10979
- className: hc,
10980
- value: Ac(e.target),
11099
+ className: yc,
11100
+ value: Pc(e.target),
10981
11101
  onChange: (e) => e.target.value && t({ target: new Date(e.target.value).toISOString() })
10982
11102
  })
10983
11103
  }),
@@ -10988,26 +11108,26 @@ var bc = ({ value: e, onChange: t }) => {
10988
11108
  /* @__PURE__ */ J(Q, {
10989
11109
  label: "When over",
10990
11110
  children: /* @__PURE__ */ J("input", {
10991
- className: hc,
11111
+ className: yc,
10992
11112
  value: e.expiredMessage ?? "",
10993
11113
  onChange: (e) => t({ expiredMessage: e.target.value }),
10994
11114
  placeholder: "This offer has ended"
10995
11115
  })
10996
11116
  }),
10997
- /* @__PURE__ */ J(vc, {
11117
+ /* @__PURE__ */ J(Sc, {
10998
11118
  label: "Show Days / Hours / Minutes labels",
10999
11119
  checked: e.showLabels !== !1,
11000
11120
  onChange: (e) => t({ showLabels: e })
11001
11121
  })
11002
11122
  ]
11003
- }), Mc = [
11123
+ }), Ic = [
11004
11124
  ["text", "Short answer"],
11005
11125
  ["email", "Email"],
11006
11126
  ["tel", "Phone"],
11007
11127
  ["textarea", "Long answer"],
11008
11128
  ["select", "Dropdown"],
11009
11129
  ["checkbox", "Checkbox"]
11010
- ], Nc = ({ node: e, p: t, set: n }) => {
11130
+ ], Lc = ({ node: e, p: t, set: n }) => {
11011
11131
  let r = La(), i = Et(t.action, e.id, {
11012
11132
  apiKey: r.apiKey,
11013
11133
  templateId: r.templateId,
@@ -11026,9 +11146,9 @@ var bc = ({ value: e, onChange: t }) => {
11026
11146
  text: "This form has nowhere to send messages yet. Add an address below."
11027
11147
  };
11028
11148
  return /* @__PURE__ */ Y(q, { children: [
11029
- /* @__PURE__ */ J(_c, {
11149
+ /* @__PURE__ */ J(xc, {
11030
11150
  title: "Fields",
11031
- children: /* @__PURE__ */ J(yc, {
11151
+ children: /* @__PURE__ */ J(Cc, {
11032
11152
  items: t.fields ?? [],
11033
11153
  min: 1,
11034
11154
  onChange: (e) => n({ fields: e }),
@@ -11040,16 +11160,16 @@ var bc = ({ value: e, onChange: t }) => {
11040
11160
  addLabel: "Add field",
11041
11161
  render: (e, t) => /* @__PURE__ */ Y(q, { children: [
11042
11162
  /* @__PURE__ */ J("input", {
11043
- className: hc,
11163
+ className: yc,
11044
11164
  value: e.label,
11045
11165
  onChange: (e) => t({ label: e.target.value }),
11046
11166
  placeholder: "Question"
11047
11167
  }),
11048
11168
  /* @__PURE__ */ J("select", {
11049
- className: hc,
11169
+ className: yc,
11050
11170
  value: e.type,
11051
11171
  onChange: (e) => t({ type: e.target.value }),
11052
- children: Mc.map(([e, t]) => /* @__PURE__ */ J("option", {
11172
+ children: Ic.map(([e, t]) => /* @__PURE__ */ J("option", {
11053
11173
  value: e,
11054
11174
  children: t
11055
11175
  }, e))
@@ -11067,7 +11187,7 @@ var bc = ({ value: e, onChange: t }) => {
11067
11187
  onChange: (e) => t({ placeholder: e.target.value }),
11068
11188
  placeholder: "Hint text (optional)"
11069
11189
  }),
11070
- /* @__PURE__ */ J(vc, {
11190
+ /* @__PURE__ */ J(Sc, {
11071
11191
  label: "Required",
11072
11192
  checked: !!e.required,
11073
11193
  onChange: (e) => t({ required: e })
@@ -11075,12 +11195,12 @@ var bc = ({ value: e, onChange: t }) => {
11075
11195
  ] })
11076
11196
  })
11077
11197
  }),
11078
- /* @__PURE__ */ Y(_c, {
11198
+ /* @__PURE__ */ Y(xc, {
11079
11199
  title: "After sending",
11080
11200
  children: [/* @__PURE__ */ J(Q, {
11081
11201
  label: "Button",
11082
11202
  children: /* @__PURE__ */ J("input", {
11083
- className: hc,
11203
+ className: yc,
11084
11204
  value: t.submitLabel ?? "",
11085
11205
  onChange: (e) => n({ submitLabel: e.target.value }),
11086
11206
  placeholder: "Send message"
@@ -11088,14 +11208,14 @@ var bc = ({ value: e, onChange: t }) => {
11088
11208
  }), /* @__PURE__ */ J(Q, {
11089
11209
  label: "Thank-you",
11090
11210
  children: /* @__PURE__ */ J("input", {
11091
- className: hc,
11211
+ className: yc,
11092
11212
  value: t.successMessage ?? "",
11093
11213
  onChange: (e) => n({ successMessage: e.target.value }),
11094
11214
  placeholder: "Thanks! We got your message."
11095
11215
  })
11096
11216
  })]
11097
11217
  }),
11098
- /* @__PURE__ */ Y(_c, {
11218
+ /* @__PURE__ */ Y(xc, {
11099
11219
  title: "Send button look",
11100
11220
  children: [
11101
11221
  /* @__PURE__ */ J(Q, {
@@ -11129,7 +11249,7 @@ var bc = ({ value: e, onChange: t }) => {
11129
11249
  /* @__PURE__ */ J(Q, {
11130
11250
  label: "Corners",
11131
11251
  children: /* @__PURE__ */ Y("select", {
11132
- className: hc,
11252
+ className: yc,
11133
11253
  value: t.buttonRadius ?? "",
11134
11254
  onChange: (e) => n({ buttonRadius: e.target.value || void 0 }),
11135
11255
  children: [
@@ -11158,22 +11278,22 @@ var bc = ({ value: e, onChange: t }) => {
11158
11278
  })
11159
11279
  ]
11160
11280
  }),
11161
- /* @__PURE__ */ Y(_c, {
11281
+ /* @__PURE__ */ Y(xc, {
11162
11282
  title: "Where messages go",
11163
11283
  children: [/* @__PURE__ */ J("p", {
11164
11284
  className: `text-[11px] leading-snug ${a.ok ? "text-px-muted" : "text-amber-300"}`,
11165
11285
  children: a.text
11166
11286
  }), /* @__PURE__ */ J("input", {
11167
- className: hc,
11287
+ className: yc,
11168
11288
  value: t.action ?? "",
11169
11289
  onChange: (e) => n({ action: e.target.value }),
11170
11290
  placeholder: i.kind === "custom" ? "" : "Use a different address (optional)"
11171
11291
  })]
11172
11292
  })
11173
11293
  ] });
11174
- }, Pc = ({ p: e, set: t }) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(_c, {
11294
+ }, Rc = ({ p: e, set: t }) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(xc, {
11175
11295
  title: "Questions",
11176
- children: /* @__PURE__ */ J(yc, {
11296
+ children: /* @__PURE__ */ J(Cc, {
11177
11297
  items: e.items ?? [],
11178
11298
  onChange: (e) => t({ items: e }),
11179
11299
  blank: () => ({
@@ -11182,37 +11302,37 @@ var bc = ({ value: e, onChange: t }) => {
11182
11302
  }),
11183
11303
  addLabel: "Add question",
11184
11304
  render: (e, t) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("input", {
11185
- className: hc,
11305
+ className: yc,
11186
11306
  value: e.title,
11187
11307
  onChange: (e) => t({ title: e.target.value }),
11188
11308
  placeholder: "Question"
11189
11309
  }), /* @__PURE__ */ J("textarea", {
11190
- className: `${hc} select-text`,
11310
+ className: `${yc} select-text`,
11191
11311
  rows: 3,
11192
11312
  value: e.content,
11193
11313
  onChange: (e) => t({ content: e.target.value }),
11194
11314
  placeholder: "Answer"
11195
11315
  })] })
11196
11316
  })
11197
- }), /* @__PURE__ */ Y(_c, {
11317
+ }), /* @__PURE__ */ Y(xc, {
11198
11318
  title: "Behaviour",
11199
- children: [/* @__PURE__ */ J(vc, {
11319
+ children: [/* @__PURE__ */ J(Sc, {
11200
11320
  label: "Open the first one",
11201
11321
  checked: e.openFirst !== !1,
11202
11322
  onChange: (e) => t({ openFirst: e })
11203
- }), /* @__PURE__ */ J(vc, {
11323
+ }), /* @__PURE__ */ J(Sc, {
11204
11324
  label: "Allow several open at once",
11205
11325
  checked: !!e.allowMultiple,
11206
11326
  onChange: (e) => t({ allowMultiple: e })
11207
11327
  })]
11208
- })] }), Fc = (e) => e.trim() && Number.isFinite(Number(e)) ? Math.max(1, Math.round(Number(e))) : void 0, Ic = [
11328
+ })] }), zc = (e) => e.trim() && Number.isFinite(Number(e)) ? Math.max(1, Math.round(Number(e))) : void 0, Bc = [
11209
11329
  "",
11210
11330
  "best_seller",
11211
11331
  "most_recent"
11212
- ], Lc = ({ type: e, p: t, set: n }) => {
11213
- let r = (t) => qn(e, t), i = t.category ?? "", a = Ic.includes(i) ? i : "category", o = e === "shopGrid" && t.storeMode === !1;
11332
+ ], Vc = ({ type: e, p: t, set: n }) => {
11333
+ let r = (t) => qn(e, t), i = t.category ?? "", a = Bc.includes(i) ? i : "category", o = e === "shopGrid" && t.storeMode === !1;
11214
11334
  return /* @__PURE__ */ Y(q, { children: [
11215
- /* @__PURE__ */ Y(_c, {
11335
+ /* @__PURE__ */ Y(xc, {
11216
11336
  title: Un(e),
11217
11337
  children: [
11218
11338
  /* @__PURE__ */ J("p", {
@@ -11237,6 +11357,10 @@ var bc = ({ value: e, onChange: t }) => {
11237
11357
  value: t.mode ?? "",
11238
11358
  onChange: (e) => n({ mode: e.target.value }),
11239
11359
  children: [
11360
+ /* @__PURE__ */ J("option", {
11361
+ value: "buy",
11362
+ children: "A buy-now card"
11363
+ }),
11240
11364
  /* @__PURE__ */ J("option", {
11241
11365
  value: "detail",
11242
11366
  children: "A full product page"
@@ -11252,13 +11376,11 @@ var bc = ({ value: e, onChange: t }) => {
11252
11376
  ]
11253
11377
  })
11254
11378
  }),
11255
- t.mode !== "detail" && /* @__PURE__ */ J(Q, {
11256
- label: "Product",
11257
- children: /* @__PURE__ */ J("input", {
11258
- className: "w-full bg-px-raised border border-px-line2 rounded px-2 py-1 text-xs text-px-text placeholder-px-faint focus:outline-none focus:border-px-accent",
11379
+ t.mode !== "detail" && /* @__PURE__ */ J(xc, {
11380
+ title: "Product to sell",
11381
+ children: /* @__PURE__ */ J(vc, {
11259
11382
  value: t.productId ?? "",
11260
- onChange: (e) => n({ productId: e.target.value }),
11261
- placeholder: "Which product to sell"
11383
+ onChange: (e) => n({ productId: e })
11262
11384
  })
11263
11385
  }),
11264
11386
  t.mode === "detail" && /* @__PURE__ */ J("p", {
@@ -11277,10 +11399,10 @@ var bc = ({ value: e, onChange: t }) => {
11277
11399
  })
11278
11400
  ]
11279
11401
  }),
11280
- e === "shopGrid" && /* @__PURE__ */ Y(_c, {
11402
+ e === "shopGrid" && /* @__PURE__ */ Y(xc, {
11281
11403
  title: "Layout",
11282
11404
  children: [
11283
- /* @__PURE__ */ J(vc, {
11405
+ /* @__PURE__ */ J(Sc, {
11284
11406
  label: "Full shop with search and filters",
11285
11407
  checked: t.storeMode !== !1,
11286
11408
  onChange: (e) => n({ storeMode: e }),
@@ -11291,7 +11413,7 @@ var bc = ({ value: e, onChange: t }) => {
11291
11413
  children: /* @__PURE__ */ J("select", {
11292
11414
  className: "w-full bg-px-raised border border-px-line2 rounded px-2 py-1 text-xs text-px-text placeholder-px-faint focus:outline-none focus:border-px-accent",
11293
11415
  value: String(t.itemsPerRow ?? 3),
11294
- onChange: (e) => n({ itemsPerRow: Fc(e.target.value) }),
11416
+ onChange: (e) => n({ itemsPerRow: zc(e.target.value) }),
11295
11417
  children: [
11296
11418
  1,
11297
11419
  2,
@@ -11305,7 +11427,7 @@ var bc = ({ value: e, onChange: t }) => {
11305
11427
  }, e))
11306
11428
  })
11307
11429
  }),
11308
- /* @__PURE__ */ J(vc, {
11430
+ /* @__PURE__ */ J(Sc, {
11309
11431
  label: "Dark cards",
11310
11432
  checked: t.mode === "dark",
11311
11433
  onChange: (e) => n({ mode: e ? "dark" : "" })
@@ -11354,11 +11476,11 @@ var bc = ({ value: e, onChange: t }) => {
11354
11476
  min: 1,
11355
11477
  max: 96,
11356
11478
  value: t.limit ?? "",
11357
- onChange: (e) => n({ limit: Fc(e.target.value) }),
11479
+ onChange: (e) => n({ limit: zc(e.target.value) }),
11358
11480
  placeholder: "6"
11359
11481
  })
11360
11482
  }),
11361
- /* @__PURE__ */ J(vc, {
11483
+ /* @__PURE__ */ J(Sc, {
11362
11484
  label: "Split into pages",
11363
11485
  checked: !!t.paginated,
11364
11486
  onChange: (e) => n({ paginated: e })
@@ -11371,14 +11493,14 @@ var bc = ({ value: e, onChange: t }) => {
11371
11493
  min: 1,
11372
11494
  max: 96,
11373
11495
  value: t.itemsPerPage ?? "",
11374
- onChange: (e) => n({ itemsPerPage: Fc(e.target.value) }),
11496
+ onChange: (e) => n({ itemsPerPage: zc(e.target.value) }),
11375
11497
  placeholder: "12"
11376
11498
  })
11377
11499
  })
11378
11500
  ] })
11379
11501
  ]
11380
11502
  }),
11381
- e === "contentList" && /* @__PURE__ */ Y(_c, {
11503
+ e === "contentList" && /* @__PURE__ */ Y(xc, {
11382
11504
  title: "What to show",
11383
11505
  children: [
11384
11506
  /* @__PURE__ */ J(Q, {
@@ -11430,7 +11552,7 @@ var bc = ({ value: e, onChange: t }) => {
11430
11552
  children: /* @__PURE__ */ J("select", {
11431
11553
  className: "w-full bg-px-raised border border-px-line2 rounded px-2 py-1 text-xs text-px-text placeholder-px-faint focus:outline-none focus:border-px-accent",
11432
11554
  value: String(t.itemsPerRow ?? 3),
11433
- onChange: (e) => n({ itemsPerRow: Fc(e.target.value) }),
11555
+ onChange: (e) => n({ itemsPerRow: zc(e.target.value) }),
11434
11556
  children: [
11435
11557
  1,
11436
11558
  2,
@@ -11450,13 +11572,13 @@ var bc = ({ value: e, onChange: t }) => {
11450
11572
  min: 1,
11451
11573
  max: 96,
11452
11574
  value: t.limit ?? "",
11453
- onChange: (e) => n({ limit: Fc(e.target.value) }),
11575
+ onChange: (e) => n({ limit: zc(e.target.value) }),
11454
11576
  placeholder: "All"
11455
11577
  })
11456
11578
  })
11457
11579
  ]
11458
11580
  }),
11459
- e === "signupForm" && /* @__PURE__ */ Y(_c, {
11581
+ e === "signupForm" && /* @__PURE__ */ Y(xc, {
11460
11582
  title: "Connection",
11461
11583
  children: [/* @__PURE__ */ J("p", {
11462
11584
  className: "text-[11px] text-px-muted leading-snug",
@@ -11472,64 +11594,64 @@ var bc = ({ value: e, onChange: t }) => {
11472
11594
  })]
11473
11595
  })
11474
11596
  ] });
11475
- }, Rc = ({ node: e }) => {
11597
+ }, Hc = ({ node: e }) => {
11476
11598
  let { updateNodeProps: t } = Z();
11477
11599
  if (!Bn(e.type)) return null;
11478
11600
  let n = e.props ?? {}, r = (n) => t(e.id, n);
11479
11601
  return /* @__PURE__ */ Y("div", {
11480
11602
  className: "p-3 space-y-4 border-b border-px-line",
11481
11603
  children: [
11482
- e.type === "icon" && /* @__PURE__ */ J(Cc, {
11604
+ e.type === "icon" && /* @__PURE__ */ J(Dc, {
11483
11605
  node: e,
11484
11606
  p: n,
11485
11607
  set: r
11486
11608
  }),
11487
- e.type === "carousel" && /* @__PURE__ */ J(wc, {
11609
+ e.type === "carousel" && /* @__PURE__ */ J(Oc, {
11488
11610
  p: n,
11489
11611
  set: r
11490
11612
  }),
11491
- e.type === "video" && /* @__PURE__ */ J(Tc, {
11613
+ e.type === "video" && /* @__PURE__ */ J(kc, {
11492
11614
  p: n,
11493
11615
  set: r
11494
11616
  }),
11495
- e.type === "social" && /* @__PURE__ */ J(Ec, {
11617
+ e.type === "social" && /* @__PURE__ */ J(Ac, {
11496
11618
  p: n,
11497
11619
  set: r
11498
11620
  }),
11499
- e.type === "menu" && /* @__PURE__ */ J(Dc, {
11621
+ e.type === "menu" && /* @__PURE__ */ J(jc, {
11500
11622
  p: n,
11501
11623
  set: r
11502
11624
  }),
11503
- e.type === "html" && /* @__PURE__ */ J(Oc, {
11625
+ e.type === "html" && /* @__PURE__ */ J(Mc, {
11504
11626
  p: n,
11505
11627
  set: r
11506
11628
  }),
11507
- e.type === "table" && /* @__PURE__ */ J(kc, {
11629
+ e.type === "table" && /* @__PURE__ */ J(Nc, {
11508
11630
  p: n,
11509
11631
  set: r
11510
11632
  }),
11511
- e.type === "timer" && /* @__PURE__ */ J(jc, {
11633
+ e.type === "timer" && /* @__PURE__ */ J(Fc, {
11512
11634
  p: n,
11513
11635
  set: r
11514
11636
  }),
11515
- e.type === "form" && /* @__PURE__ */ J(Nc, {
11637
+ e.type === "form" && /* @__PURE__ */ J(Lc, {
11516
11638
  node: e,
11517
11639
  p: n,
11518
11640
  set: r
11519
11641
  }),
11520
- e.type === "accordion" && /* @__PURE__ */ J(Pc, {
11642
+ e.type === "accordion" && /* @__PURE__ */ J(Rc, {
11521
11643
  p: n,
11522
11644
  set: r
11523
11645
  }),
11524
- br(e.type) && /* @__PURE__ */ J(Lc, {
11646
+ br(e.type) && /* @__PURE__ */ J(Vc, {
11525
11647
  type: e.type,
11526
11648
  p: n,
11527
11649
  set: r
11528
11650
  })
11529
11651
  ]
11530
11652
  });
11531
- }, zc = (e) => e.replace(/-/g, " "), Bc = ({ value: e, onChange: t }) => {
11532
- let [n, r] = K(!1), [i, a] = K(""), o = Object.values(rn).flat().filter((e, t, n) => n.indexOf(e) === t && (!i || zc(e).includes(i.toLowerCase()))), s = (e) => /* @__PURE__ */ J("svg", {
11653
+ }, Uc = (e) => e.replace(/-/g, " "), Wc = ({ value: e, onChange: t }) => {
11654
+ let [n, r] = K(!1), [i, a] = K(""), o = Object.values(rn).flat().filter((e, t, n) => n.indexOf(e) === t && (!i || Uc(e).includes(i.toLowerCase()))), s = (e) => /* @__PURE__ */ J("svg", {
11533
11655
  width: 18,
11534
11656
  height: 18,
11535
11657
  viewBox: "0 0 24 24",
@@ -11555,7 +11677,7 @@ var bc = ({ value: e, onChange: t }) => {
11555
11677
  s(e),
11556
11678
  /* @__PURE__ */ J("span", {
11557
11679
  className: "capitalize",
11558
- children: zc(e || "star")
11680
+ children: Uc(e || "star")
11559
11681
  }),
11560
11682
  /* @__PURE__ */ J("span", {
11561
11683
  className: "text-px-faint",
@@ -11574,8 +11696,8 @@ var bc = ({ value: e, onChange: t }) => {
11574
11696
  className: "grid grid-cols-7 gap-1 max-h-36 overflow-y-auto",
11575
11697
  children: o.map((n) => /* @__PURE__ */ J("button", {
11576
11698
  type: "button",
11577
- title: zc(n),
11578
- "aria-label": zc(n),
11699
+ title: Uc(n),
11700
+ "aria-label": Uc(n),
11579
11701
  "aria-pressed": n === e,
11580
11702
  onClick: () => {
11581
11703
  t(n), r(!1);
@@ -11586,7 +11708,7 @@ var bc = ({ value: e, onChange: t }) => {
11586
11708
  })]
11587
11709
  })]
11588
11710
  });
11589
- }, Vc = ({ fields: e, get: t, put: n }) => /* @__PURE__ */ J("div", {
11711
+ }, Gc = ({ fields: e, get: t, put: n }) => /* @__PURE__ */ J("div", {
11590
11712
  className: "space-y-3",
11591
11713
  children: e.map((e) => {
11592
11714
  let r = t(e.key);
@@ -11644,7 +11766,7 @@ var bc = ({ value: e, onChange: t }) => {
11644
11766
  }),
11645
11767
  e.type === "image" && /* @__PURE__ */ Y("div", {
11646
11768
  className: "space-y-1.5",
11647
- children: [/* @__PURE__ */ J(bc, {
11769
+ children: [/* @__PURE__ */ J(wc, {
11648
11770
  value: typeof r == "string" ? r : "",
11649
11771
  onChange: (t) => n(e.key, t)
11650
11772
  }), r ? /* @__PURE__ */ J("input", {
@@ -11655,11 +11777,15 @@ var bc = ({ value: e, onChange: t }) => {
11655
11777
  "aria-label": `${e.label} description`
11656
11778
  }) : null]
11657
11779
  }),
11658
- e.type === "icon" && /* @__PURE__ */ J(Bc, {
11780
+ e.type === "icon" && /* @__PURE__ */ J(Wc, {
11659
11781
  value: typeof r == "string" ? r : "",
11660
11782
  onChange: (t) => n(e.key, t)
11661
11783
  }),
11662
- e.type === "toggle" && /* @__PURE__ */ J(vc, {
11784
+ e.type === "product" && /* @__PURE__ */ J(vc, {
11785
+ value: typeof r == "string" ? r : "",
11786
+ onChange: (t) => n(e.key, t)
11787
+ }),
11788
+ e.type === "toggle" && /* @__PURE__ */ J(Sc, {
11663
11789
  label: e.label,
11664
11790
  checked: !!r,
11665
11791
  onChange: (t) => n(e.key, t)
@@ -11674,7 +11800,7 @@ var bc = ({ value: e, onChange: t }) => {
11674
11800
  children: t
11675
11801
  }, e))
11676
11802
  }),
11677
- e.type === "list" && /* @__PURE__ */ J(yc, {
11803
+ e.type === "list" && /* @__PURE__ */ J(Cc, {
11678
11804
  items: Array.isArray(r) ? r : [],
11679
11805
  min: e.min ?? 0,
11680
11806
  onChange: (t) => n(e.key, e.limit ? t.slice(0, e.limit) : t),
@@ -11683,7 +11809,7 @@ var bc = ({ value: e, onChange: t }) => {
11683
11809
  href: ""
11684
11810
  } : e.type === "toggle" ? !1 : e.type === "icon" ? "star" : ""])),
11685
11811
  addLabel: `Add ${e.itemName ?? "item"}`,
11686
- render: (t, n) => /* @__PURE__ */ J(Vc, {
11812
+ render: (t, n) => /* @__PURE__ */ J(Gc, {
11687
11813
  fields: e.item ?? [],
11688
11814
  get: (e) => t[e],
11689
11815
  put: (e, t) => n({ [e]: t })
@@ -11696,7 +11822,7 @@ var bc = ({ value: e, onChange: t }) => {
11696
11822
  ]
11697
11823
  }, e.key);
11698
11824
  })
11699
- }), Hc = [
11825
+ }), Kc = [
11700
11826
  ["canvas", "Page"],
11701
11827
  ["surface", "Card"],
11702
11828
  ["sunken", "Soft"],
@@ -11704,7 +11830,7 @@ var bc = ({ value: e, onChange: t }) => {
11704
11830
  ["inverted", "Dark"],
11705
11831
  ["gradient", "Gradient"],
11706
11832
  ["image", "Picture"]
11707
- ], Uc = ({ label: e, children: t }) => /* @__PURE__ */ Y("div", {
11833
+ ], qc = ({ label: e, children: t }) => /* @__PURE__ */ Y("div", {
11708
11834
  role: "group",
11709
11835
  "aria-label": e,
11710
11836
  className: "flex items-center gap-2",
@@ -11716,7 +11842,7 @@ var bc = ({ value: e, onChange: t }) => {
11716
11842
  children: t
11717
11843
  })]
11718
11844
  });
11719
- function Wc({ value: e, options: t, onChange: n, label: r }) {
11845
+ function Jc({ value: e, options: t, onChange: n, label: r }) {
11720
11846
  return /* @__PURE__ */ J("div", {
11721
11847
  role: "radiogroup",
11722
11848
  "aria-label": r,
@@ -11731,7 +11857,7 @@ function Wc({ value: e, options: t, onChange: n, label: r }) {
11731
11857
  }, t))
11732
11858
  });
11733
11859
  }
11734
- var Gc = ({ node: e }) => {
11860
+ var Yc = ({ node: e }) => {
11735
11861
  let { setSectionVariant: n, setSectionContent: r, setSectionStyle: i, detachSection: a, resetSectionTweaks: o, moveNodeUp: s, moveNodeDown: c, duplicateNode: l, deleteNode: u } = Z(), d = Jr(e);
11736
11862
  if (!d) return null;
11737
11863
  let f = er(d.kind), m = f.variants.find((e) => e.id === d.variant) ?? f.variants[0], h = f.fields.filter((e) => !m.uses || m.uses.includes(e.key)), g = d.style ?? {}, _ = Cn(e), v = (t, n) => r(e.id, t, n), y = "flex items-center justify-center w-7 h-7 rounded-md text-px-text2 hover:text-white hover:bg-px-line2 cursor-pointer transition-colors";
@@ -11788,7 +11914,7 @@ var Gc = ({ node: e }) => {
11788
11914
  ]
11789
11915
  })]
11790
11916
  }),
11791
- f.variants.length > 1 && /* @__PURE__ */ J(_c, {
11917
+ f.variants.length > 1 && /* @__PURE__ */ J(xc, {
11792
11918
  title: "Layout",
11793
11919
  children: /* @__PURE__ */ J("div", {
11794
11920
  className: "grid grid-cols-2 gap-2",
@@ -11819,45 +11945,45 @@ var Gc = ({ node: e }) => {
11819
11945
  }, t.id))
11820
11946
  })
11821
11947
  }),
11822
- /* @__PURE__ */ J(_c, {
11948
+ /* @__PURE__ */ J(xc, {
11823
11949
  title: "Words and pictures",
11824
- children: /* @__PURE__ */ J(Vc, {
11950
+ children: /* @__PURE__ */ J(Gc, {
11825
11951
  fields: h,
11826
11952
  get: (e) => d.content[e],
11827
11953
  put: v
11828
11954
  })
11829
11955
  }),
11830
- /* @__PURE__ */ Y(_c, {
11956
+ /* @__PURE__ */ Y(xc, {
11831
11957
  title: "Look",
11832
11958
  children: [
11833
- /* @__PURE__ */ J(Uc, {
11959
+ /* @__PURE__ */ J(qc, {
11834
11960
  label: "Background",
11835
- children: /* @__PURE__ */ J(Wc, {
11961
+ children: /* @__PURE__ */ J(Jc, {
11836
11962
  label: "Background",
11837
11963
  value: g.background ?? m.backgrounds?.[0] ?? "canvas",
11838
- options: Hc,
11964
+ options: Kc,
11839
11965
  onChange: (t) => i(e.id, { background: t })
11840
11966
  })
11841
11967
  }),
11842
- (g.background ?? m.backgrounds?.[0]) === "image" && /* @__PURE__ */ J(Uc, {
11968
+ (g.background ?? m.backgrounds?.[0]) === "image" && /* @__PURE__ */ J(qc, {
11843
11969
  label: "Picture",
11844
- children: /* @__PURE__ */ J(bc, {
11970
+ children: /* @__PURE__ */ J(wc, {
11845
11971
  value: g.image ?? "",
11846
11972
  onChange: (t) => i(e.id, { image: t })
11847
11973
  })
11848
11974
  }),
11849
- /* @__PURE__ */ J(Uc, {
11975
+ /* @__PURE__ */ J(qc, {
11850
11976
  label: "Align",
11851
- children: /* @__PURE__ */ J(Wc, {
11977
+ children: /* @__PURE__ */ J(Jc, {
11852
11978
  label: "Alignment",
11853
11979
  value: g.align ?? "left",
11854
11980
  options: [["left", "Left"], ["center", "Centre"]],
11855
11981
  onChange: (t) => i(e.id, { align: t })
11856
11982
  })
11857
11983
  }),
11858
- /* @__PURE__ */ J(Uc, {
11984
+ /* @__PURE__ */ J(qc, {
11859
11985
  label: "Spacing",
11860
- children: /* @__PURE__ */ J(Wc, {
11986
+ children: /* @__PURE__ */ J(Jc, {
11861
11987
  label: "Spacing",
11862
11988
  value: g.spacing ?? "normal",
11863
11989
  options: [
@@ -11868,14 +11994,14 @@ var Gc = ({ node: e }) => {
11868
11994
  onChange: (t) => i(e.id, { spacing: t })
11869
11995
  })
11870
11996
  }),
11871
- d.kind === "header" && /* @__PURE__ */ J(vc, {
11997
+ d.kind === "header" && /* @__PURE__ */ J(Sc, {
11872
11998
  label: "Keep at the top while scrolling",
11873
11999
  checked: !!g.pinned,
11874
12000
  onChange: (t) => i(e.id, { pinned: t })
11875
12001
  })
11876
12002
  ]
11877
12003
  }),
11878
- /* @__PURE__ */ Y(_c, {
12004
+ /* @__PURE__ */ Y(xc, {
11879
12005
  title: "Make it your own",
11880
12006
  children: [
11881
12007
  /* @__PURE__ */ J("p", {
@@ -11913,7 +12039,7 @@ var Gc = ({ node: e }) => {
11913
12039
  })
11914
12040
  ]
11915
12041
  });
11916
- }, Kc = ({ section: e, nodeId: t }) => {
12042
+ }, Xc = ({ section: e, nodeId: t }) => {
11917
12043
  let { selectNode: n, resetSectionTweaks: r } = Z(), i = G(null), a = Jr(e);
11918
12044
  if (!a) return null;
11919
12045
  let o = !!a.overrides?.[qt(e, t)];
@@ -11962,7 +12088,7 @@ var Gc = ({ node: e }) => {
11962
12088
  ]
11963
12089
  })]
11964
12090
  });
11965
- }, qc = ({ node: e }) => {
12091
+ }, Zc = ({ node: e }) => {
11966
12092
  let { resolveStyles: t, updateNodeStyles: n, isOverridden: r, resetResponsiveStyle: a, viewportMode: o } = Z(), s = t(e), c = s.horizontalConstraint || "left", l = s.verticalConstraint || "top", u = r(e, "horizontalConstraint"), d = r(e, "verticalConstraint"), f = (t) => {
11967
12093
  n(e.id, { horizontalConstraint: t });
11968
12094
  }, p = (t) => {
@@ -12130,7 +12256,7 @@ var Gc = ({ node: e }) => {
12130
12256
  })]
12131
12257
  })]
12132
12258
  });
12133
- }, Jc = ({ node: e }) => {
12259
+ }, Qc = ({ node: e }) => {
12134
12260
  let { resolveStyles: t, viewportMode: n, canvasCustomWidth: r, selectNode: i, documentTree: a } = Z(), [o, s] = K(null), c = or(a, e.id), l = t(e), u = r || (n === "mobile" ? 375 : n === "tablet" ? 768 : 1240), d = [];
12135
12261
  if (l.width && l.width.endsWith("px")) {
12136
12262
  let t = parseInt(l.width, 10);
@@ -12212,7 +12338,7 @@ var Gc = ({ node: e }) => {
12212
12338
  }, t.id);
12213
12339
  })
12214
12340
  });
12215
- }, Yc = ({ node: e }) => {
12341
+ }, $c = ({ node: e }) => {
12216
12342
  let { updateNodeStyles: t } = Z();
12217
12343
  return e.type === "section" ? /* @__PURE__ */ Y("div", {
12218
12344
  className: "p-3 space-y-2 border-b border-px-line",
@@ -12235,7 +12361,7 @@ var Gc = ({ node: e }) => {
12235
12361
  })]
12236
12362
  })]
12237
12363
  }) : null;
12238
- }, Xc = "bg-px-raised border border-px-line2 rounded px-2 py-1 text-xs text-px-text focus:outline-none focus:border-px-accent/60 font-mono", Zc = (e, t = 1) => String(Math.round(e * 10 ** t) / 10 ** t), Qc = ({ value: e, min: t, max: n, step: r, places: i = 1, width: a, label: o, onCommit: s }) => {
12364
+ }, el = "bg-px-raised border border-px-line2 rounded px-2 py-1 text-xs text-px-text focus:outline-none focus:border-px-accent/60 font-mono", tl = (e, t = 1) => String(Math.round(e * 10 ** t) / 10 ** t), nl = ({ value: e, min: t, max: n, step: r, places: i = 1, width: a, label: o, onCommit: s }) => {
12239
12365
  let [c, l] = K(null);
12240
12366
  U(() => l(null), [e]);
12241
12367
  let u = (e, r) => {
@@ -12252,7 +12378,7 @@ var Gc = ({ node: e }) => {
12252
12378
  step: r,
12253
12379
  min: t,
12254
12380
  max: n,
12255
- value: c ?? Zc(e, i),
12381
+ value: c ?? tl(e, i),
12256
12382
  onChange: (e) => {
12257
12383
  l(e.target.value), u(e.target.value, !1);
12258
12384
  },
@@ -12260,9 +12386,9 @@ var Gc = ({ node: e }) => {
12260
12386
  onKeyDown: (e) => {
12261
12387
  e.key === "Enter" && u(e.target.value, !0);
12262
12388
  },
12263
- className: `${a} ${Xc}`
12389
+ className: `${a} ${el}`
12264
12390
  });
12265
- }, $c = ({ node: e }) => {
12391
+ }, rl = ({ node: e }) => {
12266
12392
  let { designSystem: t, viewportMode: n, resolveStyles: r, updateNodeStyles: a } = Z(), o = r(e), s = W(() => yt(e, o, t, n), [
12267
12393
  e,
12268
12394
  o,
@@ -12345,7 +12471,7 @@ var Gc = ({ node: e }) => {
12345
12471
  onClick: () => a(e.id, { fontSize: `${Math.max(6, Math.round(s.fontSize) - 1)}px` }),
12346
12472
  children: /* @__PURE__ */ J(at, { className: "w-3 h-3" })
12347
12473
  }),
12348
- /* @__PURE__ */ J(Qc, {
12474
+ /* @__PURE__ */ J(nl, {
12349
12475
  label: "Size",
12350
12476
  value: s.fontSize,
12351
12477
  min: 6,
@@ -12375,7 +12501,7 @@ var Gc = ({ node: e }) => {
12375
12501
  children: "Line"
12376
12502
  }), /* @__PURE__ */ Y("div", {
12377
12503
  className: "flex items-center gap-1.5 flex-1 min-w-0",
12378
- children: [/* @__PURE__ */ J(Qc, {
12504
+ children: [/* @__PURE__ */ J(nl, {
12379
12505
  label: "Line height",
12380
12506
  value: s.lineHeight,
12381
12507
  min: .8,
@@ -12416,7 +12542,7 @@ var Gc = ({ node: e }) => {
12416
12542
  })]
12417
12543
  })
12418
12544
  ] });
12419
- }, el = "w-full min-w-0 bg-px-raised border border-px-line2 rounded-lg px-2 py-1 text-xs text-px-text placeholder:text-px-faint focus:outline-none focus:border-px-accent/60", tl = ({ title: e, defaultOpen: t = !0, hint: n, hide: r, children: i }) => {
12545
+ }, il = "w-full min-w-0 bg-px-raised border border-px-line2 rounded-lg px-2 py-1 text-xs text-px-text placeholder:text-px-faint focus:outline-none focus:border-px-accent/60", al = ({ title: e, defaultOpen: t = !0, hint: n, hide: r, children: i }) => {
12420
12546
  let [a, o] = K(t);
12421
12547
  return r ? null : /* @__PURE__ */ Y("section", {
12422
12548
  className: "border-b border-px-line",
@@ -12444,7 +12570,7 @@ var Gc = ({ node: e }) => {
12444
12570
  children: t
12445
12571
  })]
12446
12572
  });
12447
- function nl({ options: e, value: t, onChange: n, label: r }) {
12573
+ function ol({ options: e, value: t, onChange: n, label: r }) {
12448
12574
  return /* @__PURE__ */ J("div", {
12449
12575
  role: "group",
12450
12576
  "aria-label": r,
@@ -12459,7 +12585,7 @@ function nl({ options: e, value: t, onChange: n, label: r }) {
12459
12585
  }, e.id))
12460
12586
  });
12461
12587
  }
12462
- var rl = ({ value: e, onChange: t, label: n, placeholder: r, min: i = 0, max: a = 4e3 }) => {
12588
+ var sl = ({ value: e, onChange: t, label: n, placeholder: r, min: i = 0, max: a = 4e3 }) => {
12463
12589
  let o = parseInt(e ?? "", 10);
12464
12590
  return /* @__PURE__ */ Y("div", {
12465
12591
  className: "flex items-center gap-1 bg-px-raised border border-px-line2 rounded-lg px-2 py-1 min-w-0 focus-within:border-px-accent/60",
@@ -12477,10 +12603,10 @@ var rl = ({ value: e, onChange: t, label: n, placeholder: r, min: i = 0, max: a
12477
12603
  children: "px"
12478
12604
  })]
12479
12605
  });
12480
- }, il = ({ children: e }) => /* @__PURE__ */ J("p", {
12606
+ }, cl = ({ children: e }) => /* @__PURE__ */ J("p", {
12481
12607
  className: "text-[10.5px] leading-snug text-px-faint",
12482
12608
  children: e
12483
- }), al = [
12609
+ }), ll = [
12484
12610
  {
12485
12611
  id: "design",
12486
12612
  label: "Design"
@@ -12493,7 +12619,7 @@ var rl = ({ value: e, onChange: t, label: n, placeholder: r, min: i = 0, max: a
12493
12619
  id: "advanced",
12494
12620
  label: "Advanced"
12495
12621
  }
12496
- ], ol = [
12622
+ ], ul = [
12497
12623
  {
12498
12624
  id: "none",
12499
12625
  label: "None",
@@ -12515,16 +12641,16 @@ var rl = ({ value: e, onChange: t, label: n, placeholder: r, min: i = 0, max: a
12515
12641
  value: "0 20px 48px rgba(0,0,0,0.28)"
12516
12642
  }
12517
12643
  ];
12518
- function sl(e, t) {
12644
+ function dl(e, t) {
12519
12645
  if (e.id === t) return [e];
12520
12646
  for (let n of e.children ?? []) {
12521
- let r = sl(n, t);
12647
+ let r = dl(n, t);
12522
12648
  if (r.length) return [e, ...r];
12523
12649
  }
12524
12650
  return [];
12525
12651
  }
12526
- var cl = ({ node: e }) => {
12527
- let { selectNode: n, deleteNode: r, duplicateNode: a, documentTree: o, viewportMode: s, resolveStyles: c, updateNodeStyles: l, updateNodeContent: u, updateNodeProps: d, resetResponsiveStyle: f, resetAllResponsiveOverrides: m, isOverridden: h, updateNodeResponsiveVisibility: g, setContainerLayoutMode: v, alignNodeInParent: y, bringForward: b, sendBackward: x, bringToFront: S, sendToBack: C, canvasZoom: w } = Z(), T = La(), E = T.mode === "email", [D, O] = K("design"), k = W(() => sl(o, e.id), [o, e.id]), A = c(e), j = (t) => l(e.id, t), M = G(null), [N, P] = K(!1), [ee, te] = K(null), ne = async (t) => {
12652
+ var fl = ({ node: e }) => {
12653
+ let { selectNode: n, deleteNode: r, duplicateNode: a, documentTree: o, viewportMode: s, resolveStyles: c, updateNodeStyles: l, updateNodeContent: u, updateNodeProps: d, resetResponsiveStyle: f, resetAllResponsiveOverrides: m, isOverridden: h, updateNodeResponsiveVisibility: g, setContainerLayoutMode: v, alignNodeInParent: y, bringForward: b, sendBackward: x, bringToFront: S, sendToBack: C, canvasZoom: w } = Z(), T = La(), E = T.mode === "email", [D, O] = K("design"), k = W(() => dl(o, e.id), [o, e.id]), A = c(e), j = (t) => l(e.id, t), M = G(null), [N, P] = K(!1), [ee, te] = K(null), ne = async (t) => {
12528
12654
  if (t) {
12529
12655
  P(!0), te(null);
12530
12656
  try {
@@ -12602,10 +12728,10 @@ var cl = ({ node: e }) => {
12602
12728
  children: /* @__PURE__ */ J(n, { className: "w-3.5 h-3.5" })
12603
12729
  }, e);
12604
12730
  }, je = /* @__PURE__ */ Y(q, { children: [
12605
- Jr(e) && /* @__PURE__ */ J(Gc, { node: e }),
12731
+ Jr(e) && /* @__PURE__ */ J(Yc, { node: e }),
12606
12732
  (() => {
12607
12733
  let t = Tn(o, e.id);
12608
- return t ? /* @__PURE__ */ J(Kc, {
12734
+ return t ? /* @__PURE__ */ J(Xc, {
12609
12735
  section: t,
12610
12736
  nodeId: e.id
12611
12737
  }) : null;
@@ -12614,7 +12740,7 @@ var cl = ({ node: e }) => {
12614
12740
  className: "px-3.5 pt-3 pb-1 text-[10px] uppercase tracking-wider font-semibold text-px-faint",
12615
12741
  children: "Fine-tune this section"
12616
12742
  }),
12617
- ("content" in e || ie || e.type === "image") && /* @__PURE__ */ Y(tl, {
12743
+ ("content" in e || ie || e.type === "image") && /* @__PURE__ */ Y(al, {
12618
12744
  title: "Content",
12619
12745
  children: [
12620
12746
  "content" in e && /* @__PURE__ */ J($, {
@@ -12633,7 +12759,7 @@ var cl = ({ node: e }) => {
12633
12759
  }),
12634
12760
  e.type === "heading" && /* @__PURE__ */ J($, {
12635
12761
  label: "Level",
12636
- children: /* @__PURE__ */ J(nl, {
12762
+ children: /* @__PURE__ */ J(ol, {
12637
12763
  label: "Heading level",
12638
12764
  value: String(e.props?.level || 2),
12639
12765
  onChange: (e) => ve(Number(e)),
@@ -12739,12 +12865,12 @@ var cl = ({ node: e }) => {
12739
12865
  ] })
12740
12866
  ]
12741
12867
  }),
12742
- !Jr(e) && /* @__PURE__ */ J(Yc, { node: e }),
12743
- /* @__PURE__ */ J(Rc, { node: e }),
12744
- ie && /* @__PURE__ */ Y(tl, {
12868
+ !Jr(e) && /* @__PURE__ */ J($c, { node: e }),
12869
+ /* @__PURE__ */ J(Hc, { node: e }),
12870
+ ie && /* @__PURE__ */ Y(al, {
12745
12871
  title: "Typography",
12746
12872
  children: [
12747
- /* @__PURE__ */ J($c, { node: e }),
12873
+ /* @__PURE__ */ J(rl, { node: e }),
12748
12874
  /* @__PURE__ */ J($, {
12749
12875
  label: "Colour",
12750
12876
  children: /* @__PURE__ */ J(rc, {
@@ -12756,7 +12882,7 @@ var cl = ({ node: e }) => {
12756
12882
  label: "Align",
12757
12883
  children: /* @__PURE__ */ Y("div", {
12758
12884
  className: "flex items-center gap-2",
12759
- children: [/* @__PURE__ */ J(nl, {
12885
+ children: [/* @__PURE__ */ J(ol, {
12760
12886
  label: "Text alignment",
12761
12887
  value: A.textAlign || "left",
12762
12888
  onChange: (e) => j({ textAlign: e }),
@@ -12809,7 +12935,7 @@ var cl = ({ node: e }) => {
12809
12935
  })
12810
12936
  ]
12811
12937
  }),
12812
- /* @__PURE__ */ Y(tl, {
12938
+ /* @__PURE__ */ Y(al, {
12813
12939
  title: "Appearance",
12814
12940
  children: [
12815
12941
  /* @__PURE__ */ J($, {
@@ -12821,7 +12947,7 @@ var cl = ({ node: e }) => {
12821
12947
  }),
12822
12948
  /* @__PURE__ */ J($, {
12823
12949
  label: "Corners",
12824
- children: /* @__PURE__ */ J(rl, {
12950
+ children: /* @__PURE__ */ J(sl, {
12825
12951
  label: "Corner radius",
12826
12952
  value: A.borderRadius,
12827
12953
  onChange: (e) => j({ borderRadius: e ?? "0px" })
@@ -12848,17 +12974,17 @@ var cl = ({ node: e }) => {
12848
12974
  })
12849
12975
  ]
12850
12976
  }),
12851
- /* @__PURE__ */ Y(tl, {
12977
+ /* @__PURE__ */ Y(al, {
12852
12978
  hide: E,
12853
12979
  title: "Shadows & effects",
12854
12980
  children: [
12855
12981
  /* @__PURE__ */ J($, {
12856
12982
  label: "Shadow",
12857
- children: /* @__PURE__ */ J(nl, {
12983
+ children: /* @__PURE__ */ J(ol, {
12858
12984
  label: "Shadow",
12859
- value: ol.find((e) => e.value === A.boxShadow)?.id ?? (A.boxShadow ? "custom" : "none"),
12860
- onChange: (e) => j({ boxShadow: ol.find((t) => t.id === e)?.value }),
12861
- options: ol.map((e) => ({
12985
+ value: ul.find((e) => e.value === A.boxShadow)?.id ?? (A.boxShadow ? "custom" : "none"),
12986
+ onChange: (e) => j({ boxShadow: ul.find((t) => t.id === e)?.value }),
12987
+ options: ul.map((e) => ({
12862
12988
  id: e.id,
12863
12989
  label: e.label
12864
12990
  }))
@@ -12883,14 +13009,14 @@ var cl = ({ node: e }) => {
12883
13009
  })]
12884
13010
  })
12885
13011
  }),
12886
- /* @__PURE__ */ J(il, { children: "Blur behind frosts whatever is under this box, like a see-through header." })
13012
+ /* @__PURE__ */ J(cl, { children: "Blur behind frosts whatever is under this box, like a see-through header." })
12887
13013
  ]
12888
13014
  }),
12889
- /* @__PURE__ */ Y(tl, {
13015
+ /* @__PURE__ */ Y(al, {
12890
13016
  title: "Borders",
12891
13017
  children: [/* @__PURE__ */ J($, {
12892
13018
  label: "Line",
12893
- children: /* @__PURE__ */ J(nl, {
13019
+ children: /* @__PURE__ */ J(ol, {
12894
13020
  label: "Border style",
12895
13021
  value: A.borderStyle ?? "none",
12896
13022
  onChange: (e) => j({
@@ -12918,7 +13044,7 @@ var cl = ({ node: e }) => {
12918
13044
  })
12919
13045
  }), A.borderStyle && A.borderStyle !== "none" && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J($, {
12920
13046
  label: "Thickness",
12921
- children: /* @__PURE__ */ J(rl, {
13047
+ children: /* @__PURE__ */ J(sl, {
12922
13048
  label: "Border thickness",
12923
13049
  min: 0,
12924
13050
  max: 40,
@@ -12933,7 +13059,7 @@ var cl = ({ node: e }) => {
12933
13059
  })
12934
13060
  })] })]
12935
13061
  }),
12936
- /* @__PURE__ */ Y(tl, {
13062
+ /* @__PURE__ */ Y(al, {
12937
13063
  hide: E,
12938
13064
  title: "Animation",
12939
13065
  hint: "Make the page feel alive. These show on your published site, not while you edit (use Preview to see them).",
@@ -12944,7 +13070,7 @@ var cl = ({ node: e }) => {
12944
13070
  "aria-label": "Hover effect",
12945
13071
  value: A.hoverEffect ?? "none",
12946
13072
  onChange: (e) => j({ hoverEffect: e.target.value }),
12947
- className: el,
13073
+ className: il,
12948
13074
  children: [
12949
13075
  /* @__PURE__ */ J("option", {
12950
13076
  value: "none",
@@ -12975,7 +13101,7 @@ var cl = ({ node: e }) => {
12975
13101
  "aria-label": "Entrance",
12976
13102
  value: A.entrance ?? "none",
12977
13103
  onChange: (e) => j({ entrance: e.target.value }),
12978
- className: el,
13104
+ className: il,
12979
13105
  children: [
12980
13106
  /* @__PURE__ */ J("option", {
12981
13107
  value: "none",
@@ -13023,11 +13149,11 @@ var cl = ({ node: e }) => {
13023
13149
  })]
13024
13150
  })
13025
13151
  }),
13026
- A.entrance && A.entrance !== "none" && /* @__PURE__ */ J(il, { children: "Tip: give a row of cards a little more wait each (0, 100, 200…) so they arrive one after another." })
13152
+ A.entrance && A.entrance !== "none" && /* @__PURE__ */ J(cl, { children: "Tip: give a row of cards a little more wait each (0, 100, 200…) so they arrive one after another." })
13027
13153
  ]
13028
13154
  })
13029
13155
  ] }), Me = /* @__PURE__ */ Y(q, { children: [
13030
- /* @__PURE__ */ Y(tl, {
13156
+ /* @__PURE__ */ Y(al, {
13031
13157
  title: "Display & flow",
13032
13158
  children: [
13033
13159
  ae && !E && /* @__PURE__ */ J($, {
@@ -13036,7 +13162,7 @@ var cl = ({ node: e }) => {
13036
13162
  className: "flex items-center gap-1",
13037
13163
  children: [/* @__PURE__ */ J("div", {
13038
13164
  className: "flex-1 min-w-0",
13039
- children: /* @__PURE__ */ J(nl, {
13165
+ children: /* @__PURE__ */ J(ol, {
13040
13166
  label: "Layout mode",
13041
13167
  value: A.layoutMode || "free",
13042
13168
  onChange: (t) => v(e.id, t),
@@ -13063,7 +13189,7 @@ var cl = ({ node: e }) => {
13063
13189
  }),
13064
13190
  ae && A.layoutMode === "grid" && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J($, {
13065
13191
  label: "Columns",
13066
- children: /* @__PURE__ */ J(nl, {
13192
+ children: /* @__PURE__ */ J(ol, {
13067
13193
  label: "Grid columns",
13068
13194
  value: String(A.gridColumns || 3),
13069
13195
  onChange: (e) => j({ gridColumns: Number(e) }),
@@ -13080,7 +13206,7 @@ var cl = ({ node: e }) => {
13080
13206
  })
13081
13207
  }), /* @__PURE__ */ J($, {
13082
13208
  label: "Gap",
13083
- children: /* @__PURE__ */ J(rl, {
13209
+ children: /* @__PURE__ */ J(sl, {
13084
13210
  label: "Grid gap",
13085
13211
  value: A.gap || A.gridGap || "20px",
13086
13212
  onChange: (e) => j({
@@ -13092,7 +13218,7 @@ var cl = ({ node: e }) => {
13092
13218
  ae && (E || A.layoutMode === "flow" || !A.layoutMode) && /* @__PURE__ */ Y(q, { children: [
13093
13219
  /* @__PURE__ */ J($, {
13094
13220
  label: "Direction",
13095
- children: /* @__PURE__ */ J(nl, {
13221
+ children: /* @__PURE__ */ J(ol, {
13096
13222
  label: "Direction",
13097
13223
  value: A.flexDirection === "column" ? "column" : "row",
13098
13224
  onChange: (e) => j({ flexDirection: e }),
@@ -13107,7 +13233,7 @@ var cl = ({ node: e }) => {
13107
13233
  }),
13108
13234
  !E && /* @__PURE__ */ J($, {
13109
13235
  label: "Wrap",
13110
- children: /* @__PURE__ */ J(nl, {
13236
+ children: /* @__PURE__ */ J(ol, {
13111
13237
  label: "Wrap",
13112
13238
  value: A.flexWrap === "wrap" ? "wrap" : "nowrap",
13113
13239
  onChange: (e) => j({ flexWrap: e }),
@@ -13180,7 +13306,7 @@ var cl = ({ node: e }) => {
13180
13306
  }),
13181
13307
  /* @__PURE__ */ J($, {
13182
13308
  label: "Gap",
13183
- children: /* @__PURE__ */ J(rl, {
13309
+ children: /* @__PURE__ */ J(sl, {
13184
13310
  label: "Gap",
13185
13311
  value: A.gap || "16px",
13186
13312
  onChange: (e) => j({ gap: e })
@@ -13189,7 +13315,7 @@ var cl = ({ node: e }) => {
13189
13315
  ] }),
13190
13316
  I && /* @__PURE__ */ J($, {
13191
13317
  label: "Col span",
13192
- children: /* @__PURE__ */ J(nl, {
13318
+ children: /* @__PURE__ */ J(ol, {
13193
13319
  label: "Column span",
13194
13320
  value: String(A.gridColumnSpan || 1),
13195
13321
  onChange: (e) => j({ gridColumnSpan: Number(e) }),
@@ -13204,10 +13330,10 @@ var cl = ({ node: e }) => {
13204
13330
  }))
13205
13331
  })
13206
13332
  }),
13207
- !ae && !I && /* @__PURE__ */ J(il, { children: "This element sits inside its parent. Select the box around it to change how things are arranged." })
13333
+ !ae && !I && /* @__PURE__ */ J(cl, { children: "This element sits inside its parent. Select the box around it to change how things are arranged." })
13208
13334
  ]
13209
13335
  }),
13210
- /* @__PURE__ */ Y(tl, {
13336
+ /* @__PURE__ */ Y(al, {
13211
13337
  title: "Align & distribute",
13212
13338
  hint: "These line this element up inside the box it sits in.",
13213
13339
  children: [/* @__PURE__ */ Y("div", {
@@ -13221,14 +13347,14 @@ var cl = ({ node: e }) => {
13221
13347
  Ae("middle", "Align middle", He),
13222
13348
  Ae("bottom", "Align bottom", Ce)
13223
13349
  ]
13224
- }), /* @__PURE__ */ J(il, { children: "To line up or evenly space several elements: hold Shift and click each one on the page (or in Layers). Options to align them with each other and spread them out appear here." })]
13350
+ }), /* @__PURE__ */ J(cl, { children: "To line up or evenly space several elements: hold Shift and click each one on the page (or in Layers). Options to align them with each other and spread them out appear here." })]
13225
13351
  }),
13226
- /* @__PURE__ */ Y(tl, {
13352
+ /* @__PURE__ */ Y(al, {
13227
13353
  title: "Dimensions",
13228
13354
  children: [
13229
13355
  /* @__PURE__ */ J($, {
13230
13356
  label: "Width",
13231
- children: /* @__PURE__ */ J(nl, {
13357
+ children: /* @__PURE__ */ J(ol, {
13232
13358
  label: "Width",
13233
13359
  value: ce,
13234
13360
  onChange: le,
@@ -13263,7 +13389,7 @@ var cl = ({ node: e }) => {
13263
13389
  }),
13264
13390
  !E && /* @__PURE__ */ J($, {
13265
13391
  label: "Height",
13266
- children: /* @__PURE__ */ J(nl, {
13392
+ children: /* @__PURE__ */ J(ol, {
13267
13393
  label: "Height",
13268
13394
  value: L === "fill" ? "hug" : L,
13269
13395
  onChange: ue,
@@ -13279,7 +13405,7 @@ var cl = ({ node: e }) => {
13279
13405
  }),
13280
13406
  !E && L === "fixed" && /* @__PURE__ */ J($, {
13281
13407
  label: "",
13282
- children: /* @__PURE__ */ J(rl, {
13408
+ children: /* @__PURE__ */ J(sl, {
13283
13409
  label: "Minimum height",
13284
13410
  value: A.minHeight,
13285
13411
  onChange: (e) => j({ minHeight: e ?? "auto" })
@@ -13309,12 +13435,12 @@ var cl = ({ node: e }) => {
13309
13435
  })
13310
13436
  ]
13311
13437
  }),
13312
- /* @__PURE__ */ Y(tl, {
13438
+ /* @__PURE__ */ Y(al, {
13313
13439
  title: "Spacing",
13314
13440
  children: [
13315
13441
  /* @__PURE__ */ J($, {
13316
13442
  label: "Padding",
13317
- children: /* @__PURE__ */ J(rl, {
13443
+ children: /* @__PURE__ */ J(sl, {
13318
13444
  label: "Padding",
13319
13445
  value: A.padding,
13320
13446
  onChange: me
@@ -13338,7 +13464,7 @@ var cl = ({ node: e }) => {
13338
13464
  children: [/* @__PURE__ */ J("span", {
13339
13465
  className: "block text-[10px] text-px-muted",
13340
13466
  children: t
13341
- }), /* @__PURE__ */ J(rl, {
13467
+ }), /* @__PURE__ */ J(sl, {
13342
13468
  label: `Padding ${t.toLowerCase()}`,
13343
13469
  value: A[e] ?? A.padding,
13344
13470
  onChange: (t) => j({ [e]: t ?? "0px" })
@@ -13347,7 +13473,7 @@ var cl = ({ node: e }) => {
13347
13473
  })
13348
13474
  ]
13349
13475
  }),
13350
- /* @__PURE__ */ J(tl, {
13476
+ /* @__PURE__ */ J(al, {
13351
13477
  hide: E,
13352
13478
  title: "Positioning",
13353
13479
  children: /* @__PURE__ */ J($, {
@@ -13386,8 +13512,8 @@ var cl = ({ node: e }) => {
13386
13512
  })
13387
13513
  })
13388
13514
  }),
13389
- !E && /* @__PURE__ */ J(qc, { node: e }),
13390
- /* @__PURE__ */ J(tl, {
13515
+ !E && /* @__PURE__ */ J(Zc, { node: e }),
13516
+ /* @__PURE__ */ J(al, {
13391
13517
  hide: E,
13392
13518
  title: "Stacking (z-index)",
13393
13519
  children: /* @__PURE__ */ J($, {
@@ -13446,7 +13572,7 @@ var cl = ({ node: e }) => {
13446
13572
  })
13447
13573
  })
13448
13574
  }),
13449
- /* @__PURE__ */ Y(tl, {
13575
+ /* @__PURE__ */ Y(al, {
13450
13576
  hide: E,
13451
13577
  title: "Screens",
13452
13578
  defaultOpen: de,
@@ -13484,7 +13610,7 @@ var cl = ({ node: e }) => {
13484
13610
  ]
13485
13611
  })
13486
13612
  ] }), Ne = typeof e.props?.htmlTag == "string" && se?.includes(e.props.htmlTag) ? e.props.htmlTag : In[e.type], Pe = /* @__PURE__ */ Y(q, { children: [
13487
- /* @__PURE__ */ Y(tl, {
13613
+ /* @__PURE__ */ Y(al, {
13488
13614
  hide: E,
13489
13615
  title: "Identity",
13490
13616
  children: [
@@ -13501,7 +13627,7 @@ var cl = ({ node: e }) => {
13501
13627
  }, e))
13502
13628
  })
13503
13629
  }),
13504
- se && /* @__PURE__ */ J(il, { children: "Pick what this box is, like a header, navigation or footer. It helps search engines and screen readers understand your page." }),
13630
+ se && /* @__PURE__ */ J(cl, { children: "Pick what this box is, like a header, navigation or footer. It helps search engines and screen readers understand your page." }),
13505
13631
  e.type !== "section" && /* @__PURE__ */ J($, {
13506
13632
  label: "ID",
13507
13633
  children: /* @__PURE__ */ J("input", {
@@ -13513,7 +13639,7 @@ var cl = ({ node: e }) => {
13513
13639
  className: "w-full min-w-0 bg-px-raised border border-px-line2 rounded-lg px-2 py-1 text-xs text-px-text placeholder:text-px-faint focus:outline-none focus:border-px-accent/60"
13514
13640
  })
13515
13641
  }),
13516
- e.type !== "section" && /* @__PURE__ */ J(il, { children: "A name a link or button can scroll straight to, like #pricing. Letters, numbers and dashes." }),
13642
+ e.type !== "section" && /* @__PURE__ */ J(cl, { children: "A name a link or button can scroll straight to, like #pricing. Letters, numbers and dashes." }),
13517
13643
  /* @__PURE__ */ J($, {
13518
13644
  label: "Classes",
13519
13645
  children: /* @__PURE__ */ J("input", {
@@ -13522,17 +13648,17 @@ var cl = ({ node: e }) => {
13522
13648
  value: A.customClasses || "",
13523
13649
  onChange: (e) => j({ customClasses: e.target.value }),
13524
13650
  placeholder: "e.g. shadow-xl hover:scale-105",
13525
- className: `${el} font-mono`
13651
+ className: `${il} font-mono`
13526
13652
  })
13527
13653
  })
13528
13654
  ]
13529
13655
  }),
13530
- /* @__PURE__ */ Y(tl, {
13656
+ /* @__PURE__ */ Y(al, {
13531
13657
  hide: E,
13532
13658
  title: "Behaviour",
13533
13659
  children: [/* @__PURE__ */ J($, {
13534
13660
  label: "Overflow",
13535
- children: /* @__PURE__ */ J(nl, {
13661
+ children: /* @__PURE__ */ J(ol, {
13536
13662
  label: "Overflow",
13537
13663
  value: A.overflow === "hidden" || A.overflow === "clip" ? "hidden" : A.overflow === "auto" ? "auto" : "visible",
13538
13664
  onChange: (e) => j({ overflow: e }),
@@ -13560,7 +13686,7 @@ var cl = ({ node: e }) => {
13560
13686
  "aria-label": "Cursor",
13561
13687
  value: A.cursor ?? "auto",
13562
13688
  onChange: (e) => j({ cursor: e.target.value }),
13563
- className: el,
13689
+ className: il,
13564
13690
  children: [
13565
13691
  /* @__PURE__ */ J("option", {
13566
13692
  value: "auto",
@@ -13590,7 +13716,7 @@ var cl = ({ node: e }) => {
13590
13716
  })
13591
13717
  })]
13592
13718
  }),
13593
- /* @__PURE__ */ Y(tl, {
13719
+ /* @__PURE__ */ Y(al, {
13594
13720
  title: "Accessibility",
13595
13721
  children: [
13596
13722
  /* @__PURE__ */ J($, {
@@ -13601,7 +13727,7 @@ var cl = ({ node: e }) => {
13601
13727
  value: typeof e.props?.ariaLabel == "string" ? e.props.ariaLabel : "",
13602
13728
  onChange: (t) => d(e.id, { ariaLabel: t.target.value.slice(0, 200) || void 0 }),
13603
13729
  placeholder: "Read aloud by screen readers",
13604
- className: el
13730
+ className: il
13605
13731
  })
13606
13732
  }),
13607
13733
  /* @__PURE__ */ Y("label", {
@@ -13613,10 +13739,10 @@ var cl = ({ node: e }) => {
13613
13739
  className: "accent-px-accent"
13614
13740
  })]
13615
13741
  }),
13616
- /* @__PURE__ */ J(il, { children: "Use this for purely decorative things, like a background shape." })
13742
+ /* @__PURE__ */ J(cl, { children: "Use this for purely decorative things, like a background shape." })
13617
13743
  ]
13618
13744
  }),
13619
- /* @__PURE__ */ Y(tl, {
13745
+ /* @__PURE__ */ Y(al, {
13620
13746
  hide: E,
13621
13747
  title: "Transitions",
13622
13748
  hint: "For your own effects: how long a change takes (a hover colour, a size change), instead of snapping.",
@@ -13629,7 +13755,7 @@ var cl = ({ node: e }) => {
13629
13755
  transitionProperty: e.target.value,
13630
13756
  ...e.target.value !== "none" && A.transitionDuration === void 0 ? { transitionDuration: 200 } : {}
13631
13757
  }),
13632
- className: el,
13758
+ className: il,
13633
13759
  children: [
13634
13760
  /* @__PURE__ */ J("option", {
13635
13761
  value: "none",
@@ -13762,7 +13888,7 @@ var cl = ({ node: e }) => {
13762
13888
  role: "tablist",
13763
13889
  "aria-label": "Properties",
13764
13890
  className: "flex items-stretch px-2 border-b border-px-line shrink-0",
13765
- children: al.filter((e) => !E || e.id !== "advanced").map((e) => /* @__PURE__ */ J("button", {
13891
+ children: ll.filter((e) => !E || e.id !== "advanced").map((e) => /* @__PURE__ */ J("button", {
13766
13892
  role: "tab",
13767
13893
  type: "button",
13768
13894
  "aria-selected": D === e.id,
@@ -13773,7 +13899,7 @@ var cl = ({ node: e }) => {
13773
13899
  }),
13774
13900
  /* @__PURE__ */ J("div", {
13775
13901
  className: "px-3.5 pt-3 empty:hidden shrink-0",
13776
- children: /* @__PURE__ */ J(Jc, { node: e })
13902
+ children: /* @__PURE__ */ J(Qc, { node: e })
13777
13903
  }),
13778
13904
  /* @__PURE__ */ Y("div", {
13779
13905
  role: "tabpanel",
@@ -13786,7 +13912,7 @@ var cl = ({ node: e }) => {
13786
13912
  })
13787
13913
  ]
13788
13914
  });
13789
- }, ll = () => {
13915
+ }, pl = () => {
13790
13916
  let { selectedNode: e, selectedNodeIds: t, selectNodes: n, deleteNodes: r, documentTree: i, detachElementToFreePosition: a, returnElementToStructuredLayout: o, alignSelectedNodes: s, distributeSelectedNodes: c, canvasZoom: l } = Z();
13791
13917
  return t && t.length > 1 ? /* @__PURE__ */ Y("div", {
13792
13918
  className: "flex flex-col h-full w-[300px] shrink-0 border-l border-px-line bg-px-surface text-px-text select-none text-xs",
@@ -13946,8 +14072,8 @@ var cl = ({ node: e }) => {
13946
14072
  })]
13947
14073
  })]
13948
14074
  })]
13949
- }) : !e || e.type === "page" || e.id === i.id ? /* @__PURE__ */ J(sc, {}) : /* @__PURE__ */ J(cl, { node: e });
13950
- }, ul = () => {
14075
+ }) : !e || e.type === "page" || e.id === i.id ? /* @__PURE__ */ J(sc, {}) : /* @__PURE__ */ J(fl, { node: e });
14076
+ }, ml = () => {
13951
14077
  let { contextMenu: e, closeContextMenu: t, documentTree: n, selectedNodeIds: a, groupSelectedNodes: o, ungroupNode: c, duplicateNode: l, deleteNode: u, toggleNodeLock: d, toggleNodeVisibility: f, bringForward: m, sendBackward: h, bringToFront: g, sendToBack: v, zoomIn: y, zoomOut: b, resetZoom100: x, fitToPage: S, fitAllFrames: w, detachElementToFreePosition: T, returnElementToStructuredLayout: E, canvasZoom: D } = Z(), O = G(null), [k, A] = K({
13952
14078
  x: 0,
13953
14079
  y: 0
@@ -14215,7 +14341,7 @@ var cl = ({ node: e }) => {
14215
14341
  })
14216
14342
  ] })
14217
14343
  });
14218
- }, dl = [
14344
+ }, hl = [
14219
14345
  {
14220
14346
  id: "desktop",
14221
14347
  label: "Desktop",
@@ -14236,8 +14362,8 @@ var cl = ({ node: e }) => {
14236
14362
  label: "Phone",
14237
14363
  icon: /* @__PURE__ */ J(Le, { className: "w-3.5 h-3.5" })
14238
14364
  }
14239
- ], fl = () => {
14240
- let { getPages: e, currentPageId: t, getDesignSystem: n, setIsPreviewMode: r, viewportMode: i } = Z(), a = La(), o = a.mode === "email" ? dl.filter((e) => e.id === "desktop" || e.id === "mobile") : dl, [s, c] = K(a.mode === "email" && i !== "mobile" ? "desktop" : i), l = W(() => {
14365
+ ], gl = () => {
14366
+ let { getPages: e, currentPageId: t, getDesignSystem: n, setIsPreviewMode: r, viewportMode: i } = Z(), a = La(), o = a.mode === "email" ? hl.filter((e) => e.id === "desktop" || e.id === "mobile") : hl, [s, c] = K(a.mode === "email" && i !== "mobile" ? "desktop" : i), l = W(() => {
14241
14367
  let r = e(), i = r.find((e) => e.id === t) ?? r[0];
14242
14368
  if (a.mode === "email") {
14243
14369
  let e = yr(i, {
@@ -14319,7 +14445,7 @@ var cl = ({ node: e }) => {
14319
14445
  })
14320
14446
  ]
14321
14447
  });
14322
- }, pl = () => {
14448
+ }, _l = () => {
14323
14449
  let { selectedNodeId: e, selectedNodeIds: t, selectedNode: n, deleteNode: r, duplicateNode: i, undo: a, redo: o, selectParentNode: s, selectNode: c, selectAll: l, editingNodeId: u, stopInlineEditing: d, startInlineEditing: f, documentTree: p, activeSidebarTab: m, groupSelectedNodes: h, ungroupNode: g, bringForward: _, sendBackward: v, bringToFront: y, sendToBack: b, nudgeSelectedNodes: x, setIsPreviewMode: S, isPreviewMode: C } = Z(), w = La(), T = G(null), E = G(!1);
14324
14450
  return U(() => {
14325
14451
  let e = (e) => {
@@ -14430,14 +14556,14 @@ var cl = ({ node: e }) => {
14430
14556
  /* @__PURE__ */ J(eo, {}),
14431
14557
  m && /* @__PURE__ */ J(ws, {}),
14432
14558
  /* @__PURE__ */ J(tc, {}),
14433
- /* @__PURE__ */ J(ll, {})
14559
+ /* @__PURE__ */ J(pl, {})
14434
14560
  ]
14435
14561
  }),
14436
- C && /* @__PURE__ */ J(fl, {}),
14437
- /* @__PURE__ */ J(ul, {})
14562
+ C && /* @__PURE__ */ J(gl, {}),
14563
+ /* @__PURE__ */ J(ml, {})
14438
14564
  ]
14439
14565
  });
14440
- }, ml = Bi.forwardRef(({ rootRef: e, host: t }, n) => {
14566
+ }, vl = Bi.forwardRef(({ rootRef: e, host: t }, n) => {
14441
14567
  let { getPages: r, pages: i, getDesignSystem: a } = Z(), o = G(r);
14442
14568
  o.current = r, Gi(n, () => ({
14443
14569
  getPages: () => o.current(),
@@ -14461,8 +14587,8 @@ var cl = ({ node: e }) => {
14461
14587
  t.autoSaveDuration
14462
14588
  ]), null;
14463
14589
  });
14464
- ml.displayName = "V2EditorBridge";
14465
- var hl = Hi(function(e, t) {
14590
+ vl.displayName = "V2EditorBridge";
14591
+ var yl = Hi(function(e, t) {
14466
14592
  let { className: n, pages: r, initialPageId: i, onChange: a, designSystem: o, onDesignSystemChange: s, ...c } = e, l = G(null), u = W(() => r && r.length ? r : c.mode === "email" ? Hn() : ur(), []);
14467
14593
  return /* @__PURE__ */ J("div", {
14468
14594
  ref: l,
@@ -14482,14 +14608,14 @@ var hl = Hi(function(e, t) {
14482
14608
  designSystem: o,
14483
14609
  onDesignSystemChange: s,
14484
14610
  children: [
14485
- /* @__PURE__ */ J(ml, {
14611
+ /* @__PURE__ */ J(vl, {
14486
14612
  ref: t,
14487
14613
  rootRef: l,
14488
14614
  host: c
14489
14615
  }),
14490
14616
  /* @__PURE__ */ J(Ls, {}),
14491
14617
  /* @__PURE__ */ J(Pa, {}),
14492
- /* @__PURE__ */ J(pl, {}),
14618
+ /* @__PURE__ */ J(_l, {}),
14493
14619
  /* @__PURE__ */ J(za, {})
14494
14620
  ]
14495
14621
  })
@@ -14497,4 +14623,4 @@ var hl = Hi(function(e, t) {
14497
14623
  });
14498
14624
  });
14499
14625
  //#endregion
14500
- export { Vt as AUDIT_KINDS, Jt as AUDIT_KIND_LABELS, dr as EMAIL_WIDTH, yi as FONT_CHOICES, Ai as FONT_FILE_ACCEPT, Ni as MAX_CUSTOM_FONTS, xt as MAX_CUSTOM_JS, fi as MAX_FONT_FILE_BYTES, Mi as MAX_FONT_VARIANTS, sr as PAGE_TEMPLATES, ri as POPULAR_FONTS, ln as ROOT_FONT_PX, gr as SOL_SYSTEM_PROMPT, Mn as TEXT_STYLES, Ir as TEXT_STYLE_IDS, Jn as THEME_PRESETS, Ar as V1_DYNAMIC_EQUIVALENTS, hl as V2Editor, mr as V2_DYNAMIC_READY, ci as WEIGHT_LABELS, At as WORKSPACE_ID, Zr as addCustomFont, dn as applyAuditFixes, vr as applyCommands, xr as applyTheme, qr as auditDesign, Hn as blankEmailPages, ur as blankPages, Ct as buildPageFromTemplate, ir as buildTemplateSections, on as catalogSchema, wt as colorDistance, yr as compilePageToEmail, bo as componentStyle, yo as componentVariants, cr as convertLegacyDesign, wr as convertV1Design, Yt as createDefaultDesignSystem, ji as customFontFaceCss, li as customFontsOf, yn as deriveShades, Sn as describeAudit, Er as describeCommand, Fr as describeDesign, Kt as designSystemCss, Sr as designSystemVars, yt as effectiveTypeMetrics, Qn as emailIssues, an as ensureWorkspace, Gn as evalCssLength, $r as findCustomFont, ii as findFont, Wt as fontsNeeded, On as frameVars, En as frameVarsFor, zt as friendlyTokenName, $t as getPageTemplate, wi as getToken, Di as getValue, oi as googleFontPreviewHref, ei as googleFontsHrefs, Qr as guessFontFromFile, ai as isFontUrl, Gr as isHeadingTextStyle, Nr as isLegacyDesign, ti as isLoadableFamily, nn as isPageEmpty, ni as isSystemFont, Ln as isTextStyle, St as isWorkspaceNode, Hr as levelTextStyle, bn as linkAccentsToBrand, wn as linkExactValues, vi as lintDesignSystem, cn as listPageTemplates, pi as nameFromKey, pr as neutralScaleOf, rr as pageChildren, tr as parseSolReply, An as plexoVars, nr as prepareCustomJs, $n as previewSurfaces, si as primaryFamily, Fn as readStreamingSolReply, Pt as readableOn, xi as ref, ki as refKey, bi as removeCustomFont, mi as removeToken, di as repairDesignSystem, hi as resolveKey, Ti as resolveValue, Zn as roundnessOf, Dr as sanitizeCss, Yr as sanitizeCustomFonts, zn as sanitizeV2Html, Nn as setBrandSurfaces, Lr as setDensity, Kr as setFonts, Rn as setNeutralScale, kr as setPageTemplateResolver, Ur as setPrimaryColor, gn as setRoundness, Ot as setSecondaryColor, Br as setStatusColor, Si as setToken, _i as setTokens, Vn as solCommandSchema, Pi as stackFor, Kn as starterEmailPages, Qt as stripWorkspace, Lt as suggestedDecisions, It as templateSeed, hn as textStyleCss, Dt as textStyleDef, Mr as textStyleOf, zr as textStyleVars, jt as tint, gi as tokenCssValue, ui as tokenMap, en as validHtmlId, Xr as weightsToLoad, tn as workspaceOf };
14626
+ export { Vt as AUDIT_KINDS, Jt as AUDIT_KIND_LABELS, dr as EMAIL_WIDTH, yi as FONT_CHOICES, Ai as FONT_FILE_ACCEPT, Ni as MAX_CUSTOM_FONTS, xt as MAX_CUSTOM_JS, fi as MAX_FONT_FILE_BYTES, Mi as MAX_FONT_VARIANTS, sr as PAGE_TEMPLATES, ri as POPULAR_FONTS, ln as ROOT_FONT_PX, gr as SOL_SYSTEM_PROMPT, Mn as TEXT_STYLES, Ir as TEXT_STYLE_IDS, Jn as THEME_PRESETS, Ar as V1_DYNAMIC_EQUIVALENTS, yl as V2Editor, mr as V2_DYNAMIC_READY, ci as WEIGHT_LABELS, At as WORKSPACE_ID, Zr as addCustomFont, dn as applyAuditFixes, vr as applyCommands, xr as applyTheme, qr as auditDesign, Hn as blankEmailPages, ur as blankPages, Ct as buildPageFromTemplate, ir as buildTemplateSections, on as catalogSchema, wt as colorDistance, yr as compilePageToEmail, bo as componentStyle, yo as componentVariants, cr as convertLegacyDesign, wr as convertV1Design, Yt as createDefaultDesignSystem, ji as customFontFaceCss, li as customFontsOf, yn as deriveShades, Sn as describeAudit, Er as describeCommand, Fr as describeDesign, Kt as designSystemCss, Sr as designSystemVars, yt as effectiveTypeMetrics, Qn as emailIssues, an as ensureWorkspace, Gn as evalCssLength, $r as findCustomFont, ii as findFont, Wt as fontsNeeded, On as frameVars, En as frameVarsFor, zt as friendlyTokenName, $t as getPageTemplate, wi as getToken, Di as getValue, oi as googleFontPreviewHref, ei as googleFontsHrefs, Qr as guessFontFromFile, ai as isFontUrl, Gr as isHeadingTextStyle, Nr as isLegacyDesign, ti as isLoadableFamily, nn as isPageEmpty, ni as isSystemFont, Ln as isTextStyle, St as isWorkspaceNode, Hr as levelTextStyle, bn as linkAccentsToBrand, wn as linkExactValues, vi as lintDesignSystem, cn as listPageTemplates, pi as nameFromKey, pr as neutralScaleOf, rr as pageChildren, tr as parseSolReply, An as plexoVars, nr as prepareCustomJs, $n as previewSurfaces, si as primaryFamily, Fn as readStreamingSolReply, Pt as readableOn, xi as ref, ki as refKey, bi as removeCustomFont, mi as removeToken, di as repairDesignSystem, hi as resolveKey, Ti as resolveValue, Zn as roundnessOf, Dr as sanitizeCss, Yr as sanitizeCustomFonts, zn as sanitizeV2Html, Nn as setBrandSurfaces, Lr as setDensity, Kr as setFonts, Rn as setNeutralScale, kr as setPageTemplateResolver, Ur as setPrimaryColor, gn as setRoundness, Ot as setSecondaryColor, Br as setStatusColor, Si as setToken, _i as setTokens, Vn as solCommandSchema, Pi as stackFor, Kn as starterEmailPages, Qt as stripWorkspace, Lt as suggestedDecisions, It as templateSeed, hn as textStyleCss, Dt as textStyleDef, Mr as textStyleOf, zr as textStyleVars, jt as tint, gi as tokenCssValue, ui as tokenMap, en as validHtmlId, Xr as weightsToLoad, tn as workspaceOf };