diff --git a/electron.vite.config.ts b/electron.vite.config.ts index e3e919e8..1b3a6d18 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -1,8 +1,8 @@ import { defineConfig, externalizeDepsPlugin } from "electron-vite"; import { resolve } from "path"; +import devtools from "solid-devtools/vite"; import lucidePreprocess from "vite-plugin-lucide-preprocess"; import solid from "vite-plugin-solid"; -import devtools from "solid-devtools/vite"; export default defineConfig({ main: { diff --git a/package.json b/package.json index 26b689a2..fe8b4f1e 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "author": "@CaptSiro", "type": "module", "main": "./out/main/index.js", - "packageManager": "^bun@1.1.33", "scripts": { "build": "bun run typecheck && electron-vite build", "build:linux": "electron-vite build && electron-builder --linux --config", @@ -75,5 +74,6 @@ "vite": "^5.4.8", "vite-plugin-lucide-preprocess": "^1.1.1", "vite-plugin-solid": "^2.7.0" - } + }, + "packageManager": "^bun@1.1.33" } diff --git a/.prettierrc.ts b/prettier.config.js similarity index 100% rename from .prettierrc.ts rename to prettier.config.js diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 932af65f..216ed49b 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -9,9 +9,9 @@ import NoScene from "./scenes/NoScene"; import DirSelectScene from "./scenes/dir-select-scene/DirSelectScene"; import LoadingScene from "./scenes/loading-scene/LoadingScene"; import MainScene from "./scenes/main-scene/MainScene"; +import { sidebarWidth } from "./scenes/main-scene/main.utils"; import type { JSX } from "solid-js"; import { createMemo, createSignal, Match, onCleanup, onMount, Show, Switch } from "solid-js"; -import { sidebarWidth } from "./scenes/main-scene/main.utils"; export default function App(): JSX.Element { const [scene, setScene] = createSignal(""); diff --git a/src/renderer/src/components/InfiniteScroller.tsx b/src/renderer/src/components/InfiniteScroller.tsx index d309b609..035d8bf2 100644 --- a/src/renderer/src/components/InfiniteScroller.tsx +++ b/src/renderer/src/components/InfiniteScroller.tsx @@ -224,7 +224,7 @@ const InfiniteScroller: Component = (props) => { return (
diff --git a/src/renderer/src/components/dropdown-list/DropdownList.tsx b/src/renderer/src/components/dropdown-list/DropdownList.tsx index a9fd016f..3646f289 100644 --- a/src/renderer/src/components/dropdown-list/DropdownList.tsx +++ b/src/renderer/src/components/dropdown-list/DropdownList.tsx @@ -1,8 +1,8 @@ +import { RawList } from "../raw-list/RawList"; import DropdownListItem from "./DropdownListItem"; import { useRovingFocusGroup } from "@renderer/lib/roving-focus-group/rovingFocusGroup"; -import { createContext, createSignal, JSX, ParentComponent, useContext } from "solid-js"; -import { RawList } from "../raw-list/RawList"; import { TokenNamespace } from "@renderer/lib/tungsten/token"; +import { createContext, createSignal, JSX, ParentComponent, useContext } from "solid-js"; export type Props = JSX.IntrinsicElements["div"]; diff --git a/src/renderer/src/components/dropdown-list/DropdownListItem.tsx b/src/renderer/src/components/dropdown-list/DropdownListItem.tsx index 68b9db60..ddab6caf 100644 --- a/src/renderer/src/components/dropdown-list/DropdownListItem.tsx +++ b/src/renderer/src/components/dropdown-list/DropdownListItem.tsx @@ -1,7 +1,7 @@ +import { RawList } from "../raw-list/RawList"; import { useDropdownList } from "./DropdownList"; import { Component, onCleanup } from "solid-js"; import { JSX } from "solid-js/jsx-runtime"; -import { RawList } from "../raw-list/RawList"; export type Props = JSX.IntrinsicElements["button"]; const DropdownListItem: Component = (props) => { diff --git a/src/renderer/src/components/notice/Notice.tsx b/src/renderer/src/components/notice/Notice.tsx index a54dc7f3..14b66d4e 100644 --- a/src/renderer/src/components/notice/Notice.tsx +++ b/src/renderer/src/components/notice/Notice.tsx @@ -165,7 +165,7 @@ const Notice: Component = (props) => {
= (props) => { diff --git a/src/renderer/src/components/popover/PopoverContent.tsx b/src/renderer/src/components/popover/PopoverContent.tsx index 623c2c2b..75b28ef2 100644 --- a/src/renderer/src/components/popover/PopoverContent.tsx +++ b/src/renderer/src/components/popover/PopoverContent.tsx @@ -1,6 +1,6 @@ -import { cn, sn } from "@renderer/lib/css.utils"; import { popoverStack, usePopover } from "./Popover"; import { ComputePositionReturn } from "@floating-ui/dom"; +import { cn, sn } from "@renderer/lib/css.utils"; import createFocusTrap from "solid-focus-trap"; import { Component, createMemo, onCleanup, onMount, Show } from "solid-js"; import { JSX } from "solid-js/jsx-runtime"; @@ -56,7 +56,7 @@ const PopoverContent: Component = (props) => {
= (_props) return ( diff --git a/src/renderer/src/components/song/song-detail/SongDetail.tsx b/src/renderer/src/components/song/song-detail/SongDetail.tsx index 921d3d24..d8b15706 100644 --- a/src/renderer/src/components/song/song-detail/SongDetail.tsx +++ b/src/renderer/src/components/song/song-detail/SongDetail.tsx @@ -31,8 +31,8 @@ const SongDetail: Component = () => {
-

{song().title}

- {song().artist} +

{song().title}

+ {song().artist}
@@ -64,7 +64,7 @@ const ProgressBar = (props: ProgressBarProps) => { > = (props) => { onMouseLeave={() => { setIsHovering(false); }} - class="min-h-[72px] rounded-lg py-0.5 pl-1.5 pr-0.5 transition-colors active: group relative isolate overflow-hidden" + class="active: group relative isolate min-h-[72px] overflow-hidden rounded-lg py-0.5 pl-1.5 pr-0.5 transition-colors" classList={{ "shadow-glow-blue": isSelected(), }} @@ -117,12 +117,12 @@ const SongItem: Component = (props) => { }} >
= (props) => { />
-

{props.song.title}

+

{props.song.title}

{props.song.artist}

@@ -149,7 +149,7 @@ const SongItem: Component = (props) => { setMousePos(undefined); setLocalShow(true); }} - class="absolute right-0 top-0 h-full flex items-center text-subtext transition-colors hover:text-text rounded-r-lg animate-song-item-slide-in" + class="absolute right-0 top-0 flex h-full animate-song-item-slide-in items-center rounded-r-lg text-subtext transition-colors hover:text-text" title="Song options" classList={{ "text-text": localShow(), @@ -159,7 +159,7 @@ const SongItem: Component = (props) => { }} >
= (_props) => return ( -
+
); }; @@ -34,7 +34,7 @@ const FilterOptionContainer: Component = (_props) => type FilterOptionLabelProps = JSX.IntrinsicElements["p"]; export const FilterOptionLabel: Component = (_props) => { const [props, rest] = splitProps(_props, ["class"]); - return

; + return

; }; // ------------ @@ -43,7 +43,7 @@ export const FilterOptionLabel: Component = (_props) => export const FilterOptionList: ParentComponent = (props) => { return (

); @@ -60,7 +60,7 @@ export const FilterOptionTrigger: Component = (_props) @@ -81,7 +81,7 @@ export const FilterOptionItem: Component = (_props) => {
diff --git a/src/renderer/src/scenes/main-scene/MainScene.tsx b/src/renderer/src/scenes/main-scene/MainScene.tsx index 0a6fee7a..d5cf72ac 100644 --- a/src/renderer/src/scenes/main-scene/MainScene.tsx +++ b/src/renderer/src/scenes/main-scene/MainScene.tsx @@ -1,16 +1,5 @@ import SongDetail from "../../components/song/song-detail/SongDetail"; -import "./styles.css"; -import Button from "@renderer/components/button/Button"; -import SongImage from "@renderer/components/song/SongImage"; -import { song } from "@renderer/components/song/song.utils"; -import { WindowsControls } from "@renderer/components/windows-control/WindowsControl"; -import { os } from "@renderer/lib/os"; -import { Layers3Icon } from "lucide-solid"; -import { Accessor, Component, createSignal, Match, Switch } from "solid-js"; import { Sidebar } from "./Sidebar"; -import Popover from "@renderer/components/popover/Popover"; -import SongQueue from "@renderer/components/song/song-queue/SongQueue"; -import ResizablePanel from "@renderer/components/resizable-panel/ResizablePanel"; import { setAnimateSidebar, setSidebarWidth, @@ -18,11 +7,22 @@ import { sidebarWidth, useMainResizableOptions, } from "./main.utils"; +import "./styles.css"; +import Button from "@renderer/components/button/Button"; +import Popover from "@renderer/components/popover/Popover"; +import ResizablePanel from "@renderer/components/resizable-panel/ResizablePanel"; +import SongImage from "@renderer/components/song/SongImage"; +import SongQueue from "@renderer/components/song/song-queue/SongQueue"; +import { song } from "@renderer/components/song/song.utils"; +import { WindowsControls } from "@renderer/components/windows-control/WindowsControl"; +import { os } from "@renderer/lib/os"; +import { Layers3Icon } from "lucide-solid"; +import { Accessor, Component, createSignal, Match, Switch } from "solid-js"; const MainScene: Component = () => { const { maxSidebarWidth, offsetFromPanel } = useMainResizableOptions(); return ( -
+
@@ -44,7 +44,7 @@ const MainScene: Component = () => { settingsWriteSidebarWidth(width); }} > -
+
{
-
+
{ />
-
+
); }; @@ -98,7 +98,7 @@ const Queue: Component = () => { - + diff --git a/src/renderer/src/scenes/main-scene/Sidebar.tsx b/src/renderer/src/scenes/main-scene/Sidebar.tsx index 81eef645..8cc6fff1 100644 --- a/src/renderer/src/scenes/main-scene/Sidebar.tsx +++ b/src/renderer/src/scenes/main-scene/Sidebar.tsx @@ -1,5 +1,3 @@ -import Tabs from "@renderer/components/tabs/Tabs"; -import { Component, createMemo, For, Show } from "solid-js"; import { animateSidebar, NAV_ITEMS, @@ -9,15 +7,17 @@ import { sidebarActiveTab, sidebarExpanded, } from "./main.utils"; -import SongList from "@renderer/components/song/song-list/SongList"; -import { SettingsIcon, SidebarIcon } from "lucide-solid"; import Button from "@renderer/components/button/Button"; -import Settings from "@renderer/components/settings/Settings"; -import { os } from "@renderer/lib/os"; import ResizablePanel, { useResizablePanel, } from "@renderer/components/resizable-panel/ResizablePanel"; +import Settings from "@renderer/components/settings/Settings"; +import SongList from "@renderer/components/song/song-list/SongList"; +import Tabs from "@renderer/components/tabs/Tabs"; import { cn } from "@renderer/lib/css.utils"; +import { os } from "@renderer/lib/os"; +import { SettingsIcon, SidebarIcon } from "lucide-solid"; +import { Component, createMemo, For, Show } from "solid-js"; function toPx(value: number) { return `${value}px`; @@ -32,14 +32,14 @@ export const Sidebar: Component = () => { return (