From bce557cc2dc767628bed6aac87301a1be7c5431b Mon Sep 17 00:00:00 2001
From: rxliuli <rxliuli@gmail.com>
Date: Tue, 4 Nov 2025 05:03:50 +0800
Subject: init commit

---
 .../SmallStoryCardMediaBrandedSingleApp.svelte     | 69 ++++++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 src/components/jet/item/SmallStoryCardMediaBrandedSingleApp.svelte

(limited to 'src/components/jet/item/SmallStoryCardMediaBrandedSingleApp.svelte')

diff --git a/src/components/jet/item/SmallStoryCardMediaBrandedSingleApp.svelte b/src/components/jet/item/SmallStoryCardMediaBrandedSingleApp.svelte
new file mode 100644
index 0000000..ce7784b
--- /dev/null
+++ b/src/components/jet/item/SmallStoryCardMediaBrandedSingleApp.svelte
@@ -0,0 +1,69 @@
+<script lang="ts" context="module">
+    import type {
+        TodayCard,
+        TodayCardMediaBrandedSingleApp,
+    } from '@jet-app/app-store/api/models';
+
+    export interface SmallStoryCardMediaBrandedSingleApp extends TodayCard {
+        media: TodayCardMediaBrandedSingleApp;
+    }
+
+    export function isSmallStoryCardMediaBrandedSingleApp(
+        item: TodayCard,
+    ): item is SmallStoryCardMediaBrandedSingleApp {
+        return !!item.media && item.media.kind === 'brandedSingleApp';
+    }
+</script>
+
+<script lang="ts">
+    import Artwork from '~/components/Artwork.svelte';
+    import HoverWrapper from '~/components/HoverWrapper.svelte';
+    import LinkWrapper from '~/components/LinkWrapper.svelte';
+
+    export let item: SmallStoryCardMediaBrandedSingleApp;
+
+    $: artwork = item.media.artworks?.[0] || item.media.icon;
+</script>
+
+<article>
+    <LinkWrapper action={item.clickAction}>
+        <HoverWrapper element="div">
+            <Artwork {artwork} profile="brick" useCropCodeFromArtwork={false} />
+        </HoverWrapper>
+
+        <div class="text-container">
+            <h4>{item.heading}</h4>
+            <h3>{item.title}</h3>
+            <p>{item.inlineDescription}</p>
+        </div>
+    </LinkWrapper>
+</article>
+
+<style>
+    article {
+        aspect-ratio: 16/9;
+    }
+
+    .text-container {
+        gap: 4px;
+        display: flex;
+        flex-direction: column;
+        margin-top: 8px;
+    }
+
+    h3 {
+        font: var(--title-3);
+    }
+
+    h4 {
+        margin-bottom: 2px;
+        font: var(--callout-emphasized);
+        color: var(--systemSecondary);
+    }
+
+    p {
+        font: var(--body-tall);
+        color: var(--systemSecondary);
+        text-wrap: pretty;
+    }
+</style>
-- 
cgit v1.2.3

