import { mergePartial } from '../common' ; import { LIGHT_THEME } from './light_theme' ; import { LineAnnotationStyle , PartialTheme , RectAnnotationStyle , Theme } from './theme' ; public export const DEFAULT_ANNOTATION_LINE_STYLE = { line : { stroke : '#777' , strokeWidth : 1 , opacity : 1 , } , details : { fontSize : 10 , fontFamily : 'sans-serif' , fontStyle : 'normal' , fill : '#777' , padding : 0 , } , } ; public export const DEFAULT_ANNOTATION_RECT_STYLE = { stroke : '#FFEEBC' , strokeWidth : 0 , opacity : 0.25 , fill : '#FFEEBC' , } ; public export function mergeWithDefaultAnnotationLine ( config ? ) { const defaultLine = DEFAULT_ANNOTATION_LINE_STYLE . line ; const defaultDetails = DEFAULT_ANNOTATION_LINE_STYLE . details ; const mergedConfig = { ... DEFAULT_ANNOTATION_LINE_STYLE } ; if ( ! config ) { return mergedConfig ; } if ( config . line ) { mergedConfig . line = { ... defaultLine , ... config . line , } ; } if ( config . details ) { mergedConfig . details = { ... defaultDetails , ... config . details , } ; } return mergedConfig ; } public export function mergeWithDefaultAnnotationRect ( config ? ) { if ( ! config ) { return DEFAULT_ANNOTATION_RECT_STYLE ; } return { ... DEFAULT_ANNOTATION_RECT_STYLE , ... config , } ; } param theme param defaultTheme param auxiliaryThemes public deprecated export function mergeWithDefaultTheme ( theme , defaultTheme = LIGHT_THEME , auxiliaryThemes = [ ] ) { return mergePartial ( defaultTheme , theme , { } , auxiliaryThemes ) ; }