@industry-theme/file-city-panel 0.2.38 → 0.2.40
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/panels/CodeCityPanel.d.ts +17 -0
- package/dist/panels/CodeCityPanel.d.ts.map +1 -1
- package/dist/panels/components/GitChangesTree.d.ts +2 -0
- package/dist/panels/components/GitChangesTree.d.ts.map +1 -1
- package/dist/panels/components/GitChangesTree.stories.d.ts +42 -0
- package/dist/panels/components/GitChangesTree.stories.d.ts.map +1 -0
- package/dist/panels/components/Legend.d.ts.map +1 -1
- package/dist/panels/components/PrChangesTree.d.ts +2 -0
- package/dist/panels/components/PrChangesTree.d.ts.map +1 -1
- package/dist/panels/components/PrChangesTree.stories.d.ts.map +1 -1
- package/dist/panels/utils/qualityLayers.d.ts +1 -1
- package/dist/panels/utils/qualityLayers.d.ts.map +1 -1
- package/dist/panels.bundle.js +129 -26
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
|
@@ -34,6 +34,23 @@ export interface PrFilesSliceData {
|
|
|
34
34
|
owner?: string;
|
|
35
35
|
repo?: string;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Commit files data - files changed in a selected commit
|
|
39
|
+
*/
|
|
40
|
+
export interface CommitFilesSliceData {
|
|
41
|
+
filesByStatus: {
|
|
42
|
+
added: string[];
|
|
43
|
+
modified: string[];
|
|
44
|
+
removed: string[];
|
|
45
|
+
renamed: string[];
|
|
46
|
+
};
|
|
47
|
+
commitHash: string | null;
|
|
48
|
+
stats?: {
|
|
49
|
+
total: number;
|
|
50
|
+
additions: number;
|
|
51
|
+
deletions: number;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
37
54
|
/**
|
|
38
55
|
* CodeCityPanel - A file visualization panel using the File City map.
|
|
39
56
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CodeCityPanel.tsx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CAAC;CACH;AA6jDD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAEvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EA8BxC,CAAC"}
|
|
@@ -16,6 +16,8 @@ interface GitChangesTreeProps {
|
|
|
16
16
|
fileTree?: FileTree | null;
|
|
17
17
|
/** Root path for the repository (used for building file trees) */
|
|
18
18
|
rootPath?: string;
|
|
19
|
+
/** Horizontal padding for tree nodes */
|
|
20
|
+
horizontalPadding?: string;
|
|
19
21
|
/** Callback when a file is clicked */
|
|
20
22
|
onFileClick?: (filePath: string, status?: GitChangeSelectionStatus) => void;
|
|
21
23
|
/** Callback when a node is hovered */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitChangesTree.d.ts","sourceRoot":"","sources":["../../../src/panels/components/GitChangesTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAwB,KAAK,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAE3F,4DAA4D;AAC5D,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,kDAAkD;AAClD,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEvF,UAAU,mBAAmB;IAC3B,kDAAkD;IAClD,SAAS,EAAE,SAAS,CAAC;IACrB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MA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ACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8JxD,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { GitChangesTree } from './GitChangesTree';
|
|
3
|
+
declare const meta: Meta<typeof GitChangesTree>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof GitChangesTree>;
|
|
6
|
+
/**
|
|
7
|
+
* Default view with all change types
|
|
8
|
+
*/
|
|
9
|
+
export declare const Default: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Only staged files
|
|
12
|
+
*/
|
|
13
|
+
export declare const OnlyStaged: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Only unstaged files
|
|
16
|
+
*/
|
|
17
|
+
export declare const OnlyUnstaged: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Only untracked files
|
|
20
|
+
*/
|
|
21
|
+
export declare const OnlyUntracked: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Only deleted files
|
|
24
|
+
*/
|
|
25
|
+
export declare const OnlyDeleted: Story;
|
|
26
|
+
/**
|
|
27
|
+
* Large working directory with many changes
|
|
28
|
+
*/
|
|
29
|
+
export declare const LargeChangeset: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Empty (no changes)
|
|
32
|
+
*/
|
|
33
|
+
export declare const Empty: Story;
|
|
34
|
+
/**
|
|
35
|
+
* Interactive with click handler
|
|
36
|
+
*/
|
|
37
|
+
export declare const Interactive: Story;
|
|
38
|
+
/**
|
|
39
|
+
* Nested directory structure
|
|
40
|
+
*/
|
|
41
|
+
export declare const NestedStructure: Story;
|
|
42
|
+
//# sourceMappingURL=GitChangesTree.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitChangesTree.stories.d.ts","sourceRoot":"","sources":["../../../src/panels/components/GitChangesTree.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA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EAAE,MAAM,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC/B;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0bxC,CAAC"}
|
|
@@ -16,6 +16,8 @@ interface PrChangesTreeProps {
|
|
|
16
16
|
prFiles: PrFilesStatus;
|
|
17
17
|
/** Root path for the repository (used for building file trees) */
|
|
18
18
|
rootPath?: string;
|
|
19
|
+
/** Horizontal padding for tree nodes */
|
|
20
|
+
horizontalPadding?: string;
|
|
19
21
|
/** Callback when a file is clicked */
|
|
20
22
|
onFileClick?: (filePath: string, status?: PrChangeSelectionStatus) => void;
|
|
21
23
|
/** Callback when a node is hovered */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrChangesTree.d.ts","sourceRoot":"","sources":["../../../src/panels/components/PrChangesTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAKpD,0DAA0D;AAC1D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC7D;AAED,sDAAsD;AACtD,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAEnF,UAAU,kBAAkB;IAC1B,gDAAgD;IAChD,OAAO,EAAE,aAAa,CAAC;IACvB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAC3E,sCAA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PrChangesTree.stories.d.ts","sourceRoot":"","sources":["../../../src/panels/components/PrChangesTree.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAsB,MAAM,iBAAiB,CAAC;AAEpE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,
|
|
1
|
+
{"version":3,"file":"PrChangesTree.stories.d.ts","sourceRoot":"","sources":["../../../src/panels/components/PrChangesTree.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAsB,MAAM,iBAAiB,CAAC;AAEpE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CA0BpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAwB5C;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAevB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAe1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAczB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAazB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAUnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAoCzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAoB7B,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { CityBuilding, LayerItem } from '@principal-ai/file-city-react';
|
|
7
7
|
import { type ColorMode as QualityColorMode, type LensColorMode, type ColorModeConfig, type FileMetricData, type QualitySliceData } from '@principal-ai/quality-lens-registry';
|
|
8
8
|
export type { LensColorMode, ColorModeConfig, FileMetricData, QualitySliceData };
|
|
9
|
-
export type ColorMode = QualityColorMode | 'fileTypes' | 'git' | 'pr';
|
|
9
|
+
export type ColorMode = QualityColorMode | 'fileTypes' | 'git' | 'pr' | 'commit';
|
|
10
10
|
/**
|
|
11
11
|
* Highlight layer structure
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qualityLayers.d.ts","sourceRoot":"","sources":["../../../src/panels/utils/qualityLayers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EACL,KAAK,SAAS,IAAI,gBAAgB,EAClC,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAKtB,MAAM,qCAAqC,CAAC;AAG7C,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;AAGjF,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,WAAW,GAAG,KAAK,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"qualityLayers.d.ts","sourceRoot":"","sources":["../../../src/panels/utils/qualityLayers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EACL,KAAK,SAAS,IAAI,gBAAgB,EAClC,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAKtB,MAAM,qCAAqC,CAAC;AAG7C,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;AAGjF,MAAM,MAAM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,EAAE,OAAO,GAClB,OAAO,CAmBT;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,YAAY,EAAE,EACzB,WAAW,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,EAChD,eAAe,EAAE,cAAc,EAAE,EACjC,SAAS,EAAE,cAAc,EAAE,GAC1B,cAAc,EAAE,CA4ClB"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -9987,6 +9987,7 @@ const GitChangesTree = ({
|
|
|
9987
9987
|
gitStatus,
|
|
9988
9988
|
fileTree,
|
|
9989
9989
|
rootPath,
|
|
9990
|
+
horizontalPadding = "0px",
|
|
9990
9991
|
onFileClick,
|
|
9991
9992
|
onNodeHover
|
|
9992
9993
|
}) => {
|
|
@@ -10105,7 +10106,7 @@ const GitChangesTree = ({
|
|
|
10105
10106
|
onFileSelect: handleFileSelect,
|
|
10106
10107
|
onNodeHover,
|
|
10107
10108
|
transparentBackground: true,
|
|
10108
|
-
horizontalNodePadding:
|
|
10109
|
+
horizontalNodePadding: horizontalPadding,
|
|
10109
10110
|
verticalPadding: "4px",
|
|
10110
10111
|
openByDefault: true
|
|
10111
10112
|
}
|
|
@@ -10114,6 +10115,7 @@ const GitChangesTree = ({
|
|
|
10114
10115
|
const PrChangesTree = ({
|
|
10115
10116
|
prFiles,
|
|
10116
10117
|
rootPath,
|
|
10118
|
+
horizontalPadding = "0px",
|
|
10117
10119
|
onFileClick,
|
|
10118
10120
|
onNodeHover
|
|
10119
10121
|
}) => {
|
|
@@ -10210,7 +10212,7 @@ const PrChangesTree = ({
|
|
|
10210
10212
|
if (!prChangesData) {
|
|
10211
10213
|
return null;
|
|
10212
10214
|
}
|
|
10213
|
-
return /* @__PURE__ */ jsx(
|
|
10215
|
+
return /* @__PURE__ */ jsx(
|
|
10214
10216
|
GitStatusFileTree,
|
|
10215
10217
|
{
|
|
10216
10218
|
fileTree: prChangesData.tree,
|
|
@@ -10219,11 +10221,11 @@ const PrChangesTree = ({
|
|
|
10219
10221
|
onFileSelect: handleFileSelect,
|
|
10220
10222
|
onNodeHover,
|
|
10221
10223
|
transparentBackground: true,
|
|
10222
|
-
horizontalNodePadding:
|
|
10224
|
+
horizontalNodePadding: horizontalPadding,
|
|
10223
10225
|
verticalPadding: "4px",
|
|
10224
10226
|
openByDefault: true
|
|
10225
10227
|
}
|
|
10226
|
-
)
|
|
10228
|
+
);
|
|
10227
10229
|
};
|
|
10228
10230
|
const Legend = ({
|
|
10229
10231
|
fileTypes,
|
|
@@ -10260,6 +10262,7 @@ const Legend = ({
|
|
|
10260
10262
|
alexandria: "Documentation"
|
|
10261
10263
|
};
|
|
10262
10264
|
const isRight = position === "right";
|
|
10265
|
+
const horizontalPadding = "16px";
|
|
10263
10266
|
return /* @__PURE__ */ jsxs(
|
|
10264
10267
|
"div",
|
|
10265
10268
|
{
|
|
@@ -10267,7 +10270,7 @@ const Legend = ({
|
|
|
10267
10270
|
display: "flex",
|
|
10268
10271
|
flexDirection: "column",
|
|
10269
10272
|
gap: "12px",
|
|
10270
|
-
padding:
|
|
10273
|
+
padding: `12px 0`,
|
|
10271
10274
|
backgroundColor: theme2.colors.background,
|
|
10272
10275
|
borderTop: isRight ? "none" : `1px solid ${theme2.colors.border}`,
|
|
10273
10276
|
borderLeft: isRight ? `1px solid ${theme2.colors.border}` : "none",
|
|
@@ -10285,7 +10288,7 @@ const Legend = ({
|
|
|
10285
10288
|
display: "flex",
|
|
10286
10289
|
alignItems: "center",
|
|
10287
10290
|
justifyContent: "center",
|
|
10288
|
-
padding:
|
|
10291
|
+
padding: `8px ${horizontalPadding}`,
|
|
10289
10292
|
fontSize: theme2.fontSizes[0],
|
|
10290
10293
|
fontFamily: theme2.fonts.body,
|
|
10291
10294
|
color: theme2.colors.textSecondary,
|
|
@@ -10297,7 +10300,7 @@ const Legend = ({
|
|
|
10297
10300
|
]
|
|
10298
10301
|
}
|
|
10299
10302
|
),
|
|
10300
|
-
hasQualityMetrics && colorMode && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
10303
|
+
hasQualityMetrics && colorMode && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px", padding: `0 ${horizontalPadding}` }, children: [
|
|
10301
10304
|
/* @__PURE__ */ jsxs(
|
|
10302
10305
|
"div",
|
|
10303
10306
|
{
|
|
@@ -10399,7 +10402,7 @@ const Legend = ({
|
|
|
10399
10402
|
}
|
|
10400
10403
|
)
|
|
10401
10404
|
] }),
|
|
10402
|
-
hasAgentLayers && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
10405
|
+
hasAgentLayers && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px", padding: `0 ${horizontalPadding}` }, children: [
|
|
10403
10406
|
/* @__PURE__ */ jsxs(
|
|
10404
10407
|
"div",
|
|
10405
10408
|
{
|
|
@@ -10544,7 +10547,8 @@ const Legend = ({
|
|
|
10544
10547
|
fontWeight: 600,
|
|
10545
10548
|
color: theme2.colors.textSecondary,
|
|
10546
10549
|
textTransform: "uppercase",
|
|
10547
|
-
letterSpacing: "0.5px"
|
|
10550
|
+
letterSpacing: "0.5px",
|
|
10551
|
+
padding: `0 ${horizontalPadding}`
|
|
10548
10552
|
},
|
|
10549
10553
|
children: "Git Changes"
|
|
10550
10554
|
}
|
|
@@ -10555,6 +10559,7 @@ const Legend = ({
|
|
|
10555
10559
|
gitStatus,
|
|
10556
10560
|
fileTree,
|
|
10557
10561
|
rootPath,
|
|
10562
|
+
horizontalPadding,
|
|
10558
10563
|
onFileClick: onGitFileClick,
|
|
10559
10564
|
onNodeHover: onGitNodeHover
|
|
10560
10565
|
}
|
|
@@ -10574,7 +10579,8 @@ const Legend = ({
|
|
|
10574
10579
|
color: theme2.colors.textSecondary,
|
|
10575
10580
|
textTransform: "uppercase",
|
|
10576
10581
|
letterSpacing: "0.5px",
|
|
10577
|
-
flexShrink: 0
|
|
10582
|
+
flexShrink: 0,
|
|
10583
|
+
padding: `0 ${horizontalPadding}`
|
|
10578
10584
|
},
|
|
10579
10585
|
children: [
|
|
10580
10586
|
/* @__PURE__ */ jsx(GitPullRequest, { size: 12 }),
|
|
@@ -10584,17 +10590,18 @@ const Legend = ({
|
|
|
10584
10590
|
]
|
|
10585
10591
|
}
|
|
10586
10592
|
),
|
|
10587
|
-
/* @__PURE__ */ jsx(
|
|
10593
|
+
/* @__PURE__ */ jsx(
|
|
10588
10594
|
PrChangesTree,
|
|
10589
10595
|
{
|
|
10590
10596
|
prFiles,
|
|
10591
10597
|
rootPath,
|
|
10598
|
+
horizontalPadding,
|
|
10592
10599
|
onFileClick: onPrFileClick,
|
|
10593
10600
|
onNodeHover: onPrNodeHover
|
|
10594
10601
|
}
|
|
10595
|
-
)
|
|
10602
|
+
)
|
|
10596
10603
|
] }),
|
|
10597
|
-
fileTypes.length > 0 && !hasPrFiles && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
10604
|
+
fileTypes.length > 0 && !hasPrFiles && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px", padding: `0 ${horizontalPadding}` }, children: [
|
|
10598
10605
|
/* @__PURE__ */ jsx(
|
|
10599
10606
|
"div",
|
|
10600
10607
|
{
|
|
@@ -24515,7 +24522,7 @@ const CodeCityPanelContent = ({
|
|
|
24515
24522
|
actions: actions2,
|
|
24516
24523
|
events
|
|
24517
24524
|
}) => {
|
|
24518
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
24525
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
24519
24526
|
const { theme: theme2 } = useTheme();
|
|
24520
24527
|
const [cityData, setCityData] = useState(null);
|
|
24521
24528
|
const [hoverInfo, setHoverInfo] = useState(null);
|
|
@@ -24566,12 +24573,14 @@ const CodeCityPanelContent = ({
|
|
|
24566
24573
|
const fileTreeSlice = context.getSlice("fileTree");
|
|
24567
24574
|
const gitSlice = context.getSlice("git");
|
|
24568
24575
|
const prFilesSlice = context.getSlice("prFiles");
|
|
24576
|
+
const commitFilesSlice = context.getSlice("commitFiles");
|
|
24569
24577
|
const agentHighlightLayersSlice = context.getSlice("agentHighlightLayers");
|
|
24570
24578
|
const colorModesSlice = context.getSlice("fileCityColorModes");
|
|
24571
24579
|
const qualityData = (_c = colorModesSlice == null ? void 0 : colorModesSlice.data) == null ? void 0 : _c.qualityData;
|
|
24572
24580
|
const fileColorLayersRegistered = useRef(false);
|
|
24573
24581
|
const gitLayersRegistered = useRef(false);
|
|
24574
24582
|
const prFilesLayersRegistered = useRef(false);
|
|
24583
|
+
const commitFilesLayersRegistered = useRef(false);
|
|
24575
24584
|
const agentLayersRegistered = useRef(false);
|
|
24576
24585
|
const lastHasGitOrAgentLayers = useRef(null);
|
|
24577
24586
|
const currentRepoPath = (_d = context.currentScope.repository) == null ? void 0 : _d.path;
|
|
@@ -24582,12 +24591,14 @@ const CodeCityPanelContent = ({
|
|
|
24582
24591
|
fileColorLayersRegistered.current = false;
|
|
24583
24592
|
gitLayersRegistered.current = false;
|
|
24584
24593
|
prFilesLayersRegistered.current = false;
|
|
24594
|
+
commitFilesLayersRegistered.current = false;
|
|
24585
24595
|
agentLayersRegistered.current = false;
|
|
24586
24596
|
lastHasGitOrAgentLayers.current = null;
|
|
24587
24597
|
lastRepoPath.current = currentRepoPath;
|
|
24588
24598
|
}
|
|
24589
24599
|
}, [currentRepoPath]);
|
|
24590
24600
|
const [prFilesVersion, setPrFilesVersion] = useState(0);
|
|
24601
|
+
const [commitFilesVersion, setCommitFilesVersion] = useState(0);
|
|
24591
24602
|
useEffect(() => {
|
|
24592
24603
|
if (!events) return;
|
|
24593
24604
|
const cleanupHover = events.on("package:hover", (event) => {
|
|
@@ -24606,11 +24617,21 @@ const CodeCityPanelContent = ({
|
|
|
24606
24617
|
console.log("[CodeCityPanel] PR files cleared, triggering re-render");
|
|
24607
24618
|
setPrFilesVersion((v) => v + 1);
|
|
24608
24619
|
});
|
|
24620
|
+
const cleanupCommitFiles = events.on("commitFiles:updated", () => {
|
|
24621
|
+
console.log("[CodeCityPanel] Commit files updated, triggering re-render");
|
|
24622
|
+
setCommitFilesVersion((v) => v + 1);
|
|
24623
|
+
});
|
|
24624
|
+
const cleanupCommitFilesCleared = events.on("commitFiles:cleared", () => {
|
|
24625
|
+
console.log("[CodeCityPanel] Commit files cleared, triggering re-render");
|
|
24626
|
+
setCommitFilesVersion((v) => v + 1);
|
|
24627
|
+
});
|
|
24609
24628
|
return () => {
|
|
24610
24629
|
cleanupHover == null ? void 0 : cleanupHover();
|
|
24611
24630
|
cleanupSelect == null ? void 0 : cleanupSelect();
|
|
24612
24631
|
cleanupPrFiles == null ? void 0 : cleanupPrFiles();
|
|
24613
24632
|
cleanupPrFilesCleared == null ? void 0 : cleanupPrFilesCleared();
|
|
24633
|
+
cleanupCommitFiles == null ? void 0 : cleanupCommitFiles();
|
|
24634
|
+
cleanupCommitFilesCleared == null ? void 0 : cleanupCommitFilesCleared();
|
|
24614
24635
|
};
|
|
24615
24636
|
}, [events]);
|
|
24616
24637
|
useEffect(() => {
|
|
@@ -24922,9 +24943,87 @@ const CodeCityPanelContent = ({
|
|
|
24922
24943
|
}
|
|
24923
24944
|
return layers;
|
|
24924
24945
|
}, [cityData, (_f = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _f.filesByStatus, prFilesVersion]);
|
|
24946
|
+
const commitFilesLayers = useMemo(() => {
|
|
24947
|
+
var _a2;
|
|
24948
|
+
if (!cityData || !cityData.buildings || !((_a2 = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _a2.filesByStatus)) {
|
|
24949
|
+
return [];
|
|
24950
|
+
}
|
|
24951
|
+
const commitFiles = commitFilesSlice.data.filesByStatus;
|
|
24952
|
+
const buildingsByPath = new Map(
|
|
24953
|
+
cityData.buildings.map((b) => [b.path, b])
|
|
24954
|
+
);
|
|
24955
|
+
const createLayerItems = (paths) => {
|
|
24956
|
+
const items2 = [];
|
|
24957
|
+
for (const path of paths) {
|
|
24958
|
+
const building = buildingsByPath.get(path);
|
|
24959
|
+
if (building) {
|
|
24960
|
+
items2.push({
|
|
24961
|
+
path: building.path,
|
|
24962
|
+
type: "file",
|
|
24963
|
+
renderStrategy: "fill"
|
|
24964
|
+
});
|
|
24965
|
+
}
|
|
24966
|
+
}
|
|
24967
|
+
return items2;
|
|
24968
|
+
};
|
|
24969
|
+
const layers = [];
|
|
24970
|
+
if (commitFiles.added.length > 0) {
|
|
24971
|
+
const items2 = createLayerItems(commitFiles.added);
|
|
24972
|
+
if (items2.length > 0) {
|
|
24973
|
+
layers.push({
|
|
24974
|
+
id: "commit-highlight-added",
|
|
24975
|
+
name: "Commit Added",
|
|
24976
|
+
enabled: true,
|
|
24977
|
+
color: PR_STATUS_COLORS.added,
|
|
24978
|
+
priority: 85,
|
|
24979
|
+
items: items2
|
|
24980
|
+
});
|
|
24981
|
+
}
|
|
24982
|
+
}
|
|
24983
|
+
if (commitFiles.modified.length > 0) {
|
|
24984
|
+
const items2 = createLayerItems(commitFiles.modified);
|
|
24985
|
+
if (items2.length > 0) {
|
|
24986
|
+
layers.push({
|
|
24987
|
+
id: "commit-highlight-modified",
|
|
24988
|
+
name: "Commit Modified",
|
|
24989
|
+
enabled: true,
|
|
24990
|
+
color: PR_STATUS_COLORS.modified,
|
|
24991
|
+
priority: 95,
|
|
24992
|
+
items: items2
|
|
24993
|
+
});
|
|
24994
|
+
}
|
|
24995
|
+
}
|
|
24996
|
+
if (commitFiles.removed.length > 0) {
|
|
24997
|
+
const items2 = createLayerItems(commitFiles.removed);
|
|
24998
|
+
if (items2.length > 0) {
|
|
24999
|
+
layers.push({
|
|
25000
|
+
id: "commit-highlight-removed",
|
|
25001
|
+
name: "Commit Removed",
|
|
25002
|
+
enabled: true,
|
|
25003
|
+
color: PR_STATUS_COLORS.removed,
|
|
25004
|
+
priority: 105,
|
|
25005
|
+
items: items2
|
|
25006
|
+
});
|
|
25007
|
+
}
|
|
25008
|
+
}
|
|
25009
|
+
if (commitFiles.renamed.length > 0) {
|
|
25010
|
+
const items2 = createLayerItems(commitFiles.renamed);
|
|
25011
|
+
if (items2.length > 0) {
|
|
25012
|
+
layers.push({
|
|
25013
|
+
id: "commit-highlight-renamed",
|
|
25014
|
+
name: "Commit Renamed",
|
|
25015
|
+
enabled: true,
|
|
25016
|
+
color: PR_STATUS_COLORS.renamed,
|
|
25017
|
+
priority: 88,
|
|
25018
|
+
items: items2
|
|
25019
|
+
});
|
|
25020
|
+
}
|
|
25021
|
+
}
|
|
25022
|
+
return layers;
|
|
25023
|
+
}, [cityData, (_g = commitFilesSlice == null ? void 0 : commitFilesSlice.data) == null ? void 0 : _g.filesByStatus, commitFilesVersion]);
|
|
24925
25024
|
const qualityLayers = useMemo(() => {
|
|
24926
25025
|
if (!(cityData == null ? void 0 : cityData.buildings)) return [];
|
|
24927
|
-
if (colorMode === "fileTypes" || colorMode === "git" || colorMode === "pr") return [];
|
|
25026
|
+
if (colorMode === "fileTypes" || colorMode === "git" || colorMode === "pr" || colorMode === "commit") return [];
|
|
24928
25027
|
return getLayersForColorMode(
|
|
24929
25028
|
colorMode,
|
|
24930
25029
|
cityData.buildings,
|
|
@@ -24987,7 +25086,7 @@ const CodeCityPanelContent = ({
|
|
|
24987
25086
|
if (!((_a2 = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _a2.filesByStatus)) return 0;
|
|
24988
25087
|
const { added, modified, removed, renamed } = prFilesSlice.data.filesByStatus;
|
|
24989
25088
|
return added.length + modified.length + removed.length + renamed.length;
|
|
24990
|
-
}, [(
|
|
25089
|
+
}, [(_h = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _h.filesByStatus]);
|
|
24991
25090
|
const legendAgentLayers = useMemo(() => {
|
|
24992
25091
|
const agentLayers = highlightLayers.filter(
|
|
24993
25092
|
(layer) => layer.id.startsWith("event-highlight")
|
|
@@ -25167,6 +25266,9 @@ const CodeCityPanelContent = ({
|
|
|
25167
25266
|
case "pr":
|
|
25168
25267
|
modeLayers = prFilesLayers;
|
|
25169
25268
|
break;
|
|
25269
|
+
case "commit":
|
|
25270
|
+
modeLayers = commitFilesLayers;
|
|
25271
|
+
break;
|
|
25170
25272
|
default:
|
|
25171
25273
|
modeLayers = qualityLayers;
|
|
25172
25274
|
break;
|
|
@@ -25209,8 +25311,9 @@ const CodeCityPanelContent = ({
|
|
|
25209
25311
|
fileColorLayersRegistered.current = !hasAgentLayers && colorMode === "fileTypes";
|
|
25210
25312
|
gitLayersRegistered.current = hasAgentLayers || colorMode === "git";
|
|
25211
25313
|
prFilesLayersRegistered.current = hasAgentLayers || colorMode === "pr";
|
|
25314
|
+
commitFilesLayersRegistered.current = hasAgentLayers || colorMode === "commit";
|
|
25212
25315
|
agentLayersRegistered.current = hasAgentLayers;
|
|
25213
|
-
}, [colorMode, fileColorLayers, gitStatusLayers, prFilesLayers, qualityLayers, agentHighlightLayersSlice == null ? void 0 : agentHighlightLayersSlice.data, selectedPackagePath, isFileInPackage]);
|
|
25316
|
+
}, [colorMode, fileColorLayers, gitStatusLayers, prFilesLayers, commitFilesLayers, qualityLayers, agentHighlightLayersSlice == null ? void 0 : agentHighlightLayersSlice.data, selectedPackagePath, isFileInPackage]);
|
|
25214
25317
|
useEffect(() => {
|
|
25215
25318
|
if (!(fileTreeSlice == null ? void 0 : fileTreeSlice.data) || !fileTreeSlice.data.allFiles) {
|
|
25216
25319
|
setLoading(false);
|
|
@@ -25244,7 +25347,7 @@ const CodeCityPanelContent = ({
|
|
|
25244
25347
|
} finally {
|
|
25245
25348
|
setLoading(false);
|
|
25246
25349
|
}
|
|
25247
|
-
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, fileTreeSlice == null ? void 0 : fileTreeSlice.loading, (
|
|
25350
|
+
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, fileTreeSlice == null ? void 0 : fileTreeSlice.loading, (_i = context.currentScope.repository) == null ? void 0 : _i.path]);
|
|
25248
25351
|
const handleFileClick = useCallback(
|
|
25249
25352
|
(filePath) => {
|
|
25250
25353
|
if (actions2.openFile) {
|
|
@@ -25532,7 +25635,7 @@ const CodeCityPanelContent = ({
|
|
|
25532
25635
|
textOverflow: "ellipsis",
|
|
25533
25636
|
whiteSpace: "nowrap"
|
|
25534
25637
|
},
|
|
25535
|
-
children: ((
|
|
25638
|
+
children: ((_j = hoverInfo.fileTooltip) == null ? void 0 : _j.text) || ((_l = (_k = hoverInfo.hoveredDistrict) == null ? void 0 : _k.path) == null ? void 0 : _l.split("/").pop()) || ((_m = hoverInfo.hoveredDistrict) == null ? void 0 : _m.path) || "Unknown"
|
|
25536
25639
|
}
|
|
25537
25640
|
),
|
|
25538
25641
|
/* @__PURE__ */ jsx(
|
|
@@ -25546,7 +25649,7 @@ const CodeCityPanelContent = ({
|
|
|
25546
25649
|
textOverflow: "ellipsis",
|
|
25547
25650
|
whiteSpace: "nowrap"
|
|
25548
25651
|
},
|
|
25549
|
-
children: ((
|
|
25652
|
+
children: ((_n = hoverInfo.hoveredBuilding) == null ? void 0 : _n.path) || ((_o = hoverInfo.hoveredDistrict) == null ? void 0 : _o.path) || "/"
|
|
25550
25653
|
}
|
|
25551
25654
|
)
|
|
25552
25655
|
]
|
|
@@ -25672,10 +25775,10 @@ const CodeCityPanelContent = ({
|
|
|
25672
25775
|
{
|
|
25673
25776
|
fileTypes: [],
|
|
25674
25777
|
gitStatus: gitSlice == null ? void 0 : gitSlice.data,
|
|
25675
|
-
prFiles: (
|
|
25676
|
-
prNumber: (
|
|
25778
|
+
prFiles: (_p = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _p.filesByStatus,
|
|
25779
|
+
prNumber: (_q = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _q.pullNumber,
|
|
25677
25780
|
fileTree: fileTreeSlice == null ? void 0 : fileTreeSlice.data,
|
|
25678
|
-
rootPath: (
|
|
25781
|
+
rootPath: (_r = context.currentScope.repository) == null ? void 0 : _r.path,
|
|
25679
25782
|
onGitFileClick: handleFileClick,
|
|
25680
25783
|
onGitNodeHover: handleGitNodeHover,
|
|
25681
25784
|
onPrFileClick: handleFileClick,
|
|
@@ -25693,10 +25796,10 @@ const CodeCityPanelContent = ({
|
|
|
25693
25796
|
{
|
|
25694
25797
|
fileTypes: legendFileTypes,
|
|
25695
25798
|
gitStatus: gitSlice == null ? void 0 : gitSlice.data,
|
|
25696
|
-
prFiles: (
|
|
25697
|
-
prNumber: (
|
|
25799
|
+
prFiles: (_s = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _s.filesByStatus,
|
|
25800
|
+
prNumber: (_t = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _t.pullNumber,
|
|
25698
25801
|
fileTree: fileTreeSlice == null ? void 0 : fileTreeSlice.data,
|
|
25699
|
-
rootPath: (
|
|
25802
|
+
rootPath: (_u = context.currentScope.repository) == null ? void 0 : _u.path,
|
|
25700
25803
|
agentLayers: legendAgentLayers,
|
|
25701
25804
|
qualityMetrics: legendQualityMetrics,
|
|
25702
25805
|
colorMode,
|