@accelint/map-toolkit 0.0.2 → 0.1.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 +22 -0
- package/README.md +3 -0
- package/catalog-info.yaml +41 -0
- package/dist/deckgl/base-map/constants.d.ts +16 -0
- package/dist/deckgl/base-map/constants.js +18 -0
- package/dist/deckgl/base-map/constants.js.map +1 -0
- package/dist/deckgl/base-map/events.d.ts +7 -0
- package/dist/deckgl/base-map/events.js +9 -0
- package/dist/deckgl/base-map/events.js.map +1 -0
- package/dist/deckgl/base-map/index.d.ts +15 -0
- package/dist/deckgl/base-map/index.js +93 -0
- package/dist/deckgl/base-map/index.js.map +1 -0
- package/dist/deckgl/base-map/types.d.ts +21 -0
- package/dist/deckgl/base-map/types.js +3 -0
- package/dist/deckgl/base-map/types.js.map +1 -0
- package/dist/deckgl/index.d.ts +12 -0
- package/dist/deckgl/index.js +6 -0
- package/dist/{index.js.map → deckgl/index.js.map} +1 -1
- package/dist/deckgl/symbol-layer/fiber.d.ts +14 -0
- package/dist/deckgl/symbol-layer/fiber.js +6 -0
- package/dist/deckgl/symbol-layer/fiber.js.map +1 -0
- package/dist/deckgl/symbol-layer/index.d.ts +63 -0
- package/dist/deckgl/symbol-layer/index.js +92 -0
- package/dist/deckgl/symbol-layer/index.js.map +1 -0
- package/dist/decorators/deckgl.d.ts +5 -0
- package/dist/decorators/deckgl.js +12 -0
- package/dist/decorators/deckgl.js.map +1 -0
- package/dist/maplibre/constants.d.ts +11 -0
- package/dist/maplibre/constants.js +13 -0
- package/dist/maplibre/constants.js.map +1 -0
- package/dist/maplibre/hooks/use-maplibre.d.ts +5 -0
- package/dist/maplibre/hooks/use-maplibre.js +36 -0
- package/dist/maplibre/hooks/use-maplibre.js.map +1 -0
- package/dist/maplibre/index.d.ts +3 -0
- package/dist/maplibre/index.js +4 -0
- package/dist/maplibre/index.js.map +1 -0
- package/dist/metafile-esm.json +1 -1
- package/dist/test/setup.js +1 -0
- package/dist/test/setup.js.map +1 -1
- package/package.json +78 -11
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# @accelint/map-toolkit
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 24e2def: Open-source the deckgl-layer-symbol package. Adds support for rendering MIL-STD-2525 symbologies as a Deck.gl layer.
|
|
8
|
+
- 5f45f43: Adds base-map component and DeckGL onClick and onHover event emitters. The example story shows how to use the @accelint/bus/react useOn hook to subscribe to the emitted events.
|
|
9
|
+
- 405d875: Introduced basic implementation for storybook for map-toolkit, including a decorator for deckGL for new stories.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 64280a7: - Released `@accelint/constellation-tracker` - A tool that helps maintain catalog-info.yaml files for Constellation integration
|
|
14
|
+
- Ensures all packages include catalog-info.yaml in their published files for better discoverability and integration with Constellation
|
|
15
|
+
- Provides automated tracking and updating of component metadata across the project
|
|
16
|
+
- Enhanced package metadata to support better integration with internal tooling
|
|
17
|
+
|
|
18
|
+
## 0.0.2
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 56d5af8: Initialization of Map Toolkit (MapTK) library
|
package/README.md
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
apiVersion: backstage.io/v1alpha1
|
|
3
|
+
kind: Component
|
|
4
|
+
metadata:
|
|
5
|
+
name: "@accelint/map-toolkit"
|
|
6
|
+
title: Accelint Map Toolkit
|
|
7
|
+
description: >-
|
|
8
|
+
A collection of components and utilities to simplify visualizing and working
|
|
9
|
+
with geospatial data.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Dependencies:
|
|
13
|
+
|
|
14
|
+
@accelint/biome-config@1.0.0, @accelint/constellation-tracker@0.0.0,
|
|
15
|
+
@accelint/design-toolkit@5.0.0, @accelint/typescript-config@0.1.2,
|
|
16
|
+
@accelint/vitest-config@0.1.3
|
|
17
|
+
annotations:
|
|
18
|
+
backstage.io/edit-url: https://github.com/gohypergiant/standard-toolkit/blob/main/packages/map-toolkit/catalog-info.yaml
|
|
19
|
+
backstage.io/techdocs-ref: dir:.
|
|
20
|
+
package/version: 0.0.2
|
|
21
|
+
github.com/project-slug: gohypergiant/standard-toolkit
|
|
22
|
+
links:
|
|
23
|
+
- url: https://github.com/gohypergiant/standard-toolkit/tree/main/packages/map-toolkit
|
|
24
|
+
title: Documentation
|
|
25
|
+
icon: docs
|
|
26
|
+
type: documentation
|
|
27
|
+
tags:
|
|
28
|
+
- deckgl
|
|
29
|
+
- geospatial
|
|
30
|
+
- map-tk
|
|
31
|
+
- maplibre
|
|
32
|
+
spec:
|
|
33
|
+
type: library
|
|
34
|
+
lifecycle: production
|
|
35
|
+
owner: group:default/pathfinder
|
|
36
|
+
dependsOn:
|
|
37
|
+
- component:@accelint/biome-config
|
|
38
|
+
- component:@accelint/constellation-tracker
|
|
39
|
+
- component:@accelint/design-toolkit
|
|
40
|
+
- component:@accelint/typescript-config
|
|
41
|
+
- component:@accelint/vitest-config
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const BASE_MAP_STYLE = "https://tiles.basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json";
|
|
2
|
+
declare const PARAMETERS: {
|
|
3
|
+
depthWriteEnabled: boolean;
|
|
4
|
+
depthCompare: string;
|
|
5
|
+
depthBias: number;
|
|
6
|
+
blend: boolean;
|
|
7
|
+
depthTest: boolean;
|
|
8
|
+
blendColorSrcFactor: string;
|
|
9
|
+
blendColorDstFactor: string;
|
|
10
|
+
blendAlphaSrcFactor: string;
|
|
11
|
+
blendAlphaDstFactor: string;
|
|
12
|
+
blendColorOperation: string;
|
|
13
|
+
blendAlphaOperation: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { BASE_MAP_STYLE, PARAMETERS };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const BASE_MAP_STYLE = "https://tiles.basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json";
|
|
2
|
+
const PARAMETERS = {
|
|
3
|
+
depthWriteEnabled: true,
|
|
4
|
+
depthCompare: "always",
|
|
5
|
+
depthBias: 0,
|
|
6
|
+
blend: true,
|
|
7
|
+
depthTest: false,
|
|
8
|
+
blendColorSrcFactor: "src-alpha",
|
|
9
|
+
blendColorDstFactor: "one-minus-src-alpha",
|
|
10
|
+
blendAlphaSrcFactor: "one",
|
|
11
|
+
blendAlphaDstFactor: "one-minus-src-alpha",
|
|
12
|
+
blendColorOperation: "add",
|
|
13
|
+
blendAlphaOperation: "add"
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { BASE_MAP_STYLE, PARAMETERS };
|
|
17
|
+
//# sourceMappingURL=constants.js.map
|
|
18
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/deckgl/base-map/constants.ts"],"names":[],"mappings":"AAaO,MAAM,cAAA,GACX;AAEK,MAAM,UAAA,GAAa;AAAA,EACxB,iBAAA,EAAmB,IAAA;AAAA,EACnB,YAAA,EAAc,QAAA;AAAA,EACd,SAAA,EAAW,CAAA;AAAA,EACX,KAAA,EAAO,IAAA;AAAA,EACP,SAAA,EAAW,KAAA;AAAA,EACX,mBAAA,EAAqB,WAAA;AAAA,EACrB,mBAAA,EAAqB,qBAAA;AAAA,EACrB,mBAAA,EAAqB,KAAA;AAAA,EACrB,mBAAA,EAAqB,qBAAA;AAAA,EACrB,mBAAA,EAAqB,KAAA;AAAA,EACrB,mBAAA,EAAqB;AACvB","file":"constants.js","sourcesContent":["// __private-exports\n/*\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\nexport const BASE_MAP_STYLE =\n 'https://tiles.basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json';\n\nexport const PARAMETERS = {\n depthWriteEnabled: true,\n depthCompare: 'always',\n depthBias: 0,\n blend: true,\n depthTest: false,\n blendColorSrcFactor: 'src-alpha',\n blendColorDstFactor: 'one-minus-src-alpha',\n blendAlphaSrcFactor: 'one',\n blendAlphaDstFactor: 'one-minus-src-alpha',\n blendColorOperation: 'add',\n blendAlphaOperation: 'add',\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/deckgl/base-map/events.ts"],"names":[],"mappings":"AAYO,MAAM,kBAAA,GAAqB;AAE3B,MAAM,SAAA,GAAY;AAAA,EACvB,KAAA,EAAO,GAAG,kBAAkB,CAAA,MAAA,CAAA;AAAA,EAC5B,KAAA,EAAO,GAAG,kBAAkB,CAAA,MAAA;AAC9B","file":"events.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\nexport const MapEventsNamespace = 'map';\n\nexport const MapEvents = {\n click: `${MapEventsNamespace}:click`,\n hover: `${MapEventsNamespace}:hover`,\n} as const;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Broadcast } from '@accelint/bus';
|
|
3
|
+
import { DeckglProps } from '@deckgl-fiber-renderer/types';
|
|
4
|
+
import { MapEventType } from './types.js';
|
|
5
|
+
import '@deck.gl/core';
|
|
6
|
+
import 'mjolnir.js';
|
|
7
|
+
import './events.js';
|
|
8
|
+
|
|
9
|
+
type BaseMapProps = DeckglProps & {
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const bus: Broadcast<MapEventType>;
|
|
13
|
+
declare function BaseMap({ children, onClick, onHover, className, parameters, ...rest }: BaseMapProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { BaseMap, bus };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import 'client-only';
|
|
3
|
+
import { Broadcast } from '@accelint/bus';
|
|
4
|
+
import { useEmit } from '@accelint/bus/react';
|
|
5
|
+
import { useDeckgl, Deckgl } from '@deckgl-fiber-renderer/dom';
|
|
6
|
+
import { useId, useCallback } from 'react';
|
|
7
|
+
import { INITIAL_VIEW_STATE } from '../../maplibre/constants.js';
|
|
8
|
+
import { useMapLibre } from '../../maplibre/hooks/use-maplibre.js';
|
|
9
|
+
import { BASE_MAP_STYLE, PARAMETERS } from './constants.js';
|
|
10
|
+
import { MapEvents } from './events.js';
|
|
11
|
+
|
|
12
|
+
const bus = Broadcast.getInstance();
|
|
13
|
+
function BaseMap({
|
|
14
|
+
children,
|
|
15
|
+
onClick,
|
|
16
|
+
onHover,
|
|
17
|
+
className,
|
|
18
|
+
parameters,
|
|
19
|
+
...rest
|
|
20
|
+
}) {
|
|
21
|
+
const deckglInstance = useDeckgl();
|
|
22
|
+
const container = useId();
|
|
23
|
+
useMapLibre(deckglInstance, BASE_MAP_STYLE, {
|
|
24
|
+
container,
|
|
25
|
+
center: [INITIAL_VIEW_STATE.longitude, INITIAL_VIEW_STATE.latitude],
|
|
26
|
+
zoom: INITIAL_VIEW_STATE.zoom,
|
|
27
|
+
doubleClickZoom: false,
|
|
28
|
+
dragRotate: false,
|
|
29
|
+
pitchWithRotate: false,
|
|
30
|
+
rollEnabled: false
|
|
31
|
+
});
|
|
32
|
+
const emitClick = useEmit(MapEvents.click);
|
|
33
|
+
const emitHover = useEmit(MapEvents.hover);
|
|
34
|
+
const handleMapClick = useCallback(
|
|
35
|
+
(info, event) => {
|
|
36
|
+
onClick?.(info, event);
|
|
37
|
+
const { viewport, ...infoRest } = info;
|
|
38
|
+
const {
|
|
39
|
+
stopImmediatePropagation,
|
|
40
|
+
stopPropagation,
|
|
41
|
+
preventDefault,
|
|
42
|
+
srcEvent,
|
|
43
|
+
rootElement,
|
|
44
|
+
target,
|
|
45
|
+
changedPointers,
|
|
46
|
+
pointers,
|
|
47
|
+
...eventRest
|
|
48
|
+
} = event;
|
|
49
|
+
emitClick({
|
|
50
|
+
info: infoRest,
|
|
51
|
+
event: eventRest
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
[emitClick, onClick]
|
|
55
|
+
);
|
|
56
|
+
const handleMapHover = useCallback(
|
|
57
|
+
(info, event) => {
|
|
58
|
+
onHover?.(info, event);
|
|
59
|
+
const { viewport, ...infoRest } = info;
|
|
60
|
+
const {
|
|
61
|
+
stopImmediatePropagation,
|
|
62
|
+
stopPropagation,
|
|
63
|
+
preventDefault,
|
|
64
|
+
srcEvent,
|
|
65
|
+
rootElement,
|
|
66
|
+
target,
|
|
67
|
+
...eventRest
|
|
68
|
+
} = event;
|
|
69
|
+
emitHover({
|
|
70
|
+
info: infoRest,
|
|
71
|
+
event: eventRest
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
[emitHover, onHover]
|
|
75
|
+
);
|
|
76
|
+
return /* @__PURE__ */ jsx("div", { id: container, className, children: /* @__PURE__ */ jsx(
|
|
77
|
+
Deckgl,
|
|
78
|
+
{
|
|
79
|
+
...rest,
|
|
80
|
+
controller: true,
|
|
81
|
+
interleaved: true,
|
|
82
|
+
useDevicePixels: false,
|
|
83
|
+
onHover: handleMapHover,
|
|
84
|
+
onClick: handleMapClick,
|
|
85
|
+
parameters: { ...PARAMETERS, ...parameters },
|
|
86
|
+
children
|
|
87
|
+
}
|
|
88
|
+
) });
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { BaseMap, bus };
|
|
92
|
+
//# sourceMappingURL=index.js.map
|
|
93
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/deckgl/base-map/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AA+BO,MAAM,GAAA,GAAM,UAAU,WAAA;AAEtB,SAAS,OAAA,CAAQ;AAAA,EACtB,QAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAiB;AACf,EAAA,MAAM,iBAAiB,SAAA,EAAU;AACjC,EAAA,MAAM,YAAY,KAAA,EAAM;AAGxB,EAAA,WAAA,CAAY,gBAA4B,cAAA,EAAgB;AAAA,IACtD,SAAA;AAAA,IACA,MAAA,EAAQ,CAAC,kBAAA,CAAmB,SAAA,EAAW,mBAAmB,QAAQ,CAAA;AAAA,IAClE,MAAM,kBAAA,CAAmB,IAAA;AAAA,IACzB,eAAA,EAAiB,KAAA;AAAA,IACjB,UAAA,EAAY,KAAA;AAAA,IACZ,eAAA,EAAiB,KAAA;AAAA,IACjB,WAAA,EAAa;AAAA,GACd,CAAA;AAED,EAAA,MAAM,SAAA,GAAY,OAAA,CAAuB,SAAA,CAAU,KAAK,CAAA;AACxD,EAAA,MAAM,SAAA,GAAY,OAAA,CAAuB,SAAA,CAAU,KAAK,CAAA;AAExD,EAAA,MAAM,cAAA,GAAiB,WAAA;AAAA,IACrB,CAAC,MAAmB,KAAA,KAA+B;AAEjD,MAAA,OAAA,GAAU,MAAM,KAAK,CAAA;AAGrB,MAAA,MAAM,EAAE,QAAA,EAAU,GAAG,QAAA,EAAS,GAAI,IAAA;AAClC,MAAA,MAAM;AAAA,QACJ,wBAAA;AAAA,QACA,eAAA;AAAA,QACA,cAAA;AAAA,QACA,QAAA;AAAA,QACA,WAAA;AAAA,QACA,MAAA;AAAA,QACA,eAAA;AAAA,QACA,QAAA;AAAA,QACA,GAAG;AAAA,OACL,GAAI,KAAA;AAEJ,MAAA,SAAA,CAAU;AAAA,QACR,IAAA,EAAM,QAAA;AAAA,QACN,KAAA,EAAO;AAAA,OACR,CAAA;AAAA,IACH,CAAA;AAAA,IACA,CAAC,WAAW,OAAO;AAAA,GACrB;AAEA,EAAA,MAAM,cAAA,GAAiB,WAAA;AAAA,IACrB,CAAC,MAAmB,KAAA,KAA+B;AAEjD,MAAA,OAAA,GAAU,MAAM,KAAK,CAAA;AAGrB,MAAA,MAAM,EAAE,QAAA,EAAU,GAAG,QAAA,EAAS,GAAI,IAAA;AAClC,MAAA,MAAM;AAAA,QACJ,wBAAA;AAAA,QACA,eAAA;AAAA,QACA,cAAA;AAAA,QACA,QAAA;AAAA,QACA,WAAA;AAAA,QACA,MAAA;AAAA,QACA,GAAG;AAAA,OACL,GAAI,KAAA;AAEJ,MAAA,SAAA,CAAU;AAAA,QACR,IAAA,EAAM,QAAA;AAAA,QACN,KAAA,EAAO;AAAA,OACR,CAAA;AAAA,IACH,CAAA;AAAA,IACA,CAAC,WAAW,OAAO;AAAA,GACrB;AAEA,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,EAAA,EAAI,SAAA,EAAW,SAAA,EAClB,QAAA,kBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,UAAA,EAAU,IAAA;AAAA,MACV,WAAA,EAAW,IAAA;AAAA,MACX,eAAA,EAAiB,KAAA;AAAA,MACjB,OAAA,EAAS,cAAA;AAAA,MACT,OAAA,EAAS,cAAA;AAAA,MAET,UAAA,EAAY,EAAE,GAAG,UAAA,EAAY,GAAG,UAAA,EAAW;AAAA,MAE1C;AAAA;AAAA,GACH,EACF,CAAA;AAEJ","file":"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'use client';\n\nimport 'client-only';\nimport { Broadcast } from '@accelint/bus';\nimport { useEmit } from '@accelint/bus/react';\nimport { Deckgl, useDeckgl } from '@deckgl-fiber-renderer/dom';\nimport { useCallback, useId } from 'react';\nimport { INITIAL_VIEW_STATE } from '../../maplibre/constants';\nimport { useMapLibre } from '../../maplibre/hooks/use-maplibre';\nimport { BASE_MAP_STYLE, PARAMETERS } from './constants';\nimport { MapEvents } from './events';\nimport type { PickingInfo } from '@deck.gl/core';\nimport type { DeckglProps } from '@deckgl-fiber-renderer/types';\nimport type { IControl } from 'maplibre-gl';\nimport type { MjolnirGestureEvent, MjolnirPointerEvent } from 'mjolnir.js';\nimport type { MapClickEvent, MapEventType, MapHoverEvent } from './types';\n\ntype BaseMapProps = DeckglProps & { className?: string };\n\nexport const bus = Broadcast.getInstance<MapEventType>();\n\nexport function BaseMap({\n children,\n onClick,\n onHover,\n className,\n parameters,\n ...rest\n}: BaseMapProps) {\n const deckglInstance = useDeckgl();\n const container = useId();\n\n // Use the custom hook to handle MapLibre\n useMapLibre(deckglInstance as IControl, BASE_MAP_STYLE, {\n container,\n center: [INITIAL_VIEW_STATE.longitude, INITIAL_VIEW_STATE.latitude],\n zoom: INITIAL_VIEW_STATE.zoom,\n doubleClickZoom: false,\n dragRotate: false,\n pitchWithRotate: false,\n rollEnabled: false,\n });\n\n const emitClick = useEmit<MapClickEvent>(MapEvents.click);\n const emitHover = useEmit<MapHoverEvent>(MapEvents.hover);\n\n const handleMapClick = useCallback(\n (info: PickingInfo, event: MjolnirGestureEvent) => {\n // send full pickingInfo and event to user-defined onClick\n onClick?.(info, event);\n\n // the bus cannot serialize functions, so we omit them from the event payloads\n const { viewport, ...infoRest } = info;\n const {\n stopImmediatePropagation,\n stopPropagation,\n preventDefault,\n srcEvent,\n rootElement,\n target,\n changedPointers,\n pointers,\n ...eventRest\n } = event;\n\n emitClick({\n info: infoRest,\n event: eventRest,\n });\n },\n [emitClick, onClick],\n );\n\n const handleMapHover = useCallback(\n (info: PickingInfo, event: MjolnirPointerEvent) => {\n // send full pickingInfo and event to user-defined onHover\n onHover?.(info, event);\n\n // the bus cannot serialize functions, so we omit them from the event payloads\n const { viewport, ...infoRest } = info;\n const {\n stopImmediatePropagation,\n stopPropagation,\n preventDefault,\n srcEvent,\n rootElement,\n target,\n ...eventRest\n } = event;\n\n emitHover({\n info: infoRest,\n event: eventRest,\n });\n },\n [emitHover, onHover],\n );\n\n return (\n <div id={container} className={className}>\n <Deckgl\n {...rest}\n controller\n interleaved\n useDevicePixels={false}\n onHover={handleMapHover}\n onClick={handleMapClick}\n // @ts-expect-error TODO: conflict with deckgl type\n parameters={{ ...PARAMETERS, ...parameters }}\n >\n {children}\n </Deckgl>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Payload } from '@accelint/bus';
|
|
2
|
+
import { PickingInfo } from '@deck.gl/core';
|
|
3
|
+
import { MjolnirGestureEvent, MjolnirPointerEvent } from 'mjolnir.js';
|
|
4
|
+
import { MapEvents } from './events.js';
|
|
5
|
+
|
|
6
|
+
type NonFuncPickingInfo = Omit<PickingInfo, 'viewport'>;
|
|
7
|
+
type NonFuncMjolnirGestureEvent = Omit<MjolnirGestureEvent, 'stopPropagation' | 'preventDefault' | 'stopImmediatePropagation' | 'srcEvent' | 'rootElement' | 'target' | 'changedPointers' | 'pointers'>;
|
|
8
|
+
type NonFuncMjolnirPointerEvent = Omit<MjolnirPointerEvent, 'stopPropagation' | 'preventDefault' | 'stopImmediatePropagation' | 'srcEvent' | 'rootElement' | 'target'>;
|
|
9
|
+
type MapClickPayload = {
|
|
10
|
+
info: NonFuncPickingInfo;
|
|
11
|
+
event: NonFuncMjolnirGestureEvent;
|
|
12
|
+
};
|
|
13
|
+
type MapHoverPayload = {
|
|
14
|
+
info: NonFuncPickingInfo;
|
|
15
|
+
event: NonFuncMjolnirPointerEvent;
|
|
16
|
+
};
|
|
17
|
+
type MapClickEvent = Payload<typeof MapEvents.click, MapClickPayload>;
|
|
18
|
+
type MapHoverEvent = Payload<typeof MapEvents.hover, MapHoverPayload>;
|
|
19
|
+
type MapEventType = MapClickEvent | MapHoverEvent;
|
|
20
|
+
|
|
21
|
+
export type { MapClickEvent, MapClickPayload, MapEventType, MapHoverEvent, MapHoverPayload };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { BaseMap, bus } from './base-map/index.js';
|
|
2
|
+
export { BASE_MAP_STYLE, PARAMETERS } from './base-map/constants.js';
|
|
3
|
+
export { MapEvents, MapEventsNamespace } from './base-map/events.js';
|
|
4
|
+
export { SymbolLayer, SymbolLayerProps } from './symbol-layer/index.js';
|
|
5
|
+
export { MapClickEvent, MapClickPayload, MapEventType, MapHoverEvent, MapHoverPayload } from './base-map/types.js';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
7
|
+
import '@accelint/bus';
|
|
8
|
+
import '@deckgl-fiber-renderer/types';
|
|
9
|
+
import '@deck.gl/layers';
|
|
10
|
+
import 'milsymbol';
|
|
11
|
+
import '@deck.gl/core';
|
|
12
|
+
import 'mjolnir.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BaseMap, bus } from './base-map/index.js';
|
|
2
|
+
export { BASE_MAP_STYLE, PARAMETERS } from './base-map/constants.js';
|
|
3
|
+
export { MapEvents, MapEventsNamespace } from './base-map/events.js';
|
|
4
|
+
export { SymbolLayer } from './symbol-layer/index.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SymbolLayerProps } from './index.js';
|
|
2
|
+
import '@deck.gl/layers';
|
|
3
|
+
import 'milsymbol';
|
|
4
|
+
import '@deck.gl/core';
|
|
5
|
+
|
|
6
|
+
declare global {
|
|
7
|
+
namespace React {
|
|
8
|
+
namespace JSX {
|
|
9
|
+
interface IntrinsicElements {
|
|
10
|
+
symbolLayer: SymbolLayerProps;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/deckgl/symbol-layer/fiber.ts"],"names":[],"mappings":";;;AAeA,MAAA,CAAO,EAAE,aAAa,CAAA","file":"fiber.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\nimport { extend } from '@deckgl-fiber-renderer/dom';\nimport { SymbolLayer, type SymbolLayerProps } from './index';\n\nextend({ SymbolLayer });\n\ndeclare global {\n namespace React {\n // biome-ignore lint/style/useNamingConvention: Built-in React namespace.\n namespace JSX {\n interface IntrinsicElements {\n symbolLayer: SymbolLayerProps;\n }\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { IconLayerProps, IconLayer } from '@deck.gl/layers';
|
|
2
|
+
import { SymbolOptions } from 'milsymbol';
|
|
3
|
+
import { AccessorFunction, DefaultProps, AccessorContext } from '@deck.gl/core';
|
|
4
|
+
|
|
5
|
+
type _SymbolLayerProps<TData = unknown> = {
|
|
6
|
+
/**
|
|
7
|
+
* An accessor function that returns the SIDC for a given data point.
|
|
8
|
+
*/
|
|
9
|
+
getSidc?: AccessorFunction<TData, string | number | bigint>;
|
|
10
|
+
/**
|
|
11
|
+
* An accessor function that returns symbol options for a given data point.
|
|
12
|
+
*/
|
|
13
|
+
getSymbolOptions?: AccessorFunction<TData, SymbolOptions | null>;
|
|
14
|
+
/**
|
|
15
|
+
* Default symbol options to use when rendering symbols.
|
|
16
|
+
*/
|
|
17
|
+
defaultSymbolOptions?: SymbolOptions;
|
|
18
|
+
};
|
|
19
|
+
type SymbolLayerProps<TData = unknown> = _SymbolLayerProps<TData> & Omit<IconLayerProps<TData>, 'getIcon' | 'getColor' | 'iconAtlas' | 'iconMapping'>;
|
|
20
|
+
/**
|
|
21
|
+
* Provides a layer for rendering MIL-STD-2525 and APP-6 symbols.
|
|
22
|
+
*/
|
|
23
|
+
declare class SymbolLayer<TData = unknown, TExtraProps extends {} = {}> extends IconLayer<TData, TExtraProps & Required<_SymbolLayerProps<TData>>> {
|
|
24
|
+
static defaultProps: DefaultProps<SymbolLayerProps<unknown>>;
|
|
25
|
+
static layerName: string;
|
|
26
|
+
/**
|
|
27
|
+
* The default symbol options to use when rendering symbols.
|
|
28
|
+
*
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
protected defaultOptions: SymbolOptions;
|
|
32
|
+
/**
|
|
33
|
+
* Caches the results of the icon generation
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
* @todo Use LRU cache to limit memory usage.
|
|
37
|
+
*/
|
|
38
|
+
protected generationCache: Map<string, string>;
|
|
39
|
+
constructor(...args: Partial<SymbolLayerProps<TData>>[]);
|
|
40
|
+
/**
|
|
41
|
+
* Generates an icon using the provided SIDC and symbol options.
|
|
42
|
+
*
|
|
43
|
+
* @param data A point's data
|
|
44
|
+
* @param info Contextual information about the point
|
|
45
|
+
* @returns DeckGL Icon Object
|
|
46
|
+
*/
|
|
47
|
+
protected generateIcon: (data: TData, info: AccessorContext<TData>) => {
|
|
48
|
+
id: string;
|
|
49
|
+
url: string;
|
|
50
|
+
height: number;
|
|
51
|
+
width: number;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Generates a cache key for the given SIDC and symbol options.
|
|
55
|
+
*
|
|
56
|
+
* @param sidc SIDC of the symbol
|
|
57
|
+
* @param options Options used to generate the symbol
|
|
58
|
+
* @returns String key for caching
|
|
59
|
+
*/
|
|
60
|
+
protected generateCacheKey(sidc: string, options: SymbolOptions): string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { SymbolLayer, type SymbolLayerProps };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IconLayer } from '@deck.gl/layers';
|
|
2
|
+
import ms from 'milsymbol';
|
|
3
|
+
|
|
4
|
+
const MilSymbol = ms.Symbol;
|
|
5
|
+
const defaultProps = {
|
|
6
|
+
// biome-ignore lint/suspicious/noExplicitAny: We don't know what the data type is.
|
|
7
|
+
getSidc: { type: "accessor", value: (x) => x.sidc },
|
|
8
|
+
getSymbolOptions: { type: "accessor", value: () => null },
|
|
9
|
+
getSize: { type: "accessor", value: 32 },
|
|
10
|
+
defaultSymbolOptions: { type: "object", value: {} }
|
|
11
|
+
};
|
|
12
|
+
class SymbolLayer extends IconLayer {
|
|
13
|
+
static defaultProps = defaultProps;
|
|
14
|
+
static layerName = "SymbolLayer";
|
|
15
|
+
/**
|
|
16
|
+
* The default symbol options to use when rendering symbols.
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
defaultOptions;
|
|
21
|
+
/**
|
|
22
|
+
* Caches the results of the icon generation
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
* @todo Use LRU cache to limit memory usage.
|
|
26
|
+
*/
|
|
27
|
+
generationCache = /* @__PURE__ */ new Map();
|
|
28
|
+
constructor(...args) {
|
|
29
|
+
const customGetIcons = {
|
|
30
|
+
getIcon: (data, info) => this.generateIcon(data, info)
|
|
31
|
+
};
|
|
32
|
+
super(...args, customGetIcons);
|
|
33
|
+
this.defaultOptions = {
|
|
34
|
+
size: 100,
|
|
35
|
+
colorMode: "Dark",
|
|
36
|
+
...this.props.defaultSymbolOptions
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Generates an icon using the provided SIDC and symbol options.
|
|
41
|
+
*
|
|
42
|
+
* @param data A point's data
|
|
43
|
+
* @param info Contextual information about the point
|
|
44
|
+
* @returns DeckGL Icon Object
|
|
45
|
+
*/
|
|
46
|
+
generateIcon = (data, info) => {
|
|
47
|
+
const { getSidc, getSymbolOptions } = this.props;
|
|
48
|
+
const sidc = getSidc(data, info).toString();
|
|
49
|
+
let currentSymbolOptions = this.defaultOptions;
|
|
50
|
+
const localOptions = getSymbolOptions(data, info);
|
|
51
|
+
if (localOptions) {
|
|
52
|
+
currentSymbolOptions = {
|
|
53
|
+
...currentSymbolOptions,
|
|
54
|
+
...localOptions
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const size = currentSymbolOptions.size;
|
|
58
|
+
const cacheKey = this.generateCacheKey(sidc, currentSymbolOptions);
|
|
59
|
+
if (this.generationCache.has(cacheKey)) {
|
|
60
|
+
const cachedUrl = this.generationCache.get(cacheKey);
|
|
61
|
+
return {
|
|
62
|
+
id: cacheKey,
|
|
63
|
+
url: cachedUrl,
|
|
64
|
+
height: size,
|
|
65
|
+
width: size
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const dataUrl = new MilSymbol(sidc, currentSymbolOptions).toDataURL();
|
|
69
|
+
this.generationCache.set(cacheKey, dataUrl);
|
|
70
|
+
const returnData = {
|
|
71
|
+
id: cacheKey,
|
|
72
|
+
url: dataUrl,
|
|
73
|
+
height: size,
|
|
74
|
+
width: size
|
|
75
|
+
};
|
|
76
|
+
return returnData;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Generates a cache key for the given SIDC and symbol options.
|
|
80
|
+
*
|
|
81
|
+
* @param sidc SIDC of the symbol
|
|
82
|
+
* @param options Options used to generate the symbol
|
|
83
|
+
* @returns String key for caching
|
|
84
|
+
*/
|
|
85
|
+
generateCacheKey(sidc, options) {
|
|
86
|
+
return `${sidc}-${JSON.stringify(options)}`;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { SymbolLayer };
|
|
91
|
+
//# sourceMappingURL=index.js.map
|
|
92
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/deckgl/symbol-layer/index.ts"],"names":[],"mappings":";;;AAoBA,MAAM,YAAY,EAAA,CAAG,MAAA;AAuBrB,MAAM,YAAA,GAA+C;AAAA;AAAA,EAEnD,OAAA,EAAS,EAAE,IAAA,EAAM,UAAA,EAAY,OAAO,CAAC,CAAA,KAAW,EAAE,IAAA,EAAK;AAAA,EACvD,kBAAkB,EAAE,IAAA,EAAM,UAAA,EAAY,KAAA,EAAO,MAAM,IAAA,EAAK;AAAA,EACxD,OAAA,EAAS,EAAE,IAAA,EAAM,UAAA,EAAY,OAAO,EAAA,EAAG;AAAA,EACvC,sBAAsB,EAAE,IAAA,EAAM,QAAA,EAAU,KAAA,EAAO,EAAC;AAClD,CAAA;AAKO,MAAM,oBAIH,SAAA,CAAmE;AAAA,EAC3E,OAAgB,YAAA,GAAe,YAAA;AAAA,EAC/B,OAAgB,SAAA,GAAY,aAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlB,cAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,eAAA,uBAAsB,GAAA,EAAoB;AAAA,EAEpD,eAAe,IAAA,EAA0C;AAEvD,IAAA,MAAM,cAAA,GAAiB;AAAA,MACrB,SAAS,CAAC,IAAA,EAAa,SACrB,IAAA,CAAK,YAAA,CAAa,MAAM,IAAI;AAAA,KAChC;AAGA,IAAA,KAAA,CAAM,GAAI,MAAc,cAAqB,CAAA;AAG7C,IAAA,IAAA,CAAK,cAAA,GAAiB;AAAA,MACpB,IAAA,EAAM,GAAA;AAAA,MACN,SAAA,EAAW,MAAA;AAAA,MACX,GAAG,KAAK,KAAA,CAAM;AAAA,KAChB;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASU,YAAA,GAAe,CAAC,IAAA,EAAa,IAAA,KAAiC;AACtE,IAAA,MAAM,EAAE,OAAA,EAAS,gBAAA,EAAiB,GAAI,IAAA,CAAK,KAAA;AAC3C,IAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,IAAA,EAAM,IAAI,EAAE,QAAA,EAAS;AAE1C,IAAA,IAAI,uBAAuB,IAAA,CAAK,cAAA;AAEhC,IAAA,MAAM,YAAA,GAAe,gBAAA,CAAiB,IAAA,EAAM,IAAI,CAAA;AAEhD,IAAA,IAAI,YAAA,EAAc;AAChB,MAAA,oBAAA,GAAuB;AAAA,QACrB,GAAG,oBAAA;AAAA,QACH,GAAG;AAAA,OACL;AAAA,IACF;AAEA,IAAA,MAAM,OAAO,oBAAA,CAAqB,IAAA;AAElC,IAAA,MAAM,QAAA,GAAW,IAAA,CAAK,gBAAA,CAAiB,IAAA,EAAM,oBAAoB,CAAA;AAEjE,IAAA,IAAI,IAAA,CAAK,eAAA,CAAgB,GAAA,CAAI,QAAQ,CAAA,EAAG;AACtC,MAAA,MAAM,SAAA,GAAY,IAAA,CAAK,eAAA,CAAgB,GAAA,CAAI,QAAQ,CAAA;AAEnD,MAAA,OAAO;AAAA,QACL,EAAA,EAAI,QAAA;AAAA,QACJ,GAAA,EAAK,SAAA;AAAA,QACL,MAAA,EAAQ,IAAA;AAAA,QACR,KAAA,EAAO;AAAA,OACT;AAAA,IACF;AAEA,IAAA,MAAM,UAAU,IAAI,SAAA,CAAU,IAAA,EAAM,oBAAoB,EAAE,SAAA,EAAU;AAEpE,IAAA,IAAA,CAAK,eAAA,CAAgB,GAAA,CAAI,QAAA,EAAU,OAAO,CAAA;AAE1C,IAAA,MAAM,UAAA,GAAa;AAAA,MACjB,EAAA,EAAI,QAAA;AAAA,MACJ,GAAA,EAAK,OAAA;AAAA,MACL,MAAA,EAAQ,IAAA;AAAA,MACR,KAAA,EAAO;AAAA,KACT;AAEA,IAAA,OAAO,UAAA;AAAA,EACT,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASU,gBAAA,CAAiB,MAAc,OAAA,EAAwB;AAC/D,IAAA,OAAO,GAAG,IAAI,CAAA,CAAA,EAAI,IAAA,CAAK,SAAA,CAAU,OAAO,CAAC,CAAA,CAAA;AAAA,EAC3C;AACF","file":"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\nimport { IconLayer, type IconLayerProps } from '@deck.gl/layers';\nimport ms, { type SymbolOptions } from 'milsymbol';\nimport type {\n AccessorContext,\n AccessorFunction,\n DefaultProps,\n} from '@deck.gl/core';\n\nconst MilSymbol = ms.Symbol;\n\ntype _SymbolLayerProps<TData = unknown> = {\n /**\n * An accessor function that returns the SIDC for a given data point.\n */\n getSidc?: AccessorFunction<TData, string | number | bigint>;\n /**\n * An accessor function that returns symbol options for a given data point.\n */\n getSymbolOptions?: AccessorFunction<TData, SymbolOptions | null>;\n /**\n * Default symbol options to use when rendering symbols.\n */\n defaultSymbolOptions?: SymbolOptions;\n};\n\nexport type SymbolLayerProps<TData = unknown> = _SymbolLayerProps<TData> &\n Omit<\n IconLayerProps<TData>,\n 'getIcon' | 'getColor' | 'iconAtlas' | 'iconMapping'\n >;\n\nconst defaultProps: DefaultProps<SymbolLayerProps> = {\n // biome-ignore lint/suspicious/noExplicitAny: We don't know what the data type is.\n getSidc: { type: 'accessor', value: (x: any) => x.sidc },\n getSymbolOptions: { type: 'accessor', value: () => null },\n getSize: { type: 'accessor', value: 32 },\n defaultSymbolOptions: { type: 'object', value: {} },\n};\n\n/**\n * Provides a layer for rendering MIL-STD-2525 and APP-6 symbols.\n */\nexport class SymbolLayer<\n TData = unknown,\n // biome-ignore lint/complexity/noBannedTypes: Follows DeckGL format.\n TExtraProps extends {} = {},\n> extends IconLayer<TData, TExtraProps & Required<_SymbolLayerProps<TData>>> {\n static override defaultProps = defaultProps;\n static override layerName = 'SymbolLayer';\n\n /**\n * The default symbol options to use when rendering symbols.\n *\n * @internal\n */\n protected defaultOptions: SymbolOptions;\n\n /**\n * Caches the results of the icon generation\n *\n * @internal\n * @todo Use LRU cache to limit memory usage.\n */\n protected generationCache = new Map<string, string>();\n\n constructor(...args: Partial<SymbolLayerProps<TData>>[]) {\n // Props are frozen after the construction\n const customGetIcons = {\n getIcon: (data: TData, info: AccessorContext<TData>) =>\n this.generateIcon(data, info),\n } as IconLayerProps<TData>;\n\n // biome-ignore lint/suspicious/noExplicitAny: Needed to retype the layer.\n super(...(args as any), customGetIcons as any);\n\n // Default options need to be set in the constructor.\n this.defaultOptions = {\n size: 100,\n colorMode: 'Dark',\n ...this.props.defaultSymbolOptions,\n };\n }\n\n /**\n * Generates an icon using the provided SIDC and symbol options.\n *\n * @param data A point's data\n * @param info Contextual information about the point\n * @returns DeckGL Icon Object\n */\n protected generateIcon = (data: TData, info: AccessorContext<TData>) => {\n const { getSidc, getSymbolOptions } = this.props;\n const sidc = getSidc(data, info).toString();\n\n let currentSymbolOptions = this.defaultOptions;\n\n const localOptions = getSymbolOptions(data, info);\n\n if (localOptions) {\n currentSymbolOptions = {\n ...currentSymbolOptions,\n ...localOptions,\n };\n }\n\n const size = currentSymbolOptions.size as number;\n\n const cacheKey = this.generateCacheKey(sidc, currentSymbolOptions);\n\n if (this.generationCache.has(cacheKey)) {\n const cachedUrl = this.generationCache.get(cacheKey) as string;\n\n return {\n id: cacheKey,\n url: cachedUrl,\n height: size,\n width: size,\n };\n }\n\n const dataUrl = new MilSymbol(sidc, currentSymbolOptions).toDataURL();\n\n this.generationCache.set(cacheKey, dataUrl);\n\n const returnData = {\n id: cacheKey,\n url: dataUrl,\n height: size,\n width: size,\n };\n\n return returnData;\n };\n\n /**\n * Generates a cache key for the given SIDC and symbol options.\n *\n * @param sidc SIDC of the symbol\n * @param options Options used to generate the symbol\n * @returns String key for caching\n */\n protected generateCacheKey(sidc: string, options: SymbolOptions) {\n return `${sidc}-${JSON.stringify(options)}`;\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { BaseMap } from '../deckgl/base-map/index.js';
|
|
3
|
+
|
|
4
|
+
const withDeckGL = () => {
|
|
5
|
+
return (Story) => {
|
|
6
|
+
return /* @__PURE__ */ jsx(BaseMap, { className: "h-dvh w-dvw", children: /* @__PURE__ */ jsx(Story, {}) });
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { withDeckGL };
|
|
11
|
+
//# sourceMappingURL=deckgl.js.map
|
|
12
|
+
//# sourceMappingURL=deckgl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/decorators/deckgl.tsx"],"names":[],"mappings":";;;AAiBO,MAAM,aAAa,MAAiB;AACzC,EAAA,OAAO,CAAC,KAAA,KAAU;AAChB,IAAA,2BACG,OAAA,EAAA,EAAQ,SAAA,EAAU,aAAA,EACjB,QAAA,kBAAA,GAAA,CAAC,SAAM,CAAA,EACT,CAAA;AAAA,EAEJ,CAAA;AACF","file":"deckgl.js","sourcesContent":["// __private-exports\n\n/*\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\nimport { BaseMap } from '../deckgl/base-map';\nimport type { Decorator } from '@storybook/react';\n\nexport const withDeckGL = (): Decorator => {\n return (Story) => {\n return (\n <BaseMap className='h-dvh w-dvw'>\n <Story />\n </BaseMap>\n );\n };\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const INITIAL_VIEW_STATE = {
|
|
2
|
+
longitude: -77.0369,
|
|
3
|
+
latitude: 38.9072,
|
|
4
|
+
zoom: 4,
|
|
5
|
+
minZoom: 1,
|
|
6
|
+
maxZoom: 22,
|
|
7
|
+
pitch: 0,
|
|
8
|
+
bearing: 0
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { INITIAL_VIEW_STATE };
|
|
12
|
+
//# sourceMappingURL=constants.js.map
|
|
13
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/maplibre/constants.ts"],"names":[],"mappings":"AAcO,MAAM,kBAAA,GAAqB;AAAA,EAChC,SAAA,EAAW,QAAA;AAAA,EACX,QAAA,EAAU,OAAA;AAAA,EACV,IAAA,EAAM,CAAA;AAAA,EACN,OAAA,EAAS,CAAA;AAAA,EACT,OAAA,EAAS,EAAA;AAAA,EACT,KAAA,EAAO,CAAA;AAAA,EACP,OAAA,EAAS;AACX","file":"constants.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// __private-exports\n\nexport const INITIAL_VIEW_STATE = {\n longitude: -77.0369,\n latitude: 38.9072,\n zoom: 4,\n minZoom: 1,\n maxZoom: 22,\n pitch: 0,\n bearing: 0,\n};\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Map } from 'maplibre-gl';
|
|
2
|
+
import { useRef, useEffect } from 'react';
|
|
3
|
+
|
|
4
|
+
function useMapLibre(deck, styleUrl, options) {
|
|
5
|
+
const mapRef = useRef(null);
|
|
6
|
+
const styleRef = useRef(styleUrl);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (deck && !mapRef.current) {
|
|
9
|
+
mapRef.current = new Map({
|
|
10
|
+
...options,
|
|
11
|
+
style: styleRef.current
|
|
12
|
+
});
|
|
13
|
+
mapRef.current.once("style.load", () => {
|
|
14
|
+
mapRef.current?.setProjection({ type: "mercator" });
|
|
15
|
+
mapRef.current?.addControl(deck);
|
|
16
|
+
});
|
|
17
|
+
return () => {
|
|
18
|
+
if (mapRef.current) {
|
|
19
|
+
mapRef.current.removeControl(deck);
|
|
20
|
+
mapRef.current.remove();
|
|
21
|
+
mapRef.current = null;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}, [deck, options]);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (mapRef.current) {
|
|
28
|
+
mapRef.current.setStyle(styleUrl);
|
|
29
|
+
}
|
|
30
|
+
}, [styleUrl]);
|
|
31
|
+
return mapRef.current;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { useMapLibre };
|
|
35
|
+
//# sourceMappingURL=use-maplibre.js.map
|
|
36
|
+
//# sourceMappingURL=use-maplibre.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/maplibre/hooks/use-maplibre.ts"],"names":["MapLibre"],"mappings":";;;AAeO,SAAS,WAAA,CACd,IAAA,EACA,QAAA,EACA,OAAA,EACA;AACA,EAAA,MAAM,MAAA,GAAS,OAAwB,IAAI,CAAA;AAE3C,EAAA,MAAM,QAAA,GAAW,OAAO,QAAQ,CAAA;AAGhC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,IAAA,IAAQ,CAAC,MAAA,CAAO,OAAA,EAAS;AAC3B,MAAA,MAAA,CAAO,OAAA,GAAU,IAAIA,GAAA,CAAS;AAAA,QAC5B,GAAG,OAAA;AAAA,QACH,OAAO,QAAA,CAAS;AAAA,OACjB,CAAA;AAED,MAAA,MAAA,CAAO,OAAA,CAAQ,IAAA,CAAK,YAAA,EAAc,MAAM;AACtC,QAAA,MAAA,CAAO,OAAA,EAAS,aAAA,CAAc,EAAE,IAAA,EAAM,YAAY,CAAA;AAClD,QAAA,MAAA,CAAO,OAAA,EAAS,WAAW,IAAI,CAAA;AAAA,MACjC,CAAC,CAAA;AAED,MAAA,OAAO,MAAM;AACX,QAAA,IAAI,OAAO,OAAA,EAAS;AAClB,UAAA,MAAA,CAAO,OAAA,CAAQ,cAAc,IAAI,CAAA;AACjC,UAAA,MAAA,CAAO,QAAQ,MAAA,EAAO;AACtB,UAAA,MAAA,CAAO,OAAA,GAAU,IAAA;AAAA,QACnB;AAAA,MACF,CAAA;AAAA,IACF;AAAA,EACF,CAAA,EAAG,CAAC,IAAA,EAAM,OAAO,CAAC,CAAA;AAGlB,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,OAAO,OAAA,EAAS;AAClB,MAAA,MAAA,CAAO,OAAA,CAAQ,SAAS,QAAQ,CAAA;AAAA,IAClC;AAAA,EACF,CAAA,EAAG,CAAC,QAAQ,CAAC,CAAA;AAEb,EAAA,OAAO,MAAA,CAAO,OAAA;AAChB","file":"use-maplibre.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\nimport { type IControl, Map as MapLibre, type MapOptions } from 'maplibre-gl';\nimport { useEffect, useRef } from 'react';\n\nexport function useMapLibre(\n deck: IControl | null,\n styleUrl: string,\n options: MapOptions,\n) {\n const mapRef = useRef<MapLibre | null>(null);\n // using a ref in the initial setup so that it doesn't cause a re-run of the effect on change\n const styleRef = useRef(styleUrl);\n\n // Initialize MapLibre instance once\n useEffect(() => {\n if (deck && !mapRef.current) {\n mapRef.current = new MapLibre({\n ...options,\n style: styleRef.current,\n });\n\n mapRef.current.once('style.load', () => {\n mapRef.current?.setProjection({ type: 'mercator' });\n mapRef.current?.addControl(deck);\n });\n\n return () => {\n if (mapRef.current) {\n mapRef.current.removeControl(deck);\n mapRef.current.remove();\n mapRef.current = null;\n }\n };\n }\n }, [deck, options]);\n\n // Update style when it changes\n useEffect(() => {\n if (mapRef.current) {\n mapRef.current.setStyle(styleUrl);\n }\n }, [styleUrl]);\n\n return mapRef.current;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}
|
package/dist/metafile-esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/index.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/deckgl/index.ts":{"bytes":1028,"imports":[],"format":"esm"},"src/decorators/deckgl.tsx":{"bytes":938,"imports":[],"format":"esm"},"src/maplibre/constants.ts":{"bytes":819,"imports":[],"format":"esm"},"src/maplibre/index.ts":{"bytes":750,"imports":[],"format":"esm"},"src/test/setup.ts":{"bytes":959,"imports":[],"format":"esm"},"src/deckgl/base-map/constants.ts":{"bytes":1129,"imports":[],"format":"esm"},"src/deckgl/base-map/events.ts":{"bytes":809,"imports":[],"format":"esm"},"src/deckgl/base-map/index.tsx":{"bytes":3886,"imports":[],"format":"esm"},"src/deckgl/base-map/types.ts":{"bytes":1829,"imports":[],"format":"esm"},"src/deckgl/symbol-layer/fiber.ts":{"bytes":1020,"imports":[],"format":"esm"},"src/deckgl/symbol-layer/index.ts":{"bytes":4786,"imports":[],"format":"esm"},"src/maplibre/hooks/use-maplibre.ts":{"bytes":1799,"imports":[],"format":"esm"}},"outputs":{"dist/deckgl/base-map/types.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/deckgl/base-map/types.js":{"imports":[],"exports":[],"entryPoint":"src/deckgl/base-map/types.ts","inputs":{"src/deckgl/base-map/types.ts":{"bytesInOutput":0}},"bytes":0},"dist/deckgl/symbol-layer/fiber.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1248},"dist/deckgl/symbol-layer/fiber.js":{"imports":[{"path":"@deckgl-fiber-renderer/dom","kind":"import-statement","external":true},{"path":"./index","kind":"import-statement","external":true}],"exports":[],"entryPoint":"src/deckgl/symbol-layer/fiber.ts","inputs":{"src/deckgl/symbol-layer/fiber.ts":{"bytesInOutput":117}},"bytes":117},"dist/deckgl/symbol-layer/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":6569},"dist/deckgl/symbol-layer/index.js":{"imports":[{"path":"@deck.gl/layers","kind":"import-statement","external":true},{"path":"milsymbol","kind":"import-statement","external":true}],"exports":["SymbolLayer"],"entryPoint":"src/deckgl/symbol-layer/index.ts","inputs":{"src/deckgl/symbol-layer/index.ts":{"bytesInOutput":2593}},"bytes":2619},"dist/maplibre/hooks/use-maplibre.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":2654},"dist/maplibre/hooks/use-maplibre.js":{"imports":[{"path":"maplibre-gl","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["useMapLibre"],"entryPoint":"src/maplibre/hooks/use-maplibre.ts","inputs":{"src/maplibre/hooks/use-maplibre.ts":{"bytesInOutput":873}},"bytes":899},"dist/deckgl/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1276},"dist/deckgl/index.js":{"imports":[{"path":"./base-map","kind":"import-statement","external":true},{"path":"./base-map/constants","kind":"import-statement","external":true},{"path":"./base-map/events","kind":"import-statement","external":true},{"path":"./symbol-layer","kind":"import-statement","external":true}],"exports":["BASE_MAP_STYLE","BaseMap","MapEvents","MapEventsNamespace","PARAMETERS","SymbolLayer","bus"],"entryPoint":"src/deckgl/index.ts","inputs":{"src/deckgl/index.ts":{"bytesInOutput":227}},"bytes":338},"dist/decorators/deckgl.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1224},"dist/decorators/deckgl.js":{"imports":[{"path":"react/jsx-runtime","kind":"import-statement","external":true},{"path":"../deckgl/base-map","kind":"import-statement","external":true}],"exports":["withDeckGL"],"entryPoint":"src/decorators/deckgl.tsx","inputs":{"src/decorators/deckgl.tsx":{"bytesInOutput":257}},"bytes":282},"dist/maplibre/constants.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1102},"dist/maplibre/constants.js":{"imports":[],"exports":["INITIAL_VIEW_STATE"],"entryPoint":"src/maplibre/constants.ts","inputs":{"src/maplibre/constants.ts":{"bytesInOutput":141}},"bytes":174},"dist/maplibre/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":927},"dist/maplibre/index.js":{"imports":[{"path":"./constants","kind":"import-statement","external":true},{"path":"./hooks/use-maplibre","kind":"import-statement","external":true}],"exports":["INITIAL_VIEW_STATE","useMapLibre"],"entryPoint":"src/maplibre/index.ts","inputs":{"src/maplibre/index.ts":{"bytesInOutput":102}},"bytes":150},"dist/test/setup.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1237},"dist/test/setup.js":{"imports":[{"path":"@testing-library/jest-dom/matchers","kind":"import-statement","external":true},{"path":"@testing-library/react","kind":"import-statement","external":true},{"path":"vitest","kind":"import-statement","external":true}],"exports":[],"entryPoint":"src/test/setup.ts","inputs":{"src/test/setup.ts":{"bytesInOutput":258}},"bytes":258},"dist/deckgl/base-map/constants.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1523},"dist/deckgl/base-map/constants.js":{"imports":[],"exports":["BASE_MAP_STYLE","PARAMETERS"],"entryPoint":"src/deckgl/base-map/constants.ts","inputs":{"src/deckgl/base-map/constants.ts":{"bytesInOutput":442}},"bytes":485},"dist/deckgl/base-map/events.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1061},"dist/deckgl/base-map/events.js":{"imports":[],"exports":["MapEvents","MapEventsNamespace"],"entryPoint":"src/deckgl/base-map/events.ts","inputs":{"src/deckgl/base-map/events.ts":{"bytesInOutput":136}},"bytes":182},"dist/deckgl/base-map/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":5591},"dist/deckgl/base-map/index.js":{"imports":[{"path":"react/jsx-runtime","kind":"import-statement","external":true},{"path":"client-only","kind":"import-statement","external":true},{"path":"@accelint/bus","kind":"import-statement","external":true},{"path":"@accelint/bus/react","kind":"import-statement","external":true},{"path":"@deckgl-fiber-renderer/dom","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"../../maplibre/constants","kind":"import-statement","external":true},{"path":"../../maplibre/hooks/use-maplibre","kind":"import-statement","external":true},{"path":"./constants","kind":"import-statement","external":true},{"path":"./events","kind":"import-statement","external":true}],"exports":["BaseMap","bus"],"entryPoint":"src/deckgl/base-map/index.tsx","inputs":{"src/deckgl/base-map/index.tsx":{"bytesInOutput":2332}},"bytes":2375}}}
|
package/dist/test/setup.js
CHANGED
package/dist/test/setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/test/setup.ts"],"names":[],"mappings":";;;;AAgBA,MAAA,CAAO,OAAO,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"sources":["../../src/test/setup.ts"],"names":[],"mappings":";;;;AAgBA,MAAA,CAAO,OAAO,QAAQ,CAAA;AAGtB,UAAA,CAAW,cAAc,OAAA,CAAQ,KAAA;AAEjC,SAAA,CAAU,MAAM;AACd,EAAA,OAAA,EAAQ;AACV,CAAC,CAAA","file":"setup.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\nimport * as matchers from '@testing-library/jest-dom/matchers';\nimport { cleanup } from '@testing-library/react';\nimport { afterEach, expect } from 'vitest';\n\nexpect.extend(matchers);\n\n// Add browser globals that jsdom doesn't provide\nglobalThis.reportError = console.error;\n\nafterEach(() => {\n cleanup();\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accelint/map-toolkit",
|
|
3
|
-
"
|
|
3
|
+
"title": "Accelint Map Toolkit",
|
|
4
|
+
"version": "0.1.0",
|
|
4
5
|
"private": false,
|
|
5
6
|
"license": "Apache-2.0",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"deckgl",
|
|
9
|
+
"geospatial",
|
|
10
|
+
"map-tk",
|
|
11
|
+
"maplibre"
|
|
12
|
+
],
|
|
13
|
+
"description": "A collection of components and utilities to simplify visualizing and working with geospatial data.",
|
|
6
14
|
"repository": {
|
|
7
15
|
"type": "git",
|
|
8
16
|
"url": "https://github.com/gohypergiant/standard-toolkit"
|
|
9
17
|
},
|
|
18
|
+
"owner": "default/pathfinder",
|
|
19
|
+
"subPath": "packages/map-toolkit",
|
|
10
20
|
"type": "module",
|
|
11
21
|
"files": [
|
|
12
|
-
"dist/**"
|
|
22
|
+
"./dist/**",
|
|
23
|
+
"./catalog-info.yaml",
|
|
24
|
+
"./CHANGELOG.md",
|
|
25
|
+
"./package.json",
|
|
26
|
+
"./README.md"
|
|
13
27
|
],
|
|
14
28
|
"types": "./dist/index.d.ts",
|
|
15
29
|
"exports": {
|
|
@@ -20,26 +34,77 @@
|
|
|
20
34
|
},
|
|
21
35
|
"default": "./dist/*/index.js"
|
|
22
36
|
},
|
|
23
|
-
"
|
|
37
|
+
"./*/fiber": {
|
|
38
|
+
"import": {
|
|
39
|
+
"types": "./dist/*/fiber.d.ts",
|
|
40
|
+
"default": "./dist/*/fiber.js"
|
|
41
|
+
},
|
|
42
|
+
"default": "./dist/*/fiber.js"
|
|
43
|
+
}
|
|
24
44
|
},
|
|
25
45
|
"devDependencies": {
|
|
46
|
+
"@deck.gl/core": "9.1.14",
|
|
47
|
+
"@deck.gl/extensions": "^9.1.14",
|
|
48
|
+
"@deck.gl/geo-layers": "^9.1.14",
|
|
49
|
+
"@deck.gl/layers": "9.1.14",
|
|
50
|
+
"@deck.gl/mapbox": "^9.1.14",
|
|
51
|
+
"@deck.gl/mesh-layers": "^9.1.14",
|
|
52
|
+
"@deck.gl/widgets": "^9.1.14",
|
|
53
|
+
"@deckgl-fiber-renderer/dom": "1.4.0",
|
|
54
|
+
"@deckgl-fiber-renderer/shared": "^1.4.0",
|
|
55
|
+
"@deckgl-fiber-renderer/types": "^1.4.0",
|
|
56
|
+
"@storybook/addon-actions": "^8.6.14",
|
|
57
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
58
|
+
"@storybook/addon-storysource": "^8.6.14",
|
|
59
|
+
"@storybook/blocks": "^8.6.14",
|
|
60
|
+
"@storybook/builder-vite": "^8.6.14",
|
|
61
|
+
"@storybook/manager-api": "^8.6.14",
|
|
62
|
+
"@storybook/react": "^8.6.14",
|
|
63
|
+
"@storybook/react-vite": "^8.6.14",
|
|
64
|
+
"@tailwindcss/vite": "^4.1.11",
|
|
26
65
|
"@testing-library/dom": "^10.4.1",
|
|
27
66
|
"@testing-library/jest-dom": "^6.6.4",
|
|
28
67
|
"@testing-library/react": "^16.3.0",
|
|
68
|
+
"@testing-library/user-event": "^14.6.1",
|
|
29
69
|
"@types/react": "^19.1.9",
|
|
70
|
+
"client-only": "^0.0.1",
|
|
30
71
|
"esbuild-fix-imports-plugin": "1.0.21",
|
|
72
|
+
"maplibre-gl": "^5.7.1",
|
|
73
|
+
"milsymbol": "3.0.2",
|
|
74
|
+
"mjolnir.js": "^3.0.0",
|
|
75
|
+
"node-fetch": "2.6.7",
|
|
31
76
|
"react": "^19.0.0",
|
|
77
|
+
"storybook": "^8.6.14",
|
|
78
|
+
"tailwindcss": "^4.1.11",
|
|
32
79
|
"tsup": "8.5.0",
|
|
80
|
+
"typescript": "^5.8.3",
|
|
81
|
+
"vite": "^5.4.9",
|
|
33
82
|
"vitest": "2.1.3",
|
|
34
83
|
"vitest-broadcast-channel-mock": "0.1.0",
|
|
35
|
-
"@accelint/
|
|
36
|
-
"@accelint/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"typescript": "
|
|
84
|
+
"@accelint/biome-config": "1.0.1",
|
|
85
|
+
"@accelint/bus": "1.4.0",
|
|
86
|
+
"@accelint/constellation-tracker": "1.0.0",
|
|
87
|
+
"@accelint/design-toolkit": "6.0.0",
|
|
88
|
+
"@accelint/typescript-config": "0.1.3",
|
|
89
|
+
"@accelint/vitest-config": "0.1.4"
|
|
40
90
|
},
|
|
41
91
|
"optionalDependencies": {
|
|
42
|
-
"
|
|
92
|
+
"@deck.gl/core": "9.1.14",
|
|
93
|
+
"@deck.gl/extensions": "^9.1.14",
|
|
94
|
+
"@deck.gl/geo-layers": "^9.1.14",
|
|
95
|
+
"@deck.gl/layers": "9.1.14",
|
|
96
|
+
"@deck.gl/mapbox": "^9.1.14",
|
|
97
|
+
"@deck.gl/mesh-layers": "^9.1.14",
|
|
98
|
+
"@deck.gl/widgets": "^9.1.14",
|
|
99
|
+
"@deckgl-fiber-renderer/dom": "1.4.0",
|
|
100
|
+
"@deckgl-fiber-renderer/shared": "^1.4.0",
|
|
101
|
+
"@deckgl-fiber-renderer/types": "^1.4.0",
|
|
102
|
+
"maplibre-gl": "^5.7.1",
|
|
103
|
+
"milsymbol": "3.0.2",
|
|
104
|
+
"mjolnir.js": "^3.0.0",
|
|
105
|
+
"react": "^19.0.0",
|
|
106
|
+
"typescript": "^5.8.3",
|
|
107
|
+
"@accelint/bus": "1.4.0"
|
|
43
108
|
},
|
|
44
109
|
"$schema": "https://json.schemastore.org/package",
|
|
45
110
|
"author": "https://hypergiant.com",
|
|
@@ -50,10 +115,12 @@
|
|
|
50
115
|
"scripts": {
|
|
51
116
|
"bench": "pnpm vitest bench --run --dir src",
|
|
52
117
|
"build": "pnpm tsup",
|
|
118
|
+
"constellation-tracker": "constellation-tracker",
|
|
53
119
|
"dev": "pnpm tsc --watch",
|
|
54
|
-
"index": "pnpm zx ../../scripts/indexer.mjs packages/map-toolkit",
|
|
55
120
|
"lint": "pnpm biome lint",
|
|
56
121
|
"test": "pnpm vitest --dir=src",
|
|
57
|
-
"test:watch": "pnpm vitest --dir=src --watch"
|
|
122
|
+
"test:watch": "pnpm vitest --dir=src --watch",
|
|
123
|
+
"preview": "pnpm storybook dev -p 6006",
|
|
124
|
+
"build-storybook": "pnpm storybook build"
|
|
58
125
|
}
|
|
59
126
|
}
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED