Skip to content

Commit e9ea5c1

Browse files
committed
chore: merge conflicts resolved
2 parents bcf6f43 + 83abe34 commit e9ea5c1

File tree

94 files changed

+7561
-780
lines changed

Some content is hidden

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

94 files changed

+7561
-780
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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/components/AppHeader.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ onKeyStroke(
259259
class="border-none"
260260
variant="button-secondary"
261261
:to="link.to"
262-
:keyshortcut="link.keyshortcut"
262+
:aria-keyshortcuts="link.keyshortcut"
263263
>
264264
{{ link.label }}
265265
</LinkBase>
@@ -270,7 +270,7 @@ onKeyStroke(
270270
<!-- Mobile: Menu button (always visible, click to open menu) -->
271271
<ButtonBase
272272
type="button"
273-
class="sm:hidden flex"
273+
class="sm:hidden"
274274
:aria-label="$t('nav.open_menu')"
275275
:aria-expanded="showMobileMenu"
276276
@click="showMobileMenu = !showMobileMenu"

app/components/Button/Base.vue

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
<script setup lang="ts">
22
const props = withDefaults(
33
defineProps<{
4-
'disabled'?: boolean
5-
'type'?: 'button' | 'submit'
6-
'variant'?: 'primary' | 'secondary'
7-
'size'?: 'small' | 'medium'
8-
'keyshortcut'?: string
4+
disabled?: boolean
5+
type?: 'button' | 'submit'
6+
variant?: 'primary' | 'secondary'
7+
size?: 'small' | 'medium'
8+
ariaKeyshortcuts?: string
9+
block?: boolean
910
10-
/**
11-
* Do not use this directly. Use keyshortcut instead; it generates the correct HTML and displays the shortcut in the UI.
12-
*/
13-
'aria-keyshortcuts'?: never
14-
15-
'classicon'?: string
11+
classicon?: string
1612
}>(),
1713
{
1814
type: 'button',
@@ -32,11 +28,13 @@ defineExpose({
3228
<template>
3329
<button
3430
ref="el"
35-
class="group cursor-pointer inline-flex gap-x-1 items-center justify-center font-mono border border-border rounded-md transition-all duration-200 disabled:(opacity-40 cursor-not-allowed border-transparent)"
31+
class="group cursor-pointer gap-x-1 items-center justify-center font-mono border border-border rounded-md transition-all duration-200 disabled:(opacity-40 cursor-not-allowed border-transparent)"
3632
:class="{
33+
'inline-flex': !block,
34+
'flex': block,
3735
'text-sm px-4 py-2': size === 'medium',
3836
'text-xs px-2 py-0.5': size === 'small',
39-
'bg-transparent text-fg hover:enabled:(bg-fg/10) focus-visible:enabled:(bg-fg/10) aria-pressed:(bg-fg text-bg border-fg hover:enabled:(bg-fg text-bg/50))':
37+
'bg-transparent text-fg hover:enabled:(bg-fg/10) focus-visible:enabled:(bg-fg/10) aria-pressed:(bg-fg/10 border-fg/20 hover:enabled:(bg-fg/20 text-fg/50))':
4038
variant === 'secondary',
4139
'text-bg bg-fg hover:enabled:(bg-fg/50) focus-visible:enabled:(bg-fg/50) aria-pressed:(bg-fg text-bg border-fg hover:enabled:(text-bg/50))':
4240
variant === 'primary',
@@ -51,20 +49,16 @@ defineExpose({
5149
*/
5250
disabled ? true : undefined
5351
"
54-
:aria-keyshortcuts="keyshortcut"
52+
:aria-keyshortcuts="ariaKeyshortcuts"
5553
>
56-
<span
57-
v-if="classicon"
58-
:class="[size === 'small' ? 'size-3' : 'size-4', classicon]"
59-
aria-hidden="true"
60-
/>
54+
<span v-if="classicon" class="size-[1em]" :class="classicon" aria-hidden="true" />
6155
<slot />
6256
<kbd
63-
v-if="keyshortcut"
57+
v-if="ariaKeyshortcuts"
6458
class="ms-2 inline-flex items-center justify-center w-4 h-4 text-xs text-fg bg-bg-muted border border-border rounded no-underline"
6559
aria-hidden="true"
6660
>
67-
{{ keyshortcut }}
61+
{{ ariaKeyshortcuts }}
6862
</kbd>
6963
</button>
7064
</template>

app/components/Code/DirectoryListing.vue

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,14 @@ const bytesFormatter = useBytesFormatter()
7676
class="border-b border-border hover:bg-bg-subtle transition-colors"
7777
>
7878
<td colspan="2">
79-
<NuxtLink
79+
<LinkBase
8080
:to="getCodeRoute(parentPath || undefined)"
81-
class="flex items-center gap-2 py-2 px-4 font-mono text-sm text-fg-muted hover:text-fg transition-colors"
81+
class="py-2 px-4 font-mono text-sm w-full"
82+
no-underline
83+
classicon="i-carbon:folder text-yellow-600"
8284
>
83-
<span class="i-carbon:folder w-4 h-4 text-yellow-600" />
84-
<span>..</span>
85-
</NuxtLink>
85+
<span class="w-full flex justify-self-stretch items-center gap-2"> .. </span>
86+
</LinkBase>
8687
</td>
8788
</tr>
8889

@@ -93,24 +94,26 @@ const bytesFormatter = useBytesFormatter()
9394
class="border-b border-border hover:bg-bg-subtle transition-colors"
9495
>
9596
<td colspan="2">
96-
<NuxtLink
97+
<LinkBase
9798
:to="getCodeRoute(node.path)"
98-
class="flex items-center gap-2 py-2 px-4 font-mono text-sm hover:text-fg transition-colors"
99-
:class="node.type === 'directory' ? 'text-fg' : 'text-fg-muted'"
99+
class="py-2 px-4 font-mono text-sm w-full"
100+
no-underline
101+
:classicon="
102+
node.type === 'directory'
103+
? 'i-carbon:folder text-yellow-600'
104+
: getFileIcon(node.name)
105+
"
100106
>
101-
<span
102-
v-if="node.type === 'directory'"
103-
class="i-carbon:folder w-4 h-4 text-yellow-600"
104-
/>
105-
<span v-else class="w-4 h-4" :class="getFileIcon(node.name)" />
106-
<span class="flex-1">{{ node.name }}</span>
107-
<span
108-
v-if="node.type === 'file' && node.size"
109-
class="text-end font-mono text-xs text-fg-subtle"
110-
>
111-
{{ bytesFormatter.format(node.size) }}
107+
<span class="w-full flex justify-self-stretch items-center gap-2">
108+
<span class="flex-1">{{ node.name }}</span>
109+
<span
110+
v-if="node.type === 'file' && node.size"
111+
class="text-end text-xs text-fg-subtle"
112+
>
113+
{{ bytesFormatter.format(node.size) }}
114+
</span>
112115
</span>
113-
</NuxtLink>
116+
</LinkBase>
114117
</td>
115118
</tr>
116119
</tbody>

app/components/Code/FileTree.vue

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,14 @@ watch(
4949
<li v-for="node in tree" :key="node.path">
5050
<!-- Directory -->
5151
<template v-if="node.type === 'directory'">
52-
<button
53-
type="button"
54-
class="w-full flex items-center gap-1.5 py-1.5 px-3 text-start font-mono text-sm transition-colors hover:bg-bg-muted"
55-
:class="isNodeActive(node) ? 'text-fg' : 'text-fg-muted'"
52+
<ButtonBase
53+
class="w-full justify-start! rounded-none! border-none!"
54+
block
55+
:aria-pressed="isNodeActive(node)"
5656
:style="{ paddingLeft: `${depth * 12 + 12}px` }"
5757
@click="toggleDir(node.path)"
58+
:classicon="isExpanded(node.path) ? 'i-carbon:chevron-down' : 'i-carbon:chevron-right'"
5859
>
59-
<span
60-
class="w-4 h-4 shrink-0 transition-transform"
61-
:class="[isExpanded(node.path) ? 'i-carbon:chevron-down' : 'i-carbon:chevron-right']"
62-
/>
6360
<span
6461
class="w-4 h-4 shrink-0"
6562
:class="
@@ -69,7 +66,7 @@ watch(
6966
"
7067
/>
7168
<span class="truncate">{{ node.name }}</span>
72-
</button>
69+
</ButtonBase>
7370
<CodeFileTree
7471
v-if="isExpanded(node.path) && node.children"
7572
:tree="node.children"
@@ -82,15 +79,17 @@ watch(
8279

8380
<!-- File -->
8481
<template v-else>
85-
<NuxtLink
82+
<LinkBase
83+
variant="button-secondary"
8684
:to="getFileRoute(node.path)"
87-
class="flex items-center gap-1.5 py-1.5 px-3 font-mono text-sm transition-colors hover:bg-bg-muted"
88-
:class="currentPath === node.path ? 'bg-bg-muted text-fg' : 'text-fg-muted'"
85+
:aria-current="currentPath === node.path"
86+
class="w-full justify-start! rounded-none! border-none!"
87+
block
8988
:style="{ paddingLeft: `${depth * 12 + 32}px` }"
89+
:classicon="getFileIcon(node.name)"
9090
>
91-
<span class="w-4 h-4 shrink-0" :class="getFileIcon(node.name)" />
9291
<span class="truncate">{{ node.name }}</span>
93-
</NuxtLink>
92+
</LinkBase>
9493
</template>
9594
</li>
9695
</ul>

app/components/Code/MobileTreeDrawer.vue

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@ watch(isOpen, open => (isLocked.value = open))
2727

2828
<template>
2929
<!-- Toggle button (mobile only) -->
30-
<button
31-
type="button"
32-
class="md:hidden fixed bottom-4 inset-ie-4 z-40 w-12 h-12 bg-bg-elevated border border-border rounded-full shadow-lg flex items-center justify-center text-fg-muted hover:text-fg transition-colors"
30+
<ButtonBase
31+
variant="primary"
32+
class="md:hidden fixed bottom-4 inset-ie-4 z-45"
3333
:aria-label="$t('code.toggle_tree')"
3434
@click="isOpen = !isOpen"
35-
>
36-
<span class="w-5 h-5" :class="isOpen ? 'i-carbon:close' : 'i-carbon:folder'" />
37-
</button>
35+
:classicon="isOpen ? 'i-carbon:close' : 'i-carbon:folder'"
36+
/>
3837

3938
<!-- Backdrop -->
4039
<Transition
@@ -66,14 +65,11 @@ watch(isOpen, open => (isLocked.value = open))
6665
>
6766
<span class="font-mono text-sm text-fg-muted">{{ $t('code.files_label') }}</span>
6867
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
69-
<button
70-
type="button"
71-
class="text-fg-muted hover:text-fg transition-colors"
68+
<ButtonBase
7269
:aria-label="$t('code.close_tree')"
7370
@click="isOpen = false"
74-
>
75-
<span class="i-carbon:close w-5 h-5" />
76-
</button>
71+
classicon="i-carbon-close"
72+
/>
7773
</div>
7874
<CodeFileTree
7975
:tree="tree"

app/components/Code/Viewer.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ watch(
6767
:style="{ '--line-digits': lineDigits }"
6868
aria-hidden="true"
6969
>
70+
<!-- This needs to be a native <a> element, because `LinkBase` (or specifically `NuxtLink`) does not seem to work when trying to prevent default behavior (jumping to the anchor) -->
7071
<a
7172
v-for="lineNum in lineNumbers"
7273
:id="`L${lineNum}`"

app/components/CollapsibleSection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ useHead({
103103
/>
104104
</button>
105105

106-
<LinkBase :to="`#${id}`" class="">
106+
<LinkBase :to="`#${id}`">
107107
{{ title }}
108108
</LinkBase>
109109
</component>

app/components/Compare/ComparisonGrid.vue

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ function getReplacementTooltip(col: ComparisonGridColumn): string {
4040
<!-- Package columns -->
4141
<div v-for="col in columns" :key="col.name" class="comparison-cell comparison-cell-header">
4242
<span class="inline-flex items-center gap-1.5 truncate">
43-
<NuxtLink
43+
<LinkBase
4444
:to="packageRoute(col.name, col.version)"
45-
class="link-subtle font-mono text-sm font-medium text-fg truncate"
45+
class="text-sm truncate"
46+
block
4647
:title="col.version ? `${col.name}@${col.version}` : col.name"
4748
>
4849
{{ col.name }}<template v-if="col.version">@{{ col.version }}</template>
49-
</NuxtLink>
50+
</LinkBase>
5051
<TooltipApp v-if="col.replacement" :text="getReplacementTooltip(col)" position="bottom">
5152
<span
5253
class="i-carbon:idea w-3.5 h-3.5 text-amber-500 shrink-0 cursor-help"
@@ -79,13 +80,9 @@ function getReplacementTooltip(col: ComparisonGridColumn): string {
7980
<p class="text-xs text-fg-muted">
8081
<i18n-t keypath="compare.no_dependency.tooltip_description" tag="span">
8182
<template #link>
82-
<a
83-
href="https://e18e.dev/docs/replacements/"
84-
target="_blank"
85-
rel="noopener noreferrer"
86-
class="text-accent hover:underline"
87-
>{{ $t('compare.no_dependency.e18e_community') }}</a
88-
>
83+
<LinkBase to="https://e18e.dev/docs/replacements/">{{
84+
$t('compare.no_dependency.e18e_community')
85+
}}</LinkBase>
8986
</template>
9087
</i18n-t>
9188
</p>

0 commit comments

Comments
 (0)