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

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

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

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

