@industry-theme/repository-composition-panels 0.7.0 → 0.7.1
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-C0HMnNYS.js → BufferResource-0bMCZc9S.js} +2 -2
- package/dist/{BufferResource-C0HMnNYS.js.map → BufferResource-0bMCZc9S.js.map} +1 -1
- package/dist/{CanvasRenderer-N5jLNLxg.js → CanvasRenderer-COO-STVN.js} +3 -3
- package/dist/{CanvasRenderer-N5jLNLxg.js.map → CanvasRenderer-COO-STVN.js.map} +1 -1
- package/dist/{Filter-D2Owmqdr.js → Filter-Bhz2Fws8.js} +2 -2
- package/dist/{Filter-D2Owmqdr.js.map → Filter-Bhz2Fws8.js.map} +1 -1
- package/dist/{RenderTargetSystem-BC7NAq6q.js → RenderTargetSystem-CHt5j3zt.js} +3 -3
- package/dist/{RenderTargetSystem-BC7NAq6q.js.map → RenderTargetSystem-CHt5j3zt.js.map} +1 -1
- package/dist/{WebGLRenderer-BIohIvX4.js → WebGLRenderer-BCeLuv-q.js} +4 -4
- package/dist/{WebGLRenderer-BIohIvX4.js.map → WebGLRenderer-BCeLuv-q.js.map} +1 -1
- package/dist/{WebGPURenderer-RZ0i-r4B.js → WebGPURenderer-BZJD_jqI.js} +4 -4
- package/dist/{WebGPURenderer-RZ0i-r4B.js.map → WebGPURenderer-BZJD_jqI.js.map} +1 -1
- package/dist/{browserAll-C6wZ1sgi.js → browserAll-CKPglyL3.js} +3 -3
- package/dist/{browserAll-C6wZ1sgi.js.map → browserAll-CKPglyL3.js.map} +1 -1
- package/dist/{index-DxPhfLrj.js → index-OydwIwzQ.js} +50 -48
- package/dist/{index-DxPhfLrj.js.map → index-OydwIwzQ.js.map} +1 -1
- package/dist/{init-CYhqVGKf.js → init-BFBagRaV.js} +3 -3
- package/dist/{init-CYhqVGKf.js.map → init-BFBagRaV.js.map} +1 -1
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -1
- package/dist/panels.bundle.js +1 -1
- package/dist/webworkerAll-Cg7mdcVI.js +3 -0
- package/dist/webworkerAll-Cg7mdcVI.js.map +1 -0
- package/package.json +1 -1
- package/dist/webworkerAll-Dpd908jq.js +0 -3
- package/dist/webworkerAll-Dpd908jq.js.map +0 -1
|
@@ -105994,7 +105994,7 @@ const browserExt = {
|
|
|
105994
105994
|
},
|
|
105995
105995
|
test: () => true,
|
|
105996
105996
|
load: async () => {
|
|
105997
|
-
await import("./browserAll-
|
|
105997
|
+
await import("./browserAll-CKPglyL3.js");
|
|
105998
105998
|
}
|
|
105999
105999
|
};
|
|
106000
106000
|
const webworkerExt = {
|
|
@@ -106005,7 +106005,7 @@ const webworkerExt = {
|
|
|
106005
106005
|
},
|
|
106006
106006
|
test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
|
|
106007
106007
|
load: async () => {
|
|
106008
|
-
await import("./webworkerAll-
|
|
106008
|
+
await import("./webworkerAll-Cg7mdcVI.js");
|
|
106009
106009
|
}
|
|
106010
106010
|
};
|
|
106011
106011
|
class ObservablePoint {
|
|
@@ -118248,19 +118248,19 @@ async function autoDetectRenderer(options) {
|
|
|
118248
118248
|
for (let i2 = 0; i2 < preferredOrder.length; i2++) {
|
|
118249
118249
|
const rendererType = preferredOrder[i2];
|
|
118250
118250
|
if (rendererType === "webgpu" && await isWebGPUSupported()) {
|
|
118251
|
-
const { WebGPURenderer } = await import("./WebGPURenderer-
|
|
118251
|
+
const { WebGPURenderer } = await import("./WebGPURenderer-BZJD_jqI.js");
|
|
118252
118252
|
RendererClass = WebGPURenderer;
|
|
118253
118253
|
finalOptions = { ...options, ...options.webgpu };
|
|
118254
118254
|
break;
|
|
118255
118255
|
} else if (rendererType === "webgl" && isWebGLSupported(
|
|
118256
118256
|
options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
|
|
118257
118257
|
)) {
|
|
118258
|
-
const { WebGLRenderer } = await import("./WebGLRenderer-
|
|
118258
|
+
const { WebGLRenderer } = await import("./WebGLRenderer-BCeLuv-q.js");
|
|
118259
118259
|
RendererClass = WebGLRenderer;
|
|
118260
118260
|
finalOptions = { ...options, ...options.webgl };
|
|
118261
118261
|
break;
|
|
118262
118262
|
} else if (rendererType === "canvas") {
|
|
118263
|
-
const { CanvasRenderer } = await import("./CanvasRenderer-
|
|
118263
|
+
const { CanvasRenderer } = await import("./CanvasRenderer-COO-STVN.js");
|
|
118264
118264
|
RendererClass = CanvasRenderer;
|
|
118265
118265
|
finalOptions = { ...options, ...options.canvasOptions };
|
|
118266
118266
|
break;
|
|
@@ -135567,9 +135567,8 @@ const OverworldMapPanelContent = ({
|
|
|
135567
135567
|
const pathManagerRef = useRef(null);
|
|
135568
135568
|
const rendererRef = useRef(null);
|
|
135569
135569
|
const [isRendering, setIsRendering] = useState(true);
|
|
135570
|
-
const [isResizing, setIsResizing] = useState(false);
|
|
135571
135570
|
const [initializationComplete, setInitializationComplete] = useState(0);
|
|
135572
|
-
const
|
|
135571
|
+
const visibleDimensionsRef = useRef({ width: width || 800, height: height || 600 });
|
|
135573
135572
|
const placeholdersRef = useRef(null);
|
|
135574
135573
|
const sceneContainersRef = useRef(null);
|
|
135575
135574
|
const offsetRef = useRef({
|
|
@@ -135646,16 +135645,18 @@ const OverworldMapPanelContent = ({
|
|
|
135646
135645
|
scale: viewportRef.current.scale.x
|
|
135647
135646
|
};
|
|
135648
135647
|
}
|
|
135649
|
-
const
|
|
135650
|
-
const
|
|
135651
|
-
|
|
135652
|
-
|
|
135653
|
-
|
|
135648
|
+
const canvasWidth = window.innerWidth;
|
|
135649
|
+
const canvasHeight = window.innerHeight;
|
|
135650
|
+
const visibleWidth = ((_a = canvasRef.current) == null ? void 0 : _a.clientWidth) || width || 800;
|
|
135651
|
+
const visibleHeight = ((_b = canvasRef.current) == null ? void 0 : _b.clientHeight) || height || 600;
|
|
135652
|
+
visibleDimensionsRef.current = {
|
|
135653
|
+
width: visibleWidth,
|
|
135654
|
+
height: visibleHeight
|
|
135654
135655
|
};
|
|
135655
135656
|
app = new Application();
|
|
135656
135657
|
await app.init({
|
|
135657
|
-
width:
|
|
135658
|
-
height:
|
|
135658
|
+
width: canvasWidth,
|
|
135659
|
+
height: canvasHeight,
|
|
135659
135660
|
backgroundColor: 1710618,
|
|
135660
135661
|
// Dark gray background (matches LayoutEngineTest)
|
|
135661
135662
|
antialias: false,
|
|
@@ -135689,8 +135690,8 @@ const OverworldMapPanelContent = ({
|
|
|
135689
135690
|
const worldWidth = mapData.width * ISO_TILE_WIDTH$1;
|
|
135690
135691
|
const worldHeight = mapData.height * ISO_TILE_HEIGHT$1;
|
|
135691
135692
|
const viewport = new it({
|
|
135692
|
-
screenWidth:
|
|
135693
|
-
screenHeight:
|
|
135693
|
+
screenWidth: visibleWidth,
|
|
135694
|
+
screenHeight: visibleHeight,
|
|
135694
135695
|
worldWidth,
|
|
135695
135696
|
worldHeight,
|
|
135696
135697
|
events: app.renderer.events
|
|
@@ -135787,10 +135788,25 @@ const OverworldMapPanelContent = ({
|
|
|
135787
135788
|
viewport.setZoom(savedCameraPosition.current.scale);
|
|
135788
135789
|
} else if (mapData.regions.length > 0 && !hasInitializedCamera.current) {
|
|
135789
135790
|
const firstRegion = mapData.regions[0];
|
|
135790
|
-
|
|
135791
|
-
|
|
135792
|
-
|
|
135793
|
-
);
|
|
135791
|
+
const bounds = firstRegion.bounds;
|
|
135792
|
+
const topCorner = gridToScreen(bounds.x, bounds.y);
|
|
135793
|
+
const bottomCorner = gridToScreen(bounds.x + bounds.width, bounds.y + bounds.height);
|
|
135794
|
+
const leftCorner = gridToScreen(bounds.x, bounds.y + bounds.height);
|
|
135795
|
+
const rightCorner = gridToScreen(bounds.x + bounds.width, bounds.y);
|
|
135796
|
+
const spriteHeightOffset = 140;
|
|
135797
|
+
const screenMinX = leftCorner.screenX;
|
|
135798
|
+
const screenMaxX = rightCorner.screenX;
|
|
135799
|
+
const screenMinY = topCorner.screenY - spriteHeightOffset;
|
|
135800
|
+
const screenMaxY = bottomCorner.screenY;
|
|
135801
|
+
const screenCenterX = (screenMinX + screenMaxX) / 2;
|
|
135802
|
+
const screenCenterY = (screenMinY + screenMaxY) / 2;
|
|
135803
|
+
viewport.moveCenter(screenCenterX, screenCenterY);
|
|
135804
|
+
const regionScreenWidth = screenMaxX - screenMinX;
|
|
135805
|
+
const regionScreenHeight = screenMaxY - screenMinY;
|
|
135806
|
+
const zoomX = visibleWidth * 0.65 / regionScreenWidth;
|
|
135807
|
+
const zoomY = visibleHeight * 0.65 / regionScreenHeight;
|
|
135808
|
+
const fitZoom = Math.min(zoomX, zoomY, 1);
|
|
135809
|
+
viewport.setZoom(fitZoom);
|
|
135794
135810
|
hasInitializedCamera.current = true;
|
|
135795
135811
|
}
|
|
135796
135812
|
const findAdjacentEmptyPositions = (regions) => {
|
|
@@ -136014,26 +136030,17 @@ const OverworldMapPanelContent = ({
|
|
|
136014
136030
|
setInitializationComplete((prev) => prev + 1);
|
|
136015
136031
|
};
|
|
136016
136032
|
let resizeObserver = null;
|
|
136017
|
-
let resizeTimeout = null;
|
|
136018
136033
|
const initAndSetupResize = async () => {
|
|
136019
136034
|
await initPixi();
|
|
136020
|
-
if (canvasRef.current
|
|
136035
|
+
if (canvasRef.current) {
|
|
136021
136036
|
resizeObserver = new ResizeObserver((entries) => {
|
|
136022
|
-
if (!appRef.current || !viewportRef.current) return;
|
|
136023
|
-
setIsResizing(true);
|
|
136024
|
-
if (resizeTimeout) {
|
|
136025
|
-
clearTimeout(resizeTimeout);
|
|
136026
|
-
}
|
|
136027
136037
|
for (const entry of entries) {
|
|
136028
136038
|
const { width: newWidth, height: newHeight } = entry.contentRect;
|
|
136029
|
-
|
|
136030
|
-
|
|
136031
|
-
|
|
136032
|
-
|
|
136039
|
+
visibleDimensionsRef.current = { width: newWidth, height: newHeight };
|
|
136040
|
+
if (viewportRef.current) {
|
|
136041
|
+
viewportRef.current.resize(newWidth, newHeight);
|
|
136042
|
+
}
|
|
136033
136043
|
}
|
|
136034
|
-
resizeTimeout = window.setTimeout(() => {
|
|
136035
|
-
setIsResizing(false);
|
|
136036
|
-
}, 100);
|
|
136037
136044
|
});
|
|
136038
136045
|
resizeObserver.observe(canvasRef.current);
|
|
136039
136046
|
}
|
|
@@ -136042,9 +136049,6 @@ const OverworldMapPanelContent = ({
|
|
|
136042
136049
|
return () => {
|
|
136043
136050
|
cleanup = true;
|
|
136044
136051
|
isInitializedRef.current = false;
|
|
136045
|
-
if (resizeTimeout) {
|
|
136046
|
-
clearTimeout(resizeTimeout);
|
|
136047
|
-
}
|
|
136048
136052
|
if (resizeObserver) {
|
|
136049
136053
|
resizeObserver.disconnect();
|
|
136050
136054
|
}
|
|
@@ -136065,7 +136069,7 @@ const OverworldMapPanelContent = ({
|
|
|
136065
136069
|
animationRef.current = null;
|
|
136066
136070
|
rendererRef.current = null;
|
|
136067
136071
|
};
|
|
136068
|
-
}, [stableCollectionKey
|
|
136072
|
+
}, [stableCollectionKey]);
|
|
136069
136073
|
useEffect(() => {
|
|
136070
136074
|
var _a, _b;
|
|
136071
136075
|
if (!isInitializedRef.current) {
|
|
@@ -136200,8 +136204,8 @@ const OverworldMapPanelContent = ({
|
|
|
136200
136204
|
return;
|
|
136201
136205
|
}
|
|
136202
136206
|
setIsAnimating(true);
|
|
136203
|
-
const targetX =
|
|
136204
|
-
const targetY =
|
|
136207
|
+
const targetX = visibleDimensionsRef.current.width / 2 - regionCenter.screenX;
|
|
136208
|
+
const targetY = visibleDimensionsRef.current.height / 2 - regionCenter.screenY;
|
|
136205
136209
|
animationRef.current = {
|
|
136206
136210
|
startTime: performance.now(),
|
|
136207
136211
|
startX: viewport.x,
|
|
@@ -136229,6 +136233,7 @@ const OverworldMapPanelContent = ({
|
|
|
136229
136233
|
width: "100%",
|
|
136230
136234
|
height: "100%",
|
|
136231
136235
|
overflow: "hidden"
|
|
136236
|
+
// Container clips the viewport-sized canvas to its actual bounds
|
|
136232
136237
|
},
|
|
136233
136238
|
children: [
|
|
136234
136239
|
(isLoading || isRendering) && /* @__PURE__ */ jsx(
|
|
@@ -136256,15 +136261,13 @@ const OverworldMapPanelContent = ({
|
|
|
136256
136261
|
{
|
|
136257
136262
|
ref: canvasRef,
|
|
136258
136263
|
style: {
|
|
136259
|
-
width: "
|
|
136260
|
-
height: "
|
|
136264
|
+
width: "100dvw",
|
|
136265
|
+
height: "100dvh",
|
|
136261
136266
|
imageRendering: "pixelated",
|
|
136262
136267
|
border: "2px solid #1f2937",
|
|
136263
136268
|
boxSizing: "border-box",
|
|
136264
|
-
backgroundColor: "#1a1a1a"
|
|
136269
|
+
backgroundColor: "#1a1a1a"
|
|
136265
136270
|
// Match Pixi background to prevent flash
|
|
136266
|
-
opacity: isResizing ? 0.95 : 1,
|
|
136267
|
-
transition: "opacity 0.1s ease-out"
|
|
136268
136271
|
}
|
|
136269
136272
|
}
|
|
136270
136273
|
),
|
|
@@ -136274,8 +136277,7 @@ const OverworldMapPanelContent = ({
|
|
|
136274
136277
|
style: {
|
|
136275
136278
|
position: "absolute",
|
|
136276
136279
|
top: 8,
|
|
136277
|
-
left:
|
|
136278
|
-
transform: "translateX(-50%)",
|
|
136280
|
+
left: 8,
|
|
136279
136281
|
display: "flex",
|
|
136280
136282
|
alignItems: "center",
|
|
136281
136283
|
gap: "12px",
|
|
@@ -138315,4 +138317,4 @@ export {
|
|
|
138315
138317
|
UPDATE_PRIORITY as y,
|
|
138316
138318
|
removeItems as z
|
|
138317
138319
|
};
|
|
138318
|
-
//# sourceMappingURL=index-
|
|
138320
|
+
//# sourceMappingURL=index-OydwIwzQ.js.map
|