Skip to content

Commit e9f69ea

Browse files
authored
Merge pull request #12 from officialMECH/dev
Maintenance (2024-04-09) 1.36.0 Update (#13)
2 parents 38c87cc + 477351e commit e9f69ea

File tree

126 files changed

+6050
-7471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+6050
-7471
lines changed

.eslintrc

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"root": true,
33
"env": { "browser": true, "es2020": true, "node": true },
4-
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-requiring-type-checking", "plugin:react-hooks/recommended"],
5-
"ignorePatterns": ["dist", "package.json", "yarn.lock", "src/styles", "src/router.ts"],
4+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended"],
5+
"ignorePatterns": ["dist", "package.json", "yarn.lock", "index.html", "src/styles", "src/router.ts"],
66
"parser": "@typescript-eslint/parser",
77
"parserOptions": {
88
"project": ["./tsconfig.json"],
@@ -13,5 +13,7 @@
1313
"@typescript-eslint/no-non-null-assertion": "off",
1414
"@typescript-eslint/ban-ts-comment": "off",
1515
"@typescript-eslint/no-unused-vars": "warn",
16+
"@typescript-eslint/no-explicit-any": "warn",
17+
"@typescript-eslint/ban-types": "warn",
1618
},
1719
}

.yarn/releases/yarn-4.0.2.cjs .yarn/releases/yarn-4.1.1.cjs

+336-336
Large diffs are not rendered by default.

.yarnrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ enableGlobalCache: false
44

55
nodeLinker: node-modules
66

7-
yarnPath: .yarn/releases/yarn-4.0.2.cjs
7+
yarnPath: .yarn/releases/yarn-4.1.1.cjs

index.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<script src="https://kit.fontawesome.com/890a5ffe43.js" crossorigin="anonymous"></script>
87
<title>Beat Saber Map Analysis</title>
98
</head>
109
<body>

package.json

+43-27
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,71 @@
22
"name": "bs-analysis",
33
"private": true,
44
"type": "module",
5-
"packageManager": "yarn@4.0.2",
5+
"packageManager": "yarn@4.1.1",
66
"scripts": {
77
"prepare": "panda codegen --clean",
88
"postinstall": "husky install",
99
"dev": "vite",
10-
"build": "tsc && vite build",
10+
"build": "vite build",
1111
"preview": "vite preview",
1212
"test": "vitest",
1313
"lint": "eslint src --report-unused-disable-directives",
1414
"format": "prettier src \"!src/router.ts\""
1515
},
1616
"dependencies": {
17-
"@floating-ui/react": "^0.26.7",
18-
"@generouted/react-router": "^1.18.2",
17+
"@fortawesome/fontawesome-svg-core": "^6.5.2",
18+
"@fortawesome/free-brands-svg-icons": "^6.5.2",
19+
"@fortawesome/free-regular-svg-icons": "^6.5.2",
20+
"@fortawesome/free-solid-svg-icons": "^6.5.2",
21+
"@fortawesome/react-fontawesome": "^0.2.0",
22+
"@generouted/react-router": "^1.18.6",
23+
"@pandacss/dev": "^0.37.2",
24+
"@radix-ui/primitive": "^1.0.1",
25+
"@radix-ui/react-checkbox": "^1.0.4",
26+
"@radix-ui/react-collapsible": "^1.0.3",
27+
"@radix-ui/react-context": "^1.0.1",
28+
"@radix-ui/react-dialog": "^1.0.5",
29+
"@radix-ui/react-popover": "^1.0.7",
30+
"@radix-ui/react-select": "^2.0.0",
1931
"@radix-ui/react-slot": "^1.0.2",
20-
"@tanstack/react-form": "^0.13.4",
21-
"@tanstack/react-table": "^8.11.7",
22-
"@tanstack/valibot-form-adapter": "^0.13.4",
23-
"echarts": "^5.4.3",
24-
"fast-xml-parser": "^4.3.4",
32+
"@radix-ui/react-tabs": "^1.0.4",
33+
"@radix-ui/react-toggle": "^1.0.3",
34+
"@radix-ui/react-tooltip": "^1.0.7",
35+
"@radix-ui/react-use-controllable-state": "^1.0.1",
36+
"@tanstack/react-form": "^0.19.0",
37+
"@tanstack/react-table": "^8.15.3",
38+
"@tanstack/valibot-form-adapter": "^0.19.0",
39+
"echarts": "^5.5.0",
40+
"fast-xml-parser": "^4.3.6",
2541
"file-saver": "^2.0.5",
2642
"jszip": "^3.10.1",
2743
"pako": "^2.1.0",
44+
"prompts": "^2.4.2",
2845
"react": "^18.2.0",
2946
"react-dom": "^18.2.0",
30-
"react-router-dom": "^6.21.3",
47+
"react-dropzone": "^14.2.3",
48+
"react-router-dom": "^6.22.3",
3149
"slugify": "^1.6.6",
32-
"valibot": "^0.27.1"
50+
"valibot": "^0.30.0"
3351
},
3452
"devDependencies": {
35-
"@pandacss/dev": "^0.17.5",
3653
"@types/file-saver": "^2.0.7",
37-
"@types/node": "^20.11.8",
38-
"@types/pako": "^2",
39-
"@types/react": "^18.2.48",
40-
"@types/react-dom": "^18.2.18",
41-
"@typescript-eslint/eslint-plugin": "^6.19.1",
42-
"@typescript-eslint/parser": "^6.19.1",
54+
"@types/node": "^20.12.5",
55+
"@types/pako": "^2.0.3",
56+
"@types/react": "^18.2.74",
57+
"@types/react-dom": "^18.2.24",
58+
"@typescript-eslint/eslint-plugin": "^7.5.0",
59+
"@typescript-eslint/parser": "^7.5.0",
4360
"@vitejs/plugin-react": "^4.2.1",
44-
"eslint": "^8.56.0",
61+
"eslint": "^8.57.0",
4562
"eslint-plugin-react-hooks": "^4.6.0",
46-
"eslint-plugin-react-refresh": "^0.4.5",
47-
"husky": "^9.0.6",
48-
"lint-staged": "^15.2.0",
49-
"prettier": "^3.2.4",
50-
"prompts": "^2.4.2",
51-
"typescript": "^5.3.3",
52-
"vite": "^5.0.12",
53-
"vitest": "^1.2.2"
63+
"eslint-plugin-react-refresh": "^0.4.6",
64+
"husky": "^9.0.11",
65+
"lint-staged": "^15.2.2",
66+
"prettier": "^3.2.5",
67+
"typescript": "^5.4.4",
68+
"vite": "^5.2.8",
69+
"vitest": "^1.4.0"
5470
},
5571
"engines": {
5672
"node": ">=18"

panda.config.ts

+36-77
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import { defineConfig } from "@pandacss/dev";
22

33
export default defineConfig({
44
preflight: true,
5-
include: ["./src/**/*.{js,jsx,ts,tsx}", "./pages/**/*.{js,jsx,ts,tsx}"],
5+
include: ["./src/**/*.{js,jsx,ts,tsx}"],
66
exclude: [],
77
outdir: "src/styles",
8+
importMap: ["$/styles"],
89
globalCss: {
910
html: {
1011
backgroundColor: "background",
@@ -15,83 +16,29 @@ export default defineConfig({
1516
maxWidth: "6xl",
1617
marginX: "auto",
1718
},
19+
// HACK: radix-ui portals do not respect margin/padding values.
20+
"body[data-scroll-locked]": {
21+
padding: "0 !important",
22+
marginX: "auto !important",
23+
},
1824
main: {
1925
margin: 8,
2026
},
2127
"&:focus": {
2228
borderColor: "white",
2329
},
2430
a: {
31+
padding: 0,
2532
color: "link",
2633
transition: "color 0.25s",
2734
"&:hover": {
2835
color: "indigo.400",
2936
},
3037
},
31-
"button, input, select, textarea": {
32-
backgroundColor: "element",
33-
color: "text",
34-
border: "1px solid transparent",
35-
transition: "border-color 0.25s",
36-
"&:not([disabled]):hover": {
37-
borderColor: "primary",
38-
},
39-
"&[disabled]": {
40-
backgroundColor: "container",
41-
color: "subtext",
42-
cursor: "not-allowed",
43-
},
44-
"&[disabled] > *": {
45-
cursor: "not-allowed",
46-
},
47-
},
48-
button: {
49-
paddingY: 1,
50-
paddingX: 4,
51-
borderRadius: "md",
52-
cursor: "pointer",
53-
},
5438
"code, pre": {
5539
fontFamily: "monospace",
5640
fontSize: "md",
5741
},
58-
details: {
59-
width: "full",
60-
"& summary": {
61-
paddingY: 2,
62-
paddingX: 4,
63-
backgroundColor: "element",
64-
cursor: "pointer",
65-
display: "flex",
66-
justifyContent: "space-between",
67-
gap: 8,
68-
alignItems: "center",
69-
fontWeight: "bold",
70-
fontSize: "xl",
71-
listStyle: "none",
72-
},
73-
"& summary::-webkit-details-marker": {
74-
display: "none",
75-
},
76-
"& summary::after": {
77-
fontFamily: "system",
78-
content: '"▶"',
79-
},
80-
"&[open] summary::after": {
81-
fontFamily: "system",
82-
content: '"▼"',
83-
},
84-
"& summary > *": {
85-
paddingY: 2,
86-
},
87-
"& section ": {
88-
paddingY: 2,
89-
marginX: 4,
90-
},
91-
},
92-
"h1, h2, h3, h4, h5, h6": {
93-
fontWeight: "bold",
94-
},
9542
hr: {
9643
marginY: 4,
9744
},
@@ -108,22 +55,6 @@ export default defineConfig({
10855
p: {
10956
marginBottom: 2,
11057
},
111-
pre: {
112-
fontFamily: "monospace",
113-
fontSize: "md",
114-
},
115-
select: {
116-
paddingX: "0.5em",
117-
cursor: "pointer",
118-
WebkitAppearance: "none",
119-
},
120-
table: {
121-
borderCollapse: "separate",
122-
borderSpacing: 0.5,
123-
"& thead": {
124-
fontWeight: "bold",
125-
},
126-
},
12758
},
12859
theme: {
12960
extend: {
@@ -138,6 +69,7 @@ export default defineConfig({
13869
text: { value: { base: "{colors.zinc.900}", _osDark: "{colors.zinc.100}" } },
13970
subtext: { value: { base: "{colors.zinc.600}", _osDark: "{colors.zinc.400}" } },
14071
neutral: { value: { base: "{colors.zinc.500}" } },
72+
light: { value: { base: "{colors.zinc.800}", _osDark: "{colors.zinc.200}" } },
14173
primary: { value: { base: "{colors.blue.500}" } },
14274
danger: { value: { base: "{colors.red.600}" } },
14375
link: { value: { base: "{colors.indigo.500}" } },
@@ -154,6 +86,33 @@ export default defineConfig({
15486
},
15587
patterns: {
15688
extend: {
89+
interactable: {
90+
transform: ({ ...rest }) => {
91+
return {
92+
backgroundColor: rest.backgroundColor ?? "element",
93+
color: "text",
94+
border: rest.border ?? "1px solid transparent",
95+
transition: "border-color 0.25s",
96+
cursor: "pointer",
97+
WebkitAppearance: "none",
98+
['&[data-state="on"]']: {
99+
backgroundColor: "primary",
100+
},
101+
"&:not([disabled]):hover": {
102+
borderColor: "primary",
103+
},
104+
"&[disabled]": {
105+
backgroundColor: "container",
106+
color: "subtext",
107+
cursor: "not-allowed",
108+
},
109+
"&[disabled] > *": {
110+
cursor: "not-allowed",
111+
},
112+
...rest,
113+
};
114+
},
115+
},
157116
scrollable: {
158117
description: "A container that allows for scrolling",
159118
properties: {

src/assets/datasets/ost.json

+1-1
Large diffs are not rendered by default.

src/components/badge/index.tsx

-36
This file was deleted.

src/components/context/floating.tsx

-13
This file was deleted.

src/components/context/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * as Storage from "./storage";

src/components/context/storage.tsx src/components/context/storage/index.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@ const reducer: Reducer<State, Actions> = (state, action) => {
4040
};
4141

4242
const storage = Object.entries(localStorage).reduce((record: State, [key, value]: [string, string]) => {
43-
if (!is(schemas.dataset, value)) return record;
4443
return { ...record, [key]: JSON.parse(value) as T };
4544
}, {});
4645

4746
const Context = createContext<{ state: State; dispatch: Dispatch<Actions> }>({ state: {}, dispatch: () => null });
4847

49-
function StorageProvider({ children }: PropsWithChildren) {
48+
function Provider({ children }: PropsWithChildren) {
5049
const [state, dispatch] = useReducer<Reducer<State, Actions>>(reducer, storage);
5150
useEffect(() => {
5251
Object.entries(datasets).forEach(([key, contents]) => {
5352
const name = key.split("/")[key.split("/").length - 1].split(".")[0];
53+
if (!is(schemas.dataset, contents.default)) return;
5454
dispatch({ type: "UPDATE", payload: { id: name, dataset: contents.default, overwrite: false } });
5555
});
5656
}, []);
5757
return <Context.Provider value={{ state, dispatch }}>{children}</Context.Provider>;
5858
}
5959

60-
export { Context as StorageContext, StorageProvider };
60+
export { Context, Provider, type State };

0 commit comments

Comments
 (0)