Skip to content

Commit 83d9b13

Browse files
authored
Merge branch 'main' into fix-search
2 parents 1051bf7 + efcdbac commit 83d9b13

File tree

100 files changed

+2878
-1641
lines changed

Some content is hidden

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

100 files changed

+2878
-1641
lines changed

.github/workflows/mirror-tangled.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ permissions:
1313
jobs:
1414
mirror:
1515
name: 🕸️ Mirror to Tangled
16+
if: ${{ github.repository == 'npmx-dev/npmx.dev' }}
1617
runs-on: ubuntu-24.04-arm
1718

1819
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ test-results/
3939

4040
# generated files
4141
shared/types/lexicons
42+
file-tree-sprite.svg
4243

4344
**/__screenshots__/**
4445

.oxfmtignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,8 +789,10 @@ Format: `type(scope): description`
789789
- `fix(i18n): update French translations`
790790
- `chore(deps): update vite to v6`
791791

792+
Where front end changes are made, please include before and after screenshots in your pull request description.
793+
792794
> [!NOTE]
793-
> The subject must start with a lowercase letter. Individual commit messages within your PR don't need to follow this format since they'll be squashed.
795+
> Use lowercase letters in your pull request title. Individual commit messages within your PR don't need to follow this format since they'll be squashed.
794796
795797
### PR descriptions
796798

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ npmx.dev supports npm permalinks – just replace `npmjs.com` with `npmx.dev
116116
| `npmjs.com/org/nuxt` | [`npmx.dev/org/nuxt`](https://npmx.dev/org/nuxt) |
117117

118118
> [!TIP]
119-
> Want automatic redirects? Try the [npmx-replace browser extension](https://github.com/tylersayshi/npmx-replace-extension) (Chrome only for now).
119+
> 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/).
120120
121121
#### Not yet supported
122122

@@ -159,6 +159,7 @@ We welcome contributions – please do feel free to explore the project and
159159
- [nxjt](https://nxjt.netlify.app) – npmx Jump To: Quickly navigate to npmx common webpages.
160160
- [npmx-weekly](https://npmx-weekly.trueberryless.org/) – 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).
161161
- [npmx-digest](https://npmx-digest.trueberryless.org/) – An automated news aggregation website that summarizes npmx activity from GitHub and Bluesky every 8 hours.
162+
- [npmx-redirect](https://github.com/iaverages/npmx-redirect) – Browser extension that automatically redirects npmjs.com URLs to npmx.dev.
162163

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

app/components/AppFooter.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const showModal = () => modalRef.value?.showModal?.()
2323
<LinkBase :to="{ name: 'privacy' }">
2424
{{ $t('privacy_policy.title') }}
2525
</LinkBase>
26+
<LinkBase :to="{ name: 'accessibility' }">
27+
{{ $t('a11y.footer_title') }}
28+
</LinkBase>
2629
<button
2730
type="button"
2831
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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ const mobileLinks = computed<NavigationConfigWithGroups>(() => [
6464
external: false,
6565
iconClass: 'i-carbon:security',
6666
},
67+
{
68+
name: 'Accessibility',
69+
label: $t('a11y.title'),
70+
to: { name: 'accessibility' },
71+
type: 'link',
72+
external: false,
73+
iconClass: 'i-carbon:accessibility-alt',
74+
},
6775
],
6876
},
6977
{

app/components/AppLogo.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ defineProps<{
2424
font-size="420"
2525
font-weight="500"
2626
text-anchor="middle"
27+
style="user-select: none"
2728
>
2829
<tspan>/</tspan>
2930
</text>

app/components/Code/DirectoryListing.vue

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import type { PackageFileTree } from '#shared/types'
33
import type { RouteLocationRaw } from 'vue-router'
4-
import { getFileIcon } from '~/utils/file-icons'
4+
import { ADDITIONAL_ICONS, getFileIcon } from '~/utils/file-icons'
55
66
const props = defineProps<{
77
tree: PackageFileTree[]
@@ -80,8 +80,15 @@ const bytesFormatter = useBytesFormatter()
8080
:to="getCodeRoute(parentPath || undefined)"
8181
class="py-2 px-4 font-mono text-sm w-full"
8282
no-underline
83-
classicon="i-carbon:folder text-yellow-600"
8483
>
84+
<svg
85+
class="size-[1em] me-1 shrink-0 text-yellow-600"
86+
viewBox="0 0 16 16"
87+
fill="currentColor"
88+
aria-hidden="true"
89+
>
90+
<use :href="`/file-tree-sprite.svg#${ADDITIONAL_ICONS['folder']}`" />
91+
</svg>
8592
<span class="w-full flex justify-self-stretch items-center gap-2"> .. </span>
8693
</LinkBase>
8794
</td>
@@ -98,12 +105,18 @@ const bytesFormatter = useBytesFormatter()
98105
:to="getCodeRoute(node.path)"
99106
class="py-2 px-4 font-mono text-sm w-full"
100107
no-underline
101-
:classicon="
102-
node.type === 'directory'
103-
? 'i-carbon:folder text-yellow-600'
104-
: getFileIcon(node.name)
105-
"
106108
>
109+
<svg
110+
class="size-[1em] me-1 shrink-0"
111+
viewBox="0 0 16 16"
112+
fill="currentColor"
113+
:class="node.type === 'directory' ? 'text-yellow-600' : undefined"
114+
aria-hidden="true"
115+
>
116+
<use
117+
:href="`/file-tree-sprite.svg#${node.type === 'directory' ? ADDITIONAL_ICONS['folder'] : getFileIcon(node.name)}`"
118+
/>
119+
</svg>
107120
<span class="w-full flex justify-self-stretch items-center gap-2">
108121
<span class="flex-1">{{ node.name }}</span>
109122
<span

app/components/Code/FileTree.vue

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import type { PackageFileTree } from '#shared/types'
33
import type { RouteLocationRaw } from 'vue-router'
4-
import { getFileIcon } from '~/utils/file-icons'
4+
import { ADDITIONAL_ICONS, getFileIcon } from '~/utils/file-icons'
55
66
const props = defineProps<{
77
tree: PackageFileTree[]
@@ -57,14 +57,17 @@ watch(
5757
@click="toggleDir(node.path)"
5858
:classicon="isExpanded(node.path) ? 'i-carbon:chevron-down' : 'i-carbon:chevron-right'"
5959
>
60-
<span
61-
class="w-4 h-4 shrink-0"
62-
:class="
63-
isExpanded(node.path)
64-
? 'i-carbon:folder-open text-yellow-500'
65-
: 'i-carbon:folder text-yellow-600'
66-
"
67-
/>
60+
<svg
61+
class="size-[1em] me-1 shrink-0"
62+
:class="isExpanded(node.path) ? 'text-yellow-500' : 'text-yellow-600'"
63+
viewBox="0 0 16 16"
64+
fill="currentColor"
65+
aria-hidden="true"
66+
>
67+
<use
68+
:href="`/file-tree-sprite.svg#${isExpanded(node.path) ? ADDITIONAL_ICONS['folder-open'] : ADDITIONAL_ICONS['folder']}`"
69+
/>
70+
</svg>
6871
<span class="truncate">{{ node.name }}</span>
6972
</ButtonBase>
7073
<CodeFileTree
@@ -86,8 +89,15 @@ watch(
8689
class="w-full justify-start! rounded-none! border-none!"
8790
block
8891
:style="{ paddingLeft: `${depth * 12 + 32}px` }"
89-
:classicon="getFileIcon(node.name)"
9092
>
93+
<svg
94+
class="size-[1em] me-1 shrink-0"
95+
viewBox="0 0 16 16"
96+
fill="currentColor"
97+
aria-hidden="true"
98+
>
99+
<use :href="`/file-tree-sprite.svg#${getFileIcon(node.name)}`" />
100+
</svg>
91101
<span class="truncate">{{ node.name }}</span>
92102
</LinkBase>
93103
</template>

0 commit comments

Comments
 (0)