@accelint/map-toolkit 0.3.1 → 0.4.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 +13 -0
- package/catalog-info.yaml +5 -5
- package/dist/cursor-coordinates/index.d.ts +14 -3
- package/dist/cursor-coordinates/index.js +16 -3
- package/dist/cursor-coordinates/use-cursor-coordinates.d.ts +20 -6
- package/dist/cursor-coordinates/use-cursor-coordinates.js +247 -128
- package/dist/cursor-coordinates/use-cursor-coordinates.js.map +1 -1
- package/dist/deckgl/base-map/constants.d.ts +14 -12
- package/dist/deckgl/base-map/constants.js +26 -12
- package/dist/deckgl/base-map/constants.js.map +1 -1
- package/dist/deckgl/base-map/events.d.ts +6 -4
- package/dist/deckgl/base-map/events.js +18 -4
- package/dist/deckgl/base-map/events.js.map +1 -1
- package/dist/deckgl/base-map/index.d.ts +45 -18
- package/dist/deckgl/base-map/index.js +216 -148
- package/dist/deckgl/base-map/index.js.map +1 -1
- package/dist/deckgl/base-map/provider.d.ts +48 -32
- package/dist/deckgl/base-map/provider.js +122 -11
- package/dist/deckgl/base-map/provider.js.map +1 -1
- package/dist/deckgl/base-map/types.d.ts +49 -39
- package/dist/deckgl/base-map/types.js +11 -2
- package/dist/deckgl/index.d.ts +18 -13
- package/dist/deckgl/index.js +19 -6
- package/dist/deckgl/symbol-layer/fiber.d.ts +21 -10
- package/dist/deckgl/symbol-layer/fiber.js +18 -3
- package/dist/deckgl/symbol-layer/fiber.js.map +1 -1
- package/dist/deckgl/symbol-layer/index.d.ts +68 -54
- package/dist/deckgl/symbol-layer/index.js +105 -85
- package/dist/deckgl/symbol-layer/index.js.map +1 -1
- package/dist/deckgl/text-layer/character-sets.d.ts +19 -17
- package/dist/deckgl/text-layer/character-sets.js +40 -19
- package/dist/deckgl/text-layer/character-sets.js.map +1 -1
- package/dist/deckgl/text-layer/default-settings.d.ts +16 -2
- package/dist/deckgl/text-layer/default-settings.js +42 -18
- package/dist/deckgl/text-layer/default-settings.js.map +1 -1
- package/dist/deckgl/text-layer/fiber.d.ts +38 -27
- package/dist/deckgl/text-layer/fiber.js +18 -3
- package/dist/deckgl/text-layer/fiber.js.map +1 -1
- package/dist/deckgl/text-layer/index.d.ts +39 -25
- package/dist/deckgl/text-layer/index.js +47 -29
- package/dist/deckgl/text-layer/index.js.map +1 -1
- package/dist/decorators/deckgl.d.ts +16 -2
- package/dist/decorators/deckgl.js +25 -7
- package/dist/decorators/deckgl.js.map +1 -1
- package/dist/map-cursor/events.d.ts +16 -0
- package/dist/map-cursor/events.js +27 -0
- package/dist/map-cursor/events.js.map +1 -0
- package/dist/map-cursor/index.d.ts +17 -0
- package/dist/map-cursor/index.js +18 -0
- package/dist/map-cursor/store.d.ts +93 -0
- package/dist/map-cursor/store.js +351 -0
- package/dist/map-cursor/store.js.map +1 -0
- package/dist/map-cursor/types.d.ts +81 -0
- package/dist/map-cursor/types.js +12 -0
- package/dist/map-cursor/use-map-cursor.d.ts +99 -0
- package/dist/map-cursor/use-map-cursor.js +116 -0
- package/dist/map-cursor/use-map-cursor.js.map +1 -0
- package/dist/map-mode/events.d.ts +11 -9
- package/dist/map-mode/events.js +43 -9
- package/dist/map-mode/events.js.map +1 -1
- package/dist/map-mode/index.d.ts +17 -6
- package/dist/map-mode/index.js +18 -5
- package/dist/map-mode/store.d.ts +26 -3
- package/dist/map-mode/store.js +329 -265
- package/dist/map-mode/store.js.map +1 -1
- package/dist/map-mode/types.d.ts +49 -35
- package/dist/map-mode/types.js +11 -2
- package/dist/map-mode/use-map-mode.d.ts +21 -7
- package/dist/map-mode/use-map-mode.js +66 -23
- package/dist/map-mode/use-map-mode.js.map +1 -1
- package/dist/maplibre/constants.d.ts +10 -8
- package/dist/maplibre/constants.js +22 -8
- package/dist/maplibre/constants.js.map +1 -1
- package/dist/maplibre/hooks/use-maplibre.d.ts +17 -2
- package/dist/maplibre/hooks/use-maplibre.js +77 -31
- package/dist/maplibre/hooks/use-maplibre.js.map +1 -1
- package/dist/maplibre/index.d.ts +15 -3
- package/dist/maplibre/index.js +17 -4
- package/dist/viewport/constants.d.ts +8 -6
- package/dist/viewport/constants.js +20 -6
- package/dist/viewport/constants.js.map +1 -1
- package/dist/viewport/index.d.ts +18 -13
- package/dist/viewport/index.js +19 -6
- package/dist/viewport/types.d.ts +27 -17
- package/dist/viewport/types.js +11 -2
- package/dist/viewport/use-viewport-state.d.ts +29 -14
- package/dist/viewport/use-viewport-state.js +200 -87
- package/dist/viewport/use-viewport-state.js.map +1 -1
- package/dist/viewport/utils.d.ts +25 -10
- package/dist/viewport/utils.js +67 -37
- package/dist/viewport/utils.js.map +1 -1
- package/dist/viewport/viewport-size.d.ts +27 -15
- package/dist/viewport/viewport-size.js +54 -11
- package/dist/viewport/viewport-size.js.map +1 -1
- package/package.json +55 -28
- package/dist/cursor-coordinates/index.js.map +0 -1
- package/dist/deckgl/base-map/types.js.map +0 -1
- package/dist/deckgl/index.js.map +0 -1
- package/dist/map-mode/index.js.map +0 -1
- package/dist/map-mode/types.js.map +0 -1
- package/dist/maplibre/index.js.map +0 -1
- package/dist/metafile-esm.json +0 -1
- package/dist/viewport/index.js.map +0 -1
- package/dist/viewport/types.js.map +0 -1
|
@@ -1,63 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
import { IconLayer, IconLayerProps } from "@deck.gl/layers";
|
|
14
|
+
import { SymbolOptions } from "milsymbol";
|
|
15
|
+
import { AccessorContext, AccessorFunction, DefaultProps } from "@deck.gl/core";
|
|
4
16
|
|
|
17
|
+
//#region src/deckgl/symbol-layer/index.d.ts
|
|
5
18
|
type _SymbolLayerProps<TData = unknown> = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
/**
|
|
20
|
+
* An accessor function that returns the SIDC for a given data point.
|
|
21
|
+
*/
|
|
22
|
+
getSidc?: AccessorFunction<TData, string | number | bigint>;
|
|
23
|
+
/**
|
|
24
|
+
* An accessor function that returns symbol options for a given data point.
|
|
25
|
+
*/
|
|
26
|
+
getSymbolOptions?: AccessorFunction<TData, SymbolOptions | null>;
|
|
27
|
+
/**
|
|
28
|
+
* Default symbol options to use when rendering symbols.
|
|
29
|
+
*/
|
|
30
|
+
defaultSymbolOptions?: SymbolOptions;
|
|
18
31
|
};
|
|
19
32
|
type SymbolLayerProps<TData = unknown> = _SymbolLayerProps<TData> & Omit<IconLayerProps<TData>, 'getIcon' | 'getColor' | 'iconAtlas' | 'iconMapping'>;
|
|
20
33
|
/**
|
|
21
34
|
* Provides a layer for rendering MIL-STD-2525 and APP-6 symbols.
|
|
22
35
|
*/
|
|
23
36
|
declare class SymbolLayer<TData = unknown, TExtraProps extends {} = {}> extends IconLayer<TData, TExtraProps & Required<_SymbolLayerProps<TData>>> {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
37
|
+
static defaultProps: DefaultProps<SymbolLayerProps<unknown>>;
|
|
38
|
+
static layerName: string;
|
|
39
|
+
/**
|
|
40
|
+
* The default symbol options to use when rendering symbols.
|
|
41
|
+
*
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
protected defaultOptions: SymbolOptions;
|
|
45
|
+
/**
|
|
46
|
+
* Caches the results of the icon generation
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
* @todo Use LRU cache to limit memory usage.
|
|
50
|
+
*/
|
|
51
|
+
protected generationCache: Map<string, string>;
|
|
52
|
+
constructor(...args: Partial<SymbolLayerProps<TData>>[]);
|
|
53
|
+
/**
|
|
54
|
+
* Generates an icon using the provided SIDC and symbol options.
|
|
55
|
+
*
|
|
56
|
+
* @param data A point's data
|
|
57
|
+
* @param info Contextual information about the point
|
|
58
|
+
* @returns DeckGL Icon Object
|
|
59
|
+
*/
|
|
60
|
+
protected generateIcon: (data: TData, info: AccessorContext<TData>) => {
|
|
61
|
+
id: string;
|
|
62
|
+
url: string;
|
|
63
|
+
height: number;
|
|
64
|
+
width: number;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Generates a cache key for the given SIDC and symbol options.
|
|
68
|
+
*
|
|
69
|
+
* @param sidc SIDC of the symbol
|
|
70
|
+
* @param options Options used to generate the symbol
|
|
71
|
+
* @returns String key for caching
|
|
72
|
+
*/
|
|
73
|
+
protected generateCacheKey(sidc: string, options: SymbolOptions): string;
|
|
61
74
|
}
|
|
62
|
-
|
|
63
|
-
export { SymbolLayer,
|
|
75
|
+
//#endregion
|
|
76
|
+
export { SymbolLayer, SymbolLayerProps };
|
|
77
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,92 +1,112 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
*/
|
|
3
12
|
|
|
13
|
+
|
|
14
|
+
import { IconLayer } from "@deck.gl/layers";
|
|
15
|
+
import ms from "milsymbol";
|
|
16
|
+
|
|
17
|
+
//#region src/deckgl/symbol-layer/index.ts
|
|
4
18
|
const MilSymbol = ms.Symbol;
|
|
5
19
|
const defaultProps = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
20
|
+
getSidc: {
|
|
21
|
+
type: "accessor",
|
|
22
|
+
value: (x) => x.sidc
|
|
23
|
+
},
|
|
24
|
+
getSymbolOptions: {
|
|
25
|
+
type: "accessor",
|
|
26
|
+
value: () => null
|
|
27
|
+
},
|
|
28
|
+
getSize: {
|
|
29
|
+
type: "accessor",
|
|
30
|
+
value: 32
|
|
31
|
+
},
|
|
32
|
+
defaultSymbolOptions: {
|
|
33
|
+
type: "object",
|
|
34
|
+
value: {}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Provides a layer for rendering MIL-STD-2525 and APP-6 symbols.
|
|
39
|
+
*/
|
|
40
|
+
var SymbolLayer = class extends IconLayer {
|
|
41
|
+
static defaultProps = defaultProps;
|
|
42
|
+
static layerName = "SymbolLayer";
|
|
43
|
+
/**
|
|
44
|
+
* The default symbol options to use when rendering symbols.
|
|
45
|
+
*
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
defaultOptions;
|
|
49
|
+
/**
|
|
50
|
+
* Caches the results of the icon generation
|
|
51
|
+
*
|
|
52
|
+
* @internal
|
|
53
|
+
* @todo Use LRU cache to limit memory usage.
|
|
54
|
+
*/
|
|
55
|
+
generationCache = /* @__PURE__ */ new Map();
|
|
56
|
+
constructor(...args) {
|
|
57
|
+
const customGetIcons = { getIcon: (data, info) => this.generateIcon(data, info) };
|
|
58
|
+
super(...args, customGetIcons);
|
|
59
|
+
this.defaultOptions = {
|
|
60
|
+
size: 100,
|
|
61
|
+
colorMode: "Dark",
|
|
62
|
+
...this.props.defaultSymbolOptions
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Generates an icon using the provided SIDC and symbol options.
|
|
67
|
+
*
|
|
68
|
+
* @param data A point's data
|
|
69
|
+
* @param info Contextual information about the point
|
|
70
|
+
* @returns DeckGL Icon Object
|
|
71
|
+
*/
|
|
72
|
+
generateIcon = (data, info) => {
|
|
73
|
+
const { getSidc, getSymbolOptions } = this.props;
|
|
74
|
+
const sidc = getSidc(data, info).toString();
|
|
75
|
+
let currentSymbolOptions = this.defaultOptions;
|
|
76
|
+
const localOptions = getSymbolOptions(data, info);
|
|
77
|
+
if (localOptions) currentSymbolOptions = {
|
|
78
|
+
...currentSymbolOptions,
|
|
79
|
+
...localOptions
|
|
80
|
+
};
|
|
81
|
+
const size = currentSymbolOptions.size;
|
|
82
|
+
const cacheKey = this.generateCacheKey(sidc, currentSymbolOptions);
|
|
83
|
+
if (this.generationCache.has(cacheKey)) return {
|
|
84
|
+
id: cacheKey,
|
|
85
|
+
url: this.generationCache.get(cacheKey),
|
|
86
|
+
height: size,
|
|
87
|
+
width: size
|
|
88
|
+
};
|
|
89
|
+
const dataUrl = new MilSymbol(sidc, currentSymbolOptions).toDataURL();
|
|
90
|
+
this.generationCache.set(cacheKey, dataUrl);
|
|
91
|
+
return {
|
|
92
|
+
id: cacheKey,
|
|
93
|
+
url: dataUrl,
|
|
94
|
+
height: size,
|
|
95
|
+
width: size
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Generates a cache key for the given SIDC and symbol options.
|
|
100
|
+
*
|
|
101
|
+
* @param sidc SIDC of the symbol
|
|
102
|
+
* @param options Options used to generate the symbol
|
|
103
|
+
* @returns String key for caching
|
|
104
|
+
*/
|
|
105
|
+
generateCacheKey(sidc, options) {
|
|
106
|
+
return `${sidc}-${JSON.stringify(options)}`;
|
|
107
|
+
}
|
|
11
108
|
};
|
|
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
109
|
|
|
110
|
+
//#endregion
|
|
90
111
|
export { SymbolLayer };
|
|
91
|
-
//# sourceMappingURL=index.js.map
|
|
92
112
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["defaultProps: DefaultProps<SymbolLayerProps>"],"sources":["../../../src/deckgl/symbol-layer/index.ts"],"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"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAM,YAAY,GAAG;AAuBrB,MAAMA,eAA+C;CAEnD,SAAS;EAAE,MAAM;EAAY,QAAQ,MAAW,EAAE;EAAM;CACxD,kBAAkB;EAAE,MAAM;EAAY,aAAa;EAAM;CACzD,SAAS;EAAE,MAAM;EAAY,OAAO;EAAI;CACxC,sBAAsB;EAAE,MAAM;EAAU,OAAO,EAAE;EAAE;CACpD;;;;AAKD,IAAa,cAAb,cAIU,UAAmE;CAC3E,OAAgB,eAAe;CAC/B,OAAgB,YAAY;;;;;;CAO5B,AAAU;;;;;;;CAQV,AAAU,kCAAkB,IAAI,KAAqB;CAErD,YAAY,GAAG,MAA0C;EAEvD,MAAM,iBAAiB,EACrB,UAAU,MAAa,SACrB,KAAK,aAAa,MAAM,KAAK,EAChC;AAGD,QAAM,GAAI,MAAc,eAAsB;AAG9C,OAAK,iBAAiB;GACpB,MAAM;GACN,WAAW;GACX,GAAG,KAAK,MAAM;GACf;;;;;;;;;CAUH,AAAU,gBAAgB,MAAa,SAAiC;EACtE,MAAM,EAAE,SAAS,qBAAqB,KAAK;EAC3C,MAAM,OAAO,QAAQ,MAAM,KAAK,CAAC,UAAU;EAE3C,IAAI,uBAAuB,KAAK;EAEhC,MAAM,eAAe,iBAAiB,MAAM,KAAK;AAEjD,MAAI,aACF,wBAAuB;GACrB,GAAG;GACH,GAAG;GACJ;EAGH,MAAM,OAAO,qBAAqB;EAElC,MAAM,WAAW,KAAK,iBAAiB,MAAM,qBAAqB;AAElE,MAAI,KAAK,gBAAgB,IAAI,SAAS,CAGpC,QAAO;GACL,IAAI;GACJ,KAJgB,KAAK,gBAAgB,IAAI,SAAS;GAKlD,QAAQ;GACR,OAAO;GACR;EAGH,MAAM,UAAU,IAAI,UAAU,MAAM,qBAAqB,CAAC,WAAW;AAErE,OAAK,gBAAgB,IAAI,UAAU,QAAQ;AAS3C,SAPmB;GACjB,IAAI;GACJ,KAAK;GACL,QAAQ;GACR,OAAO;GACR;;;;;;;;;CAYH,AAAU,iBAAiB,MAAc,SAAwB;AAC/D,SAAO,GAAG,KAAK,GAAG,KAAK,UAAU,QAAQ"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/deckgl/text-layer/character-sets.d.ts
|
|
1
2
|
type CharacterSetsKeys = keyof typeof CHARACTER_SETS;
|
|
2
3
|
/**
|
|
3
4
|
* Predefined character sets for TextLayer.
|
|
@@ -7,21 +8,22 @@ type CharacterSetsKeys = keyof typeof CHARACTER_SETS;
|
|
|
7
8
|
* EXPANDED includes ASCII and Latin characters with diacritics for international text.
|
|
8
9
|
*/
|
|
9
10
|
declare const CHARACTER_SETS: Readonly<{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
readonly ALL_NUMBERS: "1234567890";
|
|
12
|
+
readonly ASCII_ALL: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
|
|
13
|
+
readonly ASCII_ALPHA_NUMERIC: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
|
14
|
+
readonly ASCII_LETTERS: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
15
|
+
readonly ASCII_LETTERS_LOWERCASE: "abcdefghijklmnopqrstuvwxyz";
|
|
16
|
+
readonly ASCII_LETTERS_UPPERCASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
17
|
+
readonly ASCII_SYMBOLS: " !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
|
|
18
|
+
readonly AUTO: "auto";
|
|
19
|
+
readonly EXPANDED: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890 ¡¿¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
|
|
20
|
+
readonly LATIN_ALL: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890 ¡¿¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
|
|
21
|
+
readonly LATIN_ALPHA_NUMERIC: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890";
|
|
22
|
+
readonly LATIN_LETTERS: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ";
|
|
23
|
+
readonly LATIN_LETTERS_LOWERCASE: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿß";
|
|
24
|
+
readonly LATIN_LETTERS_UPPERCASE: "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ";
|
|
25
|
+
readonly LATIN_SYMBOLS: " ¡¿¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
|
|
25
26
|
}>;
|
|
26
|
-
|
|
27
|
-
export { CHARACTER_SETS,
|
|
27
|
+
//#endregion
|
|
28
|
+
export { CHARACTER_SETS, CharacterSetsKeys };
|
|
29
|
+
//# sourceMappingURL=character-sets.d.ts.map
|
|
@@ -1,3 +1,17 @@
|
|
|
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 src/deckgl/text-layer/character-sets.ts
|
|
1
15
|
const ALL_NUMBERS = "1234567890";
|
|
2
16
|
const ASCII_LETTERS_LOWERCASE = "abcdefghijklmnopqrstuvwxyz";
|
|
3
17
|
const ASCII_LETTERS_UPPERCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
@@ -6,31 +20,38 @@ const ASCII_LETTERS = `${ASCII_LETTERS_LOWERCASE}${ASCII_LETTERS_UPPERCASE}`;
|
|
|
6
20
|
const ASCII_ALPHA_NUMERIC = `${ASCII_LETTERS}${ALL_NUMBERS}`;
|
|
7
21
|
const ASCII_ALL = `${ASCII_LETTERS}${ALL_NUMBERS}${ASCII_SYMBOLS}`;
|
|
8
22
|
const AUTO = "auto";
|
|
9
|
-
const LATIN_LETTERS_LOWERCASE = "
|
|
10
|
-
const LATIN_LETTERS_UPPERCASE = "
|
|
11
|
-
const LATIN_SYMBOLS = "
|
|
23
|
+
const LATIN_LETTERS_LOWERCASE = "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿß";
|
|
24
|
+
const LATIN_LETTERS_UPPERCASE = "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ";
|
|
25
|
+
const LATIN_SYMBOLS = " ¡¿¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
|
|
12
26
|
const LATIN_LETTERS = `${LATIN_LETTERS_LOWERCASE}${LATIN_LETTERS_UPPERCASE}`;
|
|
13
27
|
const LATIN_ALPHA_NUMERIC = `${LATIN_LETTERS}${ALL_NUMBERS}`;
|
|
14
28
|
const LATIN_ALL = `${LATIN_LETTERS}${ALL_NUMBERS}${LATIN_SYMBOLS}`;
|
|
15
29
|
const EXPANDED = `${ASCII_ALL}${LATIN_ALL}`;
|
|
30
|
+
/**
|
|
31
|
+
* Predefined character sets for TextLayer.
|
|
32
|
+
*
|
|
33
|
+
* Use smaller character sets (ASCII_ALL, ASCII_ALPHA_NUMERIC) for better performance,
|
|
34
|
+
* or use AUTO for dynamic optimization based on content.
|
|
35
|
+
* EXPANDED includes ASCII and Latin characters with diacritics for international text.
|
|
36
|
+
*/
|
|
16
37
|
const CHARACTER_SETS = Object.freeze({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
ALL_NUMBERS,
|
|
39
|
+
ASCII_ALL,
|
|
40
|
+
ASCII_ALPHA_NUMERIC,
|
|
41
|
+
ASCII_LETTERS,
|
|
42
|
+
ASCII_LETTERS_LOWERCASE,
|
|
43
|
+
ASCII_LETTERS_UPPERCASE,
|
|
44
|
+
ASCII_SYMBOLS,
|
|
45
|
+
AUTO,
|
|
46
|
+
EXPANDED,
|
|
47
|
+
LATIN_ALL,
|
|
48
|
+
LATIN_ALPHA_NUMERIC,
|
|
49
|
+
LATIN_LETTERS,
|
|
50
|
+
LATIN_LETTERS_LOWERCASE,
|
|
51
|
+
LATIN_LETTERS_UPPERCASE,
|
|
52
|
+
LATIN_SYMBOLS
|
|
32
53
|
});
|
|
33
54
|
|
|
55
|
+
//#endregion
|
|
34
56
|
export { CHARACTER_SETS };
|
|
35
|
-
//# sourceMappingURL=character-sets.js.map
|
|
36
57
|
//# sourceMappingURL=character-sets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"character-sets.js","names":[],"sources":["../../../src/deckgl/text-layer/character-sets.ts"],"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\nconst ALL_NUMBERS = '1234567890';\n\nconst ASCII_LETTERS_LOWERCASE = 'abcdefghijklmnopqrstuvwxyz';\nconst ASCII_LETTERS_UPPERCASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nconst ASCII_SYMBOLS = ' !\"#$%&\\'()*+,-./:;<=>?@[]^_`{|}~';\n\nconst ASCII_LETTERS = `${ASCII_LETTERS_LOWERCASE}${ASCII_LETTERS_UPPERCASE}`;\nconst ASCII_ALPHA_NUMERIC = `${ASCII_LETTERS}${ALL_NUMBERS}`;\nconst ASCII_ALL = `${ASCII_LETTERS}${ALL_NUMBERS}${ASCII_SYMBOLS}`;\n\nconst AUTO = 'auto';\n\nconst LATIN_LETTERS_LOWERCASE = 'àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿß';\nconst LATIN_LETTERS_UPPERCASE = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ';\nconst LATIN_SYMBOLS = ' ¡¿¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷';\n\nconst LATIN_LETTERS = `${LATIN_LETTERS_LOWERCASE}${LATIN_LETTERS_UPPERCASE}`;\nconst LATIN_ALPHA_NUMERIC = `${LATIN_LETTERS}${ALL_NUMBERS}`;\nconst LATIN_ALL = `${LATIN_LETTERS}${ALL_NUMBERS}${LATIN_SYMBOLS}`;\n\nconst EXPANDED = `${ASCII_ALL}${LATIN_ALL}`;\n\nexport type CharacterSetsKeys = keyof typeof CHARACTER_SETS;\n\n/**\n * Predefined character sets for TextLayer.\n *\n * Use smaller character sets (ASCII_ALL, ASCII_ALPHA_NUMERIC) for better performance,\n * or use AUTO for dynamic optimization based on content.\n * EXPANDED includes ASCII and Latin characters with diacritics for international text.\n */\nexport const CHARACTER_SETS = Object.freeze({\n ALL_NUMBERS,\n\n ASCII_ALL,\n ASCII_ALPHA_NUMERIC,\n ASCII_LETTERS,\n ASCII_LETTERS_LOWERCASE,\n ASCII_LETTERS_UPPERCASE,\n ASCII_SYMBOLS,\n\n AUTO,\n EXPANDED,\n\n LATIN_ALL,\n LATIN_ALPHA_NUMERIC,\n LATIN_LETTERS,\n LATIN_LETTERS_LOWERCASE,\n LATIN_LETTERS_UPPERCASE,\n LATIN_SYMBOLS,\n} as const);\n"],"mappings":";;;;;;;;;;;;;;AAYA,MAAM,cAAc;AAEpB,MAAM,0BAA0B;AAChC,MAAM,0BAA0B;AAChC,MAAM,gBAAgB;AAEtB,MAAM,gBAAgB,GAAG,0BAA0B;AACnD,MAAM,sBAAsB,GAAG,gBAAgB;AAC/C,MAAM,YAAY,GAAG,gBAAgB,cAAc;AAEnD,MAAM,OAAO;AAEb,MAAM,0BAA0B;AAChC,MAAM,0BAA0B;AAChC,MAAM,gBAAgB;AAEtB,MAAM,gBAAgB,GAAG,0BAA0B;AACnD,MAAM,sBAAsB,GAAG,gBAAgB;AAC/C,MAAM,YAAY,GAAG,gBAAgB,cAAc;AAEnD,MAAM,WAAW,GAAG,YAAY;;;;;;;;AAWhC,MAAa,iBAAiB,OAAO,OAAO;CAC1C;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACD,CAAU"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
|
|
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
|
+
*/
|
|
2
12
|
|
|
3
|
-
|
|
13
|
+
import { TextLayerProps } from "@deck.gl/layers";
|
|
4
14
|
|
|
15
|
+
//#region src/deckgl/text-layer/default-settings.d.ts
|
|
16
|
+
declare const defaultSettings: Partial<TextLayerProps>;
|
|
17
|
+
//#endregion
|
|
5
18
|
export { defaultSettings };
|
|
19
|
+
//# sourceMappingURL=default-settings.d.ts.map
|
|
@@ -1,23 +1,47 @@
|
|
|
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 src/deckgl/text-layer/default-settings.ts
|
|
1
15
|
const defaultSettings = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
fontFamily: "system-ui, sans-serif",
|
|
17
|
+
fontSettings: {
|
|
18
|
+
fontSize: 22,
|
|
19
|
+
sdf: true,
|
|
20
|
+
buffer: 10,
|
|
21
|
+
cutoff: .19,
|
|
22
|
+
radius: 10,
|
|
23
|
+
smoothing: .1
|
|
24
|
+
},
|
|
25
|
+
fontWeight: 500,
|
|
26
|
+
getAlignmentBaseline: "center",
|
|
27
|
+
getColor: [
|
|
28
|
+
255,
|
|
29
|
+
255,
|
|
30
|
+
255,
|
|
31
|
+
255
|
|
32
|
+
],
|
|
33
|
+
getSize: 12,
|
|
34
|
+
getTextAnchor: "middle",
|
|
35
|
+
lineHeight: 1,
|
|
36
|
+
outlineColor: [
|
|
37
|
+
0,
|
|
38
|
+
0,
|
|
39
|
+
0,
|
|
40
|
+
255
|
|
41
|
+
],
|
|
42
|
+
outlineWidth: 2
|
|
19
43
|
};
|
|
20
44
|
|
|
45
|
+
//#endregion
|
|
21
46
|
export { defaultSettings };
|
|
22
|
-
//# sourceMappingURL=default-settings.js.map
|
|
23
47
|
//# sourceMappingURL=default-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"default-settings.js","names":["defaultSettings: Partial<DglTextLayerProps>"],"sources":["../../../src/deckgl/text-layer/default-settings.ts"],"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 { Color } from '@deck.gl/core';\nimport type { TextLayerProps as DglTextLayerProps } from '@deck.gl/layers';\n\nexport const defaultSettings: Partial<DglTextLayerProps> = {\n fontFamily: 'system-ui, sans-serif',\n fontSettings: {\n fontSize: 22,\n sdf: true,\n buffer: 10,\n cutoff: 0.19,\n radius: 10,\n smoothing: 0.1,\n },\n fontWeight: 500,\n getAlignmentBaseline: 'center',\n getColor: [255, 255, 255, 255] as Color,\n getSize: 12,\n getTextAnchor: 'middle',\n lineHeight: 1,\n outlineColor: [0, 0, 0, 255] as Color,\n outlineWidth: 2,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;AAeA,MAAaA,kBAA8C;CACzD,YAAY;CACZ,cAAc;EACZ,UAAU;EACV,KAAK;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,WAAW;EACZ;CACD,YAAY;CACZ,sBAAsB;CACtB,UAAU;EAAC;EAAK;EAAK;EAAK;EAAI;CAC9B,SAAS;CACT,eAAe;CACf,YAAY;CACZ,cAAc;EAAC;EAAG;EAAG;EAAG;EAAI;CAC5B,cAAc;CACf"}
|