@tileflow/core 0.1.0-alpha.3 → 0.1.0-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +273 -26
- package/THIRD_PARTY_NOTICES.md +327 -0
- package/dist/browser.d.ts +962 -0
- package/dist/browser.js +6237 -0
- package/dist/build.d.ts +574 -0
- package/dist/build.js +25423 -0
- package/dist/capture-scene-D6soWztE.d.ts +161 -0
- package/dist/capture.d.ts +9 -0
- package/dist/capture.js +276 -0
- package/dist/config-reference.json +32261 -0
- package/dist/icon-composition-BiOTwrvD.d.ts +1331 -0
- package/dist/index.d.ts +1114 -162
- package/dist/index.js +18714 -3479
- package/dist/manifest-types-CTT2eLbp.d.ts +790 -0
- package/dist/manifest.d.ts +9 -0
- package/dist/manifest.js +368 -0
- package/dist/native-profile.d.ts +188 -0
- package/dist/native-profile.js +9316 -0
- package/dist/native.d.ts +355 -0
- package/dist/native.js +5552 -0
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +1317 -0
- package/docs/authoring-model.md +241 -0
- package/docs/capture-scenes.md +36 -0
- package/docs/compiled-style-performance.md +263 -0
- package/docs/data-is-separate-from-design.md +345 -0
- package/docs/globe-atmosphere.md +83 -0
- package/docs/hosted-session-authorization.md +108 -0
- package/docs/map-and-terrain-examples.md +149 -0
- package/docs/map-emphasis.md +89 -0
- package/docs/native-artifact-profile.md +145 -0
- package/docs/native-resource-urls.md +367 -0
- package/docs/public-api-and-browser-subpath.md +93 -0
- package/docs/shared-visual-primitives.md +81 -0
- package/docs/theme-transitions-and-blends.md +221 -0
- package/docs/themes-and-module-styles.md +83 -0
- package/package.json +58 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,172 +1,1124 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
type
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
type
|
|
88
|
-
type
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
1
|
+
import { d as TileflowMap, u as TileflowMapScene, w as ResolveMapOptions, R as ResolvedTileflowMap, x as TileflowIconAppearance, O as OpenMapTilesFieldBindings, y as TileflowLayerDomain, z as TileflowBandPlacement, A as OpenMapTilesLayerBindings, B as tileflowCompilationPhases, C as tileflowCompilationPlannerStages, D as tileflowCompilationReportSchemaVersion, E as TileflowSemanticModuleName, F as tileflowHostedSourceLimit, G as tileflowOverlayPlacements, H as TileflowIconSource } from './icon-composition-BiOTwrvD.js';
|
|
2
|
+
export { I as OpenMapTilesSchema, J as OpenMapTilesSchemaOptions, P as ParkLayerSemantics, K as ResolvedBathymetry, L as ResolvedBathymetryRelief, M as ResolvedMarine, N as ResolvedMarineSource, Q as ResolvedTileflowData, S as ResolvedTileflowTheme, U as ResolvedTileflowThemeTokens, V as TileflowAddressesModuleConfig, W as TileflowAddressesModuleOptions, X as TileflowAerowaysModuleConfig, Y as TileflowAerowaysModuleOptions, Z as TileflowAtmosphere, _ as TileflowAtmosphereOptions, $ as TileflowAuthoringModules, a0 as TileflowBathymetryConfig, a1 as TileflowBathymetryDemSourceIdentity, a2 as TileflowBathymetryDisplay, a3 as TileflowBathymetryOptions, a4 as TileflowBathymetryReliefConfig, a5 as TileflowBoundariesModuleConfig, a6 as TileflowBoundariesModuleOptions, a7 as TileflowBuildingMode, a8 as TileflowBuildingsModuleConfig, a9 as TileflowBuildingsModuleOptions, aa as TileflowCompilationDiagnostic, ab as TileflowCompilationDomainReport, ac as TileflowCompilationFailure, ad as TileflowCompilationOptions, ae as TileflowCompilationPhase, af as TileflowCompilationPlannerDecision, ag as TileflowCompilationPlannerStage, ah as TileflowCompilationReport, ai as TileflowCompilationResult, aj as TileflowCompilationSuccess, h as TileflowDataCompatibilityIssue, ak as TileflowDataConfig, i as TileflowDataFieldRequirement, j as TileflowDataFieldType, al as TileflowDataIdentity, k as TileflowDataLayerRequirement, b as TileflowDataRequirementsV1, am as TileflowDerivedMap, an as TileflowDisableOperation, ao as TileflowFontDirectory, ap as TileflowGlyphs, aq as TileflowHostedSourceCollection, ar as TileflowHostedTilesetSource, as as TileflowHostedTilesetType, a as TileflowIconCompositionV1, at as TileflowIconContributorIdentity, au as TileflowIconDirectory, av as TileflowIconSetError, aw as TileflowIconSetErrorCode, ax as TileflowIconSetReference, ay as TileflowIconSetSource, az as TileflowLandModuleConfig, aA as TileflowLandModuleOptions, aB as TileflowLandcoverClass, aC as TileflowLandformClass, aD as TileflowLandformsModuleConfig, aE as TileflowLandformsModuleOptions, aF as TileflowLanduseClass, aG as TileflowLayerBand, aH as TileflowLocalDirectory, aI as TileflowMapDesign, aJ as TileflowMapIdentity, aK as TileflowMapLibreOverlay, aL as TileflowMapLibreOverlayLayer, aM as TileflowMapTooling, aN as TileflowMarine, aO as TileflowMarineConfig, aP as TileflowMarineMode, aQ as TileflowMarineSourceConfig, aR as TileflowMarineSourceIdentity, aS as TileflowModuleOperation, aT as TileflowModulePatch, aU as TileflowNauticalAreaLabelStyles, aV as TileflowNauticalModuleConfig, aW as TileflowNauticalModuleOptions, l as TileflowObservedDataContractV1, aX as TileflowOverlayCollection, aY as TileflowOverlayPlacement, aZ as TileflowPackageDirectory, a_ as TileflowPreparedIconCapabilities, a$ as TileflowRasterDemSourceRequirementV1, b0 as TileflowRefineOperation, b1 as TileflowRemoveOperation, T as TileflowRenderedIconIdentity, b2 as TileflowReset, b3 as TileflowResolvedThemeSelection, b4 as TileflowSemanticModules, c as TileflowSourceRequirementsV1, b5 as TileflowStandaloneMap, e as TileflowStyleOptions, b6 as TileflowTheme, b7 as TileflowThemeAuditContext, b8 as TileflowThemeAuditDiagnostic, b9 as TileflowThemeAuditError, ba as TileflowThemeAuditScope, bb as TileflowThemeColorScheme, bc as TileflowThemeDefinition, bd as TileflowThemeLighting, be as TileflowThemeName, bf as TileflowThemeTokens, bg as TileflowThemeTypography, bh as TileflowThemeTypographyStyle, bi as TileflowTransitModuleConfig, bj as TileflowTransitModuleOptions, bk as TileflowTransitRailStyle, bl as TileflowVegetationMode, bm as TileflowVegetationModuleConfig, bn as TileflowVegetationModuleOptions, bo as TileflowVegetationThreeDimensionalStyle, bp as TileflowVisualValueCategory, bq as TileflowWaterModuleConfig, br as TileflowWaterModuleOptions, bs as TileflowWaterwayClass, bt as TileflowWorldData, bu as TileflowWorldReleaseReference, bv as TileflowWorldSelection, bw as TileflowWorldV1Schema, bx as VectorTilesData, by as addresses, bz as aeroways, bA as assertTileflowMapThemeValues, bB as assertTileflowSdfPixels, bC as auditTileflowMapThemeValues, bD as auditTileflowThemeValues, bE as bathymetry, bF as boundaries, bG as buildings, bH as classifyTileflowVisualProperty, bI as collectTileflowIconSetReferences, bJ as createStyle, bK as createStyleResult, bL as defineTheme, bM as disable, bN as hashTileflowIconComposition, bO as hostedTileset, bP as iconSet, r as inferTileflowDataRequirements, s as inferTileflowSourceRequirements, bQ as isCanonicalOpenMapTilesSchema, bR as isSafeLocalPmtilesPath, bS as isTileflowCompilationPhase, bT as isTileflowIconSetSource, bU as isTileflowLocalDirectory, bV as land, bW as landforms, bX as maplibreOverlay, bY as nautical, bZ as openMapTiles, b_ as openMapTilesContractVersion, b$ as parseTileflowIconComposition, c0 as parseTileflowMap, c1 as refine, c2 as remove, c3 as reset, c4 as resolveMarine, c5 as resolveThemeSelection, c6 as resolveThemeValues, c7 as resolveTileflowData, c8 as resolveTileflowTheme, c9 as tileflowBandPlacements, ca as tileflowBathymetryDemSourceId, cb as tileflowBathymetrySourceId, cc as tileflowBathymetryV1Schema, cd as tileflowIconAppearanceSchema, ce as tileflowIconAuthorMetadataSchema, cf as tileflowIconCompositionMaximumBytes, cg as tileflowIconCompositionSchema, ch as tileflowIconMetadataFileName, ci as tileflowIconSetIdSchema, cj as tileflowIconSetPackageIdSchema, ck as tileflowIconSetReferenceSchema, cl as tileflowIconSetSourceSchema, cm as tileflowIconSetTeamIdSchema, cn as tileflowIconSetVersionIdSchema, co as tileflowIconSourceLimit, cp as tileflowLandformClasses, cq as tileflowLayerBands, cr as tileflowLocalDirectoryMaximumLength, cs as tileflowLocalDirectoryMessage, ct as tileflowMapIdSchema, cu as tileflowNauticalSourceId, cv as tileflowNauticalV1Schema, cw as tileflowPrimarySourceId, cx as tileflowRenderedIconIdentitySchema, cy as tileflowThemeLimits, cz as tileflowWorld, cA as tileflowWorldGeneration, cB as tileflowWorldTileJsonUrl, cC as tileflowWorldV1Schema, cD as transit, cE as validateTileflowCompiledIconCapabilities, v as validateTileflowDataCompatibility, cF as validateTileflowMap, cG as validateTileflowWorldV1Tilejson, cH as vectorTiles, cI as vegetation, cJ as water } from './icon-composition-BiOTwrvD.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { V as ValidationMessage, f as TileflowExpression, g as TileflowFixedValue, h as TileflowThemeTokenReference, i as TileflowThemeColorOperation, j as TileflowBackgroundStyle, k as TileflowCircleStyle, l as TileflowExtrusionStyle, m as TileflowFillStyle, n as TileflowLineStyle, o as TileflowSymbolStyle, M as MapLibreStyle, p as TileflowRoadsModuleOptions, q as TileflowRoadsModuleConfig, r as TileflowLabelsModuleOptions, s as TileflowLabelsModuleConfig, u as TileflowPoiModuleOptions, v as TileflowPoiModuleConfig } from './manifest-types-CTT2eLbp.js';
|
|
5
|
+
export { w as MapLibreSprite, x as TileflowAerodromeCodeDetail, y as TileflowAlignment, z as TileflowAnalytics, A as TileflowAreaStyle, B as TileflowBackgroundPaint, C as TileflowCirclePaint, D as TileflowColor, E as TileflowColorStyleValue, F as TileflowExtrusionPaint, G as TileflowFillPaint, H as TileflowIconAnchor, I as TileflowIconLayout, J as TileflowIconPaint, K as TileflowIconStyle, L as TileflowIconTextFit, N as TileflowImageStyleValue, O as TileflowLabelDetail, P as TileflowLabelLanguage, Q as TileflowLabelStyles, R as TileflowLayerRange, S as TileflowLight, U as TileflowLineCap, W as TileflowLineHatchStyle, X as TileflowLineJoin, Y as TileflowLineLayout, Z as TileflowLinePaint, _ as TileflowLineStackStyle, $ as TileflowManifestFetchOptions, a0 as TileflowManifestLoadOptions, a1 as TileflowMapMode, a2 as TileflowMapModeOptions, a3 as TileflowMarkerSymbolStyle, a4 as TileflowMountainBikeScale, a5 as TileflowNumberInsetsStyleValue, a6 as TileflowNumberStyleValue, a7 as TileflowPlaceLabelClass, a8 as TileflowPoiCategory, a9 as TileflowPoiCategoryStyle, aa as TileflowPoiColorMode, ab as TileflowPoiDensity, ac as TileflowPriorityOrder, ad as TileflowProjection, ae as TileflowResolvedRuntimeTheme, af as TileflowRoadAreaStyle, ag as TileflowRoadClass, ah as TileflowRoadClassStyle, ai as TileflowRoadCrossingStyle, aj as TileflowRoadDetail, ak as TileflowRoadExtras, al as TileflowRoadHierarchy, am as TileflowRoadLabelDetail, an as TileflowRoadLayerStyle, ao as TileflowRoadModifier, ap as TileflowRoadOutline, aq as TileflowRoadRestriction, ar as TileflowRoadRoundaboutStyle, as as TileflowRoadServiceType, at as TileflowRoadShieldDetail, au as TileflowRoadShieldStyles, av as TileflowRoadSidewalkStyle, aw as TileflowRoadStructure, ax as TileflowRoadTreatmentLayerStyle, ay as TileflowRoadTreatmentLineStyle, az as TileflowRoadTreatmentStyle, aA as TileflowRoadWeight, aB as TileflowRuntimeCenterLike, a as TileflowRuntimeColorScheme, T as TileflowRuntimeManifest, aC as TileflowRuntimeManifestMap, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, aD as TileflowRuntimeSource, aE as TileflowRuntimeSourceValidation, aF as TileflowRuntimeStyle, aG as TileflowRuntimeStyleOptions, d as TileflowRuntimeSystemThemes, aH as TileflowRuntimeViewOptions, aI as TileflowSessionController, aJ as TileflowSessionGrantResponse, aK as TileflowStringStyleValue, aL as TileflowStructuralStyleValue, aM as TileflowStyleFontFace, aN as TileflowStyleValue, aO as TileflowSymbolPlacement, aP as TileflowSymbolPlacementStyle, aQ as TileflowSymbolZOrder, aR as TileflowTerrain, aS as TileflowTerrainConfig, aT as TileflowTerrainContourLabelStyle, aU as TileflowTerrainContourLineStyle, aV as TileflowTerrainContoursConfig, aW as TileflowTerrainEncoding, aX as TileflowTerrainHillshadeStyle, aY as TileflowTerrainLayerRange, aZ as TileflowTerrainMode, a_ as TileflowTextAnchor, a$ as TileflowTextBackground, b0 as TileflowTextJustify, b1 as TileflowTextLayout, b2 as TileflowTextPaint, b3 as TileflowTextStyle, b4 as TileflowThemeBlendSelection, b5 as TileflowThemeColorAlpha, b6 as TileflowThemeColorMix, b7 as TileflowThemeColorValue, b8 as TileflowThemeFontValue, b9 as TileflowThemeImageValue, ba as TileflowThemeNumberValue, bb as TileflowThemeSelection, bc as TileflowThemeTokenCategory, bd as TileflowThemeValue, be as TileflowViewConfig, bf as TileflowWaterLabelClass, bg as TileflowZoomInterpolation, bh as TileflowZoomValue, bi as ValidationResult, bj as assertValidTileflowRuntimeSource, bk as clearTileflowManifestCache, bl as color, bm as createTileflowSessionController, bn as createTileflowSessionId, bo as defaultTileflowManifestUrl, bp as defaultTileflowRuntimeView, bq as fixed, br as getTileflowAnalyticsApiUrl, bs as getTileflowStyleFontFaces, bt as inferTileflowAnalyticsFromStyleUrl, bu as loadTileflowManifest, bv as mergeTileflowAnalytics, bw as nearestTileflowBlendTheme, bx as normalizeTileflowRuntimeCenter, by as normalizeTileflowStaticImageSize, bz as normalizeTileflowUrl, bA as resolveTileflowAnalyticsRequestUrl, bB as resolveTileflowManifestMap, bC as resolveTileflowMapMode, bD as resolveTileflowRuntimeStyle, bE as resolveTileflowRuntimeTheme, bF as resolveTileflowRuntimeThemeBlend, bG as resolveTileflowRuntimeView, bH as resolveTileflowStaticImageUrl, bI as shouldLoadTileflowManifest, bJ as startTileflowSession, bK as tileflowPoiCategories, t as tileflowRuntimeManifestLimits, e as tileflowRuntimeManifestVersion, bL as tileflowStyleFontFaceLimits, bM as tileflowStyleFontFacesMetadataKey, bN as tileflowThemeBlendLimits, bO as tileflowThemeTokenCategories, bP as token, bQ as validateTileflowRuntimeSource, bR as validateTileflowThemeBlendSelection, bS as validateTileflowThemeSelection, bT as zoom } from './manifest-types-CTT2eLbp.js';
|
|
6
|
+
export { N as NormalizedTileflowCaptureScene, a as TileflowCaptureApplicationTarget, b as TileflowCaptureBoundsCamera, c as TileflowCaptureCamera, d as TileflowCaptureCenterCamera, e as TileflowCaptureMapTarget, T as TileflowCaptureScene, f as TileflowCaptureTarget, g as TileflowCaptureViewport, n as normalizeTileflowCaptureId, h as normalizeTileflowCaptureScene, t as tileflowCaptureApplicationTargetSchema, i as tileflowCaptureBoundsCameraSchema, j as tileflowCaptureCameraSchema, k as tileflowCaptureCenterCameraSchema, l as tileflowCaptureIdSchema, m as tileflowCaptureMapTargetSchema, o as tileflowCaptureSceneLimits, p as tileflowCaptureSceneNameSchema, q as tileflowCaptureSceneSchema, r as tileflowCaptureSceneSchemaVersion, s as tileflowCaptureTargetSchema, u as tileflowCaptureViewportSchema } from './capture-scene-D6soWztE.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
|
+
/** Exact immutable release identity contract for the current World V1 product. */
|
|
15
|
+
declare const tileflowWorldReleaseIdMinimumLength: 12;
|
|
16
|
+
declare const tileflowWorldReleaseIdMaximumLength: 128;
|
|
17
|
+
declare const tileflowWorldReleaseIdPatternSource: "^world-v1-[a-z0-9][a-z0-9._-]*[a-z0-9]$";
|
|
18
|
+
declare const tileflowWorldReleaseIdPattern: RegExp;
|
|
19
|
+
/** Validate without trimming, lowercasing, or otherwise normalizing an immutable release ID. */
|
|
20
|
+
declare function isTileflowWorldReleaseId(value: unknown): value is string;
|
|
21
|
+
|
|
22
|
+
declare const tileflowWorldReleaseIdSchema: z.ZodString;
|
|
23
|
+
|
|
24
|
+
type ExactTileflowMap<TContract, TMap extends TContract> = TMap & Record<Exclude<keyof TMap, keyof TContract>, never>;
|
|
25
|
+
type ExactTileflowMapScenes<TMap> = TMap extends {
|
|
26
|
+
scenes: infer TScenes extends Record<string, TileflowMapScene>;
|
|
27
|
+
} ? {
|
|
28
|
+
scenes: {
|
|
29
|
+
[TName in keyof TScenes]: ExactTileflowMap<TileflowMapScene, TScenes[TName]>;
|
|
30
|
+
};
|
|
31
|
+
} : unknown;
|
|
32
|
+
/** Preserve the exact inferred type of a standalone or inherited semantic map. */
|
|
33
|
+
declare function defineMap<const TMap extends TileflowMap>(map: ExactTileflowMap<TileflowMap, TMap> & ExactTileflowMapScenes<TMap>): TMap;
|
|
34
|
+
|
|
35
|
+
declare const tileflowMapDefaultMaxDepth = 64;
|
|
36
|
+
/** Structured authoring failure surfaced unchanged by validate/explain JSON commands. */
|
|
37
|
+
declare class TileflowMapResolutionError extends Error {
|
|
38
|
+
readonly code: string;
|
|
39
|
+
readonly mapId: string;
|
|
40
|
+
readonly path: string;
|
|
41
|
+
constructor(code: string, mapId: string, path: string, message: string);
|
|
42
|
+
}
|
|
43
|
+
/** Resolve an imported map lineage to one standalone authoring map. */
|
|
44
|
+
declare function resolveMap(map: TileflowMap, options?: ResolveMapOptions): ResolvedTileflowMap;
|
|
45
|
+
|
|
46
|
+
/** Portable generated-index shape; geometry and pixel integrity require paired artifact verification. */
|
|
47
|
+
declare const tileflowIconSpriteIndexEntrySchema: z.ZodObject<{
|
|
48
|
+
height: z.ZodNumber;
|
|
49
|
+
width: z.ZodNumber;
|
|
50
|
+
pixelRatio: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
51
|
+
x: z.ZodNumber;
|
|
52
|
+
y: z.ZodNumber;
|
|
53
|
+
sdf: z.ZodOptional<z.ZodLiteral<true>>;
|
|
54
|
+
tileflow: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
representation: z.ZodLiteral<"sdf">;
|
|
56
|
+
defaults: z.ZodObject<{
|
|
57
|
+
color: z.ZodString;
|
|
58
|
+
haloColor: z.ZodString;
|
|
59
|
+
haloWidth: z.ZodNumber;
|
|
60
|
+
haloBlur: z.ZodNumber;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
}, z.core.$strict>>;
|
|
63
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
64
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
65
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
declare const tileflowIconSpriteIndexSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
68
|
+
height: z.ZodNumber;
|
|
69
|
+
width: z.ZodNumber;
|
|
70
|
+
pixelRatio: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
71
|
+
x: z.ZodNumber;
|
|
72
|
+
y: z.ZodNumber;
|
|
73
|
+
sdf: z.ZodOptional<z.ZodLiteral<true>>;
|
|
74
|
+
tileflow: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
representation: z.ZodLiteral<"sdf">;
|
|
76
|
+
defaults: z.ZodObject<{
|
|
77
|
+
color: z.ZodString;
|
|
78
|
+
haloColor: z.ZodString;
|
|
79
|
+
haloWidth: z.ZodNumber;
|
|
80
|
+
haloBlur: z.ZodNumber;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
}, z.core.$strict>>;
|
|
83
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
84
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
85
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
86
|
+
}, z.core.$strict>>;
|
|
87
|
+
type TileflowIconSpriteIndexEntry = z.infer<typeof tileflowIconSpriteIndexEntrySchema>;
|
|
88
|
+
type TileflowIconSpriteIndex = z.infer<typeof tileflowIconSpriteIndexSchema>;
|
|
89
|
+
|
|
90
|
+
type PremultipliedColor = {
|
|
91
|
+
r: number;
|
|
92
|
+
g: number;
|
|
93
|
+
b: number;
|
|
94
|
+
a: number;
|
|
95
|
+
};
|
|
96
|
+
type TileflowIconPreviewPaint = {
|
|
97
|
+
color: PremultipliedColor;
|
|
98
|
+
haloColor: PremultipliedColor;
|
|
99
|
+
haloWidth: number;
|
|
100
|
+
haloBlur: number;
|
|
101
|
+
};
|
|
102
|
+
declare function resolveTileflowIconPreviewPaint(appearance: TileflowIconAppearance): TileflowIconPreviewPaint;
|
|
103
|
+
/** Self-contained runtime for default-appearance previews and static canvas composition. */
|
|
104
|
+
declare function createTileflowIconPreviewRuntime(): {
|
|
105
|
+
render: (rgba: Uint8Array, pixelRatio: number, paint: TileflowIconPreviewPaint) => Uint8ClampedArray;
|
|
106
|
+
};
|
|
107
|
+
/** Preserve RGBA cells and replace only SDF rectangles with their default appearance. */
|
|
108
|
+
declare function renderTileflowIconAtlasPixels(rgba: Uint8Array, width: number, height: number, index: TileflowIconSpriteIndex): Uint8ClampedArray;
|
|
109
|
+
|
|
110
|
+
/** Structured schema failure preserved for CLI/editor diagnostics. */
|
|
111
|
+
declare class TileflowResolvedMapValidationError extends Error {
|
|
112
|
+
readonly code: "CONFIG_INVALID";
|
|
113
|
+
readonly messages: ValidationMessage[];
|
|
114
|
+
readonly phase: "config-validation";
|
|
115
|
+
constructor(name: string, messages: ValidationMessage[]);
|
|
116
|
+
}
|
|
117
|
+
declare function parseResolvedTileflowMap(input: unknown): ResolvedTileflowMap;
|
|
118
|
+
|
|
119
|
+
/** A schema-bound data field whose physical name is assigned only during compilation. */
|
|
120
|
+
type TileflowDataFieldReference<TName extends keyof OpenMapTilesFieldBindings = keyof OpenMapTilesFieldBindings> = Readonly<{
|
|
121
|
+
kind: 'tileflow-data-field';
|
|
122
|
+
name: TName;
|
|
123
|
+
}>;
|
|
124
|
+
type TileflowNumericDataFieldName = 'activityScore' | 'adminLevel' | 'bathymetryMinDepth' | 'bathymetrySortKey' | 'circularClearanceExtraAtZoom15' | 'circularInnerRadiusMeters' | 'circularOuterRadiusMeters' | 'circularRadiusAtZoom15' | 'circularRadiusMeters' | 'classificationConfidence' | 'confidence' | 'circumference' | 'diameterCrown' | 'elevation' | 'elevationFeet' | 'hasBusiness' | 'hasParts' | 'height' | 'hide3d' | 'importanceTier' | 'minHeight' | 'minZoom' | 'oneway' | 'poiFilterRank' | 'poiSizeRank' | 'ramp' | 'rank' | 'refLength' | 'renderHeight' | 'renderMinHeight' | 'renderMinZoom' | 'shieldLineLengthMeters' | 'shieldRank';
|
|
125
|
+
/** Runtime value implied by one registered semantic field, independent of its physical name. */
|
|
126
|
+
type TileflowDataFieldValue<TName extends keyof OpenMapTilesFieldBindings> = TName extends TileflowNumericDataFieldName ? number : string;
|
|
127
|
+
/**
|
|
128
|
+
* Reference a semantic field in a typed expression without capturing an
|
|
129
|
+
* OpenMapTiles property name. The active data schema supplies the physical
|
|
130
|
+
* binding at the final lowering boundary.
|
|
131
|
+
*/
|
|
132
|
+
declare function field<const TName extends keyof OpenMapTilesFieldBindings>(name: TName): TileflowDataFieldReference<TName>;
|
|
133
|
+
|
|
134
|
+
/** The value a themed authoring node produces after theme resolution. */
|
|
135
|
+
type TileflowDataExpressionResult<T> = T extends TileflowFixedValue<infer TValue> ? TValue : T extends TileflowThemeTokenReference<infer TCategory> ? TCategory extends 'number' ? number : string : T extends TileflowThemeColorOperation ? string : T;
|
|
136
|
+
type TileflowDataExpressionInput<T> = TileflowDataFieldReference | TileflowExpression<T> | T;
|
|
137
|
+
type TileflowDataMatchBranch<TInput extends boolean | number | string, TOutput> = Readonly<{
|
|
138
|
+
labels: TInput | readonly TInput[];
|
|
139
|
+
value: TileflowDataExpressionInput<TOutput>;
|
|
140
|
+
}>;
|
|
141
|
+
type TileflowDataCaseBranch<T> = Readonly<{
|
|
142
|
+
value: TileflowDataExpressionInput<T>;
|
|
143
|
+
when: TileflowDataExpressionInput<boolean>;
|
|
144
|
+
}>;
|
|
145
|
+
type TileflowDataInterpolation = Readonly<{
|
|
146
|
+
kind: 'linear';
|
|
147
|
+
}> | Readonly<{
|
|
148
|
+
base: number;
|
|
149
|
+
kind: 'exponential';
|
|
150
|
+
}> | Readonly<{
|
|
151
|
+
kind: 'cubic-bezier';
|
|
152
|
+
x1: number;
|
|
153
|
+
x2: number;
|
|
154
|
+
y1: number;
|
|
155
|
+
y2: number;
|
|
156
|
+
}>;
|
|
157
|
+
type TileflowDataStop<T> = readonly [number, TileflowDataExpressionInput<T>];
|
|
158
|
+
declare const tileflowDataExpressionLimits: Readonly<{
|
|
159
|
+
readonly maxBranches: 16;
|
|
160
|
+
readonly maxOperands: 16;
|
|
161
|
+
readonly maxStops: 16;
|
|
162
|
+
}>;
|
|
163
|
+
declare function get<TName extends TileflowDataFieldReference['name']>(reference: TileflowDataFieldReference<TName>): TileflowExpression<TileflowDataFieldValue<TName>>;
|
|
164
|
+
declare function literal<T>(value: T): TileflowExpression<TileflowDataExpressionResult<T>>;
|
|
165
|
+
declare function zoom(): TileflowExpression<number>;
|
|
166
|
+
declare function id(): TileflowExpression<string | number | null>;
|
|
167
|
+
declare function coalesce<T>(first: TileflowDataExpressionInput<T>, ...rest: readonly TileflowDataExpressionInput<T>[]): TileflowExpression<TileflowDataExpressionResult<T>>;
|
|
168
|
+
declare function toNumber(value: TileflowDataExpressionInput<unknown>, fallback?: TileflowDataExpressionInput<number>): TileflowExpression<number>;
|
|
169
|
+
declare function toBoolean(value: TileflowDataExpressionInput<unknown>, fallback?: TileflowDataExpressionInput<boolean>): TileflowExpression<boolean>;
|
|
170
|
+
declare function toString(value: TileflowDataExpressionInput<unknown>): TileflowExpression<string>;
|
|
171
|
+
declare function featureState(name: string): TileflowExpression<unknown>;
|
|
172
|
+
declare function globalState(name: string): TileflowExpression<unknown>;
|
|
173
|
+
declare function variable<T>(name: string): TileflowExpression<T>;
|
|
174
|
+
declare function letValue<TBinding, TResult>(name: string, value: TileflowDataExpressionInput<TBinding>, body: TileflowDataExpressionInput<TResult>): TileflowExpression<TileflowDataExpressionResult<TResult>>;
|
|
175
|
+
declare function abs(value: TileflowDataExpressionInput<number>): TileflowExpression<number>;
|
|
176
|
+
declare function add(first: TileflowDataExpressionInput<number>, second: TileflowDataExpressionInput<number>, ...rest: readonly TileflowDataExpressionInput<number>[]): TileflowExpression<number>;
|
|
177
|
+
declare function subtract(first: TileflowDataExpressionInput<number>, second: TileflowDataExpressionInput<number>): TileflowExpression<number>;
|
|
178
|
+
declare function divide(dividend: TileflowDataExpressionInput<number>, divisor: TileflowDataExpressionInput<number>): TileflowExpression<number>;
|
|
179
|
+
declare function modulo(dividend: TileflowDataExpressionInput<number>, divisor: TileflowDataExpressionInput<number>): TileflowExpression<number>;
|
|
180
|
+
declare function multiply(first: TileflowDataExpressionInput<number>, second: TileflowDataExpressionInput<number>, ...rest: readonly TileflowDataExpressionInput<number>[]): TileflowExpression<number>;
|
|
181
|
+
declare function minimum(first: TileflowDataExpressionInput<number>, second: TileflowDataExpressionInput<number>, ...rest: readonly TileflowDataExpressionInput<number>[]): TileflowExpression<number>;
|
|
182
|
+
declare function maximum(first: TileflowDataExpressionInput<number>, second: TileflowDataExpressionInput<number>, ...rest: readonly TileflowDataExpressionInput<number>[]): TileflowExpression<number>;
|
|
183
|
+
declare function concat(first: TileflowDataExpressionInput<string>, ...rest: readonly TileflowDataExpressionInput<string>[]): TileflowExpression<string>;
|
|
184
|
+
declare function all(first: TileflowDataExpressionInput<boolean>, ...rest: readonly TileflowDataExpressionInput<boolean>[]): TileflowExpression<boolean>;
|
|
185
|
+
declare function any(first: TileflowDataExpressionInput<boolean>, ...rest: readonly TileflowDataExpressionInput<boolean>[]): TileflowExpression<boolean>;
|
|
186
|
+
declare function not(value: TileflowDataExpressionInput<boolean>): TileflowExpression<boolean>;
|
|
187
|
+
declare function has(reference: TileflowDataFieldReference): TileflowExpression<boolean>;
|
|
188
|
+
declare function match<TInput extends boolean | number | string, TOutput>(input: TileflowDataExpressionInput<TInput>, branches: readonly [
|
|
189
|
+
TileflowDataMatchBranch<TInput, TOutput>,
|
|
190
|
+
...TileflowDataMatchBranch<TInput, TOutput>[]
|
|
191
|
+
], fallback: TileflowDataExpressionInput<TOutput>): TileflowExpression<TileflowDataExpressionResult<TOutput>>;
|
|
192
|
+
declare function caseValue<T>(branches: readonly [TileflowDataCaseBranch<T>, ...TileflowDataCaseBranch<T>[]], fallback: TileflowDataExpressionInput<T>): TileflowExpression<TileflowDataExpressionResult<T>>;
|
|
193
|
+
declare function step<T>(input: TileflowDataExpressionInput<number>, fallback: TileflowDataExpressionInput<T>, stops: readonly [TileflowDataStop<T>, ...TileflowDataStop<T>[]]): TileflowExpression<TileflowDataExpressionResult<T>>;
|
|
194
|
+
declare function interpolate<T>(interpolation: TileflowDataInterpolation, input: TileflowDataExpressionInput<number>, stops: readonly [TileflowDataStop<T>, ...TileflowDataStop<T>[]]): TileflowExpression<TileflowDataExpressionResult<T>>;
|
|
195
|
+
/**
|
|
196
|
+
* Closed, typed data-expression builders. They preserve semantic field refs
|
|
197
|
+
* and lower to byte-equivalent MapLibre expressions only inside the compiler.
|
|
198
|
+
*/
|
|
199
|
+
declare const expr: Readonly<{
|
|
200
|
+
abs: typeof abs;
|
|
201
|
+
add: typeof add;
|
|
202
|
+
all: typeof all;
|
|
203
|
+
any: typeof any;
|
|
204
|
+
case: typeof caseValue;
|
|
205
|
+
coalesce: typeof coalesce;
|
|
206
|
+
concat: typeof concat;
|
|
207
|
+
divide: typeof divide;
|
|
208
|
+
eq: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
|
|
209
|
+
get: typeof get;
|
|
210
|
+
gt: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
|
|
211
|
+
gte: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
|
|
212
|
+
has: typeof has;
|
|
213
|
+
id: typeof id;
|
|
214
|
+
featureState: typeof featureState;
|
|
215
|
+
globalState: typeof globalState;
|
|
216
|
+
interpolate: typeof interpolate;
|
|
217
|
+
let: typeof letValue;
|
|
218
|
+
literal: typeof literal;
|
|
219
|
+
lt: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
|
|
220
|
+
lte: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
|
|
221
|
+
match: typeof match;
|
|
222
|
+
max: typeof maximum;
|
|
223
|
+
min: typeof minimum;
|
|
224
|
+
modulo: typeof modulo;
|
|
225
|
+
multiply: typeof multiply;
|
|
226
|
+
ne: <T>(left: TileflowDataExpressionInput<T>, right: TileflowDataExpressionInput<T>) => TileflowExpression<boolean>;
|
|
227
|
+
not: typeof not;
|
|
228
|
+
step: typeof step;
|
|
229
|
+
subtract: typeof subtract;
|
|
230
|
+
toBoolean: typeof toBoolean;
|
|
231
|
+
toNumber: typeof toNumber;
|
|
232
|
+
toString: typeof toString;
|
|
233
|
+
var: typeof variable;
|
|
234
|
+
zoom: typeof zoom;
|
|
235
|
+
}>;
|
|
236
|
+
|
|
237
|
+
declare const tileflowRenderStackRenderers: readonly ["background", "circle", "extrusion", "fill", "line", "symbol"];
|
|
238
|
+
declare const tileflowRenderSelectorKinds: readonly ["all", "any", "compare", "geometry", "has", "in", "literal", "match", "not", "step"];
|
|
239
|
+
declare const tileflowRenderSelectorComparisons: readonly ["eq", "gt", "gte", "lt", "lte", "ne"];
|
|
240
|
+
declare const tileflowRenderSelectorGeometries: readonly ["line", "point", "polygon"];
|
|
241
|
+
declare const tileflowRenderStackLimits: Readonly<{
|
|
242
|
+
readonly maxMatchBranches: 16;
|
|
243
|
+
readonly maxOperations: 64;
|
|
244
|
+
readonly maxRequirements: number;
|
|
245
|
+
readonly maxScalarValues: 16;
|
|
246
|
+
readonly maxSelectorChildren: 16;
|
|
247
|
+
readonly maxSelectorDepth: 64;
|
|
248
|
+
readonly maxSelectorNodes: 256;
|
|
249
|
+
readonly maxStepStops: 16;
|
|
250
|
+
}>;
|
|
251
|
+
/**
|
|
252
|
+
* Where a render pass draws, or where a refinement moves its target: at a band edge, or
|
|
253
|
+
* immediately above or below one semantic target. Operations sharing a placement paint in
|
|
254
|
+
* declaration order, the first lowest.
|
|
255
|
+
*/
|
|
256
|
+
type TileflowRenderPlacement = TileflowBandPlacement | {
|
|
257
|
+
readonly above: string;
|
|
258
|
+
readonly below?: never;
|
|
259
|
+
} | {
|
|
260
|
+
readonly above?: never;
|
|
261
|
+
readonly below: string;
|
|
262
|
+
};
|
|
263
|
+
type TileflowRenderFeature = keyof OpenMapTilesLayerBindings;
|
|
264
|
+
type TileflowRenderField = keyof OpenMapTilesFieldBindings;
|
|
265
|
+
type TileflowRenderScalar = boolean | number | string;
|
|
266
|
+
type TileflowRenderGeometry = (typeof tileflowRenderSelectorGeometries)[number];
|
|
267
|
+
type TileflowRenderComparison = (typeof tileflowRenderSelectorComparisons)[number];
|
|
268
|
+
type TileflowNormalizedRenderField = {
|
|
269
|
+
/** Convert the bound field before comparing it. */
|
|
270
|
+
readonly coerce?: 'number';
|
|
271
|
+
/** Coalesced value, or the numeric conversion fallback when `coerce` is `number`. */
|
|
272
|
+
readonly fallback?: TileflowRenderScalar;
|
|
273
|
+
readonly field: TileflowRenderField;
|
|
274
|
+
};
|
|
275
|
+
type TileflowRenderSelector = {
|
|
276
|
+
readonly kind: 'all' | 'any';
|
|
277
|
+
readonly selectors: readonly TileflowRenderSelector[];
|
|
278
|
+
} | (TileflowNormalizedRenderField & {
|
|
279
|
+
readonly kind: 'compare';
|
|
280
|
+
readonly operator: TileflowRenderComparison;
|
|
281
|
+
readonly value: TileflowRenderScalar;
|
|
282
|
+
}) | {
|
|
283
|
+
readonly geometry: TileflowRenderGeometry;
|
|
284
|
+
readonly kind: 'geometry';
|
|
285
|
+
} | {
|
|
286
|
+
readonly field: TileflowRenderField;
|
|
287
|
+
readonly kind: 'has';
|
|
288
|
+
} | (TileflowNormalizedRenderField & {
|
|
289
|
+
readonly kind: 'in';
|
|
290
|
+
readonly values: readonly TileflowRenderScalar[];
|
|
291
|
+
}) | {
|
|
292
|
+
readonly kind: 'literal';
|
|
293
|
+
readonly value: boolean;
|
|
294
|
+
} | (TileflowNormalizedRenderField & {
|
|
295
|
+
readonly branches: readonly {
|
|
296
|
+
readonly result: boolean;
|
|
297
|
+
readonly values: readonly TileflowRenderScalar[];
|
|
298
|
+
}[];
|
|
299
|
+
readonly kind: 'match';
|
|
300
|
+
readonly otherwise: boolean;
|
|
301
|
+
}) | {
|
|
302
|
+
readonly kind: 'not';
|
|
303
|
+
readonly selector: TileflowRenderSelector;
|
|
304
|
+
} | {
|
|
305
|
+
readonly fallback: TileflowRenderSelector;
|
|
306
|
+
readonly kind: 'step';
|
|
307
|
+
readonly stops: readonly {
|
|
308
|
+
readonly selector: TileflowRenderSelector;
|
|
309
|
+
readonly zoom: number;
|
|
310
|
+
}[];
|
|
311
|
+
};
|
|
312
|
+
type TileflowRenderVisibilityGroup = 'building';
|
|
313
|
+
type TileflowRenderStyle<TStyle> = TStyle & {
|
|
314
|
+
/** Runtime-controlled group; hidden initially and toggled without raw metadata authoring. */
|
|
315
|
+
readonly visibilityGroup?: TileflowRenderVisibilityGroup;
|
|
316
|
+
};
|
|
317
|
+
type TileflowRenderPassCommon = {
|
|
106
318
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* websites are rejected. Local development (localhost, private network
|
|
110
|
-
* addresses) is always allowed. Leave unset to allow any domain.
|
|
319
|
+
* A band edge, or above/below one semantic target. Passes placed beside a target take its
|
|
320
|
+
* band and, without their own `feature`, its vector data.
|
|
111
321
|
*/
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
};
|
|
131
|
-
type
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
322
|
+
readonly placement: TileflowRenderPlacement;
|
|
323
|
+
/** Additional rendered domains required by this pass. Data `feature` bindings are independent. */
|
|
324
|
+
readonly requirements?: readonly TileflowLayerDomain[];
|
|
325
|
+
};
|
|
326
|
+
type TileflowVectorRenderPass<TRenderer extends string, TStyle> = TileflowRenderPassCommon & {
|
|
327
|
+
readonly feature?: TileflowRenderFeature;
|
|
328
|
+
readonly renderer: TRenderer;
|
|
329
|
+
readonly selector?: TileflowRenderSelector;
|
|
330
|
+
readonly style: TileflowRenderStyle<TStyle>;
|
|
331
|
+
};
|
|
332
|
+
type TileflowRenderPassInput = (TileflowRenderPassCommon & {
|
|
333
|
+
readonly feature?: never;
|
|
334
|
+
readonly renderer: 'background';
|
|
335
|
+
readonly selector?: never;
|
|
336
|
+
readonly style: TileflowRenderStyle<TileflowBackgroundStyle>;
|
|
337
|
+
}) | TileflowVectorRenderPass<'circle', TileflowCircleStyle> | TileflowVectorRenderPass<'extrusion', TileflowExtrusionStyle> | TileflowVectorRenderPass<'fill', TileflowFillStyle> | TileflowVectorRenderPass<'line', TileflowLineStyle> | TileflowVectorRenderPass<'symbol', TileflowSymbolStyle>;
|
|
338
|
+
type TileflowRenderPass = TileflowRenderPassInput & {
|
|
339
|
+
readonly kind: 'render-pass';
|
|
340
|
+
};
|
|
341
|
+
type TileflowRefinementCommon<TRenderer extends string, TStyle> = {
|
|
342
|
+
/** Moves the target, with every pass placed beside it, to another position. */
|
|
343
|
+
readonly placement?: TileflowRenderPlacement;
|
|
344
|
+
/** Rendered domains required for this refinement's semantic target to exist. */
|
|
345
|
+
readonly requirements?: readonly TileflowLayerDomain[];
|
|
346
|
+
readonly renderer: TRenderer;
|
|
347
|
+
readonly selector?: TileflowRenderSelector;
|
|
348
|
+
readonly style: TileflowRenderStyle<TStyle>;
|
|
349
|
+
readonly target: string;
|
|
350
|
+
};
|
|
351
|
+
/** A refinement that only moves its target, keeping its style and selection. */
|
|
352
|
+
type TileflowPlacementRefinement = {
|
|
353
|
+
readonly placement: TileflowRenderPlacement;
|
|
354
|
+
readonly renderer?: never;
|
|
355
|
+
readonly requirements?: readonly TileflowLayerDomain[];
|
|
356
|
+
readonly selector?: never;
|
|
357
|
+
readonly style?: never;
|
|
358
|
+
readonly target: string;
|
|
359
|
+
};
|
|
360
|
+
type TileflowRenderTargetRefinementInput = (Omit<TileflowRefinementCommon<'background', TileflowBackgroundStyle>, 'selector'> & {
|
|
361
|
+
readonly selector?: never;
|
|
362
|
+
}) | TileflowRefinementCommon<'circle', TileflowCircleStyle> | TileflowRefinementCommon<'extrusion', TileflowExtrusionStyle> | TileflowRefinementCommon<'fill', TileflowFillStyle> | TileflowRefinementCommon<'line', TileflowLineStyle> | TileflowRefinementCommon<'symbol', TileflowSymbolStyle> | TileflowPlacementRefinement;
|
|
363
|
+
type TileflowRenderTargetRefinement = TileflowRenderTargetRefinementInput & {
|
|
364
|
+
readonly kind: 'refine-render-target';
|
|
151
365
|
};
|
|
152
|
-
type
|
|
153
|
-
|
|
154
|
-
|
|
366
|
+
type TileflowRenderStackOperation = TileflowRenderPass | TileflowRenderTargetRefinement;
|
|
367
|
+
type TileflowNamedRenderStack = Readonly<Record<string, TileflowRenderStackOperation>>;
|
|
368
|
+
type TileflowModuleWithRenderStack<TModule extends {
|
|
369
|
+
readonly type: TileflowLayerDomain;
|
|
370
|
+
}, TStack extends TileflowNamedRenderStack> = TModule & {
|
|
371
|
+
readonly renderStack: TStack;
|
|
155
372
|
};
|
|
156
|
-
|
|
157
|
-
declare function
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
373
|
+
/** Define one ownerless render pass. Its owner and stable name are assigned by `withRenderStack`. */
|
|
374
|
+
declare function renderPass(input: TileflowRenderPassInput): TileflowRenderPass;
|
|
375
|
+
/** Define an owner-local refinement without exposing a raw layer patch. */
|
|
376
|
+
declare function refineRenderTarget(input: TileflowRenderTargetRefinementInput): TileflowRenderTargetRefinement;
|
|
377
|
+
/** Attach a named render stack while retaining the module's exact inferred owner and options. */
|
|
378
|
+
declare function withRenderStack<const TModule extends {
|
|
379
|
+
readonly type: TileflowLayerDomain;
|
|
380
|
+
}, const TStack extends TileflowNamedRenderStack>(module: TModule & {
|
|
381
|
+
readonly renderStack?: never;
|
|
382
|
+
}, namedRecord: TStack): TileflowModuleWithRenderStack<TModule, TStack>;
|
|
163
383
|
|
|
164
|
-
|
|
384
|
+
/** Internal compiler identity. Authoring maps never select or version this implementation. */
|
|
385
|
+
declare const tileflowSemanticCompilerIdentity: Readonly<{
|
|
386
|
+
readonly name: "tileflow-semantic";
|
|
387
|
+
readonly version: 1;
|
|
388
|
+
}>;
|
|
165
389
|
|
|
166
|
-
declare
|
|
390
|
+
declare const tileflowAuthoringManifestSchemaVersion: 2;
|
|
391
|
+
type TileflowAuthoringCommandName = 'explain' | 'inspect' | 'language-manifest' | 'language-schema' | 'semantic-diff' | 'validate';
|
|
392
|
+
type TileflowAuthoringCommandOutputKind = 'command-envelope' | 'raw-authoring-manifest' | 'raw-config-reference';
|
|
393
|
+
type TileflowAuthoringCommand = Readonly<{
|
|
394
|
+
command: string;
|
|
395
|
+
name: TileflowAuthoringCommandName;
|
|
396
|
+
output: string;
|
|
397
|
+
outputKind: TileflowAuthoringCommandOutputKind;
|
|
398
|
+
/** Stable identifier for the exact versioned JSON contract emitted on success. */
|
|
399
|
+
outputSchemaRef: string;
|
|
400
|
+
outputVersion: 1 | 2 | 4;
|
|
401
|
+
purpose: string;
|
|
402
|
+
writes: false;
|
|
403
|
+
}>;
|
|
404
|
+
type TileflowAuthoringExpressionBuilder = Readonly<{
|
|
405
|
+
arguments: readonly string[];
|
|
406
|
+
name: keyof typeof expr;
|
|
407
|
+
returns: string;
|
|
408
|
+
serializedOperator: string;
|
|
409
|
+
}>;
|
|
410
|
+
type TileflowAuthoringOperation = Readonly<{
|
|
411
|
+
api: string;
|
|
412
|
+
description: string;
|
|
413
|
+
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';
|
|
414
|
+
scope: 'domain' | 'expression' | 'map' | 'render-stack' | 'resource';
|
|
415
|
+
}>;
|
|
416
|
+
type TileflowAuthoringManifestDomain = Readonly<{
|
|
417
|
+
api: string;
|
|
418
|
+
authoringSchemaRef: string;
|
|
419
|
+
dependencies: Readonly<{
|
|
420
|
+
modules: readonly TileflowSemanticModuleName[];
|
|
421
|
+
services: readonly string[];
|
|
422
|
+
}>;
|
|
423
|
+
name: TileflowSemanticModuleName;
|
|
424
|
+
optionsSchemaRef: string;
|
|
425
|
+
order: number;
|
|
426
|
+
patchSchemaRef: string;
|
|
427
|
+
provides: readonly string[];
|
|
428
|
+
resolvedSchemaRef: string;
|
|
429
|
+
targetDiscovery: Readonly<{
|
|
430
|
+
command: 'tileflow explain --json';
|
|
431
|
+
domain: TileflowSemanticModuleName;
|
|
432
|
+
reportPath: 'compilation.report.domains[].targets';
|
|
433
|
+
}>;
|
|
434
|
+
}>;
|
|
435
|
+
type TileflowAuthoringManifest = Readonly<{
|
|
436
|
+
compilation: Readonly<{
|
|
437
|
+
diagnostic: Readonly<{
|
|
438
|
+
optional: readonly ['domain', 'path', 'suggestion', 'target'];
|
|
439
|
+
phases: typeof tileflowCompilationPhases;
|
|
440
|
+
required: readonly ['code', 'message', 'phase', 'severity'];
|
|
441
|
+
severities: readonly ['error', 'warning'];
|
|
442
|
+
}>;
|
|
443
|
+
report: Readonly<{
|
|
444
|
+
domain: Readonly<{
|
|
445
|
+
optional: readonly ['suppressionReason'];
|
|
446
|
+
required: readonly [
|
|
447
|
+
'contributionCount',
|
|
448
|
+
'name',
|
|
449
|
+
'renderOperationCount',
|
|
450
|
+
'status',
|
|
451
|
+
'targets'
|
|
452
|
+
];
|
|
453
|
+
statuses: readonly ['emitted', 'suppressed'];
|
|
454
|
+
suppressionReasons: readonly ['disabled', 'no-contributions'];
|
|
455
|
+
}>;
|
|
456
|
+
optional: readonly ['provenance', 'requirements', 'theme'];
|
|
457
|
+
planner: Readonly<{
|
|
458
|
+
optional: readonly ['candidateCount', 'selectedCount'];
|
|
459
|
+
required: readonly ['inputCount', 'outputCount', 'stage'];
|
|
460
|
+
stages: typeof tileflowCompilationPlannerStages;
|
|
461
|
+
}>;
|
|
462
|
+
required: readonly ['domains', 'map', 'planner', 'schemaVersion', 'targets'];
|
|
463
|
+
schemaVersion: typeof tileflowCompilationReportSchemaVersion;
|
|
464
|
+
}>;
|
|
465
|
+
physicalInspection: Readonly<{
|
|
466
|
+
addressable: false;
|
|
467
|
+
command: 'tileflow explain --inspection --json';
|
|
468
|
+
mode: 'opt-in-read-only';
|
|
469
|
+
reportPath: 'compilation.report.provenance';
|
|
470
|
+
stability: 'physical-output-only';
|
|
471
|
+
}>;
|
|
472
|
+
result: Readonly<{
|
|
473
|
+
discriminator: 'ok';
|
|
474
|
+
failure: Readonly<{
|
|
475
|
+
forbidden: readonly ['style'];
|
|
476
|
+
ok: false;
|
|
477
|
+
required: readonly ['diagnostics', 'ok', 'report'];
|
|
478
|
+
}>;
|
|
479
|
+
success: Readonly<{
|
|
480
|
+
ok: true;
|
|
481
|
+
required: readonly ['diagnostics', 'ok', 'report', 'style'];
|
|
482
|
+
}>;
|
|
483
|
+
}>;
|
|
484
|
+
}>;
|
|
485
|
+
compiler: Readonly<{
|
|
486
|
+
name: typeof tileflowSemanticCompilerIdentity.name;
|
|
487
|
+
version: typeof tileflowSemanticCompilerIdentity.version;
|
|
488
|
+
}>;
|
|
489
|
+
commands: readonly TileflowAuthoringCommand[];
|
|
490
|
+
domains: readonly TileflowAuthoringManifestDomain[];
|
|
491
|
+
expressions: Readonly<{
|
|
492
|
+
builders: readonly TileflowAuthoringExpressionBuilder[];
|
|
493
|
+
categorySchemaRefs: Readonly<{
|
|
494
|
+
color: '#/$defs/TileflowDataExpressionColor';
|
|
495
|
+
image: '#/$defs/TileflowDataExpressionImage';
|
|
496
|
+
number: '#/$defs/TileflowDataExpressionNumber';
|
|
497
|
+
structural: '#/$defs/TileflowDataExpressionStructural';
|
|
498
|
+
}>;
|
|
499
|
+
limits: typeof tileflowDataExpressionLimits;
|
|
500
|
+
fieldReference: 'field(name)';
|
|
501
|
+
}>;
|
|
502
|
+
language: 'tileflow-semantic-v1';
|
|
503
|
+
operations: readonly TileflowAuthoringOperation[];
|
|
504
|
+
renderStack: Readonly<{
|
|
505
|
+
comparisons: readonly string[];
|
|
506
|
+
features: readonly string[];
|
|
507
|
+
fields: readonly string[];
|
|
508
|
+
geometries: readonly string[];
|
|
509
|
+
limits: typeof tileflowRenderStackLimits;
|
|
510
|
+
operationNamePattern: string;
|
|
511
|
+
placements: Readonly<{
|
|
512
|
+
bands: readonly string[];
|
|
513
|
+
targets: readonly string[];
|
|
514
|
+
}>;
|
|
515
|
+
renderers: readonly string[];
|
|
516
|
+
selectorKinds: readonly string[];
|
|
517
|
+
targetPattern: string;
|
|
518
|
+
}>;
|
|
519
|
+
resources: Readonly<{
|
|
520
|
+
hostedSources: Readonly<{
|
|
521
|
+
api: 'hostedTileset({ tileset, local, attribution, type?, tileSize? })';
|
|
522
|
+
localResolution: 'explicit-relative-pmtiles';
|
|
523
|
+
maxPerMap: typeof tileflowHostedSourceLimit;
|
|
524
|
+
identity: 'keyed-source-id-and-team-local-tileset';
|
|
525
|
+
}>;
|
|
526
|
+
overlays: Readonly<{
|
|
527
|
+
api: 'maplibreOverlay({ source, placement, layers })';
|
|
528
|
+
layers: 'ordered-maplibre-style-layers-without-source';
|
|
529
|
+
placement: typeof tileflowOverlayPlacements;
|
|
530
|
+
replacement: 'atomic-by-overlay-id';
|
|
531
|
+
}>;
|
|
532
|
+
removal: 'remove()';
|
|
533
|
+
}>;
|
|
534
|
+
resolution: Readonly<{
|
|
535
|
+
arrays: 'replace';
|
|
536
|
+
domains: 'replace-refine-disable-reset';
|
|
537
|
+
identity: 'leaf-owned';
|
|
538
|
+
inheritance: Readonly<{
|
|
539
|
+
maxDepth: typeof tileflowMapDefaultMaxDepth;
|
|
540
|
+
}>;
|
|
541
|
+
keyedResources: 'merge-replace-remove';
|
|
542
|
+
namedRecords: 'merge-by-key';
|
|
543
|
+
records: 'deep-merge';
|
|
544
|
+
scalars: 'replace';
|
|
545
|
+
themes: 'replace-collection';
|
|
546
|
+
view: 'deep-merge';
|
|
547
|
+
}>;
|
|
548
|
+
schemaVersion: typeof tileflowAuthoringManifestSchemaVersion;
|
|
549
|
+
schemas: Readonly<{
|
|
550
|
+
authoring: '#/$defs/TileflowAuthoringMap';
|
|
551
|
+
document: 'https://tileflow.dev/schemas/tileflow-config-reference-v4.json';
|
|
552
|
+
modules: '#/$defs/TileflowAuthoringModules';
|
|
553
|
+
resolved: '#/$defs/ResolvedTileflowMap';
|
|
554
|
+
}>;
|
|
555
|
+
workflows: Readonly<{
|
|
556
|
+
author: readonly ['validate', 'inspect', 'explain'];
|
|
557
|
+
discover: readonly ['language-manifest', 'language-schema'];
|
|
558
|
+
review: readonly ['semantic-diff', 'validate', 'explain'];
|
|
559
|
+
}>;
|
|
560
|
+
}>;
|
|
561
|
+
/**
|
|
562
|
+
* Stable, JSON-serializable description of the complete public V1 authoring surface.
|
|
563
|
+
* Domain order and dependencies come directly from the closed compiler registry.
|
|
564
|
+
*/
|
|
565
|
+
declare const tileflowAuthoringManifest: TileflowAuthoringManifest;
|
|
167
566
|
|
|
168
|
-
declare
|
|
567
|
+
declare const tileflowSemanticDiffSchemaVersion: 1;
|
|
568
|
+
type TileflowSemanticMapIdentity = Readonly<{
|
|
569
|
+
id: string;
|
|
570
|
+
version: number;
|
|
571
|
+
}>;
|
|
572
|
+
type TileflowSemanticJsonValue = boolean | null | number | string | readonly TileflowSemanticJsonValue[] | Readonly<{
|
|
573
|
+
[key: string]: TileflowSemanticJsonValue;
|
|
574
|
+
}>;
|
|
575
|
+
type TileflowSemanticAdd = Readonly<{
|
|
576
|
+
after: TileflowSemanticJsonValue;
|
|
577
|
+
kind: 'add';
|
|
578
|
+
path: string;
|
|
579
|
+
}>;
|
|
580
|
+
type TileflowSemanticRemove = Readonly<{
|
|
581
|
+
before: TileflowSemanticJsonValue;
|
|
582
|
+
kind: 'remove';
|
|
583
|
+
path: string;
|
|
584
|
+
}>;
|
|
585
|
+
type TileflowSemanticChange = Readonly<{
|
|
586
|
+
after: TileflowSemanticJsonValue;
|
|
587
|
+
before: TileflowSemanticJsonValue;
|
|
588
|
+
kind: 'change';
|
|
589
|
+
path: string;
|
|
590
|
+
}>;
|
|
591
|
+
type TileflowSemanticDifference = TileflowSemanticAdd | TileflowSemanticChange | TileflowSemanticRemove;
|
|
592
|
+
type TileflowSemanticDiff = Readonly<{
|
|
593
|
+
changes: readonly TileflowSemanticDifference[];
|
|
594
|
+
from: TileflowSemanticMapIdentity;
|
|
595
|
+
schemaVersion: typeof tileflowSemanticDiffSchemaVersion;
|
|
596
|
+
summary: Readonly<{
|
|
597
|
+
add: number;
|
|
598
|
+
change: number;
|
|
599
|
+
remove: number;
|
|
600
|
+
total: number;
|
|
601
|
+
}>;
|
|
602
|
+
to: TileflowSemanticMapIdentity;
|
|
603
|
+
}>;
|
|
604
|
+
/**
|
|
605
|
+
* Compare the resolved semantic designs of two maps. Identity metadata identifies the endpoints
|
|
606
|
+
* but is intentionally not reported as a cartographic change. Arrays are atomic because map
|
|
607
|
+
* inheritance replaces them rather than merging their members.
|
|
608
|
+
*/
|
|
609
|
+
declare function diffTileflowMaps(from: TileflowMap | ResolvedTileflowMap, to: TileflowMap | ResolvedTileflowMap): TileflowSemanticDiff;
|
|
610
|
+
|
|
611
|
+
type TileflowZoomPerformance = {
|
|
612
|
+
activeLayers: number;
|
|
613
|
+
sourceLayers: Record<string, number>;
|
|
614
|
+
styleLayerFamilies: number;
|
|
615
|
+
symbols: number;
|
|
616
|
+
zoom: number;
|
|
617
|
+
};
|
|
618
|
+
type TileflowStylePerformance = {
|
|
619
|
+
styleBytes: number;
|
|
620
|
+
totalLayers: number;
|
|
621
|
+
zooms: TileflowZoomPerformance[];
|
|
622
|
+
};
|
|
623
|
+
/** A deterministic, network-free structural sweep of a compiled style. */
|
|
624
|
+
declare function analyzeTileflowStylePerformance(style: MapLibreStyle, zooms?: readonly number[]): TileflowStylePerformance;
|
|
625
|
+
|
|
626
|
+
declare const tileflowRoadClasses: readonly ["motorway", "trunk", "primary", "secondary", "tertiary", "minor", "service", "track", "pathway", "footway", "cycleway", "steps", "pedestrian"];
|
|
169
627
|
|
|
170
628
|
declare function roads(options?: TileflowRoadsModuleOptions): TileflowRoadsModuleConfig;
|
|
171
629
|
|
|
172
|
-
|
|
630
|
+
declare function labels(options?: TileflowLabelsModuleOptions): TileflowLabelsModuleConfig;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Stable built-in POI image convention. A theme token with the declared role
|
|
634
|
+
* takes precedence; `fallback` is the invariant sprite ID used when omitted.
|
|
635
|
+
*/
|
|
636
|
+
declare const tileflowPoiImageRoles: Readonly<{
|
|
637
|
+
readonly 'arts-entertainment': {
|
|
638
|
+
readonly fallback: "culture";
|
|
639
|
+
readonly token: "poi.arts-entertainment";
|
|
640
|
+
};
|
|
641
|
+
readonly education: {
|
|
642
|
+
readonly fallback: "education";
|
|
643
|
+
readonly token: "poi.education";
|
|
644
|
+
};
|
|
645
|
+
readonly 'food-drink': {
|
|
646
|
+
readonly fallback: "food";
|
|
647
|
+
readonly token: "poi.food-drink";
|
|
648
|
+
};
|
|
649
|
+
readonly landmark: {
|
|
650
|
+
readonly fallback: "culture";
|
|
651
|
+
readonly token: "poi.landmark";
|
|
652
|
+
};
|
|
653
|
+
readonly lodging: {
|
|
654
|
+
readonly fallback: "lodging";
|
|
655
|
+
readonly token: "poi.lodging";
|
|
656
|
+
};
|
|
657
|
+
readonly medical: {
|
|
658
|
+
readonly fallback: "health";
|
|
659
|
+
readonly token: "poi.medical";
|
|
660
|
+
};
|
|
661
|
+
readonly 'park-nature': {
|
|
662
|
+
readonly fallback: "services";
|
|
663
|
+
readonly token: "poi.park-nature";
|
|
664
|
+
};
|
|
665
|
+
readonly 'public-services': {
|
|
666
|
+
readonly fallback: "services";
|
|
667
|
+
readonly token: "poi.public-services";
|
|
668
|
+
};
|
|
669
|
+
readonly religion: {
|
|
670
|
+
readonly fallback: "culture";
|
|
671
|
+
readonly token: "poi.religion";
|
|
672
|
+
};
|
|
673
|
+
readonly retail: {
|
|
674
|
+
readonly fallback: "shopping";
|
|
675
|
+
readonly token: "poi.retail";
|
|
676
|
+
};
|
|
677
|
+
readonly 'sport-leisure': {
|
|
678
|
+
readonly fallback: "culture";
|
|
679
|
+
readonly token: "poi.sport-leisure";
|
|
680
|
+
};
|
|
681
|
+
readonly transport: {
|
|
682
|
+
readonly fallback: "major-transit";
|
|
683
|
+
readonly token: "poi.transport";
|
|
684
|
+
};
|
|
685
|
+
readonly 'visitor-amenity': {
|
|
686
|
+
readonly fallback: "services";
|
|
687
|
+
readonly token: "poi.visitor-amenity";
|
|
688
|
+
};
|
|
689
|
+
}>;
|
|
690
|
+
declare function poi(options?: TileflowPoiModuleOptions): TileflowPoiModuleConfig;
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Line-fitted text backgrounds through derived glyph stacks.
|
|
694
|
+
*
|
|
695
|
+
* MapLibre paints an SDF text halo wherever a glyph's distance value lies between the halo edge,
|
|
696
|
+
* `(6 - haloWidth / fontScale) / 8`, and the fill edge at 0.75. A derived glyph keeps its source
|
|
697
|
+
* advance and distance field, and also carries a rectangular cell encoded at distance 0.5. With
|
|
698
|
+
* `text-halo-width` equal to `text-size / 6`, the halo edge sits at 0.25, so the halo pass paints
|
|
699
|
+
* exactly those cells: every shaped line receives one strip fitted to its own width. Shaping, line
|
|
700
|
+
* breaking, collision, anchors and fading remain the renderer's, and no renderer change is needed.
|
|
701
|
+
*
|
|
702
|
+
* Cells overlap their neighbours, which keeps strips seamless but requires an opaque colour.
|
|
703
|
+
*
|
|
704
|
+
* Glyph units are MapLibre's 24px em. x is relative to a glyph's pen position and y to the line
|
|
705
|
+
* origin before MapLibre's -17 shaping offset; bitmap row 0, including the 3px border, sits at
|
|
706
|
+
* y = -20 - top.
|
|
707
|
+
*/
|
|
708
|
+
/** Metrics a derived stack bakes into its glyphs. Every value is in ems. */
|
|
709
|
+
type TileflowLineBackgroundMetrics = {
|
|
710
|
+
/** Must equal the layer's constant `text-letter-spacing`. */
|
|
711
|
+
letterSpacing: number;
|
|
712
|
+
/** Must equal the layer's constant `text-line-height`; rows are exactly this tall. */
|
|
713
|
+
lineHeight: number;
|
|
714
|
+
/** Strip extension beyond the first and last glyph of each line. */
|
|
715
|
+
padding: number;
|
|
716
|
+
};
|
|
717
|
+
type TileflowLineBackgroundFontStack = {
|
|
718
|
+
metrics: TileflowLineBackgroundMetrics;
|
|
719
|
+
source: string;
|
|
720
|
+
};
|
|
721
|
+
declare const tileflowLineBackgroundDefaults: Readonly<TileflowLineBackgroundMetrics>;
|
|
722
|
+
declare const tileflowLineBackgroundLimits: Readonly<{
|
|
723
|
+
letterSpacing: Readonly<{
|
|
724
|
+
max: 0.5;
|
|
725
|
+
min: 0;
|
|
726
|
+
}>;
|
|
727
|
+
lineHeight: Readonly<{
|
|
728
|
+
max: 3;
|
|
729
|
+
min: 0.8;
|
|
730
|
+
}>;
|
|
731
|
+
padding: Readonly<{
|
|
732
|
+
max: 1;
|
|
733
|
+
min: 0;
|
|
734
|
+
}>;
|
|
735
|
+
}>;
|
|
736
|
+
/** `text-halo-width` per unit of `text-size` that places the halo edge on the derived cells. */
|
|
737
|
+
declare const tileflowLineBackgroundHaloRatio: number;
|
|
738
|
+
/** Rounds metrics to the thousandths a stack name encodes and checks their ranges. */
|
|
739
|
+
declare function normalizeTileflowLineBackgroundMetrics(metrics?: Partial<TileflowLineBackgroundMetrics>): TileflowLineBackgroundMetrics;
|
|
740
|
+
/** Names the derived stack for one source stack: `<source> lines-v1-t<ls>-l<lh>-p<pad>`. */
|
|
741
|
+
declare function createTileflowLineBackgroundFontStack(source: string, metrics?: Partial<TileflowLineBackgroundMetrics>): string;
|
|
742
|
+
/** Recognizes a derived stack name; returns undefined for ordinary or out-of-range names. */
|
|
743
|
+
declare function parseTileflowLineBackgroundFontStack(stack: string): TileflowLineBackgroundFontStack | undefined;
|
|
744
|
+
/**
|
|
745
|
+
* Scales a lowered MapLibre `text-size` value to the matching `text-halo-width`. Zoom curves keep
|
|
746
|
+
* their stops, because `zoom` may only be the input of a top-level `interpolate` or `step`.
|
|
747
|
+
*/
|
|
748
|
+
declare function scaleTileflowTextSizeForLineBackground(size: unknown): unknown;
|
|
749
|
+
/**
|
|
750
|
+
* Derives one MapLibre glyph PBF range. Every glyph keeps its id, advance and distance field and
|
|
751
|
+
* gains the background cell; the range and stack names are preserved.
|
|
752
|
+
*/
|
|
753
|
+
declare function deriveTileflowLineBackgroundGlyphs(range: Uint8Array, metrics?: Partial<TileflowLineBackgroundMetrics>): Uint8Array;
|
|
754
|
+
|
|
755
|
+
declare const tileflowIconPackageFileNames: readonly ["sprite.json", "sprite.png", "sprite@2x.json", "sprite@2x.png"];
|
|
756
|
+
type TileflowIconPackageFileName = (typeof tileflowIconPackageFileNames)[number];
|
|
757
|
+
/** Canonical sprite ID shared by authoring, generated manifests, diffs, and runtime indexes. */
|
|
758
|
+
declare const tileflowIconIdPattern: RegExp;
|
|
759
|
+
declare const tileflowIconPackageLimits: {
|
|
760
|
+
readonly decodeConcurrency: 4;
|
|
761
|
+
readonly maxAtlasDimension: 2048;
|
|
762
|
+
readonly maxDecodedPixelsPerIcon: 4194304;
|
|
763
|
+
readonly maxGeneratedFileBytes: number;
|
|
764
|
+
readonly maxGeneratedPackageBytes: number;
|
|
765
|
+
readonly maxIconCount: 1000;
|
|
766
|
+
readonly maxSourceBytes: number;
|
|
767
|
+
readonly maxSourceFileBytes: number;
|
|
768
|
+
};
|
|
769
|
+
/**
|
|
770
|
+
* Portable compatibility values shared by the public CLI and hosted policy.
|
|
771
|
+
* Commercial entitlements still belong to the database package.
|
|
772
|
+
*/
|
|
773
|
+
declare const tileflowHostedAlphaCompatibility: {
|
|
774
|
+
readonly iconPackages: {
|
|
775
|
+
readonly maxGeneratedBytesPerProject: number;
|
|
776
|
+
readonly maxRetainedPerProject: 24;
|
|
777
|
+
};
|
|
778
|
+
readonly maxMapsPerDeploy: 20;
|
|
779
|
+
};
|
|
780
|
+
declare const tileflowIconPackageContentHashSchema: z.ZodString;
|
|
781
|
+
declare const tileflowIconIdSchema: z.ZodString;
|
|
782
|
+
declare const tileflowRenderedIconManifestEntrySchema: z.ZodObject<{
|
|
783
|
+
name: z.ZodString;
|
|
784
|
+
appearance: z.ZodOptional<z.ZodObject<{
|
|
785
|
+
representation: z.ZodLiteral<"sdf">;
|
|
786
|
+
defaults: z.ZodObject<{
|
|
787
|
+
color: z.ZodString;
|
|
788
|
+
haloColor: z.ZodString;
|
|
789
|
+
haloWidth: z.ZodNumber;
|
|
790
|
+
haloBlur: z.ZodNumber;
|
|
791
|
+
}, z.core.$strict>;
|
|
792
|
+
}, z.core.$strict>>;
|
|
793
|
+
layout: z.ZodOptional<z.ZodObject<{
|
|
794
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
795
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
796
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
797
|
+
}, z.core.$strict>>;
|
|
798
|
+
pixelSha256: z.ZodObject<{
|
|
799
|
+
oneX: z.ZodString;
|
|
800
|
+
twoX: z.ZodString;
|
|
801
|
+
}, z.core.$strict>;
|
|
802
|
+
}, z.core.$strict>;
|
|
803
|
+
declare const tileflowIconPackageLabelSchema: z.ZodString;
|
|
804
|
+
declare const tileflowIconPackageManifestSchema: z.ZodObject<{
|
|
805
|
+
files: z.ZodTuple<[z.ZodObject<{
|
|
806
|
+
byteLength: z.ZodNumber;
|
|
807
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
808
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
809
|
+
sha256: z.ZodString;
|
|
810
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
811
|
+
byteLength: z.ZodNumber;
|
|
812
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
813
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
814
|
+
sha256: z.ZodString;
|
|
815
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
816
|
+
byteLength: z.ZodNumber;
|
|
817
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
818
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
819
|
+
sha256: z.ZodString;
|
|
820
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
821
|
+
byteLength: z.ZodNumber;
|
|
822
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
823
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
824
|
+
sha256: z.ZodString;
|
|
825
|
+
}, z.core.$strict>], null>;
|
|
826
|
+
format: z.ZodEnum<{
|
|
827
|
+
"tileflow-icon-package-v1": "tileflow-icon-package-v1";
|
|
828
|
+
"tileflow-icon-package-v2": "tileflow-icon-package-v2";
|
|
829
|
+
}>;
|
|
830
|
+
iconNames: z.ZodArray<z.ZodString>;
|
|
831
|
+
renderedIcons: z.ZodArray<z.ZodObject<{
|
|
832
|
+
name: z.ZodString;
|
|
833
|
+
appearance: z.ZodOptional<z.ZodObject<{
|
|
834
|
+
representation: z.ZodLiteral<"sdf">;
|
|
835
|
+
defaults: z.ZodObject<{
|
|
836
|
+
color: z.ZodString;
|
|
837
|
+
haloColor: z.ZodString;
|
|
838
|
+
haloWidth: z.ZodNumber;
|
|
839
|
+
haloBlur: z.ZodNumber;
|
|
840
|
+
}, z.core.$strict>;
|
|
841
|
+
}, z.core.$strict>>;
|
|
842
|
+
layout: z.ZodOptional<z.ZodObject<{
|
|
843
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
844
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
845
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
846
|
+
}, z.core.$strict>>;
|
|
847
|
+
pixelSha256: z.ZodObject<{
|
|
848
|
+
oneX: z.ZodString;
|
|
849
|
+
twoX: z.ZodString;
|
|
850
|
+
}, z.core.$strict>;
|
|
851
|
+
}, z.core.$strict>>;
|
|
852
|
+
sprites: z.ZodObject<{
|
|
853
|
+
oneX: z.ZodObject<{
|
|
854
|
+
height: z.ZodNumber;
|
|
855
|
+
width: z.ZodNumber;
|
|
856
|
+
pixelRatio: z.ZodLiteral<1>;
|
|
857
|
+
}, z.core.$strict>;
|
|
858
|
+
twoX: z.ZodObject<{
|
|
859
|
+
height: z.ZodNumber;
|
|
860
|
+
width: z.ZodNumber;
|
|
861
|
+
pixelRatio: z.ZodLiteral<2>;
|
|
862
|
+
}, z.core.$strict>;
|
|
863
|
+
}, z.core.$strict>;
|
|
864
|
+
}, z.core.$strict>;
|
|
865
|
+
type TileflowIconPackageManifest = z.infer<typeof tileflowIconPackageManifestSchema>;
|
|
866
|
+
type TileflowRenderedIconManifestEntry = z.infer<typeof tileflowRenderedIconManifestEntrySchema>;
|
|
867
|
+
declare function compareCodeUnits(left: string, right: string): number;
|
|
868
|
+
declare function serializeCanonicalJson(value: unknown): string;
|
|
869
|
+
declare function serializeTileflowIconPackageManifest(input: TileflowIconPackageManifest): string;
|
|
870
|
+
declare function sha256Hex(input: string | Uint8Array): Promise<string>;
|
|
871
|
+
declare function hashTileflowIconPackageManifest(input: TileflowIconPackageManifest): Promise<string>;
|
|
872
|
+
/**
|
|
873
|
+
* Hashes the delivered pixels of one rendered icon without including its name.
|
|
874
|
+
*
|
|
875
|
+
* The v1 binary frame is the UTF-8 domain `tileflow-rendered-icon-pixels-v1\0`, followed by one
|
|
876
|
+
* byte for the pixel ratio, unsigned 32-bit big-endian width and height, then row-major RGBA.
|
|
877
|
+
* Fully transparent pixels have their RGB channels zeroed in a copy before hashing so invisible
|
|
878
|
+
* decoder data cannot create a visual difference.
|
|
879
|
+
*/
|
|
880
|
+
declare function hashTileflowRenderedIconPixels(input: {
|
|
881
|
+
height: number;
|
|
882
|
+
pixelRatio: 1 | 2;
|
|
883
|
+
rgba: Uint8Array;
|
|
884
|
+
width: number;
|
|
885
|
+
}): Promise<string>;
|
|
886
|
+
|
|
887
|
+
declare const tileflowFontBundleLimits: {
|
|
888
|
+
readonly maxFaceCount: 16;
|
|
889
|
+
readonly maxFileCount: 32;
|
|
890
|
+
readonly maxFontFileBytes: number;
|
|
891
|
+
readonly maxLicenseFileBytes: number;
|
|
892
|
+
readonly maxManifestBytes: number;
|
|
893
|
+
readonly maxPackageBytes: number;
|
|
894
|
+
};
|
|
895
|
+
declare const tileflowFontBundleContentHashSchema: z.ZodString;
|
|
896
|
+
declare const tileflowFontBundleManifestSchema: z.ZodObject<{
|
|
897
|
+
files: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
898
|
+
byteLength: z.ZodNumber;
|
|
899
|
+
contentType: z.ZodEnum<{
|
|
900
|
+
"font/otf": "font/otf";
|
|
901
|
+
"font/ttf": "font/ttf";
|
|
902
|
+
"font/woff2": "font/woff2";
|
|
903
|
+
}>;
|
|
904
|
+
kind: z.ZodLiteral<"font">;
|
|
905
|
+
name: z.ZodString;
|
|
906
|
+
sha256: z.ZodString;
|
|
907
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
908
|
+
byteLength: z.ZodNumber;
|
|
909
|
+
contentType: z.ZodLiteral<"text/plain; charset=utf-8">;
|
|
910
|
+
kind: z.ZodLiteral<"license">;
|
|
911
|
+
name: z.ZodString;
|
|
912
|
+
sha256: z.ZodString;
|
|
913
|
+
}, z.core.$strict>], "kind">>;
|
|
914
|
+
fontFaces: z.ZodArray<z.ZodObject<{
|
|
915
|
+
family: z.ZodString;
|
|
916
|
+
file: z.ZodString;
|
|
917
|
+
licenseFile: z.ZodString;
|
|
918
|
+
style: z.ZodEnum<{
|
|
919
|
+
italic: "italic";
|
|
920
|
+
normal: "normal";
|
|
921
|
+
oblique: "oblique";
|
|
922
|
+
}>;
|
|
923
|
+
weight: z.ZodEnum<{
|
|
924
|
+
100: "100";
|
|
925
|
+
200: "200";
|
|
926
|
+
300: "300";
|
|
927
|
+
400: "400";
|
|
928
|
+
500: "500";
|
|
929
|
+
600: "600";
|
|
930
|
+
700: "700";
|
|
931
|
+
800: "800";
|
|
932
|
+
900: "900";
|
|
933
|
+
}>;
|
|
934
|
+
}, z.core.$strict>>;
|
|
935
|
+
format: z.ZodLiteral<"tileflow-font-bundle-v1">;
|
|
936
|
+
}, z.core.$strict>;
|
|
937
|
+
type TileflowFontBundleManifest = z.infer<typeof tileflowFontBundleManifestSchema>;
|
|
938
|
+
type TileflowFontBundleFile = TileflowFontBundleManifest['files'][number];
|
|
939
|
+
type TileflowFontBundleFontFace = TileflowFontBundleManifest['fontFaces'][number];
|
|
940
|
+
declare function serializeTileflowFontBundleManifest(input: TileflowFontBundleManifest): string;
|
|
941
|
+
declare function hashTileflowFontBundleManifest(input: TileflowFontBundleManifest): Promise<string>;
|
|
942
|
+
|
|
943
|
+
type TileflowIconManifestDiff = {
|
|
944
|
+
added: string[];
|
|
945
|
+
afterBytes: number;
|
|
946
|
+
beforeBytes: number;
|
|
947
|
+
modified: string[];
|
|
948
|
+
removed: string[];
|
|
949
|
+
unchangedCount: number;
|
|
950
|
+
};
|
|
951
|
+
declare function diffTileflowIconPackageManifests(before: TileflowIconPackageManifest | null, after: TileflowIconPackageManifest | null): TileflowIconManifestDiff;
|
|
952
|
+
|
|
953
|
+
declare const tileflowIconsLockfileName = "tileflow.icons.lock.json";
|
|
954
|
+
declare const tileflowIconsLockfileMaximumBytes: number;
|
|
955
|
+
declare const tileflowIconSetPinSchema: z.ZodObject<{
|
|
956
|
+
teamId: z.ZodString;
|
|
957
|
+
setId: z.ZodString;
|
|
958
|
+
versionId: z.ZodString;
|
|
959
|
+
version: z.ZodNumber;
|
|
960
|
+
packageId: z.ZodString;
|
|
961
|
+
contentHash: z.ZodString;
|
|
962
|
+
manifest: z.ZodObject<{
|
|
963
|
+
files: z.ZodTuple<[z.ZodObject<{
|
|
964
|
+
byteLength: z.ZodNumber;
|
|
965
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
966
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
967
|
+
sha256: z.ZodString;
|
|
968
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
969
|
+
byteLength: z.ZodNumber;
|
|
970
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
971
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
972
|
+
sha256: z.ZodString;
|
|
973
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
974
|
+
byteLength: z.ZodNumber;
|
|
975
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
976
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
977
|
+
sha256: z.ZodString;
|
|
978
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
979
|
+
byteLength: z.ZodNumber;
|
|
980
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
981
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
982
|
+
sha256: z.ZodString;
|
|
983
|
+
}, z.core.$strict>], null>;
|
|
984
|
+
format: z.ZodEnum<{
|
|
985
|
+
"tileflow-icon-package-v1": "tileflow-icon-package-v1";
|
|
986
|
+
"tileflow-icon-package-v2": "tileflow-icon-package-v2";
|
|
987
|
+
}>;
|
|
988
|
+
iconNames: z.ZodArray<z.ZodString>;
|
|
989
|
+
renderedIcons: z.ZodArray<z.ZodObject<{
|
|
990
|
+
name: z.ZodString;
|
|
991
|
+
appearance: z.ZodOptional<z.ZodObject<{
|
|
992
|
+
representation: z.ZodLiteral<"sdf">;
|
|
993
|
+
defaults: z.ZodObject<{
|
|
994
|
+
color: z.ZodString;
|
|
995
|
+
haloColor: z.ZodString;
|
|
996
|
+
haloWidth: z.ZodNumber;
|
|
997
|
+
haloBlur: z.ZodNumber;
|
|
998
|
+
}, z.core.$strict>;
|
|
999
|
+
}, z.core.$strict>>;
|
|
1000
|
+
layout: z.ZodOptional<z.ZodObject<{
|
|
1001
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
1002
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
1003
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1004
|
+
}, z.core.$strict>>;
|
|
1005
|
+
pixelSha256: z.ZodObject<{
|
|
1006
|
+
oneX: z.ZodString;
|
|
1007
|
+
twoX: z.ZodString;
|
|
1008
|
+
}, z.core.$strict>;
|
|
1009
|
+
}, z.core.$strict>>;
|
|
1010
|
+
sprites: z.ZodObject<{
|
|
1011
|
+
oneX: z.ZodObject<{
|
|
1012
|
+
height: z.ZodNumber;
|
|
1013
|
+
width: z.ZodNumber;
|
|
1014
|
+
pixelRatio: z.ZodLiteral<1>;
|
|
1015
|
+
}, z.core.$strict>;
|
|
1016
|
+
twoX: z.ZodObject<{
|
|
1017
|
+
height: z.ZodNumber;
|
|
1018
|
+
width: z.ZodNumber;
|
|
1019
|
+
pixelRatio: z.ZodLiteral<2>;
|
|
1020
|
+
}, z.core.$strict>;
|
|
1021
|
+
}, z.core.$strict>;
|
|
1022
|
+
}, z.core.$strict>;
|
|
1023
|
+
spriteUrl: z.ZodString;
|
|
1024
|
+
}, z.core.$strict>;
|
|
1025
|
+
declare const tileflowIconsLockfileSchema: z.ZodObject<{
|
|
1026
|
+
lockfileVersion: z.ZodLiteral<1>;
|
|
1027
|
+
sets: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1028
|
+
teamId: z.ZodString;
|
|
1029
|
+
setId: z.ZodString;
|
|
1030
|
+
versionId: z.ZodString;
|
|
1031
|
+
version: z.ZodNumber;
|
|
1032
|
+
packageId: z.ZodString;
|
|
1033
|
+
contentHash: z.ZodString;
|
|
1034
|
+
manifest: z.ZodObject<{
|
|
1035
|
+
files: z.ZodTuple<[z.ZodObject<{
|
|
1036
|
+
byteLength: z.ZodNumber;
|
|
1037
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
1038
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
1039
|
+
sha256: z.ZodString;
|
|
1040
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1041
|
+
byteLength: z.ZodNumber;
|
|
1042
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
1043
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
1044
|
+
sha256: z.ZodString;
|
|
1045
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1046
|
+
byteLength: z.ZodNumber;
|
|
1047
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
1048
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
1049
|
+
sha256: z.ZodString;
|
|
1050
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1051
|
+
byteLength: z.ZodNumber;
|
|
1052
|
+
contentType: z.ZodLiteral<"application/json" | "image/png">;
|
|
1053
|
+
name: z.ZodLiteral<"sprite.json" | "sprite.png" | "sprite@2x.json" | "sprite@2x.png">;
|
|
1054
|
+
sha256: z.ZodString;
|
|
1055
|
+
}, z.core.$strict>], null>;
|
|
1056
|
+
format: z.ZodEnum<{
|
|
1057
|
+
"tileflow-icon-package-v1": "tileflow-icon-package-v1";
|
|
1058
|
+
"tileflow-icon-package-v2": "tileflow-icon-package-v2";
|
|
1059
|
+
}>;
|
|
1060
|
+
iconNames: z.ZodArray<z.ZodString>;
|
|
1061
|
+
renderedIcons: z.ZodArray<z.ZodObject<{
|
|
1062
|
+
name: z.ZodString;
|
|
1063
|
+
appearance: z.ZodOptional<z.ZodObject<{
|
|
1064
|
+
representation: z.ZodLiteral<"sdf">;
|
|
1065
|
+
defaults: z.ZodObject<{
|
|
1066
|
+
color: z.ZodString;
|
|
1067
|
+
haloColor: z.ZodString;
|
|
1068
|
+
haloWidth: z.ZodNumber;
|
|
1069
|
+
haloBlur: z.ZodNumber;
|
|
1070
|
+
}, z.core.$strict>;
|
|
1071
|
+
}, z.core.$strict>>;
|
|
1072
|
+
layout: z.ZodOptional<z.ZodObject<{
|
|
1073
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
1074
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
1075
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1076
|
+
}, z.core.$strict>>;
|
|
1077
|
+
pixelSha256: z.ZodObject<{
|
|
1078
|
+
oneX: z.ZodString;
|
|
1079
|
+
twoX: z.ZodString;
|
|
1080
|
+
}, z.core.$strict>;
|
|
1081
|
+
}, z.core.$strict>>;
|
|
1082
|
+
sprites: z.ZodObject<{
|
|
1083
|
+
oneX: z.ZodObject<{
|
|
1084
|
+
height: z.ZodNumber;
|
|
1085
|
+
width: z.ZodNumber;
|
|
1086
|
+
pixelRatio: z.ZodLiteral<1>;
|
|
1087
|
+
}, z.core.$strict>;
|
|
1088
|
+
twoX: z.ZodObject<{
|
|
1089
|
+
height: z.ZodNumber;
|
|
1090
|
+
width: z.ZodNumber;
|
|
1091
|
+
pixelRatio: z.ZodLiteral<2>;
|
|
1092
|
+
}, z.core.$strict>;
|
|
1093
|
+
}, z.core.$strict>;
|
|
1094
|
+
}, z.core.$strict>;
|
|
1095
|
+
spriteUrl: z.ZodString;
|
|
1096
|
+
}, z.core.$strict>>;
|
|
1097
|
+
}, z.core.$strict>;
|
|
1098
|
+
type TileflowIconSetPin = z.infer<typeof tileflowIconSetPinSchema>;
|
|
1099
|
+
type TileflowIconsLockfileV1 = z.infer<typeof tileflowIconsLockfileSchema>;
|
|
1100
|
+
/** Parse a complete snapshot; no credentials, originals or floating versions belong in a lock. */
|
|
1101
|
+
declare function parseTileflowIconsLockfile(input: unknown, sources?: readonly TileflowIconSource[]): Promise<TileflowIconsLockfileV1>;
|
|
1102
|
+
declare function serializeTileflowIconsLockfile(input: TileflowIconsLockfileV1): Promise<string>;
|
|
1103
|
+
|
|
1104
|
+
/** Bounded JSON parser which rejects duplicate keys, including escaped equivalents. */
|
|
1105
|
+
declare function parseTileflowIconJson(text: string, maximumBytes: number): unknown;
|
|
1106
|
+
|
|
1107
|
+
declare const tileflowIconLayoutFields: {
|
|
1108
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
1109
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
1110
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1111
|
+
};
|
|
1112
|
+
/** Asset-owned geometry in logical pixels; sprite indexes scale it by pixelRatio. */
|
|
1113
|
+
declare const tileflowIconLayoutSchema: z.ZodObject<{
|
|
1114
|
+
stretchX: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
1115
|
+
stretchY: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
1116
|
+
content: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1117
|
+
}, z.core.$strict>;
|
|
1118
|
+
type TileflowIconLayoutMetadata = z.infer<typeof tileflowIconLayoutSchema>;
|
|
1119
|
+
declare function assertTileflowIconLayoutBounds(layout: TileflowIconLayoutMetadata, width: number, height: number): void;
|
|
1120
|
+
/** Read only native layout fields; other sprite fields retain their own validation. */
|
|
1121
|
+
declare function readTileflowIconLayout(entry: Partial<TileflowIconLayoutMetadata>): TileflowIconLayoutMetadata | undefined;
|
|
1122
|
+
declare function scaleTileflowIconLayout(layout: TileflowIconLayoutMetadata, scale: number): TileflowIconLayoutMetadata;
|
|
1123
|
+
|
|
1124
|
+
export { MapLibreStyle, OpenMapTilesFieldBindings, OpenMapTilesLayerBindings, ResolveMapOptions, ResolvedTileflowMap, type TileflowAuthoringCommand, type TileflowAuthoringCommandName, type TileflowAuthoringCommandOutputKind, type TileflowAuthoringExpressionBuilder, type TileflowAuthoringManifest, type TileflowAuthoringManifestDomain, type TileflowAuthoringOperation, TileflowBackgroundStyle, TileflowBandPlacement, TileflowCircleStyle, type TileflowDataCaseBranch, type TileflowDataExpressionInput, type TileflowDataExpressionResult, 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 TileflowLineBackgroundFontStack, type TileflowLineBackgroundMetrics, TileflowLineStyle, TileflowMap, TileflowMapResolutionError, TileflowMapScene, type TileflowModuleWithRenderStack, type TileflowNamedRenderStack, type TileflowNumericDataFieldName, 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 TileflowSemanticAdd, type TileflowSemanticChange, type TileflowSemanticDiff, type TileflowSemanticDifference, type TileflowSemanticJsonValue, type TileflowSemanticMapIdentity, type TileflowSemanticRemove, type TileflowStylePerformance, TileflowSymbolStyle, TileflowThemeColorOperation, TileflowThemeTokenReference, type TileflowZoomPerformance, ValidationMessage, analyzeTileflowStylePerformance, assertTileflowIconLayoutBounds, compareCodeUnits, createTileflowIconPreviewRuntime, createTileflowLineBackgroundFontStack, defineMap, deriveTileflowLineBackgroundGlyphs, diffTileflowIconPackageManifests, diffTileflowMaps, expr, field, hashTileflowFontBundleManifest, hashTileflowIconPackageManifest, hashTileflowRenderedIconPixels, isTileflowPortableId, isTileflowThemeName, isTileflowWorldReleaseId, labels, normalizeTileflowLineBackgroundMetrics, parseResolvedTileflowMap, parseTileflowIconJson, parseTileflowIconsLockfile, parseTileflowLineBackgroundFontStack, poi, readTileflowIconLayout, refineRenderTarget, renderPass, renderTileflowIconAtlasPixels, resolveMap, resolveTileflowIconPreviewPaint, roads, scaleTileflowIconLayout, scaleTileflowTextSizeForLineBackground, serializeCanonicalJson, serializeTileflowFontBundleManifest, serializeTileflowIconPackageManifest, serializeTileflowIconsLockfile, sha256Hex, tileflowAuthoringManifest, tileflowAuthoringManifestSchemaVersion, tileflowCompilationPhases, tileflowCompilationPlannerStages, tileflowCompilationReportSchemaVersion, tileflowFontBundleContentHashSchema, tileflowFontBundleLimits, tileflowFontBundleManifestSchema, tileflowHostedAlphaCompatibility, tileflowHostedSourceLimit, tileflowIconIdPattern, tileflowIconIdSchema, tileflowIconLayoutFields, tileflowIconLayoutSchema, tileflowIconPackageContentHashSchema, tileflowIconPackageFileNames, tileflowIconPackageLabelSchema, tileflowIconPackageLimits, tileflowIconPackageManifestSchema, tileflowIconSetPinSchema, tileflowIconSpriteIndexEntrySchema, tileflowIconSpriteIndexSchema, tileflowIconsLockfileMaximumBytes, tileflowIconsLockfileName, tileflowIconsLockfileSchema, tileflowLineBackgroundDefaults, tileflowLineBackgroundHaloRatio, tileflowLineBackgroundLimits, tileflowMapDefaultMaxDepth, tileflowOverlayPlacements, tileflowPoiImageRoles, tileflowPortableIdMaximumLength, tileflowRenderSelectorComparisons, tileflowRenderSelectorGeometries, tileflowRenderSelectorKinds, tileflowRenderStackLimits, tileflowRenderStackRenderers, tileflowRenderedIconManifestEntrySchema, tileflowRoadClasses, tileflowSemanticDiffSchemaVersion, tileflowWorldReleaseIdMaximumLength, tileflowWorldReleaseIdMinimumLength, tileflowWorldReleaseIdPattern, tileflowWorldReleaseIdPatternSource, tileflowWorldReleaseIdSchema, withRenderStack };
|