@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,11 +1,27 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
- declare const buttonVariants: (props?: ({
4
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
- asChild?: boolean;
3
+ declare const buttonVariants: (
4
+ props?:
5
+ | ({
6
+ variant?:
7
+ | "default"
8
+ | "destructive"
9
+ | "outline"
10
+ | "secondary"
11
+ | "ghost"
12
+ | "link"
13
+ | null
14
+ | undefined;
15
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
16
+ } & import("class-variance-authority/types").ClassProp)
17
+ | undefined,
18
+ ) => string;
19
+ export interface ButtonProps
20
+ extends React.ButtonHTMLAttributes<HTMLButtonElement>,
21
+ VariantProps<typeof buttonVariants> {
22
+ asChild?: boolean;
9
23
  }
10
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
24
+ declare const Button: React.ForwardRefExoticComponent<
25
+ ButtonProps & React.RefAttributes<HTMLButtonElement>
26
+ >;
11
27
  export { Button, buttonVariants };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;8EA2BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFAWX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -1,33 +1,46 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { Slot } from "@radix-ui/react-slot";
3
2
  import { cva } from "class-variance-authority";
4
3
  import * as React from "react";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  import { cn } from "../lib/utils.js";
6
- const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
7
- variants: {
8
- variant: {
9
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
10
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
11
- outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
12
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
13
- ghost: "hover:bg-accent hover:text-accent-foreground",
14
- link: "text-primary underline-offset-4 hover:underline",
15
- },
16
- size: {
17
- default: "h-10 px-4 py-2",
18
- sm: "h-9 rounded-md px-3",
19
- lg: "h-11 rounded-md px-8",
20
- icon: "h-10 w-10",
21
- },
22
- },
23
- defaultVariants: {
24
- variant: "default",
25
- size: "default",
26
- },
27
- });
28
- const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
29
- const Comp = asChild ? Slot : "button";
30
- return (_jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
31
- });
6
+
7
+ const buttonVariants = cva(
8
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
13
+ destructive:
14
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90",
15
+ outline:
16
+ "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
17
+ secondary:
18
+ "bg-secondary text-secondary-foreground hover:bg-secondary/80",
19
+ ghost: "hover:bg-accent hover:text-accent-foreground",
20
+ link: "text-primary underline-offset-4 hover:underline",
21
+ },
22
+ size: {
23
+ default: "h-10 px-4 py-2",
24
+ sm: "h-9 rounded-md px-3",
25
+ lg: "h-11 rounded-md px-8",
26
+ icon: "h-10 w-10",
27
+ },
28
+ },
29
+ defaultVariants: {
30
+ variant: "default",
31
+ size: "default",
32
+ },
33
+ },
34
+ );
35
+ const Button = React.forwardRef(
36
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
37
+ const Comp = asChild ? Slot : "button";
38
+ return _jsx(Comp, {
39
+ className: cn(buttonVariants({ variant, size, className })),
40
+ ref: ref,
41
+ ...props,
42
+ });
43
+ },
44
+ );
32
45
  Button.displayName = "Button";
33
46
  export { Button, buttonVariants };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/gui/components/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,cAAc,GAAG,GAAG,CACxB,0VAA0V,EAC1V;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,wDAAwD;YACjE,WAAW,EACT,oEAAoE;YACtE,OAAO,EACL,gFAAgF;YAClF,SAAS,EACP,8DAA8D;YAChE,KAAK,EAAE,8CAA8C;YACrD,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,gBAAgB;YACzB,EAAE,EAAE,qBAAqB;YACzB,EAAE,EAAE,sBAAsB;YAC1B,IAAI,EAAE,WAAW;SAClB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AAQF,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC/D,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IACvC,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,EAC3D,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -1,8 +1,27 @@
1
1
  import * as React from "react";
2
- declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
- declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
4
- declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
5
- declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
6
- declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
7
- declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
8
- export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, };
2
+ declare const Card: React.ForwardRefExoticComponent<
3
+ React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>
4
+ >;
5
+ declare const CardHeader: React.ForwardRefExoticComponent<
6
+ React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>
7
+ >;
8
+ declare const CardTitle: React.ForwardRefExoticComponent<
9
+ React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>
10
+ >;
11
+ declare const CardDescription: React.ForwardRefExoticComponent<
12
+ React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>
13
+ >;
14
+ declare const CardContent: React.ForwardRefExoticComponent<
15
+ React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>
16
+ >;
17
+ declare const CardFooter: React.ForwardRefExoticComponent<
18
+ React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>
19
+ >;
20
+ export {
21
+ Card,
22
+ CardHeader,
23
+ CardFooter,
24
+ CardTitle,
25
+ CardDescription,
26
+ CardContent,
27
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,IAAI,6GAYR,CAAC;AAGH,QAAA,MAAM,UAAU,6GASd,CAAC;AAGH,QAAA,MAAM,SAAS,6GAYb,CAAC;AAGH,QAAA,MAAM,eAAe,6GASnB,CAAC;AAGH,QAAA,MAAM,WAAW,6GAKf,CAAC;AAGH,QAAA,MAAM,UAAU,6GASd,CAAC;AAGH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
@@ -1,16 +1,62 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import * as React from "react";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { cn } from "../lib/utils.js";
4
- const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props })));
4
+
5
+ const Card = React.forwardRef(({ className, ...props }, ref) =>
6
+ _jsx("div", {
7
+ ref: ref,
8
+ className: cn(
9
+ "rounded-lg border bg-card text-card-foreground shadow-sm",
10
+ className,
11
+ ),
12
+ ...props,
13
+ }),
14
+ );
5
15
  Card.displayName = "Card";
6
- const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })));
16
+ const CardHeader = React.forwardRef(({ className, ...props }, ref) =>
17
+ _jsx("div", {
18
+ ref: ref,
19
+ className: cn("flex flex-col space-y-1.5 p-6", className),
20
+ ...props,
21
+ }),
22
+ );
7
23
  CardHeader.displayName = "CardHeader";
8
- const CardTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })));
24
+ const CardTitle = React.forwardRef(({ className, ...props }, ref) =>
25
+ _jsx("div", {
26
+ ref: ref,
27
+ className: cn(
28
+ "text-2xl font-semibold leading-none tracking-tight",
29
+ className,
30
+ ),
31
+ ...props,
32
+ }),
33
+ );
9
34
  CardTitle.displayName = "CardTitle";
10
- const CardDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
35
+ const CardDescription = React.forwardRef(({ className, ...props }, ref) =>
36
+ _jsx("div", {
37
+ ref: ref,
38
+ className: cn("text-sm text-muted-foreground", className),
39
+ ...props,
40
+ }),
41
+ );
11
42
  CardDescription.displayName = "CardDescription";
12
- const CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("p-6 pt-0", className), ...props })));
43
+ const CardContent = React.forwardRef(({ className, ...props }, ref) =>
44
+ _jsx("div", { ref: ref, className: cn("p-6 pt-0", className), ...props }),
45
+ );
13
46
  CardContent.displayName = "CardContent";
14
- const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-center p-6 pt-0", className), ...props })));
47
+ const CardFooter = React.forwardRef(({ className, ...props }, ref) =>
48
+ _jsx("div", {
49
+ ref: ref,
50
+ className: cn("flex items-center p-6 pt-0", className),
51
+ ...props,
52
+ }),
53
+ );
15
54
  CardFooter.displayName = "CardFooter";
16
- export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, };
55
+ export {
56
+ Card,
57
+ CardHeader,
58
+ CardFooter,
59
+ CardTitle,
60
+ CardDescription,
61
+ CardContent,
62
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/gui/components/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAG3B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,0DAA0D,EAC1D,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAC;AACH,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAE1B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAC,CAA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MAAM,CAAC;IAErC,OAAO,CACL,KAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,UAAU,EACpB,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,EAAE,CACX,CAAC,OAAO,IAAI,oBAAoB,EAChC,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,eAAe,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAEjD;;oGAEoG;AAEpG,OAAO,EACL,aAAa,IAAI,IAAI,EACrB,cAAc,IAAI,KAAK,EACvB,eAAe,IAAI,MAAM,GAC1B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { type DisplayMessage } from "./MessageList.js";
2
+ interface ChatInterfaceProps {
3
+ initialMessages?: DisplayMessage[];
4
+ thinkingDisplayStyle?: "collapsible" | "inline";
5
+ status?: string;
6
+ }
7
+ export declare function ChatInterface({
8
+ initialMessages,
9
+ thinkingDisplayStyle,
10
+ status,
11
+ }: ChatInterfaceProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=ChatInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatInterface.d.ts","sourceRoot":"","sources":["../../../src/gui/components/ChatInterface.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQpE,UAAU,kBAAkB;IAC1B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,oBAAoB,CAAC,EAAE,aAAa,GAAG,QAAQ,CAAC;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA2FD,wBAAgB,aAAa,CAAC,EAC5B,eAAiC,EACjC,oBAAoC,EACpC,MAAoB,GACrB,EAAE,kBAAkB,2CA+FpB"}
@@ -0,0 +1,204 @@
1
+ import { ChevronDown } from "lucide-react";
2
+ import { useEffect, useState } from "react";
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ import { ChatInput } from "./ChatInput.js";
5
+ import { ChatSecondaryPanel } from "./ChatSecondaryPanel.js";
6
+ import { ChatStatus } from "./ChatStatus.js";
7
+ import { HeightTransition } from "./HeightTransition.js";
8
+ import { MessageList } from "./MessageList.js";
9
+
10
+ const SAMPLE_TODOS = [
11
+ {
12
+ id: "1",
13
+ text: "Identify the last 25 Winter Olympics host countries",
14
+ status: "completed",
15
+ },
16
+ {
17
+ id: "2",
18
+ text: "For each host country, find the tallest mountain",
19
+ status: "in_progress",
20
+ },
21
+ {
22
+ id: "3",
23
+ text: "Gather key details for each mountain (name, elevation, location)",
24
+ status: "pending",
25
+ },
26
+ {
27
+ id: "4",
28
+ text: "Verify information using reliable sources (geographical databases, official records)",
29
+ status: "pending",
30
+ },
31
+ {
32
+ id: "5",
33
+ text: "Compile findings into a summary table or document",
34
+ status: "pending",
35
+ },
36
+ ];
37
+ const SAMPLE_MESSAGES = [
38
+ {
39
+ id: "msg-1",
40
+ role: "user",
41
+ content: "Hello! Can you help me understand how to use markdown?",
42
+ timestamp: new Date().toISOString(),
43
+ isStreaming: false,
44
+ },
45
+ {
46
+ id: "msg-2",
47
+ role: "assistant",
48
+ content: `Sure! Markdown is a lightweight markup language. Here are some basics:
49
+
50
+ ## Headings
51
+ Use \`#\` for headings. More \`#\` symbols make smaller headings.
52
+
53
+ ## Lists
54
+ - Unordered lists use dashes
55
+ - Or asterisks
56
+ - Or plus signs
57
+
58
+ 1. Ordered lists
59
+ 2. Use numbers
60
+ 3. Like this
61
+
62
+ ## Code
63
+ Inline code uses \`backticks\` and code blocks use triple backticks:
64
+
65
+ \`\`\`javascript
66
+ function hello() {
67
+ console.log("Hello world!");
68
+ }
69
+ \`\`\`
70
+
71
+ ## Links and emphasis
72
+ [This is a link](https://example.com)
73
+
74
+ You can make text **bold** or *italic*.
75
+
76
+ > Blockquotes use the > character
77
+
78
+ ## Tables
79
+ | Header 1 | Header 2 |
80
+ |----------|----------|
81
+ | Cell 1 | Cell 2 |
82
+ | Cell 3 | Cell 4 |`,
83
+ timestamp: new Date().toISOString(),
84
+ isStreaming: false,
85
+ metadata: {
86
+ thinking: "Let me provide a comprehensive overview of markdown syntax...",
87
+ },
88
+ },
89
+ {
90
+ id: "msg-3",
91
+ role: "user",
92
+ content: "That's really helpful, thank you!",
93
+ timestamp: new Date().toISOString(),
94
+ isStreaming: false,
95
+ },
96
+ ];
97
+ export function ChatInterface({
98
+ initialMessages = SAMPLE_MESSAGES,
99
+ thinkingDisplayStyle = "collapsible",
100
+ status = "Connected",
101
+ }) {
102
+ const [messages, setMessages] = useState(initialMessages);
103
+ const [currentStatus, setCurrentStatus] = useState(status);
104
+ const [config, setConfig] = useState(null);
105
+ const [isHeaderExpanded, setIsHeaderExpanded] = useState(false);
106
+ const [todos] = useState(SAMPLE_TODOS);
107
+ // Listen for config and status updates from parent window
108
+ useEffect(() => {
109
+ const handleMessage = (event) => {
110
+ if (event.data.type === "CONFIG_UPDATE") {
111
+ const newConfig = event.data.config;
112
+ setConfig(newConfig);
113
+ applyConfigToDocument(newConfig);
114
+ } else if (event.data.type === "STATUS_UPDATE") {
115
+ setCurrentStatus(event.data.status);
116
+ }
117
+ };
118
+ window.addEventListener("message", handleMessage);
119
+ // Request config from parent on mount
120
+ if (window.parent !== window) {
121
+ window.parent.postMessage({ type: "REQUEST_CONFIG" }, "*");
122
+ }
123
+ return () => {
124
+ window.removeEventListener("message", handleMessage);
125
+ };
126
+ }, []);
127
+ const applyConfigToDocument = (cfg) => {
128
+ const root = document.documentElement;
129
+ root.setAttribute("data-theme", cfg.colorScheme);
130
+ root.style.setProperty("--color-accent", cfg.accentColor);
131
+ root.style.setProperty("--font-family", cfg.typography);
132
+ root.style.setProperty("--font-size", `${cfg.fontSize}px`);
133
+ };
134
+ return _jsxs("div", {
135
+ className:
136
+ "flex flex-col h-screen bg-[var(--color-bg)] text-[var(--color-text)]",
137
+ children: [
138
+ _jsxs("div", {
139
+ className:
140
+ "relative border-b border-[var(--color-border)] bg-[var(--color-surface)] z-10",
141
+ children: [
142
+ _jsxs("div", {
143
+ className: "flex items-center justify-between px-6 py-4",
144
+ children: [
145
+ _jsx("h1", {
146
+ className: "text-xl font-semibold m-0",
147
+ children: "Chat Interface",
148
+ }),
149
+ _jsxs("div", {
150
+ className: "flex items-center gap-3",
151
+ children: [
152
+ _jsx(ChatStatus, { children: currentStatus }),
153
+ _jsx("button", {
154
+ onClick: () => setIsHeaderExpanded(!isHeaderExpanded),
155
+ className:
156
+ "p-1 rounded hover:bg-[var(--color-bg)] transition-colors",
157
+ "aria-label": isHeaderExpanded
158
+ ? "Collapse header"
159
+ : "Expand header",
160
+ children: _jsx(ChevronDown, {
161
+ className: `w-5 h-5 text-[var(--color-text)] transition-transform duration-200 ${isHeaderExpanded ? "rotate-180" : ""}`,
162
+ }),
163
+ }),
164
+ ],
165
+ }),
166
+ ],
167
+ }),
168
+ _jsx("div", {
169
+ className: "absolute top-full left-0 right-0 z-20",
170
+ children: _jsx(HeightTransition, {
171
+ children:
172
+ isHeaderExpanded &&
173
+ _jsx("div", {
174
+ className:
175
+ "bg-[var(--color-surface)] border-b border-[var(--color-border)] px-6 py-4 shadow-lg",
176
+ children: _jsx(ChatSecondaryPanel, { todos: todos }),
177
+ }),
178
+ }),
179
+ }),
180
+ ],
181
+ }),
182
+ _jsx("div", {
183
+ className: "flex-1 overflow-y-auto py-4",
184
+ children: _jsx(MessageList, {
185
+ messages: messages,
186
+ thinkingDisplayStyle:
187
+ config?.thinkingDisplayStyle || thinkingDisplayStyle,
188
+ }),
189
+ }),
190
+ _jsx("div", {
191
+ className:
192
+ "border-t border-[var(--color-border)] px-6 py-4 bg-[var(--color-surface)]",
193
+ children: _jsx(ChatInput, {
194
+ value: "",
195
+ onChange: () => {},
196
+ onSubmit: () => {},
197
+ disabled: true,
198
+ placeholder: "Type a message...",
199
+ }),
200
+ }),
201
+ ],
202
+ });
203
+ }
204
+ //# sourceMappingURL=ChatInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatInterface.js","sourceRoot":"","sources":["../../../src/gui/components/ChatInterface.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAuB,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAU3C,MAAM,YAAY,GAAe;IAC/B;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,qDAAqD;QAC3D,MAAM,EAAE,WAAW;KACpB;IACD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,kDAAkD;QACxD,MAAM,EAAE,aAAa;KACtB;IACD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,kEAAkE;QACxE,MAAM,EAAE,SAAS;KAClB;IACD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,sFAAsF;QAC5F,MAAM,EAAE,SAAS;KAClB;IACD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,mDAAmD;QACzD,MAAM,EAAE,SAAS;KAClB;CACF,CAAC;AAEF,MAAM,eAAe,GAAqB;IACxC;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,wDAAwD;QACjE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,WAAW,EAAE,KAAK;KACnB;IACD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,0DAA0D,gBACxD,gBAAgB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,YAElE,KAAC,WAAW,IACV,SAAS,EAAE,sEACT,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EACpC,EAAE,GACF,GACK,IACL,IACF,EAGN,cAAK,SAAS,EAAC,uCAAuC,YACpD,KAAC,gBAAgB,cACd,gBAAgB,IAAI,CACnB,cAAK,SAAS,EAAC,qFAAqF,YAClG,KAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,GAAI,GAChC,CACP,GACgB,GACf,IACF,EAGN,cAAK,SAAS,EAAC,6BAA6B,YAC1C,KAAC,WAAW,IACV,QAAQ,EAAE,QAAQ,EAClB,oBAAoB,EAClB,MAAM,EAAE,oBAAoB,IAAI,oBAAoB,GAEtD,GACE,EAGN,cAAK,SAAS,EAAC,2EAA2E,YACxF,KAAC,SAAS,IACR,KAAK,EAAC,EAAE,EACR,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,EAClB,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,EAClB,QAAQ,QACR,WAAW,EAAC,mBAAmB,GAC/B,GACE,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { ThemeConfig } from "./ConfigPanel.js";
2
+ interface ChatPreviewProps {
3
+ config: ThemeConfig;
4
+ status: string;
5
+ iframeSrc?: string;
6
+ }
7
+ export declare function ChatPreview({
8
+ config,
9
+ status,
10
+ iframeSrc,
11
+ }: ChatPreviewProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=ChatPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatPreview.d.ts","sourceRoot":"","sources":["../../../src/gui/components/ChatPreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,UAAU,gBAAgB;IACxB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,MAAM,EACN,SAA8B,GAC/B,EAAE,gBAAgB,2CA2OlB"}