@motiadev/workbench 0.4.4-beta.98-640191 → 0.5.1-beta.100

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.
@@ -14,6 +14,7 @@ const applyMiddleware = async (app) => {
14
14
  root: __dirname,
15
15
  server: {
16
16
  middlewareMode: true,
17
+ allowedHosts: true,
17
18
  host: true,
18
19
  fs: {
19
20
  allow: [__dirname, path_1.default.join(process.cwd(), './steps')],
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Badge } from '../ui/badge';
2
+ import { Badge } from '@motiadev/ui';
3
3
  const map = {
4
4
  info: 'info',
5
5
  error: 'error',
@@ -1,6 +1,6 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Sidebar } from '@/components/sidebar/sidebar';
3
- import { Badge } from '@/components/ui/badge';
3
+ import { Badge } from '@motiadev/ui';
4
4
  import { formatDuration } from '@/lib/utils';
5
5
  import { X } from 'lucide-react';
6
6
  import { memo } from 'react';
@@ -1,18 +1,18 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cva } from 'class-variance-authority';
3
- const statusVariants = cva('inline-flex items-center rounded-full px-4 py-1 text-xs font-bold transition-colors', {
4
- variants: {
5
- status: {
6
- running: 'dark:bg-accent-100 dark:text-accent-1000 bg-accent-200 text-accent-900 capitalize',
7
- completed: 'bg-accent-1000 text-white',
8
- failed: 'bg-destructive/10 text-destructive capitalize',
9
- default: 'dark:bg-gray-800/30 dark:text-gray-500 bg-gray-100 text-gray-800',
10
- },
11
- },
12
- defaultVariants: {
13
- status: 'default',
14
- },
15
- });
2
+ import { Badge } from '@motiadev/ui';
3
+ import { useMemo } from 'react';
16
4
  export const TraceStatusBadge = ({ status, duration }) => {
17
- return _jsx("div", { className: statusVariants({ status }), children: duration && status !== 'failed' ? duration : status });
5
+ const variant = useMemo(() => {
6
+ if (status === 'running') {
7
+ return 'info';
8
+ }
9
+ if (status === 'completed') {
10
+ return 'success';
11
+ }
12
+ if (status === 'failed') {
13
+ return 'error';
14
+ }
15
+ return 'default';
16
+ }, [status]);
17
+ return _jsx(Badge, { variant: variant, children: duration && status !== 'failed' ? duration : status });
18
18
  };
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { ChevronRight, X } from 'lucide-react';
3
3
  import { useCallback, useState } from 'react';
4
4
  import { Sidebar } from '@/components/sidebar/sidebar';
5
- import { Label } from '@/components/ui/label';
5
+ import { Label } from '@motiadev/ui';
6
6
  import { LanguageIndicator } from '@/publicComponents/base-node/language-indicator';
7
7
  import { Subscribe } from './base-node/subscribe';
8
8
  import { Emits } from './base-node/emits';