@ixo/ui 0.1.9 → 0.1.11

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 (56) hide show
  1. package/dist/.vite/manifest.json +43 -43
  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 +3 -1
  5. package/dist/components/AppShellNavigation/components/RoomCategory.d.ts.map +1 -1
  6. package/dist/components/AppShellNavigation/components/RoomItem.d.ts +2 -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/OracleMessage/index.d.ts.map +1 -1
  10. package/dist/{components-EXB_BUs5.js → components-CHbRYZDV.js} +247 -181
  11. package/dist/{components-EXB_BUs5.js.map → components-CHbRYZDV.js.map} +1 -1
  12. package/dist/{components-BDiiWelU.cjs → components-JdTP8bty.cjs} +247 -181
  13. package/dist/{components-BDiiWelU.cjs.map → components-JdTP8bty.cjs.map} +1 -1
  14. package/dist/export/components.cjs +1 -1
  15. package/dist/export/components.mjs +1 -1
  16. package/dist/{index-Ch90kRkK.cjs → index-0Gd3Y9ix.cjs} +2 -2
  17. package/dist/{index-Ch90kRkK.cjs.map → index-0Gd3Y9ix.cjs.map} +1 -1
  18. package/dist/{index-DccAmgX1.js → index-3jU32ylS.js} +2 -2
  19. package/dist/{index-DccAmgX1.js.map → index-3jU32ylS.js.map} +1 -1
  20. package/dist/{index-Dv_e6z8D.js → index-5nix3uGD.js} +2 -2
  21. package/dist/{index-Dv_e6z8D.js.map → index-5nix3uGD.js.map} +1 -1
  22. package/dist/{index-BHuoPnj7.js → index-8tGadeUE.js} +2 -2
  23. package/dist/{index-BHuoPnj7.js.map → index-8tGadeUE.js.map} +1 -1
  24. package/dist/{index-Be7UORTt.js → index-BVtpqWCs.js} +2 -2
  25. package/dist/{index-Be7UORTt.js.map → index-BVtpqWCs.js.map} +1 -1
  26. package/dist/{index-DWUKXIMe.cjs → index-BWT97hNk.cjs} +2 -2
  27. package/dist/{index-DWUKXIMe.cjs.map → index-BWT97hNk.cjs.map} +1 -1
  28. package/dist/{index-LERt98FZ.cjs → index-BZuf5Uwh.cjs} +2 -2
  29. package/dist/{index-LERt98FZ.cjs.map → index-BZuf5Uwh.cjs.map} +1 -1
  30. package/dist/{index-BzEXuxSc.cjs → index-BnDHepRw.cjs} +3 -3
  31. package/dist/{index-BzEXuxSc.cjs.map → index-BnDHepRw.cjs.map} +1 -1
  32. package/dist/{index-D1bGiH9L.cjs → index-Br0Chnx7.cjs} +2 -2
  33. package/dist/{index-D1bGiH9L.cjs.map → index-Br0Chnx7.cjs.map} +1 -1
  34. package/dist/{index-Dm6B7Yv-.js → index-BzJhTXjs.js} +2 -2
  35. package/dist/{index-Dm6B7Yv-.js.map → index-BzJhTXjs.js.map} +1 -1
  36. package/dist/{index-CGLxKSPk.js → index-CAGiV0J3.js} +2 -2
  37. package/dist/{index-CGLxKSPk.js.map → index-CAGiV0J3.js.map} +1 -1
  38. package/dist/{index-Lu5gXTPs.js → index-CYdgFOk0.js} +3 -3
  39. package/dist/{index-Lu5gXTPs.js.map → index-CYdgFOk0.js.map} +1 -1
  40. package/dist/{index-qHCPELWv.cjs → index-CgGNRXUP.cjs} +2 -2
  41. package/dist/{index-qHCPELWv.cjs.map → index-CgGNRXUP.cjs.map} +1 -1
  42. package/dist/{index-D771i3jp.cjs → index-CnwnwLBL.cjs} +2 -2
  43. package/dist/{index-D771i3jp.cjs.map → index-CnwnwLBL.cjs.map} +1 -1
  44. package/dist/{index-ImM8dR3W.cjs → index-DIkd4nvp.cjs} +3 -3
  45. package/dist/{index-ImM8dR3W.cjs.map → index-DIkd4nvp.cjs.map} +1 -1
  46. package/dist/{index-CTZnqmGU.cjs → index-DIoNw9Is.cjs} +2 -2
  47. package/dist/{index-CTZnqmGU.cjs.map → index-DIoNw9Is.cjs.map} +1 -1
  48. package/dist/{index-2Qg0wBFO.js → index-DeRpsAsl.js} +2 -2
  49. package/dist/{index-2Qg0wBFO.js.map → index-DeRpsAsl.js.map} +1 -1
  50. package/dist/{index-CEb94eQ3.js → index-DxE2Ni88.js} +2 -2
  51. package/dist/{index-CEb94eQ3.js.map → index-DxE2Ni88.js.map} +1 -1
  52. package/dist/{index-BKru_TQX.js → index-F6HHDg6A.js} +3 -3
  53. package/dist/{index-BKru_TQX.js.map → index-F6HHDg6A.js.map} +1 -1
  54. package/dist/{index-CO6Ygcv-.cjs → index-aYeZagBJ.cjs} +2 -2
  55. package/dist/{index-CO6Ygcv-.cjs.map → index-aYeZagBJ.cjs.map} +1 -1
  56. package/package.json +1 -1
@@ -846,8 +846,8 @@ function AccordionTable({
846
846
  }
847
847
  );
848
848
  }
849
- const Header$3 = react$1.lazy(() => Promise.resolve().then(() => require("./index-D771i3jp.cjs")));
850
- const Footer = react$1.lazy(() => Promise.resolve().then(() => require("./index-ImM8dR3W.cjs")));
849
+ const Header$3 = react$1.lazy(() => Promise.resolve().then(() => require("./index-CnwnwLBL.cjs")));
850
+ const Footer = react$1.lazy(() => Promise.resolve().then(() => require("./index-DIkd4nvp.cjs")));
851
851
  function ActionCard({ header, content, footer, useHoverMode = false }) {
852
852
  const hasContent = !!content || !!footer;
853
853
  const initialVisibility = footer?.startHidden !== true;
@@ -931,7 +931,7 @@ function Loader({ size, color = "primary" }) {
931
931
  }
932
932
  const CARD_WIDTH$1 = 350;
933
933
  const CARD_HEADER_HEIGHT = 158;
934
- const Header$2 = react$1.lazy(() => Promise.resolve().then(() => require("./index-qHCPELWv.cjs")));
934
+ const Header$2 = react$1.lazy(() => Promise.resolve().then(() => require("./index-CgGNRXUP.cjs")));
935
935
  function Card({ children, className, contentClassName, roundedBottom, noPadding = false, fullWidth = false, header, wrapperSx, onClick }) {
936
936
  const wrapperRef = react$1.useRef(null);
937
937
  const handleOnClick = react$1.useCallback(
@@ -1366,7 +1366,7 @@ function ModalSheet({ isOpen, children, hideHandler, zIndex, onRequestHide, onRe
1366
1366
  document.body
1367
1367
  );
1368
1368
  }
1369
- const Badge = react$1.lazy(() => Promise.resolve().then(() => require("./index-D1bGiH9L.cjs")));
1369
+ const Badge = react$1.lazy(() => Promise.resolve().then(() => require("./index-Br0Chnx7.cjs")));
1370
1370
  function ActionSheet({ children, isOpen, header, navMenu = void 0, onRequestHide, onRequestShow }) {
1371
1371
  const shadowScrollRef = react$1.useRef(null);
1372
1372
  const wrapperContentAreaRef = react$1.useRef(null);
@@ -2346,37 +2346,7 @@ function NavigationItemSkeleton() {
2346
2346
  }
2347
2347
  );
2348
2348
  }
2349
- function cutText(text, length, ending = "…") {
2350
- if (!length || text.length <= length) {
2351
- return text;
2352
- }
2353
- const words = text.split(" ");
2354
- const endingSize = ending.length;
2355
- let result = "";
2356
- for (const word of words) {
2357
- const newValue = result + word + " ";
2358
- if (newValue.length + endingSize - 1 > length) {
2359
- break;
2360
- }
2361
- result = newValue;
2362
- }
2363
- return result.trim() + ending;
2364
- }
2365
- function shortStr(str, threshold = 30, saveSymbolsAtTheEnd = 10, insert = "...") {
2366
- if (!str) return str;
2367
- const len = str.length;
2368
- if (len <= threshold) return str;
2369
- const ending = saveSymbolsAtTheEnd ? str.slice(-1 * saveSymbolsAtTheEnd) : "";
2370
- const beginning = str.substring(0, threshold - saveSymbolsAtTheEnd - insert.length);
2371
- return `${beginning}${insert}${ending}`;
2372
- }
2373
- function carbonToUSD(carbon) {
2374
- return (carbon * 0.03).toLocaleString(void 0, {
2375
- minimumFractionDigits: 0,
2376
- maximumFractionDigits: 6
2377
- });
2378
- }
2379
- function RoomItem({ room }) {
2349
+ function RoomItem({ room, navbarWidth }) {
2380
2350
  const { hovered, ref } = hooks.useHover();
2381
2351
  const renderIcon = () => {
2382
2352
  if (!room.icon) return null;
@@ -2389,8 +2359,7 @@ function RoomItem({ room }) {
2389
2359
  return room.icon;
2390
2360
  }
2391
2361
  };
2392
- const displayName = shortStr(room.name, 19, 0) || room.name;
2393
- const shouldShowTooltip = room.name.length > 19;
2362
+ const textMaxWidth = navbarWidth - 190;
2394
2363
  const content = /* @__PURE__ */ jsxRuntime.jsxs(
2395
2364
  Flex,
2396
2365
  {
@@ -2410,7 +2379,7 @@ function RoomItem({ room }) {
2410
2379
  children: [
2411
2380
  /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 8, children: [
2412
2381
  renderIcon(),
2413
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: room.isActive ? "neutralColor.8" : "neutralColor.7", fz: 14, children: displayName })
2382
+ /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: room.isActive ? "neutralColor.8" : "neutralColor.7", fz: 14, truncate: true, style: { maxWidth: textMaxWidth }, children: room.name })
2414
2383
  ] }),
2415
2384
  hovered && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 4, children: [
2416
2385
  room.onActionClick && /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: room.onActionClick.label, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -2429,9 +2398,9 @@ function RoomItem({ room }) {
2429
2398
  ]
2430
2399
  }
2431
2400
  );
2432
- return shouldShowTooltip ? /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: room.name, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: content }) }) : content;
2401
+ return content;
2433
2402
  }
2434
- function RoomCategory({ name, rooms, actions, primaryActions }) {
2403
+ function RoomCategory({ name, rooms, actions, primaryActions, navbarWidth }) {
2435
2404
  const { hovered, ref } = hooks.useHover();
2436
2405
  const { value, toggle } = useToggle(false);
2437
2406
  return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: 2, children: [
@@ -2497,14 +2466,19 @@ function RoomCategory({ name, rooms, actions, primaryActions }) {
2497
2466
  ]
2498
2467
  }
2499
2468
  ),
2500
- !value && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: rooms?.map((room) => /* @__PURE__ */ jsxRuntime.jsx(RoomItem, { room }, room.id)) })
2469
+ !value && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: rooms?.map((room) => /* @__PURE__ */ jsxRuntime.jsx(RoomItem, { room, navbarWidth }, room.id)) })
2501
2470
  ] });
2502
2471
  }
2503
2472
  function hasActiveDescendant(children) {
2504
2473
  if (!children || children.length === 0) return false;
2505
2474
  return children.some((child) => child.isActive === true || hasActiveDescendant(child.children));
2506
2475
  }
2507
- function MenuItem({ item, onMenuItemClick, depth = 0 }) {
2476
+ function MenuItem({
2477
+ item,
2478
+ onMenuItemClick,
2479
+ depth = 0,
2480
+ navbarWidth
2481
+ }) {
2508
2482
  const { hovered, ref } = hooks.useHover();
2509
2483
  const hasChildren = item.children && item.children.length > 0;
2510
2484
  const hasActiveChild = react$1.useMemo(() => hasActiveDescendant(item.children), [item.children]);
@@ -2584,7 +2558,7 @@ function MenuItem({ item, onMenuItemClick, depth = 0 }) {
2584
2558
  children: [
2585
2559
  /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 8, children: [
2586
2560
  renderIcon(),
2587
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { fz: 14, fw: 500, c: item.isActive ? "neutralColor.8" : "neutralColor.7", style: { flex: 1 }, children: item.name }),
2561
+ /* @__PURE__ */ jsxRuntime.jsx(core.Text, { fz: 14, fw: 500, c: item.isActive ? "neutralColor.8" : "neutralColor.7", truncate: true, style: { maxWidth: navbarWidth - 160 - depth * 16 }, children: item.name }),
2588
2562
  item.badgeCount ? /* @__PURE__ */ jsxRuntime.jsx(core.Badge, { size: "xs", variant: "filled", ml: 4, style: { minWidth: "16px", height: "15px", padding: "0 4px", fontSize: "8px" }, children: item.badgeCount }) : null
2589
2563
  ] }),
2590
2564
  /* @__PURE__ */ jsxRuntime.jsx(Flex, { children: item?.actions && item.actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
@@ -2604,7 +2578,7 @@ function MenuItem({ item, onMenuItemClick, depth = 0 }) {
2604
2578
  ]
2605
2579
  }
2606
2580
  ),
2607
- hasChildren && isExpanded && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 1, children: item.children?.map((childItem) => /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { item: childItem, onMenuItemClick, depth: depth + 1 }, childItem.id)) })
2581
+ hasChildren && isExpanded && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 1, children: item.children?.map((childItem) => /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { item: childItem, onMenuItemClick, depth: depth + 1, navbarWidth }, childItem.id)) })
2608
2582
  ] });
2609
2583
  }
2610
2584
  function SelectedIndicator() {
@@ -2721,7 +2695,6 @@ function AppShellNavigation({
2721
2695
  },
2722
2696
  [onSplitRatioChange]
2723
2697
  );
2724
- const isTitleOverflowing = (pageItem?.pageTitle?.length || 0) > 21;
2725
2698
  const handleSplitMouseUp = react$1.useCallback(() => {
2726
2699
  setIsSplitResizing(false);
2727
2700
  isSplitResizingRef.current = false;
@@ -2751,8 +2724,9 @@ function AppShellNavigation({
2751
2724
  };
2752
2725
  }, [isSplitResizing, handleSplitMouseMove, handleSplitMouseUp]);
2753
2726
  const [navbarWidthAiOpen, setNavbarWidthAiOpen] = useEventSubscribe.useLocalStorage("navbar-width-ai-open", 450);
2754
- const [navbarWidthAiClosed, setNavbarWidthAiClosed] = useEventSubscribe.useLocalStorage("navbar-width-ai-closed", 300);
2727
+ const [navbarWidthAiClosed, setNavbarWidthAiClosed] = useEventSubscribe.useLocalStorage("navbar-width-ai-closed", 330);
2755
2728
  const navbarWidth = isAiOpened ? navbarWidthAiOpen : navbarWidthAiClosed;
2729
+ const titleMaxWidth = navbarWidth - 120;
2756
2730
  const [isNavbarResizing, setIsNavbarResizing] = react$1.useState(false);
2757
2731
  const isNavbarResizingRef = react$1.useRef(false);
2758
2732
  function clearNavbarListeners() {
@@ -2907,7 +2881,7 @@ function AppShellNavigation({
2907
2881
  isAiOpened && !isMobile && aiNavbarContent,
2908
2882
  !isAiOpened && /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { w: "100%", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
2909
2883
  /* @__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: [
2910
- /* @__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" }) }) }),
2884
+ /* @__PURE__ */ jsxRuntime.jsx(Flex, { align: "center", gap: "10px", children: /* @__PURE__ */ jsxRuntime.jsx(core.Text, { lh: 1, c: "neutralColor.8", truncate: true, style: { maxWidth: titleMaxWidth }, children: pageItem.pageTitle || "Unknown" }) }),
2911
2885
  isAiBtnVisible && !isAiOpened && !isMobile && /* @__PURE__ */ jsxRuntime.jsx(
2912
2886
  core.Center,
2913
2887
  {
@@ -2931,12 +2905,12 @@ function AppShellNavigation({
2931
2905
  if (index !== 0 && index === separator) {
2932
2906
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2933
2907
  /* @__PURE__ */ jsxRuntime.jsx(core.Space, { h: 16 }),
2934
- /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { onMenuItemClick, item }, item.id)
2908
+ /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { onMenuItemClick, item, navbarWidth }, item.id)
2935
2909
  ] });
2936
2910
  }
2937
- return /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { onMenuItemClick, item }, item.id);
2911
+ return /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { onMenuItemClick, item, navbarWidth }, item.id);
2938
2912
  }),
2939
- roomCategories && roomCategories.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 8, mt: 16, children: roomCategories.map(({ id, name, actions, rooms, primaryActions: onAddClick }) => /* @__PURE__ */ jsxRuntime.jsx(RoomCategory, { id, name, actions, rooms, primaryActions: onAddClick }, id)) })
2913
+ roomCategories && roomCategories.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 8, mt: 16, children: roomCategories.map(({ id, name, actions, rooms, primaryActions: onAddClick }) => /* @__PURE__ */ jsxRuntime.jsx(RoomCategory, { id, name, actions, rooms, primaryActions: onAddClick, navbarWidth }, id)) })
2940
2914
  ] }) }),
2941
2915
  footerContent && /* @__PURE__ */ jsxRuntime.jsx(core.AppShell.Section, { px: 12, py: 10, children: /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: footerContent }) })
2942
2916
  ] })
@@ -3490,137 +3464,207 @@ function OracleMessage({ oracleName, message }) {
3490
3464
  /* @__PURE__ */ jsxRuntime.jsx(core.Text, { fz: 12, c: "accent.5", children: oracleName || "Oracle" }),
3491
3465
  /* @__PURE__ */ jsxRuntime.jsx(core.Badge, { tt: "capitalize", c: "accent.5", size: "md", bg: "accent.0", children: "Oracle" })
3492
3466
  ] }),
3493
- /* @__PURE__ */ jsxRuntime.jsx(core.Box, { mt: 12, mb: 4, sx: { borderRadius: 16 }, children: /* @__PURE__ */ jsxRuntime.jsx(
3494
- Markdown,
3467
+ /* @__PURE__ */ jsxRuntime.jsx(
3468
+ core.Box,
3495
3469
  {
3496
- remarkPlugins: [remarkGfm],
3497
- components: {
3498
- a: ({ children, href }) => /* @__PURE__ */ jsxRuntime.jsx("a", { href, style: { color: "var(--mantine-color-accent-5)", textDecoration: "underline" }, children }),
3499
- ul: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3500
- "ul",
3501
- {
3502
- ...props,
3503
- style: {
3504
- margin: "12px 0",
3505
- paddingLeft: 20,
3506
- listStyleType: "none"
3507
- },
3508
- children
3509
- }
3510
- ),
3511
- ol: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3512
- "ol",
3513
- {
3514
- ...props,
3515
- style: {
3516
- margin: "12px 0",
3517
- paddingLeft: 20,
3518
- listStyleType: "decimal"
3519
- },
3520
- children
3521
- }
3522
- ),
3523
- li: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3524
- "li",
3525
- {
3526
- ...props,
3527
- style: {
3528
- marginBottom: 8,
3529
- lineHeight: 1.6,
3530
- paddingLeft: 4
3531
- },
3532
- children
3533
- }
3534
- ),
3535
- h3: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3536
- "h3",
3537
- {
3538
- ...props,
3539
- style: {
3540
- marginTop: 16,
3541
- marginBottom: 12,
3542
- fontSize: "1.1em",
3543
- fontWeight: 600,
3544
- color: "var(--mantine-color-neutralColor-6)"
3545
- },
3546
- children
3547
- }
3548
- ),
3549
- h4: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3550
- "h4",
3551
- {
3552
- ...props,
3553
- style: {
3554
- marginTop: 12,
3555
- marginBottom: 8,
3556
- fontSize: "1em",
3557
- fontWeight: 500,
3558
- color: "var(--mantine-color-neutralColor-6)"
3559
- },
3560
- children
3561
- }
3562
- ),
3563
- p: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3564
- "p",
3565
- {
3566
- ...props,
3567
- style: {
3568
- margin: "8px 0",
3569
- lineHeight: 1.6,
3570
- color: "var(--mantine-color-neutralColor-8)"
3571
- },
3572
- children
3573
- }
3574
- ),
3575
- table: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", margin: "16px 0" }, children: /* @__PURE__ */ jsxRuntime.jsx(
3576
- "table",
3577
- {
3578
- ...props,
3579
- style: {
3580
- width: "100%",
3581
- borderCollapse: "collapse",
3582
- borderSpacing: 0
3583
- },
3584
- children
3585
- }
3586
- ) }),
3587
- thead: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ...props, children }),
3588
- tbody: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ...props, children }),
3589
- tr: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("tr", { ...props, children }),
3590
- th: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3591
- "th",
3592
- {
3593
- ...props,
3594
- style: {
3595
- border: "1px solid var(--mantine-color-neutralColor-7)",
3596
- padding: "8px 12px",
3597
- fontWeight: 600,
3598
- textAlign: "left",
3599
- backgroundColor: "var(--mantine-color-neutralColor-5)"
3600
- },
3601
- children
3602
- }
3603
- ),
3604
- td: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3605
- "td",
3606
- {
3607
- ...props,
3608
- style: {
3609
- border: "1px solid var(--mantine-color-neutralColor-7)",
3610
- padding: "8px 12px",
3611
- textAlign: "left"
3612
- },
3613
- children
3614
- }
3615
- )
3470
+ mt: 12,
3471
+ mb: 4,
3472
+ sx: {
3473
+ borderRadius: 16,
3474
+ maxWidth: "100%",
3475
+ minWidth: 0
3616
3476
  },
3617
- children: message
3477
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3478
+ Markdown,
3479
+ {
3480
+ remarkPlugins: [remarkGfm],
3481
+ components: {
3482
+ a: ({ children, href }) => /* @__PURE__ */ jsxRuntime.jsx("a", { href, style: { color: "var(--mantine-color-accent-5)", textDecoration: "underline" }, children }),
3483
+ ul: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3484
+ "ul",
3485
+ {
3486
+ ...props,
3487
+ style: {
3488
+ margin: "12px 0",
3489
+ paddingLeft: 20,
3490
+ listStyleType: "none"
3491
+ },
3492
+ children
3493
+ }
3494
+ ),
3495
+ ol: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3496
+ "ol",
3497
+ {
3498
+ ...props,
3499
+ style: {
3500
+ margin: "12px 0",
3501
+ paddingLeft: 20,
3502
+ listStyleType: "decimal"
3503
+ },
3504
+ children
3505
+ }
3506
+ ),
3507
+ li: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3508
+ "li",
3509
+ {
3510
+ ...props,
3511
+ style: {
3512
+ marginBottom: 8,
3513
+ lineHeight: 1.6,
3514
+ paddingLeft: 4,
3515
+ overflowWrap: "anywhere",
3516
+ wordBreak: "break-word"
3517
+ },
3518
+ children
3519
+ }
3520
+ ),
3521
+ h3: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3522
+ "h3",
3523
+ {
3524
+ ...props,
3525
+ style: {
3526
+ marginTop: 16,
3527
+ marginBottom: 12,
3528
+ fontSize: "1.1em",
3529
+ fontWeight: 600,
3530
+ color: "var(--mantine-color-neutralColor-6)"
3531
+ },
3532
+ children
3533
+ }
3534
+ ),
3535
+ h4: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3536
+ "h4",
3537
+ {
3538
+ ...props,
3539
+ style: {
3540
+ marginTop: 12,
3541
+ marginBottom: 8,
3542
+ fontSize: "1em",
3543
+ fontWeight: 500,
3544
+ color: "var(--mantine-color-neutralColor-6)"
3545
+ },
3546
+ children
3547
+ }
3548
+ ),
3549
+ blockquote: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3550
+ "blockquote",
3551
+ {
3552
+ ...props,
3553
+ style: {
3554
+ margin: "12px 0",
3555
+ padding: "8px 12px",
3556
+ borderLeft: "3px solid var(--mantine-color-neutralColor-6)",
3557
+ backgroundColor: "var(--mantine-color-neutralColor-4)",
3558
+ borderRadius: 8,
3559
+ color: "var(--mantine-color-neutralColor-8)",
3560
+ overflowWrap: "anywhere",
3561
+ wordBreak: "break-word",
3562
+ maxWidth: "100%"
3563
+ },
3564
+ children
3565
+ }
3566
+ ),
3567
+ pre: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3568
+ "pre",
3569
+ {
3570
+ ...props,
3571
+ style: {
3572
+ margin: "12px 0",
3573
+ padding: "12px",
3574
+ backgroundColor: "var(--mantine-color-neutralColor-5)",
3575
+ borderRadius: 8,
3576
+ fontSize: 12,
3577
+ maxWidth: "100%",
3578
+ overflowX: "auto"
3579
+ },
3580
+ children
3581
+ }
3582
+ ),
3583
+ code: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3584
+ "code",
3585
+ {
3586
+ ...props,
3587
+ style: {
3588
+ fontFamily: "monospace",
3589
+ fontSize: 12,
3590
+ backgroundColor: "var(--mantine-color-neutralColor-4)",
3591
+ padding: "2px 4px",
3592
+ borderRadius: 4,
3593
+ overflowWrap: "anywhere",
3594
+ wordBreak: "break-word",
3595
+ whiteSpace: "pre-wrap",
3596
+ maxWidth: "100%"
3597
+ },
3598
+ children
3599
+ }
3600
+ ),
3601
+ p: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3602
+ "p",
3603
+ {
3604
+ ...props,
3605
+ style: {
3606
+ margin: "8px 0",
3607
+ lineHeight: 1.6,
3608
+ color: "var(--mantine-color-neutralColor-8)",
3609
+ overflowWrap: "anywhere",
3610
+ wordBreak: "break-word"
3611
+ },
3612
+ children
3613
+ }
3614
+ ),
3615
+ table: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", margin: "16px 0" }, children: /* @__PURE__ */ jsxRuntime.jsx(
3616
+ "table",
3617
+ {
3618
+ ...props,
3619
+ style: {
3620
+ width: "100%",
3621
+ borderCollapse: "collapse",
3622
+ borderSpacing: 0
3623
+ },
3624
+ children
3625
+ }
3626
+ ) }),
3627
+ thead: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ...props, children }),
3628
+ tbody: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ...props, children }),
3629
+ tr: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("tr", { ...props, children }),
3630
+ th: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3631
+ "th",
3632
+ {
3633
+ ...props,
3634
+ style: {
3635
+ border: "1px solid var(--mantine-color-neutralColor-7)",
3636
+ padding: "8px 12px",
3637
+ fontWeight: 600,
3638
+ textAlign: "left",
3639
+ backgroundColor: "var(--mantine-color-neutralColor-5)"
3640
+ },
3641
+ children
3642
+ }
3643
+ ),
3644
+ td: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3645
+ "td",
3646
+ {
3647
+ ...props,
3648
+ style: {
3649
+ border: "1px solid var(--mantine-color-neutralColor-7)",
3650
+ padding: "8px 12px",
3651
+ textAlign: "left",
3652
+ overflowWrap: "anywhere",
3653
+ wordBreak: "break-word"
3654
+ },
3655
+ children
3656
+ }
3657
+ )
3658
+ },
3659
+ children: message
3660
+ }
3661
+ )
3618
3662
  }
3619
- ) })
3663
+ )
3620
3664
  ] });
3621
3665
  }
3622
3666
  function UserMessage({ message, sender }) {
3623
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { w: "fit-content", bg: "neutralColor.6", sx: { borderRadius: 16 }, py: 12, px: 16, mb: 32, children: [
3667
+ return /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { w: "100%", bg: "neutralColor.6", sx: { borderRadius: 16 }, py: 12, px: 16, mb: 32, children: [
3624
3668
  /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: "neutralColor.8", fz: 12, children: sender }),
3625
3669
  /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: "neutralColor.8", mt: 10, sx: { wordBreak: "break-all" }, children: message }, message)
3626
3670
  ] });
@@ -6072,13 +6116,13 @@ function ActionButton({ onClick, left, right }) {
6072
6116
  }
6073
6117
  );
6074
6118
  }
6075
- const MainAction = react$1.lazy(() => Promise.resolve().then(() => require("./index-LERt98FZ.cjs")));
6076
- const Header$1 = react$1.lazy(() => Promise.resolve().then(() => require("./index-CO6Ygcv-.cjs")));
6077
- const Content = react$1.lazy(() => Promise.resolve().then(() => require("./index-DWUKXIMe.cjs")));
6119
+ const MainAction = react$1.lazy(() => Promise.resolve().then(() => require("./index-BZuf5Uwh.cjs")));
6120
+ const Header$1 = react$1.lazy(() => Promise.resolve().then(() => require("./index-aYeZagBJ.cjs")));
6121
+ const Content = react$1.lazy(() => Promise.resolve().then(() => require("./index-BWT97hNk.cjs")));
6078
6122
  const Map = react$1.lazy(() => Promise.resolve().then(() => require("./index-D4PsPquZ.cjs")));
6079
6123
  const CustomContent = react$1.lazy(() => Promise.resolve().then(() => require("./index-ByrCNpS2.cjs")));
6080
- const Assets = react$1.lazy(() => Promise.resolve().then(() => require("./index-CTZnqmGU.cjs")));
6081
- const Actions = react$1.lazy(() => Promise.resolve().then(() => require("./index-BzEXuxSc.cjs")));
6124
+ const Assets = react$1.lazy(() => Promise.resolve().then(() => require("./index-DIoNw9Is.cjs")));
6125
+ const Actions = react$1.lazy(() => Promise.resolve().then(() => require("./index-BnDHepRw.cjs")));
6082
6126
  const HOVER_BORDER_WIDTH = 1;
6083
6127
  function SodaCardCmp({ numSelected = 0, expanded = true, mainAction, header, content, map, customContent, customFooter, actions, assets, onClick }, ref) {
6084
6128
  const wrapperRef = react$1.useRef(null);
@@ -6415,6 +6459,28 @@ function AssetInfo({
6415
6459
  }
6416
6460
  );
6417
6461
  }
6462
+ function cutText(text, length, ending = "…") {
6463
+ if (!length || text.length <= length) {
6464
+ return text;
6465
+ }
6466
+ const words = text.split(" ");
6467
+ const endingSize = ending.length;
6468
+ let result = "";
6469
+ for (const word of words) {
6470
+ const newValue = result + word + " ";
6471
+ if (newValue.length + endingSize - 1 > length) {
6472
+ break;
6473
+ }
6474
+ result = newValue;
6475
+ }
6476
+ return result.trim() + ending;
6477
+ }
6478
+ function carbonToUSD(carbon) {
6479
+ return (carbon * 0.03).toLocaleString(void 0, {
6480
+ minimumFractionDigits: 0,
6481
+ maximumFractionDigits: 6
6482
+ });
6483
+ }
6418
6484
  const SHARED_ASSET_PROPS = {
6419
6485
  leftTitleColor: "text",
6420
6486
  rightTitleColor: "text",
@@ -11353,4 +11419,4 @@ exports.UserMessage = UserMessage;
11353
11419
  exports.WorkspaceModal = WorkspaceModal;
11354
11420
  exports.cutText = cutText;
11355
11421
  exports.isValidClick = isValidClick;
11356
- //# sourceMappingURL=components-BDiiWelU.cjs.map
11422
+ //# sourceMappingURL=components-JdTP8bty.cjs.map