@industry-theme/repository-composition-panels 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/panels.bundle.js
CHANGED
|
@@ -320,7 +320,36 @@ 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$
|
|
323
|
+
const __iconNode$q = [
|
|
324
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
325
|
+
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
326
|
+
];
|
|
327
|
+
const ArrowRight = createLucideIcon("arrow-right", __iconNode$q);
|
|
328
|
+
/**
|
|
329
|
+
* @license lucide-react v0.552.0 - ISC
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the ISC license.
|
|
332
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
333
|
+
*/
|
|
334
|
+
const __iconNode$p = [
|
|
335
|
+
[
|
|
336
|
+
"path",
|
|
337
|
+
{
|
|
338
|
+
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
339
|
+
key: "hh9hay"
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
["path", { d: "m3.3 7 8.7 5 8.7-5", key: "g66t2b" }],
|
|
343
|
+
["path", { d: "M12 22V12", key: "d0xqtd" }]
|
|
344
|
+
];
|
|
345
|
+
const Box = createLucideIcon("box", __iconNode$p);
|
|
346
|
+
/**
|
|
347
|
+
* @license lucide-react v0.552.0 - ISC
|
|
348
|
+
*
|
|
349
|
+
* This source code is licensed under the ISC license.
|
|
350
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
+
*/
|
|
352
|
+
const __iconNode$o = [
|
|
324
353
|
[
|
|
325
354
|
"path",
|
|
326
355
|
{
|
|
@@ -352,85 +381,93 @@ const __iconNode$l = [
|
|
|
352
381
|
["path", { d: "m12 8 4.74-2.85", key: "3rx089" }],
|
|
353
382
|
["path", { d: "M12 13.5V8", key: "1io7kd" }]
|
|
354
383
|
];
|
|
355
|
-
const Boxes = createLucideIcon("boxes", __iconNode$
|
|
384
|
+
const Boxes = createLucideIcon("boxes", __iconNode$o);
|
|
356
385
|
/**
|
|
357
386
|
* @license lucide-react v0.552.0 - ISC
|
|
358
387
|
*
|
|
359
388
|
* This source code is licensed under the ISC license.
|
|
360
389
|
* See the LICENSE file in the root directory of this source tree.
|
|
361
390
|
*/
|
|
362
|
-
const __iconNode$
|
|
363
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
391
|
+
const __iconNode$n = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
392
|
+
const Check = createLucideIcon("check", __iconNode$n);
|
|
364
393
|
/**
|
|
365
394
|
* @license lucide-react v0.552.0 - ISC
|
|
366
395
|
*
|
|
367
396
|
* This source code is licensed under the ISC license.
|
|
368
397
|
* See the LICENSE file in the root directory of this source tree.
|
|
369
398
|
*/
|
|
370
|
-
const __iconNode$
|
|
371
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
399
|
+
const __iconNode$m = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
400
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$m);
|
|
372
401
|
/**
|
|
373
402
|
* @license lucide-react v0.552.0 - ISC
|
|
374
403
|
*
|
|
375
404
|
* This source code is licensed under the ISC license.
|
|
376
405
|
* See the LICENSE file in the root directory of this source tree.
|
|
377
406
|
*/
|
|
378
|
-
const __iconNode$
|
|
379
|
-
const
|
|
407
|
+
const __iconNode$l = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
408
|
+
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$l);
|
|
380
409
|
/**
|
|
381
410
|
* @license lucide-react v0.552.0 - ISC
|
|
382
411
|
*
|
|
383
412
|
* This source code is licensed under the ISC license.
|
|
384
413
|
* See the LICENSE file in the root directory of this source tree.
|
|
385
414
|
*/
|
|
386
|
-
const __iconNode$
|
|
415
|
+
const __iconNode$k = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
416
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$k);
|
|
417
|
+
/**
|
|
418
|
+
* @license lucide-react v0.552.0 - ISC
|
|
419
|
+
*
|
|
420
|
+
* This source code is licensed under the ISC license.
|
|
421
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
422
|
+
*/
|
|
423
|
+
const __iconNode$j = [
|
|
387
424
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
388
425
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
389
426
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
390
427
|
];
|
|
391
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
428
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$j);
|
|
392
429
|
/**
|
|
393
430
|
* @license lucide-react v0.552.0 - ISC
|
|
394
431
|
*
|
|
395
432
|
* This source code is licensed under the ISC license.
|
|
396
433
|
* See the LICENSE file in the root directory of this source tree.
|
|
397
434
|
*/
|
|
398
|
-
const __iconNode$
|
|
435
|
+
const __iconNode$i = [
|
|
399
436
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
400
437
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
401
438
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
402
439
|
];
|
|
403
|
-
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$
|
|
440
|
+
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$i);
|
|
404
441
|
/**
|
|
405
442
|
* @license lucide-react v0.552.0 - ISC
|
|
406
443
|
*
|
|
407
444
|
* This source code is licensed under the ISC license.
|
|
408
445
|
* See the LICENSE file in the root directory of this source tree.
|
|
409
446
|
*/
|
|
410
|
-
const __iconNode$
|
|
447
|
+
const __iconNode$h = [
|
|
411
448
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
412
449
|
["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
450
|
];
|
|
414
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
451
|
+
const Copy = createLucideIcon("copy", __iconNode$h);
|
|
415
452
|
/**
|
|
416
453
|
* @license lucide-react v0.552.0 - ISC
|
|
417
454
|
*
|
|
418
455
|
* This source code is licensed under the ISC license.
|
|
419
456
|
* See the LICENSE file in the root directory of this source tree.
|
|
420
457
|
*/
|
|
421
|
-
const __iconNode$
|
|
458
|
+
const __iconNode$g = [
|
|
422
459
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
423
460
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
424
461
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
425
462
|
];
|
|
426
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
463
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$g);
|
|
427
464
|
/**
|
|
428
465
|
* @license lucide-react v0.552.0 - ISC
|
|
429
466
|
*
|
|
430
467
|
* This source code is licensed under the ISC license.
|
|
431
468
|
* See the LICENSE file in the root directory of this source tree.
|
|
432
469
|
*/
|
|
433
|
-
const __iconNode$
|
|
470
|
+
const __iconNode$f = [
|
|
434
471
|
[
|
|
435
472
|
"path",
|
|
436
473
|
{
|
|
@@ -442,14 +479,14 @@ const __iconNode$d = [
|
|
|
442
479
|
["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
|
|
443
480
|
["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
|
|
444
481
|
];
|
|
445
|
-
const FileCode = createLucideIcon("file-code", __iconNode$
|
|
482
|
+
const FileCode = createLucideIcon("file-code", __iconNode$f);
|
|
446
483
|
/**
|
|
447
484
|
* @license lucide-react v0.552.0 - ISC
|
|
448
485
|
*
|
|
449
486
|
* This source code is licensed under the ISC license.
|
|
450
487
|
* See the LICENSE file in the root directory of this source tree.
|
|
451
488
|
*/
|
|
452
|
-
const __iconNode$
|
|
489
|
+
const __iconNode$e = [
|
|
453
490
|
[
|
|
454
491
|
"path",
|
|
455
492
|
{
|
|
@@ -460,14 +497,14 @@ const __iconNode$c = [
|
|
|
460
497
|
["path", { d: "M12 17h.01", key: "p32p05" }],
|
|
461
498
|
["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3", key: "mhlwft" }]
|
|
462
499
|
];
|
|
463
|
-
const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$
|
|
500
|
+
const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$e);
|
|
464
501
|
/**
|
|
465
502
|
* @license lucide-react v0.552.0 - ISC
|
|
466
503
|
*
|
|
467
504
|
* This source code is licensed under the ISC license.
|
|
468
505
|
* See the LICENSE file in the root directory of this source tree.
|
|
469
506
|
*/
|
|
470
|
-
const __iconNode$
|
|
507
|
+
const __iconNode$d = [
|
|
471
508
|
[
|
|
472
509
|
"path",
|
|
473
510
|
{
|
|
@@ -480,14 +517,14 @@ const __iconNode$b = [
|
|
|
480
517
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
481
518
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
482
519
|
];
|
|
483
|
-
const FileText = createLucideIcon("file-text", __iconNode$
|
|
520
|
+
const FileText = createLucideIcon("file-text", __iconNode$d);
|
|
484
521
|
/**
|
|
485
522
|
* @license lucide-react v0.552.0 - ISC
|
|
486
523
|
*
|
|
487
524
|
* This source code is licensed under the ISC license.
|
|
488
525
|
* See the LICENSE file in the root directory of this source tree.
|
|
489
526
|
*/
|
|
490
|
-
const __iconNode$
|
|
527
|
+
const __iconNode$c = [
|
|
491
528
|
[
|
|
492
529
|
"path",
|
|
493
530
|
{
|
|
@@ -496,20 +533,63 @@ const __iconNode$a = [
|
|
|
496
533
|
}
|
|
497
534
|
]
|
|
498
535
|
];
|
|
499
|
-
const Folder = createLucideIcon("folder", __iconNode$
|
|
536
|
+
const Folder = createLucideIcon("folder", __iconNode$c);
|
|
500
537
|
/**
|
|
501
538
|
* @license lucide-react v0.552.0 - ISC
|
|
502
539
|
*
|
|
503
540
|
* This source code is licensed under the ISC license.
|
|
504
541
|
* See the LICENSE file in the root directory of this source tree.
|
|
505
542
|
*/
|
|
506
|
-
const __iconNode$
|
|
543
|
+
const __iconNode$b = [
|
|
507
544
|
["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
|
|
508
545
|
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
509
546
|
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
510
547
|
["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
|
|
511
548
|
];
|
|
512
|
-
const GitBranch = createLucideIcon("git-branch", __iconNode$
|
|
549
|
+
const GitBranch = createLucideIcon("git-branch", __iconNode$b);
|
|
550
|
+
/**
|
|
551
|
+
* @license lucide-react v0.552.0 - ISC
|
|
552
|
+
*
|
|
553
|
+
* This source code is licensed under the ISC license.
|
|
554
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
555
|
+
*/
|
|
556
|
+
const __iconNode$a = [
|
|
557
|
+
[
|
|
558
|
+
"path",
|
|
559
|
+
{
|
|
560
|
+
d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",
|
|
561
|
+
key: "zw3jo"
|
|
562
|
+
}
|
|
563
|
+
],
|
|
564
|
+
[
|
|
565
|
+
"path",
|
|
566
|
+
{
|
|
567
|
+
d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",
|
|
568
|
+
key: "1wduqc"
|
|
569
|
+
}
|
|
570
|
+
],
|
|
571
|
+
[
|
|
572
|
+
"path",
|
|
573
|
+
{
|
|
574
|
+
d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",
|
|
575
|
+
key: "kqbvx6"
|
|
576
|
+
}
|
|
577
|
+
]
|
|
578
|
+
];
|
|
579
|
+
const Layers = createLucideIcon("layers", __iconNode$a);
|
|
580
|
+
/**
|
|
581
|
+
* @license lucide-react v0.552.0 - ISC
|
|
582
|
+
*
|
|
583
|
+
* This source code is licensed under the ISC license.
|
|
584
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
585
|
+
*/
|
|
586
|
+
const __iconNode$9 = [
|
|
587
|
+
["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
|
|
588
|
+
["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
|
|
589
|
+
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
|
|
590
|
+
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
|
|
591
|
+
];
|
|
592
|
+
const LayoutGrid = createLucideIcon("layout-grid", __iconNode$9);
|
|
513
593
|
/**
|
|
514
594
|
* @license lucide-react v0.552.0 - ISC
|
|
515
595
|
*
|
|
@@ -8666,1187 +8746,1717 @@ const PackageManagerIcon = ({
|
|
|
8666
8746
|
return /* @__PURE__ */ jsx(Package, { size: size2, color });
|
|
8667
8747
|
}
|
|
8668
8748
|
};
|
|
8669
|
-
const
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
onToggle,
|
|
8673
|
-
onCommandClick,
|
|
8674
|
-
onConfigClick,
|
|
8675
|
-
onPackageClick,
|
|
8676
|
-
standalone = false
|
|
8749
|
+
const DependencyInfoModal = ({
|
|
8750
|
+
isOpen,
|
|
8751
|
+
onClose
|
|
8677
8752
|
}) => {
|
|
8678
8753
|
const { theme: theme2 } = useTheme();
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8754
|
+
if (!isOpen) return null;
|
|
8755
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
8756
|
+
"div",
|
|
8757
|
+
{
|
|
8758
|
+
style: {
|
|
8759
|
+
position: "fixed",
|
|
8760
|
+
top: 0,
|
|
8761
|
+
left: 0,
|
|
8762
|
+
right: 0,
|
|
8763
|
+
bottom: 0,
|
|
8764
|
+
backgroundColor: theme2.colors.muted,
|
|
8765
|
+
zIndex: theme2.zIndices[4],
|
|
8766
|
+
display: "flex",
|
|
8767
|
+
alignItems: "center",
|
|
8768
|
+
justifyContent: "center"
|
|
8769
|
+
},
|
|
8770
|
+
onClick: onClose,
|
|
8771
|
+
children: /* @__PURE__ */ jsxs(
|
|
8688
8772
|
"div",
|
|
8689
8773
|
{
|
|
8690
8774
|
style: {
|
|
8775
|
+
backgroundColor: theme2.colors.background,
|
|
8776
|
+
borderRadius: `${theme2.radii[3]}px`,
|
|
8777
|
+
maxWidth: "600px",
|
|
8778
|
+
maxHeight: "80vh",
|
|
8779
|
+
width: "90%",
|
|
8780
|
+
overflow: "hidden",
|
|
8691
8781
|
display: "flex",
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
padding: "12px 16px",
|
|
8695
|
-
borderBottom: `1px solid ${theme2.colors.border}`
|
|
8782
|
+
flexDirection: "column",
|
|
8783
|
+
boxShadow: theme2.shadows[3]
|
|
8696
8784
|
},
|
|
8785
|
+
onClick: (e) => e.stopPropagation(),
|
|
8697
8786
|
children: [
|
|
8698
|
-
/* @__PURE__ */
|
|
8699
|
-
|
|
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",
|
|
8787
|
+
/* @__PURE__ */ jsxs(
|
|
8788
|
+
"div",
|
|
8730
8789
|
{
|
|
8731
|
-
onClick: () => onPackageClick == null ? void 0 : onPackageClick(pkg.packageData.path),
|
|
8732
8790
|
style: {
|
|
8791
|
+
padding: `${theme2.space[4]}px`,
|
|
8792
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
8733
8793
|
display: "flex",
|
|
8734
8794
|
alignItems: "center",
|
|
8735
|
-
|
|
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"
|
|
8795
|
+
justifyContent: "space-between"
|
|
8743
8796
|
},
|
|
8744
|
-
title: "Open package folder",
|
|
8745
8797
|
children: [
|
|
8746
|
-
/* @__PURE__ */
|
|
8747
|
-
|
|
8798
|
+
/* @__PURE__ */ jsxs(
|
|
8799
|
+
"h2",
|
|
8800
|
+
{
|
|
8801
|
+
style: {
|
|
8802
|
+
fontSize: `${theme2.fontSizes[4]}px`,
|
|
8803
|
+
fontWeight: theme2.fontWeights.semibold,
|
|
8804
|
+
color: theme2.colors.text,
|
|
8805
|
+
display: "flex",
|
|
8806
|
+
alignItems: "center",
|
|
8807
|
+
gap: `${theme2.space[2]}px`,
|
|
8808
|
+
margin: 0
|
|
8809
|
+
},
|
|
8810
|
+
children: [
|
|
8811
|
+
/* @__PURE__ */ jsx(CircleQuestionMark, { size: 20 }),
|
|
8812
|
+
"Understanding Dependencies"
|
|
8813
|
+
]
|
|
8814
|
+
}
|
|
8815
|
+
),
|
|
8816
|
+
/* @__PURE__ */ jsx(
|
|
8817
|
+
"button",
|
|
8818
|
+
{
|
|
8819
|
+
onClick: onClose,
|
|
8820
|
+
style: {
|
|
8821
|
+
background: "none",
|
|
8822
|
+
border: "none",
|
|
8823
|
+
color: theme2.colors.textSecondary,
|
|
8824
|
+
cursor: "pointer",
|
|
8825
|
+
padding: `${theme2.space[1]}px`
|
|
8826
|
+
},
|
|
8827
|
+
children: /* @__PURE__ */ jsx(X, { size: 20 })
|
|
8828
|
+
}
|
|
8829
|
+
)
|
|
8748
8830
|
]
|
|
8749
8831
|
}
|
|
8750
|
-
)
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8832
|
+
),
|
|
8833
|
+
/* @__PURE__ */ jsxs(
|
|
8834
|
+
"div",
|
|
8835
|
+
{
|
|
8836
|
+
style: {
|
|
8837
|
+
padding: `${theme2.space[4]}px`,
|
|
8838
|
+
overflow: "auto",
|
|
8839
|
+
flex: 1
|
|
8840
|
+
},
|
|
8841
|
+
children: [
|
|
8842
|
+
/* @__PURE__ */ jsxs(
|
|
8843
|
+
Section,
|
|
8844
|
+
{
|
|
8845
|
+
icon: /* @__PURE__ */ jsx(Package, { size: 18 }),
|
|
8846
|
+
title: "Dependency Types",
|
|
8847
|
+
theme: theme2,
|
|
8848
|
+
children: [
|
|
8849
|
+
/* @__PURE__ */ jsx(
|
|
8850
|
+
InfoItem,
|
|
8851
|
+
{
|
|
8852
|
+
badge: { text: "prod", color: theme2.colors.primary },
|
|
8853
|
+
title: "Production Dependencies",
|
|
8854
|
+
description: "Required for your application to run in production. These are bundled with your app and affect its size and security.",
|
|
8855
|
+
theme: theme2
|
|
8856
|
+
}
|
|
8857
|
+
),
|
|
8858
|
+
/* @__PURE__ */ jsx(
|
|
8859
|
+
InfoItem,
|
|
8860
|
+
{
|
|
8861
|
+
badge: { text: "dev", color: theme2.colors.secondary },
|
|
8862
|
+
title: "Development Dependencies",
|
|
8863
|
+
description: "Only needed during development (build tools, testing, linters). Not included in production builds.",
|
|
8864
|
+
theme: theme2
|
|
8865
|
+
}
|
|
8866
|
+
),
|
|
8867
|
+
/* @__PURE__ */ jsx(
|
|
8868
|
+
InfoItem,
|
|
8869
|
+
{
|
|
8870
|
+
badge: { text: "peer", color: theme2.colors.accent },
|
|
8871
|
+
title: "Peer Dependencies",
|
|
8872
|
+
description: "Expected to be provided by the consumer of your package. Important for library authors to specify compatibility.",
|
|
8873
|
+
theme: theme2
|
|
8874
|
+
}
|
|
8875
|
+
)
|
|
8876
|
+
]
|
|
8877
|
+
}
|
|
8878
|
+
),
|
|
8879
|
+
/* @__PURE__ */ jsxs(
|
|
8880
|
+
Section,
|
|
8881
|
+
{
|
|
8882
|
+
icon: /* @__PURE__ */ jsx(Scale, { size: 18 }),
|
|
8883
|
+
title: "Common Licenses",
|
|
8884
|
+
theme: theme2,
|
|
8885
|
+
children: [
|
|
8886
|
+
/* @__PURE__ */ jsx(
|
|
8887
|
+
InfoItem,
|
|
8888
|
+
{
|
|
8889
|
+
badge: { text: "MIT", color: theme2.colors.success },
|
|
8890
|
+
title: "Permissive Licenses (MIT, Apache, BSD)",
|
|
8891
|
+
description: "Few restrictions. Can use in commercial projects. Must include copyright notice.",
|
|
8892
|
+
theme: theme2
|
|
8893
|
+
}
|
|
8894
|
+
),
|
|
8895
|
+
/* @__PURE__ */ jsx(
|
|
8896
|
+
InfoItem,
|
|
8897
|
+
{
|
|
8898
|
+
badge: { text: "GPL", color: theme2.colors.warning },
|
|
8899
|
+
title: "Copyleft Licenses (GPL, LGPL, AGPL)",
|
|
8900
|
+
description: "Requires sharing source code of derivative works. Can impact your project's licensing.",
|
|
8901
|
+
theme: theme2
|
|
8902
|
+
}
|
|
8903
|
+
)
|
|
8904
|
+
]
|
|
8905
|
+
}
|
|
8906
|
+
)
|
|
8907
|
+
]
|
|
8908
|
+
}
|
|
8909
|
+
)
|
|
8910
|
+
]
|
|
8911
|
+
}
|
|
8912
|
+
)
|
|
8913
|
+
}
|
|
8914
|
+
) });
|
|
8915
|
+
};
|
|
8916
|
+
const Section = ({ icon, title, theme: theme2, children }) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: `${theme2.space[5]}px` }, children: [
|
|
8917
|
+
/* @__PURE__ */ jsxs(
|
|
8918
|
+
"h3",
|
|
8919
|
+
{
|
|
8920
|
+
style: {
|
|
8921
|
+
fontSize: `${theme2.fontSizes[2]}px`,
|
|
8922
|
+
fontWeight: theme2.fontWeights.semibold,
|
|
8923
|
+
color: theme2.colors.text,
|
|
8924
|
+
marginBottom: `${theme2.space[3]}px`,
|
|
8925
|
+
display: "flex",
|
|
8926
|
+
alignItems: "center",
|
|
8927
|
+
gap: `${theme2.space[2]}px`
|
|
8928
|
+
},
|
|
8929
|
+
children: [
|
|
8930
|
+
icon,
|
|
8931
|
+
title
|
|
8932
|
+
]
|
|
8933
|
+
}
|
|
8934
|
+
),
|
|
8935
|
+
/* @__PURE__ */ jsx(
|
|
8936
|
+
"div",
|
|
8937
|
+
{
|
|
8938
|
+
style: {
|
|
8939
|
+
display: "flex",
|
|
8940
|
+
flexDirection: "column",
|
|
8941
|
+
gap: `${theme2.space[2]}px`
|
|
8942
|
+
},
|
|
8943
|
+
children
|
|
8944
|
+
}
|
|
8945
|
+
)
|
|
8946
|
+
] });
|
|
8947
|
+
const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__ */ jsxs(
|
|
8948
|
+
"div",
|
|
8949
|
+
{
|
|
8950
|
+
style: {
|
|
8951
|
+
padding: `${theme2.space[3]}px`,
|
|
8952
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
8953
|
+
borderRadius: `${theme2.radii[2]}px`,
|
|
8954
|
+
border: `1px solid ${theme2.colors.border}`
|
|
8955
|
+
},
|
|
8956
|
+
children: [
|
|
8957
|
+
/* @__PURE__ */ jsxs(
|
|
8958
|
+
"div",
|
|
8959
|
+
{
|
|
8960
|
+
style: {
|
|
8961
|
+
display: "flex",
|
|
8962
|
+
alignItems: "center",
|
|
8963
|
+
gap: `${theme2.space[2]}px`,
|
|
8964
|
+
marginBottom: `${theme2.space[1]}px`
|
|
8965
|
+
},
|
|
8966
|
+
children: [
|
|
8967
|
+
/* @__PURE__ */ jsx(
|
|
8968
|
+
"span",
|
|
8969
|
+
{
|
|
8970
|
+
style: {
|
|
8971
|
+
padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
|
|
8972
|
+
borderRadius: `${theme2.radii[1]}px`,
|
|
8973
|
+
fontSize: `${theme2.fontSizes[0]}px`,
|
|
8974
|
+
fontWeight: theme2.fontWeights.medium,
|
|
8975
|
+
backgroundColor: `${badge.color}20`,
|
|
8976
|
+
color: badge.color
|
|
8977
|
+
},
|
|
8978
|
+
children: badge.text
|
|
8979
|
+
}
|
|
8980
|
+
),
|
|
8981
|
+
/* @__PURE__ */ jsx(
|
|
8982
|
+
"span",
|
|
8983
|
+
{
|
|
8984
|
+
style: {
|
|
8985
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
8986
|
+
fontWeight: theme2.fontWeights.medium,
|
|
8987
|
+
color: theme2.colors.text
|
|
8988
|
+
},
|
|
8989
|
+
children: title
|
|
8990
|
+
}
|
|
8991
|
+
)
|
|
8992
|
+
]
|
|
8993
|
+
}
|
|
8802
8994
|
),
|
|
8803
|
-
/* @__PURE__ */
|
|
8804
|
-
|
|
8805
|
-
|
|
8995
|
+
/* @__PURE__ */ jsx(
|
|
8996
|
+
"div",
|
|
8997
|
+
{
|
|
8998
|
+
style: {
|
|
8999
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
9000
|
+
color: theme2.colors.textSecondary,
|
|
9001
|
+
lineHeight: theme2.lineHeights.relaxed
|
|
9002
|
+
},
|
|
9003
|
+
children: description
|
|
9004
|
+
}
|
|
9005
|
+
)
|
|
9006
|
+
]
|
|
9007
|
+
}
|
|
9008
|
+
);
|
|
9009
|
+
const DependencyRow = ({ dependency }) => {
|
|
9010
|
+
const { theme: theme2 } = useTheme();
|
|
9011
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
9012
|
+
const [copied, setCopied] = useState(false);
|
|
9013
|
+
const getDependencyTypeBadgeStyle = (type) => {
|
|
9014
|
+
const baseStyle = {
|
|
9015
|
+
padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
|
|
9016
|
+
borderRadius: `${theme2.radii[1]}px`,
|
|
9017
|
+
fontSize: `${theme2.fontSizes[0]}px`,
|
|
9018
|
+
fontWeight: theme2.fontWeights.medium,
|
|
9019
|
+
minWidth: "36px",
|
|
9020
|
+
textAlign: "center"
|
|
9021
|
+
};
|
|
9022
|
+
switch (type) {
|
|
9023
|
+
case "production":
|
|
9024
|
+
return {
|
|
9025
|
+
...baseStyle,
|
|
9026
|
+
backgroundColor: `${theme2.colors.primary}20`,
|
|
9027
|
+
color: theme2.colors.primary
|
|
9028
|
+
};
|
|
9029
|
+
case "development":
|
|
9030
|
+
return {
|
|
9031
|
+
...baseStyle,
|
|
9032
|
+
backgroundColor: `${theme2.colors.secondary}20`,
|
|
9033
|
+
color: theme2.colors.secondary
|
|
9034
|
+
};
|
|
9035
|
+
case "peer":
|
|
9036
|
+
return {
|
|
9037
|
+
...baseStyle,
|
|
9038
|
+
backgroundColor: `${theme2.colors.accent}20`,
|
|
9039
|
+
color: theme2.colors.accent
|
|
9040
|
+
};
|
|
9041
|
+
default:
|
|
9042
|
+
return {
|
|
9043
|
+
...baseStyle,
|
|
9044
|
+
backgroundColor: theme2.colors.backgroundLight,
|
|
9045
|
+
color: theme2.colors.textSecondary
|
|
9046
|
+
};
|
|
9047
|
+
}
|
|
9048
|
+
};
|
|
9049
|
+
const handleCopy = async (e) => {
|
|
9050
|
+
e.preventDefault();
|
|
9051
|
+
e.stopPropagation();
|
|
9052
|
+
try {
|
|
9053
|
+
const copyText = `${dependency.name}@${dependency.version}`;
|
|
9054
|
+
await navigator.clipboard.writeText(copyText);
|
|
9055
|
+
setCopied(true);
|
|
9056
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
9057
|
+
} catch (err) {
|
|
9058
|
+
console.error("Failed to copy:", err);
|
|
9059
|
+
}
|
|
9060
|
+
};
|
|
9061
|
+
const actionButtonStyle = {
|
|
9062
|
+
padding: `${theme2.space[1]}px`,
|
|
9063
|
+
borderRadius: `${theme2.radii[1]}px`,
|
|
9064
|
+
display: "flex",
|
|
9065
|
+
alignItems: "center",
|
|
9066
|
+
justifyContent: "center",
|
|
9067
|
+
border: "none",
|
|
9068
|
+
backgroundColor: "transparent",
|
|
9069
|
+
cursor: "pointer",
|
|
9070
|
+
transition: "all 0.15s ease",
|
|
9071
|
+
opacity: isHovered ? 1 : 0,
|
|
9072
|
+
pointerEvents: isHovered ? "auto" : "none"
|
|
9073
|
+
};
|
|
9074
|
+
return /* @__PURE__ */ jsxs(
|
|
9075
|
+
"div",
|
|
9076
|
+
{
|
|
9077
|
+
style: {
|
|
9078
|
+
display: "flex",
|
|
9079
|
+
alignItems: "center",
|
|
9080
|
+
justifyContent: "space-between",
|
|
9081
|
+
padding: `${theme2.space[2]}px ${theme2.space[3]}px`,
|
|
9082
|
+
backgroundColor: theme2.colors.background,
|
|
9083
|
+
borderRadius: `${theme2.radii[1]}px`,
|
|
9084
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
9085
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
9086
|
+
transition: "all 0.2s"
|
|
9087
|
+
},
|
|
9088
|
+
onMouseEnter: () => setIsHovered(true),
|
|
9089
|
+
onMouseLeave: () => setIsHovered(false),
|
|
9090
|
+
children: [
|
|
9091
|
+
/* @__PURE__ */ jsxs(
|
|
9092
|
+
"div",
|
|
8806
9093
|
{
|
|
8807
|
-
onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path),
|
|
8808
9094
|
style: {
|
|
8809
9095
|
display: "flex",
|
|
8810
9096
|
alignItems: "center",
|
|
8811
|
-
gap:
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
border: `1px solid ${theme2.colors.border}`,
|
|
8815
|
-
borderRadius: "6px",
|
|
8816
|
-
color: theme2.colors.text,
|
|
8817
|
-
cursor: "pointer",
|
|
8818
|
-
textAlign: "left"
|
|
9097
|
+
gap: `${theme2.space[2]}px`,
|
|
9098
|
+
flex: 1,
|
|
9099
|
+
minWidth: 0
|
|
8819
9100
|
},
|
|
8820
9101
|
children: [
|
|
8821
|
-
/* @__PURE__ */ jsx(
|
|
8822
|
-
/* @__PURE__ */
|
|
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(
|
|
9102
|
+
/* @__PURE__ */ jsx("span", { style: getDependencyTypeBadgeStyle(dependency.dependencyType), children: dependency.dependencyType === "production" ? "prod" : dependency.dependencyType === "development" ? "dev" : "peer" }),
|
|
9103
|
+
/* @__PURE__ */ jsx(
|
|
8840
9104
|
"span",
|
|
8841
9105
|
{
|
|
8842
9106
|
style: {
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
9107
|
+
fontWeight: theme2.fontWeights.medium,
|
|
9108
|
+
color: theme2.colors.text,
|
|
9109
|
+
overflow: "hidden",
|
|
9110
|
+
textOverflow: "ellipsis",
|
|
9111
|
+
whiteSpace: "nowrap"
|
|
9112
|
+
},
|
|
9113
|
+
children: dependency.name
|
|
9114
|
+
}
|
|
9115
|
+
),
|
|
9116
|
+
/* @__PURE__ */ jsx(
|
|
9117
|
+
"a",
|
|
9118
|
+
{
|
|
9119
|
+
href: `https://www.npmjs.com/package/${dependency.name}`,
|
|
9120
|
+
target: "_blank",
|
|
9121
|
+
rel: "noopener noreferrer",
|
|
9122
|
+
style: {
|
|
9123
|
+
...actionButtonStyle,
|
|
9124
|
+
color: theme2.colors.textSecondary,
|
|
9125
|
+
textDecoration: "none",
|
|
9126
|
+
flexShrink: 0
|
|
9127
|
+
},
|
|
9128
|
+
title: "View on npm",
|
|
9129
|
+
children: /* @__PURE__ */ jsx(ExternalLink, { size: 12 })
|
|
9130
|
+
}
|
|
9131
|
+
)
|
|
9132
|
+
]
|
|
9133
|
+
}
|
|
9134
|
+
),
|
|
9135
|
+
/* @__PURE__ */ jsxs(
|
|
9136
|
+
"div",
|
|
9137
|
+
{
|
|
9138
|
+
style: {
|
|
9139
|
+
display: "flex",
|
|
9140
|
+
alignItems: "center",
|
|
9141
|
+
gap: "4px"
|
|
9142
|
+
},
|
|
9143
|
+
children: [
|
|
9144
|
+
/* @__PURE__ */ jsx(
|
|
9145
|
+
"button",
|
|
9146
|
+
{
|
|
9147
|
+
type: "button",
|
|
9148
|
+
onClick: handleCopy,
|
|
9149
|
+
style: {
|
|
9150
|
+
...actionButtonStyle,
|
|
9151
|
+
color: copied ? theme2.colors.success || "#10b981" : theme2.colors.textSecondary
|
|
8848
9152
|
},
|
|
8849
|
-
|
|
9153
|
+
title: copied ? "Copied!" : `Copy ${dependency.name}@${dependency.version}`,
|
|
9154
|
+
children: copied ? /* @__PURE__ */ jsx(Check, { size: 12 }) : /* @__PURE__ */ jsx(Copy, { size: 12 })
|
|
8850
9155
|
}
|
|
8851
9156
|
),
|
|
8852
|
-
/* @__PURE__ */ jsx(
|
|
9157
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: dependency.version })
|
|
8853
9158
|
]
|
|
8854
|
-
}
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
9159
|
+
}
|
|
9160
|
+
)
|
|
9161
|
+
]
|
|
9162
|
+
}
|
|
9163
|
+
);
|
|
9164
|
+
};
|
|
9165
|
+
const FilterBar = ({
|
|
9166
|
+
activeFilters,
|
|
9167
|
+
onToggleFilter,
|
|
9168
|
+
searchQuery,
|
|
9169
|
+
onSearchChange,
|
|
9170
|
+
counts
|
|
9171
|
+
}) => {
|
|
9172
|
+
const { theme: theme2 } = useTheme();
|
|
9173
|
+
const availableFilters = [
|
|
9174
|
+
...counts.peer > 0 ? ["peer"] : [],
|
|
9175
|
+
...counts.production > 0 ? ["production"] : [],
|
|
9176
|
+
...counts.development > 0 ? ["development"] : []
|
|
9177
|
+
];
|
|
9178
|
+
const showFilters = availableFilters.length > 1;
|
|
9179
|
+
return /* @__PURE__ */ jsxs(
|
|
9180
|
+
"div",
|
|
9181
|
+
{
|
|
9182
|
+
style: {
|
|
9183
|
+
display: "flex",
|
|
9184
|
+
flexDirection: "column",
|
|
9185
|
+
gap: `${theme2.space[2]}px`
|
|
9186
|
+
},
|
|
9187
|
+
children: [
|
|
9188
|
+
/* @__PURE__ */ jsxs(
|
|
9189
|
+
"div",
|
|
8859
9190
|
{
|
|
8860
|
-
onClick: () => onConfigClick == null ? void 0 : onConfigClick(config),
|
|
8861
9191
|
style: {
|
|
9192
|
+
position: "relative",
|
|
8862
9193
|
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"
|
|
9194
|
+
alignItems: "center"
|
|
8872
9195
|
},
|
|
8873
9196
|
children: [
|
|
8874
|
-
/* @__PURE__ */ jsx(
|
|
8875
|
-
|
|
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",
|
|
9197
|
+
/* @__PURE__ */ jsx(
|
|
9198
|
+
Search,
|
|
8891
9199
|
{
|
|
9200
|
+
size: 14,
|
|
8892
9201
|
style: {
|
|
8893
|
-
|
|
8894
|
-
|
|
9202
|
+
position: "absolute",
|
|
9203
|
+
left: `${theme2.space[3]}px`,
|
|
8895
9204
|
color: theme2.colors.textSecondary,
|
|
8896
|
-
|
|
8897
|
-
|
|
9205
|
+
pointerEvents: "none"
|
|
9206
|
+
}
|
|
9207
|
+
}
|
|
9208
|
+
),
|
|
9209
|
+
/* @__PURE__ */ jsx(
|
|
9210
|
+
"input",
|
|
9211
|
+
{
|
|
9212
|
+
type: "text",
|
|
9213
|
+
placeholder: "Search dependencies...",
|
|
9214
|
+
value: searchQuery,
|
|
9215
|
+
onChange: (e) => onSearchChange(e.target.value),
|
|
9216
|
+
style: {
|
|
9217
|
+
width: "100%",
|
|
9218
|
+
padding: `${theme2.space[2]}px ${theme2.space[5]}px`,
|
|
9219
|
+
borderRadius: `${theme2.radii[2]}px`,
|
|
9220
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
9221
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
9222
|
+
color: theme2.colors.text,
|
|
9223
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
9224
|
+
fontFamily: theme2.fonts.body,
|
|
9225
|
+
outline: "none",
|
|
9226
|
+
transition: "all 0.2s"
|
|
9227
|
+
}
|
|
9228
|
+
}
|
|
9229
|
+
),
|
|
9230
|
+
searchQuery && /* @__PURE__ */ jsx(
|
|
9231
|
+
"button",
|
|
9232
|
+
{
|
|
9233
|
+
onClick: () => onSearchChange(""),
|
|
9234
|
+
style: {
|
|
9235
|
+
position: "absolute",
|
|
9236
|
+
right: `${theme2.space[2]}px`,
|
|
9237
|
+
padding: `${theme2.space[1]}px`,
|
|
9238
|
+
display: "flex",
|
|
9239
|
+
alignItems: "center",
|
|
9240
|
+
justifyContent: "center",
|
|
9241
|
+
backgroundColor: "transparent",
|
|
9242
|
+
border: "none",
|
|
9243
|
+
cursor: "pointer",
|
|
9244
|
+
borderRadius: `${theme2.radii[1]}px`
|
|
8898
9245
|
},
|
|
8899
|
-
|
|
9246
|
+
title: "Clear search",
|
|
9247
|
+
children: /* @__PURE__ */ jsx(X, { size: 14, color: theme2.colors.textSecondary })
|
|
8900
9248
|
}
|
|
8901
9249
|
)
|
|
8902
9250
|
]
|
|
8903
|
-
}
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
9251
|
+
}
|
|
9252
|
+
),
|
|
9253
|
+
showFilters && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: `${theme2.space[1]}px`, width: "100%" }, children: availableFilters.map((type) => {
|
|
9254
|
+
const isActive = activeFilters.has(type);
|
|
9255
|
+
return /* @__PURE__ */ jsxs(
|
|
9256
|
+
"button",
|
|
9257
|
+
{
|
|
9258
|
+
onClick: () => onToggleFilter(type),
|
|
9259
|
+
style: {
|
|
9260
|
+
flex: 1,
|
|
9261
|
+
padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
|
|
9262
|
+
fontSize: `${theme2.fontSizes[0]}px`,
|
|
9263
|
+
fontWeight: theme2.fontWeights.medium,
|
|
9264
|
+
fontFamily: theme2.fonts.body,
|
|
9265
|
+
borderRadius: `${theme2.radii[1]}px`,
|
|
9266
|
+
border: `1px solid ${isActive ? theme2.colors.primary : theme2.colors.border}`,
|
|
9267
|
+
backgroundColor: isActive ? `${theme2.colors.primary}20` : theme2.colors.backgroundSecondary,
|
|
9268
|
+
color: isActive ? theme2.colors.primary : theme2.colors.text,
|
|
9269
|
+
cursor: "pointer",
|
|
9270
|
+
transition: "all 0.2s"
|
|
9271
|
+
},
|
|
9272
|
+
children: [
|
|
9273
|
+
type === "production" ? "Prod" : type === "development" ? "Dev" : "Peer",
|
|
9274
|
+
/* @__PURE__ */ jsxs(
|
|
9275
|
+
"span",
|
|
9276
|
+
{
|
|
9277
|
+
style: { marginLeft: `${theme2.space[1]}px`, opacity: 0.7 },
|
|
9278
|
+
children: [
|
|
9279
|
+
"(",
|
|
9280
|
+
counts[type],
|
|
9281
|
+
")"
|
|
9282
|
+
]
|
|
9283
|
+
}
|
|
9284
|
+
)
|
|
9285
|
+
]
|
|
9286
|
+
},
|
|
9287
|
+
type
|
|
9288
|
+
);
|
|
9289
|
+
}) })
|
|
9290
|
+
]
|
|
9291
|
+
}
|
|
9292
|
+
);
|
|
9293
|
+
};
|
|
9294
|
+
const dependencyTypeOrder$1 = {
|
|
9295
|
+
peer: 0,
|
|
9296
|
+
production: 1,
|
|
9297
|
+
development: 2
|
|
9298
|
+
};
|
|
9299
|
+
function extractDependencies$1(packageLayer) {
|
|
9300
|
+
const { dependencies, devDependencies, peerDependencies } = packageLayer.packageData;
|
|
9301
|
+
const items2 = [];
|
|
9302
|
+
if (dependencies) {
|
|
9303
|
+
Object.entries(dependencies).forEach(([name, version]) => {
|
|
9304
|
+
items2.push({ name, version, dependencyType: "production" });
|
|
9305
|
+
});
|
|
8908
9306
|
}
|
|
9307
|
+
if (devDependencies) {
|
|
9308
|
+
Object.entries(devDependencies).forEach(([name, version]) => {
|
|
9309
|
+
items2.push({ name, version, dependencyType: "development" });
|
|
9310
|
+
});
|
|
9311
|
+
}
|
|
9312
|
+
if (peerDependencies) {
|
|
9313
|
+
Object.entries(peerDependencies).forEach(([name, version]) => {
|
|
9314
|
+
items2.push({ name, version, dependencyType: "peer" });
|
|
9315
|
+
});
|
|
9316
|
+
}
|
|
9317
|
+
return items2.sort((a, b) => {
|
|
9318
|
+
const typeCompare = dependencyTypeOrder$1[a.dependencyType] - dependencyTypeOrder$1[b.dependencyType];
|
|
9319
|
+
if (typeCompare !== 0) return typeCompare;
|
|
9320
|
+
return a.name.localeCompare(b.name);
|
|
9321
|
+
});
|
|
9322
|
+
}
|
|
9323
|
+
function findInternalDependencies(pkg, allPackages) {
|
|
9324
|
+
const currentName = pkg.packageData.name;
|
|
9325
|
+
const allDeps = /* @__PURE__ */ new Set([
|
|
9326
|
+
...Object.keys(pkg.packageData.dependencies || {}),
|
|
9327
|
+
...Object.keys(pkg.packageData.devDependencies || {}),
|
|
9328
|
+
...Object.keys(pkg.packageData.peerDependencies || {})
|
|
9329
|
+
]);
|
|
9330
|
+
const dependsOn = allPackages.filter(
|
|
9331
|
+
(p) => p.packageData.name !== currentName && allDeps.has(p.packageData.name)
|
|
9332
|
+
);
|
|
9333
|
+
const usedBy = allPackages.filter((other) => {
|
|
9334
|
+
if (other.packageData.name === currentName) return false;
|
|
9335
|
+
const otherDeps = /* @__PURE__ */ new Set([
|
|
9336
|
+
...Object.keys(other.packageData.dependencies || {}),
|
|
9337
|
+
...Object.keys(other.packageData.devDependencies || {}),
|
|
9338
|
+
...Object.keys(other.packageData.peerDependencies || {})
|
|
9339
|
+
]);
|
|
9340
|
+
return otherDeps.has(currentName);
|
|
9341
|
+
});
|
|
9342
|
+
return { dependsOn, usedBy };
|
|
9343
|
+
}
|
|
9344
|
+
const PackageSummaryCard = ({ pkg, allPackages, onClick }) => {
|
|
9345
|
+
var _a;
|
|
9346
|
+
const { theme: theme2 } = useTheme();
|
|
9347
|
+
const deps = pkg.packageData.dependencies || {};
|
|
9348
|
+
const devDeps = pkg.packageData.devDependencies || {};
|
|
9349
|
+
const peerDeps = pkg.packageData.peerDependencies || {};
|
|
9350
|
+
const totalDeps = Object.keys(deps).length + Object.keys(devDeps).length + Object.keys(peerDeps).length;
|
|
9351
|
+
const configFiles = pkg.configFiles ? Object.values(pkg.configFiles).filter((c) => c == null ? void 0 : c.exists).length : 0;
|
|
9352
|
+
const commands = ((_a = pkg.packageData.availableCommands) == null ? void 0 : _a.length) || 0;
|
|
9353
|
+
const { dependsOn, usedBy } = useMemo(
|
|
9354
|
+
() => findInternalDependencies(pkg, allPackages),
|
|
9355
|
+
[pkg, allPackages]
|
|
9356
|
+
);
|
|
9357
|
+
const hasInternalDeps = dependsOn.length > 0 || usedBy.length > 0;
|
|
9358
|
+
const packageRole = useMemo(() => {
|
|
9359
|
+
if (dependsOn.length === 0 && usedBy.length === 0) {
|
|
9360
|
+
return null;
|
|
9361
|
+
}
|
|
9362
|
+
if (dependsOn.length === 0 && usedBy.length > 0) {
|
|
9363
|
+
return { label: "core", icon: Box, color: "#10b981" };
|
|
9364
|
+
}
|
|
9365
|
+
if (dependsOn.length > 0 && usedBy.length === 0) {
|
|
9366
|
+
return { label: "app", icon: Layers, color: "#8b5cf6" };
|
|
9367
|
+
}
|
|
9368
|
+
return { label: "shared", icon: LayoutGrid, color: "#f59e0b" };
|
|
9369
|
+
}, [dependsOn.length, usedBy.length]);
|
|
8909
9370
|
return /* @__PURE__ */ jsxs(
|
|
8910
|
-
"
|
|
9371
|
+
"button",
|
|
8911
9372
|
{
|
|
9373
|
+
onClick,
|
|
8912
9374
|
style: {
|
|
9375
|
+
display: "flex",
|
|
9376
|
+
flexDirection: "column",
|
|
9377
|
+
gap: "8px",
|
|
9378
|
+
padding: "12px",
|
|
8913
9379
|
backgroundColor: theme2.colors.backgroundSecondary,
|
|
8914
|
-
borderRadius: "8px",
|
|
8915
9380
|
border: `1px solid ${theme2.colors.border}`,
|
|
8916
|
-
|
|
9381
|
+
borderRadius: "8px",
|
|
9382
|
+
cursor: "pointer",
|
|
9383
|
+
textAlign: "left",
|
|
9384
|
+
transition: "all 0.15s ease",
|
|
9385
|
+
width: "100%"
|
|
9386
|
+
},
|
|
9387
|
+
onMouseEnter: (e) => {
|
|
9388
|
+
e.currentTarget.style.borderColor = theme2.colors.accent;
|
|
9389
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundTertiary;
|
|
9390
|
+
},
|
|
9391
|
+
onMouseLeave: (e) => {
|
|
9392
|
+
e.currentTarget.style.borderColor = theme2.colors.border;
|
|
9393
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundSecondary;
|
|
8917
9394
|
},
|
|
8918
9395
|
children: [
|
|
8919
|
-
/* @__PURE__ */ jsxs(
|
|
8920
|
-
|
|
9396
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
9397
|
+
/* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: pkg.packageData.packageManager, size: 20 }),
|
|
9398
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
9399
|
+
/* @__PURE__ */ jsx(
|
|
9400
|
+
"div",
|
|
9401
|
+
{
|
|
9402
|
+
style: {
|
|
9403
|
+
fontSize: theme2.fontSizes[2],
|
|
9404
|
+
fontWeight: 600,
|
|
9405
|
+
color: theme2.colors.text,
|
|
9406
|
+
overflow: "hidden",
|
|
9407
|
+
textOverflow: "ellipsis",
|
|
9408
|
+
whiteSpace: "nowrap"
|
|
9409
|
+
},
|
|
9410
|
+
children: pkg.packageData.name
|
|
9411
|
+
}
|
|
9412
|
+
),
|
|
9413
|
+
/* @__PURE__ */ jsxs(
|
|
9414
|
+
"div",
|
|
9415
|
+
{
|
|
9416
|
+
style: {
|
|
9417
|
+
fontSize: theme2.fontSizes[0],
|
|
9418
|
+
color: theme2.colors.textSecondary
|
|
9419
|
+
},
|
|
9420
|
+
children: [
|
|
9421
|
+
pkg.packageData.path || "/",
|
|
9422
|
+
pkg.packageData.version && ` • v${pkg.packageData.version}`
|
|
9423
|
+
]
|
|
9424
|
+
}
|
|
9425
|
+
)
|
|
9426
|
+
] }),
|
|
9427
|
+
packageRole && /* @__PURE__ */ jsxs(
|
|
9428
|
+
"span",
|
|
9429
|
+
{
|
|
9430
|
+
style: {
|
|
9431
|
+
display: "flex",
|
|
9432
|
+
alignItems: "center",
|
|
9433
|
+
gap: "4px",
|
|
9434
|
+
padding: "3px 8px",
|
|
9435
|
+
backgroundColor: packageRole.color + "20",
|
|
9436
|
+
color: packageRole.color,
|
|
9437
|
+
borderRadius: "4px",
|
|
9438
|
+
fontSize: theme2.fontSizes[0],
|
|
9439
|
+
fontWeight: 500,
|
|
9440
|
+
flexShrink: 0
|
|
9441
|
+
},
|
|
9442
|
+
children: [
|
|
9443
|
+
/* @__PURE__ */ jsx(packageRole.icon, { size: 12 }),
|
|
9444
|
+
packageRole.label
|
|
9445
|
+
]
|
|
9446
|
+
}
|
|
9447
|
+
),
|
|
9448
|
+
/* @__PURE__ */ jsx(ChevronRight, { size: 16, color: theme2.colors.textSecondary })
|
|
9449
|
+
] }),
|
|
9450
|
+
hasInternalDeps && /* @__PURE__ */ jsxs(
|
|
9451
|
+
"div",
|
|
8921
9452
|
{
|
|
8922
|
-
onClick: onToggle,
|
|
8923
9453
|
style: {
|
|
8924
|
-
width: "100%",
|
|
8925
9454
|
display: "flex",
|
|
8926
|
-
|
|
8927
|
-
gap: "
|
|
8928
|
-
|
|
8929
|
-
backgroundColor: "transparent",
|
|
8930
|
-
border: "none",
|
|
8931
|
-
cursor: "pointer",
|
|
8932
|
-
color: theme2.colors.text,
|
|
8933
|
-
textAlign: "left"
|
|
9455
|
+
flexDirection: "column",
|
|
9456
|
+
gap: "4px",
|
|
9457
|
+
fontSize: theme2.fontSizes[0]
|
|
8934
9458
|
},
|
|
8935
9459
|
children: [
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
9460
|
+
dependsOn.length > 0 && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", flexWrap: "wrap" }, children: [
|
|
9461
|
+
/* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.textSecondary, display: "flex", alignItems: "center", gap: "2px" }, children: [
|
|
9462
|
+
/* @__PURE__ */ jsx(ArrowRight, { size: 10 }),
|
|
9463
|
+
"uses"
|
|
9464
|
+
] }),
|
|
9465
|
+
dependsOn.map((dep) => /* @__PURE__ */ jsx(
|
|
9466
|
+
"span",
|
|
8941
9467
|
{
|
|
8942
9468
|
style: {
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
9469
|
+
padding: "2px 6px",
|
|
9470
|
+
backgroundColor: theme2.colors.accent + "15",
|
|
9471
|
+
color: theme2.colors.accent,
|
|
9472
|
+
borderRadius: "4px",
|
|
9473
|
+
fontWeight: 500
|
|
8948
9474
|
},
|
|
8949
|
-
children:
|
|
8950
|
-
}
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
9475
|
+
children: dep.packageData.name
|
|
9476
|
+
},
|
|
9477
|
+
dep.id
|
|
9478
|
+
))
|
|
9479
|
+
] }),
|
|
9480
|
+
usedBy.length > 0 && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", flexWrap: "wrap" }, children: [
|
|
9481
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: "used by" }),
|
|
9482
|
+
usedBy.map((dep) => /* @__PURE__ */ jsx(
|
|
9483
|
+
"span",
|
|
8954
9484
|
{
|
|
8955
9485
|
style: {
|
|
8956
|
-
|
|
8957
|
-
|
|
9486
|
+
padding: "2px 6px",
|
|
9487
|
+
backgroundColor: theme2.colors.textSecondary + "20",
|
|
9488
|
+
color: theme2.colors.textSecondary,
|
|
9489
|
+
borderRadius: "4px",
|
|
9490
|
+
fontWeight: 500
|
|
8958
9491
|
},
|
|
8959
|
-
children:
|
|
8960
|
-
"v",
|
|
8961
|
-
pkg.packageData.version
|
|
8962
|
-
]
|
|
8963
|
-
}
|
|
8964
|
-
)
|
|
8965
|
-
] }),
|
|
8966
|
-
pkg.packageData.path && /* @__PURE__ */ jsxs(
|
|
8967
|
-
"button",
|
|
8968
|
-
{
|
|
8969
|
-
onClick: (e) => {
|
|
8970
|
-
e.stopPropagation();
|
|
8971
|
-
onPackageClick == null ? void 0 : onPackageClick(pkg.packageData.path);
|
|
8972
|
-
},
|
|
8973
|
-
style: {
|
|
8974
|
-
display: "flex",
|
|
8975
|
-
alignItems: "center",
|
|
8976
|
-
gap: "4px",
|
|
8977
|
-
padding: "4px 8px",
|
|
8978
|
-
backgroundColor: theme2.colors.backgroundTertiary,
|
|
8979
|
-
border: `1px solid ${theme2.colors.border}`,
|
|
8980
|
-
borderRadius: "4px",
|
|
8981
|
-
color: theme2.colors.textSecondary,
|
|
8982
|
-
fontSize: theme2.fontSizes[0],
|
|
8983
|
-
cursor: "pointer"
|
|
9492
|
+
children: dep.packageData.name
|
|
8984
9493
|
},
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
pkg.packageData.path || "/"
|
|
8989
|
-
]
|
|
8990
|
-
}
|
|
8991
|
-
)
|
|
9494
|
+
dep.id
|
|
9495
|
+
))
|
|
9496
|
+
] })
|
|
8992
9497
|
]
|
|
8993
9498
|
}
|
|
8994
9499
|
),
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
{
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
display: "flex",
|
|
9021
|
-
alignItems: "center",
|
|
9022
|
-
justifyContent: "center",
|
|
9023
|
-
gap: "6px"
|
|
9024
|
-
},
|
|
9025
|
-
children: [
|
|
9026
|
-
tab.label,
|
|
9027
|
-
/* @__PURE__ */ jsx(
|
|
9028
|
-
"span",
|
|
9029
|
-
{
|
|
9030
|
-
style: {
|
|
9031
|
-
backgroundColor: theme2.colors.backgroundTertiary,
|
|
9032
|
-
padding: "1px 6px",
|
|
9033
|
-
borderRadius: "10px",
|
|
9034
|
-
fontSize: theme2.fontSizes[0]
|
|
9035
|
-
},
|
|
9036
|
-
children: tab.count
|
|
9037
|
-
}
|
|
9038
|
-
)
|
|
9039
|
-
]
|
|
9040
|
-
},
|
|
9041
|
-
tab.id
|
|
9042
|
-
))
|
|
9043
|
-
}
|
|
9044
|
-
),
|
|
9045
|
-
/* @__PURE__ */ jsxs("div", { style: { padding: "12px", maxHeight: "300px", overflow: "auto" }, children: [
|
|
9046
|
-
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(
|
|
9047
|
-
"button",
|
|
9048
|
-
{
|
|
9049
|
-
onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path),
|
|
9050
|
-
style: {
|
|
9051
|
-
display: "flex",
|
|
9052
|
-
alignItems: "center",
|
|
9053
|
-
gap: "8px",
|
|
9054
|
-
padding: "8px 12px",
|
|
9055
|
-
backgroundColor: theme2.colors.backgroundTertiary,
|
|
9056
|
-
border: `1px solid ${theme2.colors.border}`,
|
|
9057
|
-
borderRadius: "6px",
|
|
9058
|
-
color: theme2.colors.text,
|
|
9059
|
-
cursor: "pointer",
|
|
9060
|
-
textAlign: "left"
|
|
9061
|
-
},
|
|
9062
|
-
children: [
|
|
9063
|
-
/* @__PURE__ */ jsx(Terminal, { size: 14, color: theme2.colors.accent }),
|
|
9064
|
-
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
9065
|
-
/* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: cmd.name }),
|
|
9066
|
-
/* @__PURE__ */ jsx(
|
|
9067
|
-
"div",
|
|
9068
|
-
{
|
|
9069
|
-
style: {
|
|
9070
|
-
fontSize: theme2.fontSizes[0],
|
|
9071
|
-
color: theme2.colors.textSecondary,
|
|
9072
|
-
fontFamily: "monospace",
|
|
9073
|
-
overflow: "hidden",
|
|
9074
|
-
textOverflow: "ellipsis",
|
|
9075
|
-
whiteSpace: "nowrap"
|
|
9076
|
-
},
|
|
9077
|
-
children: cmd.command
|
|
9078
|
-
}
|
|
9079
|
-
)
|
|
9080
|
-
] }),
|
|
9081
|
-
cmd.isLensCommand && /* @__PURE__ */ jsx(
|
|
9082
|
-
"span",
|
|
9083
|
-
{
|
|
9084
|
-
style: {
|
|
9085
|
-
padding: "2px 6px",
|
|
9086
|
-
backgroundColor: theme2.colors.accent + "20",
|
|
9087
|
-
color: theme2.colors.accent,
|
|
9088
|
-
borderRadius: "4px",
|
|
9089
|
-
fontSize: theme2.fontSizes[0]
|
|
9090
|
-
},
|
|
9091
|
-
children: cmd.lensId
|
|
9092
|
-
}
|
|
9093
|
-
),
|
|
9094
|
-
/* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme2.colors.textSecondary })
|
|
9095
|
-
]
|
|
9096
|
-
},
|
|
9097
|
-
idx
|
|
9098
|
-
)) }),
|
|
9099
|
-
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(
|
|
9100
|
-
"button",
|
|
9101
|
-
{
|
|
9102
|
-
onClick: () => onConfigClick == null ? void 0 : onConfigClick(config),
|
|
9103
|
-
style: {
|
|
9104
|
-
display: "flex",
|
|
9105
|
-
alignItems: "center",
|
|
9106
|
-
gap: "8px",
|
|
9107
|
-
padding: "8px 12px",
|
|
9108
|
-
backgroundColor: theme2.colors.backgroundTertiary,
|
|
9109
|
-
border: `1px solid ${theme2.colors.border}`,
|
|
9110
|
-
borderRadius: "6px",
|
|
9111
|
-
color: theme2.colors.text,
|
|
9112
|
-
cursor: "pointer",
|
|
9113
|
-
textAlign: "left"
|
|
9114
|
-
},
|
|
9115
|
-
children: [
|
|
9116
|
-
/* @__PURE__ */ jsx(Settings, { size: 14, color: theme2.colors.textSecondary }),
|
|
9117
|
-
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|
|
9118
|
-
/* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: config.name }),
|
|
9119
|
-
/* @__PURE__ */ jsx(
|
|
9120
|
-
"div",
|
|
9121
|
-
{
|
|
9122
|
-
style: {
|
|
9123
|
-
fontSize: theme2.fontSizes[0],
|
|
9124
|
-
color: theme2.colors.textSecondary,
|
|
9125
|
-
fontFamily: "monospace"
|
|
9126
|
-
},
|
|
9127
|
-
children: config.path
|
|
9128
|
-
}
|
|
9129
|
-
)
|
|
9130
|
-
] }),
|
|
9131
|
-
config.isInline && /* @__PURE__ */ jsx(
|
|
9132
|
-
"span",
|
|
9133
|
-
{
|
|
9134
|
-
style: {
|
|
9135
|
-
padding: "2px 6px",
|
|
9136
|
-
backgroundColor: theme2.colors.textSecondary + "20",
|
|
9137
|
-
color: theme2.colors.textSecondary,
|
|
9138
|
-
borderRadius: "4px",
|
|
9139
|
-
fontSize: theme2.fontSizes[0]
|
|
9140
|
-
},
|
|
9141
|
-
children: "inline"
|
|
9142
|
-
}
|
|
9143
|
-
)
|
|
9144
|
-
]
|
|
9145
|
-
},
|
|
9146
|
-
idx
|
|
9147
|
-
)) })
|
|
9148
|
-
] })
|
|
9149
|
-
] })
|
|
9500
|
+
/* @__PURE__ */ jsxs(
|
|
9501
|
+
"div",
|
|
9502
|
+
{
|
|
9503
|
+
style: {
|
|
9504
|
+
display: "flex",
|
|
9505
|
+
gap: "12px",
|
|
9506
|
+
fontSize: theme2.fontSizes[0],
|
|
9507
|
+
color: theme2.colors.textSecondary
|
|
9508
|
+
},
|
|
9509
|
+
children: [
|
|
9510
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
9511
|
+
/* @__PURE__ */ jsx(Terminal, { size: 12 }),
|
|
9512
|
+
/* @__PURE__ */ jsx("span", { children: commands })
|
|
9513
|
+
] }),
|
|
9514
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
9515
|
+
/* @__PURE__ */ jsx(Settings, { size: 12 }),
|
|
9516
|
+
/* @__PURE__ */ jsx("span", { children: configFiles })
|
|
9517
|
+
] }),
|
|
9518
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
9519
|
+
/* @__PURE__ */ jsx(Package, { size: 12 }),
|
|
9520
|
+
/* @__PURE__ */ jsx("span", { children: totalDeps })
|
|
9521
|
+
] })
|
|
9522
|
+
]
|
|
9523
|
+
}
|
|
9524
|
+
)
|
|
9150
9525
|
]
|
|
9151
9526
|
}
|
|
9152
9527
|
);
|
|
9153
9528
|
};
|
|
9154
|
-
const
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9529
|
+
const PackageCard = ({
|
|
9530
|
+
pkg,
|
|
9531
|
+
isExpanded,
|
|
9532
|
+
onToggle,
|
|
9158
9533
|
onCommandClick,
|
|
9159
9534
|
onConfigClick,
|
|
9160
|
-
onPackageClick
|
|
9535
|
+
onPackageClick,
|
|
9536
|
+
standalone = false
|
|
9161
9537
|
}) => {
|
|
9162
9538
|
const { theme: theme2 } = useTheme();
|
|
9163
|
-
const [
|
|
9164
|
-
const
|
|
9165
|
-
|
|
9539
|
+
const [activeTab, setActiveTab] = useState("commands");
|
|
9540
|
+
const [activeFilters, setActiveFilters] = useState(/* @__PURE__ */ new Set());
|
|
9541
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
9542
|
+
const [showInfoModal, setShowInfoModal] = useState(false);
|
|
9543
|
+
const configFiles = useMemo(() => {
|
|
9544
|
+
if (!pkg.configFiles) return [];
|
|
9545
|
+
return Object.entries(pkg.configFiles).filter(([, config]) => config == null ? void 0 : config.exists).map(([name, config]) => ({ name, ...config }));
|
|
9546
|
+
}, [pkg.configFiles]);
|
|
9547
|
+
const commands = pkg.packageData.availableCommands || [];
|
|
9548
|
+
const dependencyItems = useMemo(() => extractDependencies$1(pkg), [pkg]);
|
|
9549
|
+
const depCounts = useMemo(() => ({
|
|
9550
|
+
all: dependencyItems.length,
|
|
9551
|
+
production: dependencyItems.filter((d) => d.dependencyType === "production").length,
|
|
9552
|
+
development: dependencyItems.filter((d) => d.dependencyType === "development").length,
|
|
9553
|
+
peer: dependencyItems.filter((d) => d.dependencyType === "peer").length
|
|
9554
|
+
}), [dependencyItems]);
|
|
9555
|
+
const handleToggleFilter = (type) => {
|
|
9556
|
+
setActiveFilters((prev) => {
|
|
9166
9557
|
const next = new Set(prev);
|
|
9167
|
-
if (next.has(
|
|
9168
|
-
next.delete(
|
|
9558
|
+
if (next.has(type)) {
|
|
9559
|
+
next.delete(type);
|
|
9169
9560
|
} else {
|
|
9170
|
-
next.add(
|
|
9561
|
+
next.add(type);
|
|
9171
9562
|
}
|
|
9172
9563
|
return next;
|
|
9173
9564
|
});
|
|
9174
9565
|
};
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
if (isLoading) {
|
|
9181
|
-
return /* @__PURE__ */ jsx(
|
|
9182
|
-
"div",
|
|
9183
|
-
{
|
|
9184
|
-
style: {
|
|
9185
|
-
padding: "20px",
|
|
9186
|
-
textAlign: "center",
|
|
9187
|
-
color: theme2.colors.textSecondary
|
|
9188
|
-
},
|
|
9189
|
-
children: "Loading packages..."
|
|
9190
|
-
}
|
|
9191
|
-
);
|
|
9192
|
-
}
|
|
9193
|
-
if (packages.length === 0) {
|
|
9194
|
-
return /* @__PURE__ */ jsx(
|
|
9195
|
-
"div",
|
|
9196
|
-
{
|
|
9197
|
-
style: {
|
|
9198
|
-
padding: "20px",
|
|
9199
|
-
textAlign: "center",
|
|
9200
|
-
color: theme2.colors.textSecondary
|
|
9201
|
-
},
|
|
9202
|
-
children: emptyMessage
|
|
9203
|
-
}
|
|
9204
|
-
);
|
|
9205
|
-
}
|
|
9206
|
-
const sortedPackages = [...packages].sort((a, b) => {
|
|
9207
|
-
if (a.packageData.isMonorepoRoot && !b.packageData.isMonorepoRoot) return -1;
|
|
9208
|
-
if (!a.packageData.isMonorepoRoot && b.packageData.isMonorepoRoot) return 1;
|
|
9209
|
-
return a.packageData.path.localeCompare(b.packageData.path);
|
|
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
|
-
}
|
|
9226
|
-
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
9227
|
-
/* @__PURE__ */ jsxs(
|
|
9228
|
-
"div",
|
|
9229
|
-
{
|
|
9230
|
-
style: {
|
|
9231
|
-
padding: "12px 16px",
|
|
9232
|
-
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
9233
|
-
display: "flex",
|
|
9234
|
-
alignItems: "center",
|
|
9235
|
-
gap: "8px"
|
|
9236
|
-
},
|
|
9237
|
-
children: [
|
|
9238
|
-
/* @__PURE__ */ jsx(FileCode, { size: 16, color: theme2.colors.accent }),
|
|
9239
|
-
/* @__PURE__ */ jsxs("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary }, children: [
|
|
9240
|
-
packages.length,
|
|
9241
|
-
" package",
|
|
9242
|
-
packages.length !== 1 ? "s" : "",
|
|
9243
|
-
" detected"
|
|
9244
|
-
] })
|
|
9245
|
-
]
|
|
9246
|
-
}
|
|
9247
|
-
),
|
|
9248
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto", padding: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: sortedPackages.map((pkg) => /* @__PURE__ */ jsx(
|
|
9249
|
-
PackageCard,
|
|
9250
|
-
{
|
|
9251
|
-
pkg,
|
|
9252
|
-
isExpanded: expandedPackages.has(pkg.id),
|
|
9253
|
-
onToggle: () => togglePackage(pkg.id),
|
|
9254
|
-
onCommandClick,
|
|
9255
|
-
onConfigClick,
|
|
9256
|
-
onPackageClick
|
|
9257
|
-
},
|
|
9258
|
-
pkg.id
|
|
9259
|
-
)) })
|
|
9260
|
-
] });
|
|
9261
|
-
};
|
|
9262
|
-
const PackageCompositionPanelPreview = () => {
|
|
9263
|
-
const { theme: theme2 } = useTheme();
|
|
9264
|
-
return /* @__PURE__ */ jsxs(
|
|
9265
|
-
"div",
|
|
9266
|
-
{
|
|
9267
|
-
style: {
|
|
9268
|
-
padding: "12px",
|
|
9269
|
-
fontSize: "12px",
|
|
9270
|
-
color: theme2.colors.text,
|
|
9271
|
-
display: "flex",
|
|
9272
|
-
flexDirection: "column",
|
|
9273
|
-
gap: "6px"
|
|
9274
|
-
},
|
|
9275
|
-
children: [
|
|
9276
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
9277
|
-
/* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: "npm", size: 14 }),
|
|
9278
|
-
/* @__PURE__ */ jsx("span", { children: "my-app" })
|
|
9279
|
-
] }),
|
|
9280
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingLeft: "8px" }, children: [
|
|
9281
|
-
/* @__PURE__ */ jsx(Terminal, { size: 12, color: theme2.colors.textSecondary }),
|
|
9282
|
-
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: "5 commands" })
|
|
9283
|
-
] }),
|
|
9284
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingLeft: "8px" }, children: [
|
|
9285
|
-
/* @__PURE__ */ jsx(Settings, { size: 12, color: theme2.colors.textSecondary }),
|
|
9286
|
-
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: "3 configs" })
|
|
9287
|
-
] })
|
|
9288
|
-
]
|
|
9566
|
+
const filteredDependencies = useMemo(() => {
|
|
9567
|
+
let filtered = [...dependencyItems];
|
|
9568
|
+
if (searchQuery.trim()) {
|
|
9569
|
+
const query = searchQuery.toLowerCase();
|
|
9570
|
+
filtered = filtered.filter((dep) => dep.name.toLowerCase().includes(query));
|
|
9289
9571
|
}
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
const
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
const packages = ((_a = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a.packages) ?? [];
|
|
9296
|
-
const isLoading = (packagesSlice == null ? void 0 : packagesSlice.loading) || false;
|
|
9297
|
-
return /* @__PURE__ */ jsx(
|
|
9298
|
-
PackageCompositionPanelContent,
|
|
9299
|
-
{
|
|
9300
|
-
packages,
|
|
9301
|
-
isLoading
|
|
9572
|
+
const allTypes = ["production", "development", "peer"];
|
|
9573
|
+
const availableTypes = allTypes.filter((t) => depCounts[t] > 0);
|
|
9574
|
+
const isAllSelected = activeFilters.size === 0 || availableTypes.every((t) => activeFilters.has(t));
|
|
9575
|
+
if (!isAllSelected && activeFilters.size > 0) {
|
|
9576
|
+
filtered = filtered.filter((dep) => activeFilters.has(dep.dependencyType));
|
|
9302
9577
|
}
|
|
9303
|
-
|
|
9304
|
-
};
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
}) => {
|
|
9309
|
-
const { theme: theme2 } = useTheme();
|
|
9310
|
-
if (!isOpen) return null;
|
|
9311
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
9312
|
-
"div",
|
|
9313
|
-
{
|
|
9314
|
-
style: {
|
|
9315
|
-
position: "fixed",
|
|
9316
|
-
top: 0,
|
|
9317
|
-
left: 0,
|
|
9318
|
-
right: 0,
|
|
9319
|
-
bottom: 0,
|
|
9320
|
-
backgroundColor: theme2.colors.muted,
|
|
9321
|
-
zIndex: theme2.zIndices[4],
|
|
9322
|
-
display: "flex",
|
|
9323
|
-
alignItems: "center",
|
|
9324
|
-
justifyContent: "center"
|
|
9325
|
-
},
|
|
9326
|
-
onClick: onClose,
|
|
9327
|
-
children: /* @__PURE__ */ jsxs(
|
|
9578
|
+
return filtered;
|
|
9579
|
+
}, [dependencyItems, searchQuery, activeFilters, depCounts]);
|
|
9580
|
+
if (standalone) {
|
|
9581
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
9582
|
+
/* @__PURE__ */ jsxs(
|
|
9328
9583
|
"div",
|
|
9329
9584
|
{
|
|
9330
9585
|
style: {
|
|
9331
|
-
backgroundColor: theme2.colors.background,
|
|
9332
|
-
borderRadius: `${theme2.radii[3]}px`,
|
|
9333
|
-
maxWidth: "600px",
|
|
9334
|
-
maxHeight: "80vh",
|
|
9335
|
-
width: "90%",
|
|
9336
|
-
overflow: "hidden",
|
|
9337
9586
|
display: "flex",
|
|
9338
|
-
|
|
9339
|
-
|
|
9587
|
+
alignItems: "center",
|
|
9588
|
+
gap: "8px",
|
|
9589
|
+
padding: "12px 16px",
|
|
9590
|
+
borderBottom: `1px solid ${theme2.colors.border}`
|
|
9340
9591
|
},
|
|
9341
|
-
onClick: (e) => e.stopPropagation(),
|
|
9342
9592
|
children: [
|
|
9343
|
-
/* @__PURE__ */
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
onClick: onClose,
|
|
9376
|
-
style: {
|
|
9377
|
-
background: "none",
|
|
9378
|
-
border: "none",
|
|
9379
|
-
color: theme2.colors.textSecondary,
|
|
9380
|
-
cursor: "pointer",
|
|
9381
|
-
padding: `${theme2.space[1]}px`
|
|
9382
|
-
},
|
|
9383
|
-
children: /* @__PURE__ */ jsx(X, { size: 20 })
|
|
9384
|
-
}
|
|
9385
|
-
)
|
|
9386
|
-
]
|
|
9387
|
-
}
|
|
9388
|
-
),
|
|
9389
|
-
/* @__PURE__ */ jsxs(
|
|
9390
|
-
"div",
|
|
9593
|
+
/* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: pkg.packageData.packageManager, size: 18 }),
|
|
9594
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
9595
|
+
/* @__PURE__ */ jsx(
|
|
9596
|
+
"div",
|
|
9597
|
+
{
|
|
9598
|
+
style: {
|
|
9599
|
+
fontSize: theme2.fontSizes[2],
|
|
9600
|
+
fontWeight: 600,
|
|
9601
|
+
color: theme2.colors.text,
|
|
9602
|
+
overflow: "hidden",
|
|
9603
|
+
textOverflow: "ellipsis",
|
|
9604
|
+
whiteSpace: "nowrap"
|
|
9605
|
+
},
|
|
9606
|
+
children: pkg.packageData.name
|
|
9607
|
+
}
|
|
9608
|
+
),
|
|
9609
|
+
pkg.packageData.version && /* @__PURE__ */ jsxs(
|
|
9610
|
+
"div",
|
|
9611
|
+
{
|
|
9612
|
+
style: {
|
|
9613
|
+
fontSize: theme2.fontSizes[0],
|
|
9614
|
+
color: theme2.colors.textSecondary
|
|
9615
|
+
},
|
|
9616
|
+
children: [
|
|
9617
|
+
"v",
|
|
9618
|
+
pkg.packageData.version
|
|
9619
|
+
]
|
|
9620
|
+
}
|
|
9621
|
+
)
|
|
9622
|
+
] }),
|
|
9623
|
+
pkg.packageData.path && /* @__PURE__ */ jsxs(
|
|
9624
|
+
"button",
|
|
9391
9625
|
{
|
|
9626
|
+
onClick: () => onPackageClick == null ? void 0 : onPackageClick(pkg.packageData.path),
|
|
9392
9627
|
style: {
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9628
|
+
display: "flex",
|
|
9629
|
+
alignItems: "center",
|
|
9630
|
+
gap: "4px",
|
|
9631
|
+
padding: "4px 8px",
|
|
9632
|
+
backgroundColor: theme2.colors.backgroundTertiary,
|
|
9633
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
9634
|
+
borderRadius: "4px",
|
|
9635
|
+
color: theme2.colors.textSecondary,
|
|
9636
|
+
fontSize: theme2.fontSizes[0],
|
|
9637
|
+
cursor: "pointer"
|
|
9396
9638
|
},
|
|
9639
|
+
title: "Open package folder",
|
|
9397
9640
|
children: [
|
|
9398
|
-
/* @__PURE__ */
|
|
9399
|
-
|
|
9400
|
-
{
|
|
9401
|
-
icon: /* @__PURE__ */ jsx(Package, { size: 18 }),
|
|
9402
|
-
title: "Dependency Types",
|
|
9403
|
-
theme: theme2,
|
|
9404
|
-
children: [
|
|
9405
|
-
/* @__PURE__ */ jsx(
|
|
9406
|
-
InfoItem,
|
|
9407
|
-
{
|
|
9408
|
-
badge: { text: "prod", color: theme2.colors.primary },
|
|
9409
|
-
title: "Production Dependencies",
|
|
9410
|
-
description: "Required for your application to run in production. These are bundled with your app and affect its size and security.",
|
|
9411
|
-
theme: theme2
|
|
9412
|
-
}
|
|
9413
|
-
),
|
|
9414
|
-
/* @__PURE__ */ jsx(
|
|
9415
|
-
InfoItem,
|
|
9416
|
-
{
|
|
9417
|
-
badge: { text: "dev", color: theme2.colors.secondary },
|
|
9418
|
-
title: "Development Dependencies",
|
|
9419
|
-
description: "Only needed during development (build tools, testing, linters). Not included in production builds.",
|
|
9420
|
-
theme: theme2
|
|
9421
|
-
}
|
|
9422
|
-
),
|
|
9423
|
-
/* @__PURE__ */ jsx(
|
|
9424
|
-
InfoItem,
|
|
9425
|
-
{
|
|
9426
|
-
badge: { text: "peer", color: theme2.colors.accent },
|
|
9427
|
-
title: "Peer Dependencies",
|
|
9428
|
-
description: "Expected to be provided by the consumer of your package. Important for library authors to specify compatibility.",
|
|
9429
|
-
theme: theme2
|
|
9430
|
-
}
|
|
9431
|
-
)
|
|
9432
|
-
]
|
|
9433
|
-
}
|
|
9434
|
-
),
|
|
9435
|
-
/* @__PURE__ */ jsxs(
|
|
9436
|
-
Section,
|
|
9437
|
-
{
|
|
9438
|
-
icon: /* @__PURE__ */ jsx(Scale, { size: 18 }),
|
|
9439
|
-
title: "Common Licenses",
|
|
9440
|
-
theme: theme2,
|
|
9441
|
-
children: [
|
|
9442
|
-
/* @__PURE__ */ jsx(
|
|
9443
|
-
InfoItem,
|
|
9444
|
-
{
|
|
9445
|
-
badge: { text: "MIT", color: theme2.colors.success },
|
|
9446
|
-
title: "Permissive Licenses (MIT, Apache, BSD)",
|
|
9447
|
-
description: "Few restrictions. Can use in commercial projects. Must include copyright notice.",
|
|
9448
|
-
theme: theme2
|
|
9449
|
-
}
|
|
9450
|
-
),
|
|
9451
|
-
/* @__PURE__ */ jsx(
|
|
9452
|
-
InfoItem,
|
|
9453
|
-
{
|
|
9454
|
-
badge: { text: "GPL", color: theme2.colors.warning },
|
|
9455
|
-
title: "Copyleft Licenses (GPL, LGPL, AGPL)",
|
|
9456
|
-
description: "Requires sharing source code of derivative works. Can impact your project's licensing.",
|
|
9457
|
-
theme: theme2
|
|
9458
|
-
}
|
|
9459
|
-
)
|
|
9460
|
-
]
|
|
9461
|
-
}
|
|
9462
|
-
)
|
|
9641
|
+
/* @__PURE__ */ jsx(Folder, { size: 12 }),
|
|
9642
|
+
pkg.packageData.path || "/"
|
|
9463
9643
|
]
|
|
9464
9644
|
}
|
|
9465
9645
|
)
|
|
9466
9646
|
]
|
|
9467
9647
|
}
|
|
9468
|
-
)
|
|
9469
|
-
|
|
9470
|
-
) });
|
|
9471
|
-
};
|
|
9472
|
-
const Section = ({ icon, title, theme: theme2, children }) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: `${theme2.space[5]}px` }, children: [
|
|
9473
|
-
/* @__PURE__ */ jsxs(
|
|
9474
|
-
"h3",
|
|
9475
|
-
{
|
|
9476
|
-
style: {
|
|
9477
|
-
fontSize: `${theme2.fontSizes[2]}px`,
|
|
9478
|
-
fontWeight: theme2.fontWeights.semibold,
|
|
9479
|
-
color: theme2.colors.text,
|
|
9480
|
-
marginBottom: `${theme2.space[3]}px`,
|
|
9481
|
-
display: "flex",
|
|
9482
|
-
alignItems: "center",
|
|
9483
|
-
gap: `${theme2.space[2]}px`
|
|
9484
|
-
},
|
|
9485
|
-
children: [
|
|
9486
|
-
icon,
|
|
9487
|
-
title
|
|
9488
|
-
]
|
|
9489
|
-
}
|
|
9490
|
-
),
|
|
9491
|
-
/* @__PURE__ */ jsx(
|
|
9492
|
-
"div",
|
|
9493
|
-
{
|
|
9494
|
-
style: {
|
|
9495
|
-
display: "flex",
|
|
9496
|
-
flexDirection: "column",
|
|
9497
|
-
gap: `${theme2.space[2]}px`
|
|
9498
|
-
},
|
|
9499
|
-
children
|
|
9500
|
-
}
|
|
9501
|
-
)
|
|
9502
|
-
] });
|
|
9503
|
-
const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__ */ jsxs(
|
|
9504
|
-
"div",
|
|
9505
|
-
{
|
|
9506
|
-
style: {
|
|
9507
|
-
padding: `${theme2.space[3]}px`,
|
|
9508
|
-
backgroundColor: theme2.colors.backgroundSecondary,
|
|
9509
|
-
borderRadius: `${theme2.radii[2]}px`,
|
|
9510
|
-
border: `1px solid ${theme2.colors.border}`
|
|
9511
|
-
},
|
|
9512
|
-
children: [
|
|
9513
|
-
/* @__PURE__ */ jsxs(
|
|
9648
|
+
),
|
|
9649
|
+
/* @__PURE__ */ jsx(
|
|
9514
9650
|
"div",
|
|
9515
9651
|
{
|
|
9516
9652
|
style: {
|
|
9517
9653
|
display: "flex",
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9654
|
+
backgroundColor: theme2.colors.backgroundTertiary,
|
|
9655
|
+
borderBottom: `1px solid ${theme2.colors.border}`
|
|
9656
|
+
},
|
|
9657
|
+
children: [
|
|
9658
|
+
{ id: "commands", label: "Commands", count: commands.length },
|
|
9659
|
+
{ id: "configs", label: "Configs", count: configFiles.length },
|
|
9660
|
+
{ id: "dependencies", label: "Dependencies", count: dependencyItems.length }
|
|
9661
|
+
].map((tab) => /* @__PURE__ */ jsxs(
|
|
9662
|
+
"button",
|
|
9663
|
+
{
|
|
9664
|
+
onClick: () => setActiveTab(tab.id),
|
|
9665
|
+
style: {
|
|
9666
|
+
flex: 1,
|
|
9667
|
+
padding: "8px 12px",
|
|
9668
|
+
backgroundColor: activeTab === tab.id ? theme2.colors.backgroundSecondary : "transparent",
|
|
9669
|
+
border: "none",
|
|
9670
|
+
borderBottom: activeTab === tab.id ? `2px solid ${theme2.colors.accent}` : "2px solid transparent",
|
|
9671
|
+
color: activeTab === tab.id ? theme2.colors.text : theme2.colors.textSecondary,
|
|
9672
|
+
fontSize: theme2.fontSizes[1],
|
|
9673
|
+
cursor: "pointer",
|
|
9674
|
+
display: "flex",
|
|
9675
|
+
alignItems: "center",
|
|
9676
|
+
justifyContent: "center",
|
|
9677
|
+
gap: "6px"
|
|
9678
|
+
},
|
|
9679
|
+
children: [
|
|
9680
|
+
tab.label,
|
|
9681
|
+
/* @__PURE__ */ jsx(
|
|
9682
|
+
"span",
|
|
9683
|
+
{
|
|
9684
|
+
style: {
|
|
9685
|
+
backgroundColor: theme2.colors.backgroundTertiary,
|
|
9686
|
+
padding: "1px 6px",
|
|
9687
|
+
borderRadius: "10px",
|
|
9688
|
+
fontSize: theme2.fontSizes[0]
|
|
9689
|
+
},
|
|
9690
|
+
children: tab.count
|
|
9691
|
+
}
|
|
9692
|
+
)
|
|
9693
|
+
]
|
|
9694
|
+
},
|
|
9695
|
+
tab.id
|
|
9696
|
+
))
|
|
9697
|
+
}
|
|
9698
|
+
),
|
|
9699
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, padding: activeTab === "dependencies" ? "0" : "12px", overflow: "auto" }, children: [
|
|
9700
|
+
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(
|
|
9701
|
+
"button",
|
|
9702
|
+
{
|
|
9703
|
+
onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path),
|
|
9704
|
+
style: {
|
|
9705
|
+
display: "flex",
|
|
9706
|
+
alignItems: "center",
|
|
9707
|
+
gap: "8px",
|
|
9708
|
+
padding: "8px 12px",
|
|
9709
|
+
backgroundColor: theme2.colors.backgroundTertiary,
|
|
9710
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
9711
|
+
borderRadius: "6px",
|
|
9712
|
+
color: theme2.colors.text,
|
|
9713
|
+
cursor: "pointer",
|
|
9714
|
+
textAlign: "left"
|
|
9715
|
+
},
|
|
9716
|
+
children: [
|
|
9717
|
+
/* @__PURE__ */ jsx(Terminal, { size: 14, color: theme2.colors.accent }),
|
|
9718
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
9719
|
+
/* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: cmd.name }),
|
|
9720
|
+
/* @__PURE__ */ jsx(
|
|
9721
|
+
"div",
|
|
9722
|
+
{
|
|
9723
|
+
style: {
|
|
9724
|
+
fontSize: theme2.fontSizes[0],
|
|
9725
|
+
color: theme2.colors.textSecondary,
|
|
9726
|
+
fontFamily: "monospace",
|
|
9727
|
+
overflow: "hidden",
|
|
9728
|
+
textOverflow: "ellipsis",
|
|
9729
|
+
whiteSpace: "nowrap"
|
|
9730
|
+
},
|
|
9731
|
+
children: cmd.command
|
|
9732
|
+
}
|
|
9733
|
+
)
|
|
9734
|
+
] }),
|
|
9735
|
+
cmd.isLensCommand && /* @__PURE__ */ jsx(
|
|
9736
|
+
"span",
|
|
9737
|
+
{
|
|
9738
|
+
style: {
|
|
9739
|
+
padding: "2px 6px",
|
|
9740
|
+
backgroundColor: theme2.colors.accent + "20",
|
|
9741
|
+
color: theme2.colors.accent,
|
|
9742
|
+
borderRadius: "4px",
|
|
9743
|
+
fontSize: theme2.fontSizes[0]
|
|
9744
|
+
},
|
|
9745
|
+
children: cmd.lensId
|
|
9746
|
+
}
|
|
9747
|
+
),
|
|
9748
|
+
/* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme2.colors.textSecondary })
|
|
9749
|
+
]
|
|
9750
|
+
},
|
|
9751
|
+
idx
|
|
9752
|
+
)) }),
|
|
9753
|
+
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(
|
|
9754
|
+
"button",
|
|
9755
|
+
{
|
|
9756
|
+
onClick: () => onConfigClick == null ? void 0 : onConfigClick(config),
|
|
9757
|
+
style: {
|
|
9758
|
+
display: "flex",
|
|
9759
|
+
alignItems: "center",
|
|
9760
|
+
gap: "8px",
|
|
9761
|
+
padding: "8px 12px",
|
|
9762
|
+
backgroundColor: theme2.colors.backgroundTertiary,
|
|
9763
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
9764
|
+
borderRadius: "6px",
|
|
9765
|
+
color: theme2.colors.text,
|
|
9766
|
+
cursor: "pointer",
|
|
9767
|
+
textAlign: "left"
|
|
9768
|
+
},
|
|
9769
|
+
children: [
|
|
9770
|
+
/* @__PURE__ */ jsx(Settings, { size: 14, color: theme2.colors.textSecondary }),
|
|
9771
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|
|
9772
|
+
/* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: config.name }),
|
|
9773
|
+
/* @__PURE__ */ jsx(
|
|
9774
|
+
"div",
|
|
9775
|
+
{
|
|
9776
|
+
style: {
|
|
9777
|
+
fontSize: theme2.fontSizes[0],
|
|
9778
|
+
color: theme2.colors.textSecondary,
|
|
9779
|
+
fontFamily: "monospace"
|
|
9780
|
+
},
|
|
9781
|
+
children: config.path
|
|
9782
|
+
}
|
|
9783
|
+
)
|
|
9784
|
+
] }),
|
|
9785
|
+
config.isInline && /* @__PURE__ */ jsx(
|
|
9786
|
+
"span",
|
|
9787
|
+
{
|
|
9788
|
+
style: {
|
|
9789
|
+
padding: "2px 6px",
|
|
9790
|
+
backgroundColor: theme2.colors.textSecondary + "20",
|
|
9791
|
+
color: theme2.colors.textSecondary,
|
|
9792
|
+
borderRadius: "4px",
|
|
9793
|
+
fontSize: theme2.fontSizes[0]
|
|
9794
|
+
},
|
|
9795
|
+
children: "inline"
|
|
9796
|
+
}
|
|
9797
|
+
)
|
|
9798
|
+
]
|
|
9521
9799
|
},
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9800
|
+
idx
|
|
9801
|
+
)) }),
|
|
9802
|
+
activeTab === "dependencies" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
9803
|
+
dependencyItems.length === 0 ? /* @__PURE__ */ jsxs(
|
|
9804
|
+
"div",
|
|
9805
|
+
{
|
|
9806
|
+
style: {
|
|
9807
|
+
padding: "12px",
|
|
9808
|
+
color: theme2.colors.textSecondary,
|
|
9809
|
+
fontSize: theme2.fontSizes[1],
|
|
9810
|
+
display: "flex",
|
|
9811
|
+
alignItems: "center",
|
|
9812
|
+
justifyContent: "center",
|
|
9813
|
+
gap: "8px"
|
|
9814
|
+
},
|
|
9815
|
+
children: [
|
|
9816
|
+
/* @__PURE__ */ jsx(Package, { size: 16 }),
|
|
9817
|
+
"No dependencies"
|
|
9818
|
+
]
|
|
9819
|
+
}
|
|
9820
|
+
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9821
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "12px", borderBottom: `1px solid ${theme2.colors.border}` }, children: /* @__PURE__ */ jsx(
|
|
9822
|
+
FilterBar,
|
|
9525
9823
|
{
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
backgroundColor: `${badge.color}20`,
|
|
9532
|
-
color: badge.color
|
|
9533
|
-
},
|
|
9534
|
-
children: badge.text
|
|
9824
|
+
activeFilters,
|
|
9825
|
+
onToggleFilter: handleToggleFilter,
|
|
9826
|
+
searchQuery,
|
|
9827
|
+
onSearchChange: setSearchQuery,
|
|
9828
|
+
counts: depCounts
|
|
9535
9829
|
}
|
|
9536
|
-
),
|
|
9537
|
-
/* @__PURE__ */
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9830
|
+
) }),
|
|
9831
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, overflow: "auto", padding: "8px 12px" }, children: [
|
|
9832
|
+
/* @__PURE__ */ jsxs(
|
|
9833
|
+
"div",
|
|
9834
|
+
{
|
|
9835
|
+
style: {
|
|
9836
|
+
fontSize: theme2.fontSizes[0],
|
|
9837
|
+
color: theme2.colors.textSecondary,
|
|
9838
|
+
marginBottom: "8px"
|
|
9839
|
+
},
|
|
9840
|
+
children: [
|
|
9841
|
+
"Showing ",
|
|
9842
|
+
filteredDependencies.length,
|
|
9843
|
+
" of ",
|
|
9844
|
+
dependencyItems.length
|
|
9845
|
+
]
|
|
9846
|
+
}
|
|
9847
|
+
),
|
|
9848
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: filteredDependencies.length === 0 ? /* @__PURE__ */ jsx(
|
|
9849
|
+
"div",
|
|
9850
|
+
{
|
|
9851
|
+
style: {
|
|
9852
|
+
padding: "12px",
|
|
9853
|
+
textAlign: "center",
|
|
9854
|
+
color: theme2.colors.textSecondary,
|
|
9855
|
+
fontSize: theme2.fontSizes[1]
|
|
9856
|
+
},
|
|
9857
|
+
children: "No dependencies match your filters"
|
|
9858
|
+
}
|
|
9859
|
+
) : filteredDependencies.map((dep) => /* @__PURE__ */ jsx(
|
|
9860
|
+
DependencyRow,
|
|
9861
|
+
{
|
|
9862
|
+
dependency: dep
|
|
9544
9863
|
},
|
|
9545
|
-
|
|
9546
|
-
}
|
|
9547
|
-
)
|
|
9548
|
-
]
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
children: description
|
|
9560
|
-
}
|
|
9561
|
-
)
|
|
9562
|
-
]
|
|
9864
|
+
`${dep.name}-${dep.dependencyType}`
|
|
9865
|
+
)) })
|
|
9866
|
+
] })
|
|
9867
|
+
] }),
|
|
9868
|
+
/* @__PURE__ */ jsx(
|
|
9869
|
+
DependencyInfoModal,
|
|
9870
|
+
{
|
|
9871
|
+
isOpen: showInfoModal,
|
|
9872
|
+
onClose: () => setShowInfoModal(false)
|
|
9873
|
+
}
|
|
9874
|
+
)
|
|
9875
|
+
] })
|
|
9876
|
+
] })
|
|
9877
|
+
] });
|
|
9563
9878
|
}
|
|
9564
|
-
);
|
|
9565
|
-
const DependencyRow = ({ dependency }) => {
|
|
9566
|
-
const { theme: theme2 } = useTheme();
|
|
9567
|
-
const [isHovered, setIsHovered] = useState(false);
|
|
9568
|
-
const [copied, setCopied] = useState(false);
|
|
9569
|
-
const getDependencyTypeBadgeStyle = (type) => {
|
|
9570
|
-
const baseStyle = {
|
|
9571
|
-
padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
|
|
9572
|
-
borderRadius: `${theme2.radii[1]}px`,
|
|
9573
|
-
fontSize: `${theme2.fontSizes[0]}px`,
|
|
9574
|
-
fontWeight: theme2.fontWeights.medium,
|
|
9575
|
-
minWidth: "36px",
|
|
9576
|
-
textAlign: "center"
|
|
9577
|
-
};
|
|
9578
|
-
switch (type) {
|
|
9579
|
-
case "production":
|
|
9580
|
-
return {
|
|
9581
|
-
...baseStyle,
|
|
9582
|
-
backgroundColor: `${theme2.colors.primary}20`,
|
|
9583
|
-
color: theme2.colors.primary
|
|
9584
|
-
};
|
|
9585
|
-
case "development":
|
|
9586
|
-
return {
|
|
9587
|
-
...baseStyle,
|
|
9588
|
-
backgroundColor: `${theme2.colors.secondary}20`,
|
|
9589
|
-
color: theme2.colors.secondary
|
|
9590
|
-
};
|
|
9591
|
-
case "peer":
|
|
9592
|
-
return {
|
|
9593
|
-
...baseStyle,
|
|
9594
|
-
backgroundColor: `${theme2.colors.accent}20`,
|
|
9595
|
-
color: theme2.colors.accent
|
|
9596
|
-
};
|
|
9597
|
-
default:
|
|
9598
|
-
return {
|
|
9599
|
-
...baseStyle,
|
|
9600
|
-
backgroundColor: theme2.colors.backgroundLight,
|
|
9601
|
-
color: theme2.colors.textSecondary
|
|
9602
|
-
};
|
|
9603
|
-
}
|
|
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
|
-
};
|
|
9630
9879
|
return /* @__PURE__ */ jsxs(
|
|
9631
9880
|
"div",
|
|
9632
9881
|
{
|
|
9633
9882
|
style: {
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
justifyContent: "space-between",
|
|
9637
|
-
padding: `${theme2.space[2]}px ${theme2.space[3]}px`,
|
|
9638
|
-
backgroundColor: theme2.colors.background,
|
|
9639
|
-
borderRadius: `${theme2.radii[1]}px`,
|
|
9640
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
9883
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
9884
|
+
borderRadius: "8px",
|
|
9641
9885
|
border: `1px solid ${theme2.colors.border}`,
|
|
9642
|
-
|
|
9886
|
+
overflow: "hidden"
|
|
9643
9887
|
},
|
|
9644
|
-
onMouseEnter: () => setIsHovered(true),
|
|
9645
|
-
onMouseLeave: () => setIsHovered(false),
|
|
9646
9888
|
children: [
|
|
9647
9889
|
/* @__PURE__ */ jsxs(
|
|
9648
|
-
"
|
|
9890
|
+
"button",
|
|
9649
9891
|
{
|
|
9892
|
+
onClick: onToggle,
|
|
9650
9893
|
style: {
|
|
9894
|
+
width: "100%",
|
|
9651
9895
|
display: "flex",
|
|
9652
9896
|
alignItems: "center",
|
|
9653
|
-
gap:
|
|
9654
|
-
|
|
9655
|
-
|
|
9897
|
+
gap: "8px",
|
|
9898
|
+
padding: "12px 16px",
|
|
9899
|
+
backgroundColor: "transparent",
|
|
9900
|
+
border: "none",
|
|
9901
|
+
cursor: "pointer",
|
|
9902
|
+
color: theme2.colors.text,
|
|
9903
|
+
textAlign: "left"
|
|
9656
9904
|
},
|
|
9657
9905
|
children: [
|
|
9658
|
-
/* @__PURE__ */ jsx(
|
|
9659
|
-
/* @__PURE__ */ jsx(
|
|
9660
|
-
|
|
9906
|
+
isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 16, color: theme2.colors.textSecondary }) : /* @__PURE__ */ jsx(ChevronRight, { size: 16, color: theme2.colors.textSecondary }),
|
|
9907
|
+
/* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: pkg.packageData.packageManager, size: 18 }),
|
|
9908
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
9909
|
+
/* @__PURE__ */ jsx(
|
|
9910
|
+
"div",
|
|
9911
|
+
{
|
|
9912
|
+
style: {
|
|
9913
|
+
fontSize: theme2.fontSizes[2],
|
|
9914
|
+
fontWeight: 600,
|
|
9915
|
+
overflow: "hidden",
|
|
9916
|
+
textOverflow: "ellipsis",
|
|
9917
|
+
whiteSpace: "nowrap"
|
|
9918
|
+
},
|
|
9919
|
+
children: pkg.packageData.name
|
|
9920
|
+
}
|
|
9921
|
+
),
|
|
9922
|
+
pkg.packageData.version && /* @__PURE__ */ jsxs(
|
|
9923
|
+
"div",
|
|
9924
|
+
{
|
|
9925
|
+
style: {
|
|
9926
|
+
fontSize: theme2.fontSizes[0],
|
|
9927
|
+
color: theme2.colors.textSecondary
|
|
9928
|
+
},
|
|
9929
|
+
children: [
|
|
9930
|
+
"v",
|
|
9931
|
+
pkg.packageData.version
|
|
9932
|
+
]
|
|
9933
|
+
}
|
|
9934
|
+
)
|
|
9935
|
+
] }),
|
|
9936
|
+
pkg.packageData.path && /* @__PURE__ */ jsxs(
|
|
9937
|
+
"button",
|
|
9661
9938
|
{
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
overflow: "hidden",
|
|
9666
|
-
textOverflow: "ellipsis",
|
|
9667
|
-
whiteSpace: "nowrap"
|
|
9939
|
+
onClick: (e) => {
|
|
9940
|
+
e.stopPropagation();
|
|
9941
|
+
onPackageClick == null ? void 0 : onPackageClick(pkg.packageData.path);
|
|
9668
9942
|
},
|
|
9669
|
-
children: dependency.name
|
|
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
9943
|
style: {
|
|
9679
|
-
|
|
9944
|
+
display: "flex",
|
|
9945
|
+
alignItems: "center",
|
|
9946
|
+
gap: "4px",
|
|
9947
|
+
padding: "4px 8px",
|
|
9948
|
+
backgroundColor: theme2.colors.backgroundTertiary,
|
|
9949
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
9950
|
+
borderRadius: "4px",
|
|
9680
9951
|
color: theme2.colors.textSecondary,
|
|
9681
|
-
|
|
9682
|
-
|
|
9952
|
+
fontSize: theme2.fontSizes[0],
|
|
9953
|
+
cursor: "pointer"
|
|
9683
9954
|
},
|
|
9684
|
-
title: "
|
|
9685
|
-
children:
|
|
9955
|
+
title: "Open package folder",
|
|
9956
|
+
children: [
|
|
9957
|
+
/* @__PURE__ */ jsx(Folder, { size: 12 }),
|
|
9958
|
+
pkg.packageData.path || "/"
|
|
9959
|
+
]
|
|
9686
9960
|
}
|
|
9687
9961
|
)
|
|
9688
9962
|
]
|
|
9689
9963
|
}
|
|
9690
9964
|
),
|
|
9691
|
-
/* @__PURE__ */ jsxs(
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9965
|
+
isExpanded && /* @__PURE__ */ jsxs("div", { style: { borderTop: `1px solid ${theme2.colors.border}` }, children: [
|
|
9966
|
+
/* @__PURE__ */ jsx(
|
|
9967
|
+
"div",
|
|
9968
|
+
{
|
|
9969
|
+
style: {
|
|
9970
|
+
display: "flex",
|
|
9971
|
+
backgroundColor: theme2.colors.backgroundTertiary,
|
|
9972
|
+
borderBottom: `1px solid ${theme2.colors.border}`
|
|
9973
|
+
},
|
|
9974
|
+
children: [
|
|
9975
|
+
{ id: "commands", label: "Commands", count: commands.length },
|
|
9976
|
+
{ id: "configs", label: "Configs", count: configFiles.length },
|
|
9977
|
+
{ id: "dependencies", label: "Deps", count: dependencyItems.length }
|
|
9978
|
+
].map((tab) => /* @__PURE__ */ jsxs(
|
|
9701
9979
|
"button",
|
|
9702
9980
|
{
|
|
9703
|
-
|
|
9704
|
-
onClick: handleCopy,
|
|
9981
|
+
onClick: () => setActiveTab(tab.id),
|
|
9705
9982
|
style: {
|
|
9706
|
-
|
|
9707
|
-
|
|
9983
|
+
flex: 1,
|
|
9984
|
+
padding: "8px 12px",
|
|
9985
|
+
backgroundColor: activeTab === tab.id ? theme2.colors.backgroundSecondary : "transparent",
|
|
9986
|
+
border: "none",
|
|
9987
|
+
borderBottom: activeTab === tab.id ? `2px solid ${theme2.colors.accent}` : "2px solid transparent",
|
|
9988
|
+
color: activeTab === tab.id ? theme2.colors.text : theme2.colors.textSecondary,
|
|
9989
|
+
fontSize: theme2.fontSizes[1],
|
|
9990
|
+
cursor: "pointer",
|
|
9991
|
+
display: "flex",
|
|
9992
|
+
alignItems: "center",
|
|
9993
|
+
justifyContent: "center",
|
|
9994
|
+
gap: "6px"
|
|
9708
9995
|
},
|
|
9709
|
-
|
|
9710
|
-
|
|
9996
|
+
children: [
|
|
9997
|
+
tab.label,
|
|
9998
|
+
/* @__PURE__ */ jsx(
|
|
9999
|
+
"span",
|
|
10000
|
+
{
|
|
10001
|
+
style: {
|
|
10002
|
+
backgroundColor: theme2.colors.backgroundTertiary,
|
|
10003
|
+
padding: "1px 6px",
|
|
10004
|
+
borderRadius: "10px",
|
|
10005
|
+
fontSize: theme2.fontSizes[0]
|
|
10006
|
+
},
|
|
10007
|
+
children: tab.count
|
|
10008
|
+
}
|
|
10009
|
+
)
|
|
10010
|
+
]
|
|
10011
|
+
},
|
|
10012
|
+
tab.id
|
|
10013
|
+
))
|
|
10014
|
+
}
|
|
10015
|
+
),
|
|
10016
|
+
/* @__PURE__ */ jsxs("div", { style: { padding: activeTab === "dependencies" ? "0" : "12px", maxHeight: "300px", overflow: "auto" }, children: [
|
|
10017
|
+
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(
|
|
10018
|
+
"button",
|
|
10019
|
+
{
|
|
10020
|
+
onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path),
|
|
10021
|
+
style: {
|
|
10022
|
+
display: "flex",
|
|
10023
|
+
alignItems: "center",
|
|
10024
|
+
gap: "8px",
|
|
10025
|
+
padding: "8px 12px",
|
|
10026
|
+
backgroundColor: theme2.colors.backgroundTertiary,
|
|
10027
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
10028
|
+
borderRadius: "6px",
|
|
10029
|
+
color: theme2.colors.text,
|
|
10030
|
+
cursor: "pointer",
|
|
10031
|
+
textAlign: "left"
|
|
10032
|
+
},
|
|
10033
|
+
children: [
|
|
10034
|
+
/* @__PURE__ */ jsx(Terminal, { size: 14, color: theme2.colors.accent }),
|
|
10035
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
10036
|
+
/* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: cmd.name }),
|
|
10037
|
+
/* @__PURE__ */ jsx(
|
|
10038
|
+
"div",
|
|
10039
|
+
{
|
|
10040
|
+
style: {
|
|
10041
|
+
fontSize: theme2.fontSizes[0],
|
|
10042
|
+
color: theme2.colors.textSecondary,
|
|
10043
|
+
fontFamily: "monospace",
|
|
10044
|
+
overflow: "hidden",
|
|
10045
|
+
textOverflow: "ellipsis",
|
|
10046
|
+
whiteSpace: "nowrap"
|
|
10047
|
+
},
|
|
10048
|
+
children: cmd.command
|
|
10049
|
+
}
|
|
10050
|
+
)
|
|
10051
|
+
] }),
|
|
10052
|
+
cmd.isLensCommand && /* @__PURE__ */ jsx(
|
|
10053
|
+
"span",
|
|
10054
|
+
{
|
|
10055
|
+
style: {
|
|
10056
|
+
padding: "2px 6px",
|
|
10057
|
+
backgroundColor: theme2.colors.accent + "20",
|
|
10058
|
+
color: theme2.colors.accent,
|
|
10059
|
+
borderRadius: "4px",
|
|
10060
|
+
fontSize: theme2.fontSizes[0]
|
|
10061
|
+
},
|
|
10062
|
+
children: cmd.lensId
|
|
10063
|
+
}
|
|
10064
|
+
),
|
|
10065
|
+
/* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme2.colors.textSecondary })
|
|
10066
|
+
]
|
|
10067
|
+
},
|
|
10068
|
+
idx
|
|
10069
|
+
)) }),
|
|
10070
|
+
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(
|
|
10071
|
+
"button",
|
|
10072
|
+
{
|
|
10073
|
+
onClick: () => onConfigClick == null ? void 0 : onConfigClick(config),
|
|
10074
|
+
style: {
|
|
10075
|
+
display: "flex",
|
|
10076
|
+
alignItems: "center",
|
|
10077
|
+
gap: "8px",
|
|
10078
|
+
padding: "8px 12px",
|
|
10079
|
+
backgroundColor: theme2.colors.backgroundTertiary,
|
|
10080
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
10081
|
+
borderRadius: "6px",
|
|
10082
|
+
color: theme2.colors.text,
|
|
10083
|
+
cursor: "pointer",
|
|
10084
|
+
textAlign: "left"
|
|
10085
|
+
},
|
|
10086
|
+
children: [
|
|
10087
|
+
/* @__PURE__ */ jsx(Settings, { size: 14, color: theme2.colors.textSecondary }),
|
|
10088
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|
|
10089
|
+
/* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: config.name }),
|
|
10090
|
+
/* @__PURE__ */ jsx(
|
|
10091
|
+
"div",
|
|
10092
|
+
{
|
|
10093
|
+
style: {
|
|
10094
|
+
fontSize: theme2.fontSizes[0],
|
|
10095
|
+
color: theme2.colors.textSecondary,
|
|
10096
|
+
fontFamily: "monospace"
|
|
10097
|
+
},
|
|
10098
|
+
children: config.path
|
|
10099
|
+
}
|
|
10100
|
+
)
|
|
10101
|
+
] }),
|
|
10102
|
+
config.isInline && /* @__PURE__ */ jsx(
|
|
10103
|
+
"span",
|
|
10104
|
+
{
|
|
10105
|
+
style: {
|
|
10106
|
+
padding: "2px 6px",
|
|
10107
|
+
backgroundColor: theme2.colors.textSecondary + "20",
|
|
10108
|
+
color: theme2.colors.textSecondary,
|
|
10109
|
+
borderRadius: "4px",
|
|
10110
|
+
fontSize: theme2.fontSizes[0]
|
|
10111
|
+
},
|
|
10112
|
+
children: "inline"
|
|
10113
|
+
}
|
|
10114
|
+
)
|
|
10115
|
+
]
|
|
10116
|
+
},
|
|
10117
|
+
idx
|
|
10118
|
+
)) }),
|
|
10119
|
+
activeTab === "dependencies" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
10120
|
+
dependencyItems.length === 0 ? /* @__PURE__ */ jsxs(
|
|
10121
|
+
"div",
|
|
10122
|
+
{
|
|
10123
|
+
style: {
|
|
10124
|
+
padding: "12px",
|
|
10125
|
+
color: theme2.colors.textSecondary,
|
|
10126
|
+
fontSize: theme2.fontSizes[1],
|
|
10127
|
+
display: "flex",
|
|
10128
|
+
alignItems: "center",
|
|
10129
|
+
justifyContent: "center",
|
|
10130
|
+
gap: "8px"
|
|
10131
|
+
},
|
|
10132
|
+
children: [
|
|
10133
|
+
/* @__PURE__ */ jsx(Package, { size: 16 }),
|
|
10134
|
+
"No dependencies"
|
|
10135
|
+
]
|
|
9711
10136
|
}
|
|
9712
|
-
),
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
10137
|
+
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10138
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "12px", borderBottom: `1px solid ${theme2.colors.border}` }, children: /* @__PURE__ */ jsx(
|
|
10139
|
+
FilterBar,
|
|
10140
|
+
{
|
|
10141
|
+
activeFilters,
|
|
10142
|
+
onToggleFilter: handleToggleFilter,
|
|
10143
|
+
searchQuery,
|
|
10144
|
+
onSearchChange: setSearchQuery,
|
|
10145
|
+
counts: depCounts
|
|
10146
|
+
}
|
|
10147
|
+
) }),
|
|
10148
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, overflow: "auto", padding: "8px 12px" }, children: [
|
|
10149
|
+
/* @__PURE__ */ jsxs(
|
|
10150
|
+
"div",
|
|
10151
|
+
{
|
|
10152
|
+
style: {
|
|
10153
|
+
fontSize: theme2.fontSizes[0],
|
|
10154
|
+
color: theme2.colors.textSecondary,
|
|
10155
|
+
marginBottom: "8px"
|
|
10156
|
+
},
|
|
10157
|
+
children: [
|
|
10158
|
+
"Showing ",
|
|
10159
|
+
filteredDependencies.length,
|
|
10160
|
+
" of ",
|
|
10161
|
+
dependencyItems.length
|
|
10162
|
+
]
|
|
10163
|
+
}
|
|
10164
|
+
),
|
|
10165
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: filteredDependencies.length === 0 ? /* @__PURE__ */ jsx(
|
|
10166
|
+
"div",
|
|
10167
|
+
{
|
|
10168
|
+
style: {
|
|
10169
|
+
padding: "12px",
|
|
10170
|
+
textAlign: "center",
|
|
10171
|
+
color: theme2.colors.textSecondary,
|
|
10172
|
+
fontSize: theme2.fontSizes[1]
|
|
10173
|
+
},
|
|
10174
|
+
children: "No dependencies match your filters"
|
|
10175
|
+
}
|
|
10176
|
+
) : filteredDependencies.map((dep) => /* @__PURE__ */ jsx(
|
|
10177
|
+
DependencyRow,
|
|
10178
|
+
{
|
|
10179
|
+
dependency: dep
|
|
10180
|
+
},
|
|
10181
|
+
`${dep.name}-${dep.dependencyType}`
|
|
10182
|
+
)) })
|
|
10183
|
+
] })
|
|
10184
|
+
] }),
|
|
10185
|
+
/* @__PURE__ */ jsx(
|
|
10186
|
+
DependencyInfoModal,
|
|
10187
|
+
{
|
|
10188
|
+
isOpen: showInfoModal,
|
|
10189
|
+
onClose: () => setShowInfoModal(false)
|
|
10190
|
+
}
|
|
10191
|
+
)
|
|
10192
|
+
] })
|
|
10193
|
+
] })
|
|
10194
|
+
] })
|
|
9717
10195
|
]
|
|
9718
10196
|
}
|
|
9719
10197
|
);
|
|
9720
10198
|
};
|
|
9721
|
-
const
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
10199
|
+
const PackageCompositionPanelContent = ({
|
|
10200
|
+
packages,
|
|
10201
|
+
isLoading = false,
|
|
10202
|
+
emptyMessage = "No packages detected",
|
|
10203
|
+
onCommandClick,
|
|
10204
|
+
onConfigClick,
|
|
10205
|
+
onPackageClick
|
|
10206
|
+
}) => {
|
|
10207
|
+
const { theme: theme2 } = useTheme();
|
|
10208
|
+
const [selectedPackageId, setSelectedPackageId] = useState(null);
|
|
10209
|
+
const sortedPackages = useMemo(() => {
|
|
10210
|
+
return [...packages].sort((a, b) => {
|
|
10211
|
+
if (a.packageData.isMonorepoRoot && !b.packageData.isMonorepoRoot) return -1;
|
|
10212
|
+
if (!a.packageData.isMonorepoRoot && b.packageData.isMonorepoRoot) return 1;
|
|
10213
|
+
return a.packageData.path.localeCompare(b.packageData.path);
|
|
10214
|
+
});
|
|
10215
|
+
}, [packages]);
|
|
10216
|
+
const selectedPackage = useMemo(() => {
|
|
10217
|
+
if (!selectedPackageId) return null;
|
|
10218
|
+
return packages.find((p) => p.id === selectedPackageId) || null;
|
|
10219
|
+
}, [selectedPackageId, packages]);
|
|
10220
|
+
if (isLoading) {
|
|
10221
|
+
return /* @__PURE__ */ jsx(
|
|
10222
|
+
"div",
|
|
10223
|
+
{
|
|
10224
|
+
style: {
|
|
10225
|
+
padding: "20px",
|
|
10226
|
+
textAlign: "center",
|
|
10227
|
+
color: theme2.colors.textSecondary
|
|
10228
|
+
},
|
|
10229
|
+
children: "Loading packages..."
|
|
10230
|
+
}
|
|
10231
|
+
);
|
|
10232
|
+
}
|
|
10233
|
+
if (packages.length === 0) {
|
|
10234
|
+
return /* @__PURE__ */ jsx(
|
|
10235
|
+
"div",
|
|
10236
|
+
{
|
|
10237
|
+
style: {
|
|
10238
|
+
padding: "20px",
|
|
10239
|
+
textAlign: "center",
|
|
10240
|
+
color: theme2.colors.textSecondary
|
|
10241
|
+
},
|
|
10242
|
+
children: emptyMessage
|
|
10243
|
+
}
|
|
10244
|
+
);
|
|
10245
|
+
}
|
|
10246
|
+
if (packages.length === 1) {
|
|
10247
|
+
return /* @__PURE__ */ jsx(
|
|
10248
|
+
PackageCard,
|
|
10249
|
+
{
|
|
10250
|
+
pkg: packages[0],
|
|
10251
|
+
isExpanded: true,
|
|
10252
|
+
onToggle: () => {
|
|
10253
|
+
},
|
|
10254
|
+
onCommandClick,
|
|
10255
|
+
onConfigClick,
|
|
10256
|
+
onPackageClick,
|
|
10257
|
+
standalone: true
|
|
10258
|
+
}
|
|
10259
|
+
);
|
|
10260
|
+
}
|
|
10261
|
+
return /* @__PURE__ */ jsx(
|
|
10262
|
+
"div",
|
|
10263
|
+
{
|
|
10264
|
+
style: {
|
|
10265
|
+
display: "flex",
|
|
10266
|
+
flexDirection: "column",
|
|
10267
|
+
height: "100%",
|
|
10268
|
+
overflow: "hidden",
|
|
10269
|
+
position: "relative"
|
|
10270
|
+
},
|
|
10271
|
+
children: /* @__PURE__ */ jsxs(
|
|
10272
|
+
"div",
|
|
10273
|
+
{
|
|
10274
|
+
style: {
|
|
10275
|
+
display: "flex",
|
|
10276
|
+
width: "200%",
|
|
10277
|
+
height: "100%",
|
|
10278
|
+
transform: selectedPackage ? "translateX(-50%)" : "translateX(0)",
|
|
10279
|
+
transition: "transform 0.25s ease-in-out"
|
|
10280
|
+
},
|
|
10281
|
+
children: [
|
|
10282
|
+
/* @__PURE__ */ jsxs(
|
|
10283
|
+
"div",
|
|
10284
|
+
{
|
|
10285
|
+
style: {
|
|
10286
|
+
width: "50%",
|
|
10287
|
+
height: "100%",
|
|
10288
|
+
display: "flex",
|
|
10289
|
+
flexDirection: "column",
|
|
10290
|
+
overflow: "hidden"
|
|
10291
|
+
},
|
|
10292
|
+
children: [
|
|
10293
|
+
/* @__PURE__ */ jsxs(
|
|
10294
|
+
"div",
|
|
10295
|
+
{
|
|
10296
|
+
style: {
|
|
10297
|
+
padding: "12px 16px",
|
|
10298
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
10299
|
+
display: "flex",
|
|
10300
|
+
alignItems: "center",
|
|
10301
|
+
gap: "8px",
|
|
10302
|
+
flexShrink: 0
|
|
10303
|
+
},
|
|
10304
|
+
children: [
|
|
10305
|
+
/* @__PURE__ */ jsx(FileCode, { size: 16, color: theme2.colors.accent }),
|
|
10306
|
+
/* @__PURE__ */ jsxs("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary }, children: [
|
|
10307
|
+
packages.length,
|
|
10308
|
+
" packages"
|
|
10309
|
+
] })
|
|
10310
|
+
]
|
|
10311
|
+
}
|
|
10312
|
+
),
|
|
10313
|
+
/* @__PURE__ */ jsx(
|
|
10314
|
+
"div",
|
|
10315
|
+
{
|
|
10316
|
+
style: {
|
|
10317
|
+
flex: 1,
|
|
10318
|
+
overflow: "auto",
|
|
10319
|
+
padding: "12px",
|
|
10320
|
+
display: "flex",
|
|
10321
|
+
flexDirection: "column",
|
|
10322
|
+
gap: "8px"
|
|
10323
|
+
},
|
|
10324
|
+
children: sortedPackages.map((pkg) => /* @__PURE__ */ jsx(
|
|
10325
|
+
PackageSummaryCard,
|
|
10326
|
+
{
|
|
10327
|
+
pkg,
|
|
10328
|
+
allPackages: packages,
|
|
10329
|
+
onClick: () => setSelectedPackageId(pkg.id)
|
|
10330
|
+
},
|
|
10331
|
+
pkg.id
|
|
10332
|
+
))
|
|
10333
|
+
}
|
|
10334
|
+
)
|
|
10335
|
+
]
|
|
10336
|
+
}
|
|
10337
|
+
),
|
|
10338
|
+
/* @__PURE__ */ jsxs(
|
|
10339
|
+
"div",
|
|
10340
|
+
{
|
|
10341
|
+
style: {
|
|
10342
|
+
width: "50%",
|
|
10343
|
+
height: "100%",
|
|
10344
|
+
display: "flex",
|
|
10345
|
+
flexDirection: "column",
|
|
10346
|
+
overflow: "hidden"
|
|
10347
|
+
},
|
|
10348
|
+
children: [
|
|
10349
|
+
/* @__PURE__ */ jsx(
|
|
10350
|
+
"div",
|
|
10351
|
+
{
|
|
10352
|
+
style: {
|
|
10353
|
+
padding: "8px 12px",
|
|
10354
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
10355
|
+
display: "flex",
|
|
10356
|
+
alignItems: "center",
|
|
10357
|
+
gap: "8px",
|
|
10358
|
+
flexShrink: 0
|
|
10359
|
+
},
|
|
10360
|
+
children: /* @__PURE__ */ jsxs(
|
|
10361
|
+
"button",
|
|
10362
|
+
{
|
|
10363
|
+
onClick: () => setSelectedPackageId(null),
|
|
10364
|
+
style: {
|
|
10365
|
+
display: "flex",
|
|
10366
|
+
alignItems: "center",
|
|
10367
|
+
gap: "4px",
|
|
10368
|
+
padding: "4px 8px",
|
|
10369
|
+
backgroundColor: "transparent",
|
|
10370
|
+
border: "none",
|
|
10371
|
+
borderRadius: "4px",
|
|
10372
|
+
color: theme2.colors.accent,
|
|
10373
|
+
fontSize: theme2.fontSizes[1],
|
|
10374
|
+
cursor: "pointer",
|
|
10375
|
+
transition: "background-color 0.15s ease"
|
|
10376
|
+
},
|
|
10377
|
+
onMouseEnter: (e) => {
|
|
10378
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundTertiary;
|
|
10379
|
+
},
|
|
10380
|
+
onMouseLeave: (e) => {
|
|
10381
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
10382
|
+
},
|
|
10383
|
+
children: [
|
|
10384
|
+
/* @__PURE__ */ jsx(ChevronLeft, { size: 16 }),
|
|
10385
|
+
"All Packages"
|
|
10386
|
+
]
|
|
10387
|
+
}
|
|
10388
|
+
)
|
|
10389
|
+
}
|
|
10390
|
+
),
|
|
10391
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "hidden" }, children: selectedPackage && /* @__PURE__ */ jsx(
|
|
10392
|
+
PackageCard,
|
|
10393
|
+
{
|
|
10394
|
+
pkg: selectedPackage,
|
|
10395
|
+
isExpanded: true,
|
|
10396
|
+
onToggle: () => {
|
|
10397
|
+
},
|
|
10398
|
+
onCommandClick,
|
|
10399
|
+
onConfigClick,
|
|
10400
|
+
onPackageClick,
|
|
10401
|
+
standalone: true
|
|
10402
|
+
}
|
|
10403
|
+
) })
|
|
10404
|
+
]
|
|
10405
|
+
}
|
|
10406
|
+
)
|
|
10407
|
+
]
|
|
10408
|
+
}
|
|
10409
|
+
)
|
|
10410
|
+
}
|
|
10411
|
+
);
|
|
10412
|
+
};
|
|
10413
|
+
const PackageCompositionPanelPreview = () => {
|
|
9728
10414
|
const { theme: theme2 } = useTheme();
|
|
9729
|
-
const availableFilters = [
|
|
9730
|
-
...counts.peer > 0 ? ["peer"] : [],
|
|
9731
|
-
...counts.production > 0 ? ["production"] : [],
|
|
9732
|
-
...counts.development > 0 ? ["development"] : []
|
|
9733
|
-
];
|
|
9734
|
-
const showFilters = availableFilters.length > 1;
|
|
9735
10415
|
return /* @__PURE__ */ jsxs(
|
|
9736
10416
|
"div",
|
|
9737
10417
|
{
|
|
9738
10418
|
style: {
|
|
10419
|
+
padding: "12px",
|
|
10420
|
+
fontSize: "12px",
|
|
10421
|
+
color: theme2.colors.text,
|
|
9739
10422
|
display: "flex",
|
|
9740
10423
|
flexDirection: "column",
|
|
9741
|
-
gap:
|
|
10424
|
+
gap: "6px"
|
|
9742
10425
|
},
|
|
9743
10426
|
children: [
|
|
9744
|
-
/* @__PURE__ */ jsxs(
|
|
9745
|
-
"
|
|
9746
|
-
{
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
color: theme2.colors.textSecondary,
|
|
9761
|
-
pointerEvents: "none"
|
|
9762
|
-
}
|
|
9763
|
-
}
|
|
9764
|
-
),
|
|
9765
|
-
/* @__PURE__ */ jsx(
|
|
9766
|
-
"input",
|
|
9767
|
-
{
|
|
9768
|
-
type: "text",
|
|
9769
|
-
placeholder: "Search dependencies...",
|
|
9770
|
-
value: searchQuery,
|
|
9771
|
-
onChange: (e) => onSearchChange(e.target.value),
|
|
9772
|
-
style: {
|
|
9773
|
-
width: "100%",
|
|
9774
|
-
padding: `${theme2.space[2]}px ${theme2.space[5]}px`,
|
|
9775
|
-
borderRadius: `${theme2.radii[2]}px`,
|
|
9776
|
-
border: `1px solid ${theme2.colors.border}`,
|
|
9777
|
-
backgroundColor: theme2.colors.backgroundSecondary,
|
|
9778
|
-
color: theme2.colors.text,
|
|
9779
|
-
fontSize: `${theme2.fontSizes[1]}px`,
|
|
9780
|
-
fontFamily: theme2.fonts.body,
|
|
9781
|
-
outline: "none",
|
|
9782
|
-
transition: "all 0.2s"
|
|
9783
|
-
}
|
|
9784
|
-
}
|
|
9785
|
-
),
|
|
9786
|
-
searchQuery && /* @__PURE__ */ jsx(
|
|
9787
|
-
"button",
|
|
9788
|
-
{
|
|
9789
|
-
onClick: () => onSearchChange(""),
|
|
9790
|
-
style: {
|
|
9791
|
-
position: "absolute",
|
|
9792
|
-
right: `${theme2.space[2]}px`,
|
|
9793
|
-
padding: `${theme2.space[1]}px`,
|
|
9794
|
-
display: "flex",
|
|
9795
|
-
alignItems: "center",
|
|
9796
|
-
justifyContent: "center",
|
|
9797
|
-
backgroundColor: "transparent",
|
|
9798
|
-
border: "none",
|
|
9799
|
-
cursor: "pointer",
|
|
9800
|
-
borderRadius: `${theme2.radii[1]}px`
|
|
9801
|
-
},
|
|
9802
|
-
title: "Clear search",
|
|
9803
|
-
children: /* @__PURE__ */ jsx(X, { size: 14, color: theme2.colors.textSecondary })
|
|
9804
|
-
}
|
|
9805
|
-
)
|
|
9806
|
-
]
|
|
9807
|
-
}
|
|
9808
|
-
),
|
|
9809
|
-
showFilters && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: `${theme2.space[1]}px`, width: "100%" }, children: availableFilters.map((type) => {
|
|
9810
|
-
const isActive = activeFilters.has(type);
|
|
9811
|
-
return /* @__PURE__ */ jsxs(
|
|
9812
|
-
"button",
|
|
9813
|
-
{
|
|
9814
|
-
onClick: () => onToggleFilter(type),
|
|
9815
|
-
style: {
|
|
9816
|
-
flex: 1,
|
|
9817
|
-
padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
|
|
9818
|
-
fontSize: `${theme2.fontSizes[0]}px`,
|
|
9819
|
-
fontWeight: theme2.fontWeights.medium,
|
|
9820
|
-
fontFamily: theme2.fonts.body,
|
|
9821
|
-
borderRadius: `${theme2.radii[1]}px`,
|
|
9822
|
-
border: `1px solid ${isActive ? theme2.colors.primary : theme2.colors.border}`,
|
|
9823
|
-
backgroundColor: isActive ? `${theme2.colors.primary}20` : theme2.colors.backgroundSecondary,
|
|
9824
|
-
color: isActive ? theme2.colors.primary : theme2.colors.text,
|
|
9825
|
-
cursor: "pointer",
|
|
9826
|
-
transition: "all 0.2s"
|
|
9827
|
-
},
|
|
9828
|
-
children: [
|
|
9829
|
-
type === "production" ? "Prod" : type === "development" ? "Dev" : "Peer",
|
|
9830
|
-
/* @__PURE__ */ jsxs(
|
|
9831
|
-
"span",
|
|
9832
|
-
{
|
|
9833
|
-
style: { marginLeft: `${theme2.space[1]}px`, opacity: 0.7 },
|
|
9834
|
-
children: [
|
|
9835
|
-
"(",
|
|
9836
|
-
counts[type],
|
|
9837
|
-
")"
|
|
9838
|
-
]
|
|
9839
|
-
}
|
|
9840
|
-
)
|
|
9841
|
-
]
|
|
9842
|
-
},
|
|
9843
|
-
type
|
|
9844
|
-
);
|
|
9845
|
-
}) })
|
|
10427
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
10428
|
+
/* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: "npm", size: 14 }),
|
|
10429
|
+
/* @__PURE__ */ jsx("span", { children: "my-app" })
|
|
10430
|
+
] }),
|
|
10431
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingLeft: "8px" }, children: [
|
|
10432
|
+
/* @__PURE__ */ jsx(Terminal, { size: 12, color: theme2.colors.textSecondary }),
|
|
10433
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: "5 commands" })
|
|
10434
|
+
] }),
|
|
10435
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingLeft: "8px" }, children: [
|
|
10436
|
+
/* @__PURE__ */ jsx(Settings, { size: 12, color: theme2.colors.textSecondary }),
|
|
10437
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: "3 configs" })
|
|
10438
|
+
] }),
|
|
10439
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingLeft: "8px" }, children: [
|
|
10440
|
+
/* @__PURE__ */ jsx(Package, { size: 12, color: theme2.colors.textSecondary }),
|
|
10441
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: "12 deps" })
|
|
10442
|
+
] })
|
|
9846
10443
|
]
|
|
9847
10444
|
}
|
|
9848
10445
|
);
|
|
9849
10446
|
};
|
|
10447
|
+
const PackageCompositionPanel = ({ context }) => {
|
|
10448
|
+
var _a;
|
|
10449
|
+
const packagesSlice = context.getSlice("packages");
|
|
10450
|
+
const packages = ((_a = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a.packages) ?? [];
|
|
10451
|
+
const isLoading = (packagesSlice == null ? void 0 : packagesSlice.loading) || false;
|
|
10452
|
+
return /* @__PURE__ */ jsx(
|
|
10453
|
+
PackageCompositionPanelContent,
|
|
10454
|
+
{
|
|
10455
|
+
packages,
|
|
10456
|
+
isLoading
|
|
10457
|
+
}
|
|
10458
|
+
);
|
|
10459
|
+
};
|
|
9850
10460
|
const dependencyTypeOrder = {
|
|
9851
10461
|
peer: 0,
|
|
9852
10462
|
production: 1,
|