@novu/js 3.0.0 → 3.0.3

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,4 @@
1
- import { Novu, isSameFilter } from '../chunk-2RBV57OQ.mjs';
1
+ import { Novu, isSameFilter } from '../chunk-GCPLP2EW.mjs';
2
2
  import { parseMarkdownIntoTokens } from '../chunk-GPV65U5R.mjs';
3
3
  import { __privateAdd, __privateSet, __privateMethod, __privateGet, __spreadProps, __spreadValues, __objRest, __async } from '../chunk-STZMOEWR.mjs';
4
4
  import { delegateEvents, createComponent, mergeProps, render, Portal, spread, template, insert, memo, effect, className, use, setAttribute, Dynamic } from 'solid-js/web';
@@ -250,7 +250,8 @@ var defaultVariables = {
250
250
  colorNeutral: "#525252",
251
251
  colorShadow: "rgb(0,0,0)",
252
252
  fontSize: "1rem",
253
- borderRadius: "0.375rem"
253
+ borderRadius: "0.375rem",
254
+ colorStripes: "#FF9A68"
254
255
  };
255
256
 
256
257
  // src/ui/helpers/constants.ts
@@ -536,6 +537,7 @@ var parseVariables = (variables, id) => {
536
537
  generateDefaultColor({ color: variables.colorCounterForeground, key: "color-counter-foreground", id }),
537
538
  generateDefaultColor({ color: variables.colorShadow, key: "color-shadow", id }),
538
539
  generateDefaultColor({ color: variables.colorRing, key: "color-ring", id }),
540
+ generateDefaultColor({ color: variables.colorStripes, key: "color-stripes", id }),
539
541
  ...generateAlphaShadeRulesFromColor({ color: variables.colorBackground, key: "color-background-alpha", id }),
540
542
  ...generateAlphaShadeRulesFromColor({ color: variables.colorForeground, key: "color-foreground-alpha", id }),
541
543
  ...generateSolidShadeRulesFromColor({ color: variables.colorPrimary, key: "color-primary", id }),
@@ -795,14 +797,15 @@ var useWebSocketEvent = ({
795
797
  eventHandler: onMessage
796
798
  }) => {
797
799
  const novu = useNovu();
798
- const { postMessage } = useBrowserTabsChannel({ channelName: `nv.${webSocketEvent}`, onMessage });
800
+ const channelName = `nv_ws_connection:a=${novu.applicationIdentifier}:s=${novu.subscriberId}`;
801
+ const { postMessage } = useBrowserTabsChannel({ channelName, onMessage });
799
802
  const updateReadCount = (data) => {
800
803
  onMessage(data);
801
804
  postMessage(data);
802
805
  };
803
806
  onMount(() => {
804
807
  let cleanup;
805
- const resolveLock = requestLock(`nv.${webSocketEvent}`, () => {
808
+ const resolveLock = requestLock(channelName, () => {
806
809
  cleanup = novu.on(webSocketEvent, updateReadCount);
807
810
  });
808
811
  onCleanup(() => {
@@ -837,6 +840,7 @@ var InboxProvider = (props) => {
837
840
  tags: props.tabs.length > 0 ? getTagsFromTab(props.tabs[0]) : []
838
841
  }));
839
842
  const [hideBranding, setHideBranding] = createSignal(false);
843
+ const [isDevelopmentMode, setIsDevelopmentMode] = createSignal(false);
840
844
  const [preferencesFilter, setPreferencesFilter] = createSignal(props.preferencesFilter);
841
845
  const setNewStatus = (newStatus) => {
842
846
  setStatus(newStatus);
@@ -892,6 +896,7 @@ var InboxProvider = (props) => {
892
896
  return;
893
897
  }
894
898
  setHideBranding(data.removeNovuBranding);
899
+ setIsDevelopmentMode(data.isDevelopmentMode);
895
900
  }
896
901
  });
897
902
  return createComponent(InboxContext.Provider, {
@@ -908,7 +913,8 @@ var InboxProvider = (props) => {
908
913
  setIsOpened,
909
914
  navigate,
910
915
  hideBranding,
911
- preferencesFilter
916
+ preferencesFilter,
917
+ isDevelopmentMode
912
918
  },
913
919
  get children() {
914
920
  return props.children;
@@ -1429,21 +1435,61 @@ function isBrowser() {
1429
1435
  }
1430
1436
 
1431
1437
  // src/ui/components/elements/Footer.tsx
1432
- 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-py-3 nt-text-foreground-alpha-400"><a target=_blank class="nt-w-full nt-flex nt-items-center nt-gap-1 nt-justify-center"><span class=nt-text-xs>Inbox by</span><span class=nt-text-xs>Novu`);
1438
+ var _tmpl$21 = /* @__PURE__ */ template(`<span class="nt-z-10 nt-text-xs nt-text-stripes">Development mode`);
1439
+ var _tmpl$22 = /* @__PURE__ */ template(`<span class="nt-z-10 nt-text-xs">\u2022`);
1440
+ var _tmpl$32 = /* @__PURE__ */ template(`<a target=_blank class="nt-z-10 nt-flex nt-items-center nt-gap-1 nt-justify-center"><span class=nt-text-xs>Inbox by</span><span class=nt-text-xs>Novu`);
1441
+ var _tmpl$42 = /* @__PURE__ */ template(`<div>`);
1442
+ var stripes = `before:nt-content-[""] before:nt-absolute before:nt-inset-0 before:-nt-right-[calc(0+var(--stripes-size))] before:[mask-image:linear-gradient(transparent_0%,black)] before:nt-bg-dev-stripes-gradient before:nt-bg-[length:var(--stripes-size)_var(--stripes-size)] before:nt-animate-stripes before:hover:[animation-play-state:running]`;
1443
+ var commonAfter = 'after:nt-content-[""] after:nt-absolute after:nt-inset-0 after:-nt-top-12';
1444
+ var devModeGradient = `${commonAfter} after:nt-bg-[linear-gradient(180deg,transparent,oklch(from_var(--nv-color-stripes)_l_c_h_/_0.07)_55%,transparent),linear-gradient(180deg,transparent,oklch(from_var(--nv-color-background)_l_c_h_/_0.9)_55%,transparent)]`;
1445
+ var prodModeGradient = `${commonAfter} after:nt-bg-[linear-gradient(180deg,transparent,oklch(from_var(--nv-color-background)_l_c_h_/_0.9)_55%,transparent)]`;
1433
1446
  var Footer = () => {
1434
1447
  const {
1435
- hideBranding
1448
+ hideBranding,
1449
+ isDevelopmentMode
1436
1450
  } = useInboxContext();
1437
1451
  return createComponent(Show, {
1438
1452
  get when() {
1439
- return !hideBranding();
1453
+ return !hideBranding() || isDevelopmentMode();
1440
1454
  },
1441
1455
  get children() {
1442
- var _el$ = _tmpl$21(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
1443
- insert(_el$2, createComponent(Novu2, {
1444
- "class": "nt-size-4"
1445
- }), _el$4);
1446
- effect(() => setAttribute(_el$2, "href", `https://go.novu.co/powered?ref=${getCurrentDomain()}`));
1456
+ var _el$ = _tmpl$42();
1457
+ _el$.style.setProperty("--stripes-size", "15px");
1458
+ insert(_el$, createComponent(Show, {
1459
+ get when() {
1460
+ return isDevelopmentMode();
1461
+ },
1462
+ get children() {
1463
+ return _tmpl$21();
1464
+ }
1465
+ }), null);
1466
+ insert(_el$, createComponent(Show, {
1467
+ get when() {
1468
+ return memo(() => !!isDevelopmentMode())() && !hideBranding();
1469
+ },
1470
+ get children() {
1471
+ return _tmpl$22();
1472
+ }
1473
+ }), null);
1474
+ insert(_el$, createComponent(Show, {
1475
+ get when() {
1476
+ return !hideBranding();
1477
+ },
1478
+ get children() {
1479
+ var _el$4 = _tmpl$32(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling;
1480
+ insert(_el$4, createComponent(Novu2, {
1481
+ "class": "nt-size-2.5"
1482
+ }), _el$6);
1483
+ effect(() => setAttribute(_el$4, "href", `https://go.novu.co/powered?ref=${getCurrentDomain()}`));
1484
+ return _el$4;
1485
+ }
1486
+ }), null);
1487
+ effect(() => className(_el$, cn(`nt-relative nt-flex nt-shrink-0 nt-justify-center nt-items-center nt-gap-1 nt-mt-auto nt-py-3 nt-text-foreground-alpha-400`, {
1488
+ [stripes]: isDevelopmentMode(),
1489
+ [devModeGradient]: isDevelopmentMode(),
1490
+ "nt-bg-[oklch(from_var(--nv-color-stripes)_l_c_h_/_0.1)]": isDevelopmentMode(),
1491
+ [prodModeGradient]: !isDevelopmentMode()
1492
+ })));
1447
1493
  return _el$;
1448
1494
  }
1449
1495
  });
@@ -1454,7 +1500,7 @@ function getCurrentDomain() {
1454
1500
  }
1455
1501
  return "";
1456
1502
  }
1457
- var _tmpl$22 = /* @__PURE__ */ template(`<button>`);
1503
+ var _tmpl$23 = /* @__PURE__ */ template(`<button>`);
1458
1504
  var buttonVariants = cva(cn('nt-inline-flex nt-gap-4 nt-items-center nt-justify-center nt-whitespace-nowrap nt-text-sm nt-font-medium nt-transition-colors disabled:nt-pointer-events-none disabled:nt-opacity-50 after:nt-absolute after:nt-content-[""] before:nt-content-[""] before:nt-absolute [&_svg]:nt-pointer-events-none [&_svg]:nt-shrink-0', `focus-visible:nt-outline-none focus-visible:nt-ring-2 focus-visible:nt-rounded-md focus-visible:nt-ring-ring focus-visible:nt-ring-offset-2`), {
1459
1505
  variants: {
1460
1506
  variant: {
@@ -1481,7 +1527,7 @@ var Button = (props) => {
1481
1527
  const [local, rest] = splitProps(props, ["class", "appearanceKey"]);
1482
1528
  const style = useStyle();
1483
1529
  return (() => {
1484
- var _el$ = _tmpl$22();
1530
+ var _el$ = _tmpl$23();
1485
1531
  spread(_el$, mergeProps({
1486
1532
  get ["data-variant"]() {
1487
1533
  return props.variant;
@@ -1499,7 +1545,7 @@ var Button = (props) => {
1499
1545
  return _el$;
1500
1546
  })();
1501
1547
  };
1502
- var _tmpl$23 = /* @__PURE__ */ template(`<button>`);
1548
+ var _tmpl$24 = /* @__PURE__ */ template(`<button>`);
1503
1549
  var PopoverClose = (props) => {
1504
1550
  const {
1505
1551
  onClose
@@ -1520,14 +1566,14 @@ var PopoverClose = (props) => {
1520
1566
  }, rest));
1521
1567
  }
1522
1568
  return (() => {
1523
- var _el$ = _tmpl$23();
1569
+ var _el$ = _tmpl$24();
1524
1570
  _el$.$$click = handleClick;
1525
1571
  spread(_el$, rest, false, false);
1526
1572
  return _el$;
1527
1573
  })();
1528
1574
  };
1529
1575
  delegateEvents(["click"]);
1530
- var _tmpl$24 = /* @__PURE__ */ template(`<div>`);
1576
+ var _tmpl$25 = /* @__PURE__ */ template(`<div>`);
1531
1577
  var Root = (props) => {
1532
1578
  const [_, rest] = splitProps(props, ["class"]);
1533
1579
  const {
@@ -1543,7 +1589,7 @@ var Root = (props) => {
1543
1589
  },
1544
1590
  children: new Comment(" Powered by Novu - https://novu.co ")
1545
1591
  }), (() => {
1546
- var _el$ = _tmpl$24();
1592
+ var _el$ = _tmpl$25();
1547
1593
  spread(_el$, mergeProps({
1548
1594
  get id() {
1549
1595
  return `novu-root-${id()}`;
@@ -1616,7 +1662,7 @@ function usePopover() {
1616
1662
  }
1617
1663
 
1618
1664
  // src/ui/components/primitives/Popover/PopoverContent.tsx
1619
- var _tmpl$25 = /* @__PURE__ */ template(`<div>`);
1665
+ var _tmpl$26 = /* @__PURE__ */ template(`<div>`);
1620
1666
  var popoverContentVariants = () => cn("nt-w-[400px] nt-h-[600px] nt-rounded-xl nt-bg-background", "nt-shadow-popover nt-animate-in nt-slide-in-from-top-2 nt-fade-in nt-z-10 nt-cursor-default nt-flex nt-flex-col nt-overflow-hidden nt-border nt-border-border");
1621
1667
  var PopoverContentBody = (props) => {
1622
1668
  const {
@@ -1639,7 +1685,7 @@ var PopoverContentBody = (props) => {
1639
1685
  });
1640
1686
  });
1641
1687
  return (() => {
1642
- var _el$ = _tmpl$25();
1688
+ var _el$ = _tmpl$26();
1643
1689
  use(setFloating, _el$);
1644
1690
  spread(_el$, mergeProps({
1645
1691
  get ["class"]() {
@@ -1719,7 +1765,7 @@ var PopoverContent = (props) => {
1719
1765
  }
1720
1766
  });
1721
1767
  };
1722
- var _tmpl$26 = /* @__PURE__ */ template(`<button>`);
1768
+ var _tmpl$27 = /* @__PURE__ */ template(`<button>`);
1723
1769
  var PopoverTrigger = (props) => {
1724
1770
  const {
1725
1771
  setReference,
@@ -1743,7 +1789,7 @@ var PopoverTrigger = (props) => {
1743
1789
  }, rest));
1744
1790
  }
1745
1791
  return (() => {
1746
- var _el$ = _tmpl$26();
1792
+ var _el$ = _tmpl$27();
1747
1793
  _el$.$$click = handleClick;
1748
1794
  use(setReference, _el$);
1749
1795
  spread(_el$, mergeProps({
@@ -1907,7 +1953,7 @@ var useKeyboardNavigation = ({
1907
1953
  };
1908
1954
 
1909
1955
  // src/ui/components/primitives/Tabs/TabsRoot.tsx
1910
- var _tmpl$27 = /* @__PURE__ */ template(`<div>`);
1956
+ var _tmpl$28 = /* @__PURE__ */ template(`<div>`);
1911
1957
  var TabsContext = createContext(void 0);
1912
1958
  var useTabsContext = () => {
1913
1959
  const context = useContext(TabsContext);
@@ -1946,7 +1992,7 @@ var TabsRoot = (props) => {
1946
1992
  setVisibleTabs
1947
1993
  },
1948
1994
  get children() {
1949
- var _el$ = _tmpl$27();
1995
+ var _el$ = _tmpl$28();
1950
1996
  use(setTabsContainer, _el$);
1951
1997
  spread(_el$, mergeProps({
1952
1998
  get ["class"]() {
@@ -1960,7 +2006,7 @@ var TabsRoot = (props) => {
1960
2006
  };
1961
2007
 
1962
2008
  // src/ui/components/primitives/Tabs/TabsContent.tsx
1963
- var _tmpl$28 = /* @__PURE__ */ template(`<div role=tabpanel>`);
2009
+ var _tmpl$29 = /* @__PURE__ */ template(`<div role=tabpanel>`);
1964
2010
  var TabsContent = (props) => {
1965
2011
  const [local, rest] = splitProps(props, ["value", "class", "appearanceKey", "children"]);
1966
2012
  const style = useStyle();
@@ -1972,7 +2018,7 @@ var TabsContent = (props) => {
1972
2018
  return activeTab() === local.value;
1973
2019
  },
1974
2020
  get children() {
1975
- var _el$ = _tmpl$28();
2021
+ var _el$ = _tmpl$29();
1976
2022
  spread(_el$, mergeProps({
1977
2023
  get ["class"]() {
1978
2024
  return memo(() => !!local.class)() ? local.class : style(local.appearanceKey || "tabsContent", activeTab() === local.value ? "nt-block" : "nt-hidden");
@@ -1992,14 +2038,14 @@ var TabsContent = (props) => {
1992
2038
  }
1993
2039
  });
1994
2040
  };
1995
- var _tmpl$29 = /* @__PURE__ */ template(`<div role=tablist>`);
2041
+ var _tmpl$30 = /* @__PURE__ */ template(`<div role=tablist>`);
1996
2042
  var _tmpl$210 = /* @__PURE__ */ template(`<div class="nt-relative nt-z-[-1]">`);
1997
2043
  var tabsListVariants = () => "nt-flex nt-gap-6";
1998
2044
  var TabsList = (props) => {
1999
2045
  const [local, rest] = splitProps(props, ["class", "appearanceKey", "ref", "children"]);
2000
2046
  const style = useStyle();
2001
2047
  return [(() => {
2002
- var _el$ = _tmpl$29();
2048
+ var _el$ = _tmpl$30();
2003
2049
  var _ref$ = local.ref;
2004
2050
  typeof _ref$ === "function" ? use(_ref$, _el$) : local.ref = _el$;
2005
2051
  spread(_el$, mergeProps({
@@ -2078,7 +2124,7 @@ var inboxFilterLocalizationKeys = {
2078
2124
  unread: "inbox.filters.labels.unread",
2079
2125
  archived: "inbox.filters.labels.archived"
2080
2126
  };
2081
- var _tmpl$30 = /* @__PURE__ */ template(`<span><span></span><span>`);
2127
+ var _tmpl$31 = /* @__PURE__ */ template(`<span><span></span><span>`);
2082
2128
  var cases = [{
2083
2129
  status: "unreadRead" /* UNREAD_READ */,
2084
2130
  icon: UnreadRead
@@ -2122,7 +2168,7 @@ var StatusItem = (props) => {
2122
2168
  },
2123
2169
  get children() {
2124
2170
  return [(() => {
2125
- var _el$ = _tmpl$30(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2171
+ var _el$ = _tmpl$31(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2126
2172
  insert(_el$2, () => props.icon());
2127
2173
  insert(_el$3, () => t(props.localizationKey));
2128
2174
  effect((_p$) => {
@@ -2156,7 +2202,7 @@ var StatusItem = (props) => {
2156
2202
  };
2157
2203
 
2158
2204
  // src/ui/components/elements/InboxStatus/InboxStatusDropdown.tsx
2159
- var _tmpl$31 = /* @__PURE__ */ template(`<span>`);
2205
+ var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
2160
2206
  var StatusDropdown = () => {
2161
2207
  const style = useStyle();
2162
2208
  const {
@@ -2181,7 +2227,7 @@ var StatusDropdown = () => {
2181
2227
  }, triggerProps, {
2182
2228
  get children() {
2183
2229
  return [(() => {
2184
- var _el$ = _tmpl$31();
2230
+ var _el$ = _tmpl$33();
2185
2231
  insert(_el$, () => t(inboxFilterLocalizationKeys[status()]));
2186
2232
  effect((_p$) => {
2187
2233
  var _v$ = inboxFilterLocalizationKeys[status()], _v$2 = style("inboxStatus__title", "nt-text-base");
@@ -2326,7 +2372,7 @@ var useReadAll = (props) => {
2326
2372
  };
2327
2373
 
2328
2374
  // src/ui/components/elements/Header/MoreActionsOptions.tsx
2329
- var _tmpl$32 = /* @__PURE__ */ template(`<span>`);
2375
+ var _tmpl$34 = /* @__PURE__ */ template(`<span>`);
2330
2376
  var MoreActionsOptions = () => {
2331
2377
  const {
2332
2378
  filter
@@ -2374,12 +2420,12 @@ var ActionsItem = (props) => {
2374
2420
  },
2375
2421
  get children() {
2376
2422
  return [(() => {
2377
- var _el$ = _tmpl$32();
2423
+ var _el$ = _tmpl$34();
2378
2424
  insert(_el$, () => props.icon());
2379
2425
  effect(() => className(_el$, style("moreActions__dropdownItemLeft__icon", "nt-size-4")));
2380
2426
  return _el$;
2381
2427
  })(), (() => {
2382
- var _el$2 = _tmpl$32();
2428
+ var _el$2 = _tmpl$34();
2383
2429
  insert(_el$2, () => t(props.localizationKey));
2384
2430
  effect((_p$) => {
2385
2431
  var _v$ = props.localizationKey, _v$2 = style("moreActions__dropdownItemLabel", "nt-leading-none");
@@ -2438,11 +2484,11 @@ var MoreActionsDropdown = () => {
2438
2484
  };
2439
2485
 
2440
2486
  // src/ui/components/elements/Header/ActionsContainer.tsx
2441
- var _tmpl$33 = /* @__PURE__ */ template(`<div>`);
2487
+ var _tmpl$35 = /* @__PURE__ */ template(`<div>`);
2442
2488
  var ActionsContainer = (props) => {
2443
2489
  const style = useStyle();
2444
2490
  return (() => {
2445
- var _el$ = _tmpl$33();
2491
+ var _el$ = _tmpl$35();
2446
2492
  insert(_el$, createComponent(MoreActionsDropdown, {}), null);
2447
2493
  insert(_el$, createComponent(Show, {
2448
2494
  get when() {
@@ -2470,11 +2516,11 @@ var ActionsContainer = (props) => {
2470
2516
  };
2471
2517
 
2472
2518
  // src/ui/components/elements/Header/Header.tsx
2473
- var _tmpl$34 = /* @__PURE__ */ template(`<div>`);
2519
+ var _tmpl$36 = /* @__PURE__ */ template(`<div>`);
2474
2520
  var Header = (props) => {
2475
2521
  const style = useStyle();
2476
2522
  return (() => {
2477
- var _el$ = _tmpl$34();
2523
+ var _el$ = _tmpl$36();
2478
2524
  insert(_el$, createComponent(StatusDropdown, {}), null);
2479
2525
  insert(_el$, createComponent(ActionsContainer, {
2480
2526
  get showPreferences() {
@@ -2485,7 +2531,7 @@ var Header = (props) => {
2485
2531
  return _el$;
2486
2532
  })();
2487
2533
  };
2488
- var _tmpl$35 = /* @__PURE__ */ template(`<div>`);
2534
+ var _tmpl$37 = /* @__PURE__ */ template(`<div>`);
2489
2535
  var Collapsible = (props) => {
2490
2536
  const style = useStyle();
2491
2537
  let contentRef;
@@ -2494,7 +2540,7 @@ var Collapsible = (props) => {
2494
2540
  requestAnimationFrame(() => setEnableTransition(true));
2495
2541
  });
2496
2542
  return (() => {
2497
- var _el$ = _tmpl$35();
2543
+ var _el$ = _tmpl$37();
2498
2544
  var _ref$ = contentRef;
2499
2545
  typeof _ref$ === "function" ? use(_ref$, _el$) : contentRef = _el$;
2500
2546
  spread(_el$, mergeProps({
@@ -2513,11 +2559,11 @@ var Collapsible = (props) => {
2513
2559
  return _el$;
2514
2560
  })();
2515
2561
  };
2516
- var _tmpl$36 = /* @__PURE__ */ template(`<label><input type=checkbox class="nt-peer nt-sr-only"><div>`);
2562
+ var _tmpl$38 = /* @__PURE__ */ template(`<label><input type=checkbox class="nt-peer nt-sr-only"><div>`);
2517
2563
  var Switch = (props) => {
2518
2564
  const style = useStyle();
2519
2565
  return (() => {
2520
- var _el$ = _tmpl$36(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2566
+ var _el$ = _tmpl$38(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2521
2567
  _el$2.addEventListener("change", (e) => {
2522
2568
  props.onChange(e.target.checked);
2523
2569
  });
@@ -2538,7 +2584,7 @@ var Switch = (props) => {
2538
2584
  };
2539
2585
 
2540
2586
  // src/ui/components/elements/Preferences/ChannelRow.tsx
2541
- var _tmpl$37 = /* @__PURE__ */ template(`<div><div><div></div><span></span></div><div>`);
2587
+ var _tmpl$39 = /* @__PURE__ */ template(`<div><div><div></div><span></span></div><div>`);
2542
2588
  var ChannelRow = (props) => {
2543
2589
  const style = useStyle();
2544
2590
  const updatePreference = (enabled) => __async(void 0, null, function* () {
@@ -2552,7 +2598,7 @@ var ChannelRow = (props) => {
2552
2598
  yield updatePreference(checked);
2553
2599
  });
2554
2600
  return (() => {
2555
- var _el$ = _tmpl$37(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
2601
+ var _el$ = _tmpl$39(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
2556
2602
  insert(_el$3, createComponent(ChannelIcon, {
2557
2603
  appearanceKey: "channel__icon",
2558
2604
  get channel() {
@@ -2638,12 +2684,12 @@ var getLabel = (channel) => {
2638
2684
  return "";
2639
2685
  }
2640
2686
  };
2641
- var _tmpl$38 = /* @__PURE__ */ template(`<div>`);
2687
+ var _tmpl$40 = /* @__PURE__ */ template(`<div>`);
2642
2688
  var _tmpl$211 = /* @__PURE__ */ template(`<div><div></div><div>`);
2643
2689
  var SkeletonText = (props) => {
2644
2690
  const style = useStyle();
2645
2691
  return (() => {
2646
- var _el$ = _tmpl$38();
2692
+ var _el$ = _tmpl$40();
2647
2693
  effect(() => className(_el$, style(props.appearanceKey, cn("nt-w-full nt-h-3 nt-rounded nt-bg-gradient-to-r nt-from-foreground-alpha-50 nt-to-transparent", props.class))));
2648
2694
  return _el$;
2649
2695
  })();
@@ -2651,7 +2697,7 @@ var SkeletonText = (props) => {
2651
2697
  var SkeletonAvatar = (props) => {
2652
2698
  const style = useStyle();
2653
2699
  return (() => {
2654
- var _el$2 = _tmpl$38();
2700
+ var _el$2 = _tmpl$40();
2655
2701
  effect(() => className(_el$2, style(props.appearanceKey, cn("nt-size-8 nt-rounded-lg nt-bg-gradient-to-r nt-from-foreground-alpha-50 nt-to-transparent", props.class))));
2656
2702
  return _el$2;
2657
2703
  })();
@@ -2676,7 +2722,7 @@ var SkeletonSwitch = (props) => {
2676
2722
  };
2677
2723
 
2678
2724
  // src/ui/components/elements/Preferences/PreferencesListSkeleton.tsx
2679
- var _tmpl$39 = /* @__PURE__ */ template(`<div>`);
2725
+ var _tmpl$41 = /* @__PURE__ */ template(`<div>`);
2680
2726
  var channelIcons = [InApp, Email, Sms, Push, Chat];
2681
2727
  var PreferencesListSkeleton = (props) => {
2682
2728
  const style = useStyle();
@@ -2684,7 +2730,7 @@ var PreferencesListSkeleton = (props) => {
2684
2730
  t
2685
2731
  } = useLocalization();
2686
2732
  return (() => {
2687
- var _el$ = _tmpl$39();
2733
+ var _el$ = _tmpl$41();
2688
2734
  insert(_el$, createComponent(Motion.div, {
2689
2735
  get animate() {
2690
2736
  return {
@@ -2726,7 +2772,7 @@ var PreferencesListSkeleton = (props) => {
2726
2772
  return style("preferencesList__skeletonIcon", "nt-size-8 nt-p-2 nt-rounded-lg nt-bg-neutral-alpha-100");
2727
2773
  }
2728
2774
  }), (() => {
2729
- var _el$3 = _tmpl$39();
2775
+ var _el$3 = _tmpl$41();
2730
2776
  insert(_el$3, createComponent(SkeletonText, {
2731
2777
  appearanceKey: "notificationList__skeletonText",
2732
2778
  "class": "nt-h-2 nt-w-1/3 nt-bg-neutral-alpha-50 nt-rounded"
@@ -2744,7 +2790,7 @@ var PreferencesListSkeleton = (props) => {
2744
2790
  }
2745
2791
  });
2746
2792
  })), (() => {
2747
- var _el$2 = _tmpl$39();
2793
+ var _el$2 = _tmpl$41();
2748
2794
  effect(() => className(_el$2, style("notificationListEmptyNoticeOverlay", "nt-absolute nt-size-full nt-z-10 nt-inset-0 nt-bg-gradient-to-b nt-from-transparent nt-to-background")));
2749
2795
  return _el$2;
2750
2796
  })()];
@@ -2789,7 +2835,7 @@ var PreferencesListSkeleton = (props) => {
2789
2835
  };
2790
2836
 
2791
2837
  // src/ui/components/elements/Preferences/Preferences.tsx
2792
- var _tmpl$40 = /* @__PURE__ */ template(`<div>`);
2838
+ var _tmpl$43 = /* @__PURE__ */ template(`<div>`);
2793
2839
  var _tmpl$212 = /* @__PURE__ */ template(`<span>`);
2794
2840
  var _tmpl$310 = /* @__PURE__ */ template(`<div><div><div><div></div></div><span>`);
2795
2841
  var Preferences = () => {
@@ -2838,7 +2884,7 @@ var Preferences = () => {
2838
2884
  });
2839
2885
  });
2840
2886
  return (() => {
2841
- var _el$ = _tmpl$40();
2887
+ var _el$ = _tmpl$43();
2842
2888
  insert(_el$, createComponent(PreferencesRow, {
2843
2889
  localizationKey: "preferences.global",
2844
2890
  get channels() {
@@ -2917,7 +2963,7 @@ var WorkflowDescription = (props) => {
2917
2963
  return channels.map((c, index) => [c, memo(() => index < channels.length - 1 && ", ")]);
2918
2964
  };
2919
2965
  return (() => {
2920
- var _el$3 = _tmpl$40();
2966
+ var _el$3 = _tmpl$43();
2921
2967
  insert(_el$3, channelNames);
2922
2968
  effect(() => className(_el$3, style(props.appearanceKey, cn("nt-text-sm nt-text-foreground-alpha-600 nt-text-start", props.class))));
2923
2969
  return _el$3;
@@ -2966,7 +3012,7 @@ var PreferencesRow = (props) => {
2966
3012
  return isOpenChannels();
2967
3013
  },
2968
3014
  get children() {
2969
- var _el$9 = _tmpl$40();
3015
+ var _el$9 = _tmpl$43();
2970
3016
  insert(_el$9, createComponent(For, {
2971
3017
  get each() {
2972
3018
  return channels();
@@ -3016,14 +3062,14 @@ var PreferencesRow = (props) => {
3016
3062
  });
3017
3063
  };
3018
3064
  delegateEvents(["click"]);
3019
- var _tmpl$41 = /* @__PURE__ */ template(`<div><div data-localization=preferences.title>`);
3065
+ var _tmpl$44 = /* @__PURE__ */ template(`<div><div data-localization=preferences.title>`);
3020
3066
  var PreferencesHeader = (props) => {
3021
3067
  const style = useStyle();
3022
3068
  const {
3023
3069
  t
3024
3070
  } = useLocalization();
3025
3071
  return (() => {
3026
- var _el$ = _tmpl$41(), _el$2 = _el$.firstChild;
3072
+ var _el$ = _tmpl$44(), _el$2 = _el$.firstChild;
3027
3073
  insert(_el$, createComponent(Show, {
3028
3074
  get when() {
3029
3075
  return props.navigateToNotifications;
@@ -3087,20 +3133,20 @@ var useTabsDropdown = ({ tabs }) => {
3087
3133
  });
3088
3134
  return { dropdownTabs, setTabsList, visibleTabs };
3089
3135
  };
3090
- var _tmpl$42 = /* @__PURE__ */ template(`<svg viewBox="0 0 20 20"fill=none xmlns=http://www.w3.org/2000/svg><path d="M10.0001 10.879L13.7126 7.1665L14.7731 8.227L10.0001 13L5.22705 8.227L6.28755 7.1665L10.0001 10.879Z"fill=currentColor>`);
3136
+ var _tmpl$45 = /* @__PURE__ */ template(`<svg viewBox="0 0 20 20"fill=none xmlns=http://www.w3.org/2000/svg><path d="M10.0001 10.879L13.7126 7.1665L14.7731 8.227L10.0001 13L5.22705 8.227L6.28755 7.1665L10.0001 10.879Z"fill=currentColor>`);
3091
3137
  var ArrowDown = (props) => {
3092
3138
  return (() => {
3093
- var _el$ = _tmpl$42();
3139
+ var _el$ = _tmpl$45();
3094
3140
  spread(_el$, props, true, true);
3095
3141
  return _el$;
3096
3142
  })();
3097
3143
  };
3098
- var _tmpl$43 = /* @__PURE__ */ template(`<strong>`);
3144
+ var _tmpl$46 = /* @__PURE__ */ template(`<strong>`);
3099
3145
  var _tmpl$213 = /* @__PURE__ */ template(`<p>`);
3100
3146
  var Bold = (props) => {
3101
3147
  const style = useStyle();
3102
3148
  return (() => {
3103
- var _el$ = _tmpl$43();
3149
+ var _el$ = _tmpl$46();
3104
3150
  insert(_el$, () => props.children);
3105
3151
  effect(() => className(_el$, style(props.appearanceKey || "strong", "nt-font-semibold")));
3106
3152
  return _el$;
@@ -3191,7 +3237,7 @@ function useTooltip() {
3191
3237
  }
3192
3238
 
3193
3239
  // src/ui/components/primitives/Tooltip/TooltipContent.tsx
3194
- var _tmpl$44 = /* @__PURE__ */ template(`<div>`);
3240
+ var _tmpl$47 = /* @__PURE__ */ template(`<div>`);
3195
3241
  var tooltipContentVariants = () => "nt-bg-foreground nt-p-2 nt-shadow-tooltip nt-rounded-lg nt-text-background nt-text-xs";
3196
3242
  var TooltipContentBody = (props) => {
3197
3243
  const {
@@ -3214,7 +3260,7 @@ var TooltipContentBody = (props) => {
3214
3260
  });
3215
3261
  });
3216
3262
  return (() => {
3217
- var _el$ = _tmpl$44();
3263
+ var _el$ = _tmpl$47();
3218
3264
  use(setFloating, _el$);
3219
3265
  spread(_el$, mergeProps({
3220
3266
  get ["class"]() {
@@ -3253,7 +3299,7 @@ var TooltipContent = (props) => {
3253
3299
  }
3254
3300
  });
3255
3301
  };
3256
- var _tmpl$45 = /* @__PURE__ */ template(`<button>`);
3302
+ var _tmpl$48 = /* @__PURE__ */ template(`<button>`);
3257
3303
  var TooltipTrigger = (props) => {
3258
3304
  const {
3259
3305
  setReference,
@@ -3276,7 +3322,7 @@ var TooltipTrigger = (props) => {
3276
3322
  }, rest));
3277
3323
  }
3278
3324
  return (() => {
3279
- var _el$ = _tmpl$45();
3325
+ var _el$ = _tmpl$48();
3280
3326
  _el$.addEventListener("mouseleave", () => {
3281
3327
  setOpen(false);
3282
3328
  });
@@ -3308,10 +3354,10 @@ var Tooltip = {
3308
3354
  };
3309
3355
 
3310
3356
  // src/ui/components/Notification/DefaultNotification.tsx
3311
- var _tmpl$46 = /* @__PURE__ */ template(`<img>`);
3357
+ var _tmpl$49 = /* @__PURE__ */ template(`<img>`);
3312
3358
  var _tmpl$214 = /* @__PURE__ */ template(`<div>`);
3313
3359
  var _tmpl$311 = /* @__PURE__ */ template(`<span>`);
3314
- var _tmpl$47 = /* @__PURE__ */ template(`<a><div><div></div><div></div><p>`);
3360
+ var _tmpl$410 = /* @__PURE__ */ template(`<a><div><div></div><div></div><p>`);
3315
3361
  var DefaultNotification = (props) => {
3316
3362
  const style = useStyle();
3317
3363
  const {
@@ -3360,7 +3406,7 @@ var DefaultNotification = (props) => {
3360
3406
  }
3361
3407
  });
3362
3408
  return (() => {
3363
- var _el$ = _tmpl$47(), _el$3 = _el$.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling;
3409
+ var _el$ = _tmpl$410(), _el$3 = _el$.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling;
3364
3410
  _el$.$$click = handleNotificationClick;
3365
3411
  insert(_el$, createComponent(Show, {
3366
3412
  get when() {
@@ -3374,7 +3420,7 @@ var DefaultNotification = (props) => {
3374
3420
  })();
3375
3421
  },
3376
3422
  get children() {
3377
- var _el$2 = _tmpl$46();
3423
+ var _el$2 = _tmpl$49();
3378
3424
  effect((_p$) => {
3379
3425
  var _v$ = style("notificationImage", "nt-size-8 nt-rounded-lg nt-object-cover nt-aspect-square"), _v$2 = props.notification.avatar;
3380
3426
  _v$ !== _p$.e && className(_el$2, _p$.e = _v$);
@@ -3698,14 +3744,14 @@ var NewMessagesCta = (props) => {
3698
3744
  }
3699
3745
  });
3700
3746
  };
3701
- var _tmpl$48 = /* @__PURE__ */ template(`<div>`);
3747
+ var _tmpl$50 = /* @__PURE__ */ template(`<div>`);
3702
3748
  var NotificationListSkeleton = (props) => {
3703
3749
  const style = useStyle();
3704
3750
  const {
3705
3751
  t
3706
3752
  } = useLocalization();
3707
3753
  return (() => {
3708
- var _el$ = _tmpl$48();
3754
+ var _el$ = _tmpl$50();
3709
3755
  insert(_el$, createComponent(Motion.div, {
3710
3756
  get animate() {
3711
3757
  return {
@@ -3744,7 +3790,7 @@ var NotificationListSkeleton = (props) => {
3744
3790
  appearanceKey: "notificationList__skeletonAvatar",
3745
3791
  "class": "nt-w-8 nt-h-8 nt-rounded-full nt-bg-neutral-alpha-100"
3746
3792
  }), (() => {
3747
- var _el$3 = _tmpl$48();
3793
+ var _el$3 = _tmpl$50();
3748
3794
  insert(_el$3, createComponent(SkeletonText, {
3749
3795
  appearanceKey: "notificationList__skeletonText",
3750
3796
  "class": "nt-h-2 nt-w-1/3 nt-bg-neutral-alpha-50 nt-rounded"
@@ -3758,7 +3804,7 @@ var NotificationListSkeleton = (props) => {
3758
3804
  })()];
3759
3805
  }
3760
3806
  }))), (() => {
3761
- var _el$2 = _tmpl$48();
3807
+ var _el$2 = _tmpl$50();
3762
3808
  effect(() => className(_el$2, style("notificationListEmptyNoticeOverlay", "nt-absolute nt-size-full nt-z-10 nt-inset-0 nt-bg-gradient-to-b nt-from-transparent nt-to-background")));
3763
3809
  return _el$2;
3764
3810
  })()];
@@ -3803,7 +3849,7 @@ var NotificationListSkeleton = (props) => {
3803
3849
  };
3804
3850
 
3805
3851
  // src/ui/components/Notification/NotificationList.tsx
3806
- var _tmpl$49 = /* @__PURE__ */ template(`<div>`);
3852
+ var _tmpl$51 = /* @__PURE__ */ template(`<div>`);
3807
3853
  var _tmpl$215 = /* @__PURE__ */ template(`<div><div>`);
3808
3854
  var NotificationList = (props) => {
3809
3855
  var _a, _b;
@@ -3904,7 +3950,7 @@ var NotificationList = (props) => {
3904
3950
  return !end();
3905
3951
  },
3906
3952
  get children() {
3907
- var _el$3 = _tmpl$49();
3953
+ var _el$3 = _tmpl$51();
3908
3954
  use(setEl, _el$3);
3909
3955
  insert(_el$3, createComponent(NotificationListSkeleton, {
3910
3956
  loading: true
@@ -3926,13 +3972,13 @@ var NotificationList = (props) => {
3926
3972
  return _el$;
3927
3973
  })();
3928
3974
  };
3929
- var _tmpl$50 = /* @__PURE__ */ template(`<span>`);
3975
+ var _tmpl$52 = /* @__PURE__ */ template(`<span>`);
3930
3976
  var getDisplayCount = (count) => count >= 100 ? "99+" : count;
3931
3977
  var InboxTabUnreadNotificationsCount = (props) => {
3932
3978
  const style = useStyle();
3933
3979
  const displayCount = createMemo(() => getDisplayCount(props.count));
3934
3980
  return (() => {
3935
- var _el$ = _tmpl$50();
3981
+ var _el$ = _tmpl$52();
3936
3982
  insert(_el$, displayCount);
3937
3983
  effect(() => className(_el$, style("notificationsTabsTriggerCount", "nt-rounded-full nt-bg-counter nt-px-[6px] nt-text-counter-foreground nt-text-sm")));
3938
3984
  return _el$;
@@ -3957,7 +4003,7 @@ var InboxTab = (props) => {
3957
4003
  },
3958
4004
  get children() {
3959
4005
  return [(() => {
3960
- var _el$2 = _tmpl$50();
4006
+ var _el$2 = _tmpl$52();
3961
4007
  insert(_el$2, () => props.label);
3962
4008
  effect(() => className(_el$2, style("notificationsTabsTriggerLabel", "nt-text-sm nt-font-medium")));
3963
4009
  return _el$2;
@@ -3995,7 +4041,7 @@ var InboxDropdownTab = (props) => {
3995
4041
  },
3996
4042
  get children() {
3997
4043
  return [(() => {
3998
- var _el$3 = _tmpl$50();
4044
+ var _el$3 = _tmpl$52();
3999
4045
  insert(_el$3, () => props.label);
4000
4046
  effect(() => className(_el$3, style("moreTabs__dropdownItemLabel", "nt-mr-auto")));
4001
4047
  return _el$3;
@@ -4176,7 +4222,7 @@ var InboxTabs = (props) => {
4176
4222
  };
4177
4223
 
4178
4224
  // src/ui/components/Inbox.tsx
4179
- var _tmpl$51 = /* @__PURE__ */ template(`<div>`);
4225
+ var _tmpl$53 = /* @__PURE__ */ template(`<div>`);
4180
4226
  var InboxPage = /* @__PURE__ */ function(InboxPage2) {
4181
4227
  InboxPage2["Notifications"] = "notifications";
4182
4228
  InboxPage2["Preferences"] = "preferences";
@@ -4198,7 +4244,7 @@ var InboxContent = (props) => {
4198
4244
  };
4199
4245
  });
4200
4246
  return (() => {
4201
- var _el$ = _tmpl$51();
4247
+ var _el$ = _tmpl$53();
4202
4248
  insert(_el$, createComponent(Switch$1, {
4203
4249
  get children() {
4204
4250
  return [createComponent(Match, {
@@ -4525,7 +4571,7 @@ var Renderer = (props) => {
4525
4571
  }
4526
4572
  });
4527
4573
  };
4528
- var version = "3.0.0";
4574
+ var version = "3.0.3";
4529
4575
  var cssHref = `https://cdn.jsdelivr.net/npm/@novu/js@${version}/dist/index.css`;
4530
4576
  var _dispose, _rootElement, _mountedElements, _setMountedElements, _appearance, _setAppearance, _localization, _setLocalization, _options, _setOptions, _tabs, _setTabs, _routerPush, _setRouterPush, _preferencesFilter, _setPreferencesFilter, _predefinedNovu, _NovuUI_instances, mountComponentRenderer_fn, updateComponentProps_fn;
4531
4577
  var NovuUI = class {