@industry-theme/file-city-panel 0.3.7 → 0.3.9
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CodeCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AA8BjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAgBpD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;QAC1F,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,OAAO,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KAC7D,CAAC;IACF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,OAAO,EAAE,MAAM,EAAE,CAA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H,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;IACF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAGD,YAAY,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAmCpF;;GAEG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4mEvD,CAAC;AAEF;;;GAGG;AACH,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAEvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EA8BxC,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -54445,24 +54445,6 @@ const CodeCityPanelContent = ({
|
|
|
54445
54445
|
return;
|
|
54446
54446
|
}
|
|
54447
54447
|
setSelectedFilePath(filePath);
|
|
54448
|
-
let gitStatus;
|
|
54449
|
-
if (gitSlice == null ? void 0 : gitSlice.data) {
|
|
54450
|
-
if (gitSlice.data.stagedFiles.includes(filePath)) {
|
|
54451
|
-
gitStatus = "staged";
|
|
54452
|
-
} else if (gitSlice.data.modifiedFiles.includes(filePath)) {
|
|
54453
|
-
gitStatus = "unstaged";
|
|
54454
|
-
} else if (gitSlice.data.untrackedFiles.includes(filePath)) {
|
|
54455
|
-
gitStatus = "untracked";
|
|
54456
|
-
} else if (gitSlice.data.deletedFiles.includes(filePath)) {
|
|
54457
|
-
gitStatus = "deleted";
|
|
54458
|
-
}
|
|
54459
|
-
}
|
|
54460
|
-
events.emit({
|
|
54461
|
-
type: "file:open",
|
|
54462
|
-
source: "code-city-panel",
|
|
54463
|
-
timestamp: Date.now(),
|
|
54464
|
-
payload: { path: filePath, gitStatus }
|
|
54465
|
-
});
|
|
54466
54448
|
const lastSlashIndex = filePath.lastIndexOf("/");
|
|
54467
54449
|
const parentDirectory = lastSlashIndex > 0 ? filePath.substring(0, lastSlashIndex) : "";
|
|
54468
54450
|
const packageName = parentDirectory ? parentDirectory.split("/").pop() : "";
|
|
@@ -54481,8 +54463,29 @@ const CodeCityPanelContent = ({
|
|
|
54481
54463
|
});
|
|
54482
54464
|
}
|
|
54483
54465
|
},
|
|
54484
|
-
[events,
|
|
54466
|
+
[events, selectedFilePath]
|
|
54485
54467
|
);
|
|
54468
|
+
const handleOpenFile = useCallback(() => {
|
|
54469
|
+
if (!selectedFilePath) return;
|
|
54470
|
+
let gitStatus;
|
|
54471
|
+
if (gitSlice == null ? void 0 : gitSlice.data) {
|
|
54472
|
+
if (gitSlice.data.stagedFiles.includes(selectedFilePath)) {
|
|
54473
|
+
gitStatus = "staged";
|
|
54474
|
+
} else if (gitSlice.data.modifiedFiles.includes(selectedFilePath)) {
|
|
54475
|
+
gitStatus = "unstaged";
|
|
54476
|
+
} else if (gitSlice.data.untrackedFiles.includes(selectedFilePath)) {
|
|
54477
|
+
gitStatus = "untracked";
|
|
54478
|
+
} else if (gitSlice.data.deletedFiles.includes(selectedFilePath)) {
|
|
54479
|
+
gitStatus = "deleted";
|
|
54480
|
+
}
|
|
54481
|
+
}
|
|
54482
|
+
events.emit({
|
|
54483
|
+
type: "file:open",
|
|
54484
|
+
source: "code-city-panel",
|
|
54485
|
+
timestamp: Date.now(),
|
|
54486
|
+
payload: { path: selectedFilePath, gitStatus }
|
|
54487
|
+
});
|
|
54488
|
+
}, [events, gitSlice == null ? void 0 : gitSlice.data, selectedFilePath]);
|
|
54486
54489
|
const handleClearPackageSelection = useCallback(() => {
|
|
54487
54490
|
events.emit({
|
|
54488
54491
|
type: "package:select",
|
|
@@ -54916,7 +54919,80 @@ const CodeCityPanelContent = ({
|
|
|
54916
54919
|
alignItems: "center",
|
|
54917
54920
|
gap: "12px"
|
|
54918
54921
|
},
|
|
54919
|
-
children:
|
|
54922
|
+
children: selectedFilePath ? (
|
|
54923
|
+
/* Show selected file with Open button */
|
|
54924
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
54925
|
+
/* @__PURE__ */ jsxs(
|
|
54926
|
+
"div",
|
|
54927
|
+
{
|
|
54928
|
+
style: {
|
|
54929
|
+
flex: "1 1 auto",
|
|
54930
|
+
display: "flex",
|
|
54931
|
+
flexDirection: "column",
|
|
54932
|
+
gap: "1px",
|
|
54933
|
+
minWidth: 0
|
|
54934
|
+
},
|
|
54935
|
+
children: [
|
|
54936
|
+
/* @__PURE__ */ jsx(
|
|
54937
|
+
"div",
|
|
54938
|
+
{
|
|
54939
|
+
style: {
|
|
54940
|
+
fontWeight: 600,
|
|
54941
|
+
fontFamily: theme2.fonts.monospace,
|
|
54942
|
+
color: theme2.colors.primary,
|
|
54943
|
+
fontSize: theme2.fontSizes[1],
|
|
54944
|
+
overflow: "hidden",
|
|
54945
|
+
textOverflow: "ellipsis",
|
|
54946
|
+
whiteSpace: "nowrap"
|
|
54947
|
+
},
|
|
54948
|
+
children: selectedFilePath.split("/").pop() || "Unknown"
|
|
54949
|
+
}
|
|
54950
|
+
),
|
|
54951
|
+
/* @__PURE__ */ jsx(
|
|
54952
|
+
"div",
|
|
54953
|
+
{
|
|
54954
|
+
style: {
|
|
54955
|
+
fontFamily: theme2.fonts.monospace,
|
|
54956
|
+
color: theme2.colors.textSecondary,
|
|
54957
|
+
fontSize: theme2.fontSizes[0],
|
|
54958
|
+
overflow: "hidden",
|
|
54959
|
+
textOverflow: "ellipsis",
|
|
54960
|
+
whiteSpace: "nowrap"
|
|
54961
|
+
},
|
|
54962
|
+
children: selectedFilePath
|
|
54963
|
+
}
|
|
54964
|
+
)
|
|
54965
|
+
]
|
|
54966
|
+
}
|
|
54967
|
+
),
|
|
54968
|
+
/* @__PURE__ */ jsx(
|
|
54969
|
+
"button",
|
|
54970
|
+
{
|
|
54971
|
+
onClick: handleOpenFile,
|
|
54972
|
+
style: {
|
|
54973
|
+
padding: "6px 14px",
|
|
54974
|
+
backgroundColor: theme2.colors.primary,
|
|
54975
|
+
color: "#ffffff",
|
|
54976
|
+
border: "none",
|
|
54977
|
+
borderRadius: "4px",
|
|
54978
|
+
fontSize: theme2.fontSizes[0],
|
|
54979
|
+
fontFamily: theme2.fonts.body,
|
|
54980
|
+
fontWeight: 500,
|
|
54981
|
+
cursor: "pointer",
|
|
54982
|
+
display: "flex",
|
|
54983
|
+
alignItems: "center",
|
|
54984
|
+
gap: "6px",
|
|
54985
|
+
flexShrink: 0,
|
|
54986
|
+
transition: "opacity 0.2s"
|
|
54987
|
+
},
|
|
54988
|
+
onMouseEnter: (e) => e.currentTarget.style.opacity = "0.9",
|
|
54989
|
+
onMouseLeave: (e) => e.currentTarget.style.opacity = "1",
|
|
54990
|
+
title: "Open file",
|
|
54991
|
+
children: "Open"
|
|
54992
|
+
}
|
|
54993
|
+
)
|
|
54994
|
+
] })
|
|
54995
|
+
) : hoverInfo && (hoverInfo.hoveredBuilding || hoverInfo.hoveredDistrict) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
54920
54996
|
/* @__PURE__ */ jsxs(
|
|
54921
54997
|
"div",
|
|
54922
54998
|
{
|
|
@@ -55045,7 +55121,7 @@ const CodeCityPanelContent = ({
|
|
|
55045
55121
|
fontSize: theme2.fontSizes[0],
|
|
55046
55122
|
fontFamily: theme2.fonts.body
|
|
55047
55123
|
},
|
|
55048
|
-
children: "Hover over files and directories to see details • Click to open"
|
|
55124
|
+
children: "Hover over files and directories to see details • Click to select • Use Open button to open files"
|
|
55049
55125
|
}
|
|
55050
55126
|
)
|
|
55051
55127
|
)
|