@datalayer/agent-runtimes 0.0.8 → 0.0.10

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 (275) hide show
  1. package/README.md +2 -1
  2. package/lib/{examples/components → components}/AgentConfiguration.d.ts +27 -12
  3. package/lib/{examples/components → components}/AgentConfiguration.js +170 -22
  4. package/lib/{examples/components → components}/FooterMetrics.d.ts +1 -2
  5. package/lib/{examples/components → components}/Header.d.ts +1 -6
  6. package/lib/{examples/components → components}/Header.js +5 -39
  7. package/lib/{examples/components → components}/HeaderControls.d.ts +1 -2
  8. package/lib/{examples/components → components}/HeaderControls.js +1 -1
  9. package/lib/{examples/components → components}/LexicalEditor.d.ts +2 -3
  10. package/lib/{examples/components → components}/LexicalEditor.js +2 -2
  11. package/lib/components/MainContent.d.ts +34 -0
  12. package/lib/{examples/components → components}/MainContent.js +18 -9
  13. package/lib/components/McpServerManager.d.ts +30 -0
  14. package/lib/components/McpServerManager.js +331 -0
  15. package/lib/{examples/components → components}/MockFileBrowser.d.ts +1 -2
  16. package/lib/{examples/components → components}/SessionTabs.d.ts +2 -3
  17. package/lib/{examples/components → components}/TimeTravel.d.ts +1 -2
  18. package/lib/components/chat/components/AgentDetails.d.ts +3 -1
  19. package/lib/components/chat/components/AgentDetails.js +323 -31
  20. package/lib/components/chat/components/Chat.d.ts +37 -3
  21. package/lib/components/chat/components/Chat.js +29 -10
  22. package/lib/components/chat/components/ChatFloating.d.ts +27 -2
  23. package/lib/components/chat/components/ChatFloating.js +17 -10
  24. package/lib/components/chat/components/ChatPopupStandalone.js +1 -1
  25. package/lib/components/chat/components/ChatSidebar.d.ts +1 -1
  26. package/lib/components/chat/components/ChatStandalone.d.ts +1 -1
  27. package/lib/components/chat/components/ChatStandalone.js +1 -1
  28. package/lib/components/chat/components/ContextDistribution.d.ts +70 -6
  29. package/lib/components/chat/components/ContextDistribution.js +11 -4
  30. package/lib/components/chat/components/ContextInspector.d.ts +81 -0
  31. package/lib/components/chat/components/ContextInspector.js +261 -0
  32. package/lib/components/chat/components/ContextPanel.d.ts +112 -0
  33. package/lib/components/chat/components/ContextPanel.js +373 -0
  34. package/lib/components/chat/components/base/ChatBase.d.ts +74 -19
  35. package/lib/components/chat/components/base/ChatBase.js +296 -37
  36. package/lib/components/chat/components/index.d.ts +3 -1
  37. package/lib/components/chat/components/index.js +2 -0
  38. package/lib/components/chat/extensions/ExtensionRegistry.d.ts +1 -1
  39. package/lib/components/chat/extensions/index.d.ts +1 -0
  40. package/lib/components/chat/index.d.ts +3 -3
  41. package/lib/components/chat/protocols/AGUIAdapter.js +24 -4
  42. package/lib/components/chat/protocols/VercelAIAdapter.js +35 -1
  43. package/lib/components/chat/store/chatStore.d.ts +2 -3
  44. package/lib/components/chat/store/conversationStore.d.ts +83 -0
  45. package/lib/components/chat/store/conversationStore.js +174 -0
  46. package/lib/components/chat/store/index.d.ts +2 -1
  47. package/lib/components/chat/store/index.js +1 -0
  48. package/lib/components/chat/types/inference.d.ts +17 -0
  49. package/lib/components/chat/types/protocol.d.ts +10 -0
  50. package/lib/components/index.d.ts +23 -0
  51. package/lib/components/index.js +11 -0
  52. package/lib/config/agents.d.ts +33 -0
  53. package/lib/config/agents.js +424 -0
  54. package/lib/config/index.d.ts +4 -0
  55. package/lib/config/index.js +8 -0
  56. package/lib/config/mcpServers.d.ts +18 -0
  57. package/lib/config/mcpServers.js +129 -0
  58. package/lib/config/skills.d.ts +25 -0
  59. package/lib/config/skills.js +54 -0
  60. package/lib/{lib → config}/utils.d.ts +1 -1
  61. package/lib/{lib → config}/utils.js +2 -2
  62. package/lib/examples/AgentRuntimeLexical2Example.d.ts +1 -0
  63. package/lib/examples/AgentRuntimeLexical2Example.js +3 -2
  64. package/lib/examples/AgentRuntimeLexicalExample.d.ts +1 -0
  65. package/lib/examples/AgentRuntimeLexicalExample.js +5 -3
  66. package/lib/examples/AgentRuntimeLexicalSidebarExample.d.ts +1 -0
  67. package/lib/examples/AgentRuntimeLexicalSidebarExample.js +3 -3
  68. package/lib/examples/AgentRuntimeNotebookExample.js +1 -1
  69. package/lib/examples/AgentSpaceFormExample.d.ts +2 -2
  70. package/lib/examples/AgentSpaceFormExample.js +167 -29
  71. package/lib/examples/CopilotKitLexicalExample.d.ts +1 -0
  72. package/lib/examples/CopilotKitLexicalExample.js +3 -2
  73. package/lib/examples/index.d.ts +1 -0
  74. package/lib/examples/stores/notebooks/NotebookExample2.ipynb.json +43 -43
  75. package/lib/hooks/useAGUI.d.ts +1 -1
  76. package/lib/hooks/useAGUI.js +1 -1
  77. package/lib/identity/types.d.ts +1 -1
  78. package/lib/index.d.ts +2 -0
  79. package/lib/index.js +1 -0
  80. package/lib/runtime/index.d.ts +3 -0
  81. package/lib/runtime/runtimeStore.d.ts +3 -4
  82. package/lib/runtime/useAgentConnection.d.ts +2 -3
  83. package/lib/runtime/useAgentRuntime.d.ts +2 -3
  84. package/lib/stories/Cell.stories.js +1 -1
  85. package/lib/tools/adapters/agent-runtimes/notebookHooks.js +1 -0
  86. package/lib/tools/adapters/copilotkit/notebookHooks.js +1 -0
  87. package/lib/types.d.ts +150 -0
  88. package/package.json +4 -5
  89. package/scripts/apply-patches.sh +32 -0
  90. package/scripts/codegen/generate_agents.py +452 -0
  91. package/scripts/codegen/generate_mcp_servers.py +424 -0
  92. package/scripts/codegen/generate_skills.py +321 -0
  93. package/scripts/download-ai-elements.py +35 -20
  94. package/scripts/sync-jupyter.sh +6 -0
  95. package/lib/components/ui/accordion.d.ts +0 -7
  96. package/lib/components/ui/accordion.js +0 -22
  97. package/lib/components/ui/alert-dialog.d.ts +0 -14
  98. package/lib/components/ui/alert-dialog.js +0 -43
  99. package/lib/components/ui/alert.d.ts +0 -9
  100. package/lib/components/ui/alert.js +0 -24
  101. package/lib/components/ui/aspect-ratio.d.ts +0 -3
  102. package/lib/components/ui/aspect-ratio.js +0 -11
  103. package/lib/components/ui/avatar.d.ts +0 -6
  104. package/lib/components/ui/avatar.js +0 -18
  105. package/lib/components/ui/badge.d.ts +0 -9
  106. package/lib/components/ui/badge.js +0 -22
  107. package/lib/components/ui/breadcrumb.d.ts +0 -11
  108. package/lib/components/ui/breadcrumb.js +0 -27
  109. package/lib/components/ui/button-group.d.ts +0 -11
  110. package/lib/components/ui/button-group.js +0 -31
  111. package/lib/components/ui/button.d.ts +0 -13
  112. package/lib/components/ui/button.js +0 -39
  113. package/lib/components/ui/calendar.d.ts +0 -8
  114. package/lib/components/ui/calendar.js +0 -80
  115. package/lib/components/ui/card.d.ts +0 -9
  116. package/lib/components/ui/card.js +0 -24
  117. package/lib/components/ui/carousel.d.ts +0 -19
  118. package/lib/components/ui/carousel.js +0 -95
  119. package/lib/components/ui/chart.d.ts +0 -53
  120. package/lib/components/ui/chart.js +0 -136
  121. package/lib/components/ui/checkbox.d.ts +0 -4
  122. package/lib/components/ui/checkbox.js +0 -13
  123. package/lib/components/ui/collapsible.d.ts +0 -5
  124. package/lib/components/ui/collapsible.js +0 -17
  125. package/lib/components/ui/command.d.ts +0 -18
  126. package/lib/components/ui/command.js +0 -38
  127. package/lib/components/ui/context-menu.d.ts +0 -25
  128. package/lib/components/ui/context-menu.js +0 -55
  129. package/lib/components/ui/dialog.d.ts +0 -15
  130. package/lib/components/ui/dialog.js +0 -40
  131. package/lib/components/ui/drawer.d.ts +0 -13
  132. package/lib/components/ui/drawer.js +0 -39
  133. package/lib/components/ui/dropdown-menu.d.ts +0 -25
  134. package/lib/components/ui/dropdown-menu.js +0 -55
  135. package/lib/components/ui/empty.d.ts +0 -11
  136. package/lib/components/ui/empty.js +0 -37
  137. package/lib/components/ui/field.d.ts +0 -24
  138. package/lib/components/ui/field.js +0 -80
  139. package/lib/components/ui/form.d.ts +0 -24
  140. package/lib/components/ui/form.js +0 -63
  141. package/lib/components/ui/hover-card.d.ts +0 -6
  142. package/lib/components/ui/hover-card.js +0 -18
  143. package/lib/components/ui/input-group.d.ts +0 -19
  144. package/lib/components/ui/input-group.js +0 -69
  145. package/lib/components/ui/input-otp.d.ts +0 -11
  146. package/lib/components/ui/input-otp.js +0 -25
  147. package/lib/components/ui/input.d.ts +0 -3
  148. package/lib/components/ui/input.js +0 -6
  149. package/lib/components/ui/item.d.ts +0 -23
  150. package/lib/components/ui/item.js +0 -66
  151. package/lib/components/ui/kbd.d.ts +0 -3
  152. package/lib/components/ui/kbd.js +0 -13
  153. package/lib/components/ui/label.d.ts +0 -4
  154. package/lib/components/ui/label.js +0 -12
  155. package/lib/components/ui/menubar.d.ts +0 -26
  156. package/lib/components/ui/menubar.js +0 -58
  157. package/lib/components/ui/navigation-menu.d.ts +0 -14
  158. package/lib/components/ui/navigation-menu.js +0 -31
  159. package/lib/components/ui/pagination.d.ts +0 -13
  160. package/lib/components/ui/pagination.js +0 -29
  161. package/lib/components/ui/popover.d.ts +0 -7
  162. package/lib/components/ui/popover.js +0 -21
  163. package/lib/components/ui/progress.d.ts +0 -4
  164. package/lib/components/ui/progress.js +0 -12
  165. package/lib/components/ui/radio-group.d.ts +0 -5
  166. package/lib/components/ui/radio-group.js +0 -16
  167. package/lib/components/ui/resizable.d.ts +0 -8
  168. package/lib/components/ui/resizable.js +0 -19
  169. package/lib/components/ui/scroll-area.d.ts +0 -5
  170. package/lib/components/ui/scroll-area.js +0 -17
  171. package/lib/components/ui/select.d.ts +0 -15
  172. package/lib/components/ui/select.js +0 -42
  173. package/lib/components/ui/separator.d.ts +0 -4
  174. package/lib/components/ui/separator.js +0 -12
  175. package/lib/components/ui/sheet.d.ts +0 -13
  176. package/lib/components/ui/sheet.js +0 -44
  177. package/lib/components/ui/sidebar.d.ts +0 -69
  178. package/lib/components/ui/sidebar.js +0 -216
  179. package/lib/components/ui/skeleton.d.ts +0 -2
  180. package/lib/components/ui/skeleton.js +0 -10
  181. package/lib/components/ui/slider.d.ts +0 -4
  182. package/lib/components/ui/slider.js +0 -18
  183. package/lib/components/ui/sonner.d.ts +0 -3
  184. package/lib/components/ui/sonner.js +0 -25
  185. package/lib/components/ui/spinner.d.ts +0 -2
  186. package/lib/components/ui/spinner.js +0 -11
  187. package/lib/components/ui/switch.d.ts +0 -4
  188. package/lib/components/ui/switch.js +0 -12
  189. package/lib/components/ui/table.d.ts +0 -10
  190. package/lib/components/ui/table.js +0 -32
  191. package/lib/components/ui/tabs.d.ts +0 -7
  192. package/lib/components/ui/tabs.js +0 -21
  193. package/lib/components/ui/textarea.d.ts +0 -3
  194. package/lib/components/ui/textarea.js +0 -6
  195. package/lib/components/ui/toast.d.ts +0 -15
  196. package/lib/components/ui/toast.js +0 -38
  197. package/lib/components/ui/toaster.d.ts +0 -1
  198. package/lib/components/ui/toaster.js +0 -14
  199. package/lib/components/ui/toggle-group.d.ts +0 -9
  200. package/lib/components/ui/toggle-group.js +0 -26
  201. package/lib/components/ui/toggle.d.ts +0 -9
  202. package/lib/components/ui/toggle.js +0 -30
  203. package/lib/components/ui/tooltip.d.ts +0 -7
  204. package/lib/components/ui/tooltip.js +0 -21
  205. package/lib/components/vercel-ai-elements/artifact.d.ts +0 -23
  206. package/lib/components/vercel-ai-elements/artifact.js +0 -24
  207. package/lib/components/vercel-ai-elements/code-block.d.ts +0 -17
  208. package/lib/components/vercel-ai-elements/code-block.js +0 -94
  209. package/lib/components/vercel-ai-elements/conversation.d.ts +0 -15
  210. package/lib/components/vercel-ai-elements/conversation.js +0 -21
  211. package/lib/components/vercel-ai-elements/loader.d.ts +0 -5
  212. package/lib/components/vercel-ai-elements/loader.js +0 -8
  213. package/lib/components/vercel-ai-elements/message.d.ts +0 -46
  214. package/lib/components/vercel-ai-elements/message.js +0 -109
  215. package/lib/components/vercel-ai-elements/model-selector.d.ts +0 -35
  216. package/lib/components/vercel-ai-elements/model-selector.js +0 -22
  217. package/lib/components/vercel-ai-elements/prompt-input.d.ts +0 -195
  218. package/lib/components/vercel-ai-elements/prompt-input.js +0 -589
  219. package/lib/components/vercel-ai-elements/reasoning.d.ts +0 -26
  220. package/lib/components/vercel-ai-elements/reasoning.js +0 -80
  221. package/lib/components/vercel-ai-elements/shimmer.d.ts +0 -9
  222. package/lib/components/vercel-ai-elements/shimmer.js +0 -22
  223. package/lib/components/vercel-ai-elements/sources.d.ts +0 -12
  224. package/lib/components/vercel-ai-elements/sources.js +0 -13
  225. package/lib/components/vercel-ai-elements/suggestion.d.ts +0 -10
  226. package/lib/components/vercel-ai-elements/suggestion.js +0 -16
  227. package/lib/components/vercel-ai-elements/tool.d.ts +0 -23
  228. package/lib/components/vercel-ai-elements/tool.js +0 -52
  229. package/lib/examples/components/MainContent.d.ts +0 -19
  230. package/lib/examples/components/index.d.ts +0 -10
  231. package/lib/examples/components/index.js +0 -13
  232. package/lib/examples/vercel-ai-elements/VercelAiElementsShowcase.d.ts +0 -12
  233. package/lib/examples/vercel-ai-elements/VercelAiElementsShowcase.js +0 -69
  234. package/lib/examples/vercel-ai-elements/components/ArtifactShowcase.d.ts +0 -1
  235. package/lib/examples/vercel-ai-elements/components/ArtifactShowcase.js +0 -85
  236. package/lib/examples/vercel-ai-elements/components/CodeBlockShowcase.d.ts +0 -1
  237. package/lib/examples/vercel-ai-elements/components/CodeBlockShowcase.js +0 -62
  238. package/lib/examples/vercel-ai-elements/components/ConversationShowcase.d.ts +0 -1
  239. package/lib/examples/vercel-ai-elements/components/ConversationShowcase.js +0 -51
  240. package/lib/examples/vercel-ai-elements/components/LoaderShowcase.d.ts +0 -1
  241. package/lib/examples/vercel-ai-elements/components/LoaderShowcase.js +0 -9
  242. package/lib/examples/vercel-ai-elements/components/MessageShowcase.d.ts +0 -1
  243. package/lib/examples/vercel-ai-elements/components/MessageShowcase.js +0 -56
  244. package/lib/examples/vercel-ai-elements/components/ModelSelectorShowcase.d.ts +0 -1
  245. package/lib/examples/vercel-ai-elements/components/ModelSelectorShowcase.js +0 -50
  246. package/lib/examples/vercel-ai-elements/components/PromptInputShowcase.d.ts +0 -1
  247. package/lib/examples/vercel-ai-elements/components/PromptInputShowcase.js +0 -16
  248. package/lib/examples/vercel-ai-elements/components/ReasoningShowcase.d.ts +0 -1
  249. package/lib/examples/vercel-ai-elements/components/ReasoningShowcase.js +0 -72
  250. package/lib/examples/vercel-ai-elements/components/ShimmerShowcase.d.ts +0 -1
  251. package/lib/examples/vercel-ai-elements/components/ShimmerShowcase.js +0 -9
  252. package/lib/examples/vercel-ai-elements/components/SourcesShowcase.d.ts +0 -1
  253. package/lib/examples/vercel-ai-elements/components/SourcesShowcase.js +0 -43
  254. package/lib/examples/vercel-ai-elements/components/SuggestionShowcase.d.ts +0 -1
  255. package/lib/examples/vercel-ai-elements/components/SuggestionShowcase.js +0 -31
  256. package/lib/examples/vercel-ai-elements/components/ToolShowcase.d.ts +0 -1
  257. package/lib/examples/vercel-ai-elements/components/ToolShowcase.js +0 -54
  258. package/lib/examples/vercel-ai-elements/index.d.ts +0 -13
  259. package/lib/examples/vercel-ai-elements/index.js +0 -17
  260. package/lib/examples/vercel-ai-elements/main.d.ts +0 -1
  261. package/lib/examples/vercel-ai-elements/main.js +0 -9
  262. package/lib/examples/vercel-ai-elements/showcase.css +0 -128
  263. package/lib/hooks/useToast.d.ts +0 -44
  264. package/lib/hooks/useToast.js +0 -128
  265. package/patches/@datalayer+jupyter-lexical+1.0.8.patch +0 -11628
  266. package/patches/@datalayer+jupyter-react+2.0.2.patch +0 -5338
  267. package/style/showcase-vercel-ai.css +0 -137
  268. /package/lib/{examples/components → components}/FooterMetrics.js +0 -0
  269. /package/lib/{examples/components → components}/MockFileBrowser.js +0 -0
  270. /package/lib/{examples/components → components}/SessionTabs.js +0 -0
  271. /package/lib/{examples/components → components}/TimeTravel.js +0 -0
  272. /package/lib/{models → types}/AIAgent.d.ts +0 -0
  273. /package/lib/{models → types}/AIAgent.js +0 -0
  274. /package/lib/{models → types}/index.d.ts +0 -0
  275. /package/lib/{models → types}/index.js +0 -0
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- declare function Breadcrumb({ ...props }: React.ComponentProps<'nav'>): import("react/jsx-runtime").JSX.Element;
3
- declare function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>): import("react/jsx-runtime").JSX.Element;
4
- declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
5
- declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<'a'> & {
6
- asChild?: boolean;
7
- }): import("react/jsx-runtime").JSX.Element;
8
- declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
9
- declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
10
- declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
11
- export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -1,27 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Slot } from '@radix-ui/react-slot';
3
- import { ChevronRight, MoreHorizontal } from 'lucide-react';
4
- import { cn } from '@/lib/utils';
5
- function Breadcrumb({ ...props }) {
6
- return _jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
7
- }
8
- function BreadcrumbList({ className, ...props }) {
9
- return (_jsx("ol", { "data-slot": "breadcrumb-list", className: cn('text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5', className), ...props }));
10
- }
11
- function BreadcrumbItem({ className, ...props }) {
12
- return (_jsx("li", { "data-slot": "breadcrumb-item", className: cn('inline-flex items-center gap-1.5', className), ...props }));
13
- }
14
- function BreadcrumbLink({ asChild, className, ...props }) {
15
- const Comp = asChild ? Slot : 'a';
16
- return (_jsx(Comp, { "data-slot": "breadcrumb-link", className: cn('hover:text-foreground transition-colors', className), ...props }));
17
- }
18
- function BreadcrumbPage({ className, ...props }) {
19
- return (_jsx("span", { "data-slot": "breadcrumb-page", role: "link", "aria-disabled": "true", "aria-current": "page", className: cn('text-foreground font-normal', className), ...props }));
20
- }
21
- function BreadcrumbSeparator({ children, className, ...props }) {
22
- return (_jsx("li", { "data-slot": "breadcrumb-separator", role: "presentation", "aria-hidden": "true", className: cn('[&>svg]:size-3.5', className), ...props, children: children ?? _jsx(ChevronRight, {}) }));
23
- }
24
- function BreadcrumbEllipsis({ className, ...props }) {
25
- return (_jsxs("span", { "data-slot": "breadcrumb-ellipsis", role: "presentation", "aria-hidden": "true", className: cn('flex size-9 items-center justify-center', className), ...props, children: [_jsx(MoreHorizontal, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More" })] }));
26
- }
27
- export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -1,11 +0,0 @@
1
- import { type VariantProps } from 'class-variance-authority';
2
- import { Separator } from '@/components/ui/separator';
3
- declare const buttonGroupVariants: (props?: ({
4
- orientation?: "horizontal" | "vertical" | null | undefined;
5
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
- declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>): import("react/jsx-runtime").JSX.Element;
7
- declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<'div'> & {
8
- asChild?: boolean;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
11
- export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2025-2026 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
- import { Slot } from '@radix-ui/react-slot';
7
- import { cva } from 'class-variance-authority';
8
- import { cn } from '@/lib/utils';
9
- import { Separator } from '@/components/ui/separator';
10
- const buttonGroupVariants = cva("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2", {
11
- variants: {
12
- orientation: {
13
- horizontal: '[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none',
14
- vertical: 'flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none',
15
- },
16
- },
17
- defaultVariants: {
18
- orientation: 'horizontal',
19
- },
20
- });
21
- function ButtonGroup({ className, orientation, ...props }) {
22
- return (_jsx("div", { role: "group", "data-slot": "button-group", "data-orientation": orientation, className: cn(buttonGroupVariants({ orientation }), className), ...props }));
23
- }
24
- function ButtonGroupText({ className, asChild = false, ...props }) {
25
- const Comp = asChild ? Slot : 'div';
26
- return (_jsx(Comp, { className: cn("bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className), ...props }));
27
- }
28
- function ButtonGroupSeparator({ className, orientation = 'vertical', ...props }) {
29
- return (_jsx(Separator, { "data-slot": "button-group-separator", orientation: orientation, className: cn('bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto', className), ...props }));
30
- }
31
- export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
@@ -1,13 +0,0 @@
1
- import * as React from 'react';
2
- import { type VariantProps } from 'class-variance-authority';
3
- declare const buttonVariants: (props?: ({
4
- variant?: "link" | "default" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
5
- size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
6
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- declare const Button: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<(props?: ({
8
- variant?: "link" | "default" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
9
- size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
10
- } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
11
- asChild?: boolean;
12
- }, "ref"> & React.RefAttributes<HTMLButtonElement>>;
13
- export { Button, buttonVariants };
@@ -1,39 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2025-2026 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
- import * as React from 'react';
7
- import { Slot } from '@radix-ui/react-slot';
8
- import { cva } from 'class-variance-authority';
9
- import { cn } from '@/lib/utils';
10
- const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
11
- variants: {
12
- variant: {
13
- default: 'bg-primary text-primary-foreground hover:bg-primary/90',
14
- destructive: 'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
15
- outline: 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
16
- secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
17
- ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
18
- link: 'text-primary underline-offset-4 hover:underline',
19
- },
20
- size: {
21
- default: 'h-9 px-4 py-2 has-[>svg]:px-3',
22
- sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
23
- lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
24
- icon: 'size-9',
25
- 'icon-sm': 'size-8',
26
- 'icon-lg': 'size-10',
27
- },
28
- },
29
- defaultVariants: {
30
- variant: 'default',
31
- size: 'default',
32
- },
33
- });
34
- const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
35
- const Comp = asChild ? Slot : 'button';
36
- return (_jsx(Comp, { ref: ref, "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props }));
37
- });
38
- Button.displayName = 'Button';
39
- export { Button, buttonVariants };
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import { DayButton, DayPicker } from 'react-day-picker';
3
- import { Button } from '@/components/ui/button';
4
- declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
- buttonVariant?: React.ComponentProps<typeof Button>['variant'];
6
- }): import("react/jsx-runtime").JSX.Element;
7
- declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
8
- export { Calendar, CalendarDayButton };
@@ -1,80 +0,0 @@
1
- /*
2
- * Copyright (c) 2025-2026 Datalayer, Inc.
3
- * Distributed under the terms of the Modified BSD License.
4
- */
5
- 'use client';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import * as React from 'react';
8
- import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, } from 'lucide-react';
9
- import { DayPicker, getDefaultClassNames } from 'react-day-picker';
10
- import { cn } from '@/lib/utils';
11
- import { Button, buttonVariants } from '@/components/ui/button';
12
- function Calendar({ className, classNames, showOutsideDays = true, captionLayout = 'label', buttonVariant = 'ghost', formatters, components, ...props }) {
13
- const defaultClassNames = getDefaultClassNames();
14
- return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn('bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent', String.raw `rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw `rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className), captionLayout: captionLayout, formatters: {
15
- formatMonthDropdown: date => date.toLocaleString('default', { month: 'short' }),
16
- ...formatters,
17
- }, classNames: {
18
- root: cn('w-fit', defaultClassNames.root),
19
- months: cn('flex gap-4 flex-col md:flex-row relative', defaultClassNames.months),
20
- month: cn('flex flex-col w-full gap-4', defaultClassNames.month),
21
- nav: cn('flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between', defaultClassNames.nav),
22
- button_previous: cn(buttonVariants({ variant: buttonVariant }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_previous),
23
- button_next: cn(buttonVariants({ variant: buttonVariant }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_next),
24
- month_caption: cn('flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)', defaultClassNames.month_caption),
25
- dropdowns: cn('w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5', defaultClassNames.dropdowns),
26
- dropdown_root: cn('relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md', defaultClassNames.dropdown_root),
27
- dropdown: cn('absolute bg-popover inset-0 opacity-0', defaultClassNames.dropdown),
28
- caption_label: cn('select-none font-medium', captionLayout === 'label'
29
- ? 'text-sm'
30
- : 'rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5', defaultClassNames.caption_label),
31
- table: 'w-full border-collapse',
32
- weekdays: cn('flex', defaultClassNames.weekdays),
33
- weekday: cn('text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none', defaultClassNames.weekday),
34
- week: cn('flex w-full mt-2', defaultClassNames.week),
35
- week_number_header: cn('select-none w-(--cell-size)', defaultClassNames.week_number_header),
36
- week_number: cn('text-[0.8rem] select-none text-muted-foreground', defaultClassNames.week_number),
37
- day: cn('relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none', props.showWeekNumber
38
- ? '[&:nth-child(2)[data-selected=true]_button]:rounded-l-md'
39
- : '[&:first-child[data-selected=true]_button]:rounded-l-md', defaultClassNames.day),
40
- range_start: cn('rounded-l-md bg-accent', defaultClassNames.range_start),
41
- range_middle: cn('rounded-none', defaultClassNames.range_middle),
42
- range_end: cn('rounded-r-md bg-accent', defaultClassNames.range_end),
43
- today: cn('bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none', defaultClassNames.today),
44
- outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),
45
- disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),
46
- hidden: cn('invisible', defaultClassNames.hidden),
47
- ...classNames,
48
- }, components: {
49
- Root: ({ className, rootRef, ...props }) => {
50
- return (_jsx("div", { "data-slot": "calendar", ref: rootRef, className: cn(className), ...props }));
51
- },
52
- Chevron: ({ className, orientation, ...props }) => {
53
- if (orientation === 'left') {
54
- return (_jsx(ChevronLeftIcon, { className: cn('size-4', className), ...props }));
55
- }
56
- if (orientation === 'right') {
57
- return (_jsx(ChevronRightIcon, { className: cn('size-4', className), ...props }));
58
- }
59
- return (_jsx(ChevronDownIcon, { className: cn('size-4', className), ...props }));
60
- },
61
- DayButton: CalendarDayButton,
62
- WeekNumber: ({ children, ...props }) => {
63
- return (_jsx("td", { ...props, children: _jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: children }) }));
64
- },
65
- ...components,
66
- }, ...props }));
67
- }
68
- function CalendarDayButton({ className, day, modifiers, ...props }) {
69
- const defaultClassNames = getDefaultClassNames();
70
- const ref = React.useRef(null);
71
- React.useEffect(() => {
72
- if (modifiers.focused)
73
- ref.current?.focus();
74
- }, [modifiers.focused]);
75
- return (_jsx(Button, { ref: ref, variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
76
- !modifiers.range_start &&
77
- !modifiers.range_end &&
78
- !modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn('data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70', defaultClassNames.day, className), ...props }));
79
- }
80
- export { Calendar, CalendarDayButton };
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- declare function Card({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
3
- declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
4
- declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
5
- declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
6
- declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
7
- declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
8
- declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
9
- export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from '@/lib/utils';
3
- function Card({ className, ...props }) {
4
- return (_jsx("div", { "data-slot": "card", className: cn('bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm', className), ...props }));
5
- }
6
- function CardHeader({ className, ...props }) {
7
- return (_jsx("div", { "data-slot": "card-header", className: cn('@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6', className), ...props }));
8
- }
9
- function CardTitle({ className, ...props }) {
10
- return (_jsx("div", { "data-slot": "card-title", className: cn('leading-none font-semibold', className), ...props }));
11
- }
12
- function CardDescription({ className, ...props }) {
13
- return (_jsx("div", { "data-slot": "card-description", className: cn('text-muted-foreground text-sm', className), ...props }));
14
- }
15
- function CardAction({ className, ...props }) {
16
- return (_jsx("div", { "data-slot": "card-action", className: cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className), ...props }));
17
- }
18
- function CardContent({ className, ...props }) {
19
- return (_jsx("div", { "data-slot": "card-content", className: cn('px-6', className), ...props }));
20
- }
21
- function CardFooter({ className, ...props }) {
22
- return (_jsx("div", { "data-slot": "card-footer", className: cn('flex items-center px-6 [.border-t]:pt-6', className), ...props }));
23
- }
24
- export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';
3
- import { Button } from '@/components/ui/button';
4
- type CarouselApi = UseEmblaCarouselType[1];
5
- type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
6
- type CarouselOptions = UseCarouselParameters[0];
7
- type CarouselPlugin = UseCarouselParameters[1];
8
- type CarouselProps = {
9
- opts?: CarouselOptions;
10
- plugins?: CarouselPlugin;
11
- orientation?: 'horizontal' | 'vertical';
12
- setApi?: (api: CarouselApi) => void;
13
- };
14
- declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<'div'> & CarouselProps): import("react/jsx-runtime").JSX.Element;
15
- declare function CarouselContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
16
- declare function CarouselItem({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
17
- declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
18
- declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
19
- export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
@@ -1,95 +0,0 @@
1
- /*
2
- * Copyright (c) 2025-2026 Datalayer, Inc.
3
- * Distributed under the terms of the Modified BSD License.
4
- */
5
- 'use client';
6
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
- import * as React from 'react';
8
- import useEmblaCarousel from 'embla-carousel-react';
9
- import { ArrowLeft, ArrowRight } from 'lucide-react';
10
- import { cn } from '@/lib/utils';
11
- import { Button } from '@/components/ui/button';
12
- const CarouselContext = React.createContext(null);
13
- function useCarousel() {
14
- const context = React.useContext(CarouselContext);
15
- if (!context) {
16
- throw new Error('useCarousel must be used within a <Carousel />');
17
- }
18
- return context;
19
- }
20
- function Carousel({ orientation = 'horizontal', opts, setApi, plugins, className, children, ...props }) {
21
- const [carouselRef, api] = useEmblaCarousel({
22
- ...opts,
23
- axis: orientation === 'horizontal' ? 'x' : 'y',
24
- }, plugins);
25
- const [canScrollPrev, setCanScrollPrev] = React.useState(false);
26
- const [canScrollNext, setCanScrollNext] = React.useState(false);
27
- const onSelect = React.useCallback((api) => {
28
- if (!api)
29
- return;
30
- setCanScrollPrev(api.canScrollPrev());
31
- setCanScrollNext(api.canScrollNext());
32
- }, []);
33
- const scrollPrev = React.useCallback(() => {
34
- api?.scrollPrev();
35
- }, [api]);
36
- const scrollNext = React.useCallback(() => {
37
- api?.scrollNext();
38
- }, [api]);
39
- const handleKeyDown = React.useCallback((event) => {
40
- if (event.key === 'ArrowLeft') {
41
- event.preventDefault();
42
- scrollPrev();
43
- }
44
- else if (event.key === 'ArrowRight') {
45
- event.preventDefault();
46
- scrollNext();
47
- }
48
- }, [scrollPrev, scrollNext]);
49
- React.useEffect(() => {
50
- if (!api || !setApi)
51
- return;
52
- setApi(api);
53
- }, [api, setApi]);
54
- React.useEffect(() => {
55
- if (!api)
56
- return;
57
- onSelect(api);
58
- api.on('reInit', onSelect);
59
- api.on('select', onSelect);
60
- return () => {
61
- api?.off('select', onSelect);
62
- };
63
- }, [api, onSelect]);
64
- return (_jsx(CarouselContext.Provider, { value: {
65
- carouselRef,
66
- api: api,
67
- opts,
68
- orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),
69
- scrollPrev,
70
- scrollNext,
71
- canScrollPrev,
72
- canScrollNext,
73
- }, children: _jsx("div", { onKeyDownCapture: handleKeyDown, className: cn('relative', className), role: "region", "aria-roledescription": "carousel", "data-slot": "carousel", ...props, children: children }) }));
74
- }
75
- function CarouselContent({ className, ...props }) {
76
- const { carouselRef, orientation } = useCarousel();
77
- return (_jsx("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-content", children: _jsx("div", { className: cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className), ...props }) }));
78
- }
79
- function CarouselItem({ className, ...props }) {
80
- const { orientation } = useCarousel();
81
- return (_jsx("div", { role: "group", "aria-roledescription": "slide", "data-slot": "carousel-item", className: cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className), ...props }));
82
- }
83
- function CarouselPrevious({ className, variant = 'outline', size = 'icon', ...props }) {
84
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
85
- return (_jsxs(Button, { "data-slot": "carousel-previous", variant: variant, size: size, className: cn('absolute size-8 rounded-full', orientation === 'horizontal'
86
- ? 'top-1/2 -left-12 -translate-y-1/2'
87
- : '-top-12 left-1/2 -translate-x-1/2 rotate-90', className), disabled: !canScrollPrev, onClick: scrollPrev, ...props, children: [_jsx(ArrowLeft, {}), _jsx("span", { className: "sr-only", children: "Previous slide" })] }));
88
- }
89
- function CarouselNext({ className, variant = 'outline', size = 'icon', ...props }) {
90
- const { orientation, scrollNext, canScrollNext } = useCarousel();
91
- return (_jsxs(Button, { "data-slot": "carousel-next", variant: variant, size: size, className: cn('absolute size-8 rounded-full', orientation === 'horizontal'
92
- ? 'top-1/2 -right-12 -translate-y-1/2'
93
- : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90', className), disabled: !canScrollNext, onClick: scrollNext, ...props, children: [_jsx(ArrowRight, {}), _jsx("span", { className: "sr-only", children: "Next slide" })] }));
94
- }
95
- export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
@@ -1,53 +0,0 @@
1
- import * as React from 'react';
2
- import * as RechartsPrimitive from 'recharts';
3
- declare const THEMES: {
4
- readonly light: "";
5
- readonly dark: ".dark";
6
- };
7
- export type ChartConfig = {
8
- [k in string]: {
9
- label?: React.ReactNode;
10
- icon?: React.ComponentType;
11
- } & ({
12
- color?: string;
13
- theme?: never;
14
- } | {
15
- color?: never;
16
- theme: Record<keyof typeof THEMES, string>;
17
- });
18
- };
19
- declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<'div'> & {
20
- config: ChartConfig;
21
- children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
22
- }): import("react/jsx-runtime").JSX.Element;
23
- declare const ChartStyle: ({ id, config }: {
24
- id: string;
25
- config: ChartConfig;
26
- }) => import("react/jsx-runtime").JSX.Element | null;
27
- declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
28
- type ChartTooltipContentProps = {
29
- active?: boolean;
30
- payload?: any[];
31
- label?: any;
32
- className?: string;
33
- indicator?: 'line' | 'dot' | 'dashed';
34
- hideLabel?: boolean;
35
- hideIndicator?: boolean;
36
- labelFormatter?: (value: any, payload: any[]) => string;
37
- labelClassName?: string;
38
- formatter?: (value: any, name: string, item: any, index: number) => React.ReactNode;
39
- color?: string;
40
- nameKey?: string;
41
- labelKey?: string;
42
- };
43
- declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: ChartTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
44
- declare const ChartLegend: typeof RechartsPrimitive.Legend;
45
- type ChartLegendContentProps = {
46
- className?: string;
47
- hideIcon?: boolean;
48
- payload?: any[];
49
- verticalAlign?: 'top' | 'bottom';
50
- nameKey?: string;
51
- } & React.ComponentProps<'div'>;
52
- declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null;
53
- export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
@@ -1,136 +0,0 @@
1
- /*
2
- * Copyright (c) 2025-2026 Datalayer, Inc.
3
- * Distributed under the terms of the Modified BSD License.
4
- */
5
- 'use client';
6
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
7
- import * as React from 'react';
8
- import * as RechartsPrimitive from 'recharts';
9
- import { cn } from '@/lib/utils';
10
- // Format: { THEME_NAME: CSS_SELECTOR }
11
- const THEMES = { light: '', dark: '.dark' };
12
- const ChartContext = React.createContext(null);
13
- function useChart() {
14
- const context = React.useContext(ChartContext);
15
- if (!context) {
16
- throw new Error('useChart must be used within a <ChartContainer />');
17
- }
18
- return context;
19
- }
20
- function ChartContainer({ id, className, children, config, ...props }) {
21
- const uniqueId = React.useId();
22
- const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;
23
- return (_jsx(ChartContext.Provider, { value: { config }, children: _jsxs("div", { "data-slot": "chart", "data-chart": chartId, className: cn("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className), ...props, children: [_jsx(ChartStyle, { id: chartId, config: config }), _jsx(RechartsPrimitive.ResponsiveContainer, { children: children })] }) }));
24
- }
25
- const ChartStyle = ({ id, config }) => {
26
- const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);
27
- if (!colorConfig.length) {
28
- return null;
29
- }
30
- return (_jsx("style", { dangerouslySetInnerHTML: {
31
- __html: Object.entries(THEMES)
32
- .map(([theme, prefix]) => `
33
- ${prefix} [data-chart=${id}] {
34
- ${colorConfig
35
- .map(([key, itemConfig]) => {
36
- const color = itemConfig.theme?.[theme] ||
37
- itemConfig.color;
38
- return color ? ` --color-${key}: ${color};` : null;
39
- })
40
- .join('\n')}
41
- }
42
- `)
43
- .join('\n'),
44
- } }));
45
- };
46
- const ChartTooltip = RechartsPrimitive.Tooltip;
47
- function ChartTooltipContent({ active, payload, className, indicator = 'dot', hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }) {
48
- const { config } = useChart();
49
- const tooltipLabel = React.useMemo(() => {
50
- if (hideLabel || !payload?.length) {
51
- return null;
52
- }
53
- const [item] = payload;
54
- const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;
55
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
56
- const value = !labelKey && typeof label === 'string'
57
- ? config[label]?.label || label
58
- : itemConfig?.label;
59
- if (labelFormatter) {
60
- return (_jsx("div", { className: cn('font-medium', labelClassName), children: labelFormatter(value, payload) }));
61
- }
62
- if (!value) {
63
- return null;
64
- }
65
- return _jsx("div", { className: cn('font-medium', labelClassName), children: value });
66
- }, [
67
- label,
68
- labelFormatter,
69
- payload,
70
- hideLabel,
71
- labelClassName,
72
- config,
73
- labelKey,
74
- ]);
75
- if (!active || !payload?.length) {
76
- return null;
77
- }
78
- const nestLabel = payload.length === 1 && indicator !== 'dot';
79
- return (_jsxs("div", { className: cn('border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl', className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload
80
- .filter(item => item.type !== 'none')
81
- .map((item, index) => {
82
- const key = `${nameKey || item.name || item.dataKey || 'value'}`;
83
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
84
- const indicatorColor = color || item.payload.fill || item.color;
85
- return (_jsx("div", { className: cn('[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5', indicator === 'dot' && 'items-center'), children: formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index)) : (_jsxs(_Fragment, { children: [itemConfig?.icon ? (_jsx(itemConfig.icon, {})) : (!hideIndicator && (_jsx("div", { className: cn('shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)', {
86
- 'h-2.5 w-2.5': indicator === 'dot',
87
- 'w-1': indicator === 'line',
88
- 'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',
89
- 'my-0.5': nestLabel && indicator === 'dashed',
90
- }), style: {
91
- '--color-bg': indicatorColor,
92
- '--color-border': indicatorColor,
93
- } }))), _jsxs("div", { className: cn('flex flex-1 justify-between leading-none', nestLabel ? 'items-end' : 'items-center'), children: [_jsxs("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, _jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })] }), item.value && (_jsx("span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() }))] })] })) }, item.dataKey));
94
- }) })] }));
95
- }
96
- const ChartLegend = RechartsPrimitive.Legend;
97
- function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = 'bottom', nameKey, }) {
98
- const { config } = useChart();
99
- if (!payload?.length) {
100
- return null;
101
- }
102
- return (_jsx("div", { className: cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className), children: payload
103
- .filter(item => item.type !== 'none')
104
- .map(item => {
105
- const key = `${nameKey || item.dataKey || 'value'}`;
106
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
107
- return (_jsxs("div", { className: cn('[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3'), children: [itemConfig?.icon && !hideIcon ? (_jsx(itemConfig.icon, {})) : (_jsx("div", { className: "h-2 w-2 shrink-0 rounded-[2px]", style: {
108
- backgroundColor: item.color,
109
- } })), itemConfig?.label] }, item.value));
110
- }) }));
111
- }
112
- // Helper to extract item config from a payload.
113
- function getPayloadConfigFromPayload(config, payload, key) {
114
- if (typeof payload !== 'object' || payload === null) {
115
- return undefined;
116
- }
117
- const payloadPayload = 'payload' in payload &&
118
- typeof payload.payload === 'object' &&
119
- payload.payload !== null
120
- ? payload.payload
121
- : undefined;
122
- let configLabelKey = key;
123
- if (key in payload &&
124
- typeof payload[key] === 'string') {
125
- configLabelKey = payload[key];
126
- }
127
- else if (payloadPayload &&
128
- key in payloadPayload &&
129
- typeof payloadPayload[key] === 'string') {
130
- configLabelKey = payloadPayload[key];
131
- }
132
- return configLabelKey in config
133
- ? config[configLabelKey]
134
- : config[key];
135
- }
136
- export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
- declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- export { Checkbox };
@@ -1,13 +0,0 @@
1
- /*
2
- * Copyright (c) 2025-2026 Datalayer, Inc.
3
- * Distributed under the terms of the Modified BSD License.
4
- */
5
- 'use client';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
8
- import { CheckIcon } from 'lucide-react';
9
- import { cn } from '@/lib/utils';
10
- function Checkbox({ className, ...props }) {
11
- return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn('peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50', className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none", children: _jsx(CheckIcon, { className: "size-3.5" }) }) }));
12
- }
13
- export { Checkbox };
@@ -1,5 +0,0 @@
1
- import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
2
- declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
- declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
4
- declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
5
- export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -1,17 +0,0 @@
1
- /*
2
- * Copyright (c) 2025-2026 Datalayer, Inc.
3
- * Distributed under the terms of the Modified BSD License.
4
- */
5
- 'use client';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
8
- function Collapsible({ ...props }) {
9
- return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
10
- }
11
- function CollapsibleTrigger({ ...props }) {
12
- return (_jsx(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props }));
13
- }
14
- function CollapsibleContent({ ...props }) {
15
- return (_jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props }));
16
- }
17
- export { Collapsible, CollapsibleTrigger, CollapsibleContent };