@industry-theme/file-city-panel 0.2.46 → 0.2.48
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 +12 -0
- package/dist/panels/AgentMailFileCityPanel.d.ts.map +1 -0
- package/dist/panels/AgentMailFileCityPanel.stories.d.ts +34 -0
- package/dist/panels/AgentMailFileCityPanel.stories.d.ts.map +1 -0
- package/dist/panels/AgentMailPanel.d.ts +8 -0
- package/dist/panels/AgentMailPanel.d.ts.map +1 -0
- package/dist/panels/AgentMailPanel.stories.d.ts +42 -0
- package/dist/panels/AgentMailPanel.stories.d.ts.map +1 -0
- package/dist/panels/CodeCityPanel.d.ts.map +1 -1
- package/dist/panels/FeedCodeCityPanel.d.ts.map +1 -1
- package/dist/panels/components/FeedProjectHeader.d.ts +3 -3
- package/dist/panels/components/FeedProjectHeader.d.ts.map +1 -1
- package/dist/panels/components/MessageActivityFeed.d.ts +16 -0
- package/dist/panels/components/MessageActivityFeed.d.ts.map +1 -0
- package/dist/panels/components/MessageActivityFeed.stories.d.ts +38 -0
- package/dist/panels/components/MessageActivityFeed.stories.d.ts.map +1 -0
- package/dist/panels/components/ReservationsView.d.ts +14 -0
- package/dist/panels/components/ReservationsView.d.ts.map +1 -0
- package/dist/panels/components/ReservationsView.stories.d.ts +42 -0
- package/dist/panels/components/ReservationsView.stories.d.ts.map +1 -0
- package/dist/panels/types/agentMail.d.ts +109 -0
- package/dist/panels/types/agentMail.d.ts.map +1 -0
- package/dist/panels/utils/reservationLayers.d.ts +39 -0
- package/dist/panels/utils/reservationLayers.d.ts.map +1 -0
- package/dist/panels.bundle.js +43 -166
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
package/dist/panels.bundle.js
CHANGED
|
@@ -25796,11 +25796,14 @@ const CodeCityPanelContent = ({
|
|
|
25796
25796
|
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, fileTreeSlice == null ? void 0 : fileTreeSlice.loading, (_i = context.currentScope.repository) == null ? void 0 : _i.path]);
|
|
25797
25797
|
const handleFileClick = useCallback(
|
|
25798
25798
|
(filePath) => {
|
|
25799
|
-
|
|
25800
|
-
|
|
25801
|
-
|
|
25799
|
+
events.emit({
|
|
25800
|
+
type: "file:open",
|
|
25801
|
+
source: "code-city-panel",
|
|
25802
|
+
timestamp: Date.now(),
|
|
25803
|
+
payload: { path: filePath }
|
|
25804
|
+
});
|
|
25802
25805
|
},
|
|
25803
|
-
[
|
|
25806
|
+
[events]
|
|
25804
25807
|
);
|
|
25805
25808
|
const handleGitNodeHover = useCallback(
|
|
25806
25809
|
(nodePath, _isFolder) => {
|
|
@@ -26287,28 +26290,6 @@ const CodeCityPanelContent = ({
|
|
|
26287
26290
|
const CodeCityPanel = (props) => {
|
|
26288
26291
|
return /* @__PURE__ */ jsx(CodeCityPanelContent, { ...props });
|
|
26289
26292
|
};
|
|
26290
|
-
const NpmIcon$1 = ({ size: size2 }) => /* @__PURE__ */ jsx("svg", { width: size2, height: size2, viewBox: "0 0 24 24", fill: "#CB3837", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z" }) });
|
|
26291
|
-
const YarnIcon$1 = ({ size: size2 }) => /* @__PURE__ */ jsx("svg", { width: size2, height: size2, viewBox: "0 0 24 24", fill: "#2C8EBB", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M12 0C5.375 0 0 5.375 0 12s5.375 12 12 12 12-5.375 12-12S18.625 0 12 0zm.768 4.105c.183 0 .363.053.525.157.125.083.287.185.755 1.154.31-.088.468-.042.551-.019.204.056.366.19.463.375.477.917.542 2.553.334 3.605-.241 1.232-.755 2.029-1.131 2.576.324.329.778.899 1.117 1.825.278.774.31 1.478.273 2.015a5.51 5.51 0 0 0 .602-.329c.593-.366 1.487-.917 2.553-.931.714-.009 1.269.445 1.353 1.103a1.23 1.23 0 0 1-.945 1.362c-.649.158-.95.278-1.821.843-1.232.797-2.539 1.242-3.012 1.39a1.686 1.686 0 0 1-.704.343c-.737.181-3.266.315-3.466.315h-.046c-.783 0-1.214-.241-1.45-.491-.658.329-1.51.19-2.122-.134a1.078 1.078 0 0 1-.58-1.153 1.243 1.243 0 0 1-.153-.195c-.162-.25-.528-.936-.454-1.946.056-.723.556-1.367.88-1.71a5.522 5.522 0 0 1 .408-2.256c.306-.727.885-1.348 1.32-1.737-.32-.537-.644-1.367-.329-2.21.227-.602.412-.936.82-1.08h-.005c.199-.074.389-.153.486-.259a3.418 3.418 0 0 1 2.298-1.103c.037-.093.079-.185.125-.283.31-.658.639-1.029 1.024-1.168a.94.94 0 0 1 .328-.06z" }) });
|
|
26292
|
-
const PnpmIcon$1 = ({ size: size2 }) => /* @__PURE__ */ jsx("svg", { width: size2, height: size2, viewBox: "0 0 24 24", fill: "#F69220", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M0 0v7.5h7.5V0zm8.25 0v7.5h7.498V0zm8.25 0v7.5H24V0zM8.25 8.25v7.5h7.498v-7.5zm8.25 0v7.5H24v-7.5zM0 16.5V24h7.5v-7.5zm8.25 0V24h7.498v-7.5zm8.25 0V24H24v-7.5z" }) });
|
|
26293
|
-
const BunIcon$1 = ({ size: size2 }) => /* @__PURE__ */ jsx("svg", { width: size2, height: size2, viewBox: "0 0 24 24", fill: "#FBF0DF", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001Z" }) });
|
|
26294
|
-
const PackageManagerIcon$1 = ({
|
|
26295
|
-
packageManager,
|
|
26296
|
-
size: size2 = 14,
|
|
26297
|
-
color: color2
|
|
26298
|
-
}) => {
|
|
26299
|
-
switch (packageManager) {
|
|
26300
|
-
case "npm":
|
|
26301
|
-
return /* @__PURE__ */ jsx(NpmIcon$1, { size: size2 });
|
|
26302
|
-
case "yarn":
|
|
26303
|
-
return /* @__PURE__ */ jsx(YarnIcon$1, { size: size2 });
|
|
26304
|
-
case "pnpm":
|
|
26305
|
-
return /* @__PURE__ */ jsx(PnpmIcon$1, { size: size2 });
|
|
26306
|
-
case "bun":
|
|
26307
|
-
return /* @__PURE__ */ jsx(BunIcon$1, { size: size2 });
|
|
26308
|
-
default:
|
|
26309
|
-
return /* @__PURE__ */ jsx(Package, { size: size2, color: color2 });
|
|
26310
|
-
}
|
|
26311
|
-
};
|
|
26312
26293
|
const shimmerKeyframes = `
|
|
26313
26294
|
@keyframes feed-header-shimmer {
|
|
26314
26295
|
0% { background-position: -200% 0; }
|
|
@@ -26383,24 +26364,7 @@ const FeedProjectHeaderSkeleton = ({ compact = false }) => {
|
|
|
26383
26364
|
/* @__PURE__ */ jsx(ShimmerBox, { width: 45, height: 14, backgroundColor: shimmerBg }),
|
|
26384
26365
|
/* @__PURE__ */ jsx(ShimmerBox, { width: 45, height: 14, backgroundColor: shimmerBg }),
|
|
26385
26366
|
/* @__PURE__ */ jsx(ShimmerBox, { width: 55, height: 14, backgroundColor: shimmerBg })
|
|
26386
|
-
] })
|
|
26387
|
-
/* @__PURE__ */ jsxs(
|
|
26388
|
-
"div",
|
|
26389
|
-
{
|
|
26390
|
-
style: {
|
|
26391
|
-
display: "flex",
|
|
26392
|
-
alignItems: "center",
|
|
26393
|
-
gap: compact ? 12 : 16,
|
|
26394
|
-
paddingTop: compact ? 4 : 8,
|
|
26395
|
-
borderTop: `1px solid ${theme2.colors.border}`
|
|
26396
|
-
},
|
|
26397
|
-
children: [
|
|
26398
|
-
/* @__PURE__ */ jsx(ShimmerBox, { width: 80, height: 14, backgroundColor: shimmerBg }),
|
|
26399
|
-
/* @__PURE__ */ jsx(ShimmerBox, { width: 60, height: 18, borderRadius: 4, backgroundColor: shimmerBg }),
|
|
26400
|
-
/* @__PURE__ */ jsx(ShimmerBox, { width: 90, height: 14, backgroundColor: shimmerBg })
|
|
26401
|
-
]
|
|
26402
|
-
}
|
|
26403
|
-
)
|
|
26367
|
+
] })
|
|
26404
26368
|
]
|
|
26405
26369
|
}
|
|
26406
26370
|
);
|
|
@@ -26416,7 +26380,8 @@ function formatCount(count2) {
|
|
|
26416
26380
|
}
|
|
26417
26381
|
const FeedProjectHeader = ({
|
|
26418
26382
|
repo,
|
|
26419
|
-
rootPackage
|
|
26383
|
+
// rootPackage kept for API compatibility but not rendered
|
|
26384
|
+
rootPackage: _rootPackage,
|
|
26420
26385
|
onOpen,
|
|
26421
26386
|
compact = false
|
|
26422
26387
|
}) => {
|
|
@@ -26424,7 +26389,6 @@ const FeedProjectHeader = ({
|
|
|
26424
26389
|
const fontSizeSmall = theme2.fontSizes[0];
|
|
26425
26390
|
const fontSizeMedium = theme2.fontSizes[1];
|
|
26426
26391
|
const fontSizeLarge = theme2.fontSizes[2] || theme2.fontSizes[1];
|
|
26427
|
-
const totalDeps = rootPackage ? (rootPackage.dependencyCount || 0) + (rootPackage.devDependencyCount || 0) : 0;
|
|
26428
26392
|
return /* @__PURE__ */ jsxs(
|
|
26429
26393
|
"div",
|
|
26430
26394
|
{
|
|
@@ -26551,9 +26515,9 @@ const FeedProjectHeader = ({
|
|
|
26551
26515
|
{
|
|
26552
26516
|
style: {
|
|
26553
26517
|
margin: 0,
|
|
26554
|
-
fontSize:
|
|
26518
|
+
fontSize: fontSizeMedium,
|
|
26555
26519
|
color: theme2.colors.textSecondary,
|
|
26556
|
-
lineHeight: 1.
|
|
26520
|
+
lineHeight: 1.5,
|
|
26557
26521
|
display: "-webkit-box",
|
|
26558
26522
|
WebkitLineClamp: 2,
|
|
26559
26523
|
WebkitBoxOrient: "vertical",
|
|
@@ -26664,108 +26628,6 @@ const FeedProjectHeader = ({
|
|
|
26664
26628
|
)
|
|
26665
26629
|
]
|
|
26666
26630
|
}
|
|
26667
|
-
),
|
|
26668
|
-
rootPackage && /* @__PURE__ */ jsxs(
|
|
26669
|
-
"div",
|
|
26670
|
-
{
|
|
26671
|
-
style: {
|
|
26672
|
-
display: "flex",
|
|
26673
|
-
alignItems: "center",
|
|
26674
|
-
gap: compact ? 12 : 16,
|
|
26675
|
-
flexWrap: "wrap",
|
|
26676
|
-
paddingTop: compact ? 4 : 8,
|
|
26677
|
-
borderTop: `1px solid ${theme2.colors.border}`
|
|
26678
|
-
},
|
|
26679
|
-
children: [
|
|
26680
|
-
rootPackage.packageManager && /* @__PURE__ */ jsxs(
|
|
26681
|
-
"div",
|
|
26682
|
-
{
|
|
26683
|
-
style: {
|
|
26684
|
-
display: "flex",
|
|
26685
|
-
alignItems: "center",
|
|
26686
|
-
gap: 6
|
|
26687
|
-
},
|
|
26688
|
-
children: [
|
|
26689
|
-
/* @__PURE__ */ jsx(
|
|
26690
|
-
PackageManagerIcon$1,
|
|
26691
|
-
{
|
|
26692
|
-
packageManager: rootPackage.packageManager,
|
|
26693
|
-
size: 14,
|
|
26694
|
-
color: theme2.colors.textSecondary
|
|
26695
|
-
}
|
|
26696
|
-
),
|
|
26697
|
-
rootPackage.name && /* @__PURE__ */ jsx(
|
|
26698
|
-
"span",
|
|
26699
|
-
{
|
|
26700
|
-
style: {
|
|
26701
|
-
fontSize: fontSizeSmall,
|
|
26702
|
-
color: theme2.colors.text,
|
|
26703
|
-
fontWeight: 500
|
|
26704
|
-
},
|
|
26705
|
-
children: rootPackage.name
|
|
26706
|
-
}
|
|
26707
|
-
),
|
|
26708
|
-
rootPackage.version && /* @__PURE__ */ jsxs(
|
|
26709
|
-
"span",
|
|
26710
|
-
{
|
|
26711
|
-
style: {
|
|
26712
|
-
fontSize: fontSizeSmall,
|
|
26713
|
-
color: theme2.colors.textSecondary,
|
|
26714
|
-
backgroundColor: theme2.colors.backgroundLight,
|
|
26715
|
-
padding: "1px 5px",
|
|
26716
|
-
borderRadius: "3px"
|
|
26717
|
-
},
|
|
26718
|
-
children: [
|
|
26719
|
-
"v",
|
|
26720
|
-
rootPackage.version
|
|
26721
|
-
]
|
|
26722
|
-
}
|
|
26723
|
-
)
|
|
26724
|
-
]
|
|
26725
|
-
}
|
|
26726
|
-
),
|
|
26727
|
-
rootPackage.isMonorepo && /* @__PURE__ */ jsxs(
|
|
26728
|
-
"span",
|
|
26729
|
-
{
|
|
26730
|
-
style: {
|
|
26731
|
-
display: "flex",
|
|
26732
|
-
alignItems: "center",
|
|
26733
|
-
gap: 4,
|
|
26734
|
-
fontSize: fontSizeSmall,
|
|
26735
|
-
color: "#8b5cf6",
|
|
26736
|
-
backgroundColor: "rgba(139, 92, 246, 0.15)",
|
|
26737
|
-
padding: "2px 6px",
|
|
26738
|
-
borderRadius: "4px"
|
|
26739
|
-
},
|
|
26740
|
-
children: [
|
|
26741
|
-
/* @__PURE__ */ jsx(GitBranch, { size: 12 }),
|
|
26742
|
-
rootPackage.packageCount ? `${rootPackage.packageCount} packages` : "monorepo"
|
|
26743
|
-
]
|
|
26744
|
-
}
|
|
26745
|
-
),
|
|
26746
|
-
totalDeps > 0 && /* @__PURE__ */ jsxs(
|
|
26747
|
-
"div",
|
|
26748
|
-
{
|
|
26749
|
-
style: {
|
|
26750
|
-
display: "flex",
|
|
26751
|
-
alignItems: "center",
|
|
26752
|
-
gap: 4,
|
|
26753
|
-
fontSize: fontSizeSmall,
|
|
26754
|
-
color: theme2.colors.textSecondary
|
|
26755
|
-
},
|
|
26756
|
-
title: `${rootPackage.dependencyCount || 0} prod, ${rootPackage.devDependencyCount || 0} dev dependencies`,
|
|
26757
|
-
children: [
|
|
26758
|
-
/* @__PURE__ */ jsx(Box, { size: 12 }),
|
|
26759
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
26760
|
-
rootPackage.dependencyCount || 0,
|
|
26761
|
-
" deps",
|
|
26762
|
-
rootPackage.devDependencyCount ? ` + ${rootPackage.devDependencyCount} dev` : ""
|
|
26763
|
-
] })
|
|
26764
|
-
]
|
|
26765
|
-
}
|
|
26766
|
-
)
|
|
26767
|
-
]
|
|
26768
|
-
}
|
|
26769
26631
|
)
|
|
26770
26632
|
]
|
|
26771
26633
|
}
|
|
@@ -26776,7 +26638,7 @@ const FeedCodeCityPanelContent = ({
|
|
|
26776
26638
|
actions: actions2,
|
|
26777
26639
|
events
|
|
26778
26640
|
}) => {
|
|
26779
|
-
var _a, _b, _c, _d, _e, _f
|
|
26641
|
+
var _a, _b, _c, _d, _e, _f;
|
|
26780
26642
|
const { theme: theme2 } = useTheme();
|
|
26781
26643
|
const [cityData, setCityData] = useState(null);
|
|
26782
26644
|
const [hoverInfo, setHoverInfo] = useState(null);
|
|
@@ -26784,7 +26646,20 @@ const FeedCodeCityPanelContent = ({
|
|
|
26784
26646
|
const [loading, setLoading] = useState(false);
|
|
26785
26647
|
const [containerSize, setContainerSize] = useState(null);
|
|
26786
26648
|
const contentContainerRef = useRef(null);
|
|
26787
|
-
const
|
|
26649
|
+
const [feedProjectData, setFeedProjectData] = useState(null);
|
|
26650
|
+
const [feedProjectLoading, setFeedProjectLoading] = useState(false);
|
|
26651
|
+
useEffect(() => {
|
|
26652
|
+
const syncSlice = () => {
|
|
26653
|
+
const slice = context.getSlice("feedProject");
|
|
26654
|
+
if (slice) {
|
|
26655
|
+
setFeedProjectData(slice.data ?? null);
|
|
26656
|
+
setFeedProjectLoading(slice.loading);
|
|
26657
|
+
}
|
|
26658
|
+
};
|
|
26659
|
+
syncSlice();
|
|
26660
|
+
const interval2 = setInterval(syncSlice, 100);
|
|
26661
|
+
return () => clearInterval(interval2);
|
|
26662
|
+
}, [context]);
|
|
26788
26663
|
const LEGEND_MIN_SIZE = 200;
|
|
26789
26664
|
const HOVER_BAR_HEIGHT = 48;
|
|
26790
26665
|
useEffect(() => {
|
|
@@ -26881,26 +26756,28 @@ const FeedCodeCityPanelContent = ({
|
|
|
26881
26756
|
}, []);
|
|
26882
26757
|
const handleFileClick = useCallback(
|
|
26883
26758
|
(filePath) => {
|
|
26884
|
-
|
|
26885
|
-
|
|
26886
|
-
|
|
26759
|
+
events.emit({
|
|
26760
|
+
type: "file:open",
|
|
26761
|
+
source: "feed-code-city-panel",
|
|
26762
|
+
timestamp: Date.now(),
|
|
26763
|
+
payload: { path: filePath }
|
|
26764
|
+
});
|
|
26887
26765
|
},
|
|
26888
|
-
[
|
|
26766
|
+
[events]
|
|
26889
26767
|
);
|
|
26890
26768
|
const handleOpen = useCallback(() => {
|
|
26891
|
-
|
|
26892
|
-
if (((_a2 = feedProjectSlice == null ? void 0 : feedProjectSlice.data) == null ? void 0 : _a2.repo) && events) {
|
|
26769
|
+
if ((feedProjectData == null ? void 0 : feedProjectData.repo) && events) {
|
|
26893
26770
|
events.emit({
|
|
26894
26771
|
type: "project:open",
|
|
26895
26772
|
source: "feed-code-city-panel",
|
|
26896
26773
|
timestamp: Date.now(),
|
|
26897
26774
|
payload: {
|
|
26898
|
-
repo:
|
|
26899
|
-
rootPackage:
|
|
26775
|
+
repo: feedProjectData.repo,
|
|
26776
|
+
rootPackage: feedProjectData.rootPackage
|
|
26900
26777
|
}
|
|
26901
26778
|
});
|
|
26902
26779
|
}
|
|
26903
|
-
}, [events,
|
|
26780
|
+
}, [events, feedProjectData]);
|
|
26904
26781
|
return /* @__PURE__ */ jsxs(
|
|
26905
26782
|
"div",
|
|
26906
26783
|
{
|
|
@@ -26912,11 +26789,11 @@ const FeedCodeCityPanelContent = ({
|
|
|
26912
26789
|
backgroundColor: theme2.colors.background
|
|
26913
26790
|
},
|
|
26914
26791
|
children: [
|
|
26915
|
-
|
|
26792
|
+
feedProjectLoading ? /* @__PURE__ */ jsx(FeedProjectHeaderSkeleton, {}) : (feedProjectData == null ? void 0 : feedProjectData.repo) ? /* @__PURE__ */ jsx(
|
|
26916
26793
|
FeedProjectHeader,
|
|
26917
26794
|
{
|
|
26918
|
-
repo:
|
|
26919
|
-
rootPackage:
|
|
26795
|
+
repo: feedProjectData.repo,
|
|
26796
|
+
rootPackage: feedProjectData.rootPackage,
|
|
26920
26797
|
onOpen: handleOpen
|
|
26921
26798
|
}
|
|
26922
26799
|
) : null,
|
|
@@ -27032,7 +26909,7 @@ const FeedCodeCityPanelContent = ({
|
|
|
27032
26909
|
textOverflow: "ellipsis",
|
|
27033
26910
|
whiteSpace: "nowrap"
|
|
27034
26911
|
},
|
|
27035
|
-
children: ((
|
|
26912
|
+
children: ((_a = hoverInfo.fileTooltip) == null ? void 0 : _a.text) || ((_c = (_b = hoverInfo.hoveredDistrict) == null ? void 0 : _b.path) == null ? void 0 : _c.split("/").pop()) || ((_d = hoverInfo.hoveredDistrict) == null ? void 0 : _d.path) || "Unknown"
|
|
27036
26913
|
}
|
|
27037
26914
|
),
|
|
27038
26915
|
/* @__PURE__ */ jsx(
|
|
@@ -27046,7 +26923,7 @@ const FeedCodeCityPanelContent = ({
|
|
|
27046
26923
|
textOverflow: "ellipsis",
|
|
27047
26924
|
whiteSpace: "nowrap"
|
|
27048
26925
|
},
|
|
27049
|
-
children: ((
|
|
26926
|
+
children: ((_e = hoverInfo.hoveredBuilding) == null ? void 0 : _e.path) || ((_f = hoverInfo.hoveredDistrict) == null ? void 0 : _f.path) || "/"
|
|
27050
26927
|
}
|
|
27051
26928
|
)
|
|
27052
26929
|
]
|