@industry-theme/github-panels 0.1.40 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/GitHubProjectCard.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/shared/GitHubRepositoryCard.d.ts +46 -0
- package/dist/components/shared/GitHubRepositoryCard.d.ts.map +1 -0
- package/dist/components/shared/RepositoryAvatar.d.ts +24 -0
- package/dist/components/shared/RepositoryAvatar.d.ts.map +1 -0
- package/dist/components/shared/index.d.ts +5 -0
- package/dist/components/shared/index.d.ts.map +1 -0
- package/dist/panels/GitHubIssueDetailPanel.d.ts +3 -4
- package/dist/panels/GitHubIssueDetailPanel.d.ts.map +1 -1
- package/dist/panels/GitHubSearchPanel.d.ts +9 -2
- package/dist/panels/GitHubSearchPanel.d.ts.map +1 -1
- package/dist/panels.bundle.js +908 -634
- package/dist/panels.bundle.js.map +1 -1
- package/dist/types/github.d.ts +72 -2
- package/dist/types/github.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/panels.bundle.js
CHANGED
|
@@ -130,18 +130,7 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
132
|
*/
|
|
133
|
-
const __iconNode$
|
|
134
|
-
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
135
|
-
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
136
|
-
];
|
|
137
|
-
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$u);
|
|
138
|
-
/**
|
|
139
|
-
* @license lucide-react v0.552.0 - ISC
|
|
140
|
-
*
|
|
141
|
-
* This source code is licensed under the ISC license.
|
|
142
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/
|
|
144
|
-
const __iconNode$t = [
|
|
133
|
+
const __iconNode$w = [
|
|
145
134
|
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
146
135
|
[
|
|
147
136
|
"path",
|
|
@@ -151,14 +140,14 @@ const __iconNode$t = [
|
|
|
151
140
|
}
|
|
152
141
|
]
|
|
153
142
|
];
|
|
154
|
-
const BookOpen = createLucideIcon("book-open", __iconNode$
|
|
143
|
+
const BookOpen = createLucideIcon("book-open", __iconNode$w);
|
|
155
144
|
/**
|
|
156
145
|
* @license lucide-react v0.552.0 - ISC
|
|
157
146
|
*
|
|
158
147
|
* This source code is licensed under the ISC license.
|
|
159
148
|
* See the LICENSE file in the root directory of this source tree.
|
|
160
149
|
*/
|
|
161
|
-
const __iconNode$
|
|
150
|
+
const __iconNode$v = [
|
|
162
151
|
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
163
152
|
["path", { d: "M10 8h4", key: "1sr2af" }],
|
|
164
153
|
["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
|
|
@@ -171,74 +160,86 @@ const __iconNode$s = [
|
|
|
171
160
|
],
|
|
172
161
|
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
173
162
|
];
|
|
174
|
-
const Building2 = createLucideIcon("building-2", __iconNode$
|
|
163
|
+
const Building2 = createLucideIcon("building-2", __iconNode$v);
|
|
175
164
|
/**
|
|
176
165
|
* @license lucide-react v0.552.0 - ISC
|
|
177
166
|
*
|
|
178
167
|
* This source code is licensed under the ISC license.
|
|
179
168
|
* See the LICENSE file in the root directory of this source tree.
|
|
180
169
|
*/
|
|
181
|
-
const __iconNode$
|
|
170
|
+
const __iconNode$u = [
|
|
182
171
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
183
172
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
184
173
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
185
174
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
186
175
|
];
|
|
187
|
-
const Calendar = createLucideIcon("calendar", __iconNode$
|
|
176
|
+
const Calendar = createLucideIcon("calendar", __iconNode$u);
|
|
188
177
|
/**
|
|
189
178
|
* @license lucide-react v0.552.0 - ISC
|
|
190
179
|
*
|
|
191
180
|
* This source code is licensed under the ISC license.
|
|
192
181
|
* See the LICENSE file in the root directory of this source tree.
|
|
193
182
|
*/
|
|
194
|
-
const __iconNode$
|
|
195
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
183
|
+
const __iconNode$t = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
184
|
+
const Check = createLucideIcon("check", __iconNode$t);
|
|
196
185
|
/**
|
|
197
186
|
* @license lucide-react v0.552.0 - ISC
|
|
198
187
|
*
|
|
199
188
|
* This source code is licensed under the ISC license.
|
|
200
189
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
190
|
*/
|
|
202
|
-
const __iconNode$
|
|
203
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
191
|
+
const __iconNode$s = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
192
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$s);
|
|
204
193
|
/**
|
|
205
194
|
* @license lucide-react v0.552.0 - ISC
|
|
206
195
|
*
|
|
207
196
|
* This source code is licensed under the ISC license.
|
|
208
197
|
* See the LICENSE file in the root directory of this source tree.
|
|
209
198
|
*/
|
|
210
|
-
const __iconNode$
|
|
211
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
199
|
+
const __iconNode$r = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
200
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$r);
|
|
212
201
|
/**
|
|
213
202
|
* @license lucide-react v0.552.0 - ISC
|
|
214
203
|
*
|
|
215
204
|
* This source code is licensed under the ISC license.
|
|
216
205
|
* See the LICENSE file in the root directory of this source tree.
|
|
217
206
|
*/
|
|
218
|
-
const __iconNode$
|
|
207
|
+
const __iconNode$q = [
|
|
219
208
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
220
209
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
221
210
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
222
211
|
];
|
|
223
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
212
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$q);
|
|
224
213
|
/**
|
|
225
214
|
* @license lucide-react v0.552.0 - ISC
|
|
226
215
|
*
|
|
227
216
|
* This source code is licensed under the ISC license.
|
|
228
217
|
* See the LICENSE file in the root directory of this source tree.
|
|
229
218
|
*/
|
|
230
|
-
const __iconNode$
|
|
219
|
+
const __iconNode$p = [
|
|
231
220
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
232
221
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
233
222
|
];
|
|
234
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
223
|
+
const Copy = createLucideIcon("copy", __iconNode$p);
|
|
235
224
|
/**
|
|
236
225
|
* @license lucide-react v0.552.0 - ISC
|
|
237
226
|
*
|
|
238
227
|
* This source code is licensed under the ISC license.
|
|
239
228
|
* See the LICENSE file in the root directory of this source tree.
|
|
240
229
|
*/
|
|
241
|
-
const __iconNode$
|
|
230
|
+
const __iconNode$o = [
|
|
231
|
+
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
232
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
233
|
+
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
234
|
+
];
|
|
235
|
+
const Download = createLucideIcon("download", __iconNode$o);
|
|
236
|
+
/**
|
|
237
|
+
* @license lucide-react v0.552.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/
|
|
242
|
+
const __iconNode$n = [
|
|
242
243
|
["path", { d: "m15 15 6 6", key: "1s409w" }],
|
|
243
244
|
["path", { d: "m15 9 6-6", key: "ko1vev" }],
|
|
244
245
|
["path", { d: "M21 16v5h-5", key: "1ck2sf" }],
|
|
@@ -248,26 +249,26 @@ const __iconNode$l = [
|
|
|
248
249
|
["path", { d: "M3 8V3h5", key: "1ln10m" }],
|
|
249
250
|
["path", { d: "M9 9 3 3", key: "v551iv" }]
|
|
250
251
|
];
|
|
251
|
-
const Expand = createLucideIcon("expand", __iconNode$
|
|
252
|
+
const Expand = createLucideIcon("expand", __iconNode$n);
|
|
252
253
|
/**
|
|
253
254
|
* @license lucide-react v0.552.0 - ISC
|
|
254
255
|
*
|
|
255
256
|
* This source code is licensed under the ISC license.
|
|
256
257
|
* See the LICENSE file in the root directory of this source tree.
|
|
257
258
|
*/
|
|
258
|
-
const __iconNode$
|
|
259
|
+
const __iconNode$m = [
|
|
259
260
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
260
261
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
261
262
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
262
263
|
];
|
|
263
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
264
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$m);
|
|
264
265
|
/**
|
|
265
266
|
* @license lucide-react v0.552.0 - ISC
|
|
266
267
|
*
|
|
267
268
|
* This source code is licensed under the ISC license.
|
|
268
269
|
* See the LICENSE file in the root directory of this source tree.
|
|
269
270
|
*/
|
|
270
|
-
const __iconNode$
|
|
271
|
+
const __iconNode$l = [
|
|
271
272
|
[
|
|
272
273
|
"path",
|
|
273
274
|
{
|
|
@@ -280,7 +281,41 @@ const __iconNode$j = [
|
|
|
280
281
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
281
282
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
282
283
|
];
|
|
283
|
-
const FileText = createLucideIcon("file-text", __iconNode$
|
|
284
|
+
const FileText = createLucideIcon("file-text", __iconNode$l);
|
|
285
|
+
/**
|
|
286
|
+
* @license lucide-react v0.552.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/
|
|
291
|
+
const __iconNode$k = [
|
|
292
|
+
[
|
|
293
|
+
"path",
|
|
294
|
+
{
|
|
295
|
+
d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
|
|
296
|
+
key: "usdka0"
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
];
|
|
300
|
+
const FolderOpen = createLucideIcon("folder-open", __iconNode$k);
|
|
301
|
+
/**
|
|
302
|
+
* @license lucide-react v0.552.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/
|
|
307
|
+
const __iconNode$j = [
|
|
308
|
+
["path", { d: "M12 10v6", key: "1bos4e" }],
|
|
309
|
+
["path", { d: "M9 13h6", key: "1uhe8q" }],
|
|
310
|
+
[
|
|
311
|
+
"path",
|
|
312
|
+
{
|
|
313
|
+
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
|
|
314
|
+
key: "1kt360"
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
];
|
|
318
|
+
const FolderPlus = createLucideIcon("folder-plus", __iconNode$j);
|
|
284
319
|
/**
|
|
285
320
|
* @license lucide-react v0.552.0 - ISC
|
|
286
321
|
*
|
|
@@ -533,7 +568,7 @@ const __iconNode = [
|
|
|
533
568
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
534
569
|
];
|
|
535
570
|
const X = createLucideIcon("x", __iconNode);
|
|
536
|
-
function getLanguageColor(language2) {
|
|
571
|
+
function getLanguageColor$1(language2) {
|
|
537
572
|
const colors = {
|
|
538
573
|
TypeScript: "#3178c6",
|
|
539
574
|
JavaScript: "#f7df1e",
|
|
@@ -688,7 +723,7 @@ const GitHubProjectCard = ({
|
|
|
688
723
|
width: "8px",
|
|
689
724
|
height: "8px",
|
|
690
725
|
borderRadius: "50%",
|
|
691
|
-
backgroundColor: getLanguageColor(repository.language)
|
|
726
|
+
backgroundColor: getLanguageColor$1(repository.language)
|
|
692
727
|
}
|
|
693
728
|
}
|
|
694
729
|
),
|
|
@@ -704,7 +739,7 @@ const GitHubProjectCard = ({
|
|
|
704
739
|
] }),
|
|
705
740
|
repository.license && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
706
741
|
/* @__PURE__ */ jsx(Scale, { size: 12 }),
|
|
707
|
-
/* @__PURE__ */ jsx("span", { children: repository.license })
|
|
742
|
+
/* @__PURE__ */ jsx("span", { children: typeof repository.license === "string" ? repository.license : repository.license.spdx_id || repository.license.name })
|
|
708
743
|
] })
|
|
709
744
|
]
|
|
710
745
|
}
|
|
@@ -1243,7 +1278,439 @@ const GitHubProjectsPanelMetadata = {
|
|
|
1243
1278
|
slices: ["github-repositories"],
|
|
1244
1279
|
surfaces: ["sidebar", "panel"]
|
|
1245
1280
|
};
|
|
1246
|
-
const
|
|
1281
|
+
const RepositoryAvatar = ({
|
|
1282
|
+
owner,
|
|
1283
|
+
customAvatarUrl,
|
|
1284
|
+
size = 32,
|
|
1285
|
+
fallbackIcon
|
|
1286
|
+
}) => {
|
|
1287
|
+
const { theme: theme2 } = useTheme();
|
|
1288
|
+
const borderRadius = `${Math.min(8, size / 4)}px`;
|
|
1289
|
+
const avatarUrl = customAvatarUrl || (owner ? `https://github.com/${owner}.png` : null);
|
|
1290
|
+
const getContent2 = () => {
|
|
1291
|
+
if (avatarUrl) {
|
|
1292
|
+
return /* @__PURE__ */ jsx(
|
|
1293
|
+
"img",
|
|
1294
|
+
{
|
|
1295
|
+
src: avatarUrl,
|
|
1296
|
+
alt: owner || "Repository",
|
|
1297
|
+
style: {
|
|
1298
|
+
width: "100%",
|
|
1299
|
+
height: "100%",
|
|
1300
|
+
objectFit: "cover"
|
|
1301
|
+
},
|
|
1302
|
+
onError: (e) => {
|
|
1303
|
+
e.currentTarget.style.display = "none";
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
);
|
|
1307
|
+
}
|
|
1308
|
+
if (fallbackIcon) {
|
|
1309
|
+
return fallbackIcon;
|
|
1310
|
+
}
|
|
1311
|
+
return null;
|
|
1312
|
+
};
|
|
1313
|
+
return /* @__PURE__ */ jsx(
|
|
1314
|
+
"div",
|
|
1315
|
+
{
|
|
1316
|
+
style: {
|
|
1317
|
+
width: `${size}px`,
|
|
1318
|
+
height: `${size}px`,
|
|
1319
|
+
borderRadius,
|
|
1320
|
+
backgroundColor: theme2.colors.backgroundTertiary,
|
|
1321
|
+
display: "flex",
|
|
1322
|
+
alignItems: "center",
|
|
1323
|
+
justifyContent: "center",
|
|
1324
|
+
overflow: "hidden",
|
|
1325
|
+
flexShrink: 0
|
|
1326
|
+
},
|
|
1327
|
+
children: getContent2()
|
|
1328
|
+
}
|
|
1329
|
+
);
|
|
1330
|
+
};
|
|
1331
|
+
const GitHubRepositoryCard = ({
|
|
1332
|
+
repository,
|
|
1333
|
+
localRepo,
|
|
1334
|
+
onClone,
|
|
1335
|
+
onOpen,
|
|
1336
|
+
isLoading = false,
|
|
1337
|
+
isSelected = false,
|
|
1338
|
+
onSelect,
|
|
1339
|
+
onAddToCollection,
|
|
1340
|
+
isInCollection = false,
|
|
1341
|
+
collectionName
|
|
1342
|
+
}) => {
|
|
1343
|
+
const { theme: theme2 } = useTheme();
|
|
1344
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
1345
|
+
const isCloned = Boolean(localRepo);
|
|
1346
|
+
const handleClone = useCallback(
|
|
1347
|
+
(e) => {
|
|
1348
|
+
e.stopPropagation();
|
|
1349
|
+
if (onClone && !isLoading) {
|
|
1350
|
+
onClone(repository);
|
|
1351
|
+
}
|
|
1352
|
+
},
|
|
1353
|
+
[onClone, repository, isLoading]
|
|
1354
|
+
);
|
|
1355
|
+
const handleOpen = useCallback(
|
|
1356
|
+
(e) => {
|
|
1357
|
+
e.stopPropagation();
|
|
1358
|
+
if (onOpen && localRepo && !isLoading) {
|
|
1359
|
+
onOpen(localRepo.path);
|
|
1360
|
+
}
|
|
1361
|
+
},
|
|
1362
|
+
[onOpen, localRepo, isLoading]
|
|
1363
|
+
);
|
|
1364
|
+
const handleClick = useCallback(() => {
|
|
1365
|
+
if (onSelect) {
|
|
1366
|
+
onSelect(repository);
|
|
1367
|
+
}
|
|
1368
|
+
}, [onSelect, repository]);
|
|
1369
|
+
const handleOpenOnGitHub = useCallback(
|
|
1370
|
+
(e) => {
|
|
1371
|
+
e.stopPropagation();
|
|
1372
|
+
window.open(repository.html_url, "_blank", "noopener,noreferrer");
|
|
1373
|
+
},
|
|
1374
|
+
[repository.html_url]
|
|
1375
|
+
);
|
|
1376
|
+
const handleAddToCollection = useCallback(
|
|
1377
|
+
(e) => {
|
|
1378
|
+
e.stopPropagation();
|
|
1379
|
+
if (onAddToCollection && !isLoading && !isInCollection) {
|
|
1380
|
+
onAddToCollection(repository);
|
|
1381
|
+
}
|
|
1382
|
+
},
|
|
1383
|
+
[onAddToCollection, repository, isLoading, isInCollection]
|
|
1384
|
+
);
|
|
1385
|
+
const getRelativeTime = (dateString) => {
|
|
1386
|
+
const date = new Date(dateString);
|
|
1387
|
+
const now = /* @__PURE__ */ new Date();
|
|
1388
|
+
const diffMs = now.getTime() - date.getTime();
|
|
1389
|
+
const diffDays = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
|
|
1390
|
+
if (diffDays === 0) return "today";
|
|
1391
|
+
if (diffDays === 1) return "yesterday";
|
|
1392
|
+
if (diffDays < 7) return `${diffDays} days ago`;
|
|
1393
|
+
if (diffDays < 30) return `${Math.floor(diffDays / 7)} weeks ago`;
|
|
1394
|
+
if (diffDays < 365) return `${Math.floor(diffDays / 30)} months ago`;
|
|
1395
|
+
return `${Math.floor(diffDays / 365)} years ago`;
|
|
1396
|
+
};
|
|
1397
|
+
return /* @__PURE__ */ jsxs(
|
|
1398
|
+
"div",
|
|
1399
|
+
{
|
|
1400
|
+
onClick: handleClick,
|
|
1401
|
+
onMouseEnter: () => setIsHovered(true),
|
|
1402
|
+
onMouseLeave: () => setIsHovered(false),
|
|
1403
|
+
style: {
|
|
1404
|
+
display: "flex",
|
|
1405
|
+
alignItems: "flex-start",
|
|
1406
|
+
gap: "12px",
|
|
1407
|
+
padding: "12px",
|
|
1408
|
+
borderRadius: "8px",
|
|
1409
|
+
backgroundColor: isSelected ? `${theme2.colors.primary}15` : isHovered ? theme2.colors.backgroundTertiary : "transparent",
|
|
1410
|
+
border: `1px solid ${isSelected ? theme2.colors.primary : "transparent"}`,
|
|
1411
|
+
cursor: onSelect ? "pointer" : "default",
|
|
1412
|
+
transition: "background-color 0.15s, border-color 0.15s"
|
|
1413
|
+
},
|
|
1414
|
+
children: [
|
|
1415
|
+
/* @__PURE__ */ jsx(
|
|
1416
|
+
RepositoryAvatar,
|
|
1417
|
+
{
|
|
1418
|
+
owner: repository.owner.login,
|
|
1419
|
+
customAvatarUrl: repository.owner.avatar_url,
|
|
1420
|
+
size: 40
|
|
1421
|
+
}
|
|
1422
|
+
),
|
|
1423
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1424
|
+
/* @__PURE__ */ jsxs(
|
|
1425
|
+
"div",
|
|
1426
|
+
{
|
|
1427
|
+
style: {
|
|
1428
|
+
display: "flex",
|
|
1429
|
+
alignItems: "center",
|
|
1430
|
+
gap: "8px",
|
|
1431
|
+
marginBottom: "4px"
|
|
1432
|
+
},
|
|
1433
|
+
children: [
|
|
1434
|
+
/* @__PURE__ */ jsx(
|
|
1435
|
+
"span",
|
|
1436
|
+
{
|
|
1437
|
+
style: {
|
|
1438
|
+
fontSize: `${theme2.fontSizes[2]}px`,
|
|
1439
|
+
fontWeight: theme2.fontWeights.semibold,
|
|
1440
|
+
fontFamily: theme2.fonts.body,
|
|
1441
|
+
color: isCloned ? "#10b981" : theme2.colors.text,
|
|
1442
|
+
overflow: "hidden",
|
|
1443
|
+
textOverflow: "ellipsis",
|
|
1444
|
+
whiteSpace: "nowrap"
|
|
1445
|
+
},
|
|
1446
|
+
title: repository.full_name,
|
|
1447
|
+
children: repository.name
|
|
1448
|
+
}
|
|
1449
|
+
),
|
|
1450
|
+
repository.private && /* @__PURE__ */ jsx("span", { title: "Private repository", children: /* @__PURE__ */ jsx(
|
|
1451
|
+
Lock,
|
|
1452
|
+
{
|
|
1453
|
+
size: 12,
|
|
1454
|
+
style: { color: theme2.colors.textSecondary, flexShrink: 0 }
|
|
1455
|
+
}
|
|
1456
|
+
) }),
|
|
1457
|
+
repository.fork && /* @__PURE__ */ jsx("span", { title: "Forked repository", children: /* @__PURE__ */ jsx(
|
|
1458
|
+
GitFork,
|
|
1459
|
+
{
|
|
1460
|
+
size: 12,
|
|
1461
|
+
style: { color: theme2.colors.textSecondary, flexShrink: 0 }
|
|
1462
|
+
}
|
|
1463
|
+
) })
|
|
1464
|
+
]
|
|
1465
|
+
}
|
|
1466
|
+
),
|
|
1467
|
+
/* @__PURE__ */ jsx(
|
|
1468
|
+
"div",
|
|
1469
|
+
{
|
|
1470
|
+
style: {
|
|
1471
|
+
fontSize: `${theme2.fontSizes[0]}px`,
|
|
1472
|
+
fontFamily: theme2.fonts.body,
|
|
1473
|
+
color: theme2.colors.textSecondary,
|
|
1474
|
+
marginBottom: "4px"
|
|
1475
|
+
},
|
|
1476
|
+
children: repository.owner.login
|
|
1477
|
+
}
|
|
1478
|
+
),
|
|
1479
|
+
repository.description && /* @__PURE__ */ jsx(
|
|
1480
|
+
"div",
|
|
1481
|
+
{
|
|
1482
|
+
style: {
|
|
1483
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1484
|
+
fontFamily: theme2.fonts.body,
|
|
1485
|
+
color: theme2.colors.textSecondary,
|
|
1486
|
+
lineHeight: theme2.lineHeights.body,
|
|
1487
|
+
overflow: "hidden",
|
|
1488
|
+
textOverflow: "ellipsis",
|
|
1489
|
+
display: "-webkit-box",
|
|
1490
|
+
WebkitLineClamp: 2,
|
|
1491
|
+
WebkitBoxOrient: "vertical",
|
|
1492
|
+
marginBottom: "8px"
|
|
1493
|
+
},
|
|
1494
|
+
children: repository.description
|
|
1495
|
+
}
|
|
1496
|
+
),
|
|
1497
|
+
/* @__PURE__ */ jsxs(
|
|
1498
|
+
"div",
|
|
1499
|
+
{
|
|
1500
|
+
style: {
|
|
1501
|
+
display: "flex",
|
|
1502
|
+
alignItems: "center",
|
|
1503
|
+
gap: "12px",
|
|
1504
|
+
fontSize: `${theme2.fontSizes[0]}px`,
|
|
1505
|
+
fontFamily: theme2.fonts.body,
|
|
1506
|
+
color: theme2.colors.textSecondary
|
|
1507
|
+
},
|
|
1508
|
+
children: [
|
|
1509
|
+
repository.language && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1510
|
+
/* @__PURE__ */ jsx(
|
|
1511
|
+
"span",
|
|
1512
|
+
{
|
|
1513
|
+
style: {
|
|
1514
|
+
width: "8px",
|
|
1515
|
+
height: "8px",
|
|
1516
|
+
borderRadius: "50%",
|
|
1517
|
+
backgroundColor: getLanguageColor(repository.language)
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
),
|
|
1521
|
+
repository.language
|
|
1522
|
+
] }),
|
|
1523
|
+
repository.stargazers_count !== void 0 && repository.stargazers_count > 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1524
|
+
/* @__PURE__ */ jsx(Star, { size: 12 }),
|
|
1525
|
+
formatNumber(repository.stargazers_count)
|
|
1526
|
+
] }),
|
|
1527
|
+
repository.license && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1528
|
+
/* @__PURE__ */ jsx(Scale, { size: 12 }),
|
|
1529
|
+
typeof repository.license === "string" ? repository.license : repository.license.spdx_id || repository.license.name
|
|
1530
|
+
] }),
|
|
1531
|
+
(repository.pushed_at || repository.updated_at) && /* @__PURE__ */ jsxs("span", { children: [
|
|
1532
|
+
"Updated ",
|
|
1533
|
+
getRelativeTime(repository.pushed_at || repository.updated_at)
|
|
1534
|
+
] })
|
|
1535
|
+
]
|
|
1536
|
+
}
|
|
1537
|
+
)
|
|
1538
|
+
] }),
|
|
1539
|
+
/* @__PURE__ */ jsxs(
|
|
1540
|
+
"div",
|
|
1541
|
+
{
|
|
1542
|
+
style: {
|
|
1543
|
+
display: "flex",
|
|
1544
|
+
alignItems: "center",
|
|
1545
|
+
gap: "8px",
|
|
1546
|
+
flexShrink: 0
|
|
1547
|
+
},
|
|
1548
|
+
children: [
|
|
1549
|
+
/* @__PURE__ */ jsx(
|
|
1550
|
+
"button",
|
|
1551
|
+
{
|
|
1552
|
+
type: "button",
|
|
1553
|
+
onClick: handleOpenOnGitHub,
|
|
1554
|
+
style: {
|
|
1555
|
+
display: "flex",
|
|
1556
|
+
alignItems: "center",
|
|
1557
|
+
justifyContent: "center",
|
|
1558
|
+
width: "32px",
|
|
1559
|
+
height: "32px",
|
|
1560
|
+
borderRadius: "6px",
|
|
1561
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
1562
|
+
backgroundColor: "transparent",
|
|
1563
|
+
color: theme2.colors.textSecondary,
|
|
1564
|
+
cursor: "pointer",
|
|
1565
|
+
transition: "background-color 0.15s, color 0.15s"
|
|
1566
|
+
},
|
|
1567
|
+
title: "Open on GitHub",
|
|
1568
|
+
onMouseEnter: (e) => {
|
|
1569
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundTertiary;
|
|
1570
|
+
e.currentTarget.style.color = theme2.colors.text;
|
|
1571
|
+
},
|
|
1572
|
+
onMouseLeave: (e) => {
|
|
1573
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
1574
|
+
e.currentTarget.style.color = theme2.colors.textSecondary;
|
|
1575
|
+
},
|
|
1576
|
+
children: /* @__PURE__ */ jsx(ExternalLink, { size: 16 })
|
|
1577
|
+
}
|
|
1578
|
+
),
|
|
1579
|
+
onAddToCollection && /* @__PURE__ */ jsxs(
|
|
1580
|
+
"button",
|
|
1581
|
+
{
|
|
1582
|
+
type: "button",
|
|
1583
|
+
onClick: handleAddToCollection,
|
|
1584
|
+
disabled: isLoading || isInCollection,
|
|
1585
|
+
style: {
|
|
1586
|
+
display: "flex",
|
|
1587
|
+
alignItems: "center",
|
|
1588
|
+
gap: "6px",
|
|
1589
|
+
padding: "6px 12px",
|
|
1590
|
+
borderRadius: "6px",
|
|
1591
|
+
border: "none",
|
|
1592
|
+
backgroundColor: isInCollection ? "#10b981" : theme2.colors.secondary,
|
|
1593
|
+
color: isInCollection ? "#ffffff" : theme2.colors.text,
|
|
1594
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1595
|
+
fontWeight: theme2.fontWeights.medium,
|
|
1596
|
+
fontFamily: theme2.fonts.body,
|
|
1597
|
+
cursor: isLoading || isInCollection ? "not-allowed" : "pointer",
|
|
1598
|
+
opacity: isLoading ? 0.6 : 1,
|
|
1599
|
+
transition: "opacity 0.15s, background-color 0.15s"
|
|
1600
|
+
},
|
|
1601
|
+
title: isInCollection ? `Already in ${collectionName || "collection"}` : `Add to ${collectionName || "collection"}`,
|
|
1602
|
+
children: [
|
|
1603
|
+
isInCollection ? /* @__PURE__ */ jsx(Check, { size: 14 }) : /* @__PURE__ */ jsx(FolderPlus, { size: 14 }),
|
|
1604
|
+
isInCollection ? "Added" : "Add"
|
|
1605
|
+
]
|
|
1606
|
+
}
|
|
1607
|
+
),
|
|
1608
|
+
isCloned && onOpen && /* @__PURE__ */ jsxs(
|
|
1609
|
+
"button",
|
|
1610
|
+
{
|
|
1611
|
+
type: "button",
|
|
1612
|
+
onClick: handleOpen,
|
|
1613
|
+
disabled: isLoading,
|
|
1614
|
+
style: {
|
|
1615
|
+
display: "flex",
|
|
1616
|
+
alignItems: "center",
|
|
1617
|
+
gap: "6px",
|
|
1618
|
+
padding: "6px 12px",
|
|
1619
|
+
borderRadius: "6px",
|
|
1620
|
+
border: "none",
|
|
1621
|
+
backgroundColor: "#10b981",
|
|
1622
|
+
color: "#ffffff",
|
|
1623
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1624
|
+
fontWeight: theme2.fontWeights.medium,
|
|
1625
|
+
fontFamily: theme2.fonts.body,
|
|
1626
|
+
cursor: isLoading ? "not-allowed" : "pointer",
|
|
1627
|
+
opacity: isLoading ? 0.6 : 1,
|
|
1628
|
+
transition: "opacity 0.15s"
|
|
1629
|
+
},
|
|
1630
|
+
title: "Open in workspace",
|
|
1631
|
+
children: [
|
|
1632
|
+
/* @__PURE__ */ jsx(FolderOpen, { size: 14 }),
|
|
1633
|
+
"Open"
|
|
1634
|
+
]
|
|
1635
|
+
}
|
|
1636
|
+
),
|
|
1637
|
+
!isCloned && onClone && /* @__PURE__ */ jsxs(
|
|
1638
|
+
"button",
|
|
1639
|
+
{
|
|
1640
|
+
type: "button",
|
|
1641
|
+
onClick: handleClone,
|
|
1642
|
+
disabled: isLoading,
|
|
1643
|
+
style: {
|
|
1644
|
+
display: "flex",
|
|
1645
|
+
alignItems: "center",
|
|
1646
|
+
gap: "6px",
|
|
1647
|
+
padding: "6px 12px",
|
|
1648
|
+
borderRadius: "6px",
|
|
1649
|
+
border: "none",
|
|
1650
|
+
backgroundColor: theme2.colors.primary,
|
|
1651
|
+
color: theme2.colors.background,
|
|
1652
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1653
|
+
fontWeight: theme2.fontWeights.medium,
|
|
1654
|
+
fontFamily: theme2.fonts.body,
|
|
1655
|
+
cursor: isLoading ? "not-allowed" : "pointer",
|
|
1656
|
+
opacity: isLoading ? 0.6 : 1,
|
|
1657
|
+
transition: "opacity 0.15s"
|
|
1658
|
+
},
|
|
1659
|
+
title: "Clone repository",
|
|
1660
|
+
children: [
|
|
1661
|
+
/* @__PURE__ */ jsx(Download, { size: 14 }),
|
|
1662
|
+
"Clone"
|
|
1663
|
+
]
|
|
1664
|
+
}
|
|
1665
|
+
)
|
|
1666
|
+
]
|
|
1667
|
+
}
|
|
1668
|
+
)
|
|
1669
|
+
]
|
|
1670
|
+
}
|
|
1671
|
+
);
|
|
1672
|
+
};
|
|
1673
|
+
function getLanguageColor(language2) {
|
|
1674
|
+
const colors = {
|
|
1675
|
+
TypeScript: "#3178c6",
|
|
1676
|
+
JavaScript: "#f7df1e",
|
|
1677
|
+
Python: "#3572A5",
|
|
1678
|
+
Rust: "#dea584",
|
|
1679
|
+
Go: "#00ADD8",
|
|
1680
|
+
Java: "#b07219",
|
|
1681
|
+
Ruby: "#701516",
|
|
1682
|
+
PHP: "#4F5D95",
|
|
1683
|
+
"C++": "#f34b7d",
|
|
1684
|
+
C: "#555555",
|
|
1685
|
+
"C#": "#178600",
|
|
1686
|
+
Swift: "#F05138",
|
|
1687
|
+
Kotlin: "#A97BFF",
|
|
1688
|
+
Shell: "#89e051",
|
|
1689
|
+
HTML: "#e34c26",
|
|
1690
|
+
CSS: "#563d7c",
|
|
1691
|
+
Vue: "#41b883",
|
|
1692
|
+
Svelte: "#ff3e00"
|
|
1693
|
+
};
|
|
1694
|
+
return colors[language2] || "#8b949e";
|
|
1695
|
+
}
|
|
1696
|
+
function formatNumber(num) {
|
|
1697
|
+
if (num >= 1e6) {
|
|
1698
|
+
return `${(num / 1e6).toFixed(1)}M`;
|
|
1699
|
+
}
|
|
1700
|
+
if (num >= 1e3) {
|
|
1701
|
+
return `${(num / 1e3).toFixed(1)}K`;
|
|
1702
|
+
}
|
|
1703
|
+
return num.toString();
|
|
1704
|
+
}
|
|
1705
|
+
const PANEL_ID = "github-search-panel";
|
|
1706
|
+
const createPanelEvent = (type, payload) => ({
|
|
1707
|
+
type,
|
|
1708
|
+
source: PANEL_ID,
|
|
1709
|
+
timestamp: Date.now(),
|
|
1710
|
+
payload
|
|
1711
|
+
});
|
|
1712
|
+
const GitHubSearchPanelContent = ({ context, actions, events }) => {
|
|
1713
|
+
var _a, _b;
|
|
1247
1714
|
const { theme: theme2 } = useTheme();
|
|
1248
1715
|
const [searchQuery, setSearchQuery] = useState("");
|
|
1249
1716
|
const [results, setResults] = useState([]);
|
|
@@ -1253,10 +1720,28 @@ const GitHubSearchPanelContent = ({ events }) => {
|
|
|
1253
1720
|
const [selectedRepoId, setSelectedRepoId] = useState(null);
|
|
1254
1721
|
const searchTimeoutRef = useRef(null);
|
|
1255
1722
|
const inputRef = useRef(null);
|
|
1723
|
+
const workspaceSlice = context.getSlice("workspace");
|
|
1724
|
+
const workspaceReposSlice = context.getSlice("workspaceRepositories");
|
|
1725
|
+
const currentWorkspace = (_a = workspaceSlice == null ? void 0 : workspaceSlice.data) == null ? void 0 : _a.workspace;
|
|
1726
|
+
const collectionName = currentWorkspace == null ? void 0 : currentWorkspace.name;
|
|
1727
|
+
const collectionRepos = useMemo(
|
|
1728
|
+
() => {
|
|
1729
|
+
var _a2;
|
|
1730
|
+
return ((_a2 = workspaceReposSlice == null ? void 0 : workspaceReposSlice.data) == null ? void 0 : _a2.repositories) || [];
|
|
1731
|
+
},
|
|
1732
|
+
[(_b = workspaceReposSlice == null ? void 0 : workspaceReposSlice.data) == null ? void 0 : _b.repositories]
|
|
1733
|
+
);
|
|
1734
|
+
const collectionRepoSet = useMemo(() => {
|
|
1735
|
+
return new Set(collectionRepos.map((r2) => r2.full_name));
|
|
1736
|
+
}, [collectionRepos]);
|
|
1737
|
+
const panelActions = actions;
|
|
1738
|
+
const searchAvailable = Boolean(panelActions.searchRepositories);
|
|
1256
1739
|
useEffect(() => {
|
|
1257
|
-
var
|
|
1258
|
-
(
|
|
1259
|
-
|
|
1740
|
+
var _a2;
|
|
1741
|
+
if (searchAvailable) {
|
|
1742
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
1743
|
+
}
|
|
1744
|
+
}, [searchAvailable]);
|
|
1260
1745
|
const performSearch = useCallback(async (query) => {
|
|
1261
1746
|
if (!query.trim()) {
|
|
1262
1747
|
setResults([]);
|
|
@@ -1264,17 +1749,14 @@ const GitHubSearchPanelContent = ({ events }) => {
|
|
|
1264
1749
|
setError(null);
|
|
1265
1750
|
return;
|
|
1266
1751
|
}
|
|
1752
|
+
if (!panelActions.searchRepositories) {
|
|
1753
|
+
setError("Search is not available");
|
|
1754
|
+
return;
|
|
1755
|
+
}
|
|
1267
1756
|
setIsLoading(true);
|
|
1268
1757
|
setError(null);
|
|
1269
1758
|
try {
|
|
1270
|
-
const
|
|
1271
|
-
`/api/github/search?q=${encodeURIComponent(query)}&per_page=30`
|
|
1272
|
-
);
|
|
1273
|
-
if (!response.ok) {
|
|
1274
|
-
const errorData = await response.json().catch(() => ({}));
|
|
1275
|
-
throw new Error(errorData.error || "Search failed");
|
|
1276
|
-
}
|
|
1277
|
-
const data = await response.json();
|
|
1759
|
+
const data = await panelActions.searchRepositories(query, { perPage: 30 });
|
|
1278
1760
|
setResults(data.items || []);
|
|
1279
1761
|
setTotalCount(data.total_count || 0);
|
|
1280
1762
|
} catch (err) {
|
|
@@ -1284,7 +1766,7 @@ const GitHubSearchPanelContent = ({ events }) => {
|
|
|
1284
1766
|
} finally {
|
|
1285
1767
|
setIsLoading(false);
|
|
1286
1768
|
}
|
|
1287
|
-
}, []);
|
|
1769
|
+
}, [panelActions]);
|
|
1288
1770
|
const handleSearchChange = (e) => {
|
|
1289
1771
|
const query = e.target.value;
|
|
1290
1772
|
setSearchQuery(query);
|
|
@@ -1302,23 +1784,60 @@ const GitHubSearchPanelContent = ({ events }) => {
|
|
|
1302
1784
|
}
|
|
1303
1785
|
performSearch(searchQuery);
|
|
1304
1786
|
};
|
|
1305
|
-
const handleSelectRepository = (repo) => {
|
|
1787
|
+
const handleSelectRepository = useCallback((repo) => {
|
|
1306
1788
|
setSelectedRepoId(repo.id);
|
|
1307
1789
|
events.emit({
|
|
1308
1790
|
type: "repository:preview",
|
|
1309
|
-
source:
|
|
1791
|
+
source: PANEL_ID,
|
|
1310
1792
|
timestamp: Date.now(),
|
|
1311
1793
|
payload: {
|
|
1312
1794
|
repository: repo,
|
|
1313
1795
|
source: "search"
|
|
1314
1796
|
}
|
|
1315
1797
|
});
|
|
1316
|
-
};
|
|
1317
|
-
const
|
|
1798
|
+
}, [events]);
|
|
1799
|
+
const handleAddToCollection = useCallback(
|
|
1800
|
+
async (repo) => {
|
|
1801
|
+
if (panelActions.addToCollection) {
|
|
1802
|
+
await panelActions.addToCollection(repo);
|
|
1803
|
+
events.emit(
|
|
1804
|
+
createPanelEvent(`${PANEL_ID}:repository-added-to-collection`, {
|
|
1805
|
+
repository: repo
|
|
1806
|
+
})
|
|
1807
|
+
);
|
|
1808
|
+
}
|
|
1809
|
+
},
|
|
1810
|
+
[panelActions, events]
|
|
1811
|
+
);
|
|
1812
|
+
const formatNumber2 = (num) => {
|
|
1318
1813
|
if (num >= 1e6) return `${(num / 1e6).toFixed(1)}M`;
|
|
1319
1814
|
if (num >= 1e3) return `${(num / 1e3).toFixed(1)}K`;
|
|
1320
1815
|
return num.toString();
|
|
1321
1816
|
};
|
|
1817
|
+
if (!searchAvailable) {
|
|
1818
|
+
return /* @__PURE__ */ jsxs(
|
|
1819
|
+
"div",
|
|
1820
|
+
{
|
|
1821
|
+
style: {
|
|
1822
|
+
height: "100%",
|
|
1823
|
+
display: "flex",
|
|
1824
|
+
flexDirection: "column",
|
|
1825
|
+
alignItems: "center",
|
|
1826
|
+
justifyContent: "center",
|
|
1827
|
+
backgroundColor: theme2.colors.background,
|
|
1828
|
+
color: theme2.colors.textSecondary,
|
|
1829
|
+
fontFamily: theme2.fonts.body,
|
|
1830
|
+
padding: "32px",
|
|
1831
|
+
textAlign: "center"
|
|
1832
|
+
},
|
|
1833
|
+
children: [
|
|
1834
|
+
/* @__PURE__ */ jsx(CircleAlert, { size: 48, style: { marginBottom: 16, opacity: 0.5 } }),
|
|
1835
|
+
/* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: `${theme2.fontSizes[2]}px` }, children: "Search is not available" }),
|
|
1836
|
+
/* @__PURE__ */ jsx("p", { style: { margin: "8px 0 0", fontSize: `${theme2.fontSizes[1]}px` }, children: "The host application must provide a searchRepositories action" })
|
|
1837
|
+
]
|
|
1838
|
+
}
|
|
1839
|
+
);
|
|
1840
|
+
}
|
|
1322
1841
|
return /* @__PURE__ */ jsxs(
|
|
1323
1842
|
"div",
|
|
1324
1843
|
{
|
|
@@ -1332,89 +1851,110 @@ const GitHubSearchPanelContent = ({ events }) => {
|
|
|
1332
1851
|
},
|
|
1333
1852
|
children: [
|
|
1334
1853
|
/* @__PURE__ */ jsxs(
|
|
1335
|
-
"
|
|
1854
|
+
"form",
|
|
1336
1855
|
{
|
|
1856
|
+
onSubmit: handleSubmit,
|
|
1337
1857
|
style: {
|
|
1338
|
-
|
|
1858
|
+
height: "40px",
|
|
1859
|
+
minHeight: "40px",
|
|
1860
|
+
padding: "0 16px",
|
|
1339
1861
|
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
1340
|
-
display: "flex",
|
|
1341
|
-
alignItems: "center",
|
|
1342
|
-
gap: "12px"
|
|
1343
|
-
},
|
|
1344
|
-
children: [
|
|
1345
|
-
/* @__PURE__ */ jsx(Github, { size: 20, color: theme2.colors.primary }),
|
|
1346
|
-
/* @__PURE__ */ jsx(
|
|
1347
|
-
"h2",
|
|
1348
|
-
{
|
|
1349
|
-
style: {
|
|
1350
|
-
margin: 0,
|
|
1351
|
-
fontSize: `${theme2.fontSizes[3]}px`,
|
|
1352
|
-
fontWeight: theme2.fontWeights.semibold
|
|
1353
|
-
},
|
|
1354
|
-
children: "Search GitHub"
|
|
1355
|
-
}
|
|
1356
|
-
)
|
|
1357
|
-
]
|
|
1358
|
-
}
|
|
1359
|
-
),
|
|
1360
|
-
/* @__PURE__ */ jsx("form", { onSubmit: handleSubmit, style: { padding: "12px 16px" }, children: /* @__PURE__ */ jsxs(
|
|
1361
|
-
"div",
|
|
1362
|
-
{
|
|
1363
|
-
style: {
|
|
1364
1862
|
display: "flex",
|
|
1365
1863
|
alignItems: "center",
|
|
1366
1864
|
gap: "8px",
|
|
1367
|
-
|
|
1368
|
-
borderRadius: "6px",
|
|
1369
|
-
backgroundColor: theme2.colors.backgroundSecondary,
|
|
1370
|
-
border: `1px solid ${theme2.colors.border}`
|
|
1865
|
+
boxSizing: "border-box"
|
|
1371
1866
|
},
|
|
1372
1867
|
children: [
|
|
1373
|
-
/* @__PURE__ */ jsx(
|
|
1374
|
-
/* @__PURE__ */
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
background: "none",
|
|
1386
|
-
outline: "none",
|
|
1387
|
-
fontSize: `${theme2.fontSizes[2]}px`,
|
|
1388
|
-
color: theme2.colors.text
|
|
1868
|
+
/* @__PURE__ */ jsx(Github, { size: 18, color: theme2.colors.primary, style: { flexShrink: 0 } }),
|
|
1869
|
+
/* @__PURE__ */ jsxs("div", { style: { position: "relative", flex: 1, display: "flex", alignItems: "center" }, children: [
|
|
1870
|
+
/* @__PURE__ */ jsx(
|
|
1871
|
+
Search,
|
|
1872
|
+
{
|
|
1873
|
+
size: 16,
|
|
1874
|
+
color: theme2.colors.textSecondary,
|
|
1875
|
+
style: {
|
|
1876
|
+
position: "absolute",
|
|
1877
|
+
left: "10px",
|
|
1878
|
+
pointerEvents: "none"
|
|
1879
|
+
}
|
|
1389
1880
|
}
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1881
|
+
),
|
|
1882
|
+
/* @__PURE__ */ jsx(
|
|
1883
|
+
"input",
|
|
1884
|
+
{
|
|
1885
|
+
ref: inputRef,
|
|
1886
|
+
type: "text",
|
|
1887
|
+
placeholder: "Search GitHub repositories...",
|
|
1888
|
+
value: searchQuery,
|
|
1889
|
+
onChange: handleSearchChange,
|
|
1890
|
+
style: {
|
|
1891
|
+
width: "100%",
|
|
1892
|
+
padding: "6px 32px 6px 32px",
|
|
1893
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1894
|
+
color: theme2.colors.text,
|
|
1895
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
1896
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
1897
|
+
borderRadius: "4px",
|
|
1898
|
+
outline: "none",
|
|
1899
|
+
fontFamily: theme2.fonts.body
|
|
1900
|
+
}
|
|
1402
1901
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1902
|
+
),
|
|
1903
|
+
searchQuery && !isLoading && /* @__PURE__ */ jsx(
|
|
1904
|
+
"button",
|
|
1905
|
+
{
|
|
1906
|
+
type: "button",
|
|
1907
|
+
onClick: () => {
|
|
1908
|
+
var _a2;
|
|
1909
|
+
setSearchQuery("");
|
|
1910
|
+
setResults([]);
|
|
1911
|
+
setTotalCount(0);
|
|
1912
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
1913
|
+
},
|
|
1914
|
+
style: {
|
|
1915
|
+
position: "absolute",
|
|
1916
|
+
right: "8px",
|
|
1917
|
+
background: "none",
|
|
1918
|
+
border: "none",
|
|
1919
|
+
cursor: "pointer",
|
|
1920
|
+
padding: "4px",
|
|
1921
|
+
display: "flex",
|
|
1922
|
+
alignItems: "center",
|
|
1923
|
+
justifyContent: "center",
|
|
1924
|
+
color: theme2.colors.textSecondary
|
|
1925
|
+
},
|
|
1926
|
+
children: /* @__PURE__ */ jsx(X, { size: 16 })
|
|
1927
|
+
}
|
|
1928
|
+
),
|
|
1929
|
+
isLoading && /* @__PURE__ */ jsx(
|
|
1930
|
+
"div",
|
|
1931
|
+
{
|
|
1932
|
+
style: {
|
|
1933
|
+
position: "absolute",
|
|
1934
|
+
right: "10px",
|
|
1935
|
+
width: 14,
|
|
1936
|
+
height: 14,
|
|
1937
|
+
border: `2px solid ${theme2.colors.border}`,
|
|
1938
|
+
borderTopColor: theme2.colors.primary,
|
|
1939
|
+
borderRadius: "50%",
|
|
1940
|
+
animation: "spin 1s linear infinite"
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
)
|
|
1944
|
+
] })
|
|
1405
1945
|
]
|
|
1406
1946
|
}
|
|
1407
|
-
)
|
|
1947
|
+
),
|
|
1408
1948
|
totalCount > 0 && !isLoading && /* @__PURE__ */ jsxs(
|
|
1409
1949
|
"div",
|
|
1410
1950
|
{
|
|
1411
1951
|
style: {
|
|
1412
|
-
padding: "
|
|
1952
|
+
padding: "8px 16px",
|
|
1413
1953
|
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1414
1954
|
color: theme2.colors.textSecondary
|
|
1415
1955
|
},
|
|
1416
1956
|
children: [
|
|
1417
|
-
|
|
1957
|
+
formatNumber2(totalCount),
|
|
1418
1958
|
" repositories found"
|
|
1419
1959
|
]
|
|
1420
1960
|
}
|
|
@@ -1471,134 +2011,18 @@ const GitHubSearchPanelContent = ({ events }) => {
|
|
|
1471
2011
|
]
|
|
1472
2012
|
}
|
|
1473
2013
|
),
|
|
1474
|
-
results.map((repo) =>
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
border: selectedRepoId === repo.id ? `2px solid ${theme2.colors.primary}` : `1px solid ${theme2.colors.border}`,
|
|
1487
|
-
backgroundColor: selectedRepoId === repo.id ? `${theme2.colors.primary}10` : theme2.colors.surface,
|
|
1488
|
-
cursor: "pointer",
|
|
1489
|
-
textAlign: "left",
|
|
1490
|
-
display: "flex",
|
|
1491
|
-
flexDirection: "column",
|
|
1492
|
-
gap: "8px"
|
|
1493
|
-
},
|
|
1494
|
-
children: [
|
|
1495
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1496
|
-
((_a = repo.owner) == null ? void 0 : _a.avatar_url) && /* @__PURE__ */ jsx(
|
|
1497
|
-
"img",
|
|
1498
|
-
{
|
|
1499
|
-
src: repo.owner.avatar_url,
|
|
1500
|
-
alt: repo.owner.login,
|
|
1501
|
-
style: { width: 20, height: 20, borderRadius: 4 }
|
|
1502
|
-
}
|
|
1503
|
-
),
|
|
1504
|
-
/* @__PURE__ */ jsx(
|
|
1505
|
-
"span",
|
|
1506
|
-
{
|
|
1507
|
-
style: {
|
|
1508
|
-
fontSize: `${theme2.fontSizes[2]}px`,
|
|
1509
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
1510
|
-
color: theme2.colors.primary
|
|
1511
|
-
},
|
|
1512
|
-
children: repo.full_name
|
|
1513
|
-
}
|
|
1514
|
-
),
|
|
1515
|
-
repo.private && /* @__PURE__ */ jsx(
|
|
1516
|
-
"span",
|
|
1517
|
-
{
|
|
1518
|
-
style: {
|
|
1519
|
-
fontSize: `${theme2.fontSizes[0]}px`,
|
|
1520
|
-
padding: "2px 6px",
|
|
1521
|
-
borderRadius: "4px",
|
|
1522
|
-
backgroundColor: theme2.colors.backgroundTertiary,
|
|
1523
|
-
color: theme2.colors.textSecondary
|
|
1524
|
-
},
|
|
1525
|
-
children: "Private"
|
|
1526
|
-
}
|
|
1527
|
-
)
|
|
1528
|
-
] }),
|
|
1529
|
-
repo.description && /* @__PURE__ */ jsx(
|
|
1530
|
-
"p",
|
|
1531
|
-
{
|
|
1532
|
-
style: {
|
|
1533
|
-
margin: 0,
|
|
1534
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1535
|
-
color: theme2.colors.textSecondary,
|
|
1536
|
-
overflow: "hidden",
|
|
1537
|
-
textOverflow: "ellipsis",
|
|
1538
|
-
display: "-webkit-box",
|
|
1539
|
-
WebkitLineClamp: 2,
|
|
1540
|
-
WebkitBoxOrient: "vertical"
|
|
1541
|
-
},
|
|
1542
|
-
children: repo.description
|
|
1543
|
-
}
|
|
1544
|
-
),
|
|
1545
|
-
/* @__PURE__ */ jsxs(
|
|
1546
|
-
"div",
|
|
1547
|
-
{
|
|
1548
|
-
style: {
|
|
1549
|
-
display: "flex",
|
|
1550
|
-
alignItems: "center",
|
|
1551
|
-
gap: "16px",
|
|
1552
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1553
|
-
color: theme2.colors.textSecondary
|
|
1554
|
-
},
|
|
1555
|
-
children: [
|
|
1556
|
-
repo.language && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1557
|
-
/* @__PURE__ */ jsx(
|
|
1558
|
-
"span",
|
|
1559
|
-
{
|
|
1560
|
-
style: {
|
|
1561
|
-
width: 10,
|
|
1562
|
-
height: 10,
|
|
1563
|
-
borderRadius: "50%",
|
|
1564
|
-
backgroundColor: theme2.colors.info
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
),
|
|
1568
|
-
repo.language
|
|
1569
|
-
] }),
|
|
1570
|
-
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1571
|
-
/* @__PURE__ */ jsx(Star, { size: 14 }),
|
|
1572
|
-
formatNumber(repo.stargazers_count || 0)
|
|
1573
|
-
] }),
|
|
1574
|
-
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1575
|
-
/* @__PURE__ */ jsx(GitFork, { size: 14 }),
|
|
1576
|
-
formatNumber(repo.forks_count || 0)
|
|
1577
|
-
] }),
|
|
1578
|
-
/* @__PURE__ */ jsx(
|
|
1579
|
-
"a",
|
|
1580
|
-
{
|
|
1581
|
-
href: repo.html_url,
|
|
1582
|
-
target: "_blank",
|
|
1583
|
-
rel: "noopener noreferrer",
|
|
1584
|
-
onClick: (e) => e.stopPropagation(),
|
|
1585
|
-
style: {
|
|
1586
|
-
marginLeft: "auto",
|
|
1587
|
-
color: theme2.colors.textSecondary,
|
|
1588
|
-
display: "flex",
|
|
1589
|
-
alignItems: "center"
|
|
1590
|
-
},
|
|
1591
|
-
children: /* @__PURE__ */ jsx(ExternalLink, { size: 14 })
|
|
1592
|
-
}
|
|
1593
|
-
)
|
|
1594
|
-
]
|
|
1595
|
-
}
|
|
1596
|
-
)
|
|
1597
|
-
]
|
|
1598
|
-
},
|
|
1599
|
-
repo.id
|
|
1600
|
-
);
|
|
1601
|
-
})
|
|
2014
|
+
results.map((repo) => /* @__PURE__ */ jsx(
|
|
2015
|
+
GitHubRepositoryCard,
|
|
2016
|
+
{
|
|
2017
|
+
repository: repo,
|
|
2018
|
+
onSelect: handleSelectRepository,
|
|
2019
|
+
isSelected: selectedRepoId === repo.id,
|
|
2020
|
+
onAddToCollection: currentWorkspace ? handleAddToCollection : void 0,
|
|
2021
|
+
isInCollection: collectionRepoSet.has(repo.full_name),
|
|
2022
|
+
collectionName
|
|
2023
|
+
},
|
|
2024
|
+
repo.id
|
|
2025
|
+
))
|
|
1602
2026
|
]
|
|
1603
2027
|
}
|
|
1604
2028
|
),
|
|
@@ -1620,7 +2044,7 @@ const GitHubSearchPanelMetadata = {
|
|
|
1620
2044
|
description: "Search for repositories on GitHub",
|
|
1621
2045
|
icon: "search",
|
|
1622
2046
|
version: "0.1.0",
|
|
1623
|
-
slices: [],
|
|
2047
|
+
slices: ["workspace", "workspaceRepositories"],
|
|
1624
2048
|
surfaces: ["panel"]
|
|
1625
2049
|
};
|
|
1626
2050
|
const formatDate$1 = (dateString) => {
|
|
@@ -46045,55 +46469,15 @@ const formatDate = (dateString) => {
|
|
|
46045
46469
|
const now = /* @__PURE__ */ new Date();
|
|
46046
46470
|
const diffMs = now.getTime() - date.getTime();
|
|
46047
46471
|
const diffDays = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
|
|
46048
|
-
if (diffDays === 0) return "
|
|
46049
|
-
if (diffDays === 1) return "
|
|
46472
|
+
if (diffDays === 0) return "today";
|
|
46473
|
+
if (diffDays === 1) return "yesterday";
|
|
46050
46474
|
if (diffDays < 7) return `${diffDays} days ago`;
|
|
46051
|
-
|
|
46052
|
-
if (diffDays <
|
|
46053
|
-
|
|
46054
|
-
}
|
|
46055
|
-
const
|
|
46056
|
-
|
|
46057
|
-
const isOpen = state === "open";
|
|
46058
|
-
return /* @__PURE__ */ jsx(
|
|
46059
|
-
"span",
|
|
46060
|
-
{
|
|
46061
|
-
style: {
|
|
46062
|
-
display: "inline-flex",
|
|
46063
|
-
alignItems: "center",
|
|
46064
|
-
padding: "4px 12px",
|
|
46065
|
-
borderRadius: "12px",
|
|
46066
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
46067
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
46068
|
-
backgroundColor: isOpen ? "#22c55e22" : "#6b728022",
|
|
46069
|
-
color: isOpen ? "#22c55e" : "#6b7280",
|
|
46070
|
-
textTransform: "uppercase"
|
|
46071
|
-
},
|
|
46072
|
-
children: state
|
|
46073
|
-
}
|
|
46074
|
-
);
|
|
46075
|
-
};
|
|
46076
|
-
const MetadataRow = ({ icon, label, value }) => {
|
|
46077
|
-
const { theme: theme2 } = useTheme();
|
|
46078
|
-
return /* @__PURE__ */ jsxs(
|
|
46079
|
-
"div",
|
|
46080
|
-
{
|
|
46081
|
-
style: {
|
|
46082
|
-
display: "flex",
|
|
46083
|
-
alignItems: "center",
|
|
46084
|
-
gap: "8px",
|
|
46085
|
-
fontSize: `${theme2.fontSizes[1]}px`
|
|
46086
|
-
},
|
|
46087
|
-
children: [
|
|
46088
|
-
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary, display: "flex", alignItems: "center" }, children: icon }),
|
|
46089
|
-
/* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.textSecondary }, children: [
|
|
46090
|
-
label,
|
|
46091
|
-
":"
|
|
46092
|
-
] }),
|
|
46093
|
-
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.text }, children: value })
|
|
46094
|
-
]
|
|
46095
|
-
}
|
|
46096
|
-
);
|
|
46475
|
+
const weeks = Math.floor(diffDays / 7);
|
|
46476
|
+
if (diffDays < 30) return `${weeks} ${weeks === 1 ? "week" : "weeks"} ago`;
|
|
46477
|
+
const months = Math.floor(diffDays / 30);
|
|
46478
|
+
if (diffDays < 365) return `${months} ${months === 1 ? "month" : "months"} ago`;
|
|
46479
|
+
const years = Math.floor(diffDays / 365);
|
|
46480
|
+
return `${years} ${years === 1 ? "year" : "years"} ago`;
|
|
46097
46481
|
};
|
|
46098
46482
|
const GitHubIssueDetailPanelContent = ({ events }) => {
|
|
46099
46483
|
const { theme: theme2 } = useTheme();
|
|
@@ -46127,32 +46511,40 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
|
|
|
46127
46511
|
});
|
|
46128
46512
|
}
|
|
46129
46513
|
};
|
|
46514
|
+
const containerStyle = {
|
|
46515
|
+
display: "flex",
|
|
46516
|
+
flexDirection: "column",
|
|
46517
|
+
height: "100%",
|
|
46518
|
+
backgroundColor: theme2.colors.background,
|
|
46519
|
+
overflow: "hidden"
|
|
46520
|
+
};
|
|
46130
46521
|
if (!selectedIssue) {
|
|
46131
|
-
return /* @__PURE__ */ jsxs(
|
|
46522
|
+
return /* @__PURE__ */ jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsxs(
|
|
46132
46523
|
"div",
|
|
46133
46524
|
{
|
|
46134
46525
|
style: {
|
|
46135
|
-
|
|
46526
|
+
flex: 1,
|
|
46136
46527
|
display: "flex",
|
|
46137
46528
|
flexDirection: "column",
|
|
46138
46529
|
alignItems: "center",
|
|
46139
46530
|
justifyContent: "center",
|
|
46531
|
+
gap: "16px",
|
|
46140
46532
|
padding: "24px",
|
|
46141
|
-
|
|
46142
|
-
color: theme2.colors.textSecondary,
|
|
46143
|
-
gap: "16px"
|
|
46533
|
+
textAlign: "center"
|
|
46144
46534
|
},
|
|
46145
46535
|
children: [
|
|
46146
|
-
/* @__PURE__ */ jsx(Github, { size: 48, color: theme2.colors.
|
|
46147
|
-
/* @__PURE__ */ jsxs("div", {
|
|
46536
|
+
/* @__PURE__ */ jsx(Github, { size: 48, style: { color: theme2.colors.textMuted } }),
|
|
46537
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
46148
46538
|
/* @__PURE__ */ jsx(
|
|
46149
46539
|
"h3",
|
|
46150
46540
|
{
|
|
46151
46541
|
style: {
|
|
46152
|
-
margin:
|
|
46153
|
-
|
|
46154
|
-
|
|
46155
|
-
|
|
46542
|
+
margin: 0,
|
|
46543
|
+
marginBottom: "8px",
|
|
46544
|
+
fontFamily: theme2.fonts.heading,
|
|
46545
|
+
fontSize: theme2.fontSizes[3],
|
|
46546
|
+
fontWeight: 600,
|
|
46547
|
+
color: theme2.colors.text
|
|
46156
46548
|
},
|
|
46157
46549
|
children: "No Issue Selected"
|
|
46158
46550
|
}
|
|
@@ -46162,347 +46554,229 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
|
|
|
46162
46554
|
{
|
|
46163
46555
|
style: {
|
|
46164
46556
|
margin: 0,
|
|
46165
|
-
|
|
46166
|
-
|
|
46557
|
+
fontFamily: theme2.fonts.body,
|
|
46558
|
+
fontSize: theme2.fontSizes[1],
|
|
46559
|
+
color: theme2.colors.textSecondary,
|
|
46560
|
+
lineHeight: 1.5
|
|
46167
46561
|
},
|
|
46168
|
-
children: "Click on an issue in the Issues panel to view its details"
|
|
46562
|
+
children: "Click on an issue in the Issues panel to view its details."
|
|
46169
46563
|
}
|
|
46170
46564
|
)
|
|
46171
46565
|
] })
|
|
46172
46566
|
]
|
|
46173
46567
|
}
|
|
46174
|
-
);
|
|
46568
|
+
) });
|
|
46175
46569
|
}
|
|
46176
|
-
|
|
46177
|
-
|
|
46178
|
-
|
|
46179
|
-
|
|
46180
|
-
|
|
46181
|
-
|
|
46182
|
-
|
|
46183
|
-
|
|
46184
|
-
|
|
46185
|
-
|
|
46186
|
-
|
|
46187
|
-
|
|
46188
|
-
|
|
46189
|
-
|
|
46190
|
-
"
|
|
46570
|
+
const isOpen = selectedIssue.state === "open";
|
|
46571
|
+
const statusColor = isOpen ? theme2.colors.success || "#22c55e" : theme2.colors.error || "#ef4444";
|
|
46572
|
+
const statusBg = `${statusColor}20`;
|
|
46573
|
+
const statusLabel = isOpen ? "Open" : "Closed";
|
|
46574
|
+
return /* @__PURE__ */ jsxs("div", { style: containerStyle, children: [
|
|
46575
|
+
/* @__PURE__ */ jsxs(
|
|
46576
|
+
"div",
|
|
46577
|
+
{
|
|
46578
|
+
style: {
|
|
46579
|
+
height: "40px",
|
|
46580
|
+
minHeight: "40px",
|
|
46581
|
+
padding: "0 12px",
|
|
46582
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
46583
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
46584
|
+
display: "flex",
|
|
46585
|
+
alignItems: "center",
|
|
46586
|
+
gap: "12px",
|
|
46587
|
+
boxSizing: "border-box"
|
|
46588
|
+
},
|
|
46589
|
+
children: [
|
|
46590
|
+
/* @__PURE__ */ jsxs(
|
|
46591
|
+
"span",
|
|
46592
|
+
{
|
|
46593
|
+
style: {
|
|
46594
|
+
fontFamily: theme2.fonts.monospace,
|
|
46595
|
+
fontSize: theme2.fontSizes[0],
|
|
46596
|
+
color: theme2.colors.textSecondary
|
|
46597
|
+
},
|
|
46598
|
+
children: [
|
|
46599
|
+
"#",
|
|
46600
|
+
selectedIssue.number
|
|
46601
|
+
]
|
|
46602
|
+
}
|
|
46603
|
+
),
|
|
46604
|
+
/* @__PURE__ */ jsx(
|
|
46605
|
+
"span",
|
|
46606
|
+
{
|
|
46607
|
+
style: {
|
|
46608
|
+
display: "inline-flex",
|
|
46609
|
+
alignItems: "center",
|
|
46610
|
+
gap: "6px",
|
|
46611
|
+
padding: "4px 10px",
|
|
46612
|
+
borderRadius: "999px",
|
|
46613
|
+
backgroundColor: statusBg,
|
|
46614
|
+
color: statusColor,
|
|
46615
|
+
fontFamily: theme2.fonts.heading,
|
|
46616
|
+
fontSize: theme2.fontSizes[0],
|
|
46617
|
+
fontWeight: 600,
|
|
46618
|
+
textTransform: "uppercase"
|
|
46619
|
+
},
|
|
46620
|
+
children: statusLabel
|
|
46621
|
+
}
|
|
46622
|
+
),
|
|
46623
|
+
/* @__PURE__ */ jsxs(
|
|
46624
|
+
"span",
|
|
46625
|
+
{
|
|
46626
|
+
style: {
|
|
46627
|
+
color: theme2.colors.textSecondary,
|
|
46628
|
+
fontSize: theme2.fontSizes[0],
|
|
46629
|
+
fontFamily: theme2.fonts.body
|
|
46630
|
+
},
|
|
46631
|
+
children: [
|
|
46632
|
+
"by ",
|
|
46633
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: selectedIssue.user.login }),
|
|
46634
|
+
" ",
|
|
46635
|
+
formatDate(selectedIssue.created_at)
|
|
46636
|
+
]
|
|
46637
|
+
}
|
|
46638
|
+
),
|
|
46639
|
+
selectedIssue.comments > 0 && /* @__PURE__ */ jsxs(
|
|
46640
|
+
"span",
|
|
46641
|
+
{
|
|
46642
|
+
style: {
|
|
46643
|
+
display: "inline-flex",
|
|
46644
|
+
alignItems: "center",
|
|
46645
|
+
gap: "4px",
|
|
46646
|
+
color: theme2.colors.textSecondary,
|
|
46647
|
+
fontSize: theme2.fontSizes[0]
|
|
46648
|
+
},
|
|
46649
|
+
children: [
|
|
46650
|
+
/* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
|
|
46651
|
+
selectedIssue.comments
|
|
46652
|
+
]
|
|
46653
|
+
}
|
|
46654
|
+
),
|
|
46655
|
+
selectedIssue.assignees && selectedIssue.assignees.length > 0 && /* @__PURE__ */ jsxs(
|
|
46656
|
+
"span",
|
|
46657
|
+
{
|
|
46658
|
+
style: {
|
|
46659
|
+
display: "inline-flex",
|
|
46660
|
+
alignItems: "center",
|
|
46661
|
+
gap: "4px",
|
|
46662
|
+
color: theme2.colors.textSecondary,
|
|
46663
|
+
fontSize: theme2.fontSizes[0],
|
|
46664
|
+
fontFamily: theme2.fonts.body
|
|
46665
|
+
},
|
|
46666
|
+
children: [
|
|
46667
|
+
"assigned to",
|
|
46668
|
+
" ",
|
|
46669
|
+
selectedIssue.assignees.map((assignee, index2) => /* @__PURE__ */ jsxs("span", { children: [
|
|
46670
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: assignee.login }),
|
|
46671
|
+
index2 < selectedIssue.assignees.length - 1 && ", "
|
|
46672
|
+
] }, assignee.login))
|
|
46673
|
+
]
|
|
46674
|
+
}
|
|
46675
|
+
),
|
|
46676
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
46677
|
+
/* @__PURE__ */ jsx(
|
|
46678
|
+
"a",
|
|
46679
|
+
{
|
|
46680
|
+
href: selectedIssue.html_url,
|
|
46681
|
+
target: "_blank",
|
|
46682
|
+
rel: "noopener noreferrer",
|
|
46683
|
+
title: "View on GitHub",
|
|
46684
|
+
style: {
|
|
46685
|
+
display: "inline-flex",
|
|
46686
|
+
alignItems: "center",
|
|
46687
|
+
justifyContent: "center",
|
|
46688
|
+
width: "28px",
|
|
46689
|
+
height: "28px",
|
|
46690
|
+
padding: 0,
|
|
46691
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
46692
|
+
borderRadius: "6px",
|
|
46693
|
+
backgroundColor: theme2.colors.background,
|
|
46694
|
+
color: theme2.colors.textSecondary,
|
|
46695
|
+
textDecoration: "none"
|
|
46696
|
+
},
|
|
46697
|
+
children: /* @__PURE__ */ jsx(ExternalLink, { size: 14 })
|
|
46698
|
+
}
|
|
46699
|
+
),
|
|
46700
|
+
/* @__PURE__ */ jsx(
|
|
46701
|
+
"button",
|
|
46702
|
+
{
|
|
46703
|
+
type: "button",
|
|
46704
|
+
onClick: handleBack,
|
|
46705
|
+
title: "Close",
|
|
46706
|
+
style: {
|
|
46707
|
+
display: "inline-flex",
|
|
46708
|
+
alignItems: "center",
|
|
46709
|
+
justifyContent: "center",
|
|
46710
|
+
width: "28px",
|
|
46711
|
+
height: "28px",
|
|
46712
|
+
padding: 0,
|
|
46713
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
46714
|
+
borderRadius: "6px",
|
|
46715
|
+
backgroundColor: theme2.colors.background,
|
|
46716
|
+
color: theme2.colors.textSecondary,
|
|
46717
|
+
cursor: "pointer"
|
|
46718
|
+
},
|
|
46719
|
+
children: /* @__PURE__ */ jsx(X, { size: 16 })
|
|
46720
|
+
}
|
|
46721
|
+
)
|
|
46722
|
+
]
|
|
46723
|
+
}
|
|
46724
|
+
),
|
|
46725
|
+
/* @__PURE__ */ jsx(
|
|
46726
|
+
"div",
|
|
46727
|
+
{
|
|
46728
|
+
style: {
|
|
46729
|
+
padding: "16px",
|
|
46730
|
+
borderBottom: `1px solid ${theme2.colors.border}`
|
|
46731
|
+
},
|
|
46732
|
+
children: /* @__PURE__ */ jsx(
|
|
46733
|
+
"h1",
|
|
46191
46734
|
{
|
|
46192
46735
|
style: {
|
|
46193
|
-
|
|
46194
|
-
|
|
46195
|
-
|
|
46196
|
-
|
|
46736
|
+
margin: 0,
|
|
46737
|
+
fontFamily: theme2.fonts.heading,
|
|
46738
|
+
fontSize: theme2.fontSizes[4] || 20,
|
|
46739
|
+
fontWeight: 600,
|
|
46740
|
+
color: theme2.colors.text,
|
|
46741
|
+
lineHeight: 1.3
|
|
46197
46742
|
},
|
|
46198
|
-
children:
|
|
46199
|
-
/* @__PURE__ */ jsxs(
|
|
46200
|
-
"div",
|
|
46201
|
-
{
|
|
46202
|
-
style: {
|
|
46203
|
-
display: "flex",
|
|
46204
|
-
alignItems: "center",
|
|
46205
|
-
gap: "12px",
|
|
46206
|
-
marginBottom: "12px"
|
|
46207
|
-
},
|
|
46208
|
-
children: [
|
|
46209
|
-
/* @__PURE__ */ jsx(
|
|
46210
|
-
"button",
|
|
46211
|
-
{
|
|
46212
|
-
type: "button",
|
|
46213
|
-
onClick: handleBack,
|
|
46214
|
-
style: {
|
|
46215
|
-
display: "flex",
|
|
46216
|
-
alignItems: "center",
|
|
46217
|
-
justifyContent: "center",
|
|
46218
|
-
width: "32px",
|
|
46219
|
-
height: "32px",
|
|
46220
|
-
border: `1px solid ${theme2.colors.border}`,
|
|
46221
|
-
borderRadius: "6px",
|
|
46222
|
-
background: theme2.colors.surface,
|
|
46223
|
-
cursor: "pointer",
|
|
46224
|
-
color: theme2.colors.textSecondary
|
|
46225
|
-
},
|
|
46226
|
-
title: "Back",
|
|
46227
|
-
children: /* @__PURE__ */ jsx(ArrowLeft, { size: 16 })
|
|
46228
|
-
}
|
|
46229
|
-
),
|
|
46230
|
-
/* @__PURE__ */ jsxs(
|
|
46231
|
-
"span",
|
|
46232
|
-
{
|
|
46233
|
-
style: {
|
|
46234
|
-
fontFamily: theme2.fonts.monospace || "monospace",
|
|
46235
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
46236
|
-
color: theme2.colors.textSecondary
|
|
46237
|
-
},
|
|
46238
|
-
children: [
|
|
46239
|
-
"#",
|
|
46240
|
-
selectedIssue.number
|
|
46241
|
-
]
|
|
46242
|
-
}
|
|
46243
|
-
),
|
|
46244
|
-
/* @__PURE__ */ jsx(StatusBadge, { state: selectedIssue.state }),
|
|
46245
|
-
owner && repo && /* @__PURE__ */ jsxs(
|
|
46246
|
-
"span",
|
|
46247
|
-
{
|
|
46248
|
-
style: {
|
|
46249
|
-
fontSize: `${theme2.fontSizes[0]}px`,
|
|
46250
|
-
color: theme2.colors.textSecondary,
|
|
46251
|
-
marginLeft: "auto"
|
|
46252
|
-
},
|
|
46253
|
-
children: [
|
|
46254
|
-
owner,
|
|
46255
|
-
"/",
|
|
46256
|
-
repo
|
|
46257
|
-
]
|
|
46258
|
-
}
|
|
46259
|
-
)
|
|
46260
|
-
]
|
|
46261
|
-
}
|
|
46262
|
-
),
|
|
46263
|
-
/* @__PURE__ */ jsx(
|
|
46264
|
-
"h1",
|
|
46265
|
-
{
|
|
46266
|
-
style: {
|
|
46267
|
-
margin: "0 0 16px 0",
|
|
46268
|
-
fontSize: `${theme2.fontSizes[5]}px`,
|
|
46269
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
46270
|
-
color: theme2.colors.text,
|
|
46271
|
-
lineHeight: 1.3
|
|
46272
|
-
},
|
|
46273
|
-
children: selectedIssue.title
|
|
46274
|
-
}
|
|
46275
|
-
),
|
|
46276
|
-
/* @__PURE__ */ jsxs(
|
|
46277
|
-
"div",
|
|
46278
|
-
{
|
|
46279
|
-
style: {
|
|
46280
|
-
display: "grid",
|
|
46281
|
-
gridTemplateColumns: "repeat(auto-fit, minmax(180px, 1fr))",
|
|
46282
|
-
gap: "12px"
|
|
46283
|
-
},
|
|
46284
|
-
children: [
|
|
46285
|
-
/* @__PURE__ */ jsx(
|
|
46286
|
-
MetadataRow,
|
|
46287
|
-
{
|
|
46288
|
-
icon: /* @__PURE__ */ jsx(User, { size: 14 }),
|
|
46289
|
-
label: "Author",
|
|
46290
|
-
value: /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
46291
|
-
/* @__PURE__ */ jsx(
|
|
46292
|
-
"img",
|
|
46293
|
-
{
|
|
46294
|
-
src: selectedIssue.user.avatar_url,
|
|
46295
|
-
alt: selectedIssue.user.login,
|
|
46296
|
-
style: {
|
|
46297
|
-
width: "16px",
|
|
46298
|
-
height: "16px",
|
|
46299
|
-
borderRadius: "50%"
|
|
46300
|
-
}
|
|
46301
|
-
}
|
|
46302
|
-
),
|
|
46303
|
-
selectedIssue.user.login
|
|
46304
|
-
] })
|
|
46305
|
-
}
|
|
46306
|
-
),
|
|
46307
|
-
/* @__PURE__ */ jsx(
|
|
46308
|
-
MetadataRow,
|
|
46309
|
-
{
|
|
46310
|
-
icon: /* @__PURE__ */ jsx(Calendar, { size: 14 }),
|
|
46311
|
-
label: "Created",
|
|
46312
|
-
value: formatDate(selectedIssue.created_at)
|
|
46313
|
-
}
|
|
46314
|
-
),
|
|
46315
|
-
selectedIssue.comments > 0 && /* @__PURE__ */ jsx(
|
|
46316
|
-
MetadataRow,
|
|
46317
|
-
{
|
|
46318
|
-
icon: /* @__PURE__ */ jsx(MessageSquare, { size: 14 }),
|
|
46319
|
-
label: "Comments",
|
|
46320
|
-
value: `${selectedIssue.comments} ${selectedIssue.comments === 1 ? "comment" : "comments"}`
|
|
46321
|
-
}
|
|
46322
|
-
)
|
|
46323
|
-
]
|
|
46324
|
-
}
|
|
46325
|
-
),
|
|
46326
|
-
selectedIssue.labels.length > 0 && /* @__PURE__ */ jsxs(
|
|
46327
|
-
"div",
|
|
46328
|
-
{
|
|
46329
|
-
style: {
|
|
46330
|
-
display: "flex",
|
|
46331
|
-
alignItems: "center",
|
|
46332
|
-
gap: "8px",
|
|
46333
|
-
marginTop: "12px",
|
|
46334
|
-
flexWrap: "wrap"
|
|
46335
|
-
},
|
|
46336
|
-
children: [
|
|
46337
|
-
/* @__PURE__ */ jsx(Tag, { size: 14, color: theme2.colors.textSecondary }),
|
|
46338
|
-
selectedIssue.labels.map((label) => /* @__PURE__ */ jsx(
|
|
46339
|
-
"span",
|
|
46340
|
-
{
|
|
46341
|
-
style: {
|
|
46342
|
-
display: "inline-flex",
|
|
46343
|
-
alignItems: "center",
|
|
46344
|
-
gap: "6px",
|
|
46345
|
-
padding: "4px 12px",
|
|
46346
|
-
borderRadius: "16px",
|
|
46347
|
-
backgroundColor: `#${label.color}22`,
|
|
46348
|
-
color: `#${label.color}`,
|
|
46349
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
46350
|
-
fontWeight: theme2.fontWeights.medium
|
|
46351
|
-
},
|
|
46352
|
-
children: label.name
|
|
46353
|
-
},
|
|
46354
|
-
label.id
|
|
46355
|
-
))
|
|
46356
|
-
]
|
|
46357
|
-
}
|
|
46358
|
-
)
|
|
46359
|
-
]
|
|
46743
|
+
children: selectedIssue.title
|
|
46360
46744
|
}
|
|
46361
|
-
)
|
|
46362
|
-
|
|
46363
|
-
|
|
46745
|
+
)
|
|
46746
|
+
}
|
|
46747
|
+
),
|
|
46748
|
+
/* @__PURE__ */ jsx(
|
|
46749
|
+
"div",
|
|
46750
|
+
{
|
|
46751
|
+
style: {
|
|
46752
|
+
flex: 1,
|
|
46753
|
+
overflow: "auto"
|
|
46754
|
+
},
|
|
46755
|
+
children: selectedIssue.body ? /* @__PURE__ */ jsx(
|
|
46756
|
+
DocumentView,
|
|
46364
46757
|
{
|
|
46365
|
-
|
|
46366
|
-
|
|
46367
|
-
|
|
46368
|
-
|
|
46369
|
-
flexDirection: "column"
|
|
46370
|
-
},
|
|
46371
|
-
children: [
|
|
46372
|
-
selectedIssue.body ? /* @__PURE__ */ jsx(
|
|
46373
|
-
DocumentView,
|
|
46374
|
-
{
|
|
46375
|
-
content: selectedIssue.body,
|
|
46376
|
-
theme: theme2,
|
|
46377
|
-
maxWidth: "100%",
|
|
46378
|
-
transparentBackground: true
|
|
46379
|
-
}
|
|
46380
|
-
) : /* @__PURE__ */ jsx(
|
|
46381
|
-
"div",
|
|
46382
|
-
{
|
|
46383
|
-
style: {
|
|
46384
|
-
flex: 1,
|
|
46385
|
-
display: "flex",
|
|
46386
|
-
alignItems: "center",
|
|
46387
|
-
justifyContent: "center",
|
|
46388
|
-
color: theme2.colors.textSecondary,
|
|
46389
|
-
fontStyle: "italic",
|
|
46390
|
-
padding: "40px"
|
|
46391
|
-
},
|
|
46392
|
-
children: "No description provided"
|
|
46393
|
-
}
|
|
46394
|
-
),
|
|
46395
|
-
selectedIssue.assignees && selectedIssue.assignees.length > 0 && /* @__PURE__ */ jsxs(
|
|
46396
|
-
"div",
|
|
46397
|
-
{
|
|
46398
|
-
style: {
|
|
46399
|
-
marginTop: "20px",
|
|
46400
|
-
padding: "16px",
|
|
46401
|
-
backgroundColor: theme2.colors.backgroundSecondary,
|
|
46402
|
-
borderRadius: "8px",
|
|
46403
|
-
border: `1px solid ${theme2.colors.border}`
|
|
46404
|
-
},
|
|
46405
|
-
children: [
|
|
46406
|
-
/* @__PURE__ */ jsx(
|
|
46407
|
-
"h3",
|
|
46408
|
-
{
|
|
46409
|
-
style: {
|
|
46410
|
-
color: theme2.colors.text,
|
|
46411
|
-
fontSize: `${theme2.fontSizes[2]}px`,
|
|
46412
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
46413
|
-
marginTop: 0,
|
|
46414
|
-
marginBottom: "12px"
|
|
46415
|
-
},
|
|
46416
|
-
children: "Assignees"
|
|
46417
|
-
}
|
|
46418
|
-
),
|
|
46419
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "12px", flexWrap: "wrap" }, children: selectedIssue.assignees.map((assignee) => /* @__PURE__ */ jsxs(
|
|
46420
|
-
"div",
|
|
46421
|
-
{
|
|
46422
|
-
style: {
|
|
46423
|
-
display: "flex",
|
|
46424
|
-
alignItems: "center",
|
|
46425
|
-
gap: "8px",
|
|
46426
|
-
padding: "6px 12px",
|
|
46427
|
-
backgroundColor: theme2.colors.surface,
|
|
46428
|
-
borderRadius: "20px",
|
|
46429
|
-
border: `1px solid ${theme2.colors.border}`
|
|
46430
|
-
},
|
|
46431
|
-
children: [
|
|
46432
|
-
/* @__PURE__ */ jsx(
|
|
46433
|
-
"img",
|
|
46434
|
-
{
|
|
46435
|
-
src: assignee.avatar_url,
|
|
46436
|
-
alt: assignee.login,
|
|
46437
|
-
style: {
|
|
46438
|
-
width: "20px",
|
|
46439
|
-
height: "20px",
|
|
46440
|
-
borderRadius: "50%"
|
|
46441
|
-
}
|
|
46442
|
-
}
|
|
46443
|
-
),
|
|
46444
|
-
/* @__PURE__ */ jsx(
|
|
46445
|
-
"span",
|
|
46446
|
-
{
|
|
46447
|
-
style: {
|
|
46448
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
46449
|
-
color: theme2.colors.text
|
|
46450
|
-
},
|
|
46451
|
-
children: assignee.login
|
|
46452
|
-
}
|
|
46453
|
-
)
|
|
46454
|
-
]
|
|
46455
|
-
},
|
|
46456
|
-
assignee.login
|
|
46457
|
-
)) })
|
|
46458
|
-
]
|
|
46459
|
-
}
|
|
46460
|
-
)
|
|
46461
|
-
]
|
|
46758
|
+
content: selectedIssue.body,
|
|
46759
|
+
theme: theme2,
|
|
46760
|
+
maxWidth: "100%",
|
|
46761
|
+
transparentBackground: true
|
|
46462
46762
|
}
|
|
46463
|
-
)
|
|
46464
|
-
/* @__PURE__ */ jsx(
|
|
46763
|
+
) : /* @__PURE__ */ jsx(
|
|
46465
46764
|
"div",
|
|
46466
46765
|
{
|
|
46467
46766
|
style: {
|
|
46468
|
-
|
|
46469
|
-
|
|
46470
|
-
|
|
46471
|
-
|
|
46472
|
-
|
|
46473
|
-
|
|
46474
|
-
gap: "12px"
|
|
46767
|
+
padding: "40px",
|
|
46768
|
+
textAlign: "center",
|
|
46769
|
+
color: theme2.colors.textMuted,
|
|
46770
|
+
fontFamily: theme2.fonts.body,
|
|
46771
|
+
fontSize: theme2.fontSizes[1],
|
|
46772
|
+
fontStyle: "italic"
|
|
46475
46773
|
},
|
|
46476
|
-
children:
|
|
46477
|
-
"a",
|
|
46478
|
-
{
|
|
46479
|
-
href: selectedIssue.html_url,
|
|
46480
|
-
target: "_blank",
|
|
46481
|
-
rel: "noopener noreferrer",
|
|
46482
|
-
style: {
|
|
46483
|
-
display: "flex",
|
|
46484
|
-
alignItems: "center",
|
|
46485
|
-
gap: "6px",
|
|
46486
|
-
padding: "8px 16px",
|
|
46487
|
-
borderRadius: "6px",
|
|
46488
|
-
border: "none",
|
|
46489
|
-
backgroundColor: theme2.colors.primary,
|
|
46490
|
-
color: theme2.colors.background,
|
|
46491
|
-
fontSize: `${theme2.fontSizes[2]}px`,
|
|
46492
|
-
fontWeight: theme2.fontWeights.medium,
|
|
46493
|
-
textDecoration: "none"
|
|
46494
|
-
},
|
|
46495
|
-
children: [
|
|
46496
|
-
/* @__PURE__ */ jsx(ExternalLink, { size: 14 }),
|
|
46497
|
-
"View on GitHub"
|
|
46498
|
-
]
|
|
46499
|
-
}
|
|
46500
|
-
)
|
|
46774
|
+
children: "No description provided."
|
|
46501
46775
|
}
|
|
46502
46776
|
)
|
|
46503
|
-
|
|
46504
|
-
|
|
46505
|
-
);
|
|
46777
|
+
}
|
|
46778
|
+
)
|
|
46779
|
+
] });
|
|
46506
46780
|
};
|
|
46507
46781
|
const GitHubIssueDetailPanel = (props) => {
|
|
46508
46782
|
return /* @__PURE__ */ jsx(GitHubIssueDetailPanelContent, { ...props });
|
|
@@ -46644,7 +46918,7 @@ const OwnerRepositoriesPanelContent = ({
|
|
|
46644
46918
|
}
|
|
46645
46919
|
});
|
|
46646
46920
|
};
|
|
46647
|
-
const
|
|
46921
|
+
const formatNumber2 = (num) => {
|
|
46648
46922
|
if (num >= 1e6) return `${(num / 1e6).toFixed(1)}M`;
|
|
46649
46923
|
if (num >= 1e3) return `${(num / 1e3).toFixed(1)}K`;
|
|
46650
46924
|
return num.toString();
|
|
@@ -47111,11 +47385,11 @@ const OwnerRepositoriesPanelContent = ({
|
|
|
47111
47385
|
] }),
|
|
47112
47386
|
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47113
47387
|
/* @__PURE__ */ jsx(Star, { size: 14 }),
|
|
47114
|
-
|
|
47388
|
+
formatNumber2(repo.stargazers_count || 0)
|
|
47115
47389
|
] }),
|
|
47116
47390
|
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47117
47391
|
/* @__PURE__ */ jsx(GitFork, { size: 14 }),
|
|
47118
|
-
|
|
47392
|
+
formatNumber2(repo.forks_count || 0)
|
|
47119
47393
|
] }),
|
|
47120
47394
|
repo.updated_at && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47121
47395
|
/* @__PURE__ */ jsx(Calendar, { size: 14 }),
|
|
@@ -47299,7 +47573,7 @@ const RecentRepositoriesPanelContent = ({
|
|
|
47299
47573
|
if (diffDays < 30) return `${Math.floor(diffDays / 7)}w ago`;
|
|
47300
47574
|
return `${Math.floor(diffDays / 30)}mo ago`;
|
|
47301
47575
|
};
|
|
47302
|
-
const
|
|
47576
|
+
const formatNumber2 = (num) => {
|
|
47303
47577
|
if (num >= 1e6) return `${(num / 1e6).toFixed(1)}M`;
|
|
47304
47578
|
if (num >= 1e3) return `${(num / 1e3).toFixed(1)}K`;
|
|
47305
47579
|
return num.toString();
|
|
@@ -47674,11 +47948,11 @@ const RecentRepositoriesPanelContent = ({
|
|
|
47674
47948
|
] }),
|
|
47675
47949
|
item.stargazers_count !== void 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47676
47950
|
/* @__PURE__ */ jsx(Star, { size: 14 }),
|
|
47677
|
-
|
|
47951
|
+
formatNumber2(item.stargazers_count)
|
|
47678
47952
|
] }),
|
|
47679
47953
|
item.forks_count !== void 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47680
47954
|
/* @__PURE__ */ jsx(GitFork, { size: 14 }),
|
|
47681
|
-
|
|
47955
|
+
formatNumber2(item.forks_count)
|
|
47682
47956
|
] }),
|
|
47683
47957
|
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47684
47958
|
/* @__PURE__ */ jsx(Calendar, { size: 14 }),
|
|
@@ -47825,12 +48099,12 @@ const RecentRepositoriesPanelContent = ({
|
|
|
47825
48099
|
children: [
|
|
47826
48100
|
item.public_repos !== void 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47827
48101
|
/* @__PURE__ */ jsx(BookOpen, { size: 14 }),
|
|
47828
|
-
|
|
48102
|
+
formatNumber2(item.public_repos),
|
|
47829
48103
|
" repos"
|
|
47830
48104
|
] }),
|
|
47831
48105
|
item.followers !== void 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47832
48106
|
/* @__PURE__ */ jsx(User, { size: 14 }),
|
|
47833
|
-
|
|
48107
|
+
formatNumber2(item.followers),
|
|
47834
48108
|
" followers"
|
|
47835
48109
|
] }),
|
|
47836
48110
|
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|