Skip to content

Commit 74a7bd0

Browse files
authored
Merge branch 'main' into elysia-autoroutes
2 parents 49a44ff + 906a3be commit 74a7bd0

Some content is hidden

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

97 files changed

+2050
-165
lines changed

bun.lockb

45.5 KB
Binary file not shown.

components/blog/Landing.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Latest Updates
77
</h1>
88
<p class="text-gray-500 dark:text-gray-300 text-lg">
9-
Update of Elysia.js from core maintainers
9+
Update of ElysiaJS from core maintainers
1010
</p>
1111
</header>
1212
<main class="flex flex-col max-w-xl gap-4 w-full mx-auto my-8">

components/landing/build-with-love.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<footer
3-
className="flex flex-col justify-center items-center gap-4 text-sm text-gray-400 dark:text-gray-400"
3+
class="flex flex-col justify-center items-center gap-4 text-sm text-gray-400 dark:text-gray-400"
44
>
55
<p>
66
Build with 💖 dear
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<template>
2+
<article
3+
class="flex flex-col justify-between items-center w-full max-w-6xl mx-auto my-8 gap-12"
4+
>
5+
<section class="flex flex-col w-full">
6+
<header class="flex flex-col justify-center items-start">
7+
<h2
8+
class="text-6xl md:text-7xl md:leading-tight font-bold text-transparent bg-clip-text bg-gradient-to-br from-lime-300 to-cyan-300"
9+
>
10+
It's easy
11+
</h2>
12+
<h2
13+
class="text-3xl leading-tight font-medium text-gray-400 mt-2 mb-8"
14+
>
15+
From beginner to pro
16+
</h2>
17+
</header>
18+
<p class="text-xl text-gray-400 w-full max-w-lg mb-4">
19+
If you found yourself writing code for the framework, then
20+
there's something wrong with the framework.
21+
</p>
22+
<div class="flex flex-col md:flex-row gap-6 md:gap-8">
23+
<p class="text-xl text-gray-400 w-full max-w-lg">
24+
That's why Elysia invest times to experiment with design
25+
decision to craft the most ergonomic way possible for
26+
everyone
27+
</p>
28+
<p class="text-xl text-gray-400 w-full max-w-lg">
29+
From built-in strict-type validaiton to unified types
30+
system, and documentation generation, making an ideal
31+
framework for building server with TypeScript.
32+
</p>
33+
</div>
34+
</section>
35+
</article>
36+
</template>

components/midori/build-with-love.vue

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<template>
2+
<footer
3+
class="flex flex-col justify-center items-center gap-4 text-sm text-gray-400 dark:text-gray-400 mt-8 mb-4"
4+
>
5+
<p>
6+
Build with 💖 dear
7+
<button
8+
class="appearance-none text-pink-500 text-sm px-1 py-0.5 rounded hover:bg-pink-500/10 focus:bg-pink-500/15 transition-colors"
9+
@click="isToggle = !isToggle"
10+
>
11+
Elysia
12+
</button>
13+
</p>
14+
<figure
15+
class="overflow-hidden -collpasable"
16+
style="width: 144px"
17+
:style="isToggle ? 'height: 183px' : 'height: 0px'"
18+
>
19+
<a
20+
v-if="isToggle"
21+
href="https://youtu.be/k-K28-A4fBc"
22+
target="_blank"
23+
>
24+
<video muted autoplay loop>
25+
<source src="/assets/elysia.mp4" />
26+
</video>
27+
</a>
28+
</figure>
29+
</footer>
30+
</template>
31+
32+
<script lang="ts" setup>
33+
import { ref } from 'vue'
34+
35+
const isToggle = ref(false)
36+
</script>
37+
38+
<style>
39+
.-collpasable {
40+
transition: height 0.375s cubic-bezier(0.16, 1, 0.3, 1);
41+
}
42+
</style>

components/midori/community.vue

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<template>
2+
<article
3+
class="flex justify-between flex-col lg:flex-row-reverse items-center w-full max-w-6xl mx-auto my-8 gap-12"
4+
>
5+
<section class="flex flex-col w-full max-w-lg">
6+
<header class="flex flex-col justify-center items-start">
7+
<h2
8+
class="text-3xl leading-tight font-medium text-gray-400 mb-2"
9+
>
10+
Still have question?
11+
</h2>
12+
<h2
13+
class="text-5xl leading-tight font-semibold text-gray-400 mb-4 bg-clip-text text-transparent bg-gradient-to-tl from-fuchsia-500 to-blue-500"
14+
>
15+
Join the community
16+
</h2>
17+
</header>
18+
<p class="text-xl text-gray-400 w-full max-w-lg mb-4">
19+
Elysia is one of the biggest community base for Bun first web framework.
20+
</p>
21+
<p class="text-xl text-gray-400 w-full max-w-lg">
22+
You can ask your questions / propose a new feature / file a bug with our community and mainter.
23+
</p>
24+
</section>
25+
<section class="flex flex-col w-full max-w-xl rounded-lg overflow-hidden">
26+
<iframe
27+
class="w-full h-64"
28+
src="https://discord.com/widget?id=1044804142461362206&theme=dark"
29+
allowtransparency="true"
30+
frameborder="0"
31+
sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
32+
/>
33+
</section>
34+
</article>
35+
</template>

components/midori/e2e-type-safety.vue

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<script setup lang="ts">
2+
import Prism from 'vue-prism-component'
3+
4+
const server = `// server.ts
5+
import { Elysia, t } from 'elysia'
6+
7+
const app = new Elysia()
8+
.patch(
9+
'/user/age',
10+
({ body }) => signIn(body),
11+
{
12+
body: t.Object({
13+
name: t.String(),
14+
age: t.Number()
15+
})
16+
}
17+
)
18+
.listen(80)
19+
20+
export type App = typeof app`
21+
22+
const client = `// client.ts
23+
import { edenTreaty } from '@elysiajs/eden'
24+
import type { App } from 'server'
25+
26+
const eden = edenTreaty<App>('http://localhost')
27+
28+
await eden.user.age.patch({
29+
name: 'saltyaom',
30+
age: '21'
31+
})`
32+
</script>
33+
34+
<template>
35+
<section
36+
class="flex flex-col justify-center items-center w-full max-w-6xl mx-auto"
37+
>
38+
<h3 class="text-2xl mr-auto md:mx-auto font-medium text-gray-400">
39+
Introducing
40+
</h3>
41+
<h2
42+
class="text-5xl md:text-6xl font-bold !leading-tight text-transparent bg-clip-text bg-gradient-to-r from-sky-300 to-indigo-400 mt-2 mb-4"
43+
>
44+
End–to-End Type Safety
45+
</h2>
46+
47+
<p
48+
class="text-2xl leading-relaxed text-gray-400 text-left md:text-center w-full max-w-2xl"
49+
>
50+
Synchornize types across all applications.
51+
<br />
52+
Move fast and break nothing like tRPC.
53+
</p>
54+
55+
<section
56+
class="flex flex-col lg:flex-row gap-8 w-full max-w-5xl my-8"
57+
>
58+
<div class="w-full">
59+
<Prism
60+
class="!text-base !font-mono rounded-xl"
61+
language="typescript"
62+
>
63+
{{ server }}
64+
</Prism>
65+
</div>
66+
<div class="relative w-full">
67+
<Prism
68+
class="!text-base !font-mono rounded-xl"
69+
language="typescript"
70+
>
71+
{{ client }}
72+
</Prism>
73+
<div
74+
class="absolute p-1 rounded bg-red-400/25"
75+
style="
76+
top: 13.5em;
77+
left: 6.375em;
78+
width: 2.5em;
79+
height: 1.375em;
80+
"
81+
/>
82+
<p
83+
class="absolute px-3 py-1.5 rounded bg-white dark:bg-gray-700 border dark:border-gray-600"
84+
style="top: 15.25em; left: 3.25em"
85+
>
86+
Type 'string' is not assignable to type 'number'
87+
</p>
88+
</div>
89+
</section>
90+
</section>
91+
</template>

0 commit comments

Comments
 (0)