@ixo/ui 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/.vite/manifest.json +31 -31
  2. package/dist/components/AppShellNavigation/components/MenuItem.d.ts +2 -1
  3. package/dist/components/AppShellNavigation/components/MenuItem.d.ts.map +1 -1
  4. package/dist/components/AppShellNavigation/components/RoomCategory.d.ts +10 -4
  5. package/dist/components/AppShellNavigation/components/RoomCategory.d.ts.map +1 -1
  6. package/dist/components/AppShellNavigation/components/RoomItem.d.ts +10 -1
  7. package/dist/components/AppShellNavigation/components/RoomItem.d.ts.map +1 -1
  8. package/dist/components/AppShellNavigation/index.d.ts.map +1 -1
  9. package/dist/components/IconButton/index.d.ts +2 -0
  10. package/dist/components/IconButton/index.d.ts.map +1 -1
  11. package/dist/components/MoreMenu/components/Item/index.d.ts +1 -1
  12. package/dist/components/MoreMenu/components/Item/index.d.ts.map +1 -1
  13. package/dist/components/MoreMenu/components/Item/types.d.ts +8 -2
  14. package/dist/components/MoreMenu/components/Item/types.d.ts.map +1 -1
  15. package/dist/components/MoreMenu/index.d.ts.map +1 -1
  16. package/dist/components/MoreMenu/types.d.ts +2 -2
  17. package/dist/components/MoreMenu/types.d.ts.map +1 -1
  18. package/dist/{components-Bhg-kj6Z.js → components-BTh3OZP_.js} +182 -124
  19. package/dist/components-BTh3OZP_.js.map +1 -0
  20. package/dist/{components-YkshqT-o.cjs → components-t3g1EGWM.cjs} +181 -123
  21. package/dist/components-t3g1EGWM.cjs.map +1 -0
  22. package/dist/export/components.cjs +1 -1
  23. package/dist/export/components.mjs +1 -1
  24. package/dist/{index-Bgi4k5s-.cjs → index-B54JveXj.cjs} +2 -2
  25. package/dist/{index-Bgi4k5s-.cjs.map → index-B54JveXj.cjs.map} +1 -1
  26. package/dist/{index-P3KEgBhv.cjs → index-BJPFbQjO.cjs} +2 -2
  27. package/dist/{index-P3KEgBhv.cjs.map → index-BJPFbQjO.cjs.map} +1 -1
  28. package/dist/{index-CHOB1QkU.cjs → index-BQg7t5mI.cjs} +2 -2
  29. package/dist/{index-CHOB1QkU.cjs.map → index-BQg7t5mI.cjs.map} +1 -1
  30. package/dist/{index-CskX6vn2.js → index-BVV0ucIw.js} +2 -2
  31. package/dist/{index-CskX6vn2.js.map → index-BVV0ucIw.js.map} +1 -1
  32. package/dist/{index-CR8fPC2b.cjs → index-B_aWrB-9.cjs} +2 -2
  33. package/dist/{index-CR8fPC2b.cjs.map → index-B_aWrB-9.cjs.map} +1 -1
  34. package/dist/{index-BXOFC_0d.js → index-C7OE98In.js} +2 -2
  35. package/dist/{index-BXOFC_0d.js.map → index-C7OE98In.js.map} +1 -1
  36. package/dist/{index-C6pNvdxk.cjs → index-C92QAG32.cjs} +3 -3
  37. package/dist/{index-C6pNvdxk.cjs.map → index-C92QAG32.cjs.map} +1 -1
  38. package/dist/{index-DCooV8oV.js → index-CDydqopl.js} +2 -2
  39. package/dist/{index-DCooV8oV.js.map → index-CDydqopl.js.map} +1 -1
  40. package/dist/{index-Bgc3QI4b.cjs → index-CTQ4QmT2.cjs} +2 -2
  41. package/dist/{index-Bgc3QI4b.cjs.map → index-CTQ4QmT2.cjs.map} +1 -1
  42. package/dist/{index-Btt6Tm5Q.js → index-CV9BPzXp.js} +2 -2
  43. package/dist/{index-Btt6Tm5Q.js.map → index-CV9BPzXp.js.map} +1 -1
  44. package/dist/{index-C11vdiDH.cjs → index-D3OehMGn.cjs} +2 -2
  45. package/dist/{index-C11vdiDH.cjs.map → index-D3OehMGn.cjs.map} +1 -1
  46. package/dist/{index-BrbjrA78.cjs → index-DDlFsxQE.cjs} +2 -2
  47. package/dist/{index-BrbjrA78.cjs.map → index-DDlFsxQE.cjs.map} +1 -1
  48. package/dist/{index-BtjEYmib.cjs → index-DKn0Km5O.cjs} +2 -2
  49. package/dist/{index-BtjEYmib.cjs.map → index-DKn0Km5O.cjs.map} +1 -1
  50. package/dist/{index-C_IALXNA.js → index-DPUnEcWL.js} +2 -2
  51. package/dist/{index-C_IALXNA.js.map → index-DPUnEcWL.js.map} +1 -1
  52. package/dist/{index-BtyXrnNq.js → index-DSJ4ojXM.js} +2 -2
  53. package/dist/{index-BtyXrnNq.js.map → index-DSJ4ojXM.js.map} +1 -1
  54. package/dist/{index-lvV5wzhg.js → index-DTtlPPm6.js} +2 -2
  55. package/dist/{index-lvV5wzhg.js.map → index-DTtlPPm6.js.map} +1 -1
  56. package/dist/{index-CANUhwDW.cjs → index-DYL9lt-F.cjs} +3 -3
  57. package/dist/{index-CANUhwDW.cjs.map → index-DYL9lt-F.cjs.map} +1 -1
  58. package/dist/{index-mrxwm6Xs.js → index-Dl7hhKbt.js} +3 -3
  59. package/dist/{index-mrxwm6Xs.js.map → index-Dl7hhKbt.js.map} +1 -1
  60. package/dist/{index-B5ijF3Tp.js → index-DywPfyqK.js} +3 -3
  61. package/dist/{index-B5ijF3Tp.js.map → index-DywPfyqK.js.map} +1 -1
  62. package/dist/{index-Chn5-4lW.js → index-QUkZftBS.js} +2 -2
  63. package/dist/{index-Chn5-4lW.js.map → index-QUkZftBS.js.map} +1 -1
  64. package/dist/utils/formatters.d.ts +1 -0
  65. package/dist/utils/formatters.d.ts.map +1 -1
  66. package/package.json +2 -1
  67. package/dist/components-Bhg-kj6Z.js.map +0 -1
  68. package/dist/components-YkshqT-o.cjs.map +0 -1
@@ -34,6 +34,7 @@ const DOMPurify = require("dompurify");
34
34
  const hooks = require("@mantine/hooks");
35
35
  const useEventSubscribe = require("./useEventSubscribe-B019T27n.cjs");
36
36
  const useUITheme = require("./useUITheme-DqgAb7n1.cjs");
37
+ const iconsReact = require("@tabler/icons-react");
37
38
  const Markdown = require("react-markdown");
38
39
  const remarkGfm = require("remark-gfm");
39
40
  const downshift = require("downshift");
@@ -845,8 +846,8 @@ function AccordionTable({
845
846
  }
846
847
  );
847
848
  }
848
- const Header$3 = react$1.lazy(() => Promise.resolve().then(() => require("./index-BrbjrA78.cjs")));
849
- const Footer = react$1.lazy(() => Promise.resolve().then(() => require("./index-C6pNvdxk.cjs")));
849
+ const Header$3 = react$1.lazy(() => Promise.resolve().then(() => require("./index-DDlFsxQE.cjs")));
850
+ const Footer = react$1.lazy(() => Promise.resolve().then(() => require("./index-C92QAG32.cjs")));
850
851
  function ActionCard({ header, content, footer, useHoverMode = false }) {
851
852
  const hasContent = !!content || !!footer;
852
853
  const initialVisibility = footer?.startHidden !== true;
@@ -930,7 +931,7 @@ function Loader({ size, color = "primary" }) {
930
931
  }
931
932
  const CARD_WIDTH$1 = 350;
932
933
  const CARD_HEADER_HEIGHT = 158;
933
- const Header$2 = react$1.lazy(() => Promise.resolve().then(() => require("./index-CHOB1QkU.cjs")));
934
+ const Header$2 = react$1.lazy(() => Promise.resolve().then(() => require("./index-BQg7t5mI.cjs")));
934
935
  function Card({ children, className, contentClassName, roundedBottom, noPadding = false, fullWidth = false, header, wrapperSx, onClick }) {
935
936
  const wrapperRef = react$1.useRef(null);
936
937
  const handleOnClick = react$1.useCallback(
@@ -1365,7 +1366,7 @@ function ModalSheet({ isOpen, children, hideHandler, zIndex, onRequestHide, onRe
1365
1366
  document.body
1366
1367
  );
1367
1368
  }
1368
- const Badge = react$1.lazy(() => Promise.resolve().then(() => require("./index-Bgc3QI4b.cjs")));
1369
+ const Badge = react$1.lazy(() => Promise.resolve().then(() => require("./index-CTQ4QmT2.cjs")));
1369
1370
  function ActionSheet({ children, isOpen, header, navMenu = void 0, onRequestHide, onRequestShow }) {
1370
1371
  const shadowScrollRef = react$1.useRef(null);
1371
1372
  const wrapperContentAreaRef = react$1.useRef(null);
@@ -1483,6 +1484,7 @@ function ActionSheet({ children, isOpen, header, navMenu = void 0, onRequestHide
1483
1484
  }
1484
1485
  ) });
1485
1486
  }
1487
+ const icon = (Icon, size, color) => /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 18, color });
1486
1488
  function IconButton({
1487
1489
  icon: Icon,
1488
1490
  onClick,
@@ -1944,8 +1946,8 @@ function HtmlRender({ content, className }) {
1944
1946
  const safeHTML = DOMPurify.sanitize(content, { FORBID_ATTR: ["style"] });
1945
1947
  return /* @__PURE__ */ jsxRuntime.jsx(StyleDOMApplier, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className, dangerouslySetInnerHTML: { __html: safeHTML } }) });
1946
1948
  }
1947
- function Item({ icon, label, disabled, active, onClick }) {
1948
- const IconComponent = icon;
1949
+ function Item({ icon: icon2, label, disabled, onClick }) {
1950
+ const IconComponent = icon2;
1949
1951
  return /* @__PURE__ */ jsxRuntime.jsx(
1950
1952
  "button",
1951
1953
  {
@@ -1953,9 +1955,9 @@ function Item({ icon, label, disabled, active, onClick }) {
1953
1955
  width: "100%",
1954
1956
  borderRadius: 4,
1955
1957
  padding: "4px 12px",
1956
- background: "var(--mantine-color-neutralColor-5)",
1958
+ background: "transparent",
1957
1959
  border: "none",
1958
- cursor: disabled ? "not-allowed" : "pointer",
1960
+ cursor: disabled ? "default" : "pointer",
1959
1961
  textAlign: "left",
1960
1962
  "&:hover": {
1961
1963
  backgroundColor: disabled ? void 0 : "var(--mantine-color-neutralColor-6)"
@@ -1964,17 +1966,8 @@ function Item({ icon, label, disabled, active, onClick }) {
1964
1966
  disabled,
1965
1967
  onClick,
1966
1968
  children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 8, children: [
1967
- IconComponent && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { size: 16, color: "overPicture" }),
1968
- /* @__PURE__ */ jsxRuntime.jsx(
1969
- Typography.Text,
1970
- {
1971
- css: ({ fontSize }) => ({
1972
- fontSize: fontSize.xs,
1973
- color: disabled ? "var(--mantine-color-neutralColor-8)" : active ? "var(--mantine-color-neutralColor-8)" : "var(--mantine-color-neutralColor-8)"
1974
- }),
1975
- children: label
1976
- }
1977
- )
1969
+ IconComponent && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { size: 18, color: disabled ? "var(--mantine-color-neutralColor-7)" : "var(--mantine-color-neutralColor-8)" }),
1970
+ /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: disabled ? "var(--mantine-color-neutralColor-7)" : void 0, fz: 14, children: label })
1978
1971
  ] })
1979
1972
  }
1980
1973
  );
@@ -1990,11 +1983,12 @@ function MoreMenu({ items, controlColor = "primary" }) {
1990
1983
  styles: {
1991
1984
  dropdown: {
1992
1985
  background: "var(--mantine-color-neutralColor-4)",
1993
- border: "none",
1994
1986
  padding: "12px 4px",
1987
+ borderColor: "var(--mantine-color-neutralColor-6)",
1995
1988
  marginLeft: 10
1996
1989
  }
1997
1990
  },
1991
+ radius: 16,
1998
1992
  trapFocus: true,
1999
1993
  width: 200,
2000
1994
  position: "right-start",
@@ -2018,8 +2012,8 @@ function MoreMenu({ items, controlColor = "primary" }) {
2018
2012
  }
2019
2013
  ) }),
2020
2014
  /* @__PURE__ */ jsxRuntime.jsxs(core.Popover.Dropdown, { children: [
2021
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ml: 12, mb: 10, fz: 12, c: "neutralColor.8", children: "Page" }),
2022
- items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
2015
+ /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ml: 12, mb: 10, fz: 14, c: "neutralColor.7", children: "Page" }),
2016
+ /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: "4px", children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
2023
2017
  Item,
2024
2018
  {
2025
2019
  icon: item.icon,
@@ -2032,7 +2026,7 @@ function MoreMenu({ items, controlColor = "primary" }) {
2032
2026
  }
2033
2027
  },
2034
2028
  item.label
2035
- ))
2029
+ )) })
2036
2030
  ] })
2037
2031
  ]
2038
2032
  }
@@ -2068,7 +2062,7 @@ function AIResponse({ content, agentName, menu }) {
2068
2062
  }
2069
2063
  );
2070
2064
  }
2071
- function AIInputBar({ placeholder, icon, disabledInput, disabledButton, valueInput, inInputChange, onButtonClick }) {
2065
+ function AIInputBar({ placeholder, icon: icon2, disabledInput, disabledButton, valueInput, inInputChange, onButtonClick }) {
2072
2066
  return /* @__PURE__ */ jsxRuntime.jsx(
2073
2067
  "div",
2074
2068
  {
@@ -2110,7 +2104,7 @@ function AIInputBar({ placeholder, icon, disabledInput, disabledButton, valueInp
2110
2104
  })
2111
2105
  }
2112
2106
  ),
2113
- /* @__PURE__ */ jsxRuntime.jsx(RoundedButton, { icon: icon ?? UsersSolid.Assistant, label: "Ask", active: true, disabled: disabledButton, onClick: onButtonClick })
2107
+ /* @__PURE__ */ jsxRuntime.jsx(RoundedButton, { icon: icon2 ?? UsersSolid.Assistant, label: "Ask", active: true, disabled: disabledButton, onClick: onButtonClick })
2114
2108
  ] })
2115
2109
  }
2116
2110
  );
@@ -2190,8 +2184,8 @@ function Avatar({ src, rounded = true, size = 62, did }) {
2190
2184
  if (jazzRef.current) {
2191
2185
  jazzRef.current.innerHTML = "";
2192
2186
  const seed = Array.from(did).reduce((acc, char) => acc + char.charCodeAt(0), 0);
2193
- const icon = jazzicon(size, seed);
2194
- jazzRef.current.appendChild(icon);
2187
+ const icon2 = jazzicon(size, seed);
2188
+ jazzRef.current.appendChild(icon2);
2195
2189
  }
2196
2190
  } catch (error) {
2197
2191
  console.error("Failed to load jazzicon:", error);
@@ -2366,33 +2360,92 @@ function NavigationItemSkeleton() {
2366
2360
  }
2367
2361
  );
2368
2362
  }
2363
+ function cutText(text, length, ending = "…") {
2364
+ if (!length || text.length <= length) {
2365
+ return text;
2366
+ }
2367
+ const words = text.split(" ");
2368
+ const endingSize = ending.length;
2369
+ let result = "";
2370
+ for (const word of words) {
2371
+ const newValue = result + word + " ";
2372
+ if (newValue.length + endingSize - 1 > length) {
2373
+ break;
2374
+ }
2375
+ result = newValue;
2376
+ }
2377
+ return result.trim() + ending;
2378
+ }
2379
+ function shortStr(str, threshold = 30, saveSymbolsAtTheEnd = 10, insert = "...") {
2380
+ if (!str) return str;
2381
+ const len = str.length;
2382
+ if (len <= threshold) return str;
2383
+ const ending = saveSymbolsAtTheEnd ? str.slice(-1 * saveSymbolsAtTheEnd) : "";
2384
+ const beginning = str.substring(0, threshold - saveSymbolsAtTheEnd - insert.length);
2385
+ return `${beginning}${insert}${ending}`;
2386
+ }
2387
+ function carbonToUSD(carbon) {
2388
+ return (carbon * 0.03).toLocaleString(void 0, {
2389
+ minimumFractionDigits: 0,
2390
+ maximumFractionDigits: 6
2391
+ });
2392
+ }
2369
2393
  function RoomItem({ room }) {
2370
2394
  const { hovered, ref } = hooks.useHover();
2371
- return /* @__PURE__ */ jsxRuntime.jsxs(
2395
+ const renderIcon = () => {
2396
+ if (!room.icon) return null;
2397
+ if (typeof room.icon === "string") {
2398
+ return /* @__PURE__ */ jsxRuntime.jsx(core.Image, { w: 20, h: 20, src: room.icon, radius: "50%" });
2399
+ } else if (typeof room.icon === "function") {
2400
+ const IconComponent = room.icon;
2401
+ return /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { size: 20, color: "secondary" });
2402
+ } else {
2403
+ return room.icon;
2404
+ }
2405
+ };
2406
+ const displayName = shortStr(room.name, 19, 0) || room.name;
2407
+ const shouldShowTooltip = room.name.length > 19;
2408
+ const content = /* @__PURE__ */ jsxRuntime.jsxs(
2372
2409
  Flex,
2373
2410
  {
2374
2411
  ref,
2375
2412
  align: "center",
2413
+ justify: "space-between",
2376
2414
  gap: 8,
2377
2415
  px: 12,
2378
- py: 4,
2379
- ml: 16,
2416
+ py: 6,
2380
2417
  style: {
2381
2418
  cursor: "pointer",
2382
2419
  borderRadius: 6,
2383
- backgroundColor: room.isActive || hovered ? "var(--mantine-color-neutralColor-5)" : "transparent",
2384
- transform: hovered ? "translateX(2px)" : "translateX(0px)",
2420
+ backgroundColor: room.isActive || hovered ? "var(--mantine-color-neutralColor-6)" : "transparent",
2385
2421
  transition: "all 0.15s ease"
2386
2422
  },
2387
2423
  onClick: () => room.onClick(room.id),
2388
2424
  children: [
2389
- /* @__PURE__ */ jsxRuntime.jsx(room.icon, { size: 16, color: "secondary" }),
2390
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { fz: 13, c: "neutralColor.8", children: room.name })
2425
+ /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 8, children: [
2426
+ renderIcon(),
2427
+ /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: room.isActive ? "neutralColor.8" : "neutralColor.7", fz: 14, children: displayName })
2428
+ ] }),
2429
+ hovered && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 4, children: [
2430
+ room.onActionClick && /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: room.onActionClick.label, children: /* @__PURE__ */ jsxRuntime.jsx(
2431
+ core.Center,
2432
+ {
2433
+ onClick: (e) => {
2434
+ e.stopPropagation();
2435
+ room.onActionClick?.onClick();
2436
+ },
2437
+ style: { cursor: "pointer" },
2438
+ children: icon(room.onActionClick.icon, void 0, "var(--mantine-color-neutralColor-7)")
2439
+ }
2440
+ ) }),
2441
+ room.tag && room.tagIcon && /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: room.tag, children: icon(room.tagIcon, void 0, "var(--mantine-color-neutralColor-7)") })
2442
+ ] })
2391
2443
  ]
2392
2444
  }
2393
2445
  );
2446
+ return shouldShowTooltip ? /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: room.name, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: content }) }) : content;
2394
2447
  }
2395
- function RoomCategory({ category }) {
2448
+ function RoomCategory({ name, rooms, actions, onAddClick }) {
2396
2449
  const { hovered, ref } = hooks.useHover();
2397
2450
  const { value, toggle } = useToggle(false);
2398
2451
  return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: 2, children: [
@@ -2403,7 +2456,7 @@ function RoomCategory({ category }) {
2403
2456
  align: "center",
2404
2457
  justify: "space-between",
2405
2458
  px: 12,
2406
- py: 4,
2459
+ py: 6,
2407
2460
  style: {
2408
2461
  cursor: "pointer",
2409
2462
  borderRadius: 6,
@@ -2412,21 +2465,49 @@ function RoomCategory({ category }) {
2412
2465
  },
2413
2466
  onClick: toggle,
2414
2467
  children: [
2415
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { fz: 12, c: "neutralColor.7", children: category.name }),
2416
- /* @__PURE__ */ jsxRuntime.jsx(
2417
- core.Center,
2418
- {
2419
- sx: {
2420
- transform: value ? "rotate(-90deg)" : "rotate(0deg)",
2421
- transition: "transform 0.2s ease"
2422
- },
2423
- children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.AngleLeftSolid, { size: 12, color: "secondary" })
2424
- }
2425
- )
2468
+ /* @__PURE__ */ jsxRuntime.jsx(core.Text, { fz: 12, tt: "capitalize", children: name }),
2469
+ /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 8, children: [
2470
+ onAddClick && /* @__PURE__ */ jsxRuntime.jsx(
2471
+ core.Center,
2472
+ {
2473
+ onClick: (e) => {
2474
+ e.stopPropagation();
2475
+ onAddClick();
2476
+ },
2477
+ sx: { cursor: "pointer", borderRadius: 4, transition: "transform 0.2s ease", "&:hover": { background: "var(--mantine-color-neutralColor-5)" } },
2478
+ children: icon(iconsReact.IconPlus, void 0, "var(--mantine-color-neutralColor-7)")
2479
+ }
2480
+ ),
2481
+ actions && actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
2482
+ core.Center,
2483
+ {
2484
+ onClick: (e) => e.stopPropagation(),
2485
+ sx: {
2486
+ cursor: "pointer",
2487
+ borderRadius: 4,
2488
+ transition: "transform 0.2s ease",
2489
+ "&:hover": {
2490
+ background: "var(--mantine-color-neutralColor-5)"
2491
+ }
2492
+ },
2493
+ children: /* @__PURE__ */ jsxRuntime.jsx(MoreMenu, { items: actions, controlColor: "secondary" })
2494
+ }
2495
+ ),
2496
+ /* @__PURE__ */ jsxRuntime.jsx(
2497
+ core.Center,
2498
+ {
2499
+ sx: {
2500
+ transform: value ? "rotate(-90deg)" : "rotate(0deg)",
2501
+ transition: "transform 0.2s ease"
2502
+ },
2503
+ children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.AngleLeftSolid, { size: 12, color: "secondary" })
2504
+ }
2505
+ )
2506
+ ] })
2426
2507
  ]
2427
2508
  }
2428
2509
  ),
2429
- !value && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 1, children: category.rooms.map((room) => /* @__PURE__ */ jsxRuntime.jsx(RoomItem, { room }, room.id)) })
2510
+ !value && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: rooms?.map((room) => /* @__PURE__ */ jsxRuntime.jsx(RoomItem, { room }, room.id)) })
2430
2511
  ] });
2431
2512
  }
2432
2513
  function hasActiveDescendant(children) {
@@ -2507,7 +2588,6 @@ function MenuItem({ item, onMenuItemClick, depth = 0 }) {
2507
2588
  cursor: "pointer",
2508
2589
  borderRadius: 8,
2509
2590
  backgroundColor: shouldShowActiveStyle ? "var(--mantine-color-neutralColor-6)" : hovered ? "var(--mantine-color-neutralColor-6)" : "transparent",
2510
- transform: hovered ? "translateX(4px)" : "translateX(0px)",
2511
2591
  transition: "all 0.2s ease"
2512
2592
  },
2513
2593
  onClick: handleItemClick,
@@ -2552,7 +2632,7 @@ function SelectedIndicator() {
2552
2632
  }
2553
2633
  );
2554
2634
  }
2555
- function SpaceItem({ icon, id, name, selectedSpace, onClick }) {
2635
+ function SpaceItem({ icon: icon2, id, name, selectedSpace, onClick }) {
2556
2636
  const { hovered, ref } = hooks.useHover();
2557
2637
  const isSelected = selectedSpace === id;
2558
2638
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2569,34 +2649,12 @@ function SpaceItem({ icon, id, name, selectedSpace, onClick }) {
2569
2649
  w: 40,
2570
2650
  onClick: () => onClick(id),
2571
2651
  children: [
2572
- /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: name, ml: 5, fz: 12, position: "right", withArrow: true, children: typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(core.Image, { radius: 24, src: icon, w: 32, h: 32 }) : icon }),
2652
+ /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: name, ml: 5, fz: 12, position: "right", withArrow: true, children: typeof icon2 === "string" ? /* @__PURE__ */ jsxRuntime.jsx(core.Image, { radius: 24, src: icon2, w: 32, h: 32 }) : icon2 }),
2573
2653
  isSelected && /* @__PURE__ */ jsxRuntime.jsx(SelectedIndicator, {})
2574
2654
  ]
2575
2655
  }
2576
2656
  );
2577
2657
  }
2578
- function cutText(text, length, ending = "…") {
2579
- if (!length || text.length <= length) {
2580
- return text;
2581
- }
2582
- const words = text.split(" ");
2583
- const endingSize = ending.length;
2584
- let result = "";
2585
- for (const word of words) {
2586
- const newValue = result + word + " ";
2587
- if (newValue.length + endingSize - 1 > length) {
2588
- break;
2589
- }
2590
- result = newValue;
2591
- }
2592
- return result.trim() + ending;
2593
- }
2594
- function carbonToUSD(carbon) {
2595
- return (carbon * 0.03).toLocaleString(void 0, {
2596
- minimumFractionDigits: 0,
2597
- maximumFractionDigits: 6
2598
- });
2599
- }
2600
2658
  function MobileBurger({ avatarIcon, isOpened, onClick }) {
2601
2659
  if (isOpened) {
2602
2660
  return /* @__PURE__ */ jsxRuntime.jsx(core.CloseButton, { hiddenFrom: "sm", pos: "absolute", w: 28, sx: { borderRadius: 8, zIndex: 100 }, h: 28, onClick, right: 12, top: 12, bg: "neutralColor.4" });
@@ -2642,7 +2700,7 @@ function AppShellNavigation({
2642
2700
  const [asideWidth, setAsideWidth] = react$1.useState(450);
2643
2701
  const isMobile = hooks.useMediaQuery("(max-width: 48em)");
2644
2702
  const [mobileOpened, { toggle: toggleMobile }] = hooks.useDisclosure();
2645
- const [desktopOpened, { toggle: toggleDesktop }] = hooks.useDisclosure(true);
2703
+ const [desktopOpened] = hooks.useDisclosure(true);
2646
2704
  const [isSplitResizing, setIsSplitResizing] = react$1.useState(false);
2647
2705
  const isSplitResizingRef = react$1.useRef(false);
2648
2706
  const mainContainerRef = react$1.useRef(null);
@@ -2716,7 +2774,7 @@ function AppShellNavigation({
2716
2774
  const handleNavbarMouseMove = react$1.useCallback(
2717
2775
  (e) => {
2718
2776
  if (!isNavbarResizingRef.current) return;
2719
- const minWidth = isAiOpened ? 450 : 300;
2777
+ const minWidth = isAiOpened ? 450 : 330;
2720
2778
  const maxWidth = 700;
2721
2779
  const newWidth = Math.min(Math.max(e.clientX, minWidth), maxWidth);
2722
2780
  if (isAiOpened) {
@@ -2750,7 +2808,7 @@ function AppShellNavigation({
2750
2808
  react$1.useEffect(() => {
2751
2809
  const handleWindowResize = () => {
2752
2810
  const maxWidth = 700;
2753
- const minWidth = isAiOpened ? 450 : 300;
2811
+ const minWidth = isAiOpened ? 450 : 330;
2754
2812
  const currentWidth = isAiOpened ? navbarWidthAiOpen : navbarWidthAiClosed;
2755
2813
  const setter = isAiOpened ? setNavbarWidthAiOpen : setNavbarWidthAiClosed;
2756
2814
  if (currentWidth > maxWidth) {
@@ -2845,7 +2903,7 @@ function AppShellNavigation({
2845
2903
  paddingRight: 8
2846
2904
  }
2847
2905
  },
2848
- children: /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { align: "center", gap: 8, children: spaces.map(({ icon, id, name, onClick }) => /* @__PURE__ */ jsxRuntime.jsx(SpaceItem, { selectedSpace, icon, name, id, onClick }, id)) })
2906
+ children: /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { align: "center", gap: 8, children: spaces.map(({ icon: icon2, id, name, onClick }) => /* @__PURE__ */ jsxRuntime.jsx(SpaceItem, { selectedSpace, icon: icon2, name, id, onClick }, id)) })
2849
2907
  }
2850
2908
  )
2851
2909
  ] }),
@@ -2857,30 +2915,30 @@ function AppShellNavigation({
2857
2915
  ] })
2858
2916
  ] }),
2859
2917
  isAiOpened && !isMobile && aiNavbarContent,
2860
- !isAiOpened && /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { justify: "space-between", w: "100%", pt: 16, pb: 10, px: 12, children: [
2861
- /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: 5, children: [
2862
- /* @__PURE__ */ jsxRuntime.jsxs(Flex, { mb: 24, style: { width: "100%" }, justify: "space-between", align: "center", children: [
2863
- /* @__PURE__ */ jsxRuntime.jsx(Flex, { align: "center", gap: "10px", children: /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: pageItem.pageTitle || "Unknown", disabled: !isTitleOverflowing, position: "bottom", withArrow: true, children: /* @__PURE__ */ jsxRuntime.jsx(core.Text, { lh: 1, c: "neutralColor.8", children: cutText(pageItem.pageTitle, 19) || "Unknown" }) }) }),
2864
- isAiBtnVisible && !isAiOpened && !isMobile && /* @__PURE__ */ jsxRuntime.jsx(
2865
- core.Center,
2866
- {
2867
- sx: {
2868
- cursor: "pointer",
2869
- borderRadius: 8,
2870
- transition: "background 0.15s",
2871
- background: "var(--mantine-color-neutralColor-5)",
2872
- "&:hover": {
2873
- background: "var(--mantine-color-neutralColor-6)"
2874
- }
2875
- },
2876
- p: 4,
2877
- onClick: onAiOpen,
2878
- children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.Assistant, { size: 18, color: "primary" })
2879
- }
2880
- )
2881
- ] }),
2918
+ !isAiOpened && /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { w: "100%", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
2919
+ /* @__PURE__ */ jsxRuntime.jsx(core.AppShell.Section, { px: 12, pt: 16, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { mb: 24, style: { width: "100%" }, justify: "space-between", align: "center", children: [
2920
+ /* @__PURE__ */ jsxRuntime.jsx(Flex, { align: "center", gap: "10px", children: /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: pageItem.pageTitle || "Unknown", disabled: !isTitleOverflowing, position: "bottom", withArrow: true, children: /* @__PURE__ */ jsxRuntime.jsx(core.Text, { lh: 1, c: "neutralColor.8", children: isTitleOverflowing ? shortStr(pageItem.pageTitle, 21, 0) : pageItem.pageTitle || "Unknown" }) }) }),
2921
+ isAiBtnVisible && !isAiOpened && !isMobile && /* @__PURE__ */ jsxRuntime.jsx(
2922
+ core.Center,
2923
+ {
2924
+ sx: {
2925
+ cursor: "pointer",
2926
+ borderRadius: 8,
2927
+ transition: "background 0.15s",
2928
+ background: "var(--mantine-color-neutralColor-5)",
2929
+ "&:hover": {
2930
+ background: "var(--mantine-color-neutralColor-6)"
2931
+ }
2932
+ },
2933
+ p: 4,
2934
+ onClick: onAiOpen,
2935
+ children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.Assistant, { size: 18, color: "primary" })
2936
+ }
2937
+ )
2938
+ ] }) }),
2939
+ /* @__PURE__ */ jsxRuntime.jsx(core.AppShell.Section, { grow: true, component: core.ScrollArea, scrollbarSize: 5, sx: { overflowX: "hidden" }, px: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: 5, children: [
2882
2940
  loading ? /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: Array.from({ length: 6 }).map((_, idx) => /* @__PURE__ */ jsxRuntime.jsx(NavigationItemSkeleton, {}, idx)) }) : menuItems?.map((item, index) => {
2883
- if (index === separator) {
2941
+ if (index !== 0 && index === separator) {
2884
2942
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2885
2943
  /* @__PURE__ */ jsxRuntime.jsx(core.Space, { h: 16 }),
2886
2944
  /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { onMenuItemClick, item }, item.id)
@@ -2888,9 +2946,9 @@ function AppShellNavigation({
2888
2946
  }
2889
2947
  return /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { onMenuItemClick, item }, item.id);
2890
2948
  }),
2891
- roomCategories && roomCategories.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 8, mt: 16, children: roomCategories.map((category) => /* @__PURE__ */ jsxRuntime.jsx(RoomCategory, { category }, category.id)) })
2892
- ] }),
2893
- /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: footerContent })
2949
+ roomCategories && roomCategories.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 8, mt: 16, children: roomCategories.map(({ id, name, actions, rooms, onAddClick }) => /* @__PURE__ */ jsxRuntime.jsx(RoomCategory, { id, name, actions, rooms, onAddClick }, id)) })
2950
+ ] }) }),
2951
+ footerContent && /* @__PURE__ */ jsxRuntime.jsx(core.AppShell.Section, { px: 12, py: 10, children: /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: footerContent }) })
2894
2952
  ] })
2895
2953
  ] })
2896
2954
  ] }) }),
@@ -5369,7 +5427,7 @@ function ImageIcon({ source: Source, fallback: Fallback, size = 32, iconColor =
5369
5427
  }
5370
5428
  return radash.isString(Source) ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: Source, draggable: false, width: size, height: size, css: { borderRadius: size, objectFit: "cover" } }) : /* @__PURE__ */ jsxRuntime.jsx(Source, { size, color: iconColor });
5371
5429
  }
5372
- function Value({ icon, label, value }) {
5430
+ function Value({ icon: icon2, label, value }) {
5373
5431
  return /* @__PURE__ */ jsxRuntime.jsxs(
5374
5432
  "div",
5375
5433
  {
@@ -5383,7 +5441,7 @@ function Value({ icon, label, value }) {
5383
5441
  alignItems: "center"
5384
5442
  }),
5385
5443
  children: [
5386
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(ImageIcon, { source: icon, size: 32, iconColor: "primary" }) }),
5444
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(ImageIcon, { source: icon2, size: 32, iconColor: "primary" }) }),
5387
5445
  /* @__PURE__ */ jsxRuntime.jsxs(Spacer, { vertical: true, distance: 0, alignItems: "start", children: [
5388
5446
  /* @__PURE__ */ jsxRuntime.jsx(Typography.Text, { color: "text", size: "s", children: label }),
5389
5447
  /* @__PURE__ */ jsxRuntime.jsx(Typography.Text, { color: "secondary", size: "xs", children: value })
@@ -6024,13 +6082,13 @@ function ActionButton({ onClick, left, right }) {
6024
6082
  }
6025
6083
  );
6026
6084
  }
6027
- const MainAction = react$1.lazy(() => Promise.resolve().then(() => require("./index-P3KEgBhv.cjs")));
6028
- const Header$1 = react$1.lazy(() => Promise.resolve().then(() => require("./index-CR8fPC2b.cjs")));
6029
- const Content = react$1.lazy(() => Promise.resolve().then(() => require("./index-Bgi4k5s-.cjs")));
6085
+ const MainAction = react$1.lazy(() => Promise.resolve().then(() => require("./index-BJPFbQjO.cjs")));
6086
+ const Header$1 = react$1.lazy(() => Promise.resolve().then(() => require("./index-B_aWrB-9.cjs")));
6087
+ const Content = react$1.lazy(() => Promise.resolve().then(() => require("./index-B54JveXj.cjs")));
6030
6088
  const Map = react$1.lazy(() => Promise.resolve().then(() => require("./index-D4PsPquZ.cjs")));
6031
6089
  const CustomContent = react$1.lazy(() => Promise.resolve().then(() => require("./index-ByrCNpS2.cjs")));
6032
- const Assets = react$1.lazy(() => Promise.resolve().then(() => require("./index-C11vdiDH.cjs")));
6033
- const Actions = react$1.lazy(() => Promise.resolve().then(() => require("./index-CANUhwDW.cjs")));
6090
+ const Assets = react$1.lazy(() => Promise.resolve().then(() => require("./index-D3OehMGn.cjs")));
6091
+ const Actions = react$1.lazy(() => Promise.resolve().then(() => require("./index-DYL9lt-F.cjs")));
6034
6092
  const HOVER_BORDER_WIDTH = 1;
6035
6093
  function SodaCardCmp({ numSelected = 0, expanded = true, mainAction, header, content, map, customContent, customFooter, actions, assets, onClick }, ref) {
6036
6094
  const wrapperRef = react$1.useRef(null);
@@ -6330,7 +6388,7 @@ function AssetInfo({
6330
6388
  rightTitleColor = "text",
6331
6389
  rightSubtitle,
6332
6390
  rightSubtitleColor = "focusSecondary",
6333
- icon
6391
+ icon: icon2
6334
6392
  }) {
6335
6393
  const theme = react.useTheme();
6336
6394
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -6345,19 +6403,19 @@ function AssetInfo({
6345
6403
  justifyContent: "space-between",
6346
6404
  children: [
6347
6405
  /* @__PURE__ */ jsxRuntime.jsxs(Spacer, { children: [
6348
- icon && /* @__PURE__ */ jsxRuntime.jsx(
6406
+ icon2 && /* @__PURE__ */ jsxRuntime.jsx(
6349
6407
  "div",
6350
6408
  {
6351
6409
  css: ({ radius }) => ({
6352
6410
  width: 32,
6353
6411
  height: 32,
6354
6412
  borderRadius: radius.small / 2,
6355
- backgroundColor: UsersSolid.getElementColor(theme, icon.bg),
6413
+ backgroundColor: UsersSolid.getElementColor(theme, icon2.bg),
6356
6414
  display: "flex",
6357
6415
  alignItems: "center",
6358
6416
  justifyContent: "center"
6359
6417
  }),
6360
- children: /* @__PURE__ */ jsxRuntime.jsx(icon.icon, { color: "overPicture" })
6418
+ children: /* @__PURE__ */ jsxRuntime.jsx(icon2.icon, { color: "overPicture" })
6361
6419
  }
6362
6420
  ),
6363
6421
  /* @__PURE__ */ jsxRuntime.jsx(Info, { align: "start", title: leftTitle, subtitle: leftSubtitle, titleColor: leftTitleColor, subtitleColor: leftSubtitleColor })
@@ -7063,7 +7121,7 @@ function ModalSearch({
7063
7121
  )
7064
7122
  ] }) });
7065
7123
  }
7066
- function Protocol({ icon, name, category, selected, onClick }) {
7124
+ function Protocol({ icon: icon2, name, category, selected, onClick }) {
7067
7125
  return /* @__PURE__ */ jsxRuntime.jsxs(
7068
7126
  "button",
7069
7127
  {
@@ -7113,7 +7171,7 @@ function Protocol({ icon, name, category, selected, onClick }) {
7113
7171
  /* @__PURE__ */ jsxRuntime.jsx(Typography.Paragraph, { size: "regular", children: name }),
7114
7172
  /* @__PURE__ */ jsxRuntime.jsx(Typography.Paragraph, { color: "focusSecondary", size: "xs", children: category })
7115
7173
  ] }),
7116
- /* @__PURE__ */ jsxRuntime.jsx(ImageIcon, { source: icon, size: 32, iconColor: "secondary" })
7174
+ /* @__PURE__ */ jsxRuntime.jsx(ImageIcon, { source: icon2, size: 32, iconColor: "secondary" })
7117
7175
  ]
7118
7176
  }
7119
7177
  )
@@ -7141,7 +7199,7 @@ function OracleProtocolsSelection({ items }) {
7141
7199
  items.find((item) => item.selected) ? /* @__PURE__ */ jsxRuntime.jsx(Typography.Text, { color: "focusSecondary", children: "Protocol Selected" }) : null
7142
7200
  ] });
7143
7201
  }
7144
- function TagButton({ value, icon, onClick }) {
7202
+ function TagButton({ value, icon: icon2, onClick }) {
7145
7203
  return /* @__PURE__ */ jsxRuntime.jsx(
7146
7204
  "button",
7147
7205
  {
@@ -7157,7 +7215,7 @@ function TagButton({ value, icon, onClick }) {
7157
7215
  backgroundColor: colors.focusTransparent10
7158
7216
  }
7159
7217
  }),
7160
- children: /* @__PURE__ */ jsxRuntime.jsx(Tag, { value, icon, textColor: "focusSecondary" })
7218
+ children: /* @__PURE__ */ jsxRuntime.jsx(Tag, { value, icon: icon2, textColor: "focusSecondary" })
7161
7219
  }
7162
7220
  );
7163
7221
  }
@@ -7347,7 +7405,7 @@ function humanizeNumber(value) {
7347
7405
  function humanizeTimestamp(timestamp) {
7348
7406
  return dayjs(timestamp).fromNow();
7349
7407
  }
7350
- function InteractionButton({ icon, active, total, onClick }) {
7408
+ function InteractionButton({ icon: icon2, active, total, onClick }) {
7351
7409
  return /* @__PURE__ */ jsxRuntime.jsx(
7352
7410
  "button",
7353
7411
  {
@@ -7363,7 +7421,7 @@ function InteractionButton({ icon, active, total, onClick }) {
7363
7421
  {
7364
7422
  value: humanizeNumber(total),
7365
7423
  textColor: active ? "primary" : "secondary",
7366
- icon,
7424
+ icon: icon2,
7367
7425
  css: ({ transition, colors }) => ({
7368
7426
  transition: transition.duration,
7369
7427
  "&:hover": {
@@ -7801,7 +7859,7 @@ function ColumnText({ title, subtitle, align = "left" }) {
7801
7859
  }
7802
7860
  );
7803
7861
  }
7804
- function ServiceOffering({ icon, leftText, leftDescription, centerText, centerDescription, rightText, rightDescription, onClick }) {
7862
+ function ServiceOffering({ icon: icon2, leftText, leftDescription, centerText, centerDescription, rightText, rightDescription, onClick }) {
7805
7863
  return /* @__PURE__ */ jsxRuntime.jsxs(
7806
7864
  "div",
7807
7865
  {
@@ -7867,7 +7925,7 @@ function ServiceOffering({ icon, leftText, leftDescription, centerText, centerDe
7867
7925
  alignItems: "center"
7868
7926
  }),
7869
7927
  children: [
7870
- /* @__PURE__ */ jsxRuntime.jsx(ImageIcon, { size: 32, source: icon }),
7928
+ /* @__PURE__ */ jsxRuntime.jsx(ImageIcon, { size: 32, source: icon2 }),
7871
7929
  /* @__PURE__ */ jsxRuntime.jsx(ColumnText, { title: leftText, subtitle: leftDescription })
7872
7930
  ]
7873
7931
  }
@@ -11305,4 +11363,4 @@ exports.UserMessage = UserMessage;
11305
11363
  exports.WorkspaceModal = WorkspaceModal;
11306
11364
  exports.cutText = cutText;
11307
11365
  exports.isValidClick = isValidClick;
11308
- //# sourceMappingURL=components-YkshqT-o.cjs.map
11366
+ //# sourceMappingURL=components-t3g1EGWM.cjs.map