Skip to content

Commit 47ffeb3

Browse files
committed
Merge branch 'main' into feat/org-packages-fancy
2 parents 0e8473e + f0cf42e commit 47ffeb3

101 files changed

Lines changed: 9897 additions & 514 deletions

File tree

Some content is hidden

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

.github/workflows/autofix.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
- name: 📦 Install browsers
3131
run: pnpm playwright install
3232

33+
- name: 🌍 Update lunaria data
34+
run: pnpm build:lunaria
35+
3336
- name: 🔠 Fix lint errors
3437
run: pnpm lint:fix
3538

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,20 @@ jobs:
9898
run: ./scripts/lighthouse-a11y.sh
9999
env:
100100
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
101+
102+
knip:
103+
runs-on: ubuntu-latest
104+
105+
steps:
106+
- uses: actions/checkout@v6
107+
- run: corepack enable
108+
- uses: actions/setup-node@v6
109+
with:
110+
node-version: lts/*
111+
cache: pnpm
112+
113+
- name: 📦 Install dependencies
114+
run: pnpm install
115+
116+
- name: 🔍 Check for unused code
117+
run: pnpm knip:production

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,13 @@ If you're building something cool, let us know! 🙏
159159
Made with ❤️
160160

161161
Published under [MIT License](./LICENSE).
162+
163+
## Star History
164+
165+
<a href="https://www.star-history.com/#npmx-dev/npmx.dev&type=date&legend=top-left">
166+
<picture>
167+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=npmx-dev/npmx.dev&type=date&theme=dark&legend=top-left" />
168+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=npmx-dev/npmx.dev&type=date&legend=top-left" />
169+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=npmx-dev/npmx.dev&type=date&legend=top-left" />
170+
</picture>
171+
</a>

app/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if (import.meta.client) {
5050

5151
<template>
5252
<div class="min-h-screen flex flex-col bg-bg text-fg">
53-
<a href="#main-content" class="skip-link font-mono">Skip to main content</a>
53+
<a href="#main-content" class="skip-link font-mono">{{ $t('common.skip_link') }}</a>
5454

5555
<AppHeader :show-logo="!isHomepage" />
5656

app/components/AccentColorPicker.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { accentColors, selectedAccentColor, setAccentColor } = useAccentColor()
55
</script>
66

77
<template>
8-
<div role="listbox" aria-label="Accent colors" class="flex items-center gap-4">
8+
<div role="listbox" :aria-label="$t('settings.accent_colors')" class="flex items-center gap-4">
99
<button
1010
v-for="color in accentColors"
1111
:key="color.id"
@@ -19,7 +19,7 @@ const { accentColors, selectedAccentColor, setAccentColor } = useAccentColor()
1919
/>
2020
<button
2121
type="button"
22-
aria-label="Clear accent color"
22+
:aria-label="$t('settings.clear_accent')"
2323
class="size-6 rounded-full transition-transform duration-150 motion-safe:hover:scale-110 focus-ring flex items-center justify-center bg-accent-fallback"
2424
@click="setAccentColor(null)"
2525
>

app/components/AppFooter.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<footer class="border-t border-border mt-auto" aria-label="Site footer">
2+
<footer class="border-t border-border mt-auto" :aria-label="$t('footer.site_footer')">
33
<div class="container py-3 sm:py-8 flex flex-col gap-2 sm:gap-4 text-fg-subtle text-sm">
44
<div class="flex flex-col sm:flex-row items-center justify-between gap-2 sm:gap-4">
55
<p class="font-mono m-0 hidden sm:block">{{ $t('tagline') }}</p>

app/components/AppHeader.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script setup lang="ts">
2+
import { debounce } from 'perfect-debounce'
3+
24
withDefaults(
35
defineProps<{
46
showLogo?: boolean
@@ -22,13 +24,17 @@ const showSearchBar = computed(() => {
2224
return route.name !== 'search' && route.name !== 'index'
2325
})
2426
25-
async function handleSearchInput() {
27+
const debouncedNavigate = debounce(async () => {
2628
const query = searchQuery.value.trim()
2729
await router.push({
2830
name: 'search',
2931
query: query ? { q: query } : undefined,
3032
})
3133
searchQuery.value = ''
34+
}, 100)
35+
36+
async function handleSearchInput() {
37+
debouncedNavigate()
3238
}
3339
3440
onKeyStroke(',', e => {
@@ -45,10 +51,10 @@ onKeyStroke(',', e => {
4551

4652
<template>
4753
<header
48-
aria-label="Site header"
54+
:aria-label="$t('header.site_header')"
4955
class="sticky top-0 z-50 bg-bg/80 backdrop-blur-md border-b border-border"
5056
>
51-
<nav aria-label="Main navigation" class="container h-14 flex items-center">
57+
<nav :aria-label="$t('nav.main_navigation')" class="container h-14 flex items-center">
5258
<!-- Left: Logo -->
5359
<div class="flex-shrink-0">
5460
<NuxtLink
@@ -94,7 +100,6 @@ onKeyStroke(',', e => {
94100
:placeholder="$t('search.placeholder')"
95101
v-bind="noCorrect"
96102
class="w-full bg-bg-subtle border border-border rounded-md pl-7 pr-3 py-1.5 font-mono text-sm text-fg placeholder:text-fg-subtle transition-border-color duration-300 motion-reduce:transition-none focus:border-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50"
97-
autocomplete="off"
98103
@input="handleSearchInput"
99104
@focus="isSearchFocused = true"
100105
@blur="isSearchFocused = false"

app/components/ChartModal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function handleKeydown(event: KeyboardEvent) {
2929
<button
3030
type="button"
3131
class="absolute inset-0 bg-black/60 cursor-default"
32-
aria-label="Close modal"
32+
:aria-label="$t('common.close_modal')"
3333
@click="open = false"
3434
/>
3535

@@ -47,7 +47,7 @@ function handleKeydown(event: KeyboardEvent) {
4747
<button
4848
type="button"
4949
class="text-fg-subtle hover:text-fg transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50 rounded"
50-
aria-label="Close"
50+
:aria-label="$t('common.close')"
5151
@click="open = false"
5252
>
5353
<span class="i-carbon-close block w-5 h-5" aria-hidden="true" />

app/components/CodeMobileTreeDrawer.vue

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,9 @@ watch(
1818
},
1919
)
2020
21+
const isLocked = useScrollLock(document)
2122
// Prevent body scroll when drawer is open
22-
watch(isOpen, open => {
23-
if (open) {
24-
document.body.style.overflow = 'hidden'
25-
} else {
26-
document.body.style.overflow = ''
27-
}
28-
})
29-
30-
// Cleanup on unmount
31-
onUnmounted(() => {
32-
document.body.style.overflow = ''
33-
})
23+
watch(isOpen, open => (isLocked.value = open))
3424
</script>
3525

3626
<template>

app/components/ConnectorModal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ watch(open, isOpen => {
159159
name="connector-token"
160160
:placeholder="$t('connector.modal.token_placeholder')"
161161
v-bind="noCorrect"
162-
class="w-full px-3 py-2 font-mono text-sm bg-bg-subtle border border-border rounded-md text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
162+
class="w-full px-3 py-2 font-mono text-sm bg-bg-subtle border border-border rounded-md text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50"
163163
/>
164164
</div>
165165

@@ -183,7 +183,7 @@ watch(open, isOpen => {
183183
name="connector-port"
184184
inputmode="numeric"
185185
autocomplete="off"
186-
class="w-full px-3 py-2 font-mono text-sm bg-bg-subtle border border-border rounded-md text-fg transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
186+
class="w-full px-3 py-2 font-mono text-sm bg-bg-subtle border border-border rounded-md text-fg transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50"
187187
/>
188188
</div>
189189
</details>

0 commit comments

Comments
 (0)