@tileflow/core 0.1.0-alpha.20 → 0.1.0-alpha.22

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.
@@ -0,0 +1,243 @@
1
+ # Third-party notices
2
+
3
+ `@tileflow/core/browser` embeds `maplibre-contour` 0.1.0, `PMTiles` 4.4.0, and `fflate` 0.8.2 so
4
+ contour and local archive rendering remain self-contained. The complete upstream licenses follow.
5
+
6
+ ## maplibre-contour 0.1.0
7
+
8
+ BSD 3-Clause License
9
+
10
+ Copyright (c) 2023, Michael Barry and maplibre-contour contributors
11
+
12
+ Redistribution and use in source and binary forms, with or without modification, are permitted
13
+ provided that the following conditions are met:
14
+
15
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions
16
+ and the following disclaimer.
17
+
18
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of
19
+ conditions and the following disclaimer in the documentation and/or other materials provided
20
+ with the distribution.
21
+
22
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to
23
+ endorse or promote products derived from this software without specific prior written
24
+ permission.
25
+
26
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
27
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
28
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
29
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
32
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
33
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+
35
+ ---
36
+
37
+ Contains code from d3-contour <https://github.com/d3/d3-contour>
38
+
39
+ Copyright 2012-2023 Mike Bostock
40
+
41
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee
42
+ is hereby granted, provided that the above copyright notice and this permission notice appear in all
43
+ copies.
44
+
45
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
46
+ SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
47
+ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
48
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
49
+ NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
50
+ OF THIS SOFTWARE.
51
+
52
+ ---
53
+
54
+ Contains code from vt-pbf <https://github.com/mapbox/vt-pbf>
55
+
56
+ The MIT License (MIT)
57
+
58
+ Copyright (c) 2015 Anand Thakker
59
+
60
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
61
+ associated documentation files (the "Software"), to deal in the Software without restriction,
62
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
63
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
64
+ furnished to do so, subject to the following conditions:
65
+
66
+ The above copyright notice and this permission notice shall be included in all copies or
67
+ substantial portions of the Software.
68
+
69
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
70
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
71
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
72
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
73
+ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
74
+
75
+ ---
76
+
77
+ ## pbf 4.0.1
78
+
79
+ Copyright (c) 2024, Mapbox
80
+ All rights reserved.
81
+
82
+ Redistribution and use in source and binary forms, with or without modification, are permitted
83
+ provided that the following conditions are met:
84
+
85
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions
86
+ and the following disclaimer.
87
+
88
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of
89
+ conditions and the following disclaimer in the documentation and/or other materials provided
90
+ with the distribution.
91
+
92
+ 3. Neither the name of pbf nor the names of its contributors may be used to endorse or promote
93
+ products derived from this software without specific prior written permission.
94
+
95
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
96
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
97
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
98
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
99
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
100
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
101
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
102
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
103
+
104
+ ---
105
+
106
+ Contains code based on node-buffer-more-ints <https://github.com/dpw/node-buffer-more-ints>
107
+
108
+ Copyright (c) 2012 David Wragg. All rights reserved.
109
+
110
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
111
+ associated documentation files (the "Software"), to deal in the Software without restriction,
112
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
113
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
114
+ furnished to do so, subject to the following conditions:
115
+
116
+ The above copyright notice and this permission notice shall be included in all copies or
117
+ substantial portions of the Software.
118
+
119
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
120
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
121
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
122
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
123
+ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
124
+
125
+ ---
126
+
127
+ Contains code from buffer <https://github.com/feross/buffer>
128
+
129
+ The MIT License (MIT)
130
+
131
+ Copyright (c) Feross Aboukhadijeh, and other contributors.
132
+
133
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
134
+ associated documentation files (the "Software"), to deal in the Software without restriction,
135
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
136
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
137
+ furnished to do so, subject to the following conditions:
138
+
139
+ The above copyright notice and this permission notice shall be included in all copies or
140
+ substantial portions of the Software.
141
+
142
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
143
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
144
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
145
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
146
+ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
147
+
148
+ Parts of this software are based on Node.js:
149
+
150
+ Copyright Node.js contributors. All rights reserved.
151
+
152
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
153
+ associated documentation files (the "Software"), to deal in the Software without restriction,
154
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
155
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
156
+ furnished to do so, subject to the following conditions:
157
+
158
+ The above copyright notice and this permission notice shall be included in all copies or
159
+ substantial portions of the Software.
160
+
161
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
162
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
163
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
164
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
165
+ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
166
+
167
+ See <https://github.com/nodejs/node/blob/main/LICENSE> for more information.
168
+
169
+ ---
170
+
171
+ ## PMTiles 4.4.0
172
+
173
+ The below license (BSD-3) applies to the reference implementations in this repository.
174
+
175
+ The PMTiles specification itself is public domain, or CC0 where applicable.
176
+
177
+ Sample tilesets available in this repository are subject to their own license terms.
178
+
179
+ Copyright 2021 Protomaps LLC
180
+
181
+ Redistribution and use in source and binary forms, with or without modification, are permitted
182
+ provided that the following conditions are met:
183
+
184
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions
185
+ and the following disclaimer.
186
+
187
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of
188
+ conditions and the following disclaimer in the documentation and/or other materials provided
189
+ with the distribution.
190
+
191
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to
192
+ endorse or promote products derived from this software without specific prior written
193
+ permission.
194
+
195
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
196
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
197
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
198
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
199
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
200
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
201
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
202
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
203
+
204
+ ---
205
+
206
+ ## fflate 0.8.2
207
+
208
+ MIT License
209
+
210
+ Copyright (c) 2023 Arjun Barrett
211
+
212
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
213
+ associated documentation files (the "Software"), to deal in the Software without restriction,
214
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
215
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
216
+ furnished to do so, subject to the following conditions:
217
+
218
+ The above copyright notice and this permission notice shall be included in all copies or substantial
219
+ portions of the Software.
220
+
221
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
222
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
223
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
224
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
225
+ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
226
+
227
+ ---
228
+
229
+ ## TypeScript helper code
230
+
231
+ The bundled browser entry retains TypeScript helper code and its complete upstream notice:
232
+
233
+ Copyright (c) Microsoft Corporation.
234
+
235
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee
236
+ is hereby granted.
237
+
238
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
239
+ SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
240
+ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
241
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
242
+ NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
243
+ OF THIS SOFTWARE.
package/TRADEMARKS.md ADDED
@@ -0,0 +1,10 @@
1
+ # Tileflow trademarks
2
+
3
+ The Apache License, Version 2.0, and the Tileflow generated-output grant do not grant permission to
4
+ use the Tileflow name, `tileflow.dev`, logos, service marks, product names, or other Tileflow brand
5
+ features except for reasonable and customary use that truthfully describes the origin of the SDK or
6
+ compatibility with Tileflow, and for reproducing required notices.
7
+
8
+ You may not use Tileflow brand features in a way that suggests sponsorship, endorsement, or an
9
+ official Tileflow product when none exists. Third-party names and marks remain the property of their
10
+ respective owners.
package/dist/browser.d.ts CHANGED
@@ -1,7 +1,177 @@
1
- import { T as TileflowAnalytics, a as TileflowSessionController } from './runtime-DroKDIuB.js';
2
- import 'zod';
1
+ type TileflowFairUseNoticeState = 'GRACE' | 'MANAGED_REQUIRED';
2
+ type TileflowFairUseNotice = Readonly<{
3
+ action: string;
4
+ helpUrl: string;
5
+ message: string;
6
+ state: TileflowFairUseNoticeState;
7
+ }>;
8
+ type TileflowWorldProtocolRequest = Readonly<{
9
+ type?: string;
10
+ url: string;
11
+ }>;
12
+ type TileflowWorldProtocolResponse = Readonly<{
13
+ cacheControl?: string;
14
+ data: ArrayBuffer;
15
+ etag?: string;
16
+ expires?: string;
17
+ }>;
18
+ type TileflowWorldProtocolHandler = (request: TileflowWorldProtocolRequest, abortController: AbortController) => Promise<TileflowWorldProtocolResponse>;
19
+ type TileflowWorldRequestBridge = Readonly<{
20
+ dispose: () => void;
21
+ rewriteUrl: (url: string) => string;
22
+ }>;
23
+ type TileflowFairUseNoticeController = Readonly<{
24
+ dispose: () => void;
25
+ update: (notice: TileflowFairUseNotice | null) => void;
26
+ }>;
27
+ declare function registerTileflowWorldRequestBridge(input: {
28
+ addProtocol: (name: string, handler: TileflowWorldProtocolHandler) => void;
29
+ fetch?: typeof fetch;
30
+ onNotice: (notice: TileflowFairUseNotice | null) => void;
31
+ }): TileflowWorldRequestBridge;
32
+ declare function tileflowFairUseNoticeMessage(state: TileflowFairUseNoticeState): string;
33
+ declare function attachTileflowFairUseNotice(container: HTMLElement): TileflowFairUseNoticeController;
34
+
35
+ type TileflowColor = `#${string}`;
36
+ type MapLibreSprite = string | Array<{
37
+ id: string;
38
+ url: string;
39
+ }>;
40
+ type TileflowProjection = 'globe' | 'mercator';
41
+ type TileflowLight = {
42
+ anchor?: 'map' | 'viewport';
43
+ color?: TileflowColor;
44
+ intensity?: number;
45
+ position?: readonly [number, number, number];
46
+ };
47
+ type MapLibreStyle = {
48
+ version: 8;
49
+ name: string;
50
+ glyphs?: string;
51
+ light?: TileflowLight;
52
+ projection?: {
53
+ type: TileflowProjection;
54
+ };
55
+ sprite?: MapLibreSprite;
56
+ sources: Record<string, Record<string, unknown>>;
57
+ layers: Array<Record<string, unknown>>;
58
+ terrain?: Record<string, unknown>;
59
+ metadata?: Record<string, unknown>;
60
+ };
61
+
62
+ type TileflowRuntimeColorScheme = 'dark' | 'light';
63
+
64
+ type TileflowAnalytics = {
65
+ apiUrl?: string;
66
+ endpoint?: string;
67
+ enabled?: boolean;
68
+ mapId?: string;
69
+ metadata?: Record<string, unknown>;
70
+ projectId?: string;
71
+ sdkVersion?: string;
72
+ source?: string;
73
+ styleId?: string;
74
+ surfaceId?: string;
75
+ };
76
+ type TileflowSessionController = {
77
+ readonly sessionId: string;
78
+ resolveRequestUrl(url: string, analytics: TileflowAnalytics | undefined): Promise<string | undefined>;
79
+ };
80
+ type TileflowRuntimeStyle = {
81
+ analytics?: TileflowAnalytics;
82
+ colorScheme?: TileflowRuntimeColorScheme;
83
+ /** An explicit empty array means the manifest declares that no web fonts are required. */
84
+ fontFaces?: TileflowStyleFontFace[];
85
+ revision?: string;
86
+ style: MapLibreStyle | string;
87
+ theme?: string;
88
+ };
89
+ type TileflowStyleFontFace = {
90
+ family: string;
91
+ source: string;
92
+ style?: 'italic' | 'normal' | 'oblique';
93
+ weight?: '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
94
+ };
95
+
96
+ declare const tileflowMaplibreContourVersion: "0.1.0";
97
+ type TileflowContourProtocolRequest = Readonly<{
98
+ url: string;
99
+ }>;
100
+ type TileflowContourProtocolResponse = Readonly<{
101
+ cacheControl?: string | null;
102
+ data: ArrayBuffer;
103
+ expires?: Date | string | null;
104
+ }>;
105
+ type TileflowContourProtocolHandler = (request: TileflowContourProtocolRequest, abortController: AbortController) => Promise<TileflowContourProtocolResponse>;
106
+ type TileflowContourProtocolRegistry = {
107
+ addProtocol: (name: string, handler: TileflowContourProtocolHandler) => void;
108
+ };
109
+ type TileflowContourProtocolRegistrationOptions = {
110
+ /** Test/integration override; the default lazily initializes the pinned, bundled module. */
111
+ loadMaplibreContour?: () => Promise<unknown>;
112
+ };
113
+ /** Registers the one self-contained protocol emitted by every compiled contour source. */
114
+ declare function registerTileflowContourProtocol(registry: TileflowContourProtocolRegistry, options?: TileflowContourProtocolRegistrationOptions): void;
115
+
116
+ type TileflowPmtilesProtocolHandler = (request: Readonly<{
117
+ type?: string;
118
+ url: string;
119
+ }>, abortController: AbortController) => Promise<Readonly<{
120
+ cacheControl?: string;
121
+ data: unknown;
122
+ expires?: string;
123
+ }>>;
124
+ type TileflowPmtilesProtocolRegistry = Readonly<{
125
+ addProtocol: (name: string, handler: TileflowPmtilesProtocolHandler) => void;
126
+ }>;
127
+ type TileflowPmtilesProtocolRegistrationOptions = Readonly<{
128
+ maximumDirectoryDepth?: number;
129
+ }>;
130
+ declare const tileflowPmtilesMaximumDirectoryDepth: 32;
131
+ declare const tileflowPmtilesProtocol: "tileflow-pmtiles";
132
+ /** Register only Tileflow's managed PMTiles namespace. Third-party `pmtiles://` remains untouched. */
133
+ declare function registerTileflowPmtilesProtocol(registry: TileflowPmtilesProtocolRegistry, options?: TileflowPmtilesProtocolRegistrationOptions): void;
3
134
 
4
135
  type TileflowMapReadinessState = 'error' | 'idle' | 'loading';
136
+ /** Read the browser preference without persisting or mutating user state. */
137
+ declare function getTileflowSystemColorScheme(): TileflowRuntimeColorScheme;
138
+ /**
139
+ * Subscribe through one process-wide `matchMedia` listener, regardless of adapter or map count.
140
+ */
141
+ declare function subscribeTileflowSystemColorScheme(listener: (scheme: TileflowRuntimeColorScheme) => void): () => void;
142
+ type TileflowThemeTransitionPhase = 'applying' | 'error' | 'preloading' | 'ready';
143
+ type TileflowThemeTransition = Readonly<{
144
+ currentTheme?: string;
145
+ error?: Error;
146
+ phase: TileflowThemeTransitionPhase;
147
+ targetTheme?: string;
148
+ }>;
149
+ type TileflowThemeTransitionResult = Readonly<{
150
+ error?: Error;
151
+ status: 'applied' | 'failed' | 'superseded';
152
+ theme?: string;
153
+ }>;
154
+ type TileflowStyleSwitchMap = {
155
+ off(event: 'error' | 'style.load', listener: (event?: unknown) => void): unknown;
156
+ on(event: 'error' | 'style.load', listener: (event?: unknown) => void): unknown;
157
+ setStyle: unknown;
158
+ };
159
+ type TileflowThemeController = {
160
+ dispose(): void;
161
+ getCurrent(): TileflowRuntimeStyle;
162
+ setTheme(style: TileflowRuntimeStyle): Promise<TileflowThemeTransitionResult>;
163
+ };
164
+ /**
165
+ * Transactionally changes a MapLibre style while preserving the map instance and camera.
166
+ * Independent font preloads start immediately; style application is serialized and last request wins.
167
+ */
168
+ declare function createTileflowThemeController(options: {
169
+ initial: TileflowRuntimeStyle;
170
+ loadFonts?: (style: TileflowRuntimeStyle) => Promise<void>;
171
+ map: TileflowStyleSwitchMap;
172
+ onTransition?: (transition: TileflowThemeTransition) => void;
173
+ timeoutMs?: number;
174
+ }): TileflowThemeController;
5
175
  type TileflowMapLifecycleEvent = 'dataloading' | 'error' | 'idle' | 'load' | 'styledataloading';
6
176
  type TileflowFrameScheduler<TFrame> = {
7
177
  cancelFrame: (frame: TFrame) => void;
@@ -22,6 +192,13 @@ type TileflowMapLifecycleAttachment = {
22
192
  dispose: () => void;
23
193
  invalidate: (state?: TileflowMapReadinessState) => void;
24
194
  };
195
+ type TileflowStyleFontLoadOptions = {
196
+ /** Already resolved manifest metadata. An explicit empty array avoids fetching the style. */
197
+ fontFaces?: readonly TileflowStyleFontFace[];
198
+ fetch?: typeof globalThis.fetch;
199
+ };
200
+ /** Loads content-addressed style font faces before MapLibre starts shaping labels. */
201
+ declare function loadTileflowStyleFonts(style: MapLibreStyle | string, options?: TileflowStyleFontLoadOptions): Promise<void>;
25
202
  type TileflowTransformRequestParameters = {
26
203
  url: string;
27
204
  };
@@ -29,11 +206,6 @@ type TileflowComposedRequest<TRequest extends TileflowTransformRequestParameters
29
206
  type TileflowTransformRequest<TRequest extends TileflowTransformRequestParameters, TResourceType> = (url: string, resourceType?: TResourceType) => Promise<TileflowComposedRequest<TRequest>> | TileflowComposedRequest<TRequest> | undefined;
30
207
  type TileflowUserTransformRequest<TRequest extends TileflowTransformRequestParameters, TResourceType> = (url: string, resourceType?: TResourceType) => Promise<TRequest> | TRequest | undefined;
31
208
  type TileflowAsyncAnalyticsTiming = 'request' | 'resolution';
32
- type TileflowMarkerController<TMap, TDefinition, TMarker> = {
33
- clear: () => void;
34
- dispose: () => void;
35
- replace: (map: TMap, definitions: readonly TDefinition[]) => void;
36
- };
37
209
  declare function createTileflowSessionStarter(options: {
38
210
  getSessionId?: () => string;
39
211
  sessionId: string;
@@ -59,6 +231,7 @@ declare function createTileflowTransformRequest<TRequest extends TileflowTransfo
59
231
  sessionController?: TileflowSessionController;
60
232
  sessionId: string;
61
233
  transformRequest?: TileflowUserTransformRequest<TRequest, TResourceType>;
234
+ worldRequestBridge?: TileflowWorldRequestBridge;
62
235
  }): TileflowTransformRequest<TRequest, TResourceType>;
63
236
  declare function createTileflowTransformRequest<TRequest extends TileflowTransformRequestParameters = TileflowTransformRequestParameters, TResourceType = unknown>(options: {
64
237
  always?: boolean;
@@ -67,11 +240,7 @@ declare function createTileflowTransformRequest<TRequest extends TileflowTransfo
67
240
  sessionController?: TileflowSessionController;
68
241
  sessionId: string;
69
242
  transformRequest?: TileflowUserTransformRequest<TRequest, TResourceType>;
243
+ worldRequestBridge?: TileflowWorldRequestBridge;
70
244
  }): TileflowTransformRequest<TRequest, TResourceType> | undefined;
71
- declare function createTileflowMarkerController<TMap, TDefinition, TMarker>(options: {
72
- attach: (marker: TMarker, map: TMap, definition: TDefinition) => void;
73
- create: (definition: TDefinition) => TMarker;
74
- remove: (marker: TMarker) => void;
75
- }): TileflowMarkerController<TMap, TDefinition, TMarker>;
76
245
 
77
- export { type TileflowAsyncAnalyticsTiming, type TileflowComposedRequest, type TileflowFrameScheduler, type TileflowMapLifecycleAttachment, type TileflowMapLifecycleEvent, type TileflowMapLifecycleSubscriber, type TileflowMapReadinessState, type TileflowMarkerController, type TileflowSessionSender, type TileflowSessionStarter, type TileflowTransformRequest, type TileflowTransformRequestParameters, type TileflowUserTransformRequest, attachTileflowMapLifecycle, createTileflowMarkerController, createTileflowSessionStarter, createTileflowTransformRequest };
246
+ export { type TileflowAsyncAnalyticsTiming, type TileflowComposedRequest, type TileflowContourProtocolHandler, type TileflowContourProtocolRegistrationOptions, type TileflowContourProtocolRegistry, type TileflowContourProtocolRequest, type TileflowContourProtocolResponse, type TileflowFairUseNotice, type TileflowFairUseNoticeController, type TileflowFairUseNoticeState, type TileflowFrameScheduler, type TileflowMapLifecycleAttachment, type TileflowMapLifecycleEvent, type TileflowMapLifecycleSubscriber, type TileflowMapReadinessState, type TileflowPmtilesProtocolHandler, type TileflowPmtilesProtocolRegistrationOptions, type TileflowPmtilesProtocolRegistry, type TileflowSessionSender, type TileflowSessionStarter, type TileflowStyleFontLoadOptions, type TileflowStyleSwitchMap, type TileflowThemeController, type TileflowThemeTransition, type TileflowThemeTransitionPhase, type TileflowThemeTransitionResult, type TileflowTransformRequest, type TileflowTransformRequestParameters, type TileflowUserTransformRequest, type TileflowWorldProtocolHandler, type TileflowWorldProtocolRequest, type TileflowWorldProtocolResponse, type TileflowWorldRequestBridge, attachTileflowFairUseNotice, attachTileflowMapLifecycle, createTileflowSessionStarter, createTileflowThemeController, createTileflowTransformRequest, getTileflowSystemColorScheme, loadTileflowStyleFonts, registerTileflowContourProtocol, registerTileflowPmtilesProtocol, registerTileflowWorldRequestBridge, subscribeTileflowSystemColorScheme, tileflowFairUseNoticeMessage, tileflowMaplibreContourVersion, tileflowPmtilesMaximumDirectoryDepth, tileflowPmtilesProtocol };