Bump welshman, add email rendering support
This commit is contained in:
parent
6f731e48d2
commit
94db65b85e
5 changed files with 30 additions and 10 deletions
20
package.json
20
package.json
|
|
@ -72,16 +72,16 @@
|
||||||
"@types/throttle-debounce": "^5.0.2",
|
"@types/throttle-debounce": "^5.0.2",
|
||||||
"@vite-pwa/assets-generator": "^0.2.6",
|
"@vite-pwa/assets-generator": "^0.2.6",
|
||||||
"@vite-pwa/sveltekit": "^0.6.8",
|
"@vite-pwa/sveltekit": "^0.6.8",
|
||||||
"@welshman/app": "^0.8.13",
|
"@welshman/app": "^0.8.14",
|
||||||
"@welshman/content": "^0.8.13",
|
"@welshman/content": "^0.8.14",
|
||||||
"@welshman/editor": "^0.8.13",
|
"@welshman/editor": "^0.8.14",
|
||||||
"@welshman/feeds": "^0.8.13",
|
"@welshman/feeds": "^0.8.14",
|
||||||
"@welshman/lib": "^0.8.13",
|
"@welshman/lib": "^0.8.14",
|
||||||
"@welshman/net": "^0.8.13",
|
"@welshman/net": "^0.8.14",
|
||||||
"@welshman/router": "^0.8.13",
|
"@welshman/router": "^0.8.14",
|
||||||
"@welshman/signer": "^0.8.13",
|
"@welshman/signer": "^0.8.14",
|
||||||
"@welshman/store": "^0.8.13",
|
"@welshman/store": "^0.8.14",
|
||||||
"@welshman/util": "^0.8.13",
|
"@welshman/util": "^0.8.14",
|
||||||
"cheerio": "^1.2.0",
|
"cheerio": "^1.2.0",
|
||||||
"compressorjs-next": "^1.1.2",
|
"compressorjs-next": "^1.1.2",
|
||||||
"daisyui": "^5.5.19",
|
"daisyui": "^5.5.19",
|
||||||
|
|
|
||||||
BIN
pnpm-lock.yaml
BIN
pnpm-lock.yaml
Binary file not shown.
|
|
@ -6,6 +6,7 @@
|
||||||
truncate,
|
truncate,
|
||||||
renderAsHtml,
|
renderAsHtml,
|
||||||
isText,
|
isText,
|
||||||
|
isEmail,
|
||||||
isEmoji,
|
isEmoji,
|
||||||
isTopic,
|
isTopic,
|
||||||
isCode,
|
isCode,
|
||||||
|
|
@ -26,6 +27,7 @@
|
||||||
import Button from "@lib/components/Button.svelte"
|
import Button from "@lib/components/Button.svelte"
|
||||||
import ContentToken from "@app/components/ContentToken.svelte"
|
import ContentToken from "@app/components/ContentToken.svelte"
|
||||||
import ContentEmoji from "@app/components/ContentEmoji.svelte"
|
import ContentEmoji from "@app/components/ContentEmoji.svelte"
|
||||||
|
import ContentEmail from "@app/components/ContentEmail.svelte"
|
||||||
import ContentCode from "@app/components/ContentCode.svelte"
|
import ContentCode from "@app/components/ContentCode.svelte"
|
||||||
import ContentLinkInline from "@app/components/ContentLinkInline.svelte"
|
import ContentLinkInline from "@app/components/ContentLinkInline.svelte"
|
||||||
import ContentLinkBlock from "@app/components/ContentLinkBlock.svelte"
|
import ContentLinkBlock from "@app/components/ContentLinkBlock.svelte"
|
||||||
|
|
@ -159,6 +161,8 @@
|
||||||
<ContentTopic value={parsed.value} />
|
<ContentTopic value={parsed.value} />
|
||||||
{:else if isEmoji(parsed)}
|
{:else if isEmoji(parsed)}
|
||||||
<ContentEmoji value={parsed.value} />
|
<ContentEmoji value={parsed.value} />
|
||||||
|
{:else if isEmail(parsed)}
|
||||||
|
<ContentEmail value={parsed.value} />
|
||||||
{:else if isCode(parsed)}
|
{:else if isCode(parsed)}
|
||||||
<ContentCode
|
<ContentCode
|
||||||
value={parsed.value}
|
value={parsed.value}
|
||||||
|
|
|
||||||
12
src/app/components/ContentEmail.svelte
Normal file
12
src/app/components/ContentEmail.svelte
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import LinkRound from "@assets/icons/link-round.svg?dataurl"
|
||||||
|
import Icon from "@lib/components/Icon.svelte"
|
||||||
|
import Link from "@lib/components/Link.svelte"
|
||||||
|
|
||||||
|
export let value: string
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Link external href="mailto:{value}">
|
||||||
|
<Icon icon={LinkRound} size={3} />
|
||||||
|
{value}
|
||||||
|
</Link>
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
renderAsHtml,
|
renderAsHtml,
|
||||||
isText,
|
isText,
|
||||||
isEmoji,
|
isEmoji,
|
||||||
|
isEmail,
|
||||||
isTopic,
|
isTopic,
|
||||||
isCode,
|
isCode,
|
||||||
isCashu,
|
isCashu,
|
||||||
|
|
@ -24,6 +25,7 @@
|
||||||
import Button from "@lib/components/Button.svelte"
|
import Button from "@lib/components/Button.svelte"
|
||||||
import ContentToken from "@app/components/ContentToken.svelte"
|
import ContentToken from "@app/components/ContentToken.svelte"
|
||||||
import ContentEmoji from "@app/components/ContentEmoji.svelte"
|
import ContentEmoji from "@app/components/ContentEmoji.svelte"
|
||||||
|
import ContentEmail from "@app/components/ContentEmail.svelte"
|
||||||
import ContentCode from "@app/components/ContentCode.svelte"
|
import ContentCode from "@app/components/ContentCode.svelte"
|
||||||
import ContentLinkInline from "@app/components/ContentLinkInline.svelte"
|
import ContentLinkInline from "@app/components/ContentLinkInline.svelte"
|
||||||
import ContentNewline from "@app/components/ContentNewline.svelte"
|
import ContentNewline from "@app/components/ContentNewline.svelte"
|
||||||
|
|
@ -109,6 +111,8 @@
|
||||||
<ContentTopic value={parsed.value} />
|
<ContentTopic value={parsed.value} />
|
||||||
{:else if isEmoji(parsed)}
|
{:else if isEmoji(parsed)}
|
||||||
<ContentEmoji value={parsed.value} />
|
<ContentEmoji value={parsed.value} />
|
||||||
|
{:else if isEmail(parsed)}
|
||||||
|
<ContentEmail value={parsed.value} />
|
||||||
{:else if isCode(parsed)}
|
{:else if isCode(parsed)}
|
||||||
<ContentCode
|
<ContentCode
|
||||||
value={parsed.value}
|
value={parsed.value}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue