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/PageHeaderShelf.svelte | 34 +++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 src/components/jet/shelf/PageHeaderShelf.svelte

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

diff --git a/src/components/jet/shelf/PageHeaderShelf.svelte b/src/components/jet/shelf/PageHeaderShelf.svelte
new file mode 100644
index 0000000..59c99b2
--- /dev/null
+++ b/src/components/jet/shelf/PageHeaderShelf.svelte
@@ -0,0 +1,34 @@
+<script lang="ts" context="module">
+    import type { PageHeader, Shelf } from '@jet-app/app-store/api/models';
+
+    interface PageHeaderShelf extends Shelf {
+        items: [PageHeader];
+    }
+
+    export function isPageHeaderShelf(shelf: Shelf): shelf is PageHeaderShelf {
+        const { contentType, items } = shelf;
+        return contentType === 'pageHeader' && Array.isArray(items);
+    }
+</script>
+
+<script lang="ts">
+    import ShelfWrapper from '~/components/Shelf/Wrapper.svelte';
+    import ShelfTitle from '~/components/Shelf/Title.svelte';
+
+    export let shelf: PageHeaderShelf;
+
+    $: [item] = shelf.items;
+</script>
+
+<ShelfWrapper {shelf} withBottomPadding={false}>
+    <div class="shelf-title-wrapper" slot="title">
+        <ShelfTitle title={item.title} subtitle={item.subtitle} />
+    </div>
+</ShelfWrapper>
+
+<style>
+    .shelf-title-wrapper {
+        --shelf-title-font: var(--title-1-emphasized);
+        display: contents;
+    }
+</style>
-- 
cgit v1.2.3

