style fixes + hide-console option

- thicker highlighting outline
- only shade actual characters, not whole lines
- strudel hide-console will now hide console
This commit is contained in:
Felix Roos 2022-07-29 00:00:41 +02:00
parent fd61001b4d
commit 913416a9d5
5 changed files with 29 additions and 8 deletions

View file

@ -36,6 +36,8 @@ function useRepl({ tune, defaultSynth, autolink = true, onEvent, onDraw: onDrawP
}
}, [activeCode, onDrawProp]);
const hideHeader = useMemo(() => activeCode && activeCode.includes('strudel hide-header'), [activeCode]);
const hideConsole = useMemo(() => activeCode && activeCode.includes('strudel hide-console'), [activeCode]);
// cycle hook to control scheduling
const cycle = useCycle({
onDraw,
@ -136,6 +138,8 @@ function useRepl({ tune, defaultSynth, autolink = true, onEvent, onDraw: onDrawP
};
return {
hideHeader,
hideConsole,
pending,
code,
setCode,