feat/orm-diffs
Niko PLP 4 days ago
parent 44d4fcac3e
commit 1039c2694d
  1. 1
      app/nextgraph/.prettierrc
  2. 37
      app/nextgraph/index.html
  3. 7
      app/nextgraph/package.json
  4. 23
      app/nextgraph/src/App.svelte
  5. 24
      app/nextgraph/src/main.ts
  6. 6
      app/nextgraph/svelte.config.js
  7. 19
      app/nextgraph/tailwind.config.js
  8. 67
      app/nextgraph/vite.config.ts
  9. 76
      pnpm-lock.yaml

@ -3,6 +3,7 @@
"singleQuote": false, "singleQuote": false,
"trailingComma": "none", "trailingComma": "none",
"printWidth": 100, "printWidth": 100,
"tabWidth": 4,
"plugins": [ "plugins": [
"prettier-plugin-svelte" "prettier-plugin-svelte"
], ],

@ -1,31 +1,14 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="stylesheet" href="/src/styles.css" /> <link rel="stylesheet" href="/src/styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri App</title> <title>NextGraph</title>
<script type="module" src="/src/main.ts" defer></script> <script type="module" src="/src/main.ts" defer></script>
</head> </head>
<body> <body>
<div role="alert" class="alert alert-info"> <div id="app"></div>
<p class="text-3xl font-bold underline"> </body>
Hello world!
</p>
</div>
<article class="prose lg:prose-xl">
<h1>Garlic bread with cheese: What the science tells us</h1>
<p>
For years parents have espoused the health benefits of eating garlic bread with cheese to their
children, with the food earning such an iconic status in our culture that kids will often dress
up as warm, cheesy loaf for Halloween.
</p>
<p>
But a recent study shows that the celebrated appetizer may be linked to a series of rabies cases
springing up around the country.
</p>
<!-- ... -->
</article>
</body>
</html> </html>

@ -8,22 +8,25 @@
"build": "tsc && vite build", "build": "tsc && vite build",
"preview": "vite preview", "preview": "vite preview",
"tauri": "tauri", "tauri": "tauri",
"lint": "prettier --write ." "format": "prettier --write .",
"check": "svelte-check --tsconfig ./tsconfig.json"
}, },
"dependencies": { "dependencies": {
"@tailwindcss/vite": "^4.1.14", "@dvcol/svelte-simple-router": "^2.7.2",
"@tauri-apps/api": "^2", "@tauri-apps/api": "^2",
"@tauri-apps/plugin-opener": "^2" "@tauri-apps/plugin-opener": "^2"
}, },
"devDependencies": { "devDependencies": {
"@sveltejs/vite-plugin-svelte": "^6.2.1", "@sveltejs/vite-plugin-svelte": "^6.2.1",
"@tailwindcss/typography": "^0.5.19", "@tailwindcss/typography": "^0.5.19",
"@tailwindcss/vite": "^4.1.14",
"@tauri-apps/cli": "^2.8.4", "@tauri-apps/cli": "^2.8.4",
"@tsconfig/svelte": "^5.0.5", "@tsconfig/svelte": "^5.0.5",
"daisyui": "^5.3.1", "daisyui": "^5.3.1",
"prettier": "^3.6.2", "prettier": "^3.6.2",
"prettier-plugin-svelte": "^3.4.0", "prettier-plugin-svelte": "^3.4.0",
"svelte": "^5.39.13", "svelte": "^5.39.13",
"svelte-check": "^4.3.3",
"tailwindcss": "^4.1.14", "tailwindcss": "^4.1.14",
"typescript": "~5.6.2", "typescript": "~5.6.2",
"vite": "^7.1.7" "vite": "^7.1.7"

@ -0,0 +1,23 @@
<script lang="ts">
</script>
<div role="alert" class="alert alert-info">
<p class="text-3xl font-bold underline">Hello world!</p>
</div>
<article class="prose lg:prose-xl">
<h1>Garlic bread with cheese: What the science tells us</h1>
<p>
For years parents have espoused the health benefits of eating garlic bread with cheese to
their children, with the food earning such an iconic status in our culture that kids will
often dress up as warm, cheesy loaf for Halloween.
</p>
<p>
But a recent study shows that the celebrated appetizer may be linked to a series of rabies
cases springing up around the country.
</p>
</article>
<style>
</style>

@ -1,22 +1,6 @@
import { invoke } from "@tauri-apps/api/core"; import { mount } from "svelte";
import App from "./App.svelte";
let greetInputEl: HTMLInputElement | null; const app = mount(App, { target: document.getElementById("app") as Element });
let greetMsgEl: HTMLElement | null;
async function greet() { export default app;
if (greetMsgEl && greetInputEl) {
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
greetMsgEl.textContent = await invoke("greet", {
name: greetInputEl.value,
});
}
}
window.addEventListener("DOMContentLoaded", () => {
greetInputEl = document.querySelector("#greet-input");
greetMsgEl = document.querySelector("#greet-msg");
document.querySelector("#greet-form")?.addEventListener("submit", (e) => {
e.preventDefault();
greet();
});
});

@ -0,0 +1,6 @@
// svelte.config.js
export default {
vitePlugin: {
//inspector: true
}
};

@ -1,12 +1,11 @@
/** @type {import('tailwindcss').Config} */ /** @type {import('tailwindcss').Config} */
export default { export default {
content: ['./src/**/*.{html,js,svelte,ts}'], content: ["./src/**/*.{html,js,svelte,ts}"],
theme: { theme: {
extend: {}, extend: {}
}, },
plugins: [], plugins: [],
daisyui: { daisyui: {
//themes: ['valentine'] //themes: ['valentine']
} }
} };

@ -1,44 +1,41 @@
import tailwindcss from "@tailwindcss/vite" import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import { svelte } from '@sveltejs/vite-plugin-svelte' import { svelte } from "@sveltejs/vite-plugin-svelte";
const host = process.env.TAURI_DEV_HOST; const host = process.env.TAURI_DEV_HOST;
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [tailwindcss(), svelte()], plugins: [tailwindcss(), svelte()],
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
// //
// 1. prevent Vite from obscuring rust errors // 1. prevent Vite from obscuring rust errors
clearScreen: false, clearScreen: false,
// 2. tauri expects a fixed port, fail if that port is not available // 2. tauri expects a fixed port, fail if that port is not available
server: { server: {
port: 5173, port: 5173,
strictPort: true, strictPort: true,
host: host || false, host: host || false,
hmr: host hmr: host
? { ? {
protocol: "ws", protocol: "ws",
host, host,
port: 1421, port: 1421
}
: undefined,
watch: {
// 3. tell Vite to ignore watching `src-tauri`
ignored: ["**/src-tauri/**"]
} }
: undefined,
watch: {
// 3. tell Vite to ignore watching `src-tauri`
ignored: ["**/src-tauri/**"],
}, },
}, // Env variables starting with the item of `envPrefix` will be exposed in tauri's source code through `import.meta.env`.
// Env variables starting with the item of `envPrefix` will be exposed in tauri's source code through `import.meta.env`. envPrefix: ["VITE_", "TAURI_ENV_*"],
envPrefix: ['VITE_', 'TAURI_ENV_*'], build: {
build: { // Tauri uses Chromium on Windows and WebKit on macOS and Linux
// Tauri uses Chromium on Windows and WebKit on macOS and Linux target: process.env.TAURI_ENV_PLATFORM == "windows" ? "chrome105" : "safari13",
target: // don't minify for debug builds
process.env.TAURI_ENV_PLATFORM == 'windows' minify: !process.env.TAURI_ENV_DEBUG ? "esbuild" : false,
? 'chrome105' // produce sourcemaps for debug builds
: 'safari13', sourcemap: !!process.env.TAURI_ENV_DEBUG
// don't minify for debug builds }
minify: !process.env.TAURI_ENV_DEBUG ? 'esbuild' : false,
// produce sourcemaps for debug builds
sourcemap: !!process.env.TAURI_ENV_DEBUG,
},
}); });

@ -17,9 +17,9 @@ importers:
app/nextgraph: app/nextgraph:
dependencies: dependencies:
'@tailwindcss/vite': '@dvcol/svelte-simple-router':
specifier: ^4.1.14 specifier: ^2.7.2
version: 4.1.14(vite@7.1.10(@types/node@24.3.0)(jiti@2.6.1)(lightningcss@1.30.1)(yaml@2.8.1)) version: 2.7.2(svelte@5.39.13)
'@tauri-apps/api': '@tauri-apps/api':
specifier: ^2 specifier: ^2
version: 2.8.0 version: 2.8.0
@ -33,6 +33,9 @@ importers:
'@tailwindcss/typography': '@tailwindcss/typography':
specifier: ^0.5.19 specifier: ^0.5.19
version: 0.5.19(tailwindcss@4.1.14) version: 0.5.19(tailwindcss@4.1.14)
'@tailwindcss/vite':
specifier: ^4.1.14
version: 4.1.14(vite@7.1.10(@types/node@24.3.0)(jiti@2.6.1)(lightningcss@1.30.1)(yaml@2.8.1))
'@tauri-apps/cli': '@tauri-apps/cli':
specifier: ^2.8.4 specifier: ^2.8.4
version: 2.8.4 version: 2.8.4
@ -51,6 +54,9 @@ importers:
svelte: svelte:
specifier: ^5.39.13 specifier: ^5.39.13
version: 5.39.13 version: 5.39.13
svelte-check:
specifier: ^4.3.3
version: 4.3.3(picomatch@4.0.3)(svelte@5.39.13)(typescript@5.6.3)
tailwindcss: tailwindcss:
specifier: ^4.1.14 specifier: ^4.1.14
version: 4.1.14 version: 4.1.14
@ -1099,6 +1105,22 @@ packages:
resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==} resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==}
engines: {node: '>=18'} engines: {node: '>=18'}
'@dvcol/common-utils@1.34.0':
resolution: {integrity: sha512-8PojenuhCK8FZyWcToYII5W0WNiaYw+wi6UPfPExHbA2gANuBtjVzdZVYVOJNEMdHXMNatR9b3m37ppl8+1Mnw==}
engines: {node: '>=20', pnpm: '>= 8'}
'@dvcol/svelte-simple-router@2.7.2':
resolution: {integrity: sha512-n5lyygj6x1rEi66ZKTxeG1tucDL9Mxf20fuefupoKhhvGR5hssjkxlc44tmFAcCXI8B4koDcUDVSJ5ZRfbUMZg==}
engines: {node: '>=20', pnpm: '>= 8'}
peerDependencies:
svelte: '>=5'
'@dvcol/svelte-utils@1.21.1':
resolution: {integrity: sha512-6o0phiLOZeCKgeRPeI5gfXbw/aLZfwAR6MKNcXVBDVt+84Yy2LJ6kSTAiQyCiAxsc3OGlY3IMylrBXf4Yp6ogw==}
engines: {node: '>=20', pnpm: '>= 8'}
peerDependencies:
svelte: '>=5'
'@emnapi/runtime@1.5.0': '@emnapi/runtime@1.5.0':
resolution: {integrity: sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==} resolution: {integrity: sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==}
@ -5167,6 +5189,10 @@ packages:
engines: {node: '>=14'} engines: {node: '>=14'}
hasBin: true hasBin: true
pretty-bytes@6.1.1:
resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==}
engines: {node: ^14.13.1 || >=16.0.0}
pretty-format@29.7.0: pretty-format@29.7.0:
resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
@ -5674,6 +5700,14 @@ packages:
peerDependencies: peerDependencies:
svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0
svelte-check@4.3.3:
resolution: {integrity: sha512-RYP0bEwenDXzfv0P1sKAwjZSlaRyqBn0Fz1TVni58lqyEiqgwztTpmodJrGzP6ZT2aHl4MbTvWP6gbmQ3FOnBg==}
engines: {node: '>= 18.0.0'}
hasBin: true
peerDependencies:
svelte: ^4.0.0 || ^5.0.0-next.0
typescript: '>=5.0.0'
svelte-heros-v2@0.10.12: svelte-heros-v2@0.10.12:
resolution: {integrity: sha512-0wspy0z9UFS9f/iPKQQ1JDHlNY6e7h+LVW+wJ0qJnuWDpvsJllmoCX2g0frYbMPDWZJEwh2pkO25Dp3lDGCxGQ==} resolution: {integrity: sha512-0wspy0z9UFS9f/iPKQQ1JDHlNY6e7h+LVW+wJ0qJnuWDpvsJllmoCX2g0frYbMPDWZJEwh2pkO25Dp3lDGCxGQ==}
peerDependencies: peerDependencies:
@ -6122,6 +6156,10 @@ packages:
resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==}
hasBin: true hasBin: true
uuid@11.1.0:
resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==}
hasBin: true
uuid@8.3.2: uuid@8.3.2:
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
hasBin: true hasBin: true
@ -7301,6 +7339,22 @@ snapshots:
'@csstools/css-tokenizer@3.0.4': '@csstools/css-tokenizer@3.0.4':
optional: true optional: true
'@dvcol/common-utils@1.34.0':
dependencies:
pretty-bytes: 6.1.1
uuid: 11.1.0
'@dvcol/svelte-simple-router@2.7.2(svelte@5.39.13)':
dependencies:
'@dvcol/common-utils': 1.34.0
'@dvcol/svelte-utils': 1.21.1(svelte@5.39.13)
svelte: 5.39.13
'@dvcol/svelte-utils@1.21.1(svelte@5.39.13)':
dependencies:
'@dvcol/common-utils': 1.34.0
svelte: 5.39.13
'@emnapi/runtime@1.5.0': '@emnapi/runtime@1.5.0':
dependencies: dependencies:
tslib: 2.8.1 tslib: 2.8.1
@ -11589,6 +11643,8 @@ snapshots:
prettier@3.6.2: {} prettier@3.6.2: {}
pretty-bytes@6.1.1: {}
pretty-format@29.7.0: pretty-format@29.7.0:
dependencies: dependencies:
'@jest/schemas': 29.6.3 '@jest/schemas': 29.6.3
@ -12327,6 +12383,18 @@ snapshots:
- stylus - stylus
- sugarss - sugarss
svelte-check@4.3.3(picomatch@4.0.3)(svelte@5.39.13)(typescript@5.6.3):
dependencies:
'@jridgewell/trace-mapping': 0.3.31
chokidar: 4.0.3
fdir: 6.5.0(picomatch@4.0.3)
picocolors: 1.1.1
sade: 1.8.1
svelte: 5.39.13
typescript: 5.6.3
transitivePeerDependencies:
- picomatch
svelte-heros-v2@0.10.12(svelte@3.59.2): svelte-heros-v2@0.10.12(svelte@3.59.2):
dependencies: dependencies:
svelte: 3.59.2 svelte: 3.59.2
@ -12782,6 +12850,8 @@ snapshots:
uuid@10.0.0: {} uuid@10.0.0: {}
uuid@11.1.0: {}
uuid@8.3.2: {} uuid@8.3.2: {}
uuid@9.0.1: {} uuid@9.0.1: {}

Loading…
Cancel
Save