@speakeasy-api/moonshine 1.33.4 → 2.0.0-alpha.2

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 (330) hide show
  1. package/README.md +26 -10
  2. package/package.json +12 -23
  3. package/scripts/generate-utility-docs.js +324 -0
  4. package/src/assets/icons/external/github.svg +3 -0
  5. package/src/assets/icons/external/maven.svg +152 -0
  6. package/src/assets/icons/external/npm.svg +4 -0
  7. package/src/assets/icons/external/nuget.svg +5 -0
  8. package/src/assets/icons/external/packagist.svg +1 -0
  9. package/src/assets/icons/external/pypi.svg +182 -0
  10. package/src/assets/icons/external/rubygems.svg +14 -0
  11. package/src/assets/icons/external/terraform.svg +1 -0
  12. package/src/assets/icons/languages/csharp.svg +1 -0
  13. package/src/assets/icons/languages/go.svg +1 -0
  14. package/src/assets/icons/languages/java.svg +1 -0
  15. package/src/assets/icons/languages/json.svg +2 -0
  16. package/src/assets/icons/languages/php.svg +1 -0
  17. package/src/assets/icons/languages/postman.svg +3 -0
  18. package/src/assets/icons/languages/python.svg +1 -0
  19. package/src/assets/icons/languages/ruby.svg +1 -0
  20. package/src/assets/icons/languages/swift.svg +1 -0
  21. package/src/assets/icons/languages/terraform.svg +1 -0
  22. package/src/assets/icons/languages/typescript.svg +1 -0
  23. package/src/assets/icons/languages/unity.svg +1 -0
  24. package/src/components/AIChat/AIChatContainer.tsx +71 -0
  25. package/src/components/AIChat/AIChatMessage.tsx +135 -0
  26. package/src/components/AIChat/AIChatMessageComposer.tsx +175 -0
  27. package/src/components/AIChat/AIChatMessageList.tsx +34 -0
  28. package/src/components/AIChat/AIChatModelSelector.tsx +159 -0
  29. package/src/components/AIChat/componentsTypes.ts +36 -0
  30. package/src/components/AIChat/context.ts +15 -0
  31. package/src/components/AIChat/index.ts +12 -0
  32. package/src/components/AIChat/parts/AIChatMessageFilePart.tsx +129 -0
  33. package/src/components/AIChat/parts/AIChatMessageReasoningPart.tsx +23 -0
  34. package/src/components/AIChat/parts/AIChatMessageSourcePart.tsx +58 -0
  35. package/src/components/AIChat/parts/AIChatMessageTextPart.tsx +33 -0
  36. package/src/components/AIChat/parts/AIChatMessageToolInvocationPart.tsx +53 -0
  37. package/src/components/AIChat/parts/AIChatMessageToolPart.tsx +395 -0
  38. package/src/components/AIChat/parts/AIChatMessageToolResultPart.tsx +46 -0
  39. package/src/components/AIChat/toolCallApproval.ts +61 -0
  40. package/src/components/AIChat/types.ts +97 -0
  41. package/src/components/ActionBar/index.tsx +184 -0
  42. package/src/components/Alert/index.tsx +118 -0
  43. package/src/components/Alert/types.ts +12 -0
  44. package/src/components/AppLayout/context.tsx +31 -0
  45. package/src/components/AppLayout/index.tsx +550 -0
  46. package/src/components/AppLayout/provider.tsx +40 -0
  47. package/src/components/AppLayout/useAppLayoutKeys.ts +26 -0
  48. package/src/components/Badge/index.tsx +227 -0
  49. package/src/components/Button/index.tsx +531 -0
  50. package/src/components/Card/index.tsx +193 -0
  51. package/src/components/CodeEditorLayout/index.tsx +394 -0
  52. package/src/components/CodeEditorLayout/styles.module.css +8 -0
  53. package/src/components/CodeHighlight/Pre.tsx +63 -0
  54. package/src/components/CodePlayground/index.tsx +411 -0
  55. package/src/components/CodeSnippet/codeSnippet.css +97 -0
  56. package/src/components/CodeSnippet/index.tsx +224 -0
  57. package/src/components/Combobox/index.tsx +193 -0
  58. package/src/components/Command/index.tsx +152 -0
  59. package/src/components/Container/index.tsx +31 -0
  60. package/src/components/ContextDropdown/index.tsx +150 -0
  61. package/src/components/Dialog/index.tsx +123 -0
  62. package/src/components/DragNDrop/DragNDropArea.tsx +30 -0
  63. package/src/components/DragNDrop/DragOverlay.tsx +4 -0
  64. package/src/components/DragNDrop/Draggable.tsx +97 -0
  65. package/src/components/DragNDrop/Droppable.tsx +51 -0
  66. package/src/components/Dropdown/index.tsx +201 -0
  67. package/src/components/ExternalPill/index.tsx +58 -0
  68. package/src/components/Facepile/index.tsx +309 -0
  69. package/src/components/GradientCircle/gradientCircle.css +34 -0
  70. package/src/components/GradientCircle/index.tsx +143 -0
  71. package/src/components/Grid/index.tsx +150 -0
  72. package/src/components/Heading/index.tsx +54 -0
  73. package/src/components/HighlightedText/index.tsx +152 -0
  74. package/src/components/Icon/customIcons/createCustomLucideIcon.ts +25 -0
  75. package/src/components/Icon/customIcons/gems.ts +26 -0
  76. package/{dist/go-DsW1bFpz.mjs → src/components/Icon/customIcons/go.ts} +21 -19
  77. package/src/components/Icon/customIcons/index.ts +11 -0
  78. package/{dist/maven-Dub5liK1.mjs → src/components/Icon/customIcons/maven.ts} +17 -15
  79. package/src/components/Icon/customIcons/npm.ts +19 -0
  80. package/{dist/nuget-D86y5HDl.mjs → src/components/Icon/customIcons/nuget.ts} +17 -15
  81. package/src/components/Icon/customIcons/packagist.ts +124 -0
  82. package/{dist/pypi-2SUX-2OR.mjs → src/components/Icon/customIcons/pypi.ts} +16 -14
  83. package/src/components/Icon/index.tsx +83 -0
  84. package/src/components/Icon/isIconName.ts +10 -0
  85. package/src/components/Icon/names.ts +14 -0
  86. package/src/components/IconButton/index.tsx +51 -0
  87. package/src/components/Input/index.tsx +98 -0
  88. package/src/components/KeyHint/index.tsx +118 -0
  89. package/src/components/LanguageIndicator/index.tsx +68 -0
  90. package/src/components/Link/index.tsx +153 -0
  91. package/src/components/LoggedInUserMenu/index.tsx +116 -0
  92. package/src/components/Logo/Animated.tsx +191 -0
  93. package/src/components/Logo/index.tsx +17 -0
  94. package/src/components/Logo/speakeasy-logo.riv +0 -0
  95. package/src/components/Logo/svgs/index.tsx +126 -0
  96. package/src/components/Modal/index.tsx +104 -0
  97. package/src/components/PageHeader/index.tsx +227 -0
  98. package/src/components/PageHeader/styles.module.css +27 -0
  99. package/src/components/Popover/index.tsx +35 -0
  100. package/src/components/PromptInput/index.tsx +372 -0
  101. package/src/components/PullRequestLink/index.tsx +64 -0
  102. package/src/components/ResizablePanel/index.tsx +119 -0
  103. package/src/components/Score/index.module.css +32 -0
  104. package/src/components/Score/index.tsx +268 -0
  105. package/src/components/ScrollArea/index.tsx +48 -0
  106. package/src/components/SegmentedButton/index.module.css +19 -0
  107. package/src/components/SegmentedButton/index.tsx +101 -0
  108. package/src/components/Select/index.tsx +159 -0
  109. package/src/components/Separator/index.tsx +23 -0
  110. package/src/components/Skeleton/index.tsx +61 -0
  111. package/src/components/Skeleton/skeleton.css +52 -0
  112. package/src/components/Stack/index.tsx +137 -0
  113. package/src/components/Subnav/index.tsx +315 -0
  114. package/src/components/Switch/index.tsx +29 -0
  115. package/src/components/Table/context/context.tsx +19 -0
  116. package/src/components/Table/context/tableProvider.tsx +39 -0
  117. package/src/components/Table/index.tsx +707 -0
  118. package/src/components/Table/styles.module.css +25 -0
  119. package/src/components/Tabs/index.tsx +87 -0
  120. package/src/components/TargetLanguageIcon/index.tsx +84 -0
  121. package/src/components/Text/index.tsx +59 -0
  122. package/src/components/ThemeSwitcher/index.tsx +118 -0
  123. package/src/components/Timeline/index.tsx +290 -0
  124. package/src/components/Tooltip/index.tsx +41 -0
  125. package/src/components/UserAvatar/index.tsx +87 -0
  126. package/src/components/UserAvatar/sizeMap.ts +12 -0
  127. package/src/components/Wizard/index.tsx +208 -0
  128. package/src/components/Wizard/types.ts +17 -0
  129. package/src/components/WorkspaceSelector/CreateOrg.tsx +95 -0
  130. package/src/components/WorkspaceSelector/CreateWorkspace.tsx +196 -0
  131. package/src/components/WorkspaceSelector/OrgList.tsx +115 -0
  132. package/src/components/WorkspaceSelector/OrgSelector.tsx +207 -0
  133. package/src/components/WorkspaceSelector/RecentWorkspaces.tsx +83 -0
  134. package/src/components/WorkspaceSelector/ScrollingList.tsx +84 -0
  135. package/src/components/WorkspaceSelector/SearchBox.tsx +40 -0
  136. package/src/components/WorkspaceSelector/WorkspaceItem.tsx +37 -0
  137. package/src/components/WorkspaceSelector/WorkspaceList.tsx +107 -0
  138. package/src/components/WorkspaceSelector/index.tsx +400 -0
  139. package/src/components/WorkspaceSelector/styles.css +74 -0
  140. package/src/components/__beta__/CLIWizard/index.tsx +357 -0
  141. package/src/components/__beta__/CLIWizard/terminal-command.tsx +108 -0
  142. package/src/components/__beta__/CLIWizard/terminal.tsx +83 -0
  143. package/src/components/__beta__/README.md +3 -0
  144. package/src/components/index.mdx +38 -0
  145. package/src/context/ConfigContext.tsx +43 -0
  146. package/src/context/ModalContext.tsx +118 -0
  147. package/src/context/theme.ts +1 -0
  148. package/src/hooks/useAppLayout.ts +10 -0
  149. package/src/hooks/useConfig.ts +10 -0
  150. package/src/hooks/useIsMounted.ts +13 -0
  151. package/src/hooks/useModal.tsx +10 -0
  152. package/src/hooks/useTailwindBreakpoint.ts +47 -0
  153. package/src/hooks/useTheme.ts +13 -0
  154. package/src/index.ts +234 -0
  155. package/src/lib/assert.ts +9 -0
  156. package/src/lib/codeUtils.ts +177 -0
  157. package/src/lib/debounce.ts +9 -0
  158. package/src/lib/responsiveMappers.ts +69 -0
  159. package/src/lib/responsiveUtils.ts +23 -0
  160. package/src/lib/storybookUtils.tsx +26 -0
  161. package/src/lib/typeUtils.ts +109 -0
  162. package/src/lib/utils.ts +85 -0
  163. package/src/styles/codeSyntax.css +59 -0
  164. package/src/styles/globals.css +51 -0
  165. package/src/types.ts +200 -0
  166. package/src/vite-env.d.ts +6 -0
  167. package/types/utilities.d.ts +1 -1
  168. package/dist/components/AIChat/AIChatContainer.d.ts +0 -26
  169. package/dist/components/AIChat/AIChatMessage.d.ts +0 -19
  170. package/dist/components/AIChat/AIChatMessageComposer.d.ts +0 -22
  171. package/dist/components/AIChat/AIChatMessageList.d.ts +0 -6
  172. package/dist/components/AIChat/AIChatModelSelector.d.ts +0 -14
  173. package/dist/components/AIChat/componentsTypes.d.ts +0 -11
  174. package/dist/components/AIChat/context.d.ts +0 -3
  175. package/dist/components/AIChat/index.d.ts +0 -12
  176. package/dist/components/AIChat/parts/AIChatMessageFilePart.d.ts +0 -7
  177. package/dist/components/AIChat/parts/AIChatMessageReasoningPart.d.ts +0 -5
  178. package/dist/components/AIChat/parts/AIChatMessageSourcePart.d.ts +0 -9
  179. package/dist/components/AIChat/parts/AIChatMessageTextPart.d.ts +0 -5
  180. package/dist/components/AIChat/parts/AIChatMessageToolInvocationPart.d.ts +0 -6
  181. package/dist/components/AIChat/parts/AIChatMessageToolPart.d.ts +0 -33
  182. package/dist/components/AIChat/parts/AIChatMessageToolResultPart.d.ts +0 -5
  183. package/dist/components/AIChat/toolCallApproval.d.ts +0 -15
  184. package/dist/components/AIChat/types.d.ts +0 -79
  185. package/dist/components/ActionBar/index.d.ts +0 -36
  186. package/dist/components/Alert/index.d.ts +0 -18
  187. package/dist/components/Alert/types.d.ts +0 -4
  188. package/dist/components/AppLayout/context.d.ts +0 -16
  189. package/dist/components/AppLayout/index.d.ts +0 -131
  190. package/dist/components/AppLayout/provider.d.ts +0 -8
  191. package/dist/components/AppLayout/useAppLayoutKeys.d.ts +0 -1
  192. package/dist/components/Badge/index.d.ts +0 -21
  193. package/dist/components/Button/index.d.ts +0 -22
  194. package/dist/components/Card/index.d.ts +0 -47
  195. package/dist/components/CodeEditorLayout/index.d.ts +0 -101
  196. package/dist/components/CodeHighlight/Pre.d.ts +0 -8
  197. package/dist/components/CodePlayground/index.d.ts +0 -102
  198. package/dist/components/CodeSnippet/index.d.ts +0 -49
  199. package/dist/components/Combobox/index.d.ts +0 -35
  200. package/dist/components/Command/index.d.ts +0 -80
  201. package/dist/components/Container/index.d.ts +0 -9
  202. package/dist/components/ContextDropdown/index.d.ts +0 -7
  203. package/dist/components/Dialog/index.d.ts +0 -21
  204. package/dist/components/DragNDrop/DragNDropArea.d.ts +0 -8
  205. package/dist/components/DragNDrop/DragOverlay.d.ts +0 -1
  206. package/dist/components/DragNDrop/Draggable.d.ts +0 -29
  207. package/dist/components/DragNDrop/Droppable.d.ts +0 -28
  208. package/dist/components/Dropdown/index.d.ts +0 -27
  209. package/dist/components/ExternalPill/index.d.ts +0 -12
  210. package/dist/components/Facepile/index.d.ts +0 -16
  211. package/dist/components/GradientCircle/index.d.ts +0 -10
  212. package/dist/components/Grid/index.d.ts +0 -80
  213. package/dist/components/Heading/index.d.ts +0 -12
  214. package/dist/components/HighlightedText/index.d.ts +0 -19
  215. package/dist/components/Icon/customIcons/createCustomLucideIcon.d.ts +0 -3
  216. package/dist/components/Icon/customIcons/gems.d.ts +0 -2
  217. package/dist/components/Icon/customIcons/go.d.ts +0 -2
  218. package/dist/components/Icon/customIcons/index.d.ts +0 -10
  219. package/dist/components/Icon/customIcons/maven.d.ts +0 -2
  220. package/dist/components/Icon/customIcons/npm.d.ts +0 -2
  221. package/dist/components/Icon/customIcons/nuget.d.ts +0 -2
  222. package/dist/components/Icon/customIcons/packagist.d.ts +0 -2
  223. package/dist/components/Icon/customIcons/pypi.d.ts +0 -2
  224. package/dist/components/Icon/index.d.ts +0 -10
  225. package/dist/components/Icon/isIconName.d.ts +0 -2
  226. package/dist/components/Icon/names.d.ts +0 -6
  227. package/dist/components/IconButton/index.d.ts +0 -14
  228. package/dist/components/Input/index.d.ts +0 -8
  229. package/dist/components/KeyHint/index.d.ts +0 -16
  230. package/dist/components/LanguageIndicator/index.d.ts +0 -7
  231. package/dist/components/Link/index.d.ts +0 -15
  232. package/dist/components/LoggedInUserMenu/index.d.ts +0 -17
  233. package/dist/components/Logo/Animated.d.ts +0 -7
  234. package/dist/components/Logo/index.d.ts +0 -7
  235. package/dist/components/Logo/svgs/index.d.ts +0 -6
  236. package/dist/components/Modal/index.d.ts +0 -8
  237. package/dist/components/PageHeader/index.d.ts +0 -45
  238. package/dist/components/Popover/index.d.ts +0 -8
  239. package/dist/components/PromptInput/index.d.ts +0 -55
  240. package/dist/components/PullRequestLink/index.d.ts +0 -10
  241. package/dist/components/ResizablePanel/index.d.ts +0 -26
  242. package/dist/components/Score/index.d.ts +0 -37
  243. package/dist/components/ScrollArea/index.d.ts +0 -5
  244. package/dist/components/SegmentedButton/index.d.ts +0 -23
  245. package/dist/components/Select/index.d.ts +0 -13
  246. package/dist/components/Separator/index.d.ts +0 -6
  247. package/dist/components/Skeleton/index.d.ts +0 -27
  248. package/dist/components/Stack/index.d.ts +0 -33
  249. package/dist/components/Subnav/index.d.ts +0 -12
  250. package/dist/components/Switch/index.d.ts +0 -4
  251. package/dist/components/Table/context/context.d.ts +0 -8
  252. package/dist/components/Table/context/tableProvider.d.ts +0 -6
  253. package/dist/components/Table/index.d.ts +0 -94
  254. package/dist/components/Tabs/index.d.ts +0 -21
  255. package/dist/components/TargetLanguageIcon/index.d.ts +0 -7
  256. package/dist/components/Text/index.d.ts +0 -19
  257. package/dist/components/ThemeSwitcher/index.d.ts +0 -6
  258. package/dist/components/Timeline/index.d.ts +0 -49
  259. package/dist/components/Tooltip/index.d.ts +0 -9
  260. package/dist/components/UserAvatar/index.d.ts +0 -9
  261. package/dist/components/UserAvatar/sizeMap.d.ts +0 -3
  262. package/dist/components/Wizard/index.d.ts +0 -19
  263. package/dist/components/Wizard/types.d.ts +0 -15
  264. package/dist/components/WorkspaceSelector/CreateOrg.d.ts +0 -6
  265. package/dist/components/WorkspaceSelector/CreateWorkspace.d.ts +0 -17
  266. package/dist/components/WorkspaceSelector/OrgList.d.ts +0 -12
  267. package/dist/components/WorkspaceSelector/OrgSelector.d.ts +0 -13
  268. package/dist/components/WorkspaceSelector/RecentWorkspaces.d.ts +0 -11
  269. package/dist/components/WorkspaceSelector/ScrollingList.d.ts +0 -21
  270. package/dist/components/WorkspaceSelector/SearchBox.d.ts +0 -9
  271. package/dist/components/WorkspaceSelector/WorkspaceItem.d.ts +0 -9
  272. package/dist/components/WorkspaceSelector/WorkspaceList.d.ts +0 -11
  273. package/dist/components/WorkspaceSelector/index.d.ts +0 -36
  274. package/dist/components/__beta__/CLIWizard/index.d.ts +0 -19
  275. package/dist/components/__beta__/CLIWizard/terminal-command.d.ts +0 -19
  276. package/dist/components/__beta__/CLIWizard/terminal.d.ts +0 -26
  277. package/dist/context/ConfigContext.d.ts +0 -18
  278. package/dist/context/ModalContext.d.ts +0 -22
  279. package/dist/context/theme.d.ts +0 -1
  280. package/dist/createCustomLucideIcon-CatlpFc0.mjs +0 -19
  281. package/dist/createCustomLucideIcon-CatlpFc0.mjs.map +0 -1
  282. package/dist/gems-DQ7pOLLr.mjs +0 -24
  283. package/dist/gems-DQ7pOLLr.mjs.map +0 -1
  284. package/dist/github-kgjMtfE7.mjs +0 -11
  285. package/dist/github-kgjMtfE7.mjs.map +0 -1
  286. package/dist/go-DsW1bFpz.mjs.map +0 -1
  287. package/dist/hooks/useAppLayout.d.ts +0 -1
  288. package/dist/hooks/useConfig.d.ts +0 -2
  289. package/dist/hooks/useIsMounted.d.ts +0 -1
  290. package/dist/hooks/useModal.d.ts +0 -11
  291. package/dist/hooks/useTailwindBreakpoint.d.ts +0 -3
  292. package/dist/hooks/useTheme.d.ts +0 -6
  293. package/dist/index-C9bJtuJ5.mjs +0 -16347
  294. package/dist/index-C9bJtuJ5.mjs.map +0 -1
  295. package/dist/index.d.ts +0 -80
  296. package/dist/lib/assert.d.ts +0 -2
  297. package/dist/lib/codeUtils.d.ts +0 -36
  298. package/dist/lib/debounce.d.ts +0 -1
  299. package/dist/lib/responsiveMappers.d.ts +0 -10
  300. package/dist/lib/responsiveUtils.d.ts +0 -3
  301. package/dist/lib/storybookUtils.d.ts +0 -5
  302. package/dist/lib/typeUtils.d.ts +0 -24
  303. package/dist/lib/utils.d.ts +0 -24
  304. package/dist/maven-Dub5liK1.mjs.map +0 -1
  305. package/dist/maven-W_nkSDNW.mjs +0 -107
  306. package/dist/maven-W_nkSDNW.mjs.map +0 -1
  307. package/dist/moonshine.es.js +0 -125
  308. package/dist/moonshine.es.js.map +0 -1
  309. package/dist/npm-BWTcVvFH.mjs +0 -11
  310. package/dist/npm-BWTcVvFH.mjs.map +0 -1
  311. package/dist/npm-BYcG5_q9.mjs +0 -17
  312. package/dist/npm-BYcG5_q9.mjs.map +0 -1
  313. package/dist/nuget-CV5HU1JR.mjs +0 -11
  314. package/dist/nuget-CV5HU1JR.mjs.map +0 -1
  315. package/dist/nuget-D86y5HDl.mjs.map +0 -1
  316. package/dist/packagist-BFSSrw4p.mjs +0 -118
  317. package/dist/packagist-BFSSrw4p.mjs.map +0 -1
  318. package/dist/packagist-D01fn9N_.mjs +0 -11
  319. package/dist/packagist-D01fn9N_.mjs.map +0 -1
  320. package/dist/pypi-2SUX-2OR.mjs.map +0 -1
  321. package/dist/pypi-DLh6kIJe.mjs +0 -11
  322. package/dist/pypi-DLh6kIJe.mjs.map +0 -1
  323. package/dist/rubygems-DeiNjcDV.mjs +0 -11
  324. package/dist/rubygems-DeiNjcDV.mjs.map +0 -1
  325. package/dist/speakeasy-logo-ByBTXLWb.mjs +0 -5
  326. package/dist/speakeasy-logo-ByBTXLWb.mjs.map +0 -1
  327. package/dist/style.css +0 -1
  328. package/dist/terraform-C4aktQ0o.mjs +0 -11
  329. package/dist/terraform-C4aktQ0o.mjs.map +0 -1
  330. package/dist/types.d.ts +0 -85
@@ -1,22 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { FcOrClassName } from './componentsTypes';
3
- export interface AIChatMessageComposerProps {
4
- className?: string;
5
- components?: Partial<AIChatMessageComposerComponents>;
6
- }
7
- export type AIChatMessageComposerComponents = {
8
- submitButton: FcOrClassName<{
9
- disabled?: boolean;
10
- type: 'submit';
11
- }>;
12
- modelSelector: FcOrClassName<{
13
- model: string;
14
- onModelChange: (model: string) => void;
15
- availableModels: {
16
- label: string;
17
- value: string;
18
- }[];
19
- }>;
20
- additionalActions: ReactNode;
21
- };
22
- export declare function AIChatMessageComposer({ className, components, }: AIChatMessageComposerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { AIChatMessageComponents } from './AIChatMessage';
2
- export interface AIChatMessageListProps {
3
- components?: Partial<AIChatMessageComponents>;
4
- className?: string;
5
- }
6
- export declare function AIChatMessageList({ components, className, }: AIChatMessageListProps): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- interface ModelSelectorConfig {
2
- model: string;
3
- onModelChange: (v: string) => void;
4
- availableModels: {
5
- label: string;
6
- value: string;
7
- }[];
8
- }
9
- interface AIChatModelSelectorProps {
10
- modelSelector?: ModelSelectorConfig;
11
- className?: string;
12
- }
13
- export declare function AIChatModelSelector({ modelSelector, className, }: AIChatModelSelectorProps): import("react/jsx-runtime").JSX.Element | null;
14
- export {};
@@ -1,11 +0,0 @@
1
- import { FunctionComponent, ReactNode } from 'react';
2
- type ClassName = string;
3
- export type FcOrClassName<P> = FunctionComponent<P> | ClassName;
4
- export type BaseComponents = Record<string, FcOrClassName<any> | ReactNode>;
5
- export type DefaultComponents<T extends BaseComponents> = {
6
- [key in keyof T]: T[key] extends FcOrClassName<infer P> ? FunctionComponent<P & {
7
- className: string;
8
- }> : T[key];
9
- };
10
- export declare const renderComponent: <T extends BaseComponents, K extends keyof T>(defaultComponents: DefaultComponents<T>, userComponents: Partial<T> | undefined, key: K, props: T[K] extends FcOrClassName<infer P> ? P : never) => ReactNode;
11
- export {};
@@ -1,3 +0,0 @@
1
- import { AIChatContextValue } from './types';
2
- export declare const AIChatContext: import('react').Context<AIChatContextValue>;
3
- export declare const useAIChat: () => AIChatContextValue;
@@ -1,12 +0,0 @@
1
- export * from './AIChatContainer';
2
- export * from './AIChatMessageList';
3
- export * from './AIChatMessage';
4
- export * from './AIChatMessageComposer';
5
- export * from './parts/AIChatMessageTextPart';
6
- export * from './parts/AIChatMessageReasoningPart';
7
- export * from './parts/AIChatMessageToolInvocationPart';
8
- export * from './parts/AIChatMessageToolResultPart';
9
- export * from './parts/AIChatMessageFilePart';
10
- export * from './parts/AIChatMessageSourcePart';
11
- export * from './types';
12
- export * from './context';
@@ -1,7 +0,0 @@
1
- import { BasePartProps } from '../types';
2
- export interface AIChatMessageFilePartProps extends BasePartProps {
3
- mimeType: string;
4
- data: string;
5
- fileName?: string;
6
- }
7
- export declare function AIChatMessageFilePart({ mimeType, data, fileName, className, }: AIChatMessageFilePartProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { BasePartProps } from '../types';
2
- export interface AIChatMessageReasoningPartProps extends BasePartProps {
3
- reasoning: string;
4
- }
5
- export declare function AIChatMessageReasoningPart({ reasoning, className, }: AIChatMessageReasoningPartProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { BasePartProps } from '../types';
2
- export interface AIChatMessageSourcePartProps extends BasePartProps {
3
- source: {
4
- id: string;
5
- url: string;
6
- title?: string;
7
- };
8
- }
9
- export declare function AIChatMessageSourcePart({ source, className, }: AIChatMessageSourcePartProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { BasePartProps } from '../types';
2
- export interface AIChatMessageTextPartProps extends BasePartProps {
3
- text: string;
4
- }
5
- export declare function AIChatMessageTextPart({ text, className, }: AIChatMessageTextPartProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { BasePartProps } from '../types';
2
- export interface AIChatMessageToolInvocationPartProps extends BasePartProps {
3
- toolName: string;
4
- toolInput?: Record<string, unknown>;
5
- }
6
- export declare function AIChatMessageToolInvocationPart({ toolName, toolInput, className, }: AIChatMessageToolInvocationPartProps): import("react/jsx-runtime").JSX.Element;
@@ -1,33 +0,0 @@
1
- import { BaseComponents, FcOrClassName } from '../componentsTypes';
2
- import { BasePartProps } from '../types';
3
- type ToolInvocationState = 'partial-call' | 'call' | 'result';
4
- type ToolInvocationStatus = 'pending' | 'in-progress' | 'success' | 'error';
5
- interface ToolInvocation {
6
- state: ToolInvocationState;
7
- toolCallId: string;
8
- toolName: string;
9
- args: Record<string, unknown>;
10
- result?: unknown;
11
- }
12
- export interface AIChatMessageToolPartProps extends BasePartProps {
13
- toolInvocation: ToolInvocation;
14
- components?: Partial<AIChatMessageToolPartComponents>;
15
- onAccept?: () => void;
16
- onReject?: () => void;
17
- }
18
- export interface AIChatMessageToolPartComponents extends BaseComponents {
19
- toolName: FcOrClassName<ToolInvocation & {
20
- confirmMessage?: string;
21
- }>;
22
- statusIndicator: FcOrClassName<{
23
- status: ToolInvocationStatus;
24
- }>;
25
- input: FcOrClassName<Omit<ToolInvocation, 'args'> & {
26
- args: string;
27
- }>;
28
- result: FcOrClassName<Omit<ToolInvocation, 'result'> & {
29
- result: string;
30
- }>;
31
- }
32
- export declare function AIChatMessageToolPart({ toolInvocation, className, components, }: AIChatMessageToolPartProps): import("react/jsx-runtime").JSX.Element;
33
- export {};
@@ -1,5 +0,0 @@
1
- import { BasePartProps } from '../types';
2
- export interface AIChatMessageToolResultPartProps extends BasePartProps {
3
- content: string;
4
- }
5
- export declare function AIChatMessageToolResultPart({ content, className, }: AIChatMessageToolResultPartProps): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +0,0 @@
1
- import { ToolCall } from 'ai';
2
- import { ToolCallApprovalProps } from './types';
3
- type TC = ToolCall<string, any>;
4
- type ToolCallFn = (t: {
5
- toolCall: TC;
6
- }) => Promise<string>;
7
- export declare const TOOL_CALL_ERROR_MESSAGE = "Tool call error";
8
- export declare const TOOL_CALL_REJECTED_MESSAGE = "User rejected tool call";
9
- export declare function useToolCallApproval({ executeToolCall, requiresApproval, }: {
10
- executeToolCall: (toolCall: TC) => Promise<string>;
11
- requiresApproval?: (toolCall: TC) => boolean | string;
12
- }): ToolCallApprovalProps & {
13
- toolCallFn: ToolCallFn;
14
- };
15
- export {};
@@ -1,79 +0,0 @@
1
- import { ToolCall } from 'ai';
2
- export type MessageRole = 'user' | 'assistant' | 'system';
3
- export type ToolArgs = {
4
- target_file?: string;
5
- should_read_entire_file?: boolean;
6
- query?: string;
7
- target_directories?: string[];
8
- instructions?: string;
9
- code_edit?: string;
10
- command?: string;
11
- is_background?: boolean;
12
- explanation?: string;
13
- };
14
- export type ToolInvocation = {
15
- type: 'tool-invocation';
16
- toolInvocation: {
17
- toolName: string;
18
- toolCallId: string;
19
- state: 'partial-call' | 'call' | 'result';
20
- args: ToolArgs;
21
- };
22
- };
23
- export type ToolResult = {
24
- type: 'tool-result';
25
- toolCallId: string;
26
- content: string;
27
- };
28
- export type TextPart = {
29
- type: 'text';
30
- text: string;
31
- };
32
- export type ReasoningPart = {
33
- type: 'reasoning';
34
- reasoning: string;
35
- };
36
- export type FilePart = {
37
- type: 'file';
38
- mimeType: string;
39
- data: string;
40
- fileName: string;
41
- };
42
- export type SourcePart = {
43
- type: 'source';
44
- source: {
45
- id: string;
46
- url: string;
47
- title: string;
48
- };
49
- };
50
- export type MessagePart = TextPart | ReasoningPart | ToolInvocation | ToolResult | FilePart | SourcePart;
51
- export type ChatMessage = {
52
- id: string;
53
- role: 'user' | 'assistant';
54
- parts: MessagePart[];
55
- };
56
- export interface AIChatContextValue {
57
- messages: ChatMessage[];
58
- isLoading?: boolean;
59
- onSendMessage?: (message: string) => void;
60
- model?: string;
61
- onModelChange?: (model: string) => void;
62
- availableModels?: {
63
- label: string;
64
- value: string;
65
- }[];
66
- toolCallApproval?: ToolCallApprovalProps;
67
- initialInput?: string;
68
- }
69
- export interface BasePartProps {
70
- className?: string;
71
- }
72
- export type ToolCallWithApproval = ToolCall<string, any> & {
73
- approve: () => void;
74
- reject: () => void;
75
- confirmMessage?: string;
76
- };
77
- export interface ToolCallApprovalProps {
78
- pendingToolCall: ToolCallWithApproval | null;
79
- }
@@ -1,36 +0,0 @@
1
- import { IconName } from '../Icon/names';
2
- import { Translate, DragEndEvent, DragStartEvent, Modifier } from '@dnd-kit/core';
3
- interface ActionBarProps {
4
- children: React.ReactNode;
5
- id: string;
6
- initialPosition: Translate;
7
- onChangePosition?: (position: Translate) => void;
8
- onDragStart?: (event: DragStartEvent) => void;
9
- onDragEnd?: (event: DragEndEvent) => void;
10
- draggable?: boolean;
11
- /**
12
- * dnd-kit modifiers (https://docs.dndkit.com/api-documentation/modifiers)
13
- */
14
- modifiers?: Modifier[];
15
- }
16
- interface ActionBarItemProps {
17
- children: React.ReactNode;
18
- onClick?: () => void;
19
- disabled?: boolean;
20
- className?: string;
21
- iconName: IconName;
22
- }
23
- export declare const ActionBar: {
24
- ({ children, modifiers, ...props }: ActionBarProps): import("react/jsx-runtime").JSX.Element;
25
- displayName: string;
26
- } & {
27
- Item: {
28
- ({ children, onClick, disabled, className, iconName, }: ActionBarItemProps): import("react/jsx-runtime").JSX.Element;
29
- displayName: string;
30
- };
31
- Separator: {
32
- (): import("react/jsx-runtime").JSX.Element;
33
- displayName: string;
34
- };
35
- };
36
- export type { ActionBarProps, ActionBarItemProps };
@@ -1,18 +0,0 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- import { iconNames } from '../Icon/names';
3
- declare const alertVariants: (props?: ({
4
- variant?: "success" | "warning" | "default" | "error" | "info" | "feature" | null | undefined;
5
- modifiers?: "inline" | null | undefined;
6
- } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
7
- export type AlertProps = {
8
- variant: NonNullable<VariantProps<typeof alertVariants>['variant']>;
9
- children: React.ReactNode;
10
- inline?: boolean;
11
- dismissible?: boolean;
12
- onDismiss?: () => void;
13
- iconName?: (typeof iconNames)[number];
14
- useContainer?: boolean;
15
- className?: string;
16
- };
17
- export declare function Alert({ variant, children, inline, dismissible, onDismiss, iconName, useContainer, className, }: AlertProps): import("react/jsx-runtime").JSX.Element;
18
- export {};
@@ -1,4 +0,0 @@
1
- export declare const variants: readonly ["default", "success", "error", "warning", "info", "feature"];
2
- export type Variant = (typeof variants)[number];
3
- export declare const modifiers: readonly ["inline"];
4
- export type Modifier = (typeof modifiers)[number];
@@ -1,16 +0,0 @@
1
- export interface KeybindConfig {
2
- /**
3
- * The keybind to trigger the action
4
- * Will be CMDOrCTRL + key
5
- */
6
- key: string;
7
- description: string;
8
- }
9
- export interface AppLayoutContextType {
10
- collapsed: boolean;
11
- setCollapsed: (collapsed: boolean) => void;
12
- keybinds: {
13
- toggle: KeybindConfig;
14
- };
15
- }
16
- export declare const AppLayoutContext: import('react').Context<AppLayoutContextType>;
@@ -1,131 +0,0 @@
1
- import { default as React, PropsWithChildren, HTMLAttributes } from 'react';
2
- import { IconName } from '../Icon/names';
3
- interface AppLayoutProps extends PropsWithChildren {
4
- className?: string;
5
- }
6
- declare const AppLayoutBase: {
7
- ({ children, className }: AppLayoutProps): import("react/jsx-runtime").JSX.Element;
8
- displayName: string;
9
- };
10
- interface AppLayoutSurfaceProps extends HTMLAttributes<HTMLDivElement> {
11
- className?: string;
12
- }
13
- declare const AppLayoutSurface: {
14
- ({ children, className, ...props }: AppLayoutSurfaceProps): import("react/jsx-runtime").JSX.Element;
15
- displayName: string;
16
- };
17
- interface AppLayoutSidebarProps {
18
- className?: string;
19
- children?: React.ReactNode;
20
- /**
21
- * A React.ReactNode to render instead of the default Logo.
22
- */
23
- Logo?: React.ReactNode;
24
- /**
25
- * A function to call when the the brand logo is clicked.
26
- */
27
- onHomeNavigation?: () => void;
28
- }
29
- declare const AppLayoutSidebar: {
30
- ({ children, className, onHomeNavigation, }: AppLayoutSidebarProps): import("react/jsx-runtime").JSX.Element;
31
- displayName: string;
32
- };
33
- interface AppLayoutThemeSwitcherProps {
34
- className?: string;
35
- }
36
- declare const AppLayoutThemeSwitcher: {
37
- ({ className }: AppLayoutThemeSwitcherProps): import("react/jsx-runtime").JSX.Element;
38
- displayName: string;
39
- };
40
- interface AppLayoutBreadcrumbProps extends PropsWithChildren {
41
- className?: string;
42
- }
43
- declare const AppLayoutBreadcrumb: {
44
- ({ children, className, }: AppLayoutBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
45
- displayName: string;
46
- };
47
- export interface AppLayoutBreadcrumbItemProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
48
- className?: string;
49
- active?: boolean;
50
- children?: React.ReactNode;
51
- disabled?: boolean;
52
- asChild?: boolean;
53
- }
54
- declare const AppLayoutBreadcrumbItem: React.ForwardRefExoticComponent<AppLayoutBreadcrumbItemProps & React.RefAttributes<HTMLAnchorElement>>;
55
- declare const AppLayoutHeaderDivider: {
56
- (): import("react/jsx-runtime").JSX.Element;
57
- displayName: string;
58
- };
59
- interface AppLayoutCollapseButtonProps extends PropsWithChildren {
60
- className?: string;
61
- }
62
- declare const AppLayoutCollapseButton: {
63
- ({ className, }: AppLayoutCollapseButtonProps): import("react/jsx-runtime").JSX.Element;
64
- displayName: string;
65
- };
66
- interface AppLayoutSurfaceHeaderProps extends PropsWithChildren {
67
- className?: string;
68
- }
69
- declare const AppLayoutSurfaceHeader: {
70
- ({ children, className, }: AppLayoutSurfaceHeaderProps): import("react/jsx-runtime").JSX.Element;
71
- displayName: string;
72
- };
73
- interface AppLayoutHeaderProps extends PropsWithChildren {
74
- className?: string;
75
- }
76
- declare const AppLayoutHeader: {
77
- ({ children, className }: AppLayoutHeaderProps): import("react/jsx-runtime").JSX.Element;
78
- displayName: string;
79
- };
80
- interface AppLayoutNavProps extends HTMLAttributes<HTMLDivElement> {
81
- className?: string;
82
- }
83
- declare const AppLayoutNav: {
84
- ({ children, className, ...props }: AppLayoutNavProps): import("react/jsx-runtime").JSX.Element;
85
- displayName: string;
86
- };
87
- export interface AppLayoutNavItemProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
88
- title: string;
89
- icon: IconName;
90
- children?: React.ReactNode;
91
- render?: ({ title, icon, active, }: {
92
- title: string;
93
- icon: React.ReactNode;
94
- active?: boolean;
95
- }) => React.ReactNode;
96
- className?: string;
97
- active?: boolean;
98
- disabled?: boolean;
99
- asChild?: boolean;
100
- }
101
- declare const AppLayoutNavItem: React.ForwardRefExoticComponent<AppLayoutNavItemProps & React.RefAttributes<HTMLAnchorElement>>;
102
- export interface AppLayoutNavItemGroupProps extends HTMLAttributes<HTMLDivElement> {
103
- className?: string;
104
- /**
105
- * The name of the group.
106
- */
107
- name: string;
108
- /**
109
- * Child AppLayout.NavItem components.
110
- */
111
- children: React.ReactNode;
112
- }
113
- declare const AppLayoutNavItemGroup: {
114
- ({ children, className, name, ...props }: AppLayoutNavItemGroupProps): import("react/jsx-runtime").JSX.Element;
115
- displayName: string;
116
- };
117
- declare const AppLayout: typeof AppLayoutBase & {
118
- Surface: typeof AppLayoutSurface;
119
- SurfaceHeader: typeof AppLayoutSurfaceHeader;
120
- Sidebar: typeof AppLayoutSidebar;
121
- Breadcrumb: typeof AppLayoutBreadcrumb;
122
- BreadcrumbItem: typeof AppLayoutBreadcrumbItem;
123
- CollapseButton: typeof AppLayoutCollapseButton;
124
- HeaderDivider: typeof AppLayoutHeaderDivider;
125
- Header: typeof AppLayoutHeader;
126
- ThemeSwitcher: typeof AppLayoutThemeSwitcher;
127
- Nav: typeof AppLayoutNav;
128
- NavItem: typeof AppLayoutNavItem;
129
- NavItemGroup: typeof AppLayoutNavItemGroup;
130
- };
131
- export { AppLayout };
@@ -1,8 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
- import { AppLayoutContextType } from './context';
3
- interface AppLayoutProviderProps extends PropsWithChildren {
4
- defaultCollapsed?: boolean;
5
- keybinds?: AppLayoutContextType['keybinds'];
6
- }
7
- export declare const AppLayoutProvider: ({ children, defaultCollapsed, keybinds, }: AppLayoutProviderProps) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1 +0,0 @@
1
- export declare function useAppLayoutKeys(): void;
@@ -1,21 +0,0 @@
1
- import { BadgeVariant } from '../../types';
2
- import * as React from 'react';
3
- declare const BadgeLeftIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
4
- declare const BadgeRightIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
5
- declare const BadgeIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
6
- declare const BadgeText: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
7
- type Attributes = Omit<React.HTMLAttributes<HTMLSpanElement>, 'style'>;
8
- export interface BadgeProps extends Attributes {
9
- asChild?: boolean;
10
- variant?: BadgeVariant;
11
- background?: boolean;
12
- className?: string;
13
- 'aria-label'?: string;
14
- }
15
- declare const BadgeWithCompounds: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>> & {
16
- Icon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
17
- LeftIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
18
- RightIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
19
- Text: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
20
- };
21
- export { BadgeWithCompounds as Badge, BadgeIcon, BadgeLeftIcon, BadgeRightIcon, BadgeText, };
@@ -1,22 +0,0 @@
1
- import { ButtonSize, ButtonVariant, ButtonContext } from '../../types';
2
- import * as React from 'react';
3
- declare const ButtonLeftIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
4
- declare const ButtonRightIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
5
- declare const ButtonIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
6
- declare const ButtonText: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
7
- type Attributes = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'>;
8
- export interface ButtonProps extends Attributes {
9
- asChild?: boolean;
10
- variant?: ButtonVariant;
11
- size?: ButtonSize;
12
- context?: ButtonContext;
13
- className?: string;
14
- 'aria-label'?: string;
15
- }
16
- declare const ButtonWithCompounds: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>> & {
17
- Icon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
18
- LeftIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
19
- RightIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
20
- Text: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
21
- };
22
- export { ButtonWithCompounds as Button, ButtonIcon, ButtonLeftIcon, ButtonRightIcon, ButtonText, };
@@ -1,47 +0,0 @@
1
- import { default as React, PropsWithChildren, ReactNode } from 'react';
2
- import { iconNames } from '../Icon/names';
3
- import { Range } from '../../lib/typeUtils';
4
- type RightElement = {
5
- type: 'button';
6
- label: string;
7
- onClick: () => void;
8
- } | {
9
- type: 'gauge';
10
- value: Range<100>;
11
- };
12
- type IconProps = {
13
- name: (typeof iconNames)[number];
14
- size?: 'small' | 'medium' | 'large';
15
- };
16
- type CardHeaderProps = PropsWithChildren & {
17
- subheader?: React.ReactNode;
18
- icon?: IconProps;
19
- rightElement?: RightElement;
20
- className?: string;
21
- };
22
- interface CardContentProps extends PropsWithChildren {
23
- className?: string;
24
- }
25
- type FooterContent = {
26
- text: string;
27
- link?: {
28
- label: string;
29
- href: string;
30
- };
31
- };
32
- type CardFooterProps = {
33
- content: FooterContent;
34
- className?: string;
35
- };
36
- export type CardProps = {
37
- children: ReactNode | ReactNode[];
38
- onClick?: () => void;
39
- href?: string;
40
- className?: string;
41
- };
42
- declare const CardWithSubcomponents: React.FC<CardProps> & {
43
- Header: React.FC<CardHeaderProps>;
44
- Content: React.FC<CardContentProps>;
45
- Footer: React.FC<CardFooterProps>;
46
- };
47
- export { CardWithSubcomponents as Card };