UNPKG

@elastic/ems-client

Version:

JavaScript client library for the Elastic Maps Service

26 lines (25 loc) 1.82 kB
import { ChromaStatic } from 'chroma-js'; import { ColorSpecification, DataDrivenPropertyValueSpecification, PropertyValueSpecification } from 'maplibre-gl'; /** * Resolves a target URL path relative to the host. * This is specifically useed by the Kibana proxy re-routing. * It also handles trailing slashes in tileApiUrl and fileApiUrl parameters. */ export declare function toAbsoluteUrl(host: string | undefined, path: string): string; export type mbColorDefinition = PropertyValueSpecification<ColorSpecification> | DataDrivenPropertyValueSpecification<ColorSpecification>; export type layerPaintProperty = { 'background-color'?: PropertyValueSpecification<ColorSpecification>; 'circle-color'?: DataDrivenPropertyValueSpecification<ColorSpecification>; 'circle-stroke-color'?: DataDrivenPropertyValueSpecification<ColorSpecification>; 'fill-color'?: DataDrivenPropertyValueSpecification<ColorSpecification>; 'fill-extrusion-color'?: DataDrivenPropertyValueSpecification<ColorSpecification>; 'fill-outline-color'?: DataDrivenPropertyValueSpecification<ColorSpecification>; 'icon-color'?: DataDrivenPropertyValueSpecification<ColorSpecification>; 'icon-halo-color'?: DataDrivenPropertyValueSpecification<ColorSpecification>; 'line-color'?: DataDrivenPropertyValueSpecification<ColorSpecification>; 'text-color'?: DataDrivenPropertyValueSpecification<ColorSpecification>; 'text-halo-color'?: DataDrivenPropertyValueSpecification<ColorSpecification>; }; export type blendMode = Parameters<ChromaStatic['blend']>[2] | 'mix'; export declare function desaturateColor(paintColor: mbColorDefinition): mbColorDefinition; export declare function colorizeColor(sourceColor: mbColorDefinition, destColor: string, operation?: blendMode, percentage?: number): mbColorDefinition;