@proofkit/cli 2.0.0-beta.21 → 2.0.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/index.js +52 -50
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/template/vite-wv/_gitignore +1 -0
- package/template/vite-wv/components.json +6 -6
- package/template/vite-wv/index.html +2 -2
- package/template/vite-wv/package.json +19 -38
- package/template/vite-wv/proofkit-typegen.config.jsonc +18 -0
- package/template/vite-wv/proofkit.json +4 -1
- package/template/vite-wv/scripts/filemaker.js +96 -0
- package/template/vite-wv/scripts/launch-fm.js +19 -0
- package/template/vite-wv/scripts/upload.js +17 -14
- package/template/vite-wv/src/App.tsx +84 -0
- package/template/vite-wv/src/index.css +96 -0
- package/template/vite-wv/src/lib/utils.ts +6 -0
- package/template/vite-wv/src/main.tsx +10 -37
- package/template/vite-wv/tsconfig.json +3 -1
- package/template/vite-wv/vite.config.ts +5 -5
- package/template/vite-wv/pnpm-lock.yaml +0 -2294
- package/template/vite-wv/postcss.config.cjs +0 -15
- package/template/vite-wv/scripts/launch-fm.sh +0 -3
- package/template/vite-wv/src/components/AppLogo.tsx +0 -5
- package/template/vite-wv/src/components/full-screen-loader.tsx +0 -9
- package/template/vite-wv/src/config/env.ts +0 -16
- package/template/vite-wv/src/config/theme/globals.css +0 -125
- package/template/vite-wv/src/config/theme/mantine-theme.ts +0 -22
- package/template/vite-wv/src/routeTree.gen.ts +0 -111
- package/template/vite-wv/src/routes/__root.tsx +0 -21
- package/template/vite-wv/src/routes/index.tsx +0 -51
- package/template/vite-wv/src/routes/secondary.tsx +0 -26
- package/template/vite-wv/src/utils/notification-helpers.ts +0 -32
- package/template/vite-wv/src/utils/styles.ts +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proofkit/cli",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.22",
|
|
4
4
|
"description": "Create web application with the ProofKit stack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"shadcn": "^2.10.0",
|
|
64
64
|
"sort-package-json": "^2.15.1",
|
|
65
65
|
"ts-morph": "^26.0.0",
|
|
66
|
-
"@proofkit/fmdapi": "5.0
|
|
67
|
-
"@proofkit/typegen": "1.1.0-beta.
|
|
66
|
+
"@proofkit/fmdapi": "5.1.0-beta.2",
|
|
67
|
+
"@proofkit/typegen": "1.1.0-beta.17"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@auth/drizzle-adapter": "^1.11.1",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
3
|
"style": "new-york",
|
|
4
|
-
"rsc":
|
|
4
|
+
"rsc": false,
|
|
5
5
|
"tsx": true,
|
|
6
6
|
"tailwind": {
|
|
7
7
|
"config": "",
|
|
8
|
-
"css": "src/
|
|
8
|
+
"css": "src/index.css",
|
|
9
9
|
"baseColor": "neutral",
|
|
10
10
|
"cssVariables": true,
|
|
11
|
-
"prefix": "
|
|
11
|
+
"prefix": ""
|
|
12
12
|
},
|
|
13
13
|
"aliases": {
|
|
14
14
|
"components": "@/components",
|
|
15
|
-
"utils": "@/utils
|
|
15
|
+
"utils": "@/lib/utils",
|
|
16
16
|
"ui": "@/components/ui",
|
|
17
|
-
"lib": "@/
|
|
18
|
-
"hooks": "@/
|
|
17
|
+
"lib": "@/lib",
|
|
18
|
+
"hooks": "@/hooks"
|
|
19
19
|
},
|
|
20
20
|
"iconLibrary": "lucide"
|
|
21
21
|
}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>ProofKit WebViewer</title>
|
|
6
|
+
<title>ProofKit WebViewer Starter</title>
|
|
7
7
|
</head>
|
|
8
8
|
|
|
9
9
|
<body>
|
|
10
|
-
<div id="
|
|
10
|
+
<div id="root"></div>
|
|
11
11
|
<script type="module" src="/src/main.tsx"></script>
|
|
12
12
|
</body>
|
|
13
13
|
</html>
|
|
@@ -5,51 +5,32 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "vite build",
|
|
8
|
-
"build:upload": "
|
|
8
|
+
"build:upload": "__PNPM_COMMAND__ build && __PNPM_COMMAND__ upload",
|
|
9
9
|
"dev": "vite",
|
|
10
|
-
"launch-fm": "./scripts/launch-fm.
|
|
10
|
+
"launch-fm": "node ./scripts/launch-fm.js",
|
|
11
11
|
"proofkit": "proofkit",
|
|
12
12
|
"serve": "vite preview",
|
|
13
13
|
"start": "vite",
|
|
14
|
-
"typegen": "
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
14
|
+
"typegen": "typegen",
|
|
15
|
+
"typegen:ui": "typegen ui",
|
|
16
|
+
"upload": "node ./scripts/upload.js",
|
|
17
|
+
"lint": "biome check .",
|
|
18
|
+
"format": "biome format --write ."
|
|
18
19
|
},
|
|
19
20
|
"dependencies": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"@mantine/hooks": "^7.15.1",
|
|
23
|
-
"@mantine/modals": "^7.15.1",
|
|
24
|
-
"@mantine/notifications": "^7.15.1",
|
|
25
|
-
"@proofkit/webviewer": "^3.0.0",
|
|
26
|
-
"@proofkit/fmdapi": "^5.0.0",
|
|
27
|
-
"@t3-oss/env-core": "^0.12.0",
|
|
28
|
-
"@tabler/icons-react": "^3.26.0",
|
|
29
|
-
"@tanstack/react-query": "^5.69.0",
|
|
30
|
-
"@tanstack/react-router": "^1.114.27",
|
|
31
|
-
"mantine-react-table": "2.0.0-beta.7",
|
|
32
|
-
"react": "^19.0.0",
|
|
33
|
-
"react-dom": "^19.0.0",
|
|
34
|
-
"vite-plugin-singlefile": "^2.1.0",
|
|
35
|
-
"zod": "^3.24.1"
|
|
21
|
+
"react": "^19.2.4",
|
|
22
|
+
"react-dom": "^19.2.4"
|
|
36
23
|
},
|
|
37
24
|
"devDependencies": {
|
|
38
|
-
"@biomejs/biome": "2.
|
|
39
|
-
"@
|
|
40
|
-
"
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"open": "^10.1.0",
|
|
49
|
-
"postcss": "^8.5.3",
|
|
50
|
-
"postcss-preset-mantine": "^1.17.0",
|
|
51
|
-
"postcss-simple-vars": "^7.0.1",
|
|
52
|
-
"typescript": "^5",
|
|
53
|
-
"vite": "^6.2.3"
|
|
25
|
+
"@biomejs/biome": "2.4.7",
|
|
26
|
+
"@proofkit/typegen": "^1.1.0-beta.16",
|
|
27
|
+
"@types/react": "^19.2.14",
|
|
28
|
+
"@types/react-dom": "^19.2.3",
|
|
29
|
+
"@vitejs/plugin-react": "^5.2.0",
|
|
30
|
+
"dotenv": "^17.3.1",
|
|
31
|
+
"open": "^11.0.0",
|
|
32
|
+
"typescript": "^5.9.3",
|
|
33
|
+
"vite": "^7.3.1",
|
|
34
|
+
"vite-plugin-singlefile": "^2.3.2"
|
|
54
35
|
}
|
|
55
36
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://proofkit.dev/typegen-config-schema.json",
|
|
3
|
+
"config": {
|
|
4
|
+
"type": "fmdapi",
|
|
5
|
+
"path": "./src/config/schemas/filemaker",
|
|
6
|
+
"clearOldFiles": true,
|
|
7
|
+
"clientSuffix": "Layout",
|
|
8
|
+
"validator": "zod/v4",
|
|
9
|
+
"webviewerScriptName": "ExecuteDataApi",
|
|
10
|
+
"fmHttp": {
|
|
11
|
+
"enabled": true
|
|
12
|
+
},
|
|
13
|
+
"layouts": [
|
|
14
|
+
// Add layouts here when you're ready to generate clients.
|
|
15
|
+
// { "layoutName": "API_Customers", "schemaName": "Customers" }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import dotenv from "dotenv";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
const currentDirectory = fileURLToPath(new URL(".", import.meta.url));
|
|
6
|
+
const envPath = resolve(currentDirectory, "../.env");
|
|
7
|
+
|
|
8
|
+
dotenv.config({ path: envPath });
|
|
9
|
+
|
|
10
|
+
const defaultFmHttpBaseUrl = process.env.FM_HTTP_BASE_URL ?? "http://127.0.0.1:1365";
|
|
11
|
+
|
|
12
|
+
function stripFileExtension(fileName) {
|
|
13
|
+
return fileName.replace(/\.fmp12$/i, "");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async function getConnectedFiles(baseUrl = defaultFmHttpBaseUrl) {
|
|
17
|
+
const healthResponse = await fetch(`${baseUrl}/health`).catch(() => null);
|
|
18
|
+
if (!healthResponse?.ok) {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const connectedFiles = await fetch(`${baseUrl}/connectedFiles`)
|
|
23
|
+
.then((response) => (response.ok ? response.json() : []))
|
|
24
|
+
.catch(() => []);
|
|
25
|
+
|
|
26
|
+
return Array.isArray(connectedFiles) ? connectedFiles : [];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function normalizeTarget(fileName) {
|
|
30
|
+
return stripFileExtension(fileName).toLowerCase();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export async function resolveFileMakerTarget() {
|
|
34
|
+
const connectedFiles = await getConnectedFiles();
|
|
35
|
+
const targetFromEnv = process.env.FM_DATABASE ? normalizeTarget(process.env.FM_DATABASE) : undefined;
|
|
36
|
+
|
|
37
|
+
if (targetFromEnv) {
|
|
38
|
+
const matches = connectedFiles.filter((connectedFile) => normalizeTarget(connectedFile) === targetFromEnv);
|
|
39
|
+
if (matches.length === 1) {
|
|
40
|
+
return {
|
|
41
|
+
fileName: stripFileExtension(matches[0]),
|
|
42
|
+
host: "$",
|
|
43
|
+
source: "fm-http",
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (connectedFiles.length > 0) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
`FM_DATABASE is set to "${process.env.FM_DATABASE}" but no matching connected file was found via FM HTTP.`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (connectedFiles.length === 1) {
|
|
55
|
+
return {
|
|
56
|
+
fileName: stripFileExtension(connectedFiles[0]),
|
|
57
|
+
host: "$",
|
|
58
|
+
source: "fm-http",
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (connectedFiles.length > 1) {
|
|
63
|
+
throw new Error(
|
|
64
|
+
`Multiple FileMaker files are connected via FM HTTP (${connectedFiles.join(", ")}). Set FM_DATABASE to choose one.`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const serverValue = process.env.FM_SERVER;
|
|
69
|
+
const databaseValue = process.env.FM_DATABASE;
|
|
70
|
+
|
|
71
|
+
if (serverValue && databaseValue) {
|
|
72
|
+
let hostname;
|
|
73
|
+
try {
|
|
74
|
+
hostname = new URL(serverValue).hostname;
|
|
75
|
+
} catch {
|
|
76
|
+
hostname = serverValue.replace(/^https?:\/\//, "").replace(/\/.*$/, "");
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
fileName: stripFileExtension(databaseValue),
|
|
81
|
+
host: hostname,
|
|
82
|
+
source: "env",
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function buildFmpUrl({ host, fileName, scriptName, parameter }) {
|
|
90
|
+
const params = new URLSearchParams({ script: scriptName });
|
|
91
|
+
if (parameter) {
|
|
92
|
+
params.set("param", parameter);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return `fmp://${host}/${encodeURIComponent(fileName)}?${params.toString()}`;
|
|
96
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import open from "open";
|
|
2
|
+
import { buildFmpUrl, resolveFileMakerTarget } from "./filemaker.js";
|
|
3
|
+
|
|
4
|
+
const target = await resolveFileMakerTarget();
|
|
5
|
+
|
|
6
|
+
if (!target) {
|
|
7
|
+
console.error(
|
|
8
|
+
"Could not resolve a FileMaker file. Start the local FM HTTP proxy with a connected file, or set FM_SERVER and FM_DATABASE in .env.",
|
|
9
|
+
);
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
await open(
|
|
14
|
+
buildFmpUrl({
|
|
15
|
+
host: target.host,
|
|
16
|
+
fileName: target.fileName,
|
|
17
|
+
scriptName: "Launch Web Viewer for Dev",
|
|
18
|
+
}),
|
|
19
|
+
);
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import open from "open";
|
|
2
2
|
import { resolve } from "path";
|
|
3
|
-
import dotenv from "dotenv";
|
|
4
3
|
import { fileURLToPath } from "url";
|
|
4
|
+
import { buildFmpUrl, resolveFileMakerTarget } from "./filemaker.js";
|
|
5
5
|
|
|
6
6
|
const currentDirectory = fileURLToPath(new URL(".", import.meta.url));
|
|
7
|
-
|
|
8
|
-
const { parsed } = dotenv.config({
|
|
9
|
-
path: resolve(currentDirectory, "../.env"),
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const server = new URL(parsed.FM_SERVER).hostname;
|
|
13
|
-
const file = parsed.FM_DATABASE.replace(/\.fmp12$/, "");
|
|
14
|
-
const uploadScript = "UploadWebviewerWidget";
|
|
15
|
-
|
|
16
7
|
const thePath = resolve(currentDirectory, "../dist", "index.html");
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
)
|
|
8
|
+
const target = await resolveFileMakerTarget();
|
|
9
|
+
|
|
10
|
+
if (!target) {
|
|
11
|
+
console.error(
|
|
12
|
+
"Could not resolve a FileMaker file. Start the local FM HTTP proxy with a connected file, or set FM_SERVER and FM_DATABASE in .env.",
|
|
13
|
+
);
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
20
16
|
|
|
21
|
-
open(
|
|
17
|
+
await open(
|
|
18
|
+
buildFmpUrl({
|
|
19
|
+
host: target.host,
|
|
20
|
+
fileName: target.fileName,
|
|
21
|
+
scriptName: "UploadWebviewerWidget",
|
|
22
|
+
parameter: thePath,
|
|
23
|
+
}),
|
|
24
|
+
);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { globalSettings } from "@proofkit/webviewer";
|
|
2
|
+
import type { LucideIcon } from "lucide-react";
|
|
3
|
+
import { Database, Layers, Sparkles } from "lucide-react";
|
|
4
|
+
|
|
5
|
+
type Step = {
|
|
6
|
+
readonly icon: LucideIcon;
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly body: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
globalSettings.setWebViewerName("web");
|
|
12
|
+
|
|
13
|
+
const steps: readonly Step[] = [
|
|
14
|
+
{
|
|
15
|
+
icon: Database,
|
|
16
|
+
title: "Connect FileMaker later",
|
|
17
|
+
body: "This starter renders safely in a normal browser. When you are ready, wire in FM HTTP or hosted FileMaker setup with ProofKit commands.",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
icon: Layers,
|
|
21
|
+
title: "Generate clients when ready",
|
|
22
|
+
body: "Add layouts to proofkit-typegen.config.jsonc, then run your typegen script to create strongly typed layout clients.",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
icon: Sparkles,
|
|
26
|
+
title: "Add shadcn components fast",
|
|
27
|
+
body: "Tailwind v4 and shadcn are already initialized, so agents and developers can add components without extra setup.",
|
|
28
|
+
},
|
|
29
|
+
] as const;
|
|
30
|
+
|
|
31
|
+
export default function App() {
|
|
32
|
+
return (
|
|
33
|
+
<main className="min-h-screen bg-background text-foreground">
|
|
34
|
+
<div className="mx-auto flex min-h-screen w-full max-w-5xl flex-col px-6 py-10 sm:px-10">
|
|
35
|
+
<div className="mb-10 flex-1">
|
|
36
|
+
<div className="inline-flex items-center gap-2 rounded-full border border-border bg-card px-3 py-1 text-sm text-muted-foreground shadow-sm">
|
|
37
|
+
<span className="h-2 w-2 rounded-full bg-primary" />
|
|
38
|
+
ProofKit WebViewer Starter
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div className="mt-8 grid gap-8 lg:grid-cols-[1.2fr_0.8fr]">
|
|
42
|
+
<section className="rounded-3xl border border-border bg-card/80 p-8 shadow-sm">
|
|
43
|
+
<p className="text-sm font-medium uppercase tracking-[0.2em] text-muted-foreground">
|
|
44
|
+
React + TypeScript + Vite
|
|
45
|
+
</p>
|
|
46
|
+
<h1 className="mt-4 max-w-xl text-4xl font-semibold tracking-tight text-balance sm:text-5xl">
|
|
47
|
+
Build browser-safe FileMaker WebViewer apps without scaffolding against a hosted server.
|
|
48
|
+
</h1>
|
|
49
|
+
<p className="mt-6 max-w-2xl text-lg leading-8 text-muted-foreground">
|
|
50
|
+
This starter stays intentionally small, but it is already ready for Tailwind v4, shadcn component
|
|
51
|
+
installs, and later ProofKit typegen output.
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
<div className="mt-8 flex flex-wrap gap-3 text-sm">
|
|
55
|
+
<code className="rounded-full border border-border bg-background px-3 py-1.5">pnpm dev</code>
|
|
56
|
+
<code className="rounded-full border border-border bg-background px-3 py-1.5">pnpm typegen</code>
|
|
57
|
+
<code className="rounded-full border border-border bg-background px-3 py-1.5">pnpm launch-fm</code>
|
|
58
|
+
</div>
|
|
59
|
+
</section>
|
|
60
|
+
|
|
61
|
+
<aside className="rounded-3xl border border-border bg-gradient-to-br from-card via-card to-muted/50 p-8 shadow-sm">
|
|
62
|
+
<p className="text-sm font-medium uppercase tracking-[0.2em] text-muted-foreground">Starter notes</p>
|
|
63
|
+
<div className="mt-5 space-y-4 text-sm text-muted-foreground">
|
|
64
|
+
<p>Update the default WebViewer name in <code>src/App.tsx</code> to match your FileMaker layout object.</p>
|
|
65
|
+
<p>When the app runs inside FileMaker, you can start using <code>fmFetch</code> or generated clients right away.</p>
|
|
66
|
+
<p>The local helper scripts prefer FM HTTP connected files before falling back to hosted server env vars.</p>
|
|
67
|
+
</div>
|
|
68
|
+
</aside>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<section className="mt-8 grid gap-4 md:grid-cols-3">
|
|
72
|
+
{steps.map((step) => (
|
|
73
|
+
<article key={step.title} className="rounded-2xl border border-border bg-card p-6 shadow-sm">
|
|
74
|
+
<step.icon className="h-5 w-5 text-primary" />
|
|
75
|
+
<h2 className="mt-4 text-lg font-semibold">{step.title}</h2>
|
|
76
|
+
<p className="mt-3 text-sm leading-6 text-muted-foreground">{step.body}</p>
|
|
77
|
+
</article>
|
|
78
|
+
))}
|
|
79
|
+
</section>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</main>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
--background: hsl(42 33% 98%);
|
|
6
|
+
--foreground: hsl(222 47% 11%);
|
|
7
|
+
--card: hsl(0 0% 100%);
|
|
8
|
+
--card-foreground: hsl(222 47% 11%);
|
|
9
|
+
--popover: hsl(0 0% 100%);
|
|
10
|
+
--popover-foreground: hsl(222 47% 11%);
|
|
11
|
+
--primary: hsl(197 82% 44%);
|
|
12
|
+
--primary-foreground: hsl(210 40% 98%);
|
|
13
|
+
--secondary: hsl(210 20% 93%);
|
|
14
|
+
--secondary-foreground: hsl(222 47% 11%);
|
|
15
|
+
--muted: hsl(42 21% 94%);
|
|
16
|
+
--muted-foreground: hsl(215 16% 40%);
|
|
17
|
+
--accent: hsl(32 88% 92%);
|
|
18
|
+
--accent-foreground: hsl(24 10% 10%);
|
|
19
|
+
--destructive: hsl(0 72% 51%);
|
|
20
|
+
--destructive-foreground: hsl(210 40% 98%);
|
|
21
|
+
--border: hsl(30 14% 86%);
|
|
22
|
+
--input: hsl(30 14% 86%);
|
|
23
|
+
--ring: hsl(197 82% 44%);
|
|
24
|
+
--radius: 1rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dark {
|
|
28
|
+
color-scheme: dark;
|
|
29
|
+
--background: hsl(221 39% 11%);
|
|
30
|
+
--foreground: hsl(44 23% 92%);
|
|
31
|
+
--card: hsl(222 33% 15%);
|
|
32
|
+
--card-foreground: hsl(44 23% 92%);
|
|
33
|
+
--popover: hsl(222 33% 15%);
|
|
34
|
+
--popover-foreground: hsl(44 23% 92%);
|
|
35
|
+
--primary: hsl(190 82% 62%);
|
|
36
|
+
--primary-foreground: hsl(222 47% 11%);
|
|
37
|
+
--secondary: hsl(219 19% 22%);
|
|
38
|
+
--secondary-foreground: hsl(44 23% 92%);
|
|
39
|
+
--muted: hsl(219 19% 22%);
|
|
40
|
+
--muted-foreground: hsl(215 20% 72%);
|
|
41
|
+
--accent: hsl(27 42% 28%);
|
|
42
|
+
--accent-foreground: hsl(44 23% 92%);
|
|
43
|
+
--destructive: hsl(0 63% 54%);
|
|
44
|
+
--destructive-foreground: hsl(210 40% 98%);
|
|
45
|
+
--border: hsl(219 19% 26%);
|
|
46
|
+
--input: hsl(219 19% 26%);
|
|
47
|
+
--ring: hsl(190 82% 62%);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@theme inline {
|
|
51
|
+
--color-background: var(--background);
|
|
52
|
+
--color-foreground: var(--foreground);
|
|
53
|
+
--color-card: var(--card);
|
|
54
|
+
--color-card-foreground: var(--card-foreground);
|
|
55
|
+
--color-popover: var(--popover);
|
|
56
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
57
|
+
--color-primary: var(--primary);
|
|
58
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
59
|
+
--color-secondary: var(--secondary);
|
|
60
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
61
|
+
--color-muted: var(--muted);
|
|
62
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
63
|
+
--color-accent: var(--accent);
|
|
64
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
65
|
+
--color-destructive: var(--destructive);
|
|
66
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
67
|
+
--color-border: var(--border);
|
|
68
|
+
--color-input: var(--input);
|
|
69
|
+
--color-ring: var(--ring);
|
|
70
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
71
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
72
|
+
--radius-lg: var(--radius);
|
|
73
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@layer base {
|
|
77
|
+
* {
|
|
78
|
+
@apply border-border;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
html {
|
|
82
|
+
color-scheme: light;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
body {
|
|
86
|
+
background-color: var(--background);
|
|
87
|
+
color: var(--foreground);
|
|
88
|
+
font-family:
|
|
89
|
+
"Instrument Sans",
|
|
90
|
+
Inter,
|
|
91
|
+
ui-sans-serif,
|
|
92
|
+
system-ui,
|
|
93
|
+
sans-serif;
|
|
94
|
+
min-width: 320px;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -1,42 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import ReactDOM from "react-dom/client";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
createHashHistory,
|
|
6
|
-
createRouter,
|
|
7
|
-
} from "@tanstack/react-router";
|
|
8
|
-
import { routeTree } from "./routeTree.gen";
|
|
9
|
-
import { MantineProvider } from "@mantine/core";
|
|
10
|
-
import { theme } from "./config/theme/mantine-theme";
|
|
3
|
+
import App from "./App";
|
|
4
|
+
import "./index.css";
|
|
11
5
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// Hash history is used since we are using a single file build
|
|
17
|
-
const hashHistory = createHashHistory();
|
|
18
|
-
|
|
19
|
-
// Set up a Router instance
|
|
20
|
-
const router = createRouter({
|
|
21
|
-
routeTree,
|
|
22
|
-
defaultPreload: "intent",
|
|
23
|
-
history: hashHistory,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
// Register things for typesafety
|
|
27
|
-
declare module "@tanstack/react-router" {
|
|
28
|
-
interface Register {
|
|
29
|
-
router: typeof router;
|
|
30
|
-
}
|
|
6
|
+
const rootElement = document.getElementById("root");
|
|
7
|
+
if (!rootElement) {
|
|
8
|
+
throw new Error("Root element with id 'root' not found");
|
|
31
9
|
}
|
|
32
10
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<MantineProvider theme={theme} forceColorScheme="light">
|
|
39
|
-
<RouterProvider router={router} />
|
|
40
|
-
</MantineProvider>,
|
|
41
|
-
);
|
|
42
|
-
}
|
|
11
|
+
ReactDOM.createRoot(rootElement).render(
|
|
12
|
+
<React.StrictMode>
|
|
13
|
+
<App />
|
|
14
|
+
</React.StrictMode>,
|
|
15
|
+
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
1
|
+
import path from "node:path";
|
|
3
2
|
import react from "@vitejs/plugin-react";
|
|
4
|
-
import {
|
|
3
|
+
import { fmBridge } from "@proofkit/webviewer/vite-plugins";
|
|
4
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
5
|
+
import { defineConfig } from "vite";
|
|
5
6
|
import { viteSingleFile } from "vite-plugin-singlefile";
|
|
6
7
|
|
|
7
|
-
// https://vitejs.dev/config/
|
|
8
8
|
export default defineConfig({
|
|
9
9
|
server: {
|
|
10
10
|
port: 5175,
|
|
@@ -14,5 +14,5 @@ export default defineConfig({
|
|
|
14
14
|
"@": path.resolve(__dirname, "./src"),
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
|
-
plugins: [
|
|
17
|
+
plugins: [fmBridge(), react(), tailwindcss(), viteSingleFile()],
|
|
18
18
|
});
|