Skip to content

Commit e7324cd

Browse files
committed
feat/search-improvements resolve conflicts
2 parents a4c4128 + db829cc commit e7324cd

88 files changed

Lines changed: 1227 additions & 555 deletions

Some content is hidden

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

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#secure password, can use openssl rand --hex 32
1+
#secure password, can use openssl rand -hex 32
22
NUXT_SESSION_PASSWORD=""

app/assets/main.css

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77

88
:root[data-theme='dark'] {
99
/* background colors */
10-
--bg: oklch(0.145 0 0);
11-
--bg-subtle: oklch(0.178 0 0);
12-
--bg-muted: oklch(0.218 0 0);
13-
--bg-elevated: oklch(0.252 0 0);
10+
--bg: var(--bg-color, oklch(0.145 0 0));
11+
--bg-subtle: var(--bg-subtle-color, oklch(0.178 0 0));
12+
--bg-muted: var(--bg-muted-color, oklch(0.218 0 0));
13+
--bg-elevated: var(--bg-elevated-color, oklch(0.252 0 0));
1414

1515
/* text colors */
1616
--fg: oklch(0.985 0 0);
1717
--fg-muted: oklch(0.709 0 0);
1818
--fg-subtle: oklch(0.633 0 0);
1919

20-
/* border, seperator colors */
20+
/* border, separator colors */
2121
--border: oklch(0.269 0 0);
2222
--border-subtle: oklch(0.239 0 0);
2323
--border-hover: oklch(0.371 0 0);
@@ -43,11 +43,39 @@
4343
--badge-pink: oklch(0.584 0.189 343);
4444
}
4545

46+
:root[data-theme='dark'][data-bg-theme='slate'] {
47+
--bg: oklch(0.129 0.012 264.695);
48+
--bg-subtle: oklch(0.159 0.022 262.421);
49+
--bg-muted: oklch(0.204 0.033 261.234);
50+
--bg-elevated: oklch(0.259 0.041 260.031);
51+
}
52+
53+
:root[data-theme='dark'][data-bg-theme='zinc'] {
54+
--bg: oklch(0.141 0.005 285.823);
55+
--bg-subtle: oklch(0.168 0.005 285.894);
56+
--bg-muted: oklch(0.209 0.005 285.929);
57+
--bg-elevated: oklch(0.256 0.006 286.033);
58+
}
59+
60+
:root[data-theme='dark'][data-bg-theme='stone'] {
61+
--bg: oklch(0.147 0.004 49.25);
62+
--bg-subtle: oklch(0.178 0.004 49.321);
63+
--bg-muted: oklch(0.218 0.004 49.386);
64+
--bg-elevated: oklch(0.252 0.007 34.298);
65+
}
66+
67+
:root[data-theme='dark'][data-bg-theme='black'] {
68+
--bg: oklch(0 0 0);
69+
--bg-subtle: oklch(0.148 0 0);
70+
--bg-muted: oklch(0.204 0 0);
71+
--bg-elevated: oklch(0.264 0 0);
72+
}
73+
4674
:root[data-theme='light'] {
47-
--bg: oklch(1 0 0);
48-
--bg-subtle: oklch(0.979 0.001 286.375);
49-
--bg-muted: oklch(0.955 0 0);
50-
--bg-elevated: oklch(0.94 0 0);
75+
--bg: var(--bg-color, oklch(1 0 0));
76+
--bg-subtle: var(--bg-subtle-color, oklch(0.979 0.001 286.375));
77+
--bg-muted: var(--bg-muted-color, oklch(0.955 0 0));
78+
--bg-elevated: var(--bg-elevated-color, oklch(0.94 0 0));
5179

5280
--fg: oklch(0.145 0 0);
5381
--fg-muted: oklch(0.439 0 0);
@@ -75,6 +103,27 @@
75103
--badge-cyan: oklch(0.571 0.181 210);
76104
}
77105

106+
:root[data-theme='light'][data-bg-theme='slate'] {
107+
--bg: oklch(1 0 0);
108+
--bg-subtle: oklch(0.982 0.006 264.62);
109+
--bg-muted: oklch(0.96 0.041 261.234);
110+
--bg-elevated: oklch(0.943 0.013 255.52);
111+
}
112+
113+
:root[data-theme='light'][data-bg-theme='zinc'] {
114+
--bg: oklch(1 0 0);
115+
--bg-subtle: oklch(0.979 0.004 286.53);
116+
--bg-muted: oklch(0.958 0.004 286.39);
117+
--bg-elevated: oklch(0.939 0.004 286.32);
118+
}
119+
120+
:root[data-theme='light'][data-bg-theme='stone'] {
121+
--bg: oklch(1 0 0);
122+
--bg-subtle: oklch(0.979 0.005 48.762);
123+
--bg-muted: oklch(0.958 0.005 48.743);
124+
--bg-elevated: oklch(0.943 0.005 48.731);
125+
}
126+
78127
@media (prefers-contrast: more) {
79128
:root[data-theme='dark'] {
80129
/* text colors */
@@ -199,6 +248,14 @@ button {
199248
background: #404040;
200249
}
201250

251+
/* Scrollbar styling for Firefox */
252+
@supports not selector(::-webkit-scrollbar) {
253+
* {
254+
scrollbar-width: thin;
255+
scrollbar-color: var(--border) var(--bg);
256+
}
257+
}
258+
202259
/* Shiki theme colors */
203260
html.light .shiki,
204261
html.light .shiki span {

app/components/BaseCard.vue

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<script setup lang="ts">
2+
defineProps<{
3+
/** Whether this is an exact match for the query */
4+
isExactMatch?: boolean
5+
}>()
6+
</script>
7+
8+
<template>
9+
<article
10+
class="group bg-bg-subtle border border-border rounded-lg p-4 sm:p-6 transition-[border-color,background-color] duration-200 hover:(border-border-hover bg-bg-muted) cursor-pointer relative focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-bg focus-within:ring-offset-2 focus-within:ring-fg/50 focus-within:bg-bg-muted focus-within:border-border-hover"
11+
:class="{
12+
'border-accent/30 contrast-more:border-accent/90 bg-accent/5': isExactMatch,
13+
}"
14+
>
15+
<!-- Glow effect for exact matches -->
16+
<div
17+
v-if="isExactMatch"
18+
class="absolute -inset-px rounded-lg bg-gradient-to-r from-accent/0 via-accent/20 to-accent/0 opacity-100 blur-sm -z-1 pointer-events-none motion-reduce:opacity-50"
19+
aria-hidden="true"
20+
/>
21+
<slot />
22+
</article>
23+
</template>

app/components/ColumnPicker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const columnLabelKey: Record<string, string> = {
4242
version: 'filters.columns.version',
4343
description: 'filters.columns.description',
4444
downloads: 'filters.columns.downloads',
45-
updated: 'filters.columns.updated',
45+
updated: 'filters.columns.published',
4646
maintainers: 'filters.columns.maintainers',
4747
keywords: 'filters.columns.keywords',
4848
qualityScore: 'filters.columns.quality_score',

app/components/Filter/Panel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ const hasActiveFilters = computed(() => !!filterSummary.value)
228228
:value="filters.text"
229229
:placeholder="searchPlaceholder"
230230
autocomplete="off"
231-
class="input-base"
231+
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)"
232232
@input="handleTextInput"
233233
/>
234234
</div>

app/components/Package/Card.vue

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,7 @@ const pkgDescription = useMarkdown(() => ({
3737
</script>
3838

3939
<template>
40-
<article
41-
class="group card-interactive scroll-mt-48 scroll-mb-6 relative focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-bg focus-within:ring-offset-2 focus-within:ring-fg/50 focus-within:bg-bg-muted focus-within:border-border-hover"
42-
:class="{
43-
'border-accent/30 contrast-more:border-accent/90 bg-accent/5': isExactMatch,
44-
}"
45-
>
46-
<!-- Glow effect for exact matches -->
47-
<div
48-
v-if="isExactMatch"
49-
class="absolute -inset-px rounded-lg bg-gradient-to-r from-accent/0 via-accent/20 to-accent/0 opacity-100 blur-sm -z-1 pointer-events-none motion-reduce:opacity-50"
50-
aria-hidden="true"
51-
/>
40+
<BaseCard :isExactMatch="isExactMatch">
5241
<div class="mb-2 flex items-baseline justify-start gap-2">
5342
<component
5443
:is="headingLevel ?? 'h3'"
@@ -102,7 +91,7 @@ const pkgDescription = useMarkdown(() => ({
10291
<dd class="font-mono">{{ result.package.publisher.username }}</dd>
10392
</div>
10493
<div v-if="result.package.date" class="flex items-center gap-1.5">
105-
<dt class="sr-only">{{ $t('package.card.updated') }}</dt>
94+
<dt class="sr-only">{{ $t('package.card.published') }}</dt>
10695
<dd>
10796
<DateTime
10897
:datetime="result.package.date"
@@ -185,5 +174,5 @@ const pkgDescription = useMarkdown(() => ({
185174
{{ keyword }}
186175
</button>
187176
</div>
188-
</article>
177+
</BaseCard>
189178
</template>

app/components/Package/ListControls.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const sortOptions = computed(
3333
() =>
3434
[
3535
{ value: 'downloads', label: $t('package.sort.downloads') },
36-
{ value: 'updated', label: $t('package.sort.updated') },
36+
{ value: 'updated', label: $t('package.sort.published') },
3737
{ value: 'name-asc', label: $t('package.sort.name_asc') },
3838
{ value: 'name-desc', label: $t('package.sort.name_desc') },
3939
] as const,

app/components/Package/ListToolbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const sortKeyLabelKeys: Record<SortKey, string> = {
9191
'downloads-day': 'filters.sort.downloads_day',
9292
'downloads-month': 'filters.sort.downloads_month',
9393
'downloads-year': 'filters.sort.downloads_year',
94-
'updated': 'filters.sort.updated',
94+
'updated': 'filters.sort.published',
9595
'name': 'filters.sort.name',
9696
'quality': 'filters.sort.quality',
9797
'popularity': 'filters.sort.popularity',

0 commit comments

Comments
 (0)