@emuanalytics/flow-rdf-core 0.0.17 → 0.0.19

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
@@ -4,7 +4,7 @@ const mobx = require('mobx');
4
4
  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
- const mapFeatureStream = require('./shared/flow-rdf-core.278a260a.cjs');
7
+ const mapFeatureStream = require('./shared/flow-rdf-core.585aa641.cjs');
8
8
  const EventEmitter = require('eventemitter3');
9
9
  const maplibre = require('@emuanalytics/maplibre-gl');
10
10
  const mobxUtils = require('mobx-utils');
@@ -31,7 +31,7 @@ function _interopNamespaceCompat(e) {
31
31
  const mobx__namespace = /*#__PURE__*/_interopNamespaceCompat(mobx);
32
32
  const Debug__default = /*#__PURE__*/_interopDefaultCompat(Debug);
33
33
  const EventEmitter__default = /*#__PURE__*/_interopDefaultCompat(EventEmitter);
34
- const maplibre__namespace = /*#__PURE__*/_interopNamespaceCompat(maplibre);
34
+ const maplibre__default = /*#__PURE__*/_interopDefaultCompat(maplibre);
35
35
 
36
36
  function deferred() {
37
37
  let methods;
@@ -2319,7 +2319,7 @@ const _FlowMap = class _FlowMap extends EventEmitter__default {
2319
2319
  };
2320
2320
  }
2321
2321
  setCenter(center, animationOptions) {
2322
- const lngLat = stringUtils.isDefined(center.lng) && stringUtils.isDefined(center.lat) ? new maplibre__namespace.LngLat(center.lng, center.lat) : void 0;
2322
+ const lngLat = stringUtils.isDefined(center.lng) && stringUtils.isDefined(center.lat) ? new maplibre__default.LngLat(center.lng, center.lat) : void 0;
2323
2323
  let method = this.maplibreMap.jumpTo;
2324
2324
  if (animationOptions) {
2325
2325
  switch (animationOptions.mode) {
@@ -2496,7 +2496,7 @@ const _FlowMap = class _FlowMap extends EventEmitter__default {
2496
2496
  this._style.bindState(this._context.state);
2497
2497
  const baseStyle = await this.loadBaseStyle(this._options.baseStyle);
2498
2498
  this._style.setBaseStyle(baseStyle);
2499
- this.maplibreMap = new maplibre__namespace.Map({
2499
+ this.maplibreMap = new maplibre__default.Map({
2500
2500
  ...this._options,
2501
2501
  transformRequest: this.transformMapRequest.bind(this),
2502
2502
  style: baseStyle
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
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.4d307911.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.4d307911.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.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';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
4
  import '@emuanalytics/flow-engine-client';
5
5
  import 'eventemitter3';
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
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.4d307911.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.4d307911.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.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';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
4
  import '@emuanalytics/flow-engine-client';
5
5
  import 'eventemitter3';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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.4d307911.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.4d307911.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.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';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
4
  import '@emuanalytics/flow-engine-client';
5
5
  import 'eventemitter3';
package/dist/index.mjs CHANGED
@@ -3,9 +3,9 @@ import { isObservable, isComputed, isObservableArray, isObservableSet, isObserva
3
3
  import Debug from 'debug';
4
4
  import { Client } from '@emuanalytics/flow-engine-client';
5
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.b4b16e78.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
7
  import EventEmitter from 'eventemitter3';
8
- import * as maplibre from '@emuanalytics/maplibre-gl';
8
+ import maplibre from '@emuanalytics/maplibre-gl';
9
9
  import { toStream } from 'mobx-utils';
10
10
  import { t as throttle, a as debounceWithArgs } from './shared/flow-rdf-core.2e456f93.mjs';
11
11
  import '@emuanalytics/maplibre-gl-style-spec';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const mapFeatureStream = require('../../../shared/flow-rdf-core.278a260a.cjs');
3
+ const mapFeatureStream = require('../../../shared/flow-rdf-core.585aa641.cjs');
4
4
  const MapboxDraw = require('@emuanalytics/mapbox-gl-draw');
5
5
  const turfArea = require('@turf/area');
6
6
  const turfBBox = require('@turf/bbox');
@@ -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.4d307911.cjs';
2
- export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.4d307911.cjs';
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';
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.4d307911.mjs';
2
- export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.4d307911.mjs';
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';
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.4d307911.js';
2
- export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.4d307911.js';
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';
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.b4b16e78.mjs';
2
- export { P as PluginManager } from '../../../shared/flow-rdf-core.b4b16e78.mjs';
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';
3
3
  import MapboxDraw from '@emuanalytics/mapbox-gl-draw';
4
4
  import turfArea from '@turf/area';
5
5
  import turfBBox from '@turf/bbox';
@@ -11,7 +11,7 @@ import { c as isPolygon, i as isLineString, b as isPoint } from '../../../shared
11
11
  import EventEmitter$1, { EventEmitter } from 'eventemitter3';
12
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';
13
13
  import * as lit from 'lit-html';
14
- import maplibre__default from '@emuanalytics/maplibre-gl';
14
+ import maplibre from '@emuanalytics/maplibre-gl';
15
15
  import turfCircle from '@turf/circle';
16
16
  import turfDistance from '@turf/distance';
17
17
  import { point } from '@turf/helpers';
@@ -143,7 +143,7 @@ class MapPopup extends EventEmitter$1 {
143
143
  if (feature) {
144
144
  assert(isFeatureWithId(feature), "MapPopup.open(): feature must have unique ID");
145
145
  }
146
- this._maplibrePopup = new maplibre__default.Popup({
146
+ this._maplibrePopup = new maplibre.Popup({
147
147
  className: this.cssClasses().join(" "),
148
148
  closeButton: this.options.closeButton,
149
149
  closeOnClick: this.options.closeOnClick,
@@ -96,7 +96,10 @@ class ExpressionParser {
96
96
  { type: BINARY_LEFT, ops: this.operators({ "+": "+", "-": "-" }) },
97
97
  { type: BINARY_LEFT, ops: this.operators({ ">=": ">=", "<=": "<=" }) },
98
98
  { type: BINARY_LEFT, ops: this.operators({ "<": "<", ">": ">" }) },
99
- { type: BINARY_LEFT, ops: this.operators({ iregex: "~*", regex: "~", iequal: "==*", "==": "==", "!=": "!=" }) },
99
+ {
100
+ type: BINARY_LEFT,
101
+ ops: this.operators({ regexi: "~*", equali: "=*", "==": "==", "!=": "!=", "~": "~" })
102
+ },
100
103
  { type: BINARY_LEFT, ops: this.operators({ all: "&&" }) },
101
104
  { type: BINARY_LEFT, ops: this.operators({ any: "||" }) },
102
105
  { type: TERNARY_RIGHT, ops: this.operators({ case: "?" }) }
@@ -137,7 +140,9 @@ class ExpressionParser {
137
140
  return P.regexp(/#(?:[0-9a-f]{3}){1,2}/i).desc("hex color");
138
141
  },
139
142
  String: (r) => {
140
- return P.alt(r.SingleQuoteString, r.DoubleQuoteString, r.HexColor, r.UnquotedString).map((s) => s.replace(/\\n/gm, "\n"));
143
+ return P.alt(r.SingleQuoteString, r.DoubleQuoteString, r.HexColor, r.UnquotedString).map(
144
+ (s) => s.replace(/\\n/gm, "\n")
145
+ );
141
146
  },
142
147
  Symbol: () => {
143
148
  return P.regexp(/[a-zA-Z_][a-zA-Z0-9_-]*/).desc("symbol");
@@ -146,14 +151,26 @@ class ExpressionParser {
146
151
  return P.regexp(/[a-zA-Z0-9_-]+/).desc("symbol");
147
152
  },
148
153
  Feature: (r) => {
149
- return P.seqMap(P.string("@"), r.PartialSymbol.sepBy(P.string(".")), (_feat, symbols) => ["get"].concat(symbols));
154
+ return P.seqMap(
155
+ P.string("@"),
156
+ r.PartialSymbol.sepBy(P.string(".")),
157
+ (_feat, symbols) => ["get"].concat(symbols)
158
+ );
150
159
  },
151
160
  FeatureState: (r) => {
152
- return P.seqMap(P.string("@@"), r.PartialSymbol.sepBy(P.string(".")), (_feat, symbols) => this.expandFeatureState(symbols));
161
+ return P.seqMap(
162
+ P.string("@@"),
163
+ r.PartialSymbol.sepBy(P.string(".")),
164
+ (_feat, symbols) => this.expandFeatureState(symbols)
165
+ );
153
166
  },
154
167
  Array: (r) => P.string("[").trim(r._).then(r.Value.trim(r._).sepBy(P.string(","))).skip(P.string("]")),
155
168
  State: (r) => {
156
- return P.seqMap(P.string("$"), r.PartialSymbol.sepBy(P.string(".")), (_state, symbols) => ["state"].concat(symbols));
169
+ return P.seqMap(
170
+ P.string("$"),
171
+ r.PartialSymbol.sepBy(P.string(".")),
172
+ (_state, symbols) => ["state"].concat(symbols)
173
+ );
157
174
  },
158
175
  Paren: (r) => {
159
176
  return P.seqMap(P.string("("), r.Expr.trim(r._), P.string(")"), (_lb, expr, _rb) => expr);
@@ -168,7 +185,18 @@ class ExpressionParser {
168
185
  );
169
186
  },
170
187
  Value: (r) => {
171
- return P.alt(r.Paren, r.Array, r.Func, r.Boolean, r.Null, r.Number, r.String, r.FeatureState, r.Feature, r.State);
188
+ return P.alt(
189
+ r.Paren,
190
+ r.Array,
191
+ r.Func,
192
+ r.Boolean,
193
+ r.Null,
194
+ r.Number,
195
+ r.String,
196
+ r.FeatureState,
197
+ r.Feature,
198
+ r.State
199
+ );
172
200
  },
173
201
  Expr: (r) => {
174
202
  return this.tableParser(operatorTable, r.Value);
@@ -208,9 +236,7 @@ class ExpressionParser {
208
236
  */
209
237
  operators(ops) {
210
238
  const keys = Object.keys(ops);
211
- const ps = keys.map(
212
- (k) => P.string(ops[k]).trim(P.optWhitespace).result(k)
213
- );
239
+ const ps = keys.map((k) => P.string(ops[k]).trim(P.optWhitespace).result(k));
214
240
  return P.alt.apply(null, ps);
215
241
  }
216
242
  /**
@@ -302,17 +328,17 @@ const equal = {
302
328
  name: "equal",
303
329
  fn: regexFunction("==", true)
304
330
  };
305
- const iequal = {
331
+ const equali = {
306
332
  name: "iequal",
307
333
  fn: regexFunction("==", false)
308
334
  };
309
335
  const regex = {
310
336
  name: "regex",
311
- fn: regexFunction("~=", true)
337
+ fn: regexFunction("~", true)
312
338
  };
313
- const iregex = {
314
- name: "iregex",
315
- fn: regexFunction("~=", false)
339
+ const regexi = {
340
+ name: "regexi",
341
+ fn: regexFunction("~", false)
316
342
  };
317
343
 
318
344
  function stateCustomFunction(expr, parentExpression) {
@@ -462,9 +488,9 @@ let ReactiveExpression = _ReactiveExpression;
462
488
  ReactiveExpression.registerCustomFunction(customStateFn);
463
489
  ReactiveExpression.registerCustomFunction(customFromPaletteFn);
464
490
  ReactiveExpression.registerCustomFunction(regex);
465
- ReactiveExpression.registerCustomFunction(iregex);
491
+ ReactiveExpression.registerCustomFunction(regexi);
466
492
  ReactiveExpression.registerCustomFunction(equal);
467
- ReactiveExpression.registerCustomFunction(iequal);
493
+ ReactiveExpression.registerCustomFunction(equali);
468
494
 
469
495
  var __defProp$5 = Object.defineProperty;
470
496
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -117,7 +117,10 @@ class ExpressionParser {
117
117
  { type: BINARY_LEFT, ops: this.operators({ "+": "+", "-": "-" }) },
118
118
  { type: BINARY_LEFT, ops: this.operators({ ">=": ">=", "<=": "<=" }) },
119
119
  { type: BINARY_LEFT, ops: this.operators({ "<": "<", ">": ">" }) },
120
- { type: BINARY_LEFT, ops: this.operators({ iregex: "~*", regex: "~", iequal: "==*", "==": "==", "!=": "!=" }) },
120
+ {
121
+ type: BINARY_LEFT,
122
+ ops: this.operators({ regexi: "~*", equali: "=*", "==": "==", "!=": "!=", "~": "~" })
123
+ },
121
124
  { type: BINARY_LEFT, ops: this.operators({ all: "&&" }) },
122
125
  { type: BINARY_LEFT, ops: this.operators({ any: "||" }) },
123
126
  { type: TERNARY_RIGHT, ops: this.operators({ case: "?" }) }
@@ -158,7 +161,9 @@ class ExpressionParser {
158
161
  return P__default.regexp(/#(?:[0-9a-f]{3}){1,2}/i).desc("hex color");
159
162
  },
160
163
  String: (r) => {
161
- return P__default.alt(r.SingleQuoteString, r.DoubleQuoteString, r.HexColor, r.UnquotedString).map((s) => s.replace(/\\n/gm, "\n"));
164
+ return P__default.alt(r.SingleQuoteString, r.DoubleQuoteString, r.HexColor, r.UnquotedString).map(
165
+ (s) => s.replace(/\\n/gm, "\n")
166
+ );
162
167
  },
163
168
  Symbol: () => {
164
169
  return P__default.regexp(/[a-zA-Z_][a-zA-Z0-9_-]*/).desc("symbol");
@@ -167,14 +172,26 @@ class ExpressionParser {
167
172
  return P__default.regexp(/[a-zA-Z0-9_-]+/).desc("symbol");
168
173
  },
169
174
  Feature: (r) => {
170
- return P__default.seqMap(P__default.string("@"), r.PartialSymbol.sepBy(P__default.string(".")), (_feat, symbols) => ["get"].concat(symbols));
175
+ return P__default.seqMap(
176
+ P__default.string("@"),
177
+ r.PartialSymbol.sepBy(P__default.string(".")),
178
+ (_feat, symbols) => ["get"].concat(symbols)
179
+ );
171
180
  },
172
181
  FeatureState: (r) => {
173
- return P__default.seqMap(P__default.string("@@"), r.PartialSymbol.sepBy(P__default.string(".")), (_feat, symbols) => this.expandFeatureState(symbols));
182
+ return P__default.seqMap(
183
+ P__default.string("@@"),
184
+ r.PartialSymbol.sepBy(P__default.string(".")),
185
+ (_feat, symbols) => this.expandFeatureState(symbols)
186
+ );
174
187
  },
175
188
  Array: (r) => P__default.string("[").trim(r._).then(r.Value.trim(r._).sepBy(P__default.string(","))).skip(P__default.string("]")),
176
189
  State: (r) => {
177
- return P__default.seqMap(P__default.string("$"), r.PartialSymbol.sepBy(P__default.string(".")), (_state, symbols) => ["state"].concat(symbols));
190
+ return P__default.seqMap(
191
+ P__default.string("$"),
192
+ r.PartialSymbol.sepBy(P__default.string(".")),
193
+ (_state, symbols) => ["state"].concat(symbols)
194
+ );
178
195
  },
179
196
  Paren: (r) => {
180
197
  return P__default.seqMap(P__default.string("("), r.Expr.trim(r._), P__default.string(")"), (_lb, expr, _rb) => expr);
@@ -189,7 +206,18 @@ class ExpressionParser {
189
206
  );
190
207
  },
191
208
  Value: (r) => {
192
- return P__default.alt(r.Paren, r.Array, r.Func, r.Boolean, r.Null, r.Number, r.String, r.FeatureState, r.Feature, r.State);
209
+ return P__default.alt(
210
+ r.Paren,
211
+ r.Array,
212
+ r.Func,
213
+ r.Boolean,
214
+ r.Null,
215
+ r.Number,
216
+ r.String,
217
+ r.FeatureState,
218
+ r.Feature,
219
+ r.State
220
+ );
193
221
  },
194
222
  Expr: (r) => {
195
223
  return this.tableParser(operatorTable, r.Value);
@@ -229,9 +257,7 @@ class ExpressionParser {
229
257
  */
230
258
  operators(ops) {
231
259
  const keys = Object.keys(ops);
232
- const ps = keys.map(
233
- (k) => P__default.string(ops[k]).trim(P__default.optWhitespace).result(k)
234
- );
260
+ const ps = keys.map((k) => P__default.string(ops[k]).trim(P__default.optWhitespace).result(k));
235
261
  return P__default.alt.apply(null, ps);
236
262
  }
237
263
  /**
@@ -323,17 +349,17 @@ const equal = {
323
349
  name: "equal",
324
350
  fn: regexFunction("==", true)
325
351
  };
326
- const iequal = {
352
+ const equali = {
327
353
  name: "iequal",
328
354
  fn: regexFunction("==", false)
329
355
  };
330
356
  const regex = {
331
357
  name: "regex",
332
- fn: regexFunction("~=", true)
358
+ fn: regexFunction("~", true)
333
359
  };
334
- const iregex = {
335
- name: "iregex",
336
- fn: regexFunction("~=", false)
360
+ const regexi = {
361
+ name: "regexi",
362
+ fn: regexFunction("~", false)
337
363
  };
338
364
 
339
365
  function stateCustomFunction(expr, parentExpression) {
@@ -483,9 +509,9 @@ let ReactiveExpression = _ReactiveExpression;
483
509
  ReactiveExpression.registerCustomFunction(customStateFn);
484
510
  ReactiveExpression.registerCustomFunction(customFromPaletteFn);
485
511
  ReactiveExpression.registerCustomFunction(regex);
486
- ReactiveExpression.registerCustomFunction(iregex);
512
+ ReactiveExpression.registerCustomFunction(regexi);
487
513
  ReactiveExpression.registerCustomFunction(equal);
488
- ReactiveExpression.registerCustomFunction(iequal);
514
+ ReactiveExpression.registerCustomFunction(equali);
489
515
 
490
516
  var __defProp$5 = Object.defineProperty;
491
517
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -1,7 +1,7 @@
1
1
  import { Client } from '@emuanalytics/flow-engine-client';
2
2
  import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
3
3
  import EventEmitter$1, { EventEmitter } from 'eventemitter3';
4
- import * as maplibre from '@emuanalytics/maplibre-gl';
4
+ import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
5
5
 
6
6
  type Annotation = {
7
7
  annotationType: string;
@@ -1381,6 +1381,23 @@ interface MapPaddingOptions {
1381
1381
  left: number;
1382
1382
  }
1383
1383
 
1384
+ interface MapEventTypes {
1385
+ click: (event: MapMouseEvent) => void;
1386
+ dblClick: (event: MapMouseEvent) => void;
1387
+ mouseMove: (event: MapMouseEvent) => void;
1388
+ mouseOut: (event: MapMouseEvent) => void;
1389
+ moveEnd: (event: MapEvent) => void;
1390
+ sourceAdded: (event: MapSourceEvent) => void;
1391
+ sourceRemoved: (event: MapSourceEvent) => void;
1392
+ beforeSourceAdded: (event: MapSourceEvent) => void;
1393
+ beforeSourceRemoved: (event: MapSourceEvent) => void;
1394
+ sourceFeatureState: (event: MapSourceEvent) => void;
1395
+ destroyed: (event: MapEvent) => void;
1396
+ loading: (event: MapLoadingEvent) => void;
1397
+ beforeStyleChanged: (event: MapStyleChangeEvent) => void;
1398
+ styleChanged: (event: MapStyleChangeEvent) => void;
1399
+ error: (event: FlowMapError) => void;
1400
+ }
1384
1401
  interface MapEventTypes {
1385
1402
  click: (event: MapMouseEvent) => void;
1386
1403
  dblClick: (event: MapMouseEvent) => void;
@@ -1403,7 +1420,7 @@ declare class MapEvent<EventType extends string = MapEventType, TOrig = unknown>
1403
1420
  type: EventType;
1404
1421
  map: FlowMap;
1405
1422
  originalEvent?: TOrig;
1406
- static fromMaplibreEvent(type: string, map: FlowMap, maplibreEvent: maplibre.MapLibreEvent): MapEvent<any, unknown>;
1423
+ static fromMaplibreEvent(type: string, map: FlowMap, maplibreEvent: MapLibreEvent): MapEvent<any, unknown>;
1407
1424
  constructor(type: EventType, map: FlowMap, originalEvent?: TOrig);
1408
1425
  }
1409
1426
  type MapMouseEventType = 'click' | 'dblClick' | 'mouseMove' | 'mouseOut';
@@ -1417,7 +1434,7 @@ declare class MapMouseEvent extends MapEvent<MapMouseEventType, MouseEvent> {
1417
1434
  */
1418
1435
  lngLat: [number, number];
1419
1436
  features: MapFeature[];
1420
- static fromMaplibreMouseEvent(type: MapMouseEventType, maplibreMouseEvent: maplibre.MapMouseEvent, map: FlowMap, features: MapFeature[]): MapMouseEvent;
1437
+ static fromMaplibreMouseEvent(type: MapMouseEventType, maplibreMouseEvent: MapMouseEvent$1, map: FlowMap, features: MapFeature[]): MapMouseEvent;
1421
1438
  constructor(type: MapMouseEventType, map: FlowMap, point: [number, number], lngLat: [number, number], features: MapFeature[], originalEvent: MouseEvent);
1422
1439
  }
1423
1440
  type SourceEventType = 'sourceAdded' | 'sourceRemoved' | 'beforeSourceAdded' | 'beforeSourceRemoved' | 'sourceFeatureState';
@@ -1527,7 +1544,7 @@ declare class MapFeatureStream {
1527
1544
  private suspend;
1528
1545
  }
1529
1546
 
1530
- interface MapOptions<TState extends StateStore = StateStore> extends Omit<maplibre.MapOptions, 'style'> {
1547
+ interface MapOptions<TState extends StateStore = StateStore> extends Omit<MapOptions$1, 'style'> {
1531
1548
  id?: string;
1532
1549
  baseStyle?: string | MapStyleSpecification;
1533
1550
  container: string | HTMLElement;
@@ -1547,7 +1564,7 @@ declare class FlowMap<TState extends StateStore = StateStore> extends EventEmitt
1547
1564
  private _style;
1548
1565
  private _styleUpdateSubscription;
1549
1566
  private _throttledMouseMove;
1550
- maplibreMap: maplibre.Map;
1567
+ maplibreMap: Map;
1551
1568
  constructor(options: MapOptions<TState>);
1552
1569
  get context(): FlowContext<TState>;
1553
1570
  get container(): HTMLElement;
@@ -1,7 +1,7 @@
1
1
  import { Client } from '@emuanalytics/flow-engine-client';
2
2
  import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
3
3
  import EventEmitter$1, { EventEmitter } from 'eventemitter3';
4
- import * as maplibre from '@emuanalytics/maplibre-gl';
4
+ import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
5
5
 
6
6
  type Annotation = {
7
7
  annotationType: string;
@@ -1381,6 +1381,23 @@ interface MapPaddingOptions {
1381
1381
  left: number;
1382
1382
  }
1383
1383
 
1384
+ interface MapEventTypes {
1385
+ click: (event: MapMouseEvent) => void;
1386
+ dblClick: (event: MapMouseEvent) => void;
1387
+ mouseMove: (event: MapMouseEvent) => void;
1388
+ mouseOut: (event: MapMouseEvent) => void;
1389
+ moveEnd: (event: MapEvent) => void;
1390
+ sourceAdded: (event: MapSourceEvent) => void;
1391
+ sourceRemoved: (event: MapSourceEvent) => void;
1392
+ beforeSourceAdded: (event: MapSourceEvent) => void;
1393
+ beforeSourceRemoved: (event: MapSourceEvent) => void;
1394
+ sourceFeatureState: (event: MapSourceEvent) => void;
1395
+ destroyed: (event: MapEvent) => void;
1396
+ loading: (event: MapLoadingEvent) => void;
1397
+ beforeStyleChanged: (event: MapStyleChangeEvent) => void;
1398
+ styleChanged: (event: MapStyleChangeEvent) => void;
1399
+ error: (event: FlowMapError) => void;
1400
+ }
1384
1401
  interface MapEventTypes {
1385
1402
  click: (event: MapMouseEvent) => void;
1386
1403
  dblClick: (event: MapMouseEvent) => void;
@@ -1403,7 +1420,7 @@ declare class MapEvent<EventType extends string = MapEventType, TOrig = unknown>
1403
1420
  type: EventType;
1404
1421
  map: FlowMap;
1405
1422
  originalEvent?: TOrig;
1406
- static fromMaplibreEvent(type: string, map: FlowMap, maplibreEvent: maplibre.MapLibreEvent): MapEvent<any, unknown>;
1423
+ static fromMaplibreEvent(type: string, map: FlowMap, maplibreEvent: MapLibreEvent): MapEvent<any, unknown>;
1407
1424
  constructor(type: EventType, map: FlowMap, originalEvent?: TOrig);
1408
1425
  }
1409
1426
  type MapMouseEventType = 'click' | 'dblClick' | 'mouseMove' | 'mouseOut';
@@ -1417,7 +1434,7 @@ declare class MapMouseEvent extends MapEvent<MapMouseEventType, MouseEvent> {
1417
1434
  */
1418
1435
  lngLat: [number, number];
1419
1436
  features: MapFeature[];
1420
- static fromMaplibreMouseEvent(type: MapMouseEventType, maplibreMouseEvent: maplibre.MapMouseEvent, map: FlowMap, features: MapFeature[]): MapMouseEvent;
1437
+ static fromMaplibreMouseEvent(type: MapMouseEventType, maplibreMouseEvent: MapMouseEvent$1, map: FlowMap, features: MapFeature[]): MapMouseEvent;
1421
1438
  constructor(type: MapMouseEventType, map: FlowMap, point: [number, number], lngLat: [number, number], features: MapFeature[], originalEvent: MouseEvent);
1422
1439
  }
1423
1440
  type SourceEventType = 'sourceAdded' | 'sourceRemoved' | 'beforeSourceAdded' | 'beforeSourceRemoved' | 'sourceFeatureState';
@@ -1527,7 +1544,7 @@ declare class MapFeatureStream {
1527
1544
  private suspend;
1528
1545
  }
1529
1546
 
1530
- interface MapOptions<TState extends StateStore = StateStore> extends Omit<maplibre.MapOptions, 'style'> {
1547
+ interface MapOptions<TState extends StateStore = StateStore> extends Omit<MapOptions$1, 'style'> {
1531
1548
  id?: string;
1532
1549
  baseStyle?: string | MapStyleSpecification;
1533
1550
  container: string | HTMLElement;
@@ -1547,7 +1564,7 @@ declare class FlowMap<TState extends StateStore = StateStore> extends EventEmitt
1547
1564
  private _style;
1548
1565
  private _styleUpdateSubscription;
1549
1566
  private _throttledMouseMove;
1550
- maplibreMap: maplibre.Map;
1567
+ maplibreMap: Map;
1551
1568
  constructor(options: MapOptions<TState>);
1552
1569
  get context(): FlowContext<TState>;
1553
1570
  get container(): HTMLElement;
@@ -1,7 +1,7 @@
1
1
  import { Client } from '@emuanalytics/flow-engine-client';
2
2
  import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
3
3
  import EventEmitter$1, { EventEmitter } from 'eventemitter3';
4
- import * as maplibre from '@emuanalytics/maplibre-gl';
4
+ import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
5
5
 
6
6
  type Annotation = {
7
7
  annotationType: string;
@@ -1381,6 +1381,23 @@ interface MapPaddingOptions {
1381
1381
  left: number;
1382
1382
  }
1383
1383
 
1384
+ interface MapEventTypes {
1385
+ click: (event: MapMouseEvent) => void;
1386
+ dblClick: (event: MapMouseEvent) => void;
1387
+ mouseMove: (event: MapMouseEvent) => void;
1388
+ mouseOut: (event: MapMouseEvent) => void;
1389
+ moveEnd: (event: MapEvent) => void;
1390
+ sourceAdded: (event: MapSourceEvent) => void;
1391
+ sourceRemoved: (event: MapSourceEvent) => void;
1392
+ beforeSourceAdded: (event: MapSourceEvent) => void;
1393
+ beforeSourceRemoved: (event: MapSourceEvent) => void;
1394
+ sourceFeatureState: (event: MapSourceEvent) => void;
1395
+ destroyed: (event: MapEvent) => void;
1396
+ loading: (event: MapLoadingEvent) => void;
1397
+ beforeStyleChanged: (event: MapStyleChangeEvent) => void;
1398
+ styleChanged: (event: MapStyleChangeEvent) => void;
1399
+ error: (event: FlowMapError) => void;
1400
+ }
1384
1401
  interface MapEventTypes {
1385
1402
  click: (event: MapMouseEvent) => void;
1386
1403
  dblClick: (event: MapMouseEvent) => void;
@@ -1403,7 +1420,7 @@ declare class MapEvent<EventType extends string = MapEventType, TOrig = unknown>
1403
1420
  type: EventType;
1404
1421
  map: FlowMap;
1405
1422
  originalEvent?: TOrig;
1406
- static fromMaplibreEvent(type: string, map: FlowMap, maplibreEvent: maplibre.MapLibreEvent): MapEvent<any, unknown>;
1423
+ static fromMaplibreEvent(type: string, map: FlowMap, maplibreEvent: MapLibreEvent): MapEvent<any, unknown>;
1407
1424
  constructor(type: EventType, map: FlowMap, originalEvent?: TOrig);
1408
1425
  }
1409
1426
  type MapMouseEventType = 'click' | 'dblClick' | 'mouseMove' | 'mouseOut';
@@ -1417,7 +1434,7 @@ declare class MapMouseEvent extends MapEvent<MapMouseEventType, MouseEvent> {
1417
1434
  */
1418
1435
  lngLat: [number, number];
1419
1436
  features: MapFeature[];
1420
- static fromMaplibreMouseEvent(type: MapMouseEventType, maplibreMouseEvent: maplibre.MapMouseEvent, map: FlowMap, features: MapFeature[]): MapMouseEvent;
1437
+ static fromMaplibreMouseEvent(type: MapMouseEventType, maplibreMouseEvent: MapMouseEvent$1, map: FlowMap, features: MapFeature[]): MapMouseEvent;
1421
1438
  constructor(type: MapMouseEventType, map: FlowMap, point: [number, number], lngLat: [number, number], features: MapFeature[], originalEvent: MouseEvent);
1422
1439
  }
1423
1440
  type SourceEventType = 'sourceAdded' | 'sourceRemoved' | 'beforeSourceAdded' | 'beforeSourceRemoved' | 'sourceFeatureState';
@@ -1527,7 +1544,7 @@ declare class MapFeatureStream {
1527
1544
  private suspend;
1528
1545
  }
1529
1546
 
1530
- interface MapOptions<TState extends StateStore = StateStore> extends Omit<maplibre.MapOptions, 'style'> {
1547
+ interface MapOptions<TState extends StateStore = StateStore> extends Omit<MapOptions$1, 'style'> {
1531
1548
  id?: string;
1532
1549
  baseStyle?: string | MapStyleSpecification;
1533
1550
  container: string | HTMLElement;
@@ -1547,7 +1564,7 @@ declare class FlowMap<TState extends StateStore = StateStore> extends EventEmitt
1547
1564
  private _style;
1548
1565
  private _styleUpdateSubscription;
1549
1566
  private _throttledMouseMove;
1550
- maplibreMap: maplibre.Map;
1567
+ maplibreMap: Map;
1551
1568
  constructor(options: MapOptions<TState>);
1552
1569
  get context(): FlowContext<TState>;
1553
1570
  get container(): HTMLElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emuanalytics/flow-rdf-core",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -75,7 +75,7 @@
75
75
  "dependencies": {
76
76
  "@emuanalytics/flow-engine-client": "^1.3.134",
77
77
  "@emuanalytics/mapbox-gl-draw": "^1.3.2",
78
- "@emuanalytics/maplibre-gl": "^3.3.1",
78
+ "@emuanalytics/maplibre-gl": "^3.3.3",
79
79
  "@emuanalytics/maplibre-gl-style-spec": "^19.3.1",
80
80
  "@turf/area": "^6.5.0",
81
81
  "@turf/bbox": "^6.5.0",