@tileflow/core 0.1.0-alpha.3 → 0.1.0-alpha.31

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 (38) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +273 -26
  3. package/THIRD_PARTY_NOTICES.md +327 -0
  4. package/dist/browser.d.ts +962 -0
  5. package/dist/browser.js +6237 -0
  6. package/dist/build.d.ts +574 -0
  7. package/dist/build.js +25423 -0
  8. package/dist/capture-scene-D6soWztE.d.ts +161 -0
  9. package/dist/capture.d.ts +9 -0
  10. package/dist/capture.js +276 -0
  11. package/dist/config-reference.json +32261 -0
  12. package/dist/icon-composition-BiOTwrvD.d.ts +1331 -0
  13. package/dist/index.d.ts +1114 -162
  14. package/dist/index.js +18714 -3479
  15. package/dist/manifest-types-CTT2eLbp.d.ts +790 -0
  16. package/dist/manifest.d.ts +9 -0
  17. package/dist/manifest.js +368 -0
  18. package/dist/native-profile.d.ts +188 -0
  19. package/dist/native-profile.js +9316 -0
  20. package/dist/native.d.ts +355 -0
  21. package/dist/native.js +5552 -0
  22. package/dist/runtime.d.ts +1 -0
  23. package/dist/runtime.js +1317 -0
  24. package/docs/authoring-model.md +241 -0
  25. package/docs/capture-scenes.md +36 -0
  26. package/docs/compiled-style-performance.md +263 -0
  27. package/docs/data-is-separate-from-design.md +345 -0
  28. package/docs/globe-atmosphere.md +83 -0
  29. package/docs/hosted-session-authorization.md +108 -0
  30. package/docs/map-and-terrain-examples.md +149 -0
  31. package/docs/map-emphasis.md +89 -0
  32. package/docs/native-artifact-profile.md +145 -0
  33. package/docs/native-resource-urls.md +367 -0
  34. package/docs/public-api-and-browser-subpath.md +93 -0
  35. package/docs/shared-visual-primitives.md +81 -0
  36. package/docs/theme-transitions-and-blends.md +221 -0
  37. package/docs/themes-and-module-styles.md +83 -0
  38. package/package.json +58 -8
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,34 +1,281 @@
1
1
  # @tileflow/core
2
2
 
3
- Typed Tileflow config helpers and the MapLibre style compiler.
3
+ Define, validate, and compile Tileflow maps into MapLibre Style JSON. Core owns the map language;
4
+ it does not start a server, prepare files on disk, render a browser map, or deploy a hosted map.
5
+
6
+ > Related packages and guides: [documentation index](https://raw.githubusercontent.com/tileflow/tileflow-sdk/main/llms.txt).
7
+
8
+ ## Install
9
+
10
+ ```sh
11
+ npm install @tileflow/core@alpha @tileflow/maps@alpha
12
+ ```
13
+
14
+ `@tileflow/maps` is needed for the official map used below, not for every Core application. Use
15
+ ES module imports. For config loading and asset preparation, use the Node.js 22+ CLI or a build
16
+ integration. Browser applications should use a framework adapter with prepared assets.
17
+
18
+ ## Define a map
19
+
20
+ Create `tileflow.config.ts`. Every public config exports one map:
21
+
22
+ <!-- docs:check -->
4
23
 
5
24
  ```ts
6
- import {defineTileflow, osm, roads} from '@tileflow/core';
7
-
8
- export default defineTileflow({
9
- themes: {
10
- light: {
11
- mode: 'light',
12
- colors: {
13
- water: '#8ED6E8',
14
- park: '#C3F1D5',
15
- road: '#D8E0E7',
16
- text: '#566371',
17
- },
18
- },
19
- },
20
- maps: {
21
- madrid: {
22
- basemap: osm(),
23
- theme: 'light',
24
- modules: [roads({preset: 'modern', density: 'balanced'})],
25
- view: {
26
- center: [-3.7038, 40.4168],
27
- zoom: 12,
28
- },
29
- },
25
+ import {defineMap, labels, roads} from '@tileflow/core';
26
+ import {streets} from '@tileflow/maps';
27
+
28
+ export default defineMap({
29
+ id: 'madrid',
30
+ name: 'Madrid',
31
+ version: 1,
32
+ extends: streets,
33
+ modules: {
34
+ roads: roads({detail: 'streets', hierarchy: 'clear'}),
35
+ labels: labels({roads: 'major'}),
30
36
  },
37
+ view: {center: [-3.7038, 40.4168], zoom: 12},
38
+ });
39
+ ```
40
+
41
+ Coordinates use `[longitude, latitude]`. The map inherits Streets' themes and asset providers.
42
+ A complete root map uses the same `defineMap()` call without `extends`; most applications should
43
+ extend an existing map instead of rebuilding its complete visual contract.
44
+
45
+ Validate and preview the file with the project-local CLI:
46
+
47
+ ```sh
48
+ npm install --save-dev --save-exact tileflow@alpha
49
+ npx tileflow validate --json
50
+ npx tileflow preview
51
+ ```
52
+
53
+ Loading a config executes its imports. Treat it as trusted code, not as sandboxed JSON.
54
+
55
+ ## Understand inheritance
56
+
57
+ Omitted fields inherit, but declaring a field does not imply a recursive merge:
58
+
59
+ - `view` deep-merges; nested arrays replace.
60
+ - `modules` merges by domain. Declaring `roads(...)` replaces that domain's inherited request and
61
+ render contributions. Use `refine(...)` to patch it, `disable()` to remove it, and `reset()` for
62
+ an explicit reset inside a supported patch.
63
+ - `themes` replaces the complete collection and clears an inherited `systemThemes` mapping.
64
+ `defaultTheme` can select an inherited concrete theme; `systemThemes` replaces its complete mapping.
65
+ - `icons` replaces the ordered contributor list. Omission inherits it; `[]` disables it. Local and
66
+ package directories can be combined with explicit locked `iconSet('@team/set')` descriptors.
67
+ Spread the parent's list explicitly when composing contributors. Later contributors win for an
68
+ exact icon ID.
69
+ - `fonts` and `glyphs` are mutually exclusive text providers. Declaring either replaces the inherited
70
+ provider. `atmosphere`, `data`, `projection`, `terrain`, and `marine` are also atomic.
71
+
72
+ Identity (`id`, `name`, `version`) and tooling `scenes` belong to the leaf map and do not inherit.
73
+ Module object order does not determine rendering order. See the
74
+ [map inheritance contract](https://github.com/tileflow/tileflow-sdk/blob/main/docs/contracts/map-inheritance.md)
75
+ for the complete merge rules.
76
+
77
+ ## Team Icon Sets foundations
78
+
79
+ `iconSet('@team/set')` is an explicit icon contributor alongside local and package-owned directories.
80
+ It performs no I/O. A resolved map accepts at most 32 contributors, and the same set reference may
81
+ appear only once. Shared sets use the same explicit array order and later-wins semantics as ordinary
82
+ icon directories.
83
+
84
+ An exact `tileflow.icons.lock.json` identifies immutable set revisions and generated artifacts. The
85
+ lock parser rejects duplicate JSON keys, stale reference sets, mixed Teams, invalid IDs, floating
86
+ versions, unsafe URLs, and manifest/hash mismatches. Serialization is canonical. Hashes are internal
87
+ integrity machinery, not identifiers that application authors manage.
88
+
89
+ Shared-set content identifies the effective published artifact. Git owns original artwork history;
90
+ source-only SVG edits producing the same artifact are not shared content changes. No original-source
91
+ hash, source format, or filesystem path is added to a shared package. Local/package originals retain
92
+ their existing source identity. Shared winners use explicit `rendered-icon` identity, while an
93
+ ordered versioned icon-composition receipt records consumed revisions separately, including
94
+ fully shadowed sets and dependency changes that preserve rendered pixels.
95
+
96
+ Map revision hashing preserves the existing v1 result for maps without shared sets. Maps with sets
97
+ require a complete receipt and use the domain-separated v2 revision contract. Build-manifest map
98
+ entries identify that contract with `mapRevisionSchemaVersion: 2`; omission means legacy v1. The
99
+ Metadata-free RGBA icon packages retain `tileflow-icon-package-v1` identity. SDF appearance or text-fitting metadata uses
100
+ `tileflow-icon-package-v2` and v2 composition receipts; defaults and layout participate in identity.
101
+
102
+ These are portable contracts. `@tileflow/dev` composes declared contributors on its normal
103
+ preparation path, and the `tileflow` CLI owns catalog management and exact lock maintenance.
104
+ Importing `iconSet` adds a declaration; it performs no I/O, resolves no revision, and does not by
105
+ itself make a Team catalog available to your deployment.
106
+
107
+ ## Style with themes and semantic modules
108
+
109
+ Themes are complete appearance documents, not loose color overrides. Every theme must supply the
110
+ same token schema. Use `token.color(...)`, `token.number(...)`, `token.image(...)`, and typed font
111
+ roles for theme-dependent values. Use `fixed(value, {reason})` for an intentionally invariant visual
112
+ value. Structural controls, such as visibility and zoom gates, remain ordinary literals.
113
+
114
+ Extend a theme without changing the inherited map structure:
115
+
116
+ <!-- docs:check -->
117
+
118
+ ```ts
119
+ import {defineMap, defineTheme} from '@tileflow/core';
120
+ import {streets, streetsThemes} from '@tileflow/maps';
121
+
122
+ const dark = defineTheme(streetsThemes.dark, {
123
+ id: 'madrid-dark',
124
+ version: 1,
125
+ colorScheme: 'dark',
126
+ tokens: {color: {'surface.land': '#0d1320', 'surface.water': '#081e2e'}},
127
+ });
128
+
129
+ export default defineMap({
130
+ id: 'madrid',
131
+ version: 1,
132
+ extends: streets,
133
+ themes: {light: streetsThemes.light, dark},
134
+ defaultTheme: 'light',
135
+ systemThemes: {light: 'light', dark: 'dark'},
31
136
  });
32
137
  ```
33
138
 
34
- Docs: https://tileflow.dev/docs
139
+ `system` is a runtime selection policy, not a stored theme. Builds, captures, static scenes, and
140
+ receipts must use a concrete theme such as `light` or `dark`.
141
+
142
+ Because every theme of a map shares one structure, a browser map can cross-fade between themes or
143
+ show a continuous blend of them on the same MapLibre instance, with no extra requests. See
144
+ [theme transitions and blends](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/theme-transitions-and-blends.md).
145
+ The same controller can make chosen modules recede and the map's labels fade so an application's
146
+ own content reads first; see [map emphasis](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/map-emphasis.md).
147
+
148
+ The semantic domains are `land`, `water`, `nautical`, `roads`, `buildings`, `boundaries`, `labels`,
149
+ `poi`, `aeroways`, `transit`, `vegetation`, `addresses`, and `landforms`. Style stable geographic
150
+ targets rather than compiler-generated MapLibre layer IDs. Shared primitives cover fills, lines,
151
+ text, icons, circles, and extrusions. `zoom.*` supplies zoom curves; `expr.*` and `field(...)` supply
152
+ the closed data-expression language. `renderPass`, `refineRenderTarget`, and `withRenderStack` add
153
+ owner-local rendering behavior without bypassing the compiler. A pass, or a target its module moves,
154
+ is placed at a band edge such as `'above-relief'` or `'below-labels'`, or `{above}` / `{below}` one
155
+ semantic target.
156
+
157
+ ## Compile and inspect
158
+
159
+ `validateTileflowMap(input)` returns `{valid, messages}`. `parseTileflowMap(map)` resolves and
160
+ validates the authoring input and throws on failure. `createStyle(map, options)` returns a style or
161
+ throws; `createStyleResult(map, options)` returns structured diagnostics and a compilation report.
162
+ Only a successful result contains `style`.
163
+
164
+ Core compilation is not asset preparation. A map that references package or local icon/font
165
+ directories needs the CLI, a build plugin, or
166
+ [`@tileflow/dev/artifacts`](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/README.md)
167
+ to produce deployable sprites and font files. Browser components consume the resulting manifest;
168
+ they do not import executable configs.
169
+
170
+ Use these commands to discover the installed language and inspect a prepared map:
171
+
172
+ ```sh
173
+ npx tileflow language manifest --json
174
+ npx tileflow language schema --json
175
+ npx tileflow inspect --json
176
+ npx tileflow explain --theme dark --json
177
+ npx tileflow semantic-diff --from-config before/tileflow.config.ts --to-config after/tileflow.config.ts --json
178
+ ```
179
+
180
+ The language manifest is also exported as `tileflowAuthoringManifest`, with
181
+ `tileflowAuthoringManifestSchemaVersion`. The generated schema distinguishes authoring input from
182
+ resolved compiler input. `diffTileflowMaps(before, after)` returns deterministic semantic changes
183
+ at JSON Pointer paths. Physical inspection IDs and indexes are diagnostic observations, not stable
184
+ application targets.
185
+
186
+ ## Select a prepared map
187
+
188
+ React, Vue and Svelte accept a required `source` object, `{map, manifestUrl?}`. `map` is the portable
189
+ name in the manifest, not a Hosted `map_...` identifier. An omitted web `manifestUrl` means exactly
190
+ `/tileflow/manifest.json`; custom paths and external hosts must be explicit. The native Core and
191
+ React Native type contracts use `{map, manifestUrl}` with an explicit absolute URL. They do not
192
+ infer an application origin, Metro host or manifest location.
193
+
194
+ <!-- docs:check -->
195
+
196
+ ```ts
197
+ import type {TileflowNativeSource} from '@tileflow/core/native';
198
+ import type {TileflowRuntimeSource} from '@tileflow/core/runtime';
199
+
200
+ const webSource = {map: 'madrid'} satisfies TileflowRuntimeSource;
201
+ const nativeSource = {
202
+ map: 'madrid',
203
+ manifestUrl: 'https://maps.example.com/tileflow/native/manifest.json',
204
+ } satisfies TileflowNativeSource;
205
+ ```
206
+
207
+ These objects select existing prepared maps; they do not compile or render one. Every Tileflow
208
+ framework Map is manifest-backed, without a renderer discriminator or direct-style mode. The
209
+ obsolete source fields `kind` and `style` are rejected. Completely unmanaged maps use upstream
210
+ MapLibre directly. Omitted themes use the manifest default, concrete themes select exact names,
211
+ and `system` requires the manifest's explicit light/dark mapping and a supplied runtime color scheme.
212
+ See the [native source guide](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/native-resource-urls.md)
213
+ for source coordination, bounded acquisition and safe diagnostics. The pre-release React Native
214
+ package uses this contract for its mounted Map; it is not yet published.
215
+
216
+ ## Data, terrain, and browser resources
217
+
218
+ Tileflow World is the hosted primary-data path. `vectorTiles()` with `openMapTiles()` supports
219
+ compatible externally supplied vector data for local/self-hosted use; it does not make that source
220
+ eligible for hosted deployment. `hostedTileset()` and semantic overlay placement add named data
221
+ sources. Local PMTiles inputs are for local tooling, not implicit production data publication.
222
+
223
+ World attribution links to Tileflow's source notice, OpenMapTiles, and OpenStreetMap. External
224
+ vector data retains the attribution supplied by its owner.
225
+
226
+ `projection` accepts `mercator` or `globe`. Terrain supports `none`, `hillshade`, `3d`, and an object
227
+ form for explicit hillshade and contour configuration. Browser-derived contours require a DEM tile
228
+ template, zoom limits, thresholds, and the Tileflow contour protocol. Framework adapters and local
229
+ tooling prepare browser resources; direct MapLibre integrations must register required protocols
230
+ before loading a style. See the
231
+ [browser runtime contract](https://github.com/tileflow/tileflow-sdk/blob/main/docs/contracts/framework-browser-runtime.md).
232
+
233
+ Set `projection: 'globe'` and `atmosphere: true` in `tileflow.config.ts` for a blue globe rim,
234
+ space background, and stars. Use `atmosphere: false` to disable an inherited atmosphere, or an
235
+ options object for theme-aware colors and bounded star brightness/motion. React, Vue, Svelte, and
236
+ standalone capture apply the browser effect automatically. Direct MapLibre integrations call
237
+ `attachTileflowAtmosphere(map)` from `@tileflow/core/browser`. See
238
+ [globe atmosphere](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/globe-atmosphere.md).
239
+
240
+ A map with text must declare exactly one text provider. Streets, Ferraris, Härad, Soundings,
241
+ and Blueprint use URL glyph providers. Baedeker and Siegfried use packaged Cormorant
242
+ fonts; Cyberpunk and Matrix use packaged Oxanium fonts. Hosted deployment currently rejects
243
+ package/local font bundles; use self-hosted output or explicitly replace the provider with compatible
244
+ public glyphs. Tile URLs and font providers do not establish redistribution rights.
245
+
246
+ ## Reference
247
+
248
+ Use the [generated language schema](https://github.com/tileflow/tileflow-sdk/blob/main/docs/modules-api-reference.json),
249
+ [cartographic authoring contract](https://github.com/tileflow/tileflow-sdk/blob/main/docs/contracts/cartographic-authoring.md),
250
+ and [public exports](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/src/index.ts)
251
+ for exact options. Prefer the installed CLI's generated contracts when using a published release;
252
+ `main` can contain unreleased changes. Report defects in the
253
+ [issue tracker](https://github.com/tileflow/tileflow-sdk/issues).
254
+
255
+ ## Detailed guides
256
+
257
+ These guides are also included in the installed package under `docs/`. They describe this source
258
+ revision; prefer the installed copy when working with an older release.
259
+
260
+ - [Globe atmosphere](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/globe-atmosphere.md)
261
+ - [Map and terrain examples](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/map-and-terrain-examples.md)
262
+ - [Authoring model](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/authoring-model.md)
263
+ - [Shared visual primitives](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/shared-visual-primitives.md)
264
+ - [Compiled-style performance](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/compiled-style-performance.md)
265
+ - [Themes and module styles](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/themes-and-module-styles.md)
266
+ - [Theme transitions and blends](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/theme-transitions-and-blends.md)
267
+ - [Map emphasis](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/map-emphasis.md)
268
+ - [Data is separate from design](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/data-is-separate-from-design.md)
269
+ - [Capture scenes](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/capture-scenes.md)
270
+ - [Public API and browser subpath](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/public-api-and-browser-subpath.md)
271
+ - [Hosted session authorization](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/hosted-session-authorization.md)
272
+ - [Native resource URLs](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/native-resource-urls.md)
273
+ - [Native artifact profile](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/native-artifact-profile.md)
274
+
275
+ ## Native icon capabilities
276
+
277
+ Prepared icon metadata identifies SDF assets and their default fill and halo. Core rejects any
278
+ symbol layer that can select both SDF and RGBA, including fallbacks and effective local overrides,
279
+ with `TF_ICON_REPRESENTATION_MIXED`. It preserves layers, collisions and interaction IDs. Omitted
280
+ SDF paint follows the resolved image selection; supplied map paint stays independent from asset
281
+ defaults. See [Author recolorable and adaptable icons](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/native-icons.md).