@industry-theme/github-panels 0.1.39 → 0.1.41
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/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/GitHubIssuesPanel.d.ts.map +1 -1
- package/dist/panels/GitHubSearchPanel.d.ts +3 -2
- package/dist/panels/GitHubSearchPanel.d.ts.map +1 -1
- package/dist/panels.bundle.js +1019 -1058
- package/dist/panels.bundle.js.map +1 -1
- package/dist/types/github.d.ts +44 -0
- 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$v);
|
|
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$u = [
|
|
133
|
+
const __iconNode$w = [
|
|
145
134
|
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
146
135
|
[
|
|
147
136
|
"path",
|
|
@@ -151,14 +140,14 @@ const __iconNode$u = [
|
|
|
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,85 +160,86 @@ const __iconNode$t = [
|
|
|
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$
|
|
231
|
-
["
|
|
232
|
-
["path", { d: "
|
|
219
|
+
const __iconNode$p = [
|
|
220
|
+
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
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
|
|
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$
|
|
242
|
-
["
|
|
243
|
-
["path", { d: "
|
|
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" }]
|
|
244
234
|
];
|
|
245
|
-
const
|
|
235
|
+
const Download = createLucideIcon("download", __iconNode$o);
|
|
246
236
|
/**
|
|
247
237
|
* @license lucide-react v0.552.0 - ISC
|
|
248
238
|
*
|
|
249
239
|
* This source code is licensed under the ISC license.
|
|
250
240
|
* See the LICENSE file in the root directory of this source tree.
|
|
251
241
|
*/
|
|
252
|
-
const __iconNode$
|
|
242
|
+
const __iconNode$n = [
|
|
253
243
|
["path", { d: "m15 15 6 6", key: "1s409w" }],
|
|
254
244
|
["path", { d: "m15 9 6-6", key: "ko1vev" }],
|
|
255
245
|
["path", { d: "M21 16v5h-5", key: "1ck2sf" }],
|
|
@@ -259,26 +249,26 @@ const __iconNode$l = [
|
|
|
259
249
|
["path", { d: "M3 8V3h5", key: "1ln10m" }],
|
|
260
250
|
["path", { d: "M9 9 3 3", key: "v551iv" }]
|
|
261
251
|
];
|
|
262
|
-
const Expand = createLucideIcon("expand", __iconNode$
|
|
252
|
+
const Expand = createLucideIcon("expand", __iconNode$n);
|
|
263
253
|
/**
|
|
264
254
|
* @license lucide-react v0.552.0 - ISC
|
|
265
255
|
*
|
|
266
256
|
* This source code is licensed under the ISC license.
|
|
267
257
|
* See the LICENSE file in the root directory of this source tree.
|
|
268
258
|
*/
|
|
269
|
-
const __iconNode$
|
|
259
|
+
const __iconNode$m = [
|
|
270
260
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
271
261
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
272
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" }]
|
|
273
263
|
];
|
|
274
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
264
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$m);
|
|
275
265
|
/**
|
|
276
266
|
* @license lucide-react v0.552.0 - ISC
|
|
277
267
|
*
|
|
278
268
|
* This source code is licensed under the ISC license.
|
|
279
269
|
* See the LICENSE file in the root directory of this source tree.
|
|
280
270
|
*/
|
|
281
|
-
const __iconNode$
|
|
271
|
+
const __iconNode$l = [
|
|
282
272
|
[
|
|
283
273
|
"path",
|
|
284
274
|
{
|
|
@@ -291,7 +281,41 @@ const __iconNode$j = [
|
|
|
291
281
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
292
282
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
293
283
|
];
|
|
294
|
-
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);
|
|
295
319
|
/**
|
|
296
320
|
* @license lucide-react v0.552.0 - ISC
|
|
297
321
|
*
|
|
@@ -544,7 +568,7 @@ const __iconNode = [
|
|
|
544
568
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
545
569
|
];
|
|
546
570
|
const X = createLucideIcon("x", __iconNode);
|
|
547
|
-
function getLanguageColor(language2) {
|
|
571
|
+
function getLanguageColor$1(language2) {
|
|
548
572
|
const colors = {
|
|
549
573
|
TypeScript: "#3178c6",
|
|
550
574
|
JavaScript: "#f7df1e",
|
|
@@ -699,7 +723,7 @@ const GitHubProjectCard = ({
|
|
|
699
723
|
width: "8px",
|
|
700
724
|
height: "8px",
|
|
701
725
|
borderRadius: "50%",
|
|
702
|
-
backgroundColor: getLanguageColor(repository.language)
|
|
726
|
+
backgroundColor: getLanguageColor$1(repository.language)
|
|
703
727
|
}
|
|
704
728
|
}
|
|
705
729
|
),
|
|
@@ -1254,7 +1278,439 @@ const GitHubProjectsPanelMetadata = {
|
|
|
1254
1278
|
slices: ["github-repositories"],
|
|
1255
1279
|
surfaces: ["sidebar", "panel"]
|
|
1256
1280
|
};
|
|
1257
|
-
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
|
+
repository.license
|
|
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;
|
|
1258
1714
|
const { theme: theme2 } = useTheme();
|
|
1259
1715
|
const [searchQuery, setSearchQuery] = useState("");
|
|
1260
1716
|
const [results, setResults] = useState([]);
|
|
@@ -1264,9 +1720,24 @@ const GitHubSearchPanelContent = ({ events }) => {
|
|
|
1264
1720
|
const [selectedRepoId, setSelectedRepoId] = useState(null);
|
|
1265
1721
|
const searchTimeoutRef = useRef(null);
|
|
1266
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;
|
|
1267
1738
|
useEffect(() => {
|
|
1268
|
-
var
|
|
1269
|
-
(
|
|
1739
|
+
var _a2;
|
|
1740
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
1270
1741
|
}, []);
|
|
1271
1742
|
const performSearch = useCallback(async (query) => {
|
|
1272
1743
|
if (!query.trim()) {
|
|
@@ -1313,19 +1784,32 @@ const GitHubSearchPanelContent = ({ events }) => {
|
|
|
1313
1784
|
}
|
|
1314
1785
|
performSearch(searchQuery);
|
|
1315
1786
|
};
|
|
1316
|
-
const handleSelectRepository = (repo) => {
|
|
1787
|
+
const handleSelectRepository = useCallback((repo) => {
|
|
1317
1788
|
setSelectedRepoId(repo.id);
|
|
1318
1789
|
events.emit({
|
|
1319
1790
|
type: "repository:preview",
|
|
1320
|
-
source:
|
|
1791
|
+
source: PANEL_ID,
|
|
1321
1792
|
timestamp: Date.now(),
|
|
1322
1793
|
payload: {
|
|
1323
1794
|
repository: repo,
|
|
1324
1795
|
source: "search"
|
|
1325
1796
|
}
|
|
1326
1797
|
});
|
|
1327
|
-
};
|
|
1328
|
-
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) => {
|
|
1329
1813
|
if (num >= 1e6) return `${(num / 1e6).toFixed(1)}M`;
|
|
1330
1814
|
if (num >= 1e3) return `${(num / 1e3).toFixed(1)}K`;
|
|
1331
1815
|
return num.toString();
|
|
@@ -1343,89 +1827,110 @@ const GitHubSearchPanelContent = ({ events }) => {
|
|
|
1343
1827
|
},
|
|
1344
1828
|
children: [
|
|
1345
1829
|
/* @__PURE__ */ jsxs(
|
|
1346
|
-
"
|
|
1830
|
+
"form",
|
|
1347
1831
|
{
|
|
1832
|
+
onSubmit: handleSubmit,
|
|
1348
1833
|
style: {
|
|
1349
|
-
|
|
1834
|
+
height: "40px",
|
|
1835
|
+
minHeight: "40px",
|
|
1836
|
+
padding: "0 16px",
|
|
1350
1837
|
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
1351
|
-
display: "flex",
|
|
1352
|
-
alignItems: "center",
|
|
1353
|
-
gap: "12px"
|
|
1354
|
-
},
|
|
1355
|
-
children: [
|
|
1356
|
-
/* @__PURE__ */ jsx(Github, { size: 20, color: theme2.colors.primary }),
|
|
1357
|
-
/* @__PURE__ */ jsx(
|
|
1358
|
-
"h2",
|
|
1359
|
-
{
|
|
1360
|
-
style: {
|
|
1361
|
-
margin: 0,
|
|
1362
|
-
fontSize: `${theme2.fontSizes[3]}px`,
|
|
1363
|
-
fontWeight: theme2.fontWeights.semibold
|
|
1364
|
-
},
|
|
1365
|
-
children: "Search GitHub"
|
|
1366
|
-
}
|
|
1367
|
-
)
|
|
1368
|
-
]
|
|
1369
|
-
}
|
|
1370
|
-
),
|
|
1371
|
-
/* @__PURE__ */ jsx("form", { onSubmit: handleSubmit, style: { padding: "12px 16px" }, children: /* @__PURE__ */ jsxs(
|
|
1372
|
-
"div",
|
|
1373
|
-
{
|
|
1374
|
-
style: {
|
|
1375
1838
|
display: "flex",
|
|
1376
1839
|
alignItems: "center",
|
|
1377
1840
|
gap: "8px",
|
|
1378
|
-
|
|
1379
|
-
borderRadius: "6px",
|
|
1380
|
-
backgroundColor: theme2.colors.backgroundSecondary,
|
|
1381
|
-
border: `1px solid ${theme2.colors.border}`
|
|
1841
|
+
boxSizing: "border-box"
|
|
1382
1842
|
},
|
|
1383
1843
|
children: [
|
|
1384
|
-
/* @__PURE__ */ jsx(
|
|
1385
|
-
/* @__PURE__ */
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
background: "none",
|
|
1397
|
-
outline: "none",
|
|
1398
|
-
fontSize: `${theme2.fontSizes[2]}px`,
|
|
1399
|
-
color: theme2.colors.text
|
|
1844
|
+
/* @__PURE__ */ jsx(Github, { size: 18, color: theme2.colors.primary, style: { flexShrink: 0 } }),
|
|
1845
|
+
/* @__PURE__ */ jsxs("div", { style: { position: "relative", flex: 1, display: "flex", alignItems: "center" }, children: [
|
|
1846
|
+
/* @__PURE__ */ jsx(
|
|
1847
|
+
Search,
|
|
1848
|
+
{
|
|
1849
|
+
size: 16,
|
|
1850
|
+
color: theme2.colors.textSecondary,
|
|
1851
|
+
style: {
|
|
1852
|
+
position: "absolute",
|
|
1853
|
+
left: "10px",
|
|
1854
|
+
pointerEvents: "none"
|
|
1855
|
+
}
|
|
1400
1856
|
}
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1857
|
+
),
|
|
1858
|
+
/* @__PURE__ */ jsx(
|
|
1859
|
+
"input",
|
|
1860
|
+
{
|
|
1861
|
+
ref: inputRef,
|
|
1862
|
+
type: "text",
|
|
1863
|
+
placeholder: "Search GitHub repositories...",
|
|
1864
|
+
value: searchQuery,
|
|
1865
|
+
onChange: handleSearchChange,
|
|
1866
|
+
style: {
|
|
1867
|
+
width: "100%",
|
|
1868
|
+
padding: "6px 32px 6px 32px",
|
|
1869
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1870
|
+
color: theme2.colors.text,
|
|
1871
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
1872
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
1873
|
+
borderRadius: "4px",
|
|
1874
|
+
outline: "none",
|
|
1875
|
+
fontFamily: theme2.fonts.body
|
|
1876
|
+
}
|
|
1413
1877
|
}
|
|
1414
|
-
|
|
1415
|
-
|
|
1878
|
+
),
|
|
1879
|
+
searchQuery && !isLoading && /* @__PURE__ */ jsx(
|
|
1880
|
+
"button",
|
|
1881
|
+
{
|
|
1882
|
+
type: "button",
|
|
1883
|
+
onClick: () => {
|
|
1884
|
+
var _a2;
|
|
1885
|
+
setSearchQuery("");
|
|
1886
|
+
setResults([]);
|
|
1887
|
+
setTotalCount(0);
|
|
1888
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
1889
|
+
},
|
|
1890
|
+
style: {
|
|
1891
|
+
position: "absolute",
|
|
1892
|
+
right: "8px",
|
|
1893
|
+
background: "none",
|
|
1894
|
+
border: "none",
|
|
1895
|
+
cursor: "pointer",
|
|
1896
|
+
padding: "4px",
|
|
1897
|
+
display: "flex",
|
|
1898
|
+
alignItems: "center",
|
|
1899
|
+
justifyContent: "center",
|
|
1900
|
+
color: theme2.colors.textSecondary
|
|
1901
|
+
},
|
|
1902
|
+
children: /* @__PURE__ */ jsx(X, { size: 16 })
|
|
1903
|
+
}
|
|
1904
|
+
),
|
|
1905
|
+
isLoading && /* @__PURE__ */ jsx(
|
|
1906
|
+
"div",
|
|
1907
|
+
{
|
|
1908
|
+
style: {
|
|
1909
|
+
position: "absolute",
|
|
1910
|
+
right: "10px",
|
|
1911
|
+
width: 14,
|
|
1912
|
+
height: 14,
|
|
1913
|
+
border: `2px solid ${theme2.colors.border}`,
|
|
1914
|
+
borderTopColor: theme2.colors.primary,
|
|
1915
|
+
borderRadius: "50%",
|
|
1916
|
+
animation: "spin 1s linear infinite"
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
)
|
|
1920
|
+
] })
|
|
1416
1921
|
]
|
|
1417
1922
|
}
|
|
1418
|
-
)
|
|
1923
|
+
),
|
|
1419
1924
|
totalCount > 0 && !isLoading && /* @__PURE__ */ jsxs(
|
|
1420
1925
|
"div",
|
|
1421
1926
|
{
|
|
1422
1927
|
style: {
|
|
1423
|
-
padding: "
|
|
1928
|
+
padding: "8px 16px",
|
|
1424
1929
|
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1425
1930
|
color: theme2.colors.textSecondary
|
|
1426
1931
|
},
|
|
1427
1932
|
children: [
|
|
1428
|
-
|
|
1933
|
+
formatNumber2(totalCount),
|
|
1429
1934
|
" repositories found"
|
|
1430
1935
|
]
|
|
1431
1936
|
}
|
|
@@ -1482,134 +1987,18 @@ const GitHubSearchPanelContent = ({ events }) => {
|
|
|
1482
1987
|
]
|
|
1483
1988
|
}
|
|
1484
1989
|
),
|
|
1485
|
-
results.map((repo) =>
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
border: selectedRepoId === repo.id ? `2px solid ${theme2.colors.primary}` : `1px solid ${theme2.colors.border}`,
|
|
1498
|
-
backgroundColor: selectedRepoId === repo.id ? `${theme2.colors.primary}10` : theme2.colors.surface,
|
|
1499
|
-
cursor: "pointer",
|
|
1500
|
-
textAlign: "left",
|
|
1501
|
-
display: "flex",
|
|
1502
|
-
flexDirection: "column",
|
|
1503
|
-
gap: "8px"
|
|
1504
|
-
},
|
|
1505
|
-
children: [
|
|
1506
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1507
|
-
((_a = repo.owner) == null ? void 0 : _a.avatar_url) && /* @__PURE__ */ jsx(
|
|
1508
|
-
"img",
|
|
1509
|
-
{
|
|
1510
|
-
src: repo.owner.avatar_url,
|
|
1511
|
-
alt: repo.owner.login,
|
|
1512
|
-
style: { width: 20, height: 20, borderRadius: 4 }
|
|
1513
|
-
}
|
|
1514
|
-
),
|
|
1515
|
-
/* @__PURE__ */ jsx(
|
|
1516
|
-
"span",
|
|
1517
|
-
{
|
|
1518
|
-
style: {
|
|
1519
|
-
fontSize: `${theme2.fontSizes[2]}px`,
|
|
1520
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
1521
|
-
color: theme2.colors.primary
|
|
1522
|
-
},
|
|
1523
|
-
children: repo.full_name
|
|
1524
|
-
}
|
|
1525
|
-
),
|
|
1526
|
-
repo.private && /* @__PURE__ */ jsx(
|
|
1527
|
-
"span",
|
|
1528
|
-
{
|
|
1529
|
-
style: {
|
|
1530
|
-
fontSize: `${theme2.fontSizes[0]}px`,
|
|
1531
|
-
padding: "2px 6px",
|
|
1532
|
-
borderRadius: "4px",
|
|
1533
|
-
backgroundColor: theme2.colors.backgroundTertiary,
|
|
1534
|
-
color: theme2.colors.textSecondary
|
|
1535
|
-
},
|
|
1536
|
-
children: "Private"
|
|
1537
|
-
}
|
|
1538
|
-
)
|
|
1539
|
-
] }),
|
|
1540
|
-
repo.description && /* @__PURE__ */ jsx(
|
|
1541
|
-
"p",
|
|
1542
|
-
{
|
|
1543
|
-
style: {
|
|
1544
|
-
margin: 0,
|
|
1545
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1546
|
-
color: theme2.colors.textSecondary,
|
|
1547
|
-
overflow: "hidden",
|
|
1548
|
-
textOverflow: "ellipsis",
|
|
1549
|
-
display: "-webkit-box",
|
|
1550
|
-
WebkitLineClamp: 2,
|
|
1551
|
-
WebkitBoxOrient: "vertical"
|
|
1552
|
-
},
|
|
1553
|
-
children: repo.description
|
|
1554
|
-
}
|
|
1555
|
-
),
|
|
1556
|
-
/* @__PURE__ */ jsxs(
|
|
1557
|
-
"div",
|
|
1558
|
-
{
|
|
1559
|
-
style: {
|
|
1560
|
-
display: "flex",
|
|
1561
|
-
alignItems: "center",
|
|
1562
|
-
gap: "16px",
|
|
1563
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1564
|
-
color: theme2.colors.textSecondary
|
|
1565
|
-
},
|
|
1566
|
-
children: [
|
|
1567
|
-
repo.language && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1568
|
-
/* @__PURE__ */ jsx(
|
|
1569
|
-
"span",
|
|
1570
|
-
{
|
|
1571
|
-
style: {
|
|
1572
|
-
width: 10,
|
|
1573
|
-
height: 10,
|
|
1574
|
-
borderRadius: "50%",
|
|
1575
|
-
backgroundColor: theme2.colors.info
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
),
|
|
1579
|
-
repo.language
|
|
1580
|
-
] }),
|
|
1581
|
-
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1582
|
-
/* @__PURE__ */ jsx(Star, { size: 14 }),
|
|
1583
|
-
formatNumber(repo.stargazers_count || 0)
|
|
1584
|
-
] }),
|
|
1585
|
-
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1586
|
-
/* @__PURE__ */ jsx(GitFork, { size: 14 }),
|
|
1587
|
-
formatNumber(repo.forks_count || 0)
|
|
1588
|
-
] }),
|
|
1589
|
-
/* @__PURE__ */ jsx(
|
|
1590
|
-
"a",
|
|
1591
|
-
{
|
|
1592
|
-
href: repo.html_url,
|
|
1593
|
-
target: "_blank",
|
|
1594
|
-
rel: "noopener noreferrer",
|
|
1595
|
-
onClick: (e) => e.stopPropagation(),
|
|
1596
|
-
style: {
|
|
1597
|
-
marginLeft: "auto",
|
|
1598
|
-
color: theme2.colors.textSecondary,
|
|
1599
|
-
display: "flex",
|
|
1600
|
-
alignItems: "center"
|
|
1601
|
-
},
|
|
1602
|
-
children: /* @__PURE__ */ jsx(ExternalLink, { size: 14 })
|
|
1603
|
-
}
|
|
1604
|
-
)
|
|
1605
|
-
]
|
|
1606
|
-
}
|
|
1607
|
-
)
|
|
1608
|
-
]
|
|
1609
|
-
},
|
|
1610
|
-
repo.id
|
|
1611
|
-
);
|
|
1612
|
-
})
|
|
1990
|
+
results.map((repo) => /* @__PURE__ */ jsx(
|
|
1991
|
+
GitHubRepositoryCard,
|
|
1992
|
+
{
|
|
1993
|
+
repository: repo,
|
|
1994
|
+
onSelect: handleSelectRepository,
|
|
1995
|
+
isSelected: selectedRepoId === repo.id,
|
|
1996
|
+
onAddToCollection: currentWorkspace ? handleAddToCollection : void 0,
|
|
1997
|
+
isInCollection: collectionRepoSet.has(repo.full_name),
|
|
1998
|
+
collectionName
|
|
1999
|
+
},
|
|
2000
|
+
repo.id
|
|
2001
|
+
))
|
|
1613
2002
|
]
|
|
1614
2003
|
}
|
|
1615
2004
|
),
|
|
@@ -1631,7 +2020,7 @@ const GitHubSearchPanelMetadata = {
|
|
|
1631
2020
|
description: "Search for repositories on GitHub",
|
|
1632
2021
|
icon: "search",
|
|
1633
2022
|
version: "0.1.0",
|
|
1634
|
-
slices: [],
|
|
2023
|
+
slices: ["workspace", "workspaceRepositories"],
|
|
1635
2024
|
surfaces: ["panel"]
|
|
1636
2025
|
};
|
|
1637
2026
|
const formatDate$1 = (dateString) => {
|
|
@@ -1642,9 +2031,12 @@ const formatDate$1 = (dateString) => {
|
|
|
1642
2031
|
if (diffDays === 0) return "Today";
|
|
1643
2032
|
if (diffDays === 1) return "Yesterday";
|
|
1644
2033
|
if (diffDays < 7) return `${diffDays} days ago`;
|
|
1645
|
-
|
|
1646
|
-
if (diffDays <
|
|
1647
|
-
|
|
2034
|
+
const weeks = Math.floor(diffDays / 7);
|
|
2035
|
+
if (diffDays < 30) return `${weeks} ${weeks === 1 ? "week" : "weeks"} ago`;
|
|
2036
|
+
const months = Math.floor(diffDays / 30);
|
|
2037
|
+
if (diffDays < 365) return `${months} ${months === 1 ? "month" : "months"} ago`;
|
|
2038
|
+
const years = Math.floor(diffDays / 365);
|
|
2039
|
+
return `${years} ${years === 1 ? "year" : "years"} ago`;
|
|
1648
2040
|
};
|
|
1649
2041
|
const GitHubIssuesPanelContent = ({
|
|
1650
2042
|
context,
|
|
@@ -1660,9 +2052,6 @@ const GitHubIssuesPanelContent = ({
|
|
|
1660
2052
|
const repo = ((_c = issuesSlice == null ? void 0 : issuesSlice.data) == null ? void 0 : _c.repo) ?? "";
|
|
1661
2053
|
const isAuthenticated = ((_d = issuesSlice == null ? void 0 : issuesSlice.data) == null ? void 0 : _d.isAuthenticated) ?? false;
|
|
1662
2054
|
const sliceError = (_e = issuesSlice == null ? void 0 : issuesSlice.data) == null ? void 0 : _e.error;
|
|
1663
|
-
const [selectedIssues, setSelectedIssues] = useState(/* @__PURE__ */ new Set());
|
|
1664
|
-
const [copiedPrompt, setCopiedPrompt] = useState(false);
|
|
1665
|
-
const [issueFilter, setIssueFilter] = useState("open");
|
|
1666
2055
|
useEffect(() => {
|
|
1667
2056
|
events.emit({
|
|
1668
2057
|
type: "github-issues:request",
|
|
@@ -1671,36 +2060,10 @@ const GitHubIssuesPanelContent = ({
|
|
|
1671
2060
|
payload: {}
|
|
1672
2061
|
});
|
|
1673
2062
|
}, [events]);
|
|
1674
|
-
const
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
const issueCounts = useMemo(() => ({
|
|
1679
|
-
all: issues.length,
|
|
1680
|
-
open: issues.filter((i) => i.state === "open").length,
|
|
1681
|
-
closed: issues.filter((i) => i.state === "closed").length
|
|
1682
|
-
}), [issues]);
|
|
1683
|
-
const handleSelectAll = () => {
|
|
1684
|
-
if (selectedIssues.size === filteredIssues.length) {
|
|
1685
|
-
setSelectedIssues(/* @__PURE__ */ new Set());
|
|
1686
|
-
} else {
|
|
1687
|
-
setSelectedIssues(new Set(filteredIssues.map((i) => i.number)));
|
|
1688
|
-
}
|
|
1689
|
-
};
|
|
1690
|
-
const handleToggleIssue = (issueNumber, event) => {
|
|
1691
|
-
const newSelected = new Set(selectedIssues);
|
|
1692
|
-
if (newSelected.has(issueNumber)) {
|
|
1693
|
-
newSelected.delete(issueNumber);
|
|
1694
|
-
} else {
|
|
1695
|
-
newSelected.add(issueNumber);
|
|
1696
|
-
}
|
|
1697
|
-
setSelectedIssues(newSelected);
|
|
1698
|
-
};
|
|
1699
|
-
const handleIssueClick = (issue, event) => {
|
|
1700
|
-
const target = event.target;
|
|
1701
|
-
if (target.tagName === "INPUT" || target.closest("a")) {
|
|
1702
|
-
return;
|
|
1703
|
-
}
|
|
2063
|
+
const openIssues = useMemo(() => {
|
|
2064
|
+
return issues.filter((issue) => issue.state === "open");
|
|
2065
|
+
}, [issues]);
|
|
2066
|
+
const handleIssueClick = (issue) => {
|
|
1704
2067
|
events.emit({
|
|
1705
2068
|
type: "issue:selected",
|
|
1706
2069
|
source: "github-issues-panel",
|
|
@@ -1728,46 +2091,6 @@ const GitHubIssuesPanelContent = ({
|
|
|
1728
2091
|
payload: {}
|
|
1729
2092
|
});
|
|
1730
2093
|
};
|
|
1731
|
-
const generatePrompt = () => {
|
|
1732
|
-
const selectedIssueData = issues.filter(
|
|
1733
|
-
(i) => selectedIssues.has(i.number)
|
|
1734
|
-
);
|
|
1735
|
-
if (selectedIssueData.length === 0) return "";
|
|
1736
|
-
let prompt = `I'm working on the GitHub repository ${owner}/${repo}. Here are the issues I need help with:
|
|
1737
|
-
|
|
1738
|
-
`;
|
|
1739
|
-
selectedIssueData.forEach((issue) => {
|
|
1740
|
-
prompt += `## Issue #${issue.number}: ${issue.title}
|
|
1741
|
-
`;
|
|
1742
|
-
prompt += `- Status: ${issue.state}
|
|
1743
|
-
`;
|
|
1744
|
-
prompt += `- URL: ${issue.html_url}
|
|
1745
|
-
`;
|
|
1746
|
-
if (issue.labels.length > 0) {
|
|
1747
|
-
prompt += `- Labels: ${issue.labels.map((l) => l.name).join(", ")}
|
|
1748
|
-
`;
|
|
1749
|
-
}
|
|
1750
|
-
if (issue.body) {
|
|
1751
|
-
prompt += `- Description:
|
|
1752
|
-
${issue.body}
|
|
1753
|
-
`;
|
|
1754
|
-
}
|
|
1755
|
-
prompt += "\n";
|
|
1756
|
-
});
|
|
1757
|
-
prompt += `Please help me understand and address these issues.`;
|
|
1758
|
-
return prompt;
|
|
1759
|
-
};
|
|
1760
|
-
const handleCopyPrompt = async () => {
|
|
1761
|
-
const prompt = generatePrompt();
|
|
1762
|
-
if (!prompt) return;
|
|
1763
|
-
try {
|
|
1764
|
-
await navigator.clipboard.writeText(prompt);
|
|
1765
|
-
setCopiedPrompt(true);
|
|
1766
|
-
setTimeout(() => setCopiedPrompt(false), 2e3);
|
|
1767
|
-
} catch (err) {
|
|
1768
|
-
console.error("Failed to copy to clipboard:", err);
|
|
1769
|
-
}
|
|
1770
|
-
};
|
|
1771
2094
|
const renderState = (icon, title, description, action) => /* @__PURE__ */ jsx(
|
|
1772
2095
|
"div",
|
|
1773
2096
|
{
|
|
@@ -1926,164 +2249,66 @@ ${issue.body}
|
|
|
1926
2249
|
fontFamily: theme2.fonts.body
|
|
1927
2250
|
},
|
|
1928
2251
|
children: [
|
|
1929
|
-
/* @__PURE__ */
|
|
2252
|
+
/* @__PURE__ */ jsx(
|
|
1930
2253
|
"div",
|
|
1931
2254
|
{
|
|
1932
2255
|
style: {
|
|
2256
|
+
position: "relative",
|
|
1933
2257
|
height: "40px",
|
|
1934
|
-
minHeight: "40px",
|
|
1935
2258
|
padding: "0 16px",
|
|
1936
|
-
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
1937
|
-
display: "flex",
|
|
1938
|
-
alignItems: "center",
|
|
1939
|
-
gap: "12px",
|
|
1940
|
-
boxSizing: "border-box"
|
|
1941
|
-
},
|
|
1942
|
-
children: [
|
|
1943
|
-
/* @__PURE__ */ jsx(Github, { size: 20, color: theme2.colors.primary }),
|
|
1944
|
-
/* @__PURE__ */ jsx(
|
|
1945
|
-
"h2",
|
|
1946
|
-
{
|
|
1947
|
-
style: {
|
|
1948
|
-
margin: 0,
|
|
1949
|
-
fontSize: `${theme2.fontSizes[3]}px`,
|
|
1950
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
1951
|
-
flex: 1
|
|
1952
|
-
},
|
|
1953
|
-
children: "Issues"
|
|
1954
|
-
}
|
|
1955
|
-
),
|
|
1956
|
-
/* @__PURE__ */ jsxs(
|
|
1957
|
-
"span",
|
|
1958
|
-
{
|
|
1959
|
-
style: {
|
|
1960
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1961
|
-
color: theme2.colors.textSecondary
|
|
1962
|
-
},
|
|
1963
|
-
children: [
|
|
1964
|
-
owner,
|
|
1965
|
-
"/",
|
|
1966
|
-
repo
|
|
1967
|
-
]
|
|
1968
|
-
}
|
|
1969
|
-
)
|
|
1970
|
-
]
|
|
1971
|
-
}
|
|
1972
|
-
),
|
|
1973
|
-
/* @__PURE__ */ jsxs(
|
|
1974
|
-
"div",
|
|
1975
|
-
{
|
|
1976
|
-
style: {
|
|
1977
2259
|
display: "flex",
|
|
1978
|
-
|
|
1979
|
-
justifyContent: "
|
|
1980
|
-
padding: "12px 16px",
|
|
2260
|
+
flexDirection: "column",
|
|
2261
|
+
justifyContent: "center",
|
|
1981
2262
|
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
1982
|
-
backgroundColor: theme2.colors.
|
|
1983
|
-
|
|
1984
|
-
gap: "8px"
|
|
2263
|
+
backgroundColor: theme2.colors.backgroundLight,
|
|
2264
|
+
boxSizing: "border-box"
|
|
1985
2265
|
},
|
|
1986
|
-
children:
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
children: selectedIssues.size === filteredIssues.length ? "Deselect All" : "Select All"
|
|
2030
|
-
}
|
|
2031
|
-
)
|
|
2032
|
-
] }),
|
|
2033
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
2034
|
-
/* @__PURE__ */ jsx(
|
|
2035
|
-
"button",
|
|
2036
|
-
{
|
|
2037
|
-
type: "button",
|
|
2038
|
-
onClick: handleRefresh,
|
|
2039
|
-
disabled: isLoading,
|
|
2040
|
-
style: {
|
|
2041
|
-
display: "flex",
|
|
2042
|
-
alignItems: "center",
|
|
2043
|
-
gap: "6px",
|
|
2044
|
-
padding: "6px 12px",
|
|
2045
|
-
borderRadius: "6px",
|
|
2046
|
-
border: `1px solid ${theme2.colors.border}`,
|
|
2047
|
-
backgroundColor: theme2.colors.background,
|
|
2048
|
-
color: theme2.colors.text,
|
|
2049
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
2050
|
-
cursor: isLoading ? "not-allowed" : "pointer",
|
|
2051
|
-
opacity: isLoading ? 0.5 : 1
|
|
2052
|
-
},
|
|
2053
|
-
children: /* @__PURE__ */ jsx(RefreshCw, { size: 14, className: isLoading ? "animate-spin" : "" })
|
|
2054
|
-
}
|
|
2055
|
-
),
|
|
2056
|
-
/* @__PURE__ */ jsxs(
|
|
2057
|
-
"button",
|
|
2058
|
-
{
|
|
2059
|
-
type: "button",
|
|
2060
|
-
onClick: handleCopyPrompt,
|
|
2061
|
-
disabled: selectedIssues.size === 0,
|
|
2062
|
-
style: {
|
|
2063
|
-
display: "flex",
|
|
2064
|
-
alignItems: "center",
|
|
2065
|
-
gap: "6px",
|
|
2066
|
-
padding: "6px 12px",
|
|
2067
|
-
borderRadius: "6px",
|
|
2068
|
-
border: "none",
|
|
2069
|
-
backgroundColor: selectedIssues.size > 0 ? theme2.colors.primary : theme2.colors.backgroundTertiary,
|
|
2070
|
-
color: selectedIssues.size > 0 ? theme2.colors.background : theme2.colors.textSecondary,
|
|
2071
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
2072
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
2073
|
-
cursor: selectedIssues.size > 0 ? "pointer" : "not-allowed",
|
|
2074
|
-
opacity: selectedIssues.size > 0 ? 1 : 0.5
|
|
2075
|
-
},
|
|
2076
|
-
children: [
|
|
2077
|
-
copiedPrompt ? /* @__PURE__ */ jsx(CircleCheck, { size: 14 }) : /* @__PURE__ */ jsx(Copy, { size: 14 }),
|
|
2078
|
-
copiedPrompt ? "Copied!" : `Copy Prompt (${selectedIssues.size})`
|
|
2079
|
-
]
|
|
2080
|
-
}
|
|
2081
|
-
)
|
|
2082
|
-
] })
|
|
2083
|
-
]
|
|
2266
|
+
children: /* @__PURE__ */ jsxs(
|
|
2267
|
+
"div",
|
|
2268
|
+
{
|
|
2269
|
+
style: {
|
|
2270
|
+
display: "flex",
|
|
2271
|
+
alignItems: "center",
|
|
2272
|
+
justifyContent: "space-between"
|
|
2273
|
+
},
|
|
2274
|
+
children: [
|
|
2275
|
+
/* @__PURE__ */ jsx(
|
|
2276
|
+
"span",
|
|
2277
|
+
{
|
|
2278
|
+
style: {
|
|
2279
|
+
fontFamily: theme2.fonts.body,
|
|
2280
|
+
fontSize: theme2.fontSizes[1],
|
|
2281
|
+
color: theme2.colors.textSecondary,
|
|
2282
|
+
fontWeight: 500
|
|
2283
|
+
},
|
|
2284
|
+
children: "Open Issues"
|
|
2285
|
+
}
|
|
2286
|
+
),
|
|
2287
|
+
/* @__PURE__ */ jsx(
|
|
2288
|
+
"button",
|
|
2289
|
+
{
|
|
2290
|
+
type: "button",
|
|
2291
|
+
onClick: handleRefresh,
|
|
2292
|
+
disabled: isLoading,
|
|
2293
|
+
style: {
|
|
2294
|
+
background: "none",
|
|
2295
|
+
border: "none",
|
|
2296
|
+
cursor: isLoading ? "not-allowed" : "pointer",
|
|
2297
|
+
padding: "4px",
|
|
2298
|
+
color: theme2.colors.textSecondary,
|
|
2299
|
+
opacity: isLoading ? 0.5 : 1,
|
|
2300
|
+
display: "flex",
|
|
2301
|
+
alignItems: "center"
|
|
2302
|
+
},
|
|
2303
|
+
children: /* @__PURE__ */ jsx(RefreshCw, { size: 14, className: isLoading ? "animate-spin" : "" })
|
|
2304
|
+
}
|
|
2305
|
+
)
|
|
2306
|
+
]
|
|
2307
|
+
}
|
|
2308
|
+
)
|
|
2084
2309
|
}
|
|
2085
2310
|
),
|
|
2086
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children:
|
|
2311
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: openIssues.length === 0 ? /* @__PURE__ */ jsxs(
|
|
2087
2312
|
"div",
|
|
2088
2313
|
{
|
|
2089
2314
|
style: {
|
|
@@ -2106,14 +2331,10 @@ ${issue.body}
|
|
|
2106
2331
|
marginBottom: "8px",
|
|
2107
2332
|
fontSize: `${theme2.fontSizes[3]}px`
|
|
2108
2333
|
},
|
|
2109
|
-
children: "No Issues
|
|
2334
|
+
children: "No Open Issues"
|
|
2110
2335
|
}
|
|
2111
2336
|
),
|
|
2112
|
-
/* @__PURE__ */
|
|
2113
|
-
"There are no ",
|
|
2114
|
-
issueFilter !== "all" ? issueFilter : "",
|
|
2115
|
-
" issues in this repository."
|
|
2116
|
-
] })
|
|
2337
|
+
/* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: `${theme2.fontSizes[2]}px` }, children: "There are no open issues in this repository." })
|
|
2117
2338
|
] })
|
|
2118
2339
|
]
|
|
2119
2340
|
}
|
|
@@ -2121,236 +2342,126 @@ ${issue.body}
|
|
|
2121
2342
|
"div",
|
|
2122
2343
|
{
|
|
2123
2344
|
style: { display: "flex", flexDirection: "column" },
|
|
2124
|
-
children:
|
|
2345
|
+
children: openIssues.map((issue) => /* @__PURE__ */ jsx(
|
|
2125
2346
|
"button",
|
|
2126
2347
|
{
|
|
2127
2348
|
type: "button",
|
|
2128
|
-
onClick: (
|
|
2349
|
+
onClick: () => handleIssueClick(issue),
|
|
2129
2350
|
style: {
|
|
2130
2351
|
width: "100%",
|
|
2131
|
-
padding: "
|
|
2352
|
+
padding: "16px 16px",
|
|
2132
2353
|
borderRadius: 0,
|
|
2133
2354
|
border: "none",
|
|
2134
|
-
borderBottom: `1px solid ${
|
|
2135
|
-
backgroundColor:
|
|
2355
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
2356
|
+
backgroundColor: theme2.colors.surface,
|
|
2136
2357
|
cursor: "pointer",
|
|
2137
2358
|
textAlign: "left"
|
|
2138
2359
|
},
|
|
2139
|
-
children: /* @__PURE__ */ jsxs(
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
onChange: () => handleToggleIssue(issue.number),
|
|
2154
|
-
onClick: (e) => e.stopPropagation(),
|
|
2155
|
-
style: { marginTop: "2px", cursor: "pointer" }
|
|
2156
|
-
}
|
|
2157
|
-
),
|
|
2158
|
-
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
2159
|
-
/* @__PURE__ */ jsxs(
|
|
2160
|
-
"div",
|
|
2360
|
+
children: /* @__PURE__ */ jsxs("div", { style: { minWidth: 0 }, children: [
|
|
2361
|
+
issue.labels.length > 0 && /* @__PURE__ */ jsxs(
|
|
2362
|
+
"div",
|
|
2363
|
+
{
|
|
2364
|
+
style: {
|
|
2365
|
+
display: "flex",
|
|
2366
|
+
alignItems: "center",
|
|
2367
|
+
gap: "8px",
|
|
2368
|
+
marginBottom: "6px",
|
|
2369
|
+
flexWrap: "wrap"
|
|
2370
|
+
},
|
|
2371
|
+
children: [
|
|
2372
|
+
issue.labels.slice(0, 3).map((label) => /* @__PURE__ */ jsxs(
|
|
2373
|
+
"span",
|
|
2161
2374
|
{
|
|
2162
2375
|
style: {
|
|
2163
|
-
display: "flex",
|
|
2376
|
+
display: "inline-flex",
|
|
2164
2377
|
alignItems: "center",
|
|
2165
|
-
gap: "
|
|
2166
|
-
|
|
2167
|
-
|
|
2378
|
+
gap: "4px",
|
|
2379
|
+
padding: "2px 6px",
|
|
2380
|
+
borderRadius: "12px",
|
|
2381
|
+
backgroundColor: `#${label.color}22`,
|
|
2382
|
+
color: `#${label.color}`,
|
|
2383
|
+
fontSize: `${theme2.fontSizes[0]}px`,
|
|
2384
|
+
fontWeight: theme2.fontWeights.medium
|
|
2168
2385
|
},
|
|
2169
2386
|
children: [
|
|
2170
|
-
/* @__PURE__ */ jsx(
|
|
2171
|
-
|
|
2172
|
-
{
|
|
2173
|
-
style: {
|
|
2174
|
-
display: "inline-flex",
|
|
2175
|
-
alignItems: "center",
|
|
2176
|
-
padding: "2px 8px",
|
|
2177
|
-
borderRadius: "12px",
|
|
2178
|
-
backgroundColor: issue.state === "open" ? "#22c55e22" : "#6b728022",
|
|
2179
|
-
color: issue.state === "open" ? "#22c55e" : "#6b7280",
|
|
2180
|
-
fontSize: `${theme2.fontSizes[0]}px`,
|
|
2181
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
2182
|
-
textTransform: "uppercase"
|
|
2183
|
-
},
|
|
2184
|
-
children: issue.state
|
|
2185
|
-
}
|
|
2186
|
-
),
|
|
2187
|
-
/* @__PURE__ */ jsxs(
|
|
2188
|
-
"span",
|
|
2189
|
-
{
|
|
2190
|
-
style: {
|
|
2191
|
-
color: theme2.colors.textSecondary,
|
|
2192
|
-
fontSize: `${theme2.fontSizes[1]}px`
|
|
2193
|
-
},
|
|
2194
|
-
children: [
|
|
2195
|
-
"#",
|
|
2196
|
-
issue.number
|
|
2197
|
-
]
|
|
2198
|
-
}
|
|
2199
|
-
),
|
|
2200
|
-
/* @__PURE__ */ jsx(
|
|
2201
|
-
"a",
|
|
2202
|
-
{
|
|
2203
|
-
href: issue.html_url,
|
|
2204
|
-
target: "_blank",
|
|
2205
|
-
rel: "noopener noreferrer",
|
|
2206
|
-
onClick: (e) => e.stopPropagation(),
|
|
2207
|
-
style: {
|
|
2208
|
-
color: theme2.colors.primary,
|
|
2209
|
-
textDecoration: "none",
|
|
2210
|
-
display: "inline-flex",
|
|
2211
|
-
alignItems: "center"
|
|
2212
|
-
},
|
|
2213
|
-
children: /* @__PURE__ */ jsx(ExternalLink, { size: 12 })
|
|
2214
|
-
}
|
|
2215
|
-
)
|
|
2387
|
+
/* @__PURE__ */ jsx(Tag, { size: 10 }),
|
|
2388
|
+
label.name
|
|
2216
2389
|
]
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
style: {
|
|
2223
|
-
margin: 0,
|
|
2224
|
-
marginBottom: "6px",
|
|
2225
|
-
color: theme2.colors.text,
|
|
2226
|
-
fontSize: `${theme2.fontSizes[2]}px`,
|
|
2227
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
2228
|
-
overflow: "hidden",
|
|
2229
|
-
textOverflow: "ellipsis",
|
|
2230
|
-
whiteSpace: "nowrap"
|
|
2231
|
-
},
|
|
2232
|
-
children: issue.title
|
|
2233
|
-
}
|
|
2234
|
-
),
|
|
2235
|
-
issue.labels.length > 0 && /* @__PURE__ */ jsxs(
|
|
2236
|
-
"div",
|
|
2390
|
+
},
|
|
2391
|
+
label.id
|
|
2392
|
+
)),
|
|
2393
|
+
issue.labels.length > 3 && /* @__PURE__ */ jsxs(
|
|
2394
|
+
"span",
|
|
2237
2395
|
{
|
|
2238
2396
|
style: {
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
gap: "4px",
|
|
2242
|
-
marginBottom: "6px"
|
|
2397
|
+
fontSize: `${theme2.fontSizes[0]}px`,
|
|
2398
|
+
color: theme2.colors.textSecondary
|
|
2243
2399
|
},
|
|
2244
2400
|
children: [
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
{
|
|
2248
|
-
style: {
|
|
2249
|
-
display: "inline-flex",
|
|
2250
|
-
alignItems: "center",
|
|
2251
|
-
gap: "4px",
|
|
2252
|
-
padding: "2px 6px",
|
|
2253
|
-
borderRadius: "12px",
|
|
2254
|
-
backgroundColor: `#${label.color}22`,
|
|
2255
|
-
color: `#${label.color}`,
|
|
2256
|
-
fontSize: `${theme2.fontSizes[0]}px`,
|
|
2257
|
-
fontWeight: theme2.fontWeights.medium
|
|
2258
|
-
},
|
|
2259
|
-
children: [
|
|
2260
|
-
/* @__PURE__ */ jsx(Tag, { size: 10 }),
|
|
2261
|
-
label.name
|
|
2262
|
-
]
|
|
2263
|
-
},
|
|
2264
|
-
label.id
|
|
2265
|
-
)),
|
|
2266
|
-
issue.labels.length > 3 && /* @__PURE__ */ jsxs(
|
|
2267
|
-
"span",
|
|
2268
|
-
{
|
|
2269
|
-
style: {
|
|
2270
|
-
fontSize: `${theme2.fontSizes[0]}px`,
|
|
2271
|
-
color: theme2.colors.textSecondary
|
|
2272
|
-
},
|
|
2273
|
-
children: [
|
|
2274
|
-
"+",
|
|
2275
|
-
issue.labels.length - 3
|
|
2276
|
-
]
|
|
2277
|
-
}
|
|
2278
|
-
)
|
|
2401
|
+
"+",
|
|
2402
|
+
issue.labels.length - 3
|
|
2279
2403
|
]
|
|
2280
2404
|
}
|
|
2281
|
-
)
|
|
2282
|
-
|
|
2283
|
-
|
|
2405
|
+
)
|
|
2406
|
+
]
|
|
2407
|
+
}
|
|
2408
|
+
),
|
|
2409
|
+
/* @__PURE__ */ jsx(
|
|
2410
|
+
"h4",
|
|
2411
|
+
{
|
|
2412
|
+
style: {
|
|
2413
|
+
margin: 0,
|
|
2414
|
+
marginBottom: "6px",
|
|
2415
|
+
color: theme2.colors.text,
|
|
2416
|
+
fontSize: `${theme2.fontSizes[2]}px`,
|
|
2417
|
+
fontWeight: theme2.fontWeights.semibold,
|
|
2418
|
+
overflow: "hidden",
|
|
2419
|
+
textOverflow: "ellipsis",
|
|
2420
|
+
whiteSpace: "nowrap"
|
|
2421
|
+
},
|
|
2422
|
+
children: issue.title
|
|
2423
|
+
}
|
|
2424
|
+
),
|
|
2425
|
+
/* @__PURE__ */ jsxs(
|
|
2426
|
+
"div",
|
|
2427
|
+
{
|
|
2428
|
+
style: {
|
|
2429
|
+
display: "flex",
|
|
2430
|
+
alignItems: "center",
|
|
2431
|
+
gap: "6px",
|
|
2432
|
+
fontSize: `${theme2.fontSizes[0]}px`,
|
|
2433
|
+
color: theme2.colors.textSecondary,
|
|
2434
|
+
flexWrap: "wrap"
|
|
2435
|
+
},
|
|
2436
|
+
children: [
|
|
2437
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
2438
|
+
"#",
|
|
2439
|
+
issue.number
|
|
2440
|
+
] }),
|
|
2441
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
2442
|
+
"Created by",
|
|
2443
|
+
" ",
|
|
2444
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: issue.user.login })
|
|
2445
|
+
] }),
|
|
2446
|
+
/* @__PURE__ */ jsx("span", { children: formatDate$1(issue.created_at) }),
|
|
2447
|
+
issue.comments > 0 && /* @__PURE__ */ jsxs(
|
|
2448
|
+
"span",
|
|
2284
2449
|
{
|
|
2285
2450
|
style: {
|
|
2286
2451
|
display: "flex",
|
|
2287
2452
|
alignItems: "center",
|
|
2288
|
-
gap: "
|
|
2289
|
-
fontSize: `${theme2.fontSizes[0]}px`,
|
|
2290
|
-
color: theme2.colors.textSecondary,
|
|
2291
|
-
flexWrap: "wrap"
|
|
2453
|
+
gap: "4px"
|
|
2292
2454
|
},
|
|
2293
2455
|
children: [
|
|
2294
|
-
/* @__PURE__ */
|
|
2295
|
-
|
|
2296
|
-
{
|
|
2297
|
-
style: {
|
|
2298
|
-
display: "flex",
|
|
2299
|
-
alignItems: "center",
|
|
2300
|
-
gap: "4px"
|
|
2301
|
-
},
|
|
2302
|
-
children: [
|
|
2303
|
-
/* @__PURE__ */ jsx(
|
|
2304
|
-
"img",
|
|
2305
|
-
{
|
|
2306
|
-
src: issue.user.avatar_url,
|
|
2307
|
-
alt: issue.user.login,
|
|
2308
|
-
style: {
|
|
2309
|
-
width: "14px",
|
|
2310
|
-
height: "14px",
|
|
2311
|
-
borderRadius: "50%"
|
|
2312
|
-
}
|
|
2313
|
-
}
|
|
2314
|
-
),
|
|
2315
|
-
issue.user.login
|
|
2316
|
-
]
|
|
2317
|
-
}
|
|
2318
|
-
),
|
|
2319
|
-
/* @__PURE__ */ jsxs(
|
|
2320
|
-
"span",
|
|
2321
|
-
{
|
|
2322
|
-
style: {
|
|
2323
|
-
display: "flex",
|
|
2324
|
-
alignItems: "center",
|
|
2325
|
-
gap: "4px"
|
|
2326
|
-
},
|
|
2327
|
-
children: [
|
|
2328
|
-
/* @__PURE__ */ jsx(Calendar, { size: 12 }),
|
|
2329
|
-
formatDate$1(issue.created_at)
|
|
2330
|
-
]
|
|
2331
|
-
}
|
|
2332
|
-
),
|
|
2333
|
-
issue.comments > 0 && /* @__PURE__ */ jsxs(
|
|
2334
|
-
"span",
|
|
2335
|
-
{
|
|
2336
|
-
style: {
|
|
2337
|
-
display: "flex",
|
|
2338
|
-
alignItems: "center",
|
|
2339
|
-
gap: "4px"
|
|
2340
|
-
},
|
|
2341
|
-
children: [
|
|
2342
|
-
/* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
|
|
2343
|
-
issue.comments
|
|
2344
|
-
]
|
|
2345
|
-
}
|
|
2346
|
-
)
|
|
2456
|
+
/* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
|
|
2457
|
+
issue.comments
|
|
2347
2458
|
]
|
|
2348
2459
|
}
|
|
2349
2460
|
)
|
|
2350
|
-
]
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
)
|
|
2461
|
+
]
|
|
2462
|
+
}
|
|
2463
|
+
)
|
|
2464
|
+
] })
|
|
2354
2465
|
},
|
|
2355
2466
|
issue.id
|
|
2356
2467
|
))
|
|
@@ -46334,55 +46445,15 @@ const formatDate = (dateString) => {
|
|
|
46334
46445
|
const now = /* @__PURE__ */ new Date();
|
|
46335
46446
|
const diffMs = now.getTime() - date.getTime();
|
|
46336
46447
|
const diffDays = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
|
|
46337
|
-
if (diffDays === 0) return "
|
|
46338
|
-
if (diffDays === 1) return "
|
|
46448
|
+
if (diffDays === 0) return "today";
|
|
46449
|
+
if (diffDays === 1) return "yesterday";
|
|
46339
46450
|
if (diffDays < 7) return `${diffDays} days ago`;
|
|
46340
|
-
|
|
46341
|
-
if (diffDays <
|
|
46342
|
-
|
|
46343
|
-
}
|
|
46344
|
-
const
|
|
46345
|
-
|
|
46346
|
-
const isOpen = state === "open";
|
|
46347
|
-
return /* @__PURE__ */ jsx(
|
|
46348
|
-
"span",
|
|
46349
|
-
{
|
|
46350
|
-
style: {
|
|
46351
|
-
display: "inline-flex",
|
|
46352
|
-
alignItems: "center",
|
|
46353
|
-
padding: "4px 12px",
|
|
46354
|
-
borderRadius: "12px",
|
|
46355
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
46356
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
46357
|
-
backgroundColor: isOpen ? "#22c55e22" : "#6b728022",
|
|
46358
|
-
color: isOpen ? "#22c55e" : "#6b7280",
|
|
46359
|
-
textTransform: "uppercase"
|
|
46360
|
-
},
|
|
46361
|
-
children: state
|
|
46362
|
-
}
|
|
46363
|
-
);
|
|
46364
|
-
};
|
|
46365
|
-
const MetadataRow = ({ icon, label, value }) => {
|
|
46366
|
-
const { theme: theme2 } = useTheme();
|
|
46367
|
-
return /* @__PURE__ */ jsxs(
|
|
46368
|
-
"div",
|
|
46369
|
-
{
|
|
46370
|
-
style: {
|
|
46371
|
-
display: "flex",
|
|
46372
|
-
alignItems: "center",
|
|
46373
|
-
gap: "8px",
|
|
46374
|
-
fontSize: `${theme2.fontSizes[1]}px`
|
|
46375
|
-
},
|
|
46376
|
-
children: [
|
|
46377
|
-
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary, display: "flex", alignItems: "center" }, children: icon }),
|
|
46378
|
-
/* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.textSecondary }, children: [
|
|
46379
|
-
label,
|
|
46380
|
-
":"
|
|
46381
|
-
] }),
|
|
46382
|
-
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.text }, children: value })
|
|
46383
|
-
]
|
|
46384
|
-
}
|
|
46385
|
-
);
|
|
46451
|
+
const weeks = Math.floor(diffDays / 7);
|
|
46452
|
+
if (diffDays < 30) return `${weeks} ${weeks === 1 ? "week" : "weeks"} ago`;
|
|
46453
|
+
const months = Math.floor(diffDays / 30);
|
|
46454
|
+
if (diffDays < 365) return `${months} ${months === 1 ? "month" : "months"} ago`;
|
|
46455
|
+
const years = Math.floor(diffDays / 365);
|
|
46456
|
+
return `${years} ${years === 1 ? "year" : "years"} ago`;
|
|
46386
46457
|
};
|
|
46387
46458
|
const GitHubIssueDetailPanelContent = ({ events }) => {
|
|
46388
46459
|
const { theme: theme2 } = useTheme();
|
|
@@ -46416,32 +46487,40 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
|
|
|
46416
46487
|
});
|
|
46417
46488
|
}
|
|
46418
46489
|
};
|
|
46490
|
+
const containerStyle = {
|
|
46491
|
+
display: "flex",
|
|
46492
|
+
flexDirection: "column",
|
|
46493
|
+
height: "100%",
|
|
46494
|
+
backgroundColor: theme2.colors.background,
|
|
46495
|
+
overflow: "hidden"
|
|
46496
|
+
};
|
|
46419
46497
|
if (!selectedIssue) {
|
|
46420
|
-
return /* @__PURE__ */ jsxs(
|
|
46498
|
+
return /* @__PURE__ */ jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsxs(
|
|
46421
46499
|
"div",
|
|
46422
46500
|
{
|
|
46423
46501
|
style: {
|
|
46424
|
-
|
|
46502
|
+
flex: 1,
|
|
46425
46503
|
display: "flex",
|
|
46426
46504
|
flexDirection: "column",
|
|
46427
46505
|
alignItems: "center",
|
|
46428
46506
|
justifyContent: "center",
|
|
46507
|
+
gap: "16px",
|
|
46429
46508
|
padding: "24px",
|
|
46430
|
-
|
|
46431
|
-
color: theme2.colors.textSecondary,
|
|
46432
|
-
gap: "16px"
|
|
46509
|
+
textAlign: "center"
|
|
46433
46510
|
},
|
|
46434
46511
|
children: [
|
|
46435
|
-
/* @__PURE__ */ jsx(Github, { size: 48, color: theme2.colors.
|
|
46436
|
-
/* @__PURE__ */ jsxs("div", {
|
|
46512
|
+
/* @__PURE__ */ jsx(Github, { size: 48, style: { color: theme2.colors.textMuted } }),
|
|
46513
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
46437
46514
|
/* @__PURE__ */ jsx(
|
|
46438
46515
|
"h3",
|
|
46439
46516
|
{
|
|
46440
46517
|
style: {
|
|
46441
|
-
margin:
|
|
46442
|
-
|
|
46443
|
-
|
|
46444
|
-
|
|
46518
|
+
margin: 0,
|
|
46519
|
+
marginBottom: "8px",
|
|
46520
|
+
fontFamily: theme2.fonts.heading,
|
|
46521
|
+
fontSize: theme2.fontSizes[3],
|
|
46522
|
+
fontWeight: 600,
|
|
46523
|
+
color: theme2.colors.text
|
|
46445
46524
|
},
|
|
46446
46525
|
children: "No Issue Selected"
|
|
46447
46526
|
}
|
|
@@ -46451,347 +46530,229 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
|
|
|
46451
46530
|
{
|
|
46452
46531
|
style: {
|
|
46453
46532
|
margin: 0,
|
|
46454
|
-
|
|
46455
|
-
|
|
46533
|
+
fontFamily: theme2.fonts.body,
|
|
46534
|
+
fontSize: theme2.fontSizes[1],
|
|
46535
|
+
color: theme2.colors.textSecondary,
|
|
46536
|
+
lineHeight: 1.5
|
|
46456
46537
|
},
|
|
46457
|
-
children: "Click on an issue in the Issues panel to view its details"
|
|
46538
|
+
children: "Click on an issue in the Issues panel to view its details."
|
|
46458
46539
|
}
|
|
46459
46540
|
)
|
|
46460
46541
|
] })
|
|
46461
46542
|
]
|
|
46462
46543
|
}
|
|
46463
|
-
);
|
|
46544
|
+
) });
|
|
46464
46545
|
}
|
|
46465
|
-
|
|
46466
|
-
|
|
46467
|
-
|
|
46468
|
-
|
|
46469
|
-
|
|
46470
|
-
|
|
46471
|
-
|
|
46472
|
-
|
|
46473
|
-
|
|
46474
|
-
|
|
46475
|
-
|
|
46476
|
-
|
|
46477
|
-
|
|
46478
|
-
|
|
46479
|
-
"
|
|
46546
|
+
const isOpen = selectedIssue.state === "open";
|
|
46547
|
+
const statusColor = isOpen ? theme2.colors.success || "#22c55e" : theme2.colors.error || "#ef4444";
|
|
46548
|
+
const statusBg = `${statusColor}20`;
|
|
46549
|
+
const statusLabel = isOpen ? "Open" : "Closed";
|
|
46550
|
+
return /* @__PURE__ */ jsxs("div", { style: containerStyle, children: [
|
|
46551
|
+
/* @__PURE__ */ jsxs(
|
|
46552
|
+
"div",
|
|
46553
|
+
{
|
|
46554
|
+
style: {
|
|
46555
|
+
height: "40px",
|
|
46556
|
+
minHeight: "40px",
|
|
46557
|
+
padding: "0 12px",
|
|
46558
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
46559
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
46560
|
+
display: "flex",
|
|
46561
|
+
alignItems: "center",
|
|
46562
|
+
gap: "12px",
|
|
46563
|
+
boxSizing: "border-box"
|
|
46564
|
+
},
|
|
46565
|
+
children: [
|
|
46566
|
+
/* @__PURE__ */ jsxs(
|
|
46567
|
+
"span",
|
|
46568
|
+
{
|
|
46569
|
+
style: {
|
|
46570
|
+
fontFamily: theme2.fonts.monospace,
|
|
46571
|
+
fontSize: theme2.fontSizes[0],
|
|
46572
|
+
color: theme2.colors.textSecondary
|
|
46573
|
+
},
|
|
46574
|
+
children: [
|
|
46575
|
+
"#",
|
|
46576
|
+
selectedIssue.number
|
|
46577
|
+
]
|
|
46578
|
+
}
|
|
46579
|
+
),
|
|
46580
|
+
/* @__PURE__ */ jsx(
|
|
46581
|
+
"span",
|
|
46582
|
+
{
|
|
46583
|
+
style: {
|
|
46584
|
+
display: "inline-flex",
|
|
46585
|
+
alignItems: "center",
|
|
46586
|
+
gap: "6px",
|
|
46587
|
+
padding: "4px 10px",
|
|
46588
|
+
borderRadius: "999px",
|
|
46589
|
+
backgroundColor: statusBg,
|
|
46590
|
+
color: statusColor,
|
|
46591
|
+
fontFamily: theme2.fonts.heading,
|
|
46592
|
+
fontSize: theme2.fontSizes[0],
|
|
46593
|
+
fontWeight: 600,
|
|
46594
|
+
textTransform: "uppercase"
|
|
46595
|
+
},
|
|
46596
|
+
children: statusLabel
|
|
46597
|
+
}
|
|
46598
|
+
),
|
|
46599
|
+
/* @__PURE__ */ jsxs(
|
|
46600
|
+
"span",
|
|
46601
|
+
{
|
|
46602
|
+
style: {
|
|
46603
|
+
color: theme2.colors.textSecondary,
|
|
46604
|
+
fontSize: theme2.fontSizes[0],
|
|
46605
|
+
fontFamily: theme2.fonts.body
|
|
46606
|
+
},
|
|
46607
|
+
children: [
|
|
46608
|
+
"by ",
|
|
46609
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: selectedIssue.user.login }),
|
|
46610
|
+
" ",
|
|
46611
|
+
formatDate(selectedIssue.created_at)
|
|
46612
|
+
]
|
|
46613
|
+
}
|
|
46614
|
+
),
|
|
46615
|
+
selectedIssue.comments > 0 && /* @__PURE__ */ jsxs(
|
|
46616
|
+
"span",
|
|
46617
|
+
{
|
|
46618
|
+
style: {
|
|
46619
|
+
display: "inline-flex",
|
|
46620
|
+
alignItems: "center",
|
|
46621
|
+
gap: "4px",
|
|
46622
|
+
color: theme2.colors.textSecondary,
|
|
46623
|
+
fontSize: theme2.fontSizes[0]
|
|
46624
|
+
},
|
|
46625
|
+
children: [
|
|
46626
|
+
/* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
|
|
46627
|
+
selectedIssue.comments
|
|
46628
|
+
]
|
|
46629
|
+
}
|
|
46630
|
+
),
|
|
46631
|
+
selectedIssue.assignees && selectedIssue.assignees.length > 0 && /* @__PURE__ */ jsxs(
|
|
46632
|
+
"span",
|
|
46633
|
+
{
|
|
46634
|
+
style: {
|
|
46635
|
+
display: "inline-flex",
|
|
46636
|
+
alignItems: "center",
|
|
46637
|
+
gap: "4px",
|
|
46638
|
+
color: theme2.colors.textSecondary,
|
|
46639
|
+
fontSize: theme2.fontSizes[0],
|
|
46640
|
+
fontFamily: theme2.fonts.body
|
|
46641
|
+
},
|
|
46642
|
+
children: [
|
|
46643
|
+
"assigned to",
|
|
46644
|
+
" ",
|
|
46645
|
+
selectedIssue.assignees.map((assignee, index2) => /* @__PURE__ */ jsxs("span", { children: [
|
|
46646
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: assignee.login }),
|
|
46647
|
+
index2 < selectedIssue.assignees.length - 1 && ", "
|
|
46648
|
+
] }, assignee.login))
|
|
46649
|
+
]
|
|
46650
|
+
}
|
|
46651
|
+
),
|
|
46652
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
46653
|
+
/* @__PURE__ */ jsx(
|
|
46654
|
+
"a",
|
|
46655
|
+
{
|
|
46656
|
+
href: selectedIssue.html_url,
|
|
46657
|
+
target: "_blank",
|
|
46658
|
+
rel: "noopener noreferrer",
|
|
46659
|
+
title: "View on GitHub",
|
|
46660
|
+
style: {
|
|
46661
|
+
display: "inline-flex",
|
|
46662
|
+
alignItems: "center",
|
|
46663
|
+
justifyContent: "center",
|
|
46664
|
+
width: "28px",
|
|
46665
|
+
height: "28px",
|
|
46666
|
+
padding: 0,
|
|
46667
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
46668
|
+
borderRadius: "6px",
|
|
46669
|
+
backgroundColor: theme2.colors.background,
|
|
46670
|
+
color: theme2.colors.textSecondary,
|
|
46671
|
+
textDecoration: "none"
|
|
46672
|
+
},
|
|
46673
|
+
children: /* @__PURE__ */ jsx(ExternalLink, { size: 14 })
|
|
46674
|
+
}
|
|
46675
|
+
),
|
|
46676
|
+
/* @__PURE__ */ jsx(
|
|
46677
|
+
"button",
|
|
46678
|
+
{
|
|
46679
|
+
type: "button",
|
|
46680
|
+
onClick: handleBack,
|
|
46681
|
+
title: "Close",
|
|
46682
|
+
style: {
|
|
46683
|
+
display: "inline-flex",
|
|
46684
|
+
alignItems: "center",
|
|
46685
|
+
justifyContent: "center",
|
|
46686
|
+
width: "28px",
|
|
46687
|
+
height: "28px",
|
|
46688
|
+
padding: 0,
|
|
46689
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
46690
|
+
borderRadius: "6px",
|
|
46691
|
+
backgroundColor: theme2.colors.background,
|
|
46692
|
+
color: theme2.colors.textSecondary,
|
|
46693
|
+
cursor: "pointer"
|
|
46694
|
+
},
|
|
46695
|
+
children: /* @__PURE__ */ jsx(X, { size: 16 })
|
|
46696
|
+
}
|
|
46697
|
+
)
|
|
46698
|
+
]
|
|
46699
|
+
}
|
|
46700
|
+
),
|
|
46701
|
+
/* @__PURE__ */ jsx(
|
|
46702
|
+
"div",
|
|
46703
|
+
{
|
|
46704
|
+
style: {
|
|
46705
|
+
padding: "16px",
|
|
46706
|
+
borderBottom: `1px solid ${theme2.colors.border}`
|
|
46707
|
+
},
|
|
46708
|
+
children: /* @__PURE__ */ jsx(
|
|
46709
|
+
"h1",
|
|
46480
46710
|
{
|
|
46481
46711
|
style: {
|
|
46482
|
-
|
|
46483
|
-
|
|
46484
|
-
|
|
46485
|
-
|
|
46712
|
+
margin: 0,
|
|
46713
|
+
fontFamily: theme2.fonts.heading,
|
|
46714
|
+
fontSize: theme2.fontSizes[4] || 20,
|
|
46715
|
+
fontWeight: 600,
|
|
46716
|
+
color: theme2.colors.text,
|
|
46717
|
+
lineHeight: 1.3
|
|
46486
46718
|
},
|
|
46487
|
-
children:
|
|
46488
|
-
/* @__PURE__ */ jsxs(
|
|
46489
|
-
"div",
|
|
46490
|
-
{
|
|
46491
|
-
style: {
|
|
46492
|
-
display: "flex",
|
|
46493
|
-
alignItems: "center",
|
|
46494
|
-
gap: "12px",
|
|
46495
|
-
marginBottom: "12px"
|
|
46496
|
-
},
|
|
46497
|
-
children: [
|
|
46498
|
-
/* @__PURE__ */ jsx(
|
|
46499
|
-
"button",
|
|
46500
|
-
{
|
|
46501
|
-
type: "button",
|
|
46502
|
-
onClick: handleBack,
|
|
46503
|
-
style: {
|
|
46504
|
-
display: "flex",
|
|
46505
|
-
alignItems: "center",
|
|
46506
|
-
justifyContent: "center",
|
|
46507
|
-
width: "32px",
|
|
46508
|
-
height: "32px",
|
|
46509
|
-
border: `1px solid ${theme2.colors.border}`,
|
|
46510
|
-
borderRadius: "6px",
|
|
46511
|
-
background: theme2.colors.surface,
|
|
46512
|
-
cursor: "pointer",
|
|
46513
|
-
color: theme2.colors.textSecondary
|
|
46514
|
-
},
|
|
46515
|
-
title: "Back",
|
|
46516
|
-
children: /* @__PURE__ */ jsx(ArrowLeft, { size: 16 })
|
|
46517
|
-
}
|
|
46518
|
-
),
|
|
46519
|
-
/* @__PURE__ */ jsxs(
|
|
46520
|
-
"span",
|
|
46521
|
-
{
|
|
46522
|
-
style: {
|
|
46523
|
-
fontFamily: theme2.fonts.monospace || "monospace",
|
|
46524
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
46525
|
-
color: theme2.colors.textSecondary
|
|
46526
|
-
},
|
|
46527
|
-
children: [
|
|
46528
|
-
"#",
|
|
46529
|
-
selectedIssue.number
|
|
46530
|
-
]
|
|
46531
|
-
}
|
|
46532
|
-
),
|
|
46533
|
-
/* @__PURE__ */ jsx(StatusBadge, { state: selectedIssue.state }),
|
|
46534
|
-
owner && repo && /* @__PURE__ */ jsxs(
|
|
46535
|
-
"span",
|
|
46536
|
-
{
|
|
46537
|
-
style: {
|
|
46538
|
-
fontSize: `${theme2.fontSizes[0]}px`,
|
|
46539
|
-
color: theme2.colors.textSecondary,
|
|
46540
|
-
marginLeft: "auto"
|
|
46541
|
-
},
|
|
46542
|
-
children: [
|
|
46543
|
-
owner,
|
|
46544
|
-
"/",
|
|
46545
|
-
repo
|
|
46546
|
-
]
|
|
46547
|
-
}
|
|
46548
|
-
)
|
|
46549
|
-
]
|
|
46550
|
-
}
|
|
46551
|
-
),
|
|
46552
|
-
/* @__PURE__ */ jsx(
|
|
46553
|
-
"h1",
|
|
46554
|
-
{
|
|
46555
|
-
style: {
|
|
46556
|
-
margin: "0 0 16px 0",
|
|
46557
|
-
fontSize: `${theme2.fontSizes[5]}px`,
|
|
46558
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
46559
|
-
color: theme2.colors.text,
|
|
46560
|
-
lineHeight: 1.3
|
|
46561
|
-
},
|
|
46562
|
-
children: selectedIssue.title
|
|
46563
|
-
}
|
|
46564
|
-
),
|
|
46565
|
-
/* @__PURE__ */ jsxs(
|
|
46566
|
-
"div",
|
|
46567
|
-
{
|
|
46568
|
-
style: {
|
|
46569
|
-
display: "grid",
|
|
46570
|
-
gridTemplateColumns: "repeat(auto-fit, minmax(180px, 1fr))",
|
|
46571
|
-
gap: "12px"
|
|
46572
|
-
},
|
|
46573
|
-
children: [
|
|
46574
|
-
/* @__PURE__ */ jsx(
|
|
46575
|
-
MetadataRow,
|
|
46576
|
-
{
|
|
46577
|
-
icon: /* @__PURE__ */ jsx(User, { size: 14 }),
|
|
46578
|
-
label: "Author",
|
|
46579
|
-
value: /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
46580
|
-
/* @__PURE__ */ jsx(
|
|
46581
|
-
"img",
|
|
46582
|
-
{
|
|
46583
|
-
src: selectedIssue.user.avatar_url,
|
|
46584
|
-
alt: selectedIssue.user.login,
|
|
46585
|
-
style: {
|
|
46586
|
-
width: "16px",
|
|
46587
|
-
height: "16px",
|
|
46588
|
-
borderRadius: "50%"
|
|
46589
|
-
}
|
|
46590
|
-
}
|
|
46591
|
-
),
|
|
46592
|
-
selectedIssue.user.login
|
|
46593
|
-
] })
|
|
46594
|
-
}
|
|
46595
|
-
),
|
|
46596
|
-
/* @__PURE__ */ jsx(
|
|
46597
|
-
MetadataRow,
|
|
46598
|
-
{
|
|
46599
|
-
icon: /* @__PURE__ */ jsx(Calendar, { size: 14 }),
|
|
46600
|
-
label: "Created",
|
|
46601
|
-
value: formatDate(selectedIssue.created_at)
|
|
46602
|
-
}
|
|
46603
|
-
),
|
|
46604
|
-
selectedIssue.comments > 0 && /* @__PURE__ */ jsx(
|
|
46605
|
-
MetadataRow,
|
|
46606
|
-
{
|
|
46607
|
-
icon: /* @__PURE__ */ jsx(MessageSquare, { size: 14 }),
|
|
46608
|
-
label: "Comments",
|
|
46609
|
-
value: `${selectedIssue.comments} ${selectedIssue.comments === 1 ? "comment" : "comments"}`
|
|
46610
|
-
}
|
|
46611
|
-
)
|
|
46612
|
-
]
|
|
46613
|
-
}
|
|
46614
|
-
),
|
|
46615
|
-
selectedIssue.labels.length > 0 && /* @__PURE__ */ jsxs(
|
|
46616
|
-
"div",
|
|
46617
|
-
{
|
|
46618
|
-
style: {
|
|
46619
|
-
display: "flex",
|
|
46620
|
-
alignItems: "center",
|
|
46621
|
-
gap: "8px",
|
|
46622
|
-
marginTop: "12px",
|
|
46623
|
-
flexWrap: "wrap"
|
|
46624
|
-
},
|
|
46625
|
-
children: [
|
|
46626
|
-
/* @__PURE__ */ jsx(Tag, { size: 14, color: theme2.colors.textSecondary }),
|
|
46627
|
-
selectedIssue.labels.map((label) => /* @__PURE__ */ jsx(
|
|
46628
|
-
"span",
|
|
46629
|
-
{
|
|
46630
|
-
style: {
|
|
46631
|
-
display: "inline-flex",
|
|
46632
|
-
alignItems: "center",
|
|
46633
|
-
gap: "6px",
|
|
46634
|
-
padding: "4px 12px",
|
|
46635
|
-
borderRadius: "16px",
|
|
46636
|
-
backgroundColor: `#${label.color}22`,
|
|
46637
|
-
color: `#${label.color}`,
|
|
46638
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
46639
|
-
fontWeight: theme2.fontWeights.medium
|
|
46640
|
-
},
|
|
46641
|
-
children: label.name
|
|
46642
|
-
},
|
|
46643
|
-
label.id
|
|
46644
|
-
))
|
|
46645
|
-
]
|
|
46646
|
-
}
|
|
46647
|
-
)
|
|
46648
|
-
]
|
|
46719
|
+
children: selectedIssue.title
|
|
46649
46720
|
}
|
|
46650
|
-
)
|
|
46651
|
-
|
|
46652
|
-
|
|
46721
|
+
)
|
|
46722
|
+
}
|
|
46723
|
+
),
|
|
46724
|
+
/* @__PURE__ */ jsx(
|
|
46725
|
+
"div",
|
|
46726
|
+
{
|
|
46727
|
+
style: {
|
|
46728
|
+
flex: 1,
|
|
46729
|
+
overflow: "auto"
|
|
46730
|
+
},
|
|
46731
|
+
children: selectedIssue.body ? /* @__PURE__ */ jsx(
|
|
46732
|
+
DocumentView,
|
|
46653
46733
|
{
|
|
46654
|
-
|
|
46655
|
-
|
|
46656
|
-
|
|
46657
|
-
|
|
46658
|
-
flexDirection: "column"
|
|
46659
|
-
},
|
|
46660
|
-
children: [
|
|
46661
|
-
selectedIssue.body ? /* @__PURE__ */ jsx(
|
|
46662
|
-
DocumentView,
|
|
46663
|
-
{
|
|
46664
|
-
content: selectedIssue.body,
|
|
46665
|
-
theme: theme2,
|
|
46666
|
-
maxWidth: "100%",
|
|
46667
|
-
transparentBackground: true
|
|
46668
|
-
}
|
|
46669
|
-
) : /* @__PURE__ */ jsx(
|
|
46670
|
-
"div",
|
|
46671
|
-
{
|
|
46672
|
-
style: {
|
|
46673
|
-
flex: 1,
|
|
46674
|
-
display: "flex",
|
|
46675
|
-
alignItems: "center",
|
|
46676
|
-
justifyContent: "center",
|
|
46677
|
-
color: theme2.colors.textSecondary,
|
|
46678
|
-
fontStyle: "italic",
|
|
46679
|
-
padding: "40px"
|
|
46680
|
-
},
|
|
46681
|
-
children: "No description provided"
|
|
46682
|
-
}
|
|
46683
|
-
),
|
|
46684
|
-
selectedIssue.assignees && selectedIssue.assignees.length > 0 && /* @__PURE__ */ jsxs(
|
|
46685
|
-
"div",
|
|
46686
|
-
{
|
|
46687
|
-
style: {
|
|
46688
|
-
marginTop: "20px",
|
|
46689
|
-
padding: "16px",
|
|
46690
|
-
backgroundColor: theme2.colors.backgroundSecondary,
|
|
46691
|
-
borderRadius: "8px",
|
|
46692
|
-
border: `1px solid ${theme2.colors.border}`
|
|
46693
|
-
},
|
|
46694
|
-
children: [
|
|
46695
|
-
/* @__PURE__ */ jsx(
|
|
46696
|
-
"h3",
|
|
46697
|
-
{
|
|
46698
|
-
style: {
|
|
46699
|
-
color: theme2.colors.text,
|
|
46700
|
-
fontSize: `${theme2.fontSizes[2]}px`,
|
|
46701
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
46702
|
-
marginTop: 0,
|
|
46703
|
-
marginBottom: "12px"
|
|
46704
|
-
},
|
|
46705
|
-
children: "Assignees"
|
|
46706
|
-
}
|
|
46707
|
-
),
|
|
46708
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "12px", flexWrap: "wrap" }, children: selectedIssue.assignees.map((assignee) => /* @__PURE__ */ jsxs(
|
|
46709
|
-
"div",
|
|
46710
|
-
{
|
|
46711
|
-
style: {
|
|
46712
|
-
display: "flex",
|
|
46713
|
-
alignItems: "center",
|
|
46714
|
-
gap: "8px",
|
|
46715
|
-
padding: "6px 12px",
|
|
46716
|
-
backgroundColor: theme2.colors.surface,
|
|
46717
|
-
borderRadius: "20px",
|
|
46718
|
-
border: `1px solid ${theme2.colors.border}`
|
|
46719
|
-
},
|
|
46720
|
-
children: [
|
|
46721
|
-
/* @__PURE__ */ jsx(
|
|
46722
|
-
"img",
|
|
46723
|
-
{
|
|
46724
|
-
src: assignee.avatar_url,
|
|
46725
|
-
alt: assignee.login,
|
|
46726
|
-
style: {
|
|
46727
|
-
width: "20px",
|
|
46728
|
-
height: "20px",
|
|
46729
|
-
borderRadius: "50%"
|
|
46730
|
-
}
|
|
46731
|
-
}
|
|
46732
|
-
),
|
|
46733
|
-
/* @__PURE__ */ jsx(
|
|
46734
|
-
"span",
|
|
46735
|
-
{
|
|
46736
|
-
style: {
|
|
46737
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
46738
|
-
color: theme2.colors.text
|
|
46739
|
-
},
|
|
46740
|
-
children: assignee.login
|
|
46741
|
-
}
|
|
46742
|
-
)
|
|
46743
|
-
]
|
|
46744
|
-
},
|
|
46745
|
-
assignee.login
|
|
46746
|
-
)) })
|
|
46747
|
-
]
|
|
46748
|
-
}
|
|
46749
|
-
)
|
|
46750
|
-
]
|
|
46734
|
+
content: selectedIssue.body,
|
|
46735
|
+
theme: theme2,
|
|
46736
|
+
maxWidth: "100%",
|
|
46737
|
+
transparentBackground: true
|
|
46751
46738
|
}
|
|
46752
|
-
)
|
|
46753
|
-
/* @__PURE__ */ jsx(
|
|
46739
|
+
) : /* @__PURE__ */ jsx(
|
|
46754
46740
|
"div",
|
|
46755
46741
|
{
|
|
46756
46742
|
style: {
|
|
46757
|
-
|
|
46758
|
-
|
|
46759
|
-
|
|
46760
|
-
|
|
46761
|
-
|
|
46762
|
-
|
|
46763
|
-
gap: "12px"
|
|
46743
|
+
padding: "40px",
|
|
46744
|
+
textAlign: "center",
|
|
46745
|
+
color: theme2.colors.textMuted,
|
|
46746
|
+
fontFamily: theme2.fonts.body,
|
|
46747
|
+
fontSize: theme2.fontSizes[1],
|
|
46748
|
+
fontStyle: "italic"
|
|
46764
46749
|
},
|
|
46765
|
-
children:
|
|
46766
|
-
"a",
|
|
46767
|
-
{
|
|
46768
|
-
href: selectedIssue.html_url,
|
|
46769
|
-
target: "_blank",
|
|
46770
|
-
rel: "noopener noreferrer",
|
|
46771
|
-
style: {
|
|
46772
|
-
display: "flex",
|
|
46773
|
-
alignItems: "center",
|
|
46774
|
-
gap: "6px",
|
|
46775
|
-
padding: "8px 16px",
|
|
46776
|
-
borderRadius: "6px",
|
|
46777
|
-
border: "none",
|
|
46778
|
-
backgroundColor: theme2.colors.primary,
|
|
46779
|
-
color: theme2.colors.background,
|
|
46780
|
-
fontSize: `${theme2.fontSizes[2]}px`,
|
|
46781
|
-
fontWeight: theme2.fontWeights.medium,
|
|
46782
|
-
textDecoration: "none"
|
|
46783
|
-
},
|
|
46784
|
-
children: [
|
|
46785
|
-
/* @__PURE__ */ jsx(ExternalLink, { size: 14 }),
|
|
46786
|
-
"View on GitHub"
|
|
46787
|
-
]
|
|
46788
|
-
}
|
|
46789
|
-
)
|
|
46750
|
+
children: "No description provided."
|
|
46790
46751
|
}
|
|
46791
46752
|
)
|
|
46792
|
-
|
|
46793
|
-
|
|
46794
|
-
);
|
|
46753
|
+
}
|
|
46754
|
+
)
|
|
46755
|
+
] });
|
|
46795
46756
|
};
|
|
46796
46757
|
const GitHubIssueDetailPanel = (props) => {
|
|
46797
46758
|
return /* @__PURE__ */ jsx(GitHubIssueDetailPanelContent, { ...props });
|
|
@@ -46933,7 +46894,7 @@ const OwnerRepositoriesPanelContent = ({
|
|
|
46933
46894
|
}
|
|
46934
46895
|
});
|
|
46935
46896
|
};
|
|
46936
|
-
const
|
|
46897
|
+
const formatNumber2 = (num) => {
|
|
46937
46898
|
if (num >= 1e6) return `${(num / 1e6).toFixed(1)}M`;
|
|
46938
46899
|
if (num >= 1e3) return `${(num / 1e3).toFixed(1)}K`;
|
|
46939
46900
|
return num.toString();
|
|
@@ -47400,11 +47361,11 @@ const OwnerRepositoriesPanelContent = ({
|
|
|
47400
47361
|
] }),
|
|
47401
47362
|
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47402
47363
|
/* @__PURE__ */ jsx(Star, { size: 14 }),
|
|
47403
|
-
|
|
47364
|
+
formatNumber2(repo.stargazers_count || 0)
|
|
47404
47365
|
] }),
|
|
47405
47366
|
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47406
47367
|
/* @__PURE__ */ jsx(GitFork, { size: 14 }),
|
|
47407
|
-
|
|
47368
|
+
formatNumber2(repo.forks_count || 0)
|
|
47408
47369
|
] }),
|
|
47409
47370
|
repo.updated_at && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47410
47371
|
/* @__PURE__ */ jsx(Calendar, { size: 14 }),
|
|
@@ -47588,7 +47549,7 @@ const RecentRepositoriesPanelContent = ({
|
|
|
47588
47549
|
if (diffDays < 30) return `${Math.floor(diffDays / 7)}w ago`;
|
|
47589
47550
|
return `${Math.floor(diffDays / 30)}mo ago`;
|
|
47590
47551
|
};
|
|
47591
|
-
const
|
|
47552
|
+
const formatNumber2 = (num) => {
|
|
47592
47553
|
if (num >= 1e6) return `${(num / 1e6).toFixed(1)}M`;
|
|
47593
47554
|
if (num >= 1e3) return `${(num / 1e3).toFixed(1)}K`;
|
|
47594
47555
|
return num.toString();
|
|
@@ -47963,11 +47924,11 @@ const RecentRepositoriesPanelContent = ({
|
|
|
47963
47924
|
] }),
|
|
47964
47925
|
item.stargazers_count !== void 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47965
47926
|
/* @__PURE__ */ jsx(Star, { size: 14 }),
|
|
47966
|
-
|
|
47927
|
+
formatNumber2(item.stargazers_count)
|
|
47967
47928
|
] }),
|
|
47968
47929
|
item.forks_count !== void 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47969
47930
|
/* @__PURE__ */ jsx(GitFork, { size: 14 }),
|
|
47970
|
-
|
|
47931
|
+
formatNumber2(item.forks_count)
|
|
47971
47932
|
] }),
|
|
47972
47933
|
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
47973
47934
|
/* @__PURE__ */ jsx(Calendar, { size: 14 }),
|
|
@@ -48114,12 +48075,12 @@ const RecentRepositoriesPanelContent = ({
|
|
|
48114
48075
|
children: [
|
|
48115
48076
|
item.public_repos !== void 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
48116
48077
|
/* @__PURE__ */ jsx(BookOpen, { size: 14 }),
|
|
48117
|
-
|
|
48078
|
+
formatNumber2(item.public_repos),
|
|
48118
48079
|
" repos"
|
|
48119
48080
|
] }),
|
|
48120
48081
|
item.followers !== void 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
48121
48082
|
/* @__PURE__ */ jsx(User, { size: 14 }),
|
|
48122
|
-
|
|
48083
|
+
formatNumber2(item.followers),
|
|
48123
48084
|
" followers"
|
|
48124
48085
|
] }),
|
|
48125
48086
|
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|