@alquimia-ai/ui 1.2.3 → 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/hooks/index.js +41 -32
- package/dist/components/hooks/index.js.map +1 -1
- package/dist/components/hooks/index.mjs +42 -33
- package/dist/components/hooks/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 +186 -156
- package/dist/components/molecules/index.js.map +1 -1
- package/dist/components/molecules/index.mjs +179 -149
- 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 +228 -196
- package/dist/components/organisms/index.js.map +1 -1
- package/dist/components/organisms/index.mjs +217 -185
- 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 +283 -250
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +262 -229
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +137 -0
- 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 +21 -3
package/dist/index.mjs
CHANGED
|
@@ -1357,8 +1357,29 @@ var Loader = React22.forwardRef(
|
|
|
1357
1357
|
);
|
|
1358
1358
|
Loader.displayName = "Loader";
|
|
1359
1359
|
|
|
1360
|
-
// src/components/
|
|
1360
|
+
// src/components/atoms/ui/separator.tsx
|
|
1361
1361
|
import * as React23 from "react";
|
|
1362
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
1363
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1364
|
+
var Separator2 = React23.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1365
|
+
SeparatorPrimitive.Root,
|
|
1366
|
+
{
|
|
1367
|
+
ref,
|
|
1368
|
+
decorative,
|
|
1369
|
+
orientation,
|
|
1370
|
+
className: cn(
|
|
1371
|
+
"shrink-0 bg-border",
|
|
1372
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
1373
|
+
className,
|
|
1374
|
+
"alq--separator"
|
|
1375
|
+
),
|
|
1376
|
+
...props
|
|
1377
|
+
}
|
|
1378
|
+
));
|
|
1379
|
+
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
1380
|
+
|
|
1381
|
+
// src/components/hooks/use-toast.ts
|
|
1382
|
+
import * as React24 from "react";
|
|
1362
1383
|
var TOAST_LIMIT = 1;
|
|
1363
1384
|
var TOAST_REMOVE_DELAY = 1e6;
|
|
1364
1385
|
var count = 0;
|
|
@@ -1459,8 +1480,8 @@ function toast({ ...props }) {
|
|
|
1459
1480
|
};
|
|
1460
1481
|
}
|
|
1461
1482
|
function useToast() {
|
|
1462
|
-
const [state, setState] =
|
|
1463
|
-
|
|
1483
|
+
const [state, setState] = React24.useState(memoryState);
|
|
1484
|
+
React24.useEffect(() => {
|
|
1464
1485
|
listeners.push(setState);
|
|
1465
1486
|
return () => {
|
|
1466
1487
|
const index = listeners.indexOf(setState);
|
|
@@ -1477,29 +1498,29 @@ function useToast() {
|
|
|
1477
1498
|
}
|
|
1478
1499
|
|
|
1479
1500
|
// src/components/atoms/ui/toaster.tsx
|
|
1480
|
-
import { jsx as
|
|
1501
|
+
import { jsx as jsx29, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1481
1502
|
function Toaster() {
|
|
1482
1503
|
const { toasts } = useToast();
|
|
1483
1504
|
return /* @__PURE__ */ jsxs9(ToastProvider, { children: [
|
|
1484
1505
|
toasts.map(function({ id, title, description, action, ...props }) {
|
|
1485
1506
|
return /* @__PURE__ */ jsxs9(Toast, { ...props, children: [
|
|
1486
1507
|
/* @__PURE__ */ jsxs9("div", { className: "grid gap-1", children: [
|
|
1487
|
-
title && /* @__PURE__ */
|
|
1488
|
-
description && /* @__PURE__ */
|
|
1508
|
+
title && /* @__PURE__ */ jsx29(ToastTitle, { children: title }),
|
|
1509
|
+
description && /* @__PURE__ */ jsx29(ToastDescription, { children: description })
|
|
1489
1510
|
] }),
|
|
1490
1511
|
action,
|
|
1491
|
-
/* @__PURE__ */
|
|
1512
|
+
/* @__PURE__ */ jsx29(ToastClose, {})
|
|
1492
1513
|
] }, id);
|
|
1493
1514
|
}),
|
|
1494
|
-
/* @__PURE__ */
|
|
1515
|
+
/* @__PURE__ */ jsx29(ToastViewport, {})
|
|
1495
1516
|
] });
|
|
1496
1517
|
}
|
|
1497
1518
|
|
|
1498
1519
|
// src/components/atoms/ui/think-indicator.tsx
|
|
1499
|
-
import * as
|
|
1520
|
+
import * as React25 from "react";
|
|
1500
1521
|
import { useState as useState2, useEffect as useEffect2 } from "react";
|
|
1501
1522
|
import { cva as cva8 } from "class-variance-authority";
|
|
1502
|
-
import { jsx as
|
|
1523
|
+
import { jsx as jsx30, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1503
1524
|
var thinkIndicatorVariants = cva8(
|
|
1504
1525
|
"flex items-center gap-3",
|
|
1505
1526
|
{
|
|
@@ -1521,7 +1542,7 @@ var thinkIndicatorVariants = cva8(
|
|
|
1521
1542
|
}
|
|
1522
1543
|
}
|
|
1523
1544
|
);
|
|
1524
|
-
var ThinkIndicator =
|
|
1545
|
+
var ThinkIndicator = React25.forwardRef(
|
|
1525
1546
|
({
|
|
1526
1547
|
className,
|
|
1527
1548
|
variant,
|
|
@@ -1559,7 +1580,7 @@ var ThinkIndicator = React24.forwardRef(
|
|
|
1559
1580
|
className: cn(thinkIndicatorVariants({ variant, size }), className, "alq--think-indicator"),
|
|
1560
1581
|
...props,
|
|
1561
1582
|
children: [
|
|
1562
|
-
loader || /* @__PURE__ */
|
|
1583
|
+
loader || /* @__PURE__ */ jsx30(
|
|
1563
1584
|
Loader,
|
|
1564
1585
|
{
|
|
1565
1586
|
className: cn(
|
|
@@ -1567,7 +1588,7 @@ var ThinkIndicator = React24.forwardRef(
|
|
|
1567
1588
|
)
|
|
1568
1589
|
}
|
|
1569
1590
|
),
|
|
1570
|
-
/* @__PURE__ */
|
|
1591
|
+
/* @__PURE__ */ jsx30(
|
|
1571
1592
|
"div",
|
|
1572
1593
|
{
|
|
1573
1594
|
className: cn(
|
|
@@ -1586,31 +1607,31 @@ var ThinkIndicator = React24.forwardRef(
|
|
|
1586
1607
|
ThinkIndicator.displayName = "ThinkIndicator";
|
|
1587
1608
|
|
|
1588
1609
|
// src/components/templates/messages-window.tsx
|
|
1589
|
-
import { forwardRef as
|
|
1590
|
-
import { jsx as
|
|
1591
|
-
var MessagesWindow =
|
|
1610
|
+
import { forwardRef as forwardRef27 } from "react";
|
|
1611
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1612
|
+
var MessagesWindow = forwardRef27(
|
|
1592
1613
|
({ className, ...props }, ref) => {
|
|
1593
|
-
return /* @__PURE__ */
|
|
1614
|
+
return /* @__PURE__ */ jsx31("div", { className: cn(className, "alq--messages--window"), ...props });
|
|
1594
1615
|
}
|
|
1595
1616
|
);
|
|
1596
1617
|
MessagesWindow.displayName = "MessagesWindow";
|
|
1597
1618
|
|
|
1598
1619
|
// src/components/templates/query-box.tsx
|
|
1599
|
-
import { forwardRef as
|
|
1600
|
-
import { jsx as
|
|
1601
|
-
var QueryBox =
|
|
1620
|
+
import { forwardRef as forwardRef28 } from "react";
|
|
1621
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1622
|
+
var QueryBox = forwardRef28(
|
|
1602
1623
|
({ className, ...props }, ref) => {
|
|
1603
|
-
return /* @__PURE__ */
|
|
1624
|
+
return /* @__PURE__ */ jsx32("div", { className: cn(className, "alq--querybox"), ...props });
|
|
1604
1625
|
}
|
|
1605
1626
|
);
|
|
1606
1627
|
QueryBox.displayName = "QueryBox";
|
|
1607
1628
|
|
|
1608
1629
|
// src/components/templates/hero/index.tsx
|
|
1609
|
-
import { forwardRef as
|
|
1610
|
-
import { jsx as
|
|
1611
|
-
var Hero =
|
|
1630
|
+
import { forwardRef as forwardRef29 } from "react";
|
|
1631
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1632
|
+
var Hero = forwardRef29(
|
|
1612
1633
|
({ className, children, ...props }, ref) => {
|
|
1613
|
-
return /* @__PURE__ */
|
|
1634
|
+
return /* @__PURE__ */ jsx33(
|
|
1614
1635
|
"div",
|
|
1615
1636
|
{
|
|
1616
1637
|
ref,
|
|
@@ -1621,9 +1642,9 @@ var Hero = forwardRef28(
|
|
|
1621
1642
|
);
|
|
1622
1643
|
}
|
|
1623
1644
|
);
|
|
1624
|
-
var HeroContent =
|
|
1645
|
+
var HeroContent = forwardRef29(
|
|
1625
1646
|
({ className, children, ...props }, ref) => {
|
|
1626
|
-
return /* @__PURE__ */
|
|
1647
|
+
return /* @__PURE__ */ jsx33(
|
|
1627
1648
|
"div",
|
|
1628
1649
|
{
|
|
1629
1650
|
ref,
|
|
@@ -1638,16 +1659,16 @@ Hero.displayName = "Hero";
|
|
|
1638
1659
|
HeroContent.displayName = "HeroContent";
|
|
1639
1660
|
|
|
1640
1661
|
// src/components/templates/cards/with-image-heading-description.tsx
|
|
1641
|
-
import { jsx as
|
|
1662
|
+
import { jsx as jsx34, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1642
1663
|
var CardWithImageHeadingDescriptionVertical = (props) => {
|
|
1643
1664
|
const { showBorder, image, heading, description } = props;
|
|
1644
1665
|
return /* @__PURE__ */ jsxs11(Card, { className: cn("w-[360px]", !showBorder && "border-none shadow-none"), children: [
|
|
1645
1666
|
image,
|
|
1646
1667
|
/* @__PURE__ */ jsxs11(CardHeader, { children: [
|
|
1647
|
-
/* @__PURE__ */
|
|
1648
|
-
/* @__PURE__ */
|
|
1668
|
+
/* @__PURE__ */ jsx34(CardTitle, { children: heading }),
|
|
1669
|
+
/* @__PURE__ */ jsx34(Typography, { typeStyle: "small", className: "text-font-weak-color", children: description })
|
|
1649
1670
|
] }),
|
|
1650
|
-
/* @__PURE__ */
|
|
1671
|
+
/* @__PURE__ */ jsx34(CardContent, {})
|
|
1651
1672
|
] });
|
|
1652
1673
|
};
|
|
1653
1674
|
var CardImageWithHeadingAndDescriptionHorizontal = (props) => {
|
|
@@ -1662,24 +1683,24 @@ var CardImageWithHeadingAndDescriptionHorizontal = (props) => {
|
|
|
1662
1683
|
children: [
|
|
1663
1684
|
image,
|
|
1664
1685
|
/* @__PURE__ */ jsxs11(CardHeader, { children: [
|
|
1665
|
-
/* @__PURE__ */
|
|
1666
|
-
/* @__PURE__ */
|
|
1686
|
+
/* @__PURE__ */ jsx34(CardTitle, { children: heading }),
|
|
1687
|
+
/* @__PURE__ */ jsx34(Typography, { typeStyle: "small", className: "text-font-weak-color", children: description })
|
|
1667
1688
|
] }),
|
|
1668
|
-
/* @__PURE__ */
|
|
1689
|
+
/* @__PURE__ */ jsx34(CardContent, {})
|
|
1669
1690
|
]
|
|
1670
1691
|
}
|
|
1671
1692
|
);
|
|
1672
1693
|
};
|
|
1673
1694
|
|
|
1674
1695
|
// src/components/templates/cards/with-image-heading-description-avatar.tsx
|
|
1675
|
-
import { jsx as
|
|
1696
|
+
import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1676
1697
|
var AvatarInfo = (props) => {
|
|
1677
1698
|
const { userName, email, avatarImage } = props;
|
|
1678
1699
|
return /* @__PURE__ */ jsxs12("div", { className: "flex space-x-2 items-center", children: [
|
|
1679
|
-
/* @__PURE__ */
|
|
1700
|
+
/* @__PURE__ */ jsx35(Avatar, { className: "w-16 h-16", children: /* @__PURE__ */ jsx35(AvatarImage, { src: avatarImage }) }),
|
|
1680
1701
|
/* @__PURE__ */ jsxs12("div", { children: [
|
|
1681
|
-
/* @__PURE__ */
|
|
1682
|
-
/* @__PURE__ */
|
|
1702
|
+
/* @__PURE__ */ jsx35(Typography, { typeStyle: "small", className: "font-semibold", children: userName }),
|
|
1703
|
+
/* @__PURE__ */ jsx35(Typography, { typeStyle: "tiny", className: "text-font-weak-color", children: email })
|
|
1683
1704
|
] })
|
|
1684
1705
|
] });
|
|
1685
1706
|
};
|
|
@@ -1688,10 +1709,10 @@ var CardWithImageHeadingDescriptionAvatarVertical = (props) => {
|
|
|
1688
1709
|
return /* @__PURE__ */ jsxs12(Card, { className: cn("w-[360px]", !showBorder && "border-none shadow-none"), children: [
|
|
1689
1710
|
image,
|
|
1690
1711
|
/* @__PURE__ */ jsxs12(CardHeader, { children: [
|
|
1691
|
-
/* @__PURE__ */
|
|
1692
|
-
/* @__PURE__ */
|
|
1712
|
+
/* @__PURE__ */ jsx35(CardTitle, { children: heading }),
|
|
1713
|
+
/* @__PURE__ */ jsx35(Typography, { typeStyle: "small", className: "text-font-weak-color", children: description })
|
|
1693
1714
|
] }),
|
|
1694
|
-
/* @__PURE__ */
|
|
1715
|
+
/* @__PURE__ */ jsx35(CardContent, { children: /* @__PURE__ */ jsx35(AvatarInfo, { ...props }) })
|
|
1695
1716
|
] });
|
|
1696
1717
|
};
|
|
1697
1718
|
var CardImageWithHeadingAndDescriptionAvatarHorizontal = (props) => {
|
|
@@ -1707,10 +1728,10 @@ var CardImageWithHeadingAndDescriptionAvatarHorizontal = (props) => {
|
|
|
1707
1728
|
image,
|
|
1708
1729
|
/* @__PURE__ */ jsxs12("div", { children: [
|
|
1709
1730
|
/* @__PURE__ */ jsxs12(CardHeader, { children: [
|
|
1710
|
-
/* @__PURE__ */
|
|
1711
|
-
/* @__PURE__ */
|
|
1731
|
+
/* @__PURE__ */ jsx35(CardTitle, { children: heading }),
|
|
1732
|
+
/* @__PURE__ */ jsx35(Typography, { typeStyle: "small", className: "text-font-weak-color", children: description })
|
|
1712
1733
|
] }),
|
|
1713
|
-
/* @__PURE__ */
|
|
1734
|
+
/* @__PURE__ */ jsx35(CardContent, { children: /* @__PURE__ */ jsx35(AvatarInfo, { ...props }) })
|
|
1714
1735
|
] })
|
|
1715
1736
|
]
|
|
1716
1737
|
}
|
|
@@ -1724,7 +1745,7 @@ import {
|
|
|
1724
1745
|
PlayCircleIcon,
|
|
1725
1746
|
LoaderPinwheelIcon
|
|
1726
1747
|
} from "lucide-react";
|
|
1727
|
-
import { jsx as
|
|
1748
|
+
import { jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1728
1749
|
function Whisper({
|
|
1729
1750
|
className,
|
|
1730
1751
|
message,
|
|
@@ -1773,19 +1794,19 @@ function Whisper({
|
|
|
1773
1794
|
}
|
|
1774
1795
|
};
|
|
1775
1796
|
return /* @__PURE__ */ jsxs13("div", { className: cn(className), children: [
|
|
1776
|
-
isMessageStreaming && /* @__PURE__ */
|
|
1797
|
+
isMessageStreaming && /* @__PURE__ */ jsx36("div", { className: "p-2 w-[24px] h-[24px]" }),
|
|
1777
1798
|
!isMessageStreaming && /* @__PURE__ */ jsxs13("div", { onClick: () => handleTextToSpeech(content), children: [
|
|
1778
|
-
isPlaying && /* @__PURE__ */
|
|
1799
|
+
isPlaying && /* @__PURE__ */ jsx36("button", { className: "p-2 items-center justify-center", children: /* @__PURE__ */ jsx36(AudioLinesIcon, { size: 20 }) }),
|
|
1779
1800
|
isLoading && /* @__PURE__ */ jsxs13("button", { className: "p-2 items-center justify-center", children: [
|
|
1780
1801
|
" ",
|
|
1781
|
-
/* @__PURE__ */
|
|
1802
|
+
/* @__PURE__ */ jsx36(LoaderPinwheelIcon, { size: 20, className: "circular-animation" })
|
|
1782
1803
|
] }),
|
|
1783
|
-
!isLoading && !isPlaying && /* @__PURE__ */
|
|
1804
|
+
!isLoading && !isPlaying && /* @__PURE__ */ jsx36(
|
|
1784
1805
|
"button",
|
|
1785
1806
|
{
|
|
1786
1807
|
disabled: isLoading,
|
|
1787
1808
|
className: "p-2 items-center justify-center",
|
|
1788
|
-
children: /* @__PURE__ */
|
|
1809
|
+
children: /* @__PURE__ */ jsx36(PlayCircleIcon, { size: 20 })
|
|
1789
1810
|
}
|
|
1790
1811
|
)
|
|
1791
1812
|
] })
|
|
@@ -1794,7 +1815,7 @@ function Whisper({
|
|
|
1794
1815
|
|
|
1795
1816
|
// src/components/organisms/speechToText.tsx
|
|
1796
1817
|
import { useState as useState4, useEffect as useEffect4 } from "react";
|
|
1797
|
-
import { jsx as
|
|
1818
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1798
1819
|
function SpeechToText({
|
|
1799
1820
|
className,
|
|
1800
1821
|
speechToText,
|
|
@@ -1856,19 +1877,19 @@ function SpeechToText({
|
|
|
1856
1877
|
}
|
|
1857
1878
|
};
|
|
1858
1879
|
const recordIcons = isRecording ? RecordAudioIcon : IdleAudioIcon;
|
|
1859
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ jsx37("div", { className: cn(className), ...props, children: /* @__PURE__ */ jsx37("button", { disabled: isLoading, type: "button", onClick: handleRecordButtonClick, children: recordIcons }) });
|
|
1860
1881
|
}
|
|
1861
1882
|
|
|
1862
1883
|
// src/components/organisms/assistant.tsx
|
|
1863
|
-
import * as
|
|
1884
|
+
import * as React34 from "react";
|
|
1864
1885
|
import { useEffect as useEffect11 } from "react";
|
|
1865
1886
|
|
|
1866
1887
|
// src/components/molecules/page-container.tsx
|
|
1867
|
-
import { forwardRef as
|
|
1868
|
-
import { jsx as
|
|
1869
|
-
var PageContainer =
|
|
1888
|
+
import { forwardRef as forwardRef30 } from "react";
|
|
1889
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1890
|
+
var PageContainer = forwardRef30(
|
|
1870
1891
|
({ className, ...props }, ref) => {
|
|
1871
|
-
return /* @__PURE__ */
|
|
1892
|
+
return /* @__PURE__ */ jsx38(
|
|
1872
1893
|
"div",
|
|
1873
1894
|
{
|
|
1874
1895
|
ref,
|
|
@@ -1881,11 +1902,11 @@ var PageContainer = forwardRef29(
|
|
|
1881
1902
|
PageContainer.displayName = "PageContainer";
|
|
1882
1903
|
|
|
1883
1904
|
// src/components/molecules/assistant-button.tsx
|
|
1884
|
-
import * as
|
|
1905
|
+
import * as React26 from "react";
|
|
1885
1906
|
import { useState as useState5 } from "react";
|
|
1886
|
-
import { jsx as
|
|
1887
|
-
var AssistantSuggestions =
|
|
1888
|
-
return /* @__PURE__ */
|
|
1907
|
+
import { jsx as jsx39, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1908
|
+
var AssistantSuggestions = React26.forwardRef(({ suggestions, showSuggestions, className }, ref) => {
|
|
1909
|
+
return /* @__PURE__ */ jsx39(
|
|
1889
1910
|
"div",
|
|
1890
1911
|
{
|
|
1891
1912
|
ref,
|
|
@@ -1895,7 +1916,7 @@ var AssistantSuggestions = React25.forwardRef(({ suggestions, showSuggestions, c
|
|
|
1895
1916
|
showSuggestions ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4",
|
|
1896
1917
|
className
|
|
1897
1918
|
),
|
|
1898
|
-
children: /* @__PURE__ */
|
|
1919
|
+
children: /* @__PURE__ */ jsx39("div", { className: "rounded-lg p-2 pr-0 w-64", children: suggestions.map((suggestion, index) => /* @__PURE__ */ jsxs14(
|
|
1899
1920
|
"button",
|
|
1900
1921
|
{
|
|
1901
1922
|
onClick: () => suggestion.action?.(),
|
|
@@ -1911,8 +1932,8 @@ var AssistantSuggestions = React25.forwardRef(({ suggestions, showSuggestions, c
|
|
|
1911
1932
|
showSuggestions ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4"
|
|
1912
1933
|
),
|
|
1913
1934
|
children: [
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
/* @__PURE__ */
|
|
1935
|
+
/* @__PURE__ */ jsx39(suggestion.icon, { className: "w-5 h-5 text-primary" }),
|
|
1936
|
+
/* @__PURE__ */ jsx39("span", { className: "text-xs whitespace-nowrap font-normal", children: suggestion.label })
|
|
1916
1937
|
]
|
|
1917
1938
|
},
|
|
1918
1939
|
index
|
|
@@ -1921,7 +1942,7 @@ var AssistantSuggestions = React25.forwardRef(({ suggestions, showSuggestions, c
|
|
|
1921
1942
|
);
|
|
1922
1943
|
});
|
|
1923
1944
|
AssistantSuggestions.displayName = "Suggestions";
|
|
1924
|
-
var AssistantButton =
|
|
1945
|
+
var AssistantButton = React26.forwardRef(
|
|
1925
1946
|
({
|
|
1926
1947
|
icon: Icon2,
|
|
1927
1948
|
clickAction,
|
|
@@ -1942,7 +1963,7 @@ var AssistantButton = React25.forwardRef(
|
|
|
1942
1963
|
setShowSuggestions(false);
|
|
1943
1964
|
setTimeout(() => setIsVisible(false), 300);
|
|
1944
1965
|
};
|
|
1945
|
-
return /* @__PURE__ */
|
|
1966
|
+
return /* @__PURE__ */ jsx39(
|
|
1946
1967
|
"div",
|
|
1947
1968
|
{
|
|
1948
1969
|
ref,
|
|
@@ -1954,14 +1975,14 @@ var AssistantButton = React25.forwardRef(
|
|
|
1954
1975
|
onMouseEnter: handleMouseEnter,
|
|
1955
1976
|
onMouseLeave: handleMouseLeave,
|
|
1956
1977
|
children: /* @__PURE__ */ jsxs14("div", { className: "relative group", children: [
|
|
1957
|
-
isVisible && suggestions.length > 0 && /* @__PURE__ */
|
|
1978
|
+
isVisible && suggestions.length > 0 && /* @__PURE__ */ jsx39(
|
|
1958
1979
|
AssistantSuggestions,
|
|
1959
1980
|
{
|
|
1960
1981
|
suggestions,
|
|
1961
1982
|
showSuggestions
|
|
1962
1983
|
}
|
|
1963
1984
|
),
|
|
1964
|
-
/* @__PURE__ */
|
|
1985
|
+
/* @__PURE__ */ jsx39(
|
|
1965
1986
|
Button,
|
|
1966
1987
|
{
|
|
1967
1988
|
variant: "outline",
|
|
@@ -1975,7 +1996,7 @@ var AssistantButton = React25.forwardRef(
|
|
|
1975
1996
|
"alq--assistant-button"
|
|
1976
1997
|
),
|
|
1977
1998
|
onClick: clickAction,
|
|
1978
|
-
children: /* @__PURE__ */
|
|
1999
|
+
children: /* @__PURE__ */ jsx39(
|
|
1979
2000
|
Icon2,
|
|
1980
2001
|
{
|
|
1981
2002
|
style: { width: "22px", height: "22px" },
|
|
@@ -1992,19 +2013,19 @@ var AssistantButton = React25.forwardRef(
|
|
|
1992
2013
|
AssistantButton.displayName = "AssistantButton";
|
|
1993
2014
|
|
|
1994
2015
|
// src/components/molecules/carousel.tsx
|
|
1995
|
-
import * as
|
|
2016
|
+
import * as React27 from "react";
|
|
1996
2017
|
import useEmblaCarousel from "embla-carousel-react";
|
|
1997
2018
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
1998
|
-
import { jsx as
|
|
1999
|
-
var CarouselContext =
|
|
2019
|
+
import { jsx as jsx40, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2020
|
+
var CarouselContext = React27.createContext(null);
|
|
2000
2021
|
function useCarousel() {
|
|
2001
|
-
const context =
|
|
2022
|
+
const context = React27.useContext(CarouselContext);
|
|
2002
2023
|
if (!context) {
|
|
2003
2024
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
2004
2025
|
}
|
|
2005
2026
|
return context;
|
|
2006
2027
|
}
|
|
2007
|
-
var Carousel =
|
|
2028
|
+
var Carousel = React27.forwardRef(
|
|
2008
2029
|
({
|
|
2009
2030
|
orientation = "horizontal",
|
|
2010
2031
|
opts,
|
|
@@ -2021,22 +2042,22 @@ var Carousel = React26.forwardRef(
|
|
|
2021
2042
|
},
|
|
2022
2043
|
plugins
|
|
2023
2044
|
);
|
|
2024
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
2025
|
-
const [canScrollNext, setCanScrollNext] =
|
|
2026
|
-
const onSelect =
|
|
2045
|
+
const [canScrollPrev, setCanScrollPrev] = React27.useState(false);
|
|
2046
|
+
const [canScrollNext, setCanScrollNext] = React27.useState(false);
|
|
2047
|
+
const onSelect = React27.useCallback((api2) => {
|
|
2027
2048
|
if (!api2) {
|
|
2028
2049
|
return;
|
|
2029
2050
|
}
|
|
2030
2051
|
setCanScrollPrev(api2.canScrollPrev());
|
|
2031
2052
|
setCanScrollNext(api2.canScrollNext());
|
|
2032
2053
|
}, []);
|
|
2033
|
-
const scrollPrev =
|
|
2054
|
+
const scrollPrev = React27.useCallback(() => {
|
|
2034
2055
|
api?.scrollPrev();
|
|
2035
2056
|
}, [api]);
|
|
2036
|
-
const scrollNext =
|
|
2057
|
+
const scrollNext = React27.useCallback(() => {
|
|
2037
2058
|
api?.scrollNext();
|
|
2038
2059
|
}, [api]);
|
|
2039
|
-
const handleKeyDown =
|
|
2060
|
+
const handleKeyDown = React27.useCallback(
|
|
2040
2061
|
(event) => {
|
|
2041
2062
|
if (event.key === "ArrowLeft") {
|
|
2042
2063
|
event.preventDefault();
|
|
@@ -2048,13 +2069,13 @@ var Carousel = React26.forwardRef(
|
|
|
2048
2069
|
},
|
|
2049
2070
|
[scrollPrev, scrollNext]
|
|
2050
2071
|
);
|
|
2051
|
-
|
|
2072
|
+
React27.useEffect(() => {
|
|
2052
2073
|
if (!api || !setApi) {
|
|
2053
2074
|
return;
|
|
2054
2075
|
}
|
|
2055
2076
|
setApi(api);
|
|
2056
2077
|
}, [api, setApi]);
|
|
2057
|
-
|
|
2078
|
+
React27.useEffect(() => {
|
|
2058
2079
|
if (!api) {
|
|
2059
2080
|
return;
|
|
2060
2081
|
}
|
|
@@ -2065,7 +2086,7 @@ var Carousel = React26.forwardRef(
|
|
|
2065
2086
|
api?.off("select", onSelect);
|
|
2066
2087
|
};
|
|
2067
2088
|
}, [api, onSelect]);
|
|
2068
|
-
return /* @__PURE__ */
|
|
2089
|
+
return /* @__PURE__ */ jsx40(
|
|
2069
2090
|
CarouselContext.Provider,
|
|
2070
2091
|
{
|
|
2071
2092
|
value: {
|
|
@@ -2078,7 +2099,7 @@ var Carousel = React26.forwardRef(
|
|
|
2078
2099
|
canScrollPrev,
|
|
2079
2100
|
canScrollNext
|
|
2080
2101
|
},
|
|
2081
|
-
children: /* @__PURE__ */
|
|
2102
|
+
children: /* @__PURE__ */ jsx40(
|
|
2082
2103
|
"div",
|
|
2083
2104
|
{
|
|
2084
2105
|
ref,
|
|
@@ -2095,9 +2116,9 @@ var Carousel = React26.forwardRef(
|
|
|
2095
2116
|
}
|
|
2096
2117
|
);
|
|
2097
2118
|
Carousel.displayName = "Carousel";
|
|
2098
|
-
var CarouselContent =
|
|
2119
|
+
var CarouselContent = React27.forwardRef(({ className, ...props }, ref) => {
|
|
2099
2120
|
const { carouselRef, orientation } = useCarousel();
|
|
2100
|
-
return /* @__PURE__ */
|
|
2121
|
+
return /* @__PURE__ */ jsx40("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx40(
|
|
2101
2122
|
"div",
|
|
2102
2123
|
{
|
|
2103
2124
|
ref,
|
|
@@ -2111,9 +2132,9 @@ var CarouselContent = React26.forwardRef(({ className, ...props }, ref) => {
|
|
|
2111
2132
|
) });
|
|
2112
2133
|
});
|
|
2113
2134
|
CarouselContent.displayName = "CarouselContent";
|
|
2114
|
-
var CarouselItem =
|
|
2135
|
+
var CarouselItem = React27.forwardRef(({ className, ...props }, ref) => {
|
|
2115
2136
|
const { orientation } = useCarousel();
|
|
2116
|
-
return /* @__PURE__ */
|
|
2137
|
+
return /* @__PURE__ */ jsx40(
|
|
2117
2138
|
"div",
|
|
2118
2139
|
{
|
|
2119
2140
|
ref,
|
|
@@ -2129,7 +2150,7 @@ var CarouselItem = React26.forwardRef(({ className, ...props }, ref) => {
|
|
|
2129
2150
|
);
|
|
2130
2151
|
});
|
|
2131
2152
|
CarouselItem.displayName = "CarouselItem";
|
|
2132
|
-
var CarouselPrevious =
|
|
2153
|
+
var CarouselPrevious = React27.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
2133
2154
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
2134
2155
|
return /* @__PURE__ */ jsxs15(
|
|
2135
2156
|
Button,
|
|
@@ -2146,14 +2167,14 @@ var CarouselPrevious = React26.forwardRef(({ className, variant = "outline", siz
|
|
|
2146
2167
|
onClick: scrollPrev,
|
|
2147
2168
|
...props,
|
|
2148
2169
|
children: [
|
|
2149
|
-
/* @__PURE__ */
|
|
2150
|
-
/* @__PURE__ */
|
|
2170
|
+
/* @__PURE__ */ jsx40(ArrowLeft, { className: "h-4 w-4" }),
|
|
2171
|
+
/* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Previous slide" })
|
|
2151
2172
|
]
|
|
2152
2173
|
}
|
|
2153
2174
|
);
|
|
2154
2175
|
});
|
|
2155
2176
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
2156
|
-
var CarouselNext =
|
|
2177
|
+
var CarouselNext = React27.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
2157
2178
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
2158
2179
|
return /* @__PURE__ */ jsxs15(
|
|
2159
2180
|
Button,
|
|
@@ -2170,8 +2191,8 @@ var CarouselNext = React26.forwardRef(({ className, variant = "outline", size =
|
|
|
2170
2191
|
onClick: scrollNext,
|
|
2171
2192
|
...props,
|
|
2172
2193
|
children: [
|
|
2173
|
-
/* @__PURE__ */
|
|
2174
|
-
/* @__PURE__ */
|
|
2194
|
+
/* @__PURE__ */ jsx40(ArrowRight, { className: "h-4 w-4" }),
|
|
2195
|
+
/* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Next slide" })
|
|
2175
2196
|
]
|
|
2176
2197
|
}
|
|
2177
2198
|
);
|
|
@@ -2179,12 +2200,12 @@ var CarouselNext = React26.forwardRef(({ className, variant = "outline", size =
|
|
|
2179
2200
|
CarouselNext.displayName = "CarouselNext";
|
|
2180
2201
|
|
|
2181
2202
|
// src/components/molecules/navigation-menu.tsx
|
|
2182
|
-
import * as
|
|
2203
|
+
import * as React28 from "react";
|
|
2183
2204
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
2184
2205
|
import { cva as cva9 } from "class-variance-authority";
|
|
2185
2206
|
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
2186
|
-
import { jsx as
|
|
2187
|
-
var NavigationMenu =
|
|
2207
|
+
import { jsx as jsx41, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2208
|
+
var NavigationMenu = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs16(
|
|
2188
2209
|
NavigationMenuPrimitive.Root,
|
|
2189
2210
|
{
|
|
2190
2211
|
ref,
|
|
@@ -2195,12 +2216,12 @@ var NavigationMenu = React27.forwardRef(({ className, children, ...props }, ref)
|
|
|
2195
2216
|
...props,
|
|
2196
2217
|
children: [
|
|
2197
2218
|
children,
|
|
2198
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ jsx41(NavigationMenuViewport, {})
|
|
2199
2220
|
]
|
|
2200
2221
|
}
|
|
2201
2222
|
));
|
|
2202
2223
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
2203
|
-
var NavigationMenuList =
|
|
2224
|
+
var NavigationMenuList = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
|
|
2204
2225
|
NavigationMenuPrimitive.List,
|
|
2205
2226
|
{
|
|
2206
2227
|
ref,
|
|
@@ -2216,7 +2237,7 @@ var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
|
2216
2237
|
var navigationMenuTriggerStyle = cva9(
|
|
2217
2238
|
"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"
|
|
2218
2239
|
);
|
|
2219
|
-
var NavigationMenuTrigger =
|
|
2240
|
+
var NavigationMenuTrigger = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs16(
|
|
2220
2241
|
NavigationMenuPrimitive.Trigger,
|
|
2221
2242
|
{
|
|
2222
2243
|
ref,
|
|
@@ -2225,7 +2246,7 @@ var NavigationMenuTrigger = React27.forwardRef(({ className, children, ...props
|
|
|
2225
2246
|
children: [
|
|
2226
2247
|
children,
|
|
2227
2248
|
" ",
|
|
2228
|
-
/* @__PURE__ */
|
|
2249
|
+
/* @__PURE__ */ jsx41(
|
|
2229
2250
|
ChevronDown2,
|
|
2230
2251
|
{
|
|
2231
2252
|
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
|
|
@@ -2236,7 +2257,7 @@ var NavigationMenuTrigger = React27.forwardRef(({ className, children, ...props
|
|
|
2236
2257
|
}
|
|
2237
2258
|
));
|
|
2238
2259
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
2239
|
-
var NavigationMenuContent =
|
|
2260
|
+
var NavigationMenuContent = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
|
|
2240
2261
|
NavigationMenuPrimitive.Content,
|
|
2241
2262
|
{
|
|
2242
2263
|
ref,
|
|
@@ -2249,7 +2270,7 @@ var NavigationMenuContent = React27.forwardRef(({ className, ...props }, ref) =>
|
|
|
2249
2270
|
));
|
|
2250
2271
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
2251
2272
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
2252
|
-
var NavigationMenuViewport =
|
|
2273
|
+
var NavigationMenuViewport = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx41(
|
|
2253
2274
|
NavigationMenuPrimitive.Viewport,
|
|
2254
2275
|
{
|
|
2255
2276
|
className: cn(
|
|
@@ -2261,7 +2282,7 @@ var NavigationMenuViewport = React27.forwardRef(({ className, ...props }, ref) =
|
|
|
2261
2282
|
}
|
|
2262
2283
|
) }));
|
|
2263
2284
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
2264
|
-
var NavigationMenuIndicator =
|
|
2285
|
+
var NavigationMenuIndicator = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
|
|
2265
2286
|
NavigationMenuPrimitive.Indicator,
|
|
2266
2287
|
{
|
|
2267
2288
|
ref,
|
|
@@ -2270,15 +2291,15 @@ var NavigationMenuIndicator = React27.forwardRef(({ className, ...props }, ref)
|
|
|
2270
2291
|
className
|
|
2271
2292
|
),
|
|
2272
2293
|
...props,
|
|
2273
|
-
children: /* @__PURE__ */
|
|
2294
|
+
children: /* @__PURE__ */ jsx41("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
2274
2295
|
}
|
|
2275
2296
|
));
|
|
2276
2297
|
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
2277
2298
|
|
|
2278
2299
|
// src/components/molecules/sidebar.tsx
|
|
2279
|
-
import * as
|
|
2300
|
+
import * as React29 from "react";
|
|
2280
2301
|
import { cva as cva10 } from "class-variance-authority";
|
|
2281
|
-
import { jsx as
|
|
2302
|
+
import { jsx as jsx42, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2282
2303
|
var sidebarVariants = cva10(
|
|
2283
2304
|
"flex flex-col border-r",
|
|
2284
2305
|
{
|
|
@@ -2294,7 +2315,7 @@ var sidebarVariants = cva10(
|
|
|
2294
2315
|
}
|
|
2295
2316
|
}
|
|
2296
2317
|
);
|
|
2297
|
-
var SidebarFooter =
|
|
2318
|
+
var SidebarFooter = React29.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx42(
|
|
2298
2319
|
"div",
|
|
2299
2320
|
{
|
|
2300
2321
|
ref,
|
|
@@ -2304,7 +2325,7 @@ var SidebarFooter = React28.forwardRef(({ className, children, ...props }, ref)
|
|
|
2304
2325
|
}
|
|
2305
2326
|
));
|
|
2306
2327
|
SidebarFooter.displayName = "SidebarFooter";
|
|
2307
|
-
var Sidebar =
|
|
2328
|
+
var Sidebar = React29.forwardRef(
|
|
2308
2329
|
({
|
|
2309
2330
|
className,
|
|
2310
2331
|
items,
|
|
@@ -2317,8 +2338,8 @@ var Sidebar = React28.forwardRef(
|
|
|
2317
2338
|
buttonClassName,
|
|
2318
2339
|
...props
|
|
2319
2340
|
}, ref) => {
|
|
2320
|
-
return /* @__PURE__ */
|
|
2321
|
-
/* @__PURE__ */
|
|
2341
|
+
return /* @__PURE__ */ jsx42("div", { className: cn(className, "alq--navigation-sidebar h-full"), ref, ...props, children: /* @__PURE__ */ jsxs17("aside", { className: cn(sidebarVariants({ size }), "h-full"), children: [
|
|
2342
|
+
/* @__PURE__ */ jsx42(ScrollArea, { className: "flex-grow justify-between", children: /* @__PURE__ */ jsx42("div", { className: "flex flex-col gap-2 p-4", children: items.map((item) => /* @__PURE__ */ jsxs17(
|
|
2322
2343
|
Button,
|
|
2323
2344
|
{
|
|
2324
2345
|
variant: selectedSection?.name === item.name ? selectedVariant : defaultVariant,
|
|
@@ -2330,13 +2351,13 @@ var Sidebar = React28.forwardRef(
|
|
|
2330
2351
|
}
|
|
2331
2352
|
},
|
|
2332
2353
|
children: [
|
|
2333
|
-
item.icon && /* @__PURE__ */
|
|
2354
|
+
item.icon && /* @__PURE__ */ jsx42(item.icon, { className: "mr-2 h-4 w-4" }),
|
|
2334
2355
|
item.name
|
|
2335
2356
|
]
|
|
2336
2357
|
},
|
|
2337
2358
|
item.name
|
|
2338
2359
|
)) }) }),
|
|
2339
|
-
footerContent && /* @__PURE__ */
|
|
2360
|
+
footerContent && /* @__PURE__ */ jsx42(SidebarFooter, { children: footerContent })
|
|
2340
2361
|
] }) });
|
|
2341
2362
|
}
|
|
2342
2363
|
);
|
|
@@ -2344,10 +2365,10 @@ var Sidebar = React28.forwardRef(
|
|
|
2344
2365
|
// src/components/molecules/sonner.tsx
|
|
2345
2366
|
import { useTheme } from "next-themes";
|
|
2346
2367
|
import { Toaster as Sonner } from "sonner";
|
|
2347
|
-
import { jsx as
|
|
2368
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2348
2369
|
var Toaster2 = ({ ...props }) => {
|
|
2349
2370
|
const { theme = "system" } = useTheme();
|
|
2350
|
-
return /* @__PURE__ */
|
|
2371
|
+
return /* @__PURE__ */ jsx43(
|
|
2351
2372
|
Sonner,
|
|
2352
2373
|
{
|
|
2353
2374
|
theme,
|
|
@@ -2366,14 +2387,14 @@ var Toaster2 = ({ ...props }) => {
|
|
|
2366
2387
|
};
|
|
2367
2388
|
|
|
2368
2389
|
// src/components/molecules/rating-stars.tsx
|
|
2369
|
-
import * as
|
|
2390
|
+
import * as React30 from "react";
|
|
2370
2391
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2371
2392
|
import { Star } from "lucide-react";
|
|
2372
|
-
import { jsx as
|
|
2393
|
+
import { jsx as jsx44, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2373
2394
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
2374
2395
|
var Tooltip = TooltipPrimitive.Root;
|
|
2375
2396
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
2376
|
-
var TooltipContent =
|
|
2397
|
+
var TooltipContent = React30.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx44(
|
|
2377
2398
|
TooltipPrimitive.Content,
|
|
2378
2399
|
{
|
|
2379
2400
|
ref,
|
|
@@ -2386,14 +2407,14 @@ var TooltipContent = React29.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
2386
2407
|
}
|
|
2387
2408
|
));
|
|
2388
2409
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
2389
|
-
var StarRating =
|
|
2410
|
+
var StarRating = React30.forwardRef(({ rating, onRate }, ref) => /* @__PURE__ */ jsx44("div", { ref, className: "flex", children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsx44(
|
|
2390
2411
|
Button,
|
|
2391
2412
|
{
|
|
2392
2413
|
onClick: () => onRate(star),
|
|
2393
2414
|
variant: "link",
|
|
2394
2415
|
className: "p-1 transition-colors [&_svg]:size-5 h-5",
|
|
2395
2416
|
"aria-label": `Rate ${star} star${star !== 1 ? "s" : ""}`,
|
|
2396
|
-
children: /* @__PURE__ */
|
|
2417
|
+
children: /* @__PURE__ */ jsx44(
|
|
2397
2418
|
Star,
|
|
2398
2419
|
{
|
|
2399
2420
|
className: cn(
|
|
@@ -2406,19 +2427,19 @@ var StarRating = React29.forwardRef(({ rating, onRate }, ref) => /* @__PURE__ */
|
|
|
2406
2427
|
star
|
|
2407
2428
|
)) }));
|
|
2408
2429
|
StarRating.displayName = "StarRating";
|
|
2409
|
-
var RatingStars =
|
|
2430
|
+
var RatingStars = React30.forwardRef(({
|
|
2410
2431
|
currentRating = 0,
|
|
2411
2432
|
onRate,
|
|
2412
2433
|
className,
|
|
2413
2434
|
isLoading
|
|
2414
2435
|
}, ref) => {
|
|
2415
|
-
const [open, setOpen] =
|
|
2416
|
-
const [animate, setAnimate] =
|
|
2436
|
+
const [open, setOpen] = React30.useState(false);
|
|
2437
|
+
const [animate, setAnimate] = React30.useState(false);
|
|
2417
2438
|
const handleRate = (rating) => {
|
|
2418
2439
|
onRate(rating);
|
|
2419
2440
|
setOpen(false);
|
|
2420
2441
|
};
|
|
2421
|
-
|
|
2442
|
+
React30.useEffect(() => {
|
|
2422
2443
|
if (currentRating > 0) {
|
|
2423
2444
|
setAnimate(true);
|
|
2424
2445
|
const timer = setTimeout(() => setAnimate(false), 150);
|
|
@@ -2426,8 +2447,8 @@ var RatingStars = React29.forwardRef(({
|
|
|
2426
2447
|
}
|
|
2427
2448
|
}, [currentRating]);
|
|
2428
2449
|
const hasRated = currentRating > 0;
|
|
2429
|
-
return /* @__PURE__ */
|
|
2430
|
-
/* @__PURE__ */
|
|
2450
|
+
return /* @__PURE__ */ jsx44(TooltipProvider, { children: /* @__PURE__ */ jsxs18(Tooltip, { open, onOpenChange: setOpen, children: [
|
|
2451
|
+
/* @__PURE__ */ jsx44(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx44(
|
|
2431
2452
|
Button,
|
|
2432
2453
|
{
|
|
2433
2454
|
ref,
|
|
@@ -2438,7 +2459,7 @@ var RatingStars = React29.forwardRef(({
|
|
|
2438
2459
|
),
|
|
2439
2460
|
disabled: isLoading,
|
|
2440
2461
|
onClick: () => setOpen(!open),
|
|
2441
|
-
children: /* @__PURE__ */
|
|
2462
|
+
children: /* @__PURE__ */ jsx44(
|
|
2442
2463
|
Star,
|
|
2443
2464
|
{
|
|
2444
2465
|
className: cn(
|
|
@@ -2451,7 +2472,7 @@ var RatingStars = React29.forwardRef(({
|
|
|
2451
2472
|
)
|
|
2452
2473
|
}
|
|
2453
2474
|
) }),
|
|
2454
|
-
/* @__PURE__ */
|
|
2475
|
+
/* @__PURE__ */ jsx44(TooltipContent, { side: "top", align: "center", className: "p-0", children: /* @__PURE__ */ jsx44("div", { className: "p-2 bg-background", children: /* @__PURE__ */ jsx44(
|
|
2455
2476
|
StarRating,
|
|
2456
2477
|
{
|
|
2457
2478
|
rating: currentRating,
|
|
@@ -2463,10 +2484,10 @@ var RatingStars = React29.forwardRef(({
|
|
|
2463
2484
|
RatingStars.displayName = "RatingStars";
|
|
2464
2485
|
|
|
2465
2486
|
// src/components/molecules/rating-thumbs.tsx
|
|
2466
|
-
import * as
|
|
2487
|
+
import * as React31 from "react";
|
|
2467
2488
|
import { ThumbsUp, ThumbsDown } from "lucide-react";
|
|
2468
|
-
import { jsx as
|
|
2469
|
-
var RatingThumbs =
|
|
2489
|
+
import { jsx as jsx45, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2490
|
+
var RatingThumbs = React31.forwardRef(
|
|
2470
2491
|
({
|
|
2471
2492
|
currentRating,
|
|
2472
2493
|
onRate,
|
|
@@ -2474,8 +2495,8 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2474
2495
|
className,
|
|
2475
2496
|
isLoading
|
|
2476
2497
|
}, ref) => {
|
|
2477
|
-
const [animate, setAnimate] =
|
|
2478
|
-
|
|
2498
|
+
const [animate, setAnimate] = React31.useState(false);
|
|
2499
|
+
React31.useEffect(() => {
|
|
2479
2500
|
if (currentRating) {
|
|
2480
2501
|
setAnimate(true);
|
|
2481
2502
|
const timer = setTimeout(() => setAnimate(false), 150);
|
|
@@ -2493,7 +2514,7 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2493
2514
|
className
|
|
2494
2515
|
),
|
|
2495
2516
|
children: [
|
|
2496
|
-
/* @__PURE__ */
|
|
2517
|
+
/* @__PURE__ */ jsx45(
|
|
2497
2518
|
Button,
|
|
2498
2519
|
{
|
|
2499
2520
|
variant: "link",
|
|
@@ -2504,7 +2525,7 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2504
2525
|
),
|
|
2505
2526
|
"aria-label": "Thumbs up",
|
|
2506
2527
|
disabled: isLoading,
|
|
2507
|
-
children: /* @__PURE__ */
|
|
2528
|
+
children: /* @__PURE__ */ jsx45(
|
|
2508
2529
|
ThumbsUp,
|
|
2509
2530
|
{
|
|
2510
2531
|
className: cn(
|
|
@@ -2517,7 +2538,7 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2517
2538
|
)
|
|
2518
2539
|
}
|
|
2519
2540
|
),
|
|
2520
|
-
/* @__PURE__ */
|
|
2541
|
+
/* @__PURE__ */ jsx45(
|
|
2521
2542
|
Button,
|
|
2522
2543
|
{
|
|
2523
2544
|
variant: "link",
|
|
@@ -2528,7 +2549,7 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2528
2549
|
),
|
|
2529
2550
|
"aria-label": "Thumbs down",
|
|
2530
2551
|
disabled: isLoading,
|
|
2531
|
-
children: /* @__PURE__ */
|
|
2552
|
+
children: /* @__PURE__ */ jsx45(
|
|
2532
2553
|
ThumbsDown,
|
|
2533
2554
|
{
|
|
2534
2555
|
className: cn(
|
|
@@ -2549,30 +2570,30 @@ var RatingThumbs = React30.forwardRef(
|
|
|
2549
2570
|
RatingThumbs.displayName = "RatingThumbs";
|
|
2550
2571
|
|
|
2551
2572
|
// src/components/molecules/rating-comment.tsx
|
|
2552
|
-
import * as
|
|
2573
|
+
import * as React32 from "react";
|
|
2553
2574
|
import { Book } from "lucide-react";
|
|
2554
|
-
import { jsx as
|
|
2555
|
-
var RatingComment =
|
|
2575
|
+
import { jsx as jsx46, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2576
|
+
var RatingComment = React32.forwardRef(
|
|
2556
2577
|
({ currentRating, onRate, className, isLoading }, ref) => {
|
|
2557
|
-
const [open, setOpen] =
|
|
2558
|
-
const [comment, setComment] =
|
|
2559
|
-
const [animate, setAnimate] =
|
|
2578
|
+
const [open, setOpen] = React32.useState(false);
|
|
2579
|
+
const [comment, setComment] = React32.useState("");
|
|
2580
|
+
const [animate, setAnimate] = React32.useState(false);
|
|
2560
2581
|
const handleRate = () => {
|
|
2561
2582
|
onRate(comment);
|
|
2562
2583
|
setOpen(false);
|
|
2563
2584
|
};
|
|
2564
|
-
|
|
2585
|
+
React32.useEffect(() => {
|
|
2565
2586
|
if (currentRating) {
|
|
2566
2587
|
setAnimate(true);
|
|
2567
2588
|
const timer = setTimeout(() => setAnimate(false), 150);
|
|
2568
2589
|
return () => clearTimeout(timer);
|
|
2569
2590
|
}
|
|
2570
2591
|
}, [currentRating]);
|
|
2571
|
-
|
|
2592
|
+
React32.useEffect(() => {
|
|
2572
2593
|
setComment("");
|
|
2573
2594
|
}, [open]);
|
|
2574
2595
|
return /* @__PURE__ */ jsxs20(Dialog, { open, onOpenChange: setOpen, children: [
|
|
2575
|
-
/* @__PURE__ */
|
|
2596
|
+
/* @__PURE__ */ jsx46(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(
|
|
2576
2597
|
Button,
|
|
2577
2598
|
{
|
|
2578
2599
|
ref,
|
|
@@ -2583,7 +2604,7 @@ var RatingComment = React31.forwardRef(
|
|
|
2583
2604
|
className
|
|
2584
2605
|
),
|
|
2585
2606
|
disabled: isLoading,
|
|
2586
|
-
children: /* @__PURE__ */
|
|
2607
|
+
children: /* @__PURE__ */ jsx46(
|
|
2587
2608
|
Book,
|
|
2588
2609
|
{
|
|
2589
2610
|
className: cn(
|
|
@@ -2596,10 +2617,10 @@ var RatingComment = React31.forwardRef(
|
|
|
2596
2617
|
)
|
|
2597
2618
|
}
|
|
2598
2619
|
) }),
|
|
2599
|
-
/* @__PURE__ */
|
|
2620
|
+
/* @__PURE__ */ jsx46(DialogOverlay, { className: "fixed inset-0 bg-black bg-opacity-50" }),
|
|
2600
2621
|
/* @__PURE__ */ jsxs20(DialogContent, { "aria-describedby": void 0, children: [
|
|
2601
|
-
/* @__PURE__ */
|
|
2602
|
-
/* @__PURE__ */
|
|
2622
|
+
/* @__PURE__ */ jsx46(DialogTitle, { className: "text-lg font-medium", children: "Deja un comentario" }),
|
|
2623
|
+
/* @__PURE__ */ jsx46(
|
|
2603
2624
|
"textarea",
|
|
2604
2625
|
{
|
|
2605
2626
|
className: "mt-4 w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary",
|
|
@@ -2608,7 +2629,7 @@ var RatingComment = React31.forwardRef(
|
|
|
2608
2629
|
onChange: (e) => setComment(e.target.value)
|
|
2609
2630
|
}
|
|
2610
2631
|
),
|
|
2611
|
-
/* @__PURE__ */
|
|
2632
|
+
/* @__PURE__ */ jsx46("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ jsx46(
|
|
2612
2633
|
Button,
|
|
2613
2634
|
{
|
|
2614
2635
|
onClick: handleRate,
|
|
@@ -2623,59 +2644,68 @@ var RatingComment = React31.forwardRef(
|
|
|
2623
2644
|
RatingComment.displayName = "RatingComment";
|
|
2624
2645
|
|
|
2625
2646
|
// src/components/molecules/call-out.tsx
|
|
2626
|
-
import * as
|
|
2647
|
+
import * as React33 from "react";
|
|
2627
2648
|
|
|
2628
2649
|
// src/components/hooks/use-text-streaming.ts
|
|
2629
|
-
import { useEffect as useEffect10, useRef,
|
|
2650
|
+
import { useState as useState10, useEffect as useEffect10, useRef, useCallback as useCallback2 } from "react";
|
|
2630
2651
|
var CHAR_DELAY = 25;
|
|
2631
|
-
var PUNCTUATION_DELAY =
|
|
2632
|
-
var PUNCTUATION_MARKS = [".", "!", "?", ";", ":"];
|
|
2652
|
+
var PUNCTUATION_DELAY = 400;
|
|
2633
2653
|
function useTextStreaming(content, shouldStream, handleIsTextStreaming) {
|
|
2634
|
-
const [
|
|
2635
|
-
const
|
|
2654
|
+
const [displayedText, setDisplayedText] = useState10("");
|
|
2655
|
+
const contentRef = useRef(content);
|
|
2656
|
+
const indexRef = useRef(0);
|
|
2657
|
+
const timerRef = useRef(null);
|
|
2636
2658
|
const hasStartedStreaming = useRef(false);
|
|
2637
|
-
const getDelayForChar = (text, position) => {
|
|
2638
|
-
if (position === 0) return CHAR_DELAY;
|
|
2639
|
-
const previousChar = text[position - 1] || "";
|
|
2640
|
-
const isEllipsis = text.slice(position - 1, position + 2) === "...";
|
|
2641
|
-
if (isEllipsis) {
|
|
2642
|
-
return CHAR_DELAY;
|
|
2643
|
-
}
|
|
2644
|
-
return PUNCTUATION_MARKS.includes(previousChar) ? PUNCTUATION_DELAY : CHAR_DELAY;
|
|
2645
|
-
};
|
|
2646
2659
|
useEffect10(() => {
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
return;
|
|
2660
|
+
contentRef.current = content;
|
|
2661
|
+
if (hasStartedStreaming.current && !timerRef.current && indexRef.current < contentRef.current.length) {
|
|
2662
|
+
typeNext();
|
|
2651
2663
|
}
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
if (
|
|
2655
|
-
const
|
|
2656
|
-
|
|
2657
|
-
|
|
2664
|
+
}, [content]);
|
|
2665
|
+
const typeNext = useCallback2(() => {
|
|
2666
|
+
if (indexRef.current < contentRef.current.length) {
|
|
2667
|
+
const nextChar = contentRef.current.charAt(indexRef.current);
|
|
2668
|
+
setDisplayedText((prev) => prev + nextChar);
|
|
2669
|
+
indexRef.current++;
|
|
2670
|
+
const delay = /[.!?;:]/.test(nextChar) ? PUNCTUATION_DELAY : CHAR_DELAY;
|
|
2671
|
+
timerRef.current = setTimeout(() => {
|
|
2672
|
+
timerRef.current = null;
|
|
2673
|
+
typeNext();
|
|
2658
2674
|
}, delay);
|
|
2659
2675
|
} else {
|
|
2660
2676
|
handleIsTextStreaming?.(false);
|
|
2661
2677
|
}
|
|
2678
|
+
}, []);
|
|
2679
|
+
useEffect10(() => {
|
|
2680
|
+
if (!shouldStream && !hasStartedStreaming.current) {
|
|
2681
|
+
setDisplayedText(contentRef.current);
|
|
2682
|
+
indexRef.current = contentRef.current.length;
|
|
2683
|
+
if (timerRef.current) {
|
|
2684
|
+
clearTimeout(timerRef.current);
|
|
2685
|
+
timerRef.current = null;
|
|
2686
|
+
}
|
|
2687
|
+
handleIsTextStreaming?.(false);
|
|
2688
|
+
} else {
|
|
2689
|
+
if (indexRef.current < contentRef.current.length && !timerRef.current) {
|
|
2690
|
+
handleIsTextStreaming?.(true);
|
|
2691
|
+
hasStartedStreaming.current = true;
|
|
2692
|
+
typeNext();
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2662
2695
|
return () => {
|
|
2663
|
-
if (
|
|
2696
|
+
if (timerRef.current) {
|
|
2697
|
+
clearTimeout(timerRef.current);
|
|
2698
|
+
timerRef.current = null;
|
|
2699
|
+
}
|
|
2664
2700
|
};
|
|
2665
|
-
}, [
|
|
2666
|
-
|
|
2667
|
-
displayedContent,
|
|
2668
|
-
shouldStream,
|
|
2669
|
-
getDelayForChar,
|
|
2670
|
-
handleIsTextStreaming
|
|
2671
|
-
]);
|
|
2672
|
-
return displayedContent;
|
|
2701
|
+
}, [shouldStream, typeNext]);
|
|
2702
|
+
return displayedText;
|
|
2673
2703
|
}
|
|
2674
2704
|
|
|
2675
2705
|
// src/components/molecules/call-out.tsx
|
|
2676
|
-
import { jsx as
|
|
2677
|
-
var CallOut =
|
|
2678
|
-
return /* @__PURE__ */
|
|
2706
|
+
import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2707
|
+
var CallOut = React33.forwardRef(({ className, children, role, ...props }, ref) => {
|
|
2708
|
+
return /* @__PURE__ */ jsx47(
|
|
2679
2709
|
"div",
|
|
2680
2710
|
{
|
|
2681
2711
|
ref,
|
|
@@ -2686,8 +2716,8 @@ var CallOut = React32.forwardRef(({ className, children, role, ...props }, ref)
|
|
|
2686
2716
|
}
|
|
2687
2717
|
);
|
|
2688
2718
|
});
|
|
2689
|
-
var CallOutDate =
|
|
2690
|
-
return /* @__PURE__ */
|
|
2719
|
+
var CallOutDate = React33.forwardRef(({ className, children, ...props }, ref) => {
|
|
2720
|
+
return /* @__PURE__ */ jsx47(
|
|
2691
2721
|
"div",
|
|
2692
2722
|
{
|
|
2693
2723
|
ref,
|
|
@@ -2701,13 +2731,13 @@ var CallOutDate = React32.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
2701
2731
|
}
|
|
2702
2732
|
);
|
|
2703
2733
|
});
|
|
2704
|
-
var CallOutActions =
|
|
2705
|
-
const [isLoading, setIsLoading] =
|
|
2706
|
-
const [isClicked, setIsClicked] =
|
|
2734
|
+
var CallOutActions = React33.forwardRef(({ className, actions, role, message, ...props }, ref) => {
|
|
2735
|
+
const [isLoading, setIsLoading] = React33.useState(false);
|
|
2736
|
+
const [isClicked, setIsClicked] = React33.useState(false);
|
|
2707
2737
|
if (role === "user") {
|
|
2708
2738
|
return null;
|
|
2709
2739
|
}
|
|
2710
|
-
return /* @__PURE__ */
|
|
2740
|
+
return /* @__PURE__ */ jsx47("div", { ref, className: cn("alq--callout-actions", className), ...props, children: actions.map((action) => /* @__PURE__ */ jsxs21(
|
|
2711
2741
|
"button",
|
|
2712
2742
|
{
|
|
2713
2743
|
className: cn(
|
|
@@ -2729,7 +2759,7 @@ var CallOutActions = React32.forwardRef(({ className, actions, role, message, ..
|
|
|
2729
2759
|
});
|
|
2730
2760
|
},
|
|
2731
2761
|
children: [
|
|
2732
|
-
/* @__PURE__ */
|
|
2762
|
+
/* @__PURE__ */ jsx47(
|
|
2733
2763
|
"span",
|
|
2734
2764
|
{
|
|
2735
2765
|
className: cn("alq-action-icon-wrapper", {
|
|
@@ -2738,13 +2768,13 @@ var CallOutActions = React32.forwardRef(({ className, actions, role, message, ..
|
|
|
2738
2768
|
children: action.icon
|
|
2739
2769
|
}
|
|
2740
2770
|
),
|
|
2741
|
-
/* @__PURE__ */
|
|
2771
|
+
/* @__PURE__ */ jsx47("label", { children: action.label })
|
|
2742
2772
|
]
|
|
2743
2773
|
},
|
|
2744
2774
|
action.label
|
|
2745
2775
|
)) });
|
|
2746
2776
|
});
|
|
2747
|
-
var CallOutResponse =
|
|
2777
|
+
var CallOutResponse = React33.forwardRef(
|
|
2748
2778
|
({ className, children, role, additionalInfo, isStreaming, handleIsTextStreaming, ...props }, ref) => {
|
|
2749
2779
|
const content = String(children || "");
|
|
2750
2780
|
const shouldStream = role === "assistant" && isStreaming;
|
|
@@ -2762,8 +2792,8 @@ var CallOutResponse = React32.forwardRef(
|
|
|
2762
2792
|
),
|
|
2763
2793
|
...props,
|
|
2764
2794
|
children: [
|
|
2765
|
-
/* @__PURE__ */
|
|
2766
|
-
additionalInfo && /* @__PURE__ */
|
|
2795
|
+
/* @__PURE__ */ jsx47(RichText, { content: displayedContent }),
|
|
2796
|
+
additionalInfo && /* @__PURE__ */ jsx47(
|
|
2767
2797
|
"div",
|
|
2768
2798
|
{
|
|
2769
2799
|
className: cn(
|
|
@@ -2786,8 +2816,8 @@ CallOutResponse.displayName = "CallOutResponse";
|
|
|
2786
2816
|
|
|
2787
2817
|
// src/components/organisms/assistant.tsx
|
|
2788
2818
|
import { Send } from "lucide-react";
|
|
2789
|
-
import { jsx as
|
|
2790
|
-
var Assistant =
|
|
2819
|
+
import { jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2820
|
+
var Assistant = React34.forwardRef(
|
|
2791
2821
|
({ className, sdk, title, description, children, ...props }, ref) => {
|
|
2792
2822
|
return /* @__PURE__ */ jsxs22(
|
|
2793
2823
|
"div",
|
|
@@ -2797,8 +2827,8 @@ var Assistant = React33.forwardRef(
|
|
|
2797
2827
|
...props,
|
|
2798
2828
|
children: [
|
|
2799
2829
|
(title || description) && /* @__PURE__ */ jsxs22(AssistantHeader, { children: [
|
|
2800
|
-
title && /* @__PURE__ */
|
|
2801
|
-
description && /* @__PURE__ */
|
|
2830
|
+
title && /* @__PURE__ */ jsx48(AssistantTitle, { title }),
|
|
2831
|
+
description && /* @__PURE__ */ jsx48(AssistantDescription, { description })
|
|
2802
2832
|
] }),
|
|
2803
2833
|
children
|
|
2804
2834
|
]
|
|
@@ -2807,14 +2837,14 @@ var Assistant = React33.forwardRef(
|
|
|
2807
2837
|
}
|
|
2808
2838
|
);
|
|
2809
2839
|
Assistant.displayName = "Assistant";
|
|
2810
|
-
var AssistantTitle =
|
|
2811
|
-
({ className, title, ...props }, ref) => /* @__PURE__ */
|
|
2840
|
+
var AssistantTitle = React34.forwardRef(
|
|
2841
|
+
({ className, title, ...props }, ref) => /* @__PURE__ */ jsx48("div", { ref, className: cn("text-foreground", className), ...props, children: /* @__PURE__ */ jsx48(Typography, { typeStyle: "heading1", as: "h1", children: title }) })
|
|
2812
2842
|
);
|
|
2813
2843
|
AssistantTitle.displayName = "AssistantTitle";
|
|
2814
|
-
var AssistantDescription =
|
|
2844
|
+
var AssistantDescription = React34.forwardRef(({ className, description, ...props }, ref) => /* @__PURE__ */ jsx48("div", { ref, className: cn("text-foreground", className), ...props, children: /* @__PURE__ */ jsx48(Typography, { typeStyle: "display", as: "p", children: description }) }));
|
|
2815
2845
|
AssistantDescription.displayName = "AssistantDescription";
|
|
2816
|
-
var AssistantHeader =
|
|
2817
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
2846
|
+
var AssistantHeader = React34.forwardRef(
|
|
2847
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
2818
2848
|
"div",
|
|
2819
2849
|
{
|
|
2820
2850
|
ref,
|
|
@@ -2825,7 +2855,7 @@ var AssistantHeader = React33.forwardRef(
|
|
|
2825
2855
|
)
|
|
2826
2856
|
);
|
|
2827
2857
|
AssistantHeader.displayName = "AssistantHeader";
|
|
2828
|
-
var AssistantMessageArea =
|
|
2858
|
+
var AssistantMessageArea = React34.forwardRef(
|
|
2829
2859
|
({
|
|
2830
2860
|
className,
|
|
2831
2861
|
messages,
|
|
@@ -2834,6 +2864,7 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2834
2864
|
streamingMessageId,
|
|
2835
2865
|
thinkIndicator,
|
|
2836
2866
|
handleIsTextStreaming,
|
|
2867
|
+
toolFactory,
|
|
2837
2868
|
...props
|
|
2838
2869
|
}, ref) => {
|
|
2839
2870
|
useEffect11(() => {
|
|
@@ -2846,13 +2877,13 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2846
2877
|
className: cn("p-6 overflow-y-auto flex-grow bg-background", className),
|
|
2847
2878
|
...props,
|
|
2848
2879
|
children: [
|
|
2849
|
-
messages.map((message) => /* @__PURE__ */
|
|
2880
|
+
messages.map((message) => /* @__PURE__ */ jsx48("div", { children: /* @__PURE__ */ jsxs22(
|
|
2850
2881
|
CallOut,
|
|
2851
2882
|
{
|
|
2852
2883
|
role: message.role,
|
|
2853
2884
|
message,
|
|
2854
2885
|
children: [
|
|
2855
|
-
message.created_at && /* @__PURE__ */
|
|
2886
|
+
message.created_at && /* @__PURE__ */ jsx48("div", { className: "text-xs text-muted-foreground/80 pb-1", children: new Date(Number(message.created_at)).toLocaleString("es-ES", {
|
|
2856
2887
|
day: "2-digit",
|
|
2857
2888
|
month: "2-digit",
|
|
2858
2889
|
year: "numeric",
|
|
@@ -2861,8 +2892,8 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2861
2892
|
second: "2-digit",
|
|
2862
2893
|
hour12: false
|
|
2863
2894
|
}) }),
|
|
2864
|
-
message.loading && /* @__PURE__ */
|
|
2865
|
-
message.error_code && /* @__PURE__ */
|
|
2895
|
+
message.loading && /* @__PURE__ */ jsx48("div", { children: thinkIndicator ?? /* @__PURE__ */ jsx48(ThinkIndicator, {}) }),
|
|
2896
|
+
message.error_code && /* @__PURE__ */ jsx48(
|
|
2866
2897
|
CallOutResponse,
|
|
2867
2898
|
{
|
|
2868
2899
|
role: "assistant",
|
|
@@ -2870,7 +2901,8 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2870
2901
|
children: "We have an internal error, please try again later."
|
|
2871
2902
|
}
|
|
2872
2903
|
),
|
|
2873
|
-
message.
|
|
2904
|
+
message.tooler && message.tooler?.tool_output && !message.error_code && toolFactory?.createTool(message.tooler?.tool_summary?.name, message.tooler?.tool_output?.result),
|
|
2905
|
+
message.content && /* @__PURE__ */ jsx48(
|
|
2874
2906
|
CallOutResponse,
|
|
2875
2907
|
{
|
|
2876
2908
|
role: message.role,
|
|
@@ -2880,7 +2912,7 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2880
2912
|
children: message.content
|
|
2881
2913
|
}
|
|
2882
2914
|
),
|
|
2883
|
-
actions && streamingMessageId !== message.id && /* @__PURE__ */
|
|
2915
|
+
actions && streamingMessageId !== message.id && /* @__PURE__ */ jsx48(
|
|
2884
2916
|
CallOutActions,
|
|
2885
2917
|
{
|
|
2886
2918
|
actions,
|
|
@@ -2893,14 +2925,14 @@ var AssistantMessageArea = React33.forwardRef(
|
|
|
2893
2925
|
},
|
|
2894
2926
|
message.id
|
|
2895
2927
|
) }, message.id)),
|
|
2896
|
-
/* @__PURE__ */
|
|
2928
|
+
/* @__PURE__ */ jsx48("div", { ref: messagesEndRef })
|
|
2897
2929
|
]
|
|
2898
2930
|
}
|
|
2899
2931
|
);
|
|
2900
2932
|
}
|
|
2901
2933
|
);
|
|
2902
2934
|
AssistantMessageArea.displayName = "AssistantMessageArea";
|
|
2903
|
-
var AssistantInput =
|
|
2935
|
+
var AssistantInput = React34.forwardRef(
|
|
2904
2936
|
({
|
|
2905
2937
|
className,
|
|
2906
2938
|
sendMessageFunc,
|
|
@@ -2918,7 +2950,7 @@ var AssistantInput = React33.forwardRef(
|
|
|
2918
2950
|
ref,
|
|
2919
2951
|
...props,
|
|
2920
2952
|
children: [
|
|
2921
|
-
/* @__PURE__ */
|
|
2953
|
+
/* @__PURE__ */ jsx48(
|
|
2922
2954
|
"input",
|
|
2923
2955
|
{
|
|
2924
2956
|
type: "text",
|
|
@@ -2935,7 +2967,7 @@ var AssistantInput = React33.forwardRef(
|
|
|
2935
2967
|
)
|
|
2936
2968
|
}
|
|
2937
2969
|
),
|
|
2938
|
-
/* @__PURE__ */
|
|
2970
|
+
/* @__PURE__ */ jsx48(
|
|
2939
2971
|
"button",
|
|
2940
2972
|
{
|
|
2941
2973
|
type: "submit",
|
|
@@ -2944,7 +2976,7 @@ var AssistantInput = React33.forwardRef(
|
|
|
2944
2976
|
"w-10 h-10 rounded-full flex items-center justify-center alq--assistant-button-send",
|
|
2945
2977
|
isButtonDisabled ? "bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
2946
2978
|
),
|
|
2947
|
-
children: /* @__PURE__ */
|
|
2979
|
+
children: /* @__PURE__ */ jsx48(Send, { className: "w-5 h-5" })
|
|
2948
2980
|
}
|
|
2949
2981
|
)
|
|
2950
2982
|
]
|
|
@@ -2995,7 +3027,7 @@ var useDocumentReader = (url, getDocument) => {
|
|
|
2995
3027
|
import { useEffect as useEffect12, useRef as useRef2 } from "react";
|
|
2996
3028
|
|
|
2997
3029
|
// src/components/organisms/rating-dialog.tsx
|
|
2998
|
-
import { jsx as
|
|
3030
|
+
import { jsx as jsx49, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2999
3031
|
function RatingDialog({
|
|
3000
3032
|
sendRating,
|
|
3001
3033
|
topicId,
|
|
@@ -3011,20 +3043,20 @@ function RatingDialog({
|
|
|
3011
3043
|
success ? setHasRatedTopic(true) : toast2({
|
|
3012
3044
|
title: "Error",
|
|
3013
3045
|
description: `Hubo un error al enviar la calificaci\xF3n`,
|
|
3014
|
-
action: /* @__PURE__ */
|
|
3046
|
+
action: /* @__PURE__ */ jsx49(ToastAction, { altText: "Goto schedule to undo", children: "Cerrar" })
|
|
3015
3047
|
});
|
|
3016
3048
|
};
|
|
3017
3049
|
const handleCancelRate = () => {
|
|
3018
3050
|
setHasRatedTopic(true);
|
|
3019
3051
|
onOpenChange(false);
|
|
3020
3052
|
};
|
|
3021
|
-
return /* @__PURE__ */
|
|
3053
|
+
return /* @__PURE__ */ jsx49(Dialog, { open: isOpen, onOpenChange, children: /* @__PURE__ */ jsxs23(DialogContent, { className: "sm:max-w-md", children: [
|
|
3022
3054
|
/* @__PURE__ */ jsxs23(DialogHeader, { children: [
|
|
3023
|
-
/* @__PURE__ */
|
|
3024
|
-
/* @__PURE__ */
|
|
3055
|
+
/* @__PURE__ */ jsx49(DialogTitle, { children: "Calific\xE1 esta conversaci\xF3n" }),
|
|
3056
|
+
/* @__PURE__ */ jsx49(DialogDescription, { children: "Por favor, compart\xED tu opini\xF3n sobre el asistente." })
|
|
3025
3057
|
] }),
|
|
3026
3058
|
/* @__PURE__ */ jsxs23("div", { className: "flex flex-row justify-center gap-4 py-4", children: [
|
|
3027
|
-
/* @__PURE__ */
|
|
3059
|
+
/* @__PURE__ */ jsx49(
|
|
3028
3060
|
RatingStars,
|
|
3029
3061
|
{
|
|
3030
3062
|
currentRating: ratingStars,
|
|
@@ -3033,7 +3065,7 @@ function RatingDialog({
|
|
|
3033
3065
|
className: "p-2 rounded"
|
|
3034
3066
|
}
|
|
3035
3067
|
),
|
|
3036
|
-
/* @__PURE__ */
|
|
3068
|
+
/* @__PURE__ */ jsx49(
|
|
3037
3069
|
RatingThumbs,
|
|
3038
3070
|
{
|
|
3039
3071
|
currentRating: ratingComment,
|
|
@@ -3042,7 +3074,7 @@ function RatingDialog({
|
|
|
3042
3074
|
isLoading
|
|
3043
3075
|
}
|
|
3044
3076
|
),
|
|
3045
|
-
/* @__PURE__ */
|
|
3077
|
+
/* @__PURE__ */ jsx49(
|
|
3046
3078
|
RatingComment,
|
|
3047
3079
|
{
|
|
3048
3080
|
currentRating: ratingComment,
|
|
@@ -3051,7 +3083,7 @@ function RatingDialog({
|
|
|
3051
3083
|
}
|
|
3052
3084
|
)
|
|
3053
3085
|
] }),
|
|
3054
|
-
/* @__PURE__ */
|
|
3086
|
+
/* @__PURE__ */ jsx49("div", { className: "flex flex-row justify-center gap-4", children: /* @__PURE__ */ jsx49(Button, { onClick: handleCancelRate, variant: "secondary", children: /* @__PURE__ */ jsx49(Typography, { as: "p", typeStyle: "tiny", children: "No, gracias." }) }) })
|
|
3055
3087
|
] }) });
|
|
3056
3088
|
}
|
|
3057
3089
|
|
|
@@ -3179,6 +3211,7 @@ export {
|
|
|
3179
3211
|
SelectSeparator,
|
|
3180
3212
|
SelectTrigger,
|
|
3181
3213
|
SelectValue,
|
|
3214
|
+
Separator2 as Separator,
|
|
3182
3215
|
Sidebar,
|
|
3183
3216
|
SidebarFooter,
|
|
3184
3217
|
Skeleton,
|