import { Range } from "@utils/typings/Visualizer" ; import { Theme } from "@utils/typings/Theme" ; export const WATERFALL_VISUALIZER_SCALE = 80 ; export const WATERFALL_VISUALIZER_OVERSCAN_BUFFER = 20 ; export const HORIZONTAL_GAP_BETWEEN_NOTES = 2 ; export const MS_PER_SECOND = 10 ; export const PIANO_HEIGHT = 210 ; export const DEFAULT_THEME = { naturalColor : "#42C9FF" , accidentalColor : "#FFDC66" } ; export const RADIUS = 3 ; export const GLOBAL_HEADER_HEIGHT = 50 ; export const MINIMUM_KEYS_IN_READ_MODE = 40 ; export const RANGE_PRESETS = [ { first : 48 , last : 72 } , { first : 41 , last : 72 } , { first : 48 , last : 84 } , { first : 36 , last : 84 } , { first : 36 , last : 96 } , { first : 21 , last : 108 } ] ; const DEFAULT_RANGE = { first : 36 , last : 84 } ; export const getDefaultRange = ( ) : Range => { const range = window . localStorage . getItem ( "range" ) ; if ( range ) { try { const { first , last } = JSON . parse ( range ) ; return { first , last } ; } catch ( e ) { } } return DEFAULT_RANGE ; } ; export const setDefaultRange = ( range ) => window . localStorage . setItem ( "range" , JSON . stringify ( range ) ) ;