@accelint/map-toolkit 0.5.0 → 0.6.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 (145) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/catalog-info.yaml +5 -3
  3. package/dist/camera/use-camera-state.js +1 -2
  4. package/dist/camera/use-camera-state.js.map +1 -1
  5. package/dist/deckgl/base-map/constants.d.ts +9 -2
  6. package/dist/deckgl/base-map/constants.js +9 -2
  7. package/dist/deckgl/base-map/constants.js.map +1 -1
  8. package/dist/deckgl/base-map/index.d.ts +4 -2
  9. package/dist/deckgl/base-map/index.js +5 -6
  10. package/dist/deckgl/base-map/index.js.map +1 -1
  11. package/dist/deckgl/base-map/types.d.ts +6 -1
  12. package/dist/deckgl/index.d.ts +8 -2
  13. package/dist/deckgl/index.js +6 -2
  14. package/dist/deckgl/saved-viewports/index.d.ts +1 -1
  15. package/dist/deckgl/saved-viewports/index.js +1 -2
  16. package/dist/deckgl/saved-viewports/index.js.map +1 -1
  17. package/dist/deckgl/shapes/display-shape-layer/constants.d.ts +44 -0
  18. package/dist/deckgl/shapes/display-shape-layer/constants.js +61 -0
  19. package/dist/deckgl/shapes/display-shape-layer/constants.js.map +1 -0
  20. package/dist/{node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/assert.js → deckgl/shapes/display-shape-layer/fiber.d.ts} +11 -7
  21. package/dist/{packages/hotkey-manager/dist/lib/is-client/index.js → deckgl/shapes/display-shape-layer/fiber.js} +6 -7
  22. package/dist/deckgl/shapes/display-shape-layer/fiber.js.map +1 -0
  23. package/dist/deckgl/shapes/display-shape-layer/index.d.ts +206 -0
  24. package/dist/deckgl/shapes/display-shape-layer/index.js +416 -0
  25. package/dist/deckgl/shapes/display-shape-layer/index.js.map +1 -0
  26. package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.d.ts +66 -0
  27. package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.js +116 -0
  28. package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.js.map +1 -0
  29. package/dist/deckgl/shapes/display-shape-layer/store.d.ts +87 -0
  30. package/dist/deckgl/shapes/display-shape-layer/store.js +316 -0
  31. package/dist/deckgl/shapes/display-shape-layer/store.js.map +1 -0
  32. package/dist/deckgl/shapes/display-shape-layer/types.d.ts +115 -0
  33. package/dist/{node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fly-to-viewport.js → deckgl/shapes/display-shape-layer/types.js} +0 -2
  34. package/dist/deckgl/shapes/display-shape-layer/use-shape-selection.d.ts +89 -0
  35. package/dist/deckgl/shapes/display-shape-layer/use-shape-selection.js +88 -0
  36. package/dist/deckgl/shapes/display-shape-layer/use-shape-selection.js.map +1 -0
  37. package/dist/deckgl/shapes/display-shape-layer/utils/display-style.d.ts +61 -0
  38. package/dist/deckgl/shapes/display-shape-layer/utils/display-style.js +111 -0
  39. package/dist/deckgl/shapes/display-shape-layer/utils/display-style.js.map +1 -0
  40. package/dist/deckgl/shapes/display-shape-layer/utils/labels.d.ts +196 -0
  41. package/dist/deckgl/shapes/display-shape-layer/utils/labels.js +368 -0
  42. package/dist/deckgl/shapes/display-shape-layer/utils/labels.js.map +1 -0
  43. package/dist/deckgl/shapes/index.d.ts +20 -0
  44. package/dist/{node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/math-utils.js → deckgl/shapes/index.js} +6 -11
  45. package/dist/deckgl/shapes/shared/constants.d.ts +78 -0
  46. package/dist/deckgl/shapes/shared/constants.js +109 -0
  47. package/dist/deckgl/shapes/shared/constants.js.map +1 -0
  48. package/dist/deckgl/shapes/shared/events.d.ts +73 -0
  49. package/dist/deckgl/shapes/shared/events.js +58 -0
  50. package/dist/deckgl/shapes/shared/events.js.map +1 -0
  51. package/dist/deckgl/shapes/shared/types.d.ts +158 -0
  52. package/dist/{node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/get-bounds.js → deckgl/shapes/shared/types.js} +13 -4
  53. package/dist/deckgl/shapes/shared/types.js.map +1 -0
  54. package/dist/deckgl/symbol-layer/index.d.ts +1 -1
  55. package/dist/viewport/viewport-size.d.ts +2 -2
  56. package/package.json +36 -20
  57. package/dist/_virtual/rolldown_runtime.js +0 -22
  58. package/dist/decorators/deckgl.d.ts +0 -19
  59. package/dist/decorators/deckgl.js +0 -32
  60. package/dist/decorators/deckgl.js.map +0 -1
  61. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/assert.js.map +0 -1
  62. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fit-bounds.js +0 -63
  63. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fit-bounds.js.map +0 -1
  64. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/get-bounds.js.map +0 -1
  65. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/index.js +0 -19
  66. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/math-utils.js.map +0 -1
  67. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/normalize-viewport-props.js +0 -14
  68. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-utils.js +0 -59
  69. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-utils.js.map +0 -1
  70. package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/web-mercator-viewport.js +0 -16
  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/attribution-control.js +0 -29
  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/attribution-control.js.map +0 -1
  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/fullscreen-control.js +0 -29
  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/fullscreen-control.js.map +0 -1
  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/geolocate-control.js +0 -54
  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/geolocate-control.js.map +0 -1
  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/layer.js +0 -15
  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/logo-control.js +0 -29
  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/logo-control.js.map +0 -1
  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/map.js +0 -91
  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/components/map.js.map +0 -1
  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/components/marker.js +0 -88
  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/components/marker.js.map +0 -1
  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/components/navigation-control.js +0 -29
  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/components/navigation-control.js.map +0 -1
  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/components/popup.js +0 -69
  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/components/popup.js.map +0 -1
  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/components/scale-control.js +0 -35
  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/components/scale-control.js.map +0 -1
  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/components/source.js +0 -15
  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/components/terrain-control.js +0 -29
  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/components/terrain-control.js.map +0 -1
  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/components/use-control.js +0 -40
  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/components/use-control.js.map +0 -1
  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/components/use-map.js +0 -23
  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/components/use-map.js.map +0 -1
  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/index.js +0 -27
  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/maplibre/create-ref.js +0 -57
  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/maplibre/create-ref.js.map +0 -1
  100. 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 +0 -343
  101. 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 +0 -1
  102. 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 +0 -28
  103. 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 +0 -1
  104. 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 +0 -31
  105. 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 +0 -1
  106. 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 +0 -57
  107. 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 +0 -1
  108. 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 +0 -30
  109. 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 +0 -1
  110. 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 +0 -53
  111. 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 +0 -1
  112. 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 +0 -52
  113. 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 +0 -1
  114. 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 +0 -22
  115. 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 +0 -1
  116. package/dist/node_modules/.pnpm/immer@10.2.0/node_modules/immer/dist/immer.js +0 -812
  117. package/dist/node_modules/.pnpm/immer@10.2.0/node_modules/immer/dist/immer.js.map +0 -1
  118. package/dist/node_modules/.pnpm/radashi@12.7.1/node_modules/radashi/dist/radashi.js +0 -35
  119. package/dist/node_modules/.pnpm/radashi@12.7.1/node_modules/radashi/dist/radashi.js.map +0 -1
  120. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.development.js +0 -195
  121. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.development.js.map +0 -1
  122. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.production.js +0 -76
  123. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/cjs/react-dom.production.js.map +0 -1
  124. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/index.js +0 -39
  125. package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/index.js.map +0 -1
  126. 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 +0 -16
  127. 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 +0 -27
  128. 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 +0 -1
  129. 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 +0 -45
  130. 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 +0 -1
  131. package/dist/packages/hotkey-manager/dist/actions/register-hotkey/index.js +0 -78
  132. package/dist/packages/hotkey-manager/dist/actions/register-hotkey/index.js.map +0 -1
  133. package/dist/packages/hotkey-manager/dist/constants.js +0 -47
  134. package/dist/packages/hotkey-manager/dist/constants.js.map +0 -1
  135. package/dist/packages/hotkey-manager/dist/enums/keycode.js +0 -130
  136. package/dist/packages/hotkey-manager/dist/enums/keycode.js.map +0 -1
  137. package/dist/packages/hotkey-manager/dist/lib/is-client/index.js.map +0 -1
  138. package/dist/packages/hotkey-manager/dist/lib/is-mac/index.js +0 -24
  139. package/dist/packages/hotkey-manager/dist/lib/is-mac/index.js.map +0 -1
  140. package/dist/packages/hotkey-manager/dist/lib/key-to-id/index.js +0 -39
  141. package/dist/packages/hotkey-manager/dist/lib/key-to-id/index.js.map +0 -1
  142. package/dist/packages/hotkey-manager/dist/lib/key-to-string/index.js +0 -27
  143. package/dist/packages/hotkey-manager/dist/lib/key-to-string/index.js.map +0 -1
  144. package/dist/packages/hotkey-manager/dist/stores/hotkey-store/index.js +0 -95
  145. package/dist/packages/hotkey-manager/dist/stores/hotkey-store/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../../../../hotkey-manager/dist/lib/key-to-string/index.js"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n\n//#region src/lib/key-to-string/index.ts\nfunction keyToString(key) {\n\treturn [\n\t\tkey.ctrl ? \"[CTRL]\" : void 0,\n\t\tkey.meta ? \"[Win/⌘]\" : void 0,\n\t\tkey.alt ? \"[ALT]\" : void 0,\n\t\tkey.shift ? \"[SHIFT]\" : void 0,\n\t\t`[${key.code}]`\n\t].filter(Boolean).join(\" + \");\n}\n\n//#endregion\nexport { keyToString };\n//# sourceMappingURL=index.js.map"],"mappings":";;;;;;;;;;;;;;AAcA,SAAS,YAAY,KAAK;AACzB,QAAO;EACN,IAAI,OAAO,WAAW,KAAK;EAC3B,IAAI,OAAO,YAAY,KAAK;EAC5B,IAAI,MAAM,UAAU,KAAK;EACzB,IAAI,QAAQ,YAAY,KAAK;EAC7B,IAAI,IAAI,KAAK;EACb,CAAC,OAAO,QAAQ,CAAC,KAAK,MAAM"}
@@ -1,95 +0,0 @@
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 { keyToString } from "../../lib/key-to-string/index.js";
15
- import { enableMapSet } from "../../../../../node_modules/.pnpm/immer@10.2.0/node_modules/immer/dist/immer.js";
16
- import { immer } from "../../../../../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";
17
- import { createStore } from "../../../../../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";
18
-
19
- //#region ../hotkey-manager/dist/stores/hotkey-store/index.js
20
- enableMapSet();
21
- const hotkeyStore = createStore()(immer((set, get) => ({
22
- allHotkeys: /* @__PURE__ */ new Map(),
23
- registeredKeyCombinations: /* @__PURE__ */ new Map(),
24
- activeKeyCombinations: /* @__PURE__ */ new Map(),
25
- hotkeyActivations: /* @__PURE__ */ new Map(),
26
- registerHotkey: (config) => set((state) => {
27
- if (state.allHotkeys.has(config.id)) throw new TypeError(`Hotkey with id ${config.id} has already been registered.`);
28
- state.allHotkeys.set(config.id, config);
29
- for (const key of config.key) {
30
- if (!config.ignoreConflicts && state.registeredKeyCombinations.has(key.id)) {
31
- const ids = state.registeredKeyCombinations.get(key.id);
32
- console.warn(`Hotkey with the combination ${keyToString(key)} already registered to ${ids.join(", ")}`);
33
- }
34
- state.registeredKeyCombinations.set(key.id, (state.registeredKeyCombinations.get(key.id) ?? []).concat(config.id));
35
- }
36
- }),
37
- unregisterHotkey: (id) => set((state) => {
38
- removeHotkeyFromRegisteredKeyCombinations(state, id);
39
- removeHotkeyFromActiveKeyCombinations(state, id);
40
- state.allHotkeys.delete(id);
41
- }),
42
- activateHotkey: (id, activationSymbol) => set((state) => {
43
- const config = state.allHotkeys.get(id);
44
- if (!config) return;
45
- for (const key of config.key) {
46
- const activated = state.activeKeyCombinations.get(key.id) ?? [];
47
- if (activated.includes(id)) continue;
48
- state.activeKeyCombinations.set(key.id, [...activated, id]);
49
- }
50
- const activations = state.hotkeyActivations.get(id) ?? [];
51
- if (activations.includes(activationSymbol)) return;
52
- state.hotkeyActivations.set(id, [...activations, activationSymbol]);
53
- }),
54
- deactivateHotkey: (id, registerSymbol) => set((state) => {
55
- const activations = state.hotkeyActivations.get(id) ?? [];
56
- if (!activations.includes(registerSymbol)) return;
57
- const newActivations = activations.filter((activation) => activation !== registerSymbol);
58
- if (newActivations.length > 0) {
59
- state.hotkeyActivations.set(id, newActivations);
60
- return;
61
- }
62
- state.hotkeyActivations.delete(id);
63
- removeHotkeyFromActiveKeyCombinations(state, id);
64
- }),
65
- forceDeactivateHotkey: (id) => set((state) => {
66
- state.hotkeyActivations.delete(id);
67
- removeHotkeyFromActiveKeyCombinations(state, id);
68
- }),
69
- getHotkeysForKeyCombination: (keyCombination) => {
70
- const state = get();
71
- const ids = state.activeKeyCombinations.get(keyCombination);
72
- if (!ids) return null;
73
- return ids.map((id) => state.allHotkeys.get(id)).filter(Boolean);
74
- }
75
- })));
76
- function removeHotkeyFromRegisteredKeyCombinations(state, id) {
77
- const config = state.allHotkeys.get(id);
78
- if (!config) return;
79
- for (const key of config.key) {
80
- const newRegistered = (state.registeredKeyCombinations.get(key.id) ?? []).filter((configId) => configId !== id);
81
- newRegistered.length === 0 ? state.registeredKeyCombinations.delete(key.id) : state.registeredKeyCombinations.set(key.id, newRegistered);
82
- }
83
- }
84
- function removeHotkeyFromActiveKeyCombinations(state, id) {
85
- const config = state.allHotkeys.get(id);
86
- if (!config) return;
87
- for (const key of config.key) {
88
- const newActive = (state.activeKeyCombinations.get(key.id) ?? []).filter((configId) => configId !== id);
89
- newActive.length === 0 ? state.activeKeyCombinations.delete(key.id) : state.activeKeyCombinations.set(key.id, newActive);
90
- }
91
- }
92
-
93
- //#endregion
94
- export { hotkeyStore };
95
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../../../../hotkey-manager/dist/stores/hotkey-store/index.js"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n\nimport { keyToString } from \"../../lib/key-to-string/index.js\";\nimport { enableMapSet } from \"immer\";\nimport { immer } from \"zustand/middleware/immer\";\nimport { createStore } from \"zustand/vanilla\";\n\n//#region src/stores/hotkey-store/index.ts\nenableMapSet();\nconst hotkeyStore = createStore()(immer((set, get) => ({\n\tallHotkeys: /* @__PURE__ */ new Map(),\n\tregisteredKeyCombinations: /* @__PURE__ */ new Map(),\n\tactiveKeyCombinations: /* @__PURE__ */ new Map(),\n\thotkeyActivations: /* @__PURE__ */ new Map(),\n\tregisterHotkey: (config) => set((state) => {\n\t\tif (state.allHotkeys.has(config.id)) throw new TypeError(`Hotkey with id ${config.id} has already been registered.`);\n\t\tstate.allHotkeys.set(config.id, config);\n\t\tfor (const key of config.key) {\n\t\t\tif (!config.ignoreConflicts && state.registeredKeyCombinations.has(key.id)) {\n\t\t\t\tconst ids = state.registeredKeyCombinations.get(key.id);\n\t\t\t\tconsole.warn(`Hotkey with the combination ${keyToString(key)} already registered to ${ids.join(\", \")}`);\n\t\t\t}\n\t\t\tstate.registeredKeyCombinations.set(key.id, (state.registeredKeyCombinations.get(key.id) ?? []).concat(config.id));\n\t\t}\n\t}),\n\tunregisterHotkey: (id) => set((state) => {\n\t\tremoveHotkeyFromRegisteredKeyCombinations(state, id);\n\t\tremoveHotkeyFromActiveKeyCombinations(state, id);\n\t\tstate.allHotkeys.delete(id);\n\t}),\n\tactivateHotkey: (id, activationSymbol) => set((state) => {\n\t\tconst config = state.allHotkeys.get(id);\n\t\tif (!config) return;\n\t\tfor (const key of config.key) {\n\t\t\tconst activated = state.activeKeyCombinations.get(key.id) ?? [];\n\t\t\tif (activated.includes(id)) continue;\n\t\t\tstate.activeKeyCombinations.set(key.id, [...activated, id]);\n\t\t}\n\t\tconst activations = state.hotkeyActivations.get(id) ?? [];\n\t\tif (activations.includes(activationSymbol)) return;\n\t\tstate.hotkeyActivations.set(id, [...activations, activationSymbol]);\n\t}),\n\tdeactivateHotkey: (id, registerSymbol) => set((state) => {\n\t\tconst activations = state.hotkeyActivations.get(id) ?? [];\n\t\tif (!activations.includes(registerSymbol)) return;\n\t\tconst newActivations = activations.filter((activation) => activation !== registerSymbol);\n\t\tif (newActivations.length > 0) {\n\t\t\tstate.hotkeyActivations.set(id, newActivations);\n\t\t\treturn;\n\t\t}\n\t\tstate.hotkeyActivations.delete(id);\n\t\tremoveHotkeyFromActiveKeyCombinations(state, id);\n\t}),\n\tforceDeactivateHotkey: (id) => set((state) => {\n\t\tstate.hotkeyActivations.delete(id);\n\t\tremoveHotkeyFromActiveKeyCombinations(state, id);\n\t}),\n\tgetHotkeysForKeyCombination: (keyCombination) => {\n\t\tconst state = get();\n\t\tconst ids = state.activeKeyCombinations.get(keyCombination);\n\t\tif (!ids) return null;\n\t\treturn ids.map((id) => state.allHotkeys.get(id)).filter(Boolean);\n\t}\n})));\nfunction removeHotkeyFromRegisteredKeyCombinations(state, id) {\n\tconst config = state.allHotkeys.get(id);\n\tif (!config) return;\n\tfor (const key of config.key) {\n\t\tconst newRegistered = (state.registeredKeyCombinations.get(key.id) ?? []).filter((configId) => configId !== id);\n\t\tnewRegistered.length === 0 ? state.registeredKeyCombinations.delete(key.id) : state.registeredKeyCombinations.set(key.id, newRegistered);\n\t}\n}\nfunction removeHotkeyFromActiveKeyCombinations(state, id) {\n\tconst config = state.allHotkeys.get(id);\n\tif (!config) return;\n\tfor (const key of config.key) {\n\t\tconst newActive = (state.activeKeyCombinations.get(key.id) ?? []).filter((configId) => configId !== id);\n\t\tnewActive.length === 0 ? state.activeKeyCombinations.delete(key.id) : state.activeKeyCombinations.set(key.id, newActive);\n\t}\n}\n\n//#endregion\nexport { hotkeyStore };\n//# sourceMappingURL=index.js.map"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,cA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