@accelint/map-toolkit 0.0.2 → 0.2.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 +51 -0
- package/README.md +92 -16
- package/catalog-info.yaml +44 -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 +98 -0
- package/dist/deckgl/base-map/index.js +99 -0
- package/dist/deckgl/base-map/index.js.map +1 -0
- package/dist/deckgl/base-map/provider.d.ts +133 -0
- package/dist/deckgl/base-map/provider.js +22 -0
- package/dist/deckgl/base-map/provider.js.map +1 -0
- package/dist/deckgl/base-map/types.d.ts +61 -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 +13 -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/deckgl/text-layer/character-sets.d.ts +20 -0
- package/dist/deckgl/text-layer/character-sets.js +36 -0
- package/dist/deckgl/text-layer/character-sets.js.map +1 -0
- package/dist/deckgl/text-layer/default-settings.d.ts +5 -0
- package/dist/deckgl/text-layer/default-settings.js +23 -0
- package/dist/deckgl/text-layer/default-settings.js.map +1 -0
- package/dist/deckgl/text-layer/fiber.d.ts +31 -0
- package/dist/deckgl/text-layer/fiber.js +6 -0
- package/dist/deckgl/text-layer/fiber.js.map +1 -0
- package/dist/deckgl/text-layer/index.d.ts +43 -0
- package/dist/deckgl/text-layer/index.js +33 -0
- package/dist/deckgl/text-layer/index.js.map +1 -0
- package/dist/decorators/deckgl.d.ts +5 -0
- package/dist/decorators/deckgl.js +14 -0
- package/dist/decorators/deckgl.js.map +1 -0
- package/dist/map-mode/events.d.ts +37 -0
- package/dist/map-mode/events.js +15 -0
- package/dist/map-mode/events.js.map +1 -0
- package/dist/map-mode/index.d.ts +6 -0
- package/dist/map-mode/index.js +5 -0
- package/dist/map-mode/index.js.map +1 -0
- package/dist/map-mode/store.d.ts +122 -0
- package/dist/map-mode/store.js +327 -0
- package/dist/map-mode/store.js.map +1 -0
- package/dist/map-mode/types.d.ts +83 -0
- package/dist/map-mode/types.js +3 -0
- package/dist/map-mode/types.js.map +1 -0
- package/dist/map-mode/use-map-mode.d.ts +54 -0
- package/dist/map-mode/use-map-mode.js +31 -0
- package/dist/map-mode/use-map-mode.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 +39 -0
- package/dist/maplibre/hooks/use-maplibre.js +37 -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/package.json +91 -17
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -3
- package/dist/test/setup.d.ts +0 -2
- package/dist/test/setup.js +0 -10
- package/dist/test/setup.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/deckgl/base-map/provider.tsx"],"names":[],"mappings":";;;;;AAuBO,MAAM,UAAA,GAAa,cAA+B,IAAI;AA4HtD,SAAS,WAAA,CAAY,EAAE,QAAA,EAAU,EAAA,EAAG,EAAqB;AAE9D,EAAA,uBACE,GAAA,CAAC,mBAAA,EAAA,EAA6B,EAAA,EAC3B,QAAA,EAAA,EADuB,EAE1B,CAAA;AAEJ;AAMA,SAAS,mBAAA,CAAoB,EAAE,QAAA,EAAU,EAAA,EAAG,EAAqB;AAG/D,EAAA,gBAAA,CAAiB,EAAE,CAAA;AAGnB,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,OAAO,MAAM;AACX,MAAA,YAAA,CAAa,EAAE,CAAA;AAAA,IACjB,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,EAAE,CAAC,CAAA;AAEP,EAAA,2BAAQ,UAAA,CAAW,QAAA,EAAX,EAAoB,KAAA,EAAO,IAAK,QAAA,EAAS,CAAA;AACnD","file":"provider.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 { createContext, type ReactNode, useEffect } from 'react';\nimport { destroyStore, getOrCreateStore } from '../../map-mode/store';\nimport type { UniqueId } from '@accelint/core';\n\n/**\n * React context for map ID.\n * Use the `useMapMode` hook to access the map mode state.\n */\nexport const MapContext = createContext<UniqueId | null>(null);\n\n/**\n * Props for the MapProvider component.\n */\nexport type MapProviderProps = {\n /** Child components that will have access to map mode context */\n children: ReactNode;\n /**\n * Unique identifier for this map instance.\n *\n * Used to isolate mode changes between different map instances (e.g., main map vs minimap).\n * This is required and should be provided by the parent component (typically BaseMap).\n *\n * @example\n * ```tsx\n * // Multiple independent map instances\n * const mainMapId = uuid();\n * const minimapId = uuid();\n *\n * <MapProvider id={mainMapId}>\n * // Map layers and components\n * </MapProvider>\n *\n * <MapProvider id={minimapId}>\n * // Minimap layers and components\n * </MapProvider>\n * ```\n */\n id: UniqueId;\n};\n\n/**\n * Provider component for managing map modes with ownership and authorization.\n *\n * **Note**: This provider is used internally by `BaseMap` and should not be used directly.\n * Consumers should pass the `id` prop to `BaseMap`, which will create this provider automatically.\n *\n * This component uses a hybrid architecture combining React Context (for map instance identity)\n * with an external observable store (for state management). The provider:\n * - Provides a unique `id` via Context\n * - Creates an isolated MapModeStore instance for this map\n * - Allows components to subscribe to mode changes via `useMapMode` hook (which uses `useSyncExternalStore`)\n *\n * The external store manages a state machine for map modes where components can request\n * mode changes with ownership. When a mode is owned by a component, other components\n * must request authorization to change to a different mode. The store handles:\n *\n * - Automatic mode changes when no ownership conflicts exist\n * - Authorization flow when switching between owned modes\n * - Per-mode ownership tracking that persists throughout the session\n * - Pending request management (one pending request per requester)\n * - Auto-acceptance of first pending request when mode owner returns to default\n * - Auto-rejection of other pending requests when one is approved\n * - Event emission through a centralized event bus\n * - Instance isolation for multiple map scenarios (main map + minimap)\n * - Always initializes in 'default' mode\n *\n * ## Instance Isolation\n *\n * Each MapProvider instance operates independently. Mode changes in one instance\n * do not affect other instances, even when multiple maps are rendered on the same page.\n * This enables scenarios like:\n * - Main map in \"drawing\" mode while minimap stays in \"view\" mode\n * - Multiple independent map views with different interaction modes\n *\n * Events are scoped to specific instances using the `id` prop. The event bus\n * filters events to ensure each provider only responds to events for its own instance.\n *\n * ## Pending Request Behavior\n *\n * - Pending requests are stored by requester ID (not mode owner)\n * - Each requester can have only one pending request at a time\n * - New requests from the same requester auto-replace previous requests\n * - Pending requests persist when mode owner switches between their own modes\n * - When any request is approved, all other pending requests are auto-rejected\n * - When mode owner returns to default mode:\n * - If first pending request is for default mode, all pending requests are rejected (already in requested mode)\n * - If first pending request is for a different mode, that request is auto-approved and others are rejected\n *\n * ## Instance ID Stability and Lifecycle\n *\n * The provider uses React's `key` prop to force a complete remount when the `id` changes.\n * This ensures:\n * - Clean cleanup of the old store (no memory leaks)\n * - Fresh initialization for the new ID\n * - All child components remount with the new context\n *\n * While the `id` prop should typically remain stable (created as a module-level constant\n * or with `useState`), changing it will work correctly due to the remount behavior.\n *\n * @param props - Provider props including children and required id\n * @returns Provider component that wraps children with map instance identity context\n *\n * @example\n * Internal usage within BaseMap:\n * ```tsx\n * // BaseMap automatically creates the provider\n * function BaseMap({ id, children, ...props }: BaseMapProps) {\n * return (\n * <div>\n * <MapProvider id={id}>\n * <Deckgl {...props}>\n * {children}\n * </Deckgl>\n * </MapProvider>\n * </div>\n * );\n * }\n * ```\n *\n * @example\n * With authorization handling - use id in event payloads:\n * ```tsx\n * useOn(MapModeEvents.changeAuthorization, (event) => {\n * const { authId, id } = event.payload;\n * emitDecision({ authId, approved: true, owner: 'tool', id });\n * });\n * ```\n */\n/**\n * Public wrapper that forces remount when id changes.\n * This ensures clean lifecycle management and prevents memory leaks.\n */\nexport function MapProvider({ children, id }: MapProviderProps) {\n // Force remount when id changes - each id gets a fresh component instance\n return (\n <MapProviderInternal key={id} id={id}>\n {children}\n </MapProviderInternal>\n );\n}\n\n/**\n * Internal implementation with guaranteed stable id.\n * The id cannot change without a remount due to the key prop above.\n */\nfunction MapProviderInternal({ children, id }: MapProviderProps) {\n // Create store synchronously before children render\n // This is required for useSyncExternalStore pattern\n getOrCreateStore(id);\n\n // Cleanup when component unmounts\n useEffect(() => {\n return () => {\n destroyStore(id);\n };\n }, [id]); // id is stable within this component's lifetime due to key prop\n\n return <MapContext.Provider value={id}>{children}</MapContext.Provider>;\n}\n"]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Payload } from '@accelint/bus';
|
|
2
|
+
import { UniqueId } from '@accelint/core';
|
|
3
|
+
import { PickingInfo } from '@deck.gl/core';
|
|
4
|
+
import { MjolnirGestureEvent, MjolnirPointerEvent } from 'mjolnir.js';
|
|
5
|
+
import { MapEvents } from './events.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* PickingInfo without the viewport property, as it cannot be serialized through the event bus.
|
|
9
|
+
* The viewport contains function properties that would break serialization.
|
|
10
|
+
*/
|
|
11
|
+
type NonFuncPickingInfo = Omit<PickingInfo, 'viewport'>;
|
|
12
|
+
/**
|
|
13
|
+
* MjolnirGestureEvent without function properties and non-serializable objects.
|
|
14
|
+
* These properties are omitted to allow the event to be serialized through the event bus.
|
|
15
|
+
*/
|
|
16
|
+
type NonFuncMjolnirGestureEvent = Omit<MjolnirGestureEvent, 'stopPropagation' | 'preventDefault' | 'stopImmediatePropagation' | 'srcEvent' | 'rootElement' | 'target' | 'changedPointers' | 'pointers'>;
|
|
17
|
+
/**
|
|
18
|
+
* MjolnirPointerEvent without function properties and non-serializable objects.
|
|
19
|
+
* These properties are omitted to allow the event to be serialized through the event bus.
|
|
20
|
+
*/
|
|
21
|
+
type NonFuncMjolnirPointerEvent = Omit<MjolnirPointerEvent, 'stopPropagation' | 'preventDefault' | 'stopImmediatePropagation' | 'srcEvent' | 'rootElement' | 'target'>;
|
|
22
|
+
/**
|
|
23
|
+
* Payload for map click events emitted through the event bus.
|
|
24
|
+
* Contains picking information about what was clicked and the gesture event details.
|
|
25
|
+
*/
|
|
26
|
+
type MapClickPayload = {
|
|
27
|
+
/** Information about the picked object and its properties */
|
|
28
|
+
info: NonFuncPickingInfo;
|
|
29
|
+
/** The gesture event that triggered the click */
|
|
30
|
+
event: NonFuncMjolnirGestureEvent;
|
|
31
|
+
/** The map instance the event occurred within */
|
|
32
|
+
id: UniqueId;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Payload for map hover events emitted through the event bus.
|
|
36
|
+
* Contains picking information about what is being hovered and the pointer event details.
|
|
37
|
+
*/
|
|
38
|
+
type MapHoverPayload = {
|
|
39
|
+
/** Information about the picked object and its properties */
|
|
40
|
+
info: NonFuncPickingInfo;
|
|
41
|
+
/** The pointer event that triggered the hover */
|
|
42
|
+
event: NonFuncMjolnirPointerEvent;
|
|
43
|
+
/** The map instance the event occurred within */
|
|
44
|
+
id: UniqueId;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Type for map click events in the event bus.
|
|
48
|
+
* Combines the event name with the click payload.
|
|
49
|
+
*/
|
|
50
|
+
type MapClickEvent = Payload<typeof MapEvents.click, MapClickPayload>;
|
|
51
|
+
/**
|
|
52
|
+
* Type for map hover events in the event bus.
|
|
53
|
+
* Combines the event name with the hover payload.
|
|
54
|
+
*/
|
|
55
|
+
type MapHoverEvent = Payload<typeof MapEvents.hover, MapHoverPayload>;
|
|
56
|
+
/**
|
|
57
|
+
* Union type of all map event types that can be emitted through the event bus.
|
|
58
|
+
*/
|
|
59
|
+
type MapEventType = MapClickEvent | MapHoverEvent;
|
|
60
|
+
|
|
61
|
+
export type { MapClickEvent, MapClickPayload, MapEventType, MapHoverEvent, MapHoverPayload };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { BaseMap, BaseMapProps } 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/core';
|
|
8
|
+
import '@deckgl-fiber-renderer/types';
|
|
9
|
+
import '@deck.gl/layers';
|
|
10
|
+
import 'milsymbol';
|
|
11
|
+
import '@deck.gl/core';
|
|
12
|
+
import '@accelint/bus';
|
|
13
|
+
import 'mjolnir.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BaseMap } 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,20 @@
|
|
|
1
|
+
type CharacterSetsKeys = keyof typeof CHARACTER_SETS;
|
|
2
|
+
declare const CHARACTER_SETS: Readonly<{
|
|
3
|
+
readonly ALL_NUMBERS: "1234567890";
|
|
4
|
+
readonly ASCII_ALL: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
|
|
5
|
+
readonly ASCII_ALPHA_NUMERIC: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
|
6
|
+
readonly ASCII_LETTERS: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
7
|
+
readonly ASCII_LETTERS_LOWERCASE: "abcdefghijklmnopqrstuvwxyz";
|
|
8
|
+
readonly ASCII_LETTERS_UPPERCASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
9
|
+
readonly ASCII_SYMBOLS: " !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
|
|
10
|
+
readonly AUTO: "auto";
|
|
11
|
+
readonly EXPANDED: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890 ¡¿¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
|
|
12
|
+
readonly LATIN_ALL: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890 ¡¿¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
|
|
13
|
+
readonly LATIN_ALPHA_NUMERIC: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890";
|
|
14
|
+
readonly LATIN_LETTERS: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ";
|
|
15
|
+
readonly LATIN_LETTERS_LOWERCASE: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿß";
|
|
16
|
+
readonly LATIN_LETTERS_UPPERCASE: "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ";
|
|
17
|
+
readonly LATIN_SYMBOLS: " ¡¿¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
|
|
18
|
+
}>;
|
|
19
|
+
|
|
20
|
+
export { CHARACTER_SETS, type CharacterSetsKeys };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const ALL_NUMBERS = "1234567890";
|
|
2
|
+
const ASCII_LETTERS_LOWERCASE = "abcdefghijklmnopqrstuvwxyz";
|
|
3
|
+
const ASCII_LETTERS_UPPERCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
4
|
+
const ASCII_SYMBOLS = " !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
|
|
5
|
+
const ASCII_LETTERS = `${ASCII_LETTERS_LOWERCASE}${ASCII_LETTERS_UPPERCASE}`;
|
|
6
|
+
const ASCII_ALPHA_NUMERIC = `${ASCII_LETTERS}${ALL_NUMBERS}`;
|
|
7
|
+
const ASCII_ALL = `${ASCII_LETTERS}${ALL_NUMBERS}${ASCII_SYMBOLS}`;
|
|
8
|
+
const AUTO = "auto";
|
|
9
|
+
const LATIN_LETTERS_LOWERCASE = "\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF\xDF";
|
|
10
|
+
const LATIN_LETTERS_UPPERCASE = "\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE";
|
|
11
|
+
const LATIN_SYMBOLS = " \xA1\xBF\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xD7\xF7";
|
|
12
|
+
const LATIN_LETTERS = `${LATIN_LETTERS_LOWERCASE}${LATIN_LETTERS_UPPERCASE}`;
|
|
13
|
+
const LATIN_ALPHA_NUMERIC = `${LATIN_LETTERS}${ALL_NUMBERS}`;
|
|
14
|
+
const LATIN_ALL = `${LATIN_LETTERS}${ALL_NUMBERS}${LATIN_SYMBOLS}`;
|
|
15
|
+
const EXPANDED = `${ASCII_ALL}${LATIN_ALL}`;
|
|
16
|
+
const CHARACTER_SETS = Object.freeze({
|
|
17
|
+
ALL_NUMBERS,
|
|
18
|
+
ASCII_ALL,
|
|
19
|
+
ASCII_ALPHA_NUMERIC,
|
|
20
|
+
ASCII_LETTERS,
|
|
21
|
+
ASCII_LETTERS_LOWERCASE,
|
|
22
|
+
ASCII_LETTERS_UPPERCASE,
|
|
23
|
+
ASCII_SYMBOLS,
|
|
24
|
+
AUTO,
|
|
25
|
+
EXPANDED,
|
|
26
|
+
LATIN_ALL,
|
|
27
|
+
LATIN_ALPHA_NUMERIC,
|
|
28
|
+
LATIN_LETTERS,
|
|
29
|
+
LATIN_LETTERS_LOWERCASE,
|
|
30
|
+
LATIN_LETTERS_UPPERCASE,
|
|
31
|
+
LATIN_SYMBOLS
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export { CHARACTER_SETS };
|
|
35
|
+
//# sourceMappingURL=character-sets.js.map
|
|
36
|
+
//# sourceMappingURL=character-sets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/deckgl/text-layer/character-sets.ts"],"names":[],"mappings":"AAYA,MAAM,WAAA,GAAc,YAAA;AAEpB,MAAM,uBAAA,GAA0B,4BAAA;AAChC,MAAM,uBAAA,GAA0B,4BAAA;AAChC,MAAM,aAAA,GAAgB,mCAAA;AAEtB,MAAM,aAAA,GAAgB,CAAA,EAAG,uBAAuB,CAAA,EAAG,uBAAuB,CAAA,CAAA;AAC1E,MAAM,mBAAA,GAAsB,CAAA,EAAG,aAAa,CAAA,EAAG,WAAW,CAAA,CAAA;AAC1D,MAAM,YAAY,CAAA,EAAG,aAAa,CAAA,EAAG,WAAW,GAAG,aAAa,CAAA,CAAA;AAEhE,MAAM,IAAA,GAAO,MAAA;AAEb,MAAM,uBAAA,GAA0B,kIAAA;AAChC,MAAM,uBAAA,GAA0B,0HAAA;AAChC,MAAM,aAAA,GAAgB,2IAAA;AAEtB,MAAM,aAAA,GAAgB,CAAA,EAAG,uBAAuB,CAAA,EAAG,uBAAuB,CAAA,CAAA;AAC1E,MAAM,mBAAA,GAAsB,CAAA,EAAG,aAAa,CAAA,EAAG,WAAW,CAAA,CAAA;AAC1D,MAAM,YAAY,CAAA,EAAG,aAAa,CAAA,EAAG,WAAW,GAAG,aAAa,CAAA,CAAA;AAEhE,MAAM,QAAA,GAAW,CAAA,EAAG,SAAS,CAAA,EAAG,SAAS,CAAA,CAAA;AAIlC,MAAM,cAAA,GAAiB,OAAO,MAAA,CAAO;AAAA,EAC1C,WAAA;AAAA,EAEA,SAAA;AAAA,EACA,mBAAA;AAAA,EACA,aAAA;AAAA,EACA,uBAAA;AAAA,EACA,uBAAA;AAAA,EACA,aAAA;AAAA,EAEA,IAAA;AAAA,EACA,QAAA;AAAA,EAEA,SAAA;AAAA,EACA,mBAAA;AAAA,EACA,aAAA;AAAA,EACA,uBAAA;AAAA,EACA,uBAAA;AAAA,EACA;AACF,CAAU","file":"character-sets.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\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\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"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const defaultSettings = {
|
|
2
|
+
fontFamily: "system-ui, sans-serif",
|
|
3
|
+
fontSettings: {
|
|
4
|
+
fontSize: 22,
|
|
5
|
+
sdf: true,
|
|
6
|
+
buffer: 10,
|
|
7
|
+
cutoff: 0.19,
|
|
8
|
+
radius: 10,
|
|
9
|
+
smoothing: 0.1
|
|
10
|
+
},
|
|
11
|
+
fontWeight: 500,
|
|
12
|
+
getAlignmentBaseline: "center",
|
|
13
|
+
getColor: [255, 255, 255, 255],
|
|
14
|
+
getSize: 12,
|
|
15
|
+
getTextAnchor: "middle",
|
|
16
|
+
lineHeight: 1,
|
|
17
|
+
outlineColor: [0, 0, 0, 255],
|
|
18
|
+
outlineWidth: 2
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { defaultSettings };
|
|
22
|
+
//# sourceMappingURL=default-settings.js.map
|
|
23
|
+
//# sourceMappingURL=default-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/deckgl/text-layer/default-settings.ts"],"names":[],"mappings":"AAeO,MAAM,eAAA,GAA2C;AAAA,EACtD,UAAA,EAAY,uBAAA;AAAA,EACZ,YAAA,EAAc;AAAA,IACZ,QAAA,EAAU,EAAA;AAAA,IACV,GAAA,EAAK,IAAA;AAAA,IACL,MAAA,EAAQ,EAAA;AAAA,IACR,MAAA,EAAQ,IAAA;AAAA,IACR,MAAA,EAAQ,EAAA;AAAA,IACR,SAAA,EAAW;AAAA,GACb;AAAA,EACA,UAAA,EAAY,GAAA;AAAA,EACZ,oBAAA,EAAsB,QAAA;AAAA,EACtB,QAAA,EAAU,CAAC,GAAA,EAAK,GAAA,EAAK,KAAK,GAAG,CAAA;AAAA,EAC7B,OAAA,EAAS,EAAA;AAAA,EACT,aAAA,EAAe,QAAA;AAAA,EACf,UAAA,EAAY,CAAA;AAAA,EACZ,YAAA,EAAc,CAAC,CAAA,EAAG,CAAA,EAAG,GAAG,GAAG,CAAA;AAAA,EAC3B,YAAA,EAAc;AAChB","file":"default-settings.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 { Color } from '@deck.gl/core';\nimport type { TextLayerProps } from '@deck.gl/layers';\n\nexport const defaultSettings: Partial<TextLayerProps> = {\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"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TextLayerProps } from './index.js';
|
|
2
|
+
import '@deck.gl/layers';
|
|
3
|
+
import './character-sets.js';
|
|
4
|
+
import 'type-fest';
|
|
5
|
+
|
|
6
|
+
declare global {
|
|
7
|
+
namespace React {
|
|
8
|
+
namespace JSX {
|
|
9
|
+
interface IntrinsicElements {
|
|
10
|
+
/**
|
|
11
|
+
* A styled text layer for DeckGL Fiber with enhanced styling capabilities.
|
|
12
|
+
*
|
|
13
|
+
* Provides customizable font styling, text outline support, and extended character sets.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <textLayer
|
|
18
|
+
* id="my-text"
|
|
19
|
+
* data={textData}
|
|
20
|
+
* getText={d => d.text}
|
|
21
|
+
* getPosition={d => d.position}
|
|
22
|
+
* getSize={12}
|
|
23
|
+
* fontWeight={500}
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
textLayer: TextLayerProps;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/deckgl/text-layer/fiber.ts"],"names":[],"mappings":";;;AAeA,MAAA,CAAO,EAAE,WAAW,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 { TextLayer, type TextLayerProps } from './index';\n\nextend({ TextLayer });\n\ndeclare global {\n namespace React {\n // biome-ignore lint/style/useNamingConvention: Built-in React namespace.\n namespace JSX {\n interface IntrinsicElements {\n /**\n * A styled text layer for DeckGL Fiber with enhanced styling capabilities.\n *\n * Provides customizable font styling, text outline support, and extended character sets.\n *\n * @example\n * ```tsx\n * <textLayer\n * id=\"my-text\"\n * data={textData}\n * getText={d => d.text}\n * getPosition={d => d.position}\n * getSize={12}\n * fontWeight={500}\n * />\n * ```\n */\n textLayer: TextLayerProps;\n }\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { TextLayerProps as TextLayerProps$1, TextLayer as TextLayer$1 } from '@deck.gl/layers';
|
|
2
|
+
import { CharacterSetsKeys } from './character-sets.js';
|
|
3
|
+
import { LiteralUnion } from 'type-fest';
|
|
4
|
+
|
|
5
|
+
interface TextLayerProps<TData = unknown> extends TextLayerProps$1<TData> {
|
|
6
|
+
characterSet?: LiteralUnion<CharacterSetsKeys, string>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A styled text layer that extends Deck.gl's TextLayer with enhanced styling capabilities.
|
|
10
|
+
*
|
|
11
|
+
* This layer provides:
|
|
12
|
+
* - Customizable font styling (size, weight, family, line height)
|
|
13
|
+
* - Text outline support
|
|
14
|
+
* - Extended character set support
|
|
15
|
+
* - Consistent styling based on design specifications
|
|
16
|
+
*
|
|
17
|
+
* Can be used directly with Deck.gl or as a JSX element with React Fiber:
|
|
18
|
+
* - React Fiber: `<textLayer id="text" data={[...]} ... />`
|
|
19
|
+
* - Direct: `new TextLayer({ id: 'text', data: [...], ... })`
|
|
20
|
+
*/
|
|
21
|
+
declare class TextLayer<TData = unknown> extends TextLayer$1<TData> {
|
|
22
|
+
static CHARACTER_SETS: Readonly<{
|
|
23
|
+
readonly ALL_NUMBERS: "1234567890";
|
|
24
|
+
readonly ASCII_ALL: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
|
|
25
|
+
readonly ASCII_ALPHA_NUMERIC: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
|
26
|
+
readonly ASCII_LETTERS: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
27
|
+
readonly ASCII_LETTERS_LOWERCASE: "abcdefghijklmnopqrstuvwxyz";
|
|
28
|
+
readonly ASCII_LETTERS_UPPERCASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
29
|
+
readonly ASCII_SYMBOLS: " !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
|
|
30
|
+
readonly AUTO: "auto";
|
|
31
|
+
readonly EXPANDED: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890 ¡¿¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
|
|
32
|
+
readonly LATIN_ALL: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890 ¡¿¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
|
|
33
|
+
readonly LATIN_ALPHA_NUMERIC: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890";
|
|
34
|
+
readonly LATIN_LETTERS: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ";
|
|
35
|
+
readonly LATIN_LETTERS_LOWERCASE: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿß";
|
|
36
|
+
readonly LATIN_LETTERS_UPPERCASE: "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ";
|
|
37
|
+
readonly LATIN_SYMBOLS: " ¡¿¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
|
|
38
|
+
}>;
|
|
39
|
+
static layerName: string;
|
|
40
|
+
constructor(props: TextLayerProps<TData>);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { TextLayer, type TextLayerProps };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TextLayer as TextLayer$1 } from '@deck.gl/layers';
|
|
2
|
+
import { CHARACTER_SETS } from './character-sets.js';
|
|
3
|
+
import { defaultSettings } from './default-settings.js';
|
|
4
|
+
|
|
5
|
+
class TextLayer extends TextLayer$1 {
|
|
6
|
+
static CHARACTER_SETS = CHARACTER_SETS;
|
|
7
|
+
static layerName = "textLayer";
|
|
8
|
+
constructor(props) {
|
|
9
|
+
const {
|
|
10
|
+
characterSet = CHARACTER_SETS.EXPANDED,
|
|
11
|
+
fontSettings,
|
|
12
|
+
...rest
|
|
13
|
+
} = props;
|
|
14
|
+
super({
|
|
15
|
+
// set opinionated defaults
|
|
16
|
+
...defaultSettings,
|
|
17
|
+
// user props override defaults
|
|
18
|
+
...rest,
|
|
19
|
+
// handle special characterSet logic
|
|
20
|
+
characterSet: CHARACTER_SETS[characterSet] ?? characterSet,
|
|
21
|
+
fontSettings: {
|
|
22
|
+
// merge fontSettings
|
|
23
|
+
...defaultSettings.fontSettings,
|
|
24
|
+
// user props override defaults
|
|
25
|
+
...fontSettings
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { TextLayer };
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/deckgl/text-layer/index.ts"],"names":["DglTextLayer"],"mappings":";;;;AAuCO,MAAM,kBAAmCA,WAAA,CAAoB;AAAA,EAClE,OAAO,cAAA,GAAiB,cAAA;AAAA,EAExB,OAAgB,SAAA,GAAY,WAAA;AAAA,EAE5B,YAAY,KAAA,EAA8B;AACxC,IAAA,MAAM;AAAA,MACJ,eAAe,cAAA,CAAe,QAAA;AAAA,MAC9B,YAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,KAAA,CAAM;AAAA;AAAA,MAEJ,GAAG,eAAA;AAAA;AAAA,MAGH,GAAG,IAAA;AAAA;AAAA,MAGH,YAAA,EACE,cAAA,CAAe,YAAiC,CAAA,IAAK,YAAA;AAAA,MAEvD,YAAA,EAAc;AAAA;AAAA,QAEZ,GAAG,eAAA,CAAgB,YAAA;AAAA;AAAA,QAGnB,GAAG;AAAA;AACL,KACD,CAAA;AAAA,EACH;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 {\n TextLayer as DglTextLayer,\n type TextLayerProps as DglTextLayerProps,\n} from '@deck.gl/layers';\nimport { CHARACTER_SETS, type CharacterSetsKeys } from './character-sets.js';\nimport { defaultSettings } from './default-settings.js';\nimport type { LiteralUnion } from 'type-fest';\n\nexport interface TextLayerProps<TData = unknown>\n extends DglTextLayerProps<TData> {\n // A union type that preserves autocompletion for CharacterSetsKeys while allowing any string.\n characterSet?: LiteralUnion<CharacterSetsKeys, string>;\n}\n\n/**\n * A styled text layer that extends Deck.gl's TextLayer with enhanced styling capabilities.\n *\n * This layer provides:\n * - Customizable font styling (size, weight, family, line height)\n * - Text outline support\n * - Extended character set support\n * - Consistent styling based on design specifications\n *\n * Can be used directly with Deck.gl or as a JSX element with React Fiber:\n * - React Fiber: `<textLayer id=\"text\" data={[...]} ... />`\n * - Direct: `new TextLayer({ id: 'text', data: [...], ... })`\n */\nexport class TextLayer<TData = unknown> extends DglTextLayer<TData> {\n static CHARACTER_SETS = CHARACTER_SETS;\n\n static override layerName = 'textLayer';\n\n constructor(props: TextLayerProps<TData>) {\n const {\n characterSet = CHARACTER_SETS.EXPANDED,\n fontSettings,\n ...rest\n } = props;\n\n super({\n // set opinionated defaults\n ...defaultSettings,\n\n // user props override defaults\n ...rest,\n\n // handle special characterSet logic\n characterSet:\n CHARACTER_SETS[characterSet as CharacterSetsKeys] ?? characterSet,\n\n fontSettings: {\n // merge fontSettings\n ...defaultSettings.fontSettings,\n\n // user props override defaults\n ...fontSettings,\n },\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { uuid } from '@accelint/core';
|
|
3
|
+
import { BaseMap } from '../deckgl/base-map/index.js';
|
|
4
|
+
|
|
5
|
+
const STORYBOOK_MAP_ID = uuid();
|
|
6
|
+
const withDeckGL = () => {
|
|
7
|
+
return (Story) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(BaseMap, { className: "h-dvh w-dvw", id: STORYBOOK_MAP_ID, children: /* @__PURE__ */ jsx(Story, {}) });
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { withDeckGL };
|
|
13
|
+
//# sourceMappingURL=deckgl.js.map
|
|
14
|
+
//# sourceMappingURL=deckgl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/decorators/deckgl.tsx"],"names":[],"mappings":";;;;AAmBA,MAAM,mBAAmB,IAAA,EAAK;AAEvB,MAAM,aAAa,MAAiB;AACzC,EAAA,OAAO,CAAC,KAAA,KAAU;AAChB,IAAA,uBACE,GAAA,CAAC,WAAQ,SAAA,EAAU,aAAA,EAAc,IAAI,gBAAA,EACnC,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 { uuid } from '@accelint/core';\nimport { BaseMap } from '../deckgl/base-map';\nimport type { Decorator } from '@storybook/react';\n\n// Module-level constant - stable across all Storybook renders\nconst STORYBOOK_MAP_ID = uuid();\n\nexport const withDeckGL = (): Decorator => {\n return (Story) => {\n return (\n <BaseMap className='h-dvh w-dvw' id={STORYBOOK_MAP_ID}>\n <Story />\n </BaseMap>\n );\n };\n};\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Namespace prefix for all map mode events.
|
|
3
|
+
*/
|
|
4
|
+
declare const MapModeEventsNamespace = "map-mode";
|
|
5
|
+
/**
|
|
6
|
+
* Event type constants for map mode state management.
|
|
7
|
+
*
|
|
8
|
+
* These events are emitted through the `@accelint/bus` event bus to coordinate
|
|
9
|
+
* map mode changes across components in a decoupled manner.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { useOn, useEmit } from '@accelint/bus/react';
|
|
14
|
+
* import { MapModeEvents } from '@accelint/map-toolkit/map-mode';
|
|
15
|
+
*
|
|
16
|
+
* // Listen for mode changes
|
|
17
|
+
* useOn(MapModeEvents.changed, (event) => {
|
|
18
|
+
* console.log('Mode changed to:', event.payload.currentMode);
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* // Emit a decision
|
|
22
|
+
* const emitDecision = useEmit(MapModeEvents.changeDecision);
|
|
23
|
+
* emitDecision({ authId, approved: true, owner: 'my-id', id });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const MapModeEvents: {
|
|
27
|
+
/** Emitted when the map mode has successfully changed */
|
|
28
|
+
readonly changed: "map-mode:changed";
|
|
29
|
+
/** Emitted when a component requests a mode change */
|
|
30
|
+
readonly changeRequest: "map-mode:change:request";
|
|
31
|
+
/** Emitted when authorization is required for a mode change */
|
|
32
|
+
readonly changeAuthorization: "map-mode:change:authorization";
|
|
33
|
+
/** Emitted when an authorization decision is made (approve/reject) */
|
|
34
|
+
readonly changeDecision: "map-mode:change:decision";
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { MapModeEvents, MapModeEventsNamespace };
|