@alquimia-ai/ui 1.2.4 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/index.d.mts +4 -1
- package/dist/components/atoms/index.d.ts +4 -1
- package/dist/components/atoms/index.js +39 -17
- package/dist/components/atoms/index.js.map +1 -1
- package/dist/components/atoms/index.mjs +35 -13
- package/dist/components/atoms/index.mjs.map +1 -1
- package/dist/components/index.d.mts +2 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +39 -17
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +35 -13
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/molecules/documents/index.js +82 -52
- package/dist/components/molecules/documents/index.js.map +1 -1
- package/dist/components/molecules/documents/index.mjs +67 -37
- package/dist/components/molecules/documents/index.mjs.map +1 -1
- package/dist/components/molecules/index.js +145 -124
- package/dist/components/molecules/index.js.map +1 -1
- package/dist/components/molecules/index.mjs +137 -116
- package/dist/components/molecules/index.mjs.map +1 -1
- package/dist/components/molecules/viewers/index.js +31 -10
- package/dist/components/molecules/viewers/index.js.map +1 -1
- package/dist/components/molecules/viewers/index.mjs +30 -9
- package/dist/components/molecules/viewers/index.mjs.map +1 -1
- package/dist/components/organisms/index.d.mts +3 -1
- package/dist/components/organisms/index.d.ts +3 -1
- package/dist/components/organisms/index.js +187 -164
- package/dist/components/organisms/index.js.map +1 -1
- package/dist/components/organisms/index.mjs +175 -152
- package/dist/components/organisms/index.mjs.map +1 -1
- package/dist/components/templates/cards/index.js +57 -36
- package/dist/components/templates/cards/index.js.map +1 -1
- package/dist/components/templates/cards/index.mjs +45 -24
- package/dist/components/templates/cards/index.mjs.map +1 -1
- package/dist/components/templates/index.js +57 -36
- package/dist/components/templates/index.js.map +1 -1
- package/dist/components/templates/index.mjs +45 -24
- package/dist/components/templates/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +242 -218
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +220 -196
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +2 -1
- package/dist/types/index.d.mts +12 -1
- package/dist/types/index.d.ts +12 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs.map +1 -1
- package/package.json +2 -1
|
@@ -162,7 +162,7 @@ function SpeechToText({
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
// src/components/organisms/assistant.tsx
|
|
165
|
-
import * as
|
|
165
|
+
import * as React34 from "react";
|
|
166
166
|
import { useEffect as useEffect11 } from "react";
|
|
167
167
|
|
|
168
168
|
// src/components/atoms/ui/button.tsx
|
|
@@ -1463,8 +1463,29 @@ var Loader = React22.forwardRef(
|
|
|
1463
1463
|
);
|
|
1464
1464
|
Loader.displayName = "Loader";
|
|
1465
1465
|
|
|
1466
|
-
// src/components/
|
|
1466
|
+
// src/components/atoms/ui/separator.tsx
|
|
1467
1467
|
import * as React23 from "react";
|
|
1468
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
1469
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1470
|
+
var Separator2 = React23.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1471
|
+
SeparatorPrimitive.Root,
|
|
1472
|
+
{
|
|
1473
|
+
ref,
|
|
1474
|
+
decorative,
|
|
1475
|
+
orientation,
|
|
1476
|
+
className: cn(
|
|
1477
|
+
"shrink-0 bg-border",
|
|
1478
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
1479
|
+
className,
|
|
1480
|
+
"alq--separator"
|
|
1481
|
+
),
|
|
1482
|
+
...props
|
|
1483
|
+
}
|
|
1484
|
+
));
|
|
1485
|
+
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
1486
|
+
|
|
1487
|
+
// src/components/hooks/use-toast.ts
|
|
1488
|
+
import * as React24 from "react";
|
|
1468
1489
|
var TOAST_LIMIT = 1;
|
|
1469
1490
|
var TOAST_REMOVE_DELAY = 1e6;
|
|
1470
1491
|
var count = 0;
|
|
@@ -1565,8 +1586,8 @@ function toast({ ...props }) {
|
|
|
1565
1586
|
};
|
|
1566
1587
|
}
|
|
1567
1588
|
function useToast() {
|
|
1568
|
-
const [state, setState] =
|
|
1569
|
-
|
|
1589
|
+
const [state, setState] = React24.useState(memoryState);
|
|
1590
|
+
React24.useEffect(() => {
|
|
1570
1591
|
listeners.push(setState);
|
|
1571
1592
|
return () => {
|
|
1572
1593
|
const index = listeners.indexOf(setState);
|
|
@@ -1583,13 +1604,13 @@ function useToast() {
|
|
|
1583
1604
|
}
|
|
1584
1605
|
|
|
1585
1606
|
// src/components/atoms/ui/toaster.tsx
|
|
1586
|
-
import { jsx as
|
|
1607
|
+
import { jsx as jsx31, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1587
1608
|
|
|
1588
1609
|
// src/components/atoms/ui/think-indicator.tsx
|
|
1589
|
-
import * as
|
|
1610
|
+
import * as React25 from "react";
|
|
1590
1611
|
import { useState as useState4, useEffect as useEffect4 } from "react";
|
|
1591
1612
|
import { cva as cva8 } from "class-variance-authority";
|
|
1592
|
-
import { jsx as
|
|
1613
|
+
import { jsx as jsx32, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1593
1614
|
var thinkIndicatorVariants = cva8(
|
|
1594
1615
|
"flex items-center gap-3",
|
|
1595
1616
|
{
|
|
@@ -1611,7 +1632,7 @@ var thinkIndicatorVariants = cva8(
|
|
|
1611
1632
|
}
|
|
1612
1633
|
}
|
|
1613
1634
|
);
|
|
1614
|
-
var ThinkIndicator =
|
|
1635
|
+
var ThinkIndicator = React25.forwardRef(
|
|
1615
1636
|
({
|
|
1616
1637
|
className,
|
|
1617
1638
|
variant,
|
|
@@ -1649,7 +1670,7 @@ var ThinkIndicator = React24.forwardRef(
|
|
|
1649
1670
|
className: cn(thinkIndicatorVariants({ variant, size }), className, "alq--think-indicator"),
|
|
1650
1671
|
...props,
|
|
1651
1672
|
children: [
|
|
1652
|
-
loader || /* @__PURE__ */
|
|
1673
|
+
loader || /* @__PURE__ */ jsx32(
|
|
1653
1674
|
Loader,
|
|
1654
1675
|
{
|
|
1655
1676
|
className: cn(
|
|
@@ -1657,7 +1678,7 @@ var ThinkIndicator = React24.forwardRef(
|
|
|
1657
1678
|
)
|
|
1658
1679
|
}
|
|
1659
1680
|
),
|
|
1660
|
-
/* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ jsx32(
|
|
1661
1682
|
"div",
|
|
1662
1683
|
{
|
|
1663
1684
|
className: cn(
|
|
@@ -1676,11 +1697,11 @@ var ThinkIndicator = React24.forwardRef(
|
|
|
1676
1697
|
ThinkIndicator.displayName = "ThinkIndicator";
|
|
1677
1698
|
|
|
1678
1699
|
// src/components/molecules/page-container.tsx
|
|
1679
|
-
import { forwardRef as
|
|
1680
|
-
import { jsx as
|
|
1681
|
-
var PageContainer =
|
|
1700
|
+
import { forwardRef as forwardRef27 } from "react";
|
|
1701
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1702
|
+
var PageContainer = forwardRef27(
|
|
1682
1703
|
({ className, ...props }, ref) => {
|
|
1683
|
-
return /* @__PURE__ */
|
|
1704
|
+
return /* @__PURE__ */ jsx33(
|
|
1684
1705
|
"div",
|
|
1685
1706
|
{
|
|
1686
1707
|
ref,
|
|
@@ -1693,11 +1714,11 @@ var PageContainer = forwardRef26(
|
|
|
1693
1714
|
PageContainer.displayName = "PageContainer";
|
|
1694
1715
|
|
|
1695
1716
|
// src/components/molecules/assistant-button.tsx
|
|
1696
|
-
import * as
|
|
1717
|
+
import * as React26 from "react";
|
|
1697
1718
|
import { useState as useState5 } from "react";
|
|
1698
|
-
import { jsx as
|
|
1699
|
-
var AssistantSuggestions =
|
|
1700
|
-
return /* @__PURE__ */
|
|
1719
|
+
import { jsx as jsx34, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1720
|
+
var AssistantSuggestions = React26.forwardRef(({ suggestions, showSuggestions, className }, ref) => {
|
|
1721
|
+
return /* @__PURE__ */ jsx34(
|
|
1701
1722
|
"div",
|
|
1702
1723
|
{
|
|
1703
1724
|
ref,
|
|
@@ -1707,7 +1728,7 @@ var AssistantSuggestions = React25.forwardRef(({ suggestions, showSuggestions, c
|
|
|
1707
1728
|
showSuggestions ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4",
|
|
1708
1729
|
className
|
|
1709
1730
|
),
|
|
1710
|
-
children: /* @__PURE__ */
|
|
1731
|
+
children: /* @__PURE__ */ jsx34("div", { className: "rounded-lg p-2 pr-0 w-64", children: suggestions.map((suggestion, index) => /* @__PURE__ */ jsxs12(
|
|
1711
1732
|
"button",
|
|
1712
1733
|
{
|
|
1713
1734
|
onClick: () => suggestion.action?.(),
|
|
@@ -1723,8 +1744,8 @@ var AssistantSuggestions = React25.forwardRef(({ suggestions, showSuggestions, c
|
|
|
1723
1744
|
showSuggestions ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4"
|
|
1724
1745
|
),
|
|
1725
1746
|
children: [
|
|
1726
|
-
/* @__PURE__ */
|
|
1727
|
-
/* @__PURE__ */
|
|
1747
|
+
/* @__PURE__ */ jsx34(suggestion.icon, { className: "w-5 h-5 text-primary" }),
|
|
1748
|
+
/* @__PURE__ */ jsx34("span", { className: "text-xs whitespace-nowrap font-normal", children: suggestion.label })
|
|
1728
1749
|
]
|
|
1729
1750
|
},
|
|
1730
1751
|
index
|
|
@@ -1733,7 +1754,7 @@ var AssistantSuggestions = React25.forwardRef(({ suggestions, showSuggestions, c
|
|
|
1733
1754
|
);
|
|
1734
1755
|
});
|
|
1735
1756
|
AssistantSuggestions.displayName = "Suggestions";
|
|
1736
|
-
var AssistantButton =
|
|
1757
|
+
var AssistantButton = React26.forwardRef(
|
|
1737
1758
|
({
|
|
1738
1759
|
icon: Icon2,
|
|
1739
1760
|
clickAction,
|
|
@@ -1754,7 +1775,7 @@ var AssistantButton = React25.forwardRef(
|
|
|
1754
1775
|
setShowSuggestions(false);
|
|
1755
1776
|
setTimeout(() => setIsVisible(false), 300);
|
|
1756
1777
|
};
|
|
1757
|
-
return /* @__PURE__ */
|
|
1778
|
+
return /* @__PURE__ */ jsx34(
|
|
1758
1779
|
"div",
|
|
1759
1780
|
{
|
|
1760
1781
|
ref,
|
|
@@ -1766,14 +1787,14 @@ var AssistantButton = React25.forwardRef(
|
|
|
1766
1787
|
onMouseEnter: handleMouseEnter,
|
|
1767
1788
|
onMouseLeave: handleMouseLeave,
|
|
1768
1789
|
children: /* @__PURE__ */ jsxs12("div", { className: "relative group", children: [
|
|
1769
|
-
isVisible && suggestions.length > 0 && /* @__PURE__ */
|
|
1790
|
+
isVisible && suggestions.length > 0 && /* @__PURE__ */ jsx34(
|
|
1770
1791
|
AssistantSuggestions,
|
|
1771
1792
|
{
|
|
1772
1793
|
suggestions,
|
|
1773
1794
|
showSuggestions
|
|
1774
1795
|
}
|
|
1775
1796
|
),
|
|
1776
|
-
/* @__PURE__ */
|
|
1797
|
+
/* @__PURE__ */ jsx34(
|
|
1777
1798
|
Button,
|
|
1778
1799
|
{
|
|
1779
1800
|
variant: "outline",
|
|
@@ -1787,7 +1808,7 @@ var AssistantButton = React25.forwardRef(
|
|
|
1787
1808
|
"alq--assistant-button"
|
|
1788
1809
|
),
|
|
1789
1810
|
onClick: clickAction,
|
|
1790
|
-
children: /* @__PURE__ */
|
|
1811
|
+
children: /* @__PURE__ */ jsx34(
|
|
1791
1812
|
Icon2,
|
|
1792
1813
|
{
|
|
1793
1814
|
style: { width: "22px", height: "22px" },
|
|
@@ -1804,19 +1825,19 @@ var AssistantButton = React25.forwardRef(
|
|
|
1804
1825
|
AssistantButton.displayName = "AssistantButton";
|
|
1805
1826
|
|
|
1806
1827
|
// src/components/molecules/carousel.tsx
|
|
1807
|
-
import * as
|
|
1828
|
+
import * as React27 from "react";
|
|
1808
1829
|
import useEmblaCarousel from "embla-carousel-react";
|
|
1809
1830
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
1810
|
-
import { jsx as
|
|
1811
|
-
var CarouselContext =
|
|
1831
|
+
import { jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1832
|
+
var CarouselContext = React27.createContext(null);
|
|
1812
1833
|
function useCarousel() {
|
|
1813
|
-
const context =
|
|
1834
|
+
const context = React27.useContext(CarouselContext);
|
|
1814
1835
|
if (!context) {
|
|
1815
1836
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
1816
1837
|
}
|
|
1817
1838
|
return context;
|
|
1818
1839
|
}
|
|
1819
|
-
var Carousel =
|
|
1840
|
+
var Carousel = React27.forwardRef(
|
|
1820
1841
|
({
|
|
1821
1842
|
orientation = "horizontal",
|
|
1822
1843
|
opts,
|
|
@@ -1833,22 +1854,22 @@ var Carousel = React26.forwardRef(
|
|
|
1833
1854
|
},
|
|
1834
1855
|
plugins
|
|
1835
1856
|
);
|
|
1836
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
1837
|
-
const [canScrollNext, setCanScrollNext] =
|
|
1838
|
-
const onSelect =
|
|
1857
|
+
const [canScrollPrev, setCanScrollPrev] = React27.useState(false);
|
|
1858
|
+
const [canScrollNext, setCanScrollNext] = React27.useState(false);
|
|
1859
|
+
const onSelect = React27.useCallback((api2) => {
|
|
1839
1860
|
if (!api2) {
|
|
1840
1861
|
return;
|
|
1841
1862
|
}
|
|
1842
1863
|
setCanScrollPrev(api2.canScrollPrev());
|
|
1843
1864
|
setCanScrollNext(api2.canScrollNext());
|
|
1844
1865
|
}, []);
|
|
1845
|
-
const scrollPrev =
|
|
1866
|
+
const scrollPrev = React27.useCallback(() => {
|
|
1846
1867
|
api?.scrollPrev();
|
|
1847
1868
|
}, [api]);
|
|
1848
|
-
const scrollNext =
|
|
1869
|
+
const scrollNext = React27.useCallback(() => {
|
|
1849
1870
|
api?.scrollNext();
|
|
1850
1871
|
}, [api]);
|
|
1851
|
-
const handleKeyDown =
|
|
1872
|
+
const handleKeyDown = React27.useCallback(
|
|
1852
1873
|
(event) => {
|
|
1853
1874
|
if (event.key === "ArrowLeft") {
|
|
1854
1875
|
event.preventDefault();
|
|
@@ -1860,13 +1881,13 @@ var Carousel = React26.forwardRef(
|
|
|
1860
1881
|
},
|
|
1861
1882
|
[scrollPrev, scrollNext]
|
|
1862
1883
|
);
|
|
1863
|
-
|
|
1884
|
+
React27.useEffect(() => {
|
|
1864
1885
|
if (!api || !setApi) {
|
|
1865
1886
|
return;
|
|
1866
1887
|
}
|
|
1867
1888
|
setApi(api);
|
|
1868
1889
|
}, [api, setApi]);
|
|
1869
|
-
|
|
1890
|
+
React27.useEffect(() => {
|
|
1870
1891
|
if (!api) {
|
|
1871
1892
|
return;
|
|
1872
1893
|
}
|
|
@@ -1877,7 +1898,7 @@ var Carousel = React26.forwardRef(
|
|
|
1877
1898
|
api?.off("select", onSelect);
|
|
1878
1899
|
};
|
|
1879
1900
|
}, [api, onSelect]);
|
|
1880
|
-
return /* @__PURE__ */
|
|
1901
|
+
return /* @__PURE__ */ jsx35(
|
|
1881
1902
|
CarouselContext.Provider,
|
|
1882
1903
|
{
|
|
1883
1904
|
value: {
|
|
@@ -1890,7 +1911,7 @@ var Carousel = React26.forwardRef(
|
|
|
1890
1911
|
canScrollPrev,
|
|
1891
1912
|
canScrollNext
|
|
1892
1913
|
},
|
|
1893
|
-
children: /* @__PURE__ */
|
|
1914
|
+
children: /* @__PURE__ */ jsx35(
|
|
1894
1915
|
"div",
|
|
1895
1916
|
{
|
|
1896
1917
|
ref,
|
|
@@ -1907,9 +1928,9 @@ var Carousel = React26.forwardRef(
|
|
|
1907
1928
|
}
|
|
1908
1929
|
);
|
|
1909
1930
|
Carousel.displayName = "Carousel";
|
|
1910
|
-
var CarouselContent =
|
|
1931
|
+
var CarouselContent = React27.forwardRef(({ className, ...props }, ref) => {
|
|
1911
1932
|
const { carouselRef, orientation } = useCarousel();
|
|
1912
|
-
return /* @__PURE__ */
|
|
1933
|
+
return /* @__PURE__ */ jsx35("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx35(
|
|
1913
1934
|
"div",
|
|
1914
1935
|
{
|
|
1915
1936
|
ref,
|
|
@@ -1923,9 +1944,9 @@ var CarouselContent = React26.forwardRef(({ className, ...props }, ref) => {
|
|
|
1923
1944
|
) });
|
|
1924
1945
|
});
|
|
1925
1946
|
CarouselContent.displayName = "CarouselContent";
|
|
1926
|
-
var CarouselItem =
|
|
1947
|
+
var CarouselItem = React27.forwardRef(({ className, ...props }, ref) => {
|
|
1927
1948
|
const { orientation } = useCarousel();
|
|
1928
|
-
return /* @__PURE__ */
|
|
1949
|
+
return /* @__PURE__ */ jsx35(
|
|
1929
1950
|
"div",
|
|
1930
1951
|
{
|
|
1931
1952
|
ref,
|
|
@@ -1941,7 +1962,7 @@ var CarouselItem = React26.forwardRef(({ className, ...props }, ref) => {
|
|
|
1941
1962
|
);
|
|
1942
1963
|
});
|
|
1943
1964
|
CarouselItem.displayName = "CarouselItem";
|
|
1944
|
-
var CarouselPrevious =
|
|
1965
|
+
var CarouselPrevious = React27.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
1945
1966
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1946
1967
|
return /* @__PURE__ */ jsxs13(
|
|
1947
1968
|
Button,
|
|
@@ -1958,14 +1979,14 @@ var CarouselPrevious = React26.forwardRef(({ className, variant = "outline", siz
|
|
|
1958
1979
|
onClick: scrollPrev,
|
|
1959
1980
|
...props,
|
|
1960
1981
|
children: [
|
|
1961
|
-
/* @__PURE__ */
|
|
1962
|
-
/* @__PURE__ */
|
|
1982
|
+
/* @__PURE__ */ jsx35(ArrowLeft, { className: "h-4 w-4" }),
|
|
1983
|
+
/* @__PURE__ */ jsx35("span", { className: "sr-only", children: "Previous slide" })
|
|
1963
1984
|
]
|
|
1964
1985
|
}
|
|
1965
1986
|
);
|
|
1966
1987
|
});
|
|
1967
1988
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
1968
|
-
var CarouselNext =
|
|
1989
|
+
var CarouselNext = React27.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
1969
1990
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1970
1991
|
return /* @__PURE__ */ jsxs13(
|
|
1971
1992
|
Button,
|
|
@@ -1982,8 +2003,8 @@ var CarouselNext = React26.forwardRef(({ className, variant = "outline", size =
|
|
|
1982
2003
|
onClick: scrollNext,
|
|
1983
2004
|
...props,
|
|
1984
2005
|
children: [
|
|
1985
|
-
/* @__PURE__ */
|
|
1986
|
-
/* @__PURE__ */
|
|
2006
|
+
/* @__PURE__ */ jsx35(ArrowRight, { className: "h-4 w-4" }),
|
|
2007
|
+
/* @__PURE__ */ jsx35("span", { className: "sr-only", children: "Next slide" })
|
|
1987
2008
|
]
|
|
1988
2009
|
}
|
|
1989
2010
|
);
|
|
@@ -1991,12 +2012,12 @@ var CarouselNext = React26.forwardRef(({ className, variant = "outline", size =
|
|
|
1991
2012
|
CarouselNext.displayName = "CarouselNext";
|
|
1992
2013
|
|
|
1993
2014
|
// src/components/molecules/navigation-menu.tsx
|
|
1994
|
-
import * as
|
|
2015
|
+
import * as React28 from "react";
|
|
1995
2016
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
1996
2017
|
import { cva as cva9 } from "class-variance-authority";
|
|
1997
2018
|
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
1998
|
-
import { jsx as
|
|
1999
|
-
var NavigationMenu =
|
|
2019
|
+
import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2020
|
+
var NavigationMenu = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
2000
2021
|
NavigationMenuPrimitive.Root,
|
|
2001
2022
|
{
|
|
2002
2023
|
ref,
|
|
@@ -2007,12 +2028,12 @@ var NavigationMenu = React27.forwardRef(({ className, children, ...props }, ref)
|
|
|
2007
2028
|
...props,
|
|
2008
2029
|
children: [
|
|
2009
2030
|
children,
|
|
2010
|
-
/* @__PURE__ */
|
|
2031
|
+
/* @__PURE__ */ jsx36(NavigationMenuViewport, {})
|
|
2011
2032
|
]
|
|
2012
2033
|
}
|
|
2013
2034
|
));
|
|
2014
2035
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
2015
|
-
var NavigationMenuList =
|
|
2036
|
+
var NavigationMenuList = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
2016
2037
|
NavigationMenuPrimitive.List,
|
|
2017
2038
|
{
|
|
2018
2039
|
ref,
|
|
@@ -2027,7 +2048,7 @@ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
|
2027
2048
|
var navigationMenuTriggerStyle = cva9(
|
|
2028
2049
|
"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"
|
|
2029
2050
|
);
|
|
2030
|
-
var NavigationMenuTrigger =
|
|
2051
|
+
var NavigationMenuTrigger = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
2031
2052
|
NavigationMenuPrimitive.Trigger,
|
|
2032
2053
|
{
|
|
2033
2054
|
ref,
|
|
@@ -2036,7 +2057,7 @@ var NavigationMenuTrigger = React27.forwardRef(({ className, children, ...props
|
|
|
2036
2057
|
children: [
|
|
2037
2058
|
children,
|
|
2038
2059
|
" ",
|
|
2039
|
-
/* @__PURE__ */
|
|
2060
|
+
/* @__PURE__ */ jsx36(
|
|
2040
2061
|
ChevronDown2,
|
|
2041
2062
|
{
|
|
2042
2063
|
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
|
|
@@ -2047,7 +2068,7 @@ var NavigationMenuTrigger = React27.forwardRef(({ className, children, ...props
|
|
|
2047
2068
|
}
|
|
2048
2069
|
));
|
|
2049
2070
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
2050
|
-
var NavigationMenuContent =
|
|
2071
|
+
var NavigationMenuContent = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
2051
2072
|
NavigationMenuPrimitive.Content,
|
|
2052
2073
|
{
|
|
2053
2074
|
ref,
|
|
@@ -2059,7 +2080,7 @@ var NavigationMenuContent = React27.forwardRef(({ className, ...props }, ref) =>
|
|
|
2059
2080
|
}
|
|
2060
2081
|
));
|
|
2061
2082
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
2062
|
-
var NavigationMenuViewport =
|
|
2083
|
+
var NavigationMenuViewport = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx36(
|
|
2063
2084
|
NavigationMenuPrimitive.Viewport,
|
|
2064
2085
|
{
|
|
2065
2086
|
className: cn(
|
|
@@ -2071,7 +2092,7 @@ var NavigationMenuViewport = React27.forwardRef(({ className, ...props }, ref) =
|
|
|
2071
2092
|
}
|
|
2072
2093
|
) }));
|
|
2073
2094
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
2074
|
-
var NavigationMenuIndicator =
|
|
2095
|
+
var NavigationMenuIndicator = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
2075
2096
|
NavigationMenuPrimitive.Indicator,
|
|
2076
2097
|
{
|
|
2077
2098
|
ref,
|
|
@@ -2080,15 +2101,15 @@ var NavigationMenuIndicator = React27.forwardRef(({ className, ...props }, ref)
|
|
|
2080
2101
|
className
|
|
2081
2102
|
),
|
|
2082
2103
|
...props,
|
|
2083
|
-
children: /* @__PURE__ */
|
|
2104
|
+
children: /* @__PURE__ */ jsx36("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
2084
2105
|
}
|
|
2085
2106
|
));
|
|
2086
2107
|
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
2087
2108
|
|
|
2088
2109
|
// src/components/molecules/sidebar.tsx
|
|
2089
|
-
import * as
|
|
2110
|
+
import * as React29 from "react";
|
|
2090
2111
|
import { cva as cva10 } from "class-variance-authority";
|
|
2091
|
-
import { jsx as
|
|
2112
|
+
import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2092
2113
|
var sidebarVariants = cva10(
|
|
2093
2114
|
"flex flex-col border-r",
|
|
2094
2115
|
{
|
|
@@ -2104,7 +2125,7 @@ var sidebarVariants = cva10(
|
|
|
2104
2125
|
}
|
|
2105
2126
|
}
|
|
2106
2127
|
);
|
|
2107
|
-
var SidebarFooter =
|
|
2128
|
+
var SidebarFooter = React29.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
2108
2129
|
"div",
|
|
2109
2130
|
{
|
|
2110
2131
|
ref,
|
|
@@ -2114,7 +2135,7 @@ var SidebarFooter = React28.forwardRef(({ className, children, ...props }, ref)
|
|
|
2114
2135
|
}
|
|
2115
2136
|
));
|
|
2116
2137
|
SidebarFooter.displayName = "SidebarFooter";
|
|
2117
|
-
var Sidebar =
|
|
2138
|
+
var Sidebar = React29.forwardRef(
|
|
2118
2139
|
({
|
|
2119
2140
|
className,
|
|
2120
2141
|
items,
|
|
@@ -2127,8 +2148,8 @@ var Sidebar = React28.forwardRef(
|
|
|
2127
2148
|
buttonClassName,
|
|
2128
2149
|
...props
|
|
2129
2150
|
}, ref) => {
|
|
2130
|
-
return /* @__PURE__ */
|
|
2131
|
-
/* @__PURE__ */
|
|
2151
|
+
return /* @__PURE__ */ jsx37("div", { className: cn(className, "alq--navigation-sidebar h-full"), ref, ...props, children: /* @__PURE__ */ jsxs15("aside", { className: cn(sidebarVariants({ size }), "h-full"), children: [
|
|
2152
|
+
/* @__PURE__ */ jsx37(ScrollArea, { className: "flex-grow justify-between", children: /* @__PURE__ */ jsx37("div", { className: "flex flex-col gap-2 p-4", children: items.map((item) => /* @__PURE__ */ jsxs15(
|
|
2132
2153
|
Button,
|
|
2133
2154
|
{
|
|
2134
2155
|
variant: selectedSection?.name === item.name ? selectedVariant : defaultVariant,
|
|
@@ -2140,13 +2161,13 @@ var Sidebar = React28.forwardRef(
|
|
|
2140
2161
|
}
|
|
2141
2162
|
},
|
|
2142
2163
|
children: [
|
|
2143
|
-
item.icon && /* @__PURE__ */
|
|
2164
|
+
item.icon && /* @__PURE__ */ jsx37(item.icon, { className: "mr-2 h-4 w-4" }),
|
|
2144
2165
|
item.name
|
|
2145
2166
|
]
|
|
2146
2167
|
},
|
|
2147
2168
|
item.name
|
|
2148
2169
|
)) }) }),
|
|
2149
|
-
footerContent && /* @__PURE__ */
|
|
2170
|
+
footerContent && /* @__PURE__ */ jsx37(SidebarFooter, { children: footerContent })
|
|
2150
2171
|
] }) });
|
|
2151
2172
|
}
|
|
2152
2173
|
);
|
|
@@ -2154,17 +2175,17 @@ var Sidebar = React28.forwardRef(
|
|
|
2154
2175
|
// src/components/molecules/sonner.tsx
|
|
2155
2176
|
import { useTheme } from "next-themes";
|
|
2156
2177
|
import { Toaster as Sonner } from "sonner";
|
|
2157
|
-
import { jsx as
|
|
2178
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2158
2179
|
|
|
2159
2180
|
// src/components/molecules/rating-stars.tsx
|
|
2160
|
-
import * as
|
|
2181
|
+
import * as React30 from "react";
|
|
2161
2182
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2162
2183
|
import { Star } from "lucide-react";
|
|
2163
|
-
import { jsx as
|
|
2184
|
+
import { jsx as jsx39, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2164
2185
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
2165
2186
|
var Tooltip = TooltipPrimitive.Root;
|
|
2166
2187
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
2167
|
-
var TooltipContent =
|
|
2188
|
+
var TooltipContent = React30.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
2168
2189
|
TooltipPrimitive.Content,
|
|
2169
2190
|
{
|
|
2170
2191
|
ref,
|
|
@@ -2177,14 +2198,14 @@ var TooltipContent = React29.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
2177
2198
|
}
|
|
2178
2199
|
));
|
|
2179
2200
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
2180
|
-
var StarRating =
|
|
2201
|
+
var StarRating = React30.forwardRef(({ rating, onRate }, ref) => /* @__PURE__ */ jsx39("div", { ref, className: "flex", children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsx39(
|
|
2181
2202
|
Button,
|
|
2182
2203
|
{
|
|
2183
2204
|
onClick: () => onRate(star),
|
|
2184
2205
|
variant: "link",
|
|
2185
2206
|
className: "p-1 transition-colors [&_svg]:size-5 h-5",
|
|
2186
2207
|
"aria-label": `Rate ${star} star${star !== 1 ? "s" : ""}`,
|
|
2187
|
-
children: /* @__PURE__ */
|
|
2208
|
+
children: /* @__PURE__ */ jsx39(
|
|
2188
2209
|
Star,
|
|
2189
2210
|
{
|
|
2190
2211
|
className: cn(
|
|
@@ -2197,19 +2218,19 @@ var StarRating = React29.forwardRef(({ rating, onRate }, ref) => /* @__PURE__ */
|
|
|
2197
2218
|
star
|
|
2198
2219
|
)) }));
|
|
2199
2220
|
StarRating.displayName = "StarRating";
|
|
2200
|
-
var RatingStars =
|
|
2221
|
+
var RatingStars = React30.forwardRef(({
|
|
2201
2222
|
currentRating = 0,
|
|
2202
2223
|
onRate,
|
|
2203
2224
|
className,
|
|
2204
2225
|
isLoading
|
|
2205
2226
|
}, ref) => {
|
|
2206
|
-
const [open, setOpen] =
|
|
2207
|
-
const [animate, setAnimate] =
|
|
2227
|
+
const [open, setOpen] = React30.useState(false);
|
|
2228
|
+
const [animate, setAnimate] = React30.useState(false);
|
|
2208
2229
|
const handleRate = (rating) => {
|
|
2209
2230
|
onRate(rating);
|
|
2210
2231
|
setOpen(false);
|
|
2211
2232
|
};
|
|
2212
|
-
|
|
2233
|
+
React30.useEffect(() => {
|
|
2213
2234
|
if (currentRating > 0) {
|
|
2214
2235
|
setAnimate(true);
|
|
2215
2236
|
const timer = setTimeout(() => setAnimate(false), 150);
|
|
@@ -2217,8 +2238,8 @@ var RatingStars = React29.forwardRef(({
|
|
|
2217
2238
|
}
|
|
2218
2239
|
}, [currentRating]);
|
|
2219
2240
|
const hasRated = currentRating > 0;
|
|
2220
|
-
return /* @__PURE__ */
|
|
2221
|
-
/* @__PURE__ */
|
|
2241
|
+
return /* @__PURE__ */ jsx39(TooltipProvider, { children: /* @__PURE__ */ jsxs16(Tooltip, { open, onOpenChange: setOpen, children: [
|
|
2242
|
+
/* @__PURE__ */ jsx39(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx39(
|
|
2222
2243
|
Button,
|
|
2223
2244
|
{
|
|
2224
2245
|
ref,
|
|
@@ -2229,7 +2250,7 @@ var RatingStars = React29.forwardRef(({
|
|
|
2229
2250
|
),
|
|
2230
2251
|
disabled: isLoading,
|
|
2231
2252
|
onClick: () => setOpen(!open),
|
|
2232
|
-
children: /* @__PURE__ */
|
|
2253
|
+
children: /* @__PURE__ */ jsx39(
|
|
2233
2254
|
Star,
|
|
2234
2255
|
{
|
|
2235
2256
|
className: cn(
|
|
@@ -2242,7 +2263,7 @@ var RatingStars = React29.forwardRef(({
|
|
|
2242
2263
|
)
|
|
2243
2264
|
}
|
|
2244
2265
|
) }),
|
|
2245
|
-
/* @__PURE__ */
|
|
2266
|
+
/* @__PURE__ */ jsx39(TooltipContent, { side: "top", align: "center", className: "p-0", children: /* @__PURE__ */ jsx39("div", { className: "p-2 bg-background", children: /* @__PURE__ */ jsx39(
|
|
2246
2267
|
StarRating,
|
|
2247
2268
|
{
|
|
2248
2269
|
rating: currentRating,
|
|
@@ -2254,10 +2275,10 @@ var RatingStars = React29.forwardRef(({
|
|
|
2254
2275
|
RatingStars.displayName = "RatingStars";
|
|
2255
2276
|
|
|
2256
2277
|
// src/components/molecules/rating-thumbs.tsx
|
|
2257
|
-
import * as
|
|
2278
|
+
import * as React31 from "react";
|
|
2258
2279
|
import { ThumbsUp, ThumbsDown } from "lucide-react";
|
|
2259
|
-
import { jsx as
|
|
2260
|
-
var RatingThumbs =
|
|
2280
|
+
import { jsx as jsx40, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2281
|
+
var RatingThumbs = React31.forwardRef(
|
|
2261
2282
|
({
|
|
2262
2283
|
currentRating,
|
|
2263
2284
|
onRate,
|
|
@@ -2265,8 +2286,8 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2265
2286
|
className,
|
|
2266
2287
|
isLoading
|
|
2267
2288
|
}, ref) => {
|
|
2268
|
-
const [animate, setAnimate] =
|
|
2269
|
-
|
|
2289
|
+
const [animate, setAnimate] = React31.useState(false);
|
|
2290
|
+
React31.useEffect(() => {
|
|
2270
2291
|
if (currentRating) {
|
|
2271
2292
|
setAnimate(true);
|
|
2272
2293
|
const timer = setTimeout(() => setAnimate(false), 150);
|
|
@@ -2284,7 +2305,7 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2284
2305
|
className
|
|
2285
2306
|
),
|
|
2286
2307
|
children: [
|
|
2287
|
-
/* @__PURE__ */
|
|
2308
|
+
/* @__PURE__ */ jsx40(
|
|
2288
2309
|
Button,
|
|
2289
2310
|
{
|
|
2290
2311
|
variant: "link",
|
|
@@ -2295,7 +2316,7 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2295
2316
|
),
|
|
2296
2317
|
"aria-label": "Thumbs up",
|
|
2297
2318
|
disabled: isLoading,
|
|
2298
|
-
children: /* @__PURE__ */
|
|
2319
|
+
children: /* @__PURE__ */ jsx40(
|
|
2299
2320
|
ThumbsUp,
|
|
2300
2321
|
{
|
|
2301
2322
|
className: cn(
|
|
@@ -2308,7 +2329,7 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2308
2329
|
)
|
|
2309
2330
|
}
|
|
2310
2331
|
),
|
|
2311
|
-
/* @__PURE__ */
|
|
2332
|
+
/* @__PURE__ */ jsx40(
|
|
2312
2333
|
Button,
|
|
2313
2334
|
{
|
|
2314
2335
|
variant: "link",
|
|
@@ -2319,7 +2340,7 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2319
2340
|
),
|
|
2320
2341
|
"aria-label": "Thumbs down",
|
|
2321
2342
|
disabled: isLoading,
|
|
2322
|
-
children: /* @__PURE__ */
|
|
2343
|
+
children: /* @__PURE__ */ jsx40(
|
|
2323
2344
|
ThumbsDown,
|
|
2324
2345
|
{
|
|
2325
2346
|
className: cn(
|
|
@@ -2340,30 +2361,30 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2340
2361
|
RatingThumbs.displayName = "RatingThumbs";
|
|
2341
2362
|
|
|
2342
2363
|
// src/components/molecules/rating-comment.tsx
|
|
2343
|
-
import * as
|
|
2364
|
+
import * as React32 from "react";
|
|
2344
2365
|
import { Book } from "lucide-react";
|
|
2345
|
-
import { jsx as
|
|
2346
|
-
var RatingComment =
|
|
2366
|
+
import { jsx as jsx41, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2367
|
+
var RatingComment = React32.forwardRef(
|
|
2347
2368
|
({ currentRating, onRate, className, isLoading }, ref) => {
|
|
2348
|
-
const [open, setOpen] =
|
|
2349
|
-
const [comment, setComment] =
|
|
2350
|
-
const [animate, setAnimate] =
|
|
2369
|
+
const [open, setOpen] = React32.useState(false);
|
|
2370
|
+
const [comment, setComment] = React32.useState("");
|
|
2371
|
+
const [animate, setAnimate] = React32.useState(false);
|
|
2351
2372
|
const handleRate = () => {
|
|
2352
2373
|
onRate(comment);
|
|
2353
2374
|
setOpen(false);
|
|
2354
2375
|
};
|
|
2355
|
-
|
|
2376
|
+
React32.useEffect(() => {
|
|
2356
2377
|
if (currentRating) {
|
|
2357
2378
|
setAnimate(true);
|
|
2358
2379
|
const timer = setTimeout(() => setAnimate(false), 150);
|
|
2359
2380
|
return () => clearTimeout(timer);
|
|
2360
2381
|
}
|
|
2361
2382
|
}, [currentRating]);
|
|
2362
|
-
|
|
2383
|
+
React32.useEffect(() => {
|
|
2363
2384
|
setComment("");
|
|
2364
2385
|
}, [open]);
|
|
2365
2386
|
return /* @__PURE__ */ jsxs18(Dialog, { open, onOpenChange: setOpen, children: [
|
|
2366
|
-
/* @__PURE__ */
|
|
2387
|
+
/* @__PURE__ */ jsx41(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
|
|
2367
2388
|
Button,
|
|
2368
2389
|
{
|
|
2369
2390
|
ref,
|
|
@@ -2374,7 +2395,7 @@ var RatingComment = React31.forwardRef(
|
|
|
2374
2395
|
className
|
|
2375
2396
|
),
|
|
2376
2397
|
disabled: isLoading,
|
|
2377
|
-
children: /* @__PURE__ */
|
|
2398
|
+
children: /* @__PURE__ */ jsx41(
|
|
2378
2399
|
Book,
|
|
2379
2400
|
{
|
|
2380
2401
|
className: cn(
|
|
@@ -2387,10 +2408,10 @@ var RatingComment = React31.forwardRef(
|
|
|
2387
2408
|
)
|
|
2388
2409
|
}
|
|
2389
2410
|
) }),
|
|
2390
|
-
/* @__PURE__ */
|
|
2411
|
+
/* @__PURE__ */ jsx41(DialogOverlay, { className: "fixed inset-0 bg-black bg-opacity-50" }),
|
|
2391
2412
|
/* @__PURE__ */ jsxs18(DialogContent, { "aria-describedby": void 0, children: [
|
|
2392
|
-
/* @__PURE__ */
|
|
2393
|
-
/* @__PURE__ */
|
|
2413
|
+
/* @__PURE__ */ jsx41(DialogTitle, { className: "text-lg font-medium", children: "Deja un comentario" }),
|
|
2414
|
+
/* @__PURE__ */ jsx41(
|
|
2394
2415
|
"textarea",
|
|
2395
2416
|
{
|
|
2396
2417
|
className: "mt-4 w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary",
|
|
@@ -2399,7 +2420,7 @@ var RatingComment = React31.forwardRef(
|
|
|
2399
2420
|
onChange: (e) => setComment(e.target.value)
|
|
2400
2421
|
}
|
|
2401
2422
|
),
|
|
2402
|
-
/* @__PURE__ */
|
|
2423
|
+
/* @__PURE__ */ jsx41("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ jsx41(
|
|
2403
2424
|
Button,
|
|
2404
2425
|
{
|
|
2405
2426
|
onClick: handleRate,
|
|
@@ -2414,7 +2435,7 @@ var RatingComment = React31.forwardRef(
|
|
|
2414
2435
|
RatingComment.displayName = "RatingComment";
|
|
2415
2436
|
|
|
2416
2437
|
// src/components/molecules/call-out.tsx
|
|
2417
|
-
import * as
|
|
2438
|
+
import * as React33 from "react";
|
|
2418
2439
|
|
|
2419
2440
|
// src/components/hooks/use-text-streaming.ts
|
|
2420
2441
|
import { useState as useState10, useEffect as useEffect10, useRef, useCallback as useCallback2 } from "react";
|
|
@@ -2473,9 +2494,9 @@ function useTextStreaming(content, shouldStream, handleIsTextStreaming) {
|
|
|
2473
2494
|
}
|
|
2474
2495
|
|
|
2475
2496
|
// src/components/molecules/call-out.tsx
|
|
2476
|
-
import { jsx as
|
|
2477
|
-
var CallOut =
|
|
2478
|
-
return /* @__PURE__ */
|
|
2497
|
+
import { jsx as jsx42, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2498
|
+
var CallOut = React33.forwardRef(({ className, children, role, ...props }, ref) => {
|
|
2499
|
+
return /* @__PURE__ */ jsx42(
|
|
2479
2500
|
"div",
|
|
2480
2501
|
{
|
|
2481
2502
|
ref,
|
|
@@ -2486,8 +2507,8 @@ var CallOut = React32.forwardRef(({ className, children, role, ...props }, ref)
|
|
|
2486
2507
|
}
|
|
2487
2508
|
);
|
|
2488
2509
|
});
|
|
2489
|
-
var CallOutDate =
|
|
2490
|
-
return /* @__PURE__ */
|
|
2510
|
+
var CallOutDate = React33.forwardRef(({ className, children, ...props }, ref) => {
|
|
2511
|
+
return /* @__PURE__ */ jsx42(
|
|
2491
2512
|
"div",
|
|
2492
2513
|
{
|
|
2493
2514
|
ref,
|
|
@@ -2501,13 +2522,13 @@ var CallOutDate = React32.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
2501
2522
|
}
|
|
2502
2523
|
);
|
|
2503
2524
|
});
|
|
2504
|
-
var CallOutActions =
|
|
2505
|
-
const [isLoading, setIsLoading] =
|
|
2506
|
-
const [isClicked, setIsClicked] =
|
|
2525
|
+
var CallOutActions = React33.forwardRef(({ className, actions, role, message, ...props }, ref) => {
|
|
2526
|
+
const [isLoading, setIsLoading] = React33.useState(false);
|
|
2527
|
+
const [isClicked, setIsClicked] = React33.useState(false);
|
|
2507
2528
|
if (role === "user") {
|
|
2508
2529
|
return null;
|
|
2509
2530
|
}
|
|
2510
|
-
return /* @__PURE__ */
|
|
2531
|
+
return /* @__PURE__ */ jsx42("div", { ref, className: cn("alq--callout-actions", className), ...props, children: actions.map((action) => /* @__PURE__ */ jsxs19(
|
|
2511
2532
|
"button",
|
|
2512
2533
|
{
|
|
2513
2534
|
className: cn(
|
|
@@ -2529,7 +2550,7 @@ var CallOutActions = React32.forwardRef(({ className, actions, role, message, ..
|
|
|
2529
2550
|
});
|
|
2530
2551
|
},
|
|
2531
2552
|
children: [
|
|
2532
|
-
/* @__PURE__ */
|
|
2553
|
+
/* @__PURE__ */ jsx42(
|
|
2533
2554
|
"span",
|
|
2534
2555
|
{
|
|
2535
2556
|
className: cn("alq-action-icon-wrapper", {
|
|
@@ -2538,13 +2559,13 @@ var CallOutActions = React32.forwardRef(({ className, actions, role, message, ..
|
|
|
2538
2559
|
children: action.icon
|
|
2539
2560
|
}
|
|
2540
2561
|
),
|
|
2541
|
-
/* @__PURE__ */
|
|
2562
|
+
/* @__PURE__ */ jsx42("label", { children: action.label })
|
|
2542
2563
|
]
|
|
2543
2564
|
},
|
|
2544
2565
|
action.label
|
|
2545
2566
|
)) });
|
|
2546
2567
|
});
|
|
2547
|
-
var CallOutResponse =
|
|
2568
|
+
var CallOutResponse = React33.forwardRef(
|
|
2548
2569
|
({ className, children, role, additionalInfo, isStreaming, handleIsTextStreaming, ...props }, ref) => {
|
|
2549
2570
|
const content = String(children || "");
|
|
2550
2571
|
const shouldStream = role === "assistant" && isStreaming;
|
|
@@ -2562,8 +2583,8 @@ var CallOutResponse = React32.forwardRef(
|
|
|
2562
2583
|
),
|
|
2563
2584
|
...props,
|
|
2564
2585
|
children: [
|
|
2565
|
-
/* @__PURE__ */
|
|
2566
|
-
additionalInfo && /* @__PURE__ */
|
|
2586
|
+
/* @__PURE__ */ jsx42(RichText, { content: displayedContent }),
|
|
2587
|
+
additionalInfo && /* @__PURE__ */ jsx42(
|
|
2567
2588
|
"div",
|
|
2568
2589
|
{
|
|
2569
2590
|
className: cn(
|
|
@@ -2586,8 +2607,8 @@ CallOutResponse.displayName = "CallOutResponse";
|
|
|
2586
2607
|
|
|
2587
2608
|
// src/components/organisms/assistant.tsx
|
|
2588
2609
|
import { Send } from "lucide-react";
|
|
2589
|
-
import { jsx as
|
|
2590
|
-
var Assistant =
|
|
2610
|
+
import { jsx as jsx43, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2611
|
+
var Assistant = React34.forwardRef(
|
|
2591
2612
|
({ className, sdk, title, description, children, ...props }, ref) => {
|
|
2592
2613
|
return /* @__PURE__ */ jsxs20(
|
|
2593
2614
|
"div",
|
|
@@ -2597,8 +2618,8 @@ var Assistant = React33.forwardRef(
|
|
|
2597
2618
|
...props,
|
|
2598
2619
|
children: [
|
|
2599
2620
|
(title || description) && /* @__PURE__ */ jsxs20(AssistantHeader, { children: [
|
|
2600
|
-
title && /* @__PURE__ */
|
|
2601
|
-
description && /* @__PURE__ */
|
|
2621
|
+
title && /* @__PURE__ */ jsx43(AssistantTitle, { title }),
|
|
2622
|
+
description && /* @__PURE__ */ jsx43(AssistantDescription, { description })
|
|
2602
2623
|
] }),
|
|
2603
2624
|
children
|
|
2604
2625
|
]
|
|
@@ -2607,14 +2628,14 @@ var Assistant = React33.forwardRef(
|
|
|
2607
2628
|
}
|
|
2608
2629
|
);
|
|
2609
2630
|
Assistant.displayName = "Assistant";
|
|
2610
|
-
var AssistantTitle =
|
|
2611
|
-
({ className, title, ...props }, ref) => /* @__PURE__ */
|
|
2631
|
+
var AssistantTitle = React34.forwardRef(
|
|
2632
|
+
({ className, title, ...props }, ref) => /* @__PURE__ */ jsx43("div", { ref, className: cn("text-foreground", className), ...props, children: /* @__PURE__ */ jsx43(Typography, { typeStyle: "heading1", as: "h1", children: title }) })
|
|
2612
2633
|
);
|
|
2613
2634
|
AssistantTitle.displayName = "AssistantTitle";
|
|
2614
|
-
var AssistantDescription =
|
|
2635
|
+
var AssistantDescription = React34.forwardRef(({ className, description, ...props }, ref) => /* @__PURE__ */ jsx43("div", { ref, className: cn("text-foreground", className), ...props, children: /* @__PURE__ */ jsx43(Typography, { typeStyle: "display", as: "p", children: description }) }));
|
|
2615
2636
|
AssistantDescription.displayName = "AssistantDescription";
|
|
2616
|
-
var AssistantHeader =
|
|
2617
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
2637
|
+
var AssistantHeader = React34.forwardRef(
|
|
2638
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx43(
|
|
2618
2639
|
"div",
|
|
2619
2640
|
{
|
|
2620
2641
|
ref,
|
|
@@ -2625,7 +2646,7 @@ var AssistantHeader = React33.forwardRef(
|
|
|
2625
2646
|
)
|
|
2626
2647
|
);
|
|
2627
2648
|
AssistantHeader.displayName = "AssistantHeader";
|
|
2628
|
-
var AssistantMessageArea =
|
|
2649
|
+
var AssistantMessageArea = React34.forwardRef(
|
|
2629
2650
|
({
|
|
2630
2651
|
className,
|
|
2631
2652
|
messages,
|
|
@@ -2634,6 +2655,7 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2634
2655
|
streamingMessageId,
|
|
2635
2656
|
thinkIndicator,
|
|
2636
2657
|
handleIsTextStreaming,
|
|
2658
|
+
toolFactory,
|
|
2637
2659
|
...props
|
|
2638
2660
|
}, ref) => {
|
|
2639
2661
|
useEffect11(() => {
|
|
@@ -2646,13 +2668,13 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2646
2668
|
className: cn("p-6 overflow-y-auto flex-grow bg-background", className),
|
|
2647
2669
|
...props,
|
|
2648
2670
|
children: [
|
|
2649
|
-
messages.map((message) => /* @__PURE__ */
|
|
2671
|
+
messages.map((message) => /* @__PURE__ */ jsx43("div", { children: /* @__PURE__ */ jsxs20(
|
|
2650
2672
|
CallOut,
|
|
2651
2673
|
{
|
|
2652
2674
|
role: message.role,
|
|
2653
2675
|
message,
|
|
2654
2676
|
children: [
|
|
2655
|
-
message.created_at && /* @__PURE__ */
|
|
2677
|
+
message.created_at && /* @__PURE__ */ jsx43("div", { className: "text-xs text-muted-foreground/80 pb-1", children: new Date(Number(message.created_at)).toLocaleString("es-ES", {
|
|
2656
2678
|
day: "2-digit",
|
|
2657
2679
|
month: "2-digit",
|
|
2658
2680
|
year: "numeric",
|
|
@@ -2661,8 +2683,8 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2661
2683
|
second: "2-digit",
|
|
2662
2684
|
hour12: false
|
|
2663
2685
|
}) }),
|
|
2664
|
-
message.loading && /* @__PURE__ */
|
|
2665
|
-
message.error_code && /* @__PURE__ */
|
|
2686
|
+
message.loading && /* @__PURE__ */ jsx43("div", { children: thinkIndicator ?? /* @__PURE__ */ jsx43(ThinkIndicator, {}) }),
|
|
2687
|
+
message.error_code && /* @__PURE__ */ jsx43(
|
|
2666
2688
|
CallOutResponse,
|
|
2667
2689
|
{
|
|
2668
2690
|
role: "assistant",
|
|
@@ -2670,7 +2692,8 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2670
2692
|
children: "We have an internal error, please try again later."
|
|
2671
2693
|
}
|
|
2672
2694
|
),
|
|
2673
|
-
message.
|
|
2695
|
+
message.tooler && message.tooler?.tool_output && !message.error_code && toolFactory?.createTool(message.tooler?.tool_summary?.name, message.tooler?.tool_output?.result),
|
|
2696
|
+
message.content && /* @__PURE__ */ jsx43(
|
|
2674
2697
|
CallOutResponse,
|
|
2675
2698
|
{
|
|
2676
2699
|
role: message.role,
|
|
@@ -2680,7 +2703,7 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2680
2703
|
children: message.content
|
|
2681
2704
|
}
|
|
2682
2705
|
),
|
|
2683
|
-
actions && streamingMessageId !== message.id && /* @__PURE__ */
|
|
2706
|
+
actions && streamingMessageId !== message.id && /* @__PURE__ */ jsx43(
|
|
2684
2707
|
CallOutActions,
|
|
2685
2708
|
{
|
|
2686
2709
|
actions,
|
|
@@ -2693,14 +2716,14 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2693
2716
|
},
|
|
2694
2717
|
message.id
|
|
2695
2718
|
) }, message.id)),
|
|
2696
|
-
/* @__PURE__ */
|
|
2719
|
+
/* @__PURE__ */ jsx43("div", { ref: messagesEndRef })
|
|
2697
2720
|
]
|
|
2698
2721
|
}
|
|
2699
2722
|
);
|
|
2700
2723
|
}
|
|
2701
2724
|
);
|
|
2702
2725
|
AssistantMessageArea.displayName = "AssistantMessageArea";
|
|
2703
|
-
var AssistantInput =
|
|
2726
|
+
var AssistantInput = React34.forwardRef(
|
|
2704
2727
|
({
|
|
2705
2728
|
className,
|
|
2706
2729
|
sendMessageFunc,
|
|
@@ -2718,7 +2741,7 @@ var AssistantInput = React33.forwardRef(
|
|
|
2718
2741
|
ref,
|
|
2719
2742
|
...props,
|
|
2720
2743
|
children: [
|
|
2721
|
-
/* @__PURE__ */
|
|
2744
|
+
/* @__PURE__ */ jsx43(
|
|
2722
2745
|
"input",
|
|
2723
2746
|
{
|
|
2724
2747
|
type: "text",
|
|
@@ -2735,7 +2758,7 @@ var AssistantInput = React33.forwardRef(
|
|
|
2735
2758
|
)
|
|
2736
2759
|
}
|
|
2737
2760
|
),
|
|
2738
|
-
/* @__PURE__ */
|
|
2761
|
+
/* @__PURE__ */ jsx43(
|
|
2739
2762
|
"button",
|
|
2740
2763
|
{
|
|
2741
2764
|
type: "submit",
|
|
@@ -2744,7 +2767,7 @@ var AssistantInput = React33.forwardRef(
|
|
|
2744
2767
|
"w-10 h-10 rounded-full flex items-center justify-center alq--assistant-button-send",
|
|
2745
2768
|
isButtonDisabled ? "bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
2746
2769
|
),
|
|
2747
|
-
children: /* @__PURE__ */
|
|
2770
|
+
children: /* @__PURE__ */ jsx43(Send, { className: "w-5 h-5" })
|
|
2748
2771
|
}
|
|
2749
2772
|
)
|
|
2750
2773
|
]
|
|
@@ -2764,7 +2787,7 @@ import { useState as useState12 } from "react";
|
|
|
2764
2787
|
import { useEffect as useEffect12, useRef as useRef2 } from "react";
|
|
2765
2788
|
|
|
2766
2789
|
// src/components/organisms/rating-dialog.tsx
|
|
2767
|
-
import { jsx as
|
|
2790
|
+
import { jsx as jsx44, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2768
2791
|
function RatingDialog({
|
|
2769
2792
|
sendRating,
|
|
2770
2793
|
topicId,
|
|
@@ -2780,20 +2803,20 @@ function RatingDialog({
|
|
|
2780
2803
|
success ? setHasRatedTopic(true) : toast2({
|
|
2781
2804
|
title: "Error",
|
|
2782
2805
|
description: `Hubo un error al enviar la calificaci\xF3n`,
|
|
2783
|
-
action: /* @__PURE__ */
|
|
2806
|
+
action: /* @__PURE__ */ jsx44(ToastAction, { altText: "Goto schedule to undo", children: "Cerrar" })
|
|
2784
2807
|
});
|
|
2785
2808
|
};
|
|
2786
2809
|
const handleCancelRate = () => {
|
|
2787
2810
|
setHasRatedTopic(true);
|
|
2788
2811
|
onOpenChange(false);
|
|
2789
2812
|
};
|
|
2790
|
-
return /* @__PURE__ */
|
|
2813
|
+
return /* @__PURE__ */ jsx44(Dialog, { open: isOpen, onOpenChange, children: /* @__PURE__ */ jsxs21(DialogContent, { className: "sm:max-w-md", children: [
|
|
2791
2814
|
/* @__PURE__ */ jsxs21(DialogHeader, { children: [
|
|
2792
|
-
/* @__PURE__ */
|
|
2793
|
-
/* @__PURE__ */
|
|
2815
|
+
/* @__PURE__ */ jsx44(DialogTitle, { children: "Calific\xE1 esta conversaci\xF3n" }),
|
|
2816
|
+
/* @__PURE__ */ jsx44(DialogDescription, { children: "Por favor, compart\xED tu opini\xF3n sobre el asistente." })
|
|
2794
2817
|
] }),
|
|
2795
2818
|
/* @__PURE__ */ jsxs21("div", { className: "flex flex-row justify-center gap-4 py-4", children: [
|
|
2796
|
-
/* @__PURE__ */
|
|
2819
|
+
/* @__PURE__ */ jsx44(
|
|
2797
2820
|
RatingStars,
|
|
2798
2821
|
{
|
|
2799
2822
|
currentRating: ratingStars,
|
|
@@ -2802,7 +2825,7 @@ function RatingDialog({
|
|
|
2802
2825
|
className: "p-2 rounded"
|
|
2803
2826
|
}
|
|
2804
2827
|
),
|
|
2805
|
-
/* @__PURE__ */
|
|
2828
|
+
/* @__PURE__ */ jsx44(
|
|
2806
2829
|
RatingThumbs,
|
|
2807
2830
|
{
|
|
2808
2831
|
currentRating: ratingComment,
|
|
@@ -2811,7 +2834,7 @@ function RatingDialog({
|
|
|
2811
2834
|
isLoading
|
|
2812
2835
|
}
|
|
2813
2836
|
),
|
|
2814
|
-
/* @__PURE__ */
|
|
2837
|
+
/* @__PURE__ */ jsx44(
|
|
2815
2838
|
RatingComment,
|
|
2816
2839
|
{
|
|
2817
2840
|
currentRating: ratingComment,
|
|
@@ -2820,7 +2843,7 @@ function RatingDialog({
|
|
|
2820
2843
|
}
|
|
2821
2844
|
)
|
|
2822
2845
|
] }),
|
|
2823
|
-
/* @__PURE__ */
|
|
2846
|
+
/* @__PURE__ */ jsx44("div", { className: "flex flex-row justify-center gap-4", children: /* @__PURE__ */ jsx44(Button, { onClick: handleCancelRate, variant: "secondary", children: /* @__PURE__ */ jsx44(Typography, { as: "p", typeStyle: "tiny", children: "No, gracias." }) }) })
|
|
2824
2847
|
] }) });
|
|
2825
2848
|
}
|
|
2826
2849
|
export {
|