@industry-theme/github-panels 0.1.30 → 0.1.32
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/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/panels/GitHubIssuesPanel.d.ts +25 -0
- package/dist/panels/GitHubIssuesPanel.d.ts.map +1 -0
- package/dist/panels/GitHubIssuesPanel.stories.d.ts +78 -0
- package/dist/panels/GitHubIssuesPanel.stories.d.ts.map +1 -0
- package/dist/panels/OwnerRepositoriesPanel.d.ts.map +1 -1
- package/dist/panels/WelcomePanel.d.ts +13 -0
- package/dist/panels/WelcomePanel.d.ts.map +1 -1
- package/dist/panels/WelcomePanel.stories.d.ts +2 -0
- package/dist/panels/WelcomePanel.stories.d.ts.map +1 -1
- package/dist/panels.bundle.js +1413 -253
- package/dist/panels.bundle.js.map +1 -1
- package/dist/tools/index.d.ts +12 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools.bundle.js +45 -1
- package/dist/types/github.d.ts +61 -0
- package/dist/types/github.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/panels.bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import React2, { createContext, useContext, forwardRef, createElement, useState, useRef, useEffect, useCallback, useMemo } from "react";
|
|
3
3
|
var ThemeContext;
|
|
4
4
|
var getThemeContext = () => {
|
|
@@ -128,31 +128,31 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
128
128
|
* This source code is licensed under the ISC license.
|
|
129
129
|
* See the LICENSE file in the root directory of this source tree.
|
|
130
130
|
*/
|
|
131
|
-
const __iconNode$
|
|
131
|
+
const __iconNode$u = [
|
|
132
132
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
133
133
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
134
134
|
];
|
|
135
|
-
const ArrowRight = createLucideIcon("arrow-right", __iconNode$
|
|
135
|
+
const ArrowRight = createLucideIcon("arrow-right", __iconNode$u);
|
|
136
136
|
/**
|
|
137
137
|
* @license lucide-react v0.552.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
141
|
*/
|
|
142
|
-
const __iconNode$
|
|
142
|
+
const __iconNode$t = [
|
|
143
143
|
["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
|
|
144
144
|
["path", { d: "M17 20V4", key: "1ejh1v" }],
|
|
145
145
|
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
|
|
146
146
|
["path", { d: "M7 4v16", key: "1glfcx" }]
|
|
147
147
|
];
|
|
148
|
-
const ArrowUpDown = createLucideIcon("arrow-up-down", __iconNode$
|
|
148
|
+
const ArrowUpDown = createLucideIcon("arrow-up-down", __iconNode$t);
|
|
149
149
|
/**
|
|
150
150
|
* @license lucide-react v0.552.0 - ISC
|
|
151
151
|
*
|
|
152
152
|
* This source code is licensed under the ISC license.
|
|
153
153
|
* See the LICENSE file in the root directory of this source tree.
|
|
154
154
|
*/
|
|
155
|
-
const __iconNode$
|
|
155
|
+
const __iconNode$s = [
|
|
156
156
|
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
157
157
|
[
|
|
158
158
|
"path",
|
|
@@ -162,14 +162,14 @@ const __iconNode$l = [
|
|
|
162
162
|
}
|
|
163
163
|
]
|
|
164
164
|
];
|
|
165
|
-
const BookOpen = createLucideIcon("book-open", __iconNode$
|
|
165
|
+
const BookOpen = createLucideIcon("book-open", __iconNode$s);
|
|
166
166
|
/**
|
|
167
167
|
* @license lucide-react v0.552.0 - ISC
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
171
|
*/
|
|
172
|
-
const __iconNode$
|
|
172
|
+
const __iconNode$r = [
|
|
173
173
|
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
174
174
|
["path", { d: "M10 8h4", key: "1sr2af" }],
|
|
175
175
|
["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
|
|
@@ -182,55 +182,105 @@ const __iconNode$k = [
|
|
|
182
182
|
],
|
|
183
183
|
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
184
184
|
];
|
|
185
|
-
const Building2 = createLucideIcon("building-2", __iconNode$
|
|
185
|
+
const Building2 = createLucideIcon("building-2", __iconNode$r);
|
|
186
186
|
/**
|
|
187
187
|
* @license lucide-react v0.552.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
191
|
*/
|
|
192
|
-
const __iconNode$
|
|
192
|
+
const __iconNode$q = [
|
|
193
193
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
194
194
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
195
195
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
196
196
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
197
197
|
];
|
|
198
|
-
const Calendar = createLucideIcon("calendar", __iconNode$
|
|
198
|
+
const Calendar = createLucideIcon("calendar", __iconNode$q);
|
|
199
199
|
/**
|
|
200
200
|
* @license lucide-react v0.552.0 - ISC
|
|
201
201
|
*
|
|
202
202
|
* This source code is licensed under the ISC license.
|
|
203
203
|
* See the LICENSE file in the root directory of this source tree.
|
|
204
204
|
*/
|
|
205
|
-
const __iconNode$
|
|
206
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
205
|
+
const __iconNode$p = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
206
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$p);
|
|
207
207
|
/**
|
|
208
208
|
* @license lucide-react v0.552.0 - ISC
|
|
209
209
|
*
|
|
210
210
|
* This source code is licensed under the ISC license.
|
|
211
211
|
* See the LICENSE file in the root directory of this source tree.
|
|
212
212
|
*/
|
|
213
|
-
const __iconNode$
|
|
214
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
213
|
+
const __iconNode$o = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
214
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$o);
|
|
215
215
|
/**
|
|
216
216
|
* @license lucide-react v0.552.0 - ISC
|
|
217
217
|
*
|
|
218
218
|
* This source code is licensed under the ISC license.
|
|
219
219
|
* See the LICENSE file in the root directory of this source tree.
|
|
220
220
|
*/
|
|
221
|
-
const __iconNode$
|
|
221
|
+
const __iconNode$n = [
|
|
222
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
223
|
+
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
224
|
+
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
225
|
+
];
|
|
226
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$n);
|
|
227
|
+
/**
|
|
228
|
+
* @license lucide-react v0.552.0 - ISC
|
|
229
|
+
*
|
|
230
|
+
* This source code is licensed under the ISC license.
|
|
231
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
+
*/
|
|
233
|
+
const __iconNode$m = [
|
|
234
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
235
|
+
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
236
|
+
];
|
|
237
|
+
const CircleCheck = createLucideIcon("circle-check", __iconNode$m);
|
|
238
|
+
/**
|
|
239
|
+
* @license lucide-react v0.552.0 - ISC
|
|
240
|
+
*
|
|
241
|
+
* This source code is licensed under the ISC license.
|
|
242
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
243
|
+
*/
|
|
244
|
+
const __iconNode$l = [
|
|
245
|
+
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
246
|
+
["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" }]
|
|
247
|
+
];
|
|
248
|
+
const Copy = createLucideIcon("copy", __iconNode$l);
|
|
249
|
+
/**
|
|
250
|
+
* @license lucide-react v0.552.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/
|
|
255
|
+
const __iconNode$k = [
|
|
222
256
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
223
257
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
224
258
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
225
259
|
];
|
|
226
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
260
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$k);
|
|
227
261
|
/**
|
|
228
262
|
* @license lucide-react v0.552.0 - ISC
|
|
229
263
|
*
|
|
230
264
|
* This source code is licensed under the ISC license.
|
|
231
265
|
* See the LICENSE file in the root directory of this source tree.
|
|
232
266
|
*/
|
|
233
|
-
const __iconNode$
|
|
267
|
+
const __iconNode$j = [
|
|
268
|
+
[
|
|
269
|
+
"path",
|
|
270
|
+
{
|
|
271
|
+
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",
|
|
272
|
+
key: "usdka0"
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
];
|
|
276
|
+
const FolderOpen = createLucideIcon("folder-open", __iconNode$j);
|
|
277
|
+
/**
|
|
278
|
+
* @license lucide-react v0.552.0 - ISC
|
|
279
|
+
*
|
|
280
|
+
* This source code is licensed under the ISC license.
|
|
281
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
+
*/
|
|
283
|
+
const __iconNode$i = [
|
|
234
284
|
[
|
|
235
285
|
"path",
|
|
236
286
|
{
|
|
@@ -239,14 +289,14 @@ const __iconNode$f = [
|
|
|
239
289
|
}
|
|
240
290
|
]
|
|
241
291
|
];
|
|
242
|
-
const Folder = createLucideIcon("folder", __iconNode$
|
|
292
|
+
const Folder = createLucideIcon("folder", __iconNode$i);
|
|
243
293
|
/**
|
|
244
294
|
* @license lucide-react v0.552.0 - ISC
|
|
245
295
|
*
|
|
246
296
|
* This source code is licensed under the ISC license.
|
|
247
297
|
* See the LICENSE file in the root directory of this source tree.
|
|
248
298
|
*/
|
|
249
|
-
const __iconNode$
|
|
299
|
+
const __iconNode$h = [
|
|
250
300
|
[
|
|
251
301
|
"path",
|
|
252
302
|
{
|
|
@@ -255,28 +305,28 @@ const __iconNode$e = [
|
|
|
255
305
|
}
|
|
256
306
|
]
|
|
257
307
|
];
|
|
258
|
-
const Funnel = createLucideIcon("funnel", __iconNode$
|
|
308
|
+
const Funnel = createLucideIcon("funnel", __iconNode$h);
|
|
259
309
|
/**
|
|
260
310
|
* @license lucide-react v0.552.0 - ISC
|
|
261
311
|
*
|
|
262
312
|
* This source code is licensed under the ISC license.
|
|
263
313
|
* See the LICENSE file in the root directory of this source tree.
|
|
264
314
|
*/
|
|
265
|
-
const __iconNode$
|
|
315
|
+
const __iconNode$g = [
|
|
266
316
|
["circle", { cx: "12", cy: "18", r: "3", key: "1mpf1b" }],
|
|
267
317
|
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
|
|
268
318
|
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
269
319
|
["path", { d: "M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9", key: "1uq4wg" }],
|
|
270
320
|
["path", { d: "M12 12v3", key: "158kv8" }]
|
|
271
321
|
];
|
|
272
|
-
const GitFork = createLucideIcon("git-fork", __iconNode$
|
|
322
|
+
const GitFork = createLucideIcon("git-fork", __iconNode$g);
|
|
273
323
|
/**
|
|
274
324
|
* @license lucide-react v0.552.0 - ISC
|
|
275
325
|
*
|
|
276
326
|
* This source code is licensed under the ISC license.
|
|
277
327
|
* See the LICENSE file in the root directory of this source tree.
|
|
278
328
|
*/
|
|
279
|
-
const __iconNode$
|
|
329
|
+
const __iconNode$f = [
|
|
280
330
|
[
|
|
281
331
|
"path",
|
|
282
332
|
{
|
|
@@ -286,101 +336,125 @@ const __iconNode$c = [
|
|
|
286
336
|
],
|
|
287
337
|
["path", { d: "M9 18c-4.51 2-5-2-7-2", key: "9comsn" }]
|
|
288
338
|
];
|
|
289
|
-
const Github = createLucideIcon("github", __iconNode$
|
|
339
|
+
const Github = createLucideIcon("github", __iconNode$f);
|
|
290
340
|
/**
|
|
291
341
|
* @license lucide-react v0.552.0 - ISC
|
|
292
342
|
*
|
|
293
343
|
* This source code is licensed under the ISC license.
|
|
294
344
|
* See the LICENSE file in the root directory of this source tree.
|
|
295
345
|
*/
|
|
296
|
-
const __iconNode$
|
|
346
|
+
const __iconNode$e = [
|
|
297
347
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
298
348
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }],
|
|
299
349
|
["path", { d: "M12 7v5l4 2", key: "1fdv2h" }]
|
|
300
350
|
];
|
|
301
|
-
const History = createLucideIcon("history", __iconNode$
|
|
351
|
+
const History = createLucideIcon("history", __iconNode$e);
|
|
302
352
|
/**
|
|
303
353
|
* @license lucide-react v0.552.0 - ISC
|
|
304
354
|
*
|
|
305
355
|
* This source code is licensed under the ISC license.
|
|
306
356
|
* See the LICENSE file in the root directory of this source tree.
|
|
307
357
|
*/
|
|
308
|
-
const __iconNode$
|
|
358
|
+
const __iconNode$d = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
359
|
+
const LoaderCircle = createLucideIcon("loader-circle", __iconNode$d);
|
|
360
|
+
/**
|
|
361
|
+
* @license lucide-react v0.552.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/
|
|
366
|
+
const __iconNode$c = [
|
|
309
367
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
310
368
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
311
369
|
];
|
|
312
|
-
const Lock = createLucideIcon("lock", __iconNode$
|
|
370
|
+
const Lock = createLucideIcon("lock", __iconNode$c);
|
|
313
371
|
/**
|
|
314
372
|
* @license lucide-react v0.552.0 - ISC
|
|
315
373
|
*
|
|
316
374
|
* This source code is licensed under the ISC license.
|
|
317
375
|
* See the LICENSE file in the root directory of this source tree.
|
|
318
376
|
*/
|
|
319
|
-
const __iconNode$
|
|
377
|
+
const __iconNode$b = [
|
|
320
378
|
["path", { d: "m10 17 5-5-5-5", key: "1bsop3" }],
|
|
321
379
|
["path", { d: "M15 12H3", key: "6jk70r" }],
|
|
322
380
|
["path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4", key: "u53s6r" }]
|
|
323
381
|
];
|
|
324
|
-
const LogIn = createLucideIcon("log-in", __iconNode$
|
|
382
|
+
const LogIn = createLucideIcon("log-in", __iconNode$b);
|
|
325
383
|
/**
|
|
326
384
|
* @license lucide-react v0.552.0 - ISC
|
|
327
385
|
*
|
|
328
386
|
* This source code is licensed under the ISC license.
|
|
329
387
|
* See the LICENSE file in the root directory of this source tree.
|
|
330
388
|
*/
|
|
331
|
-
const __iconNode$
|
|
389
|
+
const __iconNode$a = [
|
|
390
|
+
[
|
|
391
|
+
"path",
|
|
392
|
+
{
|
|
393
|
+
d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
|
|
394
|
+
key: "18887p"
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
];
|
|
398
|
+
const MessageSquare = createLucideIcon("message-square", __iconNode$a);
|
|
399
|
+
/**
|
|
400
|
+
* @license lucide-react v0.552.0 - ISC
|
|
401
|
+
*
|
|
402
|
+
* This source code is licensed under the ISC license.
|
|
403
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
404
|
+
*/
|
|
405
|
+
const __iconNode$9 = [
|
|
332
406
|
["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
|
|
333
407
|
["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
|
|
334
408
|
["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
|
|
335
409
|
["path", { d: "M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3", key: "1jsf9p" }],
|
|
336
410
|
["path", { d: "M12 12V8", key: "2874zd" }]
|
|
337
411
|
];
|
|
338
|
-
const Network = createLucideIcon("network", __iconNode$
|
|
412
|
+
const Network = createLucideIcon("network", __iconNode$9);
|
|
339
413
|
/**
|
|
340
414
|
* @license lucide-react v0.552.0 - ISC
|
|
341
415
|
*
|
|
342
416
|
* This source code is licensed under the ISC license.
|
|
343
417
|
* See the LICENSE file in the root directory of this source tree.
|
|
344
418
|
*/
|
|
345
|
-
const __iconNode$
|
|
419
|
+
const __iconNode$8 = [
|
|
346
420
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
347
421
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
348
422
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
349
423
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
350
424
|
];
|
|
351
|
-
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$
|
|
425
|
+
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$8);
|
|
352
426
|
/**
|
|
353
427
|
* @license lucide-react v0.552.0 - ISC
|
|
354
428
|
*
|
|
355
429
|
* This source code is licensed under the ISC license.
|
|
356
430
|
* See the LICENSE file in the root directory of this source tree.
|
|
357
431
|
*/
|
|
358
|
-
const __iconNode$
|
|
432
|
+
const __iconNode$7 = [
|
|
359
433
|
["path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z", key: "7g6ntu" }],
|
|
360
434
|
["path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z", key: "ijws7r" }],
|
|
361
435
|
["path", { d: "M7 21h10", key: "1b0cd5" }],
|
|
362
436
|
["path", { d: "M12 3v18", key: "108xh3" }],
|
|
363
437
|
["path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2", key: "3gwbw2" }]
|
|
364
438
|
];
|
|
365
|
-
const Scale = createLucideIcon("scale", __iconNode$
|
|
439
|
+
const Scale = createLucideIcon("scale", __iconNode$7);
|
|
366
440
|
/**
|
|
367
441
|
* @license lucide-react v0.552.0 - ISC
|
|
368
442
|
*
|
|
369
443
|
* This source code is licensed under the ISC license.
|
|
370
444
|
* See the LICENSE file in the root directory of this source tree.
|
|
371
445
|
*/
|
|
372
|
-
const __iconNode$
|
|
446
|
+
const __iconNode$6 = [
|
|
373
447
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
374
448
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
375
449
|
];
|
|
376
|
-
const Search = createLucideIcon("search", __iconNode$
|
|
450
|
+
const Search = createLucideIcon("search", __iconNode$6);
|
|
377
451
|
/**
|
|
378
452
|
* @license lucide-react v0.552.0 - ISC
|
|
379
453
|
*
|
|
380
454
|
* This source code is licensed under the ISC license.
|
|
381
455
|
* See the LICENSE file in the root directory of this source tree.
|
|
382
456
|
*/
|
|
383
|
-
const __iconNode$
|
|
457
|
+
const __iconNode$5 = [
|
|
384
458
|
[
|
|
385
459
|
"path",
|
|
386
460
|
{
|
|
@@ -392,14 +466,14 @@ const __iconNode$4 = [
|
|
|
392
466
|
["path", { d: "M22 4h-4", key: "gwowj6" }],
|
|
393
467
|
["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
|
|
394
468
|
];
|
|
395
|
-
const Sparkles = createLucideIcon("sparkles", __iconNode$
|
|
469
|
+
const Sparkles = createLucideIcon("sparkles", __iconNode$5);
|
|
396
470
|
/**
|
|
397
471
|
* @license lucide-react v0.552.0 - ISC
|
|
398
472
|
*
|
|
399
473
|
* This source code is licensed under the ISC license.
|
|
400
474
|
* See the LICENSE file in the root directory of this source tree.
|
|
401
475
|
*/
|
|
402
|
-
const __iconNode$
|
|
476
|
+
const __iconNode$4 = [
|
|
403
477
|
[
|
|
404
478
|
"path",
|
|
405
479
|
{
|
|
@@ -408,7 +482,24 @@ const __iconNode$3 = [
|
|
|
408
482
|
}
|
|
409
483
|
]
|
|
410
484
|
];
|
|
411
|
-
const Star = createLucideIcon("star", __iconNode$
|
|
485
|
+
const Star = createLucideIcon("star", __iconNode$4);
|
|
486
|
+
/**
|
|
487
|
+
* @license lucide-react v0.552.0 - ISC
|
|
488
|
+
*
|
|
489
|
+
* This source code is licensed under the ISC license.
|
|
490
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
491
|
+
*/
|
|
492
|
+
const __iconNode$3 = [
|
|
493
|
+
[
|
|
494
|
+
"path",
|
|
495
|
+
{
|
|
496
|
+
d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",
|
|
497
|
+
key: "vktsd0"
|
|
498
|
+
}
|
|
499
|
+
],
|
|
500
|
+
["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }]
|
|
501
|
+
];
|
|
502
|
+
const Tag = createLucideIcon("tag", __iconNode$3);
|
|
412
503
|
/**
|
|
413
504
|
* @license lucide-react v0.552.0 - ISC
|
|
414
505
|
*
|
|
@@ -1413,126 +1504,1184 @@ const GitHubSearchPanelContent = ({ events }) => {
|
|
|
1413
1504
|
style: { width: 20, height: 20, borderRadius: 4 }
|
|
1414
1505
|
}
|
|
1415
1506
|
),
|
|
1416
|
-
/* @__PURE__ */ jsx(
|
|
1417
|
-
"span",
|
|
1507
|
+
/* @__PURE__ */ jsx(
|
|
1508
|
+
"span",
|
|
1509
|
+
{
|
|
1510
|
+
style: {
|
|
1511
|
+
fontSize: `${theme.fontSizes[2]}px`,
|
|
1512
|
+
fontWeight: theme.fontWeights.semibold,
|
|
1513
|
+
color: theme.colors.primary
|
|
1514
|
+
},
|
|
1515
|
+
children: repo.full_name
|
|
1516
|
+
}
|
|
1517
|
+
),
|
|
1518
|
+
repo.private && /* @__PURE__ */ jsx(
|
|
1519
|
+
"span",
|
|
1520
|
+
{
|
|
1521
|
+
style: {
|
|
1522
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
1523
|
+
padding: "2px 6px",
|
|
1524
|
+
borderRadius: "4px",
|
|
1525
|
+
backgroundColor: theme.colors.backgroundTertiary,
|
|
1526
|
+
color: theme.colors.textSecondary
|
|
1527
|
+
},
|
|
1528
|
+
children: "Private"
|
|
1529
|
+
}
|
|
1530
|
+
)
|
|
1531
|
+
] }),
|
|
1532
|
+
repo.description && /* @__PURE__ */ jsx(
|
|
1533
|
+
"p",
|
|
1534
|
+
{
|
|
1535
|
+
style: {
|
|
1536
|
+
margin: 0,
|
|
1537
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
1538
|
+
color: theme.colors.textSecondary,
|
|
1539
|
+
overflow: "hidden",
|
|
1540
|
+
textOverflow: "ellipsis",
|
|
1541
|
+
display: "-webkit-box",
|
|
1542
|
+
WebkitLineClamp: 2,
|
|
1543
|
+
WebkitBoxOrient: "vertical"
|
|
1544
|
+
},
|
|
1545
|
+
children: repo.description
|
|
1546
|
+
}
|
|
1547
|
+
),
|
|
1548
|
+
/* @__PURE__ */ jsxs(
|
|
1549
|
+
"div",
|
|
1550
|
+
{
|
|
1551
|
+
style: {
|
|
1552
|
+
display: "flex",
|
|
1553
|
+
alignItems: "center",
|
|
1554
|
+
gap: "16px",
|
|
1555
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
1556
|
+
color: theme.colors.textSecondary
|
|
1557
|
+
},
|
|
1558
|
+
children: [
|
|
1559
|
+
repo.language && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1560
|
+
/* @__PURE__ */ jsx(
|
|
1561
|
+
"span",
|
|
1562
|
+
{
|
|
1563
|
+
style: {
|
|
1564
|
+
width: 10,
|
|
1565
|
+
height: 10,
|
|
1566
|
+
borderRadius: "50%",
|
|
1567
|
+
backgroundColor: theme.colors.info
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
),
|
|
1571
|
+
repo.language
|
|
1572
|
+
] }),
|
|
1573
|
+
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1574
|
+
/* @__PURE__ */ jsx(Star, { size: 14 }),
|
|
1575
|
+
formatNumber(repo.stargazers_count || 0)
|
|
1576
|
+
] }),
|
|
1577
|
+
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1578
|
+
/* @__PURE__ */ jsx(GitFork, { size: 14 }),
|
|
1579
|
+
formatNumber(repo.forks_count || 0)
|
|
1580
|
+
] }),
|
|
1581
|
+
/* @__PURE__ */ jsx(
|
|
1582
|
+
"a",
|
|
1583
|
+
{
|
|
1584
|
+
href: repo.html_url,
|
|
1585
|
+
target: "_blank",
|
|
1586
|
+
rel: "noopener noreferrer",
|
|
1587
|
+
onClick: (e) => e.stopPropagation(),
|
|
1588
|
+
style: {
|
|
1589
|
+
marginLeft: "auto",
|
|
1590
|
+
color: theme.colors.textSecondary,
|
|
1591
|
+
display: "flex",
|
|
1592
|
+
alignItems: "center"
|
|
1593
|
+
},
|
|
1594
|
+
children: /* @__PURE__ */ jsx(ExternalLink, { size: 14 })
|
|
1595
|
+
}
|
|
1596
|
+
)
|
|
1597
|
+
]
|
|
1598
|
+
}
|
|
1599
|
+
)
|
|
1600
|
+
]
|
|
1601
|
+
},
|
|
1602
|
+
repo.id
|
|
1603
|
+
);
|
|
1604
|
+
})
|
|
1605
|
+
]
|
|
1606
|
+
}
|
|
1607
|
+
),
|
|
1608
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
1609
|
+
@keyframes spin {
|
|
1610
|
+
to { transform: rotate(360deg); }
|
|
1611
|
+
}
|
|
1612
|
+
` })
|
|
1613
|
+
]
|
|
1614
|
+
}
|
|
1615
|
+
);
|
|
1616
|
+
};
|
|
1617
|
+
const GitHubSearchPanel = (props) => {
|
|
1618
|
+
return /* @__PURE__ */ jsx(GitHubSearchPanelContent, { ...props });
|
|
1619
|
+
};
|
|
1620
|
+
const GitHubSearchPanelMetadata = {
|
|
1621
|
+
id: "github-search",
|
|
1622
|
+
name: "GitHub Search",
|
|
1623
|
+
description: "Search for repositories on GitHub",
|
|
1624
|
+
icon: "search",
|
|
1625
|
+
version: "0.1.0",
|
|
1626
|
+
slices: [],
|
|
1627
|
+
surfaces: ["panel"]
|
|
1628
|
+
};
|
|
1629
|
+
const formatDate = (dateString) => {
|
|
1630
|
+
const date = new Date(dateString);
|
|
1631
|
+
const now = /* @__PURE__ */ new Date();
|
|
1632
|
+
const diffMs = now.getTime() - date.getTime();
|
|
1633
|
+
const diffDays = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
|
|
1634
|
+
if (diffDays === 0) return "Today";
|
|
1635
|
+
if (diffDays === 1) return "Yesterday";
|
|
1636
|
+
if (diffDays < 7) return `${diffDays} days ago`;
|
|
1637
|
+
if (diffDays < 30) return `${Math.floor(diffDays / 7)} weeks ago`;
|
|
1638
|
+
if (diffDays < 365) return `${Math.floor(diffDays / 30)} months ago`;
|
|
1639
|
+
return `${Math.floor(diffDays / 365)} years ago`;
|
|
1640
|
+
};
|
|
1641
|
+
const GitHubIssuesPanelContent = ({
|
|
1642
|
+
context,
|
|
1643
|
+
events
|
|
1644
|
+
}) => {
|
|
1645
|
+
var _a, _b, _c, _d, _e;
|
|
1646
|
+
const { theme } = useTheme();
|
|
1647
|
+
const issuesSlice = context.getSlice("github-issues");
|
|
1648
|
+
const isLoading = context.isSliceLoading("github-issues");
|
|
1649
|
+
const hasData = context.hasSlice("github-issues");
|
|
1650
|
+
const issues = ((_a = issuesSlice == null ? void 0 : issuesSlice.data) == null ? void 0 : _a.issues) ?? [];
|
|
1651
|
+
const owner = ((_b = issuesSlice == null ? void 0 : issuesSlice.data) == null ? void 0 : _b.owner) ?? "";
|
|
1652
|
+
const repo = ((_c = issuesSlice == null ? void 0 : issuesSlice.data) == null ? void 0 : _c.repo) ?? "";
|
|
1653
|
+
const isAuthenticated = ((_d = issuesSlice == null ? void 0 : issuesSlice.data) == null ? void 0 : _d.isAuthenticated) ?? false;
|
|
1654
|
+
const sliceError = (_e = issuesSlice == null ? void 0 : issuesSlice.data) == null ? void 0 : _e.error;
|
|
1655
|
+
const [selectedIssues, setSelectedIssues] = useState(/* @__PURE__ */ new Set());
|
|
1656
|
+
const [copiedPrompt, setCopiedPrompt] = useState(false);
|
|
1657
|
+
const [issueFilter, setIssueFilter] = useState("open");
|
|
1658
|
+
const [selectedIssue, setSelectedIssue] = useState(null);
|
|
1659
|
+
const [showIssueModal, setShowIssueModal] = useState(false);
|
|
1660
|
+
useEffect(() => {
|
|
1661
|
+
events.emit({
|
|
1662
|
+
type: "github-issues:request",
|
|
1663
|
+
source: "github-issues-panel",
|
|
1664
|
+
timestamp: Date.now(),
|
|
1665
|
+
payload: {}
|
|
1666
|
+
});
|
|
1667
|
+
}, [events]);
|
|
1668
|
+
const filteredIssues = useMemo(() => {
|
|
1669
|
+
if (issueFilter === "all") return issues;
|
|
1670
|
+
return issues.filter((issue) => issue.state === issueFilter);
|
|
1671
|
+
}, [issues, issueFilter]);
|
|
1672
|
+
const issueCounts = useMemo(() => ({
|
|
1673
|
+
all: issues.length,
|
|
1674
|
+
open: issues.filter((i) => i.state === "open").length,
|
|
1675
|
+
closed: issues.filter((i) => i.state === "closed").length
|
|
1676
|
+
}), [issues]);
|
|
1677
|
+
const handleSelectAll = () => {
|
|
1678
|
+
if (selectedIssues.size === filteredIssues.length) {
|
|
1679
|
+
setSelectedIssues(/* @__PURE__ */ new Set());
|
|
1680
|
+
} else {
|
|
1681
|
+
setSelectedIssues(new Set(filteredIssues.map((i) => i.number)));
|
|
1682
|
+
}
|
|
1683
|
+
};
|
|
1684
|
+
const handleToggleIssue = (issueNumber, event) => {
|
|
1685
|
+
const newSelected = new Set(selectedIssues);
|
|
1686
|
+
if (newSelected.has(issueNumber)) {
|
|
1687
|
+
newSelected.delete(issueNumber);
|
|
1688
|
+
} else {
|
|
1689
|
+
newSelected.add(issueNumber);
|
|
1690
|
+
}
|
|
1691
|
+
setSelectedIssues(newSelected);
|
|
1692
|
+
};
|
|
1693
|
+
const handleIssueClick = (issue, event) => {
|
|
1694
|
+
const target = event.target;
|
|
1695
|
+
if (target.tagName === "INPUT" || target.closest("a")) {
|
|
1696
|
+
return;
|
|
1697
|
+
}
|
|
1698
|
+
setSelectedIssue(issue);
|
|
1699
|
+
setShowIssueModal(true);
|
|
1700
|
+
events.emit({
|
|
1701
|
+
type: "issue:selected",
|
|
1702
|
+
source: "github-issues-panel",
|
|
1703
|
+
timestamp: Date.now(),
|
|
1704
|
+
payload: {
|
|
1705
|
+
issue,
|
|
1706
|
+
owner,
|
|
1707
|
+
repo
|
|
1708
|
+
}
|
|
1709
|
+
});
|
|
1710
|
+
};
|
|
1711
|
+
const handleRefresh = () => {
|
|
1712
|
+
events.emit({
|
|
1713
|
+
type: "github-issues:refresh",
|
|
1714
|
+
source: "github-issues-panel",
|
|
1715
|
+
timestamp: Date.now(),
|
|
1716
|
+
payload: {}
|
|
1717
|
+
});
|
|
1718
|
+
};
|
|
1719
|
+
const handleLogin = () => {
|
|
1720
|
+
events.emit({
|
|
1721
|
+
type: "github:login-requested",
|
|
1722
|
+
source: "github-issues-panel",
|
|
1723
|
+
timestamp: Date.now(),
|
|
1724
|
+
payload: {}
|
|
1725
|
+
});
|
|
1726
|
+
};
|
|
1727
|
+
const generatePrompt = () => {
|
|
1728
|
+
const selectedIssueData = issues.filter(
|
|
1729
|
+
(i) => selectedIssues.has(i.number)
|
|
1730
|
+
);
|
|
1731
|
+
if (selectedIssueData.length === 0) return "";
|
|
1732
|
+
let prompt = `I'm working on the GitHub repository ${owner}/${repo}. Here are the issues I need help with:
|
|
1733
|
+
|
|
1734
|
+
`;
|
|
1735
|
+
selectedIssueData.forEach((issue) => {
|
|
1736
|
+
prompt += `## Issue #${issue.number}: ${issue.title}
|
|
1737
|
+
`;
|
|
1738
|
+
prompt += `- Status: ${issue.state}
|
|
1739
|
+
`;
|
|
1740
|
+
prompt += `- URL: ${issue.html_url}
|
|
1741
|
+
`;
|
|
1742
|
+
if (issue.labels.length > 0) {
|
|
1743
|
+
prompt += `- Labels: ${issue.labels.map((l) => l.name).join(", ")}
|
|
1744
|
+
`;
|
|
1745
|
+
}
|
|
1746
|
+
if (issue.body) {
|
|
1747
|
+
prompt += `- Description:
|
|
1748
|
+
${issue.body}
|
|
1749
|
+
`;
|
|
1750
|
+
}
|
|
1751
|
+
prompt += "\n";
|
|
1752
|
+
});
|
|
1753
|
+
prompt += `Please help me understand and address these issues.`;
|
|
1754
|
+
return prompt;
|
|
1755
|
+
};
|
|
1756
|
+
const handleCopyPrompt = async () => {
|
|
1757
|
+
const prompt = generatePrompt();
|
|
1758
|
+
if (!prompt) return;
|
|
1759
|
+
try {
|
|
1760
|
+
await navigator.clipboard.writeText(prompt);
|
|
1761
|
+
setCopiedPrompt(true);
|
|
1762
|
+
setTimeout(() => setCopiedPrompt(false), 2e3);
|
|
1763
|
+
} catch (err) {
|
|
1764
|
+
console.error("Failed to copy to clipboard:", err);
|
|
1765
|
+
}
|
|
1766
|
+
};
|
|
1767
|
+
const renderState = (icon, title, description, action) => /* @__PURE__ */ jsx(
|
|
1768
|
+
"div",
|
|
1769
|
+
{
|
|
1770
|
+
style: {
|
|
1771
|
+
height: "100%",
|
|
1772
|
+
display: "flex",
|
|
1773
|
+
alignItems: "center",
|
|
1774
|
+
justifyContent: "center",
|
|
1775
|
+
padding: "24px",
|
|
1776
|
+
backgroundColor: theme.colors.background
|
|
1777
|
+
},
|
|
1778
|
+
children: /* @__PURE__ */ jsxs(
|
|
1779
|
+
"div",
|
|
1780
|
+
{
|
|
1781
|
+
style: {
|
|
1782
|
+
display: "flex",
|
|
1783
|
+
flexDirection: "column",
|
|
1784
|
+
alignItems: "center",
|
|
1785
|
+
gap: "16px",
|
|
1786
|
+
maxWidth: "360px",
|
|
1787
|
+
textAlign: "center"
|
|
1788
|
+
},
|
|
1789
|
+
children: [
|
|
1790
|
+
/* @__PURE__ */ jsx("div", { children: icon }),
|
|
1791
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1792
|
+
/* @__PURE__ */ jsx(
|
|
1793
|
+
"h3",
|
|
1794
|
+
{
|
|
1795
|
+
style: {
|
|
1796
|
+
margin: 0,
|
|
1797
|
+
marginBottom: "8px",
|
|
1798
|
+
color: theme.colors.text,
|
|
1799
|
+
fontSize: `${theme.fontSizes[3]}px`,
|
|
1800
|
+
fontWeight: theme.fontWeights.semibold
|
|
1801
|
+
},
|
|
1802
|
+
children: title
|
|
1803
|
+
}
|
|
1804
|
+
),
|
|
1805
|
+
description && /* @__PURE__ */ jsx(
|
|
1806
|
+
"p",
|
|
1807
|
+
{
|
|
1808
|
+
style: {
|
|
1809
|
+
margin: 0,
|
|
1810
|
+
color: theme.colors.textSecondary,
|
|
1811
|
+
lineHeight: 1.5,
|
|
1812
|
+
fontSize: `${theme.fontSizes[2]}px`
|
|
1813
|
+
},
|
|
1814
|
+
children: description
|
|
1815
|
+
}
|
|
1816
|
+
)
|
|
1817
|
+
] }),
|
|
1818
|
+
action
|
|
1819
|
+
]
|
|
1820
|
+
}
|
|
1821
|
+
)
|
|
1822
|
+
}
|
|
1823
|
+
);
|
|
1824
|
+
if (isLoading && !hasData) {
|
|
1825
|
+
return renderState(
|
|
1826
|
+
/* @__PURE__ */ jsx(
|
|
1827
|
+
LoaderCircle,
|
|
1828
|
+
{
|
|
1829
|
+
size: 32,
|
|
1830
|
+
style: { color: theme.colors.textSecondary },
|
|
1831
|
+
className: "animate-spin"
|
|
1832
|
+
}
|
|
1833
|
+
),
|
|
1834
|
+
"Loading issues...",
|
|
1835
|
+
"Fetching issues from GitHub"
|
|
1836
|
+
);
|
|
1837
|
+
}
|
|
1838
|
+
if (!isAuthenticated && !hasData) {
|
|
1839
|
+
return renderState(
|
|
1840
|
+
/* @__PURE__ */ jsx(
|
|
1841
|
+
CircleAlert,
|
|
1842
|
+
{
|
|
1843
|
+
size: 32,
|
|
1844
|
+
style: { color: theme.colors.warning || "#f59e0b" }
|
|
1845
|
+
}
|
|
1846
|
+
),
|
|
1847
|
+
"Sign in to GitHub",
|
|
1848
|
+
"Connect your GitHub account to view repository issues.",
|
|
1849
|
+
/* @__PURE__ */ jsxs(
|
|
1850
|
+
"button",
|
|
1851
|
+
{
|
|
1852
|
+
type: "button",
|
|
1853
|
+
onClick: handleLogin,
|
|
1854
|
+
style: {
|
|
1855
|
+
display: "inline-flex",
|
|
1856
|
+
alignItems: "center",
|
|
1857
|
+
gap: "8px",
|
|
1858
|
+
padding: "10px 18px",
|
|
1859
|
+
borderRadius: "6px",
|
|
1860
|
+
border: "none",
|
|
1861
|
+
backgroundColor: theme.colors.primary,
|
|
1862
|
+
color: theme.colors.background,
|
|
1863
|
+
fontWeight: theme.fontWeights.semibold,
|
|
1864
|
+
fontSize: `${theme.fontSizes[2]}px`,
|
|
1865
|
+
cursor: "pointer"
|
|
1866
|
+
},
|
|
1867
|
+
children: [
|
|
1868
|
+
/* @__PURE__ */ jsx(LogIn, { size: 16 }),
|
|
1869
|
+
"Sign in with GitHub"
|
|
1870
|
+
]
|
|
1871
|
+
}
|
|
1872
|
+
)
|
|
1873
|
+
);
|
|
1874
|
+
}
|
|
1875
|
+
if (sliceError) {
|
|
1876
|
+
return renderState(
|
|
1877
|
+
/* @__PURE__ */ jsx(CircleAlert, { size: 32, style: { color: theme.colors.error } }),
|
|
1878
|
+
"Failed to Load Issues",
|
|
1879
|
+
sliceError,
|
|
1880
|
+
/* @__PURE__ */ jsxs(
|
|
1881
|
+
"button",
|
|
1882
|
+
{
|
|
1883
|
+
type: "button",
|
|
1884
|
+
onClick: handleRefresh,
|
|
1885
|
+
style: {
|
|
1886
|
+
display: "inline-flex",
|
|
1887
|
+
alignItems: "center",
|
|
1888
|
+
gap: "8px",
|
|
1889
|
+
padding: "10px 18px",
|
|
1890
|
+
borderRadius: "6px",
|
|
1891
|
+
border: `1px solid ${theme.colors.border}`,
|
|
1892
|
+
backgroundColor: theme.colors.background,
|
|
1893
|
+
color: theme.colors.text,
|
|
1894
|
+
fontWeight: theme.fontWeights.medium,
|
|
1895
|
+
fontSize: `${theme.fontSizes[2]}px`,
|
|
1896
|
+
cursor: "pointer"
|
|
1897
|
+
},
|
|
1898
|
+
children: [
|
|
1899
|
+
/* @__PURE__ */ jsx(RefreshCw, { size: 16 }),
|
|
1900
|
+
"Try Again"
|
|
1901
|
+
]
|
|
1902
|
+
}
|
|
1903
|
+
)
|
|
1904
|
+
);
|
|
1905
|
+
}
|
|
1906
|
+
if (!owner || !repo) {
|
|
1907
|
+
return renderState(
|
|
1908
|
+
/* @__PURE__ */ jsx(Github, { size: 32, style: { color: theme.colors.textSecondary } }),
|
|
1909
|
+
"No Repository Selected",
|
|
1910
|
+
"Select a repository to view its issues."
|
|
1911
|
+
);
|
|
1912
|
+
}
|
|
1913
|
+
return /* @__PURE__ */ jsxs(
|
|
1914
|
+
"div",
|
|
1915
|
+
{
|
|
1916
|
+
style: {
|
|
1917
|
+
height: "100%",
|
|
1918
|
+
display: "flex",
|
|
1919
|
+
flexDirection: "column",
|
|
1920
|
+
backgroundColor: theme.colors.background,
|
|
1921
|
+
color: theme.colors.text,
|
|
1922
|
+
fontFamily: theme.fonts.body
|
|
1923
|
+
},
|
|
1924
|
+
children: [
|
|
1925
|
+
/* @__PURE__ */ jsxs(
|
|
1926
|
+
"div",
|
|
1927
|
+
{
|
|
1928
|
+
style: {
|
|
1929
|
+
padding: "12px 16px",
|
|
1930
|
+
borderBottom: `1px solid ${theme.colors.border}`,
|
|
1931
|
+
display: "flex",
|
|
1932
|
+
alignItems: "center",
|
|
1933
|
+
gap: "12px"
|
|
1934
|
+
},
|
|
1935
|
+
children: [
|
|
1936
|
+
/* @__PURE__ */ jsx(Github, { size: 20, color: theme.colors.primary }),
|
|
1937
|
+
/* @__PURE__ */ jsx(
|
|
1938
|
+
"h2",
|
|
1939
|
+
{
|
|
1940
|
+
style: {
|
|
1941
|
+
margin: 0,
|
|
1942
|
+
fontSize: `${theme.fontSizes[3]}px`,
|
|
1943
|
+
fontWeight: theme.fontWeights.semibold,
|
|
1944
|
+
flex: 1
|
|
1945
|
+
},
|
|
1946
|
+
children: "Issues"
|
|
1947
|
+
}
|
|
1948
|
+
),
|
|
1949
|
+
/* @__PURE__ */ jsxs(
|
|
1950
|
+
"span",
|
|
1951
|
+
{
|
|
1952
|
+
style: {
|
|
1953
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
1954
|
+
color: theme.colors.textSecondary
|
|
1955
|
+
},
|
|
1956
|
+
children: [
|
|
1957
|
+
owner,
|
|
1958
|
+
"/",
|
|
1959
|
+
repo
|
|
1960
|
+
]
|
|
1961
|
+
}
|
|
1962
|
+
)
|
|
1963
|
+
]
|
|
1964
|
+
}
|
|
1965
|
+
),
|
|
1966
|
+
/* @__PURE__ */ jsxs(
|
|
1967
|
+
"div",
|
|
1968
|
+
{
|
|
1969
|
+
style: {
|
|
1970
|
+
display: "flex",
|
|
1971
|
+
alignItems: "center",
|
|
1972
|
+
justifyContent: "space-between",
|
|
1973
|
+
padding: "12px 16px",
|
|
1974
|
+
borderBottom: `1px solid ${theme.colors.border}`,
|
|
1975
|
+
backgroundColor: theme.colors.backgroundSecondary,
|
|
1976
|
+
flexWrap: "wrap",
|
|
1977
|
+
gap: "8px"
|
|
1978
|
+
},
|
|
1979
|
+
children: [
|
|
1980
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1981
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "4px" }, children: ["open", "closed", "all"].map((filter) => /* @__PURE__ */ jsxs(
|
|
1982
|
+
"button",
|
|
1983
|
+
{
|
|
1984
|
+
type: "button",
|
|
1985
|
+
onClick: () => setIssueFilter(filter),
|
|
1986
|
+
style: {
|
|
1987
|
+
padding: "6px 12px",
|
|
1988
|
+
borderRadius: "6px",
|
|
1989
|
+
border: issueFilter === filter ? "none" : `1px solid ${theme.colors.border}`,
|
|
1990
|
+
backgroundColor: issueFilter === filter ? theme.colors.primary : theme.colors.background,
|
|
1991
|
+
color: issueFilter === filter ? theme.colors.background : theme.colors.text,
|
|
1992
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
1993
|
+
fontWeight: issueFilter === filter ? theme.fontWeights.semibold : theme.fontWeights.body,
|
|
1994
|
+
cursor: "pointer",
|
|
1995
|
+
textTransform: "capitalize"
|
|
1996
|
+
},
|
|
1997
|
+
children: [
|
|
1998
|
+
filter === "all" ? "All" : filter === "open" ? "Open" : "Closed",
|
|
1999
|
+
/* @__PURE__ */ jsxs("span", { style: { marginLeft: "6px", opacity: 0.8 }, children: [
|
|
2000
|
+
"(",
|
|
2001
|
+
issueCounts[filter],
|
|
2002
|
+
")"
|
|
2003
|
+
] })
|
|
2004
|
+
]
|
|
2005
|
+
},
|
|
2006
|
+
filter
|
|
2007
|
+
)) }),
|
|
2008
|
+
filteredIssues.length > 0 && /* @__PURE__ */ jsx(
|
|
2009
|
+
"button",
|
|
2010
|
+
{
|
|
2011
|
+
type: "button",
|
|
2012
|
+
onClick: handleSelectAll,
|
|
2013
|
+
style: {
|
|
2014
|
+
padding: "6px 12px",
|
|
2015
|
+
borderRadius: "6px",
|
|
2016
|
+
border: `1px solid ${theme.colors.border}`,
|
|
2017
|
+
backgroundColor: theme.colors.background,
|
|
2018
|
+
color: theme.colors.textSecondary,
|
|
2019
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
2020
|
+
cursor: "pointer"
|
|
2021
|
+
},
|
|
2022
|
+
children: selectedIssues.size === filteredIssues.length ? "Deselect All" : "Select All"
|
|
2023
|
+
}
|
|
2024
|
+
)
|
|
2025
|
+
] }),
|
|
2026
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
2027
|
+
/* @__PURE__ */ jsx(
|
|
2028
|
+
"button",
|
|
2029
|
+
{
|
|
2030
|
+
type: "button",
|
|
2031
|
+
onClick: handleRefresh,
|
|
2032
|
+
disabled: isLoading,
|
|
2033
|
+
style: {
|
|
2034
|
+
display: "flex",
|
|
2035
|
+
alignItems: "center",
|
|
2036
|
+
gap: "6px",
|
|
2037
|
+
padding: "6px 12px",
|
|
2038
|
+
borderRadius: "6px",
|
|
2039
|
+
border: `1px solid ${theme.colors.border}`,
|
|
2040
|
+
backgroundColor: theme.colors.background,
|
|
2041
|
+
color: theme.colors.text,
|
|
2042
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
2043
|
+
cursor: isLoading ? "not-allowed" : "pointer",
|
|
2044
|
+
opacity: isLoading ? 0.5 : 1
|
|
2045
|
+
},
|
|
2046
|
+
children: /* @__PURE__ */ jsx(RefreshCw, { size: 14, className: isLoading ? "animate-spin" : "" })
|
|
2047
|
+
}
|
|
2048
|
+
),
|
|
2049
|
+
/* @__PURE__ */ jsxs(
|
|
2050
|
+
"button",
|
|
2051
|
+
{
|
|
2052
|
+
type: "button",
|
|
2053
|
+
onClick: handleCopyPrompt,
|
|
2054
|
+
disabled: selectedIssues.size === 0,
|
|
2055
|
+
style: {
|
|
2056
|
+
display: "flex",
|
|
2057
|
+
alignItems: "center",
|
|
2058
|
+
gap: "6px",
|
|
2059
|
+
padding: "6px 12px",
|
|
2060
|
+
borderRadius: "6px",
|
|
2061
|
+
border: "none",
|
|
2062
|
+
backgroundColor: selectedIssues.size > 0 ? theme.colors.primary : theme.colors.backgroundTertiary,
|
|
2063
|
+
color: selectedIssues.size > 0 ? theme.colors.background : theme.colors.textSecondary,
|
|
2064
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
2065
|
+
fontWeight: theme.fontWeights.semibold,
|
|
2066
|
+
cursor: selectedIssues.size > 0 ? "pointer" : "not-allowed",
|
|
2067
|
+
opacity: selectedIssues.size > 0 ? 1 : 0.5
|
|
2068
|
+
},
|
|
2069
|
+
children: [
|
|
2070
|
+
copiedPrompt ? /* @__PURE__ */ jsx(CircleCheck, { size: 14 }) : /* @__PURE__ */ jsx(Copy, { size: 14 }),
|
|
2071
|
+
copiedPrompt ? "Copied!" : `Copy Prompt (${selectedIssues.size})`
|
|
2072
|
+
]
|
|
2073
|
+
}
|
|
2074
|
+
)
|
|
2075
|
+
] })
|
|
2076
|
+
]
|
|
2077
|
+
}
|
|
2078
|
+
),
|
|
2079
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto", padding: "8px" }, children: filteredIssues.length === 0 ? /* @__PURE__ */ jsxs(
|
|
2080
|
+
"div",
|
|
2081
|
+
{
|
|
2082
|
+
style: {
|
|
2083
|
+
display: "flex",
|
|
2084
|
+
flexDirection: "column",
|
|
2085
|
+
alignItems: "center",
|
|
2086
|
+
justifyContent: "center",
|
|
2087
|
+
height: "100%",
|
|
2088
|
+
gap: "16px",
|
|
2089
|
+
color: theme.colors.textSecondary
|
|
2090
|
+
},
|
|
2091
|
+
children: [
|
|
2092
|
+
/* @__PURE__ */ jsx(Github, { size: 48, color: theme.colors.border }),
|
|
2093
|
+
/* @__PURE__ */ jsxs("div", { style: { textAlign: "center" }, children: [
|
|
2094
|
+
/* @__PURE__ */ jsx(
|
|
2095
|
+
"h3",
|
|
2096
|
+
{
|
|
2097
|
+
style: {
|
|
2098
|
+
color: theme.colors.text,
|
|
2099
|
+
marginBottom: "8px",
|
|
2100
|
+
fontSize: `${theme.fontSizes[3]}px`
|
|
2101
|
+
},
|
|
2102
|
+
children: "No Issues Found"
|
|
2103
|
+
}
|
|
2104
|
+
),
|
|
2105
|
+
/* @__PURE__ */ jsxs("p", { style: { margin: 0, fontSize: `${theme.fontSizes[2]}px` }, children: [
|
|
2106
|
+
"There are no ",
|
|
2107
|
+
issueFilter !== "all" ? issueFilter : "",
|
|
2108
|
+
" issues in this repository."
|
|
2109
|
+
] })
|
|
2110
|
+
] })
|
|
2111
|
+
]
|
|
2112
|
+
}
|
|
2113
|
+
) : /* @__PURE__ */ jsx(
|
|
2114
|
+
"div",
|
|
2115
|
+
{
|
|
2116
|
+
style: { display: "flex", flexDirection: "column", gap: "8px" },
|
|
2117
|
+
children: filteredIssues.map((issue) => /* @__PURE__ */ jsx(
|
|
2118
|
+
"button",
|
|
2119
|
+
{
|
|
2120
|
+
type: "button",
|
|
2121
|
+
onClick: (e) => handleIssueClick(issue, e),
|
|
2122
|
+
style: {
|
|
2123
|
+
width: "100%",
|
|
2124
|
+
padding: "12px",
|
|
2125
|
+
borderRadius: "6px",
|
|
2126
|
+
border: `1px solid ${selectedIssues.has(issue.number) ? theme.colors.primary : theme.colors.border}`,
|
|
2127
|
+
backgroundColor: selectedIssues.has(issue.number) ? `${theme.colors.primary}10` : theme.colors.surface,
|
|
2128
|
+
cursor: "pointer",
|
|
2129
|
+
textAlign: "left"
|
|
2130
|
+
},
|
|
2131
|
+
children: /* @__PURE__ */ jsxs(
|
|
2132
|
+
"div",
|
|
2133
|
+
{
|
|
2134
|
+
style: {
|
|
2135
|
+
display: "flex",
|
|
2136
|
+
alignItems: "flex-start",
|
|
2137
|
+
gap: "12px"
|
|
2138
|
+
},
|
|
2139
|
+
children: [
|
|
2140
|
+
/* @__PURE__ */ jsx(
|
|
2141
|
+
"input",
|
|
2142
|
+
{
|
|
2143
|
+
type: "checkbox",
|
|
2144
|
+
checked: selectedIssues.has(issue.number),
|
|
2145
|
+
onChange: () => handleToggleIssue(issue.number),
|
|
2146
|
+
onClick: (e) => e.stopPropagation(),
|
|
2147
|
+
style: { marginTop: "2px", cursor: "pointer" }
|
|
2148
|
+
}
|
|
2149
|
+
),
|
|
2150
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
2151
|
+
/* @__PURE__ */ jsxs(
|
|
2152
|
+
"div",
|
|
2153
|
+
{
|
|
2154
|
+
style: {
|
|
2155
|
+
display: "flex",
|
|
2156
|
+
alignItems: "center",
|
|
2157
|
+
gap: "8px",
|
|
2158
|
+
marginBottom: "6px",
|
|
2159
|
+
flexWrap: "wrap"
|
|
2160
|
+
},
|
|
2161
|
+
children: [
|
|
2162
|
+
/* @__PURE__ */ jsx(
|
|
2163
|
+
"span",
|
|
2164
|
+
{
|
|
2165
|
+
style: {
|
|
2166
|
+
display: "inline-flex",
|
|
2167
|
+
alignItems: "center",
|
|
2168
|
+
padding: "2px 8px",
|
|
2169
|
+
borderRadius: "12px",
|
|
2170
|
+
backgroundColor: issue.state === "open" ? "#22c55e22" : "#6b728022",
|
|
2171
|
+
color: issue.state === "open" ? "#22c55e" : "#6b7280",
|
|
2172
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
2173
|
+
fontWeight: theme.fontWeights.semibold,
|
|
2174
|
+
textTransform: "uppercase"
|
|
2175
|
+
},
|
|
2176
|
+
children: issue.state
|
|
2177
|
+
}
|
|
2178
|
+
),
|
|
2179
|
+
/* @__PURE__ */ jsxs(
|
|
2180
|
+
"span",
|
|
2181
|
+
{
|
|
2182
|
+
style: {
|
|
2183
|
+
color: theme.colors.textSecondary,
|
|
2184
|
+
fontSize: `${theme.fontSizes[1]}px`
|
|
2185
|
+
},
|
|
2186
|
+
children: [
|
|
2187
|
+
"#",
|
|
2188
|
+
issue.number
|
|
2189
|
+
]
|
|
2190
|
+
}
|
|
2191
|
+
),
|
|
2192
|
+
/* @__PURE__ */ jsx(
|
|
2193
|
+
"a",
|
|
2194
|
+
{
|
|
2195
|
+
href: issue.html_url,
|
|
2196
|
+
target: "_blank",
|
|
2197
|
+
rel: "noopener noreferrer",
|
|
2198
|
+
onClick: (e) => e.stopPropagation(),
|
|
2199
|
+
style: {
|
|
2200
|
+
color: theme.colors.primary,
|
|
2201
|
+
textDecoration: "none",
|
|
2202
|
+
display: "inline-flex",
|
|
2203
|
+
alignItems: "center"
|
|
2204
|
+
},
|
|
2205
|
+
children: /* @__PURE__ */ jsx(ExternalLink, { size: 12 })
|
|
2206
|
+
}
|
|
2207
|
+
)
|
|
2208
|
+
]
|
|
2209
|
+
}
|
|
2210
|
+
),
|
|
2211
|
+
/* @__PURE__ */ jsx(
|
|
2212
|
+
"h4",
|
|
2213
|
+
{
|
|
2214
|
+
style: {
|
|
2215
|
+
margin: 0,
|
|
2216
|
+
marginBottom: "6px",
|
|
2217
|
+
color: theme.colors.text,
|
|
2218
|
+
fontSize: `${theme.fontSizes[2]}px`,
|
|
2219
|
+
fontWeight: theme.fontWeights.semibold,
|
|
2220
|
+
overflow: "hidden",
|
|
2221
|
+
textOverflow: "ellipsis",
|
|
2222
|
+
whiteSpace: "nowrap"
|
|
2223
|
+
},
|
|
2224
|
+
children: issue.title
|
|
2225
|
+
}
|
|
2226
|
+
),
|
|
2227
|
+
issue.labels.length > 0 && /* @__PURE__ */ jsxs(
|
|
2228
|
+
"div",
|
|
2229
|
+
{
|
|
2230
|
+
style: {
|
|
2231
|
+
display: "flex",
|
|
2232
|
+
flexWrap: "wrap",
|
|
2233
|
+
gap: "4px",
|
|
2234
|
+
marginBottom: "6px"
|
|
2235
|
+
},
|
|
2236
|
+
children: [
|
|
2237
|
+
issue.labels.slice(0, 3).map((label) => /* @__PURE__ */ jsxs(
|
|
2238
|
+
"span",
|
|
2239
|
+
{
|
|
2240
|
+
style: {
|
|
2241
|
+
display: "inline-flex",
|
|
2242
|
+
alignItems: "center",
|
|
2243
|
+
gap: "4px",
|
|
2244
|
+
padding: "2px 6px",
|
|
2245
|
+
borderRadius: "12px",
|
|
2246
|
+
backgroundColor: `#${label.color}22`,
|
|
2247
|
+
color: `#${label.color}`,
|
|
2248
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
2249
|
+
fontWeight: theme.fontWeights.medium
|
|
2250
|
+
},
|
|
2251
|
+
children: [
|
|
2252
|
+
/* @__PURE__ */ jsx(Tag, { size: 10 }),
|
|
2253
|
+
label.name
|
|
2254
|
+
]
|
|
2255
|
+
},
|
|
2256
|
+
label.id
|
|
2257
|
+
)),
|
|
2258
|
+
issue.labels.length > 3 && /* @__PURE__ */ jsxs(
|
|
2259
|
+
"span",
|
|
2260
|
+
{
|
|
2261
|
+
style: {
|
|
2262
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
2263
|
+
color: theme.colors.textSecondary
|
|
2264
|
+
},
|
|
2265
|
+
children: [
|
|
2266
|
+
"+",
|
|
2267
|
+
issue.labels.length - 3
|
|
2268
|
+
]
|
|
2269
|
+
}
|
|
2270
|
+
)
|
|
2271
|
+
]
|
|
2272
|
+
}
|
|
2273
|
+
),
|
|
2274
|
+
/* @__PURE__ */ jsxs(
|
|
2275
|
+
"div",
|
|
2276
|
+
{
|
|
2277
|
+
style: {
|
|
2278
|
+
display: "flex",
|
|
2279
|
+
alignItems: "center",
|
|
2280
|
+
gap: "12px",
|
|
2281
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
2282
|
+
color: theme.colors.textSecondary,
|
|
2283
|
+
flexWrap: "wrap"
|
|
2284
|
+
},
|
|
2285
|
+
children: [
|
|
2286
|
+
/* @__PURE__ */ jsxs(
|
|
2287
|
+
"span",
|
|
2288
|
+
{
|
|
2289
|
+
style: {
|
|
2290
|
+
display: "flex",
|
|
2291
|
+
alignItems: "center",
|
|
2292
|
+
gap: "4px"
|
|
2293
|
+
},
|
|
2294
|
+
children: [
|
|
2295
|
+
/* @__PURE__ */ jsx(
|
|
2296
|
+
"img",
|
|
2297
|
+
{
|
|
2298
|
+
src: issue.user.avatar_url,
|
|
2299
|
+
alt: issue.user.login,
|
|
2300
|
+
style: {
|
|
2301
|
+
width: "14px",
|
|
2302
|
+
height: "14px",
|
|
2303
|
+
borderRadius: "50%"
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
),
|
|
2307
|
+
issue.user.login
|
|
2308
|
+
]
|
|
2309
|
+
}
|
|
2310
|
+
),
|
|
2311
|
+
/* @__PURE__ */ jsxs(
|
|
2312
|
+
"span",
|
|
2313
|
+
{
|
|
2314
|
+
style: {
|
|
2315
|
+
display: "flex",
|
|
2316
|
+
alignItems: "center",
|
|
2317
|
+
gap: "4px"
|
|
2318
|
+
},
|
|
2319
|
+
children: [
|
|
2320
|
+
/* @__PURE__ */ jsx(Calendar, { size: 12 }),
|
|
2321
|
+
formatDate(issue.created_at)
|
|
2322
|
+
]
|
|
2323
|
+
}
|
|
2324
|
+
),
|
|
2325
|
+
issue.comments > 0 && /* @__PURE__ */ jsxs(
|
|
2326
|
+
"span",
|
|
2327
|
+
{
|
|
2328
|
+
style: {
|
|
2329
|
+
display: "flex",
|
|
2330
|
+
alignItems: "center",
|
|
2331
|
+
gap: "4px"
|
|
2332
|
+
},
|
|
2333
|
+
children: [
|
|
2334
|
+
/* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
|
|
2335
|
+
issue.comments
|
|
2336
|
+
]
|
|
2337
|
+
}
|
|
2338
|
+
)
|
|
2339
|
+
]
|
|
2340
|
+
}
|
|
2341
|
+
)
|
|
2342
|
+
] })
|
|
2343
|
+
]
|
|
2344
|
+
}
|
|
2345
|
+
)
|
|
2346
|
+
},
|
|
2347
|
+
issue.id
|
|
2348
|
+
))
|
|
2349
|
+
}
|
|
2350
|
+
) }),
|
|
2351
|
+
showIssueModal && selectedIssue && /* @__PURE__ */ jsx(
|
|
2352
|
+
"div",
|
|
2353
|
+
{
|
|
2354
|
+
style: {
|
|
2355
|
+
position: "fixed",
|
|
2356
|
+
inset: 0,
|
|
2357
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
2358
|
+
display: "flex",
|
|
2359
|
+
alignItems: "center",
|
|
2360
|
+
justifyContent: "center",
|
|
2361
|
+
zIndex: 1e3
|
|
2362
|
+
},
|
|
2363
|
+
onClick: () => {
|
|
2364
|
+
setShowIssueModal(false);
|
|
2365
|
+
setSelectedIssue(null);
|
|
2366
|
+
},
|
|
2367
|
+
children: /* @__PURE__ */ jsxs(
|
|
2368
|
+
"div",
|
|
2369
|
+
{
|
|
2370
|
+
style: {
|
|
2371
|
+
backgroundColor: theme.colors.background,
|
|
2372
|
+
borderRadius: "12px",
|
|
2373
|
+
width: "90%",
|
|
2374
|
+
maxWidth: "700px",
|
|
2375
|
+
maxHeight: "80vh",
|
|
2376
|
+
display: "flex",
|
|
2377
|
+
flexDirection: "column",
|
|
2378
|
+
boxShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1)",
|
|
2379
|
+
border: `1px solid ${theme.colors.border}`
|
|
2380
|
+
},
|
|
2381
|
+
onClick: (e) => e.stopPropagation(),
|
|
2382
|
+
children: [
|
|
2383
|
+
/* @__PURE__ */ jsxs(
|
|
2384
|
+
"div",
|
|
2385
|
+
{
|
|
2386
|
+
style: {
|
|
2387
|
+
display: "flex",
|
|
2388
|
+
alignItems: "flex-start",
|
|
2389
|
+
justifyContent: "space-between",
|
|
2390
|
+
padding: "20px",
|
|
2391
|
+
borderBottom: `1px solid ${theme.colors.border}`
|
|
2392
|
+
},
|
|
2393
|
+
children: [
|
|
2394
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|
|
2395
|
+
/* @__PURE__ */ jsxs(
|
|
2396
|
+
"div",
|
|
2397
|
+
{
|
|
2398
|
+
style: {
|
|
2399
|
+
display: "flex",
|
|
2400
|
+
alignItems: "center",
|
|
2401
|
+
gap: "12px",
|
|
2402
|
+
marginBottom: "8px"
|
|
2403
|
+
},
|
|
2404
|
+
children: [
|
|
2405
|
+
/* @__PURE__ */ jsx(
|
|
2406
|
+
"span",
|
|
2407
|
+
{
|
|
2408
|
+
style: {
|
|
2409
|
+
display: "inline-flex",
|
|
2410
|
+
alignItems: "center",
|
|
2411
|
+
padding: "4px 10px",
|
|
2412
|
+
borderRadius: "12px",
|
|
2413
|
+
backgroundColor: selectedIssue.state === "open" ? "#22c55e22" : "#6b728022",
|
|
2414
|
+
color: selectedIssue.state === "open" ? "#22c55e" : "#6b7280",
|
|
2415
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
2416
|
+
fontWeight: theme.fontWeights.semibold,
|
|
2417
|
+
textTransform: "uppercase"
|
|
2418
|
+
},
|
|
2419
|
+
children: selectedIssue.state
|
|
2420
|
+
}
|
|
2421
|
+
),
|
|
2422
|
+
/* @__PURE__ */ jsxs(
|
|
2423
|
+
"span",
|
|
2424
|
+
{
|
|
2425
|
+
style: {
|
|
2426
|
+
color: theme.colors.textSecondary,
|
|
2427
|
+
fontSize: `${theme.fontSizes[2]}px`
|
|
2428
|
+
},
|
|
2429
|
+
children: [
|
|
2430
|
+
"#",
|
|
2431
|
+
selectedIssue.number
|
|
2432
|
+
]
|
|
2433
|
+
}
|
|
2434
|
+
)
|
|
2435
|
+
]
|
|
2436
|
+
}
|
|
2437
|
+
),
|
|
2438
|
+
/* @__PURE__ */ jsx(
|
|
2439
|
+
"h2",
|
|
2440
|
+
{
|
|
2441
|
+
style: {
|
|
2442
|
+
color: theme.colors.text,
|
|
2443
|
+
fontSize: `${theme.fontSizes[4]}px`,
|
|
2444
|
+
fontWeight: theme.fontWeights.semibold,
|
|
2445
|
+
margin: 0
|
|
2446
|
+
},
|
|
2447
|
+
children: selectedIssue.title
|
|
2448
|
+
}
|
|
2449
|
+
)
|
|
2450
|
+
] }),
|
|
2451
|
+
/* @__PURE__ */ jsx(
|
|
2452
|
+
"button",
|
|
2453
|
+
{
|
|
2454
|
+
type: "button",
|
|
2455
|
+
onClick: () => {
|
|
2456
|
+
setShowIssueModal(false);
|
|
2457
|
+
setSelectedIssue(null);
|
|
2458
|
+
},
|
|
2459
|
+
style: {
|
|
2460
|
+
background: "none",
|
|
2461
|
+
border: "none",
|
|
2462
|
+
color: theme.colors.textSecondary,
|
|
2463
|
+
cursor: "pointer",
|
|
2464
|
+
padding: "8px"
|
|
2465
|
+
},
|
|
2466
|
+
children: /* @__PURE__ */ jsx(X, { size: 20 })
|
|
2467
|
+
}
|
|
2468
|
+
)
|
|
2469
|
+
]
|
|
2470
|
+
}
|
|
2471
|
+
),
|
|
2472
|
+
/* @__PURE__ */ jsxs(
|
|
2473
|
+
"div",
|
|
2474
|
+
{
|
|
2475
|
+
style: {
|
|
2476
|
+
flex: 1,
|
|
2477
|
+
overflow: "auto",
|
|
2478
|
+
padding: "20px"
|
|
2479
|
+
},
|
|
2480
|
+
children: [
|
|
2481
|
+
/* @__PURE__ */ jsxs(
|
|
2482
|
+
"div",
|
|
2483
|
+
{
|
|
2484
|
+
style: {
|
|
2485
|
+
display: "flex",
|
|
2486
|
+
alignItems: "center",
|
|
2487
|
+
gap: "20px",
|
|
2488
|
+
marginBottom: "20px",
|
|
2489
|
+
fontSize: `${theme.fontSizes[2]}px`,
|
|
2490
|
+
color: theme.colors.textSecondary,
|
|
2491
|
+
flexWrap: "wrap"
|
|
2492
|
+
},
|
|
2493
|
+
children: [
|
|
2494
|
+
/* @__PURE__ */ jsxs(
|
|
2495
|
+
"span",
|
|
2496
|
+
{
|
|
2497
|
+
style: { display: "flex", alignItems: "center", gap: "6px" },
|
|
2498
|
+
children: [
|
|
2499
|
+
/* @__PURE__ */ jsx(
|
|
2500
|
+
"img",
|
|
2501
|
+
{
|
|
2502
|
+
src: selectedIssue.user.avatar_url,
|
|
2503
|
+
alt: selectedIssue.user.login,
|
|
2504
|
+
style: {
|
|
2505
|
+
width: "20px",
|
|
2506
|
+
height: "20px",
|
|
2507
|
+
borderRadius: "50%"
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
),
|
|
2511
|
+
/* @__PURE__ */ jsx("strong", { style: { color: theme.colors.text }, children: selectedIssue.user.login }),
|
|
2512
|
+
" ",
|
|
2513
|
+
"opened"
|
|
2514
|
+
]
|
|
2515
|
+
}
|
|
2516
|
+
),
|
|
2517
|
+
/* @__PURE__ */ jsxs(
|
|
2518
|
+
"span",
|
|
2519
|
+
{
|
|
2520
|
+
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
2521
|
+
children: [
|
|
2522
|
+
/* @__PURE__ */ jsx(Calendar, { size: 14 }),
|
|
2523
|
+
formatDate(selectedIssue.created_at)
|
|
2524
|
+
]
|
|
2525
|
+
}
|
|
2526
|
+
),
|
|
2527
|
+
selectedIssue.comments > 0 && /* @__PURE__ */ jsxs(
|
|
2528
|
+
"span",
|
|
2529
|
+
{
|
|
2530
|
+
style: {
|
|
2531
|
+
display: "flex",
|
|
2532
|
+
alignItems: "center",
|
|
2533
|
+
gap: "4px"
|
|
2534
|
+
},
|
|
2535
|
+
children: [
|
|
2536
|
+
/* @__PURE__ */ jsx(MessageSquare, { size: 14 }),
|
|
2537
|
+
selectedIssue.comments,
|
|
2538
|
+
" ",
|
|
2539
|
+
selectedIssue.comments === 1 ? "comment" : "comments"
|
|
2540
|
+
]
|
|
2541
|
+
}
|
|
2542
|
+
)
|
|
2543
|
+
]
|
|
2544
|
+
}
|
|
2545
|
+
),
|
|
2546
|
+
selectedIssue.labels.length > 0 && /* @__PURE__ */ jsx(
|
|
2547
|
+
"div",
|
|
1418
2548
|
{
|
|
1419
2549
|
style: {
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
2550
|
+
display: "flex",
|
|
2551
|
+
flexWrap: "wrap",
|
|
2552
|
+
gap: "8px",
|
|
2553
|
+
marginBottom: "20px"
|
|
1423
2554
|
},
|
|
1424
|
-
children:
|
|
2555
|
+
children: selectedIssue.labels.map((label) => /* @__PURE__ */ jsxs(
|
|
2556
|
+
"span",
|
|
2557
|
+
{
|
|
2558
|
+
style: {
|
|
2559
|
+
display: "inline-flex",
|
|
2560
|
+
alignItems: "center",
|
|
2561
|
+
gap: "6px",
|
|
2562
|
+
padding: "4px 12px",
|
|
2563
|
+
borderRadius: "16px",
|
|
2564
|
+
backgroundColor: `#${label.color}22`,
|
|
2565
|
+
color: `#${label.color}`,
|
|
2566
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
2567
|
+
fontWeight: theme.fontWeights.medium
|
|
2568
|
+
},
|
|
2569
|
+
children: [
|
|
2570
|
+
/* @__PURE__ */ jsx(Tag, { size: 12 }),
|
|
2571
|
+
label.name
|
|
2572
|
+
]
|
|
2573
|
+
},
|
|
2574
|
+
label.id
|
|
2575
|
+
))
|
|
1425
2576
|
}
|
|
1426
2577
|
),
|
|
1427
|
-
|
|
1428
|
-
"
|
|
2578
|
+
selectedIssue.body && /* @__PURE__ */ jsxs(
|
|
2579
|
+
"div",
|
|
1429
2580
|
{
|
|
1430
2581
|
style: {
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
color: theme.colors.textSecondary
|
|
2582
|
+
backgroundColor: theme.colors.backgroundSecondary,
|
|
2583
|
+
borderRadius: "8px",
|
|
2584
|
+
padding: "16px",
|
|
2585
|
+
border: `1px solid ${theme.colors.border}`
|
|
1436
2586
|
},
|
|
1437
|
-
children:
|
|
2587
|
+
children: [
|
|
2588
|
+
/* @__PURE__ */ jsx(
|
|
2589
|
+
"h3",
|
|
2590
|
+
{
|
|
2591
|
+
style: {
|
|
2592
|
+
color: theme.colors.text,
|
|
2593
|
+
fontSize: `${theme.fontSizes[2]}px`,
|
|
2594
|
+
fontWeight: theme.fontWeights.semibold,
|
|
2595
|
+
marginTop: 0,
|
|
2596
|
+
marginBottom: "12px"
|
|
2597
|
+
},
|
|
2598
|
+
children: "Description"
|
|
2599
|
+
}
|
|
2600
|
+
),
|
|
2601
|
+
/* @__PURE__ */ jsx(
|
|
2602
|
+
"div",
|
|
2603
|
+
{
|
|
2604
|
+
style: {
|
|
2605
|
+
color: theme.colors.text,
|
|
2606
|
+
fontSize: `${theme.fontSizes[2]}px`,
|
|
2607
|
+
lineHeight: 1.6,
|
|
2608
|
+
whiteSpace: "pre-wrap",
|
|
2609
|
+
wordBreak: "break-word"
|
|
2610
|
+
},
|
|
2611
|
+
children: selectedIssue.body
|
|
2612
|
+
}
|
|
2613
|
+
)
|
|
2614
|
+
]
|
|
1438
2615
|
}
|
|
1439
2616
|
)
|
|
1440
|
-
]
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
),
|
|
1457
|
-
/* @__PURE__ */ jsxs(
|
|
1458
|
-
"div",
|
|
2617
|
+
]
|
|
2618
|
+
}
|
|
2619
|
+
),
|
|
2620
|
+
/* @__PURE__ */ jsx(
|
|
2621
|
+
"div",
|
|
2622
|
+
{
|
|
2623
|
+
style: {
|
|
2624
|
+
display: "flex",
|
|
2625
|
+
alignItems: "center",
|
|
2626
|
+
justifyContent: "flex-end",
|
|
2627
|
+
padding: "16px 20px",
|
|
2628
|
+
borderTop: `1px solid ${theme.colors.border}`,
|
|
2629
|
+
gap: "12px"
|
|
2630
|
+
},
|
|
2631
|
+
children: /* @__PURE__ */ jsxs(
|
|
2632
|
+
"a",
|
|
1459
2633
|
{
|
|
2634
|
+
href: selectedIssue.html_url,
|
|
2635
|
+
target: "_blank",
|
|
2636
|
+
rel: "noopener noreferrer",
|
|
1460
2637
|
style: {
|
|
1461
2638
|
display: "flex",
|
|
1462
2639
|
alignItems: "center",
|
|
1463
|
-
gap: "
|
|
1464
|
-
|
|
1465
|
-
|
|
2640
|
+
gap: "6px",
|
|
2641
|
+
padding: "8px 16px",
|
|
2642
|
+
borderRadius: "6px",
|
|
2643
|
+
border: "none",
|
|
2644
|
+
backgroundColor: theme.colors.primary,
|
|
2645
|
+
color: theme.colors.background,
|
|
2646
|
+
fontSize: `${theme.fontSizes[2]}px`,
|
|
2647
|
+
fontWeight: theme.fontWeights.medium,
|
|
2648
|
+
textDecoration: "none"
|
|
1466
2649
|
},
|
|
1467
2650
|
children: [
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
"span",
|
|
1471
|
-
{
|
|
1472
|
-
style: {
|
|
1473
|
-
width: 10,
|
|
1474
|
-
height: 10,
|
|
1475
|
-
borderRadius: "50%",
|
|
1476
|
-
backgroundColor: theme.colors.info
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
),
|
|
1480
|
-
repo.language
|
|
1481
|
-
] }),
|
|
1482
|
-
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1483
|
-
/* @__PURE__ */ jsx(Star, { size: 14 }),
|
|
1484
|
-
formatNumber(repo.stargazers_count || 0)
|
|
1485
|
-
] }),
|
|
1486
|
-
/* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
1487
|
-
/* @__PURE__ */ jsx(GitFork, { size: 14 }),
|
|
1488
|
-
formatNumber(repo.forks_count || 0)
|
|
1489
|
-
] }),
|
|
1490
|
-
/* @__PURE__ */ jsx(
|
|
1491
|
-
"a",
|
|
1492
|
-
{
|
|
1493
|
-
href: repo.html_url,
|
|
1494
|
-
target: "_blank",
|
|
1495
|
-
rel: "noopener noreferrer",
|
|
1496
|
-
onClick: (e) => e.stopPropagation(),
|
|
1497
|
-
style: {
|
|
1498
|
-
marginLeft: "auto",
|
|
1499
|
-
color: theme.colors.textSecondary,
|
|
1500
|
-
display: "flex",
|
|
1501
|
-
alignItems: "center"
|
|
1502
|
-
},
|
|
1503
|
-
children: /* @__PURE__ */ jsx(ExternalLink, { size: 14 })
|
|
1504
|
-
}
|
|
1505
|
-
)
|
|
2651
|
+
/* @__PURE__ */ jsx(ExternalLink, { size: 14 }),
|
|
2652
|
+
"View on GitHub"
|
|
1506
2653
|
]
|
|
1507
2654
|
}
|
|
1508
2655
|
)
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
]
|
|
2656
|
+
}
|
|
2657
|
+
)
|
|
2658
|
+
]
|
|
2659
|
+
}
|
|
2660
|
+
)
|
|
1515
2661
|
}
|
|
1516
2662
|
),
|
|
1517
2663
|
/* @__PURE__ */ jsx("style", { children: `
|
|
1518
2664
|
@keyframes spin {
|
|
1519
2665
|
to { transform: rotate(360deg); }
|
|
1520
2666
|
}
|
|
2667
|
+
.animate-spin {
|
|
2668
|
+
animation: spin 1s linear infinite;
|
|
2669
|
+
}
|
|
1521
2670
|
` })
|
|
1522
2671
|
]
|
|
1523
2672
|
}
|
|
1524
2673
|
);
|
|
1525
2674
|
};
|
|
1526
|
-
const
|
|
1527
|
-
return /* @__PURE__ */ jsx(
|
|
2675
|
+
const GitHubIssuesPanel = (props) => {
|
|
2676
|
+
return /* @__PURE__ */ jsx(GitHubIssuesPanelContent, { ...props });
|
|
1528
2677
|
};
|
|
1529
|
-
const
|
|
1530
|
-
id: "github-
|
|
1531
|
-
name: "GitHub
|
|
1532
|
-
description: "
|
|
1533
|
-
icon: "
|
|
2678
|
+
const GitHubIssuesPanelMetadata = {
|
|
2679
|
+
id: "github-issues",
|
|
2680
|
+
name: "GitHub Issues",
|
|
2681
|
+
description: "View and manage GitHub repository issues",
|
|
2682
|
+
icon: "circle-dot",
|
|
1534
2683
|
version: "0.1.0",
|
|
1535
|
-
slices: [],
|
|
2684
|
+
slices: ["github-issues"],
|
|
1536
2685
|
surfaces: ["panel"]
|
|
1537
2686
|
};
|
|
1538
2687
|
const OwnerRepositoriesPanelContent = ({
|
|
@@ -1549,7 +2698,7 @@ const OwnerRepositoriesPanelContent = ({
|
|
|
1549
2698
|
const owner = propOwner || ((_b = (_a = context == null ? void 0 : context.currentScope) == null ? void 0 : _a.repository) == null ? void 0 : _b.name);
|
|
1550
2699
|
const ownerSlice = context.getSlice("owner-repositories");
|
|
1551
2700
|
const isLoading = context.isSliceLoading("owner-repositories");
|
|
1552
|
-
|
|
2701
|
+
((_c = ownerSlice == null ? void 0 : ownerSlice.data) == null ? void 0 : _c.owner) ?? null;
|
|
1553
2702
|
const repositories = ((_d = ownerSlice == null ? void 0 : ownerSlice.data) == null ? void 0 : _d.repositories) ?? [];
|
|
1554
2703
|
const error = ((_e = ownerSlice == null ? void 0 : ownerSlice.data) == null ? void 0 : _e.error) ?? null;
|
|
1555
2704
|
((_f = ownerSlice == null ? void 0 : ownerSlice.data) == null ? void 0 : _f.isAuthenticated) ?? false;
|
|
@@ -1660,109 +2809,43 @@ const OwnerRepositoriesPanelContent = ({
|
|
|
1660
2809
|
fontFamily: theme.fonts.body
|
|
1661
2810
|
},
|
|
1662
2811
|
children: [
|
|
1663
|
-
/* @__PURE__ */
|
|
2812
|
+
/* @__PURE__ */ jsxs(
|
|
1664
2813
|
"div",
|
|
1665
2814
|
{
|
|
1666
2815
|
style: {
|
|
1667
|
-
padding: "16px",
|
|
2816
|
+
padding: "12px 16px",
|
|
1668
2817
|
borderBottom: `1px solid ${theme.colors.border}`,
|
|
1669
2818
|
display: "flex",
|
|
1670
2819
|
alignItems: "center",
|
|
1671
|
-
gap: "
|
|
2820
|
+
gap: "8px"
|
|
1672
2821
|
},
|
|
1673
|
-
children:
|
|
1674
|
-
/* @__PURE__ */ jsx(
|
|
1675
|
-
"img",
|
|
1676
|
-
{
|
|
1677
|
-
src: ownerInfo.avatar_url,
|
|
1678
|
-
alt: ownerInfo.login,
|
|
1679
|
-
style: {
|
|
1680
|
-
width: 48,
|
|
1681
|
-
height: 48,
|
|
1682
|
-
borderRadius: ownerInfo.type === "Organization" ? 8 : "50%",
|
|
1683
|
-
border: `2px solid ${theme.colors.border}`
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
),
|
|
1687
|
-
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|
|
1688
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1689
|
-
/* @__PURE__ */ jsx(
|
|
1690
|
-
"h2",
|
|
1691
|
-
{
|
|
1692
|
-
style: {
|
|
1693
|
-
margin: 0,
|
|
1694
|
-
fontSize: `${theme.fontSizes[4]}px`,
|
|
1695
|
-
fontWeight: theme.fontWeights.bold
|
|
1696
|
-
},
|
|
1697
|
-
children: ownerInfo.name || ownerInfo.login
|
|
1698
|
-
}
|
|
1699
|
-
),
|
|
1700
|
-
ownerInfo.type === "Organization" ? /* @__PURE__ */ jsx(Building2, { size: 16, color: theme.colors.textSecondary }) : /* @__PURE__ */ jsx(User, { size: 16, color: theme.colors.textSecondary })
|
|
1701
|
-
] }),
|
|
1702
|
-
ownerInfo.bio && /* @__PURE__ */ jsx(
|
|
1703
|
-
"p",
|
|
1704
|
-
{
|
|
1705
|
-
style: {
|
|
1706
|
-
margin: "4px 0 0",
|
|
1707
|
-
fontSize: `${theme.fontSizes[1]}px`,
|
|
1708
|
-
color: theme.colors.textSecondary
|
|
1709
|
-
},
|
|
1710
|
-
children: ownerInfo.bio
|
|
1711
|
-
}
|
|
1712
|
-
),
|
|
1713
|
-
/* @__PURE__ */ jsxs(
|
|
1714
|
-
"div",
|
|
1715
|
-
{
|
|
1716
|
-
style: {
|
|
1717
|
-
display: "flex",
|
|
1718
|
-
gap: "12px",
|
|
1719
|
-
marginTop: "4px",
|
|
1720
|
-
fontSize: `${theme.fontSizes[1]}px`,
|
|
1721
|
-
color: theme.colors.textSecondary
|
|
1722
|
-
},
|
|
1723
|
-
children: [
|
|
1724
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
1725
|
-
repositories.length,
|
|
1726
|
-
" repositories"
|
|
1727
|
-
] }),
|
|
1728
|
-
ownerInfo.followers !== void 0 && /* @__PURE__ */ jsxs("span", { children: [
|
|
1729
|
-
formatNumber(ownerInfo.followers),
|
|
1730
|
-
" followers"
|
|
1731
|
-
] })
|
|
1732
|
-
]
|
|
1733
|
-
}
|
|
1734
|
-
)
|
|
1735
|
-
] }),
|
|
2822
|
+
children: [
|
|
2823
|
+
/* @__PURE__ */ jsx(Github, { size: 18, color: theme.colors.primary }),
|
|
1736
2824
|
/* @__PURE__ */ jsx(
|
|
1737
|
-
"
|
|
2825
|
+
"span",
|
|
1738
2826
|
{
|
|
1739
|
-
onClick: handleRefresh,
|
|
1740
2827
|
style: {
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
background: "transparent",
|
|
1745
|
-
cursor: "pointer",
|
|
1746
|
-
color: theme.colors.textSecondary
|
|
2828
|
+
fontSize: `${theme.fontSizes[2]}px`,
|
|
2829
|
+
fontWeight: theme.fontWeights.medium,
|
|
2830
|
+
color: theme.colors.text
|
|
1747
2831
|
},
|
|
1748
|
-
|
|
1749
|
-
children: /* @__PURE__ */ jsx(RefreshCw, { size: 16 })
|
|
2832
|
+
children: "Repositories"
|
|
1750
2833
|
}
|
|
1751
|
-
)
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
/* @__PURE__ */ jsx(
|
|
1755
|
-
"h2",
|
|
2834
|
+
),
|
|
2835
|
+
!isLoading && repositories.length > 0 && /* @__PURE__ */ jsx(
|
|
2836
|
+
"span",
|
|
1756
2837
|
{
|
|
1757
2838
|
style: {
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
2839
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
2840
|
+
color: theme.colors.textSecondary,
|
|
2841
|
+
padding: "2px 8px",
|
|
2842
|
+
borderRadius: "12px",
|
|
2843
|
+
backgroundColor: theme.colors.backgroundSecondary
|
|
1761
2844
|
},
|
|
1762
|
-
children:
|
|
2845
|
+
children: repositories.length
|
|
1763
2846
|
}
|
|
1764
2847
|
)
|
|
1765
|
-
]
|
|
2848
|
+
]
|
|
1766
2849
|
}
|
|
1767
2850
|
),
|
|
1768
2851
|
!isLoading && !error && repositories.length > 0 && /* @__PURE__ */ jsxs(
|
|
@@ -2960,23 +4043,23 @@ const defaultHighlightedProjects = [
|
|
|
2960
4043
|
{ owner: "facebook", repo: "react" },
|
|
2961
4044
|
{ owner: "vercel", repo: "next.js" }
|
|
2962
4045
|
];
|
|
2963
|
-
const
|
|
2964
|
-
const OrganizationCard = ({ org, theme, onClick }) => {
|
|
4046
|
+
const CollectionCard = ({ collection, theme, onClick }) => {
|
|
2965
4047
|
return /* @__PURE__ */ jsxs(
|
|
2966
4048
|
"button",
|
|
2967
4049
|
{
|
|
2968
4050
|
onClick,
|
|
2969
4051
|
style: {
|
|
2970
|
-
padding: "
|
|
4052
|
+
padding: "20px 24px",
|
|
2971
4053
|
borderRadius: "12px",
|
|
2972
4054
|
backgroundColor: theme.colors.surface,
|
|
2973
4055
|
border: `1px solid ${theme.colors.border}`,
|
|
2974
4056
|
display: "flex",
|
|
2975
4057
|
alignItems: "center",
|
|
2976
|
-
gap: "
|
|
4058
|
+
gap: "16px",
|
|
2977
4059
|
cursor: "pointer",
|
|
2978
4060
|
transition: "all 0.2s ease",
|
|
2979
|
-
minWidth: "
|
|
4061
|
+
minWidth: "280px",
|
|
4062
|
+
maxWidth: "320px",
|
|
2980
4063
|
textAlign: "left"
|
|
2981
4064
|
},
|
|
2982
4065
|
onMouseEnter: (e) => {
|
|
@@ -2989,16 +4072,20 @@ const OrganizationCard = ({ org, theme, onClick }) => {
|
|
|
2989
4072
|
},
|
|
2990
4073
|
children: [
|
|
2991
4074
|
/* @__PURE__ */ jsx(
|
|
2992
|
-
"
|
|
4075
|
+
"div",
|
|
2993
4076
|
{
|
|
2994
|
-
src: `https://github.com/${org.login}.png?size=64`,
|
|
2995
|
-
alt: org.login,
|
|
2996
4077
|
style: {
|
|
2997
|
-
width:
|
|
2998
|
-
height:
|
|
2999
|
-
borderRadius: "
|
|
4078
|
+
width: 48,
|
|
4079
|
+
height: 48,
|
|
4080
|
+
borderRadius: "10px",
|
|
4081
|
+
backgroundColor: `${theme.colors.primary}15`,
|
|
4082
|
+
display: "flex",
|
|
4083
|
+
alignItems: "center",
|
|
4084
|
+
justifyContent: "center",
|
|
4085
|
+
color: theme.colors.primary,
|
|
3000
4086
|
flexShrink: 0
|
|
3001
|
-
}
|
|
4087
|
+
},
|
|
4088
|
+
children: /* @__PURE__ */ jsx(FolderOpen, { size: 24 })
|
|
3002
4089
|
}
|
|
3003
4090
|
),
|
|
3004
4091
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
@@ -3009,12 +4096,12 @@ const OrganizationCard = ({ org, theme, onClick }) => {
|
|
|
3009
4096
|
fontSize: `${theme.fontSizes[2]}px`,
|
|
3010
4097
|
fontWeight: theme.fontWeights.semibold,
|
|
3011
4098
|
color: theme.colors.text,
|
|
3012
|
-
marginBottom:
|
|
4099
|
+
marginBottom: "4px"
|
|
3013
4100
|
},
|
|
3014
|
-
children:
|
|
4101
|
+
children: collection.name
|
|
3015
4102
|
}
|
|
3016
4103
|
),
|
|
3017
|
-
|
|
4104
|
+
/* @__PURE__ */ jsx(
|
|
3018
4105
|
"div",
|
|
3019
4106
|
{
|
|
3020
4107
|
style: {
|
|
@@ -3024,10 +4111,25 @@ const OrganizationCard = ({ org, theme, onClick }) => {
|
|
|
3024
4111
|
textOverflow: "ellipsis",
|
|
3025
4112
|
whiteSpace: "nowrap"
|
|
3026
4113
|
},
|
|
3027
|
-
children:
|
|
4114
|
+
children: collection.description
|
|
4115
|
+
}
|
|
4116
|
+
),
|
|
4117
|
+
collection.repositoryCount !== void 0 && /* @__PURE__ */ jsxs(
|
|
4118
|
+
"div",
|
|
4119
|
+
{
|
|
4120
|
+
style: {
|
|
4121
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
4122
|
+
color: theme.colors.textSecondary,
|
|
4123
|
+
marginTop: "4px"
|
|
4124
|
+
},
|
|
4125
|
+
children: [
|
|
4126
|
+
collection.repositoryCount,
|
|
4127
|
+
" repositories"
|
|
4128
|
+
]
|
|
3028
4129
|
}
|
|
3029
4130
|
)
|
|
3030
|
-
] })
|
|
4131
|
+
] }),
|
|
4132
|
+
/* @__PURE__ */ jsx(ChevronRight, { size: 20, style: { color: theme.colors.textSecondary, flexShrink: 0 } })
|
|
3031
4133
|
]
|
|
3032
4134
|
}
|
|
3033
4135
|
);
|
|
@@ -3035,8 +4137,8 @@ const OrganizationCard = ({ org, theme, onClick }) => {
|
|
|
3035
4137
|
const WelcomePanel = ({
|
|
3036
4138
|
onNavigate,
|
|
3037
4139
|
highlightedProjects = defaultHighlightedProjects,
|
|
3038
|
-
|
|
3039
|
-
|
|
4140
|
+
curatedCollections = [],
|
|
4141
|
+
onCollectionClick
|
|
3040
4142
|
}) => {
|
|
3041
4143
|
const { theme } = useTheme();
|
|
3042
4144
|
const [repoInput, setRepoInput] = useState("");
|
|
@@ -3062,13 +4164,11 @@ const WelcomePanel = ({
|
|
|
3062
4164
|
window.location.href = `/${project.owner}/${project.repo}`;
|
|
3063
4165
|
}
|
|
3064
4166
|
}, [onNavigate]);
|
|
3065
|
-
const
|
|
3066
|
-
if (
|
|
3067
|
-
|
|
3068
|
-
} else {
|
|
3069
|
-
window.open(`https://github.com/${org.login}`, "_blank");
|
|
4167
|
+
const handleCollectionClick = useCallback((collection) => {
|
|
4168
|
+
if (onCollectionClick) {
|
|
4169
|
+
onCollectionClick(collection.id);
|
|
3070
4170
|
}
|
|
3071
|
-
}, [
|
|
4171
|
+
}, [onCollectionClick]);
|
|
3072
4172
|
return /* @__PURE__ */ jsxs(
|
|
3073
4173
|
"div",
|
|
3074
4174
|
{
|
|
@@ -3082,7 +4182,7 @@ const WelcomePanel = ({
|
|
|
3082
4182
|
overflowY: "auto"
|
|
3083
4183
|
},
|
|
3084
4184
|
children: [
|
|
3085
|
-
|
|
4185
|
+
curatedCollections.length > 0 && /* @__PURE__ */ jsxs(
|
|
3086
4186
|
"div",
|
|
3087
4187
|
{
|
|
3088
4188
|
style: {
|
|
@@ -3090,7 +4190,7 @@ const WelcomePanel = ({
|
|
|
3090
4190
|
display: "flex",
|
|
3091
4191
|
flexDirection: "column",
|
|
3092
4192
|
alignItems: "center",
|
|
3093
|
-
gap: "
|
|
4193
|
+
gap: "24px",
|
|
3094
4194
|
borderBottom: `1px solid ${theme.colors.border}`
|
|
3095
4195
|
},
|
|
3096
4196
|
children: [
|
|
@@ -3104,7 +4204,7 @@ const WelcomePanel = ({
|
|
|
3104
4204
|
color: theme.colors.textSecondary,
|
|
3105
4205
|
textAlign: "center"
|
|
3106
4206
|
},
|
|
3107
|
-
children: "Explore
|
|
4207
|
+
children: "Explore Curated Collections"
|
|
3108
4208
|
}
|
|
3109
4209
|
),
|
|
3110
4210
|
/* @__PURE__ */ jsx(
|
|
@@ -3114,16 +4214,17 @@ const WelcomePanel = ({
|
|
|
3114
4214
|
display: "flex",
|
|
3115
4215
|
gap: "16px",
|
|
3116
4216
|
flexWrap: "wrap",
|
|
3117
|
-
justifyContent: "center"
|
|
4217
|
+
justifyContent: "center",
|
|
4218
|
+
maxWidth: "1200px"
|
|
3118
4219
|
},
|
|
3119
|
-
children:
|
|
3120
|
-
|
|
4220
|
+
children: curatedCollections.map((collection) => /* @__PURE__ */ jsx(
|
|
4221
|
+
CollectionCard,
|
|
3121
4222
|
{
|
|
3122
|
-
|
|
4223
|
+
collection,
|
|
3123
4224
|
theme,
|
|
3124
|
-
onClick: () =>
|
|
4225
|
+
onClick: () => handleCollectionClick(collection)
|
|
3125
4226
|
},
|
|
3126
|
-
|
|
4227
|
+
collection.id
|
|
3127
4228
|
))
|
|
3128
4229
|
}
|
|
3129
4230
|
)
|
|
@@ -3456,13 +4557,55 @@ const requestGitHubLoginTool = {
|
|
|
3456
4557
|
event_type: "github:login-requested"
|
|
3457
4558
|
}
|
|
3458
4559
|
};
|
|
4560
|
+
const listIssuesTool = {
|
|
4561
|
+
name: "list_issues",
|
|
4562
|
+
description: "Get a list of GitHub issues for the current repository.",
|
|
4563
|
+
inputs: {
|
|
4564
|
+
type: "object",
|
|
4565
|
+
properties: {},
|
|
4566
|
+
required: []
|
|
4567
|
+
},
|
|
4568
|
+
outputs: {
|
|
4569
|
+
type: "object",
|
|
4570
|
+
properties: {
|
|
4571
|
+
success: { type: "boolean" }
|
|
4572
|
+
}
|
|
4573
|
+
},
|
|
4574
|
+
tags: ["github", "issues", "list", "browse"],
|
|
4575
|
+
tool_call_template: {
|
|
4576
|
+
call_template_type: "panel_event",
|
|
4577
|
+
event_type: "github-issues:request"
|
|
4578
|
+
}
|
|
4579
|
+
};
|
|
4580
|
+
const refreshIssuesTool = {
|
|
4581
|
+
name: "refresh_issues",
|
|
4582
|
+
description: "Refresh the list of GitHub issues for the current repository.",
|
|
4583
|
+
inputs: {
|
|
4584
|
+
type: "object",
|
|
4585
|
+
properties: {},
|
|
4586
|
+
required: []
|
|
4587
|
+
},
|
|
4588
|
+
outputs: {
|
|
4589
|
+
type: "object",
|
|
4590
|
+
properties: {
|
|
4591
|
+
success: { type: "boolean" }
|
|
4592
|
+
}
|
|
4593
|
+
},
|
|
4594
|
+
tags: ["github", "issues", "refresh", "update"],
|
|
4595
|
+
tool_call_template: {
|
|
4596
|
+
call_template_type: "panel_event",
|
|
4597
|
+
event_type: "github-issues:refresh"
|
|
4598
|
+
}
|
|
4599
|
+
};
|
|
3459
4600
|
const githubTools = [
|
|
3460
4601
|
listRepositoriesTool,
|
|
3461
4602
|
selectRepositoryTool,
|
|
3462
4603
|
previewRepositoryTool,
|
|
3463
4604
|
searchRepositoriesTool,
|
|
3464
4605
|
openRepositorySwitcherTool,
|
|
3465
|
-
requestGitHubLoginTool
|
|
4606
|
+
requestGitHubLoginTool,
|
|
4607
|
+
listIssuesTool,
|
|
4608
|
+
refreshIssuesTool
|
|
3466
4609
|
];
|
|
3467
4610
|
const githubToolsMetadata = {
|
|
3468
4611
|
id: "github-panels",
|
|
@@ -3499,6 +4642,20 @@ const panels = [
|
|
|
3499
4642
|
console.log("GitHub Search Panel unmounting");
|
|
3500
4643
|
}
|
|
3501
4644
|
},
|
|
4645
|
+
{
|
|
4646
|
+
metadata: GitHubIssuesPanelMetadata,
|
|
4647
|
+
component: GitHubIssuesPanel,
|
|
4648
|
+
onMount: async (context) => {
|
|
4649
|
+
console.log("GitHub Issues Panel mounted");
|
|
4650
|
+
const slice = context.getSlice("github-issues");
|
|
4651
|
+
if (slice && !slice.loading) {
|
|
4652
|
+
await slice.refresh();
|
|
4653
|
+
}
|
|
4654
|
+
},
|
|
4655
|
+
onUnmount: async (_context) => {
|
|
4656
|
+
console.log("GitHub Issues Panel unmounting");
|
|
4657
|
+
}
|
|
4658
|
+
},
|
|
3502
4659
|
{
|
|
3503
4660
|
metadata: OwnerRepositoriesPanelMetadata,
|
|
3504
4661
|
component: OwnerRepositoriesPanel,
|
|
@@ -3537,6 +4694,7 @@ const onPackageUnload = async () => {
|
|
|
3537
4694
|
console.log("Panel package unloading - GitHub Panels Extension");
|
|
3538
4695
|
};
|
|
3539
4696
|
export {
|
|
4697
|
+
GitHubIssuesPanel,
|
|
3540
4698
|
GitHubProjectCard,
|
|
3541
4699
|
GitHubProjectsPanel,
|
|
3542
4700
|
GitHubSearchPanel,
|
|
@@ -3547,12 +4705,14 @@ export {
|
|
|
3547
4705
|
addRecentRepository,
|
|
3548
4706
|
githubTools,
|
|
3549
4707
|
githubToolsMetadata,
|
|
4708
|
+
listIssuesTool,
|
|
3550
4709
|
listRepositoriesTool,
|
|
3551
4710
|
onPackageLoad,
|
|
3552
4711
|
onPackageUnload,
|
|
3553
4712
|
openRepositorySwitcherTool,
|
|
3554
4713
|
panels,
|
|
3555
4714
|
previewRepositoryTool,
|
|
4715
|
+
refreshIssuesTool,
|
|
3556
4716
|
requestGitHubLoginTool,
|
|
3557
4717
|
searchRepositoriesTool,
|
|
3558
4718
|
selectRepositoryTool
|