@tileflow/core 0.1.0-alpha.4 → 0.1.0-alpha.40

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.
Files changed (57) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +318 -26
  3. package/THIRD_PARTY_NOTICES.md +444 -0
  4. package/dist/3d-CzLTD0RK.d.ts +1092 -0
  5. package/dist/3d.d.ts +1 -0
  6. package/dist/3d.js +12514 -0
  7. package/dist/browser.d.ts +2281 -0
  8. package/dist/browser.js +21680 -0
  9. package/dist/build.d.ts +595 -0
  10. package/dist/build.js +29729 -0
  11. package/dist/capture-shot-ChPQvPyi.d.ts +291 -0
  12. package/dist/capture.d.ts +9 -0
  13. package/dist/capture.js +510 -0
  14. package/dist/config-reference.json +40600 -0
  15. package/dist/icon-composition-CcSHApUm.d.ts +2478 -0
  16. package/dist/index.d.ts +1806 -162
  17. package/dist/index.js +26319 -3476
  18. package/dist/manifest-types-DnhSJjCM.d.ts +902 -0
  19. package/dist/manifest.d.ts +9 -0
  20. package/dist/manifest.js +449 -0
  21. package/dist/native-profile.d.ts +206 -0
  22. package/dist/native-profile.js +9339 -0
  23. package/dist/native.d.ts +365 -0
  24. package/dist/native.js +5970 -0
  25. package/dist/runtime.d.ts +1 -0
  26. package/dist/runtime.js +1445 -0
  27. package/dist/worker/camera-tile-worker.global.js +20 -0
  28. package/docs/application-tile-reading.md +86 -0
  29. package/docs/authoring-model.md +269 -0
  30. package/docs/boundary-areas-and-choropleths.md +217 -0
  31. package/docs/buildings-3d.md +594 -0
  32. package/docs/camera-moves-and-tile-cache.md +112 -0
  33. package/docs/capture-scenes.md +40 -0
  34. package/docs/capture-shots.md +173 -0
  35. package/docs/cartographic-defaults.md +210 -0
  36. package/docs/compiled-style-performance.md +286 -0
  37. package/docs/data-is-separate-from-design.md +610 -0
  38. package/docs/depth-markers.md +65 -0
  39. package/docs/dynamic-style-images.md +100 -0
  40. package/docs/globe-atmosphere.md +113 -0
  41. package/docs/hosted-session-authorization.md +106 -0
  42. package/docs/map-and-terrain-examples.md +156 -0
  43. package/docs/map-emphasis.md +89 -0
  44. package/docs/native-artifact-profile.md +152 -0
  45. package/docs/native-resource-urls.md +369 -0
  46. package/docs/nautical-marks.md +308 -0
  47. package/docs/public-api-and-browser-subpath.md +101 -0
  48. package/docs/route-drawing.md +191 -0
  49. package/docs/shared-visual-primitives.md +101 -0
  50. package/docs/street-lights.md +127 -0
  51. package/docs/street-sky.md +156 -0
  52. package/docs/style-states.md +73 -0
  53. package/docs/sun-and-light.md +167 -0
  54. package/docs/theme-transitions-and-blends.md +317 -0
  55. package/docs/themes-and-module-styles.md +156 -0
  56. package/docs/trees-3d.md +295 -0
  57. package/package.json +67 -8
package/dist/index.d.ts CHANGED
@@ -1,178 +1,1822 @@
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 TileflowThemeName = 'light' | 'dark';
10
- type TileflowThemeMode = TileflowThemeName;
11
- type TileflowColors = {
12
- canvas: string;
13
- land: string;
14
- water: string;
15
- nature: string;
16
- road: string;
17
- text: string;
18
- accent: string;
19
- };
20
- type LegacyTileflowColorAliases = {
21
- background?: string;
22
- park?: string;
23
- building?: string;
24
- roadCasing?: string;
25
- };
26
- type TileflowColorConfig = Partial<TileflowColors> & LegacyTileflowColorAliases;
27
- type TileflowFontWeight = 'regular' | 'medium' | 'semibold' | 'bold';
28
- type TileflowTypography = {
29
- font?: string;
30
- weight?: TileflowFontWeight;
31
- };
32
- type TileflowFonts = {
33
- body?: string;
34
- labels?: string;
35
- };
36
- type TileflowThemeConfig = {
37
- colors?: TileflowColorConfig;
38
- fonts?: TileflowFonts;
39
- typography?: TileflowTypography;
40
- };
41
- type TileflowSourceLayers = {
42
- landuse?: string;
43
- park?: string;
44
- water?: string;
45
- road?: string;
46
- building?: string;
47
- boundary?: string;
48
- place?: string;
49
- poi?: string;
50
- };
51
- type TileflowTiles = {
52
- sourceId?: string;
53
- tileset?: string;
54
- url?: string;
55
- attribution?: string;
56
- sourceLayers?: TileflowSourceLayers;
57
- };
58
- type TileflowTerrainConfig = {
59
- attribution?: string;
60
- encoding?: TileflowTerrainEncoding;
61
- exaggeration?: number;
62
- mode?: TileflowTerrainMode;
63
- sourceId?: string;
64
- tileset?: string;
65
- url?: string;
66
- };
67
- type TileflowTerrain = TileflowTerrainMode | TileflowTerrainConfig;
68
- type TileflowViewConfig = {
69
- bearing?: number;
70
- center?: readonly [number, number];
71
- zoom?: number;
72
- };
73
- type TileflowOsmBasemapConfig = {
74
- type: 'osm';
75
- attribution?: string;
76
- glyphs?: string;
77
- sourceId?: string;
78
- sourceLayers?: TileflowSourceLayers;
79
- sprite?: string;
80
- tileset?: string;
81
- url?: string;
82
- };
83
- type TileflowBasemapConfig = TileflowOsmBasemapConfig;
84
- type TileflowOsmBasemapOptions = Omit<TileflowOsmBasemapConfig, 'type'>;
85
- type TileflowRoadsModulePreset = 'modern' | 'minimal';
86
- type TileflowRoadsModuleConfig = {
87
- type: 'roads';
88
- density?: TileflowDensity;
89
- preset?: TileflowRoadsModulePreset;
90
- };
91
- type TileflowRoadsModuleOptions = Omit<TileflowRoadsModuleConfig, 'type'>;
92
- type TileflowModuleConfig = TileflowRoadsModuleConfig;
93
- type TileflowConfig = {
94
- basemap?: TileflowBasemapConfig;
1
+ import { u as TileflowBoundaryClass, w as TileflowBoundaryClassTier, x as TileflowBoundaryFamily, y as TileflowOverlayPlacement, z as TileflowMapLibreOverlay, d as TileflowMap, A as TileflowMapScene, B as TileflowMapShot, C as ResolveMapOptions, R as ResolvedTileflowMap, D as TileflowIconAppearance, O as OpenMapTilesFieldBindings, E as TileflowLayerDomain, F as TileflowBandPlacement, G as OpenMapTilesLayerBindings, H as tileflowCompilationPhases, I as tileflowCompilationPlannerStages, J as tileflowCompilationReportSchemaVersion, K as TileflowSemanticModuleName, L as tileflowHostedSourceLimit, M as tileflowOverlayPlacements, N as ResolvedTileflowTheme, P as TileflowThemeColorScheme, Q as TileflowIconSource, S as TileflowModelLightingRole, U as TileflowBuildingSurfaceDesign, V as TileflowModelPart, W as TileflowModel, X as TileflowModelBytes, Y as TileflowVegetationMode } from './icon-composition-CcSHApUm.js';
2
+ export { Z as OpenMapTilesSchema, _ as OpenMapTilesSchemaOptions, $ as ParkLayerSemantics, a0 as ResolvedBathymetry, a1 as ResolvedBathymetryRelief, a2 as ResolvedBoundaryAreas, a3 as ResolvedMarine, a4 as ResolvedMarineSource, a5 as ResolvedTileflowData, a6 as ResolvedTileflowThemeTokens, a7 as TileflowAddressesModuleConfig, a8 as TileflowAddressesModuleOptions, a9 as TileflowAerowaysModuleConfig, aa as TileflowAerowaysModuleOptions, ab as TileflowAtmosphere, ac as TileflowAtmosphereOptions, ad as TileflowAuthoringModules, ae as TileflowBarrierClass, af as TileflowBarrierStyle, ag as TileflowBathymetryConfig, ah as TileflowBathymetryDemSourceIdentity, ai as TileflowBathymetryDisplay, aj as TileflowBathymetryNameLayer, ak as TileflowBathymetryNamePlacement, al as TileflowBathymetryNameStyle, am as TileflowBathymetryNameZoomRange, an as TileflowBathymetryOptions, ao as TileflowBathymetryReliefConfig, ap as TileflowBathymetryVectorLayers, aq as TileflowBoundariesModuleConfig, ar as TileflowBoundariesModuleOptions, as as TileflowBoundaryAreas, at as TileflowBoundaryAreasConfig, au as TileflowBoundaryAreasSourceIdentity, av as TileflowBuildingMode, aw as TileflowBuildingModelPart, ax as TileflowBuildingModelPlacementConfig, ay as TileflowBuildingSurfaces, az as TileflowBuildingsModuleConfig, aA as TileflowBuildingsModuleOptions, aB as TileflowBuildingsThreeDimensionalStyle, aC as TileflowCompilationDesignDecision, aD as TileflowCompilationDiagnostic, aE as TileflowCompilationDomainReport, aF as TileflowCompilationFailure, aG as TileflowCompilationOptions, aH as TileflowCompilationPhase, aI as TileflowCompilationPlannerDecision, aJ as TileflowCompilationPlannerStage, aK as TileflowCompilationReport, aL as TileflowCompilationResult, aM as TileflowCompilationSuccess, h as TileflowDataCompatibilityIssue, aN as TileflowDataConfig, i as TileflowDataFieldRequirement, j as TileflowDataFieldType, aO as TileflowDataIdentity, k as TileflowDataLayerRequirement, b as TileflowDataRequirementsV1, aP as TileflowDerivedMap, aQ as TileflowDisableOperation, aR as TileflowFontDirectory, aS as TileflowGlyphs, aT as TileflowHostedSourceCollection, aU as TileflowHostedTilesetSource, aV as TileflowHostedTilesetType, a as TileflowIconCompositionV1, aW as TileflowIconContributorIdentity, aX as TileflowIconDirectory, aY as TileflowIconSetError, aZ as TileflowIconSetErrorCode, a_ as TileflowIconSetReference, a$ as TileflowIconSetSource, b0 as TileflowLandModuleConfig, b1 as TileflowLandModuleOptions, b2 as TileflowLandcoverClass, b3 as TileflowLandformClass, b4 as TileflowLandformsModuleConfig, b5 as TileflowLandformsModuleOptions, b6 as TileflowLanduseClass, b7 as TileflowLayerBand, b8 as TileflowLocalDirectory, b9 as TileflowMapDesign, ba as TileflowMapIdentity, bb as TileflowMapLibreOverlayLayer, bc as TileflowMapTooling, bd as TileflowMarine, be as TileflowMarineConfig, bf as TileflowMarineMode, bg as TileflowMarineSourceConfig, bh as TileflowMarineSourceIdentity, bi as TileflowModelDirectory, bj as TileflowModelEmitter, bk as TileflowModelLevelBytes, bl as TileflowModelMaterial, bm as TileflowModelMaterialRange, bn as TileflowModelMesh, bo as TileflowModelSurface, bp as TileflowModelTexture, bq as TileflowModelTextureReference, br as TileflowModuleOperation, bs as TileflowModulePatch, bt as TileflowNauticalAreaLabelStyles, bu as TileflowNauticalModuleConfig, bv as TileflowNauticalModuleOptions, l as TileflowObservedDataContractV1, bw as TileflowOverlayCollection, bx as TileflowPackageDirectory, by as TileflowPreparedIconCapabilities, bz as TileflowRasterDemSourceRequirementV1, bA as TileflowRefineOperation, bB as TileflowRemoveOperation, T as TileflowRenderedIconIdentity, bC as TileflowReset, bD as TileflowResolvedThemeSelection, bE as TileflowSemanticModules, bF as TileflowSky, bG as TileflowSkyColours, bH as TileflowSkyMetadata, bI as TileflowSkyOptions, bJ as TileflowSkyTimesOfDay, c as TileflowSourceRequirementsV1, bK as TileflowStandaloneMap, e as TileflowStyleOptions, bL as TileflowSun, bM as TileflowSunPreset, bN as TileflowTheme, bO as TileflowThemeAmbient, bP as TileflowThemeAuditContext, bQ as TileflowThemeAuditDiagnostic, bR as TileflowThemeAuditError, bS as TileflowThemeAuditScope, bT as TileflowThemeDefinition, bU as TileflowThemeLighting, bV as TileflowThemeName, bW as TileflowThemeSun, bX as TileflowThemeTokens, bY as TileflowThemeTypography, bZ as TileflowThemeTypographyStyle, b_ as TileflowTransitModuleConfig, b$ as TileflowTransitModuleOptions, c0 as TileflowTransitRailStyle, c1 as TileflowTreeForm, c2 as TileflowTreeFormMix, c3 as TileflowTreeModel, c4 as TileflowTreeModelMesh, c5 as TileflowTreeRegion, c6 as TileflowVegetation3D, c7 as TileflowVegetationModuleConfig, c8 as TileflowVegetationModuleOptions, c9 as TileflowVegetationThreeDimensionalStyle, ca as TileflowVisualValueCategory, cb as TileflowWaterModuleConfig, cc as TileflowWaterModuleOptions, cd as TileflowWaterwayClass, ce as TileflowWorldData, cf as TileflowWorldReleaseReference, cg as TileflowWorldSelection, ch as TileflowWorldV1Schema, ci as VectorTilesData, cj as addresses, ck as aeroways, cl as assertTileflowMapThemeValues, cm as assertTileflowSdfPixels, cn as auditTileflowMapThemeValues, co as auditTileflowThemeValues, cp as bathymetry, cq as boundaries, cr as buildings, cs as checkTileflowModelSurface, ct as classifyTileflowVisualProperty, cu as collectTileflowIconSetReferences, cv as createStyle, cw as createStyleResult, cx as decodeTileflowTreeModel, cy as defineTheme, cz as disable, cA as encodeTileflowTreeModel, cB as hashTileflowIconComposition, cC as hostedTileset, cD as iconSet, r as inferTileflowDataRequirements, s as inferTileflowSourceRequirements, cE as isCanonicalOpenMapTilesSchema, cF as isSafeLocalPmtilesPath, cG as isTileflowBoundaryClass, cH as isTileflowBoundaryFamily, cI as isTileflowCompilationPhase, cJ as isTileflowIconSetSource, cK as isTileflowLocalDirectory, cL as land, cM as landforms, cN as maplibreOverlay, cO as mixTileflowSunPresets, cP as nautical, cQ as openMapTiles, cR as openMapTilesContractVersion, cS as parseTileflowIconComposition, cT as parseTileflowMap, cU as readTileflowSky, cV as readTileflowSunPreset, cW as readTileflowVegetation3D, cX as refine, cY as remove, cZ as reset, c_ as resolveBoundaryAreas, c$ as resolveMarine, d0 as resolveThemeSelection, d1 as resolveThemeValues, d2 as resolveTileflowData, d3 as resolveTileflowSun, d4 as resolveTileflowTheme, d5 as tileflowBandPlacements, d6 as tileflowBathymetryDemSourceId, d7 as tileflowBathymetryNameLayerLimits, d8 as tileflowBathymetrySourceId, d9 as tileflowBathymetryV1Schema, da as tileflowBoundaryAreasV1Schema, db as tileflowBoundaryClassTiers, dc as tileflowBoundaryClasses, dd as tileflowBoundaryFamilies, de as tileflowDefaultSunPreset, df as tileflowIconAppearanceSchema, dg as tileflowIconAuthorMetadataSchema, dh as tileflowIconCompositionMaximumBytes, di as tileflowIconCompositionSchema, dj as tileflowIconMetadataFileName, dk as tileflowIconSetIdSchema, dl as tileflowIconSetPackageIdSchema, dm as tileflowIconSetReferenceSchema, dn as tileflowIconSetSourceSchema, dp as tileflowIconSetTeamIdSchema, dq as tileflowIconSetVersionIdSchema, dr as tileflowIconSourceLimit, ds as tileflowInsideRings, dt as tileflowLandformClasses, du as tileflowLayerBands, dv as tileflowLocalDirectoryMaximumLength, dw as tileflowLocalDirectoryMessage, dx as tileflowMapIdSchema, dy as tileflowModelDefaultLightingRoles, dz as tileflowModelImageSize, dA as tileflowModelLightingRoles, dB as tileflowModelLimits, dC as tileflowModelParts, dD as tileflowModelSurfaceLimits, dE as tileflowModelTextureChannels, dF as tileflowModelVertexBytes, dG as tileflowNauticalFacilityIcons, dH as tileflowNauticalImageRoles, dI as tileflowNauticalNotice, dJ as tileflowNauticalPromoteId, dK as tileflowNauticalSourceId, dL as tileflowNauticalV1Schema, dM as tileflowPrimarySourceId, dN as tileflowRenderedIconIdentitySchema, dO as tileflowRingsOverlap, dP as tileflowSkyAtSun, dQ as tileflowSkyMetadataKey, dR as tileflowStyleSunPreset, dS as tileflowSunDirection, dT as tileflowSunMetadataKey, dU as tileflowSunPosition, dV as tileflowThemeLimits, dW as tileflowTreeForms, dX as tileflowTreeModelIdPattern, dY as tileflowTreeModelLimits, dZ as tileflowVegetationMetadataKey, d_ as tileflowWorld, d$ as tileflowWorldGeneration, e0 as tileflowWorldTileJsonUrl, e1 as tileflowWorldV1Schema, e2 as transit, e3 as validateTileflowCompiledIconCapabilities, v as validateTileflowDataCompatibility, e4 as validateTileflowMap, e5 as validateTileflowWorldV1Tilejson, e6 as vectorTiles, e7 as vegetation, e8 as water } from './icon-composition-CcSHApUm.js';
3
+ import { z } from 'zod';
4
+ import { V as ValidationMessage, i as TileflowExpression, j as TileflowFixedValue, k as TileflowThemeTokenReference, l as TileflowThemeColorOperation, m as TileflowBackgroundStyle, n as TileflowCircleStyle, o as TileflowExtrusionStyle, p as TileflowFillStyle, q as TileflowLineStyle, r as TileflowSymbolStyle, M as MapLibreStyle, s as TileflowRoadsModuleOptions, u as TileflowRoadsModuleConfig, v as TileflowLabelsModuleOptions, w as TileflowLabelsModuleConfig, x as TileflowPoiModuleOptions, y as TileflowPoiModuleConfig } from './manifest-types-DnhSJjCM.js';
5
+ export { z as MapLibreSprite, A as TileflowAerodromeCodeDetail, B as TileflowAlignment, C as TileflowAnalytics, D as TileflowAreaStyle, E as TileflowBackgroundPaint, F as TileflowCirclePaint, G as TileflowColor, H as TileflowColorStyleValue, I as TileflowExtrusionPaint, J as TileflowFillPaint, K as TileflowIconAnchor, L as TileflowIconLayout, N as TileflowIconPaint, O as TileflowIconStyle, P as TileflowIconTextFit, Q as TileflowImageStyleValue, R as TileflowLabelDetail, S as TileflowLabelLanguage, U as TileflowLabelStyles, W as TileflowLayerRange, X as TileflowLight, Y as TileflowLineCap, Z as TileflowLineHatchStyle, _ as TileflowLineJoin, $ as TileflowLineLayout, a0 as TileflowLinePaint, a1 as TileflowLineStackStyle, a2 as TileflowManifestFetchOptions, a3 as TileflowManifestLoadOptions, a4 as TileflowMapMode, a5 as TileflowMapModeOptions, a6 as TileflowMarkerSymbolStyle, a7 as TileflowMountainBikeScale, a8 as TileflowNumberInsetsStyleValue, a9 as TileflowNumberStyleValue, aa as TileflowPlaceLabelClass, ab as TileflowPoiCategory, ac as TileflowPoiCategoryStyle, ad as TileflowPoiColorMode, ae as TileflowPoiDensity, af as TileflowPoiPlacementOrder, ag as TileflowPriorityOrder, ah as TileflowProjection, ai as TileflowResolvedRuntimeTheme, aj as TileflowRoadAreaStyle, ak as TileflowRoadClass, al as TileflowRoadClassStyle, am as TileflowRoadCrossingStyle, an as TileflowRoadDetail, ao as TileflowRoadExtras, ap as TileflowRoadHierarchy, aq as TileflowRoadLabelDetail, ar as TileflowRoadLayerStyle, as as TileflowRoadModifier, at as TileflowRoadOutline, au as TileflowRoadRestriction, av as TileflowRoadRoundaboutStyle, aw as TileflowRoadServiceType, ax as TileflowRoadShieldDetail, ay as TileflowRoadShieldStyles, az as TileflowRoadSidewalkStyle, aA as TileflowRoadStreetLightStyle, aB as TileflowRoadStructure, aC as TileflowRoadTreatmentLayerStyle, aD as TileflowRoadTreatmentLineStyle, aE as TileflowRoadTreatmentStyle, aF as TileflowRoadWeight, aG as TileflowRuntimeCenterLike, a as TileflowRuntimeColorScheme, T as TileflowRuntimeManifest, aH as TileflowRuntimeManifestMap, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, aI as TileflowRuntimeSource, aJ as TileflowRuntimeSourceValidation, aK as TileflowRuntimeStyle, aL as TileflowRuntimeStyleOptions, d as TileflowRuntimeSystemThemes, aM as TileflowRuntimeViewOptions, aN as TileflowSessionController, aO as TileflowSessionGrantResponse, aP as TileflowStringStyleValue, aQ as TileflowStructuralStyleValue, aR as TileflowStyleFontFace, aS as TileflowStyleValue, aT as TileflowSymbolOverlap, aU as TileflowSymbolPlacement, aV as TileflowSymbolPlacementStyle, aW as TileflowSymbolZOrder, aX as TileflowTerrain, aY as TileflowTerrainConfig, aZ as TileflowTerrainContourLabelStyle, a_ as TileflowTerrainContourLineStyle, a$ as TileflowTerrainContoursConfig, b0 as TileflowTerrainEncoding, b1 as TileflowTerrainHillshadeStyle, b2 as TileflowTerrainLayerRange, b3 as TileflowTerrainMode, b4 as TileflowTextAnchor, b5 as TileflowTextBackground, b6 as TileflowTextJustify, b7 as TileflowTextLayout, b8 as TileflowTextPaint, b9 as TileflowTextStyle, ba as TileflowThemeBlendSelection, bb as TileflowThemeColorAlpha, bc as TileflowThemeColorMix, bd as TileflowThemeColorValue, be as TileflowThemeFontValue, bf as TileflowThemeImageValue, bg as TileflowThemeNumberValue, bh as TileflowThemeSelection, bi as TileflowThemeTokenCategory, bj as TileflowThemeValue, e as TileflowTimeOfDay, f as TileflowTimeOfDayVariants, bk as TileflowViewConfig, bl as TileflowWaterLabelClass, bm as TileflowZoomInterpolation, bn as TileflowZoomValue, bo as ValidationResult, bp as assertValidTileflowRuntimeSource, bq as clearTileflowManifestCache, br as color, bs as createTileflowSessionController, bt as createTileflowSessionId, bu as defaultTileflowManifestUrl, bv as defaultTileflowRuntimeView, bw as fixed, bx as getTileflowAnalyticsApiUrl, by as getTileflowStyleFontFaces, bz as inferTileflowAnalyticsFromStyleUrl, bA as isTileflowTimeOfDay, bB as loadTileflowManifest, bC as mergeTileflowAnalytics, bD as nearestTileflowBlendTheme, bE as normalizeTileflowRuntimeCenter, bF as normalizeTileflowStaticImageSize, bG as normalizeTileflowUrl, bH as resolveTileflowAnalyticsRequestUrl, bI as resolveTileflowManifestMap, bJ as resolveTileflowMapMode, bK as resolveTileflowRuntimeStyle, bL as resolveTileflowRuntimeTheme, bM as resolveTileflowRuntimeThemeBlend, bN as resolveTileflowRuntimeView, bO as resolveTileflowStaticImageUrl, bP as shouldLoadTileflowManifest, bQ as startTileflowSession, bR as tileflowPoiCategories, t as tileflowRuntimeManifestLimits, g as tileflowRuntimeManifestVersion, bS as tileflowStyleFontFaceLimits, bT as tileflowStyleFontFacesMetadataKey, bU as tileflowThemeBlendLimits, bV as tileflowThemeTokenCategories, bW as tileflowTimesOfDay, bX as token, bY as validateTileflowRuntimeSource, bZ as validateTileflowThemeBlendSelection, b_ as validateTileflowThemeSelection, b$ as zoom } from './manifest-types-DnhSJjCM.js';
6
+ export { N as NormalizedTileflowCaptureScene, b as NormalizedTileflowCaptureShot, c as NormalizedTileflowCaptureShotCamera, d as TileflowCaptureApplicationTarget, e as TileflowCaptureBoundsCamera, f as TileflowCaptureCamera, g as TileflowCaptureCenterCamera, h as TileflowCaptureMapTarget, T as TileflowCaptureScene, a as TileflowCaptureShot, i as TileflowCaptureShotBlend, j as TileflowCaptureShotEasing, k as TileflowCaptureShotFrame, l as TileflowCaptureShotKeyframe, m as TileflowCaptureTarget, n as TileflowCaptureViewport, o as normalizeTileflowCaptureId, p as normalizeTileflowCaptureScene, q as normalizeTileflowCaptureShot, t as tileflowCaptureApplicationTargetSchema, r as tileflowCaptureBoundsCameraSchema, s as tileflowCaptureCameraSchema, u as tileflowCaptureCenterCameraSchema, v as tileflowCaptureIdSchema, w as tileflowCaptureMapTargetSchema, x as tileflowCaptureSceneLimits, y as tileflowCaptureSceneNameSchema, z as tileflowCaptureSceneSchema, A as tileflowCaptureSceneSchemaVersion, B as tileflowCaptureShotBlendSchema, C as tileflowCaptureShotFrameCount, D as tileflowCaptureShotFrames, E as tileflowCaptureShotKeyframeSchema, F as tileflowCaptureShotLimits, G as tileflowCaptureShotNameSchema, H as tileflowCaptureShotSchema, I as tileflowCaptureShotSchemaVersion, J as tileflowCaptureTargetSchema, K as tileflowCaptureViewportSchema } from './capture-shot-ChPQvPyi.js';
7
+ export { tileflowPortableIdSchema, tileflowThemeNameSchema } from './capture.js';
8
+ export { parseTileflowRuntimeManifest, safeParseTileflowRuntimeManifest, tileflowRuntimeManifestSchema } from './manifest.js';
9
+
10
+ declare const tileflowPortableIdMaximumLength: 64;
11
+ declare function isTileflowPortableId(value: unknown): value is string;
12
+ declare function isTileflowThemeName(value: unknown): value is string;
13
+
14
+ /** A value a choropleth can colour: a number for scales, a string for categories. */
15
+ type TileflowBoundaryValue = number | string;
16
+ /** One row of an application's data, keyed by a registry ID or an official code. */
17
+ type TileflowBoundaryRow = Readonly<{
18
+ key: number | string;
19
+ /** `null` leaves the area without a value. */
20
+ value: TileflowBoundaryValue | null;
21
+ }>;
22
+ /** Keys present on every `boundary_area` polygon, usable without the lookup table. */
23
+ type TileflowBoundaryFeatureKey = 'id' | 'iso_3166_1' | 'ref';
24
+ /** Keys a row can carry. Those absent from the polygons need the lookup table. */
25
+ type TileflowBoundaryCode = TileflowBoundaryFeatureKey | 'iso_3166_2' | 'nuts' | 'wikidata';
26
+ /** Rows joined to areas by one polygon key. */
27
+ type TileflowBoundaryValues = Readonly<{
28
+ joinBy: TileflowBoundaryFeatureKey;
29
+ rows: readonly TileflowBoundaryRow[];
30
+ }>;
31
+ /** One unit drawn as one class, as the release's lookup table lists it. */
32
+ type TileflowBoundaryLookupRow = Readonly<{
33
+ admin_level?: number;
34
+ class: TileflowBoundaryClass;
35
+ class_tier?: TileflowBoundaryClassTier;
36
+ id: number;
37
+ iso_3166_1?: string;
38
+ iso_3166_2?: string;
95
39
  name?: string;
96
- tileset?: string;
97
- theme?: TileflowTheme | string | TileflowThemeConfig;
98
- modules?: readonly TileflowModuleConfig[];
99
- colors?: TileflowColorConfig;
100
- typography?: TileflowTypography;
101
- density?: TileflowDensity;
102
- roads?: TileflowRoads;
103
- labels?: TileflowLabels;
104
- poi?: TileflowPoi;
105
- buildings?: TileflowBuildings;
106
- terrain?: TileflowTerrain;
107
- glyphs?: string;
108
- sprite?: string;
109
- tiles?: TileflowTiles;
110
- view?: TileflowViewConfig;
40
+ name_en?: string;
41
+ nuts?: string;
42
+ ref?: string;
43
+ wikidata?: string;
44
+ }>;
45
+ type TileflowBoundaryLookup = Readonly<{
46
+ /** Lookup rows whose code equals `key`, optionally limited to some classes. */
47
+ find: (joinBy: TileflowBoundaryCode, key: number | string, classes?: readonly TileflowBoundaryClass[]) => readonly TileflowBoundaryLookupRow[];
48
+ rows: readonly TileflowBoundaryLookupRow[];
49
+ }>;
50
+ type TileflowBoundaryJoinResult = TileflowBoundaryValues & Readonly<{
51
+ /** Keys that resolved to more than one unit; their rows are left out. */
52
+ ambiguous: readonly (number | string)[];
53
+ /** Keys that appeared more than once; the last row wins. */
54
+ duplicates: readonly (number | string)[];
55
+ /** Keys that matched no unit. */
56
+ unmatched: readonly (number | string)[];
57
+ }>;
58
+ type JoinBoundaryRowsOptions = Readonly<{
59
+ /** Limit lookup matches to these classes, for codes shared across a unit's classes. */
60
+ classes?: readonly TileflowBoundaryClass[];
61
+ /** The key the rows carry. */
62
+ joinBy: TileflowBoundaryCode;
63
+ /** Required unless the rows already carry the target key. */
64
+ lookup?: TileflowBoundaryLookup;
65
+ /** The feature key to produce: the registry ID (default) or `ref`. */
66
+ to?: 'id' | 'ref';
67
+ }>;
68
+ /**
69
+ * Re-key rows to the feature key a choropleth or feature-state uses. Keys are normalized:
70
+ * ISO 3166, NUTS and Wikidata codes are trimmed and upper-cased; `ref` is trimmed.
71
+ */
72
+ declare function joinBoundaryRows(rows: readonly TileflowBoundaryRow[], options: JoinBoundaryRowsOptions): TileflowBoundaryJoinResult;
73
+ /** Index lookup rows by every code they carry. */
74
+ declare function createBoundaryLookup(rows: readonly TileflowBoundaryLookupRow[]): TileflowBoundaryLookup;
75
+ /**
76
+ * Parse the text of a Boundaries release's `boundaries-lookup.csv` (after decompressing the
77
+ * `.csv.gz`). Columns the join does not use are ignored; empty cells are omitted.
78
+ */
79
+ declare function parseBoundaryLookupCsv(text: string): TileflowBoundaryLookupRow[];
80
+
81
+ /** A MapLibre expression that evaluates to a color. */
82
+ type TileflowColorExpression = readonly [string, ...unknown[]];
83
+ type TileflowChoroplethStop = readonly [value: number, color: string];
84
+ /** Colors below the first threshold are `base`; each stop starts a new color class. */
85
+ type TileflowChoroplethStepScale = Readonly<{
86
+ base: string;
87
+ kind: 'step';
88
+ stops: readonly TileflowChoroplethStop[];
89
+ }>;
90
+ /** Colors interpolated linearly between stops and clamped outside them. */
91
+ type TileflowChoroplethLinearScale = Readonly<{
92
+ kind: 'linear';
93
+ stops: readonly TileflowChoroplethStop[];
94
+ }>;
95
+ /** One color per category value. */
96
+ type TileflowChoroplethCategoryScale = Readonly<{
97
+ categories: Readonly<Record<string, string>>;
98
+ kind: 'categories';
99
+ }>;
100
+ type TileflowChoroplethScale = TileflowChoroplethCategoryScale | TileflowChoroplethLinearScale | TileflowChoroplethStepScale;
101
+ /** Validated color scales for choropleths. */
102
+ declare const choroplethScale: Readonly<{
103
+ categories(categories: Readonly<Record<string, string>>): TileflowChoroplethCategoryScale;
104
+ linear(stops: readonly TileflowChoroplethStop[]): TileflowChoroplethLinearScale;
105
+ step(base: string, stops: readonly TileflowChoroplethStop[]): TileflowChoroplethStepScale;
106
+ }>;
107
+ /**
108
+ * The color a scale gives `input`. Areas whose value does not fit the scale (no value, a string on
109
+ * a numeric scale, or an unknown category) get `missingColor`.
110
+ */
111
+ declare function choroplethColorExpression(scale: TileflowChoroplethScale, input: unknown, missingColor: string): TileflowColorExpression;
112
+ type TileflowBoundaryChoroplethOutline = Readonly<{
113
+ color: string;
114
+ /** Line width in pixels. Defaults to 0.5. */
115
+ width?: number;
116
+ }>;
117
+ type TileflowBoundaryChoroplethOptions = Readonly<{
118
+ /** Classes to color, such as `['municipality']`. */
119
+ classes: readonly TileflowBoundaryClass[];
120
+ /** Limit areas to these ISO 3166-1 alpha-2 countries. */
121
+ countries?: readonly string[];
122
+ /** Defaults to `boundaries`. The map must declare the same family in `boundaryAreas`. */
123
+ family?: TileflowBoundaryFamily;
124
+ /** Portable ID; the overlay's layers are `<id>-fill` and, with an outline, `<id>-outline`. */
125
+ id: string;
126
+ maxzoom?: number;
127
+ /** Defaults to the first zoom at which the selected classes appear. */
128
+ minzoom?: number;
129
+ /** Defaults to transparent, which leaves areas without a value uncolored. */
130
+ missingColor?: string;
131
+ /** Fill opacity from 0 to 1. Defaults to 0.8. */
132
+ opacity?: number;
133
+ outline?: false | TileflowBoundaryChoroplethOutline;
134
+ /** Defaults to `below-labels`. */
135
+ placement?: TileflowOverlayPlacement;
136
+ scale: TileflowChoroplethScale;
137
+ /** Feature-state key read when `values` is omitted. Defaults to `value`. */
138
+ state?: string;
139
+ /** Limit areas to one class tier. */
140
+ tiers?: readonly TileflowBoundaryClassTier[];
111
141
  /**
112
- * Domains allowed to load this map in production (e.g. "example.com" or
113
- * "*.example.com"). When set, tile and session requests from other
114
- * websites are rejected. Local development (localhost, private network
115
- * addresses) is always allowed. Leave unset to allow any domain.
142
+ * Values compiled into the style. Omit them to color areas from feature-state set at run time
143
+ * with `createBoundaryFeatureState` from `@tileflow/core/browser`.
116
144
  */
117
- allowedOrigins?: string[];
145
+ values?: TileflowBoundaryValues;
146
+ }>;
147
+ /** Layer metadata key that records how a choropleth reads its values. */
148
+ declare const tileflowBoundaryChoroplethMetadataKey: "tileflow:boundaryChoropleth";
149
+ type TileflowBoundaryChoroplethMetadata = Readonly<{
150
+ family: TileflowBoundaryFamily;
151
+ joinBy?: TileflowBoundaryFeatureKey;
152
+ state?: string;
153
+ }>;
154
+ /** An overlay that colors Boundaries areas from values or feature-state. */
155
+ declare function boundaryChoropleth(options: TileflowBoundaryChoroplethOptions): TileflowMapLibreOverlay;
156
+
157
+ /** Exact immutable release identity contract for the current World V1 product. */
158
+ declare const tileflowWorldReleaseIdMinimumLength: 12;
159
+ declare const tileflowWorldReleaseIdMaximumLength: 128;
160
+ declare const tileflowWorldReleaseIdPatternSource: "^world-v1-[a-z0-9][a-z0-9._-]*[a-z0-9]$";
161
+ declare const tileflowWorldReleaseIdPattern: RegExp;
162
+ /** Validate without trimming, lowercasing, or otherwise normalizing an immutable release ID. */
163
+ declare function isTileflowWorldReleaseId(value: unknown): value is string;
164
+
165
+ declare const tileflowWorldReleaseIdSchema: z.ZodString;
166
+
167
+ /** Base color roles required by the semantic compiler; other roles derive from these. */
168
+ declare const tileflowRequiredThemeColorRoles: readonly ("boundaries.default" | "labels.halo" | "labels.muted" | "labels.primary" | "roads.casing" | "roads.default" | "roads.major" | "surface.background" | "surface.building" | "surface.land" | "surface.park" | "surface.water")[];
169
+
170
+ type ExactTileflowMap<TContract, TMap extends TContract> = TMap & Record<Exclude<keyof TMap, keyof TContract>, never>;
171
+ type ExactTileflowMapScenes<TMap> = TMap extends {
172
+ scenes: infer TScenes extends Record<string, TileflowMapScene>;
173
+ } ? {
174
+ scenes: {
175
+ [TName in keyof TScenes]: ExactTileflowMap<TileflowMapScene, TScenes[TName]>;
176
+ };
177
+ } : unknown;
178
+ type ExactTileflowMapShots<TMap> = TMap extends {
179
+ shots: infer TShots extends Record<string, TileflowMapShot>;
180
+ } ? {
181
+ shots: {
182
+ [TName in keyof TShots]: ExactTileflowMap<TileflowMapShot, TShots[TName]>;
183
+ };
184
+ } : unknown;
185
+ /** Preserve the exact inferred type of a standalone or inherited semantic map. */
186
+ declare function defineMap<const TMap extends TileflowMap>(map: ExactTileflowMap<TileflowMap, TMap> & ExactTileflowMapScenes<TMap> & ExactTileflowMapShots<TMap>): TMap;
187
+
188
+ declare const tileflowMapDefaultMaxDepth = 64;
189
+ /** Structured authoring failure surfaced unchanged by validate/explain JSON commands. */
190
+ declare class TileflowMapResolutionError extends Error {
191
+ readonly code: string;
192
+ readonly mapId: string;
193
+ readonly path: string;
194
+ constructor(code: string, mapId: string, path: string, message: string);
195
+ }
196
+ /** Resolve an imported map lineage to one standalone authoring map. */
197
+ declare function resolveMap(map: TileflowMap, options?: ResolveMapOptions): ResolvedTileflowMap;
198
+
199
+ /**
200
+ * The steepest camera pitch Tileflow supports, in degrees from looking straight down. Every
201
+ * portable view admits pitch 0–85, and Tileflow's maps raise MapLibre's own default of 60 to this,
202
+ * so a street-level view looks along the street to the sky. A map's `mapOptions.maxPitch` lowers it.
203
+ */
204
+ declare const tileflowMaxPitch = 85;
205
+
206
+ /** Portable generated-index shape; geometry and pixel integrity require paired artifact verification. */
207
+ declare const tileflowIconSpriteIndexEntrySchema: z.ZodObject<{
208
+ stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
209
+ stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
210
+ content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
211
+ height: z.ZodNumber;
212
+ width: z.ZodNumber;
213
+ pixelRatio: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
214
+ x: z.ZodNumber;
215
+ y: z.ZodNumber;
216
+ sdf: z.ZodOptional<z.ZodLiteral<true>>;
217
+ tileflow: z.ZodOptional<z.ZodObject<{
218
+ representation: z.ZodLiteral<"sdf">;
219
+ defaults: z.ZodObject<{
220
+ color: z.ZodString;
221
+ haloColor: z.ZodString;
222
+ haloWidth: z.ZodNumber;
223
+ haloBlur: z.ZodNumber;
224
+ }, z.core.$strict>;
225
+ }, z.core.$strict>>;
226
+ }, z.core.$strict>;
227
+ declare const tileflowIconSpriteIndexSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
228
+ stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
229
+ stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
230
+ content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
231
+ height: z.ZodNumber;
232
+ width: z.ZodNumber;
233
+ pixelRatio: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
234
+ x: z.ZodNumber;
235
+ y: z.ZodNumber;
236
+ sdf: z.ZodOptional<z.ZodLiteral<true>>;
237
+ tileflow: z.ZodOptional<z.ZodObject<{
238
+ representation: z.ZodLiteral<"sdf">;
239
+ defaults: z.ZodObject<{
240
+ color: z.ZodString;
241
+ haloColor: z.ZodString;
242
+ haloWidth: z.ZodNumber;
243
+ haloBlur: z.ZodNumber;
244
+ }, z.core.$strict>;
245
+ }, z.core.$strict>>;
246
+ }, z.core.$strict>>;
247
+ type TileflowIconSpriteIndexEntry = z.infer<typeof tileflowIconSpriteIndexEntrySchema>;
248
+ type TileflowIconSpriteIndex = z.infer<typeof tileflowIconSpriteIndexSchema>;
249
+
250
+ type PremultipliedColor = {
251
+ r: number;
252
+ g: number;
253
+ b: number;
254
+ a: number;
118
255
  };
119
- type TileflowMapConfig = TileflowConfig;
120
- type TileflowTilesetConfig = {
121
- id?: string;
122
- name?: string;
123
- attribution?: string;
124
- sourceLayers?: TileflowSourceLayers;
256
+ type TileflowIconPreviewPaint = {
257
+ color: PremultipliedColor;
258
+ haloColor: PremultipliedColor;
259
+ haloWidth: number;
260
+ haloBlur: number;
125
261
  };
126
- type TileflowProjectThemes = Partial<Record<TileflowThemeName, TileflowThemeConfig>>;
127
- type TileflowProjectConfig = {
128
- themes?: TileflowProjectThemes;
129
- tilesets?: Record<string, TileflowTilesetConfig>;
130
- maps: Record<string, TileflowMapConfig>;
262
+ declare function resolveTileflowIconPreviewPaint(appearance: TileflowIconAppearance): TileflowIconPreviewPaint;
263
+ /** Self-contained runtime for default-appearance previews and static canvas composition. */
264
+ declare function createTileflowIconPreviewRuntime(): {
265
+ render: (rgba: Uint8Array, pixelRatio: number, paint: TileflowIconPreviewPaint) => Uint8ClampedArray;
131
266
  };
132
- type TileflowStyleOptions = {
133
- themes?: TileflowProjectThemes;
134
- tileBaseUrl?: string;
135
- tileset?: string;
267
+ /** Preserve RGBA cells and replace only SDF rectangles with their default appearance. */
268
+ declare function renderTileflowIconAtlasPixels(rgba: Uint8Array, width: number, height: number, index: TileflowIconSpriteIndex): Uint8ClampedArray;
269
+
270
+ /** Structured schema failure preserved for CLI/editor diagnostics. */
271
+ declare class TileflowResolvedMapValidationError extends Error {
272
+ readonly code: "CONFIG_INVALID";
273
+ readonly messages: ValidationMessage[];
274
+ readonly phase: "config-validation";
275
+ constructor(name: string, messages: ValidationMessage[]);
276
+ }
277
+ declare function parseResolvedTileflowMap(input: unknown): ResolvedTileflowMap;
278
+
279
+ declare const auxiliaryFieldBindings: Readonly<{
280
+ bathymetryContourDepth: "depth";
281
+ }>;
282
+ type TileflowDataFieldName = keyof OpenMapTilesFieldBindings | keyof typeof auxiliaryFieldBindings;
283
+ /** A schema-bound data field whose physical name is assigned only during compilation. */
284
+ type TileflowDataFieldReference<TName extends TileflowDataFieldName = TileflowDataFieldName> = Readonly<{
285
+ kind: 'tileflow-data-field';
286
+ name: TName;
287
+ }>;
288
+ type TileflowNumericDataFieldName = 'activityScore' | 'adminLevel' | 'bathymetryContourDepth' | 'bathymetryMinDepth' | 'bathymetrySortKey' | 'canopyClearanceAtZoom15' | 'canopyCoverPercent' | 'canopyRank' | 'circularClearanceExtraAtZoom15' | 'circularInnerRadiusMeters' | 'circularOuterRadiusMeters' | 'circularRadiusAtZoom15' | 'circularRadiusMeters' | 'confidence' | 'circumference' | 'diameterCrown' | 'elevation' | 'elevationFeet' | 'hasParts' | 'height' | 'hide3d' | 'importanceTier' | 'minHeight' | 'minZoom' | 'oneway' | 'poiFilterRank' | 'poiSizeRank' | 'ramp' | 'rank' | 'refLength' | 'renderHeight' | 'renderMinHeight' | 'shieldLineLengthMeters' | 'shieldRank';
289
+ /** Runtime value implied by one registered semantic field, independent of its physical name. */
290
+ type TileflowDataFieldValue<TName extends TileflowDataFieldName> = TName extends TileflowNumericDataFieldName ? number : string;
291
+ /**
292
+ * Reference a semantic field in a typed expression. Primary fields follow the active data schema;
293
+ * auxiliary fields use their fixed product contract at the final lowering boundary.
294
+ */
295
+ declare function field<const TName extends TileflowDataFieldName>(name: TName): TileflowDataFieldReference<TName>;
296
+
297
+ /** The value a themed authoring node produces after theme resolution. */
298
+ type TileflowDataExpressionResult<T> = T extends TileflowFixedValue<infer TValue> ? TValue : T extends TileflowThemeTokenReference<infer TCategory> ? TCategory extends 'number' ? number : string : T extends TileflowThemeColorOperation ? string : T;
299
+ type TileflowDataExpressionInput<T> = TileflowDataFieldReference | TileflowExpression<T> | T;
300
+ type TileflowDataMatchBranch<TInput extends boolean | number | string, TOutput> = Readonly<{
301
+ labels: TInput | readonly TInput[];
302
+ value: TileflowDataExpressionInput<TOutput>;
303
+ }>;
304
+ type TileflowDataCaseBranch<T> = Readonly<{
305
+ value: TileflowDataExpressionInput<T>;
306
+ when: TileflowDataExpressionInput<boolean>;
307
+ }>;
308
+ type TileflowDataInterpolation = Readonly<{
309
+ kind: 'linear';
310
+ }> | Readonly<{
311
+ base: number;
312
+ kind: 'exponential';
313
+ }> | Readonly<{
314
+ kind: 'cubic-bezier';
315
+ x1: number;
316
+ x2: number;
317
+ y1: number;
318
+ y2: number;
319
+ }>;
320
+ type TileflowDataStop<T> = readonly [number, TileflowDataExpressionInput<T>];
321
+ declare const tileflowDataExpressionLimits: Readonly<{
322
+ readonly maxBranches: 16;
323
+ readonly maxOperands: 16;
324
+ readonly maxStops: 16;
325
+ }>;
326
+ declare function get<TName extends TileflowDataFieldReference['name']>(reference: TileflowDataFieldReference<TName>): TileflowExpression<TileflowDataFieldValue<TName>>;
327
+ declare function literal<T>(value: T): TileflowExpression<TileflowDataExpressionResult<T>>;
328
+ declare function zoom(): TileflowExpression<number>;
329
+ declare function id(): TileflowExpression<string | number | null>;
330
+ declare function coalesce<T>(first: TileflowDataExpressionInput<T>, ...rest: readonly TileflowDataExpressionInput<T>[]): TileflowExpression<TileflowDataExpressionResult<T>>;
331
+ declare function toNumber(value: TileflowDataExpressionInput<unknown>, fallback?: TileflowDataExpressionInput<number>): TileflowExpression<number>;
332
+ declare function toBoolean(value: TileflowDataExpressionInput<unknown>, fallback?: TileflowDataExpressionInput<boolean>): TileflowExpression<boolean>;
333
+ declare function toString(value: TileflowDataExpressionInput<unknown>): TileflowExpression<string>;
334
+ declare function featureState(name: string): TileflowExpression<unknown>;
335
+ declare function globalState(name: string): TileflowExpression<unknown>;
336
+ declare function variable<T>(name: string): TileflowExpression<T>;
337
+ declare function letValue<TBinding, TResult>(name: string, value: TileflowDataExpressionInput<TBinding>, body: TileflowDataExpressionInput<TResult>): TileflowExpression<TileflowDataExpressionResult<TResult>>;
338
+ declare function abs(value: TileflowDataExpressionInput<number>): TileflowExpression<number>;
339
+ declare function add(first: TileflowDataExpressionInput<number>, second: TileflowDataExpressionInput<number>, ...rest: readonly TileflowDataExpressionInput<number>[]): TileflowExpression<number>;
340
+ declare function subtract(first: TileflowDataExpressionInput<number>, second: TileflowDataExpressionInput<number>): TileflowExpression<number>;
341
+ declare function divide(dividend: TileflowDataExpressionInput<number>, divisor: TileflowDataExpressionInput<number>): TileflowExpression<number>;
342
+ declare function modulo(dividend: TileflowDataExpressionInput<number>, divisor: TileflowDataExpressionInput<number>): TileflowExpression<number>;
343
+ declare function multiply(first: TileflowDataExpressionInput<number>, second: TileflowDataExpressionInput<number>, ...rest: readonly TileflowDataExpressionInput<number>[]): TileflowExpression<number>;
344
+ declare function minimum(first: TileflowDataExpressionInput<number>, second: TileflowDataExpressionInput<number>, ...rest: readonly TileflowDataExpressionInput<number>[]): TileflowExpression<number>;
345
+ declare function maximum(first: TileflowDataExpressionInput<number>, second: TileflowDataExpressionInput<number>, ...rest: readonly TileflowDataExpressionInput<number>[]): TileflowExpression<number>;
346
+ declare function concat(first: TileflowDataExpressionInput<string>, ...rest: readonly TileflowDataExpressionInput<string>[]): TileflowExpression<string>;
347
+ declare function all(first: TileflowDataExpressionInput<boolean>, ...rest: readonly TileflowDataExpressionInput<boolean>[]): TileflowExpression<boolean>;
348
+ declare function any(first: TileflowDataExpressionInput<boolean>, ...rest: readonly TileflowDataExpressionInput<boolean>[]): TileflowExpression<boolean>;
349
+ declare function not(value: TileflowDataExpressionInput<boolean>): TileflowExpression<boolean>;
350
+ declare function has(reference: TileflowDataFieldReference): TileflowExpression<boolean>;
351
+ declare function match<TInput extends boolean | number | string, TOutput>(input: TileflowDataExpressionInput<TInput>, branches: readonly [
352
+ TileflowDataMatchBranch<TInput, TOutput>,
353
+ ...TileflowDataMatchBranch<TInput, TOutput>[]
354
+ ], fallback: TileflowDataExpressionInput<TOutput>): TileflowExpression<TileflowDataExpressionResult<TOutput>>;
355
+ declare function caseValue<T>(branches: readonly [TileflowDataCaseBranch<T>, ...TileflowDataCaseBranch<T>[]], fallback: TileflowDataExpressionInput<T>): TileflowExpression<TileflowDataExpressionResult<T>>;
356
+ declare function step<T>(input: TileflowDataExpressionInput<number>, fallback: TileflowDataExpressionInput<T>, stops: readonly [TileflowDataStop<T>, ...TileflowDataStop<T>[]]): TileflowExpression<TileflowDataExpressionResult<T>>;
357
+ declare function interpolate<T>(interpolation: TileflowDataInterpolation, input: TileflowDataExpressionInput<number>, stops: readonly [TileflowDataStop<T>, ...TileflowDataStop<T>[]]): TileflowExpression<TileflowDataExpressionResult<T>>;
358
+ /**
359
+ * Closed, typed data-expression builders. They preserve semantic field refs
360
+ * and lower to byte-equivalent MapLibre expressions only inside the compiler.
361
+ */
362
+ declare const expr: Readonly<{
363
+ abs: typeof abs;
364
+ add: typeof add;
365
+ all: typeof all;
366
+ any: typeof any;
367
+ case: typeof caseValue;
368
+ coalesce: typeof coalesce;
369
+ concat: typeof concat;
370
+ divide: typeof divide;
371
+ eq: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
372
+ get: typeof get;
373
+ gt: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
374
+ gte: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
375
+ has: typeof has;
376
+ id: typeof id;
377
+ featureState: typeof featureState;
378
+ globalState: typeof globalState;
379
+ interpolate: typeof interpolate;
380
+ let: typeof letValue;
381
+ literal: typeof literal;
382
+ lt: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
383
+ lte: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
384
+ match: typeof match;
385
+ max: typeof maximum;
386
+ min: typeof minimum;
387
+ modulo: typeof modulo;
388
+ multiply: typeof multiply;
389
+ ne: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
390
+ not: typeof not;
391
+ step: typeof step;
392
+ subtract: typeof subtract;
393
+ toBoolean: typeof toBoolean;
394
+ toNumber: typeof toNumber;
395
+ toString: typeof toString;
396
+ var: typeof variable;
397
+ zoom: typeof zoom;
398
+ }>;
399
+
400
+ declare const tileflowRenderStackRenderers: readonly ["background", "circle", "extrusion", "fill", "line", "symbol"];
401
+ declare const tileflowRenderSelectorKinds: readonly ["all", "any", "compare", "geometry", "has", "in", "literal", "match", "not", "step"];
402
+ declare const tileflowRenderSelectorComparisons: readonly ["eq", "gt", "gte", "lt", "lte", "ne"];
403
+ declare const tileflowRenderSelectorGeometries: readonly ["line", "point", "polygon"];
404
+ declare const tileflowRenderStackLimits: Readonly<{
405
+ readonly maxMatchBranches: 16;
406
+ readonly maxOperations: 64;
407
+ readonly maxRequirements: number;
408
+ readonly maxScalarValues: 16;
409
+ readonly maxSelectorChildren: 16;
410
+ readonly maxSelectorDepth: 64;
411
+ readonly maxSelectorNodes: 256;
412
+ readonly maxStepStops: 16;
413
+ }>;
414
+ /**
415
+ * Where a render pass draws, or where a refinement moves its target: at a band edge, or
416
+ * immediately above or below one semantic target. Operations sharing a placement paint in
417
+ * declaration order, the first lowest.
418
+ */
419
+ type TileflowRenderPlacement = TileflowBandPlacement | {
420
+ readonly above: string;
421
+ readonly below?: never;
422
+ } | {
423
+ readonly above?: never;
424
+ readonly below: string;
136
425
  };
137
- type TileflowManifest = {
138
- version: 1;
139
- tileBaseUrl: string;
140
- styles: Record<string, string>;
141
- maps: Record<string, string>;
142
- };
143
- type MapLibreStyle = {
144
- version: 8;
145
- name: string;
146
- glyphs?: string;
147
- sprite?: string;
148
- sources: Record<string, Record<string, unknown>>;
149
- layers: Array<Record<string, unknown>>;
150
- terrain?: Record<string, unknown>;
151
- metadata?: Record<string, unknown>;
152
- };
153
- type ValidationMessage = {
154
- level: 'error' | 'warning';
426
+ type TileflowRenderFeature = keyof OpenMapTilesLayerBindings;
427
+ type TileflowRenderField = keyof OpenMapTilesFieldBindings;
428
+ type TileflowRenderScalar = boolean | number | string;
429
+ type TileflowRenderGeometry = (typeof tileflowRenderSelectorGeometries)[number];
430
+ type TileflowRenderComparison = (typeof tileflowRenderSelectorComparisons)[number];
431
+ type TileflowNormalizedRenderField = {
432
+ /** Convert the bound field before comparing it. */
433
+ readonly coerce?: 'number';
434
+ /** Coalesced value, or the numeric conversion fallback when `coerce` is `number`. */
435
+ readonly fallback?: TileflowRenderScalar;
436
+ readonly field: TileflowRenderField;
437
+ };
438
+ type TileflowRenderSelector = {
439
+ readonly kind: 'all' | 'any';
440
+ readonly selectors: readonly TileflowRenderSelector[];
441
+ } | (TileflowNormalizedRenderField & {
442
+ readonly kind: 'compare';
443
+ readonly operator: TileflowRenderComparison;
444
+ readonly value: TileflowRenderScalar;
445
+ }) | {
446
+ readonly geometry: TileflowRenderGeometry;
447
+ readonly kind: 'geometry';
448
+ } | {
449
+ readonly field: TileflowRenderField;
450
+ readonly kind: 'has';
451
+ } | (TileflowNormalizedRenderField & {
452
+ readonly kind: 'in';
453
+ readonly values: readonly TileflowRenderScalar[];
454
+ }) | {
455
+ readonly kind: 'literal';
456
+ readonly value: boolean;
457
+ } | (TileflowNormalizedRenderField & {
458
+ readonly branches: readonly {
459
+ readonly result: boolean;
460
+ readonly values: readonly TileflowRenderScalar[];
461
+ }[];
462
+ readonly kind: 'match';
463
+ readonly otherwise: boolean;
464
+ }) | {
465
+ readonly kind: 'not';
466
+ readonly selector: TileflowRenderSelector;
467
+ } | {
468
+ readonly fallback: TileflowRenderSelector;
469
+ readonly kind: 'step';
470
+ readonly stops: readonly {
471
+ readonly selector: TileflowRenderSelector;
472
+ readonly zoom: number;
473
+ }[];
474
+ };
475
+ type TileflowRenderVisibilityGroup = 'building';
476
+ type TileflowRenderStyle<TStyle> = TStyle & {
477
+ /** Runtime-controlled group; hidden initially and toggled without raw metadata authoring. */
478
+ readonly visibilityGroup?: TileflowRenderVisibilityGroup;
479
+ };
480
+ type TileflowRenderPassCommon = {
481
+ /**
482
+ * A band edge, or above/below one semantic target. Passes placed beside a target take its
483
+ * band and, without their own `feature`, its vector data.
484
+ */
485
+ readonly placement: TileflowRenderPlacement;
486
+ /** Additional rendered domains required by this pass. Data `feature` bindings are independent. */
487
+ readonly requirements?: readonly TileflowLayerDomain[];
488
+ };
489
+ type TileflowVectorRenderPass<TRenderer extends string, TStyle> = TileflowRenderPassCommon & {
490
+ readonly feature?: TileflowRenderFeature;
491
+ readonly renderer: TRenderer;
492
+ readonly selector?: TileflowRenderSelector;
493
+ readonly style: TileflowRenderStyle<TStyle>;
494
+ };
495
+ type TileflowRenderPassInput = (TileflowRenderPassCommon & {
496
+ readonly feature?: never;
497
+ readonly renderer: 'background';
498
+ readonly selector?: never;
499
+ readonly style: TileflowRenderStyle<TileflowBackgroundStyle>;
500
+ }) | TileflowVectorRenderPass<'circle', TileflowCircleStyle> | TileflowVectorRenderPass<'extrusion', TileflowExtrusionStyle> | TileflowVectorRenderPass<'fill', TileflowFillStyle> | TileflowVectorRenderPass<'line', TileflowLineStyle> | TileflowVectorRenderPass<'symbol', TileflowSymbolStyle>;
501
+ type TileflowRenderPass = TileflowRenderPassInput & {
502
+ readonly kind: 'render-pass';
503
+ };
504
+ type TileflowRefinementCommon<TRenderer extends string, TStyle> = {
505
+ /** Moves the target, with every pass placed beside it, to another position. */
506
+ readonly placement?: TileflowRenderPlacement;
507
+ /** Rendered domains required for this refinement's semantic target to exist. */
508
+ readonly requirements?: readonly TileflowLayerDomain[];
509
+ readonly renderer: TRenderer;
510
+ readonly selector?: TileflowRenderSelector;
511
+ readonly style: TileflowRenderStyle<TStyle>;
512
+ readonly target: string;
513
+ };
514
+ /** A refinement that only moves its target, keeping its style and selection. */
515
+ type TileflowPlacementRefinement = {
516
+ readonly placement: TileflowRenderPlacement;
517
+ readonly renderer?: never;
518
+ readonly requirements?: readonly TileflowLayerDomain[];
519
+ readonly selector?: never;
520
+ readonly style?: never;
521
+ readonly target: string;
522
+ };
523
+ type TileflowRenderTargetRefinementInput = (Omit<TileflowRefinementCommon<'background', TileflowBackgroundStyle>, 'selector'> & {
524
+ readonly selector?: never;
525
+ }) | TileflowRefinementCommon<'circle', TileflowCircleStyle> | TileflowRefinementCommon<'extrusion', TileflowExtrusionStyle> | TileflowRefinementCommon<'fill', TileflowFillStyle> | TileflowRefinementCommon<'line', TileflowLineStyle> | TileflowRefinementCommon<'symbol', TileflowSymbolStyle> | TileflowPlacementRefinement;
526
+ type TileflowRenderTargetRefinement = TileflowRenderTargetRefinementInput & {
527
+ readonly kind: 'refine-render-target';
528
+ };
529
+ type TileflowRenderStackOperation = TileflowRenderPass | TileflowRenderTargetRefinement;
530
+ type TileflowNamedRenderStack = Readonly<Record<string, TileflowRenderStackOperation>>;
531
+ type TileflowModuleWithRenderStack<TModule extends {
532
+ readonly type: TileflowLayerDomain;
533
+ }, TStack extends TileflowNamedRenderStack> = TModule & {
534
+ readonly renderStack: TStack;
535
+ };
536
+ /** Define one ownerless render pass. Its owner and stable name are assigned by `withRenderStack`. */
537
+ declare function renderPass(input: TileflowRenderPassInput): TileflowRenderPass;
538
+ /** Define an owner-local refinement without exposing a raw layer patch. */
539
+ declare function refineRenderTarget(input: TileflowRenderTargetRefinementInput): TileflowRenderTargetRefinement;
540
+ /** Attach a named render stack while retaining the module's exact inferred owner and options. */
541
+ declare function withRenderStack<const TModule extends {
542
+ readonly type: TileflowLayerDomain;
543
+ }, const TStack extends TileflowNamedRenderStack>(module: TModule & {
544
+ readonly renderStack?: never;
545
+ }, namedRecord: TStack): TileflowModuleWithRenderStack<TModule, TStack>;
546
+
547
+ /** Internal compiler identity. Authoring maps never select or version this implementation. */
548
+ declare const tileflowSemanticCompilerIdentity: Readonly<{
549
+ readonly name: "tileflow-semantic";
550
+ readonly version: 1;
551
+ }>;
552
+
553
+ declare const tileflowAuthoringManifestSchemaVersion: 2;
554
+ type TileflowAuthoringCommandName = 'explain' | 'inspect' | 'language-manifest' | 'language-schema' | 'semantic-diff' | 'validate';
555
+ type TileflowAuthoringCommandOutputKind = 'command-envelope' | 'raw-authoring-manifest' | 'raw-config-reference';
556
+ type TileflowAuthoringCommand = Readonly<{
557
+ command: string;
558
+ name: TileflowAuthoringCommandName;
559
+ output: string;
560
+ outputKind: TileflowAuthoringCommandOutputKind;
561
+ /** Stable identifier for the exact versioned JSON contract emitted on success. */
562
+ outputSchemaRef: string;
563
+ outputVersion: 1 | 2 | 4;
564
+ purpose: string;
565
+ writes: false;
566
+ }>;
567
+ type TileflowAuthoringExpressionBuilder = Readonly<{
568
+ arguments: readonly string[];
569
+ name: keyof typeof expr;
570
+ returns: string;
571
+ serializedOperator: string;
572
+ }>;
573
+ type TileflowAuthoringOperation = Readonly<{
574
+ api: string;
575
+ description: string;
576
+ name: 'define-map' | 'data-expression' | 'disable-domain' | 'hosted-source' | 'maplibre-overlay' | 'remove-resource' | 'extend-map' | 'refine-domain' | 'refine-render-target' | 'render-pass' | 'reset-value' | 'replace-domain';
577
+ scope: 'domain' | 'expression' | 'map' | 'render-stack' | 'resource';
578
+ }>;
579
+ type TileflowAuthoringManifestDomain = Readonly<{
580
+ api: string;
581
+ authoringSchemaRef: string;
582
+ dependencies: Readonly<{
583
+ modules: readonly TileflowSemanticModuleName[];
584
+ services: readonly string[];
585
+ }>;
586
+ name: TileflowSemanticModuleName;
587
+ optionsSchemaRef: string;
588
+ order: number;
589
+ patchSchemaRef: string;
590
+ provides: readonly string[];
591
+ resolvedSchemaRef: string;
592
+ targetDiscovery: Readonly<{
593
+ command: 'tileflow explain --json';
594
+ domain: TileflowSemanticModuleName;
595
+ reportPath: 'compilation.report.domains[].targets';
596
+ }>;
597
+ }>;
598
+ type TileflowAuthoringManifest = Readonly<{
599
+ compilation: Readonly<{
600
+ diagnostic: Readonly<{
601
+ optional: readonly ['domain', 'path', 'suggestion', 'target'];
602
+ phases: typeof tileflowCompilationPhases;
603
+ required: readonly ['code', 'message', 'phase', 'severity'];
604
+ severities: readonly ['error', 'warning'];
605
+ }>;
606
+ report: Readonly<{
607
+ domain: Readonly<{
608
+ optional: readonly ['suppressionReason'];
609
+ required: readonly [
610
+ 'contributionCount',
611
+ 'name',
612
+ 'renderOperationCount',
613
+ 'status',
614
+ 'targets'
615
+ ];
616
+ statuses: readonly ['emitted', 'suppressed'];
617
+ suppressionReasons: readonly ['disabled', 'no-contributions'];
618
+ }>;
619
+ optional: readonly ['decisions', 'provenance', 'requirements', 'theme'];
620
+ decisions: Readonly<{
621
+ required: readonly ['path', 'source', 'value', 'reason', 'override'];
622
+ sources: readonly ['default', 'map', 'theme', 'derived'];
623
+ scope: 'color-roles-and-selected-module-policies';
624
+ }>;
625
+ planner: Readonly<{
626
+ optional: readonly ['candidateCount', 'selectedCount'];
627
+ required: readonly ['inputCount', 'outputCount', 'stage'];
628
+ stages: typeof tileflowCompilationPlannerStages;
629
+ }>;
630
+ required: readonly ['domains', 'map', 'planner', 'schemaVersion', 'targets'];
631
+ schemaVersion: typeof tileflowCompilationReportSchemaVersion;
632
+ }>;
633
+ physicalInspection: Readonly<{
634
+ addressable: false;
635
+ command: 'tileflow explain --inspection --json';
636
+ mode: 'opt-in-read-only';
637
+ reportPath: 'compilation.report.provenance';
638
+ stability: 'physical-output-only';
639
+ }>;
640
+ result: Readonly<{
641
+ discriminator: 'ok';
642
+ failure: Readonly<{
643
+ forbidden: readonly ['style'];
644
+ ok: false;
645
+ required: readonly ['diagnostics', 'ok', 'report'];
646
+ }>;
647
+ success: Readonly<{
648
+ ok: true;
649
+ required: readonly ['diagnostics', 'ok', 'report', 'style'];
650
+ }>;
651
+ }>;
652
+ }>;
653
+ compiler: Readonly<{
654
+ name: typeof tileflowSemanticCompilerIdentity.name;
655
+ version: typeof tileflowSemanticCompilerIdentity.version;
656
+ }>;
657
+ commands: readonly TileflowAuthoringCommand[];
658
+ domains: readonly TileflowAuthoringManifestDomain[];
659
+ expressions: Readonly<{
660
+ builders: readonly TileflowAuthoringExpressionBuilder[];
661
+ categorySchemaRefs: Readonly<{
662
+ color: '#/$defs/TileflowDataExpressionColor';
663
+ image: '#/$defs/TileflowDataExpressionImage';
664
+ number: '#/$defs/TileflowDataExpressionNumber';
665
+ structural: '#/$defs/TileflowDataExpressionStructural';
666
+ }>;
667
+ limits: typeof tileflowDataExpressionLimits;
668
+ fieldReference: 'field(name)';
669
+ }>;
670
+ language: 'tileflow-semantic-v1';
671
+ themes: Readonly<{
672
+ api: 'defineTheme(definition) or defineTheme(base, definition)';
673
+ requiredColorRoles: typeof tileflowRequiredThemeColorRoles;
674
+ lightingReset: 'reset() removes inherited lighting, sun, ambient, or individual light properties during defineTheme composition';
675
+ timeOfDay: 'optional; an omitted catalog adds no variants or clock';
676
+ decisionReport: 'compilation.report.decisions';
677
+ }>;
678
+ operations: readonly TileflowAuthoringOperation[];
679
+ renderStack: Readonly<{
680
+ comparisons: readonly string[];
681
+ features: readonly string[];
682
+ fields: readonly string[];
683
+ geometries: readonly string[];
684
+ limits: typeof tileflowRenderStackLimits;
685
+ operationNamePattern: string;
686
+ placements: Readonly<{
687
+ bands: readonly string[];
688
+ targets: readonly string[];
689
+ }>;
690
+ renderers: readonly string[];
691
+ selectorKinds: readonly string[];
692
+ targetPattern: string;
693
+ }>;
694
+ resources: Readonly<{
695
+ hostedSources: Readonly<{
696
+ api: 'hostedTileset({ tileset, local, attribution, type?, tileSize? })';
697
+ localResolution: 'explicit-relative-pmtiles';
698
+ maxPerMap: typeof tileflowHostedSourceLimit;
699
+ identity: 'keyed-source-id-and-team-local-tileset';
700
+ }>;
701
+ overlays: Readonly<{
702
+ api: 'maplibreOverlay({ source, placement, layers })';
703
+ layers: 'ordered-maplibre-style-layers-without-source';
704
+ placement: typeof tileflowOverlayPlacements;
705
+ replacement: 'atomic-by-overlay-id';
706
+ }>;
707
+ removal: 'remove()';
708
+ }>;
709
+ resolution: Readonly<{
710
+ arrays: 'replace';
711
+ domains: 'replace-refine-disable-reset';
712
+ identity: 'leaf-owned';
713
+ inheritance: Readonly<{
714
+ maxDepth: typeof tileflowMapDefaultMaxDepth;
715
+ }>;
716
+ keyedResources: 'merge-replace-remove';
717
+ namedRecords: 'merge-by-key';
718
+ records: 'deep-merge';
719
+ scalars: 'replace';
720
+ themes: 'replace-collection';
721
+ view: 'deep-merge';
722
+ }>;
723
+ schemaVersion: typeof tileflowAuthoringManifestSchemaVersion;
724
+ schemas: Readonly<{
725
+ authoring: '#/$defs/TileflowAuthoringMap';
726
+ document: 'https://tileflow.dev/schemas/tileflow-config-reference-v4.json';
727
+ modules: '#/$defs/TileflowAuthoringModules';
728
+ resolved: '#/$defs/ResolvedTileflowMap';
729
+ }>;
730
+ workflows: Readonly<{
731
+ author: readonly ['validate', 'inspect', 'explain'];
732
+ discover: readonly ['language-manifest', 'language-schema'];
733
+ review: readonly ['semantic-diff', 'validate', 'explain'];
734
+ }>;
735
+ }>;
736
+ /**
737
+ * Stable, JSON-serializable description of the complete public V1 authoring surface.
738
+ * Domain order and dependencies come directly from the closed compiler registry.
739
+ */
740
+ declare const tileflowAuthoringManifest: TileflowAuthoringManifest;
741
+
742
+ declare const tileflowSemanticDiffSchemaVersion: 1;
743
+ type TileflowSemanticMapIdentity = Readonly<{
744
+ id: string;
745
+ version: number;
746
+ }>;
747
+ type TileflowSemanticJsonValue = boolean | null | number | string | readonly TileflowSemanticJsonValue[] | Readonly<{
748
+ [key: string]: TileflowSemanticJsonValue;
749
+ }>;
750
+ type TileflowSemanticAdd = Readonly<{
751
+ after: TileflowSemanticJsonValue;
752
+ kind: 'add';
753
+ path: string;
754
+ }>;
755
+ type TileflowSemanticRemove = Readonly<{
756
+ before: TileflowSemanticJsonValue;
757
+ kind: 'remove';
155
758
  path: string;
156
- message: string;
759
+ }>;
760
+ type TileflowSemanticChange = Readonly<{
761
+ after: TileflowSemanticJsonValue;
762
+ before: TileflowSemanticJsonValue;
763
+ kind: 'change';
764
+ path: string;
765
+ }>;
766
+ type TileflowSemanticDifference = TileflowSemanticAdd | TileflowSemanticChange | TileflowSemanticRemove;
767
+ type TileflowSemanticDiff = Readonly<{
768
+ changes: readonly TileflowSemanticDifference[];
769
+ from: TileflowSemanticMapIdentity;
770
+ schemaVersion: typeof tileflowSemanticDiffSchemaVersion;
771
+ summary: Readonly<{
772
+ add: number;
773
+ change: number;
774
+ remove: number;
775
+ total: number;
776
+ }>;
777
+ to: TileflowSemanticMapIdentity;
778
+ }>;
779
+ /**
780
+ * Compare the resolved semantic designs of two maps. Identity metadata identifies the endpoints
781
+ * but is intentionally not reported as a cartographic change. Arrays are atomic because map
782
+ * inheritance replaces them rather than merging their members.
783
+ */
784
+ declare function diffTileflowMaps(from: TileflowMap | ResolvedTileflowMap, to: TileflowMap | ResolvedTileflowMap): TileflowSemanticDiff;
785
+
786
+ type TileflowZoomPerformance = {
787
+ activeLayers: number;
788
+ sourceLayers: Record<string, number>;
789
+ styleLayerFamilies: number;
790
+ symbols: number;
791
+ zoom: number;
157
792
  };
158
- type ValidationResult = {
159
- valid: boolean;
160
- messages: ValidationMessage[];
793
+ type TileflowStylePerformance = {
794
+ styleBytes: number;
795
+ totalLayers: number;
796
+ zooms: TileflowZoomPerformance[];
161
797
  };
162
- declare function createStyle(input?: TileflowConfig, options?: TileflowStyleOptions): MapLibreStyle;
163
- declare function createStyleFromProject(projectConfig: TileflowProjectConfig, mapName: string, options?: TileflowStyleOptions): MapLibreStyle;
164
- declare function createManifest(projectConfig: TileflowProjectConfig, options?: {
165
- styleBaseUrl?: string;
166
- tileBaseUrl?: string;
167
- }): TileflowManifest;
168
- declare function getDefaultColors(): TileflowColors;
798
+ /** A deterministic, network-free structural sweep of a compiled style. */
799
+ declare function analyzeTileflowStylePerformance(style: MapLibreStyle, zooms?: readonly number[]): TileflowStylePerformance;
169
800
 
170
- declare function validateConfig(input: unknown): ValidationResult;
801
+ declare const tileflowRouteMetadataKey = "tileflow:route";
802
+ /** The resolved inks of a route, from its outer glow to its bright core. */
803
+ type TileflowRouteInks = Readonly<{
804
+ /** The chosen route's line. */
805
+ line: string;
806
+ /** The edge on each side of the line, which sets it apart from the roads under it. */
807
+ casing: string;
808
+ /** A thin line along the middle of the route. */
809
+ core: string;
810
+ /** A soft halo around the route. */
811
+ glow: string;
812
+ /** Other routes offered beside the chosen one. */
813
+ alternative: string;
814
+ /** Opacity of the glow, from 0 (no glow) to 1. */
815
+ glowOpacity: number;
816
+ /** Opacity of the core, from 0 (no core) to 1. */
817
+ coreOpacity: number;
818
+ }>;
819
+ /** The token each ink is read from; a theme may set any of them. */
820
+ declare const tileflowRouteTokens: Readonly<{
821
+ readonly color: Readonly<{
822
+ line: "route.line";
823
+ casing: "route.casing";
824
+ core: "route.core";
825
+ glow: "route.glow";
826
+ alternative: "route.alternative";
827
+ }>;
828
+ readonly number: Readonly<{
829
+ glowOpacity: "route.glow.opacity";
830
+ coreOpacity: "route.core.opacity";
831
+ }>;
832
+ }>;
833
+ /** The inks of a theme that sets no route tokens: a blue that reads on either kind of map. */
834
+ declare const tileflowDefaultRouteInks: Readonly<Record<TileflowThemeColorScheme, TileflowRouteInks>>;
835
+ /** A resolved theme's route inks: its own `route.*` tokens over its colour scheme's defaults. */
836
+ declare function resolveTileflowRouteInks(theme: ResolvedTileflowTheme): TileflowRouteInks;
171
837
 
172
- declare function defineTileflow(config: TileflowProjectConfig): TileflowProjectConfig;
838
+ /** Style metadata key for notices that must stay visible whenever the map is displayed. */
839
+ declare const tileflowNoticesMetadataKey: "tileflow:notices";
840
+ /**
841
+ * A short plain-text notice the compiled style declares for the sources it names. Runtimes render
842
+ * it on the map, next to the attribution; it never replaces a source's own attribution.
843
+ */
844
+ type TileflowMapNotice = Readonly<{
845
+ id: string;
846
+ sources: readonly string[];
847
+ text: string;
848
+ }>;
849
+ declare const tileflowNoticeLimits: Readonly<{
850
+ maxNotices: 8;
851
+ maxSources: 16;
852
+ maxTextLength: 120;
853
+ }>;
854
+ /** Read bounded notices from style metadata; malformed entries are ignored, never rendered. */
855
+ declare function readTileflowNotices(metadata: unknown): readonly TileflowMapNotice[];
173
856
 
174
- declare function osm(options?: TileflowOsmBasemapOptions): TileflowOsmBasemapConfig;
857
+ /** Style metadata key that names the layers whose Nautical lights flash in their rhythm. */
858
+ declare const tileflowNauticalLightsMetadataKey: "tileflow:nautical-lights";
859
+ /**
860
+ * MapLibre feature-state keys the light layers read. A runtime writes them per light feature; a
861
+ * light without them shows steadily, exactly as a map that is not animated.
862
+ */
863
+ declare const tileflowNauticalLightStates: Readonly<{
864
+ /** Index of the colour shown, into the light's comma-separated `color` list. */
865
+ colour: "tileflowLightColour";
866
+ /** `1` while the light shines, `0` while it is eclipsed, in between for a fixed part. */
867
+ intensity: "tileflowLightIntensity";
868
+ }>;
869
+ /** The opacity, as a share of the light's own opacity, of a light in eclipse. */
870
+ declare const tileflowNauticalLightEclipseOpacity = 0.15;
871
+ /** The light layers of a compiled style and the source features they draw. */
872
+ type TileflowNauticalLights = Readonly<{
873
+ layers: readonly string[];
874
+ source: string;
875
+ sourceLayer: string;
876
+ version: 1;
877
+ }>;
878
+ declare const tileflowNauticalLightsLimits: Readonly<{
879
+ maxLayers: 16;
880
+ }>;
881
+ /** Read the bounded light declaration of style metadata; a malformed one is ignored. */
882
+ declare function readTileflowNauticalLights(metadata: unknown): TileflowNauticalLights | undefined;
883
+ type StyleLayer = Readonly<Record<string, unknown>>;
884
+ /**
885
+ * The light declaration for the compiled layers that read Nautical light states from `sourceId`,
886
+ * or `undefined` when no layer does.
887
+ */
888
+ declare function declareTileflowNauticalLights(layers: readonly StyleLayer[], sourceId: string | undefined, sourceLayer: string): TileflowNauticalLights | undefined;
889
+ /**
890
+ * A copy of `style` in which every light shows steadily: light-state reads become their steady
891
+ * value and the light declaration is removed. Renderers without feature state, such as native
892
+ * ones, draw this copy; it looks exactly like the animated style with no state written.
893
+ */
894
+ declare function steadyTileflowNauticalLights<T extends {
895
+ layers?: unknown;
896
+ metadata?: unknown;
897
+ }>(style: T): T;
898
+
899
+ /** One phase of a light's cycle. */
900
+ type TileflowLightPhase = Readonly<{
901
+ /** Index of the colour shown, into the light's comma-separated `color` list. */
902
+ colour: number;
903
+ /** Seconds, with millisecond precision. */
904
+ duration: number;
905
+ /**
906
+ * `1` while the light shines, `0` while it is eclipsed, and
907
+ * `tileflowLightRhythmConventions.fixedIntensity` for the steady part of a fixed-and-flashing light.
908
+ */
909
+ intensity: number;
910
+ }>;
911
+ /** A light's repeating cycle. Lights with the same `key` flash identically. */
912
+ type TileflowLightRhythm = Readonly<{
913
+ /** A canonical description of the phases; equal rhythms have equal keys. */
914
+ key: string;
915
+ /** Seconds, the sum of the phase durations. */
916
+ period: number;
917
+ phases: readonly TileflowLightPhase[];
918
+ }>;
919
+ /** What the light shows at a moment, and for how many more seconds. */
920
+ type TileflowLightState = Readonly<{
921
+ colour: number;
922
+ intensity: number;
923
+ /** Seconds until the next phase begins; always positive. */
924
+ remaining: number;
925
+ }>;
926
+ /** The `nautical-v1` light fields that define a rhythm; other properties are ignored. */
927
+ type TileflowLightCharacteristic = Readonly<{
928
+ character?: unknown;
929
+ color?: unknown;
930
+ group?: unknown;
931
+ period_s?: unknown;
932
+ sequence?: unknown;
933
+ }>;
934
+ /**
935
+ * The conventions used when a light publishes no `sequence`. Durations are in seconds.
936
+ *
937
+ * - `Fl`: flashes of `min(flash, flashShare × period / flashes)`. Flashes of one group are
938
+ * separated by an eclipse of at most twice the flash, groups of a composite group such as
939
+ * `2+1` by twice that eclipse, and the remainder of the period is the final eclipse.
940
+ * - `LFl`: the same layout with flashes of `longFlash`, or `flashShare × period / flashes` when
941
+ * the period is too short for them.
942
+ * - `Q`, `VQ`, `UQ`: one flash per `quickCycle` (60, 120 and 240 per minute), lit for
943
+ * `quickDuty` of each cycle. Without a group they flash continuously; with a group of `n` they
944
+ * flash `n` times, then stay eclipsed until the period ends.
945
+ * - `IQ`, `IVQ`, `IUQ`: quick flashes for `interruptedShare` of the period, then an eclipse.
946
+ * - `Iso`: light and eclipse of equal length.
947
+ * - `Oc`: eclipses of `occultingShare × period / eclipses`, laid out like `Fl` with light and
948
+ * eclipse exchanged, so the light is always longer than the eclipse.
949
+ * - `Mo`: the Morse letters of `group`, with dots of `morseUnit` (shortened to fit the
950
+ * period), dashes of three units, one unit between signals and three between letters; the
951
+ * remainder of the period, or seven units without one, is the eclipse.
952
+ * - `FFl`: a fixed light at `fixedIntensity` with full-intensity flashes laid out like `Fl`;
953
+ * `F+LFl` does the same with long flashes.
954
+ * - `Q+LFl`, `VQ+LFl`, `UQ+LFl`, `Fl+LFl`: the group of the first part (six quick flashes when
955
+ * absent), then one long flash, then the eclipse.
956
+ * - `Oc+Fl`: drawn as its occulting part.
957
+ * - `Al.<character>`: the rhythm of that character, each lit phase taking the next colour of
958
+ * `color`; `Al` alone shows each colour for an equal share of the period.
959
+ * - Grouped `Q`/`VQ` and `Q+LFl`/`VQ+LFl` without a period use the cardinal-mark periods of
960
+ * `cardinalPeriods`.
961
+ *
962
+ * `F`, an absent or unknown character, a missing period where one is needed, or a layout that
963
+ * does not fit its period leaves the light steady.
964
+ */
965
+ declare const tileflowLightRhythmConventions: Readonly<{
966
+ cardinalPeriods: Readonly<{
967
+ Q: Readonly<{
968
+ 3: 10;
969
+ 6: 15;
970
+ 9: 15;
971
+ }>;
972
+ 'Q+LFl': 15;
973
+ VQ: Readonly<{
974
+ 3: 5;
975
+ 6: 10;
976
+ 9: 10;
977
+ }>;
978
+ 'VQ+LFl': 10;
979
+ }>;
980
+ fixedIntensity: 0.5;
981
+ flash: 1;
982
+ flashShare: 0.3;
983
+ interruptedShare: 0.6;
984
+ longFlash: 2;
985
+ morseUnit: 0.5;
986
+ occultingShare: 0.25;
987
+ quickCycle: Readonly<{
988
+ Q: 1;
989
+ UQ: 0.25;
990
+ VQ: 0.5;
991
+ }>;
992
+ quickDuty: 0.3;
993
+ }>;
994
+ /** Bounds that keep a rhythm drawable and its cost small. */
995
+ declare const tileflowLightRhythmLimits: Readonly<{
996
+ maxPeriod: 600;
997
+ maxPhases: 256;
998
+ maxSequenceLength: 512;
999
+ minPhase: 0.05;
1000
+ }>;
1001
+ /**
1002
+ * The rhythm of one light, or `undefined` when it shows steadily: a fixed light, or one without a
1003
+ * usable characteristic. `sequence` wins when it is well formed; otherwise the rhythm follows
1004
+ * `tileflowLightRhythmConventions`.
1005
+ */
1006
+ declare function tileflowLightRhythm(light: TileflowLightCharacteristic): TileflowLightRhythm | undefined;
1007
+ /** What `rhythm` shows `seconds` after the shared epoch of every rhythm. */
1008
+ declare function tileflowLightStateAt(rhythm: TileflowLightRhythm, seconds: number): TileflowLightState;
1009
+
1010
+ declare const tileflowRoadClasses: readonly ["motorway", "trunk", "primary", "secondary", "tertiary", "minor", "service", "track", "pathway", "footway", "cycleway", "steps", "pedestrian"];
175
1011
 
176
1012
  declare function roads(options?: TileflowRoadsModuleOptions): TileflowRoadsModuleConfig;
177
1013
 
178
- export { type MapLibreStyle, type TileflowBasemapConfig, type TileflowBuildings, type TileflowColorConfig, type TileflowColors, type TileflowConfig, type TileflowDensity, type TileflowFontWeight, type TileflowFonts, type TileflowLabels, type TileflowManifest, type TileflowMapConfig, type TileflowModuleConfig, type TileflowOsmBasemapConfig, type TileflowOsmBasemapOptions, type TileflowPoi, type TileflowProjectConfig, type TileflowProjectThemes, 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 TileflowThemeName, type TileflowTiles, type TileflowTilesetConfig, type TileflowTypography, type TileflowViewConfig, type ValidationMessage, type ValidationResult, createManifest, createStyle, createStyleFromProject, defineTileflow, getDefaultColors, osm, roads, validateConfig };
1014
+ declare function labels(options?: TileflowLabelsModuleOptions): TileflowLabelsModuleConfig;
1015
+
1016
+ /**
1017
+ * Stable built-in POI image convention. A theme token with the declared role
1018
+ * takes precedence; `fallback` is the invariant sprite ID used when omitted.
1019
+ */
1020
+ declare const tileflowPoiImageRoles: Readonly<{
1021
+ readonly 'arts-entertainment': {
1022
+ readonly fallback: "culture";
1023
+ readonly token: "poi.arts-entertainment";
1024
+ };
1025
+ readonly education: {
1026
+ readonly fallback: "education";
1027
+ readonly token: "poi.education";
1028
+ };
1029
+ readonly 'food-drink': {
1030
+ readonly fallback: "food";
1031
+ readonly token: "poi.food-drink";
1032
+ };
1033
+ readonly landmark: {
1034
+ readonly fallback: "culture";
1035
+ readonly token: "poi.landmark";
1036
+ };
1037
+ readonly lodging: {
1038
+ readonly fallback: "lodging";
1039
+ readonly token: "poi.lodging";
1040
+ };
1041
+ readonly medical: {
1042
+ readonly fallback: "health";
1043
+ readonly token: "poi.medical";
1044
+ };
1045
+ readonly 'park-nature': {
1046
+ readonly fallback: "services";
1047
+ readonly token: "poi.park-nature";
1048
+ };
1049
+ readonly 'public-services': {
1050
+ readonly fallback: "services";
1051
+ readonly token: "poi.public-services";
1052
+ };
1053
+ readonly religion: {
1054
+ readonly fallback: "culture";
1055
+ readonly token: "poi.religion";
1056
+ };
1057
+ readonly retail: {
1058
+ readonly fallback: "shopping";
1059
+ readonly token: "poi.retail";
1060
+ };
1061
+ readonly 'sport-leisure': {
1062
+ readonly fallback: "culture";
1063
+ readonly token: "poi.sport-leisure";
1064
+ };
1065
+ readonly transport: {
1066
+ readonly fallback: "major-transit";
1067
+ readonly token: "poi.transport";
1068
+ };
1069
+ readonly 'visitor-amenity': {
1070
+ readonly fallback: "services";
1071
+ readonly token: "poi.visitor-amenity";
1072
+ };
1073
+ }>;
1074
+ /**
1075
+ * World POI types whose pictogram explains them without a name: parking and public toilets.
1076
+ * Applies when a map draws both pictograms and names.
1077
+ */
1078
+ declare const tileflowPoiIconOnlyTypes: readonly ["parking", "parking_garage", "parking_lot", "public_restroom"];
1079
+ declare function poi(options?: TileflowPoiModuleOptions): TileflowPoiModuleConfig;
1080
+
1081
+ /**
1082
+ * Line-fitted text backgrounds through derived glyph stacks.
1083
+ *
1084
+ * MapLibre paints an SDF text halo wherever a glyph's distance value lies between the halo edge,
1085
+ * `(6 - haloWidth / fontScale) / 8`, and the fill edge at 0.75. A derived glyph keeps its source
1086
+ * advance and distance field, and also carries a rectangular cell encoded at distance 0.5. With
1087
+ * `text-halo-width` equal to `text-size / 6`, the halo edge sits at 0.25, so the halo pass paints
1088
+ * exactly those cells: every shaped line receives one strip fitted to its own width. Shaping, line
1089
+ * breaking, collision, anchors and fading remain the renderer's, and no renderer change is needed.
1090
+ *
1091
+ * Cells overlap their neighbours, which keeps strips seamless but requires an opaque colour.
1092
+ *
1093
+ * Glyph units are MapLibre's 24px em. x is relative to a glyph's pen position and y to the line
1094
+ * origin before MapLibre's -17 shaping offset; bitmap row 0, including the 3px border, sits at
1095
+ * y = -20 - top.
1096
+ */
1097
+ /** Metrics a derived stack bakes into its glyphs. Every value is in ems. */
1098
+ type TileflowLineBackgroundMetrics = {
1099
+ /** Must equal the layer's constant `text-letter-spacing`. */
1100
+ letterSpacing: number;
1101
+ /** Must equal the layer's constant `text-line-height`; rows are exactly this tall. */
1102
+ lineHeight: number;
1103
+ /** Strip extension beyond the first and last glyph of each line. */
1104
+ padding: number;
1105
+ };
1106
+ type TileflowLineBackgroundFontStack = {
1107
+ metrics: TileflowLineBackgroundMetrics;
1108
+ source: string;
1109
+ };
1110
+ declare const tileflowLineBackgroundDefaults: Readonly<TileflowLineBackgroundMetrics>;
1111
+ declare const tileflowLineBackgroundLimits: Readonly<{
1112
+ letterSpacing: Readonly<{
1113
+ max: 0.5;
1114
+ min: 0;
1115
+ }>;
1116
+ lineHeight: Readonly<{
1117
+ max: 3;
1118
+ min: 0.8;
1119
+ }>;
1120
+ padding: Readonly<{
1121
+ max: 1;
1122
+ min: 0;
1123
+ }>;
1124
+ }>;
1125
+ /** `text-halo-width` per unit of `text-size` that places the halo edge on the derived cells. */
1126
+ declare const tileflowLineBackgroundHaloRatio: number;
1127
+ /** Rounds metrics to the thousandths a stack name encodes and checks their ranges. */
1128
+ declare function normalizeTileflowLineBackgroundMetrics(metrics?: Partial<TileflowLineBackgroundMetrics>): TileflowLineBackgroundMetrics;
1129
+ /** Names the derived stack for one source stack: `<source> lines-v1-t<ls>-l<lh>-p<pad>`. */
1130
+ declare function createTileflowLineBackgroundFontStack(source: string, metrics?: Partial<TileflowLineBackgroundMetrics>): string;
1131
+ /** Recognizes a derived stack name; returns undefined for ordinary or out-of-range names. */
1132
+ declare function parseTileflowLineBackgroundFontStack(stack: string): TileflowLineBackgroundFontStack | undefined;
1133
+ /**
1134
+ * Scales a lowered MapLibre `text-size` value to the matching `text-halo-width`. Zoom curves keep
1135
+ * their stops, because `zoom` may only be the input of a top-level `interpolate` or `step`.
1136
+ */
1137
+ declare function scaleTileflowTextSizeForLineBackground(size: unknown): unknown;
1138
+ /**
1139
+ * Derives one MapLibre glyph PBF range. Every glyph keeps its id, advance and distance field and
1140
+ * gains the background cell; the range and stack names are preserved.
1141
+ */
1142
+ declare function deriveTileflowLineBackgroundGlyphs(range: Uint8Array, metrics?: Partial<TileflowLineBackgroundMetrics>): Uint8Array;
1143
+
1144
+ declare const tileflowIconPackageFileNames: readonly ["sprite.json", "sprite.png", "sprite@2x.json", "sprite@2x.png"];
1145
+ type TileflowIconPackageFileName = (typeof tileflowIconPackageFileNames)[number];
1146
+ /** Canonical sprite ID shared by authoring, generated manifests, diffs, and runtime indexes. */
1147
+ declare const tileflowIconIdPattern: RegExp;
1148
+ declare const tileflowIconPackageLimits: {
1149
+ readonly decodeConcurrency: 4;
1150
+ readonly maxAtlasDimension: 2048;
1151
+ readonly maxDecodedPixelsPerIcon: 4194304;
1152
+ readonly maxGeneratedFileBytes: number;
1153
+ readonly maxGeneratedPackageBytes: number;
1154
+ readonly maxIconCount: 1000;
1155
+ readonly maxSourceBytes: number;
1156
+ readonly maxSourceFileBytes: number;
1157
+ };
1158
+ /**
1159
+ * Portable compatibility values shared by the public CLI and hosted policy.
1160
+ * Commercial entitlements still belong to the database package.
1161
+ */
1162
+ declare const tileflowHostedAlphaCompatibility: {
1163
+ readonly iconPackages: {
1164
+ readonly maxGeneratedBytesPerProject: number;
1165
+ readonly maxRetainedPerProject: 24;
1166
+ };
1167
+ readonly maxMapsPerDeploy: 20;
1168
+ };
1169
+ declare const tileflowIconPackageContentHashSchema: z.ZodString;
1170
+ declare const tileflowIconIdSchema: z.ZodString;
1171
+ declare const tileflowRenderedIconManifestEntrySchema: z.ZodObject<{
1172
+ name: z.ZodString;
1173
+ appearance: z.ZodOptional<z.ZodObject<{
1174
+ representation: z.ZodLiteral<"sdf">;
1175
+ defaults: z.ZodObject<{
1176
+ color: z.ZodString;
1177
+ haloColor: z.ZodString;
1178
+ haloWidth: z.ZodNumber;
1179
+ haloBlur: z.ZodNumber;
1180
+ }, z.core.$strict>;
1181
+ }, z.core.$strict>>;
1182
+ layout: z.ZodOptional<z.ZodObject<{
1183
+ stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1184
+ stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1185
+ content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1186
+ }, z.core.$strict>>;
1187
+ pixelSha256: z.ZodObject<{
1188
+ oneX: z.ZodString;
1189
+ twoX: z.ZodString;
1190
+ }, z.core.$strict>;
1191
+ }, z.core.$strict>;
1192
+ declare const tileflowIconPackageLabelSchema: z.ZodString;
1193
+ declare const tileflowIconPackageManifestSchema: z.ZodObject<{
1194
+ files: z.ZodTuple<[z.ZodObject<{
1195
+ byteLength: z.ZodNumber;
1196
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1197
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1198
+ sha256: z.ZodString;
1199
+ }, z.core.$strict>, z.ZodObject<{
1200
+ byteLength: z.ZodNumber;
1201
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1202
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1203
+ sha256: z.ZodString;
1204
+ }, z.core.$strict>, z.ZodObject<{
1205
+ byteLength: z.ZodNumber;
1206
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1207
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1208
+ sha256: z.ZodString;
1209
+ }, z.core.$strict>, z.ZodObject<{
1210
+ byteLength: z.ZodNumber;
1211
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1212
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1213
+ sha256: z.ZodString;
1214
+ }, z.core.$strict>], null>;
1215
+ format: z.ZodEnum<{
1216
+ "tileflow-icon-package-v1": "tileflow-icon-package-v1";
1217
+ "tileflow-icon-package-v2": "tileflow-icon-package-v2";
1218
+ }>;
1219
+ iconNames: z.ZodArray<z.ZodString>;
1220
+ renderedIcons: z.ZodArray<z.ZodObject<{
1221
+ name: z.ZodString;
1222
+ appearance: z.ZodOptional<z.ZodObject<{
1223
+ representation: z.ZodLiteral<"sdf">;
1224
+ defaults: z.ZodObject<{
1225
+ color: z.ZodString;
1226
+ haloColor: z.ZodString;
1227
+ haloWidth: z.ZodNumber;
1228
+ haloBlur: z.ZodNumber;
1229
+ }, z.core.$strict>;
1230
+ }, z.core.$strict>>;
1231
+ layout: z.ZodOptional<z.ZodObject<{
1232
+ stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1233
+ stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1234
+ content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1235
+ }, z.core.$strict>>;
1236
+ pixelSha256: z.ZodObject<{
1237
+ oneX: z.ZodString;
1238
+ twoX: z.ZodString;
1239
+ }, z.core.$strict>;
1240
+ }, z.core.$strict>>;
1241
+ sprites: z.ZodObject<{
1242
+ oneX: z.ZodObject<{
1243
+ height: z.ZodNumber;
1244
+ width: z.ZodNumber;
1245
+ pixelRatio: z.ZodLiteral<1>;
1246
+ }, z.core.$strict>;
1247
+ twoX: z.ZodObject<{
1248
+ height: z.ZodNumber;
1249
+ width: z.ZodNumber;
1250
+ pixelRatio: z.ZodLiteral<2>;
1251
+ }, z.core.$strict>;
1252
+ }, z.core.$strict>;
1253
+ }, z.core.$strict>;
1254
+ type TileflowIconPackageManifest = z.infer<typeof tileflowIconPackageManifestSchema>;
1255
+ type TileflowRenderedIconManifestEntry = z.infer<typeof tileflowRenderedIconManifestEntrySchema>;
1256
+ declare function compareCodeUnits(left: string, right: string): number;
1257
+ declare function serializeCanonicalJson(value: unknown): string;
1258
+ declare function serializeTileflowIconPackageManifest(input: TileflowIconPackageManifest): string;
1259
+ declare function sha256Hex(input: string | Uint8Array): Promise<string>;
1260
+ declare function hashTileflowIconPackageManifest(input: TileflowIconPackageManifest): Promise<string>;
1261
+ /**
1262
+ * Hashes the delivered pixels of one rendered icon without including its name.
1263
+ *
1264
+ * The v1 binary frame is the UTF-8 domain `tileflow-rendered-icon-pixels-v1\0`, followed by one
1265
+ * byte for the pixel ratio, unsigned 32-bit big-endian width and height, then row-major RGBA.
1266
+ * Fully transparent pixels have their RGB channels zeroed in a copy before hashing so invisible
1267
+ * decoder data cannot create a visual difference.
1268
+ */
1269
+ declare function hashTileflowRenderedIconPixels(input: {
1270
+ height: number;
1271
+ pixelRatio: 1 | 2;
1272
+ rgba: Uint8Array;
1273
+ width: number;
1274
+ }): Promise<string>;
1275
+
1276
+ declare const tileflowFontBundleLimits: {
1277
+ readonly maxFaceCount: 16;
1278
+ readonly maxFileCount: 32;
1279
+ readonly maxFontFileBytes: number;
1280
+ readonly maxLicenseFileBytes: number;
1281
+ readonly maxManifestBytes: number;
1282
+ readonly maxPackageBytes: number;
1283
+ };
1284
+ declare const tileflowFontBundleContentHashSchema: z.ZodString;
1285
+ declare const tileflowFontBundleManifestSchema: z.ZodObject<{
1286
+ files: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1287
+ byteLength: z.ZodNumber;
1288
+ contentType: z.ZodEnum<{
1289
+ "font/otf": "font/otf";
1290
+ "font/ttf": "font/ttf";
1291
+ "font/woff2": "font/woff2";
1292
+ }>;
1293
+ kind: z.ZodLiteral<"font">;
1294
+ name: z.ZodString;
1295
+ sha256: z.ZodString;
1296
+ }, z.core.$strict>, z.ZodObject<{
1297
+ byteLength: z.ZodNumber;
1298
+ contentType: z.ZodLiteral<"text/plain; charset=utf-8">;
1299
+ kind: z.ZodLiteral<"license">;
1300
+ name: z.ZodString;
1301
+ sha256: z.ZodString;
1302
+ }, z.core.$strict>], "kind">>;
1303
+ fontFaces: z.ZodArray<z.ZodObject<{
1304
+ family: z.ZodString;
1305
+ file: z.ZodString;
1306
+ licenseFile: z.ZodString;
1307
+ style: z.ZodEnum<{
1308
+ italic: "italic";
1309
+ normal: "normal";
1310
+ oblique: "oblique";
1311
+ }>;
1312
+ weight: z.ZodEnum<{
1313
+ 100: "100";
1314
+ 200: "200";
1315
+ 300: "300";
1316
+ 400: "400";
1317
+ 500: "500";
1318
+ 600: "600";
1319
+ 700: "700";
1320
+ 800: "800";
1321
+ 900: "900";
1322
+ }>;
1323
+ }, z.core.$strict>>;
1324
+ format: z.ZodLiteral<"tileflow-font-bundle-v1">;
1325
+ }, z.core.$strict>;
1326
+ type TileflowFontBundleManifest = z.infer<typeof tileflowFontBundleManifestSchema>;
1327
+ type TileflowFontBundleFile = TileflowFontBundleManifest['files'][number];
1328
+ type TileflowFontBundleFontFace = TileflowFontBundleManifest['fontFaces'][number];
1329
+ declare function serializeTileflowFontBundleManifest(input: TileflowFontBundleManifest): string;
1330
+ declare function hashTileflowFontBundleManifest(input: TileflowFontBundleManifest): Promise<string>;
1331
+
1332
+ type TileflowIconManifestDiff = {
1333
+ added: string[];
1334
+ afterBytes: number;
1335
+ beforeBytes: number;
1336
+ modified: string[];
1337
+ removed: string[];
1338
+ unchangedCount: number;
1339
+ };
1340
+ declare function diffTileflowIconPackageManifests(before: TileflowIconPackageManifest | null, after: TileflowIconPackageManifest | null): TileflowIconManifestDiff;
1341
+
1342
+ declare const tileflowIconsLockfileName = "tileflow.icons.lock.json";
1343
+ declare const tileflowIconsLockfileMaximumBytes: number;
1344
+ declare const tileflowIconSetPinSchema: z.ZodObject<{
1345
+ teamId: z.ZodString;
1346
+ setId: z.ZodString;
1347
+ versionId: z.ZodString;
1348
+ version: z.ZodNumber;
1349
+ packageId: z.ZodString;
1350
+ contentHash: z.ZodString;
1351
+ manifest: z.ZodObject<{
1352
+ files: z.ZodTuple<[z.ZodObject<{
1353
+ byteLength: z.ZodNumber;
1354
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1355
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1356
+ sha256: z.ZodString;
1357
+ }, z.core.$strict>, z.ZodObject<{
1358
+ byteLength: z.ZodNumber;
1359
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1360
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1361
+ sha256: z.ZodString;
1362
+ }, z.core.$strict>, z.ZodObject<{
1363
+ byteLength: z.ZodNumber;
1364
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1365
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1366
+ sha256: z.ZodString;
1367
+ }, z.core.$strict>, z.ZodObject<{
1368
+ byteLength: z.ZodNumber;
1369
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1370
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1371
+ sha256: z.ZodString;
1372
+ }, z.core.$strict>], null>;
1373
+ format: z.ZodEnum<{
1374
+ "tileflow-icon-package-v1": "tileflow-icon-package-v1";
1375
+ "tileflow-icon-package-v2": "tileflow-icon-package-v2";
1376
+ }>;
1377
+ iconNames: z.ZodArray<z.ZodString>;
1378
+ renderedIcons: z.ZodArray<z.ZodObject<{
1379
+ name: z.ZodString;
1380
+ appearance: z.ZodOptional<z.ZodObject<{
1381
+ representation: z.ZodLiteral<"sdf">;
1382
+ defaults: z.ZodObject<{
1383
+ color: z.ZodString;
1384
+ haloColor: z.ZodString;
1385
+ haloWidth: z.ZodNumber;
1386
+ haloBlur: z.ZodNumber;
1387
+ }, z.core.$strict>;
1388
+ }, z.core.$strict>>;
1389
+ layout: z.ZodOptional<z.ZodObject<{
1390
+ stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1391
+ stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1392
+ content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1393
+ }, z.core.$strict>>;
1394
+ pixelSha256: z.ZodObject<{
1395
+ oneX: z.ZodString;
1396
+ twoX: z.ZodString;
1397
+ }, z.core.$strict>;
1398
+ }, z.core.$strict>>;
1399
+ sprites: z.ZodObject<{
1400
+ oneX: z.ZodObject<{
1401
+ height: z.ZodNumber;
1402
+ width: z.ZodNumber;
1403
+ pixelRatio: z.ZodLiteral<1>;
1404
+ }, z.core.$strict>;
1405
+ twoX: z.ZodObject<{
1406
+ height: z.ZodNumber;
1407
+ width: z.ZodNumber;
1408
+ pixelRatio: z.ZodLiteral<2>;
1409
+ }, z.core.$strict>;
1410
+ }, z.core.$strict>;
1411
+ }, z.core.$strict>;
1412
+ spriteUrl: z.ZodString;
1413
+ }, z.core.$strict>;
1414
+ declare const tileflowIconsLockfileSchema: z.ZodObject<{
1415
+ lockfileVersion: z.ZodLiteral<1>;
1416
+ sets: z.ZodRecord<z.ZodString, z.ZodObject<{
1417
+ teamId: z.ZodString;
1418
+ setId: z.ZodString;
1419
+ versionId: z.ZodString;
1420
+ version: z.ZodNumber;
1421
+ packageId: z.ZodString;
1422
+ contentHash: z.ZodString;
1423
+ manifest: z.ZodObject<{
1424
+ files: z.ZodTuple<[z.ZodObject<{
1425
+ byteLength: z.ZodNumber;
1426
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1427
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1428
+ sha256: z.ZodString;
1429
+ }, z.core.$strict>, z.ZodObject<{
1430
+ byteLength: z.ZodNumber;
1431
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1432
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1433
+ sha256: z.ZodString;
1434
+ }, z.core.$strict>, z.ZodObject<{
1435
+ byteLength: z.ZodNumber;
1436
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1437
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1438
+ sha256: z.ZodString;
1439
+ }, z.core.$strict>, z.ZodObject<{
1440
+ byteLength: z.ZodNumber;
1441
+ contentType: z.ZodLiteral<"application/json" | "image/png">;
1442
+ name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
1443
+ sha256: z.ZodString;
1444
+ }, z.core.$strict>], null>;
1445
+ format: z.ZodEnum<{
1446
+ "tileflow-icon-package-v1": "tileflow-icon-package-v1";
1447
+ "tileflow-icon-package-v2": "tileflow-icon-package-v2";
1448
+ }>;
1449
+ iconNames: z.ZodArray<z.ZodString>;
1450
+ renderedIcons: z.ZodArray<z.ZodObject<{
1451
+ name: z.ZodString;
1452
+ appearance: z.ZodOptional<z.ZodObject<{
1453
+ representation: z.ZodLiteral<"sdf">;
1454
+ defaults: z.ZodObject<{
1455
+ color: z.ZodString;
1456
+ haloColor: z.ZodString;
1457
+ haloWidth: z.ZodNumber;
1458
+ haloBlur: z.ZodNumber;
1459
+ }, z.core.$strict>;
1460
+ }, z.core.$strict>>;
1461
+ layout: z.ZodOptional<z.ZodObject<{
1462
+ stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1463
+ stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1464
+ content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1465
+ }, z.core.$strict>>;
1466
+ pixelSha256: z.ZodObject<{
1467
+ oneX: z.ZodString;
1468
+ twoX: z.ZodString;
1469
+ }, z.core.$strict>;
1470
+ }, z.core.$strict>>;
1471
+ sprites: z.ZodObject<{
1472
+ oneX: z.ZodObject<{
1473
+ height: z.ZodNumber;
1474
+ width: z.ZodNumber;
1475
+ pixelRatio: z.ZodLiteral<1>;
1476
+ }, z.core.$strict>;
1477
+ twoX: z.ZodObject<{
1478
+ height: z.ZodNumber;
1479
+ width: z.ZodNumber;
1480
+ pixelRatio: z.ZodLiteral<2>;
1481
+ }, z.core.$strict>;
1482
+ }, z.core.$strict>;
1483
+ }, z.core.$strict>;
1484
+ spriteUrl: z.ZodString;
1485
+ }, z.core.$strict>>;
1486
+ }, z.core.$strict>;
1487
+ type TileflowIconSetPin = z.infer<typeof tileflowIconSetPinSchema>;
1488
+ type TileflowIconsLockfileV1 = z.infer<typeof tileflowIconsLockfileSchema>;
1489
+ /** Parse a complete snapshot; no credentials, originals or floating versions belong in a lock. */
1490
+ declare function parseTileflowIconsLockfile(input: unknown, sources?: readonly TileflowIconSource[]): Promise<TileflowIconsLockfileV1>;
1491
+ declare function serializeTileflowIconsLockfile(input: TileflowIconsLockfileV1): Promise<string>;
1492
+
1493
+ /** Bounded JSON parser which rejects duplicate keys, including escaped equivalents. */
1494
+ declare function parseTileflowIconJson(text: string, maximumBytes: number): unknown;
1495
+
1496
+ declare const tileflowIconLayoutFields: {
1497
+ stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1498
+ stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1499
+ content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1500
+ };
1501
+ /** Asset-owned geometry in logical pixels; sprite indexes scale it by pixelRatio. */
1502
+ declare const tileflowIconLayoutSchema: z.ZodObject<{
1503
+ stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1504
+ stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1505
+ content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1506
+ }, z.core.$strict>;
1507
+ type TileflowIconLayoutMetadata = z.infer<typeof tileflowIconLayoutSchema>;
1508
+ declare function assertTileflowIconLayoutBounds(layout: TileflowIconLayoutMetadata, width: number, height: number): void;
1509
+ /** Read only native layout fields; other sprite fields retain their own validation. */
1510
+ declare function readTileflowIconLayout(entry: Partial<TileflowIconLayoutMetadata>): TileflowIconLayoutMetadata | undefined;
1511
+ declare function scaleTileflowIconLayout(layout: TileflowIconLayoutMetadata, scale: number): TileflowIconLayoutMetadata;
1512
+
1513
+ /** A part of a tree: bark, leaves, palm fronds (leaves seen from both sides), or a palm's stem. */
1514
+ declare const tileflowTreeParts: {
1515
+ readonly bark: 0;
1516
+ readonly leaves: 1;
1517
+ readonly fronds: 2;
1518
+ readonly stem: 3;
1519
+ };
1520
+
1521
+ /** Begin/end height fractions, begin/end multipliers and the base-10 curve exponent. */
1522
+ type TileflowModelEmissionGradient = readonly [number, number, number, number, number];
1523
+ type TileflowModelRoleLighting = Readonly<{
1524
+ emissiveStrength: number;
1525
+ emissiveVariation?: number;
1526
+ emissiveColor?: string;
1527
+ emissiveHeight: TileflowModelEmissionGradient;
1528
+ color?: string;
1529
+ colorMix?: number;
1530
+ metallic?: number;
1531
+ roughness?: number;
1532
+ colorVariation?: Readonly<{
1533
+ hue: readonly [number, number];
1534
+ saturation: readonly [number, number];
1535
+ lightness: readonly [number, number];
1536
+ /** Colour factors may be authored in linear light, as in glTF. Defaults to sRGB. */
1537
+ space?: 'srgb' | 'linear';
1538
+ }>;
1539
+ }>;
1540
+ type TileflowBuildingFloodLight = Readonly<{
1541
+ intensity: number;
1542
+ brightnessScale: number;
1543
+ color: string;
1544
+ groundRadius: readonly [number, number];
1545
+ minGroundHeight: number;
1546
+ minWallHeight: number;
1547
+ wallHeightRatio: number;
1548
+ }>;
1549
+
1550
+ /** The style metadata key under which a compiled map describes its 3D buildings. */
1551
+ declare const tileflowBuildingsMetadataKey = "tileflow:buildings";
1552
+ /** A compiled map's 3D buildings, resolved for one theme. */
1553
+ type TileflowBuildings3DDesign = Readonly<{
1554
+ /** The vector source and its layers with the buildings and the places they hold. */
1555
+ source: string;
1556
+ layers: Readonly<{
1557
+ building: string;
1558
+ places?: string;
1559
+ }>;
1560
+ /**
1561
+ * Each building's colour: a CSS colour, or a MapLibre expression over the building's
1562
+ * properties that gives one, as the map colours its 3D buildings (or its roofs).
1563
+ */
1564
+ color: string | readonly unknown[];
1565
+ /** How strongly roof outlines and outer corners catch the light, from 0 to 1. */
1566
+ edges: number;
1567
+ /** Exterior corner radius and roof lighting transition, in metres; 0 keeps sharp edges. */
1568
+ edgeRadius?: number;
1569
+ /** Scene sun lighting by default; `style` uses the native extrusion light. */
1570
+ lighting: 'style' | 'sun';
1571
+ /** Per-building brightness variation, from 0 to 1; 0 preserves the authored colour. */
1572
+ colorVariation: number;
1573
+ /** The authored extrusion's vertical wall gradient. */
1574
+ verticalGradient: boolean;
1575
+ /** Their own colour, drawn unlit; without it they take the building's colour, lightened. */
1576
+ edgeColor?: string;
1577
+ /** How bright the buildings light the street at night, from 0 to 2. */
1578
+ nightLight: number;
1579
+ /** Height-selected light on ordinary buildings and the ground, independent of shop windows. */
1580
+ floodLight?: TileflowBuildingFloodLight;
1581
+ /** Emission by architectural role, independent of model palette slots. */
1582
+ modelLighting?: Readonly<Partial<Record<TileflowModelLightingRole, TileflowModelRoleLighting>>>;
1583
+ /** Invented night windows, lit by rooms: decoration, not data. */
1584
+ windows: boolean;
1585
+ /** Optional decoration on ordinary walls and roofs, independent of model materials. */
1586
+ surfaces?: TileflowBuildingSurfaceDesign;
1587
+ /**
1588
+ * The zoom bands, `[from, to]`, the buildings and the placed models and landmarks come in over:
1589
+ * across its band each fades in and rises from the ground. The renderer's defaults stand for a
1590
+ * band left out.
1591
+ */
1592
+ entrance?: Readonly<{
1593
+ buildings?: readonly [number, number];
1594
+ models?: readonly [number, number];
1595
+ }>;
1596
+ /** Shadows from the sun, and contact shadow at the foot of the walls. */
1597
+ shadows: boolean;
1598
+ occlusion: boolean;
1599
+ /** Strength of prepared model ambient visibility; zero leaves the sky contribution unchanged. */
1600
+ modelOcclusion?: number;
1601
+ /** Building models the map places in its city, each replacing the buildings under it. */
1602
+ models?: readonly TileflowBuildingModelPlacement[];
1603
+ /** The colours of the models' parts; a part without one takes it from the building colour. */
1604
+ modelColors?: Readonly<Partial<Record<TileflowModelPart, string>>>;
1605
+ /**
1606
+ * Tileflow's landmarks, drawn as models in place of the buildings under them: the TileJSON of
1607
+ * their tileset. Without it, the map shows none.
1608
+ */
1609
+ landmarks?: Readonly<{
1610
+ url: string;
1611
+ }>;
1612
+ }>;
1613
+ /** A building model standing in the map's city. */
1614
+ type TileflowBuildingModelPlacement = Readonly<{
1615
+ /** The model's id, its file's name in the map's `models` directories. */
1616
+ model: string;
1617
+ /** Where the prepared model file is served, absolute or relative to the page. */
1618
+ url: string;
1619
+ /** Longitude and latitude of the model's origin, where it stands on the ground. */
1620
+ at: readonly [number, number];
1621
+ /** Degrees clockwise from north that the model's own north is turned to. */
1622
+ heading: number;
1623
+ }>;
1624
+ /**
1625
+ * Reads the 3D buildings a compiled style describes, or undefined when its metadata has none or a
1626
+ * version or shape this Core does not know.
1627
+ */
1628
+ declare function readTileflowBuildings3D(metadata: unknown): TileflowBuildings3DDesign | undefined;
1629
+ /** The most models one map places. */
1630
+ declare const tileflowBuildingModelPlacementLimit = 256;
1631
+ /**
1632
+ * The address a hosted build gives a placement of one of the map's own models: a placeholder that
1633
+ * Tileflow replaces, when the map is deployed, with that model's address in the map's Team.
1634
+ */
1635
+ declare function tileflowTeamModelUrl(model: string): string;
1636
+ /** The Team model a placement's address is the placeholder of, if it is one. */
1637
+ declare function readTileflowTeamModelName(url: string): string | undefined;
1638
+
1639
+ /** The zoom of a landmarks tileset's tiles. */
1640
+ declare const tileflowLandmarkTileZoom = 14;
1641
+ /** The zoom of the regions whose indexes name those tiles. */
1642
+ declare const tileflowLandmarkRegionZoom = 6;
1643
+ /** A landmarks tileset as its TileJSON describes it. */
1644
+ type TileflowLandmarksTileJson = Readonly<{
1645
+ /** Where the TileJSON was read, which relative addresses resolve against. */
1646
+ url: string;
1647
+ /** A tile's address, with `{sha256}` in place of its hash. */
1648
+ tile: string;
1649
+ /** A region index's address, with `{z}`, `{x}` and `{y}`. */
1650
+ region: string;
1651
+ tileZoom: number;
1652
+ regionZoom: number;
1653
+ /** The regions that hold landmarks, as `x/y`. */
1654
+ regions: ReadonlySet<string>;
1655
+ }>;
1656
+ /** A landmark as its region's index names it: where it stands and the footprint it replaces. */
1657
+ type TileflowLandmarkFootprint = Readonly<{
1658
+ id: string;
1659
+ /** Its origin, longitude and latitude. */
1660
+ at: readonly [number, number];
1661
+ /** Degrees clockwise from north. */
1662
+ heading: number;
1663
+ /** Rings as flat `[x, y, ...]` arrays in metres, x east and y north of the origin. */
1664
+ footprint: readonly (readonly number[])[];
1665
+ }>;
1666
+ /** A tile in a region's index: `[x, y, sha256]`, and the landmarks it holds. */
1667
+ type TileflowLandmarkRegionTile = readonly [number, number, string] | readonly [number, number, string, readonly TileflowLandmarkFootprint[]];
1668
+ /** A region's index: the tiles inside it that hold landmarks, by their hash. */
1669
+ type TileflowLandmarkRegion = Readonly<{
1670
+ region: readonly [number, number];
1671
+ /**
1672
+ * Each tile, sorted by x, then y. A written index names every tile's landmarks; an index of the
1673
+ * first format, which did not, is still read.
1674
+ */
1675
+ tiles: readonly TileflowLandmarkRegionTile[];
1676
+ }>;
1677
+ /** The zoom-14 tile a landmark's origin, longitude and latitude, stands in. */
1678
+ declare function tileflowLandmarkTileOf(at: readonly [number, number]): [number, number];
1679
+ /** The region a zoom-14 tile lies in. */
1680
+ declare function tileflowLandmarkRegionOf(tile: readonly [number, number]): [number, number];
1681
+ /**
1682
+ * Writes a region's index as the bytes a tileset serves: canonical JSON, its tiles sorted and each
1683
+ * tile's landmarks sorted by id, footprints in whole decimetres. Throws a `RangeError` when a tile
1684
+ * lies outside the region, appears twice, has no hash or names no landmark, or when a landmark
1685
+ * stands outside its tile or has no valid footprint.
1686
+ */
1687
+ declare function serializeTileflowLandmarkRegion(region: TileflowLandmarkRegion): Uint8Array;
1688
+ /**
1689
+ * Reads a region's index, or undefined when it is not one. An index of the first format names no
1690
+ * landmarks; its tiles come back as `[x, y, sha256]`.
1691
+ */
1692
+ declare function readTileflowLandmarkRegion(json: unknown): TileflowLandmarkRegion | undefined;
1693
+ /** Reads a landmarks tileset's TileJSON, or undefined when it is not one. */
1694
+ declare function readTileflowLandmarksTileJson(json: unknown, url: string): TileflowLandmarksTileJson | undefined;
1695
+
1696
+ /** A model as a file holds it: its id and, in a landmark tile, where it stands. */
1697
+ type TileflowModelEntry = TileflowModel & Readonly<{
1698
+ id: string;
1699
+ /** Longitude and latitude of its origin. */
1700
+ at?: readonly [number, number];
1701
+ /** Degrees clockwise from north its own north is turned to. */
1702
+ heading?: number;
1703
+ }>;
1704
+ /** What compresses a file's buffers: meshoptimizer's encoder, once ready. */
1705
+ type TileflowModelCompressor = Readonly<{
1706
+ reorderMesh(indices: Uint32Array, triangles: boolean, optsize: boolean): [Uint32Array, number];
1707
+ encodeGltfBuffer(source: Uint8Array, count: number, size: number, mode: string): Uint8Array;
1708
+ }>;
1709
+ /** What decompresses them: meshoptimizer's decoder, once ready. */
1710
+ type TileflowModelDecompressor = Readonly<{
1711
+ decodeGltfBuffer(target: Uint8Array, count: number, size: number, source: Uint8Array, mode: string, filter?: string): void;
1712
+ }>;
1713
+ /** The media type of a prepared model file. */
1714
+ declare const tileflowModelContentType = "model/gltf-binary";
1715
+ declare const levelNames: readonly ["near", "mid", "far"];
1716
+ /**
1717
+ * Encodes models as a prepared model file: compressed when given meshoptimizer's encoder, else with
1718
+ * plain buffers of the same layout. Throws a `RangeError` when a model breaks `tileflowModelLimits`.
1719
+ */
1720
+ declare function encodeTileflowModels(models: readonly TileflowModelEntry[], compressor?: TileflowModelCompressor): Uint8Array;
1721
+ /**
1722
+ * Decodes a prepared model file for drawing, or undefined when it is not one or breaks
1723
+ * `tileflowModelLimits`. A compressed file loads meshoptimizer's decoder unless one is given.
1724
+ */
1725
+ declare function decodeTileflowModels(buffer: ArrayBuffer | Uint8Array, decompressor?: TileflowModelDecompressor): Promise<readonly TileflowModelBytes[] | undefined>;
1726
+ /**
1727
+ * The ids of the models a prepared model file holds, in the order of its scene, read from its glTF
1728
+ * header and JSON chunk without decoding a mesh; undefined when it is not a prepared model file. A
1729
+ * server checks an uploaded file with it without running meshoptimizer's decoder.
1730
+ */
1731
+ declare function readTileflowModelFileIds(buffer: ArrayBuffer | Uint8Array): readonly string[] | undefined;
1732
+ /** A prepared model file's name: its id and the start of its SHA-256, so a change is a new name. */
1733
+ declare function tileflowModelFileName(id: string, sha256: string): string;
1734
+ /** What a file holding one model is, in metres, read without decompressing its meshes. */
1735
+ type TileflowModelFileSummary = Readonly<{
1736
+ /** The model's id, as maps name it. */
1737
+ model: string;
1738
+ /** Its levels of detail, nearest first. */
1739
+ levels: readonly Readonly<{
1740
+ level: (typeof levelNames)[number];
1741
+ vertices: number;
1742
+ triangles: number;
1743
+ }>[];
1744
+ /** The nearest level's extent along east, north and up, from the ground. */
1745
+ width: number;
1746
+ depth: number;
1747
+ height: number;
1748
+ /** The base the model stands in for: its rings, their points and their area in square metres. */
1749
+ footprint: Readonly<{
1750
+ rings: number;
1751
+ points: number;
1752
+ area: number;
1753
+ }>;
1754
+ }>;
1755
+ /**
1756
+ * Summarises a prepared file of one model from its glTF JSON alone: its id, the vertices and
1757
+ * triangles of each level, its size and its footprint. It decompresses nothing, so it suits a
1758
+ * server that checks an upload; `undefined` means the file is not a Tileflow model file of exactly
1759
+ * one model.
1760
+ */
1761
+ declare function readTileflowModelFileSummary(buffer: ArrayBuffer | Uint8Array): TileflowModelFileSummary | undefined;
1762
+ /**
1763
+ * The landmarks a landmarks tileset's tile holds, where each stands and the footprint it replaces,
1764
+ * read from its glTF header and JSON chunk without decoding a mesh; undefined when it is not a
1765
+ * prepared model file whose every model stands at a place. A region's index carries them so the
1766
+ * renderer knows a landmark's footprint before its tile arrives.
1767
+ */
1768
+ declare function readTileflowLandmarkTileFootprints(buffer: ArrayBuffer | Uint8Array): readonly TileflowLandmarkFootprint[] | undefined;
1769
+
1770
+ /**
1771
+ * Where light is estimated where the data maps no lamps: `lit` (the default) along the streets and
1772
+ * pavements the data maps as lit; `streets` also along the streets the data says nothing about,
1773
+ * wherever it maps few lamps, which invents light as night windows do; `none` nowhere, so only
1774
+ * mapped lamps shine.
1775
+ */
1776
+ type TileflowStreetLightEstimate = 'streets' | 'lit' | 'none';
1777
+ /** The style metadata key under which a compiled map describes its street lights. */
1778
+ declare const tileflowStreetLightsMetadataKey = "tileflow:street-lights";
1779
+ /** A compiled map's street lights, as the roads module describes them, resolved for one theme. */
1780
+ type TileflowStreetLightsDesign = Readonly<{
1781
+ /** The vector source and its layers with the lamps, the streets and the pavements. */
1782
+ source: string;
1783
+ layers: Readonly<{
1784
+ streetFurniture: string;
1785
+ transportation: string;
1786
+ sidewalk?: string;
1787
+ }>;
1788
+ estimate: TileflowStreetLightEstimate;
1789
+ /** The light of lamps whose data gives no colour, as a CSS colour. */
1790
+ color: string;
1791
+ /** How bright the lights shine, from 0 to 2. */
1792
+ intensity: number;
1793
+ }>;
1794
+ /**
1795
+ * Reads the street lights a compiled style describes, or undefined when its metadata has none or a
1796
+ * version or shape this Core does not know.
1797
+ */
1798
+ declare function readTileflowStreetLights(metadata: unknown): TileflowStreetLightsDesign | undefined;
1799
+
1800
+ type TileflowViewMode = '2d' | '3d';
1801
+ type TileflowVegetationRepresentation = 'none' | 'flat' | '3d';
1802
+ declare const tileflowVegetationDisplayMetadataKey = "tileflow:vegetation-display";
1803
+ /** Display policy, separate from the models' design and the camera's pitch. */
1804
+ type TileflowVegetationDisplay = Readonly<{
1805
+ version: 1;
1806
+ mode: TileflowVegetationMode;
1807
+ fallback: 'flat' | 'none';
1808
+ visible: boolean;
1809
+ /** Authored visibility before the compiler applies the static fallback. */
1810
+ flatLayers: readonly Readonly<{
1811
+ id: string;
1812
+ visible: boolean;
1813
+ }>[];
1814
+ }>;
1815
+ declare function readTileflowVegetationDisplay(metadata: unknown): TileflowVegetationDisplay | undefined;
1816
+ declare function resolveTileflowVegetationRepresentation(policy: TileflowVegetationDisplay | undefined, options: {
1817
+ visible?: boolean | undefined;
1818
+ viewMode?: TileflowViewMode;
1819
+ supports3D: boolean;
1820
+ }): TileflowVegetationRepresentation;
1821
+
1822
+ export { type JoinBoundaryRowsOptions, MapLibreStyle, OpenMapTilesFieldBindings, OpenMapTilesLayerBindings, ResolveMapOptions, ResolvedTileflowMap, ResolvedTileflowTheme, type TileflowAuthoringCommand, type TileflowAuthoringCommandName, type TileflowAuthoringCommandOutputKind, type TileflowAuthoringExpressionBuilder, type TileflowAuthoringManifest, type TileflowAuthoringManifestDomain, type TileflowAuthoringOperation, TileflowBackgroundStyle, TileflowBandPlacement, type TileflowBoundaryChoroplethMetadata, type TileflowBoundaryChoroplethOptions, type TileflowBoundaryChoroplethOutline, TileflowBoundaryClass, TileflowBoundaryClassTier, type TileflowBoundaryCode, TileflowBoundaryFamily, type TileflowBoundaryFeatureKey, type TileflowBoundaryJoinResult, type TileflowBoundaryLookup, type TileflowBoundaryLookupRow, type TileflowBoundaryRow, type TileflowBoundaryValue, type TileflowBoundaryValues, type TileflowBuildingModelPlacement, TileflowBuildingSurfaceDesign, type TileflowBuildings3DDesign, type TileflowChoroplethCategoryScale, type TileflowChoroplethLinearScale, type TileflowChoroplethScale, type TileflowChoroplethStepScale, type TileflowChoroplethStop, TileflowCircleStyle, type TileflowColorExpression, type TileflowDataCaseBranch, type TileflowDataExpressionInput, type TileflowDataExpressionResult, type TileflowDataFieldName, type TileflowDataFieldReference, type TileflowDataFieldValue, type TileflowDataInterpolation, type TileflowDataMatchBranch, type TileflowDataStop, TileflowExtrusionStyle, TileflowFillStyle, TileflowFixedValue, type TileflowFontBundleFile, type TileflowFontBundleFontFace, type TileflowFontBundleManifest, TileflowIconAppearance, type TileflowIconLayoutMetadata, type TileflowIconManifestDiff, type TileflowIconPackageFileName, type TileflowIconPackageManifest, type TileflowIconPreviewPaint, type TileflowIconSetPin, TileflowIconSource, type TileflowIconSpriteIndex, type TileflowIconSpriteIndexEntry, type TileflowIconsLockfileV1, TileflowLabelsModuleConfig, TileflowLabelsModuleOptions, type TileflowLandmarkFootprint, type TileflowLandmarkRegion, type TileflowLandmarkRegionTile, type TileflowLandmarksTileJson, type TileflowLightCharacteristic, type TileflowLightPhase, type TileflowLightRhythm, type TileflowLightState, type TileflowLineBackgroundFontStack, type TileflowLineBackgroundMetrics, TileflowLineStyle, TileflowMap, TileflowMapLibreOverlay, type TileflowMapNotice, TileflowMapResolutionError, TileflowMapScene, TileflowMapShot, TileflowModel, TileflowModelBytes, type TileflowModelCompressor, type TileflowModelDecompressor, type TileflowModelEmissionGradient, type TileflowModelEntry, type TileflowModelFileSummary, TileflowModelLightingRole, TileflowModelPart, type TileflowModuleWithRenderStack, type TileflowNamedRenderStack, type TileflowNauticalLights, type TileflowNumericDataFieldName, TileflowOverlayPlacement, TileflowPoiModuleConfig, TileflowPoiModuleOptions, type TileflowRenderComparison, type TileflowRenderFeature, type TileflowRenderField, type TileflowRenderGeometry, type TileflowRenderPass, type TileflowRenderPassInput, type TileflowRenderPlacement, type TileflowRenderScalar, type TileflowRenderSelector, type TileflowRenderStackOperation, type TileflowRenderTargetRefinement, type TileflowRenderTargetRefinementInput, type TileflowRenderVisibilityGroup, type TileflowRenderedIconManifestEntry, TileflowResolvedMapValidationError, TileflowRoadsModuleConfig, TileflowRoadsModuleOptions, type TileflowRouteInks, type TileflowSemanticAdd, type TileflowSemanticChange, type TileflowSemanticDiff, type TileflowSemanticDifference, type TileflowSemanticJsonValue, type TileflowSemanticMapIdentity, type TileflowSemanticRemove, type TileflowStreetLightsDesign, type TileflowStylePerformance, TileflowSymbolStyle, TileflowThemeColorOperation, TileflowThemeColorScheme, TileflowThemeTokenReference, type TileflowVegetationDisplay, TileflowVegetationMode, type TileflowVegetationRepresentation, type TileflowViewMode, type TileflowZoomPerformance, ValidationMessage, analyzeTileflowStylePerformance, assertTileflowIconLayoutBounds, boundaryChoropleth, choroplethColorExpression, choroplethScale, compareCodeUnits, createBoundaryLookup, createTileflowIconPreviewRuntime, createTileflowLineBackgroundFontStack, declareTileflowNauticalLights, decodeTileflowModels, defineMap, deriveTileflowLineBackgroundGlyphs, diffTileflowIconPackageManifests, diffTileflowMaps, encodeTileflowModels, expr, field, hashTileflowFontBundleManifest, hashTileflowIconPackageManifest, hashTileflowRenderedIconPixels, isTileflowPortableId, isTileflowThemeName, isTileflowWorldReleaseId, joinBoundaryRows, labels, normalizeTileflowLineBackgroundMetrics, parseBoundaryLookupCsv, parseResolvedTileflowMap, parseTileflowIconJson, parseTileflowIconsLockfile, parseTileflowLineBackgroundFontStack, poi, readTileflowBuildings3D, readTileflowIconLayout, readTileflowLandmarkRegion, readTileflowLandmarkTileFootprints, readTileflowLandmarksTileJson, readTileflowModelFileIds, readTileflowModelFileSummary, readTileflowNauticalLights, readTileflowNotices, readTileflowStreetLights, readTileflowTeamModelName, readTileflowVegetationDisplay, refineRenderTarget, renderPass, renderTileflowIconAtlasPixels, resolveMap, resolveTileflowIconPreviewPaint, resolveTileflowRouteInks, resolveTileflowVegetationRepresentation, roads, scaleTileflowIconLayout, scaleTileflowTextSizeForLineBackground, serializeCanonicalJson, serializeTileflowFontBundleManifest, serializeTileflowIconPackageManifest, serializeTileflowIconsLockfile, serializeTileflowLandmarkRegion, sha256Hex, steadyTileflowNauticalLights, tileflowAuthoringManifest, tileflowAuthoringManifestSchemaVersion, tileflowBoundaryChoroplethMetadataKey, tileflowBuildingModelPlacementLimit, tileflowBuildingsMetadataKey, tileflowCompilationPhases, tileflowCompilationPlannerStages, tileflowCompilationReportSchemaVersion, tileflowDefaultRouteInks, tileflowFontBundleContentHashSchema, tileflowFontBundleLimits, tileflowFontBundleManifestSchema, tileflowHostedAlphaCompatibility, tileflowHostedSourceLimit, tileflowIconIdPattern, tileflowIconIdSchema, tileflowIconLayoutFields, tileflowIconLayoutSchema, tileflowIconPackageContentHashSchema, tileflowIconPackageFileNames, tileflowIconPackageLabelSchema, tileflowIconPackageLimits, tileflowIconPackageManifestSchema, tileflowIconSetPinSchema, tileflowIconSpriteIndexEntrySchema, tileflowIconSpriteIndexSchema, tileflowIconsLockfileMaximumBytes, tileflowIconsLockfileName, tileflowIconsLockfileSchema, tileflowLandmarkRegionOf, tileflowLandmarkRegionZoom, tileflowLandmarkTileOf, tileflowLandmarkTileZoom, tileflowLightRhythm, tileflowLightRhythmConventions, tileflowLightRhythmLimits, tileflowLightStateAt, tileflowLineBackgroundDefaults, tileflowLineBackgroundHaloRatio, tileflowLineBackgroundLimits, tileflowMapDefaultMaxDepth, tileflowMaxPitch, tileflowModelContentType, tileflowModelFileName, tileflowNauticalLightEclipseOpacity, tileflowNauticalLightStates, tileflowNauticalLightsLimits, tileflowNauticalLightsMetadataKey, tileflowNoticeLimits, tileflowNoticesMetadataKey, tileflowOverlayPlacements, tileflowPoiIconOnlyTypes, tileflowPoiImageRoles, tileflowPortableIdMaximumLength, tileflowRenderSelectorComparisons, tileflowRenderSelectorGeometries, tileflowRenderSelectorKinds, tileflowRenderStackLimits, tileflowRenderStackRenderers, tileflowRenderedIconManifestEntrySchema, tileflowRequiredThemeColorRoles, tileflowRoadClasses, tileflowRouteMetadataKey, tileflowRouteTokens, tileflowSemanticDiffSchemaVersion, tileflowStreetLightsMetadataKey, tileflowTeamModelUrl, tileflowTreeParts, tileflowVegetationDisplayMetadataKey, tileflowWorldReleaseIdMaximumLength, tileflowWorldReleaseIdMinimumLength, tileflowWorldReleaseIdPattern, tileflowWorldReleaseIdPatternSource, tileflowWorldReleaseIdSchema, withRenderStack };