@industry-theme/github-panels 0.1.48 → 0.1.50

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.
@@ -405,19 +405,6 @@ const GitMerge = createLucideIcon("git-merge", __iconNode$l);
405
405
  * See the LICENSE file in the root directory of this source tree.
406
406
  */
407
407
  const __iconNode$k = [
408
- ["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }],
409
- ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
410
- ["path", { d: "M13 6h3a2 2 0 0 1 2 2v7", key: "1yeb86" }],
411
- ["line", { x1: "6", x2: "6", y1: "9", y2: "21", key: "rroup" }]
412
- ];
413
- const GitPullRequest = createLucideIcon("git-pull-request", __iconNode$k);
414
- /**
415
- * @license lucide-react v0.552.0 - ISC
416
- *
417
- * This source code is licensed under the ISC license.
418
- * See the LICENSE file in the root directory of this source tree.
419
- */
420
- const __iconNode$j = [
421
408
  [
422
409
  "path",
423
410
  {
@@ -427,57 +414,57 @@ const __iconNode$j = [
427
414
  ],
428
415
  ["path", { d: "M9 18c-4.51 2-5-2-7-2", key: "9comsn" }]
429
416
  ];
430
- const Github = createLucideIcon("github", __iconNode$j);
417
+ const Github = createLucideIcon("github", __iconNode$k);
431
418
  /**
432
419
  * @license lucide-react v0.552.0 - ISC
433
420
  *
434
421
  * This source code is licensed under the ISC license.
435
422
  * See the LICENSE file in the root directory of this source tree.
436
423
  */
437
- const __iconNode$i = [
424
+ const __iconNode$j = [
438
425
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
439
426
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
440
427
  ["path", { d: "M12 7v5l4 2", key: "1fdv2h" }]
441
428
  ];
442
- const History = createLucideIcon("history", __iconNode$i);
429
+ const History = createLucideIcon("history", __iconNode$j);
443
430
  /**
444
431
  * @license lucide-react v0.552.0 - ISC
445
432
  *
446
433
  * This source code is licensed under the ISC license.
447
434
  * See the LICENSE file in the root directory of this source tree.
448
435
  */
449
- const __iconNode$h = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
450
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$h);
436
+ const __iconNode$i = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
437
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$i);
451
438
  /**
452
439
  * @license lucide-react v0.552.0 - ISC
453
440
  *
454
441
  * This source code is licensed under the ISC license.
455
442
  * See the LICENSE file in the root directory of this source tree.
456
443
  */
457
- const __iconNode$g = [
444
+ const __iconNode$h = [
458
445
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
459
446
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
460
447
  ];
461
- const Lock = createLucideIcon("lock", __iconNode$g);
448
+ const Lock = createLucideIcon("lock", __iconNode$h);
462
449
  /**
463
450
  * @license lucide-react v0.552.0 - ISC
464
451
  *
465
452
  * This source code is licensed under the ISC license.
466
453
  * See the LICENSE file in the root directory of this source tree.
467
454
  */
468
- const __iconNode$f = [
455
+ const __iconNode$g = [
469
456
  ["path", { d: "m10 17 5-5-5-5", key: "1bsop3" }],
470
457
  ["path", { d: "M15 12H3", key: "6jk70r" }],
471
458
  ["path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4", key: "u53s6r" }]
472
459
  ];
473
- const LogIn = createLucideIcon("log-in", __iconNode$f);
460
+ const LogIn = createLucideIcon("log-in", __iconNode$g);
474
461
  /**
475
462
  * @license lucide-react v0.552.0 - ISC
476
463
  *
477
464
  * This source code is licensed under the ISC license.
478
465
  * See the LICENSE file in the root directory of this source tree.
479
466
  */
480
- const __iconNode$e = [
467
+ const __iconNode$f = [
481
468
  [
482
469
  "path",
483
470
  {
@@ -486,37 +473,37 @@ const __iconNode$e = [
486
473
  }
487
474
  ]
488
475
  ];
489
- const MessageSquare = createLucideIcon("message-square", __iconNode$e);
476
+ const MessageSquare = createLucideIcon("message-square", __iconNode$f);
490
477
  /**
491
478
  * @license lucide-react v0.552.0 - ISC
492
479
  *
493
480
  * This source code is licensed under the ISC license.
494
481
  * See the LICENSE file in the root directory of this source tree.
495
482
  */
496
- const __iconNode$d = [
483
+ const __iconNode$e = [
497
484
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
498
485
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
499
486
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
500
487
  ];
501
- const Monitor = createLucideIcon("monitor", __iconNode$d);
488
+ const Monitor = createLucideIcon("monitor", __iconNode$e);
502
489
  /**
503
490
  * @license lucide-react v0.552.0 - ISC
504
491
  *
505
492
  * This source code is licensed under the ISC license.
506
493
  * See the LICENSE file in the root directory of this source tree.
507
494
  */
508
- const __iconNode$c = [
495
+ const __iconNode$d = [
509
496
  ["path", { d: "M18 8L22 12L18 16", key: "1r0oui" }],
510
497
  ["path", { d: "M2 12H22", key: "1m8cig" }]
511
498
  ];
512
- const MoveRight = createLucideIcon("move-right", __iconNode$c);
499
+ const MoveRight = createLucideIcon("move-right", __iconNode$d);
513
500
  /**
514
501
  * @license lucide-react v0.552.0 - ISC
515
502
  *
516
503
  * This source code is licensed under the ISC license.
517
504
  * See the LICENSE file in the root directory of this source tree.
518
505
  */
519
- const __iconNode$b = [
506
+ const __iconNode$c = [
520
507
  [
521
508
  "path",
522
509
  {
@@ -525,7 +512,18 @@ const __iconNode$b = [
525
512
  }
526
513
  ]
527
514
  ];
528
- const Play = createLucideIcon("play", __iconNode$b);
515
+ const Play = createLucideIcon("play", __iconNode$c);
516
+ /**
517
+ * @license lucide-react v0.552.0 - ISC
518
+ *
519
+ * This source code is licensed under the ISC license.
520
+ * See the LICENSE file in the root directory of this source tree.
521
+ */
522
+ const __iconNode$b = [
523
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
524
+ ["path", { d: "M12 5v14", key: "s699le" }]
525
+ ];
526
+ const Plus = createLucideIcon("plus", __iconNode$b);
529
527
  /**
530
528
  * @license lucide-react v0.552.0 - ISC
531
529
  *
@@ -2162,6 +2160,432 @@ const GitHubSearchPanelMetadata = {
2162
2160
  slices: ["workspace", "workspaceRepositories"],
2163
2161
  surfaces: ["panel"]
2164
2162
  };
2163
+ const CreateIssueModal = ({
2164
+ isOpen,
2165
+ onClose,
2166
+ owner,
2167
+ repo,
2168
+ onIssueCreated,
2169
+ apiBaseUrl
2170
+ }) => {
2171
+ const { theme: theme2 } = useTheme();
2172
+ const [title, setTitle] = useState("");
2173
+ const [body, setBody] = useState("");
2174
+ const [isSubmitting, setIsSubmitting] = useState(false);
2175
+ const [error, setError] = useState(null);
2176
+ const titleInputRef = useRef(null);
2177
+ useEffect(() => {
2178
+ if (isOpen && titleInputRef.current) {
2179
+ titleInputRef.current.focus();
2180
+ }
2181
+ }, [isOpen]);
2182
+ useEffect(() => {
2183
+ const handleKeyDown = (e) => {
2184
+ if (e.key === "Escape" && isOpen && !isSubmitting) {
2185
+ onClose();
2186
+ }
2187
+ };
2188
+ if (isOpen) {
2189
+ window.addEventListener("keydown", handleKeyDown);
2190
+ return () => window.removeEventListener("keydown", handleKeyDown);
2191
+ }
2192
+ }, [isOpen, isSubmitting, onClose]);
2193
+ const handleSubmit = async (e) => {
2194
+ e.preventDefault();
2195
+ setError(null);
2196
+ if (!title.trim()) {
2197
+ setError("Title is required");
2198
+ return;
2199
+ }
2200
+ setIsSubmitting(true);
2201
+ try {
2202
+ const response = await fetch(
2203
+ `${apiBaseUrl}/api/github/repo/${owner}/${repo}/issues`,
2204
+ {
2205
+ method: "POST",
2206
+ headers: {
2207
+ "Content-Type": "application/json"
2208
+ },
2209
+ credentials: "include",
2210
+ // Important: Send cookies for auth
2211
+ body: JSON.stringify({
2212
+ title: title.trim(),
2213
+ body: body.trim() || void 0
2214
+ })
2215
+ }
2216
+ );
2217
+ if (!response.ok) {
2218
+ const errorData = await response.json().catch(() => ({}));
2219
+ if (response.status === 401) {
2220
+ throw new Error("Authentication required to create issues");
2221
+ } else if (response.status === 403) {
2222
+ throw new Error("You don't have permission to create issues in this repository");
2223
+ } else {
2224
+ throw new Error(errorData.error || `Failed to create issue: ${response.status}`);
2225
+ }
2226
+ }
2227
+ setTitle("");
2228
+ setBody("");
2229
+ setError(null);
2230
+ onIssueCreated();
2231
+ onClose();
2232
+ } catch (err) {
2233
+ setError(err instanceof Error ? err.message : "Failed to create issue. Please check your connection.");
2234
+ } finally {
2235
+ setIsSubmitting(false);
2236
+ }
2237
+ };
2238
+ if (!isOpen) return null;
2239
+ return /* @__PURE__ */ jsxs(
2240
+ "div",
2241
+ {
2242
+ style: {
2243
+ position: "fixed",
2244
+ inset: 0,
2245
+ zIndex: 1e3,
2246
+ display: "flex",
2247
+ alignItems: "center",
2248
+ justifyContent: "center",
2249
+ backgroundColor: `${theme2.colors.background}cc`,
2250
+ backdropFilter: "blur(4px)"
2251
+ },
2252
+ onClick: (e) => {
2253
+ if (e.target === e.currentTarget && !isSubmitting) {
2254
+ onClose();
2255
+ }
2256
+ },
2257
+ children: [
2258
+ /* @__PURE__ */ jsxs(
2259
+ "div",
2260
+ {
2261
+ style: {
2262
+ maxWidth: "500px",
2263
+ width: "100%",
2264
+ margin: "0 16px",
2265
+ backgroundColor: theme2.colors.surface,
2266
+ border: `1px solid ${theme2.colors.border}`,
2267
+ borderRadius: "12px",
2268
+ boxShadow: "0 4px 12px rgba(0,0,0,0.15)"
2269
+ },
2270
+ children: [
2271
+ /* @__PURE__ */ jsxs(
2272
+ "div",
2273
+ {
2274
+ style: {
2275
+ display: "flex",
2276
+ alignItems: "center",
2277
+ justifyContent: "space-between",
2278
+ padding: "16px 24px",
2279
+ borderBottom: `1px solid ${theme2.colors.border}`
2280
+ },
2281
+ children: [
2282
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
2283
+ /* @__PURE__ */ jsx(Plus, { size: 20, style: { color: theme2.colors.primary } }),
2284
+ /* @__PURE__ */ jsx(
2285
+ "h2",
2286
+ {
2287
+ style: {
2288
+ margin: 0,
2289
+ fontSize: `${theme2.fontSizes[3]}px`,
2290
+ fontWeight: theme2.fontWeights.semibold,
2291
+ color: theme2.colors.text
2292
+ },
2293
+ children: "Create Issue"
2294
+ }
2295
+ )
2296
+ ] }),
2297
+ /* @__PURE__ */ jsx(
2298
+ "button",
2299
+ {
2300
+ type: "button",
2301
+ onClick: onClose,
2302
+ disabled: isSubmitting,
2303
+ style: {
2304
+ display: "flex",
2305
+ alignItems: "center",
2306
+ justifyContent: "center",
2307
+ width: "32px",
2308
+ height: "32px",
2309
+ borderRadius: "6px",
2310
+ border: "none",
2311
+ backgroundColor: theme2.colors.secondary,
2312
+ color: theme2.colors.text,
2313
+ cursor: isSubmitting ? "not-allowed" : "pointer",
2314
+ opacity: isSubmitting ? 0.5 : 1,
2315
+ transition: "opacity 0.15s ease"
2316
+ },
2317
+ title: "Close",
2318
+ children: /* @__PURE__ */ jsx(X, { size: 16 })
2319
+ }
2320
+ )
2321
+ ]
2322
+ }
2323
+ ),
2324
+ /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, children: [
2325
+ /* @__PURE__ */ jsxs("div", { style: { padding: "24px" }, children: [
2326
+ /* @__PURE__ */ jsxs(
2327
+ "p",
2328
+ {
2329
+ style: {
2330
+ margin: "0 0 16px 0",
2331
+ fontSize: `${theme2.fontSizes[1]}px`,
2332
+ color: theme2.colors.textSecondary
2333
+ },
2334
+ children: [
2335
+ "Creating issue for",
2336
+ " ",
2337
+ /* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.text, fontWeight: theme2.fontWeights.medium }, children: [
2338
+ owner,
2339
+ "/",
2340
+ repo
2341
+ ] })
2342
+ ]
2343
+ }
2344
+ ),
2345
+ error && /* @__PURE__ */ jsxs(
2346
+ "div",
2347
+ {
2348
+ style: {
2349
+ display: "flex",
2350
+ alignItems: "flex-start",
2351
+ gap: "8px",
2352
+ padding: "12px",
2353
+ marginBottom: "16px",
2354
+ backgroundColor: `${theme2.colors.error}20`,
2355
+ borderRadius: "8px",
2356
+ border: `1px solid ${theme2.colors.error}40`
2357
+ },
2358
+ children: [
2359
+ /* @__PURE__ */ jsx(
2360
+ CircleAlert,
2361
+ {
2362
+ size: 16,
2363
+ style: {
2364
+ color: theme2.colors.error,
2365
+ flexShrink: 0,
2366
+ marginTop: "2px"
2367
+ }
2368
+ }
2369
+ ),
2370
+ /* @__PURE__ */ jsx(
2371
+ "span",
2372
+ {
2373
+ style: {
2374
+ color: theme2.colors.error,
2375
+ fontSize: `${theme2.fontSizes[1]}px`,
2376
+ lineHeight: 1.5
2377
+ },
2378
+ children: error
2379
+ }
2380
+ )
2381
+ ]
2382
+ }
2383
+ ),
2384
+ /* @__PURE__ */ jsxs("div", { style: { marginBottom: "16px" }, children: [
2385
+ /* @__PURE__ */ jsxs(
2386
+ "label",
2387
+ {
2388
+ htmlFor: "issue-title",
2389
+ style: {
2390
+ display: "block",
2391
+ marginBottom: "8px",
2392
+ fontSize: `${theme2.fontSizes[1]}px`,
2393
+ fontWeight: theme2.fontWeights.medium,
2394
+ color: theme2.colors.text
2395
+ },
2396
+ children: [
2397
+ "Title ",
2398
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.error }, children: "*" })
2399
+ ]
2400
+ }
2401
+ ),
2402
+ /* @__PURE__ */ jsx(
2403
+ "input",
2404
+ {
2405
+ ref: titleInputRef,
2406
+ id: "issue-title",
2407
+ type: "text",
2408
+ value: title,
2409
+ onChange: (e) => setTitle(e.target.value),
2410
+ placeholder: "Issue title...",
2411
+ disabled: isSubmitting,
2412
+ required: true,
2413
+ style: {
2414
+ width: "100%",
2415
+ padding: "10px 12px",
2416
+ fontSize: `${theme2.fontSizes[2]}px`,
2417
+ backgroundColor: theme2.colors.background,
2418
+ color: theme2.colors.text,
2419
+ border: `1px solid ${theme2.colors.border}`,
2420
+ borderRadius: "6px",
2421
+ outline: "none",
2422
+ transition: "border-color 0.15s ease",
2423
+ opacity: isSubmitting ? 0.5 : 1,
2424
+ cursor: isSubmitting ? "not-allowed" : "text",
2425
+ boxSizing: "border-box"
2426
+ },
2427
+ onFocus: (e) => {
2428
+ e.target.style.borderColor = theme2.colors.primary;
2429
+ },
2430
+ onBlur: (e) => {
2431
+ e.target.style.borderColor = theme2.colors.border;
2432
+ }
2433
+ }
2434
+ )
2435
+ ] }),
2436
+ /* @__PURE__ */ jsxs("div", { children: [
2437
+ /* @__PURE__ */ jsxs(
2438
+ "label",
2439
+ {
2440
+ htmlFor: "issue-body",
2441
+ style: {
2442
+ display: "block",
2443
+ marginBottom: "8px",
2444
+ fontSize: `${theme2.fontSizes[1]}px`,
2445
+ fontWeight: theme2.fontWeights.medium,
2446
+ color: theme2.colors.text
2447
+ },
2448
+ children: [
2449
+ "Description",
2450
+ " ",
2451
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary, fontWeight: "normal" }, children: "(optional)" })
2452
+ ]
2453
+ }
2454
+ ),
2455
+ /* @__PURE__ */ jsx(
2456
+ "textarea",
2457
+ {
2458
+ id: "issue-body",
2459
+ value: body,
2460
+ onChange: (e) => setBody(e.target.value),
2461
+ placeholder: "Describe the issue...",
2462
+ disabled: isSubmitting,
2463
+ rows: 5,
2464
+ style: {
2465
+ width: "100%",
2466
+ padding: "10px 12px",
2467
+ fontSize: `${theme2.fontSizes[2]}px`,
2468
+ backgroundColor: theme2.colors.background,
2469
+ color: theme2.colors.text,
2470
+ border: `1px solid ${theme2.colors.border}`,
2471
+ borderRadius: "6px",
2472
+ outline: "none",
2473
+ transition: "border-color 0.15s ease",
2474
+ resize: "vertical",
2475
+ opacity: isSubmitting ? 0.5 : 1,
2476
+ cursor: isSubmitting ? "not-allowed" : "text",
2477
+ fontFamily: theme2.fonts.body,
2478
+ lineHeight: 1.5,
2479
+ boxSizing: "border-box"
2480
+ },
2481
+ onFocus: (e) => {
2482
+ e.target.style.borderColor = theme2.colors.primary;
2483
+ },
2484
+ onBlur: (e) => {
2485
+ e.target.style.borderColor = theme2.colors.border;
2486
+ }
2487
+ }
2488
+ )
2489
+ ] })
2490
+ ] }),
2491
+ /* @__PURE__ */ jsxs(
2492
+ "div",
2493
+ {
2494
+ style: {
2495
+ display: "flex",
2496
+ justifyContent: "flex-end",
2497
+ gap: "12px",
2498
+ padding: "16px 24px",
2499
+ borderTop: `1px solid ${theme2.colors.border}`
2500
+ },
2501
+ children: [
2502
+ /* @__PURE__ */ jsx(
2503
+ "button",
2504
+ {
2505
+ type: "button",
2506
+ onClick: onClose,
2507
+ disabled: isSubmitting,
2508
+ style: {
2509
+ padding: "10px 18px",
2510
+ fontSize: `${theme2.fontSizes[2]}px`,
2511
+ fontWeight: theme2.fontWeights.medium,
2512
+ color: theme2.colors.text,
2513
+ backgroundColor: "transparent",
2514
+ border: `1px solid ${theme2.colors.border}`,
2515
+ borderRadius: "6px",
2516
+ cursor: isSubmitting ? "not-allowed" : "pointer",
2517
+ opacity: isSubmitting ? 0.5 : 1,
2518
+ transition: "all 0.15s ease"
2519
+ },
2520
+ onMouseEnter: (e) => {
2521
+ if (!isSubmitting) {
2522
+ e.currentTarget.style.backgroundColor = theme2.colors.backgroundLight;
2523
+ }
2524
+ },
2525
+ onMouseLeave: (e) => {
2526
+ e.currentTarget.style.backgroundColor = "transparent";
2527
+ },
2528
+ children: "Cancel"
2529
+ }
2530
+ ),
2531
+ /* @__PURE__ */ jsx(
2532
+ "button",
2533
+ {
2534
+ type: "submit",
2535
+ disabled: isSubmitting || !title.trim(),
2536
+ style: {
2537
+ display: "inline-flex",
2538
+ alignItems: "center",
2539
+ gap: "8px",
2540
+ padding: "10px 18px",
2541
+ fontSize: `${theme2.fontSizes[2]}px`,
2542
+ fontWeight: theme2.fontWeights.semibold,
2543
+ color: theme2.colors.textOnPrimary || theme2.colors.background,
2544
+ backgroundColor: theme2.colors.primary,
2545
+ border: "none",
2546
+ borderRadius: "6px",
2547
+ cursor: isSubmitting || !title.trim() ? "not-allowed" : "pointer",
2548
+ opacity: isSubmitting || !title.trim() ? 0.5 : 1,
2549
+ transition: "all 0.15s ease"
2550
+ },
2551
+ onMouseEnter: (e) => {
2552
+ if (!isSubmitting && title.trim()) {
2553
+ e.currentTarget.style.opacity = "0.9";
2554
+ }
2555
+ },
2556
+ onMouseLeave: (e) => {
2557
+ if (!isSubmitting && title.trim()) {
2558
+ e.currentTarget.style.opacity = "1";
2559
+ }
2560
+ },
2561
+ children: isSubmitting ? /* @__PURE__ */ jsxs(Fragment, { children: [
2562
+ /* @__PURE__ */ jsx(LoaderCircle, { size: 16, className: "animate-spin" }),
2563
+ "Creating..."
2564
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2565
+ /* @__PURE__ */ jsx(Plus, { size: 16 }),
2566
+ "Create Issue"
2567
+ ] })
2568
+ }
2569
+ )
2570
+ ]
2571
+ }
2572
+ )
2573
+ ] })
2574
+ ]
2575
+ }
2576
+ ),
2577
+ /* @__PURE__ */ jsx("style", { children: `
2578
+ @keyframes spin {
2579
+ to { transform: rotate(360deg); }
2580
+ }
2581
+ .animate-spin {
2582
+ animation: spin 1s linear infinite;
2583
+ }
2584
+ ` })
2585
+ ]
2586
+ }
2587
+ );
2588
+ };
2165
2589
  const formatDate$2 = (dateString) => {
2166
2590
  const date = new Date(dateString);
2167
2591
  const now = /* @__PURE__ */ new Date();
@@ -2194,6 +2618,7 @@ const GitHubIssuesPanelContent = ({
2194
2618
  const [selectedLabel, setSelectedLabel] = useState("");
2195
2619
  const [isDropdownOpen, setIsDropdownOpen] = useState(false);
2196
2620
  const [selectedIssueId, setSelectedIssueId] = useState(null);
2621
+ const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);
2197
2622
  const uniqueLabels = useMemo(() => {
2198
2623
  const labelMap = /* @__PURE__ */ new Map();
2199
2624
  issues.forEach((issue) => {
@@ -2241,6 +2666,9 @@ const GitHubIssuesPanelContent = ({
2241
2666
  payload: {}
2242
2667
  });
2243
2668
  };
2669
+ const handleIssueCreated = () => {
2670
+ handleRefresh();
2671
+ };
2244
2672
  const handleLogin = () => {
2245
2673
  events.emit({
2246
2674
  type: "github:login-requested",
@@ -2559,6 +2987,37 @@ const GitHubIssuesPanelContent = ({
2559
2987
  }
2560
2988
  )
2561
2989
  ] }),
2990
+ /* @__PURE__ */ jsxs(
2991
+ "button",
2992
+ {
2993
+ type: "button",
2994
+ onClick: () => setIsCreateModalOpen(true),
2995
+ style: {
2996
+ display: "flex",
2997
+ alignItems: "center",
2998
+ gap: "4px",
2999
+ padding: "4px 8px",
3000
+ borderRadius: "4px",
3001
+ border: "none",
3002
+ backgroundColor: theme2.colors.primary,
3003
+ color: theme2.colors.textOnPrimary || theme2.colors.background,
3004
+ fontSize: `${theme2.fontSizes[0]}px`,
3005
+ fontWeight: theme2.fontWeights.medium,
3006
+ cursor: "pointer",
3007
+ transition: "opacity 0.15s ease"
3008
+ },
3009
+ onMouseEnter: (e) => {
3010
+ e.currentTarget.style.opacity = "0.9";
3011
+ },
3012
+ onMouseLeave: (e) => {
3013
+ e.currentTarget.style.opacity = "1";
3014
+ },
3015
+ children: [
3016
+ /* @__PURE__ */ jsx(Plus, { size: 12 }),
3017
+ "New"
3018
+ ]
3019
+ }
3020
+ ),
2562
3021
  /* @__PURE__ */ jsx(
2563
3022
  "button",
2564
3023
  {
@@ -2610,7 +3069,39 @@ const GitHubIssuesPanelContent = ({
2610
3069
  children: "No Open Issues"
2611
3070
  }
2612
3071
  ),
2613
- /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: `${theme2.fontSizes[2]}px` }, children: "There are no open issues in this repository." })
3072
+ /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: `${theme2.fontSizes[2]}px` }, children: "There are no open issues in this repository." }),
3073
+ /* @__PURE__ */ jsxs(
3074
+ "button",
3075
+ {
3076
+ type: "button",
3077
+ onClick: () => setIsCreateModalOpen(true),
3078
+ style: {
3079
+ marginTop: "16px",
3080
+ display: "inline-flex",
3081
+ alignItems: "center",
3082
+ gap: "8px",
3083
+ padding: "10px 18px",
3084
+ borderRadius: "8px",
3085
+ border: "none",
3086
+ backgroundColor: theme2.colors.primary,
3087
+ color: theme2.colors.textOnPrimary || theme2.colors.background,
3088
+ fontSize: `${theme2.fontSizes[2]}px`,
3089
+ fontWeight: theme2.fontWeights.semibold,
3090
+ cursor: "pointer",
3091
+ transition: "opacity 0.15s ease"
3092
+ },
3093
+ onMouseEnter: (e) => {
3094
+ e.currentTarget.style.opacity = "0.9";
3095
+ },
3096
+ onMouseLeave: (e) => {
3097
+ e.currentTarget.style.opacity = "1";
3098
+ },
3099
+ children: [
3100
+ /* @__PURE__ */ jsx(Plus, { size: 16 }),
3101
+ "Create Issue"
3102
+ ]
3103
+ }
3104
+ )
2614
3105
  ] })
2615
3106
  ]
2616
3107
  }
@@ -2706,7 +3197,18 @@ const GitHubIssuesPanelContent = ({
2706
3197
  .animate-spin {
2707
3198
  animation: spin 1s linear infinite;
2708
3199
  }
2709
- ` })
3200
+ ` }),
3201
+ /* @__PURE__ */ jsx(
3202
+ CreateIssueModal,
3203
+ {
3204
+ isOpen: isCreateModalOpen,
3205
+ onClose: () => setIsCreateModalOpen(false),
3206
+ owner,
3207
+ repo,
3208
+ onIssueCreated: handleIssueCreated,
3209
+ apiBaseUrl: typeof window !== "undefined" ? window.location.origin : ""
3210
+ }
3211
+ )
2710
3212
  ]
2711
3213
  }
2712
3214
  );
@@ -49021,7 +49523,7 @@ const ReactionsDisplay = ({ reactions }) => {
49021
49523
  },
49022
49524
  children: [
49023
49525
  /* @__PURE__ */ jsx("span", { children: emoji }),
49024
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: count })
49526
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body, color: theme2.colors.textSecondary }, children: count })
49025
49527
  ]
49026
49528
  },
49027
49529
  emoji
@@ -49068,6 +49570,7 @@ const CommentEvent = ({ event }) => {
49068
49570
  "span",
49069
49571
  {
49070
49572
  style: {
49573
+ fontFamily: theme2.fonts.body,
49071
49574
  color: theme2.colors.textMuted,
49072
49575
  fontSize: theme2.fontSizes[0]
49073
49576
  },
@@ -49085,6 +49588,7 @@ const CommentEvent = ({ event }) => {
49085
49588
  borderRadius: "4px",
49086
49589
  backgroundColor: theme2.colors.backgroundSecondary,
49087
49590
  border: `1px solid ${theme2.colors.border}`,
49591
+ fontFamily: theme2.fonts.body,
49088
49592
  fontSize: theme2.fontSizes[0],
49089
49593
  color: theme2.colors.textSecondary,
49090
49594
  textTransform: "uppercase"
@@ -49185,6 +49689,7 @@ const ReviewEvent = ({ event }) => {
49185
49689
  "span",
49186
49690
  {
49187
49691
  style: {
49692
+ fontFamily: theme2.fonts.body,
49188
49693
  color: config.color,
49189
49694
  fontWeight: 500,
49190
49695
  fontSize: theme2.fontSizes[1]
@@ -49196,6 +49701,7 @@ const ReviewEvent = ({ event }) => {
49196
49701
  "span",
49197
49702
  {
49198
49703
  style: {
49704
+ fontFamily: theme2.fonts.body,
49199
49705
  color: theme2.colors.textMuted,
49200
49706
  fontSize: theme2.fontSizes[0]
49201
49707
  },
@@ -49334,6 +49840,7 @@ const CommitEvent = ({ event }) => {
49334
49840
  {
49335
49841
  style: {
49336
49842
  marginTop: "4px",
49843
+ fontFamily: theme2.fonts.body,
49337
49844
  fontSize: theme2.fontSizes[0],
49338
49845
  color: theme2.colors.textMuted
49339
49846
  },
@@ -49346,6 +49853,7 @@ const CommitEvent = ({ event }) => {
49346
49853
  {
49347
49854
  style: {
49348
49855
  marginLeft: "8px",
49856
+ fontFamily: theme2.fonts.body,
49349
49857
  color: theme2.colors.success || "#22c55e"
49350
49858
  },
49351
49859
  children: [
@@ -49373,6 +49881,7 @@ const SimpleEvent = ({ icon, actor, action, timestamp }) => {
49373
49881
  gap: "12px",
49374
49882
  padding: "8px 16px",
49375
49883
  borderBottom: `1px solid ${theme2.colors.border}`,
49884
+ fontFamily: theme2.fonts.body,
49376
49885
  fontSize: theme2.fontSizes[0],
49377
49886
  color: theme2.colors.textSecondary
49378
49887
  },
@@ -49389,9 +49898,9 @@ const SimpleEvent = ({ icon, actor, action, timestamp }) => {
49389
49898
  }
49390
49899
  ),
49391
49900
  /* @__PURE__ */ jsx(Avatar, { user: actor, size: 20 }),
49392
- /* @__PURE__ */ jsx("span", { style: { fontWeight: 500, color: theme2.colors.text }, children: actor.login }),
49901
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body, fontWeight: 500, color: theme2.colors.text }, children: actor.login }),
49393
49902
  action,
49394
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textMuted, marginLeft: "auto" }, children: formatDate(timestamp) })
49903
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body, color: theme2.colors.textMuted, marginLeft: "auto" }, children: formatDate(timestamp) })
49395
49904
  ]
49396
49905
  }
49397
49906
  );
@@ -49405,7 +49914,7 @@ const LabelEvent = ({ event }) => {
49405
49914
  icon: /* @__PURE__ */ jsx(Tag, { size: 14, style: { color: theme2.colors.textMuted } }),
49406
49915
  actor: event.actor,
49407
49916
  action: /* @__PURE__ */ jsxs(Fragment, { children: [
49408
- /* @__PURE__ */ jsx("span", { children: isLabeled ? "added" : "removed" }),
49917
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body }, children: isLabeled ? "added" : "removed" }),
49409
49918
  /* @__PURE__ */ jsx(
49410
49919
  "span",
49411
49920
  {
@@ -49414,6 +49923,7 @@ const LabelEvent = ({ event }) => {
49414
49923
  borderRadius: "12px",
49415
49924
  backgroundColor: `#${event.label.color}`,
49416
49925
  color: parseInt(event.label.color, 16) > 8388607 ? "#000" : "#fff",
49926
+ fontFamily: theme2.fonts.body,
49417
49927
  fontSize: "11px",
49418
49928
  fontWeight: 500
49419
49929
  },
@@ -49434,8 +49944,8 @@ const AssignEvent = ({ event }) => {
49434
49944
  icon: isAssigned ? /* @__PURE__ */ jsx(UserPlus, { size: 14, style: { color: theme2.colors.textMuted } }) : /* @__PURE__ */ jsx(UserMinus, { size: 14, style: { color: theme2.colors.textMuted } }),
49435
49945
  actor: event.actor,
49436
49946
  action: /* @__PURE__ */ jsxs(Fragment, { children: [
49437
- /* @__PURE__ */ jsx("span", { children: isAssigned ? "assigned" : "unassigned" }),
49438
- /* @__PURE__ */ jsx("span", { style: { fontWeight: 500, color: theme2.colors.text }, children: event.assignee.login })
49947
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body }, children: isAssigned ? "assigned" : "unassigned" }),
49948
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body, fontWeight: 500, color: theme2.colors.text }, children: event.assignee.login })
49439
49949
  ] }),
49440
49950
  timestamp: event.created_at
49441
49951
  }
@@ -49452,8 +49962,8 @@ const ReviewRequestEvent = ({ event }) => {
49452
49962
  icon: /* @__PURE__ */ jsx(Eye, { size: 14, style: { color: theme2.colors.textMuted } }),
49453
49963
  actor: event.review_requester,
49454
49964
  action: /* @__PURE__ */ jsxs(Fragment, { children: [
49455
- /* @__PURE__ */ jsx("span", { children: isRequested ? "requested review from" : "removed review request from" }),
49456
- /* @__PURE__ */ jsx("span", { style: { fontWeight: 500, color: theme2.colors.text }, children: reviewer })
49965
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body }, children: isRequested ? "requested review from" : "removed review request from" }),
49966
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body, fontWeight: 500, color: theme2.colors.text }, children: reviewer })
49457
49967
  ] }),
49458
49968
  timestamp: event.created_at
49459
49969
  }
@@ -49467,8 +49977,8 @@ const MergeEvent = ({ event }) => {
49467
49977
  icon: /* @__PURE__ */ jsx(GitMerge, { size: 14, style: { color: theme2.colors.success || "#22c55e" } }),
49468
49978
  actor: event.actor,
49469
49979
  action: /* @__PURE__ */ jsxs(Fragment, { children: [
49470
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.success || "#22c55e", fontWeight: 500 }, children: "merged" }),
49471
- /* @__PURE__ */ jsx("span", { children: "commit" }),
49980
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body, color: theme2.colors.success || "#22c55e", fontWeight: 500 }, children: "merged" }),
49981
+ /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body }, children: "commit" }),
49472
49982
  /* @__PURE__ */ jsx(
49473
49983
  "code",
49474
49984
  {
@@ -49499,6 +50009,7 @@ const StateEvent = ({ event }) => {
49499
50009
  "span",
49500
50010
  {
49501
50011
  style: {
50012
+ fontFamily: theme2.fonts.body,
49502
50013
  color: isClosed ? theme2.colors.error || "#ef4444" : theme2.colors.success || "#22c55e",
49503
50014
  fontWeight: 500
49504
50015
  },
@@ -49521,7 +50032,7 @@ const RefEvent = ({ event }) => {
49521
50032
  {
49522
50033
  icon: /* @__PURE__ */ jsx(Rocket, { size: 14, style: { color: theme2.colors.textMuted } }),
49523
50034
  actor: event.actor,
49524
- action: /* @__PURE__ */ jsx("span", { children: labels[event.event] || event.event }),
50035
+ action: /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.body }, children: labels[event.event] || event.event }),
49525
50036
  timestamp: event.created_at
49526
50037
  }
49527
50038
  );
@@ -49555,6 +50066,7 @@ const InlineReviewComment = ({ comment: comment2 }) => {
49555
50066
  "span",
49556
50067
  {
49557
50068
  style: {
50069
+ fontFamily: theme2.fonts.body,
49558
50070
  fontWeight: 600,
49559
50071
  color: theme2.colors.text,
49560
50072
  fontSize: theme2.fontSizes[0]
@@ -49566,6 +50078,7 @@ const InlineReviewComment = ({ comment: comment2 }) => {
49566
50078
  "span",
49567
50079
  {
49568
50080
  style: {
50081
+ fontFamily: theme2.fonts.body,
49569
50082
  color: theme2.colors.textMuted,
49570
50083
  fontSize: theme2.fontSizes[0]
49571
50084
  },
@@ -49586,7 +50099,7 @@ const InlineReviewComment = ({ comment: comment2 }) => {
49586
50099
  children: comment2.path
49587
50100
  }
49588
50101
  ),
49589
- comment2.line && /* @__PURE__ */ jsxs("span", { style: { fontSize: theme2.fontSizes[0], color: theme2.colors.textSecondary }, children: [
50102
+ comment2.line && /* @__PURE__ */ jsxs("span", { style: { fontFamily: theme2.fonts.body, fontSize: theme2.fontSizes[0], color: theme2.colors.textSecondary }, children: [
49590
50103
  "line ",
49591
50104
  comment2.line
49592
50105
  ] })
@@ -49734,6 +50247,7 @@ const GitHubMessagesPanelContent = ({ context, events }) => {
49734
50247
  display: "flex",
49735
50248
  alignItems: "center",
49736
50249
  justifyContent: "center",
50250
+ fontFamily: theme2.fonts.body,
49737
50251
  color: theme2.colors.textSecondary
49738
50252
  },
49739
50253
  children: "Loading conversation..."
@@ -49800,6 +50314,7 @@ const GitHubMessagesPanelContent = ({ context, events }) => {
49800
50314
  alignItems: "center",
49801
50315
  justifyContent: "center",
49802
50316
  gap: "8px",
50317
+ fontFamily: theme2.fonts.body,
49803
50318
  color: theme2.colors.error || "#ef4444"
49804
50319
  },
49805
50320
  children: [
@@ -49810,30 +50325,6 @@ const GitHubMessagesPanelContent = ({ context, events }) => {
49810
50325
  ) });
49811
50326
  }
49812
50327
  const { target, timeline, reviewComments } = messagesData;
49813
- const isPR = target.type === "pull_request";
49814
- const getStatusConfig = () => {
49815
- if (isPR && target.merged) {
49816
- return {
49817
- icon: /* @__PURE__ */ jsx(GitMerge, { size: 14 }),
49818
- color: "#a855f7",
49819
- // purple for merged
49820
- label: "Merged"
49821
- };
49822
- }
49823
- if (target.state === "open") {
49824
- return {
49825
- icon: isPR ? /* @__PURE__ */ jsx(GitPullRequest, { size: 14 }) : /* @__PURE__ */ jsx(CircleDot, { size: 14 }),
49826
- color: theme2.colors.success || "#22c55e",
49827
- label: target.draft ? "Draft" : "Open"
49828
- };
49829
- }
49830
- return {
49831
- icon: /* @__PURE__ */ jsx(CircleDot, { size: 14 }),
49832
- color: theme2.colors.error || "#ef4444",
49833
- label: "Closed"
49834
- };
49835
- };
49836
- const statusConfig = getStatusConfig();
49837
50328
  return /* @__PURE__ */ jsxs("div", { ref: panelRef, tabIndex: -1, style: containerStyle, children: [
49838
50329
  /* @__PURE__ */ jsxs(
49839
50330
  "div",
@@ -49850,45 +50341,6 @@ const GitHubMessagesPanelContent = ({ context, events }) => {
49850
50341
  boxSizing: "border-box"
49851
50342
  },
49852
50343
  children: [
49853
- /* @__PURE__ */ jsxs(
49854
- "span",
49855
- {
49856
- style: {
49857
- display: "inline-flex",
49858
- alignItems: "center",
49859
- gap: "6px",
49860
- fontFamily: theme2.fonts.monospace,
49861
- fontSize: theme2.fontSizes[0],
49862
- color: theme2.colors.textSecondary
49863
- },
49864
- children: [
49865
- isPR ? /* @__PURE__ */ jsx(GitPullRequest, { size: 14 }) : /* @__PURE__ */ jsx(CircleDot, { size: 14 }),
49866
- "#",
49867
- target.number
49868
- ]
49869
- }
49870
- ),
49871
- /* @__PURE__ */ jsxs(
49872
- "span",
49873
- {
49874
- style: {
49875
- display: "inline-flex",
49876
- alignItems: "center",
49877
- gap: "6px",
49878
- padding: "4px 10px",
49879
- borderRadius: "999px",
49880
- backgroundColor: `${statusConfig.color}20`,
49881
- color: statusConfig.color,
49882
- fontFamily: theme2.fonts.heading,
49883
- fontSize: theme2.fontSizes[0],
49884
- fontWeight: 600
49885
- },
49886
- children: [
49887
- statusConfig.icon,
49888
- statusConfig.label
49889
- ]
49890
- }
49891
- ),
49892
50344
  /* @__PURE__ */ jsx(
49893
50345
  "span",
49894
50346
  {
@@ -49897,28 +50349,13 @@ const GitHubMessagesPanelContent = ({ context, events }) => {
49897
50349
  overflow: "hidden",
49898
50350
  textOverflow: "ellipsis",
49899
50351
  whiteSpace: "nowrap",
50352
+ fontFamily: theme2.fonts.heading,
49900
50353
  color: theme2.colors.text,
49901
50354
  fontSize: theme2.fontSizes[1]
49902
50355
  },
49903
50356
  children: target.title
49904
50357
  }
49905
50358
  ),
49906
- /* @__PURE__ */ jsxs(
49907
- "span",
49908
- {
49909
- style: {
49910
- display: "inline-flex",
49911
- alignItems: "center",
49912
- gap: "4px",
49913
- color: theme2.colors.textSecondary,
49914
- fontSize: theme2.fontSizes[0]
49915
- },
49916
- children: [
49917
- /* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
49918
- timeline.filter((e) => e.event === "commented" || e.event === "reviewed").length
49919
- ]
49920
- }
49921
- ),
49922
50359
  /* @__PURE__ */ jsx(
49923
50360
  "a",
49924
50361
  {
@@ -49974,6 +50411,7 @@ const GitHubMessagesPanelContent = ({ context, events }) => {
49974
50411
  padding: "12px 16px",
49975
50412
  backgroundColor: theme2.colors.backgroundSecondary,
49976
50413
  borderBottom: `1px solid ${theme2.colors.border}`,
50414
+ fontFamily: theme2.fonts.heading,
49977
50415
  fontWeight: 600,
49978
50416
  fontSize: theme2.fontSizes[0],
49979
50417
  color: theme2.colors.textSecondary,