@novu/js 2.3.1 → 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,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkAALXN67T_js = require('../chunk-AALXN67T.js');
3
+ var chunkXKQCRZD6_js = require('../chunk-XKQCRZD6.js');
4
+ var chunkERC62PGI_js = require('../chunk-ERC62PGI.js');
4
5
  var chunk7B52C2XE_js = require('../chunk-7B52C2XE.js');
5
6
  var web = require('solid-js/web');
6
7
  var solidJs = require('solid-js');
@@ -253,7 +254,7 @@ function formatToRelativeTime({
253
254
  } else if (diffInSeconds < SECONDS.inMonth) {
254
255
  return formatter.format(Math.floor(-diffInSeconds / SECONDS.inDay), "day");
255
256
  } else {
256
- return new Intl.DateTimeFormat(locale, { month: "short", day: "numeric" }).format(toDate);
257
+ return new Intl.DateTimeFormat(locale, { month: "short", day: "numeric" }).format(fromDate);
257
258
  }
258
259
  }
259
260
  var twMerge = tailwindMerge.extendTailwindMerge({
@@ -749,7 +750,7 @@ var useInboxContext = () => {
749
750
  };
750
751
  var NovuContext = solidJs.createContext(void 0);
751
752
  function NovuProvider(props) {
752
- const novu = solidJs.createMemo(() => props.novu || new chunkAALXN67T_js.Novu(props.options));
753
+ const novu = solidJs.createMemo(() => props.novu || new chunkXKQCRZD6_js.Novu(props.options));
753
754
  return web.createComponent(NovuContext.Provider, {
754
755
  get value() {
755
756
  return novu();
@@ -1048,7 +1049,7 @@ var ExternalElementRenderer = (props) => {
1048
1049
  return _el$;
1049
1050
  })();
1050
1051
  };
1051
- var _tmpl$2 = /* @__PURE__ */ web.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">`);
1052
+ var _tmpl$2 = /* @__PURE__ */ web.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">`);
1052
1053
  var Archive = (props) => {
1053
1054
  return (() => {
1054
1055
  var _el$ = _tmpl$2();
@@ -1184,7 +1185,7 @@ var Unarchive = (props) => {
1184
1185
  return _el$;
1185
1186
  })();
1186
1187
  };
1187
- var _tmpl$19 = /* @__PURE__ */ web.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">`);
1188
+ var _tmpl$19 = /* @__PURE__ */ web.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">`);
1188
1189
  var Unread = (props) => {
1189
1190
  return (() => {
1190
1191
  var _el$ = _tmpl$19();
@@ -1192,17 +1193,13 @@ var Unread = (props) => {
1192
1193
  return _el$;
1193
1194
  })();
1194
1195
  };
1195
- var _tmpl$20 = /* @__PURE__ */ web.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">`);
1196
- var Lock = () => {
1197
- return _tmpl$20();
1198
- };
1199
1196
 
1200
1197
  // src/ui/components/elements/Bell/DefaultBellContainer.tsx
1201
- var _tmpl$21 = /* @__PURE__ */ web.template(`<span>`);
1198
+ var _tmpl$20 = /* @__PURE__ */ web.template(`<span>`);
1202
1199
  var BellContainer = (props) => {
1203
1200
  const style = useStyle();
1204
1201
  return (() => {
1205
- var _el$ = _tmpl$21();
1202
+ var _el$ = _tmpl$20();
1206
1203
  web.insert(_el$, web.createComponent(BellIcon, {
1207
1204
  get ["class"]() {
1208
1205
  return style("bellIcon");
@@ -1213,7 +1210,7 @@ var BellContainer = (props) => {
1213
1210
  return props.unreadCount > 0;
1214
1211
  },
1215
1212
  get children() {
1216
- var _el$2 = _tmpl$21();
1213
+ var _el$2 = _tmpl$20();
1217
1214
  web.effect(() => web.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")));
1218
1215
  return _el$2;
1219
1216
  }
@@ -1246,7 +1243,7 @@ var Bell = (props) => {
1246
1243
  }
1247
1244
  });
1248
1245
  };
1249
- var _tmpl$22 = /* @__PURE__ */ web.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`);
1246
+ var _tmpl$21 = /* @__PURE__ */ web.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`);
1250
1247
  var Footer = () => {
1251
1248
  const {
1252
1249
  hideBranding
@@ -1256,13 +1253,13 @@ var Footer = () => {
1256
1253
  return !hideBranding();
1257
1254
  },
1258
1255
  get children() {
1259
- var _el$ = _tmpl$22(), _el$2 = _el$.firstChild;
1256
+ var _el$ = _tmpl$21(), _el$2 = _el$.firstChild;
1260
1257
  web.insert(_el$, web.createComponent(Novu2, {}), _el$2);
1261
1258
  return _el$;
1262
1259
  }
1263
1260
  });
1264
1261
  };
1265
- var _tmpl$23 = /* @__PURE__ */ web.template(`<button>`);
1262
+ var _tmpl$22 = /* @__PURE__ */ web.template(`<button>`);
1266
1263
  var buttonVariants = classVarianceAuthority.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", {
1267
1264
  variants: {
1268
1265
  variant: {
@@ -1289,7 +1286,7 @@ var Button = (props) => {
1289
1286
  const [local, rest] = solidJs.splitProps(props, ["class", "appearanceKey"]);
1290
1287
  const style = useStyle();
1291
1288
  return (() => {
1292
- var _el$ = _tmpl$23();
1289
+ var _el$ = _tmpl$22();
1293
1290
  web.spread(_el$, web.mergeProps({
1294
1291
  get ["data-variant"]() {
1295
1292
  return props.variant;
@@ -1307,7 +1304,7 @@ var Button = (props) => {
1307
1304
  return _el$;
1308
1305
  })();
1309
1306
  };
1310
- var _tmpl$24 = /* @__PURE__ */ web.template(`<button>`);
1307
+ var _tmpl$23 = /* @__PURE__ */ web.template(`<button>`);
1311
1308
  var PopoverClose = (props) => {
1312
1309
  const {
1313
1310
  onClose
@@ -1328,7 +1325,7 @@ var PopoverClose = (props) => {
1328
1325
  }, rest));
1329
1326
  }
1330
1327
  return (() => {
1331
- var _el$ = _tmpl$24();
1328
+ var _el$ = _tmpl$23();
1332
1329
  _el$.$$click = handleClick;
1333
1330
  web.spread(_el$, rest, false, false);
1334
1331
  return _el$;
@@ -1521,7 +1518,7 @@ var PopoverContent = (props) => {
1521
1518
  }
1522
1519
  });
1523
1520
  };
1524
- var _tmpl$25 = /* @__PURE__ */ web.template(`<button>`);
1521
+ var _tmpl$24 = /* @__PURE__ */ web.template(`<button>`);
1525
1522
  var PopoverTrigger = (props) => {
1526
1523
  const {
1527
1524
  setReference,
@@ -1545,7 +1542,7 @@ var PopoverTrigger = (props) => {
1545
1542
  }, rest));
1546
1543
  }
1547
1544
  return (() => {
1548
- var _el$ = _tmpl$25();
1545
+ var _el$ = _tmpl$24();
1549
1546
  _el$.$$click = handleClick;
1550
1547
  web.use(setReference, _el$);
1551
1548
  web.spread(_el$, web.mergeProps({
@@ -1645,14 +1642,14 @@ var Dropdown = {
1645
1642
  */
1646
1643
  Item: DropdownItem
1647
1644
  };
1648
- var _tmpl$26 = /* @__PURE__ */ web.template(`<div role=tablist>`);
1649
- var _tmpl$27 = /* @__PURE__ */ web.template(`<div class="nt-border-t nt-border-secondary nt-mt-[-0.25rem] nt-relative nt-z-[-1]">`);
1645
+ var _tmpl$25 = /* @__PURE__ */ web.template(`<div role=tablist>`);
1646
+ var _tmpl$26 = /* @__PURE__ */ web.template(`<div class="nt-border-t nt-border-secondary nt-mt-[-0.25rem] nt-relative nt-z-[-1]">`);
1650
1647
  var tabsListVariants = () => "nt-flex nt-gap-6 nt-px-6 nt-py-1 nt-overflow-hidden";
1651
1648
  var TabsList = (props) => {
1652
1649
  const [local, rest] = solidJs.splitProps(props, ["class", "appearanceKey", "ref", "children"]);
1653
1650
  const style = useStyle();
1654
1651
  return [(() => {
1655
- var _el$ = _tmpl$26();
1652
+ var _el$ = _tmpl$25();
1656
1653
  var _ref$ = local.ref;
1657
1654
  typeof _ref$ === "function" ? web.use(_ref$, _el$) : local.ref = _el$;
1658
1655
  web.spread(_el$, web.mergeProps({
@@ -1662,7 +1659,7 @@ var TabsList = (props) => {
1662
1659
  }, rest), false, true);
1663
1660
  web.insert(_el$, () => local.children);
1664
1661
  return _el$;
1665
- })(), _tmpl$27()];
1662
+ })(), _tmpl$26()];
1666
1663
  };
1667
1664
  var useKeyboardNavigation = ({
1668
1665
  activeTab,
@@ -1713,7 +1710,7 @@ var useKeyboardNavigation = ({
1713
1710
  };
1714
1711
 
1715
1712
  // src/ui/components/primitives/Tabs/TabsRoot.tsx
1716
- var _tmpl$28 = /* @__PURE__ */ web.template(`<div>`);
1713
+ var _tmpl$27 = /* @__PURE__ */ web.template(`<div>`);
1717
1714
  var TabsContext = solidJs.createContext(void 0);
1718
1715
  var useTabsContext = () => {
1719
1716
  const context = solidJs.useContext(TabsContext);
@@ -1752,7 +1749,7 @@ var TabsRoot = (props) => {
1752
1749
  setVisibleTabs
1753
1750
  },
1754
1751
  get children() {
1755
- var _el$ = _tmpl$28();
1752
+ var _el$ = _tmpl$27();
1756
1753
  web.use(setTabsContainer, _el$);
1757
1754
  web.spread(_el$, web.mergeProps({
1758
1755
  get ["class"]() {
@@ -1766,7 +1763,7 @@ var TabsRoot = (props) => {
1766
1763
  };
1767
1764
 
1768
1765
  // src/ui/components/primitives/Tabs/TabsContent.tsx
1769
- var _tmpl$29 = /* @__PURE__ */ web.template(`<div role=tabpanel>`);
1766
+ var _tmpl$28 = /* @__PURE__ */ web.template(`<div role=tabpanel>`);
1770
1767
  var TabsContent = (props) => {
1771
1768
  const [local, rest] = solidJs.splitProps(props, ["value", "class", "appearanceKey", "children"]);
1772
1769
  const style = useStyle();
@@ -1778,7 +1775,7 @@ var TabsContent = (props) => {
1778
1775
  return activeTab() === local.value;
1779
1776
  },
1780
1777
  get children() {
1781
- var _el$ = _tmpl$29();
1778
+ var _el$ = _tmpl$28();
1782
1779
  web.spread(_el$, web.mergeProps({
1783
1780
  get ["class"]() {
1784
1781
  return web.memo(() => !!local.class)() ? local.class : style(local.appearanceKey || "tabsContent", activeTab() === local.value ? "nt-block" : "nt-hidden");
@@ -1865,7 +1862,7 @@ var inboxFilterLocalizationKeys = {
1865
1862
  unread: "inbox.filters.labels.unread",
1866
1863
  archived: "inbox.filters.labels.archived"
1867
1864
  };
1868
- var _tmpl$30 = /* @__PURE__ */ web.template(`<span><span></span><span>`);
1865
+ var _tmpl$29 = /* @__PURE__ */ web.template(`<span><span></span><span>`);
1869
1866
  var _tmpl$210 = /* @__PURE__ */ web.template(`<span>`);
1870
1867
  var cases = [{
1871
1868
  status: "unreadRead" /* UNREAD_READ */,
@@ -1910,7 +1907,7 @@ var StatusItem = (props) => {
1910
1907
  },
1911
1908
  get children() {
1912
1909
  return [(() => {
1913
- var _el$ = _tmpl$30(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
1910
+ var _el$ = _tmpl$29(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
1914
1911
  web.insert(_el$2, () => props.icon());
1915
1912
  web.insert(_el$3, () => t(props.localizationKey));
1916
1913
  web.effect((_p$) => {
@@ -1943,7 +1940,7 @@ var StatusItem = (props) => {
1943
1940
  };
1944
1941
 
1945
1942
  // src/ui/components/elements/InboxStatus/InboxStatusDropdown.tsx
1946
- var _tmpl$31 = /* @__PURE__ */ web.template(`<span>`);
1943
+ var _tmpl$30 = /* @__PURE__ */ web.template(`<span>`);
1947
1944
  var StatusDropdown = () => {
1948
1945
  const style = useStyle();
1949
1946
  const {
@@ -1968,7 +1965,7 @@ var StatusDropdown = () => {
1968
1965
  }, triggerProps, {
1969
1966
  get children() {
1970
1967
  return [(() => {
1971
- var _el$ = _tmpl$31();
1968
+ var _el$ = _tmpl$30();
1972
1969
  web.insert(_el$, () => t(inboxFilterLocalizationKeys[status()]));
1973
1970
  web.effect((_p$) => {
1974
1971
  var _v$ = inboxFilterLocalizationKeys[status()], _v$2 = style("inboxStatus__title", "nt-text-xl nt-font-semibold");
@@ -1981,7 +1978,7 @@ var StatusDropdown = () => {
1981
1978
  });
1982
1979
  return _el$;
1983
1980
  })(), (() => {
1984
- var _el$2 = _tmpl$31();
1981
+ var _el$2 = _tmpl$30();
1985
1982
  web.insert(_el$2, web.createComponent(ArrowDropDown, {}));
1986
1983
  web.effect(() => web.className(_el$2, style("inboxStatus__dropdownItemRight__icon", "nt-text-foreground-alpha-600")));
1987
1984
  return _el$2;
@@ -2012,7 +2009,7 @@ var useNotificationsInfiniteScroll = (props) => {
2012
2009
  }));
2013
2010
  solidJs.onMount(() => {
2014
2011
  const listener = ({ data: data2 }) => {
2015
- if (!data2 || !chunkAALXN67T_js.isSameFilter(filter, data2.filter)) {
2012
+ if (!data2 || !chunkXKQCRZD6_js.isSameFilter(filter, data2.filter)) {
2016
2013
  return;
2017
2014
  }
2018
2015
  mutate({ data: data2.notifications, hasMore: data2.hasMore });
@@ -2022,7 +2019,7 @@ var useNotificationsInfiniteScroll = (props) => {
2022
2019
  });
2023
2020
  solidJs.createEffect(() => {
2024
2021
  const newFilter = chunk7B52C2XE_js.__spreadValues({}, props.options());
2025
- if (chunkAALXN67T_js.isSameFilter(filter, newFilter)) {
2022
+ if (chunkXKQCRZD6_js.isSameFilter(filter, newFilter)) {
2026
2023
  return;
2027
2024
  }
2028
2025
  novu.notifications.clearCache();
@@ -2109,7 +2106,7 @@ var useArchiveAllRead = (props) => {
2109
2106
  };
2110
2107
 
2111
2108
  // src/ui/components/elements/Header/MoreActionsOptions.tsx
2112
- var _tmpl$32 = /* @__PURE__ */ web.template(`<span>`);
2109
+ var _tmpl$31 = /* @__PURE__ */ web.template(`<span>`);
2113
2110
  var MoreActionsOptions = () => {
2114
2111
  const {
2115
2112
  filter
@@ -2157,12 +2154,12 @@ var ActionsItem = (props) => {
2157
2154
  },
2158
2155
  get children() {
2159
2156
  return [(() => {
2160
- var _el$ = _tmpl$32();
2157
+ var _el$ = _tmpl$31();
2161
2158
  web.insert(_el$, () => props.icon());
2162
2159
  web.effect(() => web.className(_el$, style("moreActions__dropdownItemLeft__icon", "nt-text-foreground-alpha-600")));
2163
2160
  return _el$;
2164
2161
  })(), (() => {
2165
- var _el$2 = _tmpl$32();
2162
+ var _el$2 = _tmpl$31();
2166
2163
  web.insert(_el$2, () => t(props.localizationKey));
2167
2164
  web.effect((_p$) => {
2168
2165
  var _v$ = props.localizationKey, _v$2 = style("moreActions__dropdownItemLabel");
@@ -2221,11 +2218,11 @@ var MoreActionsDropdown = () => {
2221
2218
  };
2222
2219
 
2223
2220
  // src/ui/components/elements/Header/ActionsContainer.tsx
2224
- var _tmpl$33 = /* @__PURE__ */ web.template(`<div>`);
2221
+ var _tmpl$32 = /* @__PURE__ */ web.template(`<div>`);
2225
2222
  var ActionsContainer = (props) => {
2226
2223
  const style = useStyle();
2227
2224
  return (() => {
2228
- var _el$ = _tmpl$33();
2225
+ var _el$ = _tmpl$32();
2229
2226
  web.insert(_el$, web.createComponent(MoreActionsDropdown, {}), null);
2230
2227
  web.insert(_el$, web.createComponent(solidJs.Show, {
2231
2228
  get when() {
@@ -2249,11 +2246,11 @@ var ActionsContainer = (props) => {
2249
2246
  };
2250
2247
 
2251
2248
  // src/ui/components/elements/Header/Header.tsx
2252
- var _tmpl$34 = /* @__PURE__ */ web.template(`<div>`);
2249
+ var _tmpl$33 = /* @__PURE__ */ web.template(`<div>`);
2253
2250
  var Header = (props) => {
2254
2251
  const style = useStyle();
2255
2252
  return (() => {
2256
- var _el$ = _tmpl$34();
2253
+ var _el$ = _tmpl$33();
2257
2254
  web.insert(_el$, web.createComponent(StatusDropdown, {}), null);
2258
2255
  web.insert(_el$, web.createComponent(ActionsContainer, {
2259
2256
  get showPreferences() {
@@ -2264,7 +2261,7 @@ var Header = (props) => {
2264
2261
  return _el$;
2265
2262
  })();
2266
2263
  };
2267
- var _tmpl$35 = /* @__PURE__ */ web.template(`<div><div data-localization=preferences.title>`);
2264
+ var _tmpl$34 = /* @__PURE__ */ web.template(`<div><div data-localization=preferences.title>`);
2268
2265
  var _tmpl$211 = /* @__PURE__ */ web.template(`<button>`);
2269
2266
  var PreferencesHeader = (props) => {
2270
2267
  const style = useStyle();
@@ -2272,7 +2269,7 @@ var PreferencesHeader = (props) => {
2272
2269
  t
2273
2270
  } = useLocalization();
2274
2271
  return (() => {
2275
- var _el$ = _tmpl$35(), _el$2 = _el$.firstChild;
2272
+ var _el$ = _tmpl$34(), _el$2 = _el$.firstChild;
2276
2273
  web.insert(_el$, web.createComponent(solidJs.Show, {
2277
2274
  get when() {
2278
2275
  return props.navigateToNotifications;
@@ -2299,7 +2296,7 @@ var PreferencesHeader = (props) => {
2299
2296
  })();
2300
2297
  };
2301
2298
  web.delegateEvents(["click"]);
2302
- var _tmpl$36 = /* @__PURE__ */ web.template(`<div>`);
2299
+ var _tmpl$35 = /* @__PURE__ */ web.template(`<div>`);
2303
2300
  var Root = (props) => {
2304
2301
  const [_, rest] = solidJs.splitProps(props, ["class"]);
2305
2302
  const {
@@ -2315,7 +2312,7 @@ var Root = (props) => {
2315
2312
  },
2316
2313
  children: new Comment(" Powered by Novu - https://novu.co ")
2317
2314
  }), (() => {
2318
- var _el$ = _tmpl$36();
2315
+ var _el$ = _tmpl$35();
2319
2316
  web.spread(_el$, web.mergeProps({
2320
2317
  get id() {
2321
2318
  return `novu-root-${id()}`;
@@ -2327,191 +2324,24 @@ var Root = (props) => {
2327
2324
  return _el$;
2328
2325
  })()];
2329
2326
  };
2330
- var TooltipContext = solidJs.createContext(void 0);
2331
- function TooltipRoot(props) {
2332
- const [reference, setReference] = solidJs.createSignal(null);
2333
- const [floating, setFloating] = solidJs.createSignal(null);
2334
- const position = solidFloatingUi.useFloating(reference, floating, {
2335
- placement: props.placement || "top",
2336
- whileElementsMounted: dom.autoUpdate,
2337
- middleware: [dom.offset(10), dom.flip({
2338
- fallbackPlacements: props.fallbackPlacements || ["bottom"]
2339
- }), dom.shift()]
2340
- });
2341
- const [isOpen, setIsOpen] = useUncontrolledState({
2342
- value: props.open,
2343
- fallbackValue: false
2344
- });
2345
- return web.createComponent(TooltipContext.Provider, {
2346
- value: {
2347
- reference,
2348
- setReference,
2349
- floating,
2350
- setFloating,
2351
- open: isOpen,
2352
- setOpen: setIsOpen,
2353
- floatingStyles: () => {
2354
- var _a, _b;
2355
- return {
2356
- position: position.strategy,
2357
- top: `${(_a = position.y) != null ? _a : 0}px`,
2358
- left: `${(_b = position.x) != null ? _b : 0}px`
2359
- };
2360
- }
2361
- },
2362
- get children() {
2363
- return props.children;
2364
- }
2365
- });
2366
- }
2367
- function useTooltip() {
2368
- const context = solidJs.useContext(TooltipContext);
2369
- if (!context) {
2370
- throw new Error("useTooltip must be used within Tooltip.Root component");
2371
- }
2372
- return context;
2373
- }
2374
-
2375
- // src/ui/components/primitives/Tooltip/TooltipContent.tsx
2376
- var _tmpl$37 = /* @__PURE__ */ web.template(`<div>`);
2377
- var tooltipContentVariants = () => "nt-bg-foreground nt-p-2 nt-shadow-tooltip nt-rounded-lg nt-text-background nt-text-xs";
2378
- var TooltipContentBody = (props) => {
2379
- const {
2380
- open,
2381
- setFloating,
2382
- floating,
2383
- floatingStyles
2384
- } = useTooltip();
2385
- const {
2386
- setActive,
2387
- removeActive
2388
- } = useFocusManager();
2389
- const [local, rest] = solidJs.splitProps(props, ["class", "appearanceKey", "style"]);
2390
- const style = useStyle();
2391
- solidJs.onMount(() => {
2392
- const floatingEl = floating();
2393
- setActive(floatingEl);
2394
- solidJs.onCleanup(() => {
2395
- removeActive(floatingEl);
2396
- });
2397
- });
2398
- return (() => {
2399
- var _el$ = _tmpl$37();
2400
- web.use(setFloating, _el$);
2401
- web.spread(_el$, web.mergeProps({
2402
- get ["class"]() {
2403
- return web.memo(() => !!local.class)() ? local.class : style(local.appearanceKey || "tooltipContent", tooltipContentVariants());
2404
- },
2405
- get style() {
2406
- return chunk7B52C2XE_js.__spreadProps(chunk7B52C2XE_js.__spreadValues({}, floatingStyles()), {
2407
- "z-index": 99999
2408
- });
2409
- },
2410
- get ["data-open"]() {
2411
- return open();
2412
- }
2413
- }, rest), false, false);
2414
- return _el$;
2415
- })();
2416
- };
2417
- var TooltipContent = (props) => {
2418
- const {
2419
- open
2420
- } = useTooltip();
2421
- return web.createComponent(solidJs.Show, {
2422
- get when() {
2423
- return open();
2424
- },
2425
- get children() {
2426
- return web.createComponent(web.Portal, {
2427
- get children() {
2428
- return web.createComponent(Root, {
2429
- get children() {
2430
- return web.createComponent(TooltipContentBody, props);
2431
- }
2432
- });
2433
- }
2434
- });
2435
- }
2436
- });
2437
- };
2438
- var _tmpl$38 = /* @__PURE__ */ web.template(`<button>`);
2439
- var TooltipTrigger = (props) => {
2440
- const {
2441
- setReference,
2442
- setOpen
2443
- } = useTooltip();
2444
- const style = useStyle();
2445
- const [local, rest] = solidJs.splitProps(props, ["appearanceKey", "asChild", "onClick"]);
2446
- if (local.asChild) {
2447
- return web.createComponent(web.Dynamic, web.mergeProps({
2448
- get component() {
2449
- return local.asChild;
2450
- },
2451
- ref: setReference,
2452
- onMouseEnter: () => {
2453
- setOpen(true);
2454
- },
2455
- onMouseLeave: () => {
2456
- setOpen(false);
2457
- }
2458
- }, rest));
2459
- }
2460
- return (() => {
2461
- var _el$ = _tmpl$38();
2462
- _el$.addEventListener("mouseleave", () => {
2463
- setOpen(false);
2464
- });
2465
- _el$.addEventListener("mouseenter", () => {
2466
- setOpen(true);
2467
- });
2468
- web.use(setReference, _el$);
2469
- web.spread(_el$, web.mergeProps({
2470
- get ["class"]() {
2471
- return style(local.appearanceKey || "tooltipTrigger");
2472
- }
2473
- }, rest), false, true);
2474
- web.insert(_el$, () => props.children);
2475
- return _el$;
2476
- })();
2477
- };
2478
-
2479
- // src/ui/components/primitives/Tooltip/index.ts
2480
- var Tooltip = {
2481
- Root: TooltipRoot,
2482
- /**
2483
- * Tooltip.Trigger renders a `button` and has no default styling.
2484
- */
2485
- Trigger: TooltipTrigger,
2486
- /**
2487
- * Tooltip.Content renders a `div` and has popover specific styling.
2488
- */
2489
- Content: TooltipContent
2490
- };
2491
- var _tmpl$39 = /* @__PURE__ */ web.template(`<label><input type=checkbox class="nt-peer nt-sr-only"><div>`);
2327
+ var _tmpl$36 = /* @__PURE__ */ web.template(`<label><input type=checkbox class="nt-peer nt-sr-only"><div>`);
2492
2328
  var Switch = (props) => {
2493
2329
  const style = useStyle();
2494
2330
  return (() => {
2495
- var _el$ = _tmpl$39(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2331
+ var _el$ = _tmpl$36(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2496
2332
  _el$2.addEventListener("change", (e) => {
2497
2333
  props.onChange(e.target.checked);
2498
2334
  });
2499
2335
  web.effect((_p$) => {
2500
- var _v$ = style("channelSwitch", `nt-relative 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 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 data-[disabled=true]:nt-opacity-40`), _v$5 = props.disabled, _v$6 = props.checked;
2336
+ 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;
2501
2337
  _v$ !== _p$.e && web.className(_el$, _p$.e = _v$);
2502
- _v$2 !== _p$.t && web.setAttribute(_el$, "data-disabled", _p$.t = _v$2);
2503
- _v$3 !== _p$.a && (_el$2.disabled = _p$.a = _v$3);
2504
- _v$4 !== _p$.o && web.className(_el$3, _p$.o = _v$4);
2505
- _v$5 !== _p$.i && web.setAttribute(_el$3, "data-disabled", _p$.i = _v$5);
2506
- _v$6 !== _p$.n && web.setAttribute(_el$3, "data-checked", _p$.n = _v$6);
2338
+ _v$2 !== _p$.t && web.className(_el$3, _p$.t = _v$2);
2339
+ _v$3 !== _p$.a && web.setAttribute(_el$3, "data-checked", _p$.a = _v$3);
2507
2340
  return _p$;
2508
2341
  }, {
2509
2342
  e: void 0,
2510
2343
  t: void 0,
2511
- a: void 0,
2512
- o: void 0,
2513
- i: void 0,
2514
- n: void 0
2344
+ a: void 0
2515
2345
  });
2516
2346
  web.effect(() => _el$2.checked = props.checked);
2517
2347
  return _el$;
@@ -2519,13 +2349,10 @@ var Switch = (props) => {
2519
2349
  };
2520
2350
 
2521
2351
  // src/ui/components/elements/Preferences/ChannelRow.tsx
2522
- var _tmpl$40 = /* @__PURE__ */ web.template(`<div><div><div></div><span></span></div><div>`);
2352
+ var _tmpl$37 = /* @__PURE__ */ web.template(`<div><div><div></div><span></span></div><div>`);
2523
2353
  var ChannelRow = (props) => {
2524
2354
  const style = useStyle();
2525
2355
  const updatePreference = (enabled) => chunk7B52C2XE_js.__async(void 0, null, function* () {
2526
- if (props.isCritical) {
2527
- return;
2528
- }
2529
2356
  props.onChange({
2530
2357
  channel: props.channel,
2531
2358
  enabled,
@@ -2536,7 +2363,7 @@ var ChannelRow = (props) => {
2536
2363
  updatePreference(checked);
2537
2364
  };
2538
2365
  return (() => {
2539
- var _el$ = _tmpl$40(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
2366
+ var _el$ = _tmpl$37(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
2540
2367
  web.insert(_el$3, web.createComponent(ChannelIcon, {
2541
2368
  get channel() {
2542
2369
  return props.channel;
@@ -2547,25 +2374,20 @@ var ChannelRow = (props) => {
2547
2374
  get checked() {
2548
2375
  return props.enabled;
2549
2376
  },
2550
- onChange: (checked) => onChange(checked),
2551
- get disabled() {
2552
- return props.isCritical;
2553
- }
2377
+ onChange: (checked) => onChange(checked)
2554
2378
  }));
2555
2379
  web.effect((_p$) => {
2556
- 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");
2380
+ 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");
2557
2381
  _v$ !== _p$.e && web.className(_el$, _p$.e = _v$);
2558
- _v$2 !== _p$.t && web.setAttribute(_el$, "data-disabled", _p$.t = _v$2);
2559
- _v$3 !== _p$.a && web.className(_el$2, _p$.a = _v$3);
2560
- _v$4 !== _p$.o && web.className(_el$4, _p$.o = _v$4);
2561
- _v$5 !== _p$.i && web.className(_el$5, _p$.i = _v$5);
2382
+ _v$2 !== _p$.t && web.className(_el$2, _p$.t = _v$2);
2383
+ _v$3 !== _p$.a && web.className(_el$4, _p$.a = _v$3);
2384
+ _v$4 !== _p$.o && web.className(_el$5, _p$.o = _v$4);
2562
2385
  return _p$;
2563
2386
  }, {
2564
2387
  e: void 0,
2565
2388
  t: void 0,
2566
2389
  a: void 0,
2567
- o: void 0,
2568
- i: void 0
2390
+ o: void 0
2569
2391
  });
2570
2392
  return _el$;
2571
2393
  })();
@@ -2602,11 +2424,11 @@ var getLabel = (channel) => {
2602
2424
  return "";
2603
2425
  }
2604
2426
  };
2605
- var _tmpl$41 = /* @__PURE__ */ web.template(`<div>`);
2427
+ var _tmpl$38 = /* @__PURE__ */ web.template(`<div>`);
2606
2428
  var SkeletonText = (props) => {
2607
2429
  const style = useStyle();
2608
2430
  return (() => {
2609
- var _el$ = _tmpl$41();
2431
+ var _el$ = _tmpl$38();
2610
2432
  web.effect(() => web.className(_el$, style(props.appearanceKey, cn("nt-w-full nt-h-3 nt-rounded nt-bg-foreground-alpha-100", props.class))));
2611
2433
  return _el$;
2612
2434
  })();
@@ -2614,14 +2436,14 @@ var SkeletonText = (props) => {
2614
2436
  var SkeletonAvatar = (props) => {
2615
2437
  const style = useStyle();
2616
2438
  return (() => {
2617
- var _el$2 = _tmpl$41();
2439
+ var _el$2 = _tmpl$38();
2618
2440
  web.effect(() => web.className(_el$2, style(props.appearanceKey, cn("nt-size-8 nt-rounded-lg nt-bg-foreground-alpha-100", props.class))));
2619
2441
  return _el$2;
2620
2442
  })();
2621
2443
  };
2622
2444
 
2623
2445
  // src/ui/components/elements/Preferences/LoadingScreen.tsx
2624
- var _tmpl$42 = /* @__PURE__ */ web.template(`<div><div class="nt-flex nt-flex-col nt-self-stretch nt-gap-1 nt-flex-1"></div><div>`);
2446
+ var _tmpl$39 = /* @__PURE__ */ web.template(`<div><div class="nt-flex nt-flex-col nt-self-stretch nt-gap-1 nt-flex-1"></div><div>`);
2625
2447
  var LoadingScreen = () => {
2626
2448
  return web.createComponent(solidJs.For, {
2627
2449
  get each() {
@@ -2635,7 +2457,7 @@ var LoadingScreen = () => {
2635
2457
  var LoadingSkeleton = () => {
2636
2458
  const style = useStyle();
2637
2459
  return (() => {
2638
- var _el$ = _tmpl$42(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2460
+ var _el$ = _tmpl$39(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
2639
2461
  web.insert(_el$2, web.createComponent(SkeletonText, {
2640
2462
  appearanceKey: "skeletonText",
2641
2463
  "class": "nt-w-1/3"
@@ -2651,10 +2473,9 @@ var LoadingSkeleton = () => {
2651
2473
  };
2652
2474
 
2653
2475
  // src/ui/components/elements/Preferences/Preferences.tsx
2654
- var _tmpl$43 = /* @__PURE__ */ web.template(`<div>`);
2476
+ var _tmpl$40 = /* @__PURE__ */ web.template(`<div>`);
2655
2477
  var _tmpl$212 = /* @__PURE__ */ web.template(`<span>`);
2656
- var _tmpl$310 = /* @__PURE__ */ web.template(`<span data-localization=preferences.workflow.disabled.notice>`);
2657
- var _tmpl$44 = /* @__PURE__ */ web.template(`<div><div><div><div></div></div><span>`);
2478
+ var _tmpl$310 = /* @__PURE__ */ web.template(`<div><div><div><div></div></div><span>`);
2658
2479
  var Preferences = () => {
2659
2480
  var _a;
2660
2481
  const style = useStyle();
@@ -2701,7 +2522,7 @@ var Preferences = () => {
2701
2522
  });
2702
2523
  };
2703
2524
  return (() => {
2704
- var _el$ = _tmpl$43();
2525
+ var _el$ = _tmpl$40();
2705
2526
  web.insert(_el$, web.createComponent(solidJs.Show, {
2706
2527
  get when() {
2707
2528
  return loading();
@@ -2749,10 +2570,6 @@ var Preferences = () => {
2749
2570
  },
2750
2571
  get onChange() {
2751
2572
  return optimisticUpdate(preference());
2752
- },
2753
- get isCritical() {
2754
- var _a2;
2755
- return (_a2 = preference().workflow) == null ? void 0 : _a2.critical;
2756
2573
  }
2757
2574
  });
2758
2575
  }
@@ -2783,7 +2600,7 @@ var ChannelsLabel = (props) => {
2783
2600
  return channels.map((c, index) => [c, web.memo(() => index < channels.length - 1 && ", ")]);
2784
2601
  };
2785
2602
  return (() => {
2786
- var _el$3 = _tmpl$43();
2603
+ var _el$3 = _tmpl$40();
2787
2604
  web.insert(_el$3, channelNames);
2788
2605
  web.effect(() => web.className(_el$3, style("channelDescription", "nt-text-sm nt-text-foreground-alpha-600 nt-text-start")));
2789
2606
  return _el$3;
@@ -2801,37 +2618,9 @@ var PreferencesRow = (props) => {
2801
2618
  return channels().length > 0;
2802
2619
  },
2803
2620
  get children() {
2804
- 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;
2621
+ 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;
2805
2622
  _el$5.$$click = () => setIsOpen((prev) => !prev);
2806
- web.insert(_el$7, web.createComponent(solidJs.Show, {
2807
- get when() {
2808
- return props.isCritical;
2809
- },
2810
- get children() {
2811
- return web.createComponent(Tooltip.Root, {
2812
- get children() {
2813
- return [web.createComponent(Tooltip.Trigger, {
2814
- asChild: (childProps) => (() => {
2815
- var _el$11 = _tmpl$212();
2816
- web.spread(_el$11, web.mergeProps({
2817
- get ["class"]() {
2818
- return style("workflowLabelDisabled__icon", "nt-text-foreground-alpha-600");
2819
- }
2820
- }, childProps), false, true);
2821
- web.insert(_el$11, web.createComponent(Lock, {}));
2822
- return _el$11;
2823
- })()
2824
- }), web.createComponent(Tooltip.Content, {
2825
- "data-localization": "preferences.workflow.disabled.tooltip",
2826
- get children() {
2827
- return t("preferences.workflow.disabled.tooltip");
2828
- }
2829
- })];
2830
- }
2831
- });
2832
- }
2833
- }), null);
2834
- web.insert(_el$7, () => t(props.localizationKey), null);
2623
+ web.insert(_el$7, () => t(props.localizationKey));
2835
2624
  web.insert(_el$6, web.createComponent(ChannelsLabel, {
2836
2625
  get channels() {
2837
2626
  return props.channels;
@@ -2865,18 +2654,7 @@ var PreferencesRow = (props) => {
2865
2654
  return style("channelsContainerCollapsible", "nt-grid nt-self-stretch");
2866
2655
  },
2867
2656
  get children() {
2868
- var _el$9 = _tmpl$43();
2869
- web.insert(_el$9, web.createComponent(solidJs.Show, {
2870
- get when() {
2871
- return props.isCritical;
2872
- },
2873
- get children() {
2874
- var _el$10 = _tmpl$310();
2875
- web.insert(_el$10, () => t("preferences.workflow.disabled.notice"));
2876
- web.effect(() => web.className(_el$10, style("workflowContainerDisabledNotice", "nt-text-sm nt-text-foreground-alpha-600 nt-text-start")));
2877
- return _el$10;
2878
- }
2879
- }), null);
2657
+ var _el$9 = _tmpl$40();
2880
2658
  web.insert(_el$9, web.createComponent(solidJs.For, {
2881
2659
  get each() {
2882
2660
  return channels();
@@ -2891,12 +2669,9 @@ var PreferencesRow = (props) => {
2891
2669
  },
2892
2670
  get onChange() {
2893
2671
  return props.onChange;
2894
- },
2895
- get isCritical() {
2896
- return props.isCritical;
2897
2672
  }
2898
2673
  })
2899
- }), null);
2674
+ }));
2900
2675
  web.effect(() => web.className(_el$9, style("channelsContainer", "nt-overflow-hidden nt-flex-col nt-gap-1")));
2901
2676
  return _el$9;
2902
2677
  }
@@ -2906,20 +2681,16 @@ var PreferencesRow = (props) => {
2906
2681
  }
2907
2682
  }), null);
2908
2683
  web.effect((_p$) => {
2909
- 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 = 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();
2684
+ 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();
2910
2685
  _v$ !== _p$.e && web.className(_el$4, _p$.e = _v$);
2911
- _v$2 !== _p$.t && web.setAttribute(_el$4, "data-disabled", _p$.t = _v$2);
2912
- _v$3 !== _p$.a && web.setAttribute(_el$4, "data-open", _p$.a = _v$3);
2913
- _v$4 !== _p$.o && web.className(_el$5, _p$.o = _v$4);
2914
- _v$5 !== _p$.i && web.setAttribute(_el$5, "data-disabled", _p$.i = _v$5);
2915
- _v$6 !== _p$.n && web.setAttribute(_el$5, "data-open", _p$.n = _v$6);
2916
- _v$7 !== _p$.s && web.className(_el$7, _p$.s = _v$7);
2917
- _v$8 !== _p$.h && web.setAttribute(_el$7, "data-disabled", _p$.h = _v$8);
2918
- _v$9 !== _p$.r && web.setAttribute(_el$7, "data-localization", _p$.r = _v$9);
2919
- _v$10 !== _p$.d && web.setAttribute(_el$7, "data-open", _p$.d = _v$10);
2920
- _v$11 !== _p$.l && web.className(_el$8, _p$.l = _v$11);
2921
- _v$12 !== _p$.u && web.setAttribute(_el$8, "data-disabled", _p$.u = _v$12);
2922
- _v$13 !== _p$.c && web.setAttribute(_el$8, "data-open", _p$.c = _v$13);
2686
+ _v$2 !== _p$.t && web.setAttribute(_el$4, "data-open", _p$.t = _v$2);
2687
+ _v$3 !== _p$.a && web.className(_el$5, _p$.a = _v$3);
2688
+ _v$4 !== _p$.o && web.setAttribute(_el$5, "data-open", _p$.o = _v$4);
2689
+ _v$5 !== _p$.i && web.className(_el$7, _p$.i = _v$5);
2690
+ _v$6 !== _p$.n && web.setAttribute(_el$7, "data-localization", _p$.n = _v$6);
2691
+ _v$7 !== _p$.s && web.setAttribute(_el$7, "data-open", _p$.s = _v$7);
2692
+ _v$8 !== _p$.h && web.className(_el$8, _p$.h = _v$8);
2693
+ _v$9 !== _p$.r && web.setAttribute(_el$8, "data-open", _p$.r = _v$9);
2923
2694
  return _p$;
2924
2695
  }, {
2925
2696
  e: void 0,
@@ -2930,53 +2701,19 @@ var PreferencesRow = (props) => {
2930
2701
  n: void 0,
2931
2702
  s: void 0,
2932
2703
  h: void 0,
2933
- r: void 0,
2934
- d: void 0,
2935
- l: void 0,
2936
- u: void 0,
2937
- c: void 0
2704
+ r: void 0
2938
2705
  });
2939
2706
  return _el$4;
2940
2707
  }
2941
2708
  });
2942
2709
  };
2943
2710
  web.delegateEvents(["click"]);
2944
- var _tmpl$45 = /* @__PURE__ */ web.template(`<strong>`);
2711
+ var _tmpl$41 = /* @__PURE__ */ web.template(`<strong>`);
2945
2712
  var _tmpl$213 = /* @__PURE__ */ web.template(`<p>`);
2946
- var parseMarkdownIntoTokens = (text) => {
2947
- const tokens = [];
2948
- let buffer = "";
2949
- let inBold = false;
2950
- for (let i = 0; i < text.length; i += 1) {
2951
- if (text[i] === "\\" && text[i + 1] === "*") {
2952
- buffer += "*";
2953
- i += 1;
2954
- } else if (text[i] === "*" && text[i + 1] === "*") {
2955
- if (buffer) {
2956
- tokens.push({
2957
- type: inBold ? "bold" : "text",
2958
- content: buffer
2959
- });
2960
- buffer = "";
2961
- }
2962
- inBold = !inBold;
2963
- i += 1;
2964
- } else {
2965
- buffer += text[i];
2966
- }
2967
- }
2968
- if (buffer) {
2969
- tokens.push({
2970
- type: inBold ? "bold" : "text",
2971
- content: buffer
2972
- });
2973
- }
2974
- return tokens;
2975
- };
2976
2713
  var Bold = (props) => {
2977
2714
  const style = useStyle();
2978
2715
  return (() => {
2979
- var _el$ = _tmpl$45();
2716
+ var _el$ = _tmpl$41();
2980
2717
  web.insert(_el$, () => props.children);
2981
2718
  web.effect(() => web.className(_el$, style(props.appearanceKey || "strong", "nt-font-semibold")));
2982
2719
  return _el$;
@@ -2991,7 +2728,7 @@ var Markdown = (props) => {
2991
2728
  "children",
2992
2729
  "strongAppearanceKey"
2993
2730
  ]);
2994
- const tokens = solidJs.createMemo(() => parseMarkdownIntoTokens(children));
2731
+ const tokens = solidJs.createMemo(() => chunkERC62PGI_js.parseMarkdownIntoTokens(children));
2995
2732
  return (() => {
2996
2733
  var _el$2 = _tmpl$213();
2997
2734
  web.spread(_el$2, rest, false, true);
@@ -3020,9 +2757,170 @@ var Markdown = (props) => {
3020
2757
  })();
3021
2758
  };
3022
2759
  var Markdown_default = Markdown;
2760
+ var TooltipContext = solidJs.createContext(void 0);
2761
+ function TooltipRoot(props) {
2762
+ const [reference, setReference] = solidJs.createSignal(null);
2763
+ const [floating, setFloating] = solidJs.createSignal(null);
2764
+ const position = solidFloatingUi.useFloating(reference, floating, {
2765
+ placement: props.placement || "top",
2766
+ whileElementsMounted: dom.autoUpdate,
2767
+ middleware: [dom.offset(10), dom.flip({
2768
+ fallbackPlacements: props.fallbackPlacements || ["bottom"]
2769
+ }), dom.shift()]
2770
+ });
2771
+ const [isOpen, setIsOpen] = useUncontrolledState({
2772
+ value: props.open,
2773
+ fallbackValue: false
2774
+ });
2775
+ return web.createComponent(TooltipContext.Provider, {
2776
+ value: {
2777
+ reference,
2778
+ setReference,
2779
+ floating,
2780
+ setFloating,
2781
+ open: isOpen,
2782
+ setOpen: setIsOpen,
2783
+ floatingStyles: () => {
2784
+ var _a, _b;
2785
+ return {
2786
+ position: position.strategy,
2787
+ top: `${(_a = position.y) != null ? _a : 0}px`,
2788
+ left: `${(_b = position.x) != null ? _b : 0}px`
2789
+ };
2790
+ }
2791
+ },
2792
+ get children() {
2793
+ return props.children;
2794
+ }
2795
+ });
2796
+ }
2797
+ function useTooltip() {
2798
+ const context = solidJs.useContext(TooltipContext);
2799
+ if (!context) {
2800
+ throw new Error("useTooltip must be used within Tooltip.Root component");
2801
+ }
2802
+ return context;
2803
+ }
2804
+
2805
+ // src/ui/components/primitives/Tooltip/TooltipContent.tsx
2806
+ var _tmpl$42 = /* @__PURE__ */ web.template(`<div>`);
2807
+ var tooltipContentVariants = () => "nt-bg-foreground nt-p-2 nt-shadow-tooltip nt-rounded-lg nt-text-background nt-text-xs";
2808
+ var TooltipContentBody = (props) => {
2809
+ const {
2810
+ open,
2811
+ setFloating,
2812
+ floating,
2813
+ floatingStyles
2814
+ } = useTooltip();
2815
+ const {
2816
+ setActive,
2817
+ removeActive
2818
+ } = useFocusManager();
2819
+ const [local, rest] = solidJs.splitProps(props, ["class", "appearanceKey", "style"]);
2820
+ const style = useStyle();
2821
+ solidJs.onMount(() => {
2822
+ const floatingEl = floating();
2823
+ setActive(floatingEl);
2824
+ solidJs.onCleanup(() => {
2825
+ removeActive(floatingEl);
2826
+ });
2827
+ });
2828
+ return (() => {
2829
+ var _el$ = _tmpl$42();
2830
+ web.use(setFloating, _el$);
2831
+ web.spread(_el$, web.mergeProps({
2832
+ get ["class"]() {
2833
+ return web.memo(() => !!local.class)() ? local.class : style(local.appearanceKey || "tooltipContent", tooltipContentVariants());
2834
+ },
2835
+ get style() {
2836
+ return chunk7B52C2XE_js.__spreadProps(chunk7B52C2XE_js.__spreadValues({}, floatingStyles()), {
2837
+ "z-index": 99999
2838
+ });
2839
+ },
2840
+ get ["data-open"]() {
2841
+ return open();
2842
+ }
2843
+ }, rest), false, false);
2844
+ return _el$;
2845
+ })();
2846
+ };
2847
+ var TooltipContent = (props) => {
2848
+ const {
2849
+ open
2850
+ } = useTooltip();
2851
+ return web.createComponent(solidJs.Show, {
2852
+ get when() {
2853
+ return open();
2854
+ },
2855
+ get children() {
2856
+ return web.createComponent(web.Portal, {
2857
+ get children() {
2858
+ return web.createComponent(Root, {
2859
+ get children() {
2860
+ return web.createComponent(TooltipContentBody, props);
2861
+ }
2862
+ });
2863
+ }
2864
+ });
2865
+ }
2866
+ });
2867
+ };
2868
+ var _tmpl$43 = /* @__PURE__ */ web.template(`<button>`);
2869
+ var TooltipTrigger = (props) => {
2870
+ const {
2871
+ setReference,
2872
+ setOpen
2873
+ } = useTooltip();
2874
+ const style = useStyle();
2875
+ const [local, rest] = solidJs.splitProps(props, ["appearanceKey", "asChild", "onClick"]);
2876
+ if (local.asChild) {
2877
+ return web.createComponent(web.Dynamic, web.mergeProps({
2878
+ get component() {
2879
+ return local.asChild;
2880
+ },
2881
+ ref: setReference,
2882
+ onMouseEnter: () => {
2883
+ setOpen(true);
2884
+ },
2885
+ onMouseLeave: () => {
2886
+ setOpen(false);
2887
+ }
2888
+ }, rest));
2889
+ }
2890
+ return (() => {
2891
+ var _el$ = _tmpl$43();
2892
+ _el$.addEventListener("mouseleave", () => {
2893
+ setOpen(false);
2894
+ });
2895
+ _el$.addEventListener("mouseenter", () => {
2896
+ setOpen(true);
2897
+ });
2898
+ web.use(setReference, _el$);
2899
+ web.spread(_el$, web.mergeProps({
2900
+ get ["class"]() {
2901
+ return style(local.appearanceKey || "tooltipTrigger");
2902
+ }
2903
+ }, rest), false, true);
2904
+ web.insert(_el$, () => props.children);
2905
+ return _el$;
2906
+ })();
2907
+ };
2908
+
2909
+ // src/ui/components/primitives/Tooltip/index.ts
2910
+ var Tooltip = {
2911
+ Root: TooltipRoot,
2912
+ /**
2913
+ * Tooltip.Trigger renders a `button` and has no default styling.
2914
+ */
2915
+ Trigger: TooltipTrigger,
2916
+ /**
2917
+ * Tooltip.Content renders a `div` and has popover specific styling.
2918
+ */
2919
+ Content: TooltipContent
2920
+ };
3023
2921
 
3024
2922
  // src/ui/components/Notification/DefaultNotification.tsx
3025
- var _tmpl$46 = /* @__PURE__ */ web.template(`<span>`);
2923
+ var _tmpl$44 = /* @__PURE__ */ web.template(`<span>`);
3026
2924
  var _tmpl$214 = /* @__PURE__ */ web.template(`<img>`);
3027
2925
  var _tmpl$311 = /* @__PURE__ */ web.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>`);
3028
2926
  var DefaultNotification = (props) => {
@@ -3080,7 +2978,7 @@ var DefaultNotification = (props) => {
3080
2978
  return !props.notification.isRead;
3081
2979
  },
3082
2980
  get children() {
3083
- var _el$2 = _tmpl$46();
2981
+ var _el$2 = _tmpl$44();
3084
2982
  web.effect(() => web.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")));
3085
2983
  return _el$2;
3086
2984
  }
@@ -3126,7 +3024,7 @@ var DefaultNotification = (props) => {
3126
3024
  e.stopPropagation();
3127
3025
  props.notification.read();
3128
3026
  },
3129
- "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3027
+ "class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
3130
3028
  get children() {
3131
3029
  return web.createComponent(ReadAll, {});
3132
3030
  }
@@ -3153,7 +3051,7 @@ var DefaultNotification = (props) => {
3153
3051
  e.stopPropagation();
3154
3052
  props.notification.unread();
3155
3053
  },
3156
- "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3054
+ "class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
3157
3055
  get children() {
3158
3056
  return web.createComponent(Unread, {});
3159
3057
  }
@@ -3187,7 +3085,7 @@ var DefaultNotification = (props) => {
3187
3085
  e.stopPropagation();
3188
3086
  props.notification.archive();
3189
3087
  },
3190
- "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3088
+ "class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
3191
3089
  get children() {
3192
3090
  return web.createComponent(Archive, {});
3193
3091
  }
@@ -3214,7 +3112,7 @@ var DefaultNotification = (props) => {
3214
3112
  e.stopPropagation();
3215
3113
  props.notification.unarchive();
3216
3114
  },
3217
- "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3115
+ "class": "hover:nt-bg-neutral-alpha-50 nt-p-0.5",
3218
3116
  get children() {
3219
3117
  return web.createComponent(Unarchive, {});
3220
3118
  }
@@ -3284,7 +3182,7 @@ var DefaultNotification = (props) => {
3284
3182
  var _a;
3285
3183
  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", {
3286
3184
  "nt-cursor-pointer": !props.notification.isRead || !!((_a = props.notification.redirect) == null ? void 0 : _a.url)
3287
- })), _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`), _v$7 = style("notificationCustomActions", "nt-flex nt-flex-wrap nt-gap-4 nt-mt-4");
3185
+ })), _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");
3288
3186
  _v$3 !== _p$.e && web.className(_el$, _p$.e = _v$3);
3289
3187
  _v$4 !== _p$.t && web.className(_el$4, _p$.t = _v$4);
3290
3188
  _v$5 !== _p$.a && web.className(_el$6, _p$.a = _v$5);
@@ -3332,10 +3230,10 @@ var Notification = (props) => {
3332
3230
  }
3333
3231
  });
3334
3232
  };
3335
- var _tmpl$47 = /* @__PURE__ */ web.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">`);
3233
+ var _tmpl$45 = /* @__PURE__ */ web.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">`);
3336
3234
  function EmptyIcon(props) {
3337
3235
  return (() => {
3338
- var _el$ = _tmpl$47();
3236
+ var _el$ = _tmpl$45();
3339
3237
  web.spread(_el$, props, true, true);
3340
3238
  return _el$;
3341
3239
  })();
@@ -3366,10 +3264,10 @@ var NewMessagesCta = (props) => {
3366
3264
  }
3367
3265
  });
3368
3266
  };
3369
- var _tmpl$48 = /* @__PURE__ */ web.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">`);
3267
+ var _tmpl$46 = /* @__PURE__ */ web.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">`);
3370
3268
  var NotificationSkeleton = () => {
3371
3269
  return (() => {
3372
- var _el$ = _tmpl$48(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
3270
+ var _el$ = _tmpl$46(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
3373
3271
  web.insert(_el$, web.createComponent(SkeletonAvatar, {
3374
3272
  appearanceKey: "skeletonAvatar"
3375
3273
  }), _el$2);
@@ -3406,7 +3304,7 @@ var NotificationListSkeleton = (props) => {
3406
3304
  };
3407
3305
 
3408
3306
  // src/ui/components/Notification/NotificationList.tsx
3409
- var _tmpl$49 = /* @__PURE__ */ web.template(`<div><p data-localization=notifications.emptyNotice>`);
3307
+ var _tmpl$47 = /* @__PURE__ */ web.template(`<div><p data-localization=notifications.emptyNotice>`);
3410
3308
  var _tmpl$215 = /* @__PURE__ */ web.template(`<div>`);
3411
3309
  var _tmpl$312 = /* @__PURE__ */ web.template(`<div><div>`);
3412
3310
  var EmptyNotificationList = () => {
@@ -3415,7 +3313,7 @@ var EmptyNotificationList = () => {
3415
3313
  t
3416
3314
  } = useLocalization();
3417
3315
  return (() => {
3418
- var _el$ = _tmpl$49(), _el$2 = _el$.firstChild;
3316
+ var _el$ = _tmpl$47(), _el$2 = _el$.firstChild;
3419
3317
  web.insert(_el$, web.createComponent(EmptyIcon, {
3420
3318
  get ["class"]() {
3421
3319
  return style("notificationListEmptyNoticeIcon");
@@ -3562,13 +3460,13 @@ var NotificationList = (props) => {
3562
3460
  return _el$3;
3563
3461
  })();
3564
3462
  };
3565
- var _tmpl$50 = /* @__PURE__ */ web.template(`<span>`);
3463
+ var _tmpl$48 = /* @__PURE__ */ web.template(`<span>`);
3566
3464
  var getDisplayCount = (count) => count >= 100 ? "99+" : count;
3567
3465
  var InboxTabUnreadNotificationsCount = (props) => {
3568
3466
  const style = useStyle();
3569
3467
  const displayCount = solidJs.createMemo(() => getDisplayCount(props.count));
3570
3468
  return (() => {
3571
- var _el$ = _tmpl$50();
3469
+ var _el$ = _tmpl$48();
3572
3470
  web.insert(_el$, displayCount);
3573
3471
  web.effect(() => web.className(_el$, style("notificationsTabsTriggerCount", "nt-rounded-full nt-bg-counter nt-px-[6px] nt-text-counter-foreground nt-text-sm")));
3574
3472
  return _el$;
@@ -3593,7 +3491,7 @@ var InboxTab = (props) => {
3593
3491
  },
3594
3492
  get children() {
3595
3493
  return [(() => {
3596
- var _el$2 = _tmpl$50();
3494
+ var _el$2 = _tmpl$48();
3597
3495
  web.insert(_el$2, () => props.label);
3598
3496
  web.effect(() => web.className(_el$2, style("notificationsTabsTriggerLabel", "nt-text-sm nt-font-medium")));
3599
3497
  return _el$2;
@@ -3628,7 +3526,7 @@ var InboxDropdownTab = (props) => {
3628
3526
  },
3629
3527
  get children() {
3630
3528
  return [(() => {
3631
- var _el$3 = _tmpl$50();
3529
+ var _el$3 = _tmpl$48();
3632
3530
  web.insert(_el$3, () => props.label);
3633
3531
  web.effect(() => web.className(_el$3, style("moreTabs__dropdownItemLabel", "nt-mr-auto")));
3634
3532
  return _el$3;
@@ -3828,7 +3726,7 @@ var InboxTabs = (props) => {
3828
3726
  };
3829
3727
 
3830
3728
  // src/ui/components/Inbox.tsx
3831
- var _tmpl$51 = /* @__PURE__ */ web.template(`<div>`);
3729
+ var _tmpl$49 = /* @__PURE__ */ web.template(`<div>`);
3832
3730
  var InboxPage = /* @__PURE__ */ function(InboxPage2) {
3833
3731
  InboxPage2["Notifications"] = "notifications";
3834
3732
  InboxPage2["Preferences"] = "preferences";
@@ -3850,7 +3748,7 @@ var InboxContent = (props) => {
3850
3748
  };
3851
3749
  });
3852
3750
  return (() => {
3853
- var _el$ = _tmpl$51();
3751
+ var _el$ = _tmpl$49();
3854
3752
  web.insert(_el$, web.createComponent(solidJs.Switch, {
3855
3753
  get children() {
3856
3754
  return [web.createComponent(solidJs.Match, {
@@ -4097,7 +3995,7 @@ var Renderer = (props) => {
4097
3995
  }
4098
3996
  });
4099
3997
  };
4100
- var version = "2.3.1";
3998
+ var version = "2.4.0";
4101
3999
  var cssHref = `https://cdn.jsdelivr.net/npm/@novu/js@${version}/dist/index.css`;
4102
4000
  var _dispose, _rootElement, _mountedElements, _setMountedElements, _appearance, _setAppearance, _localization, _setLocalization, _options, _setOptions, _tabs, _setTabs, _routerPush, _setRouterPush, _preferencesFilter, _setPreferencesFilter, _predefinedNovu, _NovuUI_instances, mountComponentRenderer_fn, updateComponentProps_fn;
4103
4001
  var NovuUI = class {