@chrtco/sdk 0.10.43 → 0.10.45
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 +12 -0
- package/dist/atlas/browser.cjs +135 -36
- package/dist/atlas/browser.cjs.map +1 -1
- package/dist/atlas/browser.d.cts +26 -0
- package/dist/atlas/browser.d.ts +26 -0
- package/dist/atlas/browser.js +135 -36
- package/dist/atlas/browser.js.map +1 -1
- package/dist/index.cjs +106 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +98 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2991,6 +2991,13 @@ declare function getLookupEntry(layerName: string): LookupEntry;
|
|
|
2991
2991
|
*/
|
|
2992
2992
|
declare const DEFAULT_SAFETY_CONTOUR_M = 10;
|
|
2993
2993
|
declare function depareColor(props: Record<string, unknown>, ct?: ColorTableName, safetyContourM?: number): string;
|
|
2994
|
+
/**
|
|
2995
|
+
* The colour token of each `case` branch of `depareFillExpression`, in branch
|
|
2996
|
+
* order, then the fallback. `depth-area-opaque.ts` names the layers it splits
|
|
2997
|
+
* the expression into from this list, so the two read from one place.
|
|
2998
|
+
*/
|
|
2999
|
+
declare const DEPARE_FILL_BRANCH_TOKENS: readonly ["DEPIT", "DEPVS", "DEPMS", "DEPMD"];
|
|
3000
|
+
declare const DEPARE_FILL_FALLBACK_TOKEN = "DEPDW";
|
|
2994
3001
|
declare function depareFillExpression(ct?: ColorTableName, safetyContourM?: number): unknown[];
|
|
2995
3002
|
declare function lightColor(props: Record<string, unknown>, ct?: ColorTableName): string;
|
|
2996
3003
|
declare function lightFillExpression(ct?: ColorTableName): unknown[];
|
|
@@ -4854,6 +4861,25 @@ declare function drapeHalves<T extends {
|
|
|
4854
4861
|
direct: T[];
|
|
4855
4862
|
};
|
|
4856
4863
|
|
|
4864
|
+
/** Metadata key every class layer carries: the id of the fill it was split from. */
|
|
4865
|
+
declare const OPAQUE_SPLIT_OF = "chrt:opaqueSplitOf";
|
|
4866
|
+
/** The id of the class layer for one `case` branch token, split from `baseId`. */
|
|
4867
|
+
declare function depthAreaClassLayerId(baseId: string, token: string): string;
|
|
4868
|
+
/** The class layer ids a split adds above `baseId`, bottom to top. */
|
|
4869
|
+
declare function depthAreaSplitIds(baseId: string): string[];
|
|
4870
|
+
/** True for an id this module minted. */
|
|
4871
|
+
declare function isDepthAreaClassLayerId(id: string): boolean;
|
|
4872
|
+
/** The id of the fill `layer` was split from, or null for any other layer. */
|
|
4873
|
+
declare function opaqueSplitBaseOf(layer: {
|
|
4874
|
+
metadata?: unknown;
|
|
4875
|
+
}): string | null;
|
|
4876
|
+
/**
|
|
4877
|
+
* Split every DEPARE fill whose only reason for the translucent pass is its
|
|
4878
|
+
* data-driven colour. A layer of any other shape — a pattern, a non-unit
|
|
4879
|
+
* opacity, a colour that is not the four-branch `case` — is left as it is.
|
|
4880
|
+
*/
|
|
4881
|
+
declare function splitOpaqueDepthAreas<T>(layers: readonly T[]): T[];
|
|
4882
|
+
|
|
4857
4883
|
/**
|
|
4858
4884
|
* LAMPS — lighted aids to navigation drawn as the lights they are at night.
|
|
4859
4885
|
*
|
|
@@ -5324,4 +5350,4 @@ declare class Chrt {
|
|
|
5324
5350
|
warmTiles(region?: string): Promise<TileTokenResponse>;
|
|
5325
5351
|
}
|
|
5326
5352
|
|
|
5327
|
-
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, 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, DRAPEABLE_LAYER_TYPES, 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, LAMP_CORE_LAYER_ID, LAMP_GLOW_LAYER_ID, LAMP_LAYER_IDS, LAMP_TICK_MS, LAND_ATTRIBUTION, LAND_BUILD_MAXZOOM, LAND_REGION, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LampLayer, type LookupEntry, 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, 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, SIGPER_TOLERANCE_SECONDS, SIGSEQ_MAX_TERMS, SOUNDING_LAYERS, 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, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, applyBaseBundle, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, 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, chrtAtonTintExpression, chrtHouseColor, chrtLightTintExpression, collectCandidates, collectClickCandidates, combineWithBandFilter, contrastRatio, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeNavAidProps, depareColor, depareFillExpression, deriveMarinerName, drapeHalves, drapedFirst, 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, isDrapeable, isLabelLayerVisible, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, labelSortKey, lampRhythmColour, lampRhythmOpacity, lateralColor, lateralFillExpression, lightColor, lightFillExpression, lightsIconExpression, normalizeStyleMode, normalizeTheme, paginate, parseListCodes, parseSigseqTerms, parseWebhook, patternSpriteId, preprocessLights, preprocessNavAids, preprocessSoundings, preprocessWaterBodies, rasterAtonIconExpression, relativeLuminance, resolveCustomTheme, resolveRasterImage, resolveS101Color, resolveStyle, resolveTargetClass, rhythmProperties, s101ArtworkProvenance, sanitizeCustomStyleConfig, scaleLinearLight, scaleSizeValue, scaminToMinZoom, sectorLimitToArcBearing, styleModeBand, terrainStackCount, themeChrtGlyph, tileTemplate, uncoveredSectorArcs, withinBboxFilter, worldMinusBboxPolygon };
|
|
5353
|
+
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, 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, DEPARE_FILL_BRANCH_TOKENS, DEPARE_FILL_FALLBACK_TOKEN, DRAPEABLE_LAYER_TYPES, 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, LAMP_CORE_LAYER_ID, LAMP_GLOW_LAYER_ID, LAMP_LAYER_IDS, LAMP_TICK_MS, LAND_ATTRIBUTION, LAND_BUILD_MAXZOOM, LAND_REGION, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LampLayer, type LookupEntry, 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, 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, SIGPER_TOLERANCE_SECONDS, SIGSEQ_MAX_TERMS, SOUNDING_LAYERS, 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, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, applyBaseBundle, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, 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, chrtAtonTintExpression, chrtHouseColor, chrtLightTintExpression, collectCandidates, collectClickCandidates, combineWithBandFilter, contrastRatio, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeNavAidProps, depareColor, depareFillExpression, depthAreaClassLayerId, depthAreaSplitIds, deriveMarinerName, drapeHalves, drapedFirst, 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, isDepthAreaClassLayerId, isDrapeable, isLabelLayerVisible, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, 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, sanitizeCustomStyleConfig, scaleLinearLight, scaleSizeValue, scaminToMinZoom, sectorLimitToArcBearing, splitOpaqueDepthAreas, styleModeBand, terrainStackCount, themeChrtGlyph, tileTemplate, uncoveredSectorArcs, withinBboxFilter, worldMinusBboxPolygon };
|
package/dist/index.d.ts
CHANGED
|
@@ -2991,6 +2991,13 @@ declare function getLookupEntry(layerName: string): LookupEntry;
|
|
|
2991
2991
|
*/
|
|
2992
2992
|
declare const DEFAULT_SAFETY_CONTOUR_M = 10;
|
|
2993
2993
|
declare function depareColor(props: Record<string, unknown>, ct?: ColorTableName, safetyContourM?: number): string;
|
|
2994
|
+
/**
|
|
2995
|
+
* The colour token of each `case` branch of `depareFillExpression`, in branch
|
|
2996
|
+
* order, then the fallback. `depth-area-opaque.ts` names the layers it splits
|
|
2997
|
+
* the expression into from this list, so the two read from one place.
|
|
2998
|
+
*/
|
|
2999
|
+
declare const DEPARE_FILL_BRANCH_TOKENS: readonly ["DEPIT", "DEPVS", "DEPMS", "DEPMD"];
|
|
3000
|
+
declare const DEPARE_FILL_FALLBACK_TOKEN = "DEPDW";
|
|
2994
3001
|
declare function depareFillExpression(ct?: ColorTableName, safetyContourM?: number): unknown[];
|
|
2995
3002
|
declare function lightColor(props: Record<string, unknown>, ct?: ColorTableName): string;
|
|
2996
3003
|
declare function lightFillExpression(ct?: ColorTableName): unknown[];
|
|
@@ -4854,6 +4861,25 @@ declare function drapeHalves<T extends {
|
|
|
4854
4861
|
direct: T[];
|
|
4855
4862
|
};
|
|
4856
4863
|
|
|
4864
|
+
/** Metadata key every class layer carries: the id of the fill it was split from. */
|
|
4865
|
+
declare const OPAQUE_SPLIT_OF = "chrt:opaqueSplitOf";
|
|
4866
|
+
/** The id of the class layer for one `case` branch token, split from `baseId`. */
|
|
4867
|
+
declare function depthAreaClassLayerId(baseId: string, token: string): string;
|
|
4868
|
+
/** The class layer ids a split adds above `baseId`, bottom to top. */
|
|
4869
|
+
declare function depthAreaSplitIds(baseId: string): string[];
|
|
4870
|
+
/** True for an id this module minted. */
|
|
4871
|
+
declare function isDepthAreaClassLayerId(id: string): boolean;
|
|
4872
|
+
/** The id of the fill `layer` was split from, or null for any other layer. */
|
|
4873
|
+
declare function opaqueSplitBaseOf(layer: {
|
|
4874
|
+
metadata?: unknown;
|
|
4875
|
+
}): string | null;
|
|
4876
|
+
/**
|
|
4877
|
+
* Split every DEPARE fill whose only reason for the translucent pass is its
|
|
4878
|
+
* data-driven colour. A layer of any other shape — a pattern, a non-unit
|
|
4879
|
+
* opacity, a colour that is not the four-branch `case` — is left as it is.
|
|
4880
|
+
*/
|
|
4881
|
+
declare function splitOpaqueDepthAreas<T>(layers: readonly T[]): T[];
|
|
4882
|
+
|
|
4857
4883
|
/**
|
|
4858
4884
|
* LAMPS — lighted aids to navigation drawn as the lights they are at night.
|
|
4859
4885
|
*
|
|
@@ -5324,4 +5350,4 @@ declare class Chrt {
|
|
|
5324
5350
|
warmTiles(region?: string): Promise<TileTokenResponse>;
|
|
5325
5351
|
}
|
|
5326
5352
|
|
|
5327
|
-
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, 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, DRAPEABLE_LAYER_TYPES, 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, LAMP_CORE_LAYER_ID, LAMP_GLOW_LAYER_ID, LAMP_LAYER_IDS, LAMP_TICK_MS, LAND_ATTRIBUTION, LAND_BUILD_MAXZOOM, LAND_REGION, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LampLayer, type LookupEntry, 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, 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, SIGPER_TOLERANCE_SECONDS, SIGSEQ_MAX_TERMS, SOUNDING_LAYERS, 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, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, applyBaseBundle, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, 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, chrtAtonTintExpression, chrtHouseColor, chrtLightTintExpression, collectCandidates, collectClickCandidates, combineWithBandFilter, contrastRatio, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeNavAidProps, depareColor, depareFillExpression, deriveMarinerName, drapeHalves, drapedFirst, 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, isDrapeable, isLabelLayerVisible, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, labelSortKey, lampRhythmColour, lampRhythmOpacity, lateralColor, lateralFillExpression, lightColor, lightFillExpression, lightsIconExpression, normalizeStyleMode, normalizeTheme, paginate, parseListCodes, parseSigseqTerms, parseWebhook, patternSpriteId, preprocessLights, preprocessNavAids, preprocessSoundings, preprocessWaterBodies, rasterAtonIconExpression, relativeLuminance, resolveCustomTheme, resolveRasterImage, resolveS101Color, resolveStyle, resolveTargetClass, rhythmProperties, s101ArtworkProvenance, sanitizeCustomStyleConfig, scaleLinearLight, scaleSizeValue, scaminToMinZoom, sectorLimitToArcBearing, styleModeBand, terrainStackCount, themeChrtGlyph, tileTemplate, uncoveredSectorArcs, withinBboxFilter, worldMinusBboxPolygon };
|
|
5353
|
+
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, 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, DEPARE_FILL_BRANCH_TOKENS, DEPARE_FILL_FALLBACK_TOKEN, DRAPEABLE_LAYER_TYPES, 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, LAMP_CORE_LAYER_ID, LAMP_GLOW_LAYER_ID, LAMP_LAYER_IDS, LAMP_TICK_MS, LAND_ATTRIBUTION, LAND_BUILD_MAXZOOM, LAND_REGION, type LabelBehavior, type LabelConfigOptions, type LabelLayerConfig, type LabelSettings, type LampLayer, type LookupEntry, 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, 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, SIGPER_TOLERANCE_SECONDS, SIGSEQ_MAX_TERMS, SOUNDING_LAYERS, 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, type WaterBodySettings, WeatherEndpoint, type WeatherReading, type WebhookEvent, type WebhookEventType, type WebhookPayload, applyBaseBundle, applyChrtSymbolSet, applyColorTheme, applyCustomStyleSettings, 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, chrtAtonTintExpression, chrtHouseColor, chrtLightTintExpression, collectCandidates, collectClickCandidates, combineWithBandFilter, contrastRatio, daymarkColor, decimateFeatures, decodeAreaFeatureProps, decodeBridgeProps, decodeCandidate, decodeNavAidProps, depareColor, depareFillExpression, depthAreaClassLayerId, depthAreaSplitIds, deriveMarinerName, drapeHalves, drapedFirst, 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, isDepthAreaClassLayerId, isDrapeable, isLabelLayerVisible, isNavAidLayer, isNavAidLayerVisible, isSoundingLayerVisible, isVisibleInMode, isWaterBodyLayerVisible, 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, sanitizeCustomStyleConfig, scaleLinearLight, scaleSizeValue, scaminToMinZoom, sectorLimitToArcBearing, splitOpaqueDepthAreas, styleModeBand, terrainStackCount, themeChrtGlyph, tileTemplate, uncoveredSectorArcs, withinBboxFilter, worldMinusBboxPolygon };
|
package/dist/index.js
CHANGED
|
@@ -5710,8 +5710,11 @@ function depareColor(props, ct = "DAY", safetyContourM = DEFAULT_SAFETY_CONTOUR_
|
|
|
5710
5710
|
if (drval1 < DEPARE_DEEP_CUT_M) return resolveColor("DEPMD", ct);
|
|
5711
5711
|
return resolveColor("DEPDW", ct);
|
|
5712
5712
|
}
|
|
5713
|
+
var DEPARE_FILL_BRANCH_TOKENS = ["DEPIT", "DEPVS", "DEPMS", "DEPMD"];
|
|
5714
|
+
var DEPARE_FILL_FALLBACK_TOKEN = "DEPDW";
|
|
5713
5715
|
function depareFillExpression(ct = "DAY", safetyContourM = DEFAULT_SAFETY_CONTOUR_M) {
|
|
5714
5716
|
const safety = effectiveSafetyContour(safetyContourM);
|
|
5717
|
+
const [it, vs, ms, md] = DEPARE_FILL_BRANCH_TOKENS;
|
|
5715
5718
|
return [
|
|
5716
5719
|
"case",
|
|
5717
5720
|
[
|
|
@@ -5719,14 +5722,14 @@ function depareFillExpression(ct = "DAY", safetyContourM = DEFAULT_SAFETY_CONTOU
|
|
|
5719
5722
|
["<", ["coalesce", ["get", "DRVAL1"], ["get", "drval1"], -1], 0],
|
|
5720
5723
|
["<=", ["coalesce", ["get", "DRVAL2"], ["get", "drval2"], 0], 0]
|
|
5721
5724
|
],
|
|
5722
|
-
resolveColor(
|
|
5725
|
+
resolveColor(it, ct),
|
|
5723
5726
|
["<", ["coalesce", ["get", "DRVAL1"], ["get", "drval1"], -1], DEPARE_SHALLOW_CUT_M],
|
|
5724
|
-
resolveColor(
|
|
5727
|
+
resolveColor(vs, ct),
|
|
5725
5728
|
["<", ["coalesce", ["get", "DRVAL1"], ["get", "drval1"], -1], safety],
|
|
5726
|
-
resolveColor(
|
|
5729
|
+
resolveColor(ms, ct),
|
|
5727
5730
|
["<", ["coalesce", ["get", "DRVAL1"], ["get", "drval1"], -1], DEPARE_DEEP_CUT_M],
|
|
5728
|
-
resolveColor(
|
|
5729
|
-
resolveColor(
|
|
5731
|
+
resolveColor(md, ct),
|
|
5732
|
+
resolveColor(DEPARE_FILL_FALLBACK_TOKEN, ct)
|
|
5730
5733
|
];
|
|
5731
5734
|
}
|
|
5732
5735
|
function listAttrString(attr) {
|
|
@@ -29798,6 +29801,11 @@ function baseInlandWaterLayers(opts = {}) {
|
|
|
29798
29801
|
];
|
|
29799
29802
|
}
|
|
29800
29803
|
|
|
29804
|
+
// src/atlas/tile-number.ts
|
|
29805
|
+
function tileNumber(property, fallback) {
|
|
29806
|
+
return ["to-number", ["coalesce", ["get", property], fallback], fallback];
|
|
29807
|
+
}
|
|
29808
|
+
|
|
29801
29809
|
// src/atlas/land-layers.ts
|
|
29802
29810
|
var LAND_SURFACE_MINZOOM = BAND_PRIORITY_RANGES["5"].minzoom;
|
|
29803
29811
|
var LAND_SURFACE_LAYERS = (id) => id === "chrtland-base" || id === "chrtland-cover" || id.startsWith("chrtland-contour") || id === "chrtland-hillshade" || id === "chrtland-water" || id.startsWith("chrtland-fade-");
|
|
@@ -29864,7 +29872,7 @@ var LAND_THEMES = {
|
|
|
29864
29872
|
exaggeration: 0.45
|
|
29865
29873
|
}
|
|
29866
29874
|
};
|
|
29867
|
-
var FITS = ["<=",
|
|
29875
|
+
var FITS = ["<=", tileNumber("min_z", 0), ["zoom"]];
|
|
29868
29876
|
var ANCHOR = ["coalesce", ["get", "anchor"], "top"];
|
|
29869
29877
|
var anchorOffset = (em) => [
|
|
29870
29878
|
"match",
|
|
@@ -29900,7 +29908,7 @@ function landLayers(opts = {}) {
|
|
|
29900
29908
|
type: "fill",
|
|
29901
29909
|
source: src,
|
|
29902
29910
|
"source-layer": "land_cover",
|
|
29903
|
-
filter: ["<=",
|
|
29911
|
+
filter: ["<=", tileNumber("min_z", 0), ["zoom"]],
|
|
29904
29912
|
paint: {
|
|
29905
29913
|
"fill-color": [
|
|
29906
29914
|
"match",
|
|
@@ -29935,10 +29943,10 @@ function landLayers(opts = {}) {
|
|
|
29935
29943
|
}
|
|
29936
29944
|
const isIndexContour = [
|
|
29937
29945
|
"any",
|
|
29938
|
-
["<=",
|
|
29939
|
-
["==",
|
|
29946
|
+
["<=", tileNumber("index_z", 99), ["zoom"]],
|
|
29947
|
+
["==", tileNumber("is_index", 0), 1]
|
|
29940
29948
|
];
|
|
29941
|
-
const contourVisible = ["<=",
|
|
29949
|
+
const contourVisible = ["<=", tileNumber("min_z", 0), ["zoom"]];
|
|
29942
29950
|
layers.push(L({
|
|
29943
29951
|
id: "chrtland-contour-index",
|
|
29944
29952
|
type: "line",
|
|
@@ -29968,7 +29976,7 @@ function landLayers(opts = {}) {
|
|
|
29968
29976
|
type: "fill",
|
|
29969
29977
|
source: src,
|
|
29970
29978
|
"source-layer": "land_water",
|
|
29971
|
-
filter: ["<=",
|
|
29979
|
+
filter: ["<=", tileNumber("min_z", 0), ["zoom"]],
|
|
29972
29980
|
paint: { "fill-color": inlandWaterColor(palette) }
|
|
29973
29981
|
}));
|
|
29974
29982
|
const d = FADE_PX / 2 / FADE_BANDS;
|
|
@@ -30009,7 +30017,7 @@ function landLayers(opts = {}) {
|
|
|
30009
30017
|
source: src,
|
|
30010
30018
|
"source-layer": "land_town",
|
|
30011
30019
|
minzoom: 6.5,
|
|
30012
|
-
filter: [">=",
|
|
30020
|
+
filter: [">=", tileNumber("prank", 0), 10],
|
|
30013
30021
|
layout: {
|
|
30014
30022
|
"text-field": [
|
|
30015
30023
|
"case",
|
|
@@ -30025,16 +30033,16 @@ function landLayers(opts = {}) {
|
|
|
30025
30033
|
6.5,
|
|
30026
30034
|
11.5,
|
|
30027
30035
|
9,
|
|
30028
|
-
["+", 10, ["*", 0.4,
|
|
30036
|
+
["+", 10, ["*", 0.4, tileNumber("prank", 10)]],
|
|
30029
30037
|
13,
|
|
30030
|
-
["+", 13, ["*", 0.5,
|
|
30038
|
+
["+", 13, ["*", 0.5, tileNumber("prank", 10)]]
|
|
30031
30039
|
],
|
|
30032
30040
|
"text-letter-spacing": ["case", ["==", ["get", "upcase"], true], 0.14, 0.02],
|
|
30033
30041
|
"text-offset": anchorOffset(0.75),
|
|
30034
30042
|
"text-anchor": ANCHOR,
|
|
30035
30043
|
"text-padding": 10,
|
|
30036
30044
|
"text-allow-overlap": false,
|
|
30037
|
-
"symbol-sort-key": ["*", -1,
|
|
30045
|
+
"symbol-sort-key": ["*", -1, tileNumber("pop", 0)]
|
|
30038
30046
|
},
|
|
30039
30047
|
paint: { "text-color": T.label, "text-halo-color": T.halo, "text-halo-width": 1.6 }
|
|
30040
30048
|
}));
|
|
@@ -30047,7 +30055,7 @@ function landLayers(opts = {}) {
|
|
|
30047
30055
|
filter: [
|
|
30048
30056
|
"all",
|
|
30049
30057
|
["==", ["get", "enc_dup"], true],
|
|
30050
|
-
["<",
|
|
30058
|
+
["<", tileNumber("prank", 0), 10]
|
|
30051
30059
|
],
|
|
30052
30060
|
layout: {
|
|
30053
30061
|
"text-field": ["get", "name"],
|
|
@@ -30059,7 +30067,7 @@ function landLayers(opts = {}) {
|
|
|
30059
30067
|
"text-allow-overlap": false,
|
|
30060
30068
|
// Within the tier, the bigger place wins the space: without this the
|
|
30061
30069
|
// tie broke on data order and "West Gloucester" beat Gloucester.
|
|
30062
|
-
"symbol-sort-key": ["*", -1,
|
|
30070
|
+
"symbol-sort-key": ["*", -1, tileNumber("pop", 0)]
|
|
30063
30071
|
},
|
|
30064
30072
|
paint: { "text-color": T.label, "text-halo-color": T.halo, "text-halo-width": 1.4 }
|
|
30065
30073
|
}));
|
|
@@ -30072,7 +30080,7 @@ function landLayers(opts = {}) {
|
|
|
30072
30080
|
filter: [
|
|
30073
30081
|
"all",
|
|
30074
30082
|
FITS,
|
|
30075
|
-
["<",
|
|
30083
|
+
["<", tileNumber("prank", 0), 10],
|
|
30076
30084
|
["!=", ["get", "enc_dup"], true]
|
|
30077
30085
|
],
|
|
30078
30086
|
layout: {
|
|
@@ -30099,7 +30107,7 @@ function landLayers(opts = {}) {
|
|
|
30099
30107
|
source: src,
|
|
30100
30108
|
"source-layer": "land_summit",
|
|
30101
30109
|
minzoom: 11.5,
|
|
30102
|
-
filter: ["all", FITS, [">=",
|
|
30110
|
+
filter: ["all", FITS, [">=", tileNumber("peak_m", 0), 40]],
|
|
30103
30111
|
layout: {
|
|
30104
30112
|
"text-field": ["concat", ["get", "name"], "\n", ["to-string", ["get", "peak_m"]], " m"],
|
|
30105
30113
|
"text-font": FONT,
|
|
@@ -31397,6 +31405,69 @@ function generateCustomStyle(config, opts = {}) {
|
|
|
31397
31405
|
return { style, palette, themeFellBack };
|
|
31398
31406
|
}
|
|
31399
31407
|
|
|
31408
|
+
// src/atlas/depth-area-opaque.ts
|
|
31409
|
+
var OPAQUE_SPLIT_OF = "chrt:opaqueSplitOf";
|
|
31410
|
+
function depthAreaClassLayerId(baseId, token) {
|
|
31411
|
+
return `chrt-${token.toLowerCase()}-of-${baseId.replace(/-band(\d)/g, "-b$1")}`;
|
|
31412
|
+
}
|
|
31413
|
+
function depthAreaSplitIds(baseId) {
|
|
31414
|
+
return [...DEPARE_FILL_BRANCH_TOKENS].reverse().map((token) => depthAreaClassLayerId(baseId, token));
|
|
31415
|
+
}
|
|
31416
|
+
var CLASS_LAYER_ID = new RegExp(
|
|
31417
|
+
`^chrt-(?:${DEPARE_FILL_BRANCH_TOKENS.map((t) => t.toLowerCase()).join("|")})-of-`
|
|
31418
|
+
);
|
|
31419
|
+
function isDepthAreaClassLayerId(id) {
|
|
31420
|
+
return CLASS_LAYER_ID.test(id);
|
|
31421
|
+
}
|
|
31422
|
+
function opaqueSplitBaseOf(layer) {
|
|
31423
|
+
const meta = layer.metadata;
|
|
31424
|
+
const base = meta?.[OPAQUE_SPLIT_OF];
|
|
31425
|
+
return typeof base === "string" ? base : null;
|
|
31426
|
+
}
|
|
31427
|
+
function exclusiveBranches(expression) {
|
|
31428
|
+
if (!Array.isArray(expression) || expression[0] !== "case") return null;
|
|
31429
|
+
if ((expression.length - 2) / 2 !== DEPARE_FILL_BRANCH_TOKENS.length) return null;
|
|
31430
|
+
const branches = [];
|
|
31431
|
+
const earlier = [];
|
|
31432
|
+
for (let i = 1; i < expression.length - 1; i += 2) {
|
|
31433
|
+
const colour = expression[i + 1];
|
|
31434
|
+
if (typeof colour !== "string") return null;
|
|
31435
|
+
branches.push({ when: [...earlier.map((c) => ["!", c]), expression[i]], colour });
|
|
31436
|
+
earlier.push(expression[i]);
|
|
31437
|
+
}
|
|
31438
|
+
const fallback = expression[expression.length - 1];
|
|
31439
|
+
if (typeof fallback !== "string") return null;
|
|
31440
|
+
return { branches, fallback };
|
|
31441
|
+
}
|
|
31442
|
+
function andFilter(base, terms) {
|
|
31443
|
+
if (Array.isArray(base) && base[0] === "all") return ["all", ...base.slice(1), ...terms];
|
|
31444
|
+
if (base === void 0) return ["all", ...terms];
|
|
31445
|
+
return ["all", base, ...terms];
|
|
31446
|
+
}
|
|
31447
|
+
function splitOpaqueDepthAreas(layers) {
|
|
31448
|
+
const out = [];
|
|
31449
|
+
for (const raw of layers) {
|
|
31450
|
+
const layer = raw;
|
|
31451
|
+
const paint = layer.paint ?? {};
|
|
31452
|
+
const split = layer.type === "fill" && layer.metadata?.["s52:objectClass"] === "DEPARE" && paint["fill-pattern"] === void 0 && (paint["fill-opacity"] === void 0 || paint["fill-opacity"] === 1) ? exclusiveBranches(paint["fill-color"]) : null;
|
|
31453
|
+
if (split === null) {
|
|
31454
|
+
out.push(raw);
|
|
31455
|
+
continue;
|
|
31456
|
+
}
|
|
31457
|
+
out.push({ ...layer, paint: { ...paint, "fill-color": split.fallback } });
|
|
31458
|
+
for (let k = split.branches.length - 1; k >= 0; k -= 1) {
|
|
31459
|
+
out.push({
|
|
31460
|
+
...layer,
|
|
31461
|
+
id: depthAreaClassLayerId(layer.id, DEPARE_FILL_BRANCH_TOKENS[k]),
|
|
31462
|
+
filter: andFilter(layer.filter, split.branches[k].when),
|
|
31463
|
+
paint: { ...paint, "fill-color": split.branches[k].colour },
|
|
31464
|
+
metadata: { ...layer.metadata ?? {}, [OPAQUE_SPLIT_OF]: layer.id }
|
|
31465
|
+
});
|
|
31466
|
+
}
|
|
31467
|
+
}
|
|
31468
|
+
return out;
|
|
31469
|
+
}
|
|
31470
|
+
|
|
31400
31471
|
// src/pagination.ts
|
|
31401
31472
|
async function* paginate(fetchPage, getItems, getTotalCount, options) {
|
|
31402
31473
|
const pageSize = options?.pageSize ?? 100;
|
|
@@ -31865,6 +31936,8 @@ export {
|
|
|
31865
31936
|
DEFAULT_TILE_BASE_URL,
|
|
31866
31937
|
DEFAULT_TILE_REGION,
|
|
31867
31938
|
DEFAULT_WATER_BODY_SETTINGS,
|
|
31939
|
+
DEPARE_FILL_BRANCH_TOKENS,
|
|
31940
|
+
DEPARE_FILL_FALLBACK_TOKEN,
|
|
31868
31941
|
DRAPEABLE_LAYER_TYPES,
|
|
31869
31942
|
INSPECT_CLASS_RANK,
|
|
31870
31943
|
INSPECT_RANK_DEVIATIONS,
|
|
@@ -31888,6 +31961,7 @@ export {
|
|
|
31888
31961
|
NIGHT_MUTED_INK,
|
|
31889
31962
|
NON_SOLAS_DISCLAIMER,
|
|
31890
31963
|
NON_SOLAS_DISCLAIMER_SHORT,
|
|
31964
|
+
OPAQUE_SPLIT_OF,
|
|
31891
31965
|
OfflineError,
|
|
31892
31966
|
OfflineStyleError,
|
|
31893
31967
|
PLACENAME_LAND_CLASSES,
|
|
@@ -31974,6 +32048,8 @@ export {
|
|
|
31974
32048
|
decodeNavAidProps,
|
|
31975
32049
|
depareColor,
|
|
31976
32050
|
depareFillExpression,
|
|
32051
|
+
depthAreaClassLayerId,
|
|
32052
|
+
depthAreaSplitIds,
|
|
31977
32053
|
deriveMarinerName,
|
|
31978
32054
|
drapeHalves,
|
|
31979
32055
|
drapedFirst,
|
|
@@ -32009,6 +32085,7 @@ export {
|
|
|
32009
32085
|
hazardColor,
|
|
32010
32086
|
hazardFillExpression,
|
|
32011
32087
|
iconExpressionForFamily,
|
|
32088
|
+
isDepthAreaClassLayerId,
|
|
32012
32089
|
isDrapeable,
|
|
32013
32090
|
isLabelLayerVisible,
|
|
32014
32091
|
isNavAidLayer,
|
|
@@ -32026,6 +32103,7 @@ export {
|
|
|
32026
32103
|
lightsIconExpression,
|
|
32027
32104
|
normalizeStyleMode,
|
|
32028
32105
|
normalizeTheme,
|
|
32106
|
+
opaqueSplitBaseOf,
|
|
32029
32107
|
paginate,
|
|
32030
32108
|
parseListCodes,
|
|
32031
32109
|
parseSigseqTerms,
|
|
@@ -32051,6 +32129,7 @@ export {
|
|
|
32051
32129
|
scaleSizeValue,
|
|
32052
32130
|
scaminToMinZoom,
|
|
32053
32131
|
sectorLimitToArcBearing,
|
|
32132
|
+
splitOpaqueDepthAreas,
|
|
32054
32133
|
styleModeBand,
|
|
32055
32134
|
terrainStackCount,
|
|
32056
32135
|
themeChrtGlyph,
|