@nexface/chat 0.1.13-alpha.1 → 0.1.13-alpha.3
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/assistant-attachments.js +0 -1
- package/dist/assistant-components.js +15 -8
- package/dist/assistant-runtime.d.ts +5 -1
- package/dist/assistant-runtime.js +8 -5
- package/dist/attachments.js +0 -1
- package/dist/client.js +0 -1
- package/dist/config.js +0 -1
- package/dist/default-chat.d.ts +1 -1
- package/dist/default-chat.js +614 -347
- package/dist/errors.js +0 -1
- package/dist/index.js +0 -1
- package/dist/messages.js +0 -1
- package/dist/page-confirmation.js +0 -1
- package/dist/protocol-messages.js +0 -1
- package/dist/protocol-response.js +0 -1
- package/dist/react.js +0 -1
- package/dist/shared/errors.js +0 -1
- package/dist/shared/runtime-controller.d.ts +1 -0
- package/dist/shared/runtime-controller.js +0 -1
- package/dist/shared/runtime-execution.js +0 -1
- package/dist/shared/schema.js +0 -1
- package/dist/storage.js +0 -1
- package/dist/styles.css +70 -2
- package/dist/tool-result.js +0 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.js +0 -1
- package/dist/ui/attachment.aui.js +0 -1
- package/dist/ui/avatar.js +0 -1
- package/dist/ui/button.js +0 -1
- package/dist/ui/code-block.js +0 -1
- package/dist/ui/collapsible.js +0 -1
- package/dist/ui/composer-voice.d.ts +3 -0
- package/dist/ui/composer-voice.js +17 -0
- package/dist/ui/dialog.js +0 -1
- package/dist/ui/dropdown-menu.js +0 -1
- package/dist/ui/home-demo/action-bar.js +0 -1
- package/dist/ui/home-demo/composer.js +1 -2
- package/dist/ui/home-demo/greeting.js +0 -1
- package/dist/ui/home-demo/messages.js +0 -1
- package/dist/ui/home-demo/styles.js +0 -1
- package/dist/ui/home-demo/suggestions.js +0 -1
- package/dist/ui/home-demo/surfaces.js +0 -1
- package/dist/ui/home-demo/thread.js +0 -1
- package/dist/ui/home-demo/trace-line.js +0 -1
- package/dist/ui/home-demo/trace.js +0 -1
- package/dist/ui/home-demo/type.js +0 -1
- package/dist/ui/input.js +0 -1
- package/dist/ui/markdown-text.js +0 -1
- package/dist/ui/reasoning.aui.js +0 -1
- package/dist/ui/reasoning.js +0 -1
- package/dist/ui/surface.js +0 -1
- package/dist/ui/thread-list.aui.js +2 -3
- package/dist/ui/tool-group.aui.js +0 -1
- package/dist/ui/tooltip-icon-button.js +0 -1
- package/dist/ui/tooltip.js +0 -1
- package/dist/ui/use-attachment-src.js +0 -1
- package/dist/ui/use-copy-to-clipboard.js +0 -1
- package/dist/ui/utils.js +0 -1
- package/dist/use-next-message.js +0 -1
- package/dist/voice/types.d.ts +31 -0
- package/dist/voice/types.js +1 -0
- package/dist/voice/use-voice.d.ts +23 -0
- package/dist/voice/use-voice.js +156 -0
- package/package.json +8 -4
- package/dist/assistant-attachments.js.map +0 -1
- package/dist/assistant-components.js.map +0 -1
- package/dist/assistant-runtime.js.map +0 -1
- package/dist/attachments.js.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/default-chat.js.map +0 -7
- package/dist/errors.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/messages.js.map +0 -1
- package/dist/page-confirmation.js.map +0 -1
- package/dist/protocol-messages.js.map +0 -1
- package/dist/protocol-response.js.map +0 -1
- package/dist/react.js.map +0 -1
- package/dist/shared/errors.js.map +0 -1
- package/dist/shared/runtime-controller.js.map +0 -1
- package/dist/shared/runtime-execution.js.map +0 -1
- package/dist/shared/schema.js.map +0 -1
- package/dist/storage.js.map +0 -1
- package/dist/tool-result.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/ui/attachment.aui.js.map +0 -1
- package/dist/ui/avatar.js.map +0 -1
- package/dist/ui/button.js.map +0 -1
- package/dist/ui/code-block.js.map +0 -1
- package/dist/ui/collapsible.js.map +0 -1
- package/dist/ui/dialog.js.map +0 -1
- package/dist/ui/dropdown-menu.js.map +0 -1
- package/dist/ui/home-demo/action-bar.js.map +0 -1
- package/dist/ui/home-demo/composer.js.map +0 -1
- package/dist/ui/home-demo/greeting.js.map +0 -1
- package/dist/ui/home-demo/messages.js.map +0 -1
- package/dist/ui/home-demo/styles.js.map +0 -1
- package/dist/ui/home-demo/suggestions.js.map +0 -1
- package/dist/ui/home-demo/surfaces.js.map +0 -1
- package/dist/ui/home-demo/thread.js.map +0 -1
- package/dist/ui/home-demo/trace-line.js.map +0 -1
- package/dist/ui/home-demo/trace.js.map +0 -1
- package/dist/ui/home-demo/type.js.map +0 -1
- package/dist/ui/input.js.map +0 -1
- package/dist/ui/markdown-text.js.map +0 -1
- package/dist/ui/reasoning.aui.js.map +0 -1
- package/dist/ui/reasoning.js.map +0 -1
- package/dist/ui/surface.js.map +0 -1
- package/dist/ui/thread-list.aui.js.map +0 -1
- package/dist/ui/tool-group.aui.js.map +0 -1
- package/dist/ui/tooltip-icon-button.js.map +0 -1
- package/dist/ui/tooltip.js.map +0 -1
- package/dist/ui/use-attachment-src.js.map +0 -1
- package/dist/ui/use-copy-to-clipboard.js.map +0 -1
- package/dist/ui/utils.js.map +0 -1
- package/dist/use-next-message.js.map +0 -1
package/dist/errors.js
CHANGED
package/dist/index.js
CHANGED
package/dist/messages.js
CHANGED
package/dist/react.js
CHANGED
package/dist/shared/errors.js
CHANGED
|
@@ -12,6 +12,7 @@ interface OperationSnapshot {
|
|
|
12
12
|
readonly taskProgress?: TaskProgress;
|
|
13
13
|
}
|
|
14
14
|
export interface RuntimeController {
|
|
15
|
+
getRegisteredTools(): ReturnType<ToolRuntime["getTools"]>;
|
|
15
16
|
beginInternalOperation(options?: {
|
|
16
17
|
signal?: AbortSignal;
|
|
17
18
|
onCancel?: () => void;
|
package/dist/shared/schema.js
CHANGED
package/dist/storage.js
CHANGED
package/dist/styles.css
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
--nxf-radius-xs: .125rem;
|
|
25
25
|
--nxf-radius-xl: .75rem;
|
|
26
26
|
--nxf-animate-spin: nxf-spin 1s linear infinite;
|
|
27
|
+
--nxf-animate-pulse: nxf-pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
|
|
27
28
|
--nxf-blur-sm: 8px;
|
|
28
29
|
--nxf-default-transition-duration: .15s;
|
|
29
30
|
--nxf-default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
|
|
@@ -535,6 +536,9 @@
|
|
|
535
536
|
.nexface-ui .nxf-me-1\.5 {
|
|
536
537
|
margin-inline-end: calc(var(--nxf-spacing) * 1.5);
|
|
537
538
|
}
|
|
539
|
+
.nexface-ui .nxf--mt-1 {
|
|
540
|
+
margin-top: calc(var(--nxf-spacing) * -1);
|
|
541
|
+
}
|
|
538
542
|
.nexface-ui .nxf-mt-1 {
|
|
539
543
|
margin-top: var(--nxf-spacing);
|
|
540
544
|
}
|
|
@@ -556,6 +560,9 @@
|
|
|
556
560
|
.nexface-ui .nxf-mt-auto {
|
|
557
561
|
margin-top: auto;
|
|
558
562
|
}
|
|
563
|
+
.nexface-ui .nxf--mr-1 {
|
|
564
|
+
margin-right: calc(var(--nxf-spacing) * -1);
|
|
565
|
+
}
|
|
559
566
|
.nexface-ui .nxf-mb-1 {
|
|
560
567
|
margin-bottom: var(--nxf-spacing);
|
|
561
568
|
}
|
|
@@ -706,6 +713,9 @@
|
|
|
706
713
|
.nexface-ui .nxf-min-h-12 {
|
|
707
714
|
min-height: calc(var(--nxf-spacing) * 12);
|
|
708
715
|
}
|
|
716
|
+
.nexface-ui .nxf-w-0\.5 {
|
|
717
|
+
width: calc(var(--nxf-spacing) * .5);
|
|
718
|
+
}
|
|
709
719
|
.nexface-ui .nxf-w-1\.5 {
|
|
710
720
|
width: calc(var(--nxf-spacing) * 1.5);
|
|
711
721
|
}
|
|
@@ -789,6 +799,9 @@
|
|
|
789
799
|
.nexface-ui .nxf-animate-in {
|
|
790
800
|
animation: nxf-enter var(--nxf-tw-animation-duration, var(--nxf-tw-duration, .15s))var(--nxf-tw-ease, ease)var(--nxf-tw-animation-delay, 0s)var(--nxf-tw-animation-iteration-count, 1)var(--nxf-tw-animation-direction, normal)var(--nxf-tw-animation-fill-mode, none);
|
|
791
801
|
}
|
|
802
|
+
.nexface-ui .nxf-animate-pulse {
|
|
803
|
+
animation: var(--nxf-animate-pulse);
|
|
804
|
+
}
|
|
792
805
|
.nexface-ui .nxf-animate-spin {
|
|
793
806
|
animation: var(--nxf-animate-spin);
|
|
794
807
|
}
|
|
@@ -843,6 +856,9 @@
|
|
|
843
856
|
.nexface-ui .nxf-items-end {
|
|
844
857
|
align-items: flex-end;
|
|
845
858
|
}
|
|
859
|
+
.nexface-ui .nxf-items-start {
|
|
860
|
+
align-items: flex-start;
|
|
861
|
+
}
|
|
846
862
|
.nexface-ui .nxf-justify-between {
|
|
847
863
|
justify-content: space-between;
|
|
848
864
|
}
|
|
@@ -1059,7 +1075,23 @@
|
|
|
1059
1075
|
.nexface-ui .nxf-bg-destructive {
|
|
1060
1076
|
background-color: oklch(57.7% .245 27.325);
|
|
1061
1077
|
}
|
|
1062
|
-
.nexface-ui .nxf-bg-foreground,.nexface-ui .nxf-bg-foreground
|
|
1078
|
+
.nexface-ui .nxf-bg-foreground,.nexface-ui .nxf-bg-foreground\/25 {
|
|
1079
|
+
background-color: var(--nxf-foreground);
|
|
1080
|
+
}
|
|
1081
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1082
|
+
.nexface-ui .nxf-bg-foreground\/25 {
|
|
1083
|
+
background-color: color-mix(in oklab, var(--nxf-foreground) 25%, transparent);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
.nexface-ui .nxf-bg-foreground\/50 {
|
|
1087
|
+
background-color: var(--nxf-foreground);
|
|
1088
|
+
}
|
|
1089
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1090
|
+
.nexface-ui .nxf-bg-foreground\/50 {
|
|
1091
|
+
background-color: color-mix(in oklab, var(--nxf-foreground) 50%, transparent);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
.nexface-ui .nxf-bg-foreground\/\[0\.025\] {
|
|
1063
1095
|
background-color: var(--nxf-foreground);
|
|
1064
1096
|
}
|
|
1065
1097
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1345,6 +1377,9 @@
|
|
|
1345
1377
|
.nexface-ui .nxf-text-pretty {
|
|
1346
1378
|
text-wrap: pretty;
|
|
1347
1379
|
}
|
|
1380
|
+
.nexface-ui .nxf-break-words {
|
|
1381
|
+
overflow-wrap: break-word;
|
|
1382
|
+
}
|
|
1348
1383
|
.nexface-ui .nxf-wrap-anywhere {
|
|
1349
1384
|
overflow-wrap: anywhere;
|
|
1350
1385
|
}
|
|
@@ -1450,6 +1485,11 @@
|
|
|
1450
1485
|
transition-timing-function: var(--nxf-tw-ease, var(--nxf-default-transition-timing-function));
|
|
1451
1486
|
transition-duration: var(--nxf-tw-duration, var(--nxf-default-transition-duration));
|
|
1452
1487
|
}
|
|
1488
|
+
.nexface-ui .nxf-transition-\[height\,background-color\] {
|
|
1489
|
+
transition-property: height, background-color;
|
|
1490
|
+
transition-timing-function: var(--nxf-tw-ease, var(--nxf-default-transition-timing-function));
|
|
1491
|
+
transition-duration: var(--nxf-tw-duration, var(--nxf-default-transition-duration));
|
|
1492
|
+
}
|
|
1453
1493
|
.nexface-ui .nxf-transition-\[transform\,opacity\] {
|
|
1454
1494
|
transition-property: transform, opacity;
|
|
1455
1495
|
transition-timing-function: var(--nxf-tw-ease, var(--nxf-default-transition-timing-function));
|
|
@@ -1829,7 +1869,15 @@
|
|
|
1829
1869
|
}
|
|
1830
1870
|
}
|
|
1831
1871
|
|
|
1832
|
-
.nexface-ui .nxf-hover\:text-accent-foreground:hover
|
|
1872
|
+
.nexface-ui .nxf-hover\:text-accent-foreground:hover {
|
|
1873
|
+
color: var(--nxf-foreground);
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
.nexface-ui .nxf-hover\:text-destructive:hover {
|
|
1877
|
+
color: oklch(57.7% .245 27.325);
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
.nexface-ui .nxf-hover\:text-foreground:hover {
|
|
1833
1881
|
color: var(--nxf-foreground);
|
|
1834
1882
|
}
|
|
1835
1883
|
|
|
@@ -1910,6 +1958,10 @@
|
|
|
1910
1958
|
--nxf-tw-ring-shadow: var(--nxf-tw-ring-inset, ) 0 0 0 calc(1px + var(--nxf-tw-ring-offset-width)) var(--nxf-tw-ring-color, currentcolor);
|
|
1911
1959
|
box-shadow: var(--nxf-tw-inset-shadow), var(--nxf-tw-inset-ring-shadow), var(--nxf-tw-ring-offset-shadow), var(--nxf-tw-ring-shadow), var(--nxf-tw-shadow);
|
|
1912
1960
|
}
|
|
1961
|
+
.nexface-ui .nxf-focus-visible\:ring-2:focus-visible {
|
|
1962
|
+
--nxf-tw-ring-shadow: var(--nxf-tw-ring-inset, ) 0 0 0 calc(2px + var(--nxf-tw-ring-offset-width)) var(--nxf-tw-ring-color, currentcolor);
|
|
1963
|
+
box-shadow: var(--nxf-tw-inset-shadow), var(--nxf-tw-inset-ring-shadow), var(--nxf-tw-ring-offset-shadow), var(--nxf-tw-ring-shadow), var(--nxf-tw-shadow);
|
|
1964
|
+
}
|
|
1913
1965
|
.nexface-ui .nxf-focus-visible\:ring-\[3px\]:focus-visible {
|
|
1914
1966
|
--nxf-tw-ring-shadow: var(--nxf-tw-ring-inset, ) 0 0 0 calc(3px + var(--nxf-tw-ring-offset-width)) var(--nxf-tw-ring-color, currentcolor);
|
|
1915
1967
|
box-shadow: var(--nxf-tw-inset-shadow), var(--nxf-tw-inset-ring-shadow), var(--nxf-tw-ring-offset-shadow), var(--nxf-tw-ring-shadow), var(--nxf-tw-shadow);
|
|
@@ -1917,6 +1969,9 @@
|
|
|
1917
1969
|
.nexface-ui .nxf-focus-visible\:ring-destructive\/20:focus-visible {
|
|
1918
1970
|
--nxf-tw-ring-color: oklab(57.7% .217662 .112464 / .2);
|
|
1919
1971
|
}
|
|
1972
|
+
.nexface-ui .nxf-focus-visible\:ring-destructive\/30:focus-visible {
|
|
1973
|
+
--nxf-tw-ring-color: oklab(57.7% .217662 .112464 / .3);
|
|
1974
|
+
}
|
|
1920
1975
|
.nexface-ui .nxf-focus-visible\:ring-ring\/50:focus-visible {
|
|
1921
1976
|
--nxf-tw-ring-color: oklab(70.8% -.00165382 .00576757 / .5);
|
|
1922
1977
|
}
|
|
@@ -1935,6 +1990,10 @@
|
|
|
1935
1990
|
outline-color: color-mix(in oklab, var(--nxf-foreground) 20%, transparent);
|
|
1936
1991
|
}
|
|
1937
1992
|
}
|
|
1993
|
+
.nexface-ui .nxf-focus-visible\:outline-none:focus-visible {
|
|
1994
|
+
--nxf-tw-outline-style: none;
|
|
1995
|
+
outline-style: none;
|
|
1996
|
+
}
|
|
1938
1997
|
.nexface-ui .nxf-active\:scale-90:active {
|
|
1939
1998
|
--nxf-tw-scale-x: 90%;
|
|
1940
1999
|
--nxf-tw-scale-y: 90%;
|
|
@@ -2119,6 +2178,10 @@
|
|
|
2119
2178
|
font-size: var(--nxf-text-sm);
|
|
2120
2179
|
line-height: var(--nxf-tw-leading, var(--nxf-text-sm--line-height));
|
|
2121
2180
|
}
|
|
2181
|
+
|
|
2182
|
+
.nexface-ui .nxf-md\:text-\[13px\] {
|
|
2183
|
+
font-size: 13px;
|
|
2184
|
+
}
|
|
2122
2185
|
}
|
|
2123
2186
|
@media (min-width: 64rem) {
|
|
2124
2187
|
.nexface-ui .nxf-lg\:text-\[1\.75rem\] {
|
|
@@ -2877,6 +2940,11 @@
|
|
|
2877
2940
|
to {
|
|
2878
2941
|
transform: rotate(360deg);
|
|
2879
2942
|
}
|
|
2943
|
+
}
|
|
2944
|
+
@keyframes nxf-pulse {
|
|
2945
|
+
50% {
|
|
2946
|
+
opacity: .5;
|
|
2947
|
+
}
|
|
2880
2948
|
}
|
|
2881
2949
|
@keyframes nxf-enter {
|
|
2882
2950
|
from {
|
package/dist/tool-result.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentRunResult } from "@nexface/agent";
|
|
2
2
|
import type { CSSProperties } from "react";
|
|
3
|
+
import type { ChatDictation } from "./voice/types.js";
|
|
3
4
|
export type ChatRunResult = Extract<AgentRunResult, {
|
|
4
5
|
outcome: {
|
|
5
6
|
type: "success";
|
|
@@ -10,6 +11,7 @@ export interface ChatSuggestion {
|
|
|
10
11
|
readonly prompt: string;
|
|
11
12
|
}
|
|
12
13
|
export interface ChatProps {
|
|
14
|
+
dictation?: false | ChatDictation | undefined;
|
|
13
15
|
open?: boolean;
|
|
14
16
|
onOpenChange?: (open: boolean) => void;
|
|
15
17
|
sessionSidebar?: boolean | {
|
package/dist/types.js
CHANGED
|
@@ -90,4 +90,3 @@ export const ComposerAttachments = () => {
|
|
|
90
90
|
export const ComposerAddAttachment = () => {
|
|
91
91
|
return (_jsx(ComposerPrimitive.AddAttachment, { asChild: true, children: _jsx(TooltipIconButton, { tooltip: "\u6DFB\u52A0\u9644\u4EF6", side: "bottom", variant: "ghost", size: "icon", className: cn("aui-composer-add-attachment text-muted-foreground hover:text-foreground hover:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30 size-7 rounded-full active:scale-[0.96] motion-reduce:transition-none"), "aria-label": "\u6DFB\u52A0\u9644\u4EF6", children: _jsx(PlusIcon, { className: cn("aui-attachment-add-icon size-4") }) }) }));
|
|
92
92
|
};
|
|
93
|
-
//# sourceMappingURL=attachment.aui.js.map
|
package/dist/ui/avatar.js
CHANGED
|
@@ -12,4 +12,3 @@ function AvatarFallback({ className, ...props }) {
|
|
|
12
12
|
return (_jsx(AvatarPrimitive.Fallback, { "data-slot": "avatar-fallback", className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs", className), ...props }));
|
|
13
13
|
}
|
|
14
14
|
export { Avatar, AvatarImage, AvatarFallback };
|
|
15
|
-
//# sourceMappingURL=avatar.js.map
|
package/dist/ui/button.js
CHANGED
|
@@ -35,4 +35,3 @@ const Button = React.forwardRef(function Button({ className, variant = "default"
|
|
|
35
35
|
return (_jsx(Comp, { ref: ref, "data-slot": "button", "data-variant": variant, "data-size": size, className: cn(buttonVariants({ variant, size, className })), ...props }));
|
|
36
36
|
});
|
|
37
37
|
export { Button, buttonVariants };
|
|
38
|
-
//# sourceMappingURL=button.js.map
|
package/dist/ui/code-block.js
CHANGED
|
@@ -46,4 +46,3 @@ export function CodeBlock({ title, viewportClassName, copyText, onCopied, lineNu
|
|
|
46
46
|
return (_jsxs("figure", { className: cn("not-prose not-fumadocs-codeblock border-foreground/10 bg-foreground/[0.025] dark:bg-foreground/[0.04] group/code relative my-6 flex min-w-0 flex-col overflow-hidden rounded-sm border", className), ...props, children: [title ? (_jsxs("figcaption", { className: cn("border-foreground/10 flex h-9 shrink-0 items-center justify-between gap-2 border-b py-0 ps-3.5 pe-2"), children: [_jsx("span", { className: cn("text-muted-foreground min-w-0 truncate font-mono text-[11px] font-medium tracking-wide"), children: title }), _jsx(CopyButton, { getText: getText, onCopied: onCopied })] })) : (_jsx(CopyButton, { getText: getText, onCopied: onCopied, className: cn("bg-background/80 absolute top-2 right-2 z-10 opacity-0 backdrop-blur-sm transition-opacity group-hover/code:opacity-100 focus-visible:opacity-100 [@media(pointer:coarse)]:opacity-100") })), _jsx("div", { ref: viewportRef, role: "region", "aria-label": "\u4EE3\u7801", tabIndex: 0, className: cn("focus-visible:outline-foreground/20 min-w-0 overflow-x-auto py-3.5 font-mono text-[12.5px] leading-relaxed [font-variant-ligatures:none] focus-visible:outline-1 focus-visible:-outline-offset-1", "[&_code]:bg-transparent! [&_pre]:w-max [&_pre]:min-w-full [&_pre]:bg-transparent! [&_pre]:px-3.5", "[&_.line]:inline-block [&_.line]:min-h-[1lh] [&_.line]:w-full", "[&_code_span]:[color:var(--shiki-light,inherit)]", "dark:[&_code_span]:[color:var(--shiki-dark)]!", "[&_.highlighted]:bg-blue-500/8 [&_.highlighted]:shadow-[inset_2px_0_0_#3b82f6] dark:[&_.highlighted]:bg-blue-500/15", "[&_pre[data-line-numbers]]:[counter-reset:line]", "[&_pre[data-line-numbers]_.line]:relative [&_pre[data-line-numbers]_.line]:pl-8 [&_pre[data-line-numbers]_.line]:[counter-increment:line]", "[&_pre[data-line-numbers]_.line]:before:text-muted-foreground/40 [&_pre[data-line-numbers]_.line]:before:absolute [&_pre[data-line-numbers]_.line]:before:left-0 [&_pre[data-line-numbers]_.line]:before:w-5 [&_pre[data-line-numbers]_.line]:before:text-right [&_pre[data-line-numbers]_.line]:before:tabular-nums [&_pre[data-line-numbers]_.line]:before:[content:counter(line)]", lineNumbers &&
|
|
47
47
|
"[&_.line]:before:text-muted-foreground/40 [counter-reset:line] [&_.line]:relative [&_.line]:pl-8 [&_.line]:[counter-increment:line] [&_.line]:before:absolute [&_.line]:before:left-0 [&_.line]:before:w-5 [&_.line]:before:text-right [&_.line]:before:tabular-nums [&_.line]:before:[content:counter(line)]", viewportClassName), children: children })] }));
|
|
48
48
|
}
|
|
49
|
-
//# sourceMappingURL=code-block.js.map
|
package/dist/ui/collapsible.js
CHANGED
|
@@ -12,4 +12,3 @@ const CollapsibleContent = forwardRef(function CollapsibleContent(props, ref) {
|
|
|
12
12
|
return (_jsx(CollapsiblePrimitive.Content, { "data-slot": "collapsible-content", ref: ref, ...props }));
|
|
13
13
|
});
|
|
14
14
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
15
|
-
//# sourceMappingURL=collapsible.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Adapted from assistant-ui Elements ComposerVoice (18f03fec45d406b0285ccc4165f6db143ba87c7d).
|
|
3
|
+
// https://github.com/assistant-ui/assistant-ui/blob/18f03fec45d406b0285ccc4165f6db143ba87c7d/packages/ui/src/components/react/assistant-ui/elements/composer.tsx
|
|
4
|
+
// Keep the upstream illustrative waveform without exposing microphone-level APIs.
|
|
5
|
+
import { useEffect, useState } from "react";
|
|
6
|
+
import { cn } from "./utils.js";
|
|
7
|
+
const barCount = 64;
|
|
8
|
+
export function ComposerVoice({ recording }) {
|
|
9
|
+
const [tick, setTick] = useState(0);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!recording)
|
|
12
|
+
return;
|
|
13
|
+
const timer = setInterval(() => setTick((value) => value + 1), 100);
|
|
14
|
+
return () => clearInterval(timer);
|
|
15
|
+
}, [recording]);
|
|
16
|
+
return _jsx("div", { "data-slot": "composer-voice", "data-recording": recording || undefined, className: cn("flex h-7 min-w-0 flex-1 items-center overflow-hidden px-2"), children: _jsx("div", { className: cn("flex h-6 w-full items-center justify-between overflow-hidden"), "aria-hidden": true, children: Array.from({ length: barCount }, (_, index) => _jsx("span", { className: cn("w-0.5 shrink-0 rounded-full transition-[height,background-color] duration-150 motion-reduce:transition-none", recording ? "bg-foreground/50" : "bg-foreground/25"), style: { height: recording ? 5 + Math.abs(Math.sin(index * 1.35 + tick * 0.55)) * 13 : 3 } }, index)) }) });
|
|
17
|
+
}
|
package/dist/ui/dialog.js
CHANGED
|
@@ -48,4 +48,3 @@ function DialogDescription({ className, ...props }) {
|
|
|
48
48
|
return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
49
49
|
}
|
|
50
50
|
export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogPortal, DialogTitle, DialogTrigger };
|
|
51
|
-
//# sourceMappingURL=dialog.js.map
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -21,4 +21,3 @@ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
|
21
21
|
return (_jsx(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn(menuItemClass, "data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[variant=destructive]:text-destructive", className), ...props }));
|
|
22
22
|
}
|
|
23
23
|
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem };
|
|
24
|
-
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -7,4 +7,3 @@ import { actionButtonClass } from "./styles.js";
|
|
|
7
7
|
export function AssistantActionBar() {
|
|
8
8
|
return (_jsx(ActionBarPrimitive.Root, { autohide: "never", className: cn("flex items-center gap-1.5"), children: _jsxs(ActionBarPrimitive.Copy, { "aria-label": "\u590D\u5236\u56DE\u590D", className: cn(actionButtonClass), children: [_jsx(AuiIf, { condition: (s) => s.message.isCopied, children: _jsx(CheckIcon, { className: cn("size-4") }) }), _jsx(AuiIf, { condition: (s) => !s.message.isCopied, children: _jsx(CopyIcon, { className: cn("size-4") }) })] }) }));
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=action-bar.js.map
|
|
@@ -4,9 +4,8 @@ import { cn } from "../utils.js";
|
|
|
4
4
|
export function Composer({ children, inputProps, actions, ...props }) {
|
|
5
5
|
return (_jsx(ComposerPrimitive.Root, { className: cn("relative w-full"), ...props, children: _jsx(ComposerPrimitive.AttachmentDropzone, { asChild: true, disabled: inputProps.disabled, onDropCapture: (event) => { if (inputProps.disabled)
|
|
6
6
|
event.preventDefault(); }, onDragOverCapture: (event) => { if (inputProps.disabled)
|
|
7
|
-
event.preventDefault(); }, children: _jsxs("div", { "data-slot": "aui_composer-shell", className: cn("border-foreground/10 bg-muted/30 focus-within:border-foreground/25 data-[dragging=true]:border-foreground/40 rounded-thread flex flex-col border transition-colors data-[dragging=true]:border-dashed"), children: [_jsx("div", { className: cn("has-[.aui-attachment-root]:px-3 has-[.aui-attachment-root]:pt-3"), children: children }), _jsx(ComposerPrimitive.Input, { asChild: true, ...inputProps, children: _jsx("textarea", { "data-composer-input": true, rows: 1, className: cn("placeholder:text-muted-foreground field-sizing-content max-h-48 w-full resize-none bg-transparent px-4 pt-3 pb-2 text-base leading-6 focus:outline-none") }) }), _jsx("div", { className: cn("flex items-center justify-between gap-2 px-2 pb-2"), children: actions })] }) }) }));
|
|
7
|
+
event.preventDefault(); }, children: _jsxs("div", { "data-slot": "aui_composer-shell", className: cn("border-foreground/10 bg-muted/30 focus-within:border-foreground/25 data-[dragging=true]:border-foreground/40 rounded-thread flex flex-col border transition-colors data-[dragging=true]:border-dashed"), children: [_jsx("div", { className: cn("has-[.aui-attachment-root]:px-3 has-[.aui-attachment-root]:pt-3"), children: children }), _jsx(ComposerPrimitive.Input, { asChild: true, ...inputProps, children: _jsx("textarea", { "data-composer-input": true, rows: 1, className: cn("placeholder:text-muted-foreground field-sizing-content block max-h-48 w-full resize-none bg-transparent px-4 pt-3 pb-2 text-base leading-6 focus:outline-none") }) }), _jsx("div", { className: cn("flex items-center justify-between gap-2 px-2 pb-2"), children: actions })] }) }) }));
|
|
8
8
|
}
|
|
9
9
|
export function EditComposer({ children, inputProps, cancelProps, sendProps, ...props }) {
|
|
10
10
|
return (_jsx(MessagePrimitive.Root, { "data-role": "user", "data-slot": "aui_edit-composer-wrapper", className: cn("mx-auto flex w-full max-w-(--nxf-thread-max-width) flex-col items-end"), children: _jsxs(ComposerPrimitive.Root, { className: cn("border-foreground/10 bg-muted/30 focus-within:border-foreground/25 rounded-thread flex w-full max-w-[85%] flex-col border transition-colors"), ...props, children: [_jsx(ComposerPrimitive.Input, { asChild: true, ...inputProps, children: _jsx("textarea", { autoFocus: true, rows: 1, className: cn("field-sizing-content max-h-48 min-h-12 w-full resize-none bg-transparent px-4 pt-3.5 pb-1 text-[15px] leading-6 focus:outline-none") }) }), children, _jsxs("div", { className: cn("flex items-center justify-end gap-1.5 px-2.5 pb-2.5"), children: [_jsx(ComposerPrimitive.Cancel, { asChild: true, children: _jsx("button", { type: "button", ...cancelProps, className: cn("text-muted-foreground hover:text-foreground rounded-control h-8 px-3 text-[13px] transition-colors"), children: "\u53D6\u6D88" }) }), _jsx(ComposerPrimitive.Send, { asChild: true, children: _jsx("button", { type: "button", ...sendProps, className: cn("bg-primary text-primary-foreground rounded-control h-8 px-3 text-[13px] font-medium transition-opacity disabled:opacity-40"), children: "\u4FDD\u5B58\u5E76\u91CD\u65B0\u53D1\u9001" }) })] })] }) }));
|
|
11
11
|
}
|
|
12
|
-
//# sourceMappingURL=composer.js.map
|
|
@@ -5,4 +5,3 @@ import { typeSection, typeDeck } from "./type.js";
|
|
|
5
5
|
export function Greeting({ title, description }) {
|
|
6
6
|
return (_jsxs("div", { className: cn("animate-in fade-in slide-in-from-bottom-1 mx-auto mb-8 flex w-full max-w-(--nxf-thread-max-width) flex-col items-center text-center duration-200"), children: [_jsx("p", { className: cn(typeSection), children: title }), description ? _jsx("p", { className: cn(typeDeck), children: description }) : null] }));
|
|
7
7
|
}
|
|
8
|
-
//# sourceMappingURL=greeting.js.map
|
|
@@ -15,4 +15,3 @@ function MessageError() {
|
|
|
15
15
|
return _jsx("p", { role: "status", className: cn("mt-2 text-[13px] text-muted-foreground"), children: "Stopped" });
|
|
16
16
|
return _jsx(MessagePrimitive.Error, { children: _jsx(ErrorPrimitive.Root, { role: "alert", className: cn("mt-2 border-l-2 pl-3 text-[13px] border-destructive/60 text-destructive"), children: _jsx(ErrorPrimitive.Message, { className: cn("line-clamp-2") }) }) });
|
|
17
17
|
}
|
|
18
|
-
//# sourceMappingURL=messages.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export const actionButtonClass = "text-muted-foreground/70 hover:text-foreground disabled:pointer-events-none disabled:opacity-40 p-1 transition-colors";
|
|
2
2
|
export const menuContentClass = "bg-popover text-popover-foreground border-foreground/10 data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out rounded-surface z-50 min-w-28 overflow-hidden border p-1";
|
|
3
3
|
export const menuItemClass = "hover:bg-muted focus:bg-muted flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-[13px] outline-none select-none";
|
|
4
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -13,4 +13,3 @@ export function Suggestions({ suggestions, disabled, onSend }) {
|
|
|
13
13
|
// under the cursor. Disabled buttons also stay out of the tab order in React 18.
|
|
14
14
|
_jsx("div", { "aria-hidden": hidden, className: cn("animate-in fade-in mx-auto flex max-w-[34rem] flex-wrap items-center justify-center gap-2 transition-opacity duration-200 motion-reduce:animate-none", hidden && "opacity-0"), children: suggestions.map((suggestion) => (_jsx(ThreadPrimitive.Suggestion, { prompt: suggestion.prompt, send: true, disabled: hidden, onClick: (event) => { event.preventDefault(); onSend(suggestion.prompt); }, className: cn(suggestionChipClass), children: suggestion.label }, suggestion.prompt))) }));
|
|
15
15
|
}
|
|
16
|
-
//# sourceMappingURL=suggestions.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../utils.js";
|
|
3
3
|
export function ShimmerLabel({ active = true, className, ...props }) { return _jsx("span", { className: cn(active && "shimmer motion-reduce:animate-none", className), ...props }); }
|
|
4
|
-
//# sourceMappingURL=surfaces.js.map
|
|
@@ -9,4 +9,3 @@ export function Thread({ empty: isEmpty, welcome, suggestions, composer, footer,
|
|
|
9
9
|
// jump appears on Windows and on macOS set to always show them.
|
|
10
10
|
"relative flex flex-1 [scrollbar-gutter:stable_both-edges] flex-col overflow-y-auto px-4 pt-6 md:px-6", isEmpty && "justify-center"), children: [isEmpty ? welcome : null, _jsxs("div", { className: cn("mx-auto mb-12 flex w-full max-w-(--nxf-thread-max-width) flex-col gap-y-6 empty:hidden"), children: [_jsx(ThreadPrimitive.Messages, { children: renderMessage }), children] }), _jsxs(ThreadPrimitive.ViewportFooter, { className: cn("bg-background mx-auto flex w-full max-w-(--nxf-thread-max-width) flex-col gap-3 overflow-visible pb-5", !isEmpty && "sticky bottom-0 mt-auto"), children: [footer, composer, isEmpty ? suggestions : null] })] }) }));
|
|
11
11
|
}
|
|
12
|
-
//# sourceMappingURL=thread.js.map
|
|
@@ -35,4 +35,3 @@ export function formatDuration(ms) {
|
|
|
35
35
|
export function TraceLine({ live, label, detail, meta, }) {
|
|
36
36
|
return (_jsxs("div", { className: cn("my-1 flex items-baseline gap-2 font-mono text-[12px] [font-variant-ligatures:none]"), children: [_jsx(TraceMarker, { live: live }), _jsx("span", { className: cn("text-muted-foreground min-w-0 flex-1 truncate"), children: live ? (_jsxs(ShimmerLabel, { children: [label, detail ? ` ${detail}` : null] })) : (_jsxs(_Fragment, { children: [label, detail ? ` ${detail}` : null] })) }), meta ? (_jsx("span", { className: cn("text-muted-foreground/50 shrink-0"), children: meta })) : null] }));
|
|
37
37
|
}
|
|
38
|
-
//# sourceMappingURL=trace-line.js.map
|
|
@@ -21,4 +21,3 @@ export function ToolCall({ toolName, args, argsText, result, status, isError, sh
|
|
|
21
21
|
return _jsxs(_Fragment, { children: [line, reason] });
|
|
22
22
|
return _jsxs(_Fragment, { children: [line, reason, _jsxs(Collapsible, { children: [_jsx(DisclosureTrigger, { live: false, label: "\u64CD\u4F5C\u660E\u7EC6" }), _jsxs(CollapsibleContent, { className: cn(disclosureContentClass), children: [_jsx("pre", { className: cn("overflow-x-auto text-xs"), "aria-label": "\u64CD\u4F5C\u8F93\u5165", children: argsText || JSON.stringify(args, null, 2) }), result !== undefined ? _jsx("pre", { className: cn("overflow-x-auto text-xs"), "aria-label": "\u64CD\u4F5C\u8F93\u51FA", children: error ? error.userMessage : tool?.toolState === "cancelled" ? "Stopped" : tool?.toolState === "rejected" ? "Rejected" : tool?.toolState === "not_started" ? "Not started" : typeof result === "string" ? result : JSON.stringify(result, null, 2) }) : null] })] })] });
|
|
23
23
|
}
|
|
24
|
-
//# sourceMappingURL=trace.js.map
|
package/dist/ui/input.js
CHANGED
|
@@ -5,4 +5,3 @@ const Input = React.forwardRef(function Input({ className, type, ...props }, ref
|
|
|
5
5
|
return (_jsx("input", { ref: ref, type: type, "data-slot": "input", className: cn("file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 bg-muted/60 focus-visible:bg-background h-9 w-full min-w-0 rounded-lg border border-transparent px-3 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-1 md:text-sm", className), ...props }));
|
|
6
6
|
});
|
|
7
7
|
export { Input };
|
|
8
|
-
//# sourceMappingURL=input.js.map
|
package/dist/ui/markdown-text.js
CHANGED
package/dist/ui/reasoning.aui.js
CHANGED
package/dist/ui/reasoning.js
CHANGED
|
@@ -104,4 +104,3 @@ function ReasoningText({ className, children, ...props }) {
|
|
|
104
104
|
return (_jsx("div", { ref: scrollRef, "data-slot": "reasoning-text", className: cn("aui-reasoning-text relative z-0 max-h-64 overflow-y-auto ps-6 pt-2 pb-2 leading-relaxed text-pretty", "transform-gpu transition-[transform,opacity] ease-[cubic-bezier(0.32,0.72,0,1)]", "motion-reduce:animate-none", "group-data-open/collapsible-content:animate-in", "group-data-closed/collapsible-content:animate-out", "group-data-open/collapsible-content:fade-in-0", "group-data-closed/collapsible-content:fade-out-0", "group-data-open/collapsible-content:slide-in-from-top-4", "group-data-closed/collapsible-content:slide-out-to-top-4", "group-data-open/collapsible-content:blur-in-[2px]", "group-data-closed/collapsible-content:blur-out-[2px]", "group-data-open/collapsible-content:animation-duration-(--animation-duration)", "group-data-closed/collapsible-content:animation-duration-(--animation-duration)", className), ...props, children: _jsx("div", { ref: contentRef, className: cn("aui-reasoning-text-content space-y-4"), children: children }) }));
|
|
105
105
|
}
|
|
106
106
|
export { ReasoningRoot, ReasoningContent, ReasoningText, };
|
|
107
|
-
//# sourceMappingURL=reasoning.js.map
|
package/dist/ui/surface.js
CHANGED
|
@@ -14,7 +14,7 @@ export function ThreadListNew(props) {
|
|
|
14
14
|
return _jsx(ThreadListPrimitive.New, { asChild: true, children: _jsxs("button", { type: "button", "data-slot": "aui_thread-list-new", className: cn("border-foreground/10 bg-background hover:border-foreground/25 rounded-control flex h-8 w-full shrink-0 items-center gap-2 border px-2.5 text-[13px] transition-colors"), ...props, children: [_jsx(PlusIcon, { className: cn("size-4 shrink-0") }), "\u65B0\u5EFA\u4F1A\u8BDD"] }) });
|
|
15
15
|
}
|
|
16
16
|
export function ThreadListSearch({ value, onValueChange }) {
|
|
17
|
-
return _jsxs("div", { "data-slot": "aui_thread-list-search", className: cn("relative px-0.5 py-1"), children: [_jsx(SearchIcon, { "data-slot": "aui_thread-list-search-icon", className: cn("text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2") }), _jsx(Input, { type: "search", value: value, onChange: (event) => onValueChange(event.target.value), "aria-label": "\u641C\u7D22\u4F1A\u8BDD", placeholder: "\u641C\u7D22\u4F1A\u8BDD", className: cn("border-foreground/10 bg-background h-8 ps-8 text-[13px]") })] });
|
|
17
|
+
return _jsxs("div", { "data-slot": "aui_thread-list-search", className: cn("relative px-0.5 py-1"), children: [_jsx(SearchIcon, { "data-slot": "aui_thread-list-search-icon", className: cn("text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2") }), _jsx(Input, { type: "search", value: value, onChange: (event) => onValueChange(event.target.value), "aria-label": "\u641C\u7D22\u4F1A\u8BDD", placeholder: "\u641C\u7D22\u4F1A\u8BDD", className: cn("border-foreground/10 bg-background h-8 ps-8 text-[13px] md:text-[13px]") })] });
|
|
18
18
|
}
|
|
19
19
|
export function ThreadListItem({ disabled, menu }) {
|
|
20
20
|
const isRunning = useAuiState((s) => s.threadListItem.isRunning);
|
|
@@ -52,7 +52,7 @@ function ThreadListItemRename({ onDone }) {
|
|
|
52
52
|
inputRef.current?.focus();
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
|
-
return _jsx(Input, { ref: inputRef, autoFocus: true, "data-slot": "aui_thread-list-item-rename", "aria-label": "\u4F1A\u8BDD\u540D\u79F0", maxLength: 80, value: value, className: cn("h-7 min-w-0 flex-1 ps-2 pe-8 text-[13px]"), onChange: (event) => setValue(event.target.value), onBlur: () => commit(false), onKeyDown: (event) => {
|
|
55
|
+
return _jsx(Input, { ref: inputRef, autoFocus: true, "data-slot": "aui_thread-list-item-rename", "aria-label": "\u4F1A\u8BDD\u540D\u79F0", maxLength: 80, value: value, className: cn("h-7 min-w-0 flex-1 ps-2 pe-8 text-[13px] md:text-[13px]"), onChange: (event) => setValue(event.target.value), onBlur: () => commit(false), onKeyDown: (event) => {
|
|
56
56
|
if (event.nativeEvent.isComposing || event.keyCode === 229)
|
|
57
57
|
return;
|
|
58
58
|
if (event.key === "Enter") {
|
|
@@ -66,4 +66,3 @@ function ThreadListItemRename({ onDone }) {
|
|
|
66
66
|
}
|
|
67
67
|
} });
|
|
68
68
|
}
|
|
69
|
-
//# sourceMappingURL=thread-list.aui.js.map
|
|
@@ -37,4 +37,3 @@ function ToolGroupContent({ className, children, ...props }) {
|
|
|
37
37
|
return (_jsx(CollapsibleContent, { "data-slot": "tool-group-content", className: cn("aui-tool-group-content relative overflow-hidden text-sm outline-none", "group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none", "data-closed:animate-collapsible-up", "data-open:animate-collapsible-down", "data-closed:fill-mode-forwards", "data-closed:pointer-events-none", "[--nxf-tw-duration:var(--animation-duration)]", className), ...props, children: _jsx("div", { className: cn("mt-2 flex flex-col gap-2", "group-data-[variant=ghost]/tool-group-root:mt-1 group-data-[variant=ghost]/tool-group-root:gap-1", "group-data-[variant=outline]/tool-group-root:mt-3 group-data-[variant=outline]/tool-group-root:border-t group-data-[variant=outline]/tool-group-root:px-4 group-data-[variant=outline]/tool-group-root:pt-3", "group-data-[variant=muted]/tool-group-root:mt-3 group-data-[variant=muted]/tool-group-root:border-t group-data-[variant=muted]/tool-group-root:px-4 group-data-[variant=muted]/tool-group-root:pt-3", "[&>*]:animate-in [&>*]:fade-in-0 [&>*]:blur-in-[2px] [&>*]:slide-in-from-top-1 [&>*]:animation-duration-(--animation-duration) [&>*]:ease-[cubic-bezier(0.32,0.72,0,1)]", "[&>*]:motion-reduce:animate-none", "[&>*:nth-child(2)]:[animation-delay:40ms]", "[&>*:nth-child(3)]:[animation-delay:80ms]", "[&>*:nth-child(4)]:[animation-delay:120ms]", "[&>*:nth-child(n+5)]:[animation-delay:160ms]"), children: children }) }));
|
|
38
38
|
}
|
|
39
39
|
export { ToolGroupRoot, ToolGroupContent };
|
|
40
|
-
//# sourceMappingURL=tool-group.aui.js.map
|
|
@@ -9,4 +9,3 @@ export const TooltipIconButton = forwardRef(({ children, tooltip, side = "bottom
|
|
|
9
9
|
return (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", size: "icon", ...rest, className: cn("aui-button-icon size-6 p-1 active:scale-90", className), ref: ref, children: [_jsx(Slot.Slottable, { children: children }), _jsx("span", { className: cn("aui-sr-only sr-only"), children: tooltip })] }) }), _jsx(TooltipContent, { side: side, children: tooltip })] }) }));
|
|
10
10
|
});
|
|
11
11
|
TooltipIconButton.displayName = "TooltipIconButton";
|
|
12
|
-
//# sourceMappingURL=tooltip-icon-button.js.map
|
package/dist/ui/tooltip.js
CHANGED
|
@@ -20,4 +20,3 @@ function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
|
20
20
|
return (_jsx(TooltipPrimitive.Portal, { container: container, children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", className), ...props, children: [_jsx(PortalThemeSync, {}), children, _jsx(TooltipPrimitive.Arrow, { className: cn("z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground") })] }) }));
|
|
21
21
|
}
|
|
22
22
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
23
|
-
//# sourceMappingURL=tooltip.js.map
|
package/dist/ui/utils.js
CHANGED
|
@@ -5,4 +5,3 @@ export function cn(...inputs) {
|
|
|
5
5
|
const raw = clsx(inputs).split(/\s+/).map((token) => token.replace(/^nxf-/, "")).join(" ");
|
|
6
6
|
return twMerge(raw).split(/\s+/).filter(Boolean).map((token) => /^(aui-|nexface-)/.test(token) ? token : `nxf-${token}`).join(" ");
|
|
7
7
|
}
|
|
8
|
-
//# sourceMappingURL=utils.js.map
|
package/dist/use-next-message.js
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare type ChatDictation = Pick<DictationAdapter, "listen">;
|
|
2
|
+
|
|
3
|
+
declare namespace DictationAdapter {
|
|
4
|
+
type Status = {
|
|
5
|
+
type: "starting" | "running";
|
|
6
|
+
} | {
|
|
7
|
+
type: "ended";
|
|
8
|
+
reason: "stopped" | "cancelled" | "error";
|
|
9
|
+
};
|
|
10
|
+
type Result = {
|
|
11
|
+
transcript: string;
|
|
12
|
+
isFinal?: boolean;
|
|
13
|
+
};
|
|
14
|
+
type Session = {
|
|
15
|
+
status: Status;
|
|
16
|
+
stop: () => Promise<void>;
|
|
17
|
+
cancel: () => void;
|
|
18
|
+
onSpeechStart: (callback: () => void) => Unsubscribe;
|
|
19
|
+
onSpeechEnd: (callback: (result: Result) => void) => Unsubscribe;
|
|
20
|
+
onSpeech: (callback: (result: Result) => void) => Unsubscribe;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare type DictationAdapter = {
|
|
25
|
+
listen: () => DictationAdapter.Session;
|
|
26
|
+
disableInputDuringDictation?: boolean;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
declare type Unsubscribe = () => void;
|
|
30
|
+
|
|
31
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComposerRuntime, DictationAdapter } from "@assistant-ui/react";
|
|
2
|
+
import type { ChatDictation } from "./types.js";
|
|
3
|
+
export interface VoiceComposerState {
|
|
4
|
+
supported: boolean;
|
|
5
|
+
status: "idle" | "starting" | "recording" | "transcribing";
|
|
6
|
+
cancel(): void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useVoiceInput(options: {
|
|
9
|
+
dictation: false | ChatDictation | undefined;
|
|
10
|
+
active: boolean;
|
|
11
|
+
open: boolean;
|
|
12
|
+
blocked: boolean;
|
|
13
|
+
sessionId: string;
|
|
14
|
+
composer(): ComposerRuntime;
|
|
15
|
+
notice(message: string): void;
|
|
16
|
+
}): {
|
|
17
|
+
dictation: DictationAdapter | undefined;
|
|
18
|
+
state: {
|
|
19
|
+
status: "idle" | "starting" | "recording" | "transcribing";
|
|
20
|
+
supported: boolean;
|
|
21
|
+
cancel: () => void;
|
|
22
|
+
};
|
|
23
|
+
};
|