@kepler.gl/constants 3.3.0-alpha.21 → 3.3.0-alpha.23

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.
@@ -1 +1 @@
1
- {"version":3,"file":"dataset.js","names":["DatasetType","exports","REMOTE_FILE_FORMATS","REMOTE_FILE_MIME_TYPES","csv","geojson","json","arrow","parquet","geojsonl","ndjson","kml","gpx","tcx","shp","xlsx","fgb","REMOTE_FILE_EXTENSIONS","MIME_TO_REMOTE_FILE_EXTENSION","DATASET_REFRESH_INTERVAL_OPTIONS","value","labelId","DATASET_REFRESH_CUSTOM_VALUE","DATASET_REFRESH_DEFAULT_CUSTOM_MS","DATASET_REFRESH_MIN_INTERVAL_MS","isPresetDatasetRefreshInterval","ms","some","option","getDatasetRefreshIntervalMs","metadata","refreshIntervalMs","Number","isFinite","parseCustomRefreshIntervalMs","secondsText","seconds","parseFloat","Math","max","round","formatCustomRefreshSeconds","isInteger","String","toFixed","getRemoteSourceFormat","candidate","sourceFormat","format","undefined","Object","prototype","hasOwnProperty","call","RemoteTileFormat","PMTilesType","REMOTE_TILE","RasterTileType","TILE3D_PROVIDERS","google","name","urlKey","attribution","title","url","logoUrl","height","bottom","cesium","arcgis"],"sources":["../../src/dataset.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\nexport enum DatasetType {\n LOCAL = 'local',\n EXTERNALLY_HOSTED = 'externally-hosted',\n VECTOR_TILE = 'vector-tile',\n RASTER_TILE = 'raster-tile',\n WMS_TILE = 'wms-tile',\n TILE_3D = 'tile-3d',\n BITMAP = 'bitmap',\n ZARR = 'zarr'\n}\n\nexport const REMOTE_FILE_FORMATS = [\n 'auto',\n 'csv',\n 'geojson',\n 'json',\n 'arrow',\n 'parquet',\n 'geojsonl',\n 'ndjson',\n 'kml',\n 'gpx',\n 'tcx',\n 'shp',\n 'xlsx',\n 'fgb'\n] as const;\nexport type RemoteFileFormat = (typeof REMOTE_FILE_FORMATS)[number];\n\nexport const REMOTE_FILE_MIME_TYPES: Record<Exclude<RemoteFileFormat, 'auto'>, string> = {\n csv: 'text/csv',\n geojson: 'application/geo+json',\n json: 'application/json',\n arrow: 'application/vnd.apache.arrow.file',\n parquet: 'application/vnd.apache.parquet',\n geojsonl: 'application/geo+x-ndjson',\n ndjson: 'application/x-ndjson',\n kml: 'application/vnd.google-earth.kml+xml',\n gpx: 'application/gpx+xml',\n tcx: 'application/vnd.garmin.tcx+xml',\n shp: 'application/x-esri-shapefile',\n xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n fgb: 'application/x-flatgeobuf'\n};\n\nexport const REMOTE_FILE_EXTENSIONS: Record<Exclude<RemoteFileFormat, 'auto'>, string> = {\n csv: 'csv',\n geojson: 'geojson',\n json: 'json',\n arrow: 'arrow',\n parquet: 'parquet',\n geojsonl: 'geojsonl',\n ndjson: 'ndjson',\n kml: 'kml',\n gpx: 'gpx',\n tcx: 'tcx',\n shp: 'shp',\n xlsx: 'xlsx',\n fgb: 'fgb'\n};\n\nexport const MIME_TO_REMOTE_FILE_EXTENSION: Record<string, string> = {\n 'text/csv': 'csv',\n 'text/tab-separated-values': 'tsv',\n 'application/geo+json': 'geojson',\n 'application/vnd.geo+json': 'geojson',\n 'application/json': 'json',\n 'application/vnd.apache.arrow.file': 'arrow',\n 'application/vnd.apache.arrow.stream': 'arrow',\n 'application/vnd.apache.parquet': 'parquet',\n 'application/x-parquet': 'parquet',\n 'application/geo+x-ndjson': 'geojsonl',\n 'application/geo+x-ldjson': 'geojsonl',\n 'application/geo+json-seq': 'geojsonl',\n 'application/x-ndjson': 'ndjson',\n 'application/jsonlines': 'ndjson',\n 'application/json-seq': 'ndjson',\n 'application/vnd.google-earth.kml+xml': 'kml',\n 'application/gpx+xml': 'gpx',\n 'application/vnd.garmin.tcx+xml': 'tcx',\n 'application/x-esri-shapefile': 'shp',\n 'application/shp': 'shp',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'xlsx',\n 'application/x-flatgeobuf': 'fgb',\n 'application/flatgeobuf': 'fgb'\n};\n\nexport const DATASET_REFRESH_INTERVAL_OPTIONS: {value: number; labelId: string}[] = [\n {value: 0, labelId: 'datasetTitle.refreshOff'},\n {value: 10_000, labelId: 'datasetTitle.refresh10s'},\n {value: 15_000, labelId: 'datasetTitle.refresh15s'},\n {value: 60_000, labelId: 'datasetTitle.refresh1m'},\n {value: 300_000, labelId: 'datasetTitle.refresh5m'},\n {value: 900_000, labelId: 'datasetTitle.refresh15m'}\n];\n\n/** Select value for a user-entered interval that is not one of the presets. */\nexport const DATASET_REFRESH_CUSTOM_VALUE = 'custom';\n/** Default custom poll interval when switching from Off to Custom. */\nexport const DATASET_REFRESH_DEFAULT_CUSTOM_MS = 30_000;\nexport const DATASET_REFRESH_MIN_INTERVAL_MS = 100;\n\nexport function isPresetDatasetRefreshInterval(ms: number): boolean {\n return DATASET_REFRESH_INTERVAL_OPTIONS.some(option => option.value === ms);\n}\n\nexport type ExternalDatasetRefreshStatus = 'idle' | 'loading' | 'error';\n\nexport type ExternalDatasetMetadata = {\n /** Remote URL of the dataset file. */\n source: string;\n /** Optional format hint for extensionless URLs (SAS keys, etc). */\n format?: Exclude<RemoteFileFormat, 'auto'> | string;\n /** Last known size of the hosted resource, in bytes. */\n size?: number;\n /** Poll interval in ms. Omitted or 0 means manual refresh only. */\n refreshIntervalMs?: number;\n};\n\n/** Runtime copy of {@link ExternalDatasetMetadata} with `format` renamed to avoid colliding with DATASET_FORMATS. */\nexport type ExternalDatasetRuntimeMetadata = {\n source: string;\n sourceFormat?: Exclude<RemoteFileFormat, 'auto'> | string;\n size?: number;\n refreshIntervalMs?: number;\n etag?: string;\n lastModified?: string;\n lastFetchedAt?: number;\n refreshStatus?: ExternalDatasetRefreshStatus;\n refreshError?: string;\n /** Download progress 0–100 while `refreshStatus` is `loading`. */\n refreshProgress?: number;\n};\n\nexport function getDatasetRefreshIntervalMs(metadata?: {refreshIntervalMs?: unknown}): number {\n const value = metadata?.refreshIntervalMs;\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? value : 0;\n}\n\n/** Parse a seconds field into ms, or null if the input is not a positive number. */\nexport function parseCustomRefreshIntervalMs(secondsText: string): number | null {\n const seconds = Number.parseFloat(secondsText);\n if (!Number.isFinite(seconds) || seconds <= 0) {\n return null;\n }\n return Math.max(DATASET_REFRESH_MIN_INTERVAL_MS, Math.round(seconds * 1000));\n}\n\n/** Display string for the custom seconds input (keeps tenths for sub-second values). */\nexport function formatCustomRefreshSeconds(ms: number): string {\n const seconds = Math.max(DATASET_REFRESH_MIN_INTERVAL_MS, ms) / 1000;\n if (Number.isInteger(seconds)) {\n return String(seconds);\n }\n return String(Number(seconds.toFixed(3)));\n}\n\nexport function getRemoteSourceFormat(metadata?: {\n sourceFormat?: unknown;\n format?: unknown;\n}): string | undefined {\n const candidate =\n (typeof metadata?.sourceFormat === 'string' && metadata.sourceFormat) ||\n (typeof metadata?.format === 'string' && metadata.format) ||\n undefined;\n if (\n candidate &&\n candidate !== 'auto' &&\n Object.prototype.hasOwnProperty.call(REMOTE_FILE_EXTENSIONS, candidate)\n ) {\n return candidate;\n }\n return undefined;\n}\n\nexport enum RemoteTileFormat {\n MVT = 'mvt',\n PMTILES = 'pmtiles',\n WMS = 'wms'\n}\n\nexport enum PMTilesType {\n RASTER = 'raster',\n MVT = 'mvt'\n}\n\nexport const REMOTE_TILE = 'remote';\n\nexport type VectorTileDatasetMetadata = {\n type: typeof REMOTE_TILE;\n remoteTileFormat: RemoteTileFormat;\n tilesetDataUrl: string;\n tilesetMetadataUrl?: string;\n};\n\n/**\n * Raster tileset metadata in STAC Item format. STAC version must be >= 1.0.0,\n * and the EO and Raster STAC extensions are required. This metadata shape can\n * be passed to the map to synchronously add a raster tileset.\n * @see https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md\n */\nexport type RasterTileLocalMetadata = {\n type: 'Feature';\n\n /** URL for tileset metadata. */\n metadataUrl?: string;\n stac_version: string;\n stac_extensions: string[];\n assets: Record<string, any>;\n};\n\n/**\n * Raster tileset metadata with a remote metadata URL. This metadata can\n * be passed to the map to asynchronously load a raster tileset.\n */\nexport type RasterTileRemoteMetadata = {\n metadataUrl: string;\n};\n\nexport enum RasterTileType {\n STAC = 'stac',\n PMTILES = 'pmtiles'\n}\n\nexport type RasterTileMetadataSourceType = {\n pmtilesType?: PMTilesType;\n};\n\n/**\n * Raster tileset metadata.\n */\nexport type RasterTileDatasetMetadata = (RasterTileLocalMetadata | RasterTileRemoteMetadata) &\n RasterTileMetadataSourceType;\n\nexport type WMSServiceLayer = {\n name: string;\n title: string;\n boundingBox: number[] | null;\n queryable?: boolean;\n legendUrl?: string | null;\n};\n\nexport type WMSDatasetMetadata = {\n type: typeof REMOTE_TILE;\n remoteTileFormat: RemoteTileFormat.WMS;\n tilesetDataUrl: string;\n tilesetMetadataUrl: string;\n version: string;\n layers: WMSServiceLayer[];\n label?: string;\n attribution?: string;\n};\n\n/** A non-spatial dimension of a Zarr variable, e.g. `time`, `band`, `depth`. */\nexport type ZarrDimensionInfo = {\n name: string;\n size: number;\n /**\n * Coordinate values for the dimension, when the store exposes a matching\n * coordinate array. Time coordinates are decoded to epoch milliseconds.\n */\n values?: (number | string | boolean)[];\n /** Preserve coordinate semantics instead of guessing from its name or dtype. */\n kind?: 'time' | 'duration' | 'number' | 'category';\n units?: string;\n calendar?: string;\n standardName?: string;\n /** Original offsets for decoded CF time coordinates. */\n rawValues?: (number | string | boolean)[];\n};\n\n/** Empty/missing keeps the original automatic layer time axis. */\nexport type ZarrAxisConfig =\n | {kind?: 'auto' | 'off'}\n | {kind: 'dimension'; dimension: string}\n | {kind: 'forecast'; referenceTime: string; leadTime: string};\n\nexport type ZarrVariableInfo = {\n /** Path of the variable within the Zarr group. Empty for a root-level array. */\n path: string;\n /**\n * Node to open for rendering, when it differs from `path`. A pyramid keeps\n * its levels under a shared parent, so the renderer is handed that parent\n * while each variable keeps its own identity.\n */\n nodePath?: string;\n /** Name of the array itself, i.e. the last path segment. */\n name: string;\n /**\n * Label to show in variable pickers. Equal to `name`, qualified with enough\n * leading path segments to stay unique when sibling groups hold arrays of the\n * same name, e.g. `FUTUR/evap_total` and `HISTO/evap_total`.\n */\n displayName: string;\n /**\n * GeoZarr-convention attributes describing the spatial grid. Taken from the\n * store when it declares them, otherwise derived from CF/GDAL metadata.\n */\n geoAttrs?: Record<string, unknown>;\n /** Parsed grid and pyramid settings for this variable, independent of the active variable. */\n spatialMetadata?: Pick<\n ZarrDatasetMetadata,\n 'crs' | 'axes' | 'xAxisIndex' | 'yAxisIndex' | 'levels' | 'webMercatorPyramid'\n >;\n /** Shape of the finest resolution level. */\n shape: number[];\n /** Chunk shape of the finest resolution level. */\n chunks: number[];\n dtype: string;\n /** Non-spatial dimensions, in array order. */\n nonSpatialDims: ZarrDimensionInfo[];\n /** The non-spatial dimension recognized as time, when present. */\n timeDimension?: ZarrDimensionInfo;\n /** Value range advertised by the array attrs, used as the default rescale. */\n dataRange?: [number, number];\n /** Fill value advertised by the array attrs or zarr metadata. */\n nodataValue?: number;\n};\n\nexport type ZarrDatasetMetadata = {\n /** Root URL of the Zarr store. */\n url: string;\n /** Path of the selected variable within the store. */\n variable?: string;\n crs?: {code?: string; wkt2?: string};\n /** Axis names of the selected variable, e.g. `['time', 'y', 'x']`. */\n axes: string[];\n xAxisIndex: number;\n yAxisIndex: number;\n /** Resolution levels, finest first. */\n levels: {path: string; shape: number[]; chunks: number[]}[];\n /**\n * Set when every level is reprojected to EPSG:3857 and spans the whole world,\n * which is what `ndpyramid`'s `pyramid_reproject` writes. The level to draw\n * then follows the map zoom rather than the data's own resolution.\n */\n webMercatorPyramid?: boolean;\n /** Every renderable variable in the store, for the variable picker. */\n variables: ZarrVariableInfo[];\n nonSpatialDims: ZarrDimensionInfo[];\n timeDimension?: ZarrDimensionInfo;\n dataRange?: [number, number];\n nodataValue?: number;\n label?: string;\n attribution?: string;\n};\n\nexport type Tile3DProviderAttribution = {\n title: string;\n url: string;\n logoUrl?: string;\n height?: number;\n bottom?: number;\n};\n\nexport type Tile3DProvider = {\n name: string;\n urlKey: string;\n attribution?: Tile3DProviderAttribution;\n};\n\nexport const TILE3D_PROVIDERS: Record<string, Tile3DProvider> = {\n google: {\n name: 'Google 3D Tiles',\n urlKey: 'google',\n attribution: {\n title: 'Built with Google Maps.',\n url: '',\n logoUrl:\n 'https://studio-public-data.foursquare.com/statics/images/google-watermark-white.png',\n height: 17,\n bottom: 0\n }\n },\n cesium: {\n name: 'Cesium ion',\n urlKey: 'ion.cesium',\n attribution: {title: 'Cesium.', url: 'https://cesium.com/', height: 19, bottom: 0}\n },\n arcgis: {\n name: 'ArcGIS',\n urlKey: 'arcgis',\n attribution: {title: 'Powered by Esri.', url: 'https://arcgis.com/', height: 16}\n }\n};\n\nexport type Tile3DDatasetMetadata = {\n tile3dUrl: string;\n tile3dAccessToken?: string;\n tile3dProvider?: string;\n};\n\nexport type BitmapBounds =\n | [number, number, number, number]\n | [[number, number], [number, number], [number, number], [number, number]];\n\nexport type BitmapDatasetMetadata = {\n imageUrl: string;\n bounds: BitmapBounds;\n isDataUri?: boolean;\n};\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AAAA,IAEYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAWhB,IAAME,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAG,CACjC,MAAM,EACN,KAAK,EACL,SAAS,EACT,MAAM,EACN,OAAO,EACP,SAAS,EACT,UAAU,EACV,QAAQ,EACR,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAM,EACN,KAAK,CACG;AAGH,IAAMC,sBAAyE,GAAAF,OAAA,CAAAE,sBAAA,GAAG;EAC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ojson","json","arrow","parquet","geojsonl","ndjson","kml","gpx","tcx","shp","xlsx","fgb","REMOTE_FILE_EXTENSIONS","MIME_TO_REMOTE_FILE_EXTENSION","DATASET_REFRESH_INTERVAL_OPTIONS","value","labelId","DATASET_REFRESH_CUSTOM_VALUE","DATASET_REFRESH_DEFAULT_CUSTOM_MS","DATASET_REFRESH_MIN_INTERVAL_MS","isPresetDatasetRefreshInterval","ms","some","option","getDatasetRefreshIntervalMs","metadata","refreshIntervalMs","Number","isFinite","parseCustomRefreshIntervalMs","secondsText","seconds","parseFloat","Math","max","round","formatCustomRefreshSeconds","isInteger","String","toFixed","getRemoteSourceFormat","candidate","sourceFormat","format","undefined","Object","prototype","hasOwnProperty","call","RemoteTileFormat","PMTilesType","REMOTE_TILE","RasterTileType","TILE3D_PROVIDERS","google","name","urlKey","attribution","title","url","logoUrl","height","bottom","cesium","arcgis"],"sources":["../../src/dataset.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\nexport enum DatasetType {\n LOCAL = 'local',\n EXTERNALLY_HOSTED = 'externally-hosted',\n VECTOR_TILE = 'vector-tile',\n RASTER_TILE = 'raster-tile',\n WMS_TILE = 'wms-tile',\n TILE_3D = 'tile-3d',\n BITMAP = 'bitmap',\n ZARR = 'zarr'\n}\n\nexport const REMOTE_FILE_FORMATS = [\n 'auto',\n 'csv',\n 'geojson',\n 'json',\n 'arrow',\n 'parquet',\n 'geojsonl',\n 'ndjson',\n 'kml',\n 'gpx',\n 'tcx',\n 'shp',\n 'xlsx',\n 'fgb'\n] as const;\nexport type RemoteFileFormat = (typeof REMOTE_FILE_FORMATS)[number];\n\nexport const REMOTE_FILE_MIME_TYPES: Record<Exclude<RemoteFileFormat, 'auto'>, string> = {\n csv: 'text/csv',\n geojson: 'application/geo+json',\n json: 'application/json',\n arrow: 'application/vnd.apache.arrow.file',\n parquet: 'application/vnd.apache.parquet',\n geojsonl: 'application/geo+x-ndjson',\n ndjson: 'application/x-ndjson',\n kml: 'application/vnd.google-earth.kml+xml',\n gpx: 'application/gpx+xml',\n tcx: 'application/vnd.garmin.tcx+xml',\n shp: 'application/x-esri-shapefile',\n xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n fgb: 'application/x-flatgeobuf'\n};\n\nexport const REMOTE_FILE_EXTENSIONS: Record<Exclude<RemoteFileFormat, 'auto'>, string> = {\n csv: 'csv',\n geojson: 'geojson',\n json: 'json',\n arrow: 'arrow',\n parquet: 'parquet',\n geojsonl: 'geojsonl',\n ndjson: 'ndjson',\n kml: 'kml',\n gpx: 'gpx',\n tcx: 'tcx',\n shp: 'shp',\n xlsx: 'xlsx',\n fgb: 'fgb'\n};\n\nexport const MIME_TO_REMOTE_FILE_EXTENSION: Record<string, string> = {\n 'text/csv': 'csv',\n 'text/tab-separated-values': 'tsv',\n 'application/geo+json': 'geojson',\n 'application/vnd.geo+json': 'geojson',\n 'application/json': 'json',\n 'application/vnd.apache.arrow.file': 'arrow',\n 'application/vnd.apache.arrow.stream': 'arrow',\n 'application/vnd.apache.parquet': 'parquet',\n 'application/x-parquet': 'parquet',\n 'application/geo+x-ndjson': 'geojsonl',\n 'application/geo+x-ldjson': 'geojsonl',\n 'application/geo+json-seq': 'geojsonl',\n 'application/x-ndjson': 'ndjson',\n 'application/jsonlines': 'ndjson',\n 'application/json-seq': 'ndjson',\n 'application/vnd.google-earth.kml+xml': 'kml',\n 'application/gpx+xml': 'gpx',\n 'application/vnd.garmin.tcx+xml': 'tcx',\n 'application/x-esri-shapefile': 'shp',\n 'application/shp': 'shp',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'xlsx',\n 'application/x-flatgeobuf': 'fgb',\n 'application/flatgeobuf': 'fgb'\n};\n\nexport const DATASET_REFRESH_INTERVAL_OPTIONS: {value: number; labelId: string}[] = [\n {value: 0, labelId: 'datasetTitle.refreshOff'},\n {value: 10_000, labelId: 'datasetTitle.refresh10s'},\n {value: 15_000, labelId: 'datasetTitle.refresh15s'},\n {value: 60_000, labelId: 'datasetTitle.refresh1m'},\n {value: 300_000, labelId: 'datasetTitle.refresh5m'},\n {value: 900_000, labelId: 'datasetTitle.refresh15m'}\n];\n\n/** Select value for a user-entered interval that is not one of the presets. */\nexport const DATASET_REFRESH_CUSTOM_VALUE = 'custom';\n/** Default custom poll interval when switching from Off to Custom. */\nexport const DATASET_REFRESH_DEFAULT_CUSTOM_MS = 30_000;\nexport const DATASET_REFRESH_MIN_INTERVAL_MS = 100;\n\nexport function isPresetDatasetRefreshInterval(ms: number): boolean {\n return DATASET_REFRESH_INTERVAL_OPTIONS.some(option => option.value === ms);\n}\n\nexport type ExternalDatasetRefreshStatus = 'idle' | 'loading' | 'error';\n\nexport type ExternalDatasetMetadata = {\n /** Remote URL of the dataset file. */\n source: string;\n /** Optional format hint for extensionless URLs (SAS keys, etc). */\n format?: Exclude<RemoteFileFormat, 'auto'> | string;\n /** Last known size of the hosted resource, in bytes. */\n size?: number;\n /** Poll interval in ms. Omitted or 0 means manual refresh only. */\n refreshIntervalMs?: number;\n};\n\n/** Runtime copy of {@link ExternalDatasetMetadata} with `format` renamed to avoid colliding with DATASET_FORMATS. */\nexport type ExternalDatasetRuntimeMetadata = {\n source: string;\n sourceFormat?: Exclude<RemoteFileFormat, 'auto'> | string;\n size?: number;\n refreshIntervalMs?: number;\n etag?: string;\n lastModified?: string;\n lastFetchedAt?: number;\n refreshStatus?: ExternalDatasetRefreshStatus;\n refreshError?: string;\n /** Download progress 0–100 while `refreshStatus` is `loading`. */\n refreshProgress?: number;\n};\n\nexport function getDatasetRefreshIntervalMs(metadata?: {refreshIntervalMs?: unknown}): number {\n const value = metadata?.refreshIntervalMs;\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? value : 0;\n}\n\n/** Parse a seconds field into ms, or null if the input is not a positive number. */\nexport function parseCustomRefreshIntervalMs(secondsText: string): number | null {\n const seconds = Number.parseFloat(secondsText);\n if (!Number.isFinite(seconds) || seconds <= 0) {\n return null;\n }\n return Math.max(DATASET_REFRESH_MIN_INTERVAL_MS, Math.round(seconds * 1000));\n}\n\n/** Display string for the custom seconds input (keeps tenths for sub-second values). */\nexport function formatCustomRefreshSeconds(ms: number): string {\n const seconds = Math.max(DATASET_REFRESH_MIN_INTERVAL_MS, ms) / 1000;\n if (Number.isInteger(seconds)) {\n return String(seconds);\n }\n return String(Number(seconds.toFixed(3)));\n}\n\nexport function getRemoteSourceFormat(metadata?: {\n sourceFormat?: unknown;\n format?: unknown;\n}): string | undefined {\n const candidate =\n (typeof metadata?.sourceFormat === 'string' && metadata.sourceFormat) ||\n (typeof metadata?.format === 'string' && metadata.format) ||\n undefined;\n if (\n candidate &&\n candidate !== 'auto' &&\n Object.prototype.hasOwnProperty.call(REMOTE_FILE_EXTENSIONS, candidate)\n ) {\n return candidate;\n }\n return undefined;\n}\n\nexport enum RemoteTileFormat {\n MVT = 'mvt',\n PMTILES = 'pmtiles',\n WMS = 'wms'\n}\n\nexport enum PMTilesType {\n RASTER = 'raster',\n MVT = 'mvt'\n}\n\nexport const REMOTE_TILE = 'remote';\n\nexport type VectorTileDatasetMetadata = {\n type: typeof REMOTE_TILE;\n remoteTileFormat: RemoteTileFormat;\n tilesetDataUrl: string;\n tilesetMetadataUrl?: string;\n};\n\n/**\n * Raster tileset metadata in STAC Item format. STAC version must be >= 1.0.0,\n * and the EO and Raster STAC extensions are required. This metadata shape can\n * be passed to the map to synchronously add a raster tileset.\n * @see https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md\n */\nexport type RasterTileLocalMetadata = {\n type: 'Feature';\n\n /** URL for tileset metadata. */\n metadataUrl?: string;\n stac_version: string;\n stac_extensions: string[];\n assets: Record<string, any>;\n};\n\n/**\n * Raster tileset metadata with a remote metadata URL. This metadata can\n * be passed to the map to asynchronously load a raster tileset.\n */\nexport type RasterTileRemoteMetadata = {\n metadataUrl: string;\n};\n\nexport enum RasterTileType {\n STAC = 'stac',\n PMTILES = 'pmtiles'\n}\n\nexport type RasterTileMetadataSourceType = {\n pmtilesType?: PMTilesType;\n};\n\n/**\n * Raster tileset metadata.\n */\nexport type RasterTileDatasetMetadata = (RasterTileLocalMetadata | RasterTileRemoteMetadata) &\n RasterTileMetadataSourceType;\n\nexport type WMSServiceLayer = {\n name: string;\n title: string;\n boundingBox: number[] | null;\n queryable?: boolean;\n legendUrl?: string | null;\n};\n\nexport type WMSDatasetMetadata = {\n type: typeof REMOTE_TILE;\n remoteTileFormat: RemoteTileFormat.WMS;\n tilesetDataUrl: string;\n tilesetMetadataUrl: string;\n version: string;\n layers: WMSServiceLayer[];\n label?: string;\n attribution?: string;\n};\n\n/** A non-spatial dimension of a Zarr variable, e.g. `time`, `band`, `depth`. */\nexport type ZarrDimensionInfo = {\n name: string;\n size: number;\n /**\n * Coordinate values for the dimension, when the store exposes a matching\n * coordinate array. Time coordinates are decoded to epoch milliseconds.\n */\n values?: (number | string | boolean)[];\n /** Preserve coordinate semantics instead of guessing from its name or dtype. */\n kind?: 'time' | 'duration' | 'number' | 'category';\n units?: string;\n calendar?: string;\n standardName?: string;\n /** Original offsets for decoded CF time coordinates. */\n rawValues?: (number | string | boolean)[];\n};\n\n/** Empty/missing keeps the original automatic layer time axis. */\nexport type ZarrAxisConfig =\n | {kind?: 'auto' | 'off'}\n | {kind: 'dimension'; dimension: string}\n | {kind: 'forecast'; referenceTime: string; leadTime: string};\n\nexport type ZarrVariableInfo = {\n /** Path of the variable within the Zarr group. Empty for a root-level array. */\n path: string;\n /**\n * Node to open for rendering, when it differs from `path`. A pyramid keeps\n * its levels under a shared parent, so the renderer is handed that parent\n * while each variable keeps its own identity.\n */\n nodePath?: string;\n /** Name of the array itself, i.e. the last path segment. */\n name: string;\n /**\n * Label to show in variable pickers. Equal to `name`, qualified with enough\n * leading path segments to stay unique when sibling groups hold arrays of the\n * same name, e.g. `FUTUR/evap_total` and `HISTO/evap_total`.\n */\n displayName: string;\n /**\n * GeoZarr-convention attributes describing the spatial grid. Taken from the\n * store when it declares them, otherwise derived from CF/GDAL metadata.\n */\n geoAttrs?: Record<string, unknown>;\n /** Parsed grid and pyramid settings for this variable, independent of the active variable. */\n spatialMetadata?: Pick<\n ZarrDatasetMetadata,\n 'crs' | 'axes' | 'xAxisIndex' | 'yAxisIndex' | 'levels' | 'webMercatorPyramid' | 'bounds'\n >;\n /** Shape of the finest resolution level. */\n shape: number[];\n /** Chunk shape of the finest resolution level. */\n chunks: number[];\n dtype: string;\n /** Non-spatial dimensions, in array order. */\n nonSpatialDims: ZarrDimensionInfo[];\n /** The non-spatial dimension recognized as time, when present. */\n timeDimension?: ZarrDimensionInfo;\n /** Value range advertised by the array attrs, used as the default rescale. */\n dataRange?: [number, number];\n /** Fill value advertised by the array attrs or zarr metadata. */\n nodataValue?: number;\n};\n\nexport type ZarrDatasetMetadata = {\n /** Root URL of the Zarr store. */\n url: string;\n /** Path of the selected variable within the store. */\n variable?: string;\n crs?: {code?: string; wkt2?: string};\n /** Geographic extent of the selected variable, [west, south, east, north] in degrees. */\n bounds?: [number, number, number, number] | null;\n /** Axis names of the selected variable, e.g. `['time', 'y', 'x']`. */\n axes: string[];\n xAxisIndex: number;\n yAxisIndex: number;\n /** Resolution levels, finest first. */\n levels: {path: string; shape: number[]; chunks: number[]}[];\n /**\n * Set when every level is reprojected to EPSG:3857 and spans the whole world,\n * which is what `ndpyramid`'s `pyramid_reproject` writes. The level to draw\n * then follows the map zoom rather than the data's own resolution.\n */\n webMercatorPyramid?: boolean;\n /** Every renderable variable in the store, for the variable picker. */\n variables: ZarrVariableInfo[];\n nonSpatialDims: ZarrDimensionInfo[];\n timeDimension?: ZarrDimensionInfo;\n dataRange?: [number, number];\n nodataValue?: number;\n label?: string;\n attribution?: string;\n};\n\nexport type Tile3DProviderAttribution = {\n title: string;\n url: string;\n logoUrl?: string;\n height?: number;\n bottom?: number;\n};\n\nexport type Tile3DProvider = {\n name: string;\n urlKey: string;\n attribution?: Tile3DProviderAttribution;\n};\n\nexport const TILE3D_PROVIDERS: Record<string, Tile3DProvider> = {\n google: {\n name: 'Google 3D Tiles',\n urlKey: 'google',\n attribution: {\n title: 'Built with Google Maps.',\n url: '',\n logoUrl:\n 'https://studio-public-data.foursquare.com/statics/images/google-watermark-white.png',\n height: 17,\n bottom: 0\n }\n },\n cesium: {\n name: 'Cesium ion',\n urlKey: 'ion.cesium',\n attribution: {title: 'Cesium.', url: 'https://cesium.com/', height: 19, bottom: 0}\n },\n arcgis: {\n name: 'ArcGIS',\n urlKey: 'arcgis',\n attribution: {title: 'Powered by Esri.', url: 'https://arcgis.com/', height: 16}\n }\n};\n\nexport type Tile3DDatasetMetadata = {\n tile3dUrl: string;\n tile3dAccessToken?: string;\n tile3dProvider?: string;\n};\n\nexport type BitmapBounds =\n | [number, number, number, number]\n | [[number, number], [number, number], [number, number], [number, number]];\n\nexport type BitmapDatasetMetadata = {\n imageUrl: string;\n bounds: BitmapBounds;\n isDataUri?: boolean;\n};\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AAAA,IAEYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAWhB,IAAME,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAG,CACjC,MAAM,EACN,KAAK,EACL,SAAS,EACT,MAAM,EACN,OAAO,EACP,SAAS,EACT,UAAU,EACV,QAAQ,EACR,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAM,EACN,KAAK,CACG;AAGH,IAAMC,sBAAyE,GAAAF,OAAA,CAAAE,sBAAA,GAAG;EACvFC,GAAG,EAAE,UAAU;EACfC,OAAO,EAAE,sBAAsB;EAC/BC,IAAI,EAAE,kBAAkB;EACxBC,KAAK,EAAE,mCAAmC;EAC1CC,OAAO,EAAE,gCAAgC;EACzCC,QAAQ,EAAE,0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WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAKhB,IAAMC,WAAW,GAAAvD,OAAA,CAAAuD,WAAA,GAAG,QAAQ;;AASnC;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AAHA,IAQYC,cAAc,GAAAxD,OAAA,CAAAwD,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAS1B;AACA;AACA;AAuBA;AAkBA;AA4FO,IAAMC,gBAAgD,GAAAzD,OAAA,CAAAyD,gBAAA,GAAG;EAC9DC,MAAM,EAAE;IACNC,IAAI,EAAE,iBAAiB;IACvBC,MAAM,EAAE,QAAQ;IAChBC,WAAW,EAAE;MACXC,KAAK,EAAE,yBAAyB;MAChCC,GAAG,EAAE,EAAE;MACPC,OAAO,EACL,qFAAqF;MACvFC,MAAM,EAAE,EAAE;MACVC,MAAM,EAAE;IACV;EACF,CAAC;EACDC,MAAM,EAAE;IACNR,IAAI,EAAE,YAAY;IAClBC,MAAM,EAAE,YAAY;IACpBC,WAAW,EAAE;MAACC,KAAK,EAAE,SAAS;MAAEC,GAAG,EAAE,qBAAqB;MAAEE,MAAM,EAAE,EAAE;MAAEC,MAAM,EAAE;IAAC;EACnF,CAAC;EACDE,MAAM,EAAE;IACNT,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,QAAQ;IAChBC,WAAW,EAAE;MAACC,KAAK,EAAE,kBAAkB;MAAEC,GAAG,EAAE,qBAAqB;MAAEE,MAAM,EAAE;IAAE;EACjF;AACF,CAAC","ignoreList":[]}
@@ -108,7 +108,7 @@ var KEPLER_GL_NAME = exports.KEPLER_GL_NAME = 'kepler.gl';
108
108
  // Since we are injecting this during the build process with babel
109
109
  // while developing VERSION is not defined, we capture the exception and return
110
110
  // an empty string which will allow us to retrieve the latest umd version
111
- var KEPLER_GL_VERSION = exports.KEPLER_GL_VERSION = "3.3.0-alpha.21";
111
+ var KEPLER_GL_VERSION = exports.KEPLER_GL_VERSION = "3.3.0-alpha.23";
112
112
  var KEPLER_GL_WEBSITE = exports.KEPLER_GL_WEBSITE = 'http://kepler.gl/';
113
113
  var DIMENSIONS = exports.DIMENSIONS = {
114
114
  sidePanel: {
@@ -1234,9 +1234,7 @@ var GLOBE_SUPPORTED_LAYERS = exports.GLOBE_SUPPORTED_LAYERS = {
1234
1234
  voronoi: false,
1235
1235
  s2: false,
1236
1236
  tile3d: false,
1237
- // Flow arrows are flat quads in common space (equatorial plane) and collapse when
1238
- // viewed edge-on on the globe, so the flow layer is not supported in Globe mode.
1239
- flow: false,
1237
+ flow: true,
1240
1238
  // Flow Field uses mercator ClipExtension bounds; stock clipping is wrong on globe.
1241
1239
  flowField: false
1242
1240
  };