Skip to content

Commit 886dd9f

Browse files
authored
Merge branch 'main' into feat/changelog-1
2 parents ef72002 + 31033e7 commit 886dd9f

File tree

117 files changed

+6152
-3557
lines changed

Some content is hidden

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

117 files changed

+6152
-3557
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ jobs:
154154
run: pnpm build:test
155155
env:
156156
VALIDATE_HTML: true
157-
NODE_OPTIONS: --max-old-space-size=6144
158157

159158
- name: 🖥️ Test project (browser)
160159
run: pnpm test:browser:prebuilt
@@ -183,8 +182,6 @@ jobs:
183182

184183
- name: 🏗️ Build project
185184
run: pnpm build:test
186-
env:
187-
NODE_OPTIONS: --max-old-space-size=6144
188185

189186
- name: ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
190187
run: pnpm test:a11y:prebuilt

.storybook/main.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ const config = {
88
backgrounds: false,
99
},
1010
async viteFinal(config) {
11+
config.plugins ??= []
12+
13+
config.plugins.push({
14+
name: 'ignore-internals',
15+
transform(_, id) {
16+
if (id.includes('/app/pages/blog/') && id.endsWith('.md')) {
17+
return 'export default {}'
18+
}
19+
},
20+
})
1121
// Replace the built-in vue-docgen plugin with a fault-tolerant version.
1222
// vue-docgen-api can crash on components that import types from other
1323
// .vue files (it tries to parse the SFC with @babel/parser as plain TS).

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ The following scripts help manage translation files. `en.json` is the reference
466466
| `pnpm i18n:check:fix [locale]` | Same as check, but adds missing keys to other locales with English placeholders. |
467467
| `pnpm i18n:report` | Audits translation keys against code usage in `.vue` and `.ts` files. Reports missing keys (used in code but not in locale), unused keys (in locale but not in code), and dynamic keys. |
468468
| `pnpm i18n:report:fix` | Removes unused keys from `en.json` and all other locale files. |
469+
| `pnpm i18n:schema` | Generates a JSON Schema from `en.json` at `i18n/schema.json`. Locale files reference this schema for IDE validation and autocompletion. |
469470

470471
### Adding a new locale
471472

app/app.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ if (import.meta.client) {
118118
useEventListener(document, 'click', handleModalLightDismiss)
119119
}
120120
}
121-
122-
// title and description will be inferred
123-
// this will be overridden by upstream pages that use different templates
124-
defineOgImage('Page.takumi')
125121
</script>
126122

127123
<template>
@@ -133,6 +129,10 @@ defineOgImage('Page.takumi')
133129

134130
<AppHeader :show-logo="!isHomepage" />
135131

132+
<NuxtRouteAnnouncer v-slot="{ message }">
133+
{{ route.name === 'search' ? `${$t('search.title_packages')} - npmx` : message }}
134+
</NuxtRouteAnnouncer>
135+
136136
<div id="main-content" class="flex-1 flex flex-col" tabindex="-1">
137137
<NuxtPage />
138138
</div>

app/assets/logos/sponsors/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const SPONSORS = [
3737
dark: LogoVlt,
3838
light: LogoVltLight,
3939
},
40-
normalisingIndent: '0.25rem',
40+
normalisingIndent: '0.875rem',
4141
url: 'https://vlt.sh/',
4242
},
4343
]
Lines changed: 12 additions & 1 deletion
Loading

app/assets/logos/sponsors/vlt.svg

Lines changed: 12 additions & 1 deletion
Loading

app/components/AppFooter.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ const closeModal = () => modalRef.value?.close?.()
2525
<LinkBase :to="{ name: 'about' }">
2626
{{ $t('footer.about') }}
2727
</LinkBase>
28+
<LinkBase :to="{ name: 'blog' }">
29+
{{ $t('footer.blog') }}
30+
</LinkBase>
2831
<LinkBase :to="{ name: 'privacy' }">
2932
{{ $t('privacy_policy.title') }}
3033
</LinkBase>

app/components/AppHeader.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ const mobileLinks = computed<NavigationConfigWithGroups>(() => [
5959
external: false,
6060
iconClass: 'i-lucide:info',
6161
},
62+
{
63+
name: 'Blog',
64+
label: $t('footer.blog'),
65+
to: { name: 'blog' },
66+
type: 'link',
67+
external: false,
68+
iconClass: 'i-lucide:notebook-pen',
69+
},
6270
{
6371
name: 'Privacy Policy',
6472
label: $t('privacy_policy.title'),

app/components/AuthorAvatar.vue

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<script setup lang="ts">
2+
import type { ResolvedAuthor } from '#shared/schemas/blog'
3+
4+
const props = defineProps<{
5+
author: Partial<ResolvedAuthor> & Pick<ResolvedAuthor, 'name' | 'avatar'>
6+
size?: 'sm' | 'md' | 'lg'
7+
}>()
8+
9+
const sizeClasses = computed(() => {
10+
switch (props.size ?? 'md') {
11+
case 'sm':
12+
return 'w-8 h-8 text-sm'
13+
case 'lg':
14+
return 'w-12 h-12 text-xl'
15+
default:
16+
return 'w-10 h-10 text-lg'
17+
}
18+
})
19+
20+
const initials = computed(() =>
21+
props.author.name
22+
.split(' ')
23+
.map(n => n[0])
24+
.join('')
25+
.toUpperCase()
26+
.slice(0, 2),
27+
)
28+
</script>
29+
30+
<template>
31+
<div
32+
class="shrink-0 flex items-center justify-center border border-border rounded-full bg-bg-muted overflow-hidden"
33+
:class="[sizeClasses]"
34+
>
35+
<img
36+
v-if="author.avatar"
37+
:src="author.avatar"
38+
:alt="author.name"
39+
class="w-full h-full object-cover"
40+
/>
41+
<span v-else class="text-fg-subtle font-mono" aria-hidden="true">
42+
{{ initials }}
43+
</span>
44+
</div>
45+
</template>

0 commit comments

Comments
 (0)