@tileflow/core 0.1.0-alpha.21 → 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.
- package/README.md +197 -72
- package/THIRD_PARTY_NOTICES.md +60 -2
- package/dist/browser.d.ts +82 -16
- package/dist/browser.js +1234 -267
- package/dist/build.d.ts +19 -56
- package/dist/build.js +10915 -8333
- package/dist/config-reference.json +31882 -0
- package/dist/index.d.ts +476 -13
- package/dist/index.js +12409 -8832
- package/dist/{types-DlUGI6LC.d.ts → manifest-B5GKVMFE.d.ts} +252 -20
- package/dist/manifest.d.ts +1 -2
- package/dist/manifest.js +18 -2
- package/dist/map-BHL_0Mkx.d.ts +1145 -0
- package/dist/runtime.d.ts +1 -2
- package/dist/runtime.js +60 -5
- package/package.json +5 -8
- package/dist/domains-CPSrdTik.d.ts +0 -4
- package/dist/recipe.d.ts +0 -66
- package/dist/recipe.js +0 -577
- package/dist/requirements-BV77ZVhR.d.ts +0 -491
- package/dist/runtime-C4MtSzkB.d.ts +0 -223
- package/dist/visual-semantics-DTC-8Hsb.d.ts +0 -479
package/README.md
CHANGED
|
@@ -82,8 +82,8 @@ export default defineMap({
|
|
|
82
82
|
});
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
Map identity
|
|
86
|
-
|
|
85
|
+
Map identity and scenes belong to the leaf and do not inherit. Hosted browser policy is configured
|
|
86
|
+
in Tileflow and does not enter cartographic authoring or compilation.
|
|
87
87
|
|
|
88
88
|
Set `projection: 'globe'` for MapLibre's adaptive globe preset. Global zooms render as a sphere,
|
|
89
89
|
then transition to Mercator between zoom 10 and 12 so detailed streets remain planar. Omit the
|
|
@@ -147,20 +147,62 @@ registerTileflowContourProtocol({addProtocol: maplibregl.addProtocol});
|
|
|
147
147
|
|
|
148
148
|
## Authoring model
|
|
149
149
|
|
|
150
|
-
Tileflow exposes one authoring concept
|
|
151
|
-
`
|
|
152
|
-
|
|
150
|
+
Tileflow exposes one authoring concept and one constructor: `defineMap()`. A complete map omits
|
|
151
|
+
`extends`; an inherited map sets `extends` to another imported map object. All ten first-party
|
|
152
|
+
maps are independent standalone maps. They use the sole semantic compiler while defining
|
|
153
153
|
their complete designs and asset providers directly; no official map imports or extends another
|
|
154
|
-
official map. Applications can extend any of those
|
|
154
|
+
official map. Applications can extend any of those maps through the same public API. Streets
|
|
155
155
|
itself owns coordinated light and dark themes.
|
|
156
|
-
There is no
|
|
156
|
+
There is no public compiler selector or alternate compiler. The authoring contract has no recipe or
|
|
157
|
+
cartographic compatibility alias.
|
|
158
|
+
|
|
159
|
+
### Machine-readable V1 surface
|
|
160
|
+
|
|
161
|
+
`tileflowAuthoringManifest` is the deterministic, deeply frozen description of the public semantic
|
|
162
|
+
language. Its schema version is `tileflowAuthoringManifestSchemaVersion`. The manifest's `domains`
|
|
163
|
+
array is generated from the compiler's closed registry and records exact compile order, module and
|
|
164
|
+
service dependencies, and provided services. `operations` lists only integrated public operations:
|
|
165
|
+
defining/extending a map, directly replacing, refining, disabling, or resetting a keyed domain,
|
|
166
|
+
and adding owner-local render passes or target refinements. Direct declaration is the sole
|
|
167
|
+
replacement syntax; there is no redundant `set()` helper.
|
|
168
|
+
|
|
169
|
+
Agents and other tools can discover this contract without importing executable configuration:
|
|
170
|
+
`tileflow language manifest --json` emits the manifest and `tileflow language schema --json` emits
|
|
171
|
+
the packaged generated authoring/resolved JSON Schema. Both commands are deterministic, read-only,
|
|
172
|
+
and network-free. The manifest links every domain to its authoring, options, patch, and resolved
|
|
173
|
+
schema definitions, and enumerates the closed expression and render-selector vocabulary with its
|
|
174
|
+
finite limits.
|
|
175
|
+
|
|
176
|
+
The manifest also describes the exact structured compiler contract. A successful
|
|
177
|
+
`createStyleResult()` has `{ok: true, diagnostics, report, style}`; a failure has
|
|
178
|
+
`{ok: false, diagnostics, report}` and forbids `style`. Report schema version 1 requires
|
|
179
|
+
`domains`, `map`, `planner`, `schemaVersion`, and sorted semantic `targets`; `theme`, source
|
|
180
|
+
`requirements`, and physical `provenance` are optional. Pass `{inspection: true}` only when the
|
|
181
|
+
read-only physical-output provenance sidecar is needed. Its IDs and indexes are diagnostic
|
|
182
|
+
observations, never stable or addressable authoring targets.
|
|
183
|
+
|
|
184
|
+
`diffTileflowMaps(before, after)` resolves both inputs before comparing them and returns semantic
|
|
185
|
+
diff schema version 1:
|
|
157
186
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
187
|
+
```ts
|
|
188
|
+
{
|
|
189
|
+
schemaVersion: 1,
|
|
190
|
+
from: {id, version},
|
|
191
|
+
to: {id, version},
|
|
192
|
+
summary: {add, remove, change, total},
|
|
193
|
+
changes: [
|
|
194
|
+
{kind: 'add', path: '/projection', after: 'globe'},
|
|
195
|
+
{kind: 'remove', path: '/modules/water', before: {/* ... */}},
|
|
196
|
+
{kind: 'change', path: '/view/zoom', before: 12, after: 13},
|
|
197
|
+
],
|
|
198
|
+
}
|
|
199
|
+
```
|
|
162
200
|
|
|
163
|
-
|
|
201
|
+
Paths are RFC 6901 JSON Pointers. Object keys compare recursively in code-unit order; arrays compare
|
|
202
|
+
atomically because map inheritance replaces arrays. Leaf identity (`id`, `name`, `version`) and
|
|
203
|
+
delivery metadata identify the endpoints but are not cartographic changes.
|
|
204
|
+
|
|
205
|
+
Custom build tooling can opt into a separate, read-only diagnostic sidecar from the explicit build
|
|
164
206
|
entrypoint:
|
|
165
207
|
|
|
166
208
|
```ts
|
|
@@ -170,9 +212,9 @@ const {style, inspection} = createStyleWithInspection(map);
|
|
|
170
212
|
```
|
|
171
213
|
|
|
172
214
|
`inspection.layers` stays aligned with the final Style layer order and records the semantic
|
|
173
|
-
`owner`, `slot`, `target`, and ordered
|
|
174
|
-
layers merged by the
|
|
175
|
-
`createStylesFromCatalogWithInspection` provide the corresponding
|
|
215
|
+
`owner`, `slot`, `target`, and ordered render passes/refinements represented by each layer, including
|
|
216
|
+
layers merged by the physical planner. `createStyleFromCatalogWithInspection` and
|
|
217
|
+
`createStylesFromCatalogWithInspection` provide the corresponding catalog-oriented forms. The
|
|
176
218
|
ordinary Style bytes are identical to compilation without inspection; private compiler metadata is
|
|
177
219
|
stripped before finalization, and the sidecar never enters a Style, runtime manifest, or production
|
|
178
220
|
artifact unless a caller deliberately stores it.
|
|
@@ -186,8 +228,8 @@ a theme in the final collection.
|
|
|
186
228
|
`modules` merges by domain name: an omitted domain remains inherited, while declaring `roads(...)`
|
|
187
229
|
or another domain replaces that inherited module request and every compiler-owned contribution
|
|
188
230
|
attached to it as a unit. `data`, `projection`, `terrain`, `marine`, `icons`, and the text provider
|
|
189
|
-
are atomic; identity and tooling metadata are leaf-owned. `
|
|
190
|
-
|
|
231
|
+
are atomic; identity and tooling metadata are leaf-owned. `disable()` removes the domain and
|
|
232
|
+
its complete inherited render stack. The resolved result is a standalone map with no runtime dependency on
|
|
191
233
|
TypeScript imports.
|
|
192
234
|
|
|
193
235
|
`icons` is an intentional exception to implicit array composition: omission inherits the exact
|
|
@@ -196,18 +238,17 @@ spread when the child should keep a parent's directories. `fonts` and `glyphs` a
|
|
|
196
238
|
exclusive text providers; declaring either atomically replaces an inherited provider of either
|
|
197
239
|
kind. Unknown keys and former compatibility shapes are rejected.
|
|
198
240
|
|
|
199
|
-
Most authors should extend an existing
|
|
200
|
-
|
|
241
|
+
Most authors should extend an existing official or application map. A complete standalone map uses
|
|
242
|
+
the same `defineMap()` call without `extends`:
|
|
201
243
|
|
|
202
244
|
```ts
|
|
203
|
-
import {defineMap
|
|
245
|
+
import {defineMap} from '@tileflow/core';
|
|
204
246
|
import {streetsIcons, streetsThemes} from '@tileflow/maps';
|
|
205
247
|
|
|
206
|
-
const
|
|
207
|
-
id: 'company-
|
|
208
|
-
name: 'Company
|
|
248
|
+
const companyBase = defineMap({
|
|
249
|
+
id: 'company-base',
|
|
250
|
+
name: 'Company base',
|
|
209
251
|
version: 1,
|
|
210
|
-
root: {compiler: 'streets', compilerVersion: tileflowStreetsCompilerVersion},
|
|
211
252
|
glyphs: {
|
|
212
253
|
kind: 'url',
|
|
213
254
|
url: 'https://api.tileflow.dev/fonts/{fontstack}/{range}.pbf',
|
|
@@ -222,38 +263,41 @@ const companyRoot = defineRootMap({
|
|
|
222
263
|
export default defineMap({
|
|
223
264
|
id: 'company-navigation',
|
|
224
265
|
version: 1,
|
|
225
|
-
extends:
|
|
266
|
+
extends: companyBase,
|
|
226
267
|
projection: 'globe',
|
|
227
268
|
});
|
|
228
269
|
```
|
|
229
270
|
|
|
230
|
-
The
|
|
271
|
+
The standalone map above is complete as written. A map always owns its complete text provider; Core does not
|
|
231
272
|
obtain fonts or sprites from World and never invents a fallback URL. The URL-backed first-party
|
|
232
|
-
`streets`, `ferraris`, `harad`, `soundings`, and `
|
|
233
|
-
directly, while `siegfried` declares packaged fonts, so ordinary imports and derived
|
|
234
|
-
without out-of-band release metadata.
|
|
273
|
+
`streets`, `baedeker`, `ferraris`, `harad`, `soundings`, `verdant`, and `sanFrancisto` maps declare their glyph
|
|
274
|
+
providers directly, while `siegfried` declares packaged fonts, so ordinary imports and derived
|
|
275
|
+
maps compile without out-of-band release metadata.
|
|
235
276
|
|
|
236
277
|
```mermaid
|
|
237
278
|
flowchart LR
|
|
238
279
|
A["tileflow.config.ts exports one map"] --> B["Resolve imported map lineage"]
|
|
239
|
-
B --> C["Complete design + domain
|
|
240
|
-
C --> D["
|
|
241
|
-
D --> E["
|
|
280
|
+
B --> C["Complete semantic design + closed domain registry"]
|
|
281
|
+
C --> D["Domain IR + assembly + render stacks"]
|
|
282
|
+
D --> E["Physical planner"]
|
|
283
|
+
E --> F["Single MapLibre lowering"]
|
|
284
|
+
F --> G["Validated Style JSON + compilation report"]
|
|
242
285
|
```
|
|
243
286
|
|
|
244
287
|
Modules are keyed by domain, so object order never controls rendering and a domain can appear only
|
|
245
|
-
once. A map extending Streets inherits its complete module set. Use `
|
|
246
|
-
|
|
247
|
-
`poi`, `aeroways`, `transit`, `vegetation`, `addresses`, and `landforms`.
|
|
248
|
-
The
|
|
249
|
-
|
|
250
|
-
|
|
288
|
+
once. A map extending Streets inherits its complete module set. Use `disable()` to remove a domain
|
|
289
|
+
deliberately. The public domains are `land`, `water`, `nautical`, `roads`, `buildings`, `boundaries`,
|
|
290
|
+
`labels`, `poi`, `aeroways`, `transit`, `vegetation`, `addresses`, and `landforms`.
|
|
291
|
+
The closed domain registry is exhaustive over that domain set and owns defaults, dependency order,
|
|
292
|
+
services, and compiler orchestration. Contract tests keep its keys and type tags in lockstep with
|
|
293
|
+
the strict resolved schema, generated authoring/options/patch/resolved schema aliases, and public
|
|
294
|
+
exports. Disabling `roads` also removes dependent road names, shields, and junction references;
|
|
251
295
|
independent place, water, aerodrome, and POI labels remain under the labels module.
|
|
252
296
|
|
|
253
297
|
Every styling module supports semantic shortcuts and exact semantic targets. Visual style values
|
|
254
|
-
accept typed token refs, documented `fixed(value, {reason})` values,
|
|
255
|
-
`
|
|
256
|
-
`zoom.exponential(...)`. Refs and fixed leaves also work inside expressions and zoom stops.
|
|
298
|
+
accept typed token refs, documented `fixed(value, {reason})` values, closed data expressions through
|
|
299
|
+
`expr.*` plus `field(...)`, and zoom functions through `zoom.step(...)`, `zoom.linear(...)`, or
|
|
300
|
+
`zoom.exponential(...)`. Refs and fixed leaves also work inside typed expressions and zoom stops.
|
|
257
301
|
Structural controls such as presets, visibility, and zoom gates remain ordinary literals. Exact
|
|
258
302
|
controls address stable concepts such as `roads.classes.primary.surface.fill`, not renderer layer
|
|
259
303
|
IDs.
|
|
@@ -321,14 +365,14 @@ ordinary visual styles intentionally do not accept raw source filters.
|
|
|
321
365
|
|
|
322
366
|
## Compiled-style performance
|
|
323
367
|
|
|
324
|
-
The
|
|
368
|
+
The semantic compiler resolves semantic modules and their owned contributions first, then compacts equivalent
|
|
325
369
|
physical MapLibre layers. At high-detail zooms, road classes become a small set of data-driven
|
|
326
370
|
cohorts; equivalent road labels and tunnel hatches share compatible buckets; and land-cover,
|
|
327
371
|
land-use, and waterway classes share compatible buckets. Compaction selects
|
|
328
372
|
cohorts from compiler-owned semantic targets, not by parsing physical IDs; its temporary
|
|
329
373
|
owner/slot/target provenance is stripped from the public Style JSON.
|
|
330
374
|
|
|
331
|
-
After
|
|
375
|
+
After physical planning, Core embeds a bounded private `tileflow:interaction-manifest` lookup for the
|
|
332
376
|
final POI representations. `@tileflow/interactions/maplibre` validates and consumes that metadata
|
|
333
377
|
so applications can bind to `domain: 'poi'` without depending on physical layer IDs. The lookup is
|
|
334
378
|
paired atomically with the exact style it describes; it is not a public style-authoring API.
|
|
@@ -647,7 +691,7 @@ export default defineMap({
|
|
|
647
691
|
});
|
|
648
692
|
```
|
|
649
693
|
|
|
650
|
-
|
|
694
|
+
Semantic modules own structure and behavior; visual fields accept typed token references.
|
|
651
695
|
Use a visual literal only inside a theme. If a module value intentionally must not vary, wrap it in
|
|
652
696
|
`fixed(value, {reason})`. `tileflow inspect --json` reports stable `THEME_IMPLICIT_FIXED`
|
|
653
697
|
diagnostics: implicit color, font, and image literals block Style compilation, while direct visual
|
|
@@ -657,14 +701,73 @@ deterministic OKLCH `color.mix()` keep derived palette logic inspectable. Unknow
|
|
|
657
701
|
cross-category refs, token-schema drift, and unresolved visual nodes fail before Style JSON is
|
|
658
702
|
emitted.
|
|
659
703
|
|
|
660
|
-
There is no
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
never returns an invalid style.
|
|
704
|
+
There is no physical-layer override for the Tileflow basemap or separate official-map authoring
|
|
705
|
+
surface. Basemap behavior belongs to a typed control or owner-local render stack. Every
|
|
706
|
+
official and application map therefore follows the same schema, inheritance rules, diagnostics,
|
|
707
|
+
and lowering path. `createStyle()` validates the final planned Style JSON with the MapLibre style
|
|
708
|
+
spec and never returns an invalid style.
|
|
665
709
|
|
|
666
710
|
## Data is separate from design
|
|
667
711
|
|
|
712
|
+
Team data uses named logical sources and validated MapLibre overlays. The hosted identity never
|
|
713
|
+
contains a CDN URL; `local` is the explicit account-free PMTiles resolution for Dev and Capture:
|
|
714
|
+
|
|
715
|
+
```ts
|
|
716
|
+
import {defineMap, hostedTileset, maplibreOverlay} from '@tileflow/core';
|
|
717
|
+
import {streets} from '@tileflow/maps';
|
|
718
|
+
|
|
719
|
+
const stores = hostedTileset({
|
|
720
|
+
tileset: 'stores',
|
|
721
|
+
local: './data/stores.pmtiles',
|
|
722
|
+
attribution: 'Store data © Example',
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
export default defineMap({
|
|
726
|
+
id: 'store-locator',
|
|
727
|
+
version: 1,
|
|
728
|
+
extends: streets,
|
|
729
|
+
sources: {stores},
|
|
730
|
+
overlays: {
|
|
731
|
+
stores: maplibreOverlay({
|
|
732
|
+
source: 'stores',
|
|
733
|
+
placement: 'above-roads',
|
|
734
|
+
layers: [
|
|
735
|
+
{
|
|
736
|
+
id: 'stores-points',
|
|
737
|
+
type: 'circle',
|
|
738
|
+
'source-layer': 'store_locations',
|
|
739
|
+
paint: {
|
|
740
|
+
'circle-color': ['match', ['get', 'category'], 'restaurant', '#ef4444', '#64748b'],
|
|
741
|
+
},
|
|
742
|
+
},
|
|
743
|
+
],
|
|
744
|
+
}),
|
|
745
|
+
},
|
|
746
|
+
});
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
Tileflow automatically registers only protocols in namespaces that Tileflow owns.
|
|
750
|
+
`tileflow-pmtiles://` is reserved for PMTiles resources managed by Tileflow. Tileflow never
|
|
751
|
+
automatically registers, removes, or replaces the global `pmtiles://` handler. Explicit PMTiles
|
|
752
|
+
sources supplied by an application remain the application's responsibility.
|
|
753
|
+
|
|
754
|
+
For local resolution, the Style URL is based on the logical tileset ID and remains stable when Dev
|
|
755
|
+
creates a new immutable snapshot. Physical generation IDs and local content hashes never enter the
|
|
756
|
+
Style representation. A new Dev request or Capture operation resolves current and retains that
|
|
757
|
+
snapshot for its duration; an operation already in progress keeps its acquired generation.
|
|
758
|
+
|
|
759
|
+
`local` does not make build output own or publish the archive. Production builds reject unresolved
|
|
760
|
+
local PMTiles. Use explicit managed publication or an application-owned production source.
|
|
761
|
+
|
|
762
|
+
One overlay owns one ordered group of ordinary MapLibre Style Layers. Public layer IDs are retained
|
|
763
|
+
for `map.on(...)`, feature queries, and application state. Placement is one of `above-water`,
|
|
764
|
+
`below-roads`, `above-roads`, `above-buildings`, `below-labels`, or `above-labels`; overlays sharing
|
|
765
|
+
a placement sort by overlay ID. A map accepts up to 16 Team sources in addition to Tileflow World
|
|
766
|
+
and terrain. These semantic boundaries do not expose generated basemap layer IDs.
|
|
767
|
+
`sources` and `overlays` merge by key through `extends`, declarations replace atomically, and
|
|
768
|
+
`remove()` deletes one inherited key. Removing a still-used source fails validation. There is no
|
|
769
|
+
interaction DSL or parallel expression language.
|
|
770
|
+
|
|
668
771
|
Omitting `data` selects the compiler-owned Tileflow World `v1` compatibility generation:
|
|
669
772
|
|
|
670
773
|
```ts
|
|
@@ -678,7 +781,7 @@ domain, while the font token catalog gives module styles a stable semantic targe
|
|
|
678
781
|
explicit and atomic: a map may declare either ordered `fonts` directories
|
|
679
782
|
for browser font files or a `glyphs` provider for PBF glyphs, never both. Omitting both inherits the
|
|
680
783
|
parent's provider; declaring either replaces an inherited provider of either kind. After resolution,
|
|
681
|
-
a map that emits text must have exactly one provider. A text-free
|
|
784
|
+
a map that emits text must have exactly one provider. A text-free standalone map may omit both. On a derived
|
|
682
785
|
map, omission inherits the parent provider while `fonts: []` explicitly removes it; that empty array
|
|
683
786
|
is valid only when the resolved map emits no text.
|
|
684
787
|
|
|
@@ -720,7 +823,7 @@ another. Browser adapters load local faces before MapLibre. Native releases use
|
|
|
720
823
|
`glyphs` URL provider instead, which enumerates the exact comma-joined MapLibre request keys in
|
|
721
824
|
`fontStacks`.
|
|
722
825
|
|
|
723
|
-
Streets, Ferraris, Härad, Soundings, and
|
|
826
|
+
Streets, Ferraris, Härad, Soundings, Verdant, and San Francisto each declare
|
|
724
827
|
`https://api.tileflow.dev/fonts/{fontstack}/{range}.pbf` with the exact `Noto Sans Regular` and
|
|
725
828
|
`Noto Sans Bold` stacks. That compatibility URL is canonical but not content-addressed; responses revalidate and
|
|
726
829
|
do not make a resolved map byte-reproducible. Exact official glyph identity belongs to the
|
|
@@ -728,8 +831,8 @@ separately published `/base/<assetSetSha256>/glyphs/...` global base-asset contr
|
|
|
728
831
|
`assetSetSha256` identifies the standalone glyph collection; it is not the same-domain value as the
|
|
729
832
|
per-map `assetSetSha256` in `build-manifest.json`.
|
|
730
833
|
Cyberpunk and Matrix each replace the URL provider with their own packaged Oxanium directory and
|
|
731
|
-
reference the exact local faces `Oxanium Medium` and `Oxanium SemiBold`.
|
|
732
|
-
Cormorant Garamond Regular, SemiBold, and Italic
|
|
834
|
+
reference the exact local faces `Oxanium Medium` and `Oxanium SemiBold`. Baedeker and Siegfried
|
|
835
|
+
each own a packaged directory containing Cormorant Garamond Regular, SemiBold, and Italic.
|
|
733
836
|
|
|
734
837
|
Name the official generation deliberately, or use another OpenMapTiles-compatible vector source:
|
|
735
838
|
|
|
@@ -932,8 +1035,9 @@ source classes into one civic color.
|
|
|
932
1035
|
|
|
933
1036
|
World and text assets are independent contracts. `tileflowWorld()` selects `world-v1/current` or an
|
|
934
1037
|
exact `releaseId + descriptorSha256`; a `glyphs` declaration contains its own complete URL. Ordinary
|
|
935
|
-
imports of Streets, Ferraris, Härad, Siegfried, Soundings, Cyberpunk, Matrix,
|
|
936
|
-
|
|
1038
|
+
imports of Streets, Baedeker, Ferraris, Härad, Siegfried, Soundings, Cyberpunk, Matrix, Verdant,
|
|
1039
|
+
and San Francisto
|
|
1040
|
+
remain usable because each official map owns or inherits a URL or packaged-font provider.
|
|
937
1041
|
URL-backed maps become exact-byte reproducible
|
|
938
1042
|
when the immutable global base-asset set is published and their explicit URL is updated to its
|
|
939
1043
|
`assetSetSha256` path; no World or compiler fallback participates in that rollout. The global
|
|
@@ -989,16 +1093,17 @@ subpaths. Node build integrations import the small deterministic map-identity co
|
|
|
989
1093
|
reproduces the same asset-set v1 hash from exact per-file identities after another system has
|
|
990
1094
|
independently confirmed the immutable bytes; package or bundle hashes are not substitutes. The
|
|
991
1095
|
previous aggregate-wrapper and recipe-selector APIs, `renderer`, top-level `tiles`/`tileset`, module
|
|
992
|
-
arrays, and raw `layers` are not part of this API.
|
|
1096
|
+
arrays, and top-level raw `layers` are not part of this API. Raw MapLibre layers are accepted only
|
|
1097
|
+
inside a named `maplibreOverlay()` bound to a named Team source.
|
|
993
1098
|
|
|
994
|
-
|
|
995
|
-
owner-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1099
|
+
Advanced cartography remains in the same public language: `withRenderStack()`, `renderPass()`, and
|
|
1100
|
+
`refineRenderTarget()` address owner-local semantic targets without exposing physical layer IDs,
|
|
1101
|
+
sources, source layers, raw filters, or before/after anchors. Typed `field()` references and
|
|
1102
|
+
`expr.*` builders stay semantic until the compiler's single lowering boundary. There is no recipe
|
|
1103
|
+
subpath or alternate compiler integration API.
|
|
999
1104
|
|
|
1000
1105
|
`mapRevisionSha256` hashes only resolved cartography: the effective design after `extends`, the
|
|
1001
|
-
|
|
1106
|
+
semantic language, compiler-owned effective contributions, and exact source icon/font identities.
|
|
1002
1107
|
Leaf `id`, `name`, editorial `mapVersion`, default `view`, capture `scenes`, and `delivery` policy do
|
|
1003
1108
|
not change that content identity. They remain explicit on the map, manifest, Style, capture receipt,
|
|
1004
1109
|
or Hosted deployment fingerprint that owns them. Compiler ABI, package versions, generated assets,
|
|
@@ -1049,7 +1154,6 @@ Framework adapters import the browser-only lifecycle kernel explicitly:
|
|
|
1049
1154
|
import {
|
|
1050
1155
|
attachTileflowFairUseNotice,
|
|
1051
1156
|
attachTileflowMapLifecycle,
|
|
1052
|
-
createTileflowMarkerController,
|
|
1053
1157
|
createTileflowSessionStarter,
|
|
1054
1158
|
createTileflowTransformRequest,
|
|
1055
1159
|
registerTileflowWorldRequestBridge,
|
|
@@ -1076,13 +1180,24 @@ can set `grantTimeoutMs` from 1 to 120,000 milliseconds.
|
|
|
1076
1180
|
server-owned commercial authorization. User `transformRequest` callbacks still run first; Tileflow
|
|
1077
1181
|
then decorates only the resulting eligible URL and preserves the other request options.
|
|
1078
1182
|
|
|
1183
|
+
Set `analytics.surfaceId` to a stable product location when the same Map appears in several places:
|
|
1184
|
+
|
|
1185
|
+
```ts
|
|
1186
|
+
const analytics = {surfaceId: 'store-locator'};
|
|
1187
|
+
```
|
|
1188
|
+
|
|
1189
|
+
A Surface ID is 1–64 lowercase ASCII letters, digits, `.`, `_`, or `-`; it starts and ends with a
|
|
1190
|
+
letter or digit. Missing or invalid values become `default`. Use a durable integration name such as
|
|
1191
|
+
`checkout` or `dealer-search`, not a URL, branch, preview, random component instance, or user ID.
|
|
1192
|
+
Surface labels do not change authorization, entitlement, or Session identity.
|
|
1193
|
+
|
|
1079
1194
|
For exact Tileflow World release tiles, framework adapters also use the browser request bridge to
|
|
1080
1195
|
observe the response's safe fair-use state without adding identity, query parameters, credentials,
|
|
1081
1196
|
or user headers to the public World URL. The bridge requires the immutable release path and exactly
|
|
1082
1197
|
one lowercase descriptor digest; the retired mutable World template is never intercepted. Early
|
|
1083
1198
|
`GRACE` stays silent; signed late `GRACE` creates a compact
|
|
1084
|
-
accessible owner-action pill, and `
|
|
1085
|
-
header, absent tile, MapLibre error, or failed response cannot erase an existing
|
|
1199
|
+
accessible owner-action pill, and `MANAGED_REQUIRED` creates a stronger in-map banner. A missing
|
|
1200
|
+
header, absent tile, MapLibre error, or failed response cannot erase an existing manage action; a
|
|
1086
1201
|
later successful `OPEN` response can clear it. Shaped empty tiles remain render-safe while the owner
|
|
1087
1202
|
action stays available. Successful World tile bodies are streamed with a 16 MiB maximum: an
|
|
1088
1203
|
oversized `Content-Length` is rejected before reading, and chunked responses are cancelled as soon
|
|
@@ -1097,6 +1212,9 @@ Core. That package exports the maps and their reusable directory descriptors:
|
|
|
1097
1212
|
|
|
1098
1213
|
```ts
|
|
1099
1214
|
import {
|
|
1215
|
+
baedeker,
|
|
1216
|
+
baedekerFonts,
|
|
1217
|
+
baedekerIcons,
|
|
1100
1218
|
cyberpunk,
|
|
1101
1219
|
cyberpunkFonts,
|
|
1102
1220
|
cyberpunkIcons,
|
|
@@ -1107,6 +1225,8 @@ import {
|
|
|
1107
1225
|
matrix,
|
|
1108
1226
|
matrixFonts,
|
|
1109
1227
|
matrixIcons,
|
|
1228
|
+
sanFrancisto,
|
|
1229
|
+
sanFrancistoIcons,
|
|
1110
1230
|
siegfried,
|
|
1111
1231
|
siegfriedFonts,
|
|
1112
1232
|
siegfriedIcons,
|
|
@@ -1120,13 +1240,18 @@ import {
|
|
|
1120
1240
|
} from '@tileflow/maps';
|
|
1121
1241
|
```
|
|
1122
1242
|
|
|
1123
|
-
All
|
|
1124
|
-
|
|
1243
|
+
All ten official maps are complete standalone maps. The sole semantic compiler is implicit; none
|
|
1244
|
+
imports or extends another official map, and each declares its own icon directory.
|
|
1125
1245
|
Streets declares `[streetsIcons]` and exposes its complete coordinated appearances as
|
|
1126
1246
|
`streetsThemes.light` and `streetsThemes.dark`; image tokens select the matching sidewalk pattern
|
|
1127
|
-
without changing the asset collection.
|
|
1128
|
-
|
|
1129
|
-
|
|
1247
|
+
without changing the asset collection. Baedeker declares `[baedekerIcons]`, whose eight original
|
|
1248
|
+
patterns support its travel-atlas design, and `[baedekerFonts]`, its own Cormorant Garamond
|
|
1249
|
+
directory; it derives contours in the browser from unpackaged Mapterhorn terrain tiles. Cyberpunk
|
|
1250
|
+
declares `[cyberpunkIcons]` and `[cyberpunkFonts]`; Matrix
|
|
1251
|
+
independently declares `[matrixIcons]` and `[matrixFonts]`. San Francisto declares
|
|
1252
|
+
`[sanFrancistoIcons]` for its four technical hatches and schematic POI node, derives contours from
|
|
1253
|
+
unpackaged Mapterhorn tiles, and uses the canonical Noto Sans glyph provider. The same asset
|
|
1254
|
+
operation is available to applications:
|
|
1130
1255
|
|
|
1131
1256
|
```ts
|
|
1132
1257
|
export default defineMap({
|
|
@@ -1148,6 +1273,6 @@ sprite selector, icon mapping, icon-specific inheritance, additive command, or c
|
|
|
1148
1273
|
and prepares ordinary public artifacts without serializing installation paths. It compiles one
|
|
1149
1274
|
deterministic sprite from the final icon composition and validates every literal `icon-image`,
|
|
1150
1275
|
`fill-pattern`, and `line-pattern` in the final style against it. It also prepares any declared font
|
|
1151
|
-
directories generically; `cyberpunkFonts`, `matrixFonts`, and `siegfriedFonts` are
|
|
1152
|
-
descriptors rather than pipeline special cases. Calling the pure compiler for a map whose style needs unprepared
|
|
1276
|
+
directories generically; `baedekerFonts`, `cyberpunkFonts`, `matrixFonts`, and `siegfriedFonts` are
|
|
1277
|
+
ordinary package descriptors rather than pipeline special cases. Calling the pure compiler for a map whose style needs unprepared
|
|
1153
1278
|
assets fails instead of emitting broken runtime references.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
|
-
`@tileflow/core/browser` embeds `maplibre-contour` 0.1.0
|
|
4
|
-
|
|
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
5
|
|
|
6
6
|
## maplibre-contour 0.1.0
|
|
7
7
|
|
|
@@ -168,6 +168,64 @@ See <https://github.com/nodejs/node/blob/main/LICENSE> for more information.
|
|
|
168
168
|
|
|
169
169
|
---
|
|
170
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
|
+
|
|
171
229
|
## TypeScript helper code
|
|
172
230
|
|
|
173
231
|
The bundled browser entry retains TypeScript helper code and its complete upstream notice:
|