@kepler.gl/utils 3.3.0-alpha.26 → 3.3.0-alpha.27

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layer-visibility.js","names":["DEFAULT_LAYER_ANIMATABLE_PROPS","exports","name","label","range","step","isSafePropertyName","trim","length","includes","isFiniteNumber","value","Number","isFinite","isRGBColor","Array","isArray","every","channel","normalizeTransitions","type","undefined","ids","Set","transitions","trackType","_iterator","_createForOfIteratorHelper","_step","s","n","done","candidate","_typeof2","id","startTimeMs","endTimeMs","startValue","endValue","easing","numeric","color","valueType","has","time","endpoint","add","endpoints","_toConsumableArray2","push","_objectSpread","err","e","f","sort","a","b","some","transition","index","normalizeLayerPropertyTransitions","prototype","Object","getPrototypeOf","result","_i","_Object$entries","entries","_Object$entries$_i","_slicedToArray2","track","getLayerPropertyTransitions","config","definition","_definition$type","Math","max","min","tracks","propertyTransitions","hasOwnProperty","call","_normalizeTransitions","evaluateTransitions","timeMs","_iterator2","_step2","_loop","v","progress","t","map","_ret","getLayerOpacityFactor","getLayerAnimationTracks","layer","_layer$animatableProp","animatableProps","flatMap","property","getLayerAnimationDuration","layers","reduce","duration","isVisible","latest","_ref","getLayerAnimationOpacityFactor","find","_ref2","getLayerAnimatedConfig","_iterator3","_step3","_step3$value","_result$visConfig","visConfig","getAnnotationOpacityDuration","annotations","annotation","_transitions$endTimeM","_transitions"],"sources":["../../src/layer-visibility.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\nimport type {LayerAnimatableProp, LayerPropertyTransition, RGBColor} from '@kepler.gl/types';\n\ntype PropertyTransitionConfig = {\n propertyTransitions?: Record<string, LayerPropertyTransition[]>;\n};\n\ntype AnimatableLayer = {\n config: PropertyTransitionConfig & {isVisible: boolean};\n animatableProps?: readonly LayerAnimatableProp[];\n};\n\nexport const DEFAULT_LAYER_ANIMATABLE_PROPS: readonly Extract<\n LayerAnimatableProp,\n {type?: 'number'}\n>[] = [{name: 'opacity', label: 'Opacity', range: [0, 1], step: 0.01}];\n\nconst isSafePropertyName = (name: string): boolean =>\n name.trim().length > 0 && !['__proto__', 'constructor', 'prototype'].includes(name);\n\nconst isFiniteNumber = (value: unknown): value is number =>\n typeof value === 'number' && Number.isFinite(value);\n\nconst isRGBColor = (value: unknown): value is RGBColor =>\n Array.isArray(value) &&\n value.length === 3 &&\n [value[0], value[1], value[2]].every(\n channel => isFiniteNumber(channel) && channel >= 0 && channel <= 255\n );\n\n/** Validate one ordered, non-overlapping track without changing its saved input. */\nfunction normalizeTransitions(\n value: unknown,\n range?: readonly [number, number],\n type?: 'number' | 'color'\n): LayerPropertyTransition[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const ids = new Set<string>();\n const transitions: LayerPropertyTransition[] = [];\n let trackType = type;\n for (const candidate of value) {\n if (!candidate || typeof candidate !== 'object' || Array.isArray(candidate)) return undefined;\n const {id, startTimeMs, endTimeMs, startValue, endValue} = candidate;\n const easing = candidate.easing === undefined ? 'easeInOut' : candidate.easing;\n const numeric = isFiniteNumber(startValue) && isFiniteNumber(endValue);\n const color = isRGBColor(startValue) && isRGBColor(endValue);\n const valueType = numeric ? 'number' : color ? 'color' : undefined;\n if (\n typeof id !== 'string' ||\n id.trim().length === 0 ||\n ids.has(id) ||\n ![startTimeMs, endTimeMs].every(\n time => typeof time === 'number' && Number.isFinite(time) && time >= 0\n ) ||\n endTimeMs < startTimeMs ||\n !valueType ||\n (trackType !== undefined && trackType !== valueType) ||\n (numeric &&\n range &&\n ![startValue, endValue].every(endpoint => endpoint >= range[0] && endpoint <= range[1])) ||\n (easing !== 'linear' && easing !== 'easeInOut')\n ) {\n return undefined;\n }\n trackType = valueType;\n ids.add(id);\n const endpoints = color\n ? {startValue: [...startValue] as RGBColor, endValue: [...endValue] as RGBColor}\n : {startValue: startValue as number, endValue: endValue as number};\n transitions.push({id, startTimeMs, endTimeMs, ...endpoints, easing});\n }\n // Cuts at an interval's start come first; equal-time cuts retain their authored order.\n transitions.sort((a, b) => a.startTimeMs - b.startTimeMs || a.endTimeMs - b.endTimeMs);\n if (\n transitions.some(\n (transition, index) => index > 0 && transition.startTimeMs < transitions[index - 1].endTimeMs\n )\n ) {\n return undefined;\n }\n return transitions;\n}\n\n/** Preserve unknown properties for forward compatibility, but never unsafe object keys. */\nexport function normalizeLayerPropertyTransitions(\n value: unknown\n): Record<string, LayerPropertyTransition[]> | undefined {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return undefined;\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null) return undefined;\n const result: Record<string, LayerPropertyTransition[]> = {};\n for (const [name, track] of Object.entries(value)) {\n if (!isSafePropertyName(name)) return undefined;\n const transitions =\n name === 'opacity'\n ? normalizeTransitions(track, [0, 1], 'number')\n : normalizeTransitions(track);\n if (!transitions) return undefined;\n result[name] = transitions;\n }\n return result;\n}\n\nexport function getLayerPropertyTransitions(\n config: PropertyTransitionConfig,\n name: string,\n definition?: LayerAnimatableProp\n): LayerPropertyTransition[] {\n if (!isSafePropertyName(name)) return [];\n if (name === 'opacity' && definition?.type === 'color') return [];\n let range: readonly [number, number] | undefined =\n definition?.type === 'color' ? undefined : definition?.range;\n const type = name === 'opacity' ? 'number' : definition ? definition.type ?? 'number' : undefined;\n if (\n range &&\n (!Array.isArray(range) ||\n range.length !== 2 ||\n !range.every(Number.isFinite) ||\n range[0] > range[1])\n ) {\n return [];\n }\n if (name === 'opacity') {\n range = range ? [Math.max(0, range[0]), Math.min(1, range[1])] : [0, 1];\n }\n const tracks = config.propertyTransitions;\n if (tracks && typeof tracks === 'object' && Object.prototype.hasOwnProperty.call(tracks, name)) {\n return normalizeTransitions(tracks[name], range, type) ?? [];\n }\n return [];\n}\n\n/** Evaluate elapsed time independently of playback order, holding values between transitions. */\nfunction evaluateTransitions(\n transitions: LayerPropertyTransition[],\n timeMs: number\n): number | RGBColor {\n let value = transitions[0].startValue;\n for (const transition of transitions) {\n const {startTimeMs, endTimeMs, startValue, endValue, easing} = transition;\n if (timeMs < startTimeMs) return value;\n if (timeMs < endTimeMs) {\n const progress = (timeMs - startTimeMs) / (endTimeMs - startTimeMs);\n const t = easing === 'linear' ? progress : progress * progress * (3 - 2 * progress);\n return typeof startValue === 'number' && typeof endValue === 'number'\n ? startValue * (1 - t) + endValue * t\n : ((startValue as RGBColor).map(\n (channel, index) => channel * (1 - t) + (endValue as RGBColor)[index] * t\n ) as RGBColor);\n }\n value = endValue;\n }\n return value;\n}\n\nexport function getLayerOpacityFactor(\n config: PropertyTransitionConfig,\n timeMs?: number | null\n): number {\n if (typeof timeMs !== 'number' || !Number.isFinite(timeMs)) return 1;\n const transitions = getLayerPropertyTransitions(config, 'opacity');\n return transitions.length ? (evaluateTransitions(transitions, timeMs) as number) : 1;\n}\n\nexport function getLayerAnimationTracks(\n layer: AnimatableLayer\n): {property: LayerAnimatableProp; transitions: LayerPropertyTransition[]}[] {\n return (layer.animatableProps ?? DEFAULT_LAYER_ANIMATABLE_PROPS).flatMap(property => {\n const transitions = getLayerPropertyTransitions(layer.config, property.name, property);\n return transitions.length ? [{property, transitions}] : [];\n });\n}\n\nexport function getLayerAnimationDuration(layers: readonly AnimatableLayer[]): number {\n return layers.reduce((duration, layer) => {\n if (!layer.config.isVisible) return duration;\n return getLayerAnimationTracks(layer).reduce(\n (latest, {transitions}) => Math.max(latest, transitions[transitions.length - 1].endTimeMs),\n duration\n );\n }, 0);\n}\n\nexport function getLayerAnimationOpacityFactor(\n layer: AnimatableLayer,\n timeMs?: number | null\n): number {\n if (typeof timeMs !== 'number' || !Number.isFinite(timeMs)) return 1;\n const track = getLayerAnimationTracks(layer).find(({property}) => property.name === 'opacity');\n return track ? (evaluateTransitions(track.transitions, timeMs) as number) : 1;\n}\n\n/** Overrides are transient; opacity remains a separate authored-opacity multiplier. */\nexport function getLayerAnimatedConfig(\n layer: AnimatableLayer,\n timeMs?: number | null\n): {color?: RGBColor; visConfig?: Record<string, number | RGBColor>} {\n if (typeof timeMs !== 'number' || !Number.isFinite(timeMs)) return {};\n const result: {color?: RGBColor; visConfig?: Record<string, number | RGBColor>} = {};\n for (const {property, transitions} of getLayerAnimationTracks(layer)) {\n if (property.name !== 'opacity') {\n const value = evaluateTransitions(transitions, timeMs);\n if (property.name === 'color' && property.type === 'color') {\n if (Array.isArray(value)) result.color = value;\n } else {\n result.visConfig ??= {};\n result.visConfig[property.name] = value;\n }\n }\n }\n return result;\n}\n\nexport function getAnnotationOpacityDuration(\n annotations: readonly (PropertyTransitionConfig & {isVisible: boolean})[]\n): number {\n return annotations.reduce((duration, annotation) => {\n const transitions = annotation.isVisible\n ? getLayerPropertyTransitions(annotation, 'opacity')\n : undefined;\n return Math.max(duration, transitions?.[transitions.length - 1]?.endTimeMs ?? 0);\n }, 0);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;;AAaO,IAAMA,8BAGV,GAAAC,OAAA,CAAAD,8BAAA,GAAG,CAAC;EAACE,IAAI,EAAE,SAAS;EAAEC,KAAK,EAAE,SAAS;EAAEC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;EAAEC,IAAI,EAAE;AAAI,CAAC,CAAC;AAEtE,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIJ,IAAY;EAAA,OACtCA,IAAI,CAACK,IAAI,CAAC,CAAC,CAACC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAACC,QAAQ,CAACP,IAAI,CAAC;AAAA;AAErF,IAAMQ,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAc;EAAA,OACpC,OAAOA,KAAK,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACF,KAAK,CAAC;AAAA;AAErD,IAAMG,UAAU,GAAG,SAAbA,UAAUA,CAAIH,KAAc;EAAA,OAChCI,KAAK,CAACC,OAAO,CA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AAQ,CAAC/E,IAAI,KAAK,OAAO,EAAE;UAC1D,IAAIL,KAAK,CAACC,OAAO,CAACL,KAAK,CAAC,EAAEqD,MAAM,CAACvB,KAAK,GAAG9B,KAAK;QAChD,CAAC,MAAM;UAAA,IAAAuG,iBAAA;UACL,CAAAA,iBAAA,GAAAlD,MAAM,CAACmD,SAAS,cAAAD,iBAAA,cAAAA,iBAAA,GAAhBlD,MAAM,CAACmD,SAAS,GAAK,CAAC,CAAC;UACvBnD,MAAM,CAACmD,SAAS,CAAChB,QAAQ,CAACjG,IAAI,CAAC,GAAGS,KAAK;QACzC;MACF;IACF;EAAC,SAAAwC,GAAA;IAAA4D,UAAA,CAAA3D,CAAA,CAAAD,GAAA;EAAA;IAAA4D,UAAA,CAAA1D,CAAA;EAAA;EACD,OAAOW,MAAM;AACf;AAEO,SAASoD,4BAA4BA,CAC1CC,WAAyE,EACjE;EACR,OAAOA,WAAW,CAACf,MAAM,CAAC,UAACC,QAAQ,EAAEe,UAAU,EAAK;IAAA,IAAAC,qBAAA,EAAAC,YAAA;IAClD,IAAMhG,WAAW,GAAG8F,UAAU,CAACd,SAAS,GACpCjC,2BAA2B,CAAC+C,UAAU,EAAE,SAAS,CAAC,GAClDjG,SAAS;IACb,OAAOsD,IAAI,CAACC,GAAG,CAAC2B,QAAQ,GAAAgB,qBAAA,GAAE/F,WAAW,aAAXA,WAAW,gBAAAgG,YAAA,GAAXhG,WAAW,CAAGA,WAAW,CAAChB,MAAM,GAAG,CAAC,CAAC,cAAAgH,YAAA,uBAArCA,YAAA,CAAuCpF,SAAS,cAAAmF,qBAAA,cAAAA,qBAAA,GAAI,CAAC,CAAC;EAClF,CAAC,EAAE,CAAC,CAAC;AACP","ignoreList":[]}
@@ -142,6 +142,7 @@ var DEFAULT_APPLICATION_CONFIG = {
142
142
  enableMapInfo: true,
143
143
  enableCameraBookmarks: true,
144
144
  enableCameraTour: true,
145
+ enableAnimationEditor: true,
145
146
  enableJsonEditors: true,
146
147
  enableLayerJsonEditor: true,
147
148
  enableFilterJsonEditor: true,
@@ -1 +1 @@
1
- {"version":3,"file":"application-config.js","names":["KEPLER_UNFOLDED_BUCKET","isWebpackBuild","__webpack_require__","DEFAULT_APPLICATION_CONFIG","defaultHtmlName","defaultImageName","defaultJsonName","defaultDataName","defaultExportJsonSettings","hasData","enableCustomExportBranding","baseMapLibraryConfig","maplibre","getMapLib","mapLibCssClass","mapLibAttributionCssClass","mapLibName","mapLibUrl","mapbox","cdnUrl","sqlJsUrl","parquetWasmUrl","plugins","table","database","useArrowProgressiveLoading","useOnFilteredItemsChange","enableRasterTileLayer","rasterServerUseLatestTitiler","rasterServerShowServerInput","rasterServerUrls","rasterServerSupportsElevation","rasterServerMaxRetries","rasterServerRetryDelay","rasterServerServerErrorsToRetry","rasterServerMaxPerServerRequests","enableWMSLayer","enableZarrLayer","enableFlowLayer","enableBitmapLayer","enableA5Layer","enableGeohashLayer","enableFlowFieldLayer","enableContourLayer","enableVoronoiLayer","enableDonutLayer","showInlineTilesetExamples","escapeXhtmlForWebpack","maxPitch","enableMapRepeat","enableAnnotations","enableDrawOnMapSketches","enableMapNavigationControl","enableMapScale","enableFitBoundsOnManualLayer","enableSwipeMode","enableGlobeView","enableLayerGroups","themes","enableColumnStats","enableDatasetOps","enableChartsPanel","enableMapInfo","enableCameraBookmarks","enableCameraTour","enableJsonEditors","enableLayerJsonEditor","enableFilterJsonEditor","enableEffectJsonEditor","enableViewportJsonEditor","enableAnimationJsonEditor","enableChartJsonEditor","enableRemoteFileFormatSelector","largeDatasetWarningRows","largeDatasetWarningBytes","acceptedFileFormats","customIcons","customIconUrl","reduxLogLevel","maxArrowBatches","applicationConfig","getApplicationConfig","initApplicationConfig","appConfig","arguments","length","undefined","Object","assign"],"sources":["../../src/application-config.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\nimport type {MapLib, MapRef} from 'react-map-gl/mapbox-legacy';\n\nimport {KEPLER_UNFOLDED_BUCKET} from '@kepler.gl/constants';\nimport type {BaseMapLibraryType} from '@kepler.gl/constants';\n\nimport type {DatabaseAdapter} from './application-config-types';\n\n/**\n * Represents a custom SVG icon that can be used in the icon layer.\n * The mesh describes the icon's geometry as triangulated SVG paths.\n *\n * Important: Triangle cells must use counter-clockwise (CCW) winding order.\n * Positions should be in the range [-1, 1] on both axes.\n */\nexport type SvgIcon = {\n /** Unique identifier for the icon, used as the value in the data's icon column */\n id: string;\n /** Triangulated SVG path geometry */\n mesh: {\n /** Triangle cell indices referencing positions (CCW winding order) */\n cells: [number, number, number][];\n /** Vertex positions [x, y, z] in range [-1, 1] */\n positions: [number, number, number][];\n };\n};\n\n/**\n * Detect if running with webpack build tool\n */\nfunction isWebpackBuild(): boolean {\n // @ts-ignore - __webpack_require__ is injected by webpack at runtime\n return typeof __webpack_require__ !== 'undefined';\n}\n\nexport type MapLibInstance = MapLib;\nexport type GetMapRef = ReturnType<MapRef['getMap']>;\n\nexport type BaseMapLibraryConfig = {\n getMapLib: () => Promise<MapLibInstance>;\n mapLibAttributionCssClass: string;\n mapLibCssClass: string;\n mapLibName: string;\n mapLibUrl: string;\n};\n\n/**\n * A mechanism to override default Kepler values/settings so that we\n * without having to make application-specific changes to the kepler repo.\n */\n/**\n * Controls which Redux actions are suppressed by the dev-mode Redux logger.\n * Mirrors the `log.level` convention used by luma.gl / deck.gl.\n *\n * - `0` — log every action (no filtering)\n * - `1` — suppress the highest-frequency UI noise:\n * MOUSE_MOVE, LAYER_HOVER, SET_MAP_BOUNDARY, SET_LOADING_INDICATOR,\n * SET_LOADING_PROGRESS\n * - `2` — suppress everything in level 1 plus map/layer update chatter:\n * LOAD_MAP_STYLES, UPDATE_MAP, LAYER_VISUAL_CHANGE,\n * ON_MAP_CLICK, FILTER_CHANGE, MAP_LOAD_STARTED\n *\n * Effects by context:\n * - **redux-logger** (console output): only active when `NODE_ENV === 'local'` (i.e. `yarn start`)\n * - **Redux DevTools** (`actionsBlacklist`): active whenever the browser extension is present,\n * regardless of `NODE_ENV`\n *\n * Default: `1`\n *\n * @example\n * ```ts\n * initApplicationConfig({ reduxLogLevel: 2 }); // quieter dev console\n * initApplicationConfig({ reduxLogLevel: 0 }); // see every action\n * ```\n */\nexport type ReduxLogLevel = 0 | 1 | 2;\n\n/** Built-in file formats that can be listed in {@link KeplerApplicationConfig.acceptedFileFormats}. */\nexport type KeplerAcceptedFileFormat =\n | 'csv'\n | 'tsv'\n | 'dsv'\n | 'json'\n | 'geojson'\n | 'ndjson'\n | 'jsonl'\n | 'geojsonl'\n | 'ndgeojson'\n | 'ldgeojson'\n | 'kml'\n | 'gpx'\n | 'tcx'\n | 'arrow'\n | 'feather'\n | 'parquet'\n | 'shp'\n | 'shapefile'\n | 'zip'\n | 'dbf'\n | 'shx'\n | 'prj'\n | 'cpg'\n | 'xlsx'\n | 'xls'\n | 'xlsm'\n | 'xlsb'\n | 'excel'\n | 'fgb'\n | 'flatgeobuf';\n\nexport type KeplerApplicationConfig = {\n /** Default name of export HTML file, can be overridden by user */\n defaultHtmlName?: string;\n defaultImageName?: string;\n defaultJsonName?: string;\n defaultDataName?: string;\n defaultExportJsonSettings?: {\n hasData?: boolean;\n };\n /**\n * Whether to show editable application name and website controls for exported maps.\n * Enabled by default.\n */\n enableCustomExportBranding?: boolean;\n baseMapLibraryConfig?: Record<BaseMapLibraryType, BaseMapLibraryConfig>;\n plugins?: any[];\n // KeplerTable alternative\n // TODO improve typing by exporting KeplerTable interface to @kepler.gl/types\n table?: any;\n database?: DatabaseAdapter | null;\n\n // Disable progressive loading for arrow files\n useArrowProgressiveLoading?: boolean;\n // Use the onFilteredItemsChange callback for DataFilterExtension.\n // Enabling this option may cause performance issues when dealing with a large number of layers or sublayers,\n // especially if large Arrow files are split into relatively small batches (should be fixed in the future).\n useOnFilteredItemsChange?: boolean;\n\n // A URL to the CDN where the kepler.gl assets are hosted.\n cdnUrl?: string;\n /**\n * Folder that Export data loads sql.js from to write GeoPackage files. It must hold\n * `sql-wasm.js` and `sql-wasm.wasm` from the sql.js version kepler.gl depends on.\n * Empty loads them from jsDelivr.\n */\n sqlJsUrl?: string;\n /**\n * URL of `parquet_wasm_bg.wasm` from the parquet-wasm version kepler.gl depends on,\n * which Export data uses to write GeoParquet files. Empty loads it from unpkg.\n */\n parquetWasmUrl?: string;\n\n // Raster Tile layer config\n // Raster Tile layer is under development and not ready for production use. Disabled by default.\n enableRasterTileLayer?: boolean;\n /** Whether to use Titiler v0.21 API endpoints instead of v0.11 */\n rasterServerUseLatestTitiler?: boolean;\n /** An array of URLs to shards of the raster tile server to be used by the raster tile layer. */\n rasterServerUrls?: string[];\n /** If true then try to fetch quantized elevation meshes from raster servers */\n rasterServerSupportsElevation?: boolean;\n /** How many times to retry a request if case of rasterServerServerErrorsToRetry errors */\n rasterServerMaxRetries?: number;\n /** How long between retries */\n rasterServerRetryDelay?: number;\n /** An array of HTTP status codes that should be retried when encountered. */\n rasterServerServerErrorsToRetry?: number[];\n /** Maximum number of simultaneous requests per raster server. 0 - no limit */\n rasterServerMaxPerServerRequests?: number;\n /** Whether to show the server input field in the raster tile layer setup form */\n rasterServerShowServerInput?: boolean;\n\n // WMS layer config -- Experimental\n // WMS layer is under development and not ready for production use. Disabled by default.\n enableWMSLayer?: boolean;\n\n // Zarr layer config -- Experimental\n // Enabled by default. Set false to hide Zarr in Add Data and layer type pickers.\n // Existing Zarr layers in saved maps can still render.\n enableZarrLayer?: boolean;\n\n // Flow layer config\n enableFlowLayer?: boolean;\n\n // Bitmap layer config\n enableBitmapLayer?: boolean;\n\n // A5 layer config\n // A5 DGGS layer is optional. Disabled by default; enable via initApplicationConfig.\n enableA5Layer?: boolean;\n\n // GeoHash layer config\n // GeoHash layer is optional. Enabled by default; disable via initApplicationConfig.\n enableGeohashLayer?: boolean;\n\n // Flow Field (streamlines) layer config\n enableFlowFieldLayer?: boolean;\n\n // Contour layer config -- Experimental\n // Enabled by default. Set false to hide Contour in layer type pickers.\n // Existing Contour layers in saved maps can still render.\n enableContourLayer?: boolean;\n\n // Voronoi Mosaic layer config\n // Enabled by default. Set false to hide Voronoi in layer type pickers.\n // Existing Voronoi layers in saved maps can still render.\n enableVoronoiLayer?: boolean;\n\n // Donut layer config\n // Enabled by default. Set false to hide Donut in layer type pickers.\n // Existing Donut layers in saved maps can still render.\n enableDonutLayer?: boolean;\n\n /** Whether to show example URLs in tileset setup forms (vector tile, raster tile, WMS, 3D tile) */\n showInlineTilesetExamples?: boolean;\n\n // Image export config\n /** Whether to apply fix for uglify error in dom-to-image (should be true for webpack builds, false for Vite) */\n escapeXhtmlForWebpack?: boolean;\n\n /** Maximum pitch angle in degrees. deck.gl defaults to 60; set higher (up to 85) for elevated perspectives.\n * Note: values above 60 may cause rendering artifacts with some basemap tile providers. */\n maxPitch?: number;\n\n /**\n * Draw flat-map layers on every visible world copy. Disabled by default because\n * each copy adds rendering and picking work. With it disabled, layers can be\n * missing on adjacent world copies across the antimeridian. Enable with\n * `initApplicationConfig({enableMapRepeat: true})`.\n */\n enableMapRepeat?: boolean;\n\n /** Whether to enable the annotations feature. Enabled by default. */\n enableAnnotations?: boolean;\n\n /**\n * Whether to enable extended Draw on Map sketch tools: Point, Line, Copy all,\n * Convert to Layer, and Edit Properties.\n * Polygon and rectangle drawing remain available when this is disabled. Enabled by default.\n */\n enableDrawOnMapSketches?: boolean;\n\n /** Whether to show the map navigation control (zoom buttons and compass). Enabled by default. */\n enableMapNavigationControl?: boolean;\n\n /** Whether to show the map scale bar at the bottom-left of the map. Enabled by default. */\n enableMapScale?: boolean;\n\n /**\n * Fit the map to a dataset when the layer type dropdown gives a manually\n * added layer its first type. The layer already has a dataset (chosen from\n * Add Layer). Programmatic `layerTypeChange`, saved configs, and later type\n * changes do not move the map.\n * Enabled by default. Disable with {@link initApplicationConfig}.\n *\n * @example\n * ```\n * initApplicationConfig({enableFitBoundsOnManualLayer: false});\n * ```\n */\n enableFitBoundsOnManualLayer?: boolean;\n\n /** Whether to enable the swipe compare mode in split map view. Enabled by default. */\n enableSwipeMode?: boolean;\n\n /** Whether to show the option to switch to the globe view. Enabled by default. */\n enableGlobeView?: boolean;\n\n /** Whether to enable the layer groups feature. Enabled by default. */\n enableLayerGroups?: boolean;\n\n /**\n * Named UI themes to cycle (`dark`, `light`, `space`, `base`).\n * Empty (default): dark theme, no switcher.\n * One theme: that theme is used, no switcher.\n * Two or more: first is the default, a map control cycles the list.\n */\n themes?: string[];\n\n /** Whether to show column statistics in the data table modal. Enabled by default. */\n enableColumnStats?: boolean;\n\n /** Group-by, attribute join, and simple spatial join UI on local datasets. Enabled by default. */\n enableDatasetOps?: boolean;\n\n /**\n * Whether to show the charts map-control panel (big number, bar, line,\n * heatmap, pivot table, tooltip charts, and chart cross-filters).\n * Enabled by default. Disable with {@link initApplicationConfig}.\n */\n enableChartsPanel?: boolean;\n\n /**\n * Whether to show the Map info section in Interactions and the on-map\n * name and description card. Enabled by default.\n */\n enableMapInfo?: boolean;\n\n /** Whether to show the Bookmarks panel in Interactions. Enabled by default. */\n enableCameraBookmarks?: boolean;\n\n /** Whether to show the Camera animation panel in Interactions. Enabled by default. */\n enableCameraTour?: boolean;\n\n /**\n * Master switch for power-user JSON editors. When false, every section editor is hidden.\n * Defaults to true; each section also has its own flag.\n *\n * @example\n * ```\n * initApplicationConfig({\n * enableViewportJsonEditor: true,\n * enableLayerJsonEditor: false\n * });\n * ```\n */\n enableJsonEditors?: boolean;\n\n /** Layer panel `{ }` JSON editor. Enabled by default. */\n enableLayerJsonEditor?: boolean;\n\n /** Filter panel `{ }` JSON editor. Enabled by default. */\n enableFilterJsonEditor?: boolean;\n\n /** Effect panel `{ }` JSON editor. Enabled by default. */\n enableEffectJsonEditor?: boolean;\n\n /**\n * Viewport JSON editor map-control button. Disabled by default because it adds an extra\n * map control.\n */\n enableViewportJsonEditor?: boolean;\n\n /** Animation / time-filter playback `{ }` JSON editor. Enabled by default. */\n enableAnimationJsonEditor?: boolean;\n\n /** Charts panel `{ }` JSON editor. Enabled by default. */\n enableChartJsonEditor?: boolean;\n\n /**\n * Show a format dropdown next to the remote dataset URL field (Auto / CSV / GeoJSON / JSON / Arrow / Parquet).\n * Useful for extensionless URLs such as Azure SAS blobs. Disabled by default.\n */\n enableRemoteFileFormatSelector?: boolean;\n\n /**\n * Warn in the Add Data list when a dataset has at least this many rows.\n * `false` shows no warning. The warning waits until the row count is known.\n *\n * @example\n * ```\n * initApplicationConfig({largeDatasetWarningRows: 1_000_000});\n * initApplicationConfig({largeDatasetWarningRows: false});\n * ```\n */\n largeDatasetWarningRows?: false | number;\n\n /**\n * Warn in the Add Data list when a file is at least this many bytes.\n * `false` shows no file-size warning. Either this or {@link largeDatasetWarningRows}\n * can show the same tag.\n *\n * @example\n * ```\n * initApplicationConfig({largeDatasetWarningBytes: 50 * 1024 * 1024});\n * initApplicationConfig({largeDatasetWarningBytes: false});\n * ```\n */\n largeDatasetWarningBytes?: false | number;\n\n /**\n * File formats Kepler may load from drag-and-drop, the file picker, and remote URLs.\n * Values are format ids or extensions (`csv`, `geojson`, `kml`, `shp`, `xlsx`, `fgb`, …).\n * When omitted or `null`, every built-in format is accepted.\n *\n * @example\n * ```\n * initApplicationConfig({acceptedFileFormats: ['csv', 'geojson', 'parquet']});\n * ```\n */\n acceptedFileFormats?: KeplerAcceptedFileFormat[] | null;\n\n /**\n * Custom SVG icons to be made available in the icon layer.\n * These icons will be merged with the default icons fetched from CDN.\n * Each icon must have a unique `id` and a `mesh` describing its triangulated geometry.\n *\n * @example\n * ```\n * initApplicationConfig({\n * customIcons: [\n * {\n * id: 'my-custom-marker',\n * mesh: {\n * cells: [[0, 1, 2], [2, 3, 0]],\n * positions: [[0, 1, 0], [1, -1, 0], [-1, -1, 0], [0, 0, 0]]\n * }\n * }\n * ]\n * });\n * ```\n */\n customIcons?: SvgIcon[];\n\n /**\n * URL to a remote JSON file containing custom SVG icons.\n * The JSON file should have the format: `{ \"svgIcons\": [{ id, mesh: { cells, positions } }, ...] }`\n * Icons from this URL will be merged with default CDN icons and inline `customIcons`.\n *\n * @example\n * ```\n * initApplicationConfig({\n * customIconUrl: 'https://my-server.com/my-icons.json'\n * });\n * ```\n */\n customIconUrl?: string;\n\n /** Controls Redux action logging verbosity in dev mode. See {@link ReduxLogLevel}. */\n reduxLogLevel?: ReduxLogLevel;\n\n /**\n * If an Arrow/Parquet table has more record batches than this, they are\n * compacted into a single batch. The default is `1`, so any table with more\n * than one record batch is compacted. Deck.gl picking supports at most 255\n * pickable leaf layers, and GeoJSON adds fill/stroke/point sublayers per\n * batch, so a higher cap still overruns picking. Compacting copies the table.\n * Progressive Arrow loading skips compaction on intermediate batches and\n * compacts the completed file once. Set a very large number to never compact.\n *\n * @example\n * ```\n * initApplicationConfig({maxArrowBatches: 64});\n * ```\n */\n maxArrowBatches?: number;\n};\n\nconst DEFAULT_APPLICATION_CONFIG: Required<KeplerApplicationConfig> = {\n defaultHtmlName: 'kepler.gl.html',\n defaultImageName: 'kepler.gl.png',\n defaultJsonName: 'kepler.gl.json',\n defaultDataName: 'kepler.gl',\n defaultExportJsonSettings: {\n hasData: true\n },\n enableCustomExportBranding: true,\n\n baseMapLibraryConfig: {\n maplibre: {\n getMapLib: () => import('maplibre-gl') as unknown as Promise<MapLibInstance>,\n mapLibCssClass: 'maplibregl',\n mapLibAttributionCssClass: 'maplibre-attribution-container',\n mapLibName: 'MapLibre',\n mapLibUrl: 'https://www.maplibre.org/'\n },\n mapbox: {\n getMapLib: () => import('mapbox-gl'),\n mapLibCssClass: 'mapboxgl',\n mapLibAttributionCssClass: 'mapbox-attribution-container',\n mapLibName: 'Mapbox',\n mapLibUrl: 'https://www.mapbox.com/'\n }\n },\n\n cdnUrl: KEPLER_UNFOLDED_BUCKET,\n sqlJsUrl: '',\n parquetWasmUrl: '',\n\n plugins: [],\n // The default table class is KeplerTable.\n // TODO include KeplerTable here when the circular dependency with @kepler.gl/table and @kepler.gl/utils are resolved.\n table: null,\n database: null,\n\n useArrowProgressiveLoading: false,\n useOnFilteredItemsChange: false,\n\n // Raster Tile layer config\n enableRasterTileLayer: true,\n rasterServerUseLatestTitiler: true,\n rasterServerShowServerInput: true,\n rasterServerUrls: [], // TODO: provide a default free server or leave blank\n rasterServerSupportsElevation: true,\n rasterServerMaxRetries: 1,\n rasterServerRetryDelay: 10000,\n rasterServerServerErrorsToRetry: [503],\n rasterServerMaxPerServerRequests: 0,\n\n // WMS layer config\n enableWMSLayer: true,\n\n // Zarr layer config -- experimental, disable via initApplicationConfig\n enableZarrLayer: true,\n\n // Flow layer config\n enableFlowLayer: true,\n\n // Bitmap layer config\n enableBitmapLayer: true,\n\n // A5 layer config\n enableA5Layer: true,\n\n // GeoHash layer config\n enableGeohashLayer: true,\n\n // Flow Field layer config\n enableFlowFieldLayer: true,\n\n // Contour layer config -- disable via initApplicationConfig\n enableContourLayer: true,\n\n // Voronoi Mosaic layer config -- disable via initApplicationConfig\n enableVoronoiLayer: true,\n\n // Donut layer config -- disable via initApplicationConfig\n enableDonutLayer: true,\n\n showInlineTilesetExamples: true,\n\n // Image export config\n // Default to true for webpack builds, false for other build tools (e.g., Vite)\n escapeXhtmlForWebpack: isWebpackBuild(),\n\n maxPitch: 60,\n\n enableMapRepeat: false,\n\n enableAnnotations: true,\n\n enableDrawOnMapSketches: true,\n\n enableMapNavigationControl: true,\n\n enableMapScale: true,\n\n enableFitBoundsOnManualLayer: true,\n\n enableSwipeMode: true,\n\n enableGlobeView: true,\n\n enableLayerGroups: true,\n\n themes: [],\n\n enableColumnStats: true,\n\n enableDatasetOps: true,\n\n enableChartsPanel: true,\n\n enableMapInfo: true,\n\n enableCameraBookmarks: true,\n\n enableCameraTour: true,\n\n enableJsonEditors: true,\n enableLayerJsonEditor: true,\n enableFilterJsonEditor: true,\n enableEffectJsonEditor: true,\n enableViewportJsonEditor: false,\n enableAnimationJsonEditor: true,\n enableChartJsonEditor: true,\n\n enableRemoteFileFormatSelector: false,\n\n largeDatasetWarningRows: 500_000,\n\n largeDatasetWarningBytes: 1024 * 1024 * 1024,\n\n acceptedFileFormats: null,\n\n customIcons: [],\n\n customIconUrl: '',\n\n reduxLogLevel: 1,\n\n maxArrowBatches: 1\n};\n\nconst applicationConfig: Required<KeplerApplicationConfig> = DEFAULT_APPLICATION_CONFIG;\n\nexport const getApplicationConfig = (): Required<KeplerApplicationConfig> => applicationConfig;\n\nexport function initApplicationConfig(appConfig: KeplerApplicationConfig = {}) {\n Object.assign(applicationConfig, appConfig);\n}\n"],"mappings":"AAAA;AACA;;AAIA,SAAQA,sBAAsB,QAAO,sBAAsB;;AAK3D;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA,SAASC,cAAcA,CAAA,EAAY;EACjC;EACA,OAAO,OAAOC,mBAAmB,KAAK,WAAW;AACnD;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;;AAyWA,IAAMC,0BAA6D,GAAG;EACpEC,eAAe,EAAE,gBAAgB;EACjCC,gBAAgB,EAAE,eAAe;EACjCC,eAAe,EAAE,gBAAgB;EACjCC,eAAe,EAAE,WAAW;EAC5BC,yBAAyB,EAAE;IACzBC,OAAO,EAAE;EACX,CAAC;EACDC,0BAA0B,EAAE,IAAI;EAEhCC,oBAAoB,EAAE;IACpBC,QAAQ,EAAE;MACRC,SAAS,EAAE,SAAXA,SAASA,CAAA;QAAA,OAAQ,MAAM,CAAC,aAAa,CAAC;MAAA,CAAsC;MAC5EC,cAAc,EAAE,YAAY;MAC5BC,yBAAyB,EAAE,gCAAgC;MAC3DC,UAAU,EAAE,UAAU;MACtBC,SAAS,EAAE;IACb,CAAC;IACDC,MAAM,EAAE;MACNL,SAAS,EAAE,SAAXA,SAASA,CAAA;QAAA,OAAQ,MAAM,CAAC,WAAW,CAAC;MAAA;MACpCC,cAAc,EAAE,UAAU;MAC1BC,yBAAyB,EAAE,8BAA8B;MACzDC,UAA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C,MAAM,EAAE,EAAE;EAEVC,iBAAiB,EAAE,IAAI;EAEvBC,gBAAgB,EAAE,IAAI;EAEtBC,iBAAiB,EAAE,IAAI;EAEvBC,aAAa,EAAE,IAAI;EAEnBC,qBAAqB,EAAE,IAAI;EAE3BC,gBAAgB,EAAE,IAAI;EAEtBC,iBAAiB,EAAE,IAAI;EACvBC,qBAAqB,EAAE,IAAI;EAC3BC,sBAAsB,EAAE,IAAI;EAC5BC,sBAAsB,EAAE,IAAI;EAC5BC,wBAAwB,EAAE,KAAK;EAC/BC,yBAAyB,EAAE,IAAI;EAC/BC,qBAAqB,EAAE,IAAI;EAE3BC,8BAA8B,EAAE,KAAK;EAErCC,uBAAuB,EAAE,MAAO;EAEhCC,wBAAwB,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI;EAE5CC,mBAAmB,EAAE,IAAI;EAEzBC,WAAW,EAAE,EAAE;EAEfC,aAAa,EAAE,EAAE;EAEjBC,aAAa,EAAE,CAAC;EAEhBC,eAAe,EAAE;AACnB,CAAC;AAED,IAAMC,iBAAoD,GAAG7E,0BAA0B;AAEvF,OAAO,IAAM8E,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAA;EAAA,OAA4CD,iBAAiB;AAAA;AAE9F,OAAO,SAASE,qBAAqBA,CAAA,EAA0C;EAAA,IAAzCC,SAAkC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAC3EG,MAAM,CAACC,MAAM,CAACR,iBAAiB,EAAEG,SAAS,CAAC;AAC7C","ignoreList":[]}
1
+ {"version":3,"file":"application-config.js","names":["KEPLER_UNFOLDED_BUCKET","isWebpackBuild","__webpack_require__","DEFAULT_APPLICATION_CONFIG","defaultHtmlName","defaultImageName","defaultJsonName","defaultDataName","defaultExportJsonSettings","hasData","enableCustomExportBranding","baseMapLibraryConfig","maplibre","getMapLib","mapLibCssClass","mapLibAttributionCssClass","mapLibName","mapLibUrl","mapbox","cdnUrl","sqlJsUrl","parquetWasmUrl","plugins","table","database","useArrowProgressiveLoading","useOnFilteredItemsChange","enableRasterTileLayer","rasterServerUseLatestTitiler","rasterServerShowServerInput","rasterServerUrls","rasterServerSupportsElevation","rasterServerMaxRetries","rasterServerRetryDelay","rasterServerServerErrorsToRetry","rasterServerMaxPerServerRequests","enableWMSLayer","enableZarrLayer","enableFlowLayer","enableBitmapLayer","enableA5Layer","enableGeohashLayer","enableFlowFieldLayer","enableContourLayer","enableVoronoiLayer","enableDonutLayer","showInlineTilesetExamples","escapeXhtmlForWebpack","maxPitch","enableMapRepeat","enableAnnotations","enableDrawOnMapSketches","enableMapNavigationControl","enableMapScale","enableFitBoundsOnManualLayer","enableSwipeMode","enableGlobeView","enableLayerGroups","themes","enableColumnStats","enableDatasetOps","enableChartsPanel","enableMapInfo","enableCameraBookmarks","enableCameraTour","enableAnimationEditor","enableJsonEditors","enableLayerJsonEditor","enableFilterJsonEditor","enableEffectJsonEditor","enableViewportJsonEditor","enableAnimationJsonEditor","enableChartJsonEditor","enableRemoteFileFormatSelector","largeDatasetWarningRows","largeDatasetWarningBytes","acceptedFileFormats","customIcons","customIconUrl","reduxLogLevel","maxArrowBatches","applicationConfig","getApplicationConfig","initApplicationConfig","appConfig","arguments","length","undefined","Object","assign"],"sources":["../../src/application-config.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\nimport type {MapLib, MapRef} from 'react-map-gl/mapbox-legacy';\n\nimport {KEPLER_UNFOLDED_BUCKET} from '@kepler.gl/constants';\nimport type {BaseMapLibraryType} from '@kepler.gl/constants';\n\nimport type {DatabaseAdapter} from './application-config-types';\n\n/**\n * Represents a custom SVG icon that can be used in the icon layer.\n * The mesh describes the icon's geometry as triangulated SVG paths.\n *\n * Important: Triangle cells must use counter-clockwise (CCW) winding order.\n * Positions should be in the range [-1, 1] on both axes.\n */\nexport type SvgIcon = {\n /** Unique identifier for the icon, used as the value in the data's icon column */\n id: string;\n /** Triangulated SVG path geometry */\n mesh: {\n /** Triangle cell indices referencing positions (CCW winding order) */\n cells: [number, number, number][];\n /** Vertex positions [x, y, z] in range [-1, 1] */\n positions: [number, number, number][];\n };\n};\n\n/**\n * Detect if running with webpack build tool\n */\nfunction isWebpackBuild(): boolean {\n // @ts-ignore - __webpack_require__ is injected by webpack at runtime\n return typeof __webpack_require__ !== 'undefined';\n}\n\nexport type MapLibInstance = MapLib;\nexport type GetMapRef = ReturnType<MapRef['getMap']>;\n\nexport type BaseMapLibraryConfig = {\n getMapLib: () => Promise<MapLibInstance>;\n mapLibAttributionCssClass: string;\n mapLibCssClass: string;\n mapLibName: string;\n mapLibUrl: string;\n};\n\n/**\n * A mechanism to override default Kepler values/settings so that we\n * without having to make application-specific changes to the kepler repo.\n */\n/**\n * Controls which Redux actions are suppressed by the dev-mode Redux logger.\n * Mirrors the `log.level` convention used by luma.gl / deck.gl.\n *\n * - `0` — log every action (no filtering)\n * - `1` — suppress the highest-frequency UI noise:\n * MOUSE_MOVE, LAYER_HOVER, SET_MAP_BOUNDARY, SET_LOADING_INDICATOR,\n * SET_LOADING_PROGRESS\n * - `2` — suppress everything in level 1 plus map/layer update chatter:\n * LOAD_MAP_STYLES, UPDATE_MAP, LAYER_VISUAL_CHANGE,\n * ON_MAP_CLICK, FILTER_CHANGE, MAP_LOAD_STARTED\n *\n * Effects by context:\n * - **redux-logger** (console output): only active when `NODE_ENV === 'local'` (i.e. `yarn start`)\n * - **Redux DevTools** (`actionsBlacklist`): active whenever the browser extension is present,\n * regardless of `NODE_ENV`\n *\n * Default: `1`\n *\n * @example\n * ```ts\n * initApplicationConfig({ reduxLogLevel: 2 }); // quieter dev console\n * initApplicationConfig({ reduxLogLevel: 0 }); // see every action\n * ```\n */\nexport type ReduxLogLevel = 0 | 1 | 2;\n\n/** Built-in file formats that can be listed in {@link KeplerApplicationConfig.acceptedFileFormats}. */\nexport type KeplerAcceptedFileFormat =\n | 'csv'\n | 'tsv'\n | 'dsv'\n | 'json'\n | 'geojson'\n | 'ndjson'\n | 'jsonl'\n | 'geojsonl'\n | 'ndgeojson'\n | 'ldgeojson'\n | 'kml'\n | 'gpx'\n | 'tcx'\n | 'arrow'\n | 'feather'\n | 'parquet'\n | 'shp'\n | 'shapefile'\n | 'zip'\n | 'dbf'\n | 'shx'\n | 'prj'\n | 'cpg'\n | 'xlsx'\n | 'xls'\n | 'xlsm'\n | 'xlsb'\n | 'excel'\n | 'fgb'\n | 'flatgeobuf';\n\nexport type KeplerApplicationConfig = {\n /** Default name of export HTML file, can be overridden by user */\n defaultHtmlName?: string;\n defaultImageName?: string;\n defaultJsonName?: string;\n defaultDataName?: string;\n defaultExportJsonSettings?: {\n hasData?: boolean;\n };\n /**\n * Whether to show editable application name and website controls for exported maps.\n * Enabled by default.\n */\n enableCustomExportBranding?: boolean;\n baseMapLibraryConfig?: Record<BaseMapLibraryType, BaseMapLibraryConfig>;\n plugins?: any[];\n // KeplerTable alternative\n // TODO improve typing by exporting KeplerTable interface to @kepler.gl/types\n table?: any;\n database?: DatabaseAdapter | null;\n\n // Disable progressive loading for arrow files\n useArrowProgressiveLoading?: boolean;\n // Use the onFilteredItemsChange callback for DataFilterExtension.\n // Enabling this option may cause performance issues when dealing with a large number of layers or sublayers,\n // especially if large Arrow files are split into relatively small batches (should be fixed in the future).\n useOnFilteredItemsChange?: boolean;\n\n // A URL to the CDN where the kepler.gl assets are hosted.\n cdnUrl?: string;\n /**\n * Folder that Export data loads sql.js from to write GeoPackage files. It must hold\n * `sql-wasm.js` and `sql-wasm.wasm` from the sql.js version kepler.gl depends on.\n * Empty loads them from jsDelivr.\n */\n sqlJsUrl?: string;\n /**\n * URL of `parquet_wasm_bg.wasm` from the parquet-wasm version kepler.gl depends on,\n * which Export data uses to write GeoParquet files. Empty loads it from unpkg.\n */\n parquetWasmUrl?: string;\n\n // Raster Tile layer config\n // Raster Tile layer is under development and not ready for production use. Disabled by default.\n enableRasterTileLayer?: boolean;\n /** Whether to use Titiler v0.21 API endpoints instead of v0.11 */\n rasterServerUseLatestTitiler?: boolean;\n /** An array of URLs to shards of the raster tile server to be used by the raster tile layer. */\n rasterServerUrls?: string[];\n /** If true then try to fetch quantized elevation meshes from raster servers */\n rasterServerSupportsElevation?: boolean;\n /** How many times to retry a request if case of rasterServerServerErrorsToRetry errors */\n rasterServerMaxRetries?: number;\n /** How long between retries */\n rasterServerRetryDelay?: number;\n /** An array of HTTP status codes that should be retried when encountered. */\n rasterServerServerErrorsToRetry?: number[];\n /** Maximum number of simultaneous requests per raster server. 0 - no limit */\n rasterServerMaxPerServerRequests?: number;\n /** Whether to show the server input field in the raster tile layer setup form */\n rasterServerShowServerInput?: boolean;\n\n // WMS layer config -- Experimental\n // WMS layer is under development and not ready for production use. Disabled by default.\n enableWMSLayer?: boolean;\n\n // Zarr layer config -- Experimental\n // Enabled by default. Set false to hide Zarr in Add Data and layer type pickers.\n // Existing Zarr layers in saved maps can still render.\n enableZarrLayer?: boolean;\n\n // Flow layer config\n enableFlowLayer?: boolean;\n\n // Bitmap layer config\n enableBitmapLayer?: boolean;\n\n // A5 layer config\n // A5 DGGS layer is optional. Disabled by default; enable via initApplicationConfig.\n enableA5Layer?: boolean;\n\n // GeoHash layer config\n // GeoHash layer is optional. Enabled by default; disable via initApplicationConfig.\n enableGeohashLayer?: boolean;\n\n // Flow Field (streamlines) layer config\n enableFlowFieldLayer?: boolean;\n\n // Contour layer config -- Experimental\n // Enabled by default. Set false to hide Contour in layer type pickers.\n // Existing Contour layers in saved maps can still render.\n enableContourLayer?: boolean;\n\n // Voronoi Mosaic layer config\n // Enabled by default. Set false to hide Voronoi in layer type pickers.\n // Existing Voronoi layers in saved maps can still render.\n enableVoronoiLayer?: boolean;\n\n // Donut layer config\n // Enabled by default. Set false to hide Donut in layer type pickers.\n // Existing Donut layers in saved maps can still render.\n enableDonutLayer?: boolean;\n\n /** Whether to show example URLs in tileset setup forms (vector tile, raster tile, WMS, 3D tile) */\n showInlineTilesetExamples?: boolean;\n\n // Image export config\n /** Whether to apply fix for uglify error in dom-to-image (should be true for webpack builds, false for Vite) */\n escapeXhtmlForWebpack?: boolean;\n\n /** Maximum pitch angle in degrees. deck.gl defaults to 60; set higher (up to 85) for elevated perspectives.\n * Note: values above 60 may cause rendering artifacts with some basemap tile providers. */\n maxPitch?: number;\n\n /**\n * Draw flat-map layers on every visible world copy. Disabled by default because\n * each copy adds rendering and picking work. With it disabled, layers can be\n * missing on adjacent world copies across the antimeridian. Enable with\n * `initApplicationConfig({enableMapRepeat: true})`.\n */\n enableMapRepeat?: boolean;\n\n /** Whether to enable the annotations feature. Enabled by default. */\n enableAnnotations?: boolean;\n\n /**\n * Whether to enable extended Draw on Map sketch tools: Point, Line, Copy all,\n * Convert to Layer, and Edit Properties.\n * Polygon and rectangle drawing remain available when this is disabled. Enabled by default.\n */\n enableDrawOnMapSketches?: boolean;\n\n /** Whether to show the map navigation control (zoom buttons and compass). Enabled by default. */\n enableMapNavigationControl?: boolean;\n\n /** Whether to show the map scale bar at the bottom-left of the map. Enabled by default. */\n enableMapScale?: boolean;\n\n /**\n * Fit the map to a dataset when the layer type dropdown gives a manually\n * added layer its first type. The layer already has a dataset (chosen from\n * Add Layer). Programmatic `layerTypeChange`, saved configs, and later type\n * changes do not move the map.\n * Enabled by default. Disable with {@link initApplicationConfig}.\n *\n * @example\n * ```\n * initApplicationConfig({enableFitBoundsOnManualLayer: false});\n * ```\n */\n enableFitBoundsOnManualLayer?: boolean;\n\n /** Whether to enable the swipe compare mode in split map view. Enabled by default. */\n enableSwipeMode?: boolean;\n\n /** Whether to show the option to switch to the globe view. Enabled by default. */\n enableGlobeView?: boolean;\n\n /** Whether to enable the layer groups feature. Enabled by default. */\n enableLayerGroups?: boolean;\n\n /**\n * Named UI themes to cycle (`dark`, `light`, `space`, `base`).\n * Empty (default): dark theme, no switcher.\n * One theme: that theme is used, no switcher.\n * Two or more: first is the default, a map control cycles the list.\n */\n themes?: string[];\n\n /** Whether to show column statistics in the data table modal. Enabled by default. */\n enableColumnStats?: boolean;\n\n /** Group-by, attribute join, and simple spatial join UI on local datasets. Enabled by default. */\n enableDatasetOps?: boolean;\n\n /**\n * Whether to show the charts map-control panel (big number, bar, line,\n * heatmap, pivot table, tooltip charts, and chart cross-filters).\n * Enabled by default. Disable with {@link initApplicationConfig}.\n */\n enableChartsPanel?: boolean;\n\n /**\n * Whether to show the Map info section in Interactions and the on-map\n * name and description card. Enabled by default.\n */\n enableMapInfo?: boolean;\n\n /** Whether to show the Bookmarks panel in Interactions. Enabled by default. */\n enableCameraBookmarks?: boolean;\n\n /** Whether to show the Camera animation panel in Interactions. Enabled by default. */\n enableCameraTour?: boolean;\n\n /** Whether to show the experimental Animation editor map-control button and panel. Enabled by default. */\n enableAnimationEditor?: boolean;\n\n /**\n * Master switch for power-user JSON editors. When false, every section editor is hidden.\n * Defaults to true; each section also has its own flag.\n *\n * @example\n * ```\n * initApplicationConfig({\n * enableViewportJsonEditor: true,\n * enableLayerJsonEditor: false\n * });\n * ```\n */\n enableJsonEditors?: boolean;\n\n /** Layer panel `{ }` JSON editor. Enabled by default. */\n enableLayerJsonEditor?: boolean;\n\n /** Filter panel `{ }` JSON editor. Enabled by default. */\n enableFilterJsonEditor?: boolean;\n\n /** Effect panel `{ }` JSON editor. Enabled by default. */\n enableEffectJsonEditor?: boolean;\n\n /**\n * Viewport JSON editor map-control button. Disabled by default because it adds an extra\n * map control.\n */\n enableViewportJsonEditor?: boolean;\n\n /** Animation / time-filter playback `{ }` JSON editor. Enabled by default. */\n enableAnimationJsonEditor?: boolean;\n\n /** Charts panel `{ }` JSON editor. Enabled by default. */\n enableChartJsonEditor?: boolean;\n\n /**\n * Show a format dropdown next to the remote dataset URL field (Auto / CSV / GeoJSON / JSON / Arrow / Parquet).\n * Useful for extensionless URLs such as Azure SAS blobs. Disabled by default.\n */\n enableRemoteFileFormatSelector?: boolean;\n\n /**\n * Warn in the Add Data list when a dataset has at least this many rows.\n * `false` shows no warning. The warning waits until the row count is known.\n *\n * @example\n * ```\n * initApplicationConfig({largeDatasetWarningRows: 1_000_000});\n * initApplicationConfig({largeDatasetWarningRows: false});\n * ```\n */\n largeDatasetWarningRows?: false | number;\n\n /**\n * Warn in the Add Data list when a file is at least this many bytes.\n * `false` shows no file-size warning. Either this or {@link largeDatasetWarningRows}\n * can show the same tag.\n *\n * @example\n * ```\n * initApplicationConfig({largeDatasetWarningBytes: 50 * 1024 * 1024});\n * initApplicationConfig({largeDatasetWarningBytes: false});\n * ```\n */\n largeDatasetWarningBytes?: false | number;\n\n /**\n * File formats Kepler may load from drag-and-drop, the file picker, and remote URLs.\n * Values are format ids or extensions (`csv`, `geojson`, `kml`, `shp`, `xlsx`, `fgb`, …).\n * When omitted or `null`, every built-in format is accepted.\n *\n * @example\n * ```\n * initApplicationConfig({acceptedFileFormats: ['csv', 'geojson', 'parquet']});\n * ```\n */\n acceptedFileFormats?: KeplerAcceptedFileFormat[] | null;\n\n /**\n * Custom SVG icons to be made available in the icon layer.\n * These icons will be merged with the default icons fetched from CDN.\n * Each icon must have a unique `id` and a `mesh` describing its triangulated geometry.\n *\n * @example\n * ```\n * initApplicationConfig({\n * customIcons: [\n * {\n * id: 'my-custom-marker',\n * mesh: {\n * cells: [[0, 1, 2], [2, 3, 0]],\n * positions: [[0, 1, 0], [1, -1, 0], [-1, -1, 0], [0, 0, 0]]\n * }\n * }\n * ]\n * });\n * ```\n */\n customIcons?: SvgIcon[];\n\n /**\n * URL to a remote JSON file containing custom SVG icons.\n * The JSON file should have the format: `{ \"svgIcons\": [{ id, mesh: { cells, positions } }, ...] }`\n * Icons from this URL will be merged with default CDN icons and inline `customIcons`.\n *\n * @example\n * ```\n * initApplicationConfig({\n * customIconUrl: 'https://my-server.com/my-icons.json'\n * });\n * ```\n */\n customIconUrl?: string;\n\n /** Controls Redux action logging verbosity in dev mode. See {@link ReduxLogLevel}. */\n reduxLogLevel?: ReduxLogLevel;\n\n /**\n * If an Arrow/Parquet table has more record batches than this, they are\n * compacted into a single batch. The default is `1`, so any table with more\n * than one record batch is compacted. Deck.gl picking supports at most 255\n * pickable leaf layers, and GeoJSON adds fill/stroke/point sublayers per\n * batch, so a higher cap still overruns picking. Compacting copies the table.\n * Progressive Arrow loading skips compaction on intermediate batches and\n * compacts the completed file once. Set a very large number to never compact.\n *\n * @example\n * ```\n * initApplicationConfig({maxArrowBatches: 64});\n * ```\n */\n maxArrowBatches?: number;\n};\n\nconst DEFAULT_APPLICATION_CONFIG: Required<KeplerApplicationConfig> = {\n defaultHtmlName: 'kepler.gl.html',\n defaultImageName: 'kepler.gl.png',\n defaultJsonName: 'kepler.gl.json',\n defaultDataName: 'kepler.gl',\n defaultExportJsonSettings: {\n hasData: true\n },\n enableCustomExportBranding: true,\n\n baseMapLibraryConfig: {\n maplibre: {\n getMapLib: () => import('maplibre-gl') as unknown as Promise<MapLibInstance>,\n mapLibCssClass: 'maplibregl',\n mapLibAttributionCssClass: 'maplibre-attribution-container',\n mapLibName: 'MapLibre',\n mapLibUrl: 'https://www.maplibre.org/'\n },\n mapbox: {\n getMapLib: () => import('mapbox-gl'),\n mapLibCssClass: 'mapboxgl',\n mapLibAttributionCssClass: 'mapbox-attribution-container',\n mapLibName: 'Mapbox',\n mapLibUrl: 'https://www.mapbox.com/'\n }\n },\n\n cdnUrl: KEPLER_UNFOLDED_BUCKET,\n sqlJsUrl: '',\n parquetWasmUrl: '',\n\n plugins: [],\n // The default table class is KeplerTable.\n // TODO include KeplerTable here when the circular dependency with @kepler.gl/table and @kepler.gl/utils are resolved.\n table: null,\n database: null,\n\n useArrowProgressiveLoading: false,\n useOnFilteredItemsChange: false,\n\n // Raster Tile layer config\n enableRasterTileLayer: true,\n rasterServerUseLatestTitiler: true,\n rasterServerShowServerInput: true,\n rasterServerUrls: [], // TODO: provide a default free server or leave blank\n rasterServerSupportsElevation: true,\n rasterServerMaxRetries: 1,\n rasterServerRetryDelay: 10000,\n rasterServerServerErrorsToRetry: [503],\n rasterServerMaxPerServerRequests: 0,\n\n // WMS layer config\n enableWMSLayer: true,\n\n // Zarr layer config -- experimental, disable via initApplicationConfig\n enableZarrLayer: true,\n\n // Flow layer config\n enableFlowLayer: true,\n\n // Bitmap layer config\n enableBitmapLayer: true,\n\n // A5 layer config\n enableA5Layer: true,\n\n // GeoHash layer config\n enableGeohashLayer: true,\n\n // Flow Field layer config\n enableFlowFieldLayer: true,\n\n // Contour layer config -- disable via initApplicationConfig\n enableContourLayer: true,\n\n // Voronoi Mosaic layer config -- disable via initApplicationConfig\n enableVoronoiLayer: true,\n\n // Donut layer config -- disable via initApplicationConfig\n enableDonutLayer: true,\n\n showInlineTilesetExamples: true,\n\n // Image export config\n // Default to true for webpack builds, false for other build tools (e.g., Vite)\n escapeXhtmlForWebpack: isWebpackBuild(),\n\n maxPitch: 60,\n\n enableMapRepeat: false,\n\n enableAnnotations: true,\n\n enableDrawOnMapSketches: true,\n\n enableMapNavigationControl: true,\n\n enableMapScale: true,\n\n enableFitBoundsOnManualLayer: true,\n\n enableSwipeMode: true,\n\n enableGlobeView: true,\n\n enableLayerGroups: true,\n\n themes: [],\n\n enableColumnStats: true,\n\n enableDatasetOps: true,\n\n enableChartsPanel: true,\n\n enableMapInfo: true,\n\n enableCameraBookmarks: true,\n\n enableCameraTour: true,\n\n enableAnimationEditor: true,\n\n enableJsonEditors: true,\n enableLayerJsonEditor: true,\n enableFilterJsonEditor: true,\n enableEffectJsonEditor: true,\n enableViewportJsonEditor: false,\n enableAnimationJsonEditor: true,\n enableChartJsonEditor: true,\n\n enableRemoteFileFormatSelector: false,\n\n largeDatasetWarningRows: 500_000,\n\n largeDatasetWarningBytes: 1024 * 1024 * 1024,\n\n acceptedFileFormats: null,\n\n customIcons: [],\n\n customIconUrl: '',\n\n reduxLogLevel: 1,\n\n maxArrowBatches: 1\n};\n\nconst applicationConfig: Required<KeplerApplicationConfig> = DEFAULT_APPLICATION_CONFIG;\n\nexport const getApplicationConfig = (): Required<KeplerApplicationConfig> => applicationConfig;\n\nexport function initApplicationConfig(appConfig: KeplerApplicationConfig = {}) {\n Object.assign(applicationConfig, appConfig);\n}\n"],"mappings":"AAAA;AACA;;AAIA,SAAQA,sBAAsB,QAAO,sBAAsB;;AAK3D;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA,SAASC,cAAcA,CAAA,EAAY;EACjC;EACA,OAAO,OAAOC,mBAAmB,KAAK,WAAW;AACnD;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;;AA4WA,IAAMC,0BAA6D,GAAG;EACpEC,eAAe,EAAE,gBAAgB;EACjCC,gBAAgB,EAAE,eAAe;EACjCC,eAAe,EAAE,gBAAgB;EACjCC,eAAe,EAAE,WAAW;EAC5BC,yBAAyB,EAAE;IACzBC,OAAO,EAAE;EACX,CAAC;EACDC,0BAA0B,EAAE,IAAI;EAEhCC,oBAAoB,EAAE;IACpBC,QAAQ,EAAE;MACRC,SAAS,EAAE,SAAXA,SAASA,CAAA;QAAA,OAAQ,MAAM,CAAC,aAAa,CAAC;MAAA,CAAsC;MAC5EC,cAAc,EAAE,YAAY;MAC5BC,yBAAyB,EAAE,gCAAgC;MAC3DC,UAAU,EAAE,UAAU;MACtBC,SAAS,EAAE;IACb,CAAC;IACDC,MAAM,EAAE;MACNL,SAAS,EAAE,SAAXA,SAASA,CAAA;QAAA,OAAQ,MAAM,CAAC,WAAW,CAAC;MAAA;MACpCC,cAAc,EAAE,UAAU;MAC1BC,yBAAyB,EAAE,8BAA8B;MACzDC,UAAU,EAAE,QAAQ;MACpBC,SAAS,EAAE;IACb;EACF,CAAC;EAEDE,MAAM,EAAEnB,sBAAsB;EAC9BoB,QAAQ,EAAE,EAAE;EACZC,cAAc,EAAE,EAAE;EAElBC,OAAO,EAAE,EAAE;EACX;EACA;EACAC,KAAK,EAAE,IAAI;E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tBC,qBAAqB,EAAE,IAAI;EAE3BC,iBAAiB,EAAE,IAAI;EACvBC,qBAAqB,EAAE,IAAI;EAC3BC,sBAAsB,EAAE,IAAI;EAC5BC,sBAAsB,EAAE,IAAI;EAC5BC,wBAAwB,EAAE,KAAK;EAC/BC,yBAAyB,EAAE,IAAI;EAC/BC,qBAAqB,EAAE,IAAI;EAE3BC,8BAA8B,EAAE,KAAK;EAErCC,uBAAuB,EAAE,MAAO;EAEhCC,wBAAwB,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI;EAE5CC,mBAAmB,EAAE,IAAI;EAEzBC,WAAW,EAAE,EAAE;EAEfC,aAAa,EAAE,EAAE;EAEjBC,aAAa,EAAE,CAAC;EAEhBC,eAAe,EAAE;AACnB,CAAC;AAED,IAAMC,iBAAoD,GAAG9E,0BAA0B;AAEvF,OAAO,IAAM+E,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAA;EAAA,OAA4CD,iBAAiB;AAAA;AAE9F,OAAO,SAASE,qBAAqBA,CAAA,EAA0C;EAAA,IAAzCC,SAAkC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAC3EG,MAAM,CAACC,MAAM,CAACR,iBAAiB,EAAEG,SAAS,CAAC;AAC7C","ignoreList":[]}
package/dist/esm/index.js CHANGED
@@ -4,6 +4,7 @@
4
4
  // UTILS
5
5
  export { getCameraSnapshot, normalizeCameraBookmarks, cameraForMap } from './camera-utils';
6
6
  export { normalizeCameraTour, getCameraTourDuration, evaluateCameraTour } from './camera-tour';
7
+ export { getLayerOpacityFactor, getAnnotationOpacityDuration, DEFAULT_LAYER_ANIMATABLE_PROPS, normalizeLayerPropertyTransitions, getLayerPropertyTransitions, getLayerAnimationTracks, getLayerAnimationDuration, getLayerAnimationOpacityFactor, getLayerAnimatedConfig } from './layer-visibility';
7
8
  export { colorMaybeToRGB, colorRangeBackwardCompatibility, createLinearGradient, hasColorMap, hexToRgb, isHexColor, isRgbColor, normalizeColor, reverseColorRange, rgbToHex, addCustomPaletteColor, removeCustomPaletteColor, sortCustomPaletteColor, updateCustomPaletteColor, updateColorRangeBySelectedPalette, paletteIsSteps, paletteIsType, paletteIsColorBlindSafe, updateColorRangeByMatchingPalette, updateCustomColorRangeByColorUI, initializeCustomPalette } from './color-utils';
8
9
  export { errorNotification } from './notifications-utils';
9
10
  export { createNotification, exportImageError, successNotification } from './notifications-utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getCameraSnapshot","normalizeCameraBookmarks","cameraForMap","normalizeCameraTour","getCameraTourDuration","evaluateCameraTour","colorMaybeToRGB","colorRangeBackwardCompatibility","createLinearGradient","hasColorMap","hexToRgb","isHexColor","isRgbColor","normalizeColor","reverseColorRange","rgbToHex","addCustomPaletteColor","removeCustomPaletteColor","sortCustomPaletteColor","updateCustomPaletteColor","updateColorRangeBySelectedPalette","paletteIsSteps","paletteIsType","paletteIsColorBlindSafe","updateColorRangeByMatchingPalette","updateCustomColorRangeByColorUI","initializeCustomPalette","errorNotification","createNotification","exportImageError","successNotification","setStyleSheetBaseHref","default","domtoimage","getFrequency","getMode","aggregate","ColumnStatsType","NUMERIC_BIN_COUNT","collectColumnValues","computeColumnStats","getColumnStatistics","adjustValueToAnimationWindow","getBinThresholds","getNumericBinThresholds","getNumericPlotInterval","getNumericRangeMinimum","nextDown","nextUp","getFilterBinThresholds","intervalBinFromMarks","histogramFromThreshold","histogramFromValues","histogramFromDomain","histogramFromOrdinal","histogramFromTimeIntervals","mergePolygonLayerIndexes","runGpuFilterForPlot","updateTimeFilterPlotType","getLineChart","getCategoricalHistogram","mergePlotGroupBy","lineChartSeriesLegend","defaultPlotGroupColorRange","PLOT_GROUP_OTHERS_NAME","PLOT_NUM_GROUPS_ALL","PLOT_NUM_GROUPS_OPTIONS","DEFAULT_PLOT_NUM_GROUPS","MAX_PLOT_NUM_GROUPS","getLayerHistogram","isLayerHistogramSupported","SAMPLE_TIMELINE","TIMELINE_MODES","TIME_INTERVALS_ORDERED","LayerToFilterTimeInterval","LayerTimeInterval","getTimelineFromAnimationConfig","getTimelineFromFilter","filterIntervalOptions","maybeHexToGeo","getPositionFromHexValue","datasetColorMaker","findDefaultColorField","findDefaultColorFieldWithValues","getFieldFormatLabels","getFormatLabels","validateInputData","exportMapToHTML","calculateExportImageSize","convertToPng","dataURItoBlob","downloadFile","exportHtml","exportImage","exportJson","exportMap","exportToJsonString","exporters","getExportFileName","getExportFileNameBase","getMapJSON","getScaleFromImageSize","isMSEdge","omitLayerApiKeys","getFormatValue","getDefaultTimeFormat","getLayerBlendingParameters","patchDeckRendererForPostProcessing","flattenMessages","mergeMessages","isValidMapInfo","optionalMapInfo","optionalMapText","editBottomMapStyle","editTopMapStyle","getDefaultLayerGroupVisibility","getStyleDownloadUrl","getStyleImageIcon","mergeLayerGroupVisibility","scaleMapStyleByResolution","validateToken","useDimensions","observeDimensions","unobserveDimensions","snapToMarks","getTimeBins","computeDeckEffects","fixEffectOrder","reorderEffectOrder","validateEffectParameters","isStyleUsingMapboxTiles","isStyleUsingOpenStreetMapTiles","mapHasOpenStreetMapAttribution","getBaseMapAttributions","getBaseMapLibrary","transformRequest","ArrowDataContainer","createArrowVector","convertStructToFixedSizeList","compactArrowTable","arrowDataTypeToAnalyzerDataType","arrowDataTypeToFieldType","isArrowTable","isArrowFixedSizeList","isArrowStruct","isArrowVector","DataForm","createDataContainer","createIndexedDataContainer","getSampleData","getSampleContainerData","extractRowsInsideFeature","extractVectorTileFeaturesInsideFeature","extractRasterInsideFeature","isExtractableDataset","isExtractableLayer","isRasterTileExtractLayer","isVectorTileExtractLayer","colorMapToColorBreaks","colorBreaksToColorMap","getLayerColorScale","getLegendOfScale","getJenksDomain","getLinearDomain","getLogDomain","getOrdinalDomain","getQuantileDomain","getScaleFunction","getVisualChannelScaleByZoom","initializeLayerColorMap","isNumericColorBreaks","isDomainStops","isDomainQuantile","getDomainStepsbyZoom","getThresholdsFromQuantiles","getQuantLabelFormat","getHistogramDomain","getQuantLegends","getCategoricalColorMap","getCategoricalColorScale","initCustomPaletteByCustomScale","colorMapToCategoricalColorBreaks","resetCategoricalColorMapByIndex","selectRestCategoricalColorMapByIndex","removeCategoricalValueFromColorMap","addCategoricalValuesToColorMap","DataRow","getApplicationConfig","initApplicationConfig","getConfiguredThemes","shouldShowThemeSwitcher","getDefaultUiTheme","getNextUiTheme","isAppleDevice","quickInsertionSort","naturalBreaks","valueToPosition","positionToValue","createSliderScale"],"sources":["../../src/index.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\n// UTILS\nexport {getCameraSnapshot, normalizeCameraBookmarks, cameraForMap} from './camera-utils';\nexport {normalizeCameraTour, getCameraTourDuration, evaluateCameraTour} from './camera-tour';\n\nexport {\n colorMaybeToRGB,\n colorRangeBackwardCompatibility,\n createLinearGradient,\n hasColorMap,\n hexToRgb,\n isHexColor,\n isRgbColor,\n normalizeColor,\n reverseColorRange,\n rgbToHex,\n addCustomPaletteColor,\n removeCustomPaletteColor,\n sortCustomPaletteColor,\n updateCustomPaletteColor,\n updateColorRangeBySelectedPalette,\n paletteIsSteps,\n paletteIsType,\n paletteIsColorBlindSafe,\n updateColorRangeByMatchingPalette,\n updateCustomColorRangeByColorUI,\n initializeCustomPalette\n} from './color-utils';\nexport {errorNotification} from './notifications-utils';\n\nexport {createNotification, exportImageError, successNotification} from './notifications-utils';\n\nexport {setStyleSheetBaseHref} from './dom-utils';\nexport {default as domtoimage} from './dom-to-image';\nexport {getFrequency, getMode, aggregate} from './aggregation';\nexport {\n ColumnStatsType,\n NUMERIC_BIN_COUNT,\n collectColumnValues,\n computeColumnStats,\n getColumnStatistics\n} from './column-statistics';\nexport type {\n ColumnStats,\n NumericColumnStats,\n CategoricalColumnStats,\n TimeColumnStats,\n Quantile\n} from './column-statistics';\nexport {\n adjustValueToAnimationWindow,\n getBinThresholds,\n getNumericBinThresholds,\n getNumericPlotInterval,\n getNumericRangeMinimum,\n nextDown,\n nextUp,\n getFilterBinThresholds,\n intervalBinFromMarks,\n histogramFromThreshold,\n histogramFromValues,\n histogramFromDomain,\n histogramFromOrdinal,\n histogramFromTimeIntervals,\n mergePolygonLayerIndexes,\n runGpuFilterForPlot,\n updateTimeFilterPlotType,\n getLineChart,\n getCategoricalHistogram,\n mergePlotGroupBy,\n lineChartSeriesLegend,\n defaultPlotGroupColorRange,\n PLOT_GROUP_OTHERS_NAME,\n PLOT_NUM_GROUPS_ALL,\n PLOT_NUM_GROUPS_OPTIONS,\n DEFAULT_PLOT_NUM_GROUPS,\n MAX_PLOT_NUM_GROUPS\n} from './plot';\nexport {getLayerHistogram, isLayerHistogramSupported} from './layer-histogram';\n// eslint-disable-next-line prettier/prettier\nexport * from './data-utils';\nexport type {FieldFormatter} from './data-utils';\nexport * from './strings';\nexport {\n SAMPLE_TIMELINE,\n TIMELINE_MODES,\n TIME_INTERVALS_ORDERED,\n LayerToFilterTimeInterval,\n LayerTimeInterval,\n getTimelineFromAnimationConfig,\n getTimelineFromFilter,\n filterIntervalOptions\n} from './time';\nexport {maybeHexToGeo, getPositionFromHexValue} from './position-utils';\n\nexport {\n datasetColorMaker,\n findDefaultColorField,\n findDefaultColorFieldWithValues,\n getFieldFormatLabels,\n getFormatLabels,\n validateInputData\n} from './dataset-utils';\nexport {exportMapToHTML} from './export-map-html';\nexport {\n calculateExportImageSize,\n convertToPng,\n dataURItoBlob,\n downloadFile,\n exportHtml,\n exportImage,\n exportJson,\n exportMap,\n exportToJsonString,\n default as exporters,\n getExportFileName,\n getExportFileNameBase,\n getMapJSON,\n getScaleFromImageSize,\n isMSEdge,\n omitLayerApiKeys\n} from './export-utils';\nexport {getFormatValue, getDefaultTimeFormat} from './format';\nexport {getLayerBlendingParameters, patchDeckRendererForPostProcessing} from './gl-utils';\nexport {flattenMessages, mergeMessages} from './locale-utils';\nexport {isValidMapInfo, optionalMapInfo, optionalMapText} from './map-info-utils';\nexport {\n editBottomMapStyle,\n editTopMapStyle,\n getDefaultLayerGroupVisibility,\n getStyleDownloadUrl,\n getStyleImageIcon,\n mergeLayerGroupVisibility,\n scaleMapStyleByResolution\n} from './map-style-utils/mapbox-gl-style-editor';\nexport {validateToken} from './mapbox-utils';\nexport {\n default as useDimensions,\n observeDimensions,\n unobserveDimensions\n} from './observe-dimensions';\nexport type {Dimensions} from './observe-dimensions';\nexport {snapToMarks, getTimeBins} from './plot';\nexport * from './projection-utils';\nexport * from './split-map-utils';\nexport * from './utils';\n\nexport {\n computeDeckEffects,\n fixEffectOrder,\n reorderEffectOrder,\n validateEffectParameters\n} from './effect-utils';\n// Mapbox\nexport {\n isStyleUsingMapboxTiles,\n isStyleUsingOpenStreetMapTiles,\n mapHasOpenStreetMapAttribution,\n getBaseMapAttributions,\n getBaseMapLibrary,\n transformRequest\n} from './map-style-utils/mapbox-utils';\nexport type {AttributionMapLike} from './map-style-utils/mapbox-utils';\n\n// Map\nexport * from './map-utils';\n\nexport {\n ArrowDataContainer,\n createArrowVector,\n convertStructToFixedSizeList,\n compactArrowTable,\n arrowDataTypeToAnalyzerDataType,\n arrowDataTypeToFieldType,\n isArrowTable,\n isArrowFixedSizeList,\n isArrowStruct,\n isArrowVector\n} from './arrow-data-container';\nexport type {DataContainerInterface} from './data-container-interface';\nexport {\n DataForm,\n createDataContainer,\n createIndexedDataContainer,\n getSampleData as getSampleContainerData\n} from './data-container-utils';\nexport * from './filter-utils';\nexport type {FilterChanged, FilterResult, dataValueAccessor} from './filter-utils';\nexport * from './editor-feature-utils';\nexport type {EditorFeatureCollection} from './editor-feature-utils';\nexport {\n extractRowsInsideFeature,\n extractVectorTileFeaturesInsideFeature,\n extractRasterInsideFeature,\n isExtractableDataset,\n isExtractableLayer,\n isRasterTileExtractLayer,\n isVectorTileExtractLayer\n} from './extract-dataset-utils';\nexport type {\n ExtractableDataset,\n ExtractableLayer,\n ExtractedGeojson,\n ExtractedTable,\n ExtractResult\n} from './extract-dataset-utils';\n\nexport {\n colorMapToColorBreaks,\n colorBreaksToColorMap,\n getLayerColorScale,\n getLegendOfScale,\n getJenksDomain,\n getLinearDomain,\n getLogDomain,\n getOrdinalDomain,\n getQuantileDomain,\n getScaleFunction,\n getVisualChannelScaleByZoom,\n initializeLayerColorMap,\n isNumericColorBreaks,\n isDomainStops,\n isDomainQuantile,\n getDomainStepsbyZoom,\n getThresholdsFromQuantiles,\n getQuantLabelFormat,\n getHistogramDomain,\n getQuantLegends,\n getCategoricalColorMap,\n getCategoricalColorScale,\n initCustomPaletteByCustomScale,\n colorMapToCategoricalColorBreaks,\n resetCategoricalColorMapByIndex,\n selectRestCategoricalColorMapByIndex,\n removeCategoricalValueFromColorMap,\n addCategoricalValuesToColorMap\n} from './data-scale-utils';\nexport type {ColorBreak, ColorBreakOrdinal, DomainQuantiles, DomainStops} from './data-scale-utils';\n\nexport {DataRow} from './data-row';\n\n// Application config\nexport {getApplicationConfig, initApplicationConfig} from './application-config';\nexport {\n getConfiguredThemes,\n shouldShowThemeSwitcher,\n getDefaultUiTheme,\n getNextUiTheme\n} from './theme-utils';\nexport type {\n KeplerApplicationConfig,\n KeplerAcceptedFileFormat,\n BaseMapLibraryConfig,\n MapLibInstance,\n GetMapRef,\n SvgIcon,\n ReduxLogLevel\n} from './application-config';\nexport type {DatabaseAdapter, DatabaseConnection} from './application-config-types';\n\n// Browser utils\nexport {isAppleDevice} from './browser-utils';\n\nexport {default as quickInsertionSort} from './quick-insertion-sort';\nexport {default as naturalBreaks} from './jenks';\n\nexport type {KeplerTableModel} from './types';\n\nexport {valueToPosition, positionToValue, createSliderScale} from './slider-scale-utils';\nexport type {SliderScaleConfig} from './slider-scale-utils';\n"],"mappings":"AAAA;AACA;;AAEA;AACA,SAAQA,iBAAiB,EAAEC,wBAAwB,EAAEC,YAAY,QAAO,gBAAgB;AACxF,SAAQC,mBAAmB,EAAEC,qBAAqB,EAAEC,kBAAkB,QAAO,eAAe;AAE5F,SACEC,eAAe,EACfC,+BAA+B,EAC/BC,o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C,eAAe,EAAEC,eAAe,EAAEC,iBAAiB,QAAO,sBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["getCameraSnapshot","normalizeCameraBookmarks","cameraForMap","normalizeCameraTour","getCameraTourDuration","evaluateCameraTour","getLayerOpacityFactor","getAnnotationOpacityDuration","DEFAULT_LAYER_ANIMATABLE_PROPS","normalizeLayerPropertyTransitions","getLayerPropertyTransitions","getLayerAnimationTracks","getLayerAnimationDuration","getLayerAnimationOpacityFactor","getLayerAnimatedConfig","colorMaybeToRGB","colorRangeBackwardCompatibility","createLinearGradient","hasColorMap","hexToRgb","isHexColor","isRgbColor","normalizeColor","reverseColorRange","rgbToHex","addCustomPaletteColor","removeCustomPaletteColor","sortCustomPaletteColor","updateCustomPaletteColor","updateColorRangeBySelectedPalette","paletteIsSteps","paletteIsType","paletteIsColorBlindSafe","updateColorRangeByMatchingPalette","updateCustomColorRangeByColorUI","initializeCustomPalette","errorNotification","createNotification","exportImageError","successNotification","setStyleSheetBaseHref","default","domtoimage","getFrequency","getMode","aggregate","ColumnStatsType","NUMERIC_BIN_COUNT","collectColumnValues","computeColumnStats","getColumnStatistics","adjustValueToAnimationWindow","getBinThresholds","getNumericBinThresholds","getNumericPlotInterval","getNumericRangeMinimum","nextDown","nextUp","getFilterBinThresholds","intervalBinFromMarks","histogramFromThreshold","histogramFromValues","histogramFromDomain","histogramFromOrdinal","histogramFromTimeIntervals","mergePolygonLayerIndexes","runGpuFilterForPlot","updateTimeFilterPlotType","getLineChart","getCategoricalHistogram","mergePlotGroupBy","lineChartSeriesLegend","defaultPlotGroupColorRange","PLOT_GROUP_OTHERS_NAME","PLOT_NUM_GROUPS_ALL","PLOT_NUM_GROUPS_OPTIONS","DEFAULT_PLOT_NUM_GROUPS","MAX_PLOT_NUM_GROUPS","getLayerHistogram","isLayerHistogramSupported","SAMPLE_TIMELINE","TIMELINE_MODES","TIME_INTERVALS_ORDERED","LayerToFilterTimeInterval","LayerTimeInterval","getTimelineFromAnimationConfig","getTimelineFromFilter","filterIntervalOptions","maybeHexToGeo","getPositionFromHexValue","datasetColorMaker","findDefaultColorField","findDefaultColorFieldWithValues","getFieldFormatLabels","getFormatLabels","validateInputData","exportMapToHTML","calculateExportImageSize","convertToPng","dataURItoBlob","downloadFile","exportHtml","exportImage","exportJson","exportMap","exportToJsonString","exporters","getExportFileName","getExportFileNameBase","getMapJSON","getScaleFromImageSize","isMSEdge","omitLayerApiKeys","getFormatValue","getDefaultTimeFormat","getLayerBlendingParameters","patchDeckRendererForPostProcessing","flattenMessages","mergeMessages","isValidMapInfo","optionalMapInfo","optionalMapText","editBottomMapStyle","editTopMapStyle","getDefaultLayerGroupVisibility","getStyleDownloadUrl","getStyleImageIcon","mergeLayerGroupVisibility","scaleMapStyleByResolution","validateToken","useDimensions","observeDimensions","unobserveDimensions","snapToMarks","getTimeBins","computeDeckEffects","fixEffectOrder","reorderEffectOrder","validateEffectParameters","isStyleUsingMapboxTiles","isStyleUsingOpenStreetMapTiles","mapHasOpenStreetMapAttribution","getBaseMapAttributions","getBaseMapLibrary","transformRequest","ArrowDataContainer","createArrowVector","convertStructToFixedSizeList","compactArrowTable","arrowDataTypeToAnalyzerDataType","arrowDataTypeToFieldType","isArrowTable","isArrowFixedSizeList","isArrowStruct","isArrowVector","DataForm","createDataContainer","createIndexedDataContainer","getSampleData","getSampleContainerData","extractRowsInsideFeature","extractVectorTileFeaturesInsideFeature","extractRasterInsideFeature","isExtractableDataset","isExtractableLayer","isRasterTileExtractLayer","isVectorTileExtractLayer","colorMapToColorBreaks","colorBreaksToColorMap","getLayerColorScale","getLegendOfScale","getJenksDomain","getLinearDomain","getLogDomain","getOrdinalDomain","getQuantileDomain","getScaleFunction","getVisualChannelScaleByZoom","initializeLayerColorMap","isNumericColorBreaks","isDomainStops","isDomainQuantile","getDomainStepsbyZoom","getThresholdsFromQuantiles","getQuantLabelFormat","getHistogramDomain","getQuantLegends","getCategoricalColorMap","getCategoricalColorScale","initCustomPaletteByCustomScale","colorMapToCategoricalColorBreaks","resetCategoricalColorMapByIndex","selectRestCategoricalColorMapByIndex","removeCategoricalValueFromColorMap","addCategoricalValuesToColorMap","DataRow","getApplicationConfig","initApplicationConfig","getConfiguredThemes","shouldShowThemeSwitcher","getDefaultUiTheme","getNextUiTheme","isAppleDevice","quickInsertionSort","naturalBreaks","valueToPosition","positionToValue","createSliderScale"],"sources":["../../src/index.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\n// UTILS\nexport {getCameraSnapshot, normalizeCameraBookmarks, cameraForMap} from './camera-utils';\nexport {normalizeCameraTour, getCameraTourDuration, evaluateCameraTour} from './camera-tour';\nexport {\n getLayerOpacityFactor,\n getAnnotationOpacityDuration,\n DEFAULT_LAYER_ANIMATABLE_PROPS,\n normalizeLayerPropertyTransitions,\n getLayerPropertyTransitions,\n getLayerAnimationTracks,\n getLayerAnimationDuration,\n getLayerAnimationOpacityFactor,\n getLayerAnimatedConfig\n} from './layer-visibility';\n\nexport {\n colorMaybeToRGB,\n colorRangeBackwardCompatibility,\n createLinearGradient,\n hasColorMap,\n hexToRgb,\n isHexColor,\n isRgbColor,\n normalizeColor,\n reverseColorRange,\n rgbToHex,\n addCustomPaletteColor,\n removeCustomPaletteColor,\n sortCustomPaletteColor,\n updateCustomPaletteColor,\n updateColorRangeBySelectedPalette,\n paletteIsSteps,\n paletteIsType,\n paletteIsColorBlindSafe,\n updateColorRangeByMatchingPalette,\n updateCustomColorRangeByColorUI,\n initializeCustomPalette\n} from './color-utils';\nexport {errorNotification} from './notifications-utils';\n\nexport {createNotification, exportImageError, successNotification} from './notifications-utils';\n\nexport {setStyleSheetBaseHref} from './dom-utils';\nexport {default as domtoimage} from './dom-to-image';\nexport {getFrequency, getMode, aggregate} from './aggregation';\nexport {\n ColumnStatsType,\n NUMERIC_BIN_COUNT,\n collectColumnValues,\n computeColumnStats,\n getColumnStatistics\n} from './column-statistics';\nexport type {\n ColumnStats,\n NumericColumnStats,\n CategoricalColumnStats,\n TimeColumnStats,\n Quantile\n} from './column-statistics';\nexport {\n adjustValueToAnimationWindow,\n getBinThresholds,\n getNumericBinThresholds,\n getNumericPlotInterval,\n getNumericRangeMinimum,\n nextDown,\n nextUp,\n getFilterBinThresholds,\n intervalBinFromMarks,\n histogramFromThreshold,\n histogramFromValues,\n histogramFromDomain,\n histogramFromOrdinal,\n histogramFromTimeIntervals,\n mergePolygonLayerIndexes,\n runGpuFilterForPlot,\n updateTimeFilterPlotType,\n getLineChart,\n getCategoricalHistogram,\n mergePlotGroupBy,\n lineChartSeriesLegend,\n defaultPlotGroupColorRange,\n PLOT_GROUP_OTHERS_NAME,\n PLOT_NUM_GROUPS_ALL,\n PLOT_NUM_GROUPS_OPTIONS,\n DEFAULT_PLOT_NUM_GROUPS,\n MAX_PLOT_NUM_GROUPS\n} from './plot';\nexport {getLayerHistogram, isLayerHistogramSupported} from './layer-histogram';\n// eslint-disable-next-line prettier/prettier\nexport * from './data-utils';\nexport type {FieldFormatter} from './data-utils';\nexport * from './strings';\nexport {\n SAMPLE_TIMELINE,\n TIMELINE_MODES,\n TIME_INTERVALS_ORDERED,\n LayerToFilterTimeInterval,\n LayerTimeInterval,\n getTimelineFromAnimationConfig,\n getTimelineFromFilter,\n filterIntervalOptions\n} from './time';\nexport {maybeHexToGeo, getPositionFromHexValue} from './position-utils';\n\nexport {\n datasetColorMaker,\n findDefaultColorField,\n findDefaultColorFieldWithValues,\n getFieldFormatLabels,\n getFormatLabels,\n validateInputData\n} from './dataset-utils';\nexport {exportMapToHTML} from './export-map-html';\nexport {\n calculateExportImageSize,\n convertToPng,\n dataURItoBlob,\n downloadFile,\n exportHtml,\n exportImage,\n exportJson,\n exportMap,\n exportToJsonString,\n default as exporters,\n getExportFileName,\n getExportFileNameBase,\n getMapJSON,\n getScaleFromImageSize,\n isMSEdge,\n omitLayerApiKeys\n} from './export-utils';\nexport {getFormatValue, getDefaultTimeFormat} from './format';\nexport {getLayerBlendingParameters, patchDeckRendererForPostProcessing} from './gl-utils';\nexport {flattenMessages, mergeMessages} from './locale-utils';\nexport {isValidMapInfo, optionalMapInfo, optionalMapText} from './map-info-utils';\nexport {\n editBottomMapStyle,\n editTopMapStyle,\n getDefaultLayerGroupVisibility,\n getStyleDownloadUrl,\n getStyleImageIcon,\n mergeLayerGroupVisibility,\n scaleMapStyleByResolution\n} from './map-style-utils/mapbox-gl-style-editor';\nexport {validateToken} from './mapbox-utils';\nexport {\n default as useDimensions,\n observeDimensions,\n unobserveDimensions\n} from './observe-dimensions';\nexport type {Dimensions} from './observe-dimensions';\nexport {snapToMarks, getTimeBins} from './plot';\nexport * from './projection-utils';\nexport * from './split-map-utils';\nexport * from './utils';\n\nexport {\n computeDeckEffects,\n fixEffectOrder,\n reorderEffectOrder,\n validateEffectParameters\n} from './effect-utils';\n// Mapbox\nexport {\n isStyleUsingMapboxTiles,\n isStyleUsingOpenStreetMapTiles,\n mapHasOpenStreetMapAttribution,\n getBaseMapAttributions,\n getBaseMapLibrary,\n transformRequest\n} from './map-style-utils/mapbox-utils';\nexport type {AttributionMapLike} from './map-style-utils/mapbox-utils';\n\n// Map\nexport * from './map-utils';\n\nexport {\n ArrowDataContainer,\n createArrowVector,\n convertStructToFixedSizeList,\n compactArrowTable,\n arrowDataTypeToAnalyzerDataType,\n arrowDataTypeToFieldType,\n isArrowTable,\n isArrowFixedSizeList,\n isArrowStruct,\n isArrowVector\n} from './arrow-data-container';\nexport type {DataContainerInterface} from './data-container-interface';\nexport {\n DataForm,\n createDataContainer,\n createIndexedDataContainer,\n getSampleData as getSampleContainerData\n} from './data-container-utils';\nexport * from './filter-utils';\nexport type {FilterChanged, FilterResult, dataValueAccessor} from './filter-utils';\nexport * from './editor-feature-utils';\nexport type {EditorFeatureCollection} from './editor-feature-utils';\nexport {\n extractRowsInsideFeature,\n extractVectorTileFeaturesInsideFeature,\n extractRasterInsideFeature,\n isExtractableDataset,\n isExtractableLayer,\n isRasterTileExtractLayer,\n isVectorTileExtractLayer\n} from './extract-dataset-utils';\nexport type {\n ExtractableDataset,\n ExtractableLayer,\n ExtractedGeojson,\n ExtractedTable,\n ExtractResult\n} from './extract-dataset-utils';\n\nexport {\n colorMapToColorBreaks,\n colorBreaksToColorMap,\n getLayerColorScale,\n getLegendOfScale,\n getJenksDomain,\n getLinearDomain,\n getLogDomain,\n getOrdinalDomain,\n getQuantileDomain,\n getScaleFunction,\n getVisualChannelScaleByZoom,\n initializeLayerColorMap,\n isNumericColorBreaks,\n isDomainStops,\n isDomainQuantile,\n getDomainStepsbyZoom,\n getThresholdsFromQuantiles,\n getQuantLabelFormat,\n getHistogramDomain,\n getQuantLegends,\n getCategoricalColorMap,\n getCategoricalColorScale,\n initCustomPaletteByCustomScale,\n colorMapToCategoricalColorBreaks,\n resetCategoricalColorMapByIndex,\n selectRestCategoricalColorMapByIndex,\n removeCategoricalValueFromColorMap,\n addCategoricalValuesToColorMap\n} from './data-scale-utils';\nexport type {ColorBreak, ColorBreakOrdinal, DomainQuantiles, DomainStops} from './data-scale-utils';\n\nexport {DataRow} from './data-row';\n\n// Application config\nexport {getApplicationConfig, initApplicationConfig} from './application-config';\nexport {\n getConfiguredThemes,\n shouldShowThemeSwitcher,\n getDefaultUiTheme,\n getNextUiTheme\n} from './theme-utils';\nexport type {\n KeplerApplicationConfig,\n KeplerAcceptedFileFormat,\n BaseMapLibraryConfig,\n MapLibInstance,\n GetMapRef,\n SvgIcon,\n ReduxLogLevel\n} from './application-config';\nexport type {DatabaseAdapter, DatabaseConnection} from './application-config-types';\n\n// Browser utils\nexport {isAppleDevice} from './browser-utils';\n\nexport {default as quickInsertionSort} from './quick-insertion-sort';\nexport {default as naturalBreaks} from './jenks';\n\nexport type {KeplerTableModel} from './types';\n\nexport {valueToPosition, positionToValue, createSliderScale} from './slider-scale-utils';\nexport type {SliderScaleConfig} from './slider-scale-utils';\n"],"mappings":"AAAA;AACA;;AAEA;AACA,SAAQA,iBAAiB,EAAEC,wBAAwB,EAAEC,YAA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,YAAY;;AAElC;AACA,SAAQC,oBAAoB,EAAEC,qBAAqB,QAAO,sBAAsB;AAChF,SACEC,mBAAmB,EACnBC,uBAAuB,EACvBC,iBAAiB,EACjBC,cAAc,QACT,eAAe;AAYtB;AACA,SAAQC,aAAa,QAAO,iBAAiB;AAE7C,SAAQjK,OAAO,IAAIkK,kBAAkB,QAAO,wBAAwB;AACpE,SAAQlK,OAAO,IAAImK,aAAa,QAAO,SAAS;AAIhD,SAAQC,eAAe,EAAEC,eAAe,EAAEC,iBAAiB,QAAO,sBAAsB","ignoreList":[]}
@@ -0,0 +1,238 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
+ import _typeof from "@babel/runtime/helpers/esm/typeof";
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
8
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
9
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
10
+ // SPDX-License-Identifier: MIT
11
+ // Copyright contributors to the kepler.gl project
12
+
13
+ export var DEFAULT_LAYER_ANIMATABLE_PROPS = [{
14
+ name: 'opacity',
15
+ label: 'Opacity',
16
+ range: [0, 1],
17
+ step: 0.01
18
+ }];
19
+ var isSafePropertyName = function isSafePropertyName(name) {
20
+ return name.trim().length > 0 && !['__proto__', 'constructor', 'prototype'].includes(name);
21
+ };
22
+ var isFiniteNumber = function isFiniteNumber(value) {
23
+ return typeof value === 'number' && Number.isFinite(value);
24
+ };
25
+ var isRGBColor = function isRGBColor(value) {
26
+ return Array.isArray(value) && value.length === 3 && [value[0], value[1], value[2]].every(function (channel) {
27
+ return isFiniteNumber(channel) && channel >= 0 && channel <= 255;
28
+ });
29
+ };
30
+
31
+ /** Validate one ordered, non-overlapping track without changing its saved input. */
32
+ function normalizeTransitions(value, range, type) {
33
+ if (!Array.isArray(value)) return undefined;
34
+ var ids = new Set();
35
+ var transitions = [];
36
+ var trackType = type;
37
+ var _iterator = _createForOfIteratorHelper(value),
38
+ _step;
39
+ try {
40
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
41
+ var candidate = _step.value;
42
+ if (!candidate || _typeof(candidate) !== 'object' || Array.isArray(candidate)) return undefined;
43
+ var id = candidate.id,
44
+ startTimeMs = candidate.startTimeMs,
45
+ endTimeMs = candidate.endTimeMs,
46
+ startValue = candidate.startValue,
47
+ endValue = candidate.endValue;
48
+ var easing = candidate.easing === undefined ? 'easeInOut' : candidate.easing;
49
+ var numeric = isFiniteNumber(startValue) && isFiniteNumber(endValue);
50
+ var color = isRGBColor(startValue) && isRGBColor(endValue);
51
+ var valueType = numeric ? 'number' : color ? 'color' : undefined;
52
+ if (typeof id !== 'string' || id.trim().length === 0 || ids.has(id) || ![startTimeMs, endTimeMs].every(function (time) {
53
+ return typeof time === 'number' && Number.isFinite(time) && time >= 0;
54
+ }) || endTimeMs < startTimeMs || !valueType || trackType !== undefined && trackType !== valueType || numeric && range && ![startValue, endValue].every(function (endpoint) {
55
+ return endpoint >= range[0] && endpoint <= range[1];
56
+ }) || easing !== 'linear' && easing !== 'easeInOut') {
57
+ return undefined;
58
+ }
59
+ trackType = valueType;
60
+ ids.add(id);
61
+ var endpoints = color ? {
62
+ startValue: _toConsumableArray(startValue),
63
+ endValue: _toConsumableArray(endValue)
64
+ } : {
65
+ startValue: startValue,
66
+ endValue: endValue
67
+ };
68
+ transitions.push(_objectSpread(_objectSpread({
69
+ id: id,
70
+ startTimeMs: startTimeMs,
71
+ endTimeMs: endTimeMs
72
+ }, endpoints), {}, {
73
+ easing: easing
74
+ }));
75
+ }
76
+ // Cuts at an interval's start come first; equal-time cuts retain their authored order.
77
+ } catch (err) {
78
+ _iterator.e(err);
79
+ } finally {
80
+ _iterator.f();
81
+ }
82
+ transitions.sort(function (a, b) {
83
+ return a.startTimeMs - b.startTimeMs || a.endTimeMs - b.endTimeMs;
84
+ });
85
+ if (transitions.some(function (transition, index) {
86
+ return index > 0 && transition.startTimeMs < transitions[index - 1].endTimeMs;
87
+ })) {
88
+ return undefined;
89
+ }
90
+ return transitions;
91
+ }
92
+
93
+ /** Preserve unknown properties for forward compatibility, but never unsafe object keys. */
94
+ export function normalizeLayerPropertyTransitions(value) {
95
+ if (!value || _typeof(value) !== 'object' || Array.isArray(value)) return undefined;
96
+ var prototype = Object.getPrototypeOf(value);
97
+ if (prototype !== Object.prototype && prototype !== null) return undefined;
98
+ var result = {};
99
+ for (var _i = 0, _Object$entries = Object.entries(value); _i < _Object$entries.length; _i++) {
100
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
101
+ name = _Object$entries$_i[0],
102
+ track = _Object$entries$_i[1];
103
+ if (!isSafePropertyName(name)) return undefined;
104
+ var transitions = name === 'opacity' ? normalizeTransitions(track, [0, 1], 'number') : normalizeTransitions(track);
105
+ if (!transitions) return undefined;
106
+ result[name] = transitions;
107
+ }
108
+ return result;
109
+ }
110
+ export function getLayerPropertyTransitions(config, name, definition) {
111
+ var _definition$type;
112
+ if (!isSafePropertyName(name)) return [];
113
+ if (name === 'opacity' && (definition === null || definition === void 0 ? void 0 : definition.type) === 'color') return [];
114
+ var range = (definition === null || definition === void 0 ? void 0 : definition.type) === 'color' ? undefined : definition === null || definition === void 0 ? void 0 : definition.range;
115
+ var type = name === 'opacity' ? 'number' : definition ? (_definition$type = definition.type) !== null && _definition$type !== void 0 ? _definition$type : 'number' : undefined;
116
+ if (range && (!Array.isArray(range) || range.length !== 2 || !range.every(Number.isFinite) || range[0] > range[1])) {
117
+ return [];
118
+ }
119
+ if (name === 'opacity') {
120
+ range = range ? [Math.max(0, range[0]), Math.min(1, range[1])] : [0, 1];
121
+ }
122
+ var tracks = config.propertyTransitions;
123
+ if (tracks && _typeof(tracks) === 'object' && Object.prototype.hasOwnProperty.call(tracks, name)) {
124
+ var _normalizeTransitions;
125
+ return (_normalizeTransitions = normalizeTransitions(tracks[name], range, type)) !== null && _normalizeTransitions !== void 0 ? _normalizeTransitions : [];
126
+ }
127
+ return [];
128
+ }
129
+
130
+ /** Evaluate elapsed time independently of playback order, holding values between transitions. */
131
+ function evaluateTransitions(transitions, timeMs) {
132
+ var value = transitions[0].startValue;
133
+ var _iterator2 = _createForOfIteratorHelper(transitions),
134
+ _step2;
135
+ try {
136
+ var _loop = function _loop() {
137
+ var transition = _step2.value;
138
+ var startTimeMs = transition.startTimeMs,
139
+ endTimeMs = transition.endTimeMs,
140
+ startValue = transition.startValue,
141
+ endValue = transition.endValue,
142
+ easing = transition.easing;
143
+ if (timeMs < startTimeMs) return {
144
+ v: value
145
+ };
146
+ if (timeMs < endTimeMs) {
147
+ var progress = (timeMs - startTimeMs) / (endTimeMs - startTimeMs);
148
+ var t = easing === 'linear' ? progress : progress * progress * (3 - 2 * progress);
149
+ return {
150
+ v: typeof startValue === 'number' && typeof endValue === 'number' ? startValue * (1 - t) + endValue * t : startValue.map(function (channel, index) {
151
+ return channel * (1 - t) + endValue[index] * t;
152
+ })
153
+ };
154
+ }
155
+ value = endValue;
156
+ },
157
+ _ret;
158
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
159
+ _ret = _loop();
160
+ if (_ret) return _ret.v;
161
+ }
162
+ } catch (err) {
163
+ _iterator2.e(err);
164
+ } finally {
165
+ _iterator2.f();
166
+ }
167
+ return value;
168
+ }
169
+ export function getLayerOpacityFactor(config, timeMs) {
170
+ if (typeof timeMs !== 'number' || !Number.isFinite(timeMs)) return 1;
171
+ var transitions = getLayerPropertyTransitions(config, 'opacity');
172
+ return transitions.length ? evaluateTransitions(transitions, timeMs) : 1;
173
+ }
174
+ export function getLayerAnimationTracks(layer) {
175
+ var _layer$animatableProp;
176
+ return ((_layer$animatableProp = layer.animatableProps) !== null && _layer$animatableProp !== void 0 ? _layer$animatableProp : DEFAULT_LAYER_ANIMATABLE_PROPS).flatMap(function (property) {
177
+ var transitions = getLayerPropertyTransitions(layer.config, property.name, property);
178
+ return transitions.length ? [{
179
+ property: property,
180
+ transitions: transitions
181
+ }] : [];
182
+ });
183
+ }
184
+ export function getLayerAnimationDuration(layers) {
185
+ return layers.reduce(function (duration, layer) {
186
+ if (!layer.config.isVisible) return duration;
187
+ return getLayerAnimationTracks(layer).reduce(function (latest, _ref) {
188
+ var transitions = _ref.transitions;
189
+ return Math.max(latest, transitions[transitions.length - 1].endTimeMs);
190
+ }, duration);
191
+ }, 0);
192
+ }
193
+ export function getLayerAnimationOpacityFactor(layer, timeMs) {
194
+ if (typeof timeMs !== 'number' || !Number.isFinite(timeMs)) return 1;
195
+ var track = getLayerAnimationTracks(layer).find(function (_ref2) {
196
+ var property = _ref2.property;
197
+ return property.name === 'opacity';
198
+ });
199
+ return track ? evaluateTransitions(track.transitions, timeMs) : 1;
200
+ }
201
+
202
+ /** Overrides are transient; opacity remains a separate authored-opacity multiplier. */
203
+ export function getLayerAnimatedConfig(layer, timeMs) {
204
+ if (typeof timeMs !== 'number' || !Number.isFinite(timeMs)) return {};
205
+ var result = {};
206
+ var _iterator3 = _createForOfIteratorHelper(getLayerAnimationTracks(layer)),
207
+ _step3;
208
+ try {
209
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
210
+ var _step3$value = _step3.value,
211
+ property = _step3$value.property,
212
+ transitions = _step3$value.transitions;
213
+ if (property.name !== 'opacity') {
214
+ var value = evaluateTransitions(transitions, timeMs);
215
+ if (property.name === 'color' && property.type === 'color') {
216
+ if (Array.isArray(value)) result.color = value;
217
+ } else {
218
+ var _result$visConfig;
219
+ (_result$visConfig = result.visConfig) !== null && _result$visConfig !== void 0 ? _result$visConfig : result.visConfig = {};
220
+ result.visConfig[property.name] = value;
221
+ }
222
+ }
223
+ }
224
+ } catch (err) {
225
+ _iterator3.e(err);
226
+ } finally {
227
+ _iterator3.f();
228
+ }
229
+ return result;
230
+ }
231
+ export function getAnnotationOpacityDuration(annotations) {
232
+ return annotations.reduce(function (duration, annotation) {
233
+ var _transitions$endTimeM, _transitions;
234
+ var transitions = annotation.isVisible ? getLayerPropertyTransitions(annotation, 'opacity') : undefined;
235
+ return Math.max(duration, (_transitions$endTimeM = transitions === null || transitions === void 0 || (_transitions = transitions[transitions.length - 1]) === null || _transitions === void 0 ? void 0 : _transitions.endTimeMs) !== null && _transitions$endTimeM !== void 0 ? _transitions$endTimeM : 0);
236
+ }, 0);
237
+ }
238
+ //# sourceMappingURL=layer-visibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layer-visibility.js","names":["DEFAULT_LAYER_ANIMATABLE_PROPS","name","label","range","step","isSafePropertyName","trim","length","includes","isFiniteNumber","value","Number","isFinite","isRGBColor","Array","isArray","every","channel","normalizeTransitions","type","undefined","ids","Set","transitions","trackType","_iterator","_createForOfIteratorHelper","_step","s","n","done","candidate","_typeof","id","startTimeMs","endTimeMs","startValue","endValue","easing","numeric","color","valueType","has","time","endpoint","add","endpoints","_toConsumableArray","push","_objectSpread","err","e","f","sort","a","b","some","transition","index","normalizeLayerPropertyTransitions","prototype","Object","getPrototypeOf","result","_i","_Object$entries","entries","_Object$entries$_i","_slicedToArray","track","getLayerPropertyTransitions","config","definition","_definition$type","Math","max","min","tracks","propertyTransitions","hasOwnProperty","call","_normalizeTransitions","evaluateTransitions","timeMs","_iterator2","_step2","_loop","v","progress","t","map","_ret","getLayerOpacityFactor","getLayerAnimationTracks","layer","_layer$animatableProp","animatableProps","flatMap","property","getLayerAnimationDuration","layers","reduce","duration","isVisible","latest","_ref","getLayerAnimationOpacityFactor","find","_ref2","getLayerAnimatedConfig","_iterator3","_step3","_step3$value","_result$visConfig","visConfig","getAnnotationOpacityDuration","annotations","annotation","_transitions$endTimeM","_transitions"],"sources":["../../src/layer-visibility.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\nimport type {LayerAnimatableProp, LayerPropertyTransition, RGBColor} from '@kepler.gl/types';\n\ntype PropertyTransitionConfig = {\n propertyTransitions?: Record<string, LayerPropertyTransition[]>;\n};\n\ntype AnimatableLayer = {\n config: PropertyTransitionConfig & {isVisible: boolean};\n animatableProps?: readonly LayerAnimatableProp[];\n};\n\nexport const DEFAULT_LAYER_ANIMATABLE_PROPS: readonly Extract<\n LayerAnimatableProp,\n {type?: 'number'}\n>[] = [{name: 'opacity', label: 'Opacity', range: [0, 1], step: 0.01}];\n\nconst isSafePropertyName = (name: string): boolean =>\n name.trim().length > 0 && !['__proto__', 'constructor', 'prototype'].includes(name);\n\nconst isFiniteNumber = (value: unknown): value is number =>\n typeof value === 'number' && Number.isFinite(value);\n\nconst isRGBColor = (value: unknown): value is RGBColor =>\n Array.isArray(value) &&\n value.length === 3 &&\n [value[0], value[1], value[2]].every(\n channel => isFiniteNumber(channel) && channel >= 0 && channel <= 255\n );\n\n/** Validate one ordered, non-overlapping track without changing its saved input. */\nfunction normalizeTransitions(\n value: unknown,\n range?: readonly [number, number],\n type?: 'number' | 'color'\n): LayerPropertyTransition[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const ids = new Set<string>();\n const transitions: LayerPropertyTransition[] = [];\n let trackType = type;\n for (const candidate of value) {\n if (!candidate || typeof candidate !== 'object' || Array.isArray(candidate)) return undefined;\n const {id, startTimeMs, endTimeMs, startValue, endValue} = candidate;\n const easing = candidate.easing === undefined ? 'easeInOut' : candidate.easing;\n const numeric = isFiniteNumber(startValue) && isFiniteNumber(endValue);\n const color = isRGBColor(startValue) && isRGBColor(endValue);\n const valueType = numeric ? 'number' : color ? 'color' : undefined;\n if (\n typeof id !== 'string' ||\n id.trim().length === 0 ||\n ids.has(id) ||\n ![startTimeMs, endTimeMs].every(\n time => typeof time === 'number' && Number.isFinite(time) && time >= 0\n ) ||\n endTimeMs < startTimeMs ||\n !valueType ||\n (trackType !== undefined && trackType !== valueType) ||\n (numeric &&\n range &&\n ![startValue, endValue].every(endpoint => endpoint >= range[0] && endpoint <= range[1])) ||\n (easing !== 'linear' && easing !== 'easeInOut')\n ) {\n return undefined;\n }\n trackType = valueType;\n ids.add(id);\n const endpoints = color\n ? {startValue: [...startValue] as RGBColor, endValue: [...endValue] as RGBColor}\n : {startValue: startValue as number, endValue: endValue as number};\n transitions.push({id, startTimeMs, endTimeMs, ...endpoints, easing});\n }\n // Cuts at an interval's start come first; equal-time cuts retain their authored order.\n transitions.sort((a, b) => a.startTimeMs - b.startTimeMs || a.endTimeMs - b.endTimeMs);\n if (\n transitions.some(\n (transition, index) => index > 0 && transition.startTimeMs < transitions[index - 1].endTimeMs\n )\n ) {\n return undefined;\n }\n return transitions;\n}\n\n/** Preserve unknown properties for forward compatibility, but never unsafe object keys. */\nexport function normalizeLayerPropertyTransitions(\n value: unknown\n): Record<string, LayerPropertyTransition[]> | undefined {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return undefined;\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null) return undefined;\n const result: Record<string, LayerPropertyTransition[]> = {};\n for (const [name, track] of Object.entries(value)) {\n if (!isSafePropertyName(name)) return undefined;\n const transitions =\n name === 'opacity'\n ? normalizeTransitions(track, [0, 1], 'number')\n : normalizeTransitions(track);\n if (!transitions) return undefined;\n result[name] = transitions;\n }\n return result;\n}\n\nexport function getLayerPropertyTransitions(\n config: PropertyTransitionConfig,\n name: string,\n definition?: LayerAnimatableProp\n): LayerPropertyTransition[] {\n if (!isSafePropertyName(name)) return [];\n if (name === 'opacity' && definition?.type === 'color') return [];\n let range: readonly [number, number] | undefined =\n definition?.type === 'color' ? undefined : definition?.range;\n const type = name === 'opacity' ? 'number' : definition ? definition.type ?? 'number' : undefined;\n if (\n range &&\n (!Array.isArray(range) ||\n range.length !== 2 ||\n !range.every(Number.isFinite) ||\n range[0] > range[1])\n ) {\n return [];\n }\n if (name === 'opacity') {\n range = range ? [Math.max(0, range[0]), Math.min(1, range[1])] : [0, 1];\n }\n const tracks = config.propertyTransitions;\n if (tracks && typeof tracks === 'object' && Object.prototype.hasOwnProperty.call(tracks, name)) {\n return normalizeTransitions(tracks[name], range, type) ?? [];\n }\n return [];\n}\n\n/** Evaluate elapsed time independently of playback order, holding values between transitions. */\nfunction evaluateTransitions(\n transitions: LayerPropertyTransition[],\n timeMs: number\n): number | RGBColor {\n let value = transitions[0].startValue;\n for (const transition of transitions) {\n const {startTimeMs, endTimeMs, startValue, endValue, easing} = transition;\n if (timeMs < startTimeMs) return value;\n if (timeMs < endTimeMs) {\n const progress = (timeMs - startTimeMs) / (endTimeMs - startTimeMs);\n const t = easing === 'linear' ? progress : progress * progress * (3 - 2 * progress);\n return typeof startValue === 'number' && typeof endValue === 'number'\n ? startValue * (1 - t) + endValue * t\n : ((startValue as RGBColor).map(\n (channel, index) => channel * (1 - t) + (endValue as RGBColor)[index] * t\n ) as RGBColor);\n }\n value = endValue;\n }\n return value;\n}\n\nexport function getLayerOpacityFactor(\n config: PropertyTransitionConfig,\n timeMs?: number | null\n): number {\n if (typeof timeMs !== 'number' || !Number.isFinite(timeMs)) return 1;\n const transitions = getLayerPropertyTransitions(config, 'opacity');\n return transitions.length ? (evaluateTransitions(transitions, timeMs) as number) : 1;\n}\n\nexport function getLayerAnimationTracks(\n layer: AnimatableLayer\n): {property: LayerAnimatableProp; transitions: LayerPropertyTransition[]}[] {\n return (layer.animatableProps ?? DEFAULT_LAYER_ANIMATABLE_PROPS).flatMap(property => {\n const transitions = getLayerPropertyTransitions(layer.config, property.name, property);\n return transitions.length ? [{property, transitions}] : [];\n });\n}\n\nexport function getLayerAnimationDuration(layers: readonly AnimatableLayer[]): number {\n return layers.reduce((duration, layer) => {\n if (!layer.config.isVisible) return duration;\n return getLayerAnimationTracks(layer).reduce(\n (latest, {transitions}) => Math.max(latest, transitions[transitions.length - 1].endTimeMs),\n duration\n );\n }, 0);\n}\n\nexport function getLayerAnimationOpacityFactor(\n layer: AnimatableLayer,\n timeMs?: number | null\n): number {\n if (typeof timeMs !== 'number' || !Number.isFinite(timeMs)) return 1;\n const track = getLayerAnimationTracks(layer).find(({property}) => property.name === 'opacity');\n return track ? (evaluateTransitions(track.transitions, timeMs) as number) : 1;\n}\n\n/** Overrides are transient; opacity remains a separate authored-opacity multiplier. */\nexport function getLayerAnimatedConfig(\n layer: AnimatableLayer,\n timeMs?: number | null\n): {color?: RGBColor; visConfig?: Record<string, number | RGBColor>} {\n if (typeof timeMs !== 'number' || !Number.isFinite(timeMs)) return {};\n const result: {color?: RGBColor; visConfig?: Record<string, number | RGBColor>} = {};\n for (const {property, transitions} of getLayerAnimationTracks(layer)) {\n if (property.name !== 'opacity') {\n const value = evaluateTransitions(transitions, timeMs);\n if (property.name === 'color' && property.type === 'color') {\n if (Array.isArray(value)) result.color = value;\n } else {\n result.visConfig ??= {};\n result.visConfig[property.name] = value;\n }\n }\n }\n return result;\n}\n\nexport function getAnnotationOpacityDuration(\n annotations: readonly (PropertyTransitionConfig & {isVisible: boolean})[]\n): number {\n return annotations.reduce((duration, annotation) => {\n const transitions = annotation.isVisible\n ? getLayerPropertyTransitions(annotation, 'opacity')\n : undefined;\n return Math.max(duration, transitions?.[transitions.length - 1]?.endTimeMs ?? 0);\n }, 0);\n}\n"],"mappings":";;;;;;;;;AAAA;AACA;;AAaA,OAAO,IAAMA,8BAGV,GAAG,CAAC;EAACC,IAAI,EAAE,SAAS;EAAEC,KAAK,EAAE,SAAS;EAAEC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;EAAEC,IAAI,EAAE;AAAI,CAAC,CAAC;AAEtE,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIJ,IAAY;EAAA,OACtCA,IAAI,CAACK,IAAI,CAAC,CAAC,CAACC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAACC,QAAQ,CAACP,IAAI,CAAC;AAAA;AAErF,IAAMQ,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAc;EAAA,OACpC,OAAOA,KAAK,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACF,KAAK,CAAC;AAAA;AAErD,IAAMG,UAAU,GAAG,SAAbA,UAAUA,CAAIH,KAAc;EAAA,OAChCI,KAAK,CAACC,OAAO,CAACL,KAAK,CAAC,IACpBA,KAAK,CAACH,MAAM,KAA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KAAK,OAAO,EAAE;UAC1D,IAAIL,KAAK,CAACC,OAAO,CAACL,KAAK,CAAC,EAAEqD,MAAM,CAACvB,KAAK,GAAG9B,KAAK;QAChD,CAAC,MAAM;UAAA,IAAAuG,iBAAA;UACL,CAAAA,iBAAA,GAAAlD,MAAM,CAACmD,SAAS,cAAAD,iBAAA,cAAAA,iBAAA,GAAhBlD,MAAM,CAACmD,SAAS,GAAK,CAAC,CAAC;UACvBnD,MAAM,CAACmD,SAAS,CAAChB,QAAQ,CAACjG,IAAI,CAAC,GAAGS,KAAK;QACzC;MACF;IACF;EAAC,SAAAwC,GAAA;IAAA4D,UAAA,CAAA3D,CAAA,CAAAD,GAAA;EAAA;IAAA4D,UAAA,CAAA1D,CAAA;EAAA;EACD,OAAOW,MAAM;AACf;AAEA,OAAO,SAASoD,4BAA4BA,CAC1CC,WAAyE,EACjE;EACR,OAAOA,WAAW,CAACf,MAAM,CAAC,UAACC,QAAQ,EAAEe,UAAU,EAAK;IAAA,IAAAC,qBAAA,EAAAC,YAAA;IAClD,IAAMhG,WAAW,GAAG8F,UAAU,CAACd,SAAS,GACpCjC,2BAA2B,CAAC+C,UAAU,EAAE,SAAS,CAAC,GAClDjG,SAAS;IACb,OAAOsD,IAAI,CAACC,GAAG,CAAC2B,QAAQ,GAAAgB,qBAAA,GAAE/F,WAAW,aAAXA,WAAW,gBAAAgG,YAAA,GAAXhG,WAAW,CAAGA,WAAW,CAAChB,MAAM,GAAG,CAAC,CAAC,cAAAgH,YAAA,uBAArCA,YAAA,CAAuCpF,SAAS,cAAAmF,qBAAA,cAAAA,qBAAA,GAAI,CAAC,CAAC;EAClF,CAAC,EAAE,CAAC,CAAC;AACP","ignoreList":[]}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { getCameraSnapshot, normalizeCameraBookmarks, cameraForMap } from './camera-utils';
2
2
  export { normalizeCameraTour, getCameraTourDuration, evaluateCameraTour } from './camera-tour';
3
+ export { getLayerOpacityFactor, getAnnotationOpacityDuration, DEFAULT_LAYER_ANIMATABLE_PROPS, normalizeLayerPropertyTransitions, getLayerPropertyTransitions, getLayerAnimationTracks, getLayerAnimationDuration, getLayerAnimationOpacityFactor, getLayerAnimatedConfig } from './layer-visibility';
3
4
  export { colorMaybeToRGB, colorRangeBackwardCompatibility, createLinearGradient, hasColorMap, hexToRgb, isHexColor, isRgbColor, normalizeColor, reverseColorRange, rgbToHex, addCustomPaletteColor, removeCustomPaletteColor, sortCustomPaletteColor, updateCustomPaletteColor, updateColorRangeBySelectedPalette, paletteIsSteps, paletteIsType, paletteIsColorBlindSafe, updateColorRangeByMatchingPalette, updateCustomColorRangeByColorUI, initializeCustomPalette } from './color-utils';
4
5
  export { errorNotification } from './notifications-utils';
5
6
  export { createNotification, exportImageError, successNotification } from './notifications-utils';