@novu/js 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
- import { Novu, isSameFilter } from '../chunk-QIWP6QB5.mjs';
1
+ import { Novu, isSameFilter } from '../chunk-VCUP7D3X.mjs';
2
+ import { parseMarkdownIntoTokens } from '../chunk-GPV65U5R.mjs';
2
3
  import { __privateAdd, __privateSet, __privateMethod, __privateGet, __spreadProps, __spreadValues, __objRest, __async } from '../chunk-STZMOEWR.mjs';
3
4
  import { delegateEvents, createComponent, mergeProps, render, Portal, spread, template, insert, memo, effect, className, use, addEventListener, setAttribute, Dynamic, isServer } from 'solid-js/web';
4
5
  import { createSignal, createContext, useContext, onMount, onCleanup, For, createMemo, createEffect, splitProps, Show, Switch as Switch$1, Match, createResource, createComputed, batch } from 'solid-js';
@@ -247,7 +248,7 @@ function formatToRelativeTime({
247
248
  } else if (diffInSeconds < SECONDS.inMonth) {
248
249
  return formatter.format(Math.floor(-diffInSeconds / SECONDS.inDay), "day");
249
250
  } else {
250
- return new Intl.DateTimeFormat(locale, { month: "short", day: "numeric" }).format(toDate);
251
+ return new Intl.DateTimeFormat(locale, { month: "short", day: "numeric" }).format(fromDate);
251
252
  }
252
253
  }
253
254
  var twMerge = extendTailwindMerge({
@@ -1042,7 +1043,7 @@ var ExternalElementRenderer = (props) => {
1042
1043
  return _el$;
1043
1044
  })();
1044
1045
  };
1045
- var _tmpl$2 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=20 height=20 fill=none viewBox="0 0 20 20"><path fill=currentColor d="M17.117 4.358l-1.159-1.4A1.21 1.21 0 0015 2.5H5c-.392 0-.733.175-.967.458l-1.15 1.4A1.632 1.632 0 002.5 5.417v10.416c0 .917.75 1.667 1.667 1.667h11.666c.917 0 1.667-.75 1.667-1.667V5.417c0-.4-.142-.775-.383-1.059zM5.2 4.167h9.6l.675.808H4.533l.667-.808zM4.167 15.833V6.667h11.666v9.166H4.167zm7.041-7.5H8.792v2.5H6.667L10 14.167l3.333-3.334h-2.125v-2.5z">`);
1046
+ var _tmpl$2 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=20 height=20 fill=none viewBox="0 0 20 20"><path fill=currentColor d="M16.25 15V6.875L15 4.375H5L3.75 6.877V15c0 .345.28.625.625.625h11.25c.345 0 .625-.28.625-.625zM5 8.125h10v6.25H5v-6.25zm.772-2.5h8.455l.625 1.25H5.148l.625-1.25zm6.103 3.75h-3.75v1.25h3.75v-1.25z">`);
1046
1047
  var Archive = (props) => {
1047
1048
  return (() => {
1048
1049
  var _el$ = _tmpl$2();
@@ -1178,7 +1179,7 @@ var Unarchive = (props) => {
1178
1179
  return _el$;
1179
1180
  })();
1180
1181
  };
1181
- var _tmpl$19 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=20 height=20 fill=none viewBox="0 0 20 20"><path fill=currentColor d="M18.334 5.817v7.516c0 .917-.75 1.667-1.667 1.667H5l-3.333 3.333v-15c0-.916.75-1.666 1.667-1.666h8.416c-.05.266-.083.55-.083.833 0 .283.033.567.083.833H3.334v10h13.333v-6.75a4.127 4.127 0 001.667-.766zm-5-3.317c0 1.383 1.116 2.5 2.5 2.5 1.383 0 2.5-1.117 2.5-2.5S17.217 0 15.834 0a2.497 2.497 0 00-2.5 2.5z">`);
1182
+ var _tmpl$19 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=20 height=20 fill=none viewBox="0 0 20 20"><path fill=currentColor d="M10 15v1.25H4.996a.625.625 0 01-.621-.62V4.37c0-.342.28-.62.624-.62H12.5l3.125 3.125v4.375h-1.25V7.5h-2.5V5h-6.25v10H10zm1.54-.335l2.21 2.21 3.094-3.093-.884-.884-2.21 2.21-1.326-1.326-.884.883z">`);
1182
1183
  var Unread = (props) => {
1183
1184
  return (() => {
1184
1185
  var _el$ = _tmpl$19();
@@ -1186,17 +1187,13 @@ var Unread = (props) => {
1186
1187
  return _el$;
1187
1188
  })();
1188
1189
  };
1189
- var _tmpl$20 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 fill=none viewBox="0 0 16 16"><path fill=currentColor d="M8 11.333c.733 0 1.333-.6 1.333-1.333S8.733 8.667 8 8.667s-1.333.6-1.333 1.333.6 1.333 1.333 1.333zm4-6h-.667V4a3.335 3.335 0 00-6.666 0v1.333H4c-.733 0-1.333.6-1.333 1.334v6.666c0 .734.6 1.334 1.333 1.334h8c.733 0 1.333-.6 1.333-1.334V6.667c0-.734-.6-1.334-1.333-1.334zM5.933 4c0-1.14.927-2.067 2.067-2.067 1.14 0 2.067.927 2.067 2.067v1.333H5.933V4zM12 13.333H4V6.667h8v6.666z">`);
1190
- var Lock = () => {
1191
- return _tmpl$20();
1192
- };
1193
1190
 
1194
1191
  // src/ui/components/elements/Bell/DefaultBellContainer.tsx
1195
- var _tmpl$21 = /* @__PURE__ */ template(`<span>`);
1192
+ var _tmpl$20 = /* @__PURE__ */ template(`<span>`);
1196
1193
  var BellContainer = (props) => {
1197
1194
  const style = useStyle();
1198
1195
  return (() => {
1199
- var _el$ = _tmpl$21();
1196
+ var _el$ = _tmpl$20();
1200
1197
  insert(_el$, createComponent(BellIcon, {
1201
1198
  get ["class"]() {
1202
1199
  return style("bellIcon");
@@ -1207,7 +1204,7 @@ var BellContainer = (props) => {
1207
1204
  return props.unreadCount > 0;
1208
1205
  },
1209
1206
  get children() {
1210
- var _el$2 = _tmpl$21();
1207
+ var _el$2 = _tmpl$20();
1211
1208
  effect(() => className(_el$2, style("bellDot", "nt-absolute nt-top-2 nt-right-2 nt-block nt-size-2 nt-transform nt-translate-x-1/2 -nt-translate-y-1/2 nt-bg-primary nt-rounded-full nt-border nt-border-background")));
1212
1209
  return _el$2;
1213
1210
  }
@@ -1240,7 +1237,7 @@ var Bell = (props) => {
1240
1237
  }
1241
1238
  });
1242
1239
  };
1243
- var _tmpl$22 = /* @__PURE__ */ template(`<div class="nt-flex nt-shrink-0 nt-justify-center nt-items-center nt-gap-1 nt-mt-auto nt-pt-9 nt-pb-3 nt-text-foreground-alpha-200"><span class=nt-text-xs>Powered by Novu`);
1240
+ var _tmpl$21 = /* @__PURE__ */ template(`<div class="nt-flex nt-shrink-0 nt-justify-center nt-items-center nt-gap-1 nt-mt-auto nt-pt-9 nt-pb-3 nt-text-foreground-alpha-200"><span class=nt-text-xs>Powered by Novu`);
1244
1241
  var Footer = () => {
1245
1242
  const {
1246
1243
  hideBranding
@@ -1250,13 +1247,13 @@ var Footer = () => {
1250
1247
  return !hideBranding();
1251
1248
  },
1252
1249
  get children() {
1253
- var _el$ = _tmpl$22(), _el$2 = _el$.firstChild;
1250
+ var _el$ = _tmpl$21(), _el$2 = _el$.firstChild;
1254
1251
  insert(_el$, createComponent(Novu2, {}), _el$2);
1255
1252
  return _el$;
1256
1253
  }
1257
1254
  });
1258
1255
  };
1259
- var _tmpl$23 = /* @__PURE__ */ template(`<button>`);
1256
+ var _tmpl$22 = /* @__PURE__ */ template(`<button>`);
1260
1257
  var buttonVariants = cva("nt-inline-flex nt-gap-4 nt-items-center nt-justify-center nt-whitespace-nowrap nt-rounded-lg nt-text-sm nt-font-medium nt-ring-offset-background nt-transition-colors focus-visible:nt-outline-none focus-visible:nt-ring-2 focus-visible:nt-ring-primary nt-focus-visible:nt-ring-offset-2 disabled:nt-pointer-events-none disabled:nt-opacity-50", {
1261
1258
  variants: {
1262
1259
  variant: {
@@ -1283,7 +1280,7 @@ var Button = (props) => {
1283
1280
  const [local, rest] = splitProps(props, ["class", "appearanceKey"]);
1284
1281
  const style = useStyle();
1285
1282
  return (() => {
1286
- var _el$ = _tmpl$23();
1283
+ var _el$ = _tmpl$22();
1287
1284
  spread(_el$, mergeProps({
1288
1285
  get ["data-variant"]() {
1289
1286
  return props.variant;
@@ -1301,7 +1298,7 @@ var Button = (props) => {
1301
1298
  return _el$;
1302
1299
  })();
1303
1300
  };
1304
- var _tmpl$24 = /* @__PURE__ */ template(`<button>`);
1301
+ var _tmpl$23 = /* @__PURE__ */ template(`<button>`);
1305
1302
  var PopoverClose = (props) => {
1306
1303
  const {
1307
1304
  onClose
@@ -1322,7 +1319,7 @@ var PopoverClose = (props) => {
1322
1319
  }, rest));
1323
1320
  }
1324
1321
  return (() => {
1325
- var _el$ = _tmpl$24();
1322
+ var _el$ = _tmpl$23();
1326
1323
  _el$.$$click = handleClick;
1327
1324
  spread(_el$, rest, false, false);
1328
1325
  return _el$;
@@ -1515,7 +1512,7 @@ var PopoverContent = (props) => {
1515
1512
  }
1516
1513
  });
1517
1514
  };
1518
- var _tmpl$25 = /* @__PURE__ */ template(`<button>`);
1515
+ var _tmpl$24 = /* @__PURE__ */ template(`<button>`);
1519
1516
  var PopoverTrigger = (props) => {
1520
1517
  const {
1521
1518
  setReference,
@@ -1539,7 +1536,7 @@ var PopoverTrigger = (props) => {
1539
1536
  }, rest));
1540
1537
  }
1541
1538
  return (() => {
1542
- var _el$ = _tmpl$25();
1539
+ var _el$ = _tmpl$24();
1543
1540
  _el$.$$click = handleClick;
1544
1541
  use(setReference, _el$);
1545
1542
  spread(_el$, mergeProps({
@@ -1639,14 +1636,14 @@ var Dropdown = {
1639
1636
  */
1640
1637
  Item: DropdownItem
1641
1638
  };
1642
- var _tmpl$26 = /* @__PURE__ */ template(`<div role=tablist>`);
1643
- var _tmpl$27 = /* @__PURE__ */ template(`<div class="nt-border-t nt-border-secondary nt-mt-[-0.25rem] nt-relative nt-z-[-1]">`);
1639
+ var _tmpl$25 = /* @__PURE__ */ template(`<div role=tablist>`);
1640
+ var _tmpl$26 = /* @__PURE__ */ template(`<div class="nt-border-t nt-border-secondary nt-mt-[-0.25rem] nt-relative nt-z-[-1]">`);
1644
1641
  var tabsListVariants = () => "nt-flex nt-gap-6 nt-px-6 nt-py-1 nt-overflow-hidden";
1645
1642
  var TabsList = (props) => {
1646
1643
  const [local, rest] = splitProps(props, ["class", "appearanceKey", "ref", "children"]);
1647
1644
  const style = useStyle();
1648
1645
  return [(() => {
1649
- var _el$ = _tmpl$26();
1646
+ var _el$ = _tmpl$25();
1650
1647
  var _ref$ = local.ref;
1651
1648
  typeof _ref$ === "function" ? use(_ref$, _el$) : local.ref = _el$;
1652
1649
  spread(_el$, mergeProps({
@@ -1656,7 +1653,7 @@ var TabsList = (props) => {
1656
1653
  }, rest), false, true);
1657
1654
  insert(_el$, () => local.children);
1658
1655
  return _el$;
1659
- })(), _tmpl$27()];
1656
+ })(), _tmpl$26()];
1660
1657
  };
1661
1658
  var useKeyboardNavigation = ({
1662
1659
  activeTab,
@@ -1707,7 +1704,7 @@ var useKeyboardNavigation = ({
1707
1704
  };
1708
1705
 
1709
1706
  // src/ui/components/primitives/Tabs/TabsRoot.tsx
1710
- var _tmpl$28 = /* @__PURE__ */ template(`<div>`);
1707
+ var _tmpl$27 = /* @__PURE__ */ template(`<div>`);
1711
1708
  var TabsContext = createContext(void 0);
1712
1709
  var useTabsContext = () => {
1713
1710
  const context = useContext(TabsContext);
@@ -1746,7 +1743,7 @@ var TabsRoot = (props) => {
1746
1743
  setVisibleTabs
1747
1744
  },
1748
1745
  get children() {
1749
- var _el$ = _tmpl$28();
1746
+ var _el$ = _tmpl$27();
1750
1747
  use(setTabsContainer, _el$);
1751
1748
  spread(_el$, mergeProps({
1752
1749
  get ["class"]() {
@@ -1760,7 +1757,7 @@ var TabsRoot = (props) => {
1760
1757
  };
1761
1758
 
1762
1759
  // src/ui/components/primitives/Tabs/TabsContent.tsx
1763
- var _tmpl$29 = /* @__PURE__ */ template(`<div role=tabpanel>`);
1760
+ var _tmpl$28 = /* @__PURE__ */ template(`<div role=tabpanel>`);
1764
1761
  var TabsContent = (props) => {
1765
1762
  const [local, rest] = splitProps(props, ["value", "class", "appearanceKey", "children"]);
1766
1763
  const style = useStyle();
@@ -1772,7 +1769,7 @@ var TabsContent = (props) => {
1772
1769
  return activeTab() === local.value;
1773
1770
  },
1774
1771
  get children() {
1775
- var _el$ = _tmpl$29();
1772
+ var _el$ = _tmpl$28();
1776
1773
  spread(_el$, mergeProps({
1777
1774
  get ["class"]() {
1778
1775
  return memo(() => !!local.class)() ? local.class : style(local.appearanceKey || "tabsContent", activeTab() === local.value ? "nt-block" : "nt-hidden");
@@ -1859,7 +1856,7 @@ var inboxFilterLocalizationKeys = {
1859
1856
  unread: "inbox.filters.labels.unread",
1860
1857
  archived: "inbox.filters.labels.archived"
1861
1858
  };
1862
- var _tmpl$30 = /* @__PURE__ */ template(`<span><span></span><span>`);
1859
+ var _tmpl$29 = /* @__PURE__ */ template(`<span><span></span><span>`);
1863
1860
  var _tmpl$210 = /* @__PURE__ */ template(`<span>`);
1864
1861
  var cases = [{
1865
1862
  status: "unreadRead" /* UNREAD_READ */,
@@ -1904,7 +1901,7 @@ var StatusItem = (props) => {
1904
1901
  },
1905
1902
  get children() {
1906
1903
  return [(() => {
1907
- var _el$ = _tmpl$30(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
1904
+ var _el$ = _tmpl$29(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
1908
1905
  insert(_el$2, () => props.icon());
1909
1906
  insert(_el$3, () => t(props.localizationKey));
1910
1907
  effect((_p$) => {
@@ -1937,7 +1934,7 @@ var StatusItem = (props) => {
1937
1934
  };
1938
1935
 
1939
1936
  // src/ui/components/elements/InboxStatus/InboxStatusDropdown.tsx
1940
- var _tmpl$31 = /* @__PURE__ */ template(`<span>`);
1937
+ var _tmpl$30 = /* @__PURE__ */ template(`<span>`);
1941
1938
  var StatusDropdown = () => {
1942
1939
  const style = useStyle();
1943
1940
  const {
@@ -1962,7 +1959,7 @@ var StatusDropdown = () => {
1962
1959
  }, triggerProps, {
1963
1960
  get children() {
1964
1961
  return [(() => {
1965
- var _el$ = _tmpl$31();
1962
+ var _el$ = _tmpl$30();
1966
1963
  insert(_el$, () => t(inboxFilterLocalizationKeys[status()]));
1967
1964
  effect((_p$) => {
1968
1965
  var _v$ = inboxFilterLocalizationKeys[status()], _v$2 = style("inboxStatus__title", "nt-text-xl nt-font-semibold");
@@ -1975,7 +1972,7 @@ var StatusDropdown = () => {
1975
1972
  });
1976
1973
  return _el$;
1977
1974
  })(), (() => {
1978
- var _el$2 = _tmpl$31();
1975
+ var _el$2 = _tmpl$30();
1979
1976
  insert(_el$2, createComponent(ArrowDropDown, {}));
1980
1977
  effect(() => className(_el$2, style("inboxStatus__dropdownItemRight__icon", "nt-text-foreground-alpha-600")));
1981
1978
  return _el$2;
@@ -2103,7 +2100,7 @@ var useArchiveAllRead = (props) => {
2103
2100
  };
2104
2101
 
2105
2102
  // src/ui/components/elements/Header/MoreActionsOptions.tsx
2106
- var _tmpl$32 = /* @__PURE__ */ template(`<span>`);
2103
+ var _tmpl$31 = /* @__PURE__ */ template(`<span>`);
2107
2104
  var MoreActionsOptions = () => {
2108
2105
  const {
2109
2106
  filter
@@ -2151,12 +2148,12 @@ var ActionsItem = (props) => {
2151
2148
  },
2152
2149
  get children() {
2153
2150
  return [(() => {
2154
- var _el$ = _tmpl$32();
2151
+ var _el$ = _tmpl$31();
2155
2152
  insert(_el$, () => props.icon());
2156
2153
  effect(() => className(_el$, style("moreActions__dropdownItemLeft__icon", "nt-text-foreground-alpha-600")));
2157
2154
  return _el$;
2158
2155
  })(), (() => {
2159
- var _el$2 = _tmpl$32();
2156
+ var _el$2 = _tmpl$31();
2160
2157
  insert(_el$2, () => t(props.localizationKey));
2161
2158
  effect((_p$) => {
2162
2159
  var _v$ = props.localizationKey, _v$2 = style("moreActions__dropdownItemLabel");
@@ -2215,11 +2212,11 @@ var MoreActionsDropdown = () => {
2215
2212
  };
2216
2213
 
2217
2214
  // src/ui/components/elements/Header/ActionsContainer.tsx
2218
- var _tmpl$33 = /* @__PURE__ */ template(`<div>`);
2215
+ var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
2219
2216
  var ActionsContainer = (props) => {
2220
2217
  const style = useStyle();
2221
2218
  return (() => {
2222
- var _el$ = _tmpl$33();
2219
+ var _el$ = _tmpl$32();
2223
2220
  insert(_el$, createComponent(MoreActionsDropdown, {}), null);
2224
2221
  insert(_el$, createComponent(Show, {
2225
2222
  get when() {
@@ -2243,11 +2240,11 @@ var ActionsContainer = (props) => {
2243
2240
  };
2244
2241
 
2245
2242
  // src/ui/components/elements/Header/Header.tsx
2246
- var _tmpl$34 = /* @__PURE__ */ template(`<div>`);
2243
+ var _tmpl$33 = /* @__PURE__ */ template(`<div>`);
2247
2244
  var Header = (props) => {
2248
2245
  const style = useStyle();
2249
2246
  return (() => {
2250
- var _el$ = _tmpl$34();
2247
+ var _el$ = _tmpl$33();
2251
2248
  insert(_el$, createComponent(StatusDropdown, {}), null);
2252
2249
  insert(_el$, createComponent(ActionsContainer, {
2253
2250
  get showPreferences() {
@@ -2258,7 +2255,7 @@ var Header = (props) => {
2258
2255
  return _el$;
2259
2256
  })();
2260
2257
  };
2261
- var _tmpl$35 = /* @__PURE__ */ template(`<div><div data-localization=preferences.title>`);
2258
+ var _tmpl$34 = /* @__PURE__ */ template(`<div><div data-localization=preferences.title>`);
2262
2259
  var _tmpl$211 = /* @__PURE__ */ template(`<button>`);
2263
2260
  var PreferencesHeader = (props) => {
2264
2261
  const style = useStyle();
@@ -2266,7 +2263,7 @@ var PreferencesHeader = (props) => {
2266
2263
  t
2267
2264
  } = useLocalization();
2268
2265
  return (() => {
2269
- var _el$ = _tmpl$35(), _el$2 = _el$.firstChild;
2266
+ var _el$ = _tmpl$34(), _el$2 = _el$.firstChild;
2270
2267
  insert(_el$, createComponent(Show, {
2271
2268
  get when() {
2272
2269
  return props.navigateToNotifications;
@@ -2293,15 +2290,23 @@ var PreferencesHeader = (props) => {
2293
2290
  })();
2294
2291
  };
2295
2292
  delegateEvents(["click"]);
2296
- var _tmpl$36 = /* @__PURE__ */ template(`<div>`);
2293
+ var _tmpl$35 = /* @__PURE__ */ template(`<div>`);
2297
2294
  var Root = (props) => {
2298
2295
  const [_, rest] = splitProps(props, ["class"]);
2299
2296
  const {
2300
2297
  id
2301
2298
  } = useAppearance();
2302
2299
  const style = useStyle();
2303
- return (() => {
2304
- var _el$ = _tmpl$36();
2300
+ const {
2301
+ hideBranding
2302
+ } = useInboxContext();
2303
+ return [createComponent(Show, {
2304
+ get when() {
2305
+ return !hideBranding();
2306
+ },
2307
+ children: new Comment(" Powered by Novu - https://novu.co ")
2308
+ }), (() => {
2309
+ var _el$ = _tmpl$35();
2305
2310
  spread(_el$, mergeProps({
2306
2311
  get id() {
2307
2312
  return `novu-root-${id()}`;
@@ -2311,202 +2316,26 @@ var Root = (props) => {
2311
2316
  }
2312
2317
  }, rest), false, false);
2313
2318
  return _el$;
2314
- })();
2319
+ })()];
2315
2320
  };
2316
- var TooltipContext = createContext(void 0);
2317
- function TooltipRoot(props) {
2318
- const [reference, setReference] = createSignal(null);
2319
- const [floating, setFloating] = createSignal(null);
2320
- const position = useFloating(reference, floating, {
2321
- placement: props.placement || "top",
2322
- whileElementsMounted: autoUpdate,
2323
- middleware: [offset(10), flip({
2324
- fallbackPlacements: props.fallbackPlacements || ["bottom"]
2325
- }), shift()]
2326
- });
2327
- const [isOpen, setIsOpen] = useUncontrolledState({
2328
- value: props.open,
2329
- fallbackValue: false
2330
- });
2331
- return createComponent(TooltipContext.Provider, {
2332
- value: {
2333
- reference,
2334
- setReference,
2335
- floating,
2336
- setFloating,
2337
- open: isOpen,
2338
- setOpen: setIsOpen,
2339
- floatingStyles: () => {
2340
- var _a, _b;
2341
- return {
2342
- position: position.strategy,
2343
- top: `${(_a = position.y) != null ? _a : 0}px`,
2344
- left: `${(_b = position.x) != null ? _b : 0}px`
2345
- };
2346
- }
2347
- },
2348
- get children() {
2349
- return props.children;
2350
- }
2351
- });
2352
- }
2353
- function useTooltip() {
2354
- const context = useContext(TooltipContext);
2355
- if (!context) {
2356
- throw new Error("useTooltip must be used within Tooltip.Root component");
2357
- }
2358
- return context;
2359
- }
2360
-
2361
- // src/ui/components/primitives/Tooltip/TooltipContent.tsx
2362
- var _tmpl$37 = /* @__PURE__ */ template(`<div>`);
2363
- var tooltipContentVariants = () => "nt-bg-foreground nt-p-2 nt-shadow-tooltip nt-rounded-lg nt-text-background nt-text-xs";
2364
- var TooltipContentBody = (props) => {
2365
- const {
2366
- open,
2367
- setFloating,
2368
- floating,
2369
- floatingStyles
2370
- } = useTooltip();
2371
- const {
2372
- setActive,
2373
- removeActive
2374
- } = useFocusManager();
2375
- const [local, rest] = splitProps(props, ["class", "appearanceKey", "style"]);
2376
- const style = useStyle();
2377
- onMount(() => {
2378
- const floatingEl = floating();
2379
- setActive(floatingEl);
2380
- onCleanup(() => {
2381
- removeActive(floatingEl);
2382
- });
2383
- });
2384
- return (() => {
2385
- var _el$ = _tmpl$37();
2386
- use(setFloating, _el$);
2387
- spread(_el$, mergeProps({
2388
- get ["class"]() {
2389
- return memo(() => !!local.class)() ? local.class : style(local.appearanceKey || "tooltipContent", tooltipContentVariants());
2390
- },
2391
- get style() {
2392
- return __spreadProps(__spreadValues({}, floatingStyles()), {
2393
- "z-index": 99999
2394
- });
2395
- },
2396
- get ["data-open"]() {
2397
- return open();
2398
- }
2399
- }, rest), false, false);
2400
- return _el$;
2401
- })();
2402
- };
2403
- var TooltipContent = (props) => {
2404
- const {
2405
- open
2406
- } = useTooltip();
2407
- return createComponent(Show, {
2408
- get when() {
2409
- return open();
2410
- },
2411
- get children() {
2412
- return createComponent(Portal, {
2413
- get children() {
2414
- return createComponent(Root, {
2415
- get children() {
2416
- return createComponent(TooltipContentBody, props);
2417
- }
2418
- });
2419
- }
2420
- });
2421
- }
2422
- });
2423
- };
2424
- var _tmpl$38 = /* @__PURE__ */ template(`<button>`);
2425
- var TooltipTrigger = (props) => {
2426
- const {
2427
- setReference,
2428
- setOpen
2429
- } = useTooltip();
2430
- const style = useStyle();
2431
- const [local, rest] = splitProps(props, ["appearanceKey", "asChild", "onClick"]);
2432
- if (local.asChild) {
2433
- return createComponent(Dynamic, mergeProps({
2434
- get component() {
2435
- return local.asChild;
2436
- },
2437
- ref: setReference,
2438
- onMouseEnter: () => {
2439
- setOpen(true);
2440
- },
2441
- onMouseLeave: () => {
2442
- setOpen(false);
2443
- }
2444
- }, rest));
2445
- }
2446
- return (() => {
2447
- var _el$ = _tmpl$38();
2448
- _el$.addEventListener("mouseleave", () => {
2449
- setOpen(false);
2450
- });
2451
- _el$.addEventListener("mouseenter", () => {
2452
- setOpen(true);
2453
- });
2454
- use(setReference, _el$);
2455
- spread(_el$, mergeProps({
2456
- get ["class"]() {
2457
- return style(local.appearanceKey || "tooltipTrigger");
2458
- }
2459
- }, rest), false, true);
2460
- insert(_el$, () => props.children);
2461
- return _el$;
2462
- })();
2463
- };
2464
-
2465
- // src/ui/components/primitives/Tooltip/index.ts
2466
- var Tooltip = {
2467
- Root: TooltipRoot,
2468
- /**
2469
- * Tooltip.Trigger renders a `button` and has no default styling.
2470
- */
2471
- Trigger: TooltipTrigger,
2472
- /**
2473
- * Tooltip.Content renders a `div` and has popover specific styling.
2474
- */
2475
- Content: TooltipContent
2476
- };
2477
- var _tmpl$39 = /* @__PURE__ */ template(`<label><input type=checkbox class="nt-peer nt-sr-only"><div>`);
2321
+ var _tmpl$36 = /* @__PURE__ */ template(`<label><input type=checkbox class="nt-peer nt-sr-only"><div>`);
2478
2322
  var Switch = (props) => {
2479
2323
  const style = useStyle();
2480
2324
  return (() => {
2481
- var _el$ = _tmpl$39(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2325
+ var _el$ = _tmpl$36(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2482
2326
  _el$2.addEventListener("change", (e) => {
2483
2327
  props.onChange(e.target.checked);
2484
2328
  });
2485
2329
  effect((_p$) => {
2486
- var _v$ = style("channelSwitch", `nt-relative
2487
- nt-inline-flex nt-cursor-pointer nt-items-center data-[disabled=true]:nt-cursor-not-allowed`), _v$2 = props.disabled, _v$3 = props.disabled, _v$4 = style("channelSwitchThumb", `nt-peer nt-h-6 nt-w-11 nt-rounded-full nt-border nt-border-neutral-alpha-200 peer-checked:nt-border-neutral-alpha-400 nt-bg-neutral-alpha-300
2488
- after:nt-absolute after:nt-left-[2px] after:nt-top-0.5 after:nt-h-5
2489
- after:nt-w-5 after:nt-rounded-full after:nt-border
2490
- after:nt-border-neutral-alpha-400
2491
- after:nt-bg-background after:nt-transition-all after:nt-content-['']
2492
- peer-checked:nt-bg-primary peer-checked:after:nt-translate-x-full
2493
- peer-checked:after:nt-border-background
2494
- nt-transition-all nt-duration-200 after:nt-duration-200
2495
- data-[disabled=true]:nt-opacity-40`), _v$5 = props.disabled, _v$6 = props.checked;
2330
+ var _v$ = style("channelSwitch", `nt-relative nt-inline-flex nt-cursor-pointer nt-items-center`), _v$2 = style("channelSwitchThumb", `nt-peer nt-h-6 nt-w-11 nt-rounded-full nt-border nt-border-neutral-alpha-200 peer-checked:nt-border-neutral-alpha-400 nt-bg-neutral-alpha-300 after:nt-absolute after:nt-left-[2px] after:nt-top-0.5 after:nt-h-5 after:nt-w-5 after:nt-rounded-full after:nt-border after:nt-border-neutral-alpha-400 after:nt-bg-background after:nt-transition-all after:nt-content-[''] peer-checked:nt-bg-primary peer-checked:after:nt-translate-x-full peer-checked:after:nt-border-background nt-transition-all nt-duration-200 after:nt-duration-200`), _v$3 = props.checked;
2496
2331
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
2497
- _v$2 !== _p$.t && setAttribute(_el$, "data-disabled", _p$.t = _v$2);
2498
- _v$3 !== _p$.a && (_el$2.disabled = _p$.a = _v$3);
2499
- _v$4 !== _p$.o && className(_el$3, _p$.o = _v$4);
2500
- _v$5 !== _p$.i && setAttribute(_el$3, "data-disabled", _p$.i = _v$5);
2501
- _v$6 !== _p$.n && setAttribute(_el$3, "data-checked", _p$.n = _v$6);
2332
+ _v$2 !== _p$.t && className(_el$3, _p$.t = _v$2);
2333
+ _v$3 !== _p$.a && setAttribute(_el$3, "data-checked", _p$.a = _v$3);
2502
2334
  return _p$;
2503
2335
  }, {
2504
2336
  e: void 0,
2505
2337
  t: void 0,
2506
- a: void 0,
2507
- o: void 0,
2508
- i: void 0,
2509
- n: void 0
2338
+ a: void 0
2510
2339
  });
2511
2340
  effect(() => _el$2.checked = props.checked);
2512
2341
  return _el$;
@@ -2514,13 +2343,10 @@ var Switch = (props) => {
2514
2343
  };
2515
2344
 
2516
2345
  // src/ui/components/elements/Preferences/ChannelRow.tsx
2517
- var _tmpl$40 = /* @__PURE__ */ template(`<div><div><div></div><span></span></div><div>`);
2346
+ var _tmpl$37 = /* @__PURE__ */ template(`<div><div><div></div><span></span></div><div>`);
2518
2347
  var ChannelRow = (props) => {
2519
2348
  const style = useStyle();
2520
2349
  const updatePreference = (enabled) => __async(void 0, null, function* () {
2521
- if (props.isCritical) {
2522
- return;
2523
- }
2524
2350
  props.onChange({
2525
2351
  channel: props.channel,
2526
2352
  enabled,
@@ -2531,7 +2357,7 @@ var ChannelRow = (props) => {
2531
2357
  updatePreference(checked);
2532
2358
  };
2533
2359
  return (() => {
2534
- var _el$ = _tmpl$40(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
2360
+ var _el$ = _tmpl$37(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
2535
2361
  insert(_el$3, createComponent(ChannelIcon, {
2536
2362
  get channel() {
2537
2363
  return props.channel;
@@ -2542,25 +2368,20 @@ var ChannelRow = (props) => {
2542
2368
  get checked() {
2543
2369
  return props.enabled;
2544
2370
  },
2545
- onChange: (checked) => onChange(checked),
2546
- get disabled() {
2547
- return props.isCritical;
2548
- }
2371
+ onChange: (checked) => onChange(checked)
2549
2372
  }));
2550
2373
  effect((_p$) => {
2551
- var _v$ = style("channelContainer", "nt-flex nt-justify-between nt-items-center nt-h-11 nt-gap-2 data-[disabled=true]:nt-text-foreground-alpha-600"), _v$2 = props.isCritical, _v$3 = style("channelLabelContainer", "nt-flex nt-items-center nt-gap-2"), _v$4 = style("channelLabel", "nt-text-base nt-font-semibold"), _v$5 = style("channelSwitchContainer", "nt-flex nt-items-center");
2374
+ var _v$ = style("channelContainer", "nt-flex nt-justify-between nt-items-center nt-h-11 nt-gap-2 data-[disabled=true]:nt-text-foreground-alpha-600"), _v$2 = style("channelLabelContainer", "nt-flex nt-items-center nt-gap-2"), _v$3 = style("channelLabel", "nt-text-base nt-font-semibold"), _v$4 = style("channelSwitchContainer", "nt-flex nt-items-center");
2552
2375
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
2553
- _v$2 !== _p$.t && setAttribute(_el$, "data-disabled", _p$.t = _v$2);
2554
- _v$3 !== _p$.a && className(_el$2, _p$.a = _v$3);
2555
- _v$4 !== _p$.o && className(_el$4, _p$.o = _v$4);
2556
- _v$5 !== _p$.i && className(_el$5, _p$.i = _v$5);
2376
+ _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
2377
+ _v$3 !== _p$.a && className(_el$4, _p$.a = _v$3);
2378
+ _v$4 !== _p$.o && className(_el$5, _p$.o = _v$4);
2557
2379
  return _p$;
2558
2380
  }, {
2559
2381
  e: void 0,
2560
2382
  t: void 0,
2561
2383
  a: void 0,
2562
- o: void 0,
2563
- i: void 0
2384
+ o: void 0
2564
2385
  });
2565
2386
  return _el$;
2566
2387
  })();
@@ -2597,11 +2418,11 @@ var getLabel = (channel) => {
2597
2418
  return "";
2598
2419
  }
2599
2420
  };
2600
- var _tmpl$41 = /* @__PURE__ */ template(`<div>`);
2421
+ var _tmpl$38 = /* @__PURE__ */ template(`<div>`);
2601
2422
  var SkeletonText = (props) => {
2602
2423
  const style = useStyle();
2603
2424
  return (() => {
2604
- var _el$ = _tmpl$41();
2425
+ var _el$ = _tmpl$38();
2605
2426
  effect(() => className(_el$, style(props.appearanceKey, cn("nt-w-full nt-h-3 nt-rounded nt-bg-foreground-alpha-100", props.class))));
2606
2427
  return _el$;
2607
2428
  })();
@@ -2609,14 +2430,14 @@ var SkeletonText = (props) => {
2609
2430
  var SkeletonAvatar = (props) => {
2610
2431
  const style = useStyle();
2611
2432
  return (() => {
2612
- var _el$2 = _tmpl$41();
2433
+ var _el$2 = _tmpl$38();
2613
2434
  effect(() => className(_el$2, style(props.appearanceKey, cn("nt-size-8 nt-rounded-lg nt-bg-foreground-alpha-100", props.class))));
2614
2435
  return _el$2;
2615
2436
  })();
2616
2437
  };
2617
2438
 
2618
2439
  // src/ui/components/elements/Preferences/LoadingScreen.tsx
2619
- var _tmpl$42 = /* @__PURE__ */ template(`<div><div class="nt-flex nt-flex-col nt-self-stretch nt-gap-1 nt-flex-1"></div><div>`);
2440
+ var _tmpl$39 = /* @__PURE__ */ template(`<div><div class="nt-flex nt-flex-col nt-self-stretch nt-gap-1 nt-flex-1"></div><div>`);
2620
2441
  var LoadingScreen = () => {
2621
2442
  return createComponent(For, {
2622
2443
  get each() {
@@ -2630,7 +2451,7 @@ var LoadingScreen = () => {
2630
2451
  var LoadingSkeleton = () => {
2631
2452
  const style = useStyle();
2632
2453
  return (() => {
2633
- var _el$ = _tmpl$42(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2454
+ var _el$ = _tmpl$39(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2634
2455
  insert(_el$2, createComponent(SkeletonText, {
2635
2456
  appearanceKey: "skeletonText",
2636
2457
  "class": "nt-w-1/3"
@@ -2646,10 +2467,9 @@ var LoadingSkeleton = () => {
2646
2467
  };
2647
2468
 
2648
2469
  // src/ui/components/elements/Preferences/Preferences.tsx
2649
- var _tmpl$43 = /* @__PURE__ */ template(`<div>`);
2470
+ var _tmpl$40 = /* @__PURE__ */ template(`<div>`);
2650
2471
  var _tmpl$212 = /* @__PURE__ */ template(`<span>`);
2651
- var _tmpl$310 = /* @__PURE__ */ template(`<span data-localization=preferences.workflow.disabled.notice>`);
2652
- var _tmpl$44 = /* @__PURE__ */ template(`<div><div><div><div></div></div><span>`);
2472
+ var _tmpl$310 = /* @__PURE__ */ template(`<div><div><div><div></div></div><span>`);
2653
2473
  var Preferences = () => {
2654
2474
  var _a;
2655
2475
  const style = useStyle();
@@ -2696,7 +2516,7 @@ var Preferences = () => {
2696
2516
  });
2697
2517
  };
2698
2518
  return (() => {
2699
- var _el$ = _tmpl$43();
2519
+ var _el$ = _tmpl$40();
2700
2520
  insert(_el$, createComponent(Show, {
2701
2521
  get when() {
2702
2522
  return loading();
@@ -2744,10 +2564,6 @@ var Preferences = () => {
2744
2564
  },
2745
2565
  get onChange() {
2746
2566
  return optimisticUpdate(preference());
2747
- },
2748
- get isCritical() {
2749
- var _a2;
2750
- return (_a2 = preference().workflow) == null ? void 0 : _a2.critical;
2751
2567
  }
2752
2568
  });
2753
2569
  }
@@ -2778,7 +2594,7 @@ var ChannelsLabel = (props) => {
2778
2594
  return channels.map((c, index) => [c, memo(() => index < channels.length - 1 && ", ")]);
2779
2595
  };
2780
2596
  return (() => {
2781
- var _el$3 = _tmpl$43();
2597
+ var _el$3 = _tmpl$40();
2782
2598
  insert(_el$3, channelNames);
2783
2599
  effect(() => className(_el$3, style("channelDescription", "nt-text-sm nt-text-foreground-alpha-600 nt-text-start")));
2784
2600
  return _el$3;
@@ -2796,37 +2612,9 @@ var PreferencesRow = (props) => {
2796
2612
  return channels().length > 0;
2797
2613
  },
2798
2614
  get children() {
2799
- var _el$4 = _tmpl$44(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$6.nextSibling;
2615
+ var _el$4 = _tmpl$310(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$6.nextSibling;
2800
2616
  _el$5.$$click = () => setIsOpen((prev) => !prev);
2801
- insert(_el$7, createComponent(Show, {
2802
- get when() {
2803
- return props.isCritical;
2804
- },
2805
- get children() {
2806
- return createComponent(Tooltip.Root, {
2807
- get children() {
2808
- return [createComponent(Tooltip.Trigger, {
2809
- asChild: (childProps) => (() => {
2810
- var _el$11 = _tmpl$212();
2811
- spread(_el$11, mergeProps({
2812
- get ["class"]() {
2813
- return style("workflowLabelDisabled__icon", "nt-text-foreground-alpha-600");
2814
- }
2815
- }, childProps), false, true);
2816
- insert(_el$11, createComponent(Lock, {}));
2817
- return _el$11;
2818
- })()
2819
- }), createComponent(Tooltip.Content, {
2820
- "data-localization": "preferences.workflow.disabled.tooltip",
2821
- get children() {
2822
- return t("preferences.workflow.disabled.tooltip");
2823
- }
2824
- })];
2825
- }
2826
- });
2827
- }
2828
- }), null);
2829
- insert(_el$7, () => t(props.localizationKey), null);
2617
+ insert(_el$7, () => t(props.localizationKey));
2830
2618
  insert(_el$6, createComponent(ChannelsLabel, {
2831
2619
  get channels() {
2832
2620
  return props.channels;
@@ -2860,18 +2648,7 @@ var PreferencesRow = (props) => {
2860
2648
  return style("channelsContainerCollapsible", "nt-grid nt-self-stretch");
2861
2649
  },
2862
2650
  get children() {
2863
- var _el$9 = _tmpl$43();
2864
- insert(_el$9, createComponent(Show, {
2865
- get when() {
2866
- return props.isCritical;
2867
- },
2868
- get children() {
2869
- var _el$10 = _tmpl$310();
2870
- insert(_el$10, () => t("preferences.workflow.disabled.notice"));
2871
- effect(() => className(_el$10, style("workflowContainerDisabledNotice", "nt-text-sm nt-text-foreground-alpha-600 nt-text-start")));
2872
- return _el$10;
2873
- }
2874
- }), null);
2651
+ var _el$9 = _tmpl$40();
2875
2652
  insert(_el$9, createComponent(For, {
2876
2653
  get each() {
2877
2654
  return channels();
@@ -2886,12 +2663,9 @@ var PreferencesRow = (props) => {
2886
2663
  },
2887
2664
  get onChange() {
2888
2665
  return props.onChange;
2889
- },
2890
- get isCritical() {
2891
- return props.isCritical;
2892
2666
  }
2893
2667
  })
2894
- }), null);
2668
+ }));
2895
2669
  effect(() => className(_el$9, style("channelsContainer", "nt-overflow-hidden nt-flex-col nt-gap-1")));
2896
2670
  return _el$9;
2897
2671
  }
@@ -2901,21 +2675,16 @@ var PreferencesRow = (props) => {
2901
2675
  }
2902
2676
  }), null);
2903
2677
  effect((_p$) => {
2904
- var _v$ = style("workflowContainer", `nt-p-4 nt-flex nt-flex-col nt-gap-1 nt-items-start nt-self-stretch
2905
- hover:nt-bg-neutral-alpha-50 nt-rounded-lg data-[disabled=true]:nt-bg-neutral-alpha-50`), _v$2 = props.isCritical, _v$3 = isOpen(), _v$4 = style("workflowLabelContainer", "nt-flex nt-justify-between nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center"), _v$5 = props.isCritical, _v$6 = isOpen(), _v$7 = style("workflowLabel", "nt-text-base nt-font-semibold nt-text-start nt-flex nt-items-center nt-gap-1"), _v$8 = props.isCritical, _v$9 = props.localizationKey, _v$10 = isOpen(), _v$11 = style("workflowContainerRight__icon", `nt-text-foreground-alpha-600 nt-transition-all nt-duration-200 data-[open=true]:nt-transform data-[open=true]:nt-rotate-180`), _v$12 = props.isCritical, _v$13 = isOpen();
2678
+ var _v$ = style("workflowContainer", `nt-p-4 nt-flex nt-flex-col nt-gap-1 nt-items-start nt-self-stretch hover:nt-bg-neutral-alpha-50 nt-rounded-lg data-[disabled=true]:nt-bg-neutral-alpha-50`), _v$2 = isOpen(), _v$3 = style("workflowLabelContainer", "nt-flex nt-justify-between nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center"), _v$4 = isOpen(), _v$5 = style("workflowLabel", "nt-text-base nt-font-semibold nt-text-start nt-flex nt-items-center nt-gap-1"), _v$6 = props.localizationKey, _v$7 = isOpen(), _v$8 = style("workflowContainerRight__icon", `nt-text-foreground-alpha-600 nt-transition-all nt-duration-200 data-[open=true]:nt-transform data-[open=true]:nt-rotate-180`), _v$9 = isOpen();
2906
2679
  _v$ !== _p$.e && className(_el$4, _p$.e = _v$);
2907
- _v$2 !== _p$.t && setAttribute(_el$4, "data-disabled", _p$.t = _v$2);
2908
- _v$3 !== _p$.a && setAttribute(_el$4, "data-open", _p$.a = _v$3);
2909
- _v$4 !== _p$.o && className(_el$5, _p$.o = _v$4);
2910
- _v$5 !== _p$.i && setAttribute(_el$5, "data-disabled", _p$.i = _v$5);
2911
- _v$6 !== _p$.n && setAttribute(_el$5, "data-open", _p$.n = _v$6);
2912
- _v$7 !== _p$.s && className(_el$7, _p$.s = _v$7);
2913
- _v$8 !== _p$.h && setAttribute(_el$7, "data-disabled", _p$.h = _v$8);
2914
- _v$9 !== _p$.r && setAttribute(_el$7, "data-localization", _p$.r = _v$9);
2915
- _v$10 !== _p$.d && setAttribute(_el$7, "data-open", _p$.d = _v$10);
2916
- _v$11 !== _p$.l && className(_el$8, _p$.l = _v$11);
2917
- _v$12 !== _p$.u && setAttribute(_el$8, "data-disabled", _p$.u = _v$12);
2918
- _v$13 !== _p$.c && setAttribute(_el$8, "data-open", _p$.c = _v$13);
2680
+ _v$2 !== _p$.t && setAttribute(_el$4, "data-open", _p$.t = _v$2);
2681
+ _v$3 !== _p$.a && className(_el$5, _p$.a = _v$3);
2682
+ _v$4 !== _p$.o && setAttribute(_el$5, "data-open", _p$.o = _v$4);
2683
+ _v$5 !== _p$.i && className(_el$7, _p$.i = _v$5);
2684
+ _v$6 !== _p$.n && setAttribute(_el$7, "data-localization", _p$.n = _v$6);
2685
+ _v$7 !== _p$.s && setAttribute(_el$7, "data-open", _p$.s = _v$7);
2686
+ _v$8 !== _p$.h && className(_el$8, _p$.h = _v$8);
2687
+ _v$9 !== _p$.r && setAttribute(_el$8, "data-open", _p$.r = _v$9);
2919
2688
  return _p$;
2920
2689
  }, {
2921
2690
  e: void 0,
@@ -2926,53 +2695,19 @@ var PreferencesRow = (props) => {
2926
2695
  n: void 0,
2927
2696
  s: void 0,
2928
2697
  h: void 0,
2929
- r: void 0,
2930
- d: void 0,
2931
- l: void 0,
2932
- u: void 0,
2933
- c: void 0
2698
+ r: void 0
2934
2699
  });
2935
2700
  return _el$4;
2936
2701
  }
2937
2702
  });
2938
2703
  };
2939
2704
  delegateEvents(["click"]);
2940
- var _tmpl$45 = /* @__PURE__ */ template(`<strong>`);
2705
+ var _tmpl$41 = /* @__PURE__ */ template(`<strong>`);
2941
2706
  var _tmpl$213 = /* @__PURE__ */ template(`<p>`);
2942
- var parseMarkdownIntoTokens = (text) => {
2943
- const tokens = [];
2944
- let buffer = "";
2945
- let inBold = false;
2946
- for (let i = 0; i < text.length; i += 1) {
2947
- if (text[i] === "\\" && text[i + 1] === "*") {
2948
- buffer += "*";
2949
- i += 1;
2950
- } else if (text[i] === "*" && text[i + 1] === "*") {
2951
- if (buffer) {
2952
- tokens.push({
2953
- type: inBold ? "bold" : "text",
2954
- content: buffer
2955
- });
2956
- buffer = "";
2957
- }
2958
- inBold = !inBold;
2959
- i += 1;
2960
- } else {
2961
- buffer += text[i];
2962
- }
2963
- }
2964
- if (buffer) {
2965
- tokens.push({
2966
- type: inBold ? "bold" : "text",
2967
- content: buffer
2968
- });
2969
- }
2970
- return tokens;
2971
- };
2972
2707
  var Bold = (props) => {
2973
2708
  const style = useStyle();
2974
2709
  return (() => {
2975
- var _el$ = _tmpl$45();
2710
+ var _el$ = _tmpl$41();
2976
2711
  insert(_el$, () => props.children);
2977
2712
  effect(() => className(_el$, style(props.appearanceKey || "strong", "nt-font-semibold")));
2978
2713
  return _el$;
@@ -3016,9 +2751,170 @@ var Markdown = (props) => {
3016
2751
  })();
3017
2752
  };
3018
2753
  var Markdown_default = Markdown;
2754
+ var TooltipContext = createContext(void 0);
2755
+ function TooltipRoot(props) {
2756
+ const [reference, setReference] = createSignal(null);
2757
+ const [floating, setFloating] = createSignal(null);
2758
+ const position = useFloating(reference, floating, {
2759
+ placement: props.placement || "top",
2760
+ whileElementsMounted: autoUpdate,
2761
+ middleware: [offset(10), flip({
2762
+ fallbackPlacements: props.fallbackPlacements || ["bottom"]
2763
+ }), shift()]
2764
+ });
2765
+ const [isOpen, setIsOpen] = useUncontrolledState({
2766
+ value: props.open,
2767
+ fallbackValue: false
2768
+ });
2769
+ return createComponent(TooltipContext.Provider, {
2770
+ value: {
2771
+ reference,
2772
+ setReference,
2773
+ floating,
2774
+ setFloating,
2775
+ open: isOpen,
2776
+ setOpen: setIsOpen,
2777
+ floatingStyles: () => {
2778
+ var _a, _b;
2779
+ return {
2780
+ position: position.strategy,
2781
+ top: `${(_a = position.y) != null ? _a : 0}px`,
2782
+ left: `${(_b = position.x) != null ? _b : 0}px`
2783
+ };
2784
+ }
2785
+ },
2786
+ get children() {
2787
+ return props.children;
2788
+ }
2789
+ });
2790
+ }
2791
+ function useTooltip() {
2792
+ const context = useContext(TooltipContext);
2793
+ if (!context) {
2794
+ throw new Error("useTooltip must be used within Tooltip.Root component");
2795
+ }
2796
+ return context;
2797
+ }
2798
+
2799
+ // src/ui/components/primitives/Tooltip/TooltipContent.tsx
2800
+ var _tmpl$42 = /* @__PURE__ */ template(`<div>`);
2801
+ var tooltipContentVariants = () => "nt-bg-foreground nt-p-2 nt-shadow-tooltip nt-rounded-lg nt-text-background nt-text-xs";
2802
+ var TooltipContentBody = (props) => {
2803
+ const {
2804
+ open,
2805
+ setFloating,
2806
+ floating,
2807
+ floatingStyles
2808
+ } = useTooltip();
2809
+ const {
2810
+ setActive,
2811
+ removeActive
2812
+ } = useFocusManager();
2813
+ const [local, rest] = splitProps(props, ["class", "appearanceKey", "style"]);
2814
+ const style = useStyle();
2815
+ onMount(() => {
2816
+ const floatingEl = floating();
2817
+ setActive(floatingEl);
2818
+ onCleanup(() => {
2819
+ removeActive(floatingEl);
2820
+ });
2821
+ });
2822
+ return (() => {
2823
+ var _el$ = _tmpl$42();
2824
+ use(setFloating, _el$);
2825
+ spread(_el$, mergeProps({
2826
+ get ["class"]() {
2827
+ return memo(() => !!local.class)() ? local.class : style(local.appearanceKey || "tooltipContent", tooltipContentVariants());
2828
+ },
2829
+ get style() {
2830
+ return __spreadProps(__spreadValues({}, floatingStyles()), {
2831
+ "z-index": 99999
2832
+ });
2833
+ },
2834
+ get ["data-open"]() {
2835
+ return open();
2836
+ }
2837
+ }, rest), false, false);
2838
+ return _el$;
2839
+ })();
2840
+ };
2841
+ var TooltipContent = (props) => {
2842
+ const {
2843
+ open
2844
+ } = useTooltip();
2845
+ return createComponent(Show, {
2846
+ get when() {
2847
+ return open();
2848
+ },
2849
+ get children() {
2850
+ return createComponent(Portal, {
2851
+ get children() {
2852
+ return createComponent(Root, {
2853
+ get children() {
2854
+ return createComponent(TooltipContentBody, props);
2855
+ }
2856
+ });
2857
+ }
2858
+ });
2859
+ }
2860
+ });
2861
+ };
2862
+ var _tmpl$43 = /* @__PURE__ */ template(`<button>`);
2863
+ var TooltipTrigger = (props) => {
2864
+ const {
2865
+ setReference,
2866
+ setOpen
2867
+ } = useTooltip();
2868
+ const style = useStyle();
2869
+ const [local, rest] = splitProps(props, ["appearanceKey", "asChild", "onClick"]);
2870
+ if (local.asChild) {
2871
+ return createComponent(Dynamic, mergeProps({
2872
+ get component() {
2873
+ return local.asChild;
2874
+ },
2875
+ ref: setReference,
2876
+ onMouseEnter: () => {
2877
+ setOpen(true);
2878
+ },
2879
+ onMouseLeave: () => {
2880
+ setOpen(false);
2881
+ }
2882
+ }, rest));
2883
+ }
2884
+ return (() => {
2885
+ var _el$ = _tmpl$43();
2886
+ _el$.addEventListener("mouseleave", () => {
2887
+ setOpen(false);
2888
+ });
2889
+ _el$.addEventListener("mouseenter", () => {
2890
+ setOpen(true);
2891
+ });
2892
+ use(setReference, _el$);
2893
+ spread(_el$, mergeProps({
2894
+ get ["class"]() {
2895
+ return style(local.appearanceKey || "tooltipTrigger");
2896
+ }
2897
+ }, rest), false, true);
2898
+ insert(_el$, () => props.children);
2899
+ return _el$;
2900
+ })();
2901
+ };
2902
+
2903
+ // src/ui/components/primitives/Tooltip/index.ts
2904
+ var Tooltip = {
2905
+ Root: TooltipRoot,
2906
+ /**
2907
+ * Tooltip.Trigger renders a `button` and has no default styling.
2908
+ */
2909
+ Trigger: TooltipTrigger,
2910
+ /**
2911
+ * Tooltip.Content renders a `div` and has popover specific styling.
2912
+ */
2913
+ Content: TooltipContent
2914
+ };
3019
2915
 
3020
2916
  // src/ui/components/Notification/DefaultNotification.tsx
3021
- var _tmpl$46 = /* @__PURE__ */ template(`<span>`);
2917
+ var _tmpl$44 = /* @__PURE__ */ template(`<span>`);
3022
2918
  var _tmpl$214 = /* @__PURE__ */ template(`<img>`);
3023
2919
  var _tmpl$311 = /* @__PURE__ */ template(`<a><div><div class="nt-relative nt-shrink-0 nt-float-right nt-ml-1 nt-pr-1.5"><p></p><div></div></div><div>`);
3024
2920
  var DefaultNotification = (props) => {
@@ -3076,7 +2972,7 @@ var DefaultNotification = (props) => {
3076
2972
  return !props.notification.isRead;
3077
2973
  },
3078
2974
  get children() {
3079
- var _el$2 = _tmpl$46();
2975
+ var _el$2 = _tmpl$44();
3080
2976
  effect(() => className(_el$2, style("notificationDot", "nt-absolute -nt-translate-x-[1.0625rem] nt-translate-y-1/2 nt-size-2.5 nt-bg-primary nt-rounded-full nt-border nt-border-neutral-alpha-200")));
3081
2977
  return _el$2;
3082
2978
  }
@@ -3122,7 +3018,7 @@ var DefaultNotification = (props) => {
3122
3018
  e.stopPropagation();
3123
3019
  props.notification.read();
3124
3020
  },
3125
- "class": "hover:nt-bg-neutral-alpha-50",
3021
+ "class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
3126
3022
  get children() {
3127
3023
  return createComponent(ReadAll, {});
3128
3024
  }
@@ -3149,7 +3045,7 @@ var DefaultNotification = (props) => {
3149
3045
  e.stopPropagation();
3150
3046
  props.notification.unread();
3151
3047
  },
3152
- "class": "hover:nt-bg-neutral-alpha-50",
3048
+ "class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
3153
3049
  get children() {
3154
3050
  return createComponent(Unread, {});
3155
3051
  }
@@ -3183,7 +3079,7 @@ var DefaultNotification = (props) => {
3183
3079
  e.stopPropagation();
3184
3080
  props.notification.archive();
3185
3081
  },
3186
- "class": "hover:nt-bg-neutral-alpha-50",
3082
+ "class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
3187
3083
  get children() {
3188
3084
  return createComponent(Archive, {});
3189
3085
  }
@@ -3210,7 +3106,7 @@ var DefaultNotification = (props) => {
3210
3106
  e.stopPropagation();
3211
3107
  props.notification.unarchive();
3212
3108
  },
3213
- "class": "hover:nt-bg-neutral-alpha-50",
3109
+ "class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
3214
3110
  get children() {
3215
3111
  return createComponent(Unarchive, {});
3216
3112
  }
@@ -3280,10 +3176,7 @@ var DefaultNotification = (props) => {
3280
3176
  var _a;
3281
3177
  var _v$3 = style("notification", cn("nt-w-full nt-text-sm hover:nt-bg-neutral-alpha-50 nt-group nt-relative nt-flex nt-py-4 nt-px-6 nt-gap-2", {
3282
3178
  "nt-cursor-pointer": !props.notification.isRead || !!((_a = props.notification.redirect) == null ? void 0 : _a.url)
3283
- })), _v$4 = style("notificationBody", "nt-overflow-hidden nt-w-full"), _v$5 = style("notificationDate", `nt-transition nt-duration-100 nt-ease-out nt-text-foreground-alpha-400 nt-shrink-0
3284
- nt-float-right nt-text-right group-hover:nt-opacity-0`), _v$6 = style("notificationDefaultActions", `nt-transition nt-duration-100 nt-ease-out nt-gap-2 nt-flex nt-shrink-0
3285
- nt-opacity-0 group-hover:nt-opacity-100 nt-justify-center nt-items-center
3286
- nt-absolute nt-top-0 nt-right-0 nt-bg-neutral-alpha-50 nt-py-0.5 nt-rounded`), _v$7 = style("notificationCustomActions", "nt-flex nt-flex-wrap nt-gap-4 nt-mt-4");
3179
+ })), _v$4 = style("notificationBody", "nt-overflow-hidden nt-w-full"), _v$5 = style("notificationDate", "nt-transition nt-duration-100 nt-ease-out nt-text-foreground-alpha-400 nt-shrink-0 nt-float-right nt-text-right group-hover:nt-opacity-0"), _v$6 = style("notificationDefaultActions", `nt-transition nt-duration-100 nt-ease-out nt-gap-2 nt-flex nt-shrink-0 nt-opacity-0 group-hover:nt-opacity-100 nt-justify-center nt-items-center nt-absolute nt-top-0 nt-right-0 nt-bg-neutral-alpha-50 nt-rounded-lg nt-backdrop-blur-md nt-p-0.5`), _v$7 = style("notificationCustomActions", "nt-flex nt-flex-wrap nt-gap-4 nt-mt-4");
3287
3180
  _v$3 !== _p$.e && className(_el$, _p$.e = _v$3);
3288
3181
  _v$4 !== _p$.t && className(_el$4, _p$.t = _v$4);
3289
3182
  _v$5 !== _p$.a && className(_el$6, _p$.a = _v$5);
@@ -3331,10 +3224,10 @@ var Notification = (props) => {
3331
3224
  }
3332
3225
  });
3333
3226
  };
3334
- var _tmpl$47 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=48 height=48 viewBox="0 0 48 48"fill=none><path fill=currentColor d="M35.2 21.62L32.38 18.8L39.5 11.7L42.32 14.52C42.1 14.58 35.2 21.62 35.2 21.62ZM26 6H22V16H26V6ZM12.8 21.62L15.62 18.8L8.52 11.68L5.68 14.52C5.9 14.58 12.8 21.62 12.8 21.62ZM40 28H33.16C31.62 31.52 28.08 34 24 34C19.92 34 16.38 31.52 14.84 28H8V38H40V28ZM40 24C42.2 24 44 25.8 44 28V38C44 40.2 42.2 42 40 42H8C5.8 42 4 40.2 4 38V28C4 25.8 5.8 24 8 24H18C18 27.32 20.68 30 24 30C27.32 30 30 27.32 30 24H40Z">`);
3227
+ var _tmpl$45 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=48 height=48 viewBox="0 0 48 48"fill=none><path fill=currentColor d="M35.2 21.62L32.38 18.8L39.5 11.7L42.32 14.52C42.1 14.58 35.2 21.62 35.2 21.62ZM26 6H22V16H26V6ZM12.8 21.62L15.62 18.8L8.52 11.68L5.68 14.52C5.9 14.58 12.8 21.62 12.8 21.62ZM40 28H33.16C31.62 31.52 28.08 34 24 34C19.92 34 16.38 31.52 14.84 28H8V38H40V28ZM40 24C42.2 24 44 25.8 44 28V38C44 40.2 42.2 42 40 42H8C5.8 42 4 40.2 4 38V28C4 25.8 5.8 24 8 24H18C18 27.32 20.68 30 24 30C27.32 30 30 27.32 30 24H40Z">`);
3335
3228
  function EmptyIcon(props) {
3336
3229
  return (() => {
3337
- var _el$ = _tmpl$47();
3230
+ var _el$ = _tmpl$45();
3338
3231
  spread(_el$, props, true, true);
3339
3232
  return _el$;
3340
3233
  })();
@@ -3365,10 +3258,10 @@ var NewMessagesCta = (props) => {
3365
3258
  }
3366
3259
  });
3367
3260
  };
3368
- var _tmpl$48 = /* @__PURE__ */ template(`<div class="nt-flex nt-gap-2 nt-px-6 nt-py-4 nt-w-full"><div class="nt-flex nt-flex-col nt-self-stretch nt-gap-3 nt-flex-1"><div class="nt-flex nt-gap-1"></div><div class="nt-flex nt-gap-1">`);
3261
+ var _tmpl$46 = /* @__PURE__ */ template(`<div class="nt-flex nt-gap-2 nt-px-6 nt-py-4 nt-w-full"><div class="nt-flex nt-flex-col nt-self-stretch nt-gap-3 nt-flex-1"><div class="nt-flex nt-gap-1"></div><div class="nt-flex nt-gap-1">`);
3369
3262
  var NotificationSkeleton = () => {
3370
3263
  return (() => {
3371
- var _el$ = _tmpl$48(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
3264
+ var _el$ = _tmpl$46(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
3372
3265
  insert(_el$, createComponent(SkeletonAvatar, {
3373
3266
  appearanceKey: "skeletonAvatar"
3374
3267
  }), _el$2);
@@ -3405,7 +3298,7 @@ var NotificationListSkeleton = (props) => {
3405
3298
  };
3406
3299
 
3407
3300
  // src/ui/components/Notification/NotificationList.tsx
3408
- var _tmpl$49 = /* @__PURE__ */ template(`<div><p data-localization=notifications.emptyNotice>`);
3301
+ var _tmpl$47 = /* @__PURE__ */ template(`<div><p data-localization=notifications.emptyNotice>`);
3409
3302
  var _tmpl$215 = /* @__PURE__ */ template(`<div>`);
3410
3303
  var _tmpl$312 = /* @__PURE__ */ template(`<div><div>`);
3411
3304
  var EmptyNotificationList = () => {
@@ -3414,7 +3307,7 @@ var EmptyNotificationList = () => {
3414
3307
  t
3415
3308
  } = useLocalization();
3416
3309
  return (() => {
3417
- var _el$ = _tmpl$49(), _el$2 = _el$.firstChild;
3310
+ var _el$ = _tmpl$47(), _el$2 = _el$.firstChild;
3418
3311
  insert(_el$, createComponent(EmptyIcon, {
3419
3312
  get ["class"]() {
3420
3313
  return style("notificationListEmptyNoticeIcon");
@@ -3561,13 +3454,13 @@ var NotificationList = (props) => {
3561
3454
  return _el$3;
3562
3455
  })();
3563
3456
  };
3564
- var _tmpl$50 = /* @__PURE__ */ template(`<span>`);
3457
+ var _tmpl$48 = /* @__PURE__ */ template(`<span>`);
3565
3458
  var getDisplayCount = (count) => count >= 100 ? "99+" : count;
3566
3459
  var InboxTabUnreadNotificationsCount = (props) => {
3567
3460
  const style = useStyle();
3568
3461
  const displayCount = createMemo(() => getDisplayCount(props.count));
3569
3462
  return (() => {
3570
- var _el$ = _tmpl$50();
3463
+ var _el$ = _tmpl$48();
3571
3464
  insert(_el$, displayCount);
3572
3465
  effect(() => className(_el$, style("notificationsTabsTriggerCount", "nt-rounded-full nt-bg-counter nt-px-[6px] nt-text-counter-foreground nt-text-sm")));
3573
3466
  return _el$;
@@ -3592,7 +3485,7 @@ var InboxTab = (props) => {
3592
3485
  },
3593
3486
  get children() {
3594
3487
  return [(() => {
3595
- var _el$2 = _tmpl$50();
3488
+ var _el$2 = _tmpl$48();
3596
3489
  insert(_el$2, () => props.label);
3597
3490
  effect(() => className(_el$2, style("notificationsTabsTriggerLabel", "nt-text-sm nt-font-medium")));
3598
3491
  return _el$2;
@@ -3627,7 +3520,7 @@ var InboxDropdownTab = (props) => {
3627
3520
  },
3628
3521
  get children() {
3629
3522
  return [(() => {
3630
- var _el$3 = _tmpl$50();
3523
+ var _el$3 = _tmpl$48();
3631
3524
  insert(_el$3, () => props.label);
3632
3525
  effect(() => className(_el$3, style("moreTabs__dropdownItemLabel", "nt-mr-auto")));
3633
3526
  return _el$3;
@@ -3827,7 +3720,7 @@ var InboxTabs = (props) => {
3827
3720
  };
3828
3721
 
3829
3722
  // src/ui/components/Inbox.tsx
3830
- var _tmpl$51 = /* @__PURE__ */ template(`<div>`);
3723
+ var _tmpl$49 = /* @__PURE__ */ template(`<div>`);
3831
3724
  var InboxPage = /* @__PURE__ */ function(InboxPage2) {
3832
3725
  InboxPage2["Notifications"] = "notifications";
3833
3726
  InboxPage2["Preferences"] = "preferences";
@@ -3849,7 +3742,7 @@ var InboxContent = (props) => {
3849
3742
  };
3850
3743
  });
3851
3744
  return (() => {
3852
- var _el$ = _tmpl$51();
3745
+ var _el$ = _tmpl$49();
3853
3746
  insert(_el$, createComponent(Switch$1, {
3854
3747
  get children() {
3855
3748
  return [createComponent(Match, {
@@ -4096,7 +3989,7 @@ var Renderer = (props) => {
4096
3989
  }
4097
3990
  });
4098
3991
  };
4099
- var version = "2.3.0";
3992
+ var version = "2.4.0";
4100
3993
  var cssHref = `https://cdn.jsdelivr.net/npm/@novu/js@${version}/dist/index.css`;
4101
3994
  var _dispose, _rootElement, _mountedElements, _setMountedElements, _appearance, _setAppearance, _localization, _setLocalization, _options, _setOptions, _tabs, _setTabs, _routerPush, _setRouterPush, _preferencesFilter, _setPreferencesFilter, _predefinedNovu, _NovuUI_instances, mountComponentRenderer_fn, updateComponentProps_fn;
4102
3995
  var NovuUI = class {