This commit is contained in:
Max Richter
2025-09-25 16:41:26 +02:00
parent 3f0d25f935
commit b13d5015f4
75 changed files with 3881 additions and 141 deletions

View File

@@ -0,0 +1,12 @@
<script lang="ts">
import '../app.css';
import favicon from '$lib/assets/favicon.svg';
let { children } = $props();
</script>
<svelte:head>
<link rel="icon" href={favicon} />
</svelte:head>
{@render children?.()}

View File

@@ -0,0 +1,33 @@
<script lang="ts">
import Header from '$lib/components/Header.svelte';
import Playground from '$lib/components/Playground.svelte';
import StatusBar from '$lib/components/StatusBar.svelte';
</script>
<div class="bg-background text-foreground flex min-h-screen flex-col">
<Header />
<Playground />
<StatusBar />
</div>
<style>
:global(body) {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: white;
}
:global(*) {
box-sizing: border-box;
}
:global(textarea:focus) {
outline: none;
}
:global(pre) {
margin: 0;
font-family:
'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}
</style>

View File

@@ -0,0 +1,47 @@
<script lang="ts">
import {onMount} from 'svelte';
const test = `---
_type: Recipe
author.name: Max Richter
---
# Baguette
My favourite baguette recipe
## Ingredients
- Flour
- Water
- Salt
## Steps
1. Mix Flour Water and Salt
2. Bake the bread
`
function exec(){
let start = performance.now();
const res = markaParseFile(test);
let end = performance.now();
console.log(JSON.parse(res))
start = performance.now();
const res2 = markaMatchBlocks(test);
end = performance.now();
console.log(JSON.parse(res2))
}
onMount(async () => {
const go = new Go();
WebAssembly.instantiateStreaming(fetch("/main.wasm"), go.importObject).then((result) => {
go.run(result.instance);
});
});
</script>
<button onclick={exec}>test</button>