@industry-theme/file-city-panel 0.2.67 → 0.2.69
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/AgentMailFileCityPanel.d.ts.map +1 -1
- package/dist/panels/CodeCityPanel.d.ts.map +1 -1
- package/dist/panels/FeedCodeCityPanel.d.ts.map +1 -1
- package/dist/panels/components/FileCardList.d.ts.map +1 -1
- package/dist/panels.bundle.js +51 -12
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentMailFileCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/AgentMailFileCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAajF,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentMailFileCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/AgentMailFileCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAajF,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,UAAU,CAAC;AAonBpE;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAMhE,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CodeCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAyBjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAepD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,MAA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,oBAAoB,EAAE,KAAK,CAAC,EA8BxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedCodeCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/FeedCodeCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,OAAO,EAAgD,cAAc,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAe/H,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,UAAU,CAAC;AAsBpE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,oCAAoC;IACpC,IAAI,EAAE,cAAc,CAAC;IACrB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;
|
|
1
|
+
{"version":3,"file":"FeedCodeCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/FeedCodeCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,OAAO,EAAgD,cAAc,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAe/H,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,UAAU,CAAC;AAsBpE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,oCAAoC;IACpC,IAAI,EAAE,cAAc,CAAC;IACrB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AA+XD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAE3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EA8B5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileCardList.d.ts","sourceRoot":"","sources":["../../../src/panels/components/FileCardList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,iBAAiB;IACzB,+BAA+B;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"FileCardList.d.ts","sourceRoot":"","sources":["../../../src/panels/components/FileCardList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,iBAAiB;IACzB,+BAA+B;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA+OpD,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -3260,10 +3260,29 @@ function requireDrawLayeredBuildings() {
|
|
|
3260
3260
|
ctx.strokeRect(bounds.x - 1, bounds.y - 1, bounds.width + 2, bounds.height + 2);
|
|
3261
3261
|
}
|
|
3262
3262
|
}
|
|
3263
|
+
let iconBottomY = pos.y;
|
|
3263
3264
|
if (showFileTypeIcons && iconMap) {
|
|
3264
3265
|
const iconConfig = (0, fileTypeIcons_1.getFileTypeIcon)(building.path, iconMap);
|
|
3265
3266
|
if (iconConfig) {
|
|
3266
|
-
|
|
3267
|
+
const isWide = width > height;
|
|
3268
|
+
const iconYOffset = isWide ? -height * 0.15 : 0;
|
|
3269
|
+
const iconY = pos.y + iconYOffset;
|
|
3270
|
+
(0, fileTypeIcons_1.drawFileTypeIcon)(ctx, iconConfig, pos.x, iconY, width, height);
|
|
3271
|
+
const minDimension = Math.min(width, height);
|
|
3272
|
+
if (iconConfig.type === "emoji") {
|
|
3273
|
+
const sizeScale = iconConfig.size || 0.75;
|
|
3274
|
+
const emojiSize = minDimension * sizeScale;
|
|
3275
|
+
iconBottomY = iconY + emojiSize / 2;
|
|
3276
|
+
} else if (iconConfig.type === "lucide") {
|
|
3277
|
+
const sizeScale = iconConfig.size || 0.5;
|
|
3278
|
+
const actualIconSize = minDimension * sizeScale;
|
|
3279
|
+
if (iconConfig.backgroundColor) {
|
|
3280
|
+
const bgRadius = actualIconSize * 0.7;
|
|
3281
|
+
iconBottomY = iconY + bgRadius;
|
|
3282
|
+
} else {
|
|
3283
|
+
iconBottomY = iconY + actualIconSize / 2;
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3267
3286
|
}
|
|
3268
3287
|
}
|
|
3269
3288
|
if (showFileNames && width > 100 && height > 30) {
|
|
@@ -3272,16 +3291,14 @@ function requireDrawLayeredBuildings() {
|
|
|
3272
3291
|
const fontSize = Math.min(30, Math.max(10, Math.floor(Math.min(width, height) * 0.3)));
|
|
3273
3292
|
ctx.font = `${fontSize}px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`;
|
|
3274
3293
|
ctx.textAlign = "center";
|
|
3275
|
-
ctx.textBaseline = "
|
|
3294
|
+
ctx.textBaseline = "top";
|
|
3276
3295
|
const textMetrics = ctx.measureText(fileName);
|
|
3277
3296
|
const textWidth = textMetrics.width;
|
|
3278
3297
|
if (textWidth < width - 8) {
|
|
3279
|
-
const
|
|
3280
|
-
const
|
|
3281
|
-
ctx.fillStyle = "rgba(0, 0, 0, 0.7)";
|
|
3282
|
-
ctx.fillRect(pos.x - textWidth / 2 - textPadding, pos.y - textHeight / 2, textWidth + textPadding * 2, textHeight);
|
|
3298
|
+
const spacing = 4;
|
|
3299
|
+
const textY = iconBottomY + spacing;
|
|
3283
3300
|
ctx.fillStyle = "rgba(255, 255, 255, 0.95)";
|
|
3284
|
-
ctx.fillText(fileName, pos.x,
|
|
3301
|
+
ctx.fillText(fileName, pos.x, textY);
|
|
3285
3302
|
}
|
|
3286
3303
|
ctx.restore();
|
|
3287
3304
|
}
|
|
@@ -14397,11 +14414,12 @@ const FileCardList = ({
|
|
|
14397
14414
|
const aIsDir = isDirectory(a.path);
|
|
14398
14415
|
const bIsDir = isDirectory(b.path);
|
|
14399
14416
|
if (aIsDir !== bIsDir) return aIsDir ? -1 : 1;
|
|
14400
|
-
const
|
|
14401
|
-
const
|
|
14402
|
-
|
|
14417
|
+
const aDepth = a.path.split("/").length;
|
|
14418
|
+
const bDepth = b.path.split("/").length;
|
|
14419
|
+
if (aDepth !== bDepth) return aDepth - bDepth;
|
|
14420
|
+
return a.path.toLowerCase().localeCompare(b.path.toLowerCase());
|
|
14403
14421
|
});
|
|
14404
|
-
}, [files2, isDirectory
|
|
14422
|
+
}, [files2, isDirectory]);
|
|
14405
14423
|
if (files2.length === 0) {
|
|
14406
14424
|
return /* @__PURE__ */ jsx(
|
|
14407
14425
|
"div",
|
|
@@ -18866,6 +18884,16 @@ const CodeCityPanelContent = ({
|
|
|
18866
18884
|
const handleFileClick = useCallback(
|
|
18867
18885
|
(filePath, type) => {
|
|
18868
18886
|
if (type === "file") {
|
|
18887
|
+
if (selectedFilePath === filePath) {
|
|
18888
|
+
setSelectedFilePath(null);
|
|
18889
|
+
events.emit({
|
|
18890
|
+
type: "package:select",
|
|
18891
|
+
source: "code-city-panel",
|
|
18892
|
+
timestamp: Date.now(),
|
|
18893
|
+
payload: null
|
|
18894
|
+
});
|
|
18895
|
+
return;
|
|
18896
|
+
}
|
|
18869
18897
|
setSelectedFilePath(filePath);
|
|
18870
18898
|
let gitStatus;
|
|
18871
18899
|
if (gitSlice == null ? void 0 : gitSlice.data) {
|
|
@@ -18885,6 +18913,15 @@ const CodeCityPanelContent = ({
|
|
|
18885
18913
|
timestamp: Date.now(),
|
|
18886
18914
|
payload: { path: filePath, gitStatus }
|
|
18887
18915
|
});
|
|
18916
|
+
const lastSlashIndex = filePath.lastIndexOf("/");
|
|
18917
|
+
const parentDirectory = lastSlashIndex > 0 ? filePath.substring(0, lastSlashIndex) : "";
|
|
18918
|
+
const packageName = parentDirectory ? parentDirectory.split("/").pop() : "";
|
|
18919
|
+
events.emit({
|
|
18920
|
+
type: "package:select",
|
|
18921
|
+
source: "code-city-panel",
|
|
18922
|
+
timestamp: Date.now(),
|
|
18923
|
+
payload: { packagePath: parentDirectory, packageName }
|
|
18924
|
+
});
|
|
18888
18925
|
} else {
|
|
18889
18926
|
events.emit({
|
|
18890
18927
|
type: "package:select",
|
|
@@ -18894,7 +18931,7 @@ const CodeCityPanelContent = ({
|
|
|
18894
18931
|
});
|
|
18895
18932
|
}
|
|
18896
18933
|
},
|
|
18897
|
-
[events, gitSlice == null ? void 0 : gitSlice.data]
|
|
18934
|
+
[events, gitSlice == null ? void 0 : gitSlice.data, selectedFilePath]
|
|
18898
18935
|
);
|
|
18899
18936
|
const handleClearPackageSelection = useCallback(() => {
|
|
18900
18937
|
events.emit({
|
|
@@ -19135,6 +19172,7 @@ const CodeCityPanelContent = ({
|
|
|
19135
19172
|
defaultDirectoryColor: "#111827",
|
|
19136
19173
|
onFileClick: handleFileClick,
|
|
19137
19174
|
showFileTypeIcons: true,
|
|
19175
|
+
showFileNames: true,
|
|
19138
19176
|
className: "w-full h-full",
|
|
19139
19177
|
showDirectoryLabels: true,
|
|
19140
19178
|
onHover: handleHover,
|
|
@@ -20027,6 +20065,7 @@ const FeedCodeCityPanelContent = ({
|
|
|
20027
20065
|
defaultDirectoryColor: "#111827",
|
|
20028
20066
|
onFileClick: handleFileClick,
|
|
20029
20067
|
showFileTypeIcons: true,
|
|
20068
|
+
showFileNames: true,
|
|
20030
20069
|
className: "w-full h-full",
|
|
20031
20070
|
showDirectoryLabels: true,
|
|
20032
20071
|
onHover: handleHover,
|