@alquimia-ai/ui 1.2.0 → 1.2.1

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 (104) hide show
  1. package/dist/components/hooks/index.js +1 -1
  2. package/dist/components/hooks/index.js.map +1 -1
  3. package/dist/components/hooks/index.mjs +1 -1
  4. package/dist/components/hooks/index.mjs.map +1 -1
  5. package/dist/components/molecules/index.d.mts +15 -2
  6. package/dist/components/molecules/index.d.ts +15 -2
  7. package/dist/components/molecules/index.js +837 -725
  8. package/dist/components/molecules/index.js.map +1 -1
  9. package/dist/components/molecules/index.mjs +819 -707
  10. package/dist/components/molecules/index.mjs.map +1 -1
  11. package/dist/components/organisms/index.js +260 -149
  12. package/dist/components/organisms/index.js.map +1 -1
  13. package/dist/components/organisms/index.mjs +258 -147
  14. package/dist/components/organisms/index.mjs.map +1 -1
  15. package/dist/index.d.mts +2 -2
  16. package/dist/index.d.ts +2 -2
  17. package/dist/index.js +265 -153
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +263 -151
  20. package/dist/index.mjs.map +1 -1
  21. package/package.json +52 -32
  22. package/src/components/atoms/index.ts +32 -0
  23. package/src/components/atoms/ui/alert.tsx +59 -0
  24. package/src/components/atoms/ui/aspect-ratio.tsx +7 -0
  25. package/src/components/atoms/ui/avatar.tsx +50 -0
  26. package/src/components/atoms/ui/badge.tsx +36 -0
  27. package/src/components/atoms/ui/breadcrumb.tsx +120 -0
  28. package/src/components/atoms/ui/button.tsx +56 -0
  29. package/src/components/atoms/ui/card.tsx +87 -0
  30. package/src/components/atoms/ui/checkbox.tsx +31 -0
  31. package/src/components/atoms/ui/command.tsx +155 -0
  32. package/src/components/atoms/ui/dialog.tsx +125 -0
  33. package/src/components/atoms/ui/drawer.tsx +119 -0
  34. package/src/components/atoms/ui/input.tsx +26 -0
  35. package/src/components/atoms/ui/label.tsx +26 -0
  36. package/src/components/atoms/ui/loader.tsx +52 -0
  37. package/src/components/atoms/ui/popover.tsx +31 -0
  38. package/src/components/atoms/ui/rich-text.tsx +19 -0
  39. package/src/components/atoms/ui/scroll-area.tsx +48 -0
  40. package/src/components/atoms/ui/select.tsx +160 -0
  41. package/src/components/atoms/ui/skeleton.tsx +15 -0
  42. package/src/components/atoms/ui/slider.tsx +29 -0
  43. package/src/components/atoms/ui/switch.tsx +30 -0
  44. package/src/components/atoms/ui/table.tsx +118 -0
  45. package/src/components/atoms/ui/tabs.tsx +56 -0
  46. package/src/components/atoms/ui/text-area/index.tsx +24 -0
  47. package/src/components/atoms/ui/textarea.tsx +25 -0
  48. package/src/components/atoms/ui/think-indicator.tsx +103 -0
  49. package/src/components/atoms/ui/toast.tsx +129 -0
  50. package/src/components/atoms/ui/toaster.tsx +38 -0
  51. package/src/components/atoms/ui/toggle.tsx +45 -0
  52. package/src/components/atoms/ui/typography/index.tsx +30 -0
  53. package/src/components/hooks/index.ts +4 -0
  54. package/src/components/hooks/use-document.tsx +44 -0
  55. package/src/components/hooks/use-resize-observer.ts +28 -0
  56. package/src/components/hooks/use-text-streaming.ts +63 -0
  57. package/src/components/hooks/use-toast.ts +194 -0
  58. package/src/components/index.ts +1 -0
  59. package/src/components/molecules/alert-dialog.tsx +141 -0
  60. package/src/components/molecules/assistant-button.tsx +148 -0
  61. package/src/components/molecules/call-out.tsx +163 -0
  62. package/src/components/molecules/carousel.tsx +262 -0
  63. package/src/components/molecules/documents/document-selector.tsx +79 -0
  64. package/src/components/molecules/documents/document-viewer.tsx +85 -0
  65. package/src/components/molecules/documents/index.ts +2 -0
  66. package/src/components/molecules/index.ts +11 -0
  67. package/src/components/molecules/navigation-menu.tsx +128 -0
  68. package/src/components/molecules/page-container.tsx +17 -0
  69. package/src/components/molecules/rating-comment.tsx +93 -0
  70. package/src/components/molecules/rating-stars.tsx +136 -0
  71. package/src/components/molecules/rating-thumbs.tsx +90 -0
  72. package/src/components/molecules/sidebar.tsx +107 -0
  73. package/src/components/molecules/sonner.tsx +30 -0
  74. package/src/components/molecules/viewers/index.ts +2 -0
  75. package/src/components/molecules/viewers/pdf-viewer.tsx +138 -0
  76. package/src/components/molecules/viewers/plain-text-viewer.tsx +40 -0
  77. package/src/components/organisms/assistant.tsx +271 -0
  78. package/src/components/organisms/index.ts +6 -0
  79. package/src/components/organisms/rating-dialog.tsx +104 -0
  80. package/src/components/organisms/speechToText.tsx +92 -0
  81. package/src/components/organisms/whisper.tsx +106 -0
  82. package/src/components/templates/cards/index.ts +2 -0
  83. package/src/components/templates/cards/with-image-heading-description-avatar.tsx +94 -0
  84. package/src/components/templates/cards/with-image-heading-description.tsx +63 -0
  85. package/src/components/templates/hero/index.tsx +39 -0
  86. package/src/components/templates/index.ts +4 -0
  87. package/src/components/templates/messages-window.tsx +15 -0
  88. package/src/components/templates/query-box.tsx +13 -0
  89. package/src/components/ui/input.tsx +25 -0
  90. package/src/components/ui/select.tsx +163 -0
  91. package/src/index.ts +7 -0
  92. package/src/lib/index.ts +1 -0
  93. package/src/lib/utils.ts +34 -0
  94. package/src/styles/call-out.css +153 -0
  95. package/src/styles/drawer.css +28 -0
  96. package/src/styles/globals.css +69 -0
  97. package/src/styles/prose.css +51 -0
  98. package/src/styles/ratings.css +27 -0
  99. package/src/styles/themes/base-alquimia.css +95 -0
  100. package/src/styles/themes/base-nordic.css +83 -0
  101. package/src/styles/themes/base-primary.css +85 -0
  102. package/src/styles/themes/base.css +8 -0
  103. package/src/types/index.ts +1 -0
  104. package/src/types/type.ts +76 -0
@@ -198,8 +198,8 @@ function SpeechToText({
198
198
  }
199
199
 
200
200
  // src/components/organisms/assistant.tsx
201
- var React32 = __toESM(require("react"));
202
- var import_react8 = require("react");
201
+ var React33 = __toESM(require("react"));
202
+ var import_react9 = require("react");
203
203
 
204
204
  // src/components/atoms/ui/button.tsx
205
205
  var React = __toESM(require("react"));
@@ -1728,20 +1728,131 @@ var PageContainer = (0, import_react6.forwardRef)(
1728
1728
  );
1729
1729
  PageContainer.displayName = "PageContainer";
1730
1730
 
1731
- // src/components/molecules/carousel.tsx
1731
+ // src/components/molecules/assistant-button.tsx
1732
1732
  var React25 = __toESM(require("react"));
1733
+ var import_react7 = require("react");
1734
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1735
+ var AssistantSuggestions = React25.forwardRef(({ suggestions, showSuggestions, className }, ref) => {
1736
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1737
+ "div",
1738
+ {
1739
+ ref,
1740
+ className: cn(
1741
+ "absolute bottom-[calc(100%+0.5rem)] right-0 pb-2 mb-4 alq--assistant-suggestions-container",
1742
+ "transition-all duration-300",
1743
+ showSuggestions ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4",
1744
+ className
1745
+ ),
1746
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "rounded-lg p-2 pr-0 w-64", children: suggestions.map((suggestion, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
1747
+ "button",
1748
+ {
1749
+ onClick: () => suggestion.action?.(),
1750
+ style: {
1751
+ transitionDelay: showSuggestions ? `${index * 50}ms` : "0ms"
1752
+ },
1753
+ className: cn(
1754
+ "bg-background flex items-center gap-2 border p-2 pr-4 my-2 rounded-full ml-auto",
1755
+ "text-primary hover:bg-secondary",
1756
+ "transition-all duration-100",
1757
+ "origin-bottom w-fit",
1758
+ "alq--assistant-suggestion",
1759
+ showSuggestions ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4"
1760
+ ),
1761
+ children: [
1762
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(suggestion.icon, { className: "w-5 h-5 text-primary" }),
1763
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs whitespace-nowrap font-normal", children: suggestion.label })
1764
+ ]
1765
+ },
1766
+ index
1767
+ )) })
1768
+ }
1769
+ );
1770
+ });
1771
+ AssistantSuggestions.displayName = "Suggestions";
1772
+ var AssistantButton = React25.forwardRef(
1773
+ ({
1774
+ icon: Icon2,
1775
+ clickAction,
1776
+ className,
1777
+ suggestions = []
1778
+ }, ref) => {
1779
+ const [isVisible, setIsVisible] = (0, import_react7.useState)(false);
1780
+ const [showSuggestions, setShowSuggestions] = (0, import_react7.useState)(false);
1781
+ const handleMouseEnter = () => {
1782
+ setIsVisible(true);
1783
+ requestAnimationFrame(() => {
1784
+ requestAnimationFrame(() => {
1785
+ setShowSuggestions(true);
1786
+ });
1787
+ });
1788
+ };
1789
+ const handleMouseLeave = () => {
1790
+ setShowSuggestions(false);
1791
+ setTimeout(() => setIsVisible(false), 300);
1792
+ };
1793
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1794
+ "div",
1795
+ {
1796
+ ref,
1797
+ className: cn(
1798
+ "fixed bottom-8 right-4 z-50",
1799
+ "alq--assistant-button-container",
1800
+ className
1801
+ ),
1802
+ onMouseEnter: handleMouseEnter,
1803
+ onMouseLeave: handleMouseLeave,
1804
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative group", children: [
1805
+ isVisible && suggestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1806
+ AssistantSuggestions,
1807
+ {
1808
+ suggestions,
1809
+ showSuggestions
1810
+ }
1811
+ ),
1812
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1813
+ Button,
1814
+ {
1815
+ variant: "outline",
1816
+ size: "sm",
1817
+ className: cn(
1818
+ "fixed hover:bg-opacity-70 transition-all duration-300",
1819
+ "bottom-4 h-12 w-12 right-4 z-50 rounded-full p-2",
1820
+ "shadow-md",
1821
+ "hover:shadow-lg",
1822
+ showSuggestions ? "scale-110" : "hover:scale-105",
1823
+ "alq--assistant-button"
1824
+ ),
1825
+ onClick: clickAction,
1826
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1827
+ Icon2,
1828
+ {
1829
+ style: { width: "22px", height: "22px" },
1830
+ className: "text-primary"
1831
+ }
1832
+ )
1833
+ }
1834
+ )
1835
+ ] })
1836
+ }
1837
+ );
1838
+ }
1839
+ );
1840
+ AssistantButton.displayName = "AssistantButton";
1841
+
1842
+ // src/components/molecules/carousel.tsx
1843
+ var React26 = __toESM(require("react"));
1733
1844
  var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
1734
1845
  var import_lucide_react9 = require("lucide-react");
1735
- var import_jsx_runtime33 = require("react/jsx-runtime");
1736
- var CarouselContext = React25.createContext(null);
1846
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1847
+ var CarouselContext = React26.createContext(null);
1737
1848
  function useCarousel() {
1738
- const context = React25.useContext(CarouselContext);
1849
+ const context = React26.useContext(CarouselContext);
1739
1850
  if (!context) {
1740
1851
  throw new Error("useCarousel must be used within a <Carousel />");
1741
1852
  }
1742
1853
  return context;
1743
1854
  }
1744
- var Carousel = React25.forwardRef(
1855
+ var Carousel = React26.forwardRef(
1745
1856
  ({
1746
1857
  orientation = "horizontal",
1747
1858
  opts,
@@ -1758,22 +1869,22 @@ var Carousel = React25.forwardRef(
1758
1869
  },
1759
1870
  plugins
1760
1871
  );
1761
- const [canScrollPrev, setCanScrollPrev] = React25.useState(false);
1762
- const [canScrollNext, setCanScrollNext] = React25.useState(false);
1763
- const onSelect = React25.useCallback((api2) => {
1872
+ const [canScrollPrev, setCanScrollPrev] = React26.useState(false);
1873
+ const [canScrollNext, setCanScrollNext] = React26.useState(false);
1874
+ const onSelect = React26.useCallback((api2) => {
1764
1875
  if (!api2) {
1765
1876
  return;
1766
1877
  }
1767
1878
  setCanScrollPrev(api2.canScrollPrev());
1768
1879
  setCanScrollNext(api2.canScrollNext());
1769
1880
  }, []);
1770
- const scrollPrev = React25.useCallback(() => {
1881
+ const scrollPrev = React26.useCallback(() => {
1771
1882
  api?.scrollPrev();
1772
1883
  }, [api]);
1773
- const scrollNext = React25.useCallback(() => {
1884
+ const scrollNext = React26.useCallback(() => {
1774
1885
  api?.scrollNext();
1775
1886
  }, [api]);
1776
- const handleKeyDown = React25.useCallback(
1887
+ const handleKeyDown = React26.useCallback(
1777
1888
  (event) => {
1778
1889
  if (event.key === "ArrowLeft") {
1779
1890
  event.preventDefault();
@@ -1785,13 +1896,13 @@ var Carousel = React25.forwardRef(
1785
1896
  },
1786
1897
  [scrollPrev, scrollNext]
1787
1898
  );
1788
- React25.useEffect(() => {
1899
+ React26.useEffect(() => {
1789
1900
  if (!api || !setApi) {
1790
1901
  return;
1791
1902
  }
1792
1903
  setApi(api);
1793
1904
  }, [api, setApi]);
1794
- React25.useEffect(() => {
1905
+ React26.useEffect(() => {
1795
1906
  if (!api) {
1796
1907
  return;
1797
1908
  }
@@ -1802,7 +1913,7 @@ var Carousel = React25.forwardRef(
1802
1913
  api?.off("select", onSelect);
1803
1914
  };
1804
1915
  }, [api, onSelect]);
1805
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1916
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1806
1917
  CarouselContext.Provider,
1807
1918
  {
1808
1919
  value: {
@@ -1815,7 +1926,7 @@ var Carousel = React25.forwardRef(
1815
1926
  canScrollPrev,
1816
1927
  canScrollNext
1817
1928
  },
1818
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1929
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1819
1930
  "div",
1820
1931
  {
1821
1932
  ref,
@@ -1832,9 +1943,9 @@ var Carousel = React25.forwardRef(
1832
1943
  }
1833
1944
  );
1834
1945
  Carousel.displayName = "Carousel";
1835
- var CarouselContent = React25.forwardRef(({ className, ...props }, ref) => {
1946
+ var CarouselContent = React26.forwardRef(({ className, ...props }, ref) => {
1836
1947
  const { carouselRef, orientation } = useCarousel();
1837
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1948
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1838
1949
  "div",
1839
1950
  {
1840
1951
  ref,
@@ -1848,9 +1959,9 @@ var CarouselContent = React25.forwardRef(({ className, ...props }, ref) => {
1848
1959
  ) });
1849
1960
  });
1850
1961
  CarouselContent.displayName = "CarouselContent";
1851
- var CarouselItem = React25.forwardRef(({ className, ...props }, ref) => {
1962
+ var CarouselItem = React26.forwardRef(({ className, ...props }, ref) => {
1852
1963
  const { orientation } = useCarousel();
1853
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1964
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1854
1965
  "div",
1855
1966
  {
1856
1967
  ref,
@@ -1866,9 +1977,9 @@ var CarouselItem = React25.forwardRef(({ className, ...props }, ref) => {
1866
1977
  );
1867
1978
  });
1868
1979
  CarouselItem.displayName = "CarouselItem";
1869
- var CarouselPrevious = React25.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
1980
+ var CarouselPrevious = React26.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
1870
1981
  const { orientation, scrollPrev, canScrollPrev } = useCarousel();
1871
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
1982
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
1872
1983
  Button,
1873
1984
  {
1874
1985
  ref,
@@ -1883,16 +1994,16 @@ var CarouselPrevious = React25.forwardRef(({ className, variant = "outline", siz
1883
1994
  onClick: scrollPrev,
1884
1995
  ...props,
1885
1996
  children: [
1886
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react9.ArrowLeft, { className: "h-4 w-4" }),
1887
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "sr-only", children: "Previous slide" })
1997
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react9.ArrowLeft, { className: "h-4 w-4" }),
1998
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", children: "Previous slide" })
1888
1999
  ]
1889
2000
  }
1890
2001
  );
1891
2002
  });
1892
2003
  CarouselPrevious.displayName = "CarouselPrevious";
1893
- var CarouselNext = React25.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
2004
+ var CarouselNext = React26.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
1894
2005
  const { orientation, scrollNext, canScrollNext } = useCarousel();
1895
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2006
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
1896
2007
  Button,
1897
2008
  {
1898
2009
  ref,
@@ -1907,8 +2018,8 @@ var CarouselNext = React25.forwardRef(({ className, variant = "outline", size =
1907
2018
  onClick: scrollNext,
1908
2019
  ...props,
1909
2020
  children: [
1910
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react9.ArrowRight, { className: "h-4 w-4" }),
1911
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "sr-only", children: "Next slide" })
2021
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react9.ArrowRight, { className: "h-4 w-4" }),
2022
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", children: "Next slide" })
1912
2023
  ]
1913
2024
  }
1914
2025
  );
@@ -1916,12 +2027,12 @@ var CarouselNext = React25.forwardRef(({ className, variant = "outline", size =
1916
2027
  CarouselNext.displayName = "CarouselNext";
1917
2028
 
1918
2029
  // src/components/molecules/navigation-menu.tsx
1919
- var React26 = __toESM(require("react"));
2030
+ var React27 = __toESM(require("react"));
1920
2031
  var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"));
1921
2032
  var import_class_variance_authority9 = require("class-variance-authority");
1922
2033
  var import_lucide_react10 = require("lucide-react");
1923
- var import_jsx_runtime34 = require("react/jsx-runtime");
1924
- var NavigationMenu = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2034
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2035
+ var NavigationMenu = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1925
2036
  NavigationMenuPrimitive.Root,
1926
2037
  {
1927
2038
  ref,
@@ -1932,12 +2043,12 @@ var NavigationMenu = React26.forwardRef(({ className, children, ...props }, ref)
1932
2043
  ...props,
1933
2044
  children: [
1934
2045
  children,
1935
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(NavigationMenuViewport, {})
2046
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(NavigationMenuViewport, {})
1936
2047
  ]
1937
2048
  }
1938
2049
  ));
1939
2050
  NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
1940
- var NavigationMenuList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2051
+ var NavigationMenuList = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1941
2052
  NavigationMenuPrimitive.List,
1942
2053
  {
1943
2054
  ref,
@@ -1952,7 +2063,7 @@ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
1952
2063
  var navigationMenuTriggerStyle = (0, import_class_variance_authority9.cva)(
1953
2064
  "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
1954
2065
  );
1955
- var NavigationMenuTrigger = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2066
+ var NavigationMenuTrigger = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1956
2067
  NavigationMenuPrimitive.Trigger,
1957
2068
  {
1958
2069
  ref,
@@ -1961,7 +2072,7 @@ var NavigationMenuTrigger = React26.forwardRef(({ className, children, ...props
1961
2072
  children: [
1962
2073
  children,
1963
2074
  " ",
1964
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2075
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1965
2076
  import_lucide_react10.ChevronDown,
1966
2077
  {
1967
2078
  className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
@@ -1972,7 +2083,7 @@ var NavigationMenuTrigger = React26.forwardRef(({ className, children, ...props
1972
2083
  }
1973
2084
  ));
1974
2085
  NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
1975
- var NavigationMenuContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2086
+ var NavigationMenuContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1976
2087
  NavigationMenuPrimitive.Content,
1977
2088
  {
1978
2089
  ref,
@@ -1984,7 +2095,7 @@ var NavigationMenuContent = React26.forwardRef(({ className, ...props }, ref) =>
1984
2095
  }
1985
2096
  ));
1986
2097
  NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
1987
- var NavigationMenuViewport = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2098
+ var NavigationMenuViewport = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1988
2099
  NavigationMenuPrimitive.Viewport,
1989
2100
  {
1990
2101
  className: cn(
@@ -1996,7 +2107,7 @@ var NavigationMenuViewport = React26.forwardRef(({ className, ...props }, ref) =
1996
2107
  }
1997
2108
  ) }));
1998
2109
  NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
1999
- var NavigationMenuIndicator = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2110
+ var NavigationMenuIndicator = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2000
2111
  NavigationMenuPrimitive.Indicator,
2001
2112
  {
2002
2113
  ref,
@@ -2005,15 +2116,15 @@ var NavigationMenuIndicator = React26.forwardRef(({ className, ...props }, ref)
2005
2116
  className
2006
2117
  ),
2007
2118
  ...props,
2008
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
2119
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
2009
2120
  }
2010
2121
  ));
2011
2122
  NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
2012
2123
 
2013
2124
  // src/components/molecules/sidebar.tsx
2014
- var React27 = __toESM(require("react"));
2125
+ var React28 = __toESM(require("react"));
2015
2126
  var import_class_variance_authority10 = require("class-variance-authority");
2016
- var import_jsx_runtime35 = require("react/jsx-runtime");
2127
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2017
2128
  var sidebarVariants = (0, import_class_variance_authority10.cva)(
2018
2129
  "flex flex-col border-r",
2019
2130
  {
@@ -2029,7 +2140,7 @@ var sidebarVariants = (0, import_class_variance_authority10.cva)(
2029
2140
  }
2030
2141
  }
2031
2142
  );
2032
- var SidebarFooter = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2143
+ var SidebarFooter = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2033
2144
  "div",
2034
2145
  {
2035
2146
  ref,
@@ -2039,7 +2150,7 @@ var SidebarFooter = React27.forwardRef(({ className, children, ...props }, ref)
2039
2150
  }
2040
2151
  ));
2041
2152
  SidebarFooter.displayName = "SidebarFooter";
2042
- var Sidebar = React27.forwardRef(
2153
+ var Sidebar = React28.forwardRef(
2043
2154
  ({
2044
2155
  className,
2045
2156
  items,
@@ -2052,8 +2163,8 @@ var Sidebar = React27.forwardRef(
2052
2163
  buttonClassName,
2053
2164
  ...props
2054
2165
  }, ref) => {
2055
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn(className, "alq--navigation-sidebar h-full"), ref, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("aside", { className: cn(sidebarVariants({ size }), "h-full"), children: [
2056
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ScrollArea, { className: "flex-grow justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col gap-2 p-4", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2166
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn(className, "alq--navigation-sidebar h-full"), ref, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("aside", { className: cn(sidebarVariants({ size }), "h-full"), children: [
2167
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ScrollArea, { className: "flex-grow justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex flex-col gap-2 p-4", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2057
2168
  Button,
2058
2169
  {
2059
2170
  variant: selectedSection?.name === item.name ? selectedVariant : defaultVariant,
@@ -2065,13 +2176,13 @@ var Sidebar = React27.forwardRef(
2065
2176
  }
2066
2177
  },
2067
2178
  children: [
2068
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(item.icon, { className: "mr-2 h-4 w-4" }),
2179
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(item.icon, { className: "mr-2 h-4 w-4" }),
2069
2180
  item.name
2070
2181
  ]
2071
2182
  },
2072
2183
  item.name
2073
2184
  )) }) }),
2074
- footerContent && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SidebarFooter, { children: footerContent })
2185
+ footerContent && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarFooter, { children: footerContent })
2075
2186
  ] }) });
2076
2187
  }
2077
2188
  );
@@ -2079,17 +2190,17 @@ var Sidebar = React27.forwardRef(
2079
2190
  // src/components/molecules/sonner.tsx
2080
2191
  var import_next_themes = require("next-themes");
2081
2192
  var import_sonner = require("sonner");
2082
- var import_jsx_runtime36 = require("react/jsx-runtime");
2193
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2083
2194
 
2084
2195
  // src/components/molecules/rating-stars.tsx
2085
- var React28 = __toESM(require("react"));
2196
+ var React29 = __toESM(require("react"));
2086
2197
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
2087
2198
  var import_lucide_react11 = require("lucide-react");
2088
- var import_jsx_runtime37 = require("react/jsx-runtime");
2199
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2089
2200
  var TooltipProvider = TooltipPrimitive.Provider;
2090
2201
  var Tooltip = TooltipPrimitive.Root;
2091
2202
  var TooltipTrigger = TooltipPrimitive.Trigger;
2092
- var TooltipContent = React28.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2203
+ var TooltipContent = React29.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2093
2204
  TooltipPrimitive.Content,
2094
2205
  {
2095
2206
  ref,
@@ -2102,14 +2213,14 @@ var TooltipContent = React28.forwardRef(({ className, sideOffset = 4, ...props }
2102
2213
  }
2103
2214
  ));
2104
2215
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
2105
- var StarRating = React28.forwardRef(({ rating, onRate }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { ref, className: "flex", children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2216
+ var StarRating = React29.forwardRef(({ rating, onRate }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { ref, className: "flex", children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2106
2217
  Button,
2107
2218
  {
2108
2219
  onClick: () => onRate(star),
2109
2220
  variant: "link",
2110
2221
  className: "p-1 transition-colors [&_svg]:size-5 h-5",
2111
2222
  "aria-label": `Rate ${star} star${star !== 1 ? "s" : ""}`,
2112
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2223
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2113
2224
  import_lucide_react11.Star,
2114
2225
  {
2115
2226
  className: cn(
@@ -2122,19 +2233,19 @@ var StarRating = React28.forwardRef(({ rating, onRate }, ref) => /* @__PURE__ */
2122
2233
  star
2123
2234
  )) }));
2124
2235
  StarRating.displayName = "StarRating";
2125
- var RatingStars = React28.forwardRef(({
2236
+ var RatingStars = React29.forwardRef(({
2126
2237
  currentRating = 0,
2127
2238
  onRate,
2128
2239
  className,
2129
2240
  isLoading
2130
2241
  }, ref) => {
2131
- const [open, setOpen] = React28.useState(false);
2132
- const [animate, setAnimate] = React28.useState(false);
2242
+ const [open, setOpen] = React29.useState(false);
2243
+ const [animate, setAnimate] = React29.useState(false);
2133
2244
  const handleRate = (rating) => {
2134
2245
  onRate(rating);
2135
2246
  setOpen(false);
2136
2247
  };
2137
- React28.useEffect(() => {
2248
+ React29.useEffect(() => {
2138
2249
  if (currentRating > 0) {
2139
2250
  setAnimate(true);
2140
2251
  const timer = setTimeout(() => setAnimate(false), 150);
@@ -2142,8 +2253,8 @@ var RatingStars = React28.forwardRef(({
2142
2253
  }
2143
2254
  }, [currentRating]);
2144
2255
  const hasRated = currentRating > 0;
2145
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Tooltip, { open, onOpenChange: setOpen, children: [
2146
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2256
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Tooltip, { open, onOpenChange: setOpen, children: [
2257
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2147
2258
  Button,
2148
2259
  {
2149
2260
  ref,
@@ -2154,7 +2265,7 @@ var RatingStars = React28.forwardRef(({
2154
2265
  ),
2155
2266
  disabled: isLoading,
2156
2267
  onClick: () => setOpen(!open),
2157
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2268
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2158
2269
  import_lucide_react11.Star,
2159
2270
  {
2160
2271
  className: cn(
@@ -2167,7 +2278,7 @@ var RatingStars = React28.forwardRef(({
2167
2278
  )
2168
2279
  }
2169
2280
  ) }),
2170
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TooltipContent, { side: "top", align: "center", className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "p-2 bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2281
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipContent, { side: "top", align: "center", className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "p-2 bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2171
2282
  StarRating,
2172
2283
  {
2173
2284
  rating: currentRating,
@@ -2179,10 +2290,10 @@ var RatingStars = React28.forwardRef(({
2179
2290
  RatingStars.displayName = "RatingStars";
2180
2291
 
2181
2292
  // src/components/molecules/rating-thumbs.tsx
2182
- var React29 = __toESM(require("react"));
2293
+ var React30 = __toESM(require("react"));
2183
2294
  var import_lucide_react12 = require("lucide-react");
2184
- var import_jsx_runtime38 = require("react/jsx-runtime");
2185
- var RatingThumbs = React29.forwardRef(
2295
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2296
+ var RatingThumbs = React30.forwardRef(
2186
2297
  ({
2187
2298
  currentRating,
2188
2299
  onRate,
@@ -2190,15 +2301,15 @@ var RatingThumbs = React29.forwardRef(
2190
2301
  className,
2191
2302
  isLoading
2192
2303
  }, ref) => {
2193
- const [animate, setAnimate] = React29.useState(false);
2194
- React29.useEffect(() => {
2304
+ const [animate, setAnimate] = React30.useState(false);
2305
+ React30.useEffect(() => {
2195
2306
  if (currentRating) {
2196
2307
  setAnimate(true);
2197
2308
  const timer = setTimeout(() => setAnimate(false), 150);
2198
2309
  return () => clearTimeout(timer);
2199
2310
  }
2200
2311
  }, [currentRating]);
2201
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2312
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2202
2313
  "div",
2203
2314
  {
2204
2315
  ref,
@@ -2209,7 +2320,7 @@ var RatingThumbs = React29.forwardRef(
2209
2320
  className
2210
2321
  ),
2211
2322
  children: [
2212
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2323
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2213
2324
  Button,
2214
2325
  {
2215
2326
  variant: "link",
@@ -2220,7 +2331,7 @@ var RatingThumbs = React29.forwardRef(
2220
2331
  ),
2221
2332
  "aria-label": "Thumbs up",
2222
2333
  disabled: isLoading,
2223
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2334
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2224
2335
  import_lucide_react12.ThumbsUp,
2225
2336
  {
2226
2337
  className: cn(
@@ -2233,7 +2344,7 @@ var RatingThumbs = React29.forwardRef(
2233
2344
  )
2234
2345
  }
2235
2346
  ),
2236
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2347
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2237
2348
  Button,
2238
2349
  {
2239
2350
  variant: "link",
@@ -2244,7 +2355,7 @@ var RatingThumbs = React29.forwardRef(
2244
2355
  ),
2245
2356
  "aria-label": "Thumbs down",
2246
2357
  disabled: isLoading,
2247
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2358
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2248
2359
  import_lucide_react12.ThumbsDown,
2249
2360
  {
2250
2361
  className: cn(
@@ -2265,30 +2376,30 @@ var RatingThumbs = React29.forwardRef(
2265
2376
  RatingThumbs.displayName = "RatingThumbs";
2266
2377
 
2267
2378
  // src/components/molecules/rating-comment.tsx
2268
- var React30 = __toESM(require("react"));
2379
+ var React31 = __toESM(require("react"));
2269
2380
  var import_lucide_react13 = require("lucide-react");
2270
- var import_jsx_runtime39 = require("react/jsx-runtime");
2271
- var RatingComment = React30.forwardRef(
2381
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2382
+ var RatingComment = React31.forwardRef(
2272
2383
  ({ currentRating, onRate, className, isLoading }, ref) => {
2273
- const [open, setOpen] = React30.useState(false);
2274
- const [comment, setComment] = React30.useState("");
2275
- const [animate, setAnimate] = React30.useState(false);
2384
+ const [open, setOpen] = React31.useState(false);
2385
+ const [comment, setComment] = React31.useState("");
2386
+ const [animate, setAnimate] = React31.useState(false);
2276
2387
  const handleRate = () => {
2277
2388
  onRate(comment);
2278
2389
  setOpen(false);
2279
2390
  };
2280
- React30.useEffect(() => {
2391
+ React31.useEffect(() => {
2281
2392
  if (currentRating) {
2282
2393
  setAnimate(true);
2283
2394
  const timer = setTimeout(() => setAnimate(false), 150);
2284
2395
  return () => clearTimeout(timer);
2285
2396
  }
2286
2397
  }, [currentRating]);
2287
- React30.useEffect(() => {
2398
+ React31.useEffect(() => {
2288
2399
  setComment("");
2289
2400
  }, [open]);
2290
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Dialog, { open, onOpenChange: setOpen, children: [
2291
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2401
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Dialog, { open, onOpenChange: setOpen, children: [
2402
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DialogTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2292
2403
  Button,
2293
2404
  {
2294
2405
  ref,
@@ -2299,7 +2410,7 @@ var RatingComment = React30.forwardRef(
2299
2410
  className
2300
2411
  ),
2301
2412
  disabled: isLoading,
2302
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2413
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2303
2414
  import_lucide_react13.Book,
2304
2415
  {
2305
2416
  className: cn(
@@ -2312,10 +2423,10 @@ var RatingComment = React30.forwardRef(
2312
2423
  )
2313
2424
  }
2314
2425
  ) }),
2315
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogOverlay, { className: "fixed inset-0 bg-black bg-opacity-50" }),
2316
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(DialogContent, { "aria-describedby": void 0, children: [
2317
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogTitle, { className: "text-lg font-medium", children: "Deja un comentario" }),
2318
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2426
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DialogOverlay, { className: "fixed inset-0 bg-black bg-opacity-50" }),
2427
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(DialogContent, { "aria-describedby": void 0, children: [
2428
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DialogTitle, { className: "text-lg font-medium", children: "Deja un comentario" }),
2429
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2319
2430
  "textarea",
2320
2431
  {
2321
2432
  className: "mt-4 w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary",
@@ -2324,7 +2435,7 @@ var RatingComment = React30.forwardRef(
2324
2435
  onChange: (e) => setComment(e.target.value)
2325
2436
  }
2326
2437
  ),
2327
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2438
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2328
2439
  Button,
2329
2440
  {
2330
2441
  onClick: handleRate,
@@ -2339,27 +2450,27 @@ var RatingComment = React30.forwardRef(
2339
2450
  RatingComment.displayName = "RatingComment";
2340
2451
 
2341
2452
  // src/components/molecules/call-out.tsx
2342
- var React31 = __toESM(require("react"));
2453
+ var React32 = __toESM(require("react"));
2343
2454
 
2344
2455
  // src/components/hooks/use-text-streaming.ts
2345
- var import_react7 = require("react");
2456
+ var import_react8 = require("react");
2346
2457
  var CHAR_DELAY = 25;
2347
2458
  var PUNCTUATION_DELAY = 200;
2348
2459
  var PUNCTUATION_MARKS = [".", "!", "?", ";", ":"];
2349
2460
  function useTextStreaming(content, shouldStream, handleIsTextStreaming) {
2350
- const [displayedContent, setDisplayedContent] = (0, import_react7.useState)("");
2351
- const timeoutId = (0, import_react7.useRef)(null);
2352
- const hasStartedStreaming = (0, import_react7.useRef)(false);
2461
+ const [displayedContent, setDisplayedContent] = (0, import_react8.useState)("");
2462
+ const timeoutId = (0, import_react8.useRef)(null);
2463
+ const hasStartedStreaming = (0, import_react8.useRef)(false);
2353
2464
  const getDelayForChar = (text, position) => {
2354
2465
  if (position === 0) return CHAR_DELAY;
2355
- const previousChar = text[position - 1];
2466
+ const previousChar = text[position - 1] || "";
2356
2467
  const isEllipsis = text.slice(position - 1, position + 2) === "...";
2357
2468
  if (isEllipsis) {
2358
2469
  return CHAR_DELAY;
2359
2470
  }
2360
2471
  return PUNCTUATION_MARKS.includes(previousChar) ? PUNCTUATION_DELAY : CHAR_DELAY;
2361
2472
  };
2362
- (0, import_react7.useEffect)(() => {
2473
+ (0, import_react8.useEffect)(() => {
2363
2474
  if (!shouldStream && !hasStartedStreaming.current) {
2364
2475
  setDisplayedContent(content);
2365
2476
  handleIsTextStreaming?.(false);
@@ -2389,9 +2500,9 @@ function useTextStreaming(content, shouldStream, handleIsTextStreaming) {
2389
2500
  }
2390
2501
 
2391
2502
  // src/components/molecules/call-out.tsx
2392
- var import_jsx_runtime40 = require("react/jsx-runtime");
2393
- var CallOut = React31.forwardRef(({ className, children, role, ...props }, ref) => {
2394
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2503
+ var import_jsx_runtime41 = require("react/jsx-runtime");
2504
+ var CallOut = React32.forwardRef(({ className, children, role, ...props }, ref) => {
2505
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2395
2506
  "div",
2396
2507
  {
2397
2508
  ref,
@@ -2402,8 +2513,8 @@ var CallOut = React31.forwardRef(({ className, children, role, ...props }, ref)
2402
2513
  }
2403
2514
  );
2404
2515
  });
2405
- var CallOutDate = React31.forwardRef(({ className, children, ...props }, ref) => {
2406
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2516
+ var CallOutDate = React32.forwardRef(({ className, children, ...props }, ref) => {
2517
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2407
2518
  "div",
2408
2519
  {
2409
2520
  ref,
@@ -2417,13 +2528,13 @@ var CallOutDate = React31.forwardRef(({ className, children, ...props }, ref) =>
2417
2528
  }
2418
2529
  );
2419
2530
  });
2420
- var CallOutActions = React31.forwardRef(({ className, actions, role, message, ...props }, ref) => {
2421
- const [isLoading, setIsLoading] = React31.useState(false);
2422
- const [isClicked, setIsClicked] = React31.useState(false);
2531
+ var CallOutActions = React32.forwardRef(({ className, actions, role, message, ...props }, ref) => {
2532
+ const [isLoading, setIsLoading] = React32.useState(false);
2533
+ const [isClicked, setIsClicked] = React32.useState(false);
2423
2534
  if (role === "user") {
2424
2535
  return null;
2425
2536
  }
2426
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { ref, className: cn("alq--callout-actions", className), ...props, children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2537
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { ref, className: cn("alq--callout-actions", className), ...props, children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2427
2538
  "button",
2428
2539
  {
2429
2540
  className: cn(
@@ -2445,7 +2556,7 @@ var CallOutActions = React31.forwardRef(({ className, actions, role, message, ..
2445
2556
  });
2446
2557
  },
2447
2558
  children: [
2448
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2559
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2449
2560
  "span",
2450
2561
  {
2451
2562
  className: cn("alq-action-icon-wrapper", {
@@ -2454,18 +2565,18 @@ var CallOutActions = React31.forwardRef(({ className, actions, role, message, ..
2454
2565
  children: action.icon
2455
2566
  }
2456
2567
  ),
2457
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("label", { children: action.label })
2568
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("label", { children: action.label })
2458
2569
  ]
2459
2570
  },
2460
2571
  action.label
2461
2572
  )) });
2462
2573
  });
2463
- var CallOutResponse = React31.forwardRef(
2574
+ var CallOutResponse = React32.forwardRef(
2464
2575
  ({ className, children, role, additionalInfo, isStreaming, handleIsTextStreaming, ...props }, ref) => {
2465
2576
  const content = String(children || "");
2466
2577
  const shouldStream = role === "assistant" && isStreaming;
2467
2578
  const displayedContent = useTextStreaming(content, shouldStream ?? false, handleIsTextStreaming);
2468
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2579
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2469
2580
  "div",
2470
2581
  {
2471
2582
  ref,
@@ -2478,8 +2589,8 @@ var CallOutResponse = React31.forwardRef(
2478
2589
  ),
2479
2590
  ...props,
2480
2591
  children: [
2481
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RichText, { content: displayedContent }),
2482
- additionalInfo && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2592
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RichText, { content: displayedContent }),
2593
+ additionalInfo && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2483
2594
  "div",
2484
2595
  {
2485
2596
  className: cn(
@@ -2502,19 +2613,19 @@ CallOutResponse.displayName = "CallOutResponse";
2502
2613
 
2503
2614
  // src/components/organisms/assistant.tsx
2504
2615
  var import_lucide_react14 = require("lucide-react");
2505
- var import_jsx_runtime41 = require("react/jsx-runtime");
2506
- var Assistant = React32.forwardRef(
2616
+ var import_jsx_runtime42 = require("react/jsx-runtime");
2617
+ var Assistant = React33.forwardRef(
2507
2618
  ({ className, sdk, title, description, children, ...props }, ref) => {
2508
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2619
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2509
2620
  "div",
2510
2621
  {
2511
2622
  ref,
2512
2623
  className: cn("flex flex-col h-full bg-background text-foreground", className),
2513
2624
  ...props,
2514
2625
  children: [
2515
- (title || description) && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(AssistantHeader, { children: [
2516
- title && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AssistantTitle, { title }),
2517
- description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AssistantDescription, { description })
2626
+ (title || description) && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(AssistantHeader, { children: [
2627
+ title && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AssistantTitle, { title }),
2628
+ description && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AssistantDescription, { description })
2518
2629
  ] }),
2519
2630
  children
2520
2631
  ]
@@ -2523,14 +2634,14 @@ var Assistant = React32.forwardRef(
2523
2634
  }
2524
2635
  );
2525
2636
  Assistant.displayName = "Assistant";
2526
- var AssistantTitle = React32.forwardRef(
2527
- ({ className, title, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { ref, className: cn("text-foreground", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Typography, { typeStyle: "heading1", as: "h1", children: title }) })
2637
+ var AssistantTitle = React33.forwardRef(
2638
+ ({ className, title, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { ref, className: cn("text-foreground", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Typography, { typeStyle: "heading1", as: "h1", children: title }) })
2528
2639
  );
2529
2640
  AssistantTitle.displayName = "AssistantTitle";
2530
- var AssistantDescription = React32.forwardRef(({ className, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { ref, className: cn("text-foreground", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Typography, { typeStyle: "display", as: "p", children: description }) }));
2641
+ var AssistantDescription = React33.forwardRef(({ className, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { ref, className: cn("text-foreground", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Typography, { typeStyle: "display", as: "p", children: description }) }));
2531
2642
  AssistantDescription.displayName = "AssistantDescription";
2532
- var AssistantHeader = React32.forwardRef(
2533
- ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2643
+ var AssistantHeader = React33.forwardRef(
2644
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2534
2645
  "div",
2535
2646
  {
2536
2647
  ref,
@@ -2541,7 +2652,7 @@ var AssistantHeader = React32.forwardRef(
2541
2652
  )
2542
2653
  );
2543
2654
  AssistantHeader.displayName = "AssistantHeader";
2544
- var AssistantMessageArea = React32.forwardRef(
2655
+ var AssistantMessageArea = React33.forwardRef(
2545
2656
  ({
2546
2657
  className,
2547
2658
  messages,
@@ -2552,23 +2663,23 @@ var AssistantMessageArea = React32.forwardRef(
2552
2663
  handleIsTextStreaming,
2553
2664
  ...props
2554
2665
  }, ref) => {
2555
- (0, import_react8.useEffect)(() => {
2666
+ (0, import_react9.useEffect)(() => {
2556
2667
  messagesEndRef.current?.scrollIntoView({ behavior: "instant" });
2557
2668
  }, []);
2558
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2669
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2559
2670
  "div",
2560
2671
  {
2561
2672
  ref,
2562
2673
  className: cn("p-6 overflow-y-auto flex-grow bg-background", className),
2563
2674
  ...props,
2564
2675
  children: [
2565
- messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2676
+ messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2566
2677
  CallOut,
2567
2678
  {
2568
2679
  role: message.role,
2569
2680
  message,
2570
2681
  children: [
2571
- message.created_at && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "text-xs text-muted-foreground/80 pb-1", children: new Date(Number(message.created_at)).toLocaleString("es-ES", {
2682
+ message.created_at && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "text-xs text-muted-foreground/80 pb-1", children: new Date(Number(message.created_at)).toLocaleString("es-ES", {
2572
2683
  day: "2-digit",
2573
2684
  month: "2-digit",
2574
2685
  year: "numeric",
@@ -2577,8 +2688,8 @@ var AssistantMessageArea = React32.forwardRef(
2577
2688
  second: "2-digit",
2578
2689
  hour12: false
2579
2690
  }) }),
2580
- message.loading && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: thinkIndicator ?? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ThinkIndicator, {}) }),
2581
- message.error_code && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2691
+ message.loading && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { children: thinkIndicator ?? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ThinkIndicator, {}) }),
2692
+ message.error_code && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2582
2693
  CallOutResponse,
2583
2694
  {
2584
2695
  role: "assistant",
@@ -2586,7 +2697,7 @@ var AssistantMessageArea = React32.forwardRef(
2586
2697
  children: "We have an internal error, please try again later."
2587
2698
  }
2588
2699
  ),
2589
- message.content && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2700
+ message.content && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2590
2701
  CallOutResponse,
2591
2702
  {
2592
2703
  role: message.role,
@@ -2596,7 +2707,7 @@ var AssistantMessageArea = React32.forwardRef(
2596
2707
  children: message.content
2597
2708
  }
2598
2709
  ),
2599
- actions && streamingMessageId !== message.id && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2710
+ actions && streamingMessageId !== message.id && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2600
2711
  CallOutActions,
2601
2712
  {
2602
2713
  actions,
@@ -2609,14 +2720,14 @@ var AssistantMessageArea = React32.forwardRef(
2609
2720
  },
2610
2721
  message.id
2611
2722
  ) }, message.id)),
2612
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { ref: messagesEndRef })
2723
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { ref: messagesEndRef })
2613
2724
  ]
2614
2725
  }
2615
2726
  );
2616
2727
  }
2617
2728
  );
2618
2729
  AssistantMessageArea.displayName = "AssistantMessageArea";
2619
- var AssistantInput = React32.forwardRef(
2730
+ var AssistantInput = React33.forwardRef(
2620
2731
  ({
2621
2732
  className,
2622
2733
  sendMessageFunc,
@@ -2626,7 +2737,7 @@ var AssistantInput = React32.forwardRef(
2626
2737
  isMessageStreaming,
2627
2738
  ...props
2628
2739
  }, ref) => {
2629
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2740
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2630
2741
  "form",
2631
2742
  {
2632
2743
  onSubmit: sendMessageFunc,
@@ -2634,7 +2745,7 @@ var AssistantInput = React32.forwardRef(
2634
2745
  ref,
2635
2746
  ...props,
2636
2747
  children: [
2637
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2748
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2638
2749
  "input",
2639
2750
  {
2640
2751
  type: "text",
@@ -2651,7 +2762,7 @@ var AssistantInput = React32.forwardRef(
2651
2762
  )
2652
2763
  }
2653
2764
  ),
2654
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2765
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2655
2766
  "button",
2656
2767
  {
2657
2768
  type: "submit",
@@ -2660,7 +2771,7 @@ var AssistantInput = React32.forwardRef(
2660
2771
  "w-10 h-10 rounded-full flex items-center justify-center alq--assistant-button-send",
2661
2772
  isButtonDisabled ? "bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
2662
2773
  ),
2663
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react14.Send, { className: "w-5 h-5" })
2774
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react14.Send, { className: "w-5 h-5" })
2664
2775
  }
2665
2776
  )
2666
2777
  ]
@@ -2674,13 +2785,13 @@ AssistantInput.displayName = "AssistantInput";
2674
2785
  var import_hooks = require("@alquimia-ai/tools/hooks");
2675
2786
 
2676
2787
  // src/components/hooks/use-document.tsx
2677
- var import_react9 = require("react");
2788
+ var import_react10 = require("react");
2678
2789
 
2679
2790
  // src/components/hooks/use-resize-observer.ts
2680
- var import_react10 = require("react");
2791
+ var import_react11 = require("react");
2681
2792
 
2682
2793
  // src/components/organisms/rating-dialog.tsx
2683
- var import_jsx_runtime42 = require("react/jsx-runtime");
2794
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2684
2795
  function RatingDialog({
2685
2796
  sendRating,
2686
2797
  topicId,
@@ -2696,20 +2807,20 @@ function RatingDialog({
2696
2807
  success ? setHasRatedTopic(true) : toast2({
2697
2808
  title: "Error",
2698
2809
  description: `Hubo un error al enviar la calificaci\xF3n`,
2699
- action: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ToastAction, { altText: "Goto schedule to undo", children: "Cerrar" })
2810
+ action: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ToastAction, { altText: "Goto schedule to undo", children: "Cerrar" })
2700
2811
  });
2701
2812
  };
2702
2813
  const handleCancelRate = () => {
2703
2814
  setHasRatedTopic(true);
2704
2815
  onOpenChange(false);
2705
2816
  };
2706
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Dialog, { open: isOpen, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DialogContent, { className: "sm:max-w-md", children: [
2707
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DialogHeader, { children: [
2708
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DialogTitle, { children: "Calific\xE1 esta conversaci\xF3n" }),
2709
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DialogDescription, { children: "Por favor, compart\xED tu opini\xF3n sobre el asistente." })
2817
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Dialog, { open: isOpen, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(DialogContent, { className: "sm:max-w-md", children: [
2818
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(DialogHeader, { children: [
2819
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DialogTitle, { children: "Calific\xE1 esta conversaci\xF3n" }),
2820
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DialogDescription, { children: "Por favor, compart\xED tu opini\xF3n sobre el asistente." })
2710
2821
  ] }),
2711
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row justify-center gap-4 py-4", children: [
2712
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2822
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-row justify-center gap-4 py-4", children: [
2823
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2713
2824
  RatingStars,
2714
2825
  {
2715
2826
  currentRating: ratingStars,
@@ -2718,7 +2829,7 @@ function RatingDialog({
2718
2829
  className: "p-2 rounded"
2719
2830
  }
2720
2831
  ),
2721
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2832
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2722
2833
  RatingThumbs,
2723
2834
  {
2724
2835
  currentRating: ratingComment,
@@ -2727,7 +2838,7 @@ function RatingDialog({
2727
2838
  isLoading
2728
2839
  }
2729
2840
  ),
2730
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2841
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2731
2842
  RatingComment,
2732
2843
  {
2733
2844
  currentRating: ratingComment,
@@ -2736,7 +2847,7 @@ function RatingDialog({
2736
2847
  }
2737
2848
  )
2738
2849
  ] }),
2739
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex flex-row justify-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { onClick: handleCancelRate, variant: "secondary", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Typography, { as: "p", typeStyle: "tiny", children: "No, gracias." }) }) })
2850
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex flex-row justify-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Button, { onClick: handleCancelRate, variant: "secondary", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Typography, { as: "p", typeStyle: "tiny", children: "No, gracias." }) }) })
2740
2851
  ] }) });
2741
2852
  }
2742
2853
  //# sourceMappingURL=index.js.map