Skip to content

Commit 63da2b2

Browse files
authored
Merge branch 'pdelfan:main' into main
2 parents 90e9b4e + 7c24c45 commit 63da2b2

File tree

23 files changed

+1188
-1975
lines changed

23 files changed

+1188
-1975
lines changed

Diff for: package-lock.json

+854-1,856
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+30-31
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12-
"@atproto/api": "^0.12.24",
13-
"@emoji-mart/data": "^1.1.2",
12+
"@atproto/api": "^0.13.5",
13+
"@emoji-mart/data": "^1.2.1",
1414
"@emoji-mart/react": "^1.1.1",
15-
"@radix-ui/react-dialog": "^1.0.5",
16-
"@radix-ui/react-dropdown-menu": "^2.0.6",
17-
"@radix-ui/react-hover-card": "^1.0.7",
15+
"@radix-ui/react-dialog": "^1.1.1",
16+
"@radix-ui/react-dropdown-menu": "^2.1.1",
17+
"@radix-ui/react-hover-card": "^1.1.1",
1818
"@radix-ui/react-popover": "^1.1.1",
19-
"@radix-ui/react-radio-group": "^1.1.3",
20-
"@radix-ui/react-scroll-area": "^1.0.5",
21-
"@radix-ui/react-switch": "^1.0.3",
22-
"@radix-ui/react-toggle-group": "^1.0.4",
19+
"@radix-ui/react-radio-group": "^1.2.0",
20+
"@radix-ui/react-scroll-area": "^1.1.0",
21+
"@radix-ui/react-switch": "^1.1.0",
22+
"@radix-ui/react-toggle-group": "^1.1.0",
2323
"@radix-ui/react-tooltip": "^1.1.2",
24-
"@tanstack/react-query": "^5.29.2",
24+
"@tanstack/react-query": "^5.55.4",
2525
"@tiptap/extension-character-count": "2.1.16",
2626
"@tiptap/extension-link": "2.1.16",
2727
"@tiptap/extension-mention": "2.1.16",
@@ -31,40 +31,39 @@
3131
"@tiptap/starter-kit": "2.1.16",
3232
"@tiptap/suggestion": "2.1.16",
3333
"@uidotdev/usehooks": "^2.4.1",
34-
"@vercel/analytics": "^1.1.2",
35-
"@vercel/speed-insights": "^1.0.7",
36-
"0g": "^0.0.9",
34+
"@vercel/analytics": "^1.3.1",
35+
"@vercel/speed-insights": "^1.0.12",
36+
"@vidstack/react": "^1.12.9",
3737
"browser-image-compression": "^2.0.2",
38-
"emoji-mart": "^5.5.2",
38+
"emoji-mart": "^5.6.0",
3939
"jwt-decode": "^4.0.0",
40-
"next": "14.1.3",
40+
"next": "14.2.9",
4141
"next-auth": "^4.24.5",
42-
"next-themes": "^0.2.1",
43-
"npm": "^10.6.0",
44-
"react": "^18",
42+
"next-themes": "^0.3.0",
43+
"npm": "^10.8.3",
44+
"react": "^18.3.1",
4545
"react-circular-progressbar": "^2.1.0",
46-
"react-dom": "^18",
46+
"react-dom": "^18.3.1",
4747
"react-dropzone": "^14.2.3",
4848
"react-hot-toast": "^2.4.1",
49-
"react-icons": "^5.1.0",
49+
"react-icons": "^5.3.0",
5050
"react-infinite-scroll-component": "^6.1.0",
51-
"sharp": "^0.33.3",
51+
"sharp": "^0.33.5",
5252
"tailwindcss-animate": "^1.0.7",
5353
"tinyld": "^1.3.4",
5454
"use-clipboard-copy": "^0.2.0",
55-
"use-debounce": "^10.0.0"
55+
"use-debounce": "^10.0.3"
5656
},
5757
"devDependencies": {
58-
"@tailwindcss/typography": "^0.5.12",
59-
"@types/node": "^20.12.7",
60-
"@types/react": "^18.2.78",
61-
"@types/react-dom": "^18.2.25",
62-
"autoprefixer": "^10.4.19",
58+
"@types/node": "^22.5.4",
59+
"@types/react": "^18.3.5",
60+
"@types/react-dom": "^18.3.0",
61+
"autoprefixer": "^10.4.20",
6362
"eslint": "^8",
6463
"eslint-config-next": "14.1.3",
65-
"postcss": "^8.4.38",
66-
"tailwindcss": "3.4.1",
67-
"tailwindcss-animated": "^1.0.1",
68-
"typescript": "^5.4.5"
64+
"postcss": "^8.4.45",
65+
"tailwindcss": "3.4.11",
66+
"tailwindcss-animated": "^1.1.2",
67+
"typescript": "^5.6.2"
6968
}
7069
}

Diff for: src/app/(site)/about/page.tsx

+8-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,14 @@ export default function Page() {
149149
>
150150
Discussions
151151
</Link>
152-
. If you are not on GitHub, you can also mention me on Bluesky (my
153-
handle is @contrapunctus.bsky.social).
152+
. If you are not on GitHub, you can also{" "}
153+
<Link
154+
href="https://bsky.app/profile/did:plc:3sapfnszmvjc6wa4ml3ybkwb"
155+
className="underline underline-offset-2"
156+
>
157+
mention me on Bluesky
158+
</Link>
159+
.
154160
</p>
155161

156162
<h3 className="text-skin-base mb-1 mt-6 text-lg font-semibold">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import Layout from "@/containers/Layout";
2+
import type { Metadata } from "next";
3+
4+
export const metadata: Metadata = {
5+
title: "Ouranos — Quotes",
6+
description: "Quotes for this post",
7+
};
8+
9+
export default function RepostedByLayout({
10+
children,
11+
}: {
12+
children: React.ReactNode;
13+
}) {
14+
return <Layout>{children}</Layout>;
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import QuotesContainer from "@/containers/thread/QuotesContainer";
2+
3+
interface Props {
4+
params: {
5+
id: string;
6+
handle: string;
7+
};
8+
}
9+
10+
export default function Page(props: Props) {
11+
const { id, handle } = props.params;
12+
13+
return (
14+
<section>
15+
<h2 className="text-skin-base mb-2 px-3 text-2xl font-semibold md:px-0">
16+
Quotes
17+
</h2>
18+
<QuotesContainer handle={handle} id={id} />
19+
</section>
20+
);
21+
}

Diff for: src/components/actions/composePrompt/ComposePrompt.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface Props {
1111

1212
export default function ComposePrompt(props: Props) {
1313
const { avatar, post } = props;
14-
const canReply = !post.viewer?.replyDisabled ?? false;
14+
const canReply = !post.viewer?.replyDisabled || false;
1515
const { openComposer } = useComposerControls();
1616

1717
if (!canReply) return null;

Diff for: src/components/actions/editProfile/EditProfile.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export default function EditProfile(props: Props) {
169169
}}
170170
disabled={updateProfile.isPending}
171171
className={`bg-primary hover:bg-primary-dark text-skin-icon-inverted rounded-full px-4 py-2 text-sm font-semibold ${
172-
updateProfile.isPending && "animate-pulse"
172+
updateProfile.isPending && "animate-pulse animate-duration-1000"
173173
}`}
174174
>
175175
{updateProfile.isPending ? "Saving..." : "Save"}

Diff for: src/components/dataDisplay/postActions/PostActions.tsx

+16-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default function PostActions(props: Props) {
4040
const { deletePost } = useDeletePost({ post: post });
4141
const { liked, toggleLike, likeCount } = useLike({ post: post });
4242
const { reposted, toggleRepost, repostCount } = useRepost({ post: post });
43+
const quoteCount = post.quoteCount ?? 0;
4344
const { muted, toggleMuteUser } = useMuteUser({ author: post.author });
4445
const clipboard = useClipboard({ copiedTimeout: 3500 });
4546
const { openComposer } = useComposerControls();
@@ -72,7 +73,7 @@ export default function PostActions(props: Props) {
7273
{repostCount > 0 && (
7374
<Link
7475
href={`/dashboard/user/${post.author.handle}/post/${getPostId(
75-
post.uri,
76+
post.uri
7677
)}/reposted-by`}
7778
className="text-skin-base flex gap-1 font-semibold"
7879
>
@@ -82,10 +83,23 @@ export default function PostActions(props: Props) {
8283
</span>
8384
</Link>
8485
)}
86+
{quoteCount > 0 && (
87+
<Link
88+
href={`/dashboard/user/${post.author.handle}/post/${getPostId(
89+
post.uri
90+
)}/quotes`}
91+
className="text-skin-base flex gap-1 font-semibold"
92+
>
93+
{abbreviateNumber(quoteCount)}
94+
<span className="text-skin-tertiary font-medium">
95+
Quote{quoteCount > 1 && "s"}
96+
</span>
97+
</Link>
98+
)}
8599
{likeCount > 0 && (
86100
<Link
87101
href={`/dashboard/user/${post.author.handle}/post/${getPostId(
88-
post.uri,
102+
post.uri
89103
)}/liked-by`}
90104
className="text-skin-base flex gap-1 font-semibold"
91105
>

Diff for: src/components/dataDisplay/postEmbed/PostEmbed.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ import {
77
AppBskyEmbedRecordWithMedia,
88
AppBskyGraphDefs,
99
AppBskyFeedDefs,
10+
AppBskyEmbedVideo,
1011
} from "@atproto/api";
1112
import RecordEmbed from "./RecordEmbed";
1213
import ListEmbed from "./ListEmbed";
1314
import FeedEmbed from "./FeedEmbed";
15+
import VideoEmbed from "./VideoEmbed";
1416

1517
interface Props {
1618
content: AppBskyFeedDefs.FeedViewPost["post"]["embed"];
@@ -54,6 +56,15 @@ export default function PostEmbed(props: Props) {
5456
depth={depth}
5557
/>
5658
);
59+
} else if (AppBskyEmbedVideo.isView(content)) {
60+
return (
61+
<VideoEmbed
62+
aspectRatio={`${content.aspectRatio?.width}/${content.aspectRatio?.height}`}
63+
playlist={content.playlist}
64+
thumbnail={content.thumbnail}
65+
alt={content.alt}
66+
/>
67+
);
5768
}
5869
};
5970

Diff for: src/components/dataDisplay/postEmbed/VideoEmbed.tsx

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { memo } from "react";
2+
import { MediaPlayer, MediaProvider, Poster } from "@vidstack/react";
3+
import {
4+
defaultLayoutIcons,
5+
DefaultVideoLayout,
6+
} from "@vidstack/react/player/layouts/default";
7+
import "@vidstack/react/player/styles/default/theme.css";
8+
import "@vidstack/react/player/styles/default/layouts/video.css";
9+
10+
interface Props {
11+
aspectRatio: string;
12+
playlist: string;
13+
thumbnail?: string;
14+
alt?: string;
15+
}
16+
17+
const VideoEmbed = memo(function VideoEmbed(props: Props) {
18+
const { aspectRatio, playlist, thumbnail, alt } = props;
19+
20+
return (
21+
<div className="aspect-video mt-2 rounded-md hover:brightness-90 hover:cursor-pointer overflow-hidden">
22+
<MediaPlayer
23+
crossOrigin
24+
playsInline
25+
viewType="video"
26+
className="w-full h-full object-cover"
27+
src={playlist}
28+
poster={thumbnail ?? ""}
29+
onClick={(e) => e.stopPropagation()}
30+
>
31+
<MediaProvider>
32+
{alt && (
33+
<Poster
34+
src={thumbnail}
35+
alt={alt}
36+
className="absolute inset-0 block bg-skin-overlay opacity-0 transition-opacity data-[visible]:opacity-100 [&>img]:w-full [&>img]:object-contain"
37+
/>
38+
)}
39+
</MediaProvider>
40+
<DefaultVideoLayout thumbnails={thumbnail} icons={defaultLayoutIcons} />
41+
</MediaPlayer>
42+
</div>
43+
);
44+
});
45+
46+
export default VideoEmbed;

Diff for: src/components/feedback/WhoCanReply/WhoCanReply.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ interface Props {
88

99
export default function WhoCanReply(props: Props) {
1010
const { post } = props;
11-
const canReply = !post.viewer?.replyDisabled ?? false;
12-
const rounded = !canReply && post.replyCount === 0;
11+
const canReply = !post.viewer?.replyDisabled || false;
1312
const record =
1413
post.threadgate &&
1514
AppBskyFeedThreadgate.isRecord(post.threadgate.record) &&
@@ -102,7 +101,7 @@ export default function WhoCanReply(props: Props) {
102101

103102
return (
104103
<section
105-
className={`border-t-skin-base md:border-x-skin-base w-full border-x-0 border-t p-2 md:border-x ${rounded && "border-y-skin-base border-y md:rounded-b-2xl"}`}
104+
className="border-t-skin-base md:border-x-skin-base w-full border-x-0 border-t p-2 md:border-x"
106105
>
107106
<div className="bg-primary/20 flex items-center gap-3 rounded-xl p-2">
108107
<div className="bg-primary rounded-2xl p-1.5">

Diff for: src/components/forms/loginForm/LoginForm.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export default function LoginForm() {
148148
<Button
149149
type="submit"
150150
className={`text-skin-inverted bg-skin-inverted hover:bg-skin-inverted ml-auto mt-5 flex w-full items-center justify-center gap-2 rounded-lg px-3 py-3 font-semibold disabled:cursor-not-allowed ${
151-
loading && "animate-pulse"
151+
loading && "animate-pulse animate-duration-1000"
152152
}`}
153153
disabled={loading}
154154
aria-disabled={loading}

Diff for: src/components/inputs/editor/TopEditorBar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default function TopEditorBar(props: Props) {
7272
});
7373
}}
7474
className={`bg-primary hover:bg-primary-dark rounded-full px-4 py-2 text-sm font-semibold text-white ${
75-
onPublish.isPending && "animate-pulse"
75+
onPublish.isPending && "animate-pulse animate-duration-1000"
7676
}`}
7777
disabled={onPublish.isPending}
7878
>

0 commit comments

Comments
 (0)