@tileflow/core 0.1.0-alpha.2 → 0.1.0-alpha.20

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/dist/index.d.ts CHANGED
@@ -1,172 +1,300 @@
1
- type TileflowDensity = 'clean' | 'balanced' | 'dense';
2
- type TileflowRoads = 'hidden' | 'soft' | 'standard' | 'detailed';
3
- type TileflowLabels = 'none' | 'essential' | 'balanced' | 'full';
4
- type TileflowPoi = 'none' | 'minimal' | 'balanced' | 'full';
5
- type TileflowTheme = 'standard' | 'light' | 'dark' | 'minimal' | 'osm-bright-2';
6
- type TileflowBuildings = 'hidden' | 'flat' | '3d';
7
- type TileflowTerrainMode = 'none' | 'hillshade' | '3d';
8
- type TileflowTerrainEncoding = 'mapbox' | 'terrarium';
9
- type TileflowThemeMode = 'light' | 'dark';
10
- type TileflowColors = {
11
- canvas: string;
12
- land: string;
13
- water: string;
14
- nature: string;
15
- road: string;
16
- text: string;
17
- accent: string;
18
- };
19
- type LegacyTileflowColorAliases = {
20
- background?: string;
21
- park?: string;
22
- building?: string;
23
- roadCasing?: string;
24
- };
25
- type TileflowColorConfig = Partial<TileflowColors> & LegacyTileflowColorAliases;
26
- type TileflowFontWeight = 'regular' | 'medium' | 'semibold' | 'bold';
27
- type TileflowTypography = {
28
- font?: string;
29
- weight?: TileflowFontWeight;
30
- };
31
- type TileflowThemeConfig = {
32
- mode?: TileflowThemeMode;
33
- colors?: TileflowColorConfig;
34
- typography?: TileflowTypography;
35
- };
36
- type TileflowSourceLayers = {
37
- landuse?: string;
38
- park?: string;
39
- water?: string;
40
- road?: string;
41
- building?: string;
42
- boundary?: string;
43
- place?: string;
44
- poi?: string;
45
- };
46
- type TileflowTiles = {
47
- sourceId?: string;
48
- tileset?: string;
49
- url?: string;
50
- attribution?: string;
51
- sourceLayers?: TileflowSourceLayers;
52
- };
53
- type TileflowTerrainConfig = {
54
- attribution?: string;
55
- encoding?: TileflowTerrainEncoding;
56
- exaggeration?: number;
57
- mode?: TileflowTerrainMode;
58
- sourceId?: string;
59
- tileset?: string;
60
- url?: string;
61
- };
62
- type TileflowTerrain = TileflowTerrainMode | TileflowTerrainConfig;
63
- type TileflowViewConfig = {
64
- bearing?: number;
65
- center?: readonly [number, number];
66
- zoom?: number;
67
- };
68
- type TileflowOsmBasemapConfig = {
69
- type: 'osm';
70
- attribution?: string;
71
- glyphs?: string;
72
- sourceId?: string;
73
- sourceLayers?: TileflowSourceLayers;
74
- sprite?: string;
75
- tileset?: string;
76
- url?: string;
77
- };
78
- type TileflowBasemapConfig = TileflowOsmBasemapConfig;
79
- type TileflowOsmBasemapOptions = Omit<TileflowOsmBasemapConfig, 'type'>;
80
- type TileflowRoadsModulePreset = 'modern' | 'minimal';
81
- type TileflowRoadsModuleConfig = {
82
- type: 'roads';
83
- density?: TileflowDensity;
84
- preset?: TileflowRoadsModulePreset;
85
- };
86
- type TileflowRoadsModuleOptions = Omit<TileflowRoadsModuleConfig, 'type'>;
87
- type TileflowModuleConfig = TileflowRoadsModuleConfig;
88
- type TileflowConfig = {
89
- basemap?: TileflowBasemapConfig;
90
- name?: string;
91
- tileset?: string;
92
- theme?: TileflowTheme | string | TileflowThemeConfig;
93
- modules?: readonly TileflowModuleConfig[];
94
- colors?: TileflowColorConfig;
95
- typography?: TileflowTypography;
96
- density?: TileflowDensity;
97
- roads?: TileflowRoads;
98
- labels?: TileflowLabels;
99
- poi?: TileflowPoi;
100
- buildings?: TileflowBuildings;
101
- terrain?: TileflowTerrain;
102
- glyphs?: string;
103
- sprite?: string;
104
- tiles?: TileflowTiles;
105
- view?: TileflowViewConfig;
106
- /**
107
- * Domains allowed to load this map in production (e.g. "example.com" or
108
- * "*.example.com"). When set, tile and session requests from other
109
- * websites are rejected. Local development (localhost, private network
110
- * addresses) is always allowed. Leave unset to allow any domain.
111
- */
112
- allowedOrigins?: string[];
113
- };
114
- type TileflowMapConfig = TileflowConfig;
115
- type TileflowTilesetConfig = {
116
- id?: string;
117
- name?: string;
118
- attribution?: string;
119
- sourceLayers?: TileflowSourceLayers;
120
- };
121
- type TileflowProjectConfig = {
122
- themes?: Record<string, TileflowThemeConfig>;
123
- tilesets?: Record<string, TileflowTilesetConfig>;
124
- maps: Record<string, TileflowMapConfig>;
1
+ import { b as TileflowBaseColors, c as TileflowConfig, d as TileflowProjectConfig, V as ValidationResult, e as TileflowRoadsModuleOptions, f as TileflowRoadsModuleConfig, g as TileflowLabelsModuleOptions, h as TileflowLabelsModuleConfig, i as TileflowPoiModuleOptions, j as TileflowPoiModuleConfig } from './runtime-DroKDIuB.js';
2
+ export { M as MapLibreSprite, k as MapLibreStyle, N as NormalizedTileflowCaptureScene, O as OpenMapTilesFieldBindings, l as OpenMapTilesLayerBindings, m as OpenMapTilesSchema, n as OpenMapTilesSchemaOptions, R as ResolvedTileflowData, o as ResolvedTileflowTypography, p as TileflowAerowaysModuleConfig, q as TileflowAerowaysModuleOptions, r as TileflowAlignment, T as TileflowAnalytics, s as TileflowAreaStyle, t as TileflowBackgroundPaint, u as TileflowBackgroundStyle, v as TileflowBoundariesModuleConfig, w as TileflowBoundariesModuleOptions, x as TileflowBoundaryColorConfig, y as TileflowBuildingColorConfig, z as TileflowBuildingMode, A as TileflowBuildingsModuleConfig, B as TileflowBuildingsModuleOptions, C as TileflowCaptureApplicationTarget, D as TileflowCaptureBoundsCamera, E as TileflowCaptureCamera, F as TileflowCaptureCenterCamera, G as TileflowCaptureMapTarget, H as TileflowCaptureScene, I as TileflowCaptureTarget, J as TileflowCaptureViewport, K as TileflowCirclePaint, L as TileflowCircleStyle, P as TileflowColor, Q as TileflowColorConfig, S as TileflowColors, U as TileflowDataConfig, W as TileflowDataIdentity, X as TileflowExpression, Y as TileflowExtrusionPaint, Z as TileflowExtrusionStyle, _ as TileflowFillPaint, $ as TileflowFillStyle, a0 as TileflowFilterExpression, a1 as TileflowFontWeight, a2 as TileflowHostedNotoSansWeight, a3 as TileflowHydroColorConfig, a4 as TileflowIconAnchor, a5 as TileflowIconLayout, a6 as TileflowIconPaint, a7 as TileflowIconSet, a8 as TileflowIconSetConfig, a9 as TileflowIconStyle, aa as TileflowLabelColorConfig, ab as TileflowLabelDetail, ac as TileflowLabelLanguage, ad as TileflowLabelStyles, ae as TileflowLandModuleConfig, af as TileflowLandModuleOptions, ag as TileflowLandcoverClass, ah as TileflowLandcoverColorConfig, ai as TileflowLanduseClass, aj as TileflowLanduseColorConfig, ak as TileflowLayerPlacement, al as TileflowLayerRange, am as TileflowLineCap, an as TileflowLineHatchStyle, ao as TileflowLineJoin, ap as TileflowLineLayout, aq as TileflowLinePaint, ar as TileflowLineStackStyle, as as TileflowLineStyle, at as TileflowManifest, au as TileflowManifestLoadOptions, av as TileflowMapConfig, aw as TileflowMapMarker, ax as TileflowMapMode, ay as TileflowMapModeOptions, az as TileflowMountainBikeScale, aA as TileflowPlaceLabelClass, aB as TileflowPoi, aC as TileflowPoiCategory, aD as TileflowPoiCategoryStyle, aE as TileflowPoiClassMapping, aF as TileflowPoiColorConfig, aG as TileflowPoiColorMode, aH as TileflowPoiDensity, aI as TileflowPoiIcons, aJ as TileflowPoiLabels, aK as TileflowProjectIconSets, aL as TileflowProjectThemes, aM as TileflowRawOverride, aN as TileflowRoadAreaStyle, aO as TileflowRoadClass, aP as TileflowRoadClassStyle, aQ as TileflowRoadColorConfig, aR as TileflowRoadDetail, aS as TileflowRoadExtras, aT as TileflowRoadHierarchy, aU as TileflowRoadLabelDetail, aV as TileflowRoadLayerStyle, aW as TileflowRoadModifier, aX as TileflowRoadOutline, aY as TileflowRoadRestriction, aZ as TileflowRoadServiceType, a_ as TileflowRoadShieldDetail, a$ as TileflowRoadShieldStyles, b0 as TileflowRoadStructure, b1 as TileflowRoadTreatmentLayerStyle, b2 as TileflowRoadTreatmentLineStyle, b3 as TileflowRoadTreatmentStyle, b4 as TileflowRoadWeight, b5 as TileflowRuntimeManifest, b6 as TileflowRuntimeManifestMap, b7 as TileflowRuntimeManifestMapEntry, b8 as TileflowRuntimeStyle, b9 as TileflowRuntimeStyleOptions, a as TileflowSessionController, ba as TileflowSessionGrantResponse, bb as TileflowStreetsBasemapConfig, bc as TileflowStreetsCompileOptions, bd as TileflowStreetsMapConfig, be as TileflowStreetsModules, bf as TileflowStreetsOptions, bg as TileflowStreetsVariant, bh as TileflowStyleOptions, bi as TileflowStyleValue, bj as TileflowSymbolPlacement, bk as TileflowSymbolPlacementStyle, bl as TileflowSymbolStyle, bm as TileflowSymbolZOrder, bn as TileflowTerrain, bo as TileflowTerrainConfig, bp as TileflowTerrainEncoding, bq as TileflowTerrainMode, br as TileflowTextAnchor, bs as TileflowTextJustify, bt as TileflowTextLayout, bu as TileflowTextPaint, bv as TileflowTextStyle, bw as TileflowTheme, bx as TileflowThemeConfig, by as TileflowThemeMode, bz as TileflowThemeModulesConfig, bA as TileflowThemeName, bB as TileflowTransitModuleConfig, bC as TileflowTransitModuleOptions, bD as TileflowTransitRailStyle, bE as TileflowTypography, bF as TileflowTypographyDomain, bG as TileflowTypographyStyle, bH as TileflowViewConfig, bI as TileflowWaterLabelClass, bJ as TileflowWaterModuleConfig, bK as TileflowWaterModuleOptions, bL as TileflowWaterwayClass, bM as TileflowWorldData, bN as TileflowZoomInterpolation, bO as TileflowZoomValue, bP as ValidationMessage, bQ as VectorTilesData, bR as addLayer, bS as aeroways, bT as boundaries, bU as buildings, bV as createManifest, bW as createStreetsStyle, bX as createStyle, bY as createStyleFromProject, bZ as createTileflowSessionController, b_ as createTileflowSessionId, b$ as defaultTileflowManifestUrl, c0 as defaultTileflowStyleBaseUrl, c1 as expression, c2 as filter, c3 as getDefaultTileflowStyleBaseUrl, c4 as getTileflowAnalyticsApiUrl, c5 as inferTileflowAnalyticsFromStyleUrl, c6 as isCanonicalOpenMapTilesSchema, c7 as isTileflowLocalDevHost, c8 as land, c9 as loadTileflowManifest, ca as mergeTileflowAnalytics, cb as moveLayer, cc as normalizeTileflowCaptureId, cd as normalizeTileflowCaptureScene, ce as normalizeTileflowStaticImageSize, cf as normalizeTileflowUrl, cg as openMapTiles, ch as openMapTilesContractVersion, ci as patchLayer, cj as removeLayer, ck as resolveTileflowAnalyticsRequestUrl, cl as resolveTileflowData, cm as resolveTileflowManifestMap, cn as resolveTileflowMapMode, co as resolveTileflowRuntimeStyle, cp as resolveTileflowStaticImageUrl, cq as resolveTileflowStyleUrl, cr as shouldLoadTileflowManifest, cs as startTileflowSession, ct as streets, cu as tileflowCaptureApplicationTargetSchema, cv as tileflowCaptureBoundsCameraSchema, cw as tileflowCaptureCameraSchema, cx as tileflowCaptureCenterCameraSchema, cy as tileflowCaptureIdSchema, cz as tileflowCaptureMapTargetSchema, cA as tileflowCaptureSceneLimits, cB as tileflowCaptureSceneNameSchema, cC as tileflowCaptureSceneSchema, cD as tileflowCaptureSceneSchemaVersion, cE as tileflowCaptureTargetSchema, cF as tileflowCaptureViewportSchema, cG as tileflowFontStack, cH as tileflowHostedNotoSansWeights, cI as tileflowPrimarySourceId, cJ as tileflowStreetsBasemapVersion, cK as tileflowStreetsPoiIconMapping, cL as tileflowWorld, cM as tileflowWorldRevision, cN as transit, cO as vectorTiles, cP as water, cQ as zoom } from './runtime-DroKDIuB.js';
3
+ import { z } from 'zod';
4
+
5
+ declare function getDefaultColors(): TileflowBaseColors;
6
+
7
+ declare const tileflowThemeSchema: z.ZodObject<{
8
+ colors: z.ZodOptional<z.ZodObject<{
9
+ background: z.ZodOptional<z.ZodString>;
10
+ boundary: z.ZodOptional<z.ZodString>;
11
+ building: z.ZodOptional<z.ZodString>;
12
+ land: z.ZodOptional<z.ZodString>;
13
+ park: z.ZodOptional<z.ZodString>;
14
+ road: z.ZodOptional<z.ZodString>;
15
+ roadCasing: z.ZodOptional<z.ZodString>;
16
+ roadMajor: z.ZodOptional<z.ZodString>;
17
+ text: z.ZodOptional<z.ZodString>;
18
+ textHalo: z.ZodOptional<z.ZodString>;
19
+ textMuted: z.ZodOptional<z.ZodString>;
20
+ water: z.ZodOptional<z.ZodString>;
21
+ }, z.core.$strict>>;
22
+ extends: z.ZodOptional<z.ZodString>;
23
+ mode: z.ZodOptional<z.ZodEnum<{
24
+ light: "light";
25
+ dark: "dark";
26
+ }>>;
27
+ modules: z.ZodOptional<z.ZodObject<{
28
+ boundaries: z.ZodOptional<z.ZodObject<{
29
+ major: z.ZodOptional<z.ZodString>;
30
+ disputed: z.ZodOptional<z.ZodString>;
31
+ admin: z.ZodOptional<z.ZodString>;
32
+ maritime: z.ZodOptional<z.ZodString>;
33
+ }, z.core.$strict>>;
34
+ buildings: z.ZodOptional<z.ZodObject<{
35
+ fill: z.ZodOptional<z.ZodString>;
36
+ outline: z.ZodOptional<z.ZodString>;
37
+ extrusion: z.ZodOptional<z.ZodString>;
38
+ highRise: z.ZodOptional<z.ZodString>;
39
+ highRiseOutline: z.ZodOptional<z.ZodString>;
40
+ lowRise: z.ZodOptional<z.ZodString>;
41
+ lowRiseOutline: z.ZodOptional<z.ZodString>;
42
+ }, z.core.$strict>>;
43
+ hydro: z.ZodOptional<z.ZodObject<{
44
+ water: z.ZodOptional<z.ZodString>;
45
+ waterway: z.ZodOptional<z.ZodString>;
46
+ ferry: z.ZodOptional<z.ZodString>;
47
+ label: z.ZodOptional<z.ZodString>;
48
+ }, z.core.$strict>>;
49
+ labels: z.ZodOptional<z.ZodObject<{
50
+ water: z.ZodOptional<z.ZodString>;
51
+ road: z.ZodOptional<z.ZodString>;
52
+ poi: z.ZodOptional<z.ZodString>;
53
+ primary: z.ZodOptional<z.ZodString>;
54
+ country: z.ZodOptional<z.ZodString>;
55
+ neighborhood: z.ZodOptional<z.ZodString>;
56
+ halo: z.ZodOptional<z.ZodString>;
57
+ muted: z.ZodOptional<z.ZodString>;
58
+ settlement: z.ZodOptional<z.ZodString>;
59
+ }, z.core.$strict>>;
60
+ landcover: z.ZodOptional<z.ZodObject<{
61
+ park: z.ZodOptional<z.ZodString>;
62
+ grass: z.ZodOptional<z.ZodString>;
63
+ ice: z.ZodOptional<z.ZodString>;
64
+ protected: z.ZodOptional<z.ZodString>;
65
+ sand: z.ZodOptional<z.ZodString>;
66
+ wood: z.ZodOptional<z.ZodString>;
67
+ }, z.core.$strict>>;
68
+ landuse: z.ZodOptional<z.ZodObject<{
69
+ residential: z.ZodOptional<z.ZodString>;
70
+ cemetery: z.ZodOptional<z.ZodString>;
71
+ civic: z.ZodOptional<z.ZodString>;
72
+ commercial: z.ZodOptional<z.ZodString>;
73
+ industrial: z.ZodOptional<z.ZodString>;
74
+ }, z.core.$strict>>;
75
+ poi: z.ZodOptional<z.ZodObject<{
76
+ food: z.ZodOptional<z.ZodString>;
77
+ coffee: z.ZodOptional<z.ZodString>;
78
+ culture: z.ZodOptional<z.ZodString>;
79
+ transit: z.ZodOptional<z.ZodString>;
80
+ shopping: z.ZodOptional<z.ZodString>;
81
+ lodging: z.ZodOptional<z.ZodString>;
82
+ health: z.ZodOptional<z.ZodString>;
83
+ education: z.ZodOptional<z.ZodString>;
84
+ services: z.ZodOptional<z.ZodString>;
85
+ halo: z.ZodOptional<z.ZodString>;
86
+ icon: z.ZodOptional<z.ZodString>;
87
+ label: z.ZodOptional<z.ZodString>;
88
+ }, z.core.$strict>>;
89
+ roads: z.ZodOptional<z.ZodObject<{
90
+ path: z.ZodOptional<z.ZodString>;
91
+ motorway: z.ZodOptional<z.ZodString>;
92
+ trunk: z.ZodOptional<z.ZodString>;
93
+ primary: z.ZodOptional<z.ZodString>;
94
+ secondary: z.ZodOptional<z.ZodString>;
95
+ minor: z.ZodOptional<z.ZodString>;
96
+ bridge: z.ZodOptional<z.ZodString>;
97
+ tunnel: z.ZodOptional<z.ZodString>;
98
+ casing: z.ZodOptional<z.ZodString>;
99
+ ferry: z.ZodOptional<z.ZodString>;
100
+ rail: z.ZodOptional<z.ZodString>;
101
+ }, z.core.$strict>>;
102
+ }, z.core.$strict>>;
103
+ typography: z.ZodOptional<z.ZodObject<{
104
+ font: z.ZodOptional<z.ZodString>;
105
+ weight: z.ZodOptional<z.ZodEnum<{
106
+ bold: "bold";
107
+ regular: "regular";
108
+ medium: "medium";
109
+ semibold: "semibold";
110
+ }>>;
111
+ places: z.ZodOptional<z.ZodObject<{
112
+ font: z.ZodOptional<z.ZodString>;
113
+ weight: z.ZodOptional<z.ZodEnum<{
114
+ bold: "bold";
115
+ regular: "regular";
116
+ medium: "medium";
117
+ semibold: "semibold";
118
+ }>>;
119
+ }, z.core.$strict>>;
120
+ poi: z.ZodOptional<z.ZodObject<{
121
+ font: z.ZodOptional<z.ZodString>;
122
+ weight: z.ZodOptional<z.ZodEnum<{
123
+ bold: "bold";
124
+ regular: "regular";
125
+ medium: "medium";
126
+ semibold: "semibold";
127
+ }>>;
128
+ }, z.core.$strict>>;
129
+ roads: z.ZodOptional<z.ZodObject<{
130
+ font: z.ZodOptional<z.ZodString>;
131
+ weight: z.ZodOptional<z.ZodEnum<{
132
+ bold: "bold";
133
+ regular: "regular";
134
+ medium: "medium";
135
+ semibold: "semibold";
136
+ }>>;
137
+ }, z.core.$strict>>;
138
+ water: z.ZodOptional<z.ZodObject<{
139
+ font: z.ZodOptional<z.ZodString>;
140
+ weight: z.ZodOptional<z.ZodEnum<{
141
+ bold: "bold";
142
+ regular: "regular";
143
+ medium: "medium";
144
+ semibold: "semibold";
145
+ }>>;
146
+ }, z.core.$strict>>;
147
+ }, z.core.$strict>>;
148
+ }, z.core.$strict>;
149
+ declare const tileflowMapSchema: z.ZodType<TileflowConfig>;
150
+ declare const configSchema: z.ZodType<TileflowConfig>;
151
+ declare const tileflowProjectSchema: z.ZodType<TileflowProjectConfig>;
152
+ declare function parseTileflowMap(input: unknown): TileflowConfig;
153
+ declare function parseTileflowProject(input: unknown): TileflowProjectConfig;
154
+ declare function validateConfig(input: unknown): ValidationResult;
155
+ declare const validateTileflowConfig: typeof validateConfig;
156
+
157
+ declare function defineTileflow<const TConfig extends TileflowProjectConfig>(config: TConfig): TConfig;
158
+
159
+ declare function roads(options?: TileflowRoadsModuleOptions): TileflowRoadsModuleConfig;
160
+
161
+ declare function labels(options?: TileflowLabelsModuleOptions): TileflowLabelsModuleConfig;
162
+
163
+ declare function poi(options?: TileflowPoiModuleOptions): TileflowPoiModuleConfig;
164
+
165
+ declare const tileflowIconPackageFileNames: readonly ["sprite.json", "sprite.png", "sprite@2x.json", "sprite@2x.png"];
166
+ type TileflowIconPackageFileName = (typeof tileflowIconPackageFileNames)[number];
167
+ declare const tileflowHostedIconIdPattern: RegExp;
168
+ declare const tileflowIconPackageLimits: {
169
+ readonly decodeConcurrency: 4;
170
+ readonly maxAtlasDimension: 2048;
171
+ readonly maxDecodedPixelsPerIcon: 4194304;
172
+ readonly maxGeneratedFileBytes: number;
173
+ readonly maxGeneratedPackageBytes: number;
174
+ readonly maxIconCount: 256;
175
+ readonly maxSourceBytes: number;
176
+ readonly maxSourceFileBytes: number;
125
177
  };
126
- type TileflowStyleOptions = {
127
- themes?: Record<string, TileflowThemeConfig>;
128
- tileBaseUrl?: string;
129
- tileset?: string;
178
+ /**
179
+ * Portable compatibility values shared by the public CLI and hosted policy.
180
+ * Commercial entitlements still belong to the database package.
181
+ */
182
+ declare const tileflowHostedAlphaCompatibility: {
183
+ readonly iconPackages: {
184
+ readonly maxGeneratedBytesPerProject: number;
185
+ readonly maxRetainedPerProject: 24;
186
+ };
187
+ readonly maxMapsPerDeploy: 1;
130
188
  };
131
- type TileflowManifest = {
132
- version: 1;
133
- tileBaseUrl: string;
134
- styles: Record<string, string>;
135
- maps: Record<string, string>;
189
+ declare const tileflowIconPackageContentHashSchema: z.ZodString;
190
+ declare const tileflowHostedIconIdSchema: z.ZodString;
191
+ declare const tileflowRenderedIconManifestEntrySchema: z.ZodObject<{
192
+ name: z.ZodString;
193
+ pixelSha256: z.ZodObject<{
194
+ oneX: z.ZodString;
195
+ twoX: z.ZodString;
196
+ }, z.core.$strict>;
197
+ }, z.core.$strict>;
198
+ declare const tileflowIconPackageLabelSchema: z.ZodString;
199
+ declare const tileflowIconPackageManifestSchema: z.ZodObject<{
200
+ files: z.ZodTuple<[z.ZodObject<{
201
+ byteLength: z.ZodNumber;
202
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
203
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
204
+ sha256: z.ZodString;
205
+ }, z.core.$strict>, z.ZodObject<{
206
+ byteLength: z.ZodNumber;
207
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
208
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
209
+ sha256: z.ZodString;
210
+ }, z.core.$strict>, z.ZodObject<{
211
+ byteLength: z.ZodNumber;
212
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
213
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
214
+ sha256: z.ZodString;
215
+ }, z.core.$strict>, z.ZodObject<{
216
+ byteLength: z.ZodNumber;
217
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
218
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
219
+ sha256: z.ZodString;
220
+ }, z.core.$strict>], null>;
221
+ format: z.ZodLiteral<"tileflow-icon-package-v1">;
222
+ iconNames: z.ZodArray<z.ZodString>;
223
+ renderedIcons: z.ZodArray<z.ZodObject<{
224
+ name: z.ZodString;
225
+ pixelSha256: z.ZodObject<{
226
+ oneX: z.ZodString;
227
+ twoX: z.ZodString;
228
+ }, z.core.$strict>;
229
+ }, z.core.$strict>>;
230
+ sprites: z.ZodObject<{
231
+ oneX: z.ZodObject<{
232
+ height: z.ZodNumber;
233
+ width: z.ZodNumber;
234
+ pixelRatio: z.ZodLiteral<1>;
235
+ }, z.core.$strict>;
236
+ twoX: z.ZodObject<{
237
+ height: z.ZodNumber;
238
+ width: z.ZodNumber;
239
+ pixelRatio: z.ZodLiteral<2>;
240
+ }, z.core.$strict>;
241
+ }, z.core.$strict>;
242
+ }, z.core.$strict>;
243
+ type TileflowIconPackageManifest = z.infer<typeof tileflowIconPackageManifestSchema>;
244
+ type TileflowRenderedIconManifestEntry = z.infer<typeof tileflowRenderedIconManifestEntrySchema>;
245
+ declare function compareCodeUnits(left: string, right: string): number;
246
+ declare function serializeCanonicalJson(value: unknown): string;
247
+ declare function serializeTileflowIconPackageManifest(input: TileflowIconPackageManifest): string;
248
+ declare function sha256Hex(input: string | Uint8Array): Promise<string>;
249
+ declare function hashTileflowIconPackageManifest(input: TileflowIconPackageManifest): Promise<string>;
250
+ /**
251
+ * Hashes the delivered pixels of one rendered icon without including its name.
252
+ *
253
+ * The v1 binary frame is the UTF-8 domain `tileflow-rendered-icon-pixels-v1\0`, followed by one
254
+ * byte for the pixel ratio, unsigned 32-bit big-endian width and height, then row-major RGBA.
255
+ * Fully transparent pixels have their RGB channels zeroed in a copy before hashing so invisible
256
+ * decoder data cannot create a visual difference.
257
+ */
258
+ declare function hashTileflowRenderedIconPixels(input: {
259
+ height: number;
260
+ pixelRatio: 1 | 2;
261
+ rgba: Uint8Array;
262
+ width: number;
263
+ }): Promise<string>;
264
+
265
+ type TileflowIconManifestDiff = {
266
+ added: string[];
267
+ afterBytes: number;
268
+ beforeBytes: number;
269
+ modified: string[];
270
+ removed: string[];
271
+ unchangedCount: number;
136
272
  };
137
- type MapLibreStyle = {
138
- version: 8;
139
- name: string;
140
- glyphs?: string;
141
- sprite?: string;
142
- sources: Record<string, Record<string, unknown>>;
143
- layers: Array<Record<string, unknown>>;
144
- terrain?: Record<string, unknown>;
145
- metadata?: Record<string, unknown>;
273
+ type TileflowIconMappingChange = {
274
+ after?: string;
275
+ before?: string;
276
+ key: string;
146
277
  };
147
- type ValidationMessage = {
148
- level: 'error' | 'warning';
149
- path: string;
150
- message: string;
278
+ type TileflowIconMappingDiff = {
279
+ added: TileflowIconMappingChange[];
280
+ changed: TileflowIconMappingChange[];
281
+ removed: TileflowIconMappingChange[];
151
282
  };
152
- type ValidationResult = {
153
- valid: boolean;
154
- messages: ValidationMessage[];
283
+ type TileflowIconReferenceAnalysis = {
284
+ analysisComplete: boolean;
285
+ dangling: Array<{
286
+ iconName: string;
287
+ kind: 'mapping' | 'style-override-literal';
288
+ path: string;
289
+ }>;
290
+ unanalyzable: Array<{
291
+ kind: 'style-override-expression';
292
+ path: string;
293
+ }>;
155
294
  };
156
- declare function createStyle(input?: TileflowConfig, options?: TileflowStyleOptions): MapLibreStyle;
157
- declare function createStyleFromProject(projectConfig: TileflowProjectConfig, mapName: string, options?: TileflowStyleOptions): MapLibreStyle;
158
- declare function createManifest(projectConfig: TileflowProjectConfig, options?: {
159
- styleBaseUrl?: string;
160
- tileBaseUrl?: string;
161
- }): TileflowManifest;
162
- declare function getDefaultColors(): TileflowColors;
163
-
164
- declare function validateConfig(input: unknown): ValidationResult;
165
-
166
- declare function defineTileflow(config: TileflowProjectConfig): TileflowProjectConfig;
167
-
168
- declare function osm(options?: TileflowOsmBasemapOptions): TileflowOsmBasemapConfig;
169
-
170
- declare function roads(options?: TileflowRoadsModuleOptions): TileflowRoadsModuleConfig;
295
+ declare function diffTileflowIconPackageManifests(before: TileflowIconPackageManifest | null, after: TileflowIconPackageManifest | null): TileflowIconManifestDiff;
296
+ declare function diffTileflowIconMappings(before: Record<string, string> | null, after: Record<string, string> | null): TileflowIconMappingDiff;
297
+ declare function inspectTileflowIconReferences(project: TileflowProjectConfig, mapName: string, availableIconNames: readonly string[]): TileflowIconReferenceAnalysis;
298
+ declare function resolveTileflowIconMapping(project: TileflowProjectConfig, mapName: string): Record<string, string>;
171
299
 
172
- export { type MapLibreStyle, type TileflowBasemapConfig, type TileflowBuildings, type TileflowColorConfig, type TileflowColors, type TileflowConfig, type TileflowDensity, type TileflowFontWeight, type TileflowLabels, type TileflowManifest, type TileflowMapConfig, type TileflowModuleConfig, type TileflowOsmBasemapConfig, type TileflowOsmBasemapOptions, type TileflowPoi, type TileflowProjectConfig, type TileflowRoads, type TileflowRoadsModuleConfig, type TileflowRoadsModuleOptions, type TileflowRoadsModulePreset, type TileflowSourceLayers, type TileflowStyleOptions, type TileflowTerrain, type TileflowTerrainConfig, type TileflowTerrainEncoding, type TileflowTerrainMode, type TileflowTheme, type TileflowThemeConfig, type TileflowThemeMode, type TileflowTiles, type TileflowTilesetConfig, type TileflowTypography, type TileflowViewConfig, type ValidationMessage, type ValidationResult, createManifest, createStyle, createStyleFromProject, defineTileflow, getDefaultColors, osm, roads, validateConfig };
300
+ export { TileflowBaseColors, TileflowConfig, type TileflowIconManifestDiff, type TileflowIconMappingChange, type TileflowIconMappingDiff, type TileflowIconPackageFileName, type TileflowIconPackageManifest, type TileflowIconReferenceAnalysis, TileflowLabelsModuleConfig, TileflowLabelsModuleOptions, TileflowPoiModuleConfig, TileflowPoiModuleOptions, TileflowProjectConfig, type TileflowRenderedIconManifestEntry, TileflowRoadsModuleConfig, TileflowRoadsModuleOptions, ValidationResult, compareCodeUnits, configSchema, defineTileflow, diffTileflowIconMappings, diffTileflowIconPackageManifests, getDefaultColors, hashTileflowIconPackageManifest, hashTileflowRenderedIconPixels, inspectTileflowIconReferences, labels, parseTileflowMap, parseTileflowProject, poi, resolveTileflowIconMapping, roads, serializeCanonicalJson, serializeTileflowIconPackageManifest, sha256Hex, tileflowHostedAlphaCompatibility, tileflowHostedIconIdPattern, tileflowHostedIconIdSchema, tileflowIconPackageContentHashSchema, tileflowIconPackageFileNames, tileflowIconPackageLabelSchema, tileflowIconPackageLimits, tileflowIconPackageManifestSchema, tileflowMapSchema, tileflowProjectSchema, tileflowRenderedIconManifestEntrySchema, tileflowThemeSchema, validateConfig, validateTileflowConfig };