@industry-theme/github-panels 0.1.0
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/LICENSE +21 -0
- package/README.md +536 -0
- package/dist/components/GitHubProjectCard.d.ts +24 -0
- package/dist/components/GitHubProjectCard.d.ts.map +1 -0
- package/dist/components/GitHubProjectCard.stories.d.ts +67 -0
- package/dist/components/GitHubProjectCard.stories.d.ts.map +1 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/mocks/githubData.d.ts +29 -0
- package/dist/mocks/githubData.d.ts.map +1 -0
- package/dist/mocks/panelContext.d.ts +24 -0
- package/dist/mocks/panelContext.d.ts.map +1 -0
- package/dist/panels/GitHubProjectsPanel.d.ts +27 -0
- package/dist/panels/GitHubProjectsPanel.d.ts.map +1 -0
- package/dist/panels/GitHubProjectsPanel.stories.d.ts +82 -0
- package/dist/panels/GitHubProjectsPanel.stories.d.ts.map +1 -0
- package/dist/panels.bundle.js +1546 -0
- package/dist/panels.bundle.js.map +1 -0
- package/dist/types/github.d.ts +85 -0
- package/dist/types/github.d.ts.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +86 -0
|
@@ -0,0 +1,1546 @@
|
|
|
1
|
+
import React2, { createContext, useState, useEffect, useContext, forwardRef, createElement, useRef, useCallback, useMemo } from "react";
|
|
2
|
+
var jsxDevRuntime = { exports: {} };
|
|
3
|
+
var reactJsxDevRuntime_production = {};
|
|
4
|
+
/**
|
|
5
|
+
* @license React
|
|
6
|
+
* react-jsx-dev-runtime.production.js
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
var hasRequiredReactJsxDevRuntime_production;
|
|
14
|
+
function requireReactJsxDevRuntime_production() {
|
|
15
|
+
if (hasRequiredReactJsxDevRuntime_production) return reactJsxDevRuntime_production;
|
|
16
|
+
hasRequiredReactJsxDevRuntime_production = 1;
|
|
17
|
+
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
18
|
+
reactJsxDevRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
19
|
+
reactJsxDevRuntime_production.jsxDEV = void 0;
|
|
20
|
+
return reactJsxDevRuntime_production;
|
|
21
|
+
}
|
|
22
|
+
var hasRequiredJsxDevRuntime;
|
|
23
|
+
function requireJsxDevRuntime() {
|
|
24
|
+
if (hasRequiredJsxDevRuntime) return jsxDevRuntime.exports;
|
|
25
|
+
hasRequiredJsxDevRuntime = 1;
|
|
26
|
+
{
|
|
27
|
+
jsxDevRuntime.exports = requireReactJsxDevRuntime_production();
|
|
28
|
+
}
|
|
29
|
+
return jsxDevRuntime.exports;
|
|
30
|
+
}
|
|
31
|
+
var jsxDevRuntimeExports = requireJsxDevRuntime();
|
|
32
|
+
var terminalTheme = {
|
|
33
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
34
|
+
fonts: {
|
|
35
|
+
body: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
|
|
36
|
+
heading: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
|
|
37
|
+
monospace: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace'
|
|
38
|
+
},
|
|
39
|
+
fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
|
|
40
|
+
fontScale: 1,
|
|
41
|
+
fontWeights: {
|
|
42
|
+
body: 400,
|
|
43
|
+
heading: 500,
|
|
44
|
+
bold: 600,
|
|
45
|
+
light: 300,
|
|
46
|
+
medium: 500,
|
|
47
|
+
semibold: 600
|
|
48
|
+
},
|
|
49
|
+
lineHeights: {
|
|
50
|
+
body: 1.6,
|
|
51
|
+
heading: 1.3,
|
|
52
|
+
tight: 1.4,
|
|
53
|
+
relaxed: 1.8
|
|
54
|
+
},
|
|
55
|
+
breakpoints: ["640px", "768px", "1024px", "1280px"],
|
|
56
|
+
sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
|
|
57
|
+
radii: [0, 2, 4, 6, 8, 12, 16, 24],
|
|
58
|
+
shadows: [
|
|
59
|
+
"none",
|
|
60
|
+
"0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
61
|
+
"0 2px 4px 0 rgba(0, 0, 0, 0.06)",
|
|
62
|
+
"0 4px 6px 0 rgba(0, 0, 0, 0.07)",
|
|
63
|
+
"0 8px 12px 0 rgba(0, 0, 0, 0.08)",
|
|
64
|
+
"0 16px 24px 0 rgba(0, 0, 0, 0.10)"
|
|
65
|
+
],
|
|
66
|
+
zIndices: [0, 1, 10, 20, 30, 40, 50],
|
|
67
|
+
colors: {
|
|
68
|
+
text: "#e4e4e4",
|
|
69
|
+
background: "rgba(10, 10, 10, 0.85)",
|
|
70
|
+
primary: "#66b3ff",
|
|
71
|
+
secondary: "#80c4ff",
|
|
72
|
+
accent: "#66ff99",
|
|
73
|
+
highlight: "rgba(102, 179, 255, 0.15)",
|
|
74
|
+
muted: "rgba(26, 26, 26, 0.8)",
|
|
75
|
+
success: "#66ff99",
|
|
76
|
+
warning: "#ffcc66",
|
|
77
|
+
error: "#ff6666",
|
|
78
|
+
info: "#66b3ff",
|
|
79
|
+
border: "rgba(255, 255, 255, 0.1)",
|
|
80
|
+
backgroundSecondary: "rgba(15, 15, 15, 0.9)",
|
|
81
|
+
backgroundTertiary: "rgba(20, 20, 20, 0.9)",
|
|
82
|
+
backgroundLight: "rgba(255, 255, 255, 0.05)",
|
|
83
|
+
backgroundHover: "rgba(102, 179, 255, 0.08)",
|
|
84
|
+
surface: "rgba(15, 15, 15, 0.95)",
|
|
85
|
+
textSecondary: "rgba(255, 255, 255, 0.7)",
|
|
86
|
+
textTertiary: "rgba(255, 255, 255, 0.5)",
|
|
87
|
+
textMuted: "rgba(255, 255, 255, 0.4)",
|
|
88
|
+
highlightBg: "rgba(255, 235, 59, 0.25)",
|
|
89
|
+
highlightBorder: "rgba(255, 235, 59, 0.5)"
|
|
90
|
+
},
|
|
91
|
+
modes: {
|
|
92
|
+
light: {
|
|
93
|
+
text: "#1a1a1a",
|
|
94
|
+
background: "rgba(255, 255, 255, 0.9)",
|
|
95
|
+
primary: "#0066cc",
|
|
96
|
+
secondary: "#0052a3",
|
|
97
|
+
accent: "#00cc88",
|
|
98
|
+
highlight: "rgba(0, 102, 204, 0.08)",
|
|
99
|
+
muted: "rgba(245, 245, 245, 0.8)",
|
|
100
|
+
success: "#00cc88",
|
|
101
|
+
warning: "#ffaa00",
|
|
102
|
+
error: "#ff3333",
|
|
103
|
+
info: "#0066cc",
|
|
104
|
+
border: "rgba(0, 0, 0, 0.1)",
|
|
105
|
+
backgroundSecondary: "rgba(250, 250, 250, 0.9)",
|
|
106
|
+
backgroundTertiary: "rgba(245, 245, 245, 0.9)",
|
|
107
|
+
backgroundLight: "rgba(0, 0, 0, 0.02)",
|
|
108
|
+
backgroundHover: "rgba(0, 102, 204, 0.04)",
|
|
109
|
+
surface: "rgba(255, 255, 255, 0.95)",
|
|
110
|
+
textSecondary: "rgba(0, 0, 0, 0.6)",
|
|
111
|
+
textTertiary: "rgba(0, 0, 0, 0.4)",
|
|
112
|
+
textMuted: "rgba(0, 0, 0, 0.3)",
|
|
113
|
+
highlightBg: "rgba(255, 235, 59, 0.3)",
|
|
114
|
+
highlightBorder: "rgba(255, 235, 59, 0.6)"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
buttons: {
|
|
118
|
+
primary: {
|
|
119
|
+
color: "white",
|
|
120
|
+
bg: "primary",
|
|
121
|
+
borderWidth: 0,
|
|
122
|
+
"&:hover": {
|
|
123
|
+
bg: "secondary"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
secondary: {
|
|
127
|
+
color: "primary",
|
|
128
|
+
bg: "transparent",
|
|
129
|
+
borderWidth: 1,
|
|
130
|
+
borderStyle: "solid",
|
|
131
|
+
borderColor: "primary",
|
|
132
|
+
"&:hover": {
|
|
133
|
+
bg: "highlight"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
ghost: {
|
|
137
|
+
color: "text",
|
|
138
|
+
bg: "transparent",
|
|
139
|
+
"&:hover": {
|
|
140
|
+
bg: "backgroundHover"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
text: {
|
|
145
|
+
heading: {
|
|
146
|
+
fontFamily: "heading",
|
|
147
|
+
fontWeight: "heading",
|
|
148
|
+
lineHeight: "heading"
|
|
149
|
+
},
|
|
150
|
+
body: {
|
|
151
|
+
fontFamily: "body",
|
|
152
|
+
fontWeight: "body",
|
|
153
|
+
lineHeight: "body"
|
|
154
|
+
},
|
|
155
|
+
caption: {
|
|
156
|
+
fontSize: 1,
|
|
157
|
+
color: "textSecondary"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
cards: {
|
|
161
|
+
primary: {
|
|
162
|
+
bg: "surface",
|
|
163
|
+
border: "1px solid",
|
|
164
|
+
borderColor: "border",
|
|
165
|
+
borderRadius: 1
|
|
166
|
+
},
|
|
167
|
+
secondary: {
|
|
168
|
+
bg: "backgroundSecondary",
|
|
169
|
+
border: "1px solid",
|
|
170
|
+
borderColor: "border",
|
|
171
|
+
borderRadius: 1
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
function getMode(theme2, mode) {
|
|
176
|
+
if (!mode || !theme2.modes || !theme2.modes[mode]) {
|
|
177
|
+
return theme2.colors;
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
...theme2.colors,
|
|
181
|
+
...theme2.modes[mode]
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
var ThemeContext;
|
|
185
|
+
var getThemeContext = () => {
|
|
186
|
+
if (typeof window !== "undefined") {
|
|
187
|
+
const globalWindow = window;
|
|
188
|
+
if (!globalWindow.__principlemd_theme_context__) {
|
|
189
|
+
globalWindow.__principlemd_theme_context__ = createContext(void 0);
|
|
190
|
+
}
|
|
191
|
+
return globalWindow.__principlemd_theme_context__;
|
|
192
|
+
} else {
|
|
193
|
+
if (!ThemeContext) {
|
|
194
|
+
ThemeContext = createContext(void 0);
|
|
195
|
+
}
|
|
196
|
+
return ThemeContext;
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
var ThemeContextSingleton = getThemeContext();
|
|
200
|
+
var useTheme = () => {
|
|
201
|
+
const context = useContext(ThemeContextSingleton);
|
|
202
|
+
if (!context) {
|
|
203
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
204
|
+
}
|
|
205
|
+
return context;
|
|
206
|
+
};
|
|
207
|
+
var ThemeProvider = ({
|
|
208
|
+
children,
|
|
209
|
+
theme: customTheme = theme,
|
|
210
|
+
initialMode
|
|
211
|
+
}) => {
|
|
212
|
+
const [mode, setMode] = useState(initialMode);
|
|
213
|
+
const activeTheme = React2.useMemo(() => {
|
|
214
|
+
if (!mode || !customTheme.modes || !customTheme.modes[mode]) {
|
|
215
|
+
return customTheme;
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
...customTheme,
|
|
219
|
+
colors: getMode(customTheme, mode)
|
|
220
|
+
};
|
|
221
|
+
}, [customTheme, mode]);
|
|
222
|
+
useEffect(() => {
|
|
223
|
+
if (!initialMode) {
|
|
224
|
+
const savedMode = localStorage.getItem("principlemd-theme-mode");
|
|
225
|
+
if (savedMode) {
|
|
226
|
+
setMode(savedMode);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}, [initialMode]);
|
|
230
|
+
useEffect(() => {
|
|
231
|
+
if (mode) {
|
|
232
|
+
localStorage.setItem("principlemd-theme-mode", mode);
|
|
233
|
+
} else {
|
|
234
|
+
localStorage.removeItem("principlemd-theme-mode");
|
|
235
|
+
}
|
|
236
|
+
}, [mode]);
|
|
237
|
+
const value = {
|
|
238
|
+
theme: activeTheme,
|
|
239
|
+
mode,
|
|
240
|
+
setMode
|
|
241
|
+
};
|
|
242
|
+
return /* @__PURE__ */ React2.createElement(ThemeContextSingleton.Provider, {
|
|
243
|
+
value
|
|
244
|
+
}, children);
|
|
245
|
+
};
|
|
246
|
+
var theme = terminalTheme;
|
|
247
|
+
/**
|
|
248
|
+
* @license lucide-react v0.552.0 - ISC
|
|
249
|
+
*
|
|
250
|
+
* This source code is licensed under the ISC license.
|
|
251
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
+
*/
|
|
253
|
+
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
254
|
+
const toCamelCase = (string) => string.replace(
|
|
255
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
256
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
257
|
+
);
|
|
258
|
+
const toPascalCase = (string) => {
|
|
259
|
+
const camelCase = toCamelCase(string);
|
|
260
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
261
|
+
};
|
|
262
|
+
const mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
263
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
264
|
+
}).join(" ").trim();
|
|
265
|
+
const hasA11yProp = (props) => {
|
|
266
|
+
for (const prop in props) {
|
|
267
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
268
|
+
return true;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* @license lucide-react v0.552.0 - ISC
|
|
274
|
+
*
|
|
275
|
+
* This source code is licensed under the ISC license.
|
|
276
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
+
*/
|
|
278
|
+
var defaultAttributes = {
|
|
279
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
280
|
+
width: 24,
|
|
281
|
+
height: 24,
|
|
282
|
+
viewBox: "0 0 24 24",
|
|
283
|
+
fill: "none",
|
|
284
|
+
stroke: "currentColor",
|
|
285
|
+
strokeWidth: 2,
|
|
286
|
+
strokeLinecap: "round",
|
|
287
|
+
strokeLinejoin: "round"
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* @license lucide-react v0.552.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/
|
|
295
|
+
const Icon = forwardRef(
|
|
296
|
+
({
|
|
297
|
+
color = "currentColor",
|
|
298
|
+
size = 24,
|
|
299
|
+
strokeWidth = 2,
|
|
300
|
+
absoluteStrokeWidth,
|
|
301
|
+
className = "",
|
|
302
|
+
children,
|
|
303
|
+
iconNode,
|
|
304
|
+
...rest
|
|
305
|
+
}, ref) => createElement(
|
|
306
|
+
"svg",
|
|
307
|
+
{
|
|
308
|
+
ref,
|
|
309
|
+
...defaultAttributes,
|
|
310
|
+
width: size,
|
|
311
|
+
height: size,
|
|
312
|
+
stroke: color,
|
|
313
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
314
|
+
className: mergeClasses("lucide", className),
|
|
315
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
316
|
+
...rest
|
|
317
|
+
},
|
|
318
|
+
[
|
|
319
|
+
...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
|
|
320
|
+
...Array.isArray(children) ? children : [children]
|
|
321
|
+
]
|
|
322
|
+
)
|
|
323
|
+
);
|
|
324
|
+
/**
|
|
325
|
+
* @license lucide-react v0.552.0 - ISC
|
|
326
|
+
*
|
|
327
|
+
* This source code is licensed under the ISC license.
|
|
328
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
+
*/
|
|
330
|
+
const createLucideIcon = (iconName, iconNode) => {
|
|
331
|
+
const Component = forwardRef(
|
|
332
|
+
({ className, ...props }, ref) => createElement(Icon, {
|
|
333
|
+
ref,
|
|
334
|
+
iconNode,
|
|
335
|
+
className: mergeClasses(
|
|
336
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
337
|
+
`lucide-${iconName}`,
|
|
338
|
+
className
|
|
339
|
+
),
|
|
340
|
+
...props
|
|
341
|
+
})
|
|
342
|
+
);
|
|
343
|
+
Component.displayName = toPascalCase(iconName);
|
|
344
|
+
return Component;
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* @license lucide-react v0.552.0 - ISC
|
|
348
|
+
*
|
|
349
|
+
* This source code is licensed under the ISC license.
|
|
350
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
+
*/
|
|
352
|
+
const __iconNode$b = [
|
|
353
|
+
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
354
|
+
["path", { d: "M10 8h4", key: "1sr2af" }],
|
|
355
|
+
["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
|
|
356
|
+
[
|
|
357
|
+
"path",
|
|
358
|
+
{
|
|
359
|
+
d: "M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",
|
|
360
|
+
key: "secmi2"
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
364
|
+
];
|
|
365
|
+
const Building2 = createLucideIcon("building-2", __iconNode$b);
|
|
366
|
+
/**
|
|
367
|
+
* @license lucide-react v0.552.0 - ISC
|
|
368
|
+
*
|
|
369
|
+
* This source code is licensed under the ISC license.
|
|
370
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
371
|
+
*/
|
|
372
|
+
const __iconNode$a = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
373
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$a);
|
|
374
|
+
/**
|
|
375
|
+
* @license lucide-react v0.552.0 - ISC
|
|
376
|
+
*
|
|
377
|
+
* This source code is licensed under the ISC license.
|
|
378
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
379
|
+
*/
|
|
380
|
+
const __iconNode$9 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
381
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$9);
|
|
382
|
+
/**
|
|
383
|
+
* @license lucide-react v0.552.0 - ISC
|
|
384
|
+
*
|
|
385
|
+
* This source code is licensed under the ISC license.
|
|
386
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
387
|
+
*/
|
|
388
|
+
const __iconNode$8 = [
|
|
389
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
390
|
+
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
391
|
+
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
392
|
+
];
|
|
393
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$8);
|
|
394
|
+
/**
|
|
395
|
+
* @license lucide-react v0.552.0 - ISC
|
|
396
|
+
*
|
|
397
|
+
* This source code is licensed under the ISC license.
|
|
398
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
399
|
+
*/
|
|
400
|
+
const __iconNode$7 = [
|
|
401
|
+
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
402
|
+
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
403
|
+
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
404
|
+
];
|
|
405
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$7);
|
|
406
|
+
/**
|
|
407
|
+
* @license lucide-react v0.552.0 - ISC
|
|
408
|
+
*
|
|
409
|
+
* This source code is licensed under the ISC license.
|
|
410
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
411
|
+
*/
|
|
412
|
+
const __iconNode$6 = [
|
|
413
|
+
[
|
|
414
|
+
"path",
|
|
415
|
+
{
|
|
416
|
+
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
|
|
417
|
+
key: "1kt360"
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
];
|
|
421
|
+
const Folder = createLucideIcon("folder", __iconNode$6);
|
|
422
|
+
/**
|
|
423
|
+
* @license lucide-react v0.552.0 - ISC
|
|
424
|
+
*
|
|
425
|
+
* This source code is licensed under the ISC license.
|
|
426
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
427
|
+
*/
|
|
428
|
+
const __iconNode$5 = [
|
|
429
|
+
["circle", { cx: "12", cy: "18", r: "3", key: "1mpf1b" }],
|
|
430
|
+
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
|
|
431
|
+
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
432
|
+
["path", { d: "M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9", key: "1uq4wg" }],
|
|
433
|
+
["path", { d: "M12 12v3", key: "158kv8" }]
|
|
434
|
+
];
|
|
435
|
+
const GitFork = createLucideIcon("git-fork", __iconNode$5);
|
|
436
|
+
/**
|
|
437
|
+
* @license lucide-react v0.552.0 - ISC
|
|
438
|
+
*
|
|
439
|
+
* This source code is licensed under the ISC license.
|
|
440
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
441
|
+
*/
|
|
442
|
+
const __iconNode$4 = [
|
|
443
|
+
[
|
|
444
|
+
"path",
|
|
445
|
+
{
|
|
446
|
+
d: "M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",
|
|
447
|
+
key: "tonef"
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
["path", { d: "M9 18c-4.51 2-5-2-7-2", key: "9comsn" }]
|
|
451
|
+
];
|
|
452
|
+
const Github = createLucideIcon("github", __iconNode$4);
|
|
453
|
+
/**
|
|
454
|
+
* @license lucide-react v0.552.0 - ISC
|
|
455
|
+
*
|
|
456
|
+
* This source code is licensed under the ISC license.
|
|
457
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
458
|
+
*/
|
|
459
|
+
const __iconNode$3 = [
|
|
460
|
+
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
461
|
+
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
462
|
+
];
|
|
463
|
+
const Lock = createLucideIcon("lock", __iconNode$3);
|
|
464
|
+
/**
|
|
465
|
+
* @license lucide-react v0.552.0 - ISC
|
|
466
|
+
*
|
|
467
|
+
* This source code is licensed under the ISC license.
|
|
468
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
469
|
+
*/
|
|
470
|
+
const __iconNode$2 = [
|
|
471
|
+
["path", { d: "m10 17 5-5-5-5", key: "1bsop3" }],
|
|
472
|
+
["path", { d: "M15 12H3", key: "6jk70r" }],
|
|
473
|
+
["path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4", key: "u53s6r" }]
|
|
474
|
+
];
|
|
475
|
+
const LogIn = createLucideIcon("log-in", __iconNode$2);
|
|
476
|
+
/**
|
|
477
|
+
* @license lucide-react v0.552.0 - ISC
|
|
478
|
+
*
|
|
479
|
+
* This source code is licensed under the ISC license.
|
|
480
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
481
|
+
*/
|
|
482
|
+
const __iconNode$1 = [
|
|
483
|
+
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
484
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
485
|
+
];
|
|
486
|
+
const Search = createLucideIcon("search", __iconNode$1);
|
|
487
|
+
/**
|
|
488
|
+
* @license lucide-react v0.552.0 - ISC
|
|
489
|
+
*
|
|
490
|
+
* This source code is licensed under the ISC license.
|
|
491
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
492
|
+
*/
|
|
493
|
+
const __iconNode = [
|
|
494
|
+
[
|
|
495
|
+
"path",
|
|
496
|
+
{
|
|
497
|
+
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",
|
|
498
|
+
key: "r04s7s"
|
|
499
|
+
}
|
|
500
|
+
]
|
|
501
|
+
];
|
|
502
|
+
const Star = createLucideIcon("star", __iconNode);
|
|
503
|
+
function getLanguageColor(language) {
|
|
504
|
+
const colors = {
|
|
505
|
+
TypeScript: "#3178c6",
|
|
506
|
+
JavaScript: "#f7df1e",
|
|
507
|
+
Python: "#3776ab",
|
|
508
|
+
Java: "#b07219",
|
|
509
|
+
Go: "#00add8",
|
|
510
|
+
Rust: "#dea584",
|
|
511
|
+
Ruby: "#cc342d",
|
|
512
|
+
PHP: "#777bb4",
|
|
513
|
+
"C++": "#00599c",
|
|
514
|
+
C: "#555555",
|
|
515
|
+
"C#": "#239120",
|
|
516
|
+
Swift: "#fa7343",
|
|
517
|
+
Kotlin: "#7f52ff",
|
|
518
|
+
Dart: "#0175c2",
|
|
519
|
+
Vue: "#4fc08d",
|
|
520
|
+
HTML: "#e34c26",
|
|
521
|
+
CSS: "#1572b6",
|
|
522
|
+
Shell: "#89e051",
|
|
523
|
+
PowerShell: "#012456"
|
|
524
|
+
};
|
|
525
|
+
return colors[language] || "#6e7681";
|
|
526
|
+
}
|
|
527
|
+
function formatCount(count) {
|
|
528
|
+
if (count >= 1e6) {
|
|
529
|
+
return `${(count / 1e6).toFixed(1)}m`;
|
|
530
|
+
}
|
|
531
|
+
if (count >= 1e3) {
|
|
532
|
+
return `${(count / 1e3).toFixed(1)}k`;
|
|
533
|
+
}
|
|
534
|
+
return count.toString();
|
|
535
|
+
}
|
|
536
|
+
const GitHubProjectCard = ({
|
|
537
|
+
repository,
|
|
538
|
+
isSelected = false,
|
|
539
|
+
onSelect,
|
|
540
|
+
onOpenInGitHub
|
|
541
|
+
}) => {
|
|
542
|
+
var _a;
|
|
543
|
+
const { theme: theme2 } = useTheme();
|
|
544
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
545
|
+
const highlightColor = theme2.colors.primary;
|
|
546
|
+
const handleCardClick = () => {
|
|
547
|
+
onSelect == null ? void 0 : onSelect(repository);
|
|
548
|
+
};
|
|
549
|
+
const handleOpenInGitHub = (e) => {
|
|
550
|
+
e.stopPropagation();
|
|
551
|
+
if (onOpenInGitHub) {
|
|
552
|
+
onOpenInGitHub(repository);
|
|
553
|
+
} else {
|
|
554
|
+
window.open(repository.html_url, "_blank");
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
const starCount = repository.stargazers_count ?? 0;
|
|
558
|
+
const forkCount = repository.forks_count ?? 0;
|
|
559
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
560
|
+
"div",
|
|
561
|
+
{
|
|
562
|
+
style: {
|
|
563
|
+
display: "flex",
|
|
564
|
+
alignItems: "center",
|
|
565
|
+
gap: "12px",
|
|
566
|
+
padding: "10px 12px",
|
|
567
|
+
borderRadius: "6px",
|
|
568
|
+
backgroundColor: isSelected ? `${highlightColor}15` : isHovered ? theme2.colors.backgroundTertiary || theme2.colors.backgroundSecondary : "transparent",
|
|
569
|
+
border: isSelected ? `1px solid ${highlightColor}40` : "1px solid transparent",
|
|
570
|
+
cursor: "pointer",
|
|
571
|
+
transition: "all 0.15s ease"
|
|
572
|
+
},
|
|
573
|
+
onClick: handleCardClick,
|
|
574
|
+
onMouseEnter: () => setIsHovered(true),
|
|
575
|
+
onMouseLeave: () => setIsHovered(false),
|
|
576
|
+
children: [
|
|
577
|
+
repository.owner.avatar_url ? /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
578
|
+
"img",
|
|
579
|
+
{
|
|
580
|
+
src: repository.owner.avatar_url,
|
|
581
|
+
alt: repository.owner.login,
|
|
582
|
+
style: {
|
|
583
|
+
width: "32px",
|
|
584
|
+
height: "32px",
|
|
585
|
+
borderRadius: "50%",
|
|
586
|
+
flexShrink: 0
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
void 0,
|
|
590
|
+
false,
|
|
591
|
+
{
|
|
592
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
593
|
+
lineNumber: 127,
|
|
594
|
+
columnNumber: 9
|
|
595
|
+
},
|
|
596
|
+
void 0
|
|
597
|
+
) : /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
598
|
+
"div",
|
|
599
|
+
{
|
|
600
|
+
style: {
|
|
601
|
+
width: "32px",
|
|
602
|
+
height: "32px",
|
|
603
|
+
borderRadius: "50%",
|
|
604
|
+
flexShrink: 0,
|
|
605
|
+
backgroundColor: theme2.colors.backgroundTertiary || theme2.colors.backgroundSecondary,
|
|
606
|
+
display: "flex",
|
|
607
|
+
alignItems: "center",
|
|
608
|
+
justifyContent: "center",
|
|
609
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
610
|
+
fontWeight: theme2.fontWeights.semibold,
|
|
611
|
+
color: theme2.colors.textSecondary
|
|
612
|
+
},
|
|
613
|
+
children: ((_a = repository.owner.login[0]) == null ? void 0 : _a.toUpperCase()) || "?"
|
|
614
|
+
},
|
|
615
|
+
void 0,
|
|
616
|
+
false,
|
|
617
|
+
{
|
|
618
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
619
|
+
lineNumber: 138,
|
|
620
|
+
columnNumber: 9
|
|
621
|
+
},
|
|
622
|
+
void 0
|
|
623
|
+
),
|
|
624
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
625
|
+
"div",
|
|
626
|
+
{
|
|
627
|
+
style: {
|
|
628
|
+
flex: 1,
|
|
629
|
+
minWidth: 0,
|
|
630
|
+
display: "flex",
|
|
631
|
+
flexDirection: "column",
|
|
632
|
+
gap: "4px"
|
|
633
|
+
},
|
|
634
|
+
children: [
|
|
635
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
636
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
637
|
+
"span",
|
|
638
|
+
{
|
|
639
|
+
style: {
|
|
640
|
+
fontSize: `${theme2.fontSizes[2]}px`,
|
|
641
|
+
fontWeight: theme2.fontWeights.medium,
|
|
642
|
+
color: theme2.colors.text,
|
|
643
|
+
overflow: "hidden",
|
|
644
|
+
textOverflow: "ellipsis",
|
|
645
|
+
whiteSpace: "nowrap"
|
|
646
|
+
},
|
|
647
|
+
children: repository.name
|
|
648
|
+
},
|
|
649
|
+
void 0,
|
|
650
|
+
false,
|
|
651
|
+
{
|
|
652
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
653
|
+
lineNumber: 169,
|
|
654
|
+
columnNumber: 11
|
|
655
|
+
},
|
|
656
|
+
void 0
|
|
657
|
+
),
|
|
658
|
+
repository.private && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Lock, { size: 12, color: theme2.colors.warning || "#f59e0b" }, void 0, false, {
|
|
659
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
660
|
+
lineNumber: 182,
|
|
661
|
+
columnNumber: 13
|
|
662
|
+
}, void 0),
|
|
663
|
+
repository.fork && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(GitFork, { size: 12, color: theme2.colors.textSecondary }, void 0, false, {
|
|
664
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
665
|
+
lineNumber: 185,
|
|
666
|
+
columnNumber: 13
|
|
667
|
+
}, void 0)
|
|
668
|
+
] }, void 0, true, {
|
|
669
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
670
|
+
lineNumber: 168,
|
|
671
|
+
columnNumber: 9
|
|
672
|
+
}, void 0),
|
|
673
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
674
|
+
"div",
|
|
675
|
+
{
|
|
676
|
+
style: {
|
|
677
|
+
display: "flex",
|
|
678
|
+
alignItems: "center",
|
|
679
|
+
gap: "12px",
|
|
680
|
+
fontSize: `${theme2.fontSizes[0]}px`,
|
|
681
|
+
color: theme2.colors.textSecondary,
|
|
682
|
+
flexWrap: "wrap"
|
|
683
|
+
},
|
|
684
|
+
children: [
|
|
685
|
+
repository.language && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
686
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
687
|
+
"span",
|
|
688
|
+
{
|
|
689
|
+
style: {
|
|
690
|
+
display: "inline-block",
|
|
691
|
+
width: "8px",
|
|
692
|
+
height: "8px",
|
|
693
|
+
borderRadius: "50%",
|
|
694
|
+
backgroundColor: getLanguageColor(repository.language)
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
void 0,
|
|
698
|
+
false,
|
|
699
|
+
{
|
|
700
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
701
|
+
lineNumber: 203,
|
|
702
|
+
columnNumber: 15
|
|
703
|
+
},
|
|
704
|
+
void 0
|
|
705
|
+
),
|
|
706
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { children: repository.language }, void 0, false, {
|
|
707
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
708
|
+
lineNumber: 212,
|
|
709
|
+
columnNumber: 15
|
|
710
|
+
}, void 0)
|
|
711
|
+
] }, void 0, true, {
|
|
712
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
713
|
+
lineNumber: 202,
|
|
714
|
+
columnNumber: 13
|
|
715
|
+
}, void 0),
|
|
716
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
717
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Star, { size: 12 }, void 0, false, {
|
|
718
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
719
|
+
lineNumber: 218,
|
|
720
|
+
columnNumber: 13
|
|
721
|
+
}, void 0),
|
|
722
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { children: formatCount(starCount) }, void 0, false, {
|
|
723
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
724
|
+
lineNumber: 219,
|
|
725
|
+
columnNumber: 13
|
|
726
|
+
}, void 0)
|
|
727
|
+
] }, void 0, true, {
|
|
728
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
729
|
+
lineNumber: 217,
|
|
730
|
+
columnNumber: 11
|
|
731
|
+
}, void 0),
|
|
732
|
+
forkCount > 0 && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
733
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(GitFork, { size: 12 }, void 0, false, {
|
|
734
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
735
|
+
lineNumber: 225,
|
|
736
|
+
columnNumber: 15
|
|
737
|
+
}, void 0),
|
|
738
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { children: formatCount(forkCount) }, void 0, false, {
|
|
739
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
740
|
+
lineNumber: 226,
|
|
741
|
+
columnNumber: 15
|
|
742
|
+
}, void 0)
|
|
743
|
+
] }, void 0, true, {
|
|
744
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
745
|
+
lineNumber: 224,
|
|
746
|
+
columnNumber: 13
|
|
747
|
+
}, void 0)
|
|
748
|
+
]
|
|
749
|
+
},
|
|
750
|
+
void 0,
|
|
751
|
+
true,
|
|
752
|
+
{
|
|
753
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
754
|
+
lineNumber: 190,
|
|
755
|
+
columnNumber: 9
|
|
756
|
+
},
|
|
757
|
+
void 0
|
|
758
|
+
),
|
|
759
|
+
repository.description && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
760
|
+
"div",
|
|
761
|
+
{
|
|
762
|
+
style: {
|
|
763
|
+
fontSize: `${theme2.fontSizes[0]}px`,
|
|
764
|
+
color: theme2.colors.textSecondary,
|
|
765
|
+
overflow: "hidden",
|
|
766
|
+
textOverflow: "ellipsis",
|
|
767
|
+
whiteSpace: "nowrap"
|
|
768
|
+
},
|
|
769
|
+
children: repository.description
|
|
770
|
+
},
|
|
771
|
+
void 0,
|
|
772
|
+
false,
|
|
773
|
+
{
|
|
774
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
775
|
+
lineNumber: 233,
|
|
776
|
+
columnNumber: 11
|
|
777
|
+
},
|
|
778
|
+
void 0
|
|
779
|
+
)
|
|
780
|
+
]
|
|
781
|
+
},
|
|
782
|
+
void 0,
|
|
783
|
+
true,
|
|
784
|
+
{
|
|
785
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
786
|
+
lineNumber: 158,
|
|
787
|
+
columnNumber: 7
|
|
788
|
+
},
|
|
789
|
+
void 0
|
|
790
|
+
),
|
|
791
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
792
|
+
"button",
|
|
793
|
+
{
|
|
794
|
+
type: "button",
|
|
795
|
+
onClick: handleOpenInGitHub,
|
|
796
|
+
title: "View on GitHub",
|
|
797
|
+
style: {
|
|
798
|
+
display: "inline-flex",
|
|
799
|
+
alignItems: "center",
|
|
800
|
+
justifyContent: "center",
|
|
801
|
+
padding: "6px",
|
|
802
|
+
borderRadius: "4px",
|
|
803
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
804
|
+
backgroundColor: theme2.colors.background,
|
|
805
|
+
color: theme2.colors.textSecondary,
|
|
806
|
+
cursor: "pointer",
|
|
807
|
+
transition: "all 0.15s ease",
|
|
808
|
+
flexShrink: 0
|
|
809
|
+
},
|
|
810
|
+
onMouseEnter: (e) => {
|
|
811
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundTertiary || theme2.colors.backgroundSecondary;
|
|
812
|
+
e.currentTarget.style.color = theme2.colors.text;
|
|
813
|
+
},
|
|
814
|
+
onMouseLeave: (e) => {
|
|
815
|
+
e.currentTarget.style.backgroundColor = theme2.colors.background;
|
|
816
|
+
e.currentTarget.style.color = theme2.colors.textSecondary;
|
|
817
|
+
},
|
|
818
|
+
children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ExternalLink, { size: 14 }, void 0, false, {
|
|
819
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
820
|
+
lineNumber: 275,
|
|
821
|
+
columnNumber: 9
|
|
822
|
+
}, void 0)
|
|
823
|
+
},
|
|
824
|
+
void 0,
|
|
825
|
+
false,
|
|
826
|
+
{
|
|
827
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
828
|
+
lineNumber: 248,
|
|
829
|
+
columnNumber: 7
|
|
830
|
+
},
|
|
831
|
+
void 0
|
|
832
|
+
)
|
|
833
|
+
]
|
|
834
|
+
},
|
|
835
|
+
void 0,
|
|
836
|
+
true,
|
|
837
|
+
{
|
|
838
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/components/GitHubProjectCard.tsx",
|
|
839
|
+
lineNumber: 103,
|
|
840
|
+
columnNumber: 5
|
|
841
|
+
},
|
|
842
|
+
void 0
|
|
843
|
+
);
|
|
844
|
+
};
|
|
845
|
+
const EXPANDED_BREAKPOINT = 600;
|
|
846
|
+
const Section = ({
|
|
847
|
+
title,
|
|
848
|
+
icon,
|
|
849
|
+
count,
|
|
850
|
+
isExpanded,
|
|
851
|
+
onToggle,
|
|
852
|
+
children,
|
|
853
|
+
layoutMode
|
|
854
|
+
}) => {
|
|
855
|
+
const { theme: theme2 } = useTheme();
|
|
856
|
+
const showContent = layoutMode === "expanded" || isExpanded;
|
|
857
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
858
|
+
"div",
|
|
859
|
+
{
|
|
860
|
+
style: {
|
|
861
|
+
marginBottom: layoutMode === "compact" ? "8px" : "0",
|
|
862
|
+
flex: layoutMode === "expanded" ? "1 1 0" : void 0,
|
|
863
|
+
minWidth: layoutMode === "expanded" ? "280px" : void 0,
|
|
864
|
+
display: "flex",
|
|
865
|
+
flexDirection: "column",
|
|
866
|
+
borderRight: layoutMode === "expanded" ? `1px solid ${theme2.colors.border}` : void 0,
|
|
867
|
+
overflow: "hidden"
|
|
868
|
+
},
|
|
869
|
+
children: [
|
|
870
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
871
|
+
"button",
|
|
872
|
+
{
|
|
873
|
+
type: "button",
|
|
874
|
+
onClick: layoutMode === "compact" ? onToggle : void 0,
|
|
875
|
+
style: {
|
|
876
|
+
width: "100%",
|
|
877
|
+
display: "flex",
|
|
878
|
+
alignItems: "center",
|
|
879
|
+
gap: "8px",
|
|
880
|
+
padding: "10px 12px",
|
|
881
|
+
border: "none",
|
|
882
|
+
background: "none",
|
|
883
|
+
cursor: layoutMode === "compact" ? "pointer" : "default",
|
|
884
|
+
color: theme2.colors.text,
|
|
885
|
+
fontSize: `${theme2.fontSizes[2]}px`,
|
|
886
|
+
fontWeight: theme2.fontWeights.semibold,
|
|
887
|
+
borderBottom: layoutMode === "expanded" ? `1px solid ${theme2.colors.border}` : void 0
|
|
888
|
+
},
|
|
889
|
+
children: [
|
|
890
|
+
layoutMode === "compact" && (isExpanded ? /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ChevronDown, { size: 16 }, void 0, false, {
|
|
891
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
892
|
+
lineNumber: 88,
|
|
893
|
+
columnNumber: 52
|
|
894
|
+
}, void 0) : /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ChevronRight, { size: 16 }, void 0, false, {
|
|
895
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
896
|
+
lineNumber: 88,
|
|
897
|
+
columnNumber: 80
|
|
898
|
+
}, void 0)),
|
|
899
|
+
icon,
|
|
900
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { children: title }, void 0, false, {
|
|
901
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
902
|
+
lineNumber: 90,
|
|
903
|
+
columnNumber: 9
|
|
904
|
+
}, void 0),
|
|
905
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
906
|
+
"span",
|
|
907
|
+
{
|
|
908
|
+
style: {
|
|
909
|
+
marginLeft: "auto",
|
|
910
|
+
fontSize: `${theme2.fontSizes[0]}px`,
|
|
911
|
+
color: theme2.colors.textSecondary,
|
|
912
|
+
backgroundColor: theme2.colors.backgroundTertiary || theme2.colors.backgroundSecondary,
|
|
913
|
+
padding: "2px 8px",
|
|
914
|
+
borderRadius: "10px"
|
|
915
|
+
},
|
|
916
|
+
children: count
|
|
917
|
+
},
|
|
918
|
+
void 0,
|
|
919
|
+
false,
|
|
920
|
+
{
|
|
921
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
922
|
+
lineNumber: 91,
|
|
923
|
+
columnNumber: 9
|
|
924
|
+
},
|
|
925
|
+
void 0
|
|
926
|
+
)
|
|
927
|
+
]
|
|
928
|
+
},
|
|
929
|
+
void 0,
|
|
930
|
+
true,
|
|
931
|
+
{
|
|
932
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
933
|
+
lineNumber: 70,
|
|
934
|
+
columnNumber: 7
|
|
935
|
+
},
|
|
936
|
+
void 0
|
|
937
|
+
),
|
|
938
|
+
showContent && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
939
|
+
"div",
|
|
940
|
+
{
|
|
941
|
+
style: {
|
|
942
|
+
padding: "4px",
|
|
943
|
+
display: "flex",
|
|
944
|
+
flexDirection: "column",
|
|
945
|
+
gap: "0",
|
|
946
|
+
flex: layoutMode === "expanded" ? 1 : void 0,
|
|
947
|
+
overflowY: layoutMode === "expanded" ? "auto" : void 0
|
|
948
|
+
},
|
|
949
|
+
children
|
|
950
|
+
},
|
|
951
|
+
void 0,
|
|
952
|
+
false,
|
|
953
|
+
{
|
|
954
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
955
|
+
lineNumber: 105,
|
|
956
|
+
columnNumber: 9
|
|
957
|
+
},
|
|
958
|
+
void 0
|
|
959
|
+
)
|
|
960
|
+
]
|
|
961
|
+
},
|
|
962
|
+
void 0,
|
|
963
|
+
true,
|
|
964
|
+
{
|
|
965
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
966
|
+
lineNumber: 59,
|
|
967
|
+
columnNumber: 5
|
|
968
|
+
},
|
|
969
|
+
void 0
|
|
970
|
+
);
|
|
971
|
+
};
|
|
972
|
+
const GitHubProjectsPanelContent = ({
|
|
973
|
+
context,
|
|
974
|
+
events
|
|
975
|
+
}) => {
|
|
976
|
+
const { theme: theme2 } = useTheme();
|
|
977
|
+
const containerRef = useRef(null);
|
|
978
|
+
const [layoutMode, setLayoutMode] = useState("compact");
|
|
979
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
980
|
+
const [selectedRepoId, setSelectedRepoId] = useState(null);
|
|
981
|
+
const [expandedSections, setExpandedSections] = useState(
|
|
982
|
+
/* @__PURE__ */ new Set(["owned", "starred"])
|
|
983
|
+
);
|
|
984
|
+
const githubSlice = context.getSlice("github-repositories");
|
|
985
|
+
const isLoading = context.isSliceLoading("github-repositories");
|
|
986
|
+
const hasData = context.hasSlice("github-repositories");
|
|
987
|
+
const data = githubSlice == null ? void 0 : githubSlice.data;
|
|
988
|
+
useEffect(() => {
|
|
989
|
+
const container = containerRef.current;
|
|
990
|
+
if (!container) return;
|
|
991
|
+
const observer = new ResizeObserver((entries) => {
|
|
992
|
+
for (const entry of entries) {
|
|
993
|
+
const width = entry.contentRect.width;
|
|
994
|
+
setLayoutMode(width >= EXPANDED_BREAKPOINT ? "expanded" : "compact");
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
observer.observe(container);
|
|
998
|
+
return () => observer.disconnect();
|
|
999
|
+
}, []);
|
|
1000
|
+
const filterRepos = useCallback((repos) => {
|
|
1001
|
+
if (!searchQuery) return repos;
|
|
1002
|
+
const query = searchQuery.toLowerCase();
|
|
1003
|
+
return repos.filter(
|
|
1004
|
+
(repo) => {
|
|
1005
|
+
var _a, _b;
|
|
1006
|
+
return repo.name.toLowerCase().includes(query) || repo.full_name.toLowerCase().includes(query) || ((_a = repo.description) == null ? void 0 : _a.toLowerCase().includes(query)) || ((_b = repo.language) == null ? void 0 : _b.toLowerCase().includes(query));
|
|
1007
|
+
}
|
|
1008
|
+
);
|
|
1009
|
+
}, [searchQuery]);
|
|
1010
|
+
const filteredOwned = useMemo(() => filterRepos((data == null ? void 0 : data.owned) || []), [data == null ? void 0 : data.owned, filterRepos]);
|
|
1011
|
+
const filteredStarred = useMemo(() => filterRepos((data == null ? void 0 : data.starred) || []), [data == null ? void 0 : data.starred, filterRepos]);
|
|
1012
|
+
const filteredOrgs = useMemo(() => {
|
|
1013
|
+
if (!(data == null ? void 0 : data.organizations)) return [];
|
|
1014
|
+
return data.organizations.map((org) => ({
|
|
1015
|
+
...org,
|
|
1016
|
+
repositories: filterRepos(org.repositories)
|
|
1017
|
+
})).filter((org) => org.repositories.length > 0 || !searchQuery);
|
|
1018
|
+
}, [data == null ? void 0 : data.organizations, filterRepos, searchQuery]);
|
|
1019
|
+
const toggleSection = (section) => {
|
|
1020
|
+
setExpandedSections((prev) => {
|
|
1021
|
+
const next = new Set(prev);
|
|
1022
|
+
if (next.has(section)) {
|
|
1023
|
+
next.delete(section);
|
|
1024
|
+
} else {
|
|
1025
|
+
next.add(section);
|
|
1026
|
+
}
|
|
1027
|
+
return next;
|
|
1028
|
+
});
|
|
1029
|
+
};
|
|
1030
|
+
const handleSelectRepository = (repo) => {
|
|
1031
|
+
setSelectedRepoId(repo.id);
|
|
1032
|
+
events.emit({
|
|
1033
|
+
type: "repository:selected",
|
|
1034
|
+
source: "github-projects-panel",
|
|
1035
|
+
timestamp: Date.now(),
|
|
1036
|
+
payload: {
|
|
1037
|
+
repository: repo,
|
|
1038
|
+
source: "click"
|
|
1039
|
+
}
|
|
1040
|
+
});
|
|
1041
|
+
};
|
|
1042
|
+
const renderEmptyState = (message) => /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1043
|
+
"div",
|
|
1044
|
+
{
|
|
1045
|
+
style: {
|
|
1046
|
+
padding: "16px",
|
|
1047
|
+
textAlign: "center",
|
|
1048
|
+
color: theme2.colors.textSecondary,
|
|
1049
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1050
|
+
gridColumn: layoutMode === "expanded" ? "1 / -1" : void 0
|
|
1051
|
+
},
|
|
1052
|
+
children: message
|
|
1053
|
+
},
|
|
1054
|
+
void 0,
|
|
1055
|
+
false,
|
|
1056
|
+
{
|
|
1057
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1058
|
+
lineNumber: 214,
|
|
1059
|
+
columnNumber: 5
|
|
1060
|
+
},
|
|
1061
|
+
void 0
|
|
1062
|
+
);
|
|
1063
|
+
const renderCards = (repos) => repos.map((repo) => /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1064
|
+
GitHubProjectCard,
|
|
1065
|
+
{
|
|
1066
|
+
repository: repo,
|
|
1067
|
+
isSelected: selectedRepoId === repo.id,
|
|
1068
|
+
onSelect: handleSelectRepository
|
|
1069
|
+
},
|
|
1070
|
+
repo.id,
|
|
1071
|
+
false,
|
|
1072
|
+
{
|
|
1073
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1074
|
+
lineNumber: 230,
|
|
1075
|
+
columnNumber: 7
|
|
1076
|
+
},
|
|
1077
|
+
void 0
|
|
1078
|
+
));
|
|
1079
|
+
if (hasData && data && !data.isAuthenticated) {
|
|
1080
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1081
|
+
"div",
|
|
1082
|
+
{
|
|
1083
|
+
ref: containerRef,
|
|
1084
|
+
style: {
|
|
1085
|
+
height: "100%",
|
|
1086
|
+
display: "flex",
|
|
1087
|
+
flexDirection: "column",
|
|
1088
|
+
alignItems: "center",
|
|
1089
|
+
justifyContent: "center",
|
|
1090
|
+
gap: "16px",
|
|
1091
|
+
padding: "24px",
|
|
1092
|
+
color: theme2.colors.textSecondary
|
|
1093
|
+
},
|
|
1094
|
+
children: [
|
|
1095
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(LogIn, { size: 48, color: theme2.colors.textSecondary }, void 0, false, {
|
|
1096
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1097
|
+
lineNumber: 254,
|
|
1098
|
+
columnNumber: 9
|
|
1099
|
+
}, void 0),
|
|
1100
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1101
|
+
"h3",
|
|
1102
|
+
{
|
|
1103
|
+
style: {
|
|
1104
|
+
margin: 0,
|
|
1105
|
+
fontSize: `${theme2.fontSizes[3]}px`,
|
|
1106
|
+
color: theme2.colors.text
|
|
1107
|
+
},
|
|
1108
|
+
children: "Sign in to GitHub"
|
|
1109
|
+
},
|
|
1110
|
+
void 0,
|
|
1111
|
+
false,
|
|
1112
|
+
{
|
|
1113
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1114
|
+
lineNumber: 255,
|
|
1115
|
+
columnNumber: 9
|
|
1116
|
+
},
|
|
1117
|
+
void 0
|
|
1118
|
+
),
|
|
1119
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("p", { style: { margin: 0, textAlign: "center" }, children: "Connect your GitHub account to see your repositories" }, void 0, false, {
|
|
1120
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1121
|
+
lineNumber: 264,
|
|
1122
|
+
columnNumber: 9
|
|
1123
|
+
}, void 0),
|
|
1124
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1125
|
+
"button",
|
|
1126
|
+
{
|
|
1127
|
+
type: "button",
|
|
1128
|
+
style: {
|
|
1129
|
+
display: "flex",
|
|
1130
|
+
alignItems: "center",
|
|
1131
|
+
gap: "8px",
|
|
1132
|
+
padding: "10px 20px",
|
|
1133
|
+
borderRadius: "6px",
|
|
1134
|
+
border: "none",
|
|
1135
|
+
backgroundColor: theme2.colors.primary,
|
|
1136
|
+
color: theme2.colors.background,
|
|
1137
|
+
fontSize: `${theme2.fontSizes[2]}px`,
|
|
1138
|
+
fontWeight: theme2.fontWeights.medium,
|
|
1139
|
+
cursor: "pointer"
|
|
1140
|
+
},
|
|
1141
|
+
children: [
|
|
1142
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Github, { size: 18 }, void 0, false, {
|
|
1143
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1144
|
+
lineNumber: 283,
|
|
1145
|
+
columnNumber: 11
|
|
1146
|
+
}, void 0),
|
|
1147
|
+
"Sign in with GitHub"
|
|
1148
|
+
]
|
|
1149
|
+
},
|
|
1150
|
+
void 0,
|
|
1151
|
+
true,
|
|
1152
|
+
{
|
|
1153
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1154
|
+
lineNumber: 267,
|
|
1155
|
+
columnNumber: 9
|
|
1156
|
+
},
|
|
1157
|
+
void 0
|
|
1158
|
+
)
|
|
1159
|
+
]
|
|
1160
|
+
},
|
|
1161
|
+
void 0,
|
|
1162
|
+
true,
|
|
1163
|
+
{
|
|
1164
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1165
|
+
lineNumber: 241,
|
|
1166
|
+
columnNumber: 7
|
|
1167
|
+
},
|
|
1168
|
+
void 0
|
|
1169
|
+
);
|
|
1170
|
+
}
|
|
1171
|
+
if (isLoading) {
|
|
1172
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1173
|
+
"div",
|
|
1174
|
+
{
|
|
1175
|
+
ref: containerRef,
|
|
1176
|
+
style: {
|
|
1177
|
+
height: "100%",
|
|
1178
|
+
display: "flex",
|
|
1179
|
+
alignItems: "center",
|
|
1180
|
+
justifyContent: "center",
|
|
1181
|
+
color: theme2.colors.textSecondary
|
|
1182
|
+
},
|
|
1183
|
+
children: "Loading repositories..."
|
|
1184
|
+
},
|
|
1185
|
+
void 0,
|
|
1186
|
+
false,
|
|
1187
|
+
{
|
|
1188
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1189
|
+
lineNumber: 293,
|
|
1190
|
+
columnNumber: 7
|
|
1191
|
+
},
|
|
1192
|
+
void 0
|
|
1193
|
+
);
|
|
1194
|
+
}
|
|
1195
|
+
if (!hasData || !data) {
|
|
1196
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1197
|
+
"div",
|
|
1198
|
+
{
|
|
1199
|
+
ref: containerRef,
|
|
1200
|
+
style: {
|
|
1201
|
+
height: "100%",
|
|
1202
|
+
display: "flex",
|
|
1203
|
+
flexDirection: "column",
|
|
1204
|
+
alignItems: "center",
|
|
1205
|
+
justifyContent: "center",
|
|
1206
|
+
gap: "12px",
|
|
1207
|
+
padding: "24px",
|
|
1208
|
+
color: theme2.colors.textSecondary
|
|
1209
|
+
},
|
|
1210
|
+
children: [
|
|
1211
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(CircleAlert, { size: 48 }, void 0, false, {
|
|
1212
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1213
|
+
lineNumber: 324,
|
|
1214
|
+
columnNumber: 9
|
|
1215
|
+
}, void 0),
|
|
1216
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("p", { style: { margin: 0 }, children: "No GitHub data available" }, void 0, false, {
|
|
1217
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1218
|
+
lineNumber: 325,
|
|
1219
|
+
columnNumber: 9
|
|
1220
|
+
}, void 0)
|
|
1221
|
+
]
|
|
1222
|
+
},
|
|
1223
|
+
void 0,
|
|
1224
|
+
true,
|
|
1225
|
+
{
|
|
1226
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1227
|
+
lineNumber: 311,
|
|
1228
|
+
columnNumber: 7
|
|
1229
|
+
},
|
|
1230
|
+
void 0
|
|
1231
|
+
);
|
|
1232
|
+
}
|
|
1233
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1234
|
+
"div",
|
|
1235
|
+
{
|
|
1236
|
+
ref: containerRef,
|
|
1237
|
+
style: {
|
|
1238
|
+
height: "100%",
|
|
1239
|
+
display: "flex",
|
|
1240
|
+
flexDirection: "column",
|
|
1241
|
+
backgroundColor: theme2.colors.background,
|
|
1242
|
+
color: theme2.colors.text,
|
|
1243
|
+
fontFamily: theme2.fonts.body
|
|
1244
|
+
},
|
|
1245
|
+
children: [
|
|
1246
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1247
|
+
"div",
|
|
1248
|
+
{
|
|
1249
|
+
style: {
|
|
1250
|
+
padding: "12px 16px",
|
|
1251
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
1252
|
+
display: "flex",
|
|
1253
|
+
alignItems: "center",
|
|
1254
|
+
gap: "12px",
|
|
1255
|
+
flexWrap: "wrap"
|
|
1256
|
+
},
|
|
1257
|
+
children: [
|
|
1258
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Github, { size: 20, color: theme2.colors.primary }, void 0, false, {
|
|
1259
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1260
|
+
lineNumber: 353,
|
|
1261
|
+
columnNumber: 9
|
|
1262
|
+
}, void 0),
|
|
1263
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1264
|
+
"h2",
|
|
1265
|
+
{
|
|
1266
|
+
style: {
|
|
1267
|
+
margin: 0,
|
|
1268
|
+
fontSize: `${theme2.fontSizes[3]}px`,
|
|
1269
|
+
fontWeight: theme2.fontWeights.semibold
|
|
1270
|
+
},
|
|
1271
|
+
children: "GitHub Projects"
|
|
1272
|
+
},
|
|
1273
|
+
void 0,
|
|
1274
|
+
false,
|
|
1275
|
+
{
|
|
1276
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1277
|
+
lineNumber: 354,
|
|
1278
|
+
columnNumber: 9
|
|
1279
|
+
},
|
|
1280
|
+
void 0
|
|
1281
|
+
),
|
|
1282
|
+
data.username && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1283
|
+
"span",
|
|
1284
|
+
{
|
|
1285
|
+
style: {
|
|
1286
|
+
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1287
|
+
color: theme2.colors.textSecondary
|
|
1288
|
+
},
|
|
1289
|
+
children: [
|
|
1290
|
+
"@",
|
|
1291
|
+
data.username
|
|
1292
|
+
]
|
|
1293
|
+
},
|
|
1294
|
+
void 0,
|
|
1295
|
+
true,
|
|
1296
|
+
{
|
|
1297
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1298
|
+
lineNumber: 364,
|
|
1299
|
+
columnNumber: 11
|
|
1300
|
+
},
|
|
1301
|
+
void 0
|
|
1302
|
+
)
|
|
1303
|
+
]
|
|
1304
|
+
},
|
|
1305
|
+
void 0,
|
|
1306
|
+
true,
|
|
1307
|
+
{
|
|
1308
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1309
|
+
lineNumber: 343,
|
|
1310
|
+
columnNumber: 7
|
|
1311
|
+
},
|
|
1312
|
+
void 0
|
|
1313
|
+
),
|
|
1314
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", { style: { padding: "12px 16px" }, children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1315
|
+
"div",
|
|
1316
|
+
{
|
|
1317
|
+
style: {
|
|
1318
|
+
display: "flex",
|
|
1319
|
+
alignItems: "center",
|
|
1320
|
+
gap: "8px",
|
|
1321
|
+
padding: "8px 12px",
|
|
1322
|
+
borderRadius: "6px",
|
|
1323
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
1324
|
+
border: `1px solid ${theme2.colors.border}`
|
|
1325
|
+
},
|
|
1326
|
+
children: [
|
|
1327
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Search, { size: 16, color: theme2.colors.textSecondary }, void 0, false, {
|
|
1328
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1329
|
+
lineNumber: 388,
|
|
1330
|
+
columnNumber: 11
|
|
1331
|
+
}, void 0),
|
|
1332
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1333
|
+
"input",
|
|
1334
|
+
{
|
|
1335
|
+
type: "text",
|
|
1336
|
+
placeholder: "Search repositories...",
|
|
1337
|
+
value: searchQuery,
|
|
1338
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
1339
|
+
style: {
|
|
1340
|
+
flex: 1,
|
|
1341
|
+
border: "none",
|
|
1342
|
+
background: "none",
|
|
1343
|
+
outline: "none",
|
|
1344
|
+
fontSize: `${theme2.fontSizes[2]}px`,
|
|
1345
|
+
color: theme2.colors.text
|
|
1346
|
+
}
|
|
1347
|
+
},
|
|
1348
|
+
void 0,
|
|
1349
|
+
false,
|
|
1350
|
+
{
|
|
1351
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1352
|
+
lineNumber: 389,
|
|
1353
|
+
columnNumber: 11
|
|
1354
|
+
},
|
|
1355
|
+
void 0
|
|
1356
|
+
)
|
|
1357
|
+
]
|
|
1358
|
+
},
|
|
1359
|
+
void 0,
|
|
1360
|
+
true,
|
|
1361
|
+
{
|
|
1362
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1363
|
+
lineNumber: 377,
|
|
1364
|
+
columnNumber: 9
|
|
1365
|
+
},
|
|
1366
|
+
void 0
|
|
1367
|
+
) }, void 0, false, {
|
|
1368
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1369
|
+
lineNumber: 376,
|
|
1370
|
+
columnNumber: 7
|
|
1371
|
+
}, void 0),
|
|
1372
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1373
|
+
"div",
|
|
1374
|
+
{
|
|
1375
|
+
style: {
|
|
1376
|
+
flex: 1,
|
|
1377
|
+
overflow: "hidden",
|
|
1378
|
+
display: "flex",
|
|
1379
|
+
flexDirection: layoutMode === "expanded" ? "row" : "column",
|
|
1380
|
+
overflowY: layoutMode === "compact" ? "auto" : void 0,
|
|
1381
|
+
overflowX: layoutMode === "expanded" ? "auto" : void 0
|
|
1382
|
+
},
|
|
1383
|
+
children: [
|
|
1384
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1385
|
+
Section,
|
|
1386
|
+
{
|
|
1387
|
+
id: "owned",
|
|
1388
|
+
title: "Your Repositories",
|
|
1389
|
+
icon: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Folder, { size: 16, color: theme2.colors.primary }, void 0, false, {
|
|
1390
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1391
|
+
lineNumber: 421,
|
|
1392
|
+
columnNumber: 17
|
|
1393
|
+
}, void 0),
|
|
1394
|
+
count: filteredOwned.length,
|
|
1395
|
+
isExpanded: expandedSections.has("owned"),
|
|
1396
|
+
onToggle: () => toggleSection("owned"),
|
|
1397
|
+
layoutMode,
|
|
1398
|
+
children: filteredOwned.length === 0 ? renderEmptyState(searchQuery ? "No repositories match your search" : "No repositories found") : renderCards(filteredOwned)
|
|
1399
|
+
},
|
|
1400
|
+
void 0,
|
|
1401
|
+
false,
|
|
1402
|
+
{
|
|
1403
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1404
|
+
lineNumber: 418,
|
|
1405
|
+
columnNumber: 9
|
|
1406
|
+
},
|
|
1407
|
+
void 0
|
|
1408
|
+
),
|
|
1409
|
+
filteredOrgs.map((org) => /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1410
|
+
Section,
|
|
1411
|
+
{
|
|
1412
|
+
id: `org-${org.id}`,
|
|
1413
|
+
title: org.login,
|
|
1414
|
+
icon: org.avatar_url ? /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1415
|
+
"img",
|
|
1416
|
+
{
|
|
1417
|
+
src: org.avatar_url,
|
|
1418
|
+
alt: org.login,
|
|
1419
|
+
style: { width: 16, height: 16, borderRadius: 4 }
|
|
1420
|
+
},
|
|
1421
|
+
void 0,
|
|
1422
|
+
false,
|
|
1423
|
+
{
|
|
1424
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1425
|
+
lineNumber: 440,
|
|
1426
|
+
columnNumber: 17
|
|
1427
|
+
},
|
|
1428
|
+
void 0
|
|
1429
|
+
) : /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Building2, { size: 16, color: theme2.colors.info || "#3b82f6" }, void 0, false, {
|
|
1430
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1431
|
+
lineNumber: 446,
|
|
1432
|
+
columnNumber: 17
|
|
1433
|
+
}, void 0),
|
|
1434
|
+
count: org.repositories.length,
|
|
1435
|
+
isExpanded: expandedSections.has(`org-${org.id}`),
|
|
1436
|
+
onToggle: () => toggleSection(`org-${org.id}`),
|
|
1437
|
+
layoutMode,
|
|
1438
|
+
children: org.repositories.length === 0 ? renderEmptyState(searchQuery ? "No repositories match your search" : "No repositories") : renderCards(org.repositories)
|
|
1439
|
+
},
|
|
1440
|
+
org.id,
|
|
1441
|
+
false,
|
|
1442
|
+
{
|
|
1443
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1444
|
+
lineNumber: 434,
|
|
1445
|
+
columnNumber: 11
|
|
1446
|
+
},
|
|
1447
|
+
void 0
|
|
1448
|
+
)),
|
|
1449
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
1450
|
+
Section,
|
|
1451
|
+
{
|
|
1452
|
+
id: "starred",
|
|
1453
|
+
title: "Starred",
|
|
1454
|
+
icon: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Star, { size: 16, color: theme2.colors.warning || "#f59e0b" }, void 0, false, {
|
|
1455
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1456
|
+
lineNumber: 464,
|
|
1457
|
+
columnNumber: 17
|
|
1458
|
+
}, void 0),
|
|
1459
|
+
count: filteredStarred.length,
|
|
1460
|
+
isExpanded: expandedSections.has("starred"),
|
|
1461
|
+
onToggle: () => toggleSection("starred"),
|
|
1462
|
+
layoutMode,
|
|
1463
|
+
children: filteredStarred.length === 0 ? renderEmptyState(searchQuery ? "No repositories match your search" : "No starred repositories") : renderCards(filteredStarred)
|
|
1464
|
+
},
|
|
1465
|
+
void 0,
|
|
1466
|
+
false,
|
|
1467
|
+
{
|
|
1468
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1469
|
+
lineNumber: 461,
|
|
1470
|
+
columnNumber: 9
|
|
1471
|
+
},
|
|
1472
|
+
void 0
|
|
1473
|
+
)
|
|
1474
|
+
]
|
|
1475
|
+
},
|
|
1476
|
+
void 0,
|
|
1477
|
+
true,
|
|
1478
|
+
{
|
|
1479
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1480
|
+
lineNumber: 407,
|
|
1481
|
+
columnNumber: 7
|
|
1482
|
+
},
|
|
1483
|
+
void 0
|
|
1484
|
+
)
|
|
1485
|
+
]
|
|
1486
|
+
},
|
|
1487
|
+
void 0,
|
|
1488
|
+
true,
|
|
1489
|
+
{
|
|
1490
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1491
|
+
lineNumber: 331,
|
|
1492
|
+
columnNumber: 5
|
|
1493
|
+
},
|
|
1494
|
+
void 0
|
|
1495
|
+
);
|
|
1496
|
+
};
|
|
1497
|
+
const GitHubProjectsPanel = (props) => {
|
|
1498
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ThemeProvider, { children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(GitHubProjectsPanelContent, { ...props }, void 0, false, {
|
|
1499
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1500
|
+
lineNumber: 493,
|
|
1501
|
+
columnNumber: 7
|
|
1502
|
+
}, void 0) }, void 0, false, {
|
|
1503
|
+
fileName: "/Users/griever/Developer/new-panels/industry-themed-github-panels/src/panels/GitHubProjectsPanel.tsx",
|
|
1504
|
+
lineNumber: 492,
|
|
1505
|
+
columnNumber: 5
|
|
1506
|
+
}, void 0);
|
|
1507
|
+
};
|
|
1508
|
+
const GitHubProjectsPanelMetadata = {
|
|
1509
|
+
id: "github-projects",
|
|
1510
|
+
name: "GitHub Projects",
|
|
1511
|
+
description: "Browse and manage your GitHub repositories",
|
|
1512
|
+
icon: "github",
|
|
1513
|
+
version: "0.1.0",
|
|
1514
|
+
slices: ["github-repositories"],
|
|
1515
|
+
surfaces: ["sidebar", "panel"]
|
|
1516
|
+
};
|
|
1517
|
+
const panels = [
|
|
1518
|
+
{
|
|
1519
|
+
metadata: GitHubProjectsPanelMetadata,
|
|
1520
|
+
component: GitHubProjectsPanel,
|
|
1521
|
+
onMount: async (context) => {
|
|
1522
|
+
console.log("GitHub Projects Panel mounted");
|
|
1523
|
+
const slice = context.getSlice("github-repositories");
|
|
1524
|
+
if (slice && !slice.loading) {
|
|
1525
|
+
await slice.refresh();
|
|
1526
|
+
}
|
|
1527
|
+
},
|
|
1528
|
+
onUnmount: async (_context) => {
|
|
1529
|
+
console.log("GitHub Projects Panel unmounting");
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
];
|
|
1533
|
+
const onPackageLoad = async () => {
|
|
1534
|
+
console.log("Panel package loaded - GitHub Panels Extension");
|
|
1535
|
+
};
|
|
1536
|
+
const onPackageUnload = async () => {
|
|
1537
|
+
console.log("Panel package unloading - GitHub Panels Extension");
|
|
1538
|
+
};
|
|
1539
|
+
export {
|
|
1540
|
+
GitHubProjectCard,
|
|
1541
|
+
GitHubProjectsPanel,
|
|
1542
|
+
onPackageLoad,
|
|
1543
|
+
onPackageUnload,
|
|
1544
|
+
panels
|
|
1545
|
+
};
|
|
1546
|
+
//# sourceMappingURL=panels.bundle.js.map
|