@industry-theme/repository-composition-panels 0.6.25 → 0.6.27
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-04cpEQ0v.js → BufferResource-C47OKi0O.js} +2 -2
- package/dist/{BufferResource-04cpEQ0v.js.map → BufferResource-C47OKi0O.js.map} +1 -1
- package/dist/{CanvasRenderer-C7nUvMXE.js → CanvasRenderer-DhUZFLbi.js} +3 -3
- package/dist/{CanvasRenderer-C7nUvMXE.js.map → CanvasRenderer-DhUZFLbi.js.map} +1 -1
- package/dist/{Filter-D_86Ax-n.js → Filter-noYxQPld.js} +2 -2
- package/dist/{Filter-D_86Ax-n.js.map → Filter-noYxQPld.js.map} +1 -1
- package/dist/{RenderTargetSystem-1fgwSKkC.js → RenderTargetSystem-CMsce37q.js} +3 -3
- package/dist/{RenderTargetSystem-1fgwSKkC.js.map → RenderTargetSystem-CMsce37q.js.map} +1 -1
- package/dist/{WebGLRenderer-Dj-oDZnm.js → WebGLRenderer-DSxUjrMa.js} +4 -4
- package/dist/{WebGLRenderer-Dj-oDZnm.js.map → WebGLRenderer-DSxUjrMa.js.map} +1 -1
- package/dist/{WebGPURenderer-BSTx-5Vd.js → WebGPURenderer-tD3JsvvF.js} +4 -4
- package/dist/{WebGPURenderer-BSTx-5Vd.js.map → WebGPURenderer-tD3JsvvF.js.map} +1 -1
- package/dist/{browserAll-DwRNjFsz.js → browserAll-DxhH90WQ.js} +3 -3
- package/dist/{browserAll-DwRNjFsz.js.map → browserAll-DxhH90WQ.js.map} +1 -1
- package/dist/{index-O-HJOiQ4.js → index-Bpxci5n3.js} +196 -68
- package/dist/{index-O-HJOiQ4.js.map → index-Bpxci5n3.js.map} +1 -1
- package/dist/{init-C6R0aCVI.js → init-BpPH8764.js} +3 -3
- package/dist/{init-C6R0aCVI.js.map → init-BpPH8764.js.map} +1 -1
- package/dist/panels/CollectionMapPanel.d.ts +8 -0
- package/dist/panels/CollectionMapPanel.d.ts.map +1 -1
- package/dist/panels/PackageCompositionPanel.d.ts.map +1 -1
- package/dist/panels/components/DependencyRow.d.ts.map +1 -1
- package/dist/panels/components/PackageDetailCard.d.ts.map +1 -1
- package/dist/panels/components/index.d.ts +1 -1
- package/dist/panels/components/index.d.ts.map +1 -1
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts +4 -0
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -1
- package/dist/panels/overworld-map/components/IsometricInteractionManager.d.ts +18 -1
- package/dist/panels/overworld-map/components/IsometricInteractionManager.d.ts.map +1 -1
- package/dist/panels/overworld-map/components/IsometricRenderer.d.ts.map +1 -1
- package/dist/panels/overworld-map/components/buildingSpriteGenerator.d.ts.map +1 -1
- package/dist/panels.bundle.js +1 -1
- package/dist/utils/envParser.d.ts.map +1 -1
- package/dist/webworkerAll-B32qMs3y.js +3 -0
- package/dist/webworkerAll-B32qMs3y.js.map +1 -0
- package/package.json +1 -1
- package/dist/webworkerAll-BXVEg9Ze.js +0 -3
- package/dist/webworkerAll-BXVEg9Ze.js.map +0 -1
|
@@ -1617,7 +1617,7 @@ const DependencyRow = ({ dependency }) => {
|
|
|
1617
1617
|
display: "flex",
|
|
1618
1618
|
alignItems: "center",
|
|
1619
1619
|
justifyContent: "space-between",
|
|
1620
|
-
padding: `${theme2.space[3]}px ${theme2.space[
|
|
1620
|
+
padding: `${theme2.space[3]}px ${theme2.space[2]}px`,
|
|
1621
1621
|
backgroundColor: theme2.colors.background,
|
|
1622
1622
|
borderRadius: 0,
|
|
1623
1623
|
fontSize: `${theme2.fontSizes[1]}px`,
|
|
@@ -1694,7 +1694,16 @@ const DependencyRow = ({ dependency }) => {
|
|
|
1694
1694
|
children: copied ? /* @__PURE__ */ jsx(Check$1, { size: 12 }) : /* @__PURE__ */ jsx(Copy$1, { size: 12 })
|
|
1695
1695
|
}
|
|
1696
1696
|
),
|
|
1697
|
-
/* @__PURE__ */ jsx(
|
|
1697
|
+
/* @__PURE__ */ jsx(
|
|
1698
|
+
"span",
|
|
1699
|
+
{
|
|
1700
|
+
style: {
|
|
1701
|
+
color: theme2.colors.textSecondary,
|
|
1702
|
+
fontFamily: theme2.fonts.body
|
|
1703
|
+
},
|
|
1704
|
+
children: dependency.version
|
|
1705
|
+
}
|
|
1706
|
+
)
|
|
1698
1707
|
]
|
|
1699
1708
|
}
|
|
1700
1709
|
)
|
|
@@ -2637,7 +2646,9 @@ function parseDotEnv(content2) {
|
|
|
2637
2646
|
required = true;
|
|
2638
2647
|
} else if (lowerComment.includes("required")) {
|
|
2639
2648
|
required = true;
|
|
2640
|
-
descriptionParts.push(
|
|
2649
|
+
descriptionParts.push(
|
|
2650
|
+
comment2.replace(/\s*\(?\s*required\s*\)?\s*/gi, "").trim()
|
|
2651
|
+
);
|
|
2641
2652
|
} else {
|
|
2642
2653
|
descriptionParts.push(comment2);
|
|
2643
2654
|
}
|
|
@@ -3378,7 +3389,13 @@ const PackageDetailCard = ({
|
|
|
3378
3389
|
/* @__PURE__ */ jsx(
|
|
3379
3390
|
"div",
|
|
3380
3391
|
{
|
|
3381
|
-
style: {
|
|
3392
|
+
style: {
|
|
3393
|
+
flex: 1,
|
|
3394
|
+
overflow: "auto",
|
|
3395
|
+
scrollbarWidth: "none",
|
|
3396
|
+
msOverflowStyle: "none"
|
|
3397
|
+
},
|
|
3398
|
+
className: "hide-scrollbar",
|
|
3382
3399
|
children: /* @__PURE__ */ jsx(
|
|
3383
3400
|
"div",
|
|
3384
3401
|
{
|
|
@@ -3929,7 +3946,13 @@ const PackageDetailCard = ({
|
|
|
3929
3946
|
/* @__PURE__ */ jsx(
|
|
3930
3947
|
"div",
|
|
3931
3948
|
{
|
|
3932
|
-
style: {
|
|
3949
|
+
style: {
|
|
3950
|
+
flex: 1,
|
|
3951
|
+
overflow: "auto",
|
|
3952
|
+
scrollbarWidth: "none",
|
|
3953
|
+
msOverflowStyle: "none"
|
|
3954
|
+
},
|
|
3955
|
+
className: "hide-scrollbar",
|
|
3933
3956
|
children: /* @__PURE__ */ jsx(
|
|
3934
3957
|
"div",
|
|
3935
3958
|
{
|
|
@@ -105920,7 +105943,7 @@ const browserExt = {
|
|
|
105920
105943
|
},
|
|
105921
105944
|
test: () => true,
|
|
105922
105945
|
load: async () => {
|
|
105923
|
-
await import("./browserAll-
|
|
105946
|
+
await import("./browserAll-DxhH90WQ.js");
|
|
105924
105947
|
}
|
|
105925
105948
|
};
|
|
105926
105949
|
const webworkerExt = {
|
|
@@ -105931,7 +105954,7 @@ const webworkerExt = {
|
|
|
105931
105954
|
},
|
|
105932
105955
|
test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
|
|
105933
105956
|
load: async () => {
|
|
105934
|
-
await import("./webworkerAll-
|
|
105957
|
+
await import("./webworkerAll-B32qMs3y.js");
|
|
105935
105958
|
}
|
|
105936
105959
|
};
|
|
105937
105960
|
class ObservablePoint {
|
|
@@ -118174,19 +118197,19 @@ async function autoDetectRenderer(options) {
|
|
|
118174
118197
|
for (let i2 = 0; i2 < preferredOrder.length; i2++) {
|
|
118175
118198
|
const rendererType = preferredOrder[i2];
|
|
118176
118199
|
if (rendererType === "webgpu" && await isWebGPUSupported()) {
|
|
118177
|
-
const { WebGPURenderer } = await import("./WebGPURenderer-
|
|
118200
|
+
const { WebGPURenderer } = await import("./WebGPURenderer-tD3JsvvF.js");
|
|
118178
118201
|
RendererClass = WebGPURenderer;
|
|
118179
118202
|
finalOptions = { ...options, ...options.webgpu };
|
|
118180
118203
|
break;
|
|
118181
118204
|
} else if (rendererType === "webgl" && isWebGLSupported(
|
|
118182
118205
|
options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
|
|
118183
118206
|
)) {
|
|
118184
|
-
const { WebGLRenderer } = await import("./WebGLRenderer-
|
|
118207
|
+
const { WebGLRenderer } = await import("./WebGLRenderer-DSxUjrMa.js");
|
|
118185
118208
|
RendererClass = WebGLRenderer;
|
|
118186
118209
|
finalOptions = { ...options, ...options.webgl };
|
|
118187
118210
|
break;
|
|
118188
118211
|
} else if (rendererType === "canvas") {
|
|
118189
|
-
const { CanvasRenderer } = await import("./CanvasRenderer-
|
|
118212
|
+
const { CanvasRenderer } = await import("./CanvasRenderer-DhUZFLbi.js");
|
|
118190
118213
|
RendererClass = CanvasRenderer;
|
|
118191
118214
|
finalOptions = { ...options, ...options.canvasOptions };
|
|
118192
118215
|
break;
|
|
@@ -132545,6 +132568,7 @@ function generateBuildingSprite(config) {
|
|
|
132545
132568
|
building.lineTo(isoWidth / 2, -height);
|
|
132546
132569
|
building.lineTo(isoWidth / 2, 0);
|
|
132547
132570
|
building.stroke();
|
|
132571
|
+
const decorationBaseY = isoDepthY + 12;
|
|
132548
132572
|
if (stars && stars > 0) {
|
|
132549
132573
|
const tier = getStarTier(stars);
|
|
132550
132574
|
if (tier) {
|
|
@@ -132560,25 +132584,24 @@ function generateBuildingSprite(config) {
|
|
|
132560
132584
|
decoration = generateStatueSprite(tier.color);
|
|
132561
132585
|
break;
|
|
132562
132586
|
}
|
|
132563
|
-
const decorationX =
|
|
132564
|
-
const decorationY = -10;
|
|
132587
|
+
const decorationX = collaborators && collaborators > 0 ? 35 : 0;
|
|
132565
132588
|
decoration.x = decorationX;
|
|
132566
|
-
decoration.y =
|
|
132567
|
-
decoration.scale.set(
|
|
132589
|
+
decoration.y = decorationBaseY;
|
|
132590
|
+
decoration.scale.set(1.8);
|
|
132568
132591
|
building.addChild(decoration);
|
|
132569
132592
|
const countText = new Text({
|
|
132570
132593
|
text: formatStarCount(stars),
|
|
132571
132594
|
style: {
|
|
132572
|
-
fontSize:
|
|
132595
|
+
fontSize: 10,
|
|
132573
132596
|
fill: 16777215,
|
|
132574
132597
|
fontFamily: "Arial",
|
|
132575
132598
|
fontWeight: "bold",
|
|
132576
|
-
stroke: { color: 0, width:
|
|
132599
|
+
stroke: { color: 0, width: 2 }
|
|
132577
132600
|
},
|
|
132578
132601
|
resolution: 2
|
|
132579
132602
|
});
|
|
132580
132603
|
countText.x = decorationX;
|
|
132581
|
-
countText.y =
|
|
132604
|
+
countText.y = decorationBaseY + 18;
|
|
132582
132605
|
countText.anchor.set(0.5, 0);
|
|
132583
132606
|
building.addChild(countText);
|
|
132584
132607
|
}
|
|
@@ -132601,25 +132624,24 @@ function generateBuildingSprite(config) {
|
|
|
132601
132624
|
decoration = generateBandstandSprite(tier.color);
|
|
132602
132625
|
break;
|
|
132603
132626
|
}
|
|
132604
|
-
const decorationX = -
|
|
132605
|
-
const decorationY = -10;
|
|
132627
|
+
const decorationX = stars && stars > 0 ? -35 : 0;
|
|
132606
132628
|
decoration.x = decorationX;
|
|
132607
|
-
decoration.y =
|
|
132608
|
-
decoration.scale.set(
|
|
132629
|
+
decoration.y = decorationBaseY;
|
|
132630
|
+
decoration.scale.set(1.8);
|
|
132609
132631
|
building.addChild(decoration);
|
|
132610
132632
|
const countText = new Text({
|
|
132611
132633
|
text: formatCollaboratorCount(collaborators),
|
|
132612
132634
|
style: {
|
|
132613
|
-
fontSize:
|
|
132635
|
+
fontSize: 10,
|
|
132614
132636
|
fill: 16777215,
|
|
132615
132637
|
fontFamily: "Arial",
|
|
132616
132638
|
fontWeight: "bold",
|
|
132617
|
-
stroke: { color: 0, width:
|
|
132639
|
+
stroke: { color: 0, width: 2 }
|
|
132618
132640
|
},
|
|
132619
132641
|
resolution: 2
|
|
132620
132642
|
});
|
|
132621
132643
|
countText.x = decorationX;
|
|
132622
|
-
countText.y =
|
|
132644
|
+
countText.y = decorationBaseY + 18;
|
|
132623
132645
|
countText.anchor.set(0.5, 0);
|
|
132624
132646
|
building.addChild(countText);
|
|
132625
132647
|
}
|
|
@@ -132957,21 +132979,24 @@ class IsometricRenderer {
|
|
|
132957
132979
|
sprite.tint = grayValue << 16 | grayValue << 8 | grayValue;
|
|
132958
132980
|
}
|
|
132959
132981
|
container.addChild(sprite);
|
|
132960
|
-
|
|
132961
|
-
|
|
132962
|
-
|
|
132963
|
-
|
|
132964
|
-
|
|
132965
|
-
|
|
132966
|
-
|
|
132967
|
-
|
|
132968
|
-
|
|
132969
|
-
|
|
132970
|
-
|
|
132971
|
-
|
|
132972
|
-
|
|
132973
|
-
|
|
132982
|
+
if (subCount <= 5) {
|
|
132983
|
+
const subLabel = new Text({
|
|
132984
|
+
text: sub.name,
|
|
132985
|
+
style: {
|
|
132986
|
+
fontSize: 10,
|
|
132987
|
+
fill: 16777215,
|
|
132988
|
+
fontFamily: "Arial",
|
|
132989
|
+
fontWeight: "400"
|
|
132990
|
+
},
|
|
132991
|
+
resolution: 2
|
|
132992
|
+
});
|
|
132993
|
+
subLabel.x = offset.x;
|
|
132994
|
+
subLabel.y = offset.y + sprite.height * 0.15 + 4;
|
|
132995
|
+
subLabel.anchor.set(0.5, 0);
|
|
132996
|
+
container.addChild(subLabel);
|
|
132997
|
+
}
|
|
132974
132998
|
}
|
|
132999
|
+
const decorationBaseY = footprintHeight * 0.5;
|
|
132975
133000
|
if (node2.stars && node2.stars > 0) {
|
|
132976
133001
|
const tier = getStarTier(node2.stars);
|
|
132977
133002
|
if (tier) {
|
|
@@ -132987,25 +133012,24 @@ class IsometricRenderer {
|
|
|
132987
133012
|
decoration = generateStatueSprite(tier.color);
|
|
132988
133013
|
break;
|
|
132989
133014
|
}
|
|
132990
|
-
const decorationX = 0;
|
|
132991
|
-
const decorationY = -footprintHeight * 0.35;
|
|
133015
|
+
const decorationX = node2.collaborators && node2.collaborators > 0 ? 35 : 0;
|
|
132992
133016
|
decoration.x = decorationX;
|
|
132993
|
-
decoration.y =
|
|
132994
|
-
decoration.scale.set(
|
|
133017
|
+
decoration.y = decorationBaseY;
|
|
133018
|
+
decoration.scale.set(1.8);
|
|
132995
133019
|
container.addChild(decoration);
|
|
132996
133020
|
const countText = new Text({
|
|
132997
133021
|
text: formatStarCount(node2.stars),
|
|
132998
133022
|
style: {
|
|
132999
|
-
fontSize:
|
|
133023
|
+
fontSize: 10,
|
|
133000
133024
|
fill: 16777215,
|
|
133001
133025
|
fontFamily: "Arial",
|
|
133002
133026
|
fontWeight: "bold",
|
|
133003
|
-
stroke: { color: 0, width:
|
|
133027
|
+
stroke: { color: 0, width: 2 }
|
|
133004
133028
|
},
|
|
133005
133029
|
resolution: 2
|
|
133006
133030
|
});
|
|
133007
133031
|
countText.x = decorationX;
|
|
133008
|
-
countText.y =
|
|
133032
|
+
countText.y = decorationBaseY + 18;
|
|
133009
133033
|
countText.anchor.set(0.5, 0);
|
|
133010
133034
|
container.addChild(countText);
|
|
133011
133035
|
}
|
|
@@ -133028,25 +133052,24 @@ class IsometricRenderer {
|
|
|
133028
133052
|
decoration = generateBandstandSprite(tier.color);
|
|
133029
133053
|
break;
|
|
133030
133054
|
}
|
|
133031
|
-
const decorationX = -
|
|
133032
|
-
const decorationY = -footprintHeight * 0.35;
|
|
133055
|
+
const decorationX = node2.stars && node2.stars > 0 ? -35 : 0;
|
|
133033
133056
|
decoration.x = decorationX;
|
|
133034
|
-
decoration.y =
|
|
133035
|
-
decoration.scale.set(
|
|
133057
|
+
decoration.y = decorationBaseY;
|
|
133058
|
+
decoration.scale.set(1.8);
|
|
133036
133059
|
container.addChild(decoration);
|
|
133037
133060
|
const countText = new Text({
|
|
133038
133061
|
text: formatCollaboratorCount(node2.collaborators),
|
|
133039
133062
|
style: {
|
|
133040
|
-
fontSize:
|
|
133063
|
+
fontSize: 10,
|
|
133041
133064
|
fill: 16777215,
|
|
133042
133065
|
fontFamily: "Arial",
|
|
133043
133066
|
fontWeight: "bold",
|
|
133044
|
-
stroke: { color: 0, width:
|
|
133067
|
+
stroke: { color: 0, width: 2 }
|
|
133045
133068
|
},
|
|
133046
133069
|
resolution: 2
|
|
133047
133070
|
});
|
|
133048
133071
|
countText.x = decorationX;
|
|
133049
|
-
countText.y =
|
|
133072
|
+
countText.y = decorationBaseY + 18;
|
|
133050
133073
|
countText.anchor.set(0.5, 0);
|
|
133051
133074
|
container.addChild(countText);
|
|
133052
133075
|
}
|
|
@@ -133309,14 +133332,19 @@ class IsometricInteractionManager {
|
|
|
133309
133332
|
this.sprites = /* @__PURE__ */ new Map();
|
|
133310
133333
|
this.dragState = null;
|
|
133311
133334
|
this.hoveredNodeId = null;
|
|
133335
|
+
this.selectedNodeId = null;
|
|
133312
133336
|
this.draggingEnabled = true;
|
|
133313
133337
|
this.mapBounds = null;
|
|
133338
|
+
this.hoverColor = 16776960;
|
|
133314
133339
|
this.onGlobalPointerMove = (event) => {
|
|
133315
133340
|
var _a, _b;
|
|
133316
133341
|
if (!this.dragState || !this.dragState.isDragging) return;
|
|
133317
133342
|
event.stopPropagation();
|
|
133318
133343
|
const worldPos = this.viewport ? this.viewport.toWorld(event.global.x, event.global.y) : this.worldContainer.toLocal(event.global);
|
|
133319
|
-
const worldStartPos = this.viewport ? this.viewport.toWorld(
|
|
133344
|
+
const worldStartPos = this.viewport ? this.viewport.toWorld(
|
|
133345
|
+
this.dragState.dragStartPos.x,
|
|
133346
|
+
this.dragState.dragStartPos.y
|
|
133347
|
+
) : this.worldContainer.toLocal(this.dragState.dragStartPos);
|
|
133320
133348
|
const deltaX = worldPos.x - worldStartPos.x;
|
|
133321
133349
|
const deltaY = worldPos.y - worldStartPos.y;
|
|
133322
133350
|
const tileWidth = this.config.tileWidth ?? 64;
|
|
@@ -133325,14 +133353,30 @@ class IsometricInteractionManager {
|
|
|
133325
133353
|
const deltaGridY = (deltaY / (tileHeight / 2) - deltaX / (tileWidth / 2)) / 2;
|
|
133326
133354
|
let newGridX = this.dragState.spriteStartPos.gridX + deltaGridX;
|
|
133327
133355
|
let newGridY = this.dragState.spriteStartPos.gridY + deltaGridY;
|
|
133328
|
-
const clamped = this.clampToMapBounds(
|
|
133356
|
+
const clamped = this.clampToMapBounds(
|
|
133357
|
+
newGridX,
|
|
133358
|
+
newGridY,
|
|
133359
|
+
this.dragState.instance.size
|
|
133360
|
+
);
|
|
133329
133361
|
newGridX = clamped.gridX;
|
|
133330
133362
|
newGridY = clamped.gridY;
|
|
133331
|
-
if (this.wouldCollide(this.dragState.nodeId, {
|
|
133363
|
+
if (this.wouldCollide(this.dragState.nodeId, {
|
|
133364
|
+
gridX: newGridX,
|
|
133365
|
+
gridY: newGridY
|
|
133366
|
+
})) {
|
|
133332
133367
|
return;
|
|
133333
133368
|
}
|
|
133369
|
+
const movedDistance = Math.sqrt(
|
|
133370
|
+
Math.pow(newGridX - this.dragState.spriteStartPos.gridX, 2) + Math.pow(newGridY - this.dragState.spriteStartPos.gridY, 2)
|
|
133371
|
+
);
|
|
133372
|
+
if (movedDistance > 0.5) {
|
|
133373
|
+
this.dragState.hasMoved = true;
|
|
133374
|
+
}
|
|
133334
133375
|
this.dragState.instance.update(newGridX, newGridY);
|
|
133335
|
-
this.updateNearbyHighlights(this.dragState.nodeId, {
|
|
133376
|
+
this.updateNearbyHighlights(this.dragState.nodeId, {
|
|
133377
|
+
gridX: newGridX,
|
|
133378
|
+
gridY: newGridY
|
|
133379
|
+
});
|
|
133336
133380
|
(_b = (_a = this.events).onDragMove) == null ? void 0 : _b.call(_a, this.dragState.nodeId, newGridX, newGridY);
|
|
133337
133381
|
};
|
|
133338
133382
|
this.onPointerUp = (event) => {
|
|
@@ -133350,6 +133394,7 @@ class IsometricInteractionManager {
|
|
|
133350
133394
|
this.config = config;
|
|
133351
133395
|
this.events = events;
|
|
133352
133396
|
this.mapBounds = config.mapBounds || null;
|
|
133397
|
+
this.selectedColor = config.selectedColor ?? 3900150;
|
|
133353
133398
|
}
|
|
133354
133399
|
/**
|
|
133355
133400
|
* Register a sprite for interaction
|
|
@@ -133410,8 +133455,12 @@ class IsometricInteractionManager {
|
|
|
133410
133455
|
nodeId,
|
|
133411
133456
|
instance,
|
|
133412
133457
|
isDragging: true,
|
|
133458
|
+
hasMoved: false,
|
|
133413
133459
|
dragStartPos: { x: event.global.x, y: event.global.y },
|
|
133414
|
-
spriteStartPos: {
|
|
133460
|
+
spriteStartPos: {
|
|
133461
|
+
gridX: instance.gridPosition.gridX,
|
|
133462
|
+
gridY: instance.gridPosition.gridY
|
|
133463
|
+
},
|
|
133415
133464
|
nearbySprites: /* @__PURE__ */ new Set()
|
|
133416
133465
|
};
|
|
133417
133466
|
instance.sprite.cursor = "grabbing";
|
|
@@ -133478,12 +133527,16 @@ class IsometricInteractionManager {
|
|
|
133478
133527
|
* Finish dragging - snap to grid and cleanup
|
|
133479
133528
|
*/
|
|
133480
133529
|
finishDrag() {
|
|
133481
|
-
var _a, _b;
|
|
133530
|
+
var _a, _b, _c, _d;
|
|
133482
133531
|
if (!this.dragState) return;
|
|
133483
|
-
const { nodeId, instance, nearbySprites } = this.dragState;
|
|
133532
|
+
const { nodeId, instance, nearbySprites, hasMoved } = this.dragState;
|
|
133484
133533
|
let snappedGridX = Math.round(instance.gridPosition.gridX);
|
|
133485
133534
|
let snappedGridY = Math.round(instance.gridPosition.gridY);
|
|
133486
|
-
const clamped = this.clampToMapBounds(
|
|
133535
|
+
const clamped = this.clampToMapBounds(
|
|
133536
|
+
snappedGridX,
|
|
133537
|
+
snappedGridY,
|
|
133538
|
+
instance.size
|
|
133539
|
+
);
|
|
133487
133540
|
snappedGridX = clamped.gridX;
|
|
133488
133541
|
snappedGridY = clamped.gridY;
|
|
133489
133542
|
if (this.wouldCollide(nodeId, { gridX: snappedGridX, gridY: snappedGridY })) {
|
|
@@ -133493,19 +133546,24 @@ class IsometricInteractionManager {
|
|
|
133493
133546
|
instance.update(snappedGridX, snappedGridY);
|
|
133494
133547
|
instance.sprite.cursor = "pointer";
|
|
133495
133548
|
instance.highlight.cursor = "pointer";
|
|
133496
|
-
if (this.hoveredNodeId !== nodeId) {
|
|
133549
|
+
if (this.hoveredNodeId !== nodeId && this.selectedNodeId !== nodeId) {
|
|
133497
133550
|
instance.highlight.visible = false;
|
|
133498
133551
|
}
|
|
133499
133552
|
for (const nearbyId of nearbySprites) {
|
|
133500
133553
|
const nearbyInstance = this.sprites.get(nearbyId);
|
|
133501
|
-
if (nearbyInstance && this.hoveredNodeId !== nearbyId) {
|
|
133554
|
+
if (nearbyInstance && this.hoveredNodeId !== nearbyId && this.selectedNodeId !== nearbyId) {
|
|
133502
133555
|
nearbyInstance.highlight.visible = false;
|
|
133503
133556
|
}
|
|
133504
133557
|
}
|
|
133505
133558
|
if (this.viewport) {
|
|
133506
133559
|
this.viewport.plugins.resume("drag");
|
|
133507
133560
|
}
|
|
133508
|
-
|
|
133561
|
+
if (hasMoved) {
|
|
133562
|
+
(_b = (_a = this.events).onDragEnd) == null ? void 0 : _b.call(_a, nodeId, snappedGridX, snappedGridY);
|
|
133563
|
+
} else {
|
|
133564
|
+
this.setSelected(nodeId);
|
|
133565
|
+
(_d = (_c = this.events).onClick) == null ? void 0 : _d.call(_c, nodeId);
|
|
133566
|
+
}
|
|
133509
133567
|
const eventTarget = this.viewport || this.worldContainer;
|
|
133510
133568
|
eventTarget.off("globalpointermove", this.onGlobalPointerMove);
|
|
133511
133569
|
eventTarget.off("pointerup", this.onPointerUp);
|
|
@@ -133522,14 +133580,16 @@ class IsometricInteractionManager {
|
|
|
133522
133580
|
(_b = (_a = this.events).onHover) == null ? void 0 : _b.call(_a, nodeId);
|
|
133523
133581
|
}
|
|
133524
133582
|
/**
|
|
133525
|
-
* Handle pointer out - hide highlight (unless dragging)
|
|
133583
|
+
* Handle pointer out - hide highlight (unless dragging or selected)
|
|
133526
133584
|
*/
|
|
133527
133585
|
onPointerOut(nodeId, instance) {
|
|
133528
133586
|
var _a, _b;
|
|
133529
133587
|
if (this.hoveredNodeId === nodeId) {
|
|
133530
133588
|
this.hoveredNodeId = null;
|
|
133531
133589
|
}
|
|
133532
|
-
|
|
133590
|
+
const isDragging = this.dragState && this.dragState.nodeId === nodeId;
|
|
133591
|
+
const isSelected = this.selectedNodeId === nodeId;
|
|
133592
|
+
if (!isDragging && !isSelected) {
|
|
133533
133593
|
instance.highlight.visible = false;
|
|
133534
133594
|
}
|
|
133535
133595
|
(_b = (_a = this.events).onHoverEnd) == null ? void 0 : _b.call(_a, nodeId);
|
|
@@ -133544,6 +133604,58 @@ class IsometricInteractionManager {
|
|
|
133544
133604
|
instance.highlight.cursor = enabled ? "pointer" : "default";
|
|
133545
133605
|
}
|
|
133546
133606
|
}
|
|
133607
|
+
/**
|
|
133608
|
+
* Set the selected node
|
|
133609
|
+
*/
|
|
133610
|
+
setSelected(nodeId) {
|
|
133611
|
+
const previousSelected = this.selectedNodeId;
|
|
133612
|
+
this.selectedNodeId = nodeId;
|
|
133613
|
+
if (previousSelected && previousSelected !== nodeId) {
|
|
133614
|
+
const prevInstance = this.sprites.get(previousSelected);
|
|
133615
|
+
if (prevInstance) {
|
|
133616
|
+
if (this.hoveredNodeId !== previousSelected) {
|
|
133617
|
+
prevInstance.highlight.visible = false;
|
|
133618
|
+
}
|
|
133619
|
+
this.updateHighlightColor(prevInstance, false);
|
|
133620
|
+
}
|
|
133621
|
+
}
|
|
133622
|
+
if (nodeId) {
|
|
133623
|
+
const instance = this.sprites.get(nodeId);
|
|
133624
|
+
if (instance) {
|
|
133625
|
+
instance.highlight.visible = true;
|
|
133626
|
+
this.updateHighlightColor(instance, true);
|
|
133627
|
+
}
|
|
133628
|
+
}
|
|
133629
|
+
}
|
|
133630
|
+
/**
|
|
133631
|
+
* Get the currently selected node ID
|
|
133632
|
+
*/
|
|
133633
|
+
getSelectedNodeId() {
|
|
133634
|
+
return this.selectedNodeId;
|
|
133635
|
+
}
|
|
133636
|
+
/**
|
|
133637
|
+
* Update highlight color based on selected state
|
|
133638
|
+
*/
|
|
133639
|
+
updateHighlightColor(instance, isSelected) {
|
|
133640
|
+
const color2 = isSelected ? this.selectedColor : this.hoverColor;
|
|
133641
|
+
instance.highlight.clear();
|
|
133642
|
+
const pos = gridToScreen(
|
|
133643
|
+
instance.gridPosition.gridX,
|
|
133644
|
+
instance.gridPosition.gridY
|
|
133645
|
+
);
|
|
133646
|
+
const hoverSize = 4 * instance.size;
|
|
133647
|
+
const tileWidth = hoverSize * (this.config.tileWidth ?? 64);
|
|
133648
|
+
const tileHeight = hoverSize * (this.config.tileHeight ?? 32);
|
|
133649
|
+
instance.highlight.setStrokeStyle({ width: 3, color: color2, alpha: 1 });
|
|
133650
|
+
instance.highlight.setFillStyle({ color: color2, alpha: isSelected ? 0.25 : 0.1 });
|
|
133651
|
+
instance.highlight.moveTo(pos.screenX, pos.screenY - tileHeight / 2);
|
|
133652
|
+
instance.highlight.lineTo(pos.screenX + tileWidth / 2, pos.screenY);
|
|
133653
|
+
instance.highlight.lineTo(pos.screenX, pos.screenY + tileHeight / 2);
|
|
133654
|
+
instance.highlight.lineTo(pos.screenX - tileWidth / 2, pos.screenY);
|
|
133655
|
+
instance.highlight.closePath();
|
|
133656
|
+
instance.highlight.fill();
|
|
133657
|
+
instance.highlight.stroke();
|
|
133658
|
+
}
|
|
133547
133659
|
/**
|
|
133548
133660
|
* Check if position would cause boundary overlap with other sprites
|
|
133549
133661
|
* Boundary size is 4 × size tiles, extending 2 × size in each direction
|
|
@@ -134422,6 +134534,8 @@ const OverworldMapPanelContent = ({
|
|
|
134422
134534
|
height,
|
|
134423
134535
|
isLoading = false,
|
|
134424
134536
|
onProjectMoved,
|
|
134537
|
+
onNodeClicked,
|
|
134538
|
+
selectedNodeId,
|
|
134425
134539
|
isEditingRegions = false,
|
|
134426
134540
|
customRegions = [],
|
|
134427
134541
|
onAddRegion,
|
|
@@ -134633,6 +134747,9 @@ const OverworldMapPanelContent = ({
|
|
|
134633
134747
|
},
|
|
134634
134748
|
onDragEnd: (nodeId, gridX, gridY) => {
|
|
134635
134749
|
onProjectMoved == null ? void 0 : onProjectMoved(nodeId, gridX, gridY);
|
|
134750
|
+
},
|
|
134751
|
+
onClick: (nodeId) => {
|
|
134752
|
+
onNodeClicked == null ? void 0 : onNodeClicked(nodeId);
|
|
134636
134753
|
}
|
|
134637
134754
|
}
|
|
134638
134755
|
);
|
|
@@ -135034,6 +135151,11 @@ const OverworldMapPanelContent = ({
|
|
|
135034
135151
|
renderPlaceholdersRef.current();
|
|
135035
135152
|
}
|
|
135036
135153
|
}, [isEditingRegions]);
|
|
135154
|
+
useEffect(() => {
|
|
135155
|
+
if (interactionRef.current) {
|
|
135156
|
+
interactionRef.current.setSelected(selectedNodeId ?? null);
|
|
135157
|
+
}
|
|
135158
|
+
}, [selectedNodeId]);
|
|
135037
135159
|
return /* @__PURE__ */ jsxs(
|
|
135038
135160
|
"div",
|
|
135039
135161
|
{
|
|
@@ -135360,7 +135482,9 @@ const CollectionMapPanelContent = ({
|
|
|
135360
135482
|
regionLayout,
|
|
135361
135483
|
isLoading = false,
|
|
135362
135484
|
regionCallbacks,
|
|
135363
|
-
addRepositoryToCollection
|
|
135485
|
+
addRepositoryToCollection,
|
|
135486
|
+
onRepositoryClicked,
|
|
135487
|
+
selectedRepositoryId
|
|
135364
135488
|
}) => {
|
|
135365
135489
|
var _a;
|
|
135366
135490
|
const customRegions = React2__default.useMemo(
|
|
@@ -135853,6 +135977,8 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
135853
135977
|
customRegions,
|
|
135854
135978
|
collectionKey: collection.id,
|
|
135855
135979
|
onProjectMoved: handleProjectMoved,
|
|
135980
|
+
onNodeClicked: onRepositoryClicked,
|
|
135981
|
+
selectedNodeId: selectedRepositoryId,
|
|
135856
135982
|
onViewportReady: handleViewportReady,
|
|
135857
135983
|
onAddRegion: async (position2) => {
|
|
135858
135984
|
const order2 = position2.row * 10 + position2.col;
|
|
@@ -136017,7 +136143,9 @@ const CollectionMapPanel = ({ context: context2, actions }) => {
|
|
|
136017
136143
|
dependencies,
|
|
136018
136144
|
isLoading,
|
|
136019
136145
|
regionCallbacks,
|
|
136020
|
-
addRepositoryToCollection: actions.addRepositoryToCollection
|
|
136146
|
+
addRepositoryToCollection: actions.addRepositoryToCollection,
|
|
136147
|
+
onRepositoryClicked: actions.onRepositoryClicked,
|
|
136148
|
+
selectedRepositoryId: actions.selectedRepositoryId
|
|
136021
136149
|
}
|
|
136022
136150
|
) });
|
|
136023
136151
|
};
|
|
@@ -137114,4 +137242,4 @@ export {
|
|
|
137114
137242
|
UPDATE_PRIORITY as y,
|
|
137115
137243
|
removeItems as z
|
|
137116
137244
|
};
|
|
137117
|
-
//# sourceMappingURL=index-
|
|
137245
|
+
//# sourceMappingURL=index-Bpxci5n3.js.map
|