@dilipod/ui 0.4.24 → 0.4.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/support-chat.d.ts +28 -0
- package/dist/components/support-chat.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +154 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +155 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/button.tsx +1 -1
- package/src/components/date-range-picker.tsx +1 -1
- package/src/components/dialog.tsx +1 -1
- package/src/components/form-field.tsx +1 -1
- package/src/components/impact-metrics-form.tsx +3 -3
- package/src/components/input.tsx +3 -3
- package/src/components/radio-group.tsx +2 -2
- package/src/components/select.tsx +4 -4
- package/src/components/sheet.tsx +1 -1
- package/src/components/slider.tsx +2 -2
- package/src/components/support-chat.tsx +236 -0
- package/src/components/switch.tsx +1 -1
- package/src/components/tabs.tsx +2 -2
- package/src/components/textarea.tsx +3 -3
- package/src/components/toast.tsx +1 -1
- package/src/index.ts +4 -0
- package/src/styles/globals.css +2 -3
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React51 from 'react';
|
|
3
|
-
import { lazy, useMemo, useState, useRef, Suspense } from 'react';
|
|
3
|
+
import { lazy, useMemo, useState, useRef, useCallback, useEffect, Suspense } from 'react';
|
|
4
4
|
import { MarkerType, useNodesState, useEdgesState, ReactFlow, Background, Handle, Position } from '@xyflow/react';
|
|
5
5
|
import '@xyflow/react/dist/style.css';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -451,6 +451,7 @@ __export(index_exports, {
|
|
|
451
451
|
Stat: () => Stat,
|
|
452
452
|
StepDots: () => StepDots,
|
|
453
453
|
StepProgress: () => StepProgress,
|
|
454
|
+
SupportChat: () => SupportChat,
|
|
454
455
|
Switch: () => Switch,
|
|
455
456
|
Table: () => Table,
|
|
456
457
|
TableBody: () => TableBody,
|
|
@@ -507,7 +508,7 @@ function cn(...inputs) {
|
|
|
507
508
|
return twMerge(clsx(inputs));
|
|
508
509
|
}
|
|
509
510
|
var buttonVariants = cva(
|
|
510
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-semibold
|
|
511
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-semibold transition-all duration-200 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",
|
|
511
512
|
{
|
|
512
513
|
variants: {
|
|
513
514
|
variant: {
|
|
@@ -645,7 +646,7 @@ var SheetContent = React51.forwardRef(({ side = "right", className, children, ..
|
|
|
645
646
|
...props,
|
|
646
647
|
children: [
|
|
647
648
|
children,
|
|
648
|
-
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70
|
|
649
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-gray-100", children: [
|
|
649
650
|
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
650
651
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
651
652
|
] })
|
|
@@ -1500,8 +1501,8 @@ var Input = React51.forwardRef(
|
|
|
1500
1501
|
{
|
|
1501
1502
|
type,
|
|
1502
1503
|
className: cn(
|
|
1503
|
-
"flex h-10 w-full rounded-sm border bg-white px-3 py-2 text-base text-[var(--black)]
|
|
1504
|
-
error ? "border-red-500
|
|
1504
|
+
"flex h-10 w-full rounded-sm border bg-white px-3 py-2 text-base text-[var(--black)] file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-[var(--black)] placeholder:text-gray-500 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm transition-colors",
|
|
1505
|
+
error ? "border-red-500" : "border-gray-300",
|
|
1505
1506
|
className
|
|
1506
1507
|
),
|
|
1507
1508
|
ref,
|
|
@@ -1580,8 +1581,8 @@ var Textarea = React51.forwardRef(
|
|
|
1580
1581
|
"textarea",
|
|
1581
1582
|
{
|
|
1582
1583
|
className: cn(
|
|
1583
|
-
"flex min-h-[80px] w-full rounded-sm border bg-white px-3 py-2 text-base text-[var(--black)]
|
|
1584
|
-
error ? "border-red-500
|
|
1584
|
+
"flex min-h-[80px] w-full rounded-sm border bg-white px-3 py-2 text-base text-[var(--black)] placeholder:text-gray-500 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm transition-colors resize-none",
|
|
1585
|
+
error ? "border-red-500" : "border-gray-300",
|
|
1585
1586
|
className
|
|
1586
1587
|
),
|
|
1587
1588
|
ref,
|
|
@@ -1600,12 +1601,12 @@ var Select = React51.forwardRef(
|
|
|
1600
1601
|
{
|
|
1601
1602
|
ref,
|
|
1602
1603
|
className: cn(
|
|
1603
|
-
"h-10 w-full rounded-sm border bg-white px-3 py-2 text-base text-[var(--black)]
|
|
1604
|
+
"h-10 w-full rounded-sm border bg-white px-3 py-2 text-base text-[var(--black)]",
|
|
1604
1605
|
"placeholder:text-gray-500",
|
|
1605
|
-
"focus-visible:outline-none
|
|
1606
|
+
"focus-visible:outline-none",
|
|
1606
1607
|
"disabled:cursor-not-allowed disabled:opacity-50 md:text-sm transition-colors",
|
|
1607
1608
|
"appearance-none pr-10",
|
|
1608
|
-
error ? "border-red-500
|
|
1609
|
+
error ? "border-red-500" : "border-gray-300",
|
|
1609
1610
|
className
|
|
1610
1611
|
),
|
|
1611
1612
|
"aria-invalid": error ? "true" : void 0,
|
|
@@ -1678,7 +1679,7 @@ var Switch = React51.forwardRef(({ className, size = "default", ...props }, ref)
|
|
|
1678
1679
|
SwitchPrimitive.Root,
|
|
1679
1680
|
{
|
|
1680
1681
|
className: cn(
|
|
1681
|
-
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none
|
|
1682
|
+
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[var(--cyan)] data-[state=unchecked]:bg-input",
|
|
1682
1683
|
sizeStyles[size].root,
|
|
1683
1684
|
className
|
|
1684
1685
|
),
|
|
@@ -1768,8 +1769,8 @@ var Slider = React51.forwardRef(({ className, showValue, formatValue, size = "de
|
|
|
1768
1769
|
SliderPrimitive.Thumb,
|
|
1769
1770
|
{
|
|
1770
1771
|
className: cn(
|
|
1771
|
-
"block rounded-full border-2 border-[var(--cyan)] bg-white shadow-md
|
|
1772
|
-
"focus-visible:outline-none
|
|
1772
|
+
"block rounded-full border-2 border-[var(--cyan)] bg-white shadow-md transition-colors",
|
|
1773
|
+
"focus-visible:outline-none",
|
|
1773
1774
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
1774
1775
|
"hover:border-[var(--cyan-dark,#00bfaa)] cursor-pointer",
|
|
1775
1776
|
sizeStyles[size].thumb
|
|
@@ -1808,7 +1809,7 @@ var RadioGroupItem = React51.forwardRef(({ className, ...props }, ref) => {
|
|
|
1808
1809
|
{
|
|
1809
1810
|
ref,
|
|
1810
1811
|
className: cn(
|
|
1811
|
-
"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:
|
|
1812
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
1812
1813
|
className
|
|
1813
1814
|
),
|
|
1814
1815
|
...props,
|
|
@@ -1843,7 +1844,7 @@ var RadioGroupCard = React51.forwardRef(({ label, description, children, classNa
|
|
|
1843
1844
|
ref,
|
|
1844
1845
|
id: cardId,
|
|
1845
1846
|
className: cn(
|
|
1846
|
-
"relative flex cursor-pointer rounded-lg border bg-background p-4 transition-all hover:border-[var(--cyan)]/50 focus:outline-none focus-visible:
|
|
1847
|
+
"relative flex cursor-pointer rounded-lg border bg-background p-4 transition-all hover:border-[var(--cyan)]/50 focus:outline-none focus-visible:outline-none data-[state=checked]:border-[var(--cyan)] data-[state=checked]:ring-1 data-[state=checked]:ring-[var(--cyan)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
1847
1848
|
className
|
|
1848
1849
|
),
|
|
1849
1850
|
...props,
|
|
@@ -2522,7 +2523,7 @@ var FormField = React51.forwardRef(
|
|
|
2522
2523
|
"aria-describedby": error ? errorId : helperText ? helperId : void 0,
|
|
2523
2524
|
className: cn(
|
|
2524
2525
|
childProps.className,
|
|
2525
|
-
error && "border-red-500
|
|
2526
|
+
error && "border-red-500"
|
|
2526
2527
|
)
|
|
2527
2528
|
});
|
|
2528
2529
|
}
|
|
@@ -2657,7 +2658,7 @@ var TabsTrigger = React51.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2657
2658
|
{
|
|
2658
2659
|
ref,
|
|
2659
2660
|
className: cn(
|
|
2660
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium
|
|
2661
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
2661
2662
|
className
|
|
2662
2663
|
),
|
|
2663
2664
|
...props
|
|
@@ -2669,7 +2670,7 @@ var TabsContent = React51.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2669
2670
|
{
|
|
2670
2671
|
ref,
|
|
2671
2672
|
className: cn(
|
|
2672
|
-
"mt-2
|
|
2673
|
+
"mt-2 focus-visible:outline-none",
|
|
2673
2674
|
className
|
|
2674
2675
|
),
|
|
2675
2676
|
...props
|
|
@@ -2731,7 +2732,7 @@ var DialogContent = React51.forwardRef(({ className, children, ...props }, ref)
|
|
|
2731
2732
|
...props,
|
|
2732
2733
|
children: [
|
|
2733
2734
|
children,
|
|
2734
|
-
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70
|
|
2735
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-gray-100", children: [
|
|
2735
2736
|
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
2736
2737
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
2737
2738
|
] })
|
|
@@ -3041,7 +3042,7 @@ var ToastAction = React51.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3041
3042
|
{
|
|
3042
3043
|
ref,
|
|
3043
3044
|
className: cn(
|
|
3044
|
-
"inline-flex h-8 shrink-0 items-center justify-center rounded-sm border bg-transparent px-3 text-sm font-medium
|
|
3045
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-sm border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-gray-100 focus:outline-none disabled:pointer-events-none disabled:opacity-50",
|
|
3045
3046
|
className
|
|
3046
3047
|
),
|
|
3047
3048
|
...props
|
|
@@ -3800,7 +3801,7 @@ var DateRangeSelect = React51.forwardRef(
|
|
|
3800
3801
|
value,
|
|
3801
3802
|
onChange: (e) => onChange(e.target.value),
|
|
3802
3803
|
className: cn(
|
|
3803
|
-
"h-9 rounded-sm border border-input bg-background px-3 text-sm
|
|
3804
|
+
"h-9 rounded-sm border border-input bg-background px-3 text-sm focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
3804
3805
|
className
|
|
3805
3806
|
),
|
|
3806
3807
|
children: presets.map((preset) => /* @__PURE__ */ jsx("option", { value: preset, children: presetLabels[preset] }, preset))
|
|
@@ -4656,7 +4657,7 @@ function ImpactMetricsForm({
|
|
|
4656
4657
|
...prev,
|
|
4657
4658
|
time_saved_minutes_per_run: parseInt(e.target.value) || 0
|
|
4658
4659
|
})),
|
|
4659
|
-
className: "w-16 px-2 py-1 text-2xl font-bold border border-border rounded-sm focus:outline-none
|
|
4660
|
+
className: "w-16 px-2 py-1 text-2xl font-bold border border-border rounded-sm focus:outline-none bg-background",
|
|
4660
4661
|
min: "0"
|
|
4661
4662
|
}
|
|
4662
4663
|
),
|
|
@@ -4679,7 +4680,7 @@ function ImpactMetricsForm({
|
|
|
4679
4680
|
...prev,
|
|
4680
4681
|
hourly_rate_euros: parseFloat(e.target.value) || 0
|
|
4681
4682
|
})),
|
|
4682
|
-
className: "w-16 px-2 py-1 text-2xl font-bold border border-border rounded-sm focus:outline-none
|
|
4683
|
+
className: "w-16 px-2 py-1 text-2xl font-bold border border-border rounded-sm focus:outline-none bg-background",
|
|
4683
4684
|
min: "0",
|
|
4684
4685
|
step: "0.5"
|
|
4685
4686
|
}
|
|
@@ -4703,7 +4704,7 @@ function ImpactMetricsForm({
|
|
|
4703
4704
|
...prev,
|
|
4704
4705
|
fte_equivalent: (parseFloat(e.target.value) || 0) / 100
|
|
4705
4706
|
})),
|
|
4706
|
-
className: "w-16 px-2 py-1 text-2xl font-bold border border-border rounded-sm focus:outline-none
|
|
4707
|
+
className: "w-16 px-2 py-1 text-2xl font-bold border border-border rounded-sm focus:outline-none bg-background",
|
|
4707
4708
|
min: "0",
|
|
4708
4709
|
max: "1000",
|
|
4709
4710
|
step: "5"
|
|
@@ -4867,6 +4868,135 @@ function ActivityTimeline({
|
|
|
4867
4868
|
] })
|
|
4868
4869
|
] });
|
|
4869
4870
|
}
|
|
4871
|
+
function formatMessageTime(dateStr) {
|
|
4872
|
+
const d = new Date(dateStr);
|
|
4873
|
+
const now = /* @__PURE__ */ new Date();
|
|
4874
|
+
const diffMs = now.getTime() - d.getTime();
|
|
4875
|
+
const diffMins = Math.floor(diffMs / 6e4);
|
|
4876
|
+
const diffHours = Math.floor(diffMs / 36e5);
|
|
4877
|
+
if (diffMins < 1) return "just now";
|
|
4878
|
+
if (diffMins < 60) return `${diffMins}m ago`;
|
|
4879
|
+
if (diffHours < 24) return `${diffHours}h ago`;
|
|
4880
|
+
return d.toLocaleDateString(void 0, { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" });
|
|
4881
|
+
}
|
|
4882
|
+
function SupportChat({
|
|
4883
|
+
messagesEndpoint,
|
|
4884
|
+
sendEndpoint,
|
|
4885
|
+
currentRole,
|
|
4886
|
+
pollInterval = 5e3,
|
|
4887
|
+
placeholder = "Type a message...",
|
|
4888
|
+
emptyMessage = "No messages yet. Start the conversation!",
|
|
4889
|
+
className = ""
|
|
4890
|
+
}) {
|
|
4891
|
+
const [messages, setMessages] = useState([]);
|
|
4892
|
+
const [loading, setLoading] = useState(true);
|
|
4893
|
+
const [sending, setSending] = useState(false);
|
|
4894
|
+
const [inputValue, setInputValue] = useState("");
|
|
4895
|
+
const scrollRef = useRef(null);
|
|
4896
|
+
const prevMessageCountRef = useRef(0);
|
|
4897
|
+
const fetchMessages = useCallback(async () => {
|
|
4898
|
+
try {
|
|
4899
|
+
const res = await fetch(messagesEndpoint);
|
|
4900
|
+
if (!res.ok) return;
|
|
4901
|
+
const data = await res.json();
|
|
4902
|
+
setMessages(data.messages || []);
|
|
4903
|
+
} catch {
|
|
4904
|
+
} finally {
|
|
4905
|
+
setLoading(false);
|
|
4906
|
+
}
|
|
4907
|
+
}, [messagesEndpoint]);
|
|
4908
|
+
useEffect(() => {
|
|
4909
|
+
fetchMessages();
|
|
4910
|
+
if (pollInterval > 0) {
|
|
4911
|
+
const interval = setInterval(fetchMessages, pollInterval);
|
|
4912
|
+
return () => clearInterval(interval);
|
|
4913
|
+
}
|
|
4914
|
+
}, [fetchMessages, pollInterval]);
|
|
4915
|
+
useEffect(() => {
|
|
4916
|
+
if (messages.length > prevMessageCountRef.current) {
|
|
4917
|
+
scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight, behavior: "smooth" });
|
|
4918
|
+
}
|
|
4919
|
+
prevMessageCountRef.current = messages.length;
|
|
4920
|
+
}, [messages.length]);
|
|
4921
|
+
const handleSend = async () => {
|
|
4922
|
+
const content = inputValue.trim();
|
|
4923
|
+
if (!content || sending) return;
|
|
4924
|
+
setSending(true);
|
|
4925
|
+
setInputValue("");
|
|
4926
|
+
const optimisticMsg = {
|
|
4927
|
+
id: `temp-${Date.now()}`,
|
|
4928
|
+
role: currentRole,
|
|
4929
|
+
content,
|
|
4930
|
+
type: "message",
|
|
4931
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4932
|
+
};
|
|
4933
|
+
setMessages((prev) => [...prev, optimisticMsg]);
|
|
4934
|
+
try {
|
|
4935
|
+
const res = await fetch(sendEndpoint, {
|
|
4936
|
+
method: "POST",
|
|
4937
|
+
headers: { "Content-Type": "application/json" },
|
|
4938
|
+
body: JSON.stringify({ content })
|
|
4939
|
+
});
|
|
4940
|
+
if (res.ok) {
|
|
4941
|
+
await fetchMessages();
|
|
4942
|
+
} else {
|
|
4943
|
+
setMessages((prev) => prev.filter((m) => m.id !== optimisticMsg.id));
|
|
4944
|
+
}
|
|
4945
|
+
} catch {
|
|
4946
|
+
setMessages((prev) => prev.filter((m) => m.id !== optimisticMsg.id));
|
|
4947
|
+
} finally {
|
|
4948
|
+
setSending(false);
|
|
4949
|
+
}
|
|
4950
|
+
};
|
|
4951
|
+
const handleKeyDown = (e) => {
|
|
4952
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
4953
|
+
e.preventDefault();
|
|
4954
|
+
handleSend();
|
|
4955
|
+
}
|
|
4956
|
+
};
|
|
4957
|
+
if (loading) {
|
|
4958
|
+
return /* @__PURE__ */ jsx("div", { className: `flex items-center justify-center py-8 ${className}`, children: /* @__PURE__ */ jsx(CircleNotch, { className: "w-5 h-5 animate-spin text-muted-foreground" }) });
|
|
4959
|
+
}
|
|
4960
|
+
return /* @__PURE__ */ jsxs("div", { className: `flex flex-col ${className}`, children: [
|
|
4961
|
+
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto space-y-3 mb-4 max-h-[400px] min-h-[200px] px-1", children: messages.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full text-sm text-muted-foreground py-8", children: typeof emptyMessage === "string" ? /* @__PURE__ */ jsx("p", { children: emptyMessage }) : emptyMessage }) : messages.map((msg) => {
|
|
4962
|
+
if (msg.type === "event" || msg.role === "system") {
|
|
4963
|
+
return /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "bg-gray-50 border border-gray-100 rounded-full px-3 py-1 text-xs text-muted-foreground max-w-[90%] text-center", children: [
|
|
4964
|
+
msg.content,
|
|
4965
|
+
/* @__PURE__ */ jsx("span", { className: "ml-2 opacity-60", children: formatMessageTime(msg.created_at) })
|
|
4966
|
+
] }) }, msg.id);
|
|
4967
|
+
}
|
|
4968
|
+
const isCurrentUser = msg.role === currentRole;
|
|
4969
|
+
return /* @__PURE__ */ jsx("div", { className: `flex ${isCurrentUser ? "justify-end" : "justify-start"}`, children: /* @__PURE__ */ jsxs("div", { className: `max-w-[80%] rounded-lg px-3 py-2 ${isCurrentUser ? "bg-[var(--cyan)] text-white" : "bg-gray-100 text-[var(--black)]"}`, children: [
|
|
4970
|
+
!isCurrentUser && /* @__PURE__ */ jsx("p", { className: "text-xs font-medium mb-0.5 opacity-70", children: msg.role === "admin" ? "Dilipod Team" : "You" }),
|
|
4971
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm whitespace-pre-wrap", children: msg.content }),
|
|
4972
|
+
/* @__PURE__ */ jsx("p", { className: `text-[10px] mt-1 ${isCurrentUser ? "text-white/60" : "text-muted-foreground"}`, children: formatMessageTime(msg.created_at) })
|
|
4973
|
+
] }) }, msg.id);
|
|
4974
|
+
}) }),
|
|
4975
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2 border-t border-gray-100 pt-3", children: [
|
|
4976
|
+
/* @__PURE__ */ jsx(
|
|
4977
|
+
Textarea,
|
|
4978
|
+
{
|
|
4979
|
+
value: inputValue,
|
|
4980
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
4981
|
+
onKeyDown: handleKeyDown,
|
|
4982
|
+
placeholder,
|
|
4983
|
+
rows: 1,
|
|
4984
|
+
className: "resize-none min-h-[36px] py-2 flex-1"
|
|
4985
|
+
}
|
|
4986
|
+
),
|
|
4987
|
+
/* @__PURE__ */ jsx(
|
|
4988
|
+
Button,
|
|
4989
|
+
{
|
|
4990
|
+
onClick: handleSend,
|
|
4991
|
+
disabled: sending || !inputValue.trim(),
|
|
4992
|
+
size: "sm",
|
|
4993
|
+
className: "flex-shrink-0 h-9",
|
|
4994
|
+
children: sending ? /* @__PURE__ */ jsx(CircleNotch, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ jsx(PaperPlaneTilt, { className: "w-4 h-4", weight: "bold" })
|
|
4995
|
+
}
|
|
4996
|
+
)
|
|
4997
|
+
] })
|
|
4998
|
+
] });
|
|
4999
|
+
}
|
|
4870
5000
|
|
|
4871
5001
|
// src/index.ts
|
|
4872
5002
|
init_workflow_flow();
|
|
@@ -6610,6 +6740,6 @@ function WorkerSpec({ documentation, className }) {
|
|
|
6610
6740
|
// src/index.ts
|
|
6611
6741
|
__reExport(index_exports, icons_exports);
|
|
6612
6742
|
|
|
6613
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityTimeline, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, BreadcrumbLink, Breadcrumbs, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, ConfirmDialog, DateRangePicker, DateRangeSelect, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorState, FilePreview, FlowchartDiagram, FormField, IconBox, ImpactMetricsForm, Input, Label2 as Label, LabeledSlider, LabeledSwitch, Logo, Metric, MetricCard, MetricLabel, MetricSubtext, MetricValue, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupCard, RadioGroupItem, RadioGroupOption, ScenariosManager, Select, Separator2 as Separator, SettingsNav, SettingsNavLink, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SimplePagination, SimpleTooltip, Skeleton, SkeletonCard, SkeletonText, Slider, Stat, StepDots, StepProgress, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsListUnderline, TabsTrigger, TabsTriggerUnderline, Tag, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastIcon, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, UsageBar, UsageChart, WorkerSpec, WorkflowFlow, WorkflowViewer, alertVariants, badgeVariants, buttonVariants, cn, getDateRangeFromPreset, iconBoxVariants, metricCardVariants, navigationMenuTriggerStyle, progressVariants, statVariants, tagVariants, toast, usageBarVariants, useToast, valueVariants };
|
|
6743
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityTimeline, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, BreadcrumbLink, Breadcrumbs, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, ConfirmDialog, DateRangePicker, DateRangeSelect, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorState, FilePreview, FlowchartDiagram, FormField, IconBox, ImpactMetricsForm, Input, Label2 as Label, LabeledSlider, LabeledSwitch, Logo, Metric, MetricCard, MetricLabel, MetricSubtext, MetricValue, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupCard, RadioGroupItem, RadioGroupOption, ScenariosManager, Select, Separator2 as Separator, SettingsNav, SettingsNavLink, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SimplePagination, SimpleTooltip, Skeleton, SkeletonCard, SkeletonText, Slider, Stat, StepDots, StepProgress, SupportChat, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsListUnderline, TabsTrigger, TabsTriggerUnderline, Tag, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastIcon, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, UsageBar, UsageChart, WorkerSpec, WorkflowFlow, WorkflowViewer, alertVariants, badgeVariants, buttonVariants, cn, getDateRangeFromPreset, iconBoxVariants, metricCardVariants, navigationMenuTriggerStyle, progressVariants, statVariants, tagVariants, toast, usageBarVariants, useToast, valueVariants };
|
|
6614
6744
|
//# sourceMappingURL=index.mjs.map
|
|
6615
6745
|
//# sourceMappingURL=index.mjs.map
|