@tileflow/core 0.1.0-alpha.28 → 0.1.0-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/dist/browser.d.ts +28 -1
- package/dist/browser.js +202 -0
- package/dist/build.d.ts +7 -7
- package/dist/build.js +121 -46
- package/dist/config-reference.json +2051 -1960
- package/dist/{icon-composition-D7sBlZZh.d.ts → icon-composition-BquPlPPI.d.ts} +64 -49
- package/dist/index.d.ts +4 -4
- package/dist/index.js +124 -49
- package/dist/{manifest-types-BdGjIYy-.d.ts → manifest-types-BZU4zbmI.d.ts} +1 -0
- package/dist/manifest.d.ts +2 -2
- package/dist/native-profile.d.ts +1 -0
- package/dist/runtime.d.ts +1 -1
- package/docs/authoring-model.md +2 -2
- package/docs/data-is-separate-from-design.md +2 -3
- package/docs/globe-atmosphere.md +83 -0
- package/docs/hosted-session-authorization.md +5 -19
- package/docs/public-api-and-browser-subpath.md +1 -0
- package/package.json +1 -1
package/dist/native-profile.d.ts
CHANGED
package/dist/runtime.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { z as TileflowAnalytics, $ as TileflowManifestFetchOptions, a0 as TileflowManifestLoadOptions, a1 as TileflowMapMode, a2 as TileflowMapModeOptions, ae as TileflowResolvedRuntimeTheme, aB as TileflowRuntimeCenterLike, a as TileflowRuntimeColorScheme, T as TileflowRuntimeManifest, aC as TileflowRuntimeManifestMap, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, aD as TileflowRuntimeSource, aE as TileflowRuntimeSourceValidation, aF as TileflowRuntimeStyle, aG as TileflowRuntimeStyleOptions, d as TileflowRuntimeSystemThemes, aH as TileflowRuntimeViewOptions, aI as TileflowSessionController, aJ as TileflowSessionGrantResponse, aM as TileflowStyleFontFace, b9 as TileflowThemeSelection, bh as assertValidTileflowRuntimeSource, bi as clearTileflowManifestCache, bk as createTileflowSessionController, bl as createTileflowSessionId, bm as defaultTileflowManifestUrl, bn as defaultTileflowRuntimeView, bp as getTileflowAnalyticsApiUrl, bq as getTileflowStyleFontFaces, br as inferTileflowAnalyticsFromStyleUrl, bs as loadTileflowManifest, bt as mergeTileflowAnalytics, bu as normalizeTileflowRuntimeCenter, bv as normalizeTileflowStaticImageSize, bQ as normalizeTileflowSurfaceId, bw as normalizeTileflowUrl, bx as resolveTileflowAnalyticsRequestUrl, by as resolveTileflowManifestMap, bz as resolveTileflowMapMode, bA as resolveTileflowRuntimeStyle, bB as resolveTileflowRuntimeTheme, bC as resolveTileflowRuntimeView, bD as resolveTileflowStaticImageUrl, bE as shouldLoadTileflowManifest, bF as startTileflowSession, bH as tileflowStyleFontFaceLimits, bI as tileflowStyleFontFacesMetadataKey, bL as validateTileflowRuntimeSource, bM as validateTileflowThemeSelection } from './manifest-types-
|
|
1
|
+
export { z as TileflowAnalytics, $ as TileflowManifestFetchOptions, a0 as TileflowManifestLoadOptions, a1 as TileflowMapMode, a2 as TileflowMapModeOptions, ae as TileflowResolvedRuntimeTheme, aB as TileflowRuntimeCenterLike, a as TileflowRuntimeColorScheme, T as TileflowRuntimeManifest, aC as TileflowRuntimeManifestMap, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, aD as TileflowRuntimeSource, aE as TileflowRuntimeSourceValidation, aF as TileflowRuntimeStyle, aG as TileflowRuntimeStyleOptions, d as TileflowRuntimeSystemThemes, aH as TileflowRuntimeViewOptions, aI as TileflowSessionController, aJ as TileflowSessionGrantResponse, aM as TileflowStyleFontFace, b9 as TileflowThemeSelection, bh as assertValidTileflowRuntimeSource, bi as clearTileflowManifestCache, bk as createTileflowSessionController, bl as createTileflowSessionId, bm as defaultTileflowManifestUrl, bn as defaultTileflowRuntimeView, bp as getTileflowAnalyticsApiUrl, bq as getTileflowStyleFontFaces, br as inferTileflowAnalyticsFromStyleUrl, bs as loadTileflowManifest, bt as mergeTileflowAnalytics, bu as normalizeTileflowRuntimeCenter, bv as normalizeTileflowStaticImageSize, bQ as normalizeTileflowSurfaceId, bw as normalizeTileflowUrl, bx as resolveTileflowAnalyticsRequestUrl, by as resolveTileflowManifestMap, bz as resolveTileflowMapMode, bA as resolveTileflowRuntimeStyle, bB as resolveTileflowRuntimeTheme, bC as resolveTileflowRuntimeView, bD as resolveTileflowStaticImageUrl, bE as shouldLoadTileflowManifest, bF as startTileflowSession, bH as tileflowStyleFontFaceLimits, bI as tileflowStyleFontFacesMetadataKey, bL as validateTileflowRuntimeSource, bM as validateTileflowThemeSelection } from './manifest-types-BZU4zbmI.js';
|
package/docs/authoring-model.md
CHANGED
|
@@ -125,8 +125,8 @@ export default defineMap({
|
|
|
125
125
|
|
|
126
126
|
The standalone map above is complete as written. A map always owns its complete text provider; Core does not
|
|
127
127
|
obtain fonts or sprites from World and never invents a fallback URL. The URL-backed first-party
|
|
128
|
-
`streets`, `ferraris`, `harad`, `soundings`,
|
|
129
|
-
providers directly. `baedeker`, `civica`,
|
|
128
|
+
`streets`, `ferraris`, `harad`, `soundings`, and `blueprint` maps declare their glyph
|
|
129
|
+
providers directly. `baedeker`, `civica`, and `siegfried`
|
|
130
130
|
declare packaged fonts, so ordinary imports and derived maps compile without out-of-band release
|
|
131
131
|
metadata.
|
|
132
132
|
|
|
@@ -120,7 +120,7 @@ another. Browser adapters load local faces before MapLibre. Native releases use
|
|
|
120
120
|
`glyphs` URL provider instead, which enumerates the exact comma-joined MapLibre request keys in
|
|
121
121
|
`fontStacks`.
|
|
122
122
|
|
|
123
|
-
Streets, Ferraris, Härad, Soundings,
|
|
123
|
+
Streets, Ferraris, Härad, Soundings, and Blueprint each declare
|
|
124
124
|
`https://api.tileflow.dev/base/33d4de5e8086d9d629d67d3f39fedb87e23686c4c1ac653c27e2a52aee9d00b3/glyphs/{fontstack}/{range}.pbf`
|
|
125
125
|
with the exact `Noto Sans Regular` and `Noto Sans Bold` stacks. The full hash identifies one
|
|
126
126
|
published, immutable glyph collection independent of World data. The older `/fonts/...` endpoint
|
|
@@ -332,8 +332,7 @@ source classes into one civic color.
|
|
|
332
332
|
|
|
333
333
|
World and text assets are independent contracts. `tileflowWorld()` selects `world-v1/current` or an
|
|
334
334
|
exact `releaseId + descriptorSha256`; a `glyphs` declaration contains its own complete URL. Ordinary
|
|
335
|
-
imports of Streets, Baedeker, Cívica, Ferraris, Härad, Siegfried, Soundings, Cyberpunk, Matrix,
|
|
336
|
-
San Francisto, and Super Tile World
|
|
335
|
+
imports of Streets, Baedeker, Cívica, Ferraris, Härad, Siegfried, Soundings, Cyberpunk, Matrix, Blueprint, and Super Tile World
|
|
337
336
|
remain usable because each official map owns or inherits a URL or packaged-font provider.
|
|
338
337
|
URL-backed maps become exact-byte reproducible
|
|
339
338
|
when the immutable global base-asset set is published and their explicit URL is updated to its
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Globe atmosphere
|
|
2
|
+
|
|
3
|
+
Enable atmosphere in the map exported by `tileflow.config.ts`. Install `@tileflow/core` and
|
|
4
|
+
`@tileflow/maps` and use a browser adapter from the same compatible SDK release. The example
|
|
5
|
+
extends the complete Streets map, including its data and text resources.
|
|
6
|
+
|
|
7
|
+
<!-- docs:check -->
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import {defineMap} from '@tileflow/core';
|
|
11
|
+
import {streets} from '@tileflow/maps';
|
|
12
|
+
|
|
13
|
+
export default defineMap({
|
|
14
|
+
id: 'earth',
|
|
15
|
+
version: 1,
|
|
16
|
+
extends: streets,
|
|
17
|
+
projection: 'globe',
|
|
18
|
+
atmosphere: true,
|
|
19
|
+
view: {center: [2.3522, 48.8566], zoom: 2},
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The result has a blue atmospheric rim, a dark space background, and a deterministic star field.
|
|
24
|
+
Stars move slightly with the camera. There is no continuous animation while the camera is still.
|
|
25
|
+
The space background, stars, and supplementary rim fade between zooms 3 and 6; native atmospheric
|
|
26
|
+
scattering fades out by zoom 7. Coordinates are longitude, then latitude.
|
|
27
|
+
|
|
28
|
+
Omit `atmosphere` to inherit it from the base map. A map without inherited atmosphere remains
|
|
29
|
+
unchanged. Set `atmosphere: false` to disable an inherited atmosphere. An enabled atmosphere requires
|
|
30
|
+
`projection: 'globe'`; validation rejects a Mercator or unspecified projection. Atmosphere options
|
|
31
|
+
replace the inherited object atomically rather than merging individual fields.
|
|
32
|
+
|
|
33
|
+
## Configure appearance
|
|
34
|
+
|
|
35
|
+
Use an object instead of `true` to override defaults:
|
|
36
|
+
|
|
37
|
+
| Option | Default | Meaning |
|
|
38
|
+
| --------------- | --------- | ------------------------------------------------------- |
|
|
39
|
+
| `skyColor` | `#07152b` | Near-space sky color |
|
|
40
|
+
| `horizonColor` | `#83b9f4` | Horizon and supplementary rim color |
|
|
41
|
+
| `fogColor` | `#bad2eb` | Native atmospheric fog color |
|
|
42
|
+
| `spaceColor` | `#030916` | Outer space background color |
|
|
43
|
+
| `starIntensity` | `0.6` | Brightness from 0 to 1; 0 hides stars |
|
|
44
|
+
| `starParallax` | `0.4` | Camera-relative motion from 0 to 1; 0 keeps stars still |
|
|
45
|
+
|
|
46
|
+
Colors follow the usual theme contract: use `token.color(...)`, color operations, or
|
|
47
|
+
`fixed(color, {reason})`. They must resolve to opaque colors. Compilation normalizes them to
|
|
48
|
+
six-digit hexadecimal values in the runtime metadata. Numeric options must be finite and within
|
|
49
|
+
0–1. Unknown properties are rejected. For example, this fragment belongs inside `defineMap(...)`
|
|
50
|
+
and uses `fixed` imported from `@tileflow/core`:
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
atmosphere: {
|
|
54
|
+
horizonColor: fixed('#83b9f4', {reason: 'Earth atmosphere stays blue across map themes'}),
|
|
55
|
+
starIntensity: 0.5,
|
|
56
|
+
starParallax: 0.25,
|
|
57
|
+
},
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The browser's reduced-motion preference overrides parallax while keeping the sky and stars visible.
|
|
61
|
+
No additional image, font, API key, or network request is needed for the effect.
|
|
62
|
+
|
|
63
|
+
## Browser integration
|
|
64
|
+
|
|
65
|
+
The compiler emits MapLibre `sky` and versioned `metadata['tileflow:atmosphere']` in every concrete
|
|
66
|
+
style. React, Vue, Svelte, and standalone browser capture attach the shared atmosphere runtime.
|
|
67
|
+
Theme changes update the effect from the newly loaded style. Loading a style without atmosphere
|
|
68
|
+
removes the decoration.
|
|
69
|
+
|
|
70
|
+
When constructing a MapLibre map directly, call `attachTileflowAtmosphere(map)` from
|
|
71
|
+
`@tileflow/core/browser` after constructing the map. Keep its returned cleanup function and call it
|
|
72
|
+
before removing the map; the map's `remove` event also disposes it. The helper creates its own
|
|
73
|
+
noninteractive, accessibility-hidden canvas inside the map container. It does not create a map,
|
|
74
|
+
change the camera, or add controls. Preserve the renderer's transparent canvas and standard
|
|
75
|
+
MapLibre CSS so space can show around the globe.
|
|
76
|
+
|
|
77
|
+
Importing the browser entry is safe during server rendering. Call the attachment only in the
|
|
78
|
+
browser, after mounting. Raw MapLibre consumers that do not attach the helper display the compiled
|
|
79
|
+
native atmosphere but do not receive Tileflow's stars or space background.
|
|
80
|
+
|
|
81
|
+
The native artifact profile does not support globe atmosphere and rejects `sky`. This browser
|
|
82
|
+
capability does not establish React Native or hosted Static Maps support. Public availability is
|
|
83
|
+
established by the installed package version, not by this repository's main branch.
|
|
@@ -48,21 +48,15 @@ import {
|
|
|
48
48
|
baedeker,
|
|
49
49
|
baedekerFonts,
|
|
50
50
|
baedekerIcons,
|
|
51
|
+
blueprint,
|
|
52
|
+
blueprintIcons,
|
|
51
53
|
civica,
|
|
52
54
|
civicaFonts,
|
|
53
55
|
civicaIcons,
|
|
54
|
-
cyberpunk,
|
|
55
|
-
cyberpunkFonts,
|
|
56
|
-
cyberpunkIcons,
|
|
57
56
|
ferraris,
|
|
58
57
|
ferrarisIcons,
|
|
59
58
|
harad,
|
|
60
59
|
haradIcons,
|
|
61
|
-
matrix,
|
|
62
|
-
matrixFonts,
|
|
63
|
-
matrixIcons,
|
|
64
|
-
sanFrancisto,
|
|
65
|
-
sanFrancistoIcons,
|
|
66
60
|
siegfried,
|
|
67
61
|
siegfriedFonts,
|
|
68
62
|
siegfriedIcons,
|
|
@@ -71,11 +65,6 @@ import {
|
|
|
71
65
|
streets,
|
|
72
66
|
streetsIcons,
|
|
73
67
|
streetsThemes,
|
|
74
|
-
superTileWorld,
|
|
75
|
-
superTileWorldFonts,
|
|
76
|
-
superTileWorldIcons,
|
|
77
|
-
verdant,
|
|
78
|
-
verdantIcons,
|
|
79
68
|
} from '@tileflow/maps';
|
|
80
69
|
```
|
|
81
70
|
|
|
@@ -87,11 +76,8 @@ without changing the asset collection. Baedeker declares `[baedekerIcons]`, whos
|
|
|
87
76
|
patterns support its travel-atlas design, and `[baedekerFonts]`, its own Cormorant Garamond
|
|
88
77
|
directory; it derives contours in the browser from unpackaged Mapterhorn terrain tiles. Cívica
|
|
89
78
|
declares `[civicaIcons]` for its original civic-print patterns and destination artwork and
|
|
90
|
-
`[civicaFonts]` for its packaged lettering.
|
|
91
|
-
`[
|
|
92
|
-
declares `[cyberpunkIcons]` and `[cyberpunkFonts]`; Matrix
|
|
93
|
-
independently declares `[matrixIcons]` and `[matrixFonts]`. San Francisto declares
|
|
94
|
-
`[sanFrancistoIcons]` for its four technical hatches and schematic POI node, derives contours from
|
|
79
|
+
`[civicaFonts]` for its packaged lettering. Blueprint declares
|
|
80
|
+
`[blueprintIcons]` for its four technical hatches and schematic POI node, derives contours from
|
|
95
81
|
unpackaged Mapterhorn tiles, and uses the canonical Noto Sans glyph provider. The same asset
|
|
96
82
|
operation is available to applications:
|
|
97
83
|
|
|
@@ -117,6 +103,6 @@ explicit locked descriptor, not a generic source registry.
|
|
|
117
103
|
and prepares ordinary public artifacts without serializing installation paths. It compiles one
|
|
118
104
|
deterministic sprite from the final icon composition and validates every literal `icon-image`,
|
|
119
105
|
`fill-pattern`, and `line-pattern` in the final style against it. It also prepares any declared font
|
|
120
|
-
directories generically; `baedekerFonts`, `
|
|
106
|
+
directories generically; `baedekerFonts`, `civicaFonts`, and `siegfriedFonts` are
|
|
121
107
|
ordinary package descriptors rather than pipeline special cases. Calling the pure compiler for a map whose style needs unprepared
|
|
122
108
|
assets fails instead of emitting broken runtime references.
|