Support copying and pasting npubs better

This commit is contained in:
Jon Staab
2025-05-29 14:30:22 -07:00
parent 5338ee11bc
commit 962ac7d80c
8 changed files with 72 additions and 55 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
const image = new Image()
image.addEventListener("error", () => {
element.querySelector(".hidden")?.classList.remove("hidden")
element?.querySelector(".hidden")?.classList.remove("hidden")
})
image.src = src
+2 -2
View File
@@ -3,7 +3,7 @@
import {throttle, clamp} from "@welshman/lib"
import {preventDefault, stopPropagation} from "@lib/html"
const {term, search, select, component: Component, allowCreate = false} = $props()
const {term, search, select, component: Component, style = "", allowCreate = false} = $props()
let index = $state(0)
let items: string[] = $state([])
@@ -57,7 +57,7 @@
})
</script>
<div transition:fly|local={{duration: 200}} class="tiptap-suggestions">
<div transition:fly|local={{duration: 200}} class="tiptap-suggestions" {style}>
<div class="tiptap-suggestions__content max-h-[40vh]">
{#if $term && allowCreate && !items.includes($term)}
<button
+1 -3
View File
@@ -14,8 +14,6 @@
...restProps
} = $props()
const reactiveProps = $derived(props)
let element: Element
onMount(() => {
@@ -28,7 +26,7 @@
...params,
})
instance = mount(component, {target, props: reactiveProps})
instance = mount(component, {target, props})
return () => {
popover?.destroy()