@industry-theme/repository-composition-panels 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/PackageCompositionPanel.d.ts +3 -1
- package/dist/panels/PackageCompositionPanel.d.ts.map +1 -1
- package/dist/panels/dependency-graph/DependencyGraphPanel.d.ts.map +1 -1
- package/dist/panels/dependency-graph/dependencyToCanvas.d.ts.map +1 -1
- package/dist/panels.bundle.js +78 -16
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PanelComponentProps } from '../types';
|
|
2
|
+
import type { PanelComponentProps, PanelEventEmitter } from '../types';
|
|
3
3
|
import type { PackageLayer, ConfigFile, PackageCommand } from '../types/composition';
|
|
4
4
|
export interface PackageCompositionPanelProps {
|
|
5
5
|
/** Detected packages in the repository */
|
|
@@ -18,6 +18,8 @@ export interface PackageCompositionPanelProps {
|
|
|
18
18
|
onPackageHover?: (pkg: PackageLayer | null) => void;
|
|
19
19
|
/** Callback when a package is selected (null when deselected) */
|
|
20
20
|
onPackageSelect?: (pkg: PackageLayer | null) => void;
|
|
21
|
+
/** Event emitter for panel communication */
|
|
22
|
+
events?: PanelEventEmitter;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* PackageCompositionPanelContent - Internal component that renders the package composition UI
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageCompositionPanel.d.ts","sourceRoot":"","sources":["../../src/panels/PackageCompositionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAmBjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"PackageCompositionPanel.d.ts","sourceRoot":"","sources":["../../src/panels/PackageCompositionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,M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],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAa9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAK5D,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAgBD;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,
|
|
1
|
+
{"version":3,"file":"DependencyGraphPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/dependency-graph/DependencyGraphPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAa9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAK5D,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAgBD;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAoW3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAwB/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAa9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencyToCanvas.d.ts","sourceRoot":"","sources":["../../../src/panels/dependency-graph/dependencyToCanvas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"dependencyToCanvas.d.ts","sourceRoot":"","sources":["../../../src/panels/dependency-graph/dependencyToCanvas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAA4B,MAAM,mCAAmC,CAAC;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAgB5D,MAAM,WAAW,uBAAuB;IACtC,2CAA2C;IAC3C,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,4CAA4C;IAC5C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,YAAY,EAAE,EACxB,OAAO,GAAE,uBAA4B,GACpC,cAAc,CAwHhB"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -3387,7 +3387,8 @@ const PackageCompositionPanelContent = ({
|
|
|
3387
3387
|
onConfigClick,
|
|
3388
3388
|
onPackageClick,
|
|
3389
3389
|
onPackageHover,
|
|
3390
|
-
onPackageSelect
|
|
3390
|
+
onPackageSelect,
|
|
3391
|
+
events
|
|
3391
3392
|
}) => {
|
|
3392
3393
|
const { theme } = useTheme();
|
|
3393
3394
|
const [selectedPackageId, setSelectedPackageId] = useState(null);
|
|
@@ -3491,10 +3492,50 @@ const PackageCompositionPanelContent = ({
|
|
|
3491
3492
|
},
|
|
3492
3493
|
children: [
|
|
3493
3494
|
/* @__PURE__ */ jsx(FileCode$1, { size: 16, color: theme.colors.primary }),
|
|
3494
|
-
/* @__PURE__ */ jsxs("span", { style: { fontSize: theme.fontSizes[1], fontFamily: theme.fonts.body, color: theme.colors.textSecondary }, children: [
|
|
3495
|
+
/* @__PURE__ */ jsxs("span", { style: { fontSize: theme.fontSizes[1], fontFamily: theme.fonts.body, color: theme.colors.textSecondary, flex: 1 }, children: [
|
|
3495
3496
|
packages.length,
|
|
3496
3497
|
" packages"
|
|
3497
|
-
] })
|
|
3498
|
+
] }),
|
|
3499
|
+
packages.length > 1 && /* @__PURE__ */ jsxs(
|
|
3500
|
+
"button",
|
|
3501
|
+
{
|
|
3502
|
+
onClick: () => {
|
|
3503
|
+
events == null ? void 0 : events.emit({
|
|
3504
|
+
type: "dependency-graph:open",
|
|
3505
|
+
source: "PackageCompositionPanel",
|
|
3506
|
+
timestamp: Date.now(),
|
|
3507
|
+
payload: { packages }
|
|
3508
|
+
});
|
|
3509
|
+
},
|
|
3510
|
+
style: {
|
|
3511
|
+
display: "flex",
|
|
3512
|
+
alignItems: "center",
|
|
3513
|
+
gap: "4px",
|
|
3514
|
+
padding: "4px 8px",
|
|
3515
|
+
backgroundColor: theme.colors.backgroundTertiary,
|
|
3516
|
+
border: `1px solid ${theme.colors.border}`,
|
|
3517
|
+
borderRadius: "4px",
|
|
3518
|
+
color: theme.colors.text,
|
|
3519
|
+
fontSize: theme.fontSizes[0],
|
|
3520
|
+
fontFamily: theme.fonts.body,
|
|
3521
|
+
cursor: "pointer",
|
|
3522
|
+
transition: "all 0.15s ease"
|
|
3523
|
+
},
|
|
3524
|
+
onMouseEnter: (e) => {
|
|
3525
|
+
e.currentTarget.style.borderColor = theme.colors.primary;
|
|
3526
|
+
e.currentTarget.style.backgroundColor = theme.colors.primary + "15";
|
|
3527
|
+
},
|
|
3528
|
+
onMouseLeave: (e) => {
|
|
3529
|
+
e.currentTarget.style.borderColor = theme.colors.border;
|
|
3530
|
+
e.currentTarget.style.backgroundColor = theme.colors.backgroundTertiary;
|
|
3531
|
+
},
|
|
3532
|
+
title: "Open dependency graph in new tab",
|
|
3533
|
+
children: [
|
|
3534
|
+
/* @__PURE__ */ jsx(GitBranch$1, { size: 12 }),
|
|
3535
|
+
"View Graph"
|
|
3536
|
+
]
|
|
3537
|
+
}
|
|
3538
|
+
)
|
|
3498
3539
|
]
|
|
3499
3540
|
}
|
|
3500
3541
|
),
|
|
@@ -3672,7 +3713,8 @@ const PackageCompositionPanel = ({ context, events }) => {
|
|
|
3672
3713
|
packages,
|
|
3673
3714
|
isLoading,
|
|
3674
3715
|
onPackageHover: handlePackageHover,
|
|
3675
|
-
onPackageSelect: handlePackageSelect
|
|
3716
|
+
onPackageSelect: handlePackageSelect,
|
|
3717
|
+
events
|
|
3676
3718
|
}
|
|
3677
3719
|
);
|
|
3678
3720
|
};
|
|
@@ -55922,6 +55964,19 @@ const GraphRenderer = forwardRef((props, ref) => {
|
|
|
55922
55964
|
return jsx("div", { className, style: { width, height, position: "relative" }, children: jsx(ReactFlowProvider, { children: jsx(GraphRendererInner, { configuration, nodes, edges, violations, configName, showMinimap, showControls, showBackground, backgroundVariant, backgroundGap, showCenterIndicator, showTooltips, fitViewDuration, highlightedNodeId, activeNodeIds, events, onEventProcessed, editable, onPendingChangesChange, editStateRef, onNodeClick, showNodeDetailPanel, resolveEventRef }) }) });
|
|
55923
55965
|
});
|
|
55924
55966
|
GraphRenderer.displayName = "GraphRenderer";
|
|
55967
|
+
const ROOT_COLOR = "#f97316";
|
|
55968
|
+
const LANGUAGE_COLORS = {
|
|
55969
|
+
package: "#06b6d4",
|
|
55970
|
+
// cyan - generic/JS
|
|
55971
|
+
node: "#06b6d4",
|
|
55972
|
+
// cyan - Node.js/TypeScript
|
|
55973
|
+
python: "#fbbf24",
|
|
55974
|
+
// yellow - Python
|
|
55975
|
+
cargo: "#ef4444",
|
|
55976
|
+
// red - Rust
|
|
55977
|
+
go: "#22c55e"
|
|
55978
|
+
// green - Go
|
|
55979
|
+
};
|
|
55925
55980
|
function dependencyTreeToCanvas(packages, options = {}) {
|
|
55926
55981
|
const {
|
|
55927
55982
|
includeDevDependencies = true,
|
|
@@ -55933,6 +55988,7 @@ function dependencyTreeToCanvas(packages, options = {}) {
|
|
|
55933
55988
|
const nodes = packages.map((pkg) => {
|
|
55934
55989
|
const isRoot = pkg.packageData.isMonorepoRoot;
|
|
55935
55990
|
const shape = isRoot ? "hexagon" : "rectangle";
|
|
55991
|
+
const color2 = isRoot ? ROOT_COLOR : LANGUAGE_COLORS[pkg.type] || "#06b6d4";
|
|
55936
55992
|
return {
|
|
55937
55993
|
id: pkg.id,
|
|
55938
55994
|
x: 0,
|
|
@@ -55942,8 +55998,7 @@ function dependencyTreeToCanvas(packages, options = {}) {
|
|
|
55942
55998
|
height: nodeHeight,
|
|
55943
55999
|
type: "text",
|
|
55944
56000
|
text: pkg.packageData.name,
|
|
55945
|
-
color:
|
|
55946
|
-
// Use color preset 2 (orange) for root
|
|
56001
|
+
color: color2,
|
|
55947
56002
|
pv: {
|
|
55948
56003
|
nodeType: isRoot ? "monorepo-root" : "package",
|
|
55949
56004
|
shape,
|
|
@@ -59486,7 +59541,7 @@ const DependencyGraphPanelContent = ({
|
|
|
59486
59541
|
nodeSpacingY: layoutConfig.nodeSpacingY
|
|
59487
59542
|
};
|
|
59488
59543
|
return applySugiyamaLayout(rawCanvas, layoutOptions);
|
|
59489
|
-
}, [packages, layoutConfig
|
|
59544
|
+
}, [packages, layoutConfig]);
|
|
59490
59545
|
const handleReapplyLayout = useCallback(() => {
|
|
59491
59546
|
setLayoutVersion((v) => v + 1);
|
|
59492
59547
|
}, []);
|
|
@@ -59513,7 +59568,8 @@ const DependencyGraphPanelContent = ({
|
|
|
59513
59568
|
alignItems: "center",
|
|
59514
59569
|
justifyContent: "center",
|
|
59515
59570
|
gap: "12px",
|
|
59516
|
-
color: theme.colors.textSecondary
|
|
59571
|
+
color: theme.colors.textSecondary,
|
|
59572
|
+
fontFamily: theme.fonts.body
|
|
59517
59573
|
},
|
|
59518
59574
|
children: [
|
|
59519
59575
|
/* @__PURE__ */ jsx(LoaderCircle$1, { size: 32, style: { animation: "spin 1s linear infinite" } }),
|
|
@@ -59535,6 +59591,7 @@ const DependencyGraphPanelContent = ({
|
|
|
59535
59591
|
justifyContent: "center",
|
|
59536
59592
|
gap: "12px",
|
|
59537
59593
|
color: theme.colors.textSecondary,
|
|
59594
|
+
fontFamily: theme.fonts.body,
|
|
59538
59595
|
padding: "24px",
|
|
59539
59596
|
textAlign: "center"
|
|
59540
59597
|
},
|
|
@@ -59558,6 +59615,7 @@ const DependencyGraphPanelContent = ({
|
|
|
59558
59615
|
justifyContent: "center",
|
|
59559
59616
|
gap: "12px",
|
|
59560
59617
|
color: theme.colors.textSecondary,
|
|
59618
|
+
fontFamily: theme.fonts.body,
|
|
59561
59619
|
padding: "24px",
|
|
59562
59620
|
textAlign: "center"
|
|
59563
59621
|
},
|
|
@@ -59581,6 +59639,7 @@ const DependencyGraphPanelContent = ({
|
|
|
59581
59639
|
justifyContent: "center",
|
|
59582
59640
|
gap: "12px",
|
|
59583
59641
|
color: theme.colors.textSecondary,
|
|
59642
|
+
fontFamily: theme.fonts.body,
|
|
59584
59643
|
padding: "24px",
|
|
59585
59644
|
textAlign: "center"
|
|
59586
59645
|
},
|
|
@@ -59607,8 +59666,8 @@ const DependencyGraphPanelContent = ({
|
|
|
59607
59666
|
children: [
|
|
59608
59667
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
59609
59668
|
/* @__PURE__ */ jsx(GitBranch$1, { size: 16, color: theme.colors.primary }),
|
|
59610
|
-
/* @__PURE__ */ jsx("span", { style: { fontSize: theme.fontSizes[2], fontWeight: 500 }, children: "Dependency Graph" }),
|
|
59611
|
-
/* @__PURE__ */ jsxs("span", { style: { fontSize: theme.fontSizes[1], color: theme.colors.textSecondary }, children: [
|
|
59669
|
+
/* @__PURE__ */ jsx("span", { style: { fontSize: theme.fontSizes[2], fontWeight: 500, color: theme.colors.text, fontFamily: theme.fonts.body }, children: "Dependency Graph" }),
|
|
59670
|
+
/* @__PURE__ */ jsxs("span", { style: { fontSize: theme.fontSizes[1], color: theme.colors.textSecondary, fontFamily: theme.fonts.body }, children: [
|
|
59612
59671
|
"(",
|
|
59613
59672
|
packages.length,
|
|
59614
59673
|
" packages, ",
|
|
@@ -59676,7 +59735,7 @@ const DependencyGraphPanelContent = ({
|
|
|
59676
59735
|
},
|
|
59677
59736
|
children: [
|
|
59678
59737
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
59679
|
-
/* @__PURE__ */ jsx("label", { style: { fontSize: theme.fontSizes[1], color: theme.colors.textSecondary }, children: "Direction" }),
|
|
59738
|
+
/* @__PURE__ */ jsx("label", { style: { fontSize: theme.fontSizes[1], color: theme.colors.textSecondary, fontFamily: theme.fonts.body }, children: "Direction" }),
|
|
59680
59739
|
/* @__PURE__ */ jsx(
|
|
59681
59740
|
"select",
|
|
59682
59741
|
{
|
|
@@ -59688,14 +59747,15 @@ const DependencyGraphPanelContent = ({
|
|
|
59688
59747
|
border: `1px solid ${theme.colors.border}`,
|
|
59689
59748
|
borderRadius: "4px",
|
|
59690
59749
|
color: theme.colors.text,
|
|
59691
|
-
fontSize: theme.fontSizes[1]
|
|
59750
|
+
fontSize: theme.fontSizes[1],
|
|
59751
|
+
fontFamily: theme.fonts.body
|
|
59692
59752
|
},
|
|
59693
59753
|
children: Object.entries(directionLabels).map(([value, label]) => /* @__PURE__ */ jsx("option", { value, children: label }, value))
|
|
59694
59754
|
}
|
|
59695
59755
|
)
|
|
59696
59756
|
] }),
|
|
59697
59757
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
59698
|
-
/* @__PURE__ */ jsxs("label", { style: { fontSize: theme.fontSizes[1], color: theme.colors.textSecondary }, children: [
|
|
59758
|
+
/* @__PURE__ */ jsxs("label", { style: { fontSize: theme.fontSizes[1], color: theme.colors.textSecondary, fontFamily: theme.fonts.body }, children: [
|
|
59699
59759
|
"H-Spacing: ",
|
|
59700
59760
|
layoutConfig.nodeSpacingX,
|
|
59701
59761
|
"px"
|
|
@@ -59714,7 +59774,7 @@ const DependencyGraphPanelContent = ({
|
|
|
59714
59774
|
)
|
|
59715
59775
|
] }),
|
|
59716
59776
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
59717
|
-
/* @__PURE__ */ jsxs("label", { style: { fontSize: theme.fontSizes[1], color: theme.colors.textSecondary }, children: [
|
|
59777
|
+
/* @__PURE__ */ jsxs("label", { style: { fontSize: theme.fontSizes[1], color: theme.colors.textSecondary, fontFamily: theme.fonts.body }, children: [
|
|
59718
59778
|
"V-Spacing: ",
|
|
59719
59779
|
layoutConfig.nodeSpacingY,
|
|
59720
59780
|
"px"
|
|
@@ -59746,7 +59806,7 @@ const DependencyGraphPanelContent = ({
|
|
|
59746
59806
|
"label",
|
|
59747
59807
|
{
|
|
59748
59808
|
htmlFor: "include-dev-deps",
|
|
59749
|
-
style: { fontSize: theme.fontSizes[1], color: theme.colors.textSecondary, cursor: "pointer" },
|
|
59809
|
+
style: { fontSize: theme.fontSizes[1], color: theme.colors.textSecondary, fontFamily: theme.fonts.body, cursor: "pointer" },
|
|
59750
59810
|
children: "Include devDependencies"
|
|
59751
59811
|
}
|
|
59752
59812
|
)
|
|
@@ -59773,7 +59833,8 @@ const DependencyGraphPanelContent = ({
|
|
|
59773
59833
|
borderTop: `1px solid ${theme.colors.border}`,
|
|
59774
59834
|
backgroundColor: theme.colors.backgroundSecondary,
|
|
59775
59835
|
fontSize: theme.fontSizes[1],
|
|
59776
|
-
color: theme.colors.textSecondary
|
|
59836
|
+
color: theme.colors.textSecondary,
|
|
59837
|
+
fontFamily: theme.fonts.body
|
|
59777
59838
|
},
|
|
59778
59839
|
children: [
|
|
59779
59840
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
@@ -59817,6 +59878,7 @@ const DependencyGraphPanelPreview = () => {
|
|
|
59817
59878
|
padding: "12px",
|
|
59818
59879
|
fontSize: "12px",
|
|
59819
59880
|
color: theme.colors.text,
|
|
59881
|
+
fontFamily: theme.fonts.body,
|
|
59820
59882
|
display: "flex",
|
|
59821
59883
|
flexDirection: "column",
|
|
59822
59884
|
gap: "6px"
|