aboutsummaryrefslogtreecommitdiff
path: root/source/library/components/TabBar.svelte
diff options
context:
space:
mode:
authornetop://ウィビ <paul@webb.page>2026-04-24 14:17:38 -0700
committernetop://ウィビ <paul@webb.page>2026-04-24 14:17:38 -0700
commit261f3bdb77799009344aab4a60686b7186ebd3b0 (patch)
tree8e87c6610a307f15f0c4b32f68b19424273fc6ad /source/library/components/TabBar.svelte
parent8a59f92d031963e23ecc84b75feecf43eb4dd146 (diff)
downloadgraphiql-261f3bdb77799009344aab4a60686b7186ebd3b0.tar.gz
graphiql-261f3bdb77799009344aab4a60686b7186ebd3b0.zip
Implement v0.4 subscriptions + v0.5 theming and plugin slots
- SSE and WebSocket fetchers via graphql-sse and graphql-ws, returning AsyncIterable results - SessionStore.run consumes AsyncIterable streams with subscriptionMode "append" (timestamped) or "replace" and honors an AbortSignal for cancellation - Chrome CSS variables documented in styles/theme.scss with prefers-color-scheme light/dark gating and .graphiql-light override - Svelte 5 snippet slots on GraphiQL: toolbarExtras, tabExtras, resultFooter
Diffstat (limited to 'source/library/components/TabBar.svelte')
-rw-r--r--source/library/components/TabBar.svelte6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/library/components/TabBar.svelte b/source/library/components/TabBar.svelte
index d87449d..9c34f20 100644
--- a/source/library/components/TabBar.svelte
+++ b/source/library/components/TabBar.svelte
@@ -1,9 +1,10 @@
<script lang="ts">
- import { tick } from "svelte";
+ import { tick, type Snippet } from "svelte";
import type { Tab } from "../state/session.svelte.ts";
type Props = {
activeId: string;
+ extras?: Snippet<[{ tab: Tab }]>;
onAdd: () => void;
onClose: (id: string) => void;
onRename: (id: string, title: string) => void;
@@ -11,7 +12,7 @@
tabs: Tab[];
};
- let { activeId, onAdd, onClose, onRename, onSelect, tabs }: Props = $props();
+ let { activeId, extras, onAdd, onClose, onRename, onSelect, tabs }: Props = $props();
let editingId = $state<string | null>(null);
let draft = $state<string>("");
@@ -150,6 +151,7 @@
{:else}
<span class="title">{tab.title}</span>
{/if}
+ {#if extras}{@render extras({ tab })}{/if}
<button
aria-label="Close tab"
class="close"