Skip to content

Commit

Permalink
formatting and basic SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
proudparrot2 committed Sep 17, 2024
1 parent 82fdbe1 commit 7688b34
Show file tree
Hide file tree
Showing 33 changed files with 544 additions and 486 deletions.
33 changes: 18 additions & 15 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto"
},
"linter": {
"enabled": false
}
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"javascript": {
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"semicolons": "asNeeded",
"attributePosition": "auto"
}
},
"linter": {
"enabled": false
}
}
28 changes: 14 additions & 14 deletions components.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/styles.css",
"baseColor": "zinc",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/cn"
}
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/styles.css",
"baseColor": "zinc",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/cn"
}
}
133 changes: 66 additions & 67 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,68 @@
{
"name": "bunker",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/icons-material": "^5.16.0",
"@mui/material": "^5.16.0",
"@nanostores/react": "^0.7.2",
"@radix-ui/react-alert-dialog": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-select": "^2.1.1",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-switch": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"autoprefixer": "^10.4.19",
"browser-fs-access": "^0.35.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"events": "^3.3.0",
"idb": "^8.0.0",
"idb-keyval": "^6.2.1",
"lucide-react": "^0.298.0",
"million": "^2.6.4",
"nanostores": "^0.9.5",
"next-themes": "^0.2.1",
"postcss": "^8.4.39",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^4.12.0",
"react-router-dom": "^6.24.1",
"react-twc": "^1.4.1",
"semver": "^7.6.3",
"sonner": "^1.5.0",
"store2": "^2.14.3",
"swr": "^2.2.5",
"tailwind-merge": "^2.4.0",
"tailwindcss": "^3.4.4",
"tailwindcss-animate": "^1.0.7",
"vite-plugin-singlefile": "^2.0.2"
},
"devDependencies": {
"@types/node": "^20.14.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.8",
"typescript": "^5.5.3",
"vite": "^5.3.3"
},
"description": "Secure student runtime.",
"keywords": [],
"author": "proudparrot2",
"license": "AGPL-3.0"
"name": "bunker",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/icons-material": "^5.16.0",
"@mui/material": "^5.16.0",
"@nanostores/react": "^0.7.2",
"@radix-ui/react-alert-dialog": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-select": "^2.1.1",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-switch": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"autoprefixer": "^10.4.19",
"browser-fs-access": "^0.35.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"events": "^3.3.0",
"idb": "^8.0.0",
"lucide-react": "^0.298.0",
"million": "^2.6.4",
"nanostores": "^0.9.5",
"next-themes": "^0.2.1",
"postcss": "^8.4.39",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^4.12.0",
"react-router-dom": "^6.24.1",
"react-twc": "^1.4.1",
"semver": "^7.6.3",
"sonner": "^1.5.0",
"store2": "^2.14.3",
"swr": "^2.2.5",
"tailwind-merge": "^2.4.0",
"tailwindcss": "^3.4.4",
"tailwindcss-animate": "^1.0.7",
"vite-plugin-singlefile": "^2.0.2"
},
"devDependencies": {
"@types/node": "^20.14.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.8",
"typescript": "^5.5.3",
"vite": "^5.3.3"
},
"description": "Secure student runtime.",
"keywords": [],
"author": "proudparrot2",
"license": "AGPL-3.0"
}
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export default {
tailwindcss: {},
autoprefixer: {},
},
};
}
39 changes: 20 additions & 19 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { Home, LayoutGrid, Library, Settings, Info } from "lucide-react";
import { Home, LayoutGrid, Library, Settings, Info } from "lucide-react"

import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "./ui/tooltip";
import { useLocation, useNavigate } from "react-router-dom";
import { $plugins } from "@/lib/plugins";
import { useStore } from "@nanostores/react";
} from "./ui/tooltip"
import { useLocation, useNavigate } from "react-router-dom"
import { $plugins } from "@/lib/plugins"
import { useStore } from "@nanostores/react"
export default function Navbar() {
const loadedPlugins = useStore($plugins);
const loadedPlugins = useStore($plugins)
const navItems = [
{
icon: (
Expand All @@ -35,9 +35,9 @@ export default function Navbar() {
href: "/plugins",
position: "top",
},
];
const location = useLocation();
const navigate = useNavigate();
]
const location = useLocation()
const navigate = useNavigate()
return (
<TooltipProvider>
<div className="w-16 h-screen bg-zinc-800 flex flex-col justify-between fixed left-0 top-0 z-40">
Expand All @@ -51,7 +51,7 @@ export default function Navbar() {
<TooltipTrigger asChild>
<div
onClick={() => {
navigate(item.href);
navigate(item.href)
}}
className={`font-bold hover:bg-zinc-700 ${location.pathname == item.href && "bg-zinc-600"} transition-colors duration-150 aspect-square flex items-center justify-center cursor-pointer group`}
>
Expand All @@ -62,16 +62,16 @@ export default function Navbar() {
<p>{item.tooltip}</p>
</TooltipContent>
</Tooltip>
);
)
})}
{loadedPlugins.map((item, i) => {
if (!item.page || !item.icon || item.disabled) return;
if (!item.page || !item.icon || item.disabled) return
return (
<Tooltip key={i} delayDuration={0}>
<TooltipTrigger asChild>
<div
onClick={() => {
navigate(`/plugin/${item.id}`);
navigate(`/plugin/${item.id}`)
}}
className={`font-bold hover:bg-zinc-700 ${location.pathname == `/plugin/${item.id}` && "bg-zinc-600"} transition-colors duration-150 aspect-square flex items-center justify-center cursor-pointer group`}
>
Expand All @@ -82,7 +82,7 @@ export default function Navbar() {
<p>{item.name}</p>
</TooltipContent>
</Tooltip>
);
)
})}
</div>
<div>
Expand All @@ -109,10 +109,11 @@ export default function Navbar() {
<Tooltip delayDuration={0}>
<TooltipTrigger asChild>
<div
onClick={() => {
navigate(`/info`);
}}
className="font-bold hover:bg-zinc-700 transition-colors duration-150 aspect-square flex items-center justify-center cursor-pointer group">
onClick={() => {
navigate(`/info`)
}}
className="font-bold hover:bg-zinc-700 transition-colors duration-150 aspect-square flex items-center justify-center cursor-pointer group"
>
<Info className="group-active:scale-90 transition-all duration-300" />
</div>
</TooltipTrigger>
Expand All @@ -123,5 +124,5 @@ export default function Navbar() {
</div>
</div>
</TooltipProvider>
);
)
}
Loading

0 comments on commit 7688b34

Please sign in to comment.