@industry-theme/alexandria-panels 0.1.4 → 0.1.6

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.
Files changed (28) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/mocks/panelContext.d.ts +24 -0
  4. package/dist/mocks/panelContext.d.ts.map +1 -1
  5. package/dist/panels/DependenciesPanel/components/DependencyRow.d.ts.map +1 -1
  6. package/dist/panels/DependenciesPanel/index.d.ts +1 -1
  7. package/dist/panels/DependenciesPanel/index.d.ts.map +1 -1
  8. package/dist/panels/LocalProjectsPanel/LocalProjectCard.d.ts.map +1 -1
  9. package/dist/panels/LocalProjectsPanel/index.d.ts.map +1 -1
  10. package/dist/panels/LocalProjectsPanel/types.d.ts +0 -2
  11. package/dist/panels/LocalProjectsPanel/types.d.ts.map +1 -1
  12. package/dist/panels/WorkspaceRepositoriesPanel/index.d.ts.map +1 -1
  13. package/dist/panels/WorkspacesListPanel/WorkspaceCard.d.ts +7 -0
  14. package/dist/panels/WorkspacesListPanel/WorkspaceCard.d.ts.map +1 -0
  15. package/dist/panels/WorkspacesListPanel/WorkspacesListPanel.stories.d.ts +46 -0
  16. package/dist/panels/WorkspacesListPanel/WorkspacesListPanel.stories.d.ts.map +1 -0
  17. package/dist/panels/WorkspacesListPanel/index.d.ts +35 -0
  18. package/dist/panels/WorkspacesListPanel/index.d.ts.map +1 -0
  19. package/dist/panels/WorkspacesListPanel/tools.d.ts +36 -0
  20. package/dist/panels/WorkspacesListPanel/tools.d.ts.map +1 -0
  21. package/dist/panels/WorkspacesListPanel/types.d.ts +151 -0
  22. package/dist/panels/WorkspacesListPanel/types.d.ts.map +1 -0
  23. package/dist/panels.bundle.js +1657 -816
  24. package/dist/panels.bundle.js.map +1 -1
  25. package/dist/tools/index.d.ts +1 -0
  26. package/dist/tools/index.d.ts.map +1 -1
  27. package/dist/tools.bundle.js +135 -6
  28. package/package.json +1 -1
@@ -3,7 +3,7 @@
3
3
  try {
4
4
  if (typeof document != "undefined") {
5
5
  var elementStyle = document.createElement("style");
6
- elementStyle.appendChild(document.createTextNode("/* Container query for responsive LocalProjectCard */\n.local-projects-panel {\n container-type: inline-size;\n container-name: local-projects;\n height: 100%;\n}\n\n.local-project-card {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 12px;\n}\n\n.local-project-card__content {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n min-width: 0;\n}\n\n.local-project-card__info {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.local-project-card__path,\n.local-project-card__meta {\n display: flex;\n}\n\n.local-project-card__actions {\n display: flex;\n gap: 4px;\n flex-shrink: 0;\n align-items: center;\n}\n\n.local-project-card__actions--stacked {\n display: none;\n}\n\n/* Compact mode when container is 400px or less */\n@container local-projects (max-width: 400px) {\n .local-projects-panel {\n padding: 8px !important;\n gap: 8px !important;\n }\n\n .local-projects-list {\n gap: 12px !important;\n }\n\n .local-project-card {\n flex-direction: column;\n align-items: stretch;\n gap: 6px;\n padding: 0 !important;\n }\n\n .local-project-card__content {\n gap: 8px;\n }\n\n .local-project-card__path,\n .local-project-card__meta {\n display: none;\n }\n\n .local-project-card__actions {\n display: none;\n }\n\n .local-project-card__actions--stacked {\n display: flex;\n gap: 4px;\n }\n\n .local-project-card__actions--stacked button {\n flex: 1;\n }\n}"));
6
+ elementStyle.appendChild(document.createTextNode("/* Container query for responsive LocalProjectCard */\n.local-projects-panel {\n container-type: inline-size;\n container-name: local-projects;\n height: 100%;\n}\n\n.local-project-card {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 12px;\n position: relative;\n}\n\n.local-project-card__content {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n min-width: 0;\n}\n\n.local-project-card__info {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.local-project-card__meta {\n display: flex;\n}\n\n.local-project-card__actions {\n display: flex;\n gap: 4px;\n align-items: center;\n flex-shrink: 0;\n}\n\n.local-project-card__actions--stacked {\n display: none;\n}\n\n/* Compact mode when container is 400px or less */\n@container local-projects (max-width: 400px) {\n .local-projects-panel {\n padding: 8px !important;\n gap: 8px !important;\n }\n\n .local-projects-list {\n gap: 12px !important;\n }\n\n .local-project-card {\n flex-direction: column;\n align-items: stretch;\n gap: 6px;\n padding: 0 !important;\n }\n\n .local-project-card__content {\n gap: 8px;\n }\n\n .local-project-card__meta {\n display: none;\n }\n\n .local-project-card__actions {\n display: none;\n }\n\n .local-project-card__actions--stacked {\n display: flex;\n gap: 4px;\n }\n\n .local-project-card__actions--stacked button {\n flex: 1;\n }\n}"));
7
7
  document.head.appendChild(elementStyle);
8
8
  }
9
9
  } catch (e) {
@@ -11,159 +11,7 @@
11
11
  }
12
12
  })();
13
13
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
14
- import React2, { createContext, useState, useEffect, useContext, forwardRef, createElement, useMemo, useCallback } from "react";
15
- var terminalTheme = {
16
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
17
- fonts: {
18
- body: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
19
- heading: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
20
- monospace: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace'
21
- },
22
- fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
23
- fontScale: 1,
24
- fontWeights: {
25
- body: 400,
26
- heading: 500,
27
- bold: 600,
28
- light: 300,
29
- medium: 500,
30
- semibold: 600
31
- },
32
- lineHeights: {
33
- body: 1.6,
34
- heading: 1.3,
35
- tight: 1.4,
36
- relaxed: 1.8
37
- },
38
- breakpoints: ["640px", "768px", "1024px", "1280px"],
39
- sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
40
- radii: [0, 2, 4, 6, 8, 12, 16, 24],
41
- shadows: [
42
- "none",
43
- "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
44
- "0 2px 4px 0 rgba(0, 0, 0, 0.06)",
45
- "0 4px 6px 0 rgba(0, 0, 0, 0.07)",
46
- "0 8px 12px 0 rgba(0, 0, 0, 0.08)",
47
- "0 16px 24px 0 rgba(0, 0, 0, 0.10)"
48
- ],
49
- zIndices: [0, 1, 10, 20, 30, 40, 50],
50
- colors: {
51
- text: "#e4e4e4",
52
- background: "rgba(10, 10, 10, 0.85)",
53
- primary: "#66b3ff",
54
- secondary: "#80c4ff",
55
- accent: "#66ff99",
56
- highlight: "rgba(102, 179, 255, 0.15)",
57
- muted: "rgba(26, 26, 26, 0.8)",
58
- success: "#66ff99",
59
- warning: "#ffcc66",
60
- error: "#ff6666",
61
- info: "#66b3ff",
62
- border: "rgba(255, 255, 255, 0.1)",
63
- backgroundSecondary: "rgba(15, 15, 15, 0.9)",
64
- backgroundTertiary: "rgba(20, 20, 20, 0.9)",
65
- backgroundLight: "rgba(255, 255, 255, 0.05)",
66
- backgroundHover: "rgba(102, 179, 255, 0.08)",
67
- surface: "rgba(15, 15, 15, 0.95)",
68
- textSecondary: "rgba(255, 255, 255, 0.7)",
69
- textTertiary: "rgba(255, 255, 255, 0.5)",
70
- textMuted: "rgba(255, 255, 255, 0.4)",
71
- highlightBg: "rgba(255, 235, 59, 0.25)",
72
- highlightBorder: "rgba(255, 235, 59, 0.5)"
73
- },
74
- modes: {
75
- light: {
76
- text: "#1a1a1a",
77
- background: "rgba(255, 255, 255, 0.9)",
78
- primary: "#0066cc",
79
- secondary: "#0052a3",
80
- accent: "#00cc88",
81
- highlight: "rgba(0, 102, 204, 0.08)",
82
- muted: "rgba(245, 245, 245, 0.8)",
83
- success: "#00cc88",
84
- warning: "#ffaa00",
85
- error: "#ff3333",
86
- info: "#0066cc",
87
- border: "rgba(0, 0, 0, 0.1)",
88
- backgroundSecondary: "rgba(250, 250, 250, 0.9)",
89
- backgroundTertiary: "rgba(245, 245, 245, 0.9)",
90
- backgroundLight: "rgba(0, 0, 0, 0.02)",
91
- backgroundHover: "rgba(0, 102, 204, 0.04)",
92
- surface: "rgba(255, 255, 255, 0.95)",
93
- textSecondary: "rgba(0, 0, 0, 0.6)",
94
- textTertiary: "rgba(0, 0, 0, 0.4)",
95
- textMuted: "rgba(0, 0, 0, 0.3)",
96
- highlightBg: "rgba(255, 235, 59, 0.3)",
97
- highlightBorder: "rgba(255, 235, 59, 0.6)"
98
- }
99
- },
100
- buttons: {
101
- primary: {
102
- color: "white",
103
- bg: "primary",
104
- borderWidth: 0,
105
- "&:hover": {
106
- bg: "secondary"
107
- }
108
- },
109
- secondary: {
110
- color: "primary",
111
- bg: "transparent",
112
- borderWidth: 1,
113
- borderStyle: "solid",
114
- borderColor: "primary",
115
- "&:hover": {
116
- bg: "highlight"
117
- }
118
- },
119
- ghost: {
120
- color: "text",
121
- bg: "transparent",
122
- "&:hover": {
123
- bg: "backgroundHover"
124
- }
125
- }
126
- },
127
- text: {
128
- heading: {
129
- fontFamily: "heading",
130
- fontWeight: "heading",
131
- lineHeight: "heading"
132
- },
133
- body: {
134
- fontFamily: "body",
135
- fontWeight: "body",
136
- lineHeight: "body"
137
- },
138
- caption: {
139
- fontSize: 1,
140
- color: "textSecondary"
141
- }
142
- },
143
- cards: {
144
- primary: {
145
- bg: "surface",
146
- border: "1px solid",
147
- borderColor: "border",
148
- borderRadius: 1
149
- },
150
- secondary: {
151
- bg: "backgroundSecondary",
152
- border: "1px solid",
153
- borderColor: "border",
154
- borderRadius: 1
155
- }
156
- }
157
- };
158
- function getMode(theme2, mode) {
159
- if (!mode || !theme2.modes || !theme2.modes[mode]) {
160
- return theme2.colors;
161
- }
162
- return {
163
- ...theme2.colors,
164
- ...theme2.modes[mode]
165
- };
166
- }
14
+ import React2, { createContext, useContext, forwardRef, createElement, useState, useMemo, useCallback, useEffect } from "react";
167
15
  var ThemeContext;
168
16
  var getThemeContext = () => {
169
17
  if (typeof window !== "undefined") {
@@ -187,46 +35,6 @@ var useTheme = () => {
187
35
  }
188
36
  return context;
189
37
  };
190
- var ThemeProvider = ({
191
- children,
192
- theme: customTheme = theme,
193
- initialMode
194
- }) => {
195
- const [mode, setMode] = useState(initialMode);
196
- const activeTheme = React2.useMemo(() => {
197
- if (!mode || !customTheme.modes || !customTheme.modes[mode]) {
198
- return customTheme;
199
- }
200
- return {
201
- ...customTheme,
202
- colors: getMode(customTheme, mode)
203
- };
204
- }, [customTheme, mode]);
205
- useEffect(() => {
206
- if (!initialMode) {
207
- const savedMode = localStorage.getItem("principlemd-theme-mode");
208
- if (savedMode) {
209
- setMode(savedMode);
210
- }
211
- }
212
- }, [initialMode]);
213
- useEffect(() => {
214
- if (mode) {
215
- localStorage.setItem("principlemd-theme-mode", mode);
216
- } else {
217
- localStorage.removeItem("principlemd-theme-mode");
218
- }
219
- }, [mode]);
220
- const value = {
221
- theme: activeTheme,
222
- mode,
223
- setMode
224
- };
225
- return /* @__PURE__ */ React2.createElement(ThemeContextSingleton.Provider, {
226
- value
227
- }, children);
228
- };
229
- var theme = terminalTheme;
230
38
  /**
231
39
  * @license lucide-react v0.552.0 - ISC
232
40
  *
@@ -332,7 +140,7 @@ const createLucideIcon = (iconName, iconNode) => {
332
140
  * This source code is licensed under the ISC license.
333
141
  * See the LICENSE file in the root directory of this source tree.
334
142
  */
335
- const __iconNode$j = [
143
+ const __iconNode$l = [
336
144
  [
337
145
  "path",
338
146
  {
@@ -364,14 +172,14 @@ const __iconNode$j = [
364
172
  ["path", { d: "m12 8 4.74-2.85", key: "3rx089" }],
365
173
  ["path", { d: "M12 13.5V8", key: "1io7kd" }]
366
174
  ];
367
- const Boxes = createLucideIcon("boxes", __iconNode$j);
175
+ const Boxes = createLucideIcon("boxes", __iconNode$l);
368
176
  /**
369
177
  * @license lucide-react v0.552.0 - ISC
370
178
  *
371
179
  * This source code is licensed under the ISC license.
372
180
  * See the LICENSE file in the root directory of this source tree.
373
181
  */
374
- const __iconNode$i = [
182
+ const __iconNode$k = [
375
183
  ["path", { d: "M10 12h4", key: "a56b0p" }],
376
184
  ["path", { d: "M10 8h4", key: "1sr2af" }],
377
185
  ["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
@@ -384,71 +192,83 @@ const __iconNode$i = [
384
192
  ],
385
193
  ["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
386
194
  ];
387
- const Building2 = createLucideIcon("building-2", __iconNode$i);
195
+ const Building2 = createLucideIcon("building-2", __iconNode$k);
388
196
  /**
389
197
  * @license lucide-react v0.552.0 - ISC
390
198
  *
391
199
  * This source code is licensed under the ISC license.
392
200
  * See the LICENSE file in the root directory of this source tree.
393
201
  */
394
- const __iconNode$h = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
395
- const Check = createLucideIcon("check", __iconNode$h);
202
+ const __iconNode$j = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
203
+ const Check = createLucideIcon("check", __iconNode$j);
396
204
  /**
397
205
  * @license lucide-react v0.552.0 - ISC
398
206
  *
399
207
  * This source code is licensed under the ISC license.
400
208
  * See the LICENSE file in the root directory of this source tree.
401
209
  */
402
- const __iconNode$g = [
210
+ const __iconNode$i = [
403
211
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
404
212
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
405
213
  ["path", { d: "M12 17h.01", key: "p32p05" }]
406
214
  ];
407
- const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$g);
215
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$i);
408
216
  /**
409
217
  * @license lucide-react v0.552.0 - ISC
410
218
  *
411
219
  * This source code is licensed under the ISC license.
412
220
  * See the LICENSE file in the root directory of this source tree.
413
221
  */
414
- const __iconNode$f = [
222
+ const __iconNode$h = [
415
223
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
416
224
  ["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" }]
417
225
  ];
418
- const Copy = createLucideIcon("copy", __iconNode$f);
226
+ const Copy = createLucideIcon("copy", __iconNode$h);
419
227
  /**
420
228
  * @license lucide-react v0.552.0 - ISC
421
229
  *
422
230
  * This source code is licensed under the ISC license.
423
231
  * See the LICENSE file in the root directory of this source tree.
424
232
  */
425
- const __iconNode$e = [
233
+ const __iconNode$g = [
234
+ ["path", { d: "M10 12h.01", key: "1kxr2c" }],
235
+ ["path", { d: "M18 20V6a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v14", key: "36qu9e" }],
236
+ ["path", { d: "M2 20h20", key: "owomy5" }]
237
+ ];
238
+ const DoorClosed = createLucideIcon("door-closed", __iconNode$g);
239
+ /**
240
+ * @license lucide-react v0.552.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */
245
+ const __iconNode$f = [
426
246
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
427
247
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
428
248
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
429
249
  ];
430
- const ExternalLink = createLucideIcon("external-link", __iconNode$e);
250
+ const ExternalLink = createLucideIcon("external-link", __iconNode$f);
431
251
  /**
432
252
  * @license lucide-react v0.552.0 - ISC
433
253
  *
434
254
  * This source code is licensed under the ISC license.
435
255
  * See the LICENSE file in the root directory of this source tree.
436
256
  */
437
- const __iconNode$d = [
257
+ const __iconNode$e = [
438
258
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }],
439
259
  ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
440
260
  ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
441
261
  ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
442
262
  ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }]
443
263
  ];
444
- const Focus = createLucideIcon("focus", __iconNode$d);
264
+ const Focus = createLucideIcon("focus", __iconNode$e);
445
265
  /**
446
266
  * @license lucide-react v0.552.0 - ISC
447
267
  *
448
268
  * This source code is licensed under the ISC license.
449
269
  * See the LICENSE file in the root directory of this source tree.
450
270
  */
451
- const __iconNode$c = [
271
+ const __iconNode$d = [
452
272
  [
453
273
  "path",
454
274
  {
@@ -460,14 +280,14 @@ const __iconNode$c = [
460
280
  ["path", { d: "M18 19c-2.8 0-5-2.2-5-5v8", key: "pkpw2h" }],
461
281
  ["circle", { cx: "20", cy: "19", r: "2", key: "1obnsp" }]
462
282
  ];
463
- const FolderGit2 = createLucideIcon("folder-git-2", __iconNode$c);
283
+ const FolderGit2 = createLucideIcon("folder-git-2", __iconNode$d);
464
284
  /**
465
285
  * @license lucide-react v0.552.0 - ISC
466
286
  *
467
287
  * This source code is licensed under the ISC license.
468
288
  * See the LICENSE file in the root directory of this source tree.
469
289
  */
470
- const __iconNode$b = [
290
+ const __iconNode$c = [
471
291
  [
472
292
  "path",
473
293
  {
@@ -476,14 +296,14 @@ const __iconNode$b = [
476
296
  }
477
297
  ]
478
298
  ];
479
- const FolderOpen = createLucideIcon("folder-open", __iconNode$b);
299
+ const FolderOpen = createLucideIcon("folder-open", __iconNode$c);
480
300
  /**
481
301
  * @license lucide-react v0.552.0 - ISC
482
302
  *
483
303
  * This source code is licensed under the ISC license.
484
304
  * See the LICENSE file in the root directory of this source tree.
485
305
  */
486
- const __iconNode$a = [
306
+ const __iconNode$b = [
487
307
  [
488
308
  "path",
489
309
  {
@@ -492,14 +312,14 @@ const __iconNode$a = [
492
312
  }
493
313
  ]
494
314
  ];
495
- const Folder = createLucideIcon("folder", __iconNode$a);
315
+ const Folder = createLucideIcon("folder", __iconNode$b);
496
316
  /**
497
317
  * @license lucide-react v0.552.0 - ISC
498
318
  *
499
319
  * This source code is licensed under the ISC license.
500
320
  * See the LICENSE file in the root directory of this source tree.
501
321
  */
502
- const __iconNode$9 = [
322
+ const __iconNode$a = [
503
323
  ["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
504
324
  [
505
325
  "path",
@@ -509,7 +329,37 @@ const __iconNode$9 = [
509
329
  }
510
330
  ]
511
331
  ];
512
- const House = createLucideIcon("house", __iconNode$9);
332
+ const House = createLucideIcon("house", __iconNode$a);
333
+ /**
334
+ * @license lucide-react v0.552.0 - ISC
335
+ *
336
+ * This source code is licensed under the ISC license.
337
+ * See the LICENSE file in the root directory of this source tree.
338
+ */
339
+ const __iconNode$9 = [
340
+ [
341
+ "path",
342
+ {
343
+ 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",
344
+ key: "zw3jo"
345
+ }
346
+ ],
347
+ [
348
+ "path",
349
+ {
350
+ 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",
351
+ key: "1wduqc"
352
+ }
353
+ ],
354
+ [
355
+ "path",
356
+ {
357
+ 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",
358
+ key: "kqbvx6"
359
+ }
360
+ ]
361
+ ];
362
+ const Layers = createLucideIcon("layers", __iconNode$9);
513
363
  /**
514
364
  * @license lucide-react v0.552.0 - ISC
515
365
  *
@@ -561,10 +411,9 @@ const __iconNode$5 = [
561
411
  d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
562
412
  key: "1a8usu"
563
413
  }
564
- ],
565
- ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
414
+ ]
566
415
  ];
567
- const Pencil = createLucideIcon("pencil", __iconNode$5);
416
+ const Pen = createLucideIcon("pen", __iconNode$5);
568
417
  /**
569
418
  * @license lucide-react v0.552.0 - ISC
570
419
  *
@@ -608,17 +457,13 @@ const Search = createLucideIcon("search", __iconNode$2);
608
457
  * See the LICENSE file in the root directory of this source tree.
609
458
  */
610
459
  const __iconNode$1 = [
611
- [
612
- "path",
613
- {
614
- 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",
615
- key: "wmoenq"
616
- }
617
- ],
618
- ["path", { d: "M12 9v4", key: "juzpu7" }],
619
- ["path", { d: "M12 17h.01", key: "p32p05" }]
460
+ ["path", { d: "M10 11v6", key: "nco0om" }],
461
+ ["path", { d: "M14 11v6", key: "outv1u" }],
462
+ ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
463
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
464
+ ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
620
465
  ];
621
- const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$1);
466
+ const Trash2 = createLucideIcon("trash-2", __iconNode$1);
622
467
  /**
623
468
  * @license lucide-react v0.552.0 - ISC
624
469
  *
@@ -636,7 +481,7 @@ const RepositoryAvatar = ({
636
481
  size = 32,
637
482
  fallbackIcon
638
483
  }) => {
639
- const { theme: theme2 } = useTheme();
484
+ const { theme } = useTheme();
640
485
  const borderRadius = `${Math.min(8, size / 4)}px`;
641
486
  const avatarUrl = customAvatarUrl || (owner ? `https://github.com/${owner}.png` : null);
642
487
  const getContent = () => {
@@ -669,7 +514,7 @@ const RepositoryAvatar = ({
669
514
  width: `${size}px`,
670
515
  height: `${size}px`,
671
516
  borderRadius,
672
- backgroundColor: theme2.colors.backgroundTertiary,
517
+ backgroundColor: theme.colors.backgroundTertiary,
673
518
  display: "flex",
674
519
  alignItems: "center",
675
520
  justifyContent: "center",
@@ -717,20 +562,22 @@ const LocalProjectCard = ({
717
562
  isLoading = false,
718
563
  windowState = "closed",
719
564
  compact: _compact = false,
720
- isEditMode = false,
721
- isInWorkspaceDirectory,
722
- workspacePath
565
+ isInWorkspaceDirectory
723
566
  }) => {
724
567
  var _a, _b, _c, _d;
725
- const { theme: theme2 } = useTheme();
568
+ const { theme } = useTheme();
569
+ const [isHovered, setIsHovered] = useState(false);
726
570
  const [copiedPath, setCopiedPath] = useState(false);
727
571
  const [isMoving, setIsMoving] = useState(false);
728
572
  const [isRemoving, setIsRemoving] = useState(false);
729
- const highlightColor = theme2.colors.primary;
573
+ const highlightColor = theme.colors.primary;
730
574
  const avatarUrl = ((_a = entry.github) == null ? void 0 : _a.owner) ? `https://github.com/${entry.github.owner}.png` : null;
731
575
  const handleCardClick = () => {
732
576
  onSelect == null ? void 0 : onSelect(entry);
733
577
  };
578
+ const handleDoubleClick = () => {
579
+ onOpen == null ? void 0 : onOpen(entry);
580
+ };
734
581
  const handleOpenClick = (e) => {
735
582
  e.stopPropagation();
736
583
  onOpen == null ? void 0 : onOpen(entry);
@@ -761,15 +608,6 @@ const LocalProjectCard = ({
761
608
  setIsMoving(false);
762
609
  }
763
610
  };
764
- const displayPath = useMemo(() => {
765
- if (actionMode === "workspace" && isInWorkspaceDirectory && workspacePath) {
766
- if (entry.path.startsWith(workspacePath)) {
767
- const relativePath = entry.path.slice(workspacePath.length);
768
- return relativePath.startsWith("/") ? relativePath.slice(1) : relativePath;
769
- }
770
- }
771
- return entry.path;
772
- }, [actionMode, isInWorkspaceDirectory, workspacePath, entry.path]);
773
611
  const handleCopyPath = async (e) => {
774
612
  e.stopPropagation();
775
613
  try {
@@ -780,49 +618,33 @@ const LocalProjectCard = ({
780
618
  console.error("Failed to copy path:", err);
781
619
  }
782
620
  };
621
+ const actionButtonStyle = {
622
+ display: "flex",
623
+ alignItems: "center",
624
+ justifyContent: "center",
625
+ width: "24px",
626
+ height: "24px",
627
+ padding: 0,
628
+ border: "none",
629
+ borderRadius: "4px",
630
+ backgroundColor: "transparent",
631
+ color: theme.colors.textSecondary,
632
+ cursor: "pointer",
633
+ opacity: isHovered ? 1 : 0,
634
+ pointerEvents: isHovered ? "auto" : "none",
635
+ transition: "all 0.15s ease"
636
+ };
783
637
  const renderActionButtons = (isCompact = false) => {
784
638
  const buttonFlex = isCompact ? 1 : void 0;
785
- if (actionMode === "add-to-workspace") {
786
- return /* @__PURE__ */ jsxs(
787
- "button",
788
- {
789
- type: "button",
790
- onClick: handleAddToWorkspaceClick,
791
- disabled: isLoading,
792
- title: "Add to workspace",
793
- style: {
794
- flex: buttonFlex,
795
- display: "inline-flex",
796
- alignItems: "center",
797
- justifyContent: "center",
798
- padding: "6px 10px",
799
- gap: "4px",
800
- borderRadius: "4px",
801
- border: `1px solid ${theme2.colors.primary || "#3b82f6"}`,
802
- backgroundColor: `${theme2.colors.primary || "#3b82f6"}15`,
803
- color: theme2.colors.primary || "#3b82f6",
804
- fontSize: `${theme2.fontSizes[0]}px`,
805
- fontWeight: theme2.fontWeights.medium,
806
- cursor: isLoading ? "wait" : "pointer",
807
- opacity: isLoading ? 0.6 : 1,
808
- transition: "all 0.15s ease"
809
- },
810
- children: [
811
- isLoading ? /* @__PURE__ */ jsx(LoaderCircle, { size: 12, className: "animate-spin" }) : /* @__PURE__ */ jsx(Plus, { size: 12 }),
812
- isLoading ? "Adding..." : "Add"
813
- ]
814
- }
815
- );
816
- }
817
- if (actionMode === "workspace") {
818
- return /* @__PURE__ */ jsxs(Fragment, { children: [
819
- isEditMode && isInWorkspaceDirectory === false && onMoveToWorkspace && /* @__PURE__ */ jsxs(
639
+ if (isCompact) {
640
+ if (actionMode === "add-to-workspace") {
641
+ return /* @__PURE__ */ jsxs(
820
642
  "button",
821
643
  {
822
644
  type: "button",
823
- onClick: handleMoveToWorkspaceClick,
824
- disabled: isMoving,
825
- title: "Move to workspace directory",
645
+ onClick: handleAddToWorkspaceClick,
646
+ disabled: isLoading,
647
+ title: "Add to workspace",
826
648
  style: {
827
649
  flex: buttonFlex,
828
650
  display: "inline-flex",
@@ -831,85 +653,263 @@ const LocalProjectCard = ({
831
653
  padding: "6px 10px",
832
654
  gap: "4px",
833
655
  borderRadius: "4px",
834
- border: `1px solid ${theme2.colors.primary || "#3b82f6"}`,
835
- backgroundColor: `${theme2.colors.primary || "#3b82f6"}15`,
836
- color: theme2.colors.primary || "#3b82f6",
837
- fontSize: `${theme2.fontSizes[0]}px`,
838
- fontWeight: theme2.fontWeights.medium,
839
- cursor: isMoving ? "wait" : "pointer",
840
- opacity: isMoving ? 0.6 : 1,
656
+ border: `1px solid ${theme.colors.primary || "#3b82f6"}`,
657
+ backgroundColor: `${theme.colors.primary || "#3b82f6"}15`,
658
+ color: theme.colors.primary || "#3b82f6",
659
+ fontSize: `${theme.fontSizes[0]}px`,
660
+ fontWeight: theme.fontWeights.medium,
661
+ cursor: isLoading ? "wait" : "pointer",
662
+ opacity: isLoading ? 0.6 : 1,
841
663
  transition: "all 0.15s ease"
842
664
  },
843
665
  children: [
844
- isMoving ? /* @__PURE__ */ jsx(LoaderCircle, { size: 12, className: "animate-spin" }) : /* @__PURE__ */ jsx(MoveUp, { size: 12 }),
845
- isMoving ? "Moving..." : "Move"
666
+ isLoading ? /* @__PURE__ */ jsx(LoaderCircle, { size: 12, className: "animate-spin" }) : /* @__PURE__ */ jsx(Plus, { size: 12 }),
667
+ isLoading ? "Adding..." : "Add"
846
668
  ]
847
669
  }
848
- ),
670
+ );
671
+ }
672
+ if (actionMode === "workspace") {
673
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
674
+ isInWorkspaceDirectory === false && onMoveToWorkspace && /* @__PURE__ */ jsxs(
675
+ "button",
676
+ {
677
+ type: "button",
678
+ onClick: handleMoveToWorkspaceClick,
679
+ disabled: isMoving,
680
+ title: "Move to workspace directory",
681
+ style: {
682
+ flex: 1,
683
+ display: "inline-flex",
684
+ alignItems: "center",
685
+ justifyContent: "center",
686
+ padding: "6px 10px",
687
+ gap: "4px",
688
+ borderRadius: "4px",
689
+ border: `1px solid ${theme.colors.primary || "#3b82f6"}`,
690
+ backgroundColor: `${theme.colors.primary || "#3b82f6"}15`,
691
+ color: theme.colors.primary || "#3b82f6",
692
+ fontSize: `${theme.fontSizes[0]}px`,
693
+ fontWeight: theme.fontWeights.medium,
694
+ cursor: isMoving ? "wait" : "pointer",
695
+ opacity: isMoving ? 0.6 : 1,
696
+ transition: "all 0.15s ease"
697
+ },
698
+ children: [
699
+ isMoving ? /* @__PURE__ */ jsx(LoaderCircle, { size: 12, className: "animate-spin" }) : /* @__PURE__ */ jsx(MoveUp, { size: 12 }),
700
+ isMoving ? "Moving..." : "Move"
701
+ ]
702
+ }
703
+ ),
704
+ /* @__PURE__ */ jsxs(
705
+ "button",
706
+ {
707
+ type: "button",
708
+ onClick: handleOpenClick,
709
+ title: "Open repository",
710
+ style: {
711
+ flex: 1,
712
+ display: "inline-flex",
713
+ alignItems: "center",
714
+ justifyContent: "center",
715
+ padding: "6px 10px",
716
+ gap: "4px",
717
+ borderRadius: "4px",
718
+ border: `1px solid ${theme.colors.success || "#10b981"}`,
719
+ backgroundColor: `${theme.colors.success || "#10b981"}15`,
720
+ color: theme.colors.success || "#10b981",
721
+ fontSize: `${theme.fontSizes[0]}px`,
722
+ fontWeight: theme.fontWeights.medium,
723
+ cursor: "pointer",
724
+ transition: "all 0.15s ease"
725
+ },
726
+ children: [
727
+ /* @__PURE__ */ jsx(FolderOpen, { size: 12 }),
728
+ "Open"
729
+ ]
730
+ }
731
+ ),
732
+ onRemoveFromWorkspace && /* @__PURE__ */ jsxs(
733
+ "button",
734
+ {
735
+ type: "button",
736
+ onClick: handleRemoveFromWorkspaceClick,
737
+ disabled: isRemoving,
738
+ title: "Remove from workspace",
739
+ style: {
740
+ flex: 1,
741
+ display: "inline-flex",
742
+ alignItems: "center",
743
+ justifyContent: "center",
744
+ padding: "6px 10px",
745
+ gap: "4px",
746
+ borderRadius: "4px",
747
+ border: `1px solid ${theme.colors.error || "#ef4444"}`,
748
+ backgroundColor: `${theme.colors.error || "#ef4444"}15`,
749
+ color: theme.colors.error || "#ef4444",
750
+ fontSize: `${theme.fontSizes[0]}px`,
751
+ fontWeight: theme.fontWeights.medium,
752
+ cursor: isRemoving ? "wait" : "pointer",
753
+ opacity: isRemoving ? 0.6 : 1,
754
+ transition: "all 0.15s ease"
755
+ },
756
+ children: [
757
+ isRemoving ? /* @__PURE__ */ jsx(LoaderCircle, { size: 12, className: "animate-spin" }) : /* @__PURE__ */ jsx(X, { size: 12 }),
758
+ isRemoving ? "Removing..." : "Remove"
759
+ ]
760
+ }
761
+ )
762
+ ] });
763
+ }
764
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
849
765
  /* @__PURE__ */ jsxs(
850
766
  "button",
851
767
  {
852
768
  type: "button",
853
769
  onClick: handleOpenClick,
854
- title: "Open repository",
770
+ title: "Open locally",
771
+ disabled: windowState === "opening",
855
772
  style: {
856
- flex: buttonFlex,
773
+ flex: 1,
857
774
  display: "inline-flex",
858
775
  alignItems: "center",
859
776
  justifyContent: "center",
860
777
  padding: "6px 10px",
861
778
  gap: "4px",
862
779
  borderRadius: "4px",
863
- border: `1px solid ${theme2.colors.success || "#10b981"}`,
864
- backgroundColor: `${theme2.colors.success || "#10b981"}15`,
865
- color: theme2.colors.success || "#10b981",
866
- fontSize: `${theme2.fontSizes[0]}px`,
867
- fontWeight: theme2.fontWeights.medium,
868
- cursor: "pointer",
780
+ border: `1px solid ${theme.colors.success || "#10b981"}`,
781
+ backgroundColor: `${theme.colors.success || "#10b981"}15`,
782
+ color: theme.colors.success || "#10b981",
783
+ fontSize: `${theme.fontSizes[0]}px`,
784
+ fontWeight: theme.fontWeights.medium,
785
+ cursor: windowState === "opening" ? "wait" : "pointer",
786
+ opacity: windowState === "opening" ? 0.6 : 1,
869
787
  transition: "all 0.15s ease"
870
788
  },
871
789
  children: [
872
- /* @__PURE__ */ jsx(FolderOpen, { size: 12 }),
873
- "Open"
790
+ windowState === "opening" ? /* @__PURE__ */ jsx(LoaderCircle, { size: 12, className: "animate-spin" }) : /* @__PURE__ */ jsx(FolderOpen, { size: 12 }),
791
+ windowState === "opening" ? "Opening..." : "Open"
874
792
  ]
875
793
  }
876
794
  ),
877
- isEditMode && onRemoveFromWorkspace && /* @__PURE__ */ jsxs(
795
+ actionMode === "default" && onRemove && /* @__PURE__ */ jsxs(
878
796
  "button",
879
797
  {
880
798
  type: "button",
881
- onClick: handleRemoveFromWorkspaceClick,
882
- disabled: isRemoving,
883
- title: "Remove from workspace",
799
+ onClick: handleRemoveClick,
800
+ disabled: isLoading,
801
+ title: "Remove from local projects",
884
802
  style: {
885
- flex: buttonFlex,
803
+ flex: 1,
886
804
  display: "inline-flex",
887
805
  alignItems: "center",
888
806
  justifyContent: "center",
889
- minWidth: isCompact ? void 0 : "28px",
890
- height: "28px",
891
- padding: isCompact ? "6px 10px" : 0,
807
+ padding: "6px 10px",
892
808
  gap: "4px",
893
809
  borderRadius: "4px",
894
- border: isCompact ? `1px solid ${theme2.colors.error || "#ef4444"}` : "none",
895
- backgroundColor: isCompact ? `${theme2.colors.error || "#ef4444"}15` : "transparent",
896
- color: isCompact ? theme2.colors.error || "#ef4444" : theme2.colors.textSecondary,
897
- fontSize: `${theme2.fontSizes[0]}px`,
898
- fontWeight: theme2.fontWeights.medium,
899
- cursor: isRemoving ? "wait" : "pointer",
900
- opacity: isRemoving ? 0.6 : 1,
810
+ border: `1px solid ${theme.colors.error || "#ef4444"}`,
811
+ backgroundColor: `${theme.colors.error || "#ef4444"}15`,
812
+ color: theme.colors.error || "#ef4444",
813
+ fontSize: `${theme.fontSizes[0]}px`,
814
+ fontWeight: theme.fontWeights.medium,
815
+ cursor: isLoading ? "wait" : "pointer",
816
+ opacity: isLoading ? 0.6 : 1,
901
817
  transition: "all 0.15s ease"
902
818
  },
903
819
  children: [
904
- isRemoving ? /* @__PURE__ */ jsx(LoaderCircle, { size: 14, className: "animate-spin" }) : /* @__PURE__ */ jsx(X, { size: 14 }),
905
- isCompact && (isRemoving ? "Removing..." : "Remove")
820
+ isLoading ? /* @__PURE__ */ jsx(LoaderCircle, { size: 12, className: "animate-spin" }) : /* @__PURE__ */ jsx(X, { size: 12 }),
821
+ isLoading ? "Removing..." : "Remove"
906
822
  ]
907
823
  }
908
824
  )
909
825
  ] });
910
826
  }
827
+ if (actionMode === "add-to-workspace") {
828
+ return /* @__PURE__ */ jsx(
829
+ "button",
830
+ {
831
+ type: "button",
832
+ onClick: handleAddToWorkspaceClick,
833
+ disabled: isLoading,
834
+ title: "Add to workspace",
835
+ style: {
836
+ ...actionButtonStyle,
837
+ color: theme.colors.primary || "#3b82f6"
838
+ },
839
+ children: isLoading ? /* @__PURE__ */ jsx(LoaderCircle, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx(Plus, { size: 16 })
840
+ }
841
+ );
842
+ }
843
+ if (actionMode === "workspace") {
844
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
845
+ isInWorkspaceDirectory === false && onMoveToWorkspace && /* @__PURE__ */ jsx(
846
+ "button",
847
+ {
848
+ type: "button",
849
+ onClick: handleMoveToWorkspaceClick,
850
+ disabled: isMoving,
851
+ title: "Move to workspace directory",
852
+ style: {
853
+ ...actionButtonStyle,
854
+ color: theme.colors.primary || "#3b82f6"
855
+ },
856
+ children: isMoving ? /* @__PURE__ */ jsx(LoaderCircle, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx(MoveUp, { size: 16 })
857
+ }
858
+ ),
859
+ /* @__PURE__ */ jsx(
860
+ "button",
861
+ {
862
+ type: "button",
863
+ onClick: handleCopyPath,
864
+ title: copiedPath ? "Copied!" : `Copy path: ${entry.path}`,
865
+ style: {
866
+ ...actionButtonStyle,
867
+ color: copiedPath ? theme.colors.success || "#10b981" : theme.colors.textSecondary
868
+ },
869
+ children: copiedPath ? /* @__PURE__ */ jsx(Check, { size: 16 }) : /* @__PURE__ */ jsx(Copy, { size: 16 })
870
+ }
871
+ ),
872
+ /* @__PURE__ */ jsx(
873
+ "button",
874
+ {
875
+ type: "button",
876
+ onClick: handleOpenClick,
877
+ title: "Open repository",
878
+ style: {
879
+ ...actionButtonStyle,
880
+ color: theme.colors.success || "#10b981"
881
+ },
882
+ children: /* @__PURE__ */ jsx(FolderOpen, { size: 16 })
883
+ }
884
+ ),
885
+ onRemoveFromWorkspace && /* @__PURE__ */ jsx(
886
+ "button",
887
+ {
888
+ type: "button",
889
+ onClick: handleRemoveFromWorkspaceClick,
890
+ disabled: isRemoving,
891
+ title: "Remove from workspace",
892
+ style: actionButtonStyle,
893
+ children: isRemoving ? /* @__PURE__ */ jsx(LoaderCircle, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx(X, { size: 16 })
894
+ }
895
+ )
896
+ ] });
897
+ }
911
898
  return /* @__PURE__ */ jsxs(Fragment, { children: [
912
- /* @__PURE__ */ jsxs(
899
+ /* @__PURE__ */ jsx(
900
+ "button",
901
+ {
902
+ type: "button",
903
+ onClick: handleCopyPath,
904
+ title: copiedPath ? "Copied!" : `Copy path: ${entry.path}`,
905
+ style: {
906
+ ...actionButtonStyle,
907
+ color: copiedPath ? theme.colors.success || "#10b981" : theme.colors.textSecondary
908
+ },
909
+ children: copiedPath ? /* @__PURE__ */ jsx(Check, { size: 16 }) : /* @__PURE__ */ jsx(Copy, { size: 16 })
910
+ }
911
+ ),
912
+ /* @__PURE__ */ jsx(
913
913
  "button",
914
914
  {
915
915
  type: "button",
@@ -917,58 +917,21 @@ const LocalProjectCard = ({
917
917
  title: windowState === "ready" ? "Focus window" : windowState === "opening" ? "Window is opening..." : "Open locally",
918
918
  disabled: windowState === "opening",
919
919
  style: {
920
- flex: buttonFlex,
921
- display: "inline-flex",
922
- alignItems: "center",
923
- justifyContent: "center",
924
- padding: "6px 10px",
925
- gap: "4px",
926
- borderRadius: "4px",
927
- border: `1px solid ${theme2.colors.success || "#10b981"}`,
928
- backgroundColor: `${theme2.colors.success || "#10b981"}15`,
929
- color: theme2.colors.success || "#10b981",
930
- fontSize: `${theme2.fontSizes[0]}px`,
931
- fontWeight: theme2.fontWeights.medium,
932
- cursor: windowState === "opening" ? "wait" : "pointer",
933
- opacity: windowState === "opening" ? 0.6 : 1,
934
- transition: "all 0.15s ease"
920
+ ...actionButtonStyle,
921
+ color: theme.colors.success || "#10b981"
935
922
  },
936
- children: [
937
- windowState === "ready" ? /* @__PURE__ */ jsx(Focus, { size: 12 }) : windowState === "opening" ? /* @__PURE__ */ jsx(LoaderCircle, { size: 12, className: "animate-spin" }) : /* @__PURE__ */ jsx(FolderOpen, { size: 12 }),
938
- windowState === "ready" ? "Focus" : windowState === "opening" ? "Opening..." : "Open"
939
- ]
923
+ children: windowState === "ready" ? /* @__PURE__ */ jsx(Focus, { size: 16 }) : windowState === "opening" ? /* @__PURE__ */ jsx(LoaderCircle, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx(FolderOpen, { size: 16 })
940
924
  }
941
925
  ),
942
- actionMode === "default" && onRemove && /* @__PURE__ */ jsxs(
926
+ actionMode === "default" && onRemove && /* @__PURE__ */ jsx(
943
927
  "button",
944
928
  {
945
929
  type: "button",
946
930
  onClick: handleRemoveClick,
947
931
  disabled: isLoading,
948
932
  title: "Remove from local projects",
949
- style: {
950
- flex: buttonFlex,
951
- display: "inline-flex",
952
- alignItems: "center",
953
- justifyContent: "center",
954
- minWidth: isCompact ? void 0 : "28px",
955
- height: "28px",
956
- padding: isCompact ? "6px 10px" : 0,
957
- gap: "4px",
958
- borderRadius: "4px",
959
- border: isCompact ? `1px solid ${theme2.colors.error || "#ef4444"}` : "none",
960
- backgroundColor: isCompact ? `${theme2.colors.error || "#ef4444"}15` : "transparent",
961
- color: isCompact ? theme2.colors.error || "#ef4444" : theme2.colors.textSecondary,
962
- fontSize: `${theme2.fontSizes[0]}px`,
963
- fontWeight: theme2.fontWeights.medium,
964
- cursor: isLoading ? "wait" : "pointer",
965
- opacity: isLoading ? 0.6 : 1,
966
- transition: "all 0.15s ease"
967
- },
968
- children: [
969
- isLoading ? /* @__PURE__ */ jsx(LoaderCircle, { size: 14, className: "animate-spin" }) : /* @__PURE__ */ jsx(X, { size: 14 }),
970
- isCompact && (isLoading ? "Removing..." : "Remove")
971
- ]
933
+ style: actionButtonStyle,
934
+ children: isLoading ? /* @__PURE__ */ jsx(LoaderCircle, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx(X, { size: 16 })
972
935
  }
973
936
  )
974
937
  ] });
@@ -984,9 +947,12 @@ const LocalProjectCard = ({
984
947
  border: isSelected ? `1px solid ${highlightColor}40` : "1px solid transparent",
985
948
  cursor: "pointer",
986
949
  transition: "background-color 0.15s",
987
- fontFamily: theme2.fonts.body
950
+ fontFamily: theme.fonts.body
988
951
  },
989
952
  onClick: handleCardClick,
953
+ onDoubleClick: handleDoubleClick,
954
+ onMouseEnter: () => setIsHovered(true),
955
+ onMouseLeave: () => setIsHovered(false),
990
956
  children: [
991
957
  /* @__PURE__ */ jsxs("div", { className: "local-project-card__content", children: [
992
958
  /* @__PURE__ */ jsx(
@@ -998,9 +964,9 @@ const LocalProjectCard = ({
998
964
  "div",
999
965
  {
1000
966
  style: {
1001
- color: theme2.colors.textSecondary,
1002
- fontSize: `${theme2.fontSizes[0]}px`,
1003
- fontWeight: theme2.fontWeights.semibold
967
+ color: theme.colors.textSecondary,
968
+ fontSize: `${theme.fontSizes[0]}px`,
969
+ fontWeight: theme.fontWeights.semibold
1004
970
  },
1005
971
  children: ((_b = entry.name[0]) == null ? void 0 : _b.toUpperCase()) || "?"
1006
972
  }
@@ -1012,43 +978,19 @@ const LocalProjectCard = ({
1012
978
  "span",
1013
979
  {
1014
980
  style: {
1015
- fontSize: `${theme2.fontSizes[2]}px`,
1016
- fontWeight: theme2.fontWeights.medium,
1017
- color: theme2.colors.text,
981
+ fontSize: `${theme.fontSizes[2]}px`,
982
+ fontWeight: theme.fontWeights.medium,
983
+ color: theme.colors.text,
1018
984
  overflow: "hidden",
1019
985
  textOverflow: "ellipsis",
1020
986
  whiteSpace: "nowrap",
1021
987
  textDecoration: "underline",
1022
- textDecorationColor: ((_c = entry.github) == null ? void 0 : _c.primaryLanguage) ? getLanguageColor(entry.github.primaryLanguage) : theme2.colors.textSecondary,
988
+ textDecorationColor: ((_c = entry.github) == null ? void 0 : _c.primaryLanguage) ? getLanguageColor(entry.github.primaryLanguage) : theme.colors.textSecondary,
1023
989
  textUnderlineOffset: "3px"
1024
990
  },
1025
991
  children: entry.name
1026
992
  }
1027
993
  ),
1028
- /* @__PURE__ */ jsxs(
1029
- "div",
1030
- {
1031
- className: "local-project-card__path",
1032
- onClick: handleCopyPath,
1033
- style: {
1034
- fontSize: `${theme2.fontSizes[0]}px`,
1035
- fontFamily: theme2.fonts.monospace,
1036
- color: copiedPath ? theme2.colors.success || "#10b981" : theme2.colors.textTertiary || theme2.colors.textSecondary,
1037
- overflow: "hidden",
1038
- textOverflow: "ellipsis",
1039
- whiteSpace: "nowrap",
1040
- cursor: "pointer",
1041
- alignItems: "center",
1042
- gap: "4px",
1043
- transition: "color 0.15s ease"
1044
- },
1045
- title: copiedPath ? "Copied!" : `Click to copy: ${entry.path}`,
1046
- children: [
1047
- copiedPath ? /* @__PURE__ */ jsx(Check, { size: 12 }) : /* @__PURE__ */ jsx(Copy, { size: 12 }),
1048
- displayPath
1049
- ]
1050
- }
1051
- ),
1052
994
  ((_d = entry.github) == null ? void 0 : _d.description) && /* @__PURE__ */ jsx(
1053
995
  "div",
1054
996
  {
@@ -1056,8 +998,8 @@ const LocalProjectCard = ({
1056
998
  style: {
1057
999
  alignItems: "center",
1058
1000
  gap: "12px",
1059
- fontSize: `${theme2.fontSizes[0]}px`,
1060
- color: theme2.colors.textSecondary
1001
+ fontSize: `${theme.fontSizes[0]}px`,
1002
+ color: theme.colors.textSecondary
1061
1003
  },
1062
1004
  children: /* @__PURE__ */ jsx(
1063
1005
  "span",
@@ -1080,10 +1022,10 @@ const LocalProjectCard = ({
1080
1022
  }
1081
1023
  );
1082
1024
  };
1083
- const PANEL_ID$4 = "industry-theme.local-projects";
1084
- const createPanelEvent$1 = (type, payload) => ({
1025
+ const PANEL_ID$6 = "industry-theme.local-projects";
1026
+ const createPanelEvent$2 = (type, payload) => ({
1085
1027
  type,
1086
- source: PANEL_ID$4,
1028
+ source: PANEL_ID$6,
1087
1029
  timestamp: Date.now(),
1088
1030
  payload
1089
1031
  });
@@ -1093,7 +1035,7 @@ const LocalProjectsPanelContent = ({
1093
1035
  events
1094
1036
  }) => {
1095
1037
  var _a;
1096
- const { theme: theme2 } = useTheme();
1038
+ const { theme } = useTheme();
1097
1039
  const [filter, setFilter] = useState("");
1098
1040
  const [isAdding, setIsAdding] = useState(false);
1099
1041
  const [selectedEntry, setSelectedEntry] = useState(null);
@@ -1119,7 +1061,7 @@ const LocalProjectsPanelContent = ({
1119
1061
  try {
1120
1062
  await panelActions.openRepository(entry);
1121
1063
  setWindowStates((prev) => new Map(prev).set(entry.path, "ready"));
1122
- events.emit(createPanelEvent$1(`${PANEL_ID$4}:repository-opened`, { entry }));
1064
+ events.emit(createPanelEvent$2(`${PANEL_ID$6}:repository-opened`, { entry }));
1123
1065
  } catch (error) {
1124
1066
  console.error("Error opening repository:", error);
1125
1067
  setWindowStates((prev) => new Map(prev).set(entry.path, "closed"));
@@ -1130,14 +1072,14 @@ const LocalProjectsPanelContent = ({
1130
1072
  useEffect(() => {
1131
1073
  const unsubscribers = [
1132
1074
  // Filter event from tools
1133
- events.on(`${PANEL_ID$4}:filter`, (event) => {
1075
+ events.on(`${PANEL_ID$6}:filter`, (event) => {
1134
1076
  var _a2;
1135
1077
  if (((_a2 = event.payload) == null ? void 0 : _a2.filter) !== void 0) {
1136
1078
  setFilter(event.payload.filter);
1137
1079
  }
1138
1080
  }),
1139
1081
  // Select repository event from tools
1140
- events.on(`${PANEL_ID$4}:select-repository`, (event) => {
1082
+ events.on(`${PANEL_ID$6}:select-repository`, (event) => {
1141
1083
  var _a2;
1142
1084
  const identifier = (_a2 = event.payload) == null ? void 0 : _a2.identifier;
1143
1085
  if (identifier) {
@@ -1146,12 +1088,12 @@ const LocalProjectsPanelContent = ({
1146
1088
  );
1147
1089
  if (entry) {
1148
1090
  setSelectedEntry(entry);
1149
- events.emit(createPanelEvent$1(`${PANEL_ID$4}:repository-selected`, { entry }));
1091
+ events.emit(createPanelEvent$2(`${PANEL_ID$6}:repository-selected`, { entry }));
1150
1092
  }
1151
1093
  }
1152
1094
  }),
1153
1095
  // Open repository event from tools
1154
- events.on(`${PANEL_ID$4}:open-repository`, (event) => {
1096
+ events.on(`${PANEL_ID$6}:open-repository`, (event) => {
1155
1097
  var _a2;
1156
1098
  const identifier = (_a2 = event.payload) == null ? void 0 : _a2.identifier;
1157
1099
  if (identifier) {
@@ -1199,7 +1141,7 @@ const LocalProjectsPanelContent = ({
1199
1141
  };
1200
1142
  const handleSelectRepository = (entry) => {
1201
1143
  setSelectedEntry(entry);
1202
- events.emit(createPanelEvent$1(`${PANEL_ID$4}:repository-selected`, { entry }));
1144
+ events.emit(createPanelEvent$2(`${PANEL_ID$6}:repository-selected`, { entry }));
1203
1145
  };
1204
1146
  const normalizedFilter = filter.trim().toLowerCase();
1205
1147
  const filteredAndSortedRepositories = useMemo(() => {
@@ -1229,7 +1171,7 @@ const LocalProjectsPanelContent = ({
1229
1171
  display: "flex",
1230
1172
  flexDirection: "column",
1231
1173
  height: "100%",
1232
- backgroundColor: theme2.colors.backgroundSecondary
1174
+ backgroundColor: theme.colors.backgroundSecondary
1233
1175
  };
1234
1176
  const contentContainerStyle = {
1235
1177
  ...baseContainerStyle,
@@ -1263,10 +1205,10 @@ const LocalProjectsPanelContent = ({
1263
1205
  {
1264
1206
  style: {
1265
1207
  margin: 0,
1266
- color: theme2.colors.text,
1267
- fontSize: `${theme2.fontSizes[3]}px`,
1268
- fontWeight: theme2.fontWeights.semibold,
1269
- fontFamily: theme2.fonts.body
1208
+ color: theme.colors.text,
1209
+ fontSize: `${theme.fontSizes[3]}px`,
1210
+ fontWeight: theme.fontWeights.semibold,
1211
+ fontFamily: theme.fonts.body
1270
1212
  },
1271
1213
  children: "Loading local projects..."
1272
1214
  }
@@ -1288,7 +1230,7 @@ const LocalProjectsPanelContent = ({
1288
1230
  top: "50%",
1289
1231
  left: "12px",
1290
1232
  transform: "translateY(-50%)",
1291
- color: theme2.colors.textSecondary,
1233
+ color: theme.colors.textSecondary,
1292
1234
  pointerEvents: "none",
1293
1235
  zIndex: 1
1294
1236
  }
@@ -1306,11 +1248,11 @@ const LocalProjectsPanelContent = ({
1306
1248
  boxSizing: "border-box",
1307
1249
  padding: "8px 12px 8px 36px",
1308
1250
  borderRadius: "6px",
1309
- border: `1px solid ${theme2.colors.border}`,
1310
- backgroundColor: theme2.colors.background,
1311
- color: theme2.colors.text,
1312
- fontSize: `${theme2.fontSizes[1]}px`,
1313
- fontFamily: theme2.fonts.body,
1251
+ border: `1px solid ${theme.colors.border}`,
1252
+ backgroundColor: theme.colors.background,
1253
+ color: theme.colors.text,
1254
+ fontSize: `${theme.fontSizes[1]}px`,
1255
+ fontFamily: theme.fonts.body,
1314
1256
  outline: "none"
1315
1257
  }
1316
1258
  }
@@ -1324,9 +1266,9 @@ const LocalProjectsPanelContent = ({
1324
1266
  style: {
1325
1267
  padding: "8px",
1326
1268
  borderRadius: "6px",
1327
- border: `1px solid ${theme2.colors.border}`,
1328
- backgroundColor: sortByOrg ? `${theme2.colors.primary}20` : theme2.colors.background,
1329
- color: sortByOrg ? theme2.colors.primary : theme2.colors.textSecondary,
1269
+ border: `1px solid ${theme.colors.border}`,
1270
+ backgroundColor: sortByOrg ? `${theme.colors.primary}20` : theme.colors.background,
1271
+ color: sortByOrg ? theme.colors.primary : theme.colors.textSecondary,
1330
1272
  cursor: "pointer",
1331
1273
  display: "flex",
1332
1274
  alignItems: "center",
@@ -1346,9 +1288,9 @@ const LocalProjectsPanelContent = ({
1346
1288
  style: {
1347
1289
  padding: "8px",
1348
1290
  borderRadius: "6px",
1349
- border: `1px solid ${theme2.colors.border}`,
1350
- backgroundColor: theme2.colors.primary,
1351
- color: theme2.colors.background,
1291
+ border: `1px solid ${theme.colors.border}`,
1292
+ backgroundColor: theme.colors.primary,
1293
+ color: theme.colors.background,
1352
1294
  cursor: isAdding ? "default" : "pointer",
1353
1295
  display: "flex",
1354
1296
  alignItems: "center",
@@ -1391,7 +1333,7 @@ const LocalProjectsPanelContent = ({
1391
1333
  style: {
1392
1334
  padding: "32px",
1393
1335
  textAlign: "center",
1394
- color: theme2.colors.textSecondary
1336
+ color: theme.colors.textSecondary
1395
1337
  },
1396
1338
  children: /* @__PURE__ */ jsx("p", { style: { margin: 0 }, children: normalizedFilter ? "No local projects match your filter." : "No local projects found." })
1397
1339
  }
@@ -1402,18 +1344,18 @@ const LocalProjectsPanelContent = ({
1402
1344
  ] });
1403
1345
  };
1404
1346
  const LocalProjectsPanel = (props) => {
1405
- return /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(LocalProjectsPanelContent, { ...props }) });
1347
+ return /* @__PURE__ */ jsx(LocalProjectsPanelContent, { ...props });
1406
1348
  };
1407
1349
  const LocalProjectsPanelPreview = () => {
1408
- const { theme: theme2 } = useTheme();
1350
+ const { theme } = useTheme();
1409
1351
  return /* @__PURE__ */ jsxs(
1410
1352
  "div",
1411
1353
  {
1412
1354
  style: {
1413
1355
  padding: "12px",
1414
- fontSize: `${theme2.fontSizes[0]}px`,
1415
- fontFamily: theme2.fonts.body,
1416
- color: theme2.colors.text,
1356
+ fontSize: `${theme.fontSizes[0]}px`,
1357
+ fontFamily: theme.fonts.body,
1358
+ color: theme.colors.text,
1417
1359
  display: "flex",
1418
1360
  flexDirection: "column",
1419
1361
  gap: "8px"
@@ -1426,7 +1368,7 @@ const LocalProjectsPanelPreview = () => {
1426
1368
  display: "flex",
1427
1369
  alignItems: "center",
1428
1370
  gap: "6px",
1429
- fontWeight: theme2.fontWeights.semibold
1371
+ fontWeight: theme.fontWeights.semibold
1430
1372
  },
1431
1373
  children: [
1432
1374
  /* @__PURE__ */ jsx(
@@ -1436,7 +1378,7 @@ const LocalProjectsPanelPreview = () => {
1436
1378
  width: "16px",
1437
1379
  height: "16px",
1438
1380
  borderRadius: "2px",
1439
- backgroundColor: `${theme2.colors.success || "#10b981"}40`
1381
+ backgroundColor: `${theme.colors.success || "#10b981"}40`
1440
1382
  }
1441
1383
  }
1442
1384
  ),
@@ -1448,9 +1390,9 @@ const LocalProjectsPanelPreview = () => {
1448
1390
  "div",
1449
1391
  {
1450
1392
  style: {
1451
- fontSize: `${theme2.fontSizes[0]}px`,
1452
- fontFamily: theme2.fonts.body,
1453
- color: theme2.colors.textSecondary,
1393
+ fontSize: `${theme.fontSizes[0]}px`,
1394
+ fontFamily: theme.fonts.body,
1395
+ color: theme.colors.textSecondary,
1454
1396
  marginTop: "4px"
1455
1397
  },
1456
1398
  children: "Browse your cloned repositories sorted by recent activity"
@@ -1460,10 +1402,10 @@ const LocalProjectsPanelPreview = () => {
1460
1402
  }
1461
1403
  );
1462
1404
  };
1463
- const PANEL_ID$3 = "industry-theme.workspace-repositories";
1464
- const createPanelEvent = (type, payload) => ({
1405
+ const PANEL_ID$5 = "industry-theme.workspace-repositories";
1406
+ const createPanelEvent$1 = (type, payload) => ({
1465
1407
  type,
1466
- source: PANEL_ID$3,
1408
+ source: PANEL_ID$5,
1467
1409
  timestamp: Date.now(),
1468
1410
  payload
1469
1411
  });
@@ -1472,11 +1414,12 @@ const WorkspaceRepositoriesPanelContent = ({
1472
1414
  actions,
1473
1415
  events
1474
1416
  }) => {
1475
- const { theme: theme2 } = useTheme();
1476
- const [isEditMode, setIsEditMode] = React2.useState(false);
1417
+ const { theme } = useTheme();
1477
1418
  const [repositoryLocations, setRepositoryLocations] = React2.useState(
1478
1419
  /* @__PURE__ */ new Map()
1479
1420
  );
1421
+ const [copiedPath, setCopiedPath] = useState(false);
1422
+ const [isPathHovered, setIsPathHovered] = useState(false);
1480
1423
  const panelActions = actions;
1481
1424
  const workspaceSlice = context.getSlice("workspace");
1482
1425
  const repositoriesSlice = context.getSlice("workspaceRepositories");
@@ -1525,7 +1468,7 @@ const WorkspaceRepositoriesPanelContent = ({
1525
1468
  (repository) => {
1526
1469
  var _a;
1527
1470
  events.emit(
1528
- createPanelEvent("repository:selected", {
1471
+ createPanelEvent$1("repository:selected", {
1529
1472
  repositoryId: ((_a = repository.github) == null ? void 0 : _a.id) || repository.name,
1530
1473
  repository,
1531
1474
  repositoryPath: repository.path
@@ -1538,7 +1481,7 @@ const WorkspaceRepositoriesPanelContent = ({
1538
1481
  (repository) => {
1539
1482
  var _a;
1540
1483
  events.emit(
1541
- createPanelEvent("repository:opened", {
1484
+ createPanelEvent$1("repository:opened", {
1542
1485
  repositoryId: ((_a = repository.github) == null ? void 0 : _a.id) || repository.name,
1543
1486
  repository
1544
1487
  })
@@ -1579,7 +1522,7 @@ const WorkspaceRepositoriesPanelContent = ({
1579
1522
  );
1580
1523
  useEffect(() => {
1581
1524
  const unsubscribers = [
1582
- events.on(`${PANEL_ID$3}:select-repository`, (event) => {
1525
+ events.on(`${PANEL_ID$5}:select-repository`, (event) => {
1583
1526
  var _a;
1584
1527
  const path = (_a = event.payload) == null ? void 0 : _a.repositoryPath;
1585
1528
  if (path) {
@@ -1589,7 +1532,7 @@ const WorkspaceRepositoriesPanelContent = ({
1589
1532
  }
1590
1533
  }
1591
1534
  }),
1592
- events.on(`${PANEL_ID$3}:open-repository`, (event) => {
1535
+ events.on(`${PANEL_ID$5}:open-repository`, (event) => {
1593
1536
  var _a;
1594
1537
  const path = (_a = event.payload) == null ? void 0 : _a.repositoryPath;
1595
1538
  if (path) {
@@ -1606,7 +1549,7 @@ const WorkspaceRepositoriesPanelContent = ({
1606
1549
  display: "flex",
1607
1550
  flexDirection: "column",
1608
1551
  height: "100%",
1609
- backgroundColor: theme2.colors.backgroundSecondary
1552
+ backgroundColor: theme.colors.backgroundSecondary
1610
1553
  };
1611
1554
  const contentContainerStyle = {
1612
1555
  ...baseContainerStyle,
@@ -1641,7 +1584,7 @@ const WorkspaceRepositoriesPanelContent = ({
1641
1584
  {
1642
1585
  size: 48,
1643
1586
  style: {
1644
- color: theme2.colors.textSecondary,
1587
+ color: theme.colors.textSecondary,
1645
1588
  opacity: 0.5
1646
1589
  }
1647
1590
  }
@@ -1652,10 +1595,10 @@ const WorkspaceRepositoriesPanelContent = ({
1652
1595
  {
1653
1596
  style: {
1654
1597
  margin: "0 0 8px 0",
1655
- color: theme2.colors.text,
1656
- fontSize: `${theme2.fontSizes[3]}px`,
1657
- fontWeight: theme2.fontWeights.semibold,
1658
- fontFamily: theme2.fonts.body
1598
+ color: theme.colors.text,
1599
+ fontSize: `${theme.fontSizes[3]}px`,
1600
+ fontWeight: theme.fontWeights.semibold,
1601
+ fontFamily: theme.fonts.body
1659
1602
  },
1660
1603
  children: "No Workspace Selected"
1661
1604
  }
@@ -1665,9 +1608,9 @@ const WorkspaceRepositoriesPanelContent = ({
1665
1608
  {
1666
1609
  style: {
1667
1610
  margin: 0,
1668
- color: theme2.colors.textSecondary,
1669
- fontSize: `${theme2.fontSizes[1]}px`,
1670
- fontFamily: theme2.fonts.body
1611
+ color: theme.colors.textSecondary,
1612
+ fontSize: `${theme.fontSizes[1]}px`,
1613
+ fontFamily: theme.fonts.body
1671
1614
  },
1672
1615
  children: "Select a workspace to see its repositories."
1673
1616
  }
@@ -1706,10 +1649,10 @@ const WorkspaceRepositoriesPanelContent = ({
1706
1649
  {
1707
1650
  style: {
1708
1651
  margin: 0,
1709
- color: theme2.colors.text,
1710
- fontSize: `${theme2.fontSizes[3]}px`,
1711
- fontWeight: theme2.fontWeights.semibold,
1712
- fontFamily: theme2.fonts.body
1652
+ color: theme.colors.text,
1653
+ fontSize: `${theme.fontSizes[3]}px`,
1654
+ fontWeight: theme.fontWeights.semibold,
1655
+ fontFamily: theme.fonts.body
1713
1656
  },
1714
1657
  children: "Loading repositories..."
1715
1658
  }
@@ -1719,9 +1662,6 @@ const WorkspaceRepositoriesPanelContent = ({
1719
1662
  }
1720
1663
  ) });
1721
1664
  }
1722
- const handleToggleEditMode = () => {
1723
- setIsEditMode(!isEditMode);
1724
- };
1725
1665
  return /* @__PURE__ */ jsxs("div", { style: contentContainerStyle, children: [
1726
1666
  /* @__PURE__ */ jsxs("div", { children: [
1727
1667
  /* @__PURE__ */ jsxs(
@@ -1735,99 +1675,66 @@ const WorkspaceRepositoriesPanelContent = ({
1735
1675
  marginBottom: "4px"
1736
1676
  },
1737
1677
  children: [
1738
- /* @__PURE__ */ jsxs(
1739
- "div",
1678
+ /* @__PURE__ */ jsx(
1679
+ "h3",
1740
1680
  {
1741
1681
  style: {
1742
- display: "flex",
1743
- alignItems: "center",
1744
- gap: "8px"
1682
+ margin: 0,
1683
+ fontSize: `${theme.fontSizes[2]}px`,
1684
+ fontWeight: theme.fontWeights.semibold,
1685
+ color: theme.colors.text,
1686
+ fontFamily: theme.fonts.body
1745
1687
  },
1746
- children: [
1747
- /* @__PURE__ */ jsx(
1748
- "h3",
1749
- {
1750
- style: {
1751
- margin: 0,
1752
- fontSize: `${theme2.fontSizes[2]}px`,
1753
- fontWeight: theme2.fontWeights.semibold,
1754
- color: theme2.colors.text,
1755
- fontFamily: theme2.fonts.body
1756
- },
1757
- children: workspace.name
1758
- }
1759
- ),
1760
- /* @__PURE__ */ jsx(
1761
- "button",
1762
- {
1763
- type: "button",
1764
- onClick: handleToggleEditMode,
1765
- title: isEditMode ? "Exit edit mode" : "Edit workspace",
1766
- style: {
1767
- display: "inline-flex",
1768
- alignItems: "center",
1769
- justifyContent: "center",
1770
- width: "24px",
1771
- height: "24px",
1772
- padding: 0,
1773
- borderRadius: "4px",
1774
- border: "none",
1775
- backgroundColor: isEditMode ? theme2.colors.backgroundTertiary || theme2.colors.backgroundSecondary : "transparent",
1776
- color: isEditMode ? theme2.colors.primary : theme2.colors.textSecondary,
1777
- cursor: "pointer",
1778
- transition: "all 0.15s ease"
1779
- },
1780
- onMouseEnter: (event) => {
1781
- if (!isEditMode) {
1782
- event.currentTarget.style.backgroundColor = theme2.colors.backgroundTertiary || theme2.colors.backgroundSecondary;
1783
- event.currentTarget.style.color = theme2.colors.text;
1784
- }
1785
- },
1786
- onMouseLeave: (event) => {
1787
- if (!isEditMode) {
1788
- event.currentTarget.style.backgroundColor = "transparent";
1789
- event.currentTarget.style.color = theme2.colors.textSecondary;
1790
- }
1791
- },
1792
- children: /* @__PURE__ */ jsx(Pencil, { size: 14 })
1793
- }
1794
- )
1795
- ]
1688
+ children: workspace.name
1796
1689
  }
1797
1690
  ),
1798
1691
  workspace.suggestedClonePath && /* @__PURE__ */ jsxs(
1799
- "div",
1692
+ "button",
1800
1693
  {
1694
+ type: "button",
1695
+ onClick: async () => {
1696
+ try {
1697
+ await navigator.clipboard.writeText(workspace.suggestedClonePath);
1698
+ setCopiedPath(true);
1699
+ setTimeout(() => setCopiedPath(false), 2e3);
1700
+ } catch (err) {
1701
+ console.error("Failed to copy path:", err);
1702
+ }
1703
+ },
1704
+ onMouseEnter: () => setIsPathHovered(true),
1705
+ onMouseLeave: () => setIsPathHovered(false),
1706
+ title: copiedPath ? "Copied!" : `Click to copy: ${workspace.suggestedClonePath}`,
1801
1707
  style: {
1802
1708
  display: "flex",
1803
1709
  alignItems: "center",
1804
1710
  gap: "6px",
1805
- minWidth: 0
1711
+ padding: "4px 8px",
1712
+ borderRadius: "4px",
1713
+ border: `1px solid ${copiedPath ? theme.colors.success || "#10b981" : theme.colors.border}`,
1714
+ backgroundColor: copiedPath ? `${theme.colors.success || "#10b981"}15` : theme.colors.backgroundTertiary,
1715
+ color: copiedPath ? theme.colors.success || "#10b981" : theme.colors.textSecondary,
1716
+ cursor: "pointer",
1717
+ transition: "all 0.15s ease",
1718
+ minWidth: 0,
1719
+ maxWidth: isPathHovered || copiedPath ? "200px" : "32px",
1720
+ overflow: "hidden"
1806
1721
  },
1807
1722
  children: [
1808
- /* @__PURE__ */ jsx(
1809
- House,
1810
- {
1811
- size: 14,
1812
- style: {
1813
- color: theme2.colors.textSecondary,
1814
- flexShrink: 0
1815
- }
1816
- }
1817
- ),
1723
+ copiedPath ? /* @__PURE__ */ jsx(Check, { size: 14, style: { flexShrink: 0 } }) : /* @__PURE__ */ jsx(House, { size: 14, style: { flexShrink: 0 } }),
1818
1724
  /* @__PURE__ */ jsx(
1819
1725
  "span",
1820
1726
  {
1821
1727
  style: {
1822
- fontSize: `${theme2.fontSizes[0]}px`,
1823
- color: theme2.colors.textSecondary,
1824
- fontFamily: theme2.fonts.monospace,
1728
+ fontSize: `${theme.fontSizes[0]}px`,
1729
+ fontFamily: theme.fonts.monospace,
1825
1730
  whiteSpace: "nowrap",
1826
1731
  overflow: "hidden",
1827
- textOverflow: "ellipsis"
1732
+ textOverflow: "ellipsis",
1733
+ opacity: isPathHovered || copiedPath ? 1 : 0,
1734
+ width: isPathHovered || copiedPath ? "auto" : 0,
1735
+ transition: "opacity 0.15s ease"
1828
1736
  },
1829
- title: workspace.suggestedClonePath,
1830
- children: workspace.suggestedClonePath
1737
+ children: copiedPath ? "Copied!" : workspace.suggestedClonePath
1831
1738
  }
1832
1739
  )
1833
1740
  ]
@@ -1841,9 +1748,9 @@ const WorkspaceRepositoriesPanelContent = ({
1841
1748
  {
1842
1749
  style: {
1843
1750
  margin: 0,
1844
- fontSize: `${theme2.fontSizes[1]}px`,
1845
- color: theme2.colors.textSecondary,
1846
- fontFamily: theme2.fonts.body
1751
+ fontSize: `${theme.fontSizes[1]}px`,
1752
+ color: theme.colors.textSecondary,
1753
+ fontFamily: theme.fonts.body
1847
1754
  },
1848
1755
  children: workspace.description
1849
1756
  }
@@ -1866,59 +1773,26 @@ const WorkspaceRepositoriesPanelContent = ({
1866
1773
  style: {
1867
1774
  padding: "32px",
1868
1775
  textAlign: "center",
1869
- color: theme2.colors.textSecondary
1776
+ color: theme.colors.textSecondary
1870
1777
  },
1871
1778
  children: /* @__PURE__ */ jsx("p", { style: { margin: 0 }, children: "No repositories in this workspace." })
1872
1779
  }
1873
1780
  ),
1874
1781
  repositoriesInWorkspace.length > 0 && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
1875
- /* @__PURE__ */ jsxs(
1876
- "div",
1782
+ /* @__PURE__ */ jsx(
1783
+ "h4",
1877
1784
  {
1878
1785
  style: {
1879
- display: "flex",
1880
- alignItems: "center",
1881
- gap: "6px",
1882
- paddingBottom: "4px"
1786
+ margin: 0,
1787
+ paddingBottom: "4px",
1788
+ fontSize: `${theme.fontSizes[1]}px`,
1789
+ fontWeight: theme.fontWeights.semibold,
1790
+ color: theme.colors.textSecondary,
1791
+ fontFamily: theme.fonts.body,
1792
+ textTransform: "uppercase",
1793
+ letterSpacing: "0.5px"
1883
1794
  },
1884
- children: [
1885
- /* @__PURE__ */ jsx(
1886
- House,
1887
- {
1888
- size: 14,
1889
- style: {
1890
- color: theme2.colors.success || "#10b981",
1891
- flexShrink: 0
1892
- }
1893
- }
1894
- ),
1895
- /* @__PURE__ */ jsx(
1896
- "h4",
1897
- {
1898
- style: {
1899
- margin: 0,
1900
- fontSize: `${theme2.fontSizes[1]}px`,
1901
- fontWeight: theme2.fontWeights.semibold,
1902
- color: theme2.colors.textSecondary,
1903
- fontFamily: theme2.fonts.body,
1904
- textTransform: "uppercase",
1905
- letterSpacing: "0.5px"
1906
- },
1907
- children: "In Workspace Directory"
1908
- }
1909
- ),
1910
- /* @__PURE__ */ jsx(
1911
- "span",
1912
- {
1913
- style: {
1914
- fontSize: `${theme2.fontSizes[0]}px`,
1915
- color: theme2.colors.textTertiary || theme2.colors.textSecondary,
1916
- fontWeight: theme2.fontWeights.medium
1917
- },
1918
- children: repositoriesInWorkspace.length
1919
- }
1920
- )
1921
- ]
1795
+ children: "In Workspace Directory"
1922
1796
  }
1923
1797
  ),
1924
1798
  /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: repositoriesInWorkspace.map((repository) => /* @__PURE__ */ jsx(
@@ -1926,7 +1800,6 @@ const WorkspaceRepositoriesPanelContent = ({
1926
1800
  {
1927
1801
  entry: repository,
1928
1802
  actionMode: "workspace",
1929
- isEditMode,
1930
1803
  isInWorkspaceDirectory: true,
1931
1804
  workspacePath: workspace.suggestedClonePath,
1932
1805
  onSelect: handleSelectRepository,
@@ -1938,84 +1811,858 @@ const WorkspaceRepositoriesPanelContent = ({
1938
1811
  )) })
1939
1812
  ] }),
1940
1813
  repositoriesOutsideWorkspace.length > 0 && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
1941
- /* @__PURE__ */ jsxs(
1942
- "div",
1814
+ /* @__PURE__ */ jsx(
1815
+ "h4",
1816
+ {
1817
+ style: {
1818
+ margin: 0,
1819
+ paddingBottom: "4px",
1820
+ fontSize: `${theme.fontSizes[1]}px`,
1821
+ fontWeight: theme.fontWeights.semibold,
1822
+ color: theme.colors.textSecondary,
1823
+ fontFamily: theme.fonts.body,
1824
+ textTransform: "uppercase",
1825
+ letterSpacing: "0.5px"
1826
+ },
1827
+ children: "Outside Workspace Directory"
1828
+ }
1829
+ ),
1830
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: repositoriesOutsideWorkspace.map((repository) => /* @__PURE__ */ jsx(
1831
+ LocalProjectCard,
1832
+ {
1833
+ entry: repository,
1834
+ actionMode: "workspace",
1835
+ isInWorkspaceDirectory: false,
1836
+ workspacePath: workspace.suggestedClonePath,
1837
+ onSelect: handleSelectRepository,
1838
+ onOpen: handleOpenRepository,
1839
+ onRemoveFromWorkspace: handleRemoveFromWorkspace,
1840
+ onMoveToWorkspace: handleMoveToWorkspace
1841
+ },
1842
+ repository.path
1843
+ )) })
1844
+ ] })
1845
+ ]
1846
+ }
1847
+ )
1848
+ ] });
1849
+ };
1850
+ const WorkspaceRepositoriesPanel = (props) => {
1851
+ return /* @__PURE__ */ jsx(WorkspaceRepositoriesPanelContent, { ...props });
1852
+ };
1853
+ const WorkspaceCard = ({
1854
+ workspace,
1855
+ isSelected = false,
1856
+ isDefault = false,
1857
+ onClick,
1858
+ onOpen,
1859
+ onDelete,
1860
+ onUpdateName,
1861
+ themeColor
1862
+ }) => {
1863
+ const { theme } = useTheme();
1864
+ const [isHovered, setIsHovered] = useState(false);
1865
+ const [isEditing, setIsEditing] = useState(false);
1866
+ const [editedName, setEditedName] = useState(workspace.name);
1867
+ const [isSaving, setIsSaving] = useState(false);
1868
+ const iconColor = themeColor || theme.colors.primary;
1869
+ const handleStartEdit = (e) => {
1870
+ e.stopPropagation();
1871
+ setIsEditing(true);
1872
+ setEditedName(workspace.name);
1873
+ };
1874
+ const handleSave = async (e) => {
1875
+ if (e) e.stopPropagation();
1876
+ const trimmedName = editedName.trim();
1877
+ if (!trimmedName || trimmedName === workspace.name) {
1878
+ setIsEditing(false);
1879
+ setEditedName(workspace.name);
1880
+ return;
1881
+ }
1882
+ if (!onUpdateName) {
1883
+ setIsEditing(false);
1884
+ return;
1885
+ }
1886
+ try {
1887
+ setIsSaving(true);
1888
+ await onUpdateName(workspace.id, trimmedName);
1889
+ setIsEditing(false);
1890
+ } catch (error) {
1891
+ console.error("Failed to update workspace name:", error);
1892
+ setEditedName(workspace.name);
1893
+ } finally {
1894
+ setIsSaving(false);
1895
+ }
1896
+ };
1897
+ const handleCancel = (e) => {
1898
+ if (e) e.stopPropagation();
1899
+ setIsEditing(false);
1900
+ setEditedName(workspace.name);
1901
+ };
1902
+ const handleKeyDown = (e) => {
1903
+ if (e.key === "Enter") {
1904
+ e.preventDefault();
1905
+ handleSave();
1906
+ } else if (e.key === "Escape") {
1907
+ e.preventDefault();
1908
+ handleCancel();
1909
+ }
1910
+ };
1911
+ const handleClick = () => {
1912
+ if (!isEditing) {
1913
+ onClick == null ? void 0 : onClick(workspace);
1914
+ }
1915
+ };
1916
+ const handleDoubleClick = () => {
1917
+ if (!isEditing) {
1918
+ onOpen == null ? void 0 : onOpen(workspace);
1919
+ }
1920
+ };
1921
+ const handleOpenClick = (e) => {
1922
+ e.stopPropagation();
1923
+ onOpen == null ? void 0 : onOpen(workspace);
1924
+ };
1925
+ const handleDeleteClick = (e) => {
1926
+ e.stopPropagation();
1927
+ onDelete == null ? void 0 : onDelete(workspace);
1928
+ };
1929
+ const cardStyle = {
1930
+ display: "flex",
1931
+ flexDirection: "row",
1932
+ gap: "8px",
1933
+ padding: "12px",
1934
+ borderRadius: "6px",
1935
+ backgroundColor: isSelected ? theme.colors.backgroundTertiary : isHovered ? theme.colors.backgroundTertiary : "transparent",
1936
+ border: `1px solid ${isSelected ? theme.colors.primary || theme.colors.border : isHovered ? theme.colors.border : "transparent"}`,
1937
+ cursor: isEditing ? "default" : "pointer",
1938
+ transition: "all 0.15s ease"
1939
+ };
1940
+ const headerStyle = {
1941
+ display: "flex",
1942
+ alignItems: "center",
1943
+ gap: "8px",
1944
+ color: theme.colors.text,
1945
+ fontSize: `${theme.fontSizes[2]}px`,
1946
+ fontWeight: theme.fontWeights.semibold,
1947
+ fontFamily: theme.fonts.body
1948
+ };
1949
+ const actionButtonStyle = {
1950
+ display: "flex",
1951
+ alignItems: "center",
1952
+ justifyContent: "center",
1953
+ width: "24px",
1954
+ height: "24px",
1955
+ padding: 0,
1956
+ border: "none",
1957
+ borderRadius: "4px",
1958
+ backgroundColor: "transparent",
1959
+ color: theme.colors.textSecondary,
1960
+ cursor: "pointer",
1961
+ opacity: isHovered ? 1 : 0,
1962
+ pointerEvents: isHovered ? "auto" : "none",
1963
+ transition: "all 0.15s ease"
1964
+ };
1965
+ return /* @__PURE__ */ jsxs(
1966
+ "div",
1967
+ {
1968
+ style: cardStyle,
1969
+ onClick: handleClick,
1970
+ onDoubleClick: handleDoubleClick,
1971
+ onMouseEnter: () => setIsHovered(true),
1972
+ onMouseLeave: () => setIsHovered(false),
1973
+ children: [
1974
+ /* @__PURE__ */ jsx(
1975
+ "div",
1976
+ {
1977
+ style: {
1978
+ display: "flex",
1979
+ alignItems: "center",
1980
+ justifyContent: "center",
1981
+ width: "40px",
1982
+ height: "40px",
1983
+ borderRadius: "6px",
1984
+ backgroundColor: `color-mix(in srgb, ${iconColor} 12%, transparent)`,
1985
+ color: iconColor,
1986
+ flexShrink: 0,
1987
+ marginTop: "2px"
1988
+ },
1989
+ children: workspace.icon ? /* @__PURE__ */ jsx("span", { style: { fontSize: `${theme.fontSizes[3]}px` }, children: workspace.icon }) : /* @__PURE__ */ jsx(DoorClosed, { size: 24 })
1990
+ }
1991
+ ),
1992
+ /* @__PURE__ */ jsxs(
1993
+ "div",
1994
+ {
1995
+ style: {
1996
+ flex: 1,
1997
+ display: "flex",
1998
+ flexDirection: "column",
1999
+ gap: "4px",
2000
+ minWidth: 0
2001
+ },
2002
+ children: [
2003
+ /* @__PURE__ */ jsx("div", { style: headerStyle, children: isEditing ? /* @__PURE__ */ jsxs(Fragment, { children: [
2004
+ /* @__PURE__ */ jsx(
2005
+ "input",
2006
+ {
2007
+ type: "text",
2008
+ value: editedName,
2009
+ onChange: (e) => setEditedName(e.target.value),
2010
+ onKeyDown: handleKeyDown,
2011
+ onClick: (e) => e.stopPropagation(),
2012
+ autoFocus: true,
2013
+ disabled: isSaving,
2014
+ style: {
2015
+ flex: 1,
2016
+ padding: "4px 8px",
2017
+ borderRadius: "4px",
2018
+ border: `1px solid ${theme.colors.border}`,
2019
+ backgroundColor: theme.colors.background,
2020
+ color: theme.colors.text,
2021
+ fontSize: `${theme.fontSizes[2]}px`,
2022
+ fontWeight: theme.fontWeights.semibold,
2023
+ fontFamily: theme.fonts.body,
2024
+ outline: "none"
2025
+ }
2026
+ }
2027
+ ),
2028
+ /* @__PURE__ */ jsx(
2029
+ "button",
2030
+ {
2031
+ onClick: handleSave,
2032
+ disabled: isSaving,
2033
+ title: "Save (Enter)",
2034
+ style: {
2035
+ display: "flex",
2036
+ alignItems: "center",
2037
+ justifyContent: "center",
2038
+ width: "24px",
2039
+ height: "24px",
2040
+ padding: 0,
2041
+ border: "none",
2042
+ borderRadius: "4px",
2043
+ backgroundColor: theme.colors.success,
2044
+ color: theme.colors.background,
2045
+ cursor: isSaving ? "not-allowed" : "pointer",
2046
+ opacity: isSaving ? 0.6 : 1,
2047
+ transition: "opacity 0.15s ease"
2048
+ },
2049
+ children: /* @__PURE__ */ jsx(Check, { size: 16 })
2050
+ }
2051
+ ),
2052
+ /* @__PURE__ */ jsx(
2053
+ "button",
2054
+ {
2055
+ onClick: handleCancel,
2056
+ disabled: isSaving,
2057
+ title: "Cancel (Esc)",
2058
+ style: {
2059
+ display: "flex",
2060
+ alignItems: "center",
2061
+ justifyContent: "center",
2062
+ width: "24px",
2063
+ height: "24px",
2064
+ padding: 0,
2065
+ border: "none",
2066
+ borderRadius: "4px",
2067
+ backgroundColor: theme.colors.backgroundTertiary,
2068
+ color: theme.colors.text,
2069
+ cursor: isSaving ? "not-allowed" : "pointer",
2070
+ opacity: isSaving ? 0.6 : 1,
2071
+ transition: "opacity 0.15s ease"
2072
+ },
2073
+ children: /* @__PURE__ */ jsx(X, { size: 16 })
2074
+ }
2075
+ )
2076
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2077
+ /* @__PURE__ */ jsx(
2078
+ "span",
2079
+ {
2080
+ style: {
2081
+ flex: 1,
2082
+ whiteSpace: "nowrap",
2083
+ overflow: "hidden",
2084
+ textOverflow: "ellipsis"
2085
+ },
2086
+ children: workspace.name
2087
+ }
2088
+ ),
2089
+ onOpen && /* @__PURE__ */ jsx(
2090
+ "button",
2091
+ {
2092
+ onClick: handleOpenClick,
2093
+ title: "Open workspace",
2094
+ style: actionButtonStyle,
2095
+ onMouseEnter: (e) => {
2096
+ e.currentTarget.style.backgroundColor = theme.colors.backgroundTertiary;
2097
+ e.currentTarget.style.color = theme.colors.text;
2098
+ },
2099
+ onMouseLeave: (e) => {
2100
+ e.currentTarget.style.backgroundColor = "transparent";
2101
+ e.currentTarget.style.color = theme.colors.textSecondary;
2102
+ },
2103
+ children: /* @__PURE__ */ jsx(ExternalLink, { size: 16 })
2104
+ }
2105
+ ),
2106
+ onUpdateName && /* @__PURE__ */ jsx(
2107
+ "button",
2108
+ {
2109
+ onClick: handleStartEdit,
2110
+ title: "Edit workspace name",
2111
+ style: actionButtonStyle,
2112
+ onMouseEnter: (e) => {
2113
+ e.currentTarget.style.backgroundColor = theme.colors.backgroundTertiary;
2114
+ e.currentTarget.style.color = theme.colors.text;
2115
+ },
2116
+ onMouseLeave: (e) => {
2117
+ e.currentTarget.style.backgroundColor = "transparent";
2118
+ e.currentTarget.style.color = theme.colors.textSecondary;
2119
+ },
2120
+ children: /* @__PURE__ */ jsx(Pen, { size: 16 })
2121
+ }
2122
+ ),
2123
+ onDelete && /* @__PURE__ */ jsx(
2124
+ "button",
2125
+ {
2126
+ onClick: handleDeleteClick,
2127
+ title: "Delete workspace",
2128
+ style: actionButtonStyle,
2129
+ onMouseEnter: (e) => {
2130
+ e.currentTarget.style.backgroundColor = `${theme.colors.error}15`;
2131
+ e.currentTarget.style.color = theme.colors.error;
2132
+ },
2133
+ onMouseLeave: (e) => {
2134
+ e.currentTarget.style.backgroundColor = "transparent";
2135
+ e.currentTarget.style.color = theme.colors.textSecondary;
2136
+ },
2137
+ children: /* @__PURE__ */ jsx(Trash2, { size: 16 })
2138
+ }
2139
+ ),
2140
+ isDefault && /* @__PURE__ */ jsx(
2141
+ "span",
2142
+ {
2143
+ style: {
2144
+ fontSize: `${theme.fontSizes[1]}px`,
2145
+ color: theme.colors.textSecondary,
2146
+ fontWeight: 400,
2147
+ flexShrink: 0
2148
+ },
2149
+ children: "Default"
2150
+ }
2151
+ )
2152
+ ] }) }),
2153
+ workspace.description && !isEditing && /* @__PURE__ */ jsx(
2154
+ "div",
2155
+ {
2156
+ style: {
2157
+ fontSize: `${theme.fontSizes[1]}px`,
2158
+ color: theme.colors.textSecondary,
2159
+ fontFamily: theme.fonts.body,
2160
+ lineHeight: 1.4,
2161
+ whiteSpace: "nowrap",
2162
+ overflow: "hidden",
2163
+ textOverflow: "ellipsis"
2164
+ },
2165
+ title: workspace.description,
2166
+ children: workspace.description
2167
+ }
2168
+ )
2169
+ ]
2170
+ }
2171
+ )
2172
+ ]
2173
+ }
2174
+ );
2175
+ };
2176
+ const PANEL_ID$4 = "industry-theme.workspaces-list";
2177
+ const createPanelEvent = (type, payload) => ({
2178
+ type,
2179
+ source: PANEL_ID$4,
2180
+ timestamp: Date.now(),
2181
+ payload
2182
+ });
2183
+ const WorkspacesListPanelContent = ({
2184
+ context,
2185
+ actions,
2186
+ events
2187
+ }) => {
2188
+ var _a, _b;
2189
+ const { theme } = useTheme();
2190
+ const [searchQuery, setSearchQuery] = useState("");
2191
+ const [showSearchBox, setShowSearchBox] = useState(false);
2192
+ const [selectedWorkspaceId, setSelectedWorkspaceId] = useState(null);
2193
+ const [workspaceRepositories, setWorkspaceRepositories] = useState(
2194
+ /* @__PURE__ */ new Map()
2195
+ );
2196
+ const [isCreating, setIsCreating] = useState(false);
2197
+ const panelActions = actions;
2198
+ const workspacesSlice = context.getSlice("workspaces");
2199
+ const workspaces = useMemo(
2200
+ () => {
2201
+ var _a2;
2202
+ return ((_a2 = workspacesSlice == null ? void 0 : workspacesSlice.data) == null ? void 0 : _a2.workspaces) || [];
2203
+ },
2204
+ [(_a = workspacesSlice == null ? void 0 : workspacesSlice.data) == null ? void 0 : _a.workspaces]
2205
+ );
2206
+ const defaultWorkspaceId = ((_b = workspacesSlice == null ? void 0 : workspacesSlice.data) == null ? void 0 : _b.defaultWorkspaceId) ?? null;
2207
+ const loading = (workspacesSlice == null ? void 0 : workspacesSlice.loading) ?? false;
2208
+ useEffect(() => {
2209
+ const loadRepositories = async () => {
2210
+ if (!panelActions.getWorkspaceRepositories || workspaces.length === 0) {
2211
+ return;
2212
+ }
2213
+ const repoMap = /* @__PURE__ */ new Map();
2214
+ await Promise.all(
2215
+ workspaces.map(async (workspace) => {
2216
+ try {
2217
+ const repos = await panelActions.getWorkspaceRepositories(workspace.id);
2218
+ repoMap.set(workspace.id, repos.map((r) => r.name));
2219
+ } catch (error) {
2220
+ console.error(`Failed to load repos for workspace ${workspace.id}:`, error);
2221
+ repoMap.set(workspace.id, []);
2222
+ }
2223
+ })
2224
+ );
2225
+ setWorkspaceRepositories(repoMap);
2226
+ };
2227
+ loadRepositories();
2228
+ }, [workspaces, panelActions]);
2229
+ const sortedWorkspaces = useMemo(() => {
2230
+ let filtered = workspaces;
2231
+ if (searchQuery.trim()) {
2232
+ const query = searchQuery.toLowerCase().trim();
2233
+ filtered = workspaces.filter((workspace) => {
2234
+ var _a2;
2235
+ if (workspace.name.toLowerCase().includes(query)) {
2236
+ return true;
2237
+ }
2238
+ if ((_a2 = workspace.description) == null ? void 0 : _a2.toLowerCase().includes(query)) {
2239
+ return true;
2240
+ }
2241
+ const repos = workspaceRepositories.get(workspace.id) || [];
2242
+ return repos.some((repoName) => repoName.toLowerCase().includes(query));
2243
+ });
2244
+ }
2245
+ return [...filtered].sort((a, b) => {
2246
+ if (a.id === defaultWorkspaceId) return -1;
2247
+ if (b.id === defaultWorkspaceId) return 1;
2248
+ return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
2249
+ });
2250
+ }, [workspaces, defaultWorkspaceId, searchQuery, workspaceRepositories]);
2251
+ const handleWorkspaceSelect = useCallback(
2252
+ (workspace) => {
2253
+ setSelectedWorkspaceId(workspace.id);
2254
+ events.emit(
2255
+ createPanelEvent(`${PANEL_ID$4}:workspace:selected`, {
2256
+ workspaceId: workspace.id,
2257
+ workspace
2258
+ })
2259
+ );
2260
+ },
2261
+ [events]
2262
+ );
2263
+ const handleOpenWorkspace = useCallback(
2264
+ async (workspace) => {
2265
+ if (!panelActions.openWorkspace) {
2266
+ console.warn("Open workspace action not available");
2267
+ return;
2268
+ }
2269
+ try {
2270
+ await panelActions.openWorkspace(workspace.id);
2271
+ events.emit(
2272
+ createPanelEvent(`${PANEL_ID$4}:workspace:opened`, {
2273
+ workspaceId: workspace.id,
2274
+ workspace
2275
+ })
2276
+ );
2277
+ } catch (error) {
2278
+ console.error("Failed to open workspace:", error);
2279
+ }
2280
+ },
2281
+ [panelActions, events]
2282
+ );
2283
+ const handleDeleteWorkspace = useCallback(
2284
+ async (workspace) => {
2285
+ if (!panelActions.deleteWorkspace) {
2286
+ console.warn("Delete workspace action not available");
2287
+ return;
2288
+ }
2289
+ const confirmed = window.confirm(
2290
+ `Are you sure you want to delete "${workspace.name}"? This action cannot be undone.`
2291
+ );
2292
+ if (!confirmed) return;
2293
+ try {
2294
+ await panelActions.deleteWorkspace(workspace.id);
2295
+ events.emit(
2296
+ createPanelEvent(`${PANEL_ID$4}:workspace:deleted`, {
2297
+ workspaceId: workspace.id
2298
+ })
2299
+ );
2300
+ await context.refresh("workspace", "workspaces");
2301
+ } catch (error) {
2302
+ console.error("Failed to delete workspace:", error);
2303
+ }
2304
+ },
2305
+ [panelActions, events, context]
2306
+ );
2307
+ const handleUpdateWorkspaceName = useCallback(
2308
+ async (workspaceId, newName) => {
2309
+ if (!panelActions.updateWorkspace) {
2310
+ console.warn("Update workspace action not available");
2311
+ return;
2312
+ }
2313
+ await panelActions.updateWorkspace(workspaceId, { name: newName });
2314
+ await context.refresh("workspace", "workspaces");
2315
+ },
2316
+ [panelActions, context]
2317
+ );
2318
+ const handleCreateWorkspace = useCallback(async () => {
2319
+ if (!panelActions.createWorkspace) {
2320
+ console.warn("Create workspace action not available");
2321
+ return;
2322
+ }
2323
+ const name = window.prompt("Enter workspace name:");
2324
+ if (!(name == null ? void 0 : name.trim())) return;
2325
+ try {
2326
+ setIsCreating(true);
2327
+ const workspace = await panelActions.createWorkspace(name.trim());
2328
+ events.emit(
2329
+ createPanelEvent(`${PANEL_ID$4}:workspace:created`, {
2330
+ workspaceId: workspace.id,
2331
+ workspace
2332
+ })
2333
+ );
2334
+ await context.refresh("workspace", "workspaces");
2335
+ } catch (error) {
2336
+ console.error("Failed to create workspace:", error);
2337
+ } finally {
2338
+ setIsCreating(false);
2339
+ }
2340
+ }, [panelActions, events, context]);
2341
+ useEffect(() => {
2342
+ const unsubscribers = [
2343
+ // Select workspace event from tools
2344
+ events.on(`${PANEL_ID$4}:select-workspace`, (event) => {
2345
+ var _a2;
2346
+ const workspaceId = (_a2 = event.payload) == null ? void 0 : _a2.workspaceId;
2347
+ if (workspaceId) {
2348
+ const workspace = workspaces.find((w) => w.id === workspaceId);
2349
+ if (workspace) {
2350
+ handleWorkspaceSelect(workspace);
2351
+ }
2352
+ }
2353
+ }),
2354
+ // Open workspace event from tools
2355
+ events.on(`${PANEL_ID$4}:open-workspace`, (event) => {
2356
+ var _a2;
2357
+ const workspaceId = (_a2 = event.payload) == null ? void 0 : _a2.workspaceId;
2358
+ if (workspaceId) {
2359
+ const workspace = workspaces.find((w) => w.id === workspaceId);
2360
+ if (workspace) {
2361
+ handleOpenWorkspace(workspace);
2362
+ }
2363
+ }
2364
+ }),
2365
+ // Create workspace event from tools
2366
+ events.on(
2367
+ `${PANEL_ID$4}:create-workspace`,
2368
+ async (event) => {
2369
+ const { name, description } = event.payload || {};
2370
+ if (name && panelActions.createWorkspace) {
2371
+ try {
2372
+ const workspace = await panelActions.createWorkspace(name, { description });
2373
+ events.emit(
2374
+ createPanelEvent(`${PANEL_ID$4}:workspace:created`, {
2375
+ workspaceId: workspace.id,
2376
+ workspace
2377
+ })
2378
+ );
2379
+ await context.refresh("workspace", "workspaces");
2380
+ } catch (error) {
2381
+ console.error("Failed to create workspace:", error);
2382
+ }
2383
+ }
2384
+ }
2385
+ )
2386
+ ];
2387
+ return () => unsubscribers.forEach((unsub) => unsub());
2388
+ }, [events, workspaces, handleWorkspaceSelect, handleOpenWorkspace, panelActions, context]);
2389
+ const baseContainerStyle = {
2390
+ display: "flex",
2391
+ flexDirection: "column",
2392
+ height: "100%",
2393
+ backgroundColor: theme.colors.backgroundSecondary
2394
+ };
2395
+ const contentContainerStyle = {
2396
+ ...baseContainerStyle,
2397
+ padding: "16px",
2398
+ gap: "12px"
2399
+ };
2400
+ if (loading) {
2401
+ return /* @__PURE__ */ jsx("div", { style: baseContainerStyle, children: /* @__PURE__ */ jsx(
2402
+ "div",
2403
+ {
2404
+ style: {
2405
+ flex: 1,
2406
+ display: "flex",
2407
+ alignItems: "center",
2408
+ justifyContent: "center",
2409
+ padding: "32px",
2410
+ textAlign: "center"
2411
+ },
2412
+ children: /* @__PURE__ */ jsx(
2413
+ "div",
2414
+ {
2415
+ style: {
2416
+ display: "flex",
2417
+ flexDirection: "column",
2418
+ alignItems: "center",
2419
+ gap: "16px",
2420
+ maxWidth: "360px"
2421
+ },
2422
+ children: /* @__PURE__ */ jsx(
2423
+ "h3",
2424
+ {
2425
+ style: {
2426
+ margin: 0,
2427
+ color: theme.colors.text,
2428
+ fontSize: `${theme.fontSizes[3]}px`,
2429
+ fontWeight: theme.fontWeights.semibold,
2430
+ fontFamily: theme.fonts.body
2431
+ },
2432
+ children: "Loading workspaces..."
2433
+ }
2434
+ )
2435
+ }
2436
+ )
2437
+ }
2438
+ ) });
2439
+ }
2440
+ return /* @__PURE__ */ jsxs("div", { style: contentContainerStyle, children: [
2441
+ /* @__PURE__ */ jsxs(
2442
+ "div",
2443
+ {
2444
+ style: {
2445
+ display: "flex",
2446
+ alignItems: "center",
2447
+ justifyContent: "space-between",
2448
+ gap: "8px"
2449
+ },
2450
+ children: [
2451
+ /* @__PURE__ */ jsx(
2452
+ "h3",
2453
+ {
2454
+ style: {
2455
+ margin: 0,
2456
+ fontSize: `${theme.fontSizes[2]}px`,
2457
+ fontWeight: theme.fontWeights.semibold,
2458
+ color: theme.colors.text,
2459
+ fontFamily: theme.fonts.body
2460
+ },
2461
+ children: "Workspaces"
2462
+ }
2463
+ ),
2464
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
2465
+ /* @__PURE__ */ jsx(
2466
+ "button",
1943
2467
  {
2468
+ onClick: () => {
2469
+ setShowSearchBox(!showSearchBox);
2470
+ if (showSearchBox) {
2471
+ setSearchQuery("");
2472
+ }
2473
+ },
1944
2474
  style: {
1945
2475
  display: "flex",
1946
2476
  alignItems: "center",
1947
- gap: "6px",
1948
- paddingBottom: "4px"
2477
+ justifyContent: "center",
2478
+ width: "28px",
2479
+ height: "28px",
2480
+ borderRadius: "6px",
2481
+ border: `1px solid ${theme.colors.border}`,
2482
+ backgroundColor: showSearchBox ? theme.colors.primary : theme.colors.backgroundTertiary,
2483
+ color: showSearchBox ? theme.colors.background : theme.colors.text,
2484
+ cursor: "pointer",
2485
+ transition: "all 0.15s ease"
1949
2486
  },
1950
- children: [
1951
- /* @__PURE__ */ jsx(
1952
- TriangleAlert,
1953
- {
1954
- size: 14,
1955
- style: {
1956
- color: theme2.colors.warning || "#f59e0b",
1957
- flexShrink: 0
1958
- }
1959
- }
1960
- ),
1961
- /* @__PURE__ */ jsx(
1962
- "h4",
1963
- {
1964
- style: {
1965
- margin: 0,
1966
- fontSize: `${theme2.fontSizes[1]}px`,
1967
- fontWeight: theme2.fontWeights.semibold,
1968
- color: theme2.colors.textSecondary,
1969
- fontFamily: theme2.fonts.body,
1970
- textTransform: "uppercase",
1971
- letterSpacing: "0.5px"
1972
- },
1973
- children: "Outside Workspace Directory"
1974
- }
1975
- ),
1976
- /* @__PURE__ */ jsx(
1977
- "span",
1978
- {
1979
- style: {
1980
- fontSize: `${theme2.fontSizes[0]}px`,
1981
- color: theme2.colors.textTertiary || theme2.colors.textSecondary,
1982
- fontWeight: theme2.fontWeights.medium
1983
- },
1984
- children: repositoriesOutsideWorkspace.length
1985
- }
1986
- )
1987
- ]
2487
+ title: "Search workspaces",
2488
+ children: /* @__PURE__ */ jsx(Search, { size: 16 })
1988
2489
  }
1989
2490
  ),
1990
- /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: repositoriesOutsideWorkspace.map((repository) => /* @__PURE__ */ jsx(
1991
- LocalProjectCard,
2491
+ panelActions.createWorkspace && /* @__PURE__ */ jsx(
2492
+ "button",
1992
2493
  {
1993
- entry: repository,
1994
- actionMode: "workspace",
1995
- isEditMode,
1996
- isInWorkspaceDirectory: false,
1997
- workspacePath: workspace.suggestedClonePath,
1998
- onSelect: handleSelectRepository,
1999
- onOpen: handleOpenRepository,
2000
- onRemoveFromWorkspace: handleRemoveFromWorkspace,
2001
- onMoveToWorkspace: handleMoveToWorkspace
2002
- },
2003
- repository.path
2004
- )) })
2494
+ onClick: handleCreateWorkspace,
2495
+ disabled: isCreating,
2496
+ style: {
2497
+ display: "flex",
2498
+ alignItems: "center",
2499
+ justifyContent: "center",
2500
+ width: "28px",
2501
+ height: "28px",
2502
+ borderRadius: "6px",
2503
+ border: `1px solid ${theme.colors.border}`,
2504
+ backgroundColor: theme.colors.primary,
2505
+ color: theme.colors.background,
2506
+ cursor: isCreating ? "not-allowed" : "pointer",
2507
+ opacity: isCreating ? 0.6 : 1,
2508
+ transition: "all 0.15s ease"
2509
+ },
2510
+ title: "Create new workspace",
2511
+ children: /* @__PURE__ */ jsx(Plus, { size: 16 })
2512
+ }
2513
+ )
2005
2514
  ] })
2006
2515
  ]
2007
2516
  }
2517
+ ),
2518
+ showSearchBox && /* @__PURE__ */ jsxs(
2519
+ "div",
2520
+ {
2521
+ style: {
2522
+ display: "flex",
2523
+ alignItems: "center",
2524
+ gap: "8px"
2525
+ },
2526
+ children: [
2527
+ /* @__PURE__ */ jsx(
2528
+ "input",
2529
+ {
2530
+ type: "text",
2531
+ value: searchQuery,
2532
+ onChange: (e) => setSearchQuery(e.target.value),
2533
+ placeholder: "Search by workspace or repository name...",
2534
+ autoFocus: true,
2535
+ style: {
2536
+ flex: 1,
2537
+ padding: "8px 12px",
2538
+ borderRadius: "6px",
2539
+ border: `1px solid ${theme.colors.border}`,
2540
+ backgroundColor: theme.colors.background,
2541
+ color: theme.colors.text,
2542
+ fontSize: `${theme.fontSizes[1]}px`,
2543
+ fontFamily: theme.fonts.body,
2544
+ outline: "none"
2545
+ }
2546
+ }
2547
+ ),
2548
+ searchQuery && /* @__PURE__ */ jsx(
2549
+ "button",
2550
+ {
2551
+ onClick: () => setSearchQuery(""),
2552
+ style: {
2553
+ display: "flex",
2554
+ alignItems: "center",
2555
+ justifyContent: "center",
2556
+ width: "28px",
2557
+ height: "28px",
2558
+ borderRadius: "6px",
2559
+ border: `1px solid ${theme.colors.border}`,
2560
+ backgroundColor: theme.colors.backgroundTertiary,
2561
+ color: theme.colors.text,
2562
+ cursor: "pointer",
2563
+ transition: "all 0.15s ease"
2564
+ },
2565
+ title: "Clear search",
2566
+ children: /* @__PURE__ */ jsx(X, { size: 16 })
2567
+ }
2568
+ )
2569
+ ]
2570
+ }
2571
+ ),
2572
+ /* @__PURE__ */ jsxs(
2573
+ "div",
2574
+ {
2575
+ style: {
2576
+ flex: 1,
2577
+ overflowY: "auto",
2578
+ display: "flex",
2579
+ flexDirection: "column",
2580
+ gap: "4px"
2581
+ },
2582
+ children: [
2583
+ sortedWorkspaces.map((workspace) => /* @__PURE__ */ jsx(
2584
+ WorkspaceCard,
2585
+ {
2586
+ workspace,
2587
+ isSelected: workspace.id === selectedWorkspaceId,
2588
+ isDefault: workspace.id === defaultWorkspaceId,
2589
+ onClick: handleWorkspaceSelect,
2590
+ onOpen: panelActions.openWorkspace ? handleOpenWorkspace : void 0,
2591
+ onDelete: panelActions.deleteWorkspace ? handleDeleteWorkspace : void 0,
2592
+ onUpdateName: panelActions.updateWorkspace ? handleUpdateWorkspaceName : void 0
2593
+ },
2594
+ workspace.id
2595
+ )),
2596
+ sortedWorkspaces.length === 0 && !loading && /* @__PURE__ */ jsx(
2597
+ "div",
2598
+ {
2599
+ style: {
2600
+ padding: "32px",
2601
+ textAlign: "center",
2602
+ color: theme.colors.textSecondary
2603
+ },
2604
+ children: /* @__PURE__ */ jsx("p", { style: { margin: 0 }, children: searchQuery.trim() ? `No workspaces found matching "${searchQuery}"` : "No workspaces found." })
2605
+ }
2606
+ )
2607
+ ]
2608
+ }
2008
2609
  )
2009
2610
  ] });
2010
2611
  };
2011
- const WorkspaceRepositoriesPanel = (props) => {
2012
- return /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(WorkspaceRepositoriesPanelContent, { ...props }) });
2612
+ const WorkspacesListPanel = (props) => {
2613
+ return /* @__PURE__ */ jsx(WorkspacesListPanelContent, { ...props });
2614
+ };
2615
+ const WorkspacesListPanelPreview = () => {
2616
+ const { theme } = useTheme();
2617
+ return /* @__PURE__ */ jsxs(
2618
+ "div",
2619
+ {
2620
+ style: {
2621
+ padding: "12px",
2622
+ fontSize: `${theme.fontSizes[0]}px`,
2623
+ fontFamily: theme.fonts.body,
2624
+ color: theme.colors.text,
2625
+ display: "flex",
2626
+ flexDirection: "column",
2627
+ gap: "8px"
2628
+ },
2629
+ children: [
2630
+ /* @__PURE__ */ jsxs(
2631
+ "div",
2632
+ {
2633
+ style: {
2634
+ display: "flex",
2635
+ alignItems: "center",
2636
+ gap: "6px",
2637
+ fontWeight: theme.fontWeights.semibold
2638
+ },
2639
+ children: [
2640
+ /* @__PURE__ */ jsx(Layers, { size: 16, style: { color: theme.colors.primary } }),
2641
+ /* @__PURE__ */ jsx("span", { children: "Workspaces" })
2642
+ ]
2643
+ }
2644
+ ),
2645
+ /* @__PURE__ */ jsx(
2646
+ "div",
2647
+ {
2648
+ style: {
2649
+ fontSize: `${theme.fontSizes[0]}px`,
2650
+ fontFamily: theme.fonts.body,
2651
+ color: theme.colors.textSecondary,
2652
+ marginTop: "4px"
2653
+ },
2654
+ children: "Browse and manage your workspaces"
2655
+ }
2656
+ )
2657
+ ]
2658
+ }
2659
+ );
2013
2660
  };
2014
2661
  const DependencyInfoModal = ({
2015
2662
  isOpen,
2016
2663
  onClose
2017
2664
  }) => {
2018
- const { theme: theme2 } = useTheme();
2665
+ const { theme } = useTheme();
2019
2666
  if (!isOpen) return null;
2020
2667
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
2021
2668
  "div",
@@ -2026,8 +2673,8 @@ const DependencyInfoModal = ({
2026
2673
  left: 0,
2027
2674
  right: 0,
2028
2675
  bottom: 0,
2029
- backgroundColor: theme2.colors.muted,
2030
- zIndex: theme2.zIndices[4],
2676
+ backgroundColor: theme.colors.muted,
2677
+ zIndex: theme.zIndices[4],
2031
2678
  display: "flex",
2032
2679
  alignItems: "center",
2033
2680
  justifyContent: "center"
@@ -2037,15 +2684,15 @@ const DependencyInfoModal = ({
2037
2684
  "div",
2038
2685
  {
2039
2686
  style: {
2040
- backgroundColor: theme2.colors.background,
2041
- borderRadius: `${theme2.radii[3]}px`,
2687
+ backgroundColor: theme.colors.background,
2688
+ borderRadius: `${theme.radii[3]}px`,
2042
2689
  maxWidth: "600px",
2043
2690
  maxHeight: "80vh",
2044
2691
  width: "90%",
2045
2692
  overflow: "hidden",
2046
2693
  display: "flex",
2047
2694
  flexDirection: "column",
2048
- boxShadow: theme2.shadows[3]
2695
+ boxShadow: theme.shadows[3]
2049
2696
  },
2050
2697
  onClick: (e) => e.stopPropagation(),
2051
2698
  children: [
@@ -2053,8 +2700,8 @@ const DependencyInfoModal = ({
2053
2700
  "div",
2054
2701
  {
2055
2702
  style: {
2056
- padding: `${theme2.space[4]}px`,
2057
- borderBottom: `1px solid ${theme2.colors.border}`,
2703
+ padding: `${theme.space[4]}px`,
2704
+ borderBottom: `1px solid ${theme.colors.border}`,
2058
2705
  display: "flex",
2059
2706
  alignItems: "center",
2060
2707
  justifyContent: "space-between"
@@ -2064,12 +2711,12 @@ const DependencyInfoModal = ({
2064
2711
  "h2",
2065
2712
  {
2066
2713
  style: {
2067
- fontSize: `${theme2.fontSizes[4]}px`,
2068
- fontWeight: theme2.fontWeights.semibold,
2069
- color: theme2.colors.text,
2714
+ fontSize: `${theme.fontSizes[4]}px`,
2715
+ fontWeight: theme.fontWeights.semibold,
2716
+ color: theme.colors.text,
2070
2717
  display: "flex",
2071
2718
  alignItems: "center",
2072
- gap: `${theme2.space[2]}px`,
2719
+ gap: `${theme.space[2]}px`,
2073
2720
  margin: 0
2074
2721
  },
2075
2722
  children: [
@@ -2085,9 +2732,9 @@ const DependencyInfoModal = ({
2085
2732
  style: {
2086
2733
  background: "none",
2087
2734
  border: "none",
2088
- color: theme2.colors.textSecondary,
2735
+ color: theme.colors.textSecondary,
2089
2736
  cursor: "pointer",
2090
- padding: `${theme2.space[1]}px`
2737
+ padding: `${theme.space[1]}px`
2091
2738
  },
2092
2739
  children: /* @__PURE__ */ jsx(X, { size: 20 })
2093
2740
  }
@@ -2099,7 +2746,7 @@ const DependencyInfoModal = ({
2099
2746
  "div",
2100
2747
  {
2101
2748
  style: {
2102
- padding: `${theme2.space[4]}px`,
2749
+ padding: `${theme.space[4]}px`,
2103
2750
  overflow: "auto",
2104
2751
  flex: 1
2105
2752
  },
@@ -2109,33 +2756,33 @@ const DependencyInfoModal = ({
2109
2756
  {
2110
2757
  icon: /* @__PURE__ */ jsx(Package, { size: 18 }),
2111
2758
  title: "Dependency Types",
2112
- theme: theme2,
2759
+ theme,
2113
2760
  children: [
2114
2761
  /* @__PURE__ */ jsx(
2115
2762
  InfoItem,
2116
2763
  {
2117
- badge: { text: "prod", color: theme2.colors.primary },
2764
+ badge: { text: "prod", color: theme.colors.primary },
2118
2765
  title: "Production Dependencies",
2119
2766
  description: "Required for your application to run in production. These are bundled with your app and affect its size and security.",
2120
- theme: theme2
2767
+ theme
2121
2768
  }
2122
2769
  ),
2123
2770
  /* @__PURE__ */ jsx(
2124
2771
  InfoItem,
2125
2772
  {
2126
- badge: { text: "dev", color: theme2.colors.secondary },
2773
+ badge: { text: "dev", color: theme.colors.secondary },
2127
2774
  title: "Development Dependencies",
2128
2775
  description: "Only needed during development (build tools, testing, linters). Not included in production builds.",
2129
- theme: theme2
2776
+ theme
2130
2777
  }
2131
2778
  ),
2132
2779
  /* @__PURE__ */ jsx(
2133
2780
  InfoItem,
2134
2781
  {
2135
- badge: { text: "peer", color: theme2.colors.accent },
2782
+ badge: { text: "peer", color: theme.colors.accent },
2136
2783
  title: "Peer Dependencies",
2137
2784
  description: "Expected to be provided by the consumer of your package. Important for library authors to specify compatibility.",
2138
- theme: theme2
2785
+ theme
2139
2786
  }
2140
2787
  )
2141
2788
  ]
@@ -2146,24 +2793,24 @@ const DependencyInfoModal = ({
2146
2793
  {
2147
2794
  icon: /* @__PURE__ */ jsx(Scale, { size: 18 }),
2148
2795
  title: "Common Licenses",
2149
- theme: theme2,
2796
+ theme,
2150
2797
  children: [
2151
2798
  /* @__PURE__ */ jsx(
2152
2799
  InfoItem,
2153
2800
  {
2154
- badge: { text: "MIT", color: theme2.colors.success },
2801
+ badge: { text: "MIT", color: theme.colors.success },
2155
2802
  title: "Permissive Licenses (MIT, Apache, BSD)",
2156
2803
  description: "Few restrictions. Can use in commercial projects. Must include copyright notice.",
2157
- theme: theme2
2804
+ theme
2158
2805
  }
2159
2806
  ),
2160
2807
  /* @__PURE__ */ jsx(
2161
2808
  InfoItem,
2162
2809
  {
2163
- badge: { text: "GPL", color: theme2.colors.warning },
2810
+ badge: { text: "GPL", color: theme.colors.warning },
2164
2811
  title: "Copyleft Licenses (GPL, LGPL, AGPL)",
2165
2812
  description: "Requires sharing source code of derivative works. Can impact your project's licensing.",
2166
- theme: theme2
2813
+ theme
2167
2814
  }
2168
2815
  )
2169
2816
  ]
@@ -2178,18 +2825,18 @@ const DependencyInfoModal = ({
2178
2825
  }
2179
2826
  ) });
2180
2827
  };
2181
- const Section = ({ icon, title, theme: theme2, children }) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: `${theme2.space[5]}px` }, children: [
2828
+ const Section = ({ icon, title, theme, children }) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: `${theme.space[5]}px` }, children: [
2182
2829
  /* @__PURE__ */ jsxs(
2183
2830
  "h3",
2184
2831
  {
2185
2832
  style: {
2186
- fontSize: `${theme2.fontSizes[2]}px`,
2187
- fontWeight: theme2.fontWeights.semibold,
2188
- color: theme2.colors.text,
2189
- marginBottom: `${theme2.space[3]}px`,
2833
+ fontSize: `${theme.fontSizes[2]}px`,
2834
+ fontWeight: theme.fontWeights.semibold,
2835
+ color: theme.colors.text,
2836
+ marginBottom: `${theme.space[3]}px`,
2190
2837
  display: "flex",
2191
2838
  alignItems: "center",
2192
- gap: `${theme2.space[2]}px`
2839
+ gap: `${theme.space[2]}px`
2193
2840
  },
2194
2841
  children: [
2195
2842
  icon,
@@ -2203,20 +2850,20 @@ const Section = ({ icon, title, theme: theme2, children }) => /* @__PURE__ */ js
2203
2850
  style: {
2204
2851
  display: "flex",
2205
2852
  flexDirection: "column",
2206
- gap: `${theme2.space[2]}px`
2853
+ gap: `${theme.space[2]}px`
2207
2854
  },
2208
2855
  children
2209
2856
  }
2210
2857
  )
2211
2858
  ] });
2212
- const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__ */ jsxs(
2859
+ const InfoItem = ({ badge, title, description, theme }) => /* @__PURE__ */ jsxs(
2213
2860
  "div",
2214
2861
  {
2215
2862
  style: {
2216
- padding: `${theme2.space[3]}px`,
2217
- backgroundColor: theme2.colors.backgroundSecondary,
2218
- borderRadius: `${theme2.radii[2]}px`,
2219
- border: `1px solid ${theme2.colors.border}`
2863
+ padding: `${theme.space[3]}px`,
2864
+ backgroundColor: theme.colors.backgroundSecondary,
2865
+ borderRadius: `${theme.radii[2]}px`,
2866
+ border: `1px solid ${theme.colors.border}`
2220
2867
  },
2221
2868
  children: [
2222
2869
  /* @__PURE__ */ jsxs(
@@ -2225,18 +2872,18 @@ const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__
2225
2872
  style: {
2226
2873
  display: "flex",
2227
2874
  alignItems: "center",
2228
- gap: `${theme2.space[2]}px`,
2229
- marginBottom: `${theme2.space[1]}px`
2875
+ gap: `${theme.space[2]}px`,
2876
+ marginBottom: `${theme.space[1]}px`
2230
2877
  },
2231
2878
  children: [
2232
2879
  /* @__PURE__ */ jsx(
2233
2880
  "span",
2234
2881
  {
2235
2882
  style: {
2236
- padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
2237
- borderRadius: `${theme2.radii[1]}px`,
2238
- fontSize: `${theme2.fontSizes[0]}px`,
2239
- fontWeight: theme2.fontWeights.medium,
2883
+ padding: `${theme.space[1]}px ${theme.space[2]}px`,
2884
+ borderRadius: `${theme.radii[1]}px`,
2885
+ fontSize: `${theme.fontSizes[0]}px`,
2886
+ fontWeight: theme.fontWeights.medium,
2240
2887
  backgroundColor: `${badge.color}20`,
2241
2888
  color: badge.color
2242
2889
  },
@@ -2247,9 +2894,9 @@ const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__
2247
2894
  "span",
2248
2895
  {
2249
2896
  style: {
2250
- fontSize: `${theme2.fontSizes[1]}px`,
2251
- fontWeight: theme2.fontWeights.medium,
2252
- color: theme2.colors.text
2897
+ fontSize: `${theme.fontSizes[1]}px`,
2898
+ fontWeight: theme.fontWeights.medium,
2899
+ color: theme.colors.text
2253
2900
  },
2254
2901
  children: title
2255
2902
  }
@@ -2261,9 +2908,9 @@ const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__
2261
2908
  "div",
2262
2909
  {
2263
2910
  style: {
2264
- fontSize: `${theme2.fontSizes[1]}px`,
2265
- color: theme2.colors.textSecondary,
2266
- lineHeight: theme2.lineHeights.relaxed
2911
+ fontSize: `${theme.fontSizes[1]}px`,
2912
+ color: theme.colors.textSecondary,
2913
+ lineHeight: theme.lineHeights.relaxed
2267
2914
  },
2268
2915
  children: description
2269
2916
  }
@@ -2272,13 +2919,15 @@ const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__
2272
2919
  }
2273
2920
  );
2274
2921
  const DependencyRow = ({ dependency }) => {
2275
- const { theme: theme2 } = useTheme();
2922
+ const { theme } = useTheme();
2923
+ const [isHovered, setIsHovered] = useState(false);
2924
+ const [copied, setCopied] = useState(false);
2276
2925
  const getDependencyTypeBadgeStyle = (type) => {
2277
2926
  const baseStyle = {
2278
- padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
2279
- borderRadius: `${theme2.radii[1]}px`,
2280
- fontSize: `${theme2.fontSizes[0]}px`,
2281
- fontWeight: theme2.fontWeights.medium,
2927
+ padding: `${theme.space[1]}px ${theme.space[2]}px`,
2928
+ borderRadius: `${theme.radii[1]}px`,
2929
+ fontSize: `${theme.fontSizes[0]}px`,
2930
+ fontWeight: theme.fontWeights.medium,
2282
2931
  minWidth: "36px",
2283
2932
  textAlign: "center"
2284
2933
  };
@@ -2286,29 +2935,54 @@ const DependencyRow = ({ dependency }) => {
2286
2935
  case "production":
2287
2936
  return {
2288
2937
  ...baseStyle,
2289
- backgroundColor: `${theme2.colors.primary}20`,
2290
- color: theme2.colors.primary
2938
+ backgroundColor: `${theme.colors.primary}20`,
2939
+ color: theme.colors.primary
2291
2940
  };
2292
2941
  case "development":
2293
2942
  return {
2294
2943
  ...baseStyle,
2295
- backgroundColor: `${theme2.colors.secondary}20`,
2296
- color: theme2.colors.secondary
2944
+ backgroundColor: `${theme.colors.secondary}20`,
2945
+ color: theme.colors.secondary
2297
2946
  };
2298
2947
  case "peer":
2299
2948
  return {
2300
2949
  ...baseStyle,
2301
- backgroundColor: `${theme2.colors.accent}20`,
2302
- color: theme2.colors.accent
2950
+ backgroundColor: `${theme.colors.accent}20`,
2951
+ color: theme.colors.accent
2303
2952
  };
2304
2953
  default:
2305
2954
  return {
2306
2955
  ...baseStyle,
2307
- backgroundColor: theme2.colors.backgroundLight,
2308
- color: theme2.colors.textSecondary
2956
+ backgroundColor: theme.colors.backgroundLight,
2957
+ color: theme.colors.textSecondary
2309
2958
  };
2310
2959
  }
2311
2960
  };
2961
+ const handleCopy = async (e) => {
2962
+ e.preventDefault();
2963
+ e.stopPropagation();
2964
+ try {
2965
+ const copyText = `${dependency.name}@${dependency.version}`;
2966
+ await navigator.clipboard.writeText(copyText);
2967
+ setCopied(true);
2968
+ setTimeout(() => setCopied(false), 2e3);
2969
+ } catch (err) {
2970
+ console.error("Failed to copy:", err);
2971
+ }
2972
+ };
2973
+ const actionButtonStyle = {
2974
+ padding: `${theme.space[1]}px`,
2975
+ borderRadius: `${theme.radii[1]}px`,
2976
+ display: "flex",
2977
+ alignItems: "center",
2978
+ justifyContent: "center",
2979
+ border: "none",
2980
+ backgroundColor: "transparent",
2981
+ cursor: "pointer",
2982
+ transition: "all 0.15s ease",
2983
+ opacity: isHovered ? 1 : 0,
2984
+ pointerEvents: isHovered ? "auto" : "none"
2985
+ };
2312
2986
  return /* @__PURE__ */ jsxs(
2313
2987
  "div",
2314
2988
  {
@@ -2316,13 +2990,15 @@ const DependencyRow = ({ dependency }) => {
2316
2990
  display: "flex",
2317
2991
  alignItems: "center",
2318
2992
  justifyContent: "space-between",
2319
- padding: `${theme2.space[2]}px ${theme2.space[3]}px`,
2320
- backgroundColor: theme2.colors.background,
2321
- borderRadius: `${theme2.radii[1]}px`,
2322
- fontSize: `${theme2.fontSizes[1]}px`,
2323
- border: `1px solid ${theme2.colors.border}`,
2993
+ padding: `${theme.space[2]}px ${theme.space[3]}px`,
2994
+ backgroundColor: theme.colors.background,
2995
+ borderRadius: `${theme.radii[1]}px`,
2996
+ fontSize: `${theme.fontSizes[1]}px`,
2997
+ border: `1px solid ${theme.colors.border}`,
2324
2998
  transition: "all 0.2s"
2325
2999
  },
3000
+ onMouseEnter: () => setIsHovered(true),
3001
+ onMouseLeave: () => setIsHovered(false),
2326
3002
  children: [
2327
3003
  /* @__PURE__ */ jsxs(
2328
3004
  "div",
@@ -2330,7 +3006,7 @@ const DependencyRow = ({ dependency }) => {
2330
3006
  style: {
2331
3007
  display: "flex",
2332
3008
  alignItems: "center",
2333
- gap: `${theme2.space[2]}px`,
3009
+ gap: `${theme.space[2]}px`,
2334
3010
  flex: 1,
2335
3011
  minWidth: 0
2336
3012
  },
@@ -2340,14 +3016,30 @@ const DependencyRow = ({ dependency }) => {
2340
3016
  "span",
2341
3017
  {
2342
3018
  style: {
2343
- fontWeight: theme2.fontWeights.medium,
2344
- color: theme2.colors.text,
3019
+ fontWeight: theme.fontWeights.medium,
3020
+ color: theme.colors.text,
2345
3021
  overflow: "hidden",
2346
3022
  textOverflow: "ellipsis",
2347
3023
  whiteSpace: "nowrap"
2348
3024
  },
2349
3025
  children: dependency.name
2350
3026
  }
3027
+ ),
3028
+ /* @__PURE__ */ jsx(
3029
+ "a",
3030
+ {
3031
+ href: `https://www.npmjs.com/package/${dependency.name}`,
3032
+ target: "_blank",
3033
+ rel: "noopener noreferrer",
3034
+ style: {
3035
+ ...actionButtonStyle,
3036
+ color: theme.colors.textSecondary,
3037
+ textDecoration: "none",
3038
+ flexShrink: 0
3039
+ },
3040
+ title: "View on npm",
3041
+ children: /* @__PURE__ */ jsx(ExternalLink, { size: 12 })
3042
+ }
2351
3043
  )
2352
3044
  ]
2353
3045
  }
@@ -2358,27 +3050,23 @@ const DependencyRow = ({ dependency }) => {
2358
3050
  style: {
2359
3051
  display: "flex",
2360
3052
  alignItems: "center",
2361
- gap: "8px"
3053
+ gap: "4px"
2362
3054
  },
2363
3055
  children: [
2364
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: dependency.version }),
2365
3056
  /* @__PURE__ */ jsx(
2366
- "a",
3057
+ "button",
2367
3058
  {
2368
- href: `https://www.npmjs.com/package/${dependency.name}`,
2369
- target: "_blank",
2370
- rel: "noopener noreferrer",
3059
+ type: "button",
3060
+ onClick: handleCopy,
2371
3061
  style: {
2372
- padding: `${theme2.space[1]}px`,
2373
- borderRadius: `${theme2.radii[1]}px`,
2374
- display: "flex",
2375
- alignItems: "center",
2376
- transition: "background-color 0.2s"
3062
+ ...actionButtonStyle,
3063
+ color: copied ? theme.colors.success || "#10b981" : theme.colors.textSecondary
2377
3064
  },
2378
- title: "View on npm",
2379
- children: /* @__PURE__ */ jsx(ExternalLink, { size: 12, color: theme2.colors.textSecondary })
3065
+ title: copied ? "Copied!" : `Copy ${dependency.name}@${dependency.version}`,
3066
+ children: copied ? /* @__PURE__ */ jsx(Check, { size: 12 }) : /* @__PURE__ */ jsx(Copy, { size: 12 })
2380
3067
  }
2381
- )
3068
+ ),
3069
+ /* @__PURE__ */ jsx("span", { style: { color: theme.colors.textSecondary }, children: dependency.version })
2382
3070
  ]
2383
3071
  }
2384
3072
  )
@@ -2393,7 +3081,7 @@ const FilterBar = ({
2393
3081
  onSearchChange,
2394
3082
  counts
2395
3083
  }) => {
2396
- const { theme: theme2 } = useTheme();
3084
+ const { theme } = useTheme();
2397
3085
  const availableFilters = [
2398
3086
  ...counts.peer > 0 ? ["peer"] : [],
2399
3087
  ...counts.production > 0 ? ["production"] : [],
@@ -2406,7 +3094,7 @@ const FilterBar = ({
2406
3094
  style: {
2407
3095
  display: "flex",
2408
3096
  flexDirection: "column",
2409
- gap: `${theme2.space[2]}px`
3097
+ gap: `${theme.space[2]}px`
2410
3098
  },
2411
3099
  children: [
2412
3100
  /* @__PURE__ */ jsxs(
@@ -2424,8 +3112,8 @@ const FilterBar = ({
2424
3112
  size: 14,
2425
3113
  style: {
2426
3114
  position: "absolute",
2427
- left: `${theme2.space[3]}px`,
2428
- color: theme2.colors.textSecondary,
3115
+ left: `${theme.space[3]}px`,
3116
+ color: theme.colors.textSecondary,
2429
3117
  pointerEvents: "none"
2430
3118
  }
2431
3119
  }
@@ -2439,13 +3127,13 @@ const FilterBar = ({
2439
3127
  onChange: (e) => onSearchChange(e.target.value),
2440
3128
  style: {
2441
3129
  width: "100%",
2442
- padding: `${theme2.space[2]}px ${theme2.space[5]}px`,
2443
- borderRadius: `${theme2.radii[2]}px`,
2444
- border: `1px solid ${theme2.colors.border}`,
2445
- backgroundColor: theme2.colors.backgroundSecondary,
2446
- color: theme2.colors.text,
2447
- fontSize: `${theme2.fontSizes[1]}px`,
2448
- fontFamily: theme2.fonts.body,
3130
+ padding: `${theme.space[2]}px ${theme.space[5]}px`,
3131
+ borderRadius: `${theme.radii[2]}px`,
3132
+ border: `1px solid ${theme.colors.border}`,
3133
+ backgroundColor: theme.colors.backgroundSecondary,
3134
+ color: theme.colors.text,
3135
+ fontSize: `${theme.fontSizes[1]}px`,
3136
+ fontFamily: theme.fonts.body,
2449
3137
  outline: "none",
2450
3138
  transition: "all 0.2s"
2451
3139
  }
@@ -2457,24 +3145,24 @@ const FilterBar = ({
2457
3145
  onClick: () => onSearchChange(""),
2458
3146
  style: {
2459
3147
  position: "absolute",
2460
- right: `${theme2.space[2]}px`,
2461
- padding: `${theme2.space[1]}px`,
3148
+ right: `${theme.space[2]}px`,
3149
+ padding: `${theme.space[1]}px`,
2462
3150
  display: "flex",
2463
3151
  alignItems: "center",
2464
3152
  justifyContent: "center",
2465
3153
  backgroundColor: "transparent",
2466
3154
  border: "none",
2467
3155
  cursor: "pointer",
2468
- borderRadius: `${theme2.radii[1]}px`
3156
+ borderRadius: `${theme.radii[1]}px`
2469
3157
  },
2470
3158
  title: "Clear search",
2471
- children: /* @__PURE__ */ jsx(X, { size: 14, color: theme2.colors.textSecondary })
3159
+ children: /* @__PURE__ */ jsx(X, { size: 14, color: theme.colors.textSecondary })
2472
3160
  }
2473
3161
  )
2474
3162
  ]
2475
3163
  }
2476
3164
  ),
2477
- showFilters && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: `${theme2.space[1]}px`, width: "100%" }, children: availableFilters.map((type) => {
3165
+ showFilters && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: `${theme.space[1]}px`, width: "100%" }, children: availableFilters.map((type) => {
2478
3166
  const isActive = activeFilters.has(type);
2479
3167
  return /* @__PURE__ */ jsxs(
2480
3168
  "button",
@@ -2482,14 +3170,14 @@ const FilterBar = ({
2482
3170
  onClick: () => onToggleFilter(type),
2483
3171
  style: {
2484
3172
  flex: 1,
2485
- padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
2486
- fontSize: `${theme2.fontSizes[0]}px`,
2487
- fontWeight: theme2.fontWeights.medium,
2488
- fontFamily: theme2.fonts.body,
2489
- borderRadius: `${theme2.radii[1]}px`,
2490
- border: `1px solid ${isActive ? theme2.colors.primary : theme2.colors.border}`,
2491
- backgroundColor: isActive ? `${theme2.colors.primary}20` : theme2.colors.backgroundSecondary,
2492
- color: isActive ? theme2.colors.primary : theme2.colors.text,
3173
+ padding: `${theme.space[1]}px ${theme.space[2]}px`,
3174
+ fontSize: `${theme.fontSizes[0]}px`,
3175
+ fontWeight: theme.fontWeights.medium,
3176
+ fontFamily: theme.fonts.body,
3177
+ borderRadius: `${theme.radii[1]}px`,
3178
+ border: `1px solid ${isActive ? theme.colors.primary : theme.colors.border}`,
3179
+ backgroundColor: isActive ? `${theme.colors.primary}20` : theme.colors.backgroundSecondary,
3180
+ color: isActive ? theme.colors.primary : theme.colors.text,
2493
3181
  cursor: "pointer",
2494
3182
  transition: "all 0.2s"
2495
3183
  },
@@ -2498,7 +3186,7 @@ const FilterBar = ({
2498
3186
  /* @__PURE__ */ jsxs(
2499
3187
  "span",
2500
3188
  {
2501
- style: { marginLeft: `${theme2.space[1]}px`, opacity: 0.7 },
3189
+ style: { marginLeft: `${theme.space[1]}px`, opacity: 0.7 },
2502
3190
  children: [
2503
3191
  "(",
2504
3192
  counts[type],
@@ -2548,7 +3236,7 @@ const DependenciesPanelContent = ({
2548
3236
  context
2549
3237
  }) => {
2550
3238
  var _a;
2551
- const { theme: theme2 } = useTheme();
3239
+ const { theme } = useTheme();
2552
3240
  const [selectedPackagePath, setSelectedPackagePath] = useState(
2553
3241
  null
2554
3242
  );
@@ -2619,14 +3307,14 @@ const DependenciesPanelContent = ({
2619
3307
  "div",
2620
3308
  {
2621
3309
  style: {
2622
- padding: `${theme2.space[3]}px`,
3310
+ padding: `${theme.space[3]}px`,
2623
3311
  height: "100%",
2624
3312
  display: "flex",
2625
3313
  alignItems: "center",
2626
3314
  justifyContent: "center",
2627
- color: theme2.colors.textSecondary,
2628
- backgroundColor: theme2.colors.background,
2629
- fontFamily: theme2.fonts.body
3315
+ color: theme.colors.textSecondary,
3316
+ backgroundColor: theme.colors.background,
3317
+ fontFamily: theme.fonts.body
2630
3318
  },
2631
3319
  children: "Loading packages..."
2632
3320
  }
@@ -2637,16 +3325,16 @@ const DependenciesPanelContent = ({
2637
3325
  "div",
2638
3326
  {
2639
3327
  style: {
2640
- padding: `${theme2.space[3]}px`,
3328
+ padding: `${theme.space[3]}px`,
2641
3329
  height: "100%",
2642
3330
  display: "flex",
2643
3331
  flexDirection: "column",
2644
3332
  alignItems: "center",
2645
3333
  justifyContent: "center",
2646
- gap: `${theme2.space[2]}px`,
2647
- color: theme2.colors.textSecondary,
2648
- backgroundColor: theme2.colors.background,
2649
- fontFamily: theme2.fonts.body
3334
+ gap: `${theme.space[2]}px`,
3335
+ color: theme.colors.textSecondary,
3336
+ backgroundColor: theme.colors.background,
3337
+ fontFamily: theme.fonts.body
2650
3338
  },
2651
3339
  children: [
2652
3340
  /* @__PURE__ */ jsx(Package, { size: 32 }),
@@ -2662,9 +3350,9 @@ const DependenciesPanelContent = ({
2662
3350
  height: "100%",
2663
3351
  display: "flex",
2664
3352
  flexDirection: "column",
2665
- backgroundColor: theme2.colors.background,
2666
- color: theme2.colors.text,
2667
- fontFamily: theme2.fonts.body,
3353
+ backgroundColor: theme.colors.background,
3354
+ color: theme.colors.text,
3355
+ fontFamily: theme.fonts.body,
2668
3356
  overflow: "hidden"
2669
3357
  },
2670
3358
  children: [
@@ -2673,12 +3361,12 @@ const DependenciesPanelContent = ({
2673
3361
  {
2674
3362
  style: {
2675
3363
  flexShrink: 0,
2676
- padding: `${theme2.space[3]}px`,
2677
- paddingBottom: `${theme2.space[2]}px`,
3364
+ padding: `${theme.space[3]}px`,
3365
+ paddingBottom: `${theme.space[2]}px`,
2678
3366
  display: "flex",
2679
3367
  flexDirection: "column",
2680
- gap: `${theme2.space[2]}px`,
2681
- borderBottom: `1px solid ${theme2.colors.border}`
3368
+ gap: `${theme.space[2]}px`,
3369
+ borderBottom: `1px solid ${theme.colors.border}`
2682
3370
  },
2683
3371
  children: [
2684
3372
  /* @__PURE__ */ jsxs(
@@ -2694,12 +3382,12 @@ const DependenciesPanelContent = ({
2694
3382
  "h3",
2695
3383
  {
2696
3384
  style: {
2697
- fontSize: `${theme2.fontSizes[2]}px`,
2698
- fontWeight: theme2.fontWeights.semibold,
2699
- color: theme2.colors.text,
3385
+ fontSize: `${theme.fontSizes[2]}px`,
3386
+ fontWeight: theme.fontWeights.semibold,
3387
+ color: theme.colors.text,
2700
3388
  display: "flex",
2701
3389
  alignItems: "center",
2702
- gap: `${theme2.space[2]}px`,
3390
+ gap: `${theme.space[2]}px`,
2703
3391
  margin: 0
2704
3392
  },
2705
3393
  children: packages.length > 1 ? /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -2709,9 +3397,9 @@ const DependenciesPanelContent = ({
2709
3397
  "span",
2710
3398
  {
2711
3399
  style: {
2712
- fontSize: `${theme2.fontSizes[0]}px`,
2713
- fontWeight: theme2.fontWeights.body,
2714
- color: theme2.colors.textSecondary
3400
+ fontSize: `${theme.fontSizes[0]}px`,
3401
+ fontWeight: theme.fontWeights.body,
3402
+ color: theme.colors.textSecondary
2715
3403
  },
2716
3404
  children: [
2717
3405
  "(",
@@ -2731,18 +3419,18 @@ const DependenciesPanelContent = ({
2731
3419
  {
2732
3420
  onClick: () => setShowInfoModal(true),
2733
3421
  style: {
2734
- padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
2735
- fontSize: `${theme2.fontSizes[0]}px`,
2736
- fontWeight: theme2.fontWeights.medium,
2737
- fontFamily: theme2.fonts.body,
2738
- borderRadius: `${theme2.radii[1]}px`,
2739
- border: `1px solid ${theme2.colors.border}`,
2740
- backgroundColor: theme2.colors.backgroundSecondary,
2741
- color: theme2.colors.primary,
3422
+ padding: `${theme.space[1]}px ${theme.space[2]}px`,
3423
+ fontSize: `${theme.fontSizes[0]}px`,
3424
+ fontWeight: theme.fontWeights.medium,
3425
+ fontFamily: theme.fonts.body,
3426
+ borderRadius: `${theme.radii[1]}px`,
3427
+ border: `1px solid ${theme.colors.border}`,
3428
+ backgroundColor: theme.colors.backgroundSecondary,
3429
+ color: theme.colors.primary,
2742
3430
  cursor: "pointer",
2743
3431
  display: "flex",
2744
3432
  alignItems: "center",
2745
- gap: `${theme2.space[1]}px`,
3433
+ gap: `${theme.space[1]}px`,
2746
3434
  transition: "all 0.2s"
2747
3435
  },
2748
3436
  children: [
@@ -2761,13 +3449,13 @@ const DependenciesPanelContent = ({
2761
3449
  onChange: (e) => setSelectedPackagePath(e.target.value === "__none__" ? null : e.target.value),
2762
3450
  style: {
2763
3451
  width: "100%",
2764
- padding: `${theme2.space[2]}px`,
2765
- borderRadius: `${theme2.radii[1]}px`,
2766
- border: `1px solid ${theme2.colors.border}`,
2767
- backgroundColor: theme2.colors.backgroundSecondary,
2768
- color: theme2.colors.text,
2769
- fontSize: `${theme2.fontSizes[1]}px`,
2770
- fontFamily: theme2.fonts.body,
3452
+ padding: `${theme.space[2]}px`,
3453
+ borderRadius: `${theme.radii[1]}px`,
3454
+ border: `1px solid ${theme.colors.border}`,
3455
+ backgroundColor: theme.colors.backgroundSecondary,
3456
+ color: theme.colors.text,
3457
+ fontSize: `${theme.fontSizes[1]}px`,
3458
+ fontFamily: theme.fonts.body,
2771
3459
  cursor: "pointer"
2772
3460
  },
2773
3461
  children: packages.map((pkg) => /* @__PURE__ */ jsxs("option", { value: pkg.packageData.path, children: [
@@ -2782,8 +3470,8 @@ const DependenciesPanelContent = ({
2782
3470
  "div",
2783
3471
  {
2784
3472
  style: {
2785
- fontSize: `${theme2.fontSizes[0]}px`,
2786
- color: theme2.colors.textSecondary
3473
+ fontSize: `${theme.fontSizes[0]}px`,
3474
+ color: theme.colors.textSecondary
2787
3475
  },
2788
3476
  children: [
2789
3477
  selectedPackage.packageData.name,
@@ -2812,16 +3500,16 @@ const DependenciesPanelContent = ({
2812
3500
  style: {
2813
3501
  flex: 1,
2814
3502
  overflow: "auto",
2815
- padding: `${theme2.space[2]}px ${theme2.space[3]}px ${theme2.space[3]}px`
3503
+ padding: `${theme.space[2]}px ${theme.space[3]}px ${theme.space[3]}px`
2816
3504
  },
2817
3505
  children: [
2818
3506
  /* @__PURE__ */ jsxs(
2819
3507
  "div",
2820
3508
  {
2821
3509
  style: {
2822
- fontSize: `${theme2.fontSizes[0]}px`,
2823
- color: theme2.colors.textSecondary,
2824
- marginBottom: `${theme2.space[2]}px`
3510
+ fontSize: `${theme.fontSizes[0]}px`,
3511
+ color: theme.colors.textSecondary,
3512
+ marginBottom: `${theme.space[2]}px`
2825
3513
  },
2826
3514
  children: [
2827
3515
  "Showing ",
@@ -2838,16 +3526,16 @@ const DependenciesPanelContent = ({
2838
3526
  style: {
2839
3527
  display: "flex",
2840
3528
  flexDirection: "column",
2841
- gap: `${theme2.space[1]}px`
3529
+ gap: `${theme.space[1]}px`
2842
3530
  },
2843
3531
  children: filteredDependencies.length === 0 ? /* @__PURE__ */ jsx(
2844
3532
  "div",
2845
3533
  {
2846
3534
  style: {
2847
- padding: `${theme2.space[3]}px`,
3535
+ padding: `${theme.space[3]}px`,
2848
3536
  textAlign: "center",
2849
- color: theme2.colors.textSecondary,
2850
- fontSize: `${theme2.fontSizes[1]}px`
3537
+ color: theme.colors.textSecondary,
3538
+ fontSize: `${theme.fontSizes[1]}px`
2851
3539
  },
2852
3540
  children: "No dependencies match your filters"
2853
3541
  }
@@ -2871,8 +3559,8 @@ const DependenciesPanelContent = ({
2871
3559
  display: "flex",
2872
3560
  alignItems: "center",
2873
3561
  justifyContent: "center",
2874
- color: theme2.colors.textSecondary,
2875
- fontSize: `${theme2.fontSizes[1]}px`
3562
+ color: theme.colors.textSecondary,
3563
+ fontSize: `${theme.fontSizes[1]}px`
2876
3564
  },
2877
3565
  children: "Select a package to view its dependencies"
2878
3566
  }
@@ -2889,9 +3577,9 @@ const DependenciesPanelContent = ({
2889
3577
  );
2890
3578
  };
2891
3579
  const DependenciesPanel = (props) => {
2892
- return /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(DependenciesPanelContent, { ...props }) });
3580
+ return /* @__PURE__ */ jsx(DependenciesPanelContent, { ...props });
2893
3581
  };
2894
- const PANEL_ID$2 = "industry-theme.local-projects";
3582
+ const PANEL_ID$3 = "industry-theme.local-projects";
2895
3583
  const filterProjectsTool = {
2896
3584
  name: "filter_projects",
2897
3585
  description: "Filter the local projects list by name, owner, or path",
@@ -2915,7 +3603,7 @@ const filterProjectsTool = {
2915
3603
  tags: ["filter", "search", "projects"],
2916
3604
  tool_call_template: {
2917
3605
  call_template_type: "panel_event",
2918
- event_type: `${PANEL_ID$2}:filter`
3606
+ event_type: `${PANEL_ID$3}:filter`
2919
3607
  }
2920
3608
  };
2921
3609
  const selectProjectTool = {
@@ -2941,7 +3629,7 @@ const selectProjectTool = {
2941
3629
  tags: ["select", "project", "navigation"],
2942
3630
  tool_call_template: {
2943
3631
  call_template_type: "panel_event",
2944
- event_type: `${PANEL_ID$2}:select-repository`
3632
+ event_type: `${PANEL_ID$3}:select-repository`
2945
3633
  }
2946
3634
  };
2947
3635
  const openProjectTool = {
@@ -2967,7 +3655,7 @@ const openProjectTool = {
2967
3655
  tags: ["open", "project", "workspace"],
2968
3656
  tool_call_template: {
2969
3657
  call_template_type: "panel_event",
2970
- event_type: `${PANEL_ID$2}:open-repository`
3658
+ event_type: `${PANEL_ID$3}:open-repository`
2971
3659
  }
2972
3660
  };
2973
3661
  const localProjectsPanelTools = [
@@ -2976,12 +3664,12 @@ const localProjectsPanelTools = [
2976
3664
  openProjectTool
2977
3665
  ];
2978
3666
  const localProjectsPanelToolsMetadata = {
2979
- id: PANEL_ID$2,
3667
+ id: PANEL_ID$3,
2980
3668
  name: "Local Projects Panel",
2981
3669
  description: "Tools for browsing and managing local Alexandria repositories",
2982
3670
  tools: localProjectsPanelTools
2983
3671
  };
2984
- const PANEL_ID$1 = "industry-theme.workspace-repositories";
3672
+ const PANEL_ID$2 = "industry-theme.workspace-repositories";
2985
3673
  const selectRepositoryTool = {
2986
3674
  name: "select_workspace_repository",
2987
3675
  description: "Selects a repository in the workspace panel",
@@ -3005,7 +3693,7 @@ const selectRepositoryTool = {
3005
3693
  tags: ["workspace", "repository", "select"],
3006
3694
  tool_call_template: {
3007
3695
  call_template_type: "panel_event",
3008
- event_type: `${PANEL_ID$1}:select-repository`
3696
+ event_type: `${PANEL_ID$2}:select-repository`
3009
3697
  }
3010
3698
  };
3011
3699
  const refreshWorkspaceTool = {
@@ -3030,7 +3718,7 @@ const refreshWorkspaceTool = {
3030
3718
  tags: ["workspace", "refresh"],
3031
3719
  tool_call_template: {
3032
3720
  call_template_type: "panel_event",
3033
- event_type: `${PANEL_ID$1}:refresh-workspace`
3721
+ event_type: `${PANEL_ID$2}:refresh-workspace`
3034
3722
  }
3035
3723
  };
3036
3724
  const openRepositoryTool = {
@@ -3056,7 +3744,7 @@ const openRepositoryTool = {
3056
3744
  tags: ["workspace", "repository", "open"],
3057
3745
  tool_call_template: {
3058
3746
  call_template_type: "panel_event",
3059
- event_type: `${PANEL_ID$1}:open-repository`
3747
+ event_type: `${PANEL_ID$2}:open-repository`
3060
3748
  }
3061
3749
  };
3062
3750
  const workspaceRepositoriesPanelTools = [
@@ -3065,11 +3753,133 @@ const workspaceRepositoriesPanelTools = [
3065
3753
  openRepositoryTool
3066
3754
  ];
3067
3755
  const workspaceRepositoriesPanelToolsMetadata = {
3068
- id: PANEL_ID$1,
3756
+ id: PANEL_ID$2,
3069
3757
  name: "Workspace Repositories Panel",
3070
3758
  description: "Tools provided by the workspace repositories panel",
3071
3759
  tools: workspaceRepositoriesPanelTools
3072
3760
  };
3761
+ const PANEL_ID$1 = "industry-theme.workspaces-list";
3762
+ const filterWorkspacesTool = {
3763
+ name: "filter_workspaces",
3764
+ description: "Filter the workspaces list by workspace name, description, or repository names within workspaces",
3765
+ inputs: {
3766
+ type: "object",
3767
+ properties: {
3768
+ filter: {
3769
+ type: "string",
3770
+ description: "Search term to filter workspaces (matches workspace name, description, or repository names)"
3771
+ }
3772
+ },
3773
+ required: ["filter"]
3774
+ },
3775
+ outputs: {
3776
+ type: "object",
3777
+ properties: {
3778
+ success: { type: "boolean" },
3779
+ message: { type: "string" }
3780
+ }
3781
+ },
3782
+ tags: ["filter", "search", "workspaces"],
3783
+ tool_call_template: {
3784
+ call_template_type: "panel_event",
3785
+ event_type: `${PANEL_ID$1}:filter`
3786
+ }
3787
+ };
3788
+ const selectWorkspaceTool = {
3789
+ name: "select_workspace",
3790
+ description: "Select a workspace by its ID to view its details and repositories",
3791
+ inputs: {
3792
+ type: "object",
3793
+ properties: {
3794
+ workspaceId: {
3795
+ type: "string",
3796
+ description: "The workspace ID to select"
3797
+ }
3798
+ },
3799
+ required: ["workspaceId"]
3800
+ },
3801
+ outputs: {
3802
+ type: "object",
3803
+ properties: {
3804
+ success: { type: "boolean" },
3805
+ selectedWorkspace: { type: "string" }
3806
+ }
3807
+ },
3808
+ tags: ["select", "workspace", "navigation"],
3809
+ tool_call_template: {
3810
+ call_template_type: "panel_event",
3811
+ event_type: `${PANEL_ID$1}:select-workspace`
3812
+ }
3813
+ };
3814
+ const openWorkspaceTool = {
3815
+ name: "open_workspace",
3816
+ description: "Open a workspace in a dedicated window for full workspace management",
3817
+ inputs: {
3818
+ type: "object",
3819
+ properties: {
3820
+ workspaceId: {
3821
+ type: "string",
3822
+ description: "The workspace ID to open"
3823
+ }
3824
+ },
3825
+ required: ["workspaceId"]
3826
+ },
3827
+ outputs: {
3828
+ type: "object",
3829
+ properties: {
3830
+ success: { type: "boolean" },
3831
+ message: { type: "string" }
3832
+ }
3833
+ },
3834
+ tags: ["open", "workspace", "window"],
3835
+ tool_call_template: {
3836
+ call_template_type: "panel_event",
3837
+ event_type: `${PANEL_ID$1}:open-workspace`
3838
+ }
3839
+ };
3840
+ const createWorkspaceTool = {
3841
+ name: "create_workspace",
3842
+ description: "Create a new workspace with the specified name and optional description",
3843
+ inputs: {
3844
+ type: "object",
3845
+ properties: {
3846
+ name: {
3847
+ type: "string",
3848
+ description: "The name for the new workspace"
3849
+ },
3850
+ description: {
3851
+ type: "string",
3852
+ description: "Optional description for the workspace"
3853
+ }
3854
+ },
3855
+ required: ["name"]
3856
+ },
3857
+ outputs: {
3858
+ type: "object",
3859
+ properties: {
3860
+ success: { type: "boolean" },
3861
+ workspaceId: { type: "string" },
3862
+ message: { type: "string" }
3863
+ }
3864
+ },
3865
+ tags: ["create", "workspace", "new"],
3866
+ tool_call_template: {
3867
+ call_template_type: "panel_event",
3868
+ event_type: `${PANEL_ID$1}:create-workspace`
3869
+ }
3870
+ };
3871
+ const workspacesListPanelTools = [
3872
+ filterWorkspacesTool,
3873
+ selectWorkspaceTool,
3874
+ openWorkspaceTool,
3875
+ createWorkspaceTool
3876
+ ];
3877
+ const workspacesListPanelToolsMetadata = {
3878
+ id: PANEL_ID$1,
3879
+ name: "Workspaces List Panel",
3880
+ description: "Tools for browsing and managing workspaces",
3881
+ tools: workspacesListPanelTools
3882
+ };
3073
3883
  const PANEL_ID = "principal-ade.dependencies-panel";
3074
3884
  const filterDependenciesTool = {
3075
3885
  name: "filter_dependencies",
@@ -3204,6 +4014,28 @@ const panels = [
3204
4014
  console.log("Workspace Repositories Panel unmounting");
3205
4015
  }
3206
4016
  },
4017
+ {
4018
+ metadata: {
4019
+ id: "industry-theme.workspaces-list",
4020
+ name: "Workspaces",
4021
+ icon: "Layers",
4022
+ version: "0.1.0",
4023
+ author: "Industry Theme",
4024
+ description: "Browse and manage workspaces",
4025
+ slices: ["workspaces"],
4026
+ tools: workspacesListPanelTools
4027
+ },
4028
+ component: WorkspacesListPanel,
4029
+ onMount: async (context) => {
4030
+ console.log("Workspaces List Panel mounted");
4031
+ if (context.hasSlice("workspaces") && !context.isSliceLoading("workspaces")) {
4032
+ await context.refresh("workspace", "workspaces");
4033
+ }
4034
+ },
4035
+ onUnmount: async (_context) => {
4036
+ console.log("Workspaces List Panel unmounting");
4037
+ }
4038
+ },
3207
4039
  {
3208
4040
  metadata: {
3209
4041
  id: "principal-ade.dependencies-panel",
@@ -3236,24 +4068,33 @@ export {
3236
4068
  LocalProjectsPanel,
3237
4069
  LocalProjectsPanelPreview,
3238
4070
  RepositoryAvatar,
4071
+ WorkspaceCard,
3239
4072
  WorkspaceRepositoriesPanel,
4073
+ WorkspacesListPanel,
4074
+ WorkspacesListPanelPreview,
4075
+ createWorkspaceTool,
3240
4076
  dependenciesPanelTools,
3241
4077
  dependenciesPanelToolsMetadata,
3242
4078
  filterDependenciesTool,
3243
4079
  filterProjectsTool,
4080
+ filterWorkspacesTool,
3244
4081
  localProjectsPanelTools,
3245
4082
  localProjectsPanelToolsMetadata,
3246
4083
  onPackageLoad,
3247
4084
  onPackageUnload,
3248
4085
  openProjectTool,
3249
4086
  openRepositoryTool,
4087
+ openWorkspaceTool,
3250
4088
  panels,
3251
4089
  refreshWorkspaceTool,
3252
4090
  selectDependencyTypeTool,
3253
4091
  selectPackageTool,
3254
4092
  selectProjectTool,
3255
4093
  selectRepositoryTool,
4094
+ selectWorkspaceTool,
3256
4095
  workspaceRepositoriesPanelTools,
3257
- workspaceRepositoriesPanelToolsMetadata
4096
+ workspaceRepositoriesPanelToolsMetadata,
4097
+ workspacesListPanelTools,
4098
+ workspacesListPanelToolsMetadata
3258
4099
  };
3259
4100
  //# sourceMappingURL=panels.bundle.js.map