Skip to content

Commit 3d53a70

Browse files
Merge branch 'main' into fix/org
2 parents 6e49401 + ad2b174 commit 3d53a70

File tree

8 files changed

+368
-347
lines changed

8 files changed

+368
-347
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ We welcome contributions – please do feel free to explore the project and
159159
- [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).
160160
- [npmx-digest](https://npmx-digest.trueberryless.org/) – An automated news aggregation website that summarizes npmx activity from GitHub and Bluesky every 8 hours.
161161
- [npmx-redirect](https://github.com/iaverages/npmx-redirect) – Browser extension that automatically redirects npmjs.com URLs to npmx.dev.
162+
- [npmx-badge](https://npmx-badge.vercel.app/) – A playground to help you create custom badges quickly.
162163

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

app/components/Package/SelectionView.vue

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ defineProps<{
33
viewMode?: ViewMode
44
}>()
55
6-
const { selectedPackages, clearSelectedPackages, selectedPackagesParam, closeSelectionView } =
7-
usePackageSelection()
6+
const { selectedPackages, clearSelectedPackages, selectedPackagesParam } = usePackageSelection()
87
98
const { data, pending } = useAsyncData(
109
async () => {
@@ -25,16 +24,7 @@ const { data, pending } = useAsyncData(
2524

2625
<template>
2726
<section>
28-
<header class="mb-6 flex items-center justify-between">
29-
<button
30-
type="button"
31-
class="cursor-pointer inline-flex items-center gap-2 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded focus-visible:outline-accent/70"
32-
@click="closeSelectionView"
33-
:aria-label="$t('nav.back')"
34-
>
35-
<span class="i-lucide:arrow-left rtl-flip w-4 h-4" aria-hidden="true" />
36-
<span class="hidden sm:inline">{{ $t('nav.back') }}</span>
37-
</button>
27+
<header class="mb-6 flex items-center justify-end">
3828
<div class="flex items-center gap-2">
3929
<ButtonBase variant="secondary" @click="clearSelectedPackages">
4030
{{ $t('filters.clear_all') }}

app/components/Package/WeeklyDownloadStats.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ const dataset = computed<VueUiSparklineDatasetItem[]>(() =>
208208
209209
const lastDatapoint = computed(() => dataset.value.at(-1)?.period ?? '')
210210
211-
const isLoop = shallowRef(false)
212211
const showPulse = shallowRef(true)
213212
const keyboardShortcuts = useKeyboardShortcuts()
214213
@@ -307,7 +306,7 @@ function layEgg() {
307306
showPulse.value = false
308307
nextTick(() => {
309308
showPulse.value = true
310-
isLoop.value = !isLoop.value
309+
settings.value.enableGraphPulseLooping = !settings.value.enableGraphPulseLooping
311310
playEggPulse()
312311
})
313312
}
@@ -356,7 +355,7 @@ const config = computed<VueUiSparklineConfig>(() => {
356355
color: colors.value.borderHover,
357356
pulse: {
358357
show: showPulse.value, // the pulse will not show if prefers-reduced-motion (enforced by vue-data-ui)
359-
loop: isLoop.value,
358+
loop: settings.value.enableGraphPulseLooping,
360359
radius: 1.5,
361360
color: pulseColor.value!,
362361
easing: 'ease-in-out',

app/composables/useSettings.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export interface AppSettings {
2323
preferredBackgroundTheme: BackgroundThemeId | null
2424
/** Hide platform-specific packages (e.g., @scope/pkg-linux-x64) from search results */
2525
hidePlatformPackages: boolean
26+
/** Enable weekly download graph pulse looping animation */
27+
enableGraphPulseLooping: boolean
2628
/** User-selected locale */
2729
selectedLocale: LocaleObject['code'] | null
2830
/** Search provider for package search */
@@ -52,6 +54,7 @@ const DEFAULT_SETTINGS: AppSettings = {
5254
includeTypesInInstall: true,
5355
accentColorId: null,
5456
hidePlatformPackages: true,
57+
enableGraphPulseLooping: false,
5558
selectedLocale: null,
5659
preferredBackgroundTheme: null,
5760
searchProvider: import.meta.test ? 'npm' : 'algolia',

app/pages/settings.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ const setLocale: typeof setNuxti18nLocale = newLocale => {
142142
:description="$t('settings.hide_platform_packages_description')"
143143
v-model="settings.hidePlatformPackages"
144144
/>
145+
146+
<!-- Divider -->
147+
<div class="border-t border-border my-4" />
148+
149+
<!-- Enable weekly download graph pulse looping animation -->
150+
<SettingsToggle
151+
:label="$t('settings.enable_graph_pulse_loop')"
152+
:description="$t('settings.enable_graph_pulse_loop_description')"
153+
v-model="settings.enableGraphPulseLooping"
154+
/>
145155
</div>
146156
</section>
147157

i18n/locales/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@
138138
"include_types_description": "Add {'@'}types package to install commands for untyped packages",
139139
"hide_platform_packages": "Hide platform-specific packages in search",
140140
"hide_platform_packages_description": "Hide native binary packages like {'@'}esbuild/linux-x64 from results",
141+
"enable_graph_pulse_loop": "Enable looping of pulse effect on mini graph",
142+
"enable_graph_pulse_loop_description": "Activate a continuous pulse animation on the weekly download graph. This animation may be distracting for some users.",
141143
"theme": "Theme",
142144
"theme_light": "Light",
143145
"theme_dark": "Dark",

0 commit comments

Comments
 (0)