Skip to content

Commit 02794dc

Browse files
authored
Merge branch 'main' into feat/org-packages-fancy
2 parents 3589f6b + 8b74db0 commit 02794dc

39 files changed

Lines changed: 882 additions & 420 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The aim of [npmx.dev](https://npmx.dev) is to provide a better browser for the n
2121
## Shortcuts
2222

2323
> [!IMPORTANT]
24-
> We're keeping the website, repository, and our discord community low-profile until the browser is polished enough. We'll do a formal announcement at that point. Please avoid sharing the website or the invite link to discord on social media directly. The repo is public, so people who care about the project can easily find it and join us. Anyone who wants to help is more than welcome to [join the community](https://chat.npm.dev). If you know others who would be interested, please invite them too!
24+
> We're keeping the website, repository, and our discord community low-profile until the browser is polished enough. We'll do a formal announcement at that point. Please avoid sharing the website or the invite link to discord on social media directly. The repo is public, so people who care about the project can easily find it and join us. Anyone who wants to help is more than welcome to [join the community](https://chat.npmx.dev). If you know others who would be interested, please invite them too!
2525
2626
- [chat.npmx.dev](https://chat.npmx.dev) - Discord Server
2727
- [social.npmx.dev](https://social.npmx.dev) - Bluesky Profile

app/assets/main.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,16 @@ button {
157157
top: 0;
158158
}
159159

160+
/* Shiki theme colors */
161+
html.light .shiki,
162+
html.light .shiki span {
163+
color: var(--shiki-light) !important;
164+
background-color: var(--shiki-light-bg) !important;
165+
font-style: var(--shiki-light-font-style) !important;
166+
font-weight: var(--shiki-light-font-weight) !important;
167+
text-decoration: var(--shiki-light-text-decoration) !important;
168+
}
169+
160170
/* README prose styling */
161171
.readme-content {
162172
color: var(--fg-muted);
@@ -238,7 +248,7 @@ button {
238248
.readme-content pre,
239249
.readme-content .shiki {
240250
background: oklch(0.145 0 0) !important;
241-
border: 1px solid oklch(0.2686 0 0);
251+
border: 1px solid var(--border);
242252
border-radius: 8px;
243253
padding: 1rem;
244254
overflow-x: auto;

app/components/AccentColorPicker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { accentColors, selectedAccentColor, setAccentColor } = useAccentColor()
55
</script>
66

77
<template>
8-
<div role="listbox" aria-label="Accent colors" class="flex items-center justify-between">
8+
<div role="listbox" aria-label="Accent colors" class="flex items-center gap-4">
99
<button
1010
v-for="color in accentColors"
1111
:key="color.id"

app/components/AppFooter.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ onMounted(() => {
8989
<!-- On mobile, show disclaimer here instead of tagline -->
9090
<p class="text-xs text-fg-muted m-0 sm:hidden">{{ $t('non_affiliation_disclaimer') }}</p>
9191
<div class="flex items-center gap-4 sm:gap-6">
92+
<a
93+
href="https://docs.npmx.dev"
94+
target="_blank"
95+
rel="noopener noreferrer"
96+
class="link-subtle font-mono text-xs min-h-11 min-w- flex items-center"
97+
>
98+
{{ $t('footer.docs') }}
99+
</a>
92100
<a
93101
href="https://repo.npmx.dev"
94102
target="_blank"

app/components/AppHeader.vue

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ withDefaults(
1111
)
1212
1313
const { isConnected, npmUser } = useConnector()
14+
15+
const router = useRouter()
16+
onKeyStroke(',', e => {
17+
// Don't trigger if user is typing in an input
18+
const target = e.target as HTMLElement
19+
if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
20+
return
21+
}
22+
23+
e.preventDefault()
24+
router.push('/settings')
25+
})
1426
</script>
1527

1628
<template>
@@ -64,9 +76,19 @@ const { isConnected, npmUser } = useConnector()
6476

6577
<!-- Right: User status + GitHub -->
6678
<div class="flex-shrink-0 flex items-center gap-6">
67-
<ClientOnly>
68-
<SettingsMenu />
69-
</ClientOnly>
79+
<NuxtLink
80+
to="/settings"
81+
class="link-subtle font-mono text-sm inline-flex items-center gap-2"
82+
aria-keyshortcuts=","
83+
>
84+
{{ $t('nav.settings') }}
85+
<kbd
86+
class="hidden sm:inline-flex items-center justify-center w-5 h-5 text-xs bg-bg-muted border border-border rounded"
87+
aria-hidden="true"
88+
>
89+
,
90+
</kbd>
91+
</NuxtLink>
7092

7193
<div v-if="showConnector">
7294
<ConnectorStatus />

app/components/ChartModal.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<script setup lang="ts">
22
const open = defineModel<boolean>('open', { default: false })
33
4+
function close() {
5+
open.value = false
6+
}
7+
48
function handleKeydown(event: KeyboardEvent) {
59
if (event.key === 'Escape') {
6-
open.value = false
10+
close()
711
}
812
}
913
</script>
@@ -53,6 +57,8 @@ function handleKeydown(event: KeyboardEvent) {
5357
<slot />
5458
</div>
5559
</div>
60+
61+
<slot name="after" v-bind="{ close }" />
5662
</div>
5763
</div>
5864
</Transition>

app/components/ClaimPackageModal.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const connectorModalOpen = shallowRef(false)
160160
<button
161161
type="button"
162162
class="text-fg-subtle hover:text-fg transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50 rounded"
163-
:aria-label="$t('claim.modal.close')"
163+
:aria-label="$t('common.close')"
164164
@click="open = false"
165165
>
166166
<span class="i-carbon-close block w-5 h-5" aria-hidden="true" />
@@ -203,7 +203,7 @@ const connectorModalOpen = shallowRef(false)
203203
class="flex-1 px-4 py-2 font-mono text-sm text-fg-muted bg-bg-subtle border border-border rounded-md transition-colors duration-200 hover:text-fg hover:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
204204
@click="open = false"
205205
>
206-
{{ $t('claim.modal.close') }}
206+
{{ $t('common.close') }}
207207
</button>
208208
</div>
209209
</div>
@@ -370,7 +370,7 @@ const connectorModalOpen = shallowRef(false)
370370
>
371371
{{ $t('claim.modal.preview_json') }}
372372
</summary>
373-
<pre class="p-3 text-xs font-mono text-fg-muted bg-[#0d0d0d] overflow-x-auto">{{
373+
<pre class="p-3 text-xs font-mono text-fg-muted bg-bg-muted overflow-x-auto">{{
374374
JSON.stringify(previewPackageJson, null, 2)
375375
}}</pre>
376376
</details>
@@ -395,7 +395,7 @@ const connectorModalOpen = shallowRef(false)
395395
class="w-full px-4 py-2 font-mono text-sm text-fg-muted bg-bg-subtle border border-border rounded-md transition-colors duration-200 hover:text-fg hover:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
396396
@click="open = false"
397397
>
398-
{{ $t('claim.modal.close') }}
398+
{{ $t('common.close') }}
399399
</button>
400400
</div>
401401

@@ -412,7 +412,7 @@ const connectorModalOpen = shallowRef(false)
412412
class="w-full px-4 py-2 font-mono text-sm text-fg-muted bg-bg-subtle border border-border rounded-md transition-colors duration-200 hover:text-fg hover:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
413413
@click="checkAvailability"
414414
>
415-
{{ $t('claim.modal.retry') }}
415+
{{ $t('common.retry') }}
416416
</button>
417417
</div>
418418
</div>

app/components/ConnectorModal.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ watch(open, isOpen => {
8383
<button
8484
type="button"
8585
class="text-fg-subtle hover:text-fg transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50 rounded"
86-
:aria-label="$t('connector.modal.close')"
86+
:aria-label="$t('common.close')"
8787
@click="open = false"
8888
>
8989
<span class="i-carbon-close block w-5 h-5" aria-hidden="true" />
@@ -125,10 +125,10 @@ watch(open, isOpen => {
125125
</p>
126126

127127
<div
128-
class="flex items-center p-3 bg-[#0d0d0d] border border-border rounded-lg font-mono text-sm"
128+
class="flex items-center p-3 bg-bg-muted border border-border rounded-lg font-mono text-sm"
129129
>
130130
<span class="text-fg-subtle">$</span>
131-
<span class="text-fg ml-2">{{ executeNpmxConnectorCommand }}</span>
131+
<span class="text-fg-subtle ml-2">{{ executeNpmxConnectorCommand }}</span>
132132
<button
133133
type="button"
134134
:aria-label="

app/components/DateTime.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const props = withDefaults(
2929
},
3030
)
3131
32+
const { locale } = useI18n()
33+
3234
const relativeDates = useRelativeDates()
3335
3436
// Compute the title - always show full date for accessibility
@@ -41,7 +43,13 @@ const titleValue = computed(() => {
4143

4244
<template>
4345
<ClientOnly>
44-
<NuxtTime v-if="relativeDates" :datetime="datetime" :title="titleValue" relative />
46+
<NuxtTime
47+
v-if="relativeDates"
48+
:datetime="datetime"
49+
:title="titleValue"
50+
relative
51+
:locale="locale"
52+
/>
4553
<NuxtTime
4654
v-else
4755
:datetime="datetime"
@@ -50,6 +58,7 @@ const titleValue = computed(() => {
5058
:year="year"
5159
:month="month"
5260
:day="day"
61+
:locale="locale"
5362
/>
5463
<template #fallback>
5564
<NuxtTime
@@ -59,6 +68,7 @@ const titleValue = computed(() => {
5968
:year="year"
6069
:month="month"
6170
:day="day"
71+
:locale="locale"
6272
/>
6373
</template>
6474
</ClientOnly>

0 commit comments

Comments
 (0)