@emuanalytics/flow-rdf-core 0.0.22 → 0.0.24

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.cjs CHANGED
@@ -5,8 +5,8 @@ const Debug = require('debug');
5
5
  const flowEngineClient = require('@emuanalytics/flow-engine-client');
6
6
  const stringUtils = require('./shared/flow-rdf-core.3042be4a.cjs');
7
7
  const mapFeatureStream = require('./shared/flow-rdf-core.585aa641.cjs');
8
- const EventEmitter = require('eventemitter3');
9
8
  const maplibre = require('@emuanalytics/maplibre-gl');
9
+ const EventEmitter = require('eventemitter3');
10
10
  const mobxUtils = require('mobx-utils');
11
11
  const functional = require('./shared/flow-rdf-core.c44cf082.cjs');
12
12
  require('@emuanalytics/maplibre-gl-style-spec');
@@ -30,10 +30,10 @@ function _interopNamespaceCompat(e) {
30
30
 
31
31
  const mobx__namespace = /*#__PURE__*/_interopNamespaceCompat(mobx);
32
32
  const Debug__default = /*#__PURE__*/_interopDefaultCompat(Debug);
33
- const EventEmitter__default = /*#__PURE__*/_interopDefaultCompat(EventEmitter);
34
33
  const maplibre__default = /*#__PURE__*/_interopDefaultCompat(maplibre);
34
+ const EventEmitter__default = /*#__PURE__*/_interopDefaultCompat(EventEmitter);
35
35
 
36
- const version = "0.0.22";
36
+ const version = "0.0.24";
37
37
 
38
38
  const CONSOLE_HIGHLIGHT_STYLE$1 = `
39
39
  padding: 2px 4px;
@@ -608,7 +608,7 @@ class MapLayerStyleBuilder {
608
608
  this._styles.set(property, this.formatValue(value));
609
609
  }
610
610
  formatValue(value) {
611
- if (value instanceof StyleExpression) {
611
+ if (isStyleExpression(value)) {
612
612
  return value.toString();
613
613
  } else if (stringUtils.isString(value)) {
614
614
  return `'${value.toString()}'`;
@@ -627,11 +627,15 @@ __publicField$7(MapLayerStyleBuilder, "_styleBuilders", /* @__PURE__ */ new Map(
627
627
  class StyleExpression {
628
628
  constructor(_expr) {
629
629
  this._expr = _expr;
630
+ __publicField$7(this, "__styleExpression", "styleexpression");
630
631
  }
631
632
  toString() {
632
633
  return this._expr;
633
634
  }
634
635
  }
636
+ function isStyleExpression(val) {
637
+ return val && val.__styleExpression;
638
+ }
635
639
  function expr(expr2) {
636
640
  return new StyleExpression(expr2);
637
641
  }
@@ -2264,12 +2268,12 @@ const _FlowMap = class _FlowMap extends EventEmitter__default {
2264
2268
  return this._style.styleSpecification;
2265
2269
  }
2266
2270
  addLayer(layerOrOptions) {
2267
- const layer = layerOrOptions instanceof mapFeatureStream.MapLayer ? layerOrOptions : new mapFeatureStream.MapLayer(layerOrOptions);
2271
+ const layer = stringUtils.isPlainObject(layerOrOptions) ? new mapFeatureStream.MapLayer(layerOrOptions) : layerOrOptions;
2268
2272
  this._style.addLayer(layer);
2269
2273
  return layer;
2270
2274
  }
2271
2275
  addSource(sourceOrOptions) {
2272
- const source = sourceOrOptions instanceof mapFeatureStream.MapDataSource ? sourceOrOptions : new mapFeatureStream.MapDataSource(sourceOrOptions);
2276
+ const source = stringUtils.isPlainObject(sourceOrOptions) ? new mapFeatureStream.MapDataSource(sourceOrOptions) : sourceOrOptions;
2273
2277
  this.emitEvent(new mapFeatureStream.MapSourceEvent("beforeSourceAdded", this, source.id));
2274
2278
  source.setFlowEndpoint({
2275
2279
  host: this.context.flowClient.baseUrl,
@@ -3170,6 +3174,8 @@ const initializeContext = globalContextRegistry.initializeContext.bind(globalCon
3170
3174
  const uninitializeContext = globalContextRegistry.uninitializeContext.bind(globalContextRegistry);
3171
3175
  const getContext = globalContextRegistry.getContext.bind(globalContextRegistry);
3172
3176
 
3177
+ exports.makeAutoObservable = mobx.makeAutoObservable;
3178
+ exports.makeObservable = mobx.makeObservable;
3173
3179
  exports.MapDataSource = mapFeatureStream.MapDataSource;
3174
3180
  exports.MapLayer = mapFeatureStream.MapLayer;
3175
3181
  exports.ReactiveExpression = mapFeatureStream.ReactiveExpression;
package/dist/index.d.cts CHANGED
@@ -1,9 +1,10 @@
1
- import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.90aa4382.cjs';
2
- export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, P as Path, G as PathValue, Q as Query, R as ReactiveExpression, I as StoreAnnotations, H as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, E as traceReaction } from './shared/flow-rdf-core.90aa4382.cjs';
1
+ import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.0bb1e167.cjs';
2
+ export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, U as Path, V as PathValue, Q as Query, G as QueryAttribute, L as QueryDefinition, O as QueryDefinitionFn, I as QueryExtraParams, N as QueryOptions, J as QueryOrderClause, E as QueryResultFormat, P as QueryResultTransformFn, K as QuerySampleOptions, H as QueryWhereClauses, R as ReactiveExpression, X as StoreAnnotations, W as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, T as traceReaction } from './shared/flow-rdf-core.0bb1e167.cjs';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
+ export { makeAutoObservable, makeObservable } from 'mobx';
4
5
  import '@emuanalytics/flow-engine-client';
5
- import 'eventemitter3';
6
6
  import '@emuanalytics/maplibre-gl';
7
+ import 'eventemitter3';
7
8
 
8
9
  interface SyncAnnotation<T = any> extends Annotation {
9
10
  serialize(val: T): string;
package/dist/index.d.mts CHANGED
@@ -1,9 +1,10 @@
1
- import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.90aa4382.mjs';
2
- export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, P as Path, G as PathValue, Q as Query, R as ReactiveExpression, I as StoreAnnotations, H as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, E as traceReaction } from './shared/flow-rdf-core.90aa4382.mjs';
1
+ import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.0bb1e167.mjs';
2
+ export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, U as Path, V as PathValue, Q as Query, G as QueryAttribute, L as QueryDefinition, O as QueryDefinitionFn, I as QueryExtraParams, N as QueryOptions, J as QueryOrderClause, E as QueryResultFormat, P as QueryResultTransformFn, K as QuerySampleOptions, H as QueryWhereClauses, R as ReactiveExpression, X as StoreAnnotations, W as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, T as traceReaction } from './shared/flow-rdf-core.0bb1e167.mjs';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
+ export { makeAutoObservable, makeObservable } from 'mobx';
4
5
  import '@emuanalytics/flow-engine-client';
5
- import 'eventemitter3';
6
6
  import '@emuanalytics/maplibre-gl';
7
+ import 'eventemitter3';
7
8
 
8
9
  interface SyncAnnotation<T = any> extends Annotation {
9
10
  serialize(val: T): string;
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.90aa4382.js';
2
- export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, P as Path, G as PathValue, Q as Query, R as ReactiveExpression, I as StoreAnnotations, H as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, E as traceReaction } from './shared/flow-rdf-core.90aa4382.js';
1
+ import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.0bb1e167.js';
2
+ export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, U as Path, V as PathValue, Q as Query, G as QueryAttribute, L as QueryDefinition, O as QueryDefinitionFn, I as QueryExtraParams, N as QueryOptions, J as QueryOrderClause, E as QueryResultFormat, P as QueryResultTransformFn, K as QuerySampleOptions, H as QueryWhereClauses, R as ReactiveExpression, X as StoreAnnotations, W as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, T as traceReaction } from './shared/flow-rdf-core.0bb1e167.js';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
+ export { makeAutoObservable, makeObservable } from 'mobx';
4
5
  import '@emuanalytics/flow-engine-client';
5
- import 'eventemitter3';
6
6
  import '@emuanalytics/maplibre-gl';
7
+ import 'eventemitter3';
7
8
 
8
9
  interface SyncAnnotation<T = any> extends Annotation {
9
10
  serialize(val: T): string;
package/dist/index.mjs CHANGED
@@ -1,11 +1,12 @@
1
1
  import * as mobx from 'mobx';
2
2
  import { isObservable, isComputed, isObservableArray, isObservableSet, isObservableMap, makeObservable, observable as observable$1, computed as computed$1, action, runInAction, onBecomeObserved, onBecomeUnobserved, reaction, trace, configure } from 'mobx';
3
+ export { makeAutoObservable, makeObservable } from 'mobx';
3
4
  import Debug from 'debug';
4
5
  import { Client } from '@emuanalytics/flow-engine-client';
5
- import { i as isUndefined, f as isString, o as isNumber, s as isBoolean, j as isArray, b as isNil, d as isDefined, g as isStringFull, z as isURL, e as ensureArray } from './shared/flow-rdf-core.b80085b4.mjs';
6
- import { R as ReactiveExpression, F as FlowError, g as MapStyleChangeEvent, r as randomId, P as PluginManager, f as MapLayer, e as MapDataSource, h as MapSourceEvent, M as MapEvent, d as FlowMapError, c as MapFeatureStream, b as assert, i as MapLoadingEvent, a as MapMouseEvent, j as die } from './shared/flow-rdf-core.33c3a1eb.mjs';
7
- import EventEmitter from 'eventemitter3';
6
+ import { i as isUndefined, f as isString, o as isNumber, s as isBoolean, j as isArray, b as isNil, y as isPlainObject, d as isDefined, g as isStringFull, z as isURL, e as ensureArray } from './shared/flow-rdf-core.b80085b4.mjs';
7
+ import { R as ReactiveExpression, F as FlowError, f as MapStyleChangeEvent, r as randomId, P as PluginManager, e as MapLayer, d as MapDataSource, g as MapSourceEvent, M as MapEvent, c as FlowMapError, b as MapFeatureStream, a as assert, h as MapLoadingEvent, i as MapMouseEvent, j as die } from './shared/flow-rdf-core.9f1d67b5.mjs';
8
8
  import maplibre from '@emuanalytics/maplibre-gl';
9
+ import EventEmitter from 'eventemitter3';
9
10
  import { toStream } from 'mobx-utils';
10
11
  import { t as throttle, a as debounceWithArgs } from './shared/flow-rdf-core.2e456f93.mjs';
11
12
  import '@emuanalytics/maplibre-gl-style-spec';
@@ -13,7 +14,7 @@ import 'parsimmon';
13
14
  import 'colorbrewer';
14
15
  import 'nanoid';
15
16
 
16
- const version = "0.0.22";
17
+ const version = "0.0.24";
17
18
 
18
19
  const CONSOLE_HIGHLIGHT_STYLE$1 = `
19
20
  padding: 2px 4px;
@@ -588,7 +589,7 @@ class MapLayerStyleBuilder {
588
589
  this._styles.set(property, this.formatValue(value));
589
590
  }
590
591
  formatValue(value) {
591
- if (value instanceof StyleExpression) {
592
+ if (isStyleExpression(value)) {
592
593
  return value.toString();
593
594
  } else if (isString(value)) {
594
595
  return `'${value.toString()}'`;
@@ -607,11 +608,15 @@ __publicField$7(MapLayerStyleBuilder, "_styleBuilders", /* @__PURE__ */ new Map(
607
608
  class StyleExpression {
608
609
  constructor(_expr) {
609
610
  this._expr = _expr;
611
+ __publicField$7(this, "__styleExpression", "styleexpression");
610
612
  }
611
613
  toString() {
612
614
  return this._expr;
613
615
  }
614
616
  }
617
+ function isStyleExpression(val) {
618
+ return val && val.__styleExpression;
619
+ }
615
620
  function expr(expr2) {
616
621
  return new StyleExpression(expr2);
617
622
  }
@@ -2244,12 +2249,12 @@ const _FlowMap = class _FlowMap extends EventEmitter {
2244
2249
  return this._style.styleSpecification;
2245
2250
  }
2246
2251
  addLayer(layerOrOptions) {
2247
- const layer = layerOrOptions instanceof MapLayer ? layerOrOptions : new MapLayer(layerOrOptions);
2252
+ const layer = isPlainObject(layerOrOptions) ? new MapLayer(layerOrOptions) : layerOrOptions;
2248
2253
  this._style.addLayer(layer);
2249
2254
  return layer;
2250
2255
  }
2251
2256
  addSource(sourceOrOptions) {
2252
- const source = sourceOrOptions instanceof MapDataSource ? sourceOrOptions : new MapDataSource(sourceOrOptions);
2257
+ const source = isPlainObject(sourceOrOptions) ? new MapDataSource(sourceOrOptions) : sourceOrOptions;
2253
2258
  this.emitEvent(new MapSourceEvent("beforeSourceAdded", this, source.id));
2254
2259
  source.setFlowEndpoint({
2255
2260
  host: this.context.flowClient.baseUrl,
@@ -162,7 +162,7 @@ class MapPopup extends EventEmitter__default {
162
162
  if (this._maplibrePopup) {
163
163
  return;
164
164
  }
165
- if (eventOrLngLat instanceof mapFeatureStream.MapMouseEvent) {
165
+ if (!stringUtils.isArray(eventOrLngLat)) {
166
166
  if (isFeatureWithId(eventOrLngLat.features[0])) {
167
167
  feature = eventOrLngLat.features[0];
168
168
  }
@@ -277,10 +277,10 @@ class PopupPlugin extends MapPluginBase {
277
277
  popup.once("closed", () => {
278
278
  this._popups.delete(popup);
279
279
  });
280
- if (eventOrLngLat instanceof mapFeatureStream.MapMouseEvent) {
281
- popup.open(eventOrLngLat);
282
- } else {
280
+ if (stringUtils.isArray(eventOrLngLat)) {
283
281
  popup.open(eventOrLngLat, feature);
282
+ } else {
283
+ popup.open(eventOrLngLat);
284
284
  }
285
285
  return popup;
286
286
  }
@@ -1,5 +1,5 @@
1
- import { J as MapEvent, y as FlowMap, w as MapSourceIdentifier, K as MapFeatureId, L as MapPluginBase, N as PluginManager, O as MapSourceEvent, T as MapMouseEvent, U as MapFeatureStream, V as PartialBy, r as MapAnimationOptions, W as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.90aa4382.cjs';
2
- export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.90aa4382.cjs';
1
+ import { Y as MapEvent, y as FlowMap, w as MapSourceIdentifier, Z as MapFeatureId, _ as MapPluginBase, $ as PluginManager, a0 as MapSourceEvent, a1 as MapMouseEvent, a2 as MapFeatureStream, a3 as PartialBy, r as MapAnimationOptions, a4 as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.0bb1e167.cjs';
2
+ export { a8 as EventHandlers, a7 as PluginConstructor, a6 as PluginEventsType, a5 as PluginOptionsType } from '../../../shared/flow-rdf-core.0bb1e167.cjs';
3
3
  import { F as Func } from '../../../shared/flow-rdf-core.08975378.cjs';
4
4
  import EventEmitter from 'eventemitter3';
5
5
  import * as lit from 'lit-html';
@@ -1,5 +1,5 @@
1
- import { J as MapEvent, y as FlowMap, w as MapSourceIdentifier, K as MapFeatureId, L as MapPluginBase, N as PluginManager, O as MapSourceEvent, T as MapMouseEvent, U as MapFeatureStream, V as PartialBy, r as MapAnimationOptions, W as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.90aa4382.mjs';
2
- export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.90aa4382.mjs';
1
+ import { Y as MapEvent, y as FlowMap, w as MapSourceIdentifier, Z as MapFeatureId, _ as MapPluginBase, $ as PluginManager, a0 as MapSourceEvent, a1 as MapMouseEvent, a2 as MapFeatureStream, a3 as PartialBy, r as MapAnimationOptions, a4 as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.0bb1e167.mjs';
2
+ export { a8 as EventHandlers, a7 as PluginConstructor, a6 as PluginEventsType, a5 as PluginOptionsType } from '../../../shared/flow-rdf-core.0bb1e167.mjs';
3
3
  import { F as Func } from '../../../shared/flow-rdf-core.08975378.mjs';
4
4
  import EventEmitter from 'eventemitter3';
5
5
  import * as lit from 'lit-html';
@@ -1,5 +1,5 @@
1
- import { J as MapEvent, y as FlowMap, w as MapSourceIdentifier, K as MapFeatureId, L as MapPluginBase, N as PluginManager, O as MapSourceEvent, T as MapMouseEvent, U as MapFeatureStream, V as PartialBy, r as MapAnimationOptions, W as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.90aa4382.js';
2
- export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.90aa4382.js';
1
+ import { Y as MapEvent, y as FlowMap, w as MapSourceIdentifier, Z as MapFeatureId, _ as MapPluginBase, $ as PluginManager, a0 as MapSourceEvent, a1 as MapMouseEvent, a2 as MapFeatureStream, a3 as PartialBy, r as MapAnimationOptions, a4 as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.0bb1e167.js';
2
+ export { a8 as EventHandlers, a7 as PluginConstructor, a6 as PluginEventsType, a5 as PluginOptionsType } from '../../../shared/flow-rdf-core.0bb1e167.js';
3
3
  import { F as Func } from '../../../shared/flow-rdf-core.08975378.js';
4
4
  import EventEmitter from 'eventemitter3';
5
5
  import * as lit from 'lit-html';
@@ -1,5 +1,5 @@
1
- import { M as MapEvent, a as MapMouseEvent, b as assert, c as MapFeatureStream, F as FlowError, d as FlowMapError, e as MapDataSource, f as MapLayer, r as randomId, R as ReactiveExpression } from '../../../shared/flow-rdf-core.33c3a1eb.mjs';
2
- export { P as PluginManager } from '../../../shared/flow-rdf-core.33c3a1eb.mjs';
1
+ import { M as MapEvent, a as assert, b as MapFeatureStream, F as FlowError, c as FlowMapError, d as MapDataSource, e as MapLayer, r as randomId, R as ReactiveExpression } from '../../../shared/flow-rdf-core.9f1d67b5.mjs';
2
+ export { P as PluginManager } from '../../../shared/flow-rdf-core.9f1d67b5.mjs';
3
3
  import MapboxDraw from '@emuanalytics/mapbox-gl-draw';
4
4
  import turfArea from '@turf/area';
5
5
  import turfBBox from '@turf/bbox';
@@ -9,7 +9,7 @@ import turfLength from '@turf/length';
9
9
  import Debug from 'debug';
10
10
  import { c as isPolygon, i as isLineString, b as isPoint } from '../../../shared/flow-rdf-core.bd95d618.mjs';
11
11
  import EventEmitter$1, { EventEmitter } from 'eventemitter3';
12
- import { d as isDefined, g as isStringFull, x as isFunction, f as isString, e as ensureArray, o as isNumber, z as isURL, k as isArrayFull, b as isNil, a as isNull, m as isObject } from '../../../shared/flow-rdf-core.b80085b4.mjs';
12
+ import { d as isDefined, j as isArray, g as isStringFull, x as isFunction, f as isString, e as ensureArray, o as isNumber, z as isURL, k as isArrayFull, b as isNil, a as isNull, m as isObject } from '../../../shared/flow-rdf-core.b80085b4.mjs';
13
13
  import * as lit from 'lit-html';
14
14
  import maplibre from '@emuanalytics/maplibre-gl';
15
15
  import turfCircle from '@turf/circle';
@@ -134,7 +134,7 @@ class MapPopup extends EventEmitter$1 {
134
134
  if (this._maplibrePopup) {
135
135
  return;
136
136
  }
137
- if (eventOrLngLat instanceof MapMouseEvent) {
137
+ if (!isArray(eventOrLngLat)) {
138
138
  if (isFeatureWithId(eventOrLngLat.features[0])) {
139
139
  feature = eventOrLngLat.features[0];
140
140
  }
@@ -249,10 +249,10 @@ class PopupPlugin extends MapPluginBase {
249
249
  popup.once("closed", () => {
250
250
  this._popups.delete(popup);
251
251
  });
252
- if (eventOrLngLat instanceof MapMouseEvent) {
253
- popup.open(eventOrLngLat);
254
- } else {
252
+ if (isArray(eventOrLngLat)) {
255
253
  popup.open(eventOrLngLat, feature);
254
+ } else {
255
+ popup.open(eventOrLngLat);
256
256
  }
257
257
  return popup;
258
258
  }
@@ -1,7 +1,7 @@
1
1
  import { Client } from '@emuanalytics/flow-engine-client';
2
2
  import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
3
- import EventEmitter$1, { EventEmitter } from 'eventemitter3';
4
3
  import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
4
+ import EventEmitter$1, { EventEmitter } from 'eventemitter3';
5
5
 
6
6
  type Annotation = {
7
7
  annotationType: string;
@@ -176,6 +176,7 @@ declare class MapLayerStyleBuilder {
176
176
  }
177
177
  declare class StyleExpression {
178
178
  private _expr;
179
+ __styleExpression: string;
179
180
  constructor(_expr: string);
180
181
  toString(): string;
181
182
  }
@@ -1830,4 +1831,4 @@ declare class FlowContext<TState extends StateStore = StateStore> {
1830
1831
  evaluateExpression(expr: string): any;
1831
1832
  }
1832
1833
 
1833
- export { Annotation as A, queryMany as B, queryOne as C, DEFAULT_CONTEXT_ID as D, traceReaction as E, FlowContextOptions as F, PathValue as G, StoreConstructor as H, StoreAnnotations as I, MapEvent as J, MapFeatureId as K, MapPluginBase as L, MapStyleSpecification as M, PluginManager as N, MapSourceEvent as O, Path as P, Query as Q, ReactiveExpression as R, StateStore as S, MapMouseEvent as T, MapFeatureStream as U, PartialBy as V, MapStyleChangeEvent as W, PluginOptionsType as X, PluginEventsType as Y, PluginConstructor as Z, EventHandlers as _, FlowContext as a, MapDataSource as b, MapLayer as c, FlowEngineEndpoint as d, MapLayerType as e, MapLayerStyleBuilder as f, StyleExpression as g, expr as h, MapLayerOptions as i, MapLayerExpression as j, MapLayerSpecification as k, layerStyle as l, MapLayerPropertyMetadataIndex as m, MapDataSourceType as n, MapDataSourceOptions as o, MapDataSourceSpecification as p, MapGeojsonData as q, MapAnimationOptions as r, MapCenterOptions as s, MapFeature as t, MapFeatureIdentifier as u, MapPaddingOptions as v, MapSourceIdentifier as w, MapOptions as x, FlowMap as y, query as z };
1834
+ export { PluginManager as $, Annotation as A, queryMany as B, queryOne as C, DEFAULT_CONTEXT_ID as D, QueryResultFormat as E, FlowContextOptions as F, QueryAttribute as G, QueryWhereClauses as H, QueryExtraParams as I, QueryOrderClause as J, QuerySampleOptions as K, QueryDefinition as L, MapStyleSpecification as M, QueryOptions as N, QueryDefinitionFn as O, QueryResultTransformFn as P, Query as Q, ReactiveExpression as R, StateStore as S, traceReaction as T, Path as U, PathValue as V, StoreConstructor as W, StoreAnnotations as X, MapEvent as Y, MapFeatureId as Z, MapPluginBase as _, FlowContext as a, MapSourceEvent as a0, MapMouseEvent as a1, MapFeatureStream as a2, PartialBy as a3, MapStyleChangeEvent as a4, PluginOptionsType as a5, PluginEventsType as a6, PluginConstructor as a7, EventHandlers as a8, MapDataSource as b, MapLayer as c, FlowEngineEndpoint as d, MapLayerType as e, MapLayerStyleBuilder as f, StyleExpression as g, expr as h, MapLayerOptions as i, MapLayerExpression as j, MapLayerSpecification as k, layerStyle as l, MapLayerPropertyMetadataIndex as m, MapDataSourceType as n, MapDataSourceOptions as o, MapDataSourceSpecification as p, MapGeojsonData as q, MapAnimationOptions as r, MapCenterOptions as s, MapFeature as t, MapFeatureIdentifier as u, MapPaddingOptions as v, MapSourceIdentifier as w, MapOptions as x, FlowMap as y, query as z };
@@ -1,7 +1,7 @@
1
1
  import { Client } from '@emuanalytics/flow-engine-client';
2
2
  import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
3
- import EventEmitter$1, { EventEmitter } from 'eventemitter3';
4
3
  import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
4
+ import EventEmitter$1, { EventEmitter } from 'eventemitter3';
5
5
 
6
6
  type Annotation = {
7
7
  annotationType: string;
@@ -176,6 +176,7 @@ declare class MapLayerStyleBuilder {
176
176
  }
177
177
  declare class StyleExpression {
178
178
  private _expr;
179
+ __styleExpression: string;
179
180
  constructor(_expr: string);
180
181
  toString(): string;
181
182
  }
@@ -1830,4 +1831,4 @@ declare class FlowContext<TState extends StateStore = StateStore> {
1830
1831
  evaluateExpression(expr: string): any;
1831
1832
  }
1832
1833
 
1833
- export { Annotation as A, queryMany as B, queryOne as C, DEFAULT_CONTEXT_ID as D, traceReaction as E, FlowContextOptions as F, PathValue as G, StoreConstructor as H, StoreAnnotations as I, MapEvent as J, MapFeatureId as K, MapPluginBase as L, MapStyleSpecification as M, PluginManager as N, MapSourceEvent as O, Path as P, Query as Q, ReactiveExpression as R, StateStore as S, MapMouseEvent as T, MapFeatureStream as U, PartialBy as V, MapStyleChangeEvent as W, PluginOptionsType as X, PluginEventsType as Y, PluginConstructor as Z, EventHandlers as _, FlowContext as a, MapDataSource as b, MapLayer as c, FlowEngineEndpoint as d, MapLayerType as e, MapLayerStyleBuilder as f, StyleExpression as g, expr as h, MapLayerOptions as i, MapLayerExpression as j, MapLayerSpecification as k, layerStyle as l, MapLayerPropertyMetadataIndex as m, MapDataSourceType as n, MapDataSourceOptions as o, MapDataSourceSpecification as p, MapGeojsonData as q, MapAnimationOptions as r, MapCenterOptions as s, MapFeature as t, MapFeatureIdentifier as u, MapPaddingOptions as v, MapSourceIdentifier as w, MapOptions as x, FlowMap as y, query as z };
1834
+ export { PluginManager as $, Annotation as A, queryMany as B, queryOne as C, DEFAULT_CONTEXT_ID as D, QueryResultFormat as E, FlowContextOptions as F, QueryAttribute as G, QueryWhereClauses as H, QueryExtraParams as I, QueryOrderClause as J, QuerySampleOptions as K, QueryDefinition as L, MapStyleSpecification as M, QueryOptions as N, QueryDefinitionFn as O, QueryResultTransformFn as P, Query as Q, ReactiveExpression as R, StateStore as S, traceReaction as T, Path as U, PathValue as V, StoreConstructor as W, StoreAnnotations as X, MapEvent as Y, MapFeatureId as Z, MapPluginBase as _, FlowContext as a, MapSourceEvent as a0, MapMouseEvent as a1, MapFeatureStream as a2, PartialBy as a3, MapStyleChangeEvent as a4, PluginOptionsType as a5, PluginEventsType as a6, PluginConstructor as a7, EventHandlers as a8, MapDataSource as b, MapLayer as c, FlowEngineEndpoint as d, MapLayerType as e, MapLayerStyleBuilder as f, StyleExpression as g, expr as h, MapLayerOptions as i, MapLayerExpression as j, MapLayerSpecification as k, layerStyle as l, MapLayerPropertyMetadataIndex as m, MapDataSourceType as n, MapDataSourceOptions as o, MapDataSourceSpecification as p, MapGeojsonData as q, MapAnimationOptions as r, MapCenterOptions as s, MapFeature as t, MapFeatureIdentifier as u, MapPaddingOptions as v, MapSourceIdentifier as w, MapOptions as x, FlowMap as y, query as z };
@@ -1,7 +1,7 @@
1
1
  import { Client } from '@emuanalytics/flow-engine-client';
2
2
  import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
3
- import EventEmitter$1, { EventEmitter } from 'eventemitter3';
4
3
  import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
4
+ import EventEmitter$1, { EventEmitter } from 'eventemitter3';
5
5
 
6
6
  type Annotation = {
7
7
  annotationType: string;
@@ -176,6 +176,7 @@ declare class MapLayerStyleBuilder {
176
176
  }
177
177
  declare class StyleExpression {
178
178
  private _expr;
179
+ __styleExpression: string;
179
180
  constructor(_expr: string);
180
181
  toString(): string;
181
182
  }
@@ -1830,4 +1831,4 @@ declare class FlowContext<TState extends StateStore = StateStore> {
1830
1831
  evaluateExpression(expr: string): any;
1831
1832
  }
1832
1833
 
1833
- export { Annotation as A, queryMany as B, queryOne as C, DEFAULT_CONTEXT_ID as D, traceReaction as E, FlowContextOptions as F, PathValue as G, StoreConstructor as H, StoreAnnotations as I, MapEvent as J, MapFeatureId as K, MapPluginBase as L, MapStyleSpecification as M, PluginManager as N, MapSourceEvent as O, Path as P, Query as Q, ReactiveExpression as R, StateStore as S, MapMouseEvent as T, MapFeatureStream as U, PartialBy as V, MapStyleChangeEvent as W, PluginOptionsType as X, PluginEventsType as Y, PluginConstructor as Z, EventHandlers as _, FlowContext as a, MapDataSource as b, MapLayer as c, FlowEngineEndpoint as d, MapLayerType as e, MapLayerStyleBuilder as f, StyleExpression as g, expr as h, MapLayerOptions as i, MapLayerExpression as j, MapLayerSpecification as k, layerStyle as l, MapLayerPropertyMetadataIndex as m, MapDataSourceType as n, MapDataSourceOptions as o, MapDataSourceSpecification as p, MapGeojsonData as q, MapAnimationOptions as r, MapCenterOptions as s, MapFeature as t, MapFeatureIdentifier as u, MapPaddingOptions as v, MapSourceIdentifier as w, MapOptions as x, FlowMap as y, query as z };
1834
+ export { PluginManager as $, Annotation as A, queryMany as B, queryOne as C, DEFAULT_CONTEXT_ID as D, QueryResultFormat as E, FlowContextOptions as F, QueryAttribute as G, QueryWhereClauses as H, QueryExtraParams as I, QueryOrderClause as J, QuerySampleOptions as K, QueryDefinition as L, MapStyleSpecification as M, QueryOptions as N, QueryDefinitionFn as O, QueryResultTransformFn as P, Query as Q, ReactiveExpression as R, StateStore as S, traceReaction as T, Path as U, PathValue as V, StoreConstructor as W, StoreAnnotations as X, MapEvent as Y, MapFeatureId as Z, MapPluginBase as _, FlowContext as a, MapSourceEvent as a0, MapMouseEvent as a1, MapFeatureStream as a2, PartialBy as a3, MapStyleChangeEvent as a4, PluginOptionsType as a5, PluginEventsType as a6, PluginConstructor as a7, EventHandlers as a8, MapDataSource as b, MapLayer as c, FlowEngineEndpoint as d, MapLayerType as e, MapLayerStyleBuilder as f, StyleExpression as g, expr as h, MapLayerOptions as i, MapLayerExpression as j, MapLayerSpecification as k, layerStyle as l, MapLayerPropertyMetadataIndex as m, MapDataSourceType as n, MapDataSourceOptions as o, MapDataSourceSpecification as p, MapGeojsonData as q, MapAnimationOptions as r, MapCenterOptions as s, MapFeature as t, MapFeatureIdentifier as u, MapPaddingOptions as v, MapSourceIdentifier as w, MapOptions as x, FlowMap as y, query as z };
@@ -1352,4 +1352,4 @@ class MapFeatureStream {
1352
1352
  }
1353
1353
  }
1354
1354
 
1355
- export { FlowError as F, MapEvent as M, PluginManager as P, ReactiveExpression as R, MapMouseEvent as a, assert as b, MapFeatureStream as c, FlowMapError as d, MapDataSource as e, MapLayer as f, MapStyleChangeEvent as g, MapSourceEvent as h, MapLoadingEvent as i, die as j, randomId as r };
1355
+ export { FlowError as F, MapEvent as M, PluginManager as P, ReactiveExpression as R, assert as a, MapFeatureStream as b, FlowMapError as c, MapDataSource as d, MapLayer as e, MapStyleChangeEvent as f, MapSourceEvent as g, MapLoadingEvent as h, MapMouseEvent as i, die as j, randomId as r };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emuanalytics/flow-rdf-core",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "type": "module",