@industry-theme/repository-composition-panels 0.2.1 → 0.2.3

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.
@@ -320,7 +320,7 @@ const createLucideIcon = (iconName, iconNode) => {
320
320
  * This source code is licensed under the ISC license.
321
321
  * See the LICENSE file in the root directory of this source tree.
322
322
  */
323
- const __iconNode$i = [
323
+ const __iconNode$l = [
324
324
  [
325
325
  "path",
326
326
  {
@@ -352,66 +352,85 @@ const __iconNode$i = [
352
352
  ["path", { d: "m12 8 4.74-2.85", key: "3rx089" }],
353
353
  ["path", { d: "M12 13.5V8", key: "1io7kd" }]
354
354
  ];
355
- const Boxes = createLucideIcon("boxes", __iconNode$i);
355
+ const Boxes = createLucideIcon("boxes", __iconNode$l);
356
356
  /**
357
357
  * @license lucide-react v0.552.0 - ISC
358
358
  *
359
359
  * This source code is licensed under the ISC license.
360
360
  * See the LICENSE file in the root directory of this source tree.
361
361
  */
362
- const __iconNode$h = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
363
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$h);
362
+ const __iconNode$k = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
363
+ const Check = createLucideIcon("check", __iconNode$k);
364
364
  /**
365
365
  * @license lucide-react v0.552.0 - ISC
366
366
  *
367
367
  * This source code is licensed under the ISC license.
368
368
  * See the LICENSE file in the root directory of this source tree.
369
369
  */
370
- const __iconNode$g = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
371
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$g);
370
+ const __iconNode$j = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
371
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$j);
372
372
  /**
373
373
  * @license lucide-react v0.552.0 - ISC
374
374
  *
375
375
  * This source code is licensed under the ISC license.
376
376
  * See the LICENSE file in the root directory of this source tree.
377
377
  */
378
- const __iconNode$f = [
378
+ const __iconNode$i = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
379
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$i);
380
+ /**
381
+ * @license lucide-react v0.552.0 - ISC
382
+ *
383
+ * This source code is licensed under the ISC license.
384
+ * See the LICENSE file in the root directory of this source tree.
385
+ */
386
+ const __iconNode$h = [
379
387
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
380
388
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
381
389
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
382
390
  ];
383
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$f);
391
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$h);
384
392
  /**
385
393
  * @license lucide-react v0.552.0 - ISC
386
394
  *
387
395
  * This source code is licensed under the ISC license.
388
396
  * See the LICENSE file in the root directory of this source tree.
389
397
  */
390
- const __iconNode$e = [
398
+ const __iconNode$g = [
391
399
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
392
400
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
393
401
  ["path", { d: "M12 17h.01", key: "p32p05" }]
394
402
  ];
395
- const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$e);
403
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$g);
396
404
  /**
397
405
  * @license lucide-react v0.552.0 - ISC
398
406
  *
399
407
  * This source code is licensed under the ISC license.
400
408
  * See the LICENSE file in the root directory of this source tree.
401
409
  */
402
- const __iconNode$d = [
410
+ const __iconNode$f = [
411
+ ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
412
+ ["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" }]
413
+ ];
414
+ const Copy = createLucideIcon("copy", __iconNode$f);
415
+ /**
416
+ * @license lucide-react v0.552.0 - ISC
417
+ *
418
+ * This source code is licensed under the ISC license.
419
+ * See the LICENSE file in the root directory of this source tree.
420
+ */
421
+ const __iconNode$e = [
403
422
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
404
423
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
405
424
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
406
425
  ];
407
- const ExternalLink = createLucideIcon("external-link", __iconNode$d);
426
+ const ExternalLink = createLucideIcon("external-link", __iconNode$e);
408
427
  /**
409
428
  * @license lucide-react v0.552.0 - ISC
410
429
  *
411
430
  * This source code is licensed under the ISC license.
412
431
  * See the LICENSE file in the root directory of this source tree.
413
432
  */
414
- const __iconNode$c = [
433
+ const __iconNode$d = [
415
434
  [
416
435
  "path",
417
436
  {
@@ -423,14 +442,14 @@ const __iconNode$c = [
423
442
  ["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
424
443
  ["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
425
444
  ];
426
- const FileCode = createLucideIcon("file-code", __iconNode$c);
445
+ const FileCode = createLucideIcon("file-code", __iconNode$d);
427
446
  /**
428
447
  * @license lucide-react v0.552.0 - ISC
429
448
  *
430
449
  * This source code is licensed under the ISC license.
431
450
  * See the LICENSE file in the root directory of this source tree.
432
451
  */
433
- const __iconNode$b = [
452
+ const __iconNode$c = [
434
453
  [
435
454
  "path",
436
455
  {
@@ -441,7 +460,27 @@ const __iconNode$b = [
441
460
  ["path", { d: "M12 17h.01", key: "p32p05" }],
442
461
  ["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3", key: "mhlwft" }]
443
462
  ];
444
- const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$b);
463
+ const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$c);
464
+ /**
465
+ * @license lucide-react v0.552.0 - ISC
466
+ *
467
+ * This source code is licensed under the ISC license.
468
+ * See the LICENSE file in the root directory of this source tree.
469
+ */
470
+ const __iconNode$b = [
471
+ [
472
+ "path",
473
+ {
474
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
475
+ key: "1oefj6"
476
+ }
477
+ ],
478
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
479
+ ["path", { d: "M10 9H8", key: "b1mrlr" }],
480
+ ["path", { d: "M16 13H8", key: "t4e002" }],
481
+ ["path", { d: "M16 17H8", key: "z1uh3a" }]
482
+ ];
483
+ const FileText = createLucideIcon("file-text", __iconNode$b);
445
484
  /**
446
485
  * @license lucide-react v0.552.0 - ISC
447
486
  *
@@ -8496,13 +8535,145 @@ const GitChangesPanel = ({ context }) => {
8496
8535
  }
8497
8536
  );
8498
8537
  };
8538
+ const NpmIcon = ({ size: size2 }) => /* @__PURE__ */ jsxs(
8539
+ "svg",
8540
+ {
8541
+ width: size2,
8542
+ height: size2,
8543
+ viewBox: "0 0 24 24",
8544
+ fill: "#CB3837",
8545
+ role: "img",
8546
+ xmlns: "http://www.w3.org/2000/svg",
8547
+ children: [
8548
+ /* @__PURE__ */ jsx("title", { children: "npm" }),
8549
+ /* @__PURE__ */ jsx("path", { d: "M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z" })
8550
+ ]
8551
+ }
8552
+ );
8553
+ const YarnIcon = ({ size: size2 }) => /* @__PURE__ */ jsxs(
8554
+ "svg",
8555
+ {
8556
+ width: size2,
8557
+ height: size2,
8558
+ viewBox: "0 0 24 24",
8559
+ fill: "#2C8EBB",
8560
+ role: "img",
8561
+ xmlns: "http://www.w3.org/2000/svg",
8562
+ children: [
8563
+ /* @__PURE__ */ jsx("title", { children: "Yarn" }),
8564
+ /* @__PURE__ */ jsx("path", { d: "M12 0C5.375 0 0 5.375 0 12s5.375 12 12 12 12-5.375 12-12S18.625 0 12 0zm.768 4.105c.183 0 .363.053.525.157.125.083.287.185.755 1.154.31-.088.468-.042.551-.019.204.056.366.19.463.375.477.917.542 2.553.334 3.605-.241 1.232-.755 2.029-1.131 2.576.324.329.778.899 1.117 1.825.278.774.31 1.478.273 2.015a5.51 5.51 0 0 0 .602-.329c.593-.366 1.487-.917 2.553-.931.714-.009 1.269.445 1.353 1.103a1.23 1.23 0 0 1-.945 1.362c-.649.158-.95.278-1.821.843-1.232.797-2.539 1.242-3.012 1.39a1.686 1.686 0 0 1-.704.343c-.737.181-3.266.315-3.466.315h-.046c-.783 0-1.214-.241-1.45-.491-.658.329-1.51.19-2.122-.134a1.078 1.078 0 0 1-.58-1.153 1.243 1.243 0 0 1-.153-.195c-.162-.25-.528-.936-.454-1.946.056-.723.556-1.367.88-1.71a5.522 5.522 0 0 1 .408-2.256c.306-.727.885-1.348 1.32-1.737-.32-.537-.644-1.367-.329-2.21.227-.602.412-.936.82-1.08h-.005c.199-.074.389-.153.486-.259a3.418 3.418 0 0 1 2.298-1.103c.037-.093.079-.185.125-.283.31-.658.639-1.029 1.024-1.168a.94.94 0 0 1 .328-.06zm.006.7c-.507.016-1.001 1.519-1.001 1.519s-1.27-.204-2.266.871c-.199.218-.468.334-.746.44-.079.028-.176.023-.417.672-.371.991.625 2.094.625 2.094s-1.186.839-1.626 1.881c-.486 1.144-.338 2.261-.338 2.261s-.843.732-.899 1.487c-.051.663.139 1.2.343 1.515.227.343.51.176.51.176s-.561.653-.037.931c.477.25 1.283.394 1.71-.037.31-.31.371-1.001.486-1.283.028-.065.12.111.209.199.097.093.264.195.264.195s-.755.324-.445 1.066c.102.246.468.403 1.066.398.222-.005 2.664-.139 3.313-.296.375-.088.505-.283.505-.283s1.566-.431 2.998-1.357c.917-.598 1.293-.76 2.034-.936.612-.148.57-1.098-.241-1.084-.839.009-1.575.44-2.196.825-1.163.718-1.742.672-1.742.672l-.018-.032c-.079-.13.371-1.293-.134-2.678-.547-1.515-1.413-1.881-1.344-1.997.297-.5 1.038-1.297 1.334-2.78.176-.899.13-2.377-.269-3.151-.074-.144-.732.241-.732.241s-.616-1.371-.788-1.483a.271.271 0 0 0-.157-.046z" })
8565
+ ]
8566
+ }
8567
+ );
8568
+ const PnpmIcon = ({ size: size2 }) => /* @__PURE__ */ jsxs(
8569
+ "svg",
8570
+ {
8571
+ width: size2,
8572
+ height: size2,
8573
+ viewBox: "0 0 24 24",
8574
+ fill: "#F69220",
8575
+ role: "img",
8576
+ xmlns: "http://www.w3.org/2000/svg",
8577
+ children: [
8578
+ /* @__PURE__ */ jsx("title", { children: "pnpm" }),
8579
+ /* @__PURE__ */ jsx("path", { d: "M0 0v7.5h7.5V0zm8.25 0v7.5h7.498V0zm8.25 0v7.5H24V0zM8.25 8.25v7.5h7.498v-7.5zm8.25 0v7.5H24v-7.5zM0 16.5V24h7.5v-7.5zm8.25 0V24h7.498v-7.5zm8.25 0V24H24v-7.5z" })
8580
+ ]
8581
+ }
8582
+ );
8583
+ const BunIcon = ({ size: size2 }) => /* @__PURE__ */ jsxs(
8584
+ "svg",
8585
+ {
8586
+ width: size2,
8587
+ height: size2,
8588
+ viewBox: "0 0 24 24",
8589
+ fill: "#FBF0DF",
8590
+ role: "img",
8591
+ xmlns: "http://www.w3.org/2000/svg",
8592
+ children: [
8593
+ /* @__PURE__ */ jsx("title", { children: "Bun" }),
8594
+ /* @__PURE__ */ jsx("path", { d: "M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083 5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z" })
8595
+ ]
8596
+ }
8597
+ );
8598
+ const PythonIcon = ({ size: size2 }) => /* @__PURE__ */ jsxs(
8599
+ "svg",
8600
+ {
8601
+ width: size2,
8602
+ height: size2,
8603
+ viewBox: "0 0 24 24",
8604
+ fill: "#3776AB",
8605
+ role: "img",
8606
+ xmlns: "http://www.w3.org/2000/svg",
8607
+ children: [
8608
+ /* @__PURE__ */ jsx("title", { children: "Python" }),
8609
+ /* @__PURE__ */ jsx("path", { d: "M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z" })
8610
+ ]
8611
+ }
8612
+ );
8613
+ const PoetryIcon = ({ size: size2 }) => /* @__PURE__ */ jsxs(
8614
+ "svg",
8615
+ {
8616
+ width: size2,
8617
+ height: size2,
8618
+ viewBox: "0 0 24 24",
8619
+ fill: "#60A5FA",
8620
+ role: "img",
8621
+ xmlns: "http://www.w3.org/2000/svg",
8622
+ children: [
8623
+ /* @__PURE__ */ jsx("title", { children: "Poetry" }),
8624
+ /* @__PURE__ */ jsx("path", { d: "M21.604 0a19.144 19.144 0 0 1-5.268 13.213L2.396 0l13.583 13.583a19.149 19.149 0 0 1-13.583 5.624V0h19.208Zm-1.911 17.297A24.455 24.455 0 0 1 7.189 24l-4.053-4.053a19.91 19.91 0 0 0 13.37-5.838l3.187 3.188Z" })
8625
+ ]
8626
+ }
8627
+ );
8628
+ const RustIcon = ({ size: size2 }) => /* @__PURE__ */ jsxs(
8629
+ "svg",
8630
+ {
8631
+ width: size2,
8632
+ height: size2,
8633
+ viewBox: "0 0 24 24",
8634
+ fill: "#000000",
8635
+ role: "img",
8636
+ xmlns: "http://www.w3.org/2000/svg",
8637
+ children: [
8638
+ /* @__PURE__ */ jsx("title", { children: "Rust" }),
8639
+ /* @__PURE__ */ jsx("path", { d: "M23.8346 11.7033l-1.0073-.6236a13.7268 13.7268 0 00-.0283-.2936l.8656-.8069a.3483.3483 0 00-.1154-.578l-1.1066-.414a8.4958 8.4958 0 00-.087-.2856l.6904-.9587a.3462.3462 0 00-.2257-.5446l-1.1663-.1894a9.3574 9.3574 0 00-.1407-.2622l.49-1.0761a.3437.3437 0 00-.0274-.3361.3486.3486 0 00-.3006-.154l-1.1845.0416a6.7444 6.7444 0 00-.1873-.2268l.2723-1.153a.3472.3472 0 00-.417-.4172l-1.1532.2724a14.0183 14.0183 0 00-.2278-.1873l.0415-1.1845a.3442.3442 0 00-.49-.328l-1.076.491c-.0872-.0476-.1742-.0952-.2623-.1407l-.1903-1.1673A.3483.3483 0 0016.256.955l-.9597.6905a8.4867 8.4867 0 00-.2855-.086l-.414-1.1066a.3483.3483 0 00-.5781-.1154l-.8069.8666a9.2936 9.2936 0 00-.2936-.0284L12.2946.1683a.3462.3462 0 00-.5892 0l-.6236 1.0073a13.7383 13.7383 0 00-.2936.0284L9.9803.3374a.3462.3462 0 00-.578.1154l-.4141 1.1065c-.0962.0274-.1903.0567-.2855.086L7.744.955a.3483.3483 0 00-.5447.2258L7.009 2.348a9.3574 9.3574 0 00-.2622.1407l-1.0762-.491a.3462.3462 0 00-.49.328l.0416 1.1845a7.9826 7.9826 0 00-.2278.1873L3.8413 3.425a.3472.3472 0 00-.4171.4171l.2713 1.1531c-.0628.075-.1255.1509-.1863.2268l-1.1845-.0415a.3462.3462 0 00-.328.49l.491 1.0761a9.167 9.167 0 00-.1407.2622l-1.1662.1894a.3483.3483 0 00-.2258.5446l.6904.9587a13.303 13.303 0 00-.087.2855l-1.1065.414a.3483.3483 0 00-.1155.5781l.8656.807a9.2936 9.2936 0 00-.0283.2935l-1.0073.6236a.3442.3442 0 000 .5892l1.0073.6236c.008.0982.0182.1964.0283.2936l-.8656.8079a.3462.3462 0 00.1155.578l1.1065.4141c.0273.0962.0567.1914.087.2855l-.6904.9587a.3452.3452 0 00.2268.5447l1.1662.1893c.0456.088.0922.1751.1408.2622l-.491 1.0762a.3462.3462 0 00.328.49l1.1834-.0415c.0618.0769.1235.1528.1873.2277l-.2713 1.1541a.3462.3462 0 00.4171.4161l1.153-.2713c.075.0638.151.1255.2279.1863l-.0415 1.1845a.3442.3442 0 00.49.327l1.0761-.49c.087.0486.1741.0951.2622.1407l.1903 1.1662a.3483.3483 0 00.5447.2268l.9587-.6904a9.299 9.299 0 00.2855.087l.414 1.1066a.3452.3452 0 00.5781.1154l.8079-.8656c.0972.0111.1954.0203.2936.0294l.6236 1.0073a.3472.3472 0 00.5892 0l.6236-1.0073c.0982-.0091.1964-.0183.2936-.0294l.8069.8656a.3483.3483 0 00.578-.1154l.4141-1.1066a8.4626 8.4626 0 00.2855-.087l.9587.6904a.3452.3452 0 00.5447-.2268l.1903-1.1662c.088-.0456.1751-.0931.2622-.1407l1.0762.49a.3472.3472 0 00.49-.327l-.0415-1.1845a6.7267 6.7267 0 00.2267-.1863l1.1531.2713a.3472.3472 0 00.4171-.416l-.2713-1.1542c.0628-.0749.1255-.1508.1863-.2278l1.1845.0415a.3442.3442 0 00.328-.49l-.49-1.076c.0475-.0872.0951-.1742.1407-.2623l1.1662-.1893a.3483.3483 0 00.2258-.5447l-.6904-.9587.087-.2855 1.1066-.414a.3462.3462 0 00.1154-.5781l-.8656-.8079c.0101-.0972.0202-.1954.0283-.2936l1.0073-.6236a.3442.3442 0 000-.5892zm-6.7413 8.3551a.7138.7138 0 01.2986-1.396.714.714 0 11-.2997 1.396zm-.3422-2.3142a.649.649 0 00-.7715.5l-.3573 1.6685c-1.1035.501-2.3285.7795-3.6193.7795a8.7368 8.7368 0 01-3.6951-.814l-.3574-1.6684a.648.648 0 00-.7714-.499l-1.473.3158a8.7216 8.7216 0 01-.7613-.898h7.1676c.081 0 .1356-.0141.1356-.088v-2.536c0-.074-.0536-.0881-.1356-.0881h-2.0966v-1.6077h2.2677c.2065 0 1.1065.0587 1.394 1.2088.0901.3533.2875 1.5044.4232 1.8729.1346.413.6833 1.2381 1.2685 1.2381h3.5716a.7492.7492 0 00.1296-.0131 8.7874 8.7874 0 01-.8119.9526zM6.8369 20.024a.714.714 0 11-.2997-1.396.714.714 0 01.2997 1.396zM4.1177 8.9972a.7137.7137 0 11-1.304.5791.7137.7137 0 011.304-.579zm-.8352 1.9813l1.5347-.6824a.65.65 0 00.33-.8585l-.3158-.7147h1.2432v5.6025H3.5669a8.7753 8.7753 0 01-.2834-3.348zm6.7343-.5437V8.7836h2.9601c.153 0 1.0792.1772 1.0792.8697 0 .575-.7107.7815-1.2948.7815zm10.7574 1.4862c0 .2187-.008.4363-.0243.651h-.9c-.09 0-.1265.0586-.1265.1477v.413c0 .973-.5487 1.1846-1.0296 1.2382-.4576.0517-.9648-.1913-1.0275-.4717-.2704-1.5186-.7198-1.8436-1.4305-2.4034.8817-.5599 1.799-1.386 1.799-2.4915 0-1.1936-.819-1.9458-1.3769-2.3153-.7825-.5163-1.6491-.6195-1.883-.6195H5.4682a8.7651 8.7651 0 014.907-2.7699l1.0974 1.151a.648.648 0 00.9182.0213l1.227-1.1743a8.7753 8.7753 0 016.0044 4.2762l-.8403 1.8982a.652.652 0 00.33.8585l1.6178.7188c.0283.2875.0425.577.0425.8717zm-9.3006-9.5993a.7128.7128 0 11.984 1.0316.7137.7137 0 01-.984-1.0316zm8.3389 6.71a.7107.7107 0 01.9395-.3625.7137.7137 0 11-.9405.3635z" })
8640
+ ]
8641
+ }
8642
+ );
8643
+ const PackageManagerIcon = ({
8644
+ packageManager,
8645
+ size: size2 = 18,
8646
+ color
8647
+ }) => {
8648
+ switch (packageManager) {
8649
+ case "npm":
8650
+ return /* @__PURE__ */ jsx(NpmIcon, { size: size2 });
8651
+ case "yarn":
8652
+ return /* @__PURE__ */ jsx(YarnIcon, { size: size2 });
8653
+ case "pnpm":
8654
+ return /* @__PURE__ */ jsx(PnpmIcon, { size: size2 });
8655
+ case "bun":
8656
+ return /* @__PURE__ */ jsx(BunIcon, { size: size2 });
8657
+ case "pip":
8658
+ case "pipenv":
8659
+ return /* @__PURE__ */ jsx(PythonIcon, { size: size2 });
8660
+ case "poetry":
8661
+ return /* @__PURE__ */ jsx(PoetryIcon, { size: size2 });
8662
+ case "cargo":
8663
+ return /* @__PURE__ */ jsx(RustIcon, { size: size2 });
8664
+ case "unknown":
8665
+ default:
8666
+ return /* @__PURE__ */ jsx(Package, { size: size2, color });
8667
+ }
8668
+ };
8499
8669
  const PackageCard = ({
8500
8670
  pkg,
8501
8671
  isExpanded,
8502
8672
  onToggle,
8503
8673
  onCommandClick,
8504
8674
  onConfigClick,
8505
- onPackageClick
8675
+ onPackageClick,
8676
+ standalone = false
8506
8677
  }) => {
8507
8678
  const { theme: theme2 } = useTheme();
8508
8679
  const [activeTab, setActiveTab] = useState("commands");
@@ -8511,6 +8682,230 @@ const PackageCard = ({
8511
8682
  return Object.entries(pkg.configFiles).filter(([, config]) => config == null ? void 0 : config.exists).map(([name, config]) => ({ name, ...config }));
8512
8683
  }, [pkg.configFiles]);
8513
8684
  const commands = pkg.packageData.availableCommands || [];
8685
+ if (standalone) {
8686
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
8687
+ /* @__PURE__ */ jsxs(
8688
+ "div",
8689
+ {
8690
+ style: {
8691
+ display: "flex",
8692
+ alignItems: "center",
8693
+ gap: "8px",
8694
+ padding: "12px 16px",
8695
+ borderBottom: `1px solid ${theme2.colors.border}`
8696
+ },
8697
+ children: [
8698
+ /* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: pkg.packageData.packageManager, size: 18 }),
8699
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
8700
+ /* @__PURE__ */ jsx(
8701
+ "div",
8702
+ {
8703
+ style: {
8704
+ fontSize: theme2.fontSizes[2],
8705
+ fontWeight: 600,
8706
+ color: theme2.colors.text,
8707
+ overflow: "hidden",
8708
+ textOverflow: "ellipsis",
8709
+ whiteSpace: "nowrap"
8710
+ },
8711
+ children: pkg.packageData.name
8712
+ }
8713
+ ),
8714
+ pkg.packageData.version && /* @__PURE__ */ jsxs(
8715
+ "div",
8716
+ {
8717
+ style: {
8718
+ fontSize: theme2.fontSizes[0],
8719
+ color: theme2.colors.textSecondary
8720
+ },
8721
+ children: [
8722
+ "v",
8723
+ pkg.packageData.version
8724
+ ]
8725
+ }
8726
+ )
8727
+ ] }),
8728
+ pkg.packageData.path && /* @__PURE__ */ jsxs(
8729
+ "button",
8730
+ {
8731
+ onClick: () => onPackageClick == null ? void 0 : onPackageClick(pkg.packageData.path),
8732
+ style: {
8733
+ display: "flex",
8734
+ alignItems: "center",
8735
+ gap: "4px",
8736
+ padding: "4px 8px",
8737
+ backgroundColor: theme2.colors.backgroundTertiary,
8738
+ border: `1px solid ${theme2.colors.border}`,
8739
+ borderRadius: "4px",
8740
+ color: theme2.colors.textSecondary,
8741
+ fontSize: theme2.fontSizes[0],
8742
+ cursor: "pointer"
8743
+ },
8744
+ title: "Open package folder",
8745
+ children: [
8746
+ /* @__PURE__ */ jsx(Folder, { size: 12 }),
8747
+ pkg.packageData.path || "/"
8748
+ ]
8749
+ }
8750
+ )
8751
+ ]
8752
+ }
8753
+ ),
8754
+ /* @__PURE__ */ jsx(
8755
+ "div",
8756
+ {
8757
+ style: {
8758
+ display: "flex",
8759
+ backgroundColor: theme2.colors.backgroundTertiary,
8760
+ borderBottom: `1px solid ${theme2.colors.border}`
8761
+ },
8762
+ children: [
8763
+ { id: "commands", label: "Commands", count: commands.length },
8764
+ { id: "configs", label: "Configs", count: configFiles.length }
8765
+ ].map((tab) => /* @__PURE__ */ jsxs(
8766
+ "button",
8767
+ {
8768
+ onClick: () => setActiveTab(tab.id),
8769
+ style: {
8770
+ flex: 1,
8771
+ padding: "8px 12px",
8772
+ backgroundColor: activeTab === tab.id ? theme2.colors.backgroundSecondary : "transparent",
8773
+ border: "none",
8774
+ borderBottom: activeTab === tab.id ? `2px solid ${theme2.colors.accent}` : "2px solid transparent",
8775
+ color: activeTab === tab.id ? theme2.colors.text : theme2.colors.textSecondary,
8776
+ fontSize: theme2.fontSizes[1],
8777
+ cursor: "pointer",
8778
+ display: "flex",
8779
+ alignItems: "center",
8780
+ justifyContent: "center",
8781
+ gap: "6px"
8782
+ },
8783
+ children: [
8784
+ tab.label,
8785
+ /* @__PURE__ */ jsx(
8786
+ "span",
8787
+ {
8788
+ style: {
8789
+ backgroundColor: theme2.colors.backgroundTertiary,
8790
+ padding: "1px 6px",
8791
+ borderRadius: "10px",
8792
+ fontSize: theme2.fontSizes[0]
8793
+ },
8794
+ children: tab.count
8795
+ }
8796
+ )
8797
+ ]
8798
+ },
8799
+ tab.id
8800
+ ))
8801
+ }
8802
+ ),
8803
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, padding: "12px", overflow: "auto" }, children: [
8804
+ activeTab === "commands" && /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: commands.length === 0 ? /* @__PURE__ */ jsx("div", { style: { color: theme2.colors.textSecondary, fontSize: theme2.fontSizes[1] }, children: "No commands available" }) : commands.map((cmd, idx) => /* @__PURE__ */ jsxs(
8805
+ "button",
8806
+ {
8807
+ onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path),
8808
+ style: {
8809
+ display: "flex",
8810
+ alignItems: "center",
8811
+ gap: "8px",
8812
+ padding: "8px 12px",
8813
+ backgroundColor: theme2.colors.backgroundTertiary,
8814
+ border: `1px solid ${theme2.colors.border}`,
8815
+ borderRadius: "6px",
8816
+ color: theme2.colors.text,
8817
+ cursor: "pointer",
8818
+ textAlign: "left"
8819
+ },
8820
+ children: [
8821
+ /* @__PURE__ */ jsx(Terminal, { size: 14, color: theme2.colors.accent }),
8822
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
8823
+ /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: cmd.name }),
8824
+ /* @__PURE__ */ jsx(
8825
+ "div",
8826
+ {
8827
+ style: {
8828
+ fontSize: theme2.fontSizes[0],
8829
+ color: theme2.colors.textSecondary,
8830
+ fontFamily: "monospace",
8831
+ overflow: "hidden",
8832
+ textOverflow: "ellipsis",
8833
+ whiteSpace: "nowrap"
8834
+ },
8835
+ children: cmd.command
8836
+ }
8837
+ )
8838
+ ] }),
8839
+ cmd.isLensCommand && /* @__PURE__ */ jsx(
8840
+ "span",
8841
+ {
8842
+ style: {
8843
+ padding: "2px 6px",
8844
+ backgroundColor: theme2.colors.accent + "20",
8845
+ color: theme2.colors.accent,
8846
+ borderRadius: "4px",
8847
+ fontSize: theme2.fontSizes[0]
8848
+ },
8849
+ children: cmd.lensId
8850
+ }
8851
+ ),
8852
+ /* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme2.colors.textSecondary })
8853
+ ]
8854
+ },
8855
+ idx
8856
+ )) }),
8857
+ activeTab === "configs" && /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: configFiles.length === 0 ? /* @__PURE__ */ jsx("div", { style: { color: theme2.colors.textSecondary, fontSize: theme2.fontSizes[1] }, children: "No config files detected" }) : configFiles.map((config, idx) => /* @__PURE__ */ jsxs(
8858
+ "button",
8859
+ {
8860
+ onClick: () => onConfigClick == null ? void 0 : onConfigClick(config),
8861
+ style: {
8862
+ display: "flex",
8863
+ alignItems: "center",
8864
+ gap: "8px",
8865
+ padding: "8px 12px",
8866
+ backgroundColor: theme2.colors.backgroundTertiary,
8867
+ border: `1px solid ${theme2.colors.border}`,
8868
+ borderRadius: "6px",
8869
+ color: theme2.colors.text,
8870
+ cursor: "pointer",
8871
+ textAlign: "left"
8872
+ },
8873
+ children: [
8874
+ /* @__PURE__ */ jsx(Settings, { size: 14, color: theme2.colors.textSecondary }),
8875
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
8876
+ /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: config.name }),
8877
+ /* @__PURE__ */ jsx(
8878
+ "div",
8879
+ {
8880
+ style: {
8881
+ fontSize: theme2.fontSizes[0],
8882
+ color: theme2.colors.textSecondary,
8883
+ fontFamily: "monospace"
8884
+ },
8885
+ children: config.path
8886
+ }
8887
+ )
8888
+ ] }),
8889
+ config.isInline && /* @__PURE__ */ jsx(
8890
+ "span",
8891
+ {
8892
+ style: {
8893
+ padding: "2px 6px",
8894
+ backgroundColor: theme2.colors.textSecondary + "20",
8895
+ color: theme2.colors.textSecondary,
8896
+ borderRadius: "4px",
8897
+ fontSize: theme2.fontSizes[0]
8898
+ },
8899
+ children: "inline"
8900
+ }
8901
+ )
8902
+ ]
8903
+ },
8904
+ idx
8905
+ )) })
8906
+ ] })
8907
+ ] });
8908
+ }
8514
8909
  return /* @__PURE__ */ jsxs(
8515
8910
  "div",
8516
8911
  {
@@ -8539,7 +8934,7 @@ const PackageCard = ({
8539
8934
  },
8540
8935
  children: [
8541
8936
  isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 16, color: theme2.colors.textSecondary }) : /* @__PURE__ */ jsx(ChevronRight, { size: 16, color: theme2.colors.textSecondary }),
8542
- /* @__PURE__ */ jsx(Package, { size: 18, color: theme2.colors.accent }),
8937
+ /* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: pkg.packageData.packageManager, size: 18 }),
8543
8938
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
8544
8939
  /* @__PURE__ */ jsx(
8545
8940
  "div",
@@ -8813,6 +9208,21 @@ const PackageCompositionPanelContent = ({
8813
9208
  if (!a.packageData.isMonorepoRoot && b.packageData.isMonorepoRoot) return 1;
8814
9209
  return a.packageData.path.localeCompare(b.packageData.path);
8815
9210
  });
9211
+ if (packages.length === 1) {
9212
+ return /* @__PURE__ */ jsx(
9213
+ PackageCard,
9214
+ {
9215
+ pkg: packages[0],
9216
+ isExpanded: true,
9217
+ onToggle: () => {
9218
+ },
9219
+ onCommandClick,
9220
+ onConfigClick,
9221
+ onPackageClick,
9222
+ standalone: true
9223
+ }
9224
+ );
9225
+ }
8816
9226
  return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
8817
9227
  /* @__PURE__ */ jsxs(
8818
9228
  "div",
@@ -8864,7 +9274,7 @@ const PackageCompositionPanelPreview = () => {
8864
9274
  },
8865
9275
  children: [
8866
9276
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
8867
- /* @__PURE__ */ jsx(Package, { size: 14, color: theme2.colors.accent }),
9277
+ /* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: "npm", size: 14 }),
8868
9278
  /* @__PURE__ */ jsx("span", { children: "my-app" })
8869
9279
  ] }),
8870
9280
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingLeft: "8px" }, children: [
@@ -8880,8 +9290,9 @@ const PackageCompositionPanelPreview = () => {
8880
9290
  );
8881
9291
  };
8882
9292
  const PackageCompositionPanel = ({ context }) => {
9293
+ var _a;
8883
9294
  const packagesSlice = context.getSlice("packages");
8884
- const packages = (packagesSlice == null ? void 0 : packagesSlice.data) ?? [];
9295
+ const packages = ((_a = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a.packages) ?? [];
8885
9296
  const isLoading = (packagesSlice == null ? void 0 : packagesSlice.loading) || false;
8886
9297
  return /* @__PURE__ */ jsx(
8887
9298
  PackageCompositionPanelContent,
@@ -9153,6 +9564,8 @@ const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__
9153
9564
  );
9154
9565
  const DependencyRow = ({ dependency }) => {
9155
9566
  const { theme: theme2 } = useTheme();
9567
+ const [isHovered, setIsHovered] = useState(false);
9568
+ const [copied, setCopied] = useState(false);
9156
9569
  const getDependencyTypeBadgeStyle = (type) => {
9157
9570
  const baseStyle = {
9158
9571
  padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
@@ -9189,6 +9602,31 @@ const DependencyRow = ({ dependency }) => {
9189
9602
  };
9190
9603
  }
9191
9604
  };
9605
+ const handleCopy = async (e) => {
9606
+ e.preventDefault();
9607
+ e.stopPropagation();
9608
+ try {
9609
+ const copyText = `${dependency.name}@${dependency.version}`;
9610
+ await navigator.clipboard.writeText(copyText);
9611
+ setCopied(true);
9612
+ setTimeout(() => setCopied(false), 2e3);
9613
+ } catch (err) {
9614
+ console.error("Failed to copy:", err);
9615
+ }
9616
+ };
9617
+ const actionButtonStyle = {
9618
+ padding: `${theme2.space[1]}px`,
9619
+ borderRadius: `${theme2.radii[1]}px`,
9620
+ display: "flex",
9621
+ alignItems: "center",
9622
+ justifyContent: "center",
9623
+ border: "none",
9624
+ backgroundColor: "transparent",
9625
+ cursor: "pointer",
9626
+ transition: "all 0.15s ease",
9627
+ opacity: isHovered ? 1 : 0,
9628
+ pointerEvents: isHovered ? "auto" : "none"
9629
+ };
9192
9630
  return /* @__PURE__ */ jsxs(
9193
9631
  "div",
9194
9632
  {
@@ -9203,6 +9641,8 @@ const DependencyRow = ({ dependency }) => {
9203
9641
  border: `1px solid ${theme2.colors.border}`,
9204
9642
  transition: "all 0.2s"
9205
9643
  },
9644
+ onMouseEnter: () => setIsHovered(true),
9645
+ onMouseLeave: () => setIsHovered(false),
9206
9646
  children: [
9207
9647
  /* @__PURE__ */ jsxs(
9208
9648
  "div",
@@ -9228,6 +9668,22 @@ const DependencyRow = ({ dependency }) => {
9228
9668
  },
9229
9669
  children: dependency.name
9230
9670
  }
9671
+ ),
9672
+ /* @__PURE__ */ jsx(
9673
+ "a",
9674
+ {
9675
+ href: `https://www.npmjs.com/package/${dependency.name}`,
9676
+ target: "_blank",
9677
+ rel: "noopener noreferrer",
9678
+ style: {
9679
+ ...actionButtonStyle,
9680
+ color: theme2.colors.textSecondary,
9681
+ textDecoration: "none",
9682
+ flexShrink: 0
9683
+ },
9684
+ title: "View on npm",
9685
+ children: /* @__PURE__ */ jsx(ExternalLink, { size: 12 })
9686
+ }
9231
9687
  )
9232
9688
  ]
9233
9689
  }
@@ -9238,27 +9694,23 @@ const DependencyRow = ({ dependency }) => {
9238
9694
  style: {
9239
9695
  display: "flex",
9240
9696
  alignItems: "center",
9241
- gap: "8px"
9697
+ gap: "4px"
9242
9698
  },
9243
9699
  children: [
9244
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: dependency.version }),
9245
9700
  /* @__PURE__ */ jsx(
9246
- "a",
9701
+ "button",
9247
9702
  {
9248
- href: `https://www.npmjs.com/package/${dependency.name}`,
9249
- target: "_blank",
9250
- rel: "noopener noreferrer",
9703
+ type: "button",
9704
+ onClick: handleCopy,
9251
9705
  style: {
9252
- padding: `${theme2.space[1]}px`,
9253
- borderRadius: `${theme2.radii[1]}px`,
9254
- display: "flex",
9255
- alignItems: "center",
9256
- transition: "background-color 0.2s"
9706
+ ...actionButtonStyle,
9707
+ color: copied ? theme2.colors.success || "#10b981" : theme2.colors.textSecondary
9257
9708
  },
9258
- title: "View on npm",
9259
- children: /* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme2.colors.textSecondary })
9709
+ title: copied ? "Copied!" : `Copy ${dependency.name}@${dependency.version}`,
9710
+ children: copied ? /* @__PURE__ */ jsx(Check, { size: 12 }) : /* @__PURE__ */ jsx(Copy, { size: 12 })
9260
9711
  }
9261
- )
9712
+ ),
9713
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: dependency.version })
9262
9714
  ]
9263
9715
  }
9264
9716
  )
@@ -9771,10 +10223,1012 @@ const DependenciesPanelContent = ({
9771
10223
  const DependenciesPanel = (props) => {
9772
10224
  return /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(DependenciesPanelContent, { ...props }) });
9773
10225
  };
9774
- const panels = [
9775
- {
9776
- metadata: {
9777
- id: "industry-theme.git-changes",
10226
+ class LocalSearchService {
10227
+ constructor() {
10228
+ this.documentsMap = /* @__PURE__ */ new Map();
10229
+ this.baseDirectory = "";
10230
+ this.initialized = false;
10231
+ }
10232
+ /**
10233
+ * Index files from FileTree
10234
+ */
10235
+ indexFileSystemTree(tree, baseDirectory) {
10236
+ this.baseDirectory = baseDirectory;
10237
+ this.documentsMap.clear();
10238
+ let index = 0;
10239
+ for (const file of tree.allFiles) {
10240
+ const absolutePath = file.path.startsWith("/") ? file.path : `${baseDirectory}/${file.path}`.replace(/\/+/g, "/");
10241
+ const doc = {
10242
+ id: index.toString(),
10243
+ path: absolutePath,
10244
+ name: file.name,
10245
+ relativePath: file.relativePath
10246
+ };
10247
+ this.documentsMap.set(doc.id, doc);
10248
+ index++;
10249
+ }
10250
+ this.initialized = true;
10251
+ }
10252
+ /**
10253
+ * Convert glob pattern to regex
10254
+ */
10255
+ globToRegex(pattern) {
10256
+ const escapedPattern = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/\?/g, ".");
10257
+ return new RegExp(`^${escapedPattern}$`, "i");
10258
+ }
10259
+ /**
10260
+ * Check if query contains wildcards
10261
+ */
10262
+ hasWildcards(query) {
10263
+ return query.includes("*") || query.includes("?");
10264
+ }
10265
+ /**
10266
+ * Check if document matches filter options
10267
+ */
10268
+ matchesFilters(doc, options) {
10269
+ var _a;
10270
+ if ((options == null ? void 0 : options.directoryFilters) && options.directoryFilters.length > 0) {
10271
+ const includeFilters = options.directoryFilters.filter((f) => f.mode === "include");
10272
+ const excludeFilters = options.directoryFilters.filter((f) => f.mode === "exclude");
10273
+ for (const filter of excludeFilters) {
10274
+ if (doc.relativePath.toLowerCase().includes(filter.path.toLowerCase())) {
10275
+ return false;
10276
+ }
10277
+ }
10278
+ if (includeFilters.length > 0) {
10279
+ const matchesInclude = includeFilters.some(
10280
+ (filter) => doc.relativePath.toLowerCase().includes(filter.path.toLowerCase())
10281
+ );
10282
+ if (!matchesInclude) return false;
10283
+ }
10284
+ } else if (options == null ? void 0 : options.directoryFilter) {
10285
+ const shouldInclude = options.excludeDirectory ? !doc.relativePath.includes(options.directoryFilter) : doc.relativePath.includes(options.directoryFilter);
10286
+ if (!shouldInclude) return false;
10287
+ }
10288
+ if (options == null ? void 0 : options.fileType) {
10289
+ const fileExtension = ((_a = doc.name.split(".").pop()) == null ? void 0 : _a.toLowerCase()) || "";
10290
+ if (fileExtension !== options.fileType.toLowerCase()) {
10291
+ return false;
10292
+ }
10293
+ }
10294
+ return true;
10295
+ }
10296
+ /**
10297
+ * Calculate relevance score for a match
10298
+ */
10299
+ calculateScore(doc, query) {
10300
+ const lowerQuery = query.toLowerCase();
10301
+ const lowerName = doc.name.toLowerCase();
10302
+ const lowerPath = doc.relativePath.toLowerCase();
10303
+ let score = 0;
10304
+ if (lowerName === lowerQuery) {
10305
+ score += 100;
10306
+ } else if (lowerName.startsWith(lowerQuery)) {
10307
+ score += 80;
10308
+ } else if (lowerName.includes(lowerQuery)) {
10309
+ score += 60;
10310
+ } else if (lowerPath.includes(lowerQuery)) {
10311
+ score += 40;
10312
+ }
10313
+ score += Math.max(0, 20 - doc.relativePath.split("/").length * 2);
10314
+ return score;
10315
+ }
10316
+ /**
10317
+ * Search files by filename
10318
+ */
10319
+ search(query, options) {
10320
+ if (!this.initialized || !query.trim()) {
10321
+ return [];
10322
+ }
10323
+ const limit = (options == null ? void 0 : options.limit) || 100;
10324
+ const results = [];
10325
+ if (this.hasWildcards(query)) {
10326
+ const regex = this.globToRegex(query);
10327
+ this.documentsMap.forEach((doc) => {
10328
+ if (doc && doc.name && regex.test(doc.name)) {
10329
+ if (!this.matchesFilters(doc, options)) return;
10330
+ results.push({
10331
+ path: doc.path,
10332
+ name: doc.name,
10333
+ relativePath: doc.relativePath,
10334
+ score: 90
10335
+ });
10336
+ }
10337
+ });
10338
+ return results.slice(0, limit);
10339
+ }
10340
+ const lowerQuery = query.toLowerCase();
10341
+ this.documentsMap.forEach((doc) => {
10342
+ if (!doc) return;
10343
+ const lowerName = doc.name.toLowerCase();
10344
+ const lowerPath = doc.relativePath.toLowerCase();
10345
+ if (lowerName.includes(lowerQuery) || lowerPath.includes(lowerQuery)) {
10346
+ if (!this.matchesFilters(doc, options)) return;
10347
+ results.push({
10348
+ path: doc.path,
10349
+ name: doc.name,
10350
+ relativePath: doc.relativePath,
10351
+ score: this.calculateScore(doc, query)
10352
+ });
10353
+ }
10354
+ });
10355
+ results.sort((a, b) => b.score - a.score);
10356
+ return results.slice(0, limit);
10357
+ }
10358
+ /**
10359
+ * Get unique directories from indexed files
10360
+ */
10361
+ getDirectories() {
10362
+ const directories = /* @__PURE__ */ new Set();
10363
+ this.documentsMap.forEach((doc) => {
10364
+ const parts = doc.relativePath.split("/");
10365
+ let path = "";
10366
+ for (let i = 0; i < parts.length - 1; i++) {
10367
+ path = path ? `${path}/${parts[i]}` : parts[i];
10368
+ directories.add(path);
10369
+ }
10370
+ });
10371
+ return Array.from(directories).sort();
10372
+ }
10373
+ /**
10374
+ * Clear the search index
10375
+ */
10376
+ clear() {
10377
+ this.documentsMap.clear();
10378
+ this.initialized = false;
10379
+ }
10380
+ isInitialized() {
10381
+ return this.initialized;
10382
+ }
10383
+ }
10384
+ const localSearchService = new LocalSearchService();
10385
+ const SearchPanelContent = ({
10386
+ fileTree,
10387
+ baseDirectory = "",
10388
+ isLoading = false,
10389
+ onFileSelect,
10390
+ onSearchResultsChange,
10391
+ onSearchResultHover,
10392
+ onDirectoryFiltersChange,
10393
+ selectedFile
10394
+ }) => {
10395
+ const { theme: theme2 } = useTheme();
10396
+ const [searchQuery, setSearchQuery] = useState("");
10397
+ const [searchResults, setSearchResults] = useState([]);
10398
+ const [directoryFilter, setDirectoryFilter] = useState("");
10399
+ const [directoryFilters, setDirectoryFilters] = useState([]);
10400
+ const [excludeDirectory, setExcludeDirectory] = useState(false);
10401
+ const [showDirectoryDropdown, setShowDirectoryDropdown] = useState(false);
10402
+ const [selectedDirectoryIndex, setSelectedDirectoryIndex] = useState(0);
10403
+ const [selectedSearchIndex, setSelectedSearchIndex] = useState(-1);
10404
+ const [isSearchResultsFocused, setIsSearchResultsFocused] = useState(false);
10405
+ const [copiedPath, setCopiedPath] = useState(null);
10406
+ const searchInputRef = useRef(null);
10407
+ const directoryInputRef = useRef(null);
10408
+ const searchResultsRef = useRef(null);
10409
+ const suppressDropdownRef = useRef(false);
10410
+ useEffect(() => {
10411
+ var _a;
10412
+ (_a = searchInputRef.current) == null ? void 0 : _a.focus();
10413
+ }, []);
10414
+ useEffect(() => {
10415
+ if (fileTree && baseDirectory) {
10416
+ localSearchService.indexFileSystemTree(fileTree, baseDirectory);
10417
+ }
10418
+ }, [fileTree, baseDirectory]);
10419
+ useEffect(() => {
10420
+ onDirectoryFiltersChange == null ? void 0 : onDirectoryFiltersChange(directoryFilters);
10421
+ }, [directoryFilters, onDirectoryFiltersChange]);
10422
+ const matchingDirectories = useMemo(() => {
10423
+ if (!directoryFilter || !fileTree) return [];
10424
+ const directories = localSearchService.getDirectories();
10425
+ return directories.filter((dir) => {
10426
+ const lowerDir = dir.toLowerCase();
10427
+ const lowerFilter = directoryFilter.toLowerCase();
10428
+ return lowerDir.includes(lowerFilter) && lowerDir !== lowerFilter;
10429
+ }).map((dir) => ({
10430
+ path: dir,
10431
+ displayPath: dir,
10432
+ score: dir.toLowerCase().startsWith(directoryFilter.toLowerCase()) ? 100 : 80
10433
+ })).sort((a, b) => b.score - a.score).slice(0, 10);
10434
+ }, [directoryFilter, fileTree]);
10435
+ useEffect(() => {
10436
+ if (suppressDropdownRef.current) {
10437
+ suppressDropdownRef.current = false;
10438
+ return;
10439
+ }
10440
+ setShowDirectoryDropdown(directoryFilter.length > 0 && matchingDirectories.length > 0);
10441
+ setSelectedDirectoryIndex(0);
10442
+ }, [directoryFilter, matchingDirectories.length]);
10443
+ const addDirectoryFilter = useCallback(
10444
+ (path, mode = "include") => {
10445
+ if (!path.trim()) return;
10446
+ const existingFilter = directoryFilters.find((f) => f.path === path);
10447
+ if (existingFilter) {
10448
+ setDirectoryFilters(
10449
+ (filters) => filters.map(
10450
+ (f) => f.path === path ? { ...f, mode: f.mode === "include" ? "exclude" : "include" } : f
10451
+ )
10452
+ );
10453
+ } else {
10454
+ const newFilter = {
10455
+ id: `filter-${Date.now()}`,
10456
+ path: path.trim(),
10457
+ mode
10458
+ };
10459
+ setDirectoryFilters((filters) => [...filters, newFilter]);
10460
+ }
10461
+ },
10462
+ [directoryFilters]
10463
+ );
10464
+ const removeDirectoryFilter = useCallback((filterId) => {
10465
+ setDirectoryFilters((filters) => filters.filter((f) => f.id !== filterId));
10466
+ }, []);
10467
+ const toggleFilterMode = useCallback((filterId) => {
10468
+ setDirectoryFilters(
10469
+ (filters) => filters.map(
10470
+ (f) => f.id === filterId ? { ...f, mode: f.mode === "include" ? "exclude" : "include" } : f
10471
+ )
10472
+ );
10473
+ }, []);
10474
+ const handleDirectoryKeyDown = useCallback(
10475
+ (e) => {
10476
+ switch (e.key) {
10477
+ case "ArrowDown":
10478
+ if (showDirectoryDropdown && matchingDirectories.length > 0) {
10479
+ e.preventDefault();
10480
+ setSelectedDirectoryIndex(
10481
+ (prev) => prev < matchingDirectories.length - 1 ? prev + 1 : prev
10482
+ );
10483
+ }
10484
+ break;
10485
+ case "ArrowUp":
10486
+ if (showDirectoryDropdown && matchingDirectories.length > 0) {
10487
+ e.preventDefault();
10488
+ setSelectedDirectoryIndex((prev) => prev > 0 ? prev - 1 : prev);
10489
+ }
10490
+ break;
10491
+ case "Enter":
10492
+ e.preventDefault();
10493
+ setShowDirectoryDropdown(false);
10494
+ suppressDropdownRef.current = true;
10495
+ if (matchingDirectories.length > 0 && matchingDirectories[selectedDirectoryIndex]) {
10496
+ const dir = matchingDirectories[selectedDirectoryIndex];
10497
+ addDirectoryFilter(dir.path, excludeDirectory ? "exclude" : "include");
10498
+ setDirectoryFilter("");
10499
+ } else if (directoryFilter.trim()) {
10500
+ addDirectoryFilter(directoryFilter, excludeDirectory ? "exclude" : "include");
10501
+ setDirectoryFilter("");
10502
+ }
10503
+ break;
10504
+ case "Escape":
10505
+ if (showDirectoryDropdown) {
10506
+ e.preventDefault();
10507
+ setShowDirectoryDropdown(false);
10508
+ }
10509
+ break;
10510
+ }
10511
+ },
10512
+ [
10513
+ showDirectoryDropdown,
10514
+ matchingDirectories,
10515
+ selectedDirectoryIndex,
10516
+ directoryFilter,
10517
+ addDirectoryFilter,
10518
+ excludeDirectory
10519
+ ]
10520
+ );
10521
+ const performSearch = useCallback(
10522
+ (query) => {
10523
+ if (!query.trim()) {
10524
+ setSearchResults([]);
10525
+ onSearchResultsChange == null ? void 0 : onSearchResultsChange([]);
10526
+ return;
10527
+ }
10528
+ const results = localSearchService.search(query, {
10529
+ directoryFilters: directoryFilters.length > 0 ? directoryFilters : void 0,
10530
+ limit: 100
10531
+ });
10532
+ setSearchResults(results);
10533
+ onSearchResultsChange == null ? void 0 : onSearchResultsChange(results);
10534
+ },
10535
+ [directoryFilters, onSearchResultsChange]
10536
+ );
10537
+ useEffect(() => {
10538
+ performSearch(searchQuery);
10539
+ }, [searchQuery, performSearch]);
10540
+ useEffect(() => {
10541
+ setSelectedSearchIndex(-1);
10542
+ setIsSearchResultsFocused(false);
10543
+ }, [searchResults]);
10544
+ useEffect(() => {
10545
+ if (isSearchResultsFocused && selectedSearchIndex >= 0 && searchResultsRef.current) {
10546
+ const selectedElement = searchResultsRef.current.querySelector(
10547
+ `.search-result-item:nth-child(${selectedSearchIndex + 1})`
10548
+ );
10549
+ selectedElement == null ? void 0 : selectedElement.scrollIntoView({ behavior: "smooth", block: "nearest" });
10550
+ }
10551
+ }, [selectedSearchIndex, isSearchResultsFocused]);
10552
+ const handleSearchKeyDown = useCallback(
10553
+ (e) => {
10554
+ var _a, _b;
10555
+ switch (e.key) {
10556
+ case "Tab":
10557
+ if (e.target === searchInputRef.current && !e.shiftKey && searchResults.length > 0) {
10558
+ e.preventDefault();
10559
+ setIsSearchResultsFocused(true);
10560
+ setSelectedSearchIndex(0);
10561
+ (_a = searchResultsRef.current) == null ? void 0 : _a.focus();
10562
+ }
10563
+ break;
10564
+ case "ArrowDown":
10565
+ if (isSearchResultsFocused && searchResults.length > 0) {
10566
+ e.preventDefault();
10567
+ setSelectedSearchIndex(
10568
+ (prev) => prev < searchResults.length - 1 ? prev + 1 : prev
10569
+ );
10570
+ }
10571
+ break;
10572
+ case "ArrowUp":
10573
+ if (isSearchResultsFocused && searchResults.length > 0) {
10574
+ e.preventDefault();
10575
+ setSelectedSearchIndex((prev) => prev > 0 ? prev - 1 : 0);
10576
+ }
10577
+ break;
10578
+ case "Enter":
10579
+ if (isSearchResultsFocused && selectedSearchIndex >= 0) {
10580
+ e.preventDefault();
10581
+ const result = searchResults[selectedSearchIndex];
10582
+ onFileSelect == null ? void 0 : onFileSelect(result.relativePath);
10583
+ }
10584
+ break;
10585
+ case "Escape":
10586
+ if (isSearchResultsFocused) {
10587
+ e.preventDefault();
10588
+ setIsSearchResultsFocused(false);
10589
+ setSelectedSearchIndex(-1);
10590
+ (_b = searchInputRef.current) == null ? void 0 : _b.focus();
10591
+ }
10592
+ break;
10593
+ }
10594
+ },
10595
+ [searchResults, isSearchResultsFocused, selectedSearchIndex, onFileSelect]
10596
+ );
10597
+ const handleCopyPath = useCallback((path) => {
10598
+ navigator.clipboard.writeText(path).then(() => {
10599
+ setCopiedPath(path);
10600
+ setTimeout(() => setCopiedPath(null), 2e3);
10601
+ });
10602
+ }, []);
10603
+ const highlightMatch = (text2, match) => {
10604
+ if (!match) return text2;
10605
+ const escapedMatch = match.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
10606
+ const regex = new RegExp(`(${escapedMatch})`, "gi");
10607
+ const parts = text2.split(regex);
10608
+ return parts.map(
10609
+ (part, i) => regex.test(part) ? /* @__PURE__ */ jsx(
10610
+ "span",
10611
+ {
10612
+ style: {
10613
+ backgroundColor: `${theme2.colors.primary}40`,
10614
+ fontWeight: "bold"
10615
+ },
10616
+ children: part
10617
+ },
10618
+ i
10619
+ ) : part
10620
+ );
10621
+ };
10622
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
10623
+ /* @__PURE__ */ jsxs("div", { style: { borderBottom: `1px solid ${theme2.colors.border}` }, children: [
10624
+ /* @__PURE__ */ jsxs("div", { style: { padding: "12px", paddingBottom: "8px", position: "relative" }, children: [
10625
+ /* @__PURE__ */ jsx(
10626
+ "div",
10627
+ {
10628
+ style: {
10629
+ marginBottom: "4px",
10630
+ fontSize: theme2.fontSizes[0],
10631
+ color: theme2.colors.textSecondary,
10632
+ display: "flex",
10633
+ alignItems: "center",
10634
+ justifyContent: "space-between"
10635
+ },
10636
+ children: /* @__PURE__ */ jsx("span", { children: "Directory Filter" })
10637
+ }
10638
+ ),
10639
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
10640
+ /* @__PURE__ */ jsx(
10641
+ "input",
10642
+ {
10643
+ ref: directoryInputRef,
10644
+ type: "text",
10645
+ value: directoryFilter,
10646
+ onChange: (e) => {
10647
+ setDirectoryFilter(e.target.value);
10648
+ suppressDropdownRef.current = false;
10649
+ },
10650
+ onKeyDown: handleDirectoryKeyDown,
10651
+ onFocus: () => setShowDirectoryDropdown(
10652
+ directoryFilter.length > 0 && matchingDirectories.length > 0
10653
+ ),
10654
+ onBlur: () => {
10655
+ setTimeout(() => {
10656
+ var _a;
10657
+ if (!((_a = directoryInputRef.current) == null ? void 0 : _a.contains(document.activeElement))) {
10658
+ setShowDirectoryDropdown(false);
10659
+ }
10660
+ }, 200);
10661
+ },
10662
+ placeholder: "Type to filter by directory path",
10663
+ style: {
10664
+ flex: 1,
10665
+ padding: "8px 12px",
10666
+ fontSize: theme2.fontSizes[1],
10667
+ borderRadius: "4px",
10668
+ border: `1px solid ${directoryFilter && showDirectoryDropdown ? theme2.colors.primary : theme2.colors.border}`,
10669
+ backgroundColor: theme2.colors.backgroundSecondary || theme2.colors.background,
10670
+ color: theme2.colors.text,
10671
+ outline: "none"
10672
+ }
10673
+ }
10674
+ ),
10675
+ directoryFilter && /* @__PURE__ */ jsx(
10676
+ "button",
10677
+ {
10678
+ onClick: () => setExcludeDirectory(!excludeDirectory),
10679
+ style: {
10680
+ padding: "8px 12px",
10681
+ fontSize: theme2.fontSizes[0],
10682
+ fontWeight: 500,
10683
+ borderRadius: "4px",
10684
+ border: `1px solid ${excludeDirectory ? theme2.colors.primary : theme2.colors.border}`,
10685
+ backgroundColor: excludeDirectory ? `${theme2.colors.primary}20` : theme2.colors.backgroundSecondary || theme2.colors.background,
10686
+ color: excludeDirectory ? theme2.colors.text : theme2.colors.textSecondary,
10687
+ cursor: "pointer"
10688
+ },
10689
+ title: excludeDirectory ? "Excluding files in this directory" : "Including only files in this directory",
10690
+ children: excludeDirectory ? "Exclude" : "Include"
10691
+ }
10692
+ )
10693
+ ] }),
10694
+ showDirectoryDropdown && matchingDirectories.length > 0 && /* @__PURE__ */ jsx(
10695
+ "div",
10696
+ {
10697
+ style: {
10698
+ position: "absolute",
10699
+ zIndex: 10,
10700
+ width: "calc(100% - 24px)",
10701
+ marginTop: "4px",
10702
+ borderRadius: "4px",
10703
+ border: `1px solid ${theme2.colors.primary}`,
10704
+ backgroundColor: theme2.colors.background,
10705
+ boxShadow: `0 4px 6px -1px ${theme2.colors.border}40`,
10706
+ maxHeight: "256px",
10707
+ overflowY: "auto"
10708
+ },
10709
+ children: matchingDirectories.map((dir, index) => /* @__PURE__ */ jsx(
10710
+ "div",
10711
+ {
10712
+ style: {
10713
+ padding: "8px 12px",
10714
+ cursor: "pointer",
10715
+ fontSize: theme2.fontSizes[1],
10716
+ backgroundColor: index === selectedDirectoryIndex ? `${theme2.colors.primary}20` : "transparent",
10717
+ color: index === selectedDirectoryIndex ? theme2.colors.text : theme2.colors.textSecondary
10718
+ },
10719
+ onMouseEnter: () => setSelectedDirectoryIndex(index),
10720
+ onClick: () => {
10721
+ var _a;
10722
+ addDirectoryFilter(dir.path, excludeDirectory ? "exclude" : "include");
10723
+ setDirectoryFilter("");
10724
+ setShowDirectoryDropdown(false);
10725
+ (_a = directoryInputRef.current) == null ? void 0 : _a.focus();
10726
+ },
10727
+ children: dir.displayPath
10728
+ },
10729
+ dir.path
10730
+ ))
10731
+ }
10732
+ ),
10733
+ directoryFilters.length > 0 && /* @__PURE__ */ jsx("div", { style: { marginTop: "8px", display: "flex", flexWrap: "wrap", gap: "8px" }, children: directoryFilters.map((filter) => /* @__PURE__ */ jsxs(
10734
+ "div",
10735
+ {
10736
+ style: {
10737
+ display: "flex",
10738
+ alignItems: "center",
10739
+ gap: "4px",
10740
+ padding: "4px 8px",
10741
+ borderRadius: "4px",
10742
+ fontSize: theme2.fontSizes[0],
10743
+ backgroundColor: filter.mode === "include" ? `${theme2.colors.primary}20` : `${theme2.colors.error}20`,
10744
+ border: `1px solid ${filter.mode === "include" ? theme2.colors.primary : theme2.colors.error}`,
10745
+ color: theme2.colors.text
10746
+ },
10747
+ children: [
10748
+ /* @__PURE__ */ jsxs(
10749
+ "span",
10750
+ {
10751
+ style: { cursor: "pointer" },
10752
+ onClick: () => toggleFilterMode(filter.id),
10753
+ title: "Click to toggle include/exclude",
10754
+ children: [
10755
+ filter.mode === "include" ? "✓" : "✗",
10756
+ " ",
10757
+ filter.path
10758
+ ]
10759
+ }
10760
+ ),
10761
+ /* @__PURE__ */ jsx(
10762
+ "button",
10763
+ {
10764
+ onClick: () => removeDirectoryFilter(filter.id),
10765
+ style: {
10766
+ marginLeft: "4px",
10767
+ background: "none",
10768
+ border: "none",
10769
+ cursor: "pointer",
10770
+ color: theme2.colors.textSecondary,
10771
+ padding: 0,
10772
+ display: "flex",
10773
+ alignItems: "center"
10774
+ },
10775
+ title: "Remove filter",
10776
+ children: /* @__PURE__ */ jsx(X, { size: 12 })
10777
+ }
10778
+ )
10779
+ ]
10780
+ },
10781
+ filter.id
10782
+ )) })
10783
+ ] }),
10784
+ /* @__PURE__ */ jsxs(
10785
+ "div",
10786
+ {
10787
+ style: {
10788
+ padding: "12px",
10789
+ paddingTop: "8px",
10790
+ borderTop: `1px solid ${theme2.colors.border}40`
10791
+ },
10792
+ children: [
10793
+ /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
10794
+ /* @__PURE__ */ jsx(
10795
+ "input",
10796
+ {
10797
+ ref: searchInputRef,
10798
+ type: "text",
10799
+ value: searchQuery,
10800
+ onChange: (e) => setSearchQuery(e.target.value),
10801
+ onKeyDown: handleSearchKeyDown,
10802
+ placeholder: "Search files...",
10803
+ style: {
10804
+ width: "100%",
10805
+ padding: "8px 12px",
10806
+ paddingRight: "36px",
10807
+ fontSize: theme2.fontSizes[1],
10808
+ borderRadius: "4px",
10809
+ border: `1px solid ${theme2.colors.border}`,
10810
+ backgroundColor: theme2.colors.backgroundSecondary || theme2.colors.background,
10811
+ color: theme2.colors.text,
10812
+ outline: "none",
10813
+ boxSizing: "border-box"
10814
+ }
10815
+ }
10816
+ ),
10817
+ /* @__PURE__ */ jsx(
10818
+ "div",
10819
+ {
10820
+ style: {
10821
+ position: "absolute",
10822
+ right: "8px",
10823
+ top: "50%",
10824
+ transform: "translateY(-50%)"
10825
+ },
10826
+ children: /* @__PURE__ */ jsxs(
10827
+ "svg",
10828
+ {
10829
+ width: "16",
10830
+ height: "16",
10831
+ viewBox: "0 0 24 24",
10832
+ fill: "none",
10833
+ stroke: theme2.colors.textSecondary,
10834
+ strokeWidth: "2",
10835
+ children: [
10836
+ /* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" }),
10837
+ /* @__PURE__ */ jsx("path", { d: "m21 21-4.35-4.35" })
10838
+ ]
10839
+ }
10840
+ )
10841
+ }
10842
+ )
10843
+ ] }),
10844
+ /* @__PURE__ */ jsx(
10845
+ "div",
10846
+ {
10847
+ style: {
10848
+ marginTop: "4px",
10849
+ fontSize: theme2.fontSizes[0],
10850
+ color: theme2.colors.textSecondary
10851
+ },
10852
+ children: "Supports wildcards: *.tsx, test?.js"
10853
+ }
10854
+ )
10855
+ ]
10856
+ }
10857
+ )
10858
+ ] }),
10859
+ /* @__PURE__ */ jsx(
10860
+ "div",
10861
+ {
10862
+ ref: searchResultsRef,
10863
+ tabIndex: -1,
10864
+ onKeyDown: handleSearchKeyDown,
10865
+ onBlur: () => {
10866
+ setTimeout(() => {
10867
+ if (document.activeElement !== searchInputRef.current) {
10868
+ setIsSearchResultsFocused(false);
10869
+ setSelectedSearchIndex(-1);
10870
+ }
10871
+ }, 100);
10872
+ },
10873
+ style: { flex: 1, overflowY: "auto", outline: "none" },
10874
+ children: isLoading ? /* @__PURE__ */ jsx(
10875
+ "div",
10876
+ {
10877
+ style: {
10878
+ padding: "40px 20px",
10879
+ textAlign: "center",
10880
+ color: theme2.colors.textSecondary
10881
+ },
10882
+ children: "Loading file tree..."
10883
+ }
10884
+ ) : !searchQuery && searchResults.length === 0 ? /* @__PURE__ */ jsx(
10885
+ "div",
10886
+ {
10887
+ style: {
10888
+ height: "100%",
10889
+ display: "flex",
10890
+ alignItems: "center",
10891
+ justifyContent: "center",
10892
+ padding: "32px"
10893
+ },
10894
+ children: /* @__PURE__ */ jsxs("div", { style: { textAlign: "center", maxWidth: "320px" }, children: [
10895
+ /* @__PURE__ */ jsx("div", { style: { marginBottom: "24px", position: "relative", display: "inline-block" }, children: /* @__PURE__ */ jsxs(
10896
+ "svg",
10897
+ {
10898
+ width: "64",
10899
+ height: "64",
10900
+ viewBox: "0 0 24 24",
10901
+ fill: "none",
10902
+ style: { color: theme2.colors.primary, opacity: 0.8 },
10903
+ children: [
10904
+ /* @__PURE__ */ jsx(
10905
+ "circle",
10906
+ {
10907
+ cx: "11",
10908
+ cy: "11",
10909
+ r: "8",
10910
+ stroke: "currentColor",
10911
+ strokeWidth: "2",
10912
+ strokeDasharray: "4 2"
10913
+ }
10914
+ ),
10915
+ /* @__PURE__ */ jsx(
10916
+ "path",
10917
+ {
10918
+ d: "m21 21-4.35-4.35",
10919
+ stroke: "currentColor",
10920
+ strokeWidth: "2",
10921
+ strokeLinecap: "round"
10922
+ }
10923
+ )
10924
+ ]
10925
+ }
10926
+ ) }),
10927
+ /* @__PURE__ */ jsx(
10928
+ "h3",
10929
+ {
10930
+ style: {
10931
+ fontSize: theme2.fontSizes[3],
10932
+ fontWeight: 600,
10933
+ marginBottom: "8px",
10934
+ color: theme2.colors.text
10935
+ },
10936
+ children: "Search files"
10937
+ }
10938
+ ),
10939
+ /* @__PURE__ */ jsx(
10940
+ "p",
10941
+ {
10942
+ style: {
10943
+ fontSize: theme2.fontSizes[1],
10944
+ marginBottom: "16px",
10945
+ color: theme2.colors.textSecondary
10946
+ },
10947
+ children: "Search through filenames to find what you need"
10948
+ }
10949
+ ),
10950
+ /* @__PURE__ */ jsxs("div", { style: { textAlign: "left" }, children: [
10951
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "8px", marginBottom: "8px" }, children: [
10952
+ /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[0], color: theme2.colors.primary }, children: "💡" }),
10953
+ /* @__PURE__ */ jsxs("div", { children: [
10954
+ /* @__PURE__ */ jsx("div", { style: { fontSize: theme2.fontSizes[0], fontWeight: 500, color: theme2.colors.text }, children: "Quick search" }),
10955
+ /* @__PURE__ */ jsx("div", { style: { fontSize: theme2.fontSizes[0], color: theme2.colors.textSecondary }, children: "Type to instantly filter by filename" })
10956
+ ] })
10957
+ ] }),
10958
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "8px" }, children: [
10959
+ /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[0], color: theme2.colors.primary }, children: "📁" }),
10960
+ /* @__PURE__ */ jsxs("div", { children: [
10961
+ /* @__PURE__ */ jsx("div", { style: { fontSize: theme2.fontSizes[0], fontWeight: 500, color: theme2.colors.text }, children: "Filter by directory" }),
10962
+ /* @__PURE__ */ jsx("div", { style: { fontSize: theme2.fontSizes[0], color: theme2.colors.textSecondary }, children: "Use the directory filter to narrow your search" })
10963
+ ] })
10964
+ ] })
10965
+ ] })
10966
+ ] })
10967
+ }
10968
+ ) : searchQuery && searchResults.length === 0 ? /* @__PURE__ */ jsx(
10969
+ "div",
10970
+ {
10971
+ style: {
10972
+ height: "100%",
10973
+ display: "flex",
10974
+ alignItems: "center",
10975
+ justifyContent: "center",
10976
+ padding: "32px"
10977
+ },
10978
+ children: /* @__PURE__ */ jsxs("div", { style: { textAlign: "center", maxWidth: "320px" }, children: [
10979
+ /* @__PURE__ */ jsx("div", { style: { marginBottom: "16px" }, children: /* @__PURE__ */ jsxs(
10980
+ "svg",
10981
+ {
10982
+ width: "64",
10983
+ height: "64",
10984
+ viewBox: "0 0 24 24",
10985
+ fill: "none",
10986
+ style: { color: theme2.colors.textSecondary, opacity: 0.5 },
10987
+ children: [
10988
+ /* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8", stroke: "currentColor", strokeWidth: "2" }),
10989
+ /* @__PURE__ */ jsx("path", { d: "m21 21-4.35-4.35", stroke: "currentColor", strokeWidth: "2" }),
10990
+ /* @__PURE__ */ jsx("path", { d: "M8 11h6M11 8v6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
10991
+ ]
10992
+ }
10993
+ ) }),
10994
+ /* @__PURE__ */ jsx(
10995
+ "h3",
10996
+ {
10997
+ style: {
10998
+ fontSize: theme2.fontSizes[2],
10999
+ fontWeight: 500,
11000
+ marginBottom: "8px",
11001
+ color: theme2.colors.text
11002
+ },
11003
+ children: "No results found"
11004
+ }
11005
+ ),
11006
+ /* @__PURE__ */ jsxs(
11007
+ "p",
11008
+ {
11009
+ style: {
11010
+ fontSize: theme2.fontSizes[1],
11011
+ color: theme2.colors.textSecondary
11012
+ },
11013
+ children: [
11014
+ "No files match",
11015
+ " ",
11016
+ /* @__PURE__ */ jsxs("span", { style: { fontFamily: "monospace", color: theme2.colors.primary }, children: [
11017
+ '"',
11018
+ searchQuery,
11019
+ '"'
11020
+ ] })
11021
+ ]
11022
+ }
11023
+ )
11024
+ ] })
11025
+ }
11026
+ ) : /* @__PURE__ */ jsx("div", { children: searchResults.map((result, index) => {
11027
+ const isCurrentFile = selectedFile === result.path || selectedFile === result.relativePath;
11028
+ const isSelected = isSearchResultsFocused && index === selectedSearchIndex;
11029
+ return /* @__PURE__ */ jsx(
11030
+ "div",
11031
+ {
11032
+ className: "search-result-item",
11033
+ style: {
11034
+ padding: "8px 12px",
11035
+ cursor: "pointer",
11036
+ backgroundColor: isSelected ? `${theme2.colors.primary}25` : isCurrentFile ? `${theme2.colors.primary}15` : "transparent",
11037
+ borderLeft: isCurrentFile ? `3px solid ${theme2.colors.primary}` : isSelected ? `3px solid ${theme2.colors.primary}80` : "3px solid transparent",
11038
+ borderBottom: `1px solid ${theme2.colors.border}20`,
11039
+ transition: "background-color 0.15s"
11040
+ },
11041
+ onClick: () => onFileSelect == null ? void 0 : onFileSelect(result.relativePath),
11042
+ onMouseEnter: () => {
11043
+ if (isSearchResultsFocused) {
11044
+ setSelectedSearchIndex(index);
11045
+ }
11046
+ onSearchResultHover == null ? void 0 : onSearchResultHover(result.relativePath);
11047
+ },
11048
+ onMouseLeave: () => onSearchResultHover == null ? void 0 : onSearchResultHover(null),
11049
+ children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "8px" }, children: [
11050
+ /* @__PURE__ */ jsx("div", { style: { flexShrink: 0, marginTop: "2px" }, children: /* @__PURE__ */ jsx(FileText, { size: 14, color: theme2.colors.textSecondary }) }),
11051
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: "8px" }, children: [
11052
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
11053
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
11054
+ /* @__PURE__ */ jsx(
11055
+ "div",
11056
+ {
11057
+ style: {
11058
+ fontSize: theme2.fontSizes[1],
11059
+ fontWeight: 500,
11060
+ color: theme2.colors.text
11061
+ },
11062
+ children: highlightMatch(result.name, searchQuery)
11063
+ }
11064
+ ),
11065
+ isCurrentFile && /* @__PURE__ */ jsx(
11066
+ "span",
11067
+ {
11068
+ style: {
11069
+ fontSize: "10px",
11070
+ padding: "2px 6px",
11071
+ borderRadius: "4px",
11072
+ backgroundColor: `${theme2.colors.primary}20`,
11073
+ color: theme2.colors.primary
11074
+ },
11075
+ children: "CURRENT"
11076
+ }
11077
+ )
11078
+ ] }),
11079
+ /* @__PURE__ */ jsx(
11080
+ "div",
11081
+ {
11082
+ style: {
11083
+ fontSize: theme2.fontSizes[0],
11084
+ marginTop: "2px",
11085
+ color: theme2.colors.textSecondary,
11086
+ overflow: "hidden",
11087
+ textOverflow: "ellipsis",
11088
+ whiteSpace: "nowrap"
11089
+ },
11090
+ children: result.relativePath
11091
+ }
11092
+ )
11093
+ ] }),
11094
+ /* @__PURE__ */ jsx(
11095
+ "button",
11096
+ {
11097
+ style: {
11098
+ flexShrink: 0,
11099
+ padding: "4px",
11100
+ borderRadius: "4px",
11101
+ border: `1px solid ${copiedPath === result.path ? theme2.colors.success : theme2.colors.border}`,
11102
+ backgroundColor: copiedPath === result.path ? `${theme2.colors.success}20` : theme2.colors.backgroundSecondary || theme2.colors.background,
11103
+ color: copiedPath === result.path ? theme2.colors.success : theme2.colors.textSecondary,
11104
+ cursor: "pointer",
11105
+ opacity: isSelected || isCurrentFile ? 0.7 : 0,
11106
+ transition: "opacity 0.15s"
11107
+ },
11108
+ onMouseEnter: (e) => {
11109
+ e.currentTarget.style.opacity = "1";
11110
+ },
11111
+ onMouseLeave: (e) => {
11112
+ if (!isSelected && !isCurrentFile && copiedPath !== result.path) {
11113
+ e.currentTarget.style.opacity = "0";
11114
+ }
11115
+ },
11116
+ onClick: (e) => {
11117
+ e.stopPropagation();
11118
+ handleCopyPath(result.path);
11119
+ },
11120
+ title: copiedPath === result.path ? "Copied!" : "Copy full path",
11121
+ children: copiedPath === result.path ? /* @__PURE__ */ jsx(Check, { size: 14 }) : /* @__PURE__ */ jsx(Copy, { size: 14 })
11122
+ }
11123
+ )
11124
+ ] }) })
11125
+ ] })
11126
+ },
11127
+ `${result.path}-${index}`
11128
+ );
11129
+ }) })
11130
+ }
11131
+ ),
11132
+ searchQuery && searchResults.length > 0 && /* @__PURE__ */ jsx(
11133
+ "div",
11134
+ {
11135
+ style: {
11136
+ padding: "8px 12px",
11137
+ borderTop: `1px solid ${theme2.colors.border}`,
11138
+ fontSize: theme2.fontSizes[0],
11139
+ color: theme2.colors.textSecondary,
11140
+ backgroundColor: theme2.colors.backgroundSecondary || theme2.colors.background
11141
+ },
11142
+ children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
11143
+ /* @__PURE__ */ jsxs("span", { children: [
11144
+ "Found ",
11145
+ searchResults.length,
11146
+ " result",
11147
+ searchResults.length !== 1 ? "s" : "",
11148
+ ' for "',
11149
+ searchQuery,
11150
+ '"'
11151
+ ] }),
11152
+ directoryFilters.length > 0 && /* @__PURE__ */ jsxs(
11153
+ "span",
11154
+ {
11155
+ style: {
11156
+ padding: "2px 6px",
11157
+ borderRadius: "4px",
11158
+ backgroundColor: `${theme2.colors.primary}20`,
11159
+ color: theme2.colors.textSecondary
11160
+ },
11161
+ children: [
11162
+ directoryFilters.length,
11163
+ " filter",
11164
+ directoryFilters.length !== 1 ? "s" : ""
11165
+ ]
11166
+ }
11167
+ )
11168
+ ] })
11169
+ }
11170
+ )
11171
+ ] });
11172
+ };
11173
+ const SearchPanelPreview = () => {
11174
+ const { theme: theme2 } = useTheme();
11175
+ return /* @__PURE__ */ jsxs(
11176
+ "div",
11177
+ {
11178
+ style: {
11179
+ padding: "12px",
11180
+ fontSize: "12px",
11181
+ color: theme2.colors.text,
11182
+ display: "flex",
11183
+ flexDirection: "column",
11184
+ gap: "6px"
11185
+ },
11186
+ children: [
11187
+ /* @__PURE__ */ jsx(
11188
+ "div",
11189
+ {
11190
+ style: {
11191
+ padding: "6px 8px",
11192
+ borderRadius: "4px",
11193
+ backgroundColor: theme2.colors.backgroundSecondary,
11194
+ border: `1px solid ${theme2.colors.border}`,
11195
+ color: theme2.colors.textSecondary,
11196
+ fontSize: "11px"
11197
+ },
11198
+ children: "Search files..."
11199
+ }
11200
+ ),
11201
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", opacity: 0.7 }, children: [
11202
+ /* @__PURE__ */ jsx(FileText, { size: 12 }),
11203
+ /* @__PURE__ */ jsx("span", { children: "index.tsx" })
11204
+ ] }),
11205
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", opacity: 0.7 }, children: [
11206
+ /* @__PURE__ */ jsx(FileText, { size: 12 }),
11207
+ /* @__PURE__ */ jsx("span", { children: "utils.ts" })
11208
+ ] })
11209
+ ]
11210
+ }
11211
+ );
11212
+ };
11213
+ const SearchPanel = ({ context }) => {
11214
+ var _a;
11215
+ const fileTreeSlice = context.getSlice("fileTree");
11216
+ const fileTree = (fileTreeSlice == null ? void 0 : fileTreeSlice.data) ?? null;
11217
+ const isLoading = (fileTreeSlice == null ? void 0 : fileTreeSlice.loading) || false;
11218
+ const rootPath = context.currentScope.type === "repository" ? (_a = context.currentScope.repository) == null ? void 0 : _a.path : void 0;
11219
+ return /* @__PURE__ */ jsx(
11220
+ SearchPanelContent,
11221
+ {
11222
+ fileTree,
11223
+ baseDirectory: rootPath,
11224
+ isLoading
11225
+ }
11226
+ );
11227
+ };
11228
+ const panels = [
11229
+ {
11230
+ metadata: {
11231
+ id: "industry-theme.git-changes",
9778
11232
  name: "Git Changes",
9779
11233
  icon: "GitBranch",
9780
11234
  version: "0.1.0",
@@ -9834,6 +11288,27 @@ const panels = [
9834
11288
  onUnmount: async (_context) => {
9835
11289
  console.log("Dependencies Panel unmounting");
9836
11290
  }
11291
+ },
11292
+ {
11293
+ metadata: {
11294
+ id: "industry-theme.search",
11295
+ name: "Search",
11296
+ icon: "Search",
11297
+ version: "0.1.0",
11298
+ author: "Industry Theme",
11299
+ description: "Search files in the repository by filename",
11300
+ slices: ["fileTree"]
11301
+ },
11302
+ component: SearchPanel,
11303
+ onMount: async (context) => {
11304
+ console.log("Search Panel mounted");
11305
+ if (context.hasSlice("fileTree") && !context.isSliceLoading("fileTree")) {
11306
+ await context.refresh("repository", "fileTree");
11307
+ }
11308
+ },
11309
+ onUnmount: async (_context) => {
11310
+ console.log("Search Panel unmounting");
11311
+ }
9837
11312
  }
9838
11313
  ];
9839
11314
  const onPackageLoad = async () => {
@@ -9850,6 +11325,9 @@ export {
9850
11325
  PackageCompositionPanel,
9851
11326
  PackageCompositionPanelContent,
9852
11327
  PackageCompositionPanelPreview,
11328
+ SearchPanel,
11329
+ SearchPanelContent,
11330
+ SearchPanelPreview,
9853
11331
  onPackageLoad,
9854
11332
  onPackageUnload,
9855
11333
  panels