|
7 | 7 | import semver from "semver"; |
8 | 8 | import { ALL_SLUG } from "$lib/types"; |
9 | 9 | import * as Accordion from "$lib/components/ui/accordion"; |
10 | | - import * as Alert from "$lib/components/ui/alert"; |
11 | 10 | import { Button } from "$lib/components/ui/button"; |
12 | 11 | import * as Collapsible from "$lib/components/ui/collapsible"; |
13 | 12 | import { Separator } from "$lib/components/ui/separator"; |
14 | 13 | import { Skeleton } from "$lib/components/ui/skeleton"; |
15 | 14 | import AnimatedButton from "$lib/components/AnimatedButton.svelte"; |
16 | 15 | import AnimatedCollapsibleContent from "$lib/components/AnimatedCollapsibleContent.svelte"; |
17 | | - import MarkdownRenderer from "$lib/components/MarkdownRenderer.svelte"; |
18 | 16 | import { getPackageSettings } from "../settings.svelte"; |
19 | 17 | import type { Snapshot } from "./$types"; |
| 18 | + import HeaderBanner from "./HeaderBanner.svelte"; |
20 | 19 | import ReleaseCard from "./ReleaseCard.svelte"; |
21 | 20 |
|
22 | 21 | const loadingSentences = [ |
|
224 | 223 | </div> |
225 | 224 | <Accordion.Root type="multiple" bind:value={expandableReleases} class="w-full space-y-2"> |
226 | 225 | {#if data.currentPackage.pkg.deprecated} |
227 | | - <Alert.Root class="rounded-md border-amber-500 bg-amber-400/10"> |
228 | | - <CircleAlert class="size-4" /> |
229 | | - <Alert.Title>Deprecated</Alert.Title> |
230 | | - <Alert.Description> |
231 | | - <MarkdownRenderer |
232 | | - markdown={data.currentPackage.pkg.deprecated} |
233 | | - inline |
234 | | - class="max-w-full text-sm text-muted-foreground" |
235 | | - > |
236 | | - {#snippet a({ children, ...rest })} |
237 | | - <a {...rest} target="_blank"> |
238 | | - {@render children?.()} |
239 | | - </a> |
240 | | - {/snippet} |
241 | | - </MarkdownRenderer> |
242 | | - </Alert.Description> |
243 | | - </Alert.Root> |
| 226 | + <HeaderBanner |
| 227 | + icon={CircleAlert} |
| 228 | + title="Deprecated" |
| 229 | + markdown={data.currentPackage.pkg.deprecated} |
| 230 | + class="rounded-md border-amber-500 bg-amber-400/10" |
| 231 | + /> |
| 232 | + {/if} |
| 233 | + {#if data.currentPackage.pkg.name === "prettier-plugin-svelte"} |
| 234 | + {@const markdown = |
| 235 | + "This package has trouble tagging its releases, and some updates can be missing here. Visit [this issue](https://github.com/sveltejs/prettier-plugin-svelte/issues/497) for more information."} |
| 236 | + <HeaderBanner |
| 237 | + icon={CircleAlert} |
| 238 | + title="Note" |
| 239 | + {markdown} |
| 240 | + class="rounded-md border-sky-500 bg-sky-400/20" |
| 241 | + /> |
244 | 242 | {/if} |
245 | 243 | {#each displayableReleases as release, index (release.id)} |
246 | 244 | {@const semVersion = semver.coerce(release.cleanVersion)} |
|
0 commit comments