mirror of
https://github.com/hex248/tsos.git
synced 2026-02-07 18:23:05 +00:00
biome check+format
This commit is contained in:
@@ -1,22 +1,22 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://ui.shadcn.com/schema.json",
|
"$schema": "https://ui.shadcn.com/schema.json",
|
||||||
"style": "new-york",
|
"style": "new-york",
|
||||||
"rsc": false,
|
"rsc": false,
|
||||||
"tsx": true,
|
"tsx": true,
|
||||||
"tailwind": {
|
"tailwind": {
|
||||||
"config": "",
|
"config": "",
|
||||||
"css": "src/App.css",
|
"css": "src/App.css",
|
||||||
"baseColor": "neutral",
|
"baseColor": "neutral",
|
||||||
"cssVariables": true,
|
"cssVariables": true,
|
||||||
"prefix": ""
|
"prefix": ""
|
||||||
},
|
},
|
||||||
"iconLibrary": "lucide",
|
"iconLibrary": "lucide",
|
||||||
"aliases": {
|
"aliases": {
|
||||||
"components": "@/components",
|
"components": "@/components",
|
||||||
"utils": "@/lib/utils",
|
"utils": "@/lib/utils",
|
||||||
"ui": "@/components/ui",
|
"ui": "@/components/ui",
|
||||||
"lib": "@/lib",
|
"lib": "@/lib",
|
||||||
"hooks": "@/hooks"
|
"hooks": "@/hooks"
|
||||||
},
|
},
|
||||||
"registries": {}
|
"registries": {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
|
||||||
import Index from "@/Index";
|
import Index from "@/Index";
|
||||||
|
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
||||||
import Settings from "./Settings";
|
import Settings from "./Settings";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import ThemeToggle from "@/components/theme-toggle";
|
import ThemeToggle from "@/components/theme-toggle";
|
||||||
import { Link, useLocation } from "react-router-dom";
|
|
||||||
import { Home, Settings } from "lucide-react";
|
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
|
import { Home, Settings } from "lucide-react";
|
||||||
|
import { Link, useLocation } from "react-router-dom";
|
||||||
|
|
||||||
export default function Layout({
|
export default function Layout({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Stage, Layer } from "react-konva";
|
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import MorphableShape from "./MorphableShape";
|
|
||||||
import type { ShapeState } from "@/types/shape";
|
import type { ShapeState } from "@/types/shape";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { Layer, Stage } from "react-konva";
|
||||||
|
import MorphableShape from "./MorphableShape";
|
||||||
|
|
||||||
export default function ShapeCanvas({
|
export default function ShapeCanvas({
|
||||||
state,
|
state,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Moon, Sun } from "lucide-react";
|
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
import { Moon, Sun } from "lucide-react";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
function ThemeToggle({ className }: { className?: string }) {
|
function ThemeToggle({ className }: { className?: string }) {
|
||||||
const [theme, setTheme] = useState<string | null>();
|
const [theme, setTheme] = useState<string | null>();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type * as React from "react";
|
|
||||||
import { Slot } from "@radix-ui/react-slot";
|
import { Slot } from "@radix-ui/react-slot";
|
||||||
import { cva, type VariantProps } from "class-variance-authority";
|
import { type VariantProps, cva } from "class-variance-authority";
|
||||||
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from "react";
|
|
||||||
import * as SliderPrimitive from "@radix-ui/react-slider";
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
||||||
|
import * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type * as React from "react";
|
|
||||||
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
||||||
import { cva, type VariantProps } from "class-variance-authority";
|
import { type VariantProps, cva } from "class-variance-authority";
|
||||||
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -39,17 +39,17 @@ export function useShapeState(centerX: number, centerY: number) {
|
|||||||
}, [centerX, centerY]);
|
}, [centerX, centerY]);
|
||||||
|
|
||||||
// beforeunload warning
|
// beforeunload warning
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
const handleBeforeUnload = (e: BeforeUnloadEvent) => {
|
// const handleBeforeUnload = (e: BeforeUnloadEvent) => {
|
||||||
const hasChanged = JSON.stringify(state) !== JSON.stringify(initialStateRef.current);
|
// const hasChanged = JSON.stringify(state) !== JSON.stringify(initialStateRef.current);
|
||||||
if (hasChanged) {
|
// if (hasChanged) {
|
||||||
e.preventDefault();
|
// e.preventDefault();
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|
||||||
window.addEventListener("beforeunload", handleBeforeUnload);
|
// window.addEventListener("beforeunload", handleBeforeUnload);
|
||||||
return () => window.removeEventListener("beforeunload", handleBeforeUnload);
|
// return () => window.removeEventListener("beforeunload", handleBeforeUnload);
|
||||||
}, [state]);
|
// }, [state]);
|
||||||
|
|
||||||
return [state, setState] as const;
|
return [state, setState] as const;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { clsx, type ClassValue } from "clsx"
|
import { type ClassValue, clsx } from "clsx";
|
||||||
import { twMerge } from "tailwind-merge"
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
export function cn(...inputs: ClassValue[]) {
|
export function cn(...inputs: ClassValue[]) {
|
||||||
return twMerge(clsx(inputs))
|
return twMerge(clsx(inputs));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import "./App.css";
|
import "./App.css";
|
||||||
|
import App from "@/App";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
import App from "@/App";
|
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
|
|||||||
Reference in New Issue
Block a user