@emuanalytics/flow-rdf-core 0.0.18 → 0.0.20

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,9 +4,9 @@ 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');
8
- const maplibregl = require('@emuanalytics/maplibre-gl');
7
+ const mapFeatureStream = require('./shared/flow-rdf-core.585aa641.cjs');
9
8
  const EventEmitter = require('eventemitter3');
9
+ const maplibre = require('@emuanalytics/maplibre-gl');
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');
@@ -31,6 +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__default = /*#__PURE__*/_interopDefaultCompat(maplibre);
34
35
 
35
36
  function deferred() {
36
37
  let methods;
@@ -2318,7 +2319,7 @@ const _FlowMap = class _FlowMap extends EventEmitter__default {
2318
2319
  };
2319
2320
  }
2320
2321
  setCenter(center, animationOptions) {
2321
- const lngLat = stringUtils.isDefined(center.lng) && stringUtils.isDefined(center.lat) ? new maplibregl.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;
2322
2323
  let method = this.maplibreMap.jumpTo;
2323
2324
  if (animationOptions) {
2324
2325
  switch (animationOptions.mode) {
@@ -2495,7 +2496,7 @@ const _FlowMap = class _FlowMap extends EventEmitter__default {
2495
2496
  this._style.bindState(this._context.state);
2496
2497
  const baseStyle = await this.loadBaseStyle(this._options.baseStyle);
2497
2498
  this._style.setBaseStyle(baseStyle);
2498
- this.maplibreMap = new maplibregl.Map({
2499
+ this.maplibreMap = new maplibre__default.Map({
2499
2500
  ...this._options,
2500
2501
  transformRequest: this.transformMapRequest.bind(this),
2501
2502
  style: baseStyle
@@ -3074,7 +3075,7 @@ function traceReaction() {
3074
3075
  mobx.trace();
3075
3076
  }
3076
3077
 
3077
- mobx.configure({ isolateGlobalState: true });
3078
+ mobx.configure({ isolateGlobalState: false, useProxies: "always" });
3078
3079
  const initializeContext = globalContextRegistry.initializeContext.bind(globalContextRegistry);
3079
3080
  const uninitializeContext = globalContextRegistry.uninitializeContext.bind(globalContextRegistry);
3080
3081
  const getContext = globalContextRegistry.getContext.bind(globalContextRegistry);
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
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.b618ecc3.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.b618ecc3.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
- import '@emuanalytics/maplibre-gl';
6
5
  import 'eventemitter3';
6
+ import '@emuanalytics/maplibre-gl';
7
7
 
8
8
  interface SyncAnnotation<T = any> extends Annotation {
9
9
  serialize(val: T): string;
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
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.b618ecc3.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.b618ecc3.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
- import '@emuanalytics/maplibre-gl';
6
5
  import 'eventemitter3';
6
+ import '@emuanalytics/maplibre-gl';
7
7
 
8
8
  interface SyncAnnotation<T = any> extends Annotation {
9
9
  serialize(val: T): string;
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
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.b618ecc3.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.b618ecc3.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
- import '@emuanalytics/maplibre-gl';
6
5
  import 'eventemitter3';
6
+ import '@emuanalytics/maplibre-gl';
7
7
 
8
8
  interface SyncAnnotation<T = any> extends Annotation {
9
9
  serialize(val: T): string;
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';
7
- import { LngLat, Map as Map$1 } from '@emuanalytics/maplibre-gl';
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';
8
7
  import EventEmitter from 'eventemitter3';
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';
@@ -2299,7 +2299,7 @@ const _FlowMap = class _FlowMap extends EventEmitter {
2299
2299
  };
2300
2300
  }
2301
2301
  setCenter(center, animationOptions) {
2302
- const lngLat = isDefined(center.lng) && isDefined(center.lat) ? new LngLat(center.lng, center.lat) : void 0;
2302
+ const lngLat = isDefined(center.lng) && isDefined(center.lat) ? new maplibre.LngLat(center.lng, center.lat) : void 0;
2303
2303
  let method = this.maplibreMap.jumpTo;
2304
2304
  if (animationOptions) {
2305
2305
  switch (animationOptions.mode) {
@@ -2476,7 +2476,7 @@ const _FlowMap = class _FlowMap extends EventEmitter {
2476
2476
  this._style.bindState(this._context.state);
2477
2477
  const baseStyle = await this.loadBaseStyle(this._options.baseStyle);
2478
2478
  this._style.setBaseStyle(baseStyle);
2479
- this.maplibreMap = new Map$1({
2479
+ this.maplibreMap = new maplibre.Map({
2480
2480
  ...this._options,
2481
2481
  transformRequest: this.transformMapRequest.bind(this),
2482
2482
  style: baseStyle
@@ -3055,7 +3055,7 @@ function traceReaction() {
3055
3055
  trace();
3056
3056
  }
3057
3057
 
3058
- configure({ isolateGlobalState: true });
3058
+ configure({ isolateGlobalState: false, useProxies: "always" });
3059
3059
  const initializeContext = globalContextRegistry.initializeContext.bind(globalContextRegistry);
3060
3060
  const uninitializeContext = globalContextRegistry.uninitializeContext.bind(globalContextRegistry);
3061
3061
  const getContext = globalContextRegistry.getContext.bind(globalContextRegistry);
@@ -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');
@@ -12,7 +12,7 @@ const featureTypeChecks = require('../../../shared/flow-rdf-core.84eded74.cjs');
12
12
  const EventEmitter = require('eventemitter3');
13
13
  const stringUtils = require('../../../shared/flow-rdf-core.3042be4a.cjs');
14
14
  const lit = require('lit-html');
15
- const maplibregl = require('@emuanalytics/maplibre-gl');
15
+ const maplibre = require('@emuanalytics/maplibre-gl');
16
16
  const turfCircle = require('@turf/circle');
17
17
  const turfDistance = require('@turf/distance');
18
18
  const helpers = require('@turf/helpers');
@@ -47,7 +47,7 @@ const turfLength__default = /*#__PURE__*/_interopDefaultCompat(turfLength);
47
47
  const Debug__default = /*#__PURE__*/_interopDefaultCompat(Debug);
48
48
  const EventEmitter__default = /*#__PURE__*/_interopDefaultCompat(EventEmitter);
49
49
  const lit__namespace = /*#__PURE__*/_interopNamespaceCompat(lit);
50
- const maplibregl__default = /*#__PURE__*/_interopDefaultCompat(maplibregl);
50
+ const maplibre__default = /*#__PURE__*/_interopDefaultCompat(maplibre);
51
51
  const turfCircle__default = /*#__PURE__*/_interopDefaultCompat(turfCircle);
52
52
  const turfDistance__default = /*#__PURE__*/_interopDefaultCompat(turfDistance);
53
53
 
@@ -171,7 +171,7 @@ class MapPopup extends EventEmitter__default {
171
171
  if (feature) {
172
172
  mapFeatureStream.assert(isFeatureWithId(feature), "MapPopup.open(): feature must have unique ID");
173
173
  }
174
- this._maplibrePopup = new maplibregl__default.Popup({
174
+ this._maplibrePopup = new maplibre__default.Popup({
175
175
  className: this.cssClasses().join(" "),
176
176
  closeButton: this.options.closeButton,
177
177
  closeOnClick: this.options.closeOnClick,
@@ -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.b618ecc3.cjs';
2
- export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.b618ecc3.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.b618ecc3.mjs';
2
- export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.b618ecc3.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.b618ecc3.js';
2
- export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.b618ecc3.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 maplibregl 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 maplibregl.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
- import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
4
3
  import EventEmitter$1, { EventEmitter } from 'eventemitter3';
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;
@@ -1,7 +1,7 @@
1
1
  import { Client } from '@emuanalytics/flow-engine-client';
2
2
  import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
3
- import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
4
3
  import EventEmitter$1, { EventEmitter } from 'eventemitter3';
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;
@@ -1,7 +1,7 @@
1
1
  import { Client } from '@emuanalytics/flow-engine-client';
2
2
  import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
3
- import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
4
3
  import EventEmitter$1, { EventEmitter } from 'eventemitter3';
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emuanalytics/flow-rdf-core",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "type": "module",