@motiadev/plugin-logs 0.8.2-beta.140-957262

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 (40) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -0
  3. package/dist/components/log-detail.d.ts +11 -0
  4. package/dist/components/log-detail.d.ts.map +1 -0
  5. package/dist/components/log-detail.js +37 -0
  6. package/dist/components/log-detail.js.map +1 -0
  7. package/dist/components/log-level-badge.d.ts +6 -0
  8. package/dist/components/log-level-badge.d.ts.map +1 -0
  9. package/dist/components/log-level-badge.js +12 -0
  10. package/dist/components/log-level-badge.js.map +1 -0
  11. package/dist/components/logs-page.d.ts +2 -0
  12. package/dist/components/logs-page.d.ts.map +1 -0
  13. package/dist/components/logs-page.js +27 -0
  14. package/dist/components/logs-page.js.map +1 -0
  15. package/dist/components/logs-tab-label.d.ts +2 -0
  16. package/dist/components/logs-tab-label.d.ts.map +1 -0
  17. package/dist/components/logs-tab-label.js +6 -0
  18. package/dist/components/logs-tab-label.js.map +1 -0
  19. package/dist/index.d.ts +10 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +11 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/stores/use-logs-store.d.ts +10 -0
  24. package/dist/stores/use-logs-store.d.ts.map +1 -0
  25. package/dist/stores/use-logs-store.js +13 -0
  26. package/dist/stores/use-logs-store.js.map +1 -0
  27. package/dist/styles.css +675 -0
  28. package/dist/types/log.d.ts +11 -0
  29. package/dist/types/log.d.ts.map +1 -0
  30. package/dist/types/log.js +2 -0
  31. package/dist/types/log.js.map +1 -0
  32. package/dist/utils/format-timestamp.d.ts +2 -0
  33. package/dist/utils/format-timestamp.d.ts.map +1 -0
  34. package/dist/utils/format-timestamp.js +5 -0
  35. package/dist/utils/format-timestamp.js.map +1 -0
  36. package/dist/utils/init-log-listener.d.ts +2 -0
  37. package/dist/utils/init-log-listener.d.ts.map +1 -0
  38. package/dist/utils/init-log-listener.js +11 -0
  39. package/dist/utils/init-log-listener.js.map +1 -0
  40. package/package.json +39 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Motia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @motiadev/plugin-logs
2
+
3
+ This package provides React components for the Motia workbench logs functionality.
4
+
5
+ ## TailwindCSS Compilation
6
+
7
+ This package includes TailwindCSS compilation to ensure all Tailwind classes used in the components are properly compiled and available.
8
+
9
+ ### Build Process
10
+
11
+ The build process includes two steps:
12
+
13
+ 1. **CSS Compilation**: Compiles `src/styles.css` using PostCSS and TailwindCSS
14
+ 2. **TypeScript Compilation**: Compiles TypeScript files to JavaScript
15
+
16
+ ### Development
17
+
18
+ - `pnpm run build` - Build both CSS and TypeScript
19
+ - `pnpm run dev` - Watch mode for both CSS and TypeScript
20
+ - `pnpm run build:css` - Build only CSS
21
+ - `pnpm run dev:css` - Watch mode for CSS only
22
+
23
+ ### Configuration Files
24
+
25
+ - `src/styles.css` - Main CSS entry point with Tailwind imports
26
+
27
+ ## Features
28
+
29
+ - **LogsPage**: Main logs page component with search and filtering
30
+ - **LogDetail**: Sidebar component for viewing detailed log information
31
+ - **LogLevelBadge**: Badge component for log levels
32
+ - **useLogsStore**: Zustand store for managing logs state
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import 'react18-json-view/src/dark.css';
3
+ import 'react18-json-view/src/style.css';
4
+ import { Log } from '../types/log';
5
+ type Props = {
6
+ log?: Log;
7
+ onClose: () => void;
8
+ };
9
+ export declare const LogDetail: React.FC<Props>;
10
+ export {};
11
+ //# sourceMappingURL=log-detail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-detail.d.ts","sourceRoot":"","sources":["../../src/components/log-detail.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAEhD,OAAO,gCAAgC,CAAA;AACvC,OAAO,iCAAiC,CAAA;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAGlC,KAAK,KAAK,GAAG;IACX,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAID,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAiDrC,CAAA"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { LevelDot, Sidebar } from '@motiadev/ui';
3
+ import { X } from 'lucide-react';
4
+ import { useMemo, useState } from 'react';
5
+ import ReactJson from 'react18-json-view';
6
+ import 'react18-json-view/src/dark.css';
7
+ import 'react18-json-view/src/style.css';
8
+ import { formatTimestamp } from '../utils/format-timestamp';
9
+ const defaultProps = ['id', 'msg', 'time', 'level', 'step', 'flows', 'traceId'];
10
+ export const LogDetail = ({ log, onClose }) => {
11
+ const [hasOtherProps, setHasOtherProps] = useState(false);
12
+ const otherPropsObject = useMemo(() => {
13
+ if (!log) {
14
+ return null;
15
+ }
16
+ const otherProps = Object.keys(log ?? {}).filter((key) => !defaultProps.includes(key));
17
+ setHasOtherProps(otherProps.length > 0);
18
+ return otherProps.reduce((acc, key) => {
19
+ acc[key] = log[key];
20
+ return acc;
21
+ }, {});
22
+ }, [log]);
23
+ if (!log) {
24
+ return null;
25
+ }
26
+ return (_jsx(Sidebar, { onClose: onClose, title: "Logs Details", subtitle: "Details including custom properties", actions: [{ icon: _jsx(X, {}), onClick: onClose, label: 'Close' }], details: [
27
+ {
28
+ label: 'Level',
29
+ value: (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(LevelDot, { level: log.level }), _jsx("div", { className: "capitalize", children: log.level })] })),
30
+ },
31
+ { label: 'Time', value: formatTimestamp(log.time) },
32
+ { label: 'Step', value: log.step },
33
+ { label: 'Flows', value: log.flows.join(', ') },
34
+ { label: 'Trace ID', value: log.traceId },
35
+ ], children: hasOtherProps && _jsx(ReactJson, { src: otherPropsObject, theme: "default", enableClipboard: true }) }));
36
+ };
37
+ //# sourceMappingURL=log-detail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-detail.js","sourceRoot":"","sources":["../../src/components/log-detail.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAChC,OAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,SAAS,MAAM,mBAAmB,CAAA;AACzC,OAAO,gCAAgC,CAAA;AACvC,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAO3D,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,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CAAC,KAAK,GAAI,EAC9B,cAAK,SAAS,EAAC,YAAY,YAAE,GAAG,CAAC,KAAK,GAAO,IACzC,CACP;aACF;YACD,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACnD,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE;YAClC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC/C,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE;SAC1C,YAEA,aAAa,IAAI,KAAC,SAAS,IAAC,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAC,SAAS,EAAC,eAAe,SAAG,GAC9E,CACX,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const LogLevelBadge: React.FC<{
3
+ level: string;
4
+ className?: string;
5
+ }>;
6
+ //# sourceMappingURL=log-level-badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-level-badge.d.ts","sourceRoot":"","sources":["../../src/components/log-level-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAMzE,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Badge } from '@motiadev/ui';
3
+ const map = {
4
+ info: 'info',
5
+ error: 'error',
6
+ warn: 'warning',
7
+ debug: 'info',
8
+ };
9
+ export const LogLevelBadge = (props) => {
10
+ return (_jsx(Badge, { variant: map[props.level], className: props.className, children: props.level }));
11
+ };
12
+ //# sourceMappingURL=log-level-badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-level-badge.js","sourceRoot":"","sources":["../../src/components/log-level-badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAc,MAAM,cAAc,CAAA;AAEhD,MAAM,GAAG,GAA0C;IACjD,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,MAAM;CACd,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAoD,CAAC,KAAK,EAAE,EAAE;IACtF,OAAO,CACL,KAAC,KAAK,IAAC,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,CAA0B,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,YAClF,KAAK,CAAC,KAAK,GACN,CACT,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const LogsPage: () => import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=logs-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-page.d.ts","sourceRoot":"","sources":["../../src/components/logs-page.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,QAAQ,+CAuFpB,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Button, cn, Input, LevelDot, Table, TableBody, TableCell, TableRow } from '@motiadev/ui';
3
+ import { Search, Trash, X } from 'lucide-react';
4
+ import { useMemo, useState } from 'react';
5
+ import { useLogsStore } from '../stores/use-logs-store';
6
+ import { formatTimestamp } from '../utils/format-timestamp';
7
+ import { LogDetail } from './log-detail';
8
+ export const LogsPage = () => {
9
+ const logs = useLogsStore((state) => state.logs);
10
+ const resetLogs = useLogsStore((state) => state.resetLogs);
11
+ const selectedLogId = useLogsStore((state) => state.selectedLogId);
12
+ const selectLogId = useLogsStore((state) => state.selectLogId);
13
+ const selectedLog = useMemo(() => (selectedLogId ? logs.find((log) => log.id === selectedLogId) : undefined), [logs, selectedLogId]);
14
+ const [search, setSearch] = useState('');
15
+ const filteredLogs = useMemo(() => {
16
+ return logs.filter((log) => {
17
+ return (log.msg.toLowerCase().includes(search.toLowerCase()) ||
18
+ log.traceId.toLowerCase().includes(search.toLowerCase()) ||
19
+ log.step.toLowerCase().includes(search.toLowerCase()));
20
+ });
21
+ }, [logs, search]);
22
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "grid grid-rows-[auto_1fr] h-full", "data-testid": "logs-container", children: [_jsxs("div", { className: "flex p-2 border-b gap-2", "data-testid": "logs-search-container", children: [_jsxs("div", { className: "flex-1 relative", children: [_jsx(Input, { variant: "shade", value: search, onChange: (e) => setSearch(e.target.value), className: "px-9 font-medium", placeholder: "Search by Trace ID or Message" }), _jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50" }), _jsx(X, { className: "cursor-pointer absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50 hover:text-muted-foreground", onClick: () => setSearch('') })] }), _jsxs(Button, { variant: "default", onClick: resetLogs, className: "h-[34px]", children: [_jsx(Trash, {}), " Clear"] })] }), _jsx(Table, { children: _jsx(TableBody, { className: "font-mono font-medium", children: filteredLogs.map((log, index) => (_jsxs(TableRow, { "data-testid": "log-row", className: cn('font-mono font-semibold cursor-pointer border-0', {
23
+ 'bg-muted-foreground/10 hover:bg-muted-foreground/20': selectedLogId === log.id,
24
+ 'hover:bg-muted-foreground/10': selectedLogId !== log.id,
25
+ }), onClick: () => selectLogId(log.id), children: [_jsxs(TableCell, { "data-testid": `time-${index}`, className: "whitespace-nowrap flex items-center gap-2 text-muted-foreground", children: [_jsx(LevelDot, { level: log.level }), formatTimestamp(log.time)] }), _jsx(TableCell, { "data-testid": `trace-${log.traceId}`, className: "whitespace-nowrap cursor-pointer hover:text-primary text-muted-foreground", onClick: () => setSearch(log.traceId), children: log.traceId }), _jsx(TableCell, { "data-testid": `step-${index}`, "aria-label": log.step, className: "whitespace-nowrap", children: log.step }), _jsx(TableCell, { "data-testid": `msg-${index}`, "aria-label": log.msg, className: "whitespace-nowrap max-w-[500px] truncate w-full", children: log.msg })] }, index))) }) })] }), _jsx(LogDetail, { log: selectedLog, onClose: () => selectLogId(undefined) })] }));
26
+ };
27
+ //# sourceMappingURL=logs-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-page.js","sourceRoot":"","sources":["../../src/components/logs-page.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACjG,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAChD,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAC1D,MAAM,aAAa,GAAG,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;IAClE,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;IAC9D,MAAM,WAAW,GAAG,OAAO,CACzB,GAAG,EA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,CA2BD,CACZ,CAAC,GACQ,GACN,IACJ,EACN,KAAC,SAAS,IAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,GAAI,IACrE,CACJ,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const LogsTabLabel: import("react").MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
2
+ //# sourceMappingURL=logs-tab-label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-tab-label.d.ts","sourceRoot":"","sources":["../../src/components/logs-tab-label.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,oFAKvB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { LogsIcon } from 'lucide-react';
3
+ import { memo } from 'react';
4
+ export const LogsTabLabel = memo(() => (_jsxs(_Fragment, { children: [_jsx(LogsIcon, { "aria-hidden": "true" }), _jsx("span", { children: "Logs" })] })));
5
+ LogsTabLabel.displayName = 'LogsTabLabel';
6
+ //# sourceMappingURL=logs-tab-label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-tab-label.js","sourceRoot":"","sources":["../../src/components/logs-tab-label.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAE5B,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CACrC,8BACE,KAAC,QAAQ,mBAAa,MAAM,GAAG,EAC/B,kCAAiB,IAChB,CACJ,CAAC,CAAA;AACF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAA"}
@@ -0,0 +1,10 @@
1
+ import './styles.css';
2
+ export { LogsPage } from './components/logs-page';
3
+ export type { Log } from './types/log';
4
+ export declare const config: {
5
+ label: string;
6
+ position: string;
7
+ componentName: string;
8
+ labelIcon: string;
9
+ };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AAGrB,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,YAAY,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAItC,eAAO,MAAM,MAAM;;;;;CAKlB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ import './styles.css';
2
+ import { initLogListener } from './utils/init-log-listener';
3
+ export { LogsPage } from './components/logs-page';
4
+ initLogListener();
5
+ export const config = {
6
+ label: 'Logs',
7
+ position: 'bottom',
8
+ componentName: 'LogsPage',
9
+ labelIcon: 'logs',
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AACrB,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAGjD,eAAe,EAAE,CAAA;AAEjB,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,QAAQ;IAClB,aAAa,EAAE,UAAU;IACzB,SAAS,EAAE,MAAM;CAClB,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { Log } from '../types/log';
2
+ export type LogsState = {
3
+ logs: Log[];
4
+ selectedLogId?: string;
5
+ addLog: (log: Log) => void;
6
+ resetLogs: () => void;
7
+ selectLogId: (logId?: string) => void;
8
+ };
9
+ export declare const useLogsStore: import("zustand").UseBoundStore<import("zustand").StoreApi<LogsState>>;
10
+ //# sourceMappingURL=use-logs-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-logs-store.d.ts","sourceRoot":"","sources":["../../src/stores/use-logs-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAElC,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,WAAW,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,YAAY,wEAWtB,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { create } from 'zustand';
2
+ export const useLogsStore = create()((set) => ({
3
+ logs: [],
4
+ selectedLogId: undefined,
5
+ addLog: (log) => set((state) => ({
6
+ logs: [log, ...state.logs],
7
+ })),
8
+ resetLogs: () => {
9
+ set({ logs: [] });
10
+ },
11
+ selectLogId: (logId) => set({ selectedLogId: logId }),
12
+ }));
13
+ //# sourceMappingURL=use-logs-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-logs-store.js","sourceRoot":"","sources":["../../src/stores/use-logs-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAWhC,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,EAAa,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACxD,IAAI,EAAE,EAAE;IACR,aAAa,EAAE,SAAS;IACxB,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CACd,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACd,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;KAC3B,CAAC,CAAC;IACL,SAAS,EAAE,GAAG,EAAE;QACd,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAA;IACnB,CAAC;IACD,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;CACtD,CAAC,CAAC,CAAA"}
@@ -0,0 +1,675 @@
1
+ /*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer theme, base, components, utilities;
4
+ @layer theme {
5
+ :root, :host {
6
+ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
7
+ "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
8
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
9
+ "Courier New", monospace;
10
+ --spacing: 0.25rem;
11
+ --font-weight-medium: 500;
12
+ --font-weight-semibold: 600;
13
+ --default-font-family: var(--font-sans);
14
+ --default-mono-font-family: var(--font-mono);
15
+ --font-weight-500: var(--font-weight-500);
16
+ --font-weight-600: var(--font-weight-600);
17
+ --font-weight-700: var(--font-weight-700);
18
+ }
19
+ }
20
+ @layer base {
21
+ *, ::after, ::before, ::backdrop, ::file-selector-button {
22
+ box-sizing: border-box;
23
+ margin: 0;
24
+ padding: 0;
25
+ border: 0 solid;
26
+ }
27
+ html, :host {
28
+ line-height: 1.5;
29
+ -webkit-text-size-adjust: 100%;
30
+ tab-size: 4;
31
+ font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
32
+ font-feature-settings: var(--default-font-feature-settings, normal);
33
+ font-variation-settings: var(--default-font-variation-settings, normal);
34
+ -webkit-tap-highlight-color: transparent;
35
+ }
36
+ hr {
37
+ height: 0;
38
+ color: inherit;
39
+ border-top-width: 1px;
40
+ }
41
+ abbr:where([title]) {
42
+ -webkit-text-decoration: underline dotted;
43
+ text-decoration: underline dotted;
44
+ }
45
+ h1, h2, h3, h4, h5, h6 {
46
+ font-size: inherit;
47
+ font-weight: inherit;
48
+ }
49
+ a {
50
+ color: inherit;
51
+ -webkit-text-decoration: inherit;
52
+ text-decoration: inherit;
53
+ }
54
+ b, strong {
55
+ font-weight: bolder;
56
+ }
57
+ code, kbd, samp, pre {
58
+ font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
59
+ font-feature-settings: var(--default-mono-font-feature-settings, normal);
60
+ font-variation-settings: var(--default-mono-font-variation-settings, normal);
61
+ font-size: 1em;
62
+ }
63
+ small {
64
+ font-size: 80%;
65
+ }
66
+ sub, sup {
67
+ font-size: 75%;
68
+ line-height: 0;
69
+ position: relative;
70
+ vertical-align: baseline;
71
+ }
72
+ sub {
73
+ bottom: -0.25em;
74
+ }
75
+ sup {
76
+ top: -0.5em;
77
+ }
78
+ table {
79
+ text-indent: 0;
80
+ border-color: inherit;
81
+ border-collapse: collapse;
82
+ }
83
+ :-moz-focusring {
84
+ outline: auto;
85
+ }
86
+ progress {
87
+ vertical-align: baseline;
88
+ }
89
+ summary {
90
+ display: list-item;
91
+ }
92
+ ol, ul, menu {
93
+ list-style: none;
94
+ }
95
+ img, svg, video, canvas, audio, iframe, embed, object {
96
+ display: block;
97
+ vertical-align: middle;
98
+ }
99
+ img, video {
100
+ max-width: 100%;
101
+ height: auto;
102
+ }
103
+ button, input, select, optgroup, textarea, ::file-selector-button {
104
+ font: inherit;
105
+ font-feature-settings: inherit;
106
+ font-variation-settings: inherit;
107
+ letter-spacing: inherit;
108
+ color: inherit;
109
+ border-radius: 0;
110
+ background-color: transparent;
111
+ opacity: 1;
112
+ }
113
+ :where(select:is([multiple], [size])) optgroup {
114
+ font-weight: bolder;
115
+ }
116
+ :where(select:is([multiple], [size])) optgroup option {
117
+ padding-inline-start: 20px;
118
+ }
119
+ ::file-selector-button {
120
+ margin-inline-end: 4px;
121
+ }
122
+ ::placeholder {
123
+ opacity: 1;
124
+ }
125
+ @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
126
+ ::placeholder {
127
+ color: currentcolor;
128
+ @supports (color: color-mix(in lab, red, red)) {
129
+ color: color-mix(in oklab, currentcolor 50%, transparent);
130
+ }
131
+ }
132
+ }
133
+ textarea {
134
+ resize: vertical;
135
+ }
136
+ ::-webkit-search-decoration {
137
+ -webkit-appearance: none;
138
+ }
139
+ ::-webkit-date-and-time-value {
140
+ min-height: 1lh;
141
+ text-align: inherit;
142
+ }
143
+ ::-webkit-datetime-edit {
144
+ display: inline-flex;
145
+ }
146
+ ::-webkit-datetime-edit-fields-wrapper {
147
+ padding: 0;
148
+ }
149
+ ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
150
+ padding-block: 0;
151
+ }
152
+ ::-webkit-calendar-picker-indicator {
153
+ line-height: 1;
154
+ }
155
+ :-moz-ui-invalid {
156
+ box-shadow: none;
157
+ }
158
+ button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
159
+ appearance: button;
160
+ }
161
+ ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
162
+ height: auto;
163
+ }
164
+ [hidden]:where(:not([hidden="until-found"])) {
165
+ display: none !important;
166
+ }
167
+ }
168
+ @layer utilities {
169
+ .absolute {
170
+ position: absolute;
171
+ }
172
+ .relative {
173
+ position: relative;
174
+ }
175
+ .top-1\/2 {
176
+ top: calc(1/2 * 100%);
177
+ }
178
+ .right-3 {
179
+ right: calc(var(--spacing) * 3);
180
+ }
181
+ .left-3 {
182
+ left: calc(var(--spacing) * 3);
183
+ }
184
+ .flex {
185
+ display: flex;
186
+ }
187
+ .grid {
188
+ display: grid;
189
+ }
190
+ .h-4 {
191
+ height: calc(var(--spacing) * 4);
192
+ }
193
+ .h-\[34px\] {
194
+ height: 34px;
195
+ }
196
+ .h-full {
197
+ height: 100%;
198
+ }
199
+ .w-4 {
200
+ width: calc(var(--spacing) * 4);
201
+ }
202
+ .w-full {
203
+ width: 100%;
204
+ }
205
+ .max-w-\[500px\] {
206
+ max-width: 500px;
207
+ }
208
+ .flex-1 {
209
+ flex: 1;
210
+ }
211
+ .-translate-y-1\/2 {
212
+ --tw-translate-y: calc(calc(1/2 * 100%) * -1);
213
+ translate: var(--tw-translate-x) var(--tw-translate-y);
214
+ }
215
+ .cursor-pointer {
216
+ cursor: pointer;
217
+ }
218
+ .grid-rows-\[auto_1fr\] {
219
+ grid-template-rows: auto 1fr;
220
+ }
221
+ .items-center {
222
+ align-items: center;
223
+ }
224
+ .gap-2 {
225
+ gap: calc(var(--spacing) * 2);
226
+ }
227
+ .truncate {
228
+ overflow: hidden;
229
+ text-overflow: ellipsis;
230
+ white-space: nowrap;
231
+ }
232
+ .border-0 {
233
+ border-style: var(--tw-border-style);
234
+ border-width: 0px;
235
+ }
236
+ .border-b {
237
+ border-bottom-style: var(--tw-border-style);
238
+ border-bottom-width: 1px;
239
+ }
240
+ .bg-muted-foreground\/10 {
241
+ background-color: var(--muted-foreground);
242
+ @supports (color: color-mix(in lab, red, red)) {
243
+ background-color: color-mix(in oklab, var(--muted-foreground) 10%, transparent);
244
+ }
245
+ }
246
+ .p-2 {
247
+ padding: calc(var(--spacing) * 2);
248
+ }
249
+ .px-9 {
250
+ padding-inline: calc(var(--spacing) * 9);
251
+ }
252
+ .font-mono {
253
+ font-family: var(--font-mono);
254
+ }
255
+ .font-medium {
256
+ --tw-font-weight: var(--font-weight-medium);
257
+ font-weight: var(--font-weight-medium);
258
+ }
259
+ .font-semibold {
260
+ --tw-font-weight: var(--font-weight-semibold);
261
+ font-weight: var(--font-weight-semibold);
262
+ }
263
+ .whitespace-nowrap {
264
+ white-space: nowrap;
265
+ }
266
+ .text-muted-foreground {
267
+ color: var(--muted-foreground);
268
+ }
269
+ .text-muted-foreground\/50 {
270
+ color: var(--muted-foreground);
271
+ @supports (color: color-mix(in lab, red, red)) {
272
+ color: color-mix(in oklab, var(--muted-foreground) 50%, transparent);
273
+ }
274
+ }
275
+ .capitalize {
276
+ text-transform: capitalize;
277
+ }
278
+ .hover\:bg-muted-foreground\/10 {
279
+ &:hover {
280
+ @media (hover: hover) {
281
+ background-color: var(--muted-foreground);
282
+ @supports (color: color-mix(in lab, red, red)) {
283
+ background-color: color-mix(in oklab, var(--muted-foreground) 10%, transparent);
284
+ }
285
+ }
286
+ }
287
+ }
288
+ .hover\:bg-muted-foreground\/20 {
289
+ &:hover {
290
+ @media (hover: hover) {
291
+ background-color: var(--muted-foreground);
292
+ @supports (color: color-mix(in lab, red, red)) {
293
+ background-color: color-mix(in oklab, var(--muted-foreground) 20%, transparent);
294
+ }
295
+ }
296
+ }
297
+ }
298
+ .hover\:text-muted-foreground {
299
+ &:hover {
300
+ @media (hover: hover) {
301
+ color: var(--muted-foreground);
302
+ }
303
+ }
304
+ }
305
+ .hover\:text-primary {
306
+ &:hover {
307
+ @media (hover: hover) {
308
+ color: var(--primary);
309
+ }
310
+ }
311
+ }
312
+ }
313
+ :root {
314
+ --default-font-family: 'DM Sans', ui-sans-serif, sans-serif;
315
+ --font-dm-mono: 'DM Mono', ui-monospace, monospace;
316
+ line-height: 1.5;
317
+ font-size: 16px;
318
+ color-scheme: light dark;
319
+ font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"), serif;
320
+ font-synthesis: none;
321
+ text-rendering: optimizeLegibility;
322
+ -webkit-font-smoothing: antialiased;
323
+ -moz-osx-font-smoothing: grayscale;
324
+ width: 100%;
325
+ font-optical-sizing: auto;
326
+ --font-weight-500: 500;
327
+ --font-weight-600: 600;
328
+ --font-weight-700: 700;
329
+ --accent-1000: #2862fe;
330
+ --accent-970: #2862fef7;
331
+ --accent-950: #2862fef2;
332
+ --accent-900: #2862fee5;
333
+ --accent-800: #2862fecc;
334
+ --accent-700: #2862feb2;
335
+ --accent-600: #2862fe99;
336
+ --accent-500: #2862fe80;
337
+ --accent-400: #2862fe66;
338
+ --accent-300: #2862fe4d;
339
+ --accent-200: #2862fe33;
340
+ --accent-100: #2862fe1a;
341
+ --accent-50: #2862fe0d;
342
+ --accent-30: #2862fe08;
343
+ --dark-1000: #0a0a0a;
344
+ --dark-970: #0a0a0af7;
345
+ --dark-950: #0a0a0af2;
346
+ --dark-900: #0a0a0ae5;
347
+ --dark-800: #0a0a0acc;
348
+ --dark-700: #0a0a0ab2;
349
+ --dark-600: #0a0a0a99;
350
+ --dark-500: #0a0a0a80;
351
+ --dark-400: #0a0a0a66;
352
+ --dark-300: #0a0a0a4d;
353
+ --dark-200: #0a0a0a33;
354
+ --dark-100: #0a0a0a1a;
355
+ --dark-50: #0a0a0a0d;
356
+ --dark-30: #0a0a0a08;
357
+ --light-1000: #ffffff;
358
+ --light-970: #fffffff7;
359
+ --light-950: #fffffff2;
360
+ --light-900: #ffffffe5;
361
+ --light-800: #ffffffcc;
362
+ --light-700: #ffffffb2;
363
+ --light-600: #ffffff99;
364
+ --light-500: #ffffff80;
365
+ --light-400: #ffffff66;
366
+ --light-300: #ffffff4d;
367
+ --light-200: #ffffff33;
368
+ --light-100: #ffffff1a;
369
+ --light-50: #ffffff0d;
370
+ --light-30: #ffffff08;
371
+ --error: #d61355;
372
+ --canvas-background: #EBEBEB;
373
+ --background: var(--light-1000);
374
+ --foreground: var(--dark-1000);
375
+ --surface-content: var(--dark-30);
376
+ --surface-component: var(--dark-50);
377
+ --surface-light-100: var(--dark-100);
378
+ --surface-light-200: var(--dark-200);
379
+ --border: var(--dark-100);
380
+ --border-accent: var(--accent-1000);
381
+ --states-hover: var(--dark-30);
382
+ --states-selected: var(--dark-100);
383
+ --states-active: var(--accent-1000);
384
+ --text-header: var(--dark-1000);
385
+ --text-body: var(--dark-600);
386
+ --text-placeholder: var(--dark-400);
387
+ --text-accent: var(--accent-1000);
388
+ --text-error: var(--error);
389
+ --icon-active: var(--dark-1000);
390
+ --icon-light: var(--dark-600);
391
+ --icon-component: var(--dark-400);
392
+ --icon-accent: var(--accent-1000);
393
+ --primary: var(--accent-1000);
394
+ --primary-foreground: var(--light-1000);
395
+ --secondary: var(--surface-component);
396
+ --secondary-foreground: var(--text-body);
397
+ --muted: var(--surface-light-100);
398
+ --muted-foreground: var(--text-body);
399
+ --accent: var(--accent-1000);
400
+ --accent-foreground: var(--light-1000);
401
+ --destructive: var(--error);
402
+ --destructive-foreground: var(--light-1000);
403
+ --card: var(--surface-content);
404
+ --card-foreground: var(--foreground);
405
+ --popover: var(--surface-content);
406
+ --popover-foreground: var(--foreground);
407
+ --input: var(--states-hover);
408
+ --ring: var(--border-accent);
409
+ --chart-1: var(--accent-1000);
410
+ --chart-2: var(--accent-800);
411
+ --chart-3: var(--accent-600);
412
+ --chart-4: var(--accent-400);
413
+ --chart-5: var(--accent-200);
414
+ --header: var(--background);
415
+ --header-foreground: var(--text-header);
416
+ --header-primary: var(--primary);
417
+ --header-primary-foreground: var(--primary-foreground);
418
+ --header-accent: var(--surface-component);
419
+ --header-accent-foreground: var(--text-body);
420
+ --header-border: var(--border);
421
+ --header-ring: var(--ring);
422
+ --sidebar: var(--background);
423
+ --sidebar-foreground: var(--text-header);
424
+ --sidebar-primary: var(--primary);
425
+ --sidebar-primary-foreground: var(--primary-foreground);
426
+ --sidebar-accent: var(--surface-component);
427
+ --sidebar-accent-foreground: var(--text-body);
428
+ --sidebar-border: var(--border);
429
+ --sidebar-ring: var(--ring);
430
+ }
431
+ .dark {
432
+ --canvas-background: #030303;
433
+ --background: var(--dark-1000);
434
+ --foreground: var(--light-1000);
435
+ --surface-content: var(--light-30);
436
+ --surface-component: var(--light-50);
437
+ --surface-light-100: var(--light-100);
438
+ --surface-light-200: var(--light-200);
439
+ --border: var(--light-100);
440
+ --states-hover: var(--light-30);
441
+ --states-selected: var(--light-100);
442
+ --text-header: var(--light-1000);
443
+ --text-body: var(--light-600);
444
+ --text-placeholder: var(--light-400);
445
+ --icon-active: var(--light-1000);
446
+ --icon-light: var(--light-600);
447
+ --icon-component: var(--light-400);
448
+ --secondary-foreground: var(--light-600);
449
+ --muted-foreground: var(--light-600);
450
+ --card: var(--surface-content);
451
+ --card-foreground: var(--foreground);
452
+ --popover: var(--surface-content);
453
+ --popover-foreground: var(--foreground);
454
+ --input: var(--states-hover);
455
+ --ring: var(--border-accent);
456
+ --chart-1: var(--accent-1000);
457
+ --chart-2: var(--accent-800);
458
+ --chart-3: var(--accent-600);
459
+ --chart-4: var(--accent-400);
460
+ --chart-5: var(--accent-200);
461
+ --header: var(--background);
462
+ --header-foreground: var(--text-header);
463
+ --header-primary: var(--primary);
464
+ --header-primary-foreground: var(--primary-foreground);
465
+ --header-accent: var(--surface-component);
466
+ --header-accent-foreground: var(--text-body);
467
+ --header-border: var(--border);
468
+ --header-ring: var(--ring);
469
+ --sidebar: var(--background);
470
+ --sidebar-foreground: var(--text-header);
471
+ --sidebar-primary: var(--primary);
472
+ --sidebar-primary-foreground: var(--primary-foreground);
473
+ --sidebar-accent: var(--surface-component);
474
+ --sidebar-accent-foreground: var(--text-body);
475
+ --sidebar-border: var(--border);
476
+ --sidebar-ring: var(--ring);
477
+ }
478
+ @layer base {
479
+ * {
480
+ border-color: var(--border);
481
+ }
482
+ body {
483
+ background-color: var(--background);
484
+ color: var(--foreground);
485
+ }
486
+ }
487
+ @layer theme, base, components, utilities;
488
+ @layer theme;
489
+ @layer base {
490
+ *, ::after, ::before, ::backdrop, ::file-selector-button {
491
+ box-sizing: border-box;
492
+ margin: 0;
493
+ padding: 0;
494
+ border: 0 solid;
495
+ }
496
+ html, :host {
497
+ line-height: 1.5;
498
+ -webkit-text-size-adjust: 100%;
499
+ tab-size: 4;
500
+ font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
501
+ font-feature-settings: var(--default-font-feature-settings, normal);
502
+ font-variation-settings: var(--default-font-variation-settings, normal);
503
+ -webkit-tap-highlight-color: transparent;
504
+ }
505
+ hr {
506
+ height: 0;
507
+ color: inherit;
508
+ border-top-width: 1px;
509
+ }
510
+ abbr:where([title]) {
511
+ -webkit-text-decoration: underline dotted;
512
+ text-decoration: underline dotted;
513
+ }
514
+ h1, h2, h3, h4, h5, h6 {
515
+ font-size: inherit;
516
+ font-weight: inherit;
517
+ }
518
+ a {
519
+ color: inherit;
520
+ -webkit-text-decoration: inherit;
521
+ text-decoration: inherit;
522
+ }
523
+ b, strong {
524
+ font-weight: bolder;
525
+ }
526
+ code, kbd, samp, pre {
527
+ font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
528
+ font-feature-settings: var(--default-mono-font-feature-settings, normal);
529
+ font-variation-settings: var(--default-mono-font-variation-settings, normal);
530
+ font-size: 1em;
531
+ }
532
+ small {
533
+ font-size: 80%;
534
+ }
535
+ sub, sup {
536
+ font-size: 75%;
537
+ line-height: 0;
538
+ position: relative;
539
+ vertical-align: baseline;
540
+ }
541
+ sub {
542
+ bottom: -0.25em;
543
+ }
544
+ sup {
545
+ top: -0.5em;
546
+ }
547
+ table {
548
+ text-indent: 0;
549
+ border-color: inherit;
550
+ border-collapse: collapse;
551
+ }
552
+ :-moz-focusring {
553
+ outline: auto;
554
+ }
555
+ progress {
556
+ vertical-align: baseline;
557
+ }
558
+ summary {
559
+ display: list-item;
560
+ }
561
+ ol, ul, menu {
562
+ list-style: none;
563
+ }
564
+ img, svg, video, canvas, audio, iframe, embed, object {
565
+ display: block;
566
+ vertical-align: middle;
567
+ }
568
+ img, video {
569
+ max-width: 100%;
570
+ height: auto;
571
+ }
572
+ button, input, select, optgroup, textarea, ::file-selector-button {
573
+ font: inherit;
574
+ font-feature-settings: inherit;
575
+ font-variation-settings: inherit;
576
+ letter-spacing: inherit;
577
+ color: inherit;
578
+ border-radius: 0;
579
+ background-color: transparent;
580
+ opacity: 1;
581
+ }
582
+ :where(select:is([multiple], [size])) optgroup {
583
+ font-weight: bolder;
584
+ }
585
+ :where(select:is([multiple], [size])) optgroup option {
586
+ padding-inline-start: 20px;
587
+ }
588
+ ::file-selector-button {
589
+ margin-inline-end: 4px;
590
+ }
591
+ ::placeholder {
592
+ opacity: 1;
593
+ }
594
+ @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
595
+ ::placeholder {
596
+ color: currentcolor;
597
+ @supports (color: color-mix(in lab, red, red)) {
598
+ color: color-mix(in oklab, currentcolor 50%, transparent);
599
+ }
600
+ }
601
+ }
602
+ textarea {
603
+ resize: vertical;
604
+ }
605
+ ::-webkit-search-decoration {
606
+ -webkit-appearance: none;
607
+ }
608
+ ::-webkit-date-and-time-value {
609
+ min-height: 1lh;
610
+ text-align: inherit;
611
+ }
612
+ ::-webkit-datetime-edit {
613
+ display: inline-flex;
614
+ }
615
+ ::-webkit-datetime-edit-fields-wrapper {
616
+ padding: 0;
617
+ }
618
+ ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
619
+ padding-block: 0;
620
+ }
621
+ ::-webkit-calendar-picker-indicator {
622
+ line-height: 1;
623
+ }
624
+ :-moz-ui-invalid {
625
+ box-shadow: none;
626
+ }
627
+ button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
628
+ appearance: button;
629
+ }
630
+ ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
631
+ height: auto;
632
+ }
633
+ [hidden]:where(:not([hidden="until-found"])) {
634
+ display: none !important;
635
+ }
636
+ }
637
+ @layer utilities;
638
+ .json-view {
639
+ background-color: transparent !important;
640
+ }
641
+ @property --tw-translate-x {
642
+ syntax: "*";
643
+ inherits: false;
644
+ initial-value: 0;
645
+ }
646
+ @property --tw-translate-y {
647
+ syntax: "*";
648
+ inherits: false;
649
+ initial-value: 0;
650
+ }
651
+ @property --tw-translate-z {
652
+ syntax: "*";
653
+ inherits: false;
654
+ initial-value: 0;
655
+ }
656
+ @property --tw-border-style {
657
+ syntax: "*";
658
+ inherits: false;
659
+ initial-value: solid;
660
+ }
661
+ @property --tw-font-weight {
662
+ syntax: "*";
663
+ inherits: false;
664
+ }
665
+ @layer properties {
666
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
667
+ *, ::before, ::after, ::backdrop {
668
+ --tw-translate-x: 0;
669
+ --tw-translate-y: 0;
670
+ --tw-translate-z: 0;
671
+ --tw-border-style: solid;
672
+ --tw-font-weight: initial;
673
+ }
674
+ }
675
+ }
@@ -0,0 +1,11 @@
1
+ export type Log = {
2
+ id: string;
3
+ level: string;
4
+ time: number;
5
+ msg: string;
6
+ step: string;
7
+ traceId: string;
8
+ flows: string[];
9
+ [key: string]: any;
10
+ };
11
+ //# sourceMappingURL=log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/types/log.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,GAAG;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/types/log.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const formatTimestamp: (time: number) => string;
2
+ //# sourceMappingURL=format-timestamp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-timestamp.d.ts","sourceRoot":"","sources":["../../src/utils/format-timestamp.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,WAG3C,CAAA"}
@@ -0,0 +1,5 @@
1
+ export const formatTimestamp = (time) => {
2
+ const date = new Date(Number(time));
3
+ return `${date.toLocaleDateString('en-US', { year: undefined, month: 'short', day: '2-digit' })}, ${date.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', second: '2-digit', hourCycle: 'h24' })}.${date.getMilliseconds().toString().padStart(3, '0')}`;
4
+ };
5
+ //# sourceMappingURL=format-timestamp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-timestamp.js","sourceRoot":"","sources":["../../src/utils/format-timestamp.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,EAAE;IAC9C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;IACnC,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,KAAK,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAA;AAC3Q,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const initLogListener: () => void;
2
+ //# sourceMappingURL=init-log-listener.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-log-listener.d.ts","sourceRoot":"","sources":["../../src/utils/init-log-listener.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,YAK3B,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { Stream } from '@motiadev/stream-client-browser';
2
+ import { useLogsStore } from '../stores/use-logs-store';
3
+ const streamName = '__motia.logs';
4
+ const groupId = 'default';
5
+ const type = 'log';
6
+ export const initLogListener = () => {
7
+ const stream = new Stream(window.location.origin.replace('http', 'ws'));
8
+ const subscription = stream.subscribeGroup(streamName, groupId);
9
+ subscription.onEvent(type, useLogsStore.getState().addLog);
10
+ };
11
+ //# sourceMappingURL=init-log-listener.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-log-listener.js","sourceRoot":"","sources":["../../src/utils/init-log-listener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,MAAM,UAAU,GAAG,cAAc,CAAA;AACjC,MAAM,OAAO,GAAG,SAAS,CAAA;AACzB,MAAM,IAAI,GAAG,KAAK,CAAA;AAElB,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAA;IACvE,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IAE/D,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAA;AAC5D,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@motiadev/plugin-logs",
3
+ "version": "0.8.2-beta.140-957262",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": "./dist/index.js",
9
+ "./styles.css": "./dist/styles.css"
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "dependencies": {
15
+ "lucide-react": "^0.545.0",
16
+ "react18-json-view": "^0.2.9",
17
+ "zustand": "^5.0.8",
18
+ "@motiadev/stream-client-browser": "0.8.2-beta.140-957262",
19
+ "@motiadev/ui": "0.8.2-beta.140-957262"
20
+ },
21
+ "devDependencies": {
22
+ "@tailwindcss/postcss": "^4.1.14",
23
+ "@types/node": "^24.7.0",
24
+ "@types/react": "^19.2.2",
25
+ "postcss": "^8.5.6",
26
+ "postcss-cli": "^11.0.1",
27
+ "react": "^19.2.0",
28
+ "tailwindcss": "^4.1.14",
29
+ "typescript": "^5.9.3"
30
+ },
31
+ "scripts": {
32
+ "build": "npm run build:css && tsc",
33
+ "build:css": "postcss src/styles.css -o dist/styles.css",
34
+ "dev": "npm run build:css && npm run dev:parallel",
35
+ "dev:parallel": "npm run dev:css & tsc --watch",
36
+ "dev:css": "postcss src/styles.css -o dist/styles.css --watch",
37
+ "clean": "rm -rf dist"
38
+ }
39
+ }