@townco/ui 0.1.8 → 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.
Files changed (217) hide show
  1. package/dist/core/hooks/index.d.ts.map +1 -0
  2. package/dist/core/hooks/index.js.map +1 -0
  3. package/dist/core/hooks/use-chat-input.d.ts +17 -17
  4. package/dist/core/hooks/use-chat-input.d.ts.map +1 -0
  5. package/dist/core/hooks/use-chat-input.js +64 -55
  6. package/dist/core/hooks/use-chat-input.js.map +1 -0
  7. package/dist/core/hooks/use-chat-messages.d.ts +11 -11
  8. package/dist/core/hooks/use-chat-messages.d.ts.map +1 -0
  9. package/dist/core/hooks/use-chat-messages.js +121 -114
  10. package/dist/core/hooks/use-chat-messages.js.map +1 -0
  11. package/dist/core/hooks/use-chat-session.d.ts +5 -5
  12. package/dist/core/hooks/use-chat-session.d.ts.map +1 -0
  13. package/dist/core/hooks/use-chat-session.js +78 -80
  14. package/dist/core/hooks/use-chat-session.js.map +1 -0
  15. package/dist/core/index.d.ts.map +1 -0
  16. package/dist/core/index.js.map +1 -0
  17. package/dist/core/schemas/chat.d.ts +83 -56
  18. package/dist/core/schemas/chat.d.ts.map +1 -0
  19. package/dist/core/schemas/chat.js +27 -25
  20. package/dist/core/schemas/chat.js.map +1 -0
  21. package/dist/core/schemas/index.d.ts.map +1 -0
  22. package/dist/core/schemas/index.js.map +1 -0
  23. package/dist/core/store/chat-store.d.ts +28 -22
  24. package/dist/core/store/chat-store.d.ts.map +1 -0
  25. package/dist/core/store/chat-store.js +59 -50
  26. package/dist/core/store/chat-store.js.map +1 -0
  27. package/dist/gui/components/Button.d.ts +23 -7
  28. package/dist/gui/components/Button.d.ts.map +1 -0
  29. package/dist/gui/components/Button.js +40 -27
  30. package/dist/gui/components/Button.js.map +1 -0
  31. package/dist/gui/components/Card.d.ts +26 -7
  32. package/dist/gui/components/Card.d.ts.map +1 -0
  33. package/dist/gui/components/Card.js +54 -8
  34. package/dist/gui/components/Card.js.map +1 -0
  35. package/dist/gui/components/ChatInput.d.ts.map +1 -0
  36. package/dist/gui/components/ChatInput.js.map +1 -0
  37. package/dist/gui/components/ChatInterface.d.ts +12 -0
  38. package/dist/gui/components/ChatInterface.d.ts.map +1 -0
  39. package/dist/gui/components/ChatInterface.js +204 -0
  40. package/dist/gui/components/ChatInterface.js.map +1 -0
  41. package/dist/gui/components/ChatPreview.d.ts +12 -0
  42. package/dist/gui/components/ChatPreview.d.ts.map +1 -0
  43. package/dist/gui/components/ChatPreview.js +214 -0
  44. package/dist/gui/components/ChatPreview.js.map +1 -0
  45. package/dist/gui/components/ChatSecondaryPanel.d.ts +14 -11
  46. package/dist/gui/components/ChatSecondaryPanel.d.ts.map +1 -0
  47. package/dist/gui/components/ChatSecondaryPanel.js +115 -38
  48. package/dist/gui/components/ChatSecondaryPanel.js.map +1 -0
  49. package/dist/gui/components/ChatStatus.d.ts +4 -2
  50. package/dist/gui/components/ChatStatus.d.ts.map +1 -0
  51. package/dist/gui/components/ChatStatus.js +45 -34
  52. package/dist/gui/components/ChatStatus.js.map +1 -0
  53. package/dist/gui/components/ChatView.d.ts +8 -0
  54. package/dist/gui/components/ChatView.d.ts.map +1 -0
  55. package/dist/gui/components/ChatView.js +42 -0
  56. package/dist/gui/components/ChatView.js.map +1 -0
  57. package/dist/gui/components/ConfigPanel.d.ts +20 -0
  58. package/dist/gui/components/ConfigPanel.d.ts.map +1 -0
  59. package/dist/gui/components/ConfigPanel.js +225 -0
  60. package/dist/gui/components/ConfigPanel.js.map +1 -0
  61. package/dist/gui/components/Conversation.d.ts +17 -14
  62. package/dist/gui/components/Conversation.d.ts.map +1 -0
  63. package/dist/gui/components/Conversation.js +143 -83
  64. package/dist/gui/components/Conversation.js.map +1 -0
  65. package/dist/gui/components/Dialog.d.ts +57 -11
  66. package/dist/gui/components/Dialog.d.ts.map +1 -0
  67. package/dist/gui/components/Dialog.js +84 -8
  68. package/dist/gui/components/Dialog.js.map +1 -0
  69. package/dist/gui/components/HeightTransition.d.ts +12 -7
  70. package/dist/gui/components/HeightTransition.d.ts.map +1 -0
  71. package/dist/gui/components/HeightTransition.js +88 -77
  72. package/dist/gui/components/HeightTransition.js.map +1 -0
  73. package/dist/gui/components/Input.d.ts +13 -6
  74. package/dist/gui/components/Input.d.ts.map +1 -0
  75. package/dist/gui/components/Input.js +27 -16
  76. package/dist/gui/components/Input.js.map +1 -0
  77. package/dist/gui/components/InputBox.d.ts +21 -0
  78. package/dist/gui/components/InputBox.d.ts.map +1 -0
  79. package/dist/gui/components/InputBox.js +90 -0
  80. package/dist/gui/components/InputBox.js.map +1 -0
  81. package/dist/gui/components/Label.d.ts +7 -1
  82. package/dist/gui/components/Label.d.ts.map +1 -0
  83. package/dist/gui/components/Label.js +12 -2
  84. package/dist/gui/components/Label.js.map +1 -0
  85. package/dist/gui/components/MarkdownRenderer.d.ts +6 -4
  86. package/dist/gui/components/MarkdownRenderer.d.ts.map +1 -0
  87. package/dist/gui/components/MarkdownRenderer.js +178 -81
  88. package/dist/gui/components/MarkdownRenderer.js.map +1 -0
  89. package/dist/gui/components/Message.d.ts.map +1 -0
  90. package/dist/gui/components/Message.js.map +1 -0
  91. package/dist/gui/components/MessageContent.d.ts +29 -22
  92. package/dist/gui/components/MessageContent.d.ts.map +1 -0
  93. package/dist/gui/components/MessageContent.js.map +1 -0
  94. package/dist/gui/components/MessageList.d.ts.map +1 -0
  95. package/dist/gui/components/MessageList.js.map +1 -0
  96. package/dist/gui/components/PlaygroundLayout.d.ts +14 -0
  97. package/dist/gui/components/PlaygroundLayout.d.ts.map +1 -0
  98. package/dist/gui/components/PlaygroundLayout.js +49 -0
  99. package/dist/gui/components/PlaygroundLayout.js.map +1 -0
  100. package/dist/gui/components/Reasoning.d.ts +30 -24
  101. package/dist/gui/components/Reasoning.d.ts.map +1 -0
  102. package/dist/gui/components/Reasoning.js +187 -60
  103. package/dist/gui/components/Reasoning.js.map +1 -0
  104. package/dist/gui/components/Response.d.ts +11 -9
  105. package/dist/gui/components/Response.d.ts.map +1 -0
  106. package/dist/gui/components/Response.js +229 -90
  107. package/dist/gui/components/Response.js.map +1 -0
  108. package/dist/gui/components/Select.d.ts +69 -10
  109. package/dist/gui/components/Select.d.ts.map +1 -0
  110. package/dist/gui/components/Select.js +118 -12
  111. package/dist/gui/components/Select.js.map +1 -0
  112. package/dist/gui/components/StatusBar.d.ts +12 -0
  113. package/dist/gui/components/StatusBar.d.ts.map +1 -0
  114. package/dist/gui/components/StatusBar.js +58 -0
  115. package/dist/gui/components/StatusBar.js.map +1 -0
  116. package/dist/gui/components/Tabs.d.ts +24 -4
  117. package/dist/gui/components/Tabs.d.ts.map +1 -0
  118. package/dist/gui/components/Tabs.js +32 -4
  119. package/dist/gui/components/Tabs.js.map +1 -0
  120. package/dist/gui/components/Task.d.ts +28 -24
  121. package/dist/gui/components/Task.d.ts.map +1 -0
  122. package/dist/gui/components/Task.js +164 -31
  123. package/dist/gui/components/Task.js.map +1 -0
  124. package/dist/gui/components/Textarea.d.ts +15 -7
  125. package/dist/gui/components/Textarea.d.ts.map +1 -0
  126. package/dist/gui/components/Textarea.js +63 -46
  127. package/dist/gui/components/Textarea.js.map +1 -0
  128. package/dist/gui/components/ThinkingBlock.d.ts +20 -10
  129. package/dist/gui/components/ThinkingBlock.d.ts.map +1 -0
  130. package/dist/gui/components/ThinkingBlock.js +134 -35
  131. package/dist/gui/components/ThinkingBlock.js.map +1 -0
  132. package/dist/gui/components/TodoList.d.ts +12 -10
  133. package/dist/gui/components/TodoList.d.ts.map +1 -0
  134. package/dist/gui/components/TodoList.js +22 -7
  135. package/dist/gui/components/TodoList.js.map +1 -0
  136. package/dist/gui/components/TodoListItem.d.ts +9 -6
  137. package/dist/gui/components/TodoListItem.d.ts.map +1 -0
  138. package/dist/gui/components/TodoListItem.js +18 -4
  139. package/dist/gui/components/TodoListItem.js.map +1 -0
  140. package/dist/gui/components/index.d.ts.map +1 -0
  141. package/dist/gui/components/index.js.map +1 -0
  142. package/dist/gui/index.d.ts.map +1 -0
  143. package/dist/gui/index.js.map +1 -0
  144. package/dist/gui/lib/utils.d.ts.map +1 -0
  145. package/dist/gui/lib/utils.js +1 -1
  146. package/dist/gui/lib/utils.js.map +1 -0
  147. package/dist/index.d.ts.map +1 -0
  148. package/dist/index.js.map +1 -0
  149. package/dist/index.test.js +0 -1
  150. package/dist/sdk/client/acp-client.d.ts +88 -76
  151. package/dist/sdk/client/acp-client.d.ts.map +1 -0
  152. package/dist/sdk/client/acp-client.js +215 -217
  153. package/dist/sdk/client/acp-client.js.map +1 -0
  154. package/dist/sdk/client/index.d.ts.map +1 -0
  155. package/dist/sdk/client/index.js.map +1 -0
  156. package/dist/sdk/index.d.ts.map +1 -0
  157. package/dist/sdk/index.js.map +1 -0
  158. package/dist/sdk/schemas/agent.d.ts +111 -64
  159. package/dist/sdk/schemas/agent.d.ts.map +1 -0
  160. package/dist/sdk/schemas/agent.js +24 -24
  161. package/dist/sdk/schemas/agent.js.map +1 -0
  162. package/dist/sdk/schemas/index.d.ts.map +1 -0
  163. package/dist/sdk/schemas/index.js.map +1 -0
  164. package/dist/sdk/schemas/message.d.ts +245 -147
  165. package/dist/sdk/schemas/message.d.ts.map +1 -0
  166. package/dist/sdk/schemas/message.js +40 -40
  167. package/dist/sdk/schemas/message.js.map +1 -0
  168. package/dist/sdk/schemas/session.d.ts +219 -135
  169. package/dist/sdk/schemas/session.d.ts.map +1 -0
  170. package/dist/sdk/schemas/session.js +27 -27
  171. package/dist/sdk/schemas/session.js.map +1 -0
  172. package/dist/sdk/transports/http.d.ts +55 -55
  173. package/dist/sdk/transports/http.d.ts.map +1 -0
  174. package/dist/sdk/transports/http.js +472 -469
  175. package/dist/sdk/transports/http.js.map +1 -0
  176. package/dist/sdk/transports/index.d.ts.map +1 -0
  177. package/dist/sdk/transports/index.js.map +1 -0
  178. package/dist/sdk/transports/stdio.d.ts +20 -20
  179. package/dist/sdk/transports/stdio.d.ts.map +1 -0
  180. package/dist/sdk/transports/stdio.js.map +1 -0
  181. package/dist/sdk/transports/types.d.ts +42 -42
  182. package/dist/sdk/transports/types.d.ts.map +1 -0
  183. package/dist/sdk/transports/types.js.map +1 -0
  184. package/dist/sdk/transports/websocket.d.ts +12 -12
  185. package/dist/sdk/transports/websocket.d.ts.map +1 -0
  186. package/dist/sdk/transports/websocket.js +52 -46
  187. package/dist/sdk/transports/websocket.js.map +1 -0
  188. package/dist/tui/components/ChatView.d.ts +4 -2
  189. package/dist/tui/components/ChatView.d.ts.map +1 -0
  190. package/dist/tui/components/ChatView.js +51 -18
  191. package/dist/tui/components/ChatView.js.map +1 -0
  192. package/dist/tui/components/GameOfLife.d.ts.map +1 -0
  193. package/dist/tui/components/GameOfLife.js +64 -35
  194. package/dist/tui/components/GameOfLife.js.map +1 -0
  195. package/dist/tui/components/InputBox.d.ts +18 -11
  196. package/dist/tui/components/InputBox.d.ts.map +1 -0
  197. package/dist/tui/components/InputBox.js +70 -10
  198. package/dist/tui/components/InputBox.js.map +1 -0
  199. package/dist/tui/components/MessageList.d.ts +4 -2
  200. package/dist/tui/components/MessageList.d.ts.map +1 -0
  201. package/dist/tui/components/MessageList.js +37 -10
  202. package/dist/tui/components/MessageList.js.map +1 -0
  203. package/dist/tui/components/ReadlineInput.d.ts +12 -6
  204. package/dist/tui/components/ReadlineInput.d.ts.map +1 -0
  205. package/dist/tui/components/ReadlineInput.js +252 -237
  206. package/dist/tui/components/ReadlineInput.js.map +1 -0
  207. package/dist/tui/components/SingleSelect.d.ts +15 -9
  208. package/dist/tui/components/SingleSelect.js +84 -43
  209. package/dist/tui/components/StatusBar.d.ts +11 -6
  210. package/dist/tui/components/StatusBar.d.ts.map +1 -0
  211. package/dist/tui/components/StatusBar.js +102 -67
  212. package/dist/tui/components/StatusBar.js.map +1 -0
  213. package/dist/tui/components/index.d.ts.map +1 -0
  214. package/dist/tui/components/index.js.map +1 -0
  215. package/dist/tui/index.d.ts.map +1 -0
  216. package/dist/tui/index.js.map +1 -0
  217. package/package.json +2 -2
@@ -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) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn("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", className), ...props })));
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(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn("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", className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "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", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
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 }) => (_jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", 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 }) => (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", 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) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props })));
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) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
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 { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
87
+ export {
88
+ Dialog,
89
+ DialogPortal,
90
+ DialogOverlay,
91
+ DialogClose,
92
+ DialogTrigger,
93
+ DialogContent,
94
+ DialogHeader,
95
+ DialogFooter,
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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"}
@@ -1,10 +1,15 @@
1
1
  import { type ReactNode } from "react";
2
2
  interface HeightTransitionProps {
3
- children: ReactNode;
4
- durationMs?: number;
5
- easing?: string;
6
- pinContentTo?: "top" | "bottom";
7
- className?: string;
3
+ children: ReactNode;
4
+ durationMs?: number;
5
+ easing?: string;
6
+ pinContentTo?: "top" | "bottom";
7
+ className?: string;
8
8
  }
9
- export declare function HeightTransition({ children, durationMs, easing, pinContentTo, className, }: HeightTransitionProps): import("react/jsx-runtime").JSX.Element;
10
- export {};
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({ children, durationMs = 320, easing = "ease", pinContentTo = "top", className, }) {
5
- const containerRef = useRef(null);
6
- const contentRef = useRef(null);
7
- const prevHeightRef = useRef(null);
8
- const isAnimatingRef = useRef(false);
9
- const durationRef = useRef(durationMs);
10
- const easingRef = useRef(easing);
11
- useEffect(() => {
12
- durationRef.current = durationMs;
13
- easingRef.current = easing;
14
- }, [durationMs, easing]);
15
- const transitionTo = useCallback((next) => {
16
- const el = containerRef.current;
17
- const contentEl = contentRef.current;
18
- if (!el || !contentEl)
19
- return;
20
- const prev = prevHeightRef.current ?? el.getBoundingClientRect().height;
21
- if (Math.abs(prev - next) < 0.5) {
22
- prevHeightRef.current = next;
23
- el.style.height = `${next}px`;
24
- return;
25
- }
26
- if (isAnimatingRef.current)
27
- return;
28
- isAnimatingRef.current = true;
29
- el.style.transition = "none";
30
- el.style.height = `${prev}px`;
31
- void el.getBoundingClientRect();
32
- el.style.transition = `height ${durationRef.current}ms ${easingRef.current}`;
33
- el.style.height = `${next}px`;
34
- contentEl.style.position = "absolute";
35
- if (pinContentTo === "top") {
36
- contentEl.style.top = "0";
37
- }
38
- else {
39
- contentEl.style.bottom = "0";
40
- }
41
- prevHeightRef.current = next;
42
- }, [pinContentTo]);
43
- const onEndTransition = useCallback((e) => {
44
- const el = containerRef.current;
45
- const contentEl = contentRef.current;
46
- if (!el || !contentEl)
47
- return;
48
- if (e.propertyName !== "height")
49
- return;
50
- if (e.target !== el)
51
- return;
52
- el.style.transition = "";
53
- el.style.height = `auto`;
54
- contentEl.style.removeProperty("position");
55
- contentEl.style.removeProperty("top");
56
- contentEl.style.removeProperty("bottom");
57
- isAnimatingRef.current = false;
58
- }, []);
59
- // Observe intrinsic content height changes and animate container height accordingly
60
- useEffect(() => {
61
- const el = containerRef.current;
62
- const contentEl = contentRef.current;
63
- if (!el || !contentEl)
64
- return;
65
- const initial = contentEl.scrollHeight;
66
- prevHeightRef.current = initial;
67
- const ro = new ResizeObserver(() => {
68
- const next = contentEl.scrollHeight;
69
- transitionTo(next);
70
- });
71
- ro.observe(contentEl);
72
- el.addEventListener("transitionend", onEndTransition);
73
- return () => {
74
- ro.disconnect();
75
- el.removeEventListener("transitionend", onEndTransition);
76
- };
77
- // eslint-disable-next-line react-hooks/exhaustive-deps
78
- }, [onEndTransition, transitionTo]);
79
- return (_jsx("div", { ref: containerRef, className: cn("overflow-hidden relative", className), style: { willChange: "height" }, children: _jsx("div", { ref: contentRef, className: "w-full", children: children }) }));
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","sourceRoot":"","sources":["../../../src/gui/components/HeightTransition.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAUrC,MAAM,UAAU,gBAAgB,CAAC,EAC/B,QAAQ,EACR,UAAU,GAAG,GAAG,EAChB,MAAM,GAAG,MAAM,EACf,YAAY,GAAG,KAAK,EACpB,SAAS,GACa;IACtB,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;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AI,CAAC,SAAS;YAAE,OAAO;QAE9B,MAAM,OAAO,GAAG,SAAS,CAAC,YAAY,CAAC;QACvC,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;QAEhC,MAAM,EAAE,GAAG,IAAI,cAAc,CAAC,GAAG,EAAE;YACjC,MAAM,IAAI,GAAG,SAAS,CAAC,YAAY,CAAC;YACpC,YAAY,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAEtB,EAAE,CAAC,gBAAgB,CAAC,eAAe,EAAE,eAAgC,CAAC,CAAC;QAEvE,OAAO,GAAG,EAAE;YACV,EAAE,CAAC,UAAU,EAAE,CAAC;YAChB,EAAE,CAAC,mBAAmB,CAAC,eAAe,EAAE,eAAgC,CAAC,CAAC;QAC5E,CAAC,CAAC;QACF,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,cACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,EACpD,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,YAE/B,cAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,QAAQ,YACrC,QAAQ,GACL,GACF,CACP,CAAC;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: (props?: ({
4
- variant?: "success" | "default" | "error" | null | undefined;
5
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
- export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
7
- }
8
- declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
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
- const inputVariants = cva("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", {
6
- variants: {
7
- variant: {
8
- default: "border-input focus-visible:ring-ring",
9
- error: "border-destructive focus-visible:ring-destructive",
10
- success: "border-green-500 focus-visible:ring-green-500",
11
- },
12
- },
13
- defaultVariants: {
14
- variant: "default",
15
- },
16
- });
17
- const Input = React.forwardRef(({ className, type, variant, ...props }, ref) => {
18
- return (_jsx("input", { type: type, className: cn(inputVariants({ variant, className })), ref: ref, ...props }));
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"}
@@ -0,0 +1,90 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function InputBox({
3
+ value,
4
+ isSubmitting,
5
+ attachedFiles,
6
+ onChange,
7
+ onSubmit,
8
+ onRemoveFile,
9
+ }) {
10
+ const handleKeyDown = (e) => {
11
+ if (e.key === "Enter" && !e.shiftKey) {
12
+ e.preventDefault();
13
+ onSubmit();
14
+ }
15
+ };
16
+ return _jsxs("div", {
17
+ className: "border-t border-gray-200 bg-white p-4",
18
+ children: [
19
+ attachedFiles.length > 0 &&
20
+ _jsxs("div", {
21
+ className: "mb-3 space-y-1",
22
+ children: [
23
+ _jsx("p", {
24
+ className: "text-xs text-gray-500",
25
+ children: "Attached files:",
26
+ }),
27
+ _jsx("div", {
28
+ className: "flex flex-wrap gap-2",
29
+ children: attachedFiles.map((file, index) =>
30
+ _jsxs(
31
+ "div",
32
+ {
33
+ className:
34
+ "flex items-center gap-2 px-3 py-1 bg-cyan-50 text-cyan-700 rounded-full text-xs",
35
+ children: [
36
+ _jsx("span", { children: file.name }),
37
+ _jsxs("span", {
38
+ className: "text-gray-400",
39
+ children: ["(", formatFileSize(file.size), ")"],
40
+ }),
41
+ onRemoveFile &&
42
+ _jsx("button", {
43
+ onClick: () => onRemoveFile(index),
44
+ className: "hover:text-cyan-900",
45
+ children: "\u00D7",
46
+ }),
47
+ ],
48
+ },
49
+ index,
50
+ ),
51
+ ),
52
+ }),
53
+ ],
54
+ }),
55
+ _jsxs("div", {
56
+ className: "flex items-end gap-2",
57
+ children: [
58
+ _jsx("textarea", {
59
+ value: value,
60
+ onChange: (e) => onChange(e.target.value),
61
+ onKeyDown: handleKeyDown,
62
+ disabled: isSubmitting,
63
+ placeholder:
64
+ "Type your message... (Press Enter to send, Shift+Enter for new line)",
65
+ className:
66
+ "flex-1 resize-none rounded-lg border border-gray-300 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed",
67
+ rows: 3,
68
+ }),
69
+ _jsx("button", {
70
+ onClick: onSubmit,
71
+ disabled: isSubmitting || !value.trim(),
72
+ className:
73
+ "px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:bg-gray-300 disabled:cursor-not-allowed transition-colors",
74
+ children: isSubmitting ? "Sending..." : "Send",
75
+ }),
76
+ ],
77
+ }),
78
+ _jsx("p", {
79
+ className: "mt-2 text-xs text-gray-500",
80
+ children: "Press Enter to send \u2022 Shift+Enter for new line",
81
+ }),
82
+ ],
83
+ });
84
+ }
85
+ function formatFileSize(bytes) {
86
+ if (bytes < 1024) return `${bytes} B`;
87
+ if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
88
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
89
+ }
90
+ //# sourceMappingURL=InputBox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputBox.js","sourceRoot":"","sources":["../../../src/gui/components/InputBox.tsx"],"names":[],"mappings":";AAWA,MAAM,UAAU,QAAQ,CAAC,EACvB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,YAAY,GACE;IACd,MAAM,aAAa,GAAG,CAAC,CAAqC,EAAE,EAAE;QAC9D,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;YACrC,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,uCAAuC,aACnD,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,CAC3B,eAAK,SAAS,EAAC,gBAAgB,aAC7B,YAAG,SAAS,EAAC,uBAAuB,gCAAoB,EACxD,cAAK,SAAS,EAAC,sBAAsB,YAClC,aAAa,CAAC,GAAG,CAAC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AC,CAAC,KAAK,CAAC;AACpD,CAAC"}
@@ -1,4 +1,10 @@
1
1
  import * as LabelPrimitive from "@radix-ui/react-label";
2
2
  import * as React from "react";
3
- declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
3
+ declare const Label: React.ForwardRefExoticComponent<
4
+ Omit<
5
+ LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>,
6
+ "ref"
7
+ > &
8
+ React.RefAttributes<HTMLLabelElement>
9
+ >;
4
10
  export { Label };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAGxD,QAAA,MAAM,KAAK,yJAYT,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,7 +1,17 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import * as LabelPrimitive from "@radix-ui/react-label";
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
- const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx(LabelPrimitive.Root, { ref: ref, className: cn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className), ...props })));
5
+
6
+ const Label = React.forwardRef(({ className, ...props }, ref) =>
7
+ _jsx(LabelPrimitive.Root, {
8
+ ref: ref,
9
+ className: cn(
10
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
11
+ className,
12
+ ),
13
+ ...props,
14
+ }),
15
+ );
6
16
  Label.displayName = LabelPrimitive.Root.displayName;
7
17
  export { Label };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../src/gui/components/Label.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,cAAc,CAAC,IAAI,IAClB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,4FAA4F,EAC5F,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAC;AACH,KAAK,CAAC,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,6 +1,8 @@
1
1
  interface MarkdownRendererProps {
2
- content: string;
3
- className?: string;
2
+ content: string;
3
+ className?: string;
4
4
  }
5
- export declare function MarkdownRenderer({ content, className, }: MarkdownRendererProps): import("react/jsx-runtime").JSX.Element | null;
6
- export {};
5
+ export declare function MarkdownRenderer({
6
+ content,
7
+ className,
8
+ }: MarkdownRendererProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../../src/gui/components/MarkdownRenderer.tsx"],"names":[],"mappings":"AAKA,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,qBAAqB,kDA4K7E"}