@codemod.com/report-ui 0.0.2 → 0.0.3

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.
@@ -0,0 +1,11 @@
1
+ import { ColumnDef } from '@tanstack/react-table';
2
+ interface DataTableProps<TData, TValue> {
3
+ columns: ColumnDef<TData, TValue>[];
4
+ data: TData[];
5
+ searchPlaceholder?: string;
6
+ searchColumn?: string;
7
+ globalFilter?: boolean;
8
+ pageSize?: number;
9
+ }
10
+ export declare function DataTable<TData, TValue>({ columns, data, searchPlaceholder, searchColumn, globalFilter, pageSize, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ReportFileDiff } from '../types';
2
+ interface Props {
3
+ diffs: ReportFileDiff[];
4
+ }
5
+ export declare function DiffViewer({ diffs }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ReportFileDiff } from '../types';
2
+ interface Props {
3
+ diffs: ReportFileDiff[];
4
+ }
5
+ export declare function FileList({ diffs }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ReportMetricEntry } from '../types';
2
+ interface Props {
3
+ metrics: Record<string, ReportMetricEntry[]>;
4
+ }
5
+ export declare function MetricsSection({ metrics }: Props): import("react/jsx-runtime").JSX.Element | null;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import { ExecutionReport } from '../types';
2
+ export declare function ReportHeader({ report }: {
3
+ report: ExecutionReport;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ExecutionReport } from '../types';
2
+ export interface ReportViewerProps {
3
+ data: ExecutionReport;
4
+ actions?: React.ReactNode;
5
+ }
6
+ export declare function ReportViewer({ data, actions }: ReportViewerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ReportStats } from '../types';
2
+ interface Props {
3
+ stats: ReportStats;
4
+ dryRun: boolean;
5
+ }
6
+ export declare function StatsCards({ stats, dryRun }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,18 @@
1
+ export { ReportViewer } from './components/report-viewer';
2
+ export type { ReportViewerProps } from './components/report-viewer';
3
+ export { ReportHeader } from './components/report-header';
4
+ export { StatsCards } from './components/stats-cards';
5
+ export { MetricsSection } from './components/metrics-section';
6
+ export { FileList } from './components/file-list';
7
+ export { DiffViewer } from './components/diff-viewer';
8
+ export { DataTable } from './components/data-table';
9
+ export type { ExecutionReport, ReportStats, ReportMetricEntry, ReportFileDiff, } from './types';
10
+ export { Button } from '../../ui/src/button';
11
+ export type { ButtonProps } from '../../ui/src/button';
12
+ export { Input } from '../../ui/src/input';
13
+ export { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../../ui/src/select';
14
+ export { Badge } from '../../ui/src/badge';
15
+ export { Card, CardContent, CardHeader, CardTitle, CardDescription, } from '../../ui/src/card';
16
+ export { Tabs, TabsContent, TabsList, TabsTrigger } from '../../ui/src/tabs';
17
+ export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '../../ui/src/table';
18
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from '../../ui/src/dropdown-menu';
@@ -0,0 +1,33 @@
1
+ export interface ReportStats {
2
+ filesModified: number;
3
+ filesUnmodified: number;
4
+ filesWithErrors: number;
5
+ totalAdditions: number;
6
+ totalDeletions: number;
7
+ }
8
+ export interface ReportMetricEntry {
9
+ cardinality: Record<string, string>;
10
+ count: number;
11
+ }
12
+ export interface ReportFileDiff {
13
+ path: string;
14
+ diffText?: string | null;
15
+ additions: number;
16
+ deletions: number;
17
+ }
18
+ export interface ExecutionReport {
19
+ version: number;
20
+ id: string;
21
+ codemodName: string;
22
+ codemodVersion?: string;
23
+ executedAt: string;
24
+ durationMs: number;
25
+ dryRun: boolean;
26
+ targetPath: string;
27
+ cliVersion: string;
28
+ os: string;
29
+ arch: string;
30
+ stats: ReportStats;
31
+ metrics: Record<string, ReportMetricEntry[]>;
32
+ diffs: ReportFileDiff[];
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemod.com/report-ui",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -25,6 +25,7 @@
25
25
  "@vitejs/plugin-react": "^5.1.1",
26
26
  "lucide-react": "^0.540.0",
27
27
  "typescript": "^5.9.3",
28
+ "unplugin-dts": "1.0.0-beta.6",
28
29
  "vite": "^6.1.0",
29
30
  "@acme/ui": "0.1.0"
30
31
  },