import { ensureParamRange , snapshot , valueSetter } from "@thi.ng/interceptors" ; import type { AppConfig } from "./api" ; import { main } from "./components/main" ; import { SLIDERS } from "./sliders" ; export const CONFIG = { events : { ... SLIDERS . reduce ( ( events , spec ) => { events [ spec . event ] = [ ensureParamRange ( spec . min , spec . max ) , snapshot ( ) , valueSetter ( spec . view ) , ] ; return events ; } , { } ) , } , effects : { } , domRoot : "app" , rootComponent : main , initialState : { amp : 2.5 , freq : 3 , harmonics : 20 , hstep : 2 , phase : 0 , } , views : { amp : "amp" , freq : "freq" , phase : "phase" , harmonics : "harmonics" , hstep : "hstep" , } , ui : { button : { class : "pointer bg-black hover-bg-blue bg-animate white pa2 mr1 w-100 ttu b tracked-tight" , } , buttongroup : { class : "flex mb2" } , footer : { class : "absolute bottom-1" } , link : { class : "pointer link dim black b" } , root : { class : "vw-100 vh-100 flex" } , sidebar : { class : "bg-light-gray pa2 pt3 w5 f7" } , slider : { root : { class : "mb3 ttu b tracked-tight" } , range : { class : "w-100" } , number : { class : "fr w3 tr ttu bn bg-transparent" } , } , waveform : { class : "w-100 h-100" } , } , } ;