@industry-theme/repository-composition-panels 0.7.8 → 0.7.10

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 (31) hide show
  1. package/dist/{BufferResource-BrcB7GjV.js → BufferResource-CK5-jEr4.js} +2 -2
  2. package/dist/{BufferResource-BrcB7GjV.js.map → BufferResource-CK5-jEr4.js.map} +1 -1
  3. package/dist/{CanvasRenderer-DVCVlQAe.js → CanvasRenderer-Ch15S5wh.js} +3 -3
  4. package/dist/{CanvasRenderer-DVCVlQAe.js.map → CanvasRenderer-Ch15S5wh.js.map} +1 -1
  5. package/dist/{Filter-g5P8NVFK.js → Filter-CH2-eaDR.js} +2 -2
  6. package/dist/{Filter-g5P8NVFK.js.map → Filter-CH2-eaDR.js.map} +1 -1
  7. package/dist/{RenderTargetSystem-BXTKkVz0.js → RenderTargetSystem-CbM7T-hY.js} +3 -3
  8. package/dist/{RenderTargetSystem-BXTKkVz0.js.map → RenderTargetSystem-CbM7T-hY.js.map} +1 -1
  9. package/dist/{WebGLRenderer-C1p4kl1P.js → WebGLRenderer-6xxdF26-.js} +4 -4
  10. package/dist/{WebGLRenderer-C1p4kl1P.js.map → WebGLRenderer-6xxdF26-.js.map} +1 -1
  11. package/dist/{WebGPURenderer-XEr9nHdK.js → WebGPURenderer-C_cS5rz0.js} +4 -4
  12. package/dist/{WebGPURenderer-XEr9nHdK.js.map → WebGPURenderer-C_cS5rz0.js.map} +1 -1
  13. package/dist/{browserAll-33uY9PDc.js → browserAll-DYTLK9ye.js} +3 -3
  14. package/dist/{browserAll-33uY9PDc.js.map → browserAll-DYTLK9ye.js.map} +1 -1
  15. package/dist/{index-DpCjdndq.js → index-DwRnT31n.js} +311 -275
  16. package/dist/{index-DpCjdndq.js.map → index-DwRnT31n.js.map} +1 -1
  17. package/dist/{init-CACqkXAX.js → init-D23C8DDR.js} +3 -3
  18. package/dist/{init-CACqkXAX.js.map → init-D23C8DDR.js.map} +1 -1
  19. package/dist/panels/GitChangesPanel.d.ts.map +1 -1
  20. package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -1
  21. package/dist/panels/overworld-map/components/IsometricRenderer.d.ts +2 -0
  22. package/dist/panels/overworld-map/components/IsometricRenderer.d.ts.map +1 -1
  23. package/dist/panels/overworld-map/components/buildingSpriteGenerator.d.ts +1 -2
  24. package/dist/panels/overworld-map/components/buildingSpriteGenerator.d.ts.map +1 -1
  25. package/dist/panels/overworld-map/components/licenseSignSprites.d.ts.map +1 -1
  26. package/dist/panels.bundle.js +1 -1
  27. package/dist/webworkerAll-CRJ3DnO-.js +3 -0
  28. package/dist/webworkerAll-CRJ3DnO-.js.map +1 -0
  29. package/package.json +1 -1
  30. package/dist/webworkerAll-Cmk7KfNi.js +0 -3
  31. package/dist/webworkerAll-Cmk7KfNi.js.map +0 -1
@@ -834,32 +834,21 @@ const GitChangesPanelContent = ({
834
834
  status: "??"
835
835
  }))
836
836
  ];
837
- const filteredStatusData = searchTerm ? statusData.filter(
838
- (item) => item.filePath.toLowerCase().includes(searchTerm.toLowerCase())
839
- ) : statusData;
840
837
  let filteredTree = fileTree;
841
838
  if (searchTerm && fileTree.allFiles) {
842
- const rootPath2 = fileTree.root.path;
843
- const usesAbsolutePaths = fileTree.allFiles.length > 0 && fileTree.allFiles[0].path.startsWith("/");
839
+ const searchLower = searchTerm.toLowerCase();
840
+ const matchingFiles = fileTree.allFiles.filter(
841
+ (file) => file.path.toLowerCase().includes(searchLower)
842
+ );
844
843
  const matchingPaths = /* @__PURE__ */ new Set();
845
- filteredStatusData.forEach((item) => {
846
- if (usesAbsolutePaths) {
847
- const absolutePath = `${rootPath2}/${item.filePath}`;
848
- matchingPaths.add(absolutePath);
849
- const parts = item.filePath.split("/");
850
- for (let i2 = 1; i2 < parts.length; i2++) {
851
- const parentPath = `${rootPath2}/${parts.slice(0, i2).join("/")}`;
852
- matchingPaths.add(parentPath);
853
- }
854
- } else {
855
- matchingPaths.add(item.filePath);
856
- const parts = item.filePath.split("/");
857
- for (let i2 = 1; i2 < parts.length; i2++) {
858
- matchingPaths.add(parts.slice(0, i2).join("/"));
859
- }
844
+ matchingFiles.forEach((file) => {
845
+ matchingPaths.add(file.path);
846
+ const parts = file.path.split("/");
847
+ for (let i2 = 1; i2 < parts.length; i2++) {
848
+ matchingPaths.add(parts.slice(0, i2).join("/"));
860
849
  }
861
850
  });
862
- matchingPaths.add(rootPath2);
851
+ matchingPaths.add(fileTree.root.path);
863
852
  const filteredAllFiles = fileTree.allFiles.filter(
864
853
  (file) => matchingPaths.has(file.path)
865
854
  );
@@ -892,7 +881,7 @@ const GitChangesPanelContent = ({
892
881
  }
893
882
  };
894
883
  }
895
- return { tree: filteredTree, statusData: filteredStatusData };
884
+ return { tree: filteredTree, statusData };
896
885
  }, [isLoading, fileTree, gitStatus, searchTerm]);
897
886
  const renderContent = () => {
898
887
  if (isLoading) {
@@ -953,42 +942,25 @@ const GitChangesPanelContent = ({
953
942
  };
954
943
  return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
955
944
  /* @__PURE__ */ jsx(
956
- "div",
945
+ "input",
957
946
  {
947
+ type: "text",
948
+ placeholder: "Filter files...",
949
+ value: searchTerm,
950
+ onChange: (e2) => setSearchTerm(e2.target.value),
958
951
  style: {
959
- padding: "6px 16px",
952
+ width: "100%",
953
+ padding: "0 16px",
954
+ fontSize: theme2.fontSizes[1],
955
+ fontFamily: theme2.fonts.body,
956
+ color: theme2.colors.text,
957
+ backgroundColor: theme2.colors.backgroundSecondary,
958
+ border: "none",
960
959
  borderBottom: `1px solid ${theme2.colors.border}`,
961
- backgroundColor: theme2.colors.background,
962
- height: "40px",
963
- boxSizing: "border-box"
964
- },
965
- children: /* @__PURE__ */ jsx(
966
- "input",
967
- {
968
- type: "text",
969
- placeholder: "Filter files...",
970
- value: searchTerm,
971
- onChange: (e2) => setSearchTerm(e2.target.value),
972
- style: {
973
- width: "100%",
974
- padding: "4px 10px",
975
- fontSize: theme2.fontSizes[1],
976
- fontFamily: theme2.fonts.body,
977
- color: theme2.colors.text,
978
- backgroundColor: theme2.colors.backgroundSecondary,
979
- border: `1px solid ${theme2.colors.border}`,
980
- borderRadius: "4px",
981
- outline: "none",
982
- boxSizing: "border-box"
983
- },
984
- onFocus: (e2) => {
985
- e2.target.style.borderColor = theme2.colors.primary;
986
- },
987
- onBlur: (e2) => {
988
- e2.target.style.borderColor = theme2.colors.border;
989
- }
990
- }
991
- )
960
+ outline: "none",
961
+ boxSizing: "border-box",
962
+ height: "40px"
963
+ }
992
964
  }
993
965
  ),
994
966
  /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: renderContent() }),
@@ -106235,7 +106207,7 @@ const browserExt = {
106235
106207
  },
106236
106208
  test: () => true,
106237
106209
  load: async () => {
106238
- await import("./browserAll-33uY9PDc.js");
106210
+ await import("./browserAll-DYTLK9ye.js");
106239
106211
  }
106240
106212
  };
106241
106213
  const webworkerExt = {
@@ -106246,7 +106218,7 @@ const webworkerExt = {
106246
106218
  },
106247
106219
  test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
106248
106220
  load: async () => {
106249
- await import("./webworkerAll-Cmk7KfNi.js");
106221
+ await import("./webworkerAll-CRJ3DnO-.js");
106250
106222
  }
106251
106223
  };
106252
106224
  class ObservablePoint {
@@ -118489,19 +118461,19 @@ async function autoDetectRenderer(options) {
118489
118461
  for (let i2 = 0; i2 < preferredOrder.length; i2++) {
118490
118462
  const rendererType = preferredOrder[i2];
118491
118463
  if (rendererType === "webgpu" && await isWebGPUSupported()) {
118492
- const { WebGPURenderer } = await import("./WebGPURenderer-XEr9nHdK.js");
118464
+ const { WebGPURenderer } = await import("./WebGPURenderer-C_cS5rz0.js");
118493
118465
  RendererClass = WebGPURenderer;
118494
118466
  finalOptions = { ...options, ...options.webgpu };
118495
118467
  break;
118496
118468
  } else if (rendererType === "webgl" && isWebGLSupported(
118497
118469
  options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
118498
118470
  )) {
118499
- const { WebGLRenderer } = await import("./WebGLRenderer-C1p4kl1P.js");
118471
+ const { WebGLRenderer } = await import("./WebGLRenderer-6xxdF26-.js");
118500
118472
  RendererClass = WebGLRenderer;
118501
118473
  finalOptions = { ...options, ...options.webgl };
118502
118474
  break;
118503
118475
  } else if (rendererType === "canvas") {
118504
- const { CanvasRenderer } = await import("./CanvasRenderer-DVCVlQAe.js");
118476
+ const { CanvasRenderer } = await import("./CanvasRenderer-Ch15S5wh.js");
118505
118477
  RendererClass = CanvasRenderer;
118506
118478
  finalOptions = { ...options, ...options.canvasOptions };
118507
118479
  break;
@@ -132406,6 +132378,122 @@ class it extends Container {
132406
132378
  t2 < this.left ? (this.left = t2, h2 = true) : t2 + n2 > this.right && (this.right = t2 + n2, h2 = true), e2 < this.top ? (this.top = e2, h2 = true) : e2 + i2 > this.bottom && (this.bottom = e2 + i2, h2 = true), h2 && this.emit("moved", { viewport: this, type: "ensureVisible" });
132407
132379
  }
132408
132380
  }
132381
+ function generateBuildingSprite(config) {
132382
+ const { size, color: color2 = 13789470 } = config;
132383
+ const building = new Graphics();
132384
+ const baseWidth = 40 * size;
132385
+ const baseDepth = 40 * size;
132386
+ const baseHeight = 50 * size;
132387
+ const width = baseWidth;
132388
+ const depth = baseDepth;
132389
+ const height = baseHeight;
132390
+ const isoWidth = width;
132391
+ const isoDepthY = depth * 0.25;
132392
+ const darkColor = adjustBrightness$1(color2, 0.6);
132393
+ const mediumColor = adjustBrightness$1(color2, 0.75);
132394
+ const baseColor = color2;
132395
+ const lightColor = adjustBrightness$1(color2, 1.2);
132396
+ building.fillStyle = { color: darkColor };
132397
+ building.beginPath();
132398
+ building.moveTo(-isoWidth / 2, 0);
132399
+ building.lineTo(0, -isoDepthY);
132400
+ building.lineTo(isoWidth / 2, 0);
132401
+ building.lineTo(0, isoDepthY);
132402
+ building.closePath();
132403
+ building.fill();
132404
+ building.fillStyle = { color: mediumColor };
132405
+ building.beginPath();
132406
+ building.moveTo(-isoWidth / 2, 0);
132407
+ building.lineTo(-isoWidth / 2, -height);
132408
+ building.lineTo(0, -height - isoDepthY);
132409
+ building.lineTo(0, -isoDepthY);
132410
+ building.closePath();
132411
+ building.fill();
132412
+ building.fillStyle = { color: baseColor };
132413
+ building.beginPath();
132414
+ building.moveTo(0, -isoDepthY);
132415
+ building.lineTo(0, -height - isoDepthY);
132416
+ building.lineTo(isoWidth / 2, -height);
132417
+ building.lineTo(isoWidth / 2, 0);
132418
+ building.closePath();
132419
+ building.fill();
132420
+ building.fillStyle = { color: lightColor };
132421
+ building.beginPath();
132422
+ building.moveTo(-isoWidth / 2, -height);
132423
+ building.lineTo(0, -height - isoDepthY);
132424
+ building.lineTo(isoWidth / 2, -height);
132425
+ building.lineTo(0, -height + isoDepthY);
132426
+ building.closePath();
132427
+ building.fill();
132428
+ building.strokeStyle = { width: 2, color: 0, alpha: 0.3 };
132429
+ building.beginPath();
132430
+ building.moveTo(-isoWidth / 2, 0);
132431
+ building.lineTo(-isoWidth / 2, -height);
132432
+ building.lineTo(0, -height - isoDepthY);
132433
+ building.lineTo(isoWidth / 2, -height);
132434
+ building.lineTo(isoWidth / 2, 0);
132435
+ building.stroke();
132436
+ return building;
132437
+ }
132438
+ function adjustBrightness$1(color2, factor) {
132439
+ const r2 = color2 >> 16 & 255;
132440
+ const g2 = color2 >> 8 & 255;
132441
+ const b2 = color2 & 255;
132442
+ const newR = Math.min(255, Math.floor(r2 * factor));
132443
+ const newG = Math.min(255, Math.floor(g2 * factor));
132444
+ const newB = Math.min(255, Math.floor(b2 * factor));
132445
+ return newR << 16 | newG << 8 | newB;
132446
+ }
132447
+ const TILE_SIZE = 32;
132448
+ const MAX_NODES_PER_MAP = 12;
132449
+ const REGION_SIZE_TILES = 25;
132450
+ const ISO_TILE_WIDTH$1 = TILE_SIZE * 2;
132451
+ const ISO_TILE_HEIGHT$1 = TILE_SIZE;
132452
+ function gridToScreen(gridX, gridY) {
132453
+ const screenX = (gridX - gridY) * (ISO_TILE_WIDTH$1 / 2);
132454
+ const screenY = (gridX + gridY) * (ISO_TILE_HEIGHT$1 / 2);
132455
+ return { screenX, screenY };
132456
+ }
132457
+ function screenToGrid(screenX, screenY) {
132458
+ const gridX = (screenX / (ISO_TILE_WIDTH$1 / 2) + screenY / (ISO_TILE_HEIGHT$1 / 2)) / 2;
132459
+ const gridY = (screenY / (ISO_TILE_HEIGHT$1 / 2) - screenX / (ISO_TILE_WIDTH$1 / 2)) / 2;
132460
+ return { gridX, gridY };
132461
+ }
132462
+ function getIsometricZIndex(gridX, gridY) {
132463
+ return gridX + gridY;
132464
+ }
132465
+ function calculateRegionCameraPosition(regionCenterX, regionCenterY, bounds) {
132466
+ const center = gridToScreen(regionCenterX, regionCenterY);
132467
+ const topCorner = gridToScreen(bounds.x, bounds.y);
132468
+ const bottomCorner = gridToScreen(
132469
+ bounds.x + bounds.width,
132470
+ bounds.y + bounds.height
132471
+ );
132472
+ const leftCorner = gridToScreen(bounds.x, bounds.y + bounds.height);
132473
+ const rightCorner = gridToScreen(bounds.x + bounds.width, bounds.y);
132474
+ const screenWidth = rightCorner.screenX - leftCorner.screenX;
132475
+ const screenHeight = bottomCorner.screenY - topCorner.screenY;
132476
+ return {
132477
+ centerX: center.screenX,
132478
+ centerY: center.screenY,
132479
+ screenWidth,
132480
+ screenHeight
132481
+ };
132482
+ }
132483
+ function domEventToGridCoords(clientX, clientY, viewport, canvasElement) {
132484
+ if (!viewport || !canvasElement) {
132485
+ console.warn(
132486
+ "[domEventToGridCoords] Missing viewport or canvas element, returning (0, 0)"
132487
+ );
132488
+ return { gridX: 0, gridY: 0 };
132489
+ }
132490
+ const rect = canvasElement.getBoundingClientRect();
132491
+ const canvasX = clientX - rect.left;
132492
+ const canvasY = clientY - rect.top;
132493
+ const worldPoint = viewport.toWorld({ x: canvasX, y: canvasY });
132494
+ const gridCoords = screenToGrid(worldPoint.x, worldPoint.y);
132495
+ return gridCoords;
132496
+ }
132409
132497
  const STAR_TIERS = [
132410
132498
  // Flags (basic tiers)
132411
132499
  { min: 0, max: 100, name: "New", decorationType: "flag", color: 9741240 },
@@ -132696,7 +132784,7 @@ function generatePavilionSprite(color2) {
132696
132784
  pavilion.lineTo(12, 6);
132697
132785
  pavilion.lineTo(6, 7);
132698
132786
  pavilion.closePath();
132699
- pavilion.fill(adjustBrightness$1(color2, 0.7));
132787
+ pavilion.fill(adjustBrightness(color2, 0.7));
132700
132788
  pavilion.beginPath();
132701
132789
  pavilion.moveTo(1, 5);
132702
132790
  pavilion.lineTo(6, 2);
@@ -132731,14 +132819,14 @@ function generateGazeboSprite(color2) {
132731
132819
  gazebo.lineTo(12, 8);
132732
132820
  gazebo.lineTo(7, 9);
132733
132821
  gazebo.closePath();
132734
- gazebo.fill(adjustBrightness$1(color2, 0.6));
132822
+ gazebo.fill(adjustBrightness(color2, 0.6));
132735
132823
  gazebo.beginPath();
132736
132824
  gazebo.moveTo(3, 6);
132737
132825
  gazebo.lineTo(7, 3);
132738
132826
  gazebo.lineTo(11, 6);
132739
132827
  gazebo.lineTo(7, 7);
132740
132828
  gazebo.closePath();
132741
- gazebo.fill(adjustBrightness$1(color2, 0.8));
132829
+ gazebo.fill(adjustBrightness(color2, 0.8));
132742
132830
  gazebo.beginPath();
132743
132831
  gazebo.moveTo(4, 4);
132744
132832
  gazebo.lineTo(7, 2);
@@ -132775,14 +132863,14 @@ function generateBandstandSprite(color2) {
132775
132863
  bandstand.lineTo(16, 9);
132776
132864
  bandstand.lineTo(8, 11);
132777
132865
  bandstand.closePath();
132778
- bandstand.fill(adjustBrightness$1(color2, 0.6));
132866
+ bandstand.fill(adjustBrightness(color2, 0.6));
132779
132867
  bandstand.beginPath();
132780
132868
  bandstand.moveTo(2, 7);
132781
132869
  bandstand.lineTo(8, 2);
132782
132870
  bandstand.lineTo(14, 7);
132783
132871
  bandstand.lineTo(8, 9);
132784
132872
  bandstand.closePath();
132785
- bandstand.fill(adjustBrightness$1(color2, 0.8));
132873
+ bandstand.fill(adjustBrightness(color2, 0.8));
132786
132874
  bandstand.beginPath();
132787
132875
  bandstand.moveTo(4, 5);
132788
132876
  bandstand.lineTo(8, 1);
@@ -132793,154 +132881,9 @@ function generateBandstandSprite(color2) {
132793
132881
  bandstand.circle(8, 0, 2);
132794
132882
  bandstand.fill(16766720);
132795
132883
  bandstand.rect(3, 9, 10, 1);
132796
- bandstand.fill(adjustBrightness$1(color2, 1.2));
132884
+ bandstand.fill(adjustBrightness(color2, 1.2));
132797
132885
  return bandstand;
132798
132886
  }
132799
- function adjustBrightness$1(color2, factor) {
132800
- const r2 = color2 >> 16 & 255;
132801
- const g2 = color2 >> 8 & 255;
132802
- const b2 = color2 & 255;
132803
- const newR = Math.min(255, Math.floor(r2 * factor));
132804
- const newG = Math.min(255, Math.floor(g2 * factor));
132805
- const newB = Math.min(255, Math.floor(b2 * factor));
132806
- return newR << 16 | newG << 8 | newB;
132807
- }
132808
- function generateBuildingSprite(config) {
132809
- const { size, color: color2 = 13789470, stars, collaborators } = config;
132810
- const building = new Graphics();
132811
- const baseWidth = 40 * size;
132812
- const baseDepth = 40 * size;
132813
- const baseHeight = 50 * size;
132814
- const width = baseWidth;
132815
- const depth = baseDepth;
132816
- const height = baseHeight;
132817
- const isoWidth = width;
132818
- const isoDepthY = depth * 0.25;
132819
- const darkColor = adjustBrightness(color2, 0.6);
132820
- const mediumColor = adjustBrightness(color2, 0.75);
132821
- const baseColor = color2;
132822
- const lightColor = adjustBrightness(color2, 1.2);
132823
- building.fillStyle = { color: darkColor };
132824
- building.beginPath();
132825
- building.moveTo(-isoWidth / 2, 0);
132826
- building.lineTo(0, -isoDepthY);
132827
- building.lineTo(isoWidth / 2, 0);
132828
- building.lineTo(0, isoDepthY);
132829
- building.closePath();
132830
- building.fill();
132831
- building.fillStyle = { color: mediumColor };
132832
- building.beginPath();
132833
- building.moveTo(-isoWidth / 2, 0);
132834
- building.lineTo(-isoWidth / 2, -height);
132835
- building.lineTo(0, -height - isoDepthY);
132836
- building.lineTo(0, -isoDepthY);
132837
- building.closePath();
132838
- building.fill();
132839
- building.fillStyle = { color: baseColor };
132840
- building.beginPath();
132841
- building.moveTo(0, -isoDepthY);
132842
- building.lineTo(0, -height - isoDepthY);
132843
- building.lineTo(isoWidth / 2, -height);
132844
- building.lineTo(isoWidth / 2, 0);
132845
- building.closePath();
132846
- building.fill();
132847
- building.fillStyle = { color: lightColor };
132848
- building.beginPath();
132849
- building.moveTo(-isoWidth / 2, -height);
132850
- building.lineTo(0, -height - isoDepthY);
132851
- building.lineTo(isoWidth / 2, -height);
132852
- building.lineTo(0, -height + isoDepthY);
132853
- building.closePath();
132854
- building.fill();
132855
- building.strokeStyle = { width: 2, color: 0, alpha: 0.3 };
132856
- building.beginPath();
132857
- building.moveTo(-isoWidth / 2, 0);
132858
- building.lineTo(-isoWidth / 2, -height);
132859
- building.lineTo(0, -height - isoDepthY);
132860
- building.lineTo(isoWidth / 2, -height);
132861
- building.lineTo(isoWidth / 2, 0);
132862
- building.stroke();
132863
- if (stars && stars > 0) {
132864
- const tier = getStarTier(stars);
132865
- if (tier) {
132866
- let decoration;
132867
- switch (tier.decorationType) {
132868
- case "flag":
132869
- decoration = generateFlagSprite(tier.color);
132870
- break;
132871
- case "trophy":
132872
- decoration = generateTrophySprite(tier.color);
132873
- break;
132874
- case "statue":
132875
- decoration = generateStatueSprite(tier.color);
132876
- break;
132877
- }
132878
- const decorationX = -isoWidth / 4;
132879
- const decorationY = 0;
132880
- decoration.x = decorationX;
132881
- decoration.y = decorationY;
132882
- decoration.scale.set(1.8);
132883
- building.addChild(decoration);
132884
- const countText = new Text({
132885
- text: formatStarCount(stars),
132886
- style: {
132887
- fontSize: 10,
132888
- fill: 16777215,
132889
- fontFamily: "Arial",
132890
- fontWeight: "bold",
132891
- stroke: { color: 0, width: 2 }
132892
- },
132893
- resolution: 2
132894
- });
132895
- countText.x = decorationX;
132896
- countText.y = decorationY + 18;
132897
- countText.anchor.set(0.5, 0);
132898
- building.addChild(countText);
132899
- }
132900
- }
132901
- if (collaborators && collaborators > 0) {
132902
- const tier = getCollaboratorTier(collaborators);
132903
- if (tier) {
132904
- let decoration;
132905
- switch (tier.decorationType) {
132906
- case "bench":
132907
- decoration = generateBenchSprite(tier.color);
132908
- break;
132909
- case "pavilion":
132910
- decoration = generatePavilionSprite(tier.color);
132911
- break;
132912
- case "gazebo":
132913
- decoration = generateGazeboSprite(tier.color);
132914
- break;
132915
- case "bandstand":
132916
- decoration = generateBandstandSprite(tier.color);
132917
- break;
132918
- }
132919
- const decorationX = isoWidth / 4;
132920
- const decorationY = 0;
132921
- decoration.x = decorationX;
132922
- decoration.y = decorationY;
132923
- decoration.scale.set(1.8);
132924
- building.addChild(decoration);
132925
- const countText = new Text({
132926
- text: formatCollaboratorCount(collaborators),
132927
- style: {
132928
- fontSize: 10,
132929
- fill: 16777215,
132930
- fontFamily: "Arial",
132931
- fontWeight: "bold",
132932
- stroke: { color: 0, width: 2 }
132933
- },
132934
- resolution: 2
132935
- });
132936
- countText.x = decorationX;
132937
- countText.y = decorationY + 18;
132938
- countText.anchor.set(0.5, 0);
132939
- building.addChild(countText);
132940
- }
132941
- }
132942
- return building;
132943
- }
132944
132887
  function adjustBrightness(color2, factor) {
132945
132888
  const r2 = color2 >> 16 & 255;
132946
132889
  const g2 = color2 >> 8 & 255;
@@ -132950,56 +132893,6 @@ function adjustBrightness(color2, factor) {
132950
132893
  const newB = Math.min(255, Math.floor(b2 * factor));
132951
132894
  return newR << 16 | newG << 8 | newB;
132952
132895
  }
132953
- const TILE_SIZE = 32;
132954
- const MAX_NODES_PER_MAP = 12;
132955
- const REGION_SIZE_TILES = 25;
132956
- const ISO_TILE_WIDTH$1 = TILE_SIZE * 2;
132957
- const ISO_TILE_HEIGHT$1 = TILE_SIZE;
132958
- function gridToScreen(gridX, gridY) {
132959
- const screenX = (gridX - gridY) * (ISO_TILE_WIDTH$1 / 2);
132960
- const screenY = (gridX + gridY) * (ISO_TILE_HEIGHT$1 / 2);
132961
- return { screenX, screenY };
132962
- }
132963
- function screenToGrid(screenX, screenY) {
132964
- const gridX = (screenX / (ISO_TILE_WIDTH$1 / 2) + screenY / (ISO_TILE_HEIGHT$1 / 2)) / 2;
132965
- const gridY = (screenY / (ISO_TILE_HEIGHT$1 / 2) - screenX / (ISO_TILE_WIDTH$1 / 2)) / 2;
132966
- return { gridX, gridY };
132967
- }
132968
- function getIsometricZIndex(gridX, gridY) {
132969
- return gridX + gridY;
132970
- }
132971
- function calculateRegionCameraPosition(regionCenterX, regionCenterY, bounds) {
132972
- const center = gridToScreen(regionCenterX, regionCenterY);
132973
- const topCorner = gridToScreen(bounds.x, bounds.y);
132974
- const bottomCorner = gridToScreen(
132975
- bounds.x + bounds.width,
132976
- bounds.y + bounds.height
132977
- );
132978
- const leftCorner = gridToScreen(bounds.x, bounds.y + bounds.height);
132979
- const rightCorner = gridToScreen(bounds.x + bounds.width, bounds.y);
132980
- const screenWidth = rightCorner.screenX - leftCorner.screenX;
132981
- const screenHeight = bottomCorner.screenY - topCorner.screenY;
132982
- return {
132983
- centerX: center.screenX,
132984
- centerY: center.screenY,
132985
- screenWidth,
132986
- screenHeight
132987
- };
132988
- }
132989
- function domEventToGridCoords(clientX, clientY, viewport, canvasElement) {
132990
- if (!viewport || !canvasElement) {
132991
- console.warn(
132992
- "[domEventToGridCoords] Missing viewport or canvas element, returning (0, 0)"
132993
- );
132994
- return { gridX: 0, gridY: 0 };
132995
- }
132996
- const rect = canvasElement.getBoundingClientRect();
132997
- const canvasX = clientX - rect.left;
132998
- const canvasY = clientY - rect.top;
132999
- const worldPoint = viewport.toWorld({ x: canvasX, y: canvasY });
133000
- const gridCoords = screenToGrid(worldPoint.x, worldPoint.y);
133001
- return gridCoords;
133002
- }
133003
132896
  const TILE_WIDTH = ISO_TILE_WIDTH$1;
133004
132897
  const TILE_HEIGHT = ISO_TILE_HEIGHT$1;
133005
132898
  function calculateFootprint(sizeMultiplier) {
@@ -133905,6 +133798,12 @@ class IsometricRenderer {
133905
133798
  if (instance.ownerAvatar) {
133906
133799
  nodes.addChild(instance.ownerAvatar);
133907
133800
  }
133801
+ if (instance.starDecoration) {
133802
+ nodes.addChild(instance.starDecoration);
133803
+ }
133804
+ if (instance.collaboratorDecoration) {
133805
+ nodes.addChild(instance.collaboratorDecoration);
133806
+ }
133908
133807
  nodes.addChild(instance.label);
133909
133808
  if (instance.hoverLabel) {
133910
133809
  nodes.addChild(instance.hoverLabel);
@@ -134189,14 +134088,24 @@ class IsometricRenderer {
134189
134088
  decoration = generateStatueSprite(tier.color);
134190
134089
  break;
134191
134090
  }
134091
+ const decorationDimensions = {
134092
+ flag: { w: 8, h: 12 },
134093
+ trophy: { w: 8, h: 10 },
134094
+ statue: { w: 10, h: 15 }
134095
+ };
134096
+ const dim = decorationDimensions[tier.decorationType] || {
134097
+ w: 8,
134098
+ h: 12
134099
+ };
134100
+ decoration.pivot.set(dim.w, dim.h);
134192
134101
  const decorationX = -footprintWidth / 2;
134193
134102
  const decorationY = 0;
134194
134103
  decoration.x = decorationX;
134195
134104
  decoration.y = decorationY;
134196
- decoration.scale.set(1.8);
134105
+ decoration.scale.set(1.5 * sizeMultiplier);
134197
134106
  container.addChild(decoration);
134198
134107
  const countText = new Text({
134199
- text: formatStarCount(node2.stars),
134108
+ text: `${formatStarCount(node2.stars)} stars`,
134200
134109
  style: {
134201
134110
  fontSize: 10,
134202
134111
  fill: 16777215,
@@ -134206,8 +134115,8 @@ class IsometricRenderer {
134206
134115
  },
134207
134116
  resolution: 2
134208
134117
  });
134209
- countText.x = decorationX;
134210
- countText.y = decorationY + 18;
134118
+ countText.x = decorationX - dim.w * 1.5 * sizeMultiplier / 2;
134119
+ countText.y = decorationY + 4;
134211
134120
  countText.anchor.set(0.5, 0);
134212
134121
  container.addChild(countText);
134213
134122
  }
@@ -134230,14 +134139,25 @@ class IsometricRenderer {
134230
134139
  decoration = generateBandstandSprite(tier.color);
134231
134140
  break;
134232
134141
  }
134142
+ const decorationDimensions = {
134143
+ bench: { w: 8, h: 9 },
134144
+ pavilion: { w: 12, h: 12 },
134145
+ gazebo: { w: 14, h: 14 },
134146
+ bandstand: { w: 16, h: 16 }
134147
+ };
134148
+ const dim = decorationDimensions[tier.decorationType] || {
134149
+ w: 12,
134150
+ h: 12
134151
+ };
134152
+ decoration.pivot.set(0, dim.h);
134233
134153
  const decorationX = footprintWidth / 2;
134234
134154
  const decorationY = 0;
134235
134155
  decoration.x = decorationX;
134236
134156
  decoration.y = decorationY;
134237
- decoration.scale.set(1.8);
134157
+ decoration.scale.set(1.5 * sizeMultiplier);
134238
134158
  container.addChild(decoration);
134239
134159
  const countText = new Text({
134240
- text: formatCollaboratorCount(node2.collaborators),
134160
+ text: `${formatCollaboratorCount(node2.collaborators)} collabs`,
134241
134161
  style: {
134242
134162
  fontSize: 10,
134243
134163
  fill: 16777215,
@@ -134247,8 +134167,8 @@ class IsometricRenderer {
134247
134167
  },
134248
134168
  resolution: 2
134249
134169
  });
134250
- countText.x = decorationX;
134251
- countText.y = decorationY + 18;
134170
+ countText.x = decorationX + dim.w * 1.5 * sizeMultiplier / 2;
134171
+ countText.y = decorationY + 4;
134252
134172
  countText.anchor.set(0.5, 0);
134253
134173
  container.addChild(countText);
134254
134174
  }
@@ -134534,6 +134454,110 @@ class IsometricRenderer {
134534
134454
  ownerAvatar = void 0;
134535
134455
  }
134536
134456
  }
134457
+ let starDecoration;
134458
+ if (node2.stars && node2.stars > 0) {
134459
+ const tier = getStarTier(node2.stars);
134460
+ if (tier) {
134461
+ const footprint = calculateFootprint(sizeMultiplier);
134462
+ starDecoration = new Container();
134463
+ let decoration;
134464
+ switch (tier.decorationType) {
134465
+ case "flag":
134466
+ decoration = generateFlagSprite(tier.color);
134467
+ break;
134468
+ case "trophy":
134469
+ decoration = generateTrophySprite(tier.color);
134470
+ break;
134471
+ case "statue":
134472
+ decoration = generateStatueSprite(tier.color);
134473
+ break;
134474
+ }
134475
+ const decorationDimensions = {
134476
+ flag: { w: 8, h: 12 },
134477
+ trophy: { w: 8, h: 10 },
134478
+ statue: { w: 10, h: 15 }
134479
+ };
134480
+ const dim = decorationDimensions[tier.decorationType] || {
134481
+ w: 8,
134482
+ h: 12
134483
+ };
134484
+ decoration.pivot.set(dim.w, dim.h);
134485
+ decoration.scale.set(1.5 * sizeMultiplier);
134486
+ starDecoration.addChild(decoration);
134487
+ const countText = new Text({
134488
+ text: `${formatStarCount(node2.stars)} stars`,
134489
+ style: {
134490
+ fontSize: 10,
134491
+ fill: 16777215,
134492
+ fontFamily: "Arial",
134493
+ fontWeight: "bold",
134494
+ stroke: { color: 0, width: 2 }
134495
+ },
134496
+ resolution: 2
134497
+ });
134498
+ countText.x = -(dim.w * 1.5 * sizeMultiplier) / 2;
134499
+ countText.y = 4;
134500
+ countText.anchor.set(0.5, 0);
134501
+ starDecoration.addChild(countText);
134502
+ starDecoration.x = screenX - footprint.width / 2;
134503
+ starDecoration.y = screenY;
134504
+ starDecoration.zIndex = sprite.zIndex + 0.11;
134505
+ }
134506
+ }
134507
+ let collaboratorDecoration;
134508
+ if (node2.collaborators && node2.collaborators > 0) {
134509
+ const tier = getCollaboratorTier(node2.collaborators);
134510
+ if (tier) {
134511
+ const footprint = calculateFootprint(sizeMultiplier);
134512
+ collaboratorDecoration = new Container();
134513
+ let decoration;
134514
+ switch (tier.decorationType) {
134515
+ case "bench":
134516
+ decoration = generateBenchSprite(tier.color);
134517
+ break;
134518
+ case "pavilion":
134519
+ decoration = generatePavilionSprite(tier.color);
134520
+ break;
134521
+ case "gazebo":
134522
+ decoration = generateGazeboSprite(tier.color);
134523
+ break;
134524
+ case "bandstand":
134525
+ decoration = generateBandstandSprite(tier.color);
134526
+ break;
134527
+ }
134528
+ const decorationDimensions = {
134529
+ bench: { w: 8, h: 9 },
134530
+ pavilion: { w: 12, h: 12 },
134531
+ gazebo: { w: 14, h: 14 },
134532
+ bandstand: { w: 16, h: 16 }
134533
+ };
134534
+ const dim = decorationDimensions[tier.decorationType] || {
134535
+ w: 12,
134536
+ h: 12
134537
+ };
134538
+ decoration.pivot.set(0, dim.h);
134539
+ decoration.scale.set(1.5 * sizeMultiplier);
134540
+ collaboratorDecoration.addChild(decoration);
134541
+ const countText = new Text({
134542
+ text: `${formatCollaboratorCount(node2.collaborators)} collabs`,
134543
+ style: {
134544
+ fontSize: 10,
134545
+ fill: 16777215,
134546
+ fontFamily: "Arial",
134547
+ fontWeight: "bold",
134548
+ stroke: { color: 0, width: 2 }
134549
+ },
134550
+ resolution: 2
134551
+ });
134552
+ countText.x = dim.w * 1.5 * sizeMultiplier / 2;
134553
+ countText.y = 4;
134554
+ countText.anchor.set(0.5, 0);
134555
+ collaboratorDecoration.addChild(countText);
134556
+ collaboratorDecoration.x = screenX + footprint.width / 2;
134557
+ collaboratorDecoration.y = screenY;
134558
+ collaboratorDecoration.zIndex = sprite.zIndex + 0.11;
134559
+ }
134560
+ }
134537
134561
  const instance = {
134538
134562
  sprite,
134539
134563
  highlight,
@@ -134542,6 +134566,8 @@ class IsometricRenderer {
134542
134566
  licenseGround,
134543
134567
  licenseSign,
134544
134568
  ownerAvatar,
134569
+ starDecoration,
134570
+ collaboratorDecoration,
134545
134571
  gridPosition: { gridX: node2.gridX, gridY: node2.gridY },
134546
134572
  size: sizeMultiplier,
134547
134573
  spriteKey: node2.sprite,
@@ -134587,6 +134613,18 @@ class IsometricRenderer {
134587
134613
  ownerAvatar.y = pos.screenY + footprint.height - 12;
134588
134614
  ownerAvatar.zIndex = getIsometricZIndex(gridX, gridY) + 0.12;
134589
134615
  }
134616
+ if (starDecoration) {
134617
+ const footprint = calculateFootprint(sizeMultiplier);
134618
+ starDecoration.x = pos.screenX - footprint.width / 2;
134619
+ starDecoration.y = pos.screenY;
134620
+ starDecoration.zIndex = getIsometricZIndex(gridX, gridY) + 0.11;
134621
+ }
134622
+ if (collaboratorDecoration) {
134623
+ const footprint = calculateFootprint(sizeMultiplier);
134624
+ collaboratorDecoration.x = pos.screenX + footprint.width / 2;
134625
+ collaboratorDecoration.y = pos.screenY;
134626
+ collaboratorDecoration.zIndex = getIsometricZIndex(gridX, gridY) + 0.11;
134627
+ }
134590
134628
  instance.gridPosition = { gridX, gridY };
134591
134629
  },
134592
134630
  destroy: () => {
@@ -134597,6 +134635,8 @@ class IsometricRenderer {
134597
134635
  licenseGround == null ? void 0 : licenseGround.destroy();
134598
134636
  licenseSign == null ? void 0 : licenseSign.destroy();
134599
134637
  ownerAvatar == null ? void 0 : ownerAvatar.destroy();
134638
+ starDecoration == null ? void 0 : starDecoration.destroy();
134639
+ collaboratorDecoration == null ? void 0 : collaboratorDecoration.destroy();
134600
134640
  }
134601
134641
  };
134602
134642
  spriteInstances.set(node2.id, instance);
@@ -136447,13 +136487,9 @@ const OverworldMapPanelContent = ({
136447
136487
  const [, sizeStr, colorHex, starsStr, collaboratorsStr] = key.split("-");
136448
136488
  const size = parseFloat(sizeStr);
136449
136489
  const color2 = parseInt(colorHex.replace("#", ""), 16);
136450
- const stars = parseInt(starsStr) || 0;
136451
- const collaborators = parseInt(collaboratorsStr) || 0;
136452
136490
  const buildingGraphics = generateBuildingSprite({
136453
136491
  size,
136454
- color: color2,
136455
- stars,
136456
- collaborators
136492
+ color: color2
136457
136493
  });
136458
136494
  const texture = app.renderer.generateTexture({
136459
136495
  target: buildingGraphics,
@@ -138891,4 +138927,4 @@ export {
138891
138927
  UPDATE_PRIORITY as y,
138892
138928
  removeItems as z
138893
138929
  };
138894
- //# sourceMappingURL=index-DpCjdndq.js.map
138930
+ //# sourceMappingURL=index-DwRnT31n.js.map