@accelint/map-toolkit 0.4.0 → 0.5.0

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 (131) hide show
  1. package/CHANGELOG.md +52 -24
  2. package/README.md +3 -0
  3. package/catalog-info.yaml +6 -7
  4. package/dist/_virtual/rolldown_runtime.js +22 -0
  5. package/dist/camera/events.d.ts +15 -0
  6. package/dist/camera/events.js +29 -0
  7. package/dist/camera/events.js.map +1 -0
  8. package/dist/camera/index.d.ts +16 -0
  9. package/dist/camera/index.js +17 -0
  10. package/dist/camera/types.d.ts +84 -0
  11. package/dist/camera/types.js +12 -0
  12. package/dist/camera/use-camera-state.d.ts +153 -0
  13. package/dist/camera/use-camera-state.js +419 -0
  14. package/dist/camera/use-camera-state.js.map +1 -0
  15. package/dist/cursor-coordinates/use-cursor-coordinates.js +1 -1
  16. package/dist/deckgl/base-map/constants.d.ts +6 -1
  17. package/dist/deckgl/base-map/constants.js +6 -1
  18. package/dist/deckgl/base-map/constants.js.map +1 -1
  19. package/dist/deckgl/base-map/controls.d.ts +34 -0
  20. package/dist/deckgl/base-map/controls.js +50 -0
  21. package/dist/deckgl/base-map/controls.js.map +1 -0
  22. package/dist/deckgl/base-map/events.d.ts +4 -0
  23. package/dist/deckgl/base-map/events.js +5 -1
  24. package/dist/deckgl/base-map/events.js.map +1 -1
  25. package/dist/deckgl/base-map/index.d.ts +8 -23
  26. package/dist/deckgl/base-map/index.js +82 -42
  27. package/dist/deckgl/base-map/index.js.map +1 -1
  28. package/dist/deckgl/base-map/provider.d.ts +2 -2
  29. package/dist/deckgl/base-map/types.d.ts +43 -2
  30. package/dist/deckgl/index.d.ts +5 -4
  31. package/dist/deckgl/index.js +2 -1
  32. package/dist/deckgl/saved-viewports/index.d.ts +32 -0
  33. package/dist/deckgl/saved-viewports/index.js +52 -0
  34. package/dist/deckgl/saved-viewports/index.js.map +1 -0
  35. package/dist/deckgl/saved-viewports/storage.d.ts +21 -0
  36. package/dist/deckgl/saved-viewports/storage.js +39 -0
  37. package/dist/deckgl/saved-viewports/storage.js.map +1 -0
  38. package/dist/maplibre/hooks/use-maplibre.d.ts +2 -2
  39. package/dist/maplibre/hooks/use-maplibre.js +2 -2
  40. package/dist/maplibre/hooks/use-maplibre.js.map +1 -1
  41. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/assert.js +21 -0
  42. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/assert.js.map +1 -0
  43. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fit-bounds.js +63 -0
  44. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fit-bounds.js.map +1 -0
  45. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fly-to-viewport.js +14 -0
  46. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/get-bounds.js +20 -0
  47. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/get-bounds.js.map +1 -0
  48. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/index.js +19 -0
  49. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/math-utils.js +25 -0
  50. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/math-utils.js.map +1 -0
  51. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/normalize-viewport-props.js +14 -0
  52. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-utils.js +59 -0
  53. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-utils.js.map +1 -0
  54. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-viewport.js +16 -0
  55. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/attribution-control.js +29 -0
  56. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/attribution-control.js.map +1 -0
  57. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/fullscreen-control.js +29 -0
  58. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/fullscreen-control.js.map +1 -0
  59. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/geolocate-control.js +54 -0
  60. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/geolocate-control.js.map +1 -0
  61. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/layer.js +15 -0
  62. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/logo-control.js +29 -0
  63. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/logo-control.js.map +1 -0
  64. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/map.js +91 -0
  65. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/map.js.map +1 -0
  66. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/marker.js +88 -0
  67. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/marker.js.map +1 -0
  68. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/navigation-control.js +29 -0
  69. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/navigation-control.js.map +1 -0
  70. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/popup.js +69 -0
  71. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/popup.js.map +1 -0
  72. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/scale-control.js +35 -0
  73. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/scale-control.js.map +1 -0
  74. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/source.js +15 -0
  75. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/terrain-control.js +29 -0
  76. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/terrain-control.js.map +1 -0
  77. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/use-control.js +40 -0
  78. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/use-control.js.map +1 -0
  79. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/use-map.js +23 -0
  80. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/components/use-map.js.map +1 -0
  81. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/index.js +27 -0
  82. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/maplibre/create-ref.js +57 -0
  83. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/maplibre/create-ref.js.map +1 -0
  84. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/maplibre/maplibre.js +343 -0
  85. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/maplibre/maplibre.js.map +1 -0
  86. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/apply-react-style.js +28 -0
  87. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/apply-react-style.js.map +1 -0
  88. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/compare-class-names.js +31 -0
  89. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/compare-class-names.js.map +1 -0
  90. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/deep-equal.js +57 -0
  91. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/deep-equal.js.map +1 -0
  92. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/set-globals.js +30 -0
  93. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/set-globals.js.map +1 -0
  94. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/style-utils.js +53 -0
  95. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/style-utils.js.map +1 -0
  96. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/transform.js +52 -0
  97. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/transform.js.map +1 -0
  98. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/use-isomorphic-layout-effect.js +22 -0
  99. package/dist/node_modules/.pnpm/@vis.gl_react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/use-isomorphic-layout-effect.js.map +1 -0
  100. package/dist/node_modules/.pnpm/immer@10.2.0/node_modules/immer/dist/immer.js +812 -0
  101. package/dist/node_modules/.pnpm/immer@10.2.0/node_modules/immer/dist/immer.js.map +1 -0
  102. package/dist/node_modules/.pnpm/radashi@12.7.1/node_modules/radashi/dist/radashi.js +35 -0
  103. package/dist/node_modules/.pnpm/radashi@12.7.1/node_modules/radashi/dist/radashi.js.map +1 -0
  104. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.development.js +195 -0
  105. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.development.js.map +1 -0
  106. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.production.js +76 -0
  107. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.production.js.map +1 -0
  108. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/index.js +39 -0
  109. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/index.js.map +1 -0
  110. package/dist/node_modules/.pnpm/react-map-gl@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-map-gl/dist/maplibre.js +16 -0
  111. package/dist/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_immer@10.2.0_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/middleware/immer.js +27 -0
  112. package/dist/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_immer@10.2.0_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/middleware/immer.js.map +1 -0
  113. package/dist/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_immer@10.2.0_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js +45 -0
  114. package/dist/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_immer@10.2.0_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js.map +1 -0
  115. package/dist/packages/hotkey-manager/dist/actions/register-hotkey/index.js +78 -0
  116. package/dist/packages/hotkey-manager/dist/actions/register-hotkey/index.js.map +1 -0
  117. package/dist/packages/hotkey-manager/dist/constants.js +47 -0
  118. package/dist/packages/hotkey-manager/dist/constants.js.map +1 -0
  119. package/dist/packages/hotkey-manager/dist/enums/keycode.js +130 -0
  120. package/dist/packages/hotkey-manager/dist/enums/keycode.js.map +1 -0
  121. package/dist/packages/hotkey-manager/dist/lib/is-client/index.js +22 -0
  122. package/dist/packages/hotkey-manager/dist/lib/is-client/index.js.map +1 -0
  123. package/dist/packages/hotkey-manager/dist/lib/is-mac/index.js +24 -0
  124. package/dist/packages/hotkey-manager/dist/lib/is-mac/index.js.map +1 -0
  125. package/dist/packages/hotkey-manager/dist/lib/key-to-id/index.js +39 -0
  126. package/dist/packages/hotkey-manager/dist/lib/key-to-id/index.js.map +1 -0
  127. package/dist/packages/hotkey-manager/dist/lib/key-to-string/index.js +27 -0
  128. package/dist/packages/hotkey-manager/dist/lib/key-to-string/index.js.map +1 -0
  129. package/dist/packages/hotkey-manager/dist/stores/hotkey-store/index.js +95 -0
  130. package/dist/packages/hotkey-manager/dist/stores/hotkey-store/index.js.map +1 -0
  131. package/package.json +98 -85
@@ -0,0 +1,343 @@
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+
14
+ import { deepEqual } from "../utils/deep-equal.js";
15
+ import { applyViewStateToTransform, transformToViewState } from "../utils/transform.js";
16
+ import { normalizeStyle } from "../utils/style-utils.js";
17
+
18
+ //#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/maplibre/maplibre.js
19
+ const DEFAULT_STYLE = {
20
+ version: 8,
21
+ sources: {},
22
+ layers: []
23
+ };
24
+ const pointerEvents = {
25
+ mousedown: "onMouseDown",
26
+ mouseup: "onMouseUp",
27
+ mouseover: "onMouseOver",
28
+ mousemove: "onMouseMove",
29
+ click: "onClick",
30
+ dblclick: "onDblClick",
31
+ mouseenter: "onMouseEnter",
32
+ mouseleave: "onMouseLeave",
33
+ mouseout: "onMouseOut",
34
+ contextmenu: "onContextMenu",
35
+ touchstart: "onTouchStart",
36
+ touchend: "onTouchEnd",
37
+ touchmove: "onTouchMove",
38
+ touchcancel: "onTouchCancel"
39
+ };
40
+ const cameraEvents = {
41
+ movestart: "onMoveStart",
42
+ move: "onMove",
43
+ moveend: "onMoveEnd",
44
+ dragstart: "onDragStart",
45
+ drag: "onDrag",
46
+ dragend: "onDragEnd",
47
+ zoomstart: "onZoomStart",
48
+ zoom: "onZoom",
49
+ zoomend: "onZoomEnd",
50
+ rotatestart: "onRotateStart",
51
+ rotate: "onRotate",
52
+ rotateend: "onRotateEnd",
53
+ pitchstart: "onPitchStart",
54
+ pitch: "onPitch",
55
+ pitchend: "onPitchEnd"
56
+ };
57
+ const otherEvents = {
58
+ wheel: "onWheel",
59
+ boxzoomstart: "onBoxZoomStart",
60
+ boxzoomend: "onBoxZoomEnd",
61
+ boxzoomcancel: "onBoxZoomCancel",
62
+ resize: "onResize",
63
+ load: "onLoad",
64
+ render: "onRender",
65
+ idle: "onIdle",
66
+ remove: "onRemove",
67
+ data: "onData",
68
+ styledata: "onStyleData",
69
+ sourcedata: "onSourceData",
70
+ error: "onError"
71
+ };
72
+ const settingNames = [
73
+ "minZoom",
74
+ "maxZoom",
75
+ "minPitch",
76
+ "maxPitch",
77
+ "maxBounds",
78
+ "projection",
79
+ "renderWorldCopies"
80
+ ];
81
+ const handlerNames = [
82
+ "scrollZoom",
83
+ "boxZoom",
84
+ "dragRotate",
85
+ "dragPan",
86
+ "keyboard",
87
+ "doubleClickZoom",
88
+ "touchZoomRotate",
89
+ "touchPitch"
90
+ ];
91
+ /**
92
+ * A wrapper for mapbox-gl's Map class
93
+ */
94
+ var Maplibre = class Maplibre {
95
+ constructor(MapClass, props, container) {
96
+ this._map = null;
97
+ this._internalUpdate = false;
98
+ this._hoveredFeatures = null;
99
+ this._propsedCameraUpdate = null;
100
+ this._styleComponents = {};
101
+ this._onEvent = (e) => {
102
+ const cb = this.props[otherEvents[e.type]];
103
+ if (cb) cb(e);
104
+ else if (e.type === "error") console.error(e.error);
105
+ };
106
+ this._onCameraEvent = (e) => {
107
+ if (this._internalUpdate) return;
108
+ e.viewState = this._propsedCameraUpdate || transformToViewState(this._map.transform);
109
+ const cb = this.props[cameraEvents[e.type]];
110
+ if (cb) cb(e);
111
+ };
112
+ this._onCameraUpdate = (tr) => {
113
+ if (this._internalUpdate) return tr;
114
+ this._propsedCameraUpdate = transformToViewState(tr);
115
+ return applyViewStateToTransform(tr, this.props);
116
+ };
117
+ this._onPointerEvent = (e) => {
118
+ if (e.type === "mousemove" || e.type === "mouseout") this._updateHover(e);
119
+ const cb = this.props[pointerEvents[e.type]];
120
+ if (cb) {
121
+ if (this.props.interactiveLayerIds && e.type !== "mouseover" && e.type !== "mouseout") e.features = this._hoveredFeatures || this._queryRenderedFeatures(e.point);
122
+ cb(e);
123
+ delete e.features;
124
+ }
125
+ };
126
+ this._MapClass = MapClass;
127
+ this.props = props;
128
+ this._initialize(container);
129
+ }
130
+ get map() {
131
+ return this._map;
132
+ }
133
+ setProps(props) {
134
+ const oldProps = this.props;
135
+ this.props = props;
136
+ const settingsChanged = this._updateSettings(props, oldProps);
137
+ const sizeChanged = this._updateSize(props);
138
+ const viewStateChanged = this._updateViewState(props);
139
+ this._updateStyle(props, oldProps);
140
+ this._updateStyleComponents(props);
141
+ this._updateHandlers(props, oldProps);
142
+ if (settingsChanged || sizeChanged || viewStateChanged && !this._map.isMoving()) this.redraw();
143
+ }
144
+ static reuse(props, container) {
145
+ const that = Maplibre.savedMaps.pop();
146
+ if (!that) return null;
147
+ const map = that.map;
148
+ const oldContainer = map.getContainer();
149
+ container.className = oldContainer.className;
150
+ while (oldContainer.childNodes.length > 0) container.appendChild(oldContainer.childNodes[0]);
151
+ map._container = container;
152
+ const resizeObserver = map._resizeObserver;
153
+ if (resizeObserver) {
154
+ resizeObserver.disconnect();
155
+ resizeObserver.observe(container);
156
+ }
157
+ that.setProps({
158
+ ...props,
159
+ styleDiffing: false
160
+ });
161
+ map.resize();
162
+ const { initialViewState } = props;
163
+ if (initialViewState) if (initialViewState.bounds) map.fitBounds(initialViewState.bounds, {
164
+ ...initialViewState.fitBoundsOptions,
165
+ duration: 0
166
+ });
167
+ else that._updateViewState(initialViewState);
168
+ if (map.isStyleLoaded()) map.fire("load");
169
+ else map.once("style.load", () => map.fire("load"));
170
+ map._update();
171
+ return that;
172
+ }
173
+ _initialize(container) {
174
+ const { props } = this;
175
+ const { mapStyle = DEFAULT_STYLE } = props;
176
+ const mapOptions = {
177
+ ...props,
178
+ ...props.initialViewState,
179
+ container,
180
+ style: normalizeStyle(mapStyle)
181
+ };
182
+ const viewState = mapOptions.initialViewState || mapOptions.viewState || mapOptions;
183
+ Object.assign(mapOptions, {
184
+ center: [viewState.longitude || 0, viewState.latitude || 0],
185
+ zoom: viewState.zoom || 0,
186
+ pitch: viewState.pitch || 0,
187
+ bearing: viewState.bearing || 0
188
+ });
189
+ if (props.gl) {
190
+ const getContext = HTMLCanvasElement.prototype.getContext;
191
+ HTMLCanvasElement.prototype.getContext = () => {
192
+ HTMLCanvasElement.prototype.getContext = getContext;
193
+ return props.gl;
194
+ };
195
+ }
196
+ const map = new this._MapClass(mapOptions);
197
+ if (viewState.padding) map.setPadding(viewState.padding);
198
+ if (props.cursor) map.getCanvas().style.cursor = props.cursor;
199
+ map.transformCameraUpdate = this._onCameraUpdate;
200
+ map.on("style.load", () => {
201
+ this._styleComponents = {
202
+ light: map.getLight(),
203
+ sky: map.getSky(),
204
+ projection: map.getProjection?.(),
205
+ terrain: map.getTerrain()
206
+ };
207
+ this._updateStyleComponents(this.props);
208
+ });
209
+ map.on("sourcedata", () => {
210
+ this._updateStyleComponents(this.props);
211
+ });
212
+ for (const eventName in pointerEvents) map.on(eventName, this._onPointerEvent);
213
+ for (const eventName in cameraEvents) map.on(eventName, this._onCameraEvent);
214
+ for (const eventName in otherEvents) map.on(eventName, this._onEvent);
215
+ this._map = map;
216
+ }
217
+ recycle() {
218
+ this.map.getContainer().querySelector("[mapboxgl-children]")?.remove();
219
+ Maplibre.savedMaps.push(this);
220
+ }
221
+ destroy() {
222
+ this._map.remove();
223
+ }
224
+ redraw() {
225
+ const map = this._map;
226
+ if (map.style) {
227
+ if (map._frame) {
228
+ map._frame.cancel();
229
+ map._frame = null;
230
+ }
231
+ map._render();
232
+ }
233
+ }
234
+ _updateSize(nextProps) {
235
+ const { viewState } = nextProps;
236
+ if (viewState) {
237
+ const map = this._map;
238
+ if (viewState.width !== map.transform.width || viewState.height !== map.transform.height) {
239
+ map.resize();
240
+ return true;
241
+ }
242
+ }
243
+ return false;
244
+ }
245
+ _updateViewState(nextProps) {
246
+ const map = this._map;
247
+ const tr = map.transform;
248
+ if (!map.isMoving()) {
249
+ const changes = applyViewStateToTransform(tr, nextProps);
250
+ if (Object.keys(changes).length > 0) {
251
+ this._internalUpdate = true;
252
+ map.jumpTo(changes);
253
+ this._internalUpdate = false;
254
+ return true;
255
+ }
256
+ }
257
+ return false;
258
+ }
259
+ _updateSettings(nextProps, currProps) {
260
+ const map = this._map;
261
+ let changed = false;
262
+ for (const propName of settingNames) if (propName in nextProps && !deepEqual(nextProps[propName], currProps[propName])) {
263
+ changed = true;
264
+ map[`set${propName[0].toUpperCase()}${propName.slice(1)}`]?.call(map, nextProps[propName]);
265
+ }
266
+ return changed;
267
+ }
268
+ _updateStyle(nextProps, currProps) {
269
+ if (nextProps.cursor !== currProps.cursor) this._map.getCanvas().style.cursor = nextProps.cursor || "";
270
+ if (nextProps.mapStyle !== currProps.mapStyle) {
271
+ const { mapStyle = DEFAULT_STYLE, styleDiffing = true } = nextProps;
272
+ const options = { diff: styleDiffing };
273
+ if ("localIdeographFontFamily" in nextProps) options.localIdeographFontFamily = nextProps.localIdeographFontFamily;
274
+ this._map.setStyle(normalizeStyle(mapStyle), options);
275
+ }
276
+ }
277
+ _updateStyleComponents({ light, projection, sky, terrain }) {
278
+ const map = this._map;
279
+ const currProps = this._styleComponents;
280
+ if (map.style._loaded) {
281
+ if (light && !deepEqual(light, currProps.light)) {
282
+ currProps.light = light;
283
+ map.setLight(light);
284
+ }
285
+ if (projection && !deepEqual(projection, currProps.projection) && projection !== currProps.projection?.type) {
286
+ currProps.projection = typeof projection === "string" ? { type: projection } : projection;
287
+ map.setProjection?.(currProps.projection);
288
+ }
289
+ if (sky && !deepEqual(sky, currProps.sky)) {
290
+ currProps.sky = sky;
291
+ map.setSky(sky);
292
+ }
293
+ if (terrain !== void 0 && !deepEqual(terrain, currProps.terrain)) {
294
+ if (!terrain || map.getSource(terrain.source)) {
295
+ currProps.terrain = terrain;
296
+ map.setTerrain(terrain);
297
+ }
298
+ }
299
+ }
300
+ }
301
+ _updateHandlers(nextProps, currProps) {
302
+ const map = this._map;
303
+ for (const propName of handlerNames) {
304
+ const newValue = nextProps[propName] ?? true;
305
+ if (!deepEqual(newValue, currProps[propName] ?? true)) if (newValue) map[propName].enable(newValue);
306
+ else map[propName].disable();
307
+ }
308
+ }
309
+ _queryRenderedFeatures(point) {
310
+ const map = this._map;
311
+ const { interactiveLayerIds = [] } = this.props;
312
+ try {
313
+ return map.queryRenderedFeatures(point, { layers: interactiveLayerIds.filter(map.getLayer.bind(map)) });
314
+ } catch {
315
+ return [];
316
+ }
317
+ }
318
+ _updateHover(e) {
319
+ const { props } = this;
320
+ if (props.interactiveLayerIds && (props.onMouseMove || props.onMouseEnter || props.onMouseLeave)) {
321
+ const eventType = e.type;
322
+ const wasHovering = this._hoveredFeatures?.length > 0;
323
+ const features = this._queryRenderedFeatures(e.point);
324
+ const isHovering = features.length > 0;
325
+ if (!isHovering && wasHovering) {
326
+ e.type = "mouseleave";
327
+ this._onPointerEvent(e);
328
+ }
329
+ this._hoveredFeatures = features;
330
+ if (isHovering && !wasHovering) {
331
+ e.type = "mouseenter";
332
+ this._onPointerEvent(e);
333
+ }
334
+ e.type = eventType;
335
+ } else this._hoveredFeatures = null;
336
+ }
337
+ };
338
+ Maplibre.savedMaps = [];
339
+ var maplibre_default = Maplibre;
340
+
341
+ //#endregion
342
+ export { maplibre_default as default };
343
+ //# sourceMappingURL=maplibre.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maplibre.js","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/maplibre/maplibre.js"],"sourcesContent":["import { transformToViewState, applyViewStateToTransform } from \"../utils/transform.js\";\nimport { normalizeStyle } from \"../utils/style-utils.js\";\nimport { deepEqual } from \"../utils/deep-equal.js\";\nconst DEFAULT_STYLE = { version: 8, sources: {}, layers: [] };\nconst pointerEvents = {\n mousedown: 'onMouseDown',\n mouseup: 'onMouseUp',\n mouseover: 'onMouseOver',\n mousemove: 'onMouseMove',\n click: 'onClick',\n dblclick: 'onDblClick',\n mouseenter: 'onMouseEnter',\n mouseleave: 'onMouseLeave',\n mouseout: 'onMouseOut',\n contextmenu: 'onContextMenu',\n touchstart: 'onTouchStart',\n touchend: 'onTouchEnd',\n touchmove: 'onTouchMove',\n touchcancel: 'onTouchCancel'\n};\nconst cameraEvents = {\n movestart: 'onMoveStart',\n move: 'onMove',\n moveend: 'onMoveEnd',\n dragstart: 'onDragStart',\n drag: 'onDrag',\n dragend: 'onDragEnd',\n zoomstart: 'onZoomStart',\n zoom: 'onZoom',\n zoomend: 'onZoomEnd',\n rotatestart: 'onRotateStart',\n rotate: 'onRotate',\n rotateend: 'onRotateEnd',\n pitchstart: 'onPitchStart',\n pitch: 'onPitch',\n pitchend: 'onPitchEnd'\n};\nconst otherEvents = {\n wheel: 'onWheel',\n boxzoomstart: 'onBoxZoomStart',\n boxzoomend: 'onBoxZoomEnd',\n boxzoomcancel: 'onBoxZoomCancel',\n resize: 'onResize',\n load: 'onLoad',\n render: 'onRender',\n idle: 'onIdle',\n remove: 'onRemove',\n data: 'onData',\n styledata: 'onStyleData',\n sourcedata: 'onSourceData',\n error: 'onError'\n};\nconst settingNames = [\n 'minZoom',\n 'maxZoom',\n 'minPitch',\n 'maxPitch',\n 'maxBounds',\n 'projection',\n 'renderWorldCopies'\n];\nconst handlerNames = [\n 'scrollZoom',\n 'boxZoom',\n 'dragRotate',\n 'dragPan',\n 'keyboard',\n 'doubleClickZoom',\n 'touchZoomRotate',\n 'touchPitch'\n];\n/**\n * A wrapper for mapbox-gl's Map class\n */\nclass Maplibre {\n constructor(MapClass, props, container) {\n // mapboxgl.Map instance\n this._map = null;\n // Internal states\n this._internalUpdate = false;\n this._hoveredFeatures = null;\n this._propsedCameraUpdate = null;\n this._styleComponents = {};\n this._onEvent = (e) => {\n // @ts-ignore\n const cb = this.props[otherEvents[e.type]];\n if (cb) {\n cb(e);\n }\n else if (e.type === 'error') {\n console.error(e.error); // eslint-disable-line\n }\n };\n this._onCameraEvent = (e) => {\n if (this._internalUpdate) {\n return;\n }\n e.viewState = this._propsedCameraUpdate || transformToViewState(this._map.transform);\n // @ts-ignore\n const cb = this.props[cameraEvents[e.type]];\n if (cb) {\n cb(e);\n }\n };\n this._onCameraUpdate = (tr) => {\n if (this._internalUpdate) {\n return tr;\n }\n this._propsedCameraUpdate = transformToViewState(tr);\n return applyViewStateToTransform(tr, this.props);\n };\n this._onPointerEvent = (e) => {\n if (e.type === 'mousemove' || e.type === 'mouseout') {\n this._updateHover(e);\n }\n // @ts-ignore\n const cb = this.props[pointerEvents[e.type]];\n if (cb) {\n if (this.props.interactiveLayerIds && e.type !== 'mouseover' && e.type !== 'mouseout') {\n e.features = this._hoveredFeatures || this._queryRenderedFeatures(e.point);\n }\n cb(e);\n delete e.features;\n }\n };\n this._MapClass = MapClass;\n this.props = props;\n this._initialize(container);\n }\n get map() {\n return this._map;\n }\n setProps(props) {\n const oldProps = this.props;\n this.props = props;\n const settingsChanged = this._updateSettings(props, oldProps);\n const sizeChanged = this._updateSize(props);\n const viewStateChanged = this._updateViewState(props);\n this._updateStyle(props, oldProps);\n this._updateStyleComponents(props);\n this._updateHandlers(props, oldProps);\n // If 1) view state has changed to match props and\n // 2) the props change is not triggered by map events,\n // it's driven by an external state change. Redraw immediately\n if (settingsChanged || sizeChanged || (viewStateChanged && !this._map.isMoving())) {\n this.redraw();\n }\n }\n static reuse(props, container) {\n const that = Maplibre.savedMaps.pop();\n if (!that) {\n return null;\n }\n const map = that.map;\n // When reusing the saved map, we need to reparent the map(canvas) and other child nodes\n // intoto the new container from the props.\n // Step 1: reparenting child nodes from old container to new container\n const oldContainer = map.getContainer();\n container.className = oldContainer.className;\n while (oldContainer.childNodes.length > 0) {\n container.appendChild(oldContainer.childNodes[0]);\n }\n // Step 2: replace the internal container with new container from the react component\n // @ts-ignore\n map._container = container;\n // With maplibre-gl as mapLib, map uses ResizeObserver to observe when its container resizes.\n // When reusing the saved map, we need to disconnect the observer and observe the new container.\n // Step 3: telling the ResizeObserver to disconnect and observe the new container\n // @ts-ignore\n const resizeObserver = map._resizeObserver;\n if (resizeObserver) {\n resizeObserver.disconnect();\n resizeObserver.observe(container);\n }\n // Step 4: apply new props\n that.setProps({ ...props, styleDiffing: false });\n map.resize();\n const { initialViewState } = props;\n if (initialViewState) {\n if (initialViewState.bounds) {\n map.fitBounds(initialViewState.bounds, { ...initialViewState.fitBoundsOptions, duration: 0 });\n }\n else {\n that._updateViewState(initialViewState);\n }\n }\n // Simulate load event\n if (map.isStyleLoaded()) {\n map.fire('load');\n }\n else {\n map.once('style.load', () => map.fire('load'));\n }\n // Force reload\n // @ts-ignore\n map._update();\n return that;\n }\n /* eslint-disable complexity,max-statements */\n _initialize(container) {\n const { props } = this;\n const { mapStyle = DEFAULT_STYLE } = props;\n const mapOptions = {\n ...props,\n ...props.initialViewState,\n container,\n style: normalizeStyle(mapStyle)\n };\n const viewState = mapOptions.initialViewState || mapOptions.viewState || mapOptions;\n Object.assign(mapOptions, {\n center: [viewState.longitude || 0, viewState.latitude || 0],\n zoom: viewState.zoom || 0,\n pitch: viewState.pitch || 0,\n bearing: viewState.bearing || 0\n });\n if (props.gl) {\n // eslint-disable-next-line\n const getContext = HTMLCanvasElement.prototype.getContext;\n // Hijack canvas.getContext to return our own WebGLContext\n // This will be called inside the mapboxgl.Map constructor\n // @ts-expect-error\n HTMLCanvasElement.prototype.getContext = () => {\n // Unhijack immediately\n HTMLCanvasElement.prototype.getContext = getContext;\n return props.gl;\n };\n }\n const map = new this._MapClass(mapOptions);\n // Props that are not part of constructor options\n if (viewState.padding) {\n map.setPadding(viewState.padding);\n }\n if (props.cursor) {\n map.getCanvas().style.cursor = props.cursor;\n }\n // add listeners\n map.transformCameraUpdate = this._onCameraUpdate;\n map.on('style.load', () => {\n // Map style has changed, this would have wiped out all settings from props\n this._styleComponents = {\n light: map.getLight(),\n sky: map.getSky(),\n // @ts-ignore getProjection() does not exist in v4\n projection: map.getProjection?.(),\n terrain: map.getTerrain()\n };\n this._updateStyleComponents(this.props);\n });\n map.on('sourcedata', () => {\n // Some sources have loaded, we may need them to attach terrain\n this._updateStyleComponents(this.props);\n });\n for (const eventName in pointerEvents) {\n map.on(eventName, this._onPointerEvent);\n }\n for (const eventName in cameraEvents) {\n map.on(eventName, this._onCameraEvent);\n }\n for (const eventName in otherEvents) {\n map.on(eventName, this._onEvent);\n }\n this._map = map;\n }\n /* eslint-enable complexity,max-statements */\n recycle() {\n // Clean up unnecessary elements before storing for reuse.\n const container = this.map.getContainer();\n const children = container.querySelector('[mapboxgl-children]');\n children?.remove();\n Maplibre.savedMaps.push(this);\n }\n destroy() {\n this._map.remove();\n }\n // Force redraw the map now. Typically resize() and jumpTo() is reflected in the next\n // render cycle, which is managed by Mapbox's animation loop.\n // This removes the synchronization issue caused by requestAnimationFrame.\n redraw() {\n const map = this._map;\n // map._render will throw error if style does not exist\n // https://github.com/mapbox/mapbox-gl-js/blob/fb9fc316da14e99ff4368f3e4faa3888fb43c513\n // /src/ui/map.js#L1834\n if (map.style) {\n // cancel the scheduled update\n if (map._frame) {\n map._frame.cancel();\n map._frame = null;\n }\n // the order is important - render() may schedule another update\n map._render();\n }\n }\n /* Trigger map resize if size is controlled\n @param {object} nextProps\n @returns {bool} true if size has changed\n */\n _updateSize(nextProps) {\n // Check if size is controlled\n const { viewState } = nextProps;\n if (viewState) {\n const map = this._map;\n if (viewState.width !== map.transform.width || viewState.height !== map.transform.height) {\n map.resize();\n return true;\n }\n }\n return false;\n }\n // Adapted from map.jumpTo\n /* Update camera to match props\n @param {object} nextProps\n @param {bool} triggerEvents - should fire camera events\n @returns {bool} true if anything is changed\n */\n _updateViewState(nextProps) {\n const map = this._map;\n const tr = map.transform;\n const isMoving = map.isMoving();\n // Avoid manipulating the real transform when interaction/animation is ongoing\n // as it would interfere with Mapbox's handlers\n if (!isMoving) {\n const changes = applyViewStateToTransform(tr, nextProps);\n if (Object.keys(changes).length > 0) {\n this._internalUpdate = true;\n map.jumpTo(changes);\n this._internalUpdate = false;\n return true;\n }\n }\n return false;\n }\n /* Update camera constraints and projection settings to match props\n @param {object} nextProps\n @param {object} currProps\n @returns {bool} true if anything is changed\n */\n _updateSettings(nextProps, currProps) {\n const map = this._map;\n let changed = false;\n for (const propName of settingNames) {\n if (propName in nextProps && !deepEqual(nextProps[propName], currProps[propName])) {\n changed = true;\n const setter = map[`set${propName[0].toUpperCase()}${propName.slice(1)}`];\n setter?.call(map, nextProps[propName]);\n }\n }\n return changed;\n }\n /* Update map style to match props */\n _updateStyle(nextProps, currProps) {\n if (nextProps.cursor !== currProps.cursor) {\n this._map.getCanvas().style.cursor = nextProps.cursor || '';\n }\n if (nextProps.mapStyle !== currProps.mapStyle) {\n const { mapStyle = DEFAULT_STYLE, styleDiffing = true } = nextProps;\n const options = {\n diff: styleDiffing\n };\n if ('localIdeographFontFamily' in nextProps) {\n // @ts-ignore Mapbox specific prop\n options.localIdeographFontFamily = nextProps.localIdeographFontFamily;\n }\n this._map.setStyle(normalizeStyle(mapStyle), options);\n }\n }\n /* Update fog, light, projection and terrain to match props\n * These props are special because\n * 1. They can not be applied right away. Certain conditions (style loaded, source loaded, etc.) must be met\n * 2. They can be overwritten by mapStyle\n */\n _updateStyleComponents({ light, projection, sky, terrain }) {\n const map = this._map;\n const currProps = this._styleComponents;\n // We can safely manipulate map style once it's loaded\n if (map.style._loaded) {\n if (light && !deepEqual(light, currProps.light)) {\n currProps.light = light;\n map.setLight(light);\n }\n if (projection &&\n !deepEqual(projection, currProps.projection) &&\n projection !== currProps.projection?.type) {\n currProps.projection = typeof projection === 'string' ? { type: projection } : projection;\n // @ts-ignore setProjection does not exist in v4\n map.setProjection?.(currProps.projection);\n }\n if (sky && !deepEqual(sky, currProps.sky)) {\n currProps.sky = sky;\n map.setSky(sky);\n }\n if (terrain !== undefined && !deepEqual(terrain, currProps.terrain)) {\n if (!terrain || map.getSource(terrain.source)) {\n currProps.terrain = terrain;\n map.setTerrain(terrain);\n }\n }\n }\n }\n /* Update interaction handlers to match props */\n _updateHandlers(nextProps, currProps) {\n const map = this._map;\n for (const propName of handlerNames) {\n const newValue = nextProps[propName] ?? true;\n const oldValue = currProps[propName] ?? true;\n if (!deepEqual(newValue, oldValue)) {\n if (newValue) {\n map[propName].enable(newValue);\n }\n else {\n map[propName].disable();\n }\n }\n }\n }\n _queryRenderedFeatures(point) {\n const map = this._map;\n const { interactiveLayerIds = [] } = this.props;\n try {\n return map.queryRenderedFeatures(point, {\n layers: interactiveLayerIds.filter(map.getLayer.bind(map))\n });\n }\n catch {\n // May fail if style is not loaded\n return [];\n }\n }\n _updateHover(e) {\n const { props } = this;\n const shouldTrackHoveredFeatures = props.interactiveLayerIds && (props.onMouseMove || props.onMouseEnter || props.onMouseLeave);\n if (shouldTrackHoveredFeatures) {\n const eventType = e.type;\n const wasHovering = this._hoveredFeatures?.length > 0;\n const features = this._queryRenderedFeatures(e.point);\n const isHovering = features.length > 0;\n if (!isHovering && wasHovering) {\n e.type = 'mouseleave';\n this._onPointerEvent(e);\n }\n this._hoveredFeatures = features;\n if (isHovering && !wasHovering) {\n e.type = 'mouseenter';\n this._onPointerEvent(e);\n }\n e.type = eventType;\n }\n else {\n this._hoveredFeatures = null;\n }\n }\n}\nMaplibre.savedMaps = [];\nexport default Maplibre;\n//# sourceMappingURL=maplibre.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;AAGA,MAAM,gBAAgB;CAAE,SAAS;CAAG,SAAS,EAAE;CAAE,QAAQ,EAAE;CAAE;AAC7D,MAAM,gBAAgB;CAClB,WAAW;CACX,SAAS;CACT,WAAW;CACX,WAAW;CACX,OAAO;CACP,UAAU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C,uBAAuB,OAAO;EAC1B,MAAM,MAAM,KAAK;EACjB,MAAM,EAAE,sBAAsB,EAAE,KAAK,KAAK;AAC1C,MAAI;AACA,UAAO,IAAI,sBAAsB,OAAO,EACpC,QAAQ,oBAAoB,OAAO,IAAI,SAAS,KAAK,IAAI,CAAC,EAC7D,CAAC;UAEA;AAEF,UAAO,EAAE;;;CAGjB,aAAa,GAAG;EACZ,MAAM,EAAE,UAAU;AAElB,MADmC,MAAM,wBAAwB,MAAM,eAAe,MAAM,gBAAgB,MAAM,eAClF;GAC5B,MAAM,YAAY,EAAE;GACpB,MAAM,cAAc,KAAK,kBAAkB,SAAS;GACpD,MAAM,WAAW,KAAK,uBAAuB,EAAE,MAAM;GACrD,MAAM,aAAa,SAAS,SAAS;AACrC,OAAI,CAAC,cAAc,aAAa;AAC5B,MAAE,OAAO;AACT,SAAK,gBAAgB,EAAE;;AAE3B,QAAK,mBAAmB;AACxB,OAAI,cAAc,CAAC,aAAa;AAC5B,MAAE,OAAO;AACT,SAAK,gBAAgB,EAAE;;AAE3B,KAAE,OAAO;QAGT,MAAK,mBAAmB;;;AAIpC,SAAS,YAAY,EAAE;AACvB,uBAAe"}
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+
14
+ //#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/apply-react-style.js
15
+ const unitlessNumber = /box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;
16
+ function applyReactStyle(element, styles) {
17
+ if (!element || !styles) return;
18
+ const style = element.style;
19
+ for (const key in styles) {
20
+ const value = styles[key];
21
+ if (Number.isFinite(value) && !unitlessNumber.test(key)) style[key] = `${value}px`;
22
+ else style[key] = value;
23
+ }
24
+ }
25
+
26
+ //#endregion
27
+ export { applyReactStyle };
28
+ //# sourceMappingURL=apply-react-style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-react-style.js","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/apply-react-style.js"],"sourcesContent":["// This is a simplified version of\n// https://github.com/facebook/react/blob/4131af3e4bf52f3a003537ec95a1655147c81270/src/renderers/dom/shared/CSSPropertyOperations.js#L62\nconst unitlessNumber = /box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;\nexport function applyReactStyle(element, styles) {\n if (!element || !styles) {\n return;\n }\n const style = element.style;\n for (const key in styles) {\n const value = styles[key];\n if (Number.isFinite(value) && !unitlessNumber.test(key)) {\n style[key] = `${value}px`;\n }\n else {\n style[key] = value;\n }\n }\n}\n//# sourceMappingURL=apply-react-style.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;AAEA,MAAM,iBAAiB;AACvB,SAAgB,gBAAgB,SAAS,QAAQ;AAC7C,KAAI,CAAC,WAAW,CAAC,OACb;CAEJ,MAAM,QAAQ,QAAQ;AACtB,MAAK,MAAM,OAAO,QAAQ;EACtB,MAAM,QAAQ,OAAO;AACrB,MAAI,OAAO,SAAS,MAAM,IAAI,CAAC,eAAe,KAAK,IAAI,CACnD,OAAM,OAAO,GAAG,MAAM;MAGtB,OAAM,OAAO"}
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+
14
+ //#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/compare-class-names.js
15
+ /** Compare two classNames string and return the difference */
16
+ function compareClassNames(prevClassName, nextClassName) {
17
+ if (prevClassName === nextClassName) return null;
18
+ const prevClassList = getClassList(prevClassName);
19
+ const nextClassList = getClassList(nextClassName);
20
+ const diff = [];
21
+ for (const c of nextClassList) if (!prevClassList.has(c)) diff.push(c);
22
+ for (const c of prevClassList) if (!nextClassList.has(c)) diff.push(c);
23
+ return diff.length === 0 ? null : diff;
24
+ }
25
+ function getClassList(className) {
26
+ return new Set(className ? className.trim().split(/\s+/) : []);
27
+ }
28
+
29
+ //#endregion
30
+ export { compareClassNames };
31
+ //# sourceMappingURL=compare-class-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compare-class-names.js","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/compare-class-names.js"],"sourcesContent":["/** Compare two classNames string and return the difference */\nexport function compareClassNames(prevClassName, nextClassName) {\n if (prevClassName === nextClassName) {\n return null;\n }\n const prevClassList = getClassList(prevClassName);\n const nextClassList = getClassList(nextClassName);\n const diff = [];\n for (const c of nextClassList) {\n if (!prevClassList.has(c)) {\n diff.push(c);\n }\n }\n for (const c of prevClassList) {\n if (!nextClassList.has(c)) {\n diff.push(c);\n }\n }\n return diff.length === 0 ? null : diff;\n}\nfunction getClassList(className) {\n return new Set(className ? className.trim().split(/\\s+/) : []);\n}\n//# sourceMappingURL=compare-class-names.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;AACA,SAAgB,kBAAkB,eAAe,eAAe;AAC5D,KAAI,kBAAkB,cAClB,QAAO;CAEX,MAAM,gBAAgB,aAAa,cAAc;CACjD,MAAM,gBAAgB,aAAa,cAAc;CACjD,MAAM,OAAO,EAAE;AACf,MAAK,MAAM,KAAK,cACZ,KAAI,CAAC,cAAc,IAAI,EAAE,CACrB,MAAK,KAAK,EAAE;AAGpB,MAAK,MAAM,KAAK,cACZ,KAAI,CAAC,cAAc,IAAI,EAAE,CACrB,MAAK,KAAK,EAAE;AAGpB,QAAO,KAAK,WAAW,IAAI,OAAO;;AAEtC,SAAS,aAAa,WAAW;AAC7B,QAAO,IAAI,IAAI,YAAY,UAAU,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,CAAC"}
@@ -0,0 +1,57 @@
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+
14
+ //#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/deep-equal.js
15
+ /**
16
+ * Compare two points
17
+ * @param a
18
+ * @param b
19
+ * @returns true if the points are equal
20
+ */
21
+ function arePointsEqual(a, b) {
22
+ const ax = Array.isArray(a) ? a[0] : a ? a.x : 0;
23
+ const ay = Array.isArray(a) ? a[1] : a ? a.y : 0;
24
+ const bx = Array.isArray(b) ? b[0] : b ? b.x : 0;
25
+ const by = Array.isArray(b) ? b[1] : b ? b.y : 0;
26
+ return ax === bx && ay === by;
27
+ }
28
+ /**
29
+ * Compare any two objects
30
+ * @param a
31
+ * @param b
32
+ * @returns true if the objects are deep equal
33
+ */
34
+ function deepEqual(a, b) {
35
+ if (a === b) return true;
36
+ if (!a || !b) return false;
37
+ if (Array.isArray(a)) {
38
+ if (!Array.isArray(b) || a.length !== b.length) return false;
39
+ for (let i = 0; i < a.length; i++) if (!deepEqual(a[i], b[i])) return false;
40
+ return true;
41
+ } else if (Array.isArray(b)) return false;
42
+ if (typeof a === "object" && typeof b === "object") {
43
+ const aKeys = Object.keys(a);
44
+ const bKeys = Object.keys(b);
45
+ if (aKeys.length !== bKeys.length) return false;
46
+ for (const key of aKeys) {
47
+ if (!b.hasOwnProperty(key)) return false;
48
+ if (!deepEqual(a[key], b[key])) return false;
49
+ }
50
+ return true;
51
+ }
52
+ return false;
53
+ }
54
+
55
+ //#endregion
56
+ export { arePointsEqual, deepEqual };
57
+ //# sourceMappingURL=deep-equal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deep-equal.js","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/deep-equal.js"],"sourcesContent":["/**\n * Compare two points\n * @param a\n * @param b\n * @returns true if the points are equal\n */\nexport function arePointsEqual(a, b) {\n const ax = Array.isArray(a) ? a[0] : a ? a.x : 0;\n const ay = Array.isArray(a) ? a[1] : a ? a.y : 0;\n const bx = Array.isArray(b) ? b[0] : b ? b.x : 0;\n const by = Array.isArray(b) ? b[1] : b ? b.y : 0;\n return ax === bx && ay === by;\n}\n/* eslint-disable complexity */\n/**\n * Compare any two objects\n * @param a\n * @param b\n * @returns true if the objects are deep equal\n */\nexport function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n else if (Array.isArray(b)) {\n return false;\n }\n if (typeof a === 'object' && typeof b === 'object') {\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n for (const key of aKeys) {\n if (!b.hasOwnProperty(key)) {\n return false;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n//# sourceMappingURL=deep-equal.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;AAMA,SAAgB,eAAe,GAAG,GAAG;CACjC,MAAM,KAAK,MAAM,QAAQ,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,IAAI;CAC/C,MAAM,KAAK,MAAM,QAAQ,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,IAAI;CAC/C,MAAM,KAAK,MAAM,QAAQ,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,IAAI;CAC/C,MAAM,KAAK,MAAM,QAAQ,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,IAAI;AAC/C,QAAO,OAAO,MAAM,OAAO;;;;;;;;AAS/B,SAAgB,UAAU,GAAG,GAAG;AAC5B,KAAI,MAAM,EACN,QAAO;AAEX,KAAI,CAAC,KAAK,CAAC,EACP,QAAO;AAEX,KAAI,MAAM,QAAQ,EAAE,EAAE;AAClB,MAAI,CAAC,MAAM,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,OACpC,QAAO;AAEX,OAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,IAC1B,KAAI,CAAC,UAAU,EAAE,IAAI,EAAE,GAAG,CACtB,QAAO;AAGf,SAAO;YAEF,MAAM,QAAQ,EAAE,CACrB,QAAO;AAEX,KAAI,OAAO,MAAM,YAAY,OAAO,MAAM,UAAU;EAChD,MAAM,QAAQ,OAAO,KAAK,EAAE;EAC5B,MAAM,QAAQ,OAAO,KAAK,EAAE;AAC5B,MAAI,MAAM,WAAW,MAAM,OACvB,QAAO;AAEX,OAAK,MAAM,OAAO,OAAO;AACrB,OAAI,CAAC,EAAE,eAAe,IAAI,CACtB,QAAO;AAEX,OAAI,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,CAC1B,QAAO;;AAGf,SAAO;;AAEX,QAAO"}
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+
14
+ //#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/set-globals.js
15
+ function setGlobals(mapLib, props) {
16
+ const { RTLTextPlugin, maxParallelImageRequests, workerCount, workerUrl } = props;
17
+ if (RTLTextPlugin && mapLib.getRTLTextPluginStatus && mapLib.getRTLTextPluginStatus() === "unavailable") {
18
+ const { pluginUrl, lazy = true } = typeof RTLTextPlugin === "string" ? { pluginUrl: RTLTextPlugin } : RTLTextPlugin;
19
+ mapLib.setRTLTextPlugin(pluginUrl, (error) => {
20
+ if (error) console.error(error);
21
+ }, lazy);
22
+ }
23
+ if (maxParallelImageRequests !== void 0) mapLib.setMaxParallelImageRequests(maxParallelImageRequests);
24
+ if (workerCount !== void 0) mapLib.setWorkerCount(workerCount);
25
+ if (workerUrl !== void 0) mapLib.setWorkerUrl(workerUrl);
26
+ }
27
+
28
+ //#endregion
29
+ export { setGlobals as default };
30
+ //# sourceMappingURL=set-globals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-globals.js","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/set-globals.js"],"sourcesContent":["export default function setGlobals(mapLib, props) {\n const { RTLTextPlugin, maxParallelImageRequests, workerCount, workerUrl } = props;\n if (RTLTextPlugin &&\n mapLib.getRTLTextPluginStatus &&\n mapLib.getRTLTextPluginStatus() === 'unavailable') {\n const { pluginUrl, lazy = true } = typeof RTLTextPlugin === 'string' ? { pluginUrl: RTLTextPlugin } : RTLTextPlugin;\n mapLib.setRTLTextPlugin(pluginUrl, (error) => {\n if (error) {\n // eslint-disable-next-line\n console.error(error);\n }\n }, lazy);\n }\n if (maxParallelImageRequests !== undefined) {\n mapLib.setMaxParallelImageRequests(maxParallelImageRequests);\n }\n if (workerCount !== undefined) {\n mapLib.setWorkerCount(workerCount);\n }\n if (workerUrl !== undefined) {\n mapLib.setWorkerUrl(workerUrl);\n }\n}\n//# sourceMappingURL=set-globals.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;AAAA,SAAwB,WAAW,QAAQ,OAAO;CAC9C,MAAM,EAAE,eAAe,0BAA0B,aAAa,cAAc;AAC5E,KAAI,iBACA,OAAO,0BACP,OAAO,wBAAwB,KAAK,eAAe;EACnD,MAAM,EAAE,WAAW,OAAO,SAAS,OAAO,kBAAkB,WAAW,EAAE,WAAW,eAAe,GAAG;AACtG,SAAO,iBAAiB,YAAY,UAAU;AAC1C,OAAI,MAEA,SAAQ,MAAM,MAAM;KAEzB,KAAK;;AAEZ,KAAI,6BAA6B,OAC7B,QAAO,4BAA4B,yBAAyB;AAEhE,KAAI,gBAAgB,OAChB,QAAO,eAAe,YAAY;AAEtC,KAAI,cAAc,OACd,QAAO,aAAa,UAAU"}
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+
14
+ //#region ../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/style-utils.js
15
+ const refProps = [
16
+ "type",
17
+ "source",
18
+ "source-layer",
19
+ "minzoom",
20
+ "maxzoom",
21
+ "filter",
22
+ "layout"
23
+ ];
24
+ function normalizeStyle(style) {
25
+ if (!style) return null;
26
+ if (typeof style === "string") return style;
27
+ if ("toJS" in style) style = style.toJS();
28
+ if (!style.layers) return style;
29
+ const layerIndex = {};
30
+ for (const layer of style.layers) layerIndex[layer.id] = layer;
31
+ const layers = style.layers.map((layer) => {
32
+ let normalizedLayer = null;
33
+ if ("interactive" in layer) {
34
+ normalizedLayer = Object.assign({}, layer);
35
+ delete normalizedLayer.interactive;
36
+ }
37
+ const layerRef = layerIndex[layer.ref];
38
+ if (layerRef) {
39
+ normalizedLayer = normalizedLayer || Object.assign({}, layer);
40
+ delete normalizedLayer.ref;
41
+ for (const propName of refProps) if (propName in layerRef) normalizedLayer[propName] = layerRef[propName];
42
+ }
43
+ return normalizedLayer || layer;
44
+ });
45
+ return {
46
+ ...style,
47
+ layers
48
+ };
49
+ }
50
+
51
+ //#endregion
52
+ export { normalizeStyle };
53
+ //# sourceMappingURL=style-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-utils.js","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vis.gl+react-maplibre@8.1.0_maplibre-gl@5.15.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@vis.gl/react-maplibre/dist/utils/style-utils.js"],"sourcesContent":["const refProps = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n// Prepare a map style object for diffing\n// If immutable - convert to plain object\n// Work around some issues in older styles that would fail Mapbox's diffing\nexport function normalizeStyle(style) {\n if (!style) {\n return null;\n }\n if (typeof style === 'string') {\n return style;\n }\n if ('toJS' in style) {\n style = style.toJS();\n }\n if (!style.layers) {\n return style;\n }\n const layerIndex = {};\n for (const layer of style.layers) {\n layerIndex[layer.id] = layer;\n }\n const layers = style.layers.map(layer => {\n let normalizedLayer = null;\n if ('interactive' in layer) {\n normalizedLayer = Object.assign({}, layer);\n // Breaks style diffing :(\n // @ts-ignore legacy field not typed\n delete normalizedLayer.interactive;\n }\n // Style diffing doesn't work with refs so expand them out manually before diffing.\n // @ts-ignore legacy field not typed\n const layerRef = layerIndex[layer.ref];\n if (layerRef) {\n normalizedLayer = normalizedLayer || Object.assign({}, layer);\n // @ts-ignore\n delete normalizedLayer.ref;\n // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/deref.js\n for (const propName of refProps) {\n if (propName in layerRef) {\n normalizedLayer[propName] = layerRef[propName];\n }\n }\n }\n return normalizedLayer || layer;\n });\n // Do not mutate the style object provided by the user\n return { ...style, layers };\n}\n//# sourceMappingURL=style-utils.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;AAAA,MAAM,WAAW;CAAC;CAAQ;CAAU;CAAgB;CAAW;CAAW;CAAU;CAAS;AAI7F,SAAgB,eAAe,OAAO;AAClC,KAAI,CAAC,MACD,QAAO;AAEX,KAAI,OAAO,UAAU,SACjB,QAAO;AAEX,KAAI,UAAU,MACV,SAAQ,MAAM,MAAM;AAExB,KAAI,CAAC,MAAM,OACP,QAAO;CAEX,MAAM,aAAa,EAAE;AACrB,MAAK,MAAM,SAAS,MAAM,OACtB,YAAW,MAAM,MAAM;CAE3B,MAAM,SAAS,MAAM,OAAO,KAAI,UAAS;EACrC,IAAI,kBAAkB;AACtB,MAAI,iBAAiB,OAAO;AACxB,qBAAkB,OAAO,OAAO,EAAE,EAAE,MAAM;AAG1C,UAAO,gBAAgB;;EAI3B,MAAM,WAAW,WAAW,MAAM;AAClC,MAAI,UAAU;AACV,qBAAkB,mBAAmB,OAAO,OAAO,EAAE,EAAE,MAAM;AAE7D,UAAO,gBAAgB;AAEvB,QAAK,MAAM,YAAY,SACnB,KAAI,YAAY,SACZ,iBAAgB,YAAY,SAAS;;AAIjD,SAAO,mBAAmB;GAC5B;AAEF,QAAO;EAAE,GAAG;EAAO;EAAQ"}