Merge branch 'master' into ian/prettify-scroll-bar

This commit is contained in:
Ian Donahue 2023-03-28 10:57:34 +02:00
commit dbc04ed0fe
17 changed files with 289 additions and 209 deletions

View File

@ -9,6 +9,7 @@
-webkit-perspective: 1000; -webkit-perspective: 1000;
} }
/* SCROLL BAR STYLING */ /* SCROLL BAR STYLING */
/* width */ /* width */
@ -42,11 +43,10 @@
} }
/* COMMAND PALETTE */ /* COMMAND PALETTE */
.result-section-header { .result-section-header {
@apply mb-2 mt-2 mx-2 cursor-default select-none py-2 text-sm font-semibold text-zinc-300; @apply mx-2 mb-2 mt-2 cursor-default select-none py-2 text-sm font-semibold text-zinc-300;
} }
.quick-command-item { .quick-command-item {
@ -56,7 +56,3 @@
.quick-command-key { .quick-command-key {
@apply rounded-sm border border-[#3A393F] bg-[#343338] px-[3px] font-mono text-[11px] shadow; @apply rounded-sm border border-[#3A393F] bg-[#343338] px-[3px] font-mono text-[11px] shadow;
} }

View File

@ -2,15 +2,17 @@
import { afterNavigate, goto } from '$app/navigation'; import { afterNavigate, goto } from '$app/navigation';
import { page } from '$app/stores'; import { page } from '$app/stores';
const getUri = (url: URL) => url.pathname + url.search + url.hash;
let position = 0; let position = 0;
const history = [$page.url.pathname]; const history = [getUri($page.url)];
$: canGoBack = history.length > 1 && position > 0; $: canGoBack = history.length > 1 && position > 0;
$: canGoForward = history.length > 1 && position < history.length - 1; $: canGoForward = history.length > 1 && position < history.length - 1;
afterNavigate((nav) => { afterNavigate((nav) => {
if (nav.to === null) return; if (nav.to === null) return;
const to = nav.to.url.pathname; const to = getUri(nav.to.url);
if (to === history[position]) { if (to === history[position]) {
return; return;
} else if (to === history[position + 1]) { } else if (to === history[position + 1]) {

View File

@ -13,6 +13,8 @@
import Commit from './Commit.svelte'; import Commit from './Commit.svelte';
import { invoke } from '@tauri-apps/api'; import { invoke } from '@tauri-apps/api';
import { createEventDispatcher } from 'svelte'; import { createEventDispatcher } from 'svelte';
import { RewindIcon } from '$lib/components/icons';
import { GitCommitIcon } from '$lib/components/icons';
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();
@ -84,12 +86,23 @@
visible: scopeToProject, visible: scopeToProject,
commands: [ commands: [
{ {
title: 'Commit', title: 'Quick commit',
description: 'C', description: 'C',
selected: false, selected: false,
action: { action: {
component: Commit component: Commit
}, },
icon: GitCommitIcon,
visible: 'commit'.includes(userInput?.toLowerCase())
},
{
title: 'Commit',
description: 'Shift C',
selected: false,
action: {
component: Commit
},
icon: GitCommitIcon,
visible: 'commit'.includes(userInput?.toLowerCase()) visible: 'commit'.includes(userInput?.toLowerCase())
}, },
{ {
@ -99,6 +112,7 @@
action: { action: {
component: Replay component: Replay
}, },
icon: RewindIcon,
visible: 'replay history'.includes(userInput?.toLowerCase()) visible: 'replay history'.includes(userInput?.toLowerCase())
} }
] ]
@ -170,9 +184,12 @@
<Modal on:close> <Modal on:close>
<!-- svelte-ignore a11y-click-events-have-key-events --> <!-- svelte-ignore a11y-click-events-have-key-events -->
<div class="flex h-[640px] w-[640px] flex-col rounded text-zinc-400" on:click|stopPropagation> <div
class="commnand-palette flex max-h-[360px] w-[640px] flex-col rounded text-zinc-400"
on:click|stopPropagation
>
<!-- Search input area --> <!-- Search input area -->
<div class="flex items-center border-b border-zinc-400/20 py-2"> <div class="search-input flex items-center border-b border-zinc-400/20 py-2">
<div class="ml-4 mr-2 flex flex-grow items-center"> <div class="ml-4 mr-2 flex flex-grow items-center">
<!-- Project scope --> <!-- Project scope -->
{#if scopeToProject} {#if scopeToProject}
@ -198,17 +215,17 @@
</div> </div>
</div> </div>
<!-- Main part --> <!-- Main part -->
<div class="flex-auto overflow-y-auto"> <div class="search-results flex-auto overflow-y-auto">
{#each commandGroups as group, groupIdx} {#each commandGroups as group, groupIdx}
{#if group.visible} {#if group.visible}
<div class="mx-2 cursor-default select-none"> <div class="mx-2 cursor-default select-none">
<p class="mx-2 cursor-default select-none py-2 text-sm font-semibold text-zinc-300/80"> <p class="result-section-header">
<span>{group.name}</span> <span>{group.name}</span>
{#if group.description} {#if group.description}
<span class="ml-2 font-light italic text-zinc-300/60">({group.description})</span> <span class="ml-2 font-light italic text-zinc-300/70">({group.description})</span>
{/if} {/if}
</p> </p>
<ul class=""> <ul class="quick-command-list text-zinc-300">
{#each group.commands as command, commandIdx} {#each group.commands as command, commandIdx}
{#if command.visible} {#if command.visible}
{#if Action.isLink(command.action)} {#if Action.isLink(command.action)}
@ -217,12 +234,13 @@
on:focus={() => (selection = [groupIdx, commandIdx])} on:focus={() => (selection = [groupIdx, commandIdx])}
id={`${groupIdx}-${commandIdx}`} id={`${groupIdx}-${commandIdx}`}
href={command.action.href} href={command.action.href}
class="{selection[0] === groupIdx && selection[1] === commandIdx class="quick-command-item {selection[0] === groupIdx &&
selection[1] === commandIdx
? 'bg-zinc-700/70' ? 'bg-zinc-700/70'
: ''} flex cursor-default items-center rounded-lg p-2 px-2 outline-none" : ''} flex cursor-default items-center rounded-lg p-2 px-2 outline-none"
> >
<span class="flex-grow">{command.title}</span> <span class="quick-command flex-grow">{command.title}</span>
<span>{command.description}</span> <span class="quick-command-key">{command.description}</span>
</a> </a>
{:else if Action.isActionInPalette(command.action)} {:else if Action.isActionInPalette(command.action)}
<div <div
@ -230,11 +248,16 @@
on:focus={() => (selection = [groupIdx, commandIdx])} on:focus={() => (selection = [groupIdx, commandIdx])}
on:click={triggerCommand} on:click={triggerCommand}
class="{selection[0] === groupIdx && selection[1] === commandIdx class="{selection[0] === groupIdx && selection[1] === commandIdx
? 'bg-zinc-700/70' ? 'bg-zinc-50/10'
: ''} flex cursor-default items-center rounded-lg p-2 px-2 outline-none" : ''} quick-command-item flex cursor-default items-center "
> >
<span class="flex-grow">{command.title}</span> <span class="quick-command-icon">
<span>{command.description}</span> <svelte:component this={command.icon} />
</span>
<span class="quick-command flex-grow">{command.title}</span>
{#each command.description.split(' ') as token}
<span class="quick-command-key">{token}</span>
{/each}
</div> </div>
{/if} {/if}
{/if} {/if}

View File

@ -8,6 +8,7 @@
import Replay from './Replay.svelte'; import Replay from './Replay.svelte';
import Branch from './Branch.svelte'; import Branch from './Branch.svelte';
import { currentProject } from '$lib/current_project'; import { currentProject } from '$lib/current_project';
import { goto } from '$app/navigation';
let dialog: ComponentType | undefined; let dialog: ComponentType | undefined;
@ -54,6 +55,11 @@
dialog === Commit ? (dialog = undefined) : (dialog = Commit); dialog === Commit ? (dialog = undefined) : (dialog = Commit);
} }
}, },
'Shift+c': () => {
if ($currentProject) {
goto(`/projects/${$currentProject?.id}/commit`);
}
},
r: () => { r: () => {
if ($currentProject) { if ($currentProject) {
dialog === Replay ? (dialog = undefined) : (dialog = Replay); dialog === Replay ? (dialog = undefined) : (dialog = Replay);

View File

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import Modal from '../Modal.svelte'; import Modal from '../Modal.svelte';
import { shortPath } from '$lib/paths'; import { collapsable } from '$lib/paths';
import { invoke } from '@tauri-apps/api'; import { invoke } from '@tauri-apps/api';
import { currentProject } from '$lib/current_project'; import { currentProject } from '$lib/current_project';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
@ -100,9 +100,7 @@
<div> <div>
{file[1]} {file[1]}
</div> </div>
<div class="font-mono"> <span class="font-mono" use:collapsable={{ value: file[0], separator: '/' }} />
{shortPath(file[0])}
</div>
</div> </div>
{/each} {/each}
</div> </div>

View File

@ -80,23 +80,23 @@
<Modal on:close> <Modal on:close>
<div class="mx-2 cursor-default select-none"> <div class="mx-2 cursor-default select-none">
<p class="mx-2 cursor-default select-none py-2 text-sm font-semibold text-zinc-300/80"> <p class="mx-2 cursor-default select-none py-2 text-sm font-semibold text-zinc-300">
Replay working history from... Replay working history from...
</p> </p>
<ul class=""> <ul class="quick-command-list">
{#each listOptions as listItem, idx} {#each listOptions as listItem, idx}
<a <a
on:mouseover={() => (selectionIdx = idx)} on:mouseover={() => (selectionIdx = idx)}
on:focus={() => (selectionIdx = idx)} on:focus={() => (selectionIdx = idx)}
on:click={gotoDestination} on:click={gotoDestination}
class="{selectionIdx === idx class="{selectionIdx === idx
? 'bg-zinc-700/70' ? 'bg-zinc-50/10'
: ''} flex cursor-default items-center rounded-lg p-2 px-2 outline-none" : ''} quick-command-item flex cursor-default items-center"
href="/" href="/"
> >
<span class="flex-grow">{listItem.label}</span> <span class="quick-command flex-grow">{listItem.label}</span>
<span>{idx + 1}</span> <span class="quick-command-key">{idx + 1}</span>
</a> </a>
{/each} {/each}
</ul> </ul>

View File

@ -16,6 +16,7 @@ export type Command = {
action: Action; action: Action;
selected: boolean; selected: boolean;
visible: boolean; visible: boolean;
icon: ComponentType;
}; };
export type CommandGroup = { export type CommandGroup = {
name: string; name: string;

View File

@ -10,10 +10,12 @@
<!-- svelte-ignore a11y-click-events-have-key-events --> <!-- svelte-ignore a11y-click-events-have-key-events -->
<dialog <dialog
class="rounded-lg class="w-[640px]
border border-zinc-400/40 overflow-hidden rounded-lg
bg-zinc-900/70 p-0 shadow-lg border-[0.5px] border-[#3F3F3F] bg-zinc-900/70
backdrop-blur-xl p-0
shadow-lg
backdrop-blur-xl
" "
in:scale={{ duration: 150 }} in:scale={{ duration: 150 }}
bind:this={dialog} bind:this={dialog}

View File

@ -0,0 +1,6 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M9.88822 7.00178C9.16279 7.02506 8.46269 7.2735 7.88503 7.71283C7.30733 8.15203 6.88067 8.76019 6.66431 9.45298H3.03247C2.66239 9.45651 2.32189 9.65594 2.13796 9.97703C1.95401 10.2981 1.95401 10.6927 2.13796 11.0138C2.32191 11.3349 2.66239 11.5343 3.03247 11.5379H6.66431C6.96248 12.4919 7.655 13.2725 8.56658 13.6825C9.47816 14.0925 10.5217 14.0925 11.4333 13.6825C12.3449 13.2725 13.0374 12.4919 13.3356 11.5379H16.9674C17.3375 11.5343 17.678 11.3349 17.8619 11.0138C18.046 10.6927 18.046 10.2981 17.8619 9.97703C17.678 9.65594 17.3375 9.4565 16.9674 9.45298H13.3356C13.1079 8.72377 12.6475 8.08927 12.0249 7.64651C11.4022 7.20388 10.6517 6.97741 9.88822 7.00178ZM9.96575 9.08105C10.3461 9.07179 10.714 9.21698 10.9855 9.48347C11.2571 9.74994 11.4092 10.115 11.4071 10.4954C11.4136 10.8728 11.2682 11.2369 11.0036 11.5061C10.739 11.7752 10.3774 11.9267 10 11.9267C9.62248 11.9267 9.26091 11.7752 8.99641 11.5061C8.73176 11.2369 8.58632 10.8728 8.59278 10.4954C8.59083 10.1269 8.73357 9.77225 8.99029 9.50774C9.24701 9.24334 9.59723 9.0901 9.96575 9.08109V9.08105Z"
fill="#71717A"
/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,14 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M4.35744 9.90001L8.9 13.6467L8.9 6.15336L4.35744 9.90001ZM2.93534 9.12855C2.45039 9.52854 2.45039 10.2715 2.93534 10.6715L8.76372 15.4786C9.41596 16.0166 10.4 15.5526 10.4 14.7072L10.4 5.09284C10.4 4.24738 9.41595 3.78343 8.76371 4.32139L2.93534 9.12855Z"
fill="#71717A"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M12.1633 9.89999L15.7 13.3032L15.7 6.49683L12.1633 9.89999ZM10.7488 9.17942C10.34 9.57282 10.34 10.2272 10.7488 10.6206L15.5066 15.1987C16.1419 15.8101 17.2 15.3598 17.2 14.4782L17.2 5.32182C17.2 4.44016 16.1419 3.98992 15.5066 4.60124L10.7488 9.17942Z"
fill="#71717A"
/>
</svg>

After

Width:  |  Height:  |  Size: 767 B

View File

@ -5,7 +5,9 @@ export { default as ContactIcon } from './ContactIcon.svelte';
export { default as FileIcon } from './FileIcon.svelte'; export { default as FileIcon } from './FileIcon.svelte';
export { default as FolderIcon } from './FolderIcon.svelte'; export { default as FolderIcon } from './FolderIcon.svelte';
export { default as LabelIcon } from './LabelIcon.svelte'; export { default as LabelIcon } from './LabelIcon.svelte';
export { default as GitCommitIcon } from './GitCommitIcon.svelte';
export { default as ProjectIcon } from './ProjectIcon.svelte'; export { default as ProjectIcon } from './ProjectIcon.svelte';
export { default as RewindIcon } from './RewindIcon.svelte';
export { default as IconRotateClockwise } from './IconRotateClockwise.svelte'; export { default as IconRotateClockwise } from './IconRotateClockwise.svelte';
export { default as IconPlayerPauseFilled } from './IconPlayerPauseFilled.svelte'; export { default as IconPlayerPauseFilled } from './IconPlayerPauseFilled.svelte';
export { default as IconPlayerPlayFilled } from './IconPlayerPlayFilled.svelte'; export { default as IconPlayerPlayFilled } from './IconPlayerPlayFilled.svelte';

View File

@ -1,12 +1,30 @@
export function shortPath(path: string, max = 3, maxLen = 30) { type Params = { separator: string; value: string };
if (path.length < maxLen) {
return path; export const collapsable = (e: HTMLElement, params: Params) => {
} if (e.textContent === null) return;
const pathParts = path.split('/'); e.dataset['value'] = e.textContent;
const file = pathParts.pop();
if (pathParts.length > 0) { const collapse = (e: HTMLElement, { separator, value }: Params) => {
const pp = pathParts.map((p) => p.slice(0, max)).join('/'); e.textContent = value;
return `${pp}/${file}`;
} while (e.offsetWidth < e.scrollWidth) {
return file; const parts: string[] = e.textContent.split(separator);
} const firstLongPartIndex = parts.findIndex((p) => p.length > 1);
if (firstLongPartIndex === -1) return;
e.textContent = [
...parts.slice(0, firstLongPartIndex),
parts[firstLongPartIndex][0],
...parts.slice(firstLongPartIndex + 1)
].join(separator);
}
};
collapse(e, params);
const onResize = () => collapse(e, params);
window.addEventListener('resize', onResize);
return {
update: (params: Params) => collapse(e, params),
destroy: () => window.removeEventListener('resize', onResize)
};
};

View File

@ -3,7 +3,7 @@
import type { Session } from '$lib/sessions'; import type { Session } from '$lib/sessions';
import { format, startOfDay } from 'date-fns'; import { format, startOfDay } from 'date-fns';
import type { Delta } from '$lib/deltas'; import type { Delta } from '$lib/deltas';
import { shortPath } from '$lib/paths'; import { collapsable } from '$lib/paths';
import { invoke } from '@tauri-apps/api'; import { invoke } from '@tauri-apps/api';
import { toHumanBranchName } from '$lib/branch'; import { toHumanBranchName } from '$lib/branch';
import { list as listDeltas } from '$lib/deltas'; import { list as listDeltas } from '$lib/deltas';
@ -198,7 +198,7 @@
<div class="flex flex-row justify-between"> <div class="flex flex-row justify-between">
<div class="w-96 truncate font-mono text-zinc-300"> <div class="w-96 truncate font-mono text-zinc-300">
<a class="cursor-pointer" href={playerURL(dateMilliseconds, filetime[0])}> <a class="cursor-pointer" href={playerURL(dateMilliseconds, filetime[0])}>
{shortPath(filetime[0], 3, 70)} <span use:collapsable={{ value: filetime[0], separator: '/' }} />
</a> </a>
</div> </div>
<div class="font-mono text-zinc-400"> <div class="font-mono text-zinc-400">
@ -287,7 +287,7 @@
{#each $filesStatus as activity} {#each $filesStatus as activity}
<li class="list-disc"> <li class="list-disc">
{activity.status.slice(0, 1)} {activity.status.slice(0, 1)}
{shortPath(activity.path)} <span use:collapsable={{ value: activity.path, separator: '/' }} />
</li> </li>
{/each} {/each}
</ul> </ul>

View File

@ -2,7 +2,7 @@
import { invoke } from '@tauri-apps/api'; import { invoke } from '@tauri-apps/api';
import type { PageData } from './$types'; import type { PageData } from './$types';
import Api from '$lib/api'; import Api from '$lib/api';
import { shortPath } from '$lib/paths'; import { collapsable } from '$lib/paths';
import toast from 'svelte-french-toast'; import toast from 'svelte-french-toast';
import { slide } from 'svelte/transition'; import { slide } from 'svelte/transition';
import { toHumanBranchName } from '$lib/branch'; import { toHumanBranchName } from '$lib/branch';
@ -215,9 +215,8 @@
<div <div
class="cursor-pointer {currentPath == activity.path ? 'text-white' : ''}" class="cursor-pointer {currentPath == activity.path ? 'text-white' : ''}"
on:click={selectPath(activity.path)} on:click={selectPath(activity.path)}
> use:collapsable={{ value: activity.path, separator: '/' }}
{shortPath(activity.path)} />
</div>
</div> </div>
</li> </li>
{/each} {/each}

View File

@ -17,6 +17,8 @@
const currentDate = derived(page, (page) => page.params.date); const currentDate = derived(page, (page) => page.params.date);
const today = format(new Date(), 'yyyy-MM-dd');
const fileFilter = derived(page, (page) => page.url.searchParams.get('file')); const fileFilter = derived(page, (page) => page.url.searchParams.get('file'));
</script> </script>
@ -35,20 +37,28 @@
</a> </a>
{/if} {/if}
<div class="flex h-full w-full flex-auto flex-row gap-2 overflow-auto p-2"> <div class="flex h-full w-full flex-row gap-2 px-2">
<ul id="days" class="flex h-full flex-shrink-0 flex-col gap-2 overflow-y-scroll"> <ul
id="days"
class="scrollbar-hidden grid h-full flex-shrink-0 auto-rows-min gap-2 overflow-y-scroll py-2"
>
{#each $dates as date} {#each $dates as date}
<li class="w-full"> {@const isToday = format(new Date(date), 'yyyy-MM-dd') === today}
<li>
<a <a
href="/projects/{projectId}/player/{date}{$page.url.search}" href="/projects/{projectId}/player/{date}{$page.url.search}"
class:bg-gb-800={date === $currentDate} class:bg-gb-800={date === $currentDate}
class:text-white={date === $currentDate} class:text-white={date === $currentDate}
class:border-gb-700={date !== $currentDate} class:border-gb-700={date !== $currentDate}
class:bg-gb-900={date !== $currentDate} class:bg-gb-900={date !== $currentDate}
class="flex w-full flex-col items-center rounded border border-[0.5px] p-2 text-zinc-300 shadow transition duration-150 ease-out hover:bg-gb-800 hover:ease-in" class="max-h-content flex w-full flex-col items-center justify-around rounded border border-[0.5px] p-2 text-zinc-300 shadow transition duration-150 ease-out hover:bg-gb-800 hover:ease-in"
> >
<div class="text-xl leading-5">{new Date(date).getDate()}</div> {#if isToday}
<div class="leading-4">{format(new Date(date), 'MMM')}</div> <div class="py-2 text-lg leading-5">Today</div>
{:else}
<div class="text-xl leading-5">{new Date(date).getDate()}</div>
<div class="leading-4">{format(new Date(date), 'MMM')}</div>
{/if}
</a> </a>
</li> </li>
{/each} {/each}

View File

@ -23,7 +23,7 @@
import type { PageData } from './$types'; import type { PageData } from './$types';
import { derived, writable } from 'svelte/store'; import { derived, writable } from 'svelte/store';
import { IconPlayerPauseFilled, IconPlayerPlayFilled } from '$lib/components/icons'; import { IconPlayerPauseFilled, IconPlayerPlayFilled } from '$lib/components/icons';
import { shortPath } from '$lib/paths'; import { collapsable } from '$lib/paths';
import { page } from '$app/stores'; import { page } from '$app/stores';
import { CodeViewer } from '$lib/components'; import { CodeViewer } from '$lib/components';
import { asyncDerived } from '@square/svelte-store'; import { asyncDerived } from '@square/svelte-store';
@ -202,7 +202,7 @@
<article <article
id="activities" id="activities"
class="flex h-full h-full w-80 flex-shrink-0 flex-col rounded border-[0.5px] border-gb-700 bg-gb-900 xl:w-96" class="my-2 flex w-80 flex-shrink-0 flex-grow-0 flex-col rounded border-[0.5px] border-gb-700 bg-gb-900 xl:w-96"
> >
{#await richSessions.load()} {#await richSessions.load()}
<div class="flex h-full flex-col items-center justify-center"> <div class="flex h-full flex-col items-center justify-center">
@ -249,15 +249,14 @@
</span> </span>
{#if isCurrent} {#if isCurrent}
<ul class="rounded-b bg-zinc-800 p-2"> <ul class="list-disk bg-zinc-800 p-2" style:list-style="disc">
{#each Object.keys(session.files) as filename} {#each Object.keys(session.files) as filename}
<li <li
class:text-zinc-100={$frame?.filepath === filename} class:text-zinc-100={$frame?.filepath === filename}
class:font-bold={$frame?.filepath === filename} class:font-bold={$frame?.filepath === filename}
class="truncate text-left text-zinc-500" class="ml-5 text-zinc-500"
> use:collapsable={{ value: filename, separator: '/' }}
{shortPath(filename)} />
</li>
{/each} {/each}
</ul> </ul>
{/if} {/if}
@ -270,160 +269,165 @@
{/await} {/await}
</article> </article>
<div id="player" class="flex-auto overflow-auto rounded border border-zinc-700 bg-gb-900 "> <div
id="player"
class="relative my-2 flex flex-auto overflow-auto rounded border border-zinc-700 bg-gb-900"
>
{#if $frame} {#if $frame}
<div class="relative flex h-full w-full flex-col gap-2 "> <div id="code" class="h-full w-full flex-auto overflow-auto px-2 pb-[120px]">
<div id="code" class="h-full w-full flex-auto overflow-auto px-2 pb-[120px]"> <CodeViewer
<CodeViewer doc={$frame.doc}
doc={$frame.doc} deltas={$frame.deltas}
deltas={$frame.deltas} filepath={$frame.filepath}
filepath={$frame.filepath} paddingLines={fullContext ? 100000 : context}
paddingLines={fullContext ? 100000 : context} />
/> </div>
</div>
<div id="info" class="absolute bottom-[86px] left-4 rounded-lg bg-zinc-800 p-2"> <div
<div class="flex flex-row justify-between space-x-2"> id="info"
<div class="font-mono font-bold text-white">{shortPath($frame.filepath)}</div> class="w-content absolute bottom-[86px] ml-4 flex max-w-full gap-2 rounded-lg bg-zinc-800 p-2"
<div> >
{new Date($frame.deltas[$frame.deltas.length - 1].timestampMs).toLocaleString('en-US')} <span
</div> class="flex-auto overflow-auto font-mono font-bold text-white"
</div> use:collapsable={{ value: $frame.filepath, separator: '/' }}
</div> />
<span class="whitespace-nowrap">
{new Date($frame.deltas[$frame.deltas.length - 1].timestampMs).toLocaleString('en-US')}
</span>
</div>
<div <div
id="controls" id="controls"
class="absolute bottom-0 flex w-full flex-col border-t border-zinc-700 bg-[#2E2E32]/75 p-2 pt-4" class="absolute bottom-0 flex w-full flex-col border-t border-zinc-700 bg-[#2E2E32]/75 p-2 pt-4"
style=" style="
border-width: 0.5px; border-width: 0.5px;
-webkit-backdrop-filter: blur(5px) saturate(190%) contrast(70%) brightness(80%); -webkit-backdrop-filter: blur(5px) saturate(190%) contrast(70%) brightness(80%);
backdrop-filter: blur(5px) saturate(190%) contrast(70%) brightness(80%); backdrop-filter: blur(5px) saturate(190%) contrast(70%) brightness(80%);
background-color: rgba(24, 24, 27, 0.60); background-color: rgba(24, 24, 27, 0.60);
border: 0.5px solid rgba(63, 63, 70, 0.50); border: 0.5px solid rgba(63, 63, 70, 0.50);
" "
> >
<div class="flex h-0 w-full justify-between"> <div class="flex h-0 w-full justify-between">
{#each $richSessions as session} {#each $richSessions as session}
<div <div
class="inline-block h-2 rounded bg-white" class="inline-block h-2 rounded bg-white"
style="width: {Math.round( style="width: {Math.round(
(session.deltas.length / $frame.session.deltas.length) * 100 (session.deltas.length / $frame.session.deltas.length) * 100
)}%" )}%"
> >
&nbsp; &nbsp;
</div>
{/each}
</div>
<div class="w-full">
<input
type="range"
class="-mt-3 w-full cursor-pointer appearance-none rounded-lg border-transparent bg-transparent"
max={$maxInput}
step="1"
bind:value={$inputValue}
/>
</div>
<div class="playback-controller-ui mx-auto flex w-full items-center justify-between gap-2">
<div class="left-side flex space-x-8">
<div class="play-button-button-container">
{#if interval}
<button on:click={stop}>
<IconPlayerPauseFilled class="playback-button-play icon-pointer h-6 w-6" />
</button>
{:else}
<button on:click={play}>
<IconPlayerPlayFilled class="icon-pointer h-6 w-6" />
</button>
{/if}
</div>
<div class="back-forward-button-container ">
<button on:click={decrementPlayerValue} class="playback-button-back group">
<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
class="icon-pointer h-6 w-6"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M13.7101 16.32C14.0948 16.7047 14.0955 17.3274 13.7117 17.7111C13.3254 18.0975 12.7053 18.094 12.3206 17.7093L5.37536 10.7641C5.18243 10.5711 5.0867 10.32 5.08703 10.069C5.08802 9.81734 5.18374 9.56621 5.37536 9.37458L12.3206 2.42932C12.7055 2.04445 13.328 2.04396 13.7117 2.42751C14.0981 2.81386 14.0946 3.43408 13.7101 3.81863C13.4234 4.10528 7.80387 9.78949 7.52438 10.069C9.59011 12.1474 11.637 14.2469 13.7101 16.32Z"
fill="none"
class="fill-zinc-400 group-hover:fill-zinc-100"
/>
</svg>
</button>
<button on:click={incrementPlayerValue} class="playback-button-forward group">
<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
class="icon-pointer h-6 w-6"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M6.28991 16.32C5.90521 16.7047 5.90455 17.3274 6.28826 17.7111C6.67461 18.0975 7.29466 18.094 7.67938 17.7093L14.6246 10.7641C14.8176 10.5711 14.9133 10.32 14.913 10.069C14.912 9.81734 14.8163 9.56621 14.6246 9.37458L7.67938 2.42932C7.29451 2.04445 6.67197 2.04396 6.28826 2.42751C5.90192 2.81386 5.90537 3.43408 6.28991 3.81863C6.57656 4.10528 12.1961 9.78949 12.4756 10.069C10.4099 12.1474 8.36301 14.2469 6.28991 16.32Z"
fill="none"
class="fill-zinc-400 group-hover:fill-zinc-100"
/>
</svg>
</button>
</div>
<button on:click={speedUp}>{speed}x</button>
</div> </div>
{/each}
</div>
<div class="align-center flex flex-row-reverse gap-2"> <div class="w-full">
<button class="checkbox-button "> <input
<label type="range"
for="full-context-checkbox" class="-mt-3 w-full cursor-pointer appearance-none rounded-lg border-transparent bg-transparent"
class="group block cursor-pointer rounded transition-colors duration-200 ease-in-out hover:bg-zinc-700 " max={$maxInput}
> step="1"
<input bind:value={$inputValue}
type="checkbox" />
id="full-context-checkbox" </div>
bind:checked={fullContext}
class="peer hidden"
/>
<svg <div class="playback-controller-ui mx-auto flex w-full items-center justify-between gap-2">
fill="none" <div class="left-side flex space-x-8">
xmlns="http://www.w3.org/2000/svg" <div class="play-button-button-container">
class="group h-8 w-8 rounded p-1.5 peer-checked:hidden" {#if interval}
> <button on:click={stop}>
<path <IconPlayerPauseFilled class="playback-button-play icon-pointer h-6 w-6" />
d="M10.177 2.07944L13.073 5.21176C13.1081 5.24957 13.1319 5.2978 13.1416 5.35031C13.1513 5.40283 13.1464 5.45727 13.1274 5.50674C13.1084 5.55621 13.0763 5.59848 13.0351 5.62818C12.9939 5.65789 12.9455 5.67369 12.896 5.6736H10.75V7.0256C10.75 7.24074 10.671 7.44707 10.5303 7.5992C10.3897 7.75133 10.1989 7.8368 10 7.8368C9.80109 7.8368 9.61032 7.75133 9.46967 7.5992C9.32902 7.44707 9.25 7.24074 9.25 7.0256V5.6736H7.104C7.05449 5.67369 7.00607 5.65789 6.96487 5.62818C6.92368 5.59848 6.89157 5.55621 6.87261 5.50674C6.85365 5.45727 6.8487 5.40283 6.85838 5.35031C6.86806 5.2978 6.89195 5.24957 6.927 5.21176L9.823 2.07944C9.84622 2.05426 9.87381 2.03428 9.90418 2.02065C9.93456 2.00702 9.96712 2 10 2C10.0329 2 10.0654 2.00702 10.0958 2.02065C10.1262 2.03428 10.1538 2.05426 10.177 2.07944ZM9.25 12.9744C9.25 12.7593 9.32902 12.5529 9.46967 12.4008C9.61032 12.2487 9.80109 12.1632 10 12.1632C10.1989 12.1632 10.3897 12.2487 10.5303 12.4008C10.671 12.5529 10.75 12.7593 10.75 12.9744V14.3264H12.896C12.9455 14.3263 12.9939 14.3421 13.0351 14.3718C13.0763 14.4015 13.1084 14.4438 13.1274 14.4933C13.1464 14.5427 13.1513 14.5972 13.1416 14.6497C13.1319 14.7022 13.1081 14.7504 13.073 14.7882L10.177 17.9206C10.1538 17.9457 10.1262 17.9657 10.0958 17.9794C10.0654 17.993 10.0329 18 10 18C9.96712 18 9.93456 17.993 9.90418 17.9794C9.87381 17.9657 9.84622 17.9457 9.823 17.9206L6.927 14.7882C6.89195 14.7504 6.86806 14.7022 6.85838 14.6497C6.8487 14.5972 6.85365 14.5427 6.87261 14.4933C6.89157 14.4438 6.92368 14.4015 6.96487 14.3718C7.00607 14.3421 7.05449 14.3263 7.104 14.3264H9.25V12.9744ZM4.25 10.8112C4.44891 10.8112 4.63968 10.7257 4.78033 10.5736C4.92098 10.4215 5 10.2151 5 10C5 9.78486 4.92098 9.57852 4.78033 9.42639C4.63968 9.27426 4.44891 9.1888 4.25 9.1888H3.75C3.55109 9.1888 3.36032 9.27426 3.21967 9.42639C3.07902 9.57852 3 9.78486 3 10C3 10.2151 3.07902 10.4215 3.21967 10.5736C3.36032 10.7257 3.55109 10.8112 3.75 10.8112H4.25ZM8 10C8 10.2151 7.92098 10.4215 7.78033 10.5736C7.63968 10.7257 7.44891 10.8112 7.25 10.8112H6.75C6.55109 10.8112 6.36032 10.7257 6.21967 10.5736C6.07902 10.4215 6 10.2151 6 10C6 9.78486 6.07902 9.57852 6.21967 9.42639C6.36032 9.27426 6.55109 9.1888 6.75 9.1888H7.25C7.44891 9.1888 7.63968 9.27426 7.78033 9.42639C7.92098 9.57852 8 9.78486 8 10ZM10.25 10.8112C10.4489 10.8112 10.6397 10.7257 10.7803 10.5736C10.921 10.4215 11 10.2151 11 10C11 9.78486 10.921 9.57852 10.7803 9.42639C10.6397 9.27426 10.4489 9.1888 10.25 9.1888H9.75C9.55109 9.1888 9.36032 9.27426 9.21967 9.42639C9.07902 9.57852 9 9.78486 9 10C9 10.2151 9.07902 10.4215 9.21967 10.5736C9.36032 10.7257 9.55109 10.8112 9.75 10.8112H10.25ZM14 10C14 10.2151 13.921 10.4215 13.7803 10.5736C13.6397 10.7257 13.4489 10.8112 13.25 10.8112H12.75C12.5511 10.8112 12.3603 10.7257 12.2197 10.5736C12.079 10.4215 12 10.2151 12 10C12 9.78486 12.079 9.57852 12.2197 9.42639C12.3603 9.27426 12.5511 9.1888 12.75 9.1888H13.25C13.4489 9.1888 13.6397 9.27426 13.7803 9.42639C13.921 9.57852 14 9.78486 14 10ZM16.25 10.8112C16.4489 10.8112 16.6397 10.7257 16.7803 10.5736C16.921 10.4215 17 10.2151 17 10C17 9.78486 16.921 9.57852 16.7803 9.42639C16.6397 9.27426 16.4489 9.1888 16.25 9.1888H15.75C15.5511 9.1888 15.3603 9.27426 15.2197 9.42639C15.079 9.57852 15 9.78486 15 10C15 10.2151 15.079 10.4215 15.2197 10.5736C15.3603 10.7257 15.5511 10.8112 15.75 10.8112H16.25Z" </button>
fill="none" {:else}
class="fill-zinc-100 p-4 group-hover:fill-zinc-200 " <button on:click={play}>
/> <IconPlayerPlayFilled class="icon-pointer h-6 w-6" />
</svg> </button>
<svg
fill="none"
xmlns="http://www.w3.org/2000/svg"
class="group hidden h-8 w-8 rounded p-1.5 peer-checked:block"
>
<path
d="M10.177 2.07944L13.073 5.21176C13.1081 5.24957 13.1319 5.2978 13.1416 5.35031C13.1513 5.40283 13.1464 5.45727 13.1274 5.50674C13.1084 5.55621 13.0763 5.59848 13.0351 5.62818C12.9939 5.65789 12.9455 5.67369 12.896 5.6736H10.75V7.0256C10.75 7.24074 10.671 7.44707 10.5303 7.5992C10.3897 7.75133 10.1989 7.8368 10 7.8368C9.80109 7.8368 9.61032 7.75133 9.46967 7.5992C9.32902 7.44707 9.25 7.24074 9.25 7.0256V5.6736H7.104C7.05449 5.67369 7.00607 5.65789 6.96487 5.62818C6.92368 5.59848 6.89157 5.55621 6.87261 5.50674C6.85365 5.45727 6.8487 5.40283 6.85838 5.35031C6.86806 5.2978 6.89195 5.24957 6.927 5.21176L9.823 2.07944C9.84622 2.05426 9.87381 2.03428 9.90418 2.02065C9.93456 2.00702 9.96712 2 10 2C10.0329 2 10.0654 2.00702 10.0958 2.02065C10.1262 2.03428 10.1538 2.05426 10.177 2.07944ZM9.25 12.9744C9.25 12.7593 9.32902 12.5529 9.46967 12.4008C9.61032 12.2487 9.80109 12.1632 10 12.1632C10.1989 12.1632 10.3897 12.2487 10.5303 12.4008C10.671 12.5529 10.75 12.7593 10.75 12.9744V14.3264H12.896C12.9455 14.3263 12.9939 14.3421 13.0351 14.3718C13.0763 14.4015 13.1084 14.4438 13.1274 14.4933C13.1464 14.5427 13.1513 14.5972 13.1416 14.6497C13.1319 14.7022 13.1081 14.7504 13.073 14.7882L10.177 17.9206C10.1538 17.9457 10.1262 17.9657 10.0958 17.9794C10.0654 17.993 10.0329 18 10 18C9.96712 18 9.93456 17.993 9.90418 17.9794C9.87381 17.9657 9.84622 17.9457 9.823 17.9206L6.927 14.7882C6.89195 14.7504 6.86806 14.7022 6.85838 14.6497C6.8487 14.5972 6.85365 14.5427 6.87261 14.4933C6.89157 14.4438 6.92368 14.4015 6.96487 14.3718C7.00607 14.3421 7.05449 14.3263 7.104 14.3264H9.25V12.9744ZM4.25 10.8112C4.44891 10.8112 4.63968 10.7257 4.78033 10.5736C4.92098 10.4215 5 10.2151 5 10C5 9.78486 4.92098 9.57852 4.78033 9.42639C4.63968 9.27426 4.44891 9.1888 4.25 9.1888H3.75C3.55109 9.1888 3.36032 9.27426 3.21967 9.42639C3.07902 9.57852 3 9.78486 3 10C3 10.2151 3.07902 10.4215 3.21967 10.5736C3.36032 10.7257 3.55109 10.8112 3.75 10.8112H4.25ZM8 10C8 10.2151 7.92098 10.4215 7.78033 10.5736C7.63968 10.7257 7.44891 10.8112 7.25 10.8112H6.75C6.55109 10.8112 6.36032 10.7257 6.21967 10.5736C6.07902 10.4215 6 10.2151 6 10C6 9.78486 6.07902 9.57852 6.21967 9.42639C6.36032 9.27426 6.55109 9.1888 6.75 9.1888H7.25C7.44891 9.1888 7.63968 9.27426 7.78033 9.42639C7.92098 9.57852 8 9.78486 8 10ZM10.25 10.8112C10.4489 10.8112 10.6397 10.7257 10.7803 10.5736C10.921 10.4215 11 10.2151 11 10C11 9.78486 10.921 9.57852 10.7803 9.42639C10.6397 9.27426 10.4489 9.1888 10.25 9.1888H9.75C9.55109 9.1888 9.36032 9.27426 9.21967 9.42639C9.07902 9.57852 9 9.78486 9 10C9 10.2151 9.07902 10.4215 9.21967 10.5736C9.36032 10.7257 9.55109 10.8112 9.75 10.8112H10.25ZM14 10C14 10.2151 13.921 10.4215 13.7803 10.5736C13.6397 10.7257 13.4489 10.8112 13.25 10.8112H12.75C12.5511 10.8112 12.3603 10.7257 12.2197 10.5736C12.079 10.4215 12 10.2151 12 10C12 9.78486 12.079 9.57852 12.2197 9.42639C12.3603 9.27426 12.5511 9.1888 12.75 9.1888H13.25C13.4489 9.1888 13.6397 9.27426 13.7803 9.42639C13.921 9.57852 14 9.78486 14 10ZM16.25 10.8112C16.4489 10.8112 16.6397 10.7257 16.7803 10.5736C16.921 10.4215 17 10.2151 17 10C17 9.78486 16.921 9.57852 16.7803 9.42639C16.6397 9.27426 16.4489 9.1888 16.25 9.1888H15.75C15.5511 9.1888 15.3603 9.27426 15.2197 9.42639C15.079 9.57852 15 9.78486 15 10C15 10.2151 15.079 10.4215 15.2197 10.5736C15.3603 10.7257 15.5511 10.8112 15.75 10.8112H16.25Z"
fill="none"
class="fill-zinc-600 p-4 group-hover:fill-zinc-200 "
/>
</svg>
</label>
</button>
{#if !fullContext}
<input type="number" bind:value={context} class="w-14 rounded py-1 pl-2 pr-1" />
{/if} {/if}
</div> </div>
<div class="back-forward-button-container ">
<button on:click={decrementPlayerValue} class="playback-button-back group">
<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
class="icon-pointer h-6 w-6"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M13.7101 16.32C14.0948 16.7047 14.0955 17.3274 13.7117 17.7111C13.3254 18.0975 12.7053 18.094 12.3206 17.7093L5.37536 10.7641C5.18243 10.5711 5.0867 10.32 5.08703 10.069C5.08802 9.81734 5.18374 9.56621 5.37536 9.37458L12.3206 2.42932C12.7055 2.04445 13.328 2.04396 13.7117 2.42751C14.0981 2.81386 14.0946 3.43408 13.7101 3.81863C13.4234 4.10528 7.80387 9.78949 7.52438 10.069C9.59011 12.1474 11.637 14.2469 13.7101 16.32Z"
fill="none"
class="fill-zinc-400 group-hover:fill-zinc-100"
/>
</svg>
</button>
<button on:click={incrementPlayerValue} class="playback-button-forward group">
<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
class="icon-pointer h-6 w-6"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M6.28991 16.32C5.90521 16.7047 5.90455 17.3274 6.28826 17.7111C6.67461 18.0975 7.29466 18.094 7.67938 17.7093L14.6246 10.7641C14.8176 10.5711 14.9133 10.32 14.913 10.069C14.912 9.81734 14.8163 9.56621 14.6246 9.37458L7.67938 2.42932C7.29451 2.04445 6.67197 2.04396 6.28826 2.42751C5.90192 2.81386 5.90537 3.43408 6.28991 3.81863C6.57656 4.10528 12.1961 9.78949 12.4756 10.069C10.4099 12.1474 8.36301 14.2469 6.28991 16.32Z"
fill="none"
class="fill-zinc-400 group-hover:fill-zinc-100"
/>
</svg>
</button>
</div>
<button on:click={speedUp}>{speed}x</button>
</div>
<div class="align-center flex flex-row-reverse gap-2">
<button class="checkbox-button ">
<label
for="full-context-checkbox"
class="group block cursor-pointer rounded transition-colors duration-200 ease-in-out hover:bg-zinc-700 "
>
<input
type="checkbox"
id="full-context-checkbox"
bind:checked={fullContext}
class="peer hidden"
/>
<svg
fill="none"
xmlns="http://www.w3.org/2000/svg"
class="group h-8 w-8 rounded p-1.5 peer-checked:hidden"
>
<path
d="M10.177 2.07944L13.073 5.21176C13.1081 5.24957 13.1319 5.2978 13.1416 5.35031C13.1513 5.40283 13.1464 5.45727 13.1274 5.50674C13.1084 5.55621 13.0763 5.59848 13.0351 5.62818C12.9939 5.65789 12.9455 5.67369 12.896 5.6736H10.75V7.0256C10.75 7.24074 10.671 7.44707 10.5303 7.5992C10.3897 7.75133 10.1989 7.8368 10 7.8368C9.80109 7.8368 9.61032 7.75133 9.46967 7.5992C9.32902 7.44707 9.25 7.24074 9.25 7.0256V5.6736H7.104C7.05449 5.67369 7.00607 5.65789 6.96487 5.62818C6.92368 5.59848 6.89157 5.55621 6.87261 5.50674C6.85365 5.45727 6.8487 5.40283 6.85838 5.35031C6.86806 5.2978 6.89195 5.24957 6.927 5.21176L9.823 2.07944C9.84622 2.05426 9.87381 2.03428 9.90418 2.02065C9.93456 2.00702 9.96712 2 10 2C10.0329 2 10.0654 2.00702 10.0958 2.02065C10.1262 2.03428 10.1538 2.05426 10.177 2.07944ZM9.25 12.9744C9.25 12.7593 9.32902 12.5529 9.46967 12.4008C9.61032 12.2487 9.80109 12.1632 10 12.1632C10.1989 12.1632 10.3897 12.2487 10.5303 12.4008C10.671 12.5529 10.75 12.7593 10.75 12.9744V14.3264H12.896C12.9455 14.3263 12.9939 14.3421 13.0351 14.3718C13.0763 14.4015 13.1084 14.4438 13.1274 14.4933C13.1464 14.5427 13.1513 14.5972 13.1416 14.6497C13.1319 14.7022 13.1081 14.7504 13.073 14.7882L10.177 17.9206C10.1538 17.9457 10.1262 17.9657 10.0958 17.9794C10.0654 17.993 10.0329 18 10 18C9.96712 18 9.93456 17.993 9.90418 17.9794C9.87381 17.9657 9.84622 17.9457 9.823 17.9206L6.927 14.7882C6.89195 14.7504 6.86806 14.7022 6.85838 14.6497C6.8487 14.5972 6.85365 14.5427 6.87261 14.4933C6.89157 14.4438 6.92368 14.4015 6.96487 14.3718C7.00607 14.3421 7.05449 14.3263 7.104 14.3264H9.25V12.9744ZM4.25 10.8112C4.44891 10.8112 4.63968 10.7257 4.78033 10.5736C4.92098 10.4215 5 10.2151 5 10C5 9.78486 4.92098 9.57852 4.78033 9.42639C4.63968 9.27426 4.44891 9.1888 4.25 9.1888H3.75C3.55109 9.1888 3.36032 9.27426 3.21967 9.42639C3.07902 9.57852 3 9.78486 3 10C3 10.2151 3.07902 10.4215 3.21967 10.5736C3.36032 10.7257 3.55109 10.8112 3.75 10.8112H4.25ZM8 10C8 10.2151 7.92098 10.4215 7.78033 10.5736C7.63968 10.7257 7.44891 10.8112 7.25 10.8112H6.75C6.55109 10.8112 6.36032 10.7257 6.21967 10.5736C6.07902 10.4215 6 10.2151 6 10C6 9.78486 6.07902 9.57852 6.21967 9.42639C6.36032 9.27426 6.55109 9.1888 6.75 9.1888H7.25C7.44891 9.1888 7.63968 9.27426 7.78033 9.42639C7.92098 9.57852 8 9.78486 8 10ZM10.25 10.8112C10.4489 10.8112 10.6397 10.7257 10.7803 10.5736C10.921 10.4215 11 10.2151 11 10C11 9.78486 10.921 9.57852 10.7803 9.42639C10.6397 9.27426 10.4489 9.1888 10.25 9.1888H9.75C9.55109 9.1888 9.36032 9.27426 9.21967 9.42639C9.07902 9.57852 9 9.78486 9 10C9 10.2151 9.07902 10.4215 9.21967 10.5736C9.36032 10.7257 9.55109 10.8112 9.75 10.8112H10.25ZM14 10C14 10.2151 13.921 10.4215 13.7803 10.5736C13.6397 10.7257 13.4489 10.8112 13.25 10.8112H12.75C12.5511 10.8112 12.3603 10.7257 12.2197 10.5736C12.079 10.4215 12 10.2151 12 10C12 9.78486 12.079 9.57852 12.2197 9.42639C12.3603 9.27426 12.5511 9.1888 12.75 9.1888H13.25C13.4489 9.1888 13.6397 9.27426 13.7803 9.42639C13.921 9.57852 14 9.78486 14 10ZM16.25 10.8112C16.4489 10.8112 16.6397 10.7257 16.7803 10.5736C16.921 10.4215 17 10.2151 17 10C17 9.78486 16.921 9.57852 16.7803 9.42639C16.6397 9.27426 16.4489 9.1888 16.25 9.1888H15.75C15.5511 9.1888 15.3603 9.27426 15.2197 9.42639C15.079 9.57852 15 9.78486 15 10C15 10.2151 15.079 10.4215 15.2197 10.5736C15.3603 10.7257 15.5511 10.8112 15.75 10.8112H16.25Z"
fill="none"
class="fill-zinc-100 p-4 group-hover:fill-zinc-200 "
/>
</svg>
<svg
fill="none"
xmlns="http://www.w3.org/2000/svg"
class="group hidden h-8 w-8 rounded p-1.5 peer-checked:block"
>
<path
d="M10.177 2.07944L13.073 5.21176C13.1081 5.24957 13.1319 5.2978 13.1416 5.35031C13.1513 5.40283 13.1464 5.45727 13.1274 5.50674C13.1084 5.55621 13.0763 5.59848 13.0351 5.62818C12.9939 5.65789 12.9455 5.67369 12.896 5.6736H10.75V7.0256C10.75 7.24074 10.671 7.44707 10.5303 7.5992C10.3897 7.75133 10.1989 7.8368 10 7.8368C9.80109 7.8368 9.61032 7.75133 9.46967 7.5992C9.32902 7.44707 9.25 7.24074 9.25 7.0256V5.6736H7.104C7.05449 5.67369 7.00607 5.65789 6.96487 5.62818C6.92368 5.59848 6.89157 5.55621 6.87261 5.50674C6.85365 5.45727 6.8487 5.40283 6.85838 5.35031C6.86806 5.2978 6.89195 5.24957 6.927 5.21176L9.823 2.07944C9.84622 2.05426 9.87381 2.03428 9.90418 2.02065C9.93456 2.00702 9.96712 2 10 2C10.0329 2 10.0654 2.00702 10.0958 2.02065C10.1262 2.03428 10.1538 2.05426 10.177 2.07944ZM9.25 12.9744C9.25 12.7593 9.32902 12.5529 9.46967 12.4008C9.61032 12.2487 9.80109 12.1632 10 12.1632C10.1989 12.1632 10.3897 12.2487 10.5303 12.4008C10.671 12.5529 10.75 12.7593 10.75 12.9744V14.3264H12.896C12.9455 14.3263 12.9939 14.3421 13.0351 14.3718C13.0763 14.4015 13.1084 14.4438 13.1274 14.4933C13.1464 14.5427 13.1513 14.5972 13.1416 14.6497C13.1319 14.7022 13.1081 14.7504 13.073 14.7882L10.177 17.9206C10.1538 17.9457 10.1262 17.9657 10.0958 17.9794C10.0654 17.993 10.0329 18 10 18C9.96712 18 9.93456 17.993 9.90418 17.9794C9.87381 17.9657 9.84622 17.9457 9.823 17.9206L6.927 14.7882C6.89195 14.7504 6.86806 14.7022 6.85838 14.6497C6.8487 14.5972 6.85365 14.5427 6.87261 14.4933C6.89157 14.4438 6.92368 14.4015 6.96487 14.3718C7.00607 14.3421 7.05449 14.3263 7.104 14.3264H9.25V12.9744ZM4.25 10.8112C4.44891 10.8112 4.63968 10.7257 4.78033 10.5736C4.92098 10.4215 5 10.2151 5 10C5 9.78486 4.92098 9.57852 4.78033 9.42639C4.63968 9.27426 4.44891 9.1888 4.25 9.1888H3.75C3.55109 9.1888 3.36032 9.27426 3.21967 9.42639C3.07902 9.57852 3 9.78486 3 10C3 10.2151 3.07902 10.4215 3.21967 10.5736C3.36032 10.7257 3.55109 10.8112 3.75 10.8112H4.25ZM8 10C8 10.2151 7.92098 10.4215 7.78033 10.5736C7.63968 10.7257 7.44891 10.8112 7.25 10.8112H6.75C6.55109 10.8112 6.36032 10.7257 6.21967 10.5736C6.07902 10.4215 6 10.2151 6 10C6 9.78486 6.07902 9.57852 6.21967 9.42639C6.36032 9.27426 6.55109 9.1888 6.75 9.1888H7.25C7.44891 9.1888 7.63968 9.27426 7.78033 9.42639C7.92098 9.57852 8 9.78486 8 10ZM10.25 10.8112C10.4489 10.8112 10.6397 10.7257 10.7803 10.5736C10.921 10.4215 11 10.2151 11 10C11 9.78486 10.921 9.57852 10.7803 9.42639C10.6397 9.27426 10.4489 9.1888 10.25 9.1888H9.75C9.55109 9.1888 9.36032 9.27426 9.21967 9.42639C9.07902 9.57852 9 9.78486 9 10C9 10.2151 9.07902 10.4215 9.21967 10.5736C9.36032 10.7257 9.55109 10.8112 9.75 10.8112H10.25ZM14 10C14 10.2151 13.921 10.4215 13.7803 10.5736C13.6397 10.7257 13.4489 10.8112 13.25 10.8112H12.75C12.5511 10.8112 12.3603 10.7257 12.2197 10.5736C12.079 10.4215 12 10.2151 12 10C12 9.78486 12.079 9.57852 12.2197 9.42639C12.3603 9.27426 12.5511 9.1888 12.75 9.1888H13.25C13.4489 9.1888 13.6397 9.27426 13.7803 9.42639C13.921 9.57852 14 9.78486 14 10ZM16.25 10.8112C16.4489 10.8112 16.6397 10.7257 16.7803 10.5736C16.921 10.4215 17 10.2151 17 10C17 9.78486 16.921 9.57852 16.7803 9.42639C16.6397 9.27426 16.4489 9.1888 16.25 9.1888H15.75C15.5511 9.1888 15.3603 9.27426 15.2197 9.42639C15.079 9.57852 15 9.78486 15 10C15 10.2151 15.079 10.4215 15.2197 10.5736C15.3603 10.7257 15.5511 10.8112 15.75 10.8112H16.25Z"
fill="none"
class="fill-zinc-600 p-4 group-hover:fill-zinc-200 "
/>
</svg>
</label>
</button>
{#if !fullContext}
<input type="number" bind:value={context} class="w-14 rounded py-1 pl-2 pr-1" />
{/if}
</div> </div>
</div> </div>
</div> </div>

View File

@ -26,7 +26,6 @@ const config = {
} }
} }
}, },
plugins: [] plugins: []
}; };