@honua/app-platform 0.1.9-beta.0 → 0.1.11-beta.0
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/control-plane/admin-client.d.ts +2 -0
- package/control-plane/admin-client.d.ts.map +1 -1
- package/control-plane/admin-client.js +32 -1
- package/control-plane/client.d.ts +1 -1
- package/control-plane/client.d.ts.map +1 -1
- package/control-plane/client.js +124 -8
- package/control-plane/commands/catalog.d.ts +7 -7
- package/control-plane/commands/catalog.d.ts.map +1 -1
- package/control-plane/commands/catalog.js +27 -15
- package/control-plane/commands/runtime.d.ts +6 -6
- package/control-plane/commands/runtime.d.ts.map +1 -1
- package/control-plane/commands/runtime.js +26 -14
- package/control-plane/commands/types.d.ts +4 -2
- package/control-plane/commands/types.d.ts.map +1 -1
- package/control-plane/generated/admin-api.d.ts +6 -4
- package/control-plane/generated/admin-api.d.ts.map +1 -1
- package/control-plane/generated/admin-api.js +2 -2
- package/control-plane/generated/admin-operations.d.ts +7 -7
- package/control-plane/generated/admin-operations.d.ts.map +1 -1
- package/control-plane/generated/admin-operations.js +9 -9
- package/control-plane/index.d.ts +1 -1
- package/control-plane/index.d.ts.map +1 -1
- package/control-plane/index.js +1 -1
- package/controls/qualification.d.ts.map +1 -1
- package/controls/qualification.js +10 -6
- package/core/client.d.ts.map +1 -1
- package/core/client.js +28 -30
- package/core/error-envelope.d.ts +31 -0
- package/core/error-envelope.d.ts.map +1 -1
- package/core/error-envelope.js +11 -0
- package/core/errors.d.ts +15 -3
- package/core/errors.d.ts.map +1 -1
- package/core/errors.js +254 -2
- package/core/geometry-input-sr.d.ts +3 -0
- package/core/geometry-input-sr.d.ts.map +1 -0
- package/core/geometry-input-sr.js +28 -0
- package/core/geoservices.d.ts.map +1 -1
- package/core/geoservices.js +33 -6
- package/core/grpc-adapter.d.ts.map +1 -1
- package/core/grpc-adapter.js +11 -3
- package/core/pbf-decoder.d.ts.map +1 -1
- package/core/pbf-decoder.js +16 -4
- package/core/protocol-transport.d.ts +6 -1
- package/core/protocol-transport.d.ts.map +1 -1
- package/core/request-pipeline.d.ts +6 -3
- package/core/request-pipeline.d.ts.map +1 -1
- package/core/request-pipeline.js +28 -11
- package/core/spatial-filter.d.ts +4 -4
- package/core/spatial-filter.d.ts.map +1 -1
- package/core/spatial-filter.js +7 -7
- package/core/types.d.ts +14 -3
- package/core/types.d.ts.map +1 -1
- package/custom-elements.json +341 -0
- package/esri-compat/class-breaks-renderer.d.ts +2 -0
- package/esri-compat/class-breaks-renderer.d.ts.map +1 -1
- package/esri-compat/class-breaks-renderer.js +7 -0
- package/esri-compat/controls.d.ts +10 -1
- package/esri-compat/controls.d.ts.map +1 -1
- package/esri-compat/controls.js +86 -2
- package/esri-compat/directions.d.ts +35 -0
- package/esri-compat/directions.d.ts.map +1 -1
- package/esri-compat/directions.js +153 -2
- package/esri-compat/expand.d.ts +1 -0
- package/esri-compat/expand.d.ts.map +1 -1
- package/esri-compat/expand.js +61 -0
- package/esri-compat/feature-layer.d.ts +29 -4
- package/esri-compat/feature-layer.d.ts.map +1 -1
- package/esri-compat/feature-layer.js +335 -13
- package/esri-compat/geometry-engine.d.ts +4 -0
- package/esri-compat/geometry-engine.d.ts.map +1 -1
- package/esri-compat/geometry-engine.js +8 -1
- package/esri-compat/graphic.d.ts +7 -4
- package/esri-compat/graphic.d.ts.map +1 -1
- package/esri-compat/legend.d.ts +2 -1
- package/esri-compat/legend.d.ts.map +1 -1
- package/esri-compat/legend.js +15 -0
- package/esri-compat/map-view-mount.d.ts +48 -0
- package/esri-compat/map-view-mount.d.ts.map +1 -0
- package/esri-compat/map-view-mount.js +344 -0
- package/esri-compat/map-view.d.ts +38 -6
- package/esri-compat/map-view.d.ts.map +1 -1
- package/esri-compat/map-view.js +471 -33
- package/esri-compat/portal.d.ts +2 -0
- package/esri-compat/portal.d.ts.map +1 -1
- package/esri-compat/portal.js +7 -2
- package/esri-compat/renderer-objects.d.ts +7 -2
- package/esri-compat/renderer-objects.d.ts.map +1 -1
- package/esri-compat/renderer-objects.js +16 -5
- package/esri-compat/route-layer.d.ts +8 -0
- package/esri-compat/route-layer.d.ts.map +1 -1
- package/esri-compat/route-layer.js +24 -4
- package/esri-compat/route-task.d.ts +5 -1
- package/esri-compat/route-task.d.ts.map +1 -1
- package/esri-compat/route-task.js +119 -7
- package/esri-compat/scene-view.d.ts.map +1 -1
- package/esri-compat/scene-view.js +1 -0
- package/esri-compat/search.d.ts +2 -1
- package/esri-compat/search.d.ts.map +1 -1
- package/esri-compat/search.js +52 -2
- package/esri-compat/unique-value-renderer.d.ts +2 -0
- package/esri-compat/unique-value-renderer.d.ts.map +1 -1
- package/esri-compat/unique-value-renderer.js +7 -0
- package/esri-compat/web-map.d.ts +10 -0
- package/esri-compat/web-map.d.ts.map +1 -1
- package/esri-compat/web-map.js +102 -0
- package/geocoding/index.d.ts +1 -0
- package/geocoding/index.d.ts.map +1 -1
- package/geocoding/index.js +18 -8
- package/geocoding/provider-http.d.ts.map +1 -1
- package/geocoding/provider-http.js +3 -1
- package/map/webmap-maplibre.d.ts +2 -1
- package/map/webmap-maplibre.d.ts.map +1 -1
- package/map/webmap-maplibre.js +3 -0
- package/package.json +6 -4
- package/query-planner/geoservices.d.ts.map +1 -1
- package/query-planner/geoservices.js +2 -0
- package/query-planner/types.d.ts +2 -0
- package/query-planner/types.d.ts.map +1 -1
- package/realtime/honua-server.d.ts +4 -0
- package/realtime/honua-server.d.ts.map +1 -1
- package/realtime/honua-server.js +10 -0
- package/realtime/resumable.js +9 -0
- package/realtime/types.d.ts +8 -0
- package/realtime/types.d.ts.map +1 -1
- package/scene-workspace/index.d.ts +2 -2
- package/scene-workspace/index.d.ts.map +1 -1
- package/scene-workspace/index.js +1 -1
- package/scene-workspace/maplibre-state-sync.d.ts.map +1 -1
- package/scene-workspace/maplibre-state-sync.js +35 -3
- package/scene-workspace/primitives.d.ts +37 -5
- package/scene-workspace/primitives.d.ts.map +1 -1
- package/scene-workspace/primitives.js +46 -12
- package/scene-workspace/state-sync-port-kit.d.ts +1 -1
- package/scene-workspace/state-sync-port-kit.d.ts.map +1 -1
- package/studio/capability-manifest.d.ts +10 -0
- package/studio/capability-manifest.d.ts.map +1 -1
- package/studio/capability-manifest.js +38 -0
- package/studio/command-adapter.d.ts +35 -0
- package/studio/command-adapter.d.ts.map +1 -0
- package/studio/command-adapter.js +36 -0
- package/studio/generated/studio-api.d.ts +1062 -0
- package/studio/generated/studio-api.d.ts.map +1 -0
- package/studio/generated/studio-api.js +4 -0
- package/studio/index.d.ts +8 -6
- package/studio/index.d.ts.map +1 -1
- package/studio/index.js +6 -5
- package/studio/lifecycle-client.d.ts +3 -3
- package/studio/lifecycle-client.d.ts.map +1 -1
- package/studio/lifecycle-client.js +41 -22
- package/studio/lifecycle-types.d.ts +56 -77
- package/studio/lifecycle-types.d.ts.map +1 -1
- package/studio/lifecycle-types.js +5 -12
- package/studio/types.d.ts +37 -7
- package/studio/types.d.ts.map +1 -1
- package/studio/types.js +5 -3
- package/studio/validate.d.ts.map +1 -1
- package/studio/validate.js +104 -7
- package/style/renderers.d.ts +6 -1
- package/style/renderers.d.ts.map +1 -1
- package/style/renderers.js +11 -6
- package/style/visual-variables.d.ts +43 -0
- package/style/visual-variables.d.ts.map +1 -0
- package/style/visual-variables.js +183 -0
- package/web-components/index.d.ts +2 -1
- package/web-components/index.d.ts.map +1 -1
- package/web-components/index.js +1 -0
- package/web-components/map-pointer-claim.d.ts +24 -0
- package/web-components/map-pointer-claim.d.ts.map +1 -0
- package/web-components/map-pointer-claim.js +40 -0
- package/web-components/maplibre-renderer.d.ts.map +1 -1
- package/web-components/maplibre-renderer.js +5 -1
- package/web-components/measurement-units.d.ts +88 -0
- package/web-components/measurement-units.d.ts.map +1 -0
- package/web-components/measurement-units.js +278 -0
- package/web-components/measurement.d.ts +75 -4
- package/web-components/measurement.d.ts.map +1 -1
- package/web-components/measurement.js +227 -28
- package/web-components/types.d.ts +58 -3
- package/web-components/types.d.ts.map +1 -1
- package/webmap/convert-layer.d.ts +2 -1
- package/webmap/convert-layer.d.ts.map +1 -1
- package/webmap/convert-layer.js +20 -3
- package/webmap/convert-renderer.d.ts +10 -3
- package/webmap/convert-renderer.d.ts.map +1 -1
- package/webmap/convert-renderer.js +190 -36
- package/webmap/index.d.ts +1 -0
- package/webmap/index.d.ts.map +1 -1
- package/webmap/parse.d.ts +2 -1
- package/webmap/parse.d.ts.map +1 -1
- package/webmap/parse.js +1 -1
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "web-components/measurement.js",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "class",
|
|
11
|
+
"customElement": true,
|
|
12
|
+
"tagName": "honua-measurement",
|
|
13
|
+
"name": "HonuaMeasurementElement",
|
|
14
|
+
"description": "Distance and area measurement drawn directly on a MapLibre map.",
|
|
15
|
+
"superclass": {
|
|
16
|
+
"name": "HTMLElement",
|
|
17
|
+
"package": "global:"
|
|
18
|
+
},
|
|
19
|
+
"members": [
|
|
20
|
+
{
|
|
21
|
+
"kind": "method",
|
|
22
|
+
"name": "addVertex",
|
|
23
|
+
"privacy": "public",
|
|
24
|
+
"description": "Adds a vertex programmatically (same as a map click). Returns `false`, changing nothing, when no mode is active or the position is not a usable WGS84 vertex (non-finite, or latitude outside `[-90, 90]`).",
|
|
25
|
+
"parameters": [
|
|
26
|
+
{
|
|
27
|
+
"name": "lngLat",
|
|
28
|
+
"type": {
|
|
29
|
+
"text": "readonly [number, number]"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"return": {
|
|
34
|
+
"type": {
|
|
35
|
+
"text": "boolean"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"kind": "field",
|
|
41
|
+
"name": "areaUnit",
|
|
42
|
+
"privacy": "public",
|
|
43
|
+
"description": "Displayed area unit. `\"auto\"` (default) keeps the metric auto-scaling behavior. Changing this reformats the existing full-precision result — it never recomputes from a rounded display value.",
|
|
44
|
+
"type": {
|
|
45
|
+
"text": "\"auto\" | \"square-meters\" | \"hectares\" | \"square-kilometers\" | \"square-feet\" | \"acres\" | \"square-miles\""
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"kind": "method",
|
|
50
|
+
"name": "cancel",
|
|
51
|
+
"privacy": "public",
|
|
52
|
+
"description": "Cancels the in-progress sketch (same as Escape); the mode stays active.",
|
|
53
|
+
"return": {
|
|
54
|
+
"type": {
|
|
55
|
+
"text": "void"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"kind": "method",
|
|
61
|
+
"name": "connect",
|
|
62
|
+
"privacy": "public",
|
|
63
|
+
"description": "Wires the widget to a MapLibre map. Equivalent to setting `.map`.",
|
|
64
|
+
"parameters": [
|
|
65
|
+
{
|
|
66
|
+
"name": "map",
|
|
67
|
+
"type": {
|
|
68
|
+
"text": "HonuaMeasurementMap"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"return": {
|
|
73
|
+
"type": {
|
|
74
|
+
"text": "void"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"kind": "field",
|
|
80
|
+
"name": "crs",
|
|
81
|
+
"privacy": "public",
|
|
82
|
+
"readonly": true,
|
|
83
|
+
"description": "CRS vertices are recorded in. Always WGS84 (`\"EPSG:4326\"`): vertices come from map click events, which report geographic lng/lat regardless of the map's own projection. Exposed so a consumer never has to assume it.",
|
|
84
|
+
"type": {
|
|
85
|
+
"text": "\"EPSG:4326\""
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"kind": "field",
|
|
90
|
+
"name": "fidelity",
|
|
91
|
+
"privacy": "public",
|
|
92
|
+
"description": "Which math computes `result.distance` / `result.area`: `\"geodesic\"` (default, great-circle over WGS84) or `\"planar\"` (Euclidean, in the `planarCrs` frame — see `./measurement-units.js`). Changing this recomputes from the drawn vertices, since it changes which math produces the canonical value.",
|
|
93
|
+
"type": {
|
|
94
|
+
"text": "\"geodesic\" | \"planar\""
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"kind": "method",
|
|
99
|
+
"name": "finish",
|
|
100
|
+
"privacy": "public",
|
|
101
|
+
"description": "Finishes the in-progress sketch (same as double-click).",
|
|
102
|
+
"return": {
|
|
103
|
+
"type": {
|
|
104
|
+
"text": "void"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"kind": "field",
|
|
110
|
+
"name": "map",
|
|
111
|
+
"privacy": "public",
|
|
112
|
+
"description": "The MapLibre map this widget draws on.",
|
|
113
|
+
"type": {
|
|
114
|
+
"text": "HonuaMeasurementMap | undefined"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"kind": "field",
|
|
119
|
+
"name": "messages",
|
|
120
|
+
"privacy": "public",
|
|
121
|
+
"description": "Caller-supplied labels, statuses, and ARIA text; unset entries keep the English defaults.",
|
|
122
|
+
"type": {
|
|
123
|
+
"text": "HonuaMeasurementMessages"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"kind": "field",
|
|
128
|
+
"name": "mode",
|
|
129
|
+
"privacy": "public",
|
|
130
|
+
"readonly": true,
|
|
131
|
+
"description": "The active measure mode.",
|
|
132
|
+
"type": {
|
|
133
|
+
"text": "\"off\" | \"distance\" | \"area\""
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"kind": "field",
|
|
138
|
+
"name": "planarCrs",
|
|
139
|
+
"privacy": "public",
|
|
140
|
+
"description": "Planar frame used when `fidelity` is `\"planar\"`: `\"local\"` (default, flat-earth meters around the sketch) or `\"EPSG:3857\"` (Web Mercator meters, not scale-corrected). Recomputes like `fidelity` does.",
|
|
141
|
+
"type": {
|
|
142
|
+
"text": "\"local\" | \"EPSG:3857\""
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"kind": "field",
|
|
147
|
+
"name": "precision",
|
|
148
|
+
"privacy": "public",
|
|
149
|
+
"description": "Decimal digits for the displayed value. `undefined` (default) uses a per-unit default.",
|
|
150
|
+
"type": {
|
|
151
|
+
"text": "number | undefined"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"kind": "field",
|
|
156
|
+
"name": "result",
|
|
157
|
+
"privacy": "public",
|
|
158
|
+
"readonly": true,
|
|
159
|
+
"description": "The current (or last finished) measurement result.",
|
|
160
|
+
"type": {
|
|
161
|
+
"text": "HonuaMeasureResult | undefined"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"kind": "method",
|
|
166
|
+
"name": "setMode",
|
|
167
|
+
"privacy": "public",
|
|
168
|
+
"description": "Activates a measure mode; `\"off\"` cancels any in-progress sketch.",
|
|
169
|
+
"parameters": [
|
|
170
|
+
{
|
|
171
|
+
"name": "mode",
|
|
172
|
+
"type": {
|
|
173
|
+
"text": "\"off\" | \"distance\" | \"area\""
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"return": {
|
|
178
|
+
"type": {
|
|
179
|
+
"text": "void"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"kind": "field",
|
|
185
|
+
"name": "unit",
|
|
186
|
+
"privacy": "public",
|
|
187
|
+
"description": "Displayed distance unit. `\"auto\"` (default) keeps the metric auto-scaling behavior. Changing this reformats the existing full-precision result — it never recomputes from a rounded display value.",
|
|
188
|
+
"type": {
|
|
189
|
+
"text": "\"auto\" | \"meters\" | \"kilometers\" | \"feet\" | \"yards\" | \"miles\" | \"nauticalmiles\""
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"kind": "field",
|
|
194
|
+
"name": "vertices",
|
|
195
|
+
"privacy": "public",
|
|
196
|
+
"readonly": true,
|
|
197
|
+
"description": "The in-progress vertex list (`[lng, lat]` positions).",
|
|
198
|
+
"type": {
|
|
199
|
+
"text": "readonly (readonly [number, number])[]"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"attributes": [
|
|
204
|
+
{
|
|
205
|
+
"name": "for",
|
|
206
|
+
"description": "`id` of the `<honua-map>` (or any element exposing `.map`) to measure on.",
|
|
207
|
+
"type": {
|
|
208
|
+
"text": "string"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "label",
|
|
213
|
+
"description": "Heading and accessible name of the panel; `messages.label` wins when set.",
|
|
214
|
+
"type": {
|
|
215
|
+
"text": "string"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "unit",
|
|
220
|
+
"fieldName": "unit",
|
|
221
|
+
"description": "Displayed distance unit. `\"auto\"` (default) keeps the metric auto-scaling behavior. Changing this reformats the existing full-precision result — it never recomputes from a rounded display value.",
|
|
222
|
+
"type": {
|
|
223
|
+
"text": "\"auto\" | \"meters\" | \"kilometers\" | \"feet\" | \"yards\" | \"miles\" | \"nauticalmiles\""
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "area-unit",
|
|
228
|
+
"fieldName": "areaUnit",
|
|
229
|
+
"description": "Displayed area unit. `\"auto\"` (default) keeps the metric auto-scaling behavior. Changing this reformats the existing full-precision result — it never recomputes from a rounded display value.",
|
|
230
|
+
"type": {
|
|
231
|
+
"text": "\"auto\" | \"square-meters\" | \"hectares\" | \"square-kilometers\" | \"square-feet\" | \"acres\" | \"square-miles\""
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"name": "precision",
|
|
236
|
+
"fieldName": "precision",
|
|
237
|
+
"description": "Decimal digits for the displayed value. `undefined` (default) uses a per-unit default.",
|
|
238
|
+
"type": {
|
|
239
|
+
"text": "number"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"name": "fidelity",
|
|
244
|
+
"fieldName": "fidelity",
|
|
245
|
+
"description": "Which math computes `result.distance` / `result.area`: `\"geodesic\"` (default, great-circle over WGS84) or `\"planar\"` (Euclidean, in the `planarCrs` frame — see `./measurement-units.js`). Changing this recomputes from the drawn vertices, since it changes which math produces the canonical value.",
|
|
246
|
+
"type": {
|
|
247
|
+
"text": "\"geodesic\" | \"planar\""
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "planar-crs",
|
|
252
|
+
"fieldName": "planarCrs",
|
|
253
|
+
"description": "Planar frame used when `fidelity` is `\"planar\"`: `\"local\"` (default, flat-earth meters around the sketch) or `\"EPSG:3857\"` (Web Mercator meters, not scale-corrected). Recomputes like `fidelity` does.",
|
|
254
|
+
"type": {
|
|
255
|
+
"text": "\"local\" | \"EPSG:3857\""
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
"events": [
|
|
260
|
+
{
|
|
261
|
+
"name": "honua-measure-change",
|
|
262
|
+
"description": "A mode, vertex, result, fidelity, or planar CRS change. Bubbles and is composed.",
|
|
263
|
+
"type": {
|
|
264
|
+
"text": "CustomEvent<HonuaMeasureChangeDetail>"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"cssParts": [
|
|
269
|
+
{
|
|
270
|
+
"name": "panel",
|
|
271
|
+
"description": "The measurement panel."
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "mode",
|
|
275
|
+
"description": "Each mode toggle button."
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "value",
|
|
279
|
+
"description": "The live result readout (`role=\"status\"`)."
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "finish",
|
|
283
|
+
"description": "The Finish button."
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "cancel",
|
|
287
|
+
"description": "The Cancel button."
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"cssProperties": [
|
|
291
|
+
{
|
|
292
|
+
"name": "--honua-ui-bg",
|
|
293
|
+
"default": "#ffffff"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "--honua-ui-fg",
|
|
297
|
+
"default": "#172033"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"name": "--honua-ui-muted",
|
|
301
|
+
"default": "#667085"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "--honua-ui-border",
|
|
305
|
+
"default": "#d0d5dd"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "--honua-ui-accent",
|
|
309
|
+
"default": "#1d4ed8"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"name": "--honua-ui-accent-fg",
|
|
313
|
+
"default": "#ffffff"
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
"source": {
|
|
317
|
+
"href": "https://github.com/honua-io/honua-sdk-js/blob/trunk/src/web-components/measurement.ts"
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
],
|
|
321
|
+
"exports": [
|
|
322
|
+
{
|
|
323
|
+
"kind": "js",
|
|
324
|
+
"name": "HonuaMeasurementElement",
|
|
325
|
+
"declaration": {
|
|
326
|
+
"name": "HonuaMeasurementElement",
|
|
327
|
+
"module": "web-components/measurement.js"
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"kind": "custom-element-definition",
|
|
332
|
+
"name": "honua-measurement",
|
|
333
|
+
"declaration": {
|
|
334
|
+
"name": "HonuaMeasurementElement",
|
|
335
|
+
"module": "web-components/measurement.js"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
]
|
|
341
|
+
}
|
|
@@ -6,6 +6,7 @@ export interface ClassBreakInfoCompat {
|
|
|
6
6
|
description?: string;
|
|
7
7
|
}
|
|
8
8
|
export interface ClassBreaksRendererCompatOptions {
|
|
9
|
+
visualVariables?: unknown[];
|
|
9
10
|
field?: string;
|
|
10
11
|
normalizationField?: string;
|
|
11
12
|
normalizationTotal?: number;
|
|
@@ -22,6 +23,7 @@ export interface ClassBreaksRendererHandleCompat {
|
|
|
22
23
|
remove(): void;
|
|
23
24
|
}
|
|
24
25
|
export declare class ClassBreaksRendererCompat {
|
|
26
|
+
visualVariables: unknown[];
|
|
25
27
|
loaded: boolean;
|
|
26
28
|
loadStatus: ClassBreaksRendererLoadStatusCompat;
|
|
27
29
|
field: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-breaks-renderer.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/class-breaks-renderer.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gCAAgC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,E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AQxG,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,+BAA+B;IAehG,MAAM,CAAC,OAAO,EAAE,gCAAgC,GAAG,IAAI;IAmDvD,iBAAiB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI;IAKnD,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAW/C,KAAK,IAAI,yBAAyB;IAIlC,MAAM,IAAI,gCAAgC;IAgB1C,OAAO,IAAI,IAAI;IAItB,OAAO,CAAC,cAAc;CAUvB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { safeInvokeCompatListener } from "./event-bus.js";
|
|
2
2
|
export class ClassBreaksRendererCompat {
|
|
3
|
+
visualVariables;
|
|
3
4
|
loaded;
|
|
4
5
|
loadStatus;
|
|
5
6
|
field;
|
|
@@ -14,6 +15,7 @@ export class ClassBreaksRendererCompat {
|
|
|
14
15
|
classBreakInfos;
|
|
15
16
|
watchListeners;
|
|
16
17
|
constructor(options = {}) {
|
|
18
|
+
this.visualVariables = structuredClone(options.visualVariables ?? []);
|
|
17
19
|
this.loaded = false;
|
|
18
20
|
this.loadStatus = "not-loaded";
|
|
19
21
|
this.field = options.field;
|
|
@@ -65,6 +67,10 @@ export class ClassBreaksRendererCompat {
|
|
|
65
67
|
};
|
|
66
68
|
}
|
|
67
69
|
update(options) {
|
|
70
|
+
if (options.visualVariables !== undefined) {
|
|
71
|
+
this.visualVariables = structuredClone(options.visualVariables);
|
|
72
|
+
this.notifyWatchers("visualVariables", this.visualVariables);
|
|
73
|
+
}
|
|
68
74
|
if (options.field !== undefined) {
|
|
69
75
|
this.field = options.field;
|
|
70
76
|
this.notifyWatchers("field", this.field);
|
|
@@ -128,6 +134,7 @@ export class ClassBreaksRendererCompat {
|
|
|
128
134
|
}
|
|
129
135
|
toJSON() {
|
|
130
136
|
return {
|
|
137
|
+
visualVariables: structuredClone(this.visualVariables),
|
|
131
138
|
field: this.field,
|
|
132
139
|
normalizationField: this.normalizationField,
|
|
133
140
|
normalizationTotal: this.normalizationTotal,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CompatEventBus, type CompatEventSubscription } from "./event-bus.js";
|
|
2
|
+
import { GraphicCompat } from "./graphic.js";
|
|
2
3
|
/** Structural type for viewpoint-like objects used by controls. */
|
|
3
4
|
export interface ControlViewpointLike {
|
|
4
5
|
targetGeometry?: Record<string, unknown>;
|
|
@@ -26,7 +27,7 @@ interface BaseControlCompatOptions {
|
|
|
26
27
|
}
|
|
27
28
|
export declare class BaseControlCompat {
|
|
28
29
|
readonly view: unknown;
|
|
29
|
-
|
|
30
|
+
container: HTMLElement | string | null;
|
|
30
31
|
readonly eventBus: CompatEventBus;
|
|
31
32
|
loaded: boolean;
|
|
32
33
|
loadStatus: ControlLoadStatusCompat;
|
|
@@ -105,9 +106,16 @@ export interface LocatePositionCompat {
|
|
|
105
106
|
export declare class LocateCompat extends BaseControlCompat {
|
|
106
107
|
readonly zoom: number | undefined;
|
|
107
108
|
lastPosition: LocatePositionCompat | undefined;
|
|
109
|
+
/** Mirrors the Esri Locate view model state watched by `watchUtils.init`. */
|
|
110
|
+
readonly viewModel: {
|
|
111
|
+
state: "ready" | "disabled";
|
|
112
|
+
};
|
|
113
|
+
/** The latest locate result, so a directions stop can clone it. */
|
|
114
|
+
graphic: GraphicCompat | undefined;
|
|
108
115
|
private readonly locateProvider;
|
|
109
116
|
protected get controlName(): string;
|
|
110
117
|
constructor(options?: LocateCompatOptions);
|
|
118
|
+
attachContainer(element: HTMLElement): void;
|
|
111
119
|
locate(): Promise<LocatePositionCompat>;
|
|
112
120
|
}
|
|
113
121
|
export interface CompassCompatOptions {
|
|
@@ -133,6 +141,7 @@ export declare class ZoomCompat extends BaseControlCompat {
|
|
|
133
141
|
readonly layout: "vertical" | "horizontal";
|
|
134
142
|
protected get controlName(): string;
|
|
135
143
|
constructor(options?: ZoomCompatOptions);
|
|
144
|
+
attachContainer(element: HTMLElement): void;
|
|
136
145
|
zoomIn(step?: number): number | undefined;
|
|
137
146
|
zoomOut(step?: number): number | undefined;
|
|
138
147
|
private adjustZoom;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/controls.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,uBAAuB,EAG7B,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/controls.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,uBAAuB,EAG7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,mEAAmE;AACnE,MAAM,WAAW,oBAAoB;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,uBAAuB,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE1E,MAAM,WAAW,mBAAmB;IAClC,MAAM,IAAI,IAAI,CAAC;CAChB;AAMD,UAAU,wBAAwB;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IA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IASZ,MAAM,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO;CASxC;AAMD,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,qBAAa,iBAAkB,SAAQ,iBAAiB;IACtD,SAAgB,GAAG,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IAE9B,cAAuB,WAAW,IAAI,MAAM,CAE3C;gBAEkB,OAAO,GAAE,wBAA6B;IAOlD,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAUnC,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAYzC,OAAO,IAAI,MAAM;CAMzB"}
|
package/esri-compat/controls.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CompatEventBus, resolveCompatEventBus, safeInvokeCompatListener, } from "./event-bus.js";
|
|
2
|
+
import { GraphicCompat } from "./graphic.js";
|
|
2
3
|
export class BaseControlCompat {
|
|
3
4
|
view;
|
|
4
5
|
container;
|
|
@@ -193,6 +194,10 @@ export class ScaleBarCompat extends BaseControlCompat {
|
|
|
193
194
|
export class LocateCompat extends BaseControlCompat {
|
|
194
195
|
zoom;
|
|
195
196
|
lastPosition;
|
|
197
|
+
/** Mirrors the Esri Locate view model state watched by `watchUtils.init`. */
|
|
198
|
+
viewModel;
|
|
199
|
+
/** The latest locate result, so a directions stop can clone it. */
|
|
200
|
+
graphic;
|
|
196
201
|
locateProvider;
|
|
197
202
|
get controlName() {
|
|
198
203
|
return "locate";
|
|
@@ -201,14 +206,26 @@ export class LocateCompat extends BaseControlCompat {
|
|
|
201
206
|
super(options);
|
|
202
207
|
this.zoom = options.zoom;
|
|
203
208
|
this.lastPosition = undefined;
|
|
209
|
+
this.graphic = undefined;
|
|
210
|
+
this.viewModel = { state: "ready" };
|
|
204
211
|
this.locateProvider = options.locateProvider ?? getDefaultLocateProvider();
|
|
212
|
+
mountLocateButton(this);
|
|
213
|
+
}
|
|
214
|
+
attachContainer(element) {
|
|
215
|
+
this.container = element;
|
|
216
|
+
mountLocateButton(this);
|
|
205
217
|
}
|
|
206
218
|
async locate() {
|
|
219
|
+
this.viewModel.state = "disabled";
|
|
207
220
|
this.eventBus.emit("locate.start", undefined, this);
|
|
208
221
|
try {
|
|
209
222
|
const position = await this.locateProvider();
|
|
210
223
|
this.lastPosition = position;
|
|
224
|
+
this.graphic = new GraphicCompat({
|
|
225
|
+
geometry: { x: position.coords.longitude, y: position.coords.latitude },
|
|
226
|
+
});
|
|
211
227
|
this.notifyWatchers("lastPosition", this.lastPosition);
|
|
228
|
+
this.notifyWatchers("graphic", this.graphic);
|
|
212
229
|
const center = [position.coords.longitude, position.coords.latitude];
|
|
213
230
|
const target = {
|
|
214
231
|
center,
|
|
@@ -225,9 +242,11 @@ export class LocateCompat extends BaseControlCompat {
|
|
|
225
242
|
center,
|
|
226
243
|
zoom: this.zoom,
|
|
227
244
|
}, this);
|
|
245
|
+
this.viewModel.state = "ready";
|
|
228
246
|
return position;
|
|
229
247
|
}
|
|
230
248
|
catch (error) {
|
|
249
|
+
this.viewModel.state = "ready";
|
|
231
250
|
this.eventBus.emit("locate.error", { error }, this);
|
|
232
251
|
throw error;
|
|
233
252
|
}
|
|
@@ -269,6 +288,11 @@ export class ZoomCompat extends BaseControlCompat {
|
|
|
269
288
|
constructor(options = {}) {
|
|
270
289
|
super(options);
|
|
271
290
|
this.layout = options.layout ?? "vertical";
|
|
291
|
+
mountZoomButtons(this);
|
|
292
|
+
}
|
|
293
|
+
attachContainer(element) {
|
|
294
|
+
this.container = element;
|
|
295
|
+
mountZoomButtons(this);
|
|
272
296
|
}
|
|
273
297
|
zoomIn(step = 1) {
|
|
274
298
|
return this.adjustZoom(Math.abs(step));
|
|
@@ -277,16 +301,76 @@ export class ZoomCompat extends BaseControlCompat {
|
|
|
277
301
|
return this.adjustZoom(-Math.abs(step));
|
|
278
302
|
}
|
|
279
303
|
adjustZoom(delta) {
|
|
280
|
-
if (!isRecord(this.view)
|
|
304
|
+
if (!isRecord(this.view)) {
|
|
281
305
|
return undefined;
|
|
282
306
|
}
|
|
283
|
-
const
|
|
307
|
+
const current = typeof this.view.zoom === "number" && Number.isFinite(this.view.zoom) ? this.view.zoom : 2;
|
|
308
|
+
const next = current + delta;
|
|
284
309
|
this.view.zoom = next;
|
|
310
|
+
const goTo = this.view.goTo;
|
|
311
|
+
if (typeof goTo === "function") {
|
|
312
|
+
void goTo.call(this.view, { zoom: next });
|
|
313
|
+
}
|
|
285
314
|
this.notifyWatchers("zoom", next);
|
|
286
315
|
this.eventBus.emit("zoom.changed", { zoom: next, delta }, this);
|
|
287
316
|
return next;
|
|
288
317
|
}
|
|
289
318
|
}
|
|
319
|
+
function mountZoomButtons(zoom) {
|
|
320
|
+
const container = zoom.container;
|
|
321
|
+
const element = typeof HTMLElement !== "undefined" && container instanceof HTMLElement
|
|
322
|
+
? container
|
|
323
|
+
: typeof container === "string" && typeof document !== "undefined"
|
|
324
|
+
? document.getElementById(container)
|
|
325
|
+
: null;
|
|
326
|
+
if (!element) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
element.querySelector(":scope > .honua-zoom")?.remove();
|
|
330
|
+
const bar = document.createElement("div");
|
|
331
|
+
bar.className = "honua-zoom";
|
|
332
|
+
bar.style.display = "flex";
|
|
333
|
+
bar.style.flexDirection = zoom.layout === "horizontal" ? "row" : "column";
|
|
334
|
+
bar.style.gap = "4px";
|
|
335
|
+
for (const [label, step] of [
|
|
336
|
+
["+", 1],
|
|
337
|
+
["−", -1],
|
|
338
|
+
]) {
|
|
339
|
+
const button = document.createElement("button");
|
|
340
|
+
button.type = "button";
|
|
341
|
+
button.textContent = label;
|
|
342
|
+
button.addEventListener("click", () => {
|
|
343
|
+
if (step > 0) {
|
|
344
|
+
zoom.zoomIn();
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
zoom.zoomOut();
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
bar.append(button);
|
|
351
|
+
}
|
|
352
|
+
element.append(bar);
|
|
353
|
+
}
|
|
354
|
+
function mountLocateButton(locate) {
|
|
355
|
+
const container = locate.container;
|
|
356
|
+
const element = typeof HTMLElement !== "undefined" && container instanceof HTMLElement
|
|
357
|
+
? container
|
|
358
|
+
: typeof container === "string" && typeof document !== "undefined"
|
|
359
|
+
? document.getElementById(container)
|
|
360
|
+
: null;
|
|
361
|
+
if (!element) {
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
element.querySelector(":scope > .honua-locate")?.remove();
|
|
365
|
+
const button = document.createElement("button");
|
|
366
|
+
button.type = "button";
|
|
367
|
+
button.className = "honua-locate";
|
|
368
|
+
button.textContent = "Locate";
|
|
369
|
+
button.addEventListener("click", () => {
|
|
370
|
+
void locate.locate();
|
|
371
|
+
});
|
|
372
|
+
element.append(button);
|
|
373
|
+
}
|
|
290
374
|
export class FullscreenCompat extends BaseControlCompat {
|
|
291
375
|
element;
|
|
292
376
|
active;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { CompatEventBus } from "./event-bus.js";
|
|
2
2
|
import { RouteLayerCompat, type RouteLayerCompatOptions, type RouteSolveResultCompat, type RouteStopCompat } from "./route-layer.js";
|
|
3
|
+
import { type RouteTaskSolveResultCompat } from "./route-task.js";
|
|
3
4
|
export interface DirectionsCompatOptions {
|
|
4
5
|
view?: unknown;
|
|
5
6
|
container?: unknown;
|
|
6
7
|
layer?: RouteLayerCompat;
|
|
7
8
|
eventBus?: CompatEventBus;
|
|
8
9
|
routeProvider?: RouteLayerCompatOptions["routeProvider"];
|
|
10
|
+
routeServiceUrl?: string;
|
|
11
|
+
apiKey?: string;
|
|
9
12
|
stops?: readonly RouteStopCompat[];
|
|
10
13
|
useDefaultRouteLayer?: boolean;
|
|
11
14
|
showSaveAsButton?: boolean;
|
|
@@ -42,4 +45,36 @@ export declare class DirectionsCompat {
|
|
|
42
45
|
destroy(): void;
|
|
43
46
|
private notifyWatchers;
|
|
44
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* The Esri `DirectionsViewModel` shape used by webpack 4.x apps: a view, a stop
|
|
50
|
+
* collection, `load`, `getDirections`, and `reset`. With no custom route
|
|
51
|
+
* provider, `load` reads travel modes and `getDirections` solves
|
|
52
|
+
* `routeServiceUrl` (the Esri world route service by default).
|
|
53
|
+
*/
|
|
54
|
+
export declare class DirectionsViewModelCompat {
|
|
55
|
+
view: unknown;
|
|
56
|
+
loaded: boolean;
|
|
57
|
+
selectedTravelMode: unknown;
|
|
58
|
+
readonly routeServiceUrl: string;
|
|
59
|
+
/** Filled from the route service during `load`. `find` returns undefined until then. */
|
|
60
|
+
readonly travelModes: Array<{
|
|
61
|
+
name?: string;
|
|
62
|
+
}>;
|
|
63
|
+
readonly layer: RouteLayerCompat;
|
|
64
|
+
readonly stops: {
|
|
65
|
+
removeAll(): void;
|
|
66
|
+
addMany(stops: readonly unknown[]): void;
|
|
67
|
+
};
|
|
68
|
+
private readonly apiKey;
|
|
69
|
+
private readonly routeProvider;
|
|
70
|
+
constructor(options?: {
|
|
71
|
+
view?: unknown;
|
|
72
|
+
routeServiceUrl?: string;
|
|
73
|
+
apiKey?: string;
|
|
74
|
+
routeProvider?: RouteLayerCompatOptions["routeProvider"];
|
|
75
|
+
});
|
|
76
|
+
load(): Promise<this>;
|
|
77
|
+
getDirections(): Promise<RouteTaskSolveResultCompat | undefined>;
|
|
78
|
+
reset(): void;
|
|
79
|
+
}
|
|
45
80
|
//# sourceMappingURL=directions.d.ts.map
|