Fix mention suggestions
This commit is contained in:
Generated
+8
-8
@@ -5743,7 +5743,7 @@
|
||||
},
|
||||
"packages/app": {
|
||||
"name": "@welshman/app",
|
||||
"version": "0.0.40",
|
||||
"version": "0.0.41",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/throttle-debounce": "^5.0.2",
|
||||
@@ -5753,7 +5753,7 @@
|
||||
"@welshman/net": "~0.0.46",
|
||||
"@welshman/signer": "~0.0.19",
|
||||
"@welshman/store": "~0.0.15",
|
||||
"@welshman/util": "~0.0.58",
|
||||
"@welshman/util": "~0.0.59",
|
||||
"fuse.js": "^7.0.0",
|
||||
"idb": "^8.0.0",
|
||||
"svelte": "^4.2.18",
|
||||
@@ -5781,7 +5781,7 @@
|
||||
"@noble/hashes": "^1.6.1",
|
||||
"@welshman/lib": "~0.0.37",
|
||||
"@welshman/net": "~0.0.46",
|
||||
"@welshman/util": "~0.0.58",
|
||||
"@welshman/util": "~0.0.59",
|
||||
"nostr-tools": "^2.7.2"
|
||||
}
|
||||
},
|
||||
@@ -5799,7 +5799,7 @@
|
||||
},
|
||||
"packages/editor": {
|
||||
"name": "@welshman/editor",
|
||||
"version": "0.0.8",
|
||||
"version": "0.0.9",
|
||||
"devDependencies": {
|
||||
"@sveltejs/kit": "^2.0.0",
|
||||
"@sveltejs/package": "^2.0.0",
|
||||
@@ -6395,7 +6395,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "~0.0.37",
|
||||
"@welshman/util": "~0.0.58"
|
||||
"@welshman/util": "~0.0.59"
|
||||
}
|
||||
},
|
||||
"packages/lib": {
|
||||
@@ -6421,7 +6421,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "~0.0.37",
|
||||
"@welshman/util": "~0.0.58",
|
||||
"@welshman/util": "~0.0.59",
|
||||
"isomorphic-ws": "^5.0.0",
|
||||
"ws": "^8.16.0"
|
||||
},
|
||||
@@ -6438,7 +6438,7 @@
|
||||
"@noble/hashes": "^1.6.1",
|
||||
"@welshman/lib": "~0.0.37",
|
||||
"@welshman/net": "~0.0.46",
|
||||
"@welshman/util": "~0.0.58",
|
||||
"@welshman/util": "~0.0.59",
|
||||
"nostr-tools": "^2.7.2"
|
||||
},
|
||||
"engines": {
|
||||
@@ -6493,7 +6493,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@welshman/lib": "~0.0.37",
|
||||
"@welshman/util": "~0.0.58",
|
||||
"@welshman/util": "~0.0.59",
|
||||
"svelte": "^4.2.18"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"@welshman/net": "~0.0.46",
|
||||
"@welshman/signer": "~0.0.19",
|
||||
"@welshman/store": "~0.0.15",
|
||||
"@welshman/util": "~0.0.58",
|
||||
"@welshman/util": "~0.0.59",
|
||||
"fuse.js": "^7.0.0",
|
||||
"idb": "^8.0.0",
|
||||
"svelte": "^4.2.18",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@welshman/content",
|
||||
"version": "0.0.15",
|
||||
"version": "0.0.16",
|
||||
"author": "hodlbod",
|
||||
"license": "MIT",
|
||||
"description": "A collection of utilities for parsing nostr note content.",
|
||||
|
||||
@@ -211,7 +211,7 @@ export const parseEvent = (text: string, context: ParseContext): ParsedEvent | v
|
||||
}
|
||||
|
||||
export const parseInvoice = (text: string, context: ParseContext): ParsedInvoice | void => {
|
||||
const [value] = text.match(/^ln(lnbc|lnurl)[\d\w]{50,1000}/i) || []
|
||||
const [value] = text.match(/^ln(bc|url)[0-9a-z]{10,}/i) || []
|
||||
|
||||
if (value) {
|
||||
return {type: ParsedType.Invoice, value, raw: value}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"@noble/hashes": "^1.6.1",
|
||||
"@welshman/lib": "~0.0.37",
|
||||
"@welshman/net": "~0.0.46",
|
||||
"@welshman/util": "~0.0.58",
|
||||
"@welshman/util": "~0.0.59",
|
||||
"nostr-tools": "^2.7.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@welshman/editor",
|
||||
"version": "0.0.9",
|
||||
"version": "0.0.10",
|
||||
"scripts": {
|
||||
"pub": "npm run check && npm run build && npm publish",
|
||||
"fix": "",
|
||||
|
||||
@@ -5,6 +5,7 @@ import tippy from "tippy.js"
|
||||
import {nprofileEncode} from "nostr-tools/nip19"
|
||||
// @ts-ignore
|
||||
import type {Editor} from "svelte-tiptap"
|
||||
import {makeNProfileAttrs} from 'nostr-editor'
|
||||
import {PluginKey} from "@tiptap/pm/state"
|
||||
import Suggestion from "@tiptap/suggestion"
|
||||
import Suggestions from "../components/Suggestions.svelte"
|
||||
@@ -137,9 +138,9 @@ export const MentionSuggestion = (options: MentionSuggestionOptions) =>
|
||||
name: "nprofile",
|
||||
select: (pubkey: string, props: any) => {
|
||||
const relays = options.getRelays(pubkey)
|
||||
const nprofile = nprofileEncode({pubkey, relays})
|
||||
const bech32 = nprofileEncode({pubkey, relays})
|
||||
|
||||
return props.command({pubkey, relays, nprofile})
|
||||
return props.command(makeNProfileAttrs(bech32, {}))
|
||||
},
|
||||
...options,
|
||||
})
|
||||
|
||||
@@ -27,6 +27,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@welshman/lib": "~0.0.37",
|
||||
"@welshman/util": "~0.0.58"
|
||||
"@welshman/util": "~0.0.59"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@welshman/lib": "~0.0.37",
|
||||
"@welshman/util": "~0.0.58",
|
||||
"@welshman/util": "~0.0.59",
|
||||
"isomorphic-ws": "^5.0.0",
|
||||
"ws": "^8.16.0"
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"@noble/hashes": "^1.6.1",
|
||||
"@welshman/lib": "~0.0.37",
|
||||
"@welshman/net": "~0.0.46",
|
||||
"@welshman/util": "~0.0.58",
|
||||
"@welshman/util": "~0.0.59",
|
||||
"nostr-tools": "^2.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@welshman/lib": "~0.0.37",
|
||||
"@welshman/util": "~0.0.58",
|
||||
"@welshman/util": "~0.0.59",
|
||||
"svelte": "^4.2.18"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user