@townco/ui 0.1.7 → 0.1.9
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/core/hooks/index.d.ts +1 -0
- package/dist/core/hooks/index.d.ts.map +1 -0
- package/dist/core/hooks/index.js +1 -0
- package/dist/core/hooks/index.js.map +1 -0
- package/dist/core/hooks/use-chat-input.d.ts +17 -17
- package/dist/core/hooks/use-chat-input.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-input.js +64 -55
- package/dist/core/hooks/use-chat-input.js.map +1 -0
- package/dist/core/hooks/use-chat-messages.d.ts +11 -11
- package/dist/core/hooks/use-chat-messages.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-messages.js +121 -114
- package/dist/core/hooks/use-chat-messages.js.map +1 -0
- package/dist/core/hooks/use-chat-session.d.ts +5 -5
- package/dist/core/hooks/use-chat-session.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-session.js +78 -80
- package/dist/core/hooks/use-chat-session.js.map +1 -0
- package/dist/core/hooks/use-media-query.d.ts +39 -0
- package/dist/core/hooks/use-media-query.js +84 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/schemas/chat.d.ts +83 -56
- package/dist/core/schemas/chat.d.ts.map +1 -0
- package/dist/core/schemas/chat.js +27 -25
- package/dist/core/schemas/chat.js.map +1 -0
- package/dist/core/schemas/index.d.ts.map +1 -0
- package/dist/core/schemas/index.js.map +1 -0
- package/dist/core/store/chat-store.d.ts +28 -22
- package/dist/core/store/chat-store.d.ts.map +1 -0
- package/dist/core/store/chat-store.js +59 -50
- package/dist/core/store/chat-store.js.map +1 -0
- package/dist/gui/components/Button.d.ts +23 -7
- package/dist/gui/components/Button.d.ts.map +1 -0
- package/dist/gui/components/Button.js +40 -27
- package/dist/gui/components/Button.js.map +1 -0
- package/dist/gui/components/Card.d.ts +26 -7
- package/dist/gui/components/Card.d.ts.map +1 -0
- package/dist/gui/components/Card.js +54 -8
- package/dist/gui/components/Card.js.map +1 -0
- package/dist/gui/components/ChatHeader.d.ts +38 -0
- package/dist/gui/components/ChatHeader.js +86 -0
- package/dist/gui/components/ChatInput.d.ts +19 -1
- package/dist/gui/components/ChatInput.d.ts.map +1 -0
- package/dist/gui/components/ChatInput.js +94 -11
- package/dist/gui/components/ChatInput.js.map +1 -0
- package/dist/gui/components/ChatInputCommandMenu.d.ts +20 -0
- package/dist/gui/components/ChatInputCommandMenu.js +62 -0
- package/dist/gui/components/ChatInterface.d.ts +12 -0
- package/dist/gui/components/ChatInterface.d.ts.map +1 -0
- package/dist/gui/components/ChatInterface.js +204 -0
- package/dist/gui/components/ChatInterface.js.map +1 -0
- package/dist/gui/components/ChatLayout.d.ts +52 -0
- package/dist/gui/components/ChatLayout.js +105 -0
- package/dist/gui/components/ChatPanelTabContent.d.ts +18 -0
- package/dist/gui/components/ChatPanelTabContent.js +15 -0
- package/dist/gui/components/ChatPreview.d.ts +12 -0
- package/dist/gui/components/ChatPreview.d.ts.map +1 -0
- package/dist/gui/components/ChatPreview.js +214 -0
- package/dist/gui/components/ChatPreview.js.map +1 -0
- package/dist/gui/components/ChatSecondaryPanel.d.ts +14 -11
- package/dist/gui/components/ChatSecondaryPanel.d.ts.map +1 -0
- package/dist/gui/components/ChatSecondaryPanel.js +115 -38
- package/dist/gui/components/ChatSecondaryPanel.js.map +1 -0
- package/dist/gui/components/ChatSidebar.d.ts +14 -0
- package/dist/gui/components/ChatSidebar.js +23 -0
- package/dist/gui/components/ChatStatus.d.ts +4 -2
- package/dist/gui/components/ChatStatus.d.ts.map +1 -0
- package/dist/gui/components/ChatStatus.js +45 -34
- package/dist/gui/components/ChatStatus.js.map +1 -0
- package/dist/gui/components/ChatView.d.ts +8 -0
- package/dist/gui/components/ChatView.d.ts.map +1 -0
- package/dist/gui/components/ChatView.js +42 -0
- package/dist/gui/components/ChatView.js.map +1 -0
- package/dist/gui/components/ConfigPanel.d.ts +20 -0
- package/dist/gui/components/ConfigPanel.d.ts.map +1 -0
- package/dist/gui/components/ConfigPanel.js +225 -0
- package/dist/gui/components/ConfigPanel.js.map +1 -0
- package/dist/gui/components/Conversation.d.ts +17 -14
- package/dist/gui/components/Conversation.d.ts.map +1 -0
- package/dist/gui/components/Conversation.js +143 -83
- package/dist/gui/components/Conversation.js.map +1 -0
- package/dist/gui/components/Dialog.d.ts +57 -11
- package/dist/gui/components/Dialog.d.ts.map +1 -0
- package/dist/gui/components/Dialog.js +84 -8
- package/dist/gui/components/Dialog.js.map +1 -0
- package/dist/gui/components/DropdownMenu.d.ts +27 -0
- package/dist/gui/components/DropdownMenu.js +68 -0
- package/dist/gui/components/HeightTransition.d.ts +12 -7
- package/dist/gui/components/HeightTransition.d.ts.map +1 -0
- package/dist/gui/components/HeightTransition.js +88 -77
- package/dist/gui/components/HeightTransition.js.map +1 -0
- package/dist/gui/components/Input.d.ts +13 -6
- package/dist/gui/components/Input.d.ts.map +1 -0
- package/dist/gui/components/Input.js +27 -16
- package/dist/gui/components/Input.js.map +1 -0
- package/dist/gui/components/InputBox.d.ts +21 -0
- package/dist/gui/components/InputBox.d.ts.map +1 -0
- package/dist/gui/components/InputBox.js +90 -0
- package/dist/gui/components/InputBox.js.map +1 -0
- package/dist/gui/components/Label.d.ts +7 -1
- package/dist/gui/components/Label.d.ts.map +1 -0
- package/dist/gui/components/Label.js +12 -2
- package/dist/gui/components/Label.js.map +1 -0
- package/dist/gui/components/MarkdownRenderer.d.ts +6 -4
- package/dist/gui/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/gui/components/MarkdownRenderer.js +178 -81
- package/dist/gui/components/MarkdownRenderer.js.map +1 -0
- package/dist/gui/components/Message.d.ts +4 -0
- package/dist/gui/components/Message.d.ts.map +1 -0
- package/dist/gui/components/Message.js +77 -3
- package/dist/gui/components/Message.js.map +1 -0
- package/dist/gui/components/MessageContent.d.ts +29 -22
- package/dist/gui/components/MessageContent.d.ts.map +1 -0
- package/dist/gui/components/MessageContent.js +1 -1
- package/dist/gui/components/MessageContent.js.map +1 -0
- package/dist/gui/components/MessageList.d.ts.map +1 -0
- package/dist/gui/components/MessageList.js.map +1 -0
- package/dist/gui/components/PlaygroundLayout.d.ts +14 -0
- package/dist/gui/components/PlaygroundLayout.d.ts.map +1 -0
- package/dist/gui/components/PlaygroundLayout.js +49 -0
- package/dist/gui/components/PlaygroundLayout.js.map +1 -0
- package/dist/gui/components/Reasoning.d.ts +30 -24
- package/dist/gui/components/Reasoning.d.ts.map +1 -0
- package/dist/gui/components/Reasoning.js +187 -60
- package/dist/gui/components/Reasoning.js.map +1 -0
- package/dist/gui/components/Response.d.ts +11 -9
- package/dist/gui/components/Response.d.ts.map +1 -0
- package/dist/gui/components/Response.js +229 -90
- package/dist/gui/components/Response.js.map +1 -0
- package/dist/gui/components/Select.d.ts +69 -10
- package/dist/gui/components/Select.d.ts.map +1 -0
- package/dist/gui/components/Select.js +118 -12
- package/dist/gui/components/Select.js.map +1 -0
- package/dist/gui/components/Sonner.d.ts +5 -0
- package/dist/gui/components/Sonner.js +23 -0
- package/dist/gui/components/StatusBar.d.ts +12 -0
- package/dist/gui/components/StatusBar.d.ts.map +1 -0
- package/dist/gui/components/StatusBar.js +58 -0
- package/dist/gui/components/StatusBar.js.map +1 -0
- package/dist/gui/components/Tabs.d.ts +24 -4
- package/dist/gui/components/Tabs.d.ts.map +1 -0
- package/dist/gui/components/Tabs.js +32 -4
- package/dist/gui/components/Tabs.js.map +1 -0
- package/dist/gui/components/Task.d.ts +28 -24
- package/dist/gui/components/Task.d.ts.map +1 -0
- package/dist/gui/components/Task.js +164 -31
- package/dist/gui/components/Task.js.map +1 -0
- package/dist/gui/components/Textarea.d.ts +15 -7
- package/dist/gui/components/Textarea.d.ts.map +1 -0
- package/dist/gui/components/Textarea.js +63 -46
- package/dist/gui/components/Textarea.js.map +1 -0
- package/dist/gui/components/ThinkingBlock.d.ts +20 -10
- package/dist/gui/components/ThinkingBlock.d.ts.map +1 -0
- package/dist/gui/components/ThinkingBlock.js +134 -35
- package/dist/gui/components/ThinkingBlock.js.map +1 -0
- package/dist/gui/components/TodoList.d.ts +12 -10
- package/dist/gui/components/TodoList.d.ts.map +1 -0
- package/dist/gui/components/TodoList.js +22 -7
- package/dist/gui/components/TodoList.js.map +1 -0
- package/dist/gui/components/TodoListItem.d.ts +9 -6
- package/dist/gui/components/TodoListItem.d.ts.map +1 -0
- package/dist/gui/components/TodoListItem.js +18 -4
- package/dist/gui/components/TodoListItem.js.map +1 -0
- package/dist/gui/components/index.d.ts +9 -1
- package/dist/gui/components/index.d.ts.map +1 -0
- package/dist/gui/components/index.js +11 -1
- package/dist/gui/components/index.js.map +1 -0
- package/dist/gui/index.d.ts.map +1 -0
- package/dist/gui/index.js.map +1 -0
- package/dist/gui/lib/utils.d.ts.map +1 -0
- package/dist/gui/lib/utils.js +1 -1
- package/dist/gui/lib/utils.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/index.test.js +0 -1
- package/dist/sdk/client/acp-client.d.ts +88 -76
- package/dist/sdk/client/acp-client.d.ts.map +1 -0
- package/dist/sdk/client/acp-client.js +215 -217
- package/dist/sdk/client/acp-client.js.map +1 -0
- package/dist/sdk/client/index.d.ts.map +1 -0
- package/dist/sdk/client/index.js.map +1 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/schemas/agent.d.ts +111 -64
- package/dist/sdk/schemas/agent.d.ts.map +1 -0
- package/dist/sdk/schemas/agent.js +24 -24
- package/dist/sdk/schemas/agent.js.map +1 -0
- package/dist/sdk/schemas/index.d.ts.map +1 -0
- package/dist/sdk/schemas/index.js.map +1 -0
- package/dist/sdk/schemas/message.d.ts +245 -147
- package/dist/sdk/schemas/message.d.ts.map +1 -0
- package/dist/sdk/schemas/message.js +40 -40
- package/dist/sdk/schemas/message.js.map +1 -0
- package/dist/sdk/schemas/session.d.ts +219 -135
- package/dist/sdk/schemas/session.d.ts.map +1 -0
- package/dist/sdk/schemas/session.js +27 -27
- package/dist/sdk/schemas/session.js.map +1 -0
- package/dist/sdk/transports/http.d.ts +55 -55
- package/dist/sdk/transports/http.d.ts.map +1 -0
- package/dist/sdk/transports/http.js +472 -469
- package/dist/sdk/transports/http.js.map +1 -0
- package/dist/sdk/transports/index.d.ts.map +1 -0
- package/dist/sdk/transports/index.js.map +1 -0
- package/dist/sdk/transports/stdio.d.ts +20 -20
- package/dist/sdk/transports/stdio.d.ts.map +1 -0
- package/dist/sdk/transports/stdio.js.map +1 -0
- package/dist/sdk/transports/types.d.ts +42 -42
- package/dist/sdk/transports/types.d.ts.map +1 -0
- package/dist/sdk/transports/types.js.map +1 -0
- package/dist/sdk/transports/websocket.d.ts +12 -12
- package/dist/sdk/transports/websocket.d.ts.map +1 -0
- package/dist/sdk/transports/websocket.js +52 -46
- package/dist/sdk/transports/websocket.js.map +1 -0
- package/dist/tui/components/ChatView.d.ts +4 -2
- package/dist/tui/components/ChatView.d.ts.map +1 -0
- package/dist/tui/components/ChatView.js +51 -18
- package/dist/tui/components/ChatView.js.map +1 -0
- package/dist/tui/components/GameOfLife.d.ts.map +1 -0
- package/dist/tui/components/GameOfLife.js +64 -35
- package/dist/tui/components/GameOfLife.js.map +1 -0
- package/dist/tui/components/InputBox.d.ts +18 -11
- package/dist/tui/components/InputBox.d.ts.map +1 -0
- package/dist/tui/components/InputBox.js +70 -10
- package/dist/tui/components/InputBox.js.map +1 -0
- package/dist/tui/components/MessageList.d.ts +4 -2
- package/dist/tui/components/MessageList.d.ts.map +1 -0
- package/dist/tui/components/MessageList.js +37 -10
- package/dist/tui/components/MessageList.js.map +1 -0
- package/dist/tui/components/ReadlineInput.d.ts +12 -6
- package/dist/tui/components/ReadlineInput.d.ts.map +1 -0
- package/dist/tui/components/ReadlineInput.js +252 -237
- package/dist/tui/components/ReadlineInput.js.map +1 -0
- package/dist/tui/components/SingleSelect.d.ts +15 -9
- package/dist/tui/components/SingleSelect.js +84 -43
- package/dist/tui/components/StatusBar.d.ts +11 -6
- package/dist/tui/components/StatusBar.d.ts.map +1 -0
- package/dist/tui/components/StatusBar.js +102 -67
- package/dist/tui/components/StatusBar.js.map +1 -0
- package/dist/tui/components/index.d.ts.map +1 -0
- package/dist/tui/components/index.js.map +1 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js.map +1 -0
- package/package.json +6 -4
- package/src/styles/global.css +2 -0
|
@@ -1,19 +1,65 @@
|
|
|
1
1
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<
|
|
5
|
+
DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>
|
|
6
|
+
>;
|
|
5
7
|
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
-
declare const DialogClose: React.ForwardRefExoticComponent<
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
declare const DialogClose: React.ForwardRefExoticComponent<
|
|
9
|
+
DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>
|
|
10
|
+
>;
|
|
11
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<
|
|
12
|
+
Omit<
|
|
13
|
+
DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>,
|
|
14
|
+
"ref"
|
|
15
|
+
> &
|
|
16
|
+
React.RefAttributes<HTMLDivElement>
|
|
17
|
+
>;
|
|
18
|
+
declare const DialogContent: React.ForwardRefExoticComponent<
|
|
19
|
+
Omit<
|
|
20
|
+
DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>,
|
|
21
|
+
"ref"
|
|
22
|
+
> &
|
|
23
|
+
React.RefAttributes<HTMLDivElement>
|
|
24
|
+
>;
|
|
9
25
|
declare const DialogHeader: {
|
|
10
|
-
|
|
11
|
-
|
|
26
|
+
({
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
12
31
|
};
|
|
13
32
|
declare const DialogFooter: {
|
|
14
|
-
|
|
15
|
-
|
|
33
|
+
({
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<
|
|
40
|
+
Omit<
|
|
41
|
+
DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>,
|
|
42
|
+
"ref"
|
|
43
|
+
> &
|
|
44
|
+
React.RefAttributes<HTMLHeadingElement>
|
|
45
|
+
>;
|
|
46
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<
|
|
47
|
+
Omit<
|
|
48
|
+
DialogPrimitive.DialogDescriptionProps &
|
|
49
|
+
React.RefAttributes<HTMLParagraphElement>,
|
|
50
|
+
"ref"
|
|
51
|
+
> &
|
|
52
|
+
React.RefAttributes<HTMLParagraphElement>
|
|
53
|
+
>;
|
|
54
|
+
export {
|
|
55
|
+
Dialog,
|
|
56
|
+
DialogPortal,
|
|
57
|
+
DialogOverlay,
|
|
58
|
+
DialogClose,
|
|
59
|
+
DialogTrigger,
|
|
60
|
+
DialogContent,
|
|
61
|
+
DialogHeader,
|
|
62
|
+
DialogFooter,
|
|
63
|
+
DialogTitle,
|
|
64
|
+
DialogDescription,
|
|
16
65
|
};
|
|
17
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
|
-
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAE9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,8JAYjB,CAAC;AAGH,QAAA,MAAM,aAAa,8JAqBjB,CAAC;AAGH,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,WAAW,oKAYf,CAAC;AAGH,QAAA,MAAM,iBAAiB,8KASrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
|
@@ -1,22 +1,98 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
2
|
import { X } from "lucide-react";
|
|
4
3
|
import * as React from "react";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
+
|
|
6
7
|
const Dialog = DialogPrimitive.Root;
|
|
7
8
|
const DialogTrigger = DialogPrimitive.Trigger;
|
|
8
9
|
const DialogPortal = DialogPrimitive.Portal;
|
|
9
10
|
const DialogClose = DialogPrimitive.Close;
|
|
10
|
-
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) =>
|
|
11
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) =>
|
|
12
|
+
_jsx(DialogPrimitive.Overlay, {
|
|
13
|
+
ref: ref,
|
|
14
|
+
className: cn(
|
|
15
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
16
|
+
className,
|
|
17
|
+
),
|
|
18
|
+
...props,
|
|
19
|
+
}),
|
|
20
|
+
);
|
|
11
21
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
12
|
-
const DialogContent = React.forwardRef(
|
|
22
|
+
const DialogContent = React.forwardRef(
|
|
23
|
+
({ className, children, ...props }, ref) =>
|
|
24
|
+
_jsxs(DialogPortal, {
|
|
25
|
+
children: [
|
|
26
|
+
_jsx(DialogOverlay, {}),
|
|
27
|
+
_jsxs(DialogPrimitive.Content, {
|
|
28
|
+
ref: ref,
|
|
29
|
+
className: cn(
|
|
30
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
31
|
+
className,
|
|
32
|
+
),
|
|
33
|
+
...props,
|
|
34
|
+
children: [
|
|
35
|
+
children,
|
|
36
|
+
_jsxs(DialogPrimitive.Close, {
|
|
37
|
+
className:
|
|
38
|
+
"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
39
|
+
children: [
|
|
40
|
+
_jsx(X, { className: "h-4 w-4" }),
|
|
41
|
+
_jsx("span", { className: "sr-only", children: "Close" }),
|
|
42
|
+
],
|
|
43
|
+
}),
|
|
44
|
+
],
|
|
45
|
+
}),
|
|
46
|
+
],
|
|
47
|
+
}),
|
|
48
|
+
);
|
|
13
49
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
14
|
-
const DialogHeader = ({ className, ...props }) =>
|
|
50
|
+
const DialogHeader = ({ className, ...props }) =>
|
|
51
|
+
_jsx("div", {
|
|
52
|
+
className: cn(
|
|
53
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
54
|
+
className,
|
|
55
|
+
),
|
|
56
|
+
...props,
|
|
57
|
+
});
|
|
15
58
|
DialogHeader.displayName = "DialogHeader";
|
|
16
|
-
const DialogFooter = ({ className, ...props }) =>
|
|
59
|
+
const DialogFooter = ({ className, ...props }) =>
|
|
60
|
+
_jsx("div", {
|
|
61
|
+
className: cn(
|
|
62
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
63
|
+
className,
|
|
64
|
+
),
|
|
65
|
+
...props,
|
|
66
|
+
});
|
|
17
67
|
DialogFooter.displayName = "DialogFooter";
|
|
18
|
-
const DialogTitle = React.forwardRef(({ className, ...props }, ref) =>
|
|
68
|
+
const DialogTitle = React.forwardRef(({ className, ...props }, ref) =>
|
|
69
|
+
_jsx(DialogPrimitive.Title, {
|
|
70
|
+
ref: ref,
|
|
71
|
+
className: cn(
|
|
72
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
73
|
+
className,
|
|
74
|
+
),
|
|
75
|
+
...props,
|
|
76
|
+
}),
|
|
77
|
+
);
|
|
19
78
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
20
|
-
const DialogDescription = React.forwardRef(({ className, ...props }, ref) =>
|
|
79
|
+
const DialogDescription = React.forwardRef(({ className, ...props }, ref) =>
|
|
80
|
+
_jsx(DialogPrimitive.Description, {
|
|
81
|
+
ref: ref,
|
|
82
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
83
|
+
...props,
|
|
84
|
+
}),
|
|
85
|
+
);
|
|
21
86
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
22
|
-
export {
|
|
87
|
+
export {
|
|
88
|
+
Dialog,
|
|
89
|
+
DialogPortal,
|
|
90
|
+
DialogOverlay,
|
|
91
|
+
DialogClose,
|
|
92
|
+
DialogTrigger,
|
|
93
|
+
DialogContent,
|
|
94
|
+
DialogHeader,
|
|
95
|
+
DialogFooter,
|
|
96
|
+
DialogTitle,
|
|
97
|
+
DialogDescription,
|
|
98
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/gui/components/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC;AAEpC,MAAM,aAAa,GAAG,eAAe,CAAC,OAAO,CAAC;AAE9C,MAAM,YAAY,GAAG,eAAe,CAAC,MAAM,CAAC;AAE5C,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC;AAE1C,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,GAAG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1C,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,KAAK,IACpB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,mDAAmD,EACnD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC;AAE5D,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAGxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,WAAW,IAC1B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAC,CAAC;AACH,iBAAiB,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,WAAW,CAAC;AAExE,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const DropdownMenuShortcut: {
|
|
24
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
/* -------------------------------------------------------------------------------------------------
|
|
7
|
+
* DropdownMenu Root
|
|
8
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
9
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
10
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
11
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
12
|
+
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
13
|
+
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
14
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
15
|
+
/* -------------------------------------------------------------------------------------------------
|
|
16
|
+
* DropdownMenuSubTrigger
|
|
17
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
18
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none", "focus:bg-muted data-[state=open]:bg-muted", inset && "pl-8", className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
|
|
19
|
+
DropdownMenuSubTrigger.displayName =
|
|
20
|
+
DropdownMenuPrimitive.SubTrigger.displayName;
|
|
21
|
+
/* -------------------------------------------------------------------------------------------------
|
|
22
|
+
* DropdownMenuSubContent
|
|
23
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
24
|
+
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-card p-1 shadow-lg", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]: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", className), ...props })));
|
|
25
|
+
DropdownMenuSubContent.displayName =
|
|
26
|
+
DropdownMenuPrimitive.SubContent.displayName;
|
|
27
|
+
/* -------------------------------------------------------------------------------------------------
|
|
28
|
+
* DropdownMenuContent
|
|
29
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
30
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-card p-1 shadow-md", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]: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", className), ...props }) })));
|
|
31
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
32
|
+
/* -------------------------------------------------------------------------------------------------
|
|
33
|
+
* DropdownMenuItem
|
|
34
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
35
|
+
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors", "focus:bg-muted focus:text-foreground", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className), ...props })));
|
|
36
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
37
|
+
/* -------------------------------------------------------------------------------------------------
|
|
38
|
+
* DropdownMenuCheckboxItem
|
|
39
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
40
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors", "focus:bg-muted focus:text-foreground", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
|
|
41
|
+
DropdownMenuCheckboxItem.displayName =
|
|
42
|
+
DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
43
|
+
/* -------------------------------------------------------------------------------------------------
|
|
44
|
+
* DropdownMenuRadioItem
|
|
45
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
46
|
+
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors", "focus:bg-muted focus:text-foreground", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
47
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
48
|
+
/* -------------------------------------------------------------------------------------------------
|
|
49
|
+
* DropdownMenuLabel
|
|
50
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
51
|
+
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })));
|
|
52
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
53
|
+
/* -------------------------------------------------------------------------------------------------
|
|
54
|
+
* DropdownMenuSeparator
|
|
55
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
56
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-border", className), ...props })));
|
|
57
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
58
|
+
/* -------------------------------------------------------------------------------------------------
|
|
59
|
+
* DropdownMenuShortcut
|
|
60
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
61
|
+
const DropdownMenuShortcut = ({ className, ...props }) => {
|
|
62
|
+
return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props }));
|
|
63
|
+
};
|
|
64
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
65
|
+
/* -------------------------------------------------------------------------------------------------
|
|
66
|
+
* Exports
|
|
67
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
68
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
interface HeightTransitionProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
durationMs?: number;
|
|
5
|
+
easing?: string;
|
|
6
|
+
pinContentTo?: "top" | "bottom";
|
|
7
|
+
className?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function HeightTransition({
|
|
10
|
-
|
|
9
|
+
export declare function HeightTransition({
|
|
10
|
+
children,
|
|
11
|
+
durationMs,
|
|
12
|
+
easing,
|
|
13
|
+
pinContentTo,
|
|
14
|
+
className,
|
|
15
|
+
}: HeightTransitionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeightTransition.d.ts","sourceRoot":"","sources":["../../../src/gui/components/HeightTransition.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG1D,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,UAAgB,EAChB,MAAe,EACf,YAAoB,EACpB,SAAS,GACV,EAAE,qBAAqB,2CAgGvB"}
|
|
@@ -1,80 +1,91 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { useCallback, useEffect, useRef } from "react";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
|
-
export function HeightTransition({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
4
|
+
export function HeightTransition({
|
|
5
|
+
children,
|
|
6
|
+
durationMs = 320,
|
|
7
|
+
easing = "ease",
|
|
8
|
+
pinContentTo = "top",
|
|
9
|
+
className,
|
|
10
|
+
}) {
|
|
11
|
+
const containerRef = useRef(null);
|
|
12
|
+
const contentRef = useRef(null);
|
|
13
|
+
const prevHeightRef = useRef(null);
|
|
14
|
+
const isAnimatingRef = useRef(false);
|
|
15
|
+
const durationRef = useRef(durationMs);
|
|
16
|
+
const easingRef = useRef(easing);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
durationRef.current = durationMs;
|
|
19
|
+
easingRef.current = easing;
|
|
20
|
+
}, [durationMs, easing]);
|
|
21
|
+
const transitionTo = useCallback(
|
|
22
|
+
(next) => {
|
|
23
|
+
const el = containerRef.current;
|
|
24
|
+
const contentEl = contentRef.current;
|
|
25
|
+
if (!el || !contentEl) return;
|
|
26
|
+
const prev = prevHeightRef.current ?? el.getBoundingClientRect().height;
|
|
27
|
+
if (Math.abs(prev - next) < 0.5) {
|
|
28
|
+
prevHeightRef.current = next;
|
|
29
|
+
el.style.height = `${next}px`;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (isAnimatingRef.current) return;
|
|
33
|
+
isAnimatingRef.current = true;
|
|
34
|
+
el.style.transition = "none";
|
|
35
|
+
el.style.height = `${prev}px`;
|
|
36
|
+
void el.getBoundingClientRect();
|
|
37
|
+
el.style.transition = `height ${durationRef.current}ms ${easingRef.current}`;
|
|
38
|
+
el.style.height = `${next}px`;
|
|
39
|
+
contentEl.style.position = "absolute";
|
|
40
|
+
if (pinContentTo === "top") {
|
|
41
|
+
contentEl.style.top = "0";
|
|
42
|
+
} else {
|
|
43
|
+
contentEl.style.bottom = "0";
|
|
44
|
+
}
|
|
45
|
+
prevHeightRef.current = next;
|
|
46
|
+
},
|
|
47
|
+
[pinContentTo],
|
|
48
|
+
);
|
|
49
|
+
const onEndTransition = useCallback((e) => {
|
|
50
|
+
const el = containerRef.current;
|
|
51
|
+
const contentEl = contentRef.current;
|
|
52
|
+
if (!el || !contentEl) return;
|
|
53
|
+
if (e.propertyName !== "height") return;
|
|
54
|
+
if (e.target !== el) return;
|
|
55
|
+
el.style.transition = "";
|
|
56
|
+
el.style.height = `auto`;
|
|
57
|
+
contentEl.style.removeProperty("position");
|
|
58
|
+
contentEl.style.removeProperty("top");
|
|
59
|
+
contentEl.style.removeProperty("bottom");
|
|
60
|
+
isAnimatingRef.current = false;
|
|
61
|
+
}, []);
|
|
62
|
+
// Observe intrinsic content height changes and animate container height accordingly
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
const el = containerRef.current;
|
|
65
|
+
const contentEl = contentRef.current;
|
|
66
|
+
if (!el || !contentEl) return;
|
|
67
|
+
const initial = contentEl.scrollHeight;
|
|
68
|
+
prevHeightRef.current = initial;
|
|
69
|
+
const ro = new ResizeObserver(() => {
|
|
70
|
+
const next = contentEl.scrollHeight;
|
|
71
|
+
transitionTo(next);
|
|
72
|
+
});
|
|
73
|
+
ro.observe(contentEl);
|
|
74
|
+
el.addEventListener("transitionend", onEndTransition);
|
|
75
|
+
return () => {
|
|
76
|
+
ro.disconnect();
|
|
77
|
+
el.removeEventListener("transitionend", onEndTransition);
|
|
78
|
+
};
|
|
79
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
80
|
+
}, [onEndTransition, transitionTo]);
|
|
81
|
+
return _jsx("div", {
|
|
82
|
+
ref: containerRef,
|
|
83
|
+
className: cn("overflow-hidden relative", className),
|
|
84
|
+
style: { willChange: "height" },
|
|
85
|
+
children: _jsx("div", {
|
|
86
|
+
ref: contentRef,
|
|
87
|
+
className: "w-full",
|
|
88
|
+
children: children,
|
|
89
|
+
}),
|
|
90
|
+
});
|
|
80
91
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeightTransition.js","sour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C;AACJ,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare const inputVariants: (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
3
|
+
declare const inputVariants: (
|
|
4
|
+
props?:
|
|
5
|
+
| ({
|
|
6
|
+
variant?: "default" | "error" | "success" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp)
|
|
8
|
+
| undefined,
|
|
9
|
+
) => string;
|
|
10
|
+
export interface InputProps
|
|
11
|
+
extends React.InputHTMLAttributes<HTMLInputElement>,
|
|
12
|
+
VariantProps<typeof inputVariants> {}
|
|
13
|
+
declare const Input: React.ForwardRefExoticComponent<
|
|
14
|
+
InputProps & React.RefAttributes<HTMLInputElement>
|
|
15
|
+
>;
|
|
9
16
|
export { Input, inputVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,aAAa;;8EAclB,CAAC;AAEF,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EACjD,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC,QAAA,MAAM,KAAK,qFAWV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,21 +1,32 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import * as React from "react";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
5
|
+
|
|
6
|
+
const inputVariants = cva(
|
|
7
|
+
"flex h-10 w-full rounded-md border bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "border-input focus-visible:ring-ring",
|
|
12
|
+
error: "border-destructive focus-visible:ring-destructive",
|
|
13
|
+
success: "border-green-500 focus-visible:ring-green-500",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: "default",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
);
|
|
21
|
+
const Input = React.forwardRef(
|
|
22
|
+
({ className, type, variant, ...props }, ref) => {
|
|
23
|
+
return _jsx("input", {
|
|
24
|
+
type: type,
|
|
25
|
+
className: cn(inputVariants({ variant, className })),
|
|
26
|
+
ref: ref,
|
|
27
|
+
...props,
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
);
|
|
20
31
|
Input.displayName = "Input";
|
|
21
32
|
export { Input, inputVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/gui/components/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,aAAa,GAAG,GAAG,CACvB,8UAA8U,EAC9U;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,sCAAsC;YAC/C,KAAK,EAAE,mDAAmD;YAC1D,OAAO,EAAE,+CAA+C;SACzD;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAC;AAMF,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC9C,OAAO,CACL,gBACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,EACpD,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface InputBoxProps {
|
|
2
|
+
value: string;
|
|
3
|
+
isSubmitting: boolean;
|
|
4
|
+
attachedFiles: Array<{
|
|
5
|
+
name: string;
|
|
6
|
+
path: string;
|
|
7
|
+
size: number;
|
|
8
|
+
}>;
|
|
9
|
+
onChange: (value: string) => void;
|
|
10
|
+
onSubmit: () => void;
|
|
11
|
+
onRemoveFile?: (index: number) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function InputBox({
|
|
14
|
+
value,
|
|
15
|
+
isSubmitting,
|
|
16
|
+
attachedFiles,
|
|
17
|
+
onChange,
|
|
18
|
+
onSubmit,
|
|
19
|
+
onRemoveFile,
|
|
20
|
+
}: InputBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=InputBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputBox.d.ts","sourceRoot":"","sources":["../../../src/gui/components/InputBox.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,YAAY,GACb,EAAE,aAAa,2CA6Df"}
|