@tileflow/dev 0.1.0-alpha.4 → 0.1.0-alpha.40

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 (45) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +257 -5
  3. package/THIRD_PARTY_NOTICES.md +309 -0
  4. package/dist/artifacts.d.ts +269 -0
  5. package/dist/artifacts.js +98 -0
  6. package/dist/chunk-AQUGMUZW.js +324 -0
  7. package/dist/chunk-AVJMTXW5.js +3147 -0
  8. package/dist/chunk-C4VPHZ3F.js +4062 -0
  9. package/dist/chunk-D4OE4ITL.js +13 -0
  10. package/dist/chunk-FOMTSCOP.js +671 -0
  11. package/dist/chunk-KDFTE4Q5.js +156 -0
  12. package/dist/chunk-ONYQNLNA.js +1108 -0
  13. package/dist/chunk-RTU7TD4M.js +172 -0
  14. package/dist/chunk-XHJBCVBB.js +241 -0
  15. package/dist/config.d.ts +33 -0
  16. package/dist/config.js +27 -0
  17. package/dist/fonts.d.ts +47 -0
  18. package/dist/fonts.js +16 -0
  19. package/dist/icons-BIHpw5Zy.d.ts +417 -0
  20. package/dist/icons.d.ts +3 -0
  21. package/dist/icons.js +41 -0
  22. package/dist/inspect.d.ts +149 -0
  23. package/dist/inspect.js +805 -0
  24. package/dist/inspector-browser.js +16955 -0
  25. package/dist/inspector-observer.js +95 -0
  26. package/dist/preview-assets-ATLLYY72.js +103 -0
  27. package/dist/preview.d.ts +31 -0
  28. package/dist/preview.js +1972 -0
  29. package/dist/server.d.ts +89 -0
  30. package/dist/server.js +3657 -0
  31. package/dist/tilesets.d.ts +89 -0
  32. package/dist/tilesets.js +6 -0
  33. package/dist/validation.d.ts +65 -0
  34. package/dist/validation.js +24 -0
  35. package/package.json +77 -13
  36. package/ui-fonts/hubot-sans-OFL.txt +93 -0
  37. package/ui-fonts/hubot-sans.woff2 +0 -0
  38. package/ui-fonts/inter-OFL.txt +92 -0
  39. package/ui-fonts/inter.woff2 +0 -0
  40. package/ui-fonts/jetbrains-mono-OFL.txt +93 -0
  41. package/ui-fonts/jetbrains-mono.woff2 +0 -0
  42. package/ui-fonts/mona-sans-OFL.txt +93 -0
  43. package/ui-fonts/mona-sans.woff2 +0 -0
  44. package/dist/index.d.ts +0 -54
  45. package/dist/index.js +0 -314
@@ -0,0 +1,309 @@
1
+ # Third-party notices
2
+
3
+ This file records third-party components used by Node preparation and preview. Official map artwork
4
+ and fonts are owned and published by `@tileflow/maps`; `@tileflow/dev` does not carry an `assets/`
5
+ directory. Inspector 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
+ ## Inspector 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.
15
+
16
+ ## Bitmap distance transform
17
+
18
+ `src/icon-distance.ts` adapts the alpha distance transform from bitmap-sdf 1.0.4 for bounded,
19
+ Node-only sprite preparation. The adaptation removes browser globals and adds input validation.
20
+ Source: <https://github.com/dy/bitmap-sdf>. License: MIT.
21
+
22
+ Copyright 2020 Dmitry Ivanov
23
+
24
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
25
+ associated documentation files (the “Software”), to deal in the Software without restriction,
26
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
27
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
28
+ furnished to do so, subject to the following conditions:
29
+
30
+ The above copyright notice and this permission notice shall be included in all copies or
31
+ substantial portions of the Software.
32
+
33
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
34
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
36
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38
+
39
+ ## Package-owned map fonts
40
+
41
+ The generic font preparation pipeline reads map-owned TTF, OTF, and WOFF2 directories; it does not
42
+ embed map fonts in `@tileflow/dev`. Each source directory must carry its own `LICENSE.txt`, which is
43
+ copied into the deterministic build artifacts whenever that directory contributes a selected face.
44
+
45
+ The source repository's generic font tests retain pinned Oxanium fixtures and their complete
46
+ SIL Open Font License 1.1 notice under `test/fixtures/fonts/oxanium/`. These fixtures are not
47
+ included in the published package. Community map fonts are owned by
48
+ [Community Maps](https://github.com/tileflow/community-maps).
49
+
50
+ ## fontkit 2.0.4
51
+
52
+ Font metadata for TTF, OTF, and WOFF2 inputs is read with the separately installed `fontkit`
53
+ package. fontkit is copyright Devon Govett and contributors and is distributed under the MIT
54
+ License.
55
+
56
+ - Source: <https://github.com/foliojs/fontkit/tree/v2.0.4>
57
+ - License: <https://github.com/foliojs/fontkit/blob/v2.0.4/LICENSE>
58
+
59
+ ## PMTiles JavaScript 4.5.0
60
+
61
+ Local tileset inspection uses the separately installed `pmtiles` package to read vector and raster
62
+ tiles from local PMTiles archives. PMTiles is copyright Protomaps and
63
+ contributors and is distributed under the BSD 3-Clause License. Its `fflate` dependency is
64
+ copyright 2020 Arjun Barrett and is distributed under the MIT License.
65
+
66
+ - PMTiles source and license: <https://github.com/protomaps/PMTiles/tree/v4.5.0/js>
67
+ - fflate source and license: <https://github.com/101arrowz/fflate/tree/v0.8.3>
68
+
69
+ ## sharp 0.35.5
70
+
71
+ `@tileflow/dev` declares `sharp` as an optional dependency and loads it dynamically only when local
72
+ SVG or raster icon sources must be inspected and packed. The Tileflow build externalizes `sharp`
73
+ rather than bundling it. `sharp` is copyright Lovell Fuller and contributors and is distributed under
74
+ the Apache License 2.0.
75
+
76
+ - Source: <https://github.com/lovell/sharp/tree/v0.35.5>
77
+ - License: <https://github.com/lovell/sharp/blob/v0.35.5/LICENSE>
78
+
79
+ ## sharp libvips distributions 1.3.4
80
+
81
+ `sharp` selects a separate optional `@img/sharp-libvips-*` package for the current platform. The
82
+ installed platform-package manifest declares `LGPL-3.0-or-later`; the packaging scripts themselves
83
+ are distributed under Apache-2.0. The packages contain prebuilt libvips and separately licensed
84
+ runtime dependencies. For `sharp` 0.35.5 the selected libvips ABI is 8.18.7.
85
+
86
+ - Packaging source: <https://github.com/lovell/sharp-libvips/tree/v1.3.4>
87
+ - Packaging-script license: <https://github.com/lovell/sharp-libvips/blob/v1.3.4/LICENSE>
88
+ - libvips 8.18.7 source: <https://github.com/libvips/libvips/tree/v8.18.7>
89
+ - libvips 8.18.7 license (LGPL-2.1-or-later):
90
+ <https://github.com/libvips/libvips/blob/v8.18.7/LICENSE>
91
+
92
+ Because `sharp` remains a separately installed optional package, users can install, update, remove,
93
+ or replace it independently of `@tileflow/dev`. Tileflow does not modify libvips and does not place a
94
+ libvips shared library or a `sharp` native addon inside any Tileflow package tarball. Release smoke
95
+ tests enforce that package boundary.
96
+
97
+ ## MapLibre style specification 24.8.5
98
+
99
+ The Inspector 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 Inspector 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.
@@ -0,0 +1,269 @@
1
+ import { MapLibreStyle, TileflowViewConfig, TileflowStyleOptions } from '@tileflow/core';
2
+ export { TileflowLandmarkFootprint, readTileflowLandmarkTileFootprints, tileflowLandmarkRegionOf, tileflowLandmarkRegionZoom, tileflowLandmarkTileOf, tileflowLandmarkTileZoom } from '@tileflow/core';
3
+ import { TileflowBuildCatalog, TileflowBuildStyles, TileflowMapBuildManifestV1, TileflowRendererDeploymentArtifact, TileflowPreparedMapAssets, TileflowStyleInspection, TileflowMapBuildProvenanceV1 } from '@tileflow/core/build';
4
+ import { TileflowRuntimeManifest } from '@tileflow/core/manifest';
5
+ import { TileflowRenderer, TileflowNativeBuildRecord } from '@tileflow/core/native-profile';
6
+ import { T as TileflowBuildAsset, a as TileflowIconResolutionOptions, P as PreparedTileflowBuildCatalog, b as TileflowSourceCatalog, c as PreparedTileflowCatalog } from './icons-BIHpw5Zy.js';
7
+ export { d as TileflowBuildingModelLevels, e as TileflowLandmarkSource, f as encodeTileflowLandmarkRegion, p as packageTileflowLandmarkTile, g as prepareTileflowBuildingModel } from './icons-BIHpw5Zy.js';
8
+ export { defaultTileflowConfigPath } from './config.js';
9
+
10
+ /**
11
+ * Local glyph serving for line-fitted text backgrounds.
12
+ *
13
+ * A style whose text uses a derived `<stack> lines-v1-…` font stack needs a glyph provider that
14
+ * derives those ranges. Local previews and captures route such a map's glyph URL through
15
+ * `__glyphs/<map>/…`: ordinary stacks pass through from the map's declared provider unchanged, and
16
+ * derived stacks are computed from their source stack's range. Production output keeps the
17
+ * declared provider, which must serve derived stacks itself.
18
+ */
19
+ declare const tileflowLineBackgroundGlyphRoute = "__glyphs";
20
+ /** Map name to the upstream glyph URL template its styles declared. Local only; never serialized. */
21
+ type TileflowLineBackgroundGlyphProviders = Readonly<Record<string, string>>;
22
+ type TileflowLineBackgroundGlyphResponderOptions = {
23
+ /** Project root; ranges are cached under `.tileflow/cache/glyphs/v1`. */
24
+ cwd: string;
25
+ fetch?: typeof globalThis.fetch;
26
+ };
27
+ type TileflowLineBackgroundGlyphResponder = (upstream: string, fontStack: string, range: string) => Promise<Response>;
28
+ /** Whether a compiled style draws text with a derived line-background stack. */
29
+ declare function usesTileflowLineBackgroundGlyphs(style: MapLibreStyle): boolean;
30
+ /** Parses `/__glyphs/<map>/<fontstack>/<range>.pbf` from a decoded route path. */
31
+ declare function parseTileflowLineBackgroundGlyphPath(path: string): {
32
+ fontStack: string;
33
+ mapName: string;
34
+ range: string;
35
+ } | undefined;
36
+ /**
37
+ * Serves one glyph range for a declared upstream template. Upstream ranges are cached on disk;
38
+ * derived ranges are recomputed from them and kept in a bounded in-memory cache.
39
+ */
40
+ declare function createTileflowLineBackgroundGlyphResponder(options: TileflowLineBackgroundGlyphResponderOptions): TileflowLineBackgroundGlyphResponder;
41
+
42
+ type TileflowLocalTilesetFile = Readonly<{
43
+ byteLength: number;
44
+ etag: string;
45
+ fileName: string;
46
+ logicalId: string;
47
+ sourcePath: string;
48
+ }>;
49
+ declare function prepareTileflowLocalTilesets(project: TileflowBuildCatalog, styles: TileflowBuildStyles, options: {
50
+ assetBaseUrl: string;
51
+ baseDirectory: string;
52
+ cwd: string;
53
+ }): Promise<{
54
+ dispose(): Promise<void>;
55
+ files: TileflowLocalTilesetFile[];
56
+ styles: TileflowBuildStyles;
57
+ watchPaths: string[];
58
+ }>;
59
+
60
+ declare const tileflowArtifactSessionSchemaVersion: 1;
61
+ type TileflowArtifactDiagnostic = {
62
+ code?: string;
63
+ message: string;
64
+ path: string;
65
+ phase?: string;
66
+ renderer?: 'native';
67
+ profile?: 'native-v1';
68
+ severity?: 'error';
69
+ suggestion?: string;
70
+ };
71
+ type TileflowArtifactSessionState = {
72
+ status: 'building';
73
+ generation: number;
74
+ lastGoodGeneration?: number;
75
+ } | {
76
+ status: 'ready';
77
+ generation: number;
78
+ artifacts: TileflowBuildArtifacts;
79
+ lastGoodGeneration: number;
80
+ } | {
81
+ status: 'invalid';
82
+ generation: number;
83
+ diagnostics: TileflowArtifactDiagnostic[];
84
+ lastGoodGeneration?: number;
85
+ };
86
+ type TileflowArtifactSessionOptions = TileflowBuildArtifactsOptions & {
87
+ debounceMs?: number;
88
+ ignoredPaths?: string[];
89
+ watch?: boolean;
90
+ };
91
+ type TileflowArtifactAcquisition = Readonly<{
92
+ artifacts: TileflowBuildArtifacts;
93
+ generation: number;
94
+ release(): Promise<void>;
95
+ }>;
96
+ type TileflowArtifactSession = {
97
+ /** Pins the current generation for asynchronous work; the caller must release it. */
98
+ acquireArtifacts(generation?: number): TileflowArtifactAcquisition | undefined;
99
+ close(): Promise<void>;
100
+ /** Borrowed synchronous view. Use acquireArtifacts() before retaining it across an await. */
101
+ getLastGoodArtifacts(): TileflowBuildArtifacts | undefined;
102
+ /** Ready-state artifacts are a borrowed synchronous view. */
103
+ getState(): TileflowArtifactSessionState;
104
+ refresh(reason?: string): Promise<void>;
105
+ subscribe(listener: (state: TileflowArtifactSessionState) => void): () => void;
106
+ };
107
+ declare function createTileflowArtifactDiagnostics(error: unknown, cwd: string): TileflowArtifactDiagnostic[];
108
+
109
+ type Input = Readonly<{
110
+ mapId: string;
111
+ buildManifest: TileflowMapBuildManifestV1;
112
+ styles: Readonly<Record<string, MapLibreStyle>>;
113
+ teamSources: Readonly<Record<string, Readonly<{
114
+ tileset: string;
115
+ type: 'raster' | 'vector';
116
+ }>>>;
117
+ assets: readonly TileflowBuildAsset[];
118
+ view?: TileflowViewConfig;
119
+ }>;
120
+ /**
121
+ * Prepare both representations from the same already compiled, asset-bound web family.
122
+ * This has no network or publication port. Call it before any authenticated remote operation.
123
+ * Logical Hosted placeholders are validated syntactically without granting delivery authority.
124
+ */
125
+ declare function prepareTileflowHostedNativeDeployment(input: Input): Promise<TileflowRendererDeploymentArtifact>;
126
+
127
+ /** Normalize a development route base. This is a URL pathname, never a filesystem path. */
128
+ declare function normalizeTileflowBasePath(value?: string): string;
129
+ /**
130
+ * Join a bundler public URL prefix to the Tileflow route without changing URL-reference kind.
131
+ * In particular, `./` and `../` remain path-relative rather than becoming root-relative.
132
+ */
133
+ declare function joinTileflowPublicUrl(publicBase: string, basePath: string): string;
134
+ /**
135
+ * Resolve the public URL at which a manifest is exposed and the URLs embedded inside its artifacts.
136
+ * Path-relative deployments use owner-relative references because the manifest already lives below
137
+ * the public prefix.
138
+ */
139
+ declare function resolveTileflowArtifactPublicUrls(publicBase: string, basePath: string): {
140
+ assetBaseUrl?: string;
141
+ publicBaseUrl: string;
142
+ styleBaseUrl: string;
143
+ };
144
+ /** Convert a validated route base to a bundler-relative asset prefix. */
145
+ declare function getTileflowAssetBasePath(basePath: string): string;
146
+ declare function getTileflowAssetFileName(basePath: string, fileName: string): string;
147
+
148
+ declare const tileflowArtifactPlanSchemaVersion: 1;
149
+ declare const tileflowArtifactInventoryFileName = ".tileflow-artifacts.json";
150
+ type TileflowManifestOptions = {
151
+ styleBaseUrl?: string;
152
+ };
153
+ type TileflowBuildArtifactsOptions = {
154
+ apiBaseUrl?: string;
155
+ assetBaseUrl?: string;
156
+ config?: string;
157
+ cwd?: string;
158
+ /**
159
+ * Native local preview only: the exact HTTP origin serving these artifacts, such as
160
+ * `http://127.0.0.1:3333`. Native checks accept HTTP resources at this origin only; every other
161
+ * origin still requires HTTPS. It is never inferred, and web or production output rejects it.
162
+ */
163
+ developmentOrigin?: string;
164
+ /**
165
+ * Explicit shared Icon Set resolution settings for this build.
166
+ *
167
+ * Builds never resolve a catalog head. These options only choose the verified cache root,
168
+ * offline behavior, trusted delivery origins and the transport used to hydrate exact pins.
169
+ */
170
+ icons?: TileflowIconResolutionOptions;
171
+ /** Artifact renderer. Omission is identical to web; native uses a separate output directory. */
172
+ renderer?: TileflowRenderer;
173
+ /** Build a memory-only compiler sidecar for local authoring tools. */
174
+ inspection?: boolean;
175
+ styleBaseUrl?: string;
176
+ /** Local tools may snapshot local PMTiles; production output must resolve them explicitly. */
177
+ target?: 'local' | 'production';
178
+ };
179
+ type TileflowBuildStyleInspections = Record<string, Record<string, TileflowStyleInspection>>;
180
+ /** Compatibility shape consumed by sessions and capture callers. */
181
+ type TileflowBuildArtifacts = {
182
+ /** Local-only prepared handles used to recompile module controls without resolving assets again. */
183
+ mapAssets?: Readonly<Record<string, TileflowPreparedMapAssets>>;
184
+ assets: TileflowBuildAsset[];
185
+ buildManifest: TileflowMapBuildManifestV1;
186
+ /** Present only for native artifact preparation; never part of the runtime manifest. */
187
+ nativeBuild?: TileflowNativeBuildRecord;
188
+ /** Releases local immutable snapshot references owned by this artifact generation. */
189
+ dispose?: () => Promise<void>;
190
+ manifest: TileflowRuntimeManifest;
191
+ project: TileflowBuildCatalog;
192
+ /** Local-only archive ports. Paths never enter serialized build artifacts. */
193
+ localTilesets?: TileflowLocalTilesetFile[];
194
+ /** Local-only upstream glyph templates for maps whose text uses line-fitted backgrounds. */
195
+ lineBackgroundGlyphs?: TileflowLineBackgroundGlyphProviders;
196
+ /** Optional local-only provenance. It is never serialized as a build artifact. */
197
+ styleInspections?: TileflowBuildStyleInspections;
198
+ styles: TileflowBuildStyles;
199
+ watchPaths: string[];
200
+ };
201
+ type TileflowArtifactFile = TileflowBuildAsset;
202
+ type TileflowArtifactInputGraph = {
203
+ /** Exact executable config modules and data files observed during evaluation. */
204
+ files: string[];
205
+ /** Asset directories whose children can change without changing the config module. */
206
+ directories: string[];
207
+ };
208
+ /**
209
+ * Complete, deterministic output of compiling one prepared source generation.
210
+ * `sourceProject` is retained for diagnostics only; `project` is the portable runtime input.
211
+ */
212
+ type TileflowArtifactPlan = TileflowBuildArtifacts & {
213
+ files: TileflowArtifactFile[];
214
+ inputs: TileflowArtifactInputGraph;
215
+ project: PreparedTileflowBuildCatalog;
216
+ schemaVersion: typeof tileflowArtifactPlanSchemaVersion;
217
+ sourceProject: TileflowSourceCatalog;
218
+ };
219
+ type CreateTileflowArtifactPlanOptions = Pick<TileflowBuildArtifactsOptions, 'apiBaseUrl' | 'assetBaseUrl' | 'developmentOrigin' | 'inspection' | 'renderer' | 'styleBaseUrl' | 'target'> & {
220
+ inputFiles?: readonly string[];
221
+ };
222
+ type WriteTileflowArtifactPlanOptions = {
223
+ cwd?: string;
224
+ outDir: string;
225
+ /** Explicit escape hatch for replacing a Hosted delivery manifest with self-hosted artifacts. */
226
+ overwriteHostedManifest?: boolean;
227
+ };
228
+ type WriteTileflowBuildArtifactsOptions = TileflowBuildArtifactsOptions & WriteTileflowArtifactPlanOptions;
229
+ declare class TileflowHostedManifestOverwriteError extends Error {
230
+ readonly code: "HOSTED_MANIFEST_OVERWRITE_REFUSED";
231
+ constructor(path: string);
232
+ }
233
+ declare class TileflowLocalTilesetProductionError extends Error {
234
+ readonly code: "TF_LOCAL_TILESET_PRODUCTION_UNRESOLVED";
235
+ constructor();
236
+ }
237
+ declare function createTileflowManifest(project: TileflowBuildCatalog, options?: TileflowManifestOptions): TileflowRuntimeManifest;
238
+ declare function createTileflowStyle(project: TileflowBuildCatalog, mapName: string, options?: TileflowStyleOptions): MapLibreStyle;
239
+ declare function createTileflowStyles(project: TileflowBuildCatalog, options?: Omit<TileflowStyleOptions, 'preparedAssets' | 'theme'> & {
240
+ mapAssets?: Readonly<Record<string, TileflowPreparedMapAssets>>;
241
+ }): TileflowBuildStyles;
242
+ /** Compiles only a prepared project, keeping local source resolution out of core compilation. */
243
+ declare function createTileflowArtifactPlan(prepared: PreparedTileflowCatalog, options?: CreateTileflowArtifactPlanOptions): Promise<TileflowArtifactPlan>;
244
+ declare function createTileflowBuildArtifacts(options?: TileflowBuildArtifactsOptions): Promise<TileflowArtifactPlan>;
245
+ declare function getTileflowArtifactFiles(artifacts: TileflowBuildArtifacts): TileflowArtifactFile[];
246
+ /** Resolve portable build provenance without making it part of any map authoring revision. */
247
+ declare function createTileflowBuildProvenance(cwd: string): Promise<TileflowMapBuildProvenanceV1>;
248
+ declare function createTileflowArtifactSession(options?: TileflowArtifactSessionOptions): Promise<TileflowArtifactSession>;
249
+ declare function getTileflowWatchPaths(options?: Pick<TileflowBuildArtifactsOptions, 'config' | 'cwd'>): Promise<string[]>;
250
+ declare function isTileflowArtifactInputPath(inputs: TileflowArtifactInputGraph, path: string): boolean;
251
+ /** Shared refresh gate for adapters that receive filesystem or framework lifecycle events. */
252
+ declare function refreshTileflowArtifactSession(session: TileflowArtifactSession, options: {
253
+ inputPath?: string;
254
+ reason: string;
255
+ }): Promise<boolean>;
256
+ declare function writeTileflowBuildArtifacts(options: WriteTileflowBuildArtifactsOptions): Promise<TileflowArtifactPlan>;
257
+ declare function disposeTileflowBuildArtifacts(artifacts: Pick<TileflowBuildArtifacts, 'dispose'>): Promise<void>;
258
+ /**
259
+ * Replaces one managed artifact generation and records its exact file inventory. Unmanaged files
260
+ * are never scanned or removed. A caught filesystem failure restores every previous managed file.
261
+ */
262
+ declare function writeTileflowArtifactPlan(artifacts: TileflowArtifactPlan, options: WriteTileflowArtifactPlanOptions): Promise<void>;
263
+ declare function assertNoLocalTilesetsForProduction(artifacts: Pick<TileflowBuildArtifacts, 'localTilesets'>): void;
264
+ /** Prevents a framework build from silently replacing the frontend's Hosted delivery contract. */
265
+ declare function assertTileflowSelfHostedManifestTarget(manifestPath: string, options?: {
266
+ overwriteHostedManifest?: boolean;
267
+ }): Promise<void>;
268
+
269
+ export { type CreateTileflowArtifactPlanOptions, PreparedTileflowBuildCatalog, PreparedTileflowCatalog, type TileflowArtifactAcquisition, type TileflowArtifactDiagnostic, type TileflowArtifactFile, type TileflowArtifactInputGraph, type TileflowArtifactPlan, type TileflowArtifactSession, type TileflowArtifactSessionOptions, type TileflowArtifactSessionState, type TileflowBuildArtifacts, type TileflowBuildArtifactsOptions, TileflowBuildAsset, type TileflowBuildStyleInspections, TileflowHostedManifestOverwriteError, TileflowIconResolutionOptions, type TileflowLineBackgroundGlyphProviders, type TileflowLineBackgroundGlyphResponder, type TileflowLocalTilesetFile, TileflowLocalTilesetProductionError, type TileflowManifestOptions, TileflowSourceCatalog, type WriteTileflowArtifactPlanOptions, type WriteTileflowBuildArtifactsOptions, assertNoLocalTilesetsForProduction, assertTileflowSelfHostedManifestTarget, createTileflowArtifactDiagnostics, createTileflowArtifactPlan, createTileflowArtifactSession, createTileflowBuildArtifacts, createTileflowBuildProvenance, createTileflowLineBackgroundGlyphResponder, createTileflowManifest, createTileflowStyle, createTileflowStyles, disposeTileflowBuildArtifacts, getTileflowArtifactFiles, getTileflowAssetBasePath, getTileflowAssetFileName, getTileflowWatchPaths, isTileflowArtifactInputPath, joinTileflowPublicUrl, normalizeTileflowBasePath, parseTileflowLineBackgroundGlyphPath, prepareTileflowHostedNativeDeployment, prepareTileflowLocalTilesets, refreshTileflowArtifactSession, resolveTileflowArtifactPublicUrls, tileflowArtifactInventoryFileName, tileflowArtifactPlanSchemaVersion, tileflowArtifactSessionSchemaVersion, tileflowLineBackgroundGlyphRoute, usesTileflowLineBackgroundGlyphs, writeTileflowArtifactPlan, writeTileflowBuildArtifacts };
@@ -0,0 +1,98 @@
1
+ import {
2
+ TileflowHostedManifestOverwriteError,
3
+ TileflowLocalTilesetProductionError,
4
+ assertNoLocalTilesetsForProduction,
5
+ assertTileflowSelfHostedManifestTarget,
6
+ createTileflowArtifactDiagnostics,
7
+ createTileflowArtifactPlan,
8
+ createTileflowArtifactSession,
9
+ createTileflowBuildArtifacts,
10
+ createTileflowBuildProvenance,
11
+ createTileflowLineBackgroundGlyphResponder,
12
+ createTileflowManifest,
13
+ createTileflowStyle,
14
+ createTileflowStyles,
15
+ disposeTileflowBuildArtifacts,
16
+ getTileflowArtifactFiles,
17
+ getTileflowWatchPaths,
18
+ isTileflowArtifactInputPath,
19
+ parseTileflowLineBackgroundGlyphPath,
20
+ prepareTileflowHostedNativeDeployment,
21
+ prepareTileflowLocalTilesets,
22
+ readTileflowLandmarkTileFootprints,
23
+ refreshTileflowArtifactSession,
24
+ tileflowArtifactInventoryFileName,
25
+ tileflowArtifactPlanSchemaVersion,
26
+ tileflowArtifactSessionSchemaVersion,
27
+ tileflowLandmarkRegionOf,
28
+ tileflowLandmarkRegionZoom,
29
+ tileflowLandmarkTileOf,
30
+ tileflowLandmarkTileZoom,
31
+ tileflowLineBackgroundGlyphRoute,
32
+ usesTileflowLineBackgroundGlyphs,
33
+ writeTileflowArtifactPlan,
34
+ writeTileflowBuildArtifacts
35
+ } from "./chunk-AVJMTXW5.js";
36
+ import {
37
+ getTileflowAssetBasePath,
38
+ getTileflowAssetFileName,
39
+ joinTileflowPublicUrl,
40
+ normalizeTileflowBasePath,
41
+ resolveTileflowArtifactPublicUrls
42
+ } from "./chunk-FOMTSCOP.js";
43
+ import {
44
+ encodeTileflowLandmarkRegion,
45
+ packageTileflowLandmarkTile,
46
+ prepareTileflowBuildingModel
47
+ } from "./chunk-C4VPHZ3F.js";
48
+ import "./chunk-RTU7TD4M.js";
49
+ import "./chunk-KDFTE4Q5.js";
50
+ import {
51
+ defaultTileflowConfigPath
52
+ } from "./chunk-AQUGMUZW.js";
53
+ import "./chunk-D4OE4ITL.js";
54
+ import "./chunk-ONYQNLNA.js";
55
+ export {
56
+ TileflowHostedManifestOverwriteError,
57
+ TileflowLocalTilesetProductionError,
58
+ assertNoLocalTilesetsForProduction,
59
+ assertTileflowSelfHostedManifestTarget,
60
+ createTileflowArtifactDiagnostics,
61
+ createTileflowArtifactPlan,
62
+ createTileflowArtifactSession,
63
+ createTileflowBuildArtifacts,
64
+ createTileflowBuildProvenance,
65
+ createTileflowLineBackgroundGlyphResponder,
66
+ createTileflowManifest,
67
+ createTileflowStyle,
68
+ createTileflowStyles,
69
+ defaultTileflowConfigPath,
70
+ disposeTileflowBuildArtifacts,
71
+ encodeTileflowLandmarkRegion,
72
+ getTileflowArtifactFiles,
73
+ getTileflowAssetBasePath,
74
+ getTileflowAssetFileName,
75
+ getTileflowWatchPaths,
76
+ isTileflowArtifactInputPath,
77
+ joinTileflowPublicUrl,
78
+ normalizeTileflowBasePath,
79
+ packageTileflowLandmarkTile,
80
+ parseTileflowLineBackgroundGlyphPath,
81
+ prepareTileflowBuildingModel,
82
+ prepareTileflowHostedNativeDeployment,
83
+ prepareTileflowLocalTilesets,
84
+ readTileflowLandmarkTileFootprints,
85
+ refreshTileflowArtifactSession,
86
+ resolveTileflowArtifactPublicUrls,
87
+ tileflowArtifactInventoryFileName,
88
+ tileflowArtifactPlanSchemaVersion,
89
+ tileflowArtifactSessionSchemaVersion,
90
+ tileflowLandmarkRegionOf,
91
+ tileflowLandmarkRegionZoom,
92
+ tileflowLandmarkTileOf,
93
+ tileflowLandmarkTileZoom,
94
+ tileflowLineBackgroundGlyphRoute,
95
+ usesTileflowLineBackgroundGlyphs,
96
+ writeTileflowArtifactPlan,
97
+ writeTileflowBuildArtifacts
98
+ };