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

---
 .../jet/shelf/LargeStoryCardShelf.svelte           | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 src/components/jet/shelf/LargeStoryCardShelf.svelte

(limited to 'src/components/jet/shelf/LargeStoryCardShelf.svelte')

diff --git a/src/components/jet/shelf/LargeStoryCardShelf.svelte b/src/components/jet/shelf/LargeStoryCardShelf.svelte
new file mode 100644
index 0000000..c1a1e57
--- /dev/null
+++ b/src/components/jet/shelf/LargeStoryCardShelf.svelte
@@ -0,0 +1,32 @@
+<script lang="ts" context="module">
+    import type { Shelf, TodayCard } from '@jet-app/app-store/api/models';
+
+    interface LargeStoryCardShelf extends Shelf {
+        items: TodayCard[];
+    }
+
+    export function isLargeStoryCardShelf(
+        shelf: Shelf,
+    ): shelf is LargeStoryCardShelf {
+        return (
+            shelf.contentType === 'largeStoryCard' && Array.isArray(shelf.items)
+        );
+    }
+</script>
+
+<script lang="ts">
+    import HeroCarousel from '~/components/hero/Carousel.svelte';
+    import LargeStoryCardItem from '~/components/jet/item/LargeStoryCardItem.svelte';
+
+    export let shelf: LargeStoryCardShelf;
+
+    $: items = shelf.items;
+
+    function deriveBackgroundArtworkFromItem(item: TodayCard) {
+        return item.heroMedia?.artworks[0];
+    }
+</script>
+
+<HeroCarousel {shelf} {items} {deriveBackgroundArtworkFromItem} let:item>
+    <LargeStoryCardItem {item} />
+</HeroCarousel>
-- 
cgit v1.2.3

