Bluesky app fork with some witchin' additions 💫

[APP-1321]: Update brand embeds more clearly (#8955)

* Nightly source-language update

* run prettier

* wip

* feat: use local dev for bskyembed test.html

* feat: commit generated files which i'm not sure about

* Revert "feat: commit generated files which i'm not sure about"

This reverts commit b891efdaa1fd7ddd4417bfd5267e861a25a93b0e.

* chore: revert change to bskyembed/.eslintrc.cjs

* chore: remove generated file from bskyweb/static

* chore: revert messages.po changes

* Update bskyembed/test.html

* Nightly source-language update

* Update: Bluesky embeds

* update: embed colors for light and dark modes

* remove unused changes

* remove duplicate word

* update border radius and add cursor pointer

* add icons folder for dynamic icons

---------

Co-authored-by: Anastasiya Uraleva <anastasiya@Mac.localdomain>
Co-authored-by: Elijah Seed-Arita <elijaharita@gmail.com>
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Co-authored-by: Anastasiya Uraleva <anastasiya@Anastasiyas-MacBook-Pro.local>

Changed files
+162 -56
bskyembed
+10
bskyembed/assets/logo_full_name.svg
··· 1 + <svg width="105" height="32" viewBox="0 0 105 32" fill="none" xmlns="http://www.w3.org/2000/svg"> 2 + <path d="M19.7901 9.77492C21.7947 11.2889 23.9508 14.3587 24.7425 16.0059C25.5342 14.3587 27.6903 11.2889 29.6949 9.77492C31.1413 8.68251 33.485 7.83725 33.485 10.5269C33.485 11.064 33.1789 15.0393 32.9993 15.6848C32.3752 17.9285 30.1009 18.5008 28.0778 18.1544C31.6141 18.7598 32.5136 20.7653 30.5709 22.7708C26.1996 27.2831 24.7425 20.3569 24.7425 20.3569C24.7425 20.3569 23.2854 27.2831 18.9142 22.7708C16.9714 20.7653 17.871 18.7598 21.4072 18.1544C19.3841 18.5008 17.1099 17.9285 16.4857 15.6848C16.3061 15.0393 16 11.064 16 10.5269C16 7.83725 18.3437 8.68251 19.7901 9.77492Z" fill="white"/> 3 + <path d="M44.3863 16.3646C45.5901 16.7932 46.2292 17.7837 46.2292 18.8924C46.2292 20.7698 44.9659 21.908 42.5434 21.908H37.5942V11.3828H42.3799C44.6835 11.3828 45.7982 12.5506 45.7982 14.1028C45.7982 15.1376 45.3226 15.8915 44.3863 16.3646ZM42.2313 13.0237H39.6006V15.7732H42.2313C43.2568 15.7732 43.8067 15.2411 43.8067 14.3541C43.8067 13.5411 43.2419 13.0237 42.2313 13.0237ZM39.6006 20.2524H42.4393C43.5689 20.2524 44.1782 19.735 44.1782 18.8037C44.1782 17.828 43.5986 17.3402 42.4393 17.3402H39.6006V20.2524Z" fill="white"/> 4 + <path d="M49.0111 21.908H47.1385V11.3828H49.0111V21.908Z" fill="white"/> 5 + <path d="M55.2202 18.5524V14.2802H57.0929V21.908H55.2797V20.7993C54.7 21.6567 53.8975 22.0854 52.872 22.0854C51.252 22.0854 50.1968 21.1098 50.1968 19.3359V14.2802H52.0694V19.0254C52.0694 19.9863 52.545 20.4741 53.5111 20.4741C54.4177 20.4741 55.2202 19.8089 55.2202 18.5524Z" fill="white"/> 6 + <path d="M65.6167 18.2272V18.6706H59.8799C60.0137 19.9863 60.7419 20.6367 61.8714 20.6367C62.7334 20.6367 63.3131 20.2672 63.6252 19.5428H65.4235C65.0222 21.095 63.6846 22.0854 61.8566 22.0854C60.7122 22.0854 59.7907 21.7159 59.0922 20.9915C58.3937 20.2672 58.037 19.3063 58.037 18.0941C58.037 16.8967 58.3788 15.9359 59.0773 15.1967C59.7759 14.4724 60.6825 14.1028 61.8269 14.1028C62.9861 14.1028 63.9076 14.4872 64.5912 15.2411C65.2749 15.995 65.6167 17.0002 65.6167 18.2272ZM61.812 15.5515C60.7865 15.5515 60.0731 16.1428 59.8948 17.3698H63.7441C63.5806 16.2611 62.8969 15.5515 61.812 15.5515Z" fill="white"/> 7 + <path d="M69.7673 22.115C67.5379 22.115 66.3638 21.2428 66.2598 19.4837H68.0878C68.1918 20.4298 68.6674 20.7846 69.797 20.7846C70.8076 20.7846 71.3129 20.4741 71.3129 19.868C71.3129 19.3211 70.9562 19.055 69.8118 18.8628L68.935 18.715C67.2555 18.4341 66.4232 17.6654 66.4232 16.4089C66.4232 14.975 67.5676 14.1028 69.6038 14.1028C71.7885 14.1028 72.9181 14.9602 72.9924 16.6898H71.2238C71.1792 15.7585 70.6293 15.4332 69.6038 15.4332C68.712 15.4332 68.2662 15.7289 68.2662 16.3202C68.2662 16.8524 68.6526 17.0889 69.5443 17.2515L70.5104 17.3993C72.3681 17.7393 73.1707 18.4193 73.1707 19.7202C73.1707 21.2576 71.9223 22.115 69.7673 22.115Z" fill="white"/> 8 + <path d="M81.3899 21.908H79.2497L77.0204 18.3602L75.8611 19.5132V21.908H74.0182V11.3828H75.8611V17.4437L78.9822 14.2802H81.2116L78.3134 17.1628L81.3899 21.908Z" fill="white"/> 9 + <path d="M86.2805 16.2019L86.9047 14.2802H88.8665L85.909 22.5289C85.5968 23.3715 85.2104 23.9776 84.72 24.3176C84.2295 24.6576 83.531 24.8202 82.6095 24.8202C82.2974 24.8202 82.0299 24.8054 81.7921 24.7759V23.3124H82.5055C83.3526 23.3124 83.7688 22.795 83.7688 22.0854C83.7688 21.7306 83.6499 21.2132 83.4121 20.548L81.1827 14.2802H83.204L83.8282 16.1872C84.289 17.6211 84.6902 19.0402 85.0469 20.4446C85.3739 19.2324 85.7901 17.8132 86.2805 16.2019Z" fill="white"/> 10 + </svg>
+4 -2
bskyembed/src/components/container.tsx
··· 37 37 return ( 38 38 <div 39 39 ref={ref} 40 - className="w-full bg-white text-black hover:bg-neutral-50 dark:bg-dimmedBg dark:hover:bg-dimmedBgLighten relative transition-colors max-w-[600px] min-w-[300px] flex border dark:border-slate-600 dark:text-slate-200 rounded-xl" 40 + className="w-full bg-brand text-black dark:bg-brand relative transition-colors max-w-[600px] min-w-[300px] flex items-center dark:text-slate-200 rounded-[20px] cursor-pointer hover:bg-opacity-90" 41 41 onClick={() => { 42 42 if (ref.current && href) { 43 43 // forwardRef requires preact/compat - let's keep it simple ··· 49 49 } 50 50 }}> 51 51 {href && <Link href={href} />} 52 - <div className="flex-1 px-4 pt-3 pb-2.5 max-w-full">{children}</div> 52 + <div className="flex-1 px-[6px] pt-[6px] pb-2.5 max-w-full"> 53 + {children} 54 + </div> 53 55 </div> 54 56 ) 55 57 }
+3 -3
bskyembed/src/components/embed.tsx
··· 83 83 return ( 84 84 <Link 85 85 href={`/profile/${record.author.did}/post/${getRkey(record)}`} 86 - className="transition-colors hover:bg-neutral-100 dark:hover:bg-slate-700 border dark:border-slate-600 rounded-xl p-2 gap-1.5 w-full flex flex-col"> 86 + className="transition-colors hover:bg-blue-50 dark:hover:bg-slate-900 border dark:border-slate-600 rounded-xl p-2 gap-1.5 w-full flex flex-col"> 87 87 <div className="flex gap-1.5 items-center"> 88 - <div className="w-4 h-4 rounded-full bg-neutral-300 dark:bg-slate-700 shrink-0"> 88 + <div className="w-4 h-4 rounded-full bg-neutral-300 dark:bg-slate-900 shrink-0"> 89 89 <img 90 90 className="rounded-full" 91 91 src={record.author.avatar} ··· 222 222 223 223 function Info({children}: {children: ComponentChildren}) { 224 224 return ( 225 - <div className="w-full rounded-xl border py-2 px-2.5 flex-row flex gap-2 bg-neutral-50"> 225 + <div className="w-full rounded-xl border py-2 px-2.5 flex-row flex gap-2 hover:bg-blue-50 dark:border-slate-600 dark:hover:bg-slate-900"> 226 226 <img src={infoIcon} className="w-4 h-4 shrink-0 mt-0.5" /> 227 227 <p className="text-sm text-textLight dark:text-textDimmed">{children}</p> 228 228 </div>
+63 -51
bskyembed/src/components/post.tsx
··· 6 6 } from '@atproto/api' 7 7 import {h} from 'preact' 8 8 9 - import replyIcon from '../../assets/bubble_filled_stroke2_corner2_rounded.svg' 10 - import likeIcon from '../../assets/heart2_filled_stroke2_corner0_rounded.svg' 11 - import logo from '../../assets/logo.svg' 12 - import repostIcon from '../../assets/repost_stroke2_corner2_rounded.svg' 9 + import logo from '../../assets/logo_full_name.svg' 10 + import {Like as LikeIcon} from '../icons/Like' 11 + import {Reply as ReplyIcon} from '../icons/Reply' 12 + import {Repost as RepostIcon} from '../icons/Repost' 13 13 import {CONTENT_LABELS} from '../labels' 14 14 import * as bsky from '../types/bsky' 15 15 import {niceDate} from '../util/nice-date' ··· 45 45 const verification = getVerificationState({profile: post.author}) 46 46 47 47 const href = `/profile/${post.author.did}/post/${getRkey(post)}` 48 + 48 49 return ( 49 50 <Container href={href}> 50 - <div className="flex-1 flex-col flex gap-2" lang={record?.langs?.[0]}> 51 - <div className="flex gap-2.5 items-center cursor-pointer w-full max-w-full"> 51 + <div 52 + className="flex-1 flex-col flex gap-2 bg-neutral-50 dark:bg-black dark:hover:bg-slate-900 hover:bg-blue-50 rounded-[14px] p-4" 53 + lang={record?.langs?.[0]}> 54 + <div className="flex gap-2.5 items-center cursor-pointer w-full max-w-full "> 52 55 <Link 53 56 href={`/profile/${post.author.did}`} 54 57 className="rounded-full shrink-0"> ··· 80 83 @{post.author.handle} 81 84 </Link> 82 85 </div> 83 - <Link 84 - href={href} 85 - className="transition-transform hover:scale-110 shrink-0 self-start"> 86 - <img src={logo} className="h-8" /> 87 - </Link> 88 86 </div> 89 87 <PostContent record={record} /> 90 88 <Embed content={post.embed} labels={post.labels} /> 91 - <Link href={href}> 92 - <time 93 - datetime={new Date(post.indexedAt).toISOString()} 94 - className="text-textLight dark:text-textDimmed mt-1 text-sm hover:underline"> 95 - {niceDate(post.indexedAt)} 96 - </time> 97 - </Link> 98 - <div className="border-t dark:border-slate-600 w-full pt-2.5 flex items-center gap-5 text-sm cursor-pointer"> 99 - {!!post.likeCount && ( 100 - <div className="flex items-center gap-2 cursor-pointer"> 101 - <img src={likeIcon} className="w-5 h-5" /> 102 - <p className="font-bold text-neutral-500 dark:text-neutral-300 mb-px"> 103 - {prettyNumber(post.likeCount)} 104 - </p> 105 - </div> 106 - )} 107 - {!!post.repostCount && ( 108 - <div className="flex items-center gap-2 cursor-pointer"> 109 - <img src={repostIcon} className="w-5 h-5" /> 110 - <p className="font-bold text-neutral-500 dark:text-neutral-300 mb-px"> 111 - {prettyNumber(post.repostCount)} 112 - </p> 113 - </div> 114 - )} 115 - <div className="flex items-center gap-2 cursor-pointer"> 116 - <img src={replyIcon} className="w-5 h-5" /> 117 - <p className="font-bold text-neutral-500 dark:text-neutral-300 mb-px"> 118 - Reply 119 - </p> 89 + 90 + <div className="flex items-center justify-between w-full pt-2.5 text-sm"> 91 + <div className="flex items-center gap-3 text-sm cursor-pointer"> 92 + {!!post.likeCount && ( 93 + <div className="flex items-center gap-1 cursor-pointer group"> 94 + <LikeIcon 95 + width={20} 96 + height={20} 97 + className="text-slate-600 dark:text-slate-400 group-hover:text-neutral-800 dark:group-hover:text-white transition-colors" 98 + /> 99 + <p className="font-medium text-slate-600 text-neutral-600 dark:text-neutral-300 mb-px group-hover:text-neutral-800 dark:group-hover:text-white transition-colors dark:text-slate-400"> 100 + {prettyNumber(post.likeCount)} 101 + </p> 102 + </div> 103 + )} 104 + {!!post.replyCount && ( 105 + <div className="flex items-center gap-1 cursor-pointer group"> 106 + <ReplyIcon 107 + width={20} 108 + height={20} 109 + className="text-slate-600 dark:text-slate-400 group-hover:text-neutral-800 dark:group-hover:text-white transition-colors" 110 + /> 111 + <p className="font-medium text-slate-600 text-neutral-600 dark:text-neutral-300 mb-px group-hover:text-neutral-800 dark:group-hover:text-white transition-colors dark:text-slate-400"> 112 + {prettyNumber(post.replyCount)} 113 + </p> 114 + </div> 115 + )} 116 + 117 + {!!post.repostCount && ( 118 + <div className="flex items-center gap-1 cursor-pointer group"> 119 + <RepostIcon 120 + width={20} 121 + height={20} 122 + className="text-slate-600 dark:text-slate-400 group-hover:text-neutral-800 dark:group-hover:text-white transition-colors" 123 + /> 124 + <p className="font-medium text-slate-600 dark:text-slate-400 mb-px group-hover:text-neutral-800 dark:group-hover:text-white transition-colors"> 125 + {prettyNumber(post.repostCount)} 126 + </p> 127 + </div> 128 + )} 120 129 </div> 121 - <div className="flex-1" /> 122 - <p className="cursor-pointer text-brand dark:text-brandLighten font-bold hover:underline hidden min-[450px]:inline"> 123 - {post.replyCount 124 - ? `Read ${prettyNumber(post.replyCount)} ${ 125 - post.replyCount > 1 ? 'replies' : 'reply' 126 - } on Bluesky` 127 - : `View on Bluesky`} 128 - </p> 129 - <p className="cursor-pointer text-brand font-bold hover:underline min-[450px]:hidden"> 130 - <span className="hidden min-[380px]:inline">View on </span>Bluesky 131 - </p> 130 + <Link href={href}> 131 + <time 132 + datetime={new Date(post.indexedAt).toISOString()} 133 + className="text-slate-500 dark:text-textDimmed text-sm hover:underline dark:text-slate-500"> 134 + {niceDate(post.indexedAt)} 135 + </time> 136 + </Link> 132 137 </div> 138 + </div> 139 + <div className="flex items-center justify-end pt-2"> 140 + <Link 141 + href={href} 142 + className="transition-transform hover:scale-110 shrink-0"> 143 + <img src={logo} className="h-8" /> 144 + </Link> 133 145 </div> 134 146 </Container> 135 147 )
+28
bskyembed/src/icons/Like.tsx
··· 1 + import {h} from 'preact' 2 + 3 + export const Like = ({ 4 + width = 16, 5 + height = 17, 6 + fill = 'currentColor', 7 + className, 8 + }: { 9 + width?: number 10 + height?: number 11 + fill?: string 12 + className?: string 13 + }) => ( 14 + <svg 15 + className={className} 16 + width={width} 17 + height={height} 18 + viewBox="0 0 16 17" 19 + fill="none" 20 + xmlns="http://www.w3.org/2000/svg"> 21 + <path 22 + fillRule="evenodd" 23 + clipRule="evenodd" 24 + d="M11.1561 3.62664C10.3307 3.44261 9.35086 3.65762 8.47486 4.54615C8.34958 4.67323 8.17857 4.74478 8.00012 4.74478C7.82167 4.74478 7.65066 4.67324 7.52538 4.54616C6.64938 3.65762 5.66955 3.44261 4.84416 3.62664C4.0022 3.81438 3.25812 4.43047 2.89709 5.33069C2.21997 7.01907 2.83524 10.1257 8.00015 13.1315C13.165 10.1257 13.7803 7.01906 13.1032 5.33069C12.7421 4.43047 11.998 3.81437 11.1561 3.62664ZM14.3407 4.83438C15.4101 7.50098 14.0114 11.2942 8.32611 14.4808C8.12362 14.5943 7.87668 14.5943 7.6742 14.4808C1.98891 11.2942 0.590133 7.501 1.65956 4.83439C2.1788 3.53968 3.26862 2.61187 4.55399 2.32527C5.68567 2.07294 6.92237 2.32723 8.00012 3.18278C9.07786 2.32723 10.3146 2.07294 11.4462 2.32526C12.7316 2.61186 13.8214 3.53967 14.3407 4.83438Z" 25 + fill={fill} 26 + /> 27 + </svg> 28 + )
+28
bskyembed/src/icons/Reply.tsx
··· 1 + import {h} from 'preact' 2 + 3 + export const Reply = ({ 4 + width = 16, 5 + height = 17, 6 + fill = 'currentColor', 7 + className, 8 + }: { 9 + width?: number 10 + height?: number 11 + fill?: string 12 + className?: string 13 + }) => ( 14 + <svg 15 + className={className} 16 + width={width} 17 + height={height} 18 + viewBox="0 0 16 17" 19 + fill="none" 20 + xmlns="http://www.w3.org/2000/svg"> 21 + <path 22 + fillRule="evenodd" 23 + clipRule="evenodd" 24 + d="M1.3335 4.23242C1.3335 3.12785 2.22893 2.23242 3.3335 2.23242H12.6668C13.7714 2.23242 14.6668 3.12785 14.6668 4.23242V10.8991C14.6668 12.0037 13.7714 12.8991 12.6668 12.8991H8.18482L5.00983 14.8041C4.80387 14.9277 4.54737 14.9309 4.33836 14.8126C4.12936 14.6942 4.00016 14.4726 4.00016 14.2324V12.8991H3.3335C2.22893 12.8991 1.3335 12.0037 1.3335 10.8991V4.23242ZM3.3335 3.56576C2.96531 3.56576 2.66683 3.86423 2.66683 4.23242V10.8991C2.66683 11.2673 2.96531 11.5658 3.3335 11.5658H4.66683C5.03502 11.5658 5.3335 11.8642 5.3335 12.2324V13.055L7.65717 11.6608C7.76078 11.5986 7.87933 11.5658 8.00016 11.5658H12.6668C13.035 11.5658 13.3335 11.2673 13.3335 10.8991V4.23242C13.3335 3.86423 13.035 3.56576 12.6668 3.56576H3.3335Z" 25 + fill={fill} 26 + /> 27 + </svg> 28 + )
+26
bskyembed/src/icons/Repost.tsx
··· 1 + import {h} from 'preact' 2 + 3 + export const Repost = ({ 4 + width = 16, 5 + height = 17, 6 + fill = 'currentColor', 7 + className, 8 + }: { 9 + width?: number 10 + height?: number 11 + fill?: string 12 + className?: string 13 + }) => ( 14 + <svg 15 + className={className} 16 + width={width} 17 + height={height} 18 + viewBox="0 0 16 17" 19 + fill="none" 20 + xmlns="http://www.w3.org/2000/svg"> 21 + <path 22 + d="M3.86204 9.76164C4.12239 9.50134 4.54442 9.50131 4.80475 9.76164C5.06503 10.022 5.06503 10.444 4.80475 10.7044L3.94277 11.5663H11.3334C12.0697 11.5663 12.6667 10.9693 12.6667 10.233V8.89966C12.6667 8.53147 12.9652 8.233 13.3334 8.233C13.7015 8.23305 14.0001 8.53151 14.0001 8.89966V10.233C14.0001 11.7057 12.8061 12.8996 11.3334 12.8997H3.94277L4.80475 13.7616C5.06503 14.022 5.06503 14.444 4.80475 14.7044C4.54442 14.9647 4.12239 14.9646 3.86204 14.7044L2.3334 13.1757C1.8127 12.655 1.8127 11.811 2.3334 11.2903L3.86204 9.76164ZM2.00006 7.56633V6.233C2.00006 4.76024 3.19397 3.56633 4.66673 3.56633H12.0574L11.1954 2.70435C10.935 2.444 10.935 2.02199 11.1954 1.76164C11.4557 1.50134 11.8778 1.50131 12.1381 1.76164L13.6667 3.29029C14.1873 3.81096 14.1873 4.65503 13.6667 5.17571L12.1381 6.70435C11.8778 6.96468 11.4557 6.96465 11.1954 6.70435C10.935 6.444 10.935 6.02199 11.1954 5.76164L12.0574 4.89966H4.66673C3.93035 4.89966 3.3334 5.49662 3.3334 6.233V7.56633C3.3334 7.93449 3.03487 8.23294 2.66673 8.233C2.29854 8.233 2.00006 7.93452 2.00006 7.56633Z" 23 + fill={fill} 24 + /> 25 + </svg> 26 + )