|
1 | 1 | <script lang="ts"> |
2 | 2 | import { navigating, page } from "$app/state"; |
3 | | - import { ChevronRight, LoaderCircle, Rss } from "@lucide/svelte"; |
| 3 | + import { ChevronRight, CircleAlert, LoaderCircle, Rss } from "@lucide/svelte"; |
4 | 4 | import semver from "semver"; |
5 | 5 | import * as Accordion from "$lib/components/ui/accordion"; |
6 | 6 | import { Button } from "$lib/components/ui/button"; |
| 7 | + import * as Card from "$lib/components/ui/card"; |
7 | 8 | import * as Collapsible from "$lib/components/ui/collapsible"; |
8 | 9 | import { Separator } from "$lib/components/ui/separator"; |
9 | 10 | import { Skeleton } from "$lib/components/ui/skeleton"; |
10 | 11 | import AnimatedCollapsibleContent from "$lib/components/AnimatedCollapsibleContent.svelte"; |
| 12 | + import MarkdownRenderer from "$lib/components/MarkdownRenderer.svelte"; |
11 | 13 | import ReleaseCard from "./ReleaseCard.svelte"; |
12 | 14 |
|
13 | 15 | let { data } = $props(); |
|
128 | 130 | .map(({ id }) => id.toString())} |
129 | 131 | class="w-full space-y-2" |
130 | 132 | > |
| 133 | + {#if data.currentPackage.pkg.deprecated} |
| 134 | + <Card.Root class="border-amber-500 bg-amber-400/10 rounded-xl"> |
| 135 | + <Card.Header class="pb-6"> |
| 136 | + <Card.Title class="text-xl inline-flex items-center gap-2"> |
| 137 | + <CircleAlert class="size-5" /> |
| 138 | + Deprecated |
| 139 | + </Card.Title> |
| 140 | + <Card.Description> |
| 141 | + <MarkdownRenderer |
| 142 | + markdown={data.currentPackage.pkg.deprecated} |
| 143 | + inline |
| 144 | + class="text-sm text-muted-foreground" |
| 145 | + > |
| 146 | + {#snippet a({ style, children, class: className, title, href, hidden, type })} |
| 147 | + <a {style} class={className} {title} {href} {hidden} {type} target="_blank"> |
| 148 | + {@render children?.()} |
| 149 | + </a> |
| 150 | + {/snippet} |
| 151 | + </MarkdownRenderer> |
| 152 | + </Card.Description> |
| 153 | + </Card.Header> |
| 154 | + </Card.Root> |
| 155 | + {/if} |
131 | 156 | {#each displayableReleases as release, index (release.id)} |
132 | 157 | {@const semVersion = semver.coerce(release.cleanVersion)} |
133 | 158 | {@const isMajorRelease = |
|
0 commit comments