@tileflow/dev 0.1.0-alpha.30 → 0.1.0-alpha.32
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/README.md +59 -2
- package/THIRD_PARTY_NOTICES.md +225 -3
- package/dist/artifacts.d.ts +6 -2
- package/dist/artifacts.js +18 -3
- package/dist/{chunk-6MGFMKG3.js → chunk-AQUGMUZW.js} +43 -3
- package/dist/{chunk-L56FLV4R.js → chunk-CM6ZTYDJ.js} +48 -7
- package/dist/{chunk-A2VTI43Y.js → chunk-F4PLTZS4.js} +1007 -19
- package/dist/config.js +1 -1
- package/dist/devtools-browser.js +17353 -0
- package/dist/devtools-observer.js +95 -0
- package/dist/fonts.d.ts +1 -1
- package/dist/icons-B84H8Ymu.d.ts +406 -0
- package/dist/icons.d.ts +3 -337
- package/dist/icons.js +3 -1
- package/dist/inspect.js +1 -1
- package/dist/{preview-assets-MVUJJ5XR.js → preview-assets-KGUICQHG.js} +6 -0
- package/dist/preview.d.ts +1 -1
- package/dist/preview.js +251 -1855
- package/dist/server.d.ts +11 -4
- package/dist/server.js +1595 -278
- package/docs/beacon-map-audits.md +102 -0
- package/docs/layers-inspection.md +87 -0
- package/docs/local-comparison-workbench-and-compiler-inspection.md +74 -193
- package/docs/native-artifacts.md +3 -3
- package/package.json +7 -5
- package/ui-fonts/hubot-sans-OFL.txt +93 -0
- package/ui-fonts/hubot-sans.woff2 +0 -0
- package/ui-fonts/inter-OFL.txt +92 -0
- package/ui-fonts/inter.woff2 +0 -0
- package/ui-fonts/jetbrains-mono-OFL.txt +93 -0
- package/ui-fonts/jetbrains-mono.woff2 +0 -0
- package/ui-fonts/mona-sans-OFL.txt +93 -0
- package/ui-fonts/mona-sans.woff2 +0 -0
package/README.md
CHANGED
|
@@ -33,6 +33,13 @@ export default defineMap({id: 'madrid', version: 1, extends: streets});
|
|
|
33
33
|
Loading the config executes its imports. It is not a sandbox for untrusted code. Local preparation
|
|
34
34
|
needs no API key, but serving a map can still cause requests to its remote data or font providers.
|
|
35
35
|
|
|
36
|
+
The CLI's local Map DevTools provides a dockable layer inspector, loaded tiles, assets, scene
|
|
37
|
+
controls and frame timing. Its element picker selects a layer and evaluates its rules using the
|
|
38
|
+
feature clicked on the map.
|
|
39
|
+
Performance's Overdraw overlay uses a heatmap with a visible pass-count legend and explanation.
|
|
40
|
+
See [Map DevTools and compiler inspection](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/local-comparison-workbench-and-compiler-inspection.md)
|
|
41
|
+
for interaction details and observation limits.
|
|
42
|
+
|
|
36
43
|
## Prepare a generation
|
|
37
44
|
|
|
38
45
|
<!-- docs:check -->
|
|
@@ -54,6 +61,12 @@ The artifact plan exposes files and observed inputs from the same generation. St
|
|
|
54
61
|
`styles[map][theme]`, never as an implicit default-theme alias. Keep that generation alive for the
|
|
55
62
|
whole operation, then release it. Do not reconstruct its asset list from directory guesses.
|
|
56
63
|
|
|
64
|
+
Map-owned tree models are prepared alongside icons and embedded in the styles. Custom tools that
|
|
65
|
+
compile icons separately can use `prepareTileflowMapTreeModels` from `@tileflow/dev/icons` with
|
|
66
|
+
the map's model directories, base directory, working directory, target and diagnostic path. Pass
|
|
67
|
+
its `models` result as `preparedAssets.models` when compiling the style; retain its source
|
|
68
|
+
identities and watch paths when managing revisions. The artifact pipeline does this automatically.
|
|
69
|
+
|
|
57
70
|
To write production output rather than manage it in memory:
|
|
58
71
|
|
|
59
72
|
<!-- docs:check -->
|
|
@@ -123,7 +136,51 @@ Use `/artifacts` for preparation and output, `/server` for HTTP handling, `/conf
|
|
|
123
136
|
loading, `/icons` and `/fonts` for asset preparation, `/inspect` for bounded inspection, `/tilesets`
|
|
124
137
|
for local PMTiles inspection, and `/validation` for diagnostics. `/preview` is the local preview
|
|
125
138
|
contract, including experimental preview-only rendering; it does not promise hosted support.
|
|
126
|
-
The package has no root entry point.
|
|
139
|
+
The package has no root entry point. `/server` also exposes the reusable Map DevTools shell. The CLI
|
|
140
|
+
connects appearance controls and shared browser context through its optional local
|
|
141
|
+
workflow adapter; see the [Map DevTools guide](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/local-comparison-workbench-and-compiler-inspection.md).
|
|
142
|
+
The navigation contains **Map**, **Layers**, **Tiles**, **Assets**, **Debug** and **Beacon**.
|
|
143
|
+
Zoom, Bearing and Pitch occupy a separate row directly below it, with a live zoom slider,
|
|
144
|
+
**Reset** to restore all three initial camera values, and **Copy context for agent**.
|
|
145
|
+
The active tab and selected layer remain in the URL across reloads. The menu provides left,
|
|
146
|
+
right and bottom docking, System/Light/Dark appearance, and **Reset all changes**.
|
|
147
|
+
|
|
148
|
+
**Map** exposes time-of-day segments, palette cards with actual style swatches, 3D view,
|
|
149
|
+
Off/Grow/Fade building animation, and the map's module settings. The command selects the map.
|
|
150
|
+
Changes update the existing map after a 300 ms pause while the form remains editable. Superseded
|
|
151
|
+
compilations are discarded. Runtime controls do not recompile the style. Scene and layer edits
|
|
152
|
+
share the header Undo/Redo controls; source files stay unchanged.
|
|
153
|
+
|
|
154
|
+
**Layers** groups physical and runtime layers by module or draw order. Hover highlights geometry;
|
|
155
|
+
selection keeps it highlighted independently of the element picker. The picker opens the clicked
|
|
156
|
+
feature's layer in **Rules**. Rules expose live colors, numeric sliders, enums, expression curves,
|
|
157
|
+
defaults, and checkboxes for temporarily disabling paint, layout and filters. Diagnosis, Data and
|
|
158
|
+
Origin explain renderer state, sample features and available compiler provenance. **Visible**
|
|
159
|
+
filters to the current viewport. Context can be reviewed as Markdown or JSON before copying.
|
|
160
|
+
See [Layers inspection](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/layers-inspection.md).
|
|
161
|
+
|
|
162
|
+
**Tiles** shows resident map tiles as a coordinate grid and source-grouped list. Source layers,
|
|
163
|
+
Features and Info expose raw payload sizes, consumer layers, paginated features, GeoJSON and bounds.
|
|
164
|
+
Inspection reads resident data without issuing tile requests. MLT and inaccessible renderer data
|
|
165
|
+
have explicit unavailable states.
|
|
166
|
+
|
|
167
|
+
**Assets** separates Icons, 3D models and Fonts. Icons lists real registered images and loads actual
|
|
168
|
+
sprite variants for the map's palettes and times of day. Models previews bounded samples of loaded
|
|
169
|
+
controller meshes, with available counts, bytes and LODs. Fonts renders editable samples from actual
|
|
170
|
+
font files or glyphs and links back to consuming layers.
|
|
171
|
+
|
|
172
|
+
**Debug** contains overdraw, collision and tile-boundary overlays, explanations, and controls for
|
|
173
|
+
the map's actual pixel ratio. **Beacon** runs 48 checks across Rendering, Loading, Legibility,
|
|
174
|
+
Accessibility, Cartography and Integrity. Choose Desktop/Mobile and Active tour (default), Quick check or All zooms. The active tour measures
|
|
175
|
+
navigation and settled frames across the current view and five world cities within an approximately
|
|
176
|
+
one-minute budget, reports partial coverage explicitly and restores the original camera. Findings
|
|
177
|
+
link to Layers, Tiles and Debug and can be copied with evidence for an agent. Unknown or
|
|
178
|
+
informational measurements do not contribute passing scores. See
|
|
179
|
+
[Beacon map audits](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/beacon-map-audits.md)
|
|
180
|
+
for sampling, scoring and measurement limits.
|
|
181
|
+
|
|
182
|
+
The preview's globe rim follows the rendered canvas silhouette, including camera and viewport
|
|
183
|
+
changes, and fades between zooms 3 and 6. Its colors follow the map's atmosphere when declared.
|
|
127
184
|
|
|
128
185
|
Invalid compiled styles throw `TileflowStyleValidationError` with bounded issues. Keep diagnostics
|
|
129
186
|
structured; do not return executable config, local paths, credentials, or complete generated byte
|
|
@@ -195,7 +252,7 @@ These references are also included under `docs/` in the installed package:
|
|
|
195
252
|
|
|
196
253
|
- [Native artifact preparation](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/native-artifacts.md): static compatibility, renderer-qualified output, and limitations.
|
|
197
254
|
- [Artifact lifecycle](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/artifact-lifecycle.md): generations, immutable snapshots, provenance, and cleanup.
|
|
198
|
-
- [Local comparison and inspection](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/local-comparison-workbench-and-compiler-inspection.md):
|
|
255
|
+
- [Local comparison and inspection](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/local-comparison-workbench-and-compiler-inspection.md): Map DevTools controls and preview-only models.
|
|
199
256
|
- [Config diagnostics](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/structured-config-inspection-and-diagnostics.md): bounded, machine-readable inspection.
|
|
200
257
|
- [PMTiles inspection](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/bounded-pmtiles-resource-inspection.md): metadata, sampling limits, and requested properties.
|
|
201
258
|
- [Feature and icon inspection](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/bounded-vector-feature-inspection.md): supported sources, icon compilation, and delivered-pixel hashes.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -2,8 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
This file records third-party components used by Node preparation and preview. Official map artwork
|
|
4
4
|
and fonts are owned and published by `@tileflow/maps`; `@tileflow/dev` does not carry an `assets/`
|
|
5
|
-
directory.
|
|
6
|
-
binaries are not copied into the dev package.
|
|
5
|
+
directory. Map DevTools interface fonts are distributed separately under `ui-fonts/`. Node runtime dependencies are installed as separate npm packages. The browser inspector bundles
|
|
6
|
+
the evaluator and decoders described below; native binaries are not copied into the dev package.
|
|
7
|
+
|
|
8
|
+
## Map DevTools interface fonts
|
|
9
|
+
|
|
10
|
+
Inter by Rasmus Andersson and JetBrains Mono by JetBrains are distributed under the SIL Open Font License 1.1. Their complete notices accompany the WOFF2 files in `ui-fonts/inter-OFL.txt` and `ui-fonts/jetbrains-mono-OFL.txt`. Source: <https://github.com/rsms/inter> and <https://github.com/JetBrains/JetBrainsMono>.
|
|
11
|
+
|
|
12
|
+
Mona Sans and Hubot Sans by GitHub are distributed under the SIL Open Font License 1.1.
|
|
13
|
+
Their complete notices accompany the WOFF2 files in `ui-fonts/mona-sans-OFL.txt` and
|
|
14
|
+
`ui-fonts/hubot-sans-OFL.txt`. These fonts style the development interface and do not alter map text.
|
|
7
15
|
|
|
8
16
|
## Bitmap distance transform
|
|
9
17
|
|
|
@@ -31,7 +39,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SO
|
|
|
31
39
|
## Package-owned map fonts
|
|
32
40
|
|
|
33
41
|
The generic font preparation pipeline reads map-owned TTF, OTF, and WOFF2 directories; it does not
|
|
34
|
-
embed fonts in `@tileflow/dev`. Each source directory must carry its own `LICENSE.txt`, which is
|
|
42
|
+
embed map fonts in `@tileflow/dev`. Each source directory must carry its own `LICENSE.txt`, which is
|
|
35
43
|
copied into the deterministic build artifacts whenever that directory contributes a selected face.
|
|
36
44
|
|
|
37
45
|
The source repository's generic font tests retain pinned Oxanium fixtures and their complete
|
|
@@ -85,3 +93,217 @@ Because `sharp` remains a separately installed optional package, users can insta
|
|
|
85
93
|
or replace it independently of `@tileflow/dev`. Tileflow does not modify libvips and does not place a
|
|
86
94
|
libvips shared library or a `sharp` native addon inside any Tileflow package tarball. Release smoke
|
|
87
95
|
tests enforce that package boundary.
|
|
96
|
+
|
|
97
|
+
## MapLibre style specification 24.8.5
|
|
98
|
+
|
|
99
|
+
The Map DevTools browser bundle includes the expression evaluator and reference from
|
|
100
|
+
`@maplibre/maplibre-gl-style-spec` 24.8.5. The following is the complete upstream `LICENSE.txt`,
|
|
101
|
+
including its notices for incorporated code.
|
|
102
|
+
|
|
103
|
+
Source: <https://github.com/maplibre/maplibre-style-spec/tree/v24.8.5>.
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
Copyright (c) 2020, MapLibre contributors
|
|
107
|
+
|
|
108
|
+
All rights reserved.
|
|
109
|
+
|
|
110
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
111
|
+
are permitted provided that the following conditions are met:
|
|
112
|
+
|
|
113
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
114
|
+
this list of conditions and the following disclaimer.
|
|
115
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
116
|
+
this list of conditions and the following disclaimer in the documentation
|
|
117
|
+
and/or other materials provided with the distribution.
|
|
118
|
+
* Neither the name of MapLibre GL JS nor the names of its contributors
|
|
119
|
+
may be used to endorse or promote products derived from this software
|
|
120
|
+
without specific prior written permission.
|
|
121
|
+
|
|
122
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
123
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
124
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
125
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
126
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
127
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
128
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
129
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
130
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
131
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
132
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
-------------------------------------------------------------------------------
|
|
136
|
+
|
|
137
|
+
Contains code from mapbox-gl-js v1.13 and earlier
|
|
138
|
+
|
|
139
|
+
Version v1.13 of mapbox-gl-js and earlier are licensed under a BSD-3-Clause license
|
|
140
|
+
|
|
141
|
+
Copyright (c) 2020, Mapbox
|
|
142
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
143
|
+
are permitted provided that the following conditions are met:
|
|
144
|
+
|
|
145
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
146
|
+
this list of conditions and the following disclaimer.
|
|
147
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
148
|
+
this list of conditions and the following disclaimer in the documentation
|
|
149
|
+
and/or other materials provided with the distribution.
|
|
150
|
+
* Neither the name of Mapbox GL JS nor the names of its contributors
|
|
151
|
+
may be used to endorse or promote products derived from this software
|
|
152
|
+
without specific prior written permission.
|
|
153
|
+
|
|
154
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
155
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
156
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
157
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
158
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
159
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
160
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
161
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
162
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
163
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
164
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
-------------------------------------------------------------------------------
|
|
168
|
+
|
|
169
|
+
Contains code from glfx.js
|
|
170
|
+
|
|
171
|
+
Copyright (C) 2011 by Evan Wallace
|
|
172
|
+
|
|
173
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
174
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
175
|
+
in the Software without restriction, including without limitation the rights
|
|
176
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
177
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
178
|
+
furnished to do so, subject to the following conditions:
|
|
179
|
+
|
|
180
|
+
The above copyright notice and this permission notice shall be included in
|
|
181
|
+
all copies or substantial portions of the Software.
|
|
182
|
+
|
|
183
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
184
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
185
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
186
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
187
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
188
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
189
|
+
THE SOFTWARE.
|
|
190
|
+
|
|
191
|
+
--------------------------------------------------------------------------------
|
|
192
|
+
|
|
193
|
+
Contains a portion of d3-color https://github.com/d3/d3-color
|
|
194
|
+
|
|
195
|
+
Copyright 2010-2016 Mike Bostock
|
|
196
|
+
All rights reserved.
|
|
197
|
+
|
|
198
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
199
|
+
are permitted provided that the following conditions are met:
|
|
200
|
+
|
|
201
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
202
|
+
list of conditions and the following disclaimer.
|
|
203
|
+
|
|
204
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
205
|
+
this list of conditions and the following disclaimer in the documentation
|
|
206
|
+
and/or other materials provided with the distribution.
|
|
207
|
+
|
|
208
|
+
* Neither the name of the author nor the names of contributors may be used to
|
|
209
|
+
endorse or promote products derived from this software without specific prior
|
|
210
|
+
written permission.
|
|
211
|
+
|
|
212
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
213
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
214
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
215
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
216
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
217
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
218
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
219
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
220
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
221
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## pbf 5.1.2
|
|
225
|
+
|
|
226
|
+
The Map DevTools browser bundle includes the PBF reader to preview map font glyphs.
|
|
227
|
+
Source: <https://github.com/mapbox/pbf/tree/v5.1.2>.
|
|
228
|
+
|
|
229
|
+
```text
|
|
230
|
+
Copyright (c) 2026, Mapbox
|
|
231
|
+
All rights reserved.
|
|
232
|
+
|
|
233
|
+
Redistribution and use in source and binary forms, with or without
|
|
234
|
+
modification, are permitted provided that the following conditions are met:
|
|
235
|
+
|
|
236
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
237
|
+
list of conditions and the following disclaimer.
|
|
238
|
+
|
|
239
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
240
|
+
this list of conditions and the following disclaimer in the documentation
|
|
241
|
+
and/or other materials provided with the distribution.
|
|
242
|
+
|
|
243
|
+
* Neither the name of pbf nor the names of its
|
|
244
|
+
contributors may be used to endorse or promote products derived from
|
|
245
|
+
this software without specific prior written permission.
|
|
246
|
+
|
|
247
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
248
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
249
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
250
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
251
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
252
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
253
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
254
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
255
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
256
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## @mapbox/vector-tile 3.0.0
|
|
260
|
+
|
|
261
|
+
The browser tile inspector bundles this MVT decoder to inspect resident vector tiles.
|
|
262
|
+
Source: <https://github.com/mapbox/vector-tile-js/tree/v3.0.0>. License: BSD 3-Clause.
|
|
263
|
+
|
|
264
|
+
Copyright (c) 2024, Mapbox
|
|
265
|
+
|
|
266
|
+
All rights reserved.
|
|
267
|
+
|
|
268
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
269
|
+
are permitted provided that the following conditions are met:
|
|
270
|
+
|
|
271
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
272
|
+
this list of conditions and the following disclaimer.
|
|
273
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
274
|
+
this list of conditions and the following disclaimer in the documentation
|
|
275
|
+
and/or other materials provided with the distribution.
|
|
276
|
+
* Neither the name of Mapbox nor the names of its contributors
|
|
277
|
+
may be used to endorse or promote products derived from this software
|
|
278
|
+
without specific prior written permission.
|
|
279
|
+
|
|
280
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
281
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
282
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
283
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
284
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
285
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
286
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
287
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
288
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
289
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
290
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
291
|
+
|
|
292
|
+
## @mapbox/point-geometry 1.1.0
|
|
293
|
+
|
|
294
|
+
Bundled with the vector-tile decoder for feature geometry.
|
|
295
|
+
Source: <https://github.com/mapbox/point-geometry/tree/v1.1.0>. License: ISC.
|
|
296
|
+
|
|
297
|
+
Copyright (c) 2024, Mapbox
|
|
298
|
+
|
|
299
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
300
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
301
|
+
copyright notice and this permission notice appear in all copies.
|
|
302
|
+
|
|
303
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
304
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
305
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
306
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
307
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
308
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
309
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/dist/artifacts.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { MapLibreStyle, TileflowViewConfig, TileflowStyleOptions } from '@tileflow/core';
|
|
2
|
-
|
|
2
|
+
export { tileflowLandmarkRegionOf, tileflowLandmarkRegionZoom, tileflowLandmarkTileOf, tileflowLandmarkTileZoom } from '@tileflow/core';
|
|
3
|
+
import { TileflowBuildCatalog, TileflowBuildStyles, TileflowMapBuildManifestV1, TileflowRendererDeploymentArtifact, TileflowPreparedMapAssets, TileflowStyleInspection, TileflowMapBuildProvenanceV1 } from '@tileflow/core/build';
|
|
3
4
|
import { TileflowRuntimeManifest } from '@tileflow/core/manifest';
|
|
4
5
|
import { TileflowRenderer, TileflowNativeBuildRecord } from '@tileflow/core/native-profile';
|
|
5
|
-
import { TileflowBuildAsset, TileflowIconResolutionOptions, PreparedTileflowBuildCatalog, TileflowSourceCatalog, PreparedTileflowCatalog } from './icons.js';
|
|
6
|
+
import { T as TileflowBuildAsset, a as TileflowIconResolutionOptions, P as PreparedTileflowBuildCatalog, b as TileflowSourceCatalog, c as PreparedTileflowCatalog } from './icons-B84H8Ymu.js';
|
|
7
|
+
export { d as TileflowBuildingModelLevels, e as TileflowLandmarkSource, f as encodeTileflowLandmarkRegion, p as packageTileflowLandmarkTile, g as prepareTileflowBuildingModel } from './icons-B84H8Ymu.js';
|
|
6
8
|
export { defaultTileflowConfigPath } from './config.js';
|
|
7
9
|
|
|
8
10
|
/**
|
|
@@ -177,6 +179,8 @@ type TileflowBuildArtifactsOptions = {
|
|
|
177
179
|
type TileflowBuildStyleInspections = Record<string, Record<string, TileflowStyleInspection>>;
|
|
178
180
|
/** Compatibility shape consumed by sessions and capture callers. */
|
|
179
181
|
type TileflowBuildArtifacts = {
|
|
182
|
+
/** Local-only prepared handles used to recompile module controls without resolving assets again. */
|
|
183
|
+
mapAssets?: Readonly<Record<string, TileflowPreparedMapAssets>>;
|
|
180
184
|
assets: TileflowBuildAsset[];
|
|
181
185
|
buildManifest: TileflowMapBuildManifestV1;
|
|
182
186
|
/** Present only for native artifact preparation; never part of the runtime manifest. */
|
package/dist/artifacts.js
CHANGED
|
@@ -23,11 +23,15 @@ import {
|
|
|
23
23
|
tileflowArtifactInventoryFileName,
|
|
24
24
|
tileflowArtifactPlanSchemaVersion,
|
|
25
25
|
tileflowArtifactSessionSchemaVersion,
|
|
26
|
+
tileflowLandmarkRegionOf,
|
|
27
|
+
tileflowLandmarkRegionZoom,
|
|
28
|
+
tileflowLandmarkTileOf,
|
|
29
|
+
tileflowLandmarkTileZoom,
|
|
26
30
|
tileflowLineBackgroundGlyphRoute,
|
|
27
31
|
usesTileflowLineBackgroundGlyphs,
|
|
28
32
|
writeTileflowArtifactPlan,
|
|
29
33
|
writeTileflowBuildArtifacts
|
|
30
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-CM6ZTYDJ.js";
|
|
31
35
|
import {
|
|
32
36
|
getTileflowAssetBasePath,
|
|
33
37
|
getTileflowAssetFileName,
|
|
@@ -35,12 +39,16 @@ import {
|
|
|
35
39
|
normalizeTileflowBasePath,
|
|
36
40
|
resolveTileflowArtifactPublicUrls
|
|
37
41
|
} from "./chunk-UTRO4IBQ.js";
|
|
38
|
-
import
|
|
42
|
+
import {
|
|
43
|
+
encodeTileflowLandmarkRegion,
|
|
44
|
+
packageTileflowLandmarkTile,
|
|
45
|
+
prepareTileflowBuildingModel
|
|
46
|
+
} from "./chunk-F4PLTZS4.js";
|
|
39
47
|
import "./chunk-7C4F6GAX.js";
|
|
40
48
|
import "./chunk-KDFTE4Q5.js";
|
|
41
49
|
import {
|
|
42
50
|
defaultTileflowConfigPath
|
|
43
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-AQUGMUZW.js";
|
|
44
52
|
import "./chunk-D4OE4ITL.js";
|
|
45
53
|
import "./chunk-ONYQNLNA.js";
|
|
46
54
|
export {
|
|
@@ -59,6 +67,7 @@ export {
|
|
|
59
67
|
createTileflowStyles,
|
|
60
68
|
defaultTileflowConfigPath,
|
|
61
69
|
disposeTileflowBuildArtifacts,
|
|
70
|
+
encodeTileflowLandmarkRegion,
|
|
62
71
|
getTileflowArtifactFiles,
|
|
63
72
|
getTileflowAssetBasePath,
|
|
64
73
|
getTileflowAssetFileName,
|
|
@@ -66,7 +75,9 @@ export {
|
|
|
66
75
|
isTileflowArtifactInputPath,
|
|
67
76
|
joinTileflowPublicUrl,
|
|
68
77
|
normalizeTileflowBasePath,
|
|
78
|
+
packageTileflowLandmarkTile,
|
|
69
79
|
parseTileflowLineBackgroundGlyphPath,
|
|
80
|
+
prepareTileflowBuildingModel,
|
|
70
81
|
prepareTileflowHostedNativeDeployment,
|
|
71
82
|
prepareTileflowLocalTilesets,
|
|
72
83
|
refreshTileflowArtifactSession,
|
|
@@ -74,6 +85,10 @@ export {
|
|
|
74
85
|
tileflowArtifactInventoryFileName,
|
|
75
86
|
tileflowArtifactPlanSchemaVersion,
|
|
76
87
|
tileflowArtifactSessionSchemaVersion,
|
|
88
|
+
tileflowLandmarkRegionOf,
|
|
89
|
+
tileflowLandmarkRegionZoom,
|
|
90
|
+
tileflowLandmarkTileOf,
|
|
91
|
+
tileflowLandmarkTileZoom,
|
|
77
92
|
tileflowLineBackgroundGlyphRoute,
|
|
78
93
|
usesTileflowLineBackgroundGlyphs,
|
|
79
94
|
writeTileflowArtifactPlan,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
parseResolvedTileflowMap,
|
|
12
12
|
parseTileflowMap,
|
|
13
13
|
tileflowCaptureSceneNameSchema,
|
|
14
|
+
tileflowCaptureShotNameSchema,
|
|
14
15
|
TileflowResolvedMapValidationError
|
|
15
16
|
} from "@tileflow/core";
|
|
16
17
|
import { collectTileflowMapBuildLineage } from "@tileflow/core/build";
|
|
@@ -85,6 +86,15 @@ function assertValidTileflowConfig(project) {
|
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
}
|
|
89
|
+
for (const [shotId, shot] of Object.entries(project.shots ?? {})) {
|
|
90
|
+
if (!Object.hasOwn(project.maps, shot.map)) {
|
|
91
|
+
messages.push({
|
|
92
|
+
level: "error",
|
|
93
|
+
path: `shots.${shotId}.map`,
|
|
94
|
+
message: `Unknown Tileflow map "${shot.map}".`
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
88
98
|
if (messages.length > 0) throw new TileflowValidationError(messages);
|
|
89
99
|
}
|
|
90
100
|
function asTileflowBuildCatalog(input, options = {}) {
|
|
@@ -117,7 +127,8 @@ function asTileflowBuildCatalog(input, options = {}) {
|
|
|
117
127
|
key,
|
|
118
128
|
resolved2,
|
|
119
129
|
collectTileflowMapBuildLineage(map2),
|
|
120
|
-
normalizeSingularMapScenes(map2, resolved2.id)
|
|
130
|
+
normalizeSingularMapScenes(map2, resolved2.id),
|
|
131
|
+
normalizeSingularMapShots(map2, resolved2.id)
|
|
121
132
|
];
|
|
122
133
|
});
|
|
123
134
|
if (entries.length === 0) {
|
|
@@ -138,12 +149,25 @@ function asTileflowBuildCatalog(input, options = {}) {
|
|
|
138
149
|
scenes2.set(sceneId, scene);
|
|
139
150
|
}
|
|
140
151
|
}
|
|
152
|
+
const shots2 = /* @__PURE__ */ new Map();
|
|
153
|
+
for (const [mapId, , , , mapShots] of entries) {
|
|
154
|
+
for (const [shotId, shot] of Object.entries(mapShots ?? {})) {
|
|
155
|
+
if (shots2.has(shotId)) {
|
|
156
|
+
throw tileflowConfigValidationError(
|
|
157
|
+
`maps.${mapId}.shots.${shotId}`,
|
|
158
|
+
new Error(`Tileflow workspace shot "${shotId}" is already defined by another map.`)
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
shots2.set(shotId, shot);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
141
164
|
return {
|
|
142
165
|
mapMetadata: Object.fromEntries(
|
|
143
166
|
entries.map(([id, map2, lineage]) => [id, { id, lineage, version: map2.version }])
|
|
144
167
|
),
|
|
145
168
|
maps: Object.fromEntries(entries.map(([id, map2]) => [id, map2])),
|
|
146
|
-
...scenes2.size > 0 ? { scenes: Object.fromEntries(scenes2) } : {}
|
|
169
|
+
...scenes2.size > 0 ? { scenes: Object.fromEntries(scenes2) } : {},
|
|
170
|
+
...shots2.size > 0 ? { shots: Object.fromEntries(shots2) } : {}
|
|
147
171
|
};
|
|
148
172
|
}
|
|
149
173
|
const map = input;
|
|
@@ -154,6 +178,12 @@ function asTileflowBuildCatalog(input, options = {}) {
|
|
|
154
178
|
} catch (error) {
|
|
155
179
|
throw tileflowConfigValidationError("scenes", error);
|
|
156
180
|
}
|
|
181
|
+
let shots;
|
|
182
|
+
try {
|
|
183
|
+
shots = normalizeSingularMapShots(map, resolved.id);
|
|
184
|
+
} catch (error) {
|
|
185
|
+
throw tileflowConfigValidationError("shots", error);
|
|
186
|
+
}
|
|
157
187
|
return {
|
|
158
188
|
mapMetadata: {
|
|
159
189
|
[resolved.id]: {
|
|
@@ -163,7 +193,8 @@ function asTileflowBuildCatalog(input, options = {}) {
|
|
|
163
193
|
}
|
|
164
194
|
},
|
|
165
195
|
maps: { [resolved.id]: resolved },
|
|
166
|
-
...scenes ? { scenes } : {}
|
|
196
|
+
...scenes ? { scenes } : {},
|
|
197
|
+
...shots ? { shots } : {}
|
|
167
198
|
};
|
|
168
199
|
}
|
|
169
200
|
function parseTileflowCatalogMap(map, path) {
|
|
@@ -215,6 +246,15 @@ function normalizeSingularMapScenes(map, mapId) {
|
|
|
215
246
|
})
|
|
216
247
|
);
|
|
217
248
|
}
|
|
249
|
+
function normalizeSingularMapShots(map, mapId) {
|
|
250
|
+
if (!map.shots) return void 0;
|
|
251
|
+
return Object.fromEntries(
|
|
252
|
+
Object.entries(map.shots).map(([shotId, shot]) => {
|
|
253
|
+
const normalizedShotId = tileflowCaptureShotNameSchema.parse(shotId);
|
|
254
|
+
return [normalizedShotId, { ...shot, map: mapId }];
|
|
255
|
+
})
|
|
256
|
+
);
|
|
257
|
+
}
|
|
218
258
|
function getTileflowMapNames(project) {
|
|
219
259
|
return Object.keys(project.maps);
|
|
220
260
|
}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
getTileflowIconWatchPaths,
|
|
10
10
|
prepareTileflowCatalogIcons
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-F4PLTZS4.js";
|
|
12
12
|
import {
|
|
13
13
|
TileflowStyleValidationError,
|
|
14
14
|
normalizeTileflowStyleValidationIssues,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
defaultTileflowConfigPath,
|
|
20
20
|
getTileflowMapNames,
|
|
21
21
|
loadValidTileflowConfigWithInputs
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AQUGMUZW.js";
|
|
23
23
|
import {
|
|
24
24
|
isPathWithin
|
|
25
25
|
} from "./chunk-D4OE4ITL.js";
|
|
@@ -666,7 +666,7 @@ function rebindNativeLayerReferences(input, lowered, changes) {
|
|
|
666
666
|
if (originalMetadata?.["tileflow:interaction-manifest"] !== void 0) {
|
|
667
667
|
if (!metadata) throw new Error();
|
|
668
668
|
const manifest = object(originalMetadata["tileflow:interaction-manifest"]);
|
|
669
|
-
if (manifest.version !==
|
|
669
|
+
if (manifest.version !== 3) throw new Error();
|
|
670
670
|
const domains = object(manifest.domains);
|
|
671
671
|
let rebound = manifest;
|
|
672
672
|
if (domains.poi !== void 0) {
|
|
@@ -2124,6 +2124,12 @@ async function prepareTileflowHostedNativeDeployment(input) {
|
|
|
2124
2124
|
}
|
|
2125
2125
|
|
|
2126
2126
|
// src/artifacts.ts
|
|
2127
|
+
import {
|
|
2128
|
+
tileflowLandmarkRegionOf,
|
|
2129
|
+
tileflowLandmarkRegionZoom,
|
|
2130
|
+
tileflowLandmarkTileOf,
|
|
2131
|
+
tileflowLandmarkTileZoom
|
|
2132
|
+
} from "@tileflow/core";
|
|
2127
2133
|
var tileflowArtifactPlanSchemaVersion = 1;
|
|
2128
2134
|
var tileflowArtifactInventoryFileName = ".tileflow-artifacts.json";
|
|
2129
2135
|
var TileflowHostedManifestOverwriteError = class extends Error {
|
|
@@ -2274,7 +2280,8 @@ async function createTileflowArtifactPlan(prepared, options = {}) {
|
|
|
2274
2280
|
sourceAssets: {
|
|
2275
2281
|
fonts: preparedFonts.sourceIdentities[mapName] ?? [],
|
|
2276
2282
|
icons: prepared.mapIconSources[mapName] ?? [],
|
|
2277
|
-
...prepared.mapIconCompositions[mapName] ? { iconComposition: prepared.mapIconCompositions[mapName] } : {}
|
|
2283
|
+
...prepared.mapIconCompositions[mapName] ? { iconComposition: prepared.mapIconCompositions[mapName] } : {},
|
|
2284
|
+
...prepared.mapModelSources?.[mapName]?.length ? { models: prepared.mapModelSources[mapName] } : {}
|
|
2278
2285
|
},
|
|
2279
2286
|
styles: style
|
|
2280
2287
|
}
|
|
@@ -2300,6 +2307,7 @@ async function createTileflowArtifactPlan(prepared, options = {}) {
|
|
|
2300
2307
|
)
|
|
2301
2308
|
};
|
|
2302
2309
|
const partial = {
|
|
2310
|
+
mapAssets: prepared.mapAssets,
|
|
2303
2311
|
assets,
|
|
2304
2312
|
buildManifest,
|
|
2305
2313
|
...renderer === "native" ? {
|
|
@@ -2454,7 +2462,12 @@ function createGenerationArtifactFiles(artifacts, generation, nativeUrls) {
|
|
|
2454
2462
|
} : style;
|
|
2455
2463
|
const replaceFontSources = artifacts.nativeBuild ? replaceTileflowNativeFontSources : replaceTileflowStyleFontSources;
|
|
2456
2464
|
const generationStyle = replaceFontSources(
|
|
2457
|
-
|
|
2465
|
+
withGenerationBuildingModels(
|
|
2466
|
+
generationStyleWithSprite,
|
|
2467
|
+
mapName,
|
|
2468
|
+
generation,
|
|
2469
|
+
artifacts.assets
|
|
2470
|
+
),
|
|
2458
2471
|
(source) => retargetLocalFontAssetUrl(source, artifacts.assets, generation)
|
|
2459
2472
|
);
|
|
2460
2473
|
if (artifacts.nativeBuild)
|
|
@@ -2588,6 +2601,27 @@ async function findNearestLockfile(cwd) {
|
|
|
2588
2601
|
directory = parent;
|
|
2589
2602
|
}
|
|
2590
2603
|
}
|
|
2604
|
+
function withGenerationBuildingModels(style, mapName, generation, assets) {
|
|
2605
|
+
const metadata = style.metadata;
|
|
2606
|
+
const buildings = metadata?.["tileflow:buildings"];
|
|
2607
|
+
if (!buildings || !Array.isArray(buildings.models)) return style;
|
|
2608
|
+
const models = buildings.models.map((entry) => {
|
|
2609
|
+
const url = entry.url;
|
|
2610
|
+
if (typeof url !== "string" || isRelativePublicUrl(url)) return entry;
|
|
2611
|
+
const file = url.slice(url.lastIndexOf("/") + 1);
|
|
2612
|
+
const logical = `models/${mapName}/${file}`;
|
|
2613
|
+
if (!url.endsWith(`/${logical}`) || !assets.some((asset) => asset.fileName === logical))
|
|
2614
|
+
return entry;
|
|
2615
|
+
return {
|
|
2616
|
+
...entry,
|
|
2617
|
+
url: insertGenerationInPublicUrl(url, logical, generation)
|
|
2618
|
+
};
|
|
2619
|
+
});
|
|
2620
|
+
return {
|
|
2621
|
+
...style,
|
|
2622
|
+
metadata: { ...metadata, "tileflow:buildings": { ...buildings, models } }
|
|
2623
|
+
};
|
|
2624
|
+
}
|
|
2591
2625
|
function insertGenerationInPublicUrl(url, logicalPath, generation) {
|
|
2592
2626
|
const marker = `/${logicalPath}`;
|
|
2593
2627
|
const index = url.lastIndexOf(marker);
|
|
@@ -2938,7 +2972,10 @@ function assertTileflowArtifactFileName(fileName) {
|
|
|
2938
2972
|
const logicalName = fileName.replace(/^generations\/[a-f0-9]{64}\//, "");
|
|
2939
2973
|
const styleMatch = /^styles\/([^/]+)\/([^/]+)\.json$/u.exec(logicalName);
|
|
2940
2974
|
const iconMatch = /^icons\/([^/]+)\/sprite(?:@2x)?\.(?:json|png)$/u.exec(logicalName);
|
|
2941
|
-
|
|
2975
|
+
const modelMatch = /^models\/([^/]+)\/[a-z0-9]+(?:-[a-z0-9]+)*-[a-f0-9]{16}\.glb$/u.exec(
|
|
2976
|
+
logicalName
|
|
2977
|
+
);
|
|
2978
|
+
if (fileName === "manifest.json" || fileName === tileflowMapBuildManifestFileName || fileName === tileflowNativeBuildRecordFileName || styleMatch && tileflowMapIdSchema.safeParse(styleMatch[1]).success && tileflowThemeNameSchema.safeParse(styleMatch[2]).success || iconMatch && tileflowMapIdSchema.safeParse(iconMatch[1]).success || modelMatch && tileflowMapIdSchema.safeParse(modelMatch[1]).success || /^tilesets\/[A-Za-z0-9][A-Za-z0-9._-]{0,127}\.pmtiles$/u.test(logicalName) || /^fonts\/[a-z0-9]+(?:-[a-z0-9]+)*-[a-f0-9]{64}\.(?:otf|ttf|woff2)$/.test(logicalName) || /^fonts\/licenses\/license-[a-f0-9]{64}\.txt$/.test(logicalName)) {
|
|
2942
2979
|
return;
|
|
2943
2980
|
}
|
|
2944
2981
|
throw new Error(`Unexpected Tileflow managed artifact file name: ${fileName}`);
|
|
@@ -3057,5 +3094,9 @@ export {
|
|
|
3057
3094
|
disposeTileflowBuildArtifacts,
|
|
3058
3095
|
writeTileflowArtifactPlan,
|
|
3059
3096
|
assertNoLocalTilesetsForProduction,
|
|
3060
|
-
assertTileflowSelfHostedManifestTarget
|
|
3097
|
+
assertTileflowSelfHostedManifestTarget,
|
|
3098
|
+
tileflowLandmarkRegionOf,
|
|
3099
|
+
tileflowLandmarkRegionZoom,
|
|
3100
|
+
tileflowLandmarkTileOf,
|
|
3101
|
+
tileflowLandmarkTileZoom
|
|
3061
3102
|
};
|