@humain/ui 2.1.62 → 2.1.65
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/organisms/ai/AIToolCall/AIToolCall.d.ts +9 -3
- package/dist/components/organisms/ai/AIToolRun/index.d.ts +1 -1
- package/dist/components/organisms/ai/AIToolRun/validation.d.ts +24 -3
- package/dist/components/organisms/ai/_shared/format-ai-duration.d.ts +1 -0
- package/dist/components/organisms/ai/_shared/workflow-step-renderer.d.ts +1 -0
- package/dist/index.js +52 -52
- package/dist/index151.js +1 -1
- package/dist/index174.js +10 -333
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +310 -137
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +148 -174
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +186 -78
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +74 -124
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +133 -1
- package/dist/index179.js.map +1 -0
- package/dist/index180.js +2 -201
- package/dist/index181.js +201 -0
- package/dist/{index180.js.map → index181.js.map} +1 -1
- package/dist/index183.js +130 -166
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +195 -983
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +1069 -369
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +395 -197
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +198 -243
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +263 -3
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +3 -209
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +190 -777
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +771 -252
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +250 -65
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +72 -523
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +537 -144
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +139 -720
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +707 -167
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +175 -151
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +152 -487
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +472 -225
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +236 -260
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +265 -215
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +207 -307
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +302 -135
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +140 -271
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +263 -253
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +244 -137
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +100 -238
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +278 -74
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +56 -97
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +142 -47
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +38 -84
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +72 -252
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +274 -26
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +29 -94
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +98 -25
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +20 -565
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +564 -17
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +20 -23
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +20 -95
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +92 -88
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +97 -29
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +24 -470
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +446 -196
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +199 -729
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +750 -61
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +58 -181
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +175 -259
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +246 -172
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +195 -32
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +12 -40
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +23 -26
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +45 -22
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +27 -48
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +52 -26
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +40 -225
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +217 -39
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +50 -0
- package/dist/index237.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/wc/AIToolCall.js +218 -0
- package/dist/wc/AIToolCall.js.map +1 -0
- package/dist/wc/hf-ai-tool-call.js +34 -219
- package/dist/wc/hf-ai-tool-call.js.map +1 -1
- package/dist/wc/hf-ai-tool-run.js +673 -576
- package/dist/wc/hf-ai-tool-run.js.map +1 -1
- package/dist/wc/workflow-step-renderer.js +94 -86
- package/dist/wc/workflow-step-renderer.js.map +1 -1
- package/dist/wc-react/AIToolCall.js +218 -0
- package/dist/wc-react/AIToolCall.js.map +1 -0
- package/dist/wc-react/hf-ai-tool-call.js +32 -217
- package/dist/wc-react/hf-ai-tool-call.js.map +1 -1
- package/dist/wc-react/hf-ai-tool-run.js +698 -601
- package/dist/wc-react/hf-ai-tool-run.js.map +1 -1
- package/dist/wc-react/workflow-step-renderer.js +76 -68
- package/dist/wc-react/workflow-step-renderer.js.map +1 -1
- package/package.json +1 -1
- package/skills/humain-ui/SKILL.md +1 -1
- package/skills/humain-ui-wc/SKILL.md +1 -1
- package/skills/humain-ui-wc.skill +0 -0
- package/skills/humain-ui.skill +0 -0
- package/dist/index182.js +0 -143
- package/dist/index182.js.map +0 -1
- package/dist/wc/wrench.js +0 -10
- package/dist/wc/wrench.js.map +0 -1
- package/dist/wc-react/wrench.js +0 -10
- package/dist/wc-react/wrench.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare const toolCallVariants: (props?: ({
|
|
4
4
|
status?: "success" | "error" | "running" | "pending" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -68,13 +68,19 @@ declare namespace AIToolCall {
|
|
|
68
68
|
}
|
|
69
69
|
export interface AIToolCallListProps {
|
|
70
70
|
/** Array of tool calls */
|
|
71
|
-
toolCalls: ToolCallPart[];
|
|
71
|
+
toolCalls: readonly ToolCallPart[];
|
|
72
72
|
/** Whether to expand all by default */
|
|
73
73
|
defaultAllOpen?: boolean;
|
|
74
|
+
/** Tool-call IDs to expand initially in uncontrolled mode */
|
|
75
|
+
defaultOpenToolCallIds?: readonly string[];
|
|
76
|
+
/** Controlled expanded tool-call IDs */
|
|
77
|
+
openToolCallIds?: readonly string[];
|
|
78
|
+
/** Called with expanded IDs in current tool-call order */
|
|
79
|
+
onOpenToolCallIdsChange?: (ids: readonly string[]) => void;
|
|
74
80
|
/** Additional class name */
|
|
75
81
|
className?: string;
|
|
76
82
|
}
|
|
77
|
-
declare function AIToolCallList({ toolCalls, defaultAllOpen, className, }: AIToolCallListProps): React.JSX.Element;
|
|
83
|
+
declare function AIToolCallList({ toolCalls, defaultAllOpen, defaultOpenToolCallIds, openToolCallIds: controlledOpenToolCallIds, onOpenToolCallIdsChange, className, }: AIToolCallListProps): React.JSX.Element;
|
|
78
84
|
declare namespace AIToolCallList {
|
|
79
85
|
var displayName: string;
|
|
80
86
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { AIToolRunProps } from './AIToolRun.js';
|
|
2
2
|
export { AIToolRun } from './AIToolRun.js';
|
|
3
|
-
export type { AIToolRunAction, AIToolRunActionEvent, AIToolRunActionKind, AIToolRunProgress, AIToolRunSnapshot, AIToolRunSource, AIToolRunStatus, AIToolRunStep, AIToolRunToolCallSummary, AIToolRunValidationResult, } from './validation.js';
|
|
3
|
+
export type { AIToolRunAction, AIToolRunActionEvent, AIToolRunActionKind, AIToolRunContext, AIToolRunProgress, AIToolRunSnapshot, AIToolRunSource, AIToolRunStatus, AIToolRunStep, AIToolRunTechnicalDetails, AIToolRunToolCallSummary, AIToolRunValidationResult, } from './validation.js';
|
|
4
4
|
export { validateAIToolRunSnapshot } from './validation.js';
|
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
import type { SourceData } from '../AISource/index.js';
|
|
2
|
+
import type { ToolCallPart } from '../AIToolCall/index.js';
|
|
2
3
|
export type AIToolRunStatus = 'ready' | 'running' | 'paused' | 'completed' | 'error';
|
|
3
4
|
export interface AIToolRunProgress {
|
|
4
5
|
value: number;
|
|
5
6
|
label?: string;
|
|
6
7
|
meta?: string;
|
|
7
8
|
}
|
|
8
|
-
export
|
|
9
|
+
export type AIToolRunSource = (SourceData & {
|
|
9
10
|
id: string;
|
|
11
|
+
kind?: 'link';
|
|
12
|
+
}) | {
|
|
13
|
+
id: string;
|
|
14
|
+
kind: 'reference';
|
|
15
|
+
title: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
url?: never;
|
|
18
|
+
favicon?: never;
|
|
19
|
+
siteName?: never;
|
|
20
|
+
};
|
|
21
|
+
export interface AIToolRunContext {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
}
|
|
25
|
+
export interface AIToolRunTechnicalDetails {
|
|
26
|
+
label?: string;
|
|
27
|
+
toolCalls: readonly ToolCallPart[];
|
|
10
28
|
}
|
|
11
29
|
interface AIToolRunToolCallSummaryBase {
|
|
12
30
|
toolCallId: string;
|
|
@@ -32,6 +50,8 @@ interface AIToolRunStepBase<S extends AIToolRunToolCallSummary['status']> {
|
|
|
32
50
|
toolCall: AIToolRunSummaryAt<S>;
|
|
33
51
|
title?: string;
|
|
34
52
|
description?: string;
|
|
53
|
+
context?: AIToolRunContext;
|
|
54
|
+
technicalDetails?: AIToolRunTechnicalDetails;
|
|
35
55
|
}
|
|
36
56
|
export type AIToolRunStep = (AIToolRunStepBase<'pending'> & {
|
|
37
57
|
progress?: never;
|
|
@@ -42,7 +62,7 @@ export type AIToolRunStep = (AIToolRunStepBase<'pending'> & {
|
|
|
42
62
|
progress?: AIToolRunProgress;
|
|
43
63
|
sourceIds?: readonly string[];
|
|
44
64
|
currentSourceId?: string;
|
|
45
|
-
durationMs?:
|
|
65
|
+
durationMs?: number;
|
|
46
66
|
}) | (AIToolRunStepBase<'success'> & {
|
|
47
67
|
durationMs?: number;
|
|
48
68
|
sourceIds?: readonly string[];
|
|
@@ -52,7 +72,7 @@ export type AIToolRunStep = (AIToolRunStepBase<'pending'> & {
|
|
|
52
72
|
sourceIds?: readonly string[];
|
|
53
73
|
progress?: never;
|
|
54
74
|
currentSourceId?: never;
|
|
55
|
-
durationMs?:
|
|
75
|
+
durationMs?: number;
|
|
56
76
|
});
|
|
57
77
|
export type AIToolRunActionKind = 'start' | 'pause' | 'resume' | 'retry' | 'dismiss' | 'custom';
|
|
58
78
|
interface AIToolRunActionBase {
|
|
@@ -69,6 +89,7 @@ export type AIToolRunAction = (AIToolRunActionBase & {
|
|
|
69
89
|
});
|
|
70
90
|
interface AIToolRunSnapshotBase {
|
|
71
91
|
runId: string;
|
|
92
|
+
durationMs?: number;
|
|
72
93
|
header: {
|
|
73
94
|
title: string;
|
|
74
95
|
description?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatAIDuration(durationMs: number): string;
|
package/dist/index.js
CHANGED
|
@@ -107,56 +107,56 @@ import { AIReasoningBlock, AIReasoningContent, AIReasoningTrigger, AIThinkingBar
|
|
|
107
107
|
import { AIResponseStream, FadeText, TypewriterText, useTextStream } from "./index170.js";
|
|
108
108
|
import { AISelect } from "./index171.js";
|
|
109
109
|
import { AISource, AISourceContent, AISourceList, AISourceTrigger, SourceFavicon, sourceVariants } from "./index173.js";
|
|
110
|
-
import { AIStepItem, AISteps, StepIcon, stepIconVariants, stepItemVariants, stepsContainerVariants } from "./
|
|
111
|
-
import { AISystemMessage, AISystemMessageBanner, systemMessageIconVariants, systemMessageVariants } from "./
|
|
112
|
-
import { AITable } from "./
|
|
113
|
-
import { AILoadingDots, AIPulseText, AITextShimmer, AITypingText, shimmerPresets, textShimmerVariants } from "./
|
|
114
|
-
import { AIThinkingLoader, CountdownTimer } from "./
|
|
115
|
-
import { AIToolCall, AIToolCallHeader, AIToolCallList, StatusIcon, ToolCallSection, statusIconVariants, toolCallVariants } from "./
|
|
116
|
-
import { validateAIToolRunSnapshot } from "./
|
|
117
|
-
import { AIToolRun } from "./
|
|
118
|
-
import { ActivityFeed, ActivityFeedItem, activityFeedVariants, activityItemVariants } from "./
|
|
119
|
-
import { Tooltip as TooltipCompound, TooltipAvatar, TooltipBadge, TooltipContent, TooltipIcon, TooltipImage, TooltipPopup, TooltipProvider, TooltipRoot, TooltipSubtitle, TooltipTitle, TooltipTrigger, arrowVariants, tooltipVariants } from "./
|
|
120
|
-
import { DataTableActionsCell, DataTableAvatarCell, DataTableBadgesCell, DataTableCell, DataTableCellRoot, DataTableProgressCell, DataTableRatingCell, DataTableSparklineCell, DataTableSwitchCell, DataTableTextCell, DataTableTrendCell } from "./
|
|
121
|
-
import { DataTable, SortableHeader, createSelectColumn, dataTableCellVariants, dataTableHeaderCellVariants, dataTableRowVariants, dataTableVariants, useDataTable } from "./
|
|
122
|
-
import { DropdownMenu } from "./
|
|
123
|
-
import { DataTableToolbar } from "./
|
|
124
|
-
import { EmptyState, EmptyStateBackgroundPattern, EmptyStateIllustration } from "./
|
|
125
|
-
import { GroupingControls } from "./
|
|
126
|
-
import { History, HistoryValue, historyEventCategoryConfig, historyHeaderActionConfig } from "./
|
|
127
|
-
import { InlineCTA, inlineCTAVariants } from "./
|
|
128
|
-
import { MetricCard, metricCardVariants } from "./
|
|
129
|
-
import { MetricChange, MetricItem, MetricMiniChart, metricChangeVariants, metricItemVariants, metricMiniChartVariants } from "./
|
|
130
|
-
import { NotificationItem, notificationItemVariants } from "./
|
|
131
|
-
import { NotificationPanel, NotificationPanelItem, NotificationSection, notificationDotVariants, notificationPanelVariants } from "./
|
|
132
|
-
import { Steps as StepsCompound, StepsItem, StepsSubtext, stepConnectorVariants, stepIndicatorVariants, stepLabelVariants, stepSubtextVariants } from "./
|
|
133
|
-
import { PageHeader, bannerVariants, contentVariants, pageHeaderVariants } from "./
|
|
134
|
-
import { SectionHeader } from "./
|
|
135
|
-
import { CommandMenu, CommandMenuFooter, CommandMenuGroupHeader, CommandMenuItem, CommandMenuPanel, CommandShortcutBadge, FooterNavIcon, FooterNavText, defaultFooterHints } from "./
|
|
136
|
-
import { ContextMenu, ContextMenuCheckboxItem as CheckboxItem, ContextMenuGroup as Group, ContextMenuItem as Item, ContextMenuLabel as Label, ContextMenuPopup as Popup$1, ContextMenuPortal as Portal$1, ContextMenuRadioGroup as RadioGroup, ContextMenuRadioItem as RadioItem, ContextMenuRoot as Root$1, ContextMenuSeparator as Separator, ContextMenuShortcut as Shortcut, ContextMenuSub as Sub, ContextMenuSubPopup as SubPopup, ContextMenuSubTrigger as SubTrigger, ContextMenuTrigger as Trigger$1 } from "./
|
|
137
|
-
import { AlertDialog, AlertDialogAction as Action, AlertDialogBackdrop as Backdrop, AlertDialogCancel as Cancel, AlertDialogDescription as Description, AlertDialogFooter as Footer, AlertDialogHeader as Header, AlertDialogMedia as Media, AlertDialogPopup as Popup, AlertDialogPortal as Portal, AlertDialogRoot as Root, AlertDialogTitle as Title, AlertDialogTrigger as Trigger, AlertDialogViewport as Viewport } from "./
|
|
138
|
-
import { Dialog, DialogAction as Action$1, DialogBackdrop as Backdrop$1, DialogBody as Body, DialogCancel as Cancel$1, DialogClose as Close, DialogDescription as Description$1, DialogFooter as Footer$1, DialogHeader as Header$1, DialogHeaderContent as HeaderContent, DialogIcon as Icon, DialogPopup as Popup$2, DialogPortal as Portal$2, DialogRoot as Root$2, DialogTitle as Title$1, DialogTrigger as Trigger$2, DialogViewport as Viewport$1, dialogFooterVariants as footerVariants, dialogHeaderVariants as headerVariants, dialogIconVariants as iconVariants, dialogPopupVariants as popupVariants } from "./
|
|
139
|
-
import { Drawer, DrawerBackdrop as Backdrop$2, DrawerClose as Close$1, DrawerDescription as Description$2, DrawerFooter as Footer$2, DrawerHandle as Handle, DrawerHeader as Header$2, DrawerPopup as Popup$3, DrawerPortal as Portal$3, DrawerRoot as Root$3, DrawerTitle as Title$2, DrawerTrigger as Trigger$3, DrawerViewport as Viewport$2 } from "./
|
|
140
|
-
import { HoverCard as HoverCardCompound, HoverCardPopup, HoverCardTrigger } from "./
|
|
141
|
-
import { Popover as PopoverCompound, PopoverDescription, PopoverHeader, PopoverPopup, PopoverRoot, PopoverTitle, PopoverTrigger } from "./
|
|
142
|
-
import { Sheet, SheetBackdrop as Backdrop$3, SheetBody as Body$1, SheetClose as Close$2, SheetDescription as Description$3, SheetDivider as Divider, SheetFooter as Footer$3, SheetHeader as Header$3, SheetPopup as Popup$4, SheetPortal as Portal$4, SheetRoot as Root$4, SheetSection as Section, SheetTitle as Title$3, SheetTrigger as Trigger$4, SheetViewport as Viewport$3 } from "./
|
|
143
|
-
import { MOBILE_BREAKPOINT, useIsMobile } from "./
|
|
144
|
-
import { Sidebar as SidebarCompound, SidebarAccountSkeleton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarNavSkeleton, SidebarProvider, SidebarTrigger, useSidebar } from "./
|
|
145
|
-
import { PanelExpansionContext, PanelIndexContext, PanelLayoutContext, useAppShell, usePanelExpansion } from "./
|
|
146
|
-
import { AppShellContent } from "./
|
|
147
|
-
import { AppShellPanel } from "./
|
|
148
|
-
import { AppShell, AppShellHeader, AppShellRoot, AppShellSidebar, appShellBackgrounds } from "./
|
|
149
|
-
import { AppShellCard } from "./
|
|
150
|
-
import { AppSidebar, chatItemVariants, navItemVariants } from "./
|
|
151
|
-
import { PageBackground } from "./
|
|
152
|
-
import { AuthAsidePanel, AuthPageLayout, renderActionElement } from "./
|
|
153
|
-
import { NavAccountMenu, NavAccountMenuAccount, NavAccountMenuContent, NavAccountMenuFooter, NavAccountMenuHeader, NavAccountMenuItem, NavAccountMenuSection, NavAccountMenuSeparator, NavAccountMenuThemeSwitch, NavAccountMenuTrigger, navAccountMenuTriggerVariants as triggerVariants } from "./
|
|
154
|
-
import { ForgotPasswordPage } from "./
|
|
155
|
-
import { LoginPage } from "./
|
|
156
|
-
import { RegisterPage } from "./
|
|
157
|
-
import { ResetPasswordPage } from "./
|
|
158
|
-
import { TwoFactorAuthenticationPage } from "./
|
|
159
|
-
import { VerifyEmail as VerifyEmailPage } from "./
|
|
160
|
-
import { formatInteractionForLLM } from "./
|
|
161
|
-
import { useInteractionHandler } from "./
|
|
110
|
+
import { AIStepItem, AISteps, StepIcon, stepIconVariants, stepItemVariants, stepsContainerVariants } from "./index176.js";
|
|
111
|
+
import { AISystemMessage, AISystemMessageBanner, systemMessageIconVariants, systemMessageVariants } from "./index177.js";
|
|
112
|
+
import { AITable } from "./index179.js";
|
|
113
|
+
import { AILoadingDots, AIPulseText, AITextShimmer, AITypingText, shimmerPresets, textShimmerVariants } from "./index181.js";
|
|
114
|
+
import { AIThinkingLoader, CountdownTimer } from "./index183.js";
|
|
115
|
+
import { AIToolCall, AIToolCallHeader, AIToolCallList, StatusIcon, ToolCallSection, statusIconVariants, toolCallVariants } from "./index184.js";
|
|
116
|
+
import { validateAIToolRunSnapshot } from "./index185.js";
|
|
117
|
+
import { AIToolRun } from "./index186.js";
|
|
118
|
+
import { ActivityFeed, ActivityFeedItem, activityFeedVariants, activityItemVariants } from "./index187.js";
|
|
119
|
+
import { Tooltip as TooltipCompound, TooltipAvatar, TooltipBadge, TooltipContent, TooltipIcon, TooltipImage, TooltipPopup, TooltipProvider, TooltipRoot, TooltipSubtitle, TooltipTitle, TooltipTrigger, arrowVariants, tooltipVariants } from "./index188.js";
|
|
120
|
+
import { DataTableActionsCell, DataTableAvatarCell, DataTableBadgesCell, DataTableCell, DataTableCellRoot, DataTableProgressCell, DataTableRatingCell, DataTableSparklineCell, DataTableSwitchCell, DataTableTextCell, DataTableTrendCell } from "./index190.js";
|
|
121
|
+
import { DataTable, SortableHeader, createSelectColumn, dataTableCellVariants, dataTableHeaderCellVariants, dataTableRowVariants, dataTableVariants, useDataTable } from "./index191.js";
|
|
122
|
+
import { DropdownMenu } from "./index192.js";
|
|
123
|
+
import { DataTableToolbar } from "./index193.js";
|
|
124
|
+
import { EmptyState, EmptyStateBackgroundPattern, EmptyStateIllustration } from "./index194.js";
|
|
125
|
+
import { GroupingControls } from "./index195.js";
|
|
126
|
+
import { History, HistoryValue, historyEventCategoryConfig, historyHeaderActionConfig } from "./index196.js";
|
|
127
|
+
import { InlineCTA, inlineCTAVariants } from "./index197.js";
|
|
128
|
+
import { MetricCard, metricCardVariants } from "./index198.js";
|
|
129
|
+
import { MetricChange, MetricItem, MetricMiniChart, metricChangeVariants, metricItemVariants, metricMiniChartVariants } from "./index199.js";
|
|
130
|
+
import { NotificationItem, notificationItemVariants } from "./index200.js";
|
|
131
|
+
import { NotificationPanel, NotificationPanelItem, NotificationSection, notificationDotVariants, notificationPanelVariants } from "./index201.js";
|
|
132
|
+
import { Steps as StepsCompound, StepsItem, StepsSubtext, stepConnectorVariants, stepIndicatorVariants, stepLabelVariants, stepSubtextVariants } from "./index202.js";
|
|
133
|
+
import { PageHeader, bannerVariants, contentVariants, pageHeaderVariants } from "./index203.js";
|
|
134
|
+
import { SectionHeader } from "./index204.js";
|
|
135
|
+
import { CommandMenu, CommandMenuFooter, CommandMenuGroupHeader, CommandMenuItem, CommandMenuPanel, CommandShortcutBadge, FooterNavIcon, FooterNavText, defaultFooterHints } from "./index205.js";
|
|
136
|
+
import { ContextMenu, ContextMenuCheckboxItem as CheckboxItem, ContextMenuGroup as Group, ContextMenuItem as Item, ContextMenuLabel as Label, ContextMenuPopup as Popup$1, ContextMenuPortal as Portal$1, ContextMenuRadioGroup as RadioGroup, ContextMenuRadioItem as RadioItem, ContextMenuRoot as Root$1, ContextMenuSeparator as Separator, ContextMenuShortcut as Shortcut, ContextMenuSub as Sub, ContextMenuSubPopup as SubPopup, ContextMenuSubTrigger as SubTrigger, ContextMenuTrigger as Trigger$1 } from "./index206.js";
|
|
137
|
+
import { AlertDialog, AlertDialogAction as Action, AlertDialogBackdrop as Backdrop, AlertDialogCancel as Cancel, AlertDialogDescription as Description, AlertDialogFooter as Footer, AlertDialogHeader as Header, AlertDialogMedia as Media, AlertDialogPopup as Popup, AlertDialogPortal as Portal, AlertDialogRoot as Root, AlertDialogTitle as Title, AlertDialogTrigger as Trigger, AlertDialogViewport as Viewport } from "./index207.js";
|
|
138
|
+
import { Dialog, DialogAction as Action$1, DialogBackdrop as Backdrop$1, DialogBody as Body, DialogCancel as Cancel$1, DialogClose as Close, DialogDescription as Description$1, DialogFooter as Footer$1, DialogHeader as Header$1, DialogHeaderContent as HeaderContent, DialogIcon as Icon, DialogPopup as Popup$2, DialogPortal as Portal$2, DialogRoot as Root$2, DialogTitle as Title$1, DialogTrigger as Trigger$2, DialogViewport as Viewport$1, dialogFooterVariants as footerVariants, dialogHeaderVariants as headerVariants, dialogIconVariants as iconVariants, dialogPopupVariants as popupVariants } from "./index208.js";
|
|
139
|
+
import { Drawer, DrawerBackdrop as Backdrop$2, DrawerClose as Close$1, DrawerDescription as Description$2, DrawerFooter as Footer$2, DrawerHandle as Handle, DrawerHeader as Header$2, DrawerPopup as Popup$3, DrawerPortal as Portal$3, DrawerRoot as Root$3, DrawerTitle as Title$2, DrawerTrigger as Trigger$3, DrawerViewport as Viewport$2 } from "./index210.js";
|
|
140
|
+
import { HoverCard as HoverCardCompound, HoverCardPopup, HoverCardTrigger } from "./index211.js";
|
|
141
|
+
import { Popover as PopoverCompound, PopoverDescription, PopoverHeader, PopoverPopup, PopoverRoot, PopoverTitle, PopoverTrigger } from "./index212.js";
|
|
142
|
+
import { Sheet, SheetBackdrop as Backdrop$3, SheetBody as Body$1, SheetClose as Close$2, SheetDescription as Description$3, SheetDivider as Divider, SheetFooter as Footer$3, SheetHeader as Header$3, SheetPopup as Popup$4, SheetPortal as Portal$4, SheetRoot as Root$4, SheetSection as Section, SheetTitle as Title$3, SheetTrigger as Trigger$4, SheetViewport as Viewport$3 } from "./index213.js";
|
|
143
|
+
import { MOBILE_BREAKPOINT, useIsMobile } from "./index216.js";
|
|
144
|
+
import { Sidebar as SidebarCompound, SidebarAccountSkeleton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarNavSkeleton, SidebarProvider, SidebarTrigger, useSidebar } from "./index217.js";
|
|
145
|
+
import { PanelExpansionContext, PanelIndexContext, PanelLayoutContext, useAppShell, usePanelExpansion } from "./index218.js";
|
|
146
|
+
import { AppShellContent } from "./index219.js";
|
|
147
|
+
import { AppShellPanel } from "./index221.js";
|
|
148
|
+
import { AppShell, AppShellHeader, AppShellRoot, AppShellSidebar, appShellBackgrounds } from "./index223.js";
|
|
149
|
+
import { AppShellCard } from "./index224.js";
|
|
150
|
+
import { AppSidebar, chatItemVariants, navItemVariants } from "./index225.js";
|
|
151
|
+
import { PageBackground } from "./index226.js";
|
|
152
|
+
import { AuthAsidePanel, AuthPageLayout, renderActionElement } from "./index227.js";
|
|
153
|
+
import { NavAccountMenu, NavAccountMenuAccount, NavAccountMenuContent, NavAccountMenuFooter, NavAccountMenuHeader, NavAccountMenuItem, NavAccountMenuSection, NavAccountMenuSeparator, NavAccountMenuThemeSwitch, NavAccountMenuTrigger, navAccountMenuTriggerVariants as triggerVariants } from "./index228.js";
|
|
154
|
+
import { ForgotPasswordPage } from "./index230.js";
|
|
155
|
+
import { LoginPage } from "./index231.js";
|
|
156
|
+
import { RegisterPage } from "./index232.js";
|
|
157
|
+
import { ResetPasswordPage } from "./index233.js";
|
|
158
|
+
import { TwoFactorAuthenticationPage } from "./index234.js";
|
|
159
|
+
import { VerifyEmail as VerifyEmailPage } from "./index235.js";
|
|
160
|
+
import { formatInteractionForLLM } from "./index236.js";
|
|
161
|
+
import { useInteractionHandler } from "./index237.js";
|
|
162
162
|
export { AIAsciiDiagram, AIChart, AICodeBlock, AICodeBlockContent, AICodeBlockHeader, AIComponent, AIContainerCompound as AIContainer, AIContainerContext, AIContextIndicator, AIEmptyState, AIEmptyStateActions, AIEmptyStateDescription, AIEmptyStateIcon, AIEmptyStateRoot, AIEmptyStateSuggestionGrid, AIEmptyStateTitle, AIFeedbackBar, AIFeedbackIcons, AIForm, AIInput, AIInputActionBar, AIInputActions, AIInputAttachButton, AIInputFilePreview, AIInputLeadingIcon, AIInputRoot, AIInputSendButton, AIInputTextArea, AIInteractionContext, AIInteractionProvider, AILoadingDots, AIMermaidDiagram, AIMessage, AIMessageActions, AIMessageAttachmentPreview, AIMessageAttachments, AIMessageAvatar, AIMessageBubble, AIMessageContent, AIMessageCopyButton, AIMessageHeader, AIMessageListButton, AIMessageReactions, AIMessageRoot, AIMessageThumbsDown, AIMessageThumbsUp, AIMessageTypingIndicator, AIPromptSuggestion, AIPromptSuggestionCard, AIPromptSuggestionList, AIPulseText, AIQuickActions, AIReasoningBlock, AIReasoningContent, AIReasoningTrigger, AIResponseStream, AIScrollAnchor, AIScrollButton, AISelect, AISource, AISourceContent, AISourceList, AISourceTrigger, StepIcon as AIStepIcon, AIStepItem, AISteps, AISystemMessage, AISystemMessageBanner, AITable, AITextShimmer, AIThinkingBar, AIThinkingLoader, AIToolCall, AIToolCallHeader, AIToolCallList, AIToolRun, AITypingIndicator, AITypingText, AccordionCompound as Accordion, AccordionCardNamespace as AccordionCard, AccordionCardContent, AccordionCardEdit, AccordionCardHeader, AccordionCardTitle, AccordionCardTrigger, AccordionContent, AccordionItem, AccordionTrigger, ActionButton, ActivityFeed, ActivityFeedItem, Alert, AlertDescription, AlertDialog, Action as AlertDialogAction, Backdrop as AlertDialogBackdrop, Cancel as AlertDialogCancel, Description as AlertDialogDescription, Footer as AlertDialogFooter, Header as AlertDialogHeader, Media as AlertDialogMedia, Popup as AlertDialogPopup, Portal as AlertDialogPortal, Root as AlertDialogRoot, Title as AlertDialogTitle, Trigger as AlertDialogTrigger, Viewport as AlertDialogViewport, AlertTitle, AppShell, AppShellCard, AppShellContent, AppShellHeader, AppShellPanel, AppShellRoot, AppShellSidebar, AppSidebar, AspectRatio, AuthAsidePanel, AuthPageLayout, Autocomplete, Avatar, AvatarGroup, Badge, BadgeDot, BarChart, BrandIcon, BreadcrumbCompound as Breadcrumb, BreadcrumbEllipsis, BreadcrumbHomeLink, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroupCompound as ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarActions, CalendarContent, CalendarHeader, CalendarNavigation, CalendarSearch, CalendarTitle, CalendarViewSwitcher, Card, Carousel, CarouselNav, CarouselVisual, WrapperChartLegend as ChartLegend, Checkbox, CheckboxGroup, ClearButton, CodeSnippet, Collapsible, CollapsibleContent, CollapsibleTrigger, ComboboxContent, ComboboxGroup, ComboboxHeader, ComboboxItem, ComboboxMenu, ComboboxRoot, ComboboxSeparator, ComboboxShortcut, ComboboxTrigger, CommandMenu, CommandMenuFooter, CommandMenuGroupHeader, CommandMenuItem, CommandMenuPanel, CommandShortcutBadge, CompactActionButton, ContextMenu, CheckboxItem as ContextMenuCheckboxItem, Group as ContextMenuGroup, Item as ContextMenuItem, Label as ContextMenuLabel, Popup$1 as ContextMenuPopup, Portal$1 as ContextMenuPortal, RadioGroup as ContextMenuRadioGroup, RadioItem as ContextMenuRadioItem, Root$1 as ContextMenuRoot, Separator as ContextMenuSeparator, Shortcut as ContextMenuShortcut, Sub as ContextMenuSub, SubPopup as ContextMenuSubPopup, SubTrigger as ContextMenuSubTrigger, Trigger$1 as ContextMenuTrigger, CountdownTimer, DEFAULT_CHART_COLORS, DEFAULT_DONUT_COLORS, DEFAULT_PIE_COLORS, DataTable, DataTableActionsCell, DataTableAvatarCell, DataTableBadgesCell, DataTableCell, DataTableCellRoot, DataTableProgressCell, DataTableRatingCell, DataTableSparklineCell, DataTableSwitchCell, DataTableTextCell, DataTableToolbar, DataTableTrendCell, DateFilterButton, DatePicker, DateRangeFilterButton, DateRangePicker, Dialog, Action$1 as DialogAction, Backdrop$1 as DialogBackdrop, Body as DialogBody, Cancel$1 as DialogCancel, Close as DialogClose, Description$1 as DialogDescription, Footer$1 as DialogFooter, Header$1 as DialogHeader, HeaderContent as DialogHeaderContent, Icon as DialogIcon, Popup$2 as DialogPopup, Portal$2 as DialogPortal, Root$2 as DialogRoot, Title$1 as DialogTitle, Trigger$2 as DialogTrigger, Viewport$1 as DialogViewport, DisplayValue, DonutChart, Dot, DotCircleSpinner, Drawer, Backdrop$2 as DrawerBackdrop, Close$1 as DrawerClose, Description$2 as DrawerDescription, Footer$2 as DrawerFooter, Handle as DrawerHandle, Header$2 as DrawerHeader, Popup$3 as DrawerPopup, Portal$3 as DrawerPortal, Root$3 as DrawerRoot, Title$2 as DrawerTitle, Trigger$3 as DrawerTrigger, Viewport$2 as DrawerViewport, DropdownMenu, EmptyState, EmptyStateBackgroundPattern, EmptyStateIllustration, FadeText, FeaturedIcon, FeedbackButton, Field, FieldBottom, FieldBottomRight, FieldControl, FieldDescription, FieldError, FieldLabel, FieldTop, FieldTopRight, Fieldset, FileInput, FileTypeIcon, FileUpload, FileUploadArea, FileUploadItem, FooterNavIcon, FooterNavText, ForgotPasswordPage, Form, GroupingControls, History, HistoryValue, HorizontalBarChart, HoverCardCompound as HoverCard, HoverCardPopup, HoverCardTrigger, ICONS, InlineCTA, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item$1 as Item, KIND_TO_FILE, Kbd, KbdGroup, LineChart, LineSimpleSpinner, LineSpinner, LoadingIndicator, LoadingOverlay, LoginPage, MAC_KEYS, MOBILE_BREAKPOINT, MeetingCard, MetricCard, MetricChange, MetricItem, MetricMiniChart, NavAccountMenu, NavAccountMenuAccount, NavAccountMenuContent, NavAccountMenuFooter, NavAccountMenuHeader, NavAccountMenuItem, NavAccountMenuSection, NavAccountMenuSeparator, NavAccountMenuThemeSwitch, NavAccountMenuTrigger, NotificationItem, NotificationPanel, NotificationPanelItem, NotificationSection, NumberInput, PageBackground, PageHeader, Pagination, PaginationDots, PanelExpansionContext, PanelIndexContext, PanelLayoutContext, PieChart, PopoverCompound as Popover, PopoverDescription, PopoverHeader, PopoverPopup, PopoverRoot, PopoverTitle, PopoverTrigger, Progress, RadarChart, RadioGroup$1 as RadioGroup, Rating, RegisterPage, ResetPasswordPage, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextarea, RichTextareaToolbar, SIZE_MAP, ScrollArea, ScrollBar, SectionHeader, Select, SelectCompound, SelectGroup, SelectGroupLabel, SelectItem, SelectPopup, SelectRoot, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectTriggerIcon, SelectValue, Separator$1 as Separator, Sheet, Backdrop$3 as SheetBackdrop, Body$1 as SheetBody, Close$2 as SheetClose, Description$3 as SheetDescription, Divider as SheetDivider, Footer$3 as SheetFooter, Header$3 as SheetHeader, Popup$4 as SheetPopup, Portal$4 as SheetPortal, Root$4 as SheetRoot, Section as SheetSection, Title$3 as SheetTitle, Trigger$4 as SheetTrigger, Viewport$3 as SheetViewport, Shortcut$1 as Shortcut, SidebarCompound as Sidebar, SidebarAccountSkeleton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarNavSkeleton, SidebarProvider, SidebarTrigger, Skeleton, Slider, SliderBase, SonnerItem, SortableHeader, SourceFavicon, SparklineChart, StatusIcon, StepsCompound as Steps, StepsItem, StepsSubtext, SubmitButton, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, TabsTriggerWithCount, Tag, TagGroup, Textarea, ThemeProvider, ThemeScript, ThinkingIndicator, TimePicker, ToastContent, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToolCallSection, ToolbarButton, ToolbarDivider, TooltipCompound as Tooltip, TooltipAvatar, TooltipBadge, TooltipContent, TooltipIcon, TooltipImage, TooltipPopup, TooltipProvider, TooltipRoot, TooltipSubtitle, TooltipTitle, TooltipTrigger, TwoFactorAuthenticationPage, TypewriterText, VerifyEmailPage as VerifyEmail, VerifyEmailPage, WIN_KEYS, WeekCalendar, WorkflowAddNode, WorkflowCircleNode, WorkflowComment, WorkflowConnection, WorkflowNode, WorkflowPort, activityFeedVariants, activityItemVariants, stepIconVariants as aiStepIconVariants, stepItemVariants as aiStepItemVariants, stepsContainerVariants as aiStepsContainerVariants, alertVariants, analyzePaste, appShellBackgrounds, arrowVariants, asciiDiagramVariants, asciiToSvg, badgeVariants, bannerVariants, barChartVariants, breadcrumbItemVariants, buttonGroupVariants, buttonVariants, chatItemVariants, cn, codeBlockVariants, codeSnippetVariants, comboboxContentVariants, comboboxTriggerVariants, contentVariants, createSelectColumn, dataTableCellVariants, dataTableHeaderCellVariants, dataTableRowVariants, dataTableVariants, defaultFooterHints, detectPasteKind, footerVariants as dialogFooterVariants, headerVariants as dialogHeaderVariants, iconVariants as dialogIconVariants, popupVariants as dialogPopupVariants, donutChartVariants, extensionColors, feedbackBarVariants, feedbackButtonVariants, fileInputSizeClasses, fileUploadAreaVariants, fileUploadItemVariants, formatInteractionForLLM, getThemeScript, historyEventCategoryConfig, historyHeaderActionConfig, horizontalBarChartVariants, indicatorVariants, inlineCTAVariants, sizeClasses as inputSizeClasses, stateClasses as inputStateClasses, inputVariants, isAsciiDiagram, itemVariants, kbdGroupVariants, kbdVariants, lineChartVariants, lineNumberVariants, loadingIndicatorVariants, loadingOverlayVariants, loadingTextVariants, looksLikeAsciiDiagram, looksLikeSimpleAscii, mapKindToFile, messageBubbleVariants, messageVariants, metricCardVariants, metricChangeVariants, metricItemVariants, metricMiniChartVariants, triggerVariants as navAccountMenuTriggerVariants, navItemVariants, notificationDotVariants, notificationItemVariants, notificationPanelVariants, overlayBackdropVariants, pageHeaderVariants, paginationDotIndicatorVariants, paginationDotsVariants, pieChartVariants, progressVariants, promptSuggestionVariants, radarChartVariants, reasoningBlockVariants, renderActionElement, sanitizeKey, scrollButtonVariants, segmentVariants, shimmerPresets, shouldConvertPaste, sonnerToast, sourceVariants, statusIconVariants, stepConnectorVariants, stepIndicatorVariants, stepLabelVariants, stepSubtextVariants, systemMessageIconVariants, systemMessageVariants, tabsListVariants, tabsTriggerVariants, tagVariants, textShimmerVariants, toast, toggleVariants, toolCallVariants, tooltipVariants, tryAsciiToSvg, useAIInputContext, useAIInteraction, useAIMessageContext, useAccordionCard, useAppShell, useCalendarContext, useDataTable, useDropZone, useFieldContextOptional, useFieldControlProps, useInteractionHandler, useIsMobile, usePanelExpansion, useScrollToBottom, useSidebar, useTextStream, useTheme, useThemeOptional, validateAIToolRunSnapshot };
|
package/dist/index151.js
CHANGED
|
@@ -8,7 +8,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
var LazyAIMermaidDiagram = React.lazy(() => import("./index167.js"));
|
|
9
9
|
var LazyAIAsciiDiagram = React.lazy(() => import("./index142.js"));
|
|
10
10
|
var LazyAIChart = React.lazy(() => import("./index145.js"));
|
|
11
|
-
var LazyAITable = React.lazy(() => import("./
|
|
11
|
+
var LazyAITable = React.lazy(() => import("./index180.js"));
|
|
12
12
|
var LazyAIForm = React.lazy(() => import("./index164.js"));
|
|
13
13
|
var LazyAISelect = React.lazy(() => import("./index172.js"));
|
|
14
14
|
var LazyAICodeBlock = React.lazy(() => import("./index147.js").then((module) => ({ default: module.AICodeBlock })));
|
package/dist/index174.js
CHANGED
|
@@ -1,337 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
running: "text-primary",
|
|
11
|
-
suspended: "text-warning",
|
|
12
|
-
completed: "text-success",
|
|
13
|
-
error: "text-destructive"
|
|
14
|
-
};
|
|
15
|
-
var workflowStepIconStatusClasses = {
|
|
16
|
-
pending: "bg-accent text-muted-foreground",
|
|
17
|
-
running: "bg-primary/20 text-primary",
|
|
18
|
-
suspended: "bg-warning/20 text-warning",
|
|
19
|
-
completed: "bg-success/20 text-success",
|
|
20
|
-
error: "bg-destructive/20 text-destructive"
|
|
21
|
-
};
|
|
22
|
-
var workflowStepItemVariants = cva("flex items-start gap-3 px-4 py-3 transition-colors motion-reduce:transition-none", {
|
|
23
|
-
variants: { status: workflowStepItemStatusClasses },
|
|
24
|
-
defaultVariants: { status: "pending" }
|
|
25
|
-
});
|
|
26
|
-
var workflowStepIconVariants = cva("size-5 shrink-0 flex items-center justify-center rounded-full", {
|
|
27
|
-
variants: { status: workflowStepIconStatusClasses },
|
|
28
|
-
defaultVariants: { status: "pending" }
|
|
29
|
-
});
|
|
30
|
-
var workflowStepAppearanceConfig = {
|
|
31
|
-
contained: {
|
|
32
|
-
rootClassName: "relative",
|
|
33
|
-
hasDivider: true,
|
|
34
|
-
hasConnector: false
|
|
35
|
-
},
|
|
36
|
-
embedded: {
|
|
37
|
-
rootClassName: "relative",
|
|
38
|
-
hasDivider: true,
|
|
39
|
-
hasConnector: false
|
|
40
|
-
},
|
|
41
|
-
timeline: {
|
|
42
|
-
rootClassName: "relative",
|
|
43
|
-
hasDivider: false,
|
|
44
|
-
hasConnector: true
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
function normalizeExpandedWorkflowStepIds(ids, steps) {
|
|
48
|
-
const requested = new Set(ids);
|
|
49
|
-
return steps.flatMap((step) => requested.has(step.id) ? [step.id] : []);
|
|
1
|
+
//#region src/components/organisms/ai/_shared/format-ai-duration.ts
|
|
2
|
+
function formatAIDuration(durationMs) {
|
|
3
|
+
const totalSeconds = Math.max(0, Math.round(durationMs / 1e3));
|
|
4
|
+
const hours = Math.floor(totalSeconds / 3600);
|
|
5
|
+
const minutes = Math.floor(totalSeconds % 3600 / 60);
|
|
6
|
+
const seconds = totalSeconds % 60;
|
|
7
|
+
if (hours > 0) return [hours ? `${hours}h` : "", minutes ? `${minutes}m` : ""].filter(Boolean).join(" ");
|
|
8
|
+
if (minutes > 0) return `${minutes}m${seconds ? ` ${seconds}s` : ""}`;
|
|
9
|
+
return `${totalSeconds}s`;
|
|
50
10
|
}
|
|
51
|
-
function areWorkflowStepIdsEqual(left, right) {
|
|
52
|
-
return left.length === right.length && left.every((id, index) => id === right[index]);
|
|
53
|
-
}
|
|
54
|
-
function formatWorkflowStepDuration(durationMs) {
|
|
55
|
-
if (durationMs < 1e3) return `${durationMs}ms`;
|
|
56
|
-
return `${(durationMs / 1e3).toFixed(1)}s`;
|
|
57
|
-
}
|
|
58
|
-
function isIterableWorkflowStepContent(content) {
|
|
59
|
-
return typeof content === "object" && content !== null && Symbol.iterator in content && typeof content[Symbol.iterator] === "function";
|
|
60
|
-
}
|
|
61
|
-
function isIteratorWorkflowStepContent(content) {
|
|
62
|
-
return typeof content.next === "function";
|
|
63
|
-
}
|
|
64
|
-
var normalizedOneShotWorkflowStepContent = /* @__PURE__ */ new WeakMap();
|
|
65
|
-
function normalizeIterableWorkflowStepContent(content, iterator) {
|
|
66
|
-
const normalizedChildren = [];
|
|
67
|
-
let hasRenderableContent = false;
|
|
68
|
-
let changed = !Array.isArray(content);
|
|
69
|
-
for (let result = iterator.next(); !result.done; result = iterator.next()) {
|
|
70
|
-
const normalizedChild = normalizeWorkflowStepContent(result.value);
|
|
71
|
-
normalizedChildren.push(normalizedChild.content);
|
|
72
|
-
hasRenderableContent ||= normalizedChild.hasRenderableContent;
|
|
73
|
-
changed ||= normalizedChild.changed;
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
content: changed ? normalizedChildren : content,
|
|
77
|
-
hasRenderableContent,
|
|
78
|
-
changed
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function normalizeWorkflowStepContent(content) {
|
|
82
|
-
if (content === null || content === void 0 || typeof content === "boolean" || content === "") return {
|
|
83
|
-
content,
|
|
84
|
-
hasRenderableContent: false,
|
|
85
|
-
changed: false
|
|
86
|
-
};
|
|
87
|
-
if (typeof content === "string" || typeof content === "number" || typeof content === "bigint") return {
|
|
88
|
-
content,
|
|
89
|
-
hasRenderableContent: true,
|
|
90
|
-
changed: false
|
|
91
|
-
};
|
|
92
|
-
if (React.isValidElement(content)) {
|
|
93
|
-
if (content.type !== React.Fragment) return {
|
|
94
|
-
content,
|
|
95
|
-
hasRenderableContent: true,
|
|
96
|
-
changed: false
|
|
97
|
-
};
|
|
98
|
-
const normalizedChildren = normalizeWorkflowStepContent(content.props.children);
|
|
99
|
-
return {
|
|
100
|
-
content: normalizedChildren.changed ? React.cloneElement(content, void 0, normalizedChildren.content) : content,
|
|
101
|
-
hasRenderableContent: normalizedChildren.hasRenderableContent,
|
|
102
|
-
changed: normalizedChildren.changed
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
if (isIterableWorkflowStepContent(content)) {
|
|
106
|
-
const iterator = content[Symbol.iterator]();
|
|
107
|
-
const oneShotCacheKey = isIteratorWorkflowStepContent(iterator) ? iterator : null;
|
|
108
|
-
if (oneShotCacheKey !== null) {
|
|
109
|
-
const cached = normalizedOneShotWorkflowStepContent.get(oneShotCacheKey);
|
|
110
|
-
if (cached !== void 0) return cached;
|
|
111
|
-
}
|
|
112
|
-
const normalized = normalizeIterableWorkflowStepContent(content, iterator);
|
|
113
|
-
if (oneShotCacheKey !== null) normalizedOneShotWorkflowStepContent.set(oneShotCacheKey, normalized);
|
|
114
|
-
return normalized;
|
|
115
|
-
}
|
|
116
|
-
return {
|
|
117
|
-
content,
|
|
118
|
-
hasRenderableContent: true,
|
|
119
|
-
changed: false
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
function getNonBlankWorkflowStepError(error) {
|
|
123
|
-
return error?.trim() ? error : void 0;
|
|
124
|
-
}
|
|
125
|
-
function getWorkflowStepStatusLabel(status) {
|
|
126
|
-
switch (status) {
|
|
127
|
-
case "pending": return "Pending";
|
|
128
|
-
case "running": return "Running";
|
|
129
|
-
case "suspended": return "Paused";
|
|
130
|
-
case "completed": return "Completed";
|
|
131
|
-
case "error": return "Error";
|
|
132
|
-
default: return assertNever(status);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
function WorkflowStepStatusIcon({ status, index, className }) {
|
|
136
|
-
const iconClass = cn(workflowStepIconVariants({ status }), className);
|
|
137
|
-
switch (status) {
|
|
138
|
-
case "pending": return /* @__PURE__ */ jsx("div", {
|
|
139
|
-
"data-slot": "workflow-step-icon",
|
|
140
|
-
className: iconClass,
|
|
141
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
142
|
-
className: "text-xs font-medium",
|
|
143
|
-
children: index + 1
|
|
144
|
-
})
|
|
145
|
-
});
|
|
146
|
-
case "running": return /* @__PURE__ */ jsx("div", {
|
|
147
|
-
"data-slot": "workflow-step-icon",
|
|
148
|
-
className: cn(iconClass, "delight-status-pulse motion-reduce:!animate-none"),
|
|
149
|
-
children: /* @__PURE__ */ jsx(Loader, { className: "size-3 animate-spin motion-reduce:animate-none" })
|
|
150
|
-
});
|
|
151
|
-
case "suspended": return /* @__PURE__ */ jsx("div", {
|
|
152
|
-
"data-slot": "workflow-step-icon",
|
|
153
|
-
className: iconClass,
|
|
154
|
-
children: /* @__PURE__ */ jsx(Pause, { className: "size-3" })
|
|
155
|
-
});
|
|
156
|
-
case "completed": return /* @__PURE__ */ jsx("div", {
|
|
157
|
-
"data-slot": "workflow-step-icon",
|
|
158
|
-
className: cn(iconClass, "delight-check-bounce motion-reduce:!animate-none"),
|
|
159
|
-
children: /* @__PURE__ */ jsx(Check, { className: "size-3" })
|
|
160
|
-
});
|
|
161
|
-
case "error": return /* @__PURE__ */ jsx("div", {
|
|
162
|
-
"data-slot": "workflow-step-icon",
|
|
163
|
-
className: cn(iconClass, "delight-shake motion-reduce:!animate-none"),
|
|
164
|
-
children: /* @__PURE__ */ jsx(AlertCircle, { className: "size-3" })
|
|
165
|
-
});
|
|
166
|
-
default: return assertNever(status);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
WorkflowStepStatusIcon.displayName = "WorkflowStepStatusIcon";
|
|
170
|
-
function WorkflowStepItem({ step, index, isLast, appearance = "contained", itemSlot = "workflow-step-item", expandable = true, expanded, active = false, onExpandedChange }) {
|
|
171
|
-
const contentId = React.useId();
|
|
172
|
-
const errorDescriptionId = React.useId();
|
|
173
|
-
const normalizedContent = normalizeWorkflowStepContent(step.content);
|
|
174
|
-
const hasContent = normalizedContent.hasRenderableContent;
|
|
175
|
-
const error = getNonBlankWorkflowStepError(step.error);
|
|
176
|
-
const hasError = error !== void 0;
|
|
177
|
-
const hasExpandableDetails = hasContent || hasError;
|
|
178
|
-
const isDisclosureControl = hasExpandableDetails && expandable;
|
|
179
|
-
const prefersReducedMotion = useReducedMotion();
|
|
180
|
-
const appearanceConfig = workflowStepAppearanceConfig[appearance];
|
|
181
|
-
const disclosureTransition = { duration: prefersReducedMotion ? 0 : .2 };
|
|
182
|
-
const stepContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
183
|
-
/* @__PURE__ */ jsx(WorkflowStepStatusIcon, {
|
|
184
|
-
status: step.status,
|
|
185
|
-
index
|
|
186
|
-
}),
|
|
187
|
-
/* @__PURE__ */ jsxs("div", {
|
|
188
|
-
className: "min-w-0 flex-1 text-start",
|
|
189
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
190
|
-
className: "flex items-center gap-2",
|
|
191
|
-
children: [
|
|
192
|
-
/* @__PURE__ */ jsx("span", {
|
|
193
|
-
className: cn("text-sm font-medium", step.status === "pending" ? "text-text-quaternary" : "text-foreground"),
|
|
194
|
-
children: step.title
|
|
195
|
-
}),
|
|
196
|
-
/* @__PURE__ */ jsx("span", {
|
|
197
|
-
className: "text-xs text-secondary-foreground",
|
|
198
|
-
children: getWorkflowStepStatusLabel(step.status)
|
|
199
|
-
}),
|
|
200
|
-
step.durationMs !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
201
|
-
className: "text-xs text-muted-foreground",
|
|
202
|
-
children: formatWorkflowStepDuration(step.durationMs)
|
|
203
|
-
})
|
|
204
|
-
]
|
|
205
|
-
}), step.description && /* @__PURE__ */ jsx("p", {
|
|
206
|
-
className: "mt-0.5 text-xs text-text-quaternary",
|
|
207
|
-
children: step.description
|
|
208
|
-
})]
|
|
209
|
-
}),
|
|
210
|
-
isDisclosureControl && /* @__PURE__ */ jsx("div", {
|
|
211
|
-
className: "shrink-0",
|
|
212
|
-
children: expanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-4 text-muted-foreground rtl:rotate-180" })
|
|
213
|
-
})
|
|
214
|
-
] });
|
|
215
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
216
|
-
"data-slot": itemSlot,
|
|
217
|
-
"data-step-status": step.status,
|
|
218
|
-
"data-appearance": appearance,
|
|
219
|
-
className: cn(appearanceConfig.rootClassName, appearanceConfig.hasDivider && !isLast && "border-b border-border"),
|
|
220
|
-
children: [
|
|
221
|
-
isDisclosureControl ? /* @__PURE__ */ jsx("button", {
|
|
222
|
-
type: "button",
|
|
223
|
-
onClick: onExpandedChange,
|
|
224
|
-
"aria-current": active ? "step" : void 0,
|
|
225
|
-
"aria-expanded": expanded,
|
|
226
|
-
"aria-controls": contentId,
|
|
227
|
-
"aria-describedby": hasError ? errorDescriptionId : void 0,
|
|
228
|
-
className: cn(workflowStepItemVariants({ status: step.status }), "w-full cursor-pointer hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring"),
|
|
229
|
-
children: stepContent
|
|
230
|
-
}) : /* @__PURE__ */ jsx("div", {
|
|
231
|
-
"aria-current": active ? "step" : void 0,
|
|
232
|
-
"aria-describedby": hasError ? errorDescriptionId : void 0,
|
|
233
|
-
className: cn(workflowStepItemVariants({ status: step.status }), "w-full"),
|
|
234
|
-
children: stepContent
|
|
235
|
-
}),
|
|
236
|
-
/* @__PURE__ */ jsx(AnimatePresence, {
|
|
237
|
-
initial: false,
|
|
238
|
-
children: expanded && hasExpandableDetails && /* @__PURE__ */ jsx(motion.div, {
|
|
239
|
-
id: contentId,
|
|
240
|
-
"data-slot": "workflow-step-panel",
|
|
241
|
-
initial: {
|
|
242
|
-
height: 0,
|
|
243
|
-
opacity: 0
|
|
244
|
-
},
|
|
245
|
-
animate: {
|
|
246
|
-
height: "auto",
|
|
247
|
-
opacity: 1
|
|
248
|
-
},
|
|
249
|
-
exit: {
|
|
250
|
-
height: 0,
|
|
251
|
-
opacity: 0
|
|
252
|
-
},
|
|
253
|
-
transition: disclosureTransition,
|
|
254
|
-
className: "overflow-hidden motion-reduce:transition-none",
|
|
255
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
256
|
-
className: "px-4 pb-3 ps-12",
|
|
257
|
-
children: [hasError && /* @__PURE__ */ jsx("div", {
|
|
258
|
-
className: "rounded-lg border border-destructive/50 bg-destructive/10 p-3",
|
|
259
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
260
|
-
className: "flex items-start gap-2",
|
|
261
|
-
children: [/* @__PURE__ */ jsx(AlertCircle, { className: "mt-0.5 size-4 shrink-0 text-destructive" }), /* @__PURE__ */ jsx("p", {
|
|
262
|
-
className: "text-sm text-destructive",
|
|
263
|
-
children: error
|
|
264
|
-
})]
|
|
265
|
-
})
|
|
266
|
-
}), hasContent && /* @__PURE__ */ jsx("div", {
|
|
267
|
-
className: hasError ? "mt-3" : void 0,
|
|
268
|
-
children: normalizedContent.content
|
|
269
|
-
})]
|
|
270
|
-
})
|
|
271
|
-
})
|
|
272
|
-
}),
|
|
273
|
-
hasError && /* @__PURE__ */ jsx("span", {
|
|
274
|
-
id: errorDescriptionId,
|
|
275
|
-
className: "sr-only",
|
|
276
|
-
children: error
|
|
277
|
-
}),
|
|
278
|
-
appearanceConfig.hasConnector && !isLast && /* @__PURE__ */ jsx("div", {
|
|
279
|
-
"data-slot": "workflow-step-connector",
|
|
280
|
-
"aria-hidden": "true",
|
|
281
|
-
className: "absolute top-8 -bottom-3 start-6 w-px bg-border"
|
|
282
|
-
})
|
|
283
|
-
]
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
WorkflowStepItem.displayName = "WorkflowStepItem";
|
|
287
|
-
function WorkflowStepRenderer({ steps, appearance = "contained", itemSlot = "workflow-step-item", expandable = true, activeStepId, expandedStepIds: controlledExpandedStepIds, defaultExpandedStepIds = [], onExpandedStepIdsChange, className, renderItems = true }) {
|
|
288
|
-
const isControlled = controlledExpandedStepIds !== void 0;
|
|
289
|
-
const controlledSnapshot = isControlled ? [...controlledExpandedStepIds] : void 0;
|
|
290
|
-
const [uncontrolledExpandedStepIds, setUncontrolledExpandedStepIds] = React.useState(() => normalizeExpandedWorkflowStepIds(defaultExpandedStepIds, steps));
|
|
291
|
-
const lastControlledExpandedStepIdsRef = React.useRef(controlledSnapshot ?? []);
|
|
292
|
-
const wasControlledRef = React.useRef(isControlled);
|
|
293
|
-
const visibleExpandedStepIds = normalizeExpandedWorkflowStepIds(isControlled ? controlledExpandedStepIds : uncontrolledExpandedStepIds, steps);
|
|
294
|
-
const expandedSet = new Set(visibleExpandedStepIds);
|
|
295
|
-
React.useLayoutEffect(() => {
|
|
296
|
-
if (controlledSnapshot !== void 0) lastControlledExpandedStepIdsRef.current = controlledSnapshot;
|
|
297
|
-
}, [controlledSnapshot]);
|
|
298
|
-
React.useLayoutEffect(() => {
|
|
299
|
-
const wasControlled = wasControlledRef.current;
|
|
300
|
-
wasControlledRef.current = isControlled;
|
|
301
|
-
if (isControlled) return;
|
|
302
|
-
setUncontrolledExpandedStepIds((current) => {
|
|
303
|
-
const reconciled = normalizeExpandedWorkflowStepIds(wasControlled ? lastControlledExpandedStepIdsRef.current : current, steps);
|
|
304
|
-
return areWorkflowStepIdsEqual(reconciled, current) ? current : reconciled;
|
|
305
|
-
});
|
|
306
|
-
}, [isControlled, steps]);
|
|
307
|
-
const toggleStep = (id) => {
|
|
308
|
-
const next = new Set(visibleExpandedStepIds);
|
|
309
|
-
if (next.has(id)) next.delete(id);
|
|
310
|
-
else next.add(id);
|
|
311
|
-
const normalizedNext = normalizeExpandedWorkflowStepIds([...next], steps);
|
|
312
|
-
if (!isControlled) setUncontrolledExpandedStepIds([...normalizedNext]);
|
|
313
|
-
onExpandedStepIdsChange?.([...normalizedNext]);
|
|
314
|
-
};
|
|
315
|
-
if (!renderItems) return null;
|
|
316
|
-
return /* @__PURE__ */ jsx("ol", {
|
|
317
|
-
"data-slot": "workflow-step-list",
|
|
318
|
-
"data-appearance": appearance,
|
|
319
|
-
className: cn("m-0 list-none p-0", className),
|
|
320
|
-
children: steps.map((step, index) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkflowStepItem, {
|
|
321
|
-
step,
|
|
322
|
-
index,
|
|
323
|
-
isLast: index === steps.length - 1,
|
|
324
|
-
appearance,
|
|
325
|
-
itemSlot,
|
|
326
|
-
expandable,
|
|
327
|
-
expanded: expandedSet.has(step.id),
|
|
328
|
-
active: activeStepId === step.id,
|
|
329
|
-
onExpandedChange: () => toggleStep(step.id)
|
|
330
|
-
}) }, step.id))
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
WorkflowStepRenderer.displayName = "WorkflowStepRenderer";
|
|
334
11
|
//#endregion
|
|
335
|
-
export {
|
|
12
|
+
export { formatAIDuration };
|
|
336
13
|
|
|
337
14
|
//# sourceMappingURL=index174.js.map
|