Skip to content

Commit 7976aa7

Browse files
committed
wip: basic user form UI
1 parent ab1d578 commit 7976aa7

20 files changed

+585
-239
lines changed

biome.jsonc

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"vcs": {
33
"enabled": true,
44
"useIgnoreFile": true,
5-
"clientKind": "git",
6-
"root": ".."
5+
"clientKind": "git"
76
},
87
"files": {
9-
"ignore": [
10-
"e2e/**/*Generated.ts",
8+
"experimentalScannerIgnores": [
9+
"src/client/gen/types.ts",
1110
"pnpm-lock.yaml"
11+
1212
],
1313
"ignoreUnknown": true
1414
},
@@ -30,46 +30,35 @@
3030
"level": "off"
3131
},
3232
"noParameterAssign": {
33-
"level": "off"
33+
"level": "off",
34+
"options": {}
3435
},
3536
"useDefaultParameterLast": {
3637
"level": "off"
3738
},
3839
"useSelfClosingElements": {
39-
"level": "off"
40+
"level": "off",
41+
"options": {}
4042
}
4143
},
4244
"suspicious": {
4345
"noArrayIndexKey": {
4446
"level": "off"
4547
},
46-
"noConsoleLog": {
47-
"level": "error"
48+
"noConsole": {
49+
"level": "error",
50+
"options": {
51+
"allow": ["error"]
52+
}
4853
},
4954
"noThenProperty": {
5055
"level": "off"
5156
}
5257
},
5358
"nursery": {
54-
"useSortedClasses": "error",
55-
"noRestrictedImports": {
56-
"level": "error",
57-
"options": {
58-
"paths": {
59-
"@mui/material": "Use @mui/material/<name> instead. See: https://material-ui.com/guides/minimizing-bundle-size/.",
60-
"@mui/icons-material": "Use @mui/icons-material/<name> instead. See: https://material-ui.com/guides/minimizing-bundle-size/.",
61-
"@mui/material/Avatar": "Use components/Avatar/Avatar instead.",
62-
"@mui/material/Alert": "Use components/Alert/Alert instead.",
63-
"@mui/material/Popover": "Use components/Popover/Popover instead.",
64-
"@mui/material/Typography": "Use native HTML elements instead. Eg: <span>, <p>, <h1>, etc.",
65-
"@mui/material/Box": "Use a <div> instead.",
66-
"@mui/material/styles": "Import from @emotion/react instead.",
67-
"lodash": "Use lodash/<name> instead."
68-
}
69-
}
70-
}
59+
"useSortedClasses": "error"
7160
}
7261
}
7362
},
74-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json"
75-
}
63+
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json"
64+
}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
"@radix-ui/react-tabs": "^1.1.12",
2828
"@radix-ui/react-tooltip": "^1.2.7",
2929
"@tailwindcss/typography": "^0.5.16",
30+
"@tanstack/react-form": "^1.12.4",
31+
"@tanstack/valibot-form-adapter": "^0.42.1",
3032
"@universal-middleware/core": "^0.4.7",
3133
"@universal-middleware/hono": "^0.4.12",
3234
"@vercel/blob": "^1.1.1",

pnpm-lock.yaml

Lines changed: 92 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/App.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
import { Editor } from "@/client/Editor";
2-
import { Preview } from "@/client/Preview";
1+
import isEqual from "lodash/isEqual";
2+
import {
3+
ExternalLinkIcon,
4+
MoonIcon,
5+
ShareIcon,
6+
SunIcon,
7+
SunMoonIcon,
8+
} from "lucide-react";
9+
import { type FC, useEffect, useMemo, useRef, useState } from "react";
10+
import { useBeforeUnload, useSearchParams } from "react-router";
311
import { Button } from "@/client/components/Button";
412
import {
513
DropdownMenu,
@@ -19,6 +27,8 @@ import {
1927
TooltipTrigger,
2028
} from "@/client/components/Tooltip";
2129
import { useTheme } from "@/client/contexts/theme";
30+
import { Editor } from "@/client/editor/Editor";
31+
import { Preview } from "@/client/Preview";
2232
import { defaultCode } from "@/client/snippets";
2333
import { examples } from "@/examples";
2434
import type {
@@ -29,21 +39,11 @@ import type {
2939
import { mockUsers } from "@/owner";
3040
import { rpc } from "@/utils/rpc";
3141
import {
32-
type WasmLoadState,
3342
getDynamicParametersOutput,
3443
initWasm,
44+
type WasmLoadState,
3545
} from "@/utils/wasm";
36-
import isEqual from "lodash/isEqual";
37-
import {
38-
ExternalLinkIcon,
39-
MoonIcon,
40-
ShareIcon,
41-
SunIcon,
42-
SunMoonIcon,
43-
} from "lucide-react";
44-
import { type FC, useEffect, useMemo, useRef, useState } from "react";
4546
import { useDebouncedValue } from "./hooks/debounce";
46-
import { useBeforeUnload, useSearchParams } from "react-router";
4747

4848
export const App = () => {
4949
useBeforeUnload(
@@ -171,7 +171,7 @@ export const App = () => {
171171
<div className="flex items-center justify-center gap-6">
172172
<div className="flex items-center gap-2">
173173
<Logo className="text-content-primary" height={24} />
174-
<p className="font-semibold text-content-primary text-2xl">
174+
<p className="font-semibold text-2xl text-content-primary">
175175
Playground
176176
</p>
177177
</div>

src/client/components/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
6868
/>
6969
);
7070
},
71-
)
71+
);

src/client/components/Form.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

src/client/components/Markdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const Markdown: FC<MarkdownProps> = (props) => {
5757
);
5858
},
5959

60-
hr: () => <hr className="my-3"/>,
60+
hr: () => <hr className="my-3" />,
6161

6262
pre: ({ node, children }) => {
6363
if (!node || !node.children) {

0 commit comments

Comments
 (0)