@industry-theme/repository-composition-panels 0.6.38 → 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.
Files changed (26) hide show
  1. package/dist/{BufferResource-DYGRBb5w.js → BufferResource-0bMCZc9S.js} +2 -2
  2. package/dist/{BufferResource-DYGRBb5w.js.map → BufferResource-0bMCZc9S.js.map} +1 -1
  3. package/dist/{CanvasRenderer-g8_S9fUR.js → CanvasRenderer-COO-STVN.js} +3 -3
  4. package/dist/{CanvasRenderer-g8_S9fUR.js.map → CanvasRenderer-COO-STVN.js.map} +1 -1
  5. package/dist/{Filter-BJLG8zhI.js → Filter-Bhz2Fws8.js} +2 -2
  6. package/dist/{Filter-BJLG8zhI.js.map → Filter-Bhz2Fws8.js.map} +1 -1
  7. package/dist/{RenderTargetSystem-BmNKSZwM.js → RenderTargetSystem-CHt5j3zt.js} +3 -3
  8. package/dist/{RenderTargetSystem-BmNKSZwM.js.map → RenderTargetSystem-CHt5j3zt.js.map} +1 -1
  9. package/dist/{WebGLRenderer-p7sX7bkL.js → WebGLRenderer-BCeLuv-q.js} +4 -4
  10. package/dist/{WebGLRenderer-p7sX7bkL.js.map → WebGLRenderer-BCeLuv-q.js.map} +1 -1
  11. package/dist/{WebGPURenderer-BEllH4Ei.js → WebGPURenderer-BZJD_jqI.js} +4 -4
  12. package/dist/{WebGPURenderer-BEllH4Ei.js.map → WebGPURenderer-BZJD_jqI.js.map} +1 -1
  13. package/dist/{browserAll-CtGYvhUO.js → browserAll-CKPglyL3.js} +3 -3
  14. package/dist/{browserAll-CtGYvhUO.js.map → browserAll-CKPglyL3.js.map} +1 -1
  15. package/dist/{index-DG8gGHGR.js → index-OydwIwzQ.js} +163 -146
  16. package/dist/{index-DG8gGHGR.js.map → index-OydwIwzQ.js.map} +1 -1
  17. package/dist/{init-CdrZqtZt.js → init-BFBagRaV.js} +3 -3
  18. package/dist/{init-CdrZqtZt.js.map → init-BFBagRaV.js.map} +1 -1
  19. package/dist/mocks/panelContext.d.ts.map +1 -1
  20. package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -1
  21. package/dist/panels.bundle.js +1 -1
  22. package/dist/webworkerAll-Cg7mdcVI.js +3 -0
  23. package/dist/webworkerAll-Cg7mdcVI.js.map +1 -0
  24. package/package.json +13 -11
  25. package/dist/webworkerAll-B5zN9It9.js +0 -3
  26. package/dist/webworkerAll-B5zN9It9.js.map +0 -1
@@ -10439,135 +10439,152 @@ function getDefaultExportFromCjs(x2) {
10439
10439
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
10440
10440
  }
10441
10441
  var withSelector = { exports: {} };
10442
- var withSelector_production_min = {};
10442
+ var withSelector_production = {};
10443
10443
  var shim = { exports: {} };
10444
- var useSyncExternalStoreShim_production_min = {};
10444
+ var useSyncExternalStoreShim_production = {};
10445
10445
  /**
10446
10446
  * @license React
10447
- * use-sync-external-store-shim.production.min.js
10447
+ * use-sync-external-store-shim.production.js
10448
10448
  *
10449
- * Copyright (c) Facebook, Inc. and its affiliates.
10449
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
10450
10450
  *
10451
10451
  * This source code is licensed under the MIT license found in the
10452
10452
  * LICENSE file in the root directory of this source tree.
10453
10453
  */
10454
- var hasRequiredUseSyncExternalStoreShim_production_min;
10455
- function requireUseSyncExternalStoreShim_production_min() {
10456
- if (hasRequiredUseSyncExternalStoreShim_production_min) return useSyncExternalStoreShim_production_min;
10457
- hasRequiredUseSyncExternalStoreShim_production_min = 1;
10458
- var e2 = React2__default;
10459
- function h2(a2, b2) {
10460
- return a2 === b2 && (0 !== a2 || 1 / a2 === 1 / b2) || a2 !== a2 && b2 !== b2;
10461
- }
10462
- var k2 = "function" === typeof Object.is ? Object.is : h2, l2 = e2.useState, m2 = e2.useEffect, n2 = e2.useLayoutEffect, p2 = e2.useDebugValue;
10463
- function q2(a2, b2) {
10464
- var d2 = b2(), f2 = l2({ inst: { value: d2, getSnapshot: b2 } }), c2 = f2[0].inst, g2 = f2[1];
10465
- n2(function() {
10466
- c2.value = d2;
10467
- c2.getSnapshot = b2;
10468
- r2(c2) && g2({ inst: c2 });
10469
- }, [a2, d2, b2]);
10470
- m2(function() {
10471
- r2(c2) && g2({ inst: c2 });
10472
- return a2(function() {
10473
- r2(c2) && g2({ inst: c2 });
10474
- });
10475
- }, [a2]);
10476
- p2(d2);
10477
- return d2;
10454
+ var hasRequiredUseSyncExternalStoreShim_production;
10455
+ function requireUseSyncExternalStoreShim_production() {
10456
+ if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
10457
+ hasRequiredUseSyncExternalStoreShim_production = 1;
10458
+ var React = React2__default;
10459
+ function is(x2, y2) {
10460
+ return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
10461
+ }
10462
+ var objectIs = "function" === typeof Object.is ? Object.is : is, useState2 = React.useState, useEffect2 = React.useEffect, useLayoutEffect2 = React.useLayoutEffect, useDebugValue2 = React.useDebugValue;
10463
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
10464
+ var value = getSnapshot(), _useState = useState2({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
10465
+ useLayoutEffect2(
10466
+ function() {
10467
+ inst.value = value;
10468
+ inst.getSnapshot = getSnapshot;
10469
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
10470
+ },
10471
+ [subscribe, value, getSnapshot]
10472
+ );
10473
+ useEffect2(
10474
+ function() {
10475
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
10476
+ return subscribe(function() {
10477
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
10478
+ });
10479
+ },
10480
+ [subscribe]
10481
+ );
10482
+ useDebugValue2(value);
10483
+ return value;
10478
10484
  }
10479
- function r2(a2) {
10480
- var b2 = a2.getSnapshot;
10481
- a2 = a2.value;
10485
+ function checkIfSnapshotChanged(inst) {
10486
+ var latestGetSnapshot = inst.getSnapshot;
10487
+ inst = inst.value;
10482
10488
  try {
10483
- var d2 = b2();
10484
- return !k2(a2, d2);
10485
- } catch (f2) {
10489
+ var nextValue = latestGetSnapshot();
10490
+ return !objectIs(inst, nextValue);
10491
+ } catch (error) {
10486
10492
  return true;
10487
10493
  }
10488
10494
  }
10489
- function t2(a2, b2) {
10490
- return b2();
10495
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
10496
+ return getSnapshot();
10491
10497
  }
10492
- var u2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? t2 : q2;
10493
- useSyncExternalStoreShim_production_min.useSyncExternalStore = void 0 !== e2.useSyncExternalStore ? e2.useSyncExternalStore : u2;
10494
- return useSyncExternalStoreShim_production_min;
10498
+ var shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
10499
+ useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim2;
10500
+ return useSyncExternalStoreShim_production;
10495
10501
  }
10496
10502
  var hasRequiredShim;
10497
10503
  function requireShim() {
10498
10504
  if (hasRequiredShim) return shim.exports;
10499
10505
  hasRequiredShim = 1;
10500
10506
  {
10501
- shim.exports = requireUseSyncExternalStoreShim_production_min();
10507
+ shim.exports = requireUseSyncExternalStoreShim_production();
10502
10508
  }
10503
10509
  return shim.exports;
10504
10510
  }
10505
10511
  /**
10506
10512
  * @license React
10507
- * use-sync-external-store-shim/with-selector.production.min.js
10513
+ * use-sync-external-store-shim/with-selector.production.js
10508
10514
  *
10509
- * Copyright (c) Facebook, Inc. and its affiliates.
10515
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
10510
10516
  *
10511
10517
  * This source code is licensed under the MIT license found in the
10512
10518
  * LICENSE file in the root directory of this source tree.
10513
10519
  */
10514
- var hasRequiredWithSelector_production_min;
10515
- function requireWithSelector_production_min() {
10516
- if (hasRequiredWithSelector_production_min) return withSelector_production_min;
10517
- hasRequiredWithSelector_production_min = 1;
10518
- var h2 = React2__default, n2 = requireShim();
10519
- function p2(a2, b2) {
10520
- return a2 === b2 && (0 !== a2 || 1 / a2 === 1 / b2) || a2 !== a2 && b2 !== b2;
10521
- }
10522
- var q2 = "function" === typeof Object.is ? Object.is : p2, r2 = n2.useSyncExternalStore, t2 = h2.useRef, u2 = h2.useEffect, v2 = h2.useMemo, w2 = h2.useDebugValue;
10523
- withSelector_production_min.useSyncExternalStoreWithSelector = function(a2, b2, e2, l2, g2) {
10524
- var c2 = t2(null);
10525
- if (null === c2.current) {
10526
- var f2 = { hasValue: false, value: null };
10527
- c2.current = f2;
10528
- } else f2 = c2.current;
10529
- c2 = v2(function() {
10530
- function a3(a4) {
10531
- if (!c3) {
10532
- c3 = true;
10533
- d3 = a4;
10534
- a4 = l2(a4);
10535
- if (void 0 !== g2 && f2.hasValue) {
10536
- var b3 = f2.value;
10537
- if (g2(b3, a4)) return k2 = b3;
10520
+ var hasRequiredWithSelector_production;
10521
+ function requireWithSelector_production() {
10522
+ if (hasRequiredWithSelector_production) return withSelector_production;
10523
+ hasRequiredWithSelector_production = 1;
10524
+ var React = React2__default, shim2 = requireShim();
10525
+ function is(x2, y2) {
10526
+ return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
10527
+ }
10528
+ var objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim2.useSyncExternalStore, useRef2 = React.useRef, useEffect2 = React.useEffect, useMemo2 = React.useMemo, useDebugValue2 = React.useDebugValue;
10529
+ withSelector_production.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector2, isEqual) {
10530
+ var instRef = useRef2(null);
10531
+ if (null === instRef.current) {
10532
+ var inst = { hasValue: false, value: null };
10533
+ instRef.current = inst;
10534
+ } else inst = instRef.current;
10535
+ instRef = useMemo2(
10536
+ function() {
10537
+ function memoizedSelector(nextSnapshot) {
10538
+ if (!hasMemo) {
10539
+ hasMemo = true;
10540
+ memoizedSnapshot = nextSnapshot;
10541
+ nextSnapshot = selector2(nextSnapshot);
10542
+ if (void 0 !== isEqual && inst.hasValue) {
10543
+ var currentSelection = inst.value;
10544
+ if (isEqual(currentSelection, nextSnapshot))
10545
+ return memoizedSelection = currentSelection;
10546
+ }
10547
+ return memoizedSelection = nextSnapshot;
10548
+ }
10549
+ currentSelection = memoizedSelection;
10550
+ if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
10551
+ var nextSelection = selector2(nextSnapshot);
10552
+ if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
10553
+ return memoizedSnapshot = nextSnapshot, currentSelection;
10554
+ memoizedSnapshot = nextSnapshot;
10555
+ return memoizedSelection = nextSelection;
10556
+ }
10557
+ var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
10558
+ return [
10559
+ function() {
10560
+ return memoizedSelector(getSnapshot());
10561
+ },
10562
+ null === maybeGetServerSnapshot ? void 0 : function() {
10563
+ return memoizedSelector(maybeGetServerSnapshot());
10538
10564
  }
10539
- return k2 = a4;
10540
- }
10541
- b3 = k2;
10542
- if (q2(d3, a4)) return b3;
10543
- var e3 = l2(a4);
10544
- if (void 0 !== g2 && g2(b3, e3)) return b3;
10545
- d3 = a4;
10546
- return k2 = e3;
10547
- }
10548
- var c3 = false, d3, k2, m2 = void 0 === e2 ? null : e2;
10549
- return [function() {
10550
- return a3(b2());
10551
- }, null === m2 ? void 0 : function() {
10552
- return a3(m2());
10553
- }];
10554
- }, [b2, e2, l2, g2]);
10555
- var d2 = r2(a2, c2[0], c2[1]);
10556
- u2(function() {
10557
- f2.hasValue = true;
10558
- f2.value = d2;
10559
- }, [d2]);
10560
- w2(d2);
10561
- return d2;
10562
- };
10563
- return withSelector_production_min;
10565
+ ];
10566
+ },
10567
+ [getSnapshot, getServerSnapshot, selector2, isEqual]
10568
+ );
10569
+ var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
10570
+ useEffect2(
10571
+ function() {
10572
+ inst.hasValue = true;
10573
+ inst.value = value;
10574
+ },
10575
+ [value]
10576
+ );
10577
+ useDebugValue2(value);
10578
+ return value;
10579
+ };
10580
+ return withSelector_production;
10564
10581
  }
10565
10582
  var hasRequiredWithSelector;
10566
10583
  function requireWithSelector() {
10567
10584
  if (hasRequiredWithSelector) return withSelector.exports;
10568
10585
  hasRequiredWithSelector = 1;
10569
10586
  {
10570
- withSelector.exports = requireWithSelector_production_min();
10587
+ withSelector.exports = requireWithSelector_production();
10571
10588
  }
10572
10589
  return withSelector.exports;
10573
10590
  }
@@ -10633,8 +10650,7 @@ function shallow$1(objA, objB) {
10633
10650
  return false;
10634
10651
  }
10635
10652
  if (objA instanceof Map && objB instanceof Map) {
10636
- if (objA.size !== objB.size)
10637
- return false;
10653
+ if (objA.size !== objB.size) return false;
10638
10654
  for (const [key, value] of objA) {
10639
10655
  if (!Object.is(value, objB.get(key))) {
10640
10656
  return false;
@@ -10643,8 +10659,7 @@ function shallow$1(objA, objB) {
10643
10659
  return true;
10644
10660
  }
10645
10661
  if (objA instanceof Set && objB instanceof Set) {
10646
- if (objA.size !== objB.size)
10647
- return false;
10662
+ if (objA.size !== objB.size) return false;
10648
10663
  for (const value of objA) {
10649
10664
  if (!objB.has(value)) {
10650
10665
  return false;
@@ -10656,8 +10671,8 @@ function shallow$1(objA, objB) {
10656
10671
  if (keysA.length !== Object.keys(objB).length) {
10657
10672
  return false;
10658
10673
  }
10659
- for (let i2 = 0; i2 < keysA.length; i2++) {
10660
- if (!Object.prototype.hasOwnProperty.call(objB, keysA[i2]) || !Object.is(objA[keysA[i2]], objB[keysA[i2]])) {
10674
+ for (const keyA of keysA) {
10675
+ if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
10661
10676
  return false;
10662
10677
  }
10663
10678
  }
@@ -105979,7 +105994,7 @@ const browserExt = {
105979
105994
  },
105980
105995
  test: () => true,
105981
105996
  load: async () => {
105982
- await import("./browserAll-CtGYvhUO.js");
105997
+ await import("./browserAll-CKPglyL3.js");
105983
105998
  }
105984
105999
  };
105985
106000
  const webworkerExt = {
@@ -105990,7 +106005,7 @@ const webworkerExt = {
105990
106005
  },
105991
106006
  test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
105992
106007
  load: async () => {
105993
- await import("./webworkerAll-B5zN9It9.js");
106008
+ await import("./webworkerAll-Cg7mdcVI.js");
105994
106009
  }
105995
106010
  };
105996
106011
  class ObservablePoint {
@@ -118233,19 +118248,19 @@ async function autoDetectRenderer(options) {
118233
118248
  for (let i2 = 0; i2 < preferredOrder.length; i2++) {
118234
118249
  const rendererType = preferredOrder[i2];
118235
118250
  if (rendererType === "webgpu" && await isWebGPUSupported()) {
118236
- const { WebGPURenderer } = await import("./WebGPURenderer-BEllH4Ei.js");
118251
+ const { WebGPURenderer } = await import("./WebGPURenderer-BZJD_jqI.js");
118237
118252
  RendererClass = WebGPURenderer;
118238
118253
  finalOptions = { ...options, ...options.webgpu };
118239
118254
  break;
118240
118255
  } else if (rendererType === "webgl" && isWebGLSupported(
118241
118256
  options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
118242
118257
  )) {
118243
- const { WebGLRenderer } = await import("./WebGLRenderer-p7sX7bkL.js");
118258
+ const { WebGLRenderer } = await import("./WebGLRenderer-BCeLuv-q.js");
118244
118259
  RendererClass = WebGLRenderer;
118245
118260
  finalOptions = { ...options, ...options.webgl };
118246
118261
  break;
118247
118262
  } else if (rendererType === "canvas") {
118248
- const { CanvasRenderer } = await import("./CanvasRenderer-g8_S9fUR.js");
118263
+ const { CanvasRenderer } = await import("./CanvasRenderer-COO-STVN.js");
118249
118264
  RendererClass = CanvasRenderer;
118250
118265
  finalOptions = { ...options, ...options.canvasOptions };
118251
118266
  break;
@@ -135552,9 +135567,8 @@ const OverworldMapPanelContent = ({
135552
135567
  const pathManagerRef = useRef(null);
135553
135568
  const rendererRef = useRef(null);
135554
135569
  const [isRendering, setIsRendering] = useState(true);
135555
- const [isResizing, setIsResizing] = useState(false);
135556
135570
  const [initializationComplete, setInitializationComplete] = useState(0);
135557
- const dimensionsRef = useRef({ width: width || 800, height: height || 600 });
135571
+ const visibleDimensionsRef = useRef({ width: width || 800, height: height || 600 });
135558
135572
  const placeholdersRef = useRef(null);
135559
135573
  const sceneContainersRef = useRef(null);
135560
135574
  const offsetRef = useRef({
@@ -135631,16 +135645,18 @@ const OverworldMapPanelContent = ({
135631
135645
  scale: viewportRef.current.scale.x
135632
135646
  };
135633
135647
  }
135634
- const containerWidth = ((_a = canvasRef.current) == null ? void 0 : _a.clientWidth) || width || 800;
135635
- const containerHeight = ((_b = canvasRef.current) == null ? void 0 : _b.clientHeight) || height || 600;
135636
- dimensionsRef.current = {
135637
- width: containerWidth,
135638
- height: containerHeight
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
135639
135655
  };
135640
135656
  app = new Application();
135641
135657
  await app.init({
135642
- width: containerWidth,
135643
- height: containerHeight,
135658
+ width: canvasWidth,
135659
+ height: canvasHeight,
135644
135660
  backgroundColor: 1710618,
135645
135661
  // Dark gray background (matches LayoutEngineTest)
135646
135662
  antialias: false,
@@ -135674,8 +135690,8 @@ const OverworldMapPanelContent = ({
135674
135690
  const worldWidth = mapData.width * ISO_TILE_WIDTH$1;
135675
135691
  const worldHeight = mapData.height * ISO_TILE_HEIGHT$1;
135676
135692
  const viewport = new it({
135677
- screenWidth: containerWidth,
135678
- screenHeight: containerHeight,
135693
+ screenWidth: visibleWidth,
135694
+ screenHeight: visibleHeight,
135679
135695
  worldWidth,
135680
135696
  worldHeight,
135681
135697
  events: app.renderer.events
@@ -135772,10 +135788,25 @@ const OverworldMapPanelContent = ({
135772
135788
  viewport.setZoom(savedCameraPosition.current.scale);
135773
135789
  } else if (mapData.regions.length > 0 && !hasInitializedCamera.current) {
135774
135790
  const firstRegion = mapData.regions[0];
135775
- viewport.moveCenter(
135776
- gridToScreen(firstRegion.centerX, firstRegion.centerY).screenX,
135777
- gridToScreen(firstRegion.centerX, firstRegion.centerY).screenY
135778
- );
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);
135779
135810
  hasInitializedCamera.current = true;
135780
135811
  }
135781
135812
  const findAdjacentEmptyPositions = (regions) => {
@@ -135999,26 +136030,17 @@ const OverworldMapPanelContent = ({
135999
136030
  setInitializationComplete((prev) => prev + 1);
136000
136031
  };
136001
136032
  let resizeObserver = null;
136002
- let resizeTimeout = null;
136003
136033
  const initAndSetupResize = async () => {
136004
136034
  await initPixi();
136005
- if (canvasRef.current && appRef.current) {
136035
+ if (canvasRef.current) {
136006
136036
  resizeObserver = new ResizeObserver((entries) => {
136007
- if (!appRef.current || !viewportRef.current) return;
136008
- setIsResizing(true);
136009
- if (resizeTimeout) {
136010
- clearTimeout(resizeTimeout);
136011
- }
136012
136037
  for (const entry of entries) {
136013
136038
  const { width: newWidth, height: newHeight } = entry.contentRect;
136014
- dimensionsRef.current = { width: newWidth, height: newHeight };
136015
- appRef.current.renderer.resize(newWidth, newHeight);
136016
- viewportRef.current.resize(newWidth, newHeight);
136017
- appRef.current.stage.hitArea = appRef.current.screen;
136039
+ visibleDimensionsRef.current = { width: newWidth, height: newHeight };
136040
+ if (viewportRef.current) {
136041
+ viewportRef.current.resize(newWidth, newHeight);
136042
+ }
136018
136043
  }
136019
- resizeTimeout = window.setTimeout(() => {
136020
- setIsResizing(false);
136021
- }, 100);
136022
136044
  });
136023
136045
  resizeObserver.observe(canvasRef.current);
136024
136046
  }
@@ -136027,9 +136049,6 @@ const OverworldMapPanelContent = ({
136027
136049
  return () => {
136028
136050
  cleanup = true;
136029
136051
  isInitializedRef.current = false;
136030
- if (resizeTimeout) {
136031
- clearTimeout(resizeTimeout);
136032
- }
136033
136052
  if (resizeObserver) {
136034
136053
  resizeObserver.disconnect();
136035
136054
  }
@@ -136050,7 +136069,7 @@ const OverworldMapPanelContent = ({
136050
136069
  animationRef.current = null;
136051
136070
  rendererRef.current = null;
136052
136071
  };
136053
- }, [stableCollectionKey, width, height]);
136072
+ }, [stableCollectionKey]);
136054
136073
  useEffect(() => {
136055
136074
  var _a, _b;
136056
136075
  if (!isInitializedRef.current) {
@@ -136185,8 +136204,8 @@ const OverworldMapPanelContent = ({
136185
136204
  return;
136186
136205
  }
136187
136206
  setIsAnimating(true);
136188
- const targetX = dimensionsRef.current.width / 2 - regionCenter.screenX;
136189
- const targetY = dimensionsRef.current.height / 2 - regionCenter.screenY;
136207
+ const targetX = visibleDimensionsRef.current.width / 2 - regionCenter.screenX;
136208
+ const targetY = visibleDimensionsRef.current.height / 2 - regionCenter.screenY;
136190
136209
  animationRef.current = {
136191
136210
  startTime: performance.now(),
136192
136211
  startX: viewport.x,
@@ -136214,6 +136233,7 @@ const OverworldMapPanelContent = ({
136214
136233
  width: "100%",
136215
136234
  height: "100%",
136216
136235
  overflow: "hidden"
136236
+ // Container clips the viewport-sized canvas to its actual bounds
136217
136237
  },
136218
136238
  children: [
136219
136239
  (isLoading || isRendering) && /* @__PURE__ */ jsx(
@@ -136241,15 +136261,13 @@ const OverworldMapPanelContent = ({
136241
136261
  {
136242
136262
  ref: canvasRef,
136243
136263
  style: {
136244
- width: "100%",
136245
- height: "100%",
136264
+ width: "100dvw",
136265
+ height: "100dvh",
136246
136266
  imageRendering: "pixelated",
136247
136267
  border: "2px solid #1f2937",
136248
136268
  boxSizing: "border-box",
136249
- backgroundColor: "#1a1a1a",
136269
+ backgroundColor: "#1a1a1a"
136250
136270
  // Match Pixi background to prevent flash
136251
- opacity: isResizing ? 0.95 : 1,
136252
- transition: "opacity 0.1s ease-out"
136253
136271
  }
136254
136272
  }
136255
136273
  ),
@@ -136259,8 +136277,7 @@ const OverworldMapPanelContent = ({
136259
136277
  style: {
136260
136278
  position: "absolute",
136261
136279
  top: 8,
136262
- left: "50%",
136263
- transform: "translateX(-50%)",
136280
+ left: 8,
136264
136281
  display: "flex",
136265
136282
  alignItems: "center",
136266
136283
  gap: "12px",
@@ -138300,4 +138317,4 @@ export {
138300
138317
  UPDATE_PRIORITY as y,
138301
138318
  removeItems as z
138302
138319
  };
138303
- //# sourceMappingURL=index-DG8gGHGR.js.map
138320
+ //# sourceMappingURL=index-OydwIwzQ.js.map