@emuanalytics/flow-rdf-core 4.0.0-preview.1 → 4.0.0-preview.2

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.585aa641.cjs');
7
+ const mapFeatureStream = require('./shared/flow-rdf-core.1f9c0593.cjs');
8
8
  const maplibre = require('@emuanalytics/maplibre-gl');
9
9
  const EventEmitter = require('eventemitter3');
10
10
  const mobxUtils = require('mobx-utils');
@@ -33,7 +33,7 @@ const Debug__default = /*#__PURE__*/_interopDefaultCompat(Debug);
33
33
  const maplibre__default = /*#__PURE__*/_interopDefaultCompat(maplibre);
34
34
  const EventEmitter__default = /*#__PURE__*/_interopDefaultCompat(EventEmitter);
35
35
 
36
- const version = "4.0.0-preview.1";
36
+ const version = "4.0.0-preview.2";
37
37
 
38
38
  const CONSOLE_HIGHLIGHT_STYLE$1 = `
39
39
  padding: 2px 4px;
@@ -174,6 +174,26 @@ class Debugger {
174
174
  this.spyDisposer = void 0;
175
175
  }
176
176
  }
177
+ /**
178
+ * Get a registered map instance by ID.
179
+ */
180
+ maps(mapId) {
181
+ if (!mapId) {
182
+ return Array.from(this.context.maps._maps.keys());
183
+ }
184
+ const mapPromise = this.context.maps.getMap(mapId);
185
+ return mapPromise?.__zone_symbol__value;
186
+ }
187
+ /**
188
+ * Get a registered reactive query by ID.
189
+ */
190
+ queries(queryId) {
191
+ if (!queryId) {
192
+ return Array.from(this.context.queries._queries.keys());
193
+ }
194
+ const queryPromise = this.context.queries.getQuery(queryId);
195
+ return queryPromise?.__zone_symbol__value;
196
+ }
177
197
  spyListener(event) {
178
198
  console.log(`%cspy`, CONSOLE_HIGHLIGHT_STYLE, event);
179
199
  }
@@ -195,6 +215,8 @@ function installGlobalDebugger(dbg) {
195
215
  set: dbg.set.bind(dbg),
196
216
  get: dbg.get.bind(dbg),
197
217
  spy: dbg.spy.bind(dbg),
218
+ maps: dbg.maps.bind(dbg),
219
+ queries: dbg.queries.bind(dbg),
198
220
  unspy: dbg.unspy.bind(dbg)
199
221
  };
200
222
  }
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.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';
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.42d7cda4.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.42d7cda4.cjs';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
4
  export { makeAutoObservable, makeObservable } from 'mobx';
5
5
  import '@emuanalytics/flow-engine-client';
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.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';
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.42d7cda4.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.42d7cda4.mjs';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
4
  export { makeAutoObservable, makeObservable } from 'mobx';
5
5
  import '@emuanalytics/flow-engine-client';
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.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';
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.42d7cda4.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.42d7cda4.js';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
4
  export { makeAutoObservable, makeObservable } from 'mobx';
5
5
  import '@emuanalytics/flow-engine-client';
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ export { makeAutoObservable, makeObservable } from 'mobx';
4
4
  import Debug from 'debug';
5
5
  import { Client } from '@emuanalytics/flow-engine-client';
6
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';
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.ce91eb14.mjs';
8
8
  import maplibre from '@emuanalytics/maplibre-gl';
9
9
  import EventEmitter from 'eventemitter3';
10
10
  import { toStream } from 'mobx-utils';
@@ -14,7 +14,7 @@ import 'parsimmon';
14
14
  import 'colorbrewer';
15
15
  import 'nanoid';
16
16
 
17
- const version = "4.0.0-preview.1";
17
+ const version = "4.0.0-preview.2";
18
18
 
19
19
  const CONSOLE_HIGHLIGHT_STYLE$1 = `
20
20
  padding: 2px 4px;
@@ -155,6 +155,26 @@ class Debugger {
155
155
  this.spyDisposer = void 0;
156
156
  }
157
157
  }
158
+ /**
159
+ * Get a registered map instance by ID.
160
+ */
161
+ maps(mapId) {
162
+ if (!mapId) {
163
+ return Array.from(this.context.maps._maps.keys());
164
+ }
165
+ const mapPromise = this.context.maps.getMap(mapId);
166
+ return mapPromise?.__zone_symbol__value;
167
+ }
168
+ /**
169
+ * Get a registered reactive query by ID.
170
+ */
171
+ queries(queryId) {
172
+ if (!queryId) {
173
+ return Array.from(this.context.queries._queries.keys());
174
+ }
175
+ const queryPromise = this.context.queries.getQuery(queryId);
176
+ return queryPromise?.__zone_symbol__value;
177
+ }
158
178
  spyListener(event) {
159
179
  console.log(`%cspy`, CONSOLE_HIGHLIGHT_STYLE, event);
160
180
  }
@@ -176,6 +196,8 @@ function installGlobalDebugger(dbg) {
176
196
  set: dbg.set.bind(dbg),
177
197
  get: dbg.get.bind(dbg),
178
198
  spy: dbg.spy.bind(dbg),
199
+ maps: dbg.maps.bind(dbg),
200
+ queries: dbg.queries.bind(dbg),
179
201
  unspy: dbg.unspy.bind(dbg)
180
202
  };
181
203
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const mapFeatureStream = require('../../../shared/flow-rdf-core.585aa641.cjs');
3
+ const mapFeatureStream = require('../../../shared/flow-rdf-core.1f9c0593.cjs');
4
4
  const MapboxDraw = require('@emuanalytics/mapbox-gl-draw');
5
5
  const turfArea = require('@turf/area');
6
6
  const turfBBox = require('@turf/bbox');
@@ -535,7 +535,9 @@ class SelectionPlugin extends MapPluginBase {
535
535
  const clickedFeature = event.features[0];
536
536
  const clickedSource = clickedFeature?.source;
537
537
  const selectionOptions = this._sourceSelections.get(clickedSource)?.options;
538
- this._sourceSelections.forEach((sel) => sel.handleClick(event.lngLat, clickedFeature, selectionOptions, multiSelect, this._enablePopups));
538
+ this._sourceSelections.forEach(
539
+ (sel) => sel.handleClick(event.lngLat, clickedFeature, selectionOptions, multiSelect, this._enablePopups)
540
+ );
539
541
  }
540
542
  selectFeatures(source, features) {
541
543
  const sourceSelection = this._sourceSelections.get(source);
@@ -543,6 +545,10 @@ class SelectionPlugin extends MapPluginBase {
543
545
  return;
544
546
  }
545
547
  features = stringUtils.ensureArray(features);
548
+ if (features.length === 0) {
549
+ this.clearSelection(source);
550
+ return;
551
+ }
546
552
  let currentSelection = new Set(sourceSelection.selectedFeatureIds);
547
553
  switch (sourceSelection.options.mode) {
548
554
  case "single":
@@ -1,5 +1,5 @@
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';
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.42d7cda4.cjs';
2
+ export { a8 as EventHandlers, a7 as PluginConstructor, a6 as PluginEventsType, a5 as PluginOptionsType } from '../../../shared/flow-rdf-core.42d7cda4.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 { 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';
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.42d7cda4.mjs';
2
+ export { a8 as EventHandlers, a7 as PluginConstructor, a6 as PluginEventsType, a5 as PluginOptionsType } from '../../../shared/flow-rdf-core.42d7cda4.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 { 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';
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.42d7cda4.js';
2
+ export { a8 as EventHandlers, a7 as PluginConstructor, a6 as PluginEventsType, a5 as PluginOptionsType } from '../../../shared/flow-rdf-core.42d7cda4.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 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';
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.ce91eb14.mjs';
2
+ export { P as PluginManager } from '../../../shared/flow-rdf-core.ce91eb14.mjs';
3
3
  import MapboxDraw from '@emuanalytics/mapbox-gl-draw';
4
4
  import turfArea from '@turf/area';
5
5
  import turfBBox from '@turf/bbox';
@@ -507,7 +507,9 @@ class SelectionPlugin extends MapPluginBase {
507
507
  const clickedFeature = event.features[0];
508
508
  const clickedSource = clickedFeature?.source;
509
509
  const selectionOptions = this._sourceSelections.get(clickedSource)?.options;
510
- this._sourceSelections.forEach((sel) => sel.handleClick(event.lngLat, clickedFeature, selectionOptions, multiSelect, this._enablePopups));
510
+ this._sourceSelections.forEach(
511
+ (sel) => sel.handleClick(event.lngLat, clickedFeature, selectionOptions, multiSelect, this._enablePopups)
512
+ );
511
513
  }
512
514
  selectFeatures(source, features) {
513
515
  const sourceSelection = this._sourceSelections.get(source);
@@ -515,6 +517,10 @@ class SelectionPlugin extends MapPluginBase {
515
517
  return;
516
518
  }
517
519
  features = ensureArray(features);
520
+ if (features.length === 0) {
521
+ this.clearSelection(source);
522
+ return;
523
+ }
518
524
  let currentSelection = new Set(sourceSelection.selectedFeatureIds);
519
525
  switch (sourceSelection.options.mode) {
520
526
  case "single":
@@ -40,7 +40,10 @@ class FlowError extends Error {
40
40
 
41
41
  class FlowExpressionError extends FlowError {
42
42
  constructor(expression, reason, errors) {
43
- super(`Failed to evaluate expression <${expression}>: ${errors.join(", ")}`);
43
+ super(`Failed to evaluate expression:
44
+ ${expression}
45
+ ------
46
+ ${errors.join(", ")}`);
44
47
  this.reason = reason;
45
48
  this.errors = errors;
46
49
  }
@@ -435,7 +438,7 @@ const _ReactiveExpression = class _ReactiveExpression {
435
438
  }, {});
436
439
  return expressions;
437
440
  } else {
438
- throw new FlowExpressionError("program", "parseError", [
441
+ throw new FlowExpressionError(program, "parseError", [
439
442
  `expected ${parsedProgram.expected.join(" ")} at line ${parsedProgram.index.line}, column ${parsedProgram.index.column}]`
440
443
  ]);
441
444
  }
@@ -98,6 +98,14 @@ declare class Debugger<TState extends StateStore = StateStore> {
98
98
  * Disable verbose debugging of all reactive updates.
99
99
  */
100
100
  unspy(): void;
101
+ /**
102
+ * Get a registered map instance by ID.
103
+ */
104
+ maps(mapId?: string): any;
105
+ /**
106
+ * Get a registered reactive query by ID.
107
+ */
108
+ queries(queryId?: string): any;
101
109
  private spyListener;
102
110
  private logStateValue;
103
111
  }
@@ -158,7 +166,7 @@ declare class MapLayerStyleBuilder {
158
166
  *
159
167
  * @param value - visible value (default `true`)
160
168
  */
161
- visibility(value: boolean): this;
169
+ visibility(value: boolean | StyleExpression): this;
162
170
  /**
163
171
  * Create a style specification string.
164
172
  *
@@ -98,6 +98,14 @@ declare class Debugger<TState extends StateStore = StateStore> {
98
98
  * Disable verbose debugging of all reactive updates.
99
99
  */
100
100
  unspy(): void;
101
+ /**
102
+ * Get a registered map instance by ID.
103
+ */
104
+ maps(mapId?: string): any;
105
+ /**
106
+ * Get a registered reactive query by ID.
107
+ */
108
+ queries(queryId?: string): any;
101
109
  private spyListener;
102
110
  private logStateValue;
103
111
  }
@@ -158,7 +166,7 @@ declare class MapLayerStyleBuilder {
158
166
  *
159
167
  * @param value - visible value (default `true`)
160
168
  */
161
- visibility(value: boolean): this;
169
+ visibility(value: boolean | StyleExpression): this;
162
170
  /**
163
171
  * Create a style specification string.
164
172
  *
@@ -98,6 +98,14 @@ declare class Debugger<TState extends StateStore = StateStore> {
98
98
  * Disable verbose debugging of all reactive updates.
99
99
  */
100
100
  unspy(): void;
101
+ /**
102
+ * Get a registered map instance by ID.
103
+ */
104
+ maps(mapId?: string): any;
105
+ /**
106
+ * Get a registered reactive query by ID.
107
+ */
108
+ queries(queryId?: string): any;
101
109
  private spyListener;
102
110
  private logStateValue;
103
111
  }
@@ -158,7 +166,7 @@ declare class MapLayerStyleBuilder {
158
166
  *
159
167
  * @param value - visible value (default `true`)
160
168
  */
161
- visibility(value: boolean): this;
169
+ visibility(value: boolean | StyleExpression): this;
162
170
  /**
163
171
  * Create a style specification string.
164
172
  *
@@ -19,7 +19,10 @@ class FlowError extends Error {
19
19
 
20
20
  class FlowExpressionError extends FlowError {
21
21
  constructor(expression, reason, errors) {
22
- super(`Failed to evaluate expression <${expression}>: ${errors.join(", ")}`);
22
+ super(`Failed to evaluate expression:
23
+ ${expression}
24
+ ------
25
+ ${errors.join(", ")}`);
23
26
  this.reason = reason;
24
27
  this.errors = errors;
25
28
  }
@@ -414,7 +417,7 @@ const _ReactiveExpression = class _ReactiveExpression {
414
417
  }, {});
415
418
  return expressions;
416
419
  } else {
417
- throw new FlowExpressionError("program", "parseError", [
420
+ throw new FlowExpressionError(program, "parseError", [
418
421
  `expected ${parsedProgram.expected.join(" ")} at line ${parsedProgram.index.line}, column ${parsedProgram.index.column}]`
419
422
  ]);
420
423
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emuanalytics/flow-rdf-core",
3
- "version": "4.0.0-preview.1",
3
+ "version": "4.0.0-preview.2",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "type": "module",