@industry-theme/repository-composition-panels 0.2.13 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import React2, { createContext, useContext, forwardRef, createElement, useRef, useEffect, memo, PureComponent, isValidElement, cloneElement, useLayoutEffect, useMemo, useState, useCallback, useImperativeHandle } from "react";
3
+ import { createPortal } from "react-dom";
3
4
  var ThemeContext;
4
5
  var getThemeContext = () => {
5
6
  if (typeof window !== "undefined") {
@@ -128,18 +129,18 @@ const createLucideIcon = (iconName, iconNode) => {
128
129
  * This source code is licensed under the ISC license.
129
130
  * See the LICENSE file in the root directory of this source tree.
130
131
  */
131
- const __iconNode$p = [
132
+ const __iconNode$s = [
132
133
  ["path", { d: "M5 12h14", key: "1ays0h" }],
133
134
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
134
135
  ];
135
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$p);
136
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$s);
136
137
  /**
137
138
  * @license lucide-react v0.552.0 - ISC
138
139
  *
139
140
  * This source code is licensed under the ISC license.
140
141
  * See the LICENSE file in the root directory of this source tree.
141
142
  */
142
- const __iconNode$o = [
143
+ const __iconNode$r = [
143
144
  [
144
145
  "path",
145
146
  {
@@ -150,93 +151,93 @@ const __iconNode$o = [
150
151
  ["path", { d: "m3.3 7 8.7 5 8.7-5", key: "g66t2b" }],
151
152
  ["path", { d: "M12 22V12", key: "d0xqtd" }]
152
153
  ];
153
- const Box = createLucideIcon("box", __iconNode$o);
154
+ const Box = createLucideIcon("box", __iconNode$r);
154
155
  /**
155
156
  * @license lucide-react v0.552.0 - ISC
156
157
  *
157
158
  * This source code is licensed under the ISC license.
158
159
  * See the LICENSE file in the root directory of this source tree.
159
160
  */
160
- const __iconNode$n = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
161
- const Check = createLucideIcon("check", __iconNode$n);
161
+ const __iconNode$q = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
162
+ const Check = createLucideIcon("check", __iconNode$q);
162
163
  /**
163
164
  * @license lucide-react v0.552.0 - ISC
164
165
  *
165
166
  * This source code is licensed under the ISC license.
166
167
  * See the LICENSE file in the root directory of this source tree.
167
168
  */
168
- const __iconNode$m = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
169
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$m);
169
+ const __iconNode$p = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
170
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$p);
170
171
  /**
171
172
  * @license lucide-react v0.552.0 - ISC
172
173
  *
173
174
  * This source code is licensed under the ISC license.
174
175
  * See the LICENSE file in the root directory of this source tree.
175
176
  */
176
- const __iconNode$l = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
177
- const ChevronLeft = createLucideIcon("chevron-left", __iconNode$l);
177
+ const __iconNode$o = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
178
+ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$o);
178
179
  /**
179
180
  * @license lucide-react v0.552.0 - ISC
180
181
  *
181
182
  * This source code is licensed under the ISC license.
182
183
  * See the LICENSE file in the root directory of this source tree.
183
184
  */
184
- const __iconNode$k = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
185
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$k);
185
+ const __iconNode$n = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
186
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$n);
186
187
  /**
187
188
  * @license lucide-react v0.552.0 - ISC
188
189
  *
189
190
  * This source code is licensed under the ISC license.
190
191
  * See the LICENSE file in the root directory of this source tree.
191
192
  */
192
- const __iconNode$j = [
193
+ const __iconNode$m = [
193
194
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
194
195
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
195
196
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
196
197
  ];
197
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$j);
198
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$m);
198
199
  /**
199
200
  * @license lucide-react v0.552.0 - ISC
200
201
  *
201
202
  * This source code is licensed under the ISC license.
202
203
  * See the LICENSE file in the root directory of this source tree.
203
204
  */
204
- const __iconNode$i = [
205
+ const __iconNode$l = [
205
206
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
206
207
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
207
208
  ["path", { d: "M12 17h.01", key: "p32p05" }]
208
209
  ];
209
- const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$i);
210
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$l);
210
211
  /**
211
212
  * @license lucide-react v0.552.0 - ISC
212
213
  *
213
214
  * This source code is licensed under the ISC license.
214
215
  * See the LICENSE file in the root directory of this source tree.
215
216
  */
216
- const __iconNode$h = [
217
+ const __iconNode$k = [
217
218
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
218
219
  ["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" }]
219
220
  ];
220
- const Copy = createLucideIcon("copy", __iconNode$h);
221
+ const Copy = createLucideIcon("copy", __iconNode$k);
221
222
  /**
222
223
  * @license lucide-react v0.552.0 - ISC
223
224
  *
224
225
  * This source code is licensed under the ISC license.
225
226
  * See the LICENSE file in the root directory of this source tree.
226
227
  */
227
- const __iconNode$g = [
228
+ const __iconNode$j = [
228
229
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
229
230
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
230
231
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
231
232
  ];
232
- const ExternalLink = createLucideIcon("external-link", __iconNode$g);
233
+ const ExternalLink = createLucideIcon("external-link", __iconNode$j);
233
234
  /**
234
235
  * @license lucide-react v0.552.0 - ISC
235
236
  *
236
237
  * This source code is licensed under the ISC license.
237
238
  * See the LICENSE file in the root directory of this source tree.
238
239
  */
239
- const __iconNode$f = [
240
+ const __iconNode$i = [
240
241
  [
241
242
  "path",
242
243
  {
@@ -248,14 +249,14 @@ const __iconNode$f = [
248
249
  ["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
249
250
  ["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
250
251
  ];
251
- const FileCode = createLucideIcon("file-code", __iconNode$f);
252
+ const FileCode = createLucideIcon("file-code", __iconNode$i);
252
253
  /**
253
254
  * @license lucide-react v0.552.0 - ISC
254
255
  *
255
256
  * This source code is licensed under the ISC license.
256
257
  * See the LICENSE file in the root directory of this source tree.
257
258
  */
258
- const __iconNode$e = [
259
+ const __iconNode$h = [
259
260
  [
260
261
  "path",
261
262
  {
@@ -266,14 +267,32 @@ const __iconNode$e = [
266
267
  ["path", { d: "M12 17h.01", key: "p32p05" }],
267
268
  ["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3", key: "mhlwft" }]
268
269
  ];
269
- const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$e);
270
+ const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$h);
270
271
  /**
271
272
  * @license lucide-react v0.552.0 - ISC
272
273
  *
273
274
  * This source code is licensed under the ISC license.
274
275
  * See the LICENSE file in the root directory of this source tree.
275
276
  */
276
- const __iconNode$d = [
277
+ const __iconNode$g = [
278
+ [
279
+ "path",
280
+ {
281
+ d: "M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7",
282
+ key: "huwfnr"
283
+ }
284
+ ],
285
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
286
+ ["path", { d: "m10 18 3-3-3-3", key: "18f6ys" }]
287
+ ];
288
+ const FileSymlink = createLucideIcon("file-symlink", __iconNode$g);
289
+ /**
290
+ * @license lucide-react v0.552.0 - ISC
291
+ *
292
+ * This source code is licensed under the ISC license.
293
+ * See the LICENSE file in the root directory of this source tree.
294
+ */
295
+ const __iconNode$f = [
277
296
  [
278
297
  "path",
279
298
  {
@@ -286,14 +305,30 @@ const __iconNode$d = [
286
305
  ["path", { d: "M16 13H8", key: "t4e002" }],
287
306
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
288
307
  ];
289
- const FileText = createLucideIcon("file-text", __iconNode$d);
308
+ const FileText = createLucideIcon("file-text", __iconNode$f);
290
309
  /**
291
310
  * @license lucide-react v0.552.0 - ISC
292
311
  *
293
312
  * This source code is licensed under the ISC license.
294
313
  * See the LICENSE file in the root directory of this source tree.
295
314
  */
296
- const __iconNode$c = [
315
+ const __iconNode$e = [
316
+ [
317
+ "path",
318
+ {
319
+ d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
320
+ key: "usdka0"
321
+ }
322
+ ]
323
+ ];
324
+ const FolderOpen = createLucideIcon("folder-open", __iconNode$e);
325
+ /**
326
+ * @license lucide-react v0.552.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */
331
+ const __iconNode$d = [
297
332
  [
298
333
  "path",
299
334
  {
@@ -302,27 +337,27 @@ const __iconNode$c = [
302
337
  }
303
338
  ]
304
339
  ];
305
- const Folder = createLucideIcon("folder", __iconNode$c);
340
+ const Folder = createLucideIcon("folder", __iconNode$d);
306
341
  /**
307
342
  * @license lucide-react v0.552.0 - ISC
308
343
  *
309
344
  * This source code is licensed under the ISC license.
310
345
  * See the LICENSE file in the root directory of this source tree.
311
346
  */
312
- const __iconNode$b = [
347
+ const __iconNode$c = [
313
348
  ["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
314
349
  ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
315
350
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
316
351
  ["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
317
352
  ];
318
- const GitBranch = createLucideIcon("git-branch", __iconNode$b);
353
+ const GitBranch = createLucideIcon("git-branch", __iconNode$c);
319
354
  /**
320
355
  * @license lucide-react v0.552.0 - ISC
321
356
  *
322
357
  * This source code is licensed under the ISC license.
323
358
  * See the LICENSE file in the root directory of this source tree.
324
359
  */
325
- const __iconNode$a = [
360
+ const __iconNode$b = [
326
361
  [
327
362
  "path",
328
363
  {
@@ -345,35 +380,35 @@ const __iconNode$a = [
345
380
  }
346
381
  ]
347
382
  ];
348
- const Layers = createLucideIcon("layers", __iconNode$a);
383
+ const Layers = createLucideIcon("layers", __iconNode$b);
349
384
  /**
350
385
  * @license lucide-react v0.552.0 - ISC
351
386
  *
352
387
  * This source code is licensed under the ISC license.
353
388
  * See the LICENSE file in the root directory of this source tree.
354
389
  */
355
- const __iconNode$9 = [
390
+ const __iconNode$a = [
356
391
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
357
392
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
358
393
  ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
359
394
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
360
395
  ];
361
- const LayoutGrid = createLucideIcon("layout-grid", __iconNode$9);
396
+ const LayoutGrid = createLucideIcon("layout-grid", __iconNode$a);
362
397
  /**
363
398
  * @license lucide-react v0.552.0 - ISC
364
399
  *
365
400
  * This source code is licensed under the ISC license.
366
401
  * See the LICENSE file in the root directory of this source tree.
367
402
  */
368
- const __iconNode$8 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
369
- const Minus = createLucideIcon("minus", __iconNode$8);
403
+ const __iconNode$9 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
404
+ const Minus = createLucideIcon("minus", __iconNode$9);
370
405
  /**
371
406
  * @license lucide-react v0.552.0 - ISC
372
407
  *
373
408
  * This source code is licensed under the ISC license.
374
409
  * See the LICENSE file in the root directory of this source tree.
375
410
  */
376
- const __iconNode$7 = [
411
+ const __iconNode$8 = [
377
412
  [
378
413
  "path",
379
414
  {
@@ -385,50 +420,50 @@ const __iconNode$7 = [
385
420
  ["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
386
421
  ["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }]
387
422
  ];
388
- const Package = createLucideIcon("package", __iconNode$7);
423
+ const Package = createLucideIcon("package", __iconNode$8);
389
424
  /**
390
425
  * @license lucide-react v0.552.0 - ISC
391
426
  *
392
427
  * This source code is licensed under the ISC license.
393
428
  * See the LICENSE file in the root directory of this source tree.
394
429
  */
395
- const __iconNode$6 = [
430
+ const __iconNode$7 = [
396
431
  ["path", { d: "M5 12h14", key: "1ays0h" }],
397
432
  ["path", { d: "M12 5v14", key: "s699le" }]
398
433
  ];
399
- const Plus = createLucideIcon("plus", __iconNode$6);
434
+ const Plus = createLucideIcon("plus", __iconNode$7);
400
435
  /**
401
436
  * @license lucide-react v0.552.0 - ISC
402
437
  *
403
438
  * This source code is licensed under the ISC license.
404
439
  * See the LICENSE file in the root directory of this source tree.
405
440
  */
406
- const __iconNode$5 = [
441
+ const __iconNode$6 = [
407
442
  ["path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z", key: "7g6ntu" }],
408
443
  ["path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z", key: "ijws7r" }],
409
444
  ["path", { d: "M7 21h10", key: "1b0cd5" }],
410
445
  ["path", { d: "M12 3v18", key: "108xh3" }],
411
446
  ["path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2", key: "3gwbw2" }]
412
447
  ];
413
- const Scale = createLucideIcon("scale", __iconNode$5);
448
+ const Scale = createLucideIcon("scale", __iconNode$6);
414
449
  /**
415
450
  * @license lucide-react v0.552.0 - ISC
416
451
  *
417
452
  * This source code is licensed under the ISC license.
418
453
  * See the LICENSE file in the root directory of this source tree.
419
454
  */
420
- const __iconNode$4 = [
455
+ const __iconNode$5 = [
421
456
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
422
457
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
423
458
  ];
424
- const Search = createLucideIcon("search", __iconNode$4);
459
+ const Search = createLucideIcon("search", __iconNode$5);
425
460
  /**
426
461
  * @license lucide-react v0.552.0 - ISC
427
462
  *
428
463
  * This source code is licensed under the ISC license.
429
464
  * See the LICENSE file in the root directory of this source tree.
430
465
  */
431
- const __iconNode$3 = [
466
+ const __iconNode$4 = [
432
467
  [
433
468
  "path",
434
469
  {
@@ -438,14 +473,14 @@ const __iconNode$3 = [
438
473
  ],
439
474
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
440
475
  ];
441
- const Settings = createLucideIcon("settings", __iconNode$3);
476
+ const Settings = createLucideIcon("settings", __iconNode$4);
442
477
  /**
443
478
  * @license lucide-react v0.552.0 - ISC
444
479
  *
445
480
  * This source code is licensed under the ISC license.
446
481
  * See the LICENSE file in the root directory of this source tree.
447
482
  */
448
- const __iconNode$2 = [
483
+ const __iconNode$3 = [
449
484
  ["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
450
485
  [
451
486
  "path",
@@ -455,18 +490,36 @@ const __iconNode$2 = [
455
490
  }
456
491
  ]
457
492
  ];
458
- const SquarePen = createLucideIcon("square-pen", __iconNode$2);
493
+ const SquarePen = createLucideIcon("square-pen", __iconNode$3);
459
494
  /**
460
495
  * @license lucide-react v0.552.0 - ISC
461
496
  *
462
497
  * This source code is licensed under the ISC license.
463
498
  * See the LICENSE file in the root directory of this source tree.
464
499
  */
465
- const __iconNode$1 = [
500
+ const __iconNode$2 = [
466
501
  ["path", { d: "M12 19h8", key: "baeox8" }],
467
502
  ["path", { d: "m4 17 6-6-6-6", key: "1yngyt" }]
468
503
  ];
469
- const Terminal = createLucideIcon("terminal", __iconNode$1);
504
+ const Terminal = createLucideIcon("terminal", __iconNode$2);
505
+ /**
506
+ * @license lucide-react v0.552.0 - ISC
507
+ *
508
+ * This source code is licensed under the ISC license.
509
+ * See the LICENSE file in the root directory of this source tree.
510
+ */
511
+ const __iconNode$1 = [
512
+ [
513
+ "path",
514
+ {
515
+ d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
516
+ key: "wmoenq"
517
+ }
518
+ ],
519
+ ["path", { d: "M12 9v4", key: "juzpu7" }],
520
+ ["path", { d: "M12 17h.01", key: "p32p05" }]
521
+ ];
522
+ const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$1);
470
523
  /**
471
524
  * @license lucide-react v0.552.0 - ISC
472
525
  *
@@ -8089,11 +8142,31 @@ const GitChangesPanelContent = ({
8089
8142
  rootPath,
8090
8143
  isLoading = false,
8091
8144
  onFileClick,
8145
+ onContextMenuAction,
8092
8146
  emptyMessage = "No git changes to display",
8093
8147
  loadingMessage = "Loading git changes...",
8094
8148
  selectedFile
8095
8149
  }) => {
8096
8150
  const { theme } = useTheme();
8151
+ const [contextMenu, setContextMenu] = useState({
8152
+ visible: false,
8153
+ x: 0,
8154
+ y: 0,
8155
+ nodePath: "",
8156
+ isFolder: false
8157
+ });
8158
+ const contextMenuRef = useRef(null);
8159
+ useEffect(() => {
8160
+ const handleClickOutside = (e) => {
8161
+ if (contextMenuRef.current && !contextMenuRef.current.contains(e.target)) {
8162
+ setContextMenu((prev) => ({ ...prev, visible: false }));
8163
+ }
8164
+ };
8165
+ if (contextMenu.visible) {
8166
+ document.addEventListener("mousedown", handleClickOutside);
8167
+ return () => document.removeEventListener("mousedown", handleClickOutside);
8168
+ }
8169
+ }, [contextMenu.visible]);
8097
8170
  const hasChanges = gitStatus.staged.length > 0 || gitStatus.unstaged.length > 0 || gitStatus.untracked.length > 0 || gitStatus.deleted.length > 0;
8098
8171
  const [showFullTree, setShowFullTree] = useState(false);
8099
8172
  const userHasToggledView = useRef(false);
@@ -8130,6 +8203,52 @@ const GitChangesPanelContent = ({
8130
8203
  },
8131
8204
  [getFileStatus, onFileClick]
8132
8205
  );
8206
+ const handleContextMenu = useCallback(
8207
+ (event, nodePath, isFolder) => {
8208
+ event.preventDefault();
8209
+ setContextMenu({
8210
+ visible: true,
8211
+ x: event.clientX,
8212
+ y: event.clientY,
8213
+ nodePath,
8214
+ isFolder
8215
+ });
8216
+ },
8217
+ []
8218
+ );
8219
+ const closeContextMenu = useCallback(() => {
8220
+ setContextMenu((prev) => ({ ...prev, visible: false }));
8221
+ }, []);
8222
+ const getFullPath = useCallback(
8223
+ (nodePath) => {
8224
+ if (rootPath && !nodePath.startsWith(rootPath)) {
8225
+ return `${rootPath}/${nodePath}`;
8226
+ }
8227
+ return nodePath;
8228
+ },
8229
+ [rootPath]
8230
+ );
8231
+ const handleCopyFullPath = useCallback(() => {
8232
+ const fullPath = getFullPath(contextMenu.nodePath);
8233
+ navigator.clipboard.writeText(fullPath);
8234
+ onContextMenuAction == null ? void 0 : onContextMenuAction({ type: "copyFullPath", path: fullPath });
8235
+ closeContextMenu();
8236
+ }, [contextMenu.nodePath, getFullPath, onContextMenuAction, closeContextMenu]);
8237
+ const handleCopyRelativePath = useCallback(() => {
8238
+ navigator.clipboard.writeText(contextMenu.nodePath);
8239
+ onContextMenuAction == null ? void 0 : onContextMenuAction({ type: "copyRelativePath", path: contextMenu.nodePath });
8240
+ closeContextMenu();
8241
+ }, [contextMenu.nodePath, onContextMenuAction, closeContextMenu]);
8242
+ const handleOpenFile = useCallback(() => {
8243
+ const fullPath = getFullPath(contextMenu.nodePath);
8244
+ onContextMenuAction == null ? void 0 : onContextMenuAction({ type: "openFile", path: fullPath });
8245
+ closeContextMenu();
8246
+ }, [contextMenu.nodePath, getFullPath, onContextMenuAction, closeContextMenu]);
8247
+ const handleOpenFolder = useCallback(() => {
8248
+ const fullPath = getFullPath(contextMenu.nodePath);
8249
+ onContextMenuAction == null ? void 0 : onContextMenuAction({ type: "openFolder", path: fullPath });
8250
+ closeContextMenu();
8251
+ }, [contextMenu.nodePath, getFullPath, onContextMenuAction, closeContextMenu]);
8133
8252
  const gitChangesData = useMemo(() => {
8134
8253
  if (isLoading) {
8135
8254
  return null;
@@ -8286,6 +8405,7 @@ const GitChangesPanelContent = ({
8286
8405
  theme,
8287
8406
  gitStatusData: gitChangesData.statusData,
8288
8407
  onFileSelect: handleFileSelect,
8408
+ onContextMenu: handleContextMenu,
8289
8409
  selectedFile,
8290
8410
  transparentBackground: true,
8291
8411
  horizontalNodePadding: "16px",
@@ -8294,9 +8414,93 @@ const GitChangesPanelContent = ({
8294
8414
  showFullTree ? "full" : "changes"
8295
8415
  );
8296
8416
  };
8417
+ const contextMenuButtonStyle = {
8418
+ display: "flex",
8419
+ alignItems: "center",
8420
+ gap: "8px",
8421
+ width: "100%",
8422
+ padding: "8px 12px",
8423
+ border: "none",
8424
+ background: "none",
8425
+ cursor: "pointer",
8426
+ fontSize: theme.fontSizes[1],
8427
+ color: theme.colors.text,
8428
+ textAlign: "left"
8429
+ };
8297
8430
  return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
8298
8431
  /* @__PURE__ */ jsx("div", { style: { height: 40, borderBottom: `1px solid ${theme.colors.border}` }, children: /* @__PURE__ */ jsx(ToggleButtons, {}) }),
8299
- /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ jsx(Content, {}) })
8432
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ jsx(Content, {}) }),
8433
+ contextMenu.visible && createPortal(
8434
+ /* @__PURE__ */ jsxs(
8435
+ "div",
8436
+ {
8437
+ ref: contextMenuRef,
8438
+ style: {
8439
+ position: "fixed",
8440
+ top: contextMenu.y,
8441
+ left: contextMenu.x,
8442
+ backgroundColor: theme.colors.background,
8443
+ border: `1px solid ${theme.colors.border}`,
8444
+ borderRadius: "6px",
8445
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
8446
+ zIndex: 1e3,
8447
+ minWidth: "180px",
8448
+ padding: "4px 0",
8449
+ fontFamily: theme.fonts.body,
8450
+ ["--theme-bg-tertiary"]: theme.colors.backgroundTertiary
8451
+ },
8452
+ children: [
8453
+ /* @__PURE__ */ jsxs(
8454
+ "button",
8455
+ {
8456
+ onClick: contextMenu.isFolder ? handleOpenFolder : handleOpenFile,
8457
+ className: "context-menu-item",
8458
+ style: contextMenuButtonStyle,
8459
+ children: [
8460
+ contextMenu.isFolder ? /* @__PURE__ */ jsx(FolderOpen, { size: 14 }) : /* @__PURE__ */ jsx(ExternalLink, { size: 14 }),
8461
+ contextMenu.isFolder ? "Open Folder" : "Open File"
8462
+ ]
8463
+ }
8464
+ ),
8465
+ /* @__PURE__ */ jsx(
8466
+ "div",
8467
+ {
8468
+ style: {
8469
+ height: "1px",
8470
+ backgroundColor: theme.colors.border,
8471
+ margin: "4px 0"
8472
+ }
8473
+ }
8474
+ ),
8475
+ /* @__PURE__ */ jsxs(
8476
+ "button",
8477
+ {
8478
+ onClick: handleCopyFullPath,
8479
+ className: "context-menu-item",
8480
+ style: contextMenuButtonStyle,
8481
+ children: [
8482
+ /* @__PURE__ */ jsx(Copy, { size: 14 }),
8483
+ "Copy Full Path"
8484
+ ]
8485
+ }
8486
+ ),
8487
+ /* @__PURE__ */ jsxs(
8488
+ "button",
8489
+ {
8490
+ onClick: handleCopyRelativePath,
8491
+ className: "context-menu-item",
8492
+ style: contextMenuButtonStyle,
8493
+ children: [
8494
+ /* @__PURE__ */ jsx(FileSymlink, { size: 14 }),
8495
+ "Copy Relative Path"
8496
+ ]
8497
+ }
8498
+ )
8499
+ ]
8500
+ }
8501
+ ),
8502
+ document.body
8503
+ )
8300
8504
  ] });
8301
8505
  };
8302
8506
  const GitChangesPanelPreview = () => {
@@ -8386,6 +8590,17 @@ const GitChangesPanel = ({ context, events }) => {
8386
8590
  },
8387
8591
  [events]
8388
8592
  );
8593
+ const handleContextMenuAction = useCallback(
8594
+ (action) => {
8595
+ events == null ? void 0 : events.emit({
8596
+ type: `contextMenu:${action.type}`,
8597
+ source: "git-changes-panel",
8598
+ timestamp: Date.now(),
8599
+ payload: { path: action.path }
8600
+ });
8601
+ },
8602
+ [events]
8603
+ );
8389
8604
  return /* @__PURE__ */ jsx(
8390
8605
  GitChangesPanelContent,
8391
8606
  {
@@ -8393,7 +8608,8 @@ const GitChangesPanel = ({ context, events }) => {
8393
8608
  fileTree,
8394
8609
  rootPath,
8395
8610
  isLoading,
8396
- onFileClick: handleFileClick
8611
+ onFileClick: handleFileClick,
8612
+ onContextMenuAction: handleContextMenuAction
8397
8613
  }
8398
8614
  );
8399
8615
  };
@@ -9073,6 +9289,373 @@ const FilterBar = ({
9073
9289
  }
9074
9290
  );
9075
9291
  };
9292
+ const LensRow = ({ lens }) => {
9293
+ const { theme } = useTheme();
9294
+ const [isExpanded, setIsExpanded] = useState(false);
9295
+ const getStatusDisplay = () => {
9296
+ if (lens.ready) {
9297
+ return { icon: Check, color: "#10b981", label: "Ready" };
9298
+ }
9299
+ if (lens.partial) {
9300
+ return { icon: TriangleAlert, color: "#f59e0b", label: "Partial" };
9301
+ }
9302
+ if (lens.checks.some((c) => c.satisfied)) {
9303
+ return { icon: X, color: "#ef4444", label: "Missing" };
9304
+ }
9305
+ return { icon: Minus, color: theme.colors.textSecondary, label: "Not configured" };
9306
+ };
9307
+ const status = getStatusDisplay();
9308
+ const StatusIcon = status.icon;
9309
+ const hasDetails = lens.checks.length > 0;
9310
+ return /* @__PURE__ */ jsxs(
9311
+ "div",
9312
+ {
9313
+ style: {
9314
+ borderBottom: `1px solid ${theme.colors.border}`
9315
+ },
9316
+ children: [
9317
+ /* @__PURE__ */ jsxs(
9318
+ "button",
9319
+ {
9320
+ onClick: () => hasDetails && setIsExpanded(!isExpanded),
9321
+ disabled: !hasDetails,
9322
+ style: {
9323
+ width: "100%",
9324
+ display: "flex",
9325
+ alignItems: "center",
9326
+ gap: "8px",
9327
+ padding: "10px 12px",
9328
+ backgroundColor: "transparent",
9329
+ border: "none",
9330
+ cursor: hasDetails ? "pointer" : "default",
9331
+ textAlign: "left",
9332
+ color: theme.colors.text
9333
+ },
9334
+ children: [
9335
+ hasDetails && (isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 14, color: theme.colors.textSecondary }) : /* @__PURE__ */ jsx(ChevronRight, { size: 14, color: theme.colors.textSecondary })),
9336
+ !hasDetails && /* @__PURE__ */ jsx("div", { style: { width: 14 } }),
9337
+ /* @__PURE__ */ jsx(StatusIcon, { size: 16, color: status.color }),
9338
+ /* @__PURE__ */ jsx(
9339
+ "span",
9340
+ {
9341
+ style: {
9342
+ flex: 1,
9343
+ fontSize: theme.fontSizes[1],
9344
+ fontWeight: 500,
9345
+ color: lens.ready ? theme.colors.text : theme.colors.textSecondary
9346
+ },
9347
+ children: lens.displayName
9348
+ }
9349
+ ),
9350
+ lens.missing.length > 0 && /* @__PURE__ */ jsxs(
9351
+ "span",
9352
+ {
9353
+ style: {
9354
+ fontSize: theme.fontSizes[0],
9355
+ color: status.color,
9356
+ padding: "2px 6px",
9357
+ backgroundColor: status.color + "15",
9358
+ borderRadius: "4px"
9359
+ },
9360
+ children: [
9361
+ lens.missing.length,
9362
+ " missing"
9363
+ ]
9364
+ }
9365
+ )
9366
+ ]
9367
+ }
9368
+ ),
9369
+ isExpanded && hasDetails && /* @__PURE__ */ jsx(
9370
+ "div",
9371
+ {
9372
+ style: {
9373
+ padding: "0 12px 12px 34px",
9374
+ display: "flex",
9375
+ flexDirection: "column",
9376
+ gap: "4px"
9377
+ },
9378
+ children: lens.checks.map((check, idx) => /* @__PURE__ */ jsx(RequirementRow, { check }, idx))
9379
+ }
9380
+ )
9381
+ ]
9382
+ }
9383
+ );
9384
+ };
9385
+ const RequirementRow = ({ check }) => {
9386
+ const { theme } = useTheme();
9387
+ const { requirement, satisfied, foundValue } = check;
9388
+ const typeLabels = {
9389
+ devDependency: "dep",
9390
+ script: "script",
9391
+ config: "config"
9392
+ };
9393
+ return /* @__PURE__ */ jsxs(
9394
+ "div",
9395
+ {
9396
+ style: {
9397
+ display: "flex",
9398
+ alignItems: "center",
9399
+ gap: "8px",
9400
+ fontSize: theme.fontSizes[0],
9401
+ padding: "4px 0"
9402
+ },
9403
+ children: [
9404
+ satisfied ? /* @__PURE__ */ jsx(Check, { size: 12, color: "#10b981" }) : /* @__PURE__ */ jsx(X, { size: 12, color: "#ef4444" }),
9405
+ /* @__PURE__ */ jsx(
9406
+ "span",
9407
+ {
9408
+ style: {
9409
+ padding: "1px 4px",
9410
+ backgroundColor: theme.colors.backgroundTertiary,
9411
+ color: theme.colors.textSecondary,
9412
+ borderRadius: "3px",
9413
+ fontSize: "10px",
9414
+ fontWeight: 500,
9415
+ textTransform: "uppercase"
9416
+ },
9417
+ children: typeLabels[requirement.type] || requirement.type
9418
+ }
9419
+ ),
9420
+ /* @__PURE__ */ jsx(
9421
+ "span",
9422
+ {
9423
+ style: {
9424
+ color: satisfied ? theme.colors.text : theme.colors.textSecondary,
9425
+ fontFamily: "monospace"
9426
+ },
9427
+ children: requirement.name
9428
+ }
9429
+ ),
9430
+ satisfied && foundValue && /* @__PURE__ */ jsx(
9431
+ "span",
9432
+ {
9433
+ style: {
9434
+ color: theme.colors.textSecondary,
9435
+ marginLeft: "auto",
9436
+ fontFamily: "monospace"
9437
+ },
9438
+ children: foundValue.length > 30 ? foundValue.slice(0, 30) + "..." : foundValue
9439
+ }
9440
+ ),
9441
+ !satisfied && requirement.suggestedFix && /* @__PURE__ */ jsxs(
9442
+ "span",
9443
+ {
9444
+ style: {
9445
+ color: theme.colors.textSecondary,
9446
+ marginLeft: "auto",
9447
+ fontStyle: "italic"
9448
+ },
9449
+ children: [
9450
+ "(add: ",
9451
+ requirement.suggestedFix,
9452
+ ")"
9453
+ ]
9454
+ }
9455
+ )
9456
+ ]
9457
+ }
9458
+ );
9459
+ };
9460
+ const LensReadinessSection = ({
9461
+ lensReadiness
9462
+ }) => {
9463
+ const { theme } = useTheme();
9464
+ if (!lensReadiness || Object.keys(lensReadiness).length === 0) {
9465
+ return /* @__PURE__ */ jsx(
9466
+ "div",
9467
+ {
9468
+ style: {
9469
+ padding: "16px",
9470
+ textAlign: "center",
9471
+ color: theme.colors.textSecondary,
9472
+ fontSize: theme.fontSizes[1]
9473
+ },
9474
+ children: "No lens readiness data available"
9475
+ }
9476
+ );
9477
+ }
9478
+ const sortedLenses = Object.values(lensReadiness).sort((a, b) => {
9479
+ if (a.ready && !b.ready) return -1;
9480
+ if (!a.ready && b.ready) return 1;
9481
+ if (a.partial && !b.partial) return -1;
9482
+ if (!a.partial && b.partial) return 1;
9483
+ return a.displayName.localeCompare(b.displayName);
9484
+ });
9485
+ const readyCount = sortedLenses.filter((l) => l.ready).length;
9486
+ const totalCount = sortedLenses.length;
9487
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
9488
+ /* @__PURE__ */ jsxs(
9489
+ "div",
9490
+ {
9491
+ style: {
9492
+ padding: "8px 12px",
9493
+ borderBottom: `1px solid ${theme.colors.border}`,
9494
+ backgroundColor: theme.colors.backgroundTertiary,
9495
+ display: "flex",
9496
+ alignItems: "center",
9497
+ justifyContent: "space-between"
9498
+ },
9499
+ children: [
9500
+ /* @__PURE__ */ jsx(
9501
+ "span",
9502
+ {
9503
+ style: {
9504
+ fontSize: theme.fontSizes[0],
9505
+ fontWeight: 600,
9506
+ color: theme.colors.textSecondary,
9507
+ textTransform: "uppercase",
9508
+ letterSpacing: "0.5px"
9509
+ },
9510
+ children: "Quality Lenses"
9511
+ }
9512
+ ),
9513
+ /* @__PURE__ */ jsxs(
9514
+ "span",
9515
+ {
9516
+ style: {
9517
+ fontSize: theme.fontSizes[0],
9518
+ color: readyCount === totalCount ? "#10b981" : theme.colors.textSecondary,
9519
+ fontWeight: 500
9520
+ },
9521
+ children: [
9522
+ readyCount,
9523
+ "/",
9524
+ totalCount,
9525
+ " ready"
9526
+ ]
9527
+ }
9528
+ )
9529
+ ]
9530
+ }
9531
+ ),
9532
+ /* @__PURE__ */ jsx("div", { children: sortedLenses.map((lens) => /* @__PURE__ */ jsx(LensRow, { lens }, lens.lensId)) })
9533
+ ] });
9534
+ };
9535
+ const OtherScriptsSection = ({
9536
+ commands,
9537
+ onCommandClick
9538
+ }) => {
9539
+ const { theme } = useTheme();
9540
+ const [isExpanded, setIsExpanded] = useState(false);
9541
+ const nonLensCommands = commands.filter((cmd) => !cmd.isLensCommand);
9542
+ if (nonLensCommands.length === 0) {
9543
+ return null;
9544
+ }
9545
+ return /* @__PURE__ */ jsxs("div", { style: { borderTop: `1px solid ${theme.colors.border}` }, children: [
9546
+ /* @__PURE__ */ jsxs(
9547
+ "button",
9548
+ {
9549
+ onClick: () => setIsExpanded(!isExpanded),
9550
+ style: {
9551
+ width: "100%",
9552
+ display: "flex",
9553
+ alignItems: "center",
9554
+ gap: "8px",
9555
+ padding: "8px 12px",
9556
+ backgroundColor: theme.colors.backgroundTertiary,
9557
+ border: "none",
9558
+ cursor: "pointer",
9559
+ textAlign: "left"
9560
+ },
9561
+ children: [
9562
+ isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 14, color: theme.colors.textSecondary }) : /* @__PURE__ */ jsx(ChevronRight, { size: 14, color: theme.colors.textSecondary }),
9563
+ /* @__PURE__ */ jsx(
9564
+ "span",
9565
+ {
9566
+ style: {
9567
+ fontSize: theme.fontSizes[0],
9568
+ fontWeight: 600,
9569
+ color: theme.colors.textSecondary,
9570
+ textTransform: "uppercase",
9571
+ letterSpacing: "0.5px"
9572
+ },
9573
+ children: "Other Scripts"
9574
+ }
9575
+ ),
9576
+ /* @__PURE__ */ jsx(
9577
+ "span",
9578
+ {
9579
+ style: {
9580
+ fontSize: theme.fontSizes[0],
9581
+ color: theme.colors.textSecondary,
9582
+ marginLeft: "auto"
9583
+ },
9584
+ children: nonLensCommands.length
9585
+ }
9586
+ )
9587
+ ]
9588
+ }
9589
+ ),
9590
+ isExpanded && /* @__PURE__ */ jsx(
9591
+ "div",
9592
+ {
9593
+ style: {
9594
+ padding: "8px 12px",
9595
+ display: "flex",
9596
+ flexDirection: "column",
9597
+ gap: "4px"
9598
+ },
9599
+ children: nonLensCommands.map((cmd, idx) => /* @__PURE__ */ jsxs(
9600
+ "button",
9601
+ {
9602
+ onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd),
9603
+ style: {
9604
+ display: "flex",
9605
+ alignItems: "center",
9606
+ gap: "8px",
9607
+ padding: "6px 10px",
9608
+ backgroundColor: theme.colors.backgroundSecondary,
9609
+ border: `1px solid ${theme.colors.border}`,
9610
+ borderRadius: "4px",
9611
+ color: theme.colors.text,
9612
+ cursor: "pointer",
9613
+ textAlign: "left",
9614
+ transition: "border-color 0.15s ease"
9615
+ },
9616
+ onMouseEnter: (e) => {
9617
+ e.currentTarget.style.borderColor = theme.colors.primary;
9618
+ },
9619
+ onMouseLeave: (e) => {
9620
+ e.currentTarget.style.borderColor = theme.colors.border;
9621
+ },
9622
+ children: [
9623
+ /* @__PURE__ */ jsx(Terminal, { size: 12, color: theme.colors.textSecondary }),
9624
+ /* @__PURE__ */ jsx(
9625
+ "span",
9626
+ {
9627
+ style: {
9628
+ fontWeight: 500,
9629
+ fontSize: theme.fontSizes[1],
9630
+ minWidth: "60px"
9631
+ },
9632
+ children: cmd.name
9633
+ }
9634
+ ),
9635
+ /* @__PURE__ */ jsx(
9636
+ "span",
9637
+ {
9638
+ style: {
9639
+ flex: 1,
9640
+ fontSize: theme.fontSizes[0],
9641
+ color: theme.colors.textSecondary,
9642
+ fontFamily: "monospace",
9643
+ overflow: "hidden",
9644
+ textOverflow: "ellipsis",
9645
+ whiteSpace: "nowrap"
9646
+ },
9647
+ children: cmd.command
9648
+ }
9649
+ ),
9650
+ /* @__PURE__ */ jsx(ExternalLink, { size: 10, color: theme.colors.textSecondary })
9651
+ ]
9652
+ },
9653
+ idx
9654
+ ))
9655
+ }
9656
+ )
9657
+ ] });
9658
+ };
9076
9659
  const dependencyTypeOrder = {
9077
9660
  peer: 0,
9078
9661
  production: 1,
@@ -9379,13 +9962,13 @@ const PackageCard = ({
9379
9962
  onPackageClick,
9380
9963
  standalone = false
9381
9964
  }) => {
9382
- var _a, _b;
9965
+ var _a, _b, _c, _d, _e, _f, _g, _h;
9383
9966
  const { theme } = useTheme();
9384
9967
  const [activeTab, setActiveTab] = useState("dependencies");
9385
9968
  const [activeFilters, setActiveFilters] = useState(/* @__PURE__ */ new Set());
9386
9969
  const [searchQuery, setSearchQuery] = useState("");
9387
9970
  const [showInfoModal, setShowInfoModal] = useState(false);
9388
- const configFiles = useMemo(() => {
9971
+ useMemo(() => {
9389
9972
  if (!pkg.configFiles) return [];
9390
9973
  return Object.entries(pkg.configFiles).filter(([, config]) => config == null ? void 0 : config.exists).map(([name, config]) => ({ name, ...config }));
9391
9974
  }, [pkg.configFiles]);
@@ -9555,8 +10138,7 @@ const PackageCard = ({
9555
10138
  },
9556
10139
  children: [
9557
10140
  { id: "dependencies", label: "Dependencies", count: dependencyItems.length },
9558
- { id: "configs", label: "Configs", count: configFiles.length },
9559
- { id: "commands", label: "Commands", count: commands.length }
10141
+ { id: "lenses", label: "Lenses", count: ((_c = pkg.qualityMetrics) == null ? void 0 : _c.lensReadiness) ? Object.values(pkg.qualityMetrics.lensReadiness).filter((l) => l.ready).length : 0, total: ((_d = pkg.qualityMetrics) == null ? void 0 : _d.lensReadiness) ? Object.keys(pkg.qualityMetrics.lensReadiness).length : 0 }
9560
10142
  ].map((tab) => /* @__PURE__ */ jsxs(
9561
10143
  "button",
9562
10144
  {
@@ -9586,7 +10168,7 @@ const PackageCard = ({
9586
10168
  borderRadius: "10px",
9587
10169
  fontSize: theme.fontSizes[0]
9588
10170
  },
9589
- children: tab.count
10171
+ children: "total" in tab ? `${tab.count}/${tab.total}` : tab.count
9590
10172
  }
9591
10173
  )
9592
10174
  ]
@@ -9595,109 +10177,17 @@ const PackageCard = ({
9595
10177
  ))
9596
10178
  }
9597
10179
  ),
9598
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, padding: activeTab === "dependencies" ? "0" : "12px", overflow: "auto" }, children: [
9599
- 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(
9600
- "button",
9601
- {
9602
- onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path),
9603
- style: {
9604
- display: "flex",
9605
- alignItems: "center",
9606
- gap: "8px",
9607
- padding: "8px 12px",
9608
- backgroundColor: theme.colors.backgroundTertiary,
9609
- border: `1px solid ${theme.colors.border}`,
9610
- borderRadius: "6px",
9611
- color: theme.colors.text,
9612
- cursor: "pointer",
9613
- textAlign: "left"
9614
- },
9615
- children: [
9616
- /* @__PURE__ */ jsx(Terminal, { size: 14, color: theme.colors.accent }),
9617
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
9618
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme.fontSizes[1] }, children: cmd.name }),
9619
- /* @__PURE__ */ jsx(
9620
- "div",
9621
- {
9622
- style: {
9623
- fontSize: theme.fontSizes[0],
9624
- color: theme.colors.textSecondary,
9625
- fontFamily: "monospace",
9626
- overflow: "hidden",
9627
- textOverflow: "ellipsis",
9628
- whiteSpace: "nowrap"
9629
- },
9630
- children: cmd.command
9631
- }
9632
- )
9633
- ] }),
9634
- cmd.isLensCommand && /* @__PURE__ */ jsx(
9635
- "span",
9636
- {
9637
- style: {
9638
- padding: "2px 6px",
9639
- backgroundColor: theme.colors.accent + "20",
9640
- color: theme.colors.accent,
9641
- borderRadius: "4px",
9642
- fontSize: theme.fontSizes[0]
9643
- },
9644
- children: cmd.lensId
9645
- }
9646
- ),
9647
- /* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme.colors.textSecondary })
9648
- ]
9649
- },
9650
- idx
9651
- )) }),
9652
- 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(
9653
- "button",
9654
- {
9655
- onClick: () => onConfigClick == null ? void 0 : onConfigClick(config),
9656
- style: {
9657
- display: "flex",
9658
- alignItems: "center",
9659
- gap: "8px",
9660
- padding: "8px 12px",
9661
- backgroundColor: theme.colors.backgroundTertiary,
9662
- border: `1px solid ${theme.colors.border}`,
9663
- borderRadius: "6px",
9664
- color: theme.colors.text,
9665
- cursor: "pointer",
9666
- textAlign: "left"
9667
- },
9668
- children: [
9669
- /* @__PURE__ */ jsx(Settings, { size: 14, color: theme.colors.textSecondary }),
9670
- /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
9671
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme.fontSizes[1] }, children: config.name }),
9672
- /* @__PURE__ */ jsx(
9673
- "div",
9674
- {
9675
- style: {
9676
- fontSize: theme.fontSizes[0],
9677
- color: theme.colors.textSecondary,
9678
- fontFamily: "monospace"
9679
- },
9680
- children: config.path
9681
- }
9682
- )
9683
- ] }),
9684
- config.isInline && /* @__PURE__ */ jsx(
9685
- "span",
9686
- {
9687
- style: {
9688
- padding: "2px 6px",
9689
- backgroundColor: theme.colors.textSecondary + "20",
9690
- color: theme.colors.textSecondary,
9691
- borderRadius: "4px",
9692
- fontSize: theme.fontSizes[0]
9693
- },
9694
- children: "inline"
9695
- }
9696
- )
9697
- ]
9698
- },
9699
- idx
9700
- )) }),
10180
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, padding: activeTab === "dependencies" ? "0" : "0", overflow: "auto" }, children: [
10181
+ activeTab === "lenses" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
10182
+ /* @__PURE__ */ jsx(LensReadinessSection, { lensReadiness: (_e = pkg.qualityMetrics) == null ? void 0 : _e.lensReadiness }),
10183
+ /* @__PURE__ */ jsx(
10184
+ OtherScriptsSection,
10185
+ {
10186
+ commands,
10187
+ onCommandClick: (cmd) => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path)
10188
+ }
10189
+ )
10190
+ ] }),
9701
10191
  activeTab === "dependencies" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
9702
10192
  dependencyItems.length === 0 ? /* @__PURE__ */ jsxs(
9703
10193
  "div",
@@ -9872,8 +10362,7 @@ const PackageCard = ({
9872
10362
  },
9873
10363
  children: [
9874
10364
  { id: "dependencies", label: "Deps", count: dependencyItems.length },
9875
- { id: "configs", label: "Configs", count: configFiles.length },
9876
- { id: "commands", label: "Commands", count: commands.length }
10365
+ { id: "lenses", label: "Lenses", count: ((_f = pkg.qualityMetrics) == null ? void 0 : _f.lensReadiness) ? Object.values(pkg.qualityMetrics.lensReadiness).filter((l) => l.ready).length : 0, total: ((_g = pkg.qualityMetrics) == null ? void 0 : _g.lensReadiness) ? Object.keys(pkg.qualityMetrics.lensReadiness).length : 0 }
9877
10366
  ].map((tab) => /* @__PURE__ */ jsxs(
9878
10367
  "button",
9879
10368
  {
@@ -9903,7 +10392,7 @@ const PackageCard = ({
9903
10392
  borderRadius: "10px",
9904
10393
  fontSize: theme.fontSizes[0]
9905
10394
  },
9906
- children: tab.count
10395
+ children: "total" in tab ? `${tab.count}/${tab.total}` : tab.count
9907
10396
  }
9908
10397
  )
9909
10398
  ]
@@ -9912,109 +10401,17 @@ const PackageCard = ({
9912
10401
  ))
9913
10402
  }
9914
10403
  ),
9915
- /* @__PURE__ */ jsxs("div", { style: { padding: activeTab === "dependencies" ? "0" : "12px", maxHeight: "300px", overflow: "auto" }, children: [
9916
- 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(
9917
- "button",
9918
- {
9919
- onClick: () => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path),
9920
- style: {
9921
- display: "flex",
9922
- alignItems: "center",
9923
- gap: "8px",
9924
- padding: "8px 12px",
9925
- backgroundColor: theme.colors.backgroundTertiary,
9926
- border: `1px solid ${theme.colors.border}`,
9927
- borderRadius: "6px",
9928
- color: theme.colors.text,
9929
- cursor: "pointer",
9930
- textAlign: "left"
9931
- },
9932
- children: [
9933
- /* @__PURE__ */ jsx(Terminal, { size: 14, color: theme.colors.accent }),
9934
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
9935
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme.fontSizes[1] }, children: cmd.name }),
9936
- /* @__PURE__ */ jsx(
9937
- "div",
9938
- {
9939
- style: {
9940
- fontSize: theme.fontSizes[0],
9941
- color: theme.colors.textSecondary,
9942
- fontFamily: "monospace",
9943
- overflow: "hidden",
9944
- textOverflow: "ellipsis",
9945
- whiteSpace: "nowrap"
9946
- },
9947
- children: cmd.command
9948
- }
9949
- )
9950
- ] }),
9951
- cmd.isLensCommand && /* @__PURE__ */ jsx(
9952
- "span",
9953
- {
9954
- style: {
9955
- padding: "2px 6px",
9956
- backgroundColor: theme.colors.accent + "20",
9957
- color: theme.colors.accent,
9958
- borderRadius: "4px",
9959
- fontSize: theme.fontSizes[0]
9960
- },
9961
- children: cmd.lensId
9962
- }
9963
- ),
9964
- /* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme.colors.textSecondary })
9965
- ]
9966
- },
9967
- idx
9968
- )) }),
9969
- 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(
9970
- "button",
9971
- {
9972
- onClick: () => onConfigClick == null ? void 0 : onConfigClick(config),
9973
- style: {
9974
- display: "flex",
9975
- alignItems: "center",
9976
- gap: "8px",
9977
- padding: "8px 12px",
9978
- backgroundColor: theme.colors.backgroundTertiary,
9979
- border: `1px solid ${theme.colors.border}`,
9980
- borderRadius: "6px",
9981
- color: theme.colors.text,
9982
- cursor: "pointer",
9983
- textAlign: "left"
9984
- },
9985
- children: [
9986
- /* @__PURE__ */ jsx(Settings, { size: 14, color: theme.colors.textSecondary }),
9987
- /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
9988
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 500, fontSize: theme.fontSizes[1] }, children: config.name }),
9989
- /* @__PURE__ */ jsx(
9990
- "div",
9991
- {
9992
- style: {
9993
- fontSize: theme.fontSizes[0],
9994
- color: theme.colors.textSecondary,
9995
- fontFamily: "monospace"
9996
- },
9997
- children: config.path
9998
- }
9999
- )
10000
- ] }),
10001
- config.isInline && /* @__PURE__ */ jsx(
10002
- "span",
10003
- {
10004
- style: {
10005
- padding: "2px 6px",
10006
- backgroundColor: theme.colors.textSecondary + "20",
10007
- color: theme.colors.textSecondary,
10008
- borderRadius: "4px",
10009
- fontSize: theme.fontSizes[0]
10010
- },
10011
- children: "inline"
10012
- }
10013
- )
10014
- ]
10015
- },
10016
- idx
10017
- )) }),
10404
+ /* @__PURE__ */ jsxs("div", { style: { padding: activeTab === "dependencies" ? "0" : "0", maxHeight: "300px", overflow: "auto" }, children: [
10405
+ activeTab === "lenses" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
10406
+ /* @__PURE__ */ jsx(LensReadinessSection, { lensReadiness: (_h = pkg.qualityMetrics) == null ? void 0 : _h.lensReadiness }),
10407
+ /* @__PURE__ */ jsx(
10408
+ OtherScriptsSection,
10409
+ {
10410
+ commands,
10411
+ onCommandClick: (cmd) => onCommandClick == null ? void 0 : onCommandClick(cmd, pkg.packageData.path)
10412
+ }
10413
+ )
10414
+ ] }),
10018
10415
  activeTab === "dependencies" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
10019
10416
  dependencyItems.length === 0 ? /* @__PURE__ */ jsxs(
10020
10417
  "div",