@industry-theme/alexandria-panels 0.1.8 → 0.1.11
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 +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/mocks/panelContext.d.ts +41 -0
- package/dist/mocks/panelContext.d.ts.map +1 -1
- package/dist/panels/GitHubProjectsPanel/GitHubProjectsPanel.stories.d.ts +34 -0
- package/dist/panels/GitHubProjectsPanel/GitHubProjectsPanel.stories.d.ts.map +1 -0
- package/dist/panels/GitHubProjectsPanel/index.d.ts +11 -0
- package/dist/panels/GitHubProjectsPanel/index.d.ts.map +1 -0
- package/dist/panels/GitHubProjectsPanel/tools.d.ts +32 -0
- package/dist/panels/GitHubProjectsPanel/tools.d.ts.map +1 -0
- package/dist/panels/GitHubProjectsPanel/types.d.ts +74 -0
- package/dist/panels/GitHubProjectsPanel/types.d.ts.map +1 -0
- package/dist/panels/GitHubStarredPanel/GitHubStarredPanel.stories.d.ts +26 -0
- package/dist/panels/GitHubStarredPanel/GitHubStarredPanel.stories.d.ts.map +1 -0
- package/dist/panels/GitHubStarredPanel/index.d.ts +12 -0
- package/dist/panels/GitHubStarredPanel/index.d.ts.map +1 -0
- package/dist/panels/GitHubStarredPanel/tools.d.ts +28 -0
- package/dist/panels/GitHubStarredPanel/tools.d.ts.map +1 -0
- package/dist/panels/GitHubStarredPanel/types.d.ts +64 -0
- package/dist/panels/GitHubStarredPanel/types.d.ts.map +1 -0
- package/dist/panels/LocalProjectsPanel/LocalProjectCard.d.ts.map +1 -1
- package/dist/panels/shared/GitHubRepositoryCard.d.ts +26 -0
- package/dist/panels/shared/GitHubRepositoryCard.d.ts.map +1 -0
- package/dist/panels/shared/github-types.d.ts +51 -0
- package/dist/panels/shared/github-types.d.ts.map +1 -0
- package/dist/panels.bundle.js +1697 -995
- package/dist/panels.bundle.js.map +1 -1
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools.bundle.js +0 -97
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/panels/DependenciesPanel/DependenciesPanel.stories.d.ts +0 -59
- package/dist/panels/DependenciesPanel/DependenciesPanel.stories.d.ts.map +0 -1
- package/dist/panels/DependenciesPanel/components/DependencyInfoModal.d.ts +0 -8
- package/dist/panels/DependenciesPanel/components/DependencyInfoModal.d.ts.map +0 -1
- package/dist/panels/DependenciesPanel/components/DependencyRow.d.ts +0 -8
- package/dist/panels/DependenciesPanel/components/DependencyRow.d.ts.map +0 -1
- package/dist/panels/DependenciesPanel/components/FilterBar.d.ts +0 -17
- package/dist/panels/DependenciesPanel/components/FilterBar.d.ts.map +0 -1
- package/dist/panels/DependenciesPanel/components/index.d.ts +0 -4
- package/dist/panels/DependenciesPanel/components/index.d.ts.map +0 -1
- package/dist/panels/DependenciesPanel/index.d.ts +0 -7
- package/dist/panels/DependenciesPanel/index.d.ts.map +0 -1
- package/dist/panels/DependenciesPanel/tools.d.ts +0 -35
- package/dist/panels/DependenciesPanel/tools.d.ts.map +0 -1
- package/dist/panels/DependenciesPanel/types.d.ts +0 -36
- package/dist/panels/DependenciesPanel/types.d.ts.map +0 -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/* 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}"));
|
|
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}"));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
@@ -140,46 +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$
|
|
144
|
-
[
|
|
145
|
-
"path",
|
|
146
|
-
{
|
|
147
|
-
d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",
|
|
148
|
-
key: "lc1i9w"
|
|
149
|
-
}
|
|
150
|
-
],
|
|
151
|
-
["path", { d: "m7 16.5-4.74-2.85", key: "1o9zyk" }],
|
|
152
|
-
["path", { d: "m7 16.5 5-3", key: "va8pkn" }],
|
|
153
|
-
["path", { d: "M7 16.5v5.17", key: "jnp8gn" }],
|
|
154
|
-
[
|
|
155
|
-
"path",
|
|
156
|
-
{
|
|
157
|
-
d: "M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",
|
|
158
|
-
key: "8zsnat"
|
|
159
|
-
}
|
|
160
|
-
],
|
|
161
|
-
["path", { d: "m17 16.5-5-3", key: "8arw3v" }],
|
|
162
|
-
["path", { d: "m17 16.5 4.74-2.85", key: "8rfmw" }],
|
|
163
|
-
["path", { d: "M17 16.5v5.17", key: "k6z78m" }],
|
|
164
|
-
[
|
|
165
|
-
"path",
|
|
166
|
-
{
|
|
167
|
-
d: "M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",
|
|
168
|
-
key: "1xygjf"
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
["path", { d: "M12 8 7.26 5.15", key: "1vbdud" }],
|
|
172
|
-
["path", { d: "m12 8 4.74-2.85", key: "3rx089" }],
|
|
173
|
-
["path", { d: "M12 13.5V8", key: "1io7kd" }]
|
|
174
|
-
];
|
|
175
|
-
const Boxes = createLucideIcon("boxes", __iconNode$l);
|
|
176
|
-
/**
|
|
177
|
-
* @license lucide-react v0.552.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/
|
|
182
|
-
const __iconNode$k = [
|
|
143
|
+
const __iconNode$q = [
|
|
183
144
|
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
184
145
|
["path", { d: "M10 8h4", key: "1sr2af" }],
|
|
185
146
|
["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
|
|
@@ -192,83 +153,111 @@ const __iconNode$k = [
|
|
|
192
153
|
],
|
|
193
154
|
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
194
155
|
];
|
|
195
|
-
const Building2 = createLucideIcon("building-2", __iconNode$
|
|
156
|
+
const Building2 = createLucideIcon("building-2", __iconNode$q);
|
|
196
157
|
/**
|
|
197
158
|
* @license lucide-react v0.552.0 - ISC
|
|
198
159
|
*
|
|
199
160
|
* This source code is licensed under the ISC license.
|
|
200
161
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
162
|
*/
|
|
202
|
-
const __iconNode$
|
|
203
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
163
|
+
const __iconNode$p = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
164
|
+
const Check = createLucideIcon("check", __iconNode$p);
|
|
204
165
|
/**
|
|
205
166
|
* @license lucide-react v0.552.0 - ISC
|
|
206
167
|
*
|
|
207
168
|
* This source code is licensed under the ISC license.
|
|
208
169
|
* See the LICENSE file in the root directory of this source tree.
|
|
209
170
|
*/
|
|
210
|
-
const __iconNode$
|
|
171
|
+
const __iconNode$o = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
172
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$o);
|
|
173
|
+
/**
|
|
174
|
+
* @license lucide-react v0.552.0 - ISC
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the ISC license.
|
|
177
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
+
*/
|
|
179
|
+
const __iconNode$n = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
180
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$n);
|
|
181
|
+
/**
|
|
182
|
+
* @license lucide-react v0.552.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/
|
|
187
|
+
const __iconNode$m = [
|
|
211
188
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
212
|
-
["
|
|
213
|
-
["
|
|
189
|
+
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
190
|
+
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
214
191
|
];
|
|
215
|
-
const
|
|
192
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$m);
|
|
216
193
|
/**
|
|
217
194
|
* @license lucide-react v0.552.0 - ISC
|
|
218
195
|
*
|
|
219
196
|
* This source code is licensed under the ISC license.
|
|
220
197
|
* See the LICENSE file in the root directory of this source tree.
|
|
221
198
|
*/
|
|
222
|
-
const __iconNode$
|
|
199
|
+
const __iconNode$l = [
|
|
223
200
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
224
201
|
["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" }]
|
|
225
202
|
];
|
|
226
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
203
|
+
const Copy = createLucideIcon("copy", __iconNode$l);
|
|
227
204
|
/**
|
|
228
205
|
* @license lucide-react v0.552.0 - ISC
|
|
229
206
|
*
|
|
230
207
|
* This source code is licensed under the ISC license.
|
|
231
208
|
* See the LICENSE file in the root directory of this source tree.
|
|
232
209
|
*/
|
|
233
|
-
const __iconNode$
|
|
210
|
+
const __iconNode$k = [
|
|
234
211
|
["path", { d: "M10 12h.01", key: "1kxr2c" }],
|
|
235
212
|
["path", { d: "M18 20V6a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v14", key: "36qu9e" }],
|
|
236
213
|
["path", { d: "M2 20h20", key: "owomy5" }]
|
|
237
214
|
];
|
|
238
|
-
const DoorClosed = createLucideIcon("door-closed", __iconNode$
|
|
215
|
+
const DoorClosed = createLucideIcon("door-closed", __iconNode$k);
|
|
239
216
|
/**
|
|
240
217
|
* @license lucide-react v0.552.0 - ISC
|
|
241
218
|
*
|
|
242
219
|
* This source code is licensed under the ISC license.
|
|
243
220
|
* See the LICENSE file in the root directory of this source tree.
|
|
244
221
|
*/
|
|
245
|
-
const __iconNode$
|
|
222
|
+
const __iconNode$j = [
|
|
223
|
+
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
224
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
225
|
+
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
226
|
+
];
|
|
227
|
+
const Download = createLucideIcon("download", __iconNode$j);
|
|
228
|
+
/**
|
|
229
|
+
* @license lucide-react v0.552.0 - ISC
|
|
230
|
+
*
|
|
231
|
+
* This source code is licensed under the ISC license.
|
|
232
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
+
*/
|
|
234
|
+
const __iconNode$i = [
|
|
246
235
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
247
236
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
248
237
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
249
238
|
];
|
|
250
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
239
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$i);
|
|
251
240
|
/**
|
|
252
241
|
* @license lucide-react v0.552.0 - ISC
|
|
253
242
|
*
|
|
254
243
|
* This source code is licensed under the ISC license.
|
|
255
244
|
* See the LICENSE file in the root directory of this source tree.
|
|
256
245
|
*/
|
|
257
|
-
const __iconNode$
|
|
246
|
+
const __iconNode$h = [
|
|
258
247
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }],
|
|
259
248
|
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
|
|
260
249
|
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
|
|
261
250
|
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
|
|
262
251
|
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }]
|
|
263
252
|
];
|
|
264
|
-
const Focus = createLucideIcon("focus", __iconNode$
|
|
253
|
+
const Focus = createLucideIcon("focus", __iconNode$h);
|
|
265
254
|
/**
|
|
266
255
|
* @license lucide-react v0.552.0 - ISC
|
|
267
256
|
*
|
|
268
257
|
* This source code is licensed under the ISC license.
|
|
269
258
|
* See the LICENSE file in the root directory of this source tree.
|
|
270
259
|
*/
|
|
271
|
-
const __iconNode$
|
|
260
|
+
const __iconNode$g = [
|
|
272
261
|
[
|
|
273
262
|
"path",
|
|
274
263
|
{
|
|
@@ -280,14 +269,14 @@ const __iconNode$d = [
|
|
|
280
269
|
["path", { d: "M18 19c-2.8 0-5-2.2-5-5v8", key: "pkpw2h" }],
|
|
281
270
|
["circle", { cx: "20", cy: "19", r: "2", key: "1obnsp" }]
|
|
282
271
|
];
|
|
283
|
-
const FolderGit2 = createLucideIcon("folder-git-2", __iconNode$
|
|
272
|
+
const FolderGit2 = createLucideIcon("folder-git-2", __iconNode$g);
|
|
284
273
|
/**
|
|
285
274
|
* @license lucide-react v0.552.0 - ISC
|
|
286
275
|
*
|
|
287
276
|
* This source code is licensed under the ISC license.
|
|
288
277
|
* See the LICENSE file in the root directory of this source tree.
|
|
289
278
|
*/
|
|
290
|
-
const __iconNode$
|
|
279
|
+
const __iconNode$f = [
|
|
291
280
|
[
|
|
292
281
|
"path",
|
|
293
282
|
{
|
|
@@ -296,14 +285,14 @@ const __iconNode$c = [
|
|
|
296
285
|
}
|
|
297
286
|
]
|
|
298
287
|
];
|
|
299
|
-
const FolderOpen = createLucideIcon("folder-open", __iconNode$
|
|
288
|
+
const FolderOpen = createLucideIcon("folder-open", __iconNode$f);
|
|
300
289
|
/**
|
|
301
290
|
* @license lucide-react v0.552.0 - ISC
|
|
302
291
|
*
|
|
303
292
|
* This source code is licensed under the ISC license.
|
|
304
293
|
* See the LICENSE file in the root directory of this source tree.
|
|
305
294
|
*/
|
|
306
|
-
const __iconNode$
|
|
295
|
+
const __iconNode$e = [
|
|
307
296
|
[
|
|
308
297
|
"path",
|
|
309
298
|
{
|
|
@@ -312,14 +301,28 @@ const __iconNode$b = [
|
|
|
312
301
|
}
|
|
313
302
|
]
|
|
314
303
|
];
|
|
315
|
-
const Folder = createLucideIcon("folder", __iconNode$
|
|
304
|
+
const Folder = createLucideIcon("folder", __iconNode$e);
|
|
305
|
+
/**
|
|
306
|
+
* @license lucide-react v0.552.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/
|
|
311
|
+
const __iconNode$d = [
|
|
312
|
+
["circle", { cx: "12", cy: "18", r: "3", key: "1mpf1b" }],
|
|
313
|
+
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
|
|
314
|
+
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
315
|
+
["path", { d: "M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9", key: "1uq4wg" }],
|
|
316
|
+
["path", { d: "M12 12v3", key: "158kv8" }]
|
|
317
|
+
];
|
|
318
|
+
const GitFork = createLucideIcon("git-fork", __iconNode$d);
|
|
316
319
|
/**
|
|
317
320
|
* @license lucide-react v0.552.0 - ISC
|
|
318
321
|
*
|
|
319
322
|
* This source code is licensed under the ISC license.
|
|
320
323
|
* See the LICENSE file in the root directory of this source tree.
|
|
321
324
|
*/
|
|
322
|
-
const __iconNode$
|
|
325
|
+
const __iconNode$c = [
|
|
323
326
|
["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
|
|
324
327
|
[
|
|
325
328
|
"path",
|
|
@@ -329,14 +332,14 @@ const __iconNode$a = [
|
|
|
329
332
|
}
|
|
330
333
|
]
|
|
331
334
|
];
|
|
332
|
-
const House = createLucideIcon("house", __iconNode$
|
|
335
|
+
const House = createLucideIcon("house", __iconNode$c);
|
|
333
336
|
/**
|
|
334
337
|
* @license lucide-react v0.552.0 - ISC
|
|
335
338
|
*
|
|
336
339
|
* This source code is licensed under the ISC license.
|
|
337
340
|
* See the LICENSE file in the root directory of this source tree.
|
|
338
341
|
*/
|
|
339
|
-
const __iconNode$
|
|
342
|
+
const __iconNode$b = [
|
|
340
343
|
[
|
|
341
344
|
"path",
|
|
342
345
|
{
|
|
@@ -359,52 +362,44 @@ const __iconNode$9 = [
|
|
|
359
362
|
}
|
|
360
363
|
]
|
|
361
364
|
];
|
|
362
|
-
const Layers = createLucideIcon("layers", __iconNode$
|
|
365
|
+
const Layers = createLucideIcon("layers", __iconNode$b);
|
|
363
366
|
/**
|
|
364
367
|
* @license lucide-react v0.552.0 - ISC
|
|
365
368
|
*
|
|
366
369
|
* This source code is licensed under the ISC license.
|
|
367
370
|
* See the LICENSE file in the root directory of this source tree.
|
|
368
371
|
*/
|
|
369
|
-
const __iconNode$
|
|
370
|
-
const LoaderCircle = createLucideIcon("loader-circle", __iconNode$
|
|
372
|
+
const __iconNode$a = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
373
|
+
const LoaderCircle = createLucideIcon("loader-circle", __iconNode$a);
|
|
371
374
|
/**
|
|
372
375
|
* @license lucide-react v0.552.0 - ISC
|
|
373
376
|
*
|
|
374
377
|
* This source code is licensed under the ISC license.
|
|
375
378
|
* See the LICENSE file in the root directory of this source tree.
|
|
376
379
|
*/
|
|
377
|
-
const __iconNode$
|
|
378
|
-
["
|
|
379
|
-
["path", { d: "
|
|
380
|
+
const __iconNode$9 = [
|
|
381
|
+
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
382
|
+
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
380
383
|
];
|
|
381
|
-
const
|
|
384
|
+
const Lock = createLucideIcon("lock", __iconNode$9);
|
|
382
385
|
/**
|
|
383
386
|
* @license lucide-react v0.552.0 - ISC
|
|
384
387
|
*
|
|
385
388
|
* This source code is licensed under the ISC license.
|
|
386
389
|
* See the LICENSE file in the root directory of this source tree.
|
|
387
390
|
*/
|
|
388
|
-
const __iconNode$
|
|
389
|
-
[
|
|
390
|
-
|
|
391
|
-
{
|
|
392
|
-
d: "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",
|
|
393
|
-
key: "1a0edw"
|
|
394
|
-
}
|
|
395
|
-
],
|
|
396
|
-
["path", { d: "M12 22V12", key: "d0xqtd" }],
|
|
397
|
-
["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
|
|
398
|
-
["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }]
|
|
391
|
+
const __iconNode$8 = [
|
|
392
|
+
["path", { d: "M8 6L12 2L16 6", key: "1yvkyx" }],
|
|
393
|
+
["path", { d: "M12 2V22", key: "r89rzk" }]
|
|
399
394
|
];
|
|
400
|
-
const
|
|
395
|
+
const MoveUp = createLucideIcon("move-up", __iconNode$8);
|
|
401
396
|
/**
|
|
402
397
|
* @license lucide-react v0.552.0 - ISC
|
|
403
398
|
*
|
|
404
399
|
* This source code is licensed under the ISC license.
|
|
405
400
|
* See the LICENSE file in the root directory of this source tree.
|
|
406
401
|
*/
|
|
407
|
-
const __iconNode$
|
|
402
|
+
const __iconNode$7 = [
|
|
408
403
|
[
|
|
409
404
|
"path",
|
|
410
405
|
{
|
|
@@ -413,57 +408,81 @@ const __iconNode$5 = [
|
|
|
413
408
|
}
|
|
414
409
|
]
|
|
415
410
|
];
|
|
416
|
-
const Pen = createLucideIcon("pen", __iconNode$
|
|
411
|
+
const Pen = createLucideIcon("pen", __iconNode$7);
|
|
417
412
|
/**
|
|
418
413
|
* @license lucide-react v0.552.0 - ISC
|
|
419
414
|
*
|
|
420
415
|
* This source code is licensed under the ISC license.
|
|
421
416
|
* See the LICENSE file in the root directory of this source tree.
|
|
422
417
|
*/
|
|
423
|
-
const __iconNode$
|
|
418
|
+
const __iconNode$6 = [
|
|
424
419
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
425
420
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
426
421
|
];
|
|
427
|
-
const Plus = createLucideIcon("plus", __iconNode$
|
|
422
|
+
const Plus = createLucideIcon("plus", __iconNode$6);
|
|
428
423
|
/**
|
|
429
424
|
* @license lucide-react v0.552.0 - ISC
|
|
430
425
|
*
|
|
431
426
|
* This source code is licensed under the ISC license.
|
|
432
427
|
* See the LICENSE file in the root directory of this source tree.
|
|
433
428
|
*/
|
|
434
|
-
const __iconNode$
|
|
435
|
-
["path", { d: "
|
|
436
|
-
["path", { d: "
|
|
437
|
-
["path", { d: "M7 21h10", key: "1b0cd5" }],
|
|
438
|
-
["path", { d: "M12 3v18", key: "108xh3" }],
|
|
439
|
-
["path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2", key: "3gwbw2" }]
|
|
429
|
+
const __iconNode$5 = [
|
|
430
|
+
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
431
|
+
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
440
432
|
];
|
|
441
|
-
const
|
|
433
|
+
const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$5);
|
|
442
434
|
/**
|
|
443
435
|
* @license lucide-react v0.552.0 - ISC
|
|
444
436
|
*
|
|
445
437
|
* This source code is licensed under the ISC license.
|
|
446
438
|
* See the LICENSE file in the root directory of this source tree.
|
|
447
439
|
*/
|
|
448
|
-
const __iconNode$
|
|
440
|
+
const __iconNode$4 = [
|
|
449
441
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
450
442
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
451
443
|
];
|
|
452
|
-
const Search = createLucideIcon("search", __iconNode$
|
|
444
|
+
const Search = createLucideIcon("search", __iconNode$4);
|
|
453
445
|
/**
|
|
454
446
|
* @license lucide-react v0.552.0 - ISC
|
|
455
447
|
*
|
|
456
448
|
* This source code is licensed under the ISC license.
|
|
457
449
|
* See the LICENSE file in the root directory of this source tree.
|
|
458
450
|
*/
|
|
459
|
-
const __iconNode$
|
|
451
|
+
const __iconNode$3 = [
|
|
452
|
+
[
|
|
453
|
+
"path",
|
|
454
|
+
{
|
|
455
|
+
d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
|
|
456
|
+
key: "r04s7s"
|
|
457
|
+
}
|
|
458
|
+
]
|
|
459
|
+
];
|
|
460
|
+
const Star = createLucideIcon("star", __iconNode$3);
|
|
461
|
+
/**
|
|
462
|
+
* @license lucide-react v0.552.0 - ISC
|
|
463
|
+
*
|
|
464
|
+
* This source code is licensed under the ISC license.
|
|
465
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
466
|
+
*/
|
|
467
|
+
const __iconNode$2 = [
|
|
460
468
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
461
469
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
462
470
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
463
471
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
464
472
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
465
473
|
];
|
|
466
|
-
const Trash2 = createLucideIcon("trash-2", __iconNode$
|
|
474
|
+
const Trash2 = createLucideIcon("trash-2", __iconNode$2);
|
|
475
|
+
/**
|
|
476
|
+
* @license lucide-react v0.552.0 - ISC
|
|
477
|
+
*
|
|
478
|
+
* This source code is licensed under the ISC license.
|
|
479
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
480
|
+
*/
|
|
481
|
+
const __iconNode$1 = [
|
|
482
|
+
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
483
|
+
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
484
|
+
];
|
|
485
|
+
const User = createLucideIcon("user", __iconNode$1);
|
|
467
486
|
/**
|
|
468
487
|
* @license lucide-react v0.552.0 - ISC
|
|
469
488
|
*
|
|
@@ -546,7 +565,7 @@ const LANGUAGE_COLORS = {
|
|
|
546
565
|
Shell: "#89e051",
|
|
547
566
|
PowerShell: "#012456"
|
|
548
567
|
};
|
|
549
|
-
const getLanguageColor = (language) => {
|
|
568
|
+
const getLanguageColor$1 = (language) => {
|
|
550
569
|
return LANGUAGE_COLORS[language] || "#6e7681";
|
|
551
570
|
};
|
|
552
571
|
const LocalProjectCard = ({
|
|
@@ -566,7 +585,7 @@ const LocalProjectCard = ({
|
|
|
566
585
|
workspacePath,
|
|
567
586
|
userHomePath
|
|
568
587
|
}) => {
|
|
569
|
-
var _a, _b, _c, _d, _e;
|
|
588
|
+
var _a, _b, _c, _d, _e, _f;
|
|
570
589
|
const { theme } = useTheme();
|
|
571
590
|
const [isHovered, setIsHovered] = useState(false);
|
|
572
591
|
const [copiedPath, setCopiedPath] = useState(false);
|
|
@@ -863,6 +882,7 @@ const LocalProjectCard = ({
|
|
|
863
882
|
children: /* @__PURE__ */ jsx(
|
|
864
883
|
"span",
|
|
865
884
|
{
|
|
885
|
+
className: ((_c = entry.github) == null ? void 0 : _c.primaryLanguage) ? "project-name-underline" : void 0,
|
|
866
886
|
style: {
|
|
867
887
|
flex: 1,
|
|
868
888
|
fontSize: `${theme.fontSizes[2]}px`,
|
|
@@ -871,9 +891,7 @@ const LocalProjectCard = ({
|
|
|
871
891
|
overflow: "hidden",
|
|
872
892
|
textOverflow: "ellipsis",
|
|
873
893
|
whiteSpace: "nowrap",
|
|
874
|
-
|
|
875
|
-
textDecorationColor: ((_c = entry.github) == null ? void 0 : _c.primaryLanguage) ? getLanguageColor(entry.github.primaryLanguage) : theme.colors.textSecondary,
|
|
876
|
-
textUnderlineOffset: "3px"
|
|
894
|
+
"--underline-color": ((_d = entry.github) == null ? void 0 : _d.primaryLanguage) ? getLanguageColor$1(entry.github.primaryLanguage) : theme.colors.textSecondary
|
|
877
895
|
},
|
|
878
896
|
children: entry.name
|
|
879
897
|
}
|
|
@@ -905,8 +923,8 @@ const LocalProjectCard = ({
|
|
|
905
923
|
opacity: isHovered ? 0 : 1,
|
|
906
924
|
transition: "opacity 0.15s ease"
|
|
907
925
|
},
|
|
908
|
-
title: ((
|
|
909
|
-
children: ((
|
|
926
|
+
title: ((_e = entry.github) == null ? void 0 : _e.description) || displayPath,
|
|
927
|
+
children: ((_f = entry.github) == null ? void 0 : _f.description) || displayPath
|
|
910
928
|
}
|
|
911
929
|
),
|
|
912
930
|
/* @__PURE__ */ jsx(
|
|
@@ -938,10 +956,10 @@ const LocalProjectCard = ({
|
|
|
938
956
|
}
|
|
939
957
|
);
|
|
940
958
|
};
|
|
941
|
-
const PANEL_ID$
|
|
942
|
-
const createPanelEvent$
|
|
959
|
+
const PANEL_ID$9 = "industry-theme.local-projects";
|
|
960
|
+
const createPanelEvent$4 = (type, payload) => ({
|
|
943
961
|
type,
|
|
944
|
-
source: PANEL_ID$
|
|
962
|
+
source: PANEL_ID$9,
|
|
945
963
|
timestamp: Date.now(),
|
|
946
964
|
payload
|
|
947
965
|
});
|
|
@@ -977,7 +995,7 @@ const LocalProjectsPanelContent = ({
|
|
|
977
995
|
try {
|
|
978
996
|
await panelActions.openRepository(entry);
|
|
979
997
|
setWindowStates((prev) => new Map(prev).set(entry.path, "ready"));
|
|
980
|
-
events.emit(createPanelEvent$
|
|
998
|
+
events.emit(createPanelEvent$4(`${PANEL_ID$9}:repository-opened`, { entry }));
|
|
981
999
|
} catch (error) {
|
|
982
1000
|
console.error("Error opening repository:", error);
|
|
983
1001
|
setWindowStates((prev) => new Map(prev).set(entry.path, "closed"));
|
|
@@ -988,14 +1006,14 @@ const LocalProjectsPanelContent = ({
|
|
|
988
1006
|
useEffect(() => {
|
|
989
1007
|
const unsubscribers = [
|
|
990
1008
|
// Filter event from tools
|
|
991
|
-
events.on(`${PANEL_ID$
|
|
1009
|
+
events.on(`${PANEL_ID$9}:filter`, (event) => {
|
|
992
1010
|
var _a2;
|
|
993
1011
|
if (((_a2 = event.payload) == null ? void 0 : _a2.filter) !== void 0) {
|
|
994
1012
|
setFilter(event.payload.filter);
|
|
995
1013
|
}
|
|
996
1014
|
}),
|
|
997
1015
|
// Select repository event from tools
|
|
998
|
-
events.on(`${PANEL_ID$
|
|
1016
|
+
events.on(`${PANEL_ID$9}:select-repository`, (event) => {
|
|
999
1017
|
var _a2;
|
|
1000
1018
|
const identifier = (_a2 = event.payload) == null ? void 0 : _a2.identifier;
|
|
1001
1019
|
if (identifier) {
|
|
@@ -1004,12 +1022,12 @@ const LocalProjectsPanelContent = ({
|
|
|
1004
1022
|
);
|
|
1005
1023
|
if (entry) {
|
|
1006
1024
|
setSelectedEntry(entry);
|
|
1007
|
-
events.emit(createPanelEvent$
|
|
1025
|
+
events.emit(createPanelEvent$4(`${PANEL_ID$9}:repository-selected`, { entry }));
|
|
1008
1026
|
}
|
|
1009
1027
|
}
|
|
1010
1028
|
}),
|
|
1011
1029
|
// Open repository event from tools
|
|
1012
|
-
events.on(`${PANEL_ID$
|
|
1030
|
+
events.on(`${PANEL_ID$9}:open-repository`, (event) => {
|
|
1013
1031
|
var _a2;
|
|
1014
1032
|
const identifier = (_a2 = event.payload) == null ? void 0 : _a2.identifier;
|
|
1015
1033
|
if (identifier) {
|
|
@@ -1057,7 +1075,7 @@ const LocalProjectsPanelContent = ({
|
|
|
1057
1075
|
};
|
|
1058
1076
|
const handleSelectRepository = (entry) => {
|
|
1059
1077
|
setSelectedEntry(entry);
|
|
1060
|
-
events.emit(createPanelEvent$
|
|
1078
|
+
events.emit(createPanelEvent$4(`${PANEL_ID$9}:repository-selected`, { entry }));
|
|
1061
1079
|
};
|
|
1062
1080
|
const normalizedFilter = filter.trim().toLowerCase();
|
|
1063
1081
|
const filteredAndSortedRepositories = useMemo(() => {
|
|
@@ -1318,10 +1336,10 @@ const LocalProjectsPanelPreview = () => {
|
|
|
1318
1336
|
}
|
|
1319
1337
|
);
|
|
1320
1338
|
};
|
|
1321
|
-
const PANEL_ID$
|
|
1322
|
-
const createPanelEvent$
|
|
1339
|
+
const PANEL_ID$8 = "industry-theme.workspace-repositories";
|
|
1340
|
+
const createPanelEvent$3 = (type, payload) => ({
|
|
1323
1341
|
type,
|
|
1324
|
-
source: PANEL_ID$
|
|
1342
|
+
source: PANEL_ID$8,
|
|
1325
1343
|
timestamp: Date.now(),
|
|
1326
1344
|
payload
|
|
1327
1345
|
});
|
|
@@ -1386,7 +1404,7 @@ const WorkspaceRepositoriesPanelContent = ({
|
|
|
1386
1404
|
(repository) => {
|
|
1387
1405
|
var _a;
|
|
1388
1406
|
events.emit(
|
|
1389
|
-
createPanelEvent$
|
|
1407
|
+
createPanelEvent$3("repository:selected", {
|
|
1390
1408
|
repositoryId: ((_a = repository.github) == null ? void 0 : _a.id) || repository.name,
|
|
1391
1409
|
repository,
|
|
1392
1410
|
repositoryPath: repository.path
|
|
@@ -1399,7 +1417,7 @@ const WorkspaceRepositoriesPanelContent = ({
|
|
|
1399
1417
|
(repository) => {
|
|
1400
1418
|
var _a;
|
|
1401
1419
|
events.emit(
|
|
1402
|
-
createPanelEvent$
|
|
1420
|
+
createPanelEvent$3("repository:opened", {
|
|
1403
1421
|
repositoryId: ((_a = repository.github) == null ? void 0 : _a.id) || repository.name,
|
|
1404
1422
|
repository
|
|
1405
1423
|
})
|
|
@@ -1440,7 +1458,7 @@ const WorkspaceRepositoriesPanelContent = ({
|
|
|
1440
1458
|
);
|
|
1441
1459
|
useEffect(() => {
|
|
1442
1460
|
const unsubscribers = [
|
|
1443
|
-
events.on(`${PANEL_ID$
|
|
1461
|
+
events.on(`${PANEL_ID$8}:select-repository`, (event) => {
|
|
1444
1462
|
var _a;
|
|
1445
1463
|
const path = (_a = event.payload) == null ? void 0 : _a.repositoryPath;
|
|
1446
1464
|
if (path) {
|
|
@@ -1450,7 +1468,7 @@ const WorkspaceRepositoriesPanelContent = ({
|
|
|
1450
1468
|
}
|
|
1451
1469
|
}
|
|
1452
1470
|
}),
|
|
1453
|
-
events.on(`${PANEL_ID$
|
|
1471
|
+
events.on(`${PANEL_ID$8}:open-repository`, (event) => {
|
|
1454
1472
|
var _a;
|
|
1455
1473
|
const path = (_a = event.payload) == null ? void 0 : _a.repositoryPath;
|
|
1456
1474
|
if (path) {
|
|
@@ -2139,10 +2157,10 @@ const WorkspaceCard = ({
|
|
|
2139
2157
|
}
|
|
2140
2158
|
);
|
|
2141
2159
|
};
|
|
2142
|
-
const PANEL_ID$
|
|
2143
|
-
const createPanelEvent = (type, payload) => ({
|
|
2160
|
+
const PANEL_ID$7 = "industry-theme.workspaces-list";
|
|
2161
|
+
const createPanelEvent$2 = (type, payload) => ({
|
|
2144
2162
|
type,
|
|
2145
|
-
source: PANEL_ID$
|
|
2163
|
+
source: PANEL_ID$7,
|
|
2146
2164
|
timestamp: Date.now(),
|
|
2147
2165
|
payload
|
|
2148
2166
|
});
|
|
@@ -2218,7 +2236,7 @@ const WorkspacesListPanelContent = ({
|
|
|
2218
2236
|
(workspace) => {
|
|
2219
2237
|
setSelectedWorkspaceId(workspace.id);
|
|
2220
2238
|
events.emit(
|
|
2221
|
-
createPanelEvent(`${PANEL_ID$
|
|
2239
|
+
createPanelEvent$2(`${PANEL_ID$7}:workspace:selected`, {
|
|
2222
2240
|
workspaceId: workspace.id,
|
|
2223
2241
|
workspace
|
|
2224
2242
|
})
|
|
@@ -2235,7 +2253,7 @@ const WorkspacesListPanelContent = ({
|
|
|
2235
2253
|
try {
|
|
2236
2254
|
await panelActions.openWorkspace(workspace.id);
|
|
2237
2255
|
events.emit(
|
|
2238
|
-
createPanelEvent(`${PANEL_ID$
|
|
2256
|
+
createPanelEvent$2(`${PANEL_ID$7}:workspace:opened`, {
|
|
2239
2257
|
workspaceId: workspace.id,
|
|
2240
2258
|
workspace
|
|
2241
2259
|
})
|
|
@@ -2259,7 +2277,7 @@ const WorkspacesListPanelContent = ({
|
|
|
2259
2277
|
try {
|
|
2260
2278
|
await panelActions.deleteWorkspace(workspace.id);
|
|
2261
2279
|
events.emit(
|
|
2262
|
-
createPanelEvent(`${PANEL_ID$
|
|
2280
|
+
createPanelEvent$2(`${PANEL_ID$7}:workspace:deleted`, {
|
|
2263
2281
|
workspaceId: workspace.id
|
|
2264
2282
|
})
|
|
2265
2283
|
);
|
|
@@ -2292,7 +2310,7 @@ const WorkspacesListPanelContent = ({
|
|
|
2292
2310
|
setIsCreating(true);
|
|
2293
2311
|
const workspace = await panelActions.createWorkspace(name.trim());
|
|
2294
2312
|
events.emit(
|
|
2295
|
-
createPanelEvent(`${PANEL_ID$
|
|
2313
|
+
createPanelEvent$2(`${PANEL_ID$7}:workspace:created`, {
|
|
2296
2314
|
workspaceId: workspace.id,
|
|
2297
2315
|
workspace
|
|
2298
2316
|
})
|
|
@@ -2307,7 +2325,7 @@ const WorkspacesListPanelContent = ({
|
|
|
2307
2325
|
useEffect(() => {
|
|
2308
2326
|
const unsubscribers = [
|
|
2309
2327
|
// Select workspace event from tools
|
|
2310
|
-
events.on(`${PANEL_ID$
|
|
2328
|
+
events.on(`${PANEL_ID$7}:select-workspace`, (event) => {
|
|
2311
2329
|
var _a2;
|
|
2312
2330
|
const workspaceId = (_a2 = event.payload) == null ? void 0 : _a2.workspaceId;
|
|
2313
2331
|
if (workspaceId) {
|
|
@@ -2318,7 +2336,7 @@ const WorkspacesListPanelContent = ({
|
|
|
2318
2336
|
}
|
|
2319
2337
|
}),
|
|
2320
2338
|
// Open workspace event from tools
|
|
2321
|
-
events.on(`${PANEL_ID$
|
|
2339
|
+
events.on(`${PANEL_ID$7}:open-workspace`, (event) => {
|
|
2322
2340
|
var _a2;
|
|
2323
2341
|
const workspaceId = (_a2 = event.payload) == null ? void 0 : _a2.workspaceId;
|
|
2324
2342
|
if (workspaceId) {
|
|
@@ -2330,14 +2348,14 @@ const WorkspacesListPanelContent = ({
|
|
|
2330
2348
|
}),
|
|
2331
2349
|
// Create workspace event from tools
|
|
2332
2350
|
events.on(
|
|
2333
|
-
`${PANEL_ID$
|
|
2351
|
+
`${PANEL_ID$7}:create-workspace`,
|
|
2334
2352
|
async (event) => {
|
|
2335
2353
|
const { name, description } = event.payload || {};
|
|
2336
2354
|
if (name && panelActions.createWorkspace) {
|
|
2337
2355
|
try {
|
|
2338
2356
|
const workspace = await panelActions.createWorkspace(name, { description });
|
|
2339
2357
|
events.emit(
|
|
2340
|
-
createPanelEvent(`${PANEL_ID$
|
|
2358
|
+
createPanelEvent$2(`${PANEL_ID$7}:workspace:created`, {
|
|
2341
2359
|
workspaceId: workspace.id,
|
|
2342
2360
|
workspace
|
|
2343
2361
|
})
|
|
@@ -2624,929 +2642,1445 @@ const WorkspacesListPanelPreview = () => {
|
|
|
2624
2642
|
}
|
|
2625
2643
|
);
|
|
2626
2644
|
};
|
|
2627
|
-
const
|
|
2628
|
-
|
|
2629
|
-
|
|
2645
|
+
const GitHubRepositoryCard = ({
|
|
2646
|
+
repository,
|
|
2647
|
+
localRepo,
|
|
2648
|
+
onClone,
|
|
2649
|
+
onOpen,
|
|
2650
|
+
isLoading = false,
|
|
2651
|
+
isSelected = false,
|
|
2652
|
+
onSelect
|
|
2630
2653
|
}) => {
|
|
2631
2654
|
const { theme } = useTheme();
|
|
2632
|
-
|
|
2633
|
-
|
|
2655
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
2656
|
+
const isCloned = Boolean(localRepo);
|
|
2657
|
+
const handleClone = useCallback(
|
|
2658
|
+
(e) => {
|
|
2659
|
+
e.stopPropagation();
|
|
2660
|
+
if (onClone && !isLoading) {
|
|
2661
|
+
onClone(repository);
|
|
2662
|
+
}
|
|
2663
|
+
},
|
|
2664
|
+
[onClone, repository, isLoading]
|
|
2665
|
+
);
|
|
2666
|
+
const handleOpen = useCallback(
|
|
2667
|
+
(e) => {
|
|
2668
|
+
e.stopPropagation();
|
|
2669
|
+
if (onOpen && localRepo && !isLoading) {
|
|
2670
|
+
onOpen(localRepo.path);
|
|
2671
|
+
}
|
|
2672
|
+
},
|
|
2673
|
+
[onOpen, localRepo, isLoading]
|
|
2674
|
+
);
|
|
2675
|
+
const handleClick = useCallback(() => {
|
|
2676
|
+
if (onSelect) {
|
|
2677
|
+
onSelect(repository);
|
|
2678
|
+
}
|
|
2679
|
+
}, [onSelect, repository]);
|
|
2680
|
+
const handleOpenOnGitHub = useCallback(
|
|
2681
|
+
(e) => {
|
|
2682
|
+
e.stopPropagation();
|
|
2683
|
+
window.open(repository.html_url, "_blank", "noopener,noreferrer");
|
|
2684
|
+
},
|
|
2685
|
+
[repository.html_url]
|
|
2686
|
+
);
|
|
2687
|
+
const getRelativeTime = (dateString) => {
|
|
2688
|
+
const date = new Date(dateString);
|
|
2689
|
+
const now = /* @__PURE__ */ new Date();
|
|
2690
|
+
const diffMs = now.getTime() - date.getTime();
|
|
2691
|
+
const diffDays = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
|
|
2692
|
+
if (diffDays === 0) return "today";
|
|
2693
|
+
if (diffDays === 1) return "yesterday";
|
|
2694
|
+
if (diffDays < 7) return `${diffDays} days ago`;
|
|
2695
|
+
if (diffDays < 30) return `${Math.floor(diffDays / 7)} weeks ago`;
|
|
2696
|
+
if (diffDays < 365) return `${Math.floor(diffDays / 30)} months ago`;
|
|
2697
|
+
return `${Math.floor(diffDays / 365)} years ago`;
|
|
2698
|
+
};
|
|
2699
|
+
return /* @__PURE__ */ jsxs(
|
|
2634
2700
|
"div",
|
|
2635
2701
|
{
|
|
2702
|
+
onClick: handleClick,
|
|
2703
|
+
onMouseEnter: () => setIsHovered(true),
|
|
2704
|
+
onMouseLeave: () => setIsHovered(false),
|
|
2636
2705
|
style: {
|
|
2637
|
-
position: "fixed",
|
|
2638
|
-
top: 0,
|
|
2639
|
-
left: 0,
|
|
2640
|
-
right: 0,
|
|
2641
|
-
bottom: 0,
|
|
2642
|
-
backgroundColor: theme.colors.muted,
|
|
2643
|
-
zIndex: theme.zIndices[4],
|
|
2644
2706
|
display: "flex",
|
|
2645
|
-
alignItems: "
|
|
2646
|
-
|
|
2707
|
+
alignItems: "flex-start",
|
|
2708
|
+
gap: "12px",
|
|
2709
|
+
padding: "12px",
|
|
2710
|
+
borderRadius: "8px",
|
|
2711
|
+
backgroundColor: isSelected ? `${theme.colors.primary}15` : isHovered ? theme.colors.backgroundTertiary : "transparent",
|
|
2712
|
+
border: `1px solid ${isSelected ? theme.colors.primary : "transparent"}`,
|
|
2713
|
+
cursor: onSelect ? "pointer" : "default",
|
|
2714
|
+
transition: "background-color 0.15s, border-color 0.15s"
|
|
2647
2715
|
},
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2716
|
+
children: [
|
|
2717
|
+
/* @__PURE__ */ jsx(
|
|
2718
|
+
RepositoryAvatar,
|
|
2719
|
+
{
|
|
2720
|
+
owner: repository.owner.login,
|
|
2721
|
+
customAvatarUrl: repository.owner.avatar_url,
|
|
2722
|
+
size: 40
|
|
2723
|
+
}
|
|
2724
|
+
),
|
|
2725
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
2726
|
+
/* @__PURE__ */ jsxs(
|
|
2727
|
+
"div",
|
|
2728
|
+
{
|
|
2729
|
+
style: {
|
|
2730
|
+
display: "flex",
|
|
2731
|
+
alignItems: "center",
|
|
2732
|
+
gap: "8px",
|
|
2733
|
+
marginBottom: "4px"
|
|
2734
|
+
},
|
|
2735
|
+
children: [
|
|
2736
|
+
/* @__PURE__ */ jsx(
|
|
2737
|
+
"span",
|
|
2738
|
+
{
|
|
2739
|
+
style: {
|
|
2740
|
+
fontSize: `${theme.fontSizes[2]}px`,
|
|
2741
|
+
fontWeight: theme.fontWeights.semibold,
|
|
2742
|
+
fontFamily: theme.fonts.body,
|
|
2743
|
+
color: isCloned ? "#10b981" : theme.colors.text,
|
|
2744
|
+
overflow: "hidden",
|
|
2745
|
+
textOverflow: "ellipsis",
|
|
2746
|
+
whiteSpace: "nowrap"
|
|
2747
|
+
},
|
|
2748
|
+
title: repository.full_name,
|
|
2749
|
+
children: repository.name
|
|
2750
|
+
}
|
|
2751
|
+
),
|
|
2752
|
+
repository.private && /* @__PURE__ */ jsx("span", { title: "Private repository", children: /* @__PURE__ */ jsx(
|
|
2753
|
+
Lock,
|
|
2754
|
+
{
|
|
2755
|
+
size: 12,
|
|
2756
|
+
style: { color: theme.colors.textSecondary, flexShrink: 0 }
|
|
2757
|
+
}
|
|
2758
|
+
) }),
|
|
2759
|
+
repository.fork && /* @__PURE__ */ jsx("span", { title: "Forked repository", children: /* @__PURE__ */ jsx(
|
|
2760
|
+
GitFork,
|
|
2761
|
+
{
|
|
2762
|
+
size: 12,
|
|
2763
|
+
style: { color: theme.colors.textSecondary, flexShrink: 0 }
|
|
2764
|
+
}
|
|
2765
|
+
) })
|
|
2766
|
+
]
|
|
2767
|
+
}
|
|
2768
|
+
),
|
|
2769
|
+
/* @__PURE__ */ jsx(
|
|
2770
|
+
"div",
|
|
2771
|
+
{
|
|
2772
|
+
style: {
|
|
2773
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
2774
|
+
fontFamily: theme.fonts.body,
|
|
2775
|
+
color: theme.colors.textSecondary,
|
|
2776
|
+
marginBottom: "4px"
|
|
2777
|
+
},
|
|
2778
|
+
children: repository.owner.login
|
|
2779
|
+
}
|
|
2780
|
+
),
|
|
2781
|
+
repository.description && /* @__PURE__ */ jsx(
|
|
2782
|
+
"div",
|
|
2783
|
+
{
|
|
2784
|
+
style: {
|
|
2785
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
2786
|
+
fontFamily: theme.fonts.body,
|
|
2787
|
+
color: theme.colors.textSecondary,
|
|
2788
|
+
lineHeight: theme.lineHeights.body,
|
|
2789
|
+
overflow: "hidden",
|
|
2790
|
+
textOverflow: "ellipsis",
|
|
2791
|
+
display: "-webkit-box",
|
|
2792
|
+
WebkitLineClamp: 2,
|
|
2793
|
+
WebkitBoxOrient: "vertical",
|
|
2794
|
+
marginBottom: "8px"
|
|
2795
|
+
},
|
|
2796
|
+
children: repository.description
|
|
2797
|
+
}
|
|
2798
|
+
),
|
|
2799
|
+
/* @__PURE__ */ jsxs(
|
|
2800
|
+
"div",
|
|
2801
|
+
{
|
|
2802
|
+
style: {
|
|
2803
|
+
display: "flex",
|
|
2804
|
+
alignItems: "center",
|
|
2805
|
+
gap: "12px",
|
|
2806
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
2807
|
+
fontFamily: theme.fonts.body,
|
|
2808
|
+
color: theme.colors.textSecondary
|
|
2809
|
+
},
|
|
2810
|
+
children: [
|
|
2811
|
+
repository.language && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
2694
2812
|
/* @__PURE__ */ jsx(
|
|
2695
|
-
"
|
|
2813
|
+
"span",
|
|
2696
2814
|
{
|
|
2697
|
-
onClick: onClose,
|
|
2698
2815
|
style: {
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
},
|
|
2705
|
-
children: /* @__PURE__ */ jsx(X, { size: 20 })
|
|
2706
|
-
}
|
|
2707
|
-
)
|
|
2708
|
-
]
|
|
2709
|
-
}
|
|
2710
|
-
),
|
|
2711
|
-
/* @__PURE__ */ jsxs(
|
|
2712
|
-
"div",
|
|
2713
|
-
{
|
|
2714
|
-
style: {
|
|
2715
|
-
padding: `${theme.space[4]}px`,
|
|
2716
|
-
overflow: "auto",
|
|
2717
|
-
flex: 1
|
|
2718
|
-
},
|
|
2719
|
-
children: [
|
|
2720
|
-
/* @__PURE__ */ jsxs(
|
|
2721
|
-
Section,
|
|
2722
|
-
{
|
|
2723
|
-
icon: /* @__PURE__ */ jsx(Package, { size: 18 }),
|
|
2724
|
-
title: "Dependency Types",
|
|
2725
|
-
theme,
|
|
2726
|
-
children: [
|
|
2727
|
-
/* @__PURE__ */ jsx(
|
|
2728
|
-
InfoItem,
|
|
2729
|
-
{
|
|
2730
|
-
badge: { text: "prod", color: theme.colors.primary },
|
|
2731
|
-
title: "Production Dependencies",
|
|
2732
|
-
description: "Required for your application to run in production. These are bundled with your app and affect its size and security.",
|
|
2733
|
-
theme
|
|
2734
|
-
}
|
|
2735
|
-
),
|
|
2736
|
-
/* @__PURE__ */ jsx(
|
|
2737
|
-
InfoItem,
|
|
2738
|
-
{
|
|
2739
|
-
badge: { text: "dev", color: theme.colors.secondary },
|
|
2740
|
-
title: "Development Dependencies",
|
|
2741
|
-
description: "Only needed during development (build tools, testing, linters). Not included in production builds.",
|
|
2742
|
-
theme
|
|
2743
|
-
}
|
|
2744
|
-
),
|
|
2745
|
-
/* @__PURE__ */ jsx(
|
|
2746
|
-
InfoItem,
|
|
2747
|
-
{
|
|
2748
|
-
badge: { text: "peer", color: theme.colors.accent },
|
|
2749
|
-
title: "Peer Dependencies",
|
|
2750
|
-
description: "Expected to be provided by the consumer of your package. Important for library authors to specify compatibility.",
|
|
2751
|
-
theme
|
|
2752
|
-
}
|
|
2753
|
-
)
|
|
2754
|
-
]
|
|
2816
|
+
width: "8px",
|
|
2817
|
+
height: "8px",
|
|
2818
|
+
borderRadius: "50%",
|
|
2819
|
+
backgroundColor: getLanguageColor(repository.language)
|
|
2820
|
+
}
|
|
2755
2821
|
}
|
|
2756
2822
|
),
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
}
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2823
|
+
repository.language
|
|
2824
|
+
] }),
|
|
2825
|
+
repository.stargazers_count !== void 0 && repository.stargazers_count > 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
2826
|
+
/* @__PURE__ */ jsx(Star, { size: 12 }),
|
|
2827
|
+
formatNumber(repository.stargazers_count)
|
|
2828
|
+
] }),
|
|
2829
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
2830
|
+
"Updated ",
|
|
2831
|
+
getRelativeTime(repository.pushed_at || repository.updated_at)
|
|
2832
|
+
] })
|
|
2833
|
+
]
|
|
2834
|
+
}
|
|
2835
|
+
)
|
|
2836
|
+
] }),
|
|
2837
|
+
/* @__PURE__ */ jsxs(
|
|
2838
|
+
"div",
|
|
2839
|
+
{
|
|
2840
|
+
style: {
|
|
2841
|
+
display: "flex",
|
|
2842
|
+
alignItems: "center",
|
|
2843
|
+
gap: "8px",
|
|
2844
|
+
flexShrink: 0
|
|
2845
|
+
},
|
|
2846
|
+
children: [
|
|
2847
|
+
/* @__PURE__ */ jsx(
|
|
2848
|
+
"button",
|
|
2849
|
+
{
|
|
2850
|
+
type: "button",
|
|
2851
|
+
onClick: handleOpenOnGitHub,
|
|
2852
|
+
style: {
|
|
2853
|
+
display: "flex",
|
|
2854
|
+
alignItems: "center",
|
|
2855
|
+
justifyContent: "center",
|
|
2856
|
+
width: "32px",
|
|
2857
|
+
height: "32px",
|
|
2858
|
+
borderRadius: "6px",
|
|
2859
|
+
border: `1px solid ${theme.colors.border}`,
|
|
2860
|
+
backgroundColor: "transparent",
|
|
2861
|
+
color: theme.colors.textSecondary,
|
|
2862
|
+
cursor: "pointer",
|
|
2863
|
+
transition: "background-color 0.15s, color 0.15s"
|
|
2864
|
+
},
|
|
2865
|
+
title: "Open on GitHub",
|
|
2866
|
+
onMouseEnter: (e) => {
|
|
2867
|
+
e.currentTarget.style.backgroundColor = theme.colors.backgroundTertiary;
|
|
2868
|
+
e.currentTarget.style.color = theme.colors.text;
|
|
2869
|
+
},
|
|
2870
|
+
onMouseLeave: (e) => {
|
|
2871
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
2872
|
+
e.currentTarget.style.color = theme.colors.textSecondary;
|
|
2873
|
+
},
|
|
2874
|
+
children: /* @__PURE__ */ jsx(ExternalLink, { size: 16 })
|
|
2875
|
+
}
|
|
2876
|
+
),
|
|
2877
|
+
isCloned ? /* @__PURE__ */ jsxs(
|
|
2878
|
+
"button",
|
|
2879
|
+
{
|
|
2880
|
+
type: "button",
|
|
2881
|
+
onClick: handleOpen,
|
|
2882
|
+
disabled: isLoading || !onOpen,
|
|
2883
|
+
style: {
|
|
2884
|
+
display: "flex",
|
|
2885
|
+
alignItems: "center",
|
|
2886
|
+
gap: "6px",
|
|
2887
|
+
padding: "6px 12px",
|
|
2888
|
+
borderRadius: "6px",
|
|
2889
|
+
border: "none",
|
|
2890
|
+
backgroundColor: "#10b981",
|
|
2891
|
+
color: "#ffffff",
|
|
2892
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
2893
|
+
fontWeight: theme.fontWeights.medium,
|
|
2894
|
+
fontFamily: theme.fonts.body,
|
|
2895
|
+
cursor: isLoading || !onOpen ? "not-allowed" : "pointer",
|
|
2896
|
+
opacity: isLoading || !onOpen ? 0.6 : 1,
|
|
2897
|
+
transition: "opacity 0.15s"
|
|
2898
|
+
},
|
|
2899
|
+
title: "Open in workspace",
|
|
2900
|
+
children: [
|
|
2901
|
+
/* @__PURE__ */ jsx(FolderOpen, { size: 14 }),
|
|
2902
|
+
"Open"
|
|
2903
|
+
]
|
|
2904
|
+
}
|
|
2905
|
+
) : /* @__PURE__ */ jsxs(
|
|
2906
|
+
"button",
|
|
2907
|
+
{
|
|
2908
|
+
type: "button",
|
|
2909
|
+
onClick: handleClone,
|
|
2910
|
+
disabled: isLoading || !onClone,
|
|
2911
|
+
style: {
|
|
2912
|
+
display: "flex",
|
|
2913
|
+
alignItems: "center",
|
|
2914
|
+
gap: "6px",
|
|
2915
|
+
padding: "6px 12px",
|
|
2916
|
+
borderRadius: "6px",
|
|
2917
|
+
border: "none",
|
|
2918
|
+
backgroundColor: theme.colors.primary,
|
|
2919
|
+
color: theme.colors.background,
|
|
2920
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
2921
|
+
fontWeight: theme.fontWeights.medium,
|
|
2922
|
+
fontFamily: theme.fonts.body,
|
|
2923
|
+
cursor: isLoading || !onClone ? "not-allowed" : "pointer",
|
|
2924
|
+
opacity: isLoading || !onClone ? 0.6 : 1,
|
|
2925
|
+
transition: "opacity 0.15s"
|
|
2926
|
+
},
|
|
2927
|
+
title: "Clone repository",
|
|
2928
|
+
children: [
|
|
2929
|
+
/* @__PURE__ */ jsx(Download, { size: 14 }),
|
|
2930
|
+
"Clone"
|
|
2931
|
+
]
|
|
2932
|
+
}
|
|
2933
|
+
)
|
|
2934
|
+
]
|
|
2935
|
+
}
|
|
2936
|
+
)
|
|
2937
|
+
]
|
|
2822
2938
|
}
|
|
2823
|
-
)
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2939
|
+
);
|
|
2940
|
+
};
|
|
2941
|
+
function getLanguageColor(language) {
|
|
2942
|
+
const colors = {
|
|
2943
|
+
TypeScript: "#3178c6",
|
|
2944
|
+
JavaScript: "#f7df1e",
|
|
2945
|
+
Python: "#3572A5",
|
|
2946
|
+
Rust: "#dea584",
|
|
2947
|
+
Go: "#00ADD8",
|
|
2948
|
+
Java: "#b07219",
|
|
2949
|
+
Ruby: "#701516",
|
|
2950
|
+
PHP: "#4F5D95",
|
|
2951
|
+
"C++": "#f34b7d",
|
|
2952
|
+
C: "#555555",
|
|
2953
|
+
"C#": "#178600",
|
|
2954
|
+
Swift: "#F05138",
|
|
2955
|
+
Kotlin: "#A97BFF",
|
|
2956
|
+
Shell: "#89e051",
|
|
2957
|
+
HTML: "#e34c26",
|
|
2958
|
+
CSS: "#563d7c",
|
|
2959
|
+
Vue: "#41b883",
|
|
2960
|
+
Svelte: "#ff3e00"
|
|
2961
|
+
};
|
|
2962
|
+
return colors[language] || "#8b949e";
|
|
2963
|
+
}
|
|
2964
|
+
function formatNumber(num) {
|
|
2965
|
+
if (num >= 1e6) {
|
|
2966
|
+
return `${(num / 1e6).toFixed(1)}M`;
|
|
2967
|
+
}
|
|
2968
|
+
if (num >= 1e3) {
|
|
2969
|
+
return `${(num / 1e3).toFixed(1)}K`;
|
|
2970
|
+
}
|
|
2971
|
+
return num.toString();
|
|
2972
|
+
}
|
|
2973
|
+
const PANEL_ID$6 = "industry-theme.github-starred";
|
|
2974
|
+
const createPanelEvent$1 = (type, payload) => ({
|
|
2975
|
+
type,
|
|
2976
|
+
source: PANEL_ID$6,
|
|
2977
|
+
timestamp: Date.now(),
|
|
2978
|
+
payload
|
|
2979
|
+
});
|
|
2980
|
+
const GitHubStarredPanel = (props) => {
|
|
2981
|
+
return /* @__PURE__ */ jsx(GitHubStarredPanelContent, { ...props });
|
|
2982
|
+
};
|
|
2983
|
+
const GitHubStarredPanelContent = ({
|
|
2984
|
+
context,
|
|
2985
|
+
actions,
|
|
2986
|
+
events
|
|
2987
|
+
}) => {
|
|
2988
|
+
var _a, _b, _c;
|
|
2989
|
+
const { theme } = useTheme();
|
|
2990
|
+
const [filter, setFilter] = useState("");
|
|
2991
|
+
const [selectedRepo, setSelectedRepo] = useState(null);
|
|
2992
|
+
const starredSlice = context.getSlice("githubStarred");
|
|
2993
|
+
const localReposSlice = context.getSlice("alexandriaRepositories");
|
|
2994
|
+
const repositories = useMemo(
|
|
2995
|
+
() => {
|
|
2996
|
+
var _a2;
|
|
2997
|
+
return ((_a2 = starredSlice == null ? void 0 : starredSlice.data) == null ? void 0 : _a2.repositories) || [];
|
|
2833
2998
|
},
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2999
|
+
[(_a = starredSlice == null ? void 0 : starredSlice.data) == null ? void 0 : _a.repositories]
|
|
3000
|
+
);
|
|
3001
|
+
const loading = (starredSlice == null ? void 0 : starredSlice.loading) ?? false;
|
|
3002
|
+
const error = (_b = starredSlice == null ? void 0 : starredSlice.data) == null ? void 0 : _b.error;
|
|
3003
|
+
const localRepos = useMemo(
|
|
3004
|
+
() => {
|
|
3005
|
+
var _a2;
|
|
3006
|
+
return ((_a2 = localReposSlice == null ? void 0 : localReposSlice.data) == null ? void 0 : _a2.repositories) || [];
|
|
3007
|
+
},
|
|
3008
|
+
[(_c = localReposSlice == null ? void 0 : localReposSlice.data) == null ? void 0 : _c.repositories]
|
|
3009
|
+
);
|
|
3010
|
+
const panelActions = actions;
|
|
3011
|
+
const localRepoMap = useMemo(() => {
|
|
3012
|
+
const map = /* @__PURE__ */ new Map();
|
|
3013
|
+
localRepos.forEach((entry) => {
|
|
3014
|
+
var _a2, _b2, _c2;
|
|
3015
|
+
if ((_a2 = entry.github) == null ? void 0 : _a2.id) {
|
|
3016
|
+
map.set(entry.github.id, {
|
|
3017
|
+
path: entry.path,
|
|
3018
|
+
name: entry.name,
|
|
3019
|
+
githubFullName: entry.github.id,
|
|
3020
|
+
githubId: entry.github.id
|
|
3021
|
+
});
|
|
3022
|
+
}
|
|
3023
|
+
if (((_b2 = entry.github) == null ? void 0 : _b2.owner) && ((_c2 = entry.github) == null ? void 0 : _c2.name)) {
|
|
3024
|
+
const fullName = `${entry.github.owner}/${entry.github.name}`;
|
|
3025
|
+
map.set(fullName, {
|
|
3026
|
+
path: entry.path,
|
|
3027
|
+
name: entry.name,
|
|
3028
|
+
githubFullName: fullName
|
|
3029
|
+
});
|
|
3030
|
+
}
|
|
3031
|
+
map.set(entry.name, {
|
|
3032
|
+
path: entry.path,
|
|
3033
|
+
name: entry.name
|
|
3034
|
+
});
|
|
3035
|
+
});
|
|
3036
|
+
return map;
|
|
3037
|
+
}, [localRepos]);
|
|
3038
|
+
const normalizedFilter = filter.trim().toLowerCase();
|
|
3039
|
+
const filteredRepositories = useMemo(() => {
|
|
3040
|
+
if (!normalizedFilter) {
|
|
3041
|
+
return repositories;
|
|
3042
|
+
}
|
|
3043
|
+
return repositories.filter((repo) => {
|
|
3044
|
+
var _a2;
|
|
3045
|
+
const haystack = [
|
|
3046
|
+
repo.name,
|
|
3047
|
+
repo.full_name,
|
|
3048
|
+
((_a2 = repo.owner) == null ? void 0 : _a2.login) ?? "",
|
|
3049
|
+
repo.description ?? "",
|
|
3050
|
+
repo.language ?? ""
|
|
3051
|
+
].join(" ").toLowerCase();
|
|
3052
|
+
return haystack.includes(normalizedFilter);
|
|
3053
|
+
});
|
|
3054
|
+
}, [repositories, normalizedFilter]);
|
|
3055
|
+
const sortedRepositories = useMemo(() => {
|
|
3056
|
+
return [...filteredRepositories].sort(
|
|
3057
|
+
(a, b) => a.name.localeCompare(b.name, void 0, { sensitivity: "base" })
|
|
3058
|
+
);
|
|
3059
|
+
}, [filteredRepositories]);
|
|
3060
|
+
const handleClone = useCallback(
|
|
3061
|
+
async (repo) => {
|
|
3062
|
+
if (panelActions.cloneRepository) {
|
|
3063
|
+
await panelActions.cloneRepository(repo);
|
|
3064
|
+
events.emit(
|
|
3065
|
+
createPanelEvent$1(`${PANEL_ID$6}:repository-cloned`, {
|
|
3066
|
+
repository: repo
|
|
3067
|
+
})
|
|
3068
|
+
);
|
|
3069
|
+
}
|
|
3070
|
+
},
|
|
3071
|
+
[panelActions, events]
|
|
3072
|
+
);
|
|
3073
|
+
const handleOpen = useCallback(
|
|
3074
|
+
async (localPath) => {
|
|
3075
|
+
if (panelActions.openRepository) {
|
|
3076
|
+
await panelActions.openRepository(localPath);
|
|
3077
|
+
}
|
|
3078
|
+
},
|
|
3079
|
+
[panelActions]
|
|
3080
|
+
);
|
|
3081
|
+
const handleSelect = useCallback(
|
|
3082
|
+
(repo) => {
|
|
3083
|
+
setSelectedRepo(repo);
|
|
3084
|
+
events.emit(
|
|
3085
|
+
createPanelEvent$1(`${PANEL_ID$6}:repository-selected`, { repository: repo })
|
|
3086
|
+
);
|
|
3087
|
+
},
|
|
3088
|
+
[events]
|
|
3089
|
+
);
|
|
3090
|
+
const handleRefresh = useCallback(async () => {
|
|
3091
|
+
if (panelActions.refreshStarred) {
|
|
3092
|
+
await panelActions.refreshStarred();
|
|
3093
|
+
}
|
|
3094
|
+
}, [panelActions]);
|
|
3095
|
+
useEffect(() => {
|
|
3096
|
+
const unsubscribers = [
|
|
3097
|
+
events.on(`${PANEL_ID$6}:filter`, (event) => {
|
|
3098
|
+
var _a2;
|
|
3099
|
+
setFilter(((_a2 = event.payload) == null ? void 0 : _a2.filter) || "");
|
|
3100
|
+
}),
|
|
3101
|
+
events.on(`${PANEL_ID$6}:select-repository`, (event) => {
|
|
3102
|
+
var _a2;
|
|
3103
|
+
const identifier = (_a2 = event.payload) == null ? void 0 : _a2.identifier;
|
|
3104
|
+
if (identifier) {
|
|
3105
|
+
const repo = repositories.find(
|
|
3106
|
+
(r) => r.name === identifier || r.full_name === identifier || r.full_name.toLowerCase() === identifier.toLowerCase()
|
|
3107
|
+
);
|
|
3108
|
+
if (repo) {
|
|
3109
|
+
handleSelect(repo);
|
|
3110
|
+
}
|
|
2871
3111
|
}
|
|
2872
|
-
),
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
3112
|
+
}),
|
|
3113
|
+
events.on(`${PANEL_ID$6}:clone-repository`, (event) => {
|
|
3114
|
+
var _a2;
|
|
3115
|
+
const identifier = (_a2 = event.payload) == null ? void 0 : _a2.identifier;
|
|
3116
|
+
if (identifier) {
|
|
3117
|
+
const repo = repositories.find(
|
|
3118
|
+
(r) => r.name === identifier || r.full_name === identifier || r.full_name.toLowerCase() === identifier.toLowerCase()
|
|
3119
|
+
);
|
|
3120
|
+
if (repo) {
|
|
3121
|
+
void handleClone(repo);
|
|
3122
|
+
}
|
|
2882
3123
|
}
|
|
2883
|
-
)
|
|
2884
|
-
]
|
|
3124
|
+
})
|
|
3125
|
+
];
|
|
3126
|
+
return () => {
|
|
3127
|
+
unsubscribers.forEach((unsub) => unsub());
|
|
3128
|
+
};
|
|
3129
|
+
}, [events, repositories, handleSelect, handleClone]);
|
|
3130
|
+
const baseContainerStyle = {
|
|
3131
|
+
display: "flex",
|
|
3132
|
+
flexDirection: "column",
|
|
3133
|
+
height: "100%",
|
|
3134
|
+
backgroundColor: theme.colors.backgroundSecondary
|
|
3135
|
+
};
|
|
3136
|
+
if (loading && repositories.length === 0) {
|
|
3137
|
+
return /* @__PURE__ */ jsx("div", { style: baseContainerStyle, children: /* @__PURE__ */ jsx(
|
|
3138
|
+
"div",
|
|
3139
|
+
{
|
|
3140
|
+
style: {
|
|
3141
|
+
flex: 1,
|
|
3142
|
+
display: "flex",
|
|
3143
|
+
alignItems: "center",
|
|
3144
|
+
justifyContent: "center",
|
|
3145
|
+
padding: "32px",
|
|
3146
|
+
textAlign: "center"
|
|
3147
|
+
},
|
|
3148
|
+
children: /* @__PURE__ */ jsxs(
|
|
3149
|
+
"div",
|
|
3150
|
+
{
|
|
3151
|
+
style: {
|
|
3152
|
+
display: "flex",
|
|
3153
|
+
flexDirection: "column",
|
|
3154
|
+
alignItems: "center",
|
|
3155
|
+
gap: "16px"
|
|
3156
|
+
},
|
|
3157
|
+
children: [
|
|
3158
|
+
/* @__PURE__ */ jsx(
|
|
3159
|
+
LoaderCircle,
|
|
3160
|
+
{
|
|
3161
|
+
size: 32,
|
|
3162
|
+
style: { color: theme.colors.textSecondary },
|
|
3163
|
+
className: "animate-spin"
|
|
3164
|
+
}
|
|
3165
|
+
),
|
|
3166
|
+
/* @__PURE__ */ jsx(
|
|
3167
|
+
"h3",
|
|
3168
|
+
{
|
|
3169
|
+
style: {
|
|
3170
|
+
margin: 0,
|
|
3171
|
+
color: theme.colors.text,
|
|
3172
|
+
fontSize: `${theme.fontSizes[3]}px`,
|
|
3173
|
+
fontWeight: theme.fontWeights.semibold,
|
|
3174
|
+
fontFamily: theme.fonts.body
|
|
3175
|
+
},
|
|
3176
|
+
children: "Loading starred repositories..."
|
|
3177
|
+
}
|
|
3178
|
+
)
|
|
3179
|
+
]
|
|
3180
|
+
}
|
|
3181
|
+
)
|
|
3182
|
+
}
|
|
3183
|
+
) });
|
|
2885
3184
|
}
|
|
2886
|
-
)
|
|
2887
|
-
|
|
3185
|
+
if (error && repositories.length === 0) {
|
|
3186
|
+
return /* @__PURE__ */ jsx("div", { style: baseContainerStyle, children: /* @__PURE__ */ jsx(
|
|
3187
|
+
"div",
|
|
3188
|
+
{
|
|
3189
|
+
style: {
|
|
3190
|
+
flex: 1,
|
|
3191
|
+
display: "flex",
|
|
3192
|
+
alignItems: "center",
|
|
3193
|
+
justifyContent: "center",
|
|
3194
|
+
padding: "32px",
|
|
3195
|
+
textAlign: "center"
|
|
3196
|
+
},
|
|
3197
|
+
children: /* @__PURE__ */ jsxs(
|
|
3198
|
+
"div",
|
|
3199
|
+
{
|
|
3200
|
+
style: {
|
|
3201
|
+
display: "flex",
|
|
3202
|
+
flexDirection: "column",
|
|
3203
|
+
alignItems: "center",
|
|
3204
|
+
gap: "16px",
|
|
3205
|
+
maxWidth: "360px"
|
|
3206
|
+
},
|
|
3207
|
+
children: [
|
|
3208
|
+
/* @__PURE__ */ jsx(
|
|
3209
|
+
CircleAlert,
|
|
3210
|
+
{
|
|
3211
|
+
size: 32,
|
|
3212
|
+
style: { color: theme.colors.error || "#ef4444" }
|
|
3213
|
+
}
|
|
3214
|
+
),
|
|
3215
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3216
|
+
/* @__PURE__ */ jsx(
|
|
3217
|
+
"h3",
|
|
3218
|
+
{
|
|
3219
|
+
style: {
|
|
3220
|
+
margin: 0,
|
|
3221
|
+
marginBottom: "8px",
|
|
3222
|
+
color: theme.colors.text,
|
|
3223
|
+
fontSize: `${theme.fontSizes[3]}px`,
|
|
3224
|
+
fontWeight: theme.fontWeights.semibold,
|
|
3225
|
+
fontFamily: theme.fonts.body
|
|
3226
|
+
},
|
|
3227
|
+
children: "Unable to load repositories"
|
|
3228
|
+
}
|
|
3229
|
+
),
|
|
3230
|
+
/* @__PURE__ */ jsx(
|
|
3231
|
+
"p",
|
|
3232
|
+
{
|
|
3233
|
+
style: {
|
|
3234
|
+
margin: 0,
|
|
3235
|
+
color: theme.colors.textSecondary,
|
|
3236
|
+
lineHeight: theme.lineHeights.body,
|
|
3237
|
+
fontFamily: theme.fonts.body
|
|
3238
|
+
},
|
|
3239
|
+
children: error
|
|
3240
|
+
}
|
|
3241
|
+
)
|
|
3242
|
+
] }),
|
|
3243
|
+
/* @__PURE__ */ jsxs(
|
|
3244
|
+
"button",
|
|
3245
|
+
{
|
|
3246
|
+
type: "button",
|
|
3247
|
+
onClick: handleRefresh,
|
|
3248
|
+
style: {
|
|
3249
|
+
display: "inline-flex",
|
|
3250
|
+
alignItems: "center",
|
|
3251
|
+
gap: "8px",
|
|
3252
|
+
padding: "10px 18px",
|
|
3253
|
+
borderRadius: "6px",
|
|
3254
|
+
border: "none",
|
|
3255
|
+
backgroundColor: theme.colors.primary,
|
|
3256
|
+
color: theme.colors.background,
|
|
3257
|
+
fontWeight: theme.fontWeights.semibold,
|
|
3258
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
3259
|
+
fontFamily: theme.fonts.body,
|
|
3260
|
+
cursor: "pointer"
|
|
3261
|
+
},
|
|
3262
|
+
children: [
|
|
3263
|
+
/* @__PURE__ */ jsx(RotateCcw, { size: 16 }),
|
|
3264
|
+
"Try again"
|
|
3265
|
+
]
|
|
3266
|
+
}
|
|
3267
|
+
)
|
|
3268
|
+
]
|
|
3269
|
+
}
|
|
3270
|
+
)
|
|
3271
|
+
}
|
|
3272
|
+
) });
|
|
3273
|
+
}
|
|
3274
|
+
return /* @__PURE__ */ jsxs(
|
|
3275
|
+
"div",
|
|
3276
|
+
{
|
|
3277
|
+
style: {
|
|
3278
|
+
...baseContainerStyle,
|
|
3279
|
+
padding: "16px",
|
|
3280
|
+
gap: "12px"
|
|
3281
|
+
},
|
|
3282
|
+
children: [
|
|
3283
|
+
/* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
|
|
3284
|
+
/* @__PURE__ */ jsx(
|
|
3285
|
+
Search,
|
|
3286
|
+
{
|
|
3287
|
+
size: 16,
|
|
3288
|
+
style: {
|
|
3289
|
+
position: "absolute",
|
|
3290
|
+
top: "50%",
|
|
3291
|
+
left: "12px",
|
|
3292
|
+
transform: "translateY(-50%)",
|
|
3293
|
+
color: theme.colors.textSecondary,
|
|
3294
|
+
pointerEvents: "none"
|
|
3295
|
+
}
|
|
3296
|
+
}
|
|
3297
|
+
),
|
|
3298
|
+
/* @__PURE__ */ jsx(
|
|
3299
|
+
"input",
|
|
3300
|
+
{
|
|
3301
|
+
type: "text",
|
|
3302
|
+
value: filter,
|
|
3303
|
+
placeholder: "Filter starred repositories...",
|
|
3304
|
+
onChange: (event) => setFilter(event.target.value),
|
|
3305
|
+
style: {
|
|
3306
|
+
width: "100%",
|
|
3307
|
+
padding: "8px 12px 8px 36px",
|
|
3308
|
+
borderRadius: "6px",
|
|
3309
|
+
border: `1px solid ${theme.colors.border}`,
|
|
3310
|
+
backgroundColor: theme.colors.background,
|
|
3311
|
+
color: theme.colors.text,
|
|
3312
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
3313
|
+
fontFamily: theme.fonts.body,
|
|
3314
|
+
outline: "none"
|
|
3315
|
+
}
|
|
3316
|
+
}
|
|
3317
|
+
)
|
|
3318
|
+
] }),
|
|
3319
|
+
error && repositories.length > 0 && /* @__PURE__ */ jsxs(
|
|
3320
|
+
"div",
|
|
3321
|
+
{
|
|
3322
|
+
style: {
|
|
3323
|
+
display: "flex",
|
|
3324
|
+
alignItems: "center",
|
|
3325
|
+
gap: "8px",
|
|
3326
|
+
padding: "10px 14px",
|
|
3327
|
+
borderRadius: "6px",
|
|
3328
|
+
backgroundColor: `${theme.colors.error || "#ef4444"}20`,
|
|
3329
|
+
color: theme.colors.error || "#ef4444",
|
|
3330
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
3331
|
+
fontFamily: theme.fonts.body
|
|
3332
|
+
},
|
|
3333
|
+
children: [
|
|
3334
|
+
/* @__PURE__ */ jsx(CircleAlert, { size: 16 }),
|
|
3335
|
+
/* @__PURE__ */ jsx("span", { children: error })
|
|
3336
|
+
]
|
|
3337
|
+
}
|
|
3338
|
+
),
|
|
3339
|
+
/* @__PURE__ */ jsxs(
|
|
3340
|
+
"div",
|
|
3341
|
+
{
|
|
3342
|
+
style: {
|
|
3343
|
+
flex: 1,
|
|
3344
|
+
overflowY: "auto",
|
|
3345
|
+
display: "flex",
|
|
3346
|
+
flexDirection: "column",
|
|
3347
|
+
gap: "4px"
|
|
3348
|
+
},
|
|
3349
|
+
children: [
|
|
3350
|
+
sortedRepositories.map((repo) => /* @__PURE__ */ jsx(
|
|
3351
|
+
GitHubRepositoryCard,
|
|
3352
|
+
{
|
|
3353
|
+
repository: repo,
|
|
3354
|
+
localRepo: localRepoMap.get(repo.full_name),
|
|
3355
|
+
onClone: handleClone,
|
|
3356
|
+
onOpen: handleOpen,
|
|
3357
|
+
onSelect: handleSelect,
|
|
3358
|
+
isSelected: (selectedRepo == null ? void 0 : selectedRepo.id) === repo.id
|
|
3359
|
+
},
|
|
3360
|
+
repo.id
|
|
3361
|
+
)),
|
|
3362
|
+
sortedRepositories.length === 0 && repositories.length > 0 && /* @__PURE__ */ jsx(
|
|
3363
|
+
"div",
|
|
3364
|
+
{
|
|
3365
|
+
style: {
|
|
3366
|
+
padding: "32px",
|
|
3367
|
+
textAlign: "center",
|
|
3368
|
+
color: theme.colors.textSecondary
|
|
3369
|
+
},
|
|
3370
|
+
children: /* @__PURE__ */ jsx("p", { style: { margin: 0 }, children: "No repositories match your filter." })
|
|
3371
|
+
}
|
|
3372
|
+
),
|
|
3373
|
+
repositories.length === 0 && !loading && /* @__PURE__ */ jsxs(
|
|
3374
|
+
"div",
|
|
3375
|
+
{
|
|
3376
|
+
style: {
|
|
3377
|
+
padding: "32px",
|
|
3378
|
+
textAlign: "center",
|
|
3379
|
+
color: theme.colors.textSecondary
|
|
3380
|
+
},
|
|
3381
|
+
children: [
|
|
3382
|
+
/* @__PURE__ */ jsx(
|
|
3383
|
+
Star,
|
|
3384
|
+
{
|
|
3385
|
+
size: 32,
|
|
3386
|
+
style: { marginBottom: "12px", opacity: 0.5 }
|
|
3387
|
+
}
|
|
3388
|
+
),
|
|
3389
|
+
/* @__PURE__ */ jsx("p", { style: { margin: 0 }, children: "You haven't starred any repositories yet." })
|
|
3390
|
+
]
|
|
3391
|
+
}
|
|
3392
|
+
)
|
|
3393
|
+
]
|
|
3394
|
+
}
|
|
3395
|
+
)
|
|
3396
|
+
]
|
|
3397
|
+
}
|
|
3398
|
+
);
|
|
3399
|
+
};
|
|
3400
|
+
const GitHubStarredPanelPreview = () => {
|
|
2888
3401
|
const { theme } = useTheme();
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
3402
|
+
return /* @__PURE__ */ jsxs(
|
|
3403
|
+
"div",
|
|
3404
|
+
{
|
|
3405
|
+
style: {
|
|
3406
|
+
padding: "12px",
|
|
3407
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
3408
|
+
fontFamily: theme.fonts.body,
|
|
3409
|
+
color: theme.colors.text,
|
|
3410
|
+
display: "flex",
|
|
3411
|
+
flexDirection: "column",
|
|
3412
|
+
gap: "8px"
|
|
3413
|
+
},
|
|
3414
|
+
children: [
|
|
3415
|
+
/* @__PURE__ */ jsxs(
|
|
3416
|
+
"div",
|
|
3417
|
+
{
|
|
3418
|
+
style: {
|
|
3419
|
+
display: "flex",
|
|
3420
|
+
alignItems: "center",
|
|
3421
|
+
gap: "6px",
|
|
3422
|
+
fontWeight: theme.fontWeights.semibold
|
|
3423
|
+
},
|
|
3424
|
+
children: [
|
|
3425
|
+
/* @__PURE__ */ jsx(Star, { size: 16, style: { color: "#f59e0b" } }),
|
|
3426
|
+
/* @__PURE__ */ jsx("span", { children: "Starred Repositories" })
|
|
3427
|
+
]
|
|
3428
|
+
}
|
|
3429
|
+
),
|
|
3430
|
+
/* @__PURE__ */ jsx(
|
|
3431
|
+
"div",
|
|
3432
|
+
{
|
|
3433
|
+
style: {
|
|
3434
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
3435
|
+
fontFamily: theme.fonts.body,
|
|
3436
|
+
color: theme.colors.textSecondary,
|
|
3437
|
+
marginTop: "4px"
|
|
3438
|
+
},
|
|
3439
|
+
children: "Browse your starred GitHub repositories"
|
|
3440
|
+
}
|
|
3441
|
+
)
|
|
3442
|
+
]
|
|
2925
3443
|
}
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
3444
|
+
);
|
|
3445
|
+
};
|
|
3446
|
+
const PANEL_ID$5 = "industry-theme.github-projects";
|
|
3447
|
+
const createPanelEvent = (type, payload) => ({
|
|
3448
|
+
type,
|
|
3449
|
+
source: PANEL_ID$5,
|
|
3450
|
+
timestamp: Date.now(),
|
|
3451
|
+
payload
|
|
3452
|
+
});
|
|
3453
|
+
const GitHubProjectsPanel = (props) => {
|
|
3454
|
+
return /* @__PURE__ */ jsx(GitHubProjectsPanelContent, { ...props });
|
|
3455
|
+
};
|
|
3456
|
+
const GitHubProjectsPanelContent = ({
|
|
3457
|
+
context,
|
|
3458
|
+
actions,
|
|
3459
|
+
events
|
|
3460
|
+
}) => {
|
|
3461
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3462
|
+
const { theme } = useTheme();
|
|
3463
|
+
const [filter, setFilter] = useState("");
|
|
3464
|
+
const [collapsedSections, setCollapsedSections] = useState(/* @__PURE__ */ new Set());
|
|
3465
|
+
const [selectedRepo, setSelectedRepo] = useState(null);
|
|
3466
|
+
const projectsSlice = context.getSlice("githubProjects");
|
|
3467
|
+
const localReposSlice = context.getSlice("alexandriaRepositories");
|
|
3468
|
+
const userRepositories = useMemo(
|
|
3469
|
+
() => {
|
|
3470
|
+
var _a2;
|
|
3471
|
+
return ((_a2 = projectsSlice == null ? void 0 : projectsSlice.data) == null ? void 0 : _a2.userRepositories) || [];
|
|
3472
|
+
},
|
|
3473
|
+
[(_a = projectsSlice == null ? void 0 : projectsSlice.data) == null ? void 0 : _a.userRepositories]
|
|
3474
|
+
);
|
|
3475
|
+
const organizations = useMemo(
|
|
3476
|
+
() => {
|
|
3477
|
+
var _a2;
|
|
3478
|
+
return ((_a2 = projectsSlice == null ? void 0 : projectsSlice.data) == null ? void 0 : _a2.organizations) || [];
|
|
3479
|
+
},
|
|
3480
|
+
[(_b = projectsSlice == null ? void 0 : projectsSlice.data) == null ? void 0 : _b.organizations]
|
|
3481
|
+
);
|
|
3482
|
+
const orgRepositories = useMemo(
|
|
3483
|
+
() => {
|
|
3484
|
+
var _a2;
|
|
3485
|
+
return ((_a2 = projectsSlice == null ? void 0 : projectsSlice.data) == null ? void 0 : _a2.orgRepositories) || {};
|
|
3486
|
+
},
|
|
3487
|
+
[(_c = projectsSlice == null ? void 0 : projectsSlice.data) == null ? void 0 : _c.orgRepositories]
|
|
3488
|
+
);
|
|
3489
|
+
const currentUser = (_d = projectsSlice == null ? void 0 : projectsSlice.data) == null ? void 0 : _d.currentUser;
|
|
3490
|
+
const loading = (projectsSlice == null ? void 0 : projectsSlice.loading) ?? false;
|
|
3491
|
+
const error = (_e = projectsSlice == null ? void 0 : projectsSlice.data) == null ? void 0 : _e.error;
|
|
3492
|
+
const localRepos = useMemo(
|
|
3493
|
+
() => {
|
|
3494
|
+
var _a2;
|
|
3495
|
+
return ((_a2 = localReposSlice == null ? void 0 : localReposSlice.data) == null ? void 0 : _a2.repositories) || [];
|
|
3496
|
+
},
|
|
3497
|
+
[(_f = localReposSlice == null ? void 0 : localReposSlice.data) == null ? void 0 : _f.repositories]
|
|
3498
|
+
);
|
|
3499
|
+
const panelActions = actions;
|
|
3500
|
+
const localRepoMap = useMemo(() => {
|
|
3501
|
+
const map = /* @__PURE__ */ new Map();
|
|
3502
|
+
localRepos.forEach((entry) => {
|
|
3503
|
+
var _a2, _b2, _c2;
|
|
3504
|
+
if ((_a2 = entry.github) == null ? void 0 : _a2.id) {
|
|
3505
|
+
map.set(entry.github.id, {
|
|
3506
|
+
path: entry.path,
|
|
3507
|
+
name: entry.name,
|
|
3508
|
+
githubFullName: entry.github.id,
|
|
3509
|
+
githubId: entry.github.id
|
|
3510
|
+
});
|
|
3511
|
+
}
|
|
3512
|
+
if (((_b2 = entry.github) == null ? void 0 : _b2.owner) && ((_c2 = entry.github) == null ? void 0 : _c2.name)) {
|
|
3513
|
+
const fullName = `${entry.github.owner}/${entry.github.name}`;
|
|
3514
|
+
map.set(fullName, {
|
|
3515
|
+
path: entry.path,
|
|
3516
|
+
name: entry.name,
|
|
3517
|
+
githubFullName: fullName
|
|
3518
|
+
});
|
|
3519
|
+
}
|
|
3520
|
+
map.set(entry.name, {
|
|
3521
|
+
path: entry.path,
|
|
3522
|
+
name: entry.name
|
|
3523
|
+
});
|
|
3524
|
+
});
|
|
3525
|
+
return map;
|
|
3526
|
+
}, [localRepos]);
|
|
3527
|
+
const normalizedFilter = filter.trim().toLowerCase();
|
|
3528
|
+
const filterRepos = useCallback(
|
|
3529
|
+
(repos) => {
|
|
3530
|
+
if (!normalizedFilter) return repos;
|
|
3531
|
+
return repos.filter((repo) => {
|
|
3532
|
+
var _a2;
|
|
3533
|
+
const haystack = [
|
|
3534
|
+
repo.name,
|
|
3535
|
+
repo.full_name,
|
|
3536
|
+
((_a2 = repo.owner) == null ? void 0 : _a2.login) ?? "",
|
|
3537
|
+
repo.description ?? "",
|
|
3538
|
+
repo.language ?? ""
|
|
3539
|
+
].join(" ").toLowerCase();
|
|
3540
|
+
return haystack.includes(normalizedFilter);
|
|
3541
|
+
});
|
|
3542
|
+
},
|
|
3543
|
+
[normalizedFilter]
|
|
3544
|
+
);
|
|
3545
|
+
const filteredUserRepos = useMemo(
|
|
3546
|
+
() => filterRepos(userRepositories),
|
|
3547
|
+
[filterRepos, userRepositories]
|
|
3548
|
+
);
|
|
3549
|
+
const filteredOrgRepos = useMemo(() => {
|
|
3550
|
+
const result = {};
|
|
3551
|
+
for (const [orgLogin, repos] of Object.entries(orgRepositories)) {
|
|
3552
|
+
const filtered = filterRepos(repos);
|
|
3553
|
+
if (filtered.length > 0) {
|
|
3554
|
+
result[orgLogin] = filtered;
|
|
3555
|
+
}
|
|
2937
3556
|
}
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
3557
|
+
return result;
|
|
3558
|
+
}, [filterRepos, orgRepositories]);
|
|
3559
|
+
const allRepositories = useMemo(() => {
|
|
3560
|
+
const all = [...userRepositories];
|
|
3561
|
+
for (const repos of Object.values(orgRepositories)) {
|
|
3562
|
+
all.push(...repos);
|
|
3563
|
+
}
|
|
3564
|
+
return all;
|
|
3565
|
+
}, [userRepositories, orgRepositories]);
|
|
3566
|
+
const hasData = userRepositories.length > 0 || organizations.length > 0 || Object.keys(orgRepositories).length > 0;
|
|
3567
|
+
const handleClone = useCallback(
|
|
3568
|
+
async (repo) => {
|
|
3569
|
+
if (panelActions.cloneRepository) {
|
|
3570
|
+
await panelActions.cloneRepository(repo);
|
|
3571
|
+
events.emit(
|
|
3572
|
+
createPanelEvent(`${PANEL_ID$5}:repository-cloned`, {
|
|
3573
|
+
repository: repo
|
|
3574
|
+
})
|
|
3575
|
+
);
|
|
3576
|
+
}
|
|
3577
|
+
},
|
|
3578
|
+
[panelActions, events]
|
|
3579
|
+
);
|
|
3580
|
+
const handleOpen = useCallback(
|
|
3581
|
+
async (localPath) => {
|
|
3582
|
+
if (panelActions.openRepository) {
|
|
3583
|
+
await panelActions.openRepository(localPath);
|
|
3584
|
+
}
|
|
3585
|
+
},
|
|
3586
|
+
[panelActions]
|
|
3587
|
+
);
|
|
3588
|
+
const handleSelect = useCallback(
|
|
3589
|
+
(repo) => {
|
|
3590
|
+
setSelectedRepo(repo);
|
|
3591
|
+
events.emit(
|
|
3592
|
+
createPanelEvent(`${PANEL_ID$5}:repository-selected`, { repository: repo })
|
|
3593
|
+
);
|
|
3594
|
+
},
|
|
3595
|
+
[events]
|
|
3596
|
+
);
|
|
3597
|
+
const handleRefresh = useCallback(async () => {
|
|
3598
|
+
if (panelActions.refreshProjects) {
|
|
3599
|
+
await panelActions.refreshProjects();
|
|
3600
|
+
}
|
|
3601
|
+
}, [panelActions]);
|
|
3602
|
+
const toggleSection = useCallback((owner) => {
|
|
3603
|
+
setCollapsedSections((prev) => {
|
|
3604
|
+
const next = new Set(prev);
|
|
3605
|
+
if (next.has(owner)) {
|
|
3606
|
+
next.delete(owner);
|
|
3607
|
+
} else {
|
|
3608
|
+
next.add(owner);
|
|
3609
|
+
}
|
|
3610
|
+
return next;
|
|
3611
|
+
});
|
|
3612
|
+
}, []);
|
|
3613
|
+
useEffect(() => {
|
|
3614
|
+
const unsubscribers = [
|
|
3615
|
+
events.on(`${PANEL_ID$5}:filter`, (event) => {
|
|
3616
|
+
var _a2;
|
|
3617
|
+
setFilter(((_a2 = event.payload) == null ? void 0 : _a2.filter) || "");
|
|
3618
|
+
}),
|
|
3619
|
+
events.on(`${PANEL_ID$5}:toggle-section`, (event) => {
|
|
3620
|
+
var _a2;
|
|
3621
|
+
const owner = (_a2 = event.payload) == null ? void 0 : _a2.owner;
|
|
3622
|
+
if (owner) {
|
|
3623
|
+
toggleSection(owner);
|
|
3624
|
+
}
|
|
3625
|
+
}),
|
|
3626
|
+
events.on(`${PANEL_ID$5}:select-repository`, (event) => {
|
|
3627
|
+
var _a2;
|
|
3628
|
+
const identifier = (_a2 = event.payload) == null ? void 0 : _a2.identifier;
|
|
3629
|
+
if (identifier) {
|
|
3630
|
+
const repo = allRepositories.find(
|
|
3631
|
+
(r) => r.name === identifier || r.full_name === identifier || r.full_name.toLowerCase() === identifier.toLowerCase()
|
|
3632
|
+
);
|
|
3633
|
+
if (repo) {
|
|
3634
|
+
handleSelect(repo);
|
|
3635
|
+
}
|
|
3636
|
+
}
|
|
3637
|
+
}),
|
|
3638
|
+
events.on(`${PANEL_ID$5}:clone-repository`, (event) => {
|
|
3639
|
+
var _a2;
|
|
3640
|
+
const identifier = (_a2 = event.payload) == null ? void 0 : _a2.identifier;
|
|
3641
|
+
if (identifier) {
|
|
3642
|
+
const repo = allRepositories.find(
|
|
3643
|
+
(r) => r.name === identifier || r.full_name === identifier || r.full_name.toLowerCase() === identifier.toLowerCase()
|
|
3644
|
+
);
|
|
3645
|
+
if (repo) {
|
|
3646
|
+
void handleClone(repo);
|
|
3647
|
+
}
|
|
3648
|
+
}
|
|
3649
|
+
})
|
|
3650
|
+
];
|
|
3651
|
+
return () => {
|
|
3652
|
+
unsubscribers.forEach((unsub) => unsub());
|
|
3653
|
+
};
|
|
3654
|
+
}, [events, allRepositories, toggleSection, handleSelect, handleClone]);
|
|
3655
|
+
const baseContainerStyle = {
|
|
2942
3656
|
display: "flex",
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
backgroundColor: "transparent",
|
|
2947
|
-
cursor: "pointer",
|
|
2948
|
-
transition: "all 0.15s ease",
|
|
2949
|
-
opacity: isHovered ? 1 : 0,
|
|
2950
|
-
pointerEvents: isHovered ? "auto" : "none"
|
|
3657
|
+
flexDirection: "column",
|
|
3658
|
+
height: "100%",
|
|
3659
|
+
backgroundColor: theme.colors.backgroundSecondary
|
|
2951
3660
|
};
|
|
2952
|
-
|
|
2953
|
-
"div",
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
},
|
|
2966
|
-
onMouseEnter: () => setIsHovered(true),
|
|
2967
|
-
onMouseLeave: () => setIsHovered(false),
|
|
2968
|
-
children: [
|
|
2969
|
-
/* @__PURE__ */ jsxs(
|
|
3661
|
+
if (loading && !hasData) {
|
|
3662
|
+
return /* @__PURE__ */ jsx("div", { style: baseContainerStyle, children: /* @__PURE__ */ jsx(
|
|
3663
|
+
"div",
|
|
3664
|
+
{
|
|
3665
|
+
style: {
|
|
3666
|
+
flex: 1,
|
|
3667
|
+
display: "flex",
|
|
3668
|
+
alignItems: "center",
|
|
3669
|
+
justifyContent: "center",
|
|
3670
|
+
padding: "32px",
|
|
3671
|
+
textAlign: "center"
|
|
3672
|
+
},
|
|
3673
|
+
children: /* @__PURE__ */ jsxs(
|
|
2970
3674
|
"div",
|
|
2971
3675
|
{
|
|
2972
3676
|
style: {
|
|
2973
3677
|
display: "flex",
|
|
3678
|
+
flexDirection: "column",
|
|
2974
3679
|
alignItems: "center",
|
|
2975
|
-
gap:
|
|
2976
|
-
flex: 1,
|
|
2977
|
-
minWidth: 0
|
|
3680
|
+
gap: "16px"
|
|
2978
3681
|
},
|
|
2979
3682
|
children: [
|
|
2980
|
-
/* @__PURE__ */ jsx("span", { style: getDependencyTypeBadgeStyle(dependency.dependencyType), children: dependency.dependencyType === "production" ? "prod" : dependency.dependencyType === "development" ? "dev" : "peer" }),
|
|
2981
3683
|
/* @__PURE__ */ jsx(
|
|
2982
|
-
|
|
3684
|
+
LoaderCircle,
|
|
2983
3685
|
{
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
overflow: "hidden",
|
|
2988
|
-
textOverflow: "ellipsis",
|
|
2989
|
-
whiteSpace: "nowrap"
|
|
2990
|
-
},
|
|
2991
|
-
children: dependency.name
|
|
3686
|
+
size: 32,
|
|
3687
|
+
style: { color: theme.colors.textSecondary },
|
|
3688
|
+
className: "animate-spin"
|
|
2992
3689
|
}
|
|
2993
3690
|
),
|
|
2994
3691
|
/* @__PURE__ */ jsx(
|
|
2995
|
-
"
|
|
3692
|
+
"h3",
|
|
2996
3693
|
{
|
|
2997
|
-
href: `https://www.npmjs.com/package/${dependency.name}`,
|
|
2998
|
-
target: "_blank",
|
|
2999
|
-
rel: "noopener noreferrer",
|
|
3000
3694
|
style: {
|
|
3001
|
-
|
|
3002
|
-
color: theme.colors.
|
|
3003
|
-
|
|
3004
|
-
|
|
3695
|
+
margin: 0,
|
|
3696
|
+
color: theme.colors.text,
|
|
3697
|
+
fontSize: `${theme.fontSizes[3]}px`,
|
|
3698
|
+
fontWeight: theme.fontWeights.semibold,
|
|
3699
|
+
fontFamily: theme.fonts.body
|
|
3005
3700
|
},
|
|
3006
|
-
|
|
3007
|
-
children: /* @__PURE__ */ jsx(ExternalLink, { size: 12 })
|
|
3701
|
+
children: "Loading your repositories..."
|
|
3008
3702
|
}
|
|
3009
3703
|
)
|
|
3010
3704
|
]
|
|
3011
3705
|
}
|
|
3012
|
-
)
|
|
3013
|
-
|
|
3706
|
+
)
|
|
3707
|
+
}
|
|
3708
|
+
) });
|
|
3709
|
+
}
|
|
3710
|
+
if (error && !hasData) {
|
|
3711
|
+
return /* @__PURE__ */ jsx("div", { style: baseContainerStyle, children: /* @__PURE__ */ jsx(
|
|
3712
|
+
"div",
|
|
3713
|
+
{
|
|
3714
|
+
style: {
|
|
3715
|
+
flex: 1,
|
|
3716
|
+
display: "flex",
|
|
3717
|
+
alignItems: "center",
|
|
3718
|
+
justifyContent: "center",
|
|
3719
|
+
padding: "32px",
|
|
3720
|
+
textAlign: "center"
|
|
3721
|
+
},
|
|
3722
|
+
children: /* @__PURE__ */ jsxs(
|
|
3014
3723
|
"div",
|
|
3015
3724
|
{
|
|
3016
3725
|
style: {
|
|
3017
3726
|
display: "flex",
|
|
3727
|
+
flexDirection: "column",
|
|
3018
3728
|
alignItems: "center",
|
|
3019
|
-
gap: "
|
|
3729
|
+
gap: "16px",
|
|
3730
|
+
maxWidth: "360px"
|
|
3020
3731
|
},
|
|
3021
3732
|
children: [
|
|
3022
3733
|
/* @__PURE__ */ jsx(
|
|
3023
|
-
|
|
3734
|
+
CircleAlert,
|
|
3024
3735
|
{
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
style: {
|
|
3028
|
-
...actionButtonStyle,
|
|
3029
|
-
color: copied ? theme.colors.success || "#10b981" : theme.colors.textSecondary
|
|
3030
|
-
},
|
|
3031
|
-
title: copied ? "Copied!" : `Copy ${dependency.name}@${dependency.version}`,
|
|
3032
|
-
children: copied ? /* @__PURE__ */ jsx(Check, { size: 12 }) : /* @__PURE__ */ jsx(Copy, { size: 12 })
|
|
3736
|
+
size: 32,
|
|
3737
|
+
style: { color: theme.colors.error || "#ef4444" }
|
|
3033
3738
|
}
|
|
3034
3739
|
),
|
|
3035
|
-
/* @__PURE__ */
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
counts
|
|
3049
|
-
}) => {
|
|
3050
|
-
const { theme } = useTheme();
|
|
3051
|
-
const availableFilters = [
|
|
3052
|
-
...counts.peer > 0 ? ["peer"] : [],
|
|
3053
|
-
...counts.production > 0 ? ["production"] : [],
|
|
3054
|
-
...counts.development > 0 ? ["development"] : []
|
|
3055
|
-
];
|
|
3056
|
-
const showFilters = availableFilters.length > 1;
|
|
3057
|
-
return /* @__PURE__ */ jsxs(
|
|
3058
|
-
"div",
|
|
3059
|
-
{
|
|
3060
|
-
style: {
|
|
3061
|
-
display: "flex",
|
|
3062
|
-
flexDirection: "column",
|
|
3063
|
-
gap: `${theme.space[2]}px`
|
|
3064
|
-
},
|
|
3065
|
-
children: [
|
|
3066
|
-
/* @__PURE__ */ jsxs(
|
|
3067
|
-
"div",
|
|
3068
|
-
{
|
|
3069
|
-
style: {
|
|
3070
|
-
position: "relative",
|
|
3071
|
-
display: "flex",
|
|
3072
|
-
alignItems: "center"
|
|
3073
|
-
},
|
|
3074
|
-
children: [
|
|
3075
|
-
/* @__PURE__ */ jsx(
|
|
3076
|
-
Search,
|
|
3077
|
-
{
|
|
3078
|
-
size: 14,
|
|
3079
|
-
style: {
|
|
3080
|
-
position: "absolute",
|
|
3081
|
-
left: `${theme.space[3]}px`,
|
|
3082
|
-
color: theme.colors.textSecondary,
|
|
3083
|
-
pointerEvents: "none"
|
|
3740
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3741
|
+
/* @__PURE__ */ jsx(
|
|
3742
|
+
"h3",
|
|
3743
|
+
{
|
|
3744
|
+
style: {
|
|
3745
|
+
margin: 0,
|
|
3746
|
+
marginBottom: "8px",
|
|
3747
|
+
color: theme.colors.text,
|
|
3748
|
+
fontSize: `${theme.fontSizes[3]}px`,
|
|
3749
|
+
fontWeight: theme.fontWeights.semibold,
|
|
3750
|
+
fontFamily: theme.fonts.body
|
|
3751
|
+
},
|
|
3752
|
+
children: "Unable to load repositories"
|
|
3084
3753
|
}
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
padding: `${theme.space[2]}px ${theme.space[5]}px`,
|
|
3097
|
-
borderRadius: `${theme.radii[2]}px`,
|
|
3098
|
-
border: `1px solid ${theme.colors.border}`,
|
|
3099
|
-
backgroundColor: theme.colors.backgroundSecondary,
|
|
3100
|
-
color: theme.colors.text,
|
|
3101
|
-
fontSize: `${theme.fontSizes[1]}px`,
|
|
3102
|
-
fontFamily: theme.fonts.body,
|
|
3103
|
-
outline: "none",
|
|
3104
|
-
transition: "all 0.2s"
|
|
3754
|
+
),
|
|
3755
|
+
/* @__PURE__ */ jsx(
|
|
3756
|
+
"p",
|
|
3757
|
+
{
|
|
3758
|
+
style: {
|
|
3759
|
+
margin: 0,
|
|
3760
|
+
color: theme.colors.textSecondary,
|
|
3761
|
+
lineHeight: theme.lineHeights.body,
|
|
3762
|
+
fontFamily: theme.fonts.body
|
|
3763
|
+
},
|
|
3764
|
+
children: error
|
|
3105
3765
|
}
|
|
3106
|
-
|
|
3107
|
-
),
|
|
3108
|
-
|
|
3766
|
+
)
|
|
3767
|
+
] }),
|
|
3768
|
+
/* @__PURE__ */ jsxs(
|
|
3109
3769
|
"button",
|
|
3110
3770
|
{
|
|
3111
|
-
|
|
3771
|
+
type: "button",
|
|
3772
|
+
onClick: handleRefresh,
|
|
3112
3773
|
style: {
|
|
3113
|
-
|
|
3114
|
-
right: `${theme.space[2]}px`,
|
|
3115
|
-
padding: `${theme.space[1]}px`,
|
|
3116
|
-
display: "flex",
|
|
3774
|
+
display: "inline-flex",
|
|
3117
3775
|
alignItems: "center",
|
|
3118
|
-
|
|
3119
|
-
|
|
3776
|
+
gap: "8px",
|
|
3777
|
+
padding: "10px 18px",
|
|
3778
|
+
borderRadius: "6px",
|
|
3120
3779
|
border: "none",
|
|
3121
|
-
|
|
3122
|
-
|
|
3780
|
+
backgroundColor: theme.colors.primary,
|
|
3781
|
+
color: theme.colors.background,
|
|
3782
|
+
fontWeight: theme.fontWeights.semibold,
|
|
3783
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
3784
|
+
fontFamily: theme.fonts.body,
|
|
3785
|
+
cursor: "pointer"
|
|
3123
3786
|
},
|
|
3124
|
-
|
|
3125
|
-
|
|
3787
|
+
children: [
|
|
3788
|
+
/* @__PURE__ */ jsx(RotateCcw, { size: 16 }),
|
|
3789
|
+
"Try again"
|
|
3790
|
+
]
|
|
3126
3791
|
}
|
|
3127
3792
|
)
|
|
3128
3793
|
]
|
|
3129
3794
|
}
|
|
3130
|
-
)
|
|
3131
|
-
showFilters && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: `${theme.space[1]}px`, width: "100%" }, children: availableFilters.map((type) => {
|
|
3132
|
-
const isActive = activeFilters.has(type);
|
|
3133
|
-
return /* @__PURE__ */ jsxs(
|
|
3134
|
-
"button",
|
|
3135
|
-
{
|
|
3136
|
-
onClick: () => onToggleFilter(type),
|
|
3137
|
-
style: {
|
|
3138
|
-
flex: 1,
|
|
3139
|
-
padding: `${theme.space[1]}px ${theme.space[2]}px`,
|
|
3140
|
-
fontSize: `${theme.fontSizes[0]}px`,
|
|
3141
|
-
fontWeight: theme.fontWeights.medium,
|
|
3142
|
-
fontFamily: theme.fonts.body,
|
|
3143
|
-
borderRadius: `${theme.radii[1]}px`,
|
|
3144
|
-
border: `1px solid ${isActive ? theme.colors.primary : theme.colors.border}`,
|
|
3145
|
-
backgroundColor: isActive ? `${theme.colors.primary}20` : theme.colors.backgroundSecondary,
|
|
3146
|
-
color: isActive ? theme.colors.primary : theme.colors.text,
|
|
3147
|
-
cursor: "pointer",
|
|
3148
|
-
transition: "all 0.2s"
|
|
3149
|
-
},
|
|
3150
|
-
children: [
|
|
3151
|
-
type === "production" ? "Prod" : type === "development" ? "Dev" : "Peer",
|
|
3152
|
-
/* @__PURE__ */ jsxs(
|
|
3153
|
-
"span",
|
|
3154
|
-
{
|
|
3155
|
-
style: { marginLeft: `${theme.space[1]}px`, opacity: 0.7 },
|
|
3156
|
-
children: [
|
|
3157
|
-
"(",
|
|
3158
|
-
counts[type],
|
|
3159
|
-
")"
|
|
3160
|
-
]
|
|
3161
|
-
}
|
|
3162
|
-
)
|
|
3163
|
-
]
|
|
3164
|
-
},
|
|
3165
|
-
type
|
|
3166
|
-
);
|
|
3167
|
-
}) })
|
|
3168
|
-
]
|
|
3169
|
-
}
|
|
3170
|
-
);
|
|
3171
|
-
};
|
|
3172
|
-
const dependencyTypeOrder = {
|
|
3173
|
-
peer: 0,
|
|
3174
|
-
production: 1,
|
|
3175
|
-
development: 2
|
|
3176
|
-
};
|
|
3177
|
-
function extractDependencies(packageLayer) {
|
|
3178
|
-
const { dependencies, devDependencies, peerDependencies } = packageLayer.packageData;
|
|
3179
|
-
const items = [];
|
|
3180
|
-
if (dependencies) {
|
|
3181
|
-
Object.entries(dependencies).forEach(([name, version]) => {
|
|
3182
|
-
items.push({ name, version, dependencyType: "production" });
|
|
3183
|
-
});
|
|
3184
|
-
}
|
|
3185
|
-
if (devDependencies) {
|
|
3186
|
-
Object.entries(devDependencies).forEach(([name, version]) => {
|
|
3187
|
-
items.push({ name, version, dependencyType: "development" });
|
|
3188
|
-
});
|
|
3189
|
-
}
|
|
3190
|
-
if (peerDependencies) {
|
|
3191
|
-
Object.entries(peerDependencies).forEach(([name, version]) => {
|
|
3192
|
-
items.push({ name, version, dependencyType: "peer" });
|
|
3193
|
-
});
|
|
3194
|
-
}
|
|
3195
|
-
return items.sort((a, b) => {
|
|
3196
|
-
const typeCompare = dependencyTypeOrder[a.dependencyType] - dependencyTypeOrder[b.dependencyType];
|
|
3197
|
-
if (typeCompare !== 0) return typeCompare;
|
|
3198
|
-
return a.name.localeCompare(b.name);
|
|
3199
|
-
});
|
|
3200
|
-
}
|
|
3201
|
-
const DependenciesPanelContent = ({
|
|
3202
|
-
context
|
|
3203
|
-
}) => {
|
|
3204
|
-
var _a;
|
|
3205
|
-
const { theme } = useTheme();
|
|
3206
|
-
const [selectedPackagePath, setSelectedPackagePath] = useState(
|
|
3207
|
-
null
|
|
3208
|
-
);
|
|
3209
|
-
const [activeFilters, setActiveFilters] = useState(/* @__PURE__ */ new Set());
|
|
3210
|
-
const [searchQuery, setSearchQuery] = useState("");
|
|
3211
|
-
const [showInfoModal, setShowInfoModal] = useState(false);
|
|
3212
|
-
const packagesSlice = context.getSlice("packages");
|
|
3213
|
-
const isLoading = context.isSliceLoading("packages");
|
|
3214
|
-
const hasPackages = context.hasSlice("packages");
|
|
3215
|
-
const packages = useMemo(() => {
|
|
3216
|
-
var _a2;
|
|
3217
|
-
return ((_a2 = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a2.packages) ?? [];
|
|
3218
|
-
}, [(_a = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a.packages]);
|
|
3219
|
-
const effectiveSelectedPath = useMemo(() => {
|
|
3220
|
-
if (selectedPackagePath !== null) return selectedPackagePath;
|
|
3221
|
-
if (packages.length === 1) return packages[0].packageData.path;
|
|
3222
|
-
const rootPackage = packages.find((p) => p.packageData.path === "");
|
|
3223
|
-
if (rootPackage) return "";
|
|
3224
|
-
return null;
|
|
3225
|
-
}, [selectedPackagePath, packages]);
|
|
3226
|
-
const selectedPackage = useMemo(() => {
|
|
3227
|
-
if (effectiveSelectedPath === null) return null;
|
|
3228
|
-
return packages.find((p) => p.packageData.path === effectiveSelectedPath);
|
|
3229
|
-
}, [effectiveSelectedPath, packages]);
|
|
3230
|
-
const dependencyItems = useMemo(() => {
|
|
3231
|
-
if (!selectedPackage) return [];
|
|
3232
|
-
return extractDependencies(selectedPackage);
|
|
3233
|
-
}, [selectedPackage]);
|
|
3234
|
-
const counts = useMemo(() => {
|
|
3235
|
-
return {
|
|
3236
|
-
all: dependencyItems.length,
|
|
3237
|
-
production: dependencyItems.filter((d) => d.dependencyType === "production").length,
|
|
3238
|
-
development: dependencyItems.filter(
|
|
3239
|
-
(d) => d.dependencyType === "development"
|
|
3240
|
-
).length,
|
|
3241
|
-
peer: dependencyItems.filter((d) => d.dependencyType === "peer").length
|
|
3242
|
-
};
|
|
3243
|
-
}, [dependencyItems]);
|
|
3244
|
-
const handleToggleFilter = (type) => {
|
|
3245
|
-
setActiveFilters((prev) => {
|
|
3246
|
-
const next = new Set(prev);
|
|
3247
|
-
if (next.has(type)) {
|
|
3248
|
-
next.delete(type);
|
|
3249
|
-
} else {
|
|
3250
|
-
next.add(type);
|
|
3251
|
-
}
|
|
3252
|
-
return next;
|
|
3253
|
-
});
|
|
3254
|
-
};
|
|
3255
|
-
const filteredDependencies = useMemo(() => {
|
|
3256
|
-
let filtered = [...dependencyItems];
|
|
3257
|
-
if (searchQuery.trim()) {
|
|
3258
|
-
const query = searchQuery.toLowerCase();
|
|
3259
|
-
filtered = filtered.filter(
|
|
3260
|
-
(dep) => dep.name.toLowerCase().includes(query)
|
|
3261
|
-
);
|
|
3262
|
-
}
|
|
3263
|
-
const allTypes = ["production", "development", "peer"];
|
|
3264
|
-
const availableTypes = allTypes.filter((t) => counts[t] > 0);
|
|
3265
|
-
const isAllSelected = activeFilters.size === 0 || availableTypes.every((t) => activeFilters.has(t));
|
|
3266
|
-
if (!isAllSelected && activeFilters.size > 0) {
|
|
3267
|
-
filtered = filtered.filter((dep) => activeFilters.has(dep.dependencyType));
|
|
3268
|
-
}
|
|
3269
|
-
return filtered;
|
|
3270
|
-
}, [dependencyItems, searchQuery, activeFilters, counts]);
|
|
3271
|
-
if (isLoading) {
|
|
3272
|
-
return /* @__PURE__ */ jsx(
|
|
3273
|
-
"div",
|
|
3274
|
-
{
|
|
3275
|
-
style: {
|
|
3276
|
-
padding: `${theme.space[3]}px`,
|
|
3277
|
-
height: "100%",
|
|
3278
|
-
display: "flex",
|
|
3279
|
-
alignItems: "center",
|
|
3280
|
-
justifyContent: "center",
|
|
3281
|
-
color: theme.colors.textSecondary,
|
|
3282
|
-
backgroundColor: theme.colors.background,
|
|
3283
|
-
fontFamily: theme.fonts.body
|
|
3284
|
-
},
|
|
3285
|
-
children: "Loading packages..."
|
|
3795
|
+
)
|
|
3286
3796
|
}
|
|
3287
|
-
);
|
|
3797
|
+
) });
|
|
3288
3798
|
}
|
|
3289
|
-
|
|
3799
|
+
const renderSectionHeader = (owner, repoCount, icon, isOrg = false) => {
|
|
3800
|
+
const isCollapsed = collapsedSections.has(owner);
|
|
3290
3801
|
return /* @__PURE__ */ jsxs(
|
|
3291
|
-
"
|
|
3802
|
+
"button",
|
|
3292
3803
|
{
|
|
3804
|
+
type: "button",
|
|
3805
|
+
onClick: () => toggleSection(owner),
|
|
3293
3806
|
style: {
|
|
3294
|
-
|
|
3295
|
-
height: "100%",
|
|
3807
|
+
width: "100%",
|
|
3296
3808
|
display: "flex",
|
|
3297
|
-
flexDirection: "column",
|
|
3298
3809
|
alignItems: "center",
|
|
3299
|
-
justifyContent: "
|
|
3300
|
-
|
|
3301
|
-
color: theme.colors.textSecondary,
|
|
3810
|
+
justifyContent: "space-between",
|
|
3811
|
+
padding: "10px 12px",
|
|
3302
3812
|
backgroundColor: theme.colors.background,
|
|
3303
|
-
|
|
3813
|
+
border: "none",
|
|
3814
|
+
borderRadius: "6px",
|
|
3815
|
+
cursor: "pointer",
|
|
3816
|
+
textAlign: "left",
|
|
3817
|
+
marginBottom: isCollapsed ? "0" : "8px"
|
|
3818
|
+
},
|
|
3819
|
+
onMouseEnter: (e) => {
|
|
3820
|
+
e.currentTarget.style.backgroundColor = theme.colors.backgroundTertiary;
|
|
3821
|
+
},
|
|
3822
|
+
onMouseLeave: (e) => {
|
|
3823
|
+
e.currentTarget.style.backgroundColor = theme.colors.background;
|
|
3304
3824
|
},
|
|
3305
3825
|
children: [
|
|
3306
|
-
/* @__PURE__ */
|
|
3307
|
-
|
|
3826
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
3827
|
+
isCollapsed ? /* @__PURE__ */ jsx(ChevronRight, { size: 16, color: theme.colors.textSecondary }) : /* @__PURE__ */ jsx(ChevronDown, { size: 16, color: theme.colors.textSecondary }),
|
|
3828
|
+
icon,
|
|
3829
|
+
/* @__PURE__ */ jsx(
|
|
3830
|
+
"span",
|
|
3831
|
+
{
|
|
3832
|
+
style: {
|
|
3833
|
+
fontSize: `${theme.fontSizes[2]}px`,
|
|
3834
|
+
fontWeight: theme.fontWeights.semibold,
|
|
3835
|
+
fontFamily: theme.fonts.body,
|
|
3836
|
+
color: theme.colors.text
|
|
3837
|
+
},
|
|
3838
|
+
children: owner
|
|
3839
|
+
}
|
|
3840
|
+
),
|
|
3841
|
+
isOrg && /* @__PURE__ */ jsx(
|
|
3842
|
+
"span",
|
|
3843
|
+
{
|
|
3844
|
+
style: {
|
|
3845
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
3846
|
+
fontFamily: theme.fonts.body,
|
|
3847
|
+
color: theme.colors.textSecondary,
|
|
3848
|
+
backgroundColor: theme.colors.backgroundSecondary,
|
|
3849
|
+
padding: "2px 6px",
|
|
3850
|
+
borderRadius: "3px"
|
|
3851
|
+
},
|
|
3852
|
+
children: "org"
|
|
3853
|
+
}
|
|
3854
|
+
)
|
|
3855
|
+
] }),
|
|
3856
|
+
/* @__PURE__ */ jsxs(
|
|
3857
|
+
"span",
|
|
3858
|
+
{
|
|
3859
|
+
style: {
|
|
3860
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
3861
|
+
fontFamily: theme.fonts.body,
|
|
3862
|
+
color: theme.colors.textSecondary
|
|
3863
|
+
},
|
|
3864
|
+
children: [
|
|
3865
|
+
repoCount,
|
|
3866
|
+
" ",
|
|
3867
|
+
repoCount === 1 ? "repo" : "repos"
|
|
3868
|
+
]
|
|
3869
|
+
}
|
|
3870
|
+
)
|
|
3308
3871
|
]
|
|
3309
3872
|
}
|
|
3310
3873
|
);
|
|
3311
|
-
}
|
|
3874
|
+
};
|
|
3312
3875
|
return /* @__PURE__ */ jsxs(
|
|
3313
3876
|
"div",
|
|
3314
3877
|
{
|
|
3315
3878
|
style: {
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
backgroundColor: theme.colors.background,
|
|
3320
|
-
color: theme.colors.text,
|
|
3321
|
-
fontFamily: theme.fonts.body,
|
|
3322
|
-
overflow: "hidden"
|
|
3879
|
+
...baseContainerStyle,
|
|
3880
|
+
padding: "16px",
|
|
3881
|
+
gap: "12px"
|
|
3323
3882
|
},
|
|
3324
3883
|
children: [
|
|
3325
|
-
/* @__PURE__ */ jsxs(
|
|
3884
|
+
/* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
|
|
3885
|
+
/* @__PURE__ */ jsx(
|
|
3886
|
+
Search,
|
|
3887
|
+
{
|
|
3888
|
+
size: 16,
|
|
3889
|
+
style: {
|
|
3890
|
+
position: "absolute",
|
|
3891
|
+
top: "50%",
|
|
3892
|
+
left: "12px",
|
|
3893
|
+
transform: "translateY(-50%)",
|
|
3894
|
+
color: theme.colors.textSecondary,
|
|
3895
|
+
pointerEvents: "none"
|
|
3896
|
+
}
|
|
3897
|
+
}
|
|
3898
|
+
),
|
|
3899
|
+
/* @__PURE__ */ jsx(
|
|
3900
|
+
"input",
|
|
3901
|
+
{
|
|
3902
|
+
type: "text",
|
|
3903
|
+
value: filter,
|
|
3904
|
+
placeholder: "Filter repositories...",
|
|
3905
|
+
onChange: (event) => setFilter(event.target.value),
|
|
3906
|
+
style: {
|
|
3907
|
+
width: "100%",
|
|
3908
|
+
padding: "8px 12px 8px 36px",
|
|
3909
|
+
borderRadius: "6px",
|
|
3910
|
+
border: `1px solid ${theme.colors.border}`,
|
|
3911
|
+
backgroundColor: theme.colors.background,
|
|
3912
|
+
color: theme.colors.text,
|
|
3913
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
3914
|
+
fontFamily: theme.fonts.body,
|
|
3915
|
+
outline: "none"
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
)
|
|
3919
|
+
] }),
|
|
3920
|
+
error && hasData && /* @__PURE__ */ jsxs(
|
|
3326
3921
|
"div",
|
|
3327
3922
|
{
|
|
3328
3923
|
style: {
|
|
3329
|
-
flexShrink: 0,
|
|
3330
|
-
padding: `${theme.space[3]}px`,
|
|
3331
|
-
paddingBottom: `${theme.space[2]}px`,
|
|
3332
3924
|
display: "flex",
|
|
3333
|
-
|
|
3334
|
-
gap:
|
|
3335
|
-
|
|
3925
|
+
alignItems: "center",
|
|
3926
|
+
gap: "8px",
|
|
3927
|
+
padding: "10px 14px",
|
|
3928
|
+
borderRadius: "6px",
|
|
3929
|
+
backgroundColor: `${theme.colors.error || "#ef4444"}20`,
|
|
3930
|
+
color: theme.colors.error || "#ef4444",
|
|
3931
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
3932
|
+
fontFamily: theme.fonts.body
|
|
3336
3933
|
},
|
|
3337
3934
|
children: [
|
|
3338
|
-
/* @__PURE__ */
|
|
3339
|
-
|
|
3340
|
-
{
|
|
3341
|
-
style: {
|
|
3342
|
-
display: "flex",
|
|
3343
|
-
alignItems: "center",
|
|
3344
|
-
justifyContent: "space-between"
|
|
3345
|
-
},
|
|
3346
|
-
children: [
|
|
3347
|
-
/* @__PURE__ */ jsx(
|
|
3348
|
-
"h3",
|
|
3349
|
-
{
|
|
3350
|
-
style: {
|
|
3351
|
-
fontSize: `${theme.fontSizes[2]}px`,
|
|
3352
|
-
fontWeight: theme.fontWeights.semibold,
|
|
3353
|
-
color: theme.colors.text,
|
|
3354
|
-
display: "flex",
|
|
3355
|
-
alignItems: "center",
|
|
3356
|
-
gap: `${theme.space[2]}px`,
|
|
3357
|
-
margin: 0
|
|
3358
|
-
},
|
|
3359
|
-
children: packages.length > 1 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3360
|
-
/* @__PURE__ */ jsx(Boxes, { size: 16 }),
|
|
3361
|
-
"Monorepo Dependencies",
|
|
3362
|
-
/* @__PURE__ */ jsxs(
|
|
3363
|
-
"span",
|
|
3364
|
-
{
|
|
3365
|
-
style: {
|
|
3366
|
-
fontSize: `${theme.fontSizes[0]}px`,
|
|
3367
|
-
fontWeight: theme.fontWeights.body,
|
|
3368
|
-
color: theme.colors.textSecondary
|
|
3369
|
-
},
|
|
3370
|
-
children: [
|
|
3371
|
-
"(",
|
|
3372
|
-
packages.length,
|
|
3373
|
-
")"
|
|
3374
|
-
]
|
|
3375
|
-
}
|
|
3376
|
-
)
|
|
3377
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3378
|
-
/* @__PURE__ */ jsx(Package, { size: 16 }),
|
|
3379
|
-
"Dependencies"
|
|
3380
|
-
] })
|
|
3381
|
-
}
|
|
3382
|
-
),
|
|
3383
|
-
/* @__PURE__ */ jsxs(
|
|
3384
|
-
"button",
|
|
3385
|
-
{
|
|
3386
|
-
onClick: () => setShowInfoModal(true),
|
|
3387
|
-
style: {
|
|
3388
|
-
padding: `${theme.space[1]}px ${theme.space[2]}px`,
|
|
3389
|
-
fontSize: `${theme.fontSizes[0]}px`,
|
|
3390
|
-
fontWeight: theme.fontWeights.medium,
|
|
3391
|
-
fontFamily: theme.fonts.body,
|
|
3392
|
-
borderRadius: `${theme.radii[1]}px`,
|
|
3393
|
-
border: `1px solid ${theme.colors.border}`,
|
|
3394
|
-
backgroundColor: theme.colors.backgroundSecondary,
|
|
3395
|
-
color: theme.colors.primary,
|
|
3396
|
-
cursor: "pointer",
|
|
3397
|
-
display: "flex",
|
|
3398
|
-
alignItems: "center",
|
|
3399
|
-
gap: `${theme.space[1]}px`,
|
|
3400
|
-
transition: "all 0.2s"
|
|
3401
|
-
},
|
|
3402
|
-
children: [
|
|
3403
|
-
/* @__PURE__ */ jsx(CircleQuestionMark, { size: 12 }),
|
|
3404
|
-
"Learn More"
|
|
3405
|
-
]
|
|
3406
|
-
}
|
|
3407
|
-
)
|
|
3408
|
-
]
|
|
3409
|
-
}
|
|
3410
|
-
),
|
|
3411
|
-
packages.length > 1 && /* @__PURE__ */ jsx(
|
|
3412
|
-
"select",
|
|
3413
|
-
{
|
|
3414
|
-
value: effectiveSelectedPath ?? "__none__",
|
|
3415
|
-
onChange: (e) => setSelectedPackagePath(e.target.value === "__none__" ? null : e.target.value),
|
|
3416
|
-
style: {
|
|
3417
|
-
width: "100%",
|
|
3418
|
-
padding: `${theme.space[2]}px`,
|
|
3419
|
-
borderRadius: `${theme.radii[1]}px`,
|
|
3420
|
-
border: `1px solid ${theme.colors.border}`,
|
|
3421
|
-
backgroundColor: theme.colors.backgroundSecondary,
|
|
3422
|
-
color: theme.colors.text,
|
|
3423
|
-
fontSize: `${theme.fontSizes[1]}px`,
|
|
3424
|
-
fontFamily: theme.fonts.body,
|
|
3425
|
-
cursor: "pointer"
|
|
3426
|
-
},
|
|
3427
|
-
children: packages.map((pkg) => /* @__PURE__ */ jsxs("option", { value: pkg.packageData.path, children: [
|
|
3428
|
-
pkg.packageData.name,
|
|
3429
|
-
" (",
|
|
3430
|
-
pkg.packageData.path || "root",
|
|
3431
|
-
")"
|
|
3432
|
-
] }, pkg.packageData.path || "__root__"))
|
|
3433
|
-
}
|
|
3434
|
-
),
|
|
3435
|
-
packages.length === 1 && selectedPackage && /* @__PURE__ */ jsxs(
|
|
3436
|
-
"div",
|
|
3437
|
-
{
|
|
3438
|
-
style: {
|
|
3439
|
-
fontSize: `${theme.fontSizes[0]}px`,
|
|
3440
|
-
color: theme.colors.textSecondary
|
|
3441
|
-
},
|
|
3442
|
-
children: [
|
|
3443
|
-
selectedPackage.packageData.name,
|
|
3444
|
-
" • ",
|
|
3445
|
-
dependencyItems.length,
|
|
3446
|
-
" dependencies"
|
|
3447
|
-
]
|
|
3448
|
-
}
|
|
3449
|
-
),
|
|
3450
|
-
selectedPackage && dependencyItems.length > 0 && /* @__PURE__ */ jsx(
|
|
3451
|
-
FilterBar,
|
|
3452
|
-
{
|
|
3453
|
-
activeFilters,
|
|
3454
|
-
onToggleFilter: handleToggleFilter,
|
|
3455
|
-
searchQuery,
|
|
3456
|
-
onSearchChange: setSearchQuery,
|
|
3457
|
-
counts
|
|
3458
|
-
}
|
|
3459
|
-
)
|
|
3935
|
+
/* @__PURE__ */ jsx(CircleAlert, { size: 16 }),
|
|
3936
|
+
/* @__PURE__ */ jsx("span", { children: error })
|
|
3460
3937
|
]
|
|
3461
3938
|
}
|
|
3462
3939
|
),
|
|
3463
|
-
|
|
3940
|
+
/* @__PURE__ */ jsxs(
|
|
3464
3941
|
"div",
|
|
3465
3942
|
{
|
|
3466
3943
|
style: {
|
|
3467
3944
|
flex: 1,
|
|
3468
|
-
|
|
3469
|
-
|
|
3945
|
+
overflowY: "auto",
|
|
3946
|
+
display: "flex",
|
|
3947
|
+
flexDirection: "column",
|
|
3948
|
+
gap: "16px"
|
|
3470
3949
|
},
|
|
3471
3950
|
children: [
|
|
3472
|
-
/* @__PURE__ */ jsxs(
|
|
3951
|
+
filteredUserRepos.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
3952
|
+
renderSectionHeader(
|
|
3953
|
+
currentUser || "Your Repositories",
|
|
3954
|
+
filteredUserRepos.length,
|
|
3955
|
+
/* @__PURE__ */ jsx(User, { size: 16, color: theme.colors.textSecondary })
|
|
3956
|
+
),
|
|
3957
|
+
!collapsedSections.has(currentUser || "Your Repositories") && /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: filteredUserRepos.sort(
|
|
3958
|
+
(a, b) => a.name.localeCompare(b.name, void 0, { sensitivity: "base" })
|
|
3959
|
+
).map((repo) => /* @__PURE__ */ jsx(
|
|
3960
|
+
GitHubRepositoryCard,
|
|
3961
|
+
{
|
|
3962
|
+
repository: repo,
|
|
3963
|
+
localRepo: localRepoMap.get(repo.full_name),
|
|
3964
|
+
onClone: handleClone,
|
|
3965
|
+
onOpen: handleOpen,
|
|
3966
|
+
onSelect: handleSelect,
|
|
3967
|
+
isSelected: (selectedRepo == null ? void 0 : selectedRepo.id) === repo.id
|
|
3968
|
+
},
|
|
3969
|
+
repo.id
|
|
3970
|
+
)) })
|
|
3971
|
+
] }),
|
|
3972
|
+
organizations.map((org) => {
|
|
3973
|
+
const repos = filteredOrgRepos[org.login];
|
|
3974
|
+
if (!repos || repos.length === 0) return null;
|
|
3975
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
3976
|
+
renderSectionHeader(
|
|
3977
|
+
org.login,
|
|
3978
|
+
repos.length,
|
|
3979
|
+
/* @__PURE__ */ jsx(Building2, { size: 16, color: theme.colors.textSecondary }),
|
|
3980
|
+
true
|
|
3981
|
+
),
|
|
3982
|
+
!collapsedSections.has(org.login) && /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: repos.sort(
|
|
3983
|
+
(a, b) => a.name.localeCompare(b.name, void 0, { sensitivity: "base" })
|
|
3984
|
+
).map((repo) => /* @__PURE__ */ jsx(
|
|
3985
|
+
GitHubRepositoryCard,
|
|
3986
|
+
{
|
|
3987
|
+
repository: repo,
|
|
3988
|
+
localRepo: localRepoMap.get(repo.full_name),
|
|
3989
|
+
onClone: handleClone,
|
|
3990
|
+
onOpen: handleOpen,
|
|
3991
|
+
onSelect: handleSelect,
|
|
3992
|
+
isSelected: (selectedRepo == null ? void 0 : selectedRepo.id) === repo.id
|
|
3993
|
+
},
|
|
3994
|
+
repo.id
|
|
3995
|
+
)) })
|
|
3996
|
+
] }, org.id);
|
|
3997
|
+
}),
|
|
3998
|
+
filteredUserRepos.length === 0 && Object.keys(filteredOrgRepos).length === 0 && hasData && /* @__PURE__ */ jsx(
|
|
3473
3999
|
"div",
|
|
3474
4000
|
{
|
|
3475
4001
|
style: {
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
4002
|
+
padding: "32px",
|
|
4003
|
+
textAlign: "center",
|
|
4004
|
+
color: theme.colors.textSecondary
|
|
3479
4005
|
},
|
|
3480
|
-
children:
|
|
3481
|
-
"Showing ",
|
|
3482
|
-
filteredDependencies.length,
|
|
3483
|
-
" of ",
|
|
3484
|
-
dependencyItems.length,
|
|
3485
|
-
" dependencies"
|
|
3486
|
-
]
|
|
4006
|
+
children: /* @__PURE__ */ jsx("p", { style: { margin: 0 }, children: "No repositories match your filter." })
|
|
3487
4007
|
}
|
|
3488
4008
|
),
|
|
3489
|
-
/* @__PURE__ */
|
|
4009
|
+
!hasData && !loading && /* @__PURE__ */ jsxs(
|
|
3490
4010
|
"div",
|
|
3491
4011
|
{
|
|
3492
4012
|
style: {
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
4013
|
+
padding: "32px",
|
|
4014
|
+
textAlign: "center",
|
|
4015
|
+
color: theme.colors.textSecondary
|
|
3496
4016
|
},
|
|
3497
|
-
children:
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
}
|
|
3508
|
-
) : filteredDependencies.map((dep) => /* @__PURE__ */ jsx(
|
|
3509
|
-
DependencyRow,
|
|
3510
|
-
{
|
|
3511
|
-
dependency: dep
|
|
3512
|
-
},
|
|
3513
|
-
`${dep.name}-${dep.dependencyType}`
|
|
3514
|
-
))
|
|
4017
|
+
children: [
|
|
4018
|
+
/* @__PURE__ */ jsx(
|
|
4019
|
+
FolderGit2,
|
|
4020
|
+
{
|
|
4021
|
+
size: 32,
|
|
4022
|
+
style: { marginBottom: "12px", opacity: 0.5 }
|
|
4023
|
+
}
|
|
4024
|
+
),
|
|
4025
|
+
/* @__PURE__ */ jsx("p", { style: { margin: 0 }, children: "No repositories found." })
|
|
4026
|
+
]
|
|
3515
4027
|
}
|
|
3516
4028
|
)
|
|
3517
4029
|
]
|
|
3518
4030
|
}
|
|
3519
|
-
)
|
|
3520
|
-
|
|
4031
|
+
)
|
|
4032
|
+
]
|
|
4033
|
+
}
|
|
4034
|
+
);
|
|
4035
|
+
};
|
|
4036
|
+
const GitHubProjectsPanelPreview = () => {
|
|
4037
|
+
const { theme } = useTheme();
|
|
4038
|
+
return /* @__PURE__ */ jsxs(
|
|
4039
|
+
"div",
|
|
4040
|
+
{
|
|
4041
|
+
style: {
|
|
4042
|
+
padding: "12px",
|
|
4043
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
4044
|
+
fontFamily: theme.fonts.body,
|
|
4045
|
+
color: theme.colors.text,
|
|
4046
|
+
display: "flex",
|
|
4047
|
+
flexDirection: "column",
|
|
4048
|
+
gap: "8px"
|
|
4049
|
+
},
|
|
4050
|
+
children: [
|
|
4051
|
+
/* @__PURE__ */ jsxs(
|
|
3521
4052
|
"div",
|
|
3522
4053
|
{
|
|
3523
4054
|
style: {
|
|
3524
|
-
flex: 1,
|
|
3525
4055
|
display: "flex",
|
|
3526
4056
|
alignItems: "center",
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
fontSize: `${theme.fontSizes[1]}px`
|
|
4057
|
+
gap: "6px",
|
|
4058
|
+
fontWeight: theme.fontWeights.semibold
|
|
3530
4059
|
},
|
|
3531
|
-
children:
|
|
4060
|
+
children: [
|
|
4061
|
+
/* @__PURE__ */ jsx(FolderGit2, { size: 16, style: { color: theme.colors.primary } }),
|
|
4062
|
+
/* @__PURE__ */ jsx("span", { children: "GitHub Projects" })
|
|
4063
|
+
]
|
|
3532
4064
|
}
|
|
3533
4065
|
),
|
|
3534
4066
|
/* @__PURE__ */ jsx(
|
|
3535
|
-
|
|
4067
|
+
"div",
|
|
3536
4068
|
{
|
|
3537
|
-
|
|
3538
|
-
|
|
4069
|
+
style: {
|
|
4070
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
4071
|
+
fontFamily: theme.fonts.body,
|
|
4072
|
+
color: theme.colors.textSecondary,
|
|
4073
|
+
marginTop: "4px"
|
|
4074
|
+
},
|
|
4075
|
+
children: "Your repositories and organization projects"
|
|
3539
4076
|
}
|
|
3540
4077
|
)
|
|
3541
4078
|
]
|
|
3542
4079
|
}
|
|
3543
4080
|
);
|
|
3544
4081
|
};
|
|
3545
|
-
const
|
|
3546
|
-
|
|
3547
|
-
};
|
|
3548
|
-
const PANEL_ID$3 = "industry-theme.local-projects";
|
|
3549
|
-
const filterProjectsTool = {
|
|
4082
|
+
const PANEL_ID$4 = "industry-theme.local-projects";
|
|
4083
|
+
const filterProjectsTool$1 = {
|
|
3550
4084
|
name: "filter_projects",
|
|
3551
4085
|
description: "Filter the local projects list by name, owner, or path",
|
|
3552
4086
|
inputs: {
|
|
@@ -3569,7 +4103,7 @@ const filterProjectsTool = {
|
|
|
3569
4103
|
tags: ["filter", "search", "projects"],
|
|
3570
4104
|
tool_call_template: {
|
|
3571
4105
|
call_template_type: "panel_event",
|
|
3572
|
-
event_type: `${PANEL_ID$
|
|
4106
|
+
event_type: `${PANEL_ID$4}:filter`
|
|
3573
4107
|
}
|
|
3574
4108
|
};
|
|
3575
4109
|
const selectProjectTool = {
|
|
@@ -3595,7 +4129,7 @@ const selectProjectTool = {
|
|
|
3595
4129
|
tags: ["select", "project", "navigation"],
|
|
3596
4130
|
tool_call_template: {
|
|
3597
4131
|
call_template_type: "panel_event",
|
|
3598
|
-
event_type: `${PANEL_ID$
|
|
4132
|
+
event_type: `${PANEL_ID$4}:select-repository`
|
|
3599
4133
|
}
|
|
3600
4134
|
};
|
|
3601
4135
|
const openProjectTool = {
|
|
@@ -3621,21 +4155,21 @@ const openProjectTool = {
|
|
|
3621
4155
|
tags: ["open", "project", "workspace"],
|
|
3622
4156
|
tool_call_template: {
|
|
3623
4157
|
call_template_type: "panel_event",
|
|
3624
|
-
event_type: `${PANEL_ID$
|
|
4158
|
+
event_type: `${PANEL_ID$4}:open-repository`
|
|
3625
4159
|
}
|
|
3626
4160
|
};
|
|
3627
4161
|
const localProjectsPanelTools = [
|
|
3628
|
-
filterProjectsTool,
|
|
4162
|
+
filterProjectsTool$1,
|
|
3629
4163
|
selectProjectTool,
|
|
3630
4164
|
openProjectTool
|
|
3631
4165
|
];
|
|
3632
4166
|
const localProjectsPanelToolsMetadata = {
|
|
3633
|
-
id: PANEL_ID$
|
|
4167
|
+
id: PANEL_ID$4,
|
|
3634
4168
|
name: "Local Projects Panel",
|
|
3635
4169
|
description: "Tools for browsing and managing local Alexandria repositories",
|
|
3636
4170
|
tools: localProjectsPanelTools
|
|
3637
4171
|
};
|
|
3638
|
-
const PANEL_ID$
|
|
4172
|
+
const PANEL_ID$3 = "industry-theme.workspace-repositories";
|
|
3639
4173
|
const selectRepositoryTool = {
|
|
3640
4174
|
name: "select_workspace_repository",
|
|
3641
4175
|
description: "Selects a repository in the workspace panel",
|
|
@@ -3659,7 +4193,7 @@ const selectRepositoryTool = {
|
|
|
3659
4193
|
tags: ["workspace", "repository", "select"],
|
|
3660
4194
|
tool_call_template: {
|
|
3661
4195
|
call_template_type: "panel_event",
|
|
3662
|
-
event_type: `${PANEL_ID$
|
|
4196
|
+
event_type: `${PANEL_ID$3}:select-repository`
|
|
3663
4197
|
}
|
|
3664
4198
|
};
|
|
3665
4199
|
const refreshWorkspaceTool = {
|
|
@@ -3684,7 +4218,7 @@ const refreshWorkspaceTool = {
|
|
|
3684
4218
|
tags: ["workspace", "refresh"],
|
|
3685
4219
|
tool_call_template: {
|
|
3686
4220
|
call_template_type: "panel_event",
|
|
3687
|
-
event_type: `${PANEL_ID$
|
|
4221
|
+
event_type: `${PANEL_ID$3}:refresh-workspace`
|
|
3688
4222
|
}
|
|
3689
4223
|
};
|
|
3690
4224
|
const openRepositoryTool = {
|
|
@@ -3710,7 +4244,7 @@ const openRepositoryTool = {
|
|
|
3710
4244
|
tags: ["workspace", "repository", "open"],
|
|
3711
4245
|
tool_call_template: {
|
|
3712
4246
|
call_template_type: "panel_event",
|
|
3713
|
-
event_type: `${PANEL_ID$
|
|
4247
|
+
event_type: `${PANEL_ID$3}:open-repository`
|
|
3714
4248
|
}
|
|
3715
4249
|
};
|
|
3716
4250
|
const workspaceRepositoriesPanelTools = [
|
|
@@ -3719,12 +4253,12 @@ const workspaceRepositoriesPanelTools = [
|
|
|
3719
4253
|
openRepositoryTool
|
|
3720
4254
|
];
|
|
3721
4255
|
const workspaceRepositoriesPanelToolsMetadata = {
|
|
3722
|
-
id: PANEL_ID$
|
|
4256
|
+
id: PANEL_ID$3,
|
|
3723
4257
|
name: "Workspace Repositories Panel",
|
|
3724
4258
|
description: "Tools provided by the workspace repositories panel",
|
|
3725
4259
|
tools: workspaceRepositoriesPanelTools
|
|
3726
4260
|
};
|
|
3727
|
-
const PANEL_ID$
|
|
4261
|
+
const PANEL_ID$2 = "industry-theme.workspaces-list";
|
|
3728
4262
|
const filterWorkspacesTool = {
|
|
3729
4263
|
name: "filter_workspaces",
|
|
3730
4264
|
description: "Filter the workspaces list by workspace name, description, or repository names within workspaces",
|
|
@@ -3748,7 +4282,7 @@ const filterWorkspacesTool = {
|
|
|
3748
4282
|
tags: ["filter", "search", "workspaces"],
|
|
3749
4283
|
tool_call_template: {
|
|
3750
4284
|
call_template_type: "panel_event",
|
|
3751
|
-
event_type: `${PANEL_ID$
|
|
4285
|
+
event_type: `${PANEL_ID$2}:filter`
|
|
3752
4286
|
}
|
|
3753
4287
|
};
|
|
3754
4288
|
const selectWorkspaceTool = {
|
|
@@ -3774,7 +4308,7 @@ const selectWorkspaceTool = {
|
|
|
3774
4308
|
tags: ["select", "workspace", "navigation"],
|
|
3775
4309
|
tool_call_template: {
|
|
3776
4310
|
call_template_type: "panel_event",
|
|
3777
|
-
event_type: `${PANEL_ID$
|
|
4311
|
+
event_type: `${PANEL_ID$2}:select-workspace`
|
|
3778
4312
|
}
|
|
3779
4313
|
};
|
|
3780
4314
|
const openWorkspaceTool = {
|
|
@@ -3800,7 +4334,7 @@ const openWorkspaceTool = {
|
|
|
3800
4334
|
tags: ["open", "workspace", "window"],
|
|
3801
4335
|
tool_call_template: {
|
|
3802
4336
|
call_template_type: "panel_event",
|
|
3803
|
-
event_type: `${PANEL_ID$
|
|
4337
|
+
event_type: `${PANEL_ID$2}:open-workspace`
|
|
3804
4338
|
}
|
|
3805
4339
|
};
|
|
3806
4340
|
const createWorkspaceTool = {
|
|
@@ -3831,7 +4365,7 @@ const createWorkspaceTool = {
|
|
|
3831
4365
|
tags: ["create", "workspace", "new"],
|
|
3832
4366
|
tool_call_template: {
|
|
3833
4367
|
call_template_type: "panel_event",
|
|
3834
|
-
event_type: `${PANEL_ID$
|
|
4368
|
+
event_type: `${PANEL_ID$2}:create-workspace`
|
|
3835
4369
|
}
|
|
3836
4370
|
};
|
|
3837
4371
|
const workspacesListPanelTools = [
|
|
@@ -3841,21 +4375,119 @@ const workspacesListPanelTools = [
|
|
|
3841
4375
|
createWorkspaceTool
|
|
3842
4376
|
];
|
|
3843
4377
|
const workspacesListPanelToolsMetadata = {
|
|
3844
|
-
id: PANEL_ID$
|
|
4378
|
+
id: PANEL_ID$2,
|
|
3845
4379
|
name: "Workspaces List Panel",
|
|
3846
4380
|
description: "Tools for browsing and managing workspaces",
|
|
3847
4381
|
tools: workspacesListPanelTools
|
|
3848
4382
|
};
|
|
3849
|
-
const PANEL_ID = "
|
|
3850
|
-
const
|
|
3851
|
-
name: "
|
|
3852
|
-
description: "Filter the
|
|
4383
|
+
const PANEL_ID$1 = "industry-theme.github-starred";
|
|
4384
|
+
const filterStarredTool = {
|
|
4385
|
+
name: "filter_starred_repositories",
|
|
4386
|
+
description: "Filter the starred repositories list by repository name, owner, language, or description",
|
|
4387
|
+
inputs: {
|
|
4388
|
+
type: "object",
|
|
4389
|
+
properties: {
|
|
4390
|
+
filter: {
|
|
4391
|
+
type: "string",
|
|
4392
|
+
description: "Search term to filter repositories (matches name, owner, language, or description)"
|
|
4393
|
+
}
|
|
4394
|
+
},
|
|
4395
|
+
required: ["filter"]
|
|
4396
|
+
},
|
|
4397
|
+
outputs: {
|
|
4398
|
+
type: "object",
|
|
4399
|
+
properties: {
|
|
4400
|
+
success: { type: "boolean" },
|
|
4401
|
+
message: { type: "string" }
|
|
4402
|
+
}
|
|
4403
|
+
},
|
|
4404
|
+
tags: ["filter", "search", "starred", "github"],
|
|
4405
|
+
tool_call_template: {
|
|
4406
|
+
call_template_type: "panel_event",
|
|
4407
|
+
event_type: `${PANEL_ID$1}:filter`
|
|
4408
|
+
}
|
|
4409
|
+
};
|
|
4410
|
+
const selectStarredRepositoryTool = {
|
|
4411
|
+
name: "select_starred_repository",
|
|
4412
|
+
description: "Select a starred repository by its name or full name (owner/repo)",
|
|
4413
|
+
inputs: {
|
|
4414
|
+
type: "object",
|
|
4415
|
+
properties: {
|
|
4416
|
+
identifier: {
|
|
4417
|
+
type: "string",
|
|
4418
|
+
description: "Repository identifier - can be the repository name or full name (owner/repo)"
|
|
4419
|
+
}
|
|
4420
|
+
},
|
|
4421
|
+
required: ["identifier"]
|
|
4422
|
+
},
|
|
4423
|
+
outputs: {
|
|
4424
|
+
type: "object",
|
|
4425
|
+
properties: {
|
|
4426
|
+
success: { type: "boolean" },
|
|
4427
|
+
message: { type: "string" },
|
|
4428
|
+
repository: {
|
|
4429
|
+
type: "object",
|
|
4430
|
+
description: "The selected repository data"
|
|
4431
|
+
}
|
|
4432
|
+
}
|
|
4433
|
+
},
|
|
4434
|
+
tags: ["select", "starred", "github", "repository"],
|
|
4435
|
+
tool_call_template: {
|
|
4436
|
+
call_template_type: "panel_event",
|
|
4437
|
+
event_type: `${PANEL_ID$1}:select-repository`
|
|
4438
|
+
}
|
|
4439
|
+
};
|
|
4440
|
+
const cloneStarredRepositoryTool = {
|
|
4441
|
+
name: "clone_starred_repository",
|
|
4442
|
+
description: "Clone a starred repository to the local machine",
|
|
4443
|
+
inputs: {
|
|
4444
|
+
type: "object",
|
|
4445
|
+
properties: {
|
|
4446
|
+
identifier: {
|
|
4447
|
+
type: "string",
|
|
4448
|
+
description: "Repository identifier - can be the repository name or full name (owner/repo)"
|
|
4449
|
+
}
|
|
4450
|
+
},
|
|
4451
|
+
required: ["identifier"]
|
|
4452
|
+
},
|
|
4453
|
+
outputs: {
|
|
4454
|
+
type: "object",
|
|
4455
|
+
properties: {
|
|
4456
|
+
success: { type: "boolean" },
|
|
4457
|
+
message: { type: "string" },
|
|
4458
|
+
localPath: {
|
|
4459
|
+
type: "string",
|
|
4460
|
+
description: "Path where the repository was cloned"
|
|
4461
|
+
}
|
|
4462
|
+
}
|
|
4463
|
+
},
|
|
4464
|
+
tags: ["clone", "starred", "github", "repository"],
|
|
4465
|
+
tool_call_template: {
|
|
4466
|
+
call_template_type: "panel_event",
|
|
4467
|
+
event_type: `${PANEL_ID$1}:clone-repository`
|
|
4468
|
+
}
|
|
4469
|
+
};
|
|
4470
|
+
const githubStarredPanelTools = [
|
|
4471
|
+
filterStarredTool,
|
|
4472
|
+
selectStarredRepositoryTool,
|
|
4473
|
+
cloneStarredRepositoryTool
|
|
4474
|
+
];
|
|
4475
|
+
const githubStarredPanelToolsMetadata = {
|
|
4476
|
+
id: PANEL_ID$1,
|
|
4477
|
+
name: "GitHub Starred Panel",
|
|
4478
|
+
description: "Tools for browsing and managing starred GitHub repositories",
|
|
4479
|
+
tools: githubStarredPanelTools
|
|
4480
|
+
};
|
|
4481
|
+
const PANEL_ID = "industry-theme.github-projects";
|
|
4482
|
+
const filterProjectsTool = {
|
|
4483
|
+
name: "filter_github_projects",
|
|
4484
|
+
description: "Filter the GitHub projects list by repository name, owner, language, or description",
|
|
3853
4485
|
inputs: {
|
|
3854
4486
|
type: "object",
|
|
3855
4487
|
properties: {
|
|
3856
4488
|
filter: {
|
|
3857
4489
|
type: "string",
|
|
3858
|
-
description: "Search term to filter
|
|
4490
|
+
description: "Search term to filter repositories (matches name, owner, language, or description)"
|
|
3859
4491
|
}
|
|
3860
4492
|
},
|
|
3861
4493
|
required: ["filter"]
|
|
@@ -3867,75 +4499,110 @@ const filterDependenciesTool = {
|
|
|
3867
4499
|
message: { type: "string" }
|
|
3868
4500
|
}
|
|
3869
4501
|
},
|
|
3870
|
-
tags: ["filter", "search", "
|
|
4502
|
+
tags: ["filter", "search", "projects", "github"],
|
|
3871
4503
|
tool_call_template: {
|
|
3872
4504
|
call_template_type: "panel_event",
|
|
3873
4505
|
event_type: `${PANEL_ID}:filter`
|
|
3874
4506
|
}
|
|
3875
4507
|
};
|
|
3876
|
-
const
|
|
3877
|
-
name: "
|
|
3878
|
-
description: "
|
|
4508
|
+
const toggleOwnerSectionTool = {
|
|
4509
|
+
name: "toggle_owner_section",
|
|
4510
|
+
description: "Expand or collapse an owner section (user or organization) in the projects panel",
|
|
4511
|
+
inputs: {
|
|
4512
|
+
type: "object",
|
|
4513
|
+
properties: {
|
|
4514
|
+
owner: {
|
|
4515
|
+
type: "string",
|
|
4516
|
+
description: "The owner name (username or organization login) to toggle"
|
|
4517
|
+
}
|
|
4518
|
+
},
|
|
4519
|
+
required: ["owner"]
|
|
4520
|
+
},
|
|
4521
|
+
outputs: {
|
|
4522
|
+
type: "object",
|
|
4523
|
+
properties: {
|
|
4524
|
+
success: { type: "boolean" },
|
|
4525
|
+
message: { type: "string" },
|
|
4526
|
+
collapsed: { type: "boolean" }
|
|
4527
|
+
}
|
|
4528
|
+
},
|
|
4529
|
+
tags: ["toggle", "section", "projects", "github"],
|
|
4530
|
+
tool_call_template: {
|
|
4531
|
+
call_template_type: "panel_event",
|
|
4532
|
+
event_type: `${PANEL_ID}:toggle-section`
|
|
4533
|
+
}
|
|
4534
|
+
};
|
|
4535
|
+
const selectProjectRepositoryTool = {
|
|
4536
|
+
name: "select_project_repository",
|
|
4537
|
+
description: "Select a project repository by its name or full name (owner/repo)",
|
|
3879
4538
|
inputs: {
|
|
3880
4539
|
type: "object",
|
|
3881
4540
|
properties: {
|
|
3882
|
-
|
|
4541
|
+
identifier: {
|
|
3883
4542
|
type: "string",
|
|
3884
|
-
|
|
3885
|
-
description: "The dependency type to filter by"
|
|
4543
|
+
description: "Repository identifier - can be the repository name or full name (owner/repo)"
|
|
3886
4544
|
}
|
|
3887
4545
|
},
|
|
3888
|
-
required: ["
|
|
4546
|
+
required: ["identifier"]
|
|
3889
4547
|
},
|
|
3890
4548
|
outputs: {
|
|
3891
4549
|
type: "object",
|
|
3892
4550
|
properties: {
|
|
3893
4551
|
success: { type: "boolean" },
|
|
3894
|
-
|
|
4552
|
+
message: { type: "string" },
|
|
4553
|
+
repository: {
|
|
4554
|
+
type: "object",
|
|
4555
|
+
description: "The selected repository data"
|
|
4556
|
+
}
|
|
3895
4557
|
}
|
|
3896
4558
|
},
|
|
3897
|
-
tags: ["
|
|
4559
|
+
tags: ["select", "projects", "github", "repository"],
|
|
3898
4560
|
tool_call_template: {
|
|
3899
4561
|
call_template_type: "panel_event",
|
|
3900
|
-
event_type: `${PANEL_ID}:select-
|
|
4562
|
+
event_type: `${PANEL_ID}:select-repository`
|
|
3901
4563
|
}
|
|
3902
4564
|
};
|
|
3903
|
-
const
|
|
3904
|
-
name: "
|
|
3905
|
-
description: "
|
|
4565
|
+
const cloneProjectRepositoryTool = {
|
|
4566
|
+
name: "clone_project_repository",
|
|
4567
|
+
description: "Clone a project repository to the local machine",
|
|
3906
4568
|
inputs: {
|
|
3907
4569
|
type: "object",
|
|
3908
4570
|
properties: {
|
|
3909
|
-
|
|
4571
|
+
identifier: {
|
|
3910
4572
|
type: "string",
|
|
3911
|
-
description: "
|
|
4573
|
+
description: "Repository identifier - can be the repository name or full name (owner/repo)"
|
|
3912
4574
|
}
|
|
3913
4575
|
},
|
|
3914
|
-
required: ["
|
|
4576
|
+
required: ["identifier"]
|
|
3915
4577
|
},
|
|
3916
4578
|
outputs: {
|
|
3917
4579
|
type: "object",
|
|
3918
4580
|
properties: {
|
|
3919
4581
|
success: { type: "boolean" },
|
|
3920
|
-
|
|
4582
|
+
message: { type: "string" },
|
|
4583
|
+
localPath: {
|
|
4584
|
+
type: "string",
|
|
4585
|
+
description: "Path where the repository was cloned"
|
|
4586
|
+
}
|
|
3921
4587
|
}
|
|
3922
4588
|
},
|
|
3923
|
-
tags: ["
|
|
4589
|
+
tags: ["clone", "projects", "github", "repository"],
|
|
3924
4590
|
tool_call_template: {
|
|
3925
4591
|
call_template_type: "panel_event",
|
|
3926
|
-
event_type: `${PANEL_ID}:
|
|
4592
|
+
event_type: `${PANEL_ID}:clone-repository`
|
|
3927
4593
|
}
|
|
3928
4594
|
};
|
|
3929
|
-
const
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
4595
|
+
const githubProjectsPanelTools = [
|
|
4596
|
+
filterProjectsTool,
|
|
4597
|
+
toggleOwnerSectionTool,
|
|
4598
|
+
selectProjectRepositoryTool,
|
|
4599
|
+
cloneProjectRepositoryTool
|
|
3933
4600
|
];
|
|
3934
|
-
const
|
|
4601
|
+
const githubProjectsPanelToolsMetadata = {
|
|
3935
4602
|
id: PANEL_ID,
|
|
3936
|
-
name: "
|
|
3937
|
-
description: "Tools for
|
|
3938
|
-
tools:
|
|
4603
|
+
name: "GitHub Projects Panel",
|
|
4604
|
+
description: "Tools for browsing and managing your GitHub repositories and organization repositories",
|
|
4605
|
+
tools: githubProjectsPanelTools
|
|
3939
4606
|
};
|
|
3940
4607
|
const panels = [
|
|
3941
4608
|
{
|
|
@@ -4004,21 +4671,46 @@ const panels = [
|
|
|
4004
4671
|
},
|
|
4005
4672
|
{
|
|
4006
4673
|
metadata: {
|
|
4007
|
-
id: "
|
|
4008
|
-
name: "
|
|
4009
|
-
icon: "
|
|
4674
|
+
id: "industry-theme.github-starred",
|
|
4675
|
+
name: "Starred",
|
|
4676
|
+
icon: "Star",
|
|
4010
4677
|
version: "0.1.0",
|
|
4011
|
-
author: "
|
|
4012
|
-
description: "
|
|
4013
|
-
slices: ["
|
|
4014
|
-
tools:
|
|
4678
|
+
author: "Industry Theme",
|
|
4679
|
+
description: "Browse your starred GitHub repositories",
|
|
4680
|
+
slices: ["githubStarred", "alexandriaRepositories"],
|
|
4681
|
+
tools: githubStarredPanelTools
|
|
4682
|
+
},
|
|
4683
|
+
component: GitHubStarredPanel,
|
|
4684
|
+
onMount: async (context) => {
|
|
4685
|
+
console.log("GitHub Starred Panel mounted");
|
|
4686
|
+
if (context.hasSlice("githubStarred") && !context.isSliceLoading("githubStarred")) {
|
|
4687
|
+
await context.refresh(void 0, "githubStarred");
|
|
4688
|
+
}
|
|
4689
|
+
},
|
|
4690
|
+
onUnmount: async (_context) => {
|
|
4691
|
+
console.log("GitHub Starred Panel unmounting");
|
|
4692
|
+
}
|
|
4693
|
+
},
|
|
4694
|
+
{
|
|
4695
|
+
metadata: {
|
|
4696
|
+
id: "industry-theme.github-projects",
|
|
4697
|
+
name: "GitHub Projects",
|
|
4698
|
+
icon: "FolderGit2",
|
|
4699
|
+
version: "0.1.0",
|
|
4700
|
+
author: "Industry Theme",
|
|
4701
|
+
description: "Your repositories and organization projects",
|
|
4702
|
+
slices: ["githubProjects", "alexandriaRepositories"],
|
|
4703
|
+
tools: githubProjectsPanelTools
|
|
4015
4704
|
},
|
|
4016
|
-
component:
|
|
4017
|
-
onMount: async (
|
|
4018
|
-
console.log("
|
|
4705
|
+
component: GitHubProjectsPanel,
|
|
4706
|
+
onMount: async (context) => {
|
|
4707
|
+
console.log("GitHub Projects Panel mounted");
|
|
4708
|
+
if (context.hasSlice("githubProjects") && !context.isSliceLoading("githubProjects")) {
|
|
4709
|
+
await context.refresh(void 0, "githubProjects");
|
|
4710
|
+
}
|
|
4019
4711
|
},
|
|
4020
4712
|
onUnmount: async (_context) => {
|
|
4021
|
-
console.log("
|
|
4713
|
+
console.log("GitHub Projects Panel unmounting");
|
|
4022
4714
|
}
|
|
4023
4715
|
}
|
|
4024
4716
|
];
|
|
@@ -4029,7 +4721,11 @@ const onPackageUnload = async () => {
|
|
|
4029
4721
|
console.log("Alexandria Panels package unloading");
|
|
4030
4722
|
};
|
|
4031
4723
|
export {
|
|
4032
|
-
|
|
4724
|
+
GitHubProjectsPanel,
|
|
4725
|
+
GitHubProjectsPanelPreview,
|
|
4726
|
+
GitHubRepositoryCard,
|
|
4727
|
+
GitHubStarredPanel,
|
|
4728
|
+
GitHubStarredPanelPreview,
|
|
4033
4729
|
LocalProjectCard,
|
|
4034
4730
|
LocalProjectsPanel,
|
|
4035
4731
|
LocalProjectsPanelPreview,
|
|
@@ -4038,12 +4734,17 @@ export {
|
|
|
4038
4734
|
WorkspaceRepositoriesPanel,
|
|
4039
4735
|
WorkspacesListPanel,
|
|
4040
4736
|
WorkspacesListPanelPreview,
|
|
4737
|
+
cloneProjectRepositoryTool,
|
|
4738
|
+
cloneStarredRepositoryTool,
|
|
4041
4739
|
createWorkspaceTool,
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
filterProjectsTool,
|
|
4740
|
+
filterProjectsTool as filterGitHubProjectsTool,
|
|
4741
|
+
filterProjectsTool$1 as filterProjectsTool,
|
|
4742
|
+
filterStarredTool,
|
|
4046
4743
|
filterWorkspacesTool,
|
|
4744
|
+
githubProjectsPanelTools,
|
|
4745
|
+
githubProjectsPanelToolsMetadata,
|
|
4746
|
+
githubStarredPanelTools,
|
|
4747
|
+
githubStarredPanelToolsMetadata,
|
|
4047
4748
|
localProjectsPanelTools,
|
|
4048
4749
|
localProjectsPanelToolsMetadata,
|
|
4049
4750
|
onPackageLoad,
|
|
@@ -4053,11 +4754,12 @@ export {
|
|
|
4053
4754
|
openWorkspaceTool,
|
|
4054
4755
|
panels,
|
|
4055
4756
|
refreshWorkspaceTool,
|
|
4056
|
-
|
|
4057
|
-
selectPackageTool,
|
|
4757
|
+
selectProjectRepositoryTool,
|
|
4058
4758
|
selectProjectTool,
|
|
4059
4759
|
selectRepositoryTool,
|
|
4760
|
+
selectStarredRepositoryTool,
|
|
4060
4761
|
selectWorkspaceTool,
|
|
4762
|
+
toggleOwnerSectionTool,
|
|
4061
4763
|
workspaceRepositoriesPanelTools,
|
|
4062
4764
|
workspaceRepositoriesPanelToolsMetadata,
|
|
4063
4765
|
workspacesListPanelTools,
|