git-trace 0.1.0
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/.tracerc.example +38 -0
- package/README.md +136 -0
- package/bun.lock +511 -0
- package/bunchee.config.ts +11 -0
- package/cli/index.ts +251 -0
- package/cli/parser.ts +76 -0
- package/cli/tsconfig.json +6 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +858 -0
- package/dist/config.cjs +66 -0
- package/dist/config.d.ts +15 -0
- package/dist/config.js +63 -0
- package/dist/highlight/index.cjs +770 -0
- package/dist/highlight/index.d.ts +26 -0
- package/dist/highlight/index.js +766 -0
- package/dist/index.cjs +849 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +845 -0
- package/examples/demo/App.tsx +78 -0
- package/examples/demo/index.html +12 -0
- package/examples/demo/main.tsx +10 -0
- package/examples/demo/mockData.ts +170 -0
- package/examples/demo/styles.css +103 -0
- package/examples/demo/tsconfig.json +21 -0
- package/examples/demo/tsconfig.node.json +10 -0
- package/examples/demo/vite.config.ts +20 -0
- package/package.json +58 -0
- package/src/Trace.tsx +717 -0
- package/src/cache.ts +118 -0
- package/src/config.ts +51 -0
- package/src/entries/config.ts +7 -0
- package/src/entries/gitea.ts +4 -0
- package/src/entries/github.ts +5 -0
- package/src/entries/gitlab.ts +4 -0
- package/src/gitea.ts +58 -0
- package/src/github.ts +100 -0
- package/src/gitlab.ts +65 -0
- package/src/highlight/highlight.ts +119 -0
- package/src/highlight/index.ts +4 -0
- package/src/host.ts +32 -0
- package/src/index.ts +6 -0
- package/src/patterns.ts +6 -0
- package/src/shared.ts +108 -0
- package/src/themes.ts +98 -0
- package/src/types.ts +72 -0
- package/test/e2e.html +424 -0
- package/tsconfig.json +18 -0
- package/vercel.json +4 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
type Theme = 'dark' | 'light' | 'midnight' | 'cyber' | 'forest' | 'sunset';
|
|
4
|
+
interface ThemeColors {
|
|
5
|
+
bg: string;
|
|
6
|
+
fg: string;
|
|
7
|
+
dim: string;
|
|
8
|
+
human: string;
|
|
9
|
+
ai: string;
|
|
10
|
+
add: string;
|
|
11
|
+
remove: string;
|
|
12
|
+
border: string;
|
|
13
|
+
borderSubtle: string;
|
|
14
|
+
}
|
|
15
|
+
type Commit = {
|
|
16
|
+
hash: string;
|
|
17
|
+
message: string;
|
|
18
|
+
author: string;
|
|
19
|
+
authorType: 'human' | 'ai';
|
|
20
|
+
time: string;
|
|
21
|
+
lines: DiffLine[];
|
|
22
|
+
};
|
|
23
|
+
type DiffLine = {
|
|
24
|
+
type: 'add' | 'remove' | 'ctx';
|
|
25
|
+
content: string;
|
|
26
|
+
};
|
|
27
|
+
type AuthorTypeFilter = 'all' | 'human' | 'ai';
|
|
28
|
+
type FilterOptions = {
|
|
29
|
+
search?: string;
|
|
30
|
+
authorType?: AuthorTypeFilter;
|
|
31
|
+
dateFrom?: string;
|
|
32
|
+
dateTo?: string;
|
|
33
|
+
};
|
|
34
|
+
type TraceProps = {
|
|
35
|
+
commits?: Commit[];
|
|
36
|
+
autoPlay?: boolean;
|
|
37
|
+
interval?: number;
|
|
38
|
+
onCommit?: (commit: Commit) => void;
|
|
39
|
+
className?: string;
|
|
40
|
+
theme?: Theme;
|
|
41
|
+
filterable?: boolean;
|
|
42
|
+
defaultFilter?: FilterOptions;
|
|
43
|
+
onFilterChange?: (filter: FilterOptions) => void;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
declare function Trace({ commits, autoPlay, interval, onCommit, className, theme, filterable, defaultFilter, onFilterChange }: TraceProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
declare const themes: Record<Theme, ThemeColors>;
|
|
49
|
+
declare function themeToVars(theme: ThemeColors): Record<string, string>;
|
|
50
|
+
|
|
51
|
+
export { Trace, themeToVars, themes };
|
|
52
|
+
export type { AuthorTypeFilter, Commit, DiffLine, FilterOptions, Theme, ThemeColors, TraceProps };
|