Skip to content

Commit 167fa90

Browse files
committed
Merge branch 'main' into sb-design-guidelines
2 parents 15dee0a + d3f60cb commit 167fa90

File tree

120 files changed

+8311
-1884
lines changed

Some content is hidden

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

120 files changed

+8311
-1884
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ jobs:
111111
run: pnpm vp test --project nuxt --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
112112

113113
- name: ⬆︎ Upload coverage reports to Codecov
114-
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
114+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
115115
with:
116116
report_type: test_results
117117
env:
118118
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
119119

120120
- name: ⬆︎ Upload coverage reports to Codecov
121-
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
121+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
122122
env:
123123
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
124124

.github/workflows/welcome-open.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
steps:
1717
- uses: zephyrproject-rtos/action-first-interaction@58853996b1ac504b8e0f6964301f369d2bb22e5c
1818
with:
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
1920
pr-opened-message: |
2021
Hello! Thank you for opening your **first PR** to npmx, @${{ github.event.pull_request.user.login }}! 🚀
2122

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const config = {
99
'storybook-i18n',
1010
],
1111
framework: '@storybook-vue/nuxt',
12-
staticDirs: ['./.public'],
12+
staticDirs: ['./.public', { from: '../public', to: '/' }],
1313
features: {
1414
backgrounds: false,
1515
},

.storybook/preview-head.html

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,61 @@
11
<style>
2+
/* Load Geist fonts to match the production app (normally handled by @nuxt/fonts,
3+
which is disabled in Storybook at this time) */
4+
@font-face {
5+
font-family: 'Geist';
6+
font-weight: 400;
7+
font-style: normal;
8+
font-display: swap;
9+
src: url('/fonts/Geist-Regular.ttf') format('truetype');
10+
}
11+
@font-face {
12+
font-family: 'Geist';
13+
font-weight: 500;
14+
font-style: normal;
15+
font-display: swap;
16+
src: url('/fonts/Geist-Medium.ttf') format('truetype');
17+
}
18+
@font-face {
19+
font-family: 'Geist';
20+
font-weight: 600;
21+
font-style: normal;
22+
font-display: swap;
23+
src: url('/fonts/Geist-SemiBold.ttf') format('truetype');
24+
}
25+
@font-face {
26+
font-family: 'Geist';
27+
font-weight: 700;
28+
font-style: normal;
29+
font-display: swap;
30+
src: url('/fonts/Geist-Bold.ttf') format('truetype');
31+
}
32+
@font-face {
33+
font-family: 'Geist Mono';
34+
font-weight: 400;
35+
font-style: normal;
36+
font-display: swap;
37+
src: url('/fonts/GeistMono-Regular.ttf') format('truetype');
38+
}
39+
@font-face {
40+
font-family: 'Geist Mono';
41+
font-weight: 500;
42+
font-style: normal;
43+
font-display: swap;
44+
src: url('/fonts/GeistMono-Medium.ttf') format('truetype');
45+
}
46+
@font-face {
47+
font-family: 'Geist Mono';
48+
font-weight: 700;
49+
font-style: normal;
50+
font-display: swap;
51+
src: url('/fonts/GeistMono-Bold.ttf') format('truetype');
52+
}
53+
html {
54+
-webkit-font-smoothing: antialiased;
55+
-moz-osx-font-smoothing: grayscale;
56+
text-rendering: optimizeLegibility;
57+
}
58+
259
/* Override docs story canvas background to match npmx theme */
360
.docs-story {
461
background-color: var(--bg, oklch(0.171 0 0)) !important;

CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pnpm npmx-connector # Start the real connector (requires npm login)
119119
pnpm mock-connector # Start the mock connector (no npm login needed)
120120

121121
# Code Quality
122-
pnpm lint # Run linter (oxlint + oxfmt)
122+
pnpm vp run lint # Run linter (oxlint + oxfmt)
123123
pnpm lint:fix # Auto-fix lint issues
124124
pnpm test:types # TypeScript type checking
125125

@@ -460,13 +460,13 @@ npmx.dev uses [@nuxtjs/i18n](https://i18n.nuxtjs.org/) for internationalization.
460460

461461
The following scripts help manage translation files. `en.json` is the reference locale.
462462

463-
| Command | Description |
464-
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
465-
| `pnpm i18n:check [locale]` | Compares `en.json` with other locale files. Shows missing and extra keys. Optionally filter output by locale (e.g. `pnpm i18n:check ja-JP`). |
466-
| `pnpm i18n:check:fix [locale]` | Same as check, but adds missing keys to other locales with English placeholders. |
467-
| `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. |
468-
| `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. |
463+
| Command | Description |
464+
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
465+
| `pnpm i18n:check:fix [locale]` | Compares `en.json` with other locale files and adds missing keys with English placeholders. Optionally filter output by locale (e.g. `pnpm i18n:check:fix ja-JP`). |
466+
| `pnpm i18n:report:fix` | Removes unused keys from `en.json` and all other locale files. |
467+
| `pnpm vp run i18n:check [locale]` | Same as check:fix, but only show missing and extra keys. |
468+
| `pnpm vp run 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. |
469+
| `pnpm vp run i18n:schema` | Generates a JSON Schema from `en.json` at `i18n/schema.json`. Locale files reference this schema for IDE validation and autocompletion. |
470470

471471
### Adding a new locale
472472

@@ -502,7 +502,7 @@ Check [Pluralization rule callback](https://vue-i18n.intlify.dev/guide/essential
502502
We track the current progress of translations with [Lunaria](https://lunaria.dev/) on this site: https://i18n.npmx.dev/
503503
If you see any outdated translations in your language, feel free to update the keys to match the English version.
504504

505-
Use `pnpm i18n:check` and `pnpm i18n:check:fix` to verify and fix your locale (see [i18n commands](#i18n-commands) above for details).
505+
Use `pnpm i18n:check:fix` to fix your locale (see [i18n commands](#i18n-commands) above for details).
506506

507507
#### Country variants (advanced)
508508

@@ -590,7 +590,7 @@ See how `es`, `es-ES`, and `es-419` are configured in [config/i18n.ts](./config/
590590
- Use `common.*` for shared strings (loading, retry, close, etc.)
591591
- Use component-specific prefixes: `package.card.*`, `settings.*`, `nav.*`
592592
- Do not use dashes (`-`) in translation keys; always use underscore (`_`): e.g., `privacy_policy` instead of `privacy-policy`
593-
- **Always use static string literals as translation keys.** Our i18n scripts (`pnpm i18n:report`) rely on static analysis to detect unused and missing keys. Dynamic keys cannot be analyzed and will be flagged as errors.
593+
- **Always use static string literals as translation keys.** Our i18n scripts (`pnpm i18n:report:fix`) rely on static analysis to detect unused and missing keys. Dynamic keys cannot be analyzed and will be flagged as errors.
594594

595595
**Bad:**
596596

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ npmx.dev supports npm permalinks &ndash; just replace `npmjs.com` with `npmx.dev
114114
| `npmjs.com/org/nuxt` | [`npmx.dev/org/nuxt`](https://npmx.dev/org/nuxt) |
115115

116116
> [!TIP]
117-
> Want automatic redirects? Try the [npmx-replace browser extension](https://github.com/tylersayshi/npmx-replace-extension) (Chrome only for now) or the separate [npmx-redirect extension](https://github.com/iaverages/npmx-redirect) for [Chrome](https://chromewebstore.google.com/detail/lbhjgfgpnlihfmobnohoipeljollhlnb) / [Firefox](https://addons.mozilla.org/en-GB/firefox/addon/npmx-redirect/).
117+
> Want automatic redirects? Try the [npmx-redirect extension](https://github.com/iaverages/npmx-redirect) for [Chrome](https://chromewebstore.google.com/detail/lbhjgfgpnlihfmobnohoipeljollhlnb) / [Firefox](https://addons.mozilla.org/en-GB/firefox/addon/npmx-redirect/).
118118
119119
#### Not yet supported
120120

@@ -148,7 +148,7 @@ We welcome contributions &ndash; please do feel free to explore the project and
148148

149149
## Related projects
150150

151-
- [npmx-replace-extension](https://github.com/tylersayshi/npmx-replace-extension) &ndash; Browser extension to redirect npmjs.com to npmx.dev (Chrome only for now)
151+
- [npmx-redirect](https://github.com/iaverages/npmx-redirect) &ndash; Browser extension that automatically redirects npmjs.com URLs to npmx.dev.
152152
- [JSR](https://jsr.io/) &ndash; The open-source package registry for modern JavaScript and TypeScript
153153
- [npm-userscript](https://github.com/bluwy/npm-userscript) &ndash; Browser userscript with various improvements and fixes for npmjs.com
154154
- [npm-alt](https://npm.willow.sh/) &ndash; An alternative npm package browser
@@ -158,7 +158,6 @@ We welcome contributions &ndash; please do feel free to explore the project and
158158
- [nxjt](https://nxjt.netlify.app) &ndash; npmx Jump To: Quickly navigate to npmx common webpages.
159159
- [npmx-weekly](https://npmx-weekly.trueberryless.org/) &ndash; A weekly newsletter for the npmx ecosystem. Add your own content via suggestions in the weekly PR on [GitHub](https://github.com/trueberryless-org/npmx-weekly/pulls?q=is%3Aopen+is%3Apr+label%3A%22%F0%9F%95%94+weekly+post%22).
160160
- [npmx-digest](https://npmx-digest.trueberryless.org/) &ndash; An automated news aggregation website that summarizes npmx activity from GitHub and Bluesky every 8 hours.
161-
- [npmx-redirect](https://github.com/iaverages/npmx-redirect) &ndash; Browser extension that automatically redirects npmjs.com URLs to npmx.dev.
162161
- [npmx-badge](https://npmx-badge.vercel.app/) &ndash; A playground to help you create custom badges quickly.
163162

164163
If you're building something cool, let us know! 🙏

app/assets/main.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@
153153
--fg: oklch(1 0 0);
154154
--fg-muted: oklch(0.769 0 0);
155155
--fg-subtle: oklch(0.693 0 0);
156-
157156
/* border, separator colors */
158157
--border: oklch(0.769 0 0);
159158
--border-subtle: oklch(0.739 0 0);
@@ -275,7 +274,8 @@ dd {
275274
}
276275

277276
/* Shiki theme colors */
278-
html.light .shiki {
277+
/* html.light .shiki { */
278+
html .shiki {
279279
color: var(--shiki-light) !important;
280280
background-color: var(--shiki-light-bg) !important;
281281

app/components/AppFooter.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ const closeModal = () => modalRef.value?.close?.()
3838
<LinkBase :to="{ name: 'translation-status' }">
3939
{{ $t('translation_status.title') }}
4040
</LinkBase>
41+
<LinkBase :to="{ name: 'brand' }">
42+
{{ $t('footer.brand') }}
43+
</LinkBase>
4144
<button
4245
type="button"
4346
class="cursor-pointer group inline-flex gap-x-1 items-center justify-center underline-offset-[0.2rem] underline decoration-1 decoration-fg/30 font-mono text-fg hover:(decoration-accent text-accent) focus-visible:(decoration-accent text-accent) transition-colors duration-200"

app/components/AppHeader.vue

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ const mobileLinks = computed<NavigationConfigWithGroups>(() => [
9292
external: false,
9393
iconClass: 'i-lucide:languages',
9494
},
95+
{
96+
name: 'Brand',
97+
label: $t('footer.brand'),
98+
to: { name: 'brand' },
99+
type: 'link',
100+
external: false,
101+
iconClass: 'i-lucide:palette',
102+
},
95103
],
96104
},
97105
{
@@ -218,17 +226,18 @@ onKeyStroke(
218226
class="relative container min-h-14 flex items-center gap-2 z-1 justify-end"
219227
>
220228
<!-- Mobile: Logo (navigates home) -->
221-
<NuxtLink
222-
v-if="!isSearchExpanded && !isOnHomePage"
223-
to="/"
224-
:aria-label="$t('header.home')"
225-
class="sm:hidden flex-shrink-0 font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 focus-ring me-4"
226-
>
227-
<AppMark class="w-6 h-auto" />
228-
</NuxtLink>
229+
<LogoContextMenu v-if="!isSearchExpanded && !isOnHomePage" class="sm:hidden flex-shrink-0">
230+
<NuxtLink
231+
to="/"
232+
:aria-label="$t('header.home')"
233+
class="font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 focus-ring me-4"
234+
>
235+
<AppMark class="w-6 h-auto" />
236+
</NuxtLink>
237+
</LogoContextMenu>
229238

230239
<!-- Desktop: Logo (navigates home) -->
231-
<div v-if="showLogo" class="hidden sm:flex flex-shrink-0 items-center">
240+
<LogoContextMenu v-if="showLogo" class="hidden sm:flex flex-shrink-0 items-center">
232241
<NuxtLink
233242
:to="{ name: 'index' }"
234243
:aria-label="$t('header.home')"
@@ -243,7 +252,7 @@ onKeyStroke(
243252
{{ env === 'release' ? 'alpha' : env }}
244253
</span>
245254
</NuxtLink>
246-
</div>
255+
</LogoContextMenu>
247256

248257
<NuxtLink
249258
v-if="showLogo && !isSearchExpanded && prNumber"

0 commit comments

Comments
 (0)