diff --git a/front/src/modules/simulationResult/types.ts b/front/src/modules/simulationResult/types.ts index 35d9207880f..8517bd95883 100644 --- a/front/src/modules/simulationResult/types.ts +++ b/front/src/modules/simulationResult/types.ts @@ -1,6 +1,6 @@ import type { Dispatch, SetStateAction } from 'react'; -import type { LayerData, PowerRestrictionValues } from '@osrd-project/ui-charts'; +import type { LayerData, PathLevel, PowerRestrictionValues } from '@osrd-project/ui-charts'; import type { PathProjectionResult, @@ -126,3 +126,23 @@ export type DraggingState = { draggedTrain: IndividualTrainProjection; initialDepartureTime: Date; }; + +/** + * Visual style of a curve, computed by the shared curve-style helper + * and used by STD (PathLayer) and TOD (OccupancyBlockLayer). + */ +export type CurveStyle = { + color: string; + opacity: number; + level?: PathLevel; + border?: { + offset: number; + color: string; + width?: number; + backgroundColor?: string; + }; + label?: { + border?: { color: string; width: number }; + fontWeight?: number; + }; +};