@emuanalytics/flow-rdf-core 4.1.5 → 4.1.7

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/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as Annotation, M as MapStyleSpecification, S as StateStore, a as MapDataSource, b as MapLayer, F as FlowContextOptions, c as FlowContext } from './shared/flow-rdf-core.09a21889.mjs';
2
- export { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, _ as FeatureStreamOptions, s as FillExtrusionLayerStyleBuilder, q as FillLayerStyleBuilder, d as FlowCoreError, h as FlowCoreExpressionCustomFunction, i as FlowCoreExpressionCustomFunctionSignature, j as FlowCoreExpressionCustomFunctions, e as FlowCoreExpressionError, a0 as FlowCoreMap, o as FlowEngineEndpoint, f as FlowMapError, H as HeatmapLayerStyleBuilder, u as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, T as MapAnimationOptions, U as MapCenterOptions, K as MapDataSourceOptions, N as MapDataSourceSpecification, J as MapDataSourceType, a3 as MapEvent, a2 as MapEventType, a1 as MapEventTypes, V as MapFeature, W as MapFeatureIdentifier, Z as MapFeatureStream, O as MapGeojsonData, E as MapLayerExpression, z as MapLayerOptions, I as MapLayerPropertyMetadataIndex, G as MapLayerSpecification, w as MapLayerStyleBuilder, p as MapLayerType, a6 as MapLoadingEvent, a4 as MapMouseEvent, $ as MapOptions, X as MapPaddingOptions, aa as MapPopup, a9 as MapPopupOptions, a8 as MapPopupTemplateFn, g as MapRegistry, a5 as MapSourceEvent, Y as MapSourceIdentifier, a7 as MapStyleChangeEvent, P as ParserExpression, k as ParserExpressionWithIndex, l as ParserFunctionExpression, m as ParserIndex, n as ParserProgram, aq as Path, ar as PathValue, ab as Query, ag as QueryAttribute, al as QueryDefinition, an as QueryDefinitionFn, ai as QueryExtraParams, am as QueryOptions, aj as QueryOrderClause, Q as QueryRegistry, af as QueryResultFormat, ao as QueryResultTransformFn, ak as QuerySampleOptions, ah as QueryWhereClauses, t as RasterLayerStyleBuilder, R as ReactiveExpression, au as SerializationFormat, at as StoreAnnotations, as as StoreConstructor, x as StyleExpression, r as SymbolLayerStyleBuilder, y as expr, v as layerStyle, ac as query, ad as queryMany, ae as queryOne, ap as traceReaction } from './shared/flow-rdf-core.09a21889.mjs';
1
+ import { A as Annotation, M as MapStyleSpecification, S as StateStore, a as MapDataSource, b as MapLayer, F as FlowContextOptions, c as FlowContext } from './shared/flow-rdf-core.1ee62df9.mjs';
2
+ export { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, _ as FeatureStreamOptions, s as FillExtrusionLayerStyleBuilder, q as FillLayerStyleBuilder, d as FlowCoreError, h as FlowCoreExpressionCustomFunction, i as FlowCoreExpressionCustomFunctionSignature, j as FlowCoreExpressionCustomFunctions, e as FlowCoreExpressionError, a0 as FlowCoreMap, o as FlowEngineEndpoint, f as FlowMapError, H as HeatmapLayerStyleBuilder, u as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, T as MapAnimationOptions, U as MapCenterOptions, K as MapDataSourceOptions, N as MapDataSourceSpecification, J as MapDataSourceType, a3 as MapEvent, a2 as MapEventType, a1 as MapEventTypes, V as MapFeature, W as MapFeatureIdentifier, Z as MapFeatureStream, O as MapGeojsonData, E as MapLayerExpression, z as MapLayerOptions, I as MapLayerPropertyMetadataIndex, G as MapLayerSpecification, w as MapLayerStyleBuilder, p as MapLayerType, a6 as MapLoadingEvent, a4 as MapMouseEvent, $ as MapOptions, X as MapPaddingOptions, aa as MapPopup, a9 as MapPopupOptions, a8 as MapPopupTemplateFn, g as MapRegistry, a5 as MapSourceEvent, Y as MapSourceIdentifier, a7 as MapStyleChangeEvent, P as ParserExpression, k as ParserExpressionWithIndex, l as ParserFunctionExpression, m as ParserIndex, n as ParserProgram, aq as Path, ar as PathValue, ab as Query, ag as QueryAttribute, al as QueryDefinition, an as QueryDefinitionFn, ai as QueryExtraParams, am as QueryOptions, aj as QueryOrderClause, Q as QueryRegistry, af as QueryResultFormat, ao as QueryResultTransformFn, ak as QuerySampleOptions, ah as QueryWhereClauses, t as RasterLayerStyleBuilder, R as ReactiveExpression, au as SerializationFormat, at as StoreAnnotations, as as StoreConstructor, x as StyleExpression, r as SymbolLayerStyleBuilder, y as expr, v as layerStyle, ac as query, ad as queryMany, ae as queryOne, ap as traceReaction } from './shared/flow-rdf-core.1ee62df9.mjs';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
4
  export { makeAutoObservable, makeObservable } from 'mobx';
5
5
  import 'eventemitter3';
@@ -17,6 +17,7 @@ interface SyncAnnotation<T = any> extends Annotation {
17
17
  type: string;
18
18
  arg?: SyncAnnotationArg;
19
19
  }
20
+ /** @function */
20
21
  declare const serialize: PropertyDecorator & SyncAnnotation<any> & {
21
22
  raw: PropertyDecorator & SyncAnnotation<any>;
22
23
  string: PropertyDecorator & SyncAnnotation<string>;
@@ -28,15 +29,18 @@ declare const serialize: PropertyDecorator & SyncAnnotation<any> & {
28
29
  interface ReactiveAnnotation extends Annotation {
29
30
  mobxAnnotation: any;
30
31
  }
32
+ /** @function */
31
33
  declare const observable: PropertyDecorator & ReactiveAnnotation & {
32
34
  deep: PropertyDecorator & ReactiveAnnotation;
33
35
  ref: PropertyDecorator & ReactiveAnnotation;
34
36
  struct: PropertyDecorator & ReactiveAnnotation;
35
37
  shallow: PropertyDecorator & ReactiveAnnotation;
36
38
  };
39
+ /** @function */
37
40
  declare const computed: PropertyDecorator & ReactiveAnnotation & {
38
41
  struct: PropertyDecorator & ReactiveAnnotation;
39
42
  };
43
+ /** @function */
40
44
  declare const action: PropertyDecorator & ReactiveAnnotation;
41
45
 
42
46
  interface MapStyleOptions {
@@ -92,8 +96,11 @@ declare class FlowRdfCoreGlobals {
92
96
  declare function isolateGlobalState(): void;
93
97
  declare function getGlobalState(): FlowRdfCoreGlobals;
94
98
 
99
+ /** @function */
95
100
  declare const initializeContext: <TState extends StateStore = StateStore>(options: FlowContextOptions<TState>) => FlowContext<TState>;
101
+ /** @function */
96
102
  declare const uninitializeContext: (contextId?: string) => void;
103
+ /** @function */
97
104
  declare const getContext: <TState extends StateStore = StateStore>(id?: string) => Promise<FlowContext<TState>>;
98
105
 
99
106
  export { ContextRegistry, FlowContext, FlowContextOptions, FlowRdfCoreGlobals, MapDataSource, MapLayer, MapStyle, type MapStyleOptions, MapStyleSpecification, StateStore, action, computed, getContext, getGlobalState, initializeContext, isolateGlobalState, observable, serialize, uninitializeContext };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as Annotation, M as MapStyleSpecification, S as StateStore, a as MapDataSource, b as MapLayer, F as FlowContextOptions, c as FlowContext } from './shared/flow-rdf-core.09a21889.js';
2
- export { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, _ as FeatureStreamOptions, s as FillExtrusionLayerStyleBuilder, q as FillLayerStyleBuilder, d as FlowCoreError, h as FlowCoreExpressionCustomFunction, i as FlowCoreExpressionCustomFunctionSignature, j as FlowCoreExpressionCustomFunctions, e as FlowCoreExpressionError, a0 as FlowCoreMap, o as FlowEngineEndpoint, f as FlowMapError, H as HeatmapLayerStyleBuilder, u as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, T as MapAnimationOptions, U as MapCenterOptions, K as MapDataSourceOptions, N as MapDataSourceSpecification, J as MapDataSourceType, a3 as MapEvent, a2 as MapEventType, a1 as MapEventTypes, V as MapFeature, W as MapFeatureIdentifier, Z as MapFeatureStream, O as MapGeojsonData, E as MapLayerExpression, z as MapLayerOptions, I as MapLayerPropertyMetadataIndex, G as MapLayerSpecification, w as MapLayerStyleBuilder, p as MapLayerType, a6 as MapLoadingEvent, a4 as MapMouseEvent, $ as MapOptions, X as MapPaddingOptions, aa as MapPopup, a9 as MapPopupOptions, a8 as MapPopupTemplateFn, g as MapRegistry, a5 as MapSourceEvent, Y as MapSourceIdentifier, a7 as MapStyleChangeEvent, P as ParserExpression, k as ParserExpressionWithIndex, l as ParserFunctionExpression, m as ParserIndex, n as ParserProgram, aq as Path, ar as PathValue, ab as Query, ag as QueryAttribute, al as QueryDefinition, an as QueryDefinitionFn, ai as QueryExtraParams, am as QueryOptions, aj as QueryOrderClause, Q as QueryRegistry, af as QueryResultFormat, ao as QueryResultTransformFn, ak as QuerySampleOptions, ah as QueryWhereClauses, t as RasterLayerStyleBuilder, R as ReactiveExpression, au as SerializationFormat, at as StoreAnnotations, as as StoreConstructor, x as StyleExpression, r as SymbolLayerStyleBuilder, y as expr, v as layerStyle, ac as query, ad as queryMany, ae as queryOne, ap as traceReaction } from './shared/flow-rdf-core.09a21889.js';
1
+ import { A as Annotation, M as MapStyleSpecification, S as StateStore, a as MapDataSource, b as MapLayer, F as FlowContextOptions, c as FlowContext } from './shared/flow-rdf-core.1ee62df9.js';
2
+ export { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, _ as FeatureStreamOptions, s as FillExtrusionLayerStyleBuilder, q as FillLayerStyleBuilder, d as FlowCoreError, h as FlowCoreExpressionCustomFunction, i as FlowCoreExpressionCustomFunctionSignature, j as FlowCoreExpressionCustomFunctions, e as FlowCoreExpressionError, a0 as FlowCoreMap, o as FlowEngineEndpoint, f as FlowMapError, H as HeatmapLayerStyleBuilder, u as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, T as MapAnimationOptions, U as MapCenterOptions, K as MapDataSourceOptions, N as MapDataSourceSpecification, J as MapDataSourceType, a3 as MapEvent, a2 as MapEventType, a1 as MapEventTypes, V as MapFeature, W as MapFeatureIdentifier, Z as MapFeatureStream, O as MapGeojsonData, E as MapLayerExpression, z as MapLayerOptions, I as MapLayerPropertyMetadataIndex, G as MapLayerSpecification, w as MapLayerStyleBuilder, p as MapLayerType, a6 as MapLoadingEvent, a4 as MapMouseEvent, $ as MapOptions, X as MapPaddingOptions, aa as MapPopup, a9 as MapPopupOptions, a8 as MapPopupTemplateFn, g as MapRegistry, a5 as MapSourceEvent, Y as MapSourceIdentifier, a7 as MapStyleChangeEvent, P as ParserExpression, k as ParserExpressionWithIndex, l as ParserFunctionExpression, m as ParserIndex, n as ParserProgram, aq as Path, ar as PathValue, ab as Query, ag as QueryAttribute, al as QueryDefinition, an as QueryDefinitionFn, ai as QueryExtraParams, am as QueryOptions, aj as QueryOrderClause, Q as QueryRegistry, af as QueryResultFormat, ao as QueryResultTransformFn, ak as QuerySampleOptions, ah as QueryWhereClauses, t as RasterLayerStyleBuilder, R as ReactiveExpression, au as SerializationFormat, at as StoreAnnotations, as as StoreConstructor, x as StyleExpression, r as SymbolLayerStyleBuilder, y as expr, v as layerStyle, ac as query, ad as queryMany, ae as queryOne, ap as traceReaction } from './shared/flow-rdf-core.1ee62df9.js';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
4
  export { makeAutoObservable, makeObservable } from 'mobx';
5
5
  import 'eventemitter3';
@@ -17,6 +17,7 @@ interface SyncAnnotation<T = any> extends Annotation {
17
17
  type: string;
18
18
  arg?: SyncAnnotationArg;
19
19
  }
20
+ /** @function */
20
21
  declare const serialize: PropertyDecorator & SyncAnnotation<any> & {
21
22
  raw: PropertyDecorator & SyncAnnotation<any>;
22
23
  string: PropertyDecorator & SyncAnnotation<string>;
@@ -28,15 +29,18 @@ declare const serialize: PropertyDecorator & SyncAnnotation<any> & {
28
29
  interface ReactiveAnnotation extends Annotation {
29
30
  mobxAnnotation: any;
30
31
  }
32
+ /** @function */
31
33
  declare const observable: PropertyDecorator & ReactiveAnnotation & {
32
34
  deep: PropertyDecorator & ReactiveAnnotation;
33
35
  ref: PropertyDecorator & ReactiveAnnotation;
34
36
  struct: PropertyDecorator & ReactiveAnnotation;
35
37
  shallow: PropertyDecorator & ReactiveAnnotation;
36
38
  };
39
+ /** @function */
37
40
  declare const computed: PropertyDecorator & ReactiveAnnotation & {
38
41
  struct: PropertyDecorator & ReactiveAnnotation;
39
42
  };
43
+ /** @function */
40
44
  declare const action: PropertyDecorator & ReactiveAnnotation;
41
45
 
42
46
  interface MapStyleOptions {
@@ -92,8 +96,11 @@ declare class FlowRdfCoreGlobals {
92
96
  declare function isolateGlobalState(): void;
93
97
  declare function getGlobalState(): FlowRdfCoreGlobals;
94
98
 
99
+ /** @function */
95
100
  declare const initializeContext: <TState extends StateStore = StateStore>(options: FlowContextOptions<TState>) => FlowContext<TState>;
101
+ /** @function */
96
102
  declare const uninitializeContext: (contextId?: string) => void;
103
+ /** @function */
97
104
  declare const getContext: <TState extends StateStore = StateStore>(id?: string) => Promise<FlowContext<TState>>;
98
105
 
99
106
  export { ContextRegistry, FlowContext, FlowContextOptions, FlowRdfCoreGlobals, MapDataSource, MapLayer, MapStyle, type MapStyleOptions, MapStyleSpecification, StateStore, action, computed, getContext, getGlobalState, initializeContext, isolateGlobalState, observable, serialize, uninitializeContext };
@@ -7,7 +7,9 @@ function PREFIX(operatorsParser, nextParser) {
7
7
  return parser;
8
8
  }
9
9
  function BINARY_RIGHT(operatorsParser, nextParser) {
10
- const parser = P.lazy(() => nextParser.chain((next) => P.seq(operatorsParser, P.of(next), parser).or(P.of(next))));
10
+ const parser = P.lazy(
11
+ () => nextParser.chain((next) => P.seq(operatorsParser, P.of(next), parser).or(P.of(next)))
12
+ );
11
13
  return parser;
12
14
  }
13
15
  function TERNARY_RIGHT(operatorsParser, nextParser) {
@@ -13,6 +13,7 @@ import { PluginManager } from './plugins/plugin-manager.mjs';
13
13
  import { ImageRegistry } from './support/image-registry.mjs';
14
14
  import { MapStyleChangeEvent, MapSourceEvent, MapEvent, MapLoadingEvent, MapMouseEvent } from './support/map-events.mjs';
15
15
  import { MapFeatureStream } from './support/map-feature-stream.mjs';
16
+ import { sortFeaturesByDrawOrder } from './support/sort-features-by-draw-order.mjs';
16
17
  import { MapStyle } from '../map-style/map-style.mjs';
17
18
  import { MapLayer } from '../map-style/map-layer.mjs';
18
19
  import { MapDataSource } from '../map-style/map-data-source.mjs';
@@ -315,8 +316,8 @@ const _FlowCoreMap = class _FlowCoreMap extends EventEmitter {
315
316
  /**
316
317
  * Register a map icon image.
317
318
  *
318
- * The image can be used on [symbol-type map layers](/flow-rdf-core/layer-reference/symbol) by specifying the image ID
319
- * as the [`iconImage`](/flow-rdf-core/layer-reference/symbol#icon-image) property.
319
+ * The image can be used on [symbol-type map layers](/flow-rdf/flow-rdf-core/layer-reference/symbol) by specifying
320
+ * the image ID as the [`iconImage`](/flow-rdf/flow-rdf-core/layer-reference/symbol#icon-image) property.
320
321
  *
321
322
  * :::warning
322
323
  * To fully support recoloring and halo effects, the source image should be a SDF (signed distance field) image.
@@ -517,10 +518,11 @@ const _FlowCoreMap = class _FlowCoreMap extends EventEmitter {
517
518
  /**
518
519
  * Returns the map's current visible bounds in degrees as an array of `[west, south, east, north]`.
519
520
  *
520
- * The visible bounds may differ from the map's full bounds if fixed positioning is used. With fixed positioning,
521
- * the map's canvas extends outside its container underneath other elements like side-bars. This allows side-bars
522
- * to be opened and closed without re-rendering the map. The visible bounds represent the region of the map that
523
- * is currently visible within the map's container.
521
+ * The visible bounds are the bounds of the part of the map's canvas that lies within the parent element of the
522
+ * map's container (the `flow-ui-map` element). They differ from the map's full bounds when the `fixed` mode of
523
+ * `flow-ui-map` is used. In that mode, the canvas fills the viewport and is clipped to the `flow-ui-map` element,
524
+ * so that side bars can be opened and closed without re-rendering the map. Otherwise the canvas fills the element,
525
+ * and the visible bounds are the full bounds.
524
526
  *
525
527
  * See also {@link getBounds}.
526
528
  */
@@ -529,11 +531,21 @@ const _FlowCoreMap = class _FlowCoreMap extends EventEmitter {
529
531
  if (!parentEl) {
530
532
  return this.getBounds();
531
533
  }
532
- const mapRect = parentEl.getBoundingClientRect();
533
- const topLeft = this._maplibreMap.unproject([mapRect.x, mapRect.y]);
534
- const bottomRight = this._maplibreMap.unproject([mapRect.x + mapRect.width, mapRect.y + mapRect.height]);
535
- const bounds = [topLeft.lng, bottomRight.lat, bottomRight.lng, topLeft.lat];
536
- return bounds;
534
+ const canvasRect = this.container.getBoundingClientRect();
535
+ const parentRect = parentEl.getBoundingClientRect();
536
+ const left = Math.max(parentRect.left, canvasRect.left) - canvasRect.left;
537
+ const top = Math.max(parentRect.top, canvasRect.top) - canvasRect.top;
538
+ const right = Math.max(left, Math.min(parentRect.right, canvasRect.right) - canvasRect.left);
539
+ const bottom = Math.max(top, Math.min(parentRect.bottom, canvasRect.bottom) - canvasRect.top);
540
+ const corners = [
541
+ [left, top],
542
+ [right, top],
543
+ [right, bottom],
544
+ [left, bottom]
545
+ ].map((point) => this._maplibreMap.unproject(point));
546
+ const lngs = corners.map((c) => c.lng);
547
+ const lats = corners.map((c) => c.lat);
548
+ return [Math.min(...lngs), Math.min(...lats), Math.max(...lngs), Math.max(...lats)];
537
549
  }
538
550
  /**
539
551
  * Set feature state properties for a map feature.
@@ -665,6 +677,15 @@ const _FlowCoreMap = class _FlowCoreMap extends EventEmitter {
665
677
  state: feature.state
666
678
  };
667
679
  }
680
+ /**
681
+ * Queries the rendered features of interactive layers at the mouse position, in top-down draw order so the first
682
+ * is the one drawn on top.
683
+ */
684
+ queryFeatures(event) {
685
+ const layerIds = this._style.getLayers((layer) => layer.interactive).map((layer) => layer.id);
686
+ const maplibreFeatures = this._maplibreMap.queryRenderedFeatures(this.featureQueryBox(event), { layers: layerIds });
687
+ return sortFeaturesByDrawOrder(maplibreFeatures).map(this.featureFromMaplibreFeature.bind(this));
688
+ }
668
689
  featureQueryBox(event) {
669
690
  const queryBox = this._options.featureClickTolerance ? [
670
691
  [event.point.x - this._options.featureClickTolerance, event.point.y - this._options.featureClickTolerance],
@@ -673,7 +694,7 @@ const _FlowCoreMap = class _FlowCoreMap extends EventEmitter {
673
694
  return queryBox;
674
695
  }
675
696
  async handleLoading(event) {
676
- let loading = false;
697
+ let loading;
677
698
  if (event.type === "sourcedata" && event.isSourceLoaded === false) {
678
699
  loading = true;
679
700
  } else if (event.type === "idle") {
@@ -705,8 +726,7 @@ const _FlowCoreMap = class _FlowCoreMap extends EventEmitter {
705
726
  }
706
727
  handleMouseClick(type) {
707
728
  return (event) => {
708
- const layerIds = this._style.getLayers((layer) => layer.interactive).map((layer) => layer.id);
709
- const features = this._maplibreMap.queryRenderedFeatures(this.featureQueryBox(event), { layers: layerIds }).map(this.featureFromMaplibreFeature.bind(this));
729
+ const features = this.queryFeatures(event);
710
730
  if (features.length) {
711
731
  debug(`${this.formattedName} Feature ${type}ed`, features[0]);
712
732
  }
@@ -716,8 +736,7 @@ const _FlowCoreMap = class _FlowCoreMap extends EventEmitter {
716
736
  }
717
737
  handleMouseMove(event) {
718
738
  if (event.type === "mousemove") {
719
- const layerIds = this._style.getLayers((layer) => layer.interactive).map((layer) => layer.id);
720
- const features = this._maplibreMap.queryRenderedFeatures(this.featureQueryBox(event), { layers: layerIds }).map(this.featureFromMaplibreFeature.bind(this));
739
+ const features = this.queryFeatures(event);
721
740
  const flowEvent = MapMouseEvent.fromMaplibreMouseEvent("mouseMove", event, this, features);
722
741
  this.emitEvent(flowEvent);
723
742
  } else if (event.type === "mouseout") {
@@ -585,7 +585,8 @@ const _AnnotationPlugin = class _AnnotationPlugin extends MapPluginBase {
585
585
  }
586
586
  isValidGeometry(feature) {
587
587
  if (isPolygon(feature)) {
588
- return feature.geometry.coordinates[0][0] !== null && feature.geometry.coordinates[0].length > 3 && turfArea(feature) > 0;
588
+ const ring = feature.geometry.coordinates[0];
589
+ return !!ring && ring[0] !== null && ring.length > 3 && turfArea(feature) > 0;
589
590
  } else if (isLineString(feature)) {
590
591
  return feature.geometry.coordinates.length > 1 && turfLength(feature) > 0;
591
592
  } else if (isPoint(feature)) {
@@ -45,12 +45,15 @@ const _DataJoin = class _DataJoin {
45
45
  this.dataExpression = null;
46
46
  }
47
47
  if (isArrayFull(this.options.parameters)) {
48
- this.parameterExpressions = this.options.parameters.reduce((accum, param) => {
49
- const expr = new ReactiveExpression(param.value.toString());
50
- expr.bindState(this.map.context.state);
51
- accum[param.name] = expr;
52
- return accum;
53
- }, {});
48
+ this.parameterExpressions = this.options.parameters.reduce(
49
+ (accum, param) => {
50
+ const expr = new ReactiveExpression(param.value.toString());
51
+ expr.bindState(this.map.context.state);
52
+ accum[param.name] = expr;
53
+ return accum;
54
+ },
55
+ {}
56
+ );
54
57
  }
55
58
  this.autorunDisposer = autorun(
56
59
  async () => {
@@ -35,7 +35,8 @@ const _MapExporter = class _MapExporter {
35
35
  switch (options.format) {
36
36
  case "png":
37
37
  exportCanvas.toBlob((blob) => {
38
- blob && saveAs(blob, fileName);
38
+ if (blob)
39
+ saveAs(blob, fileName);
39
40
  });
40
41
  break;
41
42
  case "pdf":
@@ -68,12 +69,11 @@ const _MapExporter = class _MapExporter {
68
69
  });
69
70
  }
70
71
  createMapCopy(options) {
71
- let bounds = this.map.maplibreMap.getBounds();
72
72
  let center = this.map.maplibreMap.getCenter();
73
73
  let zoom = this.map.maplibreMap.getZoom();
74
74
  const projection = this.map.maplibreMap.getProjection();
75
75
  if (isArray(options.bounds) && options.bounds.length === 4 && (projection?.type !== "globe" || zoom >= 4)) {
76
- bounds = new maplibre.LngLatBounds(
76
+ const bounds = new maplibre.LngLatBounds(
77
77
  [options.bounds[0], options.bounds[1]],
78
78
  [options.bounds[2], options.bounds[3]]
79
79
  );
@@ -1,5 +1,5 @@
1
- import { a3 as MapEvent, a0 as FlowCoreMap, Y as MapSourceIdentifier, av as MapFeatureId, aw as MapPluginBase, ax as PluginManager, a5 as MapSourceEvent, a4 as MapMouseEvent, Z as MapFeatureStream, ay as PartialBy, T as MapAnimationOptions, a7 as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, a9 as MapPopupOptions, aa as MapPopup, W as MapFeatureIdentifier } from '../../../shared/flow-rdf-core.09a21889.mjs';
2
- export { aC as EventHandlers, aB as PluginConstructor, aA as PluginEventsType, az as PluginOptionsType } from '../../../shared/flow-rdf-core.09a21889.mjs';
1
+ import { a3 as MapEvent, a0 as FlowCoreMap, Y as MapSourceIdentifier, av as MapFeatureId, aw as MapPluginBase, ax as PluginManager, a5 as MapSourceEvent, a4 as MapMouseEvent, Z as MapFeatureStream, ay as PartialBy, T as MapAnimationOptions, a7 as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, a9 as MapPopupOptions, aa as MapPopup, W as MapFeatureIdentifier } from '../../../shared/flow-rdf-core.1ee62df9.mjs';
2
+ export { aC as EventHandlers, aB as PluginConstructor, aA as PluginEventsType, az as PluginOptionsType } from '../../../shared/flow-rdf-core.1ee62df9.mjs';
3
3
  import { F as Func } from '../../../shared/flow-rdf-core.63162669.mjs';
4
4
  import 'eventemitter3';
5
5
  import 'lit-html';
@@ -1,5 +1,5 @@
1
- import { a3 as MapEvent, a0 as FlowCoreMap, Y as MapSourceIdentifier, av as MapFeatureId, aw as MapPluginBase, ax as PluginManager, a5 as MapSourceEvent, a4 as MapMouseEvent, Z as MapFeatureStream, ay as PartialBy, T as MapAnimationOptions, a7 as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, a9 as MapPopupOptions, aa as MapPopup, W as MapFeatureIdentifier } from '../../../shared/flow-rdf-core.09a21889.js';
2
- export { aC as EventHandlers, aB as PluginConstructor, aA as PluginEventsType, az as PluginOptionsType } from '../../../shared/flow-rdf-core.09a21889.js';
1
+ import { a3 as MapEvent, a0 as FlowCoreMap, Y as MapSourceIdentifier, av as MapFeatureId, aw as MapPluginBase, ax as PluginManager, a5 as MapSourceEvent, a4 as MapMouseEvent, Z as MapFeatureStream, ay as PartialBy, T as MapAnimationOptions, a7 as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, a9 as MapPopupOptions, aa as MapPopup, W as MapFeatureIdentifier } from '../../../shared/flow-rdf-core.1ee62df9.js';
2
+ export { aC as EventHandlers, aB as PluginConstructor, aA as PluginEventsType, az as PluginOptionsType } from '../../../shared/flow-rdf-core.1ee62df9.js';
3
3
  import { F as Func } from '../../../shared/flow-rdf-core.63162669.js';
4
4
  import 'eventemitter3';
5
5
  import 'lit-html';
@@ -40,8 +40,9 @@ class MapMouseEvent extends MapEvent {
40
40
  */
41
41
  __publicField(this, "lngLat");
42
42
  /**
43
- * Features found at the mouse coordinate. Features are ordered by map layer with features higher in the layer stack appearing first in the `features` array.
44
- * Features from non-interactive layers are excluded.
43
+ * Features found at the mouse coordinate, in top-down draw order: the first feature is the one drawn on top.
44
+ * Features in higher layers come first and, within a layer that uses a sort key (such as `circle-sort-key`),
45
+ * features with a higher sort key come first. Features from non-interactive layers are excluded.
45
46
  */
46
47
  __publicField(this, "features");
47
48
  this.point = point;
@@ -60,7 +60,7 @@ class MapFeatureStream {
60
60
  *
61
61
  */
62
62
  get featureData() {
63
- this._sourceLoadCount;
63
+ void this._sourceLoadCount;
64
64
  const featureData = this.queryFeatureData(this._options.featureIds);
65
65
  return featureData;
66
66
  }
@@ -137,10 +137,13 @@ class MapFeatureStream {
137
137
  });
138
138
  const ids = /* @__PURE__ */ new Set();
139
139
  features = features.filter((feature) => ids.has(feature.id) ? false : ids.add(feature.id) && true);
140
- const featureData = features.reduce((accum, f) => {
141
- accum[f.id] = this.featureFromMaplibreFeature(f);
142
- return accum;
143
- }, {});
140
+ const featureData = features.reduce(
141
+ (accum, f) => {
142
+ accum[f.id] = this.featureFromMaplibreFeature(f);
143
+ return accum;
144
+ },
145
+ {}
146
+ );
144
147
  return featureData;
145
148
  }
146
149
  resume() {
@@ -0,0 +1,49 @@
1
+ const SORT_KEY_PROPERTIES = {
2
+ circle: "circle-sort-key",
3
+ fill: "fill-sort-key",
4
+ line: "line-sort-key",
5
+ symbol: "symbol-sort-key"
6
+ };
7
+ function drawSortKey(feature) {
8
+ const property = SORT_KEY_PROPERTIES[feature.layer.type];
9
+ const layout = feature.layer.layout;
10
+ if (!property || !layout)
11
+ return void 0;
12
+ if (feature.layer.type === "symbol" && layout["symbol-z-order"] === "viewport-y")
13
+ return void 0;
14
+ const key = layout[property];
15
+ return typeof key === "number" && Number.isFinite(key) ? key : void 0;
16
+ }
17
+ function sortRun(features, start, end) {
18
+ const keyed = [];
19
+ const positions = [];
20
+ for (let i = start; i < end; i++) {
21
+ const key = drawSortKey(features[i]);
22
+ if (key !== void 0) {
23
+ keyed.push({ feature: features[i], key });
24
+ positions.push(i);
25
+ }
26
+ }
27
+ if (keyed.length < 2)
28
+ return;
29
+ keyed.sort((a, b) => b.key - a.key);
30
+ keyed.forEach((item, index) => {
31
+ features[positions[index]] = item.feature;
32
+ });
33
+ }
34
+ function sortFeaturesByDrawOrder(features) {
35
+ const sorted = features.slice();
36
+ let start = 0;
37
+ while (start < sorted.length) {
38
+ const layerId = sorted[start].layer.id;
39
+ let end = start + 1;
40
+ while (end < sorted.length && sorted[end].layer.id === layerId)
41
+ end++;
42
+ if (end - start > 1)
43
+ sortRun(sorted, start, end);
44
+ start = end;
45
+ }
46
+ return sorted;
47
+ }
48
+
49
+ export { sortFeaturesByDrawOrder };
@@ -53,8 +53,8 @@ const _MapLayer = class _MapLayer {
53
53
  }
54
54
  }
55
55
  get layerSpecification() {
56
- this._options.above;
57
- this._options.below;
56
+ void this._options.above;
57
+ void this._options.below;
58
58
  const layer = {
59
59
  id: this._options.id,
60
60
  type: this._options.type,
@@ -149,7 +149,7 @@ const _MapStyle = class _MapStyle {
149
149
  return this._layerOrder.map((layerId) => this._layers[layerId]).filter((layer) => filter ? filter(layer) : true);
150
150
  }
151
151
  layerInsertionPoint(layer, spec) {
152
- let insertionIndex = -1;
152
+ let insertionIndex;
153
153
  if (layer.above) {
154
154
  insertionIndex = spec.layers.findIndex((l) => l.id === layer.above);
155
155
  if (insertionIndex >= 0)
@@ -242,8 +242,9 @@ class StateStore {
242
242
  bindElementProp(el, prop, path, options) {
243
243
  const fromState = options?.fromState ?? ((v) => v);
244
244
  return this.toStream(path, true).subscribe((value) => {
245
- if (value !== el[prop]) {
246
- el[prop] = fromState(value);
245
+ const propValue = fromState(value);
246
+ if (propValue !== el[prop]) {
247
+ el[prop] = propValue;
247
248
  }
248
249
  });
249
250
  }
@@ -423,29 +424,32 @@ class StateStore {
423
424
  */
424
425
  serialize(format = "raw", scope) {
425
426
  const annotations = this.serializationAnnotations;
426
- const serializedProps = Object.keys(annotations).reduce((accum, prop) => {
427
- const annotationArg = annotations[prop].arg;
428
- let annotationScopes = [];
429
- let persistedName;
430
- if (isStringFull(annotationArg)) {
431
- annotationScopes = [annotationArg];
432
- } else if (isArrayFull(annotationArg)) {
433
- annotationScopes = annotationArg;
434
- } else if (isPlainObject(annotationArg)) {
435
- annotationScopes = ensureArray(annotationArg?.scope ?? []);
436
- persistedName = annotationArg?.name;
437
- }
438
- const annotationType = annotations[prop].type;
439
- if (scope && annotationType !== "state" && !annotationScopes.includes(scope)) {
427
+ const serializedProps = Object.keys(annotations).reduce(
428
+ (accum, prop) => {
429
+ const annotationArg = annotations[prop].arg;
430
+ let annotationScopes = [];
431
+ let persistedName;
432
+ if (isStringFull(annotationArg)) {
433
+ annotationScopes = [annotationArg];
434
+ } else if (isArrayFull(annotationArg)) {
435
+ annotationScopes = annotationArg;
436
+ } else if (isPlainObject(annotationArg)) {
437
+ annotationScopes = ensureArray(annotationArg?.scope ?? []);
438
+ persistedName = annotationArg?.name;
439
+ }
440
+ const annotationType = annotations[prop].type;
441
+ if (scope && annotationType !== "state" && !annotationScopes.includes(scope)) {
442
+ return accum;
443
+ }
444
+ const val = this[prop];
445
+ if (isDefined(val)) {
446
+ const serializedValue = annotations[prop].serialize(val, scope);
447
+ accum[persistedName ?? prop] = serializedValue;
448
+ }
440
449
  return accum;
441
- }
442
- const val = this[prop];
443
- if (isDefined(val)) {
444
- const serializedValue = annotations[prop].serialize(val, scope);
445
- accum[persistedName ?? prop] = serializedValue;
446
- }
447
- return accum;
448
- }, {});
450
+ },
451
+ {}
452
+ );
449
453
  switch (format) {
450
454
  case "json":
451
455
  return JSON.stringify(serializedProps);
@@ -1,3 +1,3 @@
1
- const version = "4.1.5";
1
+ const version = "4.1.7";
2
2
 
3
3
  export { version };
@@ -4,6 +4,21 @@ import { Client } from '@emuanalytics/flow-engine-client';
4
4
  import { ISubscription, IObservableStream, IDisposer } from 'mobx-utils';
5
5
  import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
6
6
 
7
+ declare class FlowCoreError extends Error {
8
+ cause?: Error | undefined;
9
+ constructor(message: string, cause?: Error | undefined);
10
+ }
11
+
12
+ declare class FlowCoreExpressionError extends FlowCoreError {
13
+ readonly reason: 'parseError' | 'evaluationError';
14
+ readonly errors: string[];
15
+ constructor(expression: string, reason: 'parseError' | 'evaluationError', errors: string[]);
16
+ }
17
+
18
+ declare class FlowMapError extends FlowCoreError {
19
+ constructor(message: string, originalError?: Error);
20
+ }
21
+
7
22
  type Annotation = {
8
23
  annotationType: string;
9
24
  };
@@ -578,20 +593,9 @@ declare class Debugger<TState extends StateStore = StateStore> {
578
593
  private logStateValue;
579
594
  }
580
595
 
581
- declare class FlowCoreError extends Error {
582
- cause?: Error | undefined;
583
- constructor(message: string, cause?: Error | undefined);
584
- }
585
-
586
- declare class FlowCoreExpressionError extends FlowCoreError {
587
- readonly reason: 'parseError' | 'evaluationError';
588
- readonly errors: string[];
589
- constructor(expression: string, reason: 'parseError' | 'evaluationError', errors: string[]);
590
- }
591
-
592
596
  /**
593
597
  * A Flo.w RDF reactive expression - used internally to parse and evaluate {@link MapLayer}
594
- * style [expressions](/flow-rdf-core/expression-reference/). An expression can be evaluated
598
+ * style [expressions](/flow-rdf/flow-rdf-core/expression-reference/). An expression can be evaluated
595
599
  * and its MapLibre-compatible representation can be generated.
596
600
  *
597
601
  * @example
@@ -1943,10 +1947,6 @@ declare class MapDataSource {
1943
1947
  /** Generates a new type by making a specified property of the original type `optional`. */
1944
1948
  type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
1945
1949
 
1946
- declare class FlowMapError extends FlowCoreError {
1947
- constructor(message: string, originalError?: Error);
1948
- }
1949
-
1950
1950
  type MapFeatureId = string | number;
1951
1951
  interface MapSourceIdentifier {
1952
1952
  source: string;
@@ -2179,8 +2179,9 @@ declare class MapMouseEvent extends MapEvent<MapMouseEventType, MouseEvent> {
2179
2179
  */
2180
2180
  lngLat: [number, number];
2181
2181
  /**
2182
- * Features found at the mouse coordinate. Features are ordered by map layer with features higher in the layer stack appearing first in the `features` array.
2183
- * Features from non-interactive layers are excluded.
2182
+ * Features found at the mouse coordinate, in top-down draw order: the first feature is the one drawn on top.
2183
+ * Features in higher layers come first and, within a layer that uses a sort key (such as `circle-sort-key`),
2184
+ * features with a higher sort key come first. Features from non-interactive layers are excluded.
2184
2185
  */
2185
2186
  features: MapFeature[];
2186
2187
  static fromMaplibreMouseEvent(type: MapMouseEventType, maplibreMouseEvent: MapMouseEvent$1, map: FlowCoreMap, features: MapFeature[]): MapMouseEvent;
@@ -2922,8 +2923,8 @@ declare class FlowCoreMap<TState extends StateStore = StateStore> extends EventE
2922
2923
  /**
2923
2924
  * Register a map icon image.
2924
2925
  *
2925
- * The image can be used on [symbol-type map layers](/flow-rdf-core/layer-reference/symbol) by specifying the image ID
2926
- * as the [`iconImage`](/flow-rdf-core/layer-reference/symbol#icon-image) property.
2926
+ * The image can be used on [symbol-type map layers](/flow-rdf/flow-rdf-core/layer-reference/symbol) by specifying
2927
+ * the image ID as the [`iconImage`](/flow-rdf/flow-rdf-core/layer-reference/symbol#icon-image) property.
2927
2928
  *
2928
2929
  * :::warning
2929
2930
  * To fully support recoloring and halo effects, the source image should be a SDF (signed distance field) image.
@@ -3030,10 +3031,11 @@ declare class FlowCoreMap<TState extends StateStore = StateStore> extends EventE
3030
3031
  /**
3031
3032
  * Returns the map's current visible bounds in degrees as an array of `[west, south, east, north]`.
3032
3033
  *
3033
- * The visible bounds may differ from the map's full bounds if fixed positioning is used. With fixed positioning,
3034
- * the map's canvas extends outside its container underneath other elements like side-bars. This allows side-bars
3035
- * to be opened and closed without re-rendering the map. The visible bounds represent the region of the map that
3036
- * is currently visible within the map's container.
3034
+ * The visible bounds are the bounds of the part of the map's canvas that lies within the parent element of the
3035
+ * map's container (the `flow-ui-map` element). They differ from the map's full bounds when the `fixed` mode of
3036
+ * `flow-ui-map` is used. In that mode, the canvas fills the viewport and is clipped to the `flow-ui-map` element,
3037
+ * so that side bars can be opened and closed without re-rendering the map. Otherwise the canvas fills the element,
3038
+ * and the visible bounds are the full bounds.
3037
3039
  *
3038
3040
  * See also {@link getBounds}.
3039
3041
  */
@@ -3105,6 +3107,11 @@ declare class FlowCoreMap<TState extends StateStore = StateStore> extends EventE
3105
3107
  private get formattedName();
3106
3108
  private bindMapEvents;
3107
3109
  private featureFromMaplibreFeature;
3110
+ /**
3111
+ * Queries the rendered features of interactive layers at the mouse position, in top-down draw order so the first
3112
+ * is the one drawn on top.
3113
+ */
3114
+ private queryFeatures;
3108
3115
  private featureQueryBox;
3109
3116
  private handleLoading;
3110
3117
  private handleMissingImage;
@@ -4,6 +4,21 @@ import { Client } from '@emuanalytics/flow-engine-client';
4
4
  import { ISubscription, IObservableStream, IDisposer } from 'mobx-utils';
5
5
  import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
6
6
 
7
+ declare class FlowCoreError extends Error {
8
+ cause?: Error | undefined;
9
+ constructor(message: string, cause?: Error | undefined);
10
+ }
11
+
12
+ declare class FlowCoreExpressionError extends FlowCoreError {
13
+ readonly reason: 'parseError' | 'evaluationError';
14
+ readonly errors: string[];
15
+ constructor(expression: string, reason: 'parseError' | 'evaluationError', errors: string[]);
16
+ }
17
+
18
+ declare class FlowMapError extends FlowCoreError {
19
+ constructor(message: string, originalError?: Error);
20
+ }
21
+
7
22
  type Annotation = {
8
23
  annotationType: string;
9
24
  };
@@ -578,20 +593,9 @@ declare class Debugger<TState extends StateStore = StateStore> {
578
593
  private logStateValue;
579
594
  }
580
595
 
581
- declare class FlowCoreError extends Error {
582
- cause?: Error | undefined;
583
- constructor(message: string, cause?: Error | undefined);
584
- }
585
-
586
- declare class FlowCoreExpressionError extends FlowCoreError {
587
- readonly reason: 'parseError' | 'evaluationError';
588
- readonly errors: string[];
589
- constructor(expression: string, reason: 'parseError' | 'evaluationError', errors: string[]);
590
- }
591
-
592
596
  /**
593
597
  * A Flo.w RDF reactive expression - used internally to parse and evaluate {@link MapLayer}
594
- * style [expressions](/flow-rdf-core/expression-reference/). An expression can be evaluated
598
+ * style [expressions](/flow-rdf/flow-rdf-core/expression-reference/). An expression can be evaluated
595
599
  * and its MapLibre-compatible representation can be generated.
596
600
  *
597
601
  * @example
@@ -1943,10 +1947,6 @@ declare class MapDataSource {
1943
1947
  /** Generates a new type by making a specified property of the original type `optional`. */
1944
1948
  type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
1945
1949
 
1946
- declare class FlowMapError extends FlowCoreError {
1947
- constructor(message: string, originalError?: Error);
1948
- }
1949
-
1950
1950
  type MapFeatureId = string | number;
1951
1951
  interface MapSourceIdentifier {
1952
1952
  source: string;
@@ -2179,8 +2179,9 @@ declare class MapMouseEvent extends MapEvent<MapMouseEventType, MouseEvent> {
2179
2179
  */
2180
2180
  lngLat: [number, number];
2181
2181
  /**
2182
- * Features found at the mouse coordinate. Features are ordered by map layer with features higher in the layer stack appearing first in the `features` array.
2183
- * Features from non-interactive layers are excluded.
2182
+ * Features found at the mouse coordinate, in top-down draw order: the first feature is the one drawn on top.
2183
+ * Features in higher layers come first and, within a layer that uses a sort key (such as `circle-sort-key`),
2184
+ * features with a higher sort key come first. Features from non-interactive layers are excluded.
2184
2185
  */
2185
2186
  features: MapFeature[];
2186
2187
  static fromMaplibreMouseEvent(type: MapMouseEventType, maplibreMouseEvent: MapMouseEvent$1, map: FlowCoreMap, features: MapFeature[]): MapMouseEvent;
@@ -2922,8 +2923,8 @@ declare class FlowCoreMap<TState extends StateStore = StateStore> extends EventE
2922
2923
  /**
2923
2924
  * Register a map icon image.
2924
2925
  *
2925
- * The image can be used on [symbol-type map layers](/flow-rdf-core/layer-reference/symbol) by specifying the image ID
2926
- * as the [`iconImage`](/flow-rdf-core/layer-reference/symbol#icon-image) property.
2926
+ * The image can be used on [symbol-type map layers](/flow-rdf/flow-rdf-core/layer-reference/symbol) by specifying
2927
+ * the image ID as the [`iconImage`](/flow-rdf/flow-rdf-core/layer-reference/symbol#icon-image) property.
2927
2928
  *
2928
2929
  * :::warning
2929
2930
  * To fully support recoloring and halo effects, the source image should be a SDF (signed distance field) image.
@@ -3030,10 +3031,11 @@ declare class FlowCoreMap<TState extends StateStore = StateStore> extends EventE
3030
3031
  /**
3031
3032
  * Returns the map's current visible bounds in degrees as an array of `[west, south, east, north]`.
3032
3033
  *
3033
- * The visible bounds may differ from the map's full bounds if fixed positioning is used. With fixed positioning,
3034
- * the map's canvas extends outside its container underneath other elements like side-bars. This allows side-bars
3035
- * to be opened and closed without re-rendering the map. The visible bounds represent the region of the map that
3036
- * is currently visible within the map's container.
3034
+ * The visible bounds are the bounds of the part of the map's canvas that lies within the parent element of the
3035
+ * map's container (the `flow-ui-map` element). They differ from the map's full bounds when the `fixed` mode of
3036
+ * `flow-ui-map` is used. In that mode, the canvas fills the viewport and is clipped to the `flow-ui-map` element,
3037
+ * so that side bars can be opened and closed without re-rendering the map. Otherwise the canvas fills the element,
3038
+ * and the visible bounds are the full bounds.
3037
3039
  *
3038
3040
  * See also {@link getBounds}.
3039
3041
  */
@@ -3105,6 +3107,11 @@ declare class FlowCoreMap<TState extends StateStore = StateStore> extends EventE
3105
3107
  private get formattedName();
3106
3108
  private bindMapEvents;
3107
3109
  private featureFromMaplibreFeature;
3110
+ /**
3111
+ * Queries the rendered features of interactive layers at the mouse position, in top-down draw order so the first
3112
+ * is the one drawn on top.
3113
+ */
3114
+ private queryFeatures;
3108
3115
  private featureQueryBox;
3109
3116
  private handleLoading;
3110
3117
  private handleMissingImage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emuanalytics/flow-rdf-core",
3
- "version": "4.1.5",
3
+ "version": "4.1.7",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -27,49 +27,39 @@
27
27
  "styles"
28
28
  ],
29
29
  "devDependencies": {
30
- "@storybook/addon-essentials": "^7.1.1",
31
- "@storybook/addon-links": "^7.1.1",
32
- "@storybook/blocks": "^7.1.1",
33
- "@storybook/web-components": "^7.1.1",
34
- "@storybook/web-components-vite": "^7.1.1",
30
+ "@storybook/addon-a11y": "^10.6.7",
31
+ "@storybook/addon-docs": "^10.6.7",
32
+ "@storybook/addon-links": "^10.6.7",
33
+ "@storybook/addon-vitest": "^10.6.7",
34
+ "@storybook/web-components-vite": "^10.6.7",
35
35
  "@types/colorbrewer": "^1.0.29",
36
36
  "@types/debug": "^4.1.12",
37
37
  "@types/fs-extra": "^11.0.1",
38
38
  "@types/geojson": "^7946.0.10",
39
- "@types/gl": "^6.0.2",
40
39
  "@types/parsimmon": "^1.10.6",
41
- "@vitest/coverage-v8": "^2.1.1",
42
- "@vitest/web-worker": "^0.33.0",
43
- "changelogen": "^0.5.3",
44
- "cross-fetch": "^4.0.0",
40
+ "@vitest/browser-playwright": "^5.1.0",
41
+ "@vitest/coverage-v8": "^5.1.0",
45
42
  "cssnano": "^6.0.1",
46
- "eslint": "^8.42.0",
47
- "eslint-config-unjs": "^0.2.0",
48
- "eslint-plugin-storybook": "^0.6.13",
49
43
  "fs-extra": "^11.1.1",
50
44
  "jest-matcher-deep-close-to": "^3.0.2",
51
- "jest-webgl-canvas-mock": "^2.5.0",
52
- "jsdom": "^22.1.0",
53
- "jsdom-worker": "^0.3.0",
45
+ "jsdom": "^31.0.0",
54
46
  "lit": "^2.7.6",
55
- "msw": "^2.4.9",
47
+ "msw": "^3.0.4",
48
+ "msw-storybook-addon": "^3.0.3",
49
+ "playwright": "^1.65.0",
56
50
  "postcss-cli": "^10.1.0",
57
51
  "postcss-import": "^15.1.0",
58
- "prettier": "^2.8.8",
59
- "react": "^18.2.0",
60
- "react-dom": "^18.2.0",
61
- "storybook": "^7.1.1",
52
+ "prettier": "^3.9.10",
53
+ "storybook": "^10.6.7",
62
54
  "tsx": "^4.19.1",
63
- "typedoc": "^0.26.8",
64
- "typedoc-plugin-markdown": "^4.2.9",
65
- "typedoc-vitepress-theme": "^1.0.2",
66
- "typescript": "^5.6.3",
55
+ "typedoc": "^0.28.20",
56
+ "typedoc-plugin-markdown": "^4.14.1",
57
+ "typedoc-vitepress-theme": "^1.1.4",
58
+ "typescript": "~6.0.3",
67
59
  "unbuild": "^2.0.0",
68
- "vitest": "^2.1.1",
69
- "vitest-canvas-mock": "^0.3.3",
70
- "whatwg-fetch": "^3.6.17"
60
+ "vite": "^8.3.7",
61
+ "vitest": "^5.1.0"
71
62
  },
72
- "packageManager": "pnpm@7.33.0",
73
63
  "dependencies": {
74
64
  "@emuanalytics/flow-engine-client": "^2.3.0",
75
65
  "@emuanalytics/mapbox-gl-draw": "^1.3.2",
@@ -103,11 +93,9 @@
103
93
  "build": "pnpm run build:css && unbuild && pnpm run build:fix",
104
94
  "build:fix": "tsx scripts/fix-up-build-output.mts",
105
95
  "build:css": "postcss src/css/flow-rdf-core.css -o styles/flow-rdf-core.css --config postcss.custom-config.js",
106
- "build:docs": "typedoc",
107
- "dev": "vitest dev",
108
- "lint": "eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test",
109
- "lint:fix": "eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w",
110
- "release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
96
+ "dev": "vitest watch",
97
+ "lint": "eslint --cache . && prettier -c --ignore-path ../../.gitignore --ignore-path ../../.prettierignore src test",
98
+ "lint:fix": "eslint --cache . --fix && prettier -w --ignore-path ../../.gitignore --ignore-path ../../.prettierignore src test",
111
99
  "test": "vitest run --coverage",
112
100
  "storybook": "storybook dev -p 6006",
113
101
  "build-storybook": "storybook build",