@shware/workflow-ui 2.0.0 → 2.0.2

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.
Files changed (42) hide show
  1. package/dist/index.d.mts.map +1 -1
  2. package/dist/index.mjs +95 -88
  3. package/dist/index.mjs.map +1 -1
  4. package/dist/postgres.mjs +4 -4
  5. package/dist/postgres.mjs.map +1 -1
  6. package/package.json +2 -2
  7. package/src/app/integrations/theme/root-provider.tsx +24 -12
  8. package/src/app/integrations/toast/toast-provider.tsx +2 -2
  9. package/src/app/routes/__root.tsx +9 -9
  10. package/src/app/routes/emails.tsx +2 -2
  11. package/src/app/routes/home.tsx +4 -4
  12. package/src/app/routes/metrics.tsx +19 -19
  13. package/src/app/routes/segment-overview.tsx +21 -21
  14. package/src/app/routes/segments.tsx +2 -2
  15. package/src/app/routes/settings.tsx +6 -6
  16. package/src/app/routes/workflows.tsx +5 -5
  17. package/src/components/avatar.tsx +1 -1
  18. package/src/components/breadcrumb.tsx +3 -3
  19. package/src/components/button/index.tsx +4 -4
  20. package/src/components/chat-markup.tsx +6 -6
  21. package/src/components/date-range.tsx +16 -8
  22. package/src/components/dropdown/index.tsx +18 -10
  23. package/src/components/email-defaults.tsx +3 -3
  24. package/src/components/email-list.tsx +6 -6
  25. package/src/components/flag.tsx +17 -11
  26. package/src/components/input/index.tsx +2 -2
  27. package/src/components/input/search-input.tsx +1 -1
  28. package/src/components/menu/index.tsx +12 -4
  29. package/src/components/metric-card.tsx +7 -7
  30. package/src/components/modal/index.tsx +4 -3
  31. package/src/components/nav-drawer.tsx +3 -3
  32. package/src/components/node-inspector.tsx +5 -5
  33. package/src/components/profile-drawer.tsx +37 -23
  34. package/src/components/segment-list.tsx +9 -9
  35. package/src/components/select/index.tsx +3 -3
  36. package/src/components/slack-preview.tsx +33 -30
  37. package/src/components/tabs/index.tsx +2 -2
  38. package/src/components/templates-page.tsx +23 -23
  39. package/src/components/textarea/index.tsx +2 -2
  40. package/src/components/thumbnail-window.tsx +1 -1
  41. package/src/components/workflow-list.tsx +8 -8
  42. package/src/postgres.ts +4 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":["Props","Props","Props"],"sources":["../src/components/button/index.tsx","../src/components/corner-shape.ts","../src/components/workflow-canvas.tsx","../src/utils/template-content.ts","../src/components/template-refs.ts","../src/components/templates-page.tsx","../src/components/push-preview.tsx","../src/components/workflow-list.tsx","../src/components/metric-card.tsx","../src/components/date-range.tsx","../src/components/channel-icon.ts","../src/components/avatar.tsx","../src/components/sparkline.tsx","../src/components/layout.ts"],"mappings":";;;;;;;;;;;KAWY;UAEFA,gBAAc,KAAK;EAC3B,OAAO;EACP,WAAW;EACX;EACA;;wBAyCc,SACd,UACA,WACA,MACA,OACA,MACA,YACG,SACFA,0BAAK,IAAA;;;;;;;;;;;;;qBCtDK,cAAuD;;;;;;;;;;;;;;UCgDnD;EACf,IAAI;;EAEJ,QAAQ;;;;;;;EAOR;;EAEA;;EAEA,gBAAgB;;wBAkXF,iBACd,IACA,OACA,WACA,YACA,gBACC,sCAAmB,IAAA;;;;;;;;;;;;KCraVC,UAAQ;;;;;;UAOH;EACf;EACA,QAAQ;;;;;;;;;UC/BO;;EAEf;;EAEA;;EAEA,OAAO;;UAGQ;EACf;EACA;;EAEA,QAAQ;;;;;;wBA8BM,oBAAoB,cAAc,eAAe;;;;;;;wBA+BjD,iBACd,cAAc,cACd;EAAc;EAAiB;EAAiB;EAAmB;IAClE;;;;;;;;UClDc;EACf;EACA;;EAEA,UAAU;;EAEV;EACA;;UAKe;EACf,MAAM;;EAEN,QAAQ,eAAe;;EAEvB,SAAS,eAAe;;EAExB,WAAW,eAAe;EAC1B,SAAS,eAAe;;EAExB;EACA;;;;;;EAMA;;EAEA,SAAS;;EAET,cAAc;;;;;EAKd,eAAeC;;;;;EAKf,wBAAwB,OAAOA;;;;;;EAM/B;;wBA+Jc,gBACd,MACA,QACA,QACA,UACA,QACA,SACA,UACA,iBACA,SACA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mNK,OACd,IAAI,YACJ,QAAQ;EACL,OAAO;EAAc,OAAO"}
1
+ {"version":3,"file":"index.d.mts","names":["Props","Props","Props"],"sources":["../src/components/button/index.tsx","../src/components/corner-shape.ts","../src/components/workflow-canvas.tsx","../src/utils/template-content.ts","../src/components/template-refs.ts","../src/components/templates-page.tsx","../src/components/push-preview.tsx","../src/components/workflow-list.tsx","../src/components/metric-card.tsx","../src/components/date-range.tsx","../src/components/channel-icon.ts","../src/components/avatar.tsx","../src/components/sparkline.tsx","../src/components/layout.ts"],"mappings":";;;;;;;;;;;KAWY;UAEFA,gBAAc,KAAK;EAC3B,OAAO;EACP,WAAW;EACX;EACA;;wBAyCc,SACd,UACA,WACA,MACA,OACA,MACA,YACG,SACFA,0BAAK,IAAA;;;;;;;;;;;;;qBCtDK,cAAuD;;;;;;;;;;;;;;UCgDnD;EACf,IAAI;;EAEJ,QAAQ;;;;;;;EAOR;;EAEA;;EAEA,gBAAgB;;wBAkXF,iBACd,IACA,OACA,WACA,YACA,gBACC,sCAAmB,IAAA;;;;;;;;;;;;KCraVC,UAAQ;;;;;;UAOH;EACf;EACA,QAAQ;;;;;;;;;UC/BO;;EAEf;;EAEA;;EAEA,OAAO;;UAGQ;EACf;EACA;;EAEA,QAAQ;;;;;;wBA8BM,oBAAoB,cAAc,eAAe;;;;;;;wBA+BjD,iBACd,cAAc,cACd;EAAc;EAAiB;EAAiB;EAAmB;IAClE;;;;;;;;UClDc;EACf;EACA;;EAEA,UAAU;;EAEV;EACA;;UAKe;EACf,MAAM;;EAEN,QAAQ,eAAe;;EAEvB,SAAS,eAAe;;EAExB,WAAW,eAAe;EAC1B,SAAS,eAAe;;EAExB;EACA;;;;;;EAMA;;EAEA,SAAS;;EAET,cAAc;;;;;EAKd,eAAeC;;;;;EAKf,wBAAwB,OAAOA;;;;;;EAM/B;;wBA+Jc,gBACd,MACA,QACA,QACA,UACA,QACA,SACA,UACA,iBACA,SACA,aACA,cACA,sBACA,iBACC,qCAAkB,IAA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OAAO;EAAc,OAAO"}
package/dist/index.mjs CHANGED
@@ -58,12 +58,12 @@ const SIZE_STYLE$2 = {
58
58
  xl: "h-14 px-8 text-lg rounded-2xl focus-visible:ring-4"
59
59
  };
60
60
  const VARIANT_STYLE = {
61
- text: clsx("text-primary border-none bg-transparent", "hover:bg-gray-100 focus-visible:ring-black/10 active:bg-gray-200/80", "dark:hover:bg-gray-800 dark:focus-visible:ring-white/20 dark:active:bg-gray-700/80"),
62
- accent: clsx("bg-accent active:bg-accent/80 text-white", "focus-visible:ring-accent/40 dark:focus-visible:ring-accent/50"),
61
+ text: clsx("border-none bg-transparent text-primary", "hover:bg-gray-100 focus-visible:ring-black/10 active:bg-gray-200/80", "dark:hover:bg-gray-800 dark:focus-visible:ring-white/20 dark:active:bg-gray-700/80"),
62
+ accent: clsx("bg-accent text-white active:bg-accent/80", "focus-visible:ring-accent/40 dark:focus-visible:ring-accent/50"),
63
63
  default: clsx("border-none bg-black text-white focus-visible:ring-black/20 dark:bg-white dark:text-black", "active:bg-black/80 dark:focus-visible:ring-white/30 dark:active:bg-white/80"),
64
- secondary: clsx("text-primary bg-gray-100 focus-visible:ring-black/10 active:bg-gray-200/80", "dark:bg-gray-800 dark:focus-visible:ring-white/20 dark:active:bg-gray-700/80"),
64
+ secondary: clsx("bg-gray-100 text-primary focus-visible:ring-black/10 active:bg-gray-200/80", "dark:bg-gray-800 dark:focus-visible:ring-white/20 dark:active:bg-gray-700/80"),
65
65
  destructive: clsx("text-white focus-visible:ring-red-400/40", "bg-red-400 active:bg-red-500/90", "dark:bg-red-400/70 dark:active:bg-red-400/90"),
66
- outline: clsx("text-primary border", "bg-white focus-visible:ring-black/10 active:bg-gray-100/70", "dark:bg-gray-900/70 dark:focus-visible:ring-white/30 dark:active:bg-gray-900")
66
+ outline: clsx("border text-primary", "bg-white focus-visible:ring-black/10 active:bg-gray-100/70", "dark:bg-gray-900/70 dark:focus-visible:ring-white/30 dark:active:bg-gray-900")
67
67
  };
68
68
  function Button({ children, className, size = "md", style, type = "button", variant = "default", ...props }) {
69
69
  return /* @__PURE__ */ jsx("button", {
@@ -805,11 +805,11 @@ const RULES = {
805
805
  discord: [
806
806
  {
807
807
  pattern: /`([^`]+)`/,
808
- render: (m, key) => code(m[1] ?? "", key)
808
+ render: (m, key) => code(m[1], key)
809
809
  },
810
810
  {
811
811
  pattern: /\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/,
812
- render: (m, key, linkClass) => link(m[2] ?? "", m[1] ?? "", key, linkClass)
812
+ render: (m, key, linkClass) => link(m[2], m[1], key, linkClass)
813
813
  },
814
814
  {
815
815
  pattern: /\*\*([^*]+)\*\*/,
@@ -825,21 +825,21 @@ const RULES = {
825
825
  },
826
826
  {
827
827
  pattern: /\*([^*]+)\*|(?<!\w)_([^_]+)_(?!\w)/,
828
- render: (m, key) => /* @__PURE__ */ jsx("em", { children: m[1] ?? m[2] }, key)
828
+ render: (m, key) => /* @__PURE__ */ jsx("em", { children: m.at(1) ?? m.at(2) }, key)
829
829
  },
830
830
  {
831
831
  pattern: /(https?:\/\/[^\s<]+)/,
832
- render: (m, key, linkClass) => link(m[1] ?? "", m[1] ?? "", key, linkClass)
832
+ render: (m, key, linkClass) => link(m[1], m[1], key, linkClass)
833
833
  }
834
834
  ],
835
835
  slack: [
836
836
  {
837
837
  pattern: /`([^`]+)`/,
838
- render: (m, key) => code(m[1] ?? "", key)
838
+ render: (m, key) => code(m[1], key)
839
839
  },
840
840
  {
841
841
  pattern: /<((?:https?:\/\/|mailto:|tel:)[^|>]+)(?:\|([^>]+))?>/,
842
- render: (m, key, linkClass) => link(m[1] ?? "", m[2] ?? m[1] ?? "", key, linkClass)
842
+ render: (m, key, linkClass) => link(m[1], m.at(2) ?? m[1], key, linkClass)
843
843
  },
844
844
  {
845
845
  pattern: /(?<!\w)\*([^*]+)\*(?!\w)/,
@@ -1453,38 +1453,38 @@ const textOf = (value) => {
1453
1453
  const object = value;
1454
1454
  return typeof object.text === "string" ? object : void 0;
1455
1455
  };
1456
+ const linkClass = "text-[#1d9bd1] hover:underline";
1457
+ const Text = ({ value, className }) => value === void 0 ? null : /* @__PURE__ */ jsx("div", {
1458
+ className: `break-words whitespace-pre-wrap ${className ?? ""}`,
1459
+ children: value.type === "mrkdwn" ? /* @__PURE__ */ jsx(ChatMarkup, {
1460
+ text: value.text,
1461
+ dialect: "slack",
1462
+ linkClass
1463
+ }) : value.text
1464
+ });
1465
+ const Button$1 = ({ element, colors }) => {
1466
+ const style = element.style;
1467
+ return /* @__PURE__ */ jsx("span", {
1468
+ className: "inline-flex h-8 items-center rounded-lg border px-3 text-[13px] font-bold",
1469
+ style: style === "primary" ? {
1470
+ background: "#007a5a",
1471
+ borderColor: "#007a5a",
1472
+ color: "#fff"
1473
+ } : style === "danger" ? {
1474
+ background: "#e01e5a",
1475
+ borderColor: "#e01e5a",
1476
+ color: "#fff"
1477
+ } : {
1478
+ borderColor: colors.border,
1479
+ color: colors.name
1480
+ },
1481
+ children: textOf(element.text)?.text
1482
+ });
1483
+ };
1456
1484
  function SlackPreview({ message, appName, scheme, zoom }) {
1457
1485
  const { t } = useTranslation();
1458
1486
  const colors = PALETTE[scheme];
1459
1487
  const name = message.username ?? appName;
1460
- const linkClass = "text-[#1d9bd1] hover:underline";
1461
- const Text = ({ value, className }) => value === void 0 ? null : /* @__PURE__ */ jsx("div", {
1462
- className: `break-words whitespace-pre-wrap ${className ?? ""}`,
1463
- children: value.type === "mrkdwn" ? /* @__PURE__ */ jsx(ChatMarkup, {
1464
- text: value.text,
1465
- dialect: "slack",
1466
- linkClass
1467
- }) : value.text
1468
- });
1469
- const Button = ({ element }) => {
1470
- const style = element.style;
1471
- return /* @__PURE__ */ jsx("span", {
1472
- className: "inline-flex h-8 items-center rounded-lg border px-3 text-[13px] font-bold",
1473
- style: style === "primary" ? {
1474
- background: "#007a5a",
1475
- borderColor: "#007a5a",
1476
- color: "#fff"
1477
- } : style === "danger" ? {
1478
- background: "#e01e5a",
1479
- borderColor: "#e01e5a",
1480
- color: "#fff"
1481
- } : {
1482
- borderColor: colors.border,
1483
- color: colors.name
1484
- },
1485
- children: textOf(element.text)?.text
1486
- });
1487
- };
1488
1488
  const blocks = message.blocks ?? [];
1489
1489
  return /* @__PURE__ */ jsx("div", {
1490
1490
  className: "mx-auto w-full max-w-2xl overflow-hidden rounded-2xl border shadow-sm",
@@ -1562,7 +1562,10 @@ function SlackPreview({ message, appName, scheme, zoom }) {
1562
1562
  alt: accessory.alt_text ?? "",
1563
1563
  className: "size-[88px] shrink-0 rounded-lg object-cover"
1564
1564
  }),
1565
- accessory?.type === "button" && /* @__PURE__ */ jsx(Button, { element: accessory })
1565
+ accessory?.type === "button" && /* @__PURE__ */ jsx(Button$1, {
1566
+ element: accessory,
1567
+ colors
1568
+ })
1566
1569
  ]
1567
1570
  }, key);
1568
1571
  }
@@ -1577,7 +1580,10 @@ function SlackPreview({ message, appName, scheme, zoom }) {
1577
1580
  }, key);
1578
1581
  case "actions": return /* @__PURE__ */ jsx("div", {
1579
1582
  className: "mt-1 flex flex-wrap gap-2",
1580
- children: (block.elements ?? []).map((element, i) => element.type === "button" ? /* @__PURE__ */ jsx(Button, { element }, i) : null)
1583
+ children: (block.elements ?? []).map((element, i) => element.type === "button" ? /* @__PURE__ */ jsx(Button$1, {
1584
+ element,
1585
+ colors
1586
+ }, i) : null)
1581
1587
  }, key);
1582
1588
  case "image": return /* @__PURE__ */ jsxs("figure", {
1583
1589
  className: "mt-1",
@@ -1614,7 +1620,7 @@ const SIZE_STYLE$1 = {
1614
1620
  function Textarea({ size = "md", className, ...props }) {
1615
1621
  return /* @__PURE__ */ jsx("textarea", {
1616
1622
  ...props,
1617
- className: cn("transition-colors duration-100 focus:outline-none", "placeholder-placeholder bg-textfield focus-visible:border-accent border", "dark:focus-visible:ring-accent/50 focus-visible:ring-accent/40", SIZE_STYLE$1[size], className)
1623
+ className: cn("transition-colors duration-100 focus:outline-none", "border bg-textfield placeholder-placeholder focus-visible:border-accent", "focus-visible:ring-accent/40 dark:focus-visible:ring-accent/50", SIZE_STYLE$1[size], className)
1618
1624
  });
1619
1625
  }
1620
1626
  //#endregion
@@ -1627,10 +1633,10 @@ function Textarea({ size = "md", className, ...props }) {
1627
1633
  */
1628
1634
  function Field({ label, children }) {
1629
1635
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("dt", {
1630
- className: "text-muted whitespace-nowrap",
1636
+ className: "whitespace-nowrap text-muted",
1631
1637
  children: label
1632
1638
  }), /* @__PURE__ */ jsx("dd", {
1633
- className: "text-secondary min-w-0 break-words",
1639
+ className: "min-w-0 break-words text-secondary",
1634
1640
  children
1635
1641
  })] });
1636
1642
  }
@@ -1664,13 +1670,13 @@ function PreviewPropsEditor({ initial, onChange, onInvalid, onReset }) {
1664
1670
  const [draft, setDraft] = useState(void 0);
1665
1671
  const text = draft ?? JSON.stringify(initial, null, 2);
1666
1672
  return /* @__PURE__ */ jsxs("div", {
1667
- className: "border-border bg-card border-b px-6 py-4",
1673
+ className: "border-b border-border bg-card px-6 py-4",
1668
1674
  children: [
1669
1675
  /* @__PURE__ */ jsxs("div", {
1670
1676
  className: "flex items-center justify-between",
1671
1677
  children: [/* @__PURE__ */ jsx("label", {
1672
1678
  htmlFor: "preview-props",
1673
- className: "text-muted text-sm",
1679
+ className: "text-sm text-muted",
1674
1680
  children: t("emails.previewProps")
1675
1681
  }), /* @__PURE__ */ jsx("button", {
1676
1682
  type: "button",
@@ -1678,7 +1684,7 @@ function PreviewPropsEditor({ initial, onChange, onInvalid, onReset }) {
1678
1684
  setDraft(void 0);
1679
1685
  onReset();
1680
1686
  },
1681
- className: "text-muted hover:text-primary text-xs transition-colors",
1687
+ className: "text-xs text-muted transition-colors hover:text-primary",
1682
1688
  children: t("emails.previewPropsReset")
1683
1689
  })]
1684
1690
  }),
@@ -1707,7 +1713,7 @@ function PreviewPropsEditor({ initial, onChange, onInvalid, onReset }) {
1707
1713
  }
1708
1714
  }),
1709
1715
  /* @__PURE__ */ jsx("p", {
1710
- className: "text-muted mt-1.5 text-xs",
1716
+ className: "mt-1.5 text-xs text-muted",
1711
1717
  children: t("emails.previewPropsHint")
1712
1718
  })
1713
1719
  ]
@@ -1767,13 +1773,13 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1767
1773
  return /* @__PURE__ */ jsx("div", {
1768
1774
  className: "flex flex-1",
1769
1775
  children: /* @__PURE__ */ jsx("section", {
1770
- className: "bg-page flex min-w-0 flex-1 flex-col",
1776
+ className: "flex min-w-0 flex-1 flex-col bg-page",
1771
1777
  children: active === void 0 ? /* @__PURE__ */ jsx("div", {
1772
- className: "text-muted flex flex-1 items-center justify-center text-sm",
1778
+ className: "flex flex-1 items-center justify-center text-sm text-muted",
1773
1779
  children: selected === void 0 ? t("emails.empty") : t("emails.notFound", { key: selected })
1774
1780
  }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1775
1781
  (isEmail && activeEmail !== void 0 || push !== void 0) && /* @__PURE__ */ jsx("div", {
1776
- className: "border-border bg-card border-b px-6 py-4",
1782
+ className: "border-b border-border bg-card px-6 py-4",
1777
1783
  children: /* @__PURE__ */ jsxs("dl", {
1778
1784
  className: "grid grid-cols-[max-content_1fr] gap-x-8 gap-y-2.5 text-sm",
1779
1785
  children: [isEmail && activeEmail !== void 0 && resolved !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1834,13 +1840,13 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1834
1840
  children: [/* @__PURE__ */ jsx("div", {
1835
1841
  className: "flex-1 p-6 pb-4",
1836
1842
  children: isChat ? (isDiscord ? activeDiscord : activeSlack) === void 0 ? /* @__PURE__ */ jsxs("div", {
1837
- className: "border-border bg-card mx-auto max-w-xl rounded-2xl border border-dashed p-8 text-center",
1843
+ className: "mx-auto max-w-xl rounded-2xl border border-dashed border-border bg-card p-8 text-center",
1838
1844
  style: superellipse,
1839
1845
  children: [/* @__PURE__ */ jsx("p", {
1840
- className: "text-primary text-sm font-medium",
1846
+ className: "text-sm font-medium text-primary",
1841
1847
  children: t("emails.notRegistered")
1842
1848
  }), /* @__PURE__ */ jsx("p", {
1843
- className: "text-muted mt-2 text-sm",
1849
+ className: "mt-2 text-sm text-muted",
1844
1850
  children: t("emails.chatNotRegisteredHint", {
1845
1851
  key: active.key,
1846
1852
  channel: isDiscord ? "discord" : "slack"
@@ -1857,13 +1863,13 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1857
1863
  scheme,
1858
1864
  zoom
1859
1865
  }) : null : isPush ? activePush === void 0 ? /* @__PURE__ */ jsxs("div", {
1860
- className: "border-border bg-card mx-auto max-w-xl rounded-2xl border border-dashed p-8 text-center",
1866
+ className: "mx-auto max-w-xl rounded-2xl border border-dashed border-border bg-card p-8 text-center",
1861
1867
  style: superellipse,
1862
1868
  children: [/* @__PURE__ */ jsx("p", {
1863
- className: "text-primary text-sm font-medium",
1869
+ className: "text-sm font-medium text-primary",
1864
1870
  children: t("emails.notRegistered")
1865
1871
  }), /* @__PURE__ */ jsx("p", {
1866
- className: "text-muted mt-2 text-sm",
1872
+ className: "mt-2 text-sm text-muted",
1867
1873
  children: t("emails.pushNotRegisteredHint", { key: active.key })
1868
1874
  })]
1869
1875
  }) : pushFailure !== void 0 ? /* @__PURE__ */ jsx(TemplateFailurePanel, { failure: pushFailure }) : /* @__PURE__ */ jsx(PushPreview, {
@@ -1873,17 +1879,17 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1873
1879
  scheme,
1874
1880
  zoom
1875
1881
  }) : activeEmail === void 0 ? /* @__PURE__ */ jsxs("div", {
1876
- className: "border-border bg-card mx-auto max-w-xl rounded-2xl border border-dashed p-8 text-center",
1882
+ className: "mx-auto max-w-xl rounded-2xl border border-dashed border-border bg-card p-8 text-center",
1877
1883
  style: superellipse,
1878
1884
  children: [/* @__PURE__ */ jsx("p", {
1879
- className: "text-primary text-sm font-medium",
1885
+ className: "text-sm font-medium text-primary",
1880
1886
  children: t("emails.notRegistered")
1881
1887
  }), /* @__PURE__ */ jsx("p", {
1882
- className: "text-muted mt-2 text-sm",
1888
+ className: "mt-2 text-sm text-muted",
1883
1889
  children: t("emails.notRegisteredHint", { key: active.key })
1884
1890
  })]
1885
1891
  }) : failure !== void 0 ? /* @__PURE__ */ jsx(TemplateFailurePanel, { failure }) : loading ? /* @__PURE__ */ jsx("div", {
1886
- className: "text-muted text-center text-sm",
1892
+ className: "text-center text-sm text-muted",
1887
1893
  children: t("emails.rendering")
1888
1894
  }) : error !== void 0 ? /* @__PURE__ */ jsx("div", {
1889
1895
  className: "mx-auto max-w-xl rounded-2xl border border-red-200 bg-red-50 p-6 text-sm text-red-700 dark:border-red-400/20 dark:bg-red-400/10 dark:text-red-300",
@@ -1912,7 +1918,7 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1912
1918
  }), (isChat ? chatReady : isPush ? push !== void 0 : activeEmail !== void 0 && !loading && error === void 0 && failure === void 0) && /* @__PURE__ */ jsx("div", {
1913
1919
  className: "pointer-events-none sticky bottom-0 z-10 flex justify-center pt-2 pb-4",
1914
1920
  children: /* @__PURE__ */ jsxs("div", {
1915
- className: "border-border bg-card pointer-events-auto flex items-center gap-0.5 rounded-full border p-1 shadow-lg",
1921
+ className: "pointer-events-auto flex items-center gap-0.5 rounded-full border border-border bg-card p-1 shadow-lg",
1916
1922
  children: [
1917
1923
  /* @__PURE__ */ jsx(ToolButton, {
1918
1924
  active: scheme === "light",
@@ -1935,7 +1941,7 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1935
1941
  })
1936
1942
  }),
1937
1943
  isEmail && /* @__PURE__ */ jsxs(Fragment, { children: [
1938
- /* @__PURE__ */ jsx("div", { className: "bg-border mx-1 h-4 w-px" }),
1944
+ /* @__PURE__ */ jsx("div", { className: "mx-1 h-4 w-px bg-border" }),
1939
1945
  /* @__PURE__ */ jsx(ToolButton, {
1940
1946
  active: device === "desktop",
1941
1947
  label: t("emails.previewDesktop"),
@@ -1957,7 +1963,7 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1957
1963
  })
1958
1964
  })
1959
1965
  ] }),
1960
- /* @__PURE__ */ jsx("div", { className: "bg-border mx-1 h-4 w-px" }),
1966
+ /* @__PURE__ */ jsx("div", { className: "mx-1 h-4 w-px bg-border" }),
1961
1967
  /* @__PURE__ */ jsx(ToolButton, {
1962
1968
  label: t("emails.zoomOut"),
1963
1969
  onClick: () => setZoom((level) => Math.max(.5, level - .25)),
@@ -1971,7 +1977,7 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1971
1977
  type: "button",
1972
1978
  title: t("emails.zoomReset"),
1973
1979
  onClick: () => setZoom(1),
1974
- className: "text-secondary hover:text-primary w-11 text-center text-xs font-medium tabular-nums transition-colors",
1980
+ className: "w-11 text-center text-xs font-medium text-secondary tabular-nums transition-colors hover:text-primary",
1975
1981
  children: [Math.round(zoom * 100), "%"]
1976
1982
  }),
1977
1983
  /* @__PURE__ */ jsx(ToolButton, {
@@ -2079,14 +2085,14 @@ function WorkflowList({ items, reports, onOpen }) {
2079
2085
  const { t } = useTranslation();
2080
2086
  const byId = new Map((reports ?? []).map((report) => [report.id, report]));
2081
2087
  return /* @__PURE__ */ jsx("div", {
2082
- className: "border-border bg-card rounded-2xl border",
2088
+ className: "rounded-2xl border border-border bg-card",
2083
2089
  style: superellipse,
2084
2090
  children: /* @__PURE__ */ jsxs("table", {
2085
2091
  className: "w-full table-fixed border-separate border-spacing-0 text-sm max-md:block",
2086
2092
  children: [/* @__PURE__ */ jsx("thead", {
2087
2093
  className: "max-md:hidden",
2088
2094
  children: /* @__PURE__ */ jsxs("tr", {
2089
- className: "text-muted text-left text-xs font-medium",
2095
+ className: "text-left text-xs font-medium text-muted",
2090
2096
  children: [
2091
2097
  /* @__PURE__ */ jsx("th", {
2092
2098
  className: clsx(HEAD_CELL, "min-w-0 px-6"),
@@ -2117,7 +2123,7 @@ function WorkflowList({ items, reports, onOpen }) {
2117
2123
  };
2118
2124
  return /* @__PURE__ */ jsxs("tr", {
2119
2125
  onClick: () => onOpen(key),
2120
- className: clsx("cursor-pointer align-top [&>td]:transition-colors", "md:hover:[&>td]:bg-hover md:last:[&>td]:border-b-0", "md:last:[&>td:first-child]:rounded-bl-2xl md:last:[&>td:last-child]:rounded-br-2xl", "border-border max-md:hover:bg-hover max-md:grid max-md:grid-cols-6", "max-md:border-b max-md:px-3 max-md:first:rounded-t-2xl", "max-md:last:rounded-b-2xl max-md:last:border-b-0"),
2126
+ className: clsx("cursor-pointer align-top [&>td]:transition-colors", "md:last:[&>td]:border-b-0 md:hover:[&>td]:bg-hover", "md:last:[&>td:first-child]:rounded-bl-2xl md:last:[&>td:last-child]:rounded-br-2xl", "border-border max-md:grid max-md:grid-cols-6 max-md:hover:bg-hover", "max-md:border-b max-md:px-3 max-md:first:rounded-t-2xl", "max-md:last:rounded-b-2xl max-md:last:border-b-0"),
2121
2127
  style: superellipse,
2122
2128
  children: [
2123
2129
  /* @__PURE__ */ jsx("td", {
@@ -2126,7 +2132,7 @@ function WorkflowList({ items, reports, onOpen }) {
2126
2132
  children: /* @__PURE__ */ jsxs("div", {
2127
2133
  className: "flex items-start gap-3",
2128
2134
  children: [/* @__PURE__ */ jsx(Workflow, {
2129
- className: "text-muted mt-0.5 size-4 shrink-0",
2135
+ className: "mt-0.5 size-4 shrink-0 text-muted",
2130
2136
  strokeWidth: 2
2131
2137
  }), /* @__PURE__ */ jsxs("div", {
2132
2138
  className: "min-w-0",
@@ -2136,11 +2142,11 @@ function WorkflowList({ items, reports, onOpen }) {
2136
2142
  children: displayName(ir.meta?.name, t("common.untitled"))
2137
2143
  }),
2138
2144
  ir.meta?.description !== void 0 && /* @__PURE__ */ jsx("p", {
2139
- className: "text-muted mt-1 truncate text-sm max-md:-ml-7",
2145
+ className: "mt-1 truncate text-sm text-muted max-md:-ml-7",
2140
2146
  children: ir.meta.description
2141
2147
  }),
2142
2148
  /* @__PURE__ */ jsxs("div", {
2143
- className: "text-muted mt-2 flex items-center gap-3 text-xs max-md:-ml-7",
2149
+ className: "mt-2 flex items-center gap-3 text-xs text-muted max-md:-ml-7",
2144
2150
  children: [/* @__PURE__ */ jsxs("span", {
2145
2151
  className: "flex items-center gap-1",
2146
2152
  children: [/* @__PURE__ */ jsx(Mail, {
@@ -2172,7 +2178,7 @@ function WorkflowList({ items, reports, onOpen }) {
2172
2178
  style: superellipse,
2173
2179
  children: [
2174
2180
  /* @__PURE__ */ jsx("div", {
2175
- className: "text-muted mb-1 truncate text-xs md:hidden",
2181
+ className: "mb-1 truncate text-xs text-muted md:hidden",
2176
2182
  children: t(`workflows.columns.${column}`)
2177
2183
  }),
2178
2184
  /* @__PURE__ */ jsx("div", {
@@ -2280,7 +2286,7 @@ function MetricCard({ label, value, delta, dates, series, format }) {
2280
2286
  setActive(Math.min(Math.max(index, 0), dates.length - 1));
2281
2287
  };
2282
2288
  return /* @__PURE__ */ jsxs("section", {
2283
- className: "border-border bg-card flex flex-col overflow-hidden rounded-2xl border",
2289
+ className: "flex flex-col overflow-hidden rounded-2xl border border-border bg-card",
2284
2290
  style: superellipse,
2285
2291
  children: [
2286
2292
  /* @__PURE__ */ jsx("div", {
@@ -2352,10 +2358,10 @@ function MetricCard({ label, value, delta, dates, series, format }) {
2352
2358
  ]
2353
2359
  }),
2354
2360
  all.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
2355
- className: "text-muted pointer-events-none absolute top-0 left-4 text-xs tabular-nums",
2361
+ className: "pointer-events-none absolute top-0 left-4 text-xs text-muted tabular-nums",
2356
2362
  children: format(max)
2357
2363
  }), /* @__PURE__ */ jsx("span", {
2358
- className: "text-muted pointer-events-none absolute right-4 bottom-1 text-xs tabular-nums",
2364
+ className: "pointer-events-none absolute right-4 bottom-1 text-xs text-muted tabular-nums",
2359
2365
  children: format(min)
2360
2366
  })] }),
2361
2367
  hovered !== void 0 && /* @__PURE__ */ jsx(HoverReadout, {
@@ -2393,11 +2399,11 @@ function HoverReadout({ x, date, rows }) {
2393
2399
  className: "pointer-events-none",
2394
2400
  children: [
2395
2401
  /* @__PURE__ */ jsx("div", {
2396
- className: "bg-border absolute inset-y-0 w-px",
2402
+ className: "absolute inset-y-0 w-px bg-border",
2397
2403
  style: { left }
2398
2404
  }),
2399
2405
  rows.map((row) => /* @__PURE__ */ jsx("div", {
2400
- className: "border-card absolute size-2.5 rounded-full border-2",
2406
+ className: "absolute size-2.5 rounded-full border-2 border-card",
2401
2407
  style: {
2402
2408
  left,
2403
2409
  top: row.y,
@@ -2406,7 +2412,7 @@ function HoverReadout({ x, date, rows }) {
2406
2412
  }
2407
2413
  }, row.label)),
2408
2414
  /* @__PURE__ */ jsxs("div", {
2409
- className: "border-border bg-card shadow-card-shadow absolute top-0 grid w-max items-center gap-x-3 gap-y-1 rounded-lg border px-2.5 py-2 text-xs shadow-md",
2415
+ className: "absolute top-0 grid w-max items-center gap-x-3 gap-y-1 rounded-lg border border-border bg-card px-2.5 py-2 text-xs shadow-md shadow-card-shadow",
2410
2416
  style: {
2411
2417
  ...superellipse,
2412
2418
  left,
@@ -2425,7 +2431,7 @@ function HoverReadout({ x, date, rows }) {
2425
2431
  }
2426
2432
  }),
2427
2433
  /* @__PURE__ */ jsx("span", {
2428
- className: "text-secondary whitespace-nowrap",
2434
+ className: "whitespace-nowrap text-secondary",
2429
2435
  children: row.label
2430
2436
  }),
2431
2437
  /* @__PURE__ */ jsx("span", {
@@ -2451,7 +2457,7 @@ function Input({ size = "md", type = "text", htmlSize, className, ...props }) {
2451
2457
  ...props,
2452
2458
  type,
2453
2459
  size: htmlSize,
2454
- className: cn("transition-colors duration-100 focus:outline-none", "placeholder-placeholder bg-textfield focus-visible:border-accent border", "dark:focus-visible:ring-accent/50 focus-visible:ring-accent/40", SIZE_STYLE[size], className)
2460
+ className: cn("transition-colors duration-100 focus:outline-none", "border bg-textfield placeholder-placeholder focus-visible:border-accent", "focus-visible:ring-accent/40 dark:focus-visible:ring-accent/50", SIZE_STYLE[size], className)
2455
2461
  });
2456
2462
  }
2457
2463
  //#endregion
@@ -2515,6 +2521,7 @@ function DateRangePicker({ value, onChange, className }) {
2515
2521
  shift({ padding: 8 })
2516
2522
  ]
2517
2523
  });
2524
+ const { setFloating, setReference } = refs;
2518
2525
  const { getReferenceProps, getFloatingProps } = useInteractions([
2519
2526
  useClick(context),
2520
2527
  useDismiss(context),
@@ -2534,7 +2541,7 @@ function DateRangePicker({ value, onChange, className }) {
2534
2541
  });
2535
2542
  };
2536
2543
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Button, {
2537
- ref: refs.setReference,
2544
+ ref: setReference,
2538
2545
  size: "sm",
2539
2546
  variant: "outline",
2540
2547
  className: cn("gap-2 font-normal", className),
@@ -2543,7 +2550,7 @@ function DateRangePicker({ value, onChange, className }) {
2543
2550
  size: 16,
2544
2551
  strokeWidth: 2,
2545
2552
  "aria-hidden": true,
2546
- className: "text-secondary shrink-0"
2553
+ className: "shrink-0 text-secondary"
2547
2554
  }), /* @__PURE__ */ jsxs("span", {
2548
2555
  className: "tabular-nums",
2549
2556
  children: [
@@ -2556,16 +2563,16 @@ function DateRangePicker({ value, onChange, className }) {
2556
2563
  context,
2557
2564
  modal: false,
2558
2565
  children: /* @__PURE__ */ jsxs("div", {
2559
- ref: refs.setFloating,
2566
+ ref: setFloating,
2560
2567
  style: {
2561
2568
  ...floatingStyles,
2562
2569
  ...superellipse
2563
2570
  },
2564
- className: "border-border bg-card shadow-card-shadow z-50 w-64 rounded-xl border p-2 shadow-lg",
2571
+ className: "z-50 w-64 rounded-xl border border-border bg-card p-2 shadow-lg shadow-card-shadow",
2565
2572
  ...getFloatingProps(),
2566
2573
  children: [PRESETS.map((days) => /* @__PURE__ */ jsx("button", {
2567
2574
  type: "button",
2568
- className: "hover:bg-hover block w-full rounded-lg px-2.5 py-1.5 text-left text-sm",
2575
+ className: "block w-full rounded-lg px-2.5 py-1.5 text-left text-sm hover:bg-hover",
2569
2576
  style: superellipse,
2570
2577
  onClick: () => {
2571
2578
  onChange(lastDays(days));
@@ -2573,11 +2580,11 @@ function DateRangePicker({ value, onChange, className }) {
2573
2580
  },
2574
2581
  children: t("metrics.range.lastDays", { count: days })
2575
2582
  }, days)), /* @__PURE__ */ jsxs("div", {
2576
- className: "border-border mt-2 space-y-2 border-t pt-2",
2583
+ className: "mt-2 space-y-2 border-t border-border pt-2",
2577
2584
  children: [/* @__PURE__ */ jsxs("label", {
2578
2585
  className: "block",
2579
2586
  children: [/* @__PURE__ */ jsx("span", {
2580
- className: "text-muted text-xs",
2587
+ className: "text-xs text-muted",
2581
2588
  children: t("metrics.range.from")
2582
2589
  }), /* @__PURE__ */ jsx(Input, {
2583
2590
  size: "sm",
@@ -2590,7 +2597,7 @@ function DateRangePicker({ value, onChange, className }) {
2590
2597
  }), /* @__PURE__ */ jsxs("label", {
2591
2598
  className: "block",
2592
2599
  children: [/* @__PURE__ */ jsx("span", {
2593
- className: "text-muted text-xs",
2600
+ className: "text-xs text-muted",
2594
2601
  children: t("metrics.range.to")
2595
2602
  }), /* @__PURE__ */ jsx(Input, {
2596
2603
  size: "sm",
@@ -2646,7 +2653,7 @@ function Avatar({ picture, label, size = "md" }) {
2646
2653
  });
2647
2654
  return /* @__PURE__ */ jsx("div", {
2648
2655
  "aria-hidden": true,
2649
- className: cn("bg-selected text-secondary flex shrink-0 items-center justify-center rounded-full font-medium", SIZES[size]),
2656
+ className: cn("flex shrink-0 items-center justify-center rounded-full bg-selected font-medium text-secondary", SIZES[size]),
2650
2657
  children: label.trim().charAt(0).toUpperCase()
2651
2658
  });
2652
2659
  }