Skip to content

Commit 8d0da84

Browse files
committed
Merge remote-tracking branch 'upstream/main' into refactor-change-routing
2 parents 23dcde5 + 344fd65 commit 8d0da84

113 files changed

Lines changed: 4900 additions & 1781 deletions

File tree

Some content is hidden

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

.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
@@ -2,7 +2,7 @@
22
import type { PackageFileTree } from '#shared/types'
33
import type { RouteLocationRaw } from 'vue-router'
44
import type { RouteNamedMap } from 'vue-router/auto-routes'
5-
import { getFileIcon } from '~/utils/file-icons'
5+
import { ADDITIONAL_ICONS, getFileIcon } from '~/utils/file-icons'
66
77
const props = defineProps<{
88
tree: PackageFileTree[]
@@ -81,8 +81,15 @@ const bytesFormatter = useBytesFormatter()
8181
:to="getCodeRoute(parentPath || undefined)"
8282
class="py-2 px-4 font-mono text-sm w-full"
8383
no-underline
84-
classicon="i-carbon:folder text-yellow-600"
8584
>
85+
<svg
86+
class="size-[1em] me-1 shrink-0 text-yellow-600"
87+
viewBox="0 0 16 16"
88+
fill="currentColor"
89+
aria-hidden="true"
90+
>
91+
<use :href="`/file-tree-sprite.svg#${ADDITIONAL_ICONS['folder']}`" />
92+
</svg>
8693
<span class="w-full flex justify-self-stretch items-center gap-2"> .. </span>
8794
</LinkBase>
8895
</td>
@@ -99,12 +106,18 @@ const bytesFormatter = useBytesFormatter()
99106
:to="getCodeRoute(node.path)"
100107
class="py-2 px-4 font-mono text-sm w-full"
101108
no-underline
102-
:classicon="
103-
node.type === 'directory'
104-
? 'i-carbon:folder text-yellow-600'
105-
: getFileIcon(node.name)
106-
"
107109
>
110+
<svg
111+
class="size-[1em] me-1 shrink-0"
112+
viewBox="0 0 16 16"
113+
fill="currentColor"
114+
:class="node.type === 'directory' ? 'text-yellow-600' : undefined"
115+
aria-hidden="true"
116+
>
117+
<use
118+
:href="`/file-tree-sprite.svg#${node.type === 'directory' ? ADDITIONAL_ICONS['folder'] : getFileIcon(node.name)}`"
119+
/>
120+
</svg>
108121
<span class="w-full flex justify-self-stretch items-center gap-2">
109122
<span class="flex-1">{{ node.name }}</span>
110123
<span

app/components/Code/FileTree.vue

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import type { PackageFileTree } from '#shared/types'
33
import type { RouteLocationRaw } from 'vue-router'
44
import type { RouteNamedMap } from 'vue-router/auto-routes'
5-
import { getFileIcon } from '~/utils/file-icons'
5+
import { ADDITIONAL_ICONS, getFileIcon } from '~/utils/file-icons'
66
77
const props = defineProps<{
88
tree: PackageFileTree[]
@@ -61,14 +61,17 @@ watch(
6161
@click="toggleDir(node.path)"
6262
:classicon="isExpanded(node.path) ? 'i-carbon:chevron-down' : 'i-carbon:chevron-right'"
6363
>
64-
<span
65-
class="w-4 h-4 shrink-0"
66-
:class="
67-
isExpanded(node.path)
68-
? 'i-carbon:folder-open text-yellow-500'
69-
: 'i-carbon:folder text-yellow-600'
70-
"
71-
/>
64+
<svg
65+
class="size-[1em] me-1 shrink-0"
66+
:class="isExpanded(node.path) ? 'text-yellow-500' : 'text-yellow-600'"
67+
viewBox="0 0 16 16"
68+
fill="currentColor"
69+
aria-hidden="true"
70+
>
71+
<use
72+
:href="`/file-tree-sprite.svg#${isExpanded(node.path) ? ADDITIONAL_ICONS['folder-open'] : ADDITIONAL_ICONS['folder']}`"
73+
/>
74+
</svg>
7275
<span class="truncate">{{ node.name }}</span>
7376
</ButtonBase>
7477
<CodeFileTree
@@ -90,8 +93,15 @@ watch(
9093
class="w-full justify-start! rounded-none! border-none!"
9194
block
9295
:style="{ paddingLeft: `${depth * 12 + 32}px` }"
93-
:classicon="getFileIcon(node.name)"
9496
>
97+
<svg
98+
class="size-[1em] me-1 shrink-0"
99+
viewBox="0 0 16 16"
100+
fill="currentColor"
101+
aria-hidden="true"
102+
>
103+
<use :href="`/file-tree-sprite.svg#${getFileIcon(node.name)}`" />
104+
</svg>
95105
<span class="truncate">{{ node.name }}</span>
96106
</LinkBase>
97107
</template>

0 commit comments

Comments
 (0)