@alquimia-ai/ui 2.0.0 → 2.2.2
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/{alert-dialog-CP71C4vl.d.mts → alert-dialog-HrXEPlTh.d.mts} +1 -1
- package/dist/{alert-dialog-CP71C4vl.d.ts → alert-dialog-HrXEPlTh.d.ts} +1 -1
- package/dist/components/atoms/index.d.mts +48 -3
- package/dist/components/atoms/index.d.ts +48 -3
- package/dist/components/atoms/index.js +239 -0
- package/dist/components/atoms/index.js.map +1 -1
- package/dist/components/atoms/index.mjs +207 -1
- package/dist/components/atoms/index.mjs.map +1 -1
- package/dist/components/genui/index.d.mts +79 -0
- package/dist/components/genui/index.d.ts +79 -0
- package/dist/components/genui/index.js +4693 -0
- package/dist/components/genui/index.js.map +1 -0
- package/dist/components/genui/index.mjs +4622 -0
- package/dist/components/genui/index.mjs.map +1 -0
- package/dist/components/hooks/index.d.mts +1 -1
- package/dist/components/hooks/index.d.ts +1 -1
- package/dist/components/molecules/documents/index.js +283 -58
- package/dist/components/molecules/documents/index.js.map +1 -1
- package/dist/components/molecules/documents/index.mjs +281 -58
- package/dist/components/molecules/documents/index.mjs.map +1 -1
- package/dist/components/molecules/index.d.mts +2 -2
- package/dist/components/molecules/index.d.ts +2 -2
- package/dist/components/molecules/index.js +335 -156
- package/dist/components/molecules/index.js.map +1 -1
- package/dist/components/molecules/index.mjs +331 -152
- package/dist/components/molecules/index.mjs.map +1 -1
- package/dist/components/molecules/viewers/index.js +182 -3
- package/dist/components/molecules/viewers/index.js.map +1 -1
- package/dist/components/molecules/viewers/index.mjs +182 -3
- package/dist/components/molecules/viewers/index.mjs.map +1 -1
- package/dist/components/organisms/index.d.mts +15 -2
- package/dist/components/organisms/index.d.ts +15 -2
- package/dist/components/organisms/index.js +434 -247
- package/dist/components/organisms/index.js.map +1 -1
- package/dist/components/organisms/index.mjs +431 -244
- package/dist/components/organisms/index.mjs.map +1 -1
- package/dist/components/templates/index.js +210 -31
- package/dist/components/templates/index.js.map +1 -1
- package/dist/components/templates/index.mjs +210 -31
- package/dist/components/templates/index.mjs.map +1 -1
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +554 -307
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +524 -310
- package/dist/index.mjs.map +1 -1
- package/dist/{toast-2xT7L1tJ.d.mts → toast-DEc6eGUE.d.mts} +1 -1
- package/dist/{toast-2xT7L1tJ.d.ts → toast-DEc6eGUE.d.ts} +1 -1
- package/package.json +22 -3
package/dist/index.js
CHANGED
|
@@ -343,6 +343,18 @@ var __toCommonJS = function(mod) {
|
|
|
343
343
|
// src/index.ts
|
|
344
344
|
var src_exports = {};
|
|
345
345
|
__export(src_exports, {
|
|
346
|
+
Accordion: function() {
|
|
347
|
+
return Accordion;
|
|
348
|
+
},
|
|
349
|
+
AccordionContent: function() {
|
|
350
|
+
return AccordionContent;
|
|
351
|
+
},
|
|
352
|
+
AccordionItem: function() {
|
|
353
|
+
return AccordionItem;
|
|
354
|
+
},
|
|
355
|
+
AccordionTrigger: function() {
|
|
356
|
+
return AccordionTrigger;
|
|
357
|
+
},
|
|
346
358
|
Alert: function() {
|
|
347
359
|
return Alert;
|
|
348
360
|
},
|
|
@@ -439,6 +451,12 @@ __export(src_exports, {
|
|
|
439
451
|
Button: function() {
|
|
440
452
|
return Button;
|
|
441
453
|
},
|
|
454
|
+
CHART_PALETTE: function() {
|
|
455
|
+
return CHART_PALETTE;
|
|
456
|
+
},
|
|
457
|
+
Calendar: function() {
|
|
458
|
+
return Calendar;
|
|
459
|
+
},
|
|
442
460
|
CallOut: function() {
|
|
443
461
|
return CallOut;
|
|
444
462
|
},
|
|
@@ -496,6 +514,9 @@ __export(src_exports, {
|
|
|
496
514
|
CarouselPrevious: function() {
|
|
497
515
|
return CarouselPrevious;
|
|
498
516
|
},
|
|
517
|
+
Chart: function() {
|
|
518
|
+
return Chart;
|
|
519
|
+
},
|
|
499
520
|
Checkbox: function() {
|
|
500
521
|
return Checkbox;
|
|
501
522
|
},
|
|
@@ -643,9 +664,18 @@ __export(src_exports, {
|
|
|
643
664
|
PopoverTrigger: function() {
|
|
644
665
|
return PopoverTrigger;
|
|
645
666
|
},
|
|
667
|
+
Progress: function() {
|
|
668
|
+
return Progress;
|
|
669
|
+
},
|
|
646
670
|
QueryBox: function() {
|
|
647
671
|
return QueryBox;
|
|
648
672
|
},
|
|
673
|
+
RadioGroup: function() {
|
|
674
|
+
return RadioGroup;
|
|
675
|
+
},
|
|
676
|
+
RadioGroupItem: function() {
|
|
677
|
+
return RadioGroupItem;
|
|
678
|
+
},
|
|
649
679
|
RatingComment: function() {
|
|
650
680
|
return RatingComment;
|
|
651
681
|
},
|
|
@@ -794,7 +824,7 @@ __export(src_exports, {
|
|
|
794
824
|
return Toggle;
|
|
795
825
|
},
|
|
796
826
|
Tooltip: function() {
|
|
797
|
-
return
|
|
827
|
+
return Tooltip2;
|
|
798
828
|
},
|
|
799
829
|
TooltipContent: function() {
|
|
800
830
|
return TooltipContent;
|
|
@@ -841,6 +871,9 @@ __export(src_exports, {
|
|
|
841
871
|
reducer: function() {
|
|
842
872
|
return reducer;
|
|
843
873
|
},
|
|
874
|
+
themedChartAxes: function() {
|
|
875
|
+
return themedChartAxes;
|
|
876
|
+
},
|
|
844
877
|
thinkIndicatorVariants: function() {
|
|
845
878
|
return thinkIndicatorVariants;
|
|
846
879
|
},
|
|
@@ -2502,39 +2535,245 @@ var ThinkIndicator = React25.forwardRef(function(_param, ref) {
|
|
|
2502
2535
|
}));
|
|
2503
2536
|
});
|
|
2504
2537
|
ThinkIndicator.displayName = "ThinkIndicator";
|
|
2538
|
+
// src/components/atoms/ui/accordion.tsx
|
|
2539
|
+
var React26 = __toESM(require("react"));
|
|
2540
|
+
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
|
|
2541
|
+
var import_lucide_react8 = require("lucide-react");
|
|
2542
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2543
|
+
var Accordion = AccordionPrimitive.Root;
|
|
2544
|
+
var AccordionItem = React26.forwardRef(function(_param, ref) {
|
|
2545
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
2546
|
+
"className"
|
|
2547
|
+
]);
|
|
2548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AccordionPrimitive.Item, _object_spread({
|
|
2549
|
+
ref: ref,
|
|
2550
|
+
className: cn("border-b", className)
|
|
2551
|
+
}, props));
|
|
2552
|
+
});
|
|
2553
|
+
AccordionItem.displayName = "AccordionItem";
|
|
2554
|
+
var AccordionTrigger = React26.forwardRef(function(_param, ref) {
|
|
2555
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
2556
|
+
"className",
|
|
2557
|
+
"children"
|
|
2558
|
+
]);
|
|
2559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AccordionPrimitive.Header, {
|
|
2560
|
+
className: "flex",
|
|
2561
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(AccordionPrimitive.Trigger, _object_spread_props(_object_spread({
|
|
2562
|
+
ref: ref,
|
|
2563
|
+
className: cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className)
|
|
2564
|
+
}, props), {
|
|
2565
|
+
children: [
|
|
2566
|
+
children,
|
|
2567
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react8.ChevronDown, {
|
|
2568
|
+
className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"
|
|
2569
|
+
})
|
|
2570
|
+
]
|
|
2571
|
+
}))
|
|
2572
|
+
});
|
|
2573
|
+
});
|
|
2574
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
2575
|
+
var AccordionContent = React26.forwardRef(function(_param, ref) {
|
|
2576
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
2577
|
+
"className",
|
|
2578
|
+
"children"
|
|
2579
|
+
]);
|
|
2580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AccordionPrimitive.Content, _object_spread_props(_object_spread({
|
|
2581
|
+
ref: ref,
|
|
2582
|
+
className: "overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
2583
|
+
}, props), {
|
|
2584
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
2585
|
+
className: cn("pb-4 pt-0", className),
|
|
2586
|
+
children: children
|
|
2587
|
+
})
|
|
2588
|
+
}));
|
|
2589
|
+
});
|
|
2590
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
2591
|
+
// src/components/atoms/ui/radio-group.tsx
|
|
2592
|
+
var React27 = __toESM(require("react"));
|
|
2593
|
+
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
2594
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2595
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2596
|
+
var RadioGroup = React27.forwardRef(function(_param, ref) {
|
|
2597
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
2598
|
+
"className"
|
|
2599
|
+
]);
|
|
2600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadioGroupPrimitive.Root, _object_spread({
|
|
2601
|
+
ref: ref,
|
|
2602
|
+
className: cn("grid gap-2", className)
|
|
2603
|
+
}, props));
|
|
2604
|
+
});
|
|
2605
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
2606
|
+
var RadioGroupItem = React27.forwardRef(function(_param, ref) {
|
|
2607
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
2608
|
+
"className"
|
|
2609
|
+
]);
|
|
2610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadioGroupPrimitive.Item, _object_spread_props(_object_spread({
|
|
2611
|
+
ref: ref,
|
|
2612
|
+
className: cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className)
|
|
2613
|
+
}, props), {
|
|
2614
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadioGroupPrimitive.Indicator, {
|
|
2615
|
+
className: "flex items-center justify-center",
|
|
2616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react9.Circle, {
|
|
2617
|
+
className: "h-2.5 w-2.5 fill-current text-current"
|
|
2618
|
+
})
|
|
2619
|
+
})
|
|
2620
|
+
}));
|
|
2621
|
+
});
|
|
2622
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
2623
|
+
// src/components/atoms/ui/progress.tsx
|
|
2624
|
+
var React28 = __toESM(require("react"));
|
|
2625
|
+
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
|
2626
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2627
|
+
var Progress = React28.forwardRef(function(_param, ref) {
|
|
2628
|
+
var className = _param.className, value = _param.value, props = _object_without_properties(_param, [
|
|
2629
|
+
"className",
|
|
2630
|
+
"value"
|
|
2631
|
+
]);
|
|
2632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ProgressPrimitive.Root, _object_spread_props(_object_spread({
|
|
2633
|
+
ref: ref,
|
|
2634
|
+
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-muted", className)
|
|
2635
|
+
}, props), {
|
|
2636
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ProgressPrimitive.Indicator, {
|
|
2637
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
2638
|
+
style: {
|
|
2639
|
+
transform: "translateX(-".concat(100 - (value || 0), "%)")
|
|
2640
|
+
}
|
|
2641
|
+
})
|
|
2642
|
+
}));
|
|
2643
|
+
});
|
|
2644
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
2645
|
+
// src/components/atoms/ui/calendar.tsx
|
|
2646
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2647
|
+
var import_react_day_picker = require("react-day-picker");
|
|
2648
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2649
|
+
function Calendar(_param) {
|
|
2650
|
+
var className = _param.className, classNames = _param.classNames, _param_showOutsideDays = _param.showOutsideDays, showOutsideDays = _param_showOutsideDays === void 0 ? true : _param_showOutsideDays, props = _object_without_properties(_param, [
|
|
2651
|
+
"className",
|
|
2652
|
+
"classNames",
|
|
2653
|
+
"showOutsideDays"
|
|
2654
|
+
]);
|
|
2655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_day_picker.DayPicker, _object_spread({
|
|
2656
|
+
showOutsideDays: showOutsideDays,
|
|
2657
|
+
className: cn("p-3", className),
|
|
2658
|
+
classNames: _object_spread({
|
|
2659
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
2660
|
+
month: "space-y-4",
|
|
2661
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
2662
|
+
caption_label: "text-sm font-medium",
|
|
2663
|
+
nav: "space-x-1 flex items-center",
|
|
2664
|
+
nav_button: cn(buttonVariants({
|
|
2665
|
+
variant: "outline"
|
|
2666
|
+
}), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
|
|
2667
|
+
nav_button_previous: "absolute left-1",
|
|
2668
|
+
nav_button_next: "absolute right-1",
|
|
2669
|
+
table: "w-full border-collapse space-y-1",
|
|
2670
|
+
head_row: "flex",
|
|
2671
|
+
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
2672
|
+
row: "flex w-full mt-2",
|
|
2673
|
+
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
2674
|
+
day: cn(buttonVariants({
|
|
2675
|
+
variant: "ghost"
|
|
2676
|
+
}), "h-9 w-9 p-0 font-normal aria-selected:opacity-100"),
|
|
2677
|
+
day_range_end: "day-range-end",
|
|
2678
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
2679
|
+
day_today: "bg-accent text-accent-foreground",
|
|
2680
|
+
day_outside: "day-outside text-muted-foreground opacity-50",
|
|
2681
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
2682
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
2683
|
+
day_hidden: "invisible"
|
|
2684
|
+
}, classNames),
|
|
2685
|
+
components: {
|
|
2686
|
+
IconLeft: function() {
|
|
2687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react10.ChevronLeft, {
|
|
2688
|
+
className: "h-4 w-4"
|
|
2689
|
+
});
|
|
2690
|
+
},
|
|
2691
|
+
IconRight: function() {
|
|
2692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react10.ChevronRight, {
|
|
2693
|
+
className: "h-4 w-4"
|
|
2694
|
+
});
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
}, props));
|
|
2698
|
+
}
|
|
2699
|
+
Calendar.displayName = "Calendar";
|
|
2700
|
+
// src/components/atoms/ui/chart.tsx
|
|
2701
|
+
var import_recharts = require("recharts");
|
|
2702
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2703
|
+
var CHART_PALETTE = [
|
|
2704
|
+
"hsl(var(--chart-1))",
|
|
2705
|
+
"hsl(var(--chart-2))",
|
|
2706
|
+
"hsl(var(--chart-3))",
|
|
2707
|
+
"hsl(var(--chart-4))",
|
|
2708
|
+
"hsl(var(--chart-5))"
|
|
2709
|
+
];
|
|
2710
|
+
function Chart(param) {
|
|
2711
|
+
var className = param.className, _param_height = param.height, height = _param_height === void 0 ? 300 : _param_height, children = param.children;
|
|
2712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", {
|
|
2713
|
+
className: cn("w-full", className),
|
|
2714
|
+
style: {
|
|
2715
|
+
height: height
|
|
2716
|
+
},
|
|
2717
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_recharts.ResponsiveContainer, {
|
|
2718
|
+
width: "100%",
|
|
2719
|
+
height: "100%",
|
|
2720
|
+
children: children
|
|
2721
|
+
})
|
|
2722
|
+
});
|
|
2723
|
+
}
|
|
2724
|
+
Chart.displayName = "Chart";
|
|
2725
|
+
function themedChartAxes(x) {
|
|
2726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, {
|
|
2727
|
+
children: [
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_recharts.CartesianGrid, {
|
|
2729
|
+
strokeDasharray: "3 3",
|
|
2730
|
+
className: "stroke-border"
|
|
2731
|
+
}),
|
|
2732
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_recharts.XAxis, {
|
|
2733
|
+
dataKey: x,
|
|
2734
|
+
className: "text-xs"
|
|
2735
|
+
}),
|
|
2736
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_recharts.YAxis, {
|
|
2737
|
+
className: "text-xs"
|
|
2738
|
+
}),
|
|
2739
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_recharts.Tooltip, {}),
|
|
2740
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_recharts.Legend, {})
|
|
2741
|
+
]
|
|
2742
|
+
});
|
|
2743
|
+
}
|
|
2505
2744
|
// src/components/templates/messages-window.tsx
|
|
2506
2745
|
var import_react4 = require("react");
|
|
2507
|
-
var
|
|
2746
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2508
2747
|
var MessagesWindow = (0, import_react4.forwardRef)(function(_param, ref) {
|
|
2509
2748
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2510
2749
|
"className"
|
|
2511
2750
|
]);
|
|
2512
|
-
return /* @__PURE__ */ (0,
|
|
2751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", _object_spread({
|
|
2513
2752
|
className: cn(className, "alq--messages--window")
|
|
2514
2753
|
}, props));
|
|
2515
2754
|
});
|
|
2516
2755
|
MessagesWindow.displayName = "MessagesWindow";
|
|
2517
2756
|
// src/components/templates/query-box.tsx
|
|
2518
2757
|
var import_react5 = require("react");
|
|
2519
|
-
var
|
|
2758
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2520
2759
|
var QueryBox = (0, import_react5.forwardRef)(function(_param, ref) {
|
|
2521
2760
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2522
2761
|
"className"
|
|
2523
2762
|
]);
|
|
2524
|
-
return /* @__PURE__ */ (0,
|
|
2763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", _object_spread({
|
|
2525
2764
|
className: cn(className, "alq--querybox")
|
|
2526
2765
|
}, props));
|
|
2527
2766
|
});
|
|
2528
2767
|
QueryBox.displayName = "QueryBox";
|
|
2529
2768
|
// src/components/templates/hero/index.tsx
|
|
2530
2769
|
var import_react6 = require("react");
|
|
2531
|
-
var
|
|
2770
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2532
2771
|
var Hero = (0, import_react6.forwardRef)(function(_param, ref) {
|
|
2533
2772
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
2534
2773
|
"className",
|
|
2535
2774
|
"children"
|
|
2536
2775
|
]);
|
|
2537
|
-
return /* @__PURE__ */ (0,
|
|
2776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", _object_spread_props(_object_spread({
|
|
2538
2777
|
ref: ref,
|
|
2539
2778
|
className: cn("alq--hero-container", "grid", className)
|
|
2540
2779
|
}, props), {
|
|
@@ -2546,7 +2785,7 @@ var HeroContent = (0, import_react6.forwardRef)(function(_param, ref) {
|
|
|
2546
2785
|
"className",
|
|
2547
2786
|
"children"
|
|
2548
2787
|
]);
|
|
2549
|
-
return /* @__PURE__ */ (0,
|
|
2788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", _object_spread_props(_object_spread({
|
|
2550
2789
|
ref: ref,
|
|
2551
2790
|
className: cn("alq--hero-container", className)
|
|
2552
2791
|
}, props), {
|
|
@@ -2556,72 +2795,72 @@ var HeroContent = (0, import_react6.forwardRef)(function(_param, ref) {
|
|
|
2556
2795
|
Hero.displayName = "Hero";
|
|
2557
2796
|
HeroContent.displayName = "HeroContent";
|
|
2558
2797
|
// src/components/templates/cards/with-image-heading-description.tsx
|
|
2559
|
-
var
|
|
2798
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2560
2799
|
var CardWithImageHeadingDescriptionVertical = function(props) {
|
|
2561
2800
|
var showBorder = props.showBorder, image = props.image, heading = props.heading, description = props.description;
|
|
2562
|
-
return /* @__PURE__ */ (0,
|
|
2801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Card, {
|
|
2563
2802
|
className: cn("w-[360px]", !showBorder && "border-none shadow-none"),
|
|
2564
2803
|
children: [
|
|
2565
2804
|
image,
|
|
2566
|
-
/* @__PURE__ */ (0,
|
|
2805
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(CardHeader, {
|
|
2567
2806
|
children: [
|
|
2568
|
-
/* @__PURE__ */ (0,
|
|
2807
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CardTitle, {
|
|
2569
2808
|
children: heading
|
|
2570
2809
|
}),
|
|
2571
|
-
/* @__PURE__ */ (0,
|
|
2810
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Typography, {
|
|
2572
2811
|
typeStyle: "small",
|
|
2573
2812
|
className: "text-font-weak-color",
|
|
2574
2813
|
children: description
|
|
2575
2814
|
})
|
|
2576
2815
|
]
|
|
2577
2816
|
}),
|
|
2578
|
-
/* @__PURE__ */ (0,
|
|
2817
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CardContent, {})
|
|
2579
2818
|
]
|
|
2580
2819
|
});
|
|
2581
2820
|
};
|
|
2582
2821
|
var CardImageWithHeadingAndDescriptionHorizontal = function(props) {
|
|
2583
2822
|
var showBorder = props.showBorder, image = props.image, heading = props.heading, description = props.description;
|
|
2584
|
-
return /* @__PURE__ */ (0,
|
|
2823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Card, {
|
|
2585
2824
|
className: cn("lg:w-[600px] w-[360px] lg:flex lg:h-[150px]", !showBorder && "border-none shadow-none "),
|
|
2586
2825
|
children: [
|
|
2587
2826
|
image,
|
|
2588
|
-
/* @__PURE__ */ (0,
|
|
2827
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(CardHeader, {
|
|
2589
2828
|
children: [
|
|
2590
|
-
/* @__PURE__ */ (0,
|
|
2829
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CardTitle, {
|
|
2591
2830
|
children: heading
|
|
2592
2831
|
}),
|
|
2593
|
-
/* @__PURE__ */ (0,
|
|
2832
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Typography, {
|
|
2594
2833
|
typeStyle: "small",
|
|
2595
2834
|
className: "text-font-weak-color",
|
|
2596
2835
|
children: description
|
|
2597
2836
|
})
|
|
2598
2837
|
]
|
|
2599
2838
|
}),
|
|
2600
|
-
/* @__PURE__ */ (0,
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CardContent, {})
|
|
2601
2840
|
]
|
|
2602
2841
|
});
|
|
2603
2842
|
};
|
|
2604
2843
|
// src/components/templates/cards/with-image-heading-description-avatar.tsx
|
|
2605
|
-
var
|
|
2844
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2606
2845
|
var AvatarInfo = function(props) {
|
|
2607
2846
|
var userName = props.userName, email = props.email, avatarImage = props.avatarImage;
|
|
2608
|
-
return /* @__PURE__ */ (0,
|
|
2847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", {
|
|
2609
2848
|
className: "flex space-x-2 items-center",
|
|
2610
2849
|
children: [
|
|
2611
|
-
/* @__PURE__ */ (0,
|
|
2850
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Avatar, {
|
|
2612
2851
|
className: "w-16 h-16",
|
|
2613
|
-
children: /* @__PURE__ */ (0,
|
|
2852
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AvatarImage, {
|
|
2614
2853
|
src: avatarImage
|
|
2615
2854
|
})
|
|
2616
2855
|
}),
|
|
2617
|
-
/* @__PURE__ */ (0,
|
|
2856
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", {
|
|
2618
2857
|
children: [
|
|
2619
|
-
/* @__PURE__ */ (0,
|
|
2858
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Typography, {
|
|
2620
2859
|
typeStyle: "small",
|
|
2621
2860
|
className: "font-semibold",
|
|
2622
2861
|
children: userName
|
|
2623
2862
|
}),
|
|
2624
|
-
/* @__PURE__ */ (0,
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Typography, {
|
|
2625
2864
|
typeStyle: "tiny",
|
|
2626
2865
|
className: "text-font-weak-color",
|
|
2627
2866
|
children: email
|
|
@@ -2633,50 +2872,50 @@ var AvatarInfo = function(props) {
|
|
|
2633
2872
|
};
|
|
2634
2873
|
var CardWithImageHeadingDescriptionAvatarVertical = function(props) {
|
|
2635
2874
|
var showBorder = props.showBorder, image = props.image, heading = props.heading, description = props.description;
|
|
2636
|
-
return /* @__PURE__ */ (0,
|
|
2875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Card, {
|
|
2637
2876
|
className: cn("w-[360px]", !showBorder && "border-none shadow-none"),
|
|
2638
2877
|
children: [
|
|
2639
2878
|
image,
|
|
2640
|
-
/* @__PURE__ */ (0,
|
|
2879
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(CardHeader, {
|
|
2641
2880
|
children: [
|
|
2642
|
-
/* @__PURE__ */ (0,
|
|
2881
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CardTitle, {
|
|
2643
2882
|
children: heading
|
|
2644
2883
|
}),
|
|
2645
|
-
/* @__PURE__ */ (0,
|
|
2884
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Typography, {
|
|
2646
2885
|
typeStyle: "small",
|
|
2647
2886
|
className: "text-font-weak-color",
|
|
2648
2887
|
children: description
|
|
2649
2888
|
})
|
|
2650
2889
|
]
|
|
2651
2890
|
}),
|
|
2652
|
-
/* @__PURE__ */ (0,
|
|
2653
|
-
children: /* @__PURE__ */ (0,
|
|
2891
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CardContent, {
|
|
2892
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AvatarInfo, _object_spread({}, props))
|
|
2654
2893
|
})
|
|
2655
2894
|
]
|
|
2656
2895
|
});
|
|
2657
2896
|
};
|
|
2658
2897
|
var CardImageWithHeadingAndDescriptionAvatarHorizontal = function(props) {
|
|
2659
2898
|
var showBorder = props.showBorder, image = props.image, heading = props.heading, description = props.description;
|
|
2660
|
-
return /* @__PURE__ */ (0,
|
|
2899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Card, {
|
|
2661
2900
|
className: cn("lg:w-[600px] w-[360px] lg:flex lg:h-[246px]", !showBorder && "border-none shadow-none "),
|
|
2662
2901
|
children: [
|
|
2663
2902
|
image,
|
|
2664
|
-
/* @__PURE__ */ (0,
|
|
2903
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", {
|
|
2665
2904
|
children: [
|
|
2666
|
-
/* @__PURE__ */ (0,
|
|
2905
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(CardHeader, {
|
|
2667
2906
|
children: [
|
|
2668
|
-
/* @__PURE__ */ (0,
|
|
2907
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CardTitle, {
|
|
2669
2908
|
children: heading
|
|
2670
2909
|
}),
|
|
2671
|
-
/* @__PURE__ */ (0,
|
|
2910
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Typography, {
|
|
2672
2911
|
typeStyle: "small",
|
|
2673
2912
|
className: "text-font-weak-color",
|
|
2674
2913
|
children: description
|
|
2675
2914
|
})
|
|
2676
2915
|
]
|
|
2677
2916
|
}),
|
|
2678
|
-
/* @__PURE__ */ (0,
|
|
2679
|
-
children: /* @__PURE__ */ (0,
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CardContent, {
|
|
2918
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AvatarInfo, _object_spread({}, props))
|
|
2680
2919
|
})
|
|
2681
2920
|
]
|
|
2682
2921
|
})
|
|
@@ -2685,8 +2924,8 @@ var CardImageWithHeadingAndDescriptionAvatarHorizontal = function(props) {
|
|
|
2685
2924
|
};
|
|
2686
2925
|
// src/components/organisms/whisper.tsx
|
|
2687
2926
|
var import_react7 = require("react");
|
|
2688
|
-
var
|
|
2689
|
-
var
|
|
2927
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2928
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2690
2929
|
function Whisper(param) {
|
|
2691
2930
|
var className = param.className, message = param.message, isMessageStreaming = param.isMessageStreaming, textToSpeech = param.textToSpeech;
|
|
2692
2931
|
var _ref = _sliced_to_array((0, import_react7.useState)(null), 2), audioUrl = _ref[0], setAudioUrl = _ref[1];
|
|
@@ -2837,39 +3076,39 @@ function Whisper(param) {
|
|
|
2837
3076
|
return _ref.apply(this, arguments);
|
|
2838
3077
|
};
|
|
2839
3078
|
}();
|
|
2840
|
-
return /* @__PURE__ */ (0,
|
|
3079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", {
|
|
2841
3080
|
className: cn(className),
|
|
2842
3081
|
children: [
|
|
2843
|
-
isMessageStreaming && /* @__PURE__ */ (0,
|
|
3082
|
+
isMessageStreaming && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", {
|
|
2844
3083
|
className: "p-2 w-[24px] h-[24px]"
|
|
2845
3084
|
}),
|
|
2846
|
-
!isMessageStreaming && /* @__PURE__ */ (0,
|
|
3085
|
+
!isMessageStreaming && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", {
|
|
2847
3086
|
onClick: function() {
|
|
2848
3087
|
return handleTextToSpeech(content);
|
|
2849
3088
|
},
|
|
2850
3089
|
children: [
|
|
2851
|
-
isPlaying && /* @__PURE__ */ (0,
|
|
3090
|
+
isPlaying && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", {
|
|
2852
3091
|
className: "p-2 items-center justify-center",
|
|
2853
|
-
children: /* @__PURE__ */ (0,
|
|
3092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react11.AudioLinesIcon, {
|
|
2854
3093
|
size: 20,
|
|
2855
3094
|
className: "animate-[wave_0.7s_infinite_ease-in-out]"
|
|
2856
3095
|
})
|
|
2857
3096
|
}),
|
|
2858
|
-
isLoading && /* @__PURE__ */ (0,
|
|
3097
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("button", {
|
|
2859
3098
|
disabled: true,
|
|
2860
3099
|
className: "p-2 items-center justify-center",
|
|
2861
3100
|
children: [
|
|
2862
3101
|
" ",
|
|
2863
|
-
/* @__PURE__ */ (0,
|
|
3102
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react11.LoaderCircleIcon, {
|
|
2864
3103
|
size: 20,
|
|
2865
3104
|
className: "animate-[spin_1s_linear_infinite]"
|
|
2866
3105
|
})
|
|
2867
3106
|
]
|
|
2868
3107
|
}),
|
|
2869
|
-
!isLoading && !isPlaying && /* @__PURE__ */ (0,
|
|
3108
|
+
!isLoading && !isPlaying && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("button", {
|
|
2870
3109
|
disabled: isLoading,
|
|
2871
3110
|
className: "p-2 items-center justify-center",
|
|
2872
|
-
children: /* @__PURE__ */ (0,
|
|
3111
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react11.PlayCircleIcon, {
|
|
2873
3112
|
size: 20
|
|
2874
3113
|
})
|
|
2875
3114
|
})
|
|
@@ -2880,7 +3119,7 @@ function Whisper(param) {
|
|
|
2880
3119
|
}
|
|
2881
3120
|
// src/components/organisms/speechToText.tsx
|
|
2882
3121
|
var import_react8 = require("react");
|
|
2883
|
-
var
|
|
3122
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2884
3123
|
function SpeechToText(_param) {
|
|
2885
3124
|
var className = _param.className, speechToText = _param.speechToText, RecordAudioIcon = _param.RecordAudioIcon, IdleAudioIcon = _param.IdleAudioIcon, handleReplaceInput = _param.handleReplaceInput, setIsAudioRecording = _param.setIsAudioRecording, onSendAudio = _param.onSendAudio, props = _object_without_properties(_param, [
|
|
2886
3125
|
"className",
|
|
@@ -3029,10 +3268,10 @@ function SpeechToText(_param) {
|
|
|
3029
3268
|
}
|
|
3030
3269
|
};
|
|
3031
3270
|
var recordIcons = isRecording ? RecordAudioIcon : IdleAudioIcon;
|
|
3032
|
-
return /* @__PURE__ */ (0,
|
|
3271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", _object_spread_props(_object_spread({
|
|
3033
3272
|
className: cn(className)
|
|
3034
3273
|
}, props), {
|
|
3035
|
-
children: /* @__PURE__ */ (0,
|
|
3274
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("button", {
|
|
3036
3275
|
disabled: isLoading,
|
|
3037
3276
|
type: "button",
|
|
3038
3277
|
onClick: handleRecordButtonClick,
|
|
@@ -3041,34 +3280,34 @@ function SpeechToText(_param) {
|
|
|
3041
3280
|
}));
|
|
3042
3281
|
}
|
|
3043
3282
|
// src/components/organisms/assistant.tsx
|
|
3044
|
-
var
|
|
3283
|
+
var React37 = __toESM(require("react"));
|
|
3045
3284
|
var import_react13 = require("react");
|
|
3046
3285
|
// src/components/molecules/page-container.tsx
|
|
3047
3286
|
var import_react9 = require("react");
|
|
3048
|
-
var
|
|
3287
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3049
3288
|
var PageContainer = (0, import_react9.forwardRef)(function(_param, ref) {
|
|
3050
3289
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
3051
3290
|
"className"
|
|
3052
3291
|
]);
|
|
3053
|
-
return /* @__PURE__ */ (0,
|
|
3292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", _object_spread({
|
|
3054
3293
|
ref: ref,
|
|
3055
3294
|
className: cn(className, "alq--page-container")
|
|
3056
3295
|
}, props));
|
|
3057
3296
|
});
|
|
3058
3297
|
PageContainer.displayName = "PageContainer";
|
|
3059
3298
|
// src/components/molecules/assistant-button.tsx
|
|
3060
|
-
var
|
|
3299
|
+
var React29 = __toESM(require("react"));
|
|
3061
3300
|
var import_react10 = require("react");
|
|
3062
|
-
var
|
|
3063
|
-
var AssistantSuggestions =
|
|
3301
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3302
|
+
var AssistantSuggestions = React29.forwardRef(function(param, ref) {
|
|
3064
3303
|
var suggestions = param.suggestions, showSuggestions = param.showSuggestions, className = param.className;
|
|
3065
|
-
return /* @__PURE__ */ (0,
|
|
3304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", {
|
|
3066
3305
|
ref: ref,
|
|
3067
3306
|
className: cn("absolute bottom-[calc(100%+0.5rem)] right-0 pb-2 mb-4 alq--assistant-suggestions-container", "transition-all duration-300", showSuggestions ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4", className),
|
|
3068
|
-
children: /* @__PURE__ */ (0,
|
|
3307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", {
|
|
3069
3308
|
className: "rounded-lg p-2 pr-0 w-64",
|
|
3070
3309
|
children: suggestions.map(function(suggestion, index) {
|
|
3071
|
-
return /* @__PURE__ */ (0,
|
|
3310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("button", {
|
|
3072
3311
|
onClick: function() {
|
|
3073
3312
|
var _suggestion_action;
|
|
3074
3313
|
return (_suggestion_action = suggestion.action) === null || _suggestion_action === void 0 ? void 0 : _suggestion_action.call(suggestion);
|
|
@@ -3078,10 +3317,10 @@ var AssistantSuggestions = React26.forwardRef(function(param, ref) {
|
|
|
3078
3317
|
},
|
|
3079
3318
|
className: cn("bg-background flex items-center gap-2 border p-2 pr-4 my-2 rounded-full ml-auto", "text-primary hover:bg-secondary", "transition-all duration-100", "origin-bottom w-fit", "alq--assistant-suggestion", showSuggestions ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4"),
|
|
3080
3319
|
children: [
|
|
3081
|
-
/* @__PURE__ */ (0,
|
|
3320
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(suggestion.icon, {
|
|
3082
3321
|
className: "w-5 h-5 text-primary"
|
|
3083
3322
|
}),
|
|
3084
|
-
/* @__PURE__ */ (0,
|
|
3323
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", {
|
|
3085
3324
|
className: "text-xs whitespace-nowrap font-normal",
|
|
3086
3325
|
children: suggestion.label
|
|
3087
3326
|
})
|
|
@@ -3092,7 +3331,7 @@ var AssistantSuggestions = React26.forwardRef(function(param, ref) {
|
|
|
3092
3331
|
});
|
|
3093
3332
|
});
|
|
3094
3333
|
AssistantSuggestions.displayName = "Suggestions";
|
|
3095
|
-
var AssistantButton =
|
|
3334
|
+
var AssistantButton = React29.forwardRef(function(param, ref) {
|
|
3096
3335
|
var Icon2 = param.icon, clickAction = param.clickAction, className = param.className, _param_suggestions = param.suggestions, suggestions = _param_suggestions === void 0 ? [] : _param_suggestions;
|
|
3097
3336
|
var _ref = _sliced_to_array((0, import_react10.useState)(false), 2), isVisible = _ref[0], setIsVisible = _ref[1];
|
|
3098
3337
|
var _ref1 = _sliced_to_array((0, import_react10.useState)(false), 2), showSuggestions = _ref1[0], setShowSuggestions = _ref1[1];
|
|
@@ -3110,24 +3349,24 @@ var AssistantButton = React26.forwardRef(function(param, ref) {
|
|
|
3110
3349
|
return setIsVisible(false);
|
|
3111
3350
|
}, 300);
|
|
3112
3351
|
};
|
|
3113
|
-
return /* @__PURE__ */ (0,
|
|
3352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", {
|
|
3114
3353
|
ref: ref,
|
|
3115
3354
|
className: cn("fixed bottom-8 right-4 z-50", "alq--assistant-button-container", className),
|
|
3116
3355
|
onMouseEnter: handleMouseEnter,
|
|
3117
3356
|
onMouseLeave: handleMouseLeave,
|
|
3118
|
-
children: /* @__PURE__ */ (0,
|
|
3357
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", {
|
|
3119
3358
|
className: "relative group",
|
|
3120
3359
|
children: [
|
|
3121
|
-
isVisible && suggestions.length > 0 && /* @__PURE__ */ (0,
|
|
3360
|
+
isVisible && suggestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(AssistantSuggestions, {
|
|
3122
3361
|
suggestions: suggestions,
|
|
3123
3362
|
showSuggestions: showSuggestions
|
|
3124
3363
|
}),
|
|
3125
|
-
/* @__PURE__ */ (0,
|
|
3364
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Button, {
|
|
3126
3365
|
variant: "outline",
|
|
3127
3366
|
size: "sm",
|
|
3128
3367
|
className: cn("fixed hover:bg-opacity-70 transition-all duration-300", "bottom-4 h-12 w-12 right-4 z-50 rounded-full p-2", "shadow-md", "hover:shadow-lg", showSuggestions ? "scale-110" : "hover:scale-105", "alq--assistant-button"),
|
|
3129
3368
|
onClick: clickAction,
|
|
3130
|
-
children: /* @__PURE__ */ (0,
|
|
3369
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon2, {
|
|
3131
3370
|
style: {
|
|
3132
3371
|
width: "22px",
|
|
3133
3372
|
height: "22px"
|
|
@@ -3141,19 +3380,19 @@ var AssistantButton = React26.forwardRef(function(param, ref) {
|
|
|
3141
3380
|
});
|
|
3142
3381
|
AssistantButton.displayName = "AssistantButton";
|
|
3143
3382
|
// src/components/molecules/carousel.tsx
|
|
3144
|
-
var
|
|
3383
|
+
var React30 = __toESM(require("react"));
|
|
3145
3384
|
var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
|
|
3146
|
-
var
|
|
3147
|
-
var
|
|
3148
|
-
var CarouselContext =
|
|
3385
|
+
var import_lucide_react12 = require("lucide-react");
|
|
3386
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3387
|
+
var CarouselContext = React30.createContext(null);
|
|
3149
3388
|
function useCarousel() {
|
|
3150
|
-
var context =
|
|
3389
|
+
var context = React30.useContext(CarouselContext);
|
|
3151
3390
|
if (!context) {
|
|
3152
3391
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
3153
3392
|
}
|
|
3154
3393
|
return context;
|
|
3155
3394
|
}
|
|
3156
|
-
var Carousel =
|
|
3395
|
+
var Carousel = React30.forwardRef(function(_param, ref) {
|
|
3157
3396
|
var _param_orientation = _param.orientation, orientation = _param_orientation === void 0 ? "horizontal" : _param_orientation, opts = _param.opts, setApi = _param.setApi, plugins = _param.plugins, className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
3158
3397
|
"orientation",
|
|
3159
3398
|
"opts",
|
|
@@ -3165,26 +3404,26 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
3165
3404
|
var _ref = _sliced_to_array((0, import_embla_carousel_react.default)(_object_spread_props(_object_spread({}, opts), {
|
|
3166
3405
|
axis: orientation === "horizontal" ? "x" : "y"
|
|
3167
3406
|
}), plugins), 2), carouselRef = _ref[0], api = _ref[1];
|
|
3168
|
-
var
|
|
3169
|
-
var
|
|
3170
|
-
var onSelect =
|
|
3407
|
+
var _React30_useState = _sliced_to_array(React30.useState(false), 2), canScrollPrev = _React30_useState[0], setCanScrollPrev = _React30_useState[1];
|
|
3408
|
+
var _React30_useState1 = _sliced_to_array(React30.useState(false), 2), canScrollNext = _React30_useState1[0], setCanScrollNext = _React30_useState1[1];
|
|
3409
|
+
var onSelect = React30.useCallback(function(api2) {
|
|
3171
3410
|
if (!api2) {
|
|
3172
3411
|
return;
|
|
3173
3412
|
}
|
|
3174
3413
|
setCanScrollPrev(api2.canScrollPrev());
|
|
3175
3414
|
setCanScrollNext(api2.canScrollNext());
|
|
3176
3415
|
}, []);
|
|
3177
|
-
var scrollPrev =
|
|
3416
|
+
var scrollPrev = React30.useCallback(function() {
|
|
3178
3417
|
api === null || api === void 0 ? void 0 : api.scrollPrev();
|
|
3179
3418
|
}, [
|
|
3180
3419
|
api
|
|
3181
3420
|
]);
|
|
3182
|
-
var scrollNext =
|
|
3421
|
+
var scrollNext = React30.useCallback(function() {
|
|
3183
3422
|
api === null || api === void 0 ? void 0 : api.scrollNext();
|
|
3184
3423
|
}, [
|
|
3185
3424
|
api
|
|
3186
3425
|
]);
|
|
3187
|
-
var handleKeyDown =
|
|
3426
|
+
var handleKeyDown = React30.useCallback(function(event) {
|
|
3188
3427
|
if (event.key === "ArrowLeft") {
|
|
3189
3428
|
event.preventDefault();
|
|
3190
3429
|
scrollPrev();
|
|
@@ -3196,7 +3435,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
3196
3435
|
scrollPrev,
|
|
3197
3436
|
scrollNext
|
|
3198
3437
|
]);
|
|
3199
|
-
|
|
3438
|
+
React30.useEffect(function() {
|
|
3200
3439
|
if (!api || !setApi) {
|
|
3201
3440
|
return;
|
|
3202
3441
|
}
|
|
@@ -3205,7 +3444,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
3205
3444
|
api,
|
|
3206
3445
|
setApi
|
|
3207
3446
|
]);
|
|
3208
|
-
|
|
3447
|
+
React30.useEffect(function() {
|
|
3209
3448
|
if (!api) {
|
|
3210
3449
|
return;
|
|
3211
3450
|
}
|
|
@@ -3219,7 +3458,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
3219
3458
|
api,
|
|
3220
3459
|
onSelect
|
|
3221
3460
|
]);
|
|
3222
|
-
return /* @__PURE__ */ (0,
|
|
3461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CarouselContext.Provider, {
|
|
3223
3462
|
value: {
|
|
3224
3463
|
carouselRef: carouselRef,
|
|
3225
3464
|
api: api,
|
|
@@ -3230,7 +3469,7 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
3230
3469
|
canScrollPrev: canScrollPrev,
|
|
3231
3470
|
canScrollNext: canScrollNext
|
|
3232
3471
|
},
|
|
3233
|
-
children: /* @__PURE__ */ (0,
|
|
3472
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", _object_spread_props(_object_spread({
|
|
3234
3473
|
ref: ref,
|
|
3235
3474
|
onKeyDownCapture: handleKeyDown,
|
|
3236
3475
|
className: cn("relative", className),
|
|
@@ -3242,27 +3481,27 @@ var Carousel = React27.forwardRef(function(_param, ref) {
|
|
|
3242
3481
|
});
|
|
3243
3482
|
});
|
|
3244
3483
|
Carousel.displayName = "Carousel";
|
|
3245
|
-
var CarouselContent =
|
|
3484
|
+
var CarouselContent = React30.forwardRef(function(_param, ref) {
|
|
3246
3485
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
3247
3486
|
"className"
|
|
3248
3487
|
]);
|
|
3249
3488
|
var _useCarousel = useCarousel(), carouselRef = _useCarousel.carouselRef, orientation = _useCarousel.orientation;
|
|
3250
|
-
return /* @__PURE__ */ (0,
|
|
3489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", {
|
|
3251
3490
|
ref: carouselRef,
|
|
3252
3491
|
className: "overflow-hidden",
|
|
3253
|
-
children: /* @__PURE__ */ (0,
|
|
3492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", _object_spread({
|
|
3254
3493
|
ref: ref,
|
|
3255
3494
|
className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className)
|
|
3256
3495
|
}, props))
|
|
3257
3496
|
});
|
|
3258
3497
|
});
|
|
3259
3498
|
CarouselContent.displayName = "CarouselContent";
|
|
3260
|
-
var CarouselItem =
|
|
3499
|
+
var CarouselItem = React30.forwardRef(function(_param, ref) {
|
|
3261
3500
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
3262
3501
|
"className"
|
|
3263
3502
|
]);
|
|
3264
3503
|
var orientation = useCarousel().orientation;
|
|
3265
|
-
return /* @__PURE__ */ (0,
|
|
3504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", _object_spread({
|
|
3266
3505
|
ref: ref,
|
|
3267
3506
|
role: "group",
|
|
3268
3507
|
"aria-roledescription": "slide",
|
|
@@ -3270,14 +3509,14 @@ var CarouselItem = React27.forwardRef(function(_param, ref) {
|
|
|
3270
3509
|
}, props));
|
|
3271
3510
|
});
|
|
3272
3511
|
CarouselItem.displayName = "CarouselItem";
|
|
3273
|
-
var CarouselPrevious =
|
|
3512
|
+
var CarouselPrevious = React30.forwardRef(function(_param, ref) {
|
|
3274
3513
|
var className = _param.className, _param_variant = _param.variant, variant = _param_variant === void 0 ? "outline" : _param_variant, _param_size = _param.size, size = _param_size === void 0 ? "icon" : _param_size, props = _object_without_properties(_param, [
|
|
3275
3514
|
"className",
|
|
3276
3515
|
"variant",
|
|
3277
3516
|
"size"
|
|
3278
3517
|
]);
|
|
3279
3518
|
var _useCarousel = useCarousel(), orientation = _useCarousel.orientation, scrollPrev = _useCarousel.scrollPrev, canScrollPrev = _useCarousel.canScrollPrev;
|
|
3280
|
-
return /* @__PURE__ */ (0,
|
|
3519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Button, _object_spread_props(_object_spread({
|
|
3281
3520
|
ref: ref,
|
|
3282
3521
|
variant: variant,
|
|
3283
3522
|
size: size,
|
|
@@ -3286,10 +3525,10 @@ var CarouselPrevious = React27.forwardRef(function(_param, ref) {
|
|
|
3286
3525
|
onClick: scrollPrev
|
|
3287
3526
|
}, props), {
|
|
3288
3527
|
children: [
|
|
3289
|
-
/* @__PURE__ */ (0,
|
|
3528
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.ArrowLeft, {
|
|
3290
3529
|
className: "h-4 w-4"
|
|
3291
3530
|
}),
|
|
3292
|
-
/* @__PURE__ */ (0,
|
|
3531
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", {
|
|
3293
3532
|
className: "sr-only",
|
|
3294
3533
|
children: "Previous slide"
|
|
3295
3534
|
})
|
|
@@ -3297,14 +3536,14 @@ var CarouselPrevious = React27.forwardRef(function(_param, ref) {
|
|
|
3297
3536
|
}));
|
|
3298
3537
|
});
|
|
3299
3538
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
3300
|
-
var CarouselNext =
|
|
3539
|
+
var CarouselNext = React30.forwardRef(function(_param, ref) {
|
|
3301
3540
|
var className = _param.className, _param_variant = _param.variant, variant = _param_variant === void 0 ? "outline" : _param_variant, _param_size = _param.size, size = _param_size === void 0 ? "icon" : _param_size, props = _object_without_properties(_param, [
|
|
3302
3541
|
"className",
|
|
3303
3542
|
"variant",
|
|
3304
3543
|
"size"
|
|
3305
3544
|
]);
|
|
3306
3545
|
var _useCarousel = useCarousel(), orientation = _useCarousel.orientation, scrollNext = _useCarousel.scrollNext, canScrollNext = _useCarousel.canScrollNext;
|
|
3307
|
-
return /* @__PURE__ */ (0,
|
|
3546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Button, _object_spread_props(_object_spread({
|
|
3308
3547
|
ref: ref,
|
|
3309
3548
|
variant: variant,
|
|
3310
3549
|
size: size,
|
|
@@ -3313,10 +3552,10 @@ var CarouselNext = React27.forwardRef(function(_param, ref) {
|
|
|
3313
3552
|
onClick: scrollNext
|
|
3314
3553
|
}, props), {
|
|
3315
3554
|
children: [
|
|
3316
|
-
/* @__PURE__ */ (0,
|
|
3555
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.ArrowRight, {
|
|
3317
3556
|
className: "h-4 w-4"
|
|
3318
3557
|
}),
|
|
3319
|
-
/* @__PURE__ */ (0,
|
|
3558
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", {
|
|
3320
3559
|
className: "sr-only",
|
|
3321
3560
|
children: "Next slide"
|
|
3322
3561
|
})
|
|
@@ -3325,32 +3564,32 @@ var CarouselNext = React27.forwardRef(function(_param, ref) {
|
|
|
3325
3564
|
});
|
|
3326
3565
|
CarouselNext.displayName = "CarouselNext";
|
|
3327
3566
|
// src/components/molecules/navigation-menu.tsx
|
|
3328
|
-
var
|
|
3567
|
+
var React31 = __toESM(require("react"));
|
|
3329
3568
|
var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"));
|
|
3330
3569
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
3331
|
-
var
|
|
3332
|
-
var
|
|
3333
|
-
var NavigationMenu =
|
|
3570
|
+
var import_lucide_react13 = require("lucide-react");
|
|
3571
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3572
|
+
var NavigationMenu = React31.forwardRef(function(_param, ref) {
|
|
3334
3573
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
3335
3574
|
"className",
|
|
3336
3575
|
"children"
|
|
3337
3576
|
]);
|
|
3338
|
-
return /* @__PURE__ */ (0,
|
|
3577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(NavigationMenuPrimitive.Root, _object_spread_props(_object_spread({
|
|
3339
3578
|
ref: ref,
|
|
3340
3579
|
className: cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className)
|
|
3341
3580
|
}, props), {
|
|
3342
3581
|
children: [
|
|
3343
3582
|
children,
|
|
3344
|
-
/* @__PURE__ */ (0,
|
|
3583
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(NavigationMenuViewport, {})
|
|
3345
3584
|
]
|
|
3346
3585
|
}));
|
|
3347
3586
|
});
|
|
3348
3587
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
3349
|
-
var NavigationMenuList =
|
|
3588
|
+
var NavigationMenuList = React31.forwardRef(function(_param, ref) {
|
|
3350
3589
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
3351
3590
|
"className"
|
|
3352
3591
|
]);
|
|
3353
|
-
return /* @__PURE__ */ (0,
|
|
3592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(NavigationMenuPrimitive.List, _object_spread({
|
|
3354
3593
|
ref: ref,
|
|
3355
3594
|
className: cn("group flex flex-1 list-none items-center justify-center space-x-1", className)
|
|
3356
3595
|
}, props));
|
|
@@ -3358,19 +3597,19 @@ var NavigationMenuList = React28.forwardRef(function(_param, ref) {
|
|
|
3358
3597
|
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
3359
3598
|
var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
3360
3599
|
var navigationMenuTriggerStyle = (0, import_class_variance_authority9.cva)("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");
|
|
3361
|
-
var NavigationMenuTrigger =
|
|
3600
|
+
var NavigationMenuTrigger = React31.forwardRef(function(_param, ref) {
|
|
3362
3601
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
3363
3602
|
"className",
|
|
3364
3603
|
"children"
|
|
3365
3604
|
]);
|
|
3366
|
-
return /* @__PURE__ */ (0,
|
|
3605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(NavigationMenuPrimitive.Trigger, _object_spread_props(_object_spread({
|
|
3367
3606
|
ref: ref,
|
|
3368
3607
|
className: cn(navigationMenuTriggerStyle(), "group", className)
|
|
3369
3608
|
}, props), {
|
|
3370
3609
|
children: [
|
|
3371
3610
|
children,
|
|
3372
3611
|
" ",
|
|
3373
|
-
/* @__PURE__ */ (0,
|
|
3612
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react13.ChevronDown, {
|
|
3374
3613
|
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
|
|
3375
3614
|
"aria-hidden": "true"
|
|
3376
3615
|
})
|
|
@@ -3378,48 +3617,48 @@ var NavigationMenuTrigger = React28.forwardRef(function(_param, ref) {
|
|
|
3378
3617
|
}));
|
|
3379
3618
|
});
|
|
3380
3619
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
3381
|
-
var NavigationMenuContent =
|
|
3620
|
+
var NavigationMenuContent = React31.forwardRef(function(_param, ref) {
|
|
3382
3621
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
3383
3622
|
"className"
|
|
3384
3623
|
]);
|
|
3385
|
-
return /* @__PURE__ */ (0,
|
|
3624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(NavigationMenuPrimitive.Content, _object_spread({
|
|
3386
3625
|
ref: ref,
|
|
3387
3626
|
className: cn("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", className)
|
|
3388
3627
|
}, props));
|
|
3389
3628
|
});
|
|
3390
3629
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
3391
3630
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
3392
|
-
var NavigationMenuViewport =
|
|
3631
|
+
var NavigationMenuViewport = React31.forwardRef(function(_param, ref) {
|
|
3393
3632
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
3394
3633
|
"className"
|
|
3395
3634
|
]);
|
|
3396
|
-
return /* @__PURE__ */ (0,
|
|
3635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", {
|
|
3397
3636
|
className: cn("absolute left-0 top-full flex justify-center"),
|
|
3398
|
-
children: /* @__PURE__ */ (0,
|
|
3637
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(NavigationMenuPrimitive.Viewport, _object_spread({
|
|
3399
3638
|
className: cn("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", className),
|
|
3400
3639
|
ref: ref
|
|
3401
3640
|
}, props))
|
|
3402
3641
|
});
|
|
3403
3642
|
});
|
|
3404
3643
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
3405
|
-
var NavigationMenuIndicator =
|
|
3644
|
+
var NavigationMenuIndicator = React31.forwardRef(function(_param, ref) {
|
|
3406
3645
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
3407
3646
|
"className"
|
|
3408
3647
|
]);
|
|
3409
|
-
return /* @__PURE__ */ (0,
|
|
3648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(NavigationMenuPrimitive.Indicator, _object_spread_props(_object_spread({
|
|
3410
3649
|
ref: ref,
|
|
3411
3650
|
className: cn("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", className)
|
|
3412
3651
|
}, props), {
|
|
3413
|
-
children: /* @__PURE__ */ (0,
|
|
3652
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", {
|
|
3414
3653
|
className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"
|
|
3415
3654
|
})
|
|
3416
3655
|
}));
|
|
3417
3656
|
});
|
|
3418
3657
|
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
3419
3658
|
// src/components/molecules/sidebar.tsx
|
|
3420
|
-
var
|
|
3659
|
+
var React32 = __toESM(require("react"));
|
|
3421
3660
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
3422
|
-
var
|
|
3661
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3423
3662
|
var sidebarVariants = (0, import_class_variance_authority10.cva)("flex flex-col border-r", {
|
|
3424
3663
|
variants: {
|
|
3425
3664
|
size: {
|
|
@@ -3432,12 +3671,12 @@ var sidebarVariants = (0, import_class_variance_authority10.cva)("flex flex-col
|
|
|
3432
3671
|
size: "default"
|
|
3433
3672
|
}
|
|
3434
3673
|
});
|
|
3435
|
-
var SidebarFooter =
|
|
3674
|
+
var SidebarFooter = React32.forwardRef(function(_param, ref) {
|
|
3436
3675
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
3437
3676
|
"className",
|
|
3438
3677
|
"children"
|
|
3439
3678
|
]);
|
|
3440
|
-
return /* @__PURE__ */ (0,
|
|
3679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", _object_spread_props(_object_spread({
|
|
3441
3680
|
ref: ref,
|
|
3442
3681
|
className: cn("p-4", className)
|
|
3443
3682
|
}, props), {
|
|
@@ -3445,7 +3684,7 @@ var SidebarFooter = React29.forwardRef(function(_param, ref) {
|
|
|
3445
3684
|
}));
|
|
3446
3685
|
});
|
|
3447
3686
|
SidebarFooter.displayName = "SidebarFooter";
|
|
3448
|
-
var Sidebar =
|
|
3687
|
+
var Sidebar = React32.forwardRef(function(_param, ref) {
|
|
3449
3688
|
var className = _param.className, items = _param.items, selectedSection = _param.selectedSection, onSelect = _param.onSelect, footerContent = _param.footerContent, _param_size = _param.size, size = _param_size === void 0 ? "default" : _param_size, _param_selectedVariant = _param.selectedVariant, selectedVariant = _param_selectedVariant === void 0 ? "secondary" : _param_selectedVariant, _param_defaultVariant = _param.defaultVariant, defaultVariant = _param_defaultVariant === void 0 ? "ghost" : _param_defaultVariant, buttonClassName = _param.buttonClassName, props = _object_without_properties(_param, [
|
|
3450
3689
|
"className",
|
|
3451
3690
|
"items",
|
|
@@ -3457,21 +3696,21 @@ var Sidebar = React29.forwardRef(function(_param, ref) {
|
|
|
3457
3696
|
"defaultVariant",
|
|
3458
3697
|
"buttonClassName"
|
|
3459
3698
|
]);
|
|
3460
|
-
return /* @__PURE__ */ (0,
|
|
3699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", _object_spread_props(_object_spread({
|
|
3461
3700
|
className: cn(className, "alq--navigation-sidebar h-full"),
|
|
3462
3701
|
ref: ref
|
|
3463
3702
|
}, props), {
|
|
3464
|
-
children: /* @__PURE__ */ (0,
|
|
3703
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("aside", {
|
|
3465
3704
|
className: cn(sidebarVariants({
|
|
3466
3705
|
size: size
|
|
3467
3706
|
}), "h-full"),
|
|
3468
3707
|
children: [
|
|
3469
|
-
/* @__PURE__ */ (0,
|
|
3708
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ScrollArea, {
|
|
3470
3709
|
className: "flex-grow justify-between",
|
|
3471
|
-
children: /* @__PURE__ */ (0,
|
|
3710
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", {
|
|
3472
3711
|
className: "flex flex-col gap-2 p-4",
|
|
3473
3712
|
children: items.map(function(item) {
|
|
3474
|
-
return /* @__PURE__ */ (0,
|
|
3713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Button, {
|
|
3475
3714
|
variant: (selectedSection === null || selectedSection === void 0 ? void 0 : selectedSection.name) === item.name ? selectedVariant : defaultVariant,
|
|
3476
3715
|
className: cn("justify-start", buttonClassName),
|
|
3477
3716
|
disabled: item.disabled,
|
|
@@ -3481,7 +3720,7 @@ var Sidebar = React29.forwardRef(function(_param, ref) {
|
|
|
3481
3720
|
}
|
|
3482
3721
|
},
|
|
3483
3722
|
children: [
|
|
3484
|
-
item.icon && /* @__PURE__ */ (0,
|
|
3723
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(item.icon, {
|
|
3485
3724
|
className: "mr-2 h-4 w-4"
|
|
3486
3725
|
}),
|
|
3487
3726
|
item.name
|
|
@@ -3490,7 +3729,7 @@ var Sidebar = React29.forwardRef(function(_param, ref) {
|
|
|
3490
3729
|
})
|
|
3491
3730
|
})
|
|
3492
3731
|
}),
|
|
3493
|
-
footerContent && /* @__PURE__ */ (0,
|
|
3732
|
+
footerContent && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SidebarFooter, {
|
|
3494
3733
|
children: footerContent
|
|
3495
3734
|
})
|
|
3496
3735
|
]
|
|
@@ -3509,11 +3748,11 @@ function useAlquimiaTheme() {
|
|
|
3509
3748
|
return (0, import_react11.useContext)(ThemeContext);
|
|
3510
3749
|
}
|
|
3511
3750
|
// src/components/molecules/sonner.tsx
|
|
3512
|
-
var
|
|
3751
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3513
3752
|
var Toaster2 = function(_param) {
|
|
3514
3753
|
var props = _extends({}, _object_destructuring_empty(_param));
|
|
3515
3754
|
var _useAlquimiaTheme = useAlquimiaTheme(), _useAlquimiaTheme_theme = _useAlquimiaTheme.theme, theme = _useAlquimiaTheme_theme === void 0 ? "system" : _useAlquimiaTheme_theme;
|
|
3516
|
-
return /* @__PURE__ */ (0,
|
|
3755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_sonner.Toaster, _object_spread({
|
|
3517
3756
|
theme: theme,
|
|
3518
3757
|
className: "toaster group",
|
|
3519
3758
|
toastOptions: {
|
|
@@ -3527,28 +3766,28 @@ var Toaster2 = function(_param) {
|
|
|
3527
3766
|
}, props));
|
|
3528
3767
|
};
|
|
3529
3768
|
// src/components/molecules/rating-stars.tsx
|
|
3530
|
-
var
|
|
3769
|
+
var React33 = __toESM(require("react"));
|
|
3531
3770
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
3532
|
-
var
|
|
3533
|
-
var
|
|
3771
|
+
var import_lucide_react14 = require("lucide-react");
|
|
3772
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3534
3773
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3535
|
-
var
|
|
3774
|
+
var Tooltip2 = TooltipPrimitive.Root;
|
|
3536
3775
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3537
|
-
var TooltipContent =
|
|
3776
|
+
var TooltipContent = React33.forwardRef(function(_param, ref) {
|
|
3538
3777
|
var className = _param.className, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
|
|
3539
3778
|
"className",
|
|
3540
3779
|
"sideOffset"
|
|
3541
3780
|
]);
|
|
3542
|
-
return /* @__PURE__ */ (0,
|
|
3781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipPrimitive.Content, _object_spread({
|
|
3543
3782
|
ref: ref,
|
|
3544
3783
|
sideOffset: sideOffset,
|
|
3545
3784
|
className: cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground shadow-lg animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)
|
|
3546
3785
|
}, props));
|
|
3547
3786
|
});
|
|
3548
3787
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3549
|
-
var StarRating =
|
|
3788
|
+
var StarRating = React33.forwardRef(function(param, ref) {
|
|
3550
3789
|
var rating = param.rating, onRate = param.onRate;
|
|
3551
|
-
return /* @__PURE__ */ (0,
|
|
3790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", {
|
|
3552
3791
|
ref: ref,
|
|
3553
3792
|
className: "flex",
|
|
3554
3793
|
children: [
|
|
@@ -3558,14 +3797,14 @@ var StarRating = React30.forwardRef(function(param, ref) {
|
|
|
3558
3797
|
4,
|
|
3559
3798
|
5
|
|
3560
3799
|
].map(function(star) {
|
|
3561
|
-
return /* @__PURE__ */ (0,
|
|
3800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, {
|
|
3562
3801
|
onClick: function() {
|
|
3563
3802
|
return onRate(star);
|
|
3564
3803
|
},
|
|
3565
3804
|
variant: "link",
|
|
3566
3805
|
className: "p-1 transition-colors [&_svg]:size-5 h-5",
|
|
3567
3806
|
"aria-label": "Rate ".concat(star, " star").concat(star !== 1 ? "s" : ""),
|
|
3568
|
-
children: /* @__PURE__ */ (0,
|
|
3807
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react14.Star, {
|
|
3569
3808
|
className: cn("w-5 h-5", star <= rating ? "alq-rating-star-active fill-current stroke-current" : "alq-rating-star-inactive")
|
|
3570
3809
|
})
|
|
3571
3810
|
}, star);
|
|
@@ -3573,15 +3812,15 @@ var StarRating = React30.forwardRef(function(param, ref) {
|
|
|
3573
3812
|
});
|
|
3574
3813
|
});
|
|
3575
3814
|
StarRating.displayName = "StarRating";
|
|
3576
|
-
var RatingStars =
|
|
3815
|
+
var RatingStars = React33.forwardRef(function(param, ref) {
|
|
3577
3816
|
var _param_currentRating = param.currentRating, currentRating = _param_currentRating === void 0 ? 0 : _param_currentRating, onRate = param.onRate, className = param.className, isLoading = param.isLoading;
|
|
3578
|
-
var
|
|
3579
|
-
var
|
|
3817
|
+
var _React33_useState = _sliced_to_array(React33.useState(false), 2), open = _React33_useState[0], setOpen = _React33_useState[1];
|
|
3818
|
+
var _React33_useState1 = _sliced_to_array(React33.useState(false), 2), animate = _React33_useState1[0], setAnimate = _React33_useState1[1];
|
|
3580
3819
|
var handleRate = function(rating) {
|
|
3581
3820
|
onRate(rating);
|
|
3582
3821
|
setOpen(false);
|
|
3583
3822
|
};
|
|
3584
|
-
|
|
3823
|
+
React33.useEffect(function() {
|
|
3585
3824
|
if (currentRating > 0) {
|
|
3586
3825
|
setAnimate(true);
|
|
3587
3826
|
var timer = setTimeout(function() {
|
|
@@ -3595,14 +3834,14 @@ var RatingStars = React30.forwardRef(function(param, ref) {
|
|
|
3595
3834
|
currentRating
|
|
3596
3835
|
]);
|
|
3597
3836
|
var hasRated = currentRating > 0;
|
|
3598
|
-
return /* @__PURE__ */ (0,
|
|
3599
|
-
children: /* @__PURE__ */ (0,
|
|
3837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipProvider, {
|
|
3838
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Tooltip2, {
|
|
3600
3839
|
open: open,
|
|
3601
3840
|
onOpenChange: setOpen,
|
|
3602
3841
|
children: [
|
|
3603
|
-
/* @__PURE__ */ (0,
|
|
3842
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipTrigger, {
|
|
3604
3843
|
asChild: true,
|
|
3605
|
-
children: /* @__PURE__ */ (0,
|
|
3844
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, {
|
|
3606
3845
|
ref: ref,
|
|
3607
3846
|
variant: "link",
|
|
3608
3847
|
className: cn("inline-flex items-center justify-center rounded-md text-sm font-medium [&_svg]:size-5 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", className),
|
|
@@ -3610,18 +3849,18 @@ var RatingStars = React30.forwardRef(function(param, ref) {
|
|
|
3610
3849
|
onClick: function() {
|
|
3611
3850
|
return setOpen(!open);
|
|
3612
3851
|
},
|
|
3613
|
-
children: /* @__PURE__ */ (0,
|
|
3852
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react14.Star, {
|
|
3614
3853
|
className: cn("w-5 h-5 transition-all duration-500", animate && "animate-ping", isLoading && "animate-pulse", hasRated ? "alq-rating-star-active fill-current stroke-current" : "alq-rating-star-inactive")
|
|
3615
3854
|
})
|
|
3616
3855
|
})
|
|
3617
3856
|
}),
|
|
3618
|
-
/* @__PURE__ */ (0,
|
|
3857
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipContent, {
|
|
3619
3858
|
side: "top",
|
|
3620
3859
|
align: "center",
|
|
3621
3860
|
className: "p-0",
|
|
3622
|
-
children: /* @__PURE__ */ (0,
|
|
3861
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", {
|
|
3623
3862
|
className: "p-2 bg-background",
|
|
3624
|
-
children: /* @__PURE__ */ (0,
|
|
3863
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(StarRating, {
|
|
3625
3864
|
rating: currentRating,
|
|
3626
3865
|
onRate: handleRate
|
|
3627
3866
|
})
|
|
@@ -3633,13 +3872,13 @@ var RatingStars = React30.forwardRef(function(param, ref) {
|
|
|
3633
3872
|
});
|
|
3634
3873
|
RatingStars.displayName = "RatingStars";
|
|
3635
3874
|
// src/components/molecules/rating-thumbs.tsx
|
|
3636
|
-
var
|
|
3637
|
-
var
|
|
3638
|
-
var
|
|
3639
|
-
var RatingThumbs =
|
|
3875
|
+
var React34 = __toESM(require("react"));
|
|
3876
|
+
var import_lucide_react15 = require("lucide-react");
|
|
3877
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3878
|
+
var RatingThumbs = React34.forwardRef(function(param, ref) {
|
|
3640
3879
|
var currentRating = param.currentRating, onRate = param.onRate, _param_direction = param.direction, direction = _param_direction === void 0 ? "row" : _param_direction, className = param.className, isLoading = param.isLoading;
|
|
3641
|
-
var
|
|
3642
|
-
|
|
3880
|
+
var _React34_useState = _sliced_to_array(React34.useState(false), 2), animate = _React34_useState[0], setAnimate = _React34_useState[1];
|
|
3881
|
+
React34.useEffect(function() {
|
|
3643
3882
|
if (currentRating) {
|
|
3644
3883
|
setAnimate(true);
|
|
3645
3884
|
var timer = setTimeout(function() {
|
|
@@ -3652,11 +3891,11 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
3652
3891
|
}, [
|
|
3653
3892
|
currentRating
|
|
3654
3893
|
]);
|
|
3655
|
-
return /* @__PURE__ */ (0,
|
|
3894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", {
|
|
3656
3895
|
ref: ref,
|
|
3657
3896
|
className: cn("inline-flex", direction === "column" ? "flex-col" : "flex-row", "space-x-1 gap-4", className),
|
|
3658
3897
|
children: [
|
|
3659
|
-
/* @__PURE__ */ (0,
|
|
3898
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Button, {
|
|
3660
3899
|
variant: "link",
|
|
3661
3900
|
onClick: function() {
|
|
3662
3901
|
return onRate(currentRating === "thumbsUp" ? "" : "thumbsUp");
|
|
@@ -3664,11 +3903,11 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
3664
3903
|
className: cn("p-1 transition-colors disabled:opacity-50 [&_svg]:size-5", "hover:alq-rating-thumbsup/10"),
|
|
3665
3904
|
"aria-label": "Thumbs up",
|
|
3666
3905
|
disabled: isLoading,
|
|
3667
|
-
children: /* @__PURE__ */ (0,
|
|
3906
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react15.ThumbsUp, {
|
|
3668
3907
|
className: cn("w-5 h-5 transition-all duration-500", animate && currentRating === "thumbsUp" && "animate-ping", isLoading && "animate-pulse", currentRating === "thumbsUp" ? "alq-rating-thumbsup fill-current stroke-current" : "alq-rating-thumbs-inactive fill-transparent")
|
|
3669
3908
|
})
|
|
3670
3909
|
}),
|
|
3671
|
-
/* @__PURE__ */ (0,
|
|
3910
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Button, {
|
|
3672
3911
|
variant: "link",
|
|
3673
3912
|
onClick: function() {
|
|
3674
3913
|
return onRate(currentRating === "thumbsDown" ? "" : "thumbsDown");
|
|
@@ -3676,7 +3915,7 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
3676
3915
|
className: cn("p-1 transition-colors disabled:opacity-50 mt-0.5 [&_svg]:size-5", "hover:bg-alq-rating-thumbsdown/10"),
|
|
3677
3916
|
"aria-label": "Thumbs down",
|
|
3678
3917
|
disabled: isLoading,
|
|
3679
|
-
children: /* @__PURE__ */ (0,
|
|
3918
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react15.ThumbsDown, {
|
|
3680
3919
|
className: cn("w-5 h-5 transition-all duration-500", animate && currentRating === "thumbsDown" && "animate-ping", isLoading && "animate-pulse", currentRating === "thumbsDown" ? "alq-rating-thumbsdown fill-current stroke-current" : "alq-rating-thumbs-inactive fill-transparent")
|
|
3681
3920
|
})
|
|
3682
3921
|
})
|
|
@@ -3685,19 +3924,19 @@ var RatingThumbs = React31.forwardRef(function(param, ref) {
|
|
|
3685
3924
|
});
|
|
3686
3925
|
RatingThumbs.displayName = "RatingThumbs";
|
|
3687
3926
|
// src/components/molecules/rating-comment.tsx
|
|
3688
|
-
var
|
|
3689
|
-
var
|
|
3690
|
-
var
|
|
3691
|
-
var RatingComment =
|
|
3927
|
+
var React35 = __toESM(require("react"));
|
|
3928
|
+
var import_lucide_react16 = require("lucide-react");
|
|
3929
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3930
|
+
var RatingComment = React35.forwardRef(function(param, ref) {
|
|
3692
3931
|
var currentRating = param.currentRating, onRate = param.onRate, className = param.className, isLoading = param.isLoading;
|
|
3693
|
-
var
|
|
3694
|
-
var
|
|
3695
|
-
var
|
|
3932
|
+
var _React35_useState = _sliced_to_array(React35.useState(false), 2), open = _React35_useState[0], setOpen = _React35_useState[1];
|
|
3933
|
+
var _React35_useState1 = _sliced_to_array(React35.useState(""), 2), comment = _React35_useState1[0], setComment = _React35_useState1[1];
|
|
3934
|
+
var _React35_useState2 = _sliced_to_array(React35.useState(false), 2), animate = _React35_useState2[0], setAnimate = _React35_useState2[1];
|
|
3696
3935
|
var handleRate = function() {
|
|
3697
3936
|
onRate(comment);
|
|
3698
3937
|
setOpen(false);
|
|
3699
3938
|
};
|
|
3700
|
-
|
|
3939
|
+
React35.useEffect(function() {
|
|
3701
3940
|
if (currentRating) {
|
|
3702
3941
|
setAnimate(true);
|
|
3703
3942
|
var timer = setTimeout(function() {
|
|
@@ -3710,39 +3949,39 @@ var RatingComment = React32.forwardRef(function(param, ref) {
|
|
|
3710
3949
|
}, [
|
|
3711
3950
|
currentRating
|
|
3712
3951
|
]);
|
|
3713
|
-
|
|
3952
|
+
React35.useEffect(function() {
|
|
3714
3953
|
setComment("");
|
|
3715
3954
|
}, [
|
|
3716
3955
|
open
|
|
3717
3956
|
]);
|
|
3718
|
-
return /* @__PURE__ */ (0,
|
|
3957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Dialog, {
|
|
3719
3958
|
open: open,
|
|
3720
3959
|
onOpenChange: setOpen,
|
|
3721
3960
|
children: [
|
|
3722
|
-
/* @__PURE__ */ (0,
|
|
3961
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogTrigger, {
|
|
3723
3962
|
asChild: true,
|
|
3724
|
-
children: /* @__PURE__ */ (0,
|
|
3963
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, {
|
|
3725
3964
|
ref: ref,
|
|
3726
3965
|
variant: "link",
|
|
3727
3966
|
size: "lg",
|
|
3728
3967
|
className: cn("inline-flex p-2 items-center justify-center rounded-md text-sm font-medium transition-colors [&_svg]:size-5 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring bg-transparent hover:none disabled:pointer-events-none disabled:opacity-50", className),
|
|
3729
3968
|
disabled: isLoading,
|
|
3730
|
-
children: /* @__PURE__ */ (0,
|
|
3969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react16.Book, {
|
|
3731
3970
|
className: cn("w-5 h-5 transition-all duration-500", animate && "animate-ping", isLoading && "animate-pulse", "".concat(comment ? "alq-rating-comment" : "stroke-gray-400"))
|
|
3732
3971
|
})
|
|
3733
3972
|
})
|
|
3734
3973
|
}),
|
|
3735
|
-
/* @__PURE__ */ (0,
|
|
3974
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogOverlay, {
|
|
3736
3975
|
className: "fixed inset-0 bg-black bg-opacity-50"
|
|
3737
3976
|
}),
|
|
3738
|
-
/* @__PURE__ */ (0,
|
|
3977
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DialogContent, {
|
|
3739
3978
|
"aria-describedby": void 0,
|
|
3740
3979
|
children: [
|
|
3741
|
-
/* @__PURE__ */ (0,
|
|
3980
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogTitle, {
|
|
3742
3981
|
className: "text-lg font-medium",
|
|
3743
3982
|
children: "Deja un comentario"
|
|
3744
3983
|
}),
|
|
3745
|
-
/* @__PURE__ */ (0,
|
|
3984
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("textarea", {
|
|
3746
3985
|
className: "mt-4 w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary",
|
|
3747
3986
|
rows: 4,
|
|
3748
3987
|
value: comment,
|
|
@@ -3750,9 +3989,9 @@ var RatingComment = React32.forwardRef(function(param, ref) {
|
|
|
3750
3989
|
return setComment(e.target.value);
|
|
3751
3990
|
}
|
|
3752
3991
|
}),
|
|
3753
|
-
/* @__PURE__ */ (0,
|
|
3992
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", {
|
|
3754
3993
|
className: "mt-4 flex justify-end",
|
|
3755
|
-
children: /* @__PURE__ */ (0,
|
|
3994
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, {
|
|
3756
3995
|
onClick: handleRate,
|
|
3757
3996
|
disabled: !comment,
|
|
3758
3997
|
children: "Enviar"
|
|
@@ -3765,8 +4004,8 @@ var RatingComment = React32.forwardRef(function(param, ref) {
|
|
|
3765
4004
|
});
|
|
3766
4005
|
RatingComment.displayName = "RatingComment";
|
|
3767
4006
|
// src/components/molecules/call-out.tsx
|
|
3768
|
-
var
|
|
3769
|
-
var
|
|
4007
|
+
var React36 = __toESM(require("react"));
|
|
4008
|
+
var import_lucide_react17 = require("lucide-react");
|
|
3770
4009
|
// src/components/hooks/use-text-streaming.ts
|
|
3771
4010
|
var import_react12 = require("react");
|
|
3772
4011
|
var CHAR_DELAY = 15;
|
|
@@ -3830,14 +4069,14 @@ function useTextStreaming(content, shouldStream, handleIsTextStreaming) {
|
|
|
3830
4069
|
return displayedText;
|
|
3831
4070
|
}
|
|
3832
4071
|
// src/components/molecules/call-out.tsx
|
|
3833
|
-
var
|
|
3834
|
-
var CallOut =
|
|
4072
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4073
|
+
var CallOut = React36.forwardRef(function(_param, ref) {
|
|
3835
4074
|
var className = _param.className, children = _param.children, role = _param.role, props = _object_without_properties(_param, [
|
|
3836
4075
|
"className",
|
|
3837
4076
|
"children",
|
|
3838
4077
|
"role"
|
|
3839
4078
|
]);
|
|
3840
|
-
return /* @__PURE__ */ (0,
|
|
4079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", _object_spread_props(_object_spread({
|
|
3841
4080
|
ref: ref,
|
|
3842
4081
|
className: cn("alq--callout-box", className),
|
|
3843
4082
|
"data-role": role
|
|
@@ -3845,41 +4084,41 @@ var CallOut = React33.forwardRef(function(_param, ref) {
|
|
|
3845
4084
|
children: children
|
|
3846
4085
|
}));
|
|
3847
4086
|
});
|
|
3848
|
-
var CallOutDate =
|
|
4087
|
+
var CallOutDate = React36.forwardRef(function(_param, ref) {
|
|
3849
4088
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
3850
4089
|
"className",
|
|
3851
4090
|
"children"
|
|
3852
4091
|
]);
|
|
3853
|
-
return /* @__PURE__ */ (0,
|
|
4092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", _object_spread_props(_object_spread({
|
|
3854
4093
|
ref: ref,
|
|
3855
4094
|
className: cn("alq--callout-date", "text-sm text-muted-foreground", className)
|
|
3856
4095
|
}, props), {
|
|
3857
4096
|
children: children
|
|
3858
4097
|
}));
|
|
3859
4098
|
});
|
|
3860
|
-
var CallOutActions =
|
|
4099
|
+
var CallOutActions = React36.forwardRef(function(_param, ref) {
|
|
3861
4100
|
var className = _param.className, actions = _param.actions, role = _param.role, message = _param.message, props = _object_without_properties(_param, [
|
|
3862
4101
|
"className",
|
|
3863
4102
|
"actions",
|
|
3864
4103
|
"role",
|
|
3865
4104
|
"message"
|
|
3866
4105
|
]);
|
|
3867
|
-
var
|
|
3868
|
-
var
|
|
4106
|
+
var _React36_useState = _sliced_to_array(React36.useState(false), 2), isLoading = _React36_useState[0], setIsLoading = _React36_useState[1];
|
|
4107
|
+
var _React36_useState1 = _sliced_to_array(React36.useState(false), 2), isClicked = _React36_useState1[0], setIsClicked = _React36_useState1[1];
|
|
3869
4108
|
if (role === "user") {
|
|
3870
4109
|
return null;
|
|
3871
4110
|
}
|
|
3872
|
-
return /* @__PURE__ */ (0,
|
|
4111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", _object_spread_props(_object_spread({
|
|
3873
4112
|
ref: ref,
|
|
3874
4113
|
className: cn("alq--callout-actions", className)
|
|
3875
4114
|
}, props), {
|
|
3876
4115
|
children: actions.map(function(action) {
|
|
3877
4116
|
var _action_component;
|
|
3878
|
-
return action.custom ? /* @__PURE__ */ (0,
|
|
4117
|
+
return action.custom ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(React36.Fragment, {
|
|
3879
4118
|
children: (_action_component = action.component) === null || _action_component === void 0 ? void 0 : _action_component.call(action, {
|
|
3880
4119
|
message: message
|
|
3881
4120
|
})
|
|
3882
|
-
}, action.label) : /* @__PURE__ */ (0,
|
|
4121
|
+
}, action.label) : /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("button", {
|
|
3883
4122
|
className: cn("alq--callout-action", {
|
|
3884
4123
|
"alq--callout-animate-action": isLoading
|
|
3885
4124
|
}, {
|
|
@@ -3895,13 +4134,13 @@ var CallOutActions = React33.forwardRef(function(_param, ref) {
|
|
|
3895
4134
|
});
|
|
3896
4135
|
},
|
|
3897
4136
|
children: [
|
|
3898
|
-
/* @__PURE__ */ (0,
|
|
4137
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", {
|
|
3899
4138
|
className: cn("alq-action-icon-wrapper", {
|
|
3900
4139
|
"alq--callout-animate-action": isLoading
|
|
3901
4140
|
}),
|
|
3902
4141
|
children: action.icon
|
|
3903
4142
|
}),
|
|
3904
|
-
/* @__PURE__ */ (0,
|
|
4143
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("label", {
|
|
3905
4144
|
children: action.label
|
|
3906
4145
|
})
|
|
3907
4146
|
]
|
|
@@ -3909,7 +4148,7 @@ var CallOutActions = React33.forwardRef(function(_param, ref) {
|
|
|
3909
4148
|
})
|
|
3910
4149
|
}));
|
|
3911
4150
|
});
|
|
3912
|
-
var CallOutResponse =
|
|
4151
|
+
var CallOutResponse = React36.forwardRef(function(_param, ref) {
|
|
3913
4152
|
var className = _param.className, children = _param.children, role = _param.role, additionalInfo = _param.additionalInfo, toggleAdditionalInfo = _param.toggleAdditionalInfo, isStreaming = _param.isStreaming, handleIsTextStreaming = _param.handleIsTextStreaming, props = _object_without_properties(_param, [
|
|
3914
4153
|
"className",
|
|
3915
4154
|
"children",
|
|
@@ -3919,29 +4158,29 @@ var CallOutResponse = React33.forwardRef(function(_param, ref) {
|
|
|
3919
4158
|
"isStreaming",
|
|
3920
4159
|
"handleIsTextStreaming"
|
|
3921
4160
|
]);
|
|
3922
|
-
var
|
|
4161
|
+
var _React36_useState = _sliced_to_array(React36.useState(false), 2), isAdditionalInfoOpen = _React36_useState[0], setIsAdditionalInfoOpen = _React36_useState[1];
|
|
3923
4162
|
var content = String(children || "");
|
|
3924
4163
|
var shouldStream = role === "assistant" && isStreaming;
|
|
3925
4164
|
var displayedContent = useTextStreaming(content, shouldStream !== null && shouldStream !== void 0 ? shouldStream : false, handleIsTextStreaming);
|
|
3926
4165
|
var showAsToggle = additionalInfo && toggleAdditionalInfo;
|
|
3927
4166
|
var showInline = additionalInfo && !toggleAdditionalInfo;
|
|
3928
|
-
return /* @__PURE__ */ (0,
|
|
4167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", _object_spread_props(_object_spread({
|
|
3929
4168
|
ref: ref,
|
|
3930
4169
|
"data-role": role,
|
|
3931
4170
|
className: cn("alq--callout-response", "max-w-none", "text-foreground", className)
|
|
3932
4171
|
}, props), {
|
|
3933
4172
|
children: [
|
|
3934
|
-
/* @__PURE__ */ (0,
|
|
4173
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(RichText, {
|
|
3935
4174
|
content: displayedContent
|
|
3936
4175
|
}),
|
|
3937
|
-
showInline && /* @__PURE__ */ (0,
|
|
4176
|
+
showInline && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", {
|
|
3938
4177
|
className: cn("alq--callout-response-additional-info", "mt-2 text-sm text-muted-foreground whitespace-pre-line", "border-t border-border pt-2"),
|
|
3939
4178
|
children: additionalInfo
|
|
3940
4179
|
}),
|
|
3941
|
-
showAsToggle && /* @__PURE__ */ (0,
|
|
4180
|
+
showAsToggle && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", {
|
|
3942
4181
|
className: cn("alq--callout-response-additional-info", "mt-2 border-t border-border pt-2"),
|
|
3943
4182
|
children: [
|
|
3944
|
-
/* @__PURE__ */ (0,
|
|
4183
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Button, {
|
|
3945
4184
|
type: "button",
|
|
3946
4185
|
variant: "ghost",
|
|
3947
4186
|
size: "sm",
|
|
@@ -3953,19 +4192,19 @@ var CallOutResponse = React33.forwardRef(function(_param, ref) {
|
|
|
3953
4192
|
},
|
|
3954
4193
|
"aria-expanded": isAdditionalInfoOpen,
|
|
3955
4194
|
children: [
|
|
3956
|
-
isAdditionalInfoOpen ? /* @__PURE__ */ (0,
|
|
4195
|
+
isAdditionalInfoOpen ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react17.ChevronUp, {
|
|
3957
4196
|
className: "h-4 w-4 mr-1.5 shrink-0 transition-transform"
|
|
3958
|
-
}) : /* @__PURE__ */ (0,
|
|
4197
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react17.ChevronDown, {
|
|
3959
4198
|
className: "h-4 w-4 mr-1.5 shrink-0 transition-transform"
|
|
3960
4199
|
}),
|
|
3961
4200
|
isAdditionalInfoOpen ? "Hide details" : "Show details"
|
|
3962
4201
|
]
|
|
3963
4202
|
}),
|
|
3964
|
-
/* @__PURE__ */ (0,
|
|
4203
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", {
|
|
3965
4204
|
className: cn("grid transition-[grid-template-rows] duration-200 ease-out", isAdditionalInfoOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
3966
|
-
children: /* @__PURE__ */ (0,
|
|
4205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", {
|
|
3967
4206
|
className: "overflow-hidden",
|
|
3968
|
-
children: /* @__PURE__ */ (0,
|
|
4207
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", {
|
|
3969
4208
|
className: "text-sm text-muted-foreground pt-1 whitespace-pre-line",
|
|
3970
4209
|
children: additionalInfo
|
|
3971
4210
|
})
|
|
@@ -3981,9 +4220,9 @@ CallOutDate.displayName = "CallOutDate";
|
|
|
3981
4220
|
CallOutActions.displayName = "CallOutActions";
|
|
3982
4221
|
CallOutResponse.displayName = "CallOutResponse";
|
|
3983
4222
|
// src/components/organisms/assistant.tsx
|
|
3984
|
-
var
|
|
3985
|
-
var
|
|
3986
|
-
var Assistant =
|
|
4223
|
+
var import_lucide_react18 = require("lucide-react");
|
|
4224
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4225
|
+
var Assistant = React37.forwardRef(function(_param, ref) {
|
|
3987
4226
|
var className = _param.className, sdk = _param.sdk, title = _param.title, description = _param.description, children = _param.children, props = _object_without_properties(_param, [
|
|
3988
4227
|
"className",
|
|
3989
4228
|
"sdk",
|
|
@@ -3991,17 +4230,17 @@ var Assistant = React34.forwardRef(function(_param, ref) {
|
|
|
3991
4230
|
"description",
|
|
3992
4231
|
"children"
|
|
3993
4232
|
]);
|
|
3994
|
-
return /* @__PURE__ */ (0,
|
|
4233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", _object_spread_props(_object_spread({
|
|
3995
4234
|
ref: ref,
|
|
3996
4235
|
className: cn("flex flex-col h-full bg-background text-foreground", className)
|
|
3997
4236
|
}, props), {
|
|
3998
4237
|
children: [
|
|
3999
|
-
(title || description) && /* @__PURE__ */ (0,
|
|
4238
|
+
(title || description) && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(AssistantHeader, {
|
|
4000
4239
|
children: [
|
|
4001
|
-
title && /* @__PURE__ */ (0,
|
|
4240
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AssistantTitle, {
|
|
4002
4241
|
title: title
|
|
4003
4242
|
}),
|
|
4004
|
-
description && /* @__PURE__ */ (0,
|
|
4243
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AssistantDescription, {
|
|
4005
4244
|
description: description
|
|
4006
4245
|
})
|
|
4007
4246
|
]
|
|
@@ -4011,16 +4250,16 @@ var Assistant = React34.forwardRef(function(_param, ref) {
|
|
|
4011
4250
|
}));
|
|
4012
4251
|
});
|
|
4013
4252
|
Assistant.displayName = "Assistant";
|
|
4014
|
-
var AssistantTitle =
|
|
4253
|
+
var AssistantTitle = React37.forwardRef(function(_param, ref) {
|
|
4015
4254
|
var className = _param.className, title = _param.title, props = _object_without_properties(_param, [
|
|
4016
4255
|
"className",
|
|
4017
4256
|
"title"
|
|
4018
4257
|
]);
|
|
4019
|
-
return /* @__PURE__ */ (0,
|
|
4258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", _object_spread_props(_object_spread({
|
|
4020
4259
|
ref: ref,
|
|
4021
4260
|
className: cn("text-foreground", className)
|
|
4022
4261
|
}, props), {
|
|
4023
|
-
children: /* @__PURE__ */ (0,
|
|
4262
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Typography, {
|
|
4024
4263
|
typeStyle: "heading1",
|
|
4025
4264
|
as: "h1",
|
|
4026
4265
|
children: title
|
|
@@ -4028,16 +4267,16 @@ var AssistantTitle = React34.forwardRef(function(_param, ref) {
|
|
|
4028
4267
|
}));
|
|
4029
4268
|
});
|
|
4030
4269
|
AssistantTitle.displayName = "AssistantTitle";
|
|
4031
|
-
var AssistantDescription =
|
|
4270
|
+
var AssistantDescription = React37.forwardRef(function(_param, ref) {
|
|
4032
4271
|
var className = _param.className, description = _param.description, props = _object_without_properties(_param, [
|
|
4033
4272
|
"className",
|
|
4034
4273
|
"description"
|
|
4035
4274
|
]);
|
|
4036
|
-
return /* @__PURE__ */ (0,
|
|
4275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", _object_spread_props(_object_spread({
|
|
4037
4276
|
ref: ref,
|
|
4038
4277
|
className: cn("text-foreground", className)
|
|
4039
4278
|
}, props), {
|
|
4040
|
-
children: /* @__PURE__ */ (0,
|
|
4279
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Typography, {
|
|
4041
4280
|
typeStyle: "display",
|
|
4042
4281
|
as: "p",
|
|
4043
4282
|
children: description
|
|
@@ -4045,12 +4284,12 @@ var AssistantDescription = React34.forwardRef(function(_param, ref) {
|
|
|
4045
4284
|
}));
|
|
4046
4285
|
});
|
|
4047
4286
|
AssistantDescription.displayName = "AssistantDescription";
|
|
4048
|
-
var AssistantHeader =
|
|
4287
|
+
var AssistantHeader = React37.forwardRef(function(_param, ref) {
|
|
4049
4288
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
4050
4289
|
"className",
|
|
4051
4290
|
"children"
|
|
4052
4291
|
]);
|
|
4053
|
-
return /* @__PURE__ */ (0,
|
|
4292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", _object_spread_props(_object_spread({
|
|
4054
4293
|
ref: ref,
|
|
4055
4294
|
className: cn("bg-background text-foreground", className)
|
|
4056
4295
|
}, props), {
|
|
@@ -4058,8 +4297,8 @@ var AssistantHeader = React34.forwardRef(function(_param, ref) {
|
|
|
4058
4297
|
}));
|
|
4059
4298
|
});
|
|
4060
4299
|
AssistantHeader.displayName = "AssistantHeader";
|
|
4061
|
-
var AssistantMessageArea =
|
|
4062
|
-
var className = _param.className, messages = _param.messages, messagesEndRef = _param.messagesEndRef, actions = _param.actions, streamingMessageId = _param.streamingMessageId, thinkIndicator = _param.thinkIndicator, handleIsTextStreaming = _param.handleIsTextStreaming, toolFactory = _param.toolFactory, isLoading = _param.isLoading, showDetailedErrors = _param.showDetailedErrors, props = _object_without_properties(_param, [
|
|
4300
|
+
var AssistantMessageArea = React37.forwardRef(function(_param, ref) {
|
|
4301
|
+
var className = _param.className, messages = _param.messages, messagesEndRef = _param.messagesEndRef, actions = _param.actions, streamingMessageId = _param.streamingMessageId, thinkIndicator = _param.thinkIndicator, handleIsTextStreaming = _param.handleIsTextStreaming, toolFactory = _param.toolFactory, isLoading = _param.isLoading, showDetailedErrors = _param.showDetailedErrors, interleave = _param.interleave, awaitingUser = _param.awaitingUser, _isMessageStreaming = _param.isMessageStreaming, props = _object_without_properties(_param, [
|
|
4063
4302
|
"className",
|
|
4064
4303
|
"messages",
|
|
4065
4304
|
"messagesEndRef",
|
|
@@ -4069,7 +4308,10 @@ var AssistantMessageArea = React34.forwardRef(function(_param, ref) {
|
|
|
4069
4308
|
"handleIsTextStreaming",
|
|
4070
4309
|
"toolFactory",
|
|
4071
4310
|
"isLoading",
|
|
4072
|
-
"showDetailedErrors"
|
|
4311
|
+
"showDetailedErrors",
|
|
4312
|
+
"interleave",
|
|
4313
|
+
"awaitingUser",
|
|
4314
|
+
"isMessageStreaming"
|
|
4073
4315
|
]);
|
|
4074
4316
|
(0, import_react13.useEffect)(function() {
|
|
4075
4317
|
var _messagesEndRef_current;
|
|
@@ -4077,72 +4319,76 @@ var AssistantMessageArea = React34.forwardRef(function(_param, ref) {
|
|
|
4077
4319
|
behavior: "instant"
|
|
4078
4320
|
});
|
|
4079
4321
|
}, []);
|
|
4080
|
-
return /* @__PURE__ */ (0,
|
|
4322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", _object_spread_props(_object_spread({
|
|
4081
4323
|
ref: ref,
|
|
4082
4324
|
className: cn("p-6 overflow-y-auto flex-grow bg-background", className)
|
|
4083
4325
|
}, props), {
|
|
4084
4326
|
children: [
|
|
4085
|
-
|
|
4327
|
+
interleave === null || interleave === void 0 ? void 0 : interleave(0),
|
|
4328
|
+
messages.map(function(message, index) {
|
|
4086
4329
|
var _message_tooler;
|
|
4087
|
-
return /* @__PURE__ */ (0,
|
|
4088
|
-
children:
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
actions
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", {
|
|
4331
|
+
children: [
|
|
4332
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(CallOut, {
|
|
4333
|
+
role: message.role,
|
|
4334
|
+
message: message,
|
|
4335
|
+
children: [
|
|
4336
|
+
streamingMessageId === message.id && (isLoading || message.content.length === 0) && !message.error_code && !awaitingUser && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", {
|
|
4337
|
+
children: thinkIndicator !== null && thinkIndicator !== void 0 ? thinkIndicator : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ThinkIndicator, {})
|
|
4338
|
+
}),
|
|
4339
|
+
message.error_code && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CallOutResponse, {
|
|
4340
|
+
role: "assistant",
|
|
4341
|
+
"data-error-code": message.error_code,
|
|
4342
|
+
additionalInfo: showDetailedErrors ? "".concat(message.error_detail).concat(message.taskid ? "\ntask id: ".concat(message.taskid) : "") : void 0,
|
|
4343
|
+
toggleAdditionalInfo: true,
|
|
4344
|
+
children: getErrorMessage(message.error_code)
|
|
4345
|
+
}),
|
|
4346
|
+
!message.error_code && ((_message_tooler = message.tooler) === null || _message_tooler === void 0 ? void 0 : _message_tooler.filter(hasToolResult).map(function(tool, index2) {
|
|
4347
|
+
var _tool_tool_summary, _tool_tool_summary1;
|
|
4348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(React37.Fragment, {
|
|
4349
|
+
children: toolFactory === null || toolFactory === void 0 ? void 0 : toolFactory.createTool(((_tool_tool_summary = tool.tool_summary) === null || _tool_tool_summary === void 0 ? void 0 : _tool_tool_summary.name) || "", tool.tool_output)
|
|
4350
|
+
}, tool.control_id || "".concat((_tool_tool_summary1 = tool.tool_summary) === null || _tool_tool_summary1 === void 0 ? void 0 : _tool_tool_summary1.name, "-").concat(index2));
|
|
4351
|
+
})),
|
|
4352
|
+
message.content && !message.error_code && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", {
|
|
4353
|
+
"data-role": message.role,
|
|
4354
|
+
className: "alq--callout-message-container",
|
|
4355
|
+
children: [
|
|
4356
|
+
message.created_at && streamingMessageId !== message.id && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", {
|
|
4357
|
+
className: "text-xs text-muted-foreground/80 pb-1 alq--callout-message-date",
|
|
4358
|
+
children: new Date(Number(message.created_at)).toLocaleString("es-ES", {
|
|
4359
|
+
hour: "2-digit",
|
|
4360
|
+
minute: "2-digit",
|
|
4361
|
+
hour12: false
|
|
4362
|
+
})
|
|
4363
|
+
}),
|
|
4364
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CallOutResponse, {
|
|
4365
|
+
role: message.role,
|
|
4366
|
+
isStreaming: streamingMessageId === message.id,
|
|
4367
|
+
handleIsTextStreaming: handleIsTextStreaming,
|
|
4368
|
+
additionalInfo: streamingMessageId !== message.id ? message === null || message === void 0 ? void 0 : message.additionalInfo : void 0,
|
|
4369
|
+
children: message.content
|
|
4370
|
+
}),
|
|
4371
|
+
actions && streamingMessageId !== message.id && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CallOutActions, {
|
|
4372
|
+
actions: actions,
|
|
4373
|
+
message: message,
|
|
4374
|
+
role: message.role
|
|
4375
|
+
}, message.id)
|
|
4376
|
+
]
|
|
4377
|
+
})
|
|
4378
|
+
]
|
|
4379
|
+
}, message.id),
|
|
4380
|
+
interleave === null || interleave === void 0 ? void 0 : interleave(index + 1)
|
|
4381
|
+
]
|
|
4136
4382
|
}, message.id);
|
|
4137
4383
|
}),
|
|
4138
|
-
/* @__PURE__ */ (0,
|
|
4384
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", {
|
|
4139
4385
|
ref: messagesEndRef
|
|
4140
4386
|
})
|
|
4141
4387
|
]
|
|
4142
4388
|
}));
|
|
4143
4389
|
});
|
|
4144
4390
|
AssistantMessageArea.displayName = "AssistantMessageArea";
|
|
4145
|
-
var AssistantInput =
|
|
4391
|
+
var AssistantInput = React37.forwardRef(function(_param, ref) {
|
|
4146
4392
|
var className = _param.className, sendMessageFunc = _param.sendMessageFunc, isButtonDisabled = _param.isButtonDisabled, input = _param.input, handleInputChange = _param.handleInputChange, isMessageStreaming = _param.isMessageStreaming, speechToTextComponent = _param.speechToTextComponent, userToolboxComponent = _param.userToolboxComponent, placeholders = _param.placeholders, onFileDrop = _param.onFileDrop, attachmentsSlot = _param.attachmentsSlot, props = _object_without_properties(_param, [
|
|
4147
4393
|
"className",
|
|
4148
4394
|
"sendMessageFunc",
|
|
@@ -4191,7 +4437,7 @@ var AssistantInput = React34.forwardRef(function(_param, ref) {
|
|
|
4191
4437
|
onFileDrop
|
|
4192
4438
|
]);
|
|
4193
4439
|
var placeholder = placeholders ? isMessageStreaming ? placeholders[0] : placeholders[1] : isMessageStreaming ? "Processing..." : "Type your message here...";
|
|
4194
|
-
return /* @__PURE__ */ (0,
|
|
4440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("form", _object_spread_props(_object_spread({
|
|
4195
4441
|
onSubmit: sendMessageFunc,
|
|
4196
4442
|
className: cn("flex flex-col relative rounded-lg border border-input bg-background", "focus-within:ring-2 focus-within:ring-ring", onFileDrop && isDragging && "ring-2 ring-primary/50 alq--assistant-input-dragover", className),
|
|
4197
4443
|
ref: ref,
|
|
@@ -4202,7 +4448,7 @@ var AssistantInput = React34.forwardRef(function(_param, ref) {
|
|
|
4202
4448
|
}, props), {
|
|
4203
4449
|
children: [
|
|
4204
4450
|
attachmentsSlot,
|
|
4205
|
-
/* @__PURE__ */ (0,
|
|
4451
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("textarea", {
|
|
4206
4452
|
disabled: isButtonDisabled,
|
|
4207
4453
|
value: input,
|
|
4208
4454
|
onChange: handleInputChange,
|
|
@@ -4215,16 +4461,17 @@ var AssistantInput = React34.forwardRef(function(_param, ref) {
|
|
|
4215
4461
|
}
|
|
4216
4462
|
}
|
|
4217
4463
|
}),
|
|
4218
|
-
/* @__PURE__ */ (0,
|
|
4464
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", {
|
|
4219
4465
|
className: "flex items-center relative alq--assistant-actions",
|
|
4220
4466
|
children: [
|
|
4221
4467
|
userToolboxComponent,
|
|
4222
4468
|
speechToTextComponent,
|
|
4223
|
-
/* @__PURE__ */ (0,
|
|
4469
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("button", {
|
|
4224
4470
|
type: "submit",
|
|
4471
|
+
"aria-label": "Send",
|
|
4225
4472
|
disabled: isButtonDisabled,
|
|
4226
4473
|
className: cn("w-10 h-10 rounded-full flex items-center justify-center alq--assistant-button-send", isButtonDisabled ? "bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"),
|
|
4227
|
-
children: /* @__PURE__ */ (0,
|
|
4474
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react18.Send, {
|
|
4228
4475
|
className: "w-5 h-5"
|
|
4229
4476
|
})
|
|
4230
4477
|
})
|
|
@@ -4318,7 +4565,7 @@ var useDocumentReader = function(url, getDocument) {
|
|
|
4318
4565
|
// src/components/hooks/use-resize-observer.ts
|
|
4319
4566
|
var import_react15 = require("react");
|
|
4320
4567
|
// src/components/organisms/rating-dialog.tsx
|
|
4321
|
-
var
|
|
4568
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4322
4569
|
function RatingDialog(param) {
|
|
4323
4570
|
var sendRating = param.sendRating, topicId = param.topicId, assistantId = param.assistantId, isOpen = param.isOpen, onOpenChange = param.onOpenChange, setHasRatedTopic = param.setHasRatedTopic;
|
|
4324
4571
|
var _useToast = useToast(), toast2 = _useToast.toast;
|
|
@@ -4334,7 +4581,7 @@ function RatingDialog(param) {
|
|
|
4334
4581
|
success ? setHasRatedTopic(true) : toast2({
|
|
4335
4582
|
title: "Error",
|
|
4336
4583
|
description: "Hubo un error al enviar la calificaci\xf3n",
|
|
4337
|
-
action: /* @__PURE__ */ (0,
|
|
4584
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ToastAction, {
|
|
4338
4585
|
altText: "Goto schedule to undo",
|
|
4339
4586
|
children: "Cerrar"
|
|
4340
4587
|
})
|
|
@@ -4344,26 +4591,26 @@ function RatingDialog(param) {
|
|
|
4344
4591
|
setHasRatedTopic(true);
|
|
4345
4592
|
onOpenChange(false);
|
|
4346
4593
|
};
|
|
4347
|
-
return /* @__PURE__ */ (0,
|
|
4594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Dialog, {
|
|
4348
4595
|
open: isOpen,
|
|
4349
4596
|
onOpenChange: onOpenChange,
|
|
4350
|
-
children: /* @__PURE__ */ (0,
|
|
4597
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(DialogContent, {
|
|
4351
4598
|
className: "sm:max-w-md",
|
|
4352
4599
|
children: [
|
|
4353
|
-
/* @__PURE__ */ (0,
|
|
4600
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(DialogHeader, {
|
|
4354
4601
|
children: [
|
|
4355
|
-
/* @__PURE__ */ (0,
|
|
4602
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DialogTitle, {
|
|
4356
4603
|
children: "Calific\xE1 esta conversaci\xF3n"
|
|
4357
4604
|
}),
|
|
4358
|
-
/* @__PURE__ */ (0,
|
|
4605
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DialogDescription, {
|
|
4359
4606
|
children: "Por favor, compart\xED tu opini\xF3n sobre el asistente."
|
|
4360
4607
|
})
|
|
4361
4608
|
]
|
|
4362
4609
|
}),
|
|
4363
|
-
/* @__PURE__ */ (0,
|
|
4610
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", {
|
|
4364
4611
|
className: "flex flex-row justify-center gap-4 py-4",
|
|
4365
4612
|
children: [
|
|
4366
|
-
/* @__PURE__ */ (0,
|
|
4613
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RatingStars, {
|
|
4367
4614
|
currentRating: ratingStars,
|
|
4368
4615
|
onRate: function(newRating) {
|
|
4369
4616
|
return handleRate("score", newRating, onHandleRateSuccess);
|
|
@@ -4371,7 +4618,7 @@ function RatingDialog(param) {
|
|
|
4371
4618
|
isLoading: isLoading,
|
|
4372
4619
|
className: "p-2 rounded"
|
|
4373
4620
|
}),
|
|
4374
|
-
/* @__PURE__ */ (0,
|
|
4621
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RatingThumbs, {
|
|
4375
4622
|
currentRating: ratingComment,
|
|
4376
4623
|
onRate: function(newRating) {
|
|
4377
4624
|
return handleRate("description", newRating, onHandleRateSuccess);
|
|
@@ -4379,7 +4626,7 @@ function RatingDialog(param) {
|
|
|
4379
4626
|
direction: "row",
|
|
4380
4627
|
isLoading: isLoading
|
|
4381
4628
|
}),
|
|
4382
|
-
/* @__PURE__ */ (0,
|
|
4629
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RatingComment, {
|
|
4383
4630
|
currentRating: ratingComment,
|
|
4384
4631
|
onRate: function(newRating) {
|
|
4385
4632
|
return handleRate("description", newRating, onHandleRateSuccess);
|
|
@@ -4388,12 +4635,12 @@ function RatingDialog(param) {
|
|
|
4388
4635
|
})
|
|
4389
4636
|
]
|
|
4390
4637
|
}),
|
|
4391
|
-
/* @__PURE__ */ (0,
|
|
4638
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", {
|
|
4392
4639
|
className: "flex flex-row justify-center gap-4",
|
|
4393
|
-
children: /* @__PURE__ */ (0,
|
|
4640
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Button, {
|
|
4394
4641
|
onClick: handleCancelRate,
|
|
4395
4642
|
variant: "secondary",
|
|
4396
|
-
children: /* @__PURE__ */ (0,
|
|
4643
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Typography, {
|
|
4397
4644
|
as: "p",
|
|
4398
4645
|
typeStyle: "tiny",
|
|
4399
4646
|
children: "No, gracias."
|
|
@@ -4411,24 +4658,24 @@ var EditingStatus = /* @__PURE__ */ function(EditingStatus2) {
|
|
|
4411
4658
|
return EditingStatus2;
|
|
4412
4659
|
}(EditingStatus || {});
|
|
4413
4660
|
// src/providers/alquimia-ui-provider.tsx
|
|
4414
|
-
var
|
|
4415
|
-
var
|
|
4661
|
+
var React38 = __toESM(require("react"));
|
|
4662
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4416
4663
|
function AlquimiaUIProvider(param) {
|
|
4417
4664
|
var _param_defaultMode = param.defaultMode, defaultMode = _param_defaultMode === void 0 ? "system" : _param_defaultMode, children = param.children;
|
|
4418
|
-
var
|
|
4665
|
+
var _React38_useState = _sliced_to_array(React38.useState(function() {
|
|
4419
4666
|
if (defaultMode !== "system") return defaultMode;
|
|
4420
4667
|
if (typeof window !== "undefined") {
|
|
4421
4668
|
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
4422
4669
|
}
|
|
4423
4670
|
return "light";
|
|
4424
|
-
}), 2), resolvedTheme =
|
|
4671
|
+
}), 2), resolvedTheme = _React38_useState[0], setResolvedTheme = _React38_useState[1];
|
|
4425
4672
|
function applyTheme(theme) {
|
|
4426
4673
|
if (typeof document !== "undefined") {
|
|
4427
4674
|
document.documentElement.classList.toggle("dark", theme === "dark");
|
|
4428
4675
|
}
|
|
4429
4676
|
setResolvedTheme(theme);
|
|
4430
4677
|
}
|
|
4431
|
-
|
|
4678
|
+
React38.useEffect(function() {
|
|
4432
4679
|
if (defaultMode !== "system") {
|
|
4433
4680
|
applyTheme(defaultMode);
|
|
4434
4681
|
return;
|
|
@@ -4445,7 +4692,7 @@ function AlquimiaUIProvider(param) {
|
|
|
4445
4692
|
}, [
|
|
4446
4693
|
defaultMode
|
|
4447
4694
|
]);
|
|
4448
|
-
return /* @__PURE__ */ (0,
|
|
4695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ThemeContext.Provider, {
|
|
4449
4696
|
value: {
|
|
4450
4697
|
theme: resolvedTheme,
|
|
4451
4698
|
setTheme: applyTheme
|