@industry-theme/file-city-panel 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/panels/CodeCityPanel.d.ts.map +1 -1
- package/dist/panels/components/LegendTabs.d.ts +2 -1
- package/dist/panels/components/LegendTabs.d.ts.map +1 -1
- package/dist/panels/components/ProjectHeader.d.ts +26 -0
- package/dist/panels/components/ProjectHeader.d.ts.map +1 -0
- package/dist/panels/components/ProjectInfoView.d.ts +17 -0
- package/dist/panels/components/ProjectInfoView.d.ts.map +1 -0
- package/dist/panels.bundle.js +595 -228
- package/dist/panels.bundle.js.map +1 -1
- package/dist/types/index.d.ts +4 -10
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/panels.bundle.js
CHANGED
|
@@ -51047,11 +51047,17 @@ const createGitTab = (content2, count2) => ({
|
|
|
51047
51047
|
});
|
|
51048
51048
|
const createFilesTab = (content2, count2) => ({
|
|
51049
51049
|
id: "files",
|
|
51050
|
-
label: "
|
|
51050
|
+
label: "Legend",
|
|
51051
51051
|
icon: /* @__PURE__ */ jsx(FileCode, { size: 14 }),
|
|
51052
51052
|
count: count2,
|
|
51053
51053
|
content: content2
|
|
51054
51054
|
});
|
|
51055
|
+
const createProjectTab = (content2) => ({
|
|
51056
|
+
id: "project",
|
|
51057
|
+
label: "Details",
|
|
51058
|
+
icon: /* @__PURE__ */ jsx(Github, { size: 14 }),
|
|
51059
|
+
content: content2
|
|
51060
|
+
});
|
|
51055
51061
|
const createQualityTab = (content2, count2) => ({
|
|
51056
51062
|
id: "quality",
|
|
51057
51063
|
label: "Quality",
|
|
@@ -51059,6 +51065,208 @@ const createQualityTab = (content2, count2) => ({
|
|
|
51059
51065
|
count: count2,
|
|
51060
51066
|
content: content2
|
|
51061
51067
|
});
|
|
51068
|
+
function formatCount$1(count2) {
|
|
51069
|
+
if (count2 >= 1e6) {
|
|
51070
|
+
return `${(count2 / 1e6).toFixed(1)}m`;
|
|
51071
|
+
}
|
|
51072
|
+
if (count2 >= 1e3) {
|
|
51073
|
+
return `${(count2 / 1e3).toFixed(1)}k`;
|
|
51074
|
+
}
|
|
51075
|
+
return count2.toString();
|
|
51076
|
+
}
|
|
51077
|
+
function formatDate(dateString) {
|
|
51078
|
+
const date = new Date(dateString);
|
|
51079
|
+
const now2 = /* @__PURE__ */ new Date();
|
|
51080
|
+
const diffMs = now2.getTime() - date.getTime();
|
|
51081
|
+
const diffDays = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
|
|
51082
|
+
if (diffDays === 0) return "Today";
|
|
51083
|
+
if (diffDays === 1) return "Yesterday";
|
|
51084
|
+
if (diffDays < 7) return `${diffDays} days ago`;
|
|
51085
|
+
if (diffDays < 30) return `${Math.floor(diffDays / 7)} weeks ago`;
|
|
51086
|
+
if (diffDays < 365) return `${Math.floor(diffDays / 30)} months ago`;
|
|
51087
|
+
return `${Math.floor(diffDays / 365)} years ago`;
|
|
51088
|
+
}
|
|
51089
|
+
const ProjectInfoView = ({
|
|
51090
|
+
github,
|
|
51091
|
+
horizontalPadding = "16px",
|
|
51092
|
+
showHeader = true
|
|
51093
|
+
}) => {
|
|
51094
|
+
const { theme: theme2 } = useTheme();
|
|
51095
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
51096
|
+
showHeader && /* @__PURE__ */ jsxs(
|
|
51097
|
+
"div",
|
|
51098
|
+
{
|
|
51099
|
+
style: {
|
|
51100
|
+
display: "flex",
|
|
51101
|
+
alignItems: "center",
|
|
51102
|
+
gap: "6px",
|
|
51103
|
+
padding: `0 ${horizontalPadding}`,
|
|
51104
|
+
fontSize: theme2.fontSizes[0],
|
|
51105
|
+
fontFamily: theme2.fonts.body,
|
|
51106
|
+
fontWeight: 600,
|
|
51107
|
+
color: theme2.colors.textSecondary,
|
|
51108
|
+
textTransform: "uppercase",
|
|
51109
|
+
letterSpacing: "0.5px"
|
|
51110
|
+
},
|
|
51111
|
+
children: [
|
|
51112
|
+
/* @__PURE__ */ jsx(CodeXml, { size: 12 }),
|
|
51113
|
+
"Project Info"
|
|
51114
|
+
]
|
|
51115
|
+
}
|
|
51116
|
+
),
|
|
51117
|
+
github.description && /* @__PURE__ */ jsx("div", { style: { padding: `0 ${horizontalPadding}` }, children: /* @__PURE__ */ jsx(
|
|
51118
|
+
"p",
|
|
51119
|
+
{
|
|
51120
|
+
style: {
|
|
51121
|
+
margin: 0,
|
|
51122
|
+
fontSize: theme2.fontSizes[1],
|
|
51123
|
+
fontFamily: theme2.fonts.body,
|
|
51124
|
+
color: theme2.colors.text,
|
|
51125
|
+
lineHeight: 1.5
|
|
51126
|
+
},
|
|
51127
|
+
children: github.description
|
|
51128
|
+
}
|
|
51129
|
+
) }),
|
|
51130
|
+
/* @__PURE__ */ jsxs(
|
|
51131
|
+
"div",
|
|
51132
|
+
{
|
|
51133
|
+
style: {
|
|
51134
|
+
display: "flex",
|
|
51135
|
+
flexWrap: "wrap",
|
|
51136
|
+
gap: "16px",
|
|
51137
|
+
padding: `0 ${horizontalPadding}`
|
|
51138
|
+
},
|
|
51139
|
+
children: [
|
|
51140
|
+
/* @__PURE__ */ jsxs(
|
|
51141
|
+
"div",
|
|
51142
|
+
{
|
|
51143
|
+
style: {
|
|
51144
|
+
display: "flex",
|
|
51145
|
+
alignItems: "center",
|
|
51146
|
+
gap: "6px",
|
|
51147
|
+
fontSize: theme2.fontSizes[1],
|
|
51148
|
+
fontFamily: theme2.fonts.body,
|
|
51149
|
+
color: theme2.colors.text
|
|
51150
|
+
},
|
|
51151
|
+
title: `${github.stars.toLocaleString()} stars`,
|
|
51152
|
+
children: [
|
|
51153
|
+
/* @__PURE__ */ jsx(Star, { size: 14, color: theme2.colors.textSecondary }),
|
|
51154
|
+
/* @__PURE__ */ jsx("span", { style: { fontWeight: 600 }, children: formatCount$1(github.stars) }),
|
|
51155
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: "stars" })
|
|
51156
|
+
]
|
|
51157
|
+
}
|
|
51158
|
+
),
|
|
51159
|
+
github.primaryLanguage && /* @__PURE__ */ jsxs(
|
|
51160
|
+
"div",
|
|
51161
|
+
{
|
|
51162
|
+
style: {
|
|
51163
|
+
display: "flex",
|
|
51164
|
+
alignItems: "center",
|
|
51165
|
+
gap: "6px",
|
|
51166
|
+
fontSize: theme2.fontSizes[1],
|
|
51167
|
+
fontFamily: theme2.fonts.body,
|
|
51168
|
+
color: theme2.colors.text
|
|
51169
|
+
},
|
|
51170
|
+
children: [
|
|
51171
|
+
/* @__PURE__ */ jsx(
|
|
51172
|
+
"div",
|
|
51173
|
+
{
|
|
51174
|
+
style: {
|
|
51175
|
+
width: 10,
|
|
51176
|
+
height: 10,
|
|
51177
|
+
borderRadius: "50%",
|
|
51178
|
+
backgroundColor: theme2.colors.primary
|
|
51179
|
+
}
|
|
51180
|
+
}
|
|
51181
|
+
),
|
|
51182
|
+
/* @__PURE__ */ jsx("span", { children: github.primaryLanguage })
|
|
51183
|
+
]
|
|
51184
|
+
}
|
|
51185
|
+
)
|
|
51186
|
+
]
|
|
51187
|
+
}
|
|
51188
|
+
),
|
|
51189
|
+
github.topics && github.topics.length > 0 && /* @__PURE__ */ jsx(
|
|
51190
|
+
"div",
|
|
51191
|
+
{
|
|
51192
|
+
style: {
|
|
51193
|
+
display: "flex",
|
|
51194
|
+
flexWrap: "wrap",
|
|
51195
|
+
gap: "6px",
|
|
51196
|
+
padding: `0 ${horizontalPadding}`
|
|
51197
|
+
},
|
|
51198
|
+
children: github.topics.slice(0, 8).map((topic) => /* @__PURE__ */ jsx(
|
|
51199
|
+
"span",
|
|
51200
|
+
{
|
|
51201
|
+
style: {
|
|
51202
|
+
padding: "2px 8px",
|
|
51203
|
+
fontSize: theme2.fontSizes[0],
|
|
51204
|
+
fontFamily: theme2.fonts.body,
|
|
51205
|
+
color: theme2.colors.primary,
|
|
51206
|
+
backgroundColor: `${theme2.colors.primary}15`,
|
|
51207
|
+
borderRadius: "12px"
|
|
51208
|
+
},
|
|
51209
|
+
children: topic
|
|
51210
|
+
},
|
|
51211
|
+
topic
|
|
51212
|
+
))
|
|
51213
|
+
}
|
|
51214
|
+
),
|
|
51215
|
+
/* @__PURE__ */ jsxs(
|
|
51216
|
+
"div",
|
|
51217
|
+
{
|
|
51218
|
+
style: {
|
|
51219
|
+
display: "flex",
|
|
51220
|
+
flexDirection: "column",
|
|
51221
|
+
gap: "8px",
|
|
51222
|
+
padding: `0 ${horizontalPadding}`
|
|
51223
|
+
},
|
|
51224
|
+
children: [
|
|
51225
|
+
github.lastUpdated && /* @__PURE__ */ jsxs(
|
|
51226
|
+
"div",
|
|
51227
|
+
{
|
|
51228
|
+
style: {
|
|
51229
|
+
display: "flex",
|
|
51230
|
+
alignItems: "center",
|
|
51231
|
+
gap: "6px",
|
|
51232
|
+
fontSize: theme2.fontSizes[0],
|
|
51233
|
+
fontFamily: theme2.fonts.body,
|
|
51234
|
+
color: theme2.colors.textSecondary
|
|
51235
|
+
},
|
|
51236
|
+
children: [
|
|
51237
|
+
/* @__PURE__ */ jsx(Calendar, { size: 12 }),
|
|
51238
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
51239
|
+
"Updated ",
|
|
51240
|
+
formatDate(github.lastUpdated)
|
|
51241
|
+
] })
|
|
51242
|
+
]
|
|
51243
|
+
}
|
|
51244
|
+
),
|
|
51245
|
+
github.defaultBranch && /* @__PURE__ */ jsxs(
|
|
51246
|
+
"div",
|
|
51247
|
+
{
|
|
51248
|
+
style: {
|
|
51249
|
+
display: "flex",
|
|
51250
|
+
alignItems: "center",
|
|
51251
|
+
gap: "6px",
|
|
51252
|
+
fontSize: theme2.fontSizes[0],
|
|
51253
|
+
fontFamily: theme2.fonts.body,
|
|
51254
|
+
color: theme2.colors.textSecondary
|
|
51255
|
+
},
|
|
51256
|
+
children: [
|
|
51257
|
+
/* @__PURE__ */ jsx(Tag, { size: 12 }),
|
|
51258
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
51259
|
+
"Default branch: ",
|
|
51260
|
+
github.defaultBranch
|
|
51261
|
+
] })
|
|
51262
|
+
]
|
|
51263
|
+
}
|
|
51264
|
+
)
|
|
51265
|
+
]
|
|
51266
|
+
}
|
|
51267
|
+
)
|
|
51268
|
+
] });
|
|
51269
|
+
};
|
|
51062
51270
|
const COMMON_ICONS = [
|
|
51063
51271
|
"Package",
|
|
51064
51272
|
"Folder",
|
|
@@ -52134,6 +52342,211 @@ const HoverInfoBar = ({
|
|
|
52134
52342
|
}
|
|
52135
52343
|
);
|
|
52136
52344
|
};
|
|
52345
|
+
const shimmerKeyframes$1 = `
|
|
52346
|
+
@keyframes project-header-shimmer {
|
|
52347
|
+
0% { background-position: -200% 0; }
|
|
52348
|
+
100% { background-position: 200% 0; }
|
|
52349
|
+
}
|
|
52350
|
+
`;
|
|
52351
|
+
let shimmerStyleInjected$1 = false;
|
|
52352
|
+
function injectShimmerStyles$1() {
|
|
52353
|
+
if (shimmerStyleInjected$1 || typeof document === "undefined") return;
|
|
52354
|
+
const style2 = document.createElement("style");
|
|
52355
|
+
style2.textContent = shimmerKeyframes$1;
|
|
52356
|
+
document.head.appendChild(style2);
|
|
52357
|
+
shimmerStyleInjected$1 = true;
|
|
52358
|
+
}
|
|
52359
|
+
const ShimmerBox$1 = ({ width, height, borderRadius = 4, backgroundColor }) => /* @__PURE__ */ jsx(
|
|
52360
|
+
"div",
|
|
52361
|
+
{
|
|
52362
|
+
style: {
|
|
52363
|
+
width,
|
|
52364
|
+
height,
|
|
52365
|
+
borderRadius,
|
|
52366
|
+
background: `linear-gradient(90deg, ${backgroundColor} 25%, ${adjustBrightness$1(backgroundColor, 15)} 50%, ${backgroundColor} 75%)`,
|
|
52367
|
+
backgroundSize: "200% 100%",
|
|
52368
|
+
animation: "project-header-shimmer 1.5s ease-in-out infinite"
|
|
52369
|
+
}
|
|
52370
|
+
}
|
|
52371
|
+
);
|
|
52372
|
+
function adjustBrightness$1(color2, percent) {
|
|
52373
|
+
if (color2.startsWith("#")) {
|
|
52374
|
+
const num = parseInt(color2.slice(1), 16);
|
|
52375
|
+
const r2 = Math.min(255, (num >> 16 & 255) + percent);
|
|
52376
|
+
const g = Math.min(255, (num >> 8 & 255) + percent);
|
|
52377
|
+
const b = Math.min(255, (num & 255) + percent);
|
|
52378
|
+
return `#${(r2 << 16 | g << 8 | b).toString(16).padStart(6, "0")}`;
|
|
52379
|
+
}
|
|
52380
|
+
return color2;
|
|
52381
|
+
}
|
|
52382
|
+
const ProjectHeaderSkeleton = () => {
|
|
52383
|
+
const { theme: theme2 } = useTheme();
|
|
52384
|
+
React__default.useEffect(() => {
|
|
52385
|
+
injectShimmerStyles$1();
|
|
52386
|
+
}, []);
|
|
52387
|
+
const shimmerBg = theme2.colors.backgroundLight || "#2a2a2a";
|
|
52388
|
+
return /* @__PURE__ */ jsxs(
|
|
52389
|
+
"div",
|
|
52390
|
+
{
|
|
52391
|
+
style: {
|
|
52392
|
+
height: "40px",
|
|
52393
|
+
padding: "0 16px",
|
|
52394
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
52395
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
52396
|
+
display: "flex",
|
|
52397
|
+
alignItems: "center",
|
|
52398
|
+
gap: "8px"
|
|
52399
|
+
},
|
|
52400
|
+
children: [
|
|
52401
|
+
/* @__PURE__ */ jsx(ShimmerBox$1, { width: 20, height: 20, borderRadius: "50%", backgroundColor: shimmerBg }),
|
|
52402
|
+
/* @__PURE__ */ jsx(ShimmerBox$1, { width: 120, height: 14, backgroundColor: shimmerBg }),
|
|
52403
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
52404
|
+
/* @__PURE__ */ jsx(ShimmerBox$1, { width: 40, height: 14, backgroundColor: shimmerBg })
|
|
52405
|
+
]
|
|
52406
|
+
}
|
|
52407
|
+
);
|
|
52408
|
+
};
|
|
52409
|
+
const ProjectHeader = ({
|
|
52410
|
+
github,
|
|
52411
|
+
hasTour = false,
|
|
52412
|
+
onTourClick,
|
|
52413
|
+
onLearnMore
|
|
52414
|
+
}) => {
|
|
52415
|
+
const { theme: theme2 } = useTheme();
|
|
52416
|
+
const htmlUrl = `https://github.com/${github.id}`;
|
|
52417
|
+
return /* @__PURE__ */ jsxs(
|
|
52418
|
+
"div",
|
|
52419
|
+
{
|
|
52420
|
+
style: {
|
|
52421
|
+
height: "40px",
|
|
52422
|
+
padding: "0 16px",
|
|
52423
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
52424
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
52425
|
+
display: "flex",
|
|
52426
|
+
alignItems: "center",
|
|
52427
|
+
gap: "8px",
|
|
52428
|
+
flexShrink: 0
|
|
52429
|
+
},
|
|
52430
|
+
children: [
|
|
52431
|
+
/* @__PURE__ */ jsx(
|
|
52432
|
+
"img",
|
|
52433
|
+
{
|
|
52434
|
+
src: `https://github.com/${github.owner}.png?size=32`,
|
|
52435
|
+
alt: github.owner,
|
|
52436
|
+
style: {
|
|
52437
|
+
width: 20,
|
|
52438
|
+
height: 20,
|
|
52439
|
+
borderRadius: "50%",
|
|
52440
|
+
flexShrink: 0
|
|
52441
|
+
},
|
|
52442
|
+
title: github.owner
|
|
52443
|
+
}
|
|
52444
|
+
),
|
|
52445
|
+
/* @__PURE__ */ jsx(
|
|
52446
|
+
"a",
|
|
52447
|
+
{
|
|
52448
|
+
href: htmlUrl,
|
|
52449
|
+
target: "_blank",
|
|
52450
|
+
rel: "noopener noreferrer",
|
|
52451
|
+
style: {
|
|
52452
|
+
fontSize: theme2.fontSizes[1],
|
|
52453
|
+
fontFamily: theme2.fonts.body,
|
|
52454
|
+
fontWeight: 600,
|
|
52455
|
+
color: theme2.colors.text,
|
|
52456
|
+
textDecoration: "none",
|
|
52457
|
+
overflow: "hidden",
|
|
52458
|
+
textOverflow: "ellipsis",
|
|
52459
|
+
whiteSpace: "nowrap"
|
|
52460
|
+
},
|
|
52461
|
+
title: github.description || `${github.owner}/${github.name}`,
|
|
52462
|
+
children: github.name
|
|
52463
|
+
}
|
|
52464
|
+
),
|
|
52465
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
52466
|
+
github.license && /* @__PURE__ */ jsxs(
|
|
52467
|
+
"div",
|
|
52468
|
+
{
|
|
52469
|
+
style: {
|
|
52470
|
+
display: "flex",
|
|
52471
|
+
alignItems: "center",
|
|
52472
|
+
gap: "4px",
|
|
52473
|
+
fontSize: theme2.fontSizes[0],
|
|
52474
|
+
fontFamily: theme2.fonts.body,
|
|
52475
|
+
color: theme2.colors.textSecondary
|
|
52476
|
+
},
|
|
52477
|
+
title: `License: ${github.license}`,
|
|
52478
|
+
children: [
|
|
52479
|
+
/* @__PURE__ */ jsx(Scale, { size: 12 }),
|
|
52480
|
+
/* @__PURE__ */ jsx("span", { children: github.license })
|
|
52481
|
+
]
|
|
52482
|
+
}
|
|
52483
|
+
),
|
|
52484
|
+
hasTour && onTourClick && /* @__PURE__ */ jsxs(
|
|
52485
|
+
"button",
|
|
52486
|
+
{
|
|
52487
|
+
onClick: onTourClick,
|
|
52488
|
+
style: {
|
|
52489
|
+
display: "flex",
|
|
52490
|
+
alignItems: "center",
|
|
52491
|
+
gap: "4px",
|
|
52492
|
+
padding: "4px 8px",
|
|
52493
|
+
backgroundColor: "transparent",
|
|
52494
|
+
color: theme2.colors.textSecondary,
|
|
52495
|
+
border: "none",
|
|
52496
|
+
borderRadius: "4px",
|
|
52497
|
+
fontSize: theme2.fontSizes[0],
|
|
52498
|
+
fontFamily: theme2.fonts.body,
|
|
52499
|
+
cursor: "pointer",
|
|
52500
|
+
transition: "color 0.2s"
|
|
52501
|
+
},
|
|
52502
|
+
onMouseEnter: (e) => {
|
|
52503
|
+
e.currentTarget.style.color = theme2.colors.primary;
|
|
52504
|
+
},
|
|
52505
|
+
onMouseLeave: (e) => {
|
|
52506
|
+
e.currentTarget.style.color = theme2.colors.textSecondary;
|
|
52507
|
+
},
|
|
52508
|
+
title: "Take a guided tour",
|
|
52509
|
+
children: [
|
|
52510
|
+
/* @__PURE__ */ jsx(BookOpen, { size: 12 }),
|
|
52511
|
+
/* @__PURE__ */ jsx("span", { children: "Tour" })
|
|
52512
|
+
]
|
|
52513
|
+
}
|
|
52514
|
+
),
|
|
52515
|
+
onLearnMore && /* @__PURE__ */ jsxs(
|
|
52516
|
+
"button",
|
|
52517
|
+
{
|
|
52518
|
+
onClick: onLearnMore,
|
|
52519
|
+
style: {
|
|
52520
|
+
display: "flex",
|
|
52521
|
+
alignItems: "center",
|
|
52522
|
+
gap: "4px",
|
|
52523
|
+
padding: "4px 8px",
|
|
52524
|
+
backgroundColor: "transparent",
|
|
52525
|
+
color: theme2.colors.textSecondary,
|
|
52526
|
+
border: "none",
|
|
52527
|
+
borderRadius: "4px",
|
|
52528
|
+
fontSize: theme2.fontSizes[0],
|
|
52529
|
+
fontFamily: theme2.fonts.body,
|
|
52530
|
+
cursor: "pointer",
|
|
52531
|
+
transition: "color 0.2s"
|
|
52532
|
+
},
|
|
52533
|
+
onMouseEnter: (e) => {
|
|
52534
|
+
e.currentTarget.style.color = theme2.colors.primary;
|
|
52535
|
+
},
|
|
52536
|
+
onMouseLeave: (e) => {
|
|
52537
|
+
e.currentTarget.style.color = theme2.colors.textSecondary;
|
|
52538
|
+
},
|
|
52539
|
+
title: "Learn more",
|
|
52540
|
+
children: [
|
|
52541
|
+
/* @__PURE__ */ jsx("span", { children: "Learn More" }),
|
|
52542
|
+
/* @__PURE__ */ jsx(ExternalLink, { size: 12 })
|
|
52543
|
+
]
|
|
52544
|
+
}
|
|
52545
|
+
)
|
|
52546
|
+
]
|
|
52547
|
+
}
|
|
52548
|
+
);
|
|
52549
|
+
};
|
|
52137
52550
|
function resolveImageUrl(relativePath, context) {
|
|
52138
52551
|
if (relativePath.startsWith("http://") || relativePath.startsWith("https://")) {
|
|
52139
52552
|
return relativePath;
|
|
@@ -98695,7 +99108,7 @@ const CodeCityPanelContent = ({
|
|
|
98695
99108
|
actions,
|
|
98696
99109
|
events
|
|
98697
99110
|
}) => {
|
|
98698
|
-
var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t
|
|
99111
|
+
var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
98699
99112
|
const autoShowTour = ("autoShowTour" in context ? context.autoShowTour : false) ?? false;
|
|
98700
99113
|
const { theme: theme2 } = useTheme();
|
|
98701
99114
|
const [cityData, setCityData] = useState(null);
|
|
@@ -98722,7 +99135,6 @@ const CodeCityPanelContent = ({
|
|
|
98722
99135
|
const [isEditingCover, setIsEditingCover] = useState(false);
|
|
98723
99136
|
const [coverConfigs, setCoverConfigs] = useState({});
|
|
98724
99137
|
const [previewCoverOptions, setPreviewCoverOptions] = useState(null);
|
|
98725
|
-
const [showPackageInfo, setShowPackageInfo] = useState(false);
|
|
98726
99138
|
useEffect(() => {
|
|
98727
99139
|
const container = contentContainerRef.current;
|
|
98728
99140
|
if (!container) return;
|
|
@@ -98764,17 +99176,15 @@ const CodeCityPanelContent = ({
|
|
|
98764
99176
|
const colorModesSlice = context.fileCityColorModes;
|
|
98765
99177
|
const repositoryEntrySlice = context.repositoryEntry;
|
|
98766
99178
|
const qualityData = (_c = colorModesSlice == null ? void 0 : colorModesSlice.data) == null ? void 0 : _c.qualityData;
|
|
98767
|
-
const
|
|
98768
|
-
const githubRepoString = (_f = context.currentScope.repository) == null ? void 0 : _f.githubRepo;
|
|
99179
|
+
const githubRepoString = (_d = context.currentScope.repository) == null ? void 0 : _d.githubRepo;
|
|
98769
99180
|
const [repoOwner, repoName] = (githubRepoString == null ? void 0 : githubRepoString.includes("/")) ? githubRepoString.split("/") : [void 0, void 0];
|
|
98770
|
-
const packagesSlice = context.packages;
|
|
98771
99181
|
const fileColorLayersRegistered = useRef(false);
|
|
98772
99182
|
const gitLayersRegistered = useRef(false);
|
|
98773
99183
|
const prFilesLayersRegistered = useRef(false);
|
|
98774
99184
|
const commitFilesLayersRegistered = useRef(false);
|
|
98775
99185
|
const agentLayersRegistered = useRef(false);
|
|
98776
99186
|
const lastHasGitOrAgentLayers = useRef(null);
|
|
98777
|
-
const currentRepoPath = (
|
|
99187
|
+
const currentRepoPath = (_e2 = context.currentScope.repository) == null ? void 0 : _e2.path;
|
|
98778
99188
|
const lastRepoPath = useRef(currentRepoPath);
|
|
98779
99189
|
useEffect(() => {
|
|
98780
99190
|
if (lastRepoPath.current !== currentRepoPath) {
|
|
@@ -98830,7 +99240,7 @@ const CodeCityPanelContent = ({
|
|
|
98830
99240
|
}
|
|
98831
99241
|
};
|
|
98832
99242
|
loadTour();
|
|
98833
|
-
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, (
|
|
99243
|
+
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, (_f = context.currentScope.repository) == null ? void 0 : _f.path, context.adapters]);
|
|
98834
99244
|
useEffect(() => {
|
|
98835
99245
|
if (autoShowTour && tourData && !hasAutoShownTourRef.current) {
|
|
98836
99246
|
setShowTourPlayer(true);
|
|
@@ -99102,7 +99512,7 @@ const CodeCityPanelContent = ({
|
|
|
99102
99512
|
}
|
|
99103
99513
|
}
|
|
99104
99514
|
return layers;
|
|
99105
|
-
}, [cityData, (
|
|
99515
|
+
}, [cityData, (_g = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _g.filesByStatus, prFilesVersion]);
|
|
99106
99516
|
const commitFilesLayers = useMemo(() => {
|
|
99107
99517
|
var _a2;
|
|
99108
99518
|
if (!cityData || !cityData.buildings || !((_a2 = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _a2.filesByStatus)) {
|
|
@@ -99180,7 +99590,7 @@ const CodeCityPanelContent = ({
|
|
|
99180
99590
|
}
|
|
99181
99591
|
}
|
|
99182
99592
|
return layers;
|
|
99183
|
-
}, [cityData, (
|
|
99593
|
+
}, [cityData, (_h = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _h.filesByStatus, commitFilesVersion]);
|
|
99184
99594
|
const storyboardLayers = useMemo(() => {
|
|
99185
99595
|
if (!cityData || !cityData.buildings || !(storyboardContextSlice == null ? void 0 : storyboardContextSlice.data)) {
|
|
99186
99596
|
return [];
|
|
@@ -99281,7 +99691,7 @@ const CodeCityPanelContent = ({
|
|
|
99281
99691
|
if (!((_a2 = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _a2.filesByStatus)) return 0;
|
|
99282
99692
|
const { added, modified, removed, renamed } = prFilesSlice.data.filesByStatus;
|
|
99283
99693
|
return added.length + modified.length + removed.length + renamed.length;
|
|
99284
|
-
}, [(
|
|
99694
|
+
}, [(_i = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _i.filesByStatus]);
|
|
99285
99695
|
const legendAgentLayers = useMemo(() => {
|
|
99286
99696
|
const agentLayers = highlightLayers.filter(
|
|
99287
99697
|
(layer) => layer.id.startsWith("event-highlight")
|
|
@@ -99345,30 +99755,6 @@ const CodeCityPanelContent = ({
|
|
|
99345
99755
|
};
|
|
99346
99756
|
});
|
|
99347
99757
|
}, [baseLayers, highlightLayers, colorMode]);
|
|
99348
|
-
const legendPackageData = useMemo(() => {
|
|
99349
|
-
var _a2;
|
|
99350
|
-
if (!((_a2 = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a2.packages) || packagesSlice.data.packages.length === 0) {
|
|
99351
|
-
return { packageData: null, workspacePackageCount: 0 };
|
|
99352
|
-
}
|
|
99353
|
-
const rootPackage = packagesSlice.data.packages.find((pkg) => pkg.packageData.path === "") || packagesSlice.data.packages[0];
|
|
99354
|
-
const workspaceCount = packagesSlice.data.summary.isMonorepo ? packagesSlice.data.summary.workspacePackages.length : 0;
|
|
99355
|
-
return {
|
|
99356
|
-
packageData: {
|
|
99357
|
-
name: rootPackage.packageData.name,
|
|
99358
|
-
path: rootPackage.packageData.path,
|
|
99359
|
-
version: rootPackage.packageData.version,
|
|
99360
|
-
description: rootPackage.packageData.description,
|
|
99361
|
-
license: rootPackage.packageData.license,
|
|
99362
|
-
packageManager: rootPackage.packageData.packageManager,
|
|
99363
|
-
dependencies: rootPackage.packageData.dependencies || {},
|
|
99364
|
-
devDependencies: rootPackage.packageData.devDependencies || {},
|
|
99365
|
-
peerDependencies: rootPackage.packageData.peerDependencies || {},
|
|
99366
|
-
availableCommands: rootPackage.packageData.availableCommands,
|
|
99367
|
-
isMonorepoRoot: rootPackage.packageData.isMonorepoRoot
|
|
99368
|
-
},
|
|
99369
|
-
workspacePackageCount: workspaceCount
|
|
99370
|
-
};
|
|
99371
|
-
}, [packagesSlice == null ? void 0 : packagesSlice.data]);
|
|
99372
99758
|
const toggleAgentLayer = useCallback((id2) => {
|
|
99373
99759
|
setHighlightLayers((prev) => {
|
|
99374
99760
|
const agentLayers = prev.filter((l) => l.id.startsWith("event-highlight"));
|
|
@@ -99574,7 +99960,7 @@ const CodeCityPanelContent = ({
|
|
|
99574
99960
|
} finally {
|
|
99575
99961
|
setLoading(false);
|
|
99576
99962
|
}
|
|
99577
|
-
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, fileTreeSlice == null ? void 0 : fileTreeSlice.loading, (
|
|
99963
|
+
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, fileTreeSlice == null ? void 0 : fileTreeSlice.loading, (_j = context.currentScope.repository) == null ? void 0 : _j.path]);
|
|
99578
99964
|
const handleFileClick = useCallback(
|
|
99579
99965
|
(filePath, type) => {
|
|
99580
99966
|
if (type === "file") {
|
|
@@ -99800,7 +100186,7 @@ const CodeCityPanelContent = ({
|
|
|
99800
100186
|
path: tourFilePath,
|
|
99801
100187
|
commitSha
|
|
99802
100188
|
};
|
|
99803
|
-
}, [tourFilePath, context.currentScope.repository, (
|
|
100189
|
+
}, [tourFilePath, context.currentScope.repository, (_l = (_k = fileTreeSlice == null ? void 0 : fileTreeSlice.data) == null ? void 0 : _k.metadata) == null ? void 0 : _l.sourceSha]);
|
|
99804
100190
|
return /* @__PURE__ */ jsxs(
|
|
99805
100191
|
"div",
|
|
99806
100192
|
{
|
|
@@ -99812,104 +100198,109 @@ const CodeCityPanelContent = ({
|
|
|
99812
100198
|
backgroundColor: theme2.colors.background
|
|
99813
100199
|
},
|
|
99814
100200
|
children: [
|
|
99815
|
-
/* @__PURE__ */
|
|
99816
|
-
|
|
100201
|
+
(repositoryEntrySlice == null ? void 0 : repositoryEntrySlice.loading) ? /* @__PURE__ */ jsx(ProjectHeaderSkeleton, {}) : ((_m = repositoryEntrySlice == null ? void 0 : repositoryEntrySlice.data) == null ? void 0 : _m.github) ? /* @__PURE__ */ jsx(
|
|
100202
|
+
ProjectHeader,
|
|
99817
100203
|
{
|
|
99818
|
-
|
|
99819
|
-
|
|
99820
|
-
|
|
99821
|
-
|
|
99822
|
-
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
99823
|
-
display: "flex",
|
|
99824
|
-
alignItems: "center",
|
|
99825
|
-
gap: "8px",
|
|
99826
|
-
flexShrink: 0
|
|
99827
|
-
},
|
|
99828
|
-
children: [
|
|
99829
|
-
isGitHubPublic === false ? /* @__PURE__ */ jsx(Lock, { size: 16, color: theme2.colors.textSecondary }) : isGitHubPublic === true ? /* @__PURE__ */ jsx(Globe, { size: 16, color: theme2.colors.textSecondary }) : /* @__PURE__ */ jsx(Building2, { size: 16, color: theme2.colors.primary }),
|
|
99830
|
-
/* @__PURE__ */ jsx(
|
|
99831
|
-
"span",
|
|
99832
|
-
{
|
|
99833
|
-
style: {
|
|
99834
|
-
fontSize: theme2.fontSizes[1],
|
|
99835
|
-
fontFamily: theme2.fonts.body,
|
|
99836
|
-
color: theme2.colors.textSecondary,
|
|
99837
|
-
flex: 1
|
|
99838
|
-
},
|
|
99839
|
-
title: isGitHubPublic === false ? "This repository is private on GitHub" : isGitHubPublic === true ? "This repository is public on GitHub" : void 0,
|
|
99840
|
-
children: repoName && repoOwner ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
99841
|
-
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.text }, children: repoName }),
|
|
99842
|
-
" by ",
|
|
99843
|
-
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.text }, children: repoOwner })
|
|
99844
|
-
] }) : "File City"
|
|
99845
|
-
}
|
|
99846
|
-
),
|
|
99847
|
-
!showTourPlayer && tourData && /* @__PURE__ */ jsxs(
|
|
99848
|
-
"button",
|
|
99849
|
-
{
|
|
99850
|
-
onClick: () => {
|
|
99851
|
-
setShowTourPlayer(true);
|
|
99852
|
-
},
|
|
99853
|
-
style: {
|
|
99854
|
-
display: "flex",
|
|
99855
|
-
alignItems: "center",
|
|
99856
|
-
gap: "4px",
|
|
99857
|
-
padding: "4px 8px",
|
|
99858
|
-
backgroundColor: "transparent",
|
|
99859
|
-
color: theme2.colors.textSecondary,
|
|
99860
|
-
border: "none",
|
|
99861
|
-
borderRadius: "4px",
|
|
99862
|
-
fontSize: theme2.fontSizes[0],
|
|
99863
|
-
fontFamily: theme2.fonts.body,
|
|
99864
|
-
cursor: "pointer",
|
|
99865
|
-
transition: "color 0.2s"
|
|
99866
|
-
},
|
|
99867
|
-
onMouseEnter: (e) => {
|
|
99868
|
-
e.currentTarget.style.color = theme2.colors.primary;
|
|
99869
|
-
},
|
|
99870
|
-
onMouseLeave: (e) => {
|
|
99871
|
-
e.currentTarget.style.color = theme2.colors.textSecondary;
|
|
99872
|
-
},
|
|
99873
|
-
title: "Take a guided tour",
|
|
99874
|
-
children: [
|
|
99875
|
-
/* @__PURE__ */ jsx(BookOpen, { size: 12 }),
|
|
99876
|
-
/* @__PURE__ */ jsx("span", { children: "Tour" })
|
|
99877
|
-
]
|
|
99878
|
-
}
|
|
99879
|
-
),
|
|
99880
|
-
actions.learnMore && /* @__PURE__ */ jsxs(
|
|
99881
|
-
"button",
|
|
99882
|
-
{
|
|
99883
|
-
onClick: actions.learnMore,
|
|
99884
|
-
style: {
|
|
99885
|
-
display: "flex",
|
|
99886
|
-
alignItems: "center",
|
|
99887
|
-
gap: "4px",
|
|
99888
|
-
padding: "4px 8px",
|
|
99889
|
-
backgroundColor: "transparent",
|
|
99890
|
-
color: theme2.colors.textSecondary,
|
|
99891
|
-
border: "none",
|
|
99892
|
-
borderRadius: "4px",
|
|
99893
|
-
fontSize: theme2.fontSizes[0],
|
|
99894
|
-
fontFamily: theme2.fonts.body,
|
|
99895
|
-
cursor: "pointer",
|
|
99896
|
-
transition: "color 0.2s"
|
|
99897
|
-
},
|
|
99898
|
-
onMouseEnter: (e) => {
|
|
99899
|
-
e.currentTarget.style.color = theme2.colors.primary;
|
|
99900
|
-
},
|
|
99901
|
-
onMouseLeave: (e) => {
|
|
99902
|
-
e.currentTarget.style.color = theme2.colors.textSecondary;
|
|
99903
|
-
},
|
|
99904
|
-
title: "Learn more",
|
|
99905
|
-
children: [
|
|
99906
|
-
/* @__PURE__ */ jsx("span", { children: "Learn More" }),
|
|
99907
|
-
/* @__PURE__ */ jsx(ExternalLink, { size: 12 })
|
|
99908
|
-
]
|
|
99909
|
-
}
|
|
99910
|
-
)
|
|
99911
|
-
]
|
|
100204
|
+
github: repositoryEntrySlice.data.github,
|
|
100205
|
+
hasTour: !showTourPlayer && !!tourData,
|
|
100206
|
+
onTourClick: () => setShowTourPlayer(true),
|
|
100207
|
+
onLearnMore: actions.learnMore
|
|
99912
100208
|
}
|
|
100209
|
+
) : (
|
|
100210
|
+
/* Fallback minimal header when no GitHub data */
|
|
100211
|
+
/* @__PURE__ */ jsxs(
|
|
100212
|
+
"div",
|
|
100213
|
+
{
|
|
100214
|
+
style: {
|
|
100215
|
+
height: "40px",
|
|
100216
|
+
padding: "0 16px",
|
|
100217
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
100218
|
+
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
100219
|
+
display: "flex",
|
|
100220
|
+
alignItems: "center",
|
|
100221
|
+
gap: "8px",
|
|
100222
|
+
flexShrink: 0
|
|
100223
|
+
},
|
|
100224
|
+
children: [
|
|
100225
|
+
/* @__PURE__ */ jsx(Building2, { size: 16, color: theme2.colors.primary }),
|
|
100226
|
+
/* @__PURE__ */ jsx(
|
|
100227
|
+
"span",
|
|
100228
|
+
{
|
|
100229
|
+
style: {
|
|
100230
|
+
fontSize: theme2.fontSizes[1],
|
|
100231
|
+
fontFamily: theme2.fonts.body,
|
|
100232
|
+
fontWeight: 600,
|
|
100233
|
+
color: theme2.colors.text,
|
|
100234
|
+
flex: 1
|
|
100235
|
+
},
|
|
100236
|
+
children: repoName || "File City"
|
|
100237
|
+
}
|
|
100238
|
+
),
|
|
100239
|
+
!showTourPlayer && tourData && /* @__PURE__ */ jsxs(
|
|
100240
|
+
"button",
|
|
100241
|
+
{
|
|
100242
|
+
onClick: () => setShowTourPlayer(true),
|
|
100243
|
+
style: {
|
|
100244
|
+
display: "flex",
|
|
100245
|
+
alignItems: "center",
|
|
100246
|
+
gap: "4px",
|
|
100247
|
+
padding: "4px 8px",
|
|
100248
|
+
backgroundColor: "transparent",
|
|
100249
|
+
color: theme2.colors.textSecondary,
|
|
100250
|
+
border: "none",
|
|
100251
|
+
borderRadius: "4px",
|
|
100252
|
+
fontSize: theme2.fontSizes[0],
|
|
100253
|
+
fontFamily: theme2.fonts.body,
|
|
100254
|
+
cursor: "pointer",
|
|
100255
|
+
transition: "color 0.2s"
|
|
100256
|
+
},
|
|
100257
|
+
onMouseEnter: (e) => {
|
|
100258
|
+
e.currentTarget.style.color = theme2.colors.primary;
|
|
100259
|
+
},
|
|
100260
|
+
onMouseLeave: (e) => {
|
|
100261
|
+
e.currentTarget.style.color = theme2.colors.textSecondary;
|
|
100262
|
+
},
|
|
100263
|
+
title: "Take a guided tour",
|
|
100264
|
+
children: [
|
|
100265
|
+
/* @__PURE__ */ jsx(BookOpen, { size: 12 }),
|
|
100266
|
+
/* @__PURE__ */ jsx("span", { children: "Tour" })
|
|
100267
|
+
]
|
|
100268
|
+
}
|
|
100269
|
+
),
|
|
100270
|
+
actions.learnMore && /* @__PURE__ */ jsxs(
|
|
100271
|
+
"button",
|
|
100272
|
+
{
|
|
100273
|
+
onClick: actions.learnMore,
|
|
100274
|
+
style: {
|
|
100275
|
+
display: "flex",
|
|
100276
|
+
alignItems: "center",
|
|
100277
|
+
gap: "4px",
|
|
100278
|
+
padding: "4px 8px",
|
|
100279
|
+
backgroundColor: "transparent",
|
|
100280
|
+
color: theme2.colors.textSecondary,
|
|
100281
|
+
border: "none",
|
|
100282
|
+
borderRadius: "4px",
|
|
100283
|
+
fontSize: theme2.fontSizes[0],
|
|
100284
|
+
fontFamily: theme2.fonts.body,
|
|
100285
|
+
cursor: "pointer",
|
|
100286
|
+
transition: "color 0.2s"
|
|
100287
|
+
},
|
|
100288
|
+
onMouseEnter: (e) => {
|
|
100289
|
+
e.currentTarget.style.color = theme2.colors.primary;
|
|
100290
|
+
},
|
|
100291
|
+
onMouseLeave: (e) => {
|
|
100292
|
+
e.currentTarget.style.color = theme2.colors.textSecondary;
|
|
100293
|
+
},
|
|
100294
|
+
title: "Learn more",
|
|
100295
|
+
children: [
|
|
100296
|
+
/* @__PURE__ */ jsx("span", { children: "Learn More" }),
|
|
100297
|
+
/* @__PURE__ */ jsx(ExternalLink, { size: 12 })
|
|
100298
|
+
]
|
|
100299
|
+
}
|
|
100300
|
+
)
|
|
100301
|
+
]
|
|
100302
|
+
}
|
|
100303
|
+
)
|
|
99913
100304
|
),
|
|
99914
100305
|
/* @__PURE__ */ jsxs(
|
|
99915
100306
|
"div",
|
|
@@ -99975,20 +100366,7 @@ const CodeCityPanelContent = ({
|
|
|
99975
100366
|
]
|
|
99976
100367
|
}
|
|
99977
100368
|
),
|
|
99978
|
-
|
|
99979
|
-
// Package Info - shows package details when toggled from footer
|
|
99980
|
-
/* @__PURE__ */ jsx(ContextContainer, { position: layout.legendPosition === "top" ? "bottom" : layout.legendPosition, children: /* @__PURE__ */ jsx(
|
|
99981
|
-
FileTypesView,
|
|
99982
|
-
{
|
|
99983
|
-
fileTypes: legendFileTypes,
|
|
99984
|
-
packageData: legendPackageData.packageData,
|
|
99985
|
-
workspacePackageCount: legendPackageData.workspacePackageCount,
|
|
99986
|
-
onItemClick: toggleFileType,
|
|
99987
|
-
horizontalPadding: "16px",
|
|
99988
|
-
showHeader: true
|
|
99989
|
-
}
|
|
99990
|
-
) })
|
|
99991
|
-
) : showTourPlayer && tourData ? (
|
|
100369
|
+
showTourPlayer && tourData ? (
|
|
99992
100370
|
// Tour Player - provides guided tour context
|
|
99993
100371
|
/* @__PURE__ */ jsx(
|
|
99994
100372
|
TourPlayer,
|
|
@@ -100154,14 +100532,14 @@ const CodeCityPanelContent = ({
|
|
|
100154
100532
|
fileTypes: [],
|
|
100155
100533
|
gitStatus: gitSlice == null ? void 0 : gitSlice.data,
|
|
100156
100534
|
panelActions: actions,
|
|
100157
|
-
prFiles: (
|
|
100158
|
-
prFileStats: (
|
|
100159
|
-
prNumber: (
|
|
100160
|
-
commitFiles: (
|
|
100161
|
-
commitHash: (
|
|
100162
|
-
commitStats: (
|
|
100535
|
+
prFiles: (_n = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _n.filesByStatus,
|
|
100536
|
+
prFileStats: (_o = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _o.files,
|
|
100537
|
+
prNumber: (_p = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _p.pullNumber,
|
|
100538
|
+
commitFiles: (_q = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _q.filesByStatus,
|
|
100539
|
+
commitHash: (_r = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _r.commitHash,
|
|
100540
|
+
commitStats: (_s = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _s.stats,
|
|
100163
100541
|
fileTree: fileTreeSlice == null ? void 0 : fileTreeSlice.data,
|
|
100164
|
-
rootPath: (
|
|
100542
|
+
rootPath: (_t = context.currentScope.repository) == null ? void 0 : _t.path,
|
|
100165
100543
|
onGitFileClick: handleLegendFileClick,
|
|
100166
100544
|
onGitNodeHover: handleGitNodeHover,
|
|
100167
100545
|
onPrFileClick: handleLegendFileClick,
|
|
@@ -100178,15 +100556,19 @@ const CodeCityPanelContent = ({
|
|
|
100178
100556
|
}
|
|
100179
100557
|
)
|
|
100180
100558
|
) : (() => {
|
|
100181
|
-
var _a2, _b2, _c2, _d2, _e3, _f2, _g2;
|
|
100559
|
+
var _a2, _b2, _c2, _d2, _e3, _f2, _g2, _h2;
|
|
100182
100560
|
const tabs = [];
|
|
100183
|
-
const
|
|
100184
|
-
if (
|
|
100561
|
+
const githubInfo = (_a2 = repositoryEntrySlice == null ? void 0 : repositoryEntrySlice.data) == null ? void 0 : _a2.github;
|
|
100562
|
+
if (githubInfo) {
|
|
100563
|
+
tabs.push({
|
|
100564
|
+
id: "project",
|
|
100565
|
+
github: githubInfo
|
|
100566
|
+
});
|
|
100567
|
+
}
|
|
100568
|
+
if (legendFileTypes.length > 0) {
|
|
100185
100569
|
tabs.push({
|
|
100186
100570
|
id: "files",
|
|
100187
|
-
fileTypes: legendFileTypes
|
|
100188
|
-
packageData: legendPackageData.packageData,
|
|
100189
|
-
workspacePackageCount: legendPackageData.workspacePackageCount
|
|
100571
|
+
fileTypes: legendFileTypes
|
|
100190
100572
|
});
|
|
100191
100573
|
}
|
|
100192
100574
|
if (gitChangesCount > 0 && (gitSlice == null ? void 0 : gitSlice.data)) {
|
|
@@ -100206,14 +100588,23 @@ const CodeCityPanelContent = ({
|
|
|
100206
100588
|
const validPosition = layout.legendPosition === "top" ? "bottom" : layout.legendPosition;
|
|
100207
100589
|
if (tabs.length > 1) {
|
|
100208
100590
|
const legendTabs = tabs.map((tab2) => {
|
|
100209
|
-
if (tab2.id === "
|
|
100591
|
+
if (tab2.id === "project") {
|
|
100592
|
+
return createProjectTab(
|
|
100593
|
+
/* @__PURE__ */ jsx(
|
|
100594
|
+
ProjectInfoView,
|
|
100595
|
+
{
|
|
100596
|
+
github: tab2.github,
|
|
100597
|
+
horizontalPadding: "16px",
|
|
100598
|
+
showHeader: false
|
|
100599
|
+
}
|
|
100600
|
+
)
|
|
100601
|
+
);
|
|
100602
|
+
} else if (tab2.id === "files") {
|
|
100210
100603
|
return createFilesTab(
|
|
100211
100604
|
/* @__PURE__ */ jsx(
|
|
100212
100605
|
FileTypesView,
|
|
100213
100606
|
{
|
|
100214
100607
|
fileTypes: tab2.fileTypes,
|
|
100215
|
-
packageData: tab2.packageData,
|
|
100216
|
-
workspacePackageCount: tab2.workspacePackageCount,
|
|
100217
100608
|
onItemClick: toggleFileType,
|
|
100218
100609
|
horizontalPadding: "16px",
|
|
100219
100610
|
showHeader: false
|
|
@@ -100257,19 +100648,25 @@ const CodeCityPanelContent = ({
|
|
|
100257
100648
|
LegendTabs,
|
|
100258
100649
|
{
|
|
100259
100650
|
tabs: legendTabs,
|
|
100260
|
-
defaultTab: "files",
|
|
100651
|
+
defaultTab: githubInfo ? "project" : "files",
|
|
100261
100652
|
position: validPosition
|
|
100262
100653
|
}
|
|
100263
100654
|
);
|
|
100264
100655
|
} else if (tabs.length === 1) {
|
|
100265
100656
|
const tab2 = tabs[0];
|
|
100266
100657
|
return /* @__PURE__ */ jsxs(ContextContainer, { position: validPosition, children: [
|
|
100658
|
+
tab2.id === "project" && /* @__PURE__ */ jsx(
|
|
100659
|
+
ProjectInfoView,
|
|
100660
|
+
{
|
|
100661
|
+
github: tab2.github,
|
|
100662
|
+
horizontalPadding: "16px",
|
|
100663
|
+
showHeader: true
|
|
100664
|
+
}
|
|
100665
|
+
),
|
|
100267
100666
|
tab2.id === "files" && /* @__PURE__ */ jsx(
|
|
100268
100667
|
FileTypesView,
|
|
100269
100668
|
{
|
|
100270
100669
|
fileTypes: tab2.fileTypes,
|
|
100271
|
-
packageData: tab2.packageData,
|
|
100272
|
-
workspacePackageCount: tab2.workspacePackageCount,
|
|
100273
100670
|
onItemClick: toggleFileType,
|
|
100274
100671
|
horizontalPadding: "16px",
|
|
100275
100672
|
showHeader: true
|
|
@@ -100302,18 +100699,16 @@ const CodeCityPanelContent = ({
|
|
|
100302
100699
|
Legend,
|
|
100303
100700
|
{
|
|
100304
100701
|
fileTypes: legendFileTypes,
|
|
100305
|
-
packageData: legendPackageData.packageData,
|
|
100306
|
-
workspacePackageCount: legendPackageData.workspacePackageCount,
|
|
100307
100702
|
gitStatus: gitSlice == null ? void 0 : gitSlice.data,
|
|
100308
100703
|
panelActions: actions,
|
|
100309
|
-
prFiles: (
|
|
100310
|
-
prFileStats: (
|
|
100311
|
-
prNumber: (
|
|
100312
|
-
commitFiles: (
|
|
100313
|
-
commitHash: (
|
|
100314
|
-
commitStats: (
|
|
100704
|
+
prFiles: (_b2 = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _b2.filesByStatus,
|
|
100705
|
+
prFileStats: (_c2 = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _c2.files,
|
|
100706
|
+
prNumber: (_d2 = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _d2.pullNumber,
|
|
100707
|
+
commitFiles: (_e3 = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _e3.filesByStatus,
|
|
100708
|
+
commitHash: (_f2 = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _f2.commitHash,
|
|
100709
|
+
commitStats: (_g2 = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _g2.stats,
|
|
100315
100710
|
fileTree: fileTreeSlice == null ? void 0 : fileTreeSlice.data,
|
|
100316
|
-
rootPath: (
|
|
100711
|
+
rootPath: (_h2 = context.currentScope.repository) == null ? void 0 : _h2.path,
|
|
100317
100712
|
agentLayers: legendAgentLayers,
|
|
100318
100713
|
qualityMetrics: legendQualityMetrics,
|
|
100319
100714
|
colorMode,
|
|
@@ -100357,64 +100752,36 @@ const CodeCityPanelContent = ({
|
|
|
100357
100752
|
children: loading || !cityData ? /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
100358
100753
|
/* @__PURE__ */ jsx(Building2, { size: 14, style: { color: theme2.colors.textSecondary, flexShrink: 0 } }),
|
|
100359
100754
|
/* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], fontFamily: theme2.fonts.body, color: theme2.colors.textSecondary }, children: "Building File City..." })
|
|
100360
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
100361
|
-
/* @__PURE__ */
|
|
100362
|
-
|
|
100363
|
-
"div",
|
|
100364
|
-
{
|
|
100365
|
-
style: { display: "flex", alignItems: "center", gap: "4px", whiteSpace: "nowrap" },
|
|
100366
|
-
title: `${computedTreeStats.fileCount.toLocaleString()} files`,
|
|
100367
|
-
children: [
|
|
100368
|
-
/* @__PURE__ */ jsx(File, { size: 14, style: { color: theme2.colors.textSecondary, flexShrink: 0 } }),
|
|
100369
|
-
/* @__PURE__ */ jsxs("span", { style: { fontSize: theme2.fontSizes[1], fontFamily: theme2.fonts.body, color: theme2.colors.text }, children: [
|
|
100370
|
-
computedTreeStats.fileCount.toLocaleString(),
|
|
100371
|
-
!headerCompact && " files"
|
|
100372
|
-
] })
|
|
100373
|
-
]
|
|
100374
|
-
}
|
|
100375
|
-
),
|
|
100376
|
-
/* @__PURE__ */ jsxs(
|
|
100377
|
-
"div",
|
|
100378
|
-
{
|
|
100379
|
-
style: { display: "flex", alignItems: "center", gap: "4px", whiteSpace: "nowrap" },
|
|
100380
|
-
title: `${computedTreeStats.directoryCount.toLocaleString()} folders`,
|
|
100381
|
-
children: [
|
|
100382
|
-
/* @__PURE__ */ jsx(Folder, { size: 14, style: { color: theme2.colors.textSecondary, flexShrink: 0 } }),
|
|
100383
|
-
/* @__PURE__ */ jsxs("span", { style: { fontSize: theme2.fontSizes[1], fontFamily: theme2.fonts.body, color: theme2.colors.text }, children: [
|
|
100384
|
-
computedTreeStats.directoryCount.toLocaleString(),
|
|
100385
|
-
!headerCompact && " folders"
|
|
100386
|
-
] })
|
|
100387
|
-
]
|
|
100388
|
-
}
|
|
100389
|
-
)
|
|
100390
|
-
] }) }),
|
|
100391
|
-
legendPackageData.packageData && (hasAgentActivity || gitChangesCount > 0 || legendQualityMetrics.length > 0 && colorMode || showTourPlayer || ((_v = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _v.filesByStatus) || ((_w = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _w.filesByStatus) || ((_x = storyboardContextSlice == null ? void 0 : storyboardContextSlice.data) == null ? void 0 : _x.storyboard)) && /* @__PURE__ */ jsxs(
|
|
100392
|
-
"button",
|
|
100755
|
+
] }) : /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "12px", minWidth: 0, flexShrink: 1 }, children: computedTreeStats && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
100756
|
+
/* @__PURE__ */ jsxs(
|
|
100757
|
+
"div",
|
|
100393
100758
|
{
|
|
100394
|
-
|
|
100395
|
-
|
|
100396
|
-
|
|
100397
|
-
|
|
100398
|
-
|
|
100399
|
-
|
|
100400
|
-
|
|
100401
|
-
|
|
100402
|
-
|
|
100403
|
-
|
|
100404
|
-
|
|
100405
|
-
|
|
100406
|
-
|
|
100407
|
-
|
|
100408
|
-
|
|
100409
|
-
}
|
|
100410
|
-
title: showPackageInfo ? "Hide package info" : "Show package info",
|
|
100759
|
+
style: { display: "flex", alignItems: "center", gap: "4px", whiteSpace: "nowrap" },
|
|
100760
|
+
title: `${computedTreeStats.fileCount.toLocaleString()} files`,
|
|
100761
|
+
children: [
|
|
100762
|
+
/* @__PURE__ */ jsx(File, { size: 14, style: { color: theme2.colors.textSecondary, flexShrink: 0 } }),
|
|
100763
|
+
/* @__PURE__ */ jsxs("span", { style: { fontSize: theme2.fontSizes[1], fontFamily: theme2.fonts.body, color: theme2.colors.text }, children: [
|
|
100764
|
+
computedTreeStats.fileCount.toLocaleString(),
|
|
100765
|
+
!headerCompact && " files"
|
|
100766
|
+
] })
|
|
100767
|
+
]
|
|
100768
|
+
}
|
|
100769
|
+
),
|
|
100770
|
+
/* @__PURE__ */ jsxs(
|
|
100771
|
+
"div",
|
|
100772
|
+
{
|
|
100773
|
+
style: { display: "flex", alignItems: "center", gap: "4px", whiteSpace: "nowrap" },
|
|
100774
|
+
title: `${computedTreeStats.directoryCount.toLocaleString()} folders`,
|
|
100411
100775
|
children: [
|
|
100412
|
-
/* @__PURE__ */ jsx(
|
|
100413
|
-
/* @__PURE__ */
|
|
100776
|
+
/* @__PURE__ */ jsx(Folder, { size: 14, style: { color: theme2.colors.textSecondary, flexShrink: 0 } }),
|
|
100777
|
+
/* @__PURE__ */ jsxs("span", { style: { fontSize: theme2.fontSizes[1], fontFamily: theme2.fonts.body, color: theme2.colors.text }, children: [
|
|
100778
|
+
computedTreeStats.directoryCount.toLocaleString(),
|
|
100779
|
+
!headerCompact && " folders"
|
|
100780
|
+
] })
|
|
100414
100781
|
]
|
|
100415
100782
|
}
|
|
100416
100783
|
)
|
|
100417
|
-
] })
|
|
100784
|
+
] }) }) })
|
|
100418
100785
|
}
|
|
100419
100786
|
),
|
|
100420
100787
|
isEditingCover && selectedPackagePath && /* @__PURE__ */ jsx(
|