fix: make formatter happy
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
'<code class="text-[11px] rounded px-1 font-mono" style="background: var(--color-layer-3); color: var(--color-text);">$1</code>'
|
||||
)
|
||||
.replaceAll(/\*/, '')
|
||||
.replaceAll(/\_/, '')
|
||||
.replaceAll(/_/, '')
|
||||
.replaceAll(/\n+/g, '<br>');
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
if (i < target.length) {
|
||||
displayed = target.slice(0, ++i);
|
||||
typeTimer = setTimeout(tick, 26);
|
||||
} else {
|
||||
}
|
||||
}
|
||||
// Defer first tick so no reads happen during the synchronous effect body
|
||||
@@ -86,11 +85,11 @@
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="fixed p-2 z-99999 pointer-events-auto rounded-md border"
|
||||
class="pointer-events-auto fixed z-99999 rounded-md border p-2"
|
||||
style:width="{BUBBLE_WIDTH}px"
|
||||
style:left="{left}px"
|
||||
style:bottom={bottom}
|
||||
style:top={top}
|
||||
style:bottom
|
||||
style:top
|
||||
style:background="var(--color-layer-0)"
|
||||
style:border-color="var(--color-outline)"
|
||||
>
|
||||
@@ -98,7 +97,10 @@
|
||||
<!-- Tail pointing up toward avatar -->
|
||||
<div
|
||||
class="absolute -top-2 h-3.5 w-3.5 rotate-45 border-t border-l"
|
||||
style:left="{Math.min(Math.max(avatarX - left + AVATAR_SIZE / 2 - 25, 12), BUBBLE_WIDTH - 28)}px"
|
||||
style:left="{Math.min(
|
||||
Math.max(avatarX - left + AVATAR_SIZE / 2 - 25, 12),
|
||||
BUBBLE_WIDTH - 28
|
||||
)}px"
|
||||
style:background="var(--color-layer-0)"
|
||||
style:border-color="var(--color-outline)"
|
||||
>
|
||||
@@ -106,26 +108,29 @@
|
||||
{:else}
|
||||
<!-- Tail pointing down toward avatar -->
|
||||
<div
|
||||
class="absolute -bottom-2 h-3.5 w-3.5 rotate-45 border-b border-r"
|
||||
style:left="{Math.min(Math.max(avatarX - left + AVATAR_SIZE / 2 - 25, 12), BUBBLE_WIDTH - 28)}px"
|
||||
class="absolute -bottom-2 h-3.5 w-3.5 rotate-45 border-r border-b"
|
||||
style:left="{Math.min(
|
||||
Math.max(avatarX - left + AVATAR_SIZE / 2 - 25, 12),
|
||||
BUBBLE_WIDTH - 28
|
||||
)}px"
|
||||
style:background="var(--color-layer-0)"
|
||||
style:border-color="var(--color-outline)"
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div class="mb-2 min-h-[1.4em] text-sm leading-relaxed" style="color: var(--color-text)">
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html renderMarkdown(displayed)}
|
||||
</div>
|
||||
|
||||
{#if choices.length > 0}
|
||||
<div class="flex flex-col gap-1.5">
|
||||
{#each choices as choice, i}
|
||||
{#each choices as choice, i (choice.label)}
|
||||
{#if finished}
|
||||
<button
|
||||
in:fade={{ duration: 200, delay: i * 250 }}
|
||||
class="rounded-lg px-3 py-1.5 text-left text-sm font-medium transition-colors cursor-pointer"
|
||||
class="cursor-pointer rounded-lg px-3 py-1.5 text-left text-sm font-medium transition-colors"
|
||||
style:background="var(--color-layer-1)"
|
||||
style:border-color="var(--color-outline)"
|
||||
style:color="var(--color-text)"
|
||||
@@ -138,9 +143,9 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="flex items-center justify-between gap-2 mt-2">
|
||||
<div class="mt-2 flex items-center justify-between gap-2">
|
||||
<button
|
||||
class="text-xs transition-colors cursor-pointer"
|
||||
class="cursor-pointer text-xs transition-colors"
|
||||
style="color: var(--color-outline)"
|
||||
onclick={onClose}
|
||||
>
|
||||
@@ -154,7 +159,7 @@
|
||||
{/if}
|
||||
{#if showNext && finished}
|
||||
<button
|
||||
class="rounded-lg px-3 py-1 text-xs font-semibold cursor-pointer transition-colors"
|
||||
class="cursor-pointer rounded-lg px-3 py-1 text-xs font-semibold transition-colors"
|
||||
style:background="var(--color-outline)"
|
||||
style:color="var(--color-layer-0)"
|
||||
onclick={onNext}
|
||||
|
||||
Reference in New Issue
Block a user