@emuanalytics/flow-rdf-core 4.0.3 → 4.0.5

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.
Files changed (89) hide show
  1. package/README.md +1 -64
  2. package/dist/index.d.mts +36 -31
  3. package/dist/index.d.ts +36 -31
  4. package/dist/index.mjs +20 -3249
  5. package/dist/lib/context/context-registry.mjs +63 -0
  6. package/dist/lib/context/debugger.mjs +240 -0
  7. package/dist/lib/context/flow-context.mjs +61 -0
  8. package/dist/lib/context/global-state.mjs +70 -0
  9. package/dist/lib/context/map-registry.mjs +59 -0
  10. package/dist/lib/context/query-registry.mjs +53 -0
  11. package/dist/lib/errors/flow-error.mjs +10 -0
  12. package/dist/lib/errors/flow-expression-error.mjs +14 -0
  13. package/dist/lib/errors/flow-map-error.mjs +9 -0
  14. package/dist/lib/expressions/expression-parser.mjs +198 -0
  15. package/dist/lib/expressions/functions/from-palette.mjs +75 -0
  16. package/dist/lib/expressions/functions/regex.mjs +25 -0
  17. package/dist/lib/expressions/functions/state.mjs +25 -0
  18. package/dist/lib/expressions/parser-helpers.mjs +37 -0
  19. package/dist/lib/expressions/reactive-expression.mjs +253 -0
  20. package/dist/lib/map/flow-core-map.mjs +749 -0
  21. package/dist/lib/map/plugins/annotations/annotation-layers.mjs +163 -0
  22. package/dist/lib/map/plugins/annotations/annotation.events.mjs +27 -0
  23. package/dist/lib/map/plugins/annotations/annotation.plugin.mjs +498 -0
  24. package/dist/lib/map/plugins/annotations/maplibre-gl-draw-circle/lib/modes/DirectModeOverride.mjs +67 -0
  25. package/dist/lib/map/plugins/annotations/maplibre-gl-draw-circle/lib/modes/DragCircleMode.mjs +65 -0
  26. package/dist/lib/map/plugins/annotations/maplibre-gl-draw-circle/lib/utils/create_supplementary_points_circle.mjs +15 -0
  27. package/dist/lib/map/plugins/annotations/maplibre-gl-draw-circle/lib/utils/drag_pan.mjs +20 -0
  28. package/dist/lib/map/plugins/data-join.plugin.mjs +173 -0
  29. package/dist/lib/map/plugins/export/export.plugin.mjs +21 -0
  30. package/dist/lib/map/plugins/export/map-exporter.mjs +177 -0
  31. package/dist/lib/map/plugins/hover-effect.plugin.mjs +58 -0
  32. package/dist/lib/map/plugins/index.d.mts +37 -72
  33. package/dist/lib/map/plugins/index.d.ts +37 -72
  34. package/dist/lib/map/plugins/index.mjs +11 -1811
  35. package/dist/lib/map/plugins/keyboard-shortcut-manager.mjs +120 -0
  36. package/dist/lib/map/plugins/map-plugin-base.mjs +25 -0
  37. package/dist/lib/map/plugins/plugin-manager.mjs +135 -0
  38. package/dist/lib/map/plugins/popup.plugin.mjs +55 -0
  39. package/dist/lib/map/plugins/selection/selection.events.mjs +21 -0
  40. package/dist/lib/map/plugins/selection/selection.plugin.mjs +136 -0
  41. package/dist/lib/map/plugins/selection/source-selection.mjs +156 -0
  42. package/dist/lib/map/plugins/url-sync.plugin.mjs +55 -0
  43. package/dist/lib/map/support/image-registry.mjs +82 -0
  44. package/dist/lib/map/support/map-events.mjs +71 -0
  45. package/dist/lib/map/support/map-feature-stream.mjs +158 -0
  46. package/dist/lib/map/support/map-popup.mjs +159 -0
  47. package/dist/lib/map/types.mjs +7 -0
  48. package/dist/lib/map-style/map-data-source.mjs +192 -0
  49. package/dist/lib/map-style/map-layer-style-builder-generated.mjs +1307 -0
  50. package/dist/lib/map-style/map-layer-style-builder.mjs +86 -0
  51. package/dist/lib/map-style/map-layer.mjs +223 -0
  52. package/dist/lib/map-style/map-style.mjs +178 -0
  53. package/dist/lib/queries/async-committer.mjs +30 -0
  54. package/dist/lib/queries/query.mjs +172 -0
  55. package/dist/lib/state-store/decorators.mjs +83 -0
  56. package/dist/lib/state-store/state-store.mjs +534 -0
  57. package/dist/lib/state-store/utils.mjs +7 -0
  58. package/dist/lib/utils/announce.mjs +12 -0
  59. package/dist/lib/utils/assert.mjs +12 -0
  60. package/dist/{shared/flow-rdf-core.187cb345.mjs → lib/utils/debounce.mjs} +3 -39
  61. package/dist/lib/utils/decorators.mjs +59 -0
  62. package/dist/lib/utils/deferred.mjs +11 -0
  63. package/dist/lib/utils/ensure-array.mjs +16 -0
  64. package/dist/{shared/flow-rdf-core.1f0901c5.mjs → lib/utils/feature-type-checks.mjs} +2 -2
  65. package/dist/lib/utils/functional.mjs +22 -0
  66. package/dist/lib/utils/global.mjs +18 -0
  67. package/dist/lib/utils/index.mjs +8 -5
  68. package/dist/lib/utils/random-id.mjs +9 -0
  69. package/dist/lib/utils/string-utils.mjs +3 -0
  70. package/dist/lib/utils/throttle.mjs +20 -0
  71. package/dist/{shared/flow-rdf-core.25e5f6d7.mjs → lib/utils/type-checks.mjs} +1 -26
  72. package/dist/lib/utils/watchable-promise.mjs +55 -0
  73. package/dist/package.json.mjs +3 -0
  74. package/dist/shared/{flow-rdf-core.4dde996e.d.cts → flow-rdf-core.8b5acf14.d.mts} +1315 -172
  75. package/dist/shared/{flow-rdf-core.4dde996e.d.ts → flow-rdf-core.8b5acf14.d.ts} +1315 -172
  76. package/package.json +4 -8
  77. package/dist/index.cjs +0 -3316
  78. package/dist/index.d.cts +0 -90
  79. package/dist/lib/map/plugins/index.cjs +0 -1851
  80. package/dist/lib/map/plugins/index.d.cts +0 -345
  81. package/dist/lib/utils/index.cjs +0 -48
  82. package/dist/lib/utils/index.d.cts +0 -160
  83. package/dist/shared/flow-rdf-core.06e85a6c.cjs +0 -1394
  84. package/dist/shared/flow-rdf-core.4dde996e.d.mts +0 -1916
  85. package/dist/shared/flow-rdf-core.55c169ca.cjs +0 -150
  86. package/dist/shared/flow-rdf-core.63162669.d.cts +0 -10
  87. package/dist/shared/flow-rdf-core.65045caf.mjs +0 -1360
  88. package/dist/shared/flow-rdf-core.a82b9be4.cjs +0 -34
  89. package/dist/shared/flow-rdf-core.f50908f0.cjs +0 -102
package/README.md CHANGED
@@ -1,64 +1 @@
1
- # packageName
2
-
3
- [![npm version][npm-version-src]][npm-version-href]
4
- [![npm downloads][npm-downloads-src]][npm-downloads-href]
5
- [![bundle][bundle-src]][bundle-href]
6
- [![Codecov][codecov-src]][codecov-href]
7
- [![License][license-src]][license-href]
8
- [![JSDocs][jsdocs-src]][jsdocs-href]
9
-
10
- This is my package description.
11
-
12
- ## Usage
13
-
14
- Install package:
15
-
16
- ```sh
17
- # npm
18
- npm install packageName
19
-
20
- # yarn
21
- yarn add packageName
22
-
23
- # pnpm
24
- pnpm install packageName
25
- ```
26
-
27
- Import:
28
-
29
- ```js
30
- // ESM
31
- import {} from "packageName";
32
-
33
- // CommonJS
34
- const {} = require("packageName");
35
- ```
36
-
37
- ## Development
38
-
39
- - Clone this repository
40
- - Install latest LTS version of [Node.js](https://nodejs.org/en/)
41
- - Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
42
- - Install dependencies using `pnpm install`
43
- - Run interactive tests using `pnpm dev`
44
-
45
- ## License
46
-
47
- Made with 💛
48
-
49
- Published under [MIT License](./LICENSE).
50
-
51
- <!-- Badges -->
52
-
53
- [npm-version-src]: https://img.shields.io/npm/v/packageName?style=flat&colorA=18181B&colorB=F0DB4F
54
- [npm-version-href]: https://npmjs.com/package/packageName
55
- [npm-downloads-src]: https://img.shields.io/npm/dm/packageName?style=flat&colorA=18181B&colorB=F0DB4F
56
- [npm-downloads-href]: https://npmjs.com/package/packageName
57
- [codecov-src]: https://img.shields.io/codecov/c/gh/unjs/packageName/main?style=flat&colorA=18181B&colorB=F0DB4F
58
- [codecov-href]: https://codecov.io/gh/unjs/packageName
59
- [bundle-src]: https://img.shields.io/bundlephobia/minzip/packageName?style=flat&colorA=18181B&colorB=F0DB4F
60
- [bundle-href]: https://bundlephobia.com/result?p=packageName
61
- [license-src]: https://img.shields.io/github/license/unjs/packageName.svg?style=flat&colorA=18181B&colorB=F0DB4F
62
- [license-href]: https://github.com/unjs/packageName/blob/main/LICENSE
63
- [jsdocs-src]: https://img.shields.io/badge/jsDocs.io-reference-18181B?style=flat&colorA=18181B&colorB=F0DB4F
64
- [jsdocs-href]: https://www.jsdocs.io/package/packageName
1
+ # Flo.w RDF Core
package/dist/index.d.mts CHANGED
@@ -1,14 +1,17 @@
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.4dde996e.mjs';
2
- export { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, i as FillExtrusionLayerStyleBuilder, g as FillLayerStyleBuilder, K as FlowCoreMap, e as FlowEngineEndpoint, H as HeatmapLayerStyleBuilder, k as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, x as MapAnimationOptions, y as MapCenterOptions, u as MapDataSourceOptions, v as MapDataSourceSpecification, t as MapDataSourceType, z as MapFeature, E as MapFeatureIdentifier, w as MapGeojsonData, q as MapLayerExpression, p as MapLayerOptions, s as MapLayerPropertyMetadataIndex, r as MapLayerSpecification, m as MapLayerStyleBuilder, f as MapLayerType, J as MapOptions, G as MapPaddingOptions, d as MapRegistry, I as MapSourceIdentifier, a3 as Path, a4 as PathValue, N as Query, V as QueryAttribute, _ as QueryDefinition, a0 as QueryDefinitionFn, X as QueryExtraParams, $ as QueryOptions, Y as QueryOrderClause, Q as QueryRegistry, U as QueryResultFormat, a1 as QueryResultTransformFn, Z as QuerySampleOptions, W as QueryWhereClauses, j as RasterLayerStyleBuilder, R as ReactiveExpression, a7 as SerializationFormat, a6 as StoreAnnotations, a5 as StoreConstructor, n as StyleExpression, h as SymbolLayerStyleBuilder, o as expr, l as layerStyle, O as query, P as queryMany, T as queryOne, a2 as traceReaction } from './shared/flow-rdf-core.4dde996e.mjs';
1
+ import { A as Annotation, M as MapStyleSpecification, S as StateStore, a as MapDataSource, b as MapLayer, F as FlowContextOptions, c as FlowContext } from './shared/flow-rdf-core.8b5acf14.mjs';
2
+ export { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, _ as FeatureStreamOptions, s as FillExtrusionLayerStyleBuilder, q as FillLayerStyleBuilder, d as FlowCoreError, h as FlowCoreExpressionCustomFunction, i as FlowCoreExpressionCustomFunctionSignature, j as FlowCoreExpressionCustomFunctions, e as FlowCoreExpressionError, a0 as FlowCoreMap, o as FlowEngineEndpoint, f as FlowMapError, H as HeatmapLayerStyleBuilder, u as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, T as MapAnimationOptions, U as MapCenterOptions, K as MapDataSourceOptions, N as MapDataSourceSpecification, J as MapDataSourceType, a3 as MapEvent, a2 as MapEventType, a1 as MapEventTypes, V as MapFeature, W as MapFeatureIdentifier, Z as MapFeatureStream, O as MapGeojsonData, E as MapLayerExpression, z as MapLayerOptions, I as MapLayerPropertyMetadataIndex, G as MapLayerSpecification, w as MapLayerStyleBuilder, p as MapLayerType, a6 as MapLoadingEvent, a4 as MapMouseEvent, $ as MapOptions, X as MapPaddingOptions, aa as MapPopup, a9 as MapPopupOptions, a8 as MapPopupTemplateFn, g as MapRegistry, a5 as MapSourceEvent, Y as MapSourceIdentifier, a7 as MapStyleChangeEvent, P as ParserExpression, k as ParserExpressionWithIndex, l as ParserFunctionExpression, m as ParserIndex, n as ParserProgram, aq as Path, ar as PathValue, ab as Query, ag as QueryAttribute, al as QueryDefinition, an as QueryDefinitionFn, ai as QueryExtraParams, am as QueryOptions, aj as QueryOrderClause, Q as QueryRegistry, af as QueryResultFormat, ao as QueryResultTransformFn, ak as QuerySampleOptions, ah as QueryWhereClauses, t as RasterLayerStyleBuilder, R as ReactiveExpression, au as SerializationFormat, at as StoreAnnotations, as as StoreConstructor, x as StyleExpression, r as SymbolLayerStyleBuilder, y as expr, v as layerStyle, ac as query, ad as queryMany, ae as queryOne, ap as traceReaction } from './shared/flow-rdf-core.8b5acf14.mjs';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
4
  export { makeAutoObservable, makeObservable } from 'mobx';
5
+ import 'eventemitter3';
6
+ import 'lit-html';
5
7
  import '@emuanalytics/flow-engine-client';
6
8
  import '@emuanalytics/maplibre-gl';
7
- import 'eventemitter3';
8
9
 
9
10
  interface SyncAnnotation<T = any> extends Annotation {
10
- serialize(val: T): string;
11
+ serialize(val: T, group?: string): string;
11
12
  deserialize(val: string, target?: T): T;
13
+ type: string;
14
+ arg?: string | string[];
12
15
  }
13
16
  declare const serialize: PropertyDecorator & SyncAnnotation<any> & {
14
17
  raw: PropertyDecorator & SyncAnnotation<any>;
@@ -16,6 +19,7 @@ declare const serialize: PropertyDecorator & SyncAnnotation<any> & {
16
19
  number: PropertyDecorator & SyncAnnotation<number>;
17
20
  json: PropertyDecorator & SyncAnnotation<Record<string, boolean>>;
18
21
  state: PropertyDecorator & SyncAnnotation<any>;
22
+ for: (arg: string | string[] | undefined) => PropertyDecorator & SyncAnnotation<any>;
19
23
  };
20
24
  interface ReactiveAnnotation extends Annotation {
21
25
  mobxAnnotation: any;
@@ -29,6 +33,33 @@ declare const observable: PropertyDecorator & ReactiveAnnotation & {
29
33
  declare const computed: PropertyDecorator & ReactiveAnnotation & {
30
34
  struct: PropertyDecorator & ReactiveAnnotation;
31
35
  };
36
+ declare const action: PropertyDecorator & ReactiveAnnotation;
37
+
38
+ interface MapStyleOptions {
39
+ id: string;
40
+ }
41
+ declare class MapStyle {
42
+ private static _defaultBaseStyle;
43
+ private _state;
44
+ private _baseStyle;
45
+ private _sources;
46
+ private _layers;
47
+ private _layerOrder;
48
+ get styleSpecification(): MapStyleSpecification;
49
+ get formattedName(): string;
50
+ constructor();
51
+ bindState(state: StateStore): this;
52
+ setBaseStyle(style?: MapStyleSpecification): this;
53
+ addSource(source: MapDataSource): this;
54
+ removeSource(id: string, removeLayers?: boolean): this;
55
+ getSource(id: string): MapDataSource;
56
+ getSources(filter?: (source: MapDataSource) => boolean): MapDataSource[];
57
+ addLayer(layer: MapLayer): this;
58
+ removeLayer(id: string): this;
59
+ getLayer(id: string): MapLayer;
60
+ getLayers(filter?: (layer: MapLayer) => boolean): MapLayer[];
61
+ private layerInsertionPoint;
62
+ }
32
63
 
33
64
  declare class ContextRegistry {
34
65
  private static _defaultOptions;
@@ -57,34 +88,8 @@ declare class FlowRdfCoreGlobals {
57
88
  declare function isolateGlobalState(): void;
58
89
  declare function getGlobalState(): FlowRdfCoreGlobals;
59
90
 
60
- interface MapStyleOptions {
61
- id: string;
62
- }
63
- declare class MapStyle {
64
- private static _defaultBaseStyle;
65
- private _state;
66
- private _baseStyle;
67
- private _sources;
68
- private _layers;
69
- private _layerOrder;
70
- get styleSpecification(): MapStyleSpecification;
71
- get formattedName(): string;
72
- constructor();
73
- bindState(state: StateStore): this;
74
- setBaseStyle(style?: MapStyleSpecification): this;
75
- addSource(source: MapDataSource): this;
76
- removeSource(id: string, removeLayers?: boolean): this;
77
- getSource(id: string): MapDataSource;
78
- getSources(filter?: (source: MapDataSource) => boolean): MapDataSource[];
79
- addLayer(layer: MapLayer): this;
80
- removeLayer(id: string): this;
81
- getLayer(id: string): MapLayer;
82
- getLayers(filter?: (layer: MapLayer) => boolean): MapLayer[];
83
- private layerInsertionPoint;
84
- }
85
-
86
91
  declare const initializeContext: <TState extends StateStore = StateStore>(options: FlowContextOptions<TState>) => FlowContext<TState>;
87
92
  declare const uninitializeContext: (contextId?: string) => void;
88
93
  declare const getContext: <TState extends StateStore = StateStore>(id?: string) => Promise<FlowContext<TState>>;
89
94
 
90
- export { ContextRegistry, FlowContext, FlowContextOptions, FlowRdfCoreGlobals, MapDataSource, MapLayer, MapStyle, type MapStyleOptions, MapStyleSpecification, StateStore, computed, getContext, getGlobalState, initializeContext, isolateGlobalState, observable, serialize, uninitializeContext };
95
+ export { ContextRegistry, FlowContext, FlowContextOptions, FlowRdfCoreGlobals, MapDataSource, MapLayer, MapStyle, type MapStyleOptions, MapStyleSpecification, StateStore, action, computed, getContext, getGlobalState, initializeContext, isolateGlobalState, observable, serialize, uninitializeContext };
package/dist/index.d.ts CHANGED
@@ -1,14 +1,17 @@
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.4dde996e.js';
2
- export { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, i as FillExtrusionLayerStyleBuilder, g as FillLayerStyleBuilder, K as FlowCoreMap, e as FlowEngineEndpoint, H as HeatmapLayerStyleBuilder, k as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, x as MapAnimationOptions, y as MapCenterOptions, u as MapDataSourceOptions, v as MapDataSourceSpecification, t as MapDataSourceType, z as MapFeature, E as MapFeatureIdentifier, w as MapGeojsonData, q as MapLayerExpression, p as MapLayerOptions, s as MapLayerPropertyMetadataIndex, r as MapLayerSpecification, m as MapLayerStyleBuilder, f as MapLayerType, J as MapOptions, G as MapPaddingOptions, d as MapRegistry, I as MapSourceIdentifier, a3 as Path, a4 as PathValue, N as Query, V as QueryAttribute, _ as QueryDefinition, a0 as QueryDefinitionFn, X as QueryExtraParams, $ as QueryOptions, Y as QueryOrderClause, Q as QueryRegistry, U as QueryResultFormat, a1 as QueryResultTransformFn, Z as QuerySampleOptions, W as QueryWhereClauses, j as RasterLayerStyleBuilder, R as ReactiveExpression, a7 as SerializationFormat, a6 as StoreAnnotations, a5 as StoreConstructor, n as StyleExpression, h as SymbolLayerStyleBuilder, o as expr, l as layerStyle, O as query, P as queryMany, T as queryOne, a2 as traceReaction } from './shared/flow-rdf-core.4dde996e.js';
1
+ import { A as Annotation, M as MapStyleSpecification, S as StateStore, a as MapDataSource, b as MapLayer, F as FlowContextOptions, c as FlowContext } from './shared/flow-rdf-core.8b5acf14.js';
2
+ export { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, _ as FeatureStreamOptions, s as FillExtrusionLayerStyleBuilder, q as FillLayerStyleBuilder, d as FlowCoreError, h as FlowCoreExpressionCustomFunction, i as FlowCoreExpressionCustomFunctionSignature, j as FlowCoreExpressionCustomFunctions, e as FlowCoreExpressionError, a0 as FlowCoreMap, o as FlowEngineEndpoint, f as FlowMapError, H as HeatmapLayerStyleBuilder, u as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, T as MapAnimationOptions, U as MapCenterOptions, K as MapDataSourceOptions, N as MapDataSourceSpecification, J as MapDataSourceType, a3 as MapEvent, a2 as MapEventType, a1 as MapEventTypes, V as MapFeature, W as MapFeatureIdentifier, Z as MapFeatureStream, O as MapGeojsonData, E as MapLayerExpression, z as MapLayerOptions, I as MapLayerPropertyMetadataIndex, G as MapLayerSpecification, w as MapLayerStyleBuilder, p as MapLayerType, a6 as MapLoadingEvent, a4 as MapMouseEvent, $ as MapOptions, X as MapPaddingOptions, aa as MapPopup, a9 as MapPopupOptions, a8 as MapPopupTemplateFn, g as MapRegistry, a5 as MapSourceEvent, Y as MapSourceIdentifier, a7 as MapStyleChangeEvent, P as ParserExpression, k as ParserExpressionWithIndex, l as ParserFunctionExpression, m as ParserIndex, n as ParserProgram, aq as Path, ar as PathValue, ab as Query, ag as QueryAttribute, al as QueryDefinition, an as QueryDefinitionFn, ai as QueryExtraParams, am as QueryOptions, aj as QueryOrderClause, Q as QueryRegistry, af as QueryResultFormat, ao as QueryResultTransformFn, ak as QuerySampleOptions, ah as QueryWhereClauses, t as RasterLayerStyleBuilder, R as ReactiveExpression, au as SerializationFormat, at as StoreAnnotations, as as StoreConstructor, x as StyleExpression, r as SymbolLayerStyleBuilder, y as expr, v as layerStyle, ac as query, ad as queryMany, ae as queryOne, ap as traceReaction } from './shared/flow-rdf-core.8b5acf14.js';
3
3
  export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
4
4
  export { makeAutoObservable, makeObservable } from 'mobx';
5
+ import 'eventemitter3';
6
+ import 'lit-html';
5
7
  import '@emuanalytics/flow-engine-client';
6
8
  import '@emuanalytics/maplibre-gl';
7
- import 'eventemitter3';
8
9
 
9
10
  interface SyncAnnotation<T = any> extends Annotation {
10
- serialize(val: T): string;
11
+ serialize(val: T, group?: string): string;
11
12
  deserialize(val: string, target?: T): T;
13
+ type: string;
14
+ arg?: string | string[];
12
15
  }
13
16
  declare const serialize: PropertyDecorator & SyncAnnotation<any> & {
14
17
  raw: PropertyDecorator & SyncAnnotation<any>;
@@ -16,6 +19,7 @@ declare const serialize: PropertyDecorator & SyncAnnotation<any> & {
16
19
  number: PropertyDecorator & SyncAnnotation<number>;
17
20
  json: PropertyDecorator & SyncAnnotation<Record<string, boolean>>;
18
21
  state: PropertyDecorator & SyncAnnotation<any>;
22
+ for: (arg: string | string[] | undefined) => PropertyDecorator & SyncAnnotation<any>;
19
23
  };
20
24
  interface ReactiveAnnotation extends Annotation {
21
25
  mobxAnnotation: any;
@@ -29,6 +33,33 @@ declare const observable: PropertyDecorator & ReactiveAnnotation & {
29
33
  declare const computed: PropertyDecorator & ReactiveAnnotation & {
30
34
  struct: PropertyDecorator & ReactiveAnnotation;
31
35
  };
36
+ declare const action: PropertyDecorator & ReactiveAnnotation;
37
+
38
+ interface MapStyleOptions {
39
+ id: string;
40
+ }
41
+ declare class MapStyle {
42
+ private static _defaultBaseStyle;
43
+ private _state;
44
+ private _baseStyle;
45
+ private _sources;
46
+ private _layers;
47
+ private _layerOrder;
48
+ get styleSpecification(): MapStyleSpecification;
49
+ get formattedName(): string;
50
+ constructor();
51
+ bindState(state: StateStore): this;
52
+ setBaseStyle(style?: MapStyleSpecification): this;
53
+ addSource(source: MapDataSource): this;
54
+ removeSource(id: string, removeLayers?: boolean): this;
55
+ getSource(id: string): MapDataSource;
56
+ getSources(filter?: (source: MapDataSource) => boolean): MapDataSource[];
57
+ addLayer(layer: MapLayer): this;
58
+ removeLayer(id: string): this;
59
+ getLayer(id: string): MapLayer;
60
+ getLayers(filter?: (layer: MapLayer) => boolean): MapLayer[];
61
+ private layerInsertionPoint;
62
+ }
32
63
 
33
64
  declare class ContextRegistry {
34
65
  private static _defaultOptions;
@@ -57,34 +88,8 @@ declare class FlowRdfCoreGlobals {
57
88
  declare function isolateGlobalState(): void;
58
89
  declare function getGlobalState(): FlowRdfCoreGlobals;
59
90
 
60
- interface MapStyleOptions {
61
- id: string;
62
- }
63
- declare class MapStyle {
64
- private static _defaultBaseStyle;
65
- private _state;
66
- private _baseStyle;
67
- private _sources;
68
- private _layers;
69
- private _layerOrder;
70
- get styleSpecification(): MapStyleSpecification;
71
- get formattedName(): string;
72
- constructor();
73
- bindState(state: StateStore): this;
74
- setBaseStyle(style?: MapStyleSpecification): this;
75
- addSource(source: MapDataSource): this;
76
- removeSource(id: string, removeLayers?: boolean): this;
77
- getSource(id: string): MapDataSource;
78
- getSources(filter?: (source: MapDataSource) => boolean): MapDataSource[];
79
- addLayer(layer: MapLayer): this;
80
- removeLayer(id: string): this;
81
- getLayer(id: string): MapLayer;
82
- getLayers(filter?: (layer: MapLayer) => boolean): MapLayer[];
83
- private layerInsertionPoint;
84
- }
85
-
86
91
  declare const initializeContext: <TState extends StateStore = StateStore>(options: FlowContextOptions<TState>) => FlowContext<TState>;
87
92
  declare const uninitializeContext: (contextId?: string) => void;
88
93
  declare const getContext: <TState extends StateStore = StateStore>(id?: string) => Promise<FlowContext<TState>>;
89
94
 
90
- export { ContextRegistry, FlowContext, FlowContextOptions, FlowRdfCoreGlobals, MapDataSource, MapLayer, MapStyle, type MapStyleOptions, MapStyleSpecification, StateStore, computed, getContext, getGlobalState, initializeContext, isolateGlobalState, observable, serialize, uninitializeContext };
95
+ export { ContextRegistry, FlowContext, FlowContextOptions, FlowRdfCoreGlobals, MapDataSource, MapLayer, MapStyle, type MapStyleOptions, MapStyleSpecification, StateStore, action, computed, getContext, getGlobalState, initializeContext, isolateGlobalState, observable, serialize, uninitializeContext };