@industry-theme/repository-composition-panels 0.2.0 → 0.2.2

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.
@@ -1,5 +1,157 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import React2, { createContext, useContext, forwardRef, createElement, useRef, useEffect, memo, PureComponent, isValidElement, cloneElement, useLayoutEffect, useMemo, useState, useCallback, useImperativeHandle } from "react";
2
+ import React2, { createContext, useState, useEffect, useContext, forwardRef, createElement, useRef, memo, PureComponent, isValidElement, cloneElement, useLayoutEffect, useMemo, useCallback, useImperativeHandle } from "react";
3
+ var terminalTheme = {
4
+ space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
5
+ fonts: {
6
+ body: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
7
+ heading: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
8
+ monospace: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace'
9
+ },
10
+ fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
11
+ fontScale: 1,
12
+ fontWeights: {
13
+ body: 400,
14
+ heading: 500,
15
+ bold: 600,
16
+ light: 300,
17
+ medium: 500,
18
+ semibold: 600
19
+ },
20
+ lineHeights: {
21
+ body: 1.6,
22
+ heading: 1.3,
23
+ tight: 1.4,
24
+ relaxed: 1.8
25
+ },
26
+ breakpoints: ["640px", "768px", "1024px", "1280px"],
27
+ sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
28
+ radii: [0, 2, 4, 6, 8, 12, 16, 24],
29
+ shadows: [
30
+ "none",
31
+ "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
32
+ "0 2px 4px 0 rgba(0, 0, 0, 0.06)",
33
+ "0 4px 6px 0 rgba(0, 0, 0, 0.07)",
34
+ "0 8px 12px 0 rgba(0, 0, 0, 0.08)",
35
+ "0 16px 24px 0 rgba(0, 0, 0, 0.10)"
36
+ ],
37
+ zIndices: [0, 1, 10, 20, 30, 40, 50],
38
+ colors: {
39
+ text: "#e4e4e4",
40
+ background: "rgba(10, 10, 10, 0.85)",
41
+ primary: "#66b3ff",
42
+ secondary: "#80c4ff",
43
+ accent: "#66ff99",
44
+ highlight: "rgba(102, 179, 255, 0.15)",
45
+ muted: "rgba(26, 26, 26, 0.8)",
46
+ success: "#66ff99",
47
+ warning: "#ffcc66",
48
+ error: "#ff6666",
49
+ info: "#66b3ff",
50
+ border: "rgba(255, 255, 255, 0.1)",
51
+ backgroundSecondary: "rgba(15, 15, 15, 0.9)",
52
+ backgroundTertiary: "rgba(20, 20, 20, 0.9)",
53
+ backgroundLight: "rgba(255, 255, 255, 0.05)",
54
+ backgroundHover: "rgba(102, 179, 255, 0.08)",
55
+ surface: "rgba(15, 15, 15, 0.95)",
56
+ textSecondary: "rgba(255, 255, 255, 0.7)",
57
+ textTertiary: "rgba(255, 255, 255, 0.5)",
58
+ textMuted: "rgba(255, 255, 255, 0.4)",
59
+ highlightBg: "rgba(255, 235, 59, 0.25)",
60
+ highlightBorder: "rgba(255, 235, 59, 0.5)"
61
+ },
62
+ modes: {
63
+ light: {
64
+ text: "#1a1a1a",
65
+ background: "rgba(255, 255, 255, 0.9)",
66
+ primary: "#0066cc",
67
+ secondary: "#0052a3",
68
+ accent: "#00cc88",
69
+ highlight: "rgba(0, 102, 204, 0.08)",
70
+ muted: "rgba(245, 245, 245, 0.8)",
71
+ success: "#00cc88",
72
+ warning: "#ffaa00",
73
+ error: "#ff3333",
74
+ info: "#0066cc",
75
+ border: "rgba(0, 0, 0, 0.1)",
76
+ backgroundSecondary: "rgba(250, 250, 250, 0.9)",
77
+ backgroundTertiary: "rgba(245, 245, 245, 0.9)",
78
+ backgroundLight: "rgba(0, 0, 0, 0.02)",
79
+ backgroundHover: "rgba(0, 102, 204, 0.04)",
80
+ surface: "rgba(255, 255, 255, 0.95)",
81
+ textSecondary: "rgba(0, 0, 0, 0.6)",
82
+ textTertiary: "rgba(0, 0, 0, 0.4)",
83
+ textMuted: "rgba(0, 0, 0, 0.3)",
84
+ highlightBg: "rgba(255, 235, 59, 0.3)",
85
+ highlightBorder: "rgba(255, 235, 59, 0.6)"
86
+ }
87
+ },
88
+ buttons: {
89
+ primary: {
90
+ color: "white",
91
+ bg: "primary",
92
+ borderWidth: 0,
93
+ "&:hover": {
94
+ bg: "secondary"
95
+ }
96
+ },
97
+ secondary: {
98
+ color: "primary",
99
+ bg: "transparent",
100
+ borderWidth: 1,
101
+ borderStyle: "solid",
102
+ borderColor: "primary",
103
+ "&:hover": {
104
+ bg: "highlight"
105
+ }
106
+ },
107
+ ghost: {
108
+ color: "text",
109
+ bg: "transparent",
110
+ "&:hover": {
111
+ bg: "backgroundHover"
112
+ }
113
+ }
114
+ },
115
+ text: {
116
+ heading: {
117
+ fontFamily: "heading",
118
+ fontWeight: "heading",
119
+ lineHeight: "heading"
120
+ },
121
+ body: {
122
+ fontFamily: "body",
123
+ fontWeight: "body",
124
+ lineHeight: "body"
125
+ },
126
+ caption: {
127
+ fontSize: 1,
128
+ color: "textSecondary"
129
+ }
130
+ },
131
+ cards: {
132
+ primary: {
133
+ bg: "surface",
134
+ border: "1px solid",
135
+ borderColor: "border",
136
+ borderRadius: 1
137
+ },
138
+ secondary: {
139
+ bg: "backgroundSecondary",
140
+ border: "1px solid",
141
+ borderColor: "border",
142
+ borderRadius: 1
143
+ }
144
+ }
145
+ };
146
+ function getMode(theme2, mode) {
147
+ if (!mode || !theme2.modes || !theme2.modes[mode]) {
148
+ return theme2.colors;
149
+ }
150
+ return {
151
+ ...theme2.colors,
152
+ ...theme2.modes[mode]
153
+ };
154
+ }
3
155
  var ThemeContext;
4
156
  var getThemeContext = () => {
5
157
  if (typeof window !== "undefined") {
@@ -23,6 +175,46 @@ var useTheme = () => {
23
175
  }
24
176
  return context;
25
177
  };
178
+ var ThemeProvider = ({
179
+ children,
180
+ theme: customTheme = theme,
181
+ initialMode
182
+ }) => {
183
+ const [mode, setMode] = useState(initialMode);
184
+ const activeTheme = React2.useMemo(() => {
185
+ if (!mode || !customTheme.modes || !customTheme.modes[mode]) {
186
+ return customTheme;
187
+ }
188
+ return {
189
+ ...customTheme,
190
+ colors: getMode(customTheme, mode)
191
+ };
192
+ }, [customTheme, mode]);
193
+ useEffect(() => {
194
+ if (!initialMode) {
195
+ const savedMode = localStorage.getItem("principlemd-theme-mode");
196
+ if (savedMode) {
197
+ setMode(savedMode);
198
+ }
199
+ }
200
+ }, [initialMode]);
201
+ useEffect(() => {
202
+ if (mode) {
203
+ localStorage.setItem("principlemd-theme-mode", mode);
204
+ } else {
205
+ localStorage.removeItem("principlemd-theme-mode");
206
+ }
207
+ }, [mode]);
208
+ const value = {
209
+ theme: activeTheme,
210
+ mode,
211
+ setMode
212
+ };
213
+ return /* @__PURE__ */ React2.createElement(ThemeContextSingleton.Provider, {
214
+ value
215
+ }, children);
216
+ };
217
+ var theme = terminalTheme;
26
218
  /**
27
219
  * @license lucide-react v0.552.0 - ISC
28
220
  *
@@ -128,35 +320,136 @@ const createLucideIcon = (iconName, iconNode) => {
128
320
  * This source code is licensed under the ISC license.
129
321
  * See the LICENSE file in the root directory of this source tree.
130
322
  */
131
- const __iconNode$7 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
132
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$7);
323
+ const __iconNode$k = [
324
+ [
325
+ "path",
326
+ {
327
+ d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",
328
+ key: "lc1i9w"
329
+ }
330
+ ],
331
+ ["path", { d: "m7 16.5-4.74-2.85", key: "1o9zyk" }],
332
+ ["path", { d: "m7 16.5 5-3", key: "va8pkn" }],
333
+ ["path", { d: "M7 16.5v5.17", key: "jnp8gn" }],
334
+ [
335
+ "path",
336
+ {
337
+ d: "M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",
338
+ key: "8zsnat"
339
+ }
340
+ ],
341
+ ["path", { d: "m17 16.5-5-3", key: "8arw3v" }],
342
+ ["path", { d: "m17 16.5 4.74-2.85", key: "8rfmw" }],
343
+ ["path", { d: "M17 16.5v5.17", key: "k6z78m" }],
344
+ [
345
+ "path",
346
+ {
347
+ d: "M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",
348
+ key: "1xygjf"
349
+ }
350
+ ],
351
+ ["path", { d: "M12 8 7.26 5.15", key: "1vbdud" }],
352
+ ["path", { d: "m12 8 4.74-2.85", key: "3rx089" }],
353
+ ["path", { d: "M12 13.5V8", key: "1io7kd" }]
354
+ ];
355
+ const Boxes = createLucideIcon("boxes", __iconNode$k);
133
356
  /**
134
357
  * @license lucide-react v0.552.0 - ISC
135
358
  *
136
359
  * This source code is licensed under the ISC license.
137
360
  * See the LICENSE file in the root directory of this source tree.
138
361
  */
139
- const __iconNode$6 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
140
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$6);
362
+ const __iconNode$j = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
363
+ const Check = createLucideIcon("check", __iconNode$j);
141
364
  /**
142
365
  * @license lucide-react v0.552.0 - ISC
143
366
  *
144
367
  * This source code is licensed under the ISC license.
145
368
  * See the LICENSE file in the root directory of this source tree.
146
369
  */
147
- const __iconNode$5 = [
370
+ const __iconNode$i = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
371
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$i);
372
+ /**
373
+ * @license lucide-react v0.552.0 - ISC
374
+ *
375
+ * This source code is licensed under the ISC license.
376
+ * See the LICENSE file in the root directory of this source tree.
377
+ */
378
+ const __iconNode$h = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
379
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$h);
380
+ /**
381
+ * @license lucide-react v0.552.0 - ISC
382
+ *
383
+ * This source code is licensed under the ISC license.
384
+ * See the LICENSE file in the root directory of this source tree.
385
+ */
386
+ const __iconNode$g = [
148
387
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
149
388
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
150
389
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
151
390
  ];
152
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$5);
391
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$g);
153
392
  /**
154
393
  * @license lucide-react v0.552.0 - ISC
155
394
  *
156
395
  * This source code is licensed under the ISC license.
157
396
  * See the LICENSE file in the root directory of this source tree.
158
397
  */
159
- const __iconNode$4 = [
398
+ const __iconNode$f = [
399
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
400
+ ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
401
+ ["path", { d: "M12 17h.01", key: "p32p05" }]
402
+ ];
403
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$f);
404
+ /**
405
+ * @license lucide-react v0.552.0 - ISC
406
+ *
407
+ * This source code is licensed under the ISC license.
408
+ * See the LICENSE file in the root directory of this source tree.
409
+ */
410
+ const __iconNode$e = [
411
+ ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
412
+ ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
413
+ ];
414
+ const Copy = createLucideIcon("copy", __iconNode$e);
415
+ /**
416
+ * @license lucide-react v0.552.0 - ISC
417
+ *
418
+ * This source code is licensed under the ISC license.
419
+ * See the LICENSE file in the root directory of this source tree.
420
+ */
421
+ const __iconNode$d = [
422
+ ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
423
+ ["path", { d: "M10 14 21 3", key: "gplh6r" }],
424
+ ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
425
+ ];
426
+ const ExternalLink = createLucideIcon("external-link", __iconNode$d);
427
+ /**
428
+ * @license lucide-react v0.552.0 - ISC
429
+ *
430
+ * This source code is licensed under the ISC license.
431
+ * See the LICENSE file in the root directory of this source tree.
432
+ */
433
+ const __iconNode$c = [
434
+ [
435
+ "path",
436
+ {
437
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
438
+ key: "1oefj6"
439
+ }
440
+ ],
441
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
442
+ ["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
443
+ ["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
444
+ ];
445
+ const FileCode = createLucideIcon("file-code", __iconNode$c);
446
+ /**
447
+ * @license lucide-react v0.552.0 - ISC
448
+ *
449
+ * This source code is licensed under the ISC license.
450
+ * See the LICENSE file in the root directory of this source tree.
451
+ */
452
+ const __iconNode$b = [
160
453
  [
161
454
  "path",
162
455
  {
@@ -167,46 +460,123 @@ const __iconNode$4 = [
167
460
  ["path", { d: "M12 17h.01", key: "p32p05" }],
168
461
  ["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3", key: "mhlwft" }]
169
462
  ];
170
- const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$4);
463
+ const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$b);
171
464
  /**
172
465
  * @license lucide-react v0.552.0 - ISC
173
466
  *
174
467
  * This source code is licensed under the ISC license.
175
468
  * See the LICENSE file in the root directory of this source tree.
176
469
  */
177
- const __iconNode$3 = [
470
+ const __iconNode$a = [
471
+ [
472
+ "path",
473
+ {
474
+ d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
475
+ key: "1kt360"
476
+ }
477
+ ]
478
+ ];
479
+ const Folder = createLucideIcon("folder", __iconNode$a);
480
+ /**
481
+ * @license lucide-react v0.552.0 - ISC
482
+ *
483
+ * This source code is licensed under the ISC license.
484
+ * See the LICENSE file in the root directory of this source tree.
485
+ */
486
+ const __iconNode$9 = [
178
487
  ["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
179
488
  ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
180
489
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
181
490
  ["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
182
491
  ];
183
- const GitBranch = createLucideIcon("git-branch", __iconNode$3);
492
+ const GitBranch = createLucideIcon("git-branch", __iconNode$9);
184
493
  /**
185
494
  * @license lucide-react v0.552.0 - ISC
186
495
  *
187
496
  * This source code is licensed under the ISC license.
188
497
  * See the LICENSE file in the root directory of this source tree.
189
498
  */
190
- const __iconNode$2 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
191
- const Minus = createLucideIcon("minus", __iconNode$2);
499
+ const __iconNode$8 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
500
+ const Minus = createLucideIcon("minus", __iconNode$8);
192
501
  /**
193
502
  * @license lucide-react v0.552.0 - ISC
194
503
  *
195
504
  * This source code is licensed under the ISC license.
196
505
  * See the LICENSE file in the root directory of this source tree.
197
506
  */
198
- const __iconNode$1 = [
507
+ const __iconNode$7 = [
508
+ [
509
+ "path",
510
+ {
511
+ d: "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 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.73z",
512
+ key: "1a0edw"
513
+ }
514
+ ],
515
+ ["path", { d: "M12 22V12", key: "d0xqtd" }],
516
+ ["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
517
+ ["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }]
518
+ ];
519
+ const Package = createLucideIcon("package", __iconNode$7);
520
+ /**
521
+ * @license lucide-react v0.552.0 - ISC
522
+ *
523
+ * This source code is licensed under the ISC license.
524
+ * See the LICENSE file in the root directory of this source tree.
525
+ */
526
+ const __iconNode$6 = [
199
527
  ["path", { d: "M5 12h14", key: "1ays0h" }],
200
528
  ["path", { d: "M12 5v14", key: "s699le" }]
201
529
  ];
202
- const Plus = createLucideIcon("plus", __iconNode$1);
530
+ const Plus = createLucideIcon("plus", __iconNode$6);
203
531
  /**
204
532
  * @license lucide-react v0.552.0 - ISC
205
533
  *
206
534
  * This source code is licensed under the ISC license.
207
535
  * See the LICENSE file in the root directory of this source tree.
208
536
  */
209
- const __iconNode = [
537
+ const __iconNode$5 = [
538
+ ["path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z", key: "7g6ntu" }],
539
+ ["path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z", key: "ijws7r" }],
540
+ ["path", { d: "M7 21h10", key: "1b0cd5" }],
541
+ ["path", { d: "M12 3v18", key: "108xh3" }],
542
+ ["path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2", key: "3gwbw2" }]
543
+ ];
544
+ const Scale = createLucideIcon("scale", __iconNode$5);
545
+ /**
546
+ * @license lucide-react v0.552.0 - ISC
547
+ *
548
+ * This source code is licensed under the ISC license.
549
+ * See the LICENSE file in the root directory of this source tree.
550
+ */
551
+ const __iconNode$4 = [
552
+ ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
553
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
554
+ ];
555
+ const Search = createLucideIcon("search", __iconNode$4);
556
+ /**
557
+ * @license lucide-react v0.552.0 - ISC
558
+ *
559
+ * This source code is licensed under the ISC license.
560
+ * See the LICENSE file in the root directory of this source tree.
561
+ */
562
+ const __iconNode$3 = [
563
+ [
564
+ "path",
565
+ {
566
+ d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
567
+ key: "1i5ecw"
568
+ }
569
+ ],
570
+ ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
571
+ ];
572
+ const Settings = createLucideIcon("settings", __iconNode$3);
573
+ /**
574
+ * @license lucide-react v0.552.0 - ISC
575
+ *
576
+ * This source code is licensed under the ISC license.
577
+ * See the LICENSE file in the root directory of this source tree.
578
+ */
579
+ const __iconNode$2 = [
210
580
  ["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
211
581
  [
212
582
  "path",
@@ -216,7 +586,29 @@ const __iconNode = [
216
586
  }
217
587
  ]
218
588
  ];
219
- const SquarePen = createLucideIcon("square-pen", __iconNode);
589
+ const SquarePen = createLucideIcon("square-pen", __iconNode$2);
590
+ /**
591
+ * @license lucide-react v0.552.0 - ISC
592
+ *
593
+ * This source code is licensed under the ISC license.
594
+ * See the LICENSE file in the root directory of this source tree.
595
+ */
596
+ const __iconNode$1 = [
597
+ ["path", { d: "M12 19h8", key: "baeox8" }],
598
+ ["path", { d: "m4 17 6-6-6-6", key: "1yngyt" }]
599
+ ];
600
+ const Terminal = createLucideIcon("terminal", __iconNode$1);
601
+ /**
602
+ * @license lucide-react v0.552.0 - ISC
603
+ *
604
+ * This source code is licensed under the ISC license.
605
+ * See the LICENSE file in the root directory of this source tree.
606
+ */
607
+ const __iconNode = [
608
+ ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
609
+ ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
610
+ ];
611
+ const X = createLucideIcon("x", __iconNode);
220
612
  function getDefaultExportFromCjs(x) {
221
613
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
222
614
  }
@@ -7404,7 +7796,7 @@ function TreeNode({
7404
7796
  node,
7405
7797
  style,
7406
7798
  dragHandle,
7407
- theme,
7799
+ theme: theme2,
7408
7800
  rightContent,
7409
7801
  extraContent,
7410
7802
  isSelectedDirectory = false,
@@ -7418,14 +7810,14 @@ function TreeNode({
7418
7810
  style: { marginRight: "4px", display: "flex", alignItems: "center" }
7419
7811
  }, node.isOpen ? /* @__PURE__ */ React2.createElement(ChevronDown, {
7420
7812
  size: 16,
7421
- color: theme.colors.text
7813
+ color: theme2.colors.text
7422
7814
  }) : /* @__PURE__ */ React2.createElement(ChevronRight, {
7423
7815
  size: 16,
7424
- color: theme.colors.text
7816
+ color: theme2.colors.text
7425
7817
  })) : null;
7426
- const backgroundColor = node.isSelected ? `${theme.colors.primary}20` : isSelectedDirectory ? `${theme.colors.primary}15` : isHovered ? `${theme.colors.text}10` : "transparent";
7427
- const border = node.isSelected ? `1px solid ${theme.colors.primary}` : "1px solid transparent";
7428
- const color = nameColor ? nameColor : node.isSelected || isSelectedDirectory ? theme.colors.primary : theme.colors.text;
7818
+ const backgroundColor = node.isSelected ? `${theme2.colors.primary}20` : isSelectedDirectory ? `${theme2.colors.primary}15` : isHovered ? `${theme2.colors.text}10` : "transparent";
7819
+ const border = node.isSelected ? `1px solid ${theme2.colors.primary}` : "1px solid transparent";
7820
+ const color = nameColor ? nameColor : node.isSelected || isSelectedDirectory ? theme2.colors.primary : theme2.colors.text;
7429
7821
  return /* @__PURE__ */ React2.createElement("div", {
7430
7822
  style: {
7431
7823
  ...style,
@@ -7467,7 +7859,7 @@ function TreeNode({
7467
7859
  style: { flexShrink: 0 }
7468
7860
  }, rightContent));
7469
7861
  }
7470
- var getGitStatusDisplay2 = (status, theme) => {
7862
+ var getGitStatusDisplay2 = (status, theme2) => {
7471
7863
  switch (status) {
7472
7864
  case "M":
7473
7865
  case "MM":
@@ -7475,7 +7867,7 @@ var getGitStatusDisplay2 = (status, theme) => {
7475
7867
  icon: /* @__PURE__ */ React2.createElement(SquarePen, {
7476
7868
  size: 14
7477
7869
  }),
7478
- color: theme.colors.primary || "#007bff",
7870
+ color: theme2.colors.primary || "#007bff",
7479
7871
  label: "Modified"
7480
7872
  };
7481
7873
  case "A":
@@ -7600,7 +7992,7 @@ var countVisibleNodes2 = (nodes, openByDefault) => {
7600
7992
  };
7601
7993
  var GitStatusFileTree = ({
7602
7994
  fileTree,
7603
- theme,
7995
+ theme: theme2,
7604
7996
  gitStatusData,
7605
7997
  selectedDirectories = [],
7606
7998
  selectedFile,
@@ -7623,12 +8015,12 @@ var GitStatusFileTree = ({
7623
8015
  }, [gitStatusData]);
7624
8016
  const NodeRenderer = (props) => {
7625
8017
  const { node } = props;
7626
- const gitDisplay = node.data.gitStatus ? getGitStatusDisplay2(node.data.gitStatus, theme) : null;
8018
+ const gitDisplay = node.data.gitStatus ? getGitStatusDisplay2(node.data.gitStatus, theme2) : null;
7627
8019
  let nameColor;
7628
8020
  if (gitDisplay) {
7629
8021
  nameColor = gitDisplay.color;
7630
8022
  } else if (node.data.hasChangedChildren) {
7631
- const baseColor = theme.colors.primary || "#007bff";
8023
+ const baseColor = theme2.colors.primary || "#007bff";
7632
8024
  nameColor = baseColor + "80";
7633
8025
  }
7634
8026
  const rightContent = gitDisplay ? /* @__PURE__ */ React2.createElement("div", {
@@ -7648,7 +8040,7 @@ var GitStatusFileTree = ({
7648
8040
  }, node.data.gitStatus)) : null;
7649
8041
  return /* @__PURE__ */ React2.createElement(TreeNode, {
7650
8042
  ...props,
7651
- theme,
8043
+ theme: theme2,
7652
8044
  rightContent,
7653
8045
  nameColor,
7654
8046
  horizontalNodePadding,
@@ -7689,9 +8081,9 @@ var GitStatusFileTree = ({
7689
8081
  return /* @__PURE__ */ React2.createElement("div", {
7690
8082
  ref: containerRef,
7691
8083
  style: {
7692
- backgroundColor: transparentBackground ? "transparent" : theme.colors.background,
7693
- color: theme.colors.text,
7694
- fontFamily: theme.fonts.body,
8084
+ backgroundColor: transparentBackground ? "transparent" : theme2.colors.background,
8085
+ color: theme2.colors.text,
8086
+ fontFamily: theme2.fonts.body,
7695
8087
  ...autoHeight ? {} : { height: "100%" }
7696
8088
  }
7697
8089
  }, /* @__PURE__ */ React2.createElement(Tree, {
@@ -7706,11 +8098,11 @@ var GitStatusFileTree = ({
7706
8098
  };
7707
8099
  class _ {
7708
8100
  static buildTreeFromPaths(j, k = "") {
7709
- let q = k.endsWith("/") ? k.slice(0, -1) : k, E = /* @__PURE__ */ new Map(), J = [], O = [], X = /* @__PURE__ */ new Set();
8101
+ let q = k.endsWith("/") ? k.slice(0, -1) : k, E = /* @__PURE__ */ new Map(), J = [], O = [], X2 = /* @__PURE__ */ new Set();
7710
8102
  j.forEach((K) => {
7711
8103
  let Q = K.split("/");
7712
- for (let W = 1; W < Q.length; W++) X.add(Q.slice(0, W).join("/"));
7713
- }), Array.from(X).forEach((K) => {
8104
+ for (let W = 1; W < Q.length; W++) X2.add(Q.slice(0, W).join("/"));
8105
+ }), Array.from(X2).forEach((K) => {
7714
8106
  let Q = K.split("/"), W = Q[Q.length - 1] || "", Y = Q.length - 1, M = { path: K, name: W, children: [], fileCount: 0, totalSize: 0, depth: Y, relativePath: this.calculateRelativePath(K, q) };
7715
8107
  E.set(K, M), O.push(M);
7716
8108
  }), j.forEach((K) => {
@@ -7718,7 +8110,7 @@ class _ {
7718
8110
  J.push(A);
7719
8111
  let H = E.get(M);
7720
8112
  if (H && "children" in H) H.children.push(A), H.fileCount++;
7721
- }), Array.from(X).sort((K, Q) => Q.length - K.length).forEach((K) => {
8113
+ }), Array.from(X2).sort((K, Q) => Q.length - K.length).forEach((K) => {
7722
8114
  let Q = K.split("/");
7723
8115
  if (Q.length > 1) {
7724
8116
  let W = Q.slice(0, -1).join("/"), Y = E.get(W), M = E.get(K);
@@ -7750,12 +8142,12 @@ class _ {
7750
8142
  if (W && Y) W.children.push(Y), W.fileCount += Y.fileCount, W.totalSize += Y.totalSize;
7751
8143
  }
7752
8144
  });
7753
- let X = q ? q.split("/").pop() || "root" : "root", $ = [];
8145
+ let X2 = q ? q.split("/").pop() || "root" : "root", $ = [];
7754
8146
  return J.forEach((V) => {
7755
8147
  if (V.path.split("/").length === 1) $.push(V);
7756
8148
  }), j.forEach((V) => {
7757
8149
  if (V.path.split("/").length === 1) $.push(V);
7758
- }), { root: { path: q || ".", name: X, children: $, fileCount: j.length, totalSize: j.reduce((V, K) => V + (K.size || 0), 0), depth: 0, relativePath: "" }, allFiles: j, allDirectories: J };
8150
+ }), { root: { path: q || ".", name: X2, children: $, fileCount: j.length, totalSize: j.reduce((V, K) => V + (K.size || 0), 0), depth: 0, relativePath: "" }, allFiles: j, allDirectories: J };
7759
8151
  }
7760
8152
  static calculateStats(j, k) {
7761
8153
  return { totalFiles: j.length, totalDirectories: k.length, totalSize: j.reduce((q, E) => q + (E.size || 0), 0), maxDepth: this.calculateMaxDepth(k) };
@@ -7811,8 +8203,8 @@ class G {
7811
8203
  }
7812
8204
  class N extends G {
7813
8205
  build(j) {
7814
- let { files: k, rootPath: q = "" } = j, { root: E, allFiles: J, allDirectories: O } = _.buildTreeFromPaths(k, q), X = _.calculateStats(J, O);
7815
- return { sha: this.calculateSha(j), metadata: this.generateMetadata(j), root: E, allFiles: J, allDirectories: O, stats: X };
8206
+ let { files: k, rootPath: q = "" } = j, { root: E, allFiles: J, allDirectories: O } = _.buildTreeFromPaths(k, q), X2 = _.calculateStats(J, O);
8207
+ return { sha: this.calculateSha(j), metadata: this.generateMetadata(j), root: E, allFiles: J, allDirectories: O, stats: X2 };
7816
8208
  }
7817
8209
  generateMetadata(j) {
7818
8210
  let { files: k, rootPath: q = "" } = j, E = this.calculateSha(j);
@@ -7832,7 +8224,7 @@ const GitChangesPanelContent = ({
7832
8224
  loadingMessage = "Loading git changes...",
7833
8225
  selectedFile
7834
8226
  }) => {
7835
- const { theme } = useTheme();
8227
+ const { theme: theme2 } = useTheme();
7836
8228
  const hasChanges = gitStatus.staged.length > 0 || gitStatus.unstaged.length > 0 || gitStatus.untracked.length > 0 || gitStatus.deleted.length > 0;
7837
8229
  const [showFullTree, setShowFullTree] = useState(false);
7838
8230
  const userHasToggledView = useRef(false);
@@ -7938,7 +8330,7 @@ const GitChangesPanelContent = ({
7938
8330
  style: {
7939
8331
  display: "flex",
7940
8332
  alignItems: "stretch",
7941
- backgroundColor: theme.colors.backgroundTertiary,
8333
+ backgroundColor: theme2.colors.backgroundTertiary,
7942
8334
  width: "100%"
7943
8335
  },
7944
8336
  children: [
@@ -7952,10 +8344,10 @@ const GitChangesPanelContent = ({
7952
8344
  style: {
7953
8345
  flex: 1,
7954
8346
  padding: "6px 12px",
7955
- fontSize: theme.fontSizes[1],
7956
- backgroundColor: showFullTree ? theme.colors.backgroundSecondary : "transparent",
7957
- color: showFullTree ? theme.colors.text : theme.colors.textSecondary,
7958
- border: showFullTree ? `1px solid ${theme.colors.border}` : "1px solid transparent",
8347
+ fontSize: theme2.fontSizes[1],
8348
+ backgroundColor: showFullTree ? theme2.colors.backgroundSecondary : "transparent",
8349
+ color: showFullTree ? theme2.colors.text : theme2.colors.textSecondary,
8350
+ border: showFullTree ? `1px solid ${theme2.colors.border}` : "1px solid transparent",
7959
8351
  cursor: "pointer",
7960
8352
  fontWeight: showFullTree ? 600 : 400,
7961
8353
  transition: "all 0.2s"
@@ -7973,10 +8365,10 @@ const GitChangesPanelContent = ({
7973
8365
  style: {
7974
8366
  flex: 1,
7975
8367
  padding: "6px 12px",
7976
- fontSize: theme.fontSizes[1],
7977
- backgroundColor: !showFullTree ? theme.colors.backgroundSecondary : "transparent",
7978
- color: !showFullTree ? theme.colors.text : theme.colors.textSecondary,
7979
- border: !showFullTree ? `1px solid ${theme.colors.border}` : "1px solid transparent",
8368
+ fontSize: theme2.fontSizes[1],
8369
+ backgroundColor: !showFullTree ? theme2.colors.backgroundSecondary : "transparent",
8370
+ color: !showFullTree ? theme2.colors.text : theme2.colors.textSecondary,
8371
+ border: !showFullTree ? `1px solid ${theme2.colors.border}` : "1px solid transparent",
7980
8372
  cursor: "pointer",
7981
8373
  fontWeight: !showFullTree ? 600 : 400,
7982
8374
  transition: "all 0.2s"
@@ -7995,7 +8387,7 @@ const GitChangesPanelContent = ({
7995
8387
  style: {
7996
8388
  padding: "20px",
7997
8389
  textAlign: "center",
7998
- color: theme.colors.textSecondary
8390
+ color: theme2.colors.textSecondary
7999
8391
  },
8000
8392
  children: loadingMessage
8001
8393
  }
@@ -8008,7 +8400,7 @@ const GitChangesPanelContent = ({
8008
8400
  style: {
8009
8401
  padding: "20px",
8010
8402
  textAlign: "center",
8011
- color: theme.colors.textSecondary
8403
+ color: theme2.colors.textSecondary
8012
8404
  },
8013
8405
  children: emptyMessage
8014
8406
  }
@@ -8021,7 +8413,7 @@ const GitChangesPanelContent = ({
8021
8413
  GitStatusFileTree,
8022
8414
  {
8023
8415
  fileTree: gitChangesData.tree,
8024
- theme,
8416
+ theme: theme2,
8025
8417
  gitStatusData: gitChangesData.statusData,
8026
8418
  onFileSelect: handleFileSelect,
8027
8419
  selectedFile,
@@ -8033,19 +8425,19 @@ const GitChangesPanelContent = ({
8033
8425
  );
8034
8426
  };
8035
8427
  return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
8036
- /* @__PURE__ */ jsx("div", { style: { borderBottom: `1px solid ${theme.colors.border}` }, children: /* @__PURE__ */ jsx(ToggleButtons, {}) }),
8428
+ /* @__PURE__ */ jsx("div", { style: { borderBottom: `1px solid ${theme2.colors.border}` }, children: /* @__PURE__ */ jsx(ToggleButtons, {}) }),
8037
8429
  /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ jsx(Content, {}) })
8038
8430
  ] });
8039
8431
  };
8040
8432
  const GitChangesPanelPreview = () => {
8041
- const { theme } = useTheme();
8433
+ const { theme: theme2 } = useTheme();
8042
8434
  return /* @__PURE__ */ jsxs(
8043
8435
  "div",
8044
8436
  {
8045
8437
  style: {
8046
8438
  padding: "12px",
8047
8439
  fontSize: "12px",
8048
- color: theme.colors.text,
8440
+ color: theme2.colors.text,
8049
8441
  display: "flex",
8050
8442
  flexDirection: "column",
8051
8443
  gap: "6px"
@@ -8123,6 +8515,1322 @@ const GitChangesPanel = ({ context }) => {
8123
8515
  }
8124
8516
  );
8125
8517
  };
8518
+ const PackageCard = ({
8519
+ pkg,
8520
+ isExpanded,
8521
+ onToggle,
8522
+ onCommandClick,
8523
+ onConfigClick,
8524
+ onPackageClick
8525
+ }) => {
8526
+ const { theme: theme2 } = useTheme();
8527
+ const [activeTab, setActiveTab] = useState("commands");
8528
+ const configFiles = useMemo(() => {
8529
+ if (!pkg.configFiles) return [];
8530
+ return Object.entries(pkg.configFiles).filter(([, config]) => config == null ? void 0 : config.exists).map(([name, config]) => ({ name, ...config }));
8531
+ }, [pkg.configFiles]);
8532
+ const commands = pkg.packageData.availableCommands || [];
8533
+ return /* @__PURE__ */ jsxs(
8534
+ "div",
8535
+ {
8536
+ style: {
8537
+ backgroundColor: theme2.colors.backgroundSecondary,
8538
+ borderRadius: "8px",
8539
+ border: `1px solid ${theme2.colors.border}`,
8540
+ overflow: "hidden"
8541
+ },
8542
+ children: [
8543
+ /* @__PURE__ */ jsxs(
8544
+ "button",
8545
+ {
8546
+ onClick: onToggle,
8547
+ style: {
8548
+ width: "100%",
8549
+ display: "flex",
8550
+ alignItems: "center",
8551
+ gap: "8px",
8552
+ padding: "12px 16px",
8553
+ backgroundColor: "transparent",
8554
+ border: "none",
8555
+ cursor: "pointer",
8556
+ color: theme2.colors.text,
8557
+ textAlign: "left"
8558
+ },
8559
+ children: [
8560
+ isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 16, color: theme2.colors.textSecondary }) : /* @__PURE__ */ jsx(ChevronRight, { size: 16, color: theme2.colors.textSecondary }),
8561
+ /* @__PURE__ */ jsx(Package, { size: 18, color: theme2.colors.accent }),
8562
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
8563
+ /* @__PURE__ */ jsx(
8564
+ "div",
8565
+ {
8566
+ style: {
8567
+ fontSize: theme2.fontSizes[2],
8568
+ fontWeight: 600,
8569
+ overflow: "hidden",
8570
+ textOverflow: "ellipsis",
8571
+ whiteSpace: "nowrap"
8572
+ },
8573
+ children: pkg.packageData.name
8574
+ }
8575
+ ),
8576
+ pkg.packageData.version && /* @__PURE__ */ jsxs(
8577
+ "div",
8578
+ {
8579
+ style: {
8580
+ fontSize: theme2.fontSizes[0],
8581
+ color: theme2.colors.textSecondary
8582
+ },
8583
+ children: [
8584
+ "v",
8585
+ pkg.packageData.version
8586
+ ]
8587
+ }
8588
+ )
8589
+ ] }),
8590
+ pkg.packageData.path && /* @__PURE__ */ jsxs(
8591
+ "button",
8592
+ {
8593
+ onClick: (e) => {
8594
+ e.stopPropagation();
8595
+ onPackageClick == null ? void 0 : onPackageClick(pkg.packageData.path);
8596
+ },
8597
+ style: {
8598
+ display: "flex",
8599
+ alignItems: "center",
8600
+ gap: "4px",
8601
+ padding: "4px 8px",
8602
+ backgroundColor: theme2.colors.backgroundTertiary,
8603
+ border: `1px solid ${theme2.colors.border}`,
8604
+ borderRadius: "4px",
8605
+ color: theme2.colors.textSecondary,
8606
+ fontSize: theme2.fontSizes[0],
8607
+ cursor: "pointer"
8608
+ },
8609
+ title: "Open package folder",
8610
+ children: [
8611
+ /* @__PURE__ */ jsx(Folder, { size: 12 }),
8612
+ pkg.packageData.path || "/"
8613
+ ]
8614
+ }
8615
+ )
8616
+ ]
8617
+ }
8618
+ ),
8619
+ isExpanded && /* @__PURE__ */ jsxs("div", { style: { borderTop: `1px solid ${theme2.colors.border}` }, children: [
8620
+ /* @__PURE__ */ jsx(
8621
+ "div",
8622
+ {
8623
+ style: {
8624
+ display: "flex",
8625
+ backgroundColor: theme2.colors.backgroundTertiary,
8626
+ borderBottom: `1px solid ${theme2.colors.border}`
8627
+ },
8628
+ children: [
8629
+ { id: "commands", label: "Commands", count: commands.length },
8630
+ { id: "configs", label: "Configs", count: configFiles.length }
8631
+ ].map((tab) => /* @__PURE__ */ jsxs(
8632
+ "button",
8633
+ {
8634
+ onClick: () => setActiveTab(tab.id),
8635
+ style: {
8636
+ flex: 1,
8637
+ padding: "8px 12px",
8638
+ backgroundColor: activeTab === tab.id ? theme2.colors.backgroundSecondary : "transparent",
8639
+ border: "none",
8640
+ borderBottom: activeTab === tab.id ? `2px solid ${theme2.colors.accent}` : "2px solid transparent",
8641
+ color: activeTab === tab.id ? theme2.colors.text : theme2.colors.textSecondary,
8642
+ fontSize: theme2.fontSizes[1],
8643
+ cursor: "pointer",
8644
+ display: "flex",
8645
+ alignItems: "center",
8646
+ justifyContent: "center",
8647
+ gap: "6px"
8648
+ },
8649
+ children: [
8650
+ tab.label,
8651
+ /* @__PURE__ */ jsx(
8652
+ "span",
8653
+ {
8654
+ style: {
8655
+ backgroundColor: theme2.colors.backgroundTertiary,
8656
+ padding: "1px 6px",
8657
+ borderRadius: "10px",
8658
+ fontSize: theme2.fontSizes[0]
8659
+ },
8660
+ children: tab.count
8661
+ }
8662
+ )
8663
+ ]
8664
+ },
8665
+ tab.id
8666
+ ))
8667
+ }
8668
+ ),
8669
+ /* @__PURE__ */ jsxs("div", { style: { padding: "12px", maxHeight: "300px", overflow: "auto" }, children: [
8670
+ 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(
8671
+ "button",
8672
+ {
8673
+ onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path),
8674
+ style: {
8675
+ display: "flex",
8676
+ alignItems: "center",
8677
+ gap: "8px",
8678
+ padding: "8px 12px",
8679
+ backgroundColor: theme2.colors.backgroundTertiary,
8680
+ border: `1px solid ${theme2.colors.border}`,
8681
+ borderRadius: "6px",
8682
+ color: theme2.colors.text,
8683
+ cursor: "pointer",
8684
+ textAlign: "left"
8685
+ },
8686
+ children: [
8687
+ /* @__PURE__ */ jsx(Terminal, { size: 14, color: theme2.colors.accent }),
8688
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
8689
+ /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: cmd.name }),
8690
+ /* @__PURE__ */ jsx(
8691
+ "div",
8692
+ {
8693
+ style: {
8694
+ fontSize: theme2.fontSizes[0],
8695
+ color: theme2.colors.textSecondary,
8696
+ fontFamily: "monospace",
8697
+ overflow: "hidden",
8698
+ textOverflow: "ellipsis",
8699
+ whiteSpace: "nowrap"
8700
+ },
8701
+ children: cmd.command
8702
+ }
8703
+ )
8704
+ ] }),
8705
+ cmd.isLensCommand && /* @__PURE__ */ jsx(
8706
+ "span",
8707
+ {
8708
+ style: {
8709
+ padding: "2px 6px",
8710
+ backgroundColor: theme2.colors.accent + "20",
8711
+ color: theme2.colors.accent,
8712
+ borderRadius: "4px",
8713
+ fontSize: theme2.fontSizes[0]
8714
+ },
8715
+ children: cmd.lensId
8716
+ }
8717
+ ),
8718
+ /* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme2.colors.textSecondary })
8719
+ ]
8720
+ },
8721
+ idx
8722
+ )) }),
8723
+ 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(
8724
+ "button",
8725
+ {
8726
+ onClick: () => onConfigClick == null ? void 0 : onConfigClick(config),
8727
+ style: {
8728
+ display: "flex",
8729
+ alignItems: "center",
8730
+ gap: "8px",
8731
+ padding: "8px 12px",
8732
+ backgroundColor: theme2.colors.backgroundTertiary,
8733
+ border: `1px solid ${theme2.colors.border}`,
8734
+ borderRadius: "6px",
8735
+ color: theme2.colors.text,
8736
+ cursor: "pointer",
8737
+ textAlign: "left"
8738
+ },
8739
+ children: [
8740
+ /* @__PURE__ */ jsx(Settings, { size: 14, color: theme2.colors.textSecondary }),
8741
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
8742
+ /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: config.name }),
8743
+ /* @__PURE__ */ jsx(
8744
+ "div",
8745
+ {
8746
+ style: {
8747
+ fontSize: theme2.fontSizes[0],
8748
+ color: theme2.colors.textSecondary,
8749
+ fontFamily: "monospace"
8750
+ },
8751
+ children: config.path
8752
+ }
8753
+ )
8754
+ ] }),
8755
+ config.isInline && /* @__PURE__ */ jsx(
8756
+ "span",
8757
+ {
8758
+ style: {
8759
+ padding: "2px 6px",
8760
+ backgroundColor: theme2.colors.textSecondary + "20",
8761
+ color: theme2.colors.textSecondary,
8762
+ borderRadius: "4px",
8763
+ fontSize: theme2.fontSizes[0]
8764
+ },
8765
+ children: "inline"
8766
+ }
8767
+ )
8768
+ ]
8769
+ },
8770
+ idx
8771
+ )) })
8772
+ ] })
8773
+ ] })
8774
+ ]
8775
+ }
8776
+ );
8777
+ };
8778
+ const PackageCompositionPanelContent = ({
8779
+ packages,
8780
+ isLoading = false,
8781
+ emptyMessage = "No packages detected",
8782
+ onCommandClick,
8783
+ onConfigClick,
8784
+ onPackageClick
8785
+ }) => {
8786
+ const { theme: theme2 } = useTheme();
8787
+ const [expandedPackages, setExpandedPackages] = useState(/* @__PURE__ */ new Set());
8788
+ const togglePackage = (packageId) => {
8789
+ setExpandedPackages((prev) => {
8790
+ const next = new Set(prev);
8791
+ if (next.has(packageId)) {
8792
+ next.delete(packageId);
8793
+ } else {
8794
+ next.add(packageId);
8795
+ }
8796
+ return next;
8797
+ });
8798
+ };
8799
+ React2.useEffect(() => {
8800
+ if (packages.length > 0 && expandedPackages.size === 0) {
8801
+ setExpandedPackages(/* @__PURE__ */ new Set([packages[0].id]));
8802
+ }
8803
+ }, [packages, expandedPackages.size]);
8804
+ if (isLoading) {
8805
+ return /* @__PURE__ */ jsx(
8806
+ "div",
8807
+ {
8808
+ style: {
8809
+ padding: "20px",
8810
+ textAlign: "center",
8811
+ color: theme2.colors.textSecondary
8812
+ },
8813
+ children: "Loading packages..."
8814
+ }
8815
+ );
8816
+ }
8817
+ if (packages.length === 0) {
8818
+ return /* @__PURE__ */ jsx(
8819
+ "div",
8820
+ {
8821
+ style: {
8822
+ padding: "20px",
8823
+ textAlign: "center",
8824
+ color: theme2.colors.textSecondary
8825
+ },
8826
+ children: emptyMessage
8827
+ }
8828
+ );
8829
+ }
8830
+ const sortedPackages = [...packages].sort((a, b) => {
8831
+ if (a.packageData.isMonorepoRoot && !b.packageData.isMonorepoRoot) return -1;
8832
+ if (!a.packageData.isMonorepoRoot && b.packageData.isMonorepoRoot) return 1;
8833
+ return a.packageData.path.localeCompare(b.packageData.path);
8834
+ });
8835
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
8836
+ /* @__PURE__ */ jsxs(
8837
+ "div",
8838
+ {
8839
+ style: {
8840
+ padding: "12px 16px",
8841
+ borderBottom: `1px solid ${theme2.colors.border}`,
8842
+ display: "flex",
8843
+ alignItems: "center",
8844
+ gap: "8px"
8845
+ },
8846
+ children: [
8847
+ /* @__PURE__ */ jsx(FileCode, { size: 16, color: theme2.colors.accent }),
8848
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary }, children: [
8849
+ packages.length,
8850
+ " package",
8851
+ packages.length !== 1 ? "s" : "",
8852
+ " detected"
8853
+ ] })
8854
+ ]
8855
+ }
8856
+ ),
8857
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto", padding: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: sortedPackages.map((pkg) => /* @__PURE__ */ jsx(
8858
+ PackageCard,
8859
+ {
8860
+ pkg,
8861
+ isExpanded: expandedPackages.has(pkg.id),
8862
+ onToggle: () => togglePackage(pkg.id),
8863
+ onCommandClick,
8864
+ onConfigClick,
8865
+ onPackageClick
8866
+ },
8867
+ pkg.id
8868
+ )) })
8869
+ ] });
8870
+ };
8871
+ const PackageCompositionPanelPreview = () => {
8872
+ const { theme: theme2 } = useTheme();
8873
+ return /* @__PURE__ */ jsxs(
8874
+ "div",
8875
+ {
8876
+ style: {
8877
+ padding: "12px",
8878
+ fontSize: "12px",
8879
+ color: theme2.colors.text,
8880
+ display: "flex",
8881
+ flexDirection: "column",
8882
+ gap: "6px"
8883
+ },
8884
+ children: [
8885
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
8886
+ /* @__PURE__ */ jsx(Package, { size: 14, color: theme2.colors.accent }),
8887
+ /* @__PURE__ */ jsx("span", { children: "my-app" })
8888
+ ] }),
8889
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingLeft: "8px" }, children: [
8890
+ /* @__PURE__ */ jsx(Terminal, { size: 12, color: theme2.colors.textSecondary }),
8891
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: "5 commands" })
8892
+ ] }),
8893
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingLeft: "8px" }, children: [
8894
+ /* @__PURE__ */ jsx(Settings, { size: 12, color: theme2.colors.textSecondary }),
8895
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: "3 configs" })
8896
+ ] })
8897
+ ]
8898
+ }
8899
+ );
8900
+ };
8901
+ const PackageCompositionPanel = ({ context }) => {
8902
+ const packagesSlice = context.getSlice("packages");
8903
+ const packages = (packagesSlice == null ? void 0 : packagesSlice.data) ?? [];
8904
+ const isLoading = (packagesSlice == null ? void 0 : packagesSlice.loading) || false;
8905
+ return /* @__PURE__ */ jsx(
8906
+ PackageCompositionPanelContent,
8907
+ {
8908
+ packages,
8909
+ isLoading
8910
+ }
8911
+ );
8912
+ };
8913
+ const DependencyInfoModal = ({
8914
+ isOpen,
8915
+ onClose
8916
+ }) => {
8917
+ const { theme: theme2 } = useTheme();
8918
+ if (!isOpen) return null;
8919
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
8920
+ "div",
8921
+ {
8922
+ style: {
8923
+ position: "fixed",
8924
+ top: 0,
8925
+ left: 0,
8926
+ right: 0,
8927
+ bottom: 0,
8928
+ backgroundColor: theme2.colors.muted,
8929
+ zIndex: theme2.zIndices[4],
8930
+ display: "flex",
8931
+ alignItems: "center",
8932
+ justifyContent: "center"
8933
+ },
8934
+ onClick: onClose,
8935
+ children: /* @__PURE__ */ jsxs(
8936
+ "div",
8937
+ {
8938
+ style: {
8939
+ backgroundColor: theme2.colors.background,
8940
+ borderRadius: `${theme2.radii[3]}px`,
8941
+ maxWidth: "600px",
8942
+ maxHeight: "80vh",
8943
+ width: "90%",
8944
+ overflow: "hidden",
8945
+ display: "flex",
8946
+ flexDirection: "column",
8947
+ boxShadow: theme2.shadows[3]
8948
+ },
8949
+ onClick: (e) => e.stopPropagation(),
8950
+ children: [
8951
+ /* @__PURE__ */ jsxs(
8952
+ "div",
8953
+ {
8954
+ style: {
8955
+ padding: `${theme2.space[4]}px`,
8956
+ borderBottom: `1px solid ${theme2.colors.border}`,
8957
+ display: "flex",
8958
+ alignItems: "center",
8959
+ justifyContent: "space-between"
8960
+ },
8961
+ children: [
8962
+ /* @__PURE__ */ jsxs(
8963
+ "h2",
8964
+ {
8965
+ style: {
8966
+ fontSize: `${theme2.fontSizes[4]}px`,
8967
+ fontWeight: theme2.fontWeights.semibold,
8968
+ color: theme2.colors.text,
8969
+ display: "flex",
8970
+ alignItems: "center",
8971
+ gap: `${theme2.space[2]}px`,
8972
+ margin: 0
8973
+ },
8974
+ children: [
8975
+ /* @__PURE__ */ jsx(CircleQuestionMark, { size: 20 }),
8976
+ "Understanding Dependencies"
8977
+ ]
8978
+ }
8979
+ ),
8980
+ /* @__PURE__ */ jsx(
8981
+ "button",
8982
+ {
8983
+ onClick: onClose,
8984
+ style: {
8985
+ background: "none",
8986
+ border: "none",
8987
+ color: theme2.colors.textSecondary,
8988
+ cursor: "pointer",
8989
+ padding: `${theme2.space[1]}px`
8990
+ },
8991
+ children: /* @__PURE__ */ jsx(X, { size: 20 })
8992
+ }
8993
+ )
8994
+ ]
8995
+ }
8996
+ ),
8997
+ /* @__PURE__ */ jsxs(
8998
+ "div",
8999
+ {
9000
+ style: {
9001
+ padding: `${theme2.space[4]}px`,
9002
+ overflow: "auto",
9003
+ flex: 1
9004
+ },
9005
+ children: [
9006
+ /* @__PURE__ */ jsxs(
9007
+ Section,
9008
+ {
9009
+ icon: /* @__PURE__ */ jsx(Package, { size: 18 }),
9010
+ title: "Dependency Types",
9011
+ theme: theme2,
9012
+ children: [
9013
+ /* @__PURE__ */ jsx(
9014
+ InfoItem,
9015
+ {
9016
+ badge: { text: "prod", color: theme2.colors.primary },
9017
+ title: "Production Dependencies",
9018
+ description: "Required for your application to run in production. These are bundled with your app and affect its size and security.",
9019
+ theme: theme2
9020
+ }
9021
+ ),
9022
+ /* @__PURE__ */ jsx(
9023
+ InfoItem,
9024
+ {
9025
+ badge: { text: "dev", color: theme2.colors.secondary },
9026
+ title: "Development Dependencies",
9027
+ description: "Only needed during development (build tools, testing, linters). Not included in production builds.",
9028
+ theme: theme2
9029
+ }
9030
+ ),
9031
+ /* @__PURE__ */ jsx(
9032
+ InfoItem,
9033
+ {
9034
+ badge: { text: "peer", color: theme2.colors.accent },
9035
+ title: "Peer Dependencies",
9036
+ description: "Expected to be provided by the consumer of your package. Important for library authors to specify compatibility.",
9037
+ theme: theme2
9038
+ }
9039
+ )
9040
+ ]
9041
+ }
9042
+ ),
9043
+ /* @__PURE__ */ jsxs(
9044
+ Section,
9045
+ {
9046
+ icon: /* @__PURE__ */ jsx(Scale, { size: 18 }),
9047
+ title: "Common Licenses",
9048
+ theme: theme2,
9049
+ children: [
9050
+ /* @__PURE__ */ jsx(
9051
+ InfoItem,
9052
+ {
9053
+ badge: { text: "MIT", color: theme2.colors.success },
9054
+ title: "Permissive Licenses (MIT, Apache, BSD)",
9055
+ description: "Few restrictions. Can use in commercial projects. Must include copyright notice.",
9056
+ theme: theme2
9057
+ }
9058
+ ),
9059
+ /* @__PURE__ */ jsx(
9060
+ InfoItem,
9061
+ {
9062
+ badge: { text: "GPL", color: theme2.colors.warning },
9063
+ title: "Copyleft Licenses (GPL, LGPL, AGPL)",
9064
+ description: "Requires sharing source code of derivative works. Can impact your project's licensing.",
9065
+ theme: theme2
9066
+ }
9067
+ )
9068
+ ]
9069
+ }
9070
+ )
9071
+ ]
9072
+ }
9073
+ )
9074
+ ]
9075
+ }
9076
+ )
9077
+ }
9078
+ ) });
9079
+ };
9080
+ const Section = ({ icon, title, theme: theme2, children }) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: `${theme2.space[5]}px` }, children: [
9081
+ /* @__PURE__ */ jsxs(
9082
+ "h3",
9083
+ {
9084
+ style: {
9085
+ fontSize: `${theme2.fontSizes[2]}px`,
9086
+ fontWeight: theme2.fontWeights.semibold,
9087
+ color: theme2.colors.text,
9088
+ marginBottom: `${theme2.space[3]}px`,
9089
+ display: "flex",
9090
+ alignItems: "center",
9091
+ gap: `${theme2.space[2]}px`
9092
+ },
9093
+ children: [
9094
+ icon,
9095
+ title
9096
+ ]
9097
+ }
9098
+ ),
9099
+ /* @__PURE__ */ jsx(
9100
+ "div",
9101
+ {
9102
+ style: {
9103
+ display: "flex",
9104
+ flexDirection: "column",
9105
+ gap: `${theme2.space[2]}px`
9106
+ },
9107
+ children
9108
+ }
9109
+ )
9110
+ ] });
9111
+ const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__ */ jsxs(
9112
+ "div",
9113
+ {
9114
+ style: {
9115
+ padding: `${theme2.space[3]}px`,
9116
+ backgroundColor: theme2.colors.backgroundSecondary,
9117
+ borderRadius: `${theme2.radii[2]}px`,
9118
+ border: `1px solid ${theme2.colors.border}`
9119
+ },
9120
+ children: [
9121
+ /* @__PURE__ */ jsxs(
9122
+ "div",
9123
+ {
9124
+ style: {
9125
+ display: "flex",
9126
+ alignItems: "center",
9127
+ gap: `${theme2.space[2]}px`,
9128
+ marginBottom: `${theme2.space[1]}px`
9129
+ },
9130
+ children: [
9131
+ /* @__PURE__ */ jsx(
9132
+ "span",
9133
+ {
9134
+ style: {
9135
+ padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
9136
+ borderRadius: `${theme2.radii[1]}px`,
9137
+ fontSize: `${theme2.fontSizes[0]}px`,
9138
+ fontWeight: theme2.fontWeights.medium,
9139
+ backgroundColor: `${badge.color}20`,
9140
+ color: badge.color
9141
+ },
9142
+ children: badge.text
9143
+ }
9144
+ ),
9145
+ /* @__PURE__ */ jsx(
9146
+ "span",
9147
+ {
9148
+ style: {
9149
+ fontSize: `${theme2.fontSizes[1]}px`,
9150
+ fontWeight: theme2.fontWeights.medium,
9151
+ color: theme2.colors.text
9152
+ },
9153
+ children: title
9154
+ }
9155
+ )
9156
+ ]
9157
+ }
9158
+ ),
9159
+ /* @__PURE__ */ jsx(
9160
+ "div",
9161
+ {
9162
+ style: {
9163
+ fontSize: `${theme2.fontSizes[1]}px`,
9164
+ color: theme2.colors.textSecondary,
9165
+ lineHeight: theme2.lineHeights.relaxed
9166
+ },
9167
+ children: description
9168
+ }
9169
+ )
9170
+ ]
9171
+ }
9172
+ );
9173
+ const DependencyRow = ({ dependency }) => {
9174
+ const { theme: theme2 } = useTheme();
9175
+ const [isHovered, setIsHovered] = useState(false);
9176
+ const [copied, setCopied] = useState(false);
9177
+ const getDependencyTypeBadgeStyle = (type) => {
9178
+ const baseStyle = {
9179
+ padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
9180
+ borderRadius: `${theme2.radii[1]}px`,
9181
+ fontSize: `${theme2.fontSizes[0]}px`,
9182
+ fontWeight: theme2.fontWeights.medium,
9183
+ minWidth: "36px",
9184
+ textAlign: "center"
9185
+ };
9186
+ switch (type) {
9187
+ case "production":
9188
+ return {
9189
+ ...baseStyle,
9190
+ backgroundColor: `${theme2.colors.primary}20`,
9191
+ color: theme2.colors.primary
9192
+ };
9193
+ case "development":
9194
+ return {
9195
+ ...baseStyle,
9196
+ backgroundColor: `${theme2.colors.secondary}20`,
9197
+ color: theme2.colors.secondary
9198
+ };
9199
+ case "peer":
9200
+ return {
9201
+ ...baseStyle,
9202
+ backgroundColor: `${theme2.colors.accent}20`,
9203
+ color: theme2.colors.accent
9204
+ };
9205
+ default:
9206
+ return {
9207
+ ...baseStyle,
9208
+ backgroundColor: theme2.colors.backgroundLight,
9209
+ color: theme2.colors.textSecondary
9210
+ };
9211
+ }
9212
+ };
9213
+ const handleCopy = async (e) => {
9214
+ e.preventDefault();
9215
+ e.stopPropagation();
9216
+ try {
9217
+ const copyText = `${dependency.name}@${dependency.version}`;
9218
+ await navigator.clipboard.writeText(copyText);
9219
+ setCopied(true);
9220
+ setTimeout(() => setCopied(false), 2e3);
9221
+ } catch (err) {
9222
+ console.error("Failed to copy:", err);
9223
+ }
9224
+ };
9225
+ const actionButtonStyle = {
9226
+ padding: `${theme2.space[1]}px`,
9227
+ borderRadius: `${theme2.radii[1]}px`,
9228
+ display: "flex",
9229
+ alignItems: "center",
9230
+ justifyContent: "center",
9231
+ border: "none",
9232
+ backgroundColor: "transparent",
9233
+ cursor: "pointer",
9234
+ transition: "all 0.15s ease",
9235
+ opacity: isHovered ? 1 : 0,
9236
+ pointerEvents: isHovered ? "auto" : "none"
9237
+ };
9238
+ return /* @__PURE__ */ jsxs(
9239
+ "div",
9240
+ {
9241
+ style: {
9242
+ display: "flex",
9243
+ alignItems: "center",
9244
+ justifyContent: "space-between",
9245
+ padding: `${theme2.space[2]}px ${theme2.space[3]}px`,
9246
+ backgroundColor: theme2.colors.background,
9247
+ borderRadius: `${theme2.radii[1]}px`,
9248
+ fontSize: `${theme2.fontSizes[1]}px`,
9249
+ border: `1px solid ${theme2.colors.border}`,
9250
+ transition: "all 0.2s"
9251
+ },
9252
+ onMouseEnter: () => setIsHovered(true),
9253
+ onMouseLeave: () => setIsHovered(false),
9254
+ children: [
9255
+ /* @__PURE__ */ jsxs(
9256
+ "div",
9257
+ {
9258
+ style: {
9259
+ display: "flex",
9260
+ alignItems: "center",
9261
+ gap: `${theme2.space[2]}px`,
9262
+ flex: 1,
9263
+ minWidth: 0
9264
+ },
9265
+ children: [
9266
+ /* @__PURE__ */ jsx("span", { style: getDependencyTypeBadgeStyle(dependency.dependencyType), children: dependency.dependencyType === "production" ? "prod" : dependency.dependencyType === "development" ? "dev" : "peer" }),
9267
+ /* @__PURE__ */ jsx(
9268
+ "span",
9269
+ {
9270
+ style: {
9271
+ fontWeight: theme2.fontWeights.medium,
9272
+ color: theme2.colors.text,
9273
+ overflow: "hidden",
9274
+ textOverflow: "ellipsis",
9275
+ whiteSpace: "nowrap"
9276
+ },
9277
+ children: dependency.name
9278
+ }
9279
+ ),
9280
+ /* @__PURE__ */ jsx(
9281
+ "a",
9282
+ {
9283
+ href: `https://www.npmjs.com/package/${dependency.name}`,
9284
+ target: "_blank",
9285
+ rel: "noopener noreferrer",
9286
+ style: {
9287
+ ...actionButtonStyle,
9288
+ color: theme2.colors.textSecondary,
9289
+ textDecoration: "none",
9290
+ flexShrink: 0
9291
+ },
9292
+ title: "View on npm",
9293
+ children: /* @__PURE__ */ jsx(ExternalLink, { size: 12 })
9294
+ }
9295
+ )
9296
+ ]
9297
+ }
9298
+ ),
9299
+ /* @__PURE__ */ jsxs(
9300
+ "div",
9301
+ {
9302
+ style: {
9303
+ display: "flex",
9304
+ alignItems: "center",
9305
+ gap: "4px"
9306
+ },
9307
+ children: [
9308
+ /* @__PURE__ */ jsx(
9309
+ "button",
9310
+ {
9311
+ type: "button",
9312
+ onClick: handleCopy,
9313
+ style: {
9314
+ ...actionButtonStyle,
9315
+ color: copied ? theme2.colors.success || "#10b981" : theme2.colors.textSecondary
9316
+ },
9317
+ title: copied ? "Copied!" : `Copy ${dependency.name}@${dependency.version}`,
9318
+ children: copied ? /* @__PURE__ */ jsx(Check, { size: 12 }) : /* @__PURE__ */ jsx(Copy, { size: 12 })
9319
+ }
9320
+ ),
9321
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: dependency.version })
9322
+ ]
9323
+ }
9324
+ )
9325
+ ]
9326
+ }
9327
+ );
9328
+ };
9329
+ const FilterBar = ({
9330
+ activeFilters,
9331
+ onToggleFilter,
9332
+ searchQuery,
9333
+ onSearchChange,
9334
+ counts
9335
+ }) => {
9336
+ const { theme: theme2 } = useTheme();
9337
+ const availableFilters = [
9338
+ ...counts.peer > 0 ? ["peer"] : [],
9339
+ ...counts.production > 0 ? ["production"] : [],
9340
+ ...counts.development > 0 ? ["development"] : []
9341
+ ];
9342
+ const showFilters = availableFilters.length > 1;
9343
+ return /* @__PURE__ */ jsxs(
9344
+ "div",
9345
+ {
9346
+ style: {
9347
+ display: "flex",
9348
+ flexDirection: "column",
9349
+ gap: `${theme2.space[2]}px`
9350
+ },
9351
+ children: [
9352
+ /* @__PURE__ */ jsxs(
9353
+ "div",
9354
+ {
9355
+ style: {
9356
+ position: "relative",
9357
+ display: "flex",
9358
+ alignItems: "center"
9359
+ },
9360
+ children: [
9361
+ /* @__PURE__ */ jsx(
9362
+ Search,
9363
+ {
9364
+ size: 14,
9365
+ style: {
9366
+ position: "absolute",
9367
+ left: `${theme2.space[3]}px`,
9368
+ color: theme2.colors.textSecondary,
9369
+ pointerEvents: "none"
9370
+ }
9371
+ }
9372
+ ),
9373
+ /* @__PURE__ */ jsx(
9374
+ "input",
9375
+ {
9376
+ type: "text",
9377
+ placeholder: "Search dependencies...",
9378
+ value: searchQuery,
9379
+ onChange: (e) => onSearchChange(e.target.value),
9380
+ style: {
9381
+ width: "100%",
9382
+ padding: `${theme2.space[2]}px ${theme2.space[5]}px`,
9383
+ borderRadius: `${theme2.radii[2]}px`,
9384
+ border: `1px solid ${theme2.colors.border}`,
9385
+ backgroundColor: theme2.colors.backgroundSecondary,
9386
+ color: theme2.colors.text,
9387
+ fontSize: `${theme2.fontSizes[1]}px`,
9388
+ fontFamily: theme2.fonts.body,
9389
+ outline: "none",
9390
+ transition: "all 0.2s"
9391
+ }
9392
+ }
9393
+ ),
9394
+ searchQuery && /* @__PURE__ */ jsx(
9395
+ "button",
9396
+ {
9397
+ onClick: () => onSearchChange(""),
9398
+ style: {
9399
+ position: "absolute",
9400
+ right: `${theme2.space[2]}px`,
9401
+ padding: `${theme2.space[1]}px`,
9402
+ display: "flex",
9403
+ alignItems: "center",
9404
+ justifyContent: "center",
9405
+ backgroundColor: "transparent",
9406
+ border: "none",
9407
+ cursor: "pointer",
9408
+ borderRadius: `${theme2.radii[1]}px`
9409
+ },
9410
+ title: "Clear search",
9411
+ children: /* @__PURE__ */ jsx(X, { size: 14, color: theme2.colors.textSecondary })
9412
+ }
9413
+ )
9414
+ ]
9415
+ }
9416
+ ),
9417
+ showFilters && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: `${theme2.space[1]}px`, width: "100%" }, children: availableFilters.map((type) => {
9418
+ const isActive = activeFilters.has(type);
9419
+ return /* @__PURE__ */ jsxs(
9420
+ "button",
9421
+ {
9422
+ onClick: () => onToggleFilter(type),
9423
+ style: {
9424
+ flex: 1,
9425
+ padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
9426
+ fontSize: `${theme2.fontSizes[0]}px`,
9427
+ fontWeight: theme2.fontWeights.medium,
9428
+ fontFamily: theme2.fonts.body,
9429
+ borderRadius: `${theme2.radii[1]}px`,
9430
+ border: `1px solid ${isActive ? theme2.colors.primary : theme2.colors.border}`,
9431
+ backgroundColor: isActive ? `${theme2.colors.primary}20` : theme2.colors.backgroundSecondary,
9432
+ color: isActive ? theme2.colors.primary : theme2.colors.text,
9433
+ cursor: "pointer",
9434
+ transition: "all 0.2s"
9435
+ },
9436
+ children: [
9437
+ type === "production" ? "Prod" : type === "development" ? "Dev" : "Peer",
9438
+ /* @__PURE__ */ jsxs(
9439
+ "span",
9440
+ {
9441
+ style: { marginLeft: `${theme2.space[1]}px`, opacity: 0.7 },
9442
+ children: [
9443
+ "(",
9444
+ counts[type],
9445
+ ")"
9446
+ ]
9447
+ }
9448
+ )
9449
+ ]
9450
+ },
9451
+ type
9452
+ );
9453
+ }) })
9454
+ ]
9455
+ }
9456
+ );
9457
+ };
9458
+ const dependencyTypeOrder = {
9459
+ peer: 0,
9460
+ production: 1,
9461
+ development: 2
9462
+ };
9463
+ function extractDependencies(packageLayer) {
9464
+ const { dependencies, devDependencies, peerDependencies } = packageLayer.packageData;
9465
+ const items2 = [];
9466
+ if (dependencies) {
9467
+ Object.entries(dependencies).forEach(([name, version]) => {
9468
+ items2.push({ name, version, dependencyType: "production" });
9469
+ });
9470
+ }
9471
+ if (devDependencies) {
9472
+ Object.entries(devDependencies).forEach(([name, version]) => {
9473
+ items2.push({ name, version, dependencyType: "development" });
9474
+ });
9475
+ }
9476
+ if (peerDependencies) {
9477
+ Object.entries(peerDependencies).forEach(([name, version]) => {
9478
+ items2.push({ name, version, dependencyType: "peer" });
9479
+ });
9480
+ }
9481
+ return items2.sort((a, b) => {
9482
+ const typeCompare = dependencyTypeOrder[a.dependencyType] - dependencyTypeOrder[b.dependencyType];
9483
+ if (typeCompare !== 0) return typeCompare;
9484
+ return a.name.localeCompare(b.name);
9485
+ });
9486
+ }
9487
+ const DependenciesPanelContent = ({
9488
+ context
9489
+ }) => {
9490
+ var _a;
9491
+ const { theme: theme2 } = useTheme();
9492
+ const [selectedPackagePath, setSelectedPackagePath] = useState(
9493
+ null
9494
+ );
9495
+ const [activeFilters, setActiveFilters] = useState(/* @__PURE__ */ new Set());
9496
+ const [searchQuery, setSearchQuery] = useState("");
9497
+ const [showInfoModal, setShowInfoModal] = useState(false);
9498
+ const packagesSlice = context.getSlice("packages");
9499
+ const isLoading = context.isSliceLoading("packages");
9500
+ const hasPackages = context.hasSlice("packages");
9501
+ const packages = useMemo(() => {
9502
+ var _a2;
9503
+ return ((_a2 = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a2.packages) ?? [];
9504
+ }, [(_a = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a.packages]);
9505
+ const effectiveSelectedPath = useMemo(() => {
9506
+ if (selectedPackagePath !== null) return selectedPackagePath;
9507
+ if (packages.length === 1) return packages[0].packageData.path;
9508
+ const rootPackage = packages.find((p) => p.packageData.path === "");
9509
+ if (rootPackage) return "";
9510
+ return null;
9511
+ }, [selectedPackagePath, packages]);
9512
+ const selectedPackage = useMemo(() => {
9513
+ if (effectiveSelectedPath === null) return null;
9514
+ return packages.find((p) => p.packageData.path === effectiveSelectedPath);
9515
+ }, [effectiveSelectedPath, packages]);
9516
+ const dependencyItems = useMemo(() => {
9517
+ if (!selectedPackage) return [];
9518
+ return extractDependencies(selectedPackage);
9519
+ }, [selectedPackage]);
9520
+ const counts = useMemo(() => {
9521
+ return {
9522
+ all: dependencyItems.length,
9523
+ production: dependencyItems.filter((d) => d.dependencyType === "production").length,
9524
+ development: dependencyItems.filter(
9525
+ (d) => d.dependencyType === "development"
9526
+ ).length,
9527
+ peer: dependencyItems.filter((d) => d.dependencyType === "peer").length
9528
+ };
9529
+ }, [dependencyItems]);
9530
+ const handleToggleFilter = (type) => {
9531
+ setActiveFilters((prev) => {
9532
+ const next = new Set(prev);
9533
+ if (next.has(type)) {
9534
+ next.delete(type);
9535
+ } else {
9536
+ next.add(type);
9537
+ }
9538
+ return next;
9539
+ });
9540
+ };
9541
+ const filteredDependencies = useMemo(() => {
9542
+ let filtered = [...dependencyItems];
9543
+ if (searchQuery.trim()) {
9544
+ const query = searchQuery.toLowerCase();
9545
+ filtered = filtered.filter(
9546
+ (dep) => dep.name.toLowerCase().includes(query)
9547
+ );
9548
+ }
9549
+ const allTypes = ["production", "development", "peer"];
9550
+ const availableTypes = allTypes.filter((t) => counts[t] > 0);
9551
+ const isAllSelected = activeFilters.size === 0 || availableTypes.every((t) => activeFilters.has(t));
9552
+ if (!isAllSelected && activeFilters.size > 0) {
9553
+ filtered = filtered.filter((dep) => activeFilters.has(dep.dependencyType));
9554
+ }
9555
+ return filtered;
9556
+ }, [dependencyItems, searchQuery, activeFilters, counts]);
9557
+ if (isLoading) {
9558
+ return /* @__PURE__ */ jsx(
9559
+ "div",
9560
+ {
9561
+ style: {
9562
+ padding: `${theme2.space[3]}px`,
9563
+ height: "100%",
9564
+ display: "flex",
9565
+ alignItems: "center",
9566
+ justifyContent: "center",
9567
+ color: theme2.colors.textSecondary,
9568
+ backgroundColor: theme2.colors.background,
9569
+ fontFamily: theme2.fonts.body
9570
+ },
9571
+ children: "Loading packages..."
9572
+ }
9573
+ );
9574
+ }
9575
+ if (!hasPackages || packages.length === 0) {
9576
+ return /* @__PURE__ */ jsxs(
9577
+ "div",
9578
+ {
9579
+ style: {
9580
+ padding: `${theme2.space[3]}px`,
9581
+ height: "100%",
9582
+ display: "flex",
9583
+ flexDirection: "column",
9584
+ alignItems: "center",
9585
+ justifyContent: "center",
9586
+ gap: `${theme2.space[2]}px`,
9587
+ color: theme2.colors.textSecondary,
9588
+ backgroundColor: theme2.colors.background,
9589
+ fontFamily: theme2.fonts.body
9590
+ },
9591
+ children: [
9592
+ /* @__PURE__ */ jsx(Package, { size: 32 }),
9593
+ /* @__PURE__ */ jsx("p", { style: { margin: 0 }, children: "No package data available" })
9594
+ ]
9595
+ }
9596
+ );
9597
+ }
9598
+ return /* @__PURE__ */ jsxs(
9599
+ "div",
9600
+ {
9601
+ style: {
9602
+ height: "100%",
9603
+ display: "flex",
9604
+ flexDirection: "column",
9605
+ backgroundColor: theme2.colors.background,
9606
+ color: theme2.colors.text,
9607
+ fontFamily: theme2.fonts.body,
9608
+ overflow: "hidden"
9609
+ },
9610
+ children: [
9611
+ /* @__PURE__ */ jsxs(
9612
+ "div",
9613
+ {
9614
+ style: {
9615
+ flexShrink: 0,
9616
+ padding: `${theme2.space[3]}px`,
9617
+ paddingBottom: `${theme2.space[2]}px`,
9618
+ display: "flex",
9619
+ flexDirection: "column",
9620
+ gap: `${theme2.space[2]}px`,
9621
+ borderBottom: `1px solid ${theme2.colors.border}`
9622
+ },
9623
+ children: [
9624
+ /* @__PURE__ */ jsxs(
9625
+ "div",
9626
+ {
9627
+ style: {
9628
+ display: "flex",
9629
+ alignItems: "center",
9630
+ justifyContent: "space-between"
9631
+ },
9632
+ children: [
9633
+ /* @__PURE__ */ jsx(
9634
+ "h3",
9635
+ {
9636
+ style: {
9637
+ fontSize: `${theme2.fontSizes[2]}px`,
9638
+ fontWeight: theme2.fontWeights.semibold,
9639
+ color: theme2.colors.text,
9640
+ display: "flex",
9641
+ alignItems: "center",
9642
+ gap: `${theme2.space[2]}px`,
9643
+ margin: 0
9644
+ },
9645
+ children: packages.length > 1 ? /* @__PURE__ */ jsxs(Fragment, { children: [
9646
+ /* @__PURE__ */ jsx(Boxes, { size: 16 }),
9647
+ "Monorepo Dependencies",
9648
+ /* @__PURE__ */ jsxs(
9649
+ "span",
9650
+ {
9651
+ style: {
9652
+ fontSize: `${theme2.fontSizes[0]}px`,
9653
+ fontWeight: theme2.fontWeights.body,
9654
+ color: theme2.colors.textSecondary
9655
+ },
9656
+ children: [
9657
+ "(",
9658
+ packages.length,
9659
+ ")"
9660
+ ]
9661
+ }
9662
+ )
9663
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
9664
+ /* @__PURE__ */ jsx(Package, { size: 16 }),
9665
+ "Dependencies"
9666
+ ] })
9667
+ }
9668
+ ),
9669
+ /* @__PURE__ */ jsxs(
9670
+ "button",
9671
+ {
9672
+ onClick: () => setShowInfoModal(true),
9673
+ style: {
9674
+ padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
9675
+ fontSize: `${theme2.fontSizes[0]}px`,
9676
+ fontWeight: theme2.fontWeights.medium,
9677
+ fontFamily: theme2.fonts.body,
9678
+ borderRadius: `${theme2.radii[1]}px`,
9679
+ border: `1px solid ${theme2.colors.border}`,
9680
+ backgroundColor: theme2.colors.backgroundSecondary,
9681
+ color: theme2.colors.primary,
9682
+ cursor: "pointer",
9683
+ display: "flex",
9684
+ alignItems: "center",
9685
+ gap: `${theme2.space[1]}px`,
9686
+ transition: "all 0.2s"
9687
+ },
9688
+ children: [
9689
+ /* @__PURE__ */ jsx(CircleQuestionMark, { size: 12 }),
9690
+ "Learn More"
9691
+ ]
9692
+ }
9693
+ )
9694
+ ]
9695
+ }
9696
+ ),
9697
+ packages.length > 1 && /* @__PURE__ */ jsx(
9698
+ "select",
9699
+ {
9700
+ value: effectiveSelectedPath ?? "__none__",
9701
+ onChange: (e) => setSelectedPackagePath(e.target.value === "__none__" ? null : e.target.value),
9702
+ style: {
9703
+ width: "100%",
9704
+ padding: `${theme2.space[2]}px`,
9705
+ borderRadius: `${theme2.radii[1]}px`,
9706
+ border: `1px solid ${theme2.colors.border}`,
9707
+ backgroundColor: theme2.colors.backgroundSecondary,
9708
+ color: theme2.colors.text,
9709
+ fontSize: `${theme2.fontSizes[1]}px`,
9710
+ fontFamily: theme2.fonts.body,
9711
+ cursor: "pointer"
9712
+ },
9713
+ children: packages.map((pkg) => /* @__PURE__ */ jsxs("option", { value: pkg.packageData.path, children: [
9714
+ pkg.packageData.name,
9715
+ " (",
9716
+ pkg.packageData.path || "root",
9717
+ ")"
9718
+ ] }, pkg.packageData.path || "__root__"))
9719
+ }
9720
+ ),
9721
+ packages.length === 1 && selectedPackage && /* @__PURE__ */ jsxs(
9722
+ "div",
9723
+ {
9724
+ style: {
9725
+ fontSize: `${theme2.fontSizes[0]}px`,
9726
+ color: theme2.colors.textSecondary
9727
+ },
9728
+ children: [
9729
+ selectedPackage.packageData.name,
9730
+ " • ",
9731
+ dependencyItems.length,
9732
+ " dependencies"
9733
+ ]
9734
+ }
9735
+ ),
9736
+ selectedPackage && dependencyItems.length > 0 && /* @__PURE__ */ jsx(
9737
+ FilterBar,
9738
+ {
9739
+ activeFilters,
9740
+ onToggleFilter: handleToggleFilter,
9741
+ searchQuery,
9742
+ onSearchChange: setSearchQuery,
9743
+ counts
9744
+ }
9745
+ )
9746
+ ]
9747
+ }
9748
+ ),
9749
+ selectedPackage && dependencyItems.length > 0 && /* @__PURE__ */ jsxs(
9750
+ "div",
9751
+ {
9752
+ style: {
9753
+ flex: 1,
9754
+ overflow: "auto",
9755
+ padding: `${theme2.space[2]}px ${theme2.space[3]}px ${theme2.space[3]}px`
9756
+ },
9757
+ children: [
9758
+ /* @__PURE__ */ jsxs(
9759
+ "div",
9760
+ {
9761
+ style: {
9762
+ fontSize: `${theme2.fontSizes[0]}px`,
9763
+ color: theme2.colors.textSecondary,
9764
+ marginBottom: `${theme2.space[2]}px`
9765
+ },
9766
+ children: [
9767
+ "Showing ",
9768
+ filteredDependencies.length,
9769
+ " of ",
9770
+ dependencyItems.length,
9771
+ " dependencies"
9772
+ ]
9773
+ }
9774
+ ),
9775
+ /* @__PURE__ */ jsx(
9776
+ "div",
9777
+ {
9778
+ style: {
9779
+ display: "flex",
9780
+ flexDirection: "column",
9781
+ gap: `${theme2.space[1]}px`
9782
+ },
9783
+ children: filteredDependencies.length === 0 ? /* @__PURE__ */ jsx(
9784
+ "div",
9785
+ {
9786
+ style: {
9787
+ padding: `${theme2.space[3]}px`,
9788
+ textAlign: "center",
9789
+ color: theme2.colors.textSecondary,
9790
+ fontSize: `${theme2.fontSizes[1]}px`
9791
+ },
9792
+ children: "No dependencies match your filters"
9793
+ }
9794
+ ) : filteredDependencies.map((dep) => /* @__PURE__ */ jsx(
9795
+ DependencyRow,
9796
+ {
9797
+ dependency: dep
9798
+ },
9799
+ `${dep.name}-${dep.dependencyType}`
9800
+ ))
9801
+ }
9802
+ )
9803
+ ]
9804
+ }
9805
+ ),
9806
+ !selectedPackage && packages.length > 1 && /* @__PURE__ */ jsx(
9807
+ "div",
9808
+ {
9809
+ style: {
9810
+ flex: 1,
9811
+ display: "flex",
9812
+ alignItems: "center",
9813
+ justifyContent: "center",
9814
+ color: theme2.colors.textSecondary,
9815
+ fontSize: `${theme2.fontSizes[1]}px`
9816
+ },
9817
+ children: "Select a package to view its dependencies"
9818
+ }
9819
+ ),
9820
+ /* @__PURE__ */ jsx(
9821
+ DependencyInfoModal,
9822
+ {
9823
+ isOpen: showInfoModal,
9824
+ onClose: () => setShowInfoModal(false)
9825
+ }
9826
+ )
9827
+ ]
9828
+ }
9829
+ );
9830
+ };
9831
+ const DependenciesPanel = (props) => {
9832
+ return /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(DependenciesPanelContent, { ...props }) });
9833
+ };
8126
9834
  const panels = [
8127
9835
  {
8128
9836
  metadata: {
@@ -8144,6 +9852,48 @@ const panels = [
8144
9852
  onUnmount: async (_context) => {
8145
9853
  console.log("Git Changes Panel unmounting");
8146
9854
  }
9855
+ },
9856
+ {
9857
+ metadata: {
9858
+ id: "industry-theme.package-composition",
9859
+ name: "Package Composition",
9860
+ icon: "Package",
9861
+ version: "0.1.0",
9862
+ author: "Industry Theme",
9863
+ description: "View detected packages, dependencies, configs, and available commands",
9864
+ slices: ["packages"]
9865
+ },
9866
+ component: PackageCompositionPanel,
9867
+ onMount: async (context) => {
9868
+ console.log("Package Composition Panel mounted");
9869
+ if (context.hasSlice("packages") && !context.isSliceLoading("packages")) {
9870
+ await context.refresh("repository", "packages");
9871
+ }
9872
+ },
9873
+ onUnmount: async (_context) => {
9874
+ console.log("Package Composition Panel unmounting");
9875
+ }
9876
+ },
9877
+ {
9878
+ metadata: {
9879
+ id: "industry-theme.dependencies",
9880
+ name: "Dependencies",
9881
+ icon: "Package",
9882
+ version: "0.1.0",
9883
+ author: "Industry Theme",
9884
+ description: "View and explore package dependencies",
9885
+ slices: ["packages"]
9886
+ },
9887
+ component: DependenciesPanel,
9888
+ onMount: async (context) => {
9889
+ console.log("Dependencies Panel mounted");
9890
+ if (context.hasSlice("packages") && !context.isSliceLoading("packages")) {
9891
+ await context.refresh("repository", "packages");
9892
+ }
9893
+ },
9894
+ onUnmount: async (_context) => {
9895
+ console.log("Dependencies Panel unmounting");
9896
+ }
8147
9897
  }
8148
9898
  ];
8149
9899
  const onPackageLoad = async () => {
@@ -8153,9 +9903,13 @@ const onPackageUnload = async () => {
8153
9903
  console.log("Repository Composition Panels package unloading");
8154
9904
  };
8155
9905
  export {
9906
+ DependenciesPanel,
8156
9907
  GitChangesPanel,
8157
9908
  GitChangesPanelContent,
8158
9909
  GitChangesPanelPreview,
9910
+ PackageCompositionPanel,
9911
+ PackageCompositionPanelContent,
9912
+ PackageCompositionPanelPreview,
8159
9913
  onPackageLoad,
8160
9914
  onPackageUnload,
8161
9915
  panels