@accelint/map-toolkit 0.4.1 → 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.
- package/CHANGELOG.md +16 -0
- package/README.md +3 -0
- package/catalog-info.yaml +4 -3
- package/dist/_virtual/rolldown_runtime.js +22 -0
- package/dist/camera/events.d.ts +15 -0
- package/dist/camera/events.js +29 -0
- package/dist/camera/events.js.map +1 -0
- package/dist/camera/index.d.ts +16 -0
- package/dist/camera/index.js +17 -0
- package/dist/camera/types.d.ts +84 -0
- package/dist/camera/types.js +12 -0
- package/dist/camera/use-camera-state.d.ts +153 -0
- package/dist/camera/use-camera-state.js +419 -0
- package/dist/camera/use-camera-state.js.map +1 -0
- package/dist/cursor-coordinates/use-cursor-coordinates.js +1 -1
- package/dist/deckgl/base-map/constants.d.ts +6 -1
- package/dist/deckgl/base-map/constants.js +6 -1
- package/dist/deckgl/base-map/constants.js.map +1 -1
- package/dist/deckgl/base-map/controls.d.ts +34 -0
- package/dist/deckgl/base-map/controls.js +50 -0
- package/dist/deckgl/base-map/controls.js.map +1 -0
- package/dist/deckgl/base-map/events.d.ts +4 -0
- package/dist/deckgl/base-map/events.js +5 -1
- package/dist/deckgl/base-map/events.js.map +1 -1
- package/dist/deckgl/base-map/index.d.ts +6 -21
- package/dist/deckgl/base-map/index.js +82 -42
- package/dist/deckgl/base-map/index.js.map +1 -1
- package/dist/deckgl/base-map/types.d.ts +43 -2
- package/dist/deckgl/index.d.ts +5 -4
- package/dist/deckgl/index.js +2 -1
- package/dist/deckgl/saved-viewports/index.d.ts +32 -0
- package/dist/deckgl/saved-viewports/index.js +52 -0
- package/dist/deckgl/saved-viewports/index.js.map +1 -0
- package/dist/deckgl/saved-viewports/storage.d.ts +21 -0
- package/dist/deckgl/saved-viewports/storage.js +39 -0
- package/dist/deckgl/saved-viewports/storage.js.map +1 -0
- package/dist/maplibre/hooks/use-maplibre.d.ts +2 -2
- package/dist/maplibre/hooks/use-maplibre.js +2 -2
- package/dist/maplibre/hooks/use-maplibre.js.map +1 -1
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/assert.js +21 -0
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/assert.js.map +1 -0
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/fit-bounds.js +63 -0
- 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
- 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
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/get-bounds.js +20 -0
- 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
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/index.js +19 -0
- package/dist/node_modules/.pnpm/@math.gl_web-mercator@4.1.0/node_modules/@math.gl/web-mercator/dist/math-utils.js +25 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/immer@10.2.0/node_modules/immer/dist/immer.js +812 -0
- package/dist/node_modules/.pnpm/immer@10.2.0/node_modules/immer/dist/immer.js.map +1 -0
- package/dist/node_modules/.pnpm/radashi@12.7.1/node_modules/radashi/dist/radashi.js +35 -0
- package/dist/node_modules/.pnpm/radashi@12.7.1/node_modules/radashi/dist/radashi.js.map +1 -0
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/index.js +39 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/index.js.map +1 -0
- 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
- 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
- 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
- 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
- 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
- package/dist/packages/hotkey-manager/dist/actions/register-hotkey/index.js +78 -0
- package/dist/packages/hotkey-manager/dist/actions/register-hotkey/index.js.map +1 -0
- package/dist/packages/hotkey-manager/dist/constants.js +47 -0
- package/dist/packages/hotkey-manager/dist/constants.js.map +1 -0
- package/dist/packages/hotkey-manager/dist/enums/keycode.js +130 -0
- package/dist/packages/hotkey-manager/dist/enums/keycode.js.map +1 -0
- package/dist/packages/hotkey-manager/dist/lib/is-client/index.js +22 -0
- package/dist/packages/hotkey-manager/dist/lib/is-client/index.js.map +1 -0
- package/dist/packages/hotkey-manager/dist/lib/is-mac/index.js +24 -0
- package/dist/packages/hotkey-manager/dist/lib/is-mac/index.js.map +1 -0
- package/dist/packages/hotkey-manager/dist/lib/key-to-id/index.js +39 -0
- package/dist/packages/hotkey-manager/dist/lib/key-to-id/index.js.map +1 -0
- package/dist/packages/hotkey-manager/dist/lib/key-to-string/index.js +27 -0
- package/dist/packages/hotkey-manager/dist/lib/key-to-string/index.js.map +1 -0
- package/dist/packages/hotkey-manager/dist/stores/hotkey-store/index.js +95 -0
- package/dist/packages/hotkey-manager/dist/stores/hotkey-store/index.js.map +1 -0
- package/package.json +17 -6
|
@@ -0,0 +1,27 @@
|
|
|
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 ../hotkey-manager/dist/lib/key-to-string/index.js
|
|
15
|
+
function keyToString(key) {
|
|
16
|
+
return [
|
|
17
|
+
key.ctrl ? "[CTRL]" : void 0,
|
|
18
|
+
key.meta ? "[Win/⌘]" : void 0,
|
|
19
|
+
key.alt ? "[ALT]" : void 0,
|
|
20
|
+
key.shift ? "[SHIFT]" : void 0,
|
|
21
|
+
`[${key.code}]`
|
|
22
|
+
].filter(Boolean).join(" + ");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { keyToString };
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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":"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"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accelint/map-toolkit",
|
|
3
3
|
"description": "A collection of components and utilities to simplify visualizing and working with geospatial data.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"author": "https://hypergiant.com",
|
|
6
6
|
"$schema": "https://json.schemastore.org/package",
|
|
7
7
|
"devDependencies": {
|
|
@@ -45,24 +45,32 @@
|
|
|
45
45
|
"@accelint/bus": "3.0.2",
|
|
46
46
|
"@accelint/core": "0.5.2",
|
|
47
47
|
"@accelint/design-foundation": "2.0.0",
|
|
48
|
-
"@accelint/design-toolkit": "9.
|
|
49
|
-
"@accelint/
|
|
48
|
+
"@accelint/design-toolkit": "9.1.0",
|
|
49
|
+
"@accelint/postcss-tailwind-css-modules": "1.0.1",
|
|
50
50
|
"@accelint/typescript-config": "0.1.4",
|
|
51
|
-
"@accelint/vitest-config": "0.1.6"
|
|
51
|
+
"@accelint/vitest-config": "0.1.6",
|
|
52
|
+
"@accelint/geo": "0.4.2"
|
|
52
53
|
},
|
|
53
54
|
"engines": {
|
|
54
55
|
"node": ">=22",
|
|
55
56
|
"pnpm": ">=10"
|
|
56
57
|
},
|
|
57
58
|
"exports": {
|
|
59
|
+
"./camera": "./dist/camera/index.js",
|
|
60
|
+
"./camera/events": "./dist/camera/events.js",
|
|
61
|
+
"./camera/types": "./dist/camera/types.js",
|
|
62
|
+
"./camera/use-camera-state": "./dist/camera/use-camera-state.js",
|
|
58
63
|
"./cursor-coordinates": "./dist/cursor-coordinates/index.js",
|
|
59
64
|
"./cursor-coordinates/use-cursor-coordinates": "./dist/cursor-coordinates/use-cursor-coordinates.js",
|
|
60
65
|
"./deckgl": "./dist/deckgl/index.js",
|
|
61
66
|
"./deckgl/base-map": "./dist/deckgl/base-map/index.js",
|
|
62
67
|
"./deckgl/base-map/constants": "./dist/deckgl/base-map/constants.js",
|
|
68
|
+
"./deckgl/base-map/controls": "./dist/deckgl/base-map/controls.js",
|
|
63
69
|
"./deckgl/base-map/events": "./dist/deckgl/base-map/events.js",
|
|
64
70
|
"./deckgl/base-map/provider": "./dist/deckgl/base-map/provider.js",
|
|
65
71
|
"./deckgl/base-map/types": "./dist/deckgl/base-map/types.js",
|
|
72
|
+
"./deckgl/saved-viewports": "./dist/deckgl/saved-viewports/index.js",
|
|
73
|
+
"./deckgl/saved-viewports/storage": "./dist/deckgl/saved-viewports/storage.js",
|
|
66
74
|
"./deckgl/symbol-layer": "./dist/deckgl/symbol-layer/index.js",
|
|
67
75
|
"./deckgl/symbol-layer/fiber": "./dist/deckgl/symbol-layer/fiber.js",
|
|
68
76
|
"./deckgl/text-layer": "./dist/deckgl/text-layer/index.js",
|
|
@@ -116,9 +124,12 @@
|
|
|
116
124
|
"@deckgl-fiber-renderer/dom": "1.4.0",
|
|
117
125
|
"@deckgl-fiber-renderer/shared": "^1.4.0",
|
|
118
126
|
"@deckgl-fiber-renderer/types": "^1.4.0",
|
|
127
|
+
"@math.gl/web-mercator": "^4.1.0",
|
|
119
128
|
"maplibre-gl": "^5.7.1",
|
|
120
129
|
"milsymbol": "3.0.2",
|
|
121
|
-
"mjolnir.js": "^3.0.0"
|
|
130
|
+
"mjolnir.js": "^3.0.0",
|
|
131
|
+
"react-map-gl": "^8.1.0",
|
|
132
|
+
"@accelint/hotkey-manager": "0.1.3"
|
|
122
133
|
},
|
|
123
134
|
"owner": "default/pathfinder",
|
|
124
135
|
"peerDependencies": {
|
|
@@ -139,7 +150,6 @@
|
|
|
139
150
|
"subPath": "packages/map-toolkit",
|
|
140
151
|
"title": "Accelint Map Toolkit",
|
|
141
152
|
"type": "module",
|
|
142
|
-
"types": "./dist/index.d.ts",
|
|
143
153
|
"scripts": {
|
|
144
154
|
"bench": "pnpm vitest bench --run --dir src",
|
|
145
155
|
"build": "pnpm tsdown",
|
|
@@ -150,6 +160,7 @@
|
|
|
150
160
|
"format:check": "pnpm biome format . --verbose",
|
|
151
161
|
"license": "pnpm zx ../../scripts/license.mjs",
|
|
152
162
|
"lint": "pnpm biome lint . --verbose",
|
|
163
|
+
"lint:package": "pnpm publint",
|
|
153
164
|
"preview": "pnpm storybook dev -p 6007",
|
|
154
165
|
"test": "pnpm vitest --dir=src",
|
|
155
166
|
"test:watch": "pnpm vitest --dir=src --watch"
|