From 46fdc9bbdc34c5c2d97a59d80858cbc338829361 Mon Sep 17 00:00:00 2001 From: Bas van den Wollenberg Date: Tue, 19 Nov 2024 22:35:40 +0100 Subject: [PATCH] Rename prettier config back to js and format --- electron.vite.config.ts | 2 +- package.json | 4 +-- .prettierrc.ts => prettier.config.js | 0 src/renderer/src/App.tsx | 2 +- .../src/components/InfiniteScroller.tsx | 2 +- .../components/dropdown-list/DropdownList.tsx | 4 +-- .../dropdown-list/DropdownListItem.tsx | 2 +- src/renderer/src/components/notice/Notice.tsx | 2 +- .../src/components/popover/Popover.tsx | 7 ++-- .../src/components/popover/PopoverAnchor.tsx | 2 +- .../src/components/popover/PopoverContent.tsx | 4 +-- .../src/components/raw-list/RawList.tsx | 2 +- .../resizable-panel/DragHandler.tsx | 6 ++-- .../resizable-panel/ResizablePanel.tsx | 4 +-- src/renderer/src/components/select/Select.tsx | 10 +++--- .../selectable-list/SelectableList.tsx | 4 +-- .../selectable-list/SelectableListItem.tsx | 4 +-- .../src/components/settings/Settings.tsx | 2 +- .../src/components/slider/SliderThumb.tsx | 2 +- .../song/song-detail/SongControls.tsx | 14 ++++---- .../song/song-detail/SongDetail.tsx | 6 ++-- .../components/song/song-item/SongItem.tsx | 16 +++++----- .../song/song-list-search/FilterOption.tsx | 10 +++--- .../song/song-list-search/SongListSearch.tsx | 2 +- .../SongListSearchOrderBy.tsx | 2 +- .../song-list-search/SongListSearchTags.tsx | 2 +- .../components/song/song-list/SongList.tsx | 4 +-- .../components/song/song-queue/SongQueue.tsx | 6 ++-- src/renderer/src/components/tabs/TabsList.tsx | 2 +- .../windows-control/WindowsControl.tsx | 4 +-- src/renderer/src/css/global.css | 2 +- .../src/keyboard-registers/toggle-sidebar.ts | 2 +- .../roving-focus-group/rovingFocusGroup.ts | 2 +- src/renderer/src/main.tsx | 2 +- src/renderer/src/scenes/ErrorScene.tsx | 7 ++-- .../src/scenes/main-scene/MainScene.tsx | 32 +++++++++---------- .../src/scenes/main-scene/Sidebar.tsx | 18 +++++------ 37 files changed, 99 insertions(+), 99 deletions(-) rename .prettierrc.ts => prettier.config.js (100%) 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 (