Skip to content

Commit b35da4b

Browse files
authored
Merge branch 'main' into patch-4
2 parents 2db89d1 + 734378d commit b35da4b

File tree

115 files changed

+4572
-1421
lines changed

Some content is hidden

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

115 files changed

+4572
-1421
lines changed

bun.lockb

100644100755
62.7 KB
Binary file not shown.

components/blog/Landing.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<template>
2-
<Ray class="h-[40vh] -top-20 left-0 z-[100] opacity-30 dark:opacity-[.55] pointer-events-none" static />
2+
<Ray class="h-[30vh] -top-16 -inset-0 left-0 opacity-30 dark:opacity-[.55] pointer-events-none" />
33
<header class="flex flex-col justify-center items-center max-w-3xl gap-3 w-full mx-auto pt-20 pb-4">
4-
<h1 class="text-2xl md:text-3xl text-gray-700 dark:text-gray-100 font-semibold">
4+
<h1 class="text-2xl md:text-3xl text-slate-700 dark:text-slate-100 font-semibold">
55
Latest Updates
66
</h1>
7-
<p class="text-gray-500 dark:text-gray-300 text-lg">
7+
<p class="text-slate-500 dark:text-slate-300 text-lg">
88
Update of ElysiaJS from core maintainers
99
</p>
1010
</header>
1111
<main class="flex flex-col max-w-xl gap-4 w-full mx-auto my-8">
1212
<a v-for="blog in props.blogs"
13-
class="px-4 py-2 rounded-lg hover:bg-gray-50 focus:bg-gray-50 dark:hover:bg-gray-700 dark:focus:bg-gray-700 transition-colors cursor-pointer"
13+
class="px-4 py-2 rounded-lg hover:bg-slate-100/75 focus:bg-slate-100/75 dark:hover:bg-slate-800 dark:focus:bg-slate-800 transition-colors cursor-pointer"
1414
:href="blog.href">
1515
<article class="flex flex-col gap-2">
16-
<h2 class="text-xl font-semibold text-gray-700 dark:text-gray-100">
16+
<h2 class="text-xl font-semibold text-slate-700 dark:text-slate-100">
1717
{{ blog.title }}
1818
</h2>
19-
<p class="text-gray-500 dark:text-gray-300">{{ blog.detail }}</p>
19+
<p class="text-slate-500 dark:text-slate-300">{{ blog.detail }}</p>
2020
</article>
2121
</a>
2222
</main>

components/blog/Layout.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h1 class="!text-3xl !md:text-4xl font-medium">
44
{{ props.title }}
55
</h1>
6-
<!-- <aside class="flex gap-3 items-center mt-4">
6+
<aside class="flex gap-3 items-center mt-4">
77
<img
88
class="w-9 h-9 rounded-full"
99
:src="profile"
@@ -19,8 +19,8 @@
1919
<a :href="twitter" target="_blank">@{{ author.twitter }}</a>
2020
</p>
2121
</div>
22-
</aside> -->
23-
<img :src="props.src" :alt="props.alt" class="w-full my-6" :class="props.shadow ? 'shadow-xl' : 'border'" />
22+
</aside>
23+
<img :src="props.src" :alt="props.alt" class="w-full mt-6 mb-2" :class="props.shadow ? 'shadow-xl' : 'border'" />
2424
<main id="blog-content">
2525
<slot />
2626
</main>
@@ -57,8 +57,6 @@ const twitter = `https://twitter.com/${author.twitter}`
5757
const mutated = ['.aside', '.content', '.content-container', '.VPDocFooter']
5858
onMounted(() => {
5959
mutated.forEach((selector) => {
60-
console.log(document.querySelector(selector))
61-
6260
document.querySelector(selector)?.classList.add('blog')
6361
})
6462
})

components/midori/community.vue

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1+
<script setup lang="ts">
2+
import useDark from './use-dark'
3+
4+
const isDark = useDark()
5+
</script>
6+
17
<template>
28
<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-
>
9+
class="flex justify-between flex-col lg:flex-row-reverse items-center w-full max-w-6xl mx-auto my-8 gap-12">
510
<section class="flex flex-col w-full max-w-lg">
611
<header class="flex flex-col justify-center items-start">
7-
<h2
8-
class="text-2xl md:text-3xl leading-tight font-medium text-gray-400 mb-2"
9-
>
12+
<h2 class="text-2xl md:text-3xl leading-tight font-medium text-gray-400 mb-2">
1013
Can't find what you're looking for?
1114
</h2>
1215
<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-
>
16+
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">
1517
Join the community
1618
</h2>
1719
</header>
@@ -23,13 +25,12 @@
2325
</p>
2426
</section>
2527
<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-
/>
28+
<iframe class="w-full h-64"
29+
:src="'https://discord.com/widget?id=1044804142461362206&theme=' + (isDark ? 'dark' : 'light')"
30+
allowtransparency="true"
31+
frameborder="0"
32+
loading="lazy"
33+
sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts" />
3334
</section>
3435
</article>
3536
</template>

components/midori/e2e-type-safety.vue

+10-6
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,31 @@
1414
Move fast and break nothing like tRPC.
1515
</p>
1616

17-
<a class="text-lg font-medium bg-blue-50 text-blue-500 dark:text-blue-400 dark:bg-blue-500/20 mr-auto md:mx-auto px-4 py-2 rounded-xl mt-6"
17+
<p class="text-lg font-medium bg-green-100/50 text-green-500 dark:text-green-400 dark:bg-green-500/20 mr-auto md:mx-auto px-4 py-2 rounded-xl mt-6">
18+
Hover code below to see type definition
19+
</p>
20+
21+
<!-- <a class="text-lg font-medium bg-blue-50 text-blue-500 dark:text-blue-400 dark:bg-blue-500/20 mr-auto md:mx-auto px-4 py-2 rounded-xl mt-6"
1822
href="/eden/overview">
1923
See how it works
20-
</a>
24+
</a> -->
2125

2226
<section class="flex flex-col lg:flex-row gap-8 w-full max-w-5xl my-8">
2327
<div class="w-full !text-base !font-mono rounded-xl">
2428
<slot name="server"></slot>
2529
</div>
2630
<div class="relative w-full !text-base !font-mono rounded-xl">
2731
<slot name="client"></slot>
28-
<div class="absolute p-1 rounded bg-red-400/25" style="
29-
top: 13.2em;
30-
left: 5.9em;
32+
<!-- <div class="absolute p-1 rounded bg-red-400/25" style="
33+
top: 13.1em;
34+
left: 6.5em;
3135
width: 2.2em;
3236
height: 1.375em;
3337
" />
3438
<p class="absolute px-3 py-1.5 rounded bg-white dark:bg-gray-700 border dark:border-gray-600"
3539
style="top: 15.25em; left: 3.25em">
3640
Type 'string' is not assignable to type 'number'
37-
</p>
41+
</p> -->
3842
</div>
3943
</section>
4044
</section>

components/midori/editor.vue

+21-20
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ function saveCaretPosition(context) {
4242
}
4343
}
4444
45-
function nextCaretPosition(context) {
46-
const selection = window.getSelection()
47-
const range = selection.getRangeAt(0)
48-
range.setStart(context, 0)
49-
const len = range.toString().length
50-
51-
return function restore() {
52-
const pos = getTextNodeAtPosition(context, len)
53-
selection.removeAllRanges()
54-
55-
const range = new Range()
56-
range.setStart(pos.node, pos.position)
57-
selection.addRange(range)
58-
}
59-
}
45+
// function nextCaretPosition(context) {
46+
// const selection = window.getSelection()
47+
// const range = selection.getRangeAt(0)
48+
// range.setStart(context, 0)
49+
// const len = range.toString().length
50+
51+
// return function restore() {
52+
// const pos = getTextNodeAtPosition(context, len)
53+
// selection.removeAllRanges()
54+
55+
// const range = new Range()
56+
// range.setStart(pos.node, pos.position)
57+
// selection.addRange(range)
58+
// }
59+
// }
6060
6161
function getTextNodeAtPosition(root, index) {
6262
const NODE_TYPE = NodeFilter.SHOW_TEXT
@@ -113,12 +113,12 @@ const execute = async () => {
113113
})
114114
}
115115
116-
watch(isDark, (isDark) => {
116+
watch(isDark, (value) => {
117117
const editor = document.querySelector<HTMLElement>('pre.elysia-editor');
118118
119119
editor.innerHTML = highlighter.codeToHtml(
120120
editor.innerText, {
121-
theme: isDark ? 'github-dark' : 'github-light',
121+
theme: value ? 'github-dark' : 'github-light',
122122
lang: 'javascript',
123123
})
124124
})
@@ -127,7 +127,7 @@ onMounted(() => {
127127
const editor = document.querySelector<HTMLElement>('pre.elysia-editor')
128128
129129
editor.innerHTML = highlighter.codeToHtml(code, {
130-
theme: isDark ? 'github-dark' : 'github-light',
130+
theme: isDark.value ? 'github-dark' : 'github-light',
131131
lang: 'javascript',
132132
})
133133
@@ -136,7 +136,7 @@ onMounted(() => {
136136
137137
editor.innerHTML = highlighter.codeToHtml(
138138
event.currentTarget.innerText, {
139-
theme: isDark ? 'github-dark' : 'github-light',
139+
theme: isDark.value ? 'github-dark' : 'github-light',
140140
lang: 'javascript',
141141
})
142142
@@ -194,7 +194,8 @@ onMounted(() => {
194194
</p>
195195

196196
<aside class="flex flex-col md:flex-row justify-center items-center w-full max-w-6xl gap-8 my-8">
197-
<section class="flex flex-col w-full h-96 border dark:border-slate-700 bg-white dark:bg-slate-800 rounded-2xl">
197+
<section
198+
class="flex flex-col w-full h-96 border dark:border-slate-700 bg-white dark:bg-slate-800 rounded-2xl">
198199
<div class="mockup-window flex relative w-full h-full shadow-xl">
199200
<pre class="elysia-editor block !bg-transparent !text-base !font-mono rounded-xl w-full max-w-xl h-full !pt-0 !px-2 outline-none"
200201
contenteditable="true">

components/midori/fast.vue

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ const scalePadding = (value: number) =>
88
const format = new Intl.NumberFormat().format
99
1010
const graphs = [
11-
['Warp', 'Rust', 1_439_141],
1211
['Swoole', 'PHP', 1_035_418],
13-
['Echo', 'Go', 684_368],
1412
['Gin', 'Go', 676_019],
15-
['Chi', 'Go', 609_492],
13+
['Spring', 'Java', 506_087],
1614
['FastAPI', 'PyPy', 448_130],
1715
['Fastify', 'Node', 415_600],
18-
['Express', 'Node', 113_117]
16+
['Express', 'Node', 113_117],
17+
['Nest', 'Node', 105_064]
1918
] as const
2019
</script>
2120

0 commit comments

Comments
 (0)