{content.external.description}
-
{toNiceDomain(content.external.uri)}
@@ -443,7 +437,7 @@ function GenericWithImageEmbed({
)
}
-function VideoEmbed({content}: {content: AppBskyEmbedVideo.View}) {
+function VideoEmbed({content}: {content: app.bsky.embed.video.View}) {
let aspectRatio = 1
if (content.aspectRatio) {
@@ -493,16 +487,13 @@ function VideoEmbed({content}: {content: AppBskyEmbedVideo.View}) {
function StarterPackEmbed({
content,
}: {
- content: AppBskyGraphDefs.StarterPackViewBasic
+ content: app.bsky.graph.defs.StarterPackViewBasic
}) {
- if (
- !bsky.dangerousIsType
- {content.record.name}
- {record.name}
Starter pack by{' '}
{content.creator.displayName || `@${content.creator.handle}`}
{content.record.description} {record.description}
@@ -540,14 +529,14 @@ function StarterPackEmbed({
// from #/lib/strings/starter-pack.ts
function getStarterPackImage(
- starterPack: AppBskyGraphDefs.StarterPackViewBasic,
+ starterPack: app.bsky.graph.defs.StarterPackViewBasic,
) {
const rkey = getRkey({uri: starterPack.uri})
return `https://ogcard.cdn.bsky.app/start/${starterPack.creator.did}/${rkey}`
}
function getStarterPackHref(
- starterPack: AppBskyGraphDefs.StarterPackViewBasic,
+ starterPack: app.bsky.graph.defs.StarterPackViewBasic,
) {
const rkey = getRkey({uri: starterPack.uri})
const handleOrDid = starterPack.creator.handle || starterPack.creator.did
diff --git a/bskyembed/src/components/link.tsx b/bskyembed/src/components/link.tsx
index 8a20fe5c10..93de98363a 100644
--- a/bskyembed/src/components/link.tsx
+++ b/bskyembed/src/components/link.tsx
@@ -1,4 +1,4 @@
-import {h} from 'preact'
+import {h, HTMLAttributes} from 'preact'
export function Link({
href,
@@ -9,7 +9,7 @@ export function Link({
href: string
className?: string
disableTracking?: boolean
-} & h.JSX.HTMLAttributes that adds an extra flex gap above the embed
if (!record?.text) return null
- const rt = new RichText({
- text: record.text,
- facets: record.facets,
- })
+ // const rt = new RichText({
+ // text: record.text,
+ // facets: record.facets,
+ // })
- const richText = []
+ // const richText = []
- let counter = 0
- for (const segment of rt.segments()) {
- if (
- segment.link &&
- AppBskyRichtextFacet.validateLink(segment.link).success
- ) {
- richText.push(
-
- {segment.text}
- ,
- )
- } else if (
- segment.mention &&
- AppBskyRichtextFacet.validateMention(segment.mention).success
- ) {
- richText.push(
-
- {segment.text}
- ,
- )
- } else if (
- segment.tag &&
- AppBskyRichtextFacet.validateTag(segment.tag).success
- ) {
- richText.push(
-
- {segment.text}
- ,
- )
- } else {
- richText.push(segment.text)
- }
+ // let counter = 0
+ // for (const segment of rt.segments()) {
+ // if (
+ // segment.link &&
+ // app.bsky.richtext.facet.link.$safeValidate(segment.link).success
+ // ) {
+ // richText.push(
+ //
+ // {segment.text}
+ // ,
+ // )
+ // } else if (
+ // segment.mention &&
+ // app.bsky.richtext.facet.mention.safeValidate(segment.mention).success
+ // ) {
+ // richText.push(
+ //
+ // {segment.text}
+ // ,
+ // )
+ // } else if (
+ // segment.tag &&
+ // app.bsky.richtext.facet.tag.safeValidate(segment.tag).success
+ // ) {
+ // richText.push(
+ //
+ // {segment.text}
+ // ,
+ // )
+ // } else {
+ // richText.push(segment.text)
+ // }
- counter++
- }
+ // counter++
+ // }
- return (
-
- {richText}
-
+ // {richText}
+ //
` - }, [thread, colorMode]) + }, [post, colorMode]) return (${escapeHtml(record.text)}${ @@ -258,13 +250,13 @@ function Snippet({ ? `
— ${escapeHtml( - thread.post.author.displayName || thread.post.author.handle, + post.author.displayName || post.author.handle, )} (@${escapeHtml( - thread.post.author.handle, + post.author.handle, )}) ${escapeHtml( - niceDate(thread.post.indexedAt), + niceDate(post.indexedAt), )}
[image or embed]` : '' }