Skip to content

Commit fb4667e

Browse files
committed
chore(package): 更新依赖包
更新 package.json 和 pnpm-lock.yaml,并添加 src/react-syntax-highlighter.d.ts 文件
1 parent e2dc587 commit fb4667e

4 files changed

Lines changed: 147 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"@tauri-apps/cli": "^2",
3232
"@types/react": "^19.1.8",
3333
"@types/react-dom": "^19.1.6",
34+
"@types/react-syntax-highlighter": "^15.5.13",
3435
"@vitejs/plugin-react": "^4.6.0",
3536
"autoprefixer": "^10.4.17",
3637
"postcss": "^8.4.35",

pnpm-lock.yaml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/RepoView.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { ShortcutHelp } from './ShortcutHelp';
1414
import { SubmodulePanel } from './SubmodulePanel';
1515
import { LfsPanel } from './LfsPanel';
1616
import { SubtreePanel } from './SubtreePanel';
17-
import { AlertCircle, Upload, RotateCcw, Download, GitGraph, Clock, FileDiff, Archive, Tag, Globe, AlertTriangle, GitBranch, Keyboard, Box, Database, Share2 } from 'lucide-react';
17+
import { AlertCircle, Upload, RotateCcw, Download, GitGraph, Clock, FileDiff, Archive, Tag, Globe, AlertTriangle, GitBranch, Keyboard } from 'lucide-react';
1818
import { Badge } from './ui/Badge';
1919
import { Button } from './ui/Button';
2020
import { useState, useEffect } from 'react';
@@ -535,6 +535,7 @@ export function RepoView({ repoPath }: RepoViewProps) {
535535
<GitPullRequest className="w-3.5 h-3.5" />
536536
协作
537537
</button>
538+
{/*
538539
<button
539540
onClick={() => setViewMode('submodules')}
540541
className={cn(
@@ -571,6 +572,7 @@ export function RepoView({ repoPath }: RepoViewProps) {
571572
<Share2 className="w-3.5 h-3.5" />
572573
子树
573574
</button>
575+
*/}
574576
{mergeState?.isMergeInProgress && (
575577
<button
576578
onClick={() => setViewMode('conflicts')}

src/react-syntax-highlighter.d.ts

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
declare module 'react-syntax-highlighter' {
2+
import { Component } from 'react';
3+
export interface SyntaxHighlighterProps {
4+
language?: string;
5+
style?: any;
6+
children?: string | string[];
7+
customStyle?: any;
8+
codeTagProps?: any;
9+
useInlineStyles?: boolean;
10+
showLineNumbers?: boolean;
11+
showInlineLineNumbers?: boolean;
12+
startingLineNumber?: number;
13+
lineNumberContainerStyle?: any;
14+
lineNumberStyle?: any | ((lineNumber: number) => any);
15+
wrapLines?: boolean;
16+
wrapLongLines?: boolean;
17+
lineProps?: any | ((lineNumber: number) => any);
18+
renderer?: (props: { rows: any[]; stylesheet: any; useInlineStyles: boolean }) => any;
19+
PreTag?: string | Component<any>;
20+
CodeTag?: string | Component<any>;
21+
[key: string]: any;
22+
}
23+
export class Light extends Component<SyntaxHighlighterProps> {
24+
static registerLanguage(name: string, func: any): void;
25+
}
26+
export default class SyntaxHighlighter extends Component<SyntaxHighlighterProps> {}
27+
}
28+
29+
declare module 'react-syntax-highlighter/dist/esm/styles/prism' {
30+
export const vscDarkPlus: any;
31+
export const oneDark: any;
32+
export const oneLight: any;
33+
export const vs: any;
34+
export const atomDark: any;
35+
export const base16AteliersulphurpoolLight: any;
36+
export const cb: any;
37+
export const coldarkCold: any;
38+
export const coldarkDark: any;
39+
export const coy: any;
40+
export const coyWithoutShadows: any;
41+
export const darcula: any;
42+
export const dark: any;
43+
export const dracula: any;
44+
export const duotoneDark: any;
45+
export const duotoneEarth: any;
46+
export const duotoneForest: any;
47+
export const duotoneLight: any;
48+
export const duotoneSea: any;
49+
export const duotoneSpace: any;
50+
export const funky: any;
51+
export const ghcolors: any;
52+
export const gruvboxDark: any;
53+
export const gruvboxLight: any;
54+
export const holiTheme: any;
55+
export const hopscotch: any;
56+
export const lucario: any;
57+
export const materialDark: any;
58+
export const materialLight: any;
59+
export const materialOceanic: any;
60+
export const nightOwl: any;
61+
export const nord: any;
62+
export const okaidia: any;
63+
export const pojoaque: any;
64+
export const prism: any;
65+
export const shadesOfPurple: any;
66+
export const solarizedDarkAtom: any;
67+
export const solarizedlight: any;
68+
export const synthwave84: any;
69+
export const tomorrow: any;
70+
export const twilight: any;
71+
export const xonokai: any;
72+
export const zTouch: any;
73+
}
74+
75+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/tsx' {
76+
const tsx: any;
77+
export default tsx;
78+
}
79+
80+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/typescript' {
81+
const typescript: any;
82+
export default typescript;
83+
}
84+
85+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/javascript' {
86+
const javascript: any;
87+
export default javascript;
88+
}
89+
90+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/rust' {
91+
const rust: any;
92+
export default rust;
93+
}
94+
95+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/json' {
96+
const json: any;
97+
export default json;
98+
}
99+
100+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/css' {
101+
const css: any;
102+
export default css;
103+
}
104+
105+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/markdown' {
106+
const markdown: any;
107+
export default markdown;
108+
}
109+
110+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/python' {
111+
const python: any;
112+
export default python;
113+
}
114+
115+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/go' {
116+
const go: any;
117+
export default go;
118+
}
119+
120+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/java' {
121+
const java: any;
122+
export default java;
123+
}
124+
125+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/c' {
126+
const c: any;
127+
export default c;
128+
}
129+
130+
declare module 'react-syntax-highlighter/dist/esm/languages/prism/cpp' {
131+
const cpp: any;
132+
export default cpp;
133+
}

0 commit comments

Comments
 (0)