@chrtco/sdk 0.10.7 → 0.10.9
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/CHANGELOG.md +16 -0
- package/dist/index.cjs +500 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +60 -7
- package/dist/index.d.ts +60 -7
- package/dist/index.js +498 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -114,11 +114,15 @@ declare function buildOfflineStyle(onlineStyle: MapLibreStyle, mbtilesPath: stri
|
|
|
114
114
|
* baremetal NDJSON export time). NOAA's cell-id format encodes the source
|
|
115
115
|
* scale band as the third character: `US5MA85M` is band 5 (Harbor).
|
|
116
116
|
*
|
|
117
|
-
*
|
|
118
|
-
* band
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
117
|
+
* We emit one layer copy per band, each with a static band filter and a
|
|
118
|
+
* per-band `minzoom`. The ranges deliberately have NO `maxzoom` and are
|
|
119
|
+
* NOT exclusive: bands cascade — every band whose floor is satisfied
|
|
120
|
+
* renders, deeper bands paint over coarser ones, and the coarser bands
|
|
121
|
+
* ARE the fallback wherever finer coverage is missing (see
|
|
122
|
+
* BAND_PRIORITY_RANGES below). An earlier design hard-swapped exactly
|
|
123
|
+
* one band per zoom window; that shipped visible voids wherever the
|
|
124
|
+
* active band had no data and was replaced by the cascade — do not
|
|
125
|
+
* reintroduce per-band `maxzoom` here.
|
|
122
126
|
*
|
|
123
127
|
* Long-term cleanup: baremetal should emit a normalized `_band: 1..6`
|
|
124
128
|
* integer in NDJSON so this works for non-NOAA chart sources too. The
|
|
@@ -1380,6 +1384,25 @@ interface StyleUrlOptions {
|
|
|
1380
1384
|
* `CHRT_STYLE_MODES`). The served document echoes the resolved mode in
|
|
1381
1385
|
* `metadata["chrt:render-mode"]` and the `X-Style-Mode` header. */
|
|
1382
1386
|
mode?: ChrtStyleMode;
|
|
1387
|
+
/** Draw the CHRTland land base under the chart (default off). Adds the
|
|
1388
|
+
* `CHRT_LAND` source and a dozen `chrtland-*` layers, all beneath every
|
|
1389
|
+
* S-57 class so land can never occlude a portrayal.
|
|
1390
|
+
*
|
|
1391
|
+
* **CHRTland is not chart data and does not come from a hydrographic
|
|
1392
|
+
* office** — never present its shoreline to a mariner as charted.
|
|
1393
|
+
*
|
|
1394
|
+
* Needs `CHRT_LAND` on the tile token, which follows the chart sources
|
|
1395
|
+
* your key holds; without it the style request is a 403
|
|
1396
|
+
* `region_not_licensed` rather than a document with dead sources. */
|
|
1397
|
+
land?: boolean;
|
|
1398
|
+
/** Add CHRTland's terrarium hillshade (default off). Separately opt-in
|
|
1399
|
+
* from {@link land} and requires it — `relief` alone is a 400
|
|
1400
|
+
* `relief_requires_land`.
|
|
1401
|
+
*
|
|
1402
|
+
* It also needs a `CHRT_RELIEF` grant that no chart source issues yet,
|
|
1403
|
+
* so this currently returns 403 for every key. It will start working
|
|
1404
|
+
* with no SDK change once that grant ships. */
|
|
1405
|
+
relief?: boolean;
|
|
1383
1406
|
}
|
|
1384
1407
|
interface FetchStyleOptions extends StyleUrlOptions {
|
|
1385
1408
|
signal?: AbortSignal;
|
|
@@ -2989,7 +3012,26 @@ interface PmtilesVectorSource {
|
|
|
2989
3012
|
minzoom: number;
|
|
2990
3013
|
maxzoom: number;
|
|
2991
3014
|
}
|
|
3015
|
+
/**
|
|
3016
|
+
* Terrarium elevation, served as PNG from `CHRT_RELIEF`. Separate from the
|
|
3017
|
+
* vector shapes because MapLibre needs `type: "raster-dem"` and an explicit
|
|
3018
|
+
* `encoding` — a raster-dem source read as a plain raster renders the encoded
|
|
3019
|
+
* RGB as a garish false-colour image rather than as elevation.
|
|
3020
|
+
*/
|
|
3021
|
+
interface RasterDemSource {
|
|
3022
|
+
type: "raster-dem";
|
|
3023
|
+
tiles: string[];
|
|
3024
|
+
encoding: "terrarium";
|
|
3025
|
+
tileSize: number;
|
|
3026
|
+
minzoom: number;
|
|
3027
|
+
maxzoom: number;
|
|
3028
|
+
}
|
|
2992
3029
|
type VectorSourceSpec = MapboxVectorSource | PmtilesVectorSource;
|
|
3030
|
+
type AnySourceSpec = VectorSourceSpec | RasterDemSource;
|
|
3031
|
+
/** CHRTland's vector land base. ADR 0023: its own archive, never chart data. */
|
|
3032
|
+
declare const LAND_REGION = "CHRT_LAND";
|
|
3033
|
+
/** CHRTland's terrarium relief. */
|
|
3034
|
+
declare const RELIEF_REGION = "CHRT_RELIEF";
|
|
2993
3035
|
type SourceMode = "mapbox" | "pmtiles";
|
|
2994
3036
|
/** Canonical source id used in `generateStyle()` — matches the region name
|
|
2995
3037
|
* of the one consolidated PMTiles served by the tile-worker for this region. */
|
|
@@ -3006,6 +3048,17 @@ interface BuildSourcesOptions {
|
|
|
3006
3048
|
buildTag?: string;
|
|
3007
3049
|
/** Override tile-worker origin (e.g. staging). Default: DEFAULT_TILE_BASE_URL. */
|
|
3008
3050
|
tileBaseUrl?: string;
|
|
3051
|
+
/**
|
|
3052
|
+
* Emit the CHRTland vector land base as a second source (ADR 0023). Off by
|
|
3053
|
+
* default: it costs a source, and the region must be granted on the token.
|
|
3054
|
+
*/
|
|
3055
|
+
land?: boolean;
|
|
3056
|
+
/**
|
|
3057
|
+
* Emit CHRTland's terrarium relief as a raster-dem source. Separate from
|
|
3058
|
+
* `land` because relief needs a raster-capable worker AND a grant that
|
|
3059
|
+
* `land-regions.ts` still withholds.
|
|
3060
|
+
*/
|
|
3061
|
+
relief?: boolean;
|
|
3009
3062
|
}
|
|
3010
3063
|
/**
|
|
3011
3064
|
* Build the "sources" block for a CHRT style.
|
|
@@ -3015,7 +3068,7 @@ interface BuildSourcesOptions {
|
|
|
3015
3068
|
* routed by the Worker to the one consolidated PMTiles:
|
|
3016
3069
|
* `${tileBaseUrl}/v1/tiles/{region}/{z}/{x}/{y}.mvt`
|
|
3017
3070
|
*/
|
|
3018
|
-
declare function buildSources(opts?: BuildSourcesOptions): Record<string,
|
|
3071
|
+
declare function buildSources(opts?: BuildSourcesOptions): Record<string, AnySourceSpec>;
|
|
3019
3072
|
|
|
3020
3073
|
/**
|
|
3021
3074
|
* Builds Mapbox GL Style layer specs from S-52 lookup entries.
|
|
@@ -4256,4 +4309,4 @@ declare class Chrt {
|
|
|
4256
4309
|
warmTiles(region?: string): Promise<void>;
|
|
4257
4310
|
}
|
|
4258
4311
|
|
|
4259
|
-
export { ALL_NAV_AID_LAYERS, ALL_WATER_BODY_LAYERS, AREA_QUERY_LAYERS, ATON_EXPRESSION_CLASSES, type AheadCoverageCell, type AheadFeatureProperties, type AheadOptions, type AheadResponse, type AlongRouteFeatureProperties, type AlongRouteOptions, type AlongRouteResponse, type AreaInspectResult, type AtlasStyle, type AttachOptions, BAND_DRAW_ORDER, BAND_PRIORITY_RANGES, type BBox, BRIDGE_QUERY_LAYERS, BUILD_MAXZOOM, BUILD_MINZOOM, type BandCode, type BandPriorityRange, type BridgeInspectResult, type BuildOfflineStyleOptions, type BuildSourcesOptions, CHART_BAND_CODES, CHART_CASCADE_CODES, CHART_SECTIONS, CHRTRASTER_REF_CROPS, CHRTRASTER_SVGS, CHRT_ATON_COLORS, CHRT_GLYPH_NAMES, CHRT_GLYPH_SVGS, CHRT_ICON_EXPRESSIONS, CHRT_ICON_PREFIX, CHRT_SDF_GLYPHS, CHRT_STYLE_MODES, type CandidateQueryOptions, type CandidatesEventContext, type CellDeletedEvent, type CellDetail, type CellEventData, type CellNewEvent, type CellUpdatedData, type CellUpdatedEvent, type CellsOptions, type CellsResponse, type ChartSection, Chrt, type ChrtConfig, ChrtError, type ChrtStyleMode, type ChrtStyleOptions, type ChrtStyleTheme, type ChrtSymbolSet, type ClickAnchor, ColorTableName, type CoverageOptions, type CoverageResponse, type CoverageRouteCell, type CoverageRouteOptions, type CoverageRouteResponse, type CoverageSource, type CustomStyleConfig, DEFAULT_CLICK_TOLERANCE, DEFAULT_CUSTOM_STYLE_CONFIG, DEFAULT_INSPECT_CLASS_RANK, DEFAULT_LABEL_SETTINGS, DEFAULT_NAV_AID_SETTINGS, DEFAULT_REGION, DEFAULT_SAFETY_CONTOUR_M, DEFAULT_SOUNDING_SETTINGS, DEFAULT_TILE_BASE_URL, DEFAULT_TILE_REGION, DEFAULT_WATER_BODY_SETTINGS, type DecodedAreaFeature, type DecodedBridge, type DecodedNavAid, type DecodedProperty, type DisplayCategory, type DisplayMode, type FeatureCollection, type FeaturesOptions, type FetchStyleOptions, FileSystemAdapter, type FlashPattern, type FlashPhase, type GenerateCustomStyleOptions, type GeneratedCustomStyle, type GeoJsonFeature, type GeoJsonGeometry, type GeomType, INSPECT_CLASS_RANK, INSPECT_RANK_DEVIATIONS, type InspectCandidate, type InspectCandidateSet, type InspectEnrichment, type InspectEventContext, type InspectNotice, type InspectOptions, type InspectResult, type InspectTargetClass, type InspectableFeature, InteractClient, type InteractEntitlement, InteractError, type InteractErrorCode, type InteractHandle, type InteractMapLike, type InteractMapMouseEvent, LABELED_LAYERS, LABEL_BEHAVIOR, LABEL_LAYER_GROUPS, LABEL_PRIORITY, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LookupEntry, type MapLibreStyle, type MapboxStyle, type MapboxVectorSource, type MarineAlert, type MarineAlertsOptions, type MarineAlertsResponse, type MarineConditionsOptions, type MarineConditionsResponse, type MarineForecastOptions, type MarineForecastPeriod, type MarineForecastResponse, type MarineSeas, type MarineStation, type MarineSwellTrain, type MarineWind, type MarineZoneRef, NAUTICAL_SYMBOLS, NAV_AID_LAYER_GROUPS, NAV_AID_QUERY_LAYERS, NON_SOLAS_DISCLAIMER, NON_SOLAS_DISCLAIMER_SHORT, type NauticalCategory, type NauticalSymbol, type NavAidInspectResult, type NavAidSettings, type NearbyMarineStation, type OfflineBundleResponse, type OfflineDownloadOptions, type OfflineDownloadProgress, type OfflineDownloadResult, OfflineError, type OfflineErrorCode, type OfflineFetchStyleOptions, type OfflineHeartbeatOptions, type OfflineRegionSummary, type OfflineRemoveOptions, OfflineStyleError, type OfflineStylePlatform, type OfflineStyleResponse, type PmtilesVectorSource, type QueryFeatureProperties, type QueryOptions, type QueryResponse, RASTER_ATON_CLASSES, RASTER_GLYPH_NAMES, RASTER_ICON_PREFIX, type ResolvedStyle, type ResolvedTheme, type S101ArtworkProvenance, type S101Feature, S101_AREA_FILL_NAMES, S101_CHART_SECTIONS, S101_FEATURES, S101_ICON_PREFIX, S101_LINE_STYLE_NAMES, S101_NEW_SYMBOLS, S101_NO_OFFICIAL_COUNTERPART, S101_SOURCE_COMMIT, S101_SYMBOL_GROUPS, S101_SYMBOL_NAMES, S52_ATON_LOOKUPS, S52_ATON_LOOKUPS_PAPER, S52_DRAW_ORDER, S52_LOOKUP, S52_PATTERN_SPRITE_PREFIX, SOUNDING_LAYERS, SYMBOL_FAMILIES, SYMBOL_FAMILY_META, SYMBOL_GROUPS, SYMBOL_MAP, type ScaleBand, type SearchCoverageNotice, type SearchHit, type SearchOptions, type SearchResponse, type SectorArcFeature, type SectorArcFeatureCollection, type SectorInfo, type SoundingSettings, type SourceMode, type StyleGeneratorOptions, type StyleLayer, type StyleUrlOptions, type SymbolFamily, type SymbolFamilyMeta, type SymbolGroup, TileAuth, type TileGroup, type TileGroupsResponse, TileTokenError, type TileTokenErrorCode, type TileTokenResponse, type TransformRequest, type TransformedRequest, type VectorSourceSpec, type VesselProfile, WATER_BODY_LAYER_GROUPS, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, applyRasterSymbolSet, applyS101SymbolSet, atonIconExpression, bandFilterExpression, buildFlashPattern, buildLabelLayer, buildLayersForClass, buildOfflineStyle, buildSectorArcGeoJSON, buildSectorArcsFC, buildSectorsFromFeatures, buildSources, candidateRank, chrtAtonTintExpression, chrtLightTintExpression, collectCandidates, collectClickCandidates, combineWithBandFilter, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeNavAidProps, depareColor, depareFillExpression, deriveMarinerName, extractNavAidDesignation, featureIdentity, generateCustomStyle, generateSpriteManifest, generateSpriteSheet, generateStyle, generateStyleJSON, getAvailableLineSymbols, getAvailablePatterns, getAvailablePointSymbols, getCollisionSettings, getDrawPriority, getGridSizeForZoom, getIconExpression, getLabelBehavior, getLabelConfig, getLabelPriority, getLookupEntry, getMaxCellsForZoom, getOrderedClasses, getRasterSvg, getS52SvgString, getS52SymbolStats, getStyleStats, getSymbolSvgString, getThemedS101Svg, getThemedS52Svg, getTopmarkMeaning, hazardColor, hazardFillExpression, iconExpressionForFamily, isLabelLayerVisible, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, labelSortKey, lateralColor, lateralFillExpression, lightColor, lightFillExpression, lightsIconExpression, normalizeStyleMode, normalizeTheme, paginate, parseListCodes, parseSymbolFamily, parseWebhook, patternSpriteId, preprocessLights, preprocessNavAids, preprocessSoundings, preprocessWaterBodies, rasterAtonIconExpression, resolveCustomTheme, resolveRasterImage, resolveS101Color, resolveStyle, resolveTargetClass, s101ArtworkProvenance, sanitizeCustomStyleConfig, scaleSizeValue, scaminToMinZoom, styleModeBand, withinBboxFilter, worldMinusBboxPolygon };
|
|
4312
|
+
export { ALL_NAV_AID_LAYERS, ALL_WATER_BODY_LAYERS, AREA_QUERY_LAYERS, ATON_EXPRESSION_CLASSES, type AheadCoverageCell, type AheadFeatureProperties, type AheadOptions, type AheadResponse, type AlongRouteFeatureProperties, type AlongRouteOptions, type AlongRouteResponse, type AreaInspectResult, type AtlasStyle, type AttachOptions, BAND_DRAW_ORDER, BAND_PRIORITY_RANGES, type BBox, BRIDGE_QUERY_LAYERS, BUILD_MAXZOOM, BUILD_MINZOOM, type BandCode, type BandPriorityRange, type BridgeInspectResult, type BuildOfflineStyleOptions, type BuildSourcesOptions, CHART_BAND_CODES, CHART_CASCADE_CODES, CHART_SECTIONS, CHRTRASTER_REF_CROPS, CHRTRASTER_SVGS, CHRT_ATON_COLORS, CHRT_GLYPH_NAMES, CHRT_GLYPH_SVGS, CHRT_ICON_EXPRESSIONS, CHRT_ICON_PREFIX, CHRT_SDF_GLYPHS, CHRT_STYLE_MODES, type CandidateQueryOptions, type CandidatesEventContext, type CellDeletedEvent, type CellDetail, type CellEventData, type CellNewEvent, type CellUpdatedData, type CellUpdatedEvent, type CellsOptions, type CellsResponse, type ChartSection, Chrt, type ChrtConfig, ChrtError, type ChrtStyleMode, type ChrtStyleOptions, type ChrtStyleTheme, type ChrtSymbolSet, type ClickAnchor, ColorTableName, type CoverageOptions, type CoverageResponse, type CoverageRouteCell, type CoverageRouteOptions, type CoverageRouteResponse, type CoverageSource, type CustomStyleConfig, DEFAULT_CLICK_TOLERANCE, DEFAULT_CUSTOM_STYLE_CONFIG, DEFAULT_INSPECT_CLASS_RANK, DEFAULT_LABEL_SETTINGS, DEFAULT_NAV_AID_SETTINGS, DEFAULT_REGION, DEFAULT_SAFETY_CONTOUR_M, DEFAULT_SOUNDING_SETTINGS, DEFAULT_TILE_BASE_URL, DEFAULT_TILE_REGION, DEFAULT_WATER_BODY_SETTINGS, type DecodedAreaFeature, type DecodedBridge, type DecodedNavAid, type DecodedProperty, type DisplayCategory, type DisplayMode, type FeatureCollection, type FeaturesOptions, type FetchStyleOptions, FileSystemAdapter, type FlashPattern, type FlashPhase, type GenerateCustomStyleOptions, type GeneratedCustomStyle, type GeoJsonFeature, type GeoJsonGeometry, type GeomType, INSPECT_CLASS_RANK, INSPECT_RANK_DEVIATIONS, type InspectCandidate, type InspectCandidateSet, type InspectEnrichment, type InspectEventContext, type InspectNotice, type InspectOptions, type InspectResult, type InspectTargetClass, type InspectableFeature, InteractClient, type InteractEntitlement, InteractError, type InteractErrorCode, type InteractHandle, type InteractMapLike, type InteractMapMouseEvent, LABELED_LAYERS, LABEL_BEHAVIOR, LABEL_LAYER_GROUPS, LABEL_PRIORITY, LAND_REGION, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LookupEntry, type MapLibreStyle, type MapboxStyle, type MapboxVectorSource, type MarineAlert, type MarineAlertsOptions, type MarineAlertsResponse, type MarineConditionsOptions, type MarineConditionsResponse, type MarineForecastOptions, type MarineForecastPeriod, type MarineForecastResponse, type MarineSeas, type MarineStation, type MarineSwellTrain, type MarineWind, type MarineZoneRef, NAUTICAL_SYMBOLS, NAV_AID_LAYER_GROUPS, NAV_AID_QUERY_LAYERS, NON_SOLAS_DISCLAIMER, NON_SOLAS_DISCLAIMER_SHORT, type NauticalCategory, type NauticalSymbol, type NavAidInspectResult, type NavAidSettings, type NearbyMarineStation, type OfflineBundleResponse, type OfflineDownloadOptions, type OfflineDownloadProgress, type OfflineDownloadResult, OfflineError, type OfflineErrorCode, type OfflineFetchStyleOptions, type OfflineHeartbeatOptions, type OfflineRegionSummary, type OfflineRemoveOptions, OfflineStyleError, type OfflineStylePlatform, type OfflineStyleResponse, type PmtilesVectorSource, type QueryFeatureProperties, type QueryOptions, type QueryResponse, RASTER_ATON_CLASSES, RASTER_GLYPH_NAMES, RASTER_ICON_PREFIX, RELIEF_REGION, type ResolvedStyle, type ResolvedTheme, type S101ArtworkProvenance, type S101Feature, S101_AREA_FILL_NAMES, S101_CHART_SECTIONS, S101_FEATURES, S101_ICON_PREFIX, S101_LINE_STYLE_NAMES, S101_NEW_SYMBOLS, S101_NO_OFFICIAL_COUNTERPART, S101_SOURCE_COMMIT, S101_SYMBOL_GROUPS, S101_SYMBOL_NAMES, S52_ATON_LOOKUPS, S52_ATON_LOOKUPS_PAPER, S52_DRAW_ORDER, S52_LOOKUP, S52_PATTERN_SPRITE_PREFIX, SOUNDING_LAYERS, SYMBOL_FAMILIES, SYMBOL_FAMILY_META, SYMBOL_GROUPS, SYMBOL_MAP, type ScaleBand, type SearchCoverageNotice, type SearchHit, type SearchOptions, type SearchResponse, type SectorArcFeature, type SectorArcFeatureCollection, type SectorInfo, type SoundingSettings, type SourceMode, type StyleGeneratorOptions, type StyleLayer, type StyleUrlOptions, type SymbolFamily, type SymbolFamilyMeta, type SymbolGroup, TileAuth, type TileGroup, type TileGroupsResponse, TileTokenError, type TileTokenErrorCode, type TileTokenResponse, type TransformRequest, type TransformedRequest, type VectorSourceSpec, type VesselProfile, WATER_BODY_LAYER_GROUPS, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, applyRasterSymbolSet, applyS101SymbolSet, atonIconExpression, bandFilterExpression, buildFlashPattern, buildLabelLayer, buildLayersForClass, buildOfflineStyle, buildSectorArcGeoJSON, buildSectorArcsFC, buildSectorsFromFeatures, buildSources, candidateRank, chrtAtonTintExpression, chrtLightTintExpression, collectCandidates, collectClickCandidates, combineWithBandFilter, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeNavAidProps, depareColor, depareFillExpression, deriveMarinerName, extractNavAidDesignation, featureIdentity, generateCustomStyle, generateSpriteManifest, generateSpriteSheet, generateStyle, generateStyleJSON, getAvailableLineSymbols, getAvailablePatterns, getAvailablePointSymbols, getCollisionSettings, getDrawPriority, getGridSizeForZoom, getIconExpression, getLabelBehavior, getLabelConfig, getLabelPriority, getLookupEntry, getMaxCellsForZoom, getOrderedClasses, getRasterSvg, getS52SvgString, getS52SymbolStats, getStyleStats, getSymbolSvgString, getThemedS101Svg, getThemedS52Svg, getTopmarkMeaning, hazardColor, hazardFillExpression, iconExpressionForFamily, isLabelLayerVisible, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, labelSortKey, lateralColor, lateralFillExpression, lightColor, lightFillExpression, lightsIconExpression, normalizeStyleMode, normalizeTheme, paginate, parseListCodes, parseSymbolFamily, parseWebhook, patternSpriteId, preprocessLights, preprocessNavAids, preprocessSoundings, preprocessWaterBodies, rasterAtonIconExpression, resolveCustomTheme, resolveRasterImage, resolveS101Color, resolveStyle, resolveTargetClass, s101ArtworkProvenance, sanitizeCustomStyleConfig, scaleSizeValue, scaminToMinZoom, styleModeBand, withinBboxFilter, worldMinusBboxPolygon };
|
package/dist/index.d.ts
CHANGED
|
@@ -114,11 +114,15 @@ declare function buildOfflineStyle(onlineStyle: MapLibreStyle, mbtilesPath: stri
|
|
|
114
114
|
* baremetal NDJSON export time). NOAA's cell-id format encodes the source
|
|
115
115
|
* scale band as the third character: `US5MA85M` is band 5 (Harbor).
|
|
116
116
|
*
|
|
117
|
-
*
|
|
118
|
-
* band
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
117
|
+
* We emit one layer copy per band, each with a static band filter and a
|
|
118
|
+
* per-band `minzoom`. The ranges deliberately have NO `maxzoom` and are
|
|
119
|
+
* NOT exclusive: bands cascade — every band whose floor is satisfied
|
|
120
|
+
* renders, deeper bands paint over coarser ones, and the coarser bands
|
|
121
|
+
* ARE the fallback wherever finer coverage is missing (see
|
|
122
|
+
* BAND_PRIORITY_RANGES below). An earlier design hard-swapped exactly
|
|
123
|
+
* one band per zoom window; that shipped visible voids wherever the
|
|
124
|
+
* active band had no data and was replaced by the cascade — do not
|
|
125
|
+
* reintroduce per-band `maxzoom` here.
|
|
122
126
|
*
|
|
123
127
|
* Long-term cleanup: baremetal should emit a normalized `_band: 1..6`
|
|
124
128
|
* integer in NDJSON so this works for non-NOAA chart sources too. The
|
|
@@ -1380,6 +1384,25 @@ interface StyleUrlOptions {
|
|
|
1380
1384
|
* `CHRT_STYLE_MODES`). The served document echoes the resolved mode in
|
|
1381
1385
|
* `metadata["chrt:render-mode"]` and the `X-Style-Mode` header. */
|
|
1382
1386
|
mode?: ChrtStyleMode;
|
|
1387
|
+
/** Draw the CHRTland land base under the chart (default off). Adds the
|
|
1388
|
+
* `CHRT_LAND` source and a dozen `chrtland-*` layers, all beneath every
|
|
1389
|
+
* S-57 class so land can never occlude a portrayal.
|
|
1390
|
+
*
|
|
1391
|
+
* **CHRTland is not chart data and does not come from a hydrographic
|
|
1392
|
+
* office** — never present its shoreline to a mariner as charted.
|
|
1393
|
+
*
|
|
1394
|
+
* Needs `CHRT_LAND` on the tile token, which follows the chart sources
|
|
1395
|
+
* your key holds; without it the style request is a 403
|
|
1396
|
+
* `region_not_licensed` rather than a document with dead sources. */
|
|
1397
|
+
land?: boolean;
|
|
1398
|
+
/** Add CHRTland's terrarium hillshade (default off). Separately opt-in
|
|
1399
|
+
* from {@link land} and requires it — `relief` alone is a 400
|
|
1400
|
+
* `relief_requires_land`.
|
|
1401
|
+
*
|
|
1402
|
+
* It also needs a `CHRT_RELIEF` grant that no chart source issues yet,
|
|
1403
|
+
* so this currently returns 403 for every key. It will start working
|
|
1404
|
+
* with no SDK change once that grant ships. */
|
|
1405
|
+
relief?: boolean;
|
|
1383
1406
|
}
|
|
1384
1407
|
interface FetchStyleOptions extends StyleUrlOptions {
|
|
1385
1408
|
signal?: AbortSignal;
|
|
@@ -2989,7 +3012,26 @@ interface PmtilesVectorSource {
|
|
|
2989
3012
|
minzoom: number;
|
|
2990
3013
|
maxzoom: number;
|
|
2991
3014
|
}
|
|
3015
|
+
/**
|
|
3016
|
+
* Terrarium elevation, served as PNG from `CHRT_RELIEF`. Separate from the
|
|
3017
|
+
* vector shapes because MapLibre needs `type: "raster-dem"` and an explicit
|
|
3018
|
+
* `encoding` — a raster-dem source read as a plain raster renders the encoded
|
|
3019
|
+
* RGB as a garish false-colour image rather than as elevation.
|
|
3020
|
+
*/
|
|
3021
|
+
interface RasterDemSource {
|
|
3022
|
+
type: "raster-dem";
|
|
3023
|
+
tiles: string[];
|
|
3024
|
+
encoding: "terrarium";
|
|
3025
|
+
tileSize: number;
|
|
3026
|
+
minzoom: number;
|
|
3027
|
+
maxzoom: number;
|
|
3028
|
+
}
|
|
2992
3029
|
type VectorSourceSpec = MapboxVectorSource | PmtilesVectorSource;
|
|
3030
|
+
type AnySourceSpec = VectorSourceSpec | RasterDemSource;
|
|
3031
|
+
/** CHRTland's vector land base. ADR 0023: its own archive, never chart data. */
|
|
3032
|
+
declare const LAND_REGION = "CHRT_LAND";
|
|
3033
|
+
/** CHRTland's terrarium relief. */
|
|
3034
|
+
declare const RELIEF_REGION = "CHRT_RELIEF";
|
|
2993
3035
|
type SourceMode = "mapbox" | "pmtiles";
|
|
2994
3036
|
/** Canonical source id used in `generateStyle()` — matches the region name
|
|
2995
3037
|
* of the one consolidated PMTiles served by the tile-worker for this region. */
|
|
@@ -3006,6 +3048,17 @@ interface BuildSourcesOptions {
|
|
|
3006
3048
|
buildTag?: string;
|
|
3007
3049
|
/** Override tile-worker origin (e.g. staging). Default: DEFAULT_TILE_BASE_URL. */
|
|
3008
3050
|
tileBaseUrl?: string;
|
|
3051
|
+
/**
|
|
3052
|
+
* Emit the CHRTland vector land base as a second source (ADR 0023). Off by
|
|
3053
|
+
* default: it costs a source, and the region must be granted on the token.
|
|
3054
|
+
*/
|
|
3055
|
+
land?: boolean;
|
|
3056
|
+
/**
|
|
3057
|
+
* Emit CHRTland's terrarium relief as a raster-dem source. Separate from
|
|
3058
|
+
* `land` because relief needs a raster-capable worker AND a grant that
|
|
3059
|
+
* `land-regions.ts` still withholds.
|
|
3060
|
+
*/
|
|
3061
|
+
relief?: boolean;
|
|
3009
3062
|
}
|
|
3010
3063
|
/**
|
|
3011
3064
|
* Build the "sources" block for a CHRT style.
|
|
@@ -3015,7 +3068,7 @@ interface BuildSourcesOptions {
|
|
|
3015
3068
|
* routed by the Worker to the one consolidated PMTiles:
|
|
3016
3069
|
* `${tileBaseUrl}/v1/tiles/{region}/{z}/{x}/{y}.mvt`
|
|
3017
3070
|
*/
|
|
3018
|
-
declare function buildSources(opts?: BuildSourcesOptions): Record<string,
|
|
3071
|
+
declare function buildSources(opts?: BuildSourcesOptions): Record<string, AnySourceSpec>;
|
|
3019
3072
|
|
|
3020
3073
|
/**
|
|
3021
3074
|
* Builds Mapbox GL Style layer specs from S-52 lookup entries.
|
|
@@ -4256,4 +4309,4 @@ declare class Chrt {
|
|
|
4256
4309
|
warmTiles(region?: string): Promise<void>;
|
|
4257
4310
|
}
|
|
4258
4311
|
|
|
4259
|
-
export { ALL_NAV_AID_LAYERS, ALL_WATER_BODY_LAYERS, AREA_QUERY_LAYERS, ATON_EXPRESSION_CLASSES, type AheadCoverageCell, type AheadFeatureProperties, type AheadOptions, type AheadResponse, type AlongRouteFeatureProperties, type AlongRouteOptions, type AlongRouteResponse, type AreaInspectResult, type AtlasStyle, type AttachOptions, BAND_DRAW_ORDER, BAND_PRIORITY_RANGES, type BBox, BRIDGE_QUERY_LAYERS, BUILD_MAXZOOM, BUILD_MINZOOM, type BandCode, type BandPriorityRange, type BridgeInspectResult, type BuildOfflineStyleOptions, type BuildSourcesOptions, CHART_BAND_CODES, CHART_CASCADE_CODES, CHART_SECTIONS, CHRTRASTER_REF_CROPS, CHRTRASTER_SVGS, CHRT_ATON_COLORS, CHRT_GLYPH_NAMES, CHRT_GLYPH_SVGS, CHRT_ICON_EXPRESSIONS, CHRT_ICON_PREFIX, CHRT_SDF_GLYPHS, CHRT_STYLE_MODES, type CandidateQueryOptions, type CandidatesEventContext, type CellDeletedEvent, type CellDetail, type CellEventData, type CellNewEvent, type CellUpdatedData, type CellUpdatedEvent, type CellsOptions, type CellsResponse, type ChartSection, Chrt, type ChrtConfig, ChrtError, type ChrtStyleMode, type ChrtStyleOptions, type ChrtStyleTheme, type ChrtSymbolSet, type ClickAnchor, ColorTableName, type CoverageOptions, type CoverageResponse, type CoverageRouteCell, type CoverageRouteOptions, type CoverageRouteResponse, type CoverageSource, type CustomStyleConfig, DEFAULT_CLICK_TOLERANCE, DEFAULT_CUSTOM_STYLE_CONFIG, DEFAULT_INSPECT_CLASS_RANK, DEFAULT_LABEL_SETTINGS, DEFAULT_NAV_AID_SETTINGS, DEFAULT_REGION, DEFAULT_SAFETY_CONTOUR_M, DEFAULT_SOUNDING_SETTINGS, DEFAULT_TILE_BASE_URL, DEFAULT_TILE_REGION, DEFAULT_WATER_BODY_SETTINGS, type DecodedAreaFeature, type DecodedBridge, type DecodedNavAid, type DecodedProperty, type DisplayCategory, type DisplayMode, type FeatureCollection, type FeaturesOptions, type FetchStyleOptions, FileSystemAdapter, type FlashPattern, type FlashPhase, type GenerateCustomStyleOptions, type GeneratedCustomStyle, type GeoJsonFeature, type GeoJsonGeometry, type GeomType, INSPECT_CLASS_RANK, INSPECT_RANK_DEVIATIONS, type InspectCandidate, type InspectCandidateSet, type InspectEnrichment, type InspectEventContext, type InspectNotice, type InspectOptions, type InspectResult, type InspectTargetClass, type InspectableFeature, InteractClient, type InteractEntitlement, InteractError, type InteractErrorCode, type InteractHandle, type InteractMapLike, type InteractMapMouseEvent, LABELED_LAYERS, LABEL_BEHAVIOR, LABEL_LAYER_GROUPS, LABEL_PRIORITY, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LookupEntry, type MapLibreStyle, type MapboxStyle, type MapboxVectorSource, type MarineAlert, type MarineAlertsOptions, type MarineAlertsResponse, type MarineConditionsOptions, type MarineConditionsResponse, type MarineForecastOptions, type MarineForecastPeriod, type MarineForecastResponse, type MarineSeas, type MarineStation, type MarineSwellTrain, type MarineWind, type MarineZoneRef, NAUTICAL_SYMBOLS, NAV_AID_LAYER_GROUPS, NAV_AID_QUERY_LAYERS, NON_SOLAS_DISCLAIMER, NON_SOLAS_DISCLAIMER_SHORT, type NauticalCategory, type NauticalSymbol, type NavAidInspectResult, type NavAidSettings, type NearbyMarineStation, type OfflineBundleResponse, type OfflineDownloadOptions, type OfflineDownloadProgress, type OfflineDownloadResult, OfflineError, type OfflineErrorCode, type OfflineFetchStyleOptions, type OfflineHeartbeatOptions, type OfflineRegionSummary, type OfflineRemoveOptions, OfflineStyleError, type OfflineStylePlatform, type OfflineStyleResponse, type PmtilesVectorSource, type QueryFeatureProperties, type QueryOptions, type QueryResponse, RASTER_ATON_CLASSES, RASTER_GLYPH_NAMES, RASTER_ICON_PREFIX, type ResolvedStyle, type ResolvedTheme, type S101ArtworkProvenance, type S101Feature, S101_AREA_FILL_NAMES, S101_CHART_SECTIONS, S101_FEATURES, S101_ICON_PREFIX, S101_LINE_STYLE_NAMES, S101_NEW_SYMBOLS, S101_NO_OFFICIAL_COUNTERPART, S101_SOURCE_COMMIT, S101_SYMBOL_GROUPS, S101_SYMBOL_NAMES, S52_ATON_LOOKUPS, S52_ATON_LOOKUPS_PAPER, S52_DRAW_ORDER, S52_LOOKUP, S52_PATTERN_SPRITE_PREFIX, SOUNDING_LAYERS, SYMBOL_FAMILIES, SYMBOL_FAMILY_META, SYMBOL_GROUPS, SYMBOL_MAP, type ScaleBand, type SearchCoverageNotice, type SearchHit, type SearchOptions, type SearchResponse, type SectorArcFeature, type SectorArcFeatureCollection, type SectorInfo, type SoundingSettings, type SourceMode, type StyleGeneratorOptions, type StyleLayer, type StyleUrlOptions, type SymbolFamily, type SymbolFamilyMeta, type SymbolGroup, TileAuth, type TileGroup, type TileGroupsResponse, TileTokenError, type TileTokenErrorCode, type TileTokenResponse, type TransformRequest, type TransformedRequest, type VectorSourceSpec, type VesselProfile, WATER_BODY_LAYER_GROUPS, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, applyRasterSymbolSet, applyS101SymbolSet, atonIconExpression, bandFilterExpression, buildFlashPattern, buildLabelLayer, buildLayersForClass, buildOfflineStyle, buildSectorArcGeoJSON, buildSectorArcsFC, buildSectorsFromFeatures, buildSources, candidateRank, chrtAtonTintExpression, chrtLightTintExpression, collectCandidates, collectClickCandidates, combineWithBandFilter, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeNavAidProps, depareColor, depareFillExpression, deriveMarinerName, extractNavAidDesignation, featureIdentity, generateCustomStyle, generateSpriteManifest, generateSpriteSheet, generateStyle, generateStyleJSON, getAvailableLineSymbols, getAvailablePatterns, getAvailablePointSymbols, getCollisionSettings, getDrawPriority, getGridSizeForZoom, getIconExpression, getLabelBehavior, getLabelConfig, getLabelPriority, getLookupEntry, getMaxCellsForZoom, getOrderedClasses, getRasterSvg, getS52SvgString, getS52SymbolStats, getStyleStats, getSymbolSvgString, getThemedS101Svg, getThemedS52Svg, getTopmarkMeaning, hazardColor, hazardFillExpression, iconExpressionForFamily, isLabelLayerVisible, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, labelSortKey, lateralColor, lateralFillExpression, lightColor, lightFillExpression, lightsIconExpression, normalizeStyleMode, normalizeTheme, paginate, parseListCodes, parseSymbolFamily, parseWebhook, patternSpriteId, preprocessLights, preprocessNavAids, preprocessSoundings, preprocessWaterBodies, rasterAtonIconExpression, resolveCustomTheme, resolveRasterImage, resolveS101Color, resolveStyle, resolveTargetClass, s101ArtworkProvenance, sanitizeCustomStyleConfig, scaleSizeValue, scaminToMinZoom, styleModeBand, withinBboxFilter, worldMinusBboxPolygon };
|
|
4312
|
+
export { ALL_NAV_AID_LAYERS, ALL_WATER_BODY_LAYERS, AREA_QUERY_LAYERS, ATON_EXPRESSION_CLASSES, type AheadCoverageCell, type AheadFeatureProperties, type AheadOptions, type AheadResponse, type AlongRouteFeatureProperties, type AlongRouteOptions, type AlongRouteResponse, type AreaInspectResult, type AtlasStyle, type AttachOptions, BAND_DRAW_ORDER, BAND_PRIORITY_RANGES, type BBox, BRIDGE_QUERY_LAYERS, BUILD_MAXZOOM, BUILD_MINZOOM, type BandCode, type BandPriorityRange, type BridgeInspectResult, type BuildOfflineStyleOptions, type BuildSourcesOptions, CHART_BAND_CODES, CHART_CASCADE_CODES, CHART_SECTIONS, CHRTRASTER_REF_CROPS, CHRTRASTER_SVGS, CHRT_ATON_COLORS, CHRT_GLYPH_NAMES, CHRT_GLYPH_SVGS, CHRT_ICON_EXPRESSIONS, CHRT_ICON_PREFIX, CHRT_SDF_GLYPHS, CHRT_STYLE_MODES, type CandidateQueryOptions, type CandidatesEventContext, type CellDeletedEvent, type CellDetail, type CellEventData, type CellNewEvent, type CellUpdatedData, type CellUpdatedEvent, type CellsOptions, type CellsResponse, type ChartSection, Chrt, type ChrtConfig, ChrtError, type ChrtStyleMode, type ChrtStyleOptions, type ChrtStyleTheme, type ChrtSymbolSet, type ClickAnchor, ColorTableName, type CoverageOptions, type CoverageResponse, type CoverageRouteCell, type CoverageRouteOptions, type CoverageRouteResponse, type CoverageSource, type CustomStyleConfig, DEFAULT_CLICK_TOLERANCE, DEFAULT_CUSTOM_STYLE_CONFIG, DEFAULT_INSPECT_CLASS_RANK, DEFAULT_LABEL_SETTINGS, DEFAULT_NAV_AID_SETTINGS, DEFAULT_REGION, DEFAULT_SAFETY_CONTOUR_M, DEFAULT_SOUNDING_SETTINGS, DEFAULT_TILE_BASE_URL, DEFAULT_TILE_REGION, DEFAULT_WATER_BODY_SETTINGS, type DecodedAreaFeature, type DecodedBridge, type DecodedNavAid, type DecodedProperty, type DisplayCategory, type DisplayMode, type FeatureCollection, type FeaturesOptions, type FetchStyleOptions, FileSystemAdapter, type FlashPattern, type FlashPhase, type GenerateCustomStyleOptions, type GeneratedCustomStyle, type GeoJsonFeature, type GeoJsonGeometry, type GeomType, INSPECT_CLASS_RANK, INSPECT_RANK_DEVIATIONS, type InspectCandidate, type InspectCandidateSet, type InspectEnrichment, type InspectEventContext, type InspectNotice, type InspectOptions, type InspectResult, type InspectTargetClass, type InspectableFeature, InteractClient, type InteractEntitlement, InteractError, type InteractErrorCode, type InteractHandle, type InteractMapLike, type InteractMapMouseEvent, LABELED_LAYERS, LABEL_BEHAVIOR, LABEL_LAYER_GROUPS, LABEL_PRIORITY, LAND_REGION, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LookupEntry, type MapLibreStyle, type MapboxStyle, type MapboxVectorSource, type MarineAlert, type MarineAlertsOptions, type MarineAlertsResponse, type MarineConditionsOptions, type MarineConditionsResponse, type MarineForecastOptions, type MarineForecastPeriod, type MarineForecastResponse, type MarineSeas, type MarineStation, type MarineSwellTrain, type MarineWind, type MarineZoneRef, NAUTICAL_SYMBOLS, NAV_AID_LAYER_GROUPS, NAV_AID_QUERY_LAYERS, NON_SOLAS_DISCLAIMER, NON_SOLAS_DISCLAIMER_SHORT, type NauticalCategory, type NauticalSymbol, type NavAidInspectResult, type NavAidSettings, type NearbyMarineStation, type OfflineBundleResponse, type OfflineDownloadOptions, type OfflineDownloadProgress, type OfflineDownloadResult, OfflineError, type OfflineErrorCode, type OfflineFetchStyleOptions, type OfflineHeartbeatOptions, type OfflineRegionSummary, type OfflineRemoveOptions, OfflineStyleError, type OfflineStylePlatform, type OfflineStyleResponse, type PmtilesVectorSource, type QueryFeatureProperties, type QueryOptions, type QueryResponse, RASTER_ATON_CLASSES, RASTER_GLYPH_NAMES, RASTER_ICON_PREFIX, RELIEF_REGION, type ResolvedStyle, type ResolvedTheme, type S101ArtworkProvenance, type S101Feature, S101_AREA_FILL_NAMES, S101_CHART_SECTIONS, S101_FEATURES, S101_ICON_PREFIX, S101_LINE_STYLE_NAMES, S101_NEW_SYMBOLS, S101_NO_OFFICIAL_COUNTERPART, S101_SOURCE_COMMIT, S101_SYMBOL_GROUPS, S101_SYMBOL_NAMES, S52_ATON_LOOKUPS, S52_ATON_LOOKUPS_PAPER, S52_DRAW_ORDER, S52_LOOKUP, S52_PATTERN_SPRITE_PREFIX, SOUNDING_LAYERS, SYMBOL_FAMILIES, SYMBOL_FAMILY_META, SYMBOL_GROUPS, SYMBOL_MAP, type ScaleBand, type SearchCoverageNotice, type SearchHit, type SearchOptions, type SearchResponse, type SectorArcFeature, type SectorArcFeatureCollection, type SectorInfo, type SoundingSettings, type SourceMode, type StyleGeneratorOptions, type StyleLayer, type StyleUrlOptions, type SymbolFamily, type SymbolFamilyMeta, type SymbolGroup, TileAuth, type TileGroup, type TileGroupsResponse, TileTokenError, type TileTokenErrorCode, type TileTokenResponse, type TransformRequest, type TransformedRequest, type VectorSourceSpec, type VesselProfile, WATER_BODY_LAYER_GROUPS, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, applyRasterSymbolSet, applyS101SymbolSet, atonIconExpression, bandFilterExpression, buildFlashPattern, buildLabelLayer, buildLayersForClass, buildOfflineStyle, buildSectorArcGeoJSON, buildSectorArcsFC, buildSectorsFromFeatures, buildSources, candidateRank, chrtAtonTintExpression, chrtLightTintExpression, collectCandidates, collectClickCandidates, combineWithBandFilter, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeNavAidProps, depareColor, depareFillExpression, deriveMarinerName, extractNavAidDesignation, featureIdentity, generateCustomStyle, generateSpriteManifest, generateSpriteSheet, generateStyle, generateStyleJSON, getAvailableLineSymbols, getAvailablePatterns, getAvailablePointSymbols, getCollisionSettings, getDrawPriority, getGridSizeForZoom, getIconExpression, getLabelBehavior, getLabelConfig, getLabelPriority, getLookupEntry, getMaxCellsForZoom, getOrderedClasses, getRasterSvg, getS52SvgString, getS52SymbolStats, getStyleStats, getSymbolSvgString, getThemedS101Svg, getThemedS52Svg, getTopmarkMeaning, hazardColor, hazardFillExpression, iconExpressionForFamily, isLabelLayerVisible, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, labelSortKey, lateralColor, lateralFillExpression, lightColor, lightFillExpression, lightsIconExpression, normalizeStyleMode, normalizeTheme, paginate, parseListCodes, parseSymbolFamily, parseWebhook, patternSpriteId, preprocessLights, preprocessNavAids, preprocessSoundings, preprocessWaterBodies, rasterAtonIconExpression, resolveCustomTheme, resolveRasterImage, resolveS101Color, resolveStyle, resolveTargetClass, s101ArtworkProvenance, sanitizeCustomStyleConfig, scaleSizeValue, scaminToMinZoom, styleModeBand, withinBboxFilter, worldMinusBboxPolygon };
|