@industry-theme/alexandria-panels 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/panels/LocalProjectsPanel/LocalProjectCard.d.ts.map +1 -1
- package/dist/panels/LocalProjectsPanel/index.d.ts.map +1 -1
- package/dist/panels/LocalProjectsPanel/types.d.ts +22 -1
- package/dist/panels/LocalProjectsPanel/types.d.ts.map +1 -1
- package/dist/panels.bundle.js +221 -48
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
package/dist/panels.bundle.js
CHANGED
|
@@ -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/* Animated underline that grows from left on hover */\n.local-project-card .project-name-underline {\n position: relative;\n text-decoration: none;\n}\n\n.local-project-card .project-name-underline::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: -3px;\n width: 0;\n height: 2px;\n background-color: var(--underline-color);\n transition: width 0.2s ease-out;\n}\n\n.local-project-card:hover .project-name-underline::after {\n width: 100%;\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: 8px !important;\n }\n\n .local-project-card {\n padding: 8px !important;\n }\n}\n/* Shared Panel Styles */\n\n/* Header button hover states */\n.header-button {\n transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;\n}\n\n.header-button:not(.active):hover {\n color: var(--theme-text) !important;\n}\n\n/* Search input focus state */\n.search-input:focus {\n border-color: var(--theme-primary) !important;\n}\n\n/* Clear filter button hover */\n.clear-filter-button {\n transition: color 0.2s ease;\n}\n\n.clear-filter-button:hover {\n color: var(--theme-text) !important;\n}\n\n/* Search overlay animation - grows from right to left */\n.search-overlay {\n animation: searchExpand 0.2s ease-out forwards;\n}\n\n@keyframes searchExpand {\n from {\n clip-path: inset(0 0 0 100%);\n }\n to {\n clip-path: inset(0 0 0 0);\n }\n}"));
|
|
6
|
+
elementStyle.appendChild(document.createTextNode("/* Spin animation for scanning button */\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n/* 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/* Animated underline that grows from left on hover */\n.local-project-card .project-name-underline {\n position: relative;\n text-decoration: none;\n}\n\n.local-project-card .project-name-underline::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: -3px;\n width: 0;\n height: 2px;\n background-color: var(--underline-color);\n transition: width 0.2s ease-out;\n}\n\n.local-project-card:hover .project-name-underline::after {\n width: 100%;\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: 8px !important;\n }\n\n .local-project-card {\n padding: 8px !important;\n }\n}\n/* Shared Panel Styles */\n\n/* Header button hover states */\n.header-button {\n transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;\n}\n\n.header-button:not(.active):hover {\n color: var(--theme-text) !important;\n}\n\n/* Search input focus state */\n.search-input:focus {\n border-color: var(--theme-primary) !important;\n}\n\n/* Clear filter button hover */\n.clear-filter-button {\n transition: color 0.2s ease;\n}\n\n.clear-filter-button:hover {\n color: var(--theme-text) !important;\n}\n\n/* Search overlay animation - grows from right to left */\n.search-overlay {\n animation: searchExpand 0.2s ease-out forwards;\n}\n\n@keyframes searchExpand {\n from {\n clip-path: inset(0 0 0 100%);\n }\n to {\n clip-path: inset(0 0 0 0);\n }\n}"));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
@@ -140,7 +140,7 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
140
140
|
* This source code is licensed under the ISC license.
|
|
141
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
142
142
|
*/
|
|
143
|
-
const __iconNode$
|
|
143
|
+
const __iconNode$B = [
|
|
144
144
|
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
145
145
|
["path", { d: "M10 8h4", key: "1sr2af" }],
|
|
146
146
|
["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
|
|
@@ -153,71 +153,71 @@ const __iconNode$A = [
|
|
|
153
153
|
],
|
|
154
154
|
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
155
155
|
];
|
|
156
|
-
const Building2 = createLucideIcon("building-2", __iconNode$
|
|
156
|
+
const Building2 = createLucideIcon("building-2", __iconNode$B);
|
|
157
157
|
/**
|
|
158
158
|
* @license lucide-react v0.552.0 - ISC
|
|
159
159
|
*
|
|
160
160
|
* This source code is licensed under the ISC license.
|
|
161
161
|
* See the LICENSE file in the root directory of this source tree.
|
|
162
162
|
*/
|
|
163
|
-
const __iconNode$
|
|
163
|
+
const __iconNode$A = [
|
|
164
164
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
165
165
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
166
166
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
167
167
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
168
168
|
];
|
|
169
|
-
const Calendar = createLucideIcon("calendar", __iconNode$
|
|
169
|
+
const Calendar = createLucideIcon("calendar", __iconNode$A);
|
|
170
170
|
/**
|
|
171
171
|
* @license lucide-react v0.552.0 - ISC
|
|
172
172
|
*
|
|
173
173
|
* This source code is licensed under the ISC license.
|
|
174
174
|
* See the LICENSE file in the root directory of this source tree.
|
|
175
175
|
*/
|
|
176
|
-
const __iconNode$
|
|
177
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
176
|
+
const __iconNode$z = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
177
|
+
const Check = createLucideIcon("check", __iconNode$z);
|
|
178
178
|
/**
|
|
179
179
|
* @license lucide-react v0.552.0 - ISC
|
|
180
180
|
*
|
|
181
181
|
* This source code is licensed under the ISC license.
|
|
182
182
|
* See the LICENSE file in the root directory of this source tree.
|
|
183
183
|
*/
|
|
184
|
-
const __iconNode$
|
|
185
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
184
|
+
const __iconNode$y = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
185
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$y);
|
|
186
186
|
/**
|
|
187
187
|
* @license lucide-react v0.552.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
191
|
*/
|
|
192
|
-
const __iconNode$
|
|
193
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
192
|
+
const __iconNode$x = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
193
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$x);
|
|
194
194
|
/**
|
|
195
195
|
* @license lucide-react v0.552.0 - ISC
|
|
196
196
|
*
|
|
197
197
|
* This source code is licensed under the ISC license.
|
|
198
198
|
* See the LICENSE file in the root directory of this source tree.
|
|
199
199
|
*/
|
|
200
|
-
const __iconNode$
|
|
200
|
+
const __iconNode$w = [
|
|
201
201
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
202
202
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
203
203
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
204
204
|
];
|
|
205
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
205
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$w);
|
|
206
206
|
/**
|
|
207
207
|
* @license lucide-react v0.552.0 - ISC
|
|
208
208
|
*
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
210
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
211
|
*/
|
|
212
|
-
const __iconNode$
|
|
213
|
-
const Circle = createLucideIcon("circle", __iconNode$
|
|
212
|
+
const __iconNode$v = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
|
|
213
|
+
const Circle = createLucideIcon("circle", __iconNode$v);
|
|
214
214
|
/**
|
|
215
215
|
* @license lucide-react v0.552.0 - ISC
|
|
216
216
|
*
|
|
217
217
|
* This source code is licensed under the ISC license.
|
|
218
218
|
* See the LICENSE file in the root directory of this source tree.
|
|
219
219
|
*/
|
|
220
|
-
const __iconNode$
|
|
220
|
+
const __iconNode$u = [
|
|
221
221
|
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
222
222
|
["path", { d: "M5.782 5.782A7 7 0 0 0 9 19h8.5a4.5 4.5 0 0 0 1.307-.193", key: "yfwify" }],
|
|
223
223
|
[
|
|
@@ -225,85 +225,85 @@ const __iconNode$t = [
|
|
|
225
225
|
{ d: "M21.532 16.5A4.5 4.5 0 0 0 17.5 10h-1.79A7.008 7.008 0 0 0 10 5.07", key: "jlfiyv" }
|
|
226
226
|
]
|
|
227
227
|
];
|
|
228
|
-
const CloudOff = createLucideIcon("cloud-off", __iconNode$
|
|
228
|
+
const CloudOff = createLucideIcon("cloud-off", __iconNode$u);
|
|
229
229
|
/**
|
|
230
230
|
* @license lucide-react v0.552.0 - ISC
|
|
231
231
|
*
|
|
232
232
|
* This source code is licensed under the ISC license.
|
|
233
233
|
* See the LICENSE file in the root directory of this source tree.
|
|
234
234
|
*/
|
|
235
|
-
const __iconNode$
|
|
235
|
+
const __iconNode$t = [
|
|
236
236
|
["path", { d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z", key: "p7xjir" }]
|
|
237
237
|
];
|
|
238
|
-
const Cloud = createLucideIcon("cloud", __iconNode$
|
|
238
|
+
const Cloud = createLucideIcon("cloud", __iconNode$t);
|
|
239
239
|
/**
|
|
240
240
|
* @license lucide-react v0.552.0 - ISC
|
|
241
241
|
*
|
|
242
242
|
* This source code is licensed under the ISC license.
|
|
243
243
|
* See the LICENSE file in the root directory of this source tree.
|
|
244
244
|
*/
|
|
245
|
-
const __iconNode$
|
|
245
|
+
const __iconNode$s = [
|
|
246
246
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
247
247
|
["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" }]
|
|
248
248
|
];
|
|
249
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
249
|
+
const Copy = createLucideIcon("copy", __iconNode$s);
|
|
250
250
|
/**
|
|
251
251
|
* @license lucide-react v0.552.0 - ISC
|
|
252
252
|
*
|
|
253
253
|
* This source code is licensed under the ISC license.
|
|
254
254
|
* See the LICENSE file in the root directory of this source tree.
|
|
255
255
|
*/
|
|
256
|
-
const __iconNode$
|
|
256
|
+
const __iconNode$r = [
|
|
257
257
|
["path", { d: "M10 12h.01", key: "1kxr2c" }],
|
|
258
258
|
["path", { d: "M18 20V6a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v14", key: "36qu9e" }],
|
|
259
259
|
["path", { d: "M2 20h20", key: "owomy5" }]
|
|
260
260
|
];
|
|
261
|
-
const DoorClosed = createLucideIcon("door-closed", __iconNode$
|
|
261
|
+
const DoorClosed = createLucideIcon("door-closed", __iconNode$r);
|
|
262
262
|
/**
|
|
263
263
|
* @license lucide-react v0.552.0 - ISC
|
|
264
264
|
*
|
|
265
265
|
* This source code is licensed under the ISC license.
|
|
266
266
|
* See the LICENSE file in the root directory of this source tree.
|
|
267
267
|
*/
|
|
268
|
-
const __iconNode$
|
|
268
|
+
const __iconNode$q = [
|
|
269
269
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
270
270
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
271
271
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
272
272
|
];
|
|
273
|
-
const Download = createLucideIcon("download", __iconNode$
|
|
273
|
+
const Download = createLucideIcon("download", __iconNode$q);
|
|
274
274
|
/**
|
|
275
275
|
* @license lucide-react v0.552.0 - ISC
|
|
276
276
|
*
|
|
277
277
|
* This source code is licensed under the ISC license.
|
|
278
278
|
* See the LICENSE file in the root directory of this source tree.
|
|
279
279
|
*/
|
|
280
|
-
const __iconNode$
|
|
280
|
+
const __iconNode$p = [
|
|
281
281
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
282
282
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
283
283
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
284
284
|
];
|
|
285
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
285
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$p);
|
|
286
286
|
/**
|
|
287
287
|
* @license lucide-react v0.552.0 - ISC
|
|
288
288
|
*
|
|
289
289
|
* This source code is licensed under the ISC license.
|
|
290
290
|
* See the LICENSE file in the root directory of this source tree.
|
|
291
291
|
*/
|
|
292
|
-
const __iconNode$
|
|
292
|
+
const __iconNode$o = [
|
|
293
293
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }],
|
|
294
294
|
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
|
|
295
295
|
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
|
|
296
296
|
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
|
|
297
297
|
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }]
|
|
298
298
|
];
|
|
299
|
-
const Focus = createLucideIcon("focus", __iconNode$
|
|
299
|
+
const Focus = createLucideIcon("focus", __iconNode$o);
|
|
300
300
|
/**
|
|
301
301
|
* @license lucide-react v0.552.0 - ISC
|
|
302
302
|
*
|
|
303
303
|
* This source code is licensed under the ISC license.
|
|
304
304
|
* See the LICENSE file in the root directory of this source tree.
|
|
305
305
|
*/
|
|
306
|
-
const __iconNode$
|
|
306
|
+
const __iconNode$n = [
|
|
307
307
|
[
|
|
308
308
|
"path",
|
|
309
309
|
{
|
|
@@ -315,14 +315,14 @@ const __iconNode$m = [
|
|
|
315
315
|
["path", { d: "M18 19c-2.8 0-5-2.2-5-5v8", key: "pkpw2h" }],
|
|
316
316
|
["circle", { cx: "20", cy: "19", r: "2", key: "1obnsp" }]
|
|
317
317
|
];
|
|
318
|
-
const FolderGit2 = createLucideIcon("folder-git-2", __iconNode$
|
|
318
|
+
const FolderGit2 = createLucideIcon("folder-git-2", __iconNode$n);
|
|
319
319
|
/**
|
|
320
320
|
* @license lucide-react v0.552.0 - ISC
|
|
321
321
|
*
|
|
322
322
|
* This source code is licensed under the ISC license.
|
|
323
323
|
* See the LICENSE file in the root directory of this source tree.
|
|
324
324
|
*/
|
|
325
|
-
const __iconNode$
|
|
325
|
+
const __iconNode$m = [
|
|
326
326
|
[
|
|
327
327
|
"path",
|
|
328
328
|
{
|
|
@@ -331,14 +331,14 @@ const __iconNode$l = [
|
|
|
331
331
|
}
|
|
332
332
|
]
|
|
333
333
|
];
|
|
334
|
-
const FolderOpen = createLucideIcon("folder-open", __iconNode$
|
|
334
|
+
const FolderOpen = createLucideIcon("folder-open", __iconNode$m);
|
|
335
335
|
/**
|
|
336
336
|
* @license lucide-react v0.552.0 - ISC
|
|
337
337
|
*
|
|
338
338
|
* This source code is licensed under the ISC license.
|
|
339
339
|
* See the LICENSE file in the root directory of this source tree.
|
|
340
340
|
*/
|
|
341
|
-
const __iconNode$
|
|
341
|
+
const __iconNode$l = [
|
|
342
342
|
["path", { d: "M12 10v6", key: "1bos4e" }],
|
|
343
343
|
["path", { d: "M9 13h6", key: "1uhe8q" }],
|
|
344
344
|
[
|
|
@@ -349,14 +349,14 @@ const __iconNode$k = [
|
|
|
349
349
|
}
|
|
350
350
|
]
|
|
351
351
|
];
|
|
352
|
-
const FolderPlus = createLucideIcon("folder-plus", __iconNode$
|
|
352
|
+
const FolderPlus = createLucideIcon("folder-plus", __iconNode$l);
|
|
353
353
|
/**
|
|
354
354
|
* @license lucide-react v0.552.0 - ISC
|
|
355
355
|
*
|
|
356
356
|
* This source code is licensed under the ISC license.
|
|
357
357
|
* See the LICENSE file in the root directory of this source tree.
|
|
358
358
|
*/
|
|
359
|
-
const __iconNode$
|
|
359
|
+
const __iconNode$k = [
|
|
360
360
|
[
|
|
361
361
|
"path",
|
|
362
362
|
{
|
|
@@ -365,7 +365,20 @@ const __iconNode$j = [
|
|
|
365
365
|
}
|
|
366
366
|
]
|
|
367
367
|
];
|
|
368
|
-
const Folder = createLucideIcon("folder", __iconNode$
|
|
368
|
+
const Folder = createLucideIcon("folder", __iconNode$k);
|
|
369
|
+
/**
|
|
370
|
+
* @license lucide-react v0.552.0 - ISC
|
|
371
|
+
*
|
|
372
|
+
* This source code is licensed under the ISC license.
|
|
373
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
374
|
+
*/
|
|
375
|
+
const __iconNode$j = [
|
|
376
|
+
["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
|
|
377
|
+
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
378
|
+
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
379
|
+
["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
|
|
380
|
+
];
|
|
381
|
+
const GitBranch = createLucideIcon("git-branch", __iconNode$j);
|
|
369
382
|
/**
|
|
370
383
|
* @license lucide-react v0.552.0 - ISC
|
|
371
384
|
*
|
|
@@ -714,6 +727,7 @@ const LocalProjectCard = ({
|
|
|
714
727
|
onAddToWorkspace,
|
|
715
728
|
onRemoveFromWorkspace,
|
|
716
729
|
onMoveToWorkspace,
|
|
730
|
+
onTrack,
|
|
717
731
|
isLoading = false,
|
|
718
732
|
windowState = "closed",
|
|
719
733
|
compact: _compact = false,
|
|
@@ -775,6 +789,10 @@ const LocalProjectCard = ({
|
|
|
775
789
|
setIsMoving(false);
|
|
776
790
|
}
|
|
777
791
|
};
|
|
792
|
+
const handleTrackClick = (e) => {
|
|
793
|
+
e.stopPropagation();
|
|
794
|
+
onTrack == null ? void 0 : onTrack(entry);
|
|
795
|
+
};
|
|
778
796
|
const handleCopyPath = async (e) => {
|
|
779
797
|
e.stopPropagation();
|
|
780
798
|
try {
|
|
@@ -903,6 +921,49 @@ const LocalProjectCard = ({
|
|
|
903
921
|
)
|
|
904
922
|
] });
|
|
905
923
|
}
|
|
924
|
+
if (actionMode === "discovered") {
|
|
925
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
926
|
+
/* @__PURE__ */ jsxs(
|
|
927
|
+
"button",
|
|
928
|
+
{
|
|
929
|
+
type: "button",
|
|
930
|
+
onClick: handleTrackClick,
|
|
931
|
+
disabled: isLoading,
|
|
932
|
+
title: "Track this repository",
|
|
933
|
+
style: {
|
|
934
|
+
...actionButtonStyle,
|
|
935
|
+
backgroundColor: theme.colors.primary,
|
|
936
|
+
color: theme.colors.background
|
|
937
|
+
},
|
|
938
|
+
onMouseEnter: (e) => {
|
|
939
|
+
e.currentTarget.style.opacity = "0.9";
|
|
940
|
+
},
|
|
941
|
+
onMouseLeave: (e) => {
|
|
942
|
+
e.currentTarget.style.opacity = "1";
|
|
943
|
+
},
|
|
944
|
+
children: [
|
|
945
|
+
isLoading ? /* @__PURE__ */ jsx(LoaderCircle, { size: 14, className: "animate-spin" }) : /* @__PURE__ */ jsx(Plus, { size: 14 }),
|
|
946
|
+
/* @__PURE__ */ jsx("span", { children: "Track" })
|
|
947
|
+
]
|
|
948
|
+
}
|
|
949
|
+
),
|
|
950
|
+
/* @__PURE__ */ jsxs(
|
|
951
|
+
"button",
|
|
952
|
+
{
|
|
953
|
+
type: "button",
|
|
954
|
+
onClick: handleOpenClick,
|
|
955
|
+
title: "Open repository",
|
|
956
|
+
style: actionButtonStyle,
|
|
957
|
+
onMouseEnter: (e) => handleButtonHover(e),
|
|
958
|
+
onMouseLeave: (e) => handleButtonLeave(e),
|
|
959
|
+
children: [
|
|
960
|
+
/* @__PURE__ */ jsx(FolderOpen, { size: 14 }),
|
|
961
|
+
/* @__PURE__ */ jsx("span", { children: "Open" })
|
|
962
|
+
]
|
|
963
|
+
}
|
|
964
|
+
)
|
|
965
|
+
] });
|
|
966
|
+
}
|
|
906
967
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
907
968
|
/* @__PURE__ */ jsxs(
|
|
908
969
|
"button",
|
|
@@ -1038,7 +1099,29 @@ const LocalProjectCard = ({
|
|
|
1038
1099
|
size: 12,
|
|
1039
1100
|
style: { color: theme.colors.textSecondary, flexShrink: 0 }
|
|
1040
1101
|
}
|
|
1041
|
-
) })
|
|
1102
|
+
) }),
|
|
1103
|
+
actionMode === "discovered" && /* @__PURE__ */ jsxs(
|
|
1104
|
+
"span",
|
|
1105
|
+
{
|
|
1106
|
+
title: "Untracked repository",
|
|
1107
|
+
style: {
|
|
1108
|
+
display: "flex",
|
|
1109
|
+
alignItems: "center",
|
|
1110
|
+
gap: "4px",
|
|
1111
|
+
padding: "2px 6px",
|
|
1112
|
+
borderRadius: "4px",
|
|
1113
|
+
backgroundColor: `${theme.colors.warning || "#f59e0b"}20`,
|
|
1114
|
+
color: theme.colors.warning || "#f59e0b",
|
|
1115
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
1116
|
+
fontWeight: theme.fontWeights.medium,
|
|
1117
|
+
flexShrink: 0
|
|
1118
|
+
},
|
|
1119
|
+
children: [
|
|
1120
|
+
/* @__PURE__ */ jsx(GitBranch, { size: 10 }),
|
|
1121
|
+
/* @__PURE__ */ jsx("span", { children: "Untracked" })
|
|
1122
|
+
]
|
|
1123
|
+
}
|
|
1124
|
+
)
|
|
1042
1125
|
]
|
|
1043
1126
|
}
|
|
1044
1127
|
),
|
|
@@ -1113,11 +1196,12 @@ const LocalProjectsPanelContent = ({
|
|
|
1113
1196
|
events,
|
|
1114
1197
|
defaultShowSearch = false
|
|
1115
1198
|
}) => {
|
|
1116
|
-
var _a;
|
|
1199
|
+
var _a, _b;
|
|
1117
1200
|
const { theme } = useTheme();
|
|
1118
1201
|
const [filter, setFilter] = useState("");
|
|
1119
1202
|
const [showSearch, setShowSearch] = useState(defaultShowSearch);
|
|
1120
1203
|
const [isAdding, setIsAdding] = useState(false);
|
|
1204
|
+
const [isScanning, setIsScanning] = useState(false);
|
|
1121
1205
|
const [selectedEntry, setSelectedEntry] = useState(null);
|
|
1122
1206
|
const [windowStates, setWindowStates] = useState(/* @__PURE__ */ new Map());
|
|
1123
1207
|
const [sortByOrg, setSortByOrg] = useState(false);
|
|
@@ -1141,7 +1225,23 @@ const LocalProjectsPanelContent = ({
|
|
|
1141
1225
|
},
|
|
1142
1226
|
[(_a = repoSlice == null ? void 0 : repoSlice.data) == null ? void 0 : _a.repositories]
|
|
1143
1227
|
);
|
|
1228
|
+
const discoveredRepositories = useMemo(
|
|
1229
|
+
() => {
|
|
1230
|
+
var _a2;
|
|
1231
|
+
return ((_a2 = repoSlice == null ? void 0 : repoSlice.data) == null ? void 0 : _a2.discoveredRepositories) || [];
|
|
1232
|
+
},
|
|
1233
|
+
[(_b = repoSlice == null ? void 0 : repoSlice.data) == null ? void 0 : _b.discoveredRepositories]
|
|
1234
|
+
);
|
|
1144
1235
|
const loading = (repoSlice == null ? void 0 : repoSlice.loading) ?? false;
|
|
1236
|
+
const discoveredAsEntries = useMemo(() => {
|
|
1237
|
+
return discoveredRepositories.map((repo) => ({
|
|
1238
|
+
name: repo.name,
|
|
1239
|
+
path: repo.path,
|
|
1240
|
+
registeredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1241
|
+
hasViews: false,
|
|
1242
|
+
isDiscovered: true
|
|
1243
|
+
}));
|
|
1244
|
+
}, [discoveredRepositories]);
|
|
1145
1245
|
const handleOpenRepository = useCallback(
|
|
1146
1246
|
async (entry) => {
|
|
1147
1247
|
if (!panelActions.openRepository) {
|
|
@@ -1230,34 +1330,74 @@ const LocalProjectsPanelContent = ({
|
|
|
1230
1330
|
console.error("Failed to remove repository:", error);
|
|
1231
1331
|
}
|
|
1232
1332
|
};
|
|
1333
|
+
const handleTrackRepository = async (entry) => {
|
|
1334
|
+
if (!panelActions.trackRepository) {
|
|
1335
|
+
if (panelActions.registerRepository) {
|
|
1336
|
+
try {
|
|
1337
|
+
await panelActions.registerRepository(entry.name, entry.path);
|
|
1338
|
+
await context.refresh("repository", "alexandriaRepositories");
|
|
1339
|
+
} catch (error) {
|
|
1340
|
+
console.error("Failed to track repository:", error);
|
|
1341
|
+
}
|
|
1342
|
+
} else {
|
|
1343
|
+
console.warn("Track repository action not available");
|
|
1344
|
+
}
|
|
1345
|
+
return;
|
|
1346
|
+
}
|
|
1347
|
+
try {
|
|
1348
|
+
await panelActions.trackRepository(entry.name, entry.path);
|
|
1349
|
+
await context.refresh("repository", "alexandriaRepositories");
|
|
1350
|
+
} catch (error) {
|
|
1351
|
+
console.error("Failed to track repository:", error);
|
|
1352
|
+
}
|
|
1353
|
+
};
|
|
1354
|
+
const handleScanForRepos = async () => {
|
|
1355
|
+
setIsScanning(true);
|
|
1356
|
+
try {
|
|
1357
|
+
await context.refresh("repository", "alexandriaRepositories");
|
|
1358
|
+
events.emit(createPanelEvent$7(`${PANEL_ID$f}:scan-completed`, {
|
|
1359
|
+
discoveredCount: discoveredRepositories.length
|
|
1360
|
+
}));
|
|
1361
|
+
} catch (error) {
|
|
1362
|
+
console.error("Failed to scan for repositories:", error);
|
|
1363
|
+
} finally {
|
|
1364
|
+
setIsScanning(false);
|
|
1365
|
+
}
|
|
1366
|
+
};
|
|
1233
1367
|
const handleSelectRepository = (entry) => {
|
|
1234
1368
|
setSelectedEntry(entry);
|
|
1235
1369
|
events.emit(createPanelEvent$7(`${PANEL_ID$f}:repository-selected`, { entry }));
|
|
1236
1370
|
};
|
|
1237
1371
|
const normalizedFilter = filter.trim().toLowerCase();
|
|
1372
|
+
const allRepositories = useMemo(() => {
|
|
1373
|
+
const tracked = repositories.map((entry) => ({ ...entry, isDiscovered: false }));
|
|
1374
|
+
return [...tracked, ...discoveredAsEntries];
|
|
1375
|
+
}, [repositories, discoveredAsEntries]);
|
|
1238
1376
|
const filteredAndSortedRepositories = useMemo(() => {
|
|
1239
|
-
const filtered =
|
|
1240
|
-
var _a2,
|
|
1377
|
+
const filtered = allRepositories.filter((entry) => {
|
|
1378
|
+
var _a2, _b2;
|
|
1241
1379
|
if (!normalizedFilter) return true;
|
|
1242
1380
|
const haystack = [
|
|
1243
1381
|
entry.name,
|
|
1244
1382
|
((_a2 = entry.github) == null ? void 0 : _a2.name) ?? "",
|
|
1245
|
-
((
|
|
1383
|
+
((_b2 = entry.github) == null ? void 0 : _b2.owner) ?? "",
|
|
1246
1384
|
entry.remoteUrl ?? ""
|
|
1247
1385
|
].join(" ").toLowerCase();
|
|
1248
1386
|
return haystack.includes(normalizedFilter);
|
|
1249
1387
|
});
|
|
1250
1388
|
return filtered.sort((a, b) => {
|
|
1251
|
-
var _a2,
|
|
1389
|
+
var _a2, _b2;
|
|
1390
|
+
if (!a.isDiscovered && b.isDiscovered) return -1;
|
|
1391
|
+
if (a.isDiscovered && !b.isDiscovered) return 1;
|
|
1252
1392
|
if (sortByOrg) {
|
|
1253
1393
|
const aOrg = (((_a2 = a.github) == null ? void 0 : _a2.owner) ?? "").toLowerCase();
|
|
1254
|
-
const bOrg = (((
|
|
1394
|
+
const bOrg = (((_b2 = b.github) == null ? void 0 : _b2.owner) ?? "").toLowerCase();
|
|
1255
1395
|
const orgCompare = aOrg.localeCompare(bOrg);
|
|
1256
1396
|
if (orgCompare !== 0) return orgCompare;
|
|
1257
1397
|
}
|
|
1258
1398
|
return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
|
|
1259
1399
|
});
|
|
1260
|
-
}, [
|
|
1400
|
+
}, [allRepositories, normalizedFilter, sortByOrg]);
|
|
1261
1401
|
const baseContainerStyle = {
|
|
1262
1402
|
display: "flex",
|
|
1263
1403
|
flexDirection: "column",
|
|
@@ -1347,7 +1487,7 @@ const LocalProjectsPanelContent = ({
|
|
|
1347
1487
|
children: "Local Projects"
|
|
1348
1488
|
}
|
|
1349
1489
|
),
|
|
1350
|
-
|
|
1490
|
+
allRepositories.length > 0 && /* @__PURE__ */ jsx(
|
|
1351
1491
|
"span",
|
|
1352
1492
|
{
|
|
1353
1493
|
style: {
|
|
@@ -1357,7 +1497,7 @@ const LocalProjectsPanelContent = ({
|
|
|
1357
1497
|
borderRadius: "12px",
|
|
1358
1498
|
backgroundColor: theme.colors.background
|
|
1359
1499
|
},
|
|
1360
|
-
children:
|
|
1500
|
+
children: allRepositories.length
|
|
1361
1501
|
}
|
|
1362
1502
|
)
|
|
1363
1503
|
] }),
|
|
@@ -1404,6 +1544,37 @@ const LocalProjectsPanelContent = ({
|
|
|
1404
1544
|
children: sortByOrg ? /* @__PURE__ */ jsx(Building2, { size: 16 }) : /* @__PURE__ */ jsx(FolderGit2, { size: 16 })
|
|
1405
1545
|
}
|
|
1406
1546
|
),
|
|
1547
|
+
/* @__PURE__ */ jsx(
|
|
1548
|
+
"button",
|
|
1549
|
+
{
|
|
1550
|
+
onClick: handleScanForRepos,
|
|
1551
|
+
disabled: isScanning,
|
|
1552
|
+
title: "Scan for repositories",
|
|
1553
|
+
style: {
|
|
1554
|
+
padding: "4px",
|
|
1555
|
+
borderRadius: "4px",
|
|
1556
|
+
border: `1px solid ${theme.colors.border}`,
|
|
1557
|
+
backgroundColor: theme.colors.backgroundSecondary,
|
|
1558
|
+
color: theme.colors.textSecondary,
|
|
1559
|
+
cursor: isScanning ? "default" : "pointer",
|
|
1560
|
+
display: "flex",
|
|
1561
|
+
alignItems: "center",
|
|
1562
|
+
justifyContent: "center",
|
|
1563
|
+
opacity: isScanning ? 0.6 : 1,
|
|
1564
|
+
transition: "all 0.2s",
|
|
1565
|
+
flexShrink: 0
|
|
1566
|
+
},
|
|
1567
|
+
children: /* @__PURE__ */ jsx(
|
|
1568
|
+
RefreshCw,
|
|
1569
|
+
{
|
|
1570
|
+
size: 16,
|
|
1571
|
+
style: {
|
|
1572
|
+
animation: isScanning ? "spin 1s linear infinite" : "none"
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
)
|
|
1576
|
+
}
|
|
1577
|
+
),
|
|
1407
1578
|
panelActions.selectDirectory && /* @__PURE__ */ jsx(
|
|
1408
1579
|
"button",
|
|
1409
1580
|
{
|
|
@@ -1549,10 +1720,12 @@ const LocalProjectsPanelContent = ({
|
|
|
1549
1720
|
LocalProjectCard,
|
|
1550
1721
|
{
|
|
1551
1722
|
entry,
|
|
1723
|
+
actionMode: entry.isDiscovered ? "discovered" : "default",
|
|
1552
1724
|
isSelected: (selectedEntry == null ? void 0 : selectedEntry.path) === entry.path,
|
|
1553
1725
|
onSelect: handleSelectRepository,
|
|
1554
1726
|
onOpen: handleOpenRepository,
|
|
1555
|
-
onRemove: handleRemoveRepository,
|
|
1727
|
+
onRemove: entry.isDiscovered ? void 0 : handleRemoveRepository,
|
|
1728
|
+
onTrack: entry.isDiscovered ? handleTrackRepository : void 0,
|
|
1556
1729
|
windowState: windowStates.get(entry.path) || "closed"
|
|
1557
1730
|
},
|
|
1558
1731
|
entry.path
|