Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@opendaw/studio-core": "^0.2.7",
"@opendaw/studio-core-wasm": "^0.0.18",
"@sentry/cloudflare": "11.8.0",
"@tabler/icons-react": "^3.50.0",
"@tanstack/react-db": "^0.5.0",
"@tanstack/react-pacer": "^0.24.0",
"@tanstack/react-query": "^5.104.0",
Expand All @@ -43,7 +44,6 @@
"@xyflow/react": "^12.12.0",
"git-feedback": "^0.5.1",
"hls.js": "^1.7.3",
"lucide-react": "catalog:",
"lz-string": "^1.5.0",
"next-themes": "catalog:",
"p-queue": "^9.3.3",
Expand Down
8 changes: 4 additions & 4 deletions apps/radio/src/components/audio/effect-chain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
verticalListSortingStrategy,
} from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities";
import { PlusIcon } from "lucide-react";
import { IconPlus } from "@tabler/icons-react";
import {
type Dispatch,
type FocusEvent,
Expand Down Expand Up @@ -257,7 +257,7 @@ export function EffectChain({
</div>
<DragOverlay>
{activeEffect ? (
<div className="scale-[1.02] rounded-lg shadow-lg ring-2 ring-primary/50">
<div className="scale-[1.02] shadow-lg ring-2 ring-primary/50">
<EffectItem
effect={activeEffect}
isExpanded={false}
Expand All @@ -279,7 +279,7 @@ export function EffectChain({
size="sm"
variant="outline"
>
<PlusIcon className="size-3.5" />
<IconPlus className="size-3.5" />
Add effect
</Button>

Expand Down Expand Up @@ -382,7 +382,7 @@ function SortableEffectItem({
return (
<div
className={cn(
"rounded-lg transition-all duration-150",
"transition-all duration-150",
isDragging && "opacity-40",
isDraggingAny && !isDragging && "opacity-75"
)}
Expand Down
62 changes: 31 additions & 31 deletions apps/radio/src/components/audio/effect-constants.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
import {
ClockIcon,
FilterIcon,
FireExtinguisherIcon,
GaugeIcon,
RadioIcon,
WavesIcon,
ZapIcon,
} from "lucide-react";
IconBolt,
IconClock,
IconFilter,
IconFireExtinguisher,
IconGauge,
IconRadio,
IconWaveSine,
} from "@tabler/icons-react";
import type { EffectType } from "@/lib/audio";

export const EFFECT_ICONS: Record<EffectType, typeof FilterIcon> = {
autotune: RadioIcon,
cheapReverb: WavesIcon,
compressor: FireExtinguisherIcon,
crusher: ZapIcon,
delay: ClockIcon,
distortion: ZapIcon,
fold: ZapIcon,
frequencySplit: FilterIcon,
fxComposite: FilterIcon,
gate: FireExtinguisherIcon,
limiter: GaugeIcon,
maximizer: GaugeIcon,
neuralAmp: ZapIcon,
pitchShifter: RadioIcon,
plateReverb: WavesIcon,
revamp: FilterIcon,
stereoSplit: RadioIcon,
stereoTool: RadioIcon,
tidal: WavesIcon,
vocoder: RadioIcon,
waveshaper: ZapIcon,
werkstatt: FilterIcon,
export const EFFECT_ICONS: Record<EffectType, typeof IconFilter> = {
autotune: IconRadio,
cheapReverb: IconWaveSine,
compressor: IconFireExtinguisher,
crusher: IconBolt,
delay: IconClock,
distortion: IconBolt,
fold: IconBolt,
frequencySplit: IconFilter,
fxComposite: IconFilter,
gate: IconFireExtinguisher,
limiter: IconGauge,
maximizer: IconGauge,
neuralAmp: IconBolt,
pitchShifter: IconRadio,
plateReverb: IconWaveSine,
revamp: IconFilter,
stereoSplit: IconRadio,
stereoTool: IconRadio,
tidal: IconWaveSine,
vocoder: IconRadio,
waveshaper: IconBolt,
werkstatt: IconFilter,
};
24 changes: 12 additions & 12 deletions apps/radio/src/components/audio/effect-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import type {
DraggableSyntheticListeners,
} from "@dnd-kit/core";
import {
FilterIcon,
GripVerticalIcon,
RotateCcwIcon,
XIcon,
} from "lucide-react";
IconFilter,
IconGripVertical,
IconRotate,
IconX,
} from "@tabler/icons-react";
import type { SyntheticEvent } from "react";
import {
createDefaultEffectConfig,
Expand Down Expand Up @@ -71,7 +71,7 @@ export function EffectItem({
const metadata = getEffectMetadata(effect.type);
const effectName = metadata?.name ?? effect.type;

const Icon = EFFECT_ICONS[effect.type] ?? FilterIcon;
const Icon = EFFECT_ICONS[effect.type] ?? IconFilter;

function handleEnabledChange(enabled: boolean) {
onUpdate({ enabled });
Expand All @@ -88,7 +88,7 @@ export function EffectItem({
return (
<Card
className={cn(
"w-full gap-0 rounded-md border-border/50 py-0 shadow-none transition-all duration-200",
"w-full gap-0 border-border/50 py-0 shadow-none transition-all duration-200",
isDragging && "scale-[0.98] opacity-50 shadow-lg",
effect.enabled && "border-primary/20 bg-primary/5"
)}
Expand All @@ -99,7 +99,7 @@ export function EffectItem({
<button
aria-label={`Reorder ${effectName}`}
className={cn(
"cursor-grab touch-manipulation rounded-md p-1.5 text-muted-foreground transition-all hover:bg-muted/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing",
"cursor-grab touch-manipulation p-1.5 text-muted-foreground transition-all hover:bg-muted/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing",
isDragging && "bg-primary/20 text-primary"
)}
ref={dragHandleRef}
Expand All @@ -113,13 +113,13 @@ export function EffectItem({
{...dragHandleAttributes}
{...dragHandleListeners}
>
<GripVerticalIcon className="size-3.5" />
<IconGripVertical className="size-3.5" />
</button>

{/* Icon */}
<div
className={cn(
"flex size-6 shrink-0 items-center justify-center rounded-md transition-colors",
"flex size-6 shrink-0 items-center justify-center transition-colors",
effect.enabled
? "bg-primary/10 text-primary"
: "bg-muted text-muted-foreground"
Expand Down Expand Up @@ -167,7 +167,7 @@ export function EffectItem({
title="Reset to defaults"
variant="ghost"
>
<RotateCcwIcon className="size-3.5" />
<IconRotate className="size-3.5" />
</Button>
<Button
aria-label={`Remove ${effectName}`}
Expand All @@ -176,7 +176,7 @@ export function EffectItem({
size="icon"
variant="ghost"
>
<XIcon className="size-3.5" />
<IconX className="size-3.5" />
</Button>
</div>
</CardHeader>
Expand Down
26 changes: 13 additions & 13 deletions apps/radio/src/components/audio/effect-params/container-params.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { Input } from "@avoid.quest/ui/components/input";
import { Switch } from "@avoid.quest/ui/components/switch";
import { Toggle } from "@avoid.quest/ui/components/toggle";
import {
ChevronDownIcon,
ChevronRightIcon,
PlusIcon,
XIcon,
} from "lucide-react";
IconChevronDown,
IconChevronRight,
IconPlus,
IconX,
} from "@tabler/icons-react";
import {
type ChangeEvent,
type Dispatch,
Expand Down Expand Up @@ -186,7 +186,7 @@ function NestedEffect({
}

return (
<div className="rounded-md border bg-background/70">
<div className="border bg-background/70">
<div className="flex items-center gap-2 p-2">
<Button
aria-expanded={expanded}
Expand All @@ -196,9 +196,9 @@ function NestedEffect({
variant="ghost"
>
{expanded ? (
<ChevronDownIcon className="size-3.5" />
<IconChevronDown className="size-3.5" />
) : (
<ChevronRightIcon className="size-3.5" />
<IconChevronRight className="size-3.5" />
)}
{effectName}
</Button>
Expand All @@ -214,7 +214,7 @@ function NestedEffect({
size="icon"
variant="ghost"
>
<XIcon className="size-3.5" />
<IconX className="size-3.5" />
</Button>
</div>
{expanded && schema ? (
Expand Down Expand Up @@ -423,7 +423,7 @@ function ChainEditor({
);

return (
<div className="space-y-3 rounded-lg border p-3">
<div className="space-y-3 border p-3">
<div className="flex items-center gap-2">
<Input
aria-label="Chain name"
Expand All @@ -440,7 +440,7 @@ function ChainEditor({
size="icon"
variant="ghost"
>
<XIcon className="size-3.5" />
<IconX className="size-3.5" />
</Button>
) : null}
</div>
Expand Down Expand Up @@ -493,7 +493,7 @@ function ChainEditor({
size="sm"
variant="outline"
>
<PlusIcon className="size-3.5" />
<IconPlus className="size-3.5" />
Add nested effect
</Button>
) : null}
Expand Down Expand Up @@ -614,7 +614,7 @@ export function ContainerParams({
size="sm"
variant="outline"
>
<PlusIcon className="size-3.5" />
<IconPlus className="size-3.5" />
Add parallel chain
</Button>
)}
Expand Down
6 changes: 3 additions & 3 deletions apps/radio/src/components/audio/effect-params/param-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
CollapsibleTrigger,
} from "@avoid.quest/ui/components/collapsible";
import { cn } from "@avoid.quest/ui/lib/utils";
import { ChevronDownIcon } from "lucide-react";
import { IconChevronDown } from "@tabler/icons-react";
import { useState } from "react";

type ParamGroupProps = {
Expand Down Expand Up @@ -37,9 +37,9 @@ export function ParamGroup({
onOpenChange={setOpen}
open={open}
>
<CollapsibleTrigger className="flex w-full items-center justify-between rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
<CollapsibleTrigger className="flex w-full items-center justify-between focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
<span className={titleClassName}>{title}</span>
<ChevronDownIcon
<IconChevronDown
className={cn(
"size-3.5 text-muted-foreground transition-transform",
open && "rotate-180"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export function RevampParams({
return (
<div
className={cn(
"flex min-w-20 flex-1 flex-col items-center gap-1 rounded-md border border-border/50 px-1 py-1.5",
"flex min-w-20 flex-1 flex-col items-center gap-1 border border-border/50 px-1 py-1.5",
!enabled && "opacity-50"
)}
key={band.prefix}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function Tone3000ModelParams({
}

return (
<div className="space-y-2 rounded-md border p-3">
<div className="space-y-2 border p-3">
<Label htmlFor={`${effect.id}-nam-model`}>Local NAM model</Label>
<Input
accept=".nam,application/json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,12 @@ export function WerkstattParams({ effect, onUpdate }: WerkstattParamsProps) {
})
: null}

<div
className="rounded-md border p-3 text-xs"
data-state={runtimeStatus.state}
>
<div className="border p-3 text-xs" data-state={runtimeStatus.state}>
<p className="font-medium capitalize">Runtime: {runtimeStatus.state}</p>
<p className="text-muted-foreground">{runtimeStatus.message}</p>
</div>

<div className="rounded-md border border-dashed p-3 text-xs">
<div className="border border-dashed p-3 text-xs">
<p className="font-medium">Sample declarations unavailable</p>
<p className="text-muted-foreground">
The current official Werkstatt audio-effect bridge parses @sample but
Expand Down
12 changes: 6 additions & 6 deletions apps/radio/src/components/audio/effect-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
DialogTitle,
} from "@avoid.quest/ui/components/dialog";
import { cn } from "@avoid.quest/ui/lib/utils";
import { FilterIcon, type LucideIcon } from "lucide-react";
import { IconFilter, type TablerIcon } from "@tabler/icons-react";
import {
type ChangeEvent,
type KeyboardEvent,
Expand All @@ -29,7 +29,7 @@ export type PickerItem = {
description?: string;
/** A small sans tag under the name, e.g. the effect family. */
badge?: string;
icon: LucideIcon;
icon: TablerIcon;
/** Tints the icon tile, e.g. a platform's colour. */
iconColor?: string;
};
Expand All @@ -56,15 +56,15 @@ function PickerOption<TItem extends PickerItem>({
return (
<Card
aria-selected={active}
className="cursor-pointer flex-row items-start gap-3 rounded-md border-border/50 p-3 shadow-none outline-none transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 data-[active]:border-ring data-[active]:bg-muted/40"
className="cursor-pointer flex-row items-start gap-3 border-border/50 p-3 shadow-none outline-none transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-[active]:border-ring data-[active]:bg-muted/40"
data-active={active || undefined}
id={id}
onClick={() => onSelect(item)}
role="option"
tabIndex={-1}
>
<div
className="flex size-8 shrink-0 items-center justify-center rounded-sm bg-muted"
className="flex size-8 shrink-0 items-center justify-center bg-muted"
style={
item.iconColor
? { backgroundColor: `${item.iconColor}1a` }
Expand All @@ -81,7 +81,7 @@ function PickerOption<TItem extends PickerItem>({
{item.name}
</h3>
{item.badge ? (
<span className="mt-1 inline-flex rounded bg-muted px-1.5 py-0.5 font-medium text-muted-foreground text-xs">
<span className="mt-1 inline-flex bg-muted px-1.5 py-0.5 font-medium text-muted-foreground text-xs">
{item.badge}
</span>
) : null}
Expand Down Expand Up @@ -256,7 +256,7 @@ export function EffectPicker({
).map((effect) => ({
badge: effect.family,
description: effect.description,
icon: EFFECT_ICONS[effect.type] ?? FilterIcon,
icon: EFFECT_ICONS[effect.type] ?? IconFilter,
id: effect.type,
name: effect.name,
type: effect.type,
Expand Down
2 changes: 1 addition & 1 deletion apps/radio/src/components/audio/midi-control-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function MidiControlWrapper({
>
{hasMidi && <MidiBadge />}
{!!isThisLearning && (
<span className="pointer-events-none absolute inset-0 z-10 animate-pulse rounded border-2 border-primary border-dashed" />
<span className="pointer-events-none absolute inset-0 z-10 animate-pulse border-2 border-primary border-dashed" />
)}
{children}
</div>
Expand Down
Loading
Loading