@tileflow/core 0.1.0-alpha.46 → 0.1.0-alpha.48

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.
@@ -87,6 +87,133 @@ declare const zoom: {
87
87
  step<T>(stops: readonly (readonly [number, T])[]): TileflowZoomValue<T>;
88
88
  };
89
89
 
90
+ declare const tileflowOverlayPlacements: readonly ["above-water", "below-roads", "above-roads", "above-buildings", "below-labels", "above-labels"];
91
+ declare const tileflowHostedSourceLimit: 16;
92
+ /** Larger data belongs behind a URL or in runtime `dataSources`, not in every compiled style. */
93
+ declare const tileflowInlineGeoJsonByteLimit: 512000;
94
+ type TileflowOverlayPlacement = (typeof tileflowOverlayPlacements)[number];
95
+ type TileflowHostedTilesetType = 'raster' | 'vector';
96
+ type TileflowHostedTilesetSource = Readonly<{
97
+ attribution: string;
98
+ kind: 'hosted-tileset';
99
+ local: string;
100
+ tileset: string;
101
+ tileSize?: 256 | 512;
102
+ type: TileflowHostedTilesetType;
103
+ }>;
104
+ /**
105
+ * A GeoJSON FeatureCollection, the shape MapLibre clustering and `setData` accept. Features are
106
+ * plain objects because typed GeoJSON interfaces, such as `Feature<Point>`, have no index signature.
107
+ */
108
+ type TileflowGeoJsonFeatureCollection = Readonly<{
109
+ features: readonly object[];
110
+ type: 'FeatureCollection';
111
+ }>;
112
+ /** MapLibre aggregate: `[operator, mapExpression]`, summed into each cluster's properties. */
113
+ type TileflowClusterProperty = readonly [operator: unknown, map: unknown];
114
+ /** Clustering options named as in the Mapbox and MapLibre source specifications. */
115
+ type TileflowGeoJsonClusterOptions = Readonly<{
116
+ /** Group nearby points in the worker. Defaults to false. */
117
+ cluster?: boolean;
118
+ /** The last zoom that clusters; points are separate above it. MapLibre's default is 14. */
119
+ clusterMaxZoom?: number;
120
+ /** The fewest points that form a cluster. MapLibre's default is 2. */
121
+ clusterMinPoints?: number;
122
+ /** Aggregates kept on clusters, such as `{total: ['+', ['get', 'price']]}`. */
123
+ clusterProperties?: Readonly<Record<string, TileflowClusterProperty>>;
124
+ /** Cluster radius in CSS pixels. MapLibre's default is 50. */
125
+ clusterRadius?: number;
126
+ }>;
127
+ type TileflowGeoJsonSource = Readonly<TileflowGeoJsonClusterOptions & {
128
+ attribution?: string;
129
+ data: TileflowGeoJsonFeatureCollection | string;
130
+ kind: 'geojson';
131
+ }>;
132
+ type TileflowSource = TileflowGeoJsonSource | TileflowHostedTilesetSource;
133
+ type TileflowMapLibreOverlayLayer = Readonly<Record<string, unknown> & {
134
+ id: string;
135
+ source?: never;
136
+ type: string;
137
+ }>;
138
+ type TileflowMapLibreOverlay = Readonly<{
139
+ kind: 'maplibre-overlay';
140
+ layers: readonly TileflowMapLibreOverlayLayer[];
141
+ placement: TileflowOverlayPlacement;
142
+ source: string;
143
+ }>;
144
+ type TileflowRemoveOperation = Readonly<{
145
+ op: 'remove';
146
+ }>;
147
+ type TileflowHostedSourceCollection = Readonly<Record<string, TileflowSource | TileflowRemoveOperation>>;
148
+ type TileflowOverlayCollection = Readonly<Record<string, TileflowMapLibreOverlay | TileflowRemoveOperation>>;
149
+ /** Bind one logical Team tileset to an explicit account-free local PMTiles archive. */
150
+ declare function hostedTileset(options: {
151
+ attribution: string;
152
+ local: string;
153
+ tileset: string;
154
+ tileSize?: 256 | 512;
155
+ type?: TileflowHostedTilesetType;
156
+ }): TileflowHostedTilesetSource;
157
+ /**
158
+ * Declare a named GeoJSON source. Omit `data` for a source the application fills at runtime through
159
+ * a framework adapter's `dataSources`.
160
+ */
161
+ declare function geojsonSource(options?: Readonly<TileflowGeoJsonClusterOptions & {
162
+ attribution?: string;
163
+ data?: TileflowGeoJsonFeatureCollection | string;
164
+ }>): TileflowGeoJsonSource;
165
+ /** Group one or more ordinary MapLibre layers around one named Tileflow source. */
166
+ declare function maplibreOverlay(options: {
167
+ layers: readonly TileflowMapLibreOverlayLayer[];
168
+ placement: TileflowOverlayPlacement;
169
+ source: string;
170
+ }): TileflowMapLibreOverlay;
171
+ /**
172
+ * Draw a clustering GeoJSON source: sized bubbles, their counts, and the separate points. Layers are
173
+ * named `<id>-clusters`, `<id>-cluster-count` and `<id>-points`. The count uses the map's label font
174
+ * unless `font` names another. Framework adapters zoom into a clicked cluster.
175
+ */
176
+ declare function clusterOverlay(options: {
177
+ /** Bubble colours by point count: the first applies below `steps[0]`. */
178
+ colors?: readonly [string, string, string];
179
+ /** Zoom in when a cluster is clicked or tapped. Defaults to true. */
180
+ expandOnClick?: boolean;
181
+ /** An exact text-font stack, for maps whose labels use another font. */
182
+ font?: readonly string[];
183
+ id: string;
184
+ placement: TileflowOverlayPlacement;
185
+ /** Colour of the separate points. */
186
+ pointColor?: string;
187
+ /** Bubble radii in pixels, matching `colors`. */
188
+ radii?: readonly [number, number, number];
189
+ source: string;
190
+ /** The two point counts where bubbles change size and colour. */
191
+ steps?: readonly [number, number];
192
+ textColor?: string;
193
+ }): TileflowMapLibreOverlay;
194
+ /**
195
+ * Draw point density from a GeoJSON source or a hosted vector tileset. `weight` is a number or a
196
+ * MapLibre expression; values above 1 make a point count for more than one.
197
+ */
198
+ declare function heatmapOverlay(options: {
199
+ /** `[density, color]` stops from 0 to 1. Start transparent so empty areas stay clear. */
200
+ colors?: readonly (readonly [density: number, color: string])[];
201
+ id: string;
202
+ intensity?: unknown;
203
+ /** Above this zoom the layer is not drawn, for handing over to points or clusters. */
204
+ maxZoom?: number;
205
+ opacity?: unknown;
206
+ placement: TileflowOverlayPlacement;
207
+ radius?: unknown;
208
+ source: string;
209
+ /** The source-layer of a vector tileset. GeoJSON sources have none. */
210
+ sourceLayer?: string;
211
+ weight?: unknown;
212
+ }): TileflowMapLibreOverlay;
213
+ /** Remove one inherited keyed source or overlay. */
214
+ declare function remove(): TileflowRemoveOperation;
215
+ declare function isSafeLocalPmtilesPath(value: unknown): value is string;
216
+
90
217
  /** A color literal, semantic color token, color operation, expression, or zoom ramp. */
91
218
  type TileflowColorStyleValue = TileflowExpression<string> | TileflowThemeColorValue | TileflowZoomValue<TileflowThemeColorValue>;
92
219
  /** An image name, semantic image token, expression, or zoom ramp. */
@@ -437,7 +564,7 @@ type TileflowRoadTreatmentStyle = Partial<Record<TileflowRoadStructure, Tileflow
437
564
  enabled?: boolean;
438
565
  widthScale?: TileflowThemeNumberValue;
439
566
  };
440
- type TileflowRoadModifier = 'construction' | 'expressway' | 'indoor' | 'official' | 'ramp' | 'unpaved';
567
+ type TileflowRoadModifier = 'construction' | 'expressway' | 'indoor' | 'ramp' | 'unpaved';
441
568
  type TileflowRoadRestriction = 'access' | 'bicycle' | 'foot' | 'horse' | 'toll';
442
569
  type TileflowMountainBikeScale = '0' | '0+' | '1' | '1+' | '2' | '2+' | '3' | '3+' | '4' | '5' | '6';
443
570
  type TileflowRoadServiceType = 'alley' | 'crossover' | 'driveway' | 'parkingAisle' | 'yard';
@@ -1009,4 +1136,4 @@ type TileflowRuntimeManifest = {
1009
1136
  version: typeof tileflowRuntimeManifestVersion | typeof tileflowTimeOfDayManifestVersion | typeof tileflowFamilyManifestVersion;
1010
1137
  };
1011
1138
 
1012
- export { type TileflowImageStyleValue as $, type TileflowLineStyle as A, type TileflowSymbolStyle as B, type TileflowRoadsModuleOptions as C, type TileflowRoadsModuleConfig as D, type TileflowLabelsModuleOptions as E, type TileflowLabelsModuleConfig as F, type TileflowPoiModuleOptions as G, type TileflowPoiModuleConfig as H, type MapLibreSprite as I, type TileflowAerodromeCodeDetail as J, type TileflowAlignment as K, type TileflowAnalytics as L, type MapLibreStyle as M, type TileflowAreaStyle as N, type TileflowBackgroundPaint as O, type TileflowCirclePaint as P, type TileflowColor as Q, type TileflowColorStyleValue as R, type TileflowExtrusionPaint as S, type TileflowRuntimeManifest as T, type TileflowFillPaint as U, type ValidationMessage as V, type TileflowIconAnchor as W, type TileflowIconLayout as X, type TileflowIconPaint as Y, type TileflowIconStyle as Z, type TileflowIconTextFit as _, type TileflowRuntimeColorScheme as a, type TileflowStyleValue as a$, type TileflowLabelDetail as a0, type TileflowLabelLanguage as a1, type TileflowLabelStyles as a2, type TileflowLayerRange as a3, type TileflowLight as a4, type TileflowLineCap as a5, type TileflowLineHatchStyle as a6, type TileflowLineJoin as a7, type TileflowLineLayout as a8, type TileflowLinePaint as a9, type TileflowRoadLayerStyle as aA, type TileflowRoadModifier as aB, type TileflowRoadOutline as aC, type TileflowRoadRestriction as aD, type TileflowRoadRoundaboutStyle as aE, type TileflowRoadServiceType as aF, type TileflowRoadShieldDetail as aG, type TileflowRoadShieldStyles as aH, type TileflowRoadSidewalkStyle as aI, type TileflowRoadStreetLightStyle as aJ, type TileflowRoadStructure as aK, type TileflowRoadTreatmentLayerStyle as aL, type TileflowRoadTreatmentLineStyle as aM, type TileflowRoadTreatmentStyle as aN, type TileflowRoadWeight as aO, type TileflowRuntimeCenterLike as aP, type TileflowRuntimeManifestMap as aQ, type TileflowRuntimeSource as aR, type TileflowRuntimeSourceValidation as aS, type TileflowRuntimeStyle as aT, type TileflowRuntimeStyleOptions as aU, type TileflowRuntimeViewOptions as aV, type TileflowSessionController as aW, type TileflowSessionGrantResponse as aX, type TileflowStringStyleValue as aY, type TileflowStructuralStyleValue as aZ, type TileflowStyleFontFace as a_, type TileflowLineStackStyle as aa, type TileflowManifestFetchOptions as ab, type TileflowManifestLoadOptions as ac, type TileflowMapMode as ad, type TileflowMapModeOptions as ae, type TileflowMarkerSymbolStyle as af, type TileflowMountainBikeScale as ag, type TileflowNumberInsetsStyleValue as ah, type TileflowNumberStyleValue as ai, type TileflowPlaceLabelClass as aj, type TileflowPoiCategory as ak, type TileflowPoiCategoryStyle as al, type TileflowPoiColorMode as am, type TileflowPoiDensity as an, type TileflowPoiPlacementOrder as ao, type TileflowPriorityOrder as ap, type TileflowProjection as aq, type TileflowResolvedRuntimeTheme as ar, type TileflowRoadAreaStyle as as, type TileflowRoadClass as at, type TileflowRoadClassStyle as au, type TileflowRoadCrossingStyle as av, type TileflowRoadDetail as aw, type TileflowRoadExtras as ax, type TileflowRoadHierarchy as ay, type TileflowRoadLabelDetail as az, type TileflowRuntimeManifestMapEntry as b, tileflowStyleFontFaceLimits as b$, type TileflowSymbolOverlap as b0, type TileflowSymbolPlacement as b1, type TileflowSymbolPlacementStyle as b2, type TileflowSymbolZOrder as b3, type TileflowTerrain as b4, type TileflowTerrainConfig as b5, type TileflowTerrainContourLabelStyle as b6, type TileflowTerrainContourLineStyle as b7, type TileflowTerrainContoursConfig as b8, type TileflowTerrainEncoding as b9, color as bA, createTileflowSessionController as bB, createTileflowSessionId as bC, defaultTileflowManifestUrl as bD, defaultTileflowRuntimeView as bE, fixed as bF, getTileflowAnalyticsApiUrl as bG, getTileflowStyleFontFaces as bH, inferTileflowAnalyticsFromStyleUrl as bI, isTileflowTimeOfDay as bJ, loadTileflowManifest as bK, mergeTileflowAnalytics as bL, nearestTileflowBlendTheme as bM, normalizeTileflowRuntimeCenter as bN, normalizeTileflowStaticImageSize as bO, normalizeTileflowUrl as bP, resolveTileflowAnalyticsRequestUrl as bQ, resolveTileflowManifestMap as bR, resolveTileflowMapMode as bS, resolveTileflowRuntimeStyle as bT, resolveTileflowRuntimeTheme as bU, resolveTileflowRuntimeThemeBlend as bV, resolveTileflowRuntimeView as bW, resolveTileflowStaticImageUrl as bX, shouldLoadTileflowManifest as bY, startTileflowSession as bZ, tileflowPoiCategories as b_, type TileflowTerrainHillshadeStyle as ba, type TileflowTerrainLayerRange as bb, type TileflowTerrainMode as bc, type TileflowTextAnchor as bd, type TileflowTextBackground as be, type TileflowTextJustify as bf, type TileflowTextLayout as bg, type TileflowTextPaint as bh, type TileflowTextStyle as bi, type TileflowThemeBlendSelection as bj, type TileflowThemeColorAlpha as bk, type TileflowThemeColorMix as bl, type TileflowThemeColorValue as bm, type TileflowThemeFontValue as bn, type TileflowThemeImageValue as bo, type TileflowThemeNumberValue as bp, type TileflowThemeSelection as bq, type TileflowThemeTokenCategory as br, type TileflowThemeValue as bs, type TileflowViewConfig as bt, type TileflowWaterLabelClass as bu, type TileflowZoomInterpolation as bv, type TileflowZoomValue as bw, type ValidationResult as bx, assertValidTileflowRuntimeSource as by, clearTileflowManifestCache as bz, type TileflowRuntimeManifestTheme as c, tileflowStyleFontFacesMetadataKey as c0, tileflowThemeBlendLimits as c1, tileflowThemeTokenCategories as c2, tileflowTimesOfDay as c3, token as c4, validateTileflowRuntimeSource as c5, validateTileflowThemeBlendSelection as c6, validateTileflowThemeSelection as c7, zoom as c8, type TileflowTypographyStyle as c9, type ResolvedTileflowTypography as ca, type TileflowAppearanceSelection as cb, type TileflowColorOverrides as cc, applyTileflowColorOverrides as cd, loadTileflowRuntimeAppearance as ce, loadTileflowStyleFamily as cf, normalizeTileflowSurfaceId as cg, prepareTileflowStyleFamilyForRendering as ch, resolveTileflowAppearance as ci, resolveTileflowFamilyResourceUrls as cj, resolveTileflowStyleResourceUrls as ck, type TileflowRuntimeSystemThemes as d, type TileflowTimeOfDay as e, type TileflowTimeOfDayVariants as f, tileflowRuntimeManifestLimits as g, tileflowRuntimeManifestVersion as h, tileflowTimeOfDayManifestVersion as i, type TileflowStyleFamily as j, createTileflowStyleFamily as k, expandTileflowFamilyTemplate as l, expandTileflowStyleFamily as m, materializeTileflowStyleFamily as n, tileflowStyleFamilyLimits as o, parseTileflowStyleFamily as p, type TileflowExpression as q, type TileflowFixedValue as r, type TileflowThemeTokenReference as s, tileflowFamilyManifestVersion as t, type TileflowThemeColorOperation as u, type TileflowBackgroundStyle as v, withTileflowFamilyTemplate as w, type TileflowCircleStyle as x, type TileflowExtrusionStyle as y, type TileflowFillStyle as z };
1139
+ export { type TileflowFillPaint as $, type TileflowExtrusionStyle as A, type TileflowFillStyle as B, type TileflowLineStyle as C, type TileflowSymbolStyle as D, tileflowHostedSourceLimit as E, tileflowInlineGeoJsonByteLimit as F, tileflowOverlayPlacements as G, type TileflowRoadsModuleOptions as H, type TileflowRoadsModuleConfig as I, type TileflowLabelsModuleOptions as J, type TileflowLabelsModuleConfig as K, type TileflowPoiModuleOptions as L, type MapLibreStyle as M, type TileflowPoiModuleConfig as N, type MapLibreSprite as O, type TileflowAerodromeCodeDetail as P, type TileflowAlignment as Q, type TileflowAnalytics as R, type TileflowAreaStyle as S, type TileflowRuntimeManifest as T, type TileflowBackgroundPaint as U, type ValidationMessage as V, type TileflowCirclePaint as W, type TileflowClusterProperty as X, type TileflowColor as Y, type TileflowColorStyleValue as Z, type TileflowExtrusionPaint as _, type TileflowRuntimeColorScheme as a, type TileflowRoadTreatmentLineStyle as a$, type TileflowGeoJsonClusterOptions as a0, type TileflowGeoJsonFeatureCollection as a1, type TileflowGeoJsonSource as a2, type TileflowHostedSourceCollection as a3, type TileflowHostedTilesetSource as a4, type TileflowHostedTilesetType as a5, type TileflowIconAnchor as a6, type TileflowIconLayout as a7, type TileflowIconPaint as a8, type TileflowIconStyle as a9, type TileflowPoiColorMode as aA, type TileflowPoiDensity as aB, type TileflowPoiPlacementOrder as aC, type TileflowPriorityOrder as aD, type TileflowProjection as aE, type TileflowRemoveOperation as aF, type TileflowResolvedRuntimeTheme as aG, type TileflowRoadAreaStyle as aH, type TileflowRoadClass as aI, type TileflowRoadClassStyle as aJ, type TileflowRoadCrossingStyle as aK, type TileflowRoadDetail as aL, type TileflowRoadExtras as aM, type TileflowRoadHierarchy as aN, type TileflowRoadLabelDetail as aO, type TileflowRoadLayerStyle as aP, type TileflowRoadModifier as aQ, type TileflowRoadOutline as aR, type TileflowRoadRestriction as aS, type TileflowRoadRoundaboutStyle as aT, type TileflowRoadServiceType as aU, type TileflowRoadShieldDetail as aV, type TileflowRoadShieldStyles as aW, type TileflowRoadSidewalkStyle as aX, type TileflowRoadStreetLightStyle as aY, type TileflowRoadStructure as aZ, type TileflowRoadTreatmentLayerStyle as a_, type TileflowIconTextFit as aa, type TileflowImageStyleValue as ab, type TileflowLabelDetail as ac, type TileflowLabelLanguage as ad, type TileflowLabelStyles as ae, type TileflowLayerRange as af, type TileflowLight as ag, type TileflowLineCap as ah, type TileflowLineHatchStyle as ai, type TileflowLineJoin as aj, type TileflowLineLayout as ak, type TileflowLinePaint as al, type TileflowLineStackStyle as am, type TileflowManifestFetchOptions as an, type TileflowManifestLoadOptions as ao, type TileflowMapLibreOverlayLayer as ap, type TileflowMapMode as aq, type TileflowMapModeOptions as ar, type TileflowMarkerSymbolStyle as as, type TileflowMountainBikeScale as at, type TileflowNumberInsetsStyleValue as au, type TileflowNumberStyleValue as av, type TileflowOverlayCollection as aw, type TileflowPlaceLabelClass as ax, type TileflowPoiCategory as ay, type TileflowPoiCategoryStyle as az, type TileflowRuntimeManifestMapEntry as b, hostedTileset as b$, type TileflowRoadTreatmentStyle as b0, type TileflowRoadWeight as b1, type TileflowRuntimeCenterLike as b2, type TileflowRuntimeManifestMap as b3, type TileflowRuntimeSource as b4, type TileflowRuntimeSourceValidation as b5, type TileflowRuntimeStyle as b6, type TileflowRuntimeStyleOptions as b7, type TileflowRuntimeViewOptions as b8, type TileflowSessionController as b9, type TileflowThemeColorAlpha as bA, type TileflowThemeColorMix as bB, type TileflowThemeColorValue as bC, type TileflowThemeFontValue as bD, type TileflowThemeImageValue as bE, type TileflowThemeNumberValue as bF, type TileflowThemeSelection as bG, type TileflowThemeTokenCategory as bH, type TileflowThemeValue as bI, type TileflowViewConfig as bJ, type TileflowWaterLabelClass as bK, type TileflowZoomInterpolation as bL, type TileflowZoomValue as bM, type ValidationResult as bN, assertValidTileflowRuntimeSource as bO, clearTileflowManifestCache as bP, clusterOverlay as bQ, color as bR, createTileflowSessionController as bS, createTileflowSessionId as bT, defaultTileflowManifestUrl as bU, defaultTileflowRuntimeView as bV, fixed as bW, geojsonSource as bX, getTileflowAnalyticsApiUrl as bY, getTileflowStyleFontFaces as bZ, heatmapOverlay as b_, type TileflowSessionGrantResponse as ba, type TileflowSource as bb, type TileflowStringStyleValue as bc, type TileflowStructuralStyleValue as bd, type TileflowStyleFontFace as be, type TileflowStyleValue as bf, type TileflowSymbolOverlap as bg, type TileflowSymbolPlacement as bh, type TileflowSymbolPlacementStyle as bi, type TileflowSymbolZOrder as bj, type TileflowTerrain as bk, type TileflowTerrainConfig as bl, type TileflowTerrainContourLabelStyle as bm, type TileflowTerrainContourLineStyle as bn, type TileflowTerrainContoursConfig as bo, type TileflowTerrainEncoding as bp, type TileflowTerrainHillshadeStyle as bq, type TileflowTerrainLayerRange as br, type TileflowTerrainMode as bs, type TileflowTextAnchor as bt, type TileflowTextBackground as bu, type TileflowTextJustify as bv, type TileflowTextLayout as bw, type TileflowTextPaint as bx, type TileflowTextStyle as by, type TileflowThemeBlendSelection as bz, type TileflowRuntimeManifestTheme as c, inferTileflowAnalyticsFromStyleUrl as c0, isSafeLocalPmtilesPath as c1, isTileflowTimeOfDay as c2, loadTileflowManifest as c3, maplibreOverlay as c4, mergeTileflowAnalytics as c5, nearestTileflowBlendTheme as c6, normalizeTileflowRuntimeCenter as c7, normalizeTileflowStaticImageSize as c8, normalizeTileflowUrl as c9, applyTileflowColorOverrides as cA, loadTileflowRuntimeAppearance as cB, loadTileflowStyleFamily as cC, normalizeTileflowSurfaceId as cD, prepareTileflowStyleFamilyForRendering as cE, resolveTileflowAppearance as cF, resolveTileflowFamilyResourceUrls as cG, resolveTileflowStyleResourceUrls as cH, remove as ca, resolveTileflowAnalyticsRequestUrl as cb, resolveTileflowManifestMap as cc, resolveTileflowMapMode as cd, resolveTileflowRuntimeStyle as ce, resolveTileflowRuntimeTheme as cf, resolveTileflowRuntimeThemeBlend as cg, resolveTileflowRuntimeView as ch, resolveTileflowStaticImageUrl as ci, shouldLoadTileflowManifest as cj, startTileflowSession as ck, tileflowPoiCategories as cl, tileflowStyleFontFaceLimits as cm, tileflowStyleFontFacesMetadataKey as cn, tileflowThemeBlendLimits as co, tileflowThemeTokenCategories as cp, tileflowTimesOfDay as cq, token as cr, validateTileflowRuntimeSource as cs, validateTileflowThemeBlendSelection as ct, validateTileflowThemeSelection as cu, zoom as cv, type TileflowTypographyStyle as cw, type ResolvedTileflowTypography as cx, type TileflowAppearanceSelection as cy, type TileflowColorOverrides as cz, type TileflowRuntimeSystemThemes as d, type TileflowTimeOfDay as e, type TileflowTimeOfDayVariants as f, tileflowRuntimeManifestLimits as g, tileflowRuntimeManifestVersion as h, tileflowTimeOfDayManifestVersion as i, type TileflowStyleFamily as j, createTileflowStyleFamily as k, expandTileflowFamilyTemplate as l, expandTileflowStyleFamily as m, materializeTileflowStyleFamily as n, tileflowStyleFamilyLimits as o, parseTileflowStyleFamily as p, type TileflowOverlayPlacement as q, type TileflowMapLibreOverlay as r, type TileflowExpression as s, tileflowFamilyManifestVersion as t, type TileflowFixedValue as u, type TileflowThemeTokenReference as v, withTileflowFamilyTemplate as w, type TileflowThemeColorOperation as x, type TileflowBackgroundStyle as y, type TileflowCircleStyle as z };
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { T as TileflowRuntimeManifest } from './manifest-types-GeYn0SQM.js';
3
- export { a as TileflowRuntimeColorScheme, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, d as TileflowRuntimeSystemThemes, e as TileflowTimeOfDay, f as TileflowTimeOfDayVariants, t as tileflowFamilyManifestVersion, g as tileflowRuntimeManifestLimits, h as tileflowRuntimeManifestVersion, i as tileflowTimeOfDayManifestVersion } from './manifest-types-GeYn0SQM.js';
2
+ import { T as TileflowRuntimeManifest } from './manifest-types-U7JPDNAo.js';
3
+ export { a as TileflowRuntimeColorScheme, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, d as TileflowRuntimeSystemThemes, e as TileflowTimeOfDay, f as TileflowTimeOfDayVariants, t as tileflowFamilyManifestVersion, g as tileflowRuntimeManifestLimits, h as tileflowRuntimeManifestVersion, i as tileflowTimeOfDayManifestVersion } from './manifest-types-U7JPDNAo.js';
4
4
 
5
5
  declare const tileflowRuntimeManifestSchema: z.ZodType<TileflowRuntimeManifest>;
6
6
  declare function parseTileflowRuntimeManifest(input: unknown): TileflowRuntimeManifest;
package/dist/native.d.ts CHANGED
@@ -70,6 +70,104 @@ type MapLibreStyle = {
70
70
  metadata?: Record<string, unknown>;
71
71
  };
72
72
 
73
+ declare const tileflowOverlayPlacements: readonly ["above-water", "below-roads", "above-roads", "above-buildings", "below-labels", "above-labels"];
74
+ type TileflowOverlayPlacement = (typeof tileflowOverlayPlacements)[number];
75
+ /**
76
+ * A GeoJSON FeatureCollection, the shape MapLibre clustering and `setData` accept. Features are
77
+ * plain objects because typed GeoJSON interfaces, such as `Feature<Point>`, have no index signature.
78
+ */
79
+ type TileflowGeoJsonFeatureCollection = Readonly<{
80
+ features: readonly object[];
81
+ type: 'FeatureCollection';
82
+ }>;
83
+ /** MapLibre aggregate: `[operator, mapExpression]`, summed into each cluster's properties. */
84
+ type TileflowClusterProperty = readonly [operator: unknown, map: unknown];
85
+ /** Clustering options named as in the Mapbox and MapLibre source specifications. */
86
+ type TileflowGeoJsonClusterOptions = Readonly<{
87
+ /** Group nearby points in the worker. Defaults to false. */
88
+ cluster?: boolean;
89
+ /** The last zoom that clusters; points are separate above it. MapLibre's default is 14. */
90
+ clusterMaxZoom?: number;
91
+ /** The fewest points that form a cluster. MapLibre's default is 2. */
92
+ clusterMinPoints?: number;
93
+ /** Aggregates kept on clusters, such as `{total: ['+', ['get', 'price']]}`. */
94
+ clusterProperties?: Readonly<Record<string, TileflowClusterProperty>>;
95
+ /** Cluster radius in CSS pixels. MapLibre's default is 50. */
96
+ clusterRadius?: number;
97
+ }>;
98
+ type TileflowGeoJsonSource = Readonly<TileflowGeoJsonClusterOptions & {
99
+ attribution?: string;
100
+ data: TileflowGeoJsonFeatureCollection | string;
101
+ kind: 'geojson';
102
+ }>;
103
+ type TileflowMapLibreOverlayLayer = Readonly<Record<string, unknown> & {
104
+ id: string;
105
+ source?: never;
106
+ type: string;
107
+ }>;
108
+ type TileflowMapLibreOverlay = Readonly<{
109
+ kind: 'maplibre-overlay';
110
+ layers: readonly TileflowMapLibreOverlayLayer[];
111
+ placement: TileflowOverlayPlacement;
112
+ source: string;
113
+ }>;
114
+ /**
115
+ * Declare a named GeoJSON source. Omit `data` for a source the application fills at runtime through
116
+ * a framework adapter's `dataSources`.
117
+ */
118
+ declare function geojsonSource(options?: Readonly<TileflowGeoJsonClusterOptions & {
119
+ attribution?: string;
120
+ data?: TileflowGeoJsonFeatureCollection | string;
121
+ }>): TileflowGeoJsonSource;
122
+ /** Group one or more ordinary MapLibre layers around one named Tileflow source. */
123
+ declare function maplibreOverlay(options: {
124
+ layers: readonly TileflowMapLibreOverlayLayer[];
125
+ placement: TileflowOverlayPlacement;
126
+ source: string;
127
+ }): TileflowMapLibreOverlay;
128
+ /**
129
+ * Draw a clustering GeoJSON source: sized bubbles, their counts, and the separate points. Layers are
130
+ * named `<id>-clusters`, `<id>-cluster-count` and `<id>-points`. The count uses the map's label font
131
+ * unless `font` names another. Framework adapters zoom into a clicked cluster.
132
+ */
133
+ declare function clusterOverlay(options: {
134
+ /** Bubble colours by point count: the first applies below `steps[0]`. */
135
+ colors?: readonly [string, string, string];
136
+ /** Zoom in when a cluster is clicked or tapped. Defaults to true. */
137
+ expandOnClick?: boolean;
138
+ /** An exact text-font stack, for maps whose labels use another font. */
139
+ font?: readonly string[];
140
+ id: string;
141
+ placement: TileflowOverlayPlacement;
142
+ /** Colour of the separate points. */
143
+ pointColor?: string;
144
+ /** Bubble radii in pixels, matching `colors`. */
145
+ radii?: readonly [number, number, number];
146
+ source: string;
147
+ /** The two point counts where bubbles change size and colour. */
148
+ steps?: readonly [number, number];
149
+ textColor?: string;
150
+ }): TileflowMapLibreOverlay;
151
+ /**
152
+ * Draw point density from a GeoJSON source or a hosted vector tileset. `weight` is a number or a
153
+ * MapLibre expression; values above 1 make a point count for more than one.
154
+ */
155
+ declare function heatmapOverlay(options: {
156
+ /** `[density, color]` stops from 0 to 1. Start transparent so empty areas stay clear. */
157
+ colors?: readonly (readonly [density: number, color: string])[];
158
+ id: string;
159
+ intensity?: unknown;
160
+ /** Above this zoom the layer is not drawn, for handing over to points or clusters. */
161
+ maxZoom?: number;
162
+ opacity?: unknown;
163
+ placement: TileflowOverlayPlacement;
164
+ radius?: unknown;
165
+ source: string;
166
+ /** The source-layer of a vector tileset. GeoJSON sources have none. */
167
+ sourceLayer?: string;
168
+ weight?: unknown;
169
+ }): TileflowMapLibreOverlay;
170
+
73
171
  /** Runtime-ready logical map with all relative theme resources already resolved. */
74
172
  type TileflowRuntimeManifestMap = TileflowRuntimeManifestMapEntry & {
75
173
  apiUrl?: string;
@@ -455,4 +553,4 @@ declare const tileflowMobileDiscoveryMaximumBytes = 4096;
455
553
  /** Bind every advertised representation to the exact Hosted origin and Map being requested. */
456
554
  declare function parseTileflowMobileDiscovery(value: unknown, discoveryUrl: string): TileflowMobileDiscovery;
457
555
 
458
- export { type CreateBoundaryFeatureStateOptions, type TileflowBoundaryFamily, type TileflowBoundaryFeatureState, type TileflowBoundaryRow, type TileflowBoundaryValues, type TileflowFeatureStateMap, type TileflowMobileDiscovery, type TileflowNativeAbortSignal, type TileflowNativeInitialView, type TileflowNativeInitialViewOptions, type TileflowNativeManifestAcquire, type TileflowNativeManifestLoadOptions, type TileflowNativeManifestOperation, type TileflowNativeManifestReader, type TileflowNativeManifestResponse, type TileflowNativeManifestResult, type TileflowNativeNetworkOptions, type TileflowNativeResourceUrlOptions, type TileflowNativeSource, type TileflowNativeSourceController, TileflowNativeSourceError, type TileflowNativeSourceErrorCode, type TileflowNativeSourceErrorField, type TileflowNativeSourceOptions, type TileflowNativeSourceState, TileflowNativeUrlError, type TileflowNativeUrlErrorCode, type TileflowNativeUrlField, type TileflowThemeBlendClock, TileflowThemeBlendError, type TileflowThemeBlendImage, type TileflowThemeBlendOptions, type TileflowThemeBlendPaint, type TileflowThemeBlendPlan, type TileflowThemeBlendSelection, type TileflowThemeBlendSwitch, type TileflowTimeOfDay, type TileflowTimeOfDayVariants, createBoundaryFeatureState, createTileflowNativeSourceController, fillTileflowThemeBlendTemplate, loadTileflowNativeManifest, nearestTileflowBlendTheme, parseTileflowMobileDiscovery, planTileflowThemeBlend, resolveTileflowNativeInitialView, resolveTileflowNativeManifestUrl, resolveTileflowNativeResourceUrl, tileflowBoundaryFamilies, tileflowMobileDiscoveryMaximumBytes, tileflowNativeManifestLimits, tileflowNativeUrlLimits, tileflowThemeBlendLimits, validateTileflowThemeBlendSelection };
556
+ export { type CreateBoundaryFeatureStateOptions, type TileflowBoundaryFamily, type TileflowBoundaryFeatureState, type TileflowBoundaryRow, type TileflowBoundaryValues, type TileflowFeatureStateMap, type TileflowGeoJsonSource, type TileflowMapLibreOverlay, type TileflowMobileDiscovery, type TileflowNativeAbortSignal, type TileflowNativeInitialView, type TileflowNativeInitialViewOptions, type TileflowNativeManifestAcquire, type TileflowNativeManifestLoadOptions, type TileflowNativeManifestOperation, type TileflowNativeManifestReader, type TileflowNativeManifestResponse, type TileflowNativeManifestResult, type TileflowNativeNetworkOptions, type TileflowNativeResourceUrlOptions, type TileflowNativeSource, type TileflowNativeSourceController, TileflowNativeSourceError, type TileflowNativeSourceErrorCode, type TileflowNativeSourceErrorField, type TileflowNativeSourceOptions, type TileflowNativeSourceState, TileflowNativeUrlError, type TileflowNativeUrlErrorCode, type TileflowNativeUrlField, type TileflowOverlayPlacement, type TileflowThemeBlendClock, TileflowThemeBlendError, type TileflowThemeBlendImage, type TileflowThemeBlendOptions, type TileflowThemeBlendPaint, type TileflowThemeBlendPlan, type TileflowThemeBlendSelection, type TileflowThemeBlendSwitch, type TileflowTimeOfDay, type TileflowTimeOfDayVariants, clusterOverlay, createBoundaryFeatureState, createTileflowNativeSourceController, fillTileflowThemeBlendTemplate, geojsonSource, heatmapOverlay, loadTileflowNativeManifest, maplibreOverlay, nearestTileflowBlendTheme, parseTileflowMobileDiscovery, planTileflowThemeBlend, resolveTileflowNativeInitialView, resolveTileflowNativeManifestUrl, resolveTileflowNativeResourceUrl, tileflowBoundaryFamilies, tileflowMobileDiscoveryMaximumBytes, tileflowNativeManifestLimits, tileflowNativeUrlLimits, tileflowThemeBlendLimits, validateTileflowThemeBlendSelection };
package/dist/native.js CHANGED
@@ -4326,6 +4326,18 @@ function planTileflowThemeBlend(styles, options = {}) {
4326
4326
  function fillTileflowThemeBlendTemplate(template, position) {
4327
4327
  return fillTemplate(template, position);
4328
4328
  }
4329
+ function mixTileflowColours(from, to, t) {
4330
+ const a = oklab(from);
4331
+ const b = oklab(to);
4332
+ if (!a || !b) return void 0;
4333
+ const alpha = a[3] + (b[3] - a[3]) * t;
4334
+ if (alpha <= 0) return "rgba(0, 0, 0, 0)";
4335
+ const channels = a.slice(0, 3).map((value, channel) => {
4336
+ const from2 = value * a[3];
4337
+ return (from2 + (b[channel] * b[3] - from2) * t) / alpha;
4338
+ });
4339
+ return colourFromOklab([...channels, alpha]);
4340
+ }
4329
4341
  function fillLayer(layer, position, dominant, layerSwitches) {
4330
4342
  const filled = { ...layer };
4331
4343
  for (const group of ["layout", "paint"]) {
@@ -4369,10 +4381,7 @@ function mixLeaf(values, position) {
4369
4381
  if (t <= 0 || from === to) return from;
4370
4382
  if (t >= 1) return to;
4371
4383
  if (typeof from === "number" && typeof to === "number") return from + (to - from) * t;
4372
- const a = oklab(String(from));
4373
- const b = oklab(String(to));
4374
- if (!a || !b) return t < 0.5 ? from : to;
4375
- return colourFromOklab(a.map((value, channel) => value + (b[channel] - value) * t));
4384
+ return mixTileflowColours(String(from), String(to), t) ?? (t < 0.5 ? from : to);
4376
4385
  }
4377
4386
  function clampPosition(position, themes) {
4378
4387
  if (!Number.isFinite(position)) return 0;
@@ -6061,6 +6070,231 @@ init_portable_identity_rules();
6061
6070
  // src/runtime.ts
6062
6071
  init_portable_identity_rules();
6063
6072
  init_time_of_day();
6073
+
6074
+ // src/overlays.ts
6075
+ init_portable_identity_rules();
6076
+ var tileflowOverlayPlacements = [
6077
+ "above-water",
6078
+ "below-roads",
6079
+ "above-roads",
6080
+ "above-buildings",
6081
+ "below-labels",
6082
+ "above-labels"
6083
+ ];
6084
+ var tileflowClusterMetadataKey = "tileflow:cluster";
6085
+ function geojsonSource(options = {}) {
6086
+ const data = options.data ?? { features: [], type: "FeatureCollection" };
6087
+ if (typeof data === "string") {
6088
+ if (!isHttpsUrl(data)) {
6089
+ throw new Error("Tileflow GeoJSON source URLs must be absolute https:// URLs.");
6090
+ }
6091
+ } else if (!isPlainRecord(data) || data.type !== "FeatureCollection" || !Array.isArray(data.features)) {
6092
+ throw new Error("Tileflow GeoJSON source data must be a FeatureCollection or an https:// URL.");
6093
+ }
6094
+ assertClusterOptions(options);
6095
+ const attribution = options.attribution?.trim();
6096
+ return Object.freeze({
6097
+ ...attribution ? { attribution } : {},
6098
+ ...pickClusterOptions(options),
6099
+ data: typeof data === "string" ? data : Object.freeze(cloneJson(data)),
6100
+ kind: "geojson"
6101
+ });
6102
+ }
6103
+ function maplibreOverlay(options) {
6104
+ if (!isTileflowPortableId(options.source)) {
6105
+ throw new Error(`Invalid Tileflow overlay source ID: ${options.source}.`);
6106
+ }
6107
+ if (!tileflowOverlayPlacements.includes(options.placement)) {
6108
+ throw new Error(`Invalid Tileflow overlay placement: ${String(options.placement)}.`);
6109
+ }
6110
+ if (!Array.isArray(options.layers) || options.layers.length < 1) {
6111
+ throw new Error("Tileflow MapLibre overlays require at least one layer.");
6112
+ }
6113
+ const layers = options.layers.map((layer, index) => {
6114
+ if (!isPlainRecord(layer)) {
6115
+ throw new Error(`Tileflow overlay layer ${index} must be a plain object.`);
6116
+ }
6117
+ if (!isTileflowPortableId(layer.id)) {
6118
+ throw new Error(`Invalid Tileflow overlay layer ID: ${String(layer.id)}.`);
6119
+ }
6120
+ if (layer.id === "tileflow" || layer.id.startsWith("tileflow-")) {
6121
+ throw new Error(`Tileflow overlay layer ID is reserved: ${layer.id}.`);
6122
+ }
6123
+ if (typeof layer.type !== "string" || !layer.type) {
6124
+ throw new Error(`Tileflow overlay layer ${layer.id} requires a MapLibre type.`);
6125
+ }
6126
+ if (Object.hasOwn(layer, "source")) {
6127
+ throw new Error(
6128
+ `Tileflow overlay layer ${layer.id} inherits its source from the overlay and must not declare source.`
6129
+ );
6130
+ }
6131
+ return Object.freeze(cloneJson(layer));
6132
+ });
6133
+ return Object.freeze({
6134
+ kind: "maplibre-overlay",
6135
+ layers: Object.freeze(layers),
6136
+ placement: options.placement,
6137
+ source: options.source
6138
+ });
6139
+ }
6140
+ function clusterOverlay(options) {
6141
+ const colors = options.colors ?? ["#2563eb", "#7c3aed", "#db2777"];
6142
+ const radii = options.radii ?? [16, 22, 30];
6143
+ const [low, high] = options.steps ?? [100, 750];
6144
+ if (!(low > 0 && high > low) || !radii.every((radius) => radius > 0)) {
6145
+ throw new Error("Tileflow cluster steps must increase and radii must be positive.");
6146
+ }
6147
+ const metadata = (role) => ({
6148
+ [tileflowClusterMetadataKey]: {
6149
+ expandOnClick: options.expandOnClick ?? true,
6150
+ role
6151
+ }
6152
+ });
6153
+ const step = (values) => [
6154
+ "step",
6155
+ ["get", "point_count"],
6156
+ values[0],
6157
+ low,
6158
+ values[1],
6159
+ high,
6160
+ values[2]
6161
+ ];
6162
+ return maplibreOverlay({
6163
+ layers: [
6164
+ {
6165
+ filter: ["has", "point_count"],
6166
+ id: `${options.id}-clusters`,
6167
+ metadata: metadata("cluster"),
6168
+ paint: {
6169
+ "circle-color": step(colors),
6170
+ "circle-radius": step(radii),
6171
+ "circle-stroke-color": "#ffffff",
6172
+ "circle-stroke-width": 2
6173
+ },
6174
+ type: "circle"
6175
+ },
6176
+ {
6177
+ filter: ["has", "point_count"],
6178
+ id: `${options.id}-cluster-count`,
6179
+ layout: {
6180
+ "text-allow-overlap": true,
6181
+ "text-field": ["get", "point_count_abbreviated"],
6182
+ ...options.font ? { "text-font": [...options.font] } : {},
6183
+ "text-ignore-placement": true,
6184
+ "text-size": 13
6185
+ },
6186
+ metadata: metadata("count"),
6187
+ paint: { "text-color": options.textColor ?? "#ffffff" },
6188
+ type: "symbol"
6189
+ },
6190
+ {
6191
+ filter: ["!", ["has", "point_count"]],
6192
+ id: `${options.id}-points`,
6193
+ metadata: metadata("point"),
6194
+ paint: {
6195
+ "circle-color": options.pointColor ?? colors[0],
6196
+ "circle-radius": 6,
6197
+ "circle-stroke-color": "#ffffff",
6198
+ "circle-stroke-width": 1.5
6199
+ },
6200
+ type: "circle"
6201
+ }
6202
+ ],
6203
+ placement: options.placement,
6204
+ source: options.source
6205
+ });
6206
+ }
6207
+ function heatmapOverlay(options) {
6208
+ const colors = options.colors ?? [
6209
+ [0, "rgba(33, 102, 172, 0)"],
6210
+ [0.2, "#67a9cf"],
6211
+ [0.4, "#d1e5f0"],
6212
+ [0.6, "#fddbc7"],
6213
+ [0.8, "#ef8a62"],
6214
+ [1, "#b2182b"]
6215
+ ];
6216
+ if (colors.length < 2 || colors.some(([density], index) => {
6217
+ const previous = colors[index - 1]?.[0] ?? -1;
6218
+ return !(density >= 0 && density <= 1 && density > previous);
6219
+ })) {
6220
+ throw new Error("Tileflow heatmap colors need at least two increasing densities from 0 to 1.");
6221
+ }
6222
+ const paint = {
6223
+ "heatmap-color": ["interpolate", ["linear"], ["heatmap-density"], ...colors.flat()],
6224
+ "heatmap-intensity": options.intensity ?? 1,
6225
+ "heatmap-opacity": options.opacity ?? 0.8,
6226
+ "heatmap-radius": options.radius ?? 30,
6227
+ "heatmap-weight": options.weight ?? 1
6228
+ };
6229
+ return maplibreOverlay({
6230
+ layers: [
6231
+ {
6232
+ id: options.id,
6233
+ ...options.maxZoom === void 0 ? {} : { maxzoom: options.maxZoom },
6234
+ paint,
6235
+ ...options.sourceLayer === void 0 ? {} : { "source-layer": options.sourceLayer },
6236
+ type: "heatmap"
6237
+ }
6238
+ ],
6239
+ placement: options.placement,
6240
+ source: options.source
6241
+ });
6242
+ }
6243
+ function pickClusterOptions(source) {
6244
+ return {
6245
+ ...source.cluster === void 0 ? {} : { cluster: source.cluster },
6246
+ ...source.clusterMaxZoom === void 0 ? {} : { clusterMaxZoom: source.clusterMaxZoom },
6247
+ ...source.clusterMinPoints === void 0 ? {} : { clusterMinPoints: source.clusterMinPoints },
6248
+ ...source.clusterProperties === void 0 ? {} : { clusterProperties: cloneJson(source.clusterProperties) },
6249
+ ...source.clusterRadius === void 0 ? {} : { clusterRadius: source.clusterRadius }
6250
+ };
6251
+ }
6252
+ function assertClusterOptions(options) {
6253
+ const { cluster, clusterMaxZoom, clusterMinPoints, clusterProperties, clusterRadius } = options;
6254
+ if (cluster !== void 0 && typeof cluster !== "boolean") {
6255
+ throw new Error("Tileflow GeoJSON cluster must be a boolean.");
6256
+ }
6257
+ if (clusterRadius !== void 0 && !(Number.isFinite(clusterRadius) && clusterRadius > 0)) {
6258
+ throw new Error("Tileflow clusterRadius must be a positive number of pixels.");
6259
+ }
6260
+ if (clusterMaxZoom !== void 0 && !(Number.isFinite(clusterMaxZoom) && clusterMaxZoom >= 0 && clusterMaxZoom <= 24)) {
6261
+ throw new Error("Tileflow clusterMaxZoom must be a zoom from 0 to 24.");
6262
+ }
6263
+ if (clusterMinPoints !== void 0 && !(Number.isInteger(clusterMinPoints) && clusterMinPoints >= 2)) {
6264
+ throw new Error("Tileflow clusterMinPoints must be an integer of at least 2.");
6265
+ }
6266
+ if (!cluster && [clusterMaxZoom, clusterMinPoints, clusterProperties, clusterRadius].some(
6267
+ (value) => value !== void 0
6268
+ )) {
6269
+ throw new Error("Tileflow cluster options require cluster: true.");
6270
+ }
6271
+ for (const [name, value] of Object.entries(clusterProperties ?? {})) {
6272
+ if (!Array.isArray(value) || value.length !== 2) {
6273
+ throw new Error(`Tileflow clusterProperties.${name} must be [operator, mapExpression].`);
6274
+ }
6275
+ }
6276
+ }
6277
+ function isHttpsUrl(value) {
6278
+ try {
6279
+ return new URL(value).protocol === "https:";
6280
+ } catch {
6281
+ return false;
6282
+ }
6283
+ }
6284
+ function cloneJson(value) {
6285
+ if (Array.isArray(value)) return value.map(cloneJson);
6286
+ if (!isPlainRecord(value)) return value;
6287
+ return Object.fromEntries(
6288
+ Object.entries(value).map(([key, child]) => [key, cloneJson(child)])
6289
+ );
6290
+ }
6291
+ function isPlainRecord(value) {
6292
+ if (!value || typeof value !== "object" || Array.isArray(value)) return false;
6293
+ const prototype = Object.getPrototypeOf(value);
6294
+ return prototype === Object.prototype || prototype === null;
6295
+ }
6296
+
6297
+ // src/runtime.ts
6064
6298
  var defaultTileflowRuntimeView = Object.freeze({
6065
6299
  bearing: 0,
6066
6300
  center: [0, 20],
@@ -6530,10 +6764,14 @@ export {
6530
6764
  TileflowNativeSourceError,
6531
6765
  TileflowNativeUrlError,
6532
6766
  TileflowThemeBlendError,
6767
+ clusterOverlay,
6533
6768
  createBoundaryFeatureState,
6534
6769
  createTileflowNativeSourceController,
6535
6770
  fillTileflowThemeBlendTemplate,
6771
+ geojsonSource,
6772
+ heatmapOverlay,
6536
6773
  loadTileflowNativeManifest,
6774
+ maplibreOverlay,
6537
6775
  nearestTileflowBlendTheme,
6538
6776
  parseTileflowMobileDiscovery,
6539
6777
  planTileflowThemeBlend,
package/dist/runtime.d.ts CHANGED
@@ -1 +1 @@
1
- export { L as TileflowAnalytics, cb as TileflowAppearanceSelection, cc as TileflowColorOverrides, ab as TileflowManifestFetchOptions, ac as TileflowManifestLoadOptions, ad as TileflowMapMode, ae as TileflowMapModeOptions, ar as TileflowResolvedRuntimeTheme, aP as TileflowRuntimeCenterLike, a as TileflowRuntimeColorScheme, T as TileflowRuntimeManifest, aQ as TileflowRuntimeManifestMap, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, aR as TileflowRuntimeSource, aS as TileflowRuntimeSourceValidation, aT as TileflowRuntimeStyle, aU as TileflowRuntimeStyleOptions, d as TileflowRuntimeSystemThemes, aV as TileflowRuntimeViewOptions, aW as TileflowSessionController, aX as TileflowSessionGrantResponse, j as TileflowStyleFamily, a_ as TileflowStyleFontFace, bj as TileflowThemeBlendSelection, bq as TileflowThemeSelection, e as TileflowTimeOfDay, f as TileflowTimeOfDayVariants, cd as applyTileflowColorOverrides, by as assertValidTileflowRuntimeSource, bz as clearTileflowManifestCache, bB as createTileflowSessionController, bC as createTileflowSessionId, bD as defaultTileflowManifestUrl, bE as defaultTileflowRuntimeView, l as expandTileflowFamilyTemplate, bG as getTileflowAnalyticsApiUrl, bH as getTileflowStyleFontFaces, bI as inferTileflowAnalyticsFromStyleUrl, bJ as isTileflowTimeOfDay, bK as loadTileflowManifest, ce as loadTileflowRuntimeAppearance, cf as loadTileflowStyleFamily, n as materializeTileflowStyleFamily, bL as mergeTileflowAnalytics, bM as nearestTileflowBlendTheme, bN as normalizeTileflowRuntimeCenter, bO as normalizeTileflowStaticImageSize, cg as normalizeTileflowSurfaceId, bP as normalizeTileflowUrl, p as parseTileflowStyleFamily, ch as prepareTileflowStyleFamilyForRendering, bQ as resolveTileflowAnalyticsRequestUrl, ci as resolveTileflowAppearance, cj as resolveTileflowFamilyResourceUrls, bR as resolveTileflowManifestMap, bS as resolveTileflowMapMode, bT as resolveTileflowRuntimeStyle, bU as resolveTileflowRuntimeTheme, bV as resolveTileflowRuntimeThemeBlend, bW as resolveTileflowRuntimeView, bX as resolveTileflowStaticImageUrl, ck as resolveTileflowStyleResourceUrls, bY as shouldLoadTileflowManifest, bZ as startTileflowSession, o as tileflowStyleFamilyLimits, b$ as tileflowStyleFontFaceLimits, c0 as tileflowStyleFontFacesMetadataKey, c1 as tileflowThemeBlendLimits, c3 as tileflowTimesOfDay, c5 as validateTileflowRuntimeSource, c6 as validateTileflowThemeBlendSelection, c7 as validateTileflowThemeSelection, w as withTileflowFamilyTemplate } from './manifest-types-GeYn0SQM.js';
1
+ export { R as TileflowAnalytics, cy as TileflowAppearanceSelection, cz as TileflowColorOverrides, an as TileflowManifestFetchOptions, ao as TileflowManifestLoadOptions, aq as TileflowMapMode, ar as TileflowMapModeOptions, aG as TileflowResolvedRuntimeTheme, b2 as TileflowRuntimeCenterLike, a as TileflowRuntimeColorScheme, T as TileflowRuntimeManifest, b3 as TileflowRuntimeManifestMap, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, b4 as TileflowRuntimeSource, b5 as TileflowRuntimeSourceValidation, b6 as TileflowRuntimeStyle, b7 as TileflowRuntimeStyleOptions, d as TileflowRuntimeSystemThemes, b8 as TileflowRuntimeViewOptions, b9 as TileflowSessionController, ba as TileflowSessionGrantResponse, j as TileflowStyleFamily, be as TileflowStyleFontFace, bz as TileflowThemeBlendSelection, bG as TileflowThemeSelection, e as TileflowTimeOfDay, f as TileflowTimeOfDayVariants, cA as applyTileflowColorOverrides, bO as assertValidTileflowRuntimeSource, bP as clearTileflowManifestCache, bQ as clusterOverlay, bS as createTileflowSessionController, bT as createTileflowSessionId, bU as defaultTileflowManifestUrl, bV as defaultTileflowRuntimeView, l as expandTileflowFamilyTemplate, bX as geojsonSource, bY as getTileflowAnalyticsApiUrl, bZ as getTileflowStyleFontFaces, b_ as heatmapOverlay, c0 as inferTileflowAnalyticsFromStyleUrl, c2 as isTileflowTimeOfDay, c3 as loadTileflowManifest, cB as loadTileflowRuntimeAppearance, cC as loadTileflowStyleFamily, c4 as maplibreOverlay, n as materializeTileflowStyleFamily, c5 as mergeTileflowAnalytics, c6 as nearestTileflowBlendTheme, c7 as normalizeTileflowRuntimeCenter, c8 as normalizeTileflowStaticImageSize, cD as normalizeTileflowSurfaceId, c9 as normalizeTileflowUrl, p as parseTileflowStyleFamily, cE as prepareTileflowStyleFamilyForRendering, cb as resolveTileflowAnalyticsRequestUrl, cF as resolveTileflowAppearance, cG as resolveTileflowFamilyResourceUrls, cc as resolveTileflowManifestMap, cd as resolveTileflowMapMode, ce as resolveTileflowRuntimeStyle, cf as resolveTileflowRuntimeTheme, cg as resolveTileflowRuntimeThemeBlend, ch as resolveTileflowRuntimeView, ci as resolveTileflowStaticImageUrl, cH as resolveTileflowStyleResourceUrls, cj as shouldLoadTileflowManifest, ck as startTileflowSession, o as tileflowStyleFamilyLimits, cm as tileflowStyleFontFaceLimits, cn as tileflowStyleFontFacesMetadataKey, co as tileflowThemeBlendLimits, cq as tileflowTimesOfDay, cs as validateTileflowRuntimeSource, ct as validateTileflowThemeBlendSelection, cu as validateTileflowThemeSelection, w as withTileflowFamilyTemplate } from './manifest-types-U7JPDNAo.js';