@industry-theme/file-city-panel 0.2.53 → 0.2.55
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 +0 -9
- package/dist/panels/CodeCityPanel.d.ts.map +1 -1
- package/dist/panels/components/GitChangesTree.d.ts +4 -10
- package/dist/panels/components/GitChangesTree.d.ts.map +1 -1
- package/dist/panels/components/GitChangesTree.stories.d.ts.map +1 -1
- package/dist/panels/components/Legend.d.ts +3 -3
- package/dist/panels/components/Legend.d.ts.map +1 -1
- package/dist/panels.bundle.js +39 -37
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +4 -5
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PanelComponentProps } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Git status data - categorized file paths
|
|
5
|
-
*/
|
|
6
|
-
export interface GitStatus {
|
|
7
|
-
staged: string[];
|
|
8
|
-
unstaged: string[];
|
|
9
|
-
untracked: string[];
|
|
10
|
-
deleted: string[];
|
|
11
|
-
}
|
|
12
3
|
/**
|
|
13
4
|
* PR files data - files changed in a selected pull request
|
|
14
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CodeCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAuBjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"CodeCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CodeCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAuBjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAgBpD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC;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from 'react';
|
|
2
|
-
import { type FileTree } from '@principal-ai/repository-abstraction';
|
|
3
|
-
/**
|
|
4
|
-
export
|
|
5
|
-
staged: string[];
|
|
6
|
-
unstaged: string[];
|
|
7
|
-
untracked: string[];
|
|
8
|
-
deleted: string[];
|
|
9
|
-
}
|
|
2
|
+
import { type FileTree, type GitStatusWithFiles } from '@principal-ai/repository-abstraction';
|
|
3
|
+
/** Re-export GitStatusWithFiles for consumers */
|
|
4
|
+
export type { GitStatusWithFiles };
|
|
10
5
|
/** Git status category for selection callbacks */
|
|
11
6
|
export type GitChangeSelectionStatus = 'staged' | 'unstaged' | 'untracked' | 'deleted';
|
|
12
7
|
interface GitChangesTreeProps {
|
|
13
8
|
/** Git status data with categorized file paths */
|
|
14
|
-
gitStatus:
|
|
9
|
+
gitStatus: GitStatusWithFiles;
|
|
15
10
|
/** Optional file tree for "Full Tree" view mode */
|
|
16
11
|
fileTree?: FileTree | null;
|
|
17
12
|
/** Root path for the repository (used for building file trees) */
|
|
@@ -28,5 +23,4 @@ interface GitChangesTreeProps {
|
|
|
28
23
|
* Uses GitStatusFileTree from @principal-ade/dynamic-file-tree for rendering.
|
|
29
24
|
*/
|
|
30
25
|
export declare const GitChangesTree: React.FC<GitChangesTreeProps>;
|
|
31
|
-
export {};
|
|
32
26
|
//# sourceMappingURL=GitChangesTree.d.ts.map
|
|
@@ -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,
|
|
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,KAAK,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAEpH,iDAAiD;AACjD,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC,kDAAkD;AAClD,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEvF,UAAU,mBAAmB;IAC3B,kDAAkD;IAClD,SAAS,EAAE,kBAAkB,CAAC;IAC9B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC5E,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACpE;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgKxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitChangesTree.stories.d.ts","sourceRoot":"","sources":["../../../src/panels/components/GitChangesTree.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"GitChangesTree.stories.d.ts","sourceRoot":"","sources":["../../../src/panels/components/GitChangesTree.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAA2B,MAAM,kBAAkB,CAAC;AAE3E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CA0BrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAgC7C;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAyBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAyB1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAwB3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAwBzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAoB5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAoBnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAuCzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KA+B7B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FileTree } from '@principal-ai/repository-abstraction';
|
|
3
3
|
import type { ColorMode } from '../utils/qualityLayers';
|
|
4
|
-
import { type
|
|
4
|
+
import { type GitStatusWithFiles, type GitChangeSelectionStatus } from './GitChangesTree';
|
|
5
5
|
import { type PrFilesStatus, type PrChangeSelectionStatus } from './PrChangesTree';
|
|
6
6
|
import { type CommitFilesStatus, type CommitChangeSelectionStatus } from './CommitChangesTree';
|
|
7
|
-
export type {
|
|
7
|
+
export type { GitStatusWithFiles, GitChangeSelectionStatus } from './GitChangesTree';
|
|
8
8
|
export type { PrFilesStatus, PrChangeSelectionStatus } from './PrChangesTree';
|
|
9
9
|
export type { CommitFilesStatus, CommitChangeSelectionStatus } from './CommitChangesTree';
|
|
10
10
|
export interface LegendFileType {
|
|
@@ -45,7 +45,7 @@ export interface LegendQualityMetric {
|
|
|
45
45
|
interface LegendProps {
|
|
46
46
|
fileTypes: LegendFileType[];
|
|
47
47
|
/** Raw git status data with file path arrays */
|
|
48
|
-
gitStatus?:
|
|
48
|
+
gitStatus?: GitStatusWithFiles | null;
|
|
49
49
|
/** PR files data with categorized file paths */
|
|
50
50
|
prFiles?: PrFilesStatus | null;
|
|
51
51
|
/** PR number for display */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../../src/panels/components/Legend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAkB,KAAK,
|
|
1
|
+
{"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../../src/panels/components/Legend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAkB,KAAK,kBAAkB,EAAE,KAAK,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC1G,OAAO,EAAiB,KAAK,aAAa,EAAE,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAClG,OAAO,EAAqB,KAAK,iBAAiB,EAAE,KAAK,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAGlH,YAAY,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACrF,YAAY,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,YAAY,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAE1F,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,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CAAC;CAC/B;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAsexC,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -2498,21 +2498,21 @@ const GitChangesTree = ({
|
|
|
2498
2498
|
}) => {
|
|
2499
2499
|
const { theme: theme2 } = useTheme();
|
|
2500
2500
|
const hasChanges = useMemo(
|
|
2501
|
-
() => gitStatus.
|
|
2502
|
-
[gitStatus.
|
|
2501
|
+
() => gitStatus.stagedFiles.length > 0 || gitStatus.modifiedFiles.length > 0 || gitStatus.untrackedFiles.length > 0 || gitStatus.deletedFiles.length > 0,
|
|
2502
|
+
[gitStatus.stagedFiles.length, gitStatus.modifiedFiles.length, gitStatus.untrackedFiles.length, gitStatus.deletedFiles.length]
|
|
2503
2503
|
);
|
|
2504
2504
|
const getFileStatus = useCallback(
|
|
2505
2505
|
(filePath) => {
|
|
2506
|
-
if (gitStatus.
|
|
2506
|
+
if (gitStatus.stagedFiles.includes(filePath)) {
|
|
2507
2507
|
return "staged";
|
|
2508
2508
|
}
|
|
2509
|
-
if (gitStatus.
|
|
2509
|
+
if (gitStatus.deletedFiles.includes(filePath)) {
|
|
2510
2510
|
return "deleted";
|
|
2511
2511
|
}
|
|
2512
|
-
if (gitStatus.
|
|
2512
|
+
if (gitStatus.untrackedFiles.includes(filePath)) {
|
|
2513
2513
|
return "untracked";
|
|
2514
2514
|
}
|
|
2515
|
-
if (gitStatus.
|
|
2515
|
+
if (gitStatus.modifiedFiles.includes(filePath)) {
|
|
2516
2516
|
return "unstaged";
|
|
2517
2517
|
}
|
|
2518
2518
|
return void 0;
|
|
@@ -2546,21 +2546,21 @@ const GitChangesTree = ({
|
|
|
2546
2546
|
}
|
|
2547
2547
|
return expandedPaths;
|
|
2548
2548
|
};
|
|
2549
|
-
const expandedUntracked = expandDirectories(gitStatus.
|
|
2549
|
+
const expandedUntracked = expandDirectories(gitStatus.untrackedFiles);
|
|
2550
2550
|
const statusData = [
|
|
2551
|
-
...gitStatus.
|
|
2551
|
+
...gitStatus.stagedFiles.map((filePath) => ({
|
|
2552
2552
|
filePath,
|
|
2553
2553
|
indexStatus: "A",
|
|
2554
2554
|
workingTreeStatus: " ",
|
|
2555
2555
|
status: "A"
|
|
2556
2556
|
})),
|
|
2557
|
-
...gitStatus.
|
|
2557
|
+
...gitStatus.modifiedFiles.map((filePath) => ({
|
|
2558
2558
|
filePath,
|
|
2559
2559
|
indexStatus: " ",
|
|
2560
2560
|
workingTreeStatus: "M",
|
|
2561
2561
|
status: "M"
|
|
2562
2562
|
})),
|
|
2563
|
-
...gitStatus.
|
|
2563
|
+
...gitStatus.deletedFiles.map((filePath) => ({
|
|
2564
2564
|
filePath,
|
|
2565
2565
|
indexStatus: " ",
|
|
2566
2566
|
workingTreeStatus: "D",
|
|
@@ -2574,10 +2574,10 @@ const GitChangesTree = ({
|
|
|
2574
2574
|
}))
|
|
2575
2575
|
];
|
|
2576
2576
|
const allChangedFiles = [
|
|
2577
|
-
...gitStatus.
|
|
2578
|
-
...gitStatus.
|
|
2577
|
+
...gitStatus.stagedFiles,
|
|
2578
|
+
...gitStatus.modifiedFiles,
|
|
2579
2579
|
...expandedUntracked,
|
|
2580
|
-
...gitStatus.
|
|
2580
|
+
...gitStatus.deletedFiles
|
|
2581
2581
|
].sort((a, b) => a.localeCompare(b));
|
|
2582
2582
|
const builder = new N();
|
|
2583
2583
|
const tree = builder.build({ files: allChangedFiles, rootPath: rootPath ?? "" });
|
|
@@ -2614,7 +2614,8 @@ const GitChangesTree = ({
|
|
|
2614
2614
|
horizontalNodePadding: horizontalPadding,
|
|
2615
2615
|
verticalPadding: "4px",
|
|
2616
2616
|
openByDefault: true,
|
|
2617
|
-
enableDragAndDrop: false
|
|
2617
|
+
enableDragAndDrop: false,
|
|
2618
|
+
autoHeight: true
|
|
2618
2619
|
}
|
|
2619
2620
|
);
|
|
2620
2621
|
};
|
|
@@ -2871,7 +2872,7 @@ const Legend = ({
|
|
|
2871
2872
|
position = "bottom"
|
|
2872
2873
|
}) => {
|
|
2873
2874
|
const { theme: theme2 } = useTheme();
|
|
2874
|
-
const hasGitStatus = gitStatus != null && (gitStatus.
|
|
2875
|
+
const hasGitStatus = gitStatus != null && (gitStatus.stagedFiles.length > 0 || gitStatus.modifiedFiles.length > 0 || gitStatus.untrackedFiles.length > 0 || gitStatus.deletedFiles.length > 0);
|
|
2875
2876
|
const hasPrFiles = prFiles != null && (prFiles.added.length > 0 || prFiles.modified.length > 0 || prFiles.removed.length > 0 || prFiles.renamed.length > 0);
|
|
2876
2877
|
const hasCommitFiles = commitFiles != null && (commitFiles.added.length > 0 || commitFiles.modified.length > 0 || commitFiles.removed.length > 0 || commitFiles.renamed.length > 0);
|
|
2877
2878
|
const hasAgentLayers = agentLayers && agentLayers.length > 0;
|
|
@@ -3161,7 +3162,7 @@ const Legend = ({
|
|
|
3161
3162
|
}
|
|
3162
3163
|
)
|
|
3163
3164
|
] }),
|
|
3164
|
-
hasGitStatus && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
3165
|
+
hasGitStatus && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px", flex: 1, minHeight: 0 }, children: [
|
|
3165
3166
|
/* @__PURE__ */ jsx(
|
|
3166
3167
|
"div",
|
|
3167
3168
|
{
|
|
@@ -3172,12 +3173,13 @@ const Legend = ({
|
|
|
3172
3173
|
color: theme2.colors.textSecondary,
|
|
3173
3174
|
textTransform: "uppercase",
|
|
3174
3175
|
letterSpacing: "0.5px",
|
|
3175
|
-
padding: `0 ${horizontalPadding}
|
|
3176
|
+
padding: `0 ${horizontalPadding}`,
|
|
3177
|
+
flexShrink: 0
|
|
3176
3178
|
},
|
|
3177
3179
|
children: "Git Changes"
|
|
3178
3180
|
}
|
|
3179
3181
|
),
|
|
3180
|
-
/* @__PURE__ */ jsx(
|
|
3182
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1, minHeight: 0, overflow: "auto" }, children: /* @__PURE__ */ jsx(
|
|
3181
3183
|
GitChangesTree,
|
|
3182
3184
|
{
|
|
3183
3185
|
gitStatus,
|
|
@@ -3187,7 +3189,7 @@ const Legend = ({
|
|
|
3187
3189
|
onFileClick: onGitFileClick,
|
|
3188
3190
|
onNodeHover: onGitNodeHover
|
|
3189
3191
|
}
|
|
3190
|
-
)
|
|
3192
|
+
) })
|
|
3191
3193
|
] }),
|
|
3192
3194
|
hasPrFiles && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px", flex: 1, minHeight: 0 }, children: [
|
|
3193
3195
|
/* @__PURE__ */ jsxs(
|
|
@@ -3299,8 +3301,8 @@ const Legend = ({
|
|
|
3299
3301
|
cursor: onItemClick ? "pointer" : "default",
|
|
3300
3302
|
opacity: fileType.enabled ? 1 : 0.4,
|
|
3301
3303
|
transition: "all 0.15s ease",
|
|
3302
|
-
minWidth: "
|
|
3303
|
-
flex: "1 1
|
|
3304
|
+
minWidth: "150px",
|
|
3305
|
+
flex: "1 1 150px",
|
|
3304
3306
|
maxWidth: "300px",
|
|
3305
3307
|
boxSizing: "border-box"
|
|
3306
3308
|
},
|
|
@@ -17504,7 +17506,7 @@ const CodeCityPanelContent = ({
|
|
|
17504
17506
|
}
|
|
17505
17507
|
}, [containerSize]);
|
|
17506
17508
|
const fileTreeSlice = context.getSlice("fileTree");
|
|
17507
|
-
const gitSlice = context.getSlice("
|
|
17509
|
+
const gitSlice = context.getSlice("gitStatusWithFiles");
|
|
17508
17510
|
const prFilesSlice = context.getSlice("prFiles");
|
|
17509
17511
|
const commitFilesSlice = context.getSlice("commitFiles");
|
|
17510
17512
|
const agentHighlightLayersSlice = context.getSlice("agentHighlightLayers");
|
|
@@ -17718,8 +17720,8 @@ const CodeCityPanelContent = ({
|
|
|
17718
17720
|
return items;
|
|
17719
17721
|
};
|
|
17720
17722
|
const layers = [];
|
|
17721
|
-
if (gitStatus.
|
|
17722
|
-
const stagedBuildings = gitStatus.
|
|
17723
|
+
if (gitStatus.stagedFiles.length > 0) {
|
|
17724
|
+
const stagedBuildings = gitStatus.stagedFiles.map((path) => buildingsByPath.get(path)).filter((b) => b !== void 0);
|
|
17723
17725
|
if (stagedBuildings.length > 0) {
|
|
17724
17726
|
const suffixLayers = distExports.createFileColorHighlightLayers(stagedBuildings);
|
|
17725
17727
|
suffixLayers.forEach((suffixLayer, idx) => {
|
|
@@ -17732,7 +17734,7 @@ const CodeCityPanelContent = ({
|
|
|
17732
17734
|
});
|
|
17733
17735
|
}
|
|
17734
17736
|
const items = [];
|
|
17735
|
-
for (const path of gitStatus.
|
|
17737
|
+
for (const path of gitStatus.stagedFiles) {
|
|
17736
17738
|
const building = buildingsByPath.get(path);
|
|
17737
17739
|
if (building) {
|
|
17738
17740
|
items.push({
|
|
@@ -17756,8 +17758,8 @@ const CodeCityPanelContent = ({
|
|
|
17756
17758
|
});
|
|
17757
17759
|
}
|
|
17758
17760
|
}
|
|
17759
|
-
if (gitStatus.
|
|
17760
|
-
const items = createLayerItems(gitStatus.
|
|
17761
|
+
if (gitStatus.modifiedFiles.length > 0) {
|
|
17762
|
+
const items = createLayerItems(gitStatus.modifiedFiles);
|
|
17761
17763
|
if (items.length > 0) {
|
|
17762
17764
|
layers.push({
|
|
17763
17765
|
id: "git-highlight-unstaged",
|
|
@@ -17769,8 +17771,8 @@ const CodeCityPanelContent = ({
|
|
|
17769
17771
|
});
|
|
17770
17772
|
}
|
|
17771
17773
|
}
|
|
17772
|
-
if (gitStatus.
|
|
17773
|
-
const items = createLayerItems(gitStatus.
|
|
17774
|
+
if (gitStatus.untrackedFiles.length > 0) {
|
|
17775
|
+
const items = createLayerItems(gitStatus.untrackedFiles);
|
|
17774
17776
|
if (items.length > 0) {
|
|
17775
17777
|
layers.push({
|
|
17776
17778
|
id: "git-highlight-untracked",
|
|
@@ -17782,8 +17784,8 @@ const CodeCityPanelContent = ({
|
|
|
17782
17784
|
});
|
|
17783
17785
|
}
|
|
17784
17786
|
}
|
|
17785
|
-
if (gitStatus.
|
|
17786
|
-
const items = createLayerItems(gitStatus.
|
|
17787
|
+
if (gitStatus.deletedFiles.length > 0) {
|
|
17788
|
+
const items = createLayerItems(gitStatus.deletedFiles);
|
|
17787
17789
|
if (items.length > 0) {
|
|
17788
17790
|
layers.push({
|
|
17789
17791
|
id: "git-highlight-deleted",
|
|
@@ -18011,8 +18013,8 @@ const CodeCityPanelContent = ({
|
|
|
18011
18013
|
}, [baseLayers, highlightLayers]);
|
|
18012
18014
|
const gitChangesCount = useMemo(() => {
|
|
18013
18015
|
if (!(gitSlice == null ? void 0 : gitSlice.data)) return 0;
|
|
18014
|
-
const {
|
|
18015
|
-
return
|
|
18016
|
+
const { stagedFiles, modifiedFiles, untrackedFiles, deletedFiles } = gitSlice.data;
|
|
18017
|
+
return stagedFiles.length + modifiedFiles.length + untrackedFiles.length + deletedFiles.length;
|
|
18016
18018
|
}, [gitSlice == null ? void 0 : gitSlice.data]);
|
|
18017
18019
|
useMemo(() => {
|
|
18018
18020
|
var _a2;
|
|
@@ -18285,13 +18287,13 @@ const CodeCityPanelContent = ({
|
|
|
18285
18287
|
(filePath) => {
|
|
18286
18288
|
let gitStatus;
|
|
18287
18289
|
if (gitSlice == null ? void 0 : gitSlice.data) {
|
|
18288
|
-
if (gitSlice.data.
|
|
18290
|
+
if (gitSlice.data.stagedFiles.includes(filePath)) {
|
|
18289
18291
|
gitStatus = "staged";
|
|
18290
|
-
} else if (gitSlice.data.
|
|
18292
|
+
} else if (gitSlice.data.modifiedFiles.includes(filePath)) {
|
|
18291
18293
|
gitStatus = "unstaged";
|
|
18292
|
-
} else if (gitSlice.data.
|
|
18294
|
+
} else if (gitSlice.data.untrackedFiles.includes(filePath)) {
|
|
18293
18295
|
gitStatus = "untracked";
|
|
18294
|
-
} else if (gitSlice.data.
|
|
18296
|
+
} else if (gitSlice.data.deletedFiles.includes(filePath)) {
|
|
18295
18297
|
gitStatus = "deleted";
|
|
18296
18298
|
}
|
|
18297
18299
|
}
|