@tryghost/activitypub 3.0.2 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activitypub.js +3 -3
- package/dist/at-sign-DjgaOOtV.mjs +15 -0
- package/dist/at-sign-DjgaOOtV.mjs.map +1 -0
- package/dist/avatar-flipboard-8NioODS5.mjs +19 -0
- package/dist/avatar-flipboard-8NioODS5.mjs.map +1 -0
- package/dist/bluesky-sharing-B4oF-0BN.mjs +150 -0
- package/dist/bluesky-sharing-B4oF-0BN.mjs.map +1 -0
- package/dist/copy-BxgO1lWX.mjs +15 -0
- package/dist/copy-BxgO1lWX.mjs.map +1 -0
- package/dist/deleted-feed-item-Ct4Zc7u3.mjs +133 -0
- package/dist/deleted-feed-item-Ct4Zc7u3.mjs.map +1 -0
- package/dist/edit-profile-DVsYbpNY.mjs +3651 -0
- package/dist/edit-profile-DVsYbpNY.mjs.map +1 -0
- package/dist/feed-D0aeoOOJ.mjs +207 -0
- package/dist/feed-D0aeoOOJ.mjs.map +1 -0
- package/dist/hash-B-J30lCU.mjs +17 -0
- package/dist/hash-B-J30lCU.mjs.map +1 -0
- package/dist/inbox-BrLsHadF.mjs +21 -0
- package/dist/inbox-BrLsHadF.mjs.map +1 -0
- package/dist/index-BMm_mIRT.mjs +138 -0
- package/dist/index-BMm_mIRT.mjs.map +1 -0
- package/dist/{index-DN0VoLV5.mjs → index-BdcW7GlH.mjs} +20 -20
- package/dist/{index-DN0VoLV5.mjs.map → index-BdcW7GlH.mjs.map} +1 -1
- package/dist/index-BftxScf5.mjs +4994 -0
- package/dist/index-BftxScf5.mjs.map +1 -0
- package/dist/index-DL7eG3Ac.mjs +367 -0
- package/dist/index-DL7eG3Ac.mjs.map +1 -0
- package/dist/index-DnpX9U7J.mjs +688 -0
- package/dist/index-DnpX9U7J.mjs.map +1 -0
- package/dist/index-DyFr7l3O.mjs +6508 -0
- package/dist/index-DyFr7l3O.mjs.map +1 -0
- package/dist/index-WlK4xdmR.mjs +219 -0
- package/dist/index-WlK4xdmR.mjs.map +1 -0
- package/dist/index-_vEj3NfZ.mjs +27062 -0
- package/dist/index-_vEj3NfZ.mjs.map +1 -0
- package/dist/moderation-KWQp9gQj.mjs +113 -0
- package/dist/moderation-KWQp9gQj.mjs.map +1 -0
- package/dist/note-CfQDRkeT.mjs +249 -0
- package/dist/note-CfQDRkeT.mjs.map +1 -0
- package/dist/reply-BrWarBVQ.mjs +15 -0
- package/dist/reply-BrWarBVQ.mjs.map +1 -0
- package/dist/separator-nDV4oVPB.mjs +39 -0
- package/dist/separator-nDV4oVPB.mjs.map +1 -0
- package/dist/settings-CCnMmVaW.mjs +79 -0
- package/dist/settings-CCnMmVaW.mjs.map +1 -0
- package/dist/step-1-HGv6537o.mjs +73 -0
- package/dist/step-1-HGv6537o.mjs.map +1 -0
- package/dist/step-2-hqeY_dIc.mjs +143 -0
- package/dist/step-2-hqeY_dIc.mjs.map +1 -0
- package/dist/step-3-8yg4QPpr.mjs +345 -0
- package/dist/step-3-8yg4QPpr.mjs.map +1 -0
- package/dist/tabs-BZytpdZ9.mjs +1096 -0
- package/dist/tabs-BZytpdZ9.mjs.map +1 -0
- package/dist/topic-filter-1kNAxvyr.mjs +39 -0
- package/dist/topic-filter-1kNAxvyr.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/index-DF-NBA1D.mjs +0 -46011
- package/dist/index-DF-NBA1D.mjs.map +0 -1
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { j as e, ap as k, A as N, c as f, d as y, b as v, aq as P, e as _, H as R, B as g, ar as z, C as I, a9 as M, S as b, P as B, aa as W, L as U, F as A, i as E, k as $, E as H, f as D, as as O, at as Q, au as V, av as q, aw as T } from "./index-_vEj3NfZ.mjs";
|
|
2
|
+
import { S as C } from "./separator-nDV4oVPB.mjs";
|
|
3
|
+
import { H as X } from "./hash-B-J30lCU.mjs";
|
|
4
|
+
const p = ({ user: n }) => /* @__PURE__ */ e.jsx(k, { children: /* @__PURE__ */ e.jsxs("div", { className: "relative my-5 w-full hover:cursor-pointer", children: [
|
|
5
|
+
/* @__PURE__ */ e.jsx("div", { className: "pointer-events-none absolute left-4 top-4", children: /* @__PURE__ */ e.jsx(N, { author: n }) }),
|
|
6
|
+
/* @__PURE__ */ e.jsx("div", { "aria-label": "New post", className: "text inset-0 flex h-[72px] w-full items-center justify-start rounded-lg bg-white pl-[68px] text-left text-[1.5rem] font-normal tracking-normal text-gray-500 shadow-[0_5px_24px_0px_rgba(0,0,0,0.02),0px_2px_5px_0px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] transition-all hover:bg-white hover:shadow-[0_5px_24px_0px_rgba(0,0,0,0.05),0px_14px_12px_-9px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] dark:border dark:border-gray-925 dark:bg-black dark:shadow-none dark:hover:border-gray-800 dark:hover:bg-black dark:hover:shadow-none", children: "What's new?" })
|
|
7
|
+
] }) }), G = () => {
|
|
8
|
+
const n = f(null), l = y(), [c, i] = v(!1), [x, d] = v(!0), { suggestedProfilesQuery: m, updateSuggestedProfile: r } = P("index", 10), { data: o = [], isLoading: a } = m, h = () => {
|
|
9
|
+
const s = n.current;
|
|
10
|
+
if (!s)
|
|
11
|
+
return;
|
|
12
|
+
const j = s.scrollLeft > 0, w = s.scrollLeft < s.scrollWidth - s.clientWidth;
|
|
13
|
+
i(j), d(w);
|
|
14
|
+
};
|
|
15
|
+
if (_(() => {
|
|
16
|
+
h();
|
|
17
|
+
}, [o]), !a && (!o || o.length < 4))
|
|
18
|
+
return null;
|
|
19
|
+
const t = (s) => {
|
|
20
|
+
}, u = (s) => {
|
|
21
|
+
r(s.id, {
|
|
22
|
+
followedByMe: !0
|
|
23
|
+
});
|
|
24
|
+
}, S = (s) => {
|
|
25
|
+
r(s.id, {
|
|
26
|
+
followedByMe: !1
|
|
27
|
+
});
|
|
28
|
+
}, F = () => {
|
|
29
|
+
const s = n.current;
|
|
30
|
+
s && s.scrollBy({ left: -176 * 2, behavior: "smooth" });
|
|
31
|
+
}, L = () => {
|
|
32
|
+
const s = n.current;
|
|
33
|
+
if (!s)
|
|
34
|
+
return;
|
|
35
|
+
s.scrollBy({ left: 176 * 2, behavior: "smooth" });
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
38
|
+
/* @__PURE__ */ e.jsxs("div", { className: "pb-7 pt-4", children: [
|
|
39
|
+
/* @__PURE__ */ e.jsxs("div", { className: "mb-3 flex items-center justify-between", children: [
|
|
40
|
+
/* @__PURE__ */ e.jsx(R, { className: "text-lg font-semibold text-black dark:text-white", children: "More people to follow" }),
|
|
41
|
+
/* @__PURE__ */ e.jsx(g, { className: "px-0 font-medium text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white", variant: "link", onClick: () => l("/explore"), children: "Find more →" })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
44
|
+
c && /* @__PURE__ */ e.jsx(
|
|
45
|
+
g,
|
|
46
|
+
{
|
|
47
|
+
className: "absolute -left-10 top-1/2 z-10 size-10 -translate-y-1/2 text-gray-700 hover:bg-transparent max-lg:hidden dark:text-gray-600 dark:hover:text-white",
|
|
48
|
+
variant: "ghost",
|
|
49
|
+
onClick: F,
|
|
50
|
+
children: /* @__PURE__ */ e.jsx(z, { className: "!size-6" })
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
x && /* @__PURE__ */ e.jsx(
|
|
54
|
+
g,
|
|
55
|
+
{
|
|
56
|
+
className: "absolute -right-10 top-1/2 z-10 size-10 -translate-y-1/2 text-gray-700 hover:bg-transparent max-lg:hidden dark:text-gray-600 dark:hover:text-white",
|
|
57
|
+
variant: "ghost",
|
|
58
|
+
onClick: L,
|
|
59
|
+
children: /* @__PURE__ */ e.jsx(I, { className: "!size-6" })
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ e.jsx(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
ref: n,
|
|
66
|
+
className: "flex snap-x snap-mandatory gap-4 overflow-x-auto",
|
|
67
|
+
style: {
|
|
68
|
+
scrollbarWidth: "none",
|
|
69
|
+
msOverflowStyle: "none"
|
|
70
|
+
},
|
|
71
|
+
onScroll: h,
|
|
72
|
+
children: (a ? Array(10).fill(null) : o || []).map((s, j) => /* @__PURE__ */ e.jsxs(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: "relative w-40 shrink-0 snap-start rounded-lg bg-gray-75 p-4 dark:bg-gray-925/30",
|
|
76
|
+
onClick: !a && s ? () => l(`/profile/${s.handle}`) : void 0,
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ e.jsx(
|
|
79
|
+
g,
|
|
80
|
+
{
|
|
81
|
+
className: "absolute right-2 top-1 hidden p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",
|
|
82
|
+
variant: "link",
|
|
83
|
+
onClick: (w) => {
|
|
84
|
+
w.stopPropagation(), t((s == null ? void 0 : s.id) || "");
|
|
85
|
+
},
|
|
86
|
+
children: /* @__PURE__ */ e.jsx(M, { className: "size-4" })
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center text-center", children: [
|
|
90
|
+
/* @__PURE__ */ e.jsx("div", { className: "mb-3", children: a ? /* @__PURE__ */ e.jsx(b, { className: "size-16 rounded-full" }) : /* @__PURE__ */ e.jsx(B, { actor: s, align: "center", children: /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
|
|
91
|
+
N,
|
|
92
|
+
{
|
|
93
|
+
author: {
|
|
94
|
+
icon: { url: (s == null ? void 0 : s.avatarUrl) || "" },
|
|
95
|
+
name: (s == null ? void 0 : s.name) || "",
|
|
96
|
+
handle: (s == null ? void 0 : s.handle) || ""
|
|
97
|
+
},
|
|
98
|
+
size: "md"
|
|
99
|
+
}
|
|
100
|
+
) }) }) }),
|
|
101
|
+
/* @__PURE__ */ e.jsx("span", { className: "mb-6 w-full truncate font-semibold text-black dark:text-white", children: a ? /* @__PURE__ */ e.jsx(b, { className: "h-5 w-32" }) : (s == null ? void 0 : s.name) || "" }),
|
|
102
|
+
a ? /* @__PURE__ */ e.jsx(b, { className: "h-8 w-16" }) : /* @__PURE__ */ e.jsx(
|
|
103
|
+
W,
|
|
104
|
+
{
|
|
105
|
+
following: (s == null ? void 0 : s.followedByMe) || !1,
|
|
106
|
+
handle: (s == null ? void 0 : s.handle) || "",
|
|
107
|
+
type: "primary",
|
|
108
|
+
onFollow: () => s && u(s),
|
|
109
|
+
onUnfollow: () => s && S(s)
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] })
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
(s == null ? void 0 : s.id) || `loading-${j}`
|
|
116
|
+
))
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] })
|
|
120
|
+
] }),
|
|
121
|
+
/* @__PURE__ */ e.jsx(C, {})
|
|
122
|
+
] });
|
|
123
|
+
}, J = ({
|
|
124
|
+
isLoading: n,
|
|
125
|
+
activities: l,
|
|
126
|
+
user: c,
|
|
127
|
+
fetchNextPage: i,
|
|
128
|
+
hasNextPage: x,
|
|
129
|
+
isFetchingNextPage: d
|
|
130
|
+
}) => {
|
|
131
|
+
const m = y(), r = f(null), o = f(null), a = f(null);
|
|
132
|
+
_(() => (r.current && r.current.disconnect(), r.current = new IntersectionObserver((t) => {
|
|
133
|
+
t[0].isIntersecting && x && !d && i();
|
|
134
|
+
}), o.current && r.current.observe(o.current), a.current && r.current.observe(a.current), () => {
|
|
135
|
+
r.current && r.current.disconnect();
|
|
136
|
+
}), [x, d, i]);
|
|
137
|
+
const h = Math.max(0, Math.floor(l.length * 0.75) - 1);
|
|
138
|
+
return /* @__PURE__ */ e.jsx(U, { children: /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "w-full", children: l.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "my-4", children: /* @__PURE__ */ e.jsx("div", { className: "mx-auto flex items-start gap-11", children: /* @__PURE__ */ e.jsx("div", { className: "flex w-full min-w-0 flex-col items-center", children: /* @__PURE__ */ e.jsxs("div", { className: "flex w-full min-w-0 max-w-[620px] flex-col items-start", children: [
|
|
139
|
+
/* @__PURE__ */ e.jsx(p, { user: c }),
|
|
140
|
+
/* @__PURE__ */ e.jsxs("ul", { className: "mx-auto flex w-full flex-col px-4 max-lg:px-0", "data-testid": "feed-list", children: [
|
|
141
|
+
l.map((t, u) => /* @__PURE__ */ e.jsxs(
|
|
142
|
+
"li",
|
|
143
|
+
{
|
|
144
|
+
"data-testid": "feed-item",
|
|
145
|
+
"data-test-view-article": !0,
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ e.jsx(
|
|
148
|
+
A,
|
|
149
|
+
{
|
|
150
|
+
actor: t.actor,
|
|
151
|
+
allowDelete: t.object.authored,
|
|
152
|
+
commentCount: t.object.replyCount ?? 0,
|
|
153
|
+
isLoading: n,
|
|
154
|
+
isPending: E(t.id),
|
|
155
|
+
layout: "feed",
|
|
156
|
+
likeCount: t.object.likeCount ?? 0,
|
|
157
|
+
object: t.object,
|
|
158
|
+
repostCount: t.object.repostCount ?? 0,
|
|
159
|
+
type: t.type,
|
|
160
|
+
onClick: () => {
|
|
161
|
+
m(`/notes/${encodeURIComponent(t.id)}`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
),
|
|
165
|
+
u < l.length - 1 && /* @__PURE__ */ e.jsx(C, {}),
|
|
166
|
+
u === 3 && /* @__PURE__ */ e.jsx(G, {}),
|
|
167
|
+
u === h && /* @__PURE__ */ e.jsx("div", { ref: o, className: "h-1" })
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
`${t.id}-${t.type}-${u}`
|
|
171
|
+
)),
|
|
172
|
+
d && /* @__PURE__ */ e.jsx("li", { className: "flex flex-col items-center justify-center space-y-4 text-center", children: /* @__PURE__ */ e.jsx($, { size: "md" }) })
|
|
173
|
+
] }),
|
|
174
|
+
/* @__PURE__ */ e.jsx("div", { ref: a, className: "h-1" })
|
|
175
|
+
] }) }) }) }) : /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col items-center gap-10", children: /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex w-full max-w-[620px] flex-col items-center", children: [
|
|
176
|
+
/* @__PURE__ */ e.jsx(p, { user: c }),
|
|
177
|
+
/* @__PURE__ */ e.jsx("div", { className: "mt-[-128px]", children: /* @__PURE__ */ e.jsxs(H, { children: [
|
|
178
|
+
/* @__PURE__ */ e.jsx(D, { children: /* @__PURE__ */ e.jsx(X, {}) }),
|
|
179
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
180
|
+
"The Feed is the stream of thoughts and ",
|
|
181
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-black dark:text-white", children: "bite-sized updates" }),
|
|
182
|
+
" from people you follow in the Social Web. It's looking a little empty right now but once the people you follow start posting, their updates will show up here."
|
|
183
|
+
] }),
|
|
184
|
+
/* @__PURE__ */ e.jsx(k, { children: /* @__PURE__ */ e.jsxs(g, { className: "text-white dark:text-black", children: [
|
|
185
|
+
/* @__PURE__ */ e.jsx(O, {}),
|
|
186
|
+
"Write your first note"
|
|
187
|
+
] }) })
|
|
188
|
+
] }) })
|
|
189
|
+
] }) }) }) }) });
|
|
190
|
+
}, ee = () => {
|
|
191
|
+
const { feedQuery: n } = Q({ enabled: !0 }), { data: l, error: c, fetchNextPage: i, hasNextPage: x, isFetchingNextPage: d, isLoading: m } = n, r = (l == null ? void 0 : l.pages.flatMap((a) => a.posts)) ?? Array.from({ length: 5 }, (a, h) => ({ id: `placeholder-${h}`, object: {} })), { data: o } = V("index");
|
|
192
|
+
return c && q(c) ? /* @__PURE__ */ e.jsx(T, { errorCode: c.code, statusCode: c.statusCode }) : /* @__PURE__ */ e.jsx(
|
|
193
|
+
J,
|
|
194
|
+
{
|
|
195
|
+
activities: r,
|
|
196
|
+
fetchNextPage: i,
|
|
197
|
+
hasNextPage: x,
|
|
198
|
+
isFetchingNextPage: d,
|
|
199
|
+
isLoading: m,
|
|
200
|
+
user: o
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
};
|
|
204
|
+
export {
|
|
205
|
+
ee as default
|
|
206
|
+
};
|
|
207
|
+
//# sourceMappingURL=feed-D0aeoOOJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed-D0aeoOOJ.mjs","sources":["../src/views/feed/components/feed-input.tsx","../src/views/feed/components/suggested-profiles.tsx","../src/views/feed/components/feed-list.tsx","../src/views/feed/feed.tsx"],"sourcesContent":["import APAvatar from '@src/components/global/ap-avatar';\nimport NewNoteModal from '@src/components/modals/new-note-modal';\nimport {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';\n\nconst FeedInput: React.FC<{user?: ActorProperties}> = ({user}) => {\n return (\n <NewNoteModal>\n <div className='relative my-5 w-full hover:cursor-pointer'>\n <div className='pointer-events-none absolute left-4 top-4'>\n <APAvatar author={user as ActorProperties} />\n </div>\n <div aria-label='New post' className='text inset-0 flex h-[72px] w-full items-center justify-start rounded-lg bg-white pl-[68px] text-left text-[1.5rem] font-normal tracking-normal text-gray-500 shadow-[0_5px_24px_0px_rgba(0,0,0,0.02),0px_2px_5px_0px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] transition-all hover:bg-white hover:shadow-[0_5px_24px_0px_rgba(0,0,0,0.05),0px_14px_12px_-9px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] dark:border dark:border-gray-925 dark:bg-black dark:shadow-none dark:hover:border-gray-800 dark:hover:bg-black dark:hover:shadow-none'>What's new?</div>\n </div>\n </NewNoteModal>\n );\n};\n\nexport default FeedInput;","import APAvatar from '@src/components/global/ap-avatar';\nimport FollowButton from '@src/components/global/follow-button';\nimport ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';\nimport {Account} from '@src/api/activitypub';\nimport {Button, H4, LucideIcon, Separator, Skeleton} from '@tryghost/shade';\nimport {useEffect, useRef, useState} from 'react';\nimport {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';\nimport {useSuggestedProfilesForUser} from '@src/hooks/use-activity-pub-queries';\n\nconst SuggestedProfiles: React.FC = () => {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const navigate = useNavigateWithBasePath();\n const [canScrollLeft, setCanScrollLeft] = useState(false);\n const [canScrollRight, setCanScrollRight] = useState(true);\n\n const {suggestedProfilesQuery, updateSuggestedProfile} = useSuggestedProfilesForUser('index', 10);\n const {data: suggestedProfilesData = [], isLoading: isLoadingSuggestedProfiles} = suggestedProfilesQuery;\n\n const updateScrollButtons = () => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n const canScrollL = container.scrollLeft > 0;\n const canScrollR = container.scrollLeft < container.scrollWidth - container.clientWidth;\n\n setCanScrollLeft(canScrollL);\n setCanScrollRight(canScrollR);\n };\n\n useEffect(() => {\n updateScrollButtons();\n }, [suggestedProfilesData]);\n\n if (!isLoadingSuggestedProfiles && (!suggestedProfilesData || suggestedProfilesData.length < 4)) {\n return null;\n }\n\n const handleDismiss = (profileId: string) => {\n // TODO: Implement dismiss functionality\n void profileId;\n };\n\n const handleFollow = (profile: Account) => {\n updateSuggestedProfile(profile.id, {\n followedByMe: true\n });\n };\n\n const handleUnfollow = (profile: Account) => {\n updateSuggestedProfile(profile.id, {\n followedByMe: false\n });\n };\n\n const scrollLeft = () => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n const cardWidth = 160 + 16; // w-40 (160px) + gap-4 (16px)\n container.scrollBy({left: -cardWidth * 2, behavior: 'smooth'});\n };\n\n const scrollRight = () => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n const cardWidth = 160 + 16; // w-40 (160px) + gap-4 (16px)\n container.scrollBy({left: cardWidth * 2, behavior: 'smooth'});\n };\n\n return (\n <>\n <div className='pb-7 pt-4'>\n <div className='mb-3 flex items-center justify-between'>\n <H4 className='text-lg font-semibold text-black dark:text-white'>More people to follow</H4>\n <Button className='px-0 font-medium text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white' variant='link' onClick={() => navigate('/explore')}>\n Find more →\n </Button>\n </div>\n\n <div className='relative'>\n {canScrollLeft && (\n <Button\n className='absolute -left-10 top-1/2 z-10 size-10 -translate-y-1/2 text-gray-700 hover:bg-transparent max-lg:hidden dark:text-gray-600 dark:hover:text-white'\n variant='ghost'\n onClick={scrollLeft}\n >\n <LucideIcon.ChevronLeft className='!size-6' />\n </Button>\n )}\n\n {canScrollRight && (\n <Button\n className='absolute -right-10 top-1/2 z-10 size-10 -translate-y-1/2 text-gray-700 hover:bg-transparent max-lg:hidden dark:text-gray-600 dark:hover:text-white'\n variant='ghost'\n onClick={scrollRight}\n >\n <LucideIcon.ChevronRight className='!size-6' />\n </Button>\n )}\n\n <div\n ref={scrollContainerRef}\n className='flex snap-x snap-mandatory gap-4 overflow-x-auto'\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none'\n }}\n onScroll={updateScrollButtons}\n >\n {(isLoadingSuggestedProfiles ? Array(10).fill(null) : (suggestedProfilesData || [])).map((profile, index) => (\n <div\n key={profile?.id || `loading-${index}`}\n className='relative w-40 shrink-0 snap-start rounded-lg bg-gray-75 p-4 dark:bg-gray-925/30'\n onClick={!isLoadingSuggestedProfiles && profile ? () => navigate(`/profile/${profile.handle}`) : undefined}\n >\n <Button\n className='absolute right-2 top-1 hidden p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300'\n variant='link'\n onClick={(e) => {\n e.stopPropagation();\n handleDismiss(profile?.id || '');\n }}\n >\n <LucideIcon.X className='size-4' />\n </Button>\n\n <div className='flex flex-col items-center text-center'>\n <div className='mb-3'>\n {isLoadingSuggestedProfiles ? (\n <Skeleton className='size-16 rounded-full' />\n ) : (\n <ProfilePreviewHoverCard actor={profile} align='center'>\n <div>\n <APAvatar\n author={{\n icon: {url: profile?.avatarUrl || ''},\n name: profile?.name || '',\n handle: profile?.handle || ''\n }}\n size='md'\n />\n </div>\n </ProfilePreviewHoverCard>\n )}\n </div>\n\n <span className='mb-6 w-full truncate font-semibold text-black dark:text-white'>\n {isLoadingSuggestedProfiles ? (\n <Skeleton className='h-5 w-32' />\n ) : (\n profile?.name || ''\n )}\n </span>\n\n {isLoadingSuggestedProfiles ? (\n <Skeleton className='h-8 w-16' />\n ) : (\n <FollowButton\n following={profile?.followedByMe || false}\n handle={profile?.handle || ''}\n type='primary'\n onFollow={() => profile && handleFollow(profile)}\n onUnfollow={() => profile && handleUnfollow(profile)}\n />\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n <Separator />\n </>\n );\n};\n\nexport default SuggestedProfiles;\n","import FeedInput from './feed-input';\nimport FeedItem from '@src/components/feed/feed-item';\nimport Layout from '@src/components/layout';\nimport NewNoteModal from '@src/components/modals/new-note-modal';\nimport SuggestedProfiles from './suggested-profiles';\nimport {Activity} from '@src/api/activitypub';\nimport {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';\nimport {Button, LoadingIndicator, LucideIcon, Separator} from '@tryghost/shade';\nimport {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator';\nimport {isPendingActivity} from '@src/utils/pending-activity';\nimport {useEffect, useRef} from 'react';\nimport {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';\n\nexport type FeedListProps = {\n isLoading: boolean,\n activities: Activity[],\n user: ActorProperties,\n fetchNextPage: () => void,\n hasNextPage: boolean,\n isFetchingNextPage: boolean\n}\n\nconst FeedList:React.FC<FeedListProps> = ({\n isLoading,\n activities,\n user,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage\n}) => {\n const navigate = useNavigateWithBasePath();\n\n const observerRef = useRef<IntersectionObserver | null>(null);\n const loadMoreRef = useRef<HTMLDivElement | null>(null);\n const endLoadMoreRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n\n observerRef.current = new IntersectionObserver((entries) => {\n if (entries[0].isIntersecting && hasNextPage && !isFetchingNextPage) {\n fetchNextPage();\n }\n });\n\n if (loadMoreRef.current) {\n observerRef.current.observe(loadMoreRef.current);\n }\n\n if (endLoadMoreRef.current) {\n observerRef.current.observe(endLoadMoreRef.current);\n }\n\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n };\n }, [hasNextPage, isFetchingNextPage, fetchNextPage]);\n\n const loadMoreIndex = Math.max(0, Math.floor(activities.length * 0.75) - 1);\n\n return (\n <Layout>\n <div className='flex w-full flex-col'>\n <div className='w-full'>\n {activities.length > 0 ? (\n <div className='my-4'>\n <div className='mx-auto flex items-start gap-11'>\n <div className='flex w-full min-w-0 flex-col items-center'>\n <div className='flex w-full min-w-0 max-w-[620px] flex-col items-start'>\n <FeedInput user={user} />\n <ul className='mx-auto flex w-full flex-col px-4 max-lg:px-0' data-testid=\"feed-list\">\n {activities.map((activity, index) => (\n <li\n // eslint-disable-next-line react/no-array-index-key\n key={`${activity.id}-${activity.type}-${index}`} // We are using index here as activity.id is cannot be guaranteed to be unique at the moment\n data-testid=\"feed-item\"\n data-test-view-article\n >\n <FeedItem\n actor={activity.actor}\n allowDelete={activity.object.authored}\n commentCount={activity.object.replyCount ?? 0}\n isLoading={isLoading}\n isPending={isPendingActivity(activity.id)}\n layout={'feed'}\n likeCount={activity.object.likeCount ?? 0}\n object={activity.object}\n repostCount={activity.object.repostCount ?? 0}\n type={activity.type}\n onClick={() => {\n navigate(`/notes/${encodeURIComponent(activity.id)}`);\n }}\n />\n {index < activities.length - 1 && (\n <Separator />\n )}\n {index === 3 && (\n <SuggestedProfiles />\n )}\n {index === loadMoreIndex && (\n <div ref={loadMoreRef} className='h-1'></div>\n )}\n </li>\n ))}\n {isFetchingNextPage && (\n <li className='flex flex-col items-center justify-center space-y-4 text-center'>\n <LoadingIndicator size='md' />\n </li>\n )}\n </ul>\n <div ref={endLoadMoreRef} className='h-1'></div>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div className='flex w-full flex-col items-center gap-10'>\n <div className='mt-4 flex w-full max-w-[620px] flex-col items-center'>\n <FeedInput user={user} />\n <div className='mt-[-128px]'>\n <EmptyViewIndicator>\n <EmptyViewIcon><LucideIcon.Hash /></EmptyViewIcon>\n <div>The Feed is the stream of thoughts and <span className='text-black dark:text-white'>bite-sized updates</span> from people you follow in the Social Web. It's looking a little empty right now but once the people you follow start posting, their updates will show up here.</div>\n <NewNoteModal>\n <Button className='text-white dark:text-black'>\n <LucideIcon.FilePen />\n Write your first note\n </Button>\n </NewNoteModal>\n </EmptyViewIndicator>\n </div>\n </div>\n </div>\n )}\n </div>\n </div>\n </Layout>\n );\n};\n\nexport default FeedList;\n","import AppError from '@components/layout/error';\nimport FeedList from './components/feed-list';\nimport React from 'react';\nimport {isApiError} from '@src/api/activitypub';\nimport {\n useFeedForUser,\n useUserDataForUser\n} from '@hooks/use-activity-pub-queries';\n\nconst Feed: React.FC = () => {\n const {feedQuery} = useFeedForUser({enabled: true});\n const {data, error, fetchNextPage, hasNextPage, isFetchingNextPage, isLoading} = feedQuery;\n\n const activities = (data?.pages.flatMap(page => page.posts) ?? Array.from({length: 5}, (_, index) => ({id: `placeholder-${index}`, object: {}})));\n\n const {data: user} = useUserDataForUser('index');\n\n if (error && isApiError(error)) {\n return <AppError errorCode={error.code} statusCode={error.statusCode}/>;\n }\n\n return <FeedList\n activities={activities}\n fetchNextPage={fetchNextPage}\n hasNextPage={hasNextPage!}\n isFetchingNextPage={isFetchingNextPage}\n isLoading={isLoading}\n user={user!}\n />;\n};\n\nexport default Feed;\n"],"names":["FeedInput","user","jsx","NewNoteModal","jsxs","APAvatar","SuggestedProfiles","scrollContainerRef","useRef","navigate","useNavigateWithBasePath","canScrollLeft","setCanScrollLeft","useState","canScrollRight","setCanScrollRight","suggestedProfilesQuery","updateSuggestedProfile","useSuggestedProfilesForUser","suggestedProfilesData","isLoadingSuggestedProfiles","updateScrollButtons","container","canScrollL","canScrollR","useEffect","handleDismiss","profileId","handleFollow","profile","handleUnfollow","scrollLeft","scrollRight","Fragment","H4","Button","LucideIcon.ChevronLeft","LucideIcon.ChevronRight","index","e","LucideIcon.X","Skeleton","ProfilePreviewHoverCard","FollowButton","Separator","FeedList","isLoading","activities","fetchNextPage","hasNextPage","isFetchingNextPage","observerRef","loadMoreRef","endLoadMoreRef","entries","loadMoreIndex","Layout","activity","FeedItem","isPendingActivity","LoadingIndicator","EmptyViewIndicator","EmptyViewIcon","LucideIcon.Hash","LucideIcon.FilePen","Feed","feedQuery","useFeedForUser","data","error","page","_","useUserDataForUser","isApiError","AppError"],"mappings":";;;AAIA,MAAMA,IAAgD,CAAC,EAAC,MAAAC,QAEhDC,gBAAAA,EAAAA,IAACC,GAAA,EACG,UAAAC,gBAAAA,EAAAA,KAAC,OAAA,EAAI,WAAU,6CACX,UAAA;AAAA,EAAAF,gBAAAA,EAAAA,IAAC,SAAI,WAAU,6CACX,gCAACG,GAAA,EAAS,QAAQJ,GAAyB,EAAA,CAC/C;AAAA,wBACC,OAAA,EAAI,cAAW,YAAW,WAAU,miBAAkiB,UAAA,cAAA,CAAgB;AAAA,EAAA,CAC3lB,EAAA,CACJ,GCJFK,IAA8B,MAAM;AACtC,QAAMC,IAAqBC,EAAuB,IAAI,GAChDC,IAAWC,EAAA,GACX,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClD,CAACC,GAAgBC,CAAiB,IAAIF,EAAS,EAAI,GAEnD,EAAC,wBAAAG,GAAwB,wBAAAC,EAAA,IAA0BC,EAA4B,SAAS,EAAE,GAC1F,EAAC,MAAMC,IAAwB,CAAA,GAAI,WAAWC,MAA8BJ,GAE5EK,IAAsB,MAAM;AAC9B,UAA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gBAAAA,EAAM,MAAM,QAAQ,CAAAE,MAAQA,EAAK,WAAU,MAAM,KAAK,EAAC,QAAQ,KAAI,CAACC,GAAGjC,OAAW,EAAC,IAAI,eAAeA,CAAK,IAAI,QAAQ,CAAA,EAAC,EAAG,GAEzI,EAAC,MAAMrC,MAAQuE,EAAmB,OAAO;AAE/C,SAAIH,KAASI,EAAWJ,CAAK,0BACjBK,GAAA,EAAS,WAAWL,EAAM,MAAM,YAAYA,EAAM,YAAW,IAGlEnE,gBAAAA,EAAAA;AAAAA,IAAC2C;AAAA,IAAA;AAAA,MACJ,YAAAE;AAAA,MACA,eAAAC;AAAA,MACA,aAAAC;AAAA,MACA,oBAAAC;AAAA,MACA,WAAAJ;AAAA,MACA,MAAA7C;AAAA,IAAA;AAAA,EAAA;AAER;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { a6 as e } from "./index-_vEj3NfZ.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.553.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const y = [
|
|
9
|
+
["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
|
|
10
|
+
["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
|
|
11
|
+
["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
|
|
12
|
+
["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }]
|
|
13
|
+
], x = e("hash", y);
|
|
14
|
+
export {
|
|
15
|
+
x as H
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=hash-B-J30lCU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-B-J30lCU.mjs","sources":["../../../node_modules/lucide-react/dist/esm/icons/hash.js"],"sourcesContent":["/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"line\", { x1: \"4\", x2: \"20\", y1: \"9\", y2: \"9\", key: \"4lhtct\" }],\n [\"line\", { x1: \"4\", x2: \"20\", y1: \"15\", y2: \"15\", key: \"vyu0kd\" }],\n [\"line\", { x1: \"10\", x2: \"8\", y1: \"3\", y2: \"21\", key: \"1ggp8o\" }],\n [\"line\", { x1: \"16\", x2: \"14\", y1: \"3\", y2: \"21\", key: \"weycgp\" }]\n];\nconst Hash = createLucideIcon(\"hash\", __iconNode);\n\nexport { __iconNode, Hash as default };\n//# sourceMappingURL=hash.js.map\n"],"names":["__iconNode","Hash","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC/D,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EACjE,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EAChE,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM,KAAK,SAAQ,CAAE;AACnE,GACMC,IAAOC,EAAiB,QAAQF,CAAU;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { a6 as o } from "./index-_vEj3NfZ.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.553.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const t = [
|
|
9
|
+
["polyline", { points: "22 12 16 12 14 15 10 15 8 12 2 12", key: "o97t9d" }],
|
|
10
|
+
[
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",
|
|
14
|
+
key: "oot6mr"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
], e = o("inbox", t);
|
|
18
|
+
export {
|
|
19
|
+
e as I
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=inbox-BrLsHadF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox-BrLsHadF.mjs","sources":["../../../node_modules/lucide-react/dist/esm/icons/inbox.js"],"sourcesContent":["/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"polyline\", { points: \"22 12 16 12 14 15 10 15 8 12 2 12\", key: \"o97t9d\" }],\n [\n \"path\",\n {\n d: \"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\",\n key: \"oot6mr\"\n }\n ]\n];\nconst Inbox = createLucideIcon(\"inbox\", __iconNode);\n\nexport { __iconNode, Inbox as default };\n//# sourceMappingURL=inbox.js.map\n"],"names":["__iconNode","Inbox","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,YAAY,EAAE,QAAQ,qCAAqC,KAAK,SAAQ,CAAE;AAAA,EAC3E;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AACA,GACMC,IAAQC,EAAiB,SAASF,CAAU;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { a6 as v, a7 as y, u as b, d as j, a8 as k, e as F, j as e, L as P, H as B, B as E, a9 as M, R as T, k as L, Q as A, P as C, A as H, S as u, aa as I, ab as S, ac as U } from "./index-_vEj3NfZ.mjs";
|
|
2
|
+
import { T as _ } from "./topic-filter-1kNAxvyr.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* @license lucide-react v0.553.0 - ISC
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the ISC license.
|
|
7
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
const z = [
|
|
10
|
+
[
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
d: "M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3",
|
|
14
|
+
key: "139s4v"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
["path", { d: "M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4", key: "1dlkgp" }],
|
|
18
|
+
["path", { d: "M5 21h14", key: "11awu3" }]
|
|
19
|
+
], Q = v("sprout", z), f = ({ profile: s, update: n, isLoading: t, onOpenChange: l }) => {
|
|
20
|
+
const c = A("index", "me"), { data: r } = c, i = s.handle === (r == null ? void 0 : r.handle), o = () => {
|
|
21
|
+
n(s.id, {
|
|
22
|
+
followedByMe: !0
|
|
23
|
+
});
|
|
24
|
+
}, d = () => {
|
|
25
|
+
n(s.id, {
|
|
26
|
+
followedByMe: !1
|
|
27
|
+
});
|
|
28
|
+
}, x = j();
|
|
29
|
+
return /* @__PURE__ */ e.jsx(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
className: "flex w-full cursor-pointer items-start gap-3 pt-4 [&:last-of-type>:nth-child(2)]:border-none",
|
|
33
|
+
onClick: () => {
|
|
34
|
+
x(`/profile/${s.handle}`);
|
|
35
|
+
},
|
|
36
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col gap-1 border-b border-gray-200 pb-4 dark:border-gray-950", children: [
|
|
37
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
38
|
+
/* @__PURE__ */ e.jsx(C, { actor: s, isCurrentUser: i, children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-3", children: [
|
|
39
|
+
/* @__PURE__ */ e.jsx(H, { author: {
|
|
40
|
+
icon: {
|
|
41
|
+
url: s.avatarUrl
|
|
42
|
+
},
|
|
43
|
+
name: s.name,
|
|
44
|
+
handle: s.handle
|
|
45
|
+
}, onClick: () => l == null ? void 0 : l(!1) }),
|
|
46
|
+
/* @__PURE__ */ e.jsxs("div", { className: "-mt-0.5 flex grow flex-col break-anywhere", children: [
|
|
47
|
+
/* @__PURE__ */ e.jsx("span", { className: "line-clamp-1 font-semibold text-black dark:text-white", children: t ? /* @__PURE__ */ e.jsx(u, { className: "w-full max-w-48" }) : s.name }),
|
|
48
|
+
/* @__PURE__ */ e.jsx("span", { className: "line-clamp-1 text-md text-gray-700 dark:text-gray-600", children: t ? /* @__PURE__ */ e.jsx(u, { className: "w-32" }) : s.handle })
|
|
49
|
+
] })
|
|
50
|
+
] }) }),
|
|
51
|
+
t ? /* @__PURE__ */ e.jsx("div", { className: "inline-flex items-center", children: /* @__PURE__ */ e.jsx(u, { className: "w-24" }) }) : i ? null : /* @__PURE__ */ e.jsx(
|
|
52
|
+
I,
|
|
53
|
+
{
|
|
54
|
+
className: "ml-auto",
|
|
55
|
+
following: s.followedByMe,
|
|
56
|
+
handle: s.handle,
|
|
57
|
+
type: "primary",
|
|
58
|
+
onFollow: o,
|
|
59
|
+
onUnfollow: d
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ e.jsx("div", { className: "pl-[52px]", children: t ? /* @__PURE__ */ e.jsx(u, { className: "w-full max-w-96" }) : s.bio && /* @__PURE__ */ e.jsx(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
dangerouslySetInnerHTML: { __html: S(U(s.bio, ["a", "br"])) },
|
|
67
|
+
className: "ap-profile-content pointer-events-none mt-0 line-clamp-2 max-w-[460px] break-anywhere"
|
|
68
|
+
}
|
|
69
|
+
) })
|
|
70
|
+
] })
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}, V = () => {
|
|
74
|
+
const { isExplainerClosed: s, setExplainerClosed: n } = y(), t = b(), l = j(), c = t.topic || "top", { exploreProfilesQuery: r, updateExploreProfile: i } = k("index", c), { data: o, isLoading: d, fetchNextPage: x, hasNextPage: h, isFetchingNextPage: p } = r, w = Array(10).fill(null).map((a, m) => ({
|
|
75
|
+
id: `skeleton-${m}`,
|
|
76
|
+
name: "",
|
|
77
|
+
handle: "",
|
|
78
|
+
avatarUrl: "",
|
|
79
|
+
bio: "",
|
|
80
|
+
url: "",
|
|
81
|
+
followedByMe: !1
|
|
82
|
+
})), g = (o == null ? void 0 : o.pages.flatMap((a) => a.accounts)) || [];
|
|
83
|
+
return F(() => {
|
|
84
|
+
const a = document.querySelector(".load-more-trigger");
|
|
85
|
+
if (!a)
|
|
86
|
+
return;
|
|
87
|
+
const m = new IntersectionObserver(
|
|
88
|
+
(N) => {
|
|
89
|
+
N[0].isIntersecting && h && !p && x();
|
|
90
|
+
},
|
|
91
|
+
{ threshold: 0.1 }
|
|
92
|
+
);
|
|
93
|
+
return m.observe(a), () => m.disconnect();
|
|
94
|
+
}, [h, p, x]), /* @__PURE__ */ e.jsxs(P, { children: [
|
|
95
|
+
!s && /* @__PURE__ */ e.jsxs("div", { className: "relative mb-6 flex items-start gap-1 rounded-md bg-gradient-to-r from-[#CFB0FF66] to-[#B6E8FF66] p-4 pr-10 dark:from-[#CFB0FF20] dark:to-[#B6E8FF20]", children: [
|
|
96
|
+
/* @__PURE__ */ e.jsx("div", { className: "min-w-[46px]", children: /* @__PURE__ */ e.jsx(Q, { className: "text-purple", size: 46, strokeWidth: 0.75 }) }),
|
|
97
|
+
/* @__PURE__ */ e.jsxs("div", { className: "mt-1 flex flex-col gap-[2px]", children: [
|
|
98
|
+
/* @__PURE__ */ e.jsx(B, { className: "text-pretty", children: "The fastest way to grow your followers, is to follow others!" }),
|
|
99
|
+
/* @__PURE__ */ e.jsx("p", { className: "2xl:text-pretty text-balance text-sm text-black/60 dark:text-white/60", children: "Here are some recommendations to get you started, from Ghost publishers and other great accounts from around the social web." })
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ e.jsx(E, { className: "absolute right-4 top-[17px] size-6 opacity-40", variant: "link", onClick: () => n(!0), children: /* @__PURE__ */ e.jsx(M, { size: 20 }) })
|
|
102
|
+
] }),
|
|
103
|
+
/* @__PURE__ */ e.jsx(
|
|
104
|
+
_,
|
|
105
|
+
{
|
|
106
|
+
currentTopic: c,
|
|
107
|
+
excludeTopics: ["following"],
|
|
108
|
+
onTopicChange: (a) => {
|
|
109
|
+
a === "top" ? l("/explore", { replace: !0 }) : l(`/explore/${a}`, { replace: !0 });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
/* @__PURE__ */ e.jsx("div", { className: "mt-12 flex flex-col gap-12 pb-20 max-md:mt-5", children: d ? /* @__PURE__ */ e.jsx("div", { children: w.map((a) => /* @__PURE__ */ e.jsx("div", { className: "mx-auto w-full max-w-[640px]", children: /* @__PURE__ */ e.jsx(
|
|
114
|
+
f,
|
|
115
|
+
{
|
|
116
|
+
isLoading: d,
|
|
117
|
+
profile: a,
|
|
118
|
+
update: () => {
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
) }, a.id)) }) : /* @__PURE__ */ e.jsxs("div", { className: "mx-auto flex w-full max-w-[640px] flex-col items-center", children: [
|
|
122
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-full", children: g.map((a) => /* @__PURE__ */ e.jsx(T.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
123
|
+
f,
|
|
124
|
+
{
|
|
125
|
+
isLoading: !1,
|
|
126
|
+
profile: a,
|
|
127
|
+
update: i
|
|
128
|
+
}
|
|
129
|
+
) }, a.id)) }),
|
|
130
|
+
/* @__PURE__ */ e.jsx("div", { className: "load-more-trigger h-4 w-full" }),
|
|
131
|
+
p && /* @__PURE__ */ e.jsx("div", { className: "mt-2 flex w-full justify-center", children: /* @__PURE__ */ e.jsx(L, { size: "sm" }) })
|
|
132
|
+
] }) })
|
|
133
|
+
] });
|
|
134
|
+
};
|
|
135
|
+
export {
|
|
136
|
+
V as default
|
|
137
|
+
};
|
|
138
|
+
//# sourceMappingURL=index-BMm_mIRT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BMm_mIRT.mjs","sources":["../../../node_modules/lucide-react/dist/esm/icons/sprout.js","../src/views/explore/explore.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3\",\n key: \"139s4v\"\n }\n ],\n [\"path\", { d: \"M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4\", key: \"1dlkgp\" }],\n [\"path\", { d: \"M5 21h14\", key: \"11awu3\" }]\n];\nconst Sprout = createLucideIcon(\"sprout\", __iconNode);\n\nexport { __iconNode, Sprout as default };\n//# sourceMappingURL=sprout.js.map\n","import APAvatar from '@src/components/global/ap-avatar';\nimport FollowButton from '@src/components/global/follow-button';\nimport Layout from '@components/layout';\nimport ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';\nimport React, {useEffect} from 'react';\nimport TopicFilter, {type Topic} from '@src/components/topic-filter';\nimport {type Account, type ExploreAccount} from '@src/api/activitypub';\nimport {Button, H4, LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade';\nimport {openLinksInNewTab, stripHtml} from '@src/utils/content-formatters';\nimport {useAccountForUser, useExploreProfilesForUserByTopic} from '@hooks/use-activity-pub-queries';\nimport {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';\nimport {useOnboardingStatus} from '@src/components/layout/onboarding';\nimport {useParams} from '@tryghost/admin-x-framework';\n\ninterface ExploreProfileProps {\n profile: ExploreAccount;\n update: (id: string, updated: Partial<Account>) => void;\n isLoading: boolean;\n}\n\nexport const ExploreProfile: React.FC<ExploreProfileProps & {\n onOpenChange?: (open: boolean) => void;\n}> = ({profile, update, isLoading, onOpenChange}) => {\n const currentAccountQuery = useAccountForUser('index', 'me');\n const {data: currentUser} = currentAccountQuery;\n const isCurrentUser = profile.handle === currentUser?.handle;\n\n const onFollow = () => {\n update(profile.id, {\n followedByMe: true\n });\n };\n\n const onUnfollow = () => {\n update(profile.id, {\n followedByMe: false\n });\n };\n\n const navigate = useNavigateWithBasePath();\n\n return (\n <div\n className='flex w-full cursor-pointer items-start gap-3 pt-4 [&:last-of-type>:nth-child(2)]:border-none'\n onClick={() => {\n navigate(`/profile/${profile.handle}`);\n }}\n >\n <div className='flex w-full flex-col gap-1 border-b border-gray-200 pb-4 dark:border-gray-950'>\n <div className='flex items-center justify-between gap-3'>\n <ProfilePreviewHoverCard actor={profile as Account} isCurrentUser={isCurrentUser}>\n <div className='flex gap-3'>\n <APAvatar author={\n {\n icon: {\n url: profile.avatarUrl\n },\n name: profile.name,\n handle: profile.handle\n }\n } onClick={() => onOpenChange?.(false)} />\n <div className='-mt-0.5 flex grow flex-col break-anywhere'>\n <span className='line-clamp-1 font-semibold text-black dark:text-white'>{!isLoading ? profile.name : <Skeleton className='w-full max-w-48' />}</span>\n <span className='line-clamp-1 text-md text-gray-700 dark:text-gray-600'>{!isLoading ? profile.handle : <Skeleton className='w-32' />}</span>\n </div>\n </div>\n </ProfilePreviewHoverCard>\n {!isLoading ? (\n !isCurrentUser ? (\n <FollowButton\n className='ml-auto'\n following={profile.followedByMe}\n handle={profile.handle}\n type='primary'\n onFollow={onFollow}\n onUnfollow={onUnfollow}\n />\n ) : null\n ) : (\n <div className='inline-flex items-center'>\n <Skeleton className='w-24' />\n </div>\n )}\n </div>\n <div className='pl-[52px]'>\n {isLoading ?\n <Skeleton className='w-full max-w-96' />\n :\n profile.bio &&\n <div\n dangerouslySetInnerHTML={{__html: openLinksInNewTab(stripHtml(profile.bio, ['a', 'br']))}}\n className='ap-profile-content pointer-events-none mt-0 line-clamp-2 max-w-[460px] break-anywhere'\n />\n }\n </div>\n </div>\n </div>\n );\n};\n\nconst Explore: React.FC = () => {\n const {isExplainerClosed, setExplainerClosed} = useOnboardingStatus();\n const params = useParams<{topic?: string}>();\n const navigate = useNavigateWithBasePath();\n\n const topic: Topic = (params.topic as Topic) || 'top';\n\n const {exploreProfilesQuery, updateExploreProfile} = useExploreProfilesForUserByTopic('index', topic);\n const {data: exploreProfilesData, isLoading: isLoadingExploreProfiles, fetchNextPage, hasNextPage, isFetchingNextPage} = exploreProfilesQuery;\n\n const emptyProfiles = Array(10).fill(null).map((_, i) => ({\n id: `skeleton-${i}`,\n name: '',\n handle: '',\n avatarUrl: '',\n bio: '',\n url: '',\n followedByMe: false\n }));\n\n const profiles = exploreProfilesData?.pages.flatMap(page => page.accounts) || [];\n\n useEffect(() => {\n const node = document.querySelector('.load-more-trigger');\n if (!node) {\n return;\n }\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting && hasNextPage && !isFetchingNextPage) {\n fetchNextPage();\n }\n },\n {threshold: 0.1}\n );\n\n observer.observe(node);\n return () => observer.disconnect();\n }, [hasNextPage, isFetchingNextPage, fetchNextPage]);\n\n return (\n <Layout>\n {!isExplainerClosed &&\n <div className='relative mb-6 flex items-start gap-1 rounded-md bg-gradient-to-r from-[#CFB0FF66] to-[#B6E8FF66] p-4 pr-10 dark:from-[#CFB0FF20] dark:to-[#B6E8FF20]'>\n <div className='min-w-[46px]'>\n <LucideIcon.Sprout className='text-purple' size={46} strokeWidth={0.75} />\n </div>\n <div className='mt-1 flex flex-col gap-[2px]'>\n <H4 className='text-pretty'>The fastest way to grow your followers, is to follow others!</H4>\n <p className='2xl:text-pretty text-balance text-sm text-black/60 dark:text-white/60'>Here are some recommendations to get you started, from Ghost publishers and other great accounts from around the social web.</p>\n </div>\n <Button className='absolute right-4 top-[17px] size-6 opacity-40' variant='link' onClick={() => setExplainerClosed(true)}><LucideIcon.X size={20} /></Button>\n </div>\n }\n <TopicFilter\n currentTopic={topic}\n excludeTopics={['following']}\n onTopicChange={(newTopic) => {\n if (newTopic === 'top') {\n navigate('/explore', {replace: true});\n } else {\n navigate(`/explore/${newTopic}`, {replace: true});\n }\n }}\n />\n <div className='mt-12 flex flex-col gap-12 pb-20 max-md:mt-5'>\n {isLoadingExploreProfiles ? (\n <div>\n {emptyProfiles.map(profile => (\n <div key={profile.id} className='mx-auto w-full max-w-[640px]'>\n <ExploreProfile\n isLoading={isLoadingExploreProfiles}\n profile={profile}\n update={() => {}}\n />\n </div>\n ))}\n </div>\n ) : (\n <div className='mx-auto flex w-full max-w-[640px] flex-col items-center'>\n <div className='w-full'>\n {profiles.map(profile => (\n <React.Fragment key={profile.id}>\n <ExploreProfile\n isLoading={false}\n profile={profile}\n update={updateExploreProfile}\n />\n </React.Fragment>\n ))}\n </div>\n <div className='load-more-trigger h-4 w-full' />\n {isFetchingNextPage && (\n <div className='mt-2 flex w-full justify-center'>\n <LoadingIndicator size='sm' />\n </div>\n )}\n </div>\n )}\n </div>\n </Layout>\n );\n};\n\nexport default Explore;\n"],"names":["__iconNode","Sprout","createLucideIcon","ExploreProfile","profile","update","isLoading","onOpenChange","currentAccountQuery","useAccountForUser","currentUser","isCurrentUser","onFollow","onUnfollow","navigate","useNavigateWithBasePath","jsx","jsxs","ProfilePreviewHoverCard","APAvatar","Skeleton","FollowButton","openLinksInNewTab","stripHtml","Explore","isExplainerClosed","setExplainerClosed","useOnboardingStatus","params","useParams","topic","exploreProfilesQuery","updateExploreProfile","useExploreProfilesForUserByTopic","exploreProfilesData","isLoadingExploreProfiles","fetchNextPage","hasNextPage","isFetchingNextPage","emptyProfiles","_","i","profiles","page","useEffect","node","observer","entries","Layout","LucideIcon.Sprout","H4","Button","LucideIcon.X","TopicFilter","newTopic","React","LoadingIndicator"],"mappings":";;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AAAA,EACE,CAAC,QAAQ,EAAE,GAAG,oCAAoC,KAAK,SAAQ,CAAE;AAAA,EACjE,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAC3C,GACMC,IAASC,EAAiB,UAAUF,CAAU,GCAvCG,IAER,CAAC,EAAC,SAAAC,GAAS,QAAAC,GAAQ,WAAAC,GAAW,cAAAC,QAAkB;AACjD,QAAMC,IAAsBC,EAAkB,SAAS,IAAI,GACrD,EAAC,MAAMC,EAAA,IAAeF,GACtBG,IAAgBP,EAAQ,YAAWM,KAAA,gBAAAA,EAAa,SAEhDE,IAAW,MAAM;AACnB,IAAAP,EAAOD,EAAQ,IAAI;AAAA,MACf,cAAc;AAAA,IAAA,CACjB;AAAA,EACL,GAEMS,IAAa,MAAM;AACrB,IAAAR,EAAOD,EAAQ,IAAI;AAAA,MACf,cAAc;AAAA,IAAA,CACjB;AAAA,EACL,GAEMU,IAAWC,EAAA;AAEjB,SACIC,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAU;AAAA,MACV,SAAS,MAAM;AACX,QAAAF,EAAS,YAAYV,E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