Skip to content

Commit 81a42b0

Browse files
Merge branch 'main' into fix/handle-oauth-cancel
2 parents 8d4f789 + 7f0291c commit 81a42b0

File tree

166 files changed

+11309
-1869
lines changed

Some content is hidden

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

166 files changed

+11309
-1869
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
run: pnpm install
8585

8686
- name: 🧪 Unit tests
87-
run: pnpm test:unit run --coverage --reporter=junit --outputFile=test-report.junit.xml
87+
run: pnpm test:unit run --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
8888

8989
- name: ⬆︎ Upload test results to Codecov
9090
if: ${{ !cancelled() }}
@@ -115,7 +115,7 @@ jobs:
115115
run: pnpm playwright install chromium-headless-shell
116116

117117
- name: 🧪 Component tests
118-
run: pnpm test:nuxt run --coverage --reporter=junit --outputFile=test-report.junit.xml
118+
run: pnpm test:nuxt run --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
119119

120120
- name: ⬆︎ Upload coverage reports to Codecov
121121
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
@@ -235,3 +235,8 @@ jobs:
235235

236236
- name: 🌐 Check for missing or dynamic i18n keys
237237
run: pnpm i18n:report
238+
239+
- name: 🌐 Check i18n schema is up to date
240+
run: |
241+
pnpm i18n:schema
242+
git diff --exit-code i18n/schema.json
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: mirror
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*'
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
mirror:
15+
name: 🕸️ Mirror to Tangled
16+
runs-on: ubuntu-24.04-arm
17+
18+
steps:
19+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
20+
with:
21+
fetch-depth: 0
22+
23+
- name: 🔑 Configure SSH
24+
env:
25+
TANGLED_SSH_KEY: ${{ secrets.TANGLED_SSH_KEY }}
26+
run: |
27+
mkdir -p ~/.ssh
28+
echo "$TANGLED_SSH_KEY" > ~/.ssh/id_ed25519
29+
chmod 600 ~/.ssh/id_ed25519
30+
ssh-keyscan -t ed25519 tangled.org >> ~/.ssh/known_hosts 2>/dev/null
31+
32+
- name: ⬆︎ Push to Tangled
33+
run: |
34+
git remote add tangled git@tangled.org:npmx.dev/npmx.dev
35+
git push tangled main --force
36+
git push tangled --tags --force

app/assets/main.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@
192192
*/
193193

194194
html {
195+
@apply scroll-pt-20;
195196
-webkit-font-smoothing: antialiased;
196197
-moz-osx-font-smoothing: grayscale;
197198
text-rendering: optimizeLegibility;
198199
/* Offset for fixed header - otherwise anchor headers are cutted */
199-
scroll-padding-top: 5rem;
200200
scrollbar-gutter: stable;
201201
}
202202

@@ -236,11 +236,6 @@ dd {
236236
margin: 0;
237237
}
238238

239-
/* Reset button styles */
240-
button {
241-
cursor: pointer;
242-
}
243-
244239
/* Selection */
245240
::selection {
246241
background-color: var(--fg-muted);

app/components/AppFooter.vue

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<script setup lang="ts">
22
const route = useRoute()
33
const isHome = computed(() => route.name === 'index')
4+
5+
const modalRef = useTemplateRef('modalRef')
6+
const showModal = () => modalRef.value?.showModal?.()
47
</script>
58

69
<template>
@@ -11,7 +14,6 @@ const isHome = computed(() => route.name === 'index')
1114
>
1215
<div>
1316
<p class="font-mono text-balance m-0 hidden sm:block">{{ $t('tagline') }}</p>
14-
<BuildEnvironment v-if="!isHome" footer />
1517
</div>
1618
<!-- Desktop: Show all links. Mobile: Links are in MobileMenu -->
1719
<div class="hidden sm:flex items-center gap-6 min-h-11 text-xs">
@@ -33,12 +35,86 @@ const isHome = computed(() => route.name === 'index')
3335
<LinkBase to="https://chat.npmx.dev">
3436
{{ $t('footer.chat') }}
3537
</LinkBase>
38+
39+
<button
40+
type="button"
41+
class="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"
42+
@click.prevent="showModal"
43+
aria-haspopup="dialog"
44+
>
45+
{{ $t('footer.keyboard_shortcuts') }}
46+
</button>
47+
48+
<Modal
49+
ref="modalRef"
50+
:modalTitle="$t('footer.keyboard_shortcuts')"
51+
class="w-auto max-w-lg"
52+
>
53+
<p class="mb-2 font-mono text-fg-subtle">
54+
{{ $t('shortcuts.section.global') }}
55+
</p>
56+
<ul class="mb-6 flex flex-col gap-2">
57+
<li class="flex gap-2 items-center">
58+
<kbd class="kbd">/</kbd>
59+
<span>{{ $t('shortcuts.focus_search') }}</span>
60+
</li>
61+
<li class="flex gap-2 items-center">
62+
<kbd class="kbd">?</kbd>
63+
<span>{{ $t('shortcuts.show_kbd_hints') }}</span>
64+
</li>
65+
<li class="flex gap-2 items-center">
66+
<kbd class="kbd">,</kbd>
67+
<span>{{ $t('shortcuts.settings') }}</span>
68+
</li>
69+
<li class="flex gap-2 items-center">
70+
<kbd class="kbd">c</kbd>
71+
<span>{{ $t('shortcuts.compare') }}</span>
72+
</li>
73+
</ul>
74+
<p class="mb-2 font-mono text-fg-subtle">
75+
{{ $t('shortcuts.section.search') }}
76+
</p>
77+
<ul class="mb-6 flex flex-col gap-2">
78+
<li class="flex gap-2 items-center">
79+
<kbd class="kbd">↑</kbd>/<kbd class="kbd">↓</kbd>
80+
<span>{{ $t('shortcuts.navigate_results') }}</span>
81+
</li>
82+
<li class="flex gap-2 items-center">
83+
<kbd class="kbd">Enter</kbd>
84+
<span>{{ $t('shortcuts.go_to_result') }}</span>
85+
</li>
86+
</ul>
87+
<p class="mb-2 font-mono text-fg-subtle">
88+
{{ $t('shortcuts.section.package') }}
89+
</p>
90+
<ul class="mb-6 flex flex-col gap-2">
91+
<li class="flex gap-2 items-center">
92+
<kbd class="kbd">.</kbd>
93+
<span>{{ $t('shortcuts.open_code_view') }}</span>
94+
</li>
95+
<li class="flex gap-2 items-center">
96+
<kbd class="kbd">d</kbd>
97+
<span>{{ $t('shortcuts.open_docs') }}</span>
98+
</li>
99+
<li class="flex gap-2 items-center">
100+
<kbd class="kbd">c</kbd>
101+
<span>{{ $t('shortcuts.compare_from_package') }}</span>
102+
</li>
103+
</ul>
104+
</Modal>
36105
</div>
37106
</div>
107+
<BuildEnvironment v-if="!isHome" footer />
38108
<p class="text-xs text-fg-muted text-center sm:text-start m-0">
39109
<span class="sm:hidden">{{ $t('non_affiliation_disclaimer') }}</span>
40110
<span class="hidden sm:inline">{{ $t('trademark_disclaimer') }}</span>
41111
</p>
42112
</div>
43113
</footer>
44114
</template>
115+
116+
<style scoped>
117+
.kbd {
118+
@apply items-center justify-center text-sm text-fg bg-bg-muted border border-border rounded px-2;
119+
}
120+
</style>

0 commit comments

Comments
 (0)