@industry-theme/repository-composition-panels 0.7.4 → 0.7.5
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-CHhoaerO.js} +2 -2
- package/dist/{BufferResource-BySfSNUb.js.map → BufferResource-CHhoaerO.js.map} +1 -1
- package/dist/{CanvasRenderer-DHF2Dl6A.js → CanvasRenderer-ByT5AV8x.js} +3 -3
- package/dist/{CanvasRenderer-DHF2Dl6A.js.map → CanvasRenderer-ByT5AV8x.js.map} +1 -1
- package/dist/{Filter-BcZawFFP.js → Filter-Dhhy5IL7.js} +2 -2
- package/dist/{Filter-BcZawFFP.js.map → Filter-Dhhy5IL7.js.map} +1 -1
- package/dist/{RenderTargetSystem-CcUjlcEn.js → RenderTargetSystem-BEQsi09b.js} +3 -3
- package/dist/{RenderTargetSystem-CcUjlcEn.js.map → RenderTargetSystem-BEQsi09b.js.map} +1 -1
- package/dist/{WebGLRenderer-B9IXLBU3.js → WebGLRenderer-BnHZE5Mp.js} +4 -4
- package/dist/{WebGLRenderer-B9IXLBU3.js.map → WebGLRenderer-BnHZE5Mp.js.map} +1 -1
- package/dist/{WebGPURenderer-CKeryiWg.js → WebGPURenderer-Bggk73-1.js} +4 -4
- package/dist/{WebGPURenderer-CKeryiWg.js.map → WebGPURenderer-Bggk73-1.js.map} +1 -1
- package/dist/{browserAll-Dvjnb3Ss.js → browserAll-DMDsy2el.js} +3 -3
- package/dist/{browserAll-Dvjnb3Ss.js.map → browserAll-DMDsy2el.js.map} +1 -1
- package/dist/{index-BL0L_jZJ.js → index-7aQ4t9XI.js} +374 -93
- package/dist/{index-BL0L_jZJ.js.map → index-7aQ4t9XI.js.map} +1 -1
- package/dist/{init-NfYaoDuU.js → init-BFRc255S.js} +3 -3
- package/dist/{init-NfYaoDuU.js.map → init-BFRc255S.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-D8hIL1sE.js +3 -0
- package/dist/webworkerAll-D8hIL1sE.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;
|
|
@@ -106188,7 +106244,7 @@ const browserExt = {
|
|
|
106188
106244
|
},
|
|
106189
106245
|
test: () => true,
|
|
106190
106246
|
load: async () => {
|
|
106191
|
-
await import("./browserAll-
|
|
106247
|
+
await import("./browserAll-DMDsy2el.js");
|
|
106192
106248
|
}
|
|
106193
106249
|
};
|
|
106194
106250
|
const webworkerExt = {
|
|
@@ -106199,7 +106255,7 @@ const webworkerExt = {
|
|
|
106199
106255
|
},
|
|
106200
106256
|
test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
|
|
106201
106257
|
load: async () => {
|
|
106202
|
-
await import("./webworkerAll-
|
|
106258
|
+
await import("./webworkerAll-D8hIL1sE.js");
|
|
106203
106259
|
}
|
|
106204
106260
|
};
|
|
106205
106261
|
class ObservablePoint {
|
|
@@ -118442,19 +118498,19 @@ async function autoDetectRenderer(options) {
|
|
|
118442
118498
|
for (let i2 = 0; i2 < preferredOrder.length; i2++) {
|
|
118443
118499
|
const rendererType = preferredOrder[i2];
|
|
118444
118500
|
if (rendererType === "webgpu" && await isWebGPUSupported()) {
|
|
118445
|
-
const { WebGPURenderer } = await import("./WebGPURenderer-
|
|
118501
|
+
const { WebGPURenderer } = await import("./WebGPURenderer-Bggk73-1.js");
|
|
118446
118502
|
RendererClass = WebGPURenderer;
|
|
118447
118503
|
finalOptions = { ...options, ...options.webgpu };
|
|
118448
118504
|
break;
|
|
118449
118505
|
} else if (rendererType === "webgl" && isWebGLSupported(
|
|
118450
118506
|
options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
|
|
118451
118507
|
)) {
|
|
118452
|
-
const { WebGLRenderer } = await import("./WebGLRenderer-
|
|
118508
|
+
const { WebGLRenderer } = await import("./WebGLRenderer-BnHZE5Mp.js");
|
|
118453
118509
|
RendererClass = WebGLRenderer;
|
|
118454
118510
|
finalOptions = { ...options, ...options.webgl };
|
|
118455
118511
|
break;
|
|
118456
118512
|
} else if (rendererType === "canvas") {
|
|
118457
|
-
const { CanvasRenderer } = await import("./CanvasRenderer-
|
|
118513
|
+
const { CanvasRenderer } = await import("./CanvasRenderer-ByT5AV8x.js");
|
|
118458
118514
|
RendererClass = CanvasRenderer;
|
|
118459
118515
|
finalOptions = { ...options, ...options.canvasOptions };
|
|
118460
118516
|
break;
|
|
@@ -132921,6 +132977,24 @@ function screenToGrid(screenX, screenY) {
|
|
|
132921
132977
|
function getIsometricZIndex(gridX, gridY) {
|
|
132922
132978
|
return gridX + gridY;
|
|
132923
132979
|
}
|
|
132980
|
+
function calculateRegionCameraPosition(regionCenterX, regionCenterY, bounds) {
|
|
132981
|
+
const center = gridToScreen(regionCenterX, regionCenterY);
|
|
132982
|
+
const topCorner = gridToScreen(bounds.x, bounds.y);
|
|
132983
|
+
const bottomCorner = gridToScreen(
|
|
132984
|
+
bounds.x + bounds.width,
|
|
132985
|
+
bounds.y + bounds.height
|
|
132986
|
+
);
|
|
132987
|
+
const leftCorner = gridToScreen(bounds.x, bounds.y + bounds.height);
|
|
132988
|
+
const rightCorner = gridToScreen(bounds.x + bounds.width, bounds.y);
|
|
132989
|
+
const screenWidth = rightCorner.screenX - leftCorner.screenX;
|
|
132990
|
+
const screenHeight = bottomCorner.screenY - topCorner.screenY;
|
|
132991
|
+
return {
|
|
132992
|
+
centerX: center.screenX,
|
|
132993
|
+
centerY: center.screenY,
|
|
132994
|
+
screenWidth,
|
|
132995
|
+
screenHeight
|
|
132996
|
+
};
|
|
132997
|
+
}
|
|
132924
132998
|
function domEventToGridCoords(clientX, clientY, viewport, canvasElement) {
|
|
132925
132999
|
if (!viewport || !canvasElement) {
|
|
132926
133000
|
console.warn("[domEventToGridCoords] Missing viewport or canvas element, returning (0, 0)");
|
|
@@ -135869,6 +135943,7 @@ const OverworldMapPanelContent = ({
|
|
|
135869
135943
|
const animationRef = useRef(null);
|
|
135870
135944
|
const hasInitializedCamera = useRef(false);
|
|
135871
135945
|
const skipNextAnimation = useRef(false);
|
|
135946
|
+
const skipInitialAnimation = useRef(false);
|
|
135872
135947
|
const previousCollectionKeyRef = useRef(null);
|
|
135873
135948
|
const savedCameraPosition = useRef(null);
|
|
135874
135949
|
const stableCollectionKey = useMemo(() => {
|
|
@@ -136073,28 +136148,16 @@ const OverworldMapPanelContent = ({
|
|
|
136073
136148
|
viewport.setZoom(savedCameraPosition.current.scale);
|
|
136074
136149
|
} else if (mapData.regions.length > 0 && !hasInitializedCamera.current) {
|
|
136075
136150
|
const firstRegion = mapData.regions[0];
|
|
136076
|
-
const
|
|
136077
|
-
|
|
136078
|
-
|
|
136079
|
-
|
|
136080
|
-
bounds.y + bounds.height
|
|
136151
|
+
const cameraPosition = calculateRegionCameraPosition(
|
|
136152
|
+
firstRegion.centerX,
|
|
136153
|
+
firstRegion.centerY,
|
|
136154
|
+
firstRegion.bounds
|
|
136081
136155
|
);
|
|
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;
|
|
136156
|
+
const zoomX = visibleWidth * 0.65 / cameraPosition.screenWidth;
|
|
136157
|
+
const zoomY = visibleHeight * 0.65 / cameraPosition.screenHeight;
|
|
136096
136158
|
const fitZoom = Math.min(zoomX, zoomY, 1);
|
|
136097
136159
|
viewport.setZoom(fitZoom);
|
|
136160
|
+
viewport.moveCenter(cameraPosition.centerX, cameraPosition.centerY);
|
|
136098
136161
|
hasInitializedCamera.current = true;
|
|
136099
136162
|
}
|
|
136100
136163
|
const findAdjacentEmptyPositions = (regions) => {
|
|
@@ -136315,6 +136378,7 @@ const OverworldMapPanelContent = ({
|
|
|
136315
136378
|
});
|
|
136316
136379
|
setIsRendering(false);
|
|
136317
136380
|
isInitializedRef.current = true;
|
|
136381
|
+
skipInitialAnimation.current = true;
|
|
136318
136382
|
setInitializationComplete((prev) => prev + 1);
|
|
136319
136383
|
};
|
|
136320
136384
|
let resizeObserver = null;
|
|
@@ -136498,6 +136562,10 @@ const OverworldMapPanelContent = ({
|
|
|
136498
136562
|
skipNextAnimation.current = false;
|
|
136499
136563
|
return;
|
|
136500
136564
|
}
|
|
136565
|
+
if (skipInitialAnimation.current) {
|
|
136566
|
+
skipInitialAnimation.current = false;
|
|
136567
|
+
return;
|
|
136568
|
+
}
|
|
136501
136569
|
setIsAnimating(true);
|
|
136502
136570
|
const targetX = visibleDimensionsRef.current.width / 2 - regionCenter.screenX;
|
|
136503
136571
|
const targetY = visibleDimensionsRef.current.height / 2 - regionCenter.screenY;
|
|
@@ -136864,9 +136932,29 @@ const CollectionMapPanelContent = ({
|
|
|
136864
136932
|
const canvasRef = React2__default.useRef(null);
|
|
136865
136933
|
const handleRenameRegion = useCallback(
|
|
136866
136934
|
async (regionId, name2) => {
|
|
136867
|
-
|
|
136935
|
+
const span = getTracer().startSpan("collection-map.region-renamed");
|
|
136936
|
+
try {
|
|
136937
|
+
const oldRegion = customRegions.find((r2) => r2.id === regionId);
|
|
136938
|
+
const oldName = (oldRegion == null ? void 0 : oldRegion.name) || "Unknown";
|
|
136939
|
+
span.addEvent("collection-map.region-renamed", {
|
|
136940
|
+
"collection.id": collection.id,
|
|
136941
|
+
"region.id": regionId,
|
|
136942
|
+
"region.old.name": oldName,
|
|
136943
|
+
"region.new.name": name2
|
|
136944
|
+
});
|
|
136945
|
+
await regionCallbacks.onRegionUpdated(collection.id, regionId, {
|
|
136946
|
+
name: name2
|
|
136947
|
+
});
|
|
136948
|
+
span.setStatus({ code: 1 });
|
|
136949
|
+
span.end();
|
|
136950
|
+
} catch (error) {
|
|
136951
|
+
span.recordException(error);
|
|
136952
|
+
span.setStatus({ code: 2, message: error.message });
|
|
136953
|
+
span.end();
|
|
136954
|
+
throw error;
|
|
136955
|
+
}
|
|
136868
136956
|
},
|
|
136869
|
-
[regionCallbacks, collection.id]
|
|
136957
|
+
[regionCallbacks, collection.id, customRegions]
|
|
136870
136958
|
);
|
|
136871
136959
|
const handleDeleteRegion = useCallback(
|
|
136872
136960
|
async (regionId) => {
|
|
@@ -136877,13 +136965,39 @@ const CollectionMapPanelContent = ({
|
|
|
136877
136965
|
alert("Cannot delete the last region. At least one region must exist.");
|
|
136878
136966
|
return;
|
|
136879
136967
|
}
|
|
136880
|
-
|
|
136968
|
+
const span = getTracer().startSpan("collection-map.region-deleted");
|
|
136969
|
+
try {
|
|
136970
|
+
const region = customRegions.find((r2) => r2.id === regionId);
|
|
136971
|
+
const regionName = (region == null ? void 0 : region.name) || "Unknown";
|
|
136972
|
+
const orphanedCount = collection.members.filter(
|
|
136973
|
+
(m2) => {
|
|
136974
|
+
var _a2;
|
|
136975
|
+
return ((_a2 = m2.metadata) == null ? void 0 : _a2.regionId) === regionId;
|
|
136976
|
+
}
|
|
136977
|
+
).length;
|
|
136978
|
+
span.addEvent("collection-map.region-deleted", {
|
|
136979
|
+
"collection.id": collection.id,
|
|
136980
|
+
"region.id": regionId,
|
|
136981
|
+
"region.name": regionName,
|
|
136982
|
+
"nodes.orphaned": orphanedCount
|
|
136983
|
+
});
|
|
136984
|
+
await regionCallbacks.onRegionDeleted(collection.id, regionId);
|
|
136985
|
+
span.setStatus({ code: 1 });
|
|
136986
|
+
span.end();
|
|
136987
|
+
} catch (error) {
|
|
136988
|
+
span.recordException(error);
|
|
136989
|
+
span.setStatus({ code: 2, message: error.message });
|
|
136990
|
+
span.end();
|
|
136991
|
+
throw error;
|
|
136992
|
+
}
|
|
136881
136993
|
},
|
|
136882
|
-
[regionCallbacks, collection.id, customRegions.
|
|
136994
|
+
[regionCallbacks, collection.id, customRegions, collection.members]
|
|
136883
136995
|
);
|
|
136884
136996
|
const handleProjectMoved = useCallback(
|
|
136885
|
-
async (projectId, gridX, gridY, metadata) => {
|
|
136997
|
+
async (projectId, gridX, gridY, metadata, parentSpan) => {
|
|
136886
136998
|
var _a2, _b;
|
|
136999
|
+
const span = parentSpan ?? getTracer().startSpan("collection-map.project-moved");
|
|
137000
|
+
const ownsSpan = !parentSpan;
|
|
136887
137001
|
const isNewRepo = !!metadata;
|
|
136888
137002
|
const existingMembership = collection.members.find(
|
|
136889
137003
|
(m2) => m2.repositoryId === projectId
|
|
@@ -136895,6 +137009,11 @@ Memberships (${collection.members.length}): [${collection.members.map((m2) => m2
|
|
|
136895
137009
|
This indicates a sprite was rendered without valid backing data.`
|
|
136896
137010
|
);
|
|
136897
137011
|
console.error(error);
|
|
137012
|
+
if (ownsSpan) {
|
|
137013
|
+
span.recordException(error);
|
|
137014
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137015
|
+
span.end();
|
|
137016
|
+
}
|
|
136898
137017
|
throw error;
|
|
136899
137018
|
}
|
|
136900
137019
|
const isFirstPlacement = isNewRepo || !!existingMembership && !((_a2 = existingMembership.metadata) == null ? void 0 : _a2.regionId);
|
|
@@ -136915,6 +137034,15 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
136915
137034
|
});
|
|
136916
137035
|
newRegionId = newRegion.id;
|
|
136917
137036
|
}
|
|
137037
|
+
span.addEvent("collection-map.project-moved", {
|
|
137038
|
+
"collection.id": collection.id,
|
|
137039
|
+
"repository.id": projectId,
|
|
137040
|
+
"is.new.repo": isNewRepo,
|
|
137041
|
+
"is.first.placement": isFirstPlacement,
|
|
137042
|
+
"region.id": newRegionId,
|
|
137043
|
+
"grid.x": gridX,
|
|
137044
|
+
"grid.y": gridY
|
|
137045
|
+
});
|
|
136918
137046
|
if (isFirstPlacement) {
|
|
136919
137047
|
try {
|
|
136920
137048
|
const regionBoundsX2 = regionCol * REGION_SIZE_TILES;
|
|
@@ -136943,8 +137071,25 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
136943
137071
|
newRegionId
|
|
136944
137072
|
);
|
|
136945
137073
|
}
|
|
137074
|
+
span.addEvent("collection-map.position-saved", {
|
|
137075
|
+
"collection.id": collection.id,
|
|
137076
|
+
"repository.id": projectId,
|
|
137077
|
+
"region.id": newRegionId,
|
|
137078
|
+
"region.changed": true,
|
|
137079
|
+
"grid.x": relativeGridX2,
|
|
137080
|
+
"grid.y": relativeGridY2
|
|
137081
|
+
});
|
|
137082
|
+
if (ownsSpan) {
|
|
137083
|
+
span.setStatus({ code: 1 });
|
|
137084
|
+
span.end();
|
|
137085
|
+
}
|
|
136946
137086
|
} catch (error) {
|
|
136947
137087
|
console.error("[PLACEMENT] ✗ ERROR during placement:", error);
|
|
137088
|
+
if (ownsSpan) {
|
|
137089
|
+
span.recordException(error);
|
|
137090
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137091
|
+
span.end();
|
|
137092
|
+
}
|
|
136948
137093
|
throw error;
|
|
136949
137094
|
}
|
|
136950
137095
|
return;
|
|
@@ -136966,13 +137111,26 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
136966
137111
|
(m2) => m2.repositoryId === projectId
|
|
136967
137112
|
);
|
|
136968
137113
|
const oldRegionId = (_b = membership == null ? void 0 : membership.metadata) == null ? void 0 : _b.regionId;
|
|
136969
|
-
|
|
137114
|
+
const regionChanged = oldRegionId !== newRegionId;
|
|
137115
|
+
if (regionChanged) {
|
|
136970
137116
|
await regionCallbacks.onRepositoryAssigned(
|
|
136971
137117
|
collection.id,
|
|
136972
137118
|
projectId,
|
|
136973
137119
|
newRegionId
|
|
136974
137120
|
);
|
|
136975
137121
|
}
|
|
137122
|
+
span.addEvent("collection-map.position-saved", {
|
|
137123
|
+
"collection.id": collection.id,
|
|
137124
|
+
"repository.id": projectId,
|
|
137125
|
+
"region.id": newRegionId,
|
|
137126
|
+
"region.changed": regionChanged,
|
|
137127
|
+
"grid.x": relativeGridX,
|
|
137128
|
+
"grid.y": relativeGridY
|
|
137129
|
+
});
|
|
137130
|
+
if (ownsSpan) {
|
|
137131
|
+
span.setStatus({ code: 1 });
|
|
137132
|
+
span.end();
|
|
137133
|
+
}
|
|
136976
137134
|
},
|
|
136977
137135
|
[
|
|
136978
137136
|
collection.id,
|
|
@@ -136984,20 +137142,43 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
136984
137142
|
);
|
|
136985
137143
|
const handleProjectDrop = useCallback(
|
|
136986
137144
|
async (data, event) => {
|
|
136987
|
-
const
|
|
136988
|
-
|
|
136989
|
-
|
|
136990
|
-
|
|
136991
|
-
|
|
136992
|
-
|
|
136993
|
-
|
|
136994
|
-
|
|
136995
|
-
|
|
136996
|
-
|
|
136997
|
-
|
|
136998
|
-
|
|
137145
|
+
const span = getTracer().startSpan("collection-map.project-drop");
|
|
137146
|
+
try {
|
|
137147
|
+
const repositoryPath = data.primaryData;
|
|
137148
|
+
const repositoryMetadata = data.metadata || {};
|
|
137149
|
+
const repoId = (repositoryMetadata == null ? void 0 : repositoryMetadata.name) || repositoryPath;
|
|
137150
|
+
const gridCoords = domEventToGridCoords(
|
|
137151
|
+
event.clientX,
|
|
137152
|
+
event.clientY,
|
|
137153
|
+
viewportRef.current,
|
|
137154
|
+
canvasRef.current
|
|
137155
|
+
);
|
|
137156
|
+
const gridX = Math.round(gridCoords.gridX);
|
|
137157
|
+
const gridY = Math.round(gridCoords.gridY);
|
|
137158
|
+
span.addEvent("collection-map.project-drop", {
|
|
137159
|
+
"collection.id": collection.id,
|
|
137160
|
+
"source.type": "repository-project",
|
|
137161
|
+
"repository.id": repoId,
|
|
137162
|
+
"grid.x": gridX,
|
|
137163
|
+
"grid.y": gridY
|
|
137164
|
+
});
|
|
137165
|
+
await handleProjectMoved(
|
|
137166
|
+
repoId,
|
|
137167
|
+
gridX,
|
|
137168
|
+
gridY,
|
|
137169
|
+
repositoryMetadata,
|
|
137170
|
+
span
|
|
137171
|
+
);
|
|
137172
|
+
span.setStatus({ code: 1 });
|
|
137173
|
+
span.end();
|
|
137174
|
+
} catch (error) {
|
|
137175
|
+
span.recordException(error);
|
|
137176
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137177
|
+
span.end();
|
|
137178
|
+
throw error;
|
|
137179
|
+
}
|
|
136999
137180
|
},
|
|
137000
|
-
[handleProjectMoved]
|
|
137181
|
+
[handleProjectMoved, collection.id]
|
|
137001
137182
|
);
|
|
137002
137183
|
const handleDrawerDrop = useCallback(
|
|
137003
137184
|
async (event) => {
|
|
@@ -137007,41 +137188,80 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137007
137188
|
if (!unplacedNodeData) return;
|
|
137008
137189
|
event.preventDefault();
|
|
137009
137190
|
event.stopPropagation();
|
|
137010
|
-
const
|
|
137011
|
-
|
|
137012
|
-
|
|
137013
|
-
|
|
137014
|
-
|
|
137015
|
-
|
|
137016
|
-
|
|
137017
|
-
|
|
137018
|
-
|
|
137019
|
-
|
|
137191
|
+
const span = getTracer().startSpan("collection-map.drawer-drop");
|
|
137192
|
+
try {
|
|
137193
|
+
const { nodeId } = JSON.parse(unplacedNodeData);
|
|
137194
|
+
const gridCoords = domEventToGridCoords(
|
|
137195
|
+
event.clientX,
|
|
137196
|
+
event.clientY,
|
|
137197
|
+
viewportRef.current,
|
|
137198
|
+
canvasRef.current
|
|
137199
|
+
);
|
|
137200
|
+
const gridX = Math.round(gridCoords.gridX);
|
|
137201
|
+
const gridY = Math.round(gridCoords.gridY);
|
|
137202
|
+
span.addEvent("collection-map.drawer-drop", {
|
|
137203
|
+
"collection.id": collection.id,
|
|
137204
|
+
"repository.id": nodeId,
|
|
137205
|
+
"grid.x": gridX,
|
|
137206
|
+
"grid.y": gridY
|
|
137207
|
+
});
|
|
137208
|
+
await handleProjectMoved(nodeId, gridX, gridY, void 0, span);
|
|
137209
|
+
span.setStatus({ code: 1 });
|
|
137210
|
+
span.end();
|
|
137211
|
+
} catch (error) {
|
|
137212
|
+
span.recordException(error);
|
|
137213
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137214
|
+
span.end();
|
|
137215
|
+
throw error;
|
|
137216
|
+
}
|
|
137020
137217
|
},
|
|
137021
|
-
[handleProjectMoved]
|
|
137218
|
+
[handleProjectMoved, collection.id]
|
|
137022
137219
|
);
|
|
137023
137220
|
const handleGitHubDrop = useCallback(
|
|
137024
137221
|
async (data, event) => {
|
|
137025
|
-
const
|
|
137026
|
-
|
|
137027
|
-
|
|
137028
|
-
|
|
137029
|
-
|
|
137030
|
-
|
|
137031
|
-
|
|
137032
|
-
|
|
137033
|
-
|
|
137034
|
-
|
|
137035
|
-
|
|
137036
|
-
|
|
137037
|
-
|
|
137038
|
-
|
|
137039
|
-
|
|
137040
|
-
|
|
137041
|
-
|
|
137042
|
-
|
|
137222
|
+
const span = getTracer().startSpan("collection-map.project-drop");
|
|
137223
|
+
try {
|
|
137224
|
+
const fullName = data.primaryData;
|
|
137225
|
+
const metadata = data.metadata || {};
|
|
137226
|
+
const repoId = fullName;
|
|
137227
|
+
const repositoryMetadata = {
|
|
137228
|
+
name: metadata.name || fullName.split("/")[1] || fullName,
|
|
137229
|
+
path: fullName,
|
|
137230
|
+
// Use full_name as path for GitHub repos
|
|
137231
|
+
...metadata
|
|
137232
|
+
};
|
|
137233
|
+
const gridCoords = domEventToGridCoords(
|
|
137234
|
+
event.clientX,
|
|
137235
|
+
event.clientY,
|
|
137236
|
+
viewportRef.current,
|
|
137237
|
+
canvasRef.current
|
|
137238
|
+
);
|
|
137239
|
+
const gridX = Math.round(gridCoords.gridX);
|
|
137240
|
+
const gridY = Math.round(gridCoords.gridY);
|
|
137241
|
+
span.addEvent("collection-map.project-drop", {
|
|
137242
|
+
"collection.id": collection.id,
|
|
137243
|
+
"source.type": "repository-github",
|
|
137244
|
+
"repository.id": repoId,
|
|
137245
|
+
"grid.x": gridX,
|
|
137246
|
+
"grid.y": gridY
|
|
137247
|
+
});
|
|
137248
|
+
await handleProjectMoved(
|
|
137249
|
+
repoId,
|
|
137250
|
+
gridX,
|
|
137251
|
+
gridY,
|
|
137252
|
+
repositoryMetadata,
|
|
137253
|
+
span
|
|
137254
|
+
);
|
|
137255
|
+
span.setStatus({ code: 1 });
|
|
137256
|
+
span.end();
|
|
137257
|
+
} catch (error) {
|
|
137258
|
+
span.recordException(error);
|
|
137259
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137260
|
+
span.end();
|
|
137261
|
+
throw error;
|
|
137262
|
+
}
|
|
137043
137263
|
},
|
|
137044
|
-
[handleProjectMoved]
|
|
137264
|
+
[handleProjectMoved, collection.id]
|
|
137045
137265
|
);
|
|
137046
137266
|
const { isDragOver, ...dropZoneProps } = useDropZone({
|
|
137047
137267
|
handlers: [
|
|
@@ -137190,14 +137410,26 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137190
137410
|
return;
|
|
137191
137411
|
}
|
|
137192
137412
|
hasComputedLayout.current = true;
|
|
137193
|
-
const span = getTracer().startSpan("collection-map.
|
|
137413
|
+
const span = getTracer().startSpan("collection-map.collection-selected");
|
|
137194
137414
|
span.setAttribute("collection.id", collection.id);
|
|
137415
|
+
span.addEvent("collection-map.collection-selected", {
|
|
137416
|
+
"collection.id": collection.id,
|
|
137417
|
+
"collection.name": collection.name,
|
|
137418
|
+
"members.count": collection.members.length
|
|
137419
|
+
});
|
|
137195
137420
|
span.addEvent("collection-map.convert-nodes", {
|
|
137196
137421
|
"collection.id": collection.id,
|
|
137197
137422
|
"memberships.count": collection.members.length,
|
|
137198
137423
|
"repositories.count": repositories.length,
|
|
137199
137424
|
"nodes.created": nodes.length
|
|
137200
137425
|
});
|
|
137426
|
+
span.addEvent("collection-map.validate-nodes", {
|
|
137427
|
+
"collection.id": collection.id,
|
|
137428
|
+
"nodes.total": nodes.length,
|
|
137429
|
+
"nodes.valid": validNodes.length,
|
|
137430
|
+
"nodes.unplaced": unplacedNodes.length,
|
|
137431
|
+
"is.initial.load": isInitialLoad
|
|
137432
|
+
});
|
|
137201
137433
|
const map2 = nodesToUnifiedOverworldMap(nodes, {
|
|
137202
137434
|
regionLayout,
|
|
137203
137435
|
customRegions
|
|
@@ -137211,7 +137443,7 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137211
137443
|
"nodes.positioned": map2.nodes.length
|
|
137212
137444
|
});
|
|
137213
137445
|
(async () => {
|
|
137214
|
-
var _a2;
|
|
137446
|
+
var _a2, _b, _c, _d;
|
|
137215
137447
|
try {
|
|
137216
137448
|
const updates = {};
|
|
137217
137449
|
if (needsRegions && map2.regions.length > 0) {
|
|
@@ -137251,6 +137483,18 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137251
137483
|
}
|
|
137252
137484
|
}
|
|
137253
137485
|
await regionCallbacks.onBatchLayoutInitialized(collection.id, updates);
|
|
137486
|
+
span.addEvent("collection-map.batch-save", {
|
|
137487
|
+
"collection.id": collection.id,
|
|
137488
|
+
"regions.saved": ((_b = updates.regions) == null ? void 0 : _b.length) || 0,
|
|
137489
|
+
"assignments.saved": ((_c = updates.assignments) == null ? void 0 : _c.length) || 0,
|
|
137490
|
+
"positions.saved": ((_d = updates.positions) == null ? void 0 : _d.length) || 0
|
|
137491
|
+
});
|
|
137492
|
+
span.addEvent("collection-map.map-rendered", {
|
|
137493
|
+
"collection.id": collection.id,
|
|
137494
|
+
"nodes.rendered": validNodes.length,
|
|
137495
|
+
"regions.rendered": customRegions.length || map2.regions.length,
|
|
137496
|
+
"unplaced.count": unplacedNodes.length
|
|
137497
|
+
});
|
|
137254
137498
|
span.setStatus({ code: 1 });
|
|
137255
137499
|
span.end();
|
|
137256
137500
|
} catch (error) {
|
|
@@ -137262,9 +137506,12 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137262
137506
|
})();
|
|
137263
137507
|
}, [
|
|
137264
137508
|
collection.id,
|
|
137509
|
+
collection.name,
|
|
137265
137510
|
collection.members.length,
|
|
137266
137511
|
repositories.length,
|
|
137267
137512
|
nodes,
|
|
137513
|
+
validNodes.length,
|
|
137514
|
+
unplacedNodes.length,
|
|
137268
137515
|
regionLayout,
|
|
137269
137516
|
customRegions,
|
|
137270
137517
|
regionCallbacks
|
|
@@ -137272,6 +137519,48 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137272
137519
|
const handleViewportReady = useCallback((viewport) => {
|
|
137273
137520
|
viewportRef.current = viewport;
|
|
137274
137521
|
}, []);
|
|
137522
|
+
const handleRepositoryClicked = useCallback(
|
|
137523
|
+
(repositoryId) => {
|
|
137524
|
+
const span = getTracer().startSpan("collection-map.repository-clicked");
|
|
137525
|
+
span.addEvent("collection-map.repository-clicked", {
|
|
137526
|
+
"collection.id": collection.id,
|
|
137527
|
+
"repository.id": repositoryId || "",
|
|
137528
|
+
action: repositoryId ? "selected" : "deselected"
|
|
137529
|
+
});
|
|
137530
|
+
span.setStatus({ code: 1 });
|
|
137531
|
+
span.end();
|
|
137532
|
+
onRepositoryClicked == null ? void 0 : onRepositoryClicked(repositoryId);
|
|
137533
|
+
},
|
|
137534
|
+
[collection.id, onRepositoryClicked]
|
|
137535
|
+
);
|
|
137536
|
+
const handleAddRegion = useCallback(
|
|
137537
|
+
async (position2) => {
|
|
137538
|
+
const span = getTracer().startSpan("collection-map.region-created");
|
|
137539
|
+
try {
|
|
137540
|
+
const order2 = position2.row * 10 + position2.col;
|
|
137541
|
+
const name2 = `Region ${customRegions.length + 1}`;
|
|
137542
|
+
const newRegion = await regionCallbacks.onRegionCreated(collection.id, {
|
|
137543
|
+
name: name2,
|
|
137544
|
+
order: order2,
|
|
137545
|
+
createdAt: 0
|
|
137546
|
+
});
|
|
137547
|
+
span.addEvent("collection-map.region-created", {
|
|
137548
|
+
"collection.id": collection.id,
|
|
137549
|
+
"region.id": newRegion.id,
|
|
137550
|
+
"region.name": name2,
|
|
137551
|
+
"region.order": order2
|
|
137552
|
+
});
|
|
137553
|
+
span.setStatus({ code: 1 });
|
|
137554
|
+
span.end();
|
|
137555
|
+
} catch (error) {
|
|
137556
|
+
span.recordException(error);
|
|
137557
|
+
span.setStatus({ code: 2, message: error.message });
|
|
137558
|
+
span.end();
|
|
137559
|
+
throw error;
|
|
137560
|
+
}
|
|
137561
|
+
},
|
|
137562
|
+
[collection.id, customRegions.length, regionCallbacks]
|
|
137563
|
+
);
|
|
137275
137564
|
const handleDragOver = useCallback((e2) => {
|
|
137276
137565
|
if (e2.dataTransfer.types.includes("application/x-unplaced-node") || e2.dataTransfer.types.includes("application/x-panel-data")) {
|
|
137277
137566
|
e2.preventDefault();
|
|
@@ -137347,21 +137636,13 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
137347
137636
|
customRegions,
|
|
137348
137637
|
collectionKey: collection.id,
|
|
137349
137638
|
onProjectMoved: handleProjectMoved,
|
|
137350
|
-
onNodeClicked:
|
|
137639
|
+
onNodeClicked: handleRepositoryClicked,
|
|
137351
137640
|
selectedNodeId: selectedRepositoryId,
|
|
137352
137641
|
onPackageHover,
|
|
137353
137642
|
onPackageHoverEnd,
|
|
137354
137643
|
onPackageClick,
|
|
137355
137644
|
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
|
-
},
|
|
137645
|
+
onAddRegion: handleAddRegion,
|
|
137365
137646
|
onRenameRegion: handleRenameRegion,
|
|
137366
137647
|
onDeleteRegion: handleDeleteRegion
|
|
137367
137648
|
}
|
|
@@ -138615,4 +138896,4 @@ export {
|
|
|
138615
138896
|
UPDATE_PRIORITY as y,
|
|
138616
138897
|
removeItems as z
|
|
138617
138898
|
};
|
|
138618
|
-
//# sourceMappingURL=index-
|
|
138899
|
+
//# sourceMappingURL=index-7aQ4t9XI.js.map
|