@uipath/apollo-react 7.6.0 → 7.7.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/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/chat/headless/hooks/use-attachment-intake.cjs +39 -8
- package/dist/chat/headless/hooks/use-attachment-intake.d.ts +8 -1
- package/dist/chat/headless/hooks/use-attachment-intake.d.ts.map +1 -1
- package/dist/chat/headless/hooks/use-attachment-intake.js +35 -7
- package/dist/chat/headless/hooks/use-attachment-limits.cjs +35 -1
- package/dist/chat/headless/hooks/use-attachment-limits.d.ts +6 -0
- package/dist/chat/headless/hooks/use-attachment-limits.d.ts.map +1 -1
- package/dist/chat/headless/hooks/use-attachment-limits.js +32 -1
- package/dist/chat/headless/providers/attachments-provider.cjs +20 -10
- package/dist/chat/headless/providers/attachments-provider.d.ts +1 -0
- package/dist/chat/headless/providers/attachments-provider.d.ts.map +1 -1
- package/dist/chat/headless/providers/attachments-provider.js +20 -10
- package/dist/chat/locales/en.cjs +1 -1
- package/dist/chat/locales/en.d.ts.map +1 -1
- package/dist/chat/locales/en.js +1 -1
- package/dist/chat/stories/chat-story-fixtures.d.ts +1 -1
- package/dist/chat/stories/chat-story-fixtures.d.ts.map +1 -1
- package/dist/chat/styles/tailwind.chat.css +1 -1
- package/dist/chat/wind/composer/chat-composer.cjs +1 -3
- package/dist/chat/wind/composer/chat-composer.d.ts.map +1 -1
- package/dist/chat/wind/composer/chat-composer.js +2 -4
- package/dist/chat/wind/composer/chat-dropzone.cjs +29 -25
- package/dist/chat/wind/composer/chat-dropzone.d.ts +1 -1
- package/dist/chat/wind/composer/chat-dropzone.d.ts.map +1 -1
- package/dist/chat/wind/composer/chat-dropzone.js +20 -26
- package/dist/chat/wind/history/chat-history.d.ts.map +1 -1
- package/dist/chat/wind/history/history-panel.cjs +18 -7
- package/dist/chat/wind/history/history-panel.d.ts.map +1 -1
- package/dist/chat/wind/history/history-panel.js +19 -8
- package/dist/chat/wind/layout/full-screen-layout.cjs +0 -6
- package/dist/chat/wind/layout/full-screen-layout.d.ts.map +1 -1
- package/dist/chat/wind/layout/full-screen-layout.js +0 -6
- package/dist/chat/wind/layout/regions.cjs +1 -1
- package/dist/chat/wind/layout/regions.js +1 -1
- package/dist/chat/wind/messages/message-attachments.cjs +3 -20
- package/dist/chat/wind/messages/message-attachments.d.ts +0 -4
- package/dist/chat/wind/messages/message-attachments.d.ts.map +1 -1
- package/dist/chat/wind/messages/message-attachments.js +2 -10
- package/dist/chat/wind/messages/message-list.cjs +4 -0
- package/dist/chat/wind/messages/message-list.d.ts.map +1 -1
- package/dist/chat/wind/messages/message-list.js +4 -0
- package/dist/chat/wind/renderers/chat-code-block.cjs +169 -0
- package/dist/chat/wind/renderers/chat-code-block.d.ts +10 -0
- package/dist/chat/wind/renderers/chat-code-block.d.ts.map +1 -0
- package/dist/chat/wind/renderers/chat-code-block.js +125 -0
- package/dist/chat/wind/renderers/markdown-renderer.cjs +4 -3
- package/dist/chat/wind/renderers/markdown-renderer.d.ts.map +1 -1
- package/dist/chat/wind/renderers/markdown-renderer.js +4 -3
- package/dist/chat/wind/renderers/tool-call-renderer.cjs +13 -17
- package/dist/chat/wind/renderers/tool-call-renderer.d.ts.map +1 -1
- package/dist/chat/wind/renderers/tool-call-renderer.js +13 -17
- package/dist/chat/wind/renderers/tree-renderer.cjs +14 -9
- package/dist/chat/wind/renderers/tree-renderer.d.ts.map +1 -1
- package/dist/chat/wind/renderers/tree-renderer.js +13 -8
- package/dist/material/components/ap-chat/components/dropzone/dropzone.cjs +9 -31
- package/dist/material/components/ap-chat/components/dropzone/dropzone.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/dropzone/dropzone.js +9 -31
- package/package.json +1 -1
- package/dist/chat/wind/renderers/code-block-actions.cjs +0 -176
- package/dist/chat/wind/renderers/code-block-actions.d.ts +0 -9
- package/dist/chat/wind/renderers/code-block-actions.d.ts.map +0 -1
- package/dist/chat/wind/renderers/code-block-actions.js +0 -132
- package/dist/chat/wind/renderers/disclosure-tree.cjs +0 -136
- package/dist/chat/wind/renderers/disclosure-tree.d.ts +0 -22
- package/dist/chat/wind/renderers/disclosure-tree.d.ts.map +0 -1
- package/dist/chat/wind/renderers/disclosure-tree.js +0 -92
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Tooltip, TooltipContent, TooltipPortal, TooltipTrigger, cn } from "@uipath/apollo-wind";
|
|
3
|
-
import { ChevronRight } from "lucide-react";
|
|
4
|
-
import react from "react";
|
|
5
|
-
const ROW_CLASSES = 'flex w-full min-w-0 items-center gap-2 rounded p-1 text-left transition-colors motion-reduce:transition-none';
|
|
6
|
-
const FOCUS_CLASSES = 'focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';
|
|
7
|
-
const TOGGLE_CLASSES = cn('cursor-pointer hover:text-foreground', FOCUS_CLASSES);
|
|
8
|
-
function DisclosureTree({ items, openState, className }) {
|
|
9
|
-
return /*#__PURE__*/ jsx("ul", {
|
|
10
|
-
"data-slot": "wind-chat-disclosure-tree",
|
|
11
|
-
className: cn('flex min-w-0 flex-col', className),
|
|
12
|
-
children: items.map((item)=>/*#__PURE__*/ jsx(DisclosureTreeRow, {
|
|
13
|
-
item: item,
|
|
14
|
-
openState: openState
|
|
15
|
-
}, item.id))
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function DisclosureTreeRow({ item, openState }) {
|
|
19
|
-
const [localOpen, setLocalOpen] = react.useState(item.defaultOpen ?? false);
|
|
20
|
-
const open = openState ? openState.isOpen(item.id) : localOpen;
|
|
21
|
-
const setOpen = (next)=>openState ? openState.setOpen(item.id, next) : setLocalOpen(next);
|
|
22
|
-
const hasChildren = 'function' == typeof item.children ? !!item.expandable : !!item.children?.length;
|
|
23
|
-
const children = hasChildren && open ? resolveChildren(item.children) : void 0;
|
|
24
|
-
const content = /*#__PURE__*/ jsxs("span", {
|
|
25
|
-
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
26
|
-
children: [
|
|
27
|
-
item.icon && /*#__PURE__*/ jsx("span", {
|
|
28
|
-
className: "flex size-4 shrink-0 items-center justify-center [&_svg]:size-4",
|
|
29
|
-
children: item.icon
|
|
30
|
-
}),
|
|
31
|
-
/*#__PURE__*/ jsx("span", {
|
|
32
|
-
className: "min-w-0 truncate",
|
|
33
|
-
style: item.labelStyle,
|
|
34
|
-
children: item.label
|
|
35
|
-
}),
|
|
36
|
-
item.trailing && /*#__PURE__*/ jsx("span", {
|
|
37
|
-
className: "ml-auto shrink-0 pl-2 text-muted-foreground",
|
|
38
|
-
children: item.trailing
|
|
39
|
-
})
|
|
40
|
-
]
|
|
41
|
-
});
|
|
42
|
-
const chevron = /*#__PURE__*/ jsx(ChevronRight, {
|
|
43
|
-
"aria-hidden": "true",
|
|
44
|
-
className: cn('size-4 shrink-0 transition-transform motion-reduce:transition-none', open && 'rotate-90', !hasChildren && 'invisible')
|
|
45
|
-
});
|
|
46
|
-
const row = hasChildren ? /*#__PURE__*/ jsxs("button", {
|
|
47
|
-
type: "button",
|
|
48
|
-
"aria-expanded": open,
|
|
49
|
-
onClick: ()=>setOpen(!open),
|
|
50
|
-
className: cn(ROW_CLASSES, TOGGLE_CLASSES),
|
|
51
|
-
children: [
|
|
52
|
-
chevron,
|
|
53
|
-
content
|
|
54
|
-
]
|
|
55
|
-
}) : /*#__PURE__*/ jsxs("div", {
|
|
56
|
-
tabIndex: item.description ? 0 : void 0,
|
|
57
|
-
className: cn(ROW_CLASSES, item.description && FOCUS_CLASSES),
|
|
58
|
-
children: [
|
|
59
|
-
chevron,
|
|
60
|
-
content
|
|
61
|
-
]
|
|
62
|
-
});
|
|
63
|
-
return /*#__PURE__*/ jsxs("li", {
|
|
64
|
-
"data-slot": "wind-chat-disclosure-tree-item",
|
|
65
|
-
className: "min-w-0",
|
|
66
|
-
children: [
|
|
67
|
-
item.description ? /*#__PURE__*/ jsxs(Tooltip, {
|
|
68
|
-
children: [
|
|
69
|
-
/*#__PURE__*/ jsx(TooltipTrigger, {
|
|
70
|
-
asChild: true,
|
|
71
|
-
children: row
|
|
72
|
-
}),
|
|
73
|
-
/*#__PURE__*/ jsx(TooltipPortal, {
|
|
74
|
-
children: /*#__PURE__*/ jsx(TooltipContent, {
|
|
75
|
-
align: "start",
|
|
76
|
-
children: item.description
|
|
77
|
-
})
|
|
78
|
-
})
|
|
79
|
-
]
|
|
80
|
-
}) : row,
|
|
81
|
-
children && /*#__PURE__*/ jsx(DisclosureTree, {
|
|
82
|
-
items: children,
|
|
83
|
-
openState: openState,
|
|
84
|
-
className: "ml-7"
|
|
85
|
-
})
|
|
86
|
-
]
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
function resolveChildren(children) {
|
|
90
|
-
return 'function' == typeof children ? children() : children ?? [];
|
|
91
|
-
}
|
|
92
|
-
export { DisclosureTree };
|