@emuanalytics/flow-rdf-core 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +64 -0
  2. package/dist/flow-rdf-core.css +1 -0
  3. package/dist/index.cjs +3102 -0
  4. package/dist/index.d.cts +61 -0
  5. package/dist/index.d.mts +61 -0
  6. package/dist/index.d.ts +61 -0
  7. package/dist/index.mjs +3062 -0
  8. package/dist/lib/map/plugins/index.cjs +1652 -0
  9. package/dist/lib/map/plugins/index.d.cts +309 -0
  10. package/dist/lib/map/plugins/index.d.mts +309 -0
  11. package/dist/lib/map/plugins/index.d.ts +309 -0
  12. package/dist/lib/map/plugins/index.mjs +1614 -0
  13. package/dist/lib/utils/index.cjs +45 -0
  14. package/dist/lib/utils/index.d.cts +39 -0
  15. package/dist/lib/utils/index.d.mts +39 -0
  16. package/dist/lib/utils/index.d.ts +39 -0
  17. package/dist/lib/utils/index.mjs +5 -0
  18. package/dist/shared/flow-rdf-core.08975378.d.cts +68 -0
  19. package/dist/shared/flow-rdf-core.08975378.d.mts +68 -0
  20. package/dist/shared/flow-rdf-core.08975378.d.ts +68 -0
  21. package/dist/shared/flow-rdf-core.278a260a.cjs +1364 -0
  22. package/dist/shared/flow-rdf-core.2e456f93.mjs +83 -0
  23. package/dist/shared/flow-rdf-core.3042be4a.cjs +93 -0
  24. package/dist/shared/flow-rdf-core.84eded74.cjs +34 -0
  25. package/dist/shared/flow-rdf-core.b4b16e78.mjs +1329 -0
  26. package/dist/shared/flow-rdf-core.b80085b4.mjs +66 -0
  27. package/dist/shared/flow-rdf-core.bd95d618.mjs +29 -0
  28. package/dist/shared/flow-rdf-core.c44cf082.cjs +88 -0
  29. package/dist/shared/flow-rdf-core.c9d2f730.d.cts +1815 -0
  30. package/dist/shared/flow-rdf-core.c9d2f730.d.mts +1815 -0
  31. package/dist/shared/flow-rdf-core.c9d2f730.d.ts +1815 -0
  32. package/package.json +106 -0
  33. package/plugins/package.json +7 -0
  34. package/utils/package.json +7 -0
@@ -0,0 +1,309 @@
1
+ import { I as MapEvent, y as FlowMap, w as MapSourceIdentifier, J as MapFeatureId, K as MapPluginBase, L as PluginManager, N as MapSourceEvent, O as MapMouseEvent, T as MapFeatureStream, U as PartialBy, r as MapAnimationOptions, V as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.c9d2f730.cjs';
2
+ export { Z as EventHandlers, Y as PluginConstructor, X as PluginEventsType, W as PluginOptionsType } from '../../../shared/flow-rdf-core.c9d2f730.cjs';
3
+ import { F as Func } from '../../../shared/flow-rdf-core.08975378.cjs';
4
+ import EventEmitter from 'eventemitter3';
5
+ import * as lit from 'lit-html';
6
+ import '@emuanalytics/flow-engine-client';
7
+ import 'mobx-utils';
8
+ import '@emuanalytics/maplibre-gl';
9
+
10
+ type AnnotationMode = 'creating' | 'editing' | 'idle';
11
+ type AnnotationFeatureType = 'Polygon' | 'Circle' | 'LineString' | 'Point';
12
+ interface AnnotationStyle {
13
+ labelSize: number;
14
+ labelColor: string;
15
+ labelMaxWidth: number;
16
+ labelOffset: number[];
17
+ labelJustify: string;
18
+ labelAnchor: string;
19
+ polygonLabelAnchor: string;
20
+ radius: number;
21
+ fillColor: string;
22
+ strokeWidth: number;
23
+ strokeColor: string;
24
+ selectionStrokeColor: string;
25
+ selectionStrokeOpacity: number;
26
+ selectionWidth: number;
27
+ hoverStrokeColor: string;
28
+ }
29
+ interface AnnotationFeatureProps extends AnnotationStyle {
30
+ id: string;
31
+ name: string;
32
+ type: AnnotationFeatureType;
33
+ selected: boolean;
34
+ visible: boolean;
35
+ labelText: string;
36
+ [extras: string]: any;
37
+ }
38
+ interface AnnotationsServiceConfig {
39
+ style: AnnotationStyle;
40
+ }
41
+ type AnnotationFeature = GeoJSON.Feature<GeoJSON.Geometry, Partial<AnnotationFeatureProps>> & {
42
+ id: string;
43
+ };
44
+
45
+ interface AnnotationEventTypes {
46
+ annotationStateChanged: (event: AnnotationEvent) => void;
47
+ }
48
+ type AnnotationEventType = keyof AnnotationEventTypes;
49
+ interface AnnotationEventData {
50
+ features: AnnotationFeature[];
51
+ mode: AnnotationMode;
52
+ canUndo: boolean;
53
+ canRedo: boolean;
54
+ activeFeatureId: string | null;
55
+ activeFeatureType: AnnotationFeatureType | null;
56
+ }
57
+ declare class AnnotationEvent extends MapEvent<AnnotationEventType> {
58
+ mode: AnnotationMode;
59
+ canUndo: boolean;
60
+ canRedo: boolean;
61
+ activeFeatureId: string | null;
62
+ activeFeatureType: AnnotationFeatureType | null;
63
+ features: AnnotationFeature[];
64
+ constructor(type: AnnotationEventType, map: FlowMap, data: AnnotationEventData);
65
+ }
66
+
67
+ type SelectionEventType = 'selectionChanged';
68
+ interface SelectionEventTypes {
69
+ selectionChanged: (event: SelectionEvent) => void;
70
+ }
71
+ declare class SelectionEvent extends MapEvent<SelectionEventType> implements MapSourceIdentifier {
72
+ source: string;
73
+ sourceLayer?: string;
74
+ features: MapFeatureId[];
75
+ constructor(type: SelectionEventType, map: FlowMap, sourceIdentifier: MapSourceIdentifier, features: MapFeatureId[]);
76
+ }
77
+
78
+ type SelectionMode = 'single' | 'multi' | 'none';
79
+ interface SelectionOptions {
80
+ clear?: boolean | 'group';
81
+ group?: string;
82
+ mode: SelectionMode;
83
+ popup?: string;
84
+ selectionState?: string;
85
+ sourceLayer?: string;
86
+ }
87
+ declare class SelectionPlugin extends MapPluginBase<undefined, SelectionEventTypes> {
88
+ private _sourceSelections;
89
+ private _enablePopups;
90
+ readonly name = "SelectionPlugin";
91
+ constructor(pluginManager: PluginManager);
92
+ clearSelection(source: string): void;
93
+ deselectFeatures(source: string, features: MapFeatureId | MapFeatureId[]): void;
94
+ destroy(): void;
95
+ disableSelection(source: string): void;
96
+ enableSelection(source: string, options: SelectionOptions): void;
97
+ handleBeforeSourceRemoved(event: MapSourceEvent): void;
98
+ handleClick(event: MapMouseEvent): void;
99
+ selectFeatures(source: string, features: MapFeatureId | MapFeatureId[]): void;
100
+ selectedFeatureIds(source: string): MapFeatureId[];
101
+ selectedFeatureStream(source: string): MapFeatureStream;
102
+ enablePopups(enabled?: boolean): void;
103
+ disablePopups(): void;
104
+ }
105
+
106
+ interface AnnotationOperation {
107
+ do: Func;
108
+ undo: Func;
109
+ }
110
+ interface AnnotationPluginOptions {
111
+ interactive?: boolean;
112
+ defaultStyle?: Partial<AnnotationStyle>;
113
+ selectionOptions?: SelectionOptions;
114
+ }
115
+ declare class AnnotationPlugin extends MapPluginBase<AnnotationPluginOptions, AnnotationEventTypes> {
116
+ readonly name = "AnnotationPlugin";
117
+ private static _defaultOptions;
118
+ private _features;
119
+ private _featureIds;
120
+ private _undoStack;
121
+ private _redoStack;
122
+ private _mode;
123
+ private _activeFeatureId;
124
+ private _activeFeatureType;
125
+ private _onCommitCleanup;
126
+ private _annotationDataSource;
127
+ private _drawControl;
128
+ private _removeKeyboardShortcuts;
129
+ constructor(pluginManager: PluginManager, options?: AnnotationPluginOptions);
130
+ initialize(): void;
131
+ destroy(): void;
132
+ clear(): this;
133
+ undo(): this;
134
+ /**
135
+ * Redo the last undone operation.
136
+ */
137
+ redo(): this;
138
+ getFeature(featureId: string): AnnotationFeature;
139
+ getFeatures(): AnnotationFeature[];
140
+ setFeatures(features: Array<PartialBy<AnnotationFeature, 'id'>>): this;
141
+ addFeature(feature: PartialBy<AnnotationFeature, 'id'>): AnnotationFeature;
142
+ deleteFeature(featureId: string): this;
143
+ createFeature(featureType: AnnotationFeatureType): void;
144
+ editFeature(featureId: string): void;
145
+ zoomToFeature(featureId: string, animationOptions: MapAnimationOptions): this;
146
+ setFeatureProperty(featureId: string, property: string, value: any): this;
147
+ setFeatureProperties(featureId: string, properties: Record<string, any>): this;
148
+ commit(): this;
149
+ cancel(): this;
150
+ render(): this;
151
+ handleDblClick?(event: MapMouseEvent): void;
152
+ handleBeforeStyleChanged(event: MapStyleChangeEvent): MapStyleSpecification;
153
+ private startDrawing;
154
+ private endDrawing;
155
+ private applyDefaults;
156
+ private generateFeatureId;
157
+ private generateFeatureName;
158
+ private performOperation;
159
+ private deselectFeature;
160
+ private deleteSelectedFeature;
161
+ private editModeForFeature;
162
+ private drawModeForFeatureType;
163
+ private setFeatureGeometry;
164
+ private isValidGeometry;
165
+ private emitStateChange;
166
+ }
167
+
168
+ interface DataJoinOptions {
169
+ /** Set to `true` to clear feature state before applying data join. */
170
+ clear?: boolean;
171
+ data: string | any[];
172
+ /** Data join foreign key. */
173
+ foreignKey: string;
174
+ parameters?: DataJoinParameter[];
175
+ source: string;
176
+ sourceLayer?: string;
177
+ }
178
+ interface DataJoinParameter {
179
+ name: string;
180
+ required?: boolean;
181
+ value: string | number | boolean;
182
+ }
183
+ declare class DataJoin {
184
+ readonly id: string;
185
+ readonly map: FlowMap;
186
+ private static defaultOptions;
187
+ private autorunDisposer;
188
+ private dataExpression;
189
+ private options;
190
+ private parameterExpressions;
191
+ constructor(id: string, map: FlowMap, options: DataJoinOptions);
192
+ get source(): string;
193
+ start(): void;
194
+ stop(): void;
195
+ private doDataJoin;
196
+ private loadData;
197
+ }
198
+ declare class DataJoinPlugin extends MapPluginBase {
199
+ private _joins;
200
+ readonly name = "DataJoinPlugin";
201
+ constructor(pluginManager: PluginManager);
202
+ addDataJoin(id: string, options: DataJoinOptions): void;
203
+ bindState(state: StateStore): void;
204
+ destroy(): void;
205
+ handleSourceRemoved(event: MapSourceEvent): void;
206
+ removeDataJoin(id: string): void;
207
+ }
208
+
209
+ declare class HoverEffectPlugin extends MapPluginBase {
210
+ private hoveredFeature;
211
+ readonly name = "HoverEffectPlugin";
212
+ constructor(pluginManager: PluginManager);
213
+ handleMouseMove(event: MapMouseEvent): void;
214
+ handleMouseOut(event: MapEvent): void;
215
+ handleSetExclusivePlugin(exclusivePlugins: MapPluginBase[]): void;
216
+ private compareFeatures;
217
+ private clearHover;
218
+ }
219
+
220
+ type MapPopupTemplateFn<TState extends StateStore = StateStore> = (feature: MapFeature | null, state: TState) => string | Node | lit.TemplateResult;
221
+ interface MapPopupEvents {
222
+ closed: (popup: MapPopup) => void;
223
+ }
224
+ /**
225
+ * [[MapPopup]] options.
226
+ */
227
+ interface MapPopupOptions {
228
+ /** Specify a CSS class to add to the popup. */
229
+ class?: string;
230
+ /** Enable 'close' button. */
231
+ closeButton?: boolean;
232
+ /** Enable closing popup on click on map. */
233
+ closeOnClick?: boolean;
234
+ /** Enable closing pop when map is moved. */
235
+ closeOnMove?: boolean;
236
+ /** Specify popup content as HTML string or HTML node. */
237
+ content: string | Node | MapPopupTemplateFn;
238
+ /** Maximum width of popup in CSS units. */
239
+ maxWidth?: string;
240
+ trackFeature?: boolean;
241
+ }
242
+ /**
243
+ * Core functionality for Flo.w map popups.
244
+ *
245
+ * @noInheritDoc
246
+ */
247
+ declare class MapPopup extends EventEmitter<MapPopupEvents> {
248
+ readonly map: FlowMap;
249
+ readonly options: MapPopupOptions;
250
+ private _feature?;
251
+ private _contentContainer;
252
+ private _featureStream;
253
+ private _maplibrePopup;
254
+ private _featureStreamDisposer?;
255
+ /**
256
+ * Constructs a new `MapPopup` instance.
257
+ *
258
+ * This is called by the `FlowMap::openPopup` method.
259
+ *
260
+ * @param map Parent Flo.w map.
261
+ * @param options Popup options.
262
+ */
263
+ constructor(map: FlowMap, options: MapPopupOptions);
264
+ get feature(): MapFeatureIdentifier | undefined;
265
+ /**
266
+ * Close the popup.
267
+ */
268
+ close(): void;
269
+ /**
270
+ * Move the popup to a new location.
271
+ *
272
+ * @param lngLat New location.
273
+ */
274
+ moveTo(lngLat: [number, number]): void;
275
+ /**
276
+ * Open the popup at the specified location.
277
+ *
278
+ * @param lngLat Popup location.
279
+ */
280
+ open(event: MapMouseEvent): void;
281
+ open(lngLat: [number, number], feature?: MapFeatureIdentifier): void;
282
+ private cssClasses;
283
+ private handleFeatureUpdate;
284
+ private popupCloseHandler;
285
+ private renderContent;
286
+ }
287
+
288
+ declare class PopupPlugin extends MapPluginBase {
289
+ private _popupTemplates;
290
+ private _popups;
291
+ readonly name = "PopupPlugin";
292
+ constructor(pluginManager: PluginManager);
293
+ registerPopup(id: string, options: MapPopupOptions): void;
294
+ openPopup(id: string, event: MapMouseEvent): MapPopup;
295
+ openPopup(id: string, lngLat: [number, number], feature?: MapFeatureIdentifier): MapPopup;
296
+ closeAllPopups(): void;
297
+ closePopupsForSources(sources: string | string[]): void;
298
+ }
299
+
300
+ declare class UrlSyncPlugin extends MapPluginBase {
301
+ readonly name = "UrlSyncPlugin";
302
+ constructor(pluginManager: PluginManager);
303
+ initialize(): void;
304
+ handleMoveEnd(event: MapEvent): void;
305
+ private mapStateToHash;
306
+ private hashToMapState;
307
+ }
308
+
309
+ export { AnnotationEvent, AnnotationEventData, AnnotationEventType, AnnotationEventTypes, AnnotationFeature, AnnotationFeatureProps, AnnotationFeatureType, AnnotationMode, AnnotationOperation, AnnotationPlugin, AnnotationPluginOptions, AnnotationStyle, AnnotationsServiceConfig, DataJoin, DataJoinOptions, DataJoinPlugin, HoverEffectPlugin, MapPluginBase, PluginManager, PopupPlugin, SelectionEvent, SelectionEventType, SelectionEventTypes, SelectionMode, SelectionOptions, SelectionPlugin, UrlSyncPlugin };
@@ -0,0 +1,309 @@
1
+ import { I as MapEvent, y as FlowMap, w as MapSourceIdentifier, J as MapFeatureId, K as MapPluginBase, L as PluginManager, N as MapSourceEvent, O as MapMouseEvent, T as MapFeatureStream, U as PartialBy, r as MapAnimationOptions, V as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.c9d2f730.mjs';
2
+ export { Z as EventHandlers, Y as PluginConstructor, X as PluginEventsType, W as PluginOptionsType } from '../../../shared/flow-rdf-core.c9d2f730.mjs';
3
+ import { F as Func } from '../../../shared/flow-rdf-core.08975378.mjs';
4
+ import EventEmitter from 'eventemitter3';
5
+ import * as lit from 'lit-html';
6
+ import '@emuanalytics/flow-engine-client';
7
+ import 'mobx-utils';
8
+ import '@emuanalytics/maplibre-gl';
9
+
10
+ type AnnotationMode = 'creating' | 'editing' | 'idle';
11
+ type AnnotationFeatureType = 'Polygon' | 'Circle' | 'LineString' | 'Point';
12
+ interface AnnotationStyle {
13
+ labelSize: number;
14
+ labelColor: string;
15
+ labelMaxWidth: number;
16
+ labelOffset: number[];
17
+ labelJustify: string;
18
+ labelAnchor: string;
19
+ polygonLabelAnchor: string;
20
+ radius: number;
21
+ fillColor: string;
22
+ strokeWidth: number;
23
+ strokeColor: string;
24
+ selectionStrokeColor: string;
25
+ selectionStrokeOpacity: number;
26
+ selectionWidth: number;
27
+ hoverStrokeColor: string;
28
+ }
29
+ interface AnnotationFeatureProps extends AnnotationStyle {
30
+ id: string;
31
+ name: string;
32
+ type: AnnotationFeatureType;
33
+ selected: boolean;
34
+ visible: boolean;
35
+ labelText: string;
36
+ [extras: string]: any;
37
+ }
38
+ interface AnnotationsServiceConfig {
39
+ style: AnnotationStyle;
40
+ }
41
+ type AnnotationFeature = GeoJSON.Feature<GeoJSON.Geometry, Partial<AnnotationFeatureProps>> & {
42
+ id: string;
43
+ };
44
+
45
+ interface AnnotationEventTypes {
46
+ annotationStateChanged: (event: AnnotationEvent) => void;
47
+ }
48
+ type AnnotationEventType = keyof AnnotationEventTypes;
49
+ interface AnnotationEventData {
50
+ features: AnnotationFeature[];
51
+ mode: AnnotationMode;
52
+ canUndo: boolean;
53
+ canRedo: boolean;
54
+ activeFeatureId: string | null;
55
+ activeFeatureType: AnnotationFeatureType | null;
56
+ }
57
+ declare class AnnotationEvent extends MapEvent<AnnotationEventType> {
58
+ mode: AnnotationMode;
59
+ canUndo: boolean;
60
+ canRedo: boolean;
61
+ activeFeatureId: string | null;
62
+ activeFeatureType: AnnotationFeatureType | null;
63
+ features: AnnotationFeature[];
64
+ constructor(type: AnnotationEventType, map: FlowMap, data: AnnotationEventData);
65
+ }
66
+
67
+ type SelectionEventType = 'selectionChanged';
68
+ interface SelectionEventTypes {
69
+ selectionChanged: (event: SelectionEvent) => void;
70
+ }
71
+ declare class SelectionEvent extends MapEvent<SelectionEventType> implements MapSourceIdentifier {
72
+ source: string;
73
+ sourceLayer?: string;
74
+ features: MapFeatureId[];
75
+ constructor(type: SelectionEventType, map: FlowMap, sourceIdentifier: MapSourceIdentifier, features: MapFeatureId[]);
76
+ }
77
+
78
+ type SelectionMode = 'single' | 'multi' | 'none';
79
+ interface SelectionOptions {
80
+ clear?: boolean | 'group';
81
+ group?: string;
82
+ mode: SelectionMode;
83
+ popup?: string;
84
+ selectionState?: string;
85
+ sourceLayer?: string;
86
+ }
87
+ declare class SelectionPlugin extends MapPluginBase<undefined, SelectionEventTypes> {
88
+ private _sourceSelections;
89
+ private _enablePopups;
90
+ readonly name = "SelectionPlugin";
91
+ constructor(pluginManager: PluginManager);
92
+ clearSelection(source: string): void;
93
+ deselectFeatures(source: string, features: MapFeatureId | MapFeatureId[]): void;
94
+ destroy(): void;
95
+ disableSelection(source: string): void;
96
+ enableSelection(source: string, options: SelectionOptions): void;
97
+ handleBeforeSourceRemoved(event: MapSourceEvent): void;
98
+ handleClick(event: MapMouseEvent): void;
99
+ selectFeatures(source: string, features: MapFeatureId | MapFeatureId[]): void;
100
+ selectedFeatureIds(source: string): MapFeatureId[];
101
+ selectedFeatureStream(source: string): MapFeatureStream;
102
+ enablePopups(enabled?: boolean): void;
103
+ disablePopups(): void;
104
+ }
105
+
106
+ interface AnnotationOperation {
107
+ do: Func;
108
+ undo: Func;
109
+ }
110
+ interface AnnotationPluginOptions {
111
+ interactive?: boolean;
112
+ defaultStyle?: Partial<AnnotationStyle>;
113
+ selectionOptions?: SelectionOptions;
114
+ }
115
+ declare class AnnotationPlugin extends MapPluginBase<AnnotationPluginOptions, AnnotationEventTypes> {
116
+ readonly name = "AnnotationPlugin";
117
+ private static _defaultOptions;
118
+ private _features;
119
+ private _featureIds;
120
+ private _undoStack;
121
+ private _redoStack;
122
+ private _mode;
123
+ private _activeFeatureId;
124
+ private _activeFeatureType;
125
+ private _onCommitCleanup;
126
+ private _annotationDataSource;
127
+ private _drawControl;
128
+ private _removeKeyboardShortcuts;
129
+ constructor(pluginManager: PluginManager, options?: AnnotationPluginOptions);
130
+ initialize(): void;
131
+ destroy(): void;
132
+ clear(): this;
133
+ undo(): this;
134
+ /**
135
+ * Redo the last undone operation.
136
+ */
137
+ redo(): this;
138
+ getFeature(featureId: string): AnnotationFeature;
139
+ getFeatures(): AnnotationFeature[];
140
+ setFeatures(features: Array<PartialBy<AnnotationFeature, 'id'>>): this;
141
+ addFeature(feature: PartialBy<AnnotationFeature, 'id'>): AnnotationFeature;
142
+ deleteFeature(featureId: string): this;
143
+ createFeature(featureType: AnnotationFeatureType): void;
144
+ editFeature(featureId: string): void;
145
+ zoomToFeature(featureId: string, animationOptions: MapAnimationOptions): this;
146
+ setFeatureProperty(featureId: string, property: string, value: any): this;
147
+ setFeatureProperties(featureId: string, properties: Record<string, any>): this;
148
+ commit(): this;
149
+ cancel(): this;
150
+ render(): this;
151
+ handleDblClick?(event: MapMouseEvent): void;
152
+ handleBeforeStyleChanged(event: MapStyleChangeEvent): MapStyleSpecification;
153
+ private startDrawing;
154
+ private endDrawing;
155
+ private applyDefaults;
156
+ private generateFeatureId;
157
+ private generateFeatureName;
158
+ private performOperation;
159
+ private deselectFeature;
160
+ private deleteSelectedFeature;
161
+ private editModeForFeature;
162
+ private drawModeForFeatureType;
163
+ private setFeatureGeometry;
164
+ private isValidGeometry;
165
+ private emitStateChange;
166
+ }
167
+
168
+ interface DataJoinOptions {
169
+ /** Set to `true` to clear feature state before applying data join. */
170
+ clear?: boolean;
171
+ data: string | any[];
172
+ /** Data join foreign key. */
173
+ foreignKey: string;
174
+ parameters?: DataJoinParameter[];
175
+ source: string;
176
+ sourceLayer?: string;
177
+ }
178
+ interface DataJoinParameter {
179
+ name: string;
180
+ required?: boolean;
181
+ value: string | number | boolean;
182
+ }
183
+ declare class DataJoin {
184
+ readonly id: string;
185
+ readonly map: FlowMap;
186
+ private static defaultOptions;
187
+ private autorunDisposer;
188
+ private dataExpression;
189
+ private options;
190
+ private parameterExpressions;
191
+ constructor(id: string, map: FlowMap, options: DataJoinOptions);
192
+ get source(): string;
193
+ start(): void;
194
+ stop(): void;
195
+ private doDataJoin;
196
+ private loadData;
197
+ }
198
+ declare class DataJoinPlugin extends MapPluginBase {
199
+ private _joins;
200
+ readonly name = "DataJoinPlugin";
201
+ constructor(pluginManager: PluginManager);
202
+ addDataJoin(id: string, options: DataJoinOptions): void;
203
+ bindState(state: StateStore): void;
204
+ destroy(): void;
205
+ handleSourceRemoved(event: MapSourceEvent): void;
206
+ removeDataJoin(id: string): void;
207
+ }
208
+
209
+ declare class HoverEffectPlugin extends MapPluginBase {
210
+ private hoveredFeature;
211
+ readonly name = "HoverEffectPlugin";
212
+ constructor(pluginManager: PluginManager);
213
+ handleMouseMove(event: MapMouseEvent): void;
214
+ handleMouseOut(event: MapEvent): void;
215
+ handleSetExclusivePlugin(exclusivePlugins: MapPluginBase[]): void;
216
+ private compareFeatures;
217
+ private clearHover;
218
+ }
219
+
220
+ type MapPopupTemplateFn<TState extends StateStore = StateStore> = (feature: MapFeature | null, state: TState) => string | Node | lit.TemplateResult;
221
+ interface MapPopupEvents {
222
+ closed: (popup: MapPopup) => void;
223
+ }
224
+ /**
225
+ * [[MapPopup]] options.
226
+ */
227
+ interface MapPopupOptions {
228
+ /** Specify a CSS class to add to the popup. */
229
+ class?: string;
230
+ /** Enable 'close' button. */
231
+ closeButton?: boolean;
232
+ /** Enable closing popup on click on map. */
233
+ closeOnClick?: boolean;
234
+ /** Enable closing pop when map is moved. */
235
+ closeOnMove?: boolean;
236
+ /** Specify popup content as HTML string or HTML node. */
237
+ content: string | Node | MapPopupTemplateFn;
238
+ /** Maximum width of popup in CSS units. */
239
+ maxWidth?: string;
240
+ trackFeature?: boolean;
241
+ }
242
+ /**
243
+ * Core functionality for Flo.w map popups.
244
+ *
245
+ * @noInheritDoc
246
+ */
247
+ declare class MapPopup extends EventEmitter<MapPopupEvents> {
248
+ readonly map: FlowMap;
249
+ readonly options: MapPopupOptions;
250
+ private _feature?;
251
+ private _contentContainer;
252
+ private _featureStream;
253
+ private _maplibrePopup;
254
+ private _featureStreamDisposer?;
255
+ /**
256
+ * Constructs a new `MapPopup` instance.
257
+ *
258
+ * This is called by the `FlowMap::openPopup` method.
259
+ *
260
+ * @param map Parent Flo.w map.
261
+ * @param options Popup options.
262
+ */
263
+ constructor(map: FlowMap, options: MapPopupOptions);
264
+ get feature(): MapFeatureIdentifier | undefined;
265
+ /**
266
+ * Close the popup.
267
+ */
268
+ close(): void;
269
+ /**
270
+ * Move the popup to a new location.
271
+ *
272
+ * @param lngLat New location.
273
+ */
274
+ moveTo(lngLat: [number, number]): void;
275
+ /**
276
+ * Open the popup at the specified location.
277
+ *
278
+ * @param lngLat Popup location.
279
+ */
280
+ open(event: MapMouseEvent): void;
281
+ open(lngLat: [number, number], feature?: MapFeatureIdentifier): void;
282
+ private cssClasses;
283
+ private handleFeatureUpdate;
284
+ private popupCloseHandler;
285
+ private renderContent;
286
+ }
287
+
288
+ declare class PopupPlugin extends MapPluginBase {
289
+ private _popupTemplates;
290
+ private _popups;
291
+ readonly name = "PopupPlugin";
292
+ constructor(pluginManager: PluginManager);
293
+ registerPopup(id: string, options: MapPopupOptions): void;
294
+ openPopup(id: string, event: MapMouseEvent): MapPopup;
295
+ openPopup(id: string, lngLat: [number, number], feature?: MapFeatureIdentifier): MapPopup;
296
+ closeAllPopups(): void;
297
+ closePopupsForSources(sources: string | string[]): void;
298
+ }
299
+
300
+ declare class UrlSyncPlugin extends MapPluginBase {
301
+ readonly name = "UrlSyncPlugin";
302
+ constructor(pluginManager: PluginManager);
303
+ initialize(): void;
304
+ handleMoveEnd(event: MapEvent): void;
305
+ private mapStateToHash;
306
+ private hashToMapState;
307
+ }
308
+
309
+ export { AnnotationEvent, AnnotationEventData, AnnotationEventType, AnnotationEventTypes, AnnotationFeature, AnnotationFeatureProps, AnnotationFeatureType, AnnotationMode, AnnotationOperation, AnnotationPlugin, AnnotationPluginOptions, AnnotationStyle, AnnotationsServiceConfig, DataJoin, DataJoinOptions, DataJoinPlugin, HoverEffectPlugin, MapPluginBase, PluginManager, PopupPlugin, SelectionEvent, SelectionEventType, SelectionEventTypes, SelectionMode, SelectionOptions, SelectionPlugin, UrlSyncPlugin };