@emuanalytics/flow-rdf-core 0.0.21 → 0.0.23
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 +26 -25
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +27 -26
- package/dist/lib/map/plugins/index.cjs +4 -4
- package/dist/lib/map/plugins/index.d.cts +2 -2
- package/dist/lib/map/plugins/index.d.mts +2 -2
- package/dist/lib/map/plugins/index.d.ts +2 -2
- package/dist/lib/map/plugins/index.mjs +7 -7
- package/dist/shared/{flow-rdf-core.90aa4382.d.cts → flow-rdf-core.25dff7db.d.cts} +2 -1
- package/dist/shared/{flow-rdf-core.90aa4382.d.mts → flow-rdf-core.25dff7db.d.mts} +2 -1
- package/dist/shared/{flow-rdf-core.90aa4382.d.ts → flow-rdf-core.25dff7db.d.ts} +2 -1
- package/dist/shared/{flow-rdf-core.33c3a1eb.mjs → flow-rdf-core.9f1d67b5.mjs} +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5,8 +5,8 @@ const Debug = require('debug');
|
|
|
5
5
|
const flowEngineClient = require('@emuanalytics/flow-engine-client');
|
|
6
6
|
const stringUtils = require('./shared/flow-rdf-core.3042be4a.cjs');
|
|
7
7
|
const mapFeatureStream = require('./shared/flow-rdf-core.585aa641.cjs');
|
|
8
|
-
const EventEmitter = require('eventemitter3');
|
|
9
8
|
const maplibre = require('@emuanalytics/maplibre-gl');
|
|
9
|
+
const EventEmitter = require('eventemitter3');
|
|
10
10
|
const mobxUtils = require('mobx-utils');
|
|
11
11
|
const functional = require('./shared/flow-rdf-core.c44cf082.cjs');
|
|
12
12
|
require('@emuanalytics/maplibre-gl-style-spec');
|
|
@@ -30,8 +30,19 @@ function _interopNamespaceCompat(e) {
|
|
|
30
30
|
|
|
31
31
|
const mobx__namespace = /*#__PURE__*/_interopNamespaceCompat(mobx);
|
|
32
32
|
const Debug__default = /*#__PURE__*/_interopDefaultCompat(Debug);
|
|
33
|
-
const EventEmitter__default = /*#__PURE__*/_interopDefaultCompat(EventEmitter);
|
|
34
33
|
const maplibre__default = /*#__PURE__*/_interopDefaultCompat(maplibre);
|
|
34
|
+
const EventEmitter__default = /*#__PURE__*/_interopDefaultCompat(EventEmitter);
|
|
35
|
+
|
|
36
|
+
const version = "0.0.23";
|
|
37
|
+
|
|
38
|
+
const CONSOLE_HIGHLIGHT_STYLE$1 = `
|
|
39
|
+
padding: 2px 4px;
|
|
40
|
+
border-radius: 2px;
|
|
41
|
+
background: #389DFF;
|
|
42
|
+
color: white;`;
|
|
43
|
+
function announce() {
|
|
44
|
+
console.log("%cFlo.w RDF Core v%s", CONSOLE_HIGHLIGHT_STYLE$1, version);
|
|
45
|
+
}
|
|
35
46
|
|
|
36
47
|
const mockGlobal = {};
|
|
37
48
|
function getGlobal() {
|
|
@@ -65,7 +76,7 @@ var __publicField$d = (obj, key, value) => {
|
|
|
65
76
|
return value;
|
|
66
77
|
};
|
|
67
78
|
const FLOW_GLOBAL = "FDBG";
|
|
68
|
-
const CONSOLE_HIGHLIGHT_STYLE
|
|
79
|
+
const CONSOLE_HIGHLIGHT_STYLE = `
|
|
69
80
|
padding: 2px 4px;
|
|
70
81
|
border-radius: 2px;
|
|
71
82
|
background: #389DFF;
|
|
@@ -164,17 +175,17 @@ class Debugger {
|
|
|
164
175
|
}
|
|
165
176
|
}
|
|
166
177
|
spyListener(event) {
|
|
167
|
-
console.log(`%cspy`, CONSOLE_HIGHLIGHT_STYLE
|
|
178
|
+
console.log(`%cspy`, CONSOLE_HIGHLIGHT_STYLE, event);
|
|
168
179
|
}
|
|
169
180
|
logStateValue(path) {
|
|
170
181
|
const value = toJSHelper(this.context.state.get(path), { recurseEverything: false });
|
|
171
|
-
console.log(`%cwatch%c %s`, CONSOLE_HIGHLIGHT_STYLE
|
|
182
|
+
console.log(`%cwatch%c %s`, CONSOLE_HIGHLIGHT_STYLE, CONSOLE_BOLD_STYLE, path, value);
|
|
172
183
|
}
|
|
173
184
|
}
|
|
174
185
|
function installGlobalDebugger(dbg) {
|
|
175
186
|
console.log(
|
|
176
187
|
`%cFlow.w RDF Debbugger`,
|
|
177
|
-
CONSOLE_HIGHLIGHT_STYLE
|
|
188
|
+
CONSOLE_HIGHLIGHT_STYLE,
|
|
178
189
|
`Enabled for context '${dbg.context.id}' - access using ${FLOW_GLOBAL} in web developer console.`
|
|
179
190
|
);
|
|
180
191
|
const g = typeof global !== "undefined" ? global : window;
|
|
@@ -525,12 +536,10 @@ let globalState = function() {
|
|
|
525
536
|
return new FlowRdfCoreGlobals();
|
|
526
537
|
} else if (global.__flowRdfCoreGlobals) {
|
|
527
538
|
global.__flowRdfCoreInstanceCount += 1;
|
|
528
|
-
if (!global.__mobxGlobals.UNCHANGED) {
|
|
529
|
-
global.__mobxGlobals.UNCHANGED = {};
|
|
530
|
-
}
|
|
531
539
|
return global.__flowRdfCoreGlobals;
|
|
532
540
|
} else {
|
|
533
|
-
global.
|
|
541
|
+
global.__flowRdfCoreInstanceCount = 1;
|
|
542
|
+
announce();
|
|
534
543
|
return global.__flowRdfCoreGlobals = new FlowRdfCoreGlobals();
|
|
535
544
|
}
|
|
536
545
|
}();
|
|
@@ -548,17 +557,6 @@ function getGlobalState() {
|
|
|
548
557
|
return globalState;
|
|
549
558
|
}
|
|
550
559
|
|
|
551
|
-
const version = "0.0.21";
|
|
552
|
-
|
|
553
|
-
const CONSOLE_HIGHLIGHT_STYLE = `
|
|
554
|
-
padding: 2px 4px;
|
|
555
|
-
border-radius: 2px;
|
|
556
|
-
background: #389DFF;
|
|
557
|
-
color: white;`;
|
|
558
|
-
function announce() {
|
|
559
|
-
console.log("%cFlo.w RDF Core v%s", CONSOLE_HIGHLIGHT_STYLE, version);
|
|
560
|
-
}
|
|
561
|
-
|
|
562
560
|
var __defProp$7 = Object.defineProperty;
|
|
563
561
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
564
562
|
var __publicField$7 = (obj, key, value) => {
|
|
@@ -610,7 +608,7 @@ class MapLayerStyleBuilder {
|
|
|
610
608
|
this._styles.set(property, this.formatValue(value));
|
|
611
609
|
}
|
|
612
610
|
formatValue(value) {
|
|
613
|
-
if (value
|
|
611
|
+
if (isStyleExpression(value)) {
|
|
614
612
|
return value.toString();
|
|
615
613
|
} else if (stringUtils.isString(value)) {
|
|
616
614
|
return `'${value.toString()}'`;
|
|
@@ -629,11 +627,15 @@ __publicField$7(MapLayerStyleBuilder, "_styleBuilders", /* @__PURE__ */ new Map(
|
|
|
629
627
|
class StyleExpression {
|
|
630
628
|
constructor(_expr) {
|
|
631
629
|
this._expr = _expr;
|
|
630
|
+
__publicField$7(this, "__styleExpression", "styleexpression");
|
|
632
631
|
}
|
|
633
632
|
toString() {
|
|
634
633
|
return this._expr;
|
|
635
634
|
}
|
|
636
635
|
}
|
|
636
|
+
function isStyleExpression(val) {
|
|
637
|
+
return val && val.__styleExpression;
|
|
638
|
+
}
|
|
637
639
|
function expr(expr2) {
|
|
638
640
|
return new StyleExpression(expr2);
|
|
639
641
|
}
|
|
@@ -2266,12 +2268,12 @@ const _FlowMap = class _FlowMap extends EventEmitter__default {
|
|
|
2266
2268
|
return this._style.styleSpecification;
|
|
2267
2269
|
}
|
|
2268
2270
|
addLayer(layerOrOptions) {
|
|
2269
|
-
const layer = layerOrOptions
|
|
2271
|
+
const layer = stringUtils.isPlainObject(layerOrOptions) ? new mapFeatureStream.MapLayer(layerOrOptions) : layerOrOptions;
|
|
2270
2272
|
this._style.addLayer(layer);
|
|
2271
2273
|
return layer;
|
|
2272
2274
|
}
|
|
2273
2275
|
addSource(sourceOrOptions) {
|
|
2274
|
-
const source = sourceOrOptions
|
|
2276
|
+
const source = stringUtils.isPlainObject(sourceOrOptions) ? new mapFeatureStream.MapDataSource(sourceOrOptions) : sourceOrOptions;
|
|
2275
2277
|
this.emitEvent(new mapFeatureStream.MapSourceEvent("beforeSourceAdded", this, source.id));
|
|
2276
2278
|
source.setFlowEndpoint({
|
|
2277
2279
|
host: this.context.flowClient.baseUrl,
|
|
@@ -3171,7 +3173,6 @@ const globalContextRegistry = getGlobalState().globalContextRegistry;
|
|
|
3171
3173
|
const initializeContext = globalContextRegistry.initializeContext.bind(globalContextRegistry);
|
|
3172
3174
|
const uninitializeContext = globalContextRegistry.uninitializeContext.bind(globalContextRegistry);
|
|
3173
3175
|
const getContext = globalContextRegistry.getContext.bind(globalContextRegistry);
|
|
3174
|
-
announce();
|
|
3175
3176
|
|
|
3176
3177
|
exports.MapDataSource = mapFeatureStream.MapDataSource;
|
|
3177
3178
|
exports.MapLayer = mapFeatureStream.MapLayer;
|
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.
|
|
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.
|
|
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.25dff7db.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.25dff7db.cjs';
|
|
3
3
|
export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
|
|
4
4
|
import '@emuanalytics/flow-engine-client';
|
|
5
|
-
import 'eventemitter3';
|
|
6
5
|
import '@emuanalytics/maplibre-gl';
|
|
6
|
+
import 'eventemitter3';
|
|
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.
|
|
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.
|
|
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.25dff7db.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.25dff7db.mjs';
|
|
3
3
|
export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
|
|
4
4
|
import '@emuanalytics/flow-engine-client';
|
|
5
|
-
import 'eventemitter3';
|
|
6
5
|
import '@emuanalytics/maplibre-gl';
|
|
6
|
+
import 'eventemitter3';
|
|
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.
|
|
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.
|
|
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.25dff7db.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.25dff7db.js';
|
|
3
3
|
export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
|
|
4
4
|
import '@emuanalytics/flow-engine-client';
|
|
5
|
-
import 'eventemitter3';
|
|
6
5
|
import '@emuanalytics/maplibre-gl';
|
|
6
|
+
import 'eventemitter3';
|
|
7
7
|
|
|
8
8
|
interface SyncAnnotation<T = any> extends Annotation {
|
|
9
9
|
serialize(val: T): string;
|
package/dist/index.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import * as mobx from 'mobx';
|
|
|
2
2
|
import { isObservable, isComputed, isObservableArray, isObservableSet, isObservableMap, makeObservable, observable as observable$1, computed as computed$1, action, runInAction, onBecomeObserved, onBecomeUnobserved, reaction, trace, configure } from 'mobx';
|
|
3
3
|
import Debug from 'debug';
|
|
4
4
|
import { Client } from '@emuanalytics/flow-engine-client';
|
|
5
|
-
import { i as isUndefined, f as isString, o as isNumber, s as isBoolean, j as isArray, b as isNil, d as isDefined, g as isStringFull, z as isURL, e as ensureArray } from './shared/flow-rdf-core.b80085b4.mjs';
|
|
6
|
-
import { R as ReactiveExpression, F as FlowError,
|
|
7
|
-
import EventEmitter from 'eventemitter3';
|
|
5
|
+
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';
|
|
6
|
+
import { R as ReactiveExpression, F as FlowError, f as MapStyleChangeEvent, r as randomId, P as PluginManager, e as MapLayer, d as MapDataSource, g as MapSourceEvent, M as MapEvent, c as FlowMapError, b as MapFeatureStream, a as assert, h as MapLoadingEvent, i as MapMouseEvent, j as die } from './shared/flow-rdf-core.9f1d67b5.mjs';
|
|
8
7
|
import maplibre from '@emuanalytics/maplibre-gl';
|
|
8
|
+
import EventEmitter from 'eventemitter3';
|
|
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';
|
|
@@ -13,6 +13,17 @@ import 'parsimmon';
|
|
|
13
13
|
import 'colorbrewer';
|
|
14
14
|
import 'nanoid';
|
|
15
15
|
|
|
16
|
+
const version = "0.0.23";
|
|
17
|
+
|
|
18
|
+
const CONSOLE_HIGHLIGHT_STYLE$1 = `
|
|
19
|
+
padding: 2px 4px;
|
|
20
|
+
border-radius: 2px;
|
|
21
|
+
background: #389DFF;
|
|
22
|
+
color: white;`;
|
|
23
|
+
function announce() {
|
|
24
|
+
console.log("%cFlo.w RDF Core v%s", CONSOLE_HIGHLIGHT_STYLE$1, version);
|
|
25
|
+
}
|
|
26
|
+
|
|
16
27
|
const mockGlobal = {};
|
|
17
28
|
function getGlobal() {
|
|
18
29
|
if (typeof globalThis !== "undefined") {
|
|
@@ -45,7 +56,7 @@ var __publicField$d = (obj, key, value) => {
|
|
|
45
56
|
return value;
|
|
46
57
|
};
|
|
47
58
|
const FLOW_GLOBAL = "FDBG";
|
|
48
|
-
const CONSOLE_HIGHLIGHT_STYLE
|
|
59
|
+
const CONSOLE_HIGHLIGHT_STYLE = `
|
|
49
60
|
padding: 2px 4px;
|
|
50
61
|
border-radius: 2px;
|
|
51
62
|
background: #389DFF;
|
|
@@ -144,17 +155,17 @@ class Debugger {
|
|
|
144
155
|
}
|
|
145
156
|
}
|
|
146
157
|
spyListener(event) {
|
|
147
|
-
console.log(`%cspy`, CONSOLE_HIGHLIGHT_STYLE
|
|
158
|
+
console.log(`%cspy`, CONSOLE_HIGHLIGHT_STYLE, event);
|
|
148
159
|
}
|
|
149
160
|
logStateValue(path) {
|
|
150
161
|
const value = toJSHelper(this.context.state.get(path), { recurseEverything: false });
|
|
151
|
-
console.log(`%cwatch%c %s`, CONSOLE_HIGHLIGHT_STYLE
|
|
162
|
+
console.log(`%cwatch%c %s`, CONSOLE_HIGHLIGHT_STYLE, CONSOLE_BOLD_STYLE, path, value);
|
|
152
163
|
}
|
|
153
164
|
}
|
|
154
165
|
function installGlobalDebugger(dbg) {
|
|
155
166
|
console.log(
|
|
156
167
|
`%cFlow.w RDF Debbugger`,
|
|
157
|
-
CONSOLE_HIGHLIGHT_STYLE
|
|
168
|
+
CONSOLE_HIGHLIGHT_STYLE,
|
|
158
169
|
`Enabled for context '${dbg.context.id}' - access using ${FLOW_GLOBAL} in web developer console.`
|
|
159
170
|
);
|
|
160
171
|
const g = typeof global !== "undefined" ? global : window;
|
|
@@ -505,12 +516,10 @@ let globalState = function() {
|
|
|
505
516
|
return new FlowRdfCoreGlobals();
|
|
506
517
|
} else if (global.__flowRdfCoreGlobals) {
|
|
507
518
|
global.__flowRdfCoreInstanceCount += 1;
|
|
508
|
-
if (!global.__mobxGlobals.UNCHANGED) {
|
|
509
|
-
global.__mobxGlobals.UNCHANGED = {};
|
|
510
|
-
}
|
|
511
519
|
return global.__flowRdfCoreGlobals;
|
|
512
520
|
} else {
|
|
513
|
-
global.
|
|
521
|
+
global.__flowRdfCoreInstanceCount = 1;
|
|
522
|
+
announce();
|
|
514
523
|
return global.__flowRdfCoreGlobals = new FlowRdfCoreGlobals();
|
|
515
524
|
}
|
|
516
525
|
}();
|
|
@@ -528,17 +537,6 @@ function getGlobalState() {
|
|
|
528
537
|
return globalState;
|
|
529
538
|
}
|
|
530
539
|
|
|
531
|
-
const version = "0.0.21";
|
|
532
|
-
|
|
533
|
-
const CONSOLE_HIGHLIGHT_STYLE = `
|
|
534
|
-
padding: 2px 4px;
|
|
535
|
-
border-radius: 2px;
|
|
536
|
-
background: #389DFF;
|
|
537
|
-
color: white;`;
|
|
538
|
-
function announce() {
|
|
539
|
-
console.log("%cFlo.w RDF Core v%s", CONSOLE_HIGHLIGHT_STYLE, version);
|
|
540
|
-
}
|
|
541
|
-
|
|
542
540
|
var __defProp$7 = Object.defineProperty;
|
|
543
541
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
544
542
|
var __publicField$7 = (obj, key, value) => {
|
|
@@ -590,7 +588,7 @@ class MapLayerStyleBuilder {
|
|
|
590
588
|
this._styles.set(property, this.formatValue(value));
|
|
591
589
|
}
|
|
592
590
|
formatValue(value) {
|
|
593
|
-
if (value
|
|
591
|
+
if (isStyleExpression(value)) {
|
|
594
592
|
return value.toString();
|
|
595
593
|
} else if (isString(value)) {
|
|
596
594
|
return `'${value.toString()}'`;
|
|
@@ -609,11 +607,15 @@ __publicField$7(MapLayerStyleBuilder, "_styleBuilders", /* @__PURE__ */ new Map(
|
|
|
609
607
|
class StyleExpression {
|
|
610
608
|
constructor(_expr) {
|
|
611
609
|
this._expr = _expr;
|
|
610
|
+
__publicField$7(this, "__styleExpression", "styleexpression");
|
|
612
611
|
}
|
|
613
612
|
toString() {
|
|
614
613
|
return this._expr;
|
|
615
614
|
}
|
|
616
615
|
}
|
|
616
|
+
function isStyleExpression(val) {
|
|
617
|
+
return val && val.__styleExpression;
|
|
618
|
+
}
|
|
617
619
|
function expr(expr2) {
|
|
618
620
|
return new StyleExpression(expr2);
|
|
619
621
|
}
|
|
@@ -2246,12 +2248,12 @@ const _FlowMap = class _FlowMap extends EventEmitter {
|
|
|
2246
2248
|
return this._style.styleSpecification;
|
|
2247
2249
|
}
|
|
2248
2250
|
addLayer(layerOrOptions) {
|
|
2249
|
-
const layer = layerOrOptions
|
|
2251
|
+
const layer = isPlainObject(layerOrOptions) ? new MapLayer(layerOrOptions) : layerOrOptions;
|
|
2250
2252
|
this._style.addLayer(layer);
|
|
2251
2253
|
return layer;
|
|
2252
2254
|
}
|
|
2253
2255
|
addSource(sourceOrOptions) {
|
|
2254
|
-
const source = sourceOrOptions
|
|
2256
|
+
const source = isPlainObject(sourceOrOptions) ? new MapDataSource(sourceOrOptions) : sourceOrOptions;
|
|
2255
2257
|
this.emitEvent(new MapSourceEvent("beforeSourceAdded", this, source.id));
|
|
2256
2258
|
source.setFlowEndpoint({
|
|
2257
2259
|
host: this.context.flowClient.baseUrl,
|
|
@@ -3151,6 +3153,5 @@ const globalContextRegistry = getGlobalState().globalContextRegistry;
|
|
|
3151
3153
|
const initializeContext = globalContextRegistry.initializeContext.bind(globalContextRegistry);
|
|
3152
3154
|
const uninitializeContext = globalContextRegistry.uninitializeContext.bind(globalContextRegistry);
|
|
3153
3155
|
const getContext = globalContextRegistry.getContext.bind(globalContextRegistry);
|
|
3154
|
-
announce();
|
|
3155
3156
|
|
|
3156
3157
|
export { ContextRegistry, DEFAULT_CONTEXT_ID, FlowContext, FlowMap, FlowRdfCoreGlobals, MapDataSource, MapLayer, MapLayerStyleBuilder, MapStyle, Query, ReactiveExpression, StateStore, StyleExpression, computed, expr, getContext, getGlobalState, initializeContext, isolateGlobalState, layerStyle, observable, query, queryMany, queryOne, serialize, traceReaction, uninitializeContext };
|
|
@@ -162,7 +162,7 @@ class MapPopup extends EventEmitter__default {
|
|
|
162
162
|
if (this._maplibrePopup) {
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
if (eventOrLngLat
|
|
165
|
+
if (!stringUtils.isArray(eventOrLngLat)) {
|
|
166
166
|
if (isFeatureWithId(eventOrLngLat.features[0])) {
|
|
167
167
|
feature = eventOrLngLat.features[0];
|
|
168
168
|
}
|
|
@@ -277,10 +277,10 @@ class PopupPlugin extends MapPluginBase {
|
|
|
277
277
|
popup.once("closed", () => {
|
|
278
278
|
this._popups.delete(popup);
|
|
279
279
|
});
|
|
280
|
-
if (eventOrLngLat
|
|
281
|
-
popup.open(eventOrLngLat);
|
|
282
|
-
} else {
|
|
280
|
+
if (stringUtils.isArray(eventOrLngLat)) {
|
|
283
281
|
popup.open(eventOrLngLat, feature);
|
|
282
|
+
} else {
|
|
283
|
+
popup.open(eventOrLngLat);
|
|
284
284
|
}
|
|
285
285
|
return popup;
|
|
286
286
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { J as MapEvent, y as FlowMap, w as MapSourceIdentifier, K as MapFeatureId, L as MapPluginBase, N as PluginManager, O as MapSourceEvent, T as MapMouseEvent, U as MapFeatureStream, V as PartialBy, r as MapAnimationOptions, W as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.
|
|
2
|
-
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.
|
|
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.25dff7db.cjs';
|
|
2
|
+
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.25dff7db.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.
|
|
2
|
-
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.
|
|
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.25dff7db.mjs';
|
|
2
|
+
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.25dff7db.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.
|
|
2
|
-
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.
|
|
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.25dff7db.js';
|
|
2
|
+
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.25dff7db.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
|
|
2
|
-
export { P as PluginManager } from '../../../shared/flow-rdf-core.
|
|
1
|
+
import { M as MapEvent, a as assert, b as MapFeatureStream, F as FlowError, c as FlowMapError, d as MapDataSource, e as MapLayer, r as randomId, R as ReactiveExpression } from '../../../shared/flow-rdf-core.9f1d67b5.mjs';
|
|
2
|
+
export { P as PluginManager } from '../../../shared/flow-rdf-core.9f1d67b5.mjs';
|
|
3
3
|
import MapboxDraw from '@emuanalytics/mapbox-gl-draw';
|
|
4
4
|
import turfArea from '@turf/area';
|
|
5
5
|
import turfBBox from '@turf/bbox';
|
|
@@ -9,7 +9,7 @@ import turfLength from '@turf/length';
|
|
|
9
9
|
import Debug from 'debug';
|
|
10
10
|
import { c as isPolygon, i as isLineString, b as isPoint } from '../../../shared/flow-rdf-core.bd95d618.mjs';
|
|
11
11
|
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
12
|
-
import { d as isDefined, g as isStringFull, x as isFunction, f as isString, e as ensureArray, o as isNumber, z as isURL, k as isArrayFull, b as isNil, a as isNull, m as isObject } from '../../../shared/flow-rdf-core.b80085b4.mjs';
|
|
12
|
+
import { d as isDefined, j as isArray, g as isStringFull, x as isFunction, f as isString, e as ensureArray, o as isNumber, z as isURL, k as isArrayFull, b as isNil, a as isNull, m as isObject } from '../../../shared/flow-rdf-core.b80085b4.mjs';
|
|
13
13
|
import * as lit from 'lit-html';
|
|
14
14
|
import maplibre from '@emuanalytics/maplibre-gl';
|
|
15
15
|
import turfCircle from '@turf/circle';
|
|
@@ -134,7 +134,7 @@ class MapPopup extends EventEmitter$1 {
|
|
|
134
134
|
if (this._maplibrePopup) {
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
if (eventOrLngLat
|
|
137
|
+
if (!isArray(eventOrLngLat)) {
|
|
138
138
|
if (isFeatureWithId(eventOrLngLat.features[0])) {
|
|
139
139
|
feature = eventOrLngLat.features[0];
|
|
140
140
|
}
|
|
@@ -249,10 +249,10 @@ class PopupPlugin extends MapPluginBase {
|
|
|
249
249
|
popup.once("closed", () => {
|
|
250
250
|
this._popups.delete(popup);
|
|
251
251
|
});
|
|
252
|
-
if (eventOrLngLat
|
|
253
|
-
popup.open(eventOrLngLat);
|
|
254
|
-
} else {
|
|
252
|
+
if (isArray(eventOrLngLat)) {
|
|
255
253
|
popup.open(eventOrLngLat, feature);
|
|
254
|
+
} else {
|
|
255
|
+
popup.open(eventOrLngLat);
|
|
256
256
|
}
|
|
257
257
|
return popup;
|
|
258
258
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from '@emuanalytics/flow-engine-client';
|
|
2
2
|
import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
|
|
3
|
-
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
4
3
|
import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
|
|
4
|
+
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
5
5
|
|
|
6
6
|
type Annotation = {
|
|
7
7
|
annotationType: string;
|
|
@@ -176,6 +176,7 @@ declare class MapLayerStyleBuilder {
|
|
|
176
176
|
}
|
|
177
177
|
declare class StyleExpression {
|
|
178
178
|
private _expr;
|
|
179
|
+
__styleExpression: string;
|
|
179
180
|
constructor(_expr: string);
|
|
180
181
|
toString(): string;
|
|
181
182
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from '@emuanalytics/flow-engine-client';
|
|
2
2
|
import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
|
|
3
|
-
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
4
3
|
import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
|
|
4
|
+
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
5
5
|
|
|
6
6
|
type Annotation = {
|
|
7
7
|
annotationType: string;
|
|
@@ -176,6 +176,7 @@ declare class MapLayerStyleBuilder {
|
|
|
176
176
|
}
|
|
177
177
|
declare class StyleExpression {
|
|
178
178
|
private _expr;
|
|
179
|
+
__styleExpression: string;
|
|
179
180
|
constructor(_expr: string);
|
|
180
181
|
toString(): string;
|
|
181
182
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from '@emuanalytics/flow-engine-client';
|
|
2
2
|
import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
|
|
3
|
-
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
4
3
|
import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
|
|
4
|
+
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
5
5
|
|
|
6
6
|
type Annotation = {
|
|
7
7
|
annotationType: string;
|
|
@@ -176,6 +176,7 @@ declare class MapLayerStyleBuilder {
|
|
|
176
176
|
}
|
|
177
177
|
declare class StyleExpression {
|
|
178
178
|
private _expr;
|
|
179
|
+
__styleExpression: string;
|
|
179
180
|
constructor(_expr: string);
|
|
180
181
|
toString(): string;
|
|
181
182
|
}
|
|
@@ -1352,4 +1352,4 @@ class MapFeatureStream {
|
|
|
1352
1352
|
}
|
|
1353
1353
|
}
|
|
1354
1354
|
|
|
1355
|
-
export { FlowError as F, MapEvent as M, PluginManager as P, ReactiveExpression as R,
|
|
1355
|
+
export { FlowError as F, MapEvent as M, PluginManager as P, ReactiveExpression as R, assert as a, MapFeatureStream as b, FlowMapError as c, MapDataSource as d, MapLayer as e, MapStyleChangeEvent as f, MapSourceEvent as g, MapLoadingEvent as h, MapMouseEvent as i, die as j, randomId as r };
|