@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.
- package/dist/middleware.js +1 -0
- package/dist/src/components/logs/log-level-badge.js +1 -1
- package/dist/src/components/observability/trace-item/trace-item-detail.js +1 -1
- package/dist/src/components/observability/trace-status.js +15 -15
- package/dist/src/publicComponents/node-details.js +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/tsconfig.node.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/src/components/ui/badge.d.ts +0 -9
- package/dist/src/components/ui/badge.js +0 -24
- package/dist/src/components/ui/label.d.ts +0 -5
- package/dist/src/components/ui/label.js +0 -10
package/dist/middleware.js
CHANGED
|
@@ -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 '
|
|
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 {
|
|
3
|
-
|
|
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
|
-
|
|
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 '
|
|
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';
|