@tileflow/dev 0.1.0-alpha.29 → 0.1.0-alpha.30
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 +4 -2
- package/THIRD_PARTY_NOTICES.md +10 -10
- package/dist/artifacts.js +3 -3
- package/dist/{chunk-EJPVUSX4.js → chunk-A2VTI43Y.js} +13 -14
- package/dist/{chunk-LXSFLPIU.js → chunk-L56FLV4R.js} +35 -11
- package/dist/icons.js +1 -1
- package/dist/inspect.js +796 -9
- package/dist/{preview-assets-UTUP3OML.js → preview-assets-MVUJJ5XR.js} +0 -6
- package/dist/preview.js +4276 -8
- package/dist/server.d.ts +3 -3
- package/dist/server.js +2064 -18
- package/dist/tilesets.d.ts +89 -1
- package/dist/validation.d.ts +1 -1
- package/docs/artifact-lifecycle.md +2 -3
- package/docs/bounded-vector-feature-inspection.md +4 -5
- package/docs/native-artifacts.md +18 -8
- package/docs/native-icons.md +1 -1
- package/package.json +6 -13
- package/dist/chunk-73YPFDPC.js +0 -805
- package/dist/chunk-CJGM6HTT.js +0 -4286
- package/dist/chunk-QYM2CUZB.js +0 -2079
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -220
- package/dist/tilesets-C0tGeenP.d.ts +0 -94
package/dist/tilesets.d.ts
CHANGED
|
@@ -1 +1,89 @@
|
|
|
1
|
-
|
|
1
|
+
declare const inspectionLimits: Readonly<{
|
|
2
|
+
maxBytes: 24000000;
|
|
3
|
+
maxDistinctValuesPerField: 256;
|
|
4
|
+
maxFeatures: 20000;
|
|
5
|
+
maxIncludedValueFields: 32;
|
|
6
|
+
maxTiles: 8;
|
|
7
|
+
maxValueLength: 256;
|
|
8
|
+
maxValuesPerField: 16;
|
|
9
|
+
}>;
|
|
10
|
+
type TileCoordinate = Readonly<{
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
z: number;
|
|
14
|
+
}>;
|
|
15
|
+
type FieldType = 'Boolean' | 'Number' | 'String';
|
|
16
|
+
type FieldValue = boolean | number | string;
|
|
17
|
+
type TileflowTilesetInspectionWarning = Readonly<{
|
|
18
|
+
code: string;
|
|
19
|
+
message: string;
|
|
20
|
+
path: string;
|
|
21
|
+
}>;
|
|
22
|
+
type TileflowTilesetInspectionV1 = Readonly<{
|
|
23
|
+
schemaVersion: 1;
|
|
24
|
+
contract: Readonly<{
|
|
25
|
+
authority: 'pmtiles-header-and-tilejson-v1';
|
|
26
|
+
attribution?: string;
|
|
27
|
+
bounds: readonly [number, number, number, number];
|
|
28
|
+
center: readonly [number, number, number];
|
|
29
|
+
counts: Readonly<{
|
|
30
|
+
addressedTiles: number;
|
|
31
|
+
declaredTileContents: number | null;
|
|
32
|
+
tileEntries: number;
|
|
33
|
+
}>;
|
|
34
|
+
maxzoom: number;
|
|
35
|
+
minzoom: number;
|
|
36
|
+
sourceLayersDeclared: boolean;
|
|
37
|
+
sourceLayers: readonly Readonly<{
|
|
38
|
+
fieldsDeclared: boolean;
|
|
39
|
+
fields: readonly Readonly<{
|
|
40
|
+
name: string;
|
|
41
|
+
type?: FieldType;
|
|
42
|
+
}>[];
|
|
43
|
+
id: string;
|
|
44
|
+
maxzoom?: number;
|
|
45
|
+
minzoom?: number;
|
|
46
|
+
}>[];
|
|
47
|
+
tileType: 'avif' | 'jpeg' | 'mlt' | 'mvt' | 'png' | 'webp';
|
|
48
|
+
}>;
|
|
49
|
+
observation?: Readonly<{
|
|
50
|
+
authority: 'bounded-mvt-sample-v1';
|
|
51
|
+
featuresRead: number;
|
|
52
|
+
includedValueFields: readonly string[];
|
|
53
|
+
limits: typeof inspectionLimits;
|
|
54
|
+
sourceLayers: readonly Readonly<{
|
|
55
|
+
featuresRead: number;
|
|
56
|
+
fields: readonly Readonly<{
|
|
57
|
+
distinctValuesObserved: number;
|
|
58
|
+
distinctValuesTruncated: boolean;
|
|
59
|
+
featuresMissing: number;
|
|
60
|
+
featuresPresent: number;
|
|
61
|
+
name: string;
|
|
62
|
+
numericRange?: Readonly<{
|
|
63
|
+
max: number;
|
|
64
|
+
min: number;
|
|
65
|
+
}>;
|
|
66
|
+
observedValues?: readonly Readonly<{
|
|
67
|
+
count: number;
|
|
68
|
+
value: FieldValue;
|
|
69
|
+
}>[];
|
|
70
|
+
observedValuesTruncated?: boolean;
|
|
71
|
+
types: readonly FieldType[];
|
|
72
|
+
}>[];
|
|
73
|
+
geometryTypes: readonly string[];
|
|
74
|
+
id: string;
|
|
75
|
+
}>[];
|
|
76
|
+
tiles: readonly TileCoordinate[];
|
|
77
|
+
tilesRead: number;
|
|
78
|
+
truncated: boolean;
|
|
79
|
+
}>;
|
|
80
|
+
warnings: readonly TileflowTilesetInspectionWarning[];
|
|
81
|
+
}>;
|
|
82
|
+
declare function inspectTileflowPmtiles(archivePath: string, options?: {
|
|
83
|
+
includeValues?: readonly string[];
|
|
84
|
+
maximumDirectoryDepth?: number;
|
|
85
|
+
sample?: boolean;
|
|
86
|
+
signal?: AbortSignal;
|
|
87
|
+
}): Promise<TileflowTilesetInspectionV1>;
|
|
88
|
+
|
|
89
|
+
export { type TileflowTilesetInspectionV1, type TileflowTilesetInspectionWarning, inspectTileflowPmtiles };
|
package/dist/validation.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ type TileflowDiagnosticSeverity = 'error' | 'info' | 'warning';
|
|
|
22
22
|
type TileflowStructuredDiagnostic = {
|
|
23
23
|
phase: string;
|
|
24
24
|
code: string;
|
|
25
|
-
/** Semantic compiler domain
|
|
25
|
+
/** Semantic compiler domain; a Core diagnostic's owning-module `owner` is reported here. */
|
|
26
26
|
domain?: string;
|
|
27
27
|
path: string;
|
|
28
28
|
/** Semantic compiler target, when the diagnostic applies to one render contribution. */
|
|
@@ -26,8 +26,7 @@ The integration surfaces are deliberately split: use `@tileflow/dev/artifacts` f
|
|
|
26
26
|
preparation and production outputs, `@tileflow/dev/server` for HTTP development handling,
|
|
27
27
|
`@tileflow/dev/icons` for icon compilation, `@tileflow/dev/inspect` for safe resolved-config and
|
|
28
28
|
bounded feature inspection, `@tileflow/dev/validation` for structured diagnostics, and
|
|
29
|
-
`@tileflow/dev/preview` only for the local preview contract. The root entry
|
|
30
|
-
re-exports.
|
|
29
|
+
`@tileflow/dev/preview` only for the local preview contract. The package has no root entry point.
|
|
31
30
|
|
|
32
31
|
Artifact construction is an explicit `source map → resolved map → prepared map → ArtifactPlan`
|
|
33
32
|
pipeline. Map inheritance resolves before its ordered local/package icon and font directories are
|
|
@@ -122,7 +121,7 @@ release. `close()` waits for outstanding acquisitions.
|
|
|
122
121
|
The bounded watcher follows the config, transitive local TypeScript/JavaScript/JSON imports, and
|
|
123
122
|
effective local icon/font directory inputs. Generations are monotonic, overlapping refreshes are latest-wins, invalid
|
|
124
123
|
edits retain the last good snapshot, and caller-supplied output directories can be ignored to avoid
|
|
125
|
-
feedback loops. `tileflow preview
|
|
124
|
+
feedback loops. `tileflow preview`, `capture --watch`, and
|
|
126
125
|
framework adapters use this shared status
|
|
127
126
|
vocabulary. The built-in preview reloads after its live event stream reconnects following a server
|
|
128
127
|
restart, even when the replacement process begins again at generation 1.
|
|
@@ -39,11 +39,10 @@ const result = await compileTileflowIconPackages(internalCatalog, {
|
|
|
39
39
|
});
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
Streets declares `[streetsIcons]` and keeps light/dark image-token targets in that one closure
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
`[
|
|
46
|
-
`[blueprintIcons]`, respectively. No official root composes another map's assets even though all
|
|
42
|
+
Streets declares `[streetsIcons]` and keeps light/dark image-token targets in that one closure.
|
|
43
|
+
Baedeker, Cívica, Ferraris, Härad, Siegfried, Soundings, and Blueprint declare only
|
|
44
|
+
`[baedekerIcons]`, `[civicaIcons]`, `[ferrarisIcons]`, `[haradIcons]`, `[siegfriedIcons]`,
|
|
45
|
+
`[soundingsIcons]`, and `[blueprintIcons]`, respectively. No official root composes another map's assets even though all
|
|
47
46
|
use the semantic compiler ABI. Baedeker's directory contains eight original travel-atlas patterns;
|
|
48
47
|
its browser-derived Mapterhorn contours use runtime terrain tiles and are not part of the icon
|
|
49
48
|
package. Härad's directory contains nine original Tileflow patterns inspired by Lantmäteriet's CC0
|
package/docs/native-artifacts.md
CHANGED
|
@@ -82,6 +82,14 @@ match its layer or an anchor naming a missing layer, fails with `NATIVE_UNSUPPOR
|
|
|
82
82
|
style's `/metadata` pointer rather than being guessed. Local builds, watched sessions and native
|
|
83
83
|
preview share this step with Hosted publication.
|
|
84
84
|
|
|
85
|
+
MapLibre Native has no symbol overlap modes and reads only `icon-allow-overlap` and
|
|
86
|
+
`text-allow-overlap`. Lowering replaces each constant `icon-overlap` or `text-overlap` value with
|
|
87
|
+
the matching `*-allow-overlap`: `false` for `never` and `true` for `always` and `cooperative`. A
|
|
88
|
+
cooperative symbol therefore no longer gives way to symbols placed with `never` and can cover labels
|
|
89
|
+
it avoids on the web. The layer keeps its ID and position, so the build record lists it under
|
|
90
|
+
`symbolOverlap` rather than as a layer span. An overlap mode given as an expression fails with its
|
|
91
|
+
property pointer.
|
|
92
|
+
|
|
85
93
|
Work is bounded per property by depth 16, 512 decision visits, 64 decision paths, 16 distinct
|
|
86
94
|
outcomes and 64 dash elements; the product is limited to 32 physical layers and 32 zoom intervals
|
|
87
95
|
per logical layer. Raw compiler input must fit 160,000 JSON nodes before any lowering. Its expanded
|
|
@@ -91,10 +99,10 @@ and 8 MiB. No caller option raises either budget and no rejected input is retrie
|
|
|
91
99
|
allowance. A failure occurs before output writes and leaves the previous valid generation intact.
|
|
92
100
|
|
|
93
101
|
This is one shared authored map, not a second mobile catalog: the native-v1 representation adapts
|
|
94
|
-
only finite `line-cap`/`line-dasharray` decisions, together with
|
|
95
|
-
policy. Unsupported advanced expressions or other properties fail
|
|
96
|
-
and JSON Pointer; their web behavior is unchanged. The raw and
|
|
97
|
-
semantic checks and bounded traversal. See the
|
|
102
|
+
only finite `line-cap`/`line-dasharray` decisions and constant symbol overlap modes, together with
|
|
103
|
+
its explicit fixed-projection policy. Unsupported advanced expressions or other properties fail
|
|
104
|
+
with their native diagnostic and JSON Pointer; their web behavior is unchanged. The raw and
|
|
105
|
+
prepared validators share their semantic checks and bounded traversal. See the
|
|
98
106
|
[Core budget contract](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/native-artifact-profile.md#input-and-prepared-style-budgets)
|
|
99
107
|
for the measured Streets sizes and the approximately 5.2% output margin.
|
|
100
108
|
|
|
@@ -142,10 +150,12 @@ engines, `validation: 'static-artifacts'` and the canonical `build-manifest.json
|
|
|
142
150
|
schema version is 2 and its `preparationVersion` is `native-lowering-v1`.
|
|
143
151
|
|
|
144
152
|
The `transformations` array is sorted uniquely by map/theme. Each entry records input and lowered
|
|
145
|
-
style SHA-256 values, input/output layer counts
|
|
146
|
-
output start/count and affected properties of each
|
|
147
|
-
|
|
148
|
-
|
|
153
|
+
style SHA-256 values, input/output layer counts and projection normalization. `layers` lists the
|
|
154
|
+
input ordinal, output start/count and affected properties of each partitioned line layer;
|
|
155
|
+
`symbolOverlap` lists the input ordinal and replaced properties of each symbol layer whose overlap
|
|
156
|
+
modes became `*-allow-overlap` values. Ordinals refer to the complete style layer arrays, including
|
|
157
|
+
unchanged layers. These spans make the deterministic
|
|
158
|
+
physical IDs traceable without duplicating layer definitions in the receipt. The input hash binds shared
|
|
149
159
|
compiler output; the lowered hash includes the rebound layer references and precedes native font
|
|
150
160
|
preparation and generation URL retargeting.
|
|
151
161
|
The build-manifest hash separately binds the final prepared styles and assets. All styles receive
|
package/docs/native-icons.md
CHANGED
|
@@ -46,7 +46,7 @@ It therefore requires a homogeneous inventory. To use a mixed package, select on
|
|
|
46
46
|
an explicit `expr.match`/`expr.case` expression whose possible outputs and fallback are homogeneous.
|
|
47
47
|
Sampling the current feature data does not prove this condition.
|
|
48
48
|
|
|
49
|
-
`tileflow validate`, `tileflow
|
|
49
|
+
`tileflow validate`, `tileflow preview`, `tileflow build`, framework preparation and Capture use the
|
|
50
50
|
same check. `TF_ICON_REPRESENTATION_MIXED` identifies the layer and image-selection path. Replace
|
|
51
51
|
the conflicting override, align all selectable representations, or bound the selection explicitly.
|
|
52
52
|
Compiled SDF admission rejects legacy token templates and function objects with
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tileflow/dev",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.30",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Node development utilities for Tileflow configs and builds.",
|
|
6
6
|
"type": "module",
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=22"
|
|
26
26
|
},
|
|
27
|
-
"main": "./dist/index.js",
|
|
28
|
-
"types": "./dist/index.d.ts",
|
|
29
27
|
"files": [
|
|
30
28
|
"dist",
|
|
31
29
|
"docs",
|
|
@@ -33,11 +31,6 @@
|
|
|
33
31
|
"LICENSE"
|
|
34
32
|
],
|
|
35
33
|
"exports": {
|
|
36
|
-
".": {
|
|
37
|
-
"types": "./dist/index.d.ts",
|
|
38
|
-
"import": "./dist/index.js",
|
|
39
|
-
"default": "./dist/index.js"
|
|
40
|
-
},
|
|
41
34
|
"./artifacts": {
|
|
42
35
|
"types": "./dist/artifacts.d.ts",
|
|
43
36
|
"import": "./dist/artifacts.js",
|
|
@@ -90,25 +83,25 @@
|
|
|
90
83
|
"dependencies": {
|
|
91
84
|
"@mapbox/vector-tile": "3.0.0",
|
|
92
85
|
"@maplibre/maplibre-gl-style-spec": "24.8.5",
|
|
93
|
-
"@tileflow/core": ">=0.1.0-alpha.
|
|
86
|
+
"@tileflow/core": ">=0.1.0-alpha.32 <0.1.0-beta.0",
|
|
94
87
|
"chokidar": "4.0.3",
|
|
95
88
|
"fflate": "0.8.3",
|
|
96
89
|
"fontkit": "2.0.4",
|
|
97
90
|
"jiti": "^2.7.0",
|
|
98
|
-
"maplibre-gl": "6.
|
|
91
|
+
"maplibre-gl": "6.13.0",
|
|
99
92
|
"pbf": "5.1.2",
|
|
100
93
|
"pmtiles": "4.5.0",
|
|
101
94
|
"saxes": "6.0.0",
|
|
102
95
|
"three": "0.185.1"
|
|
103
96
|
},
|
|
104
97
|
"devDependencies": {
|
|
105
|
-
"@tileflow/maps": "0.1.0-alpha.
|
|
98
|
+
"@tileflow/maps": "0.1.0-alpha.8"
|
|
106
99
|
},
|
|
107
100
|
"optionalDependencies": {
|
|
108
|
-
"sharp": "0.35.
|
|
101
|
+
"sharp": "0.35.5"
|
|
109
102
|
},
|
|
110
103
|
"scripts": {
|
|
111
|
-
"build": "tsup src/
|
|
104
|
+
"build": "tsup src/artifacts.ts src/config.ts src/fonts.ts src/icons.ts src/inspect.ts src/preview.ts src/server.ts src/tilesets.ts src/validation.ts --format esm --dts --clean --platform node --external sharp",
|
|
112
105
|
"test": "tsx --test test/*.test.ts",
|
|
113
106
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
114
107
|
"lint": "tsc -p tsconfig.json --noEmit",
|