@chrtco/sdk 0.10.48 → 0.10.50
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 +8 -0
- package/dist/index.cjs +148 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -1
- package/dist/index.d.ts +48 -1
- package/dist/index.js +141 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3604,6 +3604,16 @@ interface StyleGeneratorOptions extends BuildSourcesOptions {
|
|
|
3604
3604
|
* omitted. Rule 4 (`OUTRANK_LABELS`) is kept for measurement.
|
|
3605
3605
|
*/
|
|
3606
3606
|
soundingsRule?: ChartSoundingsRule;
|
|
3607
|
+
/**
|
|
3608
|
+
* DANGER DEPTHS AS A PAIR (`danger-depth-placer.ts`): an invisible placer in
|
|
3609
|
+
* 0.10.3's collision form beneath each visible callout, which is always
|
|
3610
|
+
* drawn and displaces nothing — no sounding is hidden, and a tile draws the
|
|
3611
|
+
* callouts once. Default OFF: the served style keeps 0.10.4's form (the
|
|
3612
|
+
* label alone, always drawn, still in collision) until CHRTsail has checked
|
|
3613
|
+
* the pair on MapLibre Native; CHRTweb and CHRTdesktop turn it on
|
|
3614
|
+
* (`ChartCanvas`), and the style routes take `placers=1`.
|
|
3615
|
+
*/
|
|
3616
|
+
dangerDepthPlacers?: boolean;
|
|
3607
3617
|
}
|
|
3608
3618
|
declare function generateStyle(palette?: ColorTableName, opts?: StyleGeneratorOptions & {
|
|
3609
3619
|
bandFan?: BandFanMode;
|
|
@@ -4177,6 +4187,43 @@ declare const PLACENAME_LAND_CLASSES: readonly string[];
|
|
|
4177
4187
|
*/
|
|
4178
4188
|
declare function buildPlaceNameLayers(sourceId: string, ct?: ColorTableName): maplibregl.LayerSpecification[];
|
|
4179
4189
|
|
|
4190
|
+
type Layer = {
|
|
4191
|
+
id: string;
|
|
4192
|
+
type: string;
|
|
4193
|
+
layout?: Record<string, unknown>;
|
|
4194
|
+
paint?: Record<string, unknown>;
|
|
4195
|
+
metadata?: Record<string, unknown>;
|
|
4196
|
+
};
|
|
4197
|
+
/** The visible danger-depth labels, and their legacy band-fan variants. */
|
|
4198
|
+
declare const DANGER_DEPTH_LABEL_ID: RegExp;
|
|
4199
|
+
/** The placers. Deliberately NOT matched by `^s52-(UWTROC|OBSTRN|WRECKS)-label`. */
|
|
4200
|
+
declare const DANGER_DEPTH_PLACER_ID: RegExp;
|
|
4201
|
+
/** `s52-UWTROC-label` → `s52-UWTROC-placer-label`; band variants keep their suffix. */
|
|
4202
|
+
declare function dangerDepthPlacerId(labelId: string): string;
|
|
4203
|
+
/** True for a placer layer id — invisible, never a hit target. */
|
|
4204
|
+
declare function isDangerDepthPlacer(layerId: string): boolean;
|
|
4205
|
+
/**
|
|
4206
|
+
* The visible half: always drawn, inserting no box, one sort key in source
|
|
4207
|
+
* order (a tile draws it once; "source" keeps the index buffer unsorted when
|
|
4208
|
+
* the chart rotates). Placement order is the placer's job.
|
|
4209
|
+
*/
|
|
4210
|
+
declare const DANGER_DEPTH_VISIBLE_LAYOUT: Readonly<Record<string, unknown>>;
|
|
4211
|
+
/**
|
|
4212
|
+
* 0.10.3's placement, and nothing else: collision on, shallowest first. The
|
|
4213
|
+
* text is copied from the visible label, so the box is the same box.
|
|
4214
|
+
*/
|
|
4215
|
+
declare const DANGER_DEPTH_PLACER_LAYOUT: Readonly<Record<string, unknown>>;
|
|
4216
|
+
/**
|
|
4217
|
+
* Every danger-depth text label turned into the visible half of a pair
|
|
4218
|
+
* (`DANGER_DEPTH_VISIBLE_LAYOUT`) and preceded (drawn below, so placed AFTER
|
|
4219
|
+
* it) by its invisible placer. A class emitted as a run of layers (the legacy band
|
|
4220
|
+
* fan, chart-mode cascades) gets its placers as one run directly beneath its
|
|
4221
|
+
* labels' run, so every role stays contiguous and the collapsed and legacy
|
|
4222
|
+
* emitters keep the same role order. A style without them returns the same
|
|
4223
|
+
* array.
|
|
4224
|
+
*/
|
|
4225
|
+
declare function addDangerDepthPlacers<L extends Layer>(layers: readonly L[]): L[];
|
|
4226
|
+
|
|
4180
4227
|
/**
|
|
4181
4228
|
* Spatial grid-based feature decimation for performance at low zoom levels.
|
|
4182
4229
|
* Thins dense GeoJSON feature sets by keeping only one representative
|
|
@@ -5780,4 +5827,4 @@ declare class Chrt {
|
|
|
5780
5827
|
warmTiles(region?: string): Promise<TileTokenResponse>;
|
|
5781
5828
|
}
|
|
5782
5829
|
|
|
5783
|
-
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_CODE_ALIASES, BAND_DRAW_ORDER, BAND_PRIORITY_RANGES, BASE_ATTRIBUTION, BASE_BUNDLE_ATTRIBUTION, BASE_BUNDLE_ID, BASE_BUNDLE_MAXZOOM, BASE_BUNDLE_SCHEMA, BASE_BUNDLE_SOURCE_LAYERS, BASE_CLIENT_RASTER_BEFORE_ID, BASE_MAXZOOM, BASE_MINZOOM, BASE_REGION, type BBox, BRIDGE_QUERY_LAYERS, BUILD_MAXZOOM, BUILD_MINZOOM, BUILD_PARAM, type BandCode, type BandPriorityRange, type BridgeInspectResult, type BuildOfflineStyleOptions, type BuildSourcesOptions, CHART_BAND_CODES, CHART_CASCADE_CODES, CHART_SECTIONS, CHART_SOUNDINGS_RULE, CHART_SYMBOL_SCALE, CHART_SYMBOL_SIZES, CHART_SYMBOL_SIZE_LABELS, CHART_SYMBOL_SIZE_REACH, CHART_SYMBOL_SIZE_WIRE, 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, type ChartSoundingsRule, type ChartSymbolScales, type ChartSymbolSize, 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, DEPARE_FILL_BRANCH_TOKENS, DEPARE_FILL_FALLBACK_TOKEN, DEPTH_FIGURE_CLASSES, DRAPEABLE_LAYER_TYPES, type DecodedAreaFeature, type DecodedBridge, type DecodedNavAid, type DecodedProperty, type DisplayCategory, type DisplayMode, EINK_DANGER_PATTERN, EINK_DOTS_PATTERN, EINK_HATCH_PATTERN, type FeatureCollection, type FeaturesOptions, type FetchStyleOptions, FileSystemAdapter, type FlashPattern, type FlashPhase, type GenerateCustomStyleOptions, type GeneratedCustomStyle, type GeoJsonFeature, type GeoJsonGeometry, type GeomType, HAZARD_LABEL_PRIORITY, 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, LAMP_CORE_LAYER_ID, LAMP_GLOW_LAYER_ID, LAMP_LAYER_IDS, LAMP_TICK_MS, LAND_ATTRIBUTION, LAND_BUILD_MAXZOOM, LAND_REGION, LAND_TEXT_CLASSES, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LampLayer, type LookupEntry, MAPLIBRE_DEFAULT_TEXT_PADDING_PX, type MapLibreStyle, type MapboxStyle, type MapboxVectorSource, type MarineAlert, type MarineAlertsOptions, type MarineAlertsResponse, type MarineConditionsObservation, type MarineConditionsOptions, type MarineConditionsResponse, type MarineConditionsSeries, 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, NIGHT_INK, NIGHT_MUTED_INK, NON_SOLAS_DISCLAIMER, NON_SOLAS_DISCLAIMER_SHORT, type NauticalCategory, type NauticalSymbol, type NavAidInspectResult, type NavAidSettings, type NearbyMarineStation, OPAQUE_SPLIT_OF, OUTRANK_LABELS, type OfflineBundleResponse, type OfflineDownloadOptions, type OfflineDownloadProgress, type OfflineDownloadResult, OfflineError, type OfflineErrorCode, type OfflineFetchStyleOptions, type OfflineHeartbeatOptions, type OfflineRegionSummary, type OfflineRemoveOptions, OfflineStyleError, type OfflineStylePlatform, type OfflineStyleResponse, PLACENAME_LAND_CLASSES, PLACENAME_SOURCE_LAYER, PLACENAME_WATER_CLASSES, type ParsedSigseqTerms, type PmtilesVectorSource, type Poi, type PoiCoverage, type PoiDataset, type PoiOptions, type PoiResponse, type QueryFeatureProperties, type QueryOptions, type QueryResponse, RASTER_ATON_CLASSES, RASTER_GLYPH_NAMES, RASTER_ICON_PREFIX, RELIEF_ATTRIBUTION, RELIEF_ENCODING, RELIEF_REGION, RELIEF_TILE_SIZE, 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, SERVED_FONT_STACKS, SERVED_SOUNDING_PADDING_PX, SIGPER_TOLERANCE_SECONDS, SIGSEQ_MAX_TERMS, SOUNDING_LAYERS, SOUNDING_PADDING_PER_FACTOR, STANDARD_CHART_SYMBOL_SCALES, SYMBOL_ANNOTATION_TEXT_CLASSES, SYMBOL_GROUPS, SYMBOL_MAP, type ScaleBand, type SearchCoverageNotice, type SearchHit, type SearchOptions, type SearchResponse, type SectorArcFeature, type SectorArcFeatureCollection, type SectorInfo, type SigseqRefusal, type SigseqTerm, type SoundingSettings, type SourceMode, type StyleGeneratorOptions, type StyleLayer, type StyleUrlOptions, type SymbolGroup, TileAuth, type TileGroup, type TileGroupsResponse, TileTokenError, type TileTokenErrorCode, type TileTokenResponse, type TransformRequest, type TransformedRequest, type VectorSourceSpec, type VesselProfile, WATER_BODY_LAYER_GROUPS, WATER_TEXT_CLASSES, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, applyBaseBundle, applyChartSymbolScales, applyChartSymbolScalesToLayer, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, applyEinkPortrayal, applyRasterSymbolSet, applyS101SymbolSet, atonIconExpression, bandFilterExpression, buildAirportTierExpression, buildBuiltUpAreaTierExpression, buildFlashPattern, buildLabelLayer, buildLakeTierExpression, buildLampLayers, buildLandAreaTierExpression, buildLandRegionTierExpression, buildLayersForClass, buildOfflineStyle, buildPlaceNameLayers, buildRiverTierExpression, buildSeaAreaTierExpression, buildSectorArcGeoJSON, buildSectorArcsFC, buildSectorsFromFeatures, buildSources, candidateRank, capLuminance, cellBandCharacters, cellBandMatch, chartSymbolSizingCensus, chrtAtonTintExpression, chrtHouseColor, chrtLightTintExpression, clampChartSymbolScale, collectCandidates, collectClickCandidates, combineWithBandFilter, contourValueFactor, contrastRatio, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeChartSymbolScale, decodeNavAidProps, demotedBelowSoundings, depareColor, depareFillExpression, depthAreaClassLayerId, depthAreaSplitIds, deriveMarinerName, drapeHalves, drapedFirst, extractNavAidDesignation, featureIdentity, fromZoom, 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, haloFactor, hazardColor, hazardFillExpression, iconSliderFor, isDepthAreaClassLayerId, isDrapeable, isLabelLayerVisible, isMapLive, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, keptAboveSoundings, labelSortKey, lampRhythmColour, lampRhythmOpacity, lateralColor, lateralFillExpression, lightColor, lightFillExpression, lightsIconExpression, normalizeStyleMode, normalizeTheme, opaqueSplitBaseOf, paginate, parseListCodes, parseSigseqTerms, parseWebhook, patternSpriteId, preprocessLights, preprocessNavAids, preprocessSoundings, preprocessWaterBodies, rasterAtonIconExpression, relativeLuminance, resolveCustomTheme, resolveRasterImage, resolveS101Color, resolveStyle, resolveTargetClass, rhythmProperties, s101ArtworkProvenance, safetyContourValues, sanitizeCustomStyleConfig, scaleLinearLight, scaleSizeExpression, scaleSizeValue, scaminToMinZoom, sectorLimitToArcBearing, semiboldFontStack, snapChartSymbolScale, soundingPadding, soundingPaddingValue, splitOpaqueDepthAreas, stepChartSymbolScale, styleModeBand, terrainStackCount, textSliderFor, themeChrtGlyph, tileTemplate, uncoveredSectorArcs, withinBboxFilter, worldMinusBboxPolygon };
|
|
5830
|
+
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_CODE_ALIASES, BAND_DRAW_ORDER, BAND_PRIORITY_RANGES, BASE_ATTRIBUTION, BASE_BUNDLE_ATTRIBUTION, BASE_BUNDLE_ID, BASE_BUNDLE_MAXZOOM, BASE_BUNDLE_SCHEMA, BASE_BUNDLE_SOURCE_LAYERS, BASE_CLIENT_RASTER_BEFORE_ID, BASE_MAXZOOM, BASE_MINZOOM, BASE_REGION, type BBox, BRIDGE_QUERY_LAYERS, BUILD_MAXZOOM, BUILD_MINZOOM, BUILD_PARAM, type BandCode, type BandPriorityRange, type BridgeInspectResult, type BuildOfflineStyleOptions, type BuildSourcesOptions, CHART_BAND_CODES, CHART_CASCADE_CODES, CHART_SECTIONS, CHART_SOUNDINGS_RULE, CHART_SYMBOL_SCALE, CHART_SYMBOL_SIZES, CHART_SYMBOL_SIZE_LABELS, CHART_SYMBOL_SIZE_REACH, CHART_SYMBOL_SIZE_WIRE, 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, type ChartSoundingsRule, type ChartSymbolScales, type ChartSymbolSize, 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, DANGER_DEPTH_LABEL_ID, DANGER_DEPTH_PLACER_ID, DANGER_DEPTH_PLACER_LAYOUT, DANGER_DEPTH_VISIBLE_LAYOUT, 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, DEPARE_FILL_BRANCH_TOKENS, DEPARE_FILL_FALLBACK_TOKEN, DEPTH_FIGURE_CLASSES, DRAPEABLE_LAYER_TYPES, type DecodedAreaFeature, type DecodedBridge, type DecodedNavAid, type DecodedProperty, type DisplayCategory, type DisplayMode, EINK_DANGER_PATTERN, EINK_DOTS_PATTERN, EINK_HATCH_PATTERN, type FeatureCollection, type FeaturesOptions, type FetchStyleOptions, FileSystemAdapter, type FlashPattern, type FlashPhase, type GenerateCustomStyleOptions, type GeneratedCustomStyle, type GeoJsonFeature, type GeoJsonGeometry, type GeomType, HAZARD_LABEL_PRIORITY, 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, LAMP_CORE_LAYER_ID, LAMP_GLOW_LAYER_ID, LAMP_LAYER_IDS, LAMP_TICK_MS, LAND_ATTRIBUTION, LAND_BUILD_MAXZOOM, LAND_REGION, LAND_TEXT_CLASSES, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LampLayer, type LookupEntry, MAPLIBRE_DEFAULT_TEXT_PADDING_PX, type MapLibreStyle, type MapboxStyle, type MapboxVectorSource, type MarineAlert, type MarineAlertsOptions, type MarineAlertsResponse, type MarineConditionsObservation, type MarineConditionsOptions, type MarineConditionsResponse, type MarineConditionsSeries, 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, NIGHT_INK, NIGHT_MUTED_INK, NON_SOLAS_DISCLAIMER, NON_SOLAS_DISCLAIMER_SHORT, type NauticalCategory, type NauticalSymbol, type NavAidInspectResult, type NavAidSettings, type NearbyMarineStation, OPAQUE_SPLIT_OF, OUTRANK_LABELS, type OfflineBundleResponse, type OfflineDownloadOptions, type OfflineDownloadProgress, type OfflineDownloadResult, OfflineError, type OfflineErrorCode, type OfflineFetchStyleOptions, type OfflineHeartbeatOptions, type OfflineRegionSummary, type OfflineRemoveOptions, OfflineStyleError, type OfflineStylePlatform, type OfflineStyleResponse, PLACENAME_LAND_CLASSES, PLACENAME_SOURCE_LAYER, PLACENAME_WATER_CLASSES, type ParsedSigseqTerms, type PmtilesVectorSource, type Poi, type PoiCoverage, type PoiDataset, type PoiOptions, type PoiResponse, type QueryFeatureProperties, type QueryOptions, type QueryResponse, RASTER_ATON_CLASSES, RASTER_GLYPH_NAMES, RASTER_ICON_PREFIX, RELIEF_ATTRIBUTION, RELIEF_ENCODING, RELIEF_REGION, RELIEF_TILE_SIZE, 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, SERVED_FONT_STACKS, SERVED_SOUNDING_PADDING_PX, SIGPER_TOLERANCE_SECONDS, SIGSEQ_MAX_TERMS, SOUNDING_LAYERS, SOUNDING_PADDING_PER_FACTOR, STANDARD_CHART_SYMBOL_SCALES, SYMBOL_ANNOTATION_TEXT_CLASSES, SYMBOL_GROUPS, SYMBOL_MAP, type ScaleBand, type SearchCoverageNotice, type SearchHit, type SearchOptions, type SearchResponse, type SectorArcFeature, type SectorArcFeatureCollection, type SectorInfo, type SigseqRefusal, type SigseqTerm, type SoundingSettings, type SourceMode, type StyleGeneratorOptions, type StyleLayer, type StyleUrlOptions, type SymbolGroup, TileAuth, type TileGroup, type TileGroupsResponse, TileTokenError, type TileTokenErrorCode, type TileTokenResponse, type TransformRequest, type TransformedRequest, type VectorSourceSpec, type VesselProfile, WATER_BODY_LAYER_GROUPS, WATER_TEXT_CLASSES, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, addDangerDepthPlacers, applyBaseBundle, applyChartSymbolScales, applyChartSymbolScalesToLayer, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, applyEinkPortrayal, applyRasterSymbolSet, applyS101SymbolSet, atonIconExpression, bandFilterExpression, buildAirportTierExpression, buildBuiltUpAreaTierExpression, buildFlashPattern, buildLabelLayer, buildLakeTierExpression, buildLampLayers, buildLandAreaTierExpression, buildLandRegionTierExpression, buildLayersForClass, buildOfflineStyle, buildPlaceNameLayers, buildRiverTierExpression, buildSeaAreaTierExpression, buildSectorArcGeoJSON, buildSectorArcsFC, buildSectorsFromFeatures, buildSources, candidateRank, capLuminance, cellBandCharacters, cellBandMatch, chartSymbolSizingCensus, chrtAtonTintExpression, chrtHouseColor, chrtLightTintExpression, clampChartSymbolScale, collectCandidates, collectClickCandidates, combineWithBandFilter, contourValueFactor, contrastRatio, dangerDepthPlacerId, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeChartSymbolScale, decodeNavAidProps, demotedBelowSoundings, depareColor, depareFillExpression, depthAreaClassLayerId, depthAreaSplitIds, deriveMarinerName, drapeHalves, drapedFirst, extractNavAidDesignation, featureIdentity, fromZoom, 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, haloFactor, hazardColor, hazardFillExpression, iconSliderFor, isDangerDepthPlacer, isDepthAreaClassLayerId, isDrapeable, isLabelLayerVisible, isMapLive, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, keptAboveSoundings, labelSortKey, lampRhythmColour, lampRhythmOpacity, lateralColor, lateralFillExpression, lightColor, lightFillExpression, lightsIconExpression, normalizeStyleMode, normalizeTheme, opaqueSplitBaseOf, paginate, parseListCodes, parseSigseqTerms, parseWebhook, patternSpriteId, preprocessLights, preprocessNavAids, preprocessSoundings, preprocessWaterBodies, rasterAtonIconExpression, relativeLuminance, resolveCustomTheme, resolveRasterImage, resolveS101Color, resolveStyle, resolveTargetClass, rhythmProperties, s101ArtworkProvenance, safetyContourValues, sanitizeCustomStyleConfig, scaleLinearLight, scaleSizeExpression, scaleSizeValue, scaminToMinZoom, sectorLimitToArcBearing, semiboldFontStack, snapChartSymbolScale, soundingPadding, soundingPaddingValue, splitOpaqueDepthAreas, stepChartSymbolScale, styleModeBand, terrainStackCount, textSliderFor, themeChrtGlyph, tileTemplate, uncoveredSectorArcs, withinBboxFilter, worldMinusBboxPolygon };
|
package/dist/index.d.ts
CHANGED
|
@@ -3604,6 +3604,16 @@ interface StyleGeneratorOptions extends BuildSourcesOptions {
|
|
|
3604
3604
|
* omitted. Rule 4 (`OUTRANK_LABELS`) is kept for measurement.
|
|
3605
3605
|
*/
|
|
3606
3606
|
soundingsRule?: ChartSoundingsRule;
|
|
3607
|
+
/**
|
|
3608
|
+
* DANGER DEPTHS AS A PAIR (`danger-depth-placer.ts`): an invisible placer in
|
|
3609
|
+
* 0.10.3's collision form beneath each visible callout, which is always
|
|
3610
|
+
* drawn and displaces nothing — no sounding is hidden, and a tile draws the
|
|
3611
|
+
* callouts once. Default OFF: the served style keeps 0.10.4's form (the
|
|
3612
|
+
* label alone, always drawn, still in collision) until CHRTsail has checked
|
|
3613
|
+
* the pair on MapLibre Native; CHRTweb and CHRTdesktop turn it on
|
|
3614
|
+
* (`ChartCanvas`), and the style routes take `placers=1`.
|
|
3615
|
+
*/
|
|
3616
|
+
dangerDepthPlacers?: boolean;
|
|
3607
3617
|
}
|
|
3608
3618
|
declare function generateStyle(palette?: ColorTableName, opts?: StyleGeneratorOptions & {
|
|
3609
3619
|
bandFan?: BandFanMode;
|
|
@@ -4177,6 +4187,43 @@ declare const PLACENAME_LAND_CLASSES: readonly string[];
|
|
|
4177
4187
|
*/
|
|
4178
4188
|
declare function buildPlaceNameLayers(sourceId: string, ct?: ColorTableName): maplibregl.LayerSpecification[];
|
|
4179
4189
|
|
|
4190
|
+
type Layer = {
|
|
4191
|
+
id: string;
|
|
4192
|
+
type: string;
|
|
4193
|
+
layout?: Record<string, unknown>;
|
|
4194
|
+
paint?: Record<string, unknown>;
|
|
4195
|
+
metadata?: Record<string, unknown>;
|
|
4196
|
+
};
|
|
4197
|
+
/** The visible danger-depth labels, and their legacy band-fan variants. */
|
|
4198
|
+
declare const DANGER_DEPTH_LABEL_ID: RegExp;
|
|
4199
|
+
/** The placers. Deliberately NOT matched by `^s52-(UWTROC|OBSTRN|WRECKS)-label`. */
|
|
4200
|
+
declare const DANGER_DEPTH_PLACER_ID: RegExp;
|
|
4201
|
+
/** `s52-UWTROC-label` → `s52-UWTROC-placer-label`; band variants keep their suffix. */
|
|
4202
|
+
declare function dangerDepthPlacerId(labelId: string): string;
|
|
4203
|
+
/** True for a placer layer id — invisible, never a hit target. */
|
|
4204
|
+
declare function isDangerDepthPlacer(layerId: string): boolean;
|
|
4205
|
+
/**
|
|
4206
|
+
* The visible half: always drawn, inserting no box, one sort key in source
|
|
4207
|
+
* order (a tile draws it once; "source" keeps the index buffer unsorted when
|
|
4208
|
+
* the chart rotates). Placement order is the placer's job.
|
|
4209
|
+
*/
|
|
4210
|
+
declare const DANGER_DEPTH_VISIBLE_LAYOUT: Readonly<Record<string, unknown>>;
|
|
4211
|
+
/**
|
|
4212
|
+
* 0.10.3's placement, and nothing else: collision on, shallowest first. The
|
|
4213
|
+
* text is copied from the visible label, so the box is the same box.
|
|
4214
|
+
*/
|
|
4215
|
+
declare const DANGER_DEPTH_PLACER_LAYOUT: Readonly<Record<string, unknown>>;
|
|
4216
|
+
/**
|
|
4217
|
+
* Every danger-depth text label turned into the visible half of a pair
|
|
4218
|
+
* (`DANGER_DEPTH_VISIBLE_LAYOUT`) and preceded (drawn below, so placed AFTER
|
|
4219
|
+
* it) by its invisible placer. A class emitted as a run of layers (the legacy band
|
|
4220
|
+
* fan, chart-mode cascades) gets its placers as one run directly beneath its
|
|
4221
|
+
* labels' run, so every role stays contiguous and the collapsed and legacy
|
|
4222
|
+
* emitters keep the same role order. A style without them returns the same
|
|
4223
|
+
* array.
|
|
4224
|
+
*/
|
|
4225
|
+
declare function addDangerDepthPlacers<L extends Layer>(layers: readonly L[]): L[];
|
|
4226
|
+
|
|
4180
4227
|
/**
|
|
4181
4228
|
* Spatial grid-based feature decimation for performance at low zoom levels.
|
|
4182
4229
|
* Thins dense GeoJSON feature sets by keeping only one representative
|
|
@@ -5780,4 +5827,4 @@ declare class Chrt {
|
|
|
5780
5827
|
warmTiles(region?: string): Promise<TileTokenResponse>;
|
|
5781
5828
|
}
|
|
5782
5829
|
|
|
5783
|
-
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_CODE_ALIASES, BAND_DRAW_ORDER, BAND_PRIORITY_RANGES, BASE_ATTRIBUTION, BASE_BUNDLE_ATTRIBUTION, BASE_BUNDLE_ID, BASE_BUNDLE_MAXZOOM, BASE_BUNDLE_SCHEMA, BASE_BUNDLE_SOURCE_LAYERS, BASE_CLIENT_RASTER_BEFORE_ID, BASE_MAXZOOM, BASE_MINZOOM, BASE_REGION, type BBox, BRIDGE_QUERY_LAYERS, BUILD_MAXZOOM, BUILD_MINZOOM, BUILD_PARAM, type BandCode, type BandPriorityRange, type BridgeInspectResult, type BuildOfflineStyleOptions, type BuildSourcesOptions, CHART_BAND_CODES, CHART_CASCADE_CODES, CHART_SECTIONS, CHART_SOUNDINGS_RULE, CHART_SYMBOL_SCALE, CHART_SYMBOL_SIZES, CHART_SYMBOL_SIZE_LABELS, CHART_SYMBOL_SIZE_REACH, CHART_SYMBOL_SIZE_WIRE, 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, type ChartSoundingsRule, type ChartSymbolScales, type ChartSymbolSize, 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, DEPARE_FILL_BRANCH_TOKENS, DEPARE_FILL_FALLBACK_TOKEN, DEPTH_FIGURE_CLASSES, DRAPEABLE_LAYER_TYPES, type DecodedAreaFeature, type DecodedBridge, type DecodedNavAid, type DecodedProperty, type DisplayCategory, type DisplayMode, EINK_DANGER_PATTERN, EINK_DOTS_PATTERN, EINK_HATCH_PATTERN, type FeatureCollection, type FeaturesOptions, type FetchStyleOptions, FileSystemAdapter, type FlashPattern, type FlashPhase, type GenerateCustomStyleOptions, type GeneratedCustomStyle, type GeoJsonFeature, type GeoJsonGeometry, type GeomType, HAZARD_LABEL_PRIORITY, 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, LAMP_CORE_LAYER_ID, LAMP_GLOW_LAYER_ID, LAMP_LAYER_IDS, LAMP_TICK_MS, LAND_ATTRIBUTION, LAND_BUILD_MAXZOOM, LAND_REGION, LAND_TEXT_CLASSES, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LampLayer, type LookupEntry, MAPLIBRE_DEFAULT_TEXT_PADDING_PX, type MapLibreStyle, type MapboxStyle, type MapboxVectorSource, type MarineAlert, type MarineAlertsOptions, type MarineAlertsResponse, type MarineConditionsObservation, type MarineConditionsOptions, type MarineConditionsResponse, type MarineConditionsSeries, 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, NIGHT_INK, NIGHT_MUTED_INK, NON_SOLAS_DISCLAIMER, NON_SOLAS_DISCLAIMER_SHORT, type NauticalCategory, type NauticalSymbol, type NavAidInspectResult, type NavAidSettings, type NearbyMarineStation, OPAQUE_SPLIT_OF, OUTRANK_LABELS, type OfflineBundleResponse, type OfflineDownloadOptions, type OfflineDownloadProgress, type OfflineDownloadResult, OfflineError, type OfflineErrorCode, type OfflineFetchStyleOptions, type OfflineHeartbeatOptions, type OfflineRegionSummary, type OfflineRemoveOptions, OfflineStyleError, type OfflineStylePlatform, type OfflineStyleResponse, PLACENAME_LAND_CLASSES, PLACENAME_SOURCE_LAYER, PLACENAME_WATER_CLASSES, type ParsedSigseqTerms, type PmtilesVectorSource, type Poi, type PoiCoverage, type PoiDataset, type PoiOptions, type PoiResponse, type QueryFeatureProperties, type QueryOptions, type QueryResponse, RASTER_ATON_CLASSES, RASTER_GLYPH_NAMES, RASTER_ICON_PREFIX, RELIEF_ATTRIBUTION, RELIEF_ENCODING, RELIEF_REGION, RELIEF_TILE_SIZE, 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, SERVED_FONT_STACKS, SERVED_SOUNDING_PADDING_PX, SIGPER_TOLERANCE_SECONDS, SIGSEQ_MAX_TERMS, SOUNDING_LAYERS, SOUNDING_PADDING_PER_FACTOR, STANDARD_CHART_SYMBOL_SCALES, SYMBOL_ANNOTATION_TEXT_CLASSES, SYMBOL_GROUPS, SYMBOL_MAP, type ScaleBand, type SearchCoverageNotice, type SearchHit, type SearchOptions, type SearchResponse, type SectorArcFeature, type SectorArcFeatureCollection, type SectorInfo, type SigseqRefusal, type SigseqTerm, type SoundingSettings, type SourceMode, type StyleGeneratorOptions, type StyleLayer, type StyleUrlOptions, type SymbolGroup, TileAuth, type TileGroup, type TileGroupsResponse, TileTokenError, type TileTokenErrorCode, type TileTokenResponse, type TransformRequest, type TransformedRequest, type VectorSourceSpec, type VesselProfile, WATER_BODY_LAYER_GROUPS, WATER_TEXT_CLASSES, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, applyBaseBundle, applyChartSymbolScales, applyChartSymbolScalesToLayer, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, applyEinkPortrayal, applyRasterSymbolSet, applyS101SymbolSet, atonIconExpression, bandFilterExpression, buildAirportTierExpression, buildBuiltUpAreaTierExpression, buildFlashPattern, buildLabelLayer, buildLakeTierExpression, buildLampLayers, buildLandAreaTierExpression, buildLandRegionTierExpression, buildLayersForClass, buildOfflineStyle, buildPlaceNameLayers, buildRiverTierExpression, buildSeaAreaTierExpression, buildSectorArcGeoJSON, buildSectorArcsFC, buildSectorsFromFeatures, buildSources, candidateRank, capLuminance, cellBandCharacters, cellBandMatch, chartSymbolSizingCensus, chrtAtonTintExpression, chrtHouseColor, chrtLightTintExpression, clampChartSymbolScale, collectCandidates, collectClickCandidates, combineWithBandFilter, contourValueFactor, contrastRatio, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeChartSymbolScale, decodeNavAidProps, demotedBelowSoundings, depareColor, depareFillExpression, depthAreaClassLayerId, depthAreaSplitIds, deriveMarinerName, drapeHalves, drapedFirst, extractNavAidDesignation, featureIdentity, fromZoom, 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, haloFactor, hazardColor, hazardFillExpression, iconSliderFor, isDepthAreaClassLayerId, isDrapeable, isLabelLayerVisible, isMapLive, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, keptAboveSoundings, labelSortKey, lampRhythmColour, lampRhythmOpacity, lateralColor, lateralFillExpression, lightColor, lightFillExpression, lightsIconExpression, normalizeStyleMode, normalizeTheme, opaqueSplitBaseOf, paginate, parseListCodes, parseSigseqTerms, parseWebhook, patternSpriteId, preprocessLights, preprocessNavAids, preprocessSoundings, preprocessWaterBodies, rasterAtonIconExpression, relativeLuminance, resolveCustomTheme, resolveRasterImage, resolveS101Color, resolveStyle, resolveTargetClass, rhythmProperties, s101ArtworkProvenance, safetyContourValues, sanitizeCustomStyleConfig, scaleLinearLight, scaleSizeExpression, scaleSizeValue, scaminToMinZoom, sectorLimitToArcBearing, semiboldFontStack, snapChartSymbolScale, soundingPadding, soundingPaddingValue, splitOpaqueDepthAreas, stepChartSymbolScale, styleModeBand, terrainStackCount, textSliderFor, themeChrtGlyph, tileTemplate, uncoveredSectorArcs, withinBboxFilter, worldMinusBboxPolygon };
|
|
5830
|
+
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_CODE_ALIASES, BAND_DRAW_ORDER, BAND_PRIORITY_RANGES, BASE_ATTRIBUTION, BASE_BUNDLE_ATTRIBUTION, BASE_BUNDLE_ID, BASE_BUNDLE_MAXZOOM, BASE_BUNDLE_SCHEMA, BASE_BUNDLE_SOURCE_LAYERS, BASE_CLIENT_RASTER_BEFORE_ID, BASE_MAXZOOM, BASE_MINZOOM, BASE_REGION, type BBox, BRIDGE_QUERY_LAYERS, BUILD_MAXZOOM, BUILD_MINZOOM, BUILD_PARAM, type BandCode, type BandPriorityRange, type BridgeInspectResult, type BuildOfflineStyleOptions, type BuildSourcesOptions, CHART_BAND_CODES, CHART_CASCADE_CODES, CHART_SECTIONS, CHART_SOUNDINGS_RULE, CHART_SYMBOL_SCALE, CHART_SYMBOL_SIZES, CHART_SYMBOL_SIZE_LABELS, CHART_SYMBOL_SIZE_REACH, CHART_SYMBOL_SIZE_WIRE, 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, type ChartSoundingsRule, type ChartSymbolScales, type ChartSymbolSize, 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, DANGER_DEPTH_LABEL_ID, DANGER_DEPTH_PLACER_ID, DANGER_DEPTH_PLACER_LAYOUT, DANGER_DEPTH_VISIBLE_LAYOUT, 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, DEPARE_FILL_BRANCH_TOKENS, DEPARE_FILL_FALLBACK_TOKEN, DEPTH_FIGURE_CLASSES, DRAPEABLE_LAYER_TYPES, type DecodedAreaFeature, type DecodedBridge, type DecodedNavAid, type DecodedProperty, type DisplayCategory, type DisplayMode, EINK_DANGER_PATTERN, EINK_DOTS_PATTERN, EINK_HATCH_PATTERN, type FeatureCollection, type FeaturesOptions, type FetchStyleOptions, FileSystemAdapter, type FlashPattern, type FlashPhase, type GenerateCustomStyleOptions, type GeneratedCustomStyle, type GeoJsonFeature, type GeoJsonGeometry, type GeomType, HAZARD_LABEL_PRIORITY, 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, LAMP_CORE_LAYER_ID, LAMP_GLOW_LAYER_ID, LAMP_LAYER_IDS, LAMP_TICK_MS, LAND_ATTRIBUTION, LAND_BUILD_MAXZOOM, LAND_REGION, LAND_TEXT_CLASSES, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LampLayer, type LookupEntry, MAPLIBRE_DEFAULT_TEXT_PADDING_PX, type MapLibreStyle, type MapboxStyle, type MapboxVectorSource, type MarineAlert, type MarineAlertsOptions, type MarineAlertsResponse, type MarineConditionsObservation, type MarineConditionsOptions, type MarineConditionsResponse, type MarineConditionsSeries, 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, NIGHT_INK, NIGHT_MUTED_INK, NON_SOLAS_DISCLAIMER, NON_SOLAS_DISCLAIMER_SHORT, type NauticalCategory, type NauticalSymbol, type NavAidInspectResult, type NavAidSettings, type NearbyMarineStation, OPAQUE_SPLIT_OF, OUTRANK_LABELS, type OfflineBundleResponse, type OfflineDownloadOptions, type OfflineDownloadProgress, type OfflineDownloadResult, OfflineError, type OfflineErrorCode, type OfflineFetchStyleOptions, type OfflineHeartbeatOptions, type OfflineRegionSummary, type OfflineRemoveOptions, OfflineStyleError, type OfflineStylePlatform, type OfflineStyleResponse, PLACENAME_LAND_CLASSES, PLACENAME_SOURCE_LAYER, PLACENAME_WATER_CLASSES, type ParsedSigseqTerms, type PmtilesVectorSource, type Poi, type PoiCoverage, type PoiDataset, type PoiOptions, type PoiResponse, type QueryFeatureProperties, type QueryOptions, type QueryResponse, RASTER_ATON_CLASSES, RASTER_GLYPH_NAMES, RASTER_ICON_PREFIX, RELIEF_ATTRIBUTION, RELIEF_ENCODING, RELIEF_REGION, RELIEF_TILE_SIZE, 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, SERVED_FONT_STACKS, SERVED_SOUNDING_PADDING_PX, SIGPER_TOLERANCE_SECONDS, SIGSEQ_MAX_TERMS, SOUNDING_LAYERS, SOUNDING_PADDING_PER_FACTOR, STANDARD_CHART_SYMBOL_SCALES, SYMBOL_ANNOTATION_TEXT_CLASSES, SYMBOL_GROUPS, SYMBOL_MAP, type ScaleBand, type SearchCoverageNotice, type SearchHit, type SearchOptions, type SearchResponse, type SectorArcFeature, type SectorArcFeatureCollection, type SectorInfo, type SigseqRefusal, type SigseqTerm, type SoundingSettings, type SourceMode, type StyleGeneratorOptions, type StyleLayer, type StyleUrlOptions, type SymbolGroup, TileAuth, type TileGroup, type TileGroupsResponse, TileTokenError, type TileTokenErrorCode, type TileTokenResponse, type TransformRequest, type TransformedRequest, type VectorSourceSpec, type VesselProfile, WATER_BODY_LAYER_GROUPS, WATER_TEXT_CLASSES, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, addDangerDepthPlacers, applyBaseBundle, applyChartSymbolScales, applyChartSymbolScalesToLayer, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, applyEinkPortrayal, applyRasterSymbolSet, applyS101SymbolSet, atonIconExpression, bandFilterExpression, buildAirportTierExpression, buildBuiltUpAreaTierExpression, buildFlashPattern, buildLabelLayer, buildLakeTierExpression, buildLampLayers, buildLandAreaTierExpression, buildLandRegionTierExpression, buildLayersForClass, buildOfflineStyle, buildPlaceNameLayers, buildRiverTierExpression, buildSeaAreaTierExpression, buildSectorArcGeoJSON, buildSectorArcsFC, buildSectorsFromFeatures, buildSources, candidateRank, capLuminance, cellBandCharacters, cellBandMatch, chartSymbolSizingCensus, chrtAtonTintExpression, chrtHouseColor, chrtLightTintExpression, clampChartSymbolScale, collectCandidates, collectClickCandidates, combineWithBandFilter, contourValueFactor, contrastRatio, dangerDepthPlacerId, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeChartSymbolScale, decodeNavAidProps, demotedBelowSoundings, depareColor, depareFillExpression, depthAreaClassLayerId, depthAreaSplitIds, deriveMarinerName, drapeHalves, drapedFirst, extractNavAidDesignation, featureIdentity, fromZoom, 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, haloFactor, hazardColor, hazardFillExpression, iconSliderFor, isDangerDepthPlacer, isDepthAreaClassLayerId, isDrapeable, isLabelLayerVisible, isMapLive, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, keptAboveSoundings, labelSortKey, lampRhythmColour, lampRhythmOpacity, lateralColor, lateralFillExpression, lightColor, lightFillExpression, lightsIconExpression, normalizeStyleMode, normalizeTheme, opaqueSplitBaseOf, paginate, parseListCodes, parseSigseqTerms, parseWebhook, patternSpriteId, preprocessLights, preprocessNavAids, preprocessSoundings, preprocessWaterBodies, rasterAtonIconExpression, relativeLuminance, resolveCustomTheme, resolveRasterImage, resolveS101Color, resolveStyle, resolveTargetClass, rhythmProperties, s101ArtworkProvenance, safetyContourValues, sanitizeCustomStyleConfig, scaleLinearLight, scaleSizeExpression, scaleSizeValue, scaminToMinZoom, sectorLimitToArcBearing, semiboldFontStack, snapChartSymbolScale, soundingPadding, soundingPaddingValue, splitOpaqueDepthAreas, stepChartSymbolScale, styleModeBand, terrainStackCount, textSliderFor, themeChrtGlyph, tileTemplate, uncoveredSectorArcs, withinBboxFilter, worldMinusBboxPolygon };
|
package/dist/index.js
CHANGED
|
@@ -24583,6 +24583,11 @@ function labelSortKey(rank, within) {
|
|
|
24583
24583
|
["min", 999, ["max", 0, within]]
|
|
24584
24584
|
];
|
|
24585
24585
|
}
|
|
24586
|
+
var DANGER_DEPTH_PLACEMENT_KEY = labelSortKey(100, [
|
|
24587
|
+
"*",
|
|
24588
|
+
10,
|
|
24589
|
+
["to-number", ["coalesce", ["get", "VALSOU"], ["get", "valsou"], 0], 0]
|
|
24590
|
+
]);
|
|
24586
24591
|
var NAV_DESIGNATION_STOPWORDS = [
|
|
24587
24592
|
"Buoy",
|
|
24588
24593
|
"Can",
|
|
@@ -25386,32 +25391,27 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
25386
25391
|
// UWTROC/OBSTRN/WRECKS are dominance-PARTICIPATING classes —
|
|
25387
25392
|
// exactly one band's copy renders at any zoom, so anchor-shifting
|
|
25388
25393
|
// can't split a cross-band duplicate pair into two visible labels.
|
|
25389
|
-
// Shallowest (most dangerous) hazard wins within-class contests;
|
|
25390
|
-
// VALSOU-less hazards (awash / unsounded) rank first of all.
|
|
25391
25394
|
layout: {
|
|
25392
25395
|
"text-variable-anchor": ["top-left", "bottom-left", "top-right", "bottom-right"],
|
|
25393
25396
|
"text-radial-offset": 0.9,
|
|
25394
25397
|
"text-justify": "auto",
|
|
25395
|
-
// ⚠ A DANGER DEPTH IS NEVER DROPPED (owner, 2026-10-06).
|
|
25396
|
-
//
|
|
25397
|
-
//
|
|
25398
|
-
//
|
|
25399
|
-
//
|
|
25400
|
-
//
|
|
25401
|
-
//
|
|
25402
|
-
//
|
|
25403
|
-
//
|
|
25404
|
-
//
|
|
25405
|
-
//
|
|
25406
|
-
//
|
|
25407
|
-
//
|
|
25408
|
-
// at z12.3 on the bench. This form: 0.
|
|
25409
|
-
// The census and its numbers: `scripts/chart-bench/
|
|
25410
|
-
// danger-depth-census.ts` and `.chrt/standards/s-52.md` §8a.
|
|
25398
|
+
// ⚠ A DANGER DEPTH IS NEVER DROPPED (owner, 2026-10-06). This is
|
|
25399
|
+
// 0.10.4's form, which the SERVED style keeps: always drawn
|
|
25400
|
+
// (`text-allow-overlap`), still in collision, fanned out by its four
|
|
25401
|
+
// variable anchors, placed shallowest first. Its cost, measured: a
|
|
25402
|
+
// newly drawn callout takes space a sounding held (7 soundings under
|
|
25403
|
+
// 3.048 m hidden at the 100 % default), and the depth key on an
|
|
25404
|
+
// overlapping layer draws one segment per depth (+14 % draw calls).
|
|
25405
|
+
// With `generateStyle({ dangerDepthPlacers: true })` — CHRTweb and
|
|
25406
|
+
// CHRTdesktop — `danger-depth-placer.ts` turns it into a PAIR: an
|
|
25407
|
+
// invisible placer in 0.10.3's form holds the space, and this label
|
|
25408
|
+
// is drawn over it, displacing nothing, with one key. The census:
|
|
25409
|
+
// `scripts/chart-bench/danger-depth-census.ts`; `.chrt/standards/
|
|
25410
|
+
// s-52.md` §8a.
|
|
25411
25411
|
"text-allow-overlap": true,
|
|
25412
25412
|
"text-optional": true,
|
|
25413
25413
|
"text-padding": 2,
|
|
25414
|
-
"symbol-sort-key":
|
|
25414
|
+
"symbol-sort-key": DANGER_DEPTH_PLACEMENT_KEY
|
|
25415
25415
|
}
|
|
25416
25416
|
};
|
|
25417
25417
|
}
|
|
@@ -26172,6 +26172,62 @@ function buildBridgeNoteLayers(sourceId, palette = "DAY", depthUnits = "meters")
|
|
|
26172
26172
|
];
|
|
26173
26173
|
}
|
|
26174
26174
|
|
|
26175
|
+
// src/atlas/danger-depth-placer.ts
|
|
26176
|
+
var DANGER_DEPTH_LABEL_ID = /^s52-(UWTROC|OBSTRN|WRECKS)-label(?=$|-)/;
|
|
26177
|
+
var DANGER_DEPTH_PLACER_ID = /^s52-(UWTROC|OBSTRN|WRECKS)-placer-label(?=$|-)/;
|
|
26178
|
+
function dangerDepthPlacerId(labelId) {
|
|
26179
|
+
return labelId.replace(/^s52-(UWTROC|OBSTRN|WRECKS)-label/, "s52-$1-placer-label");
|
|
26180
|
+
}
|
|
26181
|
+
function isDangerDepthPlacer(layerId) {
|
|
26182
|
+
return DANGER_DEPTH_PLACER_ID.test(layerId);
|
|
26183
|
+
}
|
|
26184
|
+
var DANGER_DEPTH_VISIBLE_LAYOUT = {
|
|
26185
|
+
"text-allow-overlap": true,
|
|
26186
|
+
"text-ignore-placement": true,
|
|
26187
|
+
"symbol-sort-key": labelSortKey(100),
|
|
26188
|
+
"symbol-z-order": "source"
|
|
26189
|
+
};
|
|
26190
|
+
var DANGER_DEPTH_PLACER_LAYOUT = {
|
|
26191
|
+
"text-allow-overlap": false,
|
|
26192
|
+
"text-ignore-placement": false,
|
|
26193
|
+
"symbol-sort-key": DANGER_DEPTH_PLACEMENT_KEY
|
|
26194
|
+
};
|
|
26195
|
+
function addDangerDepthPlacers(layers) {
|
|
26196
|
+
if (!layers.some((l) => isVisibleDangerDepthLabel(l))) return layers;
|
|
26197
|
+
const out = [];
|
|
26198
|
+
for (let i = 0; i < layers.length; ) {
|
|
26199
|
+
const cls = classOf(layers[i]);
|
|
26200
|
+
if (cls === null) {
|
|
26201
|
+
out.push(layers[i]);
|
|
26202
|
+
i++;
|
|
26203
|
+
continue;
|
|
26204
|
+
}
|
|
26205
|
+
let j = i;
|
|
26206
|
+
while (j < layers.length && classOf(layers[j]) === cls) j++;
|
|
26207
|
+
const run = layers.slice(i, j);
|
|
26208
|
+
for (const l of run) out.push(placerFor(l));
|
|
26209
|
+
for (const l of run) out.push({ ...l, layout: { ...l.layout ?? {}, ...DANGER_DEPTH_VISIBLE_LAYOUT } });
|
|
26210
|
+
i = j;
|
|
26211
|
+
}
|
|
26212
|
+
return out;
|
|
26213
|
+
}
|
|
26214
|
+
function placerFor(l) {
|
|
26215
|
+
const { "symbol-z-order": _zOrder, ...layout } = l.layout ?? {};
|
|
26216
|
+
return {
|
|
26217
|
+
...l,
|
|
26218
|
+
id: dangerDepthPlacerId(l.id),
|
|
26219
|
+
layout: { ...layout, ...DANGER_DEPTH_PLACER_LAYOUT },
|
|
26220
|
+
paint: { ...l.paint ?? {}, "text-opacity": 0 },
|
|
26221
|
+
metadata: { ...l.metadata ?? {}, "chrt:placerFor": l.id }
|
|
26222
|
+
};
|
|
26223
|
+
}
|
|
26224
|
+
function isVisibleDangerDepthLabel(l) {
|
|
26225
|
+
return l.type === "symbol" && DANGER_DEPTH_LABEL_ID.test(l.id) && l.layout?.["text-field"] !== void 0;
|
|
26226
|
+
}
|
|
26227
|
+
function classOf(l) {
|
|
26228
|
+
return isVisibleDangerDepthLabel(l) ? DANGER_DEPTH_LABEL_ID.exec(l.id)?.[1] ?? null : null;
|
|
26229
|
+
}
|
|
26230
|
+
|
|
26175
26231
|
// src/atlas/feature-decimation.ts
|
|
26176
26232
|
function getGridSizeForZoom(zoom) {
|
|
26177
26233
|
if (zoom < 7) return 50;
|
|
@@ -29328,7 +29384,6 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
|
|
|
29328
29384
|
};
|
|
29329
29385
|
if (HAZARD_GROUPS.has(entry?.viewingGroup ?? 0)) {
|
|
29330
29386
|
const watlev = ["to-number", ["coalesce", ["get", "WATLEV"], ["get", "watlev"], 0], 0];
|
|
29331
|
-
const valsou = ["to-number", ["coalesce", ["get", "VALSOU"], ["get", "valsou"], 99], 99];
|
|
29332
29387
|
const hazardIconSize = [
|
|
29333
29388
|
"interpolate",
|
|
29334
29389
|
["linear"],
|
|
@@ -29372,9 +29427,9 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
|
|
|
29372
29427
|
//
|
|
29373
29428
|
// Deconflicting hazards against each other stays; it just no longer
|
|
29374
29429
|
// runs through suppression:
|
|
29375
|
-
// - `symbol-sort-key` (below)
|
|
29376
|
-
//
|
|
29377
|
-
//
|
|
29430
|
+
// - `symbol-sort-key` (below) sets PAINT ORDER, so the worst
|
|
29431
|
+
// hazard is the one painted on top rather than the one that
|
|
29432
|
+
// survives.
|
|
29378
29433
|
// - the icon-size curve above is what keeps a dense ledge legible
|
|
29379
29434
|
// at the zoomed-out end of Harbor. That is now the only thing
|
|
29380
29435
|
// doing it, which is why its low end was lowered in the same
|
|
@@ -29391,18 +29446,59 @@ function buildLayersForClass(objectClass2, ct, sourceId = DEFAULT_REGION, opts =
|
|
|
29391
29446
|
// hazards present to OTHER classes' placement, keeping labels off
|
|
29392
29447
|
// them.
|
|
29393
29448
|
"icon-padding": 2,
|
|
29449
|
+
// ── PAINT ORDER: THE WORST HAZARD ON TOP, IN FOUR KEYS ─────────────
|
|
29450
|
+
//
|
|
29451
|
+
// With overlap allowed MapLibre paints a layer in ascending key,
|
|
29452
|
+
// so a HIGHER key is painted OVER a lower one:
|
|
29453
|
+
// 3 covers and uncovers (WATLEV 4)
|
|
29454
|
+
// 2 awash (WATLEV 5)
|
|
29455
|
+
// 1 everything else: submerged, unknown, subject to inundation,
|
|
29456
|
+
// floating
|
|
29457
|
+
// 0 stands above the water (WATLEV 1 partly submerged at high
|
|
29458
|
+
// water, 2 always dry). Seen by eye, and it usually carries no
|
|
29459
|
+
// sounding, so the old key already ranked it last (a missing
|
|
29460
|
+
// VALSOU counted as 99 m).
|
|
29461
|
+
//
|
|
29462
|
+
// Until 2026-10-09 this was `case 4 → 1, 5 → 2, else 10 + VALSOU`,
|
|
29463
|
+
// meant as "worst first". With overlap that is "worst UNDERNEATH":
|
|
29464
|
+
// the deepest rock was painted over everything. Measured on the
|
|
29465
|
+
// chart bench, Boston z12.3 at 1280×800: of 758 overlapping pairs
|
|
29466
|
+
// with different icons, all 758 had the lesser hazard on top.
|
|
29467
|
+
//
|
|
29468
|
+
// Why four keys and not a depth ladder:
|
|
29469
|
+
// - An icon is picked by WATLEV alone (the `icon-image` match
|
|
29470
|
+
// above, every symbol family), never by depth. Each key holds
|
|
29471
|
+
// ONE icon per class (UWTROC 01 | 03 | 04 | 04, OBSTRN
|
|
29472
|
+
// 03 | 03 | 03 | 01, WRECKS 04 | 04 | 04 | 01), so two hazards
|
|
29473
|
+
// that share a key look the same, and which is on top cannot be
|
|
29474
|
+
// seen. With three keys the dry obstructions and wrecks shared
|
|
29475
|
+
// the lowest one and were painted over submerged ones up to 4
|
|
29476
|
+
// times a view; with four, never.
|
|
29477
|
+
// - MapLibre 5.24 draws a layer that can overlap and has a
|
|
29478
|
+
// feature-reading key ONE SEGMENT PER DISTINCT KEY PER TILE
|
|
29479
|
+
// (`SymbolBucket.addSymbols` → `prepareSegment`;
|
|
29480
|
+
// `drawLayerSymbols`, `hasSortKey && bucket.canOverlap`). The
|
|
29481
|
+
// old key had one value per sounded depth, so it cost a draw
|
|
29482
|
+
// call for every distinct VALSOU in every tile (up to 50 in one
|
|
29483
|
+
// bucket). Four keys cost at most four, and no bucket measured
|
|
29484
|
+
// held more than three.
|
|
29485
|
+
//
|
|
29486
|
+
// It should change paint order only. A hazard icon has one fixed
|
|
29487
|
+
// anchor and is always drawn, and every one of them puts its box in
|
|
29488
|
+
// the collision index whatever the order. The census measures that
|
|
29489
|
+
// rather than assuming it: every icon, label and sounding in view,
|
|
29490
|
+
// each form booted twice (`scripts/chart-bench/hazard-icon-census.ts`).
|
|
29491
|
+
// Its numbers are in `danger-depth-callouts.test.ts`, which pins
|
|
29492
|
+
// this order.
|
|
29394
29493
|
"symbol-sort-key": [
|
|
29395
29494
|
"case",
|
|
29396
29495
|
["==", watlev, 4],
|
|
29397
|
-
|
|
29496
|
+
3,
|
|
29398
29497
|
["==", watlev, 5],
|
|
29399
29498
|
2,
|
|
29400
|
-
|
|
29401
|
-
|
|
29402
|
-
|
|
29403
|
-
// hazard at the same point, but ranks dangerously-shallow
|
|
29404
|
-
// submerged rocks above deeper ones.
|
|
29405
|
-
["+", 10, valsou]
|
|
29499
|
+
["any", ["==", watlev, 1], ["==", watlev, 2]],
|
|
29500
|
+
0,
|
|
29501
|
+
1
|
|
29406
29502
|
]
|
|
29407
29503
|
};
|
|
29408
29504
|
}
|
|
@@ -31974,7 +32070,14 @@ function generateStyle(palette = "DAY", opts = {}) {
|
|
|
31974
32070
|
layers: finalLayers
|
|
31975
32071
|
};
|
|
31976
32072
|
const familyStyle = symbolSet === "s101" ? applyS101SymbolSet(style) : symbolSet === "chrt" ? applyChrtSymbolSet(style, palette) : symbolSet === "raster" ? applyRasterSymbolSet(style) : style;
|
|
31977
|
-
const
|
|
32073
|
+
const einked = applyEinkPortrayal(familyStyle, palette, { safetyContour: opts.safetyContour });
|
|
32074
|
+
const placed = opts.dangerDepthPlacers === true ? addDangerDepthPlacers(einked.layers) : einked.layers;
|
|
32075
|
+
const portrayed = placed === einked.layers ? einked : {
|
|
32076
|
+
...einked,
|
|
32077
|
+
layers: placed,
|
|
32078
|
+
// The placers are emitted layers: the count is of what the style carries.
|
|
32079
|
+
metadata: { ...einked.metadata, "chrt:layer-count": placed.length }
|
|
32080
|
+
};
|
|
31978
32081
|
const sized = applyChartSymbolScales(portrayed.layers, opts.symbolScales, opts.soundingsRule);
|
|
31979
32082
|
return sized === portrayed.layers ? portrayed : { ...portrayed, layers: sized };
|
|
31980
32083
|
}
|
|
@@ -32899,6 +33002,10 @@ export {
|
|
|
32899
33002
|
CHRT_STYLE_MODES,
|
|
32900
33003
|
Chrt,
|
|
32901
33004
|
ChrtError,
|
|
33005
|
+
DANGER_DEPTH_LABEL_ID,
|
|
33006
|
+
DANGER_DEPTH_PLACER_ID,
|
|
33007
|
+
DANGER_DEPTH_PLACER_LAYOUT,
|
|
33008
|
+
DANGER_DEPTH_VISIBLE_LAYOUT,
|
|
32902
33009
|
DEFAULT_CLICK_TOLERANCE,
|
|
32903
33010
|
DEFAULT_CUSTOM_STYLE_CONFIG,
|
|
32904
33011
|
DEFAULT_INSPECT_CLASS_RANK,
|
|
@@ -32997,6 +33104,7 @@ export {
|
|
|
32997
33104
|
WATER_BODY_LAYER_GROUPS,
|
|
32998
33105
|
WATER_TEXT_CLASSES,
|
|
32999
33106
|
WeatherEndpoint,
|
|
33107
|
+
addDangerDepthPlacers,
|
|
33000
33108
|
applyBaseBundle,
|
|
33001
33109
|
applyChartSymbolScales,
|
|
33002
33110
|
applyChartSymbolScalesToLayer,
|
|
@@ -33039,6 +33147,7 @@ export {
|
|
|
33039
33147
|
combineWithBandFilter,
|
|
33040
33148
|
contourValueFactor,
|
|
33041
33149
|
contrastRatio,
|
|
33150
|
+
dangerDepthPlacerId,
|
|
33042
33151
|
daymarkColor,
|
|
33043
33152
|
decimateFeatures,
|
|
33044
33153
|
decodeAreaFeatureProps,
|
|
@@ -33089,6 +33198,7 @@ export {
|
|
|
33089
33198
|
hazardFillExpression,
|
|
33090
33199
|
iconExpressionForFamily,
|
|
33091
33200
|
iconSliderFor,
|
|
33201
|
+
isDangerDepthPlacer,
|
|
33092
33202
|
isDepthAreaClassLayerId,
|
|
33093
33203
|
isDrapeable,
|
|
33094
33204
|
isEinkColorTable,
|