diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/library/GraphiQL.svelte | 4 | ||||
| -rw-r--r-- | source/library/components/Splitter.svelte | 22 |
2 files changed, 25 insertions, 1 deletions
diff --git a/source/library/GraphiQL.svelte b/source/library/GraphiQL.svelte index 4250fd3..0f1e0fd 100644 --- a/source/library/GraphiQL.svelte +++ b/source/library/GraphiQL.svelte @@ -48,8 +48,10 @@ toolbarExtras }: Props = $props(); + // svelte-ignore state_referenced_locally const resolvedStorage = storage ?? (typeof globalThis.localStorage !== "undefined" ? + // svelte-ignore state_referenced_locally createLocalStorage(namespace) : createMemoryStorage()); @@ -58,7 +60,9 @@ const schema = new SchemaStore(); const session = new SessionStore(resolvedStorage); + // svelte-ignore state_referenced_locally if (initialQuery && session.active && session.active.query === "") + // svelte-ignore state_referenced_locally session.updateQuery(session.active.id, initialQuery); let bottomPane = $state<"variables" | "headers">("variables"); diff --git a/source/library/components/Splitter.svelte b/source/library/components/Splitter.svelte index f4138f2..73d0e10 100644 --- a/source/library/components/Splitter.svelte +++ b/source/library/components/Splitter.svelte @@ -1,13 +1,27 @@ <script lang="ts"> type Props = { + label?: string; + max?: number; + min?: number; onDrag: (dx: number, dy: number) => void; onDragEnd?: () => void; onDragStart?: () => void; onKeyAdjust?: (delta: number) => void; orientation: "horizontal" | "vertical"; + value?: number; }; - let { onDrag, onDragEnd, onDragStart, onKeyAdjust, orientation }: Props = $props(); + let { + label, + max, + min, + onDrag, + onDragEnd, + onDragStart, + onKeyAdjust, + orientation, + value + }: Props = $props(); let dragging = $state(false); let startX = $state(0); @@ -110,8 +124,14 @@ } </style> +<!-- svelte-ignore a11y_no_noninteractive_tabindex --> +<!-- svelte-ignore a11y_no_noninteractive_element_interactions --> <div + aria-label={label} aria-orientation={orientation} + aria-valuemax={max} + aria-valuemin={min} + aria-valuenow={value} class="splitter {orientation}" class:dragging onkeydown={onKeydown} |