Skip to content

Commit 264e327

Browse files
committed
Merge remote-tracking branch 'origin/main' into Yusra89hash/main
2 parents 49a9e70 + 0f52b01 commit 264e327

85 files changed

Lines changed: 2955 additions & 1187 deletions

Some content is hidden

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

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
node-version: lts/*
2626

27-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
27+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
2828
name: 🟧 Install pnpm
2929
with:
3030
cache: true

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
node-version: lts/*
3333

34-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
34+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
3535
name: 🟧 Install pnpm
3636
with:
3737
cache: true
@@ -53,7 +53,7 @@ jobs:
5353
with:
5454
node-version: lts/*
5555

56-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
56+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
5757
name: 🟧 Install pnpm
5858
with:
5959
cache: true
@@ -75,7 +75,7 @@ jobs:
7575
with:
7676
node-version: lts/*
7777

78-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
78+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
7979
name: 🟧 Install pnpm
8080
with:
8181
cache: true
@@ -103,7 +103,7 @@ jobs:
103103
with:
104104
node-version: lts/*
105105

106-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
106+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
107107
name: 🟧 Install pnpm
108108
with:
109109
cache: true
@@ -142,7 +142,7 @@ jobs:
142142
with:
143143
node-version: lts/*
144144

145-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
145+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
146146
name: 🟧 Install pnpm
147147
with:
148148
cache: true
@@ -172,7 +172,7 @@ jobs:
172172
with:
173173
node-version: lts/*
174174

175-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
175+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
176176
name: 🟧 Install pnpm
177177
with:
178178
cache: true
@@ -200,7 +200,7 @@ jobs:
200200
with:
201201
node-version: lts/*
202202

203-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
203+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
204204
name: 🟧 Install pnpm
205205
with:
206206
cache: true
@@ -225,7 +225,7 @@ jobs:
225225
with:
226226
node-version: lts/*
227227

228-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
228+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
229229
name: 🟧 Install pnpm
230230
with:
231231
cache: true

.github/workflows/lunaria.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
node-version: lts/*
3434

35-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
35+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
3636
name: 🟧 Install pnpm
3737
with:
3838
cache: true

.github/workflows/welcome.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: 🎉 Welcome new contributor
1717
steps:
1818
- name: 🎉 Welcome new contributor
19-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
19+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
2020
with:
2121
script: |
2222
const pr = context.payload.pull_request;

app/components/CallToAction.vue

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ const socialLinks = computed(() => [
2525
ctaKey: $t('about.get_involved.follow.cta'),
2626
},
2727
])
28+
29+
function handleCardClick(event: MouseEvent) {
30+
if ((event.target as HTMLElement).closest(':any-link')) return
31+
if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return
32+
33+
const selection = window.getSelection()
34+
if (selection && selection.type === 'Range') return
35+
36+
const card = event.currentTarget as HTMLElement
37+
const link = card.querySelector('a')
38+
link?.click()
39+
}
2840
</script>
2941

3042
<template>
@@ -37,15 +49,16 @@ const socialLinks = computed(() => [
3749
<div
3850
v-for="link in socialLinks"
3951
:key="link.id"
40-
class="group relative grid gap-3 p-4 rounded-lg bg-bg-subtle hover:bg-bg-elevated border border-border hover:border-border-hover transition-all duration-200 sm:grid-rows-subgrid sm:row-span-3 focus-within:ring-2 focus-within:ring-accent/50"
52+
@click="handleCardClick"
53+
class="cursor-pointer group relative grid gap-3 p-4 rounded-lg bg-bg-subtle hover:bg-bg-elevated border border-border hover:border-border-hover transition-all duration-200 sm:grid-rows-subgrid sm:row-span-3 focus-within:ring-2 focus-within:ring-accent/50"
4154
>
42-
<h3 class="z-1 flex gap-2">
55+
<h3 class="flex gap-2">
4356
<span :class="link.icon" class="shrink-0 mt-1 w-5 h-5 text-fg" aria-hidden="true" />
4457
<span class="font-medium text-fg">
4558
{{ link.titleKey }}
4659
</span>
4760
</h3>
48-
<p class="z-1 text-sm text-fg-muted leading-relaxed">
61+
<p class="text-sm text-fg-muted leading-relaxed">
4962
{{ link.descriptionKey }}
5063
</p>
5164
<a
@@ -56,7 +69,6 @@ const socialLinks = computed(() => [
5669
>
5770
{{ link.ctaKey }}
5871
<span class="i-lucide:arrow-right rtl-flip w-3 h-3" aria-hidden="true" />
59-
<span class="absolute z-0 inset-0" aria-hidden="true" />
6072
</a>
6173
</div>
6274
</div>

app/components/Code/DirectoryListing.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,7 @@ const bytesFormatter = useBytesFormatter()
120120
</svg>
121121
<span class="w-full flex justify-self-stretch items-center gap-2">
122122
<span class="flex-1">{{ node.name }}</span>
123-
<span
124-
v-if="node.type === 'file' && node.size"
125-
class="text-end text-xs text-fg-subtle"
126-
>
123+
<span v-if="typeof node.size === 'number'" class="text-end text-xs text-fg-subtle">
127124
{{ bytesFormatter.format(node.size) }}
128125
</span>
129126
</span>

app/components/Compare/PackageSelector.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,20 @@ function handleKeydown(e: KeyboardEvent) {
105105
case 'ArrowDown':
106106
e.preventDefault()
107107
if (count === 0) return
108-
highlightedIndex.value = Math.min(highlightedIndex.value + 1, count - 1)
108+
if (highlightedIndex.value < count - 1) {
109+
highlightedIndex.value++
110+
} else {
111+
highlightedIndex.value = 0
112+
}
109113
break
110114
111115
case 'ArrowUp':
112116
e.preventDefault()
113117
if (count === 0) return
114118
if (highlightedIndex.value > 0) {
115119
highlightedIndex.value--
120+
} else {
121+
highlightedIndex.value = count - 1
116122
}
117123
break
118124

app/components/Package/ClaimPackageModal.vue

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { checkPackageName } from '~/utils/package-name'
33
44
const props = defineProps<{
55
packageName: string
6+
packageScope?: string | null
7+
canPublishToScope: boolean
68
}>()
79
810
const {
@@ -221,9 +223,19 @@ const previewPackageJson = computed(() => {
221223
</div>
222224

223225
<!-- Availability status -->
224-
<div v-if="checkResult.valid">
226+
<template v-if="checkResult.valid">
225227
<div
226-
v-if="checkResult.available"
228+
v-if="isConnected && !canPublishToScope"
229+
class="flex items-center gap-3 p-4 bg-red-500/10 border border-red-500/20 rounded-lg"
230+
>
231+
<span class="i-lucide:x text-red-500 w-5 h-5" aria-hidden="true" />
232+
<p class="font-mono text-sm text-fg">
233+
{{ $t('claim.modal.missing_permission', { scope: packageScope }) }}
234+
</p>
235+
</div>
236+
237+
<div
238+
v-else-if="checkResult.available"
227239
class="flex items-center gap-3 p-4 bg-green-500/10 border border-green-500/20 rounded-lg"
228240
>
229241
<span class="i-lucide:check text-green-500 w-5 h-5" aria-hidden="true" />
@@ -237,10 +249,10 @@ const previewPackageJson = computed(() => {
237249
<span class="i-lucide:x text-red-500 w-5 h-5" aria-hidden="true" />
238250
<p class="font-mono text-sm text-fg">{{ $t('claim.modal.taken') }}</p>
239251
</div>
240-
</div>
252+
</template>
241253

242254
<!-- Similar packages warning -->
243-
<div v-if="checkResult.similarPackages?.length && checkResult.available">
255+
<template v-if="checkResult.similarPackages?.length && checkResult.available">
244256
<div
245257
:class="
246258
hasDangerousSimilarPackages
@@ -290,7 +302,7 @@ const previewPackageJson = computed(() => {
290302
</li>
291303
</ul>
292304
</div>
293-
</div>
305+
</template>
294306

295307
<!-- Error message -->
296308
<div
@@ -336,7 +348,7 @@ const previewPackageJson = computed(() => {
336348
</div>
337349

338350
<!-- Claim button -->
339-
<div v-else class="space-y-3">
351+
<div v-else-if="isConnected && canPublishToScope" class="space-y-3">
340352
<p class="text-sm text-fg-muted">
341353
{{ $t('claim.modal.publish_hint') }}
342354
</p>

app/components/Package/SkillsModal.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ function getWarningTooltip(skill: SkillListItem): string | undefined {
170170
aria-hidden="true"
171171
:text="getWarningTooltip(skill)"
172172
to="#skills-modal"
173+
defer
173174
>
174175
<span class="i-lucide:circle-alert w-3.5 h-3.5 text-amber-500" />
175176
</TooltipApp>

app/components/Package/Table.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function getColumnLabel(id: ColumnId): string {
193193
<template v-if="isSortable('downloads')">
194194
<span
195195
v-if="isColumnSorted('downloads')"
196-
class="i-lucide:caret-down w-3 h-3"
196+
class="i-lucide:chevron-down w-3 h-3"
197197
:class="getSortDirection('downloads') === 'asc' ? 'rotate-180' : ''"
198198
aria-hidden="true"
199199
/>
@@ -231,7 +231,7 @@ function getColumnLabel(id: ColumnId): string {
231231
<template v-if="isSortable('updated')">
232232
<span
233233
v-if="isColumnSorted('updated')"
234-
class="i-lucide:caret-down w-3 h-3"
234+
class="i-lucide:chevron-down w-3 h-3"
235235
:class="getSortDirection('updated') === 'asc' ? 'rotate-180' : ''"
236236
aria-hidden="true"
237237
/>

0 commit comments

Comments
 (0)