fix: lint

This commit is contained in:
Jade (Rose) Rowland 2024-10-14 13:01:02 -04:00
parent b0d2115f43
commit 8703d684c4
8 changed files with 19 additions and 19 deletions

View File

@ -73,8 +73,8 @@ export function registerSynthSounds() {
'supersaw', 'supersaw',
(begin, value, onended) => { (begin, value, onended) => {
const ac = getAudioContext(); const ac = getAudioContext();
const {z1, z2, z3} = value; const { z1, z2, z3 } = value;
let { duration, n, unison = z2 ?? 5, spread = z3 ?? 0.6, detune, } = value; let { duration, n, unison = z2 ?? 5, spread = z3 ?? 0.6, detune } = value;
detune = detune ?? n ?? z1 ?? 0.18; detune = detune ?? n ?? z1 ?? 0.18;
const frequency = getFrequencyFromValue(value); const frequency = getFrequencyFromValue(value);

View File

@ -1,5 +1,5 @@
import Loader from '@src/repl/components/Loader'; import Loader from '@src/repl/components/Loader';
import { HorizontalPanel, } from '@src/repl/components/panel/Panel'; import { HorizontalPanel } from '@src/repl/components/panel/Panel';
import { Code } from '@src/repl/components/Code'; import { Code } from '@src/repl/components/Code';
import BigPlayButton from '@src/repl/components/BigPlayButton'; import BigPlayButton from '@src/repl/components/BigPlayButton';
import UserFacingErrorMessage from '@src/repl/components/UserFacingErrorMessage'; import UserFacingErrorMessage from '@src/repl/components/UserFacingErrorMessage';
@ -20,7 +20,7 @@ export default function UdelsEditor(Props) {
<Code containerRef={containerRef} editorRef={editorRef} init={init} /> <Code containerRef={containerRef} editorRef={editorRef} init={init} />
</div> </div>
<UserFacingErrorMessage error={error} /> <UserFacingErrorMessage error={error} />
<HorizontalPanel context={context} /> <HorizontalPanel context={context} />
</div> </div>
); );
} }

View File

@ -52,7 +52,7 @@ export function Icon({ type }) {
d="M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416V96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4l192 160L256 241V96c0-17.7 14.3-32 32-32s32 14.3 32 32V416c0 17.7-14.3 32-32 32s-32-14.3-32-32V271l-11.5 9.6-192 160z" d="M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416V96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4l192 160L256 241V96c0-17.7 14.3-32 32-32s32 14.3 32 32V416c0 17.7-14.3 32-32 32s-32-14.3-32-32V271l-11.5 9.6-192 160z"
clipRule="evenodd" clipRule="evenodd"
/> />
), ),
}[type] }[type]
} }
</svg> </svg>

View File

@ -1,7 +1,6 @@
import { useState, useRef, useCallback, useMemo, useEffect } from 'react'; import { useState, useRef, useCallback, useMemo, useEffect } from 'react';
import { Icon } from './Icon'; import { Icon } from './Icon';
import { silence, noteToMidi, _mod } from '@strudel/core'; import { silence, noteToMidi, _mod } from '@strudel/core';
import { clearHydra } from '@strudel/hydra';
import { getDrawContext, getPunchcardPainter } from '@strudel/draw'; import { getDrawContext, getPunchcardPainter } from '@strudel/draw';
import { transpiler } from '@strudel/transpiler'; import { transpiler } from '@strudel/transpiler';
import { getAudioContext, webaudioOutput, initAudioOnFirstClick } from '@strudel/webaudio'; import { getAudioContext, webaudioOutput, initAudioOnFirstClick } from '@strudel/webaudio';

View File

@ -15,7 +15,6 @@ export default function ReplEditor(Props) {
const settings = useSettings(); const settings = useSettings();
const { panelPosition } = settings; const { panelPosition } = settings;
return ( return (
<div className="h-full flex flex-col relative"> <div className="h-full flex flex-col relative">
<Loader active={pending} /> <Loader active={pending} />

View File

@ -51,8 +51,11 @@ export function Reference() {
))} ))}
</div> </div>
</div> </div>
<div className="break-normal flex-grow flex-col overflow-y-auto overflow-x-hidden px-2 flex relative" id="reference-container"> <div
<div className='prose dark:prose-invert min-w-full px-1 '> className="break-normal flex-grow flex-col overflow-y-auto overflow-x-hidden px-2 flex relative"
id="reference-container"
>
<div className="prose dark:prose-invert min-w-full px-1 ">
<h2>API Reference</h2> <h2>API Reference</h2>
<p> <p>
This is the long list functions you can use! Remember that you don't need to remember all of those and that This is the long list functions you can use! Remember that you don't need to remember all of those and that
@ -80,7 +83,7 @@ export function Reference() {
))} ))}
</section> </section>
))} ))}
</div> </div>
</div> </div>
</div> </div>
); );

View File

@ -53,13 +53,12 @@ export function SoundsTab() {
return ( return (
<div id="sounds-tab" className="px-4 flex flex-col w-full h-full dark:text-white text-stone-900"> <div id="sounds-tab" className="px-4 flex flex-col w-full h-full dark:text-white text-stone-900">
<input
<input className="w-full p-1 bg-background rounded-md pb-2"
className="w-full p-1 bg-background rounded-md pb-2" placeholder="Search"
placeholder="Search" value={search}
value={search} onChange={(e) => setSearch(e.target.value)}
onChange={(e) => setSearch(e.target.value)} />
/>
<div className="pb-2 flex shrink-0 flex-wrap"> <div className="pb-2 flex shrink-0 flex-wrap">
<ButtonGroup <ButtonGroup
@ -74,7 +73,7 @@ export function SoundsTab() {
></ButtonGroup> ></ButtonGroup>
<ImportSoundsButton onComplete={() => settingsMap.setKey('soundsFilter', 'user')} /> <ImportSoundsButton onComplete={() => settingsMap.setKey('soundsFilter', 'user')} />
</div> </div>
<div className="min-h-0 max-h-full grow overflow-auto font-mono text-sm break-normal pb-2"> <div className="min-h-0 max-h-full grow overflow-auto font-mono text-sm break-normal pb-2">
{soundEntries.map(([name, { data, onTrigger }]) => { {soundEntries.map(([name, { data, onTrigger }]) => {
return ( return (

View File

@ -34,7 +34,7 @@ module.exports = {
}, },
spacing: { spacing: {
'app-height': 'var(--app-height)', 'app-height': 'var(--app-height)',
'app-width': 'var(--app-width)' 'app-width': 'var(--app-width)',
}, },
typography(theme) { typography(theme) {
return { return {