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

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,157 +1,5 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
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
- }
2
+ import React2, { createContext, useContext, forwardRef, createElement, useRef, useEffect, memo, PureComponent, isValidElement, cloneElement, useLayoutEffect, useMemo, useState, useCallback, useImperativeHandle } from "react";
155
3
  var ThemeContext;
156
4
  var getThemeContext = () => {
157
5
  if (typeof window !== "undefined") {
@@ -175,46 +23,6 @@ var useTheme = () => {
175
23
  }
176
24
  return context;
177
25
  };
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;
218
26
  /**
219
27
  * @license lucide-react v0.552.0 - ISC
220
28
  *
@@ -320,117 +128,115 @@ const createLucideIcon = (iconName, iconNode) => {
320
128
  * This source code is licensed under the ISC license.
321
129
  * See the LICENSE file in the root directory of this source tree.
322
130
  */
323
- const __iconNode$l = [
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" }],
131
+ const __iconNode$p = [
132
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
133
+ ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
134
+ ];
135
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$p);
136
+ /**
137
+ * @license lucide-react v0.552.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */
142
+ const __iconNode$o = [
344
143
  [
345
144
  "path",
346
145
  {
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"
146
+ 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",
147
+ key: "hh9hay"
349
148
  }
350
149
  ],
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" }]
150
+ ["path", { d: "m3.3 7 8.7 5 8.7-5", key: "g66t2b" }],
151
+ ["path", { d: "M12 22V12", key: "d0xqtd" }]
354
152
  ];
355
- const Boxes = createLucideIcon("boxes", __iconNode$l);
153
+ const Box = createLucideIcon("box", __iconNode$o);
356
154
  /**
357
155
  * @license lucide-react v0.552.0 - ISC
358
156
  *
359
157
  * This source code is licensed under the ISC license.
360
158
  * See the LICENSE file in the root directory of this source tree.
361
159
  */
362
- const __iconNode$k = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
363
- const Check = createLucideIcon("check", __iconNode$k);
160
+ const __iconNode$n = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
161
+ const Check = createLucideIcon("check", __iconNode$n);
364
162
  /**
365
163
  * @license lucide-react v0.552.0 - ISC
366
164
  *
367
165
  * This source code is licensed under the ISC license.
368
166
  * See the LICENSE file in the root directory of this source tree.
369
167
  */
370
- const __iconNode$j = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
371
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$j);
168
+ const __iconNode$m = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
169
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$m);
372
170
  /**
373
171
  * @license lucide-react v0.552.0 - ISC
374
172
  *
375
173
  * This source code is licensed under the ISC license.
376
174
  * See the LICENSE file in the root directory of this source tree.
377
175
  */
378
- const __iconNode$i = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
379
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$i);
176
+ const __iconNode$l = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
177
+ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$l);
380
178
  /**
381
179
  * @license lucide-react v0.552.0 - ISC
382
180
  *
383
181
  * This source code is licensed under the ISC license.
384
182
  * See the LICENSE file in the root directory of this source tree.
385
183
  */
386
- const __iconNode$h = [
184
+ const __iconNode$k = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
185
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$k);
186
+ /**
187
+ * @license lucide-react v0.552.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */
192
+ const __iconNode$j = [
387
193
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
388
194
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
389
195
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
390
196
  ];
391
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$h);
197
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$j);
392
198
  /**
393
199
  * @license lucide-react v0.552.0 - ISC
394
200
  *
395
201
  * This source code is licensed under the ISC license.
396
202
  * See the LICENSE file in the root directory of this source tree.
397
203
  */
398
- const __iconNode$g = [
204
+ const __iconNode$i = [
399
205
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
400
206
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
401
207
  ["path", { d: "M12 17h.01", key: "p32p05" }]
402
208
  ];
403
- const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$g);
209
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$i);
404
210
  /**
405
211
  * @license lucide-react v0.552.0 - ISC
406
212
  *
407
213
  * This source code is licensed under the ISC license.
408
214
  * See the LICENSE file in the root directory of this source tree.
409
215
  */
410
- const __iconNode$f = [
216
+ const __iconNode$h = [
411
217
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
412
218
  ["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
219
  ];
414
- const Copy = createLucideIcon("copy", __iconNode$f);
220
+ const Copy = createLucideIcon("copy", __iconNode$h);
415
221
  /**
416
222
  * @license lucide-react v0.552.0 - ISC
417
223
  *
418
224
  * This source code is licensed under the ISC license.
419
225
  * See the LICENSE file in the root directory of this source tree.
420
226
  */
421
- const __iconNode$e = [
227
+ const __iconNode$g = [
422
228
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
423
229
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
424
230
  ["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
231
  ];
426
- const ExternalLink = createLucideIcon("external-link", __iconNode$e);
232
+ const ExternalLink = createLucideIcon("external-link", __iconNode$g);
427
233
  /**
428
234
  * @license lucide-react v0.552.0 - ISC
429
235
  *
430
236
  * This source code is licensed under the ISC license.
431
237
  * See the LICENSE file in the root directory of this source tree.
432
238
  */
433
- const __iconNode$d = [
239
+ const __iconNode$f = [
434
240
  [
435
241
  "path",
436
242
  {
@@ -442,14 +248,14 @@ const __iconNode$d = [
442
248
  ["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
443
249
  ["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
444
250
  ];
445
- const FileCode = createLucideIcon("file-code", __iconNode$d);
251
+ const FileCode = createLucideIcon("file-code", __iconNode$f);
446
252
  /**
447
253
  * @license lucide-react v0.552.0 - ISC
448
254
  *
449
255
  * This source code is licensed under the ISC license.
450
256
  * See the LICENSE file in the root directory of this source tree.
451
257
  */
452
- const __iconNode$c = [
258
+ const __iconNode$e = [
453
259
  [
454
260
  "path",
455
261
  {
@@ -460,14 +266,14 @@ const __iconNode$c = [
460
266
  ["path", { d: "M12 17h.01", key: "p32p05" }],
461
267
  ["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3", key: "mhlwft" }]
462
268
  ];
463
- const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$c);
269
+ const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$e);
464
270
  /**
465
271
  * @license lucide-react v0.552.0 - ISC
466
272
  *
467
273
  * This source code is licensed under the ISC license.
468
274
  * See the LICENSE file in the root directory of this source tree.
469
275
  */
470
- const __iconNode$b = [
276
+ const __iconNode$d = [
471
277
  [
472
278
  "path",
473
279
  {
@@ -480,14 +286,14 @@ const __iconNode$b = [
480
286
  ["path", { d: "M16 13H8", key: "t4e002" }],
481
287
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
482
288
  ];
483
- const FileText = createLucideIcon("file-text", __iconNode$b);
289
+ const FileText = createLucideIcon("file-text", __iconNode$d);
484
290
  /**
485
291
  * @license lucide-react v0.552.0 - ISC
486
292
  *
487
293
  * This source code is licensed under the ISC license.
488
294
  * See the LICENSE file in the root directory of this source tree.
489
295
  */
490
- const __iconNode$a = [
296
+ const __iconNode$c = [
491
297
  [
492
298
  "path",
493
299
  {
@@ -496,20 +302,63 @@ const __iconNode$a = [
496
302
  }
497
303
  ]
498
304
  ];
499
- const Folder = createLucideIcon("folder", __iconNode$a);
305
+ const Folder = createLucideIcon("folder", __iconNode$c);
500
306
  /**
501
307
  * @license lucide-react v0.552.0 - ISC
502
308
  *
503
309
  * This source code is licensed under the ISC license.
504
310
  * See the LICENSE file in the root directory of this source tree.
505
311
  */
506
- const __iconNode$9 = [
312
+ const __iconNode$b = [
507
313
  ["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
508
314
  ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
509
315
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
510
316
  ["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
511
317
  ];
512
- const GitBranch = createLucideIcon("git-branch", __iconNode$9);
318
+ const GitBranch = createLucideIcon("git-branch", __iconNode$b);
319
+ /**
320
+ * @license lucide-react v0.552.0 - ISC
321
+ *
322
+ * This source code is licensed under the ISC license.
323
+ * See the LICENSE file in the root directory of this source tree.
324
+ */
325
+ const __iconNode$a = [
326
+ [
327
+ "path",
328
+ {
329
+ 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",
330
+ key: "zw3jo"
331
+ }
332
+ ],
333
+ [
334
+ "path",
335
+ {
336
+ 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",
337
+ key: "1wduqc"
338
+ }
339
+ ],
340
+ [
341
+ "path",
342
+ {
343
+ 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",
344
+ key: "kqbvx6"
345
+ }
346
+ ]
347
+ ];
348
+ const Layers = createLucideIcon("layers", __iconNode$a);
349
+ /**
350
+ * @license lucide-react v0.552.0 - ISC
351
+ *
352
+ * This source code is licensed under the ISC license.
353
+ * See the LICENSE file in the root directory of this source tree.
354
+ */
355
+ const __iconNode$9 = [
356
+ ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
357
+ ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
358
+ ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
359
+ ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
360
+ ];
361
+ const LayoutGrid = createLucideIcon("layout-grid", __iconNode$9);
513
362
  /**
514
363
  * @license lucide-react v0.552.0 - ISC
515
364
  *
@@ -7816,7 +7665,7 @@ function TreeNode({
7816
7665
  node,
7817
7666
  style,
7818
7667
  dragHandle,
7819
- theme: theme2,
7668
+ theme,
7820
7669
  rightContent,
7821
7670
  extraContent,
7822
7671
  isSelectedDirectory = false,
@@ -7830,14 +7679,14 @@ function TreeNode({
7830
7679
  style: { marginRight: "4px", display: "flex", alignItems: "center" }
7831
7680
  }, node.isOpen ? /* @__PURE__ */ React2.createElement(ChevronDown, {
7832
7681
  size: 16,
7833
- color: theme2.colors.text
7682
+ color: theme.colors.text
7834
7683
  }) : /* @__PURE__ */ React2.createElement(ChevronRight, {
7835
7684
  size: 16,
7836
- color: theme2.colors.text
7685
+ color: theme.colors.text
7837
7686
  })) : null;
7838
- const backgroundColor = node.isSelected ? `${theme2.colors.primary}20` : isSelectedDirectory ? `${theme2.colors.primary}15` : isHovered ? `${theme2.colors.text}10` : "transparent";
7839
- const border = node.isSelected ? `1px solid ${theme2.colors.primary}` : "1px solid transparent";
7840
- const color = nameColor ? nameColor : node.isSelected || isSelectedDirectory ? theme2.colors.primary : theme2.colors.text;
7687
+ const backgroundColor = node.isSelected ? `${theme.colors.primary}20` : isSelectedDirectory ? `${theme.colors.primary}15` : isHovered ? `${theme.colors.text}10` : "transparent";
7688
+ const border = node.isSelected ? `1px solid ${theme.colors.primary}` : "1px solid transparent";
7689
+ const color = nameColor ? nameColor : node.isSelected || isSelectedDirectory ? theme.colors.primary : theme.colors.text;
7841
7690
  return /* @__PURE__ */ React2.createElement("div", {
7842
7691
  style: {
7843
7692
  ...style,
@@ -7879,7 +7728,7 @@ function TreeNode({
7879
7728
  style: { flexShrink: 0 }
7880
7729
  }, rightContent));
7881
7730
  }
7882
- var getGitStatusDisplay2 = (status, theme2) => {
7731
+ var getGitStatusDisplay2 = (status, theme) => {
7883
7732
  switch (status) {
7884
7733
  case "M":
7885
7734
  case "MM":
@@ -7887,7 +7736,7 @@ var getGitStatusDisplay2 = (status, theme2) => {
7887
7736
  icon: /* @__PURE__ */ React2.createElement(SquarePen, {
7888
7737
  size: 14
7889
7738
  }),
7890
- color: theme2.colors.primary || "#007bff",
7739
+ color: theme.colors.primary || "#007bff",
7891
7740
  label: "Modified"
7892
7741
  };
7893
7742
  case "A":
@@ -8012,7 +7861,7 @@ var countVisibleNodes2 = (nodes, openByDefault) => {
8012
7861
  };
8013
7862
  var GitStatusFileTree = ({
8014
7863
  fileTree,
8015
- theme: theme2,
7864
+ theme,
8016
7865
  gitStatusData,
8017
7866
  selectedDirectories = [],
8018
7867
  selectedFile,
@@ -8035,12 +7884,12 @@ var GitStatusFileTree = ({
8035
7884
  }, [gitStatusData]);
8036
7885
  const NodeRenderer = (props) => {
8037
7886
  const { node } = props;
8038
- const gitDisplay = node.data.gitStatus ? getGitStatusDisplay2(node.data.gitStatus, theme2) : null;
7887
+ const gitDisplay = node.data.gitStatus ? getGitStatusDisplay2(node.data.gitStatus, theme) : null;
8039
7888
  let nameColor;
8040
7889
  if (gitDisplay) {
8041
7890
  nameColor = gitDisplay.color;
8042
7891
  } else if (node.data.hasChangedChildren) {
8043
- const baseColor = theme2.colors.primary || "#007bff";
7892
+ const baseColor = theme.colors.primary || "#007bff";
8044
7893
  nameColor = baseColor + "80";
8045
7894
  }
8046
7895
  const rightContent = gitDisplay ? /* @__PURE__ */ React2.createElement("div", {
@@ -8060,7 +7909,7 @@ var GitStatusFileTree = ({
8060
7909
  }, node.data.gitStatus)) : null;
8061
7910
  return /* @__PURE__ */ React2.createElement(TreeNode, {
8062
7911
  ...props,
8063
- theme: theme2,
7912
+ theme,
8064
7913
  rightContent,
8065
7914
  nameColor,
8066
7915
  horizontalNodePadding,
@@ -8101,9 +7950,9 @@ var GitStatusFileTree = ({
8101
7950
  return /* @__PURE__ */ React2.createElement("div", {
8102
7951
  ref: containerRef,
8103
7952
  style: {
8104
- backgroundColor: transparentBackground ? "transparent" : theme2.colors.background,
8105
- color: theme2.colors.text,
8106
- fontFamily: theme2.fonts.body,
7953
+ backgroundColor: transparentBackground ? "transparent" : theme.colors.background,
7954
+ color: theme.colors.text,
7955
+ fontFamily: theme.fonts.body,
8107
7956
  ...autoHeight ? {} : { height: "100%" }
8108
7957
  }
8109
7958
  }, /* @__PURE__ */ React2.createElement(Tree, {
@@ -8244,7 +8093,7 @@ const GitChangesPanelContent = ({
8244
8093
  loadingMessage = "Loading git changes...",
8245
8094
  selectedFile
8246
8095
  }) => {
8247
- const { theme: theme2 } = useTheme();
8096
+ const { theme } = useTheme();
8248
8097
  const hasChanges = gitStatus.staged.length > 0 || gitStatus.unstaged.length > 0 || gitStatus.untracked.length > 0 || gitStatus.deleted.length > 0;
8249
8098
  const [showFullTree, setShowFullTree] = useState(false);
8250
8099
  const userHasToggledView = useRef(false);
@@ -8350,7 +8199,7 @@ const GitChangesPanelContent = ({
8350
8199
  style: {
8351
8200
  display: "flex",
8352
8201
  alignItems: "stretch",
8353
- backgroundColor: theme2.colors.backgroundTertiary,
8202
+ backgroundColor: theme.colors.backgroundTertiary,
8354
8203
  width: "100%"
8355
8204
  },
8356
8205
  children: [
@@ -8364,10 +8213,10 @@ const GitChangesPanelContent = ({
8364
8213
  style: {
8365
8214
  flex: 1,
8366
8215
  padding: "6px 12px",
8367
- fontSize: theme2.fontSizes[1],
8368
- backgroundColor: showFullTree ? theme2.colors.backgroundSecondary : "transparent",
8369
- color: showFullTree ? theme2.colors.text : theme2.colors.textSecondary,
8370
- border: showFullTree ? `1px solid ${theme2.colors.border}` : "1px solid transparent",
8216
+ fontSize: theme.fontSizes[1],
8217
+ backgroundColor: showFullTree ? theme.colors.backgroundSecondary : "transparent",
8218
+ color: showFullTree ? theme.colors.text : theme.colors.textSecondary,
8219
+ border: showFullTree ? `1px solid ${theme.colors.border}` : "1px solid transparent",
8371
8220
  cursor: "pointer",
8372
8221
  fontWeight: showFullTree ? 600 : 400,
8373
8222
  transition: "all 0.2s"
@@ -8385,10 +8234,10 @@ const GitChangesPanelContent = ({
8385
8234
  style: {
8386
8235
  flex: 1,
8387
8236
  padding: "6px 12px",
8388
- fontSize: theme2.fontSizes[1],
8389
- backgroundColor: !showFullTree ? theme2.colors.backgroundSecondary : "transparent",
8390
- color: !showFullTree ? theme2.colors.text : theme2.colors.textSecondary,
8391
- border: !showFullTree ? `1px solid ${theme2.colors.border}` : "1px solid transparent",
8237
+ fontSize: theme.fontSizes[1],
8238
+ backgroundColor: !showFullTree ? theme.colors.backgroundSecondary : "transparent",
8239
+ color: !showFullTree ? theme.colors.text : theme.colors.textSecondary,
8240
+ border: !showFullTree ? `1px solid ${theme.colors.border}` : "1px solid transparent",
8392
8241
  cursor: "pointer",
8393
8242
  fontWeight: !showFullTree ? 600 : 400,
8394
8243
  transition: "all 0.2s"
@@ -8407,7 +8256,7 @@ const GitChangesPanelContent = ({
8407
8256
  style: {
8408
8257
  padding: "20px",
8409
8258
  textAlign: "center",
8410
- color: theme2.colors.textSecondary
8259
+ color: theme.colors.textSecondary
8411
8260
  },
8412
8261
  children: loadingMessage
8413
8262
  }
@@ -8420,7 +8269,7 @@ const GitChangesPanelContent = ({
8420
8269
  style: {
8421
8270
  padding: "20px",
8422
8271
  textAlign: "center",
8423
- color: theme2.colors.textSecondary
8272
+ color: theme.colors.textSecondary
8424
8273
  },
8425
8274
  children: emptyMessage
8426
8275
  }
@@ -8433,7 +8282,7 @@ const GitChangesPanelContent = ({
8433
8282
  GitStatusFileTree,
8434
8283
  {
8435
8284
  fileTree: gitChangesData.tree,
8436
- theme: theme2,
8285
+ theme,
8437
8286
  gitStatusData: gitChangesData.statusData,
8438
8287
  onFileSelect: handleFileSelect,
8439
8288
  selectedFile,
@@ -8441,23 +8290,23 @@ const GitChangesPanelContent = ({
8441
8290
  horizontalNodePadding: "16px",
8442
8291
  openByDefault: !showFullTree
8443
8292
  },
8444
- `${showFullTree}-${gitChangesData.statusData.length}`
8293
+ showFullTree ? "full" : "changes"
8445
8294
  );
8446
8295
  };
8447
8296
  return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
8448
- /* @__PURE__ */ jsx("div", { style: { borderBottom: `1px solid ${theme2.colors.border}` }, children: /* @__PURE__ */ jsx(ToggleButtons, {}) }),
8297
+ /* @__PURE__ */ jsx("div", { style: { borderBottom: `1px solid ${theme.colors.border}` }, children: /* @__PURE__ */ jsx(ToggleButtons, {}) }),
8449
8298
  /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ jsx(Content, {}) })
8450
8299
  ] });
8451
8300
  };
8452
8301
  const GitChangesPanelPreview = () => {
8453
- const { theme: theme2 } = useTheme();
8302
+ const { theme } = useTheme();
8454
8303
  return /* @__PURE__ */ jsxs(
8455
8304
  "div",
8456
8305
  {
8457
8306
  style: {
8458
8307
  padding: "12px",
8459
8308
  fontSize: "12px",
8460
- color: theme2.colors.text,
8309
+ color: theme.colors.text,
8461
8310
  display: "flex",
8462
8311
  flexDirection: "column",
8463
8312
  gap: "6px"
@@ -8666,883 +8515,901 @@ const PackageManagerIcon = ({
8666
8515
  return /* @__PURE__ */ jsx(Package, { size: size2, color });
8667
8516
  }
8668
8517
  };
8669
- const PackageCard = ({
8670
- pkg,
8671
- isExpanded,
8672
- onToggle,
8673
- onCommandClick,
8674
- onConfigClick,
8675
- onPackageClick,
8676
- standalone = false
8518
+ const DependencyInfoModal = ({
8519
+ isOpen,
8520
+ onClose
8677
8521
  }) => {
8678
- const { theme: theme2 } = useTheme();
8679
- const [activeTab, setActiveTab] = useState("commands");
8680
- const configFiles = useMemo(() => {
8681
- if (!pkg.configFiles) return [];
8682
- return Object.entries(pkg.configFiles).filter(([, config]) => config == null ? void 0 : config.exists).map(([name, config]) => ({ name, ...config }));
8683
- }, [pkg.configFiles]);
8684
- const commands = pkg.packageData.availableCommands || [];
8685
- if (standalone) {
8686
- return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
8687
- /* @__PURE__ */ jsxs(
8522
+ const { theme } = useTheme();
8523
+ if (!isOpen) return null;
8524
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
8525
+ "div",
8526
+ {
8527
+ style: {
8528
+ position: "fixed",
8529
+ top: 0,
8530
+ left: 0,
8531
+ right: 0,
8532
+ bottom: 0,
8533
+ backgroundColor: theme.colors.muted,
8534
+ zIndex: theme.zIndices[4],
8535
+ display: "flex",
8536
+ alignItems: "center",
8537
+ justifyContent: "center"
8538
+ },
8539
+ onClick: onClose,
8540
+ children: /* @__PURE__ */ jsxs(
8688
8541
  "div",
8689
8542
  {
8690
8543
  style: {
8544
+ backgroundColor: theme.colors.background,
8545
+ borderRadius: `${theme.radii[3]}px`,
8546
+ maxWidth: "600px",
8547
+ maxHeight: "80vh",
8548
+ width: "90%",
8549
+ overflow: "hidden",
8691
8550
  display: "flex",
8692
- alignItems: "center",
8693
- gap: "8px",
8694
- padding: "12px 16px",
8695
- borderBottom: `1px solid ${theme2.colors.border}`
8551
+ flexDirection: "column",
8552
+ boxShadow: theme.shadows[3]
8696
8553
  },
8554
+ onClick: (e) => e.stopPropagation(),
8697
8555
  children: [
8698
- /* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: pkg.packageData.packageManager, size: 18 }),
8699
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
8700
- /* @__PURE__ */ jsx(
8701
- "div",
8702
- {
8703
- style: {
8704
- fontSize: theme2.fontSizes[2],
8705
- fontWeight: 600,
8706
- color: theme2.colors.text,
8707
- overflow: "hidden",
8708
- textOverflow: "ellipsis",
8709
- whiteSpace: "nowrap"
8710
- },
8711
- children: pkg.packageData.name
8712
- }
8713
- ),
8714
- pkg.packageData.version && /* @__PURE__ */ jsxs(
8715
- "div",
8716
- {
8717
- style: {
8718
- fontSize: theme2.fontSizes[0],
8719
- color: theme2.colors.textSecondary
8720
- },
8721
- children: [
8722
- "v",
8723
- pkg.packageData.version
8724
- ]
8725
- }
8726
- )
8727
- ] }),
8728
- pkg.packageData.path && /* @__PURE__ */ jsxs(
8729
- "button",
8556
+ /* @__PURE__ */ jsxs(
8557
+ "div",
8730
8558
  {
8731
- onClick: () => onPackageClick == null ? void 0 : onPackageClick(pkg.packageData.path),
8732
8559
  style: {
8560
+ padding: `${theme.space[4]}px`,
8561
+ borderBottom: `1px solid ${theme.colors.border}`,
8733
8562
  display: "flex",
8734
8563
  alignItems: "center",
8735
- gap: "4px",
8736
- padding: "4px 8px",
8737
- backgroundColor: theme2.colors.backgroundTertiary,
8738
- border: `1px solid ${theme2.colors.border}`,
8739
- borderRadius: "4px",
8740
- color: theme2.colors.textSecondary,
8741
- fontSize: theme2.fontSizes[0],
8742
- cursor: "pointer"
8564
+ justifyContent: "space-between"
8743
8565
  },
8744
- title: "Open package folder",
8745
8566
  children: [
8746
- /* @__PURE__ */ jsx(Folder, { size: 12 }),
8747
- pkg.packageData.path || "/"
8567
+ /* @__PURE__ */ jsxs(
8568
+ "h2",
8569
+ {
8570
+ style: {
8571
+ fontSize: `${theme.fontSizes[4]}px`,
8572
+ fontWeight: theme.fontWeights.semibold,
8573
+ color: theme.colors.text,
8574
+ display: "flex",
8575
+ alignItems: "center",
8576
+ gap: `${theme.space[2]}px`,
8577
+ margin: 0
8578
+ },
8579
+ children: [
8580
+ /* @__PURE__ */ jsx(CircleQuestionMark, { size: 20 }),
8581
+ "Understanding Dependencies"
8582
+ ]
8583
+ }
8584
+ ),
8585
+ /* @__PURE__ */ jsx(
8586
+ "button",
8587
+ {
8588
+ onClick: onClose,
8589
+ style: {
8590
+ background: "none",
8591
+ border: "none",
8592
+ color: theme.colors.textSecondary,
8593
+ cursor: "pointer",
8594
+ padding: `${theme.space[1]}px`
8595
+ },
8596
+ children: /* @__PURE__ */ jsx(X, { size: 20 })
8597
+ }
8598
+ )
8748
8599
  ]
8749
8600
  }
8750
- )
8751
- ]
8752
- }
8753
- ),
8754
- /* @__PURE__ */ jsx(
8755
- "div",
8756
- {
8757
- style: {
8758
- display: "flex",
8759
- backgroundColor: theme2.colors.backgroundTertiary,
8760
- borderBottom: `1px solid ${theme2.colors.border}`
8761
- },
8762
- children: [
8763
- { id: "commands", label: "Commands", count: commands.length },
8764
- { id: "configs", label: "Configs", count: configFiles.length }
8765
- ].map((tab) => /* @__PURE__ */ jsxs(
8766
- "button",
8767
- {
8768
- onClick: () => setActiveTab(tab.id),
8769
- style: {
8770
- flex: 1,
8771
- padding: "8px 12px",
8772
- backgroundColor: activeTab === tab.id ? theme2.colors.backgroundSecondary : "transparent",
8773
- border: "none",
8774
- borderBottom: activeTab === tab.id ? `2px solid ${theme2.colors.accent}` : "2px solid transparent",
8775
- color: activeTab === tab.id ? theme2.colors.text : theme2.colors.textSecondary,
8776
- fontSize: theme2.fontSizes[1],
8777
- cursor: "pointer",
8778
- display: "flex",
8779
- alignItems: "center",
8780
- justifyContent: "center",
8781
- gap: "6px"
8782
- },
8783
- children: [
8784
- tab.label,
8785
- /* @__PURE__ */ jsx(
8786
- "span",
8787
- {
8788
- style: {
8789
- backgroundColor: theme2.colors.backgroundTertiary,
8790
- padding: "1px 6px",
8791
- borderRadius: "10px",
8792
- fontSize: theme2.fontSizes[0]
8793
- },
8794
- children: tab.count
8795
- }
8796
- )
8797
- ]
8798
- },
8799
- tab.id
8800
- ))
8601
+ ),
8602
+ /* @__PURE__ */ jsxs(
8603
+ "div",
8604
+ {
8605
+ style: {
8606
+ padding: `${theme.space[4]}px`,
8607
+ overflow: "auto",
8608
+ flex: 1
8609
+ },
8610
+ children: [
8611
+ /* @__PURE__ */ jsxs(
8612
+ Section,
8613
+ {
8614
+ icon: /* @__PURE__ */ jsx(Package, { size: 18 }),
8615
+ title: "Dependency Types",
8616
+ theme,
8617
+ children: [
8618
+ /* @__PURE__ */ jsx(
8619
+ InfoItem,
8620
+ {
8621
+ badge: { text: "prod", color: theme.colors.primary },
8622
+ title: "Production Dependencies",
8623
+ description: "Required for your application to run in production. These are bundled with your app and affect its size and security.",
8624
+ theme
8625
+ }
8626
+ ),
8627
+ /* @__PURE__ */ jsx(
8628
+ InfoItem,
8629
+ {
8630
+ badge: { text: "dev", color: theme.colors.secondary },
8631
+ title: "Development Dependencies",
8632
+ description: "Only needed during development (build tools, testing, linters). Not included in production builds.",
8633
+ theme
8634
+ }
8635
+ ),
8636
+ /* @__PURE__ */ jsx(
8637
+ InfoItem,
8638
+ {
8639
+ badge: { text: "peer", color: theme.colors.accent },
8640
+ title: "Peer Dependencies",
8641
+ description: "Expected to be provided by the consumer of your package. Important for library authors to specify compatibility.",
8642
+ theme
8643
+ }
8644
+ )
8645
+ ]
8646
+ }
8647
+ ),
8648
+ /* @__PURE__ */ jsxs(
8649
+ Section,
8650
+ {
8651
+ icon: /* @__PURE__ */ jsx(Scale, { size: 18 }),
8652
+ title: "Common Licenses",
8653
+ theme,
8654
+ children: [
8655
+ /* @__PURE__ */ jsx(
8656
+ InfoItem,
8657
+ {
8658
+ badge: { text: "MIT", color: theme.colors.success },
8659
+ title: "Permissive Licenses (MIT, Apache, BSD)",
8660
+ description: "Few restrictions. Can use in commercial projects. Must include copyright notice.",
8661
+ theme
8662
+ }
8663
+ ),
8664
+ /* @__PURE__ */ jsx(
8665
+ InfoItem,
8666
+ {
8667
+ badge: { text: "GPL", color: theme.colors.warning },
8668
+ title: "Copyleft Licenses (GPL, LGPL, AGPL)",
8669
+ description: "Requires sharing source code of derivative works. Can impact your project's licensing.",
8670
+ theme
8671
+ }
8672
+ )
8673
+ ]
8674
+ }
8675
+ )
8676
+ ]
8677
+ }
8678
+ )
8679
+ ]
8680
+ }
8681
+ )
8682
+ }
8683
+ ) });
8684
+ };
8685
+ const Section = ({ icon, title, theme, children }) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: `${theme.space[5]}px` }, children: [
8686
+ /* @__PURE__ */ jsxs(
8687
+ "h3",
8688
+ {
8689
+ style: {
8690
+ fontSize: `${theme.fontSizes[2]}px`,
8691
+ fontWeight: theme.fontWeights.semibold,
8692
+ color: theme.colors.text,
8693
+ marginBottom: `${theme.space[3]}px`,
8694
+ display: "flex",
8695
+ alignItems: "center",
8696
+ gap: `${theme.space[2]}px`
8697
+ },
8698
+ children: [
8699
+ icon,
8700
+ title
8701
+ ]
8702
+ }
8703
+ ),
8704
+ /* @__PURE__ */ jsx(
8705
+ "div",
8706
+ {
8707
+ style: {
8708
+ display: "flex",
8709
+ flexDirection: "column",
8710
+ gap: `${theme.space[2]}px`
8711
+ },
8712
+ children
8713
+ }
8714
+ )
8715
+ ] });
8716
+ const InfoItem = ({ badge, title, description, theme }) => /* @__PURE__ */ jsxs(
8717
+ "div",
8718
+ {
8719
+ style: {
8720
+ padding: `${theme.space[3]}px`,
8721
+ backgroundColor: theme.colors.backgroundSecondary,
8722
+ borderRadius: `${theme.radii[2]}px`,
8723
+ border: `1px solid ${theme.colors.border}`
8724
+ },
8725
+ children: [
8726
+ /* @__PURE__ */ jsxs(
8727
+ "div",
8728
+ {
8729
+ style: {
8730
+ display: "flex",
8731
+ alignItems: "center",
8732
+ gap: `${theme.space[2]}px`,
8733
+ marginBottom: `${theme.space[1]}px`
8734
+ },
8735
+ children: [
8736
+ /* @__PURE__ */ jsx(
8737
+ "span",
8738
+ {
8739
+ style: {
8740
+ padding: `${theme.space[1]}px ${theme.space[2]}px`,
8741
+ borderRadius: `${theme.radii[1]}px`,
8742
+ fontSize: `${theme.fontSizes[0]}px`,
8743
+ fontWeight: theme.fontWeights.medium,
8744
+ backgroundColor: `${badge.color}20`,
8745
+ color: badge.color
8746
+ },
8747
+ children: badge.text
8748
+ }
8749
+ ),
8750
+ /* @__PURE__ */ jsx(
8751
+ "span",
8752
+ {
8753
+ style: {
8754
+ fontSize: `${theme.fontSizes[1]}px`,
8755
+ fontWeight: theme.fontWeights.medium,
8756
+ color: theme.colors.text
8757
+ },
8758
+ children: title
8759
+ }
8760
+ )
8761
+ ]
8801
8762
  }
8802
8763
  ),
8803
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, padding: "12px", overflow: "auto" }, children: [
8804
- activeTab === "commands" && /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: commands.length === 0 ? /* @__PURE__ */ jsx("div", { style: { color: theme2.colors.textSecondary, fontSize: theme2.fontSizes[1] }, children: "No commands available" }) : commands.map((cmd, idx) => /* @__PURE__ */ jsxs(
8805
- "button",
8764
+ /* @__PURE__ */ jsx(
8765
+ "div",
8766
+ {
8767
+ style: {
8768
+ fontSize: `${theme.fontSizes[1]}px`,
8769
+ color: theme.colors.textSecondary,
8770
+ lineHeight: theme.lineHeights.relaxed
8771
+ },
8772
+ children: description
8773
+ }
8774
+ )
8775
+ ]
8776
+ }
8777
+ );
8778
+ const DependencyRow = ({ dependency }) => {
8779
+ const { theme } = useTheme();
8780
+ const [isHovered, setIsHovered] = useState(false);
8781
+ const [copied, setCopied] = useState(false);
8782
+ const getDependencyTypeBadgeStyle = (type) => {
8783
+ const baseStyle = {
8784
+ padding: `${theme.space[1]}px ${theme.space[2]}px`,
8785
+ borderRadius: `${theme.radii[1]}px`,
8786
+ fontSize: `${theme.fontSizes[0]}px`,
8787
+ fontWeight: theme.fontWeights.medium,
8788
+ minWidth: "36px",
8789
+ textAlign: "center"
8790
+ };
8791
+ switch (type) {
8792
+ case "production":
8793
+ return {
8794
+ ...baseStyle,
8795
+ backgroundColor: `${theme.colors.primary}20`,
8796
+ color: theme.colors.primary
8797
+ };
8798
+ case "development":
8799
+ return {
8800
+ ...baseStyle,
8801
+ backgroundColor: `${theme.colors.secondary}20`,
8802
+ color: theme.colors.secondary
8803
+ };
8804
+ case "peer":
8805
+ return {
8806
+ ...baseStyle,
8807
+ backgroundColor: `${theme.colors.accent}20`,
8808
+ color: theme.colors.accent
8809
+ };
8810
+ default:
8811
+ return {
8812
+ ...baseStyle,
8813
+ backgroundColor: theme.colors.backgroundLight,
8814
+ color: theme.colors.textSecondary
8815
+ };
8816
+ }
8817
+ };
8818
+ const handleCopy = async (e) => {
8819
+ e.preventDefault();
8820
+ e.stopPropagation();
8821
+ try {
8822
+ const copyText = `${dependency.name}@${dependency.version}`;
8823
+ await navigator.clipboard.writeText(copyText);
8824
+ setCopied(true);
8825
+ setTimeout(() => setCopied(false), 2e3);
8826
+ } catch (err) {
8827
+ console.error("Failed to copy:", err);
8828
+ }
8829
+ };
8830
+ const actionButtonStyle = {
8831
+ padding: `${theme.space[1]}px`,
8832
+ borderRadius: `${theme.radii[1]}px`,
8833
+ display: "flex",
8834
+ alignItems: "center",
8835
+ justifyContent: "center",
8836
+ border: "none",
8837
+ backgroundColor: "transparent",
8838
+ cursor: "pointer",
8839
+ transition: "all 0.15s ease",
8840
+ opacity: isHovered ? 1 : 0,
8841
+ pointerEvents: isHovered ? "auto" : "none"
8842
+ };
8843
+ return /* @__PURE__ */ jsxs(
8844
+ "div",
8845
+ {
8846
+ style: {
8847
+ display: "flex",
8848
+ alignItems: "center",
8849
+ justifyContent: "space-between",
8850
+ padding: `${theme.space[2]}px ${theme.space[3]}px`,
8851
+ backgroundColor: theme.colors.background,
8852
+ borderRadius: `${theme.radii[1]}px`,
8853
+ fontSize: `${theme.fontSizes[1]}px`,
8854
+ border: `1px solid ${theme.colors.border}`,
8855
+ transition: "all 0.2s"
8856
+ },
8857
+ onMouseEnter: () => setIsHovered(true),
8858
+ onMouseLeave: () => setIsHovered(false),
8859
+ children: [
8860
+ /* @__PURE__ */ jsxs(
8861
+ "div",
8806
8862
  {
8807
- onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path),
8808
8863
  style: {
8809
8864
  display: "flex",
8810
8865
  alignItems: "center",
8811
- gap: "8px",
8812
- padding: "8px 12px",
8813
- backgroundColor: theme2.colors.backgroundTertiary,
8814
- border: `1px solid ${theme2.colors.border}`,
8815
- borderRadius: "6px",
8816
- color: theme2.colors.text,
8817
- cursor: "pointer",
8818
- textAlign: "left"
8866
+ gap: `${theme.space[2]}px`,
8867
+ flex: 1,
8868
+ minWidth: 0
8819
8869
  },
8820
8870
  children: [
8821
- /* @__PURE__ */ jsx(Terminal, { size: 14, color: theme2.colors.accent }),
8822
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
8823
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: cmd.name }),
8824
- /* @__PURE__ */ jsx(
8825
- "div",
8826
- {
8827
- style: {
8828
- fontSize: theme2.fontSizes[0],
8829
- color: theme2.colors.textSecondary,
8830
- fontFamily: "monospace",
8831
- overflow: "hidden",
8832
- textOverflow: "ellipsis",
8833
- whiteSpace: "nowrap"
8834
- },
8835
- children: cmd.command
8836
- }
8837
- )
8838
- ] }),
8839
- cmd.isLensCommand && /* @__PURE__ */ jsx(
8871
+ /* @__PURE__ */ jsx("span", { style: getDependencyTypeBadgeStyle(dependency.dependencyType), children: dependency.dependencyType === "production" ? "prod" : dependency.dependencyType === "development" ? "dev" : "peer" }),
8872
+ /* @__PURE__ */ jsx(
8840
8873
  "span",
8841
8874
  {
8842
8875
  style: {
8843
- padding: "2px 6px",
8844
- backgroundColor: theme2.colors.accent + "20",
8845
- color: theme2.colors.accent,
8846
- borderRadius: "4px",
8847
- fontSize: theme2.fontSizes[0]
8876
+ fontWeight: theme.fontWeights.medium,
8877
+ color: theme.colors.text,
8878
+ overflow: "hidden",
8879
+ textOverflow: "ellipsis",
8880
+ whiteSpace: "nowrap"
8848
8881
  },
8849
- children: cmd.lensId
8882
+ children: dependency.name
8850
8883
  }
8851
8884
  ),
8852
- /* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme2.colors.textSecondary })
8885
+ /* @__PURE__ */ jsx(
8886
+ "a",
8887
+ {
8888
+ href: `https://www.npmjs.com/package/${dependency.name}`,
8889
+ target: "_blank",
8890
+ rel: "noopener noreferrer",
8891
+ style: {
8892
+ ...actionButtonStyle,
8893
+ color: theme.colors.textSecondary,
8894
+ textDecoration: "none",
8895
+ flexShrink: 0
8896
+ },
8897
+ title: "View on npm",
8898
+ children: /* @__PURE__ */ jsx(ExternalLink, { size: 12 })
8899
+ }
8900
+ )
8853
8901
  ]
8854
- },
8855
- idx
8856
- )) }),
8857
- activeTab === "configs" && /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: configFiles.length === 0 ? /* @__PURE__ */ jsx("div", { style: { color: theme2.colors.textSecondary, fontSize: theme2.fontSizes[1] }, children: "No config files detected" }) : configFiles.map((config, idx) => /* @__PURE__ */ jsxs(
8858
- "button",
8902
+ }
8903
+ ),
8904
+ /* @__PURE__ */ jsxs(
8905
+ "div",
8859
8906
  {
8860
- onClick: () => onConfigClick == null ? void 0 : onConfigClick(config),
8861
8907
  style: {
8862
8908
  display: "flex",
8863
8909
  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"
8910
+ gap: "4px"
8872
8911
  },
8873
8912
  children: [
8874
- /* @__PURE__ */ jsx(Settings, { size: 14, color: theme2.colors.textSecondary }),
8875
- /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
8876
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme2.fontSizes[1] }, children: config.name }),
8877
- /* @__PURE__ */ jsx(
8878
- "div",
8879
- {
8880
- style: {
8881
- fontSize: theme2.fontSizes[0],
8882
- color: theme2.colors.textSecondary,
8883
- fontFamily: "monospace"
8884
- },
8885
- children: config.path
8886
- }
8887
- )
8888
- ] }),
8889
- config.isInline && /* @__PURE__ */ jsx(
8890
- "span",
8913
+ /* @__PURE__ */ jsx(
8914
+ "button",
8891
8915
  {
8916
+ type: "button",
8917
+ onClick: handleCopy,
8892
8918
  style: {
8893
- padding: "2px 6px",
8894
- backgroundColor: theme2.colors.textSecondary + "20",
8895
- color: theme2.colors.textSecondary,
8896
- borderRadius: "4px",
8897
- fontSize: theme2.fontSizes[0]
8919
+ ...actionButtonStyle,
8920
+ color: copied ? theme.colors.success || "#10b981" : theme.colors.textSecondary
8898
8921
  },
8899
- children: "inline"
8922
+ title: copied ? "Copied!" : `Copy ${dependency.name}@${dependency.version}`,
8923
+ children: copied ? /* @__PURE__ */ jsx(Check, { size: 12 }) : /* @__PURE__ */ jsx(Copy, { size: 12 })
8900
8924
  }
8901
- )
8925
+ ),
8926
+ /* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary }, children: dependency.version })
8902
8927
  ]
8903
- },
8904
- idx
8905
- )) })
8906
- ] })
8907
- ] });
8908
- }
8928
+ }
8929
+ )
8930
+ ]
8931
+ }
8932
+ );
8933
+ };
8934
+ const FilterBar = ({
8935
+ activeFilters,
8936
+ onToggleFilter,
8937
+ searchQuery,
8938
+ onSearchChange,
8939
+ counts
8940
+ }) => {
8941
+ const { theme } = useTheme();
8942
+ const availableFilters = [
8943
+ ...counts.peer > 0 ? ["peer"] : [],
8944
+ ...counts.production > 0 ? ["production"] : [],
8945
+ ...counts.development > 0 ? ["development"] : []
8946
+ ];
8947
+ const showFilters = availableFilters.length > 1;
8909
8948
  return /* @__PURE__ */ jsxs(
8910
8949
  "div",
8911
8950
  {
8912
8951
  style: {
8913
- backgroundColor: theme2.colors.backgroundSecondary,
8914
- borderRadius: "8px",
8915
- border: `1px solid ${theme2.colors.border}`,
8916
- overflow: "hidden"
8952
+ display: "flex",
8953
+ flexDirection: "column",
8954
+ gap: `${theme.space[2]}px`
8917
8955
  },
8918
8956
  children: [
8919
8957
  /* @__PURE__ */ jsxs(
8920
- "button",
8958
+ "div",
8921
8959
  {
8922
- onClick: onToggle,
8923
8960
  style: {
8924
- width: "100%",
8961
+ position: "relative",
8925
8962
  display: "flex",
8926
- alignItems: "center",
8927
- gap: "8px",
8928
- padding: "12px 16px",
8929
- backgroundColor: "transparent",
8930
- border: "none",
8931
- cursor: "pointer",
8932
- color: theme2.colors.text,
8933
- textAlign: "left"
8963
+ alignItems: "center"
8934
8964
  },
8935
8965
  children: [
8936
- isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 16, color: theme2.colors.textSecondary }) : /* @__PURE__ */ jsx(ChevronRight, { size: 16, color: theme2.colors.textSecondary }),
8937
- /* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: pkg.packageData.packageManager, size: 18 }),
8938
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
8939
- /* @__PURE__ */ jsx(
8940
- "div",
8941
- {
8942
- style: {
8943
- fontSize: theme2.fontSizes[2],
8944
- fontWeight: 600,
8945
- overflow: "hidden",
8946
- textOverflow: "ellipsis",
8947
- whiteSpace: "nowrap"
8948
- },
8949
- children: pkg.packageData.name
8966
+ /* @__PURE__ */ jsx(
8967
+ Search,
8968
+ {
8969
+ size: 14,
8970
+ style: {
8971
+ position: "absolute",
8972
+ left: `${theme.space[3]}px`,
8973
+ color: theme.colors.textSecondary,
8974
+ pointerEvents: "none"
8950
8975
  }
8951
- ),
8952
- pkg.packageData.version && /* @__PURE__ */ jsxs(
8953
- "div",
8954
- {
8955
- style: {
8956
- fontSize: theme2.fontSizes[0],
8957
- color: theme2.colors.textSecondary
8958
- },
8959
- children: [
8960
- "v",
8961
- pkg.packageData.version
8962
- ]
8976
+ }
8977
+ ),
8978
+ /* @__PURE__ */ jsx(
8979
+ "input",
8980
+ {
8981
+ type: "text",
8982
+ placeholder: "Search dependencies...",
8983
+ value: searchQuery,
8984
+ onChange: (e) => onSearchChange(e.target.value),
8985
+ style: {
8986
+ width: "100%",
8987
+ padding: `${theme.space[2]}px ${theme.space[5]}px`,
8988
+ borderRadius: `${theme.radii[2]}px`,
8989
+ border: `1px solid ${theme.colors.border}`,
8990
+ backgroundColor: theme.colors.backgroundSecondary,
8991
+ color: theme.colors.text,
8992
+ fontSize: `${theme.fontSizes[1]}px`,
8993
+ fontFamily: theme.fonts.body,
8994
+ outline: "none",
8995
+ transition: "all 0.2s"
8963
8996
  }
8964
- )
8965
- ] }),
8966
- pkg.packageData.path && /* @__PURE__ */ jsxs(
8997
+ }
8998
+ ),
8999
+ searchQuery && /* @__PURE__ */ jsx(
8967
9000
  "button",
8968
9001
  {
8969
- onClick: (e) => {
8970
- e.stopPropagation();
8971
- onPackageClick == null ? void 0 : onPackageClick(pkg.packageData.path);
8972
- },
9002
+ onClick: () => onSearchChange(""),
8973
9003
  style: {
9004
+ position: "absolute",
9005
+ right: `${theme.space[2]}px`,
9006
+ padding: `${theme.space[1]}px`,
8974
9007
  display: "flex",
8975
9008
  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"
9009
+ justifyContent: "center",
9010
+ backgroundColor: "transparent",
9011
+ border: "none",
9012
+ cursor: "pointer",
9013
+ borderRadius: `${theme.radii[1]}px`
8984
9014
  },
8985
- title: "Open package folder",
8986
- children: [
8987
- /* @__PURE__ */ jsx(Folder, { size: 12 }),
8988
- pkg.packageData.path || "/"
8989
- ]
9015
+ title: "Clear search",
9016
+ children: /* @__PURE__ */ jsx(X, { size: 14, color: theme.colors.textSecondary })
8990
9017
  }
8991
9018
  )
8992
9019
  ]
8993
9020
  }
8994
9021
  ),
8995
- isExpanded && /* @__PURE__ */ jsxs("div", { style: { borderTop: `1px solid ${theme2.colors.border}` }, children: [
8996
- /* @__PURE__ */ jsx(
8997
- "div",
9022
+ showFilters && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: `${theme.space[1]}px`, width: "100%" }, children: availableFilters.map((type) => {
9023
+ const isActive = activeFilters.has(type);
9024
+ return /* @__PURE__ */ jsxs(
9025
+ "button",
8998
9026
  {
9027
+ onClick: () => onToggleFilter(type),
8999
9028
  style: {
9000
- display: "flex",
9001
- backgroundColor: theme2.colors.backgroundTertiary,
9002
- borderBottom: `1px solid ${theme2.colors.border}`
9029
+ flex: 1,
9030
+ padding: `${theme.space[1]}px ${theme.space[2]}px`,
9031
+ fontSize: `${theme.fontSizes[0]}px`,
9032
+ fontWeight: theme.fontWeights.medium,
9033
+ fontFamily: theme.fonts.body,
9034
+ borderRadius: `${theme.radii[1]}px`,
9035
+ border: `1px solid ${isActive ? theme.colors.primary : theme.colors.border}`,
9036
+ backgroundColor: isActive ? `${theme.colors.primary}20` : theme.colors.backgroundSecondary,
9037
+ color: isActive ? theme.colors.primary : theme.colors.text,
9038
+ cursor: "pointer",
9039
+ transition: "all 0.2s"
9003
9040
  },
9004
9041
  children: [
9005
- { id: "commands", label: "Commands", count: commands.length },
9006
- { id: "configs", label: "Configs", count: configFiles.length }
9007
- ].map((tab) => /* @__PURE__ */ jsxs(
9008
- "button",
9009
- {
9010
- onClick: () => setActiveTab(tab.id),
9011
- style: {
9012
- flex: 1,
9013
- padding: "8px 12px",
9014
- backgroundColor: activeTab === tab.id ? theme2.colors.backgroundSecondary : "transparent",
9015
- border: "none",
9016
- borderBottom: activeTab === tab.id ? `2px solid ${theme2.colors.accent}` : "2px solid transparent",
9017
- color: activeTab === tab.id ? theme2.colors.text : theme2.colors.textSecondary,
9018
- fontSize: theme2.fontSizes[1],
9019
- cursor: "pointer",
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
- ] })
9150
- ]
9151
- }
9152
- );
9153
- };
9154
- const PackageCompositionPanelContent = ({
9155
- packages,
9156
- isLoading = false,
9157
- emptyMessage = "No packages detected",
9158
- onCommandClick,
9159
- onConfigClick,
9160
- onPackageClick
9161
- }) => {
9162
- const { theme: theme2 } = useTheme();
9163
- const [expandedPackages, setExpandedPackages] = useState(/* @__PURE__ */ new Set());
9164
- const togglePackage = (packageId) => {
9165
- setExpandedPackages((prev) => {
9166
- const next = new Set(prev);
9167
- if (next.has(packageId)) {
9168
- next.delete(packageId);
9169
- } else {
9170
- next.add(packageId);
9171
- }
9172
- return next;
9173
- });
9174
- };
9175
- React2.useEffect(() => {
9176
- if (packages.length > 0 && expandedPackages.size === 0) {
9177
- setExpandedPackages(/* @__PURE__ */ new Set([packages[0].id]));
9042
+ type === "production" ? "Prod" : type === "development" ? "Dev" : "Peer",
9043
+ /* @__PURE__ */ jsxs(
9044
+ "span",
9045
+ {
9046
+ style: { marginLeft: `${theme.space[1]}px`, opacity: 0.7 },
9047
+ children: [
9048
+ "(",
9049
+ counts[type],
9050
+ ")"
9051
+ ]
9052
+ }
9053
+ )
9054
+ ]
9055
+ },
9056
+ type
9057
+ );
9058
+ }) })
9059
+ ]
9178
9060
  }
9179
- }, [packages, expandedPackages.size]);
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
- );
9061
+ );
9062
+ };
9063
+ const dependencyTypeOrder = {
9064
+ peer: 0,
9065
+ production: 1,
9066
+ development: 2
9067
+ };
9068
+ function extractDependencies(packageLayer) {
9069
+ const { dependencies, devDependencies, peerDependencies } = packageLayer.packageData;
9070
+ const items2 = [];
9071
+ if (dependencies) {
9072
+ Object.entries(dependencies).forEach(([name, version]) => {
9073
+ items2.push({ name, version, dependencyType: "production" });
9074
+ });
9192
9075
  }
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
- );
9076
+ if (devDependencies) {
9077
+ Object.entries(devDependencies).forEach(([name, version]) => {
9078
+ items2.push({ name, version, dependencyType: "development" });
9079
+ });
9205
9080
  }
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
- );
9081
+ if (peerDependencies) {
9082
+ Object.entries(peerDependencies).forEach(([name, version]) => {
9083
+ items2.push({ name, version, dependencyType: "peer" });
9084
+ });
9225
9085
  }
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
- ]
9289
- }
9086
+ return items2.sort((a, b) => {
9087
+ const typeCompare = dependencyTypeOrder[a.dependencyType] - dependencyTypeOrder[b.dependencyType];
9088
+ if (typeCompare !== 0) return typeCompare;
9089
+ return a.name.localeCompare(b.name);
9090
+ });
9091
+ }
9092
+ function findInternalDependencies(pkg, allPackages) {
9093
+ const currentName = pkg.packageData.name;
9094
+ const allDeps = /* @__PURE__ */ new Set([
9095
+ ...Object.keys(pkg.packageData.dependencies || {}),
9096
+ ...Object.keys(pkg.packageData.devDependencies || {}),
9097
+ ...Object.keys(pkg.packageData.peerDependencies || {})
9098
+ ]);
9099
+ const dependsOn = allPackages.filter(
9100
+ (p) => p.packageData.name !== currentName && allDeps.has(p.packageData.name)
9290
9101
  );
9291
- };
9292
- const PackageCompositionPanel = ({ context }) => {
9102
+ const usedBy = allPackages.filter((other) => {
9103
+ if (other.packageData.name === currentName) return false;
9104
+ const otherDeps = /* @__PURE__ */ new Set([
9105
+ ...Object.keys(other.packageData.dependencies || {}),
9106
+ ...Object.keys(other.packageData.devDependencies || {}),
9107
+ ...Object.keys(other.packageData.peerDependencies || {})
9108
+ ]);
9109
+ return otherDeps.has(currentName);
9110
+ });
9111
+ return { dependsOn, usedBy };
9112
+ }
9113
+ const PackageSummaryCard = ({ pkg, allPackages, onClick }) => {
9293
9114
  var _a;
9294
- const packagesSlice = context.getSlice("packages");
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
9302
- }
9115
+ const { theme } = useTheme();
9116
+ const deps = pkg.packageData.dependencies || {};
9117
+ const devDeps = pkg.packageData.devDependencies || {};
9118
+ const peerDeps = pkg.packageData.peerDependencies || {};
9119
+ const totalDeps = Object.keys(deps).length + Object.keys(devDeps).length + Object.keys(peerDeps).length;
9120
+ const configFiles = pkg.configFiles ? Object.values(pkg.configFiles).filter((c) => c == null ? void 0 : c.exists).length : 0;
9121
+ const commands = ((_a = pkg.packageData.availableCommands) == null ? void 0 : _a.length) || 0;
9122
+ const { dependsOn, usedBy } = useMemo(
9123
+ () => findInternalDependencies(pkg, allPackages),
9124
+ [pkg, allPackages]
9303
9125
  );
9304
- };
9305
- const DependencyInfoModal = ({
9306
- isOpen,
9307
- onClose
9308
- }) => {
9309
- const { theme: theme2 } = useTheme();
9310
- if (!isOpen) return null;
9311
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
9312
- "div",
9126
+ const hasInternalDeps = dependsOn.length > 0 || usedBy.length > 0;
9127
+ const packageRole = useMemo(() => {
9128
+ if (dependsOn.length === 0 && usedBy.length === 0) {
9129
+ return null;
9130
+ }
9131
+ if (dependsOn.length === 0 && usedBy.length > 0) {
9132
+ return { label: "core", icon: Box, color: "#10b981" };
9133
+ }
9134
+ if (dependsOn.length > 0 && usedBy.length === 0) {
9135
+ return { label: "app", icon: Layers, color: "#8b5cf6" };
9136
+ }
9137
+ return { label: "shared", icon: LayoutGrid, color: "#f59e0b" };
9138
+ }, [dependsOn.length, usedBy.length]);
9139
+ return /* @__PURE__ */ jsxs(
9140
+ "button",
9313
9141
  {
9142
+ onClick,
9314
9143
  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
9144
  display: "flex",
9323
- alignItems: "center",
9324
- justifyContent: "center"
9145
+ flexDirection: "column",
9146
+ gap: "8px",
9147
+ padding: "12px",
9148
+ backgroundColor: theme.colors.backgroundSecondary,
9149
+ border: `1px solid ${theme.colors.border}`,
9150
+ borderRadius: "8px",
9151
+ cursor: "pointer",
9152
+ textAlign: "left",
9153
+ transition: "all 0.15s ease",
9154
+ width: "100%"
9325
9155
  },
9326
- onClick: onClose,
9327
- children: /* @__PURE__ */ jsxs(
9328
- "div",
9329
- {
9330
- 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
- display: "flex",
9338
- flexDirection: "column",
9339
- boxShadow: theme2.shadows[3]
9340
- },
9341
- onClick: (e) => e.stopPropagation(),
9342
- children: [
9343
- /* @__PURE__ */ jsxs(
9156
+ onMouseEnter: (e) => {
9157
+ e.currentTarget.style.borderColor = theme.colors.accent;
9158
+ e.currentTarget.style.backgroundColor = theme.colors.backgroundTertiary;
9159
+ },
9160
+ onMouseLeave: (e) => {
9161
+ e.currentTarget.style.borderColor = theme.colors.border;
9162
+ e.currentTarget.style.backgroundColor = theme.colors.backgroundSecondary;
9163
+ },
9164
+ children: [
9165
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
9166
+ /* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: pkg.packageData.packageManager, size: 20 }),
9167
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
9168
+ /* @__PURE__ */ jsx(
9344
9169
  "div",
9345
9170
  {
9346
9171
  style: {
9347
- padding: `${theme2.space[4]}px`,
9348
- borderBottom: `1px solid ${theme2.colors.border}`,
9349
- display: "flex",
9350
- alignItems: "center",
9351
- justifyContent: "space-between"
9172
+ fontSize: theme.fontSizes[2],
9173
+ fontWeight: 600,
9174
+ color: theme.colors.text,
9175
+ overflow: "hidden",
9176
+ textOverflow: "ellipsis",
9177
+ whiteSpace: "nowrap"
9352
9178
  },
9353
- children: [
9354
- /* @__PURE__ */ jsxs(
9355
- "h2",
9356
- {
9357
- style: {
9358
- fontSize: `${theme2.fontSizes[4]}px`,
9359
- fontWeight: theme2.fontWeights.semibold,
9360
- color: theme2.colors.text,
9361
- display: "flex",
9362
- alignItems: "center",
9363
- gap: `${theme2.space[2]}px`,
9364
- margin: 0
9365
- },
9366
- children: [
9367
- /* @__PURE__ */ jsx(CircleQuestionMark, { size: 20 }),
9368
- "Understanding Dependencies"
9369
- ]
9370
- }
9371
- ),
9372
- /* @__PURE__ */ jsx(
9373
- "button",
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
- ]
9179
+ children: pkg.packageData.name
9387
9180
  }
9388
9181
  ),
9389
- /* @__PURE__ */ jsxs(
9390
- "div",
9391
- {
9392
- style: {
9393
- padding: `${theme2.space[4]}px`,
9394
- overflow: "auto",
9395
- flex: 1
9396
- },
9397
- children: [
9398
- /* @__PURE__ */ jsxs(
9399
- Section,
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
- )
9182
+ /* @__PURE__ */ jsxs(
9183
+ "div",
9184
+ {
9185
+ style: {
9186
+ fontSize: theme.fontSizes[0],
9187
+ color: theme.colors.textSecondary
9188
+ },
9189
+ children: [
9190
+ pkg.packageData.path || "/",
9191
+ pkg.packageData.version && ` • v${pkg.packageData.version}`
9463
9192
  ]
9464
9193
  }
9465
9194
  )
9466
- ]
9467
- }
9468
- )
9195
+ ] }),
9196
+ packageRole && /* @__PURE__ */ jsxs(
9197
+ "span",
9198
+ {
9199
+ style: {
9200
+ display: "flex",
9201
+ alignItems: "center",
9202
+ gap: "4px",
9203
+ padding: "3px 8px",
9204
+ backgroundColor: packageRole.color + "20",
9205
+ color: packageRole.color,
9206
+ borderRadius: "4px",
9207
+ fontSize: theme.fontSizes[0],
9208
+ fontWeight: 500,
9209
+ flexShrink: 0
9210
+ },
9211
+ children: [
9212
+ /* @__PURE__ */ jsx(packageRole.icon, { size: 12 }),
9213
+ packageRole.label
9214
+ ]
9215
+ }
9216
+ ),
9217
+ /* @__PURE__ */ jsx(ChevronRight, { size: 16, color: theme.colors.textSecondary })
9218
+ ] }),
9219
+ hasInternalDeps && /* @__PURE__ */ jsxs(
9220
+ "div",
9221
+ {
9222
+ style: {
9223
+ display: "flex",
9224
+ flexDirection: "column",
9225
+ gap: "4px",
9226
+ fontSize: theme.fontSizes[0]
9227
+ },
9228
+ children: [
9229
+ dependsOn.length > 0 && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", flexWrap: "wrap" }, children: [
9230
+ /* @__PURE__ */ jsxs("span", { style: { color: theme.colors.textSecondary, display: "flex", alignItems: "center", gap: "2px" }, children: [
9231
+ /* @__PURE__ */ jsx(ArrowRight, { size: 10 }),
9232
+ "uses"
9233
+ ] }),
9234
+ dependsOn.map((dep) => /* @__PURE__ */ jsx(
9235
+ "span",
9236
+ {
9237
+ style: {
9238
+ padding: "2px 6px",
9239
+ backgroundColor: theme.colors.accent + "15",
9240
+ color: theme.colors.accent,
9241
+ borderRadius: "4px",
9242
+ fontWeight: 500
9243
+ },
9244
+ children: dep.packageData.name
9245
+ },
9246
+ dep.id
9247
+ ))
9248
+ ] }),
9249
+ usedBy.length > 0 && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", flexWrap: "wrap" }, children: [
9250
+ /* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary }, children: "used by" }),
9251
+ usedBy.map((dep) => /* @__PURE__ */ jsx(
9252
+ "span",
9253
+ {
9254
+ style: {
9255
+ padding: "2px 6px",
9256
+ backgroundColor: theme.colors.textSecondary + "20",
9257
+ color: theme.colors.textSecondary,
9258
+ borderRadius: "4px",
9259
+ fontWeight: 500
9260
+ },
9261
+ children: dep.packageData.name
9262
+ },
9263
+ dep.id
9264
+ ))
9265
+ ] })
9266
+ ]
9267
+ }
9268
+ ),
9269
+ /* @__PURE__ */ jsxs(
9270
+ "div",
9271
+ {
9272
+ style: {
9273
+ display: "flex",
9274
+ gap: "12px",
9275
+ fontSize: theme.fontSizes[0],
9276
+ color: theme.colors.textSecondary
9277
+ },
9278
+ children: [
9279
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
9280
+ /* @__PURE__ */ jsx(Terminal, { size: 12 }),
9281
+ /* @__PURE__ */ jsx("span", { children: commands })
9282
+ ] }),
9283
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
9284
+ /* @__PURE__ */ jsx(Settings, { size: 12 }),
9285
+ /* @__PURE__ */ jsx("span", { children: configFiles })
9286
+ ] }),
9287
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
9288
+ /* @__PURE__ */ jsx(Package, { size: 12 }),
9289
+ /* @__PURE__ */ jsx("span", { children: totalDeps })
9290
+ ] })
9291
+ ]
9292
+ }
9293
+ )
9294
+ ]
9469
9295
  }
9470
- ) });
9296
+ );
9471
9297
  };
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
- ]
9298
+ const PackageCard = ({
9299
+ pkg,
9300
+ isExpanded,
9301
+ onToggle,
9302
+ onCommandClick,
9303
+ onConfigClick,
9304
+ onPackageClick,
9305
+ standalone = false
9306
+ }) => {
9307
+ const { theme } = useTheme();
9308
+ const [activeTab, setActiveTab] = useState("commands");
9309
+ const [activeFilters, setActiveFilters] = useState(/* @__PURE__ */ new Set());
9310
+ const [searchQuery, setSearchQuery] = useState("");
9311
+ const [showInfoModal, setShowInfoModal] = useState(false);
9312
+ const configFiles = useMemo(() => {
9313
+ if (!pkg.configFiles) return [];
9314
+ return Object.entries(pkg.configFiles).filter(([, config]) => config == null ? void 0 : config.exists).map(([name, config]) => ({ name, ...config }));
9315
+ }, [pkg.configFiles]);
9316
+ const commands = pkg.packageData.availableCommands || [];
9317
+ const dependencyItems = useMemo(() => extractDependencies(pkg), [pkg]);
9318
+ const depCounts = useMemo(() => ({
9319
+ all: dependencyItems.length,
9320
+ production: dependencyItems.filter((d) => d.dependencyType === "production").length,
9321
+ development: dependencyItems.filter((d) => d.dependencyType === "development").length,
9322
+ peer: dependencyItems.filter((d) => d.dependencyType === "peer").length
9323
+ }), [dependencyItems]);
9324
+ const handleToggleFilter = (type) => {
9325
+ setActiveFilters((prev) => {
9326
+ const next = new Set(prev);
9327
+ if (next.has(type)) {
9328
+ next.delete(type);
9329
+ } else {
9330
+ next.add(type);
9331
+ }
9332
+ return next;
9333
+ });
9334
+ };
9335
+ const filteredDependencies = useMemo(() => {
9336
+ let filtered = [...dependencyItems];
9337
+ if (searchQuery.trim()) {
9338
+ const query = searchQuery.toLowerCase();
9339
+ filtered = filtered.filter((dep) => dep.name.toLowerCase().includes(query));
9489
9340
  }
9490
- ),
9491
- /* @__PURE__ */ jsx(
9492
- "div",
9493
- {
9494
- style: {
9495
- display: "flex",
9496
- flexDirection: "column",
9497
- gap: `${theme2.space[2]}px`
9498
- },
9499
- children
9341
+ const allTypes = ["production", "development", "peer"];
9342
+ const availableTypes = allTypes.filter((t) => depCounts[t] > 0);
9343
+ const isAllSelected = activeFilters.size === 0 || availableTypes.every((t) => activeFilters.has(t));
9344
+ if (!isAllSelected && activeFilters.size > 0) {
9345
+ filtered = filtered.filter((dep) => activeFilters.has(dep.dependencyType));
9500
9346
  }
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: [
9347
+ return filtered;
9348
+ }, [dependencyItems, searchQuery, activeFilters, depCounts]);
9349
+ if (standalone) {
9350
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
9513
9351
  /* @__PURE__ */ jsxs(
9514
9352
  "div",
9515
9353
  {
9516
9354
  style: {
9517
9355
  display: "flex",
9518
9356
  alignItems: "center",
9519
- gap: `${theme2.space[2]}px`,
9520
- marginBottom: `${theme2.space[1]}px`
9357
+ gap: "8px",
9358
+ padding: "12px 16px",
9359
+ borderBottom: `1px solid ${theme.colors.border}`
9521
9360
  },
9522
9361
  children: [
9523
- /* @__PURE__ */ jsx(
9524
- "span",
9525
- {
9526
- style: {
9527
- padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
9528
- borderRadius: `${theme2.radii[1]}px`,
9529
- fontSize: `${theme2.fontSizes[0]}px`,
9530
- fontWeight: theme2.fontWeights.medium,
9531
- backgroundColor: `${badge.color}20`,
9532
- color: badge.color
9533
- },
9534
- children: badge.text
9535
- }
9536
- ),
9537
- /* @__PURE__ */ jsx(
9538
- "span",
9362
+ /* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: pkg.packageData.packageManager, size: 18 }),
9363
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
9364
+ /* @__PURE__ */ jsx(
9365
+ "div",
9366
+ {
9367
+ style: {
9368
+ fontSize: theme.fontSizes[2],
9369
+ fontWeight: 600,
9370
+ color: theme.colors.text,
9371
+ overflow: "hidden",
9372
+ textOverflow: "ellipsis",
9373
+ whiteSpace: "nowrap"
9374
+ },
9375
+ children: pkg.packageData.name
9376
+ }
9377
+ ),
9378
+ pkg.packageData.version && /* @__PURE__ */ jsxs(
9379
+ "div",
9380
+ {
9381
+ style: {
9382
+ fontSize: theme.fontSizes[0],
9383
+ color: theme.colors.textSecondary
9384
+ },
9385
+ children: [
9386
+ "v",
9387
+ pkg.packageData.version
9388
+ ]
9389
+ }
9390
+ )
9391
+ ] }),
9392
+ pkg.packageData.path && /* @__PURE__ */ jsxs(
9393
+ "button",
9539
9394
  {
9395
+ onClick: () => onPackageClick == null ? void 0 : onPackageClick(pkg.packageData.path),
9540
9396
  style: {
9541
- fontSize: `${theme2.fontSizes[1]}px`,
9542
- fontWeight: theme2.fontWeights.medium,
9543
- color: theme2.colors.text
9397
+ display: "flex",
9398
+ alignItems: "center",
9399
+ gap: "4px",
9400
+ padding: "4px 8px",
9401
+ backgroundColor: theme.colors.backgroundTertiary,
9402
+ border: `1px solid ${theme.colors.border}`,
9403
+ borderRadius: "4px",
9404
+ color: theme.colors.textSecondary,
9405
+ fontSize: theme.fontSizes[0],
9406
+ cursor: "pointer"
9544
9407
  },
9545
- children: title
9408
+ title: "Open package folder",
9409
+ children: [
9410
+ /* @__PURE__ */ jsx(Folder, { size: 12 }),
9411
+ pkg.packageData.path || "/"
9412
+ ]
9546
9413
  }
9547
9414
  )
9548
9415
  ]
@@ -9552,676 +9419,812 @@ const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__
9552
9419
  "div",
9553
9420
  {
9554
9421
  style: {
9555
- fontSize: `${theme2.fontSizes[1]}px`,
9556
- color: theme2.colors.textSecondary,
9557
- lineHeight: theme2.lineHeights.relaxed
9422
+ display: "flex",
9423
+ backgroundColor: theme.colors.backgroundTertiary,
9424
+ borderBottom: `1px solid ${theme.colors.border}`
9558
9425
  },
9559
- children: description
9560
- }
9561
- )
9562
- ]
9563
- }
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
- return /* @__PURE__ */ jsxs(
9631
- "div",
9632
- {
9633
- style: {
9634
- display: "flex",
9635
- alignItems: "center",
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`,
9641
- border: `1px solid ${theme2.colors.border}`,
9642
- transition: "all 0.2s"
9643
- },
9644
- onMouseEnter: () => setIsHovered(true),
9645
- onMouseLeave: () => setIsHovered(false),
9646
- children: [
9647
- /* @__PURE__ */ jsxs(
9648
- "div",
9426
+ children: [
9427
+ { id: "commands", label: "Commands", count: commands.length },
9428
+ { id: "configs", label: "Configs", count: configFiles.length },
9429
+ { id: "dependencies", label: "Dependencies", count: dependencyItems.length }
9430
+ ].map((tab) => /* @__PURE__ */ jsxs(
9431
+ "button",
9432
+ {
9433
+ onClick: () => setActiveTab(tab.id),
9434
+ style: {
9435
+ flex: 1,
9436
+ padding: "8px 12px",
9437
+ backgroundColor: activeTab === tab.id ? theme.colors.backgroundSecondary : "transparent",
9438
+ border: "none",
9439
+ borderBottom: activeTab === tab.id ? `2px solid ${theme.colors.accent}` : "2px solid transparent",
9440
+ color: activeTab === tab.id ? theme.colors.text : theme.colors.textSecondary,
9441
+ fontSize: theme.fontSizes[1],
9442
+ cursor: "pointer",
9443
+ display: "flex",
9444
+ alignItems: "center",
9445
+ justifyContent: "center",
9446
+ gap: "6px"
9447
+ },
9448
+ children: [
9449
+ tab.label,
9450
+ /* @__PURE__ */ jsx(
9451
+ "span",
9452
+ {
9453
+ style: {
9454
+ backgroundColor: theme.colors.backgroundTertiary,
9455
+ padding: "1px 6px",
9456
+ borderRadius: "10px",
9457
+ fontSize: theme.fontSizes[0]
9458
+ },
9459
+ children: tab.count
9460
+ }
9461
+ )
9462
+ ]
9463
+ },
9464
+ tab.id
9465
+ ))
9466
+ }
9467
+ ),
9468
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, padding: activeTab === "dependencies" ? "0" : "12px", overflow: "auto" }, children: [
9469
+ activeTab === "commands" && /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: commands.length === 0 ? /* @__PURE__ */ jsx("div", { style: { color: theme.colors.textSecondary, fontSize: theme.fontSizes[1] }, children: "No commands available" }) : commands.map((cmd, idx) => /* @__PURE__ */ jsxs(
9470
+ "button",
9649
9471
  {
9472
+ onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path),
9650
9473
  style: {
9651
9474
  display: "flex",
9652
9475
  alignItems: "center",
9653
- gap: `${theme2.space[2]}px`,
9654
- flex: 1,
9655
- minWidth: 0
9476
+ gap: "8px",
9477
+ padding: "8px 12px",
9478
+ backgroundColor: theme.colors.backgroundTertiary,
9479
+ border: `1px solid ${theme.colors.border}`,
9480
+ borderRadius: "6px",
9481
+ color: theme.colors.text,
9482
+ cursor: "pointer",
9483
+ textAlign: "left"
9656
9484
  },
9657
9485
  children: [
9658
- /* @__PURE__ */ jsx("span", { style: getDependencyTypeBadgeStyle(dependency.dependencyType), children: dependency.dependencyType === "production" ? "prod" : dependency.dependencyType === "development" ? "dev" : "peer" }),
9659
- /* @__PURE__ */ jsx(
9486
+ /* @__PURE__ */ jsx(Terminal, { size: 14, color: theme.colors.accent }),
9487
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
9488
+ /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme.fontSizes[1] }, children: cmd.name }),
9489
+ /* @__PURE__ */ jsx(
9490
+ "div",
9491
+ {
9492
+ style: {
9493
+ fontSize: theme.fontSizes[0],
9494
+ color: theme.colors.textSecondary,
9495
+ fontFamily: "monospace",
9496
+ overflow: "hidden",
9497
+ textOverflow: "ellipsis",
9498
+ whiteSpace: "nowrap"
9499
+ },
9500
+ children: cmd.command
9501
+ }
9502
+ )
9503
+ ] }),
9504
+ cmd.isLensCommand && /* @__PURE__ */ jsx(
9660
9505
  "span",
9661
9506
  {
9662
9507
  style: {
9663
- fontWeight: theme2.fontWeights.medium,
9664
- color: theme2.colors.text,
9665
- overflow: "hidden",
9666
- textOverflow: "ellipsis",
9667
- whiteSpace: "nowrap"
9508
+ padding: "2px 6px",
9509
+ backgroundColor: theme.colors.accent + "20",
9510
+ color: theme.colors.accent,
9511
+ borderRadius: "4px",
9512
+ fontSize: theme.fontSizes[0]
9668
9513
  },
9669
- children: dependency.name
9514
+ children: cmd.lensId
9670
9515
  }
9671
9516
  ),
9672
- /* @__PURE__ */ jsx(
9673
- "a",
9674
- {
9675
- href: `https://www.npmjs.com/package/${dependency.name}`,
9676
- target: "_blank",
9677
- rel: "noopener noreferrer",
9678
- style: {
9679
- ...actionButtonStyle,
9680
- color: theme2.colors.textSecondary,
9681
- textDecoration: "none",
9682
- flexShrink: 0
9683
- },
9684
- title: "View on npm",
9685
- children: /* @__PURE__ */ jsx(ExternalLink, { size: 12 })
9686
- }
9687
- )
9517
+ /* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme.colors.textSecondary })
9688
9518
  ]
9689
- }
9690
- ),
9691
- /* @__PURE__ */ jsxs(
9692
- "div",
9519
+ },
9520
+ idx
9521
+ )) }),
9522
+ activeTab === "configs" && /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: configFiles.length === 0 ? /* @__PURE__ */ jsx("div", { style: { color: theme.colors.textSecondary, fontSize: theme.fontSizes[1] }, children: "No config files detected" }) : configFiles.map((config, idx) => /* @__PURE__ */ jsxs(
9523
+ "button",
9693
9524
  {
9525
+ onClick: () => onConfigClick == null ? void 0 : onConfigClick(config),
9694
9526
  style: {
9695
9527
  display: "flex",
9696
9528
  alignItems: "center",
9697
- gap: "4px"
9529
+ gap: "8px",
9530
+ padding: "8px 12px",
9531
+ backgroundColor: theme.colors.backgroundTertiary,
9532
+ border: `1px solid ${theme.colors.border}`,
9533
+ borderRadius: "6px",
9534
+ color: theme.colors.text,
9535
+ cursor: "pointer",
9536
+ textAlign: "left"
9698
9537
  },
9699
9538
  children: [
9700
- /* @__PURE__ */ jsx(
9701
- "button",
9539
+ /* @__PURE__ */ jsx(Settings, { size: 14, color: theme.colors.textSecondary }),
9540
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
9541
+ /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme.fontSizes[1] }, children: config.name }),
9542
+ /* @__PURE__ */ jsx(
9543
+ "div",
9544
+ {
9545
+ style: {
9546
+ fontSize: theme.fontSizes[0],
9547
+ color: theme.colors.textSecondary,
9548
+ fontFamily: "monospace"
9549
+ },
9550
+ children: config.path
9551
+ }
9552
+ )
9553
+ ] }),
9554
+ config.isInline && /* @__PURE__ */ jsx(
9555
+ "span",
9702
9556
  {
9703
- type: "button",
9704
- onClick: handleCopy,
9705
9557
  style: {
9706
- ...actionButtonStyle,
9707
- color: copied ? theme2.colors.success || "#10b981" : theme2.colors.textSecondary
9558
+ padding: "2px 6px",
9559
+ backgroundColor: theme.colors.textSecondary + "20",
9560
+ color: theme.colors.textSecondary,
9561
+ borderRadius: "4px",
9562
+ fontSize: theme.fontSizes[0]
9708
9563
  },
9709
- title: copied ? "Copied!" : `Copy ${dependency.name}@${dependency.version}`,
9710
- children: copied ? /* @__PURE__ */ jsx(Check, { size: 12 }) : /* @__PURE__ */ jsx(Copy, { size: 12 })
9564
+ children: "inline"
9711
9565
  }
9712
- ),
9713
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: dependency.version })
9566
+ )
9714
9567
  ]
9715
- }
9716
- )
9717
- ]
9718
- }
9719
- );
9720
- };
9721
- const FilterBar = ({
9722
- activeFilters,
9723
- onToggleFilter,
9724
- searchQuery,
9725
- onSearchChange,
9726
- counts
9727
- }) => {
9728
- 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;
9568
+ },
9569
+ idx
9570
+ )) }),
9571
+ activeTab === "dependencies" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
9572
+ dependencyItems.length === 0 ? /* @__PURE__ */ jsxs(
9573
+ "div",
9574
+ {
9575
+ style: {
9576
+ padding: "12px",
9577
+ color: theme.colors.textSecondary,
9578
+ fontSize: theme.fontSizes[1],
9579
+ display: "flex",
9580
+ alignItems: "center",
9581
+ justifyContent: "center",
9582
+ gap: "8px"
9583
+ },
9584
+ children: [
9585
+ /* @__PURE__ */ jsx(Package, { size: 16 }),
9586
+ "No dependencies"
9587
+ ]
9588
+ }
9589
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
9590
+ /* @__PURE__ */ jsx("div", { style: { padding: "12px", borderBottom: `1px solid ${theme.colors.border}` }, children: /* @__PURE__ */ jsx(
9591
+ FilterBar,
9592
+ {
9593
+ activeFilters,
9594
+ onToggleFilter: handleToggleFilter,
9595
+ searchQuery,
9596
+ onSearchChange: setSearchQuery,
9597
+ counts: depCounts
9598
+ }
9599
+ ) }),
9600
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, overflow: "auto", padding: "8px 12px" }, children: [
9601
+ /* @__PURE__ */ jsxs(
9602
+ "div",
9603
+ {
9604
+ style: {
9605
+ fontSize: theme.fontSizes[0],
9606
+ color: theme.colors.textSecondary,
9607
+ marginBottom: "8px"
9608
+ },
9609
+ children: [
9610
+ "Showing ",
9611
+ filteredDependencies.length,
9612
+ " of ",
9613
+ dependencyItems.length
9614
+ ]
9615
+ }
9616
+ ),
9617
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: filteredDependencies.length === 0 ? /* @__PURE__ */ jsx(
9618
+ "div",
9619
+ {
9620
+ style: {
9621
+ padding: "12px",
9622
+ textAlign: "center",
9623
+ color: theme.colors.textSecondary,
9624
+ fontSize: theme.fontSizes[1]
9625
+ },
9626
+ children: "No dependencies match your filters"
9627
+ }
9628
+ ) : filteredDependencies.map((dep) => /* @__PURE__ */ jsx(
9629
+ DependencyRow,
9630
+ {
9631
+ dependency: dep
9632
+ },
9633
+ `${dep.name}-${dep.dependencyType}`
9634
+ )) })
9635
+ ] })
9636
+ ] }),
9637
+ /* @__PURE__ */ jsx(
9638
+ DependencyInfoModal,
9639
+ {
9640
+ isOpen: showInfoModal,
9641
+ onClose: () => setShowInfoModal(false)
9642
+ }
9643
+ )
9644
+ ] })
9645
+ ] })
9646
+ ] });
9647
+ }
9735
9648
  return /* @__PURE__ */ jsxs(
9736
9649
  "div",
9737
9650
  {
9738
9651
  style: {
9739
- display: "flex",
9740
- flexDirection: "column",
9741
- gap: `${theme2.space[2]}px`
9652
+ backgroundColor: theme.colors.backgroundSecondary,
9653
+ borderRadius: "8px",
9654
+ border: `1px solid ${theme.colors.border}`,
9655
+ overflow: "hidden"
9742
9656
  },
9743
9657
  children: [
9744
9658
  /* @__PURE__ */ jsxs(
9745
- "div",
9659
+ "button",
9746
9660
  {
9661
+ onClick: onToggle,
9747
9662
  style: {
9748
- position: "relative",
9663
+ width: "100%",
9749
9664
  display: "flex",
9750
- alignItems: "center"
9665
+ alignItems: "center",
9666
+ gap: "8px",
9667
+ padding: "12px 16px",
9668
+ backgroundColor: "transparent",
9669
+ border: "none",
9670
+ cursor: "pointer",
9671
+ color: theme.colors.text,
9672
+ textAlign: "left"
9751
9673
  },
9752
9674
  children: [
9753
- /* @__PURE__ */ jsx(
9754
- Search,
9755
- {
9756
- size: 14,
9757
- style: {
9758
- position: "absolute",
9759
- left: `${theme2.space[3]}px`,
9760
- color: theme2.colors.textSecondary,
9761
- pointerEvents: "none"
9675
+ isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 16, color: theme.colors.textSecondary }) : /* @__PURE__ */ jsx(ChevronRight, { size: 16, color: theme.colors.textSecondary }),
9676
+ /* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: pkg.packageData.packageManager, size: 18 }),
9677
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
9678
+ /* @__PURE__ */ jsx(
9679
+ "div",
9680
+ {
9681
+ style: {
9682
+ fontSize: theme.fontSizes[2],
9683
+ fontWeight: 600,
9684
+ overflow: "hidden",
9685
+ textOverflow: "ellipsis",
9686
+ whiteSpace: "nowrap"
9687
+ },
9688
+ children: pkg.packageData.name
9762
9689
  }
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"
9690
+ ),
9691
+ pkg.packageData.version && /* @__PURE__ */ jsxs(
9692
+ "div",
9693
+ {
9694
+ style: {
9695
+ fontSize: theme.fontSizes[0],
9696
+ color: theme.colors.textSecondary
9697
+ },
9698
+ children: [
9699
+ "v",
9700
+ pkg.packageData.version
9701
+ ]
9783
9702
  }
9784
- }
9785
- ),
9786
- searchQuery && /* @__PURE__ */ jsx(
9703
+ )
9704
+ ] }),
9705
+ pkg.packageData.path && /* @__PURE__ */ jsxs(
9787
9706
  "button",
9788
9707
  {
9789
- onClick: () => onSearchChange(""),
9708
+ onClick: (e) => {
9709
+ e.stopPropagation();
9710
+ onPackageClick == null ? void 0 : onPackageClick(pkg.packageData.path);
9711
+ },
9790
9712
  style: {
9791
- position: "absolute",
9792
- right: `${theme2.space[2]}px`,
9793
- padding: `${theme2.space[1]}px`,
9794
9713
  display: "flex",
9795
9714
  alignItems: "center",
9796
- justifyContent: "center",
9797
- backgroundColor: "transparent",
9798
- border: "none",
9799
- cursor: "pointer",
9800
- borderRadius: `${theme2.radii[1]}px`
9715
+ gap: "4px",
9716
+ padding: "4px 8px",
9717
+ backgroundColor: theme.colors.backgroundTertiary,
9718
+ border: `1px solid ${theme.colors.border}`,
9719
+ borderRadius: "4px",
9720
+ color: theme.colors.textSecondary,
9721
+ fontSize: theme.fontSizes[0],
9722
+ cursor: "pointer"
9801
9723
  },
9802
- title: "Clear search",
9803
- children: /* @__PURE__ */ jsx(X, { size: 14, color: theme2.colors.textSecondary })
9724
+ title: "Open package folder",
9725
+ children: [
9726
+ /* @__PURE__ */ jsx(Folder, { size: 12 }),
9727
+ pkg.packageData.path || "/"
9728
+ ]
9804
9729
  }
9805
9730
  )
9806
9731
  ]
9807
9732
  }
9808
9733
  ),
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",
9734
+ isExpanded && /* @__PURE__ */ jsxs("div", { style: { borderTop: `1px solid ${theme.colors.border}` }, children: [
9735
+ /* @__PURE__ */ jsx(
9736
+ "div",
9813
9737
  {
9814
- onClick: () => onToggleFilter(type),
9815
9738
  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"
9739
+ display: "flex",
9740
+ backgroundColor: theme.colors.backgroundTertiary,
9741
+ borderBottom: `1px solid ${theme.colors.border}`
9827
9742
  },
9828
9743
  children: [
9829
- type === "production" ? "Prod" : type === "development" ? "Dev" : "Peer",
9830
- /* @__PURE__ */ jsxs(
9831
- "span",
9744
+ { id: "commands", label: "Commands", count: commands.length },
9745
+ { id: "configs", label: "Configs", count: configFiles.length },
9746
+ { id: "dependencies", label: "Deps", count: dependencyItems.length }
9747
+ ].map((tab) => /* @__PURE__ */ jsxs(
9748
+ "button",
9749
+ {
9750
+ onClick: () => setActiveTab(tab.id),
9751
+ style: {
9752
+ flex: 1,
9753
+ padding: "8px 12px",
9754
+ backgroundColor: activeTab === tab.id ? theme.colors.backgroundSecondary : "transparent",
9755
+ border: "none",
9756
+ borderBottom: activeTab === tab.id ? `2px solid ${theme.colors.accent}` : "2px solid transparent",
9757
+ color: activeTab === tab.id ? theme.colors.text : theme.colors.textSecondary,
9758
+ fontSize: theme.fontSizes[1],
9759
+ cursor: "pointer",
9760
+ display: "flex",
9761
+ alignItems: "center",
9762
+ justifyContent: "center",
9763
+ gap: "6px"
9764
+ },
9765
+ children: [
9766
+ tab.label,
9767
+ /* @__PURE__ */ jsx(
9768
+ "span",
9769
+ {
9770
+ style: {
9771
+ backgroundColor: theme.colors.backgroundTertiary,
9772
+ padding: "1px 6px",
9773
+ borderRadius: "10px",
9774
+ fontSize: theme.fontSizes[0]
9775
+ },
9776
+ children: tab.count
9777
+ }
9778
+ )
9779
+ ]
9780
+ },
9781
+ tab.id
9782
+ ))
9783
+ }
9784
+ ),
9785
+ /* @__PURE__ */ jsxs("div", { style: { padding: activeTab === "dependencies" ? "0" : "12px", maxHeight: "300px", overflow: "auto" }, children: [
9786
+ activeTab === "commands" && /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: commands.length === 0 ? /* @__PURE__ */ jsx("div", { style: { color: theme.colors.textSecondary, fontSize: theme.fontSizes[1] }, children: "No commands available" }) : commands.map((cmd, idx) => /* @__PURE__ */ jsxs(
9787
+ "button",
9788
+ {
9789
+ onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path),
9790
+ style: {
9791
+ display: "flex",
9792
+ alignItems: "center",
9793
+ gap: "8px",
9794
+ padding: "8px 12px",
9795
+ backgroundColor: theme.colors.backgroundTertiary,
9796
+ border: `1px solid ${theme.colors.border}`,
9797
+ borderRadius: "6px",
9798
+ color: theme.colors.text,
9799
+ cursor: "pointer",
9800
+ textAlign: "left"
9801
+ },
9802
+ children: [
9803
+ /* @__PURE__ */ jsx(Terminal, { size: 14, color: theme.colors.accent }),
9804
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
9805
+ /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme.fontSizes[1] }, children: cmd.name }),
9806
+ /* @__PURE__ */ jsx(
9807
+ "div",
9808
+ {
9809
+ style: {
9810
+ fontSize: theme.fontSizes[0],
9811
+ color: theme.colors.textSecondary,
9812
+ fontFamily: "monospace",
9813
+ overflow: "hidden",
9814
+ textOverflow: "ellipsis",
9815
+ whiteSpace: "nowrap"
9816
+ },
9817
+ children: cmd.command
9818
+ }
9819
+ )
9820
+ ] }),
9821
+ cmd.isLensCommand && /* @__PURE__ */ jsx(
9822
+ "span",
9823
+ {
9824
+ style: {
9825
+ padding: "2px 6px",
9826
+ backgroundColor: theme.colors.accent + "20",
9827
+ color: theme.colors.accent,
9828
+ borderRadius: "4px",
9829
+ fontSize: theme.fontSizes[0]
9830
+ },
9831
+ children: cmd.lensId
9832
+ }
9833
+ ),
9834
+ /* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme.colors.textSecondary })
9835
+ ]
9836
+ },
9837
+ idx
9838
+ )) }),
9839
+ activeTab === "configs" && /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: configFiles.length === 0 ? /* @__PURE__ */ jsx("div", { style: { color: theme.colors.textSecondary, fontSize: theme.fontSizes[1] }, children: "No config files detected" }) : configFiles.map((config, idx) => /* @__PURE__ */ jsxs(
9840
+ "button",
9841
+ {
9842
+ onClick: () => onConfigClick == null ? void 0 : onConfigClick(config),
9843
+ style: {
9844
+ display: "flex",
9845
+ alignItems: "center",
9846
+ gap: "8px",
9847
+ padding: "8px 12px",
9848
+ backgroundColor: theme.colors.backgroundTertiary,
9849
+ border: `1px solid ${theme.colors.border}`,
9850
+ borderRadius: "6px",
9851
+ color: theme.colors.text,
9852
+ cursor: "pointer",
9853
+ textAlign: "left"
9854
+ },
9855
+ children: [
9856
+ /* @__PURE__ */ jsx(Settings, { size: 14, color: theme.colors.textSecondary }),
9857
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
9858
+ /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme.fontSizes[1] }, children: config.name }),
9859
+ /* @__PURE__ */ jsx(
9860
+ "div",
9861
+ {
9862
+ style: {
9863
+ fontSize: theme.fontSizes[0],
9864
+ color: theme.colors.textSecondary,
9865
+ fontFamily: "monospace"
9866
+ },
9867
+ children: config.path
9868
+ }
9869
+ )
9870
+ ] }),
9871
+ config.isInline && /* @__PURE__ */ jsx(
9872
+ "span",
9873
+ {
9874
+ style: {
9875
+ padding: "2px 6px",
9876
+ backgroundColor: theme.colors.textSecondary + "20",
9877
+ color: theme.colors.textSecondary,
9878
+ borderRadius: "4px",
9879
+ fontSize: theme.fontSizes[0]
9880
+ },
9881
+ children: "inline"
9882
+ }
9883
+ )
9884
+ ]
9885
+ },
9886
+ idx
9887
+ )) }),
9888
+ activeTab === "dependencies" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
9889
+ dependencyItems.length === 0 ? /* @__PURE__ */ jsxs(
9890
+ "div",
9891
+ {
9892
+ style: {
9893
+ padding: "12px",
9894
+ color: theme.colors.textSecondary,
9895
+ fontSize: theme.fontSizes[1],
9896
+ display: "flex",
9897
+ alignItems: "center",
9898
+ justifyContent: "center",
9899
+ gap: "8px"
9900
+ },
9901
+ children: [
9902
+ /* @__PURE__ */ jsx(Package, { size: 16 }),
9903
+ "No dependencies"
9904
+ ]
9905
+ }
9906
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
9907
+ /* @__PURE__ */ jsx("div", { style: { padding: "12px", borderBottom: `1px solid ${theme.colors.border}` }, children: /* @__PURE__ */ jsx(
9908
+ FilterBar,
9832
9909
  {
9833
- style: { marginLeft: `${theme2.space[1]}px`, opacity: 0.7 },
9834
- children: [
9835
- "(",
9836
- counts[type],
9837
- ")"
9838
- ]
9910
+ activeFilters,
9911
+ onToggleFilter: handleToggleFilter,
9912
+ searchQuery,
9913
+ onSearchChange: setSearchQuery,
9914
+ counts: depCounts
9839
9915
  }
9840
- )
9841
- ]
9842
- },
9843
- type
9844
- );
9845
- }) })
9916
+ ) }),
9917
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, overflow: "auto", padding: "8px 12px" }, children: [
9918
+ /* @__PURE__ */ jsxs(
9919
+ "div",
9920
+ {
9921
+ style: {
9922
+ fontSize: theme.fontSizes[0],
9923
+ color: theme.colors.textSecondary,
9924
+ marginBottom: "8px"
9925
+ },
9926
+ children: [
9927
+ "Showing ",
9928
+ filteredDependencies.length,
9929
+ " of ",
9930
+ dependencyItems.length
9931
+ ]
9932
+ }
9933
+ ),
9934
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: filteredDependencies.length === 0 ? /* @__PURE__ */ jsx(
9935
+ "div",
9936
+ {
9937
+ style: {
9938
+ padding: "12px",
9939
+ textAlign: "center",
9940
+ color: theme.colors.textSecondary,
9941
+ fontSize: theme.fontSizes[1]
9942
+ },
9943
+ children: "No dependencies match your filters"
9944
+ }
9945
+ ) : filteredDependencies.map((dep) => /* @__PURE__ */ jsx(
9946
+ DependencyRow,
9947
+ {
9948
+ dependency: dep
9949
+ },
9950
+ `${dep.name}-${dep.dependencyType}`
9951
+ )) })
9952
+ ] })
9953
+ ] }),
9954
+ /* @__PURE__ */ jsx(
9955
+ DependencyInfoModal,
9956
+ {
9957
+ isOpen: showInfoModal,
9958
+ onClose: () => setShowInfoModal(false)
9959
+ }
9960
+ )
9961
+ ] })
9962
+ ] })
9963
+ ] })
9846
9964
  ]
9847
9965
  }
9848
- );
9849
- };
9850
- const dependencyTypeOrder = {
9851
- peer: 0,
9852
- production: 1,
9853
- development: 2
9854
- };
9855
- function extractDependencies(packageLayer) {
9856
- const { dependencies, devDependencies, peerDependencies } = packageLayer.packageData;
9857
- const items2 = [];
9858
- if (dependencies) {
9859
- Object.entries(dependencies).forEach(([name, version]) => {
9860
- items2.push({ name, version, dependencyType: "production" });
9861
- });
9862
- }
9863
- if (devDependencies) {
9864
- Object.entries(devDependencies).forEach(([name, version]) => {
9865
- items2.push({ name, version, dependencyType: "development" });
9866
- });
9867
- }
9868
- if (peerDependencies) {
9869
- Object.entries(peerDependencies).forEach(([name, version]) => {
9870
- items2.push({ name, version, dependencyType: "peer" });
9871
- });
9872
- }
9873
- return items2.sort((a, b) => {
9874
- const typeCompare = dependencyTypeOrder[a.dependencyType] - dependencyTypeOrder[b.dependencyType];
9875
- if (typeCompare !== 0) return typeCompare;
9876
- return a.name.localeCompare(b.name);
9877
- });
9878
- }
9879
- const DependenciesPanelContent = ({
9880
- context
9881
- }) => {
9882
- var _a;
9883
- const { theme: theme2 } = useTheme();
9884
- const [selectedPackagePath, setSelectedPackagePath] = useState(
9885
- null
9886
- );
9887
- const [activeFilters, setActiveFilters] = useState(/* @__PURE__ */ new Set());
9888
- const [searchQuery, setSearchQuery] = useState("");
9889
- const [showInfoModal, setShowInfoModal] = useState(false);
9890
- const packagesSlice = context.getSlice("packages");
9891
- const isLoading = context.isSliceLoading("packages");
9892
- const hasPackages = context.hasSlice("packages");
9893
- const packages = useMemo(() => {
9894
- var _a2;
9895
- return ((_a2 = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a2.packages) ?? [];
9896
- }, [(_a = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a.packages]);
9897
- const effectiveSelectedPath = useMemo(() => {
9898
- if (selectedPackagePath !== null) return selectedPackagePath;
9899
- if (packages.length === 1) return packages[0].packageData.path;
9900
- const rootPackage = packages.find((p) => p.packageData.path === "");
9901
- if (rootPackage) return "";
9902
- return null;
9903
- }, [selectedPackagePath, packages]);
9904
- const selectedPackage = useMemo(() => {
9905
- if (effectiveSelectedPath === null) return null;
9906
- return packages.find((p) => p.packageData.path === effectiveSelectedPath);
9907
- }, [effectiveSelectedPath, packages]);
9908
- const dependencyItems = useMemo(() => {
9909
- if (!selectedPackage) return [];
9910
- return extractDependencies(selectedPackage);
9911
- }, [selectedPackage]);
9912
- const counts = useMemo(() => {
9913
- return {
9914
- all: dependencyItems.length,
9915
- production: dependencyItems.filter((d) => d.dependencyType === "production").length,
9916
- development: dependencyItems.filter(
9917
- (d) => d.dependencyType === "development"
9918
- ).length,
9919
- peer: dependencyItems.filter((d) => d.dependencyType === "peer").length
9920
- };
9921
- }, [dependencyItems]);
9922
- const handleToggleFilter = (type) => {
9923
- setActiveFilters((prev) => {
9924
- const next = new Set(prev);
9925
- if (next.has(type)) {
9926
- next.delete(type);
9927
- } else {
9928
- next.add(type);
9929
- }
9930
- return next;
9931
- });
9932
- };
9933
- const filteredDependencies = useMemo(() => {
9934
- let filtered = [...dependencyItems];
9935
- if (searchQuery.trim()) {
9936
- const query = searchQuery.toLowerCase();
9937
- filtered = filtered.filter(
9938
- (dep) => dep.name.toLowerCase().includes(query)
9939
- );
9940
- }
9941
- const allTypes = ["production", "development", "peer"];
9942
- const availableTypes = allTypes.filter((t) => counts[t] > 0);
9943
- const isAllSelected = activeFilters.size === 0 || availableTypes.every((t) => activeFilters.has(t));
9944
- if (!isAllSelected && activeFilters.size > 0) {
9945
- filtered = filtered.filter((dep) => activeFilters.has(dep.dependencyType));
9946
- }
9947
- return filtered;
9948
- }, [dependencyItems, searchQuery, activeFilters, counts]);
9966
+ );
9967
+ };
9968
+ const PackageCompositionPanelContent = ({
9969
+ packages,
9970
+ isLoading = false,
9971
+ emptyMessage = "No packages detected",
9972
+ onCommandClick,
9973
+ onConfigClick,
9974
+ onPackageClick
9975
+ }) => {
9976
+ const { theme } = useTheme();
9977
+ const [selectedPackageId, setSelectedPackageId] = useState(null);
9978
+ const sortedPackages = useMemo(() => {
9979
+ return [...packages].sort((a, b) => {
9980
+ if (a.packageData.isMonorepoRoot && !b.packageData.isMonorepoRoot) return -1;
9981
+ if (!a.packageData.isMonorepoRoot && b.packageData.isMonorepoRoot) return 1;
9982
+ return a.packageData.path.localeCompare(b.packageData.path);
9983
+ });
9984
+ }, [packages]);
9985
+ const selectedPackage = useMemo(() => {
9986
+ if (!selectedPackageId) return null;
9987
+ return packages.find((p) => p.id === selectedPackageId) || null;
9988
+ }, [selectedPackageId, packages]);
9949
9989
  if (isLoading) {
9950
9990
  return /* @__PURE__ */ jsx(
9951
9991
  "div",
9952
9992
  {
9953
9993
  style: {
9954
- padding: `${theme2.space[3]}px`,
9955
- height: "100%",
9956
- display: "flex",
9957
- alignItems: "center",
9958
- justifyContent: "center",
9959
- color: theme2.colors.textSecondary,
9960
- backgroundColor: theme2.colors.background,
9961
- fontFamily: theme2.fonts.body
9994
+ padding: "20px",
9995
+ textAlign: "center",
9996
+ color: theme.colors.textSecondary
9962
9997
  },
9963
9998
  children: "Loading packages..."
9964
9999
  }
9965
10000
  );
9966
10001
  }
9967
- if (!hasPackages || packages.length === 0) {
9968
- return /* @__PURE__ */ jsxs(
10002
+ if (packages.length === 0) {
10003
+ return /* @__PURE__ */ jsx(
9969
10004
  "div",
9970
10005
  {
9971
10006
  style: {
9972
- padding: `${theme2.space[3]}px`,
9973
- height: "100%",
9974
- display: "flex",
9975
- flexDirection: "column",
9976
- alignItems: "center",
9977
- justifyContent: "center",
9978
- gap: `${theme2.space[2]}px`,
9979
- color: theme2.colors.textSecondary,
9980
- backgroundColor: theme2.colors.background,
9981
- fontFamily: theme2.fonts.body
10007
+ padding: "20px",
10008
+ textAlign: "center",
10009
+ color: theme.colors.textSecondary
9982
10010
  },
9983
- children: [
9984
- /* @__PURE__ */ jsx(Package, { size: 32 }),
9985
- /* @__PURE__ */ jsx("p", { style: { margin: 0 }, children: "No package data available" })
9986
- ]
10011
+ children: emptyMessage
9987
10012
  }
9988
10013
  );
9989
10014
  }
9990
- return /* @__PURE__ */ jsxs(
10015
+ if (packages.length === 1) {
10016
+ return /* @__PURE__ */ jsx(
10017
+ PackageCard,
10018
+ {
10019
+ pkg: packages[0],
10020
+ isExpanded: true,
10021
+ onToggle: () => {
10022
+ },
10023
+ onCommandClick,
10024
+ onConfigClick,
10025
+ onPackageClick,
10026
+ standalone: true
10027
+ }
10028
+ );
10029
+ }
10030
+ return /* @__PURE__ */ jsx(
9991
10031
  "div",
9992
10032
  {
9993
10033
  style: {
9994
- height: "100%",
9995
10034
  display: "flex",
9996
10035
  flexDirection: "column",
9997
- backgroundColor: theme2.colors.background,
9998
- color: theme2.colors.text,
9999
- fontFamily: theme2.fonts.body,
10000
- overflow: "hidden"
10036
+ height: "100%",
10037
+ overflow: "hidden",
10038
+ position: "relative"
10001
10039
  },
10002
- children: [
10003
- /* @__PURE__ */ jsxs(
10004
- "div",
10005
- {
10006
- style: {
10007
- flexShrink: 0,
10008
- padding: `${theme2.space[3]}px`,
10009
- paddingBottom: `${theme2.space[2]}px`,
10010
- display: "flex",
10011
- flexDirection: "column",
10012
- gap: `${theme2.space[2]}px`,
10013
- borderBottom: `1px solid ${theme2.colors.border}`
10014
- },
10015
- children: [
10016
- /* @__PURE__ */ jsxs(
10017
- "div",
10018
- {
10019
- style: {
10020
- display: "flex",
10021
- alignItems: "center",
10022
- justifyContent: "space-between"
10023
- },
10024
- children: [
10025
- /* @__PURE__ */ jsx(
10026
- "h3",
10027
- {
10028
- style: {
10029
- fontSize: `${theme2.fontSizes[2]}px`,
10030
- fontWeight: theme2.fontWeights.semibold,
10031
- color: theme2.colors.text,
10032
- display: "flex",
10033
- alignItems: "center",
10034
- gap: `${theme2.space[2]}px`,
10035
- margin: 0
10036
- },
10037
- children: packages.length > 1 ? /* @__PURE__ */ jsxs(Fragment, { children: [
10038
- /* @__PURE__ */ jsx(Boxes, { size: 16 }),
10039
- "Monorepo Dependencies",
10040
- /* @__PURE__ */ jsxs(
10041
- "span",
10042
- {
10043
- style: {
10044
- fontSize: `${theme2.fontSizes[0]}px`,
10045
- fontWeight: theme2.fontWeights.body,
10046
- color: theme2.colors.textSecondary
10047
- },
10048
- children: [
10049
- "(",
10050
- packages.length,
10051
- ")"
10052
- ]
10053
- }
10054
- )
10055
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
10056
- /* @__PURE__ */ jsx(Package, { size: 16 }),
10057
- "Dependencies"
10040
+ children: /* @__PURE__ */ jsxs(
10041
+ "div",
10042
+ {
10043
+ style: {
10044
+ display: "flex",
10045
+ width: "200%",
10046
+ height: "100%",
10047
+ transform: selectedPackage ? "translateX(-50%)" : "translateX(0)",
10048
+ transition: "transform 0.25s ease-in-out"
10049
+ },
10050
+ children: [
10051
+ /* @__PURE__ */ jsxs(
10052
+ "div",
10053
+ {
10054
+ style: {
10055
+ width: "50%",
10056
+ height: "100%",
10057
+ display: "flex",
10058
+ flexDirection: "column",
10059
+ overflow: "hidden"
10060
+ },
10061
+ children: [
10062
+ /* @__PURE__ */ jsxs(
10063
+ "div",
10064
+ {
10065
+ style: {
10066
+ padding: "12px 16px",
10067
+ borderBottom: `1px solid ${theme.colors.border}`,
10068
+ display: "flex",
10069
+ alignItems: "center",
10070
+ gap: "8px",
10071
+ flexShrink: 0
10072
+ },
10073
+ children: [
10074
+ /* @__PURE__ */ jsx(FileCode, { size: 16, color: theme.colors.accent }),
10075
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: theme.fontSizes[1], color: theme.colors.textSecondary }, children: [
10076
+ packages.length,
10077
+ " packages"
10058
10078
  ] })
10059
- }
10060
- ),
10061
- /* @__PURE__ */ jsxs(
10062
- "button",
10063
- {
10064
- onClick: () => setShowInfoModal(true),
10065
- style: {
10066
- padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
10067
- fontSize: `${theme2.fontSizes[0]}px`,
10068
- fontWeight: theme2.fontWeights.medium,
10069
- fontFamily: theme2.fonts.body,
10070
- borderRadius: `${theme2.radii[1]}px`,
10071
- border: `1px solid ${theme2.colors.border}`,
10072
- backgroundColor: theme2.colors.backgroundSecondary,
10073
- color: theme2.colors.primary,
10074
- cursor: "pointer",
10075
- display: "flex",
10076
- alignItems: "center",
10077
- gap: `${theme2.space[1]}px`,
10078
- transition: "all 0.2s"
10079
+ ]
10080
+ }
10081
+ ),
10082
+ /* @__PURE__ */ jsx(
10083
+ "div",
10084
+ {
10085
+ style: {
10086
+ flex: 1,
10087
+ overflow: "auto",
10088
+ padding: "12px",
10089
+ display: "flex",
10090
+ flexDirection: "column",
10091
+ gap: "8px"
10092
+ },
10093
+ children: sortedPackages.map((pkg) => /* @__PURE__ */ jsx(
10094
+ PackageSummaryCard,
10095
+ {
10096
+ pkg,
10097
+ allPackages: packages,
10098
+ onClick: () => setSelectedPackageId(pkg.id)
10079
10099
  },
10080
- children: [
10081
- /* @__PURE__ */ jsx(CircleQuestionMark, { size: 12 }),
10082
- "Learn More"
10083
- ]
10084
- }
10085
- )
10086
- ]
10087
- }
10088
- ),
10089
- packages.length > 1 && /* @__PURE__ */ jsx(
10090
- "select",
10091
- {
10092
- value: effectiveSelectedPath ?? "__none__",
10093
- onChange: (e) => setSelectedPackagePath(e.target.value === "__none__" ? null : e.target.value),
10094
- style: {
10095
- width: "100%",
10096
- padding: `${theme2.space[2]}px`,
10097
- borderRadius: `${theme2.radii[1]}px`,
10098
- border: `1px solid ${theme2.colors.border}`,
10099
- backgroundColor: theme2.colors.backgroundSecondary,
10100
- color: theme2.colors.text,
10101
- fontSize: `${theme2.fontSizes[1]}px`,
10102
- fontFamily: theme2.fonts.body,
10103
- cursor: "pointer"
10104
- },
10105
- children: packages.map((pkg) => /* @__PURE__ */ jsxs("option", { value: pkg.packageData.path, children: [
10106
- pkg.packageData.name,
10107
- " (",
10108
- pkg.packageData.path || "root",
10109
- ")"
10110
- ] }, pkg.packageData.path || "__root__"))
10111
- }
10112
- ),
10113
- packages.length === 1 && selectedPackage && /* @__PURE__ */ jsxs(
10114
- "div",
10115
- {
10116
- style: {
10117
- fontSize: `${theme2.fontSizes[0]}px`,
10118
- color: theme2.colors.textSecondary
10119
- },
10120
- children: [
10121
- selectedPackage.packageData.name,
10122
- " • ",
10123
- dependencyItems.length,
10124
- " dependencies"
10125
- ]
10126
- }
10127
- ),
10128
- selectedPackage && dependencyItems.length > 0 && /* @__PURE__ */ jsx(
10129
- FilterBar,
10130
- {
10131
- activeFilters,
10132
- onToggleFilter: handleToggleFilter,
10133
- searchQuery,
10134
- onSearchChange: setSearchQuery,
10135
- counts
10136
- }
10137
- )
10138
- ]
10139
- }
10140
- ),
10141
- selectedPackage && dependencyItems.length > 0 && /* @__PURE__ */ jsxs(
10142
- "div",
10143
- {
10144
- style: {
10145
- flex: 1,
10146
- overflow: "auto",
10147
- padding: `${theme2.space[2]}px ${theme2.space[3]}px ${theme2.space[3]}px`
10148
- },
10149
- children: [
10150
- /* @__PURE__ */ jsxs(
10151
- "div",
10152
- {
10153
- style: {
10154
- fontSize: `${theme2.fontSizes[0]}px`,
10155
- color: theme2.colors.textSecondary,
10156
- marginBottom: `${theme2.space[2]}px`
10157
- },
10158
- children: [
10159
- "Showing ",
10160
- filteredDependencies.length,
10161
- " of ",
10162
- dependencyItems.length,
10163
- " dependencies"
10164
- ]
10165
- }
10166
- ),
10167
- /* @__PURE__ */ jsx(
10168
- "div",
10169
- {
10170
- style: {
10171
- display: "flex",
10172
- flexDirection: "column",
10173
- gap: `${theme2.space[1]}px`
10174
- },
10175
- children: filteredDependencies.length === 0 ? /* @__PURE__ */ jsx(
10100
+ pkg.id
10101
+ ))
10102
+ }
10103
+ )
10104
+ ]
10105
+ }
10106
+ ),
10107
+ /* @__PURE__ */ jsxs(
10108
+ "div",
10109
+ {
10110
+ style: {
10111
+ width: "50%",
10112
+ height: "100%",
10113
+ display: "flex",
10114
+ flexDirection: "column",
10115
+ overflow: "hidden"
10116
+ },
10117
+ children: [
10118
+ /* @__PURE__ */ jsx(
10176
10119
  "div",
10177
10120
  {
10178
10121
  style: {
10179
- padding: `${theme2.space[3]}px`,
10180
- textAlign: "center",
10181
- color: theme2.colors.textSecondary,
10182
- fontSize: `${theme2.fontSizes[1]}px`
10122
+ padding: "8px 12px",
10123
+ borderBottom: `1px solid ${theme.colors.border}`,
10124
+ display: "flex",
10125
+ alignItems: "center",
10126
+ gap: "8px",
10127
+ flexShrink: 0
10183
10128
  },
10184
- children: "No dependencies match your filters"
10129
+ children: /* @__PURE__ */ jsxs(
10130
+ "button",
10131
+ {
10132
+ onClick: () => setSelectedPackageId(null),
10133
+ style: {
10134
+ display: "flex",
10135
+ alignItems: "center",
10136
+ gap: "4px",
10137
+ padding: "4px 8px",
10138
+ backgroundColor: "transparent",
10139
+ border: "none",
10140
+ borderRadius: "4px",
10141
+ color: theme.colors.accent,
10142
+ fontSize: theme.fontSizes[1],
10143
+ cursor: "pointer",
10144
+ transition: "background-color 0.15s ease"
10145
+ },
10146
+ onMouseEnter: (e) => {
10147
+ e.currentTarget.style.backgroundColor = theme.colors.backgroundTertiary;
10148
+ },
10149
+ onMouseLeave: (e) => {
10150
+ e.currentTarget.style.backgroundColor = "transparent";
10151
+ },
10152
+ children: [
10153
+ /* @__PURE__ */ jsx(ChevronLeft, { size: 16 }),
10154
+ "All Packages"
10155
+ ]
10156
+ }
10157
+ )
10185
10158
  }
10186
- ) : filteredDependencies.map((dep) => /* @__PURE__ */ jsx(
10187
- DependencyRow,
10159
+ ),
10160
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "hidden" }, children: selectedPackage && /* @__PURE__ */ jsx(
10161
+ PackageCard,
10188
10162
  {
10189
- dependency: dep
10190
- },
10191
- `${dep.name}-${dep.dependencyType}`
10192
- ))
10193
- }
10194
- )
10195
- ]
10196
- }
10197
- ),
10198
- !selectedPackage && packages.length > 1 && /* @__PURE__ */ jsx(
10199
- "div",
10200
- {
10201
- style: {
10202
- flex: 1,
10203
- display: "flex",
10204
- alignItems: "center",
10205
- justifyContent: "center",
10206
- color: theme2.colors.textSecondary,
10207
- fontSize: `${theme2.fontSizes[1]}px`
10208
- },
10209
- children: "Select a package to view its dependencies"
10210
- }
10211
- ),
10212
- /* @__PURE__ */ jsx(
10213
- DependencyInfoModal,
10214
- {
10215
- isOpen: showInfoModal,
10216
- onClose: () => setShowInfoModal(false)
10217
- }
10218
- )
10163
+ pkg: selectedPackage,
10164
+ isExpanded: true,
10165
+ onToggle: () => {
10166
+ },
10167
+ onCommandClick,
10168
+ onConfigClick,
10169
+ onPackageClick,
10170
+ standalone: true
10171
+ }
10172
+ ) })
10173
+ ]
10174
+ }
10175
+ )
10176
+ ]
10177
+ }
10178
+ )
10179
+ }
10180
+ );
10181
+ };
10182
+ const PackageCompositionPanelPreview = () => {
10183
+ const { theme } = useTheme();
10184
+ return /* @__PURE__ */ jsxs(
10185
+ "div",
10186
+ {
10187
+ style: {
10188
+ padding: "12px",
10189
+ fontSize: "12px",
10190
+ color: theme.colors.text,
10191
+ display: "flex",
10192
+ flexDirection: "column",
10193
+ gap: "6px"
10194
+ },
10195
+ children: [
10196
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
10197
+ /* @__PURE__ */ jsx(PackageManagerIcon, { packageManager: "npm", size: 14 }),
10198
+ /* @__PURE__ */ jsx("span", { children: "my-app" })
10199
+ ] }),
10200
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingLeft: "8px" }, children: [
10201
+ /* @__PURE__ */ jsx(Terminal, { size: 12, color: theme.colors.textSecondary }),
10202
+ /* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary }, children: "5 commands" })
10203
+ ] }),
10204
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingLeft: "8px" }, children: [
10205
+ /* @__PURE__ */ jsx(Settings, { size: 12, color: theme.colors.textSecondary }),
10206
+ /* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary }, children: "3 configs" })
10207
+ ] }),
10208
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", paddingLeft: "8px" }, children: [
10209
+ /* @__PURE__ */ jsx(Package, { size: 12, color: theme.colors.textSecondary }),
10210
+ /* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary }, children: "12 deps" })
10211
+ ] })
10219
10212
  ]
10220
10213
  }
10221
10214
  );
10222
10215
  };
10223
- const DependenciesPanel = (props) => {
10224
- return /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(DependenciesPanelContent, { ...props }) });
10216
+ const PackageCompositionPanel = ({ context }) => {
10217
+ var _a;
10218
+ const packagesSlice = context.getSlice("packages");
10219
+ const packages = ((_a = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a.packages) ?? [];
10220
+ const isLoading = (packagesSlice == null ? void 0 : packagesSlice.loading) || false;
10221
+ return /* @__PURE__ */ jsx(
10222
+ PackageCompositionPanelContent,
10223
+ {
10224
+ packages,
10225
+ isLoading
10226
+ }
10227
+ );
10225
10228
  };
10226
10229
  class LocalSearchService {
10227
10230
  constructor() {
@@ -10392,7 +10395,7 @@ const SearchPanelContent = ({
10392
10395
  onDirectoryFiltersChange,
10393
10396
  selectedFile
10394
10397
  }) => {
10395
- const { theme: theme2 } = useTheme();
10398
+ const { theme } = useTheme();
10396
10399
  const [searchQuery, setSearchQuery] = useState("");
10397
10400
  const [searchResults, setSearchResults] = useState([]);
10398
10401
  const [directoryFilter, setDirectoryFilter] = useState("");
@@ -10610,7 +10613,7 @@ const SearchPanelContent = ({
10610
10613
  "span",
10611
10614
  {
10612
10615
  style: {
10613
- backgroundColor: `${theme2.colors.primary}40`,
10616
+ backgroundColor: `${theme.colors.primary}40`,
10614
10617
  fontWeight: "bold"
10615
10618
  },
10616
10619
  children: part
@@ -10620,15 +10623,15 @@ const SearchPanelContent = ({
10620
10623
  );
10621
10624
  };
10622
10625
  return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
10623
- /* @__PURE__ */ jsxs("div", { style: { borderBottom: `1px solid ${theme2.colors.border}` }, children: [
10626
+ /* @__PURE__ */ jsxs("div", { style: { borderBottom: `1px solid ${theme.colors.border}` }, children: [
10624
10627
  /* @__PURE__ */ jsxs("div", { style: { padding: "12px", paddingBottom: "8px", position: "relative" }, children: [
10625
10628
  /* @__PURE__ */ jsx(
10626
10629
  "div",
10627
10630
  {
10628
10631
  style: {
10629
10632
  marginBottom: "4px",
10630
- fontSize: theme2.fontSizes[0],
10631
- color: theme2.colors.textSecondary,
10633
+ fontSize: theme.fontSizes[0],
10634
+ color: theme.colors.textSecondary,
10632
10635
  display: "flex",
10633
10636
  alignItems: "center",
10634
10637
  justifyContent: "space-between"
@@ -10663,11 +10666,11 @@ const SearchPanelContent = ({
10663
10666
  style: {
10664
10667
  flex: 1,
10665
10668
  padding: "8px 12px",
10666
- fontSize: theme2.fontSizes[1],
10669
+ fontSize: theme.fontSizes[1],
10667
10670
  borderRadius: "4px",
10668
- border: `1px solid ${directoryFilter && showDirectoryDropdown ? theme2.colors.primary : theme2.colors.border}`,
10669
- backgroundColor: theme2.colors.backgroundSecondary || theme2.colors.background,
10670
- color: theme2.colors.text,
10671
+ border: `1px solid ${directoryFilter && showDirectoryDropdown ? theme.colors.primary : theme.colors.border}`,
10672
+ backgroundColor: theme.colors.backgroundSecondary || theme.colors.background,
10673
+ color: theme.colors.text,
10671
10674
  outline: "none"
10672
10675
  }
10673
10676
  }
@@ -10678,12 +10681,12 @@ const SearchPanelContent = ({
10678
10681
  onClick: () => setExcludeDirectory(!excludeDirectory),
10679
10682
  style: {
10680
10683
  padding: "8px 12px",
10681
- fontSize: theme2.fontSizes[0],
10684
+ fontSize: theme.fontSizes[0],
10682
10685
  fontWeight: 500,
10683
10686
  borderRadius: "4px",
10684
- border: `1px solid ${excludeDirectory ? theme2.colors.primary : theme2.colors.border}`,
10685
- backgroundColor: excludeDirectory ? `${theme2.colors.primary}20` : theme2.colors.backgroundSecondary || theme2.colors.background,
10686
- color: excludeDirectory ? theme2.colors.text : theme2.colors.textSecondary,
10687
+ border: `1px solid ${excludeDirectory ? theme.colors.primary : theme.colors.border}`,
10688
+ backgroundColor: excludeDirectory ? `${theme.colors.primary}20` : theme.colors.backgroundSecondary || theme.colors.background,
10689
+ color: excludeDirectory ? theme.colors.text : theme.colors.textSecondary,
10687
10690
  cursor: "pointer"
10688
10691
  },
10689
10692
  title: excludeDirectory ? "Excluding files in this directory" : "Including only files in this directory",
@@ -10700,9 +10703,9 @@ const SearchPanelContent = ({
10700
10703
  width: "calc(100% - 24px)",
10701
10704
  marginTop: "4px",
10702
10705
  borderRadius: "4px",
10703
- border: `1px solid ${theme2.colors.primary}`,
10704
- backgroundColor: theme2.colors.background,
10705
- boxShadow: `0 4px 6px -1px ${theme2.colors.border}40`,
10706
+ border: `1px solid ${theme.colors.primary}`,
10707
+ backgroundColor: theme.colors.background,
10708
+ boxShadow: `0 4px 6px -1px ${theme.colors.border}40`,
10706
10709
  maxHeight: "256px",
10707
10710
  overflowY: "auto"
10708
10711
  },
@@ -10712,9 +10715,9 @@ const SearchPanelContent = ({
10712
10715
  style: {
10713
10716
  padding: "8px 12px",
10714
10717
  cursor: "pointer",
10715
- fontSize: theme2.fontSizes[1],
10716
- backgroundColor: index === selectedDirectoryIndex ? `${theme2.colors.primary}20` : "transparent",
10717
- color: index === selectedDirectoryIndex ? theme2.colors.text : theme2.colors.textSecondary
10718
+ fontSize: theme.fontSizes[1],
10719
+ backgroundColor: index === selectedDirectoryIndex ? `${theme.colors.primary}20` : "transparent",
10720
+ color: index === selectedDirectoryIndex ? theme.colors.text : theme.colors.textSecondary
10718
10721
  },
10719
10722
  onMouseEnter: () => setSelectedDirectoryIndex(index),
10720
10723
  onClick: () => {
@@ -10739,10 +10742,10 @@ const SearchPanelContent = ({
10739
10742
  gap: "4px",
10740
10743
  padding: "4px 8px",
10741
10744
  borderRadius: "4px",
10742
- fontSize: theme2.fontSizes[0],
10743
- backgroundColor: filter.mode === "include" ? `${theme2.colors.primary}20` : `${theme2.colors.error}20`,
10744
- border: `1px solid ${filter.mode === "include" ? theme2.colors.primary : theme2.colors.error}`,
10745
- color: theme2.colors.text
10745
+ fontSize: theme.fontSizes[0],
10746
+ backgroundColor: filter.mode === "include" ? `${theme.colors.primary}20` : `${theme.colors.error}20`,
10747
+ border: `1px solid ${filter.mode === "include" ? theme.colors.primary : theme.colors.error}`,
10748
+ color: theme.colors.text
10746
10749
  },
10747
10750
  children: [
10748
10751
  /* @__PURE__ */ jsxs(
@@ -10767,7 +10770,7 @@ const SearchPanelContent = ({
10767
10770
  background: "none",
10768
10771
  border: "none",
10769
10772
  cursor: "pointer",
10770
- color: theme2.colors.textSecondary,
10773
+ color: theme.colors.textSecondary,
10771
10774
  padding: 0,
10772
10775
  display: "flex",
10773
10776
  alignItems: "center"
@@ -10787,7 +10790,7 @@ const SearchPanelContent = ({
10787
10790
  style: {
10788
10791
  padding: "12px",
10789
10792
  paddingTop: "8px",
10790
- borderTop: `1px solid ${theme2.colors.border}40`
10793
+ borderTop: `1px solid ${theme.colors.border}40`
10791
10794
  },
10792
10795
  children: [
10793
10796
  /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
@@ -10804,11 +10807,11 @@ const SearchPanelContent = ({
10804
10807
  width: "100%",
10805
10808
  padding: "8px 12px",
10806
10809
  paddingRight: "36px",
10807
- fontSize: theme2.fontSizes[1],
10810
+ fontSize: theme.fontSizes[1],
10808
10811
  borderRadius: "4px",
10809
- border: `1px solid ${theme2.colors.border}`,
10810
- backgroundColor: theme2.colors.backgroundSecondary || theme2.colors.background,
10811
- color: theme2.colors.text,
10812
+ border: `1px solid ${theme.colors.border}`,
10813
+ backgroundColor: theme.colors.backgroundSecondary || theme.colors.background,
10814
+ color: theme.colors.text,
10812
10815
  outline: "none",
10813
10816
  boxSizing: "border-box"
10814
10817
  }
@@ -10830,7 +10833,7 @@ const SearchPanelContent = ({
10830
10833
  height: "16",
10831
10834
  viewBox: "0 0 24 24",
10832
10835
  fill: "none",
10833
- stroke: theme2.colors.textSecondary,
10836
+ stroke: theme.colors.textSecondary,
10834
10837
  strokeWidth: "2",
10835
10838
  children: [
10836
10839
  /* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" }),
@@ -10846,8 +10849,8 @@ const SearchPanelContent = ({
10846
10849
  {
10847
10850
  style: {
10848
10851
  marginTop: "4px",
10849
- fontSize: theme2.fontSizes[0],
10850
- color: theme2.colors.textSecondary
10852
+ fontSize: theme.fontSizes[0],
10853
+ color: theme.colors.textSecondary
10851
10854
  },
10852
10855
  children: "Supports wildcards: *.tsx, test?.js"
10853
10856
  }
@@ -10877,7 +10880,7 @@ const SearchPanelContent = ({
10877
10880
  style: {
10878
10881
  padding: "40px 20px",
10879
10882
  textAlign: "center",
10880
- color: theme2.colors.textSecondary
10883
+ color: theme.colors.textSecondary
10881
10884
  },
10882
10885
  children: "Loading file tree..."
10883
10886
  }
@@ -10899,7 +10902,7 @@ const SearchPanelContent = ({
10899
10902
  height: "64",
10900
10903
  viewBox: "0 0 24 24",
10901
10904
  fill: "none",
10902
- style: { color: theme2.colors.primary, opacity: 0.8 },
10905
+ style: { color: theme.colors.primary, opacity: 0.8 },
10903
10906
  children: [
10904
10907
  /* @__PURE__ */ jsx(
10905
10908
  "circle",
@@ -10928,10 +10931,10 @@ const SearchPanelContent = ({
10928
10931
  "h3",
10929
10932
  {
10930
10933
  style: {
10931
- fontSize: theme2.fontSizes[3],
10934
+ fontSize: theme.fontSizes[3],
10932
10935
  fontWeight: 600,
10933
10936
  marginBottom: "8px",
10934
- color: theme2.colors.text
10937
+ color: theme.colors.text
10935
10938
  },
10936
10939
  children: "Search files"
10937
10940
  }
@@ -10940,26 +10943,26 @@ const SearchPanelContent = ({
10940
10943
  "p",
10941
10944
  {
10942
10945
  style: {
10943
- fontSize: theme2.fontSizes[1],
10946
+ fontSize: theme.fontSizes[1],
10944
10947
  marginBottom: "16px",
10945
- color: theme2.colors.textSecondary
10948
+ color: theme.colors.textSecondary
10946
10949
  },
10947
10950
  children: "Search through filenames to find what you need"
10948
10951
  }
10949
10952
  ),
10950
10953
  /* @__PURE__ */ jsxs("div", { style: { textAlign: "left" }, children: [
10951
10954
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "8px", marginBottom: "8px" }, children: [
10952
- /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[0], color: theme2.colors.primary }, children: "💡" }),
10955
+ /* @__PURE__ */ jsx("span", { style: { fontSize: theme.fontSizes[0], color: theme.colors.primary }, children: "💡" }),
10953
10956
  /* @__PURE__ */ jsxs("div", { children: [
10954
- /* @__PURE__ */ jsx("div", { style: { fontSize: theme2.fontSizes[0], fontWeight: 500, color: theme2.colors.text }, children: "Quick search" }),
10955
- /* @__PURE__ */ jsx("div", { style: { fontSize: theme2.fontSizes[0], color: theme2.colors.textSecondary }, children: "Type to instantly filter by filename" })
10957
+ /* @__PURE__ */ jsx("div", { style: { fontSize: theme.fontSizes[0], fontWeight: 500, color: theme.colors.text }, children: "Quick search" }),
10958
+ /* @__PURE__ */ jsx("div", { style: { fontSize: theme.fontSizes[0], color: theme.colors.textSecondary }, children: "Type to instantly filter by filename" })
10956
10959
  ] })
10957
10960
  ] }),
10958
10961
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "8px" }, children: [
10959
- /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[0], color: theme2.colors.primary }, children: "📁" }),
10962
+ /* @__PURE__ */ jsx("span", { style: { fontSize: theme.fontSizes[0], color: theme.colors.primary }, children: "📁" }),
10960
10963
  /* @__PURE__ */ jsxs("div", { children: [
10961
- /* @__PURE__ */ jsx("div", { style: { fontSize: theme2.fontSizes[0], fontWeight: 500, color: theme2.colors.text }, children: "Filter by directory" }),
10962
- /* @__PURE__ */ jsx("div", { style: { fontSize: theme2.fontSizes[0], color: theme2.colors.textSecondary }, children: "Use the directory filter to narrow your search" })
10964
+ /* @__PURE__ */ jsx("div", { style: { fontSize: theme.fontSizes[0], fontWeight: 500, color: theme.colors.text }, children: "Filter by directory" }),
10965
+ /* @__PURE__ */ jsx("div", { style: { fontSize: theme.fontSizes[0], color: theme.colors.textSecondary }, children: "Use the directory filter to narrow your search" })
10963
10966
  ] })
10964
10967
  ] })
10965
10968
  ] })
@@ -10983,7 +10986,7 @@ const SearchPanelContent = ({
10983
10986
  height: "64",
10984
10987
  viewBox: "0 0 24 24",
10985
10988
  fill: "none",
10986
- style: { color: theme2.colors.textSecondary, opacity: 0.5 },
10989
+ style: { color: theme.colors.textSecondary, opacity: 0.5 },
10987
10990
  children: [
10988
10991
  /* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8", stroke: "currentColor", strokeWidth: "2" }),
10989
10992
  /* @__PURE__ */ jsx("path", { d: "m21 21-4.35-4.35", stroke: "currentColor", strokeWidth: "2" }),
@@ -10995,10 +10998,10 @@ const SearchPanelContent = ({
10995
10998
  "h3",
10996
10999
  {
10997
11000
  style: {
10998
- fontSize: theme2.fontSizes[2],
11001
+ fontSize: theme.fontSizes[2],
10999
11002
  fontWeight: 500,
11000
11003
  marginBottom: "8px",
11001
- color: theme2.colors.text
11004
+ color: theme.colors.text
11002
11005
  },
11003
11006
  children: "No results found"
11004
11007
  }
@@ -11007,13 +11010,13 @@ const SearchPanelContent = ({
11007
11010
  "p",
11008
11011
  {
11009
11012
  style: {
11010
- fontSize: theme2.fontSizes[1],
11011
- color: theme2.colors.textSecondary
11013
+ fontSize: theme.fontSizes[1],
11014
+ color: theme.colors.textSecondary
11012
11015
  },
11013
11016
  children: [
11014
11017
  "No files match",
11015
11018
  " ",
11016
- /* @__PURE__ */ jsxs("span", { style: { fontFamily: "monospace", color: theme2.colors.primary }, children: [
11019
+ /* @__PURE__ */ jsxs("span", { style: { fontFamily: "monospace", color: theme.colors.primary }, children: [
11017
11020
  '"',
11018
11021
  searchQuery,
11019
11022
  '"'
@@ -11033,9 +11036,9 @@ const SearchPanelContent = ({
11033
11036
  style: {
11034
11037
  padding: "8px 12px",
11035
11038
  cursor: "pointer",
11036
- backgroundColor: isSelected ? `${theme2.colors.primary}25` : isCurrentFile ? `${theme2.colors.primary}15` : "transparent",
11037
- borderLeft: isCurrentFile ? `3px solid ${theme2.colors.primary}` : isSelected ? `3px solid ${theme2.colors.primary}80` : "3px solid transparent",
11038
- borderBottom: `1px solid ${theme2.colors.border}20`,
11039
+ backgroundColor: isSelected ? `${theme.colors.primary}25` : isCurrentFile ? `${theme.colors.primary}15` : "transparent",
11040
+ borderLeft: isCurrentFile ? `3px solid ${theme.colors.primary}` : isSelected ? `3px solid ${theme.colors.primary}80` : "3px solid transparent",
11041
+ borderBottom: `1px solid ${theme.colors.border}20`,
11039
11042
  transition: "background-color 0.15s"
11040
11043
  },
11041
11044
  onClick: () => onFileSelect == null ? void 0 : onFileSelect(result.relativePath),
@@ -11047,7 +11050,7 @@ const SearchPanelContent = ({
11047
11050
  },
11048
11051
  onMouseLeave: () => onSearchResultHover == null ? void 0 : onSearchResultHover(null),
11049
11052
  children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "8px" }, children: [
11050
- /* @__PURE__ */ jsx("div", { style: { flexShrink: 0, marginTop: "2px" }, children: /* @__PURE__ */ jsx(FileText, { size: 14, color: theme2.colors.textSecondary }) }),
11053
+ /* @__PURE__ */ jsx("div", { style: { flexShrink: 0, marginTop: "2px" }, children: /* @__PURE__ */ jsx(FileText, { size: 14, color: theme.colors.textSecondary }) }),
11051
11054
  /* @__PURE__ */ jsx("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: "8px" }, children: [
11052
11055
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
11053
11056
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
@@ -11055,9 +11058,9 @@ const SearchPanelContent = ({
11055
11058
  "div",
11056
11059
  {
11057
11060
  style: {
11058
- fontSize: theme2.fontSizes[1],
11061
+ fontSize: theme.fontSizes[1],
11059
11062
  fontWeight: 500,
11060
- color: theme2.colors.text
11063
+ color: theme.colors.text
11061
11064
  },
11062
11065
  children: highlightMatch(result.name, searchQuery)
11063
11066
  }
@@ -11069,8 +11072,8 @@ const SearchPanelContent = ({
11069
11072
  fontSize: "10px",
11070
11073
  padding: "2px 6px",
11071
11074
  borderRadius: "4px",
11072
- backgroundColor: `${theme2.colors.primary}20`,
11073
- color: theme2.colors.primary
11075
+ backgroundColor: `${theme.colors.primary}20`,
11076
+ color: theme.colors.primary
11074
11077
  },
11075
11078
  children: "CURRENT"
11076
11079
  }
@@ -11080,9 +11083,9 @@ const SearchPanelContent = ({
11080
11083
  "div",
11081
11084
  {
11082
11085
  style: {
11083
- fontSize: theme2.fontSizes[0],
11086
+ fontSize: theme.fontSizes[0],
11084
11087
  marginTop: "2px",
11085
- color: theme2.colors.textSecondary,
11088
+ color: theme.colors.textSecondary,
11086
11089
  overflow: "hidden",
11087
11090
  textOverflow: "ellipsis",
11088
11091
  whiteSpace: "nowrap"
@@ -11098,9 +11101,9 @@ const SearchPanelContent = ({
11098
11101
  flexShrink: 0,
11099
11102
  padding: "4px",
11100
11103
  borderRadius: "4px",
11101
- border: `1px solid ${copiedPath === result.path ? theme2.colors.success : theme2.colors.border}`,
11102
- backgroundColor: copiedPath === result.path ? `${theme2.colors.success}20` : theme2.colors.backgroundSecondary || theme2.colors.background,
11103
- color: copiedPath === result.path ? theme2.colors.success : theme2.colors.textSecondary,
11104
+ border: `1px solid ${copiedPath === result.path ? theme.colors.success : theme.colors.border}`,
11105
+ backgroundColor: copiedPath === result.path ? `${theme.colors.success}20` : theme.colors.backgroundSecondary || theme.colors.background,
11106
+ color: copiedPath === result.path ? theme.colors.success : theme.colors.textSecondary,
11104
11107
  cursor: "pointer",
11105
11108
  opacity: isSelected || isCurrentFile ? 0.7 : 0,
11106
11109
  transition: "opacity 0.15s"
@@ -11134,10 +11137,10 @@ const SearchPanelContent = ({
11134
11137
  {
11135
11138
  style: {
11136
11139
  padding: "8px 12px",
11137
- borderTop: `1px solid ${theme2.colors.border}`,
11138
- fontSize: theme2.fontSizes[0],
11139
- color: theme2.colors.textSecondary,
11140
- backgroundColor: theme2.colors.backgroundSecondary || theme2.colors.background
11140
+ borderTop: `1px solid ${theme.colors.border}`,
11141
+ fontSize: theme.fontSizes[0],
11142
+ color: theme.colors.textSecondary,
11143
+ backgroundColor: theme.colors.backgroundSecondary || theme.colors.background
11141
11144
  },
11142
11145
  children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
11143
11146
  /* @__PURE__ */ jsxs("span", { children: [
@@ -11155,8 +11158,8 @@ const SearchPanelContent = ({
11155
11158
  style: {
11156
11159
  padding: "2px 6px",
11157
11160
  borderRadius: "4px",
11158
- backgroundColor: `${theme2.colors.primary}20`,
11159
- color: theme2.colors.textSecondary
11161
+ backgroundColor: `${theme.colors.primary}20`,
11162
+ color: theme.colors.textSecondary
11160
11163
  },
11161
11164
  children: [
11162
11165
  directoryFilters.length,
@@ -11171,14 +11174,14 @@ const SearchPanelContent = ({
11171
11174
  ] });
11172
11175
  };
11173
11176
  const SearchPanelPreview = () => {
11174
- const { theme: theme2 } = useTheme();
11177
+ const { theme } = useTheme();
11175
11178
  return /* @__PURE__ */ jsxs(
11176
11179
  "div",
11177
11180
  {
11178
11181
  style: {
11179
11182
  padding: "12px",
11180
11183
  fontSize: "12px",
11181
- color: theme2.colors.text,
11184
+ color: theme.colors.text,
11182
11185
  display: "flex",
11183
11186
  flexDirection: "column",
11184
11187
  gap: "6px"
@@ -11190,9 +11193,9 @@ const SearchPanelPreview = () => {
11190
11193
  style: {
11191
11194
  padding: "6px 8px",
11192
11195
  borderRadius: "4px",
11193
- backgroundColor: theme2.colors.backgroundSecondary,
11194
- border: `1px solid ${theme2.colors.border}`,
11195
- color: theme2.colors.textSecondary,
11196
+ backgroundColor: theme.colors.backgroundSecondary,
11197
+ border: `1px solid ${theme.colors.border}`,
11198
+ color: theme.colors.textSecondary,
11196
11199
  fontSize: "11px"
11197
11200
  },
11198
11201
  children: "Search files..."
@@ -11268,27 +11271,6 @@ const panels = [
11268
11271
  console.log("Package Composition Panel unmounting");
11269
11272
  }
11270
11273
  },
11271
- {
11272
- metadata: {
11273
- id: "industry-theme.dependencies",
11274
- name: "Dependencies",
11275
- icon: "Package",
11276
- version: "0.1.0",
11277
- author: "Industry Theme",
11278
- description: "View and explore package dependencies",
11279
- slices: ["packages"]
11280
- },
11281
- component: DependenciesPanel,
11282
- onMount: async (context) => {
11283
- console.log("Dependencies Panel mounted");
11284
- if (context.hasSlice("packages") && !context.isSliceLoading("packages")) {
11285
- await context.refresh("repository", "packages");
11286
- }
11287
- },
11288
- onUnmount: async (_context) => {
11289
- console.log("Dependencies Panel unmounting");
11290
- }
11291
- },
11292
11274
  {
11293
11275
  metadata: {
11294
11276
  id: "industry-theme.search",
@@ -11318,7 +11300,6 @@ const onPackageUnload = async () => {
11318
11300
  console.log("Repository Composition Panels package unloading");
11319
11301
  };
11320
11302
  export {
11321
- DependenciesPanel,
11322
11303
  GitChangesPanel,
11323
11304
  GitChangesPanelContent,
11324
11305
  GitChangesPanelPreview,