/* * Copyright (c) Flowmap.gl contributors * Copyright (c) 2018-2020 Teralytics * SPDX-License-Identifier: Apache-2.0 */ import { FlowLinesRenderingMode, LocationFilterMode, ScaleLock, ViewportProps, } from './types.js'; export type FlowEndpointsInViewportMode = 'any' | 'both'; export interface FilterState { selectedLocations?: (string | number)[]; locationFilterMode?: LocationFilterMode; selectedTimeRange?: [Date, Date]; } export interface SettingsState { flowLinesRenderingMode: FlowLinesRenderingMode; blendingMode?: 'normal' | 'non-accumulating'; fadeEnabled: boolean; fadeOpacityEnabled: boolean; locationsEnabled: boolean; locationTotalsEnabled: boolean; locationLabelsEnabled: boolean; adaptiveScalesEnabled: boolean; clusteringEnabled: boolean; clusteringAuto: boolean; clusteringLevel?: number; darkMode: boolean; fadeAmount: number; colorScheme: string | string[] | undefined; highlightColor: string | number[]; maxTopFlowsDisplayNum: number; flowEndpointsInViewportMode: FlowEndpointsInViewportMode; flowLineThicknessScale: number; /** Flat maps draw routes the shorter way across the antimeridian. */ wrapLongitude?: boolean; scaleLock?: ScaleLock; } export interface FlowmapState { filter?: FilterState; settings: SettingsState; viewport: ViewportProps; }