@industry-theme/repository-composition-panels 0.7.4 → 0.7.6
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/{BufferResource-BySfSNUb.js → BufferResource-C31ApAtI.js} +2 -2
- package/dist/{BufferResource-BySfSNUb.js.map → BufferResource-C31ApAtI.js.map} +1 -1
- package/dist/{CanvasRenderer-DHF2Dl6A.js → CanvasRenderer-8qDPmI6y.js} +3 -3
- package/dist/{CanvasRenderer-DHF2Dl6A.js.map → CanvasRenderer-8qDPmI6y.js.map} +1 -1
- package/dist/{Filter-BcZawFFP.js → Filter-BB0aq-Zy.js} +2 -2
- package/dist/{Filter-BcZawFFP.js.map → Filter-BB0aq-Zy.js.map} +1 -1
- package/dist/{RenderTargetSystem-CcUjlcEn.js → RenderTargetSystem-aSToba5s.js} +3 -3
- package/dist/{RenderTargetSystem-CcUjlcEn.js.map → RenderTargetSystem-aSToba5s.js.map} +1 -1
- package/dist/{WebGLRenderer-B9IXLBU3.js → WebGLRenderer-KD33jTG8.js} +4 -4
- package/dist/{WebGLRenderer-B9IXLBU3.js.map → WebGLRenderer-KD33jTG8.js.map} +1 -1
- package/dist/{WebGPURenderer-CKeryiWg.js → WebGPURenderer-CgEpGyW-.js} +4 -4
- package/dist/{WebGPURenderer-CKeryiWg.js.map → WebGPURenderer-CgEpGyW-.js.map} +1 -1
- package/dist/{browserAll-Dvjnb3Ss.js → browserAll-DsnGrrNf.js} +3 -3
- package/dist/{browserAll-Dvjnb3Ss.js.map → browserAll-DsnGrrNf.js.map} +1 -1
- package/dist/{index-BL0L_jZJ.js → index-mh2Usj7o.js} +386 -97
- package/dist/{index-BL0L_jZJ.js.map → index-mh2Usj7o.js.map} +1 -1
- package/dist/{init-NfYaoDuU.js → init-BA0h7AnH.js} +3 -3
- package/dist/{init-NfYaoDuU.js.map → init-BA0h7AnH.js.map} +1 -1
- package/dist/panels/CollectionMapPanel.d.ts.map +1 -1
- package/dist/panels/PackageCompositionPanel.d.ts.map +1 -1
- package/dist/panels/components/PackageLoadingGraph.d.ts.map +1 -1
- package/dist/panels/components/PackageManagerIcon.d.ts.map +1 -1
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -1
- package/dist/panels/overworld-map/isometricUtils.d.ts +33 -0
- package/dist/panels/overworld-map/isometricUtils.d.ts.map +1 -1
- package/dist/panels.bundle.js +1 -1
- package/dist/webworkerAll-B1yAYeD0.js +3 -0
- package/dist/webworkerAll-B1yAYeD0.js.map +1 -0
- package/package.json +1 -1
- package/dist/webworkerAll-q1iOXUTF.js +0 -3
- package/dist/webworkerAll-q1iOXUTF.js.map +0 -1
|
@@ -1584,15 +1584,71 @@ const PackageLoadingGraph = () => {
|
|
|
1584
1584
|
const fadeDuration = 0.4;
|
|
1585
1585
|
const boxes = [
|
|
1586
1586
|
// Bottom row - drops first, left to right (no bounce)
|
|
1587
|
-
{
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1587
|
+
{
|
|
1588
|
+
id: "pkg-1",
|
|
1589
|
+
x: 20,
|
|
1590
|
+
finalY: 78,
|
|
1591
|
+
delay: 0,
|
|
1592
|
+
size: "md",
|
|
1593
|
+
bounce: [0, 0, 0],
|
|
1594
|
+
pm: "npm"
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
id: "pkg-2",
|
|
1598
|
+
x: 40,
|
|
1599
|
+
finalY: 78,
|
|
1600
|
+
delay: staggerDelay * 1,
|
|
1601
|
+
size: "md",
|
|
1602
|
+
bounce: [0, 0, 0],
|
|
1603
|
+
pm: "yarn"
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
id: "pkg-3",
|
|
1607
|
+
x: 60,
|
|
1608
|
+
finalY: 78,
|
|
1609
|
+
delay: staggerDelay * 2,
|
|
1610
|
+
size: "md",
|
|
1611
|
+
bounce: [0, 0, 0],
|
|
1612
|
+
pm: "pnpm"
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
id: "pkg-4",
|
|
1616
|
+
x: 80,
|
|
1617
|
+
finalY: 78,
|
|
1618
|
+
delay: staggerDelay * 3,
|
|
1619
|
+
size: "md",
|
|
1620
|
+
bounce: [0, 0, 0],
|
|
1621
|
+
pm: "cargo"
|
|
1622
|
+
},
|
|
1591
1623
|
// Middle row - stacks on top (bounces)
|
|
1592
|
-
{
|
|
1593
|
-
|
|
1624
|
+
{
|
|
1625
|
+
id: "pkg-5",
|
|
1626
|
+
x: 35,
|
|
1627
|
+
finalY: 50,
|
|
1628
|
+
delay: staggerDelay * 4,
|
|
1629
|
+
size: "md",
|
|
1630
|
+
bounce: [9, 4, 0],
|
|
1631
|
+
pm: "pip"
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
id: "pkg-6",
|
|
1635
|
+
x: 65,
|
|
1636
|
+
finalY: 50,
|
|
1637
|
+
delay: staggerDelay * 5,
|
|
1638
|
+
size: "md",
|
|
1639
|
+
bounce: [11, 5, 0],
|
|
1640
|
+
pm: "poetry"
|
|
1641
|
+
},
|
|
1594
1642
|
// Top - crown of the pyramid (bounces + wobbles!)
|
|
1595
|
-
{
|
|
1643
|
+
{
|
|
1644
|
+
id: "pkg-7",
|
|
1645
|
+
x: 50,
|
|
1646
|
+
finalY: 22,
|
|
1647
|
+
delay: staggerDelay * 6,
|
|
1648
|
+
size: "lg",
|
|
1649
|
+
bounce: [15, 7, 6],
|
|
1650
|
+
pm: "bun"
|
|
1651
|
+
}
|
|
1596
1652
|
];
|
|
1597
1653
|
const bounceDuration = 0.6;
|
|
1598
1654
|
const lastDropEnd = boxes[boxes.length - 1].delay + dropDuration + bounceDuration;
|
|
@@ -1607,12 +1663,14 @@ const PackageLoadingGraph = () => {
|
|
|
1607
1663
|
{
|
|
1608
1664
|
style: {
|
|
1609
1665
|
height: "100%",
|
|
1666
|
+
minHeight: "200px",
|
|
1610
1667
|
display: "flex",
|
|
1611
1668
|
flexDirection: "column",
|
|
1612
1669
|
alignItems: "center",
|
|
1613
1670
|
justifyContent: "center",
|
|
1614
1671
|
color: theme2.colors.textSecondary,
|
|
1615
|
-
padding: theme2.space[5]
|
|
1672
|
+
padding: theme2.space[5],
|
|
1673
|
+
overflow: "hidden"
|
|
1616
1674
|
},
|
|
1617
1675
|
children: [
|
|
1618
1676
|
/* @__PURE__ */ jsx("style", { children: `
|
|
@@ -1685,7 +1743,9 @@ const PackageLoadingGraph = () => {
|
|
|
1685
1743
|
position: "relative",
|
|
1686
1744
|
width: "100%",
|
|
1687
1745
|
maxWidth: "400px",
|
|
1746
|
+
minWidth: "340px",
|
|
1688
1747
|
height: "220px",
|
|
1748
|
+
flexShrink: 0,
|
|
1689
1749
|
marginBottom: theme2.space[4]
|
|
1690
1750
|
},
|
|
1691
1751
|
children: [
|
|
@@ -1751,7 +1811,8 @@ const PackageLoadingGraph = () => {
|
|
|
1751
1811
|
fontWeight: theme2.fontWeights.medium,
|
|
1752
1812
|
color: theme2.colors.text,
|
|
1753
1813
|
textAlign: "center",
|
|
1754
|
-
marginBottom: theme2.space[2]
|
|
1814
|
+
marginBottom: theme2.space[2],
|
|
1815
|
+
flexShrink: 0
|
|
1755
1816
|
},
|
|
1756
1817
|
children: "Loading packages..."
|
|
1757
1818
|
}
|
|
@@ -1763,7 +1824,8 @@ const PackageLoadingGraph = () => {
|
|
|
1763
1824
|
fontSize: theme2.fontSizes[1],
|
|
1764
1825
|
fontFamily: theme2.fonts.body,
|
|
1765
1826
|
color: theme2.colors.textSecondary,
|
|
1766
|
-
textAlign: "center"
|
|
1827
|
+
textAlign: "center",
|
|
1828
|
+
flexShrink: 0
|
|
1767
1829
|
},
|
|
1768
1830
|
children: "Discovering dependencies and configurations"
|
|
1769
1831
|
}
|
|
@@ -106188,7 +106250,7 @@ const browserExt = {
|
|
|
106188
106250
|
},
|
|
106189
106251
|
test: () => true,
|
|
106190
106252
|
load: async () => {
|
|
106191
|
-
await import("./browserAll-
|
|
106253
|
+
await import("./browserAll-DsnGrrNf.js");
|
|
106192
106254
|
}
|
|
106193
106255
|
};
|
|
106194
106256
|
const webworkerExt = {
|
|
@@ -106199,7 +106261,7 @@ const webworkerExt = {
|
|
|
106199
106261
|
},
|
|
106200
106262
|
test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
|
|
106201
106263
|
load: async () => {
|
|
106202
|
-
await import("./webworkerAll-
|
|
106264
|
+
await import("./webworkerAll-B1yAYeD0.js");
|
|
106203
106265
|
}
|
|
106204
106266
|
};
|
|
106205
106267
|
class ObservablePoint {
|
|
@@ -118442,19 +118504,19 @@ async function autoDetectRenderer(options) {
|
|
|
118442
118504
|
for (let i2 = 0; i2 < preferredOrder.length; i2++) {
|
|
118443
118505
|
const rendererType = preferredOrder[i2];
|
|
118444
118506
|
if (rendererType === "webgpu" && await isWebGPUSupported()) {
|
|
118445
|
-
const { WebGPURenderer } = await import("./WebGPURenderer-
|
|
118507
|
+
const { WebGPURenderer } = await import("./WebGPURenderer-CgEpGyW-.js");
|
|
118446
118508
|
RendererClass = WebGPURenderer;
|
|
118447
118509
|
finalOptions = { ...options, ...options.webgpu };
|
|
118448
118510
|
break;
|
|
118449
118511
|
} else if (rendererType === "webgl" && isWebGLSupported(
|
|
118450
118512
|
options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
|
|
118451
118513
|
)) {
|
|
118452
|
-
const { WebGLRenderer } = await import("./WebGLRenderer-
|
|
118514
|
+
const { WebGLRenderer } = await import("./WebGLRenderer-KD33jTG8.js");
|
|
118453
118515
|
RendererClass = WebGLRenderer;
|
|
118454
118516
|
finalOptions = { ...options, ...options.webgl };
|
|
118455
118517
|
break;
|
|
118456
118518
|
} else if (rendererType === "canvas") {
|
|
118457
|
-
const { CanvasRenderer } = await import("./CanvasRenderer-
|
|
118519
|
+
const { CanvasRenderer } = await import("./CanvasRenderer-8qDPmI6y.js");
|
|
118458
118520
|
RendererClass = CanvasRenderer;
|
|
118459
118521
|
finalOptions = { ...options, ...options.canvasOptions };
|
|
118460
118522
|
break;
|
|
@@ -132921,9 +132983,29 @@ function screenToGrid(screenX, screenY) {
|
|
|
132921
132983
|
function getIsometricZIndex(gridX, gridY) {
|
|
132922
132984
|
return gridX + gridY;
|
|
132923
132985
|
}
|
|
132986
|
+
function calculateRegionCameraPosition(regionCenterX, regionCenterY, bounds) {
|
|
132987
|
+
const center = gridToScreen(regionCenterX, regionCenterY);
|
|
132988
|
+
const topCorner = gridToScreen(bounds.x, bounds.y);
|
|
132989
|
+
const bottomCorner = gridToScreen(
|
|
132990
|
+
bounds.x + bounds.width,
|
|
132991
|
+
bounds.y + bounds.height
|
|
132992
|
+
);
|
|
132993
|
+
const leftCorner = gridToScreen(bounds.x, bounds.y + bounds.height);
|
|
132994
|
+
const rightCorner = gridToScreen(bounds.x + bounds.width, bounds.y);
|
|
132995
|
+
const screenWidth = rightCorner.screenX - leftCorner.screenX;
|
|
132996
|
+
const screenHeight = bottomCorner.screenY - topCorner.screenY;
|
|
132997
|
+
return {
|
|
132998
|
+
centerX: center.screenX,
|
|
132999
|
+
centerY: center.screenY,
|
|
133000
|
+
screenWidth,
|
|
133001
|
+
screenHeight
|
|
133002
|
+
};
|
|
133003
|
+
}
|
|
132924
133004
|
function domEventToGridCoords(clientX, clientY, viewport, canvasElement) {
|
|
132925
133005
|
if (!viewport || !canvasElement) {
|
|
132926
|
-
console.warn(
|
|
133006
|
+
console.warn(
|
|
133007
|
+
"[domEventToGridCoords] Missing viewport or canvas element, returning (0, 0)"
|
|
133008
|
+
);
|
|
132927
133009
|
return { gridX: 0, gridY: 0 };
|
|
132928
133010
|
}
|
|
132929
133011
|
const rect = canvasElement.getBoundingClientRect();
|
|
@@ -135869,6 +135951,7 @@ const OverworldMapPanelContent = ({
|
|
|
135869
135951
|
const animationRef = useRef(null);
|
|
135870
135952
|
const hasInitializedCamera = useRef(false);
|
|
135871
135953
|
const skipNextAnimation = useRef(false);
|
|
135954
|
+
const skipInitialAnimation = useRef(false);
|
|
135872
135955
|
const previousCollectionKeyRef = useRef(null);
|
|
135873
135956
|
const savedCameraPosition = useRef(null);
|
|
135874
135957
|
const stableCollectionKey = useMemo(() => {
|
|
@@ -136073,28 +136156,16 @@ const OverworldMapPanelContent = ({
|
|
|
136073
136156
|
viewport.setZoom(savedCameraPosition.current.scale);
|
|
136074
136157
|
} else if (mapData.regions.length > 0 && !hasInitializedCamera.current) {
|
|
136075
136158
|
const firstRegion = mapData.regions[0];
|
|
136076
|
-
const
|
|
136077
|
-
|
|
136078
|
-
|
|
136079
|
-
|
|
136080
|
-
bounds.y + bounds.height
|
|
136159
|
+
const cameraPosition = calculateRegionCameraPosition(
|
|
136160
|
+
firstRegion.centerX,
|
|
136161
|
+
firstRegion.centerY,
|
|
136162
|
+
firstRegion.bounds
|
|
136081
136163
|
);
|
|
136082
|
-
const
|
|
136083
|
-
const
|
|
136084
|
-
const spriteHeightOffset = 140;
|
|
136085
|
-
const screenMinX = leftCorner.screenX;
|
|
136086
|
-
const screenMaxX = rightCorner.screenX;
|
|
136087
|
-
const screenMinY = topCorner.screenY - spriteHeightOffset;
|
|
136088
|
-
const screenMaxY = bottomCorner.screenY;
|
|
136089
|
-
const screenCenterX = (screenMinX + screenMaxX) / 2;
|
|
136090
|
-
const screenCenterY = (screenMinY + screenMaxY) / 2;
|
|
136091
|
-
viewport.moveCenter(screenCenterX, screenCenterY);
|
|
136092
|
-
const regionScreenWidth = screenMaxX - screenMinX;
|
|
136093
|
-
const regionScreenHeight = screenMaxY - screenMinY;
|
|
136094
|
-
const zoomX = visibleWidth * 0.65 / regionScreenWidth;
|
|
136095
|
-
const zoomY = visibleHeight * 0.65 / regionScreenHeight;
|
|
136164
|
+
const zoomX = visibleWidth * 0.65 / cameraPosition.screenWidth;
|
|
136165
|
+
const zoomY = visibleHeight * 0.65 / cameraPosition.screenHeight;
|
|
136096
136166
|
const fitZoom = Math.min(zoomX, zoomY, 1);
|
|
136097
136167
|
viewport.setZoom(fitZoom);
|
|
136168
|
+
viewport.moveCenter(cameraPosition.centerX, cameraPosition.centerY);
|
|
136098
136169
|
hasInitializedCamera.current = true;
|
|
136099
136170
|
}
|
|
136100
136171
|
const findAdjacentEmptyPositions = (regions) => {
|
|
@@ -136315,6 +136386,7 @@ const OverworldMapPanelContent = ({
|
|
|
136315
136386
|
});
|
|
136316
136387
|
setIsRendering(false);
|
|
136317
136388
|
isInitializedRef.current = true;
|
|
136389
|
+
skipInitialAnimation.current = true;
|
|
136318
136390
|
setInitializationComplete((prev) => prev + 1);
|
|
136319
136391
|
};
|
|
136320
136392
|
let resizeObserver = null;
|
|
@@ -136498,6 +136570,10 @@ const OverworldMapPanelContent = ({
|
|
|
136498
136570
|
skipNextAnimation.current = false;
|
|
136499
136571
|
return;
|
|
136500
136572
|
}
|
|
136573
|
+
if (skipInitialAnimation.current) {
|
|
136574
|
+
skipInitialAnimation.current = false;
|
|
136575
|
+
return;
|
|
136576
|
+
}
|
|
136501
136577
|
setIsAnimating(true);
|
|
136502
136578
|
const targetX = visibleDimensionsRef.current.width / 2 - regionCenter.screenX;
|
|
136503
136579
|
const targetY = visibleDimensionsRef.current.height / 2 - regionCenter.screenY;
|
|
@@ -136864,9 +136940,29 @@ const CollectionMapPanelContent = ({
|
|
|
136864
136940
|
const canvasRef = React2__default.useRef(null);
|
|
136865
136941
|
const handleRenameRegion = useCallback(
|
|
136866
136942
|
async (regionId, name2) => {
|
|
136867
|
-
|
|
136943
|
+
const span = getTracer().startSpan("collection-map.region-renamed");
|
|
136944
|
+
try {
|
|
136945
|
+
const oldRegion = customRegions.find((r2) => r2.id === regionId);
|
|
136946
|
+
const oldName = (oldRegion == null ? void 0 : oldRegion.name) || "Unknown";
|
|
136947
|
+
span.addEvent("collection-map.region-renamed", {
|
|
136948
|
+
"collection.id": collection.id,
|
|
136949
|
+
"region.id": regionId,
|
|
136950
|
+
"region.old.name": oldName,
|
|
136951
|
+
"region.new.name": name2
|
|
136952
|
+
});
|
|
136953
|
+
await regionCallbacks.onRegionUpdated(collection.id, regionId, {
|
|
136954
|
+
name: name2
|
|
136955
|
+
});
|
|
136956
|
+
span.setStatus({ code: 1 });
|
|
136957
|
+
span.end();
|
|
136958
|
+
} catch (error) {
|
|
136959
|
+
span.recordException(error);
|
|
136960
|
+
span.setStatus({ code: 2, message: error.message });
|
|
136961
|
+
span.end();
|
|
136962
|
+
throw error;
|
|
136963
|
+
}
|
|
136868
136964
|
},
|
|
136869
|
-
[regionCallbacks, collection.id]
|
|
136965
|
+
[regionCallbacks, collection.id, customRegions]
|
|
136870
136966
|
);
|
|
136871
136967
|
const handleDeleteRegion = useCallback(
|
|
136872
136968
|
async (regionId) => {
|
|
@@ -136877,13 +136973,39 @@ const CollectionMapPanelContent = ({
|
|
|
136877
136973
|
alert("Cannot delete the last region. At least one region must exist.");
|
|
136878
136974
|
return;
|
|
136879
136975
|
}
|
|
136880
|
-
|
|
136976
|
+
const span = getTracer().startSpan("collection-map.region-deleted");
|
|
136977
|
+
try {
|
|
136978
|
+
const region = customRegions.find((r2) => r2.id === regionId);
|
|
136979
|
+
const regionName = (region == null ? void 0 : region.name) || "Unknown";
|
|
136980
|
+
const orphanedCount = collection.members.filter(
|
|
136981
|
+
(m2) => {
|
|
136982
|
+
var _a2;
|
|
136983
|
+
return ((_a2 = m2.metadata) == null ? void 0 : _a2.regionId) === regionId;
|
|
136984
|
+
}
|
|
136985
|
+
).length;
|
|
136986
|
+
span.addEvent("collection-map.region-deleted", {
|
|
136987
|
+
"collection.id": collection.id,
|
|
136988
|
+
"region.id": regionId,
|
|
136989
|
+
"region.name": regionName,
|
|
136990
|
+
"nodes.orphaned": orphanedCount
|
|
136991
|
+
});
|
|
136992
|
+
await regionCallbacks.onRegionDeleted(collection.id, regionId);
|
|
136993
|
+
span.setStatus({ code: 1 });
|
|
136994
|
+
span.end();
|
|
136995
|
+
} catch (error) {
|
|
136996
|
+
span.recordException(error);
|
|
136997
|
+
span.setStatus({ code: 2, message: error.message });
|
|
136998
|
+
span.end();
|
|
136999
|
+
throw error;
|
|
137000
|
+
}
|
|
136881
137001
|
},
|
|
136882
|
-
[regionCallbacks, collection.id, customRegions.
|
|
137002
|
+
[regionCallbacks, collection.id, customRegions, collection.members]
|
|
136883
137003
|
);
|
|
136884
137004
|
const handleProjectMoved = useCallback(
|
|
136885
|
-
async (projectId, gridX, gridY, metadata) => {
|
|
137005
|
+
async (projectId, gridX, gridY, metadata, parentSpan) => {
|
|
136886
137006
|
var _a2, _b;
|
|
137007
|
+
const span = parentSpan ?? getTracer().startSpan("collection-map.project-moved");
|
|
137008
|
+
const ownsSpan = !parentSpan;
|
|
136887
137009
|
const isNewRepo = !!metadata;
|
|
136888
137010
|
const existingMembership = collection.members.find(
|
|
136889
137011
|
(m2) => m2.repositoryId === projectId
|
|
@@ -136895,6 +137017,11 @@ Memberships (${collection.members.length}): [${collection.members.map((m2) => m2
|
|
|
136895
137017
|
This indicates a sprite was rendered without valid backing data.`
|
|
136896
137018
|
);
|
|
136897
137019
|
console.error(error);
|
|
137020
|
+
if (ownsSpan) {
|
|
137021
|
+
span.recordException(error);
|
|
137022
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137023
|
+
span.end();
|
|
137024
|
+
}
|
|
136898
137025
|
throw error;
|
|
136899
137026
|
}
|
|
136900
137027
|
const isFirstPlacement = isNewRepo || !!existingMembership && !((_a2 = existingMembership.metadata) == null ? void 0 : _a2.regionId);
|
|
@@ -136915,6 +137042,15 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
136915
137042
|
});
|
|
136916
137043
|
newRegionId = newRegion.id;
|
|
136917
137044
|
}
|
|
137045
|
+
span.addEvent("collection-map.project-moved", {
|
|
137046
|
+
"collection.id": collection.id,
|
|
137047
|
+
"repository.id": projectId,
|
|
137048
|
+
"is.new.repo": isNewRepo,
|
|
137049
|
+
"is.first.placement": isFirstPlacement,
|
|
137050
|
+
"region.id": newRegionId,
|
|
137051
|
+
"grid.x": gridX,
|
|
137052
|
+
"grid.y": gridY
|
|
137053
|
+
});
|
|
136918
137054
|
if (isFirstPlacement) {
|
|
136919
137055
|
try {
|
|
136920
137056
|
const regionBoundsX2 = regionCol * REGION_SIZE_TILES;
|
|
@@ -136943,8 +137079,25 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
136943
137079
|
newRegionId
|
|
136944
137080
|
);
|
|
136945
137081
|
}
|
|
137082
|
+
span.addEvent("collection-map.position-saved", {
|
|
137083
|
+
"collection.id": collection.id,
|
|
137084
|
+
"repository.id": projectId,
|
|
137085
|
+
"region.id": newRegionId,
|
|
137086
|
+
"region.changed": true,
|
|
137087
|
+
"grid.x": relativeGridX2,
|
|
137088
|
+
"grid.y": relativeGridY2
|
|
137089
|
+
});
|
|
137090
|
+
if (ownsSpan) {
|
|
137091
|
+
span.setStatus({ code: 1 });
|
|
137092
|
+
span.end();
|
|
137093
|
+
}
|
|
136946
137094
|
} catch (error) {
|
|
136947
137095
|
console.error("[PLACEMENT] ✗ ERROR during placement:", error);
|
|
137096
|
+
if (ownsSpan) {
|
|
137097
|
+
span.recordException(error);
|
|
137098
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137099
|
+
span.end();
|
|
137100
|
+
}
|
|
136948
137101
|
throw error;
|
|
136949
137102
|
}
|
|
136950
137103
|
return;
|
|
@@ -136966,13 +137119,26 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
136966
137119
|
(m2) => m2.repositoryId === projectId
|
|
136967
137120
|
);
|
|
136968
137121
|
const oldRegionId = (_b = membership == null ? void 0 : membership.metadata) == null ? void 0 : _b.regionId;
|
|
136969
|
-
|
|
137122
|
+
const regionChanged = oldRegionId !== newRegionId;
|
|
137123
|
+
if (regionChanged) {
|
|
136970
137124
|
await regionCallbacks.onRepositoryAssigned(
|
|
136971
137125
|
collection.id,
|
|
136972
137126
|
projectId,
|
|
136973
137127
|
newRegionId
|
|
136974
137128
|
);
|
|
136975
137129
|
}
|
|
137130
|
+
span.addEvent("collection-map.position-saved", {
|
|
137131
|
+
"collection.id": collection.id,
|
|
137132
|
+
"repository.id": projectId,
|
|
137133
|
+
"region.id": newRegionId,
|
|
137134
|
+
"region.changed": regionChanged,
|
|
137135
|
+
"grid.x": relativeGridX,
|
|
137136
|
+
"grid.y": relativeGridY
|
|
137137
|
+
});
|
|
137138
|
+
if (ownsSpan) {
|
|
137139
|
+
span.setStatus({ code: 1 });
|
|
137140
|
+
span.end();
|
|
137141
|
+
}
|
|
136976
137142
|
},
|
|
136977
137143
|
[
|
|
136978
137144
|
collection.id,
|
|
@@ -136984,20 +137150,43 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
136984
137150
|
);
|
|
136985
137151
|
const handleProjectDrop = useCallback(
|
|
136986
137152
|
async (data, event) => {
|
|
136987
|
-
const
|
|
136988
|
-
|
|
136989
|
-
|
|
136990
|
-
|
|
136991
|
-
|
|
136992
|
-
|
|
136993
|
-
|
|
136994
|
-
|
|
136995
|
-
|
|
136996
|
-
|
|
136997
|
-
|
|
136998
|
-
|
|
137153
|
+
const span = getTracer().startSpan("collection-map.project-drop");
|
|
137154
|
+
try {
|
|
137155
|
+
const repositoryPath = data.primaryData;
|
|
137156
|
+
const repositoryMetadata = data.metadata || {};
|
|
137157
|
+
const repoId = (repositoryMetadata == null ? void 0 : repositoryMetadata.name) || repositoryPath;
|
|
137158
|
+
const gridCoords = domEventToGridCoords(
|
|
137159
|
+
event.clientX,
|
|
137160
|
+
event.clientY,
|
|
137161
|
+
viewportRef.current,
|
|
137162
|
+
canvasRef.current
|
|
137163
|
+
);
|
|
137164
|
+
const gridX = Math.round(gridCoords.gridX);
|
|
137165
|
+
const gridY = Math.round(gridCoords.gridY);
|
|
137166
|
+
span.addEvent("collection-map.project-drop", {
|
|
137167
|
+
"collection.id": collection.id,
|
|
137168
|
+
"source.type": "repository-project",
|
|
137169
|
+
"repository.id": repoId,
|
|
137170
|
+
"grid.x": gridX,
|
|
137171
|
+
"grid.y": gridY
|
|
137172
|
+
});
|
|
137173
|
+
await handleProjectMoved(
|
|
137174
|
+
repoId,
|
|
137175
|
+
gridX,
|
|
137176
|
+
gridY,
|
|
137177
|
+
repositoryMetadata,
|
|
137178
|
+
span
|
|
137179
|
+
);
|
|
137180
|
+
span.setStatus({ code: 1 });
|
|
137181
|
+
span.end();
|
|
137182
|
+
} catch (error) {
|
|
137183
|
+
span.recordException(error);
|
|
137184
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137185
|
+
span.end();
|
|
137186
|
+
throw error;
|
|
137187
|
+
}
|
|
136999
137188
|
},
|
|
137000
|
-
[handleProjectMoved]
|
|
137189
|
+
[handleProjectMoved, collection.id]
|
|
137001
137190
|
);
|
|
137002
137191
|
const handleDrawerDrop = useCallback(
|
|
137003
137192
|
async (event) => {
|
|
@@ -137007,41 +137196,80 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137007
137196
|
if (!unplacedNodeData) return;
|
|
137008
137197
|
event.preventDefault();
|
|
137009
137198
|
event.stopPropagation();
|
|
137010
|
-
const
|
|
137011
|
-
|
|
137012
|
-
|
|
137013
|
-
|
|
137014
|
-
|
|
137015
|
-
|
|
137016
|
-
|
|
137017
|
-
|
|
137018
|
-
|
|
137019
|
-
|
|
137199
|
+
const span = getTracer().startSpan("collection-map.drawer-drop");
|
|
137200
|
+
try {
|
|
137201
|
+
const { nodeId } = JSON.parse(unplacedNodeData);
|
|
137202
|
+
const gridCoords = domEventToGridCoords(
|
|
137203
|
+
event.clientX,
|
|
137204
|
+
event.clientY,
|
|
137205
|
+
viewportRef.current,
|
|
137206
|
+
canvasRef.current
|
|
137207
|
+
);
|
|
137208
|
+
const gridX = Math.round(gridCoords.gridX);
|
|
137209
|
+
const gridY = Math.round(gridCoords.gridY);
|
|
137210
|
+
span.addEvent("collection-map.drawer-drop", {
|
|
137211
|
+
"collection.id": collection.id,
|
|
137212
|
+
"repository.id": nodeId,
|
|
137213
|
+
"grid.x": gridX,
|
|
137214
|
+
"grid.y": gridY
|
|
137215
|
+
});
|
|
137216
|
+
await handleProjectMoved(nodeId, gridX, gridY, void 0, span);
|
|
137217
|
+
span.setStatus({ code: 1 });
|
|
137218
|
+
span.end();
|
|
137219
|
+
} catch (error) {
|
|
137220
|
+
span.recordException(error);
|
|
137221
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137222
|
+
span.end();
|
|
137223
|
+
throw error;
|
|
137224
|
+
}
|
|
137020
137225
|
},
|
|
137021
|
-
[handleProjectMoved]
|
|
137226
|
+
[handleProjectMoved, collection.id]
|
|
137022
137227
|
);
|
|
137023
137228
|
const handleGitHubDrop = useCallback(
|
|
137024
137229
|
async (data, event) => {
|
|
137025
|
-
const
|
|
137026
|
-
|
|
137027
|
-
|
|
137028
|
-
|
|
137029
|
-
|
|
137030
|
-
|
|
137031
|
-
|
|
137032
|
-
|
|
137033
|
-
|
|
137034
|
-
|
|
137035
|
-
|
|
137036
|
-
|
|
137037
|
-
|
|
137038
|
-
|
|
137039
|
-
|
|
137040
|
-
|
|
137041
|
-
|
|
137042
|
-
|
|
137230
|
+
const span = getTracer().startSpan("collection-map.project-drop");
|
|
137231
|
+
try {
|
|
137232
|
+
const fullName = data.primaryData;
|
|
137233
|
+
const metadata = data.metadata || {};
|
|
137234
|
+
const repoId = fullName;
|
|
137235
|
+
const repositoryMetadata = {
|
|
137236
|
+
name: metadata.name || fullName.split("/")[1] || fullName,
|
|
137237
|
+
path: fullName,
|
|
137238
|
+
// Use full_name as path for GitHub repos
|
|
137239
|
+
...metadata
|
|
137240
|
+
};
|
|
137241
|
+
const gridCoords = domEventToGridCoords(
|
|
137242
|
+
event.clientX,
|
|
137243
|
+
event.clientY,
|
|
137244
|
+
viewportRef.current,
|
|
137245
|
+
canvasRef.current
|
|
137246
|
+
);
|
|
137247
|
+
const gridX = Math.round(gridCoords.gridX);
|
|
137248
|
+
const gridY = Math.round(gridCoords.gridY);
|
|
137249
|
+
span.addEvent("collection-map.project-drop", {
|
|
137250
|
+
"collection.id": collection.id,
|
|
137251
|
+
"source.type": "repository-github",
|
|
137252
|
+
"repository.id": repoId,
|
|
137253
|
+
"grid.x": gridX,
|
|
137254
|
+
"grid.y": gridY
|
|
137255
|
+
});
|
|
137256
|
+
await handleProjectMoved(
|
|
137257
|
+
repoId,
|
|
137258
|
+
gridX,
|
|
137259
|
+
gridY,
|
|
137260
|
+
repositoryMetadata,
|
|
137261
|
+
span
|
|
137262
|
+
);
|
|
137263
|
+
span.setStatus({ code: 1 });
|
|
137264
|
+
span.end();
|
|
137265
|
+
} catch (error) {
|
|
137266
|
+
span.recordException(error);
|
|
137267
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137268
|
+
span.end();
|
|
137269
|
+
throw error;
|
|
137270
|
+
}
|
|
137043
137271
|
},
|
|
137044
|
-
[handleProjectMoved]
|
|
137272
|
+
[handleProjectMoved, collection.id]
|
|
137045
137273
|
);
|
|
137046
137274
|
const { isDragOver, ...dropZoneProps } = useDropZone({
|
|
137047
137275
|
handlers: [
|
|
@@ -137190,14 +137418,26 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137190
137418
|
return;
|
|
137191
137419
|
}
|
|
137192
137420
|
hasComputedLayout.current = true;
|
|
137193
|
-
const span = getTracer().startSpan("collection-map.
|
|
137421
|
+
const span = getTracer().startSpan("collection-map.collection-selected");
|
|
137194
137422
|
span.setAttribute("collection.id", collection.id);
|
|
137423
|
+
span.addEvent("collection-map.collection-selected", {
|
|
137424
|
+
"collection.id": collection.id,
|
|
137425
|
+
"collection.name": collection.name,
|
|
137426
|
+
"members.count": collection.members.length
|
|
137427
|
+
});
|
|
137195
137428
|
span.addEvent("collection-map.convert-nodes", {
|
|
137196
137429
|
"collection.id": collection.id,
|
|
137197
137430
|
"memberships.count": collection.members.length,
|
|
137198
137431
|
"repositories.count": repositories.length,
|
|
137199
137432
|
"nodes.created": nodes.length
|
|
137200
137433
|
});
|
|
137434
|
+
span.addEvent("collection-map.validate-nodes", {
|
|
137435
|
+
"collection.id": collection.id,
|
|
137436
|
+
"nodes.total": nodes.length,
|
|
137437
|
+
"nodes.valid": validNodes.length,
|
|
137438
|
+
"nodes.unplaced": unplacedNodes.length,
|
|
137439
|
+
"is.initial.load": isInitialLoad
|
|
137440
|
+
});
|
|
137201
137441
|
const map2 = nodesToUnifiedOverworldMap(nodes, {
|
|
137202
137442
|
regionLayout,
|
|
137203
137443
|
customRegions
|
|
@@ -137211,7 +137451,7 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137211
137451
|
"nodes.positioned": map2.nodes.length
|
|
137212
137452
|
});
|
|
137213
137453
|
(async () => {
|
|
137214
|
-
var _a2;
|
|
137454
|
+
var _a2, _b, _c, _d;
|
|
137215
137455
|
try {
|
|
137216
137456
|
const updates = {};
|
|
137217
137457
|
if (needsRegions && map2.regions.length > 0) {
|
|
@@ -137251,6 +137491,18 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137251
137491
|
}
|
|
137252
137492
|
}
|
|
137253
137493
|
await regionCallbacks.onBatchLayoutInitialized(collection.id, updates);
|
|
137494
|
+
span.addEvent("collection-map.batch-save", {
|
|
137495
|
+
"collection.id": collection.id,
|
|
137496
|
+
"regions.saved": ((_b = updates.regions) == null ? void 0 : _b.length) || 0,
|
|
137497
|
+
"assignments.saved": ((_c = updates.assignments) == null ? void 0 : _c.length) || 0,
|
|
137498
|
+
"positions.saved": ((_d = updates.positions) == null ? void 0 : _d.length) || 0
|
|
137499
|
+
});
|
|
137500
|
+
span.addEvent("collection-map.map-rendered", {
|
|
137501
|
+
"collection.id": collection.id,
|
|
137502
|
+
"nodes.rendered": validNodes.length,
|
|
137503
|
+
"regions.rendered": customRegions.length || map2.regions.length,
|
|
137504
|
+
"unplaced.count": unplacedNodes.length
|
|
137505
|
+
});
|
|
137254
137506
|
span.setStatus({ code: 1 });
|
|
137255
137507
|
span.end();
|
|
137256
137508
|
} catch (error) {
|
|
@@ -137262,9 +137514,12 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137262
137514
|
})();
|
|
137263
137515
|
}, [
|
|
137264
137516
|
collection.id,
|
|
137517
|
+
collection.name,
|
|
137265
137518
|
collection.members.length,
|
|
137266
137519
|
repositories.length,
|
|
137267
137520
|
nodes,
|
|
137521
|
+
validNodes.length,
|
|
137522
|
+
unplacedNodes.length,
|
|
137268
137523
|
regionLayout,
|
|
137269
137524
|
customRegions,
|
|
137270
137525
|
regionCallbacks
|
|
@@ -137272,6 +137527,48 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137272
137527
|
const handleViewportReady = useCallback((viewport) => {
|
|
137273
137528
|
viewportRef.current = viewport;
|
|
137274
137529
|
}, []);
|
|
137530
|
+
const handleRepositoryClicked = useCallback(
|
|
137531
|
+
(repositoryId) => {
|
|
137532
|
+
const span = getTracer().startSpan("collection-map.repository-clicked");
|
|
137533
|
+
span.addEvent("collection-map.repository-clicked", {
|
|
137534
|
+
"collection.id": collection.id,
|
|
137535
|
+
"repository.id": repositoryId || "",
|
|
137536
|
+
action: repositoryId ? "selected" : "deselected"
|
|
137537
|
+
});
|
|
137538
|
+
span.setStatus({ code: 1 });
|
|
137539
|
+
span.end();
|
|
137540
|
+
onRepositoryClicked == null ? void 0 : onRepositoryClicked(repositoryId);
|
|
137541
|
+
},
|
|
137542
|
+
[collection.id, onRepositoryClicked]
|
|
137543
|
+
);
|
|
137544
|
+
const handleAddRegion = useCallback(
|
|
137545
|
+
async (position2) => {
|
|
137546
|
+
const span = getTracer().startSpan("collection-map.region-created");
|
|
137547
|
+
try {
|
|
137548
|
+
const order2 = position2.row * 10 + position2.col;
|
|
137549
|
+
const name2 = `Region ${customRegions.length + 1}`;
|
|
137550
|
+
const newRegion = await regionCallbacks.onRegionCreated(collection.id, {
|
|
137551
|
+
name: name2,
|
|
137552
|
+
order: order2,
|
|
137553
|
+
createdAt: 0
|
|
137554
|
+
});
|
|
137555
|
+
span.addEvent("collection-map.region-created", {
|
|
137556
|
+
"collection.id": collection.id,
|
|
137557
|
+
"region.id": newRegion.id,
|
|
137558
|
+
"region.name": name2,
|
|
137559
|
+
"region.order": order2
|
|
137560
|
+
});
|
|
137561
|
+
span.setStatus({ code: 1 });
|
|
137562
|
+
span.end();
|
|
137563
|
+
} catch (error) {
|
|
137564
|
+
span.recordException(error);
|
|
137565
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137566
|
+
span.end();
|
|
137567
|
+
throw error;
|
|
137568
|
+
}
|
|
137569
|
+
},
|
|
137570
|
+
[collection.id, customRegions.length, regionCallbacks]
|
|
137571
|
+
);
|
|
137275
137572
|
const handleDragOver = useCallback((e2) => {
|
|
137276
137573
|
if (e2.dataTransfer.types.includes("application/x-unplaced-node") || e2.dataTransfer.types.includes("application/x-panel-data")) {
|
|
137277
137574
|
e2.preventDefault();
|
|
@@ -137347,21 +137644,13 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137347
137644
|
customRegions,
|
|
137348
137645
|
collectionKey: collection.id,
|
|
137349
137646
|
onProjectMoved: handleProjectMoved,
|
|
137350
|
-
onNodeClicked:
|
|
137647
|
+
onNodeClicked: handleRepositoryClicked,
|
|
137351
137648
|
selectedNodeId: selectedRepositoryId,
|
|
137352
137649
|
onPackageHover,
|
|
137353
137650
|
onPackageHoverEnd,
|
|
137354
137651
|
onPackageClick,
|
|
137355
137652
|
onViewportReady: handleViewportReady,
|
|
137356
|
-
onAddRegion:
|
|
137357
|
-
const order2 = position2.row * 10 + position2.col;
|
|
137358
|
-
const name2 = `Region ${customRegions.length + 1}`;
|
|
137359
|
-
await regionCallbacks.onRegionCreated(collection.id, {
|
|
137360
|
-
name: name2,
|
|
137361
|
-
order: order2,
|
|
137362
|
-
createdAt: 0
|
|
137363
|
-
});
|
|
137364
|
-
},
|
|
137653
|
+
onAddRegion: handleAddRegion,
|
|
137365
137654
|
onRenameRegion: handleRenameRegion,
|
|
137366
137655
|
onDeleteRegion: handleDeleteRegion
|
|
137367
137656
|
}
|
|
@@ -138615,4 +138904,4 @@ export {
|
|
|
138615
138904
|
UPDATE_PRIORITY as y,
|
|
138616
138905
|
removeItems as z
|
|
138617
138906
|
};
|
|
138618
|
-
//# sourceMappingURL=index-
|
|
138907
|
+
//# sourceMappingURL=index-mh2Usj7o.js.map
|