@lukeashford/aurelius 4.8.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +17 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1882,6 +1882,24 @@ interface Conversation {
|
|
|
1882
1882
|
*/
|
|
1883
1883
|
isActive?: boolean;
|
|
1884
1884
|
}
|
|
1885
|
+
/**
|
|
1886
|
+
* Imperative API exposed by `ChatInterface` via its forwarded ref. Use this from
|
|
1887
|
+
* call sites that need to drive the chat from outside React state — typically
|
|
1888
|
+
* to surface an artifact when the user clicks a `MentionChip` or other
|
|
1889
|
+
* cross-surface pointer. Attach with
|
|
1890
|
+
* `useRef<ChatInterfaceHandle>(null)` and read `ref.current?.openArtifact(name)`.
|
|
1891
|
+
*/
|
|
1892
|
+
interface ChatInterfaceHandle {
|
|
1893
|
+
/**
|
|
1894
|
+
* Open the artifact lightbox for the given artifact name. Ensures the
|
|
1895
|
+
* artifacts panel is open (overriding any prior dismissal) before
|
|
1896
|
+
* surfacing the lightbox, since the lightbox renders inside the panel.
|
|
1897
|
+
* If the name is not present in the current artifact tree, the call is a
|
|
1898
|
+
* no-op — the chip's leading icon already signals unknown / stale
|
|
1899
|
+
* references via `HelpCircle`.
|
|
1900
|
+
*/
|
|
1901
|
+
openArtifact(name: string): void;
|
|
1902
|
+
}
|
|
1885
1903
|
interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
|
|
1886
1904
|
/**
|
|
1887
1905
|
* Array of messages in the conversation (flat mode)
|
|
@@ -2109,7 +2127,7 @@ interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>
|
|
|
2109
2127
|
* Artifacts are supplied as a tree of ArtifactNode objects via the
|
|
2110
2128
|
* artifactNodes prop.
|
|
2111
2129
|
*/
|
|
2112
|
-
declare const ChatInterface: React$1.ForwardRefExoticComponent<ChatInterfaceProps & React$1.RefAttributes<
|
|
2130
|
+
declare const ChatInterface: React$1.ForwardRefExoticComponent<ChatInterfaceProps & React$1.RefAttributes<ChatInterfaceHandle>>;
|
|
2113
2131
|
|
|
2114
2132
|
/**
|
|
2115
2133
|
* What kind of project mutation produced this checkpoint. Drives the icon and
|
|
@@ -2831,4 +2849,4 @@ declare function getTextareaCaretCoords(textarea: HTMLTextAreaElement): Textarea
|
|
|
2831
2849
|
|
|
2832
2850
|
declare const version = "2.0.0";
|
|
2833
2851
|
|
|
2834
|
-
export { ARTIFACT_TYPES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AddNodeOptions, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type Artifact, ArtifactCard, type ArtifactCardProps, ArtifactGroup, type ArtifactGroupProps, ArtifactImageGridSection, type ArtifactImageGridSectionProps, type ArtifactNode, ArtifactSpotlightSection, type ArtifactSpotlightSectionProps, type ArtifactType, ArtifactVariantStack, type ArtifactVariantStackProps, ArtifactsPanel, type ArtifactsPanelProps, ArtifactsPanelToggle, type ArtifactsPanelToggleProps, type AspectRatio, type AspectRatioPreset, type Attachment, type AttachmentItem, AttachmentPreview, type AttachmentPreviewProps, type AttachmentStatus, AudioCard, type AudioCardProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BranchNavigator, type BranchNavigatorProps, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, type BreadcrumbEntry, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatBubbleIcon, ChatInput, type ChatInputNotice, type ChatInputPosition, type ChatInputProps, ChatInterface, type ChatInterfaceProps, type ChatNode, ChatView, type ChatViewCheckpointItem, type ChatViewDividerItem, type ChatViewItem, type ChatViewMessageItem, type ChatViewProps, CheckSquareIcon, Checkbox, type CheckboxProps, Checkpoint, type CheckpointBranchInfo, type CheckpointExecutionKind, type CheckpointNode, type CheckpointProps, type CheckpointStatus, ChevronLeftIcon, ChevronRightIcon, CloseIcon, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorPaletteSection, type ColorPaletteSectionProps, ColorSwatch, type ColorSwatchProps, Combobox, type ComboboxNav, type ComboboxProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, type Conversation, type ConversationTree, CoverSection, type CoverSectionProps, CrossSquareIcon, type Deliverable, type DeliverableArtifactRef, DeliverableCard, type DeliverableCardProps, type DeliverableImageItem, DeliverableRenderer, type DeliverableRendererProps, type DeliverableSection, type DeliverableSwatch, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, EmptySquareIcon, ExpandIcon, type ExternalToolDefinition, FileChip, type FileChipProps, type FileChipStatus, GreyedDivider, type GreyedDividerProps, HelperText, type HelperTextProps, HistoryIcon, HistoryPanel, type HistoryPanelProps, type IconProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, LayersIcon, Lightbox, type LightboxProps, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, MediaIcon, MentionChip, type MentionChipProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, MessageActions, type MessageActionsConfig, type MessageActionsProps, type MessageActionsVariant, type MessageBranchInfo, type MessageNode, type MessageProps, type MessageVariant, Modal, type ModalProps, NODE_TYPES, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, type NodeTopology, type NodeType, Pagination, type PaginationProps, PdfCard, type PdfCardProps, PlusIcon, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, QuoteBlockSection, type QuoteBlockSectionProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SCRIPT_ELEMENT_TYPES, ScriptCard, type ScriptCardProps, type ScriptElement, type ScriptElementType, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, SquareLoaderIcon, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, TASK_STATUSES, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, type Task, type TaskStatus, TextBlockSection, type TextBlockSectionProps, TextCard, type TextCardProps, Textarea, type TextareaCaretCoords, type TextareaProps, ThinkingIndicator, type ThinkingIndicatorProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, TodosList, type TodosListProps, type ToolDefinition, type ToolGroup, ToolPanelContainer, type ToolPanelContainerProps, type ToolPanelState, ToolSidebar, type ToolSidebarProps, Tooltip, type TooltipProps, type TreeNode, type UseArtifactTreeNavigationReturn, type UseComboboxNavOptions, type UseScrollAnchorOptions, type UseScrollAnchorReturn, type VideoAspectRatio, type VideoAspectRatioPreset, VideoCard, type VideoCardProps, addNodeToTree, areAllTasksSettled, createEmptyTree, createPreviewUrl, findAncestor, generateId, getActivePath, getGreyedFuture, getSiblingInfo, getTextareaCaretCoords, isBranchPoint, isImageFile, messagesToTree, revokePreviewUrl, setActiveLeaf, switchBranch, updateMessageContent, useArtifactTreeNavigation, useComboboxNav, useResizable, useScrollAnchor, useToast, version };
|
|
2852
|
+
export { ARTIFACT_TYPES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AddNodeOptions, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type Artifact, ArtifactCard, type ArtifactCardProps, ArtifactGroup, type ArtifactGroupProps, ArtifactImageGridSection, type ArtifactImageGridSectionProps, type ArtifactNode, ArtifactSpotlightSection, type ArtifactSpotlightSectionProps, type ArtifactType, ArtifactVariantStack, type ArtifactVariantStackProps, ArtifactsPanel, type ArtifactsPanelProps, ArtifactsPanelToggle, type ArtifactsPanelToggleProps, type AspectRatio, type AspectRatioPreset, type Attachment, type AttachmentItem, AttachmentPreview, type AttachmentPreviewProps, type AttachmentStatus, AudioCard, type AudioCardProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BranchNavigator, type BranchNavigatorProps, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, type BreadcrumbEntry, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatBubbleIcon, ChatInput, type ChatInputNotice, type ChatInputPosition, type ChatInputProps, ChatInterface, type ChatInterfaceHandle, type ChatInterfaceProps, type ChatNode, ChatView, type ChatViewCheckpointItem, type ChatViewDividerItem, type ChatViewItem, type ChatViewMessageItem, type ChatViewProps, CheckSquareIcon, Checkbox, type CheckboxProps, Checkpoint, type CheckpointBranchInfo, type CheckpointExecutionKind, type CheckpointNode, type CheckpointProps, type CheckpointStatus, ChevronLeftIcon, ChevronRightIcon, CloseIcon, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorPaletteSection, type ColorPaletteSectionProps, ColorSwatch, type ColorSwatchProps, Combobox, type ComboboxNav, type ComboboxProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, type Conversation, type ConversationTree, CoverSection, type CoverSectionProps, CrossSquareIcon, type Deliverable, type DeliverableArtifactRef, DeliverableCard, type DeliverableCardProps, type DeliverableImageItem, DeliverableRenderer, type DeliverableRendererProps, type DeliverableSection, type DeliverableSwatch, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, EmptySquareIcon, ExpandIcon, type ExternalToolDefinition, FileChip, type FileChipProps, type FileChipStatus, GreyedDivider, type GreyedDividerProps, HelperText, type HelperTextProps, HistoryIcon, HistoryPanel, type HistoryPanelProps, type IconProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, LayersIcon, Lightbox, type LightboxProps, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, MediaIcon, MentionChip, type MentionChipProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, MessageActions, type MessageActionsConfig, type MessageActionsProps, type MessageActionsVariant, type MessageBranchInfo, type MessageNode, type MessageProps, type MessageVariant, Modal, type ModalProps, NODE_TYPES, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, type NodeTopology, type NodeType, Pagination, type PaginationProps, PdfCard, type PdfCardProps, PlusIcon, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, QuoteBlockSection, type QuoteBlockSectionProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SCRIPT_ELEMENT_TYPES, ScriptCard, type ScriptCardProps, type ScriptElement, type ScriptElementType, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, SquareLoaderIcon, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, TASK_STATUSES, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, type Task, type TaskStatus, TextBlockSection, type TextBlockSectionProps, TextCard, type TextCardProps, Textarea, type TextareaCaretCoords, type TextareaProps, ThinkingIndicator, type ThinkingIndicatorProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, TodosList, type TodosListProps, type ToolDefinition, type ToolGroup, ToolPanelContainer, type ToolPanelContainerProps, type ToolPanelState, ToolSidebar, type ToolSidebarProps, Tooltip, type TooltipProps, type TreeNode, type UseArtifactTreeNavigationReturn, type UseComboboxNavOptions, type UseScrollAnchorOptions, type UseScrollAnchorReturn, type VideoAspectRatio, type VideoAspectRatioPreset, VideoCard, type VideoCardProps, addNodeToTree, areAllTasksSettled, createEmptyTree, createPreviewUrl, findAncestor, generateId, getActivePath, getGreyedFuture, getSiblingInfo, getTextareaCaretCoords, isBranchPoint, isImageFile, messagesToTree, revokePreviewUrl, setActiveLeaf, switchBranch, updateMessageContent, useArtifactTreeNavigation, useComboboxNav, useResizable, useScrollAnchor, useToast, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -1882,6 +1882,24 @@ interface Conversation {
|
|
|
1882
1882
|
*/
|
|
1883
1883
|
isActive?: boolean;
|
|
1884
1884
|
}
|
|
1885
|
+
/**
|
|
1886
|
+
* Imperative API exposed by `ChatInterface` via its forwarded ref. Use this from
|
|
1887
|
+
* call sites that need to drive the chat from outside React state — typically
|
|
1888
|
+
* to surface an artifact when the user clicks a `MentionChip` or other
|
|
1889
|
+
* cross-surface pointer. Attach with
|
|
1890
|
+
* `useRef<ChatInterfaceHandle>(null)` and read `ref.current?.openArtifact(name)`.
|
|
1891
|
+
*/
|
|
1892
|
+
interface ChatInterfaceHandle {
|
|
1893
|
+
/**
|
|
1894
|
+
* Open the artifact lightbox for the given artifact name. Ensures the
|
|
1895
|
+
* artifacts panel is open (overriding any prior dismissal) before
|
|
1896
|
+
* surfacing the lightbox, since the lightbox renders inside the panel.
|
|
1897
|
+
* If the name is not present in the current artifact tree, the call is a
|
|
1898
|
+
* no-op — the chip's leading icon already signals unknown / stale
|
|
1899
|
+
* references via `HelpCircle`.
|
|
1900
|
+
*/
|
|
1901
|
+
openArtifact(name: string): void;
|
|
1902
|
+
}
|
|
1885
1903
|
interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
|
|
1886
1904
|
/**
|
|
1887
1905
|
* Array of messages in the conversation (flat mode)
|
|
@@ -2109,7 +2127,7 @@ interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>
|
|
|
2109
2127
|
* Artifacts are supplied as a tree of ArtifactNode objects via the
|
|
2110
2128
|
* artifactNodes prop.
|
|
2111
2129
|
*/
|
|
2112
|
-
declare const ChatInterface: React$1.ForwardRefExoticComponent<ChatInterfaceProps & React$1.RefAttributes<
|
|
2130
|
+
declare const ChatInterface: React$1.ForwardRefExoticComponent<ChatInterfaceProps & React$1.RefAttributes<ChatInterfaceHandle>>;
|
|
2113
2131
|
|
|
2114
2132
|
/**
|
|
2115
2133
|
* What kind of project mutation produced this checkpoint. Drives the icon and
|
|
@@ -2831,4 +2849,4 @@ declare function getTextareaCaretCoords(textarea: HTMLTextAreaElement): Textarea
|
|
|
2831
2849
|
|
|
2832
2850
|
declare const version = "2.0.0";
|
|
2833
2851
|
|
|
2834
|
-
export { ARTIFACT_TYPES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AddNodeOptions, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type Artifact, ArtifactCard, type ArtifactCardProps, ArtifactGroup, type ArtifactGroupProps, ArtifactImageGridSection, type ArtifactImageGridSectionProps, type ArtifactNode, ArtifactSpotlightSection, type ArtifactSpotlightSectionProps, type ArtifactType, ArtifactVariantStack, type ArtifactVariantStackProps, ArtifactsPanel, type ArtifactsPanelProps, ArtifactsPanelToggle, type ArtifactsPanelToggleProps, type AspectRatio, type AspectRatioPreset, type Attachment, type AttachmentItem, AttachmentPreview, type AttachmentPreviewProps, type AttachmentStatus, AudioCard, type AudioCardProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BranchNavigator, type BranchNavigatorProps, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, type BreadcrumbEntry, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatBubbleIcon, ChatInput, type ChatInputNotice, type ChatInputPosition, type ChatInputProps, ChatInterface, type ChatInterfaceProps, type ChatNode, ChatView, type ChatViewCheckpointItem, type ChatViewDividerItem, type ChatViewItem, type ChatViewMessageItem, type ChatViewProps, CheckSquareIcon, Checkbox, type CheckboxProps, Checkpoint, type CheckpointBranchInfo, type CheckpointExecutionKind, type CheckpointNode, type CheckpointProps, type CheckpointStatus, ChevronLeftIcon, ChevronRightIcon, CloseIcon, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorPaletteSection, type ColorPaletteSectionProps, ColorSwatch, type ColorSwatchProps, Combobox, type ComboboxNav, type ComboboxProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, type Conversation, type ConversationTree, CoverSection, type CoverSectionProps, CrossSquareIcon, type Deliverable, type DeliverableArtifactRef, DeliverableCard, type DeliverableCardProps, type DeliverableImageItem, DeliverableRenderer, type DeliverableRendererProps, type DeliverableSection, type DeliverableSwatch, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, EmptySquareIcon, ExpandIcon, type ExternalToolDefinition, FileChip, type FileChipProps, type FileChipStatus, GreyedDivider, type GreyedDividerProps, HelperText, type HelperTextProps, HistoryIcon, HistoryPanel, type HistoryPanelProps, type IconProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, LayersIcon, Lightbox, type LightboxProps, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, MediaIcon, MentionChip, type MentionChipProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, MessageActions, type MessageActionsConfig, type MessageActionsProps, type MessageActionsVariant, type MessageBranchInfo, type MessageNode, type MessageProps, type MessageVariant, Modal, type ModalProps, NODE_TYPES, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, type NodeTopology, type NodeType, Pagination, type PaginationProps, PdfCard, type PdfCardProps, PlusIcon, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, QuoteBlockSection, type QuoteBlockSectionProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SCRIPT_ELEMENT_TYPES, ScriptCard, type ScriptCardProps, type ScriptElement, type ScriptElementType, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, SquareLoaderIcon, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, TASK_STATUSES, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, type Task, type TaskStatus, TextBlockSection, type TextBlockSectionProps, TextCard, type TextCardProps, Textarea, type TextareaCaretCoords, type TextareaProps, ThinkingIndicator, type ThinkingIndicatorProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, TodosList, type TodosListProps, type ToolDefinition, type ToolGroup, ToolPanelContainer, type ToolPanelContainerProps, type ToolPanelState, ToolSidebar, type ToolSidebarProps, Tooltip, type TooltipProps, type TreeNode, type UseArtifactTreeNavigationReturn, type UseComboboxNavOptions, type UseScrollAnchorOptions, type UseScrollAnchorReturn, type VideoAspectRatio, type VideoAspectRatioPreset, VideoCard, type VideoCardProps, addNodeToTree, areAllTasksSettled, createEmptyTree, createPreviewUrl, findAncestor, generateId, getActivePath, getGreyedFuture, getSiblingInfo, getTextareaCaretCoords, isBranchPoint, isImageFile, messagesToTree, revokePreviewUrl, setActiveLeaf, switchBranch, updateMessageContent, useArtifactTreeNavigation, useComboboxNav, useResizable, useScrollAnchor, useToast, version };
|
|
2852
|
+
export { ARTIFACT_TYPES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AddNodeOptions, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type Artifact, ArtifactCard, type ArtifactCardProps, ArtifactGroup, type ArtifactGroupProps, ArtifactImageGridSection, type ArtifactImageGridSectionProps, type ArtifactNode, ArtifactSpotlightSection, type ArtifactSpotlightSectionProps, type ArtifactType, ArtifactVariantStack, type ArtifactVariantStackProps, ArtifactsPanel, type ArtifactsPanelProps, ArtifactsPanelToggle, type ArtifactsPanelToggleProps, type AspectRatio, type AspectRatioPreset, type Attachment, type AttachmentItem, AttachmentPreview, type AttachmentPreviewProps, type AttachmentStatus, AudioCard, type AudioCardProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BranchNavigator, type BranchNavigatorProps, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, type BreadcrumbEntry, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatBubbleIcon, ChatInput, type ChatInputNotice, type ChatInputPosition, type ChatInputProps, ChatInterface, type ChatInterfaceHandle, type ChatInterfaceProps, type ChatNode, ChatView, type ChatViewCheckpointItem, type ChatViewDividerItem, type ChatViewItem, type ChatViewMessageItem, type ChatViewProps, CheckSquareIcon, Checkbox, type CheckboxProps, Checkpoint, type CheckpointBranchInfo, type CheckpointExecutionKind, type CheckpointNode, type CheckpointProps, type CheckpointStatus, ChevronLeftIcon, ChevronRightIcon, CloseIcon, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorPaletteSection, type ColorPaletteSectionProps, ColorSwatch, type ColorSwatchProps, Combobox, type ComboboxNav, type ComboboxProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, type Conversation, type ConversationTree, CoverSection, type CoverSectionProps, CrossSquareIcon, type Deliverable, type DeliverableArtifactRef, DeliverableCard, type DeliverableCardProps, type DeliverableImageItem, DeliverableRenderer, type DeliverableRendererProps, type DeliverableSection, type DeliverableSwatch, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, EmptySquareIcon, ExpandIcon, type ExternalToolDefinition, FileChip, type FileChipProps, type FileChipStatus, GreyedDivider, type GreyedDividerProps, HelperText, type HelperTextProps, HistoryIcon, HistoryPanel, type HistoryPanelProps, type IconProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, LayersIcon, Lightbox, type LightboxProps, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, MediaIcon, MentionChip, type MentionChipProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, MessageActions, type MessageActionsConfig, type MessageActionsProps, type MessageActionsVariant, type MessageBranchInfo, type MessageNode, type MessageProps, type MessageVariant, Modal, type ModalProps, NODE_TYPES, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, type NodeTopology, type NodeType, Pagination, type PaginationProps, PdfCard, type PdfCardProps, PlusIcon, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, QuoteBlockSection, type QuoteBlockSectionProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SCRIPT_ELEMENT_TYPES, ScriptCard, type ScriptCardProps, type ScriptElement, type ScriptElementType, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, SquareLoaderIcon, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, TASK_STATUSES, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, type Task, type TaskStatus, TextBlockSection, type TextBlockSectionProps, TextCard, type TextCardProps, Textarea, type TextareaCaretCoords, type TextareaProps, ThinkingIndicator, type ThinkingIndicatorProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, TodosList, type TodosListProps, type ToolDefinition, type ToolGroup, ToolPanelContainer, type ToolPanelContainerProps, type ToolPanelState, ToolSidebar, type ToolSidebarProps, Tooltip, type TooltipProps, type TreeNode, type UseArtifactTreeNavigationReturn, type UseComboboxNavOptions, type UseScrollAnchorOptions, type UseScrollAnchorReturn, type VideoAspectRatio, type VideoAspectRatioPreset, VideoCard, type VideoCardProps, addNodeToTree, areAllTasksSettled, createEmptyTree, createPreviewUrl, findAncestor, generateId, getActivePath, getGreyedFuture, getSiblingInfo, getTextareaCaretCoords, isBranchPoint, isImageFile, messagesToTree, revokePreviewUrl, setActiveLeaf, switchBranch, updateMessageContent, useArtifactTreeNavigation, useComboboxNav, useResizable, useScrollAnchor, useToast, version };
|
package/dist/index.js
CHANGED
|
@@ -7509,13 +7509,6 @@ var ChatInterface = import_react93.default.forwardRef(
|
|
|
7509
7509
|
const prevArtifactNodesRef = (0, import_react93.useRef)([]);
|
|
7510
7510
|
const prevTasksRef = (0, import_react93.useRef)([]);
|
|
7511
7511
|
const [panelOpenArtifactId, setPanelOpenArtifactId] = (0, import_react93.useState)(null);
|
|
7512
|
-
const handleAttachmentOpen = (0, import_react93.useCallback)((artifactId) => {
|
|
7513
|
-
setPanelOpenArtifactId(artifactId);
|
|
7514
|
-
onAttachmentOpen?.(artifactId);
|
|
7515
|
-
}, [onAttachmentOpen]);
|
|
7516
|
-
const handleArtifactPanelClosed = (0, import_react93.useCallback)(() => {
|
|
7517
|
-
setPanelOpenArtifactId(null);
|
|
7518
|
-
}, []);
|
|
7519
7512
|
const [internalTools, setInternalTools] = (0, import_react93.useState)({
|
|
7520
7513
|
"top-left": "history",
|
|
7521
7514
|
"bottom-left": null,
|
|
@@ -7523,6 +7516,23 @@ var ChatInterface = import_react93.default.forwardRef(
|
|
|
7523
7516
|
"bottom-right": null
|
|
7524
7517
|
});
|
|
7525
7518
|
const dismissedToolsRef = (0, import_react93.useRef)(/* @__PURE__ */ new Set());
|
|
7519
|
+
const openArtifact = (0, import_react93.useCallback)((artifactId) => {
|
|
7520
|
+
dismissedToolsRef.current.delete("artifacts");
|
|
7521
|
+
if (isArtifactsPanelOpen === void 0) {
|
|
7522
|
+
setInternalTools((prev) => prev["top-right"] === "artifacts" ? prev : { ...prev, "top-right": "artifacts" });
|
|
7523
|
+
} else if (!isArtifactsPanelOpen) {
|
|
7524
|
+
onArtifactsPanelOpenChange?.(true);
|
|
7525
|
+
}
|
|
7526
|
+
setPanelOpenArtifactId(artifactId);
|
|
7527
|
+
}, [isArtifactsPanelOpen, onArtifactsPanelOpenChange]);
|
|
7528
|
+
const handleAttachmentOpen = (0, import_react93.useCallback)((artifactId) => {
|
|
7529
|
+
openArtifact(artifactId);
|
|
7530
|
+
onAttachmentOpen?.(artifactId);
|
|
7531
|
+
}, [openArtifact, onAttachmentOpen]);
|
|
7532
|
+
const handleArtifactPanelClosed = (0, import_react93.useCallback)(() => {
|
|
7533
|
+
setPanelOpenArtifactId(null);
|
|
7534
|
+
}, []);
|
|
7535
|
+
(0, import_react93.useImperativeHandle)(ref, () => ({ openArtifact }), [openArtifact]);
|
|
7526
7536
|
const isPanelControlled = isArtifactsPanelOpen !== void 0;
|
|
7527
7537
|
const activeTools = (0, import_react93.useMemo)(() => {
|
|
7528
7538
|
if (isPanelControlled) {
|
|
@@ -7819,7 +7829,6 @@ var ChatInterface = import_react93.default.forwardRef(
|
|
|
7819
7829
|
return /* @__PURE__ */ import_react93.default.createElement(
|
|
7820
7830
|
"div",
|
|
7821
7831
|
{
|
|
7822
|
-
ref,
|
|
7823
7832
|
className: cx("flex h-full w-full bg-obsidian overflow-hidden", className),
|
|
7824
7833
|
...rest
|
|
7825
7834
|
},
|