From 778cfb11f5aaa58d7fdd9953e0225ea6dbc02134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Sun, 1 Feb 2026 00:57:42 +0100 Subject: [PATCH 01/11] refactor: extract reusable Card component --- app/components/Card.vue | 26 +++++++++++++++++++++++++ app/components/PackageCard.vue | 16 ++------------- app/components/SearchSuggestionCard.vue | 16 ++------------- uno.config.ts | 7 ------- 4 files changed, 30 insertions(+), 35 deletions(-) create mode 100644 app/components/Card.vue diff --git a/app/components/Card.vue b/app/components/Card.vue new file mode 100644 index 000000000..6bed3d442 --- /dev/null +++ b/app/components/Card.vue @@ -0,0 +1,26 @@ + + + diff --git a/app/components/PackageCard.vue b/app/components/PackageCard.vue index 51e835f28..0d2e95d70 100644 --- a/app/components/PackageCard.vue +++ b/app/components/PackageCard.vue @@ -27,19 +27,7 @@ const emit = defineEmits<{ diff --git a/app/components/SearchSuggestionCard.vue b/app/components/SearchSuggestionCard.vue index 7760b3c9c..c11a67764 100644 --- a/app/components/SearchSuggestionCard.vue +++ b/app/components/SearchSuggestionCard.vue @@ -18,19 +18,7 @@ const emit = defineEmits<{ diff --git a/uno.config.ts b/uno.config.ts index d87a7898a..bd76a8dcf 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -136,13 +136,6 @@ export default defineConfig({ ], ['link-subtle', 'text-fg-muted hover:text-fg transition-colors duration-200 focus-ring'], - // Cards - [ - 'card', - 'bg-bg-subtle border border-border rounded-lg p-4 sm:p-6 transition-[border-color,background-color] duration-200', - ], - ['card-interactive', 'card hover:(border-border-hover bg-bg-muted) cursor-pointer'], - // Form elements [ 'input-base', From 18b87a526704bd0207831d6884118d13fb72cb57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Sun, 1 Feb 2026 01:11:27 +0100 Subject: [PATCH 02/11] refactor: replace single use class-shortcut with atomic classes --- app/components/PackageSkeleton.vue | 4 +++- uno.config.ts | 6 ------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/components/PackageSkeleton.vue b/app/components/PackageSkeleton.vue index 103e39b2c..b49ea7324 100644 --- a/app/components/PackageSkeleton.vue +++ b/app/components/PackageSkeleton.vue @@ -110,7 +110,9 @@
-
+
diff --git a/uno.config.ts b/uno.config.ts index bd76a8dcf..85249d0f2 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -157,12 +157,6 @@ export default defineConfig({ ['badge-pink', 'bg-badge-pink/10 text-badge-pink'], ['badge-subtle', 'bg-bg-subtle text-fg-subtle'], - // Code blocks - [ - 'code-block', - 'bg-bg-muted border border-border rounded-md p-4 font-mono text-sm overflow-x-auto', - ], - // Skeleton loading ['skeleton', 'bg-bg-elevated rounded animate-skeleton-pulse'], From 9ac4b654dfe01f567bf60a76dfc7ede562513ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Sun, 1 Feb 2026 01:14:46 +0100 Subject: [PATCH 03/11] refactor: remove unused class-shortcut --- uno.config.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/uno.config.ts b/uno.config.ts index 85249d0f2..630ec4b92 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -162,9 +162,6 @@ export default defineConfig({ // Subtle divider ['divider', 'border-t border-border'], - - // Section spacing - ['section', 'py-8 sm:py-12'], ], rules: [ // Custom scale for active states From 136872f6ebb10849d06b3164a00d1a256829f5c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Sun, 1 Feb 2026 01:18:30 +0100 Subject: [PATCH 04/11] refactor: remove unused class-shortcut --- uno.config.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/uno.config.ts b/uno.config.ts index 630ec4b92..e87a991fc 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -159,9 +159,6 @@ export default defineConfig({ // Skeleton loading ['skeleton', 'bg-bg-elevated rounded animate-skeleton-pulse'], - - // Subtle divider - ['divider', 'border-t border-border'], ], rules: [ // Custom scale for active states From 18e2f54046d418f15290bc40a01bf1a1ed21cba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Sun, 1 Feb 2026 03:34:07 +0100 Subject: [PATCH 05/11] refactor: Extract reusable Skeleton components --- app/components/PackageSkeleton.vue | 106 +++++++++--------- app/components/PackageWeeklyDownloadStats.vue | 8 +- app/components/SkeletonBlock.vue | 10 ++ app/components/SkeletonInline.vue | 12 ++ app/components/Toggle.server.vue | 2 +- app/pages/[...package].vue | 8 +- app/pages/code/[...path].vue | 36 +++--- app/pages/docs/[...path].vue | 8 +- app/pages/~[username]/orgs.vue | 7 +- uno.config.ts | 3 - 10 files changed, 108 insertions(+), 92 deletions(-) create mode 100644 app/components/SkeletonBlock.vue create mode 100644 app/components/SkeletonInline.vue diff --git a/app/components/PackageSkeleton.vue b/app/components/PackageSkeleton.vue index b49ea7324..9bac0da4e 100644 --- a/app/components/PackageSkeleton.vue +++ b/app/components/PackageSkeleton.vue @@ -12,20 +12,20 @@

- +

- - - + + +
- +
@@ -36,7 +36,7 @@ {{ $t('package.skeleton.license') }}
- +
@@ -46,7 +46,7 @@ {{ $t('package.skeleton.weekly') }}
- +
@@ -56,7 +56,7 @@ {{ $t('package.skeleton.size') }}
- +
@@ -66,7 +66,7 @@ {{ $t('package.skeleton.deps') }}
- +
@@ -76,7 +76,7 @@ {{ $t('package.skeleton.updated') }}
- +
@@ -85,16 +85,16 @@ @@ -113,9 +113,9 @@
- +
- + @@ -133,20 +133,20 @@
- + - - - + + + - - - - + + + + -
- - + + +
@@ -163,10 +163,10 @@
  • - +
  • - +
@@ -181,12 +181,12 @@
    -
  • -
  • -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
  • +
  • +
@@ -201,24 +201,24 @@
- - + +
- - + +
- - + +
- - + +
- - + +
@@ -234,20 +234,20 @@
  • - - + +
  • - - + +
  • - - + +
  • - - + +
diff --git a/app/components/PackageWeeklyDownloadStats.vue b/app/components/PackageWeeklyDownloadStats.vue index 7c986f13c..214c8502d 100644 --- a/app/components/PackageWeeklyDownloadStats.vue +++ b/app/components/PackageWeeklyDownloadStats.vue @@ -217,20 +217,20 @@ const config = computed(() => {
- +
- +
-
diff --git a/app/components/SkeletonBlock.vue b/app/components/SkeletonBlock.vue new file mode 100644 index 000000000..c455c8979 --- /dev/null +++ b/app/components/SkeletonBlock.vue @@ -0,0 +1,10 @@ + + + + diff --git a/app/components/SkeletonInline.vue b/app/components/SkeletonInline.vue new file mode 100644 index 000000000..dbfb255e7 --- /dev/null +++ b/app/components/SkeletonInline.vue @@ -0,0 +1,12 @@ + + + + diff --git a/app/components/Toggle.server.vue b/app/components/Toggle.server.vue index 71d4e4ee9..293618c67 100644 --- a/app/components/Toggle.server.vue +++ b/app/components/Toggle.server.vue @@ -10,7 +10,7 @@ defineProps<{ {{ label }} - +

{{ description }} diff --git a/app/pages/[...package].vue b/app/pages/[...package].vue index 7f5b066b3..8debfb5b1 100644 --- a/app/pages/[...package].vue +++ b/app/pages/[...package].vue @@ -455,10 +455,10 @@ function handleClick(event: MouseEvent) { class="self-baseline ms-1 sm:ms-2" /> diff --git a/app/pages/code/[...path].vue b/app/pages/code/[...path].vue index 966bf18cb..02e3e9d12 100644 --- a/app/pages/code/[...path].vue +++ b/app/pages/code/[...path].vue @@ -482,31 +482,31 @@ defineOgImageComponent('Default', {

- +
-
-
-
+ + +
-
-
-
-
+ + + +
-
-
-
-
+ + + +
-
-
-
-
-
-
+ + + + + +
diff --git a/app/pages/docs/[...path].vue b/app/pages/docs/[...path].vue index c592c5d4e..de9efc329 100644 --- a/app/pages/docs/[...path].vue +++ b/app/pages/docs/[...path].vue @@ -165,10 +165,10 @@ const showEmptyState = computed(() => docsData.value?.status !== 'ok')
-
-
-
-
+ + + +
diff --git a/app/pages/~[username]/orgs.vue b/app/pages/~[username]/orgs.vue index aefbebe6f..b81b1a38c 100644 --- a/app/pages/~[username]/orgs.vue +++ b/app/pages/~[username]/orgs.vue @@ -216,10 +216,7 @@ defineOgImageComponent('Default', { > {{ org.role }} - +
@@ -236,7 +233,7 @@ defineOgImageComponent('Default', { ) }} - +
diff --git a/uno.config.ts b/uno.config.ts index e87a991fc..8d0795841 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -156,9 +156,6 @@ export default defineConfig({ ['badge-purple', 'bg-badge-purple/10 text-badge-purple'], ['badge-pink', 'bg-badge-pink/10 text-badge-pink'], ['badge-subtle', 'bg-bg-subtle text-fg-subtle'], - - // Skeleton loading - ['skeleton', 'bg-bg-elevated rounded animate-skeleton-pulse'], ], rules: [ // Custom scale for active states From 740fbc7772cb1e7824383bd8302c08123da82337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Sun, 1 Feb 2026 03:47:01 +0100 Subject: [PATCH 06/11] refactor: replace single use class-shortcut with atomic classes --- app/components/FilterPanel.vue | 2 +- uno.config.ts | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/components/FilterPanel.vue b/app/components/FilterPanel.vue index e244829df..349b174da 100644 --- a/app/components/FilterPanel.vue +++ b/app/components/FilterPanel.vue @@ -228,7 +228,7 @@ const hasActiveFilters = computed(() => !!filterSummary.value) :value="filters.text" :placeholder="searchPlaceholder" autocomplete="off" - class="input-base" + class="w-full bg-bg-subtle border border-border rounded-md px-4 py-3 font-mono text-sm text-fg placeholder:text-fg-subtle transition-all duration-200 focus:(border-fg/40 outline-none ring-1 ring-fg/10)" @input="handleTextInput" />
diff --git a/uno.config.ts b/uno.config.ts index 8d0795841..5e552d751 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -136,12 +136,6 @@ export default defineConfig({ ], ['link-subtle', 'text-fg-muted hover:text-fg transition-colors duration-200 focus-ring'], - // Form elements - [ - 'input-base', - 'w-full bg-bg-subtle border border-border rounded-md px-4 py-3 font-mono text-sm text-fg placeholder:text-fg-subtle transition-all duration-200 focus:(border-fg/40 outline-none ring-1 ring-fg/10)', - ], - // Tags/badges [ 'tag', From 05fc0002ec6725d5e465078146b0e0ac26605c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Sun, 1 Feb 2026 04:17:13 +0100 Subject: [PATCH 07/11] Remove unused prop This was changed in #587 --- app/components/Card.vue | 3 --- app/components/PackageCard.vue | 2 +- app/components/SearchSuggestionCard.vue | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/components/Card.vue b/app/components/Card.vue index 2e7bfe48c..191070f21 100644 --- a/app/components/Card.vue +++ b/app/components/Card.vue @@ -1,7 +1,5 @@