@tileflow/core 0.1.0-alpha.22 → 0.1.0-alpha.24
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 +7 -3
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/dist/browser.js +2 -1
- package/dist/build.js +60 -2
- package/dist/index.js +60 -2
- package/package.json +2 -5
- package/GENERATED_OUTPUT_LICENSE.md +0 -21
- package/NOTICE +0 -9
- package/TRADEMARKS.md +0 -10
package/README.md
CHANGED
|
@@ -753,11 +753,15 @@ sources supplied by an application remain the application's responsibility.
|
|
|
753
753
|
|
|
754
754
|
For local resolution, the Style URL is based on the logical tileset ID and remains stable when Dev
|
|
755
755
|
creates a new immutable snapshot. Physical generation IDs and local content hashes never enter the
|
|
756
|
-
Style representation.
|
|
757
|
-
|
|
756
|
+
Style representation. Each Dev PMTiles request retains the snapshot it resolved until its response
|
|
757
|
+
is prepared, and strong generation ETags prevent one cached PMTiles read from silently combining
|
|
758
|
+
ranges from different generations. Standalone Capture retains one snapshot for its complete render.
|
|
759
|
+
Application Capture does not freeze every local dataset across the complete screenshot window; the
|
|
760
|
+
application's development server remains authoritative for its per-read generation.
|
|
758
761
|
|
|
759
762
|
`local` does not make build output own or publish the archive. Production builds reject unresolved
|
|
760
|
-
local PMTiles.
|
|
763
|
+
local PMTiles. Explicitly publish the tileset through Tileflow's managed upload, validation,
|
|
764
|
+
versioning, and hosting flow, or serve it from infrastructure owned by the application.
|
|
761
765
|
|
|
762
766
|
One overlay owns one ordered group of ordinary MapLibre Style Layers. Public layer IDs are retained
|
|
763
767
|
for `map.on(...)`, feature queries, and application state. Placement is one of `above-water`,
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
|
-
`@tileflow/core/browser` embeds `maplibre-contour` 0.1.0, `PMTiles` 4.4.0, and `fflate` 0.8.
|
|
3
|
+
`@tileflow/core/browser` embeds `maplibre-contour` 0.1.0, `PMTiles` 4.4.0, and `fflate` 0.8.3 so
|
|
4
4
|
contour and local archive rendering remain self-contained. The complete upstream licenses follow.
|
|
5
5
|
|
|
6
6
|
## maplibre-contour 0.1.0
|
|
@@ -203,7 +203,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
203
203
|
|
|
204
204
|
---
|
|
205
205
|
|
|
206
|
-
## fflate 0.8.
|
|
206
|
+
## fflate 0.8.3
|
|
207
207
|
|
|
208
208
|
MIT License
|
|
209
209
|
|
package/dist/browser.js
CHANGED
|
@@ -2833,7 +2833,7 @@ function mutableThresholds(thresholds) {
|
|
|
2833
2833
|
);
|
|
2834
2834
|
}
|
|
2835
2835
|
|
|
2836
|
-
// ../../node_modules/.pnpm/fflate@0.8.
|
|
2836
|
+
// ../../node_modules/.pnpm/fflate@0.8.3/node_modules/fflate/esm/browser.js
|
|
2837
2837
|
var u8 = Uint8Array;
|
|
2838
2838
|
var u16 = Uint16Array;
|
|
2839
2839
|
var i32 = Int32Array;
|
|
@@ -3027,6 +3027,7 @@ var ec = [
|
|
|
3027
3027
|
"stream finished",
|
|
3028
3028
|
"no stream handler",
|
|
3029
3029
|
,
|
|
3030
|
+
// determined by compression function
|
|
3030
3031
|
"no callback",
|
|
3031
3032
|
"invalid UTF-8 data",
|
|
3032
3033
|
"extra field too long",
|
package/dist/build.js
CHANGED
|
@@ -7984,7 +7984,7 @@ function insertTileflowOverlays(input) {
|
|
|
7984
7984
|
for (const placement of tileflowOverlayPlacements) {
|
|
7985
7985
|
const overlayLayers = groups.get(placement);
|
|
7986
7986
|
if (!overlayLayers?.length) continue;
|
|
7987
|
-
const index =
|
|
7987
|
+
const index = tileflowOverlayInsertionIndex(layers, placement);
|
|
7988
7988
|
layers = [...layers.slice(0, index), ...overlayLayers, ...layers.slice(index)];
|
|
7989
7989
|
}
|
|
7990
7990
|
return { identities, layers };
|
|
@@ -8011,7 +8011,7 @@ function cloneJson18(value) {
|
|
|
8011
8011
|
Object.entries(value).map(([key, child]) => [key, cloneJson18(child)])
|
|
8012
8012
|
);
|
|
8013
8013
|
}
|
|
8014
|
-
function
|
|
8014
|
+
function tileflowOverlayInsertionIndex(layers, placement) {
|
|
8015
8015
|
const threshold = {
|
|
8016
8016
|
"above-water": tileflowLayerSlots.indexOf("building-areas"),
|
|
8017
8017
|
"below-roads": tileflowLayerSlots.indexOf("transport-areas"),
|
|
@@ -12483,6 +12483,55 @@ function isSafeArtifactName(value) {
|
|
|
12483
12483
|
});
|
|
12484
12484
|
}
|
|
12485
12485
|
|
|
12486
|
+
// src/cartography/overlay-placement-manifest.ts
|
|
12487
|
+
var tileflowOverlayPlacementManifestMetadataKey = "tileflow:overlay-placement-manifest";
|
|
12488
|
+
var tileflowOverlayPlacementManifestSchemaVersion = 1;
|
|
12489
|
+
function createTileflowOverlayPlacementManifest(layers) {
|
|
12490
|
+
const anchors = Object.fromEntries(
|
|
12491
|
+
tileflowOverlayPlacements.map((placement) => {
|
|
12492
|
+
const index = tileflowOverlayInsertionIndex(layers, placement);
|
|
12493
|
+
const id = index < layers.length ? layers[index]?.id : void 0;
|
|
12494
|
+
if (id !== void 0 && typeof id !== "string") {
|
|
12495
|
+
throw new Error(`Tileflow overlay placement ${placement} resolved an invalid layer ID.`);
|
|
12496
|
+
}
|
|
12497
|
+
return [placement, id ?? null];
|
|
12498
|
+
})
|
|
12499
|
+
);
|
|
12500
|
+
return {
|
|
12501
|
+
anchors,
|
|
12502
|
+
schemaVersion: tileflowOverlayPlacementManifestSchemaVersion
|
|
12503
|
+
};
|
|
12504
|
+
}
|
|
12505
|
+
function assertTileflowOverlayPlacementManifestLayers(manifest, layers) {
|
|
12506
|
+
if (manifest.schemaVersion !== tileflowOverlayPlacementManifestSchemaVersion) {
|
|
12507
|
+
throw new Error("Tileflow overlay placement manifest schema version is unsupported.");
|
|
12508
|
+
}
|
|
12509
|
+
const keys = Object.keys(manifest.anchors);
|
|
12510
|
+
if (keys.length !== tileflowOverlayPlacements.length || keys.some((key, index) => key !== tileflowOverlayPlacements[index])) {
|
|
12511
|
+
throw new Error("Tileflow overlay placement manifest keys are invalid.");
|
|
12512
|
+
}
|
|
12513
|
+
const layerIndexes = new Map(
|
|
12514
|
+
layers.flatMap(
|
|
12515
|
+
(layer, index) => typeof layer.id === "string" ? [[layer.id, index]] : []
|
|
12516
|
+
)
|
|
12517
|
+
);
|
|
12518
|
+
let previous = -1;
|
|
12519
|
+
for (const placement of tileflowOverlayPlacements) {
|
|
12520
|
+
const anchor = manifest.anchors[placement];
|
|
12521
|
+
const index = anchor === null ? layers.length : layerIndexes.get(anchor);
|
|
12522
|
+
if (index === void 0) {
|
|
12523
|
+
throw new Error(`Tileflow overlay placement manifest references missing layer: ${anchor}`);
|
|
12524
|
+
}
|
|
12525
|
+
if (index < previous) {
|
|
12526
|
+
throw new Error("Tileflow overlay placement manifest anchor order is invalid.");
|
|
12527
|
+
}
|
|
12528
|
+
previous = index;
|
|
12529
|
+
}
|
|
12530
|
+
if (manifest.anchors["above-labels"] !== null) {
|
|
12531
|
+
throw new Error("Tileflow above-labels placement must not have a physical anchor.");
|
|
12532
|
+
}
|
|
12533
|
+
}
|
|
12534
|
+
|
|
12486
12535
|
// src/cartography/physical-planner.ts
|
|
12487
12536
|
var roadHighZoom = 15;
|
|
12488
12537
|
var linePaintDefaults = {
|
|
@@ -13563,11 +13612,19 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
|
|
|
13563
13612
|
type: data.schema.fields.poiType
|
|
13564
13613
|
})
|
|
13565
13614
|
);
|
|
13615
|
+
const overlayPlacementManifest = runCompilationPhase(
|
|
13616
|
+
"finalization",
|
|
13617
|
+
() => createTileflowOverlayPlacementManifest(plannedLayers)
|
|
13618
|
+
);
|
|
13566
13619
|
const layers = runCompilationPhase("finalization", () => finalizeTileflowLayers(plannedLayers));
|
|
13567
13620
|
runCompilationPhase(
|
|
13568
13621
|
"finalization",
|
|
13569
13622
|
() => assertTileflowInteractionManifestLayers(interactionManifest, layers)
|
|
13570
13623
|
);
|
|
13624
|
+
runCompilationPhase(
|
|
13625
|
+
"finalization",
|
|
13626
|
+
() => assertTileflowOverlayPlacementManifestLayers(overlayPlacementManifest, layers)
|
|
13627
|
+
);
|
|
13571
13628
|
const glyphs = runCompilationPhase("assets", () => resolveGlyphs(config));
|
|
13572
13629
|
const sprite = options.preparedAssets?.icons?.sprite;
|
|
13573
13630
|
const primarySource = {
|
|
@@ -13632,6 +13689,7 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
|
|
|
13632
13689
|
...Object.keys(loweredOverlays.identities).length > 0 ? { "tileflow:overlays": loweredOverlays.identities } : {},
|
|
13633
13690
|
"tileflow:sourceRequirements": sourceRequirements,
|
|
13634
13691
|
...interactionManifest ? { [tileflowInteractionManifestMetadataKey]: interactionManifest } : {},
|
|
13692
|
+
[tileflowOverlayPlacementManifestMetadataKey]: overlayPlacementManifest,
|
|
13635
13693
|
"tileflow:modules": Object.entries(modules).filter(([, module]) => !isRecord9(module) || module.enabled !== false).map(([name]) => name).sort(),
|
|
13636
13694
|
...config.view ? { "tileflow:view": config.view } : {}
|
|
13637
13695
|
}
|
package/dist/index.js
CHANGED
|
@@ -9032,7 +9032,7 @@ function insertTileflowOverlays(input) {
|
|
|
9032
9032
|
for (const placement of tileflowOverlayPlacements) {
|
|
9033
9033
|
const overlayLayers = groups.get(placement);
|
|
9034
9034
|
if (!overlayLayers?.length) continue;
|
|
9035
|
-
const index =
|
|
9035
|
+
const index = tileflowOverlayInsertionIndex(layers, placement);
|
|
9036
9036
|
layers = [...layers.slice(0, index), ...overlayLayers, ...layers.slice(index)];
|
|
9037
9037
|
}
|
|
9038
9038
|
return { identities, layers };
|
|
@@ -9059,7 +9059,7 @@ function cloneJson18(value) {
|
|
|
9059
9059
|
Object.entries(value).map(([key, child]) => [key, cloneJson18(child)])
|
|
9060
9060
|
);
|
|
9061
9061
|
}
|
|
9062
|
-
function
|
|
9062
|
+
function tileflowOverlayInsertionIndex(layers, placement) {
|
|
9063
9063
|
const threshold = {
|
|
9064
9064
|
"above-water": tileflowLayerSlots.indexOf("building-areas"),
|
|
9065
9065
|
"below-roads": tileflowLayerSlots.indexOf("transport-areas"),
|
|
@@ -13586,6 +13586,55 @@ function isSafeArtifactName(value) {
|
|
|
13586
13586
|
});
|
|
13587
13587
|
}
|
|
13588
13588
|
|
|
13589
|
+
// src/cartography/overlay-placement-manifest.ts
|
|
13590
|
+
var tileflowOverlayPlacementManifestMetadataKey = "tileflow:overlay-placement-manifest";
|
|
13591
|
+
var tileflowOverlayPlacementManifestSchemaVersion = 1;
|
|
13592
|
+
function createTileflowOverlayPlacementManifest(layers) {
|
|
13593
|
+
const anchors = Object.fromEntries(
|
|
13594
|
+
tileflowOverlayPlacements.map((placement) => {
|
|
13595
|
+
const index = tileflowOverlayInsertionIndex(layers, placement);
|
|
13596
|
+
const id = index < layers.length ? layers[index]?.id : void 0;
|
|
13597
|
+
if (id !== void 0 && typeof id !== "string") {
|
|
13598
|
+
throw new Error(`Tileflow overlay placement ${placement} resolved an invalid layer ID.`);
|
|
13599
|
+
}
|
|
13600
|
+
return [placement, id ?? null];
|
|
13601
|
+
})
|
|
13602
|
+
);
|
|
13603
|
+
return {
|
|
13604
|
+
anchors,
|
|
13605
|
+
schemaVersion: tileflowOverlayPlacementManifestSchemaVersion
|
|
13606
|
+
};
|
|
13607
|
+
}
|
|
13608
|
+
function assertTileflowOverlayPlacementManifestLayers(manifest, layers) {
|
|
13609
|
+
if (manifest.schemaVersion !== tileflowOverlayPlacementManifestSchemaVersion) {
|
|
13610
|
+
throw new Error("Tileflow overlay placement manifest schema version is unsupported.");
|
|
13611
|
+
}
|
|
13612
|
+
const keys = Object.keys(manifest.anchors);
|
|
13613
|
+
if (keys.length !== tileflowOverlayPlacements.length || keys.some((key, index) => key !== tileflowOverlayPlacements[index])) {
|
|
13614
|
+
throw new Error("Tileflow overlay placement manifest keys are invalid.");
|
|
13615
|
+
}
|
|
13616
|
+
const layerIndexes = new Map(
|
|
13617
|
+
layers.flatMap(
|
|
13618
|
+
(layer, index) => typeof layer.id === "string" ? [[layer.id, index]] : []
|
|
13619
|
+
)
|
|
13620
|
+
);
|
|
13621
|
+
let previous = -1;
|
|
13622
|
+
for (const placement of tileflowOverlayPlacements) {
|
|
13623
|
+
const anchor = manifest.anchors[placement];
|
|
13624
|
+
const index = anchor === null ? layers.length : layerIndexes.get(anchor);
|
|
13625
|
+
if (index === void 0) {
|
|
13626
|
+
throw new Error(`Tileflow overlay placement manifest references missing layer: ${anchor}`);
|
|
13627
|
+
}
|
|
13628
|
+
if (index < previous) {
|
|
13629
|
+
throw new Error("Tileflow overlay placement manifest anchor order is invalid.");
|
|
13630
|
+
}
|
|
13631
|
+
previous = index;
|
|
13632
|
+
}
|
|
13633
|
+
if (manifest.anchors["above-labels"] !== null) {
|
|
13634
|
+
throw new Error("Tileflow above-labels placement must not have a physical anchor.");
|
|
13635
|
+
}
|
|
13636
|
+
}
|
|
13637
|
+
|
|
13589
13638
|
// src/cartography/physical-planner.ts
|
|
13590
13639
|
init_expression_operators();
|
|
13591
13640
|
var roadHighZoom = 15;
|
|
@@ -14686,11 +14735,19 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
|
|
|
14686
14735
|
type: data.schema.fields.poiType
|
|
14687
14736
|
})
|
|
14688
14737
|
);
|
|
14738
|
+
const overlayPlacementManifest = runCompilationPhase(
|
|
14739
|
+
"finalization",
|
|
14740
|
+
() => createTileflowOverlayPlacementManifest(plannedLayers)
|
|
14741
|
+
);
|
|
14689
14742
|
const layers = runCompilationPhase("finalization", () => finalizeTileflowLayers(plannedLayers));
|
|
14690
14743
|
runCompilationPhase(
|
|
14691
14744
|
"finalization",
|
|
14692
14745
|
() => assertTileflowInteractionManifestLayers(interactionManifest, layers)
|
|
14693
14746
|
);
|
|
14747
|
+
runCompilationPhase(
|
|
14748
|
+
"finalization",
|
|
14749
|
+
() => assertTileflowOverlayPlacementManifestLayers(overlayPlacementManifest, layers)
|
|
14750
|
+
);
|
|
14694
14751
|
const glyphs = runCompilationPhase("assets", () => resolveGlyphs(config));
|
|
14695
14752
|
const sprite = options.preparedAssets?.icons?.sprite;
|
|
14696
14753
|
const primarySource = {
|
|
@@ -14755,6 +14812,7 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
|
|
|
14755
14812
|
...Object.keys(loweredOverlays.identities).length > 0 ? { "tileflow:overlays": loweredOverlays.identities } : {},
|
|
14756
14813
|
"tileflow:sourceRequirements": sourceRequirements,
|
|
14757
14814
|
...interactionManifest ? { [tileflowInteractionManifestMetadataKey]: interactionManifest } : {},
|
|
14815
|
+
[tileflowOverlayPlacementManifestMetadataKey]: overlayPlacementManifest,
|
|
14758
14816
|
"tileflow:modules": Object.entries(modules).filter(([, module]) => !isRecord9(module) || module.enabled !== false).map(([name]) => name).sort(),
|
|
14759
14817
|
...config.view ? { "tileflow:view": config.view } : {}
|
|
14760
14818
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tileflow/core",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.24",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Typed Tileflow config and MapLibre style compiler.",
|
|
6
6
|
"type": "module",
|
|
@@ -26,10 +26,7 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist",
|
|
28
28
|
"LICENSE",
|
|
29
|
-
"
|
|
30
|
-
"THIRD_PARTY_NOTICES.md",
|
|
31
|
-
"GENERATED_OUTPUT_LICENSE.md",
|
|
32
|
-
"TRADEMARKS.md"
|
|
29
|
+
"THIRD_PARTY_NOTICES.md"
|
|
33
30
|
],
|
|
34
31
|
"exports": {
|
|
35
32
|
".": {
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Tileflow generated-output grant
|
|
2
|
-
|
|
3
|
-
In addition to the rights granted by the Apache License, Version 2.0, Tileflow.dev contributors
|
|
4
|
-
grant recipients a perpetual, worldwide, non-exclusive, no-charge, royalty-free right to use,
|
|
5
|
-
reproduce, modify, display, perform, distribute, sublicense, and commercialize the Tileflow-owned
|
|
6
|
-
parts of output generated by this SDK.
|
|
7
|
-
|
|
8
|
-
Covered output includes compiled map styles, manifests, receipts, sprites, glyph artifacts, static
|
|
9
|
-
render descriptions, and other build artifacts produced from Tileflow maps or application maps.
|
|
10
|
-
Original Tileflow map definitions, icons, and patterns distributed by `@tileflow/maps` may likewise
|
|
11
|
-
be used, modified, embedded, deployed, and redistributed as part of personal or commercial maps and
|
|
12
|
-
applications.
|
|
13
|
-
|
|
14
|
-
This grant does not relicense third-party software, fonts, icons, map data, datasets, imagery, or
|
|
15
|
-
other input material. Their licenses, attribution requirements, notices, and use restrictions
|
|
16
|
-
continue to apply to the relevant source and generated output. You are responsible for having the
|
|
17
|
-
rights necessary to process and distribute your own inputs.
|
|
18
|
-
|
|
19
|
-
This grant does not provide access to Tileflow hosted services or grant rights in Tileflow names,
|
|
20
|
-
logos, or marks. The SDK and generated output are provided without warranties or conditions beyond
|
|
21
|
-
those required by applicable law.
|
package/NOTICE
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
Tileflow SDK
|
|
2
|
-
Copyright 2026 Tileflow.dev contributors
|
|
3
|
-
|
|
4
|
-
This product includes software and original map artwork developed by Tileflow.dev contributors.
|
|
5
|
-
|
|
6
|
-
Third-party materials distributed with a package remain subject to their own license and notice
|
|
7
|
-
files. See THIRD_PARTY_NOTICES.md and asset-adjacent license files where present.
|
|
8
|
-
|
|
9
|
-
The Tileflow names and marks are not licensed under the Apache License 2.0. See TRADEMARKS.md.
|
package/TRADEMARKS.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
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.
|