Skip to content

Commit 0198696

Browse files
committed
chore: sync
1 parent a04f84f commit 0198696

11 files changed

Lines changed: 368 additions & 43 deletions

app/components/OgImage/Package.takumi.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,21 +242,21 @@ const sparklineSrc = computed(() => {
242242
</div>
243243

244244
<div class="flex flex-col max-w-full gap-3">
245-
<div v-if="pkgOrg" class="lg:text-5xl text-3xl opacity-50 font-mono tracking-tight leading-none" :style="{ lineClamp: 1 }">
245+
<div v-if="pkgOrg" class="lg:text-5xl text-3xl opacity-50 font-mono tracking-tight leading-none" :style="{ textOverflow: 'ellipsis', lineClamp: 1 }">
246246
{{ pkgOrg }}
247247
</div>
248-
<div class="lg:text-7xl text-5xl tracking-tighter font-mono leading-none" :style="{ lineClamp: 1 }">
248+
<div class="tracking-tighter font-mono leading-none overflow-hidden" :class="(pkgShortName?.length ?? 0) > 20 ? 'lg:text-6xl text-4xl' : 'lg:text-7xl text-5xl'" :style="{ textOverflow: 'ellipsis', lineClamp: 1, wordBreak: 'break-all' }">
249249
{{ pkgShortName }}
250250
</div>
251-
<div v-if="version" class="pt-3 lg:text-4xl text-3xl opacity-70 font-mono tracking-tight leading-none" :style="{ lineClamp: 1 }">
251+
<div v-if="version" class="pt-3 lg:text-4xl text-3xl opacity-70 font-mono tracking-tight leading-none" :style="{ textOverflow: 'ellipsis', lineClamp: 1 }">
252252
v{{ version }}
253253
</div>
254254
</div>
255255

256256
<div class="flex items-center gap-5 text-4xl text-fg-muted">
257257
<div v-if="repositoryUrl" class="flex items-center gap-2">
258258
<div class="i-simple-icons:github w-8 h-8 text-white" />
259-
<span v-if="repoRef">
259+
<span v-if="repoRef" class="max-w-[500px]" :style="{ textOverflow: 'ellipsis' }">
260260
{{ repoRef.owner }}<span class="opacity-50">/</span>{{ repoRef.repo }}
261261
</span>
262262
<span v-else>{{ $t('package.links.repo') }}</span>

app/components/OgImage/Page.takumi.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const { name: siteName } = useSiteConfig()
2121
</div>
2222

2323
<div class="flex flex-col max-w-full gap-3">
24-
<div class="lg:text-7xl text-5xl tracking-tighter font-mono leading-none" :style="{ lineClamp: 1 }">
24+
<div class="lg:text-7xl text-5xl tracking-tighter font-mono leading-none" :style="{ lineClamp: 1, textOverflow: 'ellipsis' }">
2525
{{ title }}
2626
</div>
2727
</div>

app/pages/package-docs/[...path].vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ defineOgImage('Package.takumi', {
118118
{ key: 'whatsapp', width: 800, height: 800 },
119119
])
120120
121-
console.log('package docs!@@@@@@@@@@@@@@@@@')
122-
123121
const showLoading = computed(
124122
() => docsStatus.value === 'pending' || (docsStatus.value === 'idle' && docsUrl.value !== null),
125123
)

nuxt.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ export default defineNuxtConfig({
140140
'/package/:org/:name/_payload.json': getISRConfig(60, { fallback: 'json' }),
141141
'/package/:org/:name/v/:version/_payload.json': getISRConfig(60, { fallback: 'json' }),
142142
// infinite cache (versioned - doesn't change)
143-
// '/package-code/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
144-
// '/package-docs/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
143+
'/package-code/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
144+
'/package-docs/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
145145
// static pages
146146
'/': { prerender: true },
147147
'/200.html': { prerender: true },

test/e2e/og-image.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const testCases = [
1818
{ path: '/package/nuxt/v/4.3.1', label: 'unscoped with explicit version' },
1919
{ path: '/package/@nuxt/kit', label: 'scoped package' },
2020
{ path: '/package/@anthropic-ai/claude-code', label: 'scoped with long name' },
21-
{ path: '/package/typescript-eslint-parser-for-extra-long-name', label: 'extremely long name' },
21+
{ path: '/package/@babel/plugin-transform-exponentiation-operator', label: 'extremely long name' },
2222

2323
// Package code-tree variant (file tree decoration)
2424
{ path: '/package-code/vue/v/3.5.27', label: 'code-tree variant' },
255 KB
Loading
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"downloads": 8542310,
3+
"start": "2025-02-18",
4+
"end": "2025-02-25",
5+
"package": "@babel/plugin-transform-exponentiation-operator"
6+
}

test/fixtures/npm-api/downloads/typescript-eslint-parser-for-extra-long-name.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)