@motiadev/workbench 0.3.1-beta.87 → 0.3.1-beta.88-041205

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 (219) hide show
  1. package/dist/index.d.ts +3 -4
  2. package/dist/index.html +3 -2
  3. package/dist/index.js +2 -3
  4. package/dist/public/icon.png +0 -0
  5. package/dist/public/motia-dark.png +0 -0
  6. package/dist/public/motia-light.png +0 -0
  7. package/dist/src/App.d.ts +2 -0
  8. package/dist/src/App.js +19 -0
  9. package/dist/src/components/endpoints/endpoint-badge.d.ts +1 -1
  10. package/dist/src/components/endpoints/endpoint-badge.js +8 -8
  11. package/dist/src/components/endpoints/endpoint-call.d.ts +3 -3
  12. package/dist/src/components/endpoints/endpoint-call.js +28 -23
  13. package/dist/src/components/endpoints/endpoint-response-schema.d.ts +10 -0
  14. package/dist/src/components/endpoints/endpoint-response-schema.js +17 -0
  15. package/dist/src/components/endpoints/endpoint-response.d.ts +8 -0
  16. package/dist/src/components/endpoints/endpoint-response.js +39 -0
  17. package/dist/src/components/endpoints/endpoints-page.js +14 -0
  18. package/dist/src/components/endpoints/hooks/use-get-endpoints.d.ts +1 -15
  19. package/dist/src/components/endpoints/json-editor.d.ts +9 -0
  20. package/dist/src/components/endpoints/json-editor.js +31 -0
  21. package/dist/src/components/flow/flow-page.d.ts +1 -0
  22. package/dist/src/components/flow/flow-page.js +20 -0
  23. package/dist/src/components/flow/flow-tab-menu-item.d.ts +1 -0
  24. package/dist/src/components/flow/flow-tab-menu-item.js +15 -0
  25. package/dist/src/{views → components}/flow/flow-view.d.ts +1 -2
  26. package/dist/src/components/flow/flow-view.js +21 -0
  27. package/dist/src/components/flow/hooks/use-get-flow-state.d.ts +10 -0
  28. package/dist/src/{views → components}/flow/hooks/use-get-flow-state.js +17 -10
  29. package/dist/src/{views → components}/flow/hooks/use-organize-nodes.d.ts +1 -1
  30. package/dist/src/{views → components}/flow/hooks/use-save-workflow-config.d.ts +1 -1
  31. package/dist/src/components/flow/nodes/api-flow-node.d.ts +2 -0
  32. package/dist/src/{views → components}/flow/nodes/api-flow-node.js +1 -1
  33. package/dist/src/components/flow/nodes/cron-flow-node.d.ts +2 -0
  34. package/dist/src/components/flow/nodes/cron-flow-node.js +5 -0
  35. package/dist/src/{views → components}/flow/nodes/event-flow-node.d.ts +1 -1
  36. package/dist/src/components/flow/nodes/event-flow-node.js +5 -0
  37. package/dist/src/components/flow/nodes/noop-flow-node.d.ts +2 -0
  38. package/dist/src/{views → components}/flow/nodes/noop-flow-node.js +1 -1
  39. package/dist/src/components/header/header.js +3 -11
  40. package/dist/src/components/logs/log-detail.d.ts +3 -1
  41. package/dist/src/components/logs/log-detail.js +33 -11
  42. package/dist/src/components/logs/log-level-badge.js +6 -6
  43. package/dist/src/components/logs/log-level-dot.js +7 -7
  44. package/dist/src/components/logs/logs-page.js +26 -0
  45. package/dist/src/components/observability/events/code/function-call.js +1 -1
  46. package/dist/src/components/observability/events/trace-event.d.ts +1 -1
  47. package/dist/src/components/observability/events/trace-log-event.d.ts +1 -1
  48. package/dist/src/components/observability/events/trace-log-event.js +2 -2
  49. package/dist/src/components/observability/hooks/use-get-endtime.d.ts +1 -1
  50. package/dist/src/components/observability/trace-item/trace-item-detail.d.ts +1 -0
  51. package/dist/src/components/observability/trace-item/trace-item-detail.js +5 -4
  52. package/dist/src/components/observability/trace-item/trace-item.d.ts +1 -0
  53. package/dist/src/components/observability/trace-item/trace-item.js +11 -17
  54. package/dist/src/components/observability/trace-status.d.ts +6 -10
  55. package/dist/src/components/observability/trace-status.js +7 -32
  56. package/dist/src/components/observability/trace-timeline.js +16 -4
  57. package/dist/src/components/observability/traces-groups.d.ts +2 -2
  58. package/dist/src/components/observability/traces-groups.js +4 -4
  59. package/dist/src/components/observability/traces-page.js +12 -0
  60. package/dist/src/components/sidebar/sidebar.d.ts +8 -0
  61. package/dist/src/components/sidebar/sidebar.js +39 -0
  62. package/dist/src/components/states/hooks/states-hooks.d.ts +7 -3
  63. package/dist/src/components/states/hooks/states-hooks.js +5 -33
  64. package/dist/src/components/states/state-detail.d.ts +2 -1
  65. package/dist/src/components/states/state-detail.js +15 -9
  66. package/dist/src/components/states/state-value.js +7 -7
  67. package/dist/src/components/states/states-page.js +18 -0
  68. package/dist/src/components/ui/badge.d.ts +1 -1
  69. package/dist/src/components/ui/table.js +1 -1
  70. package/dist/src/components/ui/theme-toggle.js +4 -3
  71. package/dist/src/hooks/use-fetch-flows.d.ts +1 -5
  72. package/dist/src/hooks/use-fetch-flows.js +18 -13
  73. package/dist/src/hooks/use-log-listener.js +2 -2
  74. package/dist/src/hooks/use-update-handle-positions.d.ts +10 -0
  75. package/dist/src/hooks/use-update-handle-positions.js +35 -0
  76. package/dist/src/index.css +36 -176
  77. package/dist/src/lib/utils.d.ts +1 -0
  78. package/dist/src/lib/utils.js +4 -0
  79. package/dist/src/main.d.ts +1 -0
  80. package/dist/src/main.js +4 -11
  81. package/dist/src/publicComponents/api-node.js +2 -4
  82. package/dist/src/publicComponents/{base-handle.d.ts → base-node/base-handle.d.ts} +1 -0
  83. package/dist/src/publicComponents/base-node/base-handle.js +8 -0
  84. package/dist/src/publicComponents/base-node/base-node.d.ts +21 -0
  85. package/dist/src/publicComponents/base-node/base-node.js +13 -0
  86. package/dist/src/publicComponents/{emits.d.ts → base-node/emits.d.ts} +1 -1
  87. package/dist/src/publicComponents/base-node/emits.js +5 -0
  88. package/dist/src/{views/flow/nodes → publicComponents/base-node}/language-indicator.d.ts +1 -1
  89. package/dist/src/{views/flow/nodes → publicComponents/base-node}/language-indicator.js +8 -7
  90. package/dist/src/publicComponents/base-node/node-header.d.ts +12 -0
  91. package/dist/src/publicComponents/base-node/node-header.js +30 -0
  92. package/dist/src/publicComponents/base-node/node-sidebar.d.ts +18 -0
  93. package/dist/src/publicComponents/base-node/node-sidebar.js +20 -0
  94. package/dist/src/publicComponents/base-node/subscribe.js +4 -0
  95. package/dist/src/publicComponents/cron-node.d.ts +2 -1
  96. package/dist/src/publicComponents/cron-node.js +3 -4
  97. package/dist/src/publicComponents/event-node.d.ts +1 -5
  98. package/dist/src/publicComponents/event-node.js +4 -6
  99. package/dist/src/publicComponents/node-details.js +21 -12
  100. package/dist/src/publicComponents/node-props.d.ts +13 -6
  101. package/dist/src/publicComponents/noop-node.d.ts +3 -7
  102. package/dist/src/publicComponents/noop-node.js +3 -3
  103. package/dist/src/stores/use-flow-store.d.ts +18 -0
  104. package/dist/src/stores/use-flow-store.js +15 -0
  105. package/dist/src/stores/use-global-store.d.ts +24 -0
  106. package/dist/src/stores/use-global-store.js +20 -0
  107. package/dist/src/stores/{use-logs.d.ts → use-logs-store.d.ts} +1 -3
  108. package/dist/src/stores/use-logs-store.js +10 -0
  109. package/dist/src/stores/use-tabs-store.d.ts +17 -0
  110. package/dist/src/stores/use-tabs-store.js +13 -0
  111. package/dist/src/stores/use-theme-store.d.ts +17 -0
  112. package/dist/src/stores/use-theme-store.js +26 -0
  113. package/dist/src/types/endpoint.d.ts +14 -0
  114. package/dist/src/{views/flow/nodes/nodes.types.d.ts → types/flow.d.ts} +45 -0
  115. package/dist/src/types/flow.js +1 -0
  116. package/dist/tsconfig.app.tsbuildinfo +1 -1
  117. package/package.json +13 -12
  118. package/dist/public/.empty +0 -0
  119. package/dist/src/components/app-sidebar.d.ts +0 -1
  120. package/dist/src/components/app-sidebar.js +0 -12
  121. package/dist/src/components/endpoints/endpoints.d.ts +0 -1
  122. package/dist/src/components/endpoints/endpoints.js +0 -34
  123. package/dist/src/components/endpoints/selected-endpoint.d.ts +0 -7
  124. package/dist/src/components/endpoints/selected-endpoint.js +0 -7
  125. package/dist/src/components/logs/log-console.d.ts +0 -1
  126. package/dist/src/components/logs/log-console.js +0 -69
  127. package/dist/src/components/logs/log-field.d.ts +0 -7
  128. package/dist/src/components/logs/log-field.js +0 -20
  129. package/dist/src/components/logs/logs.d.ts +0 -1
  130. package/dist/src/components/logs/logs.js +0 -18
  131. package/dist/src/components/observability/observability-stats.d.ts +0 -5
  132. package/dist/src/components/observability/observability-stats.js +0 -17
  133. package/dist/src/components/states/states.d.ts +0 -1
  134. package/dist/src/components/states/states.js +0 -21
  135. package/dist/src/components/ui/BadgeCount.d.ts +0 -7
  136. package/dist/src/components/ui/BadgeCount.js +0 -13
  137. package/dist/src/components/ui/button.d.ts +0 -11
  138. package/dist/src/components/ui/button.js +0 -33
  139. package/dist/src/components/ui/card.d.ts +0 -8
  140. package/dist/src/components/ui/card.js +0 -16
  141. package/dist/src/components/ui/collapsible.d.ts +0 -5
  142. package/dist/src/components/ui/collapsible.js +0 -5
  143. package/dist/src/components/ui/dialog.d.ts +0 -19
  144. package/dist/src/components/ui/dialog.js +0 -22
  145. package/dist/src/components/ui/dropdown-menu.d.ts +0 -25
  146. package/dist/src/components/ui/dropdown-menu.js +0 -50
  147. package/dist/src/components/ui/input.d.ts +0 -3
  148. package/dist/src/components/ui/input.js +0 -8
  149. package/dist/src/components/ui/logo-icon.d.ts +0 -5
  150. package/dist/src/components/ui/logo-icon.js +0 -5
  151. package/dist/src/components/ui/navigation-menu.d.ts +0 -13
  152. package/dist/src/components/ui/navigation-menu.js +0 -30
  153. package/dist/src/components/ui/scroll-area.d.ts +0 -5
  154. package/dist/src/components/ui/scroll-area.js +0 -9
  155. package/dist/src/components/ui/select.d.ts +0 -13
  156. package/dist/src/components/ui/select.js +0 -25
  157. package/dist/src/components/ui/separator.d.ts +0 -4
  158. package/dist/src/components/ui/separator.js +0 -8
  159. package/dist/src/components/ui/sheet.d.ts +0 -25
  160. package/dist/src/components/ui/sheet.js +0 -36
  161. package/dist/src/components/ui/sidebar.d.ts +0 -12
  162. package/dist/src/components/ui/sidebar.js +0 -25
  163. package/dist/src/components/ui/skeleton.d.ts +0 -3
  164. package/dist/src/components/ui/skeleton.js +0 -6
  165. package/dist/src/components/ui/switch.d.ts +0 -4
  166. package/dist/src/components/ui/switch.js +0 -7
  167. package/dist/src/components/ui/tabs.d.ts +0 -7
  168. package/dist/src/components/ui/tabs.js +0 -12
  169. package/dist/src/components/ui/textarea.d.ts +0 -3
  170. package/dist/src/components/ui/textarea.js +0 -8
  171. package/dist/src/components/ui/tooltip.d.ts +0 -7
  172. package/dist/src/components/ui/tooltip.js +0 -11
  173. package/dist/src/hooks/use-list-flows.d.ts +0 -9
  174. package/dist/src/hooks/use-list-flows.js +0 -8
  175. package/dist/src/hooks/use-theme.d.ts +0 -6
  176. package/dist/src/hooks/use-theme.js +0 -28
  177. package/dist/src/publicComponents/base-handle.js +0 -10
  178. package/dist/src/publicComponents/base-node.d.ts +0 -16
  179. package/dist/src/publicComponents/base-node.js +0 -25
  180. package/dist/src/publicComponents/colorMap.d.ts +0 -6
  181. package/dist/src/publicComponents/colorMap.js +0 -6
  182. package/dist/src/publicComponents/components/header-bar.d.ts +0 -11
  183. package/dist/src/publicComponents/components/header-bar.js +0 -15
  184. package/dist/src/publicComponents/emits.js +0 -6
  185. package/dist/src/publicComponents/subscribe.js +0 -5
  186. package/dist/src/route-wrapper.d.ts +0 -2
  187. package/dist/src/route-wrapper.js +0 -5
  188. package/dist/src/routes/endpoints-page.js +0 -5
  189. package/dist/src/routes/flow.d.ts +0 -1
  190. package/dist/src/routes/flow.js +0 -11
  191. package/dist/src/routes/index.d.ts +0 -1
  192. package/dist/src/routes/index.js +0 -5
  193. package/dist/src/routes/logs-page.js +0 -12
  194. package/dist/src/routes/states-page.js +0 -5
  195. package/dist/src/routes/traces-page.js +0 -14
  196. package/dist/src/stores/use-logs.js +0 -52
  197. package/dist/src/views/flow/arrow-head.d.ts +0 -8
  198. package/dist/src/views/flow/arrow-head.js +0 -6
  199. package/dist/src/views/flow/flow-view.js +0 -48
  200. package/dist/src/views/flow/hooks/use-get-flow-state.d.ts +0 -52
  201. package/dist/src/views/flow/legend.d.ts +0 -4
  202. package/dist/src/views/flow/legend.js +0 -51
  203. package/dist/src/views/flow/nodes/api-flow-node.d.ts +0 -4
  204. package/dist/src/views/flow/nodes/event-flow-node.js +0 -5
  205. package/dist/src/views/flow/nodes/noop-flow-node.d.ts +0 -4
  206. /package/dist/src/{routes → components/endpoints}/endpoints-page.d.ts +0 -0
  207. /package/dist/src/{views → components}/flow/base-edge.d.ts +0 -0
  208. /package/dist/src/{views → components}/flow/base-edge.js +0 -0
  209. /package/dist/src/{views → components}/flow/flow-loader.d.ts +0 -0
  210. /package/dist/src/{views → components}/flow/flow-loader.js +0 -0
  211. /package/dist/src/{views → components}/flow/hooks/use-organize-nodes.js +0 -0
  212. /package/dist/src/{views → components}/flow/hooks/use-save-workflow-config.js +0 -0
  213. /package/dist/src/{views → components}/flow/node-organizer.d.ts +0 -0
  214. /package/dist/src/{views → components}/flow/node-organizer.js +0 -0
  215. /package/dist/src/{routes → components/logs}/logs-page.d.ts +0 -0
  216. /package/dist/src/{routes → components/observability}/traces-page.d.ts +0 -0
  217. /package/dist/src/{routes → components/states}/states-page.d.ts +0 -0
  218. /package/dist/src/publicComponents/{subscribe.d.ts → base-node/subscribe.d.ts} +0 -0
  219. /package/dist/src/{views/flow/nodes/nodes.types.js → types/endpoint.js} +0 -0
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@motiadev/workbench",
3
3
  "description": "A web-based interface for building and managing Motia workflows.",
4
- "version": "0.3.1-beta.87",
4
+ "version": "0.3.1-beta.88-041205",
5
5
  "main": "dist/index.js",
6
6
  "dependencies": {
7
+ "@monaco-editor/react": "^4.6.1",
7
8
  "@radix-ui/react-collapsible": "^1.1.10",
8
9
  "@radix-ui/react-dialog": "^1.1.13",
9
10
  "@radix-ui/react-dropdown-menu": "^2.1.15",
@@ -16,30 +17,31 @@
16
17
  "@radix-ui/react-switch": "^1.2.4",
17
18
  "@radix-ui/react-tabs": "^1.1.12",
18
19
  "@radix-ui/react-tooltip": "^1.2.6",
19
- "@tailwindcss/postcss": "^4.1.7",
20
- "@vitejs/plugin-react": "^4.4.1",
21
20
  "@xyflow/react": "^12.6.4",
22
- "autoprefixer": "^10.4.21",
23
- "class-variance-authority": "^0.7.1",
24
- "clsx": "^2.1.1",
25
21
  "dagre": "^0.8.5",
26
- "fast-deep-equal": "^3.1.3",
27
22
  "date-fns": "^4.1.0",
23
+ "fast-deep-equal": "^3.1.3",
28
24
  "json-schema": "^0.4.0",
29
25
  "lucide-react": "^0.510.0",
26
+ "react-use-resizable": "^0.2.0",
27
+ "react18-json-view": "^0.2.9",
28
+ "zustand": "^5.0.6",
29
+ "@tailwindcss/postcss": "^4.1.7",
30
+ "@vitejs/plugin-react": "^4.4.1",
31
+ "autoprefixer": "^10.4.21",
32
+ "class-variance-authority": "^0.7.1",
33
+ "clsx": "^2.1.1",
30
34
  "postcss": "^8.5.3",
31
35
  "react": "^19.1.0",
32
36
  "react-dom": "^19.1.0",
33
- "react-router": "^7.6.0",
34
- "recharts": "^2.15.3",
35
37
  "tailwind-merge": "^3.3.0",
36
38
  "tailwindcss": "^4.1.7",
37
39
  "tw-animate-css": "^1.2.9",
38
40
  "typescript": "~5.8.3",
39
41
  "typescript-eslint": "^8.32.1",
40
42
  "vite": "^6.3.5",
41
- "zod": "^3.24.4",
42
- "@motiadev/stream-client-react": "0.3.1-beta.87"
43
+ "@motiadev/ui": "0.3.1-beta.88-041205",
44
+ "@motiadev/stream-client-react": "0.3.1-beta.88-041205"
43
45
  },
44
46
  "devDependencies": {
45
47
  "@testing-library/jest-dom": "^6.6.3",
@@ -61,7 +63,6 @@
61
63
  "lint:ts": "eslint",
62
64
  "lint:tsx": "eslint --config ../../eslint.config.tsx.js",
63
65
  "build": "rm -rf dist && tsc --build && sh post-build.sh",
64
- "test": "jest",
65
66
  "test:watch": "jest --watch"
66
67
  }
67
68
  }
File without changes
@@ -1 +0,0 @@
1
- export declare const AppSidebar: () => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useListFlows } from '@/hooks/use-list-flows';
3
- import { File, Link2, Logs, Workflow, GanttChartIcon } from 'lucide-react';
4
- import { Link, useLocation } from 'react-router';
5
- import { Sidebar, SidebarButton, SidebarGroup } from './ui/sidebar';
6
- import { BadgeCount } from './ui/BadgeCount';
7
- export const AppSidebar = () => {
8
- const { flows } = useListFlows();
9
- const { pathname } = useLocation();
10
- const isActive = (flowId) => pathname.includes(`/flow/${flowId}`);
11
- return (_jsxs(Sidebar, { children: [_jsxs(SidebarGroup, { testId: "motia-title", title: "Motia", children: [_jsx(Link, { "data-testid": "logs-link", to: "/logs", children: _jsxs(SidebarButton, { isActive: pathname === '/logs', icon: _jsx(Logs, { className: "w-4 h-4" }), children: ["Logs", pathname !== '/logs' && _jsx(BadgeCount, {})] }) }), _jsx(Link, { "data-testid": "traces-link", to: "/traces", children: _jsx(SidebarButton, { isActive: pathname === '/traces', icon: _jsx(GanttChartIcon, { className: "w-4 h-4" }), children: "Traces" }) }), _jsx(Link, { "data-testid": "states-link", to: "/states", children: _jsx(SidebarButton, { isActive: pathname === '/states', icon: _jsx(File, { className: "w-4 h-4" }), children: "States" }) }), _jsx(Link, { "data-testid": "endpoints-link", to: "/endpoints", children: _jsx(SidebarButton, { isActive: pathname === '/endpoints', icon: _jsx(Link2, { className: "w-4 h-4" }), children: "Endpoints" }) })] }), _jsx(SidebarGroup, { testId: "flows-title", title: "Flows", children: flows.map((flow) => (_jsx(Link, { "data-testid": `flow-${flow.name}-link`, to: `/flow/${flow.id}`, children: _jsx(SidebarButton, { isActive: isActive(flow.id), icon: _jsx(Workflow, { className: "w-4 h-4" }), children: flow.name }) }, flow.id))) })] }));
12
- };
@@ -1 +0,0 @@
1
- export declare const Endpoints: () => import("react/jsx-runtime").JSX.Element;
@@ -1,34 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cva } from 'class-variance-authority';
3
- import { useEffect, useState } from 'react';
4
- import { EndpointBadge } from './endpoint-badge';
5
- import { EndpointCall } from './endpoint-call';
6
- import { useGetEndpoints } from './hooks/use-get-endpoints';
7
- import { SelectedEndpoint } from './selected-endpoint';
8
- const endpointVariants = cva('flex flex-col gap-2 font-mono p-2 rounded-lg cursor-pointer', {
9
- variants: {
10
- method: {
11
- GET: 'bg-lime-500/20',
12
- POST: 'bg-blue-500/20',
13
- PUT: 'bg-yellow-500/20',
14
- DELETE: 'bg-red-500/20',
15
- PATCH: 'bg-yellow-500/20',
16
- HEAD: 'bg-blue-500/20',
17
- OPTIONS: 'bg-purple-500/20',
18
- },
19
- },
20
- defaultVariants: { method: 'GET' },
21
- });
22
- export const Endpoints = () => {
23
- const endpoints = useGetEndpoints();
24
- const [selectedEndpoint, setSelectedEndpoint] = useState(null);
25
- useEffect(() => {
26
- setSelectedEndpoint((selected) => {
27
- if (!selected)
28
- return null;
29
- const endpoint = endpoints.find((endpoint) => endpoint.method === selected.method && endpoint.path === selected.path);
30
- return endpoint ?? null;
31
- });
32
- }, [endpoints]);
33
- return (_jsxs("div", { className: "flex flex-row w-full h-full", children: [_jsxs("div", { className: "flex flex-col gap-2 flex-1 m-4 mr-2 overflow-y-auto", children: [_jsxs("header", { children: [_jsx("h1", { className: "text-2xl font-bold", children: "API Endpoints" }), _jsx("span", { className: "text-sm text-zinc-400", children: "Check all API endpoints" })] }), endpoints.map((endpoint) => (_jsxs("div", { "data-testid": `endpoint-${endpoint.method}-${endpoint.path}`, className: endpointVariants({ method: endpoint.method }), onClick: () => setSelectedEndpoint(endpoint), children: [_jsxs("div", { className: "flex flex-row gap-2 items-center", children: [_jsx(EndpointBadge, { variant: endpoint.method, children: endpoint.method.toUpperCase() }), _jsx("span", { className: "text-md font-bold", children: endpoint.path }), !selectedEndpoint && _jsx("span", { className: "text-xs text-muted-foreground", children: endpoint.description })] }), selectedEndpoint && _jsx("span", { className: "text-xs text-muted-foreground", children: endpoint.description }), selectedEndpoint === endpoint && _jsx(SelectedEndpoint, { endpoint: selectedEndpoint })] }, `${endpoint.method} ${endpoint.path}`)))] }), selectedEndpoint && (_jsx("div", { className: "flex flex-col gap-2 flex-1 m-4 ml-2 p-4 rounded-lg bg-muted", children: _jsx(EndpointCall, { endpoint: selectedEndpoint, onClose: () => setSelectedEndpoint(null) }) }))] }));
34
- };
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { ApiEndpoint } from './hooks/use-get-endpoints';
3
- type Props = {
4
- endpoint: ApiEndpoint;
5
- };
6
- export declare const SelectedEndpoint: React.FC<Props>;
7
- export {};
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useJsonSchemaToJson } from './hooks/use-json-schema-to-json';
3
- import { ResponseBody } from './response-body';
4
- export const SelectedEndpoint = ({ endpoint }) => {
5
- const { body: requestBody } = useJsonSchemaToJson(endpoint.bodySchema);
6
- return (_jsxs(_Fragment, { children: [endpoint.queryParams && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("span", { className: "text-xs font-bold", children: "Query Params" }), _jsx("div", { className: "flex flex-col gap-2 flex-1 p-2 rounded-lg bg-muted table", children: endpoint.queryParams.map((param) => (_jsxs("span", { className: "text-xs table-row", children: [_jsx("span", { className: "font-bold table-cell", children: param.name }), _jsx("span", { className: "text-xs table-cell", children: param.description })] }, param.name))) })] })), requestBody && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("span", { className: "text-xs font-bold", children: "Request Body" }), _jsx("span", { className: "text-xs font-mono dark:bg-black/50 bg-white/50 p-2 rounded-lg whitespace-pre-wrap", children: requestBody })] })), endpoint.responseSchema && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("span", { className: "text-xs font-bold", children: "Response" }), Object.entries(endpoint.responseSchema).map(([status, schema]) => (_jsx(ResponseBody, { status: status, body: schema }, status)))] }))] }));
7
- };
@@ -1 +0,0 @@
1
- export declare const LogConsole: () => import("react/jsx-runtime").JSX.Element;
@@ -1,69 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useLogs } from '@/stores/use-logs';
3
- import { ChevronDown, ChevronUp, Trash2 } from 'lucide-react';
4
- import { useState, useCallback, useRef, useEffect } from 'react';
5
- import { Button } from '../ui/button';
6
- import { cn } from '@/lib/utils';
7
- import { Logs } from './logs';
8
- const MIN_HEIGHT = 100;
9
- const DEFAULT_HEIGHT = 200;
10
- const ClearLogsButton = () => {
11
- const hasLog = useLogs((state) => state.logs.length > 0);
12
- const resetLogs = useLogs((state) => state.resetLogs);
13
- if (!hasLog) {
14
- return null;
15
- }
16
- return (_jsxs(Button, { variant: "outline", onClick: resetLogs, children: [_jsx(Trash2, { className: "w-4 h-4" }), "Clear logs"] }));
17
- };
18
- export const LogConsole = () => {
19
- const [isExpanded, setIsExpanded] = useState(false);
20
- const [height, setHeight] = useState(DEFAULT_HEIGHT);
21
- const dragRef = useRef(null);
22
- const [isDragging, setIsDragging] = useState(false);
23
- const contentRef = useRef(null);
24
- const setUnreadLogsCount = useLogs((state) => state.setUnreadLogsCount);
25
- const toggleExpand = useCallback(() => {
26
- setIsExpanded((prev) => !prev);
27
- setUnreadLogsCount(0);
28
- }, [setUnreadLogsCount]);
29
- const handleMouseDown = useCallback((e) => {
30
- e.preventDefault();
31
- setIsDragging(true);
32
- }, []);
33
- useEffect(() => {
34
- const handleMouseUp = () => {
35
- setIsDragging(false);
36
- };
37
- const handleMouseMove = (e) => {
38
- if (!isDragging)
39
- return;
40
- const windowHeight = window.innerHeight;
41
- const mouseY = e.clientY;
42
- const newHeight = windowHeight - mouseY;
43
- if (newHeight >= MIN_HEIGHT) {
44
- setHeight(newHeight);
45
- }
46
- };
47
- document.addEventListener('mousemove', handleMouseMove);
48
- document.addEventListener('mouseup', handleMouseUp);
49
- return () => {
50
- document.removeEventListener('mousemove', handleMouseMove);
51
- document.removeEventListener('mouseup', handleMouseUp);
52
- };
53
- }, [isDragging]);
54
- useEffect(() => {
55
- if (contentRef.current) {
56
- if (isExpanded) {
57
- contentRef.current.style.height = `${height}px`;
58
- }
59
- else {
60
- contentRef.current.style.height = '0px';
61
- }
62
- }
63
- }, [isExpanded, height]);
64
- return (_jsxs("div", { className: "absolute bottom-0 left-0 right-0 bg-background/80 border border-solid border-border m-4 rounded-lg", children: [_jsx("div", { ref: dragRef, onMouseDown: handleMouseDown, className: cn('absolute -top-1 left-0 right-0 h-1 cursor-ns-resize hover:bg-background/40', isDragging && 'bg-background/40') }), _jsxs("div", { className: "text-muted-foreground flex justify-between w-full items-center p-4 gap-2", children: [_jsx("label", { className: "w-full text-left justify-start h-full text-md uppercase", children: "Logs" }), _jsx(ClearLogsButton, {}), _jsx(Button, { variant: "outline", onClick: toggleExpand, children: isExpanded ? _jsx(ChevronDown, { className: "w-4 h-4" }) : _jsx(ChevronUp, { className: "w-4 h-4" }) })] }), _jsx("div", { ref: contentRef, style: {
65
- overflow: 'hidden',
66
- transition: 'height 0.2s ease-out',
67
- height: isExpanded ? `${height}px` : '0px',
68
- }, children: _jsx(Logs, {}) })] }));
69
- };
@@ -1,7 +0,0 @@
1
- type Props = {
2
- label: string;
3
- value: unknown;
4
- className?: string;
5
- };
6
- export declare const LogField: ({ label, value, className }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { cn } from '@/lib/utils';
4
- const Value = ({ value }) => {
5
- const displayValue = typeof value === 'string' ? value : JSON.stringify(value);
6
- return (_jsx("div", { className: "dark:text-gray-400 text-md", "aria-label": displayValue, children: displayValue }));
7
- };
8
- const LogValue = ({ value }) => {
9
- if (React.isValidElement(value)) {
10
- return value;
11
- }
12
- if (value && typeof value === 'object') {
13
- const valueObject = value;
14
- return (_jsx("div", { className: "flex flex-col gap-4", children: Object.keys(valueObject).map((key) => (_jsxs("div", { className: "ml-4 flex flex-col gap-2", children: [_jsx("span", { className: "text-md font-semibold", children: key }), _jsx("span", { className: "text-md", children: value ? (_jsx(LogValue, { value: valueObject[key] })) : (_jsx(Value, { value: valueObject[key] })) })] }, key))) }));
15
- }
16
- return _jsx(Value, { value: value });
17
- };
18
- export const LogField = ({ label, value, className }) => {
19
- return (_jsx("div", { className: cn('flex row text-foreground p-2', className), children: _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("span", { className: "text-md font-semibold", children: label }), _jsx("span", { className: "", children: value ? _jsx(LogValue, { value: value }) : _jsx(Value, { value: value }) })] }) }));
20
- };
@@ -1 +0,0 @@
1
- export declare const Logs: () => import("react/jsx-runtime").JSX.Element;
@@ -1,18 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Table, TableBody, TableCell, TableRow } from '@/components/ui/table';
3
- import { useLogs } from '@/stores/use-logs';
4
- import { useState } from 'react';
5
- import { LogDetail } from './log-detail';
6
- import { LogLevelDot } from './log-level-dot';
7
- const timestamp = (time) => {
8
- const date = new Date(Number(time));
9
- return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
10
- };
11
- export const Logs = () => {
12
- const logs = useLogs((state) => state.logs);
13
- const [selectedLog, setSelectedLog] = useState();
14
- const handleLogClick = (log) => {
15
- setSelectedLog(log);
16
- };
17
- return (_jsxs("div", { className: "overflow-y-auto h-full text-bold p-4", children: [_jsx(LogDetail, { log: selectedLog, onClose: () => setSelectedLog(undefined) }), _jsx(Table, { children: _jsx(TableBody, { className: "text-md font-mono", children: logs.map((log, index) => (_jsxs(TableRow, { className: "cursor-pointer even:bg-muted/50 border-0", onClick: () => handleLogClick(log), children: [_jsxs(TableCell, { "data-testid": `time-${index}`, className: "whitespace-nowrap flex items-center gap-2", children: [_jsx(LogLevelDot, { level: log.level }), timestamp(log.time)] }), _jsx(TableCell, { "data-testid": `trace-${log.traceId}`, className: "whitespace-nowrap text-md cursor-pointer hover:text-primary text-muted-foreground text-xs font-mono", children: log.traceId }), _jsx(TableCell, { "data-testid": `step-${index}`, "aria-label": log.step, className: "whitespace-nowrap text-md font-mono", children: log.step }), _jsx(TableCell, { "data-testid": `msg-${index}`, "aria-label": log.msg, className: "whitespace-nowrap text-md font-mono max-w-[500px] truncate w-full", children: log.msg })] }, index))) }) })] }));
18
- };
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { TraceGroup } from '@/types/observability';
3
- export declare const ObservabilityStats: React.MemoExoticComponent<({ groups }: {
4
- groups: TraceGroup[];
5
- }) => import("react/jsx-runtime").JSX.Element>;
@@ -1,17 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
- import { Card, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
4
- import { Activity, CheckCircle, Hash, XCircle } from 'lucide-react';
5
- const calculateStats = (groups) => {
6
- const running = groups.filter(({ status }) => status === 'running').length;
7
- const completed = groups.filter(({ status }) => status === 'completed').length;
8
- const failed = groups.filter(({ status }) => status === 'failed').length;
9
- return { total: groups.length, running, completed, failed };
10
- };
11
- const Stat = ({ title, value, icon }) => {
12
- return (_jsx(Card, { children: _jsxs(CardHeader, { className: "relative", children: [_jsx(CardDescription, { children: title }), _jsxs("div", { className: "flex flex-row gap-2 items-center", children: [icon, _jsx(CardTitle, { className: "@[250px]/card:text-3xl text-2xl font-semibold tabular-nums", children: value })] })] }) }));
13
- };
14
- export const ObservabilityStats = memo(({ groups }) => {
15
- const stats = calculateStats(groups);
16
- return (_jsxs("div", { className: "flex items-center gap-4", children: [_jsx(Stat, { title: "Total Traces", value: stats.total.toLocaleString(), icon: _jsx(Hash, { className: "w-4 h-4 text-teal-500" }) }), _jsx(Stat, { title: "Running Traces", value: stats.running.toLocaleString(), icon: _jsx(Activity, { className: "w-4 h-4 text-blue-500" }) }), _jsx(Stat, { title: "Completed Traces", value: stats.completed.toLocaleString(), icon: _jsx(CheckCircle, { className: "w-4 h-4 text-green-500" }) }), _jsx(Stat, { title: "Failed Traces", value: stats.failed.toLocaleString(), icon: _jsx(XCircle, { className: "w-4 h-4 text-red-500" }) })] }));
17
- });
@@ -1 +0,0 @@
1
- export declare const States: () => import("react/jsx-runtime").JSX.Element;
@@ -1,21 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '../ui/table';
3
- import { useState } from 'react';
4
- import { useGetFields, useGetTraces, useGetValues } from './hooks/states-hooks';
5
- import { StateDetail } from './state-detail';
6
- export const States = () => {
7
- const [selectedTraceId, setSelectedTraceId] = useState();
8
- const [selectedState, setSelectedState] = useState(); // eslint-disable-line @typescript-eslint/no-explicit-any
9
- const traces = useGetTraces();
10
- const fields = useGetFields(selectedTraceId);
11
- const values = useGetValues(selectedTraceId, selectedState);
12
- const handleTraceClick = (traceId) => {
13
- setSelectedTraceId(traceId);
14
- setSelectedState(undefined);
15
- };
16
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
- const handleStateClick = (state) => {
18
- setSelectedState(state);
19
- };
20
- return (_jsxs("div", { className: "flex flex-row gap-4 h-full", children: [_jsx(StateDetail, { state: values, onClose: () => setSelectedState(undefined) }), _jsx("div", { className: "flex flex-col gap-2 flex-1 pl-4 py-4", children: _jsxs(Table, { children: [_jsx(TableHeader, { className: "sticky top-0", children: _jsx(TableRow, { children: _jsx(TableHead, { children: "Root Field (Trace ID)" }) }) }), _jsx(TableBody, { children: traces.map((trace) => (_jsx(TableRow, { "data-testid": `trace-${trace}`, onClick: () => handleTraceClick(trace), children: _jsx(TableCell, { className: `rounded-lg font-mono font-semibold ${selectedTraceId === trace ? 'bg-indigo-900/50 hover:bg-indigo-900/30' : ''}`, children: trace }) }, trace))) })] }) }), _jsx("div", { className: "flex flex-col gap-2 flex-1 pr-4 py-4", children: _jsxs(Table, { children: [_jsx(TableHeader, { className: "sticky top-0", children: _jsx(TableRow, { children: _jsx(TableHead, { children: "Fields" }) }) }), _jsx(TableBody, { children: fields.map((field) => (_jsx(TableRow, { "data-testid": `field-${field}`, className: `font-semibold font-mono ${selectedState === field ? 'bg-indigo-900/50 hover:bg-indigo-900/30' : ''}`, onClick: () => handleStateClick(field), children: _jsx(TableCell, { children: field }) }, field))) })] }) })] }));
21
- };
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- interface BadgeCountProps {
3
- className?: string;
4
- dotOnly?: boolean;
5
- }
6
- export declare const BadgeCount: React.FC<BadgeCountProps>;
7
- export {};
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useLogs } from '@/stores/use-logs';
3
- import { Badge } from './badge';
4
- export const BadgeCount = ({ className, dotOnly = false }) => {
5
- const unreadLogsCount = useLogs((state) => state.unreadLogsCount);
6
- if (!unreadLogsCount) {
7
- return null;
8
- }
9
- if (dotOnly) {
10
- return _jsx(Badge, { variant: "red-dot", className: className });
11
- }
12
- return (_jsx(Badge, { variant: "red-rounded", className: className, children: unreadLogsCount }));
13
- };
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- import { type VariantProps } from 'class-variance-authority';
3
- declare const buttonVariants: (props?: ({
4
- variant?: "default" | "link" | "none" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
- asChild?: boolean;
9
- }
10
- export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
- export {};
@@ -1,33 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { Slot } from '@radix-ui/react-slot';
4
- import { cva } from 'class-variance-authority';
5
- import { cn } from '@/lib/utils';
6
- const buttonVariants = cva('inline-flex items-center cursor-pointer justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', {
7
- variants: {
8
- variant: {
9
- default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
10
- destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
11
- outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
12
- secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
13
- ghost: 'hover:bg-accent hover:text-accent-foreground',
14
- link: 'text-primary underline-offset-4 hover:underline',
15
- none: '',
16
- },
17
- size: {
18
- default: 'h-9 px-4 py-2',
19
- sm: 'h-8 rounded-md px-3 text-xs',
20
- lg: 'h-10 rounded-md px-8',
21
- icon: 'h-9 w-9',
22
- },
23
- },
24
- defaultVariants: {
25
- variant: 'default',
26
- size: 'default',
27
- },
28
- });
29
- export const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
30
- const Comp = asChild ? Slot : 'button';
31
- return _jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props });
32
- });
33
- Button.displayName = 'Button';
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
- declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
4
- declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
5
- declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
6
- declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
7
- declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
8
- export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { cn } from '@/lib/utils';
4
- const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('rounded-lg border bg-card text-card-foreground shadow-sm', className), ...props })));
5
- Card.displayName = 'Card';
6
- const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex flex-col space-y-1.5 p-4', className), ...props })));
7
- CardHeader.displayName = 'CardHeader';
8
- const CardTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("h3", { ref: ref, className: cn('text-2xl font-semibold leading-none tracking-tight', className), ...props })));
9
- CardTitle.displayName = 'CardTitle';
10
- const CardDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("p", { ref: ref, className: cn('text-sm text-muted-foreground', className), ...props })));
11
- CardDescription.displayName = 'CardDescription';
12
- const CardContent = React.forwardRef(({ className, ...props }, ref) => _jsx("div", { ref: ref, className: cn('p-6 pt-0', className), ...props }));
13
- CardContent.displayName = 'CardContent';
14
- const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex items-center p-6 pt-0', className), ...props })));
15
- CardFooter.displayName = 'CardFooter';
16
- export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
@@ -1,5 +0,0 @@
1
- import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
2
- declare const Collapsible: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
3
- declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
4
- declare const CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
5
- export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -1,5 +0,0 @@
1
- import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
2
- const Collapsible = CollapsiblePrimitive.Root;
3
- const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
4
- const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
5
- export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- import * as DialogPrimitive from '@radix-ui/react-dialog';
3
- declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
- declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
- declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
- declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
- declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
- declare const DialogHeader: {
10
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
- displayName: string;
12
- };
13
- declare const DialogFooter: {
14
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
- displayName: string;
16
- };
17
- declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
18
- declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
19
- export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import * as DialogPrimitive from '@radix-ui/react-dialog';
4
- import { X } from 'lucide-react';
5
- import { cn } from '@/lib/utils';
6
- const Dialog = DialogPrimitive.Root;
7
- const DialogTrigger = DialogPrimitive.Trigger;
8
- const DialogPortal = DialogPrimitive.Portal;
9
- const DialogClose = DialogPrimitive.Close;
10
- const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn('fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', className), ...props })));
11
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
12
- const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn('fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg', className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
13
- DialogContent.displayName = DialogPrimitive.Content.displayName;
14
- const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props }));
15
- DialogHeader.displayName = 'DialogHeader';
16
- const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
17
- DialogFooter.displayName = 'DialogFooter';
18
- const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn('text-lg font-semibold leading-none tracking-tight', className), ...props })));
19
- DialogTitle.displayName = DialogPrimitive.Title.displayName;
20
- const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn('text-sm text-muted-foreground', className), ...props })));
21
- DialogDescription.displayName = DialogPrimitive.Description.displayName;
22
- export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -1,25 +0,0 @@
1
- import * as React from 'react';
2
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
- declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
5
- declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
- declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
- declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
8
- declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
9
- inset?: boolean;
10
- variant?: 'default' | 'destructive';
11
- }): import("react/jsx-runtime").JSX.Element;
12
- declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
13
- declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
14
- declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
15
- declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
16
- inset?: boolean;
17
- }): import("react/jsx-runtime").JSX.Element;
18
- declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
19
- declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
20
- declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
21
- declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
22
- inset?: boolean;
23
- }): import("react/jsx-runtime").JSX.Element;
24
- declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
25
- export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
@@ -1,50 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
- import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
4
- import { cn } from '@/lib/utils';
5
- function DropdownMenu({ ...props }) {
6
- return _jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
7
- }
8
- function DropdownMenuPortal({ ...props }) {
9
- return _jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
10
- }
11
- function DropdownMenuTrigger({ ...props }) {
12
- return _jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
13
- }
14
- function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
15
- return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md', className), ...props }) }));
16
- }
17
- function DropdownMenuGroup({ ...props }) {
18
- return _jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
19
- }
20
- function DropdownMenuItem({ className, inset, variant = 'default', ...props }) {
21
- return (_jsx(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
22
- }
23
- function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
24
- return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
25
- }
26
- function DropdownMenuRadioGroup({ ...props }) {
27
- return _jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
28
- }
29
- function DropdownMenuRadioItem({ className, children, ...props }) {
30
- return (_jsxs(DropdownMenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
31
- }
32
- function DropdownMenuLabel({ className, inset, ...props }) {
33
- return (_jsx(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className), ...props }));
34
- }
35
- function DropdownMenuSeparator({ className, ...props }) {
36
- return (_jsx(DropdownMenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn('bg-border -mx-1 my-1 h-px', className), ...props }));
37
- }
38
- function DropdownMenuShortcut({ className, ...props }) {
39
- return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn('text-muted-foreground ml-auto text-xs tracking-widest', className), ...props }));
40
- }
41
- function DropdownMenuSub({ ...props }) {
42
- return _jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
43
- }
44
- function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
45
- return (_jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn('focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8', className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
46
- }
47
- function DropdownMenuSubContent({ className, ...props }) {
48
- return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg', className), ...props }));
49
- }
50
- export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
3
- export { Input };
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { cn } from '@/lib/utils';
4
- const Input = React.forwardRef(({ className, type, ...props }, ref) => {
5
- return (_jsx("input", { type: type, className: cn('flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', className), ref: ref, ...props }));
6
- });
7
- Input.displayName = 'Input';
8
- export { Input };
@@ -1,5 +0,0 @@
1
- interface LogoIconProps {
2
- className?: string;
3
- }
4
- export declare const LogoIcon: import("react").MemoExoticComponent<({ className }: LogoIconProps) => import("react/jsx-runtime").JSX.Element>;
5
- export {};
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
- export const LogoIcon = memo(({ className }) => {
4
- return (_jsxs("svg", { "data-testid": "logo-icon", className: className, width: "295", height: "127", viewBox: "0 0 295 127", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsxs("g", { clipPath: "url(#clip0_512_36)", children: [_jsx("path", { d: "M0.520508 84.2194H32.0014C53.9923 84.2194 74.81 74.298 88.6654 57.2074C102.512 40.1254 123.33 30.1954 145.329 30.1954H173.394", className: "stroke-black dark:stroke-white", strokeWidth: "60.3909", strokeMiterlimit: "10" }), _jsx("path", { d: "M119.724 84.2194H151.205C173.196 84.2194 194.014 74.298 207.869 57.2074C221.716 40.1254 242.533 30.1954 264.533 30.1954H292.597", className: "stroke-black dark:stroke-white", strokeWidth: "60.3909", strokeMiterlimit: "10" }), _jsx("path", { d: "M292.477 53.8428H232.086V114.122H292.477V53.8428Z", className: "fill-black dark:fill-white" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_512_36", children: _jsx("rect", { width: "294.199", height: "126.993", className: "fill-black dark:fill-white", transform: "translate(0.520508)" }) }) })] }));
5
- });