zRzRzRzRzRzRzR commited on
Commit
2eb87e3
·
1 Parent(s): 3ef4da9

feat: restore minimal Docker Space

Browse files
.dockerignore ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ .git
2
+ node_modules
3
+ dist
4
+ .env*
5
+ *.log
6
+ *.tsbuildinfo
.gitignore ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # dependencies
2
+ node_modules/
3
+
4
+ # build
5
+ dist/
6
+ *.tsbuildinfo
7
+
8
+ # env & secrets
9
+ .env
10
+ .env.*
11
+ !.env.example
12
+ *.pem
13
+ *.key
14
+ id_rsa*
15
+
16
+ # logs & local data
17
+ *.log
18
+ .data/
19
+ coverage/
20
+ .DS_Store
21
+ tmp/
22
+ /tmp/
23
+
24
+ # editor / OS
25
+ .idea/
26
+ .vscode/
27
+ *.swp
28
+
29
+ # bossmode / internal workspace artifacts (never publish)
30
+ .bossmode-attachments/
31
+ .bossmode/
32
+ *.bossmode*
33
+
34
+ # HF
35
+ .cache/
36
+ *.sqlite
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+ FROM node:22-bookworm-slim AS builder
3
+ WORKDIR /workspace
4
+ ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
5
+ RUN corepack enable && corepack prepare pnpm@9.15.4 --activate
6
+
7
+ COPY package.json pnpm-lock.yaml ./
8
+ RUN pnpm install --frozen-lockfile
9
+
10
+ COPY index.html postcss.config.js tailwind.config.js tsconfig.json vite.config.ts ./
11
+ COPY src ./src
12
+ ARG VITE_API_BASE_URL=https://openvuln.vulnhunter.pro
13
+ ARG VITE_GITHUB_REPO_URL=https://github.com/Clouditera/OpenVuln
14
+ ENV VITE_API_BASE_URL=$VITE_API_BASE_URL \
15
+ VITE_GITHUB_REPO_URL=$VITE_GITHUB_REPO_URL
16
+ RUN pnpm build
17
+
18
+ FROM nginx:1.27-alpine AS runtime
19
+ COPY nginx.conf /etc/nginx/conf.d/default.conf
20
+ COPY --from=builder /workspace/dist/ /usr/share/nginx/html/
21
+ EXPOSE 7860
22
+ HEALTHCHECK --interval=15s --timeout=3s --start-period=5s --retries=3 \
23
+ CMD wget -qO- http://127.0.0.1:7860/health >/dev/null || exit 1
LICENSE ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Clouditera
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
README.md CHANGED
@@ -1,10 +1,21 @@
1
  ---
2
  title: OpenVuln
3
- emoji: 📈
4
- colorFrom: pink
5
- colorTo: gray
6
  sdk: docker
 
7
  pinned: false
 
8
  ---
 
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: OpenVuln
3
+ emoji: 🛡️
4
+ colorFrom: gray
5
+ colorTo: red
6
  sdk: docker
7
+ app_port: 7860
8
  pinned: false
9
+ short_description: Find bugs in your repository with GLM
10
  ---
11
+ # OpenVuln
12
 
13
+ Public frontend for [OpenVuln](https://openvuln.vulnhunter.pro).
14
+
15
+ This Space is built automatically from the root `Dockerfile` and serves the
16
+ Vite application with nginx on port `7860`.
17
+
18
+ Optional Space build variables:
19
+
20
+ - `VITE_API_BASE_URL` — API origin; defaults to `https://openvuln.vulnhunter.pro`.
21
+ - `VITE_GITHUB_REPO_URL` — source repository linked from the interface.
index.html ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>OpenVuln — AI security for open source</title>
7
+ <meta
8
+ name="description"
9
+ content="AI-powered vulnerability discovery for the open-source world, by Z.ai."
10
+ />
11
+ </head>
12
+ <body class="bg-surface text-ink antialiased">
13
+ <div id="root"></div>
14
+ <script type="module" src="/src/main.tsx"></script>
15
+ </body>
16
+ </html>
nginx.conf ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ server {
2
+ listen 7860; server_name _; root /usr/share/nginx/html; index index.html;
3
+ location = /health { access_log off; default_type text/plain; return 200 "ok\n"; }
4
+ location /assets/ { try_files $uri =404; expires 30d; add_header Cache-Control "public, immutable"; }
5
+ location = /index.html { add_header Cache-Control "no-cache, no-store, must-revalidate"; }
6
+ location / { try_files $uri $uri/ /index.html; }
7
+ }
package.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "openvuln-web",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite --host 0.0.0.0 --port 5173",
8
+ "build": "tsc -b && vite build"
9
+ },
10
+ "dependencies": {
11
+ "@tanstack/react-query": "^5.62.7",
12
+ "js-yaml": "^5.2.3",
13
+ "lucide-react": "^0.469.0",
14
+ "react": "^18.3.1",
15
+ "react-dom": "^18.3.1",
16
+ "react-router-dom": "^6.28.1"
17
+ },
18
+ "devDependencies": {
19
+ "@types/js-yaml": "^4.0.9",
20
+ "@types/react": "^18.3.18",
21
+ "@types/react-dom": "^18.3.5",
22
+ "@vitejs/plugin-react": "^4.3.4",
23
+ "autoprefixer": "^10.4.20",
24
+ "postcss": "^8.4.49",
25
+ "tailwindcss": "^3.4.17",
26
+ "typescript": "^5.7.2",
27
+ "vite": "^6.0.7"
28
+ },
29
+ "engines": {
30
+ "node": ">=20",
31
+ "pnpm": ">=9"
32
+ },
33
+ "packageManager": "pnpm@9.15.4"
34
+ }
pnpm-lock.yaml ADDED
@@ -0,0 +1,1763 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ lockfileVersion: '9.0'
2
+
3
+ settings:
4
+ autoInstallPeers: true
5
+ excludeLinksFromLockfile: false
6
+
7
+ importers:
8
+
9
+ .:
10
+ dependencies:
11
+ '@tanstack/react-query':
12
+ specifier: ^5.62.7
13
+ version: 5.101.4(react@18.3.1)
14
+ js-yaml:
15
+ specifier: ^5.2.3
16
+ version: 5.2.3
17
+ lucide-react:
18
+ specifier: ^0.469.0
19
+ version: 0.469.0(react@18.3.1)
20
+ react:
21
+ specifier: ^18.3.1
22
+ version: 18.3.1
23
+ react-dom:
24
+ specifier: ^18.3.1
25
+ version: 18.3.1(react@18.3.1)
26
+ react-router-dom:
27
+ specifier: ^6.28.1
28
+ version: 6.30.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
29
+ devDependencies:
30
+ '@types/js-yaml':
31
+ specifier: ^4.0.9
32
+ version: 4.0.9
33
+ '@types/react':
34
+ specifier: ^18.3.18
35
+ version: 18.3.31
36
+ '@types/react-dom':
37
+ specifier: ^18.3.5
38
+ version: 18.3.7(@types/react@18.3.31)
39
+ '@vitejs/plugin-react':
40
+ specifier: ^4.3.4
41
+ version: 4.7.0(vite@6.4.3(jiti@1.21.7))
42
+ autoprefixer:
43
+ specifier: ^10.4.20
44
+ version: 10.5.4(postcss@8.5.26)
45
+ postcss:
46
+ specifier: ^8.4.49
47
+ version: 8.5.26
48
+ tailwindcss:
49
+ specifier: ^3.4.17
50
+ version: 3.4.19
51
+ typescript:
52
+ specifier: ^5.7.2
53
+ version: 5.9.3
54
+ vite:
55
+ specifier: ^6.0.7
56
+ version: 6.4.3(jiti@1.21.7)
57
+
58
+ packages:
59
+
60
+ '@alloc/quick-lru@5.2.0':
61
+ resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==}
62
+ engines: {node: '>=10'}
63
+
64
+ '@babel/code-frame@7.29.7':
65
+ resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==}
66
+ engines: {node: '>=6.9.0'}
67
+
68
+ '@babel/compat-data@7.29.7':
69
+ resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==}
70
+ engines: {node: '>=6.9.0'}
71
+
72
+ '@babel/core@7.29.7':
73
+ resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==}
74
+ engines: {node: '>=6.9.0'}
75
+
76
+ '@babel/generator@7.29.8':
77
+ resolution: {integrity: sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==}
78
+ engines: {node: '>=6.9.0'}
79
+
80
+ '@babel/helper-compilation-targets@7.29.7':
81
+ resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==}
82
+ engines: {node: '>=6.9.0'}
83
+
84
+ '@babel/helper-globals@7.29.7':
85
+ resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==}
86
+ engines: {node: '>=6.9.0'}
87
+
88
+ '@babel/helper-module-imports@7.29.7':
89
+ resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==}
90
+ engines: {node: '>=6.9.0'}
91
+
92
+ '@babel/helper-module-transforms@7.29.7':
93
+ resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==}
94
+ engines: {node: '>=6.9.0'}
95
+ peerDependencies:
96
+ '@babel/core': ^7.0.0
97
+
98
+ '@babel/helper-plugin-utils@7.29.7':
99
+ resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==}
100
+ engines: {node: '>=6.9.0'}
101
+
102
+ '@babel/helper-string-parser@7.29.7':
103
+ resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==}
104
+ engines: {node: '>=6.9.0'}
105
+
106
+ '@babel/helper-validator-identifier@7.29.7':
107
+ resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==}
108
+ engines: {node: '>=6.9.0'}
109
+
110
+ '@babel/helper-validator-option@7.29.7':
111
+ resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==}
112
+ engines: {node: '>=6.9.0'}
113
+
114
+ '@babel/helpers@7.29.7':
115
+ resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==}
116
+ engines: {node: '>=6.9.0'}
117
+
118
+ '@babel/parser@7.29.8':
119
+ resolution: {integrity: sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==}
120
+ engines: {node: '>=6.0.0'}
121
+ hasBin: true
122
+
123
+ '@babel/plugin-transform-react-jsx-self@7.29.7':
124
+ resolution: {integrity: sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==}
125
+ engines: {node: '>=6.9.0'}
126
+ peerDependencies:
127
+ '@babel/core': ^7.0.0-0
128
+
129
+ '@babel/plugin-transform-react-jsx-source@7.29.7':
130
+ resolution: {integrity: sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==}
131
+ engines: {node: '>=6.9.0'}
132
+ peerDependencies:
133
+ '@babel/core': ^7.0.0-0
134
+
135
+ '@babel/template@7.29.7':
136
+ resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==}
137
+ engines: {node: '>=6.9.0'}
138
+
139
+ '@babel/traverse@7.29.8':
140
+ resolution: {integrity: sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==}
141
+ engines: {node: '>=6.9.0'}
142
+
143
+ '@babel/types@7.29.8':
144
+ resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==}
145
+ engines: {node: '>=6.9.0'}
146
+
147
+ '@esbuild/aix-ppc64@0.25.12':
148
+ resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==}
149
+ engines: {node: '>=18'}
150
+ cpu: [ppc64]
151
+ os: [aix]
152
+
153
+ '@esbuild/android-arm64@0.25.12':
154
+ resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==}
155
+ engines: {node: '>=18'}
156
+ cpu: [arm64]
157
+ os: [android]
158
+
159
+ '@esbuild/android-arm@0.25.12':
160
+ resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==}
161
+ engines: {node: '>=18'}
162
+ cpu: [arm]
163
+ os: [android]
164
+
165
+ '@esbuild/android-x64@0.25.12':
166
+ resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==}
167
+ engines: {node: '>=18'}
168
+ cpu: [x64]
169
+ os: [android]
170
+
171
+ '@esbuild/darwin-arm64@0.25.12':
172
+ resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==}
173
+ engines: {node: '>=18'}
174
+ cpu: [arm64]
175
+ os: [darwin]
176
+
177
+ '@esbuild/darwin-x64@0.25.12':
178
+ resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==}
179
+ engines: {node: '>=18'}
180
+ cpu: [x64]
181
+ os: [darwin]
182
+
183
+ '@esbuild/freebsd-arm64@0.25.12':
184
+ resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==}
185
+ engines: {node: '>=18'}
186
+ cpu: [arm64]
187
+ os: [freebsd]
188
+
189
+ '@esbuild/freebsd-x64@0.25.12':
190
+ resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==}
191
+ engines: {node: '>=18'}
192
+ cpu: [x64]
193
+ os: [freebsd]
194
+
195
+ '@esbuild/linux-arm64@0.25.12':
196
+ resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==}
197
+ engines: {node: '>=18'}
198
+ cpu: [arm64]
199
+ os: [linux]
200
+
201
+ '@esbuild/linux-arm@0.25.12':
202
+ resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==}
203
+ engines: {node: '>=18'}
204
+ cpu: [arm]
205
+ os: [linux]
206
+
207
+ '@esbuild/linux-ia32@0.25.12':
208
+ resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==}
209
+ engines: {node: '>=18'}
210
+ cpu: [ia32]
211
+ os: [linux]
212
+
213
+ '@esbuild/linux-loong64@0.25.12':
214
+ resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==}
215
+ engines: {node: '>=18'}
216
+ cpu: [loong64]
217
+ os: [linux]
218
+
219
+ '@esbuild/linux-mips64el@0.25.12':
220
+ resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==}
221
+ engines: {node: '>=18'}
222
+ cpu: [mips64el]
223
+ os: [linux]
224
+
225
+ '@esbuild/linux-ppc64@0.25.12':
226
+ resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==}
227
+ engines: {node: '>=18'}
228
+ cpu: [ppc64]
229
+ os: [linux]
230
+
231
+ '@esbuild/linux-riscv64@0.25.12':
232
+ resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==}
233
+ engines: {node: '>=18'}
234
+ cpu: [riscv64]
235
+ os: [linux]
236
+
237
+ '@esbuild/linux-s390x@0.25.12':
238
+ resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==}
239
+ engines: {node: '>=18'}
240
+ cpu: [s390x]
241
+ os: [linux]
242
+
243
+ '@esbuild/linux-x64@0.25.12':
244
+ resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==}
245
+ engines: {node: '>=18'}
246
+ cpu: [x64]
247
+ os: [linux]
248
+
249
+ '@esbuild/netbsd-arm64@0.25.12':
250
+ resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==}
251
+ engines: {node: '>=18'}
252
+ cpu: [arm64]
253
+ os: [netbsd]
254
+
255
+ '@esbuild/netbsd-x64@0.25.12':
256
+ resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==}
257
+ engines: {node: '>=18'}
258
+ cpu: [x64]
259
+ os: [netbsd]
260
+
261
+ '@esbuild/openbsd-arm64@0.25.12':
262
+ resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==}
263
+ engines: {node: '>=18'}
264
+ cpu: [arm64]
265
+ os: [openbsd]
266
+
267
+ '@esbuild/openbsd-x64@0.25.12':
268
+ resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==}
269
+ engines: {node: '>=18'}
270
+ cpu: [x64]
271
+ os: [openbsd]
272
+
273
+ '@esbuild/openharmony-arm64@0.25.12':
274
+ resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==}
275
+ engines: {node: '>=18'}
276
+ cpu: [arm64]
277
+ os: [openharmony]
278
+
279
+ '@esbuild/sunos-x64@0.25.12':
280
+ resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==}
281
+ engines: {node: '>=18'}
282
+ cpu: [x64]
283
+ os: [sunos]
284
+
285
+ '@esbuild/win32-arm64@0.25.12':
286
+ resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==}
287
+ engines: {node: '>=18'}
288
+ cpu: [arm64]
289
+ os: [win32]
290
+
291
+ '@esbuild/win32-ia32@0.25.12':
292
+ resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==}
293
+ engines: {node: '>=18'}
294
+ cpu: [ia32]
295
+ os: [win32]
296
+
297
+ '@esbuild/win32-x64@0.25.12':
298
+ resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==}
299
+ engines: {node: '>=18'}
300
+ cpu: [x64]
301
+ os: [win32]
302
+
303
+ '@jridgewell/gen-mapping@0.3.13':
304
+ resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==}
305
+
306
+ '@jridgewell/remapping@2.3.5':
307
+ resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==}
308
+
309
+ '@jridgewell/resolve-uri@3.1.2':
310
+ resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
311
+ engines: {node: '>=6.0.0'}
312
+
313
+ '@jridgewell/sourcemap-codec@1.5.5':
314
+ resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==}
315
+
316
+ '@jridgewell/trace-mapping@0.3.31':
317
+ resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
318
+
319
+ '@napi-rs/lzma-linux-x64-gnu@1.5.1':
320
+ resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==}
321
+ engines: {node: ^22.20 || ^24.12 || >=25}
322
+ cpu: [x64]
323
+ os: [linux]
324
+
325
+ '@nodelib/fs.scandir@2.1.5':
326
+ resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
327
+ engines: {node: '>= 8'}
328
+
329
+ '@nodelib/fs.stat@2.0.5':
330
+ resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==}
331
+ engines: {node: '>= 8'}
332
+
333
+ '@nodelib/fs.walk@1.2.8':
334
+ resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
335
+ engines: {node: '>= 8'}
336
+
337
+ '@remix-run/router@1.23.3':
338
+ resolution: {integrity: sha512-4An71tdz9X8+3sI4Qqqd2LWd9vS39J7sqd9EU4Scw7TJE/qB10Flv/UuqbPVgfQV9XoK8Np6jNquZitnZq5i+Q==}
339
+ engines: {node: '>=14.0.0'}
340
+
341
+ '@rolldown/pluginutils@1.0.0-beta.27':
342
+ resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==}
343
+
344
+ '@rollup/rollup-android-arm-eabi@4.62.4':
345
+ resolution: {integrity: sha512-RrPokAb7dmbxFoeO3TloqHyOjgye8RkBhSqmp4aJMIex4c9r46ZstPnleDQOq1t46VOVjwIuwNogIqbodV1Vvg==}
346
+ cpu: [arm]
347
+ os: [android]
348
+
349
+ '@rollup/rollup-android-arm64@4.62.4':
350
+ resolution: {integrity: sha512-JKuJc+pnpks2pjy7L/N3v/cAkZxYlnmuZoD840ldbMI5KDbC4iO9NKwPKYdjYFCMAIIlBzYSFHxIJVYzRo2/8A==}
351
+ cpu: [arm64]
352
+ os: [android]
353
+
354
+ '@rollup/rollup-darwin-arm64@4.62.4':
355
+ resolution: {integrity: sha512-krw5uS2STmvJ02x0uTXHbqQNuz+9eZ1iw+qXk9dmW2gvV4jV7O2hEoOnuhFrpOPiel1mBFtqbxYZZtC46hXLOw==}
356
+ cpu: [arm64]
357
+ os: [darwin]
358
+
359
+ '@rollup/rollup-darwin-x64@4.62.4':
360
+ resolution: {integrity: sha512-wsTxtgApb4PrOsNJIm0FZ1h3WvCC+k9uxLJ4ad75hgoS4NiRes2SoJFlDAyMwiUY8IssDqGcHbXuN0sx1tfF1A==}
361
+ cpu: [x64]
362
+ os: [darwin]
363
+
364
+ '@rollup/rollup-freebsd-arm64@4.62.4':
365
+ resolution: {integrity: sha512-GUOnQlyZe3yAXhWOtOMsn5Qkrv5E5mZXa0thbARWi5Ei2szlVXJFQhddZ4HbAzh8q92w5twp+CQvs/eFanz9YQ==}
366
+ cpu: [arm64]
367
+ os: [freebsd]
368
+
369
+ '@rollup/rollup-freebsd-x64@4.62.4':
370
+ resolution: {integrity: sha512-/Y7f3QuxjzPKsjA/rfEDa3+0vXqyjmJ50Ln8dPpCmWkKTrUoWHG1cWhTqaAMLob2m2nESWuC7yGrREz019Ztqg==}
371
+ cpu: [x64]
372
+ os: [freebsd]
373
+
374
+ '@rollup/rollup-linux-arm-gnueabihf@4.62.4':
375
+ resolution: {integrity: sha512-81wiiX3v7aqy+T+bT61TJ78yJjRquqFFTTbAPt08imfQQzkPIW8t6aJbkTagtCCrXMNc9D66+geqlK7ydLPNqA==}
376
+ cpu: [arm]
377
+ os: [linux]
378
+
379
+ '@rollup/rollup-linux-arm-musleabihf@4.62.4':
380
+ resolution: {integrity: sha512-9kmDIvNZqdoHOBZgNtpTBeLWYO/LVipM3H/j62P8848/l/VPEQL6N3uxU9pvP1oZAsXyC2MEnFP3ovRjo7WYNQ==}
381
+ cpu: [arm]
382
+ os: [linux]
383
+
384
+ '@rollup/rollup-linux-arm64-gnu@4.62.4':
385
+ resolution: {integrity: sha512-CcnXHWnXg69g+DX5VWL3FHts3qMRN2uVEHX+BZvGLdd07/gXkn3ePjYtO1LDJvxkGKVHMclKBRa1QUTH+6toYQ==}
386
+ cpu: [arm64]
387
+ os: [linux]
388
+
389
+ '@rollup/rollup-linux-arm64-musl@4.62.4':
390
+ resolution: {integrity: sha512-iFOibiHnTRuhrWLlRsOQFdZJJIa7S8OwkneJr4ocALP16u5yk6lWLINFwhHaEqBFMsKDUZofLkGos7+CPzGB3g==}
391
+ cpu: [arm64]
392
+ os: [linux]
393
+
394
+ '@rollup/rollup-linux-loong64-gnu@4.62.4':
395
+ resolution: {integrity: sha512-XnWYMI7euHlb5a871xPja+Gm7DRCFU+FGRrtS2sMq9N8FvqtpagUy6gD4YOemC5MRk9xbh8+jYMEJbigFQwsgA==}
396
+ cpu: [loong64]
397
+ os: [linux]
398
+
399
+ '@rollup/rollup-linux-loong64-musl@4.62.4':
400
+ resolution: {integrity: sha512-qGDAlO0U8xedCcsdRm9oaoQY8DAx/QT7uIxJWhCdx0ceIWX783UC9QSYkdpzAe29wNiVfp24+bZdQmn49o45SQ==}
401
+ cpu: [loong64]
402
+ os: [linux]
403
+
404
+ '@rollup/rollup-linux-ppc64-gnu@4.62.4':
405
+ resolution: {integrity: sha512-ru4H6ezD7ysA5EiEK6qkkaEb4modH8CTej6kUy/gQi20u3kB3G7Zn8snXXkeJSCOFKG/rbPPtM/+9Wgas1961w==}
406
+ cpu: [ppc64]
407
+ os: [linux]
408
+
409
+ '@rollup/rollup-linux-ppc64-musl@4.62.4':
410
+ resolution: {integrity: sha512-2W4MO5WQVJnbJaZdvDb9rhBDuFU1nKIepPFpJUBsTh2k1YY2g+ODViaWuyOAjQ5cOP7NvrvLzt3wvHOoiAvc7w==}
411
+ cpu: [ppc64]
412
+ os: [linux]
413
+
414
+ '@rollup/rollup-linux-riscv64-gnu@4.62.4':
415
+ resolution: {integrity: sha512-+fxjfuoAmVMCYV5QyjoIpu0cp5DOiOTeqYFk1AVaxGr+/ravWLX89XfQmptsoWcaVy/TGf2hexzbUOrCQIL1CQ==}
416
+ cpu: [riscv64]
417
+ os: [linux]
418
+
419
+ '@rollup/rollup-linux-riscv64-musl@4.62.4':
420
+ resolution: {integrity: sha512-jTn8JfHGL4djjFxPuM06LmNUJDsst2jeVlsd9OmIH6zc5sC9K6rIuO4YajXatLUpBmBKl6b35ro1QZocLi+tcA==}
421
+ cpu: [riscv64]
422
+ os: [linux]
423
+
424
+ '@rollup/rollup-linux-s390x-gnu@4.62.4':
425
+ resolution: {integrity: sha512-oCJCJL4pXsoDcP2QZ+JVlPTIRc6266zsIaeJJsWImmF7HO0W8nb6HuSgZlMWxJwaPf8ehbSw8yo0EUw925hKsA==}
426
+ cpu: [s390x]
427
+ os: [linux]
428
+
429
+ '@rollup/rollup-linux-x64-gnu@4.62.4':
430
+ resolution: {integrity: sha512-W69hukhZ3KKNRCaMIEzKvcFye42hh0FE1+YoYaf5+Ikacuftoco6yO/xouz0hc5d5W/s3yBro5jRiuEE/Q5vUw==}
431
+ cpu: [x64]
432
+ os: [linux]
433
+
434
+ '@rollup/rollup-linux-x64-musl@4.62.4':
435
+ resolution: {integrity: sha512-qiXbGG2jkjXhzXpsFZSR2Xpb8DN/UaxYsbb/STbuR/6fpaDgRmmaq1B/LmtF2wQFOFOSsK2jdE0RZ3a0zHn4QA==}
436
+ cpu: [x64]
437
+ os: [linux]
438
+
439
+ '@rollup/rollup-openbsd-x64@4.62.4':
440
+ resolution: {integrity: sha512-nWeM//hxv8mIo6jD7Hu4o48DVmV9pbV6gsKaWU+4NFyqHoPKwrkRiZGLKUhOBk8qNmDmpwFtPKg80Bo/Tn4xiQ==}
441
+ cpu: [x64]
442
+ os: [openbsd]
443
+
444
+ '@rollup/rollup-openharmony-arm64@4.62.4':
445
+ resolution: {integrity: sha512-s62SQ/vgsRSvMwDkOEfTqfgASF0f26ZNaQuTA6Aok5lrikf89yI2W0gFHvZb2Jpgc6N8JnOKZgCK2iciO3CsxQ==}
446
+ cpu: [arm64]
447
+ os: [openharmony]
448
+
449
+ '@rollup/rollup-win32-arm64-msvc@4.62.4':
450
+ resolution: {integrity: sha512-J6wGf8TVGbXJq+HH+ttTvrcfNKPbuZecV6KT1B8I18BC5IURUh5kl4Yl5OEP5eFIUoI5BWxCsyYMhFsDx8kekw==}
451
+ cpu: [arm64]
452
+ os: [win32]
453
+
454
+ '@rollup/rollup-win32-ia32-msvc@4.62.4':
455
+ resolution: {integrity: sha512-zmfrQd/0wu6oJs8Vq8KwY/YtsKSsLtKe/HwAP4Wqy8LhWjeT55fHRAkOhYQ12wI3ayS4Tt12d5CDRD7N96SAYQ==}
456
+ cpu: [ia32]
457
+ os: [win32]
458
+
459
+ '@rollup/rollup-win32-x64-gnu@4.62.4':
460
+ resolution: {integrity: sha512-qPzHqdj9rfUD+w79dtE07zi/kFwKyCJqplp5K5ygeLTp7jLpAoc16OAH39HSmRC9UpozaecsleI8uAdEj6v2yw==}
461
+ cpu: [x64]
462
+ os: [win32]
463
+
464
+ '@rollup/rollup-win32-x64-msvc@4.62.4':
465
+ resolution: {integrity: sha512-zD6NdeWEByGE9QF9vCrlJ5YQB4oq9q91kPZS37Jwj5hOkvR1lTBSpsKhKDw4IJtbQ35LsTS1HD9DZYGKIshU1Q==}
466
+ cpu: [x64]
467
+ os: [win32]
468
+
469
+ '@tanstack/query-core@5.101.4':
470
+ resolution: {integrity: sha512-gNwcvOJcRbLWPOLG/2OBm+zM+Yv+MKsXKEOWC57USuZDEsI71hEErQsiEGx5wX9rzWWkfwM0fVSPoiIFSsxfiw==}
471
+
472
+ '@tanstack/react-query@5.101.4':
473
+ resolution: {integrity: sha512-yRg2pfOCxIs4ZJW3XYYHU/WgtD04FHSnfHlpRT7h7pR77hwkdRG4wxbKe4aq6P0RvXUTBSQpQeadS1SUYUe+KA==}
474
+ peerDependencies:
475
+ react: ^18 || ^19
476
+
477
+ '@types/babel__core@7.20.5':
478
+ resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==}
479
+
480
+ '@types/babel__generator@7.27.0':
481
+ resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==}
482
+
483
+ '@types/babel__template@7.4.4':
484
+ resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==}
485
+
486
+ '@types/babel__traverse@7.28.0':
487
+ resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==}
488
+
489
+ '@types/estree@1.0.9':
490
+ resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
491
+
492
+ '@types/js-yaml@4.0.9':
493
+ resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==}
494
+
495
+ '@types/prop-types@15.7.15':
496
+ resolution: {integrity: sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==}
497
+
498
+ '@types/react-dom@18.3.7':
499
+ resolution: {integrity: sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==}
500
+ peerDependencies:
501
+ '@types/react': ^18.0.0
502
+
503
+ '@types/react@18.3.31':
504
+ resolution: {integrity: sha512-vfEqpXTvwT91yhmwdfouStN2hSKwTvyRs8qpLfADyrq/kxDw0hZM7Wk9Ug1FELj8hIby+S/+kQCSRFF32nv2Qw==}
505
+
506
+ '@vitejs/plugin-react@4.7.0':
507
+ resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==}
508
+ engines: {node: ^14.18.0 || >=16.0.0}
509
+ peerDependencies:
510
+ vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0
511
+
512
+ any-promise@1.3.0:
513
+ resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==}
514
+
515
+ anymatch@3.1.3:
516
+ resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
517
+ engines: {node: '>= 8'}
518
+
519
+ arg@5.0.2:
520
+ resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==}
521
+
522
+ argparse@2.0.1:
523
+ resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
524
+
525
+ autoprefixer@10.5.4:
526
+ resolution: {integrity: sha512-MaU0U/za7N3r6brxD4YB/l4NSrFzLPlANv6wEuQVaIPlD3L4W9rFcQPbL/EilY9BHhHvhfcz3gInDLrEtWT4EA==}
527
+ engines: {node: ^10 || ^12 || >=14}
528
+ hasBin: true
529
+ peerDependencies:
530
+ postcss: ^8.1.0
531
+
532
+ baseline-browser-mapping@2.11.13:
533
+ resolution: {integrity: sha512-k9HNuUVMlqVjQ9UHzfPjIqiDbWw7WqT1AoT7GL8VwvF3r0ZfArtgiSPAlmupyNquNgOJHTuH4CKYf8ttMTWBTQ==}
534
+ engines: {node: '>=6.0.0'}
535
+ hasBin: true
536
+
537
+ binary-extensions@2.3.0:
538
+ resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
539
+ engines: {node: '>=8'}
540
+
541
+ braces@3.0.3:
542
+ resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
543
+ engines: {node: '>=8'}
544
+
545
+ browserslist@4.28.8:
546
+ resolution: {integrity: sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==}
547
+ engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
548
+ hasBin: true
549
+
550
+ camelcase-css@2.0.1:
551
+ resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==}
552
+ engines: {node: '>= 6'}
553
+
554
+ caniuse-lite@1.0.30001809:
555
+ resolution: {integrity: sha512-xxWVywk6a6Arlk+hymeycyn/VgqEfLDxupvhH/xiY5SJ/18kmi9o6MiO320DCUzypORHLtvh0I4i04tUhCNHNQ==}
556
+
557
+ chokidar@3.6.0:
558
+ resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
559
+ engines: {node: '>= 8.10.0'}
560
+
561
+ commander@4.1.1:
562
+ resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
563
+ engines: {node: '>= 6'}
564
+
565
+ convert-source-map@2.0.0:
566
+ resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==}
567
+
568
+ cssesc@3.0.0:
569
+ resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==}
570
+ engines: {node: '>=4'}
571
+ hasBin: true
572
+
573
+ csstype@3.2.3:
574
+ resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==}
575
+
576
+ debug@4.4.3:
577
+ resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}
578
+ engines: {node: '>=6.0'}
579
+ peerDependencies:
580
+ supports-color: '*'
581
+ peerDependenciesMeta:
582
+ supports-color:
583
+ optional: true
584
+
585
+ didyoumean@1.2.2:
586
+ resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==}
587
+
588
+ dlv@1.1.3:
589
+ resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==}
590
+
591
+ electron-to-chromium@1.5.405:
592
+ resolution: {integrity: sha512-bNglH7lPH5l+yHOes7Zr4VqxhOy4BQ9ZBUX4VdoFgxMpzJk7W1ZoO3Vgd9Pxa9PyjQ76sfm2aKH/nzEcCNRlew==}
593
+
594
+ es-errors@1.3.0:
595
+ resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
596
+ engines: {node: '>= 0.4'}
597
+
598
+ esbuild@0.25.12:
599
+ resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==}
600
+ engines: {node: '>=18'}
601
+ hasBin: true
602
+
603
+ escalade@3.2.0:
604
+ resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
605
+ engines: {node: '>=6'}
606
+
607
+ fast-glob@3.3.3:
608
+ resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
609
+ engines: {node: '>=8.6.0'}
610
+
611
+ fastq@1.20.1:
612
+ resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==}
613
+
614
+ fdir@6.5.0:
615
+ resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==}
616
+ engines: {node: '>=12.0.0'}
617
+ peerDependencies:
618
+ picomatch: ^3 || ^4
619
+ peerDependenciesMeta:
620
+ picomatch:
621
+ optional: true
622
+
623
+ fill-range@7.1.1:
624
+ resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}
625
+ engines: {node: '>=8'}
626
+
627
+ fraction.js@5.3.4:
628
+ resolution: {integrity: sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==}
629
+
630
+ fsevents@2.3.3:
631
+ resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
632
+ engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
633
+ os: [darwin]
634
+
635
+ function-bind@1.1.2:
636
+ resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
637
+
638
+ gensync@1.0.0-beta.2:
639
+ resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
640
+ engines: {node: '>=6.9.0'}
641
+
642
+ glob-parent@5.1.2:
643
+ resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
644
+ engines: {node: '>= 6'}
645
+
646
+ glob-parent@6.0.2:
647
+ resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==}
648
+ engines: {node: '>=10.13.0'}
649
+
650
+ hasown@2.0.4:
651
+ resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==}
652
+ engines: {node: '>= 0.4'}
653
+
654
+ is-binary-path@2.1.0:
655
+ resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
656
+ engines: {node: '>=8'}
657
+
658
+ is-core-module@2.16.2:
659
+ resolution: {integrity: sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==}
660
+ engines: {node: '>= 0.4'}
661
+
662
+ is-extglob@2.1.1:
663
+ resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
664
+ engines: {node: '>=0.10.0'}
665
+
666
+ is-glob@4.0.3:
667
+ resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
668
+ engines: {node: '>=0.10.0'}
669
+
670
+ is-number@7.0.0:
671
+ resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
672
+ engines: {node: '>=0.12.0'}
673
+
674
+ jiti@1.21.7:
675
+ resolution: {integrity: sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==}
676
+ hasBin: true
677
+
678
+ js-tokens@4.0.0:
679
+ resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
680
+
681
+ js-yaml@5.2.3:
682
+ resolution: {integrity: sha512-n+mUVyUX5bVv7G/G2zyIHOhdxfuU1dY2NOFzTQUWiMUbFss8b57NFlgCCaggU78wSw5KVS9cllzeLyzyR+n5nw==}
683
+ hasBin: true
684
+
685
+ jsesc@3.1.0:
686
+ resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==}
687
+ engines: {node: '>=6'}
688
+ hasBin: true
689
+
690
+ json5@2.2.3:
691
+ resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
692
+ engines: {node: '>=6'}
693
+ hasBin: true
694
+
695
+ lilconfig@3.1.3:
696
+ resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==}
697
+ engines: {node: '>=14'}
698
+
699
+ lines-and-columns@1.2.4:
700
+ resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
701
+
702
+ loose-envify@1.4.0:
703
+ resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
704
+ hasBin: true
705
+
706
+ lru-cache@5.1.1:
707
+ resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
708
+
709
+ lucide-react@0.469.0:
710
+ resolution: {integrity: sha512-28vvUnnKQ/dBwiCQtwJw7QauYnE7yd2Cyp4tTTJpvglX4EMpbflcdBgrgToX2j71B3YvugK/NH3BGUk+E/p/Fw==}
711
+ peerDependencies:
712
+ react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
713
+
714
+ merge2@1.4.1:
715
+ resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
716
+ engines: {node: '>= 8'}
717
+
718
+ micromatch@4.0.8:
719
+ resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==}
720
+ engines: {node: '>=8.6'}
721
+
722
+ ms@2.1.3:
723
+ resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
724
+
725
+ mz@2.7.0:
726
+ resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
727
+
728
+ nanoid@3.3.18:
729
+ resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==}
730
+ engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
731
+ hasBin: true
732
+
733
+ node-releases@2.0.53:
734
+ resolution: {integrity: sha512-D9UOmYG3UH1V+ENW56t5QXBwJw1YEY18ruVeus89Rw+SyIgjPkCO84bRzO3uNIYosJbNwiabWVn48o3uJLjxFQ==}
735
+ engines: {node: '>=18'}
736
+
737
+ normalize-path@3.0.0:
738
+ resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
739
+ engines: {node: '>=0.10.0'}
740
+
741
+ object-assign@4.1.1:
742
+ resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
743
+ engines: {node: '>=0.10.0'}
744
+
745
+ object-hash@3.0.0:
746
+ resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==}
747
+ engines: {node: '>= 6'}
748
+
749
+ path-parse@1.0.7:
750
+ resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
751
+
752
+ picocolors@1.1.1:
753
+ resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
754
+
755
+ picomatch@2.3.2:
756
+ resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==}
757
+ engines: {node: '>=8.6'}
758
+
759
+ picomatch@4.0.5:
760
+ resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==}
761
+ engines: {node: '>=12'}
762
+
763
+ pify@2.3.0:
764
+ resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
765
+ engines: {node: '>=0.10.0'}
766
+
767
+ pirates@4.0.7:
768
+ resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==}
769
+ engines: {node: '>= 6'}
770
+
771
+ postcss-import@15.1.0:
772
+ resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==}
773
+ engines: {node: '>=14.0.0'}
774
+ peerDependencies:
775
+ postcss: ^8.0.0
776
+
777
+ postcss-js@4.1.0:
778
+ resolution: {integrity: sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==}
779
+ engines: {node: ^12 || ^14 || >= 16}
780
+ peerDependencies:
781
+ postcss: ^8.4.21
782
+
783
+ postcss-load-config@6.0.1:
784
+ resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==}
785
+ engines: {node: '>= 18'}
786
+ peerDependencies:
787
+ jiti: '>=1.21.0'
788
+ postcss: '>=8.0.9'
789
+ tsx: ^4.8.1
790
+ yaml: ^2.4.2
791
+ peerDependenciesMeta:
792
+ jiti:
793
+ optional: true
794
+ postcss:
795
+ optional: true
796
+ tsx:
797
+ optional: true
798
+ yaml:
799
+ optional: true
800
+
801
+ postcss-nested@6.2.0:
802
+ resolution: {integrity: sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==}
803
+ engines: {node: '>=12.0'}
804
+ peerDependencies:
805
+ postcss: ^8.2.14
806
+
807
+ postcss-selector-parser@6.1.4:
808
+ resolution: {integrity: sha512-bIoJLOmjCO1S9XdY/DcnR5hJxvrDir1PbGChrzXG3vw0/FOliy/fA3dmdhQ441kah4gKv+TwckGzex6wNS5cnQ==}
809
+ engines: {node: '>=4'}
810
+
811
+ postcss-value-parser@4.2.0:
812
+ resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==}
813
+
814
+ postcss@8.5.26:
815
+ resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==}
816
+ engines: {node: ^10 || ^12 || >=14}
817
+
818
+ queue-microtask@1.2.3:
819
+ resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
820
+
821
+ react-dom@18.3.1:
822
+ resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==}
823
+ peerDependencies:
824
+ react: ^18.3.1
825
+
826
+ react-refresh@0.17.0:
827
+ resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==}
828
+ engines: {node: '>=0.10.0'}
829
+
830
+ react-router-dom@6.30.4:
831
+ resolution: {integrity: sha512-q4HvNl+mmDdkS0g+MqiBZNteQJCuimWoOyHMy4T/RQLAn9Z29+E91QXRaxOujeMl2HTzRSS0KFPd7lxX3PjV0Q==}
832
+ engines: {node: '>=14.0.0'}
833
+ peerDependencies:
834
+ react: '>=16.8'
835
+ react-dom: '>=16.8'
836
+
837
+ react-router@6.30.4:
838
+ resolution: {integrity: sha512-SVUsDe+DybHM/WmYKIVYhZh1o5Dcuf16yM6WjG02Q9XVFMZIJyHYhwrr6bFBXZkVP6z69kNkMyBCujt8FaFLJA==}
839
+ engines: {node: '>=14.0.0'}
840
+ peerDependencies:
841
+ react: '>=16.8'
842
+
843
+ react@18.3.1:
844
+ resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
845
+ engines: {node: '>=0.10.0'}
846
+
847
+ read-cache@1.0.0:
848
+ resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==}
849
+
850
+ readdirp@3.6.0:
851
+ resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
852
+ engines: {node: '>=8.10.0'}
853
+
854
+ resolve@1.22.12:
855
+ resolution: {integrity: sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==}
856
+ engines: {node: '>= 0.4'}
857
+ hasBin: true
858
+
859
+ reusify@1.1.0:
860
+ resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==}
861
+ engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
862
+
863
+ rollup@4.62.4:
864
+ resolution: {integrity: sha512-RXOqwaPsBGjMNMa4sQjDjHieHEZDFoj/Rdr46l2MU5DfEs16wHJPC2RPTPHWhNl+M3aI472LLqFkFKut4SblOg==}
865
+ engines: {node: '>=18.0.0', npm: '>=8.0.0'}
866
+ hasBin: true
867
+
868
+ run-parallel@1.2.0:
869
+ resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
870
+
871
+ scheduler@0.23.2:
872
+ resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}
873
+
874
+ semver@6.3.1:
875
+ resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}
876
+ hasBin: true
877
+
878
+ source-map-js@1.2.1:
879
+ resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
880
+ engines: {node: '>=0.10.0'}
881
+
882
+ sucrase@3.35.1:
883
+ resolution: {integrity: sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==}
884
+ engines: {node: '>=16 || 14 >=14.17'}
885
+ hasBin: true
886
+
887
+ supports-preserve-symlinks-flag@1.0.0:
888
+ resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
889
+ engines: {node: '>= 0.4'}
890
+
891
+ tailwindcss@3.4.19:
892
+ resolution: {integrity: sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==}
893
+ engines: {node: '>=14.0.0'}
894
+ hasBin: true
895
+
896
+ thenify-all@1.6.0:
897
+ resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==}
898
+ engines: {node: '>=0.8'}
899
+
900
+ thenify@3.3.1:
901
+ resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==}
902
+
903
+ tinyglobby@0.2.17:
904
+ resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==}
905
+ engines: {node: '>=12.0.0'}
906
+
907
+ to-regex-range@5.0.1:
908
+ resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
909
+ engines: {node: '>=8.0'}
910
+
911
+ ts-interface-checker@0.1.13:
912
+ resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==}
913
+
914
+ typescript@5.9.3:
915
+ resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
916
+ engines: {node: '>=14.17'}
917
+ hasBin: true
918
+
919
+ update-browserslist-db@1.3.1:
920
+ resolution: {integrity: sha512-ZZ61DsRsOnakl74HAmp3oSN4aXUmEWXf+i/yv0h7tIBfICc3VdrFErQKUUKPgu3AMsTUMbcongALEN4l6GSUrQ==}
921
+ hasBin: true
922
+ peerDependencies:
923
+ browserslist: '>= 4.21.0'
924
+
925
+ util-deprecate@1.0.2:
926
+ resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
927
+
928
+ vite@6.4.3:
929
+ resolution: {integrity: sha512-NTKlcQjlAK7MlQoyb6LgaqHc8sso/pVyUJYWMws3jg21uTJw/LddqIFPcPqP6PzpgbIcZyKI85sFE4HBrQDA8A==}
930
+ engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
931
+ hasBin: true
932
+ peerDependencies:
933
+ '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0
934
+ jiti: '>=1.21.0'
935
+ less: '*'
936
+ lightningcss: ^1.21.0
937
+ sass: '*'
938
+ sass-embedded: '*'
939
+ stylus: '*'
940
+ sugarss: '*'
941
+ terser: ^5.16.0
942
+ tsx: ^4.8.1
943
+ yaml: ^2.4.2
944
+ peerDependenciesMeta:
945
+ '@types/node':
946
+ optional: true
947
+ jiti:
948
+ optional: true
949
+ less:
950
+ optional: true
951
+ lightningcss:
952
+ optional: true
953
+ sass:
954
+ optional: true
955
+ sass-embedded:
956
+ optional: true
957
+ stylus:
958
+ optional: true
959
+ sugarss:
960
+ optional: true
961
+ terser:
962
+ optional: true
963
+ tsx:
964
+ optional: true
965
+ yaml:
966
+ optional: true
967
+
968
+ yallist@3.1.1:
969
+ resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
970
+
971
+ snapshots:
972
+
973
+ '@alloc/quick-lru@5.2.0': {}
974
+
975
+ '@babel/code-frame@7.29.7':
976
+ dependencies:
977
+ '@babel/helper-validator-identifier': 7.29.7
978
+ js-tokens: 4.0.0
979
+ picocolors: 1.1.1
980
+
981
+ '@babel/compat-data@7.29.7': {}
982
+
983
+ '@babel/core@7.29.7':
984
+ dependencies:
985
+ '@babel/code-frame': 7.29.7
986
+ '@babel/generator': 7.29.8
987
+ '@babel/helper-compilation-targets': 7.29.7
988
+ '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7)
989
+ '@babel/helpers': 7.29.7
990
+ '@babel/parser': 7.29.8
991
+ '@babel/template': 7.29.7
992
+ '@babel/traverse': 7.29.8
993
+ '@babel/types': 7.29.8
994
+ '@jridgewell/remapping': 2.3.5
995
+ convert-source-map: 2.0.0
996
+ debug: 4.4.3
997
+ gensync: 1.0.0-beta.2
998
+ json5: 2.2.3
999
+ semver: 6.3.1
1000
+ transitivePeerDependencies:
1001
+ - supports-color
1002
+
1003
+ '@babel/generator@7.29.8':
1004
+ dependencies:
1005
+ '@babel/parser': 7.29.8
1006
+ '@babel/types': 7.29.8
1007
+ '@jridgewell/gen-mapping': 0.3.13
1008
+ '@jridgewell/trace-mapping': 0.3.31
1009
+ jsesc: 3.1.0
1010
+
1011
+ '@babel/helper-compilation-targets@7.29.7':
1012
+ dependencies:
1013
+ '@babel/compat-data': 7.29.7
1014
+ '@babel/helper-validator-option': 7.29.7
1015
+ browserslist: 4.28.8
1016
+ lru-cache: 5.1.1
1017
+ semver: 6.3.1
1018
+
1019
+ '@babel/helper-globals@7.29.7': {}
1020
+
1021
+ '@babel/helper-module-imports@7.29.7':
1022
+ dependencies:
1023
+ '@babel/traverse': 7.29.8
1024
+ '@babel/types': 7.29.8
1025
+ transitivePeerDependencies:
1026
+ - supports-color
1027
+
1028
+ '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)':
1029
+ dependencies:
1030
+ '@babel/core': 7.29.7
1031
+ '@babel/helper-module-imports': 7.29.7
1032
+ '@babel/helper-validator-identifier': 7.29.7
1033
+ '@babel/traverse': 7.29.8
1034
+ transitivePeerDependencies:
1035
+ - supports-color
1036
+
1037
+ '@babel/helper-plugin-utils@7.29.7': {}
1038
+
1039
+ '@babel/helper-string-parser@7.29.7': {}
1040
+
1041
+ '@babel/helper-validator-identifier@7.29.7': {}
1042
+
1043
+ '@babel/helper-validator-option@7.29.7': {}
1044
+
1045
+ '@babel/helpers@7.29.7':
1046
+ dependencies:
1047
+ '@babel/template': 7.29.7
1048
+ '@babel/types': 7.29.8
1049
+
1050
+ '@babel/parser@7.29.8':
1051
+ dependencies:
1052
+ '@babel/types': 7.29.8
1053
+
1054
+ '@babel/plugin-transform-react-jsx-self@7.29.7(@babel/core@7.29.7)':
1055
+ dependencies:
1056
+ '@babel/core': 7.29.7
1057
+ '@babel/helper-plugin-utils': 7.29.7
1058
+
1059
+ '@babel/plugin-transform-react-jsx-source@7.29.7(@babel/core@7.29.7)':
1060
+ dependencies:
1061
+ '@babel/core': 7.29.7
1062
+ '@babel/helper-plugin-utils': 7.29.7
1063
+
1064
+ '@babel/template@7.29.7':
1065
+ dependencies:
1066
+ '@babel/code-frame': 7.29.7
1067
+ '@babel/parser': 7.29.8
1068
+ '@babel/types': 7.29.8
1069
+
1070
+ '@babel/traverse@7.29.8':
1071
+ dependencies:
1072
+ '@babel/code-frame': 7.29.7
1073
+ '@babel/generator': 7.29.8
1074
+ '@babel/helper-globals': 7.29.7
1075
+ '@babel/parser': 7.29.8
1076
+ '@babel/template': 7.29.7
1077
+ '@babel/types': 7.29.8
1078
+ debug: 4.4.3
1079
+ transitivePeerDependencies:
1080
+ - supports-color
1081
+
1082
+ '@babel/types@7.29.8':
1083
+ dependencies:
1084
+ '@babel/helper-string-parser': 7.29.7
1085
+ '@babel/helper-validator-identifier': 7.29.7
1086
+
1087
+ '@esbuild/aix-ppc64@0.25.12':
1088
+ optional: true
1089
+
1090
+ '@esbuild/android-arm64@0.25.12':
1091
+ optional: true
1092
+
1093
+ '@esbuild/android-arm@0.25.12':
1094
+ optional: true
1095
+
1096
+ '@esbuild/android-x64@0.25.12':
1097
+ optional: true
1098
+
1099
+ '@esbuild/darwin-arm64@0.25.12':
1100
+ optional: true
1101
+
1102
+ '@esbuild/darwin-x64@0.25.12':
1103
+ optional: true
1104
+
1105
+ '@esbuild/freebsd-arm64@0.25.12':
1106
+ optional: true
1107
+
1108
+ '@esbuild/freebsd-x64@0.25.12':
1109
+ optional: true
1110
+
1111
+ '@esbuild/linux-arm64@0.25.12':
1112
+ optional: true
1113
+
1114
+ '@esbuild/linux-arm@0.25.12':
1115
+ optional: true
1116
+
1117
+ '@esbuild/linux-ia32@0.25.12':
1118
+ optional: true
1119
+
1120
+ '@esbuild/linux-loong64@0.25.12':
1121
+ optional: true
1122
+
1123
+ '@esbuild/linux-mips64el@0.25.12':
1124
+ optional: true
1125
+
1126
+ '@esbuild/linux-ppc64@0.25.12':
1127
+ optional: true
1128
+
1129
+ '@esbuild/linux-riscv64@0.25.12':
1130
+ optional: true
1131
+
1132
+ '@esbuild/linux-s390x@0.25.12':
1133
+ optional: true
1134
+
1135
+ '@esbuild/linux-x64@0.25.12':
1136
+ optional: true
1137
+
1138
+ '@esbuild/netbsd-arm64@0.25.12':
1139
+ optional: true
1140
+
1141
+ '@esbuild/netbsd-x64@0.25.12':
1142
+ optional: true
1143
+
1144
+ '@esbuild/openbsd-arm64@0.25.12':
1145
+ optional: true
1146
+
1147
+ '@esbuild/openbsd-x64@0.25.12':
1148
+ optional: true
1149
+
1150
+ '@esbuild/openharmony-arm64@0.25.12':
1151
+ optional: true
1152
+
1153
+ '@esbuild/sunos-x64@0.25.12':
1154
+ optional: true
1155
+
1156
+ '@esbuild/win32-arm64@0.25.12':
1157
+ optional: true
1158
+
1159
+ '@esbuild/win32-ia32@0.25.12':
1160
+ optional: true
1161
+
1162
+ '@esbuild/win32-x64@0.25.12':
1163
+ optional: true
1164
+
1165
+ '@jridgewell/gen-mapping@0.3.13':
1166
+ dependencies:
1167
+ '@jridgewell/sourcemap-codec': 1.5.5
1168
+ '@jridgewell/trace-mapping': 0.3.31
1169
+
1170
+ '@jridgewell/remapping@2.3.5':
1171
+ dependencies:
1172
+ '@jridgewell/gen-mapping': 0.3.13
1173
+ '@jridgewell/trace-mapping': 0.3.31
1174
+
1175
+ '@jridgewell/resolve-uri@3.1.2': {}
1176
+
1177
+ '@jridgewell/sourcemap-codec@1.5.5': {}
1178
+
1179
+ '@jridgewell/trace-mapping@0.3.31':
1180
+ dependencies:
1181
+ '@jridgewell/resolve-uri': 3.1.2
1182
+ '@jridgewell/sourcemap-codec': 1.5.5
1183
+
1184
+ '@napi-rs/lzma-linux-x64-gnu@1.5.1':
1185
+ optional: true
1186
+
1187
+ '@nodelib/fs.scandir@2.1.5':
1188
+ dependencies:
1189
+ '@nodelib/fs.stat': 2.0.5
1190
+ run-parallel: 1.2.0
1191
+
1192
+ '@nodelib/fs.stat@2.0.5': {}
1193
+
1194
+ '@nodelib/fs.walk@1.2.8':
1195
+ dependencies:
1196
+ '@nodelib/fs.scandir': 2.1.5
1197
+ fastq: 1.20.1
1198
+
1199
+ '@remix-run/router@1.23.3': {}
1200
+
1201
+ '@rolldown/pluginutils@1.0.0-beta.27': {}
1202
+
1203
+ '@rollup/rollup-android-arm-eabi@4.62.4':
1204
+ optional: true
1205
+
1206
+ '@rollup/rollup-android-arm64@4.62.4':
1207
+ optional: true
1208
+
1209
+ '@rollup/rollup-darwin-arm64@4.62.4':
1210
+ optional: true
1211
+
1212
+ '@rollup/rollup-darwin-x64@4.62.4':
1213
+ optional: true
1214
+
1215
+ '@rollup/rollup-freebsd-arm64@4.62.4':
1216
+ optional: true
1217
+
1218
+ '@rollup/rollup-freebsd-x64@4.62.4':
1219
+ optional: true
1220
+
1221
+ '@rollup/rollup-linux-arm-gnueabihf@4.62.4':
1222
+ optional: true
1223
+
1224
+ '@rollup/rollup-linux-arm-musleabihf@4.62.4':
1225
+ optional: true
1226
+
1227
+ '@rollup/rollup-linux-arm64-gnu@4.62.4':
1228
+ optional: true
1229
+
1230
+ '@rollup/rollup-linux-arm64-musl@4.62.4':
1231
+ optional: true
1232
+
1233
+ '@rollup/rollup-linux-loong64-gnu@4.62.4':
1234
+ optional: true
1235
+
1236
+ '@rollup/rollup-linux-loong64-musl@4.62.4':
1237
+ optional: true
1238
+
1239
+ '@rollup/rollup-linux-ppc64-gnu@4.62.4':
1240
+ optional: true
1241
+
1242
+ '@rollup/rollup-linux-ppc64-musl@4.62.4':
1243
+ optional: true
1244
+
1245
+ '@rollup/rollup-linux-riscv64-gnu@4.62.4':
1246
+ optional: true
1247
+
1248
+ '@rollup/rollup-linux-riscv64-musl@4.62.4':
1249
+ optional: true
1250
+
1251
+ '@rollup/rollup-linux-s390x-gnu@4.62.4':
1252
+ optional: true
1253
+
1254
+ '@rollup/rollup-linux-x64-gnu@4.62.4':
1255
+ optional: true
1256
+
1257
+ '@rollup/rollup-linux-x64-musl@4.62.4':
1258
+ optional: true
1259
+
1260
+ '@rollup/rollup-openbsd-x64@4.62.4':
1261
+ optional: true
1262
+
1263
+ '@rollup/rollup-openharmony-arm64@4.62.4':
1264
+ optional: true
1265
+
1266
+ '@rollup/rollup-win32-arm64-msvc@4.62.4':
1267
+ optional: true
1268
+
1269
+ '@rollup/rollup-win32-ia32-msvc@4.62.4':
1270
+ optional: true
1271
+
1272
+ '@rollup/rollup-win32-x64-gnu@4.62.4':
1273
+ optional: true
1274
+
1275
+ '@rollup/rollup-win32-x64-msvc@4.62.4':
1276
+ optional: true
1277
+
1278
+ '@tanstack/query-core@5.101.4': {}
1279
+
1280
+ '@tanstack/react-query@5.101.4(react@18.3.1)':
1281
+ dependencies:
1282
+ '@tanstack/query-core': 5.101.4
1283
+ react: 18.3.1
1284
+
1285
+ '@types/babel__core@7.20.5':
1286
+ dependencies:
1287
+ '@babel/parser': 7.29.8
1288
+ '@babel/types': 7.29.8
1289
+ '@types/babel__generator': 7.27.0
1290
+ '@types/babel__template': 7.4.4
1291
+ '@types/babel__traverse': 7.28.0
1292
+
1293
+ '@types/babel__generator@7.27.0':
1294
+ dependencies:
1295
+ '@babel/types': 7.29.8
1296
+
1297
+ '@types/babel__template@7.4.4':
1298
+ dependencies:
1299
+ '@babel/parser': 7.29.8
1300
+ '@babel/types': 7.29.8
1301
+
1302
+ '@types/babel__traverse@7.28.0':
1303
+ dependencies:
1304
+ '@babel/types': 7.29.8
1305
+
1306
+ '@types/estree@1.0.9': {}
1307
+
1308
+ '@types/js-yaml@4.0.9': {}
1309
+
1310
+ '@types/prop-types@15.7.15': {}
1311
+
1312
+ '@types/react-dom@18.3.7(@types/react@18.3.31)':
1313
+ dependencies:
1314
+ '@types/react': 18.3.31
1315
+
1316
+ '@types/react@18.3.31':
1317
+ dependencies:
1318
+ '@types/prop-types': 15.7.15
1319
+ csstype: 3.2.3
1320
+
1321
+ '@vitejs/plugin-react@4.7.0(vite@6.4.3(jiti@1.21.7))':
1322
+ dependencies:
1323
+ '@babel/core': 7.29.7
1324
+ '@babel/plugin-transform-react-jsx-self': 7.29.7(@babel/core@7.29.7)
1325
+ '@babel/plugin-transform-react-jsx-source': 7.29.7(@babel/core@7.29.7)
1326
+ '@rolldown/pluginutils': 1.0.0-beta.27
1327
+ '@types/babel__core': 7.20.5
1328
+ react-refresh: 0.17.0
1329
+ vite: 6.4.3(jiti@1.21.7)
1330
+ transitivePeerDependencies:
1331
+ - supports-color
1332
+
1333
+ any-promise@1.3.0: {}
1334
+
1335
+ anymatch@3.1.3:
1336
+ dependencies:
1337
+ normalize-path: 3.0.0
1338
+ picomatch: 2.3.2
1339
+
1340
+ arg@5.0.2: {}
1341
+
1342
+ argparse@2.0.1: {}
1343
+
1344
+ autoprefixer@10.5.4(postcss@8.5.26):
1345
+ dependencies:
1346
+ browserslist: 4.28.8
1347
+ caniuse-lite: 1.0.30001809
1348
+ fraction.js: 5.3.4
1349
+ picocolors: 1.1.1
1350
+ postcss: 8.5.26
1351
+ postcss-value-parser: 4.2.0
1352
+
1353
+ baseline-browser-mapping@2.11.13: {}
1354
+
1355
+ binary-extensions@2.3.0: {}
1356
+
1357
+ braces@3.0.3:
1358
+ dependencies:
1359
+ fill-range: 7.1.1
1360
+
1361
+ browserslist@4.28.8:
1362
+ dependencies:
1363
+ baseline-browser-mapping: 2.11.13
1364
+ caniuse-lite: 1.0.30001809
1365
+ electron-to-chromium: 1.5.405
1366
+ node-releases: 2.0.53
1367
+ update-browserslist-db: 1.3.1(browserslist@4.28.8)
1368
+
1369
+ camelcase-css@2.0.1: {}
1370
+
1371
+ caniuse-lite@1.0.30001809: {}
1372
+
1373
+ chokidar@3.6.0:
1374
+ dependencies:
1375
+ anymatch: 3.1.3
1376
+ braces: 3.0.3
1377
+ glob-parent: 5.1.2
1378
+ is-binary-path: 2.1.0
1379
+ is-glob: 4.0.3
1380
+ normalize-path: 3.0.0
1381
+ readdirp: 3.6.0
1382
+ optionalDependencies:
1383
+ fsevents: 2.3.3
1384
+
1385
+ commander@4.1.1: {}
1386
+
1387
+ convert-source-map@2.0.0: {}
1388
+
1389
+ cssesc@3.0.0: {}
1390
+
1391
+ csstype@3.2.3: {}
1392
+
1393
+ debug@4.4.3:
1394
+ dependencies:
1395
+ ms: 2.1.3
1396
+
1397
+ didyoumean@1.2.2: {}
1398
+
1399
+ dlv@1.1.3: {}
1400
+
1401
+ electron-to-chromium@1.5.405: {}
1402
+
1403
+ es-errors@1.3.0: {}
1404
+
1405
+ esbuild@0.25.12:
1406
+ optionalDependencies:
1407
+ '@esbuild/aix-ppc64': 0.25.12
1408
+ '@esbuild/android-arm': 0.25.12
1409
+ '@esbuild/android-arm64': 0.25.12
1410
+ '@esbuild/android-x64': 0.25.12
1411
+ '@esbuild/darwin-arm64': 0.25.12
1412
+ '@esbuild/darwin-x64': 0.25.12
1413
+ '@esbuild/freebsd-arm64': 0.25.12
1414
+ '@esbuild/freebsd-x64': 0.25.12
1415
+ '@esbuild/linux-arm': 0.25.12
1416
+ '@esbuild/linux-arm64': 0.25.12
1417
+ '@esbuild/linux-ia32': 0.25.12
1418
+ '@esbuild/linux-loong64': 0.25.12
1419
+ '@esbuild/linux-mips64el': 0.25.12
1420
+ '@esbuild/linux-ppc64': 0.25.12
1421
+ '@esbuild/linux-riscv64': 0.25.12
1422
+ '@esbuild/linux-s390x': 0.25.12
1423
+ '@esbuild/linux-x64': 0.25.12
1424
+ '@esbuild/netbsd-arm64': 0.25.12
1425
+ '@esbuild/netbsd-x64': 0.25.12
1426
+ '@esbuild/openbsd-arm64': 0.25.12
1427
+ '@esbuild/openbsd-x64': 0.25.12
1428
+ '@esbuild/openharmony-arm64': 0.25.12
1429
+ '@esbuild/sunos-x64': 0.25.12
1430
+ '@esbuild/win32-arm64': 0.25.12
1431
+ '@esbuild/win32-ia32': 0.25.12
1432
+ '@esbuild/win32-x64': 0.25.12
1433
+
1434
+ escalade@3.2.0: {}
1435
+
1436
+ fast-glob@3.3.3:
1437
+ dependencies:
1438
+ '@nodelib/fs.stat': 2.0.5
1439
+ '@nodelib/fs.walk': 1.2.8
1440
+ glob-parent: 5.1.2
1441
+ merge2: 1.4.1
1442
+ micromatch: 4.0.8
1443
+
1444
+ fastq@1.20.1:
1445
+ dependencies:
1446
+ reusify: 1.1.0
1447
+
1448
+ fdir@6.5.0(picomatch@4.0.5):
1449
+ optionalDependencies:
1450
+ picomatch: 4.0.5
1451
+
1452
+ fill-range@7.1.1:
1453
+ dependencies:
1454
+ to-regex-range: 5.0.1
1455
+
1456
+ fraction.js@5.3.4: {}
1457
+
1458
+ fsevents@2.3.3:
1459
+ optional: true
1460
+
1461
+ function-bind@1.1.2: {}
1462
+
1463
+ gensync@1.0.0-beta.2: {}
1464
+
1465
+ glob-parent@5.1.2:
1466
+ dependencies:
1467
+ is-glob: 4.0.3
1468
+
1469
+ glob-parent@6.0.2:
1470
+ dependencies:
1471
+ is-glob: 4.0.3
1472
+
1473
+ hasown@2.0.4:
1474
+ dependencies:
1475
+ function-bind: 1.1.2
1476
+
1477
+ is-binary-path@2.1.0:
1478
+ dependencies:
1479
+ binary-extensions: 2.3.0
1480
+
1481
+ is-core-module@2.16.2:
1482
+ dependencies:
1483
+ hasown: 2.0.4
1484
+
1485
+ is-extglob@2.1.1: {}
1486
+
1487
+ is-glob@4.0.3:
1488
+ dependencies:
1489
+ is-extglob: 2.1.1
1490
+
1491
+ is-number@7.0.0: {}
1492
+
1493
+ jiti@1.21.7: {}
1494
+
1495
+ js-tokens@4.0.0: {}
1496
+
1497
+ js-yaml@5.2.3:
1498
+ dependencies:
1499
+ argparse: 2.0.1
1500
+
1501
+ jsesc@3.1.0: {}
1502
+
1503
+ json5@2.2.3: {}
1504
+
1505
+ lilconfig@3.1.3: {}
1506
+
1507
+ lines-and-columns@1.2.4: {}
1508
+
1509
+ loose-envify@1.4.0:
1510
+ dependencies:
1511
+ js-tokens: 4.0.0
1512
+
1513
+ lru-cache@5.1.1:
1514
+ dependencies:
1515
+ yallist: 3.1.1
1516
+
1517
+ lucide-react@0.469.0(react@18.3.1):
1518
+ dependencies:
1519
+ react: 18.3.1
1520
+
1521
+ merge2@1.4.1: {}
1522
+
1523
+ micromatch@4.0.8:
1524
+ dependencies:
1525
+ braces: 3.0.3
1526
+ picomatch: 2.3.2
1527
+
1528
+ ms@2.1.3: {}
1529
+
1530
+ mz@2.7.0:
1531
+ dependencies:
1532
+ any-promise: 1.3.0
1533
+ object-assign: 4.1.1
1534
+ thenify-all: 1.6.0
1535
+
1536
+ nanoid@3.3.18: {}
1537
+
1538
+ node-releases@2.0.53: {}
1539
+
1540
+ normalize-path@3.0.0: {}
1541
+
1542
+ object-assign@4.1.1: {}
1543
+
1544
+ object-hash@3.0.0: {}
1545
+
1546
+ path-parse@1.0.7: {}
1547
+
1548
+ picocolors@1.1.1: {}
1549
+
1550
+ picomatch@2.3.2: {}
1551
+
1552
+ picomatch@4.0.5: {}
1553
+
1554
+ pify@2.3.0: {}
1555
+
1556
+ pirates@4.0.7: {}
1557
+
1558
+ postcss-import@15.1.0(postcss@8.5.26):
1559
+ dependencies:
1560
+ postcss: 8.5.26
1561
+ postcss-value-parser: 4.2.0
1562
+ read-cache: 1.0.0
1563
+ resolve: 1.22.12
1564
+
1565
+ postcss-js@4.1.0(postcss@8.5.26):
1566
+ dependencies:
1567
+ camelcase-css: 2.0.1
1568
+ postcss: 8.5.26
1569
+
1570
+ postcss-load-config@6.0.1(jiti@1.21.7)(postcss@8.5.26):
1571
+ dependencies:
1572
+ lilconfig: 3.1.3
1573
+ optionalDependencies:
1574
+ jiti: 1.21.7
1575
+ postcss: 8.5.26
1576
+
1577
+ postcss-nested@6.2.0(postcss@8.5.26):
1578
+ dependencies:
1579
+ postcss: 8.5.26
1580
+ postcss-selector-parser: 6.1.4
1581
+
1582
+ postcss-selector-parser@6.1.4:
1583
+ dependencies:
1584
+ cssesc: 3.0.0
1585
+ util-deprecate: 1.0.2
1586
+
1587
+ postcss-value-parser@4.2.0: {}
1588
+
1589
+ postcss@8.5.26:
1590
+ dependencies:
1591
+ nanoid: 3.3.18
1592
+ picocolors: 1.1.1
1593
+ source-map-js: 1.2.1
1594
+
1595
+ queue-microtask@1.2.3: {}
1596
+
1597
+ react-dom@18.3.1(react@18.3.1):
1598
+ dependencies:
1599
+ loose-envify: 1.4.0
1600
+ react: 18.3.1
1601
+ scheduler: 0.23.2
1602
+
1603
+ react-refresh@0.17.0: {}
1604
+
1605
+ react-router-dom@6.30.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
1606
+ dependencies:
1607
+ '@remix-run/router': 1.23.3
1608
+ react: 18.3.1
1609
+ react-dom: 18.3.1(react@18.3.1)
1610
+ react-router: 6.30.4(react@18.3.1)
1611
+
1612
+ react-router@6.30.4(react@18.3.1):
1613
+ dependencies:
1614
+ '@remix-run/router': 1.23.3
1615
+ react: 18.3.1
1616
+
1617
+ react@18.3.1:
1618
+ dependencies:
1619
+ loose-envify: 1.4.0
1620
+
1621
+ read-cache@1.0.0:
1622
+ dependencies:
1623
+ pify: 2.3.0
1624
+
1625
+ readdirp@3.6.0:
1626
+ dependencies:
1627
+ picomatch: 2.3.2
1628
+
1629
+ resolve@1.22.12:
1630
+ dependencies:
1631
+ es-errors: 1.3.0
1632
+ is-core-module: 2.16.2
1633
+ path-parse: 1.0.7
1634
+ supports-preserve-symlinks-flag: 1.0.0
1635
+
1636
+ reusify@1.1.0: {}
1637
+
1638
+ rollup@4.62.4:
1639
+ dependencies:
1640
+ '@types/estree': 1.0.9
1641
+ optionalDependencies:
1642
+ '@napi-rs/lzma-linux-x64-gnu': 1.5.1
1643
+ '@rollup/rollup-android-arm-eabi': 4.62.4
1644
+ '@rollup/rollup-android-arm64': 4.62.4
1645
+ '@rollup/rollup-darwin-arm64': 4.62.4
1646
+ '@rollup/rollup-darwin-x64': 4.62.4
1647
+ '@rollup/rollup-freebsd-arm64': 4.62.4
1648
+ '@rollup/rollup-freebsd-x64': 4.62.4
1649
+ '@rollup/rollup-linux-arm-gnueabihf': 4.62.4
1650
+ '@rollup/rollup-linux-arm-musleabihf': 4.62.4
1651
+ '@rollup/rollup-linux-arm64-gnu': 4.62.4
1652
+ '@rollup/rollup-linux-arm64-musl': 4.62.4
1653
+ '@rollup/rollup-linux-loong64-gnu': 4.62.4
1654
+ '@rollup/rollup-linux-loong64-musl': 4.62.4
1655
+ '@rollup/rollup-linux-ppc64-gnu': 4.62.4
1656
+ '@rollup/rollup-linux-ppc64-musl': 4.62.4
1657
+ '@rollup/rollup-linux-riscv64-gnu': 4.62.4
1658
+ '@rollup/rollup-linux-riscv64-musl': 4.62.4
1659
+ '@rollup/rollup-linux-s390x-gnu': 4.62.4
1660
+ '@rollup/rollup-linux-x64-gnu': 4.62.4
1661
+ '@rollup/rollup-linux-x64-musl': 4.62.4
1662
+ '@rollup/rollup-openbsd-x64': 4.62.4
1663
+ '@rollup/rollup-openharmony-arm64': 4.62.4
1664
+ '@rollup/rollup-win32-arm64-msvc': 4.62.4
1665
+ '@rollup/rollup-win32-ia32-msvc': 4.62.4
1666
+ '@rollup/rollup-win32-x64-gnu': 4.62.4
1667
+ '@rollup/rollup-win32-x64-msvc': 4.62.4
1668
+ fsevents: 2.3.3
1669
+
1670
+ run-parallel@1.2.0:
1671
+ dependencies:
1672
+ queue-microtask: 1.2.3
1673
+
1674
+ scheduler@0.23.2:
1675
+ dependencies:
1676
+ loose-envify: 1.4.0
1677
+
1678
+ semver@6.3.1: {}
1679
+
1680
+ source-map-js@1.2.1: {}
1681
+
1682
+ sucrase@3.35.1:
1683
+ dependencies:
1684
+ '@jridgewell/gen-mapping': 0.3.13
1685
+ commander: 4.1.1
1686
+ lines-and-columns: 1.2.4
1687
+ mz: 2.7.0
1688
+ pirates: 4.0.7
1689
+ tinyglobby: 0.2.17
1690
+ ts-interface-checker: 0.1.13
1691
+
1692
+ supports-preserve-symlinks-flag@1.0.0: {}
1693
+
1694
+ tailwindcss@3.4.19:
1695
+ dependencies:
1696
+ '@alloc/quick-lru': 5.2.0
1697
+ arg: 5.0.2
1698
+ chokidar: 3.6.0
1699
+ didyoumean: 1.2.2
1700
+ dlv: 1.1.3
1701
+ fast-glob: 3.3.3
1702
+ glob-parent: 6.0.2
1703
+ is-glob: 4.0.3
1704
+ jiti: 1.21.7
1705
+ lilconfig: 3.1.3
1706
+ micromatch: 4.0.8
1707
+ normalize-path: 3.0.0
1708
+ object-hash: 3.0.0
1709
+ picocolors: 1.1.1
1710
+ postcss: 8.5.26
1711
+ postcss-import: 15.1.0(postcss@8.5.26)
1712
+ postcss-js: 4.1.0(postcss@8.5.26)
1713
+ postcss-load-config: 6.0.1(jiti@1.21.7)(postcss@8.5.26)
1714
+ postcss-nested: 6.2.0(postcss@8.5.26)
1715
+ postcss-selector-parser: 6.1.4
1716
+ resolve: 1.22.12
1717
+ sucrase: 3.35.1
1718
+ transitivePeerDependencies:
1719
+ - tsx
1720
+ - yaml
1721
+
1722
+ thenify-all@1.6.0:
1723
+ dependencies:
1724
+ thenify: 3.3.1
1725
+
1726
+ thenify@3.3.1:
1727
+ dependencies:
1728
+ any-promise: 1.3.0
1729
+
1730
+ tinyglobby@0.2.17:
1731
+ dependencies:
1732
+ fdir: 6.5.0(picomatch@4.0.5)
1733
+ picomatch: 4.0.5
1734
+
1735
+ to-regex-range@5.0.1:
1736
+ dependencies:
1737
+ is-number: 7.0.0
1738
+
1739
+ ts-interface-checker@0.1.13: {}
1740
+
1741
+ typescript@5.9.3: {}
1742
+
1743
+ update-browserslist-db@1.3.1(browserslist@4.28.8):
1744
+ dependencies:
1745
+ browserslist: 4.28.8
1746
+ escalade: 3.2.0
1747
+ picocolors: 1.1.1
1748
+
1749
+ util-deprecate@1.0.2: {}
1750
+
1751
+ vite@6.4.3(jiti@1.21.7):
1752
+ dependencies:
1753
+ esbuild: 0.25.12
1754
+ fdir: 6.5.0(picomatch@4.0.5)
1755
+ picomatch: 4.0.5
1756
+ postcss: 8.5.26
1757
+ rollup: 4.62.4
1758
+ tinyglobby: 0.2.17
1759
+ optionalDependencies:
1760
+ fsevents: 2.3.3
1761
+ jiti: 1.21.7
1762
+
1763
+ yallist@3.1.1: {}
postcss.config.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ };
src/App.tsx ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom";
2
+ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
3
+ import { Layout } from "./components/Layout";
4
+ import { ProductHomePage } from "./features/home/ProductHomePage";
5
+ import { SubmitPage } from "./features/submit/SubmitPage";
6
+ import { ProjectPage } from "./features/project/ProjectPage";
7
+ import { AboutPage } from "./features/about/AboutPage";
8
+ import { MyProjectsPage } from "./features/my/MyProjectsPage";
9
+ import { PopupCallbackPage } from "./features/auth/PopupCallbackPage";
10
+
11
+ const qc = new QueryClient({
12
+ defaultOptions: {
13
+ queries: {
14
+ retry: 1,
15
+ refetchOnWindowFocus: false,
16
+ },
17
+ },
18
+ });
19
+
20
+ /** 单着陆页:深色 deck(task-5ee34751 融合定稿)。 */
21
+ const Landing = ProductHomePage;
22
+
23
+ export function App() {
24
+ return (
25
+ <QueryClientProvider client={qc}>
26
+ <BrowserRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
27
+ <Routes>
28
+ <Route element={<Layout />}>
29
+ <Route index element={<Landing />} />
30
+ <Route path="pulse" element={<Navigate to="/" replace />} />
31
+ <Route path="submit" element={<SubmitPage />} />
32
+ <Route path="p/:owner/:repo" element={<ProjectPage />} />
33
+ <Route path="my" element={<MyProjectsPage />} />
34
+ <Route path="about" element={<AboutPage />} />
35
+ <Route path="*" element={<Navigate to="/" replace />} />
36
+ </Route>
37
+ {/* Popup OAuth callback — standalone (no Layout) */}
38
+ <Route path="/auth/popup-callback" element={<PopupCallbackPage />} />
39
+ </Routes>
40
+ </BrowserRouter>
41
+ </QueryClientProvider>
42
+ );
43
+ }
src/components/AuthButton.tsx ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect, useRef, useState } from "react";
2
+ import { useLocation, useNavigate } from "react-router-dom";
3
+ import { Github, LogOut, ChevronDown, FolderGit2 } from "lucide-react";
4
+ import { navigateToLogin, navigateToLoginPopup, isEmbedded, currentReturnTo } from "../shared/api/client";
5
+ import { useLogout, useMe } from "../features/auth/useAuth";
6
+
7
+ /**
8
+ * 顶栏登录态:未登录 = Sign in with GitHub;已登录 = 头像 + 下拉(Logout)。
9
+ * appearance="dark" 用于 zai 深色着陆页头部(与 GitHub pill 同族样式)。
10
+ */
11
+ export function AuthButton({ appearance = "light" }: { appearance?: "light" | "dark" }) {
12
+ const meQ = useMe();
13
+ const logoutM = useLogout();
14
+ const { pathname, search } = useLocation();
15
+ const nav = useNavigate();
16
+ const [open, setOpen] = useState(false);
17
+ const rootRef = useRef<HTMLDivElement>(null);
18
+
19
+ useEffect(() => {
20
+ if (!open) return;
21
+ const onDocDown = (e: MouseEvent) => {
22
+ if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);
23
+ };
24
+ const onKey = (e: KeyboardEvent) => {
25
+ if (e.key === "Escape") setOpen(false);
26
+ };
27
+ document.addEventListener("mousedown", onDocDown);
28
+ document.addEventListener("keydown", onKey);
29
+ return () => {
30
+ document.removeEventListener("mousedown", onDocDown);
31
+ document.removeEventListener("keydown", onKey);
32
+ };
33
+ }, [open]);
34
+
35
+ // 加载中/后端未接入 auth:按未登录渲染(不阻塞页面)
36
+ const user = meQ.data?.authenticated ? meQ.data.user : null;
37
+ const dark = appearance === "dark";
38
+ // loginUrl for href fallback (non-iframe); navigateToLogin for onClick
39
+ void pathname; void search;
40
+
41
+ if (!user) {
42
+ return (
43
+ <button
44
+ type="button"
45
+ onClick={() => {
46
+ if (isEmbedded()) {
47
+ navigateToLoginPopup();
48
+ window.dispatchEvent(new Event("ov-oauth-popup-opened"));
49
+ } else {
50
+ navigateToLogin(currentReturnTo());
51
+ }
52
+ }}
53
+ className={
54
+ dark
55
+ ? "inline-flex h-9 items-center gap-2 rounded-full border border-[#333] bg-[#030303] px-3.5 text-xs font-medium text-[#acacb0] transition hover:border-[#484a58] hover:bg-[#111216] hover:text-white focus-ring-dark"
56
+ : "inline-flex h-9 items-center gap-1.5 rounded-md border border-line bg-surface px-3 text-[13px] font-medium text-ink transition-colors hover:bg-surface-sunken focus-ring"
57
+ }
58
+ >
59
+ <Github size={dark ? 14 : 15} />
60
+ Sign in
61
+ </button>
62
+ );
63
+ }
64
+
65
+ return (
66
+ <div ref={rootRef} className="relative">
67
+ <button
68
+ type="button"
69
+ onClick={() => setOpen((v) => !v)}
70
+ aria-expanded={open}
71
+ aria-haspopup="menu"
72
+ aria-label={`Signed in as ${user.login}`}
73
+ className={
74
+ dark
75
+ ? "flex h-9 items-center gap-1.5 rounded-full border border-[#333] bg-[#030303] p-1 pr-2 transition hover:border-[#484a58] hover:bg-[#111216] focus-ring-dark"
76
+ : "flex h-9 items-center gap-1 rounded-md border border-line bg-surface p-1 pr-1.5 transition-colors hover:bg-surface-sunken focus-ring"
77
+ }
78
+ >
79
+ {user.avatar_url ? (
80
+ <img
81
+ src={user.avatar_url}
82
+ alt=""
83
+ className="h-7 w-7 rounded-full object-cover"
84
+ referrerPolicy="no-referrer"
85
+ />
86
+ ) : (
87
+ <span className="flex h-7 w-7 items-center justify-center rounded-full bg-accent-100 text-xs font-semibold text-accent-700">
88
+ {user.login.slice(0, 1).toUpperCase()}
89
+ </span>
90
+ )}
91
+ <ChevronDown
92
+ size={13}
93
+ className={`transition-transform ${dark ? "text-[#77787e]" : "text-ink-tertiary"} ${open ? "rotate-180" : ""}`}
94
+ />
95
+ </button>
96
+
97
+ {open && (
98
+ <div
99
+ role="menu"
100
+ className={
101
+ dark
102
+ ? "absolute right-0 top-full z-40 mt-2 w-44 overflow-hidden rounded-xl border border-[#333] bg-[#111216] shadow-[0_16px_50px_rgba(0,0,0,0.5)]"
103
+ : "absolute right-0 top-full z-40 mt-1.5 w-44 overflow-hidden rounded-lg border border-line bg-surface shadow-lg"
104
+ }
105
+ >
106
+ <div
107
+ className={`border-b px-3.5 py-2.5 text-[13px] font-medium ${dark ? "border-[#26272c] text-[#f0f2f6]" : "border-line text-ink"}`}
108
+ >
109
+ {user.login}
110
+ </div>
111
+ <a
112
+ role="menuitem"
113
+ href="/my"
114
+ onClick={(e) => {
115
+ e.preventDefault();
116
+ setOpen(false);
117
+ nav("/my");
118
+ }}
119
+ className={`flex w-full items-center gap-2 px-3.5 py-2.5 text-left text-[13px] transition-colors ${
120
+ dark
121
+ ? "text-[#acacb0] hover:bg-[#1a1b20] hover:text-white"
122
+ : "text-ink-secondary hover:bg-surface-sunken hover:text-ink"
123
+ }`}
124
+ >
125
+ <FolderGit2 size={14} />
126
+ My submissions
127
+ </a>
128
+ <button
129
+ type="button"
130
+ role="menuitem"
131
+ onClick={() => {
132
+ setOpen(false);
133
+ logoutM.mutate();
134
+ }}
135
+ disabled={logoutM.isPending}
136
+ className={`flex w-full items-center gap-2 px-3.5 py-2.5 text-left text-[13px] transition-colors ${
137
+ dark
138
+ ? "text-[#acacb0] hover:bg-[#1a1b20] hover:text-white"
139
+ : "text-ink-secondary hover:bg-surface-sunken hover:text-ink"
140
+ }`}
141
+ >
142
+ <LogOut size={14} />
143
+ {logoutM.isPending ? "Signing out…" : "Sign out"}
144
+ </button>
145
+ </div>
146
+ )}
147
+ </div>
148
+ );
149
+ }
src/components/Button.tsx ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { ButtonHTMLAttributes, ReactNode } from "react";
2
+
3
+ type Variant = "primary" | "secondary" | "ghost" | "danger";
4
+ type Size = "md" | "lg";
5
+
6
+ const styles: Record<Variant, string> = {
7
+ // 协作者深色体系:主按钮 = 白底黑字(composer submit 同族)
8
+ primary: "bg-[#ebecf0] text-[#0d0d0f] hover:bg-white border border-transparent",
9
+ secondary: "bg-surface-raised text-ink border border-[#333] hover:border-[#484a58] hover:bg-surface-sunken",
10
+ ghost: "bg-transparent text-ink-secondary border border-transparent hover:bg-surface-sunken hover:text-ink",
11
+ danger: "bg-danger text-white hover:bg-[#d63f3f] border border-transparent",
12
+ };
13
+
14
+ // 高度集中在 size prop,禁止 className 覆盖高度(Tailwind 同源类冲突靠 CSS 顺序,不可靠)
15
+ const sizes: Record<Size, string> = {
16
+ md: "h-9 px-3.5",
17
+ lg: "h-12 px-5",
18
+ };
19
+
20
+ export function Button({
21
+ variant = "primary",
22
+ size = "md",
23
+ className = "",
24
+ children,
25
+ ...props
26
+ }: ButtonHTMLAttributes<HTMLButtonElement> & {
27
+ variant?: Variant;
28
+ size?: Size;
29
+ children: ReactNode;
30
+ }) {
31
+ return (
32
+ <button
33
+ type="button"
34
+ className={`inline-flex items-center justify-center gap-1.5 rounded-md text-sm font-medium transition-colors focus-ring disabled:opacity-50 disabled:pointer-events-none ${sizes[size]} ${styles[variant]} ${className}`}
35
+ {...props}
36
+ >
37
+ {children}
38
+ </button>
39
+ );
40
+ }
src/components/ConfirmDialog.tsx ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect, useRef } from "react";
2
+ import { Button } from "./Button";
3
+
4
+ export function ConfirmDialog({
5
+ open,
6
+ title,
7
+ body,
8
+ confirmLabel = "Confirm",
9
+ danger = false,
10
+ busy = false,
11
+ onConfirm,
12
+ onCancel,
13
+ }: {
14
+ open: boolean;
15
+ title: string;
16
+ body: string;
17
+ confirmLabel?: string;
18
+ danger?: boolean;
19
+ busy?: boolean;
20
+ onConfirm: () => void;
21
+ onCancel: () => void;
22
+ }) {
23
+ const cancelRef = useRef<HTMLButtonElement>(null);
24
+
25
+ useEffect(() => {
26
+ if (!open) return;
27
+ cancelRef.current?.focus();
28
+ const onKey = (e: KeyboardEvent) => {
29
+ if (e.key === "Escape") onCancel();
30
+ };
31
+ window.addEventListener("keydown", onKey);
32
+ return () => window.removeEventListener("keydown", onKey);
33
+ }, [open, onCancel]);
34
+
35
+ if (!open) return null;
36
+
37
+ return (
38
+ <div
39
+ className="fixed inset-0 z-50 flex items-center justify-center bg-ink/40 p-4"
40
+ role="dialog"
41
+ aria-modal="true"
42
+ aria-labelledby="confirm-title"
43
+ onMouseDown={(e) => {
44
+ if (e.target === e.currentTarget) onCancel();
45
+ }}
46
+ >
47
+ <div className="w-full max-w-md rounded-md border border-line bg-surface-raised p-5 shadow-lg">
48
+ <h2 id="confirm-title" className="text-base font-semibold text-ink">
49
+ {title}
50
+ </h2>
51
+ <p className="mt-2 text-sm leading-relaxed text-ink-secondary">{body}</p>
52
+ <div className="mt-5 flex justify-end gap-2">
53
+ <button
54
+ ref={cancelRef}
55
+ type="button"
56
+ onClick={onCancel}
57
+ disabled={busy}
58
+ className="inline-flex h-9 items-center justify-center rounded-md border border-line bg-surface-raised px-3.5 text-sm font-medium text-ink hover:bg-surface-sunken focus-ring disabled:opacity-50"
59
+ >
60
+ Cancel
61
+ </button>
62
+ <Button variant={danger ? "danger" : "primary"} onClick={onConfirm} disabled={busy}>
63
+ {busy ? "Working…" : confirmLabel}
64
+ </Button>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ );
69
+ }
src/components/EmptyState.tsx ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { LucideIcon } from "lucide-react";
2
+ import type { ReactNode } from "react";
3
+
4
+ export function EmptyState({
5
+ icon: Icon,
6
+ title,
7
+ description,
8
+ action,
9
+ }: {
10
+ icon: LucideIcon;
11
+ title: string;
12
+ description?: string;
13
+ action?: ReactNode;
14
+ }) {
15
+ return (
16
+ <div className="flex flex-col items-center justify-center gap-3 px-6 py-16 text-center">
17
+ <Icon size={32} className="text-ink-tertiary" strokeWidth={1.5} />
18
+ <div>
19
+ <p className="text-sm font-medium text-ink">{title}</p>
20
+ {description && (
21
+ <p className="mt-1 max-w-sm text-[13px] text-ink-secondary">{description}</p>
22
+ )}
23
+ </div>
24
+ {action}
25
+ </div>
26
+ );
27
+ }
src/components/EventTicker.tsx ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { RecentActivityItem } from "@/shared/types";
2
+ import { formatRelativeTime } from "../shared/lib/format";
3
+
4
+ const ROW_H = 28; // px,无缝滚动依赖统一行高
5
+ const VISIBLE = 3;
6
+
7
+ function badge(r: RecentActivityItem) {
8
+ if (r.type === "project_submitted") {
9
+ return (
10
+ <span className="shrink-0 rounded bg-accent-50 px-1.5 py-px font-mono text-[10px] font-semibold uppercase tracking-wide text-accent-700">
11
+ New project
12
+ </span>
13
+ );
14
+ }
15
+ if (r.type === "disclosed") {
16
+ return (
17
+ <span className="shrink-0 rounded bg-ai-bg px-1.5 py-px font-mono text-[10px] font-semibold uppercase tracking-wide text-ai-ink">
18
+ Disclosed · {r.meta}
19
+ </span>
20
+ );
21
+ }
22
+ // scan_completed with findings
23
+ return (
24
+ <span className="shrink-0 rounded bg-sev-high-bg px-1.5 py-px font-mono text-[10px] font-semibold text-sev-high-ink">
25
+ {(r.meta ?? "").replace(" findings", "")} findings
26
+ </span>
27
+ );
28
+ }
29
+
30
+ /** 欢迎页滚动信息流(无边框、左右透明渐变):new project / new finding 摘要,无缝纵滚,hover 暂停 */
31
+ export function EventTicker({ events }: { events: RecentActivityItem[] | undefined }) {
32
+ const items = (events ?? [])
33
+ .filter(
34
+ (r) =>
35
+ r.type === "project_submitted" ||
36
+ r.type === "disclosed" ||
37
+ (r.type === "scan_completed" && r.meta && !r.meta.startsWith("+0")),
38
+ )
39
+ .slice(0, 8);
40
+
41
+ if (items.length === 0) return null;
42
+
43
+ const row = (r: RecentActivityItem, key: string) => (
44
+ <li key={key} className="flex items-center gap-2.5 text-[13px]" style={{ height: ROW_H }}>
45
+ {badge(r)}
46
+ <span className="min-w-0 truncate text-ink">{r.full_name ?? r.text}</span>
47
+ <span className="ml-auto shrink-0 font-mono text-[11px] text-ink-tertiary">
48
+ {formatRelativeTime(r.ts)}
49
+ </span>
50
+ </li>
51
+ );
52
+
53
+ return (
54
+ <div data-ticker aria-label="Live activity feed">
55
+ <div
56
+ className="overflow-hidden [mask-image:linear-gradient(to_right,transparent,black_10%,black_90%,transparent)]"
57
+ style={{ height: ROW_H * VISIBLE }}
58
+ >
59
+ <ul
60
+ className="ticker-track px-8"
61
+ style={{ animation: `ticker-y ${Math.max(8, items.length * 2.4)}s linear infinite` }}
62
+ >
63
+ {items.map((r, i) => row(r, `a-${i}`))}
64
+ {items.map((r, i) => row(r, `b-${i}`))}
65
+ </ul>
66
+ </div>
67
+ <style>{`
68
+ @keyframes ticker-y { to { transform: translateY(-50%); } }
69
+ [data-ticker]:hover .ticker-track { animation-play-state: paused; }
70
+ @media (prefers-reduced-motion: reduce) { .ticker-track { animation: none !important; } }
71
+ `}</style>
72
+ </div>
73
+ );
74
+ }
src/components/HeroStats.tsx ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect, useState } from "react";
2
+ import { AlertTriangle, Bug, FolderGit2 } from "lucide-react";
3
+ import type { OverviewStats } from "@/shared/types";
4
+
5
+ function usePrefersReducedMotion(): boolean {
6
+ const [reduced, setReduced] = useState(false);
7
+ useEffect(() => {
8
+ const media = window.matchMedia("(prefers-reduced-motion: reduce)");
9
+ setReduced(media.matches);
10
+ const update = () => setReduced(media.matches);
11
+ media.addEventListener("change", update);
12
+ return () => media.removeEventListener("change", update);
13
+ }, []);
14
+ return reduced;
15
+ }
16
+
17
+ function useCountUp(target: number, duration = 650): number {
18
+ const reduced = usePrefersReducedMotion();
19
+ const [value, setValue] = useState(reduced ? target : 0);
20
+ useEffect(() => {
21
+ if (reduced) {
22
+ setValue(target);
23
+ return;
24
+ }
25
+ let frame = 0;
26
+ const start = performance.now();
27
+ const tick = (time: number) => {
28
+ const progress = Math.min(1, (time - start) / duration);
29
+ setValue(Math.round(target * (1 - (1 - progress) ** 3)));
30
+ if (progress < 1) frame = requestAnimationFrame(tick);
31
+ };
32
+ frame = requestAnimationFrame(tick);
33
+ return () => cancelAnimationFrame(frame);
34
+ }, [duration, reduced, target]);
35
+ return value;
36
+ }
37
+
38
+ function AnimatedNumber({ value }: { value: number }) {
39
+ return <>{useCountUp(value).toLocaleString()}</>;
40
+ }
41
+
42
+ export function HeroStats({
43
+ stats,
44
+ loading = false,
45
+ failed = false,
46
+ }: {
47
+ stats: OverviewStats | undefined;
48
+ loading?: boolean;
49
+ failed?: boolean;
50
+ }) {
51
+ const unavailable = loading || failed || !stats;
52
+ const scannedRepositories = stats
53
+ ? stats.scanned_project_count ?? Math.min(stats.project_count, stats.scan_completed_count)
54
+ : 0;
55
+ const findingTotal = stats?.finding_total ?? 0;
56
+ const highRiskTotal = stats?.severity_counts?.high ?? 0;
57
+
58
+ const metrics = [
59
+ {
60
+ label: "Findings",
61
+ detail: "Discovered issues",
62
+ value: findingTotal,
63
+ icon: Bug,
64
+ color: "text-white",
65
+ iconClass: "border-white/[0.08] bg-white/[0.05] text-[#b5b6bd]",
66
+ },
67
+ {
68
+ label: "High risk",
69
+ detail: "High severity findings",
70
+ value: highRiskTotal,
71
+ icon: AlertTriangle,
72
+ color: "text-white",
73
+ iconClass: "border-white/[0.08] bg-white/[0.05] text-[#b5b6bd]",
74
+ },
75
+ {
76
+ label: "Repositories",
77
+ detail: "Scanned projects",
78
+ value: scannedRepositories,
79
+ icon: FolderGit2,
80
+ color: "text-white",
81
+ iconClass: "border-white/[0.08] bg-white/[0.05] text-[#b5b6bd]",
82
+ },
83
+ ];
84
+
85
+ return (
86
+ <section aria-labelledby="overview-title" className="openvuln-panel min-w-0 p-5 sm:p-6">
87
+ <div className="flex items-end justify-between gap-4">
88
+ <div>
89
+ <p className="font-mono text-[9px] font-semibold uppercase tracking-[0.18em] text-ink-tertiary">
90
+ Security overview
91
+ </p>
92
+ <h2 id="overview-title" className="mt-2 font-display text-lg font-semibold tracking-tight text-white">
93
+ Findings at a glance
94
+ </h2>
95
+ </div>
96
+ <span className="mb-1 h-2 w-2 rounded-full bg-white/60" aria-hidden />
97
+ </div>
98
+
99
+ <div className="mt-5 grid grid-cols-3 divide-x divide-white/[0.07]">
100
+ {metrics.map(({ label, detail, value, icon: Icon, color, iconClass }) => (
101
+ <div key={label} className="min-w-0 px-3 first:pl-0 last:pr-0 sm:px-5">
102
+ <div className={`flex h-8 w-8 items-center justify-center rounded-lg border ${iconClass}`} aria-hidden>
103
+ <Icon size={15} />
104
+ </div>
105
+ <p className={`mt-4 font-display text-3xl font-semibold tabular-nums tracking-[-0.04em] sm:text-4xl ${color}`}>
106
+ {unavailable ? "—" : <AnimatedNumber value={value} />}
107
+ </p>
108
+ <p className="mt-2 truncate text-[11px] font-medium text-[#d0d1d5] sm:text-xs">{label}</p>
109
+ <p className="mt-0.5 hidden text-[10px] leading-4 text-ink-tertiary sm:block">{detail}</p>
110
+ </div>
111
+ ))}
112
+ </div>
113
+ </section>
114
+ );
115
+ }
src/components/Layout.tsx ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Link, Outlet, useLocation } from "react-router-dom";
2
+ import { Github } from "lucide-react";
3
+ import { AuthButton } from "./AuthButton";
4
+ import { NotificationBell } from "./NotificationBell";
5
+
6
+ /** OpenVuln public repo; override at build time via VITE_GITHUB_REPO_URL. */
7
+ const OWN_REPO =
8
+ (import.meta.env.VITE_GITHUB_REPO_URL as string | undefined) ||
9
+ "https://github.com/Clouditera/OpenVuln";
10
+
11
+ export function Layout() {
12
+ const { pathname } = useLocation();
13
+ const isDeck = pathname === "/";
14
+ return (
15
+ <div className="flex min-h-screen flex-col">
16
+ {!isDeck && <header className="app-shell-chrome sticky top-0 z-30 h-14 border-b border-line bg-surface-header/95 backdrop-blur">
17
+ <div className="flex h-full items-center justify-between gap-4 px-5">
18
+ <div className="flex items-center">
19
+ <Link
20
+ to="/"
21
+ className="font-display text-[17px] font-bold tracking-tight focus-ring rounded-md text-ink"
22
+ >
23
+ OpenVuln
24
+ </Link>
25
+ </div>
26
+
27
+ <div className="flex items-center gap-2">
28
+ <NotificationBell appearance="light" />
29
+ <AuthButton appearance="light" />
30
+ <a
31
+ href={OWN_REPO}
32
+ target="_blank"
33
+ rel="noreferrer"
34
+ className="rounded-md p-2 text-ink-secondary hover:bg-surface-sunken hover:text-ink focus-ring"
35
+ title="OpenVuln on GitHub"
36
+ >
37
+ <Github size={18} />
38
+ </a>
39
+ </div>
40
+ </div>
41
+ </header>}
42
+
43
+ <main className="flex-1">
44
+ <Outlet />
45
+ </main>
46
+
47
+ {!isDeck && (
48
+ <footer className="app-shell-chrome mt-auto border-t border-line">
49
+ <div className="flex justify-end px-5 py-6 text-[13px] text-ink-secondary">
50
+ <div className="flex flex-wrap gap-x-5 gap-y-1">
51
+ <a href={OWN_REPO} target="_blank" rel="noreferrer" className="hover:text-ink">
52
+ GitHub
53
+ </a>
54
+ <Link to="/about" className="hover:text-ink">
55
+ About
56
+ </Link>
57
+ </div>
58
+ </div>
59
+ </footer>
60
+ )}
61
+ </div>
62
+ );
63
+ }
src/components/NotificationBell.tsx ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect, useRef, useState } from "react";
2
+ import { useNavigate } from "react-router-dom";
3
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
4
+ import { Bell, CheckCheck } from "lucide-react";
5
+ import { api, type NotificationItem } from "../shared/api/client";
6
+ import { useMe } from "../features/auth/useAuth";
7
+ import { formatRelativeTime } from "../shared/lib/format";
8
+
9
+ function summary(n: NotificationItem): string {
10
+ const c = n.payload.counts;
11
+ const total = c.critical + c.high + c.medium + c.low;
12
+ if (n.payload.no_value) return "Scan completed — no auditable content found";
13
+ if (total === 0) return "Scan completed — no findings";
14
+ const parts: string[] = [];
15
+ if (c.critical) parts.push(`${c.critical} critical`);
16
+ if (c.high) parts.push(`${c.high} high`);
17
+ if (c.medium) parts.push(`${c.medium} medium`);
18
+ if (c.low) parts.push(`${c.low} low`);
19
+ return `Scan completed — ${parts.join(" · ")}`;
20
+ }
21
+
22
+ /** 站内通知铃铛(task-78c9fb3a):未读红点 + 下拉列表,点击跳项目页并标已读。60s 轮询。 */
23
+ export function NotificationBell({ appearance = "light" }: { appearance?: "light" | "dark" }) {
24
+ const meQ = useMe();
25
+ const authed = meQ.data?.authenticated === true;
26
+ const nav = useNavigate();
27
+ const qc = useQueryClient();
28
+ const [open, setOpen] = useState(false);
29
+ const rootRef = useRef<HTMLDivElement>(null);
30
+
31
+ const listQ = useQuery({
32
+ queryKey: ["notifications"],
33
+ queryFn: () => api.notifications(20),
34
+ enabled: authed,
35
+ refetchInterval: 60_000,
36
+ refetchOnWindowFocus: true,
37
+ retry: false,
38
+ });
39
+
40
+ const invalidate = () => qc.invalidateQueries({ queryKey: ["notifications"] });
41
+ const readM = useMutation({ mutationFn: api.markNotificationsRead, onSettled: invalidate });
42
+ const readAllM = useMutation({ mutationFn: api.markAllNotificationsRead, onSettled: invalidate });
43
+
44
+ useEffect(() => {
45
+ if (!open) return;
46
+ const onDocDown = (e: MouseEvent) => {
47
+ if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);
48
+ };
49
+ const onKey = (e: KeyboardEvent) => {
50
+ if (e.key === "Escape") setOpen(false);
51
+ };
52
+ document.addEventListener("mousedown", onDocDown);
53
+ document.addEventListener("keydown", onKey);
54
+ return () => {
55
+ document.removeEventListener("mousedown", onDocDown);
56
+ document.removeEventListener("keydown", onKey);
57
+ };
58
+ }, [open]);
59
+
60
+ if (!authed) return null;
61
+
62
+ const dark = appearance === "dark";
63
+ const items = listQ.data?.notifications ?? [];
64
+ const unread = listQ.data?.unread_count ?? 0;
65
+
66
+ const openItem = (n: NotificationItem) => {
67
+ setOpen(false);
68
+ if (!n.read_at) readM.mutate([n.id]);
69
+ const [owner, repo] = n.payload.full_name.split("/");
70
+ if (owner && repo) nav(`/p/${owner}/${repo}`);
71
+ };
72
+
73
+ return (
74
+ <div ref={rootRef} className="relative">
75
+ <button
76
+ type="button"
77
+ onClick={() => setOpen((v) => !v)}
78
+ aria-expanded={open}
79
+ aria-haspopup="menu"
80
+ aria-label={unread > 0 ? `Notifications (${unread} unread)` : "Notifications"}
81
+ className={
82
+ dark
83
+ ? "relative flex h-9 w-9 items-center justify-center rounded-full border border-[#333] bg-[#030303] text-[#acacb0] transition hover:border-[#484a58] hover:bg-[#111216] hover:text-white focus-ring-dark"
84
+ : "relative flex h-9 w-9 items-center justify-center rounded-md border border-line bg-surface text-ink-secondary transition-colors hover:bg-surface-sunken hover:text-ink focus-ring"
85
+ }
86
+ >
87
+ <Bell size={dark ? 14 : 16} />
88
+ {unread > 0 && (
89
+ <span className="absolute -right-1 -top-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-danger px-1 text-[10px] font-semibold leading-none text-white">
90
+ {unread > 9 ? "9+" : unread}
91
+ </span>
92
+ )}
93
+ </button>
94
+
95
+ {open && (
96
+ <div
97
+ role="menu"
98
+ className={
99
+ dark
100
+ ? "absolute right-0 top-full z-40 mt-2 w-80 overflow-hidden rounded-xl border border-[#333] bg-[#111216] shadow-[0_16px_50px_rgba(0,0,0,0.5)]"
101
+ : "absolute right-0 top-full z-40 mt-1.5 w-80 overflow-hidden rounded-lg border border-line bg-surface shadow-lg"
102
+ }
103
+ >
104
+ <div
105
+ className={`flex items-center justify-between border-b px-3.5 py-2.5 ${dark ? "border-[#26272c]" : "border-line"}`}
106
+ >
107
+ <span className={`text-[13px] font-medium ${dark ? "text-[#f0f2f6]" : "text-ink"}`}>
108
+ Notifications
109
+ </span>
110
+ {unread > 0 && (
111
+ <button
112
+ type="button"
113
+ onClick={() => readAllM.mutate()}
114
+ disabled={readAllM.isPending}
115
+ className={`inline-flex items-center gap-1 text-[12px] ${dark ? "text-[#acacb0] hover:text-white" : "text-ink-secondary hover:text-ink"}`}
116
+ >
117
+ <CheckCheck size={13} />
118
+ Mark all read
119
+ </button>
120
+ )}
121
+ </div>
122
+
123
+ <ul className="max-h-80 overflow-y-auto">
124
+ {listQ.isPending ? (
125
+ <li className={`px-3.5 py-6 text-center text-[13px] ${dark ? "text-[#77787e]" : "text-ink-tertiary"}`}>
126
+ Loading…
127
+ </li>
128
+ ) : items.length === 0 ? (
129
+ <li className={`px-3.5 py-6 text-center text-[13px] ${dark ? "text-[#77787e]" : "text-ink-tertiary"}`}>
130
+ No notifications yet
131
+ </li>
132
+ ) : (
133
+ items.map((n) => {
134
+ const isUnread = !n.read_at;
135
+ return (
136
+ <li key={n.id}>
137
+ <button
138
+ type="button"
139
+ role="menuitem"
140
+ onClick={() => openItem(n)}
141
+ className={`flex w-full items-start gap-2.5 px-3.5 py-2.5 text-left transition-colors ${
142
+ dark ? "hover:bg-[#1a1b20]" : "hover:bg-surface-sunken"
143
+ }`}
144
+ >
145
+ <span
146
+ className={`mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full ${isUnread ? "bg-accent-600" : "bg-transparent"}`}
147
+ aria-hidden
148
+ />
149
+ <span className="min-w-0 flex-1">
150
+ <span className={`block truncate text-[13px] font-medium ${dark ? "text-[#f0f2f6]" : "text-ink"}`}>
151
+ {n.payload.full_name}
152
+ </span>
153
+ <span className={`mt-0.5 block text-[12px] leading-snug ${dark ? "text-[#acacb0]" : "text-ink-secondary"}`}>
154
+ {summary(n)}
155
+ </span>
156
+ <span className={`mt-0.5 block font-mono text-[11px] ${dark ? "text-[#696a70]" : "text-ink-tertiary"}`}>
157
+ {formatRelativeTime(n.created_at)}
158
+ </span>
159
+ </span>
160
+ </button>
161
+ </li>
162
+ );
163
+ })
164
+ )}
165
+ </ul>
166
+ </div>
167
+ )}
168
+ </div>
169
+ );
170
+ }
src/components/PlatformPulse.tsx ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect, useMemo, useRef, useState } from "react";
2
+ import { Link } from "react-router-dom";
3
+ import type { OverviewStats, TrendDay } from "@/shared/types";
4
+ import { SEV_ORDER, severityLabel } from "../shared/lib/format";
5
+
6
+ const SEV = {
7
+ high: "#F24F4F",
8
+ medium: "#FF733C",
9
+ low: "#F7C530",
10
+ critical: "#C22828",
11
+ } as const;
12
+
13
+ type Pt = TrendDay;
14
+
15
+ function stackedAreas(data: Pt[], w = 560, h = 180) {
16
+ const keys = ["critical", "high", "medium", "low"] as const;
17
+ const max = Math.max(...data.map((d) => (d.critical??0)+d.high+d.medium+d.low ), 1);
18
+ const x = (i: number) => (data.length <= 1 ? 0 : (i / (data.length - 1)) * w);
19
+ const y = (v: number) => h - (v / max) * (h - 16);
20
+ const acc = data.map(() => 0);
21
+ return keys.map((k) => {
22
+ const top = data.map((d, i) => {
23
+ acc[i] += d[k];
24
+ return [x(i), y(acc[i])] as const;
25
+ });
26
+ const base = data.map((d, i) => [x(i), y(acc[i] - d[k])] as const).reverse();
27
+ const line = top
28
+ .map((p, i) => `${i ? "L" : "M"}${p[0].toFixed(1)},${p[1].toFixed(1)}`)
29
+ .join("");
30
+ const area = `${line}${base.map((p) => `L${p[0].toFixed(1)},${p[1].toFixed(1)}`).join("")}Z`;
31
+ return { key: k, area, line };
32
+ });
33
+ }
34
+
35
+ function usePrefersReducedMotion(): boolean {
36
+ const [reduced, setReduced] = useState(false);
37
+ useEffect(() => {
38
+ const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
39
+ setReduced(mq.matches);
40
+ const fn = () => setReduced(mq.matches);
41
+ mq.addEventListener("change", fn);
42
+ return () => mq.removeEventListener("change", fn);
43
+ }, []);
44
+ return reduced;
45
+ }
46
+
47
+ function formatElapsed(sec: number): string {
48
+ if (sec < 60) return `${sec}s`;
49
+ const m = Math.floor(sec / 60);
50
+ if (m < 60) return `${m}m`;
51
+ return `${Math.floor(m / 60)}h ${m % 60}m`;
52
+ }
53
+
54
+ const PANEL = "rounded-lg border border-line bg-surface-raised p-4";
55
+ const EYEBROW = "font-mono text-[11px] uppercase tracking-wider text-ink-tertiary";
56
+
57
+ /** 首页第二页(浅色):趋势图 / LIVE / 新增漏洞事件卡 / TOP CWE */
58
+ export function PlatformPulse({ stats }: { stats: OverviewStats | undefined }) {
59
+ const reduced = usePrefersReducedMotion();
60
+ const trend = stats?.trend ?? [];
61
+ const layers = useMemo(() => (trend.length ? stackedAreas(trend) : []), [trend]);
62
+ const pathRefs = useRef<(SVGPathElement | null)[]>([]);
63
+
64
+ useEffect(() => {
65
+ if (reduced) return;
66
+ for (const el of pathRefs.current) {
67
+ if (!el) continue;
68
+ const len = el.getTotalLength();
69
+ el.style.strokeDasharray = `${len}`;
70
+ el.style.strokeDashoffset = `${len}`;
71
+ el.getBoundingClientRect();
72
+ el.style.transition = "stroke-dashoffset 900ms ease-out";
73
+ el.style.strokeDashoffset = "0";
74
+ }
75
+ }, [layers, reduced]);
76
+
77
+ const sevTotals = stats?.severity_counts ?? { critical: 0, high: 0, medium: 0, low: 0 };
78
+ const live = stats?.live;
79
+ const scanningCount = live?.scanning.length ?? 0;
80
+ const queuedCount = live?.queued_count ?? 0;
81
+ const cweTop = stats?.cwe_top ?? [];
82
+ const cweMax = Math.max(1, ...cweTop.map((c) => c.count));
83
+ const hasFindings =
84
+ (stats?.finding_total ?? 0) > 0 || trend.some((d) => (d.critical??0)+d.high+d.medium+d.low > 0);
85
+
86
+ const xTicks = useMemo(() => {
87
+ if (trend.length < 2) return [];
88
+ const idxs = [0, 7, 14, 21, 29].filter((i) => i < trend.length);
89
+ return idxs.map((i) => ({
90
+ i,
91
+ label: trend[i].date.slice(5),
92
+ x: (i / (trend.length - 1)) * 560,
93
+ }));
94
+ }, [trend]);
95
+
96
+ return (
97
+ <div className="mx-auto max-w-6xl px-6 py-6">
98
+ <p className={`mb-4 ${EYEBROW}`}>
99
+ Platform Pulse
100
+ <span className="mx-2 text-line">·</span>
101
+ <span className="inline-flex items-center gap-1.5 text-success-ink">
102
+ <span className="relative flex h-1.5 w-1.5">
103
+ <span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-success opacity-60 motion-reduce:animate-none" />
104
+ <span className="relative inline-flex h-1.5 w-1.5 rounded-full bg-success" />
105
+ </span>
106
+ Live
107
+ </span>
108
+ </p>
109
+
110
+ <div className="grid grid-cols-1 gap-4 lg:grid-cols-12">
111
+ {/* Findings 趋势 */}
112
+ <div className={`${PANEL} lg:col-span-7`}>
113
+ <div className="flex items-baseline justify-between gap-2">
114
+ <p className={EYEBROW}>Findings · last 30 days</p>
115
+ <p className="font-display text-sm font-semibold text-ink">
116
+ {(stats?.finding_total ?? 0).toLocaleString()}
117
+ </p>
118
+ </div>
119
+ <div className="relative mt-3">
120
+ {!hasFindings && (
121
+ <div className="pointer-events-none absolute inset-0 z-10 flex items-center justify-center">
122
+ <span className="text-sm text-ink-tertiary">Awaiting first scans</span>
123
+ </div>
124
+ )}
125
+ <svg
126
+ viewBox="0 0 560 180"
127
+ className="h-auto w-full"
128
+ role="img"
129
+ aria-label="Stacked area chart of findings by severity over the last 30 days"
130
+ >
131
+ {[0.25, 0.5, 0.75].map((g) => (
132
+ <line
133
+ key={g}
134
+ x1={0}
135
+ x2={560}
136
+ y1={16 + (180 - 16) * (1 - g)}
137
+ y2={16 + (180 - 16) * (1 - g)}
138
+ stroke="#E7E8EB"
139
+ strokeWidth={1}
140
+ />
141
+ ))}
142
+ {[...layers].reverse().map((layer) => (
143
+ <path
144
+ key={`a-${layer.key}`}
145
+ d={layer.area}
146
+ fill={SEV[layer.key]}
147
+ fillOpacity={reduced ? 0.25 : 0}
148
+ style={
149
+ reduced
150
+ ? undefined
151
+ : { animation: "pulse-fade-in 400ms ease-out forwards", animationDelay: "200ms" }
152
+ }
153
+ />
154
+ ))}
155
+ {layers.map((layer, idx) => (
156
+ <path
157
+ key={`l-${layer.key}`}
158
+ ref={(el) => {
159
+ pathRefs.current[idx] = el;
160
+ }}
161
+ d={layer.line}
162
+ fill="none"
163
+ stroke={SEV[layer.key]}
164
+ strokeWidth={1.5}
165
+ />
166
+ ))}
167
+ {xTicks.map((t) => (
168
+ <text
169
+ key={t.i}
170
+ x={t.x}
171
+ y={176}
172
+ textAnchor={t.i === 0 ? "start" : t.i >= 28 ? "end" : "middle"}
173
+ className="fill-ink-tertiary"
174
+ style={{ fontSize: 10, fontFamily: "ui-monospace, monospace" }}
175
+ >
176
+ {t.label}
177
+ </text>
178
+ ))}
179
+ </svg>
180
+ </div>
181
+ <div className="mt-2 flex flex-wrap gap-x-4 gap-y-1 font-mono text-[12px] text-ink-secondary">
182
+ {SEV_ORDER.map((s) => (
183
+ <span key={s} className="inline-flex items-center gap-1.5">
184
+ <span
185
+ className="inline-block h-1.5 w-1.5 rounded-full"
186
+ style={{ backgroundColor: SEV[s] }}
187
+ />
188
+ {severityLabel(s)} {sevTotals[s]}
189
+ </span>
190
+ ))}
191
+ </div>
192
+ </div>
193
+
194
+ {/* LIVE NOW */}
195
+ <div className={`${PANEL} lg:col-span-5`}>
196
+ <p className={EYEBROW}>Live now</p>
197
+ <p className="mt-2 flex items-center gap-2 text-sm text-ink">
198
+ <span className="relative flex h-2 w-2">
199
+ {(scanningCount > 0 || queuedCount > 0) && (
200
+ <span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-success opacity-50 motion-reduce:hidden" />
201
+ )}
202
+ <span
203
+ className={`relative inline-flex h-2 w-2 rounded-full ${
204
+ scanningCount > 0 ? "bg-success" : "bg-ink-tertiary"
205
+ }`}
206
+ />
207
+ </span>
208
+ <span className="font-mono text-[13px]">
209
+ {scanningCount > 0 || queuedCount > 0 ? (
210
+ <>
211
+ {scanningCount} scanning · {queuedCount} queued
212
+ </>
213
+ ) : (
214
+ <span className="text-ink-tertiary">Idle · queue empty</span>
215
+ )}
216
+ </span>
217
+ </p>
218
+ <ul className="mt-3 space-y-2.5">
219
+ {(live?.scanning ?? []).map((s) => (
220
+ <li key={s.project_id} className="flex items-center gap-2 text-sm">
221
+ <LiveDot />
222
+ <Link
223
+ to={`/p/${s.full_name}`}
224
+ className="min-w-0 flex-1 truncate text-ink hover:text-accent-600"
225
+ >
226
+ {s.full_name}
227
+ </Link>
228
+ <span className="shrink-0 font-mono text-[12px] text-ink-tertiary">
229
+ {formatElapsed(s.elapsed_sec)}
230
+ </span>
231
+ </li>
232
+ ))}
233
+ </ul>
234
+ </div>
235
+
236
+ {/* TOP CWE */}
237
+ <div className={`${PANEL} lg:col-span-12`}>
238
+ <p className={EYEBROW}>Top CWE</p>
239
+ {cweTop.length === 0 ? (
240
+ <p className="mt-3 text-sm text-ink-tertiary">No CWE data yet.</p>
241
+ ) : (
242
+ <ul className="mt-3 grid grid-cols-1 gap-x-8 gap-y-2 sm:grid-cols-2 lg:grid-cols-4">
243
+ {cweTop.map((c) => (
244
+ <li key={c.cwe} className="flex items-center gap-2 text-sm">
245
+ <a
246
+ href={
247
+ c.cwe.startsWith("CWE-")
248
+ ? `https://cwe.mitre.org/data/definitions/${c.cwe.replace("CWE-", "")}.html`
249
+ : undefined
250
+ }
251
+ target="_blank"
252
+ rel="noreferrer"
253
+ className="w-[4.5rem] shrink-0 font-mono text-[12px] text-accent-600 hover:underline"
254
+ >
255
+ {c.cwe}
256
+ </a>
257
+ <span className="w-16 shrink-0 truncate text-[12px] text-ink-secondary">
258
+ {c.name ?? "—"}
259
+ </span>
260
+ <div className="h-1 flex-1 overflow-hidden rounded-full bg-surface-sunken">
261
+ <div
262
+ className="h-full rounded-full bg-accent-600"
263
+ style={{ width: `${(c.count / cweMax) * 100}%` }}
264
+ />
265
+ </div>
266
+ <span className="w-8 text-right font-mono text-[12px] text-ink-secondary">
267
+ {c.count}
268
+ </span>
269
+ </li>
270
+ ))}
271
+ </ul>
272
+ )}
273
+ </div>
274
+ </div>
275
+
276
+ <style>{`
277
+ @keyframes pulse-fade-in {
278
+ from { fill-opacity: 0; }
279
+ to { fill-opacity: 0.25; }
280
+ }
281
+ @keyframes live-ring {
282
+ 0% { transform: scale(0.6); opacity: 0.7; }
283
+ 100% { transform: scale(2.2); opacity: 0; }
284
+ }
285
+ `}</style>
286
+ </div>
287
+ );
288
+ }
289
+
290
+ function LiveDot() {
291
+ return (
292
+ <span className="relative flex h-2.5 w-2.5 shrink-0 items-center justify-center">
293
+ <span
294
+ className="absolute h-2.5 w-2.5 rounded-full bg-success/40 motion-reduce:hidden"
295
+ style={{ animation: "live-ring 1.6s ease-out infinite" }}
296
+ />
297
+ <span className="relative h-1.5 w-1.5 rounded-full bg-success" />
298
+ </span>
299
+ );
300
+ }
src/components/ProjectRow.tsx ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useState } from "react";
2
+ import { useNavigate } from "react-router-dom";
3
+ import type { ProjectCard } from "@/shared/types";
4
+ import { formatRelativeTime, formatStars, totalFindings } from "../shared/lib/format";
5
+ import { SeverityBar } from "./SeverityBar";
6
+ import { StatusBadge } from "./StatusBadge";
7
+
8
+ function OwnerAvatar({ owner, compact = false }: { owner: string; compact?: boolean }) {
9
+ const [failed, setFailed] = useState(false);
10
+ const sizeClass = compact ? "h-7 w-7" : "h-8 w-8";
11
+ if (failed) {
12
+ return (
13
+ <div
14
+ className={`flex shrink-0 items-center justify-center rounded-full bg-white/[0.06] font-semibold text-ink-secondary ${sizeClass} ${compact ? "text-[10px]" : "text-xs"}`}
15
+ aria-hidden
16
+ >
17
+ {owner.slice(0, 1).toUpperCase()}
18
+ </div>
19
+ );
20
+ }
21
+ return (
22
+ <img
23
+ src={`https://github.com/${owner}.png?size=64`}
24
+ alt=""
25
+ width={32}
26
+ height={32}
27
+ className={`${sizeClass} shrink-0 rounded-full border border-line bg-surface-sunken`}
28
+ onError={() => setFailed(true)}
29
+ />
30
+ );
31
+ }
32
+
33
+ export function ProjectRow({ project, compact = false }: { project: ProjectCard; compact?: boolean }) {
34
+ const nav = useNavigate();
35
+ const state = project.latest_scan?.state;
36
+ const scanning = state === "scanning" || state === "dispatching";
37
+ const waiting = state !== "completed" && !scanning;
38
+ const soFar = project.latest_scan?.findings_so_far ?? 0;
39
+ const findings = totalFindings(project.severity_counts);
40
+
41
+ return (
42
+ <div
43
+ role="link"
44
+ tabIndex={0}
45
+ onClick={() => nav(`/p/${project.owner_login}/${project.name}`)}
46
+ onKeyDown={(e) => {
47
+ if (e.key === "Enter") nav(`/p/${project.owner_login}/${project.name}`);
48
+ }}
49
+ className={`group block cursor-pointer overflow-hidden border-b border-line px-1 transition-colors hover:bg-white/[0.025] focus-ring rounded-sm ${
50
+ compact ? "h-[104px] py-3" : "py-4"
51
+ }`}
52
+ >
53
+ <div className={`flex items-start ${compact ? "gap-2.5" : "gap-3"}`}>
54
+ <OwnerAvatar owner={project.owner_login} compact={compact} />
55
+ <div className="min-w-0 flex-1">
56
+ <div className="flex items-start justify-between gap-4">
57
+ <div className="min-w-0 flex-1">
58
+ <div className="flex flex-wrap items-center gap-x-2 gap-y-1">
59
+ <span className={`truncate font-medium text-ink ${compact ? "text-[12px]" : "text-sm"}`}>
60
+ {project.full_name}
61
+ </span>
62
+ </div>
63
+ {project.description && (
64
+ <p className={`mt-0.5 line-clamp-1 text-ink-secondary ${compact ? "text-[11px] leading-4" : "text-[13px]"}`}>
65
+ {project.description}
66
+ </p>
67
+ )}
68
+ <div className={`flex flex-wrap items-center gap-x-2 gap-y-1 text-ink-tertiary ${compact ? "mt-1 text-[10px]" : "mt-1.5 text-[13px]"}`}>
69
+ {project.language && (
70
+ <span className="inline-flex items-center gap-1">
71
+ <span className="h-1.5 w-1.5 rounded-full bg-accent-600/70" />
72
+ {project.language}
73
+ </span>
74
+ )}
75
+ <span>·</span>
76
+ <span>★ {formatStars(project.stars)}</span>
77
+ {project.latest_scan?.finished_at && (
78
+ <>
79
+ <span>·</span>
80
+ <span>scanned {formatRelativeTime(project.latest_scan.finished_at)}</span>
81
+ </>
82
+ )}
83
+ {!waiting && findings > 0 && (
84
+ <>
85
+ <span>·</span>
86
+ <span className="font-mono">{findings} findings</span>
87
+ </>
88
+ )}
89
+ </div>
90
+ <div className={compact ? "mt-1.5" : "mt-2.5"}>
91
+ {scanning ? (
92
+ <span className={`${compact ? "text-[10px]" : "text-[13px]"} font-medium text-running-ink`}>
93
+ {soFar > 0 ? `Scanning · ${soFar} findings so far` : "Scanning…"}
94
+ </span>
95
+ ) : waiting ? (
96
+ <span className={`${compact ? "text-[10px]" : "text-[13px]"} text-ink-tertiary`}>In scan queue</span>
97
+ ) : compact && findings === 0 ? (
98
+ <span className="text-[10px] text-ink-tertiary">No findings</span>
99
+ ) : (
100
+ <SeverityBar
101
+ counts={project.severity_counts}
102
+ showLegend
103
+ widthClass={compact ? "w-32" : "w-40"}
104
+ heightClass={compact ? "h-1" : "h-1.5"}
105
+ legendClass={compact ? "text-[9px]" : "text-[11px]"}
106
+ />
107
+ )}
108
+ </div>
109
+ </div>
110
+ {/* completed 的扫描时间已在 meta 行,右侧 badge 只留给需要注意的状态(去重,fish v1.11) */}
111
+ {state !== "completed" && (
112
+ <div className={`shrink-0 pt-0.5 ${compact ? "scale-90 origin-top-right" : ""}`}>
113
+ <StatusBadge state={state} finishedAt={project.latest_scan?.finished_at} />
114
+ </div>
115
+ )}
116
+ </div>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ );
121
+ }
src/components/RepoSubmitForm.tsx ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useState } from "react";
2
+ import { useNavigate } from "react-router-dom";
3
+ import { ArrowUp, CircleAlert, Github, LoaderCircle } from "lucide-react";
4
+ import { ApiError, api, navigateToLogin } from "../shared/api/client";
5
+ import { useMe } from "../features/auth/useAuth";
6
+ import { Button } from "./Button";
7
+
8
+ function mapError(err: unknown): string {
9
+ if (!(err instanceof ApiError)) {
10
+ return "Something went wrong. Please try again.";
11
+ }
12
+ const reason = String(err.context?.reason ?? "");
13
+ const message = String(err.context?.message ?? "");
14
+ if (err.status === 401) {
15
+ return "Please sign in with GitHub to submit a repository.";
16
+ }
17
+ if (err.status === 403) {
18
+ return (
19
+ message ||
20
+ "Only accounts with admin or maintain permission on this repository can submit it."
21
+ );
22
+ }
23
+ if (reason === "ref_not_found" || reason === "invalid_ref") {
24
+ return "That branch/tag/commit was not found in this repository.";
25
+ }
26
+ if (reason === "invalid_github_url") {
27
+ return "That doesn't look like a GitHub repository URL. Expected: https://github.com/owner/repo";
28
+ }
29
+ if (reason === "private_repo") {
30
+ return "This repository is private or does not exist. OpenVuln scans public projects only.";
31
+ }
32
+ if (reason === "cooldown") {
33
+ const days = err.context?.retry_after_days;
34
+ return `This project was scanned recently. You can resubmit after ${days ?? "a few"} day(s).`;
35
+ }
36
+ if (reason === "duplicate" || err.status === 409) {
37
+ return message || "This project is already on OpenVuln.";
38
+ }
39
+ if (err.status === 404) {
40
+ return "This repository is private or does not exist. OpenVuln scans public projects only.";
41
+ }
42
+ if (err.status >= 500) {
43
+ return "OpenVuln is temporarily unavailable. Please try again in a moment.";
44
+ }
45
+ return message || err.message || "Submission failed.";
46
+ }
47
+
48
+ export function RepoSubmitForm({
49
+ size = "default",
50
+ appearance = "default",
51
+ className = "",
52
+ }: {
53
+ size?: "default" | "hero";
54
+ appearance?: "default" | "dark";
55
+ className?: string;
56
+ }) {
57
+ const nav = useNavigate();
58
+ const meQ = useMe();
59
+ const [url, setUrl] = useState("");
60
+ const [ref, setRef] = useState("");
61
+ const [showRef, setShowRef] = useState(false);
62
+ const [error, setError] = useState<string | null>(null);
63
+ const [pending, setPending] = useState(false);
64
+
65
+ const hero = size === "hero";
66
+ const dark = appearance === "dark";
67
+
68
+ const onSubmit = async (e: React.FormEvent) => {
69
+ e.preventDefault();
70
+ setError(null);
71
+ const git_url = url.trim();
72
+ if (!git_url) {
73
+ setError("Please paste a GitHub repository URL.");
74
+ return;
75
+ }
76
+ // 未登录 → 整页跳 GitHub OAuth,登录后回到部署首页
77
+ if (meQ.data && !meQ.data.authenticated) {
78
+ navigateToLogin();
79
+ window.dispatchEvent(new Event("ov-oauth-popup-opened"));
80
+ return;
81
+ }
82
+ setPending(true);
83
+ try {
84
+ const res = await api.submitProject({ git_url, ...(ref.trim() ? { ref: ref.trim() } : {}) });
85
+ nav(`/p/${res.project.owner_login}/${res.project.name}`, {
86
+ state: { justSubmitted: true },
87
+ });
88
+ } catch (err) {
89
+ setError(mapError(err));
90
+ } finally {
91
+ setPending(false);
92
+ }
93
+ };
94
+
95
+ if (dark) {
96
+ return (
97
+ <form
98
+ onSubmit={(e) => void onSubmit(e)}
99
+ className={className}
100
+ aria-label="Submit a GitHub repository"
101
+ aria-busy={pending}
102
+ >
103
+ <div
104
+ className={`openvuln-composer group flex min-h-[62px] items-center gap-3 rounded-[18px] border bg-[#141519] p-2 pl-5 shadow-[0_18px_60px_rgba(0,0,0,0.32)] transition focus-within:bg-[#17181d] focus-within:shadow-[0_22px_70px_rgba(68,70,88,0.16)] ${
105
+ error ? "border-[#a94d55]" : "border-[#35363c] focus-within:border-[#5b5e6a]"
106
+ }`}
107
+ >
108
+ <Github
109
+ size={20}
110
+ className="shrink-0 text-[#6d6f78] transition group-focus-within:text-[#acacb0]"
111
+ />
112
+ <input
113
+ type="url"
114
+ value={url}
115
+ onChange={(e) => {
116
+ setUrl(e.target.value);
117
+ setError(null);
118
+ }}
119
+ placeholder="Paste a public GitHub repository URL"
120
+ spellCheck={false}
121
+ className="min-w-0 flex-1 bg-transparent py-3 text-[14px] text-[#f0f2f6] outline-none placeholder:text-[#696a70] sm:text-[15px]"
122
+ aria-label="GitHub repository URL"
123
+ aria-invalid={!!error}
124
+ />
125
+ <button
126
+ type="submit"
127
+ aria-label={pending ? "Submitting repository" : "Analyze repository"}
128
+ className="flex h-11 w-11 shrink-0 items-center justify-center rounded-[14px] border border-[#0d0d0f] bg-[#ebecf0] text-[#0d0d0f] shadow-sm transition hover:scale-[1.03] hover:bg-white active:scale-95 focus-ring-dark disabled:cursor-not-allowed disabled:bg-[#484a58] disabled:text-[#989aa5] disabled:opacity-100"
129
+ disabled={!url.trim() || pending}
130
+ >
131
+ {pending ? (
132
+ <LoaderCircle size={20} className="animate-spin motion-reduce:animate-none" />
133
+ ) : (
134
+ <ArrowUp size={21} strokeWidth={2.2} />
135
+ )}
136
+ </button>
137
+ </div>
138
+
139
+ <div className="mt-2.5 flex justify-center">
140
+ {showRef ? (
141
+ <input
142
+ type="text"
143
+ value={ref}
144
+ onChange={(e) => setRef(e.target.value)}
145
+ placeholder="Branch, tag, or commit SHA (optional)"
146
+ spellCheck={false}
147
+ className="h-8 w-72 rounded-full border border-[#333] bg-[#030303] px-3.5 font-mono text-xs text-[#f0f2f6] outline-none placeholder:text-[#696a70] focus:border-[#484a58]"
148
+ aria-label="Version to scan (branch, tag, or commit SHA)"
149
+ />
150
+ ) : (
151
+ <button
152
+ type="button"
153
+ onClick={() => setShowRef(true)}
154
+ className="text-[11px] text-[#696a70] underline decoration-[#333] underline-offset-2 transition hover:text-[#acacb0]"
155
+ >
156
+ Scan a specific version
157
+ </button>
158
+ )}
159
+ </div>
160
+
161
+ <div className="mt-3 flex min-h-5 items-start justify-center gap-1.5 text-center text-xs text-[#77787e]">
162
+ {error ? (
163
+ <span className="inline-flex items-start gap-1.5 text-[#ff9ca5]" role="alert">
164
+ <CircleAlert size={14} className="mt-px shrink-0" />
165
+ <span>{error}</span>
166
+ </span>
167
+ ) : pending ? (
168
+ <span className="text-[#b9bfd2]" role="status">Submitting repository…</span>
169
+ ) : (
170
+ <span className="inline-flex items-center gap-1.5">
171
+ <CircleAlert size={13} strokeWidth={1.8} className="shrink-0" aria-hidden />
172
+ <span>Public repositories · Repository maintainers only</span>
173
+ </span>
174
+ )}
175
+ </div>
176
+ </form>
177
+ );
178
+ }
179
+
180
+ return (
181
+ <form onSubmit={(e) => void onSubmit(e)} className={className}>
182
+ <div className="flex flex-col gap-2 sm:flex-row">
183
+ <input
184
+ type="text"
185
+ value={url}
186
+ onChange={(e) => setUrl(e.target.value)}
187
+ placeholder="https://github.com/owner/repo"
188
+ spellCheck={false}
189
+ className={`h-12 flex-1 rounded-lg border bg-surface-raised px-3.5 font-mono text-sm text-ink placeholder:text-ink-tertiary focus-ring ${
190
+ error ? "border-danger" : "border-line"
191
+ }`}
192
+ aria-invalid={!!error}
193
+ />
194
+ <Button type="submit" size="lg" disabled={pending} className="rounded-lg shrink-0">
195
+ {pending ? "Submitting…" : "Submit"}
196
+ </Button>
197
+ </div>
198
+ <div className="mt-2">
199
+ {showRef ? (
200
+ <input
201
+ type="text"
202
+ value={ref}
203
+ onChange={(e) => setRef(e.target.value)}
204
+ placeholder="Branch, tag, or commit SHA (optional — default: default branch HEAD)"
205
+ spellCheck={false}
206
+ className="h-9 w-full rounded-md border border-line bg-surface-raised px-3 font-mono text-xs text-ink placeholder:text-ink-tertiary focus-ring"
207
+ aria-label="Version to scan (branch, tag, or commit SHA)"
208
+ />
209
+ ) : (
210
+ <button
211
+ type="button"
212
+ onClick={() => setShowRef(true)}
213
+ className="text-[12px] text-ink-tertiary underline decoration-line underline-offset-2 transition-colors hover:text-ink-secondary"
214
+ >
215
+ Scan a specific version
216
+ </button>
217
+ )}
218
+ </div>
219
+ {error && (
220
+ <p
221
+ className={`mt-2 flex items-start gap-1.5 text-sm text-danger ${hero ? "justify-center text-left" : ""}`}
222
+ role="alert"
223
+ >
224
+ <CircleAlert size={16} className="mt-0.5 shrink-0" />
225
+ <span>{error}</span>
226
+ </p>
227
+ )}
228
+ </form>
229
+ );
230
+ }
src/components/ReportBody.tsx ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Structured HTML render of a disclosed VH/VulnForge report
3
+ * (parsed report object preferred; raw yaml fallback).
4
+ */
5
+ import { useMemo } from "react";
6
+ import { load as parseYaml } from "js-yaml";
7
+
8
+ type Anchor = { file_path?: string; line?: number | string; function?: string };
9
+ type FlowStep = { step?: number | string; location?: string; description?: string };
10
+ type ReportDoc = {
11
+ metadata?: {
12
+ title?: string;
13
+ vuln_type?: string;
14
+ cwe?: string;
15
+ cvss_vector?: string;
16
+ cvss_score?: number | string;
17
+ ev_priority?: string;
18
+ ev_score?: number | string;
19
+ ev_rationale?: string;
20
+ poc_status?: string;
21
+ exp_status?: string;
22
+ affected_versions?: string;
23
+ anchors?: Anchor[];
24
+ };
25
+ description?: {
26
+ background?: string;
27
+ detailed_description?: string;
28
+ summary?: string;
29
+ attack_payload_description?: string;
30
+ attack_description?: string;
31
+ impact?: string;
32
+ combined_impact?: string;
33
+ remediation?: string;
34
+ fix_suggestion?: string;
35
+ };
36
+ code?: {
37
+ dataflow?: FlowStep[];
38
+ data_flow?: FlowStep[];
39
+ fix_patch?: string;
40
+ patch?: string;
41
+ };
42
+ references?: unknown;
43
+ };
44
+
45
+ function asRecord(v: unknown): Record<string, unknown> {
46
+ if (v && typeof v === "object" && !Array.isArray(v)) return v as Record<string, unknown>;
47
+ return {};
48
+ }
49
+
50
+ function str(v: unknown): string {
51
+ if (v == null) return "";
52
+ if (typeof v === "string") return v.trim();
53
+ if (typeof v === "number" || typeof v === "boolean") return String(v);
54
+ return "";
55
+ }
56
+
57
+ function Section({ label, children }: { label: string; children: React.ReactNode }) {
58
+ if (!children) return null;
59
+ return (
60
+ <section>
61
+ <p className="flex items-center gap-1.5 font-mono text-[11px] uppercase tracking-wider text-ink-tertiary">
62
+ <span className="h-3 w-[3px] rounded-full bg-accent-600" aria-hidden />
63
+ {label}
64
+ </p>
65
+ <div className="mt-1.5">{children}</div>
66
+ </section>
67
+ );
68
+ }
69
+
70
+ function Prose({ text }: { text: string }) {
71
+ if (!text) return null;
72
+ return (
73
+ <p className="whitespace-pre-wrap break-words text-sm leading-relaxed text-ink-secondary">
74
+ {text}
75
+ </p>
76
+ );
77
+ }
78
+
79
+ function normalizeDoc(input: unknown): ReportDoc | null {
80
+ if (!input || typeof input !== "object") return null;
81
+ const r = input as Record<string, unknown>;
82
+ return {
83
+ metadata: asRecord(r.metadata) as ReportDoc["metadata"],
84
+ description: asRecord(r.description) as ReportDoc["description"],
85
+ code: asRecord(r.code) as ReportDoc["code"],
86
+ references: r.references,
87
+ };
88
+ }
89
+
90
+ export type StructuredReport = {
91
+ metadata: Record<string, unknown>;
92
+ description: Record<string, unknown>;
93
+ code: Record<string, unknown>;
94
+ references: unknown;
95
+ };
96
+
97
+ /** Prefer structured `report`; raw yaml only as fallback. */
98
+ export function ReportBody({
99
+ report,
100
+ yaml,
101
+ }: {
102
+ report?: StructuredReport | null;
103
+ yaml?: string | null;
104
+ }) {
105
+ const doc = useMemo<ReportDoc | null>(() => {
106
+ if (report) return normalizeDoc(report);
107
+ if (yaml?.trim()) {
108
+ try {
109
+ return normalizeDoc(parseYaml(yaml));
110
+ } catch {
111
+ return null;
112
+ }
113
+ }
114
+ return null;
115
+ }, [report, yaml]);
116
+
117
+ if (!doc) {
118
+ if (yaml?.trim()) {
119
+ return (
120
+ <pre className="mt-4 max-h-[32rem] overflow-auto whitespace-pre-wrap break-words rounded-md border border-line bg-surface px-4 py-3 font-mono text-[12px] leading-relaxed text-ink">
121
+ {yaml}
122
+ </pre>
123
+ );
124
+ }
125
+ return (
126
+ <p className="mt-4 text-sm text-ink-tertiary">
127
+ Structured report is not available for this disclosure.
128
+ </p>
129
+ );
130
+ }
131
+
132
+ const meta = doc.metadata ?? {};
133
+ const fullTitle = typeof meta === "object" && "title" in meta ? (meta as { title?: string }).title : undefined;
134
+ const desc = doc.description ?? {};
135
+ const anchors = (meta.anchors ?? []).filter((a) => a && (a.file_path || a.function));
136
+ const dataflow = (doc.code?.dataflow ?? doc.code?.data_flow ?? []).filter(Boolean);
137
+ const refList = Array.isArray(doc.references)
138
+ ? doc.references.filter((r) => typeof r === "string" && (r as string).trim())
139
+ : [];
140
+
141
+ return (
142
+ <div className="mt-4 space-y-5">
143
+ {fullTitle && (
144
+ <h4 className="font-display text-[15px] font-semibold leading-snug text-ink">{fullTitle}</h4>
145
+ )}
146
+ <dl className="grid grid-cols-2 gap-x-6 gap-y-2 text-[13px] sm:grid-cols-4">
147
+ {meta.vuln_type && (
148
+ <div>
149
+ <dt className="text-ink-tertiary">Type</dt>
150
+ <dd className="mt-0.5 font-medium text-ink">{meta.vuln_type}</dd>
151
+ </div>
152
+ )}
153
+ {meta.cvss_score != null && (
154
+ <div>
155
+ <dt className="text-ink-tertiary">CVSS</dt>
156
+ <dd className="mt-0.5 font-medium text-ink">{meta.cvss_score}</dd>
157
+ </div>
158
+ )}
159
+ {meta.ev_priority && (
160
+ <div>
161
+ <dt className="text-ink-tertiary">EV priority</dt>
162
+ <dd className="mt-0.5 font-medium text-ink">{meta.ev_priority}</dd>
163
+ </div>
164
+ )}
165
+ {meta.poc_status && (
166
+ <div>
167
+ <dt className="text-ink-tertiary">PoC status</dt>
168
+ <dd className="mt-0.5 font-medium text-ink">{meta.poc_status}</dd>
169
+ </div>
170
+ )}
171
+ {meta.exp_status && (
172
+ <div>
173
+ <dt className="text-ink-tertiary">EXP status</dt>
174
+ <dd className="mt-0.5 font-medium text-ink">{meta.exp_status}</dd>
175
+ </div>
176
+ )}
177
+ {meta.affected_versions && (
178
+ <div className="col-span-2 sm:col-span-2">
179
+ <dt className="text-ink-tertiary">Affected</dt>
180
+ <dd className="mt-0.5 font-medium text-ink">{meta.affected_versions}</dd>
181
+ </div>
182
+ )}
183
+ {meta.cvss_vector && (
184
+ <div className="col-span-2 sm:col-span-4">
185
+ <dt className="text-ink-tertiary">Vector</dt>
186
+ <dd className="mt-0.5 font-mono text-[12px] text-ink-secondary">{meta.cvss_vector}</dd>
187
+ </div>
188
+ )}
189
+ </dl>
190
+
191
+ {str(meta.ev_rationale) && (
192
+ <Section label="Exploitability">
193
+ <Prose text={str(meta.ev_rationale)} />
194
+ </Section>
195
+ )}
196
+
197
+ {anchors.length > 0 && (
198
+ <Section label="Anchors">
199
+ <ul className="space-y-1.5">
200
+ {anchors.map((a, i) => (
201
+ <li key={i} className="flex flex-wrap items-baseline gap-x-2.5 text-[13px]">
202
+ <span className="shrink-0 font-mono font-medium text-ink">
203
+ {a.file_path}
204
+ {a.line != null && `:${a.line}`}
205
+ </span>
206
+ {a.function && <span className="text-ink-secondary">{a.function}</span>}
207
+ </li>
208
+ ))}
209
+ </ul>
210
+ </Section>
211
+ )}
212
+
213
+ {str(desc.background) && (
214
+ <Section label="Background">
215
+ <Prose text={str(desc.background)} />
216
+ </Section>
217
+ )}
218
+ {(str(desc.detailed_description) || str(desc.summary)) && (
219
+ <Section label="Detailed analysis">
220
+ <Prose text={str(desc.detailed_description) || str(desc.summary)} />
221
+ </Section>
222
+ )}
223
+ {(str(desc.attack_payload_description) || str(desc.attack_description)) && (
224
+ <Section label="Attack">
225
+ {str(desc.attack_description) && <Prose text={str(desc.attack_description)} />}
226
+ {str(desc.attack_payload_description) && (
227
+ <Prose text={str(desc.attack_payload_description)} />
228
+ )}
229
+ </Section>
230
+ )}
231
+ {(str(desc.impact) || str(desc.combined_impact)) && (
232
+ <Section label="Impact">
233
+ <Prose text={str(desc.impact) || str(desc.combined_impact)} />
234
+ </Section>
235
+ )}
236
+ {(str(desc.remediation) || str(desc.fix_suggestion)) && (
237
+ <Section label="Remediation">
238
+ <Prose text={str(desc.remediation) || str(desc.fix_suggestion)} />
239
+ </Section>
240
+ )}
241
+
242
+ {dataflow.length > 0 && (
243
+ <Section label="Dataflow">
244
+ <ol className="space-y-2.5">
245
+ {dataflow.map((st, i) => (
246
+ <li key={i} className="flex gap-3 text-[13px]">
247
+ <span className="flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-surface-sunken font-mono text-[11px] text-ink-secondary">
248
+ {st.step ?? i + 1}
249
+ </span>
250
+ <div className="min-w-0">
251
+ {st.location && (
252
+ <p className="font-mono text-[12px] font-medium text-ink">{st.location}</p>
253
+ )}
254
+ {st.description && (
255
+ <p className="mt-0.5 whitespace-pre-wrap break-words leading-relaxed text-ink-secondary">
256
+ {st.description}
257
+ </p>
258
+ )}
259
+ </div>
260
+ </li>
261
+ ))}
262
+ </ol>
263
+ </Section>
264
+ )}
265
+
266
+ {(str(doc.code?.fix_patch) || str(doc.code?.patch)) && (
267
+ <Section label="Fix patch">
268
+ <pre className="overflow-x-auto whitespace-pre-wrap break-words rounded-md border border-line bg-surface-sunken px-4 py-3 font-mono text-[12px] leading-relaxed text-ink">
269
+ {str(doc.code?.fix_patch) || str(doc.code?.patch)}
270
+ </pre>
271
+ </Section>
272
+ )}
273
+
274
+ {refList.length > 0 && (
275
+ <Section label="References">
276
+ <ul className="space-y-1 text-[13px]">
277
+ {(refList as string[]).map((r, i) =>
278
+ /^https?:\/\//.test(r) ? (
279
+ <li key={i}>
280
+ <a
281
+ href={r}
282
+ target="_blank"
283
+ rel="noreferrer"
284
+ className="break-all font-mono text-[12px] text-accent-600 hover:underline"
285
+ >
286
+ {r}
287
+ </a>
288
+ </li>
289
+ ) : (
290
+ <li key={i} className="text-ink-secondary">
291
+ {r}
292
+ </li>
293
+ ),
294
+ )}
295
+ </ul>
296
+ </Section>
297
+ )}
298
+ </div>
299
+ );
300
+ }
src/components/ScanDurationNotice.tsx ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Clock3 } from "lucide-react";
2
+
3
+ /** 扫描时长提示:小 note 样式(fish No.916)—— 时钟小图标 + 一行小字,无卡片无边框。 */
4
+ export function ScanDurationNotice({ className = "" }: { className?: string }) {
5
+ return (
6
+ <p
7
+ className={`flex items-center justify-center gap-1.5 text-xs text-[#77787e] ${className}`}
8
+ role="note"
9
+ >
10
+ <Clock3 size={13} strokeWidth={1.8} className="shrink-0" />
11
+ <span>A full scan usually takes 12+ hours.</span>
12
+ </p>
13
+ );
14
+ }
src/components/SeverityBar.tsx ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { Severity, SeverityCounts } from "@/shared/types";
2
+ import { SEV_ORDER, severityLabel, totalFindings } from "../shared/lib/format";
3
+
4
+ /** NVD four tiers — Critical uses R4 #C22828. */
5
+ const BAR: Record<Severity, string> = {
6
+ critical: "#C22828",
7
+ high: "#F24F4F",
8
+ medium: "#FF733C",
9
+ low: "#F7C530",
10
+ };
11
+
12
+ const DOT: Record<Severity, string> = {
13
+ critical: "bg-[#C22828]",
14
+ high: "bg-[#F24F4F]",
15
+ medium: "bg-sev-medium-bar",
16
+ low: "bg-sev-low-bar",
17
+ };
18
+
19
+ export function SeverityBar({
20
+ counts,
21
+ widthClass = "w-40",
22
+ heightClass = "h-1.5",
23
+ showLegend = true,
24
+ legendClass = "text-[12px]",
25
+ }: {
26
+ counts: SeverityCounts;
27
+ widthClass?: string;
28
+ heightClass?: string;
29
+ showLegend?: boolean;
30
+ legendClass?: string;
31
+ }) {
32
+ const total = totalFindings(counts);
33
+ const segs = SEV_ORDER.filter((s) => (counts[s] ?? 0) > 0).map((s) => ({
34
+ level: s,
35
+ pct: total === 0 ? 0 : (counts[s] / total) * 100,
36
+ count: counts[s],
37
+ }));
38
+
39
+ return (
40
+ <div className="flex flex-col gap-1.5">
41
+ <div
42
+ className={`flex ${heightClass} ${widthClass} overflow-hidden rounded-full bg-surface-sunken`}
43
+ role="img"
44
+ aria-label={`Severity distribution, ${total} findings`}
45
+ >
46
+ {segs.map((s) => (
47
+ <div
48
+ key={s.level}
49
+ className="h-full"
50
+ style={{ width: `${s.pct}%`, backgroundColor: BAR[s.level] }}
51
+ title={`${severityLabel(s.level)}: ${s.count}`}
52
+ />
53
+ ))}
54
+ </div>
55
+ {showLegend && (
56
+ <div
57
+ className={`flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-ink-secondary ${legendClass}`}
58
+ >
59
+ {SEV_ORDER.map((s) => (
60
+ <span key={s} className="inline-flex items-center gap-1">
61
+ <span className={`inline-block h-1.5 w-1.5 rounded-full ${DOT[s]}`} />
62
+ {counts[s] ?? 0} {severityLabel(s)}
63
+ </span>
64
+ ))}
65
+ </div>
66
+ )}
67
+ </div>
68
+ );
69
+ }
src/components/SeverityChip.tsx ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { CircleAlert, OctagonAlert, Siren, TriangleAlert } from "lucide-react";
2
+ import type { Severity } from "@/shared/types";
3
+ import { severityLabel } from "../shared/lib/format";
4
+
5
+ const icon = {
6
+ critical: Siren,
7
+ high: OctagonAlert,
8
+ medium: TriangleAlert,
9
+ low: CircleAlert,
10
+ } as const;
11
+
12
+ const cls = {
13
+ critical: "bg-sev-critical-bg text-sev-critical-ink",
14
+ high: "bg-sev-high-bg text-sev-high-ink",
15
+ medium: "bg-sev-medium-bg text-sev-medium-ink",
16
+ low: "bg-sev-low-bg text-sev-low-ink",
17
+ } as const;
18
+
19
+ export function SeverityChip({ severity }: { severity: Severity }) {
20
+ const Icon = icon[severity] ?? CircleAlert;
21
+ const style = cls[severity] ?? cls.low;
22
+ return (
23
+ <span
24
+ className={`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium ${style}`}
25
+ >
26
+ <Icon size={12} strokeWidth={2} />
27
+ {severityLabel(severity)}
28
+ </span>
29
+ );
30
+ }
src/components/StatusBadge.tsx ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { CheckCircle2, Clock, Loader2 } from "lucide-react";
2
+ import type { ScanJobState } from "@/shared/types";
3
+ import { formatRelativeTime } from "../shared/lib/format";
4
+
5
+ export function StatusBadge({
6
+ state,
7
+ finishedAt,
8
+ }: {
9
+ state: ScanJobState | null | undefined;
10
+ finishedAt?: string | null;
11
+ }) {
12
+ if (state === "completed") {
13
+ return (
14
+ <span className="inline-flex items-center gap-1 rounded-full bg-success-bg px-2 py-0.5 text-xs font-medium text-success-ink">
15
+ <CheckCircle2 size={12} />
16
+ {finishedAt ? `Scanned ${formatRelativeTime(finishedAt)}` : "Completed"}
17
+ </span>
18
+ );
19
+ }
20
+ if (state === "scanning" || state === "dispatching") {
21
+ return (
22
+ <span className="inline-flex items-center gap-1.5 rounded-full bg-running-bg px-2 py-0.5 text-xs font-medium text-running-ink">
23
+ <span className="relative flex h-1.5 w-1.5">
24
+ <span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-running opacity-60 motion-reduce:animate-none" />
25
+ <span className="relative inline-flex h-1.5 w-1.5 rounded-full bg-running" />
26
+ </span>
27
+ Scanning
28
+ </span>
29
+ );
30
+ }
31
+ // queued / failed / null → Waiting(fish No.491:scanning 独立展示,failed 仍归 waiting)
32
+ return (
33
+ <span className="inline-flex items-center gap-1.5 rounded-full bg-surface-sunken px-2 py-0.5 text-xs font-medium text-ink-secondary">
34
+ <Clock size={12} /> Waiting to be scanned
35
+ </span>
36
+ );
37
+ }
38
+
39
+ export function ScanningSpinner({ label = "Loading…" }: { label?: string }) {
40
+ return (
41
+ <div className="flex items-center gap-2 text-sm text-ink-secondary" role="status">
42
+ <Loader2 size={16} className="animate-spin text-accent-600" />
43
+ {label}
44
+ </div>
45
+ );
46
+ }
src/features/about/AboutPage.tsx ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Link } from "react-router-dom";
2
+ import { ArrowLeft } from "lucide-react";
3
+
4
+ export function AboutPage() {
5
+ return (
6
+ <div className="mx-auto max-w-6xl px-6 py-8">
7
+ <Link
8
+ to="/"
9
+ className="inline-flex items-center gap-1.5 text-[13px] text-ink-secondary hover:text-ink"
10
+ >
11
+ <ArrowLeft size={14} /> Projects
12
+ </Link>
13
+ <h1 className="mt-4 font-display text-xl font-bold text-ink">About OpenVuln</h1>
14
+ <div className="mt-4 max-w-prose space-y-4 text-sm leading-relaxed text-ink-secondary">
15
+ <p>
16
+ OpenVuln is a public vulnerability intelligence platform for open-source software.
17
+ Repository maintainers sign in with GitHub to submit their own projects for scanning by
18
+ the <strong className="font-medium text-ink">VulnHunter</strong> AI engine — only
19
+ accounts with admin or maintain permission on a repository can submit it.
20
+ </p>
21
+ <p>
22
+ Aggregate statistics — severity distribution, CWE categories, scan status — are public.
23
+ Detailed findings (titles, paths, code) are visible only to the repository's signed-in
24
+ maintainers, who choose what to disclose. Disclosed findings become fully public, like a
25
+ GitHub Security Advisory.
26
+ </p>
27
+ <p>
28
+ OpenVuln is a lightweight front door to VulnHunter: the heavy analysis runs on a dedicated
29
+ VulnHunter instance; this site focuses on disclosure and discovery.
30
+ </p>
31
+ </div>
32
+ </div>
33
+ );
34
+ }
src/features/auth/PopupCallbackPage.tsx ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect, useState } from "react";
2
+ import { CircleCheck, Loader2 } from "lucide-react";
3
+ import { apiUrl, type MeResponse } from "../../shared/api/client";
4
+
5
+ /**
6
+ * Popup OAuth completion page: after GitHub redirect, this page runs in the
7
+ * popup window (top-level, not iframe). It fetches /api/me from the API origin
8
+ * (cookie works here since it's a top-level request), then postMessages the
9
+ * result to the opener (iframe on huggingface.co where third-party cookies
10
+ * are blocked).
11
+ */
12
+ export function PopupCallbackPage() {
13
+ const [status, setStatus] = useState<"loading" | "done" | "error">("loading");
14
+
15
+ useEffect(() => {
16
+ let closed = false;
17
+
18
+ async function complete() {
19
+ try {
20
+ // This is a top-level window request — SameSite=None cookie IS sent
21
+ const res = await fetch(apiUrl("/api/me"), { credentials: "include" });
22
+ const data: MeResponse = await res.json();
23
+
24
+ if (!closed && window.opener) {
25
+ window.opener.postMessage(
26
+ { type: "ov-oauth-complete", user: data },
27
+ "*",
28
+ );
29
+ }
30
+ setStatus("done");
31
+ } catch {
32
+ setStatus("error");
33
+ // Still signal opener to try polling as fallback
34
+ if (!closed && window.opener) {
35
+ window.opener.postMessage({ type: "ov-oauth-complete" }, "*");
36
+ }
37
+ }
38
+
39
+ // Auto-close after showing success
40
+ window.setTimeout(() => {
41
+ if (!closed) {
42
+ try { window.close(); } catch { /* noop */ }
43
+ }
44
+ }, 2000);
45
+ }
46
+
47
+ complete();
48
+ return () => { closed = true; };
49
+ }, []);
50
+
51
+ if (status === "loading") {
52
+ return (
53
+ <div className="flex min-h-screen flex-col items-center justify-center bg-surface px-8 text-center">
54
+ <Loader2 size={40} className="animate-spin text-accent-600" strokeWidth={1.6} />
55
+ <p className="mt-4 text-sm text-ink-secondary">Completing sign-in…</p>
56
+ </div>
57
+ );
58
+ }
59
+
60
+ if (status === "error") {
61
+ return (
62
+ <div className="flex min-h-screen flex-col items-center justify-center bg-surface px-8 text-center">
63
+ <p className="text-sm text-ink-secondary">
64
+ Sign-in may not have completed. You can close this tab.
65
+ </p>
66
+ </div>
67
+ );
68
+ }
69
+
70
+ return (
71
+ <div className="flex min-h-screen flex-col items-center justify-center bg-surface px-8 text-center">
72
+ <CircleCheck size={44} className="text-success" strokeWidth={1.6} />
73
+ <h1 className="mt-4 font-display text-xl font-semibold text-ink">Sign-in complete</h1>
74
+ <p className="mt-2 text-sm text-ink-secondary">
75
+ You can close this tab and return to OpenVuln.
76
+ </p>
77
+ </div>
78
+ );
79
+ }
src/features/auth/useAuth.ts ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect } from "react";
2
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
3
+ import { api, type MeResponse } from "../../shared/api/client";
4
+
5
+ /** 当前登录态。未配置后端的旧部署会 404 → 按未登录降级。 */
6
+ export function useMe() {
7
+ const qc = useQueryClient();
8
+ const q = useQuery({
9
+ queryKey: ["me"],
10
+ queryFn: api.me,
11
+ staleTime: 60_000,
12
+ retry: false,
13
+ });
14
+
15
+ // Listen for popup OAuth completion signal — popup sends user data directly
16
+ useEffect(() => {
17
+ const handler = (e: MessageEvent) => {
18
+ if (e.data?.type === "ov-oauth-complete" && e.data.user) {
19
+ // Popup fetched /api/me in top-level context (cookie works there)
20
+ qc.setQueryData(["me"], e.data.user as MeResponse);
21
+ qc.invalidateQueries({ queryKey: ["owner-findings"] });
22
+ } else if (e.data?.type === "ov-oauth-complete") {
23
+ // Fallback: no user data, try refetch
24
+ qc.invalidateQueries({ queryKey: ["me"] });
25
+ }
26
+ };
27
+ window.addEventListener("message", handler);
28
+ return () => window.removeEventListener("message", handler);
29
+ }, [qc]);
30
+
31
+ // When popup is open, poll /api/me every 1.5s for up to 2 min
32
+ useEffect(() => {
33
+ let interval: ReturnType<typeof setInterval> | null = null;
34
+ let timeout: ReturnType<typeof setTimeout> | null = null;
35
+ const startPolling = () => {
36
+ if (interval) return;
37
+ interval = setInterval(() => {
38
+ qc.invalidateQueries({ queryKey: ["me"] });
39
+ }, 1500);
40
+ timeout = setTimeout(() => {
41
+ if (interval) clearInterval(interval);
42
+ interval = null;
43
+ }, 120_000);
44
+ };
45
+ const onFocus = () => qc.invalidateQueries({ queryKey: ["me"] });
46
+ window.addEventListener("focus", onFocus);
47
+ window.addEventListener("ov-oauth-popup-opened", startPolling);
48
+ return () => {
49
+ window.removeEventListener("focus", onFocus);
50
+ window.removeEventListener("ov-oauth-popup-opened", startPolling);
51
+ if (interval) clearInterval(interval);
52
+ if (timeout) clearTimeout(timeout);
53
+ };
54
+ }, [qc]);
55
+
56
+ return q;
57
+ }
58
+
59
+ export function useLogout() {
60
+ const qc = useQueryClient();
61
+ return useMutation({
62
+ mutationFn: api.logout,
63
+ onSettled: () => {
64
+ const anon: MeResponse = { authenticated: false, user: null };
65
+ qc.setQueryData(["me"], anon);
66
+ // owner 视图数据全部作废
67
+ qc.invalidateQueries({ queryKey: ["owner-findings"] });
68
+ },
69
+ });
70
+ }
src/features/home/ProductHomePage.tsx ADDED
@@ -0,0 +1,459 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect, useMemo, useRef, useState } from "react";
2
+ import { Link } from "react-router-dom";
3
+ import { useInfiniteQuery, useQuery } from "@tanstack/react-query";
4
+ import {
5
+ Activity,
6
+ ArrowRight,
7
+ CheckCircle2,
8
+ ChevronDown,
9
+ ChevronUp,
10
+ Clock3,
11
+ Github,
12
+ Radar,
13
+ Search,
14
+ Shield,
15
+ } from "lucide-react";
16
+ import type { LiveScanItem } from "@/shared/types";
17
+ import { api } from "../../shared/api/client";
18
+ import { Button } from "../../components/Button";
19
+ import { EmptyState } from "../../components/EmptyState";
20
+ import { ProjectRow } from "../../components/ProjectRow";
21
+ import { RepoSubmitForm } from "../../components/RepoSubmitForm";
22
+ import { HeroStats } from "../../components/HeroStats";
23
+ import { ScanDurationNotice } from "../../components/ScanDurationNotice";
24
+ import { AuthButton } from "../../components/AuthButton";
25
+ import { NotificationBell } from "../../components/NotificationBell";
26
+
27
+ const OWN_REPO =
28
+ (import.meta.env.VITE_GITHUB_REPO_URL as string | undefined) ||
29
+ "https://github.com/Clouditera/OpenVuln";
30
+ const ZAI_HF_AVATAR = "https://huggingface.co/api/avatars/zai-org";
31
+
32
+ /** List state survives project-detail navigation. */
33
+ const listCache = { sort: "stars" as "newest" | "stars", q: "" };
34
+
35
+ function formatElapsed(seconds: number): string {
36
+ if (seconds < 60) return `${seconds}s`;
37
+ const minutes = Math.floor(seconds / 60);
38
+ if (minutes < 60) return `${minutes}m`;
39
+ return `${Math.floor(minutes / 60)}h ${minutes % 60}m`;
40
+ }
41
+
42
+ function BrandMark({ compact = false }: { compact?: boolean }) {
43
+ return (
44
+ <div
45
+ className={`relative flex shrink-0 items-center justify-center overflow-hidden rounded-xl border border-white/15 bg-white font-display font-bold text-black shadow-[0_8px_24px_rgba(0,0,0,0.24)] ${
46
+ compact ? "h-8 w-8" : "h-9 w-9"
47
+ }`}
48
+ aria-hidden
49
+ >
50
+ <span className={compact ? "text-sm" : "text-base"}>Z</span>
51
+ <img
52
+ src={ZAI_HF_AVATAR}
53
+ alt=""
54
+ className="absolute inset-0 h-full w-full object-cover"
55
+ onError={(event) => {
56
+ event.currentTarget.style.display = "none";
57
+ }}
58
+ />
59
+ </div>
60
+ );
61
+ }
62
+
63
+ function ScanRow({ scan }: { scan: LiveScanItem }) {
64
+ const dispatching = scan.state === "dispatching";
65
+
66
+ return (
67
+ <Link
68
+ to={`/p/${scan.full_name}`}
69
+ className="group flex min-h-[72px] items-center gap-3 rounded-2xl border border-white/[0.07] bg-black/20 p-3.5 transition hover:border-white/[0.14] hover:bg-white/[0.045] focus-ring-dark"
70
+ >
71
+ <div className="relative flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-white/[0.1] bg-white/[0.05] text-[#b8bac2]">
72
+ <Radar size={18} className="motion-safe:animate-pulse" />
73
+ <span className="absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full border-2 border-[#15161a] bg-success" />
74
+ </div>
75
+ <div className="min-w-0 flex-1">
76
+ <p className="truncate text-sm font-semibold text-white">
77
+ {scan.full_name}
78
+ </p>
79
+ <div className="mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[10px] text-ink-tertiary">
80
+ <span className="inline-flex items-center gap-1.5 text-[#b8bac2]">
81
+ <Activity size={10} />
82
+ {dispatching ? "Preparing scan" : "Scanning now"}
83
+ </span>
84
+ <span className="inline-flex items-center gap-1.5">
85
+ <Clock3 size={10} />
86
+ {formatElapsed(scan.elapsed_sec)}
87
+ </span>
88
+ </div>
89
+ </div>
90
+ <div className="shrink-0 text-right">
91
+ <p className="font-display text-lg font-semibold tabular-nums text-white">
92
+ {scan.findings_so_far}
93
+ </p>
94
+ <p className="font-mono text-[8px] uppercase tracking-[0.12em] text-ink-tertiary">
95
+ found
96
+ </p>
97
+ </div>
98
+ <ArrowRight
99
+ size={14}
100
+ className="shrink-0 text-ink-tertiary transition group-hover:translate-x-0.5 group-hover:text-white"
101
+ />
102
+ </Link>
103
+ );
104
+ }
105
+
106
+ function LiveScanPanel({
107
+ scans,
108
+ queued,
109
+ loading,
110
+ failed,
111
+ }: {
112
+ scans: LiveScanItem[];
113
+ queued: number;
114
+ loading: boolean;
115
+ failed: boolean;
116
+ }) {
117
+ const active = scans.length;
118
+
119
+ return (
120
+ <section
121
+ id="live-scans"
122
+ aria-labelledby="live-scan-title"
123
+ className="openvuln-panel relative min-w-0 overflow-hidden p-5 sm:p-6"
124
+ >
125
+ <div className="pointer-events-none absolute inset-x-8 top-0 h-px bg-gradient-to-r from-transparent via-white/35 to-transparent" />
126
+ <div className="flex items-start justify-between gap-4">
127
+ <div>
128
+ <div className="flex items-center gap-2 font-mono text-[9px] font-semibold uppercase tracking-[0.18em] text-[#a8aab1]">
129
+ <span className="relative flex h-2 w-2">
130
+ {active > 0 && (
131
+ <span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-success opacity-50 motion-reduce:hidden" />
132
+ )}
133
+ <span
134
+ className={`relative inline-flex h-2 w-2 rounded-full ${active > 0 ? "bg-success" : "bg-ink-tertiary"}`}
135
+ />
136
+ </span>
137
+ Live scanner
138
+ </div>
139
+ <h2 id="live-scan-title" className="mt-2 font-display text-lg font-semibold tracking-tight text-white">
140
+ Scanning now
141
+ </h2>
142
+ </div>
143
+ {!loading && !failed && (
144
+ <div className="rounded-full border border-white/[0.08] bg-black/25 px-3 py-1.5 font-mono text-[9px] text-ink-secondary">
145
+ {active} active · {queued} queued
146
+ </div>
147
+ )}
148
+ </div>
149
+
150
+ <div className="mt-4 min-h-[130px] max-h-[228px] overflow-y-auto pr-0.5">
151
+ {loading ? (
152
+ <div className="space-y-2.5" aria-label="Loading live scans">
153
+ {[0, 1].map((item) => (
154
+ <div key={item} className="h-[72px] animate-pulse rounded-2xl bg-white/[0.04]" />
155
+ ))}
156
+ </div>
157
+ ) : failed ? (
158
+ <div className="flex min-h-[130px] items-center justify-center rounded-2xl border border-dashed border-white/[0.08] bg-black/15 px-5 text-center">
159
+ <div>
160
+ <Activity size={20} className="mx-auto text-ink-tertiary" />
161
+ <p className="mt-2 text-sm font-medium text-ink-secondary">Live data is unavailable</p>
162
+ <p className="mt-1 text-xs text-ink-tertiary">Scanner status will reconnect automatically.</p>
163
+ </div>
164
+ </div>
165
+ ) : scans.length > 0 ? (
166
+ <div className="space-y-2.5">
167
+ {scans.map((scan) => (
168
+ <ScanRow key={scan.project_id} scan={scan} />
169
+ ))}
170
+ </div>
171
+ ) : (
172
+ <div className="flex min-h-[130px] items-center justify-center rounded-2xl border border-dashed border-white/[0.08] bg-black/15 px-5 text-center">
173
+ <div>
174
+ <CheckCircle2 size={21} className="mx-auto text-success-ink" />
175
+ <p className="mt-2 text-sm font-medium text-white">Scanner is ready</p>
176
+ <p className="mt-1 text-xs leading-5 text-ink-tertiary">
177
+ No repository is being scanned right now{queued > 0 ? ` · ${queued} waiting` : ""}.
178
+ </p>
179
+ </div>
180
+ </div>
181
+ )}
182
+ </div>
183
+
184
+ <div className="mt-4 h-0.5 overflow-hidden rounded-full bg-white/[0.045]" aria-hidden>
185
+ <div
186
+ className={`h-full rounded-full bg-white/60 ${
187
+ active > 0 ? "live-scan-sweep w-1/3" : "w-0"
188
+ }`}
189
+ />
190
+ </div>
191
+ </section>
192
+ );
193
+ }
194
+
195
+ export function ProductHomePage() {
196
+ const [q, setQState] = useState(listCache.q);
197
+ const [sort, setSortState] = useState<"newest" | "stars">(listCache.sort);
198
+ const [repositoriesOpen, setRepositoriesOpen] = useState(false);
199
+ const setQ = (value: string) => {
200
+ listCache.q = value;
201
+ setQState(value);
202
+ };
203
+ const setSort = (value: "newest" | "stars") => {
204
+ listCache.sort = value;
205
+ setSortState(value);
206
+ };
207
+
208
+ const overview = useQuery({
209
+ queryKey: ["public", "overview"],
210
+ queryFn: api.overview,
211
+ refetchInterval: 15_000,
212
+ });
213
+
214
+ const pageSize = 20;
215
+ const projects = useInfiniteQuery({
216
+ queryKey: ["public", "projects", sort],
217
+ queryFn: ({ pageParam }) => api.listProjects({ sort, page: pageParam, page_size: pageSize }),
218
+ initialPageParam: 1,
219
+ getNextPageParam: (last, _pages, lastParam) =>
220
+ lastParam * pageSize < (last.total ?? 0) ? lastParam + 1 : undefined,
221
+ });
222
+ const allItems = useMemo(() => projects.data?.pages.flatMap((page) => page.items) ?? [], [projects.data]);
223
+ const sentinelRef = useRef<HTMLDivElement>(null);
224
+ const repositoryScrollRef = useRef<HTMLDivElement>(null);
225
+
226
+ useEffect(() => {
227
+ const sentinel = sentinelRef.current;
228
+ const scrollContainer = repositoryScrollRef.current;
229
+ if (!repositoriesOpen || !sentinel || !scrollContainer) return;
230
+ const observer = new IntersectionObserver(
231
+ (entries) => {
232
+ if (entries.some((entry) => entry.isIntersecting) && projects.hasNextPage && !projects.isFetchingNextPage) {
233
+ void projects.fetchNextPage();
234
+ }
235
+ },
236
+ { root: scrollContainer, rootMargin: "240px" },
237
+ );
238
+ observer.observe(sentinel);
239
+ return () => observer.disconnect();
240
+ }, [repositoriesOpen, projects.hasNextPage, projects.isFetchingNextPage, projects.fetchNextPage]);
241
+
242
+ const filtered = useMemo(() => {
243
+ const needle = q.trim().toLowerCase();
244
+ if (!needle) return allItems;
245
+ return allItems.filter(
246
+ (project) =>
247
+ project.full_name.toLowerCase().includes(needle) ||
248
+ (project.description ?? "").toLowerCase().includes(needle),
249
+ );
250
+ }, [allItems, q]);
251
+
252
+ const scans = overview.data?.live?.scanning ?? [];
253
+ const queued = overview.data?.live?.queued_count ?? 0;
254
+
255
+ return (
256
+ <div id="top" className="openvuln-home relative isolate min-h-screen overflow-hidden bg-[#08090b] text-white">
257
+ <div className="openvuln-glow pointer-events-none fixed inset-0 -z-10" />
258
+
259
+ <div className="min-h-screen">
260
+ <header className="sticky top-0 z-30 border-b border-white/[0.06] bg-[#08090b]/80 backdrop-blur-xl">
261
+ <div className="mx-auto flex h-[68px] w-full max-w-[1280px] items-center justify-between px-4 sm:px-7 lg:px-9 xl:px-12">
262
+ <div className="flex items-center gap-3">
263
+ <Link to="/" className="flex items-center gap-2.5 rounded-lg focus-ring-dark">
264
+ <BrandMark compact />
265
+ <span className="font-display text-sm font-semibold text-white">OpenVuln</span>
266
+ </Link>
267
+ </div>
268
+ <div className="flex items-center gap-2">
269
+ <NotificationBell appearance="dark" />
270
+ <AuthButton appearance="dark" />
271
+ <a
272
+ href={OWN_REPO}
273
+ target="_blank"
274
+ rel="noreferrer"
275
+ aria-label="OpenVuln on GitHub"
276
+ className="hidden h-9 items-center gap-2 rounded-full border border-[#2a2b30] bg-[#101114] px-3.5 text-xs font-medium text-[#9c9da4] transition hover:border-[#41434b] hover:bg-[#17181d] hover:text-white focus-ring-dark sm:inline-flex"
277
+ >
278
+ <Github size={14} />
279
+ GitHub
280
+ </a>
281
+ </div>
282
+ </div>
283
+ </header>
284
+
285
+ <main className="mx-auto w-full max-w-[1280px] px-4 pb-16 pt-8 sm:px-7 sm:pt-11 lg:px-9 lg:pb-20 lg:pt-14 xl:px-12">
286
+ <section id="submit" className="mx-auto flex max-w-[920px] scroll-mt-24 flex-col items-center text-center">
287
+ <div className="openvuln-brand flex flex-col items-center">
288
+ <div className="mb-4 flex items-center gap-2 font-mono text-[9px] font-semibold uppercase tracking-[0.2em] text-[#96989f]">
289
+ <span className="h-1.5 w-1.5 rounded-full bg-white/60" />
290
+ Open-source security scanner
291
+ </div>
292
+ <div className="flex items-center justify-center gap-4 sm:gap-5">
293
+ <div className="relative flex h-14 w-14 shrink-0 items-center justify-center overflow-hidden rounded-2xl border border-white/20 bg-white font-display text-2xl font-bold text-black shadow-[0_14px_44px_rgba(0,0,0,0.4)] sm:h-16 sm:w-16">
294
+ <span aria-hidden>Z</span>
295
+ <img
296
+ src={ZAI_HF_AVATAR}
297
+ alt="Z.ai"
298
+ className="absolute inset-0 h-full w-full object-cover"
299
+ onError={(event) => {
300
+ event.currentTarget.style.display = "none";
301
+ }}
302
+ />
303
+ </div>
304
+ <h1 className="openvuln-title font-display text-[40px] font-[450] leading-none tracking-normal sm:text-[56px]">
305
+ OpenVuln
306
+ </h1>
307
+ </div>
308
+ <p className="mt-4 max-w-2xl text-sm leading-6 text-ink-secondary sm:text-[15px]">
309
+ GLM-powered vulnerability discovery for the open-source world.
310
+ </p>
311
+ </div>
312
+
313
+ <RepoSubmitForm size="hero" appearance="dark" className="mt-7 w-full max-w-[820px]" />
314
+ <div className="mt-1 w-full max-w-[820px] text-center">
315
+ <p className="text-xs leading-5 text-[#777981]" role="note">
316
+ Submitted repositories may require manual review before they are approved for scanning.
317
+ </p>
318
+ <ScanDurationNotice className="mt-1.5 w-full" />
319
+ </div>
320
+ </section>
321
+
322
+ <div className="mt-9 grid items-stretch gap-4 xl:grid-cols-[0.88fr_1.12fr]">
323
+ <HeroStats stats={overview.data} loading={overview.isLoading} failed={overview.isError} />
324
+ <LiveScanPanel
325
+ scans={scans}
326
+ queued={queued}
327
+ loading={overview.isLoading}
328
+ failed={overview.isError}
329
+ />
330
+ </div>
331
+
332
+ <section
333
+ id="repositories"
334
+ aria-labelledby="projects-title"
335
+ className="mt-8 scroll-mt-24 rounded-[26px] border border-white/[0.08] bg-[#101115]/80 p-4 shadow-[0_24px_80px_rgba(0,0,0,0.22)] sm:p-6"
336
+ >
337
+ <div className="flex items-start justify-between gap-4">
338
+ <div>
339
+ <p className="font-mono text-[9px] font-semibold uppercase tracking-[0.18em] text-[#96989f]">
340
+ Repository index
341
+ </p>
342
+ <h2 id="projects-title" className="mt-2 font-display text-xl font-semibold tracking-tight text-white sm:text-2xl">
343
+ Scanned repositories
344
+ </h2>
345
+ <p className="mt-1.5 text-xs text-ink-tertiary">Browse public scan status and disclosed results.</p>
346
+ </div>
347
+ <button
348
+ type="button"
349
+ onClick={() => setRepositoriesOpen((open) => !open)}
350
+ aria-expanded={repositoriesOpen}
351
+ aria-controls="repository-list-content"
352
+ className="inline-flex h-9 shrink-0 items-center gap-2 rounded-xl border border-white/[0.09] bg-black/20 px-3 text-[11px] font-medium text-[#b9bac0] transition hover:border-white/[0.16] hover:bg-white/[0.05] hover:text-white focus-ring-dark"
353
+ >
354
+ {repositoriesOpen ? (
355
+ <>
356
+ Collapse
357
+ <ChevronUp size={14} />
358
+ </>
359
+ ) : (
360
+ <>
361
+ Expand
362
+ <ChevronDown size={14} />
363
+ </>
364
+ )}
365
+ </button>
366
+ </div>
367
+
368
+ {repositoriesOpen && (
369
+ <div id="repository-list-content">
370
+ <div className="mt-5 flex flex-col gap-2.5 sm:flex-row sm:items-end sm:justify-end">
371
+ <div className="relative">
372
+ <Search size={14} className="pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-ink-tertiary" />
373
+ <input
374
+ type="search"
375
+ value={q}
376
+ onChange={(event) => setQ(event.target.value)}
377
+ placeholder="Search repositories"
378
+ aria-label="Search repositories"
379
+ className="h-10 w-full rounded-xl border border-white/[0.09] bg-black/20 pl-10 pr-3 text-sm text-white placeholder:text-ink-tertiary focus-ring-dark sm:w-72"
380
+ />
381
+ </div>
382
+ <div
383
+ className="inline-flex self-start rounded-lg border border-white/[0.08] bg-black/20 p-1 sm:self-auto"
384
+ aria-label="Sort repositories"
385
+ >
386
+ <button
387
+ type="button"
388
+ aria-pressed={sort === "stars"}
389
+ onClick={() => setSort("stars")}
390
+ className={`rounded-md px-3 py-1.5 text-[11px] font-medium transition focus-ring-dark ${
391
+ sort === "stars" ? "bg-white text-black" : "text-ink-tertiary hover:text-white"
392
+ }`}
393
+ >
394
+ Most starred
395
+ </button>
396
+ <button
397
+ type="button"
398
+ aria-pressed={sort === "newest"}
399
+ onClick={() => setSort("newest")}
400
+ className={`rounded-md px-3 py-1.5 text-[11px] font-medium transition focus-ring-dark ${
401
+ sort === "newest" ? "bg-white text-black" : "text-ink-tertiary hover:text-white"
402
+ }`}
403
+ >
404
+ Recently added
405
+ </button>
406
+ </div>
407
+ </div>
408
+
409
+ <div
410
+ ref={repositoryScrollRef}
411
+ className="openvuln-scrollbar mt-5 max-h-[520px] overflow-y-auto overscroll-contain border-y border-white/[0.07] pr-2"
412
+ tabIndex={0}
413
+ aria-label="Scanned repository list"
414
+ >
415
+ {projects.isLoading ? (
416
+ <div className="space-y-3 py-6">
417
+ {Array.from({ length: 5 }).map((_, index) => (
418
+ <div key={index} className="h-24 animate-pulse rounded-xl bg-white/[0.035]" />
419
+ ))}
420
+ </div>
421
+ ) : projects.isError ? (
422
+ <EmptyState icon={Shield} title="Could not load repositories" description="The OpenVuln API may be unavailable." />
423
+ ) : filtered.length === 0 ? (
424
+ <EmptyState
425
+ icon={Shield}
426
+ title={q ? "No matching repositories" : "No repositories yet"}
427
+ description={
428
+ q
429
+ ? "Try a different repository name."
430
+ : "Submit the first open-source repository to be scanned by VulnHunter."
431
+ }
432
+ action={!q ? <Link to="/submit"><Button>Submit a repository</Button></Link> : undefined}
433
+ />
434
+ ) : (
435
+ <>
436
+ {filtered.map((project) => (
437
+ <ProjectRow key={project.id} project={project} compact />
438
+ ))}
439
+ <div ref={sentinelRef} className="h-px" />
440
+ {projects.isFetchingNextPage && (
441
+ <div className="py-5 text-center font-mono text-xs text-ink-tertiary">Loading more…</div>
442
+ )}
443
+ </>
444
+ )}
445
+ </div>
446
+
447
+ <div className="mt-4 flex items-center justify-between gap-3 font-mono text-[10px] text-ink-tertiary">
448
+ <span>{(projects.data?.pages[0]?.total ?? 0).toLocaleString()} repositories indexed</span>
449
+ <a href="#top" className="hover:text-white">Back to top ↑</a>
450
+ </div>
451
+ </div>
452
+ )}
453
+ </section>
454
+
455
+ </main>
456
+ </div>
457
+ </div>
458
+ );
459
+ }
src/features/my/MyProjectsPage.tsx ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Link, useNavigate } from "react-router-dom";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { ArrowLeft, FolderGit2 } from "lucide-react";
4
+ import { api } from "../../shared/api/client";
5
+ import { useMe } from "../auth/useAuth";
6
+ import { ProjectRow } from "../../components/ProjectRow";
7
+ import { EmptyState } from "../../components/EmptyState";
8
+
9
+ /** 我的提交(fish No.929):登录用户看自己提交过的项目。 */
10
+ export function MyProjectsPage() {
11
+ const meQ = useMe();
12
+ const nav = useNavigate();
13
+ const authed = meQ.data?.authenticated === true;
14
+
15
+ const listQ = useQuery({
16
+ queryKey: ["my", "projects"],
17
+ queryFn: api.myProjects,
18
+ enabled: authed,
19
+ retry: false,
20
+ });
21
+
22
+ if (meQ.isSuccess && !authed) {
23
+ // 未登录:回首页登录
24
+ nav("/", { replace: true });
25
+ return null;
26
+ }
27
+
28
+ const projects = listQ.data?.projects ?? [];
29
+
30
+ return (
31
+ <div className="mx-auto max-w-6xl px-6 py-8">
32
+ <Link
33
+ to="/"
34
+ className="inline-flex items-center gap-1.5 text-[13px] text-ink-secondary hover:text-ink"
35
+ >
36
+ <ArrowLeft size={14} /> Projects
37
+ </Link>
38
+ <h1 className="mt-4 font-display text-xl font-bold text-ink">My submissions</h1>
39
+ <p className="mt-2 text-sm text-ink-secondary">
40
+ Projects you submitted for scanning. Sign in with the same GitHub account to see scan
41
+ results and manage disclosures.
42
+ </p>
43
+
44
+ <div className="mt-6 border-t border-line">
45
+ {listQ.isPending ? (
46
+ <div className="space-y-3 py-6">
47
+ {Array.from({ length: 3 }).map((_, i) => (
48
+ <div key={i} className="h-20 animate-pulse rounded-xl bg-surface-raised" />
49
+ ))}
50
+ </div>
51
+ ) : projects.length === 0 ? (
52
+ <EmptyState
53
+ icon={FolderGit2}
54
+ title="No submissions yet"
55
+ description="Submit a public GitHub repository you maintain — it shows up here."
56
+ action={
57
+ <Link
58
+ to="/submit"
59
+ className="inline-flex h-9 items-center rounded-md bg-[#ebecf0] px-3.5 text-sm font-medium text-[#0d0d0f] hover:bg-white"
60
+ >
61
+ Submit a project
62
+ </Link>
63
+ }
64
+ />
65
+ ) : (
66
+ projects.map((p) => <ProjectRow key={p.id} project={p} />)
67
+ )}
68
+ </div>
69
+ </div>
70
+ );
71
+ }
src/features/project/OwnerFindings.tsx ADDED
@@ -0,0 +1,336 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useMemo, useState } from "react";
2
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
3
+ import {
4
+ CheckCircle2,
5
+ ChevronDown,
6
+ Download,
7
+ FileCode2,
8
+ LoaderCircle,
9
+ Lock,
10
+ ShieldCheck,
11
+ } from "lucide-react";
12
+ import {
13
+ api,
14
+ apiUrl,
15
+ type OwnerFindingSummary,
16
+ } from "../../shared/api/client";
17
+ import { Button } from "../../components/Button";
18
+ import { ConfirmDialog } from "../../components/ConfirmDialog";
19
+ import { ReportBody, type StructuredReport } from "../../components/ReportBody";
20
+ import { SeverityChip } from "../../components/SeverityChip";
21
+ import type { ViewJob } from "./VersionBar";
22
+
23
+ /**
24
+ * Owner 专属「Manage findings」:全部 findings(含未披露)+ 勾选披露 + 全量报告下载。
25
+ * 仅在后端鉴权通过(父组件 owner 查询成功)时渲染。
26
+ */
27
+ export function OwnerFindings({
28
+ projectId,
29
+ currentFindings,
30
+ viewJob,
31
+ onViewJob,
32
+ }: {
33
+ projectId: string;
34
+ /** 父级 access probe 已拉的当前版本 findings(兼作 current 的 initialData)。 */
35
+ currentFindings: OwnerFindingSummary[];
36
+ /** 版本查看状态(页面级,头部 VersionBar 控制)。 */
37
+ viewJob: ViewJob | null;
38
+ onViewJob: (v: ViewJob | null) => void;
39
+ }) {
40
+ const qc = useQueryClient();
41
+ const setViewJob = onViewJob;
42
+ const [selected, setSelected] = useState<ReadonlySet<string>>(new Set());
43
+ const [openKey, setOpenKey] = useState<string | null>(null);
44
+ const [confirmOpen, setConfirmOpen] = useState(false);
45
+ const [flash, setFlash] = useState<string | null>(null);
46
+
47
+ // 版本化查询:viewJob=null → 当前版本
48
+ const findingsQ = useQuery({
49
+ queryKey: ["owner-findings", projectId, viewJob?.id ?? "current"],
50
+ queryFn: () => api.ownerFindings(projectId, viewJob?.id),
51
+ initialData: viewJob === null ? { project_id: projectId, findings: currentFindings } : undefined,
52
+ retry: false,
53
+ });
54
+ const findings = findingsQ.data?.findings ?? currentFindings;
55
+ const viewingHistorical = viewJob !== null;
56
+
57
+ const disclosable = useMemo(
58
+ () => findings.filter((f) => f.disclosure_state !== "disclosed"),
59
+ [findings],
60
+ );
61
+ const allChecked = disclosable.length > 0 && disclosable.every((f) => selected.has(f.id));
62
+
63
+ const toggle = (id: string) => {
64
+ setSelected((prev) => {
65
+ const next = new Set(prev);
66
+ if (next.has(id)) next.delete(id);
67
+ else next.add(id);
68
+ return next;
69
+ });
70
+ };
71
+ const toggleAll = () => {
72
+ setSelected(allChecked ? new Set() : new Set(disclosable.map((f) => f.id)));
73
+ };
74
+
75
+ const discloseM = useMutation({
76
+ mutationFn: (ids: string[]) => api.ownerDisclose(projectId, ids),
77
+ onSuccess: (res) => {
78
+ setConfirmOpen(false);
79
+ setSelected(new Set());
80
+ setFlash(
81
+ `${res.disclosed_count} finding${res.disclosed_count === 1 ? "" : "s"} disclosed — now publicly visible with full report content.`,
82
+ );
83
+ void qc.invalidateQueries({ queryKey: ["owner-findings", projectId] });
84
+ void qc.invalidateQueries({ queryKey: ["public", "project"] });
85
+ void qc.invalidateQueries({ queryKey: ["public", "overview"] });
86
+ },
87
+ });
88
+
89
+ return (
90
+ <div className="space-y-4">
91
+ {/* 工具行 */}
92
+ <div className="flex flex-wrap items-center justify-between gap-3">
93
+ <h2 className="font-display text-base font-semibold text-ink">
94
+ All findings ({findings.length})
95
+ </h2>
96
+ <a
97
+ href={apiUrl(`/api/projects/${projectId}/report-full?format=md${viewJob ? `&scan_job_id=${viewJob.id}` : ""}`)}
98
+ className="inline-flex h-9 items-center gap-1.5 rounded-md border border-line bg-surface-raised px-3.5 text-sm font-medium text-ink transition-colors hover:bg-surface-sunken focus-ring"
99
+ title="Download the complete report for all findings (markdown)"
100
+ >
101
+ <Download size={14} /> Full report (.md)
102
+ </a>
103
+ </div>
104
+
105
+ {viewingHistorical && (
106
+ <div className="flex items-center justify-between gap-3 rounded-lg border border-accent-200 bg-accent-50 px-4 py-2.5 text-[13px] text-accent-600">
107
+ <span>
108
+ Viewing version <span className="font-mono font-medium">{viewJob.label}</span> — disclosure is
109
+ only available on the current version.
110
+ </span>
111
+ <button
112
+ type="button"
113
+ onClick={() => {
114
+ setViewJob(null);
115
+ setSelected(new Set());
116
+ setOpenKey(null);
117
+ }}
118
+ className="shrink-0 font-medium underline underline-offset-2 hover:text-accent-700"
119
+ >
120
+ Back to current
121
+ </button>
122
+ </div>
123
+ )}
124
+
125
+ {/* 披露操作条(历史版本只读,披露仅当前版本) */}
126
+ {!viewingHistorical && disclosable.length > 0 && (
127
+ <div className="flex flex-wrap items-center gap-3 rounded-lg border border-line bg-surface-sunken/50 px-4 py-2.5">
128
+ <label className="flex cursor-pointer items-center gap-2 text-[13px] text-ink-secondary">
129
+ <input
130
+ type="checkbox"
131
+ checked={allChecked}
132
+ onChange={toggleAll}
133
+ className="h-4 w-4 rounded border-line accent-[#28D1FF]"
134
+ />
135
+ Select undisclosed ({disclosable.length})
136
+ </label>
137
+ <span className="text-[13px] text-ink-tertiary" aria-live="polite">
138
+ {selected.size > 0 ? `${selected.size} selected` : ""}
139
+ </span>
140
+ <div className="ml-auto flex items-center gap-3">
141
+ <Button
142
+ size="md"
143
+ disabled={selected.size === 0}
144
+ onClick={() => setConfirmOpen(true)}
145
+ >
146
+ <ShieldCheck size={15} />
147
+ Disclose{selected.size > 0 ? ` (${selected.size})` : ""}
148
+ </Button>
149
+ </div>
150
+ </div>
151
+ )}
152
+
153
+ {flash && (
154
+ <p
155
+ className="flex items-start gap-1.5 rounded-lg border border-success/30 bg-success-bg px-4 py-2.5 text-[13px] text-success-ink"
156
+ role="status"
157
+ >
158
+ <CheckCircle2 size={15} className="mt-0.5 shrink-0" />
159
+ {flash}
160
+ </p>
161
+ )}
162
+
163
+ {discloseM.isError && (
164
+ <p className="rounded-lg border border-danger/30 bg-danger/5 px-4 py-2.5 text-[13px] text-danger" role="alert">
165
+ Disclosure failed. Please try again — if it persists, contact an operator.
166
+ </p>
167
+ )}
168
+
169
+ {/* findings 卡片 */}
170
+ {findings.length === 0 ? (
171
+ <div className="rounded-xl border border-dashed border-line px-6 py-10 text-center text-sm text-ink-secondary">
172
+ No findings on the current scan.
173
+ </div>
174
+ ) : (
175
+ <div className="space-y-3">
176
+ {findings.map((f) => {
177
+ const disclosed = f.disclosure_state === "disclosed";
178
+ const open = openKey === f.finding_key;
179
+ return (
180
+ <article
181
+ key={f.id}
182
+ className="overflow-hidden rounded-xl border border-line bg-surface"
183
+ >
184
+ <div
185
+ role="button"
186
+ tabIndex={0}
187
+ onClick={() => setOpenKey(open ? null : f.finding_key)}
188
+ onKeyDown={(e) => {
189
+ if (e.key === "Enter" || e.key === " ") {
190
+ e.preventDefault();
191
+ setOpenKey(open ? null : f.finding_key);
192
+ }
193
+ }}
194
+ aria-expanded={open}
195
+ className="flex w-full cursor-pointer items-start gap-3 px-5 py-3 text-left transition-colors hover:bg-surface-sunken/50 focus-ring"
196
+ >
197
+ <input
198
+ type="checkbox"
199
+ checked={selected.has(f.id)}
200
+ disabled={disclosed || viewingHistorical}
201
+ onClick={(e) => e.stopPropagation()}
202
+ onChange={() => toggle(f.id)}
203
+ aria-label={disclosed ? `${f.finding_key} already disclosed` : `Select ${f.finding_key}`}
204
+ className="mt-1 h-4 w-4 shrink-0 rounded border-line accent-[#28D1FF] disabled:opacity-40"
205
+ />
206
+ <div className="min-w-0 flex-1">
207
+ <div className="flex flex-wrap items-center gap-x-2 gap-y-1">
208
+ <SeverityChip severity={f.severity} />
209
+ {f.cwe && (
210
+ <span className="rounded bg-surface-sunken px-1.5 py-0.5 font-mono text-[11px] text-ink-secondary">
211
+ {f.cwe}
212
+ </span>
213
+ )}
214
+ {f.cvss_score != null && (
215
+ <span className="font-mono text-[11px] text-ink-tertiary">
216
+ CVSS {f.cvss_score.toFixed(1)}
217
+ </span>
218
+ )}
219
+ </div>
220
+ <h3
221
+ className="mt-1 line-clamp-2 font-display text-[15px] font-semibold leading-snug text-ink"
222
+ title={f.title}
223
+ >
224
+ {f.title}
225
+ </h3>
226
+ <p className="mt-0.5 truncate font-mono text-[11px] text-ink-tertiary">
227
+ {f.finding_key}
228
+ </p>
229
+ </div>
230
+ <span className="flex shrink-0 items-center gap-2 self-center">
231
+ {disclosed ? (
232
+ <span className="inline-flex items-center gap-1 text-[12px] font-medium text-success-ink">
233
+ <CheckCircle2 size={13} /> Disclosed
234
+ </span>
235
+ ) : (
236
+ <span className="inline-flex items-center gap-1 text-[12px] text-ink-tertiary">
237
+ <Lock size={12} /> Owner only
238
+ </span>
239
+ )}
240
+ <ChevronDown
241
+ size={16}
242
+ className={`text-ink-tertiary transition-transform ${open ? "rotate-180" : ""}`}
243
+ />
244
+ </span>
245
+ </div>
246
+
247
+ {open && <OwnerFindingDetailBody projectId={projectId} findingKey={f.finding_key} />}
248
+ </article>
249
+ );
250
+ })}
251
+ </div>
252
+ )}
253
+
254
+ <ConfirmDialog
255
+ open={confirmOpen}
256
+ title={`Disclose ${selected.size} finding${selected.size === 1 ? "" : "s"}?`}
257
+ body="The full report content of the selected findings — description, file paths, code and analysis — becomes publicly visible on OpenVuln. This cannot be undone from the site; an operator can reverse an accidental disclosure."
258
+ confirmLabel="Disclose permanently"
259
+ busy={discloseM.isPending}
260
+ onConfirm={() => discloseM.mutate([...selected])}
261
+ onCancel={() => setConfirmOpen(false)}
262
+ />
263
+ </div>
264
+ );
265
+ }
266
+
267
+ /** 展开后按需取单条全文(report + artifacts)。 */
268
+ function OwnerFindingDetailBody({
269
+ projectId,
270
+ findingKey,
271
+ }: {
272
+ projectId: string;
273
+ findingKey: string;
274
+ }) {
275
+ const detailQ = useQuery({
276
+ queryKey: ["owner-finding", projectId, findingKey],
277
+ queryFn: () => api.ownerFinding(projectId, findingKey),
278
+ staleTime: 60_000,
279
+ retry: false,
280
+ });
281
+
282
+ if (detailQ.isPending) {
283
+ return (
284
+ <div className="flex items-center gap-2 border-t border-line px-5 py-6 text-[13px] text-ink-secondary">
285
+ <LoaderCircle size={15} className="animate-spin" /> Loading full report…
286
+ </div>
287
+ );
288
+ }
289
+ if (detailQ.isError || !detailQ.data) {
290
+ return (
291
+ <div className="border-t border-line px-5 py-6 text-[13px] text-danger" role="alert">
292
+ Failed to load the full report.
293
+ </div>
294
+ );
295
+ }
296
+
297
+ const f = detailQ.data.finding;
298
+ const arts = (f.artifacts ?? []).filter((a) => a.has_content || a.size_bytes > 0);
299
+
300
+ return (
301
+ <div className="border-t border-line px-5 py-4">
302
+ <ReportBody report={(f.report as StructuredReport | null) ?? undefined} yaml={f.report_yaml ?? undefined} />
303
+ {arts.length > 0 && (
304
+ <div className="mt-5 border-t border-line pt-4">
305
+ <h4 className="text-[11px] font-semibold uppercase tracking-wide text-ink-tertiary">
306
+ Artifacts ({arts.length})
307
+ </h4>
308
+ <ul className="mt-2 space-y-1">
309
+ {arts.slice(0, 20).map((a) => (
310
+ <li
311
+ key={a.rel_path}
312
+ className="flex items-center gap-2 font-mono text-[12px] text-ink-secondary"
313
+ title={a.rel_path}
314
+ >
315
+ <FileCode2 size={13} className="shrink-0 text-ink-tertiary" />
316
+ <span className="truncate">{a.file_name}</span>
317
+ <span className="shrink-0 text-ink-tertiary">
318
+ {a.kind} · {formatSize(a.size_bytes)}
319
+ </span>
320
+ </li>
321
+ ))}
322
+ {arts.length > 20 && (
323
+ <li className="text-[12px] text-ink-tertiary">…and {arts.length - 20} more</li>
324
+ )}
325
+ </ul>
326
+ </div>
327
+ )}
328
+ </div>
329
+ );
330
+ }
331
+
332
+ function formatSize(n: number): string {
333
+ if (n < 1024) return `${n} B`;
334
+ if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)} KB`;
335
+ return `${(n / 1024 / 1024).toFixed(1)} MB`;
336
+ }
src/features/project/ProjectPage.tsx ADDED
@@ -0,0 +1,632 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useQuery } from "@tanstack/react-query";
2
+ import {
3
+ ArrowLeft,
4
+ ArrowUpRight,
5
+ Check,
6
+ ChevronDown,
7
+ Download,
8
+ ExternalLink,
9
+ Github,
10
+ LoaderCircle,
11
+ Shield,
12
+ } from "lucide-react";
13
+ import { useEffect, useMemo, useState } from "react";
14
+ import { Link, useLocation, useParams, useSearchParams } from "react-router-dom";
15
+ import { EmptyState } from "../../components/EmptyState";
16
+ import { ReportBody } from "../../components/ReportBody";
17
+ import { ScanDurationNotice } from "../../components/ScanDurationNotice";
18
+ import { SeverityBar } from "../../components/SeverityBar";
19
+ import { SeverityChip } from "../../components/SeverityChip";
20
+ import { ScanningSpinner, StatusBadge } from "../../components/StatusBadge";
21
+ import { api, apiUrl } from "../../shared/api/client";
22
+ import { useMe } from "../auth/useAuth";
23
+ import { OwnerFindings } from "./OwnerFindings";
24
+ import { VersionBar, type ViewJob } from "./VersionBar";
25
+ import { formatDate, formatStars, shortSha, totalFindings } from "../../shared/lib/format";
26
+
27
+ export function ProjectPage() {
28
+ const [openKey, setOpenKey] = useState<string | null>(null);
29
+ const { owner = "", repo = "" } = useParams();
30
+ const [params, setParams] = useSearchParams();
31
+ const tabParam = params.get("tab");
32
+ const location = useLocation();
33
+ const justSubmitted = Boolean(
34
+ (location.state as { justSubmitted?: boolean } | null)?.justSubmitted,
35
+ );
36
+
37
+ const projectQ = useQuery({
38
+ queryKey: ["public", "project", owner, repo],
39
+ queryFn: () => api.getProject(owner, repo),
40
+ enabled: Boolean(owner && repo),
41
+ refetchInterval: (q) => {
42
+ const s = q.state.data?.latest_scan?.state;
43
+ if (s === "queued" || s === "dispatching" || s === "scanning") return 5000;
44
+ return false;
45
+ },
46
+ });
47
+
48
+ const project = projectQ.data;
49
+ const meQ = useMe();
50
+ // owner 探测:登录后尝试拉取全量 findings;200=有权限(显示 Manage findings tab),401/403=公众视图
51
+ const ownerQ = useQuery({
52
+ queryKey: ["owner-findings", project?.id],
53
+ queryFn: () => api.ownerFindings(project!.id),
54
+ enabled: Boolean(project?.id) && meQ.data?.authenticated === true,
55
+ retry: false,
56
+ staleTime: 30_000,
57
+ });
58
+ const isOwner = ownerQ.isSuccess;
59
+ // 版本查看状态(fish No.1253:切换操作上移到头部)
60
+ const [viewJob, setViewJob] = useState<ViewJob | null>(null);
61
+ // Details 与 Manage findings 合并为 Findings(fish No.1252);tab=details 兼容旧链接
62
+ const tab = tabParam === "findings" || tabParam === "details" ? "findings" : "overview";
63
+ const cweMax = useMemo(() => {
64
+ const list = project?.cwe_distribution ?? [];
65
+ return Math.max(1, ...list.map((c) => c.count));
66
+ }, [project]);
67
+
68
+ if (projectQ.isLoading) {
69
+ return <ScanProgressPage owner={owner} repo={repo} state="loading" />;
70
+ }
71
+
72
+ if (projectQ.isError || !project) {
73
+ return (
74
+ <div className="mx-auto max-w-6xl px-6 py-16">
75
+ <EmptyState
76
+ icon={Shield}
77
+ title="Project not found"
78
+ description="This project is not on OpenVuln yet."
79
+ action={
80
+ <Link to="/#projects" className="text-sm text-accent-600 hover:underline">
81
+ Back to projects
82
+ </Link>
83
+ }
84
+ />
85
+ </div>
86
+ );
87
+ }
88
+
89
+ const state = project.latest_scan?.state;
90
+ const scanning = state === "scanning" || state === "dispatching";
91
+ const soFar = project.latest_scan?.findings_so_far ?? 0;
92
+ const findingsTotal = totalFindings(project.severity_counts);
93
+
94
+ if (state === "queued" || scanning) {
95
+ return (
96
+ <ScanProgressPage
97
+ owner={project.owner_login}
98
+ repo={project.name}
99
+ htmlUrl={project.html_url}
100
+ branch={project.default_branch}
101
+ state={state}
102
+ findingsSoFar={soFar}
103
+ justSubmitted={justSubmitted}
104
+ />
105
+ );
106
+ }
107
+
108
+ return (
109
+ <div className="mx-auto max-w-6xl px-6 py-8">
110
+ <Link
111
+ to="/#projects"
112
+ className="inline-flex items-center gap-1.5 text-[13px] text-ink-secondary hover:text-ink"
113
+ >
114
+ <ArrowLeft size={14} /> Projects
115
+ </Link>
116
+
117
+ {justSubmitted && (
118
+ <div
119
+ className="mt-4 rounded-md border border-accent-100 bg-accent-50 px-4 py-3 text-sm text-accent-700"
120
+ role="status"
121
+ >
122
+ Added to the scan queue.
123
+ </div>
124
+ )}
125
+
126
+ {/* Header */}
127
+ <div className="mt-4 border-b border-line pb-6">
128
+ <div className="flex flex-wrap items-center gap-2">
129
+ <h1 className="font-display text-xl font-semibold tracking-tight">
130
+ <span className="text-ink-secondary">{project.owner_login}</span>
131
+ <span className="text-ink-tertiary"> / </span>
132
+ <span className="text-ink">{project.name}</span>
133
+ </h1>
134
+ <a
135
+ href={project.html_url}
136
+ target="_blank"
137
+ rel="noreferrer"
138
+ className="inline-flex items-center text-ink-secondary hover:text-accent-600"
139
+ title="View on GitHub"
140
+ >
141
+ <ExternalLink size={14} />
142
+ </a>
143
+ </div>
144
+ {project.description && (
145
+ <p className="mt-2 max-w-prose text-sm text-ink-secondary">{project.description}</p>
146
+ )}
147
+ <div className="mt-2 flex flex-wrap items-center gap-x-2 gap-y-1 text-[13px] text-ink-tertiary">
148
+ {project.language && (
149
+ <span className="inline-flex items-center gap-1">
150
+ <span className="h-1.5 w-1.5 rounded-full bg-accent-600/70" />
151
+ {project.language}
152
+ </span>
153
+ )}
154
+ <span>·</span>
155
+ <span>★ {formatStars(project.stars)}</span>
156
+ <span>·</span>
157
+ <span>Added {formatDate(project.created_at)}</span>
158
+ </div>
159
+ {isOwner && (
160
+ <div className="mt-3">
161
+ <VersionBar projectId={project.id} viewJob={viewJob} onViewJob={setViewJob} />
162
+ </div>
163
+ )}
164
+ </div>
165
+
166
+ {/* Tabs */}
167
+ <div className="mt-4 flex gap-1 border-b border-line">
168
+ <TabButton active={tab === "overview"} onClick={() => setParams({})}>
169
+ Overview
170
+ </TabButton>
171
+ <TabButton active={tab === "findings"} onClick={() => setParams({ tab: "findings" })}>
172
+ Findings
173
+ </TabButton>
174
+ </div>
175
+
176
+ {tab === "overview" && (
177
+ <div className="py-6">
178
+ <div className="flex flex-wrap items-center gap-x-3 gap-y-2 text-sm">
179
+ <StatusBadge state={state} finishedAt={project.latest_scan?.finished_at} />
180
+ {project.latest_scan?.finished_at && (
181
+ <span className="text-ink-secondary">
182
+ {formatDate(project.latest_scan.finished_at)}
183
+ </span>
184
+ )}
185
+ {project.latest_scan?.commit_sha && (
186
+ <a
187
+ href={`${project.html_url}/commit/${project.latest_scan.commit_sha}`}
188
+ target="_blank"
189
+ rel="noreferrer"
190
+ className="inline-flex items-center gap-0.5 font-mono text-[13px] text-ink-secondary hover:text-accent-600"
191
+ >
192
+ {shortSha(project.latest_scan.commit_sha)}
193
+ <ArrowUpRight size={12} />
194
+ </a>
195
+ )}
196
+ </div>
197
+ <p className="mt-2 text-[13px] text-ink-secondary">
198
+ {state === "completed" ? "Scanned" : scanning ? "Scanning" : "To be scanned"} by{" "}
199
+ <span className="font-medium text-ink">VulnHunter AI engine</span>
200
+ {project.default_branch ? ` · default branch (${project.default_branch})` : null}
201
+ </p>
202
+
203
+ {scanning && (
204
+ <div className="mt-8 space-y-3">
205
+ <ScanningSpinner
206
+ label={
207
+ soFar > 0
208
+ ? `Scan in progress — ${soFar} finding${soFar === 1 ? "" : "s"} so far`
209
+ : "Scan in progress — stats will appear when complete."
210
+ }
211
+ />
212
+ <div className="h-2 w-full max-w-xl animate-pulse rounded-full bg-surface-sunken" />
213
+ </div>
214
+ )}
215
+
216
+ {state !== "completed" && !scanning && (
217
+ <p className="mt-8 text-sm text-ink-secondary">This project is in the scan queue.</p>
218
+ )}
219
+
220
+ {state === "completed" && (
221
+ <>
222
+ <section className="mt-8">
223
+ <p className="font-mono text-[11px] uppercase tracking-wider text-ink-tertiary">
224
+ Scan results
225
+ </p>
226
+ <h2 className="mt-1 font-display text-base font-semibold text-ink">
227
+ Findings overview
228
+ </h2>
229
+ {findingsTotal === 0 ? (
230
+ <p className="mt-3 max-w-prose text-sm text-ink-secondary">
231
+ No findings were confirmed in this scan. A clean scan does not prove a project is
232
+ free of vulnerabilities.
233
+ </p>
234
+ ) : (
235
+ <>
236
+ <p className="mt-3 text-sm font-medium text-ink">
237
+ {findingsTotal} finding{findingsTotal === 1 ? "" : "s"} found
238
+ </p>
239
+ <div className="mt-4">
240
+ <SeverityBar
241
+ counts={project.severity_counts}
242
+ widthClass="w-full max-w-[80%]"
243
+ heightClass="h-2"
244
+ />
245
+ </div>
246
+ </>
247
+ )}
248
+ </section>
249
+
250
+ {project.cwe_distribution.length > 0 && (
251
+ <section className="mt-10">
252
+ <h2 className="font-display text-base font-semibold text-ink">
253
+ Top CWE categories
254
+ </h2>
255
+ <ul className="mt-4 max-w-[80%] space-y-2.5">
256
+ {project.cwe_distribution.slice(0, 5).map((c) => (
257
+ <li key={c.cwe} className="flex items-center gap-3 text-sm">
258
+ <a
259
+ href={`https://cwe.mitre.org/data/definitions/${c.cwe.replace(/^CWE-/i, "")}.html`}
260
+ target="_blank"
261
+ rel="noreferrer"
262
+ className="w-24 shrink-0 font-mono text-[13px] text-accent-700 hover:underline"
263
+ >
264
+ {c.cwe}
265
+ </a>
266
+ <div className="h-1.5 flex-1 overflow-hidden rounded-full bg-surface-sunken">
267
+ <div
268
+ className="h-full rounded-full bg-ink/40"
269
+ style={{ width: `${(c.count / cweMax) * 100}%` }}
270
+ />
271
+ </div>
272
+ <span className="w-8 text-right font-mono text-[13px] text-ink-secondary">
273
+ {c.count}
274
+ </span>
275
+ </li>
276
+ ))}
277
+ </ul>
278
+ </section>
279
+ )}
280
+
281
+ <div className="mt-10 rounded-md border border-line bg-surface-raised p-5">
282
+ <p className="text-sm leading-relaxed text-ink-secondary">
283
+ Detailed findings are visible to signed-in repository maintainers. Maintainers
284
+ review the full reports and choose what to disclose publicly.
285
+ </p>
286
+ </div>
287
+
288
+ {project.disclosed_findings.length > 0 && (
289
+ <section className="mt-10">
290
+ <div className="flex flex-wrap items-center justify-between gap-2">
291
+ <h2 className="font-display text-base font-semibold text-ink">
292
+ Disclosed findings
293
+ </h2>
294
+ <div className="flex items-center gap-3 text-[13px]">
295
+ <a
296
+ href={apiUrl(`/api/projects/${project.id}/report?format=zip`)}
297
+ className="inline-flex items-center gap-1 text-ink-secondary hover:text-accent-600"
298
+ >
299
+ <Download size={14} /> Download all (zip)
300
+ </a>
301
+ </div>
302
+ </div>
303
+ <div className="mt-3 overflow-hidden rounded-md border border-line">
304
+ <table className="w-full table-fixed text-left text-sm">
305
+ <thead className="border-b border-line bg-surface-sunken/50 text-xs uppercase tracking-wide text-ink-secondary">
306
+ <tr>
307
+ <th className="w-[92px] px-3 py-2.5 font-medium">Sev</th>
308
+ <th className="px-3 py-2.5 font-medium">Title</th>
309
+ <th className="w-[112px] px-3 py-2.5 font-medium">CWE</th>
310
+ <th className="w-[120px] px-3 py-2.5 font-medium">Status</th>
311
+ <th className="w-[52px] px-3 py-2.5 font-medium" />
312
+ </tr>
313
+ </thead>
314
+ <tbody>
315
+ {project.disclosed_findings.map((f) => (
316
+ <tr key={f.id} className="border-b border-line last:border-0">
317
+ <td className="px-3 py-3">
318
+ <SeverityChip severity={f.severity} />
319
+ </td>
320
+ <td className="max-w-0 truncate px-3 py-3 font-medium text-ink" title={f.title}>
321
+ {f.title}
322
+ </td>
323
+ <td className="px-3 py-3 font-mono text-[13px] text-ink-secondary">
324
+ {f.cwe ?? "—"}
325
+ </td>
326
+ <td className="px-3 py-3 text-[13px] text-success">Disclosed</td>
327
+ <td className="px-3 py-3 text-right">
328
+ <a
329
+ href={apiUrl(`/api/projects/${project.id}/report/${encodeURIComponent(f.finding_key)}`)}
330
+ className="text-ink-tertiary hover:text-accent-600"
331
+ title="Download full report (markdown)"
332
+ download
333
+ >
334
+ <Download size={14} className="inline" />
335
+ </a>
336
+ </td>
337
+ </tr>
338
+ ))}
339
+ </tbody>
340
+ </table>
341
+ </div>
342
+ </section>
343
+ )}
344
+ </>
345
+ )}
346
+ </div>
347
+ )}
348
+
349
+ {tab === "findings" && !isOwner && (
350
+ <div className="space-y-4 py-6">
351
+ {project.disclosed_findings.length === 0 ? (
352
+ <div className="rounded-md border border-line bg-surface-raised p-6">
353
+ <h2 className="font-display text-base font-semibold text-ink">
354
+ No disclosures yet
355
+ </h2>
356
+ <p className="mt-2 w-full text-sm leading-relaxed text-ink-secondary">
357
+ Full finding details are visible to repository maintainers after sign-in. Disclosed
358
+ findings appear here with the full report content, and on the Overview tab.
359
+ </p>
360
+ </div>
361
+ ) : (
362
+ project.disclosed_findings.map((f) => {
363
+ const open = openKey === f.id;
364
+ return (
365
+ <article
366
+ key={f.id}
367
+ className="overflow-hidden rounded-md border border-line bg-surface-raised"
368
+ >
369
+ <div
370
+ role="button"
371
+ tabIndex={0}
372
+ onClick={() => setOpenKey(open ? null : f.id)}
373
+ onKeyDown={(e) => {
374
+ if (e.key === "Enter" || e.key === " ") {
375
+ e.preventDefault();
376
+ setOpenKey(open ? null : f.id);
377
+ }
378
+ }}
379
+ aria-expanded={open}
380
+ className="flex w-full cursor-pointer items-start gap-3 px-5 py-4 text-left transition-colors hover:bg-surface-sunken/50 focus-ring sm:px-6"
381
+ >
382
+ <div className="min-w-0 flex-1 space-y-2">
383
+ <div className="flex flex-wrap items-center gap-2">
384
+ <SeverityChip severity={f.severity} />
385
+ {f.cwe && (
386
+ <span className="font-mono text-[12px] text-ink-secondary">{f.cwe}</span>
387
+ )}
388
+ <span className="text-[12px] text-success">Disclosed</span>
389
+ </div>
390
+ <h3
391
+ className="line-clamp-2 font-display text-[15px] font-semibold leading-snug text-ink"
392
+ title={f.title}
393
+ >
394
+ {f.title}
395
+ </h3>
396
+ <p className="font-mono text-[11px] text-ink-tertiary">{f.finding_key}</p>
397
+ </div>
398
+ <span className="flex shrink-0 items-center gap-2 self-center">
399
+ <a
400
+ href={apiUrl(`/api/projects/${project.id}/report/${encodeURIComponent(f.finding_key)}`)}
401
+ className="inline-flex items-center gap-1.5 rounded-md border border-line px-2.5 py-1.5 text-xs font-medium text-ink-secondary hover:border-accent-300 hover:text-accent-700"
402
+ download
403
+ onClick={(e) => e.stopPropagation()}
404
+ title="Download full report (markdown)"
405
+ >
406
+ <Download size={14} />
407
+ .md
408
+ </a>
409
+ <ChevronDown
410
+ size={16}
411
+ className={`text-ink-tertiary transition-transform ${open ? "rotate-180" : ""}`}
412
+ />
413
+ </span>
414
+ </div>
415
+ {open && (
416
+ <div className="border-t border-line px-5 pb-5 sm:px-6 sm:pb-6">
417
+ {f.report ? (
418
+ <ReportBody report={f.report} />
419
+ ) : (
420
+ <p className="mt-4 text-sm text-ink-tertiary">
421
+ Structured report is not available for this disclosure (older
422
+ summary-only disclose). Use the download button if a fidelity pack was
423
+ attached later.
424
+ </p>
425
+ )}
426
+ </div>
427
+ )}
428
+ </article>
429
+ );
430
+ })
431
+ )}
432
+ </div>
433
+ )}
434
+
435
+ {tab === "findings" && isOwner && (
436
+ <div className="py-6">
437
+ <OwnerFindings
438
+ projectId={project.id}
439
+ currentFindings={ownerQ.data?.findings ?? []}
440
+ viewJob={viewJob}
441
+ onViewJob={setViewJob}
442
+ />
443
+ </div>
444
+ )}
445
+ </div>
446
+ );
447
+ }
448
+
449
+ function ScanProgressPage({
450
+ owner,
451
+ repo,
452
+ htmlUrl,
453
+ branch,
454
+ state,
455
+ findingsSoFar = 0,
456
+ justSubmitted = false,
457
+ }: {
458
+ owner: string;
459
+ repo: string;
460
+ htmlUrl?: string;
461
+ branch?: string | null;
462
+ state: "loading" | "queued" | "dispatching" | "scanning";
463
+ findingsSoFar?: number;
464
+ justSubmitted?: boolean;
465
+ }) {
466
+ useEffect(() => {
467
+ document.body.classList.add("openvuln-running");
468
+ return () => document.body.classList.remove("openvuln-running");
469
+ }, []);
470
+
471
+ const queued = state === "queued";
472
+ const loading = state === "loading";
473
+ const dispatching = state === "dispatching";
474
+ const currentStage = queued ? 0 : dispatching ? 1 : 2;
475
+ const stages = ["Queued", "Preparing", "Scanning", "Results"];
476
+ const statusLabel = loading
477
+ ? "Loading scan status"
478
+ : queued
479
+ ? "Waiting in scan queue"
480
+ : dispatching
481
+ ? "Preparing the scan"
482
+ : "AI security analysis in progress";
483
+ const detail = loading
484
+ ? "Retrieving the latest status…"
485
+ : queued
486
+ ? "The repository is queued and will start automatically when a scanner is available."
487
+ : dispatching
488
+ ? "OpenVuln is packaging the repository and handing it to an available scanner."
489
+ : findingsSoFar > 0
490
+ ? `${findingsSoFar} confirmed finding${findingsSoFar === 1 ? "" : "s"} so far. Analysis is still running.`
491
+ : "VulnHunter is analyzing the repository. Results will appear after the scan completes.";
492
+
493
+ return (
494
+ <div className="openvuln-home fixed inset-0 z-50 overflow-y-auto bg-black text-white">
495
+ <div className="openvuln-glow pointer-events-none absolute inset-0 -z-10" />
496
+
497
+ <header className="flex items-center justify-between px-5 py-5 sm:px-8 sm:py-7">
498
+ <Link
499
+ to="/"
500
+ className="inline-flex items-center gap-2 rounded-full border border-[#333] bg-[#030303] px-3.5 py-2 text-xs font-medium text-[#acacb0] transition hover:border-[#484a58] hover:bg-[#111216] hover:text-white focus-ring-dark"
501
+ >
502
+ <ArrowLeft size={14} />
503
+ OpenVuln
504
+ </Link>
505
+ {htmlUrl && (
506
+ <a
507
+ href={htmlUrl}
508
+ target="_blank"
509
+ rel="noreferrer"
510
+ className="inline-flex items-center gap-2 rounded-full border border-[#333] bg-[#030303] px-3.5 py-2 text-xs font-medium text-[#acacb0] transition hover:border-[#484a58] hover:bg-[#111216] hover:text-white focus-ring-dark"
511
+ >
512
+ <Github size={14} />
513
+ GitHub
514
+ </a>
515
+ )}
516
+ </header>
517
+
518
+ <main className="mx-auto flex min-h-[calc(100vh-88px)] w-full max-w-4xl flex-col items-center justify-center px-5 pb-16 pt-8 text-center sm:px-8">
519
+ <div className="openvuln-brand flex h-16 w-16 items-center justify-center rounded-2xl border border-white/15 bg-[#151619] shadow-[0_18px_64px_rgba(0,0,0,0.5)]">
520
+ <LoaderCircle
521
+ size={28}
522
+ className="animate-spin text-[#c9ccd6] motion-reduce:animate-none"
523
+ strokeWidth={1.7}
524
+ />
525
+ </div>
526
+
527
+ <p className="mt-7 font-mono text-[11px] uppercase tracking-[0.22em] text-[#85868d]">
528
+ {justSubmitted ? "Repository added" : "Live scan status"}
529
+ </p>
530
+ <h1 className="openvuln-title mt-3 text-balance text-3xl font-medium leading-tight sm:text-5xl">
531
+ {statusLabel}
532
+ </h1>
533
+
534
+ <div className="mt-5 flex flex-wrap items-center justify-center gap-2 text-sm text-[#acacb0]">
535
+ <span className="text-[#f0f2f6]">{owner}</span>
536
+ <span className="text-[#5f6067]">/</span>
537
+ <span className="text-[#f0f2f6]">{repo}</span>
538
+ {branch && (
539
+ <>
540
+ <span className="text-[#5f6067]">·</span>
541
+ <span className="font-mono text-xs text-[#85868d]">{branch}</span>
542
+ </>
543
+ )}
544
+ </div>
545
+
546
+ <div className="openvuln-composer mt-9 w-full max-w-2xl rounded-[22px] border border-[#333] bg-[#111216] px-5 py-5 text-left shadow-[0_24px_90px_rgba(0,0,0,0.52)] sm:px-6">
547
+ <div className="flex items-center gap-3">
548
+ <span className="relative flex h-2.5 w-2.5 shrink-0">
549
+ <span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-[#aeb0ba] opacity-50 motion-reduce:animate-none" />
550
+ <span className="relative inline-flex h-2.5 w-2.5 rounded-full bg-[#d5d7df]" />
551
+ </span>
552
+ <p className="text-sm font-medium text-[#f0f2f6]">{statusLabel}</p>
553
+ </div>
554
+ <p className="mt-3 text-sm leading-6 text-[#85868d]">{detail}</p>
555
+ {!loading && (
556
+ <div className="mt-5 border-t border-[#27282e] pt-4">
557
+ <div className="flex items-center justify-between text-xs text-[#66676e]">
558
+ <span>Current stage</span>
559
+ <span>
560
+ {currentStage + 1} of {stages.length}
561
+ </span>
562
+ </div>
563
+ <ol className="mt-3 grid grid-cols-4 gap-2" aria-label="Scan stages">
564
+ {stages.map((stageLabel, index) => {
565
+ const complete = index < currentStage;
566
+ const current = index === currentStage;
567
+ return (
568
+ <li
569
+ key={stageLabel}
570
+ className={`flex min-w-0 flex-col items-center gap-2 rounded-xl border px-2 py-3 text-center ${
571
+ current
572
+ ? "border-[#4b4d58] bg-[#1a1b20] text-[#f0f2f6]"
573
+ : complete
574
+ ? "border-[#303139] bg-[#151619] text-[#acacb0]"
575
+ : "border-[#24252a] bg-[#121317] text-[#5f6067]"
576
+ }`}
577
+ aria-current={current ? "step" : undefined}
578
+ >
579
+ <span
580
+ className={`flex h-6 w-6 items-center justify-center rounded-full border text-[11px] ${
581
+ current
582
+ ? "border-[#b7bac5] bg-[#d5d7df] text-[#111216]"
583
+ : complete
584
+ ? "border-[#555762] bg-[#26272d] text-[#d5d7df]"
585
+ : "border-[#303139] text-[#5f6067]"
586
+ }`}
587
+ >
588
+ {complete ? <Check size={13} strokeWidth={2.2} /> : index + 1}
589
+ </span>
590
+ <span className="truncate text-[11px] font-medium sm:text-xs">
591
+ {stageLabel}
592
+ </span>
593
+ </li>
594
+ );
595
+ })}
596
+ </ol>
597
+ <p className="mt-3 text-xs text-[#66676e]">
598
+ This shows status stages, not elapsed-time progress. Refreshes every 5 seconds.
599
+ </p>
600
+ </div>
601
+ )}
602
+ </div>
603
+
604
+ <ScanDurationNotice className="mt-4 w-full max-w-2xl" />
605
+ </main>
606
+ </div>
607
+ );
608
+ }
609
+
610
+ function TabButton({
611
+ active,
612
+ onClick,
613
+ children,
614
+ }: {
615
+ active: boolean;
616
+ onClick: () => void;
617
+ children: React.ReactNode;
618
+ }) {
619
+ return (
620
+ <button
621
+ type="button"
622
+ onClick={onClick}
623
+ className={`-mb-px inline-flex items-center border-b-2 px-3 py-2.5 text-sm font-medium transition-colors focus-ring ${
624
+ active
625
+ ? "border-accent-600 text-accent-700"
626
+ : "border-transparent text-ink-secondary hover:text-ink"
627
+ }`}
628
+ >
629
+ {children}
630
+ </button>
631
+ );
632
+ }
src/features/project/VersionBar.tsx ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect, useRef, useState } from "react";
2
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
3
+ import { Ban, ChevronDown, CircleCheck, LoaderCircle } from "lucide-react";
4
+ import { api, type ScanJobSummary } from "../../shared/api/client";
5
+ import { ConfirmDialog } from "../../components/ConfirmDialog";
6
+ import { formatRelativeTime, shortSha } from "../../shared/lib/format";
7
+
8
+ export interface ViewJob {
9
+ id: string;
10
+ label: string;
11
+ }
12
+
13
+ /**
14
+ * 项目头部版本条(owner 专属,fish No.1253):版本切换从 tab 内容区上移到标题区。
15
+ * 紧凑单行:当前版本下拉(切换查看历史版本)+ 进行中状态(可取消)+ Rescan。
16
+ */
17
+ export function VersionBar({
18
+ projectId,
19
+ viewJob,
20
+ onViewJob,
21
+ }: {
22
+ projectId: string;
23
+ viewJob: ViewJob | null;
24
+ onViewJob: (v: ViewJob | null) => void;
25
+ }) {
26
+ const qc = useQueryClient();
27
+ const [open, setOpen] = useState(false);
28
+ const [cancelTarget, setCancelTarget] = useState<ScanJobSummary | null>(null);
29
+ const rootRef = useRef<HTMLDivElement>(null);
30
+
31
+ const scansQ = useQuery({
32
+ queryKey: ["project-scans", projectId],
33
+ queryFn: () => api.projectScans(projectId),
34
+ refetchInterval: (q) =>
35
+ (q.state.data?.scans ?? []).some((s) => ["queued", "dispatching", "scanning"].includes(s.state))
36
+ ? 5000
37
+ : false,
38
+ retry: false,
39
+ });
40
+
41
+ useEffect(() => {
42
+ if (!open) return;
43
+ const onDoc = (e: MouseEvent) => {
44
+ if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);
45
+ };
46
+ const onKey = (e: KeyboardEvent) => {
47
+ if (e.key === "Escape") setOpen(false);
48
+ };
49
+ document.addEventListener("mousedown", onDoc);
50
+ document.addEventListener("keydown", onKey);
51
+ return () => {
52
+ document.removeEventListener("mousedown", onDoc);
53
+ document.removeEventListener("keydown", onKey);
54
+ };
55
+ }, [open]);
56
+
57
+ const invalidateAll = () => {
58
+ void qc.invalidateQueries({ queryKey: ["project-scans", projectId] });
59
+ void qc.invalidateQueries({ queryKey: ["public", "project"] });
60
+ void qc.invalidateQueries({ queryKey: ["owner-findings", projectId] });
61
+ };
62
+
63
+ const cancelM = useMutation({
64
+ mutationFn: (jobId: string) => api.cancelScanJob(projectId, jobId),
65
+ onSettled: () => {
66
+ setCancelTarget(null);
67
+ invalidateAll();
68
+ },
69
+ });
70
+
71
+ const scans = scansQ.data?.scans ?? [];
72
+ const inflight = scans.find((s) => ["queued", "dispatching", "scanning"].includes(s.state));
73
+ const completed = scans.filter((s) => s.state === "completed");
74
+ const current = completed[0] ?? null; // 列表按创建时间倒序
75
+ const viewing = viewJob ?? (current ? { id: current.id, label: current.commit_sha?.slice(0, 7) ?? "current" } : null);
76
+
77
+ return (
78
+ <div ref={rootRef} className="flex flex-wrap items-center gap-2 text-[13px]">
79
+ {/* 版本切换下拉 */}
80
+ <div className="relative">
81
+ <button
82
+ type="button"
83
+ onClick={() => setOpen((v) => !v)}
84
+ aria-expanded={open}
85
+ aria-haspopup="menu"
86
+ className="inline-flex h-8 items-center gap-1.5 rounded-full border border-line bg-surface-raised px-3 text-ink transition-colors hover:border-[#484a58] hover:bg-surface-sunken focus-ring"
87
+ >
88
+ <CircleCheck size={13} className="text-success" />
89
+ <span className="font-mono text-[12px]">{viewing?.label ?? "—"}</span>
90
+ <ChevronDown size={13} className={`text-ink-tertiary transition-transform ${open ? "rotate-180" : ""}`} />
91
+ </button>
92
+
93
+ {open && (
94
+ <div
95
+ role="menu"
96
+ className="absolute left-0 top-full z-40 mt-1.5 w-72 overflow-hidden rounded-lg border border-line bg-surface shadow-lg"
97
+ >
98
+ <ul className="max-h-72 overflow-y-auto py-1">
99
+ {completed.map((s) => {
100
+ const isCurrent = current?.id === s.id;
101
+ const isSelected = viewing?.id === s.id;
102
+ return (
103
+ <li key={s.id}>
104
+ <button
105
+ type="button"
106
+ role="menuitem"
107
+ onClick={() => {
108
+ setOpen(false);
109
+ onViewJob(isCurrent ? null : { id: s.id, label: s.commit_sha?.slice(0, 7) ?? s.id.slice(0, 8) });
110
+ }}
111
+ className={`flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-surface-sunken ${
112
+ isSelected ? "bg-surface-sunken" : ""
113
+ }`}
114
+ >
115
+ <span className="font-mono text-[12px] text-ink">
116
+ {s.commit_sha ? shortSha(s.commit_sha) : "—"}
117
+ </span>
118
+ <span className="text-[12px] text-ink-tertiary">{s.findings_so_far} findings</span>
119
+ <span className="ml-auto font-mono text-[11px] text-ink-tertiary">
120
+ {formatRelativeTime(s.created_at)}
121
+ </span>
122
+ </button>
123
+ </li>
124
+ );
125
+ })}
126
+ {completed.length === 0 && (
127
+ <li className="px-3 py-3 text-center text-[12px] text-ink-tertiary">No completed scans yet</li>
128
+ )}
129
+ </ul>
130
+ </div>
131
+ )}
132
+ </div>
133
+
134
+ {/* 进行中状态 + Cancel */}
135
+ {inflight && (
136
+ <span className="inline-flex h-8 items-center gap-1.5 rounded-full border border-running/30 bg-running-bg px-3 text-running-ink">
137
+ <LoaderCircle size={13} className="animate-spin" />
138
+ <span className="text-[12px] font-medium capitalize">{inflight.state}</span>
139
+ {inflight.state === "scanning" && (
140
+ <span className="text-[12px]">{inflight.findings_so_far} so far</span>
141
+ )}
142
+ {(inflight.state === "queued" || inflight.state === "scanning") && (
143
+ <button
144
+ type="button"
145
+ onClick={() => setCancelTarget(inflight)}
146
+ className="ml-0.5 inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-[11px] text-ink-secondary transition-colors hover:text-danger"
147
+ title="Cancel this scan"
148
+ >
149
+ <Ban size={11} /> Cancel
150
+ </button>
151
+ )}
152
+ </span>
153
+ )}
154
+
155
+ <ConfirmDialog
156
+ open={cancelTarget !== null}
157
+ title="Cancel this scan?"
158
+ body={`The ${cancelTarget?.state === "scanning" ? "running" : "queued"} scan will be stopped and its VulnHunter slot released. This version can be resubmitted later.`}
159
+ confirmLabel="Cancel scan"
160
+ danger
161
+ busy={cancelM.isPending}
162
+ onConfirm={() => cancelTarget && cancelM.mutate(cancelTarget.id)}
163
+ onCancel={() => setCancelTarget(null)}
164
+ />
165
+ </div>
166
+ );
167
+ }
src/features/submit/SubmitPage.tsx ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Link } from "react-router-dom";
2
+ import { ArrowLeft, Github } from "lucide-react";
3
+ import { RepoSubmitForm } from "../../components/RepoSubmitForm";
4
+ import { loginUrl, navigateToLogin } from "../../shared/api/client";
5
+ import { useMe } from "../../features/auth/useAuth";
6
+
7
+ export function SubmitPage() {
8
+ const meQ = useMe();
9
+ const authed = meQ.data?.authenticated === true;
10
+
11
+ return (
12
+ <div className="mx-auto max-w-6xl px-6 py-8">
13
+ <Link
14
+ to="/"
15
+ className="inline-flex items-center gap-1.5 text-[13px] text-ink-secondary hover:text-ink"
16
+ >
17
+ <ArrowLeft size={14} /> Projects
18
+ </Link>
19
+ <div className="max-w-xl">
20
+ <h1 className="mt-4 font-display text-xl font-bold text-ink">Submit a project</h1>
21
+ <p className="mt-2 text-sm text-ink-secondary">
22
+ Paste a public GitHub repository URL. We scan the default branch and publish aggregate
23
+ statistics. Submitting requires a GitHub account with <strong className="font-medium text-ink">admin or maintain</strong> permission
24
+ on the repository.
25
+ </p>
26
+
27
+ <div className="mt-8">
28
+ {meQ.isLoading ? (
29
+ <div className="h-12 animate-pulse rounded-lg bg-surface-sunken" aria-label="Loading" />
30
+ ) : authed ? (
31
+ <RepoSubmitForm />
32
+ ) : (
33
+ <div className="rounded-xl border border-line bg-surface-sunken/50 p-6 text-center">
34
+ <p className="font-display text-base font-semibold text-ink">
35
+ Sign in to submit your repository
36
+ </p>
37
+ <p className="mx-auto mt-2 max-w-md text-sm leading-relaxed text-ink-secondary">
38
+ OpenVuln scans are available to repository owners. We verify your GitHub role on
39
+ every submission — only maintainers and admins can start a scan.
40
+ </p>
41
+ <a
42
+ href={loginUrl("/submit")}
43
+ onClick={(e) => {
44
+ if (window.top && window.top !== window.self) {
45
+ e.preventDefault();
46
+ navigateToLogin("/submit");
47
+ window.dispatchEvent(new Event("ov-oauth-popup-opened"));
48
+ }
49
+ }}
50
+ className="mt-5 inline-flex h-10 items-center gap-2 rounded-md bg-[#ebecf0] px-4 text-sm font-medium text-[#0d0d0f] transition-colors hover:bg-white focus-ring"
51
+ >
52
+ <Github size={16} />
53
+ Sign in with GitHub
54
+ </a>
55
+ </div>
56
+ )}
57
+ </div>
58
+
59
+ <section className="mt-12 border-t border-line pt-8">
60
+ <h2 className="font-display text-base font-semibold text-ink">What happens next</h2>
61
+ <ol className="mt-4 space-y-3 text-sm text-ink-secondary">
62
+ {[
63
+ "We verify your GitHub role on the repository (admin or maintain)",
64
+ "It enters the scan queue",
65
+ "VulnHunter scans the default branch",
66
+ "You review full findings and choose what to disclose publicly",
67
+ ].map((step, i) => (
68
+ <li key={step} className="flex gap-3">
69
+ <span className="font-mono text-ink-tertiary">{i + 1}</span>
70
+ <span>{step}</span>
71
+ </li>
72
+ ))}
73
+ </ol>
74
+ </section>
75
+ </div>
76
+ </div>
77
+ );
78
+ }
src/index.css ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ /* 深色体系:原生控件(select 弹层/滚动条/checkbox)跟随深色 */
7
+ :root {
8
+ color-scheme: dark;
9
+ }
10
+
11
+ html,
12
+ body,
13
+ #root {
14
+ min-height: 100%;
15
+ }
16
+
17
+ select option {
18
+ background-color: #111216;
19
+ color: #f0f2f6;
20
+ }
21
+
22
+ body {
23
+ @apply bg-surface text-ink font-sans;
24
+ }
25
+
26
+ ::selection {
27
+ background: rgba(40, 209, 255, 0.24);
28
+ color: #f0f2f6;
29
+ }
30
+ }
31
+
32
+ @layer utilities {
33
+ .focus-ring {
34
+ @apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/50 focus-visible:ring-offset-2 focus-visible:ring-offset-black;
35
+ }
36
+
37
+ .focus-ring-dark {
38
+ @apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/60 focus-visible:ring-offset-2 focus-visible:ring-offset-black;
39
+ }
40
+
41
+ .text-balance {
42
+ text-wrap: balance;
43
+ }
44
+ }
45
+
46
+ @layer components {
47
+ .openvuln-home {
48
+ font-family:
49
+ -apple-system,
50
+ BlinkMacSystemFont,
51
+ "Segoe UI",
52
+ Roboto,
53
+ "Helvetica Neue",
54
+ Arial,
55
+ "Noto Sans",
56
+ sans-serif,
57
+ "Apple Color Emoji",
58
+ "Segoe UI Emoji",
59
+ "Segoe UI Symbol",
60
+ "Noto Color Emoji";
61
+ }
62
+
63
+ .openvuln-title {
64
+ color: #f1f1f3;
65
+ }
66
+
67
+ .openvuln-glow {
68
+ background: radial-gradient(ellipse 48% 38% at 50% 18%, rgba(255, 255, 255, 0.055), transparent 72%);
69
+ }
70
+
71
+ .openvuln-home::after {
72
+ position: absolute;
73
+ inset: 0;
74
+ z-index: -1;
75
+ content: "";
76
+ pointer-events: none;
77
+ opacity: 0.04;
78
+ background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
79
+ }
80
+
81
+ .openvuln-brand {
82
+ animation: openvuln-enter 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
83
+ }
84
+
85
+ .openvuln-composer {
86
+ animation: openvuln-enter 760ms 90ms cubic-bezier(0.22, 1, 0.36, 1) both;
87
+ }
88
+
89
+ .openvuln-panel {
90
+ border: 1px solid rgba(255, 255, 255, 0.08);
91
+ border-radius: 26px;
92
+ background:
93
+ linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
94
+ rgba(16, 17, 21, 0.82);
95
+ box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
96
+ backdrop-filter: blur(18px);
97
+ }
98
+
99
+ .openvuln-scrollbar {
100
+ scrollbar-width: thin;
101
+ scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
102
+ }
103
+
104
+ .openvuln-scrollbar::-webkit-scrollbar {
105
+ width: 6px;
106
+ }
107
+
108
+ .openvuln-scrollbar::-webkit-scrollbar-track {
109
+ background: transparent;
110
+ }
111
+
112
+ .openvuln-scrollbar::-webkit-scrollbar-thumb {
113
+ border-radius: 999px;
114
+ background: rgba(255, 255, 255, 0.2);
115
+ }
116
+ }
117
+
118
+ @keyframes openvuln-enter {
119
+ from {
120
+ opacity: 0;
121
+ transform: translateY(12px) scale(0.99);
122
+ }
123
+ to {
124
+ opacity: 1;
125
+ transform: translateY(0) scale(1);
126
+ }
127
+ }
128
+
129
+ @keyframes live-scan-sweep {
130
+ from {
131
+ transform: translateX(-105%);
132
+ }
133
+ to {
134
+ transform: translateX(305%);
135
+ }
136
+ }
137
+
138
+ .live-scan-sweep {
139
+ animation: live-scan-sweep 2.4s ease-in-out infinite;
140
+ }
141
+
142
+ @media (prefers-reduced-motion: reduce) {
143
+ .openvuln-brand,
144
+ .openvuln-composer {
145
+ animation: none;
146
+ }
147
+
148
+ .live-scan-sweep {
149
+ animation: none;
150
+ transform: translateX(200%);
151
+ }
152
+ }
153
+
154
+ body.openvuln-running {
155
+ overflow: hidden;
156
+ background: #000;
157
+ }
158
+
159
+ body.openvuln-running .app-shell-chrome {
160
+ display: none;
161
+ }
src/main.tsx ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import { StrictMode } from "react";
2
+ import { createRoot } from "react-dom/client";
3
+ import "./index.css";
4
+ import { App } from "./App";
5
+
6
+ createRoot(document.getElementById("root")!).render(
7
+ <StrictMode>
8
+ <App />
9
+ </StrictMode>,
10
+ );
src/shared/api/client.ts ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type {
2
+ DisclosureState,
3
+ ProjectCard,
4
+ ScanJobState,
5
+ OverviewStats,
6
+ ProjectListResponse,
7
+ ProjectPublicView,
8
+ Severity,
9
+ SubmitProjectRequest,
10
+ SubmitProjectResponse,
11
+ } from "@/shared/types";
12
+
13
+ export class ApiError extends Error {
14
+ constructor(
15
+ public status: number,
16
+ public code: string,
17
+ message: string,
18
+ public context?: Record<string, unknown>,
19
+ ) {
20
+ super(message);
21
+ this.name = "ApiError";
22
+ }
23
+ }
24
+
25
+ /**
26
+ * Build-time API origin via `VITE_API_BASE_URL` (no trailing slash).
27
+ * Default empty → same-origin relative `/api/...`.
28
+ * Cross-origin deploy example:
29
+ * VITE_API_BASE_URL=https://openvuln.clouditera.com pnpm --filter @openvuln/web build
30
+ */
31
+ const API_BASE = (import.meta.env.VITE_API_BASE_URL ?? "").replace(/\/$/, "");
32
+
33
+ /** Absolute or root-relative URL for API paths and download links. */
34
+ export function apiUrl(path: string): string {
35
+ const p = path.startsWith("/") ? path : `/${path}`;
36
+ return `${API_BASE}${p}`;
37
+ }
38
+
39
+ async function request<T>(path: string, init?: RequestInit): Promise<T> {
40
+ const res = await fetch(apiUrl(path), {
41
+ credentials: "include",
42
+ ...init,
43
+ headers: {
44
+ ...(init?.body ? { "content-type": "application/json" } : {}),
45
+ ...init?.headers,
46
+ },
47
+ });
48
+
49
+ if (!res.ok) {
50
+ let code = "ERR_UNKNOWN";
51
+ let summary = res.statusText;
52
+ let context: Record<string, unknown> | undefined;
53
+ try {
54
+ const body = (await res.json()) as {
55
+ error?: { code?: string; summary?: string; context?: Record<string, unknown> };
56
+ };
57
+ code = body.error?.code ?? code;
58
+ summary = body.error?.summary ?? summary;
59
+ context = body.error?.context;
60
+ } catch {
61
+ /* ignore */
62
+ }
63
+ throw new ApiError(res.status, code, summary, context);
64
+ }
65
+
66
+ if (res.status === 204) return undefined as T;
67
+ return (await res.json()) as T;
68
+ }
69
+
70
+
71
+ /* ── Auth + owner self-service (design: docs/auth-owner-selfservice-design.md) ── */
72
+
73
+ export interface MeResponse {
74
+ authenticated: boolean;
75
+ user: { id: number; login: string; avatar_url: string | null } | null;
76
+ }
77
+
78
+ /** GitHub OAuth login URL (full-page redirect). */
79
+ export function loginUrl(returnTo: string): string {
80
+ // 站内相对路径与白名单绝对地址(HF 部署回跳)都放行 —— 白名单校验在后端;
81
+ // 仅协议相对 "//…" 一律拒绝(开放重定向的唯一真风险)。
82
+ const safe = returnTo.startsWith("//") ? "/" : returnTo;
83
+ return apiUrl(`/api/auth/github/login?return_to=${encodeURIComponent(safe)}`);
84
+ }
85
+
86
+ /** 是否在 iframe 嵌套环境(HF Space 嵌入页;GitHub x-frame-options:deny,iframe 内跳 OAuth 必死)。 */
87
+ export function isEmbedded(): boolean {
88
+ try {
89
+ return window.self !== window.top;
90
+ } catch {
91
+ return true;
92
+ }
93
+ }
94
+
95
+ /**
96
+ * 当前页作为 OAuth return_to:跨域部署(HF 静态站,API_BASE 与页面不同源)必须给
97
+ * 本站绝对地址(后端白名单已放行),授权完才回得来;同源部署(clouditera)用相对路径。
98
+ */
99
+ export function currentReturnTo(): string {
100
+ const rel = window.location.pathname + window.location.search;
101
+ if (API_BASE && new URL(API_BASE).origin !== window.location.origin) {
102
+ return window.location.origin + rel;
103
+ }
104
+ return rel;
105
+ }
106
+
107
+ /**
108
+ * Navigate to OAuth login.
109
+ * - iframe (HF Space hub): open popup window (sandbox blocks top navigation)
110
+ * - direct access (clouditera / HF subdomain): redirect current page
111
+ */
112
+ export function navigateToLogin(returnTo: string = currentReturnTo()): void {
113
+ const url = loginUrl(returnTo);
114
+ if (isEmbedded()) {
115
+ // Must call window.open synchronously in click handler to avoid popup blocker
116
+ const popup = window.open(url, "ov-oauth", "width=600,height=700");
117
+ if (!popup) {
118
+ // Popup blocked — fall back to top navigation (may work on some platforms)
119
+ if (window.top) window.top.location.href = url;
120
+ }
121
+ } else {
122
+ window.location.href = url;
123
+ }
124
+ }
125
+
126
+ /** Popup OAuth callback return_to path. */
127
+ export const POPUP_CALLBACK_PATH = "/auth/popup-callback";
128
+
129
+ /** return_to for popup flow: always the API origin + callback path.
130
+ * The callback page MUST run on the API domain (clouditera), not the HF Space domain,
131
+ * so that /api/me fetch is first-party (cookie works) rather than third-party (blocked).
132
+ */
133
+ export function popupReturnTo(): string {
134
+ return `${API_BASE}${POPUP_CALLBACK_PATH}`;
135
+ }
136
+
137
+ /** Navigate to OAuth login in popup (for embedded/iframe context). */
138
+ export function navigateToLoginPopup(): void {
139
+ const url = loginUrl(popupReturnTo());
140
+ window.open(url, "ov-oauth", "width=600,height=700");
141
+ }
142
+
143
+ export interface OwnerFindingSummary {
144
+ id: string;
145
+ finding_key: string;
146
+ severity: Severity;
147
+ title: string;
148
+ cwe: string | null;
149
+ primary_file: string | null;
150
+ disclosure_state: DisclosureState;
151
+ detail_json: unknown;
152
+ report_yaml: string | null;
153
+ cvss_score: number | null;
154
+ poc_status: string | null;
155
+ }
156
+
157
+ export interface OwnerArtifact {
158
+ kind: string;
159
+ rel_path: string;
160
+ file_name: string;
161
+ mime: string | null;
162
+ size_bytes: number;
163
+ truncated: boolean;
164
+ is_binary: boolean;
165
+ has_content: boolean;
166
+ }
167
+
168
+ export interface OwnerFindingDetail extends OwnerFindingSummary {
169
+ report: {
170
+ metadata?: Record<string, unknown>;
171
+ description?: Record<string, unknown>;
172
+ code?: Record<string, unknown>;
173
+ references?: unknown;
174
+ } | null;
175
+ artifacts: OwnerArtifact[];
176
+ }
177
+
178
+
179
+ /* ── 站内通知(task-78c9fb3a,契约以 architect 简案为准) ── */
180
+
181
+ export interface NotificationItem {
182
+ id: string;
183
+ type: string; // v1: "scan_completed"
184
+ payload: {
185
+ project_id: string;
186
+ full_name: string;
187
+ scan_job_id: string;
188
+ counts: { critical: number; high: number; medium: number; low: number };
189
+ no_value: boolean;
190
+ };
191
+ read_at: string | null;
192
+ created_at: string;
193
+ }
194
+
195
+ export interface ScanJobSummary {
196
+ id: string;
197
+ state: ScanJobState;
198
+ commit_sha: string | null;
199
+ git_ref: string | null;
200
+ findings_so_far: number;
201
+ created_at: string;
202
+ finished_at: string | null;
203
+ }
204
+
205
+ export const api = {
206
+ overview: () => request<OverviewStats>("/api/stats/overview"),
207
+ listProjects: (params?: { sort?: string; page?: number; page_size?: number }) => {
208
+ const q = new URLSearchParams();
209
+ if (params?.sort) q.set("sort", params.sort);
210
+ if (params?.page) q.set("page", String(params.page));
211
+ if (params?.page_size) q.set("page_size", String(params.page_size));
212
+ const qs = q.toString();
213
+ return request<ProjectListResponse>(`/api/projects${qs ? `?${qs}` : ""}`);
214
+ },
215
+ getProject: (owner: string, repo: string) =>
216
+ request<ProjectPublicView>(
217
+ `/api/projects/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}`,
218
+ ),
219
+ submitProject: (body: SubmitProjectRequest) =>
220
+ request<SubmitProjectResponse>("/api/projects", {
221
+ method: "POST",
222
+ body: JSON.stringify(body),
223
+ }),
224
+ me: () => request<MeResponse>("/api/me"),
225
+ logout: () => request<void>("/api/auth/logout", { method: "POST" }),
226
+ ownerFindings: (projectId: string, scanJobId?: string) =>
227
+ request<{ project_id: string; findings: OwnerFindingSummary[] }>(
228
+ `/api/projects/${projectId}/findings${scanJobId ? `?scan_job_id=${scanJobId}` : ""}`,
229
+ ),
230
+ ownerFinding: (projectId: string, key: string, scanJobId?: string) =>
231
+ request<{ finding: OwnerFindingDetail }>(
232
+ `/api/projects/${projectId}/findings/${encodeURIComponent(key)}${scanJobId ? `?scan_job_id=${scanJobId}` : ""}`,
233
+ ),
234
+ ownerDisclose: (projectId: string, findingIds: string[]) =>
235
+ request<{ disclosed_count: number }>(`/api/projects/${projectId}/disclose`, {
236
+ method: "POST",
237
+ body: JSON.stringify({ finding_ids: findingIds }),
238
+ }),
239
+ notifications: (limit = 20) =>
240
+ request<{ notifications: NotificationItem[]; unread_count: number }>(
241
+ `/api/notifications?limit=${limit}`,
242
+ ),
243
+ markNotificationsRead: (ids: string[]) =>
244
+ request<void>("/api/notifications/read", { method: "POST", body: JSON.stringify({ ids }) }),
245
+ markAllNotificationsRead: () =>
246
+ request<void>("/api/notifications/read-all", { method: "POST" }),
247
+ myProjects: () => request<{ projects: ProjectCard[] }>("/api/my/projects"),
248
+ projectScans: (projectId: string) =>
249
+ request<{ scans: ScanJobSummary[] }>(`/api/projects/${projectId}/scans`),
250
+ cancelScanJob: (projectId: string, jobId: string) =>
251
+ request<{ ok: true; state: string }>(
252
+ `/api/projects/${projectId}/scan-jobs/${jobId}/cancel`,
253
+ { method: "POST" },
254
+ ),
255
+ };
src/shared/lib/format.ts ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { Severity, SeverityCounts } from "@/shared/types";
2
+
3
+ export function formatStars(n: number): string {
4
+ if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(1).replace(/\.0$/, "")}M`;
5
+ if (n >= 1_000) return `${(n / 1_000).toFixed(1).replace(/\.0$/, "")}k`;
6
+ return String(n);
7
+ }
8
+
9
+ export function formatRelativeTime(iso: string | null | undefined): string {
10
+ if (!iso) return "—";
11
+ const then = new Date(iso).getTime();
12
+ if (Number.isNaN(then)) return "—";
13
+ const diffSec = Math.round((then - Date.now()) / 1000);
14
+ const rtf = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
15
+ const abs = Math.abs(diffSec);
16
+ if (abs < 60) return rtf.format(diffSec, "second");
17
+ const diffMin = Math.round(diffSec / 60);
18
+ if (Math.abs(diffMin) < 60) return rtf.format(diffMin, "minute");
19
+ const diffHr = Math.round(diffMin / 60);
20
+ if (Math.abs(diffHr) < 48) return rtf.format(diffHr, "hour");
21
+ const diffDay = Math.round(diffHr / 24);
22
+ if (Math.abs(diffDay) < 60) return rtf.format(diffDay, "day");
23
+ const diffMo = Math.round(diffDay / 30);
24
+ return rtf.format(diffMo, "month");
25
+ }
26
+
27
+ export function formatDate(iso: string | null | undefined): string {
28
+ if (!iso) return "—";
29
+ return new Date(iso).toLocaleDateString("en-US", {
30
+ year: "numeric",
31
+ month: "short",
32
+ day: "numeric",
33
+ });
34
+ }
35
+
36
+ export function shortSha(sha: string | null | undefined): string {
37
+ if (!sha) return "—";
38
+ return sha.slice(0, 7);
39
+ }
40
+
41
+ export function totalFindings(c: SeverityCounts): number {
42
+ return c.critical + c.high + c.medium + c.low;
43
+ }
44
+
45
+ export const SEV_ORDER: Severity[] = ["critical", "high", "medium", "low"];
46
+
47
+ export function severityLabel(s: Severity): string {
48
+ return s.charAt(0).toUpperCase() + s.slice(1);
49
+ }
src/shared/types.ts ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export type Severity = "critical" | "high" | "medium" | "low";
2
+
3
+ export type SeverityCounts = Record<Severity, number>;
4
+
5
+ export type ScanJobState =
6
+ | "queued"
7
+ | "dispatching"
8
+ | "scanning"
9
+ | "completed"
10
+ | "failed"
11
+ | "cancelled";
12
+
13
+ export type DisclosureState = "owner_only" | "disclosed";
14
+
15
+ export interface ProjectCard {
16
+ id: string;
17
+ owner_login: string;
18
+ name: string;
19
+ full_name: string;
20
+ html_url: string;
21
+ description: string | null;
22
+ language: string | null;
23
+ stars: number;
24
+ default_branch: string;
25
+ latest_scan: {
26
+ id: string;
27
+ state: ScanJobState;
28
+ commit_sha: string | null;
29
+ created_at: string;
30
+ finished_at: string | null;
31
+ findings_so_far?: number;
32
+ } | null;
33
+ severity_counts: SeverityCounts;
34
+ created_at: string;
35
+ }
36
+
37
+ export interface ProjectListResponse {
38
+ items: ProjectCard[];
39
+ page: number;
40
+ page_size: number;
41
+ total: number;
42
+ }
43
+
44
+ export interface CweCount {
45
+ cwe: string;
46
+ count: number;
47
+ }
48
+
49
+ export interface DisclosedFindingSummary {
50
+ id: string;
51
+ finding_key: string;
52
+ severity: Severity;
53
+ title: string;
54
+ cwe: string | null;
55
+ disclosed_at: string | null;
56
+ summary?: string | null;
57
+ report?: {
58
+ metadata: Record<string, unknown>;
59
+ description: Record<string, unknown>;
60
+ code: Record<string, unknown>;
61
+ references: unknown;
62
+ } | null;
63
+ }
64
+
65
+ export interface ProjectPublicView {
66
+ id: string;
67
+ owner_login: string;
68
+ name: string;
69
+ full_name: string;
70
+ html_url: string;
71
+ description: string | null;
72
+ language: string | null;
73
+ stars: number;
74
+ default_branch: string;
75
+ latest_scan: {
76
+ id: string;
77
+ state: ScanJobState;
78
+ commit_sha: string | null;
79
+ created_at: string;
80
+ started_at: string | null;
81
+ finished_at: string | null;
82
+ findings_so_far?: number;
83
+ } | null;
84
+ severity_counts: SeverityCounts;
85
+ cwe_distribution: CweCount[];
86
+ disclosed_findings: DisclosedFindingSummary[];
87
+ created_at: string;
88
+ }
89
+
90
+ export interface SubmitProjectRequest {
91
+ git_url: string;
92
+ ref?: string;
93
+ }
94
+
95
+ export interface SubmitProjectResponse {
96
+ project: ProjectCard;
97
+ }
98
+
99
+ export interface TrendDay {
100
+ date: string;
101
+ critical: number;
102
+ high: number;
103
+ medium: number;
104
+ low: number;
105
+ }
106
+
107
+ export interface CweTopItem {
108
+ cwe: string;
109
+ name: string | null;
110
+ count: number;
111
+ }
112
+
113
+ export interface LiveScanItem {
114
+ project_id: string;
115
+ full_name: string;
116
+ state: "scanning" | "dispatching";
117
+ elapsed_sec: number;
118
+ findings_so_far: number;
119
+ }
120
+
121
+ export interface RecentActivityItem {
122
+ ts: string;
123
+ type: "scan_completed" | "project_submitted" | "scan_failed" | "disclosed";
124
+ text: string;
125
+ full_name?: string;
126
+ meta?: string;
127
+ }
128
+
129
+ export interface OverviewStats {
130
+ project_count: number;
131
+ scanned_project_count?: number;
132
+ scan_completed_count: number;
133
+ scan_failed_count: number;
134
+ scan_in_progress_count: number;
135
+ finding_total: number;
136
+ finding_disclosed_count: number;
137
+ severity_counts: SeverityCounts;
138
+ trend?: TrendDay[];
139
+ cwe_top?: CweTopItem[];
140
+ live?: {
141
+ scanning: LiveScanItem[];
142
+ queued_count: number;
143
+ };
144
+ recent?: RecentActivityItem[];
145
+ }
src/vite-env.d.ts ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ /** API origin, no trailing slash. Empty/unset = same-origin `/api`. */
5
+ readonly VITE_API_BASE_URL?: string;
6
+ /** Local Vite development proxy target. */
7
+ readonly VITE_API_PROXY?: string;
8
+ /** Source repository linked from the interface. */
9
+ readonly VITE_GITHUB_REPO_URL?: string;
10
+ }
11
+
12
+ interface ImportMeta {
13
+ readonly env: ImportMetaEnv;
14
+ }
tailwind.config.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
4
+ theme: {
5
+ extend: {
6
+ colors: {
7
+ // ── 深色视觉语言(对齐协作者着陆页,task-5ee34751 fish 定稿)──
8
+ surface: {
9
+ DEFAULT: "#000000", // 页面底(openvuln-home bg-black)
10
+ raised: "#111216", // 卡片(composer bg)
11
+ sunken: "#15161b", // 井/hover(focus-within bg)
12
+ header: "#030303", // 顶栏(pill bg)
13
+ },
14
+ line: "#26272c", // 分隔线/边框(#26272c ~ #2f3037)
15
+ ink: {
16
+ DEFAULT: "#f0f2f6", // 主文字
17
+ secondary: "#acacb0", // 次文字
18
+ tertiary: "#696a70", // 辅助/placeholder
19
+ },
20
+ // 交互蓝:深色底链接/聚焦/进行中(Clouditera 规范深底 accent)
21
+ accent: {
22
+ 50: "rgba(40, 209, 255, 0.10)",
23
+ 100: "rgba(40, 209, 255, 0.16)",
24
+ 200: "rgba(40, 209, 255, 0.28)",
25
+ 600: "#28D1FF", // 深底主色(原 accent-dark)
26
+ 700: "#5CDDFF", // hover 亮一档
27
+ 800: "#8AE6FF",
28
+ },
29
+ // 功能色深底版:亮 ink + 半透明 bg,bar 用亮色
30
+ sev: {
31
+ critical: { ink: "#FF6B6B", bg: "rgba(242, 79, 79, 0.16)", bar: "#F24F4F" },
32
+ high: { ink: "#F24F4F", bg: "rgba(242, 79, 79, 0.12)", bar: "#F24F4F" },
33
+ medium: { ink: "#FF8A5C", bg: "rgba(255, 115, 60, 0.13)", bar: "#FF733C" },
34
+ low: { ink: "#F7C530", bg: "rgba(247, 197, 48, 0.12)", bar: "#F7C530" },
35
+ // info:VH 兜底档,公众 UI 不展示,仅防御保留
36
+ info: { ink: "#acacb0", bg: "rgba(172, 172, 176, 0.10)", bar: "#696a70" },
37
+ },
38
+ ai: { DEFAULT: "#9285FF", bg: "rgba(146, 133, 255, 0.13)", ink: "#A79DFF" }, // AI 紫(深底)
39
+ success: { DEFAULT: "#3AD186", bg: "rgba(58, 209, 134, 0.12)", ink: "#3AD186" },
40
+ danger: "#F24F4F",
41
+ warning: "#FF733C",
42
+ running: { DEFAULT: "#28D1FF", bg: "rgba(40, 209, 255, 0.12)", ink: "#28D1FF" },
43
+ },
44
+ fontFamily: {
45
+ // 协作者体系:系统字栈(着陆页 openvuln-home 同族)
46
+ display: ['-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', '"Helvetica Neue"', 'Arial', '"Noto Sans"', '"PingFang SC"', '"Microsoft YaHei"', 'sans-serif'],
47
+ sans: ['-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', '"Helvetica Neue"', 'Arial', '"Noto Sans"', '"PingFang SC"', '"Microsoft YaHei"', 'sans-serif'],
48
+ mono: ["ui-monospace", "SFMono-Regular", "Menlo", "Consolas", "monospace"],
49
+ },
50
+ maxWidth: {
51
+ "6xl": "72rem",
52
+ },
53
+ },
54
+ },
55
+ plugins: [],
56
+ };
tsconfig.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+ "moduleResolution": "bundler",
9
+ "allowImportingTsExtensions": true,
10
+ "isolatedModules": true,
11
+ "moduleDetection": "force",
12
+ "noEmit": true,
13
+ "jsx": "react-jsx",
14
+ "strict": true,
15
+ "noUnusedLocals": true,
16
+ "noUnusedParameters": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "noUncheckedSideEffectImports": true,
19
+ "baseUrl": ".",
20
+ "paths": {
21
+ "@/*": ["src/*"]
22
+ }
23
+ },
24
+ "include": ["src"]
25
+ }
vite.config.ts ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { resolve } from "node:path";
2
+ import react from "@vitejs/plugin-react";
3
+ import { defineConfig, loadEnv } from "vite";
4
+
5
+ export default defineConfig(({ mode }) => {
6
+ const env = loadEnv(mode, process.cwd(), "");
7
+ const apiProxy = env.VITE_API_PROXY || "http://127.0.0.1:7860";
8
+
9
+ return {
10
+ plugins: [react()],
11
+ resolve: {
12
+ alias: {
13
+ "@": resolve(__dirname, "src"),
14
+ },
15
+ },
16
+ server: {
17
+ host: "0.0.0.0",
18
+ port: 5173,
19
+ proxy: {
20
+ "/api": {
21
+ target: apiProxy,
22
+ changeOrigin: true,
23
+ },
24
+ "/health": {
25
+ target: apiProxy,
26
+ changeOrigin: true,
27
+ },
28
+ },
29
+ },
30
+ };
31
+ });